Moved the Agents into their own repo. Kept the agent.pl just for reference
This commit is contained in:
parent
22381be29a
commit
8680a02b13
18132 changed files with 0 additions and 2569420 deletions
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,252 +0,0 @@
|
|||
$(document).ready(function(){
|
||||
wireClicks();
|
||||
animateProgressBars();
|
||||
toggleEvents();
|
||||
});
|
||||
|
||||
function wireClicks(){
|
||||
$("span.versionInfo").click(function(e){
|
||||
handleVersionClick();
|
||||
});
|
||||
|
||||
$(".getAPILinks").click(function(e){
|
||||
showAPILinks($(this));
|
||||
});
|
||||
|
||||
$(".serverIdToggle").click(function(e){
|
||||
showHideServerIDShow($(this));
|
||||
});
|
||||
}
|
||||
|
||||
function showHideServerIDShow(linkElem){
|
||||
if($(".serverId:visible").length){
|
||||
$(".serverId").removeClass('hide').addClass('hide');
|
||||
$(linkElem).text($(linkElem).attr('showtext'));
|
||||
$("tr.expand-child").each(function(e){
|
||||
$("td:first", $(this)).attr('colspan', Number($("td:first", $(this)).attr('colspan')) - 1);
|
||||
});
|
||||
}else{
|
||||
$(".serverId").removeClass('hide');
|
||||
$(linkElem).text($(linkElem).attr('hidetext'));
|
||||
$("tr.expand-child").each(function(e){
|
||||
$("td:first", $(this)).attr('colspan', Number($("td:first", $(this)).attr('colspan')) + 1);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function animateProgressBars(){
|
||||
var percent = 0;
|
||||
$(".progress-bar").each(function() {
|
||||
percent = $(this).attr("data");
|
||||
if(percent){
|
||||
$(this).animate({
|
||||
width: percent + "%"
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function showAPILinks(elem){
|
||||
$("div.mangificWrapper .magnificTitle").text(getLang('api_links'));
|
||||
|
||||
var apiToken = elem.attr('token');
|
||||
var ipAddr = elem.attr('ip');
|
||||
var port = elem.attr('port');
|
||||
var modKey = elem.attr('modkey');
|
||||
var panelURL = elem.attr('panelurl');
|
||||
|
||||
if(apiToken && ipAddr && port && modKey && panelURL){
|
||||
|
||||
var actions = new Array(
|
||||
{url: 'ogp_api.php?gamemanager/start', lang: 'start_server'},
|
||||
{url: 'ogp_api.php?gamemanager/stop', lang: 'stop_server'},
|
||||
{url: 'ogp_api.php?gamemanager/restart', lang: 'restart_server'}
|
||||
);
|
||||
|
||||
|
||||
var hasRcon = elem.attr('hasrcon');
|
||||
if(hasRcon && hasRcon === 'true'){
|
||||
actions.push({url: 'ogp_api.php?gamemanager/rcon', lang: 'rcon_command_title', additional: '&command={YOUR_RCON_COMMAND}'});
|
||||
}
|
||||
|
||||
var isSteam = elem.attr('hassteam');
|
||||
if(isSteam && isSteam === 'true'){
|
||||
actions.push({url: 'ogp_api.php?gamemanager/update', lang: 'get_steam_autoupdate_api_link', additional: '&type=steam', selected: true});
|
||||
}
|
||||
|
||||
var selectListHTML = '<select class="ogpAPIActions">';
|
||||
for(var i = 0; i < actions.length; i++){
|
||||
selectListHTML += '<option value="' + actions[i]["url"] + '" ' + (actions[i].hasOwnProperty('additional') && actions[i].additional ? 'additional="' + actions[i].additional + '"' : '') + ' ' + (actions[i].hasOwnProperty('selected') && actions[i]["selected"] && actions[i]["selected"] == true ? 'selected' : '') + '>' + getLang(actions[i]["lang"]) + '</option>';
|
||||
}
|
||||
selectListHTML += '</select>';
|
||||
|
||||
$("div.mangificWrapper .magnificContentsDiv").html(decodeEntities(getLang('api_links_popup_html')) + '<p>' + getLang('actions') +': ' + selectListHTML + '</p><p><input class="updateLink" style="width: 75%;" type="text" value=""><button class="copyButton">' + $(elem).attr('copyme') + '</button> <span class="copyStatus"></span></p>');
|
||||
|
||||
showPopup(function(){
|
||||
$(".ogpAPIActions").change(function(e){
|
||||
var newActionValue = $(this).val();
|
||||
var apiURL = panelURL + '/' + newActionValue + '&token=' + apiToken + '&ip=' + ipAddr + '&port=' + port + '&mod_key=' + modKey;
|
||||
var additionalParamsToAdd = $('option:selected', $(this)).attr('additional');
|
||||
if(additionalParamsToAdd){
|
||||
apiURL += additionalParamsToAdd;
|
||||
}
|
||||
$("input.updateLink").val(apiURL);
|
||||
});
|
||||
|
||||
$("input.updateLink").click(function(e){
|
||||
$(this).select();
|
||||
});
|
||||
|
||||
$(".copyButton").click(function(e){
|
||||
copyInput($("input.updateLink"), $("span.copyStatus"), elem);
|
||||
});
|
||||
|
||||
copyInput($("input.updateLink"), $("span.copyStatus"), elem);
|
||||
|
||||
$(".ogpAPIActions").trigger('change');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function copyInput(input, resultArea, elemWithAttr){
|
||||
input.select();
|
||||
var successful = document.execCommand('copy');
|
||||
var msg = successful ? 'successful' : 'unsuccessful';
|
||||
logToConsole('Copying text command was ' + msg);
|
||||
if(successful){
|
||||
$(resultArea).text($(elemWithAttr).attr('copysuccess')).fadeIn('fast').delay(500).fadeOut('slow').delay(500).fadeIn('slow').delay(500).fadeOut('slow').delay(500).fadeIn('fast').delay(2000).fadeIn('fast').fadeOut('slow');
|
||||
}else{
|
||||
$(resultArea).text($(elemWithAttr).attr('copyfail')).fadeIn('fast').delay(500).fadeOut('slow').delay(500).fadeIn('slow').delay(500).fadeOut('slow').delay(500).fadeIn('fast').delay(2000).fadeIn('fast').fadeOut('slow');
|
||||
}
|
||||
}
|
||||
|
||||
function showPopup(onOpen, onClose){
|
||||
$.magnificPopup.open({
|
||||
items: {
|
||||
src: $("div.mangificWrapper div.white-popup"),
|
||||
type: 'inline'
|
||||
},
|
||||
callbacks: {
|
||||
close: function() {
|
||||
cleanupPopup();
|
||||
if(!isUndefinedOrEmptyValue(onClose) && jQuery.isFunction(onClose)){
|
||||
onClose();
|
||||
}
|
||||
},
|
||||
open: function() {
|
||||
if(!isUndefinedOrEmptyValue(onOpen) && jQuery.isFunction(onOpen)){
|
||||
onOpen();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function cleanupPopup(){
|
||||
$("div.mangificWrapper .magnificTitle").text('');
|
||||
$("div.mangificWrapper .magnificContentsDiv").html('');
|
||||
}
|
||||
|
||||
function handleVersionClick(){
|
||||
if($("span.versionNumber").hasClass("hide")){
|
||||
$("span.versionNumber").removeClass("hide");
|
||||
$("span.version").removeClass("hide");
|
||||
|
||||
// Copy the value of the version if their browser supports it
|
||||
$(document.body).append("<input class='tempCopyValue hide' type='text' value='" + $("span.versionNumber").text() + "' />");
|
||||
try {
|
||||
$("input.tempCopyValue").removeClass("hide");
|
||||
$("input.tempCopyValue").select();
|
||||
var successful = document.execCommand('copy');
|
||||
$("input.tempCopyValue").remove();
|
||||
var msg = successful ? 'successful' : 'unsuccessful';
|
||||
logToConsole('Copying text command was ' + msg);
|
||||
if(successful){
|
||||
$("span.copyVersionResult").text($("span.copyVersionResult").attr('lang')).css("color", "#43ff0f").removeClass("hide");
|
||||
$("span.copyVersionResult").css("left", $("span.versionNumber").offset().left + $("span.versionNumber").width() + 5 + "px");
|
||||
$("span.copyVersionResult").fadeIn('fast', function(e){ hideVLength(); }).delay(500).fadeOut('slow', function(e){ showVLength(); }).delay(500).fadeIn('slow', function(e){ hideVLength(); }).delay(500).fadeOut('slow', function(e){ showVLength(); }).delay(500).fadeIn('fast', function(e){ hideVLength(); }).delay(2000).fadeIn('fast',function() {
|
||||
resetVersionView(true);
|
||||
});
|
||||
}
|
||||
}catch(err){
|
||||
resetVersionView(true);
|
||||
}
|
||||
}else{
|
||||
$("span.copyVersionResult").stop();
|
||||
resetVersionView();
|
||||
}
|
||||
}
|
||||
|
||||
function logToConsole(msg){
|
||||
window.console && console.log(msg);
|
||||
}
|
||||
|
||||
function isUndefinedOrEmptyValue(input, canBeFalse){
|
||||
if(typeof input === typeof undefined || input === null || input === ''){
|
||||
return true;
|
||||
}
|
||||
|
||||
if(input === false && !isUndefinedOrEmptyValue(canBeFalse) && canBeFalse === true){
|
||||
return false;
|
||||
}else if(input === false){
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function resetVersionView(hideVersion){
|
||||
$("input.tempCopyValue").remove();
|
||||
$("span.copyVersionResult").text("");
|
||||
if(isUndefinedOrEmptyValue(hideVersion)){
|
||||
$("span.versionNumber").removeClass("hide").addClass("hide");
|
||||
$("span.version").removeClass("hide").addClass("hide");
|
||||
}
|
||||
$("span.copyVersionResult").removeClass("hide").addClass("hide");
|
||||
}
|
||||
|
||||
function hideVLength(){
|
||||
$("span.versionNumberCopyLengthener").removeClass("hide").addClass("hide");
|
||||
}
|
||||
|
||||
function showVLength(){
|
||||
$("span.versionNumberCopyLengthener").removeClass("hide");
|
||||
}
|
||||
|
||||
function toggleEvents(){
|
||||
// Toggle show server id if setting is enabled and the markup is on the page.
|
||||
if($("p.serverIdToggle").length){
|
||||
$("p.serverIdToggle").trigger("click");
|
||||
}
|
||||
|
||||
$(".tablesorter").tablesorter({
|
||||
cssHeader: "header",
|
||||
cssAsc: "headerSortUp",
|
||||
cssDesc: "headerSortDown",
|
||||
cssChildRow: "expand-child",
|
||||
sortInitialOrder: "asc",
|
||||
sortMultiSortKey: "shiftKey"
|
||||
});
|
||||
}
|
||||
|
||||
function getLang(key){
|
||||
if(!key.startsWith(langConstPrefix)){
|
||||
key = langConstPrefix + key;
|
||||
}
|
||||
|
||||
if(langConsts && langConsts.hasOwnProperty(key)){
|
||||
return langConsts[key];
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
function decodeEntities(encodedString) {
|
||||
var textArea = document.createElement('textarea');
|
||||
textArea.innerHTML = encodedString;
|
||||
var toReturn = textArea.value;
|
||||
textArea.remove();
|
||||
return toReturn;
|
||||
}
|
||||
|
||||
|
||||
5
ControlPanel/js/jquery/jquery.min.js
vendored
5
ControlPanel/js/jquery/jquery.min.js
vendored
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1,23 +0,0 @@
|
|||
|
||||
(function($){var escapeable=/["\\\x00-\x1f\x7f-\x9f]/g,meta={'\b':'\\b','\t':'\\t','\n':'\\n','\f':'\\f','\r':'\\r','"':'\\"','\\':'\\\\'};$.toJSON=typeof JSON==='object'&&JSON.stringify?JSON.stringify:function(o){if(o===null){return'null';}
|
||||
var type=typeof o;if(type==='undefined'){return undefined;}
|
||||
if(type==='number'||type==='boolean'){return''+o;}
|
||||
if(type==='string'){return $.quoteString(o);}
|
||||
if(type==='object'){if(typeof o.toJSON==='function'){return $.toJSON(o.toJSON());}
|
||||
if(o.constructor===Date){var month=o.getUTCMonth()+1,day=o.getUTCDate(),year=o.getUTCFullYear(),hours=o.getUTCHours(),minutes=o.getUTCMinutes(),seconds=o.getUTCSeconds(),milli=o.getUTCMilliseconds();if(month<10){month='0'+month;}
|
||||
if(day<10){day='0'+day;}
|
||||
if(hours<10){hours='0'+hours;}
|
||||
if(minutes<10){minutes='0'+minutes;}
|
||||
if(seconds<10){seconds='0'+seconds;}
|
||||
if(milli<100){milli='0'+milli;}
|
||||
if(milli<10){milli='0'+milli;}
|
||||
return'"'+year+'-'+month+'-'+day+'T'+
|
||||
hours+':'+minutes+':'+seconds+'.'+milli+'Z"';}
|
||||
if(o.constructor===Array){var ret=[];for(var i=0;i<o.length;i++){ret.push($.toJSON(o[i])||'null');}
|
||||
return'['+ret.join(',')+']';}
|
||||
var name,val,pairs=[];for(var k in o){type=typeof k;if(type==='number'){name='"'+k+'"';}else if(type==='string'){name=$.quoteString(k);}else{continue;}
|
||||
type=typeof o[k];if(type==='function'||type==='undefined'){continue;}
|
||||
val=$.toJSON(o[k]);pairs.push(name+':'+val);}
|
||||
return'{'+pairs.join(',')+'}';}};$.evalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(src){return eval('('+src+')');};$.secureEvalJSON=typeof JSON==='object'&&JSON.parse?JSON.parse:function(src){var filtered=src.replace(/\\["\\\/bfnrtu]/g,'@').replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,']').replace(/(?:^|:|,)(?:\s*\[)+/g,'');if(/^[\],:{}\s]*$/.test(filtered)){return eval('('+src+')');}else{throw new SyntaxError('Error parsing JSON, source is not valid.');}};$.quoteString=function(string){if(string.match(escapeable)){return'"'+string.replace(escapeable,function(a){var c=meta[a];if(typeof c==='string'){return c;}
|
||||
c=a.charCodeAt();return'\\u00'+Math.floor(c/16).toString(16)+(c%16).toString(16);})+'"';}
|
||||
return'"'+string+'"';};})(jQuery);
|
||||
|
|
@ -1,279 +0,0 @@
|
|||
/*
|
||||
*
|
||||
* Copyright (c) 2006-2011 Sam Collett (http://www.texotela.co.uk)
|
||||
* Dual licensed under the MIT (http://www.opensource.org/licenses/mit-license.php)
|
||||
* and GPL (http://www.opensource.org/licenses/gpl-license.php) licenses.
|
||||
*
|
||||
* Version 1.3
|
||||
* Demo: http://www.texotela.co.uk/code/jquery/numeric/
|
||||
*
|
||||
*/
|
||||
(function($) {
|
||||
/*
|
||||
* Allows only valid characters to be entered into input boxes.
|
||||
* Note: fixes value when pasting via Ctrl+V, but not when using the mouse to paste
|
||||
* side-effect: Ctrl+A does not work, though you can still use the mouse to select (or double-click to select all)
|
||||
*
|
||||
* @name numeric
|
||||
* @param config { decimal : "." , negative : true }
|
||||
* @param callback A function that runs if the number is not valid (fires onblur)
|
||||
* @author Sam Collett (http://www.texotela.co.uk)
|
||||
* @example $(".numeric").numeric();
|
||||
* @example $(".numeric").numeric(","); // use , as separater
|
||||
* @example $(".numeric").numeric({ decimal : "," }); // use , as separator
|
||||
* @example $(".numeric").numeric({ negative : false }); // do not allow negative values
|
||||
* @example $(".numeric").numeric(null, callback); // use default values, pass on the 'callback' function
|
||||
*
|
||||
*/
|
||||
$.fn.numeric = function(config, callback)
|
||||
{
|
||||
if(typeof config === 'boolean')
|
||||
{
|
||||
config = { decimal: config };
|
||||
}
|
||||
config = config || {};
|
||||
// if config.negative undefined, set to true (default is to allow negative numbers)
|
||||
if(typeof config.negative == "undefined") config.negative = true;
|
||||
// set decimal point
|
||||
var decimal = (config.decimal === false) ? "" : config.decimal || ".";
|
||||
// allow negatives
|
||||
var negative = (config.negative === true) ? true : false;
|
||||
// callback function
|
||||
var callback = typeof callback == "function" ? callback : function(){};
|
||||
// set data and methods
|
||||
return this.data("numeric.decimal", decimal).data("numeric.negative", negative).data("numeric.callback", callback).keypress($.fn.numeric.keypress).keyup($.fn.numeric.keyup).blur($.fn.numeric.blur);
|
||||
}
|
||||
|
||||
$.fn.numeric.keypress = function(e)
|
||||
{
|
||||
// get decimal character and determine if negatives are allowed
|
||||
var decimal = $.data(this, "numeric.decimal");
|
||||
var negative = $.data(this, "numeric.negative");
|
||||
// get the key that was pressed
|
||||
var key = e.charCode ? e.charCode : e.keyCode ? e.keyCode : 0;
|
||||
// allow enter/return key (only when in an input box)
|
||||
if(key == 13 && this.nodeName.toLowerCase() == "input")
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if(key == 13)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
var allow = false;
|
||||
// allow Ctrl+A
|
||||
if((e.ctrlKey && key == 97 /* firefox */) || (e.ctrlKey && key == 65) /* opera */) return true;
|
||||
// allow Ctrl+X (cut)
|
||||
if((e.ctrlKey && key == 120 /* firefox */) || (e.ctrlKey && key == 88) /* opera */) return true;
|
||||
// allow Ctrl+C (copy)
|
||||
if((e.ctrlKey && key == 99 /* firefox */) || (e.ctrlKey && key == 67) /* opera */) return true;
|
||||
// allow Ctrl+Z (undo)
|
||||
if((e.ctrlKey && key == 122 /* firefox */) || (e.ctrlKey && key == 90) /* opera */) return true;
|
||||
// allow or deny Ctrl+V (paste), Shift+Ins
|
||||
if((e.ctrlKey && key == 118 /* firefox */) || (e.ctrlKey && key == 86) /* opera */
|
||||
|| (e.shiftKey && key == 45)) return true;
|
||||
// if a number was not pressed
|
||||
if(key < 48 || key > 57)
|
||||
{
|
||||
/* '-' only allowed at start and if negative numbers allowed */
|
||||
if(this.value.indexOf("-") != 0 && negative && key == 45 && (this.value.length == 0 || ($.fn.getSelectionStart(this)) == 0)) return true;
|
||||
/* only one decimal separator allowed */
|
||||
if(decimal && key == decimal.charCodeAt(0) && this.value.indexOf(decimal) != -1)
|
||||
{
|
||||
allow = false;
|
||||
}
|
||||
// check for other keys that have special purposes
|
||||
if(
|
||||
key != 8 /* backspace */ &&
|
||||
key != 9 /* tab */ &&
|
||||
key != 13 /* enter */ &&
|
||||
key != 35 /* end */ &&
|
||||
key != 36 /* home */ &&
|
||||
key != 37 /* left */ &&
|
||||
key != 39 /* right */ &&
|
||||
key != 46 /* del */
|
||||
)
|
||||
{
|
||||
allow = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// for detecting special keys (listed above)
|
||||
// IE does not support 'charCode' and ignores them in keypress anyway
|
||||
if(typeof e.charCode != "undefined")
|
||||
{
|
||||
// special keys have 'keyCode' and 'which' the same (e.g. backspace)
|
||||
if(e.keyCode == e.which && e.which != 0)
|
||||
{
|
||||
allow = true;
|
||||
// . and delete share the same code, don't allow . (will be set to true later if it is the decimal point)
|
||||
if(e.which == 46) allow = false;
|
||||
}
|
||||
// or keyCode != 0 and 'charCode'/'which' = 0
|
||||
else if(e.keyCode != 0 && e.charCode == 0 && e.which == 0)
|
||||
{
|
||||
allow = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
// if key pressed is the decimal and it is not already in the field
|
||||
if(decimal && key == decimal.charCodeAt(0))
|
||||
{
|
||||
if(this.value.indexOf(decimal) == -1)
|
||||
{
|
||||
allow = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
allow = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
allow = true;
|
||||
}
|
||||
return allow;
|
||||
}
|
||||
|
||||
$.fn.numeric.keyup = function(e)
|
||||
{
|
||||
var val = this.value;
|
||||
if(val.length > 0)
|
||||
{
|
||||
// get carat (cursor) position
|
||||
var carat = $.fn.getSelectionStart(this);
|
||||
// get decimal character and determine if negatives are allowed
|
||||
var decimal = $.data(this, "numeric.decimal");
|
||||
var negative = $.data(this, "numeric.negative");
|
||||
|
||||
// prepend a 0 if necessary
|
||||
if(decimal != "")
|
||||
{
|
||||
// find decimal point
|
||||
var dot = val.indexOf(decimal);
|
||||
// if dot at start, add 0 before
|
||||
if(dot == 0)
|
||||
{
|
||||
this.value = "0" + val;
|
||||
}
|
||||
// if dot at position 1, check if there is a - symbol before it
|
||||
if(dot == 1 && val.charAt(0) == "-")
|
||||
{
|
||||
this.value = "-0" + val.substring(1);
|
||||
}
|
||||
val = this.value;
|
||||
}
|
||||
|
||||
// if pasted in, only allow the following characters
|
||||
var validChars = [0,1,2,3,4,5,6,7,8,9,'-',decimal];
|
||||
// get length of the value (to loop through)
|
||||
var length = val.length;
|
||||
// loop backwards (to prevent going out of bounds)
|
||||
for(var i = length - 1; i >= 0; i--)
|
||||
{
|
||||
var ch = val.charAt(i);
|
||||
// remove '-' if it is in the wrong place
|
||||
if(i != 0 && ch == "-")
|
||||
{
|
||||
val = val.substring(0, i) + val.substring(i + 1);
|
||||
}
|
||||
// remove character if it is at the start, a '-' and negatives aren't allowed
|
||||
else if(i == 0 && !negative && ch == "-")
|
||||
{
|
||||
val = val.substring(1);
|
||||
}
|
||||
var validChar = false;
|
||||
// loop through validChars
|
||||
for(var j = 0; j < validChars.length; j++)
|
||||
{
|
||||
// if it is valid, break out the loop
|
||||
if(ch == validChars[j])
|
||||
{
|
||||
validChar = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// if not a valid character, or a space, remove
|
||||
if(!validChar || ch == " ")
|
||||
{
|
||||
val = val.substring(0, i) + val.substring(i + 1);
|
||||
}
|
||||
}
|
||||
// remove extra decimal characters
|
||||
var firstDecimal = val.indexOf(decimal);
|
||||
if(firstDecimal > 0)
|
||||
{
|
||||
for(var i = length - 1; i > firstDecimal; i--)
|
||||
{
|
||||
var ch = val.charAt(i);
|
||||
// remove decimal character
|
||||
if(ch == decimal)
|
||||
{
|
||||
val = val.substring(0, i) + val.substring(i + 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
// set the value and prevent the cursor moving to the end
|
||||
this.value = val;
|
||||
$.fn.setSelection(this, carat);
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.numeric.blur = function()
|
||||
{
|
||||
var decimal = $.data(this, "numeric.decimal");
|
||||
var callback = $.data(this, "numeric.callback");
|
||||
var val = this.value;
|
||||
if(val != "")
|
||||
{
|
||||
var re = new RegExp("^\\d+$|\\d*" + decimal + "\\d+");
|
||||
if(!re.exec(val))
|
||||
{
|
||||
callback.apply(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$.fn.removeNumeric = function()
|
||||
{
|
||||
return this.data("numeric.decimal", null).data("numeric.negative", null).data("numeric.callback", null).unbind("keypress", $.fn.numeric.keypress).unbind("blur", $.fn.numeric.blur);
|
||||
}
|
||||
|
||||
// Based on code from http://javascript.nwbox.com/cursor_position/ (Diego Perini <dperini@nwbox.com>)
|
||||
$.fn.getSelectionStart = function(o)
|
||||
{
|
||||
if (o.createTextRange)
|
||||
{
|
||||
var r = document.selection.createRange().duplicate();
|
||||
r.moveEnd('character', o.value.length);
|
||||
if (r.text == '') return o.value.length;
|
||||
return o.value.lastIndexOf(r.text);
|
||||
} else return o.selectionStart;
|
||||
}
|
||||
|
||||
// set the selection, o is the object (input), p is the position ([start, end] or just start)
|
||||
$.fn.setSelection = function(o, p)
|
||||
{
|
||||
// if p is number, start and end are the same
|
||||
if(typeof p == "number") p = [p, p];
|
||||
// only set if p is an array of length 2
|
||||
if(p && p.constructor == Array && p.length == 2)
|
||||
{
|
||||
if (o.createTextRange)
|
||||
{
|
||||
var r = o.createTextRange();
|
||||
r.collapse(true);
|
||||
r.moveStart('character', p[0]);
|
||||
r.moveEnd('character', p[1]);
|
||||
r.select();
|
||||
}
|
||||
else if(o.setSelectionRange)
|
||||
{
|
||||
o.focus();
|
||||
o.setSelectionRange(p[0], p[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
})(jQuery);
|
||||
|
|
@ -1,181 +0,0 @@
|
|||
(function($, window, document, undefined) {
|
||||
$.fn.quicksearch = function (target, opt) {
|
||||
|
||||
var timeout, cache, rowcache, jq_results, val = '', e = this, options = $.extend({
|
||||
delay: 100,
|
||||
selector: null,
|
||||
stripeRows: null,
|
||||
loader: null,
|
||||
noResults: '',
|
||||
matchedResultsCount: 0,
|
||||
bind: 'keyup',
|
||||
onBefore: function () {
|
||||
return;
|
||||
},
|
||||
onAfter: function () {
|
||||
return;
|
||||
},
|
||||
show: function () {
|
||||
this.style.display = "";
|
||||
},
|
||||
hide: function () {
|
||||
this.style.display = "none";
|
||||
},
|
||||
prepareQuery: function (val) {
|
||||
return val.toLowerCase().split(' ');
|
||||
},
|
||||
testQuery: function (query, txt, _row) {
|
||||
for (var i = 0; i < query.length; i += 1) {
|
||||
if (txt.indexOf(query[i]) === -1) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}, opt);
|
||||
|
||||
this.go = function () {
|
||||
|
||||
var i = 0,
|
||||
numMatchedRows = 0,
|
||||
noresults = true,
|
||||
query = options.prepareQuery(val),
|
||||
val_empty = (val.replace(' ', '').length === 0);
|
||||
|
||||
for (var i = 0, len = rowcache.length; i < len; i++) {
|
||||
if (val_empty || options.testQuery(query, cache[i], rowcache[i])) {
|
||||
options.show.apply(rowcache[i]);
|
||||
noresults = false;
|
||||
numMatchedRows++;
|
||||
} else {
|
||||
options.hide.apply(rowcache[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if (noresults) {
|
||||
this.results(false);
|
||||
} else {
|
||||
this.results(true);
|
||||
this.stripe();
|
||||
}
|
||||
|
||||
this.matchedResultsCount = numMatchedRows;
|
||||
this.loader(false);
|
||||
options.onAfter();
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
/*
|
||||
* External API so that users can perform search programatically.
|
||||
* */
|
||||
this.search = function (submittedVal) {
|
||||
val = submittedVal;
|
||||
e.trigger();
|
||||
};
|
||||
|
||||
/*
|
||||
* External API to get the number of matched results as seen in
|
||||
* https://github.com/ruiz107/quicksearch/commit/f78dc440b42d95ce9caed1d087174dd4359982d6
|
||||
* */
|
||||
this.currentMatchedResults = function() {
|
||||
return this.matchedResultsCount;
|
||||
};
|
||||
|
||||
this.stripe = function () {
|
||||
|
||||
if (typeof options.stripeRows === "object" && options.stripeRows !== null)
|
||||
{
|
||||
var joined = options.stripeRows.join(' ');
|
||||
var stripeRows_length = options.stripeRows.length;
|
||||
|
||||
jq_results.not(':hidden').each(function (i) {
|
||||
$(this).removeClass(joined).addClass(options.stripeRows[i % stripeRows_length]);
|
||||
});
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
this.strip_html = function (input) {
|
||||
var output = input.replace(new RegExp('<[^<]+\>', 'g'), "");
|
||||
output = $.trim(output.toLowerCase());
|
||||
return output;
|
||||
};
|
||||
|
||||
this.results = function (bool) {
|
||||
if (typeof options.noResults === "string" && options.noResults !== "") {
|
||||
if (bool) {
|
||||
$(options.noResults).hide();
|
||||
} else {
|
||||
$(options.noResults).show();
|
||||
}
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
this.loader = function (bool) {
|
||||
if (typeof options.loader === "string" && options.loader !== "") {
|
||||
(bool) ? $(options.loader).show() : $(options.loader).hide();
|
||||
}
|
||||
return this;
|
||||
};
|
||||
|
||||
this.cache = function () {
|
||||
|
||||
jq_results = $(target);
|
||||
|
||||
if (typeof options.noResults === "string" && options.noResults !== "") {
|
||||
jq_results = jq_results.not(options.noResults);
|
||||
}
|
||||
|
||||
var t = (typeof options.selector === "string") ? jq_results.find(options.selector) : $(target).not(options.noResults);
|
||||
cache = t.map(function () {
|
||||
return e.strip_html(this.innerHTML);
|
||||
});
|
||||
|
||||
rowcache = jq_results.map(function () {
|
||||
return this;
|
||||
});
|
||||
|
||||
/*
|
||||
* Modified fix for sync-ing "val".
|
||||
* Original fix https://github.com/michaellwest/quicksearch/commit/4ace4008d079298a01f97f885ba8fa956a9703d1
|
||||
* */
|
||||
val = val || this.val() || "";
|
||||
|
||||
return this.go();
|
||||
};
|
||||
|
||||
this.trigger = function () {
|
||||
this.loader(true);
|
||||
options.onBefore();
|
||||
|
||||
window.clearTimeout(timeout);
|
||||
timeout = window.setTimeout(function () {
|
||||
e.go();
|
||||
}, options.delay);
|
||||
|
||||
return this;
|
||||
};
|
||||
|
||||
this.cache();
|
||||
this.results(true);
|
||||
this.stripe();
|
||||
this.loader(false);
|
||||
|
||||
return this.each(function () {
|
||||
|
||||
/*
|
||||
* Changed from .bind to .on.
|
||||
* */
|
||||
$(this).on(options.bind, function () {
|
||||
|
||||
val = $(this).val();
|
||||
e.trigger();
|
||||
});
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
}(jQuery, this, document));
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
/**
|
||||
* @author Dan G. Switzer II
|
||||
*/
|
||||
(function ($){
|
||||
/* declare defaults */
|
||||
var defaults = {
|
||||
selector: "td.collapsible" // the default selector to use
|
||||
, toggleAllSelector: "" // the selector to use to attach the collapsibleToggle() function
|
||||
, classChildRow: "expand-child" // define the "child row" css class
|
||||
, classCollapse: "collapsed" // define the "collapsed" css class
|
||||
, classExpand: "expanded" // define the "expanded" css class
|
||||
, showCollapsed: false // specifies if the default css state should show collapsed (use this if you want to collapse the rows using CSS by default)
|
||||
, collapse: true // if true will force rows to collapse via JS (use this if you want JS to force the rows collapsed)
|
||||
, fx: {hide:"hide",show:"show"} // the fx to use for showing/hiding elements (fx do not work correctly in IE6)
|
||||
, addAnchor: "append" // how should we add the anchor? append, wrapInner, etc
|
||||
, textExpand: "Expand All" // the text to show when expand all
|
||||
, textCollapse: "Collapse All" // the text to show when collase all
|
||||
};
|
||||
|
||||
$.fn.collapsible = function (sel, options){
|
||||
var self = this, bIsElOpt = (sel && sel.constructor == Object),
|
||||
settings = $.extend({}, defaults, bIsElOpt ? sel : options);
|
||||
|
||||
if( !bIsElOpt ) settings.selector = sel;
|
||||
// make sure that if we're forcing to collapse, that we show the collapsed css state
|
||||
if( settings.collapse ) settings.showCollapsed = true;
|
||||
|
||||
return this.each(function (){
|
||||
var $td = $(settings.selector, this);
|
||||
|
||||
// if a "toggle all" selector has been specified, find and attach the behavior
|
||||
if( settings.toggleAllSelector.length > 0 ) $(this).find(settings.toggleAllSelector).collapsibleToggle(this);
|
||||
|
||||
$("#servermonitor tr td.collapsible").click(function(){
|
||||
var $self = $(this),
|
||||
$tr = $self.parent(),
|
||||
$trc = $tr.next(),
|
||||
bIsCollapsed = $self.hasClass(settings.classExpand);
|
||||
// change the css class
|
||||
$self[bIsCollapsed ? "removeClass" : "addClass"](settings.classExpand)[!bIsCollapsed ? "removeClass" : "addClass"](settings.classCollapse);
|
||||
while( $trc.hasClass(settings.classChildRow) ){
|
||||
// show all the table cells
|
||||
$("td", $trc)[bIsCollapsed ? settings.fx.hide : settings.fx.show]();
|
||||
// get the next row
|
||||
$trc = $trc.next();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
|
||||
// if not IE and we're automatically collapsing rows, collapse them now
|
||||
if( settings.collapse ){
|
||||
$td
|
||||
// get the tr element
|
||||
.parent()
|
||||
.each(function (){
|
||||
var $tr = $(this).next();
|
||||
while( $tr.hasClass(settings.classChildRow) ){
|
||||
// hide each table cell
|
||||
$tr = $tr.find("td").hide().end().next();
|
||||
}
|
||||
});
|
||||
$td.removeClass(settings.classCollapse).addClass(settings.classCollapse);
|
||||
}
|
||||
|
||||
$("#servermonitor tr.expandme td.collapsible").each(function(){
|
||||
var $self = $(this),
|
||||
$tr = $self.parent(),
|
||||
$trc = $tr.next(),
|
||||
bIsCollapsed = $self.hasClass(settings.classExpand);
|
||||
// change the css class
|
||||
$self[bIsCollapsed ? "removeClass" : "addClass"](settings.classExpand)[!bIsCollapsed ? "removeClass" : "addClass"](settings.classCollapse);
|
||||
while( $trc.hasClass(settings.classChildRow) ){
|
||||
// show all the table cells
|
||||
$("td", $trc)[bIsCollapsed ? settings.fx.hide : settings.fx.show]();
|
||||
// get the next row
|
||||
$trc = $trc.next();
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
$.fn.collapsibleToggle = function(table, options){
|
||||
var settings = $.extend({}, defaults, options), $table = $(table);
|
||||
|
||||
// attach the expand behavior to all options
|
||||
this.toggle(
|
||||
// expand all entries
|
||||
function (){
|
||||
var $el = $(this);
|
||||
$el.addClass(settings.classExpand).removeClass(settings.classCollapse);
|
||||
if( !$el.is("td,th") )
|
||||
$el[$el.is(":input") ? "val" : "html"](settings.textCollapse);
|
||||
$(settings.selector, $table).removeClass(settings.classExpand).click();
|
||||
}
|
||||
// collapse all entries
|
||||
, function (){
|
||||
var $el = $(this);
|
||||
$el.addClass(settings.classCollapse).removeClass(settings.classExpand);
|
||||
if( !$el.is("td,th") )
|
||||
$el[$el.is(":input") ? "val" : "html"](settings.textExpand);
|
||||
$(settings.selector, $table).addClass(settings.classExpand).click();
|
||||
}
|
||||
);
|
||||
|
||||
// update text
|
||||
if( !this.is("td,th") ) this[this.is(":input") ? "val" : "html"](settings.textExpand);
|
||||
|
||||
return this.addClass(settings.classCollapse).removeClass(settings.classExpand);
|
||||
}
|
||||
|
||||
var $self = $("#servermonitor tr.expandme td.collapsible");
|
||||
|
||||
})(jQuery);
|
||||
File diff suppressed because one or more lines are too long
Binary file not shown.
|
Before Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 4.4 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 6.2 KiB |
7
ControlPanel/js/jquery/ui/jquery-ui.min.css
vendored
7
ControlPanel/js/jquery/ui/jquery-ui.min.css
vendored
File diff suppressed because one or more lines are too long
13
ControlPanel/js/jquery/ui/jquery-ui.min.js
vendored
13
ControlPanel/js/jquery/ui/jquery-ui.min.js
vendored
File diff suppressed because one or more lines are too long
|
|
@ -1,407 +0,0 @@
|
|||
/* Magnific Popup CSS */
|
||||
.mfp-bg {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1042;
|
||||
overflow: hidden;
|
||||
position: fixed;
|
||||
background: #0b0b0b;
|
||||
opacity: 0.89;
|
||||
filter: alpha(opacity=89); }
|
||||
|
||||
.mfp-wrap {
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
z-index: 1043;
|
||||
position: fixed;
|
||||
outline: none !important;
|
||||
-webkit-backface-visibility: hidden; }
|
||||
|
||||
.mfp-container {
|
||||
text-align: center;
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
top: 0;
|
||||
padding: 0 8px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
|
||||
.mfp-container:before {
|
||||
content: '';
|
||||
display: inline-block;
|
||||
height: 100%;
|
||||
vertical-align: middle; }
|
||||
|
||||
.mfp-align-top .mfp-container:before {
|
||||
display: none; }
|
||||
|
||||
.mfp-content {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin: 0 auto;
|
||||
text-align: left;
|
||||
z-index: 1045; }
|
||||
|
||||
.mfp-inline-holder .mfp-content, .mfp-ajax-holder .mfp-content {
|
||||
width: 50%;
|
||||
cursor: auto;
|
||||
margin-left:auto;
|
||||
margin-right: auto; }
|
||||
|
||||
.mfp-ajax-cur {
|
||||
cursor: progress; }
|
||||
|
||||
.mfp-zoom-out-cur, .mfp-zoom-out-cur .mfp-image-holder .mfp-close {
|
||||
cursor: -moz-zoom-out;
|
||||
cursor: -webkit-zoom-out;
|
||||
cursor: zoom-out; }
|
||||
|
||||
.mfp-zoom {
|
||||
cursor: pointer;
|
||||
cursor: -webkit-zoom-in;
|
||||
cursor: -moz-zoom-in;
|
||||
cursor: zoom-in; }
|
||||
|
||||
.mfp-auto-cursor .mfp-content {
|
||||
cursor: auto; }
|
||||
|
||||
.mfp-close, .mfp-arrow, .mfp-preloader, .mfp-counter {
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
user-select: none; }
|
||||
|
||||
.mfp-loading.mfp-figure {
|
||||
display: none; }
|
||||
|
||||
.mfp-hide {
|
||||
display: none !important; }
|
||||
|
||||
.mfp-preloader {
|
||||
color: #cccccc;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
width: auto;
|
||||
text-align: center;
|
||||
margin-top: -0.8em;
|
||||
left: 8px;
|
||||
right: 8px;
|
||||
z-index: 1044; }
|
||||
.mfp-preloader a {
|
||||
color: #cccccc; }
|
||||
.mfp-preloader a:hover {
|
||||
color: white; }
|
||||
|
||||
.mfp-s-ready .mfp-preloader {
|
||||
display: none; }
|
||||
|
||||
.mfp-s-error .mfp-content {
|
||||
display: none; }
|
||||
|
||||
button.mfp-close, button.mfp-arrow {
|
||||
overflow: visible;
|
||||
cursor: pointer;
|
||||
background: transparent;
|
||||
border: 0;
|
||||
-webkit-appearance: none;
|
||||
display: block;
|
||||
outline: none;
|
||||
padding: 0;
|
||||
z-index: 1046;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none; }
|
||||
button::-moz-focus-inner {
|
||||
padding: 0;
|
||||
border: 0; }
|
||||
|
||||
.mfp-close {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
line-height: 44px;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
text-decoration: none;
|
||||
text-align: center;
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100);
|
||||
padding: 0 0 18px 10px;
|
||||
color: white;
|
||||
font-style: normal;
|
||||
font-size: 32px;
|
||||
font-family: Arial, Baskerville, monospace; }
|
||||
.mfp-close:hover, .mfp-close:focus {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100); }
|
||||
|
||||
.mfp-close-btn-in .mfp-close {
|
||||
color: #white; }
|
||||
|
||||
.mfp-close-btn-in .mfp-close:hover{
|
||||
background-color: #710b01;
|
||||
}
|
||||
|
||||
.mfp-image-holder .mfp-close, .mfp-iframe-holder .mfp-close {
|
||||
color: white;
|
||||
right: -6px;
|
||||
text-align: right;
|
||||
padding-right: 6px;
|
||||
width: 100%; }
|
||||
|
||||
.mfp-counter {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
color: #cccccc;
|
||||
font-size: 12px;
|
||||
line-height: 18px; }
|
||||
|
||||
.mfp-arrow {
|
||||
position: absolute;
|
||||
opacity: 0.65;
|
||||
filter: alpha(opacity=65);
|
||||
margin: 0;
|
||||
top: 50%;
|
||||
margin-top: -55px;
|
||||
padding: 0;
|
||||
width: 90px;
|
||||
height: 110px;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); }
|
||||
.mfp-arrow:active {
|
||||
margin-top: -54px; }
|
||||
.mfp-arrow:hover, .mfp-arrow:focus {
|
||||
opacity: 1;
|
||||
filter: alpha(opacity=100); }
|
||||
.mfp-arrow:before, .mfp-arrow:after, .mfp-arrow .mfp-b, .mfp-arrow .mfp-a {
|
||||
content: '';
|
||||
display: block;
|
||||
width: 0;
|
||||
height: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
margin-top: 35px;
|
||||
margin-left: 35px;
|
||||
border: medium inset transparent; }
|
||||
.mfp-arrow:after, .mfp-arrow .mfp-a {
|
||||
border-top-width: 13px;
|
||||
border-bottom-width: 13px;
|
||||
top: 8px; }
|
||||
.mfp-arrow:before, .mfp-arrow .mfp-b {
|
||||
border-top-width: 21px;
|
||||
border-bottom-width: 21px;
|
||||
opacity: 0.7; }
|
||||
|
||||
.mfp-arrow-left {
|
||||
left: 0; }
|
||||
.mfp-arrow-left:after, .mfp-arrow-left .mfp-a {
|
||||
border-right: 17px solid white;
|
||||
margin-left: 31px; }
|
||||
.mfp-arrow-left:before, .mfp-arrow-left .mfp-b {
|
||||
margin-left: 25px;
|
||||
border-right: 27px solid #3f3f3f; }
|
||||
|
||||
.mfp-arrow-right {
|
||||
right: 0; }
|
||||
.mfp-arrow-right:after, .mfp-arrow-right .mfp-a {
|
||||
border-left: 17px solid white;
|
||||
margin-left: 39px; }
|
||||
.mfp-arrow-right:before, .mfp-arrow-right .mfp-b {
|
||||
border-left: 27px solid #3f3f3f; }
|
||||
|
||||
.mfp-iframe-holder {
|
||||
padding-top: 40px;
|
||||
padding-bottom: 40px; }
|
||||
.mfp-iframe-holder .mfp-content {
|
||||
line-height: 0;
|
||||
width: 100%;
|
||||
max-width: 900px; }
|
||||
.mfp-iframe-holder .mfp-close {
|
||||
top: -40px; }
|
||||
|
||||
.mfp-iframe-scaler {
|
||||
width: 100%;
|
||||
height: 0;
|
||||
overflow: hidden;
|
||||
padding-top: 56.25%; }
|
||||
.mfp-iframe-scaler iframe {
|
||||
position: absolute;
|
||||
display: block;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
||||
background: black; }
|
||||
|
||||
/* Main image in popup */
|
||||
img.mfp-img {
|
||||
width: auto;
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
line-height: 0;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 40px 0 40px;
|
||||
margin: 0 auto; }
|
||||
|
||||
/* The shadow behind the image */
|
||||
.mfp-figure {
|
||||
line-height: 0; }
|
||||
.mfp-figure:after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 40px;
|
||||
bottom: 40px;
|
||||
display: block;
|
||||
right: 0;
|
||||
width: auto;
|
||||
height: auto;
|
||||
z-index: -1;
|
||||
box-shadow: 0 0 8px rgba(0, 0, 0, 0.6);
|
||||
background: #444444; }
|
||||
.mfp-figure small {
|
||||
color: #bdbdbd;
|
||||
display: block;
|
||||
font-size: 12px;
|
||||
line-height: 14px; }
|
||||
.mfp-figure figure {
|
||||
margin: 0; }
|
||||
|
||||
.mfp-bottom-bar {
|
||||
margin-top: -36px;
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
cursor: auto; }
|
||||
|
||||
.mfp-title {
|
||||
text-align: left;
|
||||
line-height: 18px;
|
||||
color: #f3f3f3;
|
||||
word-wrap: break-word;
|
||||
padding-right: 36px; }
|
||||
|
||||
.mfp-image-holder .mfp-content {
|
||||
max-width: 100%; }
|
||||
|
||||
.mfp-gallery .mfp-image-holder .mfp-figure {
|
||||
cursor: pointer; }
|
||||
|
||||
@media screen and (max-width: 800px) and (orientation: landscape), screen and (max-height: 300px) {
|
||||
/**
|
||||
* Remove all paddings around the image on small screen
|
||||
*/
|
||||
.mfp-img-mobile .mfp-image-holder {
|
||||
padding-left: 0;
|
||||
padding-right: 0; }
|
||||
.mfp-img-mobile img.mfp-img {
|
||||
padding: 0; }
|
||||
.mfp-img-mobile .mfp-figure:after {
|
||||
top: 0;
|
||||
bottom: 0; }
|
||||
.mfp-img-mobile .mfp-figure small {
|
||||
display: inline;
|
||||
margin-left: 5px; }
|
||||
.mfp-img-mobile .mfp-bottom-bar {
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
bottom: 0;
|
||||
margin: 0;
|
||||
top: auto;
|
||||
padding: 3px 5px;
|
||||
position: fixed;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box; }
|
||||
.mfp-img-mobile .mfp-bottom-bar:empty {
|
||||
padding: 0; }
|
||||
.mfp-img-mobile .mfp-counter {
|
||||
right: 5px;
|
||||
top: 3px; }
|
||||
.mfp-img-mobile .mfp-close {
|
||||
top: 0;
|
||||
right: 0;
|
||||
width: 35px;
|
||||
height: 35px;
|
||||
line-height: 35px;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
position: fixed;
|
||||
text-align: center;
|
||||
padding: 0; } }
|
||||
|
||||
@media all and (max-width: 900px) {
|
||||
.mfp-arrow {
|
||||
-webkit-transform: scale(0.75);
|
||||
transform: scale(0.75); }
|
||||
.mfp-arrow-left {
|
||||
-webkit-transform-origin: 0;
|
||||
transform-origin: 0; }
|
||||
.mfp-arrow-right {
|
||||
-webkit-transform-origin: 100%;
|
||||
transform-origin: 100%; }
|
||||
.mfp-container {
|
||||
padding-left: 6px;
|
||||
padding-right: 6px; } }
|
||||
|
||||
.mfp-ie7 .mfp-img {
|
||||
padding: 0; }
|
||||
.mfp-ie7 .mfp-bottom-bar {
|
||||
width: 600px;
|
||||
left: 50%;
|
||||
margin-left: -300px;
|
||||
margin-top: 5px;
|
||||
padding-bottom: 5px; }
|
||||
.mfp-ie7 .mfp-container {
|
||||
padding: 0; }
|
||||
.mfp-ie7 .mfp-content {
|
||||
padding-top: 44px; }
|
||||
.mfp-ie7 .mfp-close {
|
||||
top: 0;
|
||||
right: 0;
|
||||
padding-top: 0; }
|
||||
|
||||
.magnificTitle{
|
||||
background-color: #404040;
|
||||
color: white;
|
||||
font-family: 'arial';
|
||||
font-weight: bold;
|
||||
font-size: 22px;
|
||||
padding-left: 10px;
|
||||
height:34px;
|
||||
line-height:34px;
|
||||
}
|
||||
.magnificSubTitle{
|
||||
background-color: #404040;
|
||||
color: white;
|
||||
font-family: 'arial';
|
||||
font-size:16px;
|
||||
font-weight: bold;
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
.magnificContentsDiv{
|
||||
overflow: auto;
|
||||
padding-left: 10px;
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.magnificContentsDiv p{
|
||||
text-align: left !important;
|
||||
}
|
||||
|
||||
.white-popup{
|
||||
background-color:white;
|
||||
border: 10px solid #404040;
|
||||
color: black;
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,5 +0,0 @@
|
|||
$(function() {
|
||||
// Tooltips are annoying
|
||||
// Use title attribute instead
|
||||
// $( 'input,textarea' ).tooltip();
|
||||
});
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
function GetURLParameter(sParam)
|
||||
{
|
||||
var sPageURL = window.location.search.substring(1);
|
||||
var sURLVariables = sPageURL.split('&');
|
||||
for (var i = 0; i < sURLVariables.length; i++)
|
||||
{
|
||||
var sParameterName = sURLVariables[i].split('=');
|
||||
if (sParameterName[0] == sParam)
|
||||
{
|
||||
return sParameterName[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var p = GetURLParameter('p');
|
||||
|
||||
if(p == 'banlist')
|
||||
{
|
||||
$(document).ready(function(){
|
||||
$('span#check').css({'cursor':'pointer','color':'blue'});
|
||||
$('span#check').click(function(){
|
||||
$('input[type=checkbox]').each(function( ){
|
||||
if( this.checked )
|
||||
{
|
||||
$(this).attr('checked', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).attr('checked', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
else if(p == 'watch_logger')
|
||||
{
|
||||
$(document).ready(function()
|
||||
{
|
||||
$('input#search').quicksearch('table#servermonitor tbody tr.maintr');
|
||||
$("#servermonitor")
|
||||
.collapsible("td.collapsible", {collapse: true})
|
||||
.tablesorter({sortList: [[1,1]] , widgets: ['zebra','repeatHeaders']});
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
$('document').ready(function(){
|
||||
editor = document.getElementById('editor');
|
||||
if(editor)
|
||||
{
|
||||
var quill = new Quill('#editor', {
|
||||
theme: 'snow'
|
||||
});
|
||||
$.getJSON("home.php?m=circular&get_circulars=true&type=cleared", function(data){
|
||||
if(data.length > 0)
|
||||
{
|
||||
$("head").append('<link rel="stylesheet" href="modules/circular/admin_notification.css">');
|
||||
$("h2").append('<i>There are ' + data.length + ' notifications <a href="?m=circular&list=true" >Manage Notifications</a></i>');
|
||||
}
|
||||
}).fail(function(){
|
||||
console.log('Failed reading JSON for circulars');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
function remove_circulars()
|
||||
{
|
||||
checkboxes = document.getElementsByClassName('circular_checkbox');
|
||||
var ids = [];
|
||||
for(var i = 0; i < checkboxes.length; i++)
|
||||
{
|
||||
if(checkboxes[i].checked)
|
||||
{
|
||||
ids.push(checkboxes[i].value);
|
||||
}
|
||||
}
|
||||
|
||||
if(ids.length > 0)
|
||||
{
|
||||
var addpost = {};
|
||||
addpost["remove_circulars"] = "true";
|
||||
addpost["circulars_ids"] = ids;
|
||||
var destURL = "home.php?m=circular&list=true";
|
||||
var destURLCleared = destURL + "&type=cleared";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: destURLCleared,
|
||||
data: addpost,
|
||||
success: function(data){
|
||||
location.href = destURL;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function swap_all_checkboxes(obj)
|
||||
{
|
||||
checkboxes = document.getElementsByClassName('circular_checkbox');
|
||||
for(var i = 0; i < checkboxes.length; i++)
|
||||
{
|
||||
checkboxes[i].checked = obj.checked;
|
||||
}
|
||||
}
|
||||
|
||||
function toggle_all(obj, selectBox)
|
||||
{
|
||||
if(typeof selectBox == "string")
|
||||
{
|
||||
selectBox = document.getElementById(selectBox);
|
||||
if(selectBox.type == "select-multiple")
|
||||
{
|
||||
for(var i = 0; i < selectBox.options.length; i++)
|
||||
{
|
||||
selectBox.options[i].selected = obj.checked;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function send_circular()
|
||||
{
|
||||
var addpost = {};
|
||||
addpost['admins'] = $('#select_admins').val(),
|
||||
addpost['users'] = $('#select_users').val(),
|
||||
addpost['groups'] = $('#select_groups').val(),
|
||||
addpost['subusers_of_users'] = $('#select_subusers_of_users').val(),
|
||||
addpost['subject'] = $('#subject').val().trim(),
|
||||
addpost['message'] = document.getElementById("editor").getElementsByClassName("ql-editor")[0].innerHTML,
|
||||
addpost['send_circular'] = "send";
|
||||
|
||||
if(addpost['admins'] == null && addpost['users'] == null && addpost['groups'] == null && addpost['subusers_of_users'] == null)
|
||||
{
|
||||
alert('Select at least one recipient (Send To).');
|
||||
return;
|
||||
}
|
||||
|
||||
if(addpost['subject'] == null || addpost['subject'] == "")
|
||||
{
|
||||
alert('Introduce a subject.');
|
||||
return;
|
||||
}
|
||||
|
||||
if(addpost['message'] == "<p><br></p>")
|
||||
{
|
||||
alert('Introduce a Message.');
|
||||
return;
|
||||
}
|
||||
|
||||
var destURL = "home.php?m=circular";
|
||||
var destURLCleared = destURL + "&type=cleared";
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: destURLCleared,
|
||||
data: addpost,
|
||||
success: function(data){
|
||||
alert(data);
|
||||
location.href = destURL;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
$('document').ready(function(){
|
||||
$.getJSON("home.php?m=circular&p=show_circular&type=cleared", function(data){
|
||||
if(data.length > 0)
|
||||
{
|
||||
$("head").append('<link rel="stylesheet" href="modules/circular/notification.css">');
|
||||
$("body").append('<div id="notification">You have ' + data.length + ' pending notifications.<br><a href="?m=circular&p=show_circular&list=true" >Read Notifications</a></div>');
|
||||
}
|
||||
}).fail(function(){
|
||||
console.log('Failed reading JSON for circulars');
|
||||
});
|
||||
});
|
||||
|
|
@ -1,68 +0,0 @@
|
|||
$(document).ready(
|
||||
function(){
|
||||
$('.dragbox')
|
||||
.each(function(){
|
||||
$(this).hover(function(){
|
||||
$(this).find('h4').addClass('collapse');
|
||||
}, function(){
|
||||
$(this).find('h4').removeClass('collapse');
|
||||
})
|
||||
.find('h4').hover(function(){
|
||||
$(this).find('.configure').css('visibility', 'visible');
|
||||
}, function(){
|
||||
$(this).find('.configure').css('visibility', 'hidden');
|
||||
})
|
||||
.click(function(){
|
||||
$(this).siblings('.dragbox-content').toggle();
|
||||
//Save state on change of collapse state of panel
|
||||
updateWidgetData();
|
||||
})
|
||||
.end()
|
||||
.find('.configure').css('visibility', 'hidden');
|
||||
});
|
||||
|
||||
$('.column').sortable({
|
||||
connectWith: '.column',
|
||||
handle: 'h4',
|
||||
cursor: 'move',
|
||||
placeholder: 'placeholder',
|
||||
forcePlaceholderSize: true,
|
||||
opacity: 0.4,
|
||||
start: function(event, ui){
|
||||
$(ui.item).find('.dragbox-content').toggle();
|
||||
},
|
||||
stop: function(){
|
||||
updateWidgetData();
|
||||
}
|
||||
})
|
||||
.disableSelection();
|
||||
}
|
||||
);
|
||||
function updateWidgetData(){
|
||||
var items=[];
|
||||
$('.column').each(function(){
|
||||
var columnId=$(this).attr('id');
|
||||
$('.dragbox', this).each(function(i){
|
||||
var collapsed=0;
|
||||
if($(this).find('.dragbox-content').css('display')=="none")
|
||||
collapsed=1;
|
||||
//Create Item object for current panel
|
||||
var item={
|
||||
id: $(this).attr('id'),
|
||||
collapsed: collapsed,
|
||||
order : i,
|
||||
column: columnId
|
||||
};
|
||||
//Push item object into items array
|
||||
items.push(item);
|
||||
});
|
||||
});
|
||||
//Assign items array to sortorder JSON variable
|
||||
var sortorder={ items: items };
|
||||
//Pass sortorder variable to server using ajax to save state
|
||||
$.post('home.php?m=dashboard&p=updateWidgets', 'data='+$.toJSON(sortorder), function(response){
|
||||
if(response.indexOf("success") < 0){
|
||||
$("#console").html('<h0><div class="Failed">Failed to update widget order.</div></h0>').hide().fadeIn(1000);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,137 +0,0 @@
|
|||
$(document).ready(function(){
|
||||
|
||||
var uninstalling_module_dataloss = $('#dialog').attr('data-uninstalling_module_dataloss');
|
||||
var are_you_sure = $('#dialog').attr('data-are_you_sure');
|
||||
var remove_files_for = $('#dialog').attr('data-remove_files_for');
|
||||
var confirm = $('#dialog').attr('data-confirm');
|
||||
var cancel = $('#dialog').attr('data-cancel');
|
||||
|
||||
$('.install').click(function(){
|
||||
var addpost = {};
|
||||
var folder = $(this).attr('data-module-folder');
|
||||
addpost[ 'm' ] = 'modulemanager';
|
||||
addpost[ 'p' ] = 'add';
|
||||
addpost[ 'module' ] = folder;
|
||||
|
||||
$('#loading.'+folder).html('<img style="height:10px;" src="images/loading.gif" />');
|
||||
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "home.php",
|
||||
data: addpost,
|
||||
complete: function(){
|
||||
document.location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('.uninstall').click(function(){
|
||||
var addpost = {};
|
||||
var folder = $(this).attr('data-module-folder');
|
||||
var id = $(this).attr('data-module-id');
|
||||
addpost[ 'm' ] = 'modulemanager';
|
||||
addpost[ 'p' ] = 'del';
|
||||
addpost[ 'id' ] = id;
|
||||
addpost[ 'module' ] = folder;
|
||||
$( "#dialog" ).attr('title', are_you_sure+'?').html('<p>'+uninstalling_module_dataloss+'</p>');
|
||||
$( "#dialog" ).dialog({
|
||||
resizable: false,
|
||||
height:150,
|
||||
modal: true,
|
||||
buttons:
|
||||
[{ text: confirm, click: function(){
|
||||
$( this ).dialog( "close" );
|
||||
$('#loading.'+folder).html('<img style="height:10px;" src="images/loading.gif" />');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "home.php",
|
||||
data: addpost,
|
||||
complete: function(){
|
||||
document.location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
},{ text: cancel, click: function(){
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}]
|
||||
});
|
||||
});
|
||||
|
||||
$('.remove').click(function(){
|
||||
var addpost = {};
|
||||
var folder = $(this).attr('data-module-folder');
|
||||
var mode = $(this).attr('data-remove-mode');
|
||||
addpost[ 'remove' ] = mode;
|
||||
addpost[ 'folder' ] = folder;
|
||||
|
||||
$( "#dialog" ).attr('title', are_you_sure+'?').html('<p>'+remove_files_for+' '+folder+'?</p>');
|
||||
$( "#dialog" ).dialog({
|
||||
resizable: false,
|
||||
height:150,
|
||||
modal: true,
|
||||
buttons:
|
||||
[{ text: confirm, click: function(){
|
||||
$( this ).dialog( "close" );
|
||||
$('#loading.'+folder).html('<img style="height:10px;" src="images/loading.gif" />');
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "home.php?m=extras&type=cleared",
|
||||
data: addpost,
|
||||
complete: function(){
|
||||
document.location.reload();
|
||||
}
|
||||
});
|
||||
}
|
||||
},{ text: cancel, click: function(){
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}]
|
||||
});
|
||||
});
|
||||
|
||||
$('button[name=update]').click(function(){
|
||||
$('#updateButton').html('<img style="height:20px;" src="images/loading.gif" />');
|
||||
var addpost = {};
|
||||
addpost.theme = [];
|
||||
addpost.module = [];
|
||||
addpost.update = '';
|
||||
var name = '';
|
||||
var value = '';
|
||||
$('input[type=checkbox]:checked').each(function(){
|
||||
name = $(this).attr('name');
|
||||
value = $(this).attr('value');
|
||||
if(name == 'theme')
|
||||
{
|
||||
addpost.theme.push(value);
|
||||
}
|
||||
if(name == 'module')
|
||||
{
|
||||
addpost.module.push(value);
|
||||
}
|
||||
return addpost;
|
||||
});
|
||||
var mirror = $('#mirror').val();
|
||||
if(typeof mirror != "undefined")
|
||||
{
|
||||
addpost.mirror = mirror;
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "home.php?m=extras&type=cleared",
|
||||
data: addpost,
|
||||
success: function(data){
|
||||
var message = data.replace(/(<([^>]+)>)/ig,"");
|
||||
message = message.trim();
|
||||
if(message != '')
|
||||
{
|
||||
alert(message);
|
||||
}
|
||||
},
|
||||
complete: function(){
|
||||
document.location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
});
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
$(document).ready(
|
||||
function (){
|
||||
$(".tablesorter").collapsible("td.collapsible", {collapse: true})
|
||||
.tablesorter({
|
||||
// set default sort column
|
||||
sortList: [[4,0]],
|
||||
// don't sort by first column
|
||||
headers: {0: {sorter: false}}
|
||||
// set the widgets being used - zebra stripping
|
||||
, widgets: ['zebra']
|
||||
, onRenderHeader: function (){
|
||||
this.wrapInner("<span></span>");
|
||||
}
|
||||
, debug: false
|
||||
});
|
||||
}
|
||||
);
|
||||
|
|
@ -1,224 +0,0 @@
|
|||
function uploadMapImg(button) {
|
||||
var home_id = $(button).attr('id');
|
||||
var mod_id = $(button).attr('data-mod_id');
|
||||
var map = $(button).attr('data-map');
|
||||
|
||||
var title = $('#translation').attr('data-title');
|
||||
var upload_button = $('#translation').attr('data-upload_button');
|
||||
var bad_file = $('#translation').attr('data-bad_file');
|
||||
var upload_failure = $('#translation').attr('data-upload_failure');
|
||||
|
||||
$('div.main-content').append('<div class="dialog-form'+home_id+'" title="'+title+'" >\
|
||||
<form class="upload-mapImage-form'+home_id+'" enctype="multipart/form-data" >\
|
||||
<input type="hidden" name="map" value="'+map+'" />\
|
||||
<input type="file" name="map-image" class="'+home_id+'" value="" />\
|
||||
<input type="hidden" name="home_id" value="'+home_id+'" />\
|
||||
<input type="hidden" name="mod_id" value="'+mod_id+'" />\
|
||||
</form>\
|
||||
</div>');
|
||||
|
||||
$( ".dialog-form"+home_id ).dialog({
|
||||
autoOpen: true,
|
||||
height: 145,
|
||||
width: 350,
|
||||
modal: true,
|
||||
buttons: [{ text: upload_button, click: function(){
|
||||
var filename = $('input[name=map-image].'+home_id).val().split('\\').pop(),
|
||||
extension = filename.split('.').pop();
|
||||
|
||||
if(extension.match(/png|jpg|gif/) != null)
|
||||
{
|
||||
filesize = $('input[name=map-image].'+home_id)[0].files[0].fileSize;
|
||||
if(filesize > 1048576)
|
||||
{
|
||||
alert(bad_file);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(".upload-mapImage-form"+home_id).append('<input type="hidden" name="extension" value="'+extension+'" />');
|
||||
$('.status'+home_id).remove();
|
||||
$( ".dialog-form"+home_id ).append('<center class="status'+home_id+'" ><img style="height:10px;" src="images/loading.gif" /></center>');
|
||||
data = new FormData($(".upload-mapImage-form"+home_id)[0]);
|
||||
console.log('Submitting');
|
||||
$.ajax({
|
||||
type: 'POST',
|
||||
url: 'home.php?m=gamemanager&p=upload_map_image&type=cleared',
|
||||
data: data,
|
||||
cache: false,
|
||||
contentType: false,
|
||||
processData: false
|
||||
}).done(function(data) {
|
||||
$('.status'+home_id).remove();
|
||||
$( ".dialog-form"+home_id ).append('<center class="status'+home_id+'" >'+$.trim(data)+'</center>');
|
||||
}).fail(function(jqXHR,status, errorThrown) {
|
||||
$('.status'+home_id).remove();
|
||||
$( ".dialog-form"+home_id ).append('<center class="status'+home_id+'" >'+upload_failure+'</center>');
|
||||
console.log(errorThrown);
|
||||
console.log(jqXHR.responseText);
|
||||
console.log(jqXHR.status);
|
||||
});
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
alert(bad_file);
|
||||
}
|
||||
}
|
||||
}],
|
||||
close: function() {
|
||||
$( ".dialog-form"+home_id ).remove();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
$('input#search').quicksearch('table#servermonitor tbody tr.maintr');
|
||||
$("#servermonitor")
|
||||
.collapsible("td.collapsible", {collapse: true})
|
||||
.tablesorter({sortList: [[0,0], [1,0]] , widgets: ['zebra']});
|
||||
|
||||
|
||||
$("div#server_icon").click(function(){
|
||||
var id = $(this).attr('class');
|
||||
if($("input[type=radio]."+id).attr('checked'))
|
||||
{
|
||||
$("input[type=radio]."+id).attr('checked', false).prop('checked', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("input[type=radio]."+id).attr('checked', true).prop('checked', true);
|
||||
}
|
||||
});
|
||||
|
||||
$('.size').click(function(){
|
||||
var id = $(this).attr('data-home_id');
|
||||
$.post( "home.php?m=user_games&type=cleared&p=get_size&home_id="+id, function( data ) {
|
||||
$('.size[data-home_id='+id+']').text( data ).removeClass('sizeText').addClass('sizeText');
|
||||
});
|
||||
});
|
||||
|
||||
$('#execute_operations').click(function(){
|
||||
var addpost = {};
|
||||
$('input[type=radio]:checked').each(function( ){
|
||||
var name = $(this).attr('name');
|
||||
var value = $(this).val();
|
||||
addpost[ name ] = value;
|
||||
});
|
||||
|
||||
$('.right.bloc').html('<img src="images/loading.gif" />');
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "home.php?m=gamemanager&p=game_monitor",
|
||||
data: addpost,
|
||||
complete: function(){
|
||||
document.location.reload();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('img#action-stop').click(function(){
|
||||
$('input[type=radio]#action-stop').each(function( ){
|
||||
if( this.checked )
|
||||
{
|
||||
$(this).attr('checked', false).prop('checked', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).attr('checked', true).prop('checked', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('img#action-restart').click(function(){
|
||||
$('input[type=radio]#action-restart').each(function( ){
|
||||
if( this.checked )
|
||||
{
|
||||
$(this).attr('checked', false).prop('checked', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).attr('checked', true).prop('checked', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('img#action-start').click(function(){
|
||||
$('input[type=radio]#action-start').each(function( ){
|
||||
if( this.checked )
|
||||
{
|
||||
$(this).attr('checked', false).prop('checked', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$(this).attr('checked', true).prop('checked', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
// Allow admin users to set game server order
|
||||
handleOrderingGameServers();
|
||||
});
|
||||
|
||||
|
||||
function handleOrderingGameServers(){
|
||||
var elemBeingDragged = null;
|
||||
var childExpanderRow = null;
|
||||
var helperItemBeingDragged = null;
|
||||
if($('h2.isAdminUser').length){
|
||||
$('table#servermonitor tbody').sortable({
|
||||
handle: '.sortHandle', // https://stackoverflow.com/questions/15554951/sortable-rows-only-when-a-specific-column-is-dragged#answer-16753297
|
||||
delay: 250, // https://stackoverflow.com/questions/22913592/jquery-ui-sortable-any-event-to-trigger-once-delay-completed
|
||||
start: function( event, ui ) {
|
||||
$('.expand-child td').css('display', 'none');
|
||||
$('td', ui.item).removeClass('expanded');
|
||||
ui.helper.css('cursor', 'move');
|
||||
elemBeingDragged = ui.item;
|
||||
childExpanderRow = elemBeingDragged.nextAll('tr.expand-child').first();
|
||||
helperItemBeingDragged = ui.helper;
|
||||
},
|
||||
stop: function( event, ui ) {
|
||||
if(childExpanderRow && childExpanderRow.length && elemBeingDragged && elemBeingDragged.length){
|
||||
elemBeingDragged.after(childExpanderRow.detach());
|
||||
if(childExpanderRow.next('tr.expand-child').length){
|
||||
elemBeingDragged.before(childExpanderRow.next('tr.expand-child').detach());
|
||||
}
|
||||
}
|
||||
if(helperItemBeingDragged.length){
|
||||
helperItemBeingDragged.css('cursor', '');
|
||||
}
|
||||
},
|
||||
update: function(event, ui){
|
||||
saveGameServerOrder();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function saveGameServerOrder(){
|
||||
var i = 0;
|
||||
var postData = {order: new Array()};
|
||||
var homeId = null;
|
||||
|
||||
if(userAPIKey){
|
||||
|
||||
// Build the data
|
||||
$('table#servermonitor tbody .maintr:visible').each(function(e){
|
||||
homeId = $('td.serverId', $(this)).text();
|
||||
if(homeId){
|
||||
postData.order.push({home_id: homeId, order: i});
|
||||
i++;
|
||||
}
|
||||
});
|
||||
|
||||
// Make the call
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "ogp_api.php?gamemanager_admin/reorder&token=" + userAPIKey,
|
||||
data: JSON.stringify(postData),
|
||||
success: function(e){
|
||||
logToConsole("Game server order successfully saved!");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
function GetURLParameter(sParam)
|
||||
{
|
||||
var sPageURL = window.location.search.substring(1);
|
||||
var sURLVariables = sPageURL.split('&');
|
||||
for (var i = 0; i < sURLVariables.length; i++)
|
||||
{
|
||||
var sParameterName = sURLVariables[i].split('=');
|
||||
if (sParameterName[0] == sParam)
|
||||
{
|
||||
return sParameterName[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
if( GetURLParameter('get_sgc') == 'show' )
|
||||
{
|
||||
var home_id = GetURLParameter('home_id');
|
||||
var mod_id = GetURLParameter('mod_id');
|
||||
var returnUrl = "home.php?m=gamemanager&p=update&update=refresh&home_id="+home_id+"&mod_id="+mod_id
|
||||
var addpost = {};
|
||||
addpost.sgc = '';
|
||||
$('#dialog').html("<label for='SteamGuardCode'>Steam Guard:</label>\n"+
|
||||
"<input class='SteamGuardCode' type=text style='width:99%;' name='sgc'>");
|
||||
$('#dialog').dialog({
|
||||
autoOpen: true,
|
||||
width: 450,
|
||||
modal: true,
|
||||
buttons: [{ text: "Send Code", click: function(){
|
||||
addpost.sgc = $('input[class="SteamGuardCode"]').val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: returnUrl,
|
||||
data: addpost,
|
||||
async: false,
|
||||
success: function(data){
|
||||
$('#dialog').html("<div class=\"loader\"></div>");
|
||||
setTimeout(function(){
|
||||
window.location.href = returnUrl;
|
||||
}, 10000);
|
||||
}
|
||||
});
|
||||
}
|
||||
}],
|
||||
close: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,55 +0,0 @@
|
|||
function GetURLParameter(sParam)
|
||||
{
|
||||
var sPageURL = window.location.search.substring(1);
|
||||
var sURLVariables = sPageURL.split('&');
|
||||
for (var i = 0; i < sURLVariables.length; i++)
|
||||
{
|
||||
var sParameterName = sURLVariables[i].split('=');
|
||||
if (sParameterName[0] == sParam)
|
||||
{
|
||||
return sParameterName[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var p = GetURLParameter('p');
|
||||
|
||||
if(typeof p === 'undefined')
|
||||
{
|
||||
$(document).ready(function(){
|
||||
$('input[name=remote_host]').change(function() {
|
||||
$('#remote_host_ftp_ip').val(this.value);
|
||||
});
|
||||
$("#servermonitor")
|
||||
.collapsible("td.collapsible", {collapse: true});
|
||||
});
|
||||
$(document).tooltip({
|
||||
items: "img.center",
|
||||
position: {
|
||||
my: "left+5 centre",
|
||||
at: "right top-290"
|
||||
},
|
||||
content: function() {
|
||||
var url = $( this ).attr("data-url");
|
||||
return "<img src='" + url + "'>";
|
||||
}
|
||||
});
|
||||
}
|
||||
else if(p == 'arrange_ports')
|
||||
{
|
||||
$(document).ready(function(){
|
||||
$("input[type=text]").each(function(){
|
||||
$(this).numeric();
|
||||
});
|
||||
$('input#start_port.add').on('input', function() {
|
||||
$('input#end_port.add').val( Number($(this).val()) );
|
||||
$('span#total_assignable_ports.add').html( parseInt( ( Number( $('input#end_port.add').val() ) - Number( $(this).val() ) ) / Number( $('input#port_increment.add').val() ) ) + 1 );
|
||||
});
|
||||
$('input#end_port.add').on('input', function() {
|
||||
$('span#total_assignable_ports.add').html( parseInt( ( Number( $(this).val() ) - Number( $('input#start_port.add').val() ) ) / Number( $('input#port_increment.add').val() ) ) + 1 );
|
||||
});
|
||||
$('input#port_increment.add').on('input', function() {
|
||||
$('span#total_assignable_ports.add').html( parseInt( ( Number( $('input#end_port.add').val() ) - Number( $('input#start_port.add').val() ) ) / Number( $(this).val() ) ) + 1 );
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
@ -1,78 +0,0 @@
|
|||
$(document).ready(function() {
|
||||
styleRows();
|
||||
removeAbilityToShowSubUsersIfNone();
|
||||
$("tr.subusersShowHide").click(function(e){
|
||||
// Get UID
|
||||
var td = $(this).find('td.subUserShowHideTextTd');
|
||||
var showText = $(td).attr('showtext');
|
||||
var hideText = $(td).attr('hidetext');
|
||||
var tr = $(this);
|
||||
var uid = $(tr).attr('uid');
|
||||
if(typeof uid != typeof undefined && uid != null && uid !== false && uid != ""){
|
||||
if(td.hasClass('expand')){
|
||||
moveSubuserRowsAndShow(td, tr, uid);
|
||||
styleSubUserRows(td, tr, uid);
|
||||
td.removeClass('expand').addClass('collapse');
|
||||
td.html(hideText + "↑");
|
||||
}else if(td.hasClass('collapse')){
|
||||
hideSubuserRows(td, tr, uid);
|
||||
td.removeClass('collapse').addClass('expand');
|
||||
td.html(showText + "↓");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
$('td.actions').click(function(e){
|
||||
e.stopPropagation();
|
||||
});
|
||||
|
||||
// Trigger click on all subuser sections twice due to new search functionality which I do not like.
|
||||
$(".subusersShowHide").trigger("click").trigger("click");
|
||||
});
|
||||
|
||||
function moveSubuserRowsAndShow(td, tr, uid){
|
||||
var subuserRowsOwnedByUid = $("tr[ownedby='" + uid + "']");
|
||||
var subuserRow = null;
|
||||
if(subuserRowsOwnedByUid.length){
|
||||
subuserRowsOwnedByUid.each(function(e){
|
||||
subuserRow = $(this).detach();
|
||||
$(tr).after(subuserRow);
|
||||
$(this).removeClass('hide');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
function hideSubuserRows(td, tr, uid){
|
||||
var subuserRowsOwnedByUid = $("tr[ownedby='" + uid + "']");
|
||||
if(subuserRowsOwnedByUid.length){
|
||||
$(subuserRowsOwnedByUid).addClass('hide');
|
||||
}
|
||||
}
|
||||
|
||||
function styleRows(){
|
||||
$("tr:not(.subuser):odd").css('background-color', '#ededed');
|
||||
$("tr:not(.subuser):even").css('background-color', '#FFF');
|
||||
}
|
||||
|
||||
function styleSubUserRows(){
|
||||
$("tr:not(.subuser)").each(function(e){
|
||||
var childrenSubUsers
|
||||
});
|
||||
}
|
||||
|
||||
function styleSubUserRows(td, tr, uid){
|
||||
$("tr[ownedby='" + uid + "']:even").css('background-color', '#e5ffff');
|
||||
$("tr[ownedby='" + uid + "']:odd").css('background-color', '#dbf3ff');
|
||||
}
|
||||
|
||||
function removeAbilityToShowSubUsersIfNone(){
|
||||
$("tr.subusersShowHide").each(function(e){
|
||||
var uid = $(this).attr('uid');
|
||||
if(typeof uid != typeof undefined && uid != null && uid !== false && uid != ""){
|
||||
if(!$("tr[ownedby='" + uid + "']").length){
|
||||
$(this).removeClass('subusersShowHide');
|
||||
$(this).find('td.subUserShowHideTextTd').html('');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,83 +0,0 @@
|
|||
function GetURLParameter(sParam)
|
||||
{
|
||||
var sPageURL = window.location.search.substring(1);
|
||||
var sURLVariables = sPageURL.split('&');
|
||||
for (var i = 0; i < sURLVariables.length; i++)
|
||||
{
|
||||
var sParameterName = sURLVariables[i].split('=');
|
||||
if (sParameterName[0] == sParam)
|
||||
{
|
||||
return sParameterName[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function isValidForm(currentForm)
|
||||
{
|
||||
currentForm
|
||||
var inputs = currentForm.getElementsByTagName("input");
|
||||
for(var i = 0; i < inputs.length; i++) {
|
||||
if(inputs[i].type == "checkbox") {
|
||||
if(inputs[i].checked)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
if(inputs[i].type == "text") {
|
||||
if(inputs[i].value.match(/^([0-9]+,?)+$/g))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
window.alert(currentForm.getAttribute('data-form-error'));
|
||||
return false;
|
||||
}
|
||||
|
||||
$(document).ready(function(){
|
||||
if( document.getElementById("dialog") && GetURLParameter('get_sgc') == 'show' )
|
||||
{
|
||||
var hmip = GetURLParameter('home_id-mod_id-ip-port');
|
||||
var returnUrl = "home.php?m=steam_workshop&p=main&home_id-mod_id-ip-port="+hmip+"&show_log"
|
||||
var addpost = {};
|
||||
addpost.sgc = '';
|
||||
$('#dialog').html("<label for='SteamGuardCode'>Steam Guard:</label>\n"+
|
||||
"<input class='SteamGuardCode' type=text style='width:99%;' name='sgc'>");
|
||||
$('#dialog').dialog({
|
||||
autoOpen: true,
|
||||
width: 450,
|
||||
modal: true,
|
||||
buttons: [{ text: "Send Code", click: function(){
|
||||
addpost.sgc = $('input[class="SteamGuardCode"]').val();
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: returnUrl,
|
||||
data: addpost,
|
||||
async: false,
|
||||
success: function(data){
|
||||
$('#dialog').html("<div class=\"loader\"></div>");
|
||||
setTimeout(function(){
|
||||
window.location.href = returnUrl;
|
||||
}, 10000);
|
||||
}
|
||||
});
|
||||
}
|
||||
}],
|
||||
close: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
});
|
||||
}
|
||||
bbcode_containers = document.getElementsByClassName("bbcode_container")
|
||||
if(bbcode_containers.length > 0)
|
||||
{
|
||||
for(var i = 0; i < bbcode_containers.length; i++) {
|
||||
var result = XBBCODE.process({
|
||||
text: bbcode_containers[i].innerText,
|
||||
removeMisalignedTags: true,
|
||||
addInLineBreaks: true
|
||||
});
|
||||
bbcode_containers[i].innerHTML = result.html;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
@ -1,8 +0,0 @@
|
|||
$(function() {
|
||||
$.getJSON("home.php?m=tickets&p=notifications&type=cleared", function(data) {
|
||||
if (data['notificationCount'] > 0) {
|
||||
var menutickets = document.getElementsByClassName('tickets');
|
||||
menutickets[0].innerHTML += "<text style='background:#aa0000;color:white;border-radius:20px;border:1px solid white;margin-left:5px'> <b>" + data['notificationCount'] + "</b> </text>";
|
||||
}
|
||||
});
|
||||
});
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
function toggleChecked(status) {
|
||||
$("input[type=checkbox]").each( function() {
|
||||
$(this).attr('checked', status).prop('checked', status);
|
||||
});
|
||||
}
|
||||
|
|
@ -1,73 +0,0 @@
|
|||
$('document').ready(function(){
|
||||
$('#change_access_rights_submit').prop('disabled', true);
|
||||
$(".change_access_rights").each( function( index, element ){
|
||||
$(element).on('change', function(){
|
||||
if($(".change_access_rights:checked").length > 0)
|
||||
{
|
||||
$('#change_access_rights_submit').prop('disabled', false);
|
||||
}
|
||||
else
|
||||
{
|
||||
$('#change_access_rights_submit').prop('disabled', true);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
function change_access_rights(id_type, assign_id)
|
||||
{
|
||||
var rights = $("#dialog").data();
|
||||
var home_ids = [];
|
||||
|
||||
$(".change_access_rights:checked").each( function( index, element ){
|
||||
home_ids[index] = $(element).data("home_id");
|
||||
});
|
||||
|
||||
var check_access_rights = '<table>';
|
||||
|
||||
$.each(rights, function( index, value ) {
|
||||
if(index == 'uiDialog')
|
||||
{
|
||||
return true;
|
||||
}
|
||||
check_access_rights += "<tr><td align='right'><label for='" + value + "'>" + langConsts['OGP_LANG_' + value] + ":</label></td>" +
|
||||
"<td align='left'><input class='ar_flag' id='" + value + "' type='checkbox' name='" + value + "' value='" + index + "' checked='checked' /></td></tr>" +
|
||||
"<tr><td colspan='2' class='info'>" + langConsts['OGP_LANG_' + value + '_info'] + "</td></tr>";
|
||||
});
|
||||
|
||||
check_access_rights += '</table>';
|
||||
|
||||
var addpost = {};
|
||||
addpost[ 'home_ids' ] = home_ids;
|
||||
addpost[ 'assign_id' ] = assign_id;
|
||||
addpost[ 'id_type' ] = id_type;
|
||||
addpost[ 'change_access_rights' ] = 'true';
|
||||
addpost.flags = [];
|
||||
var destURL = "home.php?m=user_games&p=assign&" + id_type + "_id=" + assign_id;
|
||||
var destURLCleared = destURL + "&type=cleared";
|
||||
$('#dialog').html(check_access_rights);
|
||||
$('#dialog').dialog({
|
||||
autoOpen: true,
|
||||
width: 450,
|
||||
modal: true,
|
||||
buttons: [{ text: "Set Access Rights", click: function(){
|
||||
$('input[class="ar_flag"]:checked').each(function(){
|
||||
var flag = $(this).val();
|
||||
addpost.flags.push(flag);
|
||||
});
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: destURLCleared,
|
||||
data: addpost,
|
||||
success: function(data){
|
||||
location.href = destURL;
|
||||
}
|
||||
});
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}],
|
||||
close: function() {
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
$("#mods select, #mods input").change(function(){
|
||||
$(this).css("background", "#fe9cb1");
|
||||
});
|
||||
|
||||
$('.set_options').click(function(){
|
||||
var instance = $(this);
|
||||
var mod_cfg_id = $(this).attr('id');
|
||||
var modtr = $('#mod_cfg_id_'+mod_cfg_id);
|
||||
var addpost = {};
|
||||
|
||||
var cpus = [];
|
||||
|
||||
$("#cpu_select").find('.cpus:checked').each(function(i, e) {
|
||||
cpus.push($(this).val());
|
||||
addpost['cpus'] = cpus.join();
|
||||
});
|
||||
|
||||
addpost[ 'set_options' ] = 1;
|
||||
addpost[ 'cliopts' ] = modtr.find('#cliopts').val();
|
||||
|
||||
addpost[ 'nice' ] = modtr.find('#nice').val();
|
||||
addpost[ 'mod_cfg_id' ] = mod_cfg_id;
|
||||
if( modtr.find('#maxplayers').get(0) )
|
||||
{
|
||||
addpost[ 'maxplayers' ] = modtr.find('#maxplayers').val();
|
||||
}
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "home.php?m=user_games&p=edit&type=cleared&data_type=json&home_id="+GetURLParameter('home_id'),
|
||||
data: addpost,
|
||||
success: function(data){
|
||||
if(data.result == 'success')
|
||||
{
|
||||
if(instance.is('.set_affinity_button')){
|
||||
$("#cpu_select").css("background", "#bdf2a2");
|
||||
}else{
|
||||
modtr.find("select, input[type='text']").css("background", "#bdf2a2");
|
||||
}
|
||||
}
|
||||
$("#result").html('<p class="'+data.result+'">'+data.info+'</p>');
|
||||
},
|
||||
dataType: "json"
|
||||
});
|
||||
});
|
||||
|
|
@ -1,236 +0,0 @@
|
|||
// EDIT HOME
|
||||
function GetURLParameter(sParam)
|
||||
{
|
||||
var sPageURL = window.location.search.substring(1);
|
||||
var sURLVariables = sPageURL.split('&');
|
||||
for (var i = 0; i < sURLVariables.length; i++)
|
||||
{
|
||||
var sParameterName = sURLVariables[i].split('=');
|
||||
if (sParameterName[0] == sParam)
|
||||
{
|
||||
return sParameterName[1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function loadMods() {
|
||||
if( $('#mods').get(0) )
|
||||
{
|
||||
var addpost = {};
|
||||
addpost[ 'm' ] = 'user_games';
|
||||
addpost[ 'p' ] = 'mods';
|
||||
addpost[ 'type' ] = 'cleared';
|
||||
addpost[ 'home_id' ] = GetURLParameter('home_id');
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "home.php",
|
||||
data: addpost,
|
||||
success: function(data){
|
||||
$( "#mods" ).html(data);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
$(document).ready(function() {
|
||||
loadMods();
|
||||
var select_home_path = $('#dialog').attr('data-select_home_path');
|
||||
var set_this_path = $('#dialog').attr('data-set_this_path');
|
||||
var cancel = $('#dialog').attr('data-cancel');
|
||||
// Open folder browser
|
||||
$('#browse').unbind().click(function(event){
|
||||
var addpost = {};
|
||||
addpost[ 'm' ] = 'user_games';
|
||||
addpost[ 'p' ] = 'browser';
|
||||
addpost[ 'home_id' ] = $(this).attr('data-home-id');
|
||||
addpost[ 'folder' ] = $(this).attr('data-path');
|
||||
addpost[ 'type' ] = 'cleared';
|
||||
addpost[ 'all_fs' ] = 'yes';
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "home.php",
|
||||
data: addpost,
|
||||
success: function(data){
|
||||
$( "#dialog" ).attr('title', select_home_path).html(data);
|
||||
$( "#dialog" ).dialog({
|
||||
resizable: true,
|
||||
width: 460,
|
||||
modal: true,
|
||||
buttons:
|
||||
[{ text: set_this_path, click: function(){
|
||||
var selected_path = $('#selected_path').text();
|
||||
$('input[name="home_path"]').val(selected_path);
|
||||
$( "#change_home_path" ).click();
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
},{ text: cancel, click: function(){
|
||||
$( this ).dialog( "close" );
|
||||
}
|
||||
}]
|
||||
});
|
||||
}
|
||||
});
|
||||
event.preventDefault();
|
||||
});
|
||||
// Enter folder
|
||||
$('.folder').each(function(){
|
||||
$(this).click(function(){
|
||||
var addpost = {};
|
||||
addpost[ 'm' ] = 'user_games';
|
||||
addpost[ 'p' ] = 'browser';
|
||||
addpost[ 'home_id' ] = $('.levelup').attr('data-home-id');
|
||||
addpost[ 'item' ] = $(this).attr('data-item');
|
||||
addpost[ 'type' ] = 'cleared';
|
||||
addpost[ 'all_fs' ] = 'yes';
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "home.php",
|
||||
data: addpost,
|
||||
success: function(data){
|
||||
$( "#dialog" ).html(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
});
|
||||
// Back to previous folder
|
||||
$('.levelup').click(function(){
|
||||
var addpost = {};
|
||||
addpost[ 'm' ] = 'user_games';
|
||||
addpost[ 'p' ] = 'browser';
|
||||
addpost[ 'home_id' ] = $(this).attr('data-home-id');
|
||||
addpost[ 'back' ] = 'back';
|
||||
addpost[ 'type' ] = 'cleared';
|
||||
addpost[ 'all_fs' ] = 'yes';
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "home.php",
|
||||
data: addpost,
|
||||
success: function(data){
|
||||
$( "#dialog" ).html(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
// Create new folder
|
||||
$('#addfolder').click(function(){
|
||||
var addpost = {};
|
||||
addpost[ 'm' ] = 'user_games';
|
||||
addpost[ 'p' ] = 'browser';
|
||||
addpost[ 'home_id' ] = $('.levelup').attr('data-home-id');
|
||||
addpost[ 'create_folder' ] = 'create_folder';
|
||||
addpost[ 'folder_name' ] = $('input[name=dirname]').val();
|
||||
addpost[ 'type' ] = 'cleared';
|
||||
addpost[ 'all_fs' ] = 'yes';
|
||||
$.ajax({
|
||||
type: "GET",
|
||||
url: "home.php",
|
||||
data: addpost,
|
||||
success: function(data){
|
||||
$( "#dialog" ).html(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$("#main_settings select, #main_settings input").change(function(){
|
||||
$(this).css("background", "#fe9cb1");
|
||||
});
|
||||
|
||||
$('#main_settings input:submit').unbind().click(function(e){
|
||||
var submitName = $(this).attr('name');
|
||||
if(submitName != 'delete_ftp' && submitName != 'create_ftp' && submitName != 'master_server')
|
||||
{
|
||||
e.preventDefault();
|
||||
var thisForm = $(this).closest('form');
|
||||
var formData = thisForm.serializeArray();
|
||||
formData.push({ name: submitName });
|
||||
if(submitName == 'change_home')
|
||||
{
|
||||
$.each( formData, function( i, field ) {
|
||||
if( field.name == "home_path" )
|
||||
{
|
||||
formData[i]['value'] = formData[i]['value'].replace(/\\/g,'');
|
||||
thisForm.find('input[name="home_path"]').val(formData[i]['value']);
|
||||
}
|
||||
});
|
||||
}
|
||||
$.post(window.location + "&type=cleared", formData, function(data) {
|
||||
if(data.result == 'success')
|
||||
{
|
||||
thisForm.find("select, input[type='text']").css("background", "#bdf2a2");
|
||||
if(submitName == 'change_home_cfg_id')
|
||||
{
|
||||
loadMods();
|
||||
}
|
||||
}
|
||||
$("#result").html('<p class="'+data.result+'">'+data.info+'</p>');
|
||||
if(data.result == "success"){
|
||||
$("p.warning").remove();
|
||||
}
|
||||
|
||||
if(data.hasOwnProperty("warning_info") && data.warning_info){
|
||||
$("#result").html($("#result").html() + '<p class="warning">'+data.warning_info+'</p>');
|
||||
}
|
||||
}, "json");
|
||||
}
|
||||
});
|
||||
|
||||
var datePickerInput = $("input[name=expiration_date]");
|
||||
if(datePickerInput)
|
||||
{
|
||||
var now_str = datePickerInput.attr('data-today').split(' '),
|
||||
date = now_str[0].split('/'),
|
||||
time = now_str[1].split(':'),
|
||||
now = new Date(date[2], date[1]-1, date[0], time[0], time[1], time[2], 0);
|
||||
$('#datetimepicker').datetimepicker({
|
||||
format: 'd/m/Y H:i:s',
|
||||
startDate: now,
|
||||
onChangeDateTime: function(e, obj) {
|
||||
if(e == null)
|
||||
{
|
||||
datePickerInput.val("X");
|
||||
}
|
||||
else
|
||||
{
|
||||
var now_str = $( "input[name=expiration_date]" ).attr('data-today').split(' '),
|
||||
date = now_str[0].split('/'),
|
||||
time = now_str[1].split(':'),
|
||||
now = new Date(date[2], date[1]-1, date[0], time[0], time[1], time[2], 0);
|
||||
var selected = new Date(e);
|
||||
if( selected <= now )
|
||||
{
|
||||
alert('The selected date has already passed.');
|
||||
datePickerInput.val("X");
|
||||
}
|
||||
else
|
||||
{
|
||||
datePickerInput.val(obj.val());
|
||||
}
|
||||
}
|
||||
if("edit" == GetURLParameter('p'))
|
||||
{
|
||||
datePickerInput.css("background", "#fe9cb1");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
datePickerInput.on('change', function() {
|
||||
if(this.value.match(/^\d{1,2}\/\d{1,2}\/\d{4}\s\d{1,2}:\d{1,2}:\d{1,2}$/g) == null || this.value == "X")
|
||||
{
|
||||
this.value = "X";
|
||||
}
|
||||
else
|
||||
{
|
||||
var sel_str = this.value.split(' '),
|
||||
date = sel_str[0].split('/'),
|
||||
time = sel_str[1].split(':'),
|
||||
selected = new Date(date[2], date[1]-1, date[0], time[0], time[1], time[2], 0);
|
||||
if( selected <= now )
|
||||
{
|
||||
alert('The selected date has already passed.');
|
||||
this.value = "X";
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
|
@ -1,363 +0,0 @@
|
|||
$(function(){
|
||||
$("#tabs").tabs();
|
||||
$("#loading").removeClass('hide').addClass('show');
|
||||
var select_agent = $('#translation').attr('data-select_agent'),
|
||||
target_empty = $('#translation').attr('data-target_empty'),
|
||||
command_empty = $('#translation').attr('data-command_empty'),
|
||||
agent_invalid = $('#translation').attr('data-agent_invalid'),
|
||||
post_failed = $('#translation').attr('data-post_failed'),
|
||||
select_server = $('#translation').attr('data-select_server'),
|
||||
select_server_option = $('#translation').attr('data-select_server_option');
|
||||
|
||||
// Load the agents via an external script so the user isn't waiting an eternity if they have several agents and multiple are offline
|
||||
$.getJSON("home.php?m=util&p=agents&type=cleared", function(data){
|
||||
var agents = "";
|
||||
var agentsOnline = 0;
|
||||
|
||||
$("#loading_agents").removeClass('show').addClass('hide');
|
||||
$("#loading").removeClass('show').addClass('hide');
|
||||
$("#options").removeClass('hide').addClass('show');
|
||||
|
||||
agents += "<label for=\"agent\">" + select_agent + "</label>\r\n"
|
||||
agents += "<select id=\"agent\" name=\"agent\">\r\n"
|
||||
|
||||
for(var i = 0; i<data.length; ++i){
|
||||
agents += "\t<option value=\"" + data[i]['id'] + "\"" + (data[i]['status']===0?" disabled":"") + ">" + data[i]['name'] +"</option>\r\n";
|
||||
|
||||
if(data[i]['status'] == 1){
|
||||
++agentsOnline;
|
||||
}
|
||||
}
|
||||
|
||||
agents += "</select>";
|
||||
|
||||
if(agentsOnline == 0){
|
||||
$("#options").removeClass('show').addClass('hide');
|
||||
$("#agents_offline").removeClass('hide').addClass('show');
|
||||
|
||||
// Hide the sourcemod add admin form if all agents are offline.
|
||||
$("#addadmin_form").addClass('hide');
|
||||
$("#all_servers_offline").removeClass('hide').addClass('show');
|
||||
}else if($("#command option").length == 0){
|
||||
$("#options").removeClass('show').addClass('hide');
|
||||
$("#no_commands").removeClass('hide').addClass('show');
|
||||
}else{
|
||||
$("#select_agent").html(agents);
|
||||
}
|
||||
}).fail(function(){
|
||||
$("#loading_agents").removeClass('show').addClass('hide');
|
||||
$("#loading").removeClass('show').addClass('hide');
|
||||
$("#loading_failed").removeClass('hide').addClass('show');
|
||||
});
|
||||
|
||||
// Handle the network_tools form.
|
||||
$("#network_tools").on("submit", function(e){
|
||||
var target = $("#remote_target").val();
|
||||
var agent = $("#agent").val();
|
||||
var command = $("#command").val();
|
||||
|
||||
// Some validation browser-side. Still need to do the same server-side.
|
||||
if(target.length === 0){
|
||||
// target input is empty.
|
||||
$("#output").removeClass('hide').addClass('show').html("<pre>" + target_empty + "</pre>");
|
||||
}else if(agent.length === 0){
|
||||
// We'll only get to this point if there's no agents, or all agents are offline but the form was still submitted.
|
||||
$("#output").removeClass('hide').addClass('show').html("<pre>" + agent_invalid + "</pre>");
|
||||
}else if(command.length === 0){
|
||||
// We'll only get to this point if there's no command specified.
|
||||
$("#output").removeClass('hide').addClass('show').html("<pre>" + command_empty + "</pre>");
|
||||
}else{
|
||||
$("#loading").removeClass('hide').addClass('show');
|
||||
$("#output").removeClass('show').addClass('hide');
|
||||
|
||||
$("#network_tools button").prop({disabled:true}); // Disable the submit button if we're about to post - preventing stuff being ran several times via spamming the button and/or enter.
|
||||
$.post("home.php?m=util&p=network_tools&type=cleared", $("#network_tools").serialize(), function(postCommand){
|
||||
$("#loading").removeClass('show').addClass('hide');
|
||||
$("#output").removeClass('hide').addClass('show').html("<pre>" + postCommand + "</pre>");
|
||||
|
||||
$("#network_tools button").prop({disabled:false});
|
||||
}).fail(function(){
|
||||
$("#loading").removeClass('show').addClass('hide');
|
||||
$("#output").removeClass('hide').addClass('show').html("<pre>" + post_failed + "</pre>");
|
||||
|
||||
$("#network_tools button").prop({disabled:false});
|
||||
});
|
||||
}
|
||||
e.preventDefault();
|
||||
});// ./end network_tools form handling.
|
||||
|
||||
// ----- Sourcemod Admins -----
|
||||
$.getJSON("home.php?m=util&p=addadmin_helper&type=cleared", function(gs){
|
||||
if(gs.length === 0){
|
||||
$("#no_servers").removeClass('hide').addClass('show');
|
||||
}else{
|
||||
var games = "";
|
||||
$("#add_admin").removeClass('hide').addClass('show');
|
||||
|
||||
games += "<label for=\"gameserver_id\">" + select_server + "</label>\r\n"
|
||||
games += "<select id=\"gameserver_id\" name=\"gameserver_id\">\r\n"
|
||||
games += "<option value=\"0\" selected>" + select_server_option + "</option>\r\n"
|
||||
|
||||
for(var i = 0; i<gs.length; ++i){
|
||||
games += "\t<option value=\"" + gs[i]['home_id'] + "\">" + gs[i]['home_name'] +"</option>\r\n";
|
||||
}
|
||||
|
||||
games += "</select>";
|
||||
$("#games").html(games);
|
||||
|
||||
$("#gameserver_id").change(function(){
|
||||
var home = $("#gameserver_id").val();
|
||||
var gameserver_id = $("#gameserver_id").val();
|
||||
|
||||
// although the disabled attribute is put on the option, set all the values to 0 if it's somehow chosen again via the form being edited
|
||||
if(gameserver_id == 0){
|
||||
$("#remote_server_id").val(0);
|
||||
$("#gameserver_name").val(0);
|
||||
$("#gameserver_ip").val(0);
|
||||
$("#gameserver_port").val(0);
|
||||
}else{
|
||||
for(var i = 0; i<gs.length; ++i){
|
||||
if(home === gs[i]['home_id']){
|
||||
$("option[value='0']").attr("disabled", "disabled");
|
||||
$("#remote_server_id").val(gs[i]['remote_server_id']);
|
||||
$("#gameserver_name").val(gs[i]['game_name']);
|
||||
$("#gameserver_ip").val(gs[i]['ip']);
|
||||
$("#gameserver_port").val(gs[i]['port']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}); // ./end Sourcemod Admins
|
||||
|
||||
$("#sourcemod_perms").change(function(){
|
||||
var sourcemod_perms = $("#sourcemod_perms").val();
|
||||
|
||||
if(sourcemod_perms === 'root'){
|
||||
$("#sourcemod_flagList").removeClass('show').addClass('hide');
|
||||
$('.item input[type="checkbox"]').prop('checked', false);
|
||||
}else{
|
||||
$("#sourcemod_flagList").removeClass('hide').addClass('show');
|
||||
}
|
||||
});
|
||||
|
||||
// Process the sourcemod admin form on submission.
|
||||
$("#addadmin_form").on("submit", function(e){
|
||||
$("#addadmin_form button").prop({disabled:true});
|
||||
|
||||
var errors = 0;
|
||||
var remoteId = $("#remote_server_id").val();
|
||||
var gameName = $("#gameserver_name").val();
|
||||
var gameIp = $("#gameserver_ip").val();
|
||||
var gamePort = $("#gameserver_port").val();
|
||||
var addSteamid = $("#addSteamid").val();
|
||||
var immunity = $("#immunity").val();
|
||||
|
||||
// Set the message divs back to defaults.
|
||||
$("#invalid_server").removeClass('show').addClass('hide');
|
||||
$("#invalid_steamid_admin").removeClass('show').addClass('hide');
|
||||
$("#invalid_response_admin").removeClass('show').addClass('hide');
|
||||
$("#invalid_immunity").removeClass('show').addClass('hide');
|
||||
$("#addadmin_response").removeClass('show').addClass('hide');
|
||||
|
||||
if(remoteId.length === 0 || gameName.length === 0 || gameIp.length === 0 || gamePort.length === 0){
|
||||
$("#invalid_server").removeClass('hide').addClass('show');
|
||||
++errors;
|
||||
}
|
||||
|
||||
if(!(addSteamid.match(/^STEAM_[01]:[01]:\d+$/))){
|
||||
$("#invalid_steamid_admin").removeClass('hide').addClass('show');
|
||||
++errors;
|
||||
}
|
||||
|
||||
if(immunity.length > 2 || isNaN(immunity)){
|
||||
$("#invalid_immunity").removeClass('hide').addClass('show');
|
||||
++errors;
|
||||
}
|
||||
|
||||
if(errors === 0){
|
||||
$.post("home.php?m=util&p=addadmin_helper&type=cleared", $("#addadmin_form").serialize(), function(postCommand){
|
||||
$("#addadmin_response").removeClass('hide').addClass('show').html(postCommand);
|
||||
$("#addadmin_form button").prop({disabled:false});
|
||||
}).fail(function(){
|
||||
$("#invalid_response_admin").removeClass('hide').addClass('show');
|
||||
$("#addadmin_form button").prop({disabled:false});
|
||||
});
|
||||
}else{
|
||||
$("#addadmin_form button").prop({disabled:false});
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
}); // add_admin form handling
|
||||
|
||||
// ----- AMX mod Admins -----
|
||||
$.getJSON("home.php?m=util&p=amx_addadmin_helper&type=cleared", function(gs){
|
||||
if(gs.length === 0){
|
||||
$("#amx_no_servers").removeClass('hide').addClass('show');
|
||||
}else{
|
||||
var games = "";
|
||||
$("#amx_add_admin").removeClass('hide').addClass('show');
|
||||
|
||||
games += "<label for=\"amx_gameserver_id\">" + select_server + "</label>\r\n"
|
||||
games += "<select id=\"amx_gameserver_id\" name=\"amx_gameserver_id\">\r\n"
|
||||
games += "<option value=\"0\" selected>" + select_server_option + "</option>\r\n"
|
||||
|
||||
for(var i = 0; i<gs.length; ++i){
|
||||
games += "\t<option value=\"" + gs[i]['home_id'] + "\">" + gs[i]['home_name'] +"</option>\r\n";
|
||||
}
|
||||
|
||||
games += "</select>";
|
||||
$("#amx_games").html(games);
|
||||
|
||||
$("#amx_gameserver_id").change(function(){
|
||||
var home = $("#amx_gameserver_id").val();
|
||||
var gameserver_id = $("#amx_gameserver_id").val();
|
||||
|
||||
// although the disabled attribute is put on the option, set all the values to 0 if it's somehow chosen again via the form being edited
|
||||
if(gameserver_id == 0){
|
||||
$("#amx_remote_server_id").val(0);
|
||||
$("#amx_gameserver_name").val(0);
|
||||
$("#amx_gameserver_ip").val(0);
|
||||
$("#amx_gameserver_port").val(0);
|
||||
}else{
|
||||
for(var i = 0; i<gs.length; ++i){
|
||||
if(home === gs[i]['home_id']){
|
||||
$("option[value='0']").attr("disabled", "disabled");
|
||||
$("#amx_remote_server_id").val(gs[i]['remote_server_id']);
|
||||
$("#amx_gameserver_name").val(gs[i]['game_name']);
|
||||
$("#amx_gameserver_ip").val(gs[i]['ip']);
|
||||
$("#amx_gameserver_port").val(gs[i]['port']);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
}); // ./end AMX mod Admins
|
||||
|
||||
$("#amx_mod_perms").change(function(){
|
||||
var amx_mod_perms = $("#amx_mod_perms").val();
|
||||
|
||||
if(amx_mod_perms === 'root'){
|
||||
$("#amx_mod_flagList").removeClass('show').addClass('hide');
|
||||
$('.amx_item input[type="checkbox"]').prop('checked', false);
|
||||
}else{
|
||||
$("#amx_mod_flagList").removeClass('hide').addClass('show');
|
||||
}
|
||||
});
|
||||
|
||||
$("#amx_login_type").change(function(){
|
||||
var amx_login_type = $("#amx_login_type").val();
|
||||
|
||||
if(amx_login_type === 'amx_login_steamid'){
|
||||
$("#amx_login_nick_pass").removeClass('show').addClass('hide');
|
||||
$("#amx_Nickname").prop('required',false);
|
||||
$("#amx_Password").prop('required',false);
|
||||
$("#amx_Steamid").prop('required',true);
|
||||
$("#amx_login_steamid").removeClass('hide').addClass('show');
|
||||
}else{
|
||||
$("#amx_login_steamid").removeClass('show').addClass('hide');
|
||||
$("#amx_Nickname").prop('required',true);
|
||||
$("#amx_Password").prop('required',true);
|
||||
$("#amx_Steamid").prop('required',false);
|
||||
$("#amx_login_nick_pass").removeClass('hide').addClass('show');
|
||||
}
|
||||
});
|
||||
|
||||
// Process the amx mod admin form on submission.
|
||||
$("#amx_addadmin_form").on("submit", function(e){
|
||||
$("#amx_addadmin_form button").prop({disabled:true});
|
||||
|
||||
var errors = 0;
|
||||
var remoteId = $("#amx_remote_server_id").val();
|
||||
var gameName = $("#amx_gameserver_name").val();
|
||||
var gameIp = $("#amx_gameserver_ip").val();
|
||||
var gamePort = $("#amx_gameserver_port").val();
|
||||
var login_type = $("#amx_login_type").val();
|
||||
|
||||
// Set the message divs back to defaults.
|
||||
$("#amx_invalid_server").removeClass('show').addClass('hide');
|
||||
$("#amx_invalid_nickname_admin").removeClass('show').addClass('hide');
|
||||
$("#amx_invalid_password_admin").removeClass('show').addClass('hide');
|
||||
$("#amx_invalid_steamid_admin").removeClass('show').addClass('hide');
|
||||
$("#amx_invalid_response_admin").removeClass('show').addClass('hide');
|
||||
$("#amx_addadmin_response").removeClass('show').addClass('hide');
|
||||
|
||||
if(login_type == 'amx_login_steamid')
|
||||
{
|
||||
var Steamid = $("#amx_Steamid").val();
|
||||
if(!(Steamid.match(/^STEAM_[01]:[01]:\d+$/))){
|
||||
$("#amx_invalid_steamid_admin").removeClass('hide').addClass('show');
|
||||
++errors;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
var Nickname = $("#amx_Nickname").val();
|
||||
var Password = $("#amx_Password").val();
|
||||
if(!(Nickname.match(/^[^\s][A-zÀ-ÿ0-9 !@)(,}/|\.:?;{#$%&*+=-]{1,28}[^\s]$/))){
|
||||
$("#amx_invalid_nickname_admin").removeClass('hide').addClass('show');
|
||||
++errors;
|
||||
}
|
||||
if(!(Password.match(/^[^\s][A-zÀ-ÿ0-9 !@)(,}/|\.:?;{#$%&*+=-]{1,28}[^\s]$/))){
|
||||
$("#amx_invalid_password_admin").removeClass('hide').addClass('show');
|
||||
++errors;
|
||||
}
|
||||
}
|
||||
|
||||
if(remoteId.length === 0 || gameName.length === 0 || gameIp.length === 0 || gamePort.length === 0){
|
||||
$("#amx_invalid_server").removeClass('hide').addClass('show');
|
||||
++errors;
|
||||
}
|
||||
|
||||
if(errors === 0){
|
||||
$.post("home.php?m=util&p=amx_addadmin_helper&type=cleared", $("#amx_addadmin_form").serialize(), function(postCommand){
|
||||
$("#amx_addadmin_response").removeClass('hide').addClass('show').html(postCommand);
|
||||
$("#amx_addadmin_form button").prop({disabled:false});
|
||||
}).fail(function(){
|
||||
$("#amx_invalid_response_admin").removeClass('hide').addClass('show');
|
||||
$("#amx_addadmin_form button").prop({disabled:false});
|
||||
});
|
||||
}else{
|
||||
$("#amx_addadmin_form button").prop({disabled:false});
|
||||
}
|
||||
e.preventDefault();
|
||||
}); // add_admin form handling
|
||||
|
||||
// ----- Steam Converter -----
|
||||
$("#steam_converter").on("submit", function(e){
|
||||
$("#steam_converter button").prop({disabled:true});
|
||||
$.post("home.php?m=util&p=steamid_converter&type=cleared", $("#steam_converter").serialize(), function(steam_data){
|
||||
var json = $.parseJSON(steam_data);
|
||||
|
||||
if(json.length === 0){
|
||||
$("#steam_info").removeClass('show').addClass('hide');
|
||||
$("#invalid_steamid").removeClass('hide').addClass('show');
|
||||
$("#invalid_response").removeClass('show').addClass('hide');
|
||||
|
||||
$("#steam_converter button").prop({disabled:false});
|
||||
}else{
|
||||
$("#steam_info").removeClass('hide').addClass('show');
|
||||
$("#invalid_steamid").removeClass('show').addClass('hide');
|
||||
$("#invalid_response").removeClass('show').addClass('hide');
|
||||
|
||||
$("#steamLink").html('<b>Profile Link:</b> ' + json.steamProfile);
|
||||
$("#steamId").html('<b>Legacy ID:</b> ' + json.steamId);
|
||||
$("#steamId3").html('<b>SteamID3:</b> ' + json.steamId3);
|
||||
$("#steamId64").html('<b>SteamID64:</b> ' + json.communityId);
|
||||
|
||||
$("#steam_converter button").prop({disabled:false});
|
||||
}
|
||||
}).fail(function(){
|
||||
$("#invalid_steamid").removeClass('show').addClass('hide');
|
||||
$("#steam_info").removeClass('show').addClass('hide');
|
||||
$("#invalid_response").removeClass('hide').addClass('show');
|
||||
});
|
||||
e.preventDefault();
|
||||
}); // ./end steam_converter form handling.
|
||||
|
||||
$("#your-address").click(function(){
|
||||
$("#remote_target").val($("#your-address").text());
|
||||
});
|
||||
});
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,839 +0,0 @@
|
|||
/*
|
||||
Copyright (C) 2011 Patrick Gillespie, http://patorjk.com/
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
*/
|
||||
|
||||
/*
|
||||
Extendible BBCode Parser v1.0.0
|
||||
By Patrick Gillespie (patorjk@gmail.com)
|
||||
Website: http://patorjk.com/
|
||||
|
||||
This module allows you to parse BBCode and to extend to the mark-up language
|
||||
to add in your own tags.
|
||||
*/
|
||||
|
||||
var XBBCODE = (function() {
|
||||
"use strict";
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// Set up private variables
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
var me = {},
|
||||
urlPattern = /^(?:https?|file|c):(?:\/{1,3}|\\{1})[-a-zA-Z0-9:;,@#%&()~_?\+=\/\\\.]*$/,
|
||||
colorNamePattern = /^(?:aliceblue|antiquewhite|aqua|aquamarine|azure|beige|bisque|black|blanchedalmond|blue|blueviolet|brown|burlywood|cadetblue|chartreuse|chocolate|coral|cornflowerblue|cornsilk|crimson|cyan|darkblue|darkcyan|darkgoldenrod|darkgray|darkgreen|darkkhaki|darkmagenta|darkolivegreen|darkorange|darkorchid|darkred|darksalmon|darkseagreen|darkslateblue|darkslategray|darkturquoise|darkviolet|deeppink|deepskyblue|dimgray|dodgerblue|firebrick|floralwhite|forestgreen|fuchsia|gainsboro|ghostwhite|gold|goldenrod|gray|green|greenyellow|honeydew|hotpink|indianred|indigo|ivory|khaki|lavender|lavenderblush|lawngreen|lemonchiffon|lightblue|lightcoral|lightcyan|lightgoldenrodyellow|lightgray|lightgreen|lightpink|lightsalmon|lightseagreen|lightskyblue|lightslategray|lightsteelblue|lightyellow|lime|limegreen|linen|magenta|maroon|mediumaquamarine|mediumblue|mediumorchid|mediumpurple|mediumseagreen|mediumslateblue|mediumspringgreen|mediumturquoise|mediumvioletred|midnightblue|mintcream|mistyrose|moccasin|navajowhite|navy|oldlace|olive|olivedrab|orange|orangered|orchid|palegoldenrod|palegreen|paleturquoise|palevioletred|papayawhip|peachpuff|peru|pink|plum|powderblue|purple|red|rosybrown|royalblue|saddlebrown|salmon|sandybrown|seagreen|seashell|sienna|silver|skyblue|slateblue|slategray|snow|springgreen|steelblue|tan|teal|thistle|tomato|turquoise|violet|wheat|white|whitesmoke|yellow|yellowgreen)$/,
|
||||
colorCodePattern = /^#?[a-fA-F0-9]{6}$/,
|
||||
emailPattern = /[^\s@]+@[^\s@]+\.[^\s@]+/,
|
||||
fontFacePattern = /^([a-z][a-z0-9_]+|"[a-z][a-z0-9_\s]+")$/i,
|
||||
tags,
|
||||
tagList,
|
||||
tagsNoParseList = [],
|
||||
bbRegExp,
|
||||
pbbRegExp,
|
||||
pbbRegExp2,
|
||||
openTags,
|
||||
closeTags;
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* tags
|
||||
* This object contains a list of tags that your code will be able to understand.
|
||||
* Each tag object has the following properties:
|
||||
*
|
||||
* openTag - A function that takes in the tag's parameters (if any) and its
|
||||
* contents, and returns what its HTML open tag should be.
|
||||
* Example: [color=red]test[/color] would take in "=red" as a
|
||||
* parameter input, and "test" as a content input.
|
||||
* It should be noted that any BBCode inside of "content" will have
|
||||
* been processed by the time it enter the openTag function.
|
||||
*
|
||||
* closeTag - A function that takes in the tag's parameters (if any) and its
|
||||
* contents, and returns what its HTML close tag should be.
|
||||
*
|
||||
* displayContent - Defaults to true. If false, the content for the tag will
|
||||
* not be displayed. This is useful for tags like IMG where
|
||||
* its contents are actually a parameter input.
|
||||
*
|
||||
* restrictChildrenTo - A list of BBCode tags which are allowed to be nested
|
||||
* within this BBCode tag. If this property is omitted,
|
||||
* any BBCode tag may be nested within the tag.
|
||||
*
|
||||
* restrictParentsTo - A list of BBCode tags which are allowed to be parents of
|
||||
* this BBCode tag. If this property is omitted, any BBCode
|
||||
* tag may be a parent of the tag.
|
||||
*
|
||||
* noParse - true or false. If true, none of the content WITHIN this tag will be
|
||||
* parsed by the XBBCode parser.
|
||||
*
|
||||
*
|
||||
*
|
||||
* LIMITIONS on adding NEW TAGS:
|
||||
* - Tag names should be alphanumeric (including underscores) and all tags should have an opening tag
|
||||
* and a closing tag.
|
||||
* The [*] tag is an exception because it was already a standard
|
||||
* bbcode tag. Technecially tags don't *have* to be alphanumeric, but since
|
||||
* regular expressions are used to parse the text, if you use a non-alphanumeric
|
||||
* tag names, just make sure the tag name gets escaped properly (if needed).
|
||||
* --------------------------------------------------------------------------- */
|
||||
|
||||
tags = {
|
||||
"b": {
|
||||
openTag: function(params,content) {
|
||||
return '<span class="xbbcode-b">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
/*
|
||||
This tag does nothing and is here mostly to be used as a classification for
|
||||
the bbcode input when evaluating parent-child tag relationships
|
||||
*/
|
||||
"bbcode": {
|
||||
openTag: function(params,content) {
|
||||
return '';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '';
|
||||
}
|
||||
},
|
||||
"center": {
|
||||
openTag: function(params,content) {
|
||||
return '<span class="xbbcode-center">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
|
||||
"code": {
|
||||
openTag: function(params,content) {
|
||||
return '<span class="xbbcode-code">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
},
|
||||
noParse: true
|
||||
},
|
||||
"color": {
|
||||
openTag: function(params,content) {
|
||||
params = params || '';
|
||||
|
||||
var colorCode = (params.substr(1)).toLowerCase() || "black";
|
||||
colorNamePattern.lastIndex = 0;
|
||||
colorCodePattern.lastIndex = 0;
|
||||
if ( !colorNamePattern.test( colorCode ) ) {
|
||||
if ( !colorCodePattern.test( colorCode ) ) {
|
||||
colorCode = "black";
|
||||
} else {
|
||||
if (colorCode.substr(0,1) !== "#") {
|
||||
colorCode = "#" + colorCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return '<span style="color:' + colorCode + '">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
"email": {
|
||||
openTag: function(params,content) {
|
||||
|
||||
var myEmail;
|
||||
|
||||
if (!params) {
|
||||
myEmail = content.replace(/<.*?>/g,"");
|
||||
} else {
|
||||
myEmail = params.substr(1);
|
||||
}
|
||||
|
||||
emailPattern.lastIndex = 0;
|
||||
if ( !emailPattern.test( myEmail ) ) {
|
||||
return '<a>';
|
||||
}
|
||||
|
||||
return '<a href="mailto:' + myEmail + '">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</a>';
|
||||
}
|
||||
},
|
||||
"face": {
|
||||
openTag: function(params,content) {
|
||||
params = params || '';
|
||||
|
||||
var faceCode = params.substr(1) || "inherit";
|
||||
fontFacePattern.lastIndex = 0;
|
||||
if ( !fontFacePattern.test( faceCode ) ) {
|
||||
faceCode = "inherit";
|
||||
}
|
||||
return '<span style="font-family:' + faceCode + '">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
"font": {
|
||||
openTag: function(params,content) {
|
||||
params = params || '';
|
||||
|
||||
var faceCode = params.substr(1) || "inherit";
|
||||
fontFacePattern.lastIndex = 0;
|
||||
if ( !fontFacePattern.test( faceCode ) ) {
|
||||
faceCode = "inherit";
|
||||
}
|
||||
return '<span style="font-family:' + faceCode + '">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
|
||||
"i": {
|
||||
openTag: function(params,content) {
|
||||
return '<span class="xbbcode-i">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
"img": {
|
||||
openTag: function(params,content) {
|
||||
|
||||
var myUrl = content;
|
||||
|
||||
urlPattern.lastIndex = 0;
|
||||
if ( !urlPattern.test( myUrl ) ) {
|
||||
myUrl = "";
|
||||
}
|
||||
|
||||
return '<img src="' + myUrl + '" />';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '';
|
||||
},
|
||||
displayContent: false
|
||||
},
|
||||
"justify": {
|
||||
openTag: function(params,content) {
|
||||
return '<span class="xbbcode-justify">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
"large": {
|
||||
openTag: function(params,content) {
|
||||
params = params || '';
|
||||
|
||||
var colorCode = params.substr(1) || "inherit";
|
||||
colorNamePattern.lastIndex = 0;
|
||||
colorCodePattern.lastIndex = 0;
|
||||
if ( !colorNamePattern.test( colorCode ) ) {
|
||||
if ( !colorCodePattern.test( colorCode ) ) {
|
||||
colorCode = "inherit";
|
||||
} else {
|
||||
if (colorCode.substr(0,1) !== "#") {
|
||||
colorCode = "#" + colorCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return '<span class="xbbcode-size-36" style="color:' + colorCode + '">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
"left": {
|
||||
openTag: function(params,content) {
|
||||
return '<span class="xbbcode-left">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
"li": {
|
||||
openTag: function(params,content) {
|
||||
return "<li>";
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return "</li>";
|
||||
},
|
||||
restrictParentsTo: ["list","ul","ol"]
|
||||
},
|
||||
"list": {
|
||||
openTag: function(params,content) {
|
||||
return '<ul>';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</ul>';
|
||||
},
|
||||
restrictChildrenTo: ["*", "li"]
|
||||
},
|
||||
"noparse": {
|
||||
openTag: function(params,content) {
|
||||
return '';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '';
|
||||
},
|
||||
noParse: true
|
||||
},
|
||||
"ol": {
|
||||
openTag: function(params,content) {
|
||||
return '<ol>';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</ol>';
|
||||
},
|
||||
restrictChildrenTo: ["*", "li"]
|
||||
},
|
||||
"php": {
|
||||
openTag: function(params,content) {
|
||||
return '<span class="xbbcode-code">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
},
|
||||
noParse: true
|
||||
},
|
||||
"quote": {
|
||||
openTag: function(params,content) {
|
||||
return '<blockquote class="xbbcode-blockquote">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</blockquote>';
|
||||
}
|
||||
},
|
||||
"right": {
|
||||
openTag: function(params,content) {
|
||||
return '<span class="xbbcode-right">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
"s": {
|
||||
openTag: function(params,content) {
|
||||
return '<span class="xbbcode-s">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
"size": {
|
||||
openTag: function(params,content) {
|
||||
params = params || '';
|
||||
|
||||
var mySize = parseInt(params.substr(1),10) || 0;
|
||||
if (mySize < 4 || mySize > 40) {
|
||||
mySize = 14;
|
||||
}
|
||||
|
||||
return '<span class="xbbcode-size-' + mySize + '">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
"small": {
|
||||
openTag: function(params,content) {
|
||||
params = params || '';
|
||||
|
||||
var colorCode = params.substr(1) || "inherit";
|
||||
colorNamePattern.lastIndex = 0;
|
||||
colorCodePattern.lastIndex = 0;
|
||||
if ( !colorNamePattern.test( colorCode ) ) {
|
||||
if ( !colorCodePattern.test( colorCode ) ) {
|
||||
colorCode = "inherit";
|
||||
} else {
|
||||
if (colorCode.substr(0,1) !== "#") {
|
||||
colorCode = "#" + colorCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return '<span class="xbbcode-size-10" style="color:' + colorCode + '">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
|
||||
"sub": {
|
||||
openTag: function(params,content) {
|
||||
return '<sub>';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</sub>';
|
||||
}
|
||||
},
|
||||
"sup": {
|
||||
openTag: function(params,content) {
|
||||
return '<sup>';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</sup>';
|
||||
}
|
||||
},
|
||||
|
||||
"table": {
|
||||
openTag: function(params,content) {
|
||||
return '<table class="xbbcode-table">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</table>';
|
||||
},
|
||||
restrictChildrenTo: ["tbody","thead", "tfoot", "tr"]
|
||||
},
|
||||
"tbody": {
|
||||
openTag: function(params,content) {
|
||||
return '<tbody>';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</tbody>';
|
||||
},
|
||||
restrictChildrenTo: ["tr"],
|
||||
restrictParentsTo: ["table"]
|
||||
},
|
||||
"tfoot": {
|
||||
openTag: function(params,content) {
|
||||
return '<tfoot>';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</tfoot>';
|
||||
},
|
||||
restrictChildrenTo: ["tr"],
|
||||
restrictParentsTo: ["table"]
|
||||
},
|
||||
"thead": {
|
||||
openTag: function(params,content) {
|
||||
return '<thead class="xbbcode-thead">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</thead>';
|
||||
},
|
||||
restrictChildrenTo: ["tr"],
|
||||
restrictParentsTo: ["table"]
|
||||
},
|
||||
"td": {
|
||||
openTag: function(params,content) {
|
||||
return '<td class="xbbcode-td">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</td>';
|
||||
},
|
||||
restrictParentsTo: ["tr"]
|
||||
},
|
||||
"th": {
|
||||
openTag: function(params,content) {
|
||||
return '<th class="xbbcode-th">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</th>';
|
||||
},
|
||||
restrictParentsTo: ["tr"]
|
||||
},
|
||||
"tr": {
|
||||
openTag: function(params,content) {
|
||||
return '<tr class="xbbcode-tr">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</tr>';
|
||||
},
|
||||
restrictChildrenTo: ["td","th"],
|
||||
restrictParentsTo: ["table","tbody","tfoot","thead"]
|
||||
},
|
||||
"u": {
|
||||
openTag: function(params,content) {
|
||||
return '<span class="xbbcode-u">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</span>';
|
||||
}
|
||||
},
|
||||
"ul": {
|
||||
openTag: function(params,content) {
|
||||
return '<ul>';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</ul>';
|
||||
},
|
||||
restrictChildrenTo: ["*", "li"]
|
||||
},
|
||||
"url": {
|
||||
openTag: function(params,content) {
|
||||
|
||||
var myUrl;
|
||||
|
||||
if (!params) {
|
||||
myUrl = content.replace(/<.*?>/g,"");
|
||||
} else {
|
||||
myUrl = params.substr(1);
|
||||
}
|
||||
|
||||
urlPattern.lastIndex = 0;
|
||||
if ( !urlPattern.test( myUrl ) ) {
|
||||
myUrl = "#";
|
||||
}
|
||||
|
||||
return '<a href="' + myUrl + '">';
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</a>';
|
||||
}
|
||||
},
|
||||
"h1": {
|
||||
openTag: function(params,content) {
|
||||
return '<u><b>' + content;
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</b></u>';
|
||||
}
|
||||
},
|
||||
"h2": {
|
||||
openTag: function(params,content) {
|
||||
return '<u><b>' + content;
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</b></u>';
|
||||
}
|
||||
},
|
||||
"h3": {
|
||||
openTag: function(params,content) {
|
||||
return '<u><b>' + content;
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</b></u>';
|
||||
}
|
||||
},
|
||||
"h4": {
|
||||
openTag: function(params,content) {
|
||||
return '<u><b>' + content;
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</b></u>';
|
||||
}
|
||||
},
|
||||
"h5": {
|
||||
openTag: function(params,content) {
|
||||
return '<u><b>' + content;
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return '</b></u>';
|
||||
}
|
||||
},
|
||||
/*
|
||||
The [*] tag is special since the user does not define a closing [/*] tag when writing their bbcode.
|
||||
Instead this module parses the code and adds the closing [/*] tag in for them. None of the tags you
|
||||
add will act like this and this tag is an exception to the others.
|
||||
*/
|
||||
"*": {
|
||||
openTag: function(params,content) {
|
||||
return "<li>";
|
||||
},
|
||||
closeTag: function(params,content) {
|
||||
return "</li>";
|
||||
},
|
||||
restrictParentsTo: ["list","ul","ol"]
|
||||
}
|
||||
};
|
||||
|
||||
// create tag list and lookup fields
|
||||
function initTags() {
|
||||
tagList = [];
|
||||
var prop,
|
||||
ii,
|
||||
len;
|
||||
for (prop in tags) {
|
||||
if (tags.hasOwnProperty(prop)) {
|
||||
if (prop === "*") {
|
||||
tagList.push("\\" + prop);
|
||||
} else {
|
||||
tagList.push(prop);
|
||||
if ( tags[prop].noParse ) {
|
||||
tagsNoParseList.push(prop);
|
||||
}
|
||||
}
|
||||
|
||||
tags[prop].validChildLookup = {};
|
||||
tags[prop].validParentLookup = {};
|
||||
tags[prop].restrictParentsTo = tags[prop].restrictParentsTo || [];
|
||||
tags[prop].restrictChildrenTo = tags[prop].restrictChildrenTo || [];
|
||||
|
||||
len = tags[prop].restrictChildrenTo.length;
|
||||
for (ii = 0; ii < len; ii++) {
|
||||
tags[prop].validChildLookup[ tags[prop].restrictChildrenTo[ii] ] = true;
|
||||
}
|
||||
len = tags[prop].restrictParentsTo.length;
|
||||
for (ii = 0; ii < len; ii++) {
|
||||
tags[prop].validParentLookup[ tags[prop].restrictParentsTo[ii] ] = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
bbRegExp = new RegExp("<bbcl=([0-9]+) (" + tagList.join("|") + ")([ =][^>]*?)?>((?:.|[\\r\\n])*?)<bbcl=\\1 /\\2>", "gi");
|
||||
pbbRegExp = new RegExp("\\[(" + tagList.join("|") + ")([ =][^\\]]*?)?\\]([^\\[]*?)\\[/\\1\\]", "gi");
|
||||
pbbRegExp2 = new RegExp("\\[(" + tagsNoParseList.join("|") + ")([ =][^\\]]*?)?\\]([\\s\\S]*?)\\[/\\1\\]", "gi");
|
||||
|
||||
// create the regex for escaping ['s that aren't apart of tags
|
||||
(function() {
|
||||
var closeTagList = [];
|
||||
for (var ii = 0; ii < tagList.length; ii++) {
|
||||
if ( tagList[ii] !== "\\*" ) { // the * tag doesn't have an offical closing tag
|
||||
closeTagList.push ( "/" + tagList[ii] );
|
||||
}
|
||||
}
|
||||
|
||||
openTags = new RegExp("(\\[)((?:" + tagList.join("|") + ")(?:[ =][^\\]]*?)?)(\\])", "gi");
|
||||
closeTags = new RegExp("(\\[)(" + closeTagList.join("|") + ")(\\])", "gi");
|
||||
})();
|
||||
|
||||
}
|
||||
initTags();
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// private functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
function checkParentChildRestrictions(parentTag, bbcode, bbcodeLevel, tagName, tagParams, tagContents, errQueue) {
|
||||
|
||||
errQueue = errQueue || [];
|
||||
bbcodeLevel++;
|
||||
|
||||
// get a list of all of the child tags to this tag
|
||||
var reTagNames = new RegExp("(<bbcl=" + bbcodeLevel + " )(" + tagList.join("|") + ")([ =>])","gi"),
|
||||
reTagNamesParts = new RegExp("(<bbcl=" + bbcodeLevel + " )(" + tagList.join("|") + ")([ =>])","i"),
|
||||
matchingTags = tagContents.match(reTagNames) || [],
|
||||
cInfo,
|
||||
errStr,
|
||||
ii,
|
||||
childTag,
|
||||
pInfo = tags[parentTag] || {};
|
||||
|
||||
reTagNames.lastIndex = 0;
|
||||
|
||||
if (!matchingTags) {
|
||||
tagContents = "";
|
||||
}
|
||||
|
||||
for (ii = 0; ii < matchingTags.length; ii++) {
|
||||
reTagNamesParts.lastIndex = 0;
|
||||
childTag = (matchingTags[ii].match(reTagNamesParts))[2].toLowerCase();
|
||||
|
||||
if ( pInfo && pInfo.restrictChildrenTo && pInfo.restrictChildrenTo.length > 0 ) {
|
||||
if ( !pInfo.validChildLookup[childTag] ) {
|
||||
errStr = "The tag \"" + childTag + "\" is not allowed as a child of the tag \"" + parentTag + "\".";
|
||||
errQueue.push(errStr);
|
||||
}
|
||||
}
|
||||
cInfo = tags[childTag] || {};
|
||||
if ( cInfo.restrictParentsTo.length > 0 ) {
|
||||
if ( !cInfo.validParentLookup[parentTag] ) {
|
||||
errStr = "The tag \"" + parentTag + "\" is not allowed as a parent of the tag \"" + childTag + "\".";
|
||||
errQueue.push(errStr);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
tagContents = tagContents.replace(bbRegExp, function(matchStr, bbcodeLevel, tagName, tagParams, tagContents ) {
|
||||
errQueue = checkParentChildRestrictions(tagName.toLowerCase(), matchStr, bbcodeLevel, tagName, tagParams, tagContents, errQueue);
|
||||
return matchStr;
|
||||
});
|
||||
return errQueue;
|
||||
}
|
||||
|
||||
/*
|
||||
This function updates or adds a piece of metadata to each tag called "bbcl" which
|
||||
indicates how deeply nested a particular tag was in the bbcode. This property is removed
|
||||
from the HTML code tags at the end of the processing.
|
||||
*/
|
||||
function updateTagDepths(tagContents) {
|
||||
tagContents = tagContents.replace(/\<([^\>][^\>]*?)\>/gi, function(matchStr, subMatchStr) {
|
||||
var bbCodeLevel = subMatchStr.match(/^bbcl=([0-9]+) /);
|
||||
if (bbCodeLevel === null) {
|
||||
return "<bbcl=0 " + subMatchStr + ">";
|
||||
} else {
|
||||
return "<" + subMatchStr.replace(/^(bbcl=)([0-9]+)/, function(matchStr, m1, m2) {
|
||||
return m1 + (parseInt(m2, 10) + 1);
|
||||
}) + ">";
|
||||
}
|
||||
});
|
||||
return tagContents;
|
||||
}
|
||||
|
||||
/*
|
||||
This function removes the metadata added by the updateTagDepths function
|
||||
*/
|
||||
function unprocess(tagContent) {
|
||||
return tagContent.replace(/<bbcl=[0-9]+ \/\*>/gi,"").replace(/<bbcl=[0-9]+ /gi,"[").replace(/>/gi,"]");
|
||||
}
|
||||
|
||||
var replaceFunct = function(matchStr, bbcodeLevel, tagName, tagParams, tagContents) {
|
||||
|
||||
tagName = tagName.toLowerCase();
|
||||
|
||||
var processedContent = tags[tagName].noParse ? unprocess(tagContents) : tagContents.replace(bbRegExp, replaceFunct),
|
||||
openTag = tags[tagName].openTag(tagParams,processedContent),
|
||||
closeTag = tags[tagName].closeTag(tagParams,processedContent);
|
||||
|
||||
if ( tags[tagName].displayContent === false) {
|
||||
processedContent = "";
|
||||
}
|
||||
|
||||
return openTag + processedContent + closeTag;
|
||||
};
|
||||
|
||||
function parse(config) {
|
||||
var output = config.text;
|
||||
output = output.replace(bbRegExp, replaceFunct);
|
||||
return output;
|
||||
}
|
||||
|
||||
/*
|
||||
The star tag [*] is special in that it does not use a closing tag. Since this parser requires that tags to have a closing
|
||||
tag, we must pre-process the input and add in closing tags [/*] for the star tag.
|
||||
We have a little levaridge in that we know the text we're processing wont contain the <> characters (they have been
|
||||
changed into their HTML entity form to prevent XSS and code injection), so we can use those characters as markers to
|
||||
help us define boundaries and figure out where to place the [/*] tags.
|
||||
*/
|
||||
function fixStarTag(text) {
|
||||
text = text.replace(/\[(?!\*[ =\]]|list([ =][^\]]*)?\]|\/list[\]])/ig, "<");
|
||||
text = text.replace(/\[(?=list([ =][^\]]*)?\]|\/list[\]])/ig, ">");
|
||||
|
||||
while (text !== (text = text.replace(/>list([ =][^\]]*)?\]([^>]*?)(>\/list])/gi, function(matchStr,contents,endTag) {
|
||||
|
||||
var innerListTxt = matchStr;
|
||||
while (innerListTxt !== (innerListTxt = innerListTxt.replace(/\[\*\]([^\[]*?)(\[\*\]|>\/list])/i, function(matchStr,contents,endTag) {
|
||||
if (endTag.toLowerCase() === ">/list]") {
|
||||
endTag = "</*]</list]";
|
||||
} else {
|
||||
endTag = "</*][*]";
|
||||
}
|
||||
return "<*]" + contents + endTag;
|
||||
})));
|
||||
|
||||
innerListTxt = innerListTxt.replace(/>/g, "<");
|
||||
return innerListTxt;
|
||||
})));
|
||||
|
||||
// add ['s for our tags back in
|
||||
text = text.replace(/</g, "[");
|
||||
return text;
|
||||
}
|
||||
|
||||
function addBbcodeLevels(text) {
|
||||
while ( text !== (text = text.replace(pbbRegExp, function(matchStr, tagName, tagParams, tagContents) {
|
||||
matchStr = matchStr.replace(/\[/g, "<");
|
||||
matchStr = matchStr.replace(/\]/g, ">");
|
||||
return updateTagDepths(matchStr);
|
||||
})) );
|
||||
return text;
|
||||
}
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
// public functions
|
||||
// -----------------------------------------------------------------------------
|
||||
|
||||
// API, Expose all available tags
|
||||
me.tags = function() {
|
||||
return tags;
|
||||
};
|
||||
|
||||
// API
|
||||
me.addTags = function(newtags) {
|
||||
var tag;
|
||||
for (tag in newtags) {
|
||||
tags[tag] = newtags[tag];
|
||||
}
|
||||
initTags();
|
||||
};
|
||||
|
||||
me.process = function(config) {
|
||||
|
||||
var ret = {html: "", error: false},
|
||||
errQueue = [];
|
||||
|
||||
config.text = config.text.replace(/</g, "<"); // escape HTML tag brackets
|
||||
config.text = config.text.replace(/>/g, ">"); // escape HTML tag brackets
|
||||
|
||||
config.text = config.text.replace(openTags, function(matchStr, openB, contents, closeB) {
|
||||
return "<" + contents + ">";
|
||||
});
|
||||
config.text = config.text.replace(closeTags, function(matchStr, openB, contents, closeB) {
|
||||
return "<" + contents + ">";
|
||||
});
|
||||
|
||||
config.text = config.text.replace(/\[/g, "["); // escape ['s that aren't apart of tags
|
||||
config.text = config.text.replace(/\]/g, "]"); // escape ['s that aren't apart of tags
|
||||
config.text = config.text.replace(/</g, "["); // escape ['s that aren't apart of tags
|
||||
config.text = config.text.replace(/>/g, "]"); // escape ['s that aren't apart of tags
|
||||
|
||||
// process tags that don't have their content parsed
|
||||
while ( config.text !== (config.text = config.text.replace(pbbRegExp2, function(matchStr, tagName, tagParams, tagContents) {
|
||||
tagContents = tagContents.replace(/\[/g, "[");
|
||||
tagContents = tagContents.replace(/\]/g, "]");
|
||||
tagParams = tagParams || "";
|
||||
tagContents = tagContents || "";
|
||||
return "[" + tagName + tagParams + "]" + tagContents + "[/" + tagName + "]";
|
||||
})) );
|
||||
|
||||
config.text = fixStarTag(config.text); // add in closing tags for the [*] tag
|
||||
config.text = addBbcodeLevels(config.text); // add in level metadata
|
||||
|
||||
errQueue = checkParentChildRestrictions("bbcode", config.text, -1, "", "", config.text);
|
||||
|
||||
ret.html = parse(config);
|
||||
|
||||
if ( ret.html.indexOf("[") !== -1 || ret.html.indexOf("]") !== -1) {
|
||||
errQueue.push("Some tags appear to be misaligned.");
|
||||
}
|
||||
|
||||
if (config.removeMisalignedTags) {
|
||||
ret.html = ret.html.replace(/\[.*?\]/g,"");
|
||||
}
|
||||
if (config.addInLineBreaks) {
|
||||
ret.html = '<div style="white-space:pre-wrap;">' + ret.html + '</div>';
|
||||
}
|
||||
|
||||
if (!config.escapeHtml) {
|
||||
ret.html = ret.html.replace("[", "["); // put ['s back in
|
||||
ret.html = ret.html.replace("]", "]"); // put ['s back in
|
||||
}
|
||||
|
||||
ret.error = errQueue.length !== 0;
|
||||
ret.errorQueue = errQueue;
|
||||
|
||||
return ret;
|
||||
};
|
||||
|
||||
return me;
|
||||
})();
|
||||
|
||||
// for node
|
||||
if (typeof module !== "undefined") {
|
||||
module.exports = XBBCODE;
|
||||
}
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
/**
|
||||
* @license
|
||||
* zlib.js
|
||||
* JavaScript Zlib Library
|
||||
* https://github.com/imaya/zlib.js
|
||||
*
|
||||
* The MIT License
|
||||
*
|
||||
* Copyright (c) 2012 imaya
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
7
ControlPanel/js/zlib/crc32.min.js
vendored
7
ControlPanel/js/zlib/crc32.min.js
vendored
|
|
@ -1,7 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';var f=this;function h(c,a){var b=c.split("."),e=f;!(b[0]in e)&&e.execScript&&e.execScript("var "+b[0]);for(var d;b.length&&(d=b.shift());)!b.length&&void 0!==a?e[d]=a:e=e[d]?e[d]:e[d]={}};var l={c:function(c,a,b){return l.update(c,0,a,b)},update:function(c,a,b,e){var d=l.a,g="number"===typeof b?b:b=0,k="number"===typeof e?e:c.length;a^=4294967295;for(g=k&7;g--;++b)a=a>>>8^d[(a^c[b])&255];for(g=k>>3;g--;b+=8)a=a>>>8^d[(a^c[b])&255],a=a>>>8^d[(a^c[b+1])&255],a=a>>>8^d[(a^c[b+2])&255],a=a>>>8^d[(a^c[b+3])&255],a=a>>>8^d[(a^c[b+4])&255],a=a>>>8^d[(a^c[b+5])&255],a=a>>>8^d[(a^c[b+6])&255],a=a>>>8^d[(a^c[b+7])&255];return(a^4294967295)>>>0},d:function(c,a){return(l.a[(c^a)&255]^c>>>8)>>>
|
||||
0},b:[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,
|
||||
2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,
|
||||
2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,
|
||||
2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,
|
||||
3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,
|
||||
936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117]};l.a="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array?new Uint32Array(l.b):l.b;h("Zlib.CRC32",l);h("Zlib.CRC32.calc",l.c);h("Zlib.CRC32.update",l.update);}).call(this); //@ sourceMappingURL=crc32.min.js.map
|
||||
25
ControlPanel/js/zlib/deflate.min.js
vendored
25
ControlPanel/js/zlib/deflate.min.js
vendored
|
|
@ -1,25 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';var n=void 0,w=!0,aa=this;function ba(f,d){var c=f.split("."),e=aa;!(c[0]in e)&&e.execScript&&e.execScript("var "+c[0]);for(var b;c.length&&(b=c.shift());)!c.length&&d!==n?e[b]=d:e=e[b]?e[b]:e[b]={}};var C="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function K(f,d){this.index="number"===typeof d?d:0;this.e=0;this.buffer=f instanceof(C?Uint8Array:Array)?f:new (C?Uint8Array:Array)(32768);if(2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&ca(this)}function ca(f){var d=f.buffer,c,e=d.length,b=new (C?Uint8Array:Array)(e<<1);if(C)b.set(d);else for(c=0;c<e;++c)b[c]=d[c];return f.buffer=b}
|
||||
K.prototype.b=function(f,d,c){var e=this.buffer,b=this.index,a=this.e,g=e[b],m;c&&1<d&&(f=8<d?(L[f&255]<<24|L[f>>>8&255]<<16|L[f>>>16&255]<<8|L[f>>>24&255])>>32-d:L[f]>>8-d);if(8>d+a)g=g<<d|f,a+=d;else for(m=0;m<d;++m)g=g<<1|f>>d-m-1&1,8===++a&&(a=0,e[b++]=L[g],g=0,b===e.length&&(e=ca(this)));e[b]=g;this.buffer=e;this.e=a;this.index=b};K.prototype.finish=function(){var f=this.buffer,d=this.index,c;0<this.e&&(f[d]<<=8-this.e,f[d]=L[f[d]],d++);C?c=f.subarray(0,d):(f.length=d,c=f);return c};
|
||||
var da=new (C?Uint8Array:Array)(256),M;for(M=0;256>M;++M){for(var N=M,S=N,ea=7,N=N>>>1;N;N>>>=1)S<<=1,S|=N&1,--ea;da[M]=(S<<ea&255)>>>0}var L=da;function ia(f){this.buffer=new (C?Uint16Array:Array)(2*f);this.length=0}ia.prototype.getParent=function(f){return 2*((f-2)/4|0)};ia.prototype.push=function(f,d){var c,e,b=this.buffer,a;c=this.length;b[this.length++]=d;for(b[this.length++]=f;0<c;)if(e=this.getParent(c),b[c]>b[e])a=b[c],b[c]=b[e],b[e]=a,a=b[c+1],b[c+1]=b[e+1],b[e+1]=a,c=e;else break;return this.length};
|
||||
ia.prototype.pop=function(){var f,d,c=this.buffer,e,b,a;d=c[0];f=c[1];this.length-=2;c[0]=c[this.length];c[1]=c[this.length+1];for(a=0;;){b=2*a+2;if(b>=this.length)break;b+2<this.length&&c[b+2]>c[b]&&(b+=2);if(c[b]>c[a])e=c[a],c[a]=c[b],c[b]=e,e=c[a+1],c[a+1]=c[b+1],c[b+1]=e;else break;a=b}return{index:f,value:d,length:this.length}};function ka(f,d){this.d=la;this.i=0;this.input=C&&f instanceof Array?new Uint8Array(f):f;this.c=0;d&&(d.lazy&&(this.i=d.lazy),"number"===typeof d.compressionType&&(this.d=d.compressionType),d.outputBuffer&&(this.a=C&&d.outputBuffer instanceof Array?new Uint8Array(d.outputBuffer):d.outputBuffer),"number"===typeof d.outputIndex&&(this.c=d.outputIndex));this.a||(this.a=new (C?Uint8Array:Array)(32768))}var la=2,na={NONE:0,h:1,g:la,n:3},T=[],U;
|
||||
for(U=0;288>U;U++)switch(w){case 143>=U:T.push([U+48,8]);break;case 255>=U:T.push([U-144+400,9]);break;case 279>=U:T.push([U-256+0,7]);break;case 287>=U:T.push([U-280+192,8]);break;default:throw"invalid literal: "+U;}
|
||||
ka.prototype.f=function(){var f,d,c,e,b=this.input;switch(this.d){case 0:c=0;for(e=b.length;c<e;){d=C?b.subarray(c,c+65535):b.slice(c,c+65535);c+=d.length;var a=d,g=c===e,m=n,k=n,p=n,t=n,u=n,l=this.a,h=this.c;if(C){for(l=new Uint8Array(this.a.buffer);l.length<=h+a.length+5;)l=new Uint8Array(l.length<<1);l.set(this.a)}m=g?1:0;l[h++]=m|0;k=a.length;p=~k+65536&65535;l[h++]=k&255;l[h++]=k>>>8&255;l[h++]=p&255;l[h++]=p>>>8&255;if(C)l.set(a,h),h+=a.length,l=l.subarray(0,h);else{t=0;for(u=a.length;t<u;++t)l[h++]=
|
||||
a[t];l.length=h}this.c=h;this.a=l}break;case 1:var q=new K(C?new Uint8Array(this.a.buffer):this.a,this.c);q.b(1,1,w);q.b(1,2,w);var s=oa(this,b),x,fa,z;x=0;for(fa=s.length;x<fa;x++)if(z=s[x],K.prototype.b.apply(q,T[z]),256<z)q.b(s[++x],s[++x],w),q.b(s[++x],5),q.b(s[++x],s[++x],w);else if(256===z)break;this.a=q.finish();this.c=this.a.length;break;case la:var B=new K(C?new Uint8Array(this.a.buffer):this.a,this.c),ta,J,O,P,Q,La=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],X,ua,Y,va,ga,ja=Array(19),
|
||||
wa,R,ha,y,xa;ta=la;B.b(1,1,w);B.b(ta,2,w);J=oa(this,b);X=pa(this.m,15);ua=qa(X);Y=pa(this.l,7);va=qa(Y);for(O=286;257<O&&0===X[O-1];O--);for(P=30;1<P&&0===Y[P-1];P--);var ya=O,za=P,F=new (C?Uint32Array:Array)(ya+za),r,G,v,Z,E=new (C?Uint32Array:Array)(316),D,A,H=new (C?Uint8Array:Array)(19);for(r=G=0;r<ya;r++)F[G++]=X[r];for(r=0;r<za;r++)F[G++]=Y[r];if(!C){r=0;for(Z=H.length;r<Z;++r)H[r]=0}r=D=0;for(Z=F.length;r<Z;r+=G){for(G=1;r+G<Z&&F[r+G]===F[r];++G);v=G;if(0===F[r])if(3>v)for(;0<v--;)E[D++]=0,
|
||||
H[0]++;else for(;0<v;)A=138>v?v:138,A>v-3&&A<v&&(A=v-3),10>=A?(E[D++]=17,E[D++]=A-3,H[17]++):(E[D++]=18,E[D++]=A-11,H[18]++),v-=A;else if(E[D++]=F[r],H[F[r]]++,v--,3>v)for(;0<v--;)E[D++]=F[r],H[F[r]]++;else for(;0<v;)A=6>v?v:6,A>v-3&&A<v&&(A=v-3),E[D++]=16,E[D++]=A-3,H[16]++,v-=A}f=C?E.subarray(0,D):E.slice(0,D);ga=pa(H,7);for(y=0;19>y;y++)ja[y]=ga[La[y]];for(Q=19;4<Q&&0===ja[Q-1];Q--);wa=qa(ga);B.b(O-257,5,w);B.b(P-1,5,w);B.b(Q-4,4,w);for(y=0;y<Q;y++)B.b(ja[y],3,w);y=0;for(xa=f.length;y<xa;y++)if(R=
|
||||
f[y],B.b(wa[R],ga[R],w),16<=R){y++;switch(R){case 16:ha=2;break;case 17:ha=3;break;case 18:ha=7;break;default:throw"invalid code: "+R;}B.b(f[y],ha,w)}var Aa=[ua,X],Ba=[va,Y],I,Ca,$,ma,Da,Ea,Fa,Ga;Da=Aa[0];Ea=Aa[1];Fa=Ba[0];Ga=Ba[1];I=0;for(Ca=J.length;I<Ca;++I)if($=J[I],B.b(Da[$],Ea[$],w),256<$)B.b(J[++I],J[++I],w),ma=J[++I],B.b(Fa[ma],Ga[ma],w),B.b(J[++I],J[++I],w);else if(256===$)break;this.a=B.finish();this.c=this.a.length;break;default:throw"invalid compression type";}return this.a};
|
||||
function ra(f,d){this.length=f;this.k=d}
|
||||
var sa=function(){function f(b){switch(w){case 3===b:return[257,b-3,0];case 4===b:return[258,b-4,0];case 5===b:return[259,b-5,0];case 6===b:return[260,b-6,0];case 7===b:return[261,b-7,0];case 8===b:return[262,b-8,0];case 9===b:return[263,b-9,0];case 10===b:return[264,b-10,0];case 12>=b:return[265,b-11,1];case 14>=b:return[266,b-13,1];case 16>=b:return[267,b-15,1];case 18>=b:return[268,b-17,1];case 22>=b:return[269,b-19,2];case 26>=b:return[270,b-23,2];case 30>=b:return[271,b-27,2];case 34>=b:return[272,
|
||||
b-31,2];case 42>=b:return[273,b-35,3];case 50>=b:return[274,b-43,3];case 58>=b:return[275,b-51,3];case 66>=b:return[276,b-59,3];case 82>=b:return[277,b-67,4];case 98>=b:return[278,b-83,4];case 114>=b:return[279,b-99,4];case 130>=b:return[280,b-115,4];case 162>=b:return[281,b-131,5];case 194>=b:return[282,b-163,5];case 226>=b:return[283,b-195,5];case 257>=b:return[284,b-227,5];case 258===b:return[285,b-258,0];default:throw"invalid length: "+b;}}var d=[],c,e;for(c=3;258>=c;c++)e=f(c),d[c]=e[2]<<24|
|
||||
e[1]<<16|e[0];return d}(),Ha=C?new Uint32Array(sa):sa;
|
||||
function oa(f,d){function c(b,c){var a=b.k,d=[],e=0,f;f=Ha[b.length];d[e++]=f&65535;d[e++]=f>>16&255;d[e++]=f>>24;var g;switch(w){case 1===a:g=[0,a-1,0];break;case 2===a:g=[1,a-2,0];break;case 3===a:g=[2,a-3,0];break;case 4===a:g=[3,a-4,0];break;case 6>=a:g=[4,a-5,1];break;case 8>=a:g=[5,a-7,1];break;case 12>=a:g=[6,a-9,2];break;case 16>=a:g=[7,a-13,2];break;case 24>=a:g=[8,a-17,3];break;case 32>=a:g=[9,a-25,3];break;case 48>=a:g=[10,a-33,4];break;case 64>=a:g=[11,a-49,4];break;case 96>=a:g=[12,a-
|
||||
65,5];break;case 128>=a:g=[13,a-97,5];break;case 192>=a:g=[14,a-129,6];break;case 256>=a:g=[15,a-193,6];break;case 384>=a:g=[16,a-257,7];break;case 512>=a:g=[17,a-385,7];break;case 768>=a:g=[18,a-513,8];break;case 1024>=a:g=[19,a-769,8];break;case 1536>=a:g=[20,a-1025,9];break;case 2048>=a:g=[21,a-1537,9];break;case 3072>=a:g=[22,a-2049,10];break;case 4096>=a:g=[23,a-3073,10];break;case 6144>=a:g=[24,a-4097,11];break;case 8192>=a:g=[25,a-6145,11];break;case 12288>=a:g=[26,a-8193,12];break;case 16384>=
|
||||
a:g=[27,a-12289,12];break;case 24576>=a:g=[28,a-16385,13];break;case 32768>=a:g=[29,a-24577,13];break;default:throw"invalid distance";}f=g;d[e++]=f[0];d[e++]=f[1];d[e++]=f[2];var k,m;k=0;for(m=d.length;k<m;++k)l[h++]=d[k];s[d[0]]++;x[d[3]]++;q=b.length+c-1;u=null}var e,b,a,g,m,k={},p,t,u,l=C?new Uint16Array(2*d.length):[],h=0,q=0,s=new (C?Uint32Array:Array)(286),x=new (C?Uint32Array:Array)(30),fa=f.i,z;if(!C){for(a=0;285>=a;)s[a++]=0;for(a=0;29>=a;)x[a++]=0}s[256]=1;e=0;for(b=d.length;e<b;++e){a=
|
||||
m=0;for(g=3;a<g&&e+a!==b;++a)m=m<<8|d[e+a];k[m]===n&&(k[m]=[]);p=k[m];if(!(0<q--)){for(;0<p.length&&32768<e-p[0];)p.shift();if(e+3>=b){u&&c(u,-1);a=0;for(g=b-e;a<g;++a)z=d[e+a],l[h++]=z,++s[z];break}0<p.length?(t=Ia(d,e,p),u?u.length<t.length?(z=d[e-1],l[h++]=z,++s[z],c(t,0)):c(u,-1):t.length<fa?u=t:c(t,0)):u?c(u,-1):(z=d[e],l[h++]=z,++s[z])}p.push(e)}l[h++]=256;s[256]++;f.m=s;f.l=x;return C?l.subarray(0,h):l}
|
||||
function Ia(f,d,c){var e,b,a=0,g,m,k,p,t=f.length;m=0;p=c.length;a:for(;m<p;m++){e=c[p-m-1];g=3;if(3<a){for(k=a;3<k;k--)if(f[e+k-1]!==f[d+k-1])continue a;g=a}for(;258>g&&d+g<t&&f[e+g]===f[d+g];)++g;g>a&&(b=e,a=g);if(258===g)break}return new ra(a,d-b)}
|
||||
function pa(f,d){var c=f.length,e=new ia(572),b=new (C?Uint8Array:Array)(c),a,g,m,k,p;if(!C)for(k=0;k<c;k++)b[k]=0;for(k=0;k<c;++k)0<f[k]&&e.push(k,f[k]);a=Array(e.length/2);g=new (C?Uint32Array:Array)(e.length/2);if(1===a.length)return b[e.pop().index]=1,b;k=0;for(p=e.length/2;k<p;++k)a[k]=e.pop(),g[k]=a[k].value;m=Ja(g,g.length,d);k=0;for(p=a.length;k<p;++k)b[a[k].index]=m[k];return b}
|
||||
function Ja(f,d,c){function e(a){var b=k[a][p[a]];b===d?(e(a+1),e(a+1)):--g[b];++p[a]}var b=new (C?Uint16Array:Array)(c),a=new (C?Uint8Array:Array)(c),g=new (C?Uint8Array:Array)(d),m=Array(c),k=Array(c),p=Array(c),t=(1<<c)-d,u=1<<c-1,l,h,q,s,x;b[c-1]=d;for(h=0;h<c;++h)t<u?a[h]=0:(a[h]=1,t-=u),t<<=1,b[c-2-h]=(b[c-1-h]/2|0)+d;b[0]=a[0];m[0]=Array(b[0]);k[0]=Array(b[0]);for(h=1;h<c;++h)b[h]>2*b[h-1]+a[h]&&(b[h]=2*b[h-1]+a[h]),m[h]=Array(b[h]),k[h]=Array(b[h]);for(l=0;l<d;++l)g[l]=c;for(q=0;q<b[c-1];++q)m[c-
|
||||
1][q]=f[q],k[c-1][q]=q;for(l=0;l<c;++l)p[l]=0;1===a[c-1]&&(--g[0],++p[c-1]);for(h=c-2;0<=h;--h){s=l=0;x=p[h+1];for(q=0;q<b[h];q++)s=m[h+1][x]+m[h+1][x+1],s>f[l]?(m[h][q]=s,k[h][q]=d,x+=2):(m[h][q]=f[l],k[h][q]=l,++l);p[h]=0;1===a[h]&&e(h)}return g}
|
||||
function qa(f){var d=new (C?Uint16Array:Array)(f.length),c=[],e=[],b=0,a,g,m,k;a=0;for(g=f.length;a<g;a++)c[f[a]]=(c[f[a]]|0)+1;a=1;for(g=16;a<=g;a++)e[a]=b,b+=c[a]|0,b<<=1;a=0;for(g=f.length;a<g;a++){b=e[f[a]];e[f[a]]+=1;m=d[a]=0;for(k=f[a];m<k;m++)d[a]=d[a]<<1|b&1,b>>>=1}return d};function Ka(f,d){this.input=f;this.a=new (C?Uint8Array:Array)(32768);this.d=V.g;var c={},e;if((d||!(d={}))&&"number"===typeof d.compressionType)this.d=d.compressionType;for(e in d)c[e]=d[e];c.outputBuffer=this.a;this.j=new ka(this.input,c)}var V=na;
|
||||
Ka.prototype.f=function(){var f,d,c,e,b,a,g=0;a=this.a;switch(8){case 8:f=Math.LOG2E*Math.log(32768)-8;break;default:throw Error("invalid compression method");}d=f<<4|8;a[g++]=d;switch(8){case 8:switch(this.d){case V.NONE:e=0;break;case V.h:e=1;break;case V.g:e=2;break;default:throw Error("unsupported compression type");}break;default:throw Error("invalid compression method");}c=e<<6|0;a[g++]=c|31-(256*d+c)%31;var m=this.input;if("string"===typeof m){var k=m.split(""),p,t;p=0;for(t=k.length;p<t;p++)k[p]=
|
||||
(k[p].charCodeAt(0)&255)>>>0;m=k}for(var u=1,l=0,h=m.length,q,s=0;0<h;){q=1024<h?1024:h;h-=q;do u+=m[s++],l+=u;while(--q);u%=65521;l%=65521}b=(l<<16|u)>>>0;this.j.c=g;a=this.j.f();g=a.length;C&&(a=new Uint8Array(a.buffer),a.length<=g+4&&(this.a=new Uint8Array(a.length+4),this.a.set(a),a=this.a),a=a.subarray(0,g+4));a[g++]=b>>24&255;a[g++]=b>>16&255;a[g++]=b>>8&255;a[g++]=b&255;return a};ba("Zlib.Deflate",Ka);ba("Zlib.Deflate.compress",function(f,d){return(new Ka(f,d)).f()});ba("Zlib.Deflate.prototype.compress",Ka.prototype.f);var Ma={NONE:V.NONE,FIXED:V.h,DYNAMIC:V.g},Na,Oa,W,Pa;if(Object.keys)Na=Object.keys(Ma);else for(Oa in Na=[],W=0,Ma)Na[W++]=Oa;W=0;for(Pa=Na.length;W<Pa;++W)Oa=Na[W],ba("Zlib.Deflate.CompressionType."+Oa,Ma[Oa]);}).call(this); //@ sourceMappingURL=deflate.min.js.map
|
||||
File diff suppressed because one or more lines are too long
26
ControlPanel/js/zlib/gunzip.min.js
vendored
26
ControlPanel/js/zlib/gunzip.min.js
vendored
|
|
@ -1,26 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';function n(e){throw e;}var q=void 0,aa=this;function r(e,c){var d=e.split("."),b=aa;!(d[0]in b)&&b.execScript&&b.execScript("var "+d[0]);for(var a;d.length&&(a=d.shift());)!d.length&&c!==q?b[a]=c:b=b[a]?b[a]:b[a]={}};var u="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;new (u?Uint8Array:Array)(256);var v;for(v=0;256>v;++v)for(var w=v,ba=7,w=w>>>1;w;w>>>=1)--ba;function x(e,c,d){var b,a="number"===typeof c?c:c=0,f="number"===typeof d?d:e.length;b=-1;for(a=f&7;a--;++c)b=b>>>8^z[(b^e[c])&255];for(a=f>>3;a--;c+=8)b=b>>>8^z[(b^e[c])&255],b=b>>>8^z[(b^e[c+1])&255],b=b>>>8^z[(b^e[c+2])&255],b=b>>>8^z[(b^e[c+3])&255],b=b>>>8^z[(b^e[c+4])&255],b=b>>>8^z[(b^e[c+5])&255],b=b>>>8^z[(b^e[c+6])&255],b=b>>>8^z[(b^e[c+7])&255];return(b^4294967295)>>>0}
|
||||
var A=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,
|
||||
2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,
|
||||
2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,
|
||||
2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,
|
||||
3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,
|
||||
936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],z=u?new Uint32Array(A):A;function B(){}B.prototype.getName=function(){return this.name};B.prototype.getData=function(){return this.data};B.prototype.H=function(){return this.I};r("Zlib.GunzipMember",B);r("Zlib.GunzipMember.prototype.getName",B.prototype.getName);r("Zlib.GunzipMember.prototype.getData",B.prototype.getData);r("Zlib.GunzipMember.prototype.getMtime",B.prototype.H);function D(e){var c=e.length,d=0,b=Number.POSITIVE_INFINITY,a,f,g,k,m,p,t,h,l,y;for(h=0;h<c;++h)e[h]>d&&(d=e[h]),e[h]<b&&(b=e[h]);a=1<<d;f=new (u?Uint32Array:Array)(a);g=1;k=0;for(m=2;g<=d;){for(h=0;h<c;++h)if(e[h]===g){p=0;t=k;for(l=0;l<g;++l)p=p<<1|t&1,t>>=1;y=g<<16|h;for(l=p;l<a;l+=m)f[l]=y;++k}++g;k<<=1;m<<=1}return[f,d,b]};var E=[],F;for(F=0;288>F;F++)switch(!0){case 143>=F:E.push([F+48,8]);break;case 255>=F:E.push([F-144+400,9]);break;case 279>=F:E.push([F-256+0,7]);break;case 287>=F:E.push([F-280+192,8]);break;default:n("invalid literal: "+F)}
|
||||
var ca=function(){function e(a){switch(!0){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,
|
||||
a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:n("invalid length: "+a)}}var c=[],d,b;for(d=3;258>=d;d++)b=e(d),c[d]=b[2]<<24|b[1]<<
|
||||
16|b[0];return c}();u&&new Uint32Array(ca);function G(e,c){this.i=[];this.j=32768;this.d=this.f=this.c=this.n=0;this.input=u?new Uint8Array(e):e;this.o=!1;this.k=H;this.z=!1;if(c||!(c={}))c.index&&(this.c=c.index),c.bufferSize&&(this.j=c.bufferSize),c.bufferType&&(this.k=c.bufferType),c.resize&&(this.z=c.resize);switch(this.k){case I:this.a=32768;this.b=new (u?Uint8Array:Array)(32768+this.j+258);break;case H:this.a=0;this.b=new (u?Uint8Array:Array)(this.j);this.e=this.F;this.q=this.B;this.l=this.D;break;default:n(Error("invalid inflate mode"))}}
|
||||
var I=0,H=1;
|
||||
G.prototype.g=function(){for(;!this.o;){var e=J(this,3);e&1&&(this.o=!0);e>>>=1;switch(e){case 0:var c=this.input,d=this.c,b=this.b,a=this.a,f=c.length,g=q,k=q,m=b.length,p=q;this.d=this.f=0;d+1>=f&&n(Error("invalid uncompressed block header: LEN"));g=c[d++]|c[d++]<<8;d+1>=f&&n(Error("invalid uncompressed block header: NLEN"));k=c[d++]|c[d++]<<8;g===~k&&n(Error("invalid uncompressed block header: length verify"));d+g>c.length&&n(Error("input buffer is broken"));switch(this.k){case I:for(;a+g>b.length;){p=
|
||||
m-a;g-=p;if(u)b.set(c.subarray(d,d+p),a),a+=p,d+=p;else for(;p--;)b[a++]=c[d++];this.a=a;b=this.e();a=this.a}break;case H:for(;a+g>b.length;)b=this.e({t:2});break;default:n(Error("invalid inflate mode"))}if(u)b.set(c.subarray(d,d+g),a),a+=g,d+=g;else for(;g--;)b[a++]=c[d++];this.c=d;this.a=a;this.b=b;break;case 1:this.l(da,ea);break;case 2:fa(this);break;default:n(Error("unknown BTYPE: "+e))}}return this.q()};
|
||||
var K=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],L=u?new Uint16Array(K):K,N=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],O=u?new Uint16Array(N):N,P=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],Q=u?new Uint8Array(P):P,R=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],ga=u?new Uint16Array(R):R,ha=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,
|
||||
13,13],U=u?new Uint8Array(ha):ha,V=new (u?Uint8Array:Array)(288),W,ia;W=0;for(ia=V.length;W<ia;++W)V[W]=143>=W?8:255>=W?9:279>=W?7:8;var da=D(V),X=new (u?Uint8Array:Array)(30),Y,ja;Y=0;for(ja=X.length;Y<ja;++Y)X[Y]=5;var ea=D(X);function J(e,c){for(var d=e.f,b=e.d,a=e.input,f=e.c,g=a.length,k;b<c;)f>=g&&n(Error("input buffer is broken")),d|=a[f++]<<b,b+=8;k=d&(1<<c)-1;e.f=d>>>c;e.d=b-c;e.c=f;return k}
|
||||
function Z(e,c){for(var d=e.f,b=e.d,a=e.input,f=e.c,g=a.length,k=c[0],m=c[1],p,t;b<m&&!(f>=g);)d|=a[f++]<<b,b+=8;p=k[d&(1<<m)-1];t=p>>>16;e.f=d>>t;e.d=b-t;e.c=f;return p&65535}
|
||||
function fa(e){function c(a,c,b){var d,e=this.w,f,g;for(g=0;g<a;)switch(d=Z(this,c),d){case 16:for(f=3+J(this,2);f--;)b[g++]=e;break;case 17:for(f=3+J(this,3);f--;)b[g++]=0;e=0;break;case 18:for(f=11+J(this,7);f--;)b[g++]=0;e=0;break;default:e=b[g++]=d}this.w=e;return b}var d=J(e,5)+257,b=J(e,5)+1,a=J(e,4)+4,f=new (u?Uint8Array:Array)(L.length),g,k,m,p;for(p=0;p<a;++p)f[L[p]]=J(e,3);if(!u){p=a;for(a=f.length;p<a;++p)f[L[p]]=0}g=D(f);k=new (u?Uint8Array:Array)(d);m=new (u?Uint8Array:Array)(b);e.w=
|
||||
0;e.l(D(c.call(e,d,g,k)),D(c.call(e,b,g,m)))}G.prototype.l=function(e,c){var d=this.b,b=this.a;this.r=e;for(var a=d.length-258,f,g,k,m;256!==(f=Z(this,e));)if(256>f)b>=a&&(this.a=b,d=this.e(),b=this.a),d[b++]=f;else{g=f-257;m=O[g];0<Q[g]&&(m+=J(this,Q[g]));f=Z(this,c);k=ga[f];0<U[f]&&(k+=J(this,U[f]));b>=a&&(this.a=b,d=this.e(),b=this.a);for(;m--;)d[b]=d[b++-k]}for(;8<=this.d;)this.d-=8,this.c--;this.a=b};
|
||||
G.prototype.D=function(e,c){var d=this.b,b=this.a;this.r=e;for(var a=d.length,f,g,k,m;256!==(f=Z(this,e));)if(256>f)b>=a&&(d=this.e(),a=d.length),d[b++]=f;else{g=f-257;m=O[g];0<Q[g]&&(m+=J(this,Q[g]));f=Z(this,c);k=ga[f];0<U[f]&&(k+=J(this,U[f]));b+m>a&&(d=this.e(),a=d.length);for(;m--;)d[b]=d[b++-k]}for(;8<=this.d;)this.d-=8,this.c--;this.a=b};
|
||||
G.prototype.e=function(){var e=new (u?Uint8Array:Array)(this.a-32768),c=this.a-32768,d,b,a=this.b;if(u)e.set(a.subarray(32768,e.length));else{d=0;for(b=e.length;d<b;++d)e[d]=a[d+32768]}this.i.push(e);this.n+=e.length;if(u)a.set(a.subarray(c,c+32768));else for(d=0;32768>d;++d)a[d]=a[c+d];this.a=32768;return a};
|
||||
G.prototype.F=function(e){var c,d=this.input.length/this.c+1|0,b,a,f,g=this.input,k=this.b;e&&("number"===typeof e.t&&(d=e.t),"number"===typeof e.A&&(d+=e.A));2>d?(b=(g.length-this.c)/this.r[2],f=258*(b/2)|0,a=f<k.length?k.length+f:k.length<<1):a=k.length*d;u?(c=new Uint8Array(a),c.set(k)):c=k;return this.b=c};
|
||||
G.prototype.q=function(){var e=0,c=this.b,d=this.i,b,a=new (u?Uint8Array:Array)(this.n+(this.a-32768)),f,g,k,m;if(0===d.length)return u?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);f=0;for(g=d.length;f<g;++f){b=d[f];k=0;for(m=b.length;k<m;++k)a[e++]=b[k]}f=32768;for(g=this.a;f<g;++f)a[e++]=c[f];this.i=[];return this.buffer=a};
|
||||
G.prototype.B=function(){var e,c=this.a;u?this.z?(e=new Uint8Array(c),e.set(this.b.subarray(0,c))):e=this.b.subarray(0,c):(this.b.length>c&&(this.b.length=c),e=this.b);return this.buffer=e};function $(e){this.input=e;this.c=0;this.m=[];this.s=!1}$.prototype.G=function(){this.s||this.g();return this.m.slice()};
|
||||
$.prototype.g=function(){for(var e=this.input.length;this.c<e;){var c=new B,d=q,b=q,a=q,f=q,g=q,k=q,m=q,p=q,t=q,h=this.input,l=this.c;c.u=h[l++];c.v=h[l++];(31!==c.u||139!==c.v)&&n(Error("invalid file signature:"+c.u+","+c.v));c.p=h[l++];switch(c.p){case 8:break;default:n(Error("unknown compression method: "+c.p))}c.h=h[l++];p=h[l++]|h[l++]<<8|h[l++]<<16|h[l++]<<24;c.I=new Date(1E3*p);c.O=h[l++];c.N=h[l++];0<(c.h&4)&&(c.J=h[l++]|h[l++]<<8,l+=c.J);if(0<(c.h&8)){m=[];for(k=0;0<(g=h[l++]);)m[k++]=String.fromCharCode(g);
|
||||
c.name=m.join("")}if(0<(c.h&16)){m=[];for(k=0;0<(g=h[l++]);)m[k++]=String.fromCharCode(g);c.K=m.join("")}0<(c.h&2)&&(c.C=x(h,0,l)&65535,c.C!==(h[l++]|h[l++]<<8)&&n(Error("invalid header crc16")));d=h[h.length-4]|h[h.length-3]<<8|h[h.length-2]<<16|h[h.length-1]<<24;h.length-l-4-4<512*d&&(f=d);b=new G(h,{index:l,bufferSize:f});c.data=a=b.g();l=b.c;c.L=t=(h[l++]|h[l++]<<8|h[l++]<<16|h[l++]<<24)>>>0;x(a,q,q)!==t&&n(Error("invalid CRC-32 checksum: 0x"+x(a,q,q).toString(16)+" / 0x"+t.toString(16)));c.M=
|
||||
d=(h[l++]|h[l++]<<8|h[l++]<<16|h[l++]<<24)>>>0;(a.length&4294967295)!==d&&n(Error("invalid input size: "+(a.length&4294967295)+" / "+d));this.m.push(c);this.c=l}this.s=!0;var y=this.m,s,M,S=0,T=0,C;s=0;for(M=y.length;s<M;++s)T+=y[s].data.length;if(u){C=new Uint8Array(T);for(s=0;s<M;++s)C.set(y[s].data,S),S+=y[s].data.length}else{C=[];for(s=0;s<M;++s)C[s]=y[s].data;C=Array.prototype.concat.apply([],C)}return C};r("Zlib.Gunzip",$);r("Zlib.Gunzip.prototype.decompress",$.prototype.g);r("Zlib.Gunzip.prototype.getMembers",$.prototype.G);}).call(this); //@ sourceMappingURL=gunzip.min.js.map
|
||||
File diff suppressed because one or more lines are too long
32
ControlPanel/js/zlib/gzip.min.js
vendored
32
ControlPanel/js/zlib/gzip.min.js
vendored
|
|
@ -1,32 +0,0 @@
|
|||
(function() {'use strict';var p=void 0,v=!0,da=this;function fa(f,e){var c=f.split("."),a=da;!(c[0]in a)&&a.execScript&&a.execScript("var "+c[0]);for(var b;c.length&&(b=c.shift());)!c.length&&e!==p?a[b]=e:a=a[b]?a[b]:a[b]={}};var C="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function F(f,e){this.index="number"===typeof e?e:0;this.f=0;this.buffer=f instanceof(C?Uint8Array:Array)?f:new (C?Uint8Array:Array)(32768);if(2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&ga(this)}function ga(f){var e=f.buffer,c,a=e.length,b=new (C?Uint8Array:Array)(a<<1);if(C)b.set(e);else for(c=0;c<a;++c)b[c]=e[c];return f.buffer=b}
|
||||
F.prototype.b=function(f,e,c){var a=this.buffer,b=this.index,g=this.f,l=a[b],m;c&&1<e&&(f=8<e?(H[f&255]<<24|H[f>>>8&255]<<16|H[f>>>16&255]<<8|H[f>>>24&255])>>32-e:H[f]>>8-e);if(8>e+g)l=l<<e|f,g+=e;else for(m=0;m<e;++m)l=l<<1|f>>e-m-1&1,8===++g&&(g=0,a[b++]=H[l],l=0,b===a.length&&(a=ga(this)));a[b]=l;this.buffer=a;this.f=g;this.index=b};F.prototype.finish=function(){var f=this.buffer,e=this.index,c;0<this.f&&(f[e]<<=8-this.f,f[e]=H[f[e]],e++);C?c=f.subarray(0,e):(f.length=e,c=f);return c};
|
||||
var ia=new (C?Uint8Array:Array)(256),M;for(M=0;256>M;++M){for(var N=M,S=N,ja=7,N=N>>>1;N;N>>>=1)S<<=1,S|=N&1,--ja;ia[M]=(S<<ja&255)>>>0}var H=ia;function ka(f,e,c){var a,b="number"===typeof e?e:e=0,g="number"===typeof c?c:f.length;a=-1;for(b=g&7;b--;++e)a=a>>>8^T[(a^f[e])&255];for(b=g>>3;b--;e+=8)a=a>>>8^T[(a^f[e])&255],a=a>>>8^T[(a^f[e+1])&255],a=a>>>8^T[(a^f[e+2])&255],a=a>>>8^T[(a^f[e+3])&255],a=a>>>8^T[(a^f[e+4])&255],a=a>>>8^T[(a^f[e+5])&255],a=a>>>8^T[(a^f[e+6])&255],a=a>>>8^T[(a^f[e+7])&255];return(a^4294967295)>>>0}
|
||||
var la=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,
|
||||
2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,
|
||||
2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,
|
||||
2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,
|
||||
3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,
|
||||
936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],T=C?new Uint32Array(la):la;function U(f){this.buffer=new (C?Uint16Array:Array)(2*f);this.length=0}U.prototype.getParent=function(f){return 2*((f-2)/4|0)};U.prototype.push=function(f,e){var c,a,b=this.buffer,g;c=this.length;b[this.length++]=e;for(b[this.length++]=f;0<c;)if(a=this.getParent(c),b[c]>b[a])g=b[c],b[c]=b[a],b[a]=g,g=b[c+1],b[c+1]=b[a+1],b[a+1]=g,c=a;else break;return this.length};
|
||||
U.prototype.pop=function(){var f,e,c=this.buffer,a,b,g;e=c[0];f=c[1];this.length-=2;c[0]=c[this.length];c[1]=c[this.length+1];for(g=0;;){b=2*g+2;if(b>=this.length)break;b+2<this.length&&c[b+2]>c[b]&&(b+=2);if(c[b]>c[g])a=c[g],c[g]=c[b],c[b]=a,a=c[g+1],c[g+1]=c[b+1],c[b+1]=a;else break;g=b}return{index:f,value:e,length:this.length}};function ma(f,e){this.h=na;this.j=0;this.input=C&&f instanceof Array?new Uint8Array(f):f;this.c=0;e&&(e.lazy&&(this.j=e.lazy),"number"===typeof e.compressionType&&(this.h=e.compressionType),e.outputBuffer&&(this.a=C&&e.outputBuffer instanceof Array?new Uint8Array(e.outputBuffer):e.outputBuffer),"number"===typeof e.outputIndex&&(this.c=e.outputIndex));this.a||(this.a=new (C?Uint8Array:Array)(32768))}var na=2,V=[],$;
|
||||
for($=0;288>$;$++)switch(v){case 143>=$:V.push([$+48,8]);break;case 255>=$:V.push([$-144+400,9]);break;case 279>=$:V.push([$-256+0,7]);break;case 287>=$:V.push([$-280+192,8]);break;default:throw"invalid literal: "+$;}
|
||||
ma.prototype.g=function(){var f,e,c,a,b=this.input;switch(this.h){case 0:c=0;for(a=b.length;c<a;){e=C?b.subarray(c,c+65535):b.slice(c,c+65535);c+=e.length;var g=e,l=c===a,m=p,d=p,h=p,s=p,x=p,n=this.a,k=this.c;if(C){for(n=new Uint8Array(this.a.buffer);n.length<=k+g.length+5;)n=new Uint8Array(n.length<<1);n.set(this.a)}m=l?1:0;n[k++]=m|0;d=g.length;h=~d+65536&65535;n[k++]=d&255;n[k++]=d>>>8&255;n[k++]=h&255;n[k++]=h>>>8&255;if(C)n.set(g,k),k+=g.length,n=n.subarray(0,k);else{s=0;for(x=g.length;s<x;++s)n[k++]=
|
||||
g[s];n.length=k}this.c=k;this.a=n}break;case 1:var q=new F(C?new Uint8Array(this.a.buffer):this.a,this.c);q.b(1,1,v);q.b(1,2,v);var u=oa(this,b),w,aa,z;w=0;for(aa=u.length;w<aa;w++)if(z=u[w],F.prototype.b.apply(q,V[z]),256<z)q.b(u[++w],u[++w],v),q.b(u[++w],5),q.b(u[++w],u[++w],v);else if(256===z)break;this.a=q.finish();this.c=this.a.length;break;case na:var B=new F(C?new Uint8Array(this.a.buffer):this.a,this.c),ra,L,O,P,Q,Ha=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],W,sa,X,ta,ba,ea=Array(19),
|
||||
ua,R,ca,y,va;ra=na;B.b(1,1,v);B.b(ra,2,v);L=oa(this,b);W=pa(this.n,15);sa=qa(W);X=pa(this.m,7);ta=qa(X);for(O=286;257<O&&0===W[O-1];O--);for(P=30;1<P&&0===X[P-1];P--);var wa=O,xa=P,G=new (C?Uint32Array:Array)(wa+xa),r,I,t,Y,E=new (C?Uint32Array:Array)(316),D,A,J=new (C?Uint8Array:Array)(19);for(r=I=0;r<wa;r++)G[I++]=W[r];for(r=0;r<xa;r++)G[I++]=X[r];if(!C){r=0;for(Y=J.length;r<Y;++r)J[r]=0}r=D=0;for(Y=G.length;r<Y;r+=I){for(I=1;r+I<Y&&G[r+I]===G[r];++I);t=I;if(0===G[r])if(3>t)for(;0<t--;)E[D++]=0,
|
||||
J[0]++;else for(;0<t;)A=138>t?t:138,A>t-3&&A<t&&(A=t-3),10>=A?(E[D++]=17,E[D++]=A-3,J[17]++):(E[D++]=18,E[D++]=A-11,J[18]++),t-=A;else if(E[D++]=G[r],J[G[r]]++,t--,3>t)for(;0<t--;)E[D++]=G[r],J[G[r]]++;else for(;0<t;)A=6>t?t:6,A>t-3&&A<t&&(A=t-3),E[D++]=16,E[D++]=A-3,J[16]++,t-=A}f=C?E.subarray(0,D):E.slice(0,D);ba=pa(J,7);for(y=0;19>y;y++)ea[y]=ba[Ha[y]];for(Q=19;4<Q&&0===ea[Q-1];Q--);ua=qa(ba);B.b(O-257,5,v);B.b(P-1,5,v);B.b(Q-4,4,v);for(y=0;y<Q;y++)B.b(ea[y],3,v);y=0;for(va=f.length;y<va;y++)if(R=
|
||||
f[y],B.b(ua[R],ba[R],v),16<=R){y++;switch(R){case 16:ca=2;break;case 17:ca=3;break;case 18:ca=7;break;default:throw"invalid code: "+R;}B.b(f[y],ca,v)}var ya=[sa,W],za=[ta,X],K,Aa,Z,ha,Ba,Ca,Da,Ea;Ba=ya[0];Ca=ya[1];Da=za[0];Ea=za[1];K=0;for(Aa=L.length;K<Aa;++K)if(Z=L[K],B.b(Ba[Z],Ca[Z],v),256<Z)B.b(L[++K],L[++K],v),ha=L[++K],B.b(Da[ha],Ea[ha],v),B.b(L[++K],L[++K],v);else if(256===Z)break;this.a=B.finish();this.c=this.a.length;break;default:throw"invalid compression type";}return this.a};
|
||||
function Fa(f,e){this.length=f;this.k=e}
|
||||
var Ga=function(){function f(b){switch(v){case 3===b:return[257,b-3,0];case 4===b:return[258,b-4,0];case 5===b:return[259,b-5,0];case 6===b:return[260,b-6,0];case 7===b:return[261,b-7,0];case 8===b:return[262,b-8,0];case 9===b:return[263,b-9,0];case 10===b:return[264,b-10,0];case 12>=b:return[265,b-11,1];case 14>=b:return[266,b-13,1];case 16>=b:return[267,b-15,1];case 18>=b:return[268,b-17,1];case 22>=b:return[269,b-19,2];case 26>=b:return[270,b-23,2];case 30>=b:return[271,b-27,2];case 34>=b:return[272,
|
||||
b-31,2];case 42>=b:return[273,b-35,3];case 50>=b:return[274,b-43,3];case 58>=b:return[275,b-51,3];case 66>=b:return[276,b-59,3];case 82>=b:return[277,b-67,4];case 98>=b:return[278,b-83,4];case 114>=b:return[279,b-99,4];case 130>=b:return[280,b-115,4];case 162>=b:return[281,b-131,5];case 194>=b:return[282,b-163,5];case 226>=b:return[283,b-195,5];case 257>=b:return[284,b-227,5];case 258===b:return[285,b-258,0];default:throw"invalid length: "+b;}}var e=[],c,a;for(c=3;258>=c;c++)a=f(c),e[c]=a[2]<<24|
|
||||
a[1]<<16|a[0];return e}(),Ia=C?new Uint32Array(Ga):Ga;
|
||||
function oa(f,e){function c(b,e){var a=b.k,c=[],g=0,f;f=Ia[b.length];c[g++]=f&65535;c[g++]=f>>16&255;c[g++]=f>>24;var d;switch(v){case 1===a:d=[0,a-1,0];break;case 2===a:d=[1,a-2,0];break;case 3===a:d=[2,a-3,0];break;case 4===a:d=[3,a-4,0];break;case 6>=a:d=[4,a-5,1];break;case 8>=a:d=[5,a-7,1];break;case 12>=a:d=[6,a-9,2];break;case 16>=a:d=[7,a-13,2];break;case 24>=a:d=[8,a-17,3];break;case 32>=a:d=[9,a-25,3];break;case 48>=a:d=[10,a-33,4];break;case 64>=a:d=[11,a-49,4];break;case 96>=a:d=[12,a-
|
||||
65,5];break;case 128>=a:d=[13,a-97,5];break;case 192>=a:d=[14,a-129,6];break;case 256>=a:d=[15,a-193,6];break;case 384>=a:d=[16,a-257,7];break;case 512>=a:d=[17,a-385,7];break;case 768>=a:d=[18,a-513,8];break;case 1024>=a:d=[19,a-769,8];break;case 1536>=a:d=[20,a-1025,9];break;case 2048>=a:d=[21,a-1537,9];break;case 3072>=a:d=[22,a-2049,10];break;case 4096>=a:d=[23,a-3073,10];break;case 6144>=a:d=[24,a-4097,11];break;case 8192>=a:d=[25,a-6145,11];break;case 12288>=a:d=[26,a-8193,12];break;case 16384>=
|
||||
a:d=[27,a-12289,12];break;case 24576>=a:d=[28,a-16385,13];break;case 32768>=a:d=[29,a-24577,13];break;default:throw"invalid distance";}f=d;c[g++]=f[0];c[g++]=f[1];c[g++]=f[2];var h,l;h=0;for(l=c.length;h<l;++h)n[k++]=c[h];u[c[0]]++;w[c[3]]++;q=b.length+e-1;x=null}var a,b,g,l,m,d={},h,s,x,n=C?new Uint16Array(2*e.length):[],k=0,q=0,u=new (C?Uint32Array:Array)(286),w=new (C?Uint32Array:Array)(30),aa=f.j,z;if(!C){for(g=0;285>=g;)u[g++]=0;for(g=0;29>=g;)w[g++]=0}u[256]=1;a=0;for(b=e.length;a<b;++a){g=
|
||||
m=0;for(l=3;g<l&&a+g!==b;++g)m=m<<8|e[a+g];d[m]===p&&(d[m]=[]);h=d[m];if(!(0<q--)){for(;0<h.length&&32768<a-h[0];)h.shift();if(a+3>=b){x&&c(x,-1);g=0;for(l=b-a;g<l;++g)z=e[a+g],n[k++]=z,++u[z];break}0<h.length?(s=Ja(e,a,h),x?x.length<s.length?(z=e[a-1],n[k++]=z,++u[z],c(s,0)):c(x,-1):s.length<aa?x=s:c(s,0)):x?c(x,-1):(z=e[a],n[k++]=z,++u[z])}h.push(a)}n[k++]=256;u[256]++;f.n=u;f.m=w;return C?n.subarray(0,k):n}
|
||||
function Ja(f,e,c){var a,b,g=0,l,m,d,h,s=f.length;m=0;h=c.length;a:for(;m<h;m++){a=c[h-m-1];l=3;if(3<g){for(d=g;3<d;d--)if(f[a+d-1]!==f[e+d-1])continue a;l=g}for(;258>l&&e+l<s&&f[a+l]===f[e+l];)++l;l>g&&(b=a,g=l);if(258===l)break}return new Fa(g,e-b)}
|
||||
function pa(f,e){var c=f.length,a=new U(572),b=new (C?Uint8Array:Array)(c),g,l,m,d,h;if(!C)for(d=0;d<c;d++)b[d]=0;for(d=0;d<c;++d)0<f[d]&&a.push(d,f[d]);g=Array(a.length/2);l=new (C?Uint32Array:Array)(a.length/2);if(1===g.length)return b[a.pop().index]=1,b;d=0;for(h=a.length/2;d<h;++d)g[d]=a.pop(),l[d]=g[d].value;m=Ka(l,l.length,e);d=0;for(h=g.length;d<h;++d)b[g[d].index]=m[d];return b}
|
||||
function Ka(f,e,c){function a(b){var c=d[b][h[b]];c===e?(a(b+1),a(b+1)):--l[c];++h[b]}var b=new (C?Uint16Array:Array)(c),g=new (C?Uint8Array:Array)(c),l=new (C?Uint8Array:Array)(e),m=Array(c),d=Array(c),h=Array(c),s=(1<<c)-e,x=1<<c-1,n,k,q,u,w;b[c-1]=e;for(k=0;k<c;++k)s<x?g[k]=0:(g[k]=1,s-=x),s<<=1,b[c-2-k]=(b[c-1-k]/2|0)+e;b[0]=g[0];m[0]=Array(b[0]);d[0]=Array(b[0]);for(k=1;k<c;++k)b[k]>2*b[k-1]+g[k]&&(b[k]=2*b[k-1]+g[k]),m[k]=Array(b[k]),d[k]=Array(b[k]);for(n=0;n<e;++n)l[n]=c;for(q=0;q<b[c-1];++q)m[c-
|
||||
1][q]=f[q],d[c-1][q]=q;for(n=0;n<c;++n)h[n]=0;1===g[c-1]&&(--l[0],++h[c-1]);for(k=c-2;0<=k;--k){u=n=0;w=h[k+1];for(q=0;q<b[k];q++)u=m[k+1][w]+m[k+1][w+1],u>f[n]?(m[k][q]=u,d[k][q]=e,w+=2):(m[k][q]=f[n],d[k][q]=n,++n);h[k]=0;1===g[k]&&a(k)}return l}
|
||||
function qa(f){var e=new (C?Uint16Array:Array)(f.length),c=[],a=[],b=0,g,l,m,d;g=0;for(l=f.length;g<l;g++)c[f[g]]=(c[f[g]]|0)+1;g=1;for(l=16;g<=l;g++)a[g]=b,b+=c[g]|0,b<<=1;g=0;for(l=f.length;g<l;g++){b=a[f[g]];a[f[g]]+=1;m=e[g]=0;for(d=f[g];m<d;m++)e[g]=e[g]<<1|b&1,b>>>=1}return e};function La(f,e){this.input=f;this.c=this.i=0;this.d={};e&&(e.flags&&(this.d=e.flags),"string"===typeof e.filename&&(this.filename=e.filename),"string"===typeof e.comment&&(this.l=e.comment),e.deflateOptions&&(this.e=e.deflateOptions));this.e||(this.e={})}
|
||||
La.prototype.g=function(){var f,e,c,a,b,g,l,m,d=new (C?Uint8Array:Array)(32768),h=0,s=this.input,x=this.i,n=this.filename,k=this.l;d[h++]=31;d[h++]=139;d[h++]=8;f=0;this.d.fname&&(f|=Ma);this.d.fcomment&&(f|=Na);this.d.fhcrc&&(f|=Oa);d[h++]=f;e=(Date.now?Date.now():+new Date)/1E3|0;d[h++]=e&255;d[h++]=e>>>8&255;d[h++]=e>>>16&255;d[h++]=e>>>24&255;d[h++]=0;d[h++]=Pa;if(this.d.fname!==p){l=0;for(m=n.length;l<m;++l)g=n.charCodeAt(l),255<g&&(d[h++]=g>>>8&255),d[h++]=g&255;d[h++]=0}if(this.d.comment){l=
|
||||
0;for(m=k.length;l<m;++l)g=k.charCodeAt(l),255<g&&(d[h++]=g>>>8&255),d[h++]=g&255;d[h++]=0}this.d.fhcrc&&(c=ka(d,0,h)&65535,d[h++]=c&255,d[h++]=c>>>8&255);this.e.outputBuffer=d;this.e.outputIndex=h;b=new ma(s,this.e);d=b.g();h=b.c;C&&(h+8>d.buffer.byteLength?(this.a=new Uint8Array(h+8),this.a.set(new Uint8Array(d.buffer)),d=this.a):d=new Uint8Array(d.buffer));a=ka(s,p,p);d[h++]=a&255;d[h++]=a>>>8&255;d[h++]=a>>>16&255;d[h++]=a>>>24&255;m=s.length;d[h++]=m&255;d[h++]=m>>>8&255;d[h++]=m>>>16&255;d[h++]=
|
||||
m>>>24&255;this.i=x;C&&h<d.length&&(this.a=d=d.subarray(0,h));return d};var Pa=255,Oa=2,Ma=8,Na=16;fa("Zlib.Gzip",La);fa("Zlib.Gzip.prototype.compress",La.prototype.g);}).call(this);
|
||||
File diff suppressed because one or more lines are too long
15
ControlPanel/js/zlib/inflate.min.js
vendored
15
ControlPanel/js/zlib/inflate.min.js
vendored
|
|
@ -1,15 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';var m=this;function q(c,d){var a=c.split("."),b=m;!(a[0]in b)&&b.execScript&&b.execScript("var "+a[0]);for(var e;a.length&&(e=a.shift());)!a.length&&void 0!==d?b[e]=d:b=b[e]?b[e]:b[e]={}};var s="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function t(c){var d=c.length,a=0,b=Number.POSITIVE_INFINITY,e,f,g,h,k,l,p,n,r,K;for(n=0;n<d;++n)c[n]>a&&(a=c[n]),c[n]<b&&(b=c[n]);e=1<<a;f=new (s?Uint32Array:Array)(e);g=1;h=0;for(k=2;g<=a;){for(n=0;n<d;++n)if(c[n]===g){l=0;p=h;for(r=0;r<g;++r)l=l<<1|p&1,p>>=1;K=g<<16|n;for(r=l;r<e;r+=k)f[r]=K;++h}++g;h<<=1;k<<=1}return[f,a,b]};function u(c,d){this.g=[];this.h=32768;this.d=this.f=this.a=this.l=0;this.input=s?new Uint8Array(c):c;this.m=!1;this.i=v;this.s=!1;if(d||!(d={}))d.index&&(this.a=d.index),d.bufferSize&&(this.h=d.bufferSize),d.bufferType&&(this.i=d.bufferType),d.resize&&(this.s=d.resize);switch(this.i){case w:this.b=32768;this.c=new (s?Uint8Array:Array)(32768+this.h+258);break;case v:this.b=0;this.c=new (s?Uint8Array:Array)(this.h);this.e=this.A;this.n=this.w;this.j=this.z;break;default:throw Error("invalid inflate mode");
|
||||
}}var w=0,v=1,x={u:w,t:v};
|
||||
u.prototype.k=function(){for(;!this.m;){var c=y(this,3);c&1&&(this.m=!0);c>>>=1;switch(c){case 0:var d=this.input,a=this.a,b=this.c,e=this.b,f=d.length,g=void 0,h=void 0,k=b.length,l=void 0;this.d=this.f=0;if(a+1>=f)throw Error("invalid uncompressed block header: LEN");g=d[a++]|d[a++]<<8;if(a+1>=f)throw Error("invalid uncompressed block header: NLEN");h=d[a++]|d[a++]<<8;if(g===~h)throw Error("invalid uncompressed block header: length verify");if(a+g>d.length)throw Error("input buffer is broken");switch(this.i){case w:for(;e+
|
||||
g>b.length;){l=k-e;g-=l;if(s)b.set(d.subarray(a,a+l),e),e+=l,a+=l;else for(;l--;)b[e++]=d[a++];this.b=e;b=this.e();e=this.b}break;case v:for(;e+g>b.length;)b=this.e({p:2});break;default:throw Error("invalid inflate mode");}if(s)b.set(d.subarray(a,a+g),e),e+=g,a+=g;else for(;g--;)b[e++]=d[a++];this.a=a;this.b=e;this.c=b;break;case 1:this.j(z,A);break;case 2:B(this);break;default:throw Error("unknown BTYPE: "+c);}}return this.n()};
|
||||
var C=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],D=s?new Uint16Array(C):C,E=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],F=s?new Uint16Array(E):E,G=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],H=s?new Uint8Array(G):G,I=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],J=s?new Uint16Array(I):I,L=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,
|
||||
13],M=s?new Uint8Array(L):L,N=new (s?Uint8Array:Array)(288),O,P;O=0;for(P=N.length;O<P;++O)N[O]=143>=O?8:255>=O?9:279>=O?7:8;var z=t(N),Q=new (s?Uint8Array:Array)(30),R,S;R=0;for(S=Q.length;R<S;++R)Q[R]=5;var A=t(Q);function y(c,d){for(var a=c.f,b=c.d,e=c.input,f=c.a,g=e.length,h;b<d;){if(f>=g)throw Error("input buffer is broken");a|=e[f++]<<b;b+=8}h=a&(1<<d)-1;c.f=a>>>d;c.d=b-d;c.a=f;return h}
|
||||
function T(c,d){for(var a=c.f,b=c.d,e=c.input,f=c.a,g=e.length,h=d[0],k=d[1],l,p;b<k&&!(f>=g);)a|=e[f++]<<b,b+=8;l=h[a&(1<<k)-1];p=l>>>16;c.f=a>>p;c.d=b-p;c.a=f;return l&65535}
|
||||
function B(c){function d(a,c,b){var d,e=this.q,f,g;for(g=0;g<a;)switch(d=T(this,c),d){case 16:for(f=3+y(this,2);f--;)b[g++]=e;break;case 17:for(f=3+y(this,3);f--;)b[g++]=0;e=0;break;case 18:for(f=11+y(this,7);f--;)b[g++]=0;e=0;break;default:e=b[g++]=d}this.q=e;return b}var a=y(c,5)+257,b=y(c,5)+1,e=y(c,4)+4,f=new (s?Uint8Array:Array)(D.length),g,h,k,l;for(l=0;l<e;++l)f[D[l]]=y(c,3);if(!s){l=e;for(e=f.length;l<e;++l)f[D[l]]=0}g=t(f);h=new (s?Uint8Array:Array)(a);k=new (s?Uint8Array:Array)(b);c.q=0;
|
||||
c.j(t(d.call(c,a,g,h)),t(d.call(c,b,g,k)))}u.prototype.j=function(c,d){var a=this.c,b=this.b;this.o=c;for(var e=a.length-258,f,g,h,k;256!==(f=T(this,c));)if(256>f)b>=e&&(this.b=b,a=this.e(),b=this.b),a[b++]=f;else{g=f-257;k=F[g];0<H[g]&&(k+=y(this,H[g]));f=T(this,d);h=J[f];0<M[f]&&(h+=y(this,M[f]));b>=e&&(this.b=b,a=this.e(),b=this.b);for(;k--;)a[b]=a[b++-h]}for(;8<=this.d;)this.d-=8,this.a--;this.b=b};
|
||||
u.prototype.z=function(c,d){var a=this.c,b=this.b;this.o=c;for(var e=a.length,f,g,h,k;256!==(f=T(this,c));)if(256>f)b>=e&&(a=this.e(),e=a.length),a[b++]=f;else{g=f-257;k=F[g];0<H[g]&&(k+=y(this,H[g]));f=T(this,d);h=J[f];0<M[f]&&(h+=y(this,M[f]));b+k>e&&(a=this.e(),e=a.length);for(;k--;)a[b]=a[b++-h]}for(;8<=this.d;)this.d-=8,this.a--;this.b=b};
|
||||
u.prototype.e=function(){var c=new (s?Uint8Array:Array)(this.b-32768),d=this.b-32768,a,b,e=this.c;if(s)c.set(e.subarray(32768,c.length));else{a=0;for(b=c.length;a<b;++a)c[a]=e[a+32768]}this.g.push(c);this.l+=c.length;if(s)e.set(e.subarray(d,d+32768));else for(a=0;32768>a;++a)e[a]=e[d+a];this.b=32768;return e};
|
||||
u.prototype.A=function(c){var d,a=this.input.length/this.a+1|0,b,e,f,g=this.input,h=this.c;c&&("number"===typeof c.p&&(a=c.p),"number"===typeof c.v&&(a+=c.v));2>a?(b=(g.length-this.a)/this.o[2],f=258*(b/2)|0,e=f<h.length?h.length+f:h.length<<1):e=h.length*a;s?(d=new Uint8Array(e),d.set(h)):d=h;return this.c=d};
|
||||
u.prototype.n=function(){var c=0,d=this.c,a=this.g,b,e=new (s?Uint8Array:Array)(this.l+(this.b-32768)),f,g,h,k;if(0===a.length)return s?this.c.subarray(32768,this.b):this.c.slice(32768,this.b);f=0;for(g=a.length;f<g;++f){b=a[f];h=0;for(k=b.length;h<k;++h)e[c++]=b[h]}f=32768;for(g=this.b;f<g;++f)e[c++]=d[f];this.g=[];return this.buffer=e};
|
||||
u.prototype.w=function(){var c,d=this.b;s?this.s?(c=new Uint8Array(d),c.set(this.c.subarray(0,d))):c=this.c.subarray(0,d):(this.c.length>d&&(this.c.length=d),c=this.c);return this.buffer=c};function U(c,d){var a,b;this.input=c;this.a=0;if(d||!(d={}))d.index&&(this.a=d.index),d.verify&&(this.B=d.verify);a=c[this.a++];b=c[this.a++];switch(a&15){case V:this.method=V;break;default:throw Error("unsupported compression method");}if(0!==((a<<8)+b)%31)throw Error("invalid fcheck flag:"+((a<<8)+b)%31);if(b&32)throw Error("fdict flag is not supported");this.r=new u(c,{index:this.a,bufferSize:d.bufferSize,bufferType:d.bufferType,resize:d.resize})}
|
||||
U.prototype.k=function(){var c=this.input,d,a;d=this.r.k();this.a=this.r.a;if(this.B){a=(c[this.a++]<<24|c[this.a++]<<16|c[this.a++]<<8|c[this.a++])>>>0;var b=d;if("string"===typeof b){var e=b.split(""),f,g;f=0;for(g=e.length;f<g;f++)e[f]=(e[f].charCodeAt(0)&255)>>>0;b=e}for(var h=1,k=0,l=b.length,p,n=0;0<l;){p=1024<l?1024:l;l-=p;do h+=b[n++],k+=h;while(--p);h%=65521;k%=65521}if(a!==(k<<16|h)>>>0)throw Error("invalid adler-32 checksum");}return d};var V=8;q("Zlib.Inflate",U);q("Zlib.Inflate.prototype.decompress",U.prototype.k);var W={ADAPTIVE:x.t,BLOCK:x.u},X,Y,Z,$;if(Object.keys)X=Object.keys(W);else for(Y in X=[],Z=0,W)X[Z++]=Y;Z=0;for($=X.length;Z<$;++Z)Y=X[Z],q("Zlib.Inflate.BufferType."+Y,W[Y]);}).call(this); //@ sourceMappingURL=inflate.min.js.map
|
||||
File diff suppressed because one or more lines are too long
13
ControlPanel/js/zlib/inflate_stream.min.js
vendored
13
ControlPanel/js/zlib/inflate_stream.min.js
vendored
|
|
@ -1,13 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';var m=void 0,p=!0,s=this;function t(a,d){var b=a.split("."),c=s;!(b[0]in c)&&c.execScript&&c.execScript("var "+b[0]);for(var e;b.length&&(e=b.shift());)!b.length&&d!==m?c[e]=d:c=c[e]?c[e]:c[e]={}};var u="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function v(a){var d=a.length,b=0,c=Number.POSITIVE_INFINITY,e,g,f,l,h,k,n,q,r,w;for(q=0;q<d;++q)a[q]>b&&(b=a[q]),a[q]<c&&(c=a[q]);e=1<<b;g=new (u?Uint32Array:Array)(e);f=1;l=0;for(h=2;f<=b;){for(q=0;q<d;++q)if(a[q]===f){k=0;n=l;for(r=0;r<f;++r)k=k<<1|n&1,n>>=1;w=f<<16|q;for(r=k;r<e;r+=h)g[r]=w;++l}++f;l<<=1;h<<=1}return[g,b,c]};function y(a,d,b){this.w=[];this.t=b?b:32768;this.z=0;this.a=d===m?0:d;this.d=this.e=0;this.input=u?new Uint8Array(a):a;this.c=new (u?Uint8Array:Array)(this.t);this.b=0;this.v=this.l=!1;this.g=0;this.status=A}var A=0;
|
||||
y.prototype.i=function(a,d){var b=!1;a!==m&&(this.input=a);d!==m&&(this.a=d);for(;!b;)switch(this.status){case A:case 1:var c;var e=m;this.status=1;C(this);if(0>(e=D(this,3)))E(this),c=-1;else{e&1&&(this.l=p);e>>>=1;switch(e){case 0:this.h=0;break;case 1:this.h=1;break;case 2:this.h=2;break;default:throw Error("unknown BTYPE: "+e);}this.status=2;c=m}0>c&&(b=p);break;case 2:case 3:switch(this.h){case 0:var g;var f=m,l=m,h=this.input,k=this.a;this.status=3;if(k+4>=h.length)g=-1;else{f=h[k++]|h[k++]<<
|
||||
8;l=h[k++]|h[k++]<<8;if(f===~l)throw Error("invalid uncompressed block header: length verify");this.d=this.e=0;this.a=k;this.m=f;this.status=4;g=m}0>g&&(b=p);break;case 1:this.status=3;this.k=F;this.n=G;this.status=4;break;case 2:0>I(this)&&(b=p)}break;case 4:case 5:switch(this.h){case 0:var n;a:{var q=this.input,r=this.a,w=this.c,B=this.b,H=this.m;for(this.status=5;H--;){B===w.length&&(w=J(this,{o:2}));if(r>=q.length){this.a=r;this.b=B;this.m=H+1;n=-1;break a}w[B++]=q[r++]}0>H&&(this.status=6);this.a=
|
||||
r;this.b=B;n=0}0>n&&(b=p);break;case 1:case 2:0>K(this)&&(b=p)}break;case 6:this.l?b=p:this.status=A}var z,x=this.b;this.v?u?(z=new Uint8Array(x),z.set(this.c.subarray(this.g,x))):z=this.c.slice(this.g,x):z=u?this.c.subarray(this.g,x):this.c.slice(this.g,x);this.buffer=z;this.g=x;return this.buffer};
|
||||
var L=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],M=u?new Uint16Array(L):L,N=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],aa=u?new Uint16Array(N):N,O=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],P=u?new Uint8Array(O):O,Q=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],ba=u?new Uint16Array(Q):Q,R=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,
|
||||
13,13],S=u?new Uint8Array(R):R,T=new (u?Uint8Array:Array)(288),U,V;U=0;for(V=T.length;U<V;++U)T[U]=143>=U?8:255>=U?9:279>=U?7:8;var F=v(T),W=new (u?Uint8Array:Array)(30),X,Y;X=0;for(Y=W.length;X<Y;++X)W[X]=5;var G=v(W);function D(a,d){for(var b=a.e,c=a.d,e=a.input,g=a.a,f;c<d;){if(e.length<=g)return-1;f=e[g++];b|=f<<c;c+=8}f=b&(1<<d)-1;a.e=b>>>d;a.d=c-d;a.a=g;return f}
|
||||
function Z(a,d){for(var b=a.e,c=a.d,e=a.input,g=a.a,f=d[0],l=d[1],h,k,n;c<l;){if(e.length<=g)return-1;h=e[g++];b|=h<<c;c+=8}k=f[b&(1<<l)-1];n=k>>>16;a.e=b>>n;a.d=c-n;a.a=g;return k&65535}function C(a){a.u=a.a;a.s=a.d;a.r=a.e}function E(a){a.a=a.u;a.d=a.s;a.e=a.r}
|
||||
function I(a){function d(){function a(b,c,d){var e,f=this.p,g,h,k;for(h=0;h<b;){e=Z(this,c);if(0>e)throw Error("not enough input");switch(e){case 16:if(0>(k=D(this,2)))throw Error("not enough input");for(g=3+k;g--;)d[h++]=f;break;case 17:if(0>(k=D(this,3)))throw Error("not enough input");for(g=3+k;g--;)d[h++]=0;f=0;break;case 18:if(0>(k=D(this,7)))throw Error("not enough input");for(g=11+k;g--;)d[h++]=0;f=0;break;default:f=d[h++]=e}}this.p=f;return d}var d;for(k=0;k<e;++k){if(0>(d=D(this,3)))throw Error("not enough input");
|
||||
g[M[k]]=d}f=v(g);l=new (u?Uint8Array:Array)(b);h=new (u?Uint8Array:Array)(c);this.p=0;this.k=v(a.call(this,b,f,l));this.n=v(a.call(this,c,f,h))}var b,c,e,g=new (u?Uint8Array:Array)(M.length),f,l,h,k=0;a.status=3;C(a);b=D(a,5)+257;c=D(a,5)+1;e=D(a,4)+4;if(0>b||0>c||0>e)return E(a),-1;try{d.call(a)}catch(n){return E(a),-1}a.status=4;return 0}
|
||||
function K(a){var d=a.c,b=a.b,c,e,g,f,l=a.k,h=a.n,k=d.length,n;for(a.status=5;;){C(a);c=Z(a,l);if(0>c)return a.b=b,E(a),-1;if(256===c)break;if(256>c)b===k&&(d=J(a),k=d.length),d[b++]=c;else{e=c-257;f=aa[e];if(0<P[e]){n=D(a,P[e]);if(0>n)return a.b=b,E(a),-1;f+=n}c=Z(a,h);if(0>c)return a.b=b,E(a),-1;g=ba[c];if(0<S[c]){n=D(a,S[c]);if(0>n)return a.b=b,E(a),-1;g+=n}b+f>=k&&(d=J(a),k=d.length);for(;f--;)d[b]=d[b++-g];if(a.a===a.input.length)return a.b=b,-1}}for(;8<=a.d;)a.d-=8,a.a--;a.b=b;a.status=6}
|
||||
function J(a,d){var b,c=a.input.length/a.a+1|0,e,g,f,l=a.input,h=a.c;d&&("number"===typeof d.o&&(c=d.o),"number"===typeof d.q&&(c+=d.q));2>c?(e=(l.length-a.a)/a.k[2],f=258*(e/2)|0,g=f<h.length?h.length+f:h.length<<1):g=h.length*c;u?(b=new Uint8Array(g),b.set(h)):b=h;a.c=b;return a.c}y.prototype.j=function(){return u?this.c.subarray(0,this.b):this.c.slice(0,this.b)};function $(a){this.input=a===m?new (u?Uint8Array:Array):a;this.a=0;this.f=new y(this.input,this.a);this.c=this.f.c}
|
||||
$.prototype.i=function(a){var d;if(a!==m)if(u){var b=new Uint8Array(this.input.length+a.length);b.set(this.input,0);b.set(a,this.input.length);this.input=b}else this.input=this.input.concat(a);var c;if(c=this.method===m){var e;var g=this.a,f=this.input,l=f[g++],h=f[g++];if(l===m||h===m)e=-1;else{switch(l&15){case 8:this.method=8;break;default:throw Error("unsupported compression method");}if(0!==((l<<8)+h)%31)throw Error("invalid fcheck flag:"+((l<<8)+h)%31);if(h&32)throw Error("fdict flag is not supported");
|
||||
this.a=g;e=m}c=0>e}if(c)return new (u?Uint8Array:Array);d=this.f.i(this.input,this.a);0!==this.f.a&&(this.input=u?this.input.subarray(this.f.a):this.input.slice(this.f.a),this.a=0);return d};$.prototype.j=function(){return this.f.j()};t("Zlib.InflateStream",$);t("Zlib.InflateStream.prototype.decompress",$.prototype.i);t("Zlib.InflateStream.prototype.getBytes",$.prototype.j);}).call(this); //@ sourceMappingURL=inflate_stream.min.js.map
|
||||
File diff suppressed because one or more lines are too long
|
|
@ -1,53 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';function q(b){throw b;}var t=void 0,v=!0;var A="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function E(b,a){this.index="number"===typeof a?a:0;this.m=0;this.buffer=b instanceof(A?Uint8Array:Array)?b:new (A?Uint8Array:Array)(32768);2*this.buffer.length<=this.index&&q(Error("invalid index"));this.buffer.length<=this.index&&this.f()}E.prototype.f=function(){var b=this.buffer,a,c=b.length,d=new (A?Uint8Array:Array)(c<<1);if(A)d.set(b);else for(a=0;a<c;++a)d[a]=b[a];return this.buffer=d};
|
||||
E.prototype.d=function(b,a,c){var d=this.buffer,e=this.index,f=this.m,g=d[e],k;c&&1<a&&(b=8<a?(G[b&255]<<24|G[b>>>8&255]<<16|G[b>>>16&255]<<8|G[b>>>24&255])>>32-a:G[b]>>8-a);if(8>a+f)g=g<<a|b,f+=a;else for(k=0;k<a;++k)g=g<<1|b>>a-k-1&1,8===++f&&(f=0,d[e++]=G[g],g=0,e===d.length&&(d=this.f()));d[e]=g;this.buffer=d;this.m=f;this.index=e};E.prototype.finish=function(){var b=this.buffer,a=this.index,c;0<this.m&&(b[a]<<=8-this.m,b[a]=G[b[a]],a++);A?c=b.subarray(0,a):(b.length=a,c=b);return c};
|
||||
var aa=new (A?Uint8Array:Array)(256),J;for(J=0;256>J;++J){for(var N=J,Q=N,ba=7,N=N>>>1;N;N>>>=1)Q<<=1,Q|=N&1,--ba;aa[J]=(Q<<ba&255)>>>0}var G=aa;function R(b,a,c){var d,e="number"===typeof a?a:a=0,f="number"===typeof c?c:b.length;d=-1;for(e=f&7;e--;++a)d=d>>>8^S[(d^b[a])&255];for(e=f>>3;e--;a+=8)d=d>>>8^S[(d^b[a])&255],d=d>>>8^S[(d^b[a+1])&255],d=d>>>8^S[(d^b[a+2])&255],d=d>>>8^S[(d^b[a+3])&255],d=d>>>8^S[(d^b[a+4])&255],d=d>>>8^S[(d^b[a+5])&255],d=d>>>8^S[(d^b[a+6])&255],d=d>>>8^S[(d^b[a+7])&255];return(d^4294967295)>>>0}
|
||||
var ga=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,
|
||||
2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,
|
||||
2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,
|
||||
2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,
|
||||
3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,
|
||||
936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],S=A?new Uint32Array(ga):ga;function ha(){};function ia(b){this.buffer=new (A?Uint16Array:Array)(2*b);this.length=0}ia.prototype.getParent=function(b){return 2*((b-2)/4|0)};ia.prototype.push=function(b,a){var c,d,e=this.buffer,f;c=this.length;e[this.length++]=a;for(e[this.length++]=b;0<c;)if(d=this.getParent(c),e[c]>e[d])f=e[c],e[c]=e[d],e[d]=f,f=e[c+1],e[c+1]=e[d+1],e[d+1]=f,c=d;else break;return this.length};
|
||||
ia.prototype.pop=function(){var b,a,c=this.buffer,d,e,f;a=c[0];b=c[1];this.length-=2;c[0]=c[this.length];c[1]=c[this.length+1];for(f=0;;){e=2*f+2;if(e>=this.length)break;e+2<this.length&&c[e+2]>c[e]&&(e+=2);if(c[e]>c[f])d=c[f],c[f]=c[e],c[e]=d,d=c[f+1],c[f+1]=c[e+1],c[e+1]=d;else break;f=e}return{index:b,value:a,length:this.length}};function ja(b){var a=b.length,c=0,d=Number.POSITIVE_INFINITY,e,f,g,k,h,l,s,p,m,n;for(p=0;p<a;++p)b[p]>c&&(c=b[p]),b[p]<d&&(d=b[p]);e=1<<c;f=new (A?Uint32Array:Array)(e);g=1;k=0;for(h=2;g<=c;){for(p=0;p<a;++p)if(b[p]===g){l=0;s=k;for(m=0;m<g;++m)l=l<<1|s&1,s>>=1;n=g<<16|p;for(m=l;m<e;m+=h)f[m]=n;++k}++g;k<<=1;h<<=1}return[f,c,d]};function ma(b,a){this.k=na;this.F=0;this.input=A&&b instanceof Array?new Uint8Array(b):b;this.b=0;a&&(a.lazy&&(this.F=a.lazy),"number"===typeof a.compressionType&&(this.k=a.compressionType),a.outputBuffer&&(this.a=A&&a.outputBuffer instanceof Array?new Uint8Array(a.outputBuffer):a.outputBuffer),"number"===typeof a.outputIndex&&(this.b=a.outputIndex));this.a||(this.a=new (A?Uint8Array:Array)(32768))}var na=2,oa={NONE:0,M:1,t:na,Y:3},pa=[],T;
|
||||
for(T=0;288>T;T++)switch(v){case 143>=T:pa.push([T+48,8]);break;case 255>=T:pa.push([T-144+400,9]);break;case 279>=T:pa.push([T-256+0,7]);break;case 287>=T:pa.push([T-280+192,8]);break;default:q("invalid literal: "+T)}
|
||||
ma.prototype.h=function(){var b,a,c,d,e=this.input;switch(this.k){case 0:c=0;for(d=e.length;c<d;){a=A?e.subarray(c,c+65535):e.slice(c,c+65535);c+=a.length;var f=a,g=c===d,k=t,h=t,l=t,s=t,p=t,m=this.a,n=this.b;if(A){for(m=new Uint8Array(this.a.buffer);m.length<=n+f.length+5;)m=new Uint8Array(m.length<<1);m.set(this.a)}k=g?1:0;m[n++]=k|0;h=f.length;l=~h+65536&65535;m[n++]=h&255;m[n++]=h>>>8&255;m[n++]=l&255;m[n++]=l>>>8&255;if(A)m.set(f,n),n+=f.length,m=m.subarray(0,n);else{s=0;for(p=f.length;s<p;++s)m[n++]=
|
||||
f[s];m.length=n}this.b=n;this.a=m}break;case 1:var r=new E(A?new Uint8Array(this.a.buffer):this.a,this.b);r.d(1,1,v);r.d(1,2,v);var u=qa(this,e),x,O,y;x=0;for(O=u.length;x<O;x++)if(y=u[x],E.prototype.d.apply(r,pa[y]),256<y)r.d(u[++x],u[++x],v),r.d(u[++x],5),r.d(u[++x],u[++x],v);else if(256===y)break;this.a=r.finish();this.b=this.a.length;break;case na:var D=new E(A?new Uint8Array(this.a.buffer):this.a,this.b),Ea,P,U,V,W,qb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ca,Fa,da,Ga,ka,sa=Array(19),
|
||||
Ha,X,la,B,Ia;Ea=na;D.d(1,1,v);D.d(Ea,2,v);P=qa(this,e);ca=ra(this.V,15);Fa=ta(ca);da=ra(this.U,7);Ga=ta(da);for(U=286;257<U&&0===ca[U-1];U--);for(V=30;1<V&&0===da[V-1];V--);var Ja=U,Ka=V,I=new (A?Uint32Array:Array)(Ja+Ka),w,K,z,ea,H=new (A?Uint32Array:Array)(316),F,C,L=new (A?Uint8Array:Array)(19);for(w=K=0;w<Ja;w++)I[K++]=ca[w];for(w=0;w<Ka;w++)I[K++]=da[w];if(!A){w=0;for(ea=L.length;w<ea;++w)L[w]=0}w=F=0;for(ea=I.length;w<ea;w+=K){for(K=1;w+K<ea&&I[w+K]===I[w];++K);z=K;if(0===I[w])if(3>z)for(;0<
|
||||
z--;)H[F++]=0,L[0]++;else for(;0<z;)C=138>z?z:138,C>z-3&&C<z&&(C=z-3),10>=C?(H[F++]=17,H[F++]=C-3,L[17]++):(H[F++]=18,H[F++]=C-11,L[18]++),z-=C;else if(H[F++]=I[w],L[I[w]]++,z--,3>z)for(;0<z--;)H[F++]=I[w],L[I[w]]++;else for(;0<z;)C=6>z?z:6,C>z-3&&C<z&&(C=z-3),H[F++]=16,H[F++]=C-3,L[16]++,z-=C}b=A?H.subarray(0,F):H.slice(0,F);ka=ra(L,7);for(B=0;19>B;B++)sa[B]=ka[qb[B]];for(W=19;4<W&&0===sa[W-1];W--);Ha=ta(ka);D.d(U-257,5,v);D.d(V-1,5,v);D.d(W-4,4,v);for(B=0;B<W;B++)D.d(sa[B],3,v);B=0;for(Ia=b.length;B<
|
||||
Ia;B++)if(X=b[B],D.d(Ha[X],ka[X],v),16<=X){B++;switch(X){case 16:la=2;break;case 17:la=3;break;case 18:la=7;break;default:q("invalid code: "+X)}D.d(b[B],la,v)}var La=[Fa,ca],Ma=[Ga,da],M,Na,fa,va,Oa,Pa,Qa,Ra;Oa=La[0];Pa=La[1];Qa=Ma[0];Ra=Ma[1];M=0;for(Na=P.length;M<Na;++M)if(fa=P[M],D.d(Oa[fa],Pa[fa],v),256<fa)D.d(P[++M],P[++M],v),va=P[++M],D.d(Qa[va],Ra[va],v),D.d(P[++M],P[++M],v);else if(256===fa)break;this.a=D.finish();this.b=this.a.length;break;default:q("invalid compression type")}return this.a};
|
||||
function ua(b,a){this.length=b;this.O=a}
|
||||
var wa=function(){function b(a){switch(v){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,
|
||||
a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:q("invalid length: "+a)}}var a=[],c,d;for(c=3;258>=c;c++)d=b(c),a[c]=d[2]<<24|d[1]<<
|
||||
16|d[0];return a}(),xa=A?new Uint32Array(wa):wa;
|
||||
function qa(b,a){function c(a,c){var b=a.O,d=[],f=0,e;e=xa[a.length];d[f++]=e&65535;d[f++]=e>>16&255;d[f++]=e>>24;var g;switch(v){case 1===b:g=[0,b-1,0];break;case 2===b:g=[1,b-2,0];break;case 3===b:g=[2,b-3,0];break;case 4===b:g=[3,b-4,0];break;case 6>=b:g=[4,b-5,1];break;case 8>=b:g=[5,b-7,1];break;case 12>=b:g=[6,b-9,2];break;case 16>=b:g=[7,b-13,2];break;case 24>=b:g=[8,b-17,3];break;case 32>=b:g=[9,b-25,3];break;case 48>=b:g=[10,b-33,4];break;case 64>=b:g=[11,b-49,4];break;case 96>=b:g=[12,b-
|
||||
65,5];break;case 128>=b:g=[13,b-97,5];break;case 192>=b:g=[14,b-129,6];break;case 256>=b:g=[15,b-193,6];break;case 384>=b:g=[16,b-257,7];break;case 512>=b:g=[17,b-385,7];break;case 768>=b:g=[18,b-513,8];break;case 1024>=b:g=[19,b-769,8];break;case 1536>=b:g=[20,b-1025,9];break;case 2048>=b:g=[21,b-1537,9];break;case 3072>=b:g=[22,b-2049,10];break;case 4096>=b:g=[23,b-3073,10];break;case 6144>=b:g=[24,b-4097,11];break;case 8192>=b:g=[25,b-6145,11];break;case 12288>=b:g=[26,b-8193,12];break;case 16384>=
|
||||
b:g=[27,b-12289,12];break;case 24576>=b:g=[28,b-16385,13];break;case 32768>=b:g=[29,b-24577,13];break;default:q("invalid distance")}e=g;d[f++]=e[0];d[f++]=e[1];d[f++]=e[2];var h,k;h=0;for(k=d.length;h<k;++h)m[n++]=d[h];u[d[0]]++;x[d[3]]++;r=a.length+c-1;p=null}var d,e,f,g,k,h={},l,s,p,m=A?new Uint16Array(2*a.length):[],n=0,r=0,u=new (A?Uint32Array:Array)(286),x=new (A?Uint32Array:Array)(30),O=b.F,y;if(!A){for(f=0;285>=f;)u[f++]=0;for(f=0;29>=f;)x[f++]=0}u[256]=1;d=0;for(e=a.length;d<e;++d){f=k=0;
|
||||
for(g=3;f<g&&d+f!==e;++f)k=k<<8|a[d+f];h[k]===t&&(h[k]=[]);l=h[k];if(!(0<r--)){for(;0<l.length&&32768<d-l[0];)l.shift();if(d+3>=e){p&&c(p,-1);f=0;for(g=e-d;f<g;++f)y=a[d+f],m[n++]=y,++u[y];break}0<l.length?(s=ya(a,d,l),p?p.length<s.length?(y=a[d-1],m[n++]=y,++u[y],c(s,0)):c(p,-1):s.length<O?p=s:c(s,0)):p?c(p,-1):(y=a[d],m[n++]=y,++u[y])}l.push(d)}m[n++]=256;u[256]++;b.V=u;b.U=x;return A?m.subarray(0,n):m}
|
||||
function ya(b,a,c){var d,e,f=0,g,k,h,l,s=b.length;k=0;l=c.length;a:for(;k<l;k++){d=c[l-k-1];g=3;if(3<f){for(h=f;3<h;h--)if(b[d+h-1]!==b[a+h-1])continue a;g=f}for(;258>g&&a+g<s&&b[d+g]===b[a+g];)++g;g>f&&(e=d,f=g);if(258===g)break}return new ua(f,a-e)}
|
||||
function ra(b,a){var c=b.length,d=new ia(572),e=new (A?Uint8Array:Array)(c),f,g,k,h,l;if(!A)for(h=0;h<c;h++)e[h]=0;for(h=0;h<c;++h)0<b[h]&&d.push(h,b[h]);f=Array(d.length/2);g=new (A?Uint32Array:Array)(d.length/2);if(1===f.length)return e[d.pop().index]=1,e;h=0;for(l=d.length/2;h<l;++h)f[h]=d.pop(),g[h]=f[h].value;k=za(g,g.length,a);h=0;for(l=f.length;h<l;++h)e[f[h].index]=k[h];return e}
|
||||
function za(b,a,c){function d(b){var c=h[b][l[b]];c===a?(d(b+1),d(b+1)):--g[c];++l[b]}var e=new (A?Uint16Array:Array)(c),f=new (A?Uint8Array:Array)(c),g=new (A?Uint8Array:Array)(a),k=Array(c),h=Array(c),l=Array(c),s=(1<<c)-a,p=1<<c-1,m,n,r,u,x;e[c-1]=a;for(n=0;n<c;++n)s<p?f[n]=0:(f[n]=1,s-=p),s<<=1,e[c-2-n]=(e[c-1-n]/2|0)+a;e[0]=f[0];k[0]=Array(e[0]);h[0]=Array(e[0]);for(n=1;n<c;++n)e[n]>2*e[n-1]+f[n]&&(e[n]=2*e[n-1]+f[n]),k[n]=Array(e[n]),h[n]=Array(e[n]);for(m=0;m<a;++m)g[m]=c;for(r=0;r<e[c-1];++r)k[c-
|
||||
1][r]=b[r],h[c-1][r]=r;for(m=0;m<c;++m)l[m]=0;1===f[c-1]&&(--g[0],++l[c-1]);for(n=c-2;0<=n;--n){u=m=0;x=l[n+1];for(r=0;r<e[n];r++)u=k[n+1][x]+k[n+1][x+1],u>b[m]?(k[n][r]=u,h[n][r]=a,x+=2):(k[n][r]=b[m],h[n][r]=m,++m);l[n]=0;1===f[n]&&d(n)}return g}
|
||||
function ta(b){var a=new (A?Uint16Array:Array)(b.length),c=[],d=[],e=0,f,g,k,h;f=0;for(g=b.length;f<g;f++)c[b[f]]=(c[b[f]]|0)+1;f=1;for(g=16;f<=g;f++)d[f]=e,e+=c[f]|0,e<<=1;f=0;for(g=b.length;f<g;f++){e=d[b[f]];d[b[f]]+=1;k=a[f]=0;for(h=b[f];k<h;k++)a[f]=a[f]<<1|e&1,e>>>=1}return a};function Aa(b,a){this.input=b;this.b=this.c=0;this.g={};a&&(a.flags&&(this.g=a.flags),"string"===typeof a.filename&&(this.filename=a.filename),"string"===typeof a.comment&&(this.w=a.comment),a.deflateOptions&&(this.l=a.deflateOptions));this.l||(this.l={})}
|
||||
Aa.prototype.h=function(){var b,a,c,d,e,f,g,k,h=new (A?Uint8Array:Array)(32768),l=0,s=this.input,p=this.c,m=this.filename,n=this.w;h[l++]=31;h[l++]=139;h[l++]=8;b=0;this.g.fname&&(b|=Ba);this.g.fcomment&&(b|=Ca);this.g.fhcrc&&(b|=Da);h[l++]=b;a=(Date.now?Date.now():+new Date)/1E3|0;h[l++]=a&255;h[l++]=a>>>8&255;h[l++]=a>>>16&255;h[l++]=a>>>24&255;h[l++]=0;h[l++]=Sa;if(this.g.fname!==t){g=0;for(k=m.length;g<k;++g)f=m.charCodeAt(g),255<f&&(h[l++]=f>>>8&255),h[l++]=f&255;h[l++]=0}if(this.g.comment){g=
|
||||
0;for(k=n.length;g<k;++g)f=n.charCodeAt(g),255<f&&(h[l++]=f>>>8&255),h[l++]=f&255;h[l++]=0}this.g.fhcrc&&(c=R(h,0,l)&65535,h[l++]=c&255,h[l++]=c>>>8&255);this.l.outputBuffer=h;this.l.outputIndex=l;e=new ma(s,this.l);h=e.h();l=e.b;A&&(l+8>h.buffer.byteLength?(this.a=new Uint8Array(l+8),this.a.set(new Uint8Array(h.buffer)),h=this.a):h=new Uint8Array(h.buffer));d=R(s,t,t);h[l++]=d&255;h[l++]=d>>>8&255;h[l++]=d>>>16&255;h[l++]=d>>>24&255;k=s.length;h[l++]=k&255;h[l++]=k>>>8&255;h[l++]=k>>>16&255;h[l++]=
|
||||
k>>>24&255;this.c=p;A&&l<h.length&&(this.a=h=h.subarray(0,l));return h};var Sa=255,Da=2,Ba=8,Ca=16;function Y(b,a){this.o=[];this.p=32768;this.e=this.j=this.c=this.s=0;this.input=A?new Uint8Array(b):b;this.u=!1;this.q=Ta;this.L=!1;if(a||!(a={}))a.index&&(this.c=a.index),a.bufferSize&&(this.p=a.bufferSize),a.bufferType&&(this.q=a.bufferType),a.resize&&(this.L=a.resize);switch(this.q){case Ua:this.b=32768;this.a=new (A?Uint8Array:Array)(32768+this.p+258);break;case Ta:this.b=0;this.a=new (A?Uint8Array:Array)(this.p);this.f=this.T;this.z=this.P;this.r=this.R;break;default:q(Error("invalid inflate mode"))}}
|
||||
var Ua=0,Ta=1;
|
||||
Y.prototype.i=function(){for(;!this.u;){var b=Z(this,3);b&1&&(this.u=v);b>>>=1;switch(b){case 0:var a=this.input,c=this.c,d=this.a,e=this.b,f=a.length,g=t,k=t,h=d.length,l=t;this.e=this.j=0;c+1>=f&&q(Error("invalid uncompressed block header: LEN"));g=a[c++]|a[c++]<<8;c+1>=f&&q(Error("invalid uncompressed block header: NLEN"));k=a[c++]|a[c++]<<8;g===~k&&q(Error("invalid uncompressed block header: length verify"));c+g>a.length&&q(Error("input buffer is broken"));switch(this.q){case Ua:for(;e+g>d.length;){l=
|
||||
h-e;g-=l;if(A)d.set(a.subarray(c,c+l),e),e+=l,c+=l;else for(;l--;)d[e++]=a[c++];this.b=e;d=this.f();e=this.b}break;case Ta:for(;e+g>d.length;)d=this.f({B:2});break;default:q(Error("invalid inflate mode"))}if(A)d.set(a.subarray(c,c+g),e),e+=g,c+=g;else for(;g--;)d[e++]=a[c++];this.c=c;this.b=e;this.a=d;break;case 1:this.r(Va,Wa);break;case 2:Xa(this);break;default:q(Error("unknown BTYPE: "+b))}}return this.z()};
|
||||
var Ya=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Za=A?new Uint16Array(Ya):Ya,$a=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],ab=A?new Uint16Array($a):$a,bb=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],cb=A?new Uint8Array(bb):bb,db=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],eb=A?new Uint16Array(db):db,fb=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,
|
||||
10,11,11,12,12,13,13],gb=A?new Uint8Array(fb):fb,hb=new (A?Uint8Array:Array)(288),$,ib;$=0;for(ib=hb.length;$<ib;++$)hb[$]=143>=$?8:255>=$?9:279>=$?7:8;var Va=ja(hb),jb=new (A?Uint8Array:Array)(30),kb,lb;kb=0;for(lb=jb.length;kb<lb;++kb)jb[kb]=5;var Wa=ja(jb);function Z(b,a){for(var c=b.j,d=b.e,e=b.input,f=b.c,g=e.length,k;d<a;)f>=g&&q(Error("input buffer is broken")),c|=e[f++]<<d,d+=8;k=c&(1<<a)-1;b.j=c>>>a;b.e=d-a;b.c=f;return k}
|
||||
function mb(b,a){for(var c=b.j,d=b.e,e=b.input,f=b.c,g=e.length,k=a[0],h=a[1],l,s;d<h&&!(f>=g);)c|=e[f++]<<d,d+=8;l=k[c&(1<<h)-1];s=l>>>16;b.j=c>>s;b.e=d-s;b.c=f;return l&65535}
|
||||
function Xa(b){function a(a,b,c){var d,e=this.I,f,g;for(g=0;g<a;)switch(d=mb(this,b),d){case 16:for(f=3+Z(this,2);f--;)c[g++]=e;break;case 17:for(f=3+Z(this,3);f--;)c[g++]=0;e=0;break;case 18:for(f=11+Z(this,7);f--;)c[g++]=0;e=0;break;default:e=c[g++]=d}this.I=e;return c}var c=Z(b,5)+257,d=Z(b,5)+1,e=Z(b,4)+4,f=new (A?Uint8Array:Array)(Za.length),g,k,h,l;for(l=0;l<e;++l)f[Za[l]]=Z(b,3);if(!A){l=e;for(e=f.length;l<e;++l)f[Za[l]]=0}g=ja(f);k=new (A?Uint8Array:Array)(c);h=new (A?Uint8Array:Array)(d);
|
||||
b.I=0;b.r(ja(a.call(b,c,g,k)),ja(a.call(b,d,g,h)))}Y.prototype.r=function(b,a){var c=this.a,d=this.b;this.A=b;for(var e=c.length-258,f,g,k,h;256!==(f=mb(this,b));)if(256>f)d>=e&&(this.b=d,c=this.f(),d=this.b),c[d++]=f;else{g=f-257;h=ab[g];0<cb[g]&&(h+=Z(this,cb[g]));f=mb(this,a);k=eb[f];0<gb[f]&&(k+=Z(this,gb[f]));d>=e&&(this.b=d,c=this.f(),d=this.b);for(;h--;)c[d]=c[d++-k]}for(;8<=this.e;)this.e-=8,this.c--;this.b=d};
|
||||
Y.prototype.R=function(b,a){var c=this.a,d=this.b;this.A=b;for(var e=c.length,f,g,k,h;256!==(f=mb(this,b));)if(256>f)d>=e&&(c=this.f(),e=c.length),c[d++]=f;else{g=f-257;h=ab[g];0<cb[g]&&(h+=Z(this,cb[g]));f=mb(this,a);k=eb[f];0<gb[f]&&(k+=Z(this,gb[f]));d+h>e&&(c=this.f(),e=c.length);for(;h--;)c[d]=c[d++-k]}for(;8<=this.e;)this.e-=8,this.c--;this.b=d};
|
||||
Y.prototype.f=function(){var b=new (A?Uint8Array:Array)(this.b-32768),a=this.b-32768,c,d,e=this.a;if(A)b.set(e.subarray(32768,b.length));else{c=0;for(d=b.length;c<d;++c)b[c]=e[c+32768]}this.o.push(b);this.s+=b.length;if(A)e.set(e.subarray(a,a+32768));else for(c=0;32768>c;++c)e[c]=e[a+c];this.b=32768;return e};
|
||||
Y.prototype.T=function(b){var a,c=this.input.length/this.c+1|0,d,e,f,g=this.input,k=this.a;b&&("number"===typeof b.B&&(c=b.B),"number"===typeof b.N&&(c+=b.N));2>c?(d=(g.length-this.c)/this.A[2],f=258*(d/2)|0,e=f<k.length?k.length+f:k.length<<1):e=k.length*c;A?(a=new Uint8Array(e),a.set(k)):a=k;return this.a=a};
|
||||
Y.prototype.z=function(){var b=0,a=this.a,c=this.o,d,e=new (A?Uint8Array:Array)(this.s+(this.b-32768)),f,g,k,h;if(0===c.length)return A?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);f=0;for(g=c.length;f<g;++f){d=c[f];k=0;for(h=d.length;k<h;++k)e[b++]=d[k]}f=32768;for(g=this.b;f<g;++f)e[b++]=a[f];this.o=[];return this.buffer=e};
|
||||
Y.prototype.P=function(){var b,a=this.b;A?this.L?(b=new Uint8Array(a),b.set(this.a.subarray(0,a))):b=this.a.subarray(0,a):(this.a.length>a&&(this.a.length=a),b=this.a);return this.buffer=b};function nb(b){this.input=b;this.c=0;this.G=[];this.S=!1}
|
||||
nb.prototype.i=function(){for(var b=this.input.length;this.c<b;){var a=new ha,c=t,d=t,e=t,f=t,g=t,k=t,h=t,l=t,s=t,p=this.input,m=this.c;a.C=p[m++];a.D=p[m++];(31!==a.C||139!==a.D)&&q(Error("invalid file signature:"+a.C+","+a.D));a.v=p[m++];switch(a.v){case 8:break;default:q(Error("unknown compression method: "+a.v))}a.n=p[m++];l=p[m++]|p[m++]<<8|p[m++]<<16|p[m++]<<24;a.aa=new Date(1E3*l);a.ca=p[m++];a.ba=p[m++];0<(a.n&4)&&(a.X=p[m++]|p[m++]<<8,m+=a.X);if(0<(a.n&Ba)){h=[];for(k=0;0<(g=p[m++]);)h[k++]=
|
||||
String.fromCharCode(g);a.name=h.join("")}if(0<(a.n&Ca)){h=[];for(k=0;0<(g=p[m++]);)h[k++]=String.fromCharCode(g);a.w=h.join("")}0<(a.n&Da)&&(a.Q=R(p,0,m)&65535,a.Q!==(p[m++]|p[m++]<<8)&&q(Error("invalid header crc16")));c=p[p.length-4]|p[p.length-3]<<8|p[p.length-2]<<16|p[p.length-1]<<24;p.length-m-4-4<512*c&&(f=c);d=new Y(p,{index:m,bufferSize:f});a.data=e=d.i();m=d.c;a.Z=s=(p[m++]|p[m++]<<8|p[m++]<<16|p[m++]<<24)>>>0;R(e,t,t)!==s&&q(Error("invalid CRC-32 checksum: 0x"+R(e,t,t).toString(16)+" / 0x"+
|
||||
s.toString(16)));a.$=c=(p[m++]|p[m++]<<8|p[m++]<<16|p[m++]<<24)>>>0;(e.length&4294967295)!==c&&q(Error("invalid input size: "+(e.length&4294967295)+" / "+c));this.G.push(a);this.c=m}this.S=v;var n=this.G,r,u,x=0,O=0,y;r=0;for(u=n.length;r<u;++r)O+=n[r].data.length;if(A){y=new Uint8Array(O);for(r=0;r<u;++r)y.set(n[r].data,x),x+=n[r].data.length}else{y=[];for(r=0;r<u;++r)y[r]=n[r].data;y=Array.prototype.concat.apply([],y)}return y};function ob(b){if("string"===typeof b){var a=b.split(""),c,d;c=0;for(d=a.length;c<d;c++)a[c]=(a[c].charCodeAt(0)&255)>>>0;b=a}for(var e=1,f=0,g=b.length,k,h=0;0<g;){k=1024<g?1024:g;g-=k;do e+=b[h++],f+=e;while(--k);e%=65521;f%=65521}return(f<<16|e)>>>0};function pb(b,a){var c,d;this.input=b;this.c=0;if(a||!(a={}))a.index&&(this.c=a.index),a.verify&&(this.W=a.verify);c=b[this.c++];d=b[this.c++];switch(c&15){case rb:this.method=rb;break;default:q(Error("unsupported compression method"))}0!==((c<<8)+d)%31&&q(Error("invalid fcheck flag:"+((c<<8)+d)%31));d&32&&q(Error("fdict flag is not supported"));this.K=new Y(b,{index:this.c,bufferSize:a.bufferSize,bufferType:a.bufferType,resize:a.resize})}
|
||||
pb.prototype.i=function(){var b=this.input,a,c;a=this.K.i();this.c=this.K.c;this.W&&(c=(b[this.c++]<<24|b[this.c++]<<16|b[this.c++]<<8|b[this.c++])>>>0,c!==ob(a)&&q(Error("invalid adler-32 checksum")));return a};var rb=8;function sb(b,a){this.input=b;this.a=new (A?Uint8Array:Array)(32768);this.k=tb.t;var c={},d;if((a||!(a={}))&&"number"===typeof a.compressionType)this.k=a.compressionType;for(d in a)c[d]=a[d];c.outputBuffer=this.a;this.J=new ma(this.input,c)}var tb=oa;
|
||||
sb.prototype.h=function(){var b,a,c,d,e,f,g,k=0;g=this.a;b=rb;switch(b){case rb:a=Math.LOG2E*Math.log(32768)-8;break;default:q(Error("invalid compression method"))}c=a<<4|b;g[k++]=c;switch(b){case rb:switch(this.k){case tb.NONE:e=0;break;case tb.M:e=1;break;case tb.t:e=2;break;default:q(Error("unsupported compression type"))}break;default:q(Error("invalid compression method"))}d=e<<6|0;g[k++]=d|31-(256*c+d)%31;f=ob(this.input);this.J.b=k;g=this.J.h();k=g.length;A&&(g=new Uint8Array(g.buffer),g.length<=
|
||||
k+4&&(this.a=new Uint8Array(g.length+4),this.a.set(g),g=this.a),g=g.subarray(0,k+4));g[k++]=f>>24&255;g[k++]=f>>16&255;g[k++]=f>>8&255;g[k++]=f&255;return g};exports.deflate=ub;exports.deflateSync=vb;exports.inflate=wb;exports.inflateSync=xb;exports.gzip=yb;exports.gzipSync=zb;exports.gunzip=Ab;exports.gunzipSync=Bb;function ub(b,a,c){process.nextTick(function(){var d,e;try{e=vb(b,c)}catch(f){d=f}a(d,e)})}function vb(b,a){var c;c=(new sb(b)).h();a||(a={});return a.H?c:Cb(c)}function wb(b,a,c){process.nextTick(function(){var d,e;try{e=xb(b,c)}catch(f){d=f}a(d,e)})}
|
||||
function xb(b,a){var c;b.subarray=b.slice;c=(new pb(b)).i();a||(a={});return a.noBuffer?c:Cb(c)}function yb(b,a,c){process.nextTick(function(){var d,e;try{e=zb(b,c)}catch(f){d=f}a(d,e)})}function zb(b,a){var c;b.subarray=b.slice;c=(new Aa(b)).h();a||(a={});return a.H?c:Cb(c)}function Ab(b,a,c){process.nextTick(function(){var d,e;try{e=Bb(b,c)}catch(f){d=f}a(d,e)})}function Bb(b,a){var c;b.subarray=b.slice;c=(new nb(b)).i();a||(a={});return a.H?c:Cb(c)}
|
||||
function Cb(b){var a=new Buffer(b.length),c,d;c=0;for(d=b.length;c<d;++c)a[c]=b[c];return a};}).call(this); //@ sourceMappingURL=node-zlib.js.map
|
||||
File diff suppressed because one or more lines are too long
23
ControlPanel/js/zlib/rawdeflate.min.js
vendored
23
ControlPanel/js/zlib/rawdeflate.min.js
vendored
|
|
@ -1,23 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';var n=void 0,u=!0,aa=this;function ba(e,d){var c=e.split("."),f=aa;!(c[0]in f)&&f.execScript&&f.execScript("var "+c[0]);for(var a;c.length&&(a=c.shift());)!c.length&&d!==n?f[a]=d:f=f[a]?f[a]:f[a]={}};var C="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function K(e,d){this.index="number"===typeof d?d:0;this.d=0;this.buffer=e instanceof(C?Uint8Array:Array)?e:new (C?Uint8Array:Array)(32768);if(2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&ca(this)}function ca(e){var d=e.buffer,c,f=d.length,a=new (C?Uint8Array:Array)(f<<1);if(C)a.set(d);else for(c=0;c<f;++c)a[c]=d[c];return e.buffer=a}
|
||||
K.prototype.a=function(e,d,c){var f=this.buffer,a=this.index,b=this.d,k=f[a],m;c&&1<d&&(e=8<d?(L[e&255]<<24|L[e>>>8&255]<<16|L[e>>>16&255]<<8|L[e>>>24&255])>>32-d:L[e]>>8-d);if(8>d+b)k=k<<d|e,b+=d;else for(m=0;m<d;++m)k=k<<1|e>>d-m-1&1,8===++b&&(b=0,f[a++]=L[k],k=0,a===f.length&&(f=ca(this)));f[a]=k;this.buffer=f;this.d=b;this.index=a};K.prototype.finish=function(){var e=this.buffer,d=this.index,c;0<this.d&&(e[d]<<=8-this.d,e[d]=L[e[d]],d++);C?c=e.subarray(0,d):(e.length=d,c=e);return c};
|
||||
var ga=new (C?Uint8Array:Array)(256),M;for(M=0;256>M;++M){for(var R=M,S=R,ha=7,R=R>>>1;R;R>>>=1)S<<=1,S|=R&1,--ha;ga[M]=(S<<ha&255)>>>0}var L=ga;function ja(e){this.buffer=new (C?Uint16Array:Array)(2*e);this.length=0}ja.prototype.getParent=function(e){return 2*((e-2)/4|0)};ja.prototype.push=function(e,d){var c,f,a=this.buffer,b;c=this.length;a[this.length++]=d;for(a[this.length++]=e;0<c;)if(f=this.getParent(c),a[c]>a[f])b=a[c],a[c]=a[f],a[f]=b,b=a[c+1],a[c+1]=a[f+1],a[f+1]=b,c=f;else break;return this.length};
|
||||
ja.prototype.pop=function(){var e,d,c=this.buffer,f,a,b;d=c[0];e=c[1];this.length-=2;c[0]=c[this.length];c[1]=c[this.length+1];for(b=0;;){a=2*b+2;if(a>=this.length)break;a+2<this.length&&c[a+2]>c[a]&&(a+=2);if(c[a]>c[b])f=c[b],c[b]=c[a],c[a]=f,f=c[b+1],c[b+1]=c[a+1],c[a+1]=f;else break;b=a}return{index:e,value:d,length:this.length}};function ka(e,d){this.e=ma;this.f=0;this.input=C&&e instanceof Array?new Uint8Array(e):e;this.c=0;d&&(d.lazy&&(this.f=d.lazy),"number"===typeof d.compressionType&&(this.e=d.compressionType),d.outputBuffer&&(this.b=C&&d.outputBuffer instanceof Array?new Uint8Array(d.outputBuffer):d.outputBuffer),"number"===typeof d.outputIndex&&(this.c=d.outputIndex));this.b||(this.b=new (C?Uint8Array:Array)(32768))}var ma=2,T=[],U;
|
||||
for(U=0;288>U;U++)switch(u){case 143>=U:T.push([U+48,8]);break;case 255>=U:T.push([U-144+400,9]);break;case 279>=U:T.push([U-256+0,7]);break;case 287>=U:T.push([U-280+192,8]);break;default:throw"invalid literal: "+U;}
|
||||
ka.prototype.h=function(){var e,d,c,f,a=this.input;switch(this.e){case 0:c=0;for(f=a.length;c<f;){d=C?a.subarray(c,c+65535):a.slice(c,c+65535);c+=d.length;var b=d,k=c===f,m=n,g=n,p=n,v=n,x=n,l=this.b,h=this.c;if(C){for(l=new Uint8Array(this.b.buffer);l.length<=h+b.length+5;)l=new Uint8Array(l.length<<1);l.set(this.b)}m=k?1:0;l[h++]=m|0;g=b.length;p=~g+65536&65535;l[h++]=g&255;l[h++]=g>>>8&255;l[h++]=p&255;l[h++]=p>>>8&255;if(C)l.set(b,h),h+=b.length,l=l.subarray(0,h);else{v=0;for(x=b.length;v<x;++v)l[h++]=
|
||||
b[v];l.length=h}this.c=h;this.b=l}break;case 1:var q=new K(C?new Uint8Array(this.b.buffer):this.b,this.c);q.a(1,1,u);q.a(1,2,u);var t=na(this,a),w,da,z;w=0;for(da=t.length;w<da;w++)if(z=t[w],K.prototype.a.apply(q,T[z]),256<z)q.a(t[++w],t[++w],u),q.a(t[++w],5),q.a(t[++w],t[++w],u);else if(256===z)break;this.b=q.finish();this.c=this.b.length;break;case ma:var B=new K(C?new Uint8Array(this.b.buffer):this.b,this.c),ra,J,N,O,P,Ia=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],W,sa,X,ta,ea,ia=Array(19),
|
||||
ua,Q,fa,y,va;ra=ma;B.a(1,1,u);B.a(ra,2,u);J=na(this,a);W=oa(this.j,15);sa=pa(W);X=oa(this.i,7);ta=pa(X);for(N=286;257<N&&0===W[N-1];N--);for(O=30;1<O&&0===X[O-1];O--);var wa=N,xa=O,F=new (C?Uint32Array:Array)(wa+xa),r,G,s,Y,E=new (C?Uint32Array:Array)(316),D,A,H=new (C?Uint8Array:Array)(19);for(r=G=0;r<wa;r++)F[G++]=W[r];for(r=0;r<xa;r++)F[G++]=X[r];if(!C){r=0;for(Y=H.length;r<Y;++r)H[r]=0}r=D=0;for(Y=F.length;r<Y;r+=G){for(G=1;r+G<Y&&F[r+G]===F[r];++G);s=G;if(0===F[r])if(3>s)for(;0<s--;)E[D++]=0,
|
||||
H[0]++;else for(;0<s;)A=138>s?s:138,A>s-3&&A<s&&(A=s-3),10>=A?(E[D++]=17,E[D++]=A-3,H[17]++):(E[D++]=18,E[D++]=A-11,H[18]++),s-=A;else if(E[D++]=F[r],H[F[r]]++,s--,3>s)for(;0<s--;)E[D++]=F[r],H[F[r]]++;else for(;0<s;)A=6>s?s:6,A>s-3&&A<s&&(A=s-3),E[D++]=16,E[D++]=A-3,H[16]++,s-=A}e=C?E.subarray(0,D):E.slice(0,D);ea=oa(H,7);for(y=0;19>y;y++)ia[y]=ea[Ia[y]];for(P=19;4<P&&0===ia[P-1];P--);ua=pa(ea);B.a(N-257,5,u);B.a(O-1,5,u);B.a(P-4,4,u);for(y=0;y<P;y++)B.a(ia[y],3,u);y=0;for(va=e.length;y<va;y++)if(Q=
|
||||
e[y],B.a(ua[Q],ea[Q],u),16<=Q){y++;switch(Q){case 16:fa=2;break;case 17:fa=3;break;case 18:fa=7;break;default:throw"invalid code: "+Q;}B.a(e[y],fa,u)}var ya=[sa,W],za=[ta,X],I,Aa,Z,la,Ba,Ca,Da,Ea;Ba=ya[0];Ca=ya[1];Da=za[0];Ea=za[1];I=0;for(Aa=J.length;I<Aa;++I)if(Z=J[I],B.a(Ba[Z],Ca[Z],u),256<Z)B.a(J[++I],J[++I],u),la=J[++I],B.a(Da[la],Ea[la],u),B.a(J[++I],J[++I],u);else if(256===Z)break;this.b=B.finish();this.c=this.b.length;break;default:throw"invalid compression type";}return this.b};
|
||||
function qa(e,d){this.length=e;this.g=d}
|
||||
var Fa=function(){function e(a){switch(u){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,
|
||||
a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a;}}var d=[],c,f;for(c=3;258>=c;c++)f=e(c),d[c]=f[2]<<24|
|
||||
f[1]<<16|f[0];return d}(),Ga=C?new Uint32Array(Fa):Fa;
|
||||
function na(e,d){function c(a,c){var b=a.g,d=[],f=0,e;e=Ga[a.length];d[f++]=e&65535;d[f++]=e>>16&255;d[f++]=e>>24;var g;switch(u){case 1===b:g=[0,b-1,0];break;case 2===b:g=[1,b-2,0];break;case 3===b:g=[2,b-3,0];break;case 4===b:g=[3,b-4,0];break;case 6>=b:g=[4,b-5,1];break;case 8>=b:g=[5,b-7,1];break;case 12>=b:g=[6,b-9,2];break;case 16>=b:g=[7,b-13,2];break;case 24>=b:g=[8,b-17,3];break;case 32>=b:g=[9,b-25,3];break;case 48>=b:g=[10,b-33,4];break;case 64>=b:g=[11,b-49,4];break;case 96>=b:g=[12,b-
|
||||
65,5];break;case 128>=b:g=[13,b-97,5];break;case 192>=b:g=[14,b-129,6];break;case 256>=b:g=[15,b-193,6];break;case 384>=b:g=[16,b-257,7];break;case 512>=b:g=[17,b-385,7];break;case 768>=b:g=[18,b-513,8];break;case 1024>=b:g=[19,b-769,8];break;case 1536>=b:g=[20,b-1025,9];break;case 2048>=b:g=[21,b-1537,9];break;case 3072>=b:g=[22,b-2049,10];break;case 4096>=b:g=[23,b-3073,10];break;case 6144>=b:g=[24,b-4097,11];break;case 8192>=b:g=[25,b-6145,11];break;case 12288>=b:g=[26,b-8193,12];break;case 16384>=
|
||||
b:g=[27,b-12289,12];break;case 24576>=b:g=[28,b-16385,13];break;case 32768>=b:g=[29,b-24577,13];break;default:throw"invalid distance";}e=g;d[f++]=e[0];d[f++]=e[1];d[f++]=e[2];var k,m;k=0;for(m=d.length;k<m;++k)l[h++]=d[k];t[d[0]]++;w[d[3]]++;q=a.length+c-1;x=null}var f,a,b,k,m,g={},p,v,x,l=C?new Uint16Array(2*d.length):[],h=0,q=0,t=new (C?Uint32Array:Array)(286),w=new (C?Uint32Array:Array)(30),da=e.f,z;if(!C){for(b=0;285>=b;)t[b++]=0;for(b=0;29>=b;)w[b++]=0}t[256]=1;f=0;for(a=d.length;f<a;++f){b=
|
||||
m=0;for(k=3;b<k&&f+b!==a;++b)m=m<<8|d[f+b];g[m]===n&&(g[m]=[]);p=g[m];if(!(0<q--)){for(;0<p.length&&32768<f-p[0];)p.shift();if(f+3>=a){x&&c(x,-1);b=0;for(k=a-f;b<k;++b)z=d[f+b],l[h++]=z,++t[z];break}0<p.length?(v=Ha(d,f,p),x?x.length<v.length?(z=d[f-1],l[h++]=z,++t[z],c(v,0)):c(x,-1):v.length<da?x=v:c(v,0)):x?c(x,-1):(z=d[f],l[h++]=z,++t[z])}p.push(f)}l[h++]=256;t[256]++;e.j=t;e.i=w;return C?l.subarray(0,h):l}
|
||||
function Ha(e,d,c){var f,a,b=0,k,m,g,p,v=e.length;m=0;p=c.length;a:for(;m<p;m++){f=c[p-m-1];k=3;if(3<b){for(g=b;3<g;g--)if(e[f+g-1]!==e[d+g-1])continue a;k=b}for(;258>k&&d+k<v&&e[f+k]===e[d+k];)++k;k>b&&(a=f,b=k);if(258===k)break}return new qa(b,d-a)}
|
||||
function oa(e,d){var c=e.length,f=new ja(572),a=new (C?Uint8Array:Array)(c),b,k,m,g,p;if(!C)for(g=0;g<c;g++)a[g]=0;for(g=0;g<c;++g)0<e[g]&&f.push(g,e[g]);b=Array(f.length/2);k=new (C?Uint32Array:Array)(f.length/2);if(1===b.length)return a[f.pop().index]=1,a;g=0;for(p=f.length/2;g<p;++g)b[g]=f.pop(),k[g]=b[g].value;m=Ja(k,k.length,d);g=0;for(p=b.length;g<p;++g)a[b[g].index]=m[g];return a}
|
||||
function Ja(e,d,c){function f(a){var b=g[a][p[a]];b===d?(f(a+1),f(a+1)):--k[b];++p[a]}var a=new (C?Uint16Array:Array)(c),b=new (C?Uint8Array:Array)(c),k=new (C?Uint8Array:Array)(d),m=Array(c),g=Array(c),p=Array(c),v=(1<<c)-d,x=1<<c-1,l,h,q,t,w;a[c-1]=d;for(h=0;h<c;++h)v<x?b[h]=0:(b[h]=1,v-=x),v<<=1,a[c-2-h]=(a[c-1-h]/2|0)+d;a[0]=b[0];m[0]=Array(a[0]);g[0]=Array(a[0]);for(h=1;h<c;++h)a[h]>2*a[h-1]+b[h]&&(a[h]=2*a[h-1]+b[h]),m[h]=Array(a[h]),g[h]=Array(a[h]);for(l=0;l<d;++l)k[l]=c;for(q=0;q<a[c-1];++q)m[c-
|
||||
1][q]=e[q],g[c-1][q]=q;for(l=0;l<c;++l)p[l]=0;1===b[c-1]&&(--k[0],++p[c-1]);for(h=c-2;0<=h;--h){t=l=0;w=p[h+1];for(q=0;q<a[h];q++)t=m[h+1][w]+m[h+1][w+1],t>e[l]?(m[h][q]=t,g[h][q]=d,w+=2):(m[h][q]=e[l],g[h][q]=l,++l);p[h]=0;1===b[h]&&f(h)}return k}
|
||||
function pa(e){var d=new (C?Uint16Array:Array)(e.length),c=[],f=[],a=0,b,k,m,g;b=0;for(k=e.length;b<k;b++)c[e[b]]=(c[e[b]]|0)+1;b=1;for(k=16;b<=k;b++)f[b]=a,a+=c[b]|0,a<<=1;b=0;for(k=e.length;b<k;b++){a=f[e[b]];f[e[b]]+=1;m=d[b]=0;for(g=e[b];m<g;m++)d[b]=d[b]<<1|a&1,a>>>=1}return d};ba("Zlib.RawDeflate",ka);ba("Zlib.RawDeflate.prototype.compress",ka.prototype.h);var Ka={NONE:0,FIXED:1,DYNAMIC:ma},V,La,$,Ma;if(Object.keys)V=Object.keys(Ka);else for(La in V=[],$=0,Ka)V[$++]=La;$=0;for(Ma=V.length;$<Ma;++$)La=V[$],ba("Zlib.RawDeflate.CompressionType."+La,Ka[La]);}).call(this); //@ sourceMappingURL=rawdeflate.min.js.map
|
||||
File diff suppressed because one or more lines are too long
14
ControlPanel/js/zlib/rawinflate.min.js
vendored
14
ControlPanel/js/zlib/rawinflate.min.js
vendored
|
|
@ -1,14 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';var l=this;function p(b,e){var a=b.split("."),c=l;!(a[0]in c)&&c.execScript&&c.execScript("var "+a[0]);for(var d;a.length&&(d=a.shift());)!a.length&&void 0!==e?c[d]=e:c=c[d]?c[d]:c[d]={}};var q="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function t(b){var e=b.length,a=0,c=Number.POSITIVE_INFINITY,d,f,g,h,k,m,r,n,s,J;for(n=0;n<e;++n)b[n]>a&&(a=b[n]),b[n]<c&&(c=b[n]);d=1<<a;f=new (q?Uint32Array:Array)(d);g=1;h=0;for(k=2;g<=a;){for(n=0;n<e;++n)if(b[n]===g){m=0;r=h;for(s=0;s<g;++s)m=m<<1|r&1,r>>=1;J=g<<16|n;for(s=m;s<d;s+=k)f[s]=J;++h}++g;h<<=1;k<<=1}return[f,a,c]};function u(b,e){this.g=[];this.h=32768;this.c=this.f=this.d=this.k=0;this.input=q?new Uint8Array(b):b;this.l=!1;this.i=v;this.q=!1;if(e||!(e={}))e.index&&(this.d=e.index),e.bufferSize&&(this.h=e.bufferSize),e.bufferType&&(this.i=e.bufferType),e.resize&&(this.q=e.resize);switch(this.i){case w:this.a=32768;this.b=new (q?Uint8Array:Array)(32768+this.h+258);break;case v:this.a=0;this.b=new (q?Uint8Array:Array)(this.h);this.e=this.v;this.m=this.s;this.j=this.t;break;default:throw Error("invalid inflate mode");
|
||||
}}var w=0,v=1;
|
||||
u.prototype.u=function(){for(;!this.l;){var b=x(this,3);b&1&&(this.l=!0);b>>>=1;switch(b){case 0:var e=this.input,a=this.d,c=this.b,d=this.a,f=e.length,g=void 0,h=void 0,k=c.length,m=void 0;this.c=this.f=0;if(a+1>=f)throw Error("invalid uncompressed block header: LEN");g=e[a++]|e[a++]<<8;if(a+1>=f)throw Error("invalid uncompressed block header: NLEN");h=e[a++]|e[a++]<<8;if(g===~h)throw Error("invalid uncompressed block header: length verify");if(a+g>e.length)throw Error("input buffer is broken");switch(this.i){case w:for(;d+
|
||||
g>c.length;){m=k-d;g-=m;if(q)c.set(e.subarray(a,a+m),d),d+=m,a+=m;else for(;m--;)c[d++]=e[a++];this.a=d;c=this.e();d=this.a}break;case v:for(;d+g>c.length;)c=this.e({o:2});break;default:throw Error("invalid inflate mode");}if(q)c.set(e.subarray(a,a+g),d),d+=g,a+=g;else for(;g--;)c[d++]=e[a++];this.d=a;this.a=d;this.b=c;break;case 1:this.j(y,z);break;case 2:A(this);break;default:throw Error("unknown BTYPE: "+b);}}return this.m()};
|
||||
var B=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],C=q?new Uint16Array(B):B,D=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],E=q?new Uint16Array(D):D,F=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],G=q?new Uint8Array(F):F,H=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],I=q?new Uint16Array(H):H,K=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,
|
||||
13],L=q?new Uint8Array(K):K,M=new (q?Uint8Array:Array)(288),N,O;N=0;for(O=M.length;N<O;++N)M[N]=143>=N?8:255>=N?9:279>=N?7:8;var y=t(M),P=new (q?Uint8Array:Array)(30),Q,R;Q=0;for(R=P.length;Q<R;++Q)P[Q]=5;var z=t(P);function x(b,e){for(var a=b.f,c=b.c,d=b.input,f=b.d,g=d.length,h;c<e;){if(f>=g)throw Error("input buffer is broken");a|=d[f++]<<c;c+=8}h=a&(1<<e)-1;b.f=a>>>e;b.c=c-e;b.d=f;return h}
|
||||
function S(b,e){for(var a=b.f,c=b.c,d=b.input,f=b.d,g=d.length,h=e[0],k=e[1],m,r;c<k&&!(f>=g);)a|=d[f++]<<c,c+=8;m=h[a&(1<<k)-1];r=m>>>16;b.f=a>>r;b.c=c-r;b.d=f;return m&65535}
|
||||
function A(b){function e(a,b,c){var e,d=this.p,f,g;for(g=0;g<a;)switch(e=S(this,b),e){case 16:for(f=3+x(this,2);f--;)c[g++]=d;break;case 17:for(f=3+x(this,3);f--;)c[g++]=0;d=0;break;case 18:for(f=11+x(this,7);f--;)c[g++]=0;d=0;break;default:d=c[g++]=e}this.p=d;return c}var a=x(b,5)+257,c=x(b,5)+1,d=x(b,4)+4,f=new (q?Uint8Array:Array)(C.length),g,h,k,m;for(m=0;m<d;++m)f[C[m]]=x(b,3);if(!q){m=d;for(d=f.length;m<d;++m)f[C[m]]=0}g=t(f);h=new (q?Uint8Array:Array)(a);k=new (q?Uint8Array:Array)(c);b.p=0;
|
||||
b.j(t(e.call(b,a,g,h)),t(e.call(b,c,g,k)))}u.prototype.j=function(b,e){var a=this.b,c=this.a;this.n=b;for(var d=a.length-258,f,g,h,k;256!==(f=S(this,b));)if(256>f)c>=d&&(this.a=c,a=this.e(),c=this.a),a[c++]=f;else{g=f-257;k=E[g];0<G[g]&&(k+=x(this,G[g]));f=S(this,e);h=I[f];0<L[f]&&(h+=x(this,L[f]));c>=d&&(this.a=c,a=this.e(),c=this.a);for(;k--;)a[c]=a[c++-h]}for(;8<=this.c;)this.c-=8,this.d--;this.a=c};
|
||||
u.prototype.t=function(b,e){var a=this.b,c=this.a;this.n=b;for(var d=a.length,f,g,h,k;256!==(f=S(this,b));)if(256>f)c>=d&&(a=this.e(),d=a.length),a[c++]=f;else{g=f-257;k=E[g];0<G[g]&&(k+=x(this,G[g]));f=S(this,e);h=I[f];0<L[f]&&(h+=x(this,L[f]));c+k>d&&(a=this.e(),d=a.length);for(;k--;)a[c]=a[c++-h]}for(;8<=this.c;)this.c-=8,this.d--;this.a=c};
|
||||
u.prototype.e=function(){var b=new (q?Uint8Array:Array)(this.a-32768),e=this.a-32768,a,c,d=this.b;if(q)b.set(d.subarray(32768,b.length));else{a=0;for(c=b.length;a<c;++a)b[a]=d[a+32768]}this.g.push(b);this.k+=b.length;if(q)d.set(d.subarray(e,e+32768));else for(a=0;32768>a;++a)d[a]=d[e+a];this.a=32768;return d};
|
||||
u.prototype.v=function(b){var e,a=this.input.length/this.d+1|0,c,d,f,g=this.input,h=this.b;b&&("number"===typeof b.o&&(a=b.o),"number"===typeof b.r&&(a+=b.r));2>a?(c=(g.length-this.d)/this.n[2],f=258*(c/2)|0,d=f<h.length?h.length+f:h.length<<1):d=h.length*a;q?(e=new Uint8Array(d),e.set(h)):e=h;return this.b=e};
|
||||
u.prototype.m=function(){var b=0,e=this.b,a=this.g,c,d=new (q?Uint8Array:Array)(this.k+(this.a-32768)),f,g,h,k;if(0===a.length)return q?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);f=0;for(g=a.length;f<g;++f){c=a[f];h=0;for(k=c.length;h<k;++h)d[b++]=c[h]}f=32768;for(g=this.a;f<g;++f)d[b++]=e[f];this.g=[];return this.buffer=d};
|
||||
u.prototype.s=function(){var b,e=this.a;q?this.q?(b=new Uint8Array(e),b.set(this.b.subarray(0,e))):b=this.b.subarray(0,e):(this.b.length>e&&(this.b.length=e),b=this.b);return this.buffer=b};p("Zlib.RawInflate",u);p("Zlib.RawInflate.prototype.decompress",u.prototype.u);var T={ADAPTIVE:v,BLOCK:w},U,V,W,X;if(Object.keys)U=Object.keys(T);else for(V in U=[],W=0,T)U[W++]=V;W=0;for(X=U.length;W<X;++W)V=U[W],p("Zlib.RawInflate.BufferType."+V,T[V]);}).call(this); //@ sourceMappingURL=rawinflate.min.js.map
|
||||
File diff suppressed because one or more lines are too long
31
ControlPanel/js/zlib/unzip.min.js
vendored
31
ControlPanel/js/zlib/unzip.min.js
vendored
|
|
@ -1,31 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';function m(a){throw a;}var q=void 0,u,aa=this;function v(a,b){var c=a.split("."),d=aa;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var f;c.length&&(f=c.shift());)!c.length&&b!==q?d[f]=b:d=d[f]?d[f]:d[f]={}};var w="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;new (w?Uint8Array:Array)(256);var x;for(x=0;256>x;++x)for(var y=x,ba=7,y=y>>>1;y;y>>>=1)--ba;var z=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,
|
||||
2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,
|
||||
2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,
|
||||
2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,
|
||||
3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,
|
||||
936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],B=w?new Uint32Array(z):z;function C(a){var b=a.length,c=0,d=Number.POSITIVE_INFINITY,f,h,k,e,g,l,p,s,r,A;for(s=0;s<b;++s)a[s]>c&&(c=a[s]),a[s]<d&&(d=a[s]);f=1<<c;h=new (w?Uint32Array:Array)(f);k=1;e=0;for(g=2;k<=c;){for(s=0;s<b;++s)if(a[s]===k){l=0;p=e;for(r=0;r<k;++r)l=l<<1|p&1,p>>=1;A=k<<16|s;for(r=l;r<f;r+=g)h[r]=A;++e}++k;e<<=1;g<<=1}return[h,c,d]};var D=[],E;for(E=0;288>E;E++)switch(!0){case 143>=E:D.push([E+48,8]);break;case 255>=E:D.push([E-144+400,9]);break;case 279>=E:D.push([E-256+0,7]);break;case 287>=E:D.push([E-280+192,8]);break;default:m("invalid literal: "+E)}
|
||||
var ca=function(){function a(a){switch(!0){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,
|
||||
a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:m("invalid length: "+a)}}var b=[],c,d;for(c=3;258>=c;c++)d=a(c),b[c]=d[2]<<24|d[1]<<
|
||||
16|d[0];return b}();w&&new Uint32Array(ca);function F(a,b){this.l=[];this.m=32768;this.d=this.f=this.c=this.t=0;this.input=w?new Uint8Array(a):a;this.u=!1;this.n=G;this.L=!1;if(b||!(b={}))b.index&&(this.c=b.index),b.bufferSize&&(this.m=b.bufferSize),b.bufferType&&(this.n=b.bufferType),b.resize&&(this.L=b.resize);switch(this.n){case H:this.a=32768;this.b=new (w?Uint8Array:Array)(32768+this.m+258);break;case G:this.a=0;this.b=new (w?Uint8Array:Array)(this.m);this.e=this.X;this.B=this.S;this.q=this.W;break;default:m(Error("invalid inflate mode"))}}
|
||||
var H=0,G=1;
|
||||
F.prototype.r=function(){for(;!this.u;){var a=I(this,3);a&1&&(this.u=!0);a>>>=1;switch(a){case 0:var b=this.input,c=this.c,d=this.b,f=this.a,h=b.length,k=q,e=q,g=d.length,l=q;this.d=this.f=0;c+1>=h&&m(Error("invalid uncompressed block header: LEN"));k=b[c++]|b[c++]<<8;c+1>=h&&m(Error("invalid uncompressed block header: NLEN"));e=b[c++]|b[c++]<<8;k===~e&&m(Error("invalid uncompressed block header: length verify"));c+k>b.length&&m(Error("input buffer is broken"));switch(this.n){case H:for(;f+k>d.length;){l=
|
||||
g-f;k-=l;if(w)d.set(b.subarray(c,c+l),f),f+=l,c+=l;else for(;l--;)d[f++]=b[c++];this.a=f;d=this.e();f=this.a}break;case G:for(;f+k>d.length;)d=this.e({H:2});break;default:m(Error("invalid inflate mode"))}if(w)d.set(b.subarray(c,c+k),f),f+=k,c+=k;else for(;k--;)d[f++]=b[c++];this.c=c;this.a=f;this.b=d;break;case 1:this.q(da,ea);break;case 2:fa(this);break;default:m(Error("unknown BTYPE: "+a))}}return this.B()};
|
||||
var J=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],K=w?new Uint16Array(J):J,L=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],M=w?new Uint16Array(L):L,ga=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],O=w?new Uint8Array(ga):ga,ha=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],ia=w?new Uint16Array(ha):ha,ja=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,
|
||||
12,12,13,13],P=w?new Uint8Array(ja):ja,Q=new (w?Uint8Array:Array)(288),R,la;R=0;for(la=Q.length;R<la;++R)Q[R]=143>=R?8:255>=R?9:279>=R?7:8;var da=C(Q),S=new (w?Uint8Array:Array)(30),T,ma;T=0;for(ma=S.length;T<ma;++T)S[T]=5;var ea=C(S);function I(a,b){for(var c=a.f,d=a.d,f=a.input,h=a.c,k=f.length,e;d<b;)h>=k&&m(Error("input buffer is broken")),c|=f[h++]<<d,d+=8;e=c&(1<<b)-1;a.f=c>>>b;a.d=d-b;a.c=h;return e}
|
||||
function U(a,b){for(var c=a.f,d=a.d,f=a.input,h=a.c,k=f.length,e=b[0],g=b[1],l,p;d<g&&!(h>=k);)c|=f[h++]<<d,d+=8;l=e[c&(1<<g)-1];p=l>>>16;a.f=c>>p;a.d=d-p;a.c=h;return l&65535}
|
||||
function fa(a){function b(a,b,c){var d,e=this.K,f,g;for(g=0;g<a;)switch(d=U(this,b),d){case 16:for(f=3+I(this,2);f--;)c[g++]=e;break;case 17:for(f=3+I(this,3);f--;)c[g++]=0;e=0;break;case 18:for(f=11+I(this,7);f--;)c[g++]=0;e=0;break;default:e=c[g++]=d}this.K=e;return c}var c=I(a,5)+257,d=I(a,5)+1,f=I(a,4)+4,h=new (w?Uint8Array:Array)(K.length),k,e,g,l;for(l=0;l<f;++l)h[K[l]]=I(a,3);if(!w){l=f;for(f=h.length;l<f;++l)h[K[l]]=0}k=C(h);e=new (w?Uint8Array:Array)(c);g=new (w?Uint8Array:Array)(d);a.K=
|
||||
0;a.q(C(b.call(a,c,k,e)),C(b.call(a,d,k,g)))}u=F.prototype;u.q=function(a,b){var c=this.b,d=this.a;this.C=a;for(var f=c.length-258,h,k,e,g;256!==(h=U(this,a));)if(256>h)d>=f&&(this.a=d,c=this.e(),d=this.a),c[d++]=h;else{k=h-257;g=M[k];0<O[k]&&(g+=I(this,O[k]));h=U(this,b);e=ia[h];0<P[h]&&(e+=I(this,P[h]));d>=f&&(this.a=d,c=this.e(),d=this.a);for(;g--;)c[d]=c[d++-e]}for(;8<=this.d;)this.d-=8,this.c--;this.a=d};
|
||||
u.W=function(a,b){var c=this.b,d=this.a;this.C=a;for(var f=c.length,h,k,e,g;256!==(h=U(this,a));)if(256>h)d>=f&&(c=this.e(),f=c.length),c[d++]=h;else{k=h-257;g=M[k];0<O[k]&&(g+=I(this,O[k]));h=U(this,b);e=ia[h];0<P[h]&&(e+=I(this,P[h]));d+g>f&&(c=this.e(),f=c.length);for(;g--;)c[d]=c[d++-e]}for(;8<=this.d;)this.d-=8,this.c--;this.a=d};
|
||||
u.e=function(){var a=new (w?Uint8Array:Array)(this.a-32768),b=this.a-32768,c,d,f=this.b;if(w)a.set(f.subarray(32768,a.length));else{c=0;for(d=a.length;c<d;++c)a[c]=f[c+32768]}this.l.push(a);this.t+=a.length;if(w)f.set(f.subarray(b,b+32768));else for(c=0;32768>c;++c)f[c]=f[b+c];this.a=32768;return f};
|
||||
u.X=function(a){var b,c=this.input.length/this.c+1|0,d,f,h,k=this.input,e=this.b;a&&("number"===typeof a.H&&(c=a.H),"number"===typeof a.Q&&(c+=a.Q));2>c?(d=(k.length-this.c)/this.C[2],h=258*(d/2)|0,f=h<e.length?e.length+h:e.length<<1):f=e.length*c;w?(b=new Uint8Array(f),b.set(e)):b=e;return this.b=b};
|
||||
u.B=function(){var a=0,b=this.b,c=this.l,d,f=new (w?Uint8Array:Array)(this.t+(this.a-32768)),h,k,e,g;if(0===c.length)return w?this.b.subarray(32768,this.a):this.b.slice(32768,this.a);h=0;for(k=c.length;h<k;++h){d=c[h];e=0;for(g=d.length;e<g;++e)f[a++]=d[e]}h=32768;for(k=this.a;h<k;++h)f[a++]=b[h];this.l=[];return this.buffer=f};
|
||||
u.S=function(){var a,b=this.a;w?this.L?(a=new Uint8Array(b),a.set(this.b.subarray(0,b))):a=this.b.subarray(0,b):(this.b.length>b&&(this.b.length=b),a=this.b);return this.buffer=a};function V(a){a=a||{};this.files=[];this.v=a.comment}V.prototype.M=function(a){this.j=a};V.prototype.s=function(a){var b=a[2]&65535|2;return b*(b^1)>>8&255};V.prototype.k=function(a,b){a[0]=(B[(a[0]^b)&255]^a[0]>>>8)>>>0;a[1]=(6681*(20173*(a[1]+(a[0]&255))>>>0)>>>0)+1>>>0;a[2]=(B[(a[2]^a[1]>>>24)&255]^a[2]>>>8)>>>0};V.prototype.U=function(a){var b=[305419896,591751049,878082192],c,d;w&&(b=new Uint32Array(b));c=0;for(d=a.length;c<d;++c)this.k(b,a[c]&255);return b};function W(a,b){b=b||{};this.input=w&&a instanceof Array?new Uint8Array(a):a;this.c=0;this.ca=b.verify||!1;this.j=b.password}var na={P:0,N:8},X=[80,75,1,2],Y=[80,75,3,4],Z=[80,75,5,6];function oa(a,b){this.input=a;this.offset=b}
|
||||
oa.prototype.parse=function(){var a=this.input,b=this.offset;(a[b++]!==X[0]||a[b++]!==X[1]||a[b++]!==X[2]||a[b++]!==X[3])&&m(Error("invalid file header signature"));this.version=a[b++];this.ja=a[b++];this.$=a[b++]|a[b++]<<8;this.I=a[b++]|a[b++]<<8;this.A=a[b++]|a[b++]<<8;this.time=a[b++]|a[b++]<<8;this.V=a[b++]|a[b++]<<8;this.p=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.z=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.J=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.h=a[b++]|a[b++]<<
|
||||
8;this.g=a[b++]|a[b++]<<8;this.F=a[b++]|a[b++]<<8;this.fa=a[b++]|a[b++]<<8;this.ha=a[b++]|a[b++]<<8;this.ga=a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24;this.aa=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.filename=String.fromCharCode.apply(null,w?a.subarray(b,b+=this.h):a.slice(b,b+=this.h));this.Y=w?a.subarray(b,b+=this.g):a.slice(b,b+=this.g);this.v=w?a.subarray(b,b+this.F):a.slice(b,b+this.F);this.length=b-this.offset};function pa(a,b){this.input=a;this.offset=b}var qa={O:1,da:8,ea:2048};
|
||||
pa.prototype.parse=function(){var a=this.input,b=this.offset;(a[b++]!==Y[0]||a[b++]!==Y[1]||a[b++]!==Y[2]||a[b++]!==Y[3])&&m(Error("invalid local file header signature"));this.$=a[b++]|a[b++]<<8;this.I=a[b++]|a[b++]<<8;this.A=a[b++]|a[b++]<<8;this.time=a[b++]|a[b++]<<8;this.V=a[b++]|a[b++]<<8;this.p=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.z=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.J=(a[b++]|a[b++]<<8|a[b++]<<16|a[b++]<<24)>>>0;this.h=a[b++]|a[b++]<<8;this.g=a[b++]|a[b++]<<8;this.filename=
|
||||
String.fromCharCode.apply(null,w?a.subarray(b,b+=this.h):a.slice(b,b+=this.h));this.Y=w?a.subarray(b,b+=this.g):a.slice(b,b+=this.g);this.length=b-this.offset};
|
||||
function $(a){var b=[],c={},d,f,h,k;if(!a.i){if(a.o===q){var e=a.input,g;if(!a.D)a:{var l=a.input,p;for(p=l.length-12;0<p;--p)if(l[p]===Z[0]&&l[p+1]===Z[1]&&l[p+2]===Z[2]&&l[p+3]===Z[3]){a.D=p;break a}m(Error("End of Central Directory Record not found"))}g=a.D;(e[g++]!==Z[0]||e[g++]!==Z[1]||e[g++]!==Z[2]||e[g++]!==Z[3])&&m(Error("invalid signature"));a.ia=e[g++]|e[g++]<<8;a.ka=e[g++]|e[g++]<<8;a.la=e[g++]|e[g++]<<8;a.ba=e[g++]|e[g++]<<8;a.R=(e[g++]|e[g++]<<8|e[g++]<<16|e[g++]<<24)>>>0;a.o=(e[g++]|
|
||||
e[g++]<<8|e[g++]<<16|e[g++]<<24)>>>0;a.w=e[g++]|e[g++]<<8;a.v=w?e.subarray(g,g+a.w):e.slice(g,g+a.w)}d=a.o;h=0;for(k=a.ba;h<k;++h)f=new oa(a.input,d),f.parse(),d+=f.length,b[h]=f,c[f.filename]=h;a.R<d-a.o&&m(Error("invalid file header size"));a.i=b;a.G=c}}u=W.prototype;u.Z=function(){var a=[],b,c,d;this.i||$(this);d=this.i;b=0;for(c=d.length;b<c;++b)a[b]=d[b].filename;return a};
|
||||
u.r=function(a,b){var c;this.G||$(this);c=this.G[a];c===q&&m(Error(a+" not found"));var d;d=b||{};var f=this.input,h=this.i,k,e,g,l,p,s,r,A;h||$(this);h[c]===q&&m(Error("wrong index"));e=h[c].aa;k=new pa(this.input,e);k.parse();e+=k.length;g=k.z;if(0!==(k.I&qa.O)){!d.password&&!this.j&&m(Error("please set password"));s=this.T(d.password||this.j);r=e;for(A=e+12;r<A;++r)ra(this,s,f[r]);e+=12;g-=12;r=e;for(A=e+g;r<A;++r)f[r]=ra(this,s,f[r])}switch(k.A){case na.P:l=w?this.input.subarray(e,e+g):this.input.slice(e,
|
||||
e+g);break;case na.N:l=(new F(this.input,{index:e,bufferSize:k.J})).r();break;default:m(Error("unknown compression type"))}if(this.ca){var t=q,n,N="number"===typeof t?t:t=0,ka=l.length;n=-1;for(N=ka&7;N--;++t)n=n>>>8^B[(n^l[t])&255];for(N=ka>>3;N--;t+=8)n=n>>>8^B[(n^l[t])&255],n=n>>>8^B[(n^l[t+1])&255],n=n>>>8^B[(n^l[t+2])&255],n=n>>>8^B[(n^l[t+3])&255],n=n>>>8^B[(n^l[t+4])&255],n=n>>>8^B[(n^l[t+5])&255],n=n>>>8^B[(n^l[t+6])&255],n=n>>>8^B[(n^l[t+7])&255];p=(n^4294967295)>>>0;k.p!==p&&m(Error("wrong crc: file=0x"+
|
||||
k.p.toString(16)+", data=0x"+p.toString(16)))}return l};u.M=function(a){this.j=a};function ra(a,b,c){c^=a.s(b);a.k(b,c);return c}u.k=V.prototype.k;u.T=V.prototype.U;u.s=V.prototype.s;v("Zlib.Unzip",W);v("Zlib.Unzip.prototype.decompress",W.prototype.r);v("Zlib.Unzip.prototype.getFilenames",W.prototype.Z);v("Zlib.Unzip.prototype.setPassword",W.prototype.M);}).call(this); //@ sourceMappingURL=unzip.min.js.map
|
||||
File diff suppressed because one or more lines are too long
37
ControlPanel/js/zlib/zip.min.js
vendored
37
ControlPanel/js/zlib/zip.min.js
vendored
|
|
@ -1,37 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';var n=void 0,y=!0,aa=this;function G(e,b){var a=e.split("."),d=aa;!(a[0]in d)&&d.execScript&&d.execScript("var "+a[0]);for(var c;a.length&&(c=a.shift());)!a.length&&b!==n?d[c]=b:d=d[c]?d[c]:d[c]={}};var H="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function ba(e,b){this.index="number"===typeof b?b:0;this.f=0;this.buffer=e instanceof(H?Uint8Array:Array)?e:new (H?Uint8Array:Array)(32768);if(2*this.buffer.length<=this.index)throw Error("invalid index");this.buffer.length<=this.index&&ca(this)}function ca(e){var b=e.buffer,a,d=b.length,c=new (H?Uint8Array:Array)(d<<1);if(H)c.set(b);else for(a=0;a<d;++a)c[a]=b[a];return e.buffer=c}
|
||||
ba.prototype.b=function(e,b,a){var d=this.buffer,c=this.index,f=this.f,l=d[c],p;a&&1<b&&(e=8<b?(L[e&255]<<24|L[e>>>8&255]<<16|L[e>>>16&255]<<8|L[e>>>24&255])>>32-b:L[e]>>8-b);if(8>b+f)l=l<<b|e,f+=b;else for(p=0;p<b;++p)l=l<<1|e>>b-p-1&1,8===++f&&(f=0,d[c++]=L[l],l=0,c===d.length&&(d=ca(this)));d[c]=l;this.buffer=d;this.f=f;this.index=c};ba.prototype.finish=function(){var e=this.buffer,b=this.index,a;0<this.f&&(e[b]<<=8-this.f,e[b]=L[e[b]],b++);H?a=e.subarray(0,b):(e.length=b,a=e);return a};
|
||||
var da=new (H?Uint8Array:Array)(256),ha;for(ha=0;256>ha;++ha){for(var U=ha,ja=U,ka=7,U=U>>>1;U;U>>>=1)ja<<=1,ja|=U&1,--ka;da[ha]=(ja<<ka&255)>>>0}var L=da;function la(e){var b=n,a,d="number"===typeof b?b:b=0,c=e.length;a=-1;for(d=c&7;d--;++b)a=a>>>8^V[(a^e[b])&255];for(d=c>>3;d--;b+=8)a=a>>>8^V[(a^e[b])&255],a=a>>>8^V[(a^e[b+1])&255],a=a>>>8^V[(a^e[b+2])&255],a=a>>>8^V[(a^e[b+3])&255],a=a>>>8^V[(a^e[b+4])&255],a=a>>>8^V[(a^e[b+5])&255],a=a>>>8^V[(a^e[b+6])&255],a=a>>>8^V[(a^e[b+7])&255];return(a^4294967295)>>>0}
|
||||
var ma=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,
|
||||
2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,
|
||||
2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,
|
||||
2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,
|
||||
3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,
|
||||
936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],V=H?new Uint32Array(ma):ma;function na(e){this.buffer=new (H?Uint16Array:Array)(2*e);this.length=0}na.prototype.getParent=function(e){return 2*((e-2)/4|0)};na.prototype.push=function(e,b){var a,d,c=this.buffer,f;a=this.length;c[this.length++]=b;for(c[this.length++]=e;0<a;)if(d=this.getParent(a),c[a]>c[d])f=c[a],c[a]=c[d],c[d]=f,f=c[a+1],c[a+1]=c[d+1],c[d+1]=f,a=d;else break;return this.length};
|
||||
na.prototype.pop=function(){var e,b,a=this.buffer,d,c,f;b=a[0];e=a[1];this.length-=2;a[0]=a[this.length];a[1]=a[this.length+1];for(f=0;;){c=2*f+2;if(c>=this.length)break;c+2<this.length&&a[c+2]>a[c]&&(c+=2);if(a[c]>a[f])d=a[f],a[f]=a[c],a[c]=d,d=a[f+1],a[f+1]=a[c+1],a[c+1]=d;else break;f=c}return{index:e,value:b,length:this.length}};function pa(e,b){this.k=qa;this.l=0;this.input=H&&e instanceof Array?new Uint8Array(e):e;this.e=0;b&&(b.lazy&&(this.l=b.lazy),"number"===typeof b.compressionType&&(this.k=b.compressionType),b.outputBuffer&&(this.c=H&&b.outputBuffer instanceof Array?new Uint8Array(b.outputBuffer):b.outputBuffer),"number"===typeof b.outputIndex&&(this.e=b.outputIndex));this.c||(this.c=new (H?Uint8Array:Array)(32768))}var qa=2,sa=[],Y;
|
||||
for(Y=0;288>Y;Y++)switch(y){case 143>=Y:sa.push([Y+48,8]);break;case 255>=Y:sa.push([Y-144+400,9]);break;case 279>=Y:sa.push([Y-256+0,7]);break;case 287>=Y:sa.push([Y-280+192,8]);break;default:throw"invalid literal: "+Y;}
|
||||
pa.prototype.g=function(){var e,b,a,d,c=this.input;switch(this.k){case 0:a=0;for(d=c.length;a<d;){b=H?c.subarray(a,a+65535):c.slice(a,a+65535);a+=b.length;var f=b,l=a===d,p=n,k=n,q=n,w=n,u=n,m=this.c,h=this.e;if(H){for(m=new Uint8Array(this.c.buffer);m.length<=h+f.length+5;)m=new Uint8Array(m.length<<1);m.set(this.c)}p=l?1:0;m[h++]=p|0;k=f.length;q=~k+65536&65535;m[h++]=k&255;m[h++]=k>>>8&255;m[h++]=q&255;m[h++]=q>>>8&255;if(H)m.set(f,h),h+=f.length,m=m.subarray(0,h);else{w=0;for(u=f.length;w<u;++w)m[h++]=
|
||||
f[w];m.length=h}this.e=h;this.c=m}break;case 1:var s=new ba(H?new Uint8Array(this.c.buffer):this.c,this.e);s.b(1,1,y);s.b(1,2,y);var t=ta(this,c),r,Q,z;r=0;for(Q=t.length;r<Q;r++)if(z=t[r],ba.prototype.b.apply(s,sa[z]),256<z)s.b(t[++r],t[++r],y),s.b(t[++r],5),s.b(t[++r],t[++r],y);else if(256===z)break;this.c=s.finish();this.e=this.c.length;break;case qa:var A=new ba(H?new Uint8Array(this.c.buffer):this.c,this.e),F,I,N,B,C,g=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],J,ea,O,W,X,oa=Array(19),
|
||||
ya,Z,ia,D,za;F=qa;A.b(1,1,y);A.b(F,2,y);I=ta(this,c);J=ua(this.p,15);ea=va(J);O=ua(this.o,7);W=va(O);for(N=286;257<N&&0===J[N-1];N--);for(B=30;1<B&&0===O[B-1];B--);var Aa=N,Ba=B,P=new (H?Uint32Array:Array)(Aa+Ba),v,R,x,fa,M=new (H?Uint32Array:Array)(316),K,E,S=new (H?Uint8Array:Array)(19);for(v=R=0;v<Aa;v++)P[R++]=J[v];for(v=0;v<Ba;v++)P[R++]=O[v];if(!H){v=0;for(fa=S.length;v<fa;++v)S[v]=0}v=K=0;for(fa=P.length;v<fa;v+=R){for(R=1;v+R<fa&&P[v+R]===P[v];++R);x=R;if(0===P[v])if(3>x)for(;0<x--;)M[K++]=
|
||||
0,S[0]++;else for(;0<x;)E=138>x?x:138,E>x-3&&E<x&&(E=x-3),10>=E?(M[K++]=17,M[K++]=E-3,S[17]++):(M[K++]=18,M[K++]=E-11,S[18]++),x-=E;else if(M[K++]=P[v],S[P[v]]++,x--,3>x)for(;0<x--;)M[K++]=P[v],S[P[v]]++;else for(;0<x;)E=6>x?x:6,E>x-3&&E<x&&(E=x-3),M[K++]=16,M[K++]=E-3,S[16]++,x-=E}e=H?M.subarray(0,K):M.slice(0,K);X=ua(S,7);for(D=0;19>D;D++)oa[D]=X[g[D]];for(C=19;4<C&&0===oa[C-1];C--);ya=va(X);A.b(N-257,5,y);A.b(B-1,5,y);A.b(C-4,4,y);for(D=0;D<C;D++)A.b(oa[D],3,y);D=0;for(za=e.length;D<za;D++)if(Z=
|
||||
e[D],A.b(ya[Z],X[Z],y),16<=Z){D++;switch(Z){case 16:ia=2;break;case 17:ia=3;break;case 18:ia=7;break;default:throw"invalid code: "+Z;}A.b(e[D],ia,y)}var Ca=[ea,J],Da=[W,O],T,Ea,ga,ra,Fa,Ga,Ha,Ia;Fa=Ca[0];Ga=Ca[1];Ha=Da[0];Ia=Da[1];T=0;for(Ea=I.length;T<Ea;++T)if(ga=I[T],A.b(Fa[ga],Ga[ga],y),256<ga)A.b(I[++T],I[++T],y),ra=I[++T],A.b(Ha[ra],Ia[ra],y),A.b(I[++T],I[++T],y);else if(256===ga)break;this.c=A.finish();this.e=this.c.length;break;default:throw"invalid compression type";}return this.c};
|
||||
function wa(e,b){this.length=e;this.n=b}
|
||||
var xa=function(){function e(a){switch(y){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,
|
||||
a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:throw"invalid length: "+a;}}var b=[],a,d;for(a=3;258>=a;a++)d=e(a),b[a]=d[2]<<24|
|
||||
d[1]<<16|d[0];return b}(),Ja=H?new Uint32Array(xa):xa;
|
||||
function ta(e,b){function a(a,c){var b=a.n,d=[],e=0,f;f=Ja[a.length];d[e++]=f&65535;d[e++]=f>>16&255;d[e++]=f>>24;var g;switch(y){case 1===b:g=[0,b-1,0];break;case 2===b:g=[1,b-2,0];break;case 3===b:g=[2,b-3,0];break;case 4===b:g=[3,b-4,0];break;case 6>=b:g=[4,b-5,1];break;case 8>=b:g=[5,b-7,1];break;case 12>=b:g=[6,b-9,2];break;case 16>=b:g=[7,b-13,2];break;case 24>=b:g=[8,b-17,3];break;case 32>=b:g=[9,b-25,3];break;case 48>=b:g=[10,b-33,4];break;case 64>=b:g=[11,b-49,4];break;case 96>=b:g=[12,b-
|
||||
65,5];break;case 128>=b:g=[13,b-97,5];break;case 192>=b:g=[14,b-129,6];break;case 256>=b:g=[15,b-193,6];break;case 384>=b:g=[16,b-257,7];break;case 512>=b:g=[17,b-385,7];break;case 768>=b:g=[18,b-513,8];break;case 1024>=b:g=[19,b-769,8];break;case 1536>=b:g=[20,b-1025,9];break;case 2048>=b:g=[21,b-1537,9];break;case 3072>=b:g=[22,b-2049,10];break;case 4096>=b:g=[23,b-3073,10];break;case 6144>=b:g=[24,b-4097,11];break;case 8192>=b:g=[25,b-6145,11];break;case 12288>=b:g=[26,b-8193,12];break;case 16384>=
|
||||
b:g=[27,b-12289,12];break;case 24576>=b:g=[28,b-16385,13];break;case 32768>=b:g=[29,b-24577,13];break;default:throw"invalid distance";}f=g;d[e++]=f[0];d[e++]=f[1];d[e++]=f[2];var k,l;k=0;for(l=d.length;k<l;++k)m[h++]=d[k];t[d[0]]++;r[d[3]]++;s=a.length+c-1;u=null}var d,c,f,l,p,k={},q,w,u,m=H?new Uint16Array(2*b.length):[],h=0,s=0,t=new (H?Uint32Array:Array)(286),r=new (H?Uint32Array:Array)(30),Q=e.l,z;if(!H){for(f=0;285>=f;)t[f++]=0;for(f=0;29>=f;)r[f++]=0}t[256]=1;d=0;for(c=b.length;d<c;++d){f=p=
|
||||
0;for(l=3;f<l&&d+f!==c;++f)p=p<<8|b[d+f];k[p]===n&&(k[p]=[]);q=k[p];if(!(0<s--)){for(;0<q.length&&32768<d-q[0];)q.shift();if(d+3>=c){u&&a(u,-1);f=0;for(l=c-d;f<l;++f)z=b[d+f],m[h++]=z,++t[z];break}0<q.length?(w=Ka(b,d,q),u?u.length<w.length?(z=b[d-1],m[h++]=z,++t[z],a(w,0)):a(u,-1):w.length<Q?u=w:a(w,0)):u?a(u,-1):(z=b[d],m[h++]=z,++t[z])}q.push(d)}m[h++]=256;t[256]++;e.p=t;e.o=r;return H?m.subarray(0,h):m}
|
||||
function Ka(e,b,a){var d,c,f=0,l,p,k,q,w=e.length;p=0;q=a.length;a:for(;p<q;p++){d=a[q-p-1];l=3;if(3<f){for(k=f;3<k;k--)if(e[d+k-1]!==e[b+k-1])continue a;l=f}for(;258>l&&b+l<w&&e[d+l]===e[b+l];)++l;l>f&&(c=d,f=l);if(258===l)break}return new wa(f,b-c)}
|
||||
function ua(e,b){var a=e.length,d=new na(572),c=new (H?Uint8Array:Array)(a),f,l,p,k,q;if(!H)for(k=0;k<a;k++)c[k]=0;for(k=0;k<a;++k)0<e[k]&&d.push(k,e[k]);f=Array(d.length/2);l=new (H?Uint32Array:Array)(d.length/2);if(1===f.length)return c[d.pop().index]=1,c;k=0;for(q=d.length/2;k<q;++k)f[k]=d.pop(),l[k]=f[k].value;p=La(l,l.length,b);k=0;for(q=f.length;k<q;++k)c[f[k].index]=p[k];return c}
|
||||
function La(e,b,a){function d(a){var c=k[a][q[a]];c===b?(d(a+1),d(a+1)):--l[c];++q[a]}var c=new (H?Uint16Array:Array)(a),f=new (H?Uint8Array:Array)(a),l=new (H?Uint8Array:Array)(b),p=Array(a),k=Array(a),q=Array(a),w=(1<<a)-b,u=1<<a-1,m,h,s,t,r;c[a-1]=b;for(h=0;h<a;++h)w<u?f[h]=0:(f[h]=1,w-=u),w<<=1,c[a-2-h]=(c[a-1-h]/2|0)+b;c[0]=f[0];p[0]=Array(c[0]);k[0]=Array(c[0]);for(h=1;h<a;++h)c[h]>2*c[h-1]+f[h]&&(c[h]=2*c[h-1]+f[h]),p[h]=Array(c[h]),k[h]=Array(c[h]);for(m=0;m<b;++m)l[m]=a;for(s=0;s<c[a-1];++s)p[a-
|
||||
1][s]=e[s],k[a-1][s]=s;for(m=0;m<a;++m)q[m]=0;1===f[a-1]&&(--l[0],++q[a-1]);for(h=a-2;0<=h;--h){t=m=0;r=q[h+1];for(s=0;s<c[h];s++)t=p[h+1][r]+p[h+1][r+1],t>e[m]?(p[h][s]=t,k[h][s]=b,r+=2):(p[h][s]=e[m],k[h][s]=m,++m);q[h]=0;1===f[h]&&d(h)}return l}
|
||||
function va(e){var b=new (H?Uint16Array:Array)(e.length),a=[],d=[],c=0,f,l,p,k;f=0;for(l=e.length;f<l;f++)a[e[f]]=(a[e[f]]|0)+1;f=1;for(l=16;f<=l;f++)d[f]=c,c+=a[f]|0,c<<=1;f=0;for(l=e.length;f<l;f++){c=d[e[f]];d[e[f]]+=1;p=b[f]=0;for(k=e[f];p<k;p++)b[f]=b[f]<<1|c&1,c>>>=1}return b};function $(e){e=e||{};this.files=[];this.d=e.comment}var Ma=[80,75,1,2],Na=[80,75,3,4],Oa=[80,75,5,6];$.prototype.m=function(e,b){b=b||{};var a,d=e.length,c=0;H&&e instanceof Array&&(e=new Uint8Array(e));"number"!==typeof b.compressionMethod&&(b.compressionMethod=8);if(b.compress)switch(b.compressionMethod){case 0:break;case 8:c=la(e);e=(new pa(e,b.deflateOption)).g();a=y;break;default:throw Error("unknown compression method:"+b.compressionMethod);}this.files.push({buffer:e,a:b,j:a,r:!1,size:d,h:c})};
|
||||
$.prototype.q=function(e){this.i=e};
|
||||
$.prototype.g=function(){var e=this.files,b,a,d,c,f,l=0,p=0,k,q,w,u,m,h,s,t,r,Q,z,A,F,I,N,B,C,g,J;B=0;for(C=e.length;B<C;++B){b=e[B];t=b.a.filename?b.a.filename.length:0;r=b.a.comment?b.a.comment.length:0;if(!b.j)switch(b.h=la(b.buffer),b.a.compressionMethod){case 0:break;case 8:b.buffer=(new pa(b.buffer,b.a.deflateOption)).g();b.j=y;break;default:throw Error("unknown compression method:"+b.a.compressionMethod);}if(b.a.password!==n||this.i!==n){var ea=b.a.password||this.i,O=[305419896,591751049,878082192],
|
||||
W=n,X=n;H&&(O=new Uint32Array(O));W=0;for(X=ea.length;W<X;++W)Pa(O,ea[W]&255);N=O;F=b.buffer;H?(I=new Uint8Array(F.length+12),I.set(F,12),F=I):F.unshift(0,0,0,0,0,0,0,0,0,0,0,0);for(g=0;12>g;++g)F[g]=Qa(N,11===B?b.h&255:256*Math.random()|0);for(J=F.length;g<J;++g)F[g]=Qa(N,F[g]);b.buffer=F}l+=30+t+b.buffer.length;p+=46+t+r}a=new (H?Uint8Array:Array)(l+p+(46+(this.d?this.d.length:0)));d=0;c=l;f=c+p;B=0;for(C=e.length;B<C;++B){b=e[B];t=b.a.filename?b.a.filename.length:0;r=b.a.comment?b.a.comment.length:
|
||||
0;k=d;a[d++]=Na[0];a[d++]=Na[1];a[d++]=Na[2];a[d++]=Na[3];a[c++]=Ma[0];a[c++]=Ma[1];a[c++]=Ma[2];a[c++]=Ma[3];a[c++]=20;a[c++]=b.a.os||0;a[d++]=a[c++]=20;q=a[d++]=a[c++]=0;if(b.a.password||this.i)q|=1;a[d++]=a[c++]=q&255;a[d++]=a[c++]=q>>8&255;w=b.a.compressionMethod;a[d++]=a[c++]=w&255;a[d++]=a[c++]=w>>8&255;u=b.a.date||new Date;a[d++]=a[c++]=(u.getMinutes()&7)<<5|u.getSeconds()/2|0;a[d++]=a[c++]=u.getHours()<<3|u.getMinutes()>>3;a[d++]=a[c++]=(u.getMonth()+1&7)<<5|u.getDate();a[d++]=a[c++]=(u.getFullYear()-
|
||||
1980&127)<<1|u.getMonth()+1>>3;m=b.h;a[d++]=a[c++]=m&255;a[d++]=a[c++]=m>>8&255;a[d++]=a[c++]=m>>16&255;a[d++]=a[c++]=m>>24&255;h=b.buffer.length;a[d++]=a[c++]=h&255;a[d++]=a[c++]=h>>8&255;a[d++]=a[c++]=h>>16&255;a[d++]=a[c++]=h>>24&255;s=b.size;a[d++]=a[c++]=s&255;a[d++]=a[c++]=s>>8&255;a[d++]=a[c++]=s>>16&255;a[d++]=a[c++]=s>>24&255;a[d++]=a[c++]=t&255;a[d++]=a[c++]=t>>8&255;a[d++]=a[c++]=0;a[d++]=a[c++]=0;a[c++]=r&255;a[c++]=r>>8&255;a[c++]=0;a[c++]=0;a[c++]=0;a[c++]=0;a[c++]=0;a[c++]=0;a[c++]=
|
||||
0;a[c++]=0;a[c++]=k&255;a[c++]=k>>8&255;a[c++]=k>>16&255;a[c++]=k>>24&255;if(Q=b.a.filename)if(H)a.set(Q,d),a.set(Q,c),d+=t,c+=t;else for(g=0;g<t;++g)a[d++]=a[c++]=Q[g];if(z=b.a.extraField)if(H)a.set(z,d),a.set(z,c),d+=0,c+=0;else for(g=0;g<r;++g)a[d++]=a[c++]=z[g];if(A=b.a.comment)if(H)a.set(A,c),c+=r;else for(g=0;g<r;++g)a[c++]=A[g];if(H)a.set(b.buffer,d),d+=b.buffer.length;else{g=0;for(J=b.buffer.length;g<J;++g)a[d++]=b.buffer[g]}}a[f++]=Oa[0];a[f++]=Oa[1];a[f++]=Oa[2];a[f++]=Oa[3];a[f++]=0;a[f++]=
|
||||
0;a[f++]=0;a[f++]=0;a[f++]=C&255;a[f++]=C>>8&255;a[f++]=C&255;a[f++]=C>>8&255;a[f++]=p&255;a[f++]=p>>8&255;a[f++]=p>>16&255;a[f++]=p>>24&255;a[f++]=l&255;a[f++]=l>>8&255;a[f++]=l>>16&255;a[f++]=l>>24&255;r=this.d?this.d.length:0;a[f++]=r&255;a[f++]=r>>8&255;if(this.d)if(H)a.set(this.d,f);else{g=0;for(J=r;g<J;++g)a[f++]=this.d[g]}return a};function Qa(e,b){var a,d=e[2]&65535|2;a=d*(d^1)>>8&255;Pa(e,b);return a^b}
|
||||
function Pa(e,b){e[0]=(V[(e[0]^b)&255]^e[0]>>>8)>>>0;e[1]=(6681*(20173*(e[1]+(e[0]&255))>>>0)>>>0)+1>>>0;e[2]=(V[(e[2]^e[1]>>>24)&255]^e[2]>>>8)>>>0};function Ra(e,b){var a,d,c,f;if(Object.keys)a=Object.keys(b);else for(d in a=[],c=0,b)a[c++]=d;c=0;for(f=a.length;c<f;++c)d=a[c],G(e+"."+d,b[d])};G("Zlib.Zip",$);G("Zlib.Zip.prototype.addFile",$.prototype.m);G("Zlib.Zip.prototype.compress",$.prototype.g);G("Zlib.Zip.prototype.setPassword",$.prototype.q);Ra("Zlib.Zip.CompressionMethod",{STORE:0,DEFLATE:8});Ra("Zlib.Zip.OperatingSystem",{MSDOS:0,UNIX:3,MACINTOSH:7});}).call(this); //@ sourceMappingURL=zip.min.js.map
|
||||
File diff suppressed because one or more lines are too long
39
ControlPanel/js/zlib/zlib.min.js
vendored
39
ControlPanel/js/zlib/zlib.min.js
vendored
|
|
@ -1,39 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';function l(d){throw d;}var v=void 0,x=!0,aa=this;function D(d,a){var c=d.split("."),e=aa;!(c[0]in e)&&e.execScript&&e.execScript("var "+c[0]);for(var b;c.length&&(b=c.shift());)!c.length&&a!==v?e[b]=a:e=e[b]?e[b]:e[b]={}};var F="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function H(d,a){this.index="number"===typeof a?a:0;this.i=0;this.buffer=d instanceof(F?Uint8Array:Array)?d:new (F?Uint8Array:Array)(32768);2*this.buffer.length<=this.index&&l(Error("invalid index"));this.buffer.length<=this.index&&this.f()}H.prototype.f=function(){var d=this.buffer,a,c=d.length,e=new (F?Uint8Array:Array)(c<<1);if(F)e.set(d);else for(a=0;a<c;++a)e[a]=d[a];return this.buffer=e};
|
||||
H.prototype.d=function(d,a,c){var e=this.buffer,b=this.index,f=this.i,g=e[b],h;c&&1<a&&(d=8<a?(N[d&255]<<24|N[d>>>8&255]<<16|N[d>>>16&255]<<8|N[d>>>24&255])>>32-a:N[d]>>8-a);if(8>a+f)g=g<<a|d,f+=a;else for(h=0;h<a;++h)g=g<<1|d>>a-h-1&1,8===++f&&(f=0,e[b++]=N[g],g=0,b===e.length&&(e=this.f()));e[b]=g;this.buffer=e;this.i=f;this.index=b};H.prototype.finish=function(){var d=this.buffer,a=this.index,c;0<this.i&&(d[a]<<=8-this.i,d[a]=N[d[a]],a++);F?c=d.subarray(0,a):(d.length=a,c=d);return c};
|
||||
var fa=new (F?Uint8Array:Array)(256),O;for(O=0;256>O;++O){for(var P=O,Q=P,ga=7,P=P>>>1;P;P>>>=1)Q<<=1,Q|=P&1,--ga;fa[O]=(Q<<ga&255)>>>0}var N=fa;function ha(d){this.buffer=new (F?Uint16Array:Array)(2*d);this.length=0}ha.prototype.getParent=function(d){return 2*((d-2)/4|0)};ha.prototype.push=function(d,a){var c,e,b=this.buffer,f;c=this.length;b[this.length++]=a;for(b[this.length++]=d;0<c;)if(e=this.getParent(c),b[c]>b[e])f=b[c],b[c]=b[e],b[e]=f,f=b[c+1],b[c+1]=b[e+1],b[e+1]=f,c=e;else break;return this.length};
|
||||
ha.prototype.pop=function(){var d,a,c=this.buffer,e,b,f;a=c[0];d=c[1];this.length-=2;c[0]=c[this.length];c[1]=c[this.length+1];for(f=0;;){b=2*f+2;if(b>=this.length)break;b+2<this.length&&c[b+2]>c[b]&&(b+=2);if(c[b]>c[f])e=c[f],c[f]=c[b],c[b]=e,e=c[f+1],c[f+1]=c[b+1],c[b+1]=e;else break;f=b}return{index:d,value:a,length:this.length}};function R(d){var a=d.length,c=0,e=Number.POSITIVE_INFINITY,b,f,g,h,k,n,q,r,p,m;for(r=0;r<a;++r)d[r]>c&&(c=d[r]),d[r]<e&&(e=d[r]);b=1<<c;f=new (F?Uint32Array:Array)(b);g=1;h=0;for(k=2;g<=c;){for(r=0;r<a;++r)if(d[r]===g){n=0;q=h;for(p=0;p<g;++p)n=n<<1|q&1,q>>=1;m=g<<16|r;for(p=n;p<b;p+=k)f[p]=m;++h}++g;h<<=1;k<<=1}return[f,c,e]};function ia(d,a){this.h=ma;this.w=0;this.input=F&&d instanceof Array?new Uint8Array(d):d;this.b=0;a&&(a.lazy&&(this.w=a.lazy),"number"===typeof a.compressionType&&(this.h=a.compressionType),a.outputBuffer&&(this.a=F&&a.outputBuffer instanceof Array?new Uint8Array(a.outputBuffer):a.outputBuffer),"number"===typeof a.outputIndex&&(this.b=a.outputIndex));this.a||(this.a=new (F?Uint8Array:Array)(32768))}var ma=2,na={NONE:0,r:1,k:ma,O:3},oa=[],S;
|
||||
for(S=0;288>S;S++)switch(x){case 143>=S:oa.push([S+48,8]);break;case 255>=S:oa.push([S-144+400,9]);break;case 279>=S:oa.push([S-256+0,7]);break;case 287>=S:oa.push([S-280+192,8]);break;default:l("invalid literal: "+S)}
|
||||
ia.prototype.j=function(){var d,a,c,e,b=this.input;switch(this.h){case 0:c=0;for(e=b.length;c<e;){a=F?b.subarray(c,c+65535):b.slice(c,c+65535);c+=a.length;var f=a,g=c===e,h=v,k=v,n=v,q=v,r=v,p=this.a,m=this.b;if(F){for(p=new Uint8Array(this.a.buffer);p.length<=m+f.length+5;)p=new Uint8Array(p.length<<1);p.set(this.a)}h=g?1:0;p[m++]=h|0;k=f.length;n=~k+65536&65535;p[m++]=k&255;p[m++]=k>>>8&255;p[m++]=n&255;p[m++]=n>>>8&255;if(F)p.set(f,m),m+=f.length,p=p.subarray(0,m);else{q=0;for(r=f.length;q<r;++q)p[m++]=
|
||||
f[q];p.length=m}this.b=m;this.a=p}break;case 1:var s=new H(F?new Uint8Array(this.a.buffer):this.a,this.b);s.d(1,1,x);s.d(1,2,x);var w=pa(this,b),y,ja,A;y=0;for(ja=w.length;y<ja;y++)if(A=w[y],H.prototype.d.apply(s,oa[A]),256<A)s.d(w[++y],w[++y],x),s.d(w[++y],5),s.d(w[++y],w[++y],x);else if(256===A)break;this.a=s.finish();this.b=this.a.length;break;case ma:var C=new H(F?new Uint8Array(this.a.buffer):this.a,this.b),Ea,M,U,V,W,gb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],ba,Fa,ca,Ga,ka,ra=Array(19),
|
||||
Ha,X,la,z,Ia;Ea=ma;C.d(1,1,x);C.d(Ea,2,x);M=pa(this,b);ba=qa(this.M,15);Fa=sa(ba);ca=qa(this.L,7);Ga=sa(ca);for(U=286;257<U&&0===ba[U-1];U--);for(V=30;1<V&&0===ca[V-1];V--);var Ja=U,Ka=V,I=new (F?Uint32Array:Array)(Ja+Ka),t,J,u,da,G=new (F?Uint32Array:Array)(316),E,B,K=new (F?Uint8Array:Array)(19);for(t=J=0;t<Ja;t++)I[J++]=ba[t];for(t=0;t<Ka;t++)I[J++]=ca[t];if(!F){t=0;for(da=K.length;t<da;++t)K[t]=0}t=E=0;for(da=I.length;t<da;t+=J){for(J=1;t+J<da&&I[t+J]===I[t];++J);u=J;if(0===I[t])if(3>u)for(;0<
|
||||
u--;)G[E++]=0,K[0]++;else for(;0<u;)B=138>u?u:138,B>u-3&&B<u&&(B=u-3),10>=B?(G[E++]=17,G[E++]=B-3,K[17]++):(G[E++]=18,G[E++]=B-11,K[18]++),u-=B;else if(G[E++]=I[t],K[I[t]]++,u--,3>u)for(;0<u--;)G[E++]=I[t],K[I[t]]++;else for(;0<u;)B=6>u?u:6,B>u-3&&B<u&&(B=u-3),G[E++]=16,G[E++]=B-3,K[16]++,u-=B}d=F?G.subarray(0,E):G.slice(0,E);ka=qa(K,7);for(z=0;19>z;z++)ra[z]=ka[gb[z]];for(W=19;4<W&&0===ra[W-1];W--);Ha=sa(ka);C.d(U-257,5,x);C.d(V-1,5,x);C.d(W-4,4,x);for(z=0;z<W;z++)C.d(ra[z],3,x);z=0;for(Ia=d.length;z<
|
||||
Ia;z++)if(X=d[z],C.d(Ha[X],ka[X],x),16<=X){z++;switch(X){case 16:la=2;break;case 17:la=3;break;case 18:la=7;break;default:l("invalid code: "+X)}C.d(d[z],la,x)}var La=[Fa,ba],Ma=[Ga,ca],L,Na,ea,ua,Oa,Pa,Qa,Ra;Oa=La[0];Pa=La[1];Qa=Ma[0];Ra=Ma[1];L=0;for(Na=M.length;L<Na;++L)if(ea=M[L],C.d(Oa[ea],Pa[ea],x),256<ea)C.d(M[++L],M[++L],x),ua=M[++L],C.d(Qa[ua],Ra[ua],x),C.d(M[++L],M[++L],x);else if(256===ea)break;this.a=C.finish();this.b=this.a.length;break;default:l("invalid compression type")}return this.a};
|
||||
function ta(d,a){this.length=d;this.H=a}
|
||||
var va=function(){function d(b){switch(x){case 3===b:return[257,b-3,0];case 4===b:return[258,b-4,0];case 5===b:return[259,b-5,0];case 6===b:return[260,b-6,0];case 7===b:return[261,b-7,0];case 8===b:return[262,b-8,0];case 9===b:return[263,b-9,0];case 10===b:return[264,b-10,0];case 12>=b:return[265,b-11,1];case 14>=b:return[266,b-13,1];case 16>=b:return[267,b-15,1];case 18>=b:return[268,b-17,1];case 22>=b:return[269,b-19,2];case 26>=b:return[270,b-23,2];case 30>=b:return[271,b-27,2];case 34>=b:return[272,
|
||||
b-31,2];case 42>=b:return[273,b-35,3];case 50>=b:return[274,b-43,3];case 58>=b:return[275,b-51,3];case 66>=b:return[276,b-59,3];case 82>=b:return[277,b-67,4];case 98>=b:return[278,b-83,4];case 114>=b:return[279,b-99,4];case 130>=b:return[280,b-115,4];case 162>=b:return[281,b-131,5];case 194>=b:return[282,b-163,5];case 226>=b:return[283,b-195,5];case 257>=b:return[284,b-227,5];case 258===b:return[285,b-258,0];default:l("invalid length: "+b)}}var a=[],c,e;for(c=3;258>=c;c++)e=d(c),a[c]=e[2]<<24|e[1]<<
|
||||
16|e[0];return a}(),wa=F?new Uint32Array(va):va;
|
||||
function pa(d,a){function c(b,c){var a=b.H,d=[],e=0,f;f=wa[b.length];d[e++]=f&65535;d[e++]=f>>16&255;d[e++]=f>>24;var g;switch(x){case 1===a:g=[0,a-1,0];break;case 2===a:g=[1,a-2,0];break;case 3===a:g=[2,a-3,0];break;case 4===a:g=[3,a-4,0];break;case 6>=a:g=[4,a-5,1];break;case 8>=a:g=[5,a-7,1];break;case 12>=a:g=[6,a-9,2];break;case 16>=a:g=[7,a-13,2];break;case 24>=a:g=[8,a-17,3];break;case 32>=a:g=[9,a-25,3];break;case 48>=a:g=[10,a-33,4];break;case 64>=a:g=[11,a-49,4];break;case 96>=a:g=[12,a-
|
||||
65,5];break;case 128>=a:g=[13,a-97,5];break;case 192>=a:g=[14,a-129,6];break;case 256>=a:g=[15,a-193,6];break;case 384>=a:g=[16,a-257,7];break;case 512>=a:g=[17,a-385,7];break;case 768>=a:g=[18,a-513,8];break;case 1024>=a:g=[19,a-769,8];break;case 1536>=a:g=[20,a-1025,9];break;case 2048>=a:g=[21,a-1537,9];break;case 3072>=a:g=[22,a-2049,10];break;case 4096>=a:g=[23,a-3073,10];break;case 6144>=a:g=[24,a-4097,11];break;case 8192>=a:g=[25,a-6145,11];break;case 12288>=a:g=[26,a-8193,12];break;case 16384>=
|
||||
a:g=[27,a-12289,12];break;case 24576>=a:g=[28,a-16385,13];break;case 32768>=a:g=[29,a-24577,13];break;default:l("invalid distance")}f=g;d[e++]=f[0];d[e++]=f[1];d[e++]=f[2];var h,k;h=0;for(k=d.length;h<k;++h)p[m++]=d[h];w[d[0]]++;y[d[3]]++;s=b.length+c-1;r=null}var e,b,f,g,h,k={},n,q,r,p=F?new Uint16Array(2*a.length):[],m=0,s=0,w=new (F?Uint32Array:Array)(286),y=new (F?Uint32Array:Array)(30),ja=d.w,A;if(!F){for(f=0;285>=f;)w[f++]=0;for(f=0;29>=f;)y[f++]=0}w[256]=1;e=0;for(b=a.length;e<b;++e){f=h=0;
|
||||
for(g=3;f<g&&e+f!==b;++f)h=h<<8|a[e+f];k[h]===v&&(k[h]=[]);n=k[h];if(!(0<s--)){for(;0<n.length&&32768<e-n[0];)n.shift();if(e+3>=b){r&&c(r,-1);f=0;for(g=b-e;f<g;++f)A=a[e+f],p[m++]=A,++w[A];break}0<n.length?(q=xa(a,e,n),r?r.length<q.length?(A=a[e-1],p[m++]=A,++w[A],c(q,0)):c(r,-1):q.length<ja?r=q:c(q,0)):r?c(r,-1):(A=a[e],p[m++]=A,++w[A])}n.push(e)}p[m++]=256;w[256]++;d.M=w;d.L=y;return F?p.subarray(0,m):p}
|
||||
function xa(d,a,c){var e,b,f=0,g,h,k,n,q=d.length;h=0;n=c.length;a:for(;h<n;h++){e=c[n-h-1];g=3;if(3<f){for(k=f;3<k;k--)if(d[e+k-1]!==d[a+k-1])continue a;g=f}for(;258>g&&a+g<q&&d[e+g]===d[a+g];)++g;g>f&&(b=e,f=g);if(258===g)break}return new ta(f,a-b)}
|
||||
function qa(d,a){var c=d.length,e=new ha(572),b=new (F?Uint8Array:Array)(c),f,g,h,k,n;if(!F)for(k=0;k<c;k++)b[k]=0;for(k=0;k<c;++k)0<d[k]&&e.push(k,d[k]);f=Array(e.length/2);g=new (F?Uint32Array:Array)(e.length/2);if(1===f.length)return b[e.pop().index]=1,b;k=0;for(n=e.length/2;k<n;++k)f[k]=e.pop(),g[k]=f[k].value;h=ya(g,g.length,a);k=0;for(n=f.length;k<n;++k)b[f[k].index]=h[k];return b}
|
||||
function ya(d,a,c){function e(b){var c=k[b][n[b]];c===a?(e(b+1),e(b+1)):--g[c];++n[b]}var b=new (F?Uint16Array:Array)(c),f=new (F?Uint8Array:Array)(c),g=new (F?Uint8Array:Array)(a),h=Array(c),k=Array(c),n=Array(c),q=(1<<c)-a,r=1<<c-1,p,m,s,w,y;b[c-1]=a;for(m=0;m<c;++m)q<r?f[m]=0:(f[m]=1,q-=r),q<<=1,b[c-2-m]=(b[c-1-m]/2|0)+a;b[0]=f[0];h[0]=Array(b[0]);k[0]=Array(b[0]);for(m=1;m<c;++m)b[m]>2*b[m-1]+f[m]&&(b[m]=2*b[m-1]+f[m]),h[m]=Array(b[m]),k[m]=Array(b[m]);for(p=0;p<a;++p)g[p]=c;for(s=0;s<b[c-1];++s)h[c-
|
||||
1][s]=d[s],k[c-1][s]=s;for(p=0;p<c;++p)n[p]=0;1===f[c-1]&&(--g[0],++n[c-1]);for(m=c-2;0<=m;--m){w=p=0;y=n[m+1];for(s=0;s<b[m];s++)w=h[m+1][y]+h[m+1][y+1],w>d[p]?(h[m][s]=w,k[m][s]=a,y+=2):(h[m][s]=d[p],k[m][s]=p,++p);n[m]=0;1===f[m]&&e(m)}return g}
|
||||
function sa(d){var a=new (F?Uint16Array:Array)(d.length),c=[],e=[],b=0,f,g,h,k;f=0;for(g=d.length;f<g;f++)c[d[f]]=(c[d[f]]|0)+1;f=1;for(g=16;f<=g;f++)e[f]=b,b+=c[f]|0,b<<=1;f=0;for(g=d.length;f<g;f++){b=e[d[f]];e[d[f]]+=1;h=a[f]=0;for(k=d[f];h<k;h++)a[f]=a[f]<<1|b&1,b>>>=1}return a};function T(d,a){this.l=[];this.m=32768;this.e=this.g=this.c=this.q=0;this.input=F?new Uint8Array(d):d;this.s=!1;this.n=za;this.C=!1;if(a||!(a={}))a.index&&(this.c=a.index),a.bufferSize&&(this.m=a.bufferSize),a.bufferType&&(this.n=a.bufferType),a.resize&&(this.C=a.resize);switch(this.n){case Aa:this.b=32768;this.a=new (F?Uint8Array:Array)(32768+this.m+258);break;case za:this.b=0;this.a=new (F?Uint8Array:Array)(this.m);this.f=this.K;this.t=this.I;this.o=this.J;break;default:l(Error("invalid inflate mode"))}}
|
||||
var Aa=0,za=1,Ba={F:Aa,D:za};
|
||||
T.prototype.p=function(){for(;!this.s;){var d=Y(this,3);d&1&&(this.s=x);d>>>=1;switch(d){case 0:var a=this.input,c=this.c,e=this.a,b=this.b,f=a.length,g=v,h=v,k=e.length,n=v;this.e=this.g=0;c+1>=f&&l(Error("invalid uncompressed block header: LEN"));g=a[c++]|a[c++]<<8;c+1>=f&&l(Error("invalid uncompressed block header: NLEN"));h=a[c++]|a[c++]<<8;g===~h&&l(Error("invalid uncompressed block header: length verify"));c+g>a.length&&l(Error("input buffer is broken"));switch(this.n){case Aa:for(;b+g>e.length;){n=
|
||||
k-b;g-=n;if(F)e.set(a.subarray(c,c+n),b),b+=n,c+=n;else for(;n--;)e[b++]=a[c++];this.b=b;e=this.f();b=this.b}break;case za:for(;b+g>e.length;)e=this.f({v:2});break;default:l(Error("invalid inflate mode"))}if(F)e.set(a.subarray(c,c+g),b),b+=g,c+=g;else for(;g--;)e[b++]=a[c++];this.c=c;this.b=b;this.a=e;break;case 1:this.o(Ca,Da);break;case 2:Sa(this);break;default:l(Error("unknown BTYPE: "+d))}}return this.t()};
|
||||
var Ta=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],Ua=F?new Uint16Array(Ta):Ta,Va=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],Wa=F?new Uint16Array(Va):Va,Xa=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],Ya=F?new Uint8Array(Xa):Xa,Za=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],$a=F?new Uint16Array(Za):Za,ab=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,
|
||||
10,11,11,12,12,13,13],bb=F?new Uint8Array(ab):ab,cb=new (F?Uint8Array:Array)(288),Z,db;Z=0;for(db=cb.length;Z<db;++Z)cb[Z]=143>=Z?8:255>=Z?9:279>=Z?7:8;var Ca=R(cb),eb=new (F?Uint8Array:Array)(30),fb,hb;fb=0;for(hb=eb.length;fb<hb;++fb)eb[fb]=5;var Da=R(eb);function Y(d,a){for(var c=d.g,e=d.e,b=d.input,f=d.c,g=b.length,h;e<a;)f>=g&&l(Error("input buffer is broken")),c|=b[f++]<<e,e+=8;h=c&(1<<a)-1;d.g=c>>>a;d.e=e-a;d.c=f;return h}
|
||||
function ib(d,a){for(var c=d.g,e=d.e,b=d.input,f=d.c,g=b.length,h=a[0],k=a[1],n,q;e<k&&!(f>=g);)c|=b[f++]<<e,e+=8;n=h[c&(1<<k)-1];q=n>>>16;d.g=c>>q;d.e=e-q;d.c=f;return n&65535}
|
||||
function Sa(d){function a(a,b,c){var d,e=this.z,f,g;for(g=0;g<a;)switch(d=ib(this,b),d){case 16:for(f=3+Y(this,2);f--;)c[g++]=e;break;case 17:for(f=3+Y(this,3);f--;)c[g++]=0;e=0;break;case 18:for(f=11+Y(this,7);f--;)c[g++]=0;e=0;break;default:e=c[g++]=d}this.z=e;return c}var c=Y(d,5)+257,e=Y(d,5)+1,b=Y(d,4)+4,f=new (F?Uint8Array:Array)(Ua.length),g,h,k,n;for(n=0;n<b;++n)f[Ua[n]]=Y(d,3);if(!F){n=b;for(b=f.length;n<b;++n)f[Ua[n]]=0}g=R(f);h=new (F?Uint8Array:Array)(c);k=new (F?Uint8Array:Array)(e);
|
||||
d.z=0;d.o(R(a.call(d,c,g,h)),R(a.call(d,e,g,k)))}T.prototype.o=function(d,a){var c=this.a,e=this.b;this.u=d;for(var b=c.length-258,f,g,h,k;256!==(f=ib(this,d));)if(256>f)e>=b&&(this.b=e,c=this.f(),e=this.b),c[e++]=f;else{g=f-257;k=Wa[g];0<Ya[g]&&(k+=Y(this,Ya[g]));f=ib(this,a);h=$a[f];0<bb[f]&&(h+=Y(this,bb[f]));e>=b&&(this.b=e,c=this.f(),e=this.b);for(;k--;)c[e]=c[e++-h]}for(;8<=this.e;)this.e-=8,this.c--;this.b=e};
|
||||
T.prototype.J=function(d,a){var c=this.a,e=this.b;this.u=d;for(var b=c.length,f,g,h,k;256!==(f=ib(this,d));)if(256>f)e>=b&&(c=this.f(),b=c.length),c[e++]=f;else{g=f-257;k=Wa[g];0<Ya[g]&&(k+=Y(this,Ya[g]));f=ib(this,a);h=$a[f];0<bb[f]&&(h+=Y(this,bb[f]));e+k>b&&(c=this.f(),b=c.length);for(;k--;)c[e]=c[e++-h]}for(;8<=this.e;)this.e-=8,this.c--;this.b=e};
|
||||
T.prototype.f=function(){var d=new (F?Uint8Array:Array)(this.b-32768),a=this.b-32768,c,e,b=this.a;if(F)d.set(b.subarray(32768,d.length));else{c=0;for(e=d.length;c<e;++c)d[c]=b[c+32768]}this.l.push(d);this.q+=d.length;if(F)b.set(b.subarray(a,a+32768));else for(c=0;32768>c;++c)b[c]=b[a+c];this.b=32768;return b};
|
||||
T.prototype.K=function(d){var a,c=this.input.length/this.c+1|0,e,b,f,g=this.input,h=this.a;d&&("number"===typeof d.v&&(c=d.v),"number"===typeof d.G&&(c+=d.G));2>c?(e=(g.length-this.c)/this.u[2],f=258*(e/2)|0,b=f<h.length?h.length+f:h.length<<1):b=h.length*c;F?(a=new Uint8Array(b),a.set(h)):a=h;return this.a=a};
|
||||
T.prototype.t=function(){var d=0,a=this.a,c=this.l,e,b=new (F?Uint8Array:Array)(this.q+(this.b-32768)),f,g,h,k;if(0===c.length)return F?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);f=0;for(g=c.length;f<g;++f){e=c[f];h=0;for(k=e.length;h<k;++h)b[d++]=e[h]}f=32768;for(g=this.b;f<g;++f)b[d++]=a[f];this.l=[];return this.buffer=b};
|
||||
T.prototype.I=function(){var d,a=this.b;F?this.C?(d=new Uint8Array(a),d.set(this.a.subarray(0,a))):d=this.a.subarray(0,a):(this.a.length>a&&(this.a.length=a),d=this.a);return this.buffer=d};function jb(d){if("string"===typeof d){var a=d.split(""),c,e;c=0;for(e=a.length;c<e;c++)a[c]=(a[c].charCodeAt(0)&255)>>>0;d=a}for(var b=1,f=0,g=d.length,h,k=0;0<g;){h=1024<g?1024:g;g-=h;do b+=d[k++],f+=b;while(--h);b%=65521;f%=65521}return(f<<16|b)>>>0};function kb(d,a){var c,e;this.input=d;this.c=0;if(a||!(a={}))a.index&&(this.c=a.index),a.verify&&(this.N=a.verify);c=d[this.c++];e=d[this.c++];switch(c&15){case lb:this.method=lb;break;default:l(Error("unsupported compression method"))}0!==((c<<8)+e)%31&&l(Error("invalid fcheck flag:"+((c<<8)+e)%31));e&32&&l(Error("fdict flag is not supported"));this.B=new T(d,{index:this.c,bufferSize:a.bufferSize,bufferType:a.bufferType,resize:a.resize})}
|
||||
kb.prototype.p=function(){var d=this.input,a,c;a=this.B.p();this.c=this.B.c;this.N&&(c=(d[this.c++]<<24|d[this.c++]<<16|d[this.c++]<<8|d[this.c++])>>>0,c!==jb(a)&&l(Error("invalid adler-32 checksum")));return a};var lb=8;function mb(d,a){this.input=d;this.a=new (F?Uint8Array:Array)(32768);this.h=$.k;var c={},e;if((a||!(a={}))&&"number"===typeof a.compressionType)this.h=a.compressionType;for(e in a)c[e]=a[e];c.outputBuffer=this.a;this.A=new ia(this.input,c)}var $=na;
|
||||
mb.prototype.j=function(){var d,a,c,e,b,f,g,h=0;g=this.a;d=lb;switch(d){case lb:a=Math.LOG2E*Math.log(32768)-8;break;default:l(Error("invalid compression method"))}c=a<<4|d;g[h++]=c;switch(d){case lb:switch(this.h){case $.NONE:b=0;break;case $.r:b=1;break;case $.k:b=2;break;default:l(Error("unsupported compression type"))}break;default:l(Error("invalid compression method"))}e=b<<6|0;g[h++]=e|31-(256*c+e)%31;f=jb(this.input);this.A.b=h;g=this.A.j();h=g.length;F&&(g=new Uint8Array(g.buffer),g.length<=
|
||||
h+4&&(this.a=new Uint8Array(g.length+4),this.a.set(g),g=this.a),g=g.subarray(0,h+4));g[h++]=f>>24&255;g[h++]=f>>16&255;g[h++]=f>>8&255;g[h++]=f&255;return g};function nb(d,a){var c,e,b,f;if(Object.keys)c=Object.keys(a);else for(e in c=[],b=0,a)c[b++]=e;b=0;for(f=c.length;b<f;++b)e=c[b],D(d+"."+e,a[e])};D("Zlib.Inflate",kb);D("Zlib.Inflate.prototype.decompress",kb.prototype.p);nb("Zlib.Inflate.BufferType",{ADAPTIVE:Ba.D,BLOCK:Ba.F});D("Zlib.Deflate",mb);D("Zlib.Deflate.compress",function(d,a){return(new mb(d,a)).j()});D("Zlib.Deflate.prototype.compress",mb.prototype.j);nb("Zlib.Deflate.CompressionType",{NONE:$.NONE,FIXED:$.r,DYNAMIC:$.k});}).call(this); //@ sourceMappingURL=zlib.min.js.map
|
||||
File diff suppressed because one or more lines are too long
51
ControlPanel/js/zlib/zlib_and_gzip.min.js
vendored
51
ControlPanel/js/zlib/zlib_and_gzip.min.js
vendored
|
|
@ -1,51 +0,0 @@
|
|||
/** @license zlib.js 2012 - imaya [ https://github.com/imaya/zlib.js ] The MIT License */(function() {'use strict';function q(b){throw b;}var t=void 0,u=!0,aa=this;function A(b,a){var c=b.split("."),d=aa;!(c[0]in d)&&d.execScript&&d.execScript("var "+c[0]);for(var e;c.length&&(e=c.shift());)!c.length&&a!==t?d[e]=a:d=d[e]?d[e]:d[e]={}};var B="undefined"!==typeof Uint8Array&&"undefined"!==typeof Uint16Array&&"undefined"!==typeof Uint32Array&&"undefined"!==typeof DataView;function F(b,a){this.index="number"===typeof a?a:0;this.m=0;this.buffer=b instanceof(B?Uint8Array:Array)?b:new (B?Uint8Array:Array)(32768);2*this.buffer.length<=this.index&&q(Error("invalid index"));this.buffer.length<=this.index&&this.f()}F.prototype.f=function(){var b=this.buffer,a,c=b.length,d=new (B?Uint8Array:Array)(c<<1);if(B)d.set(b);else for(a=0;a<c;++a)d[a]=b[a];return this.buffer=d};
|
||||
F.prototype.d=function(b,a,c){var d=this.buffer,e=this.index,f=this.m,g=d[e],k;c&&1<a&&(b=8<a?(H[b&255]<<24|H[b>>>8&255]<<16|H[b>>>16&255]<<8|H[b>>>24&255])>>32-a:H[b]>>8-a);if(8>a+f)g=g<<a|b,f+=a;else for(k=0;k<a;++k)g=g<<1|b>>a-k-1&1,8===++f&&(f=0,d[e++]=H[g],g=0,e===d.length&&(d=this.f()));d[e]=g;this.buffer=d;this.m=f;this.index=e};F.prototype.finish=function(){var b=this.buffer,a=this.index,c;0<this.m&&(b[a]<<=8-this.m,b[a]=H[b[a]],a++);B?c=b.subarray(0,a):(b.length=a,c=b);return c};
|
||||
var ba=new (B?Uint8Array:Array)(256),ca;for(ca=0;256>ca;++ca){for(var K=ca,da=K,ea=7,K=K>>>1;K;K>>>=1)da<<=1,da|=K&1,--ea;ba[ca]=(da<<ea&255)>>>0}var H=ba;function ja(b,a,c){var d,e="number"===typeof a?a:a=0,f="number"===typeof c?c:b.length;d=-1;for(e=f&7;e--;++a)d=d>>>8^O[(d^b[a])&255];for(e=f>>3;e--;a+=8)d=d>>>8^O[(d^b[a])&255],d=d>>>8^O[(d^b[a+1])&255],d=d>>>8^O[(d^b[a+2])&255],d=d>>>8^O[(d^b[a+3])&255],d=d>>>8^O[(d^b[a+4])&255],d=d>>>8^O[(d^b[a+5])&255],d=d>>>8^O[(d^b[a+6])&255],d=d>>>8^O[(d^b[a+7])&255];return(d^4294967295)>>>0}
|
||||
var ka=[0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,
|
||||
2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,
|
||||
2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,
|
||||
2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,
|
||||
3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,
|
||||
936918E3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117],O=B?new Uint32Array(ka):ka;function P(){}P.prototype.getName=function(){return this.name};P.prototype.getData=function(){return this.data};P.prototype.Y=function(){return this.Z};A("Zlib.GunzipMember",P);A("Zlib.GunzipMember.prototype.getName",P.prototype.getName);A("Zlib.GunzipMember.prototype.getData",P.prototype.getData);A("Zlib.GunzipMember.prototype.getMtime",P.prototype.Y);function la(b){this.buffer=new (B?Uint16Array:Array)(2*b);this.length=0}la.prototype.getParent=function(b){return 2*((b-2)/4|0)};la.prototype.push=function(b,a){var c,d,e=this.buffer,f;c=this.length;e[this.length++]=a;for(e[this.length++]=b;0<c;)if(d=this.getParent(c),e[c]>e[d])f=e[c],e[c]=e[d],e[d]=f,f=e[c+1],e[c+1]=e[d+1],e[d+1]=f,c=d;else break;return this.length};
|
||||
la.prototype.pop=function(){var b,a,c=this.buffer,d,e,f;a=c[0];b=c[1];this.length-=2;c[0]=c[this.length];c[1]=c[this.length+1];for(f=0;;){e=2*f+2;if(e>=this.length)break;e+2<this.length&&c[e+2]>c[e]&&(e+=2);if(c[e]>c[f])d=c[f],c[f]=c[e],c[e]=d,d=c[f+1],c[f+1]=c[e+1],c[e+1]=d;else break;f=e}return{index:b,value:a,length:this.length}};function ma(b){var a=b.length,c=0,d=Number.POSITIVE_INFINITY,e,f,g,k,h,l,s,p,m,n;for(p=0;p<a;++p)b[p]>c&&(c=b[p]),b[p]<d&&(d=b[p]);e=1<<c;f=new (B?Uint32Array:Array)(e);g=1;k=0;for(h=2;g<=c;){for(p=0;p<a;++p)if(b[p]===g){l=0;s=k;for(m=0;m<g;++m)l=l<<1|s&1,s>>=1;n=g<<16|p;for(m=l;m<e;m+=h)f[m]=n;++k}++g;k<<=1;h<<=1}return[f,c,d]};function na(b,a){this.k=qa;this.I=0;this.input=B&&b instanceof Array?new Uint8Array(b):b;this.b=0;a&&(a.lazy&&(this.I=a.lazy),"number"===typeof a.compressionType&&(this.k=a.compressionType),a.outputBuffer&&(this.a=B&&a.outputBuffer instanceof Array?new Uint8Array(a.outputBuffer):a.outputBuffer),"number"===typeof a.outputIndex&&(this.b=a.outputIndex));this.a||(this.a=new (B?Uint8Array:Array)(32768))}var qa=2,ra={NONE:0,v:1,o:qa,ba:3},sa=[],S;
|
||||
for(S=0;288>S;S++)switch(u){case 143>=S:sa.push([S+48,8]);break;case 255>=S:sa.push([S-144+400,9]);break;case 279>=S:sa.push([S-256+0,7]);break;case 287>=S:sa.push([S-280+192,8]);break;default:q("invalid literal: "+S)}
|
||||
na.prototype.g=function(){var b,a,c,d,e=this.input;switch(this.k){case 0:c=0;for(d=e.length;c<d;){a=B?e.subarray(c,c+65535):e.slice(c,c+65535);c+=a.length;var f=a,g=c===d,k=t,h=t,l=t,s=t,p=t,m=this.a,n=this.b;if(B){for(m=new Uint8Array(this.a.buffer);m.length<=n+f.length+5;)m=new Uint8Array(m.length<<1);m.set(this.a)}k=g?1:0;m[n++]=k|0;h=f.length;l=~h+65536&65535;m[n++]=h&255;m[n++]=h>>>8&255;m[n++]=l&255;m[n++]=l>>>8&255;if(B)m.set(f,n),n+=f.length,m=m.subarray(0,n);else{s=0;for(p=f.length;s<p;++s)m[n++]=
|
||||
f[s];m.length=n}this.b=n;this.a=m}break;case 1:var r=new F(B?new Uint8Array(this.a.buffer):this.a,this.b);r.d(1,1,u);r.d(1,2,u);var v=ta(this,e),x,Q,y;x=0;for(Q=v.length;x<Q;x++)if(y=v[x],F.prototype.d.apply(r,sa[y]),256<y)r.d(v[++x],v[++x],u),r.d(v[++x],5),r.d(v[++x],v[++x],u);else if(256===y)break;this.a=r.finish();this.b=this.a.length;break;case qa:var E=new F(B?new Uint8Array(this.a.buffer):this.a,this.b),Ka,R,X,Y,Z,pb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],fa,La,ga,Ma,oa,wa=Array(19),
|
||||
Na,$,pa,C,Oa;Ka=qa;E.d(1,1,u);E.d(Ka,2,u);R=ta(this,e);fa=ua(this.W,15);La=va(fa);ga=ua(this.V,7);Ma=va(ga);for(X=286;257<X&&0===fa[X-1];X--);for(Y=30;1<Y&&0===ga[Y-1];Y--);var Pa=X,Qa=Y,J=new (B?Uint32Array:Array)(Pa+Qa),w,L,z,ha,I=new (B?Uint32Array:Array)(316),G,D,M=new (B?Uint8Array:Array)(19);for(w=L=0;w<Pa;w++)J[L++]=fa[w];for(w=0;w<Qa;w++)J[L++]=ga[w];if(!B){w=0;for(ha=M.length;w<ha;++w)M[w]=0}w=G=0;for(ha=J.length;w<ha;w+=L){for(L=1;w+L<ha&&J[w+L]===J[w];++L);z=L;if(0===J[w])if(3>z)for(;0<
|
||||
z--;)I[G++]=0,M[0]++;else for(;0<z;)D=138>z?z:138,D>z-3&&D<z&&(D=z-3),10>=D?(I[G++]=17,I[G++]=D-3,M[17]++):(I[G++]=18,I[G++]=D-11,M[18]++),z-=D;else if(I[G++]=J[w],M[J[w]]++,z--,3>z)for(;0<z--;)I[G++]=J[w],M[J[w]]++;else for(;0<z;)D=6>z?z:6,D>z-3&&D<z&&(D=z-3),I[G++]=16,I[G++]=D-3,M[16]++,z-=D}b=B?I.subarray(0,G):I.slice(0,G);oa=ua(M,7);for(C=0;19>C;C++)wa[C]=oa[pb[C]];for(Z=19;4<Z&&0===wa[Z-1];Z--);Na=va(oa);E.d(X-257,5,u);E.d(Y-1,5,u);E.d(Z-4,4,u);for(C=0;C<Z;C++)E.d(wa[C],3,u);C=0;for(Oa=b.length;C<
|
||||
Oa;C++)if($=b[C],E.d(Na[$],oa[$],u),16<=$){C++;switch($){case 16:pa=2;break;case 17:pa=3;break;case 18:pa=7;break;default:q("invalid code: "+$)}E.d(b[C],pa,u)}var Ra=[La,fa],Sa=[Ma,ga],N,Ta,ia,za,Ua,Va,Wa,Xa;Ua=Ra[0];Va=Ra[1];Wa=Sa[0];Xa=Sa[1];N=0;for(Ta=R.length;N<Ta;++N)if(ia=R[N],E.d(Ua[ia],Va[ia],u),256<ia)E.d(R[++N],R[++N],u),za=R[++N],E.d(Wa[za],Xa[za],u),E.d(R[++N],R[++N],u);else if(256===ia)break;this.a=E.finish();this.b=this.a.length;break;default:q("invalid compression type")}return this.a};
|
||||
function xa(b,a){this.length=b;this.Q=a}
|
||||
var ya=function(){function b(a){switch(u){case 3===a:return[257,a-3,0];case 4===a:return[258,a-4,0];case 5===a:return[259,a-5,0];case 6===a:return[260,a-6,0];case 7===a:return[261,a-7,0];case 8===a:return[262,a-8,0];case 9===a:return[263,a-9,0];case 10===a:return[264,a-10,0];case 12>=a:return[265,a-11,1];case 14>=a:return[266,a-13,1];case 16>=a:return[267,a-15,1];case 18>=a:return[268,a-17,1];case 22>=a:return[269,a-19,2];case 26>=a:return[270,a-23,2];case 30>=a:return[271,a-27,2];case 34>=a:return[272,
|
||||
a-31,2];case 42>=a:return[273,a-35,3];case 50>=a:return[274,a-43,3];case 58>=a:return[275,a-51,3];case 66>=a:return[276,a-59,3];case 82>=a:return[277,a-67,4];case 98>=a:return[278,a-83,4];case 114>=a:return[279,a-99,4];case 130>=a:return[280,a-115,4];case 162>=a:return[281,a-131,5];case 194>=a:return[282,a-163,5];case 226>=a:return[283,a-195,5];case 257>=a:return[284,a-227,5];case 258===a:return[285,a-258,0];default:q("invalid length: "+a)}}var a=[],c,d;for(c=3;258>=c;c++)d=b(c),a[c]=d[2]<<24|d[1]<<
|
||||
16|d[0];return a}(),Aa=B?new Uint32Array(ya):ya;
|
||||
function ta(b,a){function c(a,c){var b=a.Q,d=[],e=0,f;f=Aa[a.length];d[e++]=f&65535;d[e++]=f>>16&255;d[e++]=f>>24;var g;switch(u){case 1===b:g=[0,b-1,0];break;case 2===b:g=[1,b-2,0];break;case 3===b:g=[2,b-3,0];break;case 4===b:g=[3,b-4,0];break;case 6>=b:g=[4,b-5,1];break;case 8>=b:g=[5,b-7,1];break;case 12>=b:g=[6,b-9,2];break;case 16>=b:g=[7,b-13,2];break;case 24>=b:g=[8,b-17,3];break;case 32>=b:g=[9,b-25,3];break;case 48>=b:g=[10,b-33,4];break;case 64>=b:g=[11,b-49,4];break;case 96>=b:g=[12,b-
|
||||
65,5];break;case 128>=b:g=[13,b-97,5];break;case 192>=b:g=[14,b-129,6];break;case 256>=b:g=[15,b-193,6];break;case 384>=b:g=[16,b-257,7];break;case 512>=b:g=[17,b-385,7];break;case 768>=b:g=[18,b-513,8];break;case 1024>=b:g=[19,b-769,8];break;case 1536>=b:g=[20,b-1025,9];break;case 2048>=b:g=[21,b-1537,9];break;case 3072>=b:g=[22,b-2049,10];break;case 4096>=b:g=[23,b-3073,10];break;case 6144>=b:g=[24,b-4097,11];break;case 8192>=b:g=[25,b-6145,11];break;case 12288>=b:g=[26,b-8193,12];break;case 16384>=
|
||||
b:g=[27,b-12289,12];break;case 24576>=b:g=[28,b-16385,13];break;case 32768>=b:g=[29,b-24577,13];break;default:q("invalid distance")}f=g;d[e++]=f[0];d[e++]=f[1];d[e++]=f[2];var h,k;h=0;for(k=d.length;h<k;++h)m[n++]=d[h];v[d[0]]++;x[d[3]]++;r=a.length+c-1;p=null}var d,e,f,g,k,h={},l,s,p,m=B?new Uint16Array(2*a.length):[],n=0,r=0,v=new (B?Uint32Array:Array)(286),x=new (B?Uint32Array:Array)(30),Q=b.I,y;if(!B){for(f=0;285>=f;)v[f++]=0;for(f=0;29>=f;)x[f++]=0}v[256]=1;d=0;for(e=a.length;d<e;++d){f=k=0;
|
||||
for(g=3;f<g&&d+f!==e;++f)k=k<<8|a[d+f];h[k]===t&&(h[k]=[]);l=h[k];if(!(0<r--)){for(;0<l.length&&32768<d-l[0];)l.shift();if(d+3>=e){p&&c(p,-1);f=0;for(g=e-d;f<g;++f)y=a[d+f],m[n++]=y,++v[y];break}0<l.length?(s=Ba(a,d,l),p?p.length<s.length?(y=a[d-1],m[n++]=y,++v[y],c(s,0)):c(p,-1):s.length<Q?p=s:c(s,0)):p?c(p,-1):(y=a[d],m[n++]=y,++v[y])}l.push(d)}m[n++]=256;v[256]++;b.W=v;b.V=x;return B?m.subarray(0,n):m}
|
||||
function Ba(b,a,c){var d,e,f=0,g,k,h,l,s=b.length;k=0;l=c.length;a:for(;k<l;k++){d=c[l-k-1];g=3;if(3<f){for(h=f;3<h;h--)if(b[d+h-1]!==b[a+h-1])continue a;g=f}for(;258>g&&a+g<s&&b[d+g]===b[a+g];)++g;g>f&&(e=d,f=g);if(258===g)break}return new xa(f,a-e)}
|
||||
function ua(b,a){var c=b.length,d=new la(572),e=new (B?Uint8Array:Array)(c),f,g,k,h,l;if(!B)for(h=0;h<c;h++)e[h]=0;for(h=0;h<c;++h)0<b[h]&&d.push(h,b[h]);f=Array(d.length/2);g=new (B?Uint32Array:Array)(d.length/2);if(1===f.length)return e[d.pop().index]=1,e;h=0;for(l=d.length/2;h<l;++h)f[h]=d.pop(),g[h]=f[h].value;k=Ca(g,g.length,a);h=0;for(l=f.length;h<l;++h)e[f[h].index]=k[h];return e}
|
||||
function Ca(b,a,c){function d(b){var c=h[b][l[b]];c===a?(d(b+1),d(b+1)):--g[c];++l[b]}var e=new (B?Uint16Array:Array)(c),f=new (B?Uint8Array:Array)(c),g=new (B?Uint8Array:Array)(a),k=Array(c),h=Array(c),l=Array(c),s=(1<<c)-a,p=1<<c-1,m,n,r,v,x;e[c-1]=a;for(n=0;n<c;++n)s<p?f[n]=0:(f[n]=1,s-=p),s<<=1,e[c-2-n]=(e[c-1-n]/2|0)+a;e[0]=f[0];k[0]=Array(e[0]);h[0]=Array(e[0]);for(n=1;n<c;++n)e[n]>2*e[n-1]+f[n]&&(e[n]=2*e[n-1]+f[n]),k[n]=Array(e[n]),h[n]=Array(e[n]);for(m=0;m<a;++m)g[m]=c;for(r=0;r<e[c-1];++r)k[c-
|
||||
1][r]=b[r],h[c-1][r]=r;for(m=0;m<c;++m)l[m]=0;1===f[c-1]&&(--g[0],++l[c-1]);for(n=c-2;0<=n;--n){v=m=0;x=l[n+1];for(r=0;r<e[n];r++)v=k[n+1][x]+k[n+1][x+1],v>b[m]?(k[n][r]=v,h[n][r]=a,x+=2):(k[n][r]=b[m],h[n][r]=m,++m);l[n]=0;1===f[n]&&d(n)}return g}
|
||||
function va(b){var a=new (B?Uint16Array:Array)(b.length),c=[],d=[],e=0,f,g,k,h;f=0;for(g=b.length;f<g;f++)c[b[f]]=(c[b[f]]|0)+1;f=1;for(g=16;f<=g;f++)d[f]=e,e+=c[f]|0,e<<=1;f=0;for(g=b.length;f<g;f++){e=d[b[f]];d[b[f]]+=1;k=a[f]=0;for(h=b[f];k<h;k++)a[f]=a[f]<<1|e&1,e>>>=1}return a};function Da(b,a){this.input=b;this.b=this.c=0;this.i={};a&&(a.flags&&(this.i=a.flags),"string"===typeof a.filename&&(this.filename=a.filename),"string"===typeof a.comment&&(this.A=a.comment),a.deflateOptions&&(this.l=a.deflateOptions));this.l||(this.l={})}
|
||||
Da.prototype.g=function(){var b,a,c,d,e,f,g,k,h=new (B?Uint8Array:Array)(32768),l=0,s=this.input,p=this.c,m=this.filename,n=this.A;h[l++]=31;h[l++]=139;h[l++]=8;b=0;this.i.fname&&(b|=Ea);this.i.fcomment&&(b|=Fa);this.i.fhcrc&&(b|=Ga);h[l++]=b;a=(Date.now?Date.now():+new Date)/1E3|0;h[l++]=a&255;h[l++]=a>>>8&255;h[l++]=a>>>16&255;h[l++]=a>>>24&255;h[l++]=0;h[l++]=Ha;if(this.i.fname!==t){g=0;for(k=m.length;g<k;++g)f=m.charCodeAt(g),255<f&&(h[l++]=f>>>8&255),h[l++]=f&255;h[l++]=0}if(this.i.comment){g=
|
||||
0;for(k=n.length;g<k;++g)f=n.charCodeAt(g),255<f&&(h[l++]=f>>>8&255),h[l++]=f&255;h[l++]=0}this.i.fhcrc&&(c=ja(h,0,l)&65535,h[l++]=c&255,h[l++]=c>>>8&255);this.l.outputBuffer=h;this.l.outputIndex=l;e=new na(s,this.l);h=e.g();l=e.b;B&&(l+8>h.buffer.byteLength?(this.a=new Uint8Array(l+8),this.a.set(new Uint8Array(h.buffer)),h=this.a):h=new Uint8Array(h.buffer));d=ja(s,t,t);h[l++]=d&255;h[l++]=d>>>8&255;h[l++]=d>>>16&255;h[l++]=d>>>24&255;k=s.length;h[l++]=k&255;h[l++]=k>>>8&255;h[l++]=k>>>16&255;h[l++]=
|
||||
k>>>24&255;this.c=p;B&&l<h.length&&(this.a=h=h.subarray(0,l));return h};var Ha=255,Ga=2,Ea=8,Fa=16;A("Zlib.Gzip",Da);A("Zlib.Gzip.prototype.compress",Da.prototype.g);function T(b,a){this.p=[];this.q=32768;this.e=this.j=this.c=this.u=0;this.input=B?new Uint8Array(b):b;this.w=!1;this.r=Ia;this.M=!1;if(a||!(a={}))a.index&&(this.c=a.index),a.bufferSize&&(this.q=a.bufferSize),a.bufferType&&(this.r=a.bufferType),a.resize&&(this.M=a.resize);switch(this.r){case Ja:this.b=32768;this.a=new (B?Uint8Array:Array)(32768+this.q+258);break;case Ia:this.b=0;this.a=new (B?Uint8Array:Array)(this.q);this.f=this.U;this.B=this.R;this.s=this.T;break;default:q(Error("invalid inflate mode"))}}
|
||||
var Ja=0,Ia=1,Ya={O:Ja,N:Ia};
|
||||
T.prototype.h=function(){for(;!this.w;){var b=U(this,3);b&1&&(this.w=u);b>>>=1;switch(b){case 0:var a=this.input,c=this.c,d=this.a,e=this.b,f=a.length,g=t,k=t,h=d.length,l=t;this.e=this.j=0;c+1>=f&&q(Error("invalid uncompressed block header: LEN"));g=a[c++]|a[c++]<<8;c+1>=f&&q(Error("invalid uncompressed block header: NLEN"));k=a[c++]|a[c++]<<8;g===~k&&q(Error("invalid uncompressed block header: length verify"));c+g>a.length&&q(Error("input buffer is broken"));switch(this.r){case Ja:for(;e+g>d.length;){l=
|
||||
h-e;g-=l;if(B)d.set(a.subarray(c,c+l),e),e+=l,c+=l;else for(;l--;)d[e++]=a[c++];this.b=e;d=this.f();e=this.b}break;case Ia:for(;e+g>d.length;)d=this.f({F:2});break;default:q(Error("invalid inflate mode"))}if(B)d.set(a.subarray(c,c+g),e),e+=g,c+=g;else for(;g--;)d[e++]=a[c++];this.c=c;this.b=e;this.a=d;break;case 1:this.s(Za,$a);break;case 2:ab(this);break;default:q(Error("unknown BTYPE: "+b))}}return this.B()};
|
||||
var bb=[16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15],cb=B?new Uint16Array(bb):bb,db=[3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,258,258],eb=B?new Uint16Array(db):db,fb=[0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0],gb=B?new Uint8Array(fb):fb,hb=[1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577],ib=B?new Uint16Array(hb):hb,jb=[0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,
|
||||
10,11,11,12,12,13,13],kb=B?new Uint8Array(jb):jb,lb=new (B?Uint8Array:Array)(288),V,mb;V=0;for(mb=lb.length;V<mb;++V)lb[V]=143>=V?8:255>=V?9:279>=V?7:8;var Za=ma(lb),nb=new (B?Uint8Array:Array)(30),ob,qb;ob=0;for(qb=nb.length;ob<qb;++ob)nb[ob]=5;var $a=ma(nb);function U(b,a){for(var c=b.j,d=b.e,e=b.input,f=b.c,g=e.length,k;d<a;)f>=g&&q(Error("input buffer is broken")),c|=e[f++]<<d,d+=8;k=c&(1<<a)-1;b.j=c>>>a;b.e=d-a;b.c=f;return k}
|
||||
function rb(b,a){for(var c=b.j,d=b.e,e=b.input,f=b.c,g=e.length,k=a[0],h=a[1],l,s;d<h&&!(f>=g);)c|=e[f++]<<d,d+=8;l=k[c&(1<<h)-1];s=l>>>16;b.j=c>>s;b.e=d-s;b.c=f;return l&65535}
|
||||
function ab(b){function a(a,b,c){var d,e=this.J,f,g;for(g=0;g<a;)switch(d=rb(this,b),d){case 16:for(f=3+U(this,2);f--;)c[g++]=e;break;case 17:for(f=3+U(this,3);f--;)c[g++]=0;e=0;break;case 18:for(f=11+U(this,7);f--;)c[g++]=0;e=0;break;default:e=c[g++]=d}this.J=e;return c}var c=U(b,5)+257,d=U(b,5)+1,e=U(b,4)+4,f=new (B?Uint8Array:Array)(cb.length),g,k,h,l;for(l=0;l<e;++l)f[cb[l]]=U(b,3);if(!B){l=e;for(e=f.length;l<e;++l)f[cb[l]]=0}g=ma(f);k=new (B?Uint8Array:Array)(c);h=new (B?Uint8Array:Array)(d);
|
||||
b.J=0;b.s(ma(a.call(b,c,g,k)),ma(a.call(b,d,g,h)))}T.prototype.s=function(b,a){var c=this.a,d=this.b;this.C=b;for(var e=c.length-258,f,g,k,h;256!==(f=rb(this,b));)if(256>f)d>=e&&(this.b=d,c=this.f(),d=this.b),c[d++]=f;else{g=f-257;h=eb[g];0<gb[g]&&(h+=U(this,gb[g]));f=rb(this,a);k=ib[f];0<kb[f]&&(k+=U(this,kb[f]));d>=e&&(this.b=d,c=this.f(),d=this.b);for(;h--;)c[d]=c[d++-k]}for(;8<=this.e;)this.e-=8,this.c--;this.b=d};
|
||||
T.prototype.T=function(b,a){var c=this.a,d=this.b;this.C=b;for(var e=c.length,f,g,k,h;256!==(f=rb(this,b));)if(256>f)d>=e&&(c=this.f(),e=c.length),c[d++]=f;else{g=f-257;h=eb[g];0<gb[g]&&(h+=U(this,gb[g]));f=rb(this,a);k=ib[f];0<kb[f]&&(k+=U(this,kb[f]));d+h>e&&(c=this.f(),e=c.length);for(;h--;)c[d]=c[d++-k]}for(;8<=this.e;)this.e-=8,this.c--;this.b=d};
|
||||
T.prototype.f=function(){var b=new (B?Uint8Array:Array)(this.b-32768),a=this.b-32768,c,d,e=this.a;if(B)b.set(e.subarray(32768,b.length));else{c=0;for(d=b.length;c<d;++c)b[c]=e[c+32768]}this.p.push(b);this.u+=b.length;if(B)e.set(e.subarray(a,a+32768));else for(c=0;32768>c;++c)e[c]=e[a+c];this.b=32768;return e};
|
||||
T.prototype.U=function(b){var a,c=this.input.length/this.c+1|0,d,e,f,g=this.input,k=this.a;b&&("number"===typeof b.F&&(c=b.F),"number"===typeof b.P&&(c+=b.P));2>c?(d=(g.length-this.c)/this.C[2],f=258*(d/2)|0,e=f<k.length?k.length+f:k.length<<1):e=k.length*c;B?(a=new Uint8Array(e),a.set(k)):a=k;return this.a=a};
|
||||
T.prototype.B=function(){var b=0,a=this.a,c=this.p,d,e=new (B?Uint8Array:Array)(this.u+(this.b-32768)),f,g,k,h;if(0===c.length)return B?this.a.subarray(32768,this.b):this.a.slice(32768,this.b);f=0;for(g=c.length;f<g;++f){d=c[f];k=0;for(h=d.length;k<h;++k)e[b++]=d[k]}f=32768;for(g=this.b;f<g;++f)e[b++]=a[f];this.p=[];return this.buffer=e};
|
||||
T.prototype.R=function(){var b,a=this.b;B?this.M?(b=new Uint8Array(a),b.set(this.a.subarray(0,a))):b=this.a.subarray(0,a):(this.a.length>a&&(this.a.length=a),b=this.a);return this.buffer=b};function sb(b){this.input=b;this.c=0;this.t=[];this.D=!1}sb.prototype.X=function(){this.D||this.h();return this.t.slice()};
|
||||
sb.prototype.h=function(){for(var b=this.input.length;this.c<b;){var a=new P,c=t,d=t,e=t,f=t,g=t,k=t,h=t,l=t,s=t,p=this.input,m=this.c;a.G=p[m++];a.H=p[m++];(31!==a.G||139!==a.H)&&q(Error("invalid file signature:"+a.G+","+a.H));a.z=p[m++];switch(a.z){case 8:break;default:q(Error("unknown compression method: "+a.z))}a.n=p[m++];l=p[m++]|p[m++]<<8|p[m++]<<16|p[m++]<<24;a.Z=new Date(1E3*l);a.fa=p[m++];a.ea=p[m++];0<(a.n&4)&&(a.aa=p[m++]|p[m++]<<8,m+=a.aa);if(0<(a.n&Ea)){h=[];for(k=0;0<(g=p[m++]);)h[k++]=
|
||||
String.fromCharCode(g);a.name=h.join("")}if(0<(a.n&Fa)){h=[];for(k=0;0<(g=p[m++]);)h[k++]=String.fromCharCode(g);a.A=h.join("")}0<(a.n&Ga)&&(a.S=ja(p,0,m)&65535,a.S!==(p[m++]|p[m++]<<8)&&q(Error("invalid header crc16")));c=p[p.length-4]|p[p.length-3]<<8|p[p.length-2]<<16|p[p.length-1]<<24;p.length-m-4-4<512*c&&(f=c);d=new T(p,{index:m,bufferSize:f});a.data=e=d.h();m=d.c;a.ca=s=(p[m++]|p[m++]<<8|p[m++]<<16|p[m++]<<24)>>>0;ja(e,t,t)!==s&&q(Error("invalid CRC-32 checksum: 0x"+ja(e,t,t).toString(16)+
|
||||
" / 0x"+s.toString(16)));a.da=c=(p[m++]|p[m++]<<8|p[m++]<<16|p[m++]<<24)>>>0;(e.length&4294967295)!==c&&q(Error("invalid input size: "+(e.length&4294967295)+" / "+c));this.t.push(a);this.c=m}this.D=u;var n=this.t,r,v,x=0,Q=0,y;r=0;for(v=n.length;r<v;++r)Q+=n[r].data.length;if(B){y=new Uint8Array(Q);for(r=0;r<v;++r)y.set(n[r].data,x),x+=n[r].data.length}else{y=[];for(r=0;r<v;++r)y[r]=n[r].data;y=Array.prototype.concat.apply([],y)}return y};A("Zlib.Gunzip",sb);A("Zlib.Gunzip.prototype.decompress",sb.prototype.h);A("Zlib.Gunzip.prototype.getMembers",sb.prototype.X);function tb(b){if("string"===typeof b){var a=b.split(""),c,d;c=0;for(d=a.length;c<d;c++)a[c]=(a[c].charCodeAt(0)&255)>>>0;b=a}for(var e=1,f=0,g=b.length,k,h=0;0<g;){k=1024<g?1024:g;g-=k;do e+=b[h++],f+=e;while(--k);e%=65521;f%=65521}return(f<<16|e)>>>0};function ub(b,a){var c,d;this.input=b;this.c=0;if(a||!(a={}))a.index&&(this.c=a.index),a.verify&&(this.$=a.verify);c=b[this.c++];d=b[this.c++];switch(c&15){case vb:this.method=vb;break;default:q(Error("unsupported compression method"))}0!==((c<<8)+d)%31&&q(Error("invalid fcheck flag:"+((c<<8)+d)%31));d&32&&q(Error("fdict flag is not supported"));this.L=new T(b,{index:this.c,bufferSize:a.bufferSize,bufferType:a.bufferType,resize:a.resize})}
|
||||
ub.prototype.h=function(){var b=this.input,a,c;a=this.L.h();this.c=this.L.c;this.$&&(c=(b[this.c++]<<24|b[this.c++]<<16|b[this.c++]<<8|b[this.c++])>>>0,c!==tb(a)&&q(Error("invalid adler-32 checksum")));return a};var vb=8;function wb(b,a){this.input=b;this.a=new (B?Uint8Array:Array)(32768);this.k=W.o;var c={},d;if((a||!(a={}))&&"number"===typeof a.compressionType)this.k=a.compressionType;for(d in a)c[d]=a[d];c.outputBuffer=this.a;this.K=new na(this.input,c)}var W=ra;
|
||||
wb.prototype.g=function(){var b,a,c,d,e,f,g,k=0;g=this.a;b=vb;switch(b){case vb:a=Math.LOG2E*Math.log(32768)-8;break;default:q(Error("invalid compression method"))}c=a<<4|b;g[k++]=c;switch(b){case vb:switch(this.k){case W.NONE:e=0;break;case W.v:e=1;break;case W.o:e=2;break;default:q(Error("unsupported compression type"))}break;default:q(Error("invalid compression method"))}d=e<<6|0;g[k++]=d|31-(256*c+d)%31;f=tb(this.input);this.K.b=k;g=this.K.g();k=g.length;B&&(g=new Uint8Array(g.buffer),g.length<=
|
||||
k+4&&(this.a=new Uint8Array(g.length+4),this.a.set(g),g=this.a),g=g.subarray(0,k+4));g[k++]=f>>24&255;g[k++]=f>>16&255;g[k++]=f>>8&255;g[k++]=f&255;return g};function xb(b,a){var c,d,e,f;if(Object.keys)c=Object.keys(a);else for(d in c=[],e=0,a)c[e++]=d;e=0;for(f=c.length;e<f;++e)d=c[e],A(b+"."+d,a[d])};A("Zlib.Inflate",ub);A("Zlib.Inflate.prototype.decompress",ub.prototype.h);xb("Zlib.Inflate.BufferType",{ADAPTIVE:Ya.N,BLOCK:Ya.O});A("Zlib.Deflate",wb);A("Zlib.Deflate.compress",function(b,a){return(new wb(b,a)).g()});A("Zlib.Deflate.prototype.compress",wb.prototype.g);xb("Zlib.Deflate.CompressionType",{NONE:W.NONE,FIXED:W.v,DYNAMIC:W.o});}).call(this); //@ sourceMappingURL=zlib_and_gzip.min.js.map
|
||||
File diff suppressed because one or more lines are too long
Loading…
Add table
Add a link
Reference in a new issue