Initial commit

This commit is contained in:
pasketti
2026-04-05 16:14:49 -04:00
commit ebee3a5534
14059 changed files with 2588797 additions and 0 deletions

22
node_modules/nwsapi/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,22 @@
Copyright (c) 2007-2018 Diego Perini (http://www.iport.it/)
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.

0
node_modules/nwsapi/dist/lint.log generated vendored Normal file
View File

6
node_modules/nwsapi/dist/nwsapi.min.js generated vendored Normal file

File diff suppressed because one or more lines are too long

33
node_modules/nwsapi/package.json generated vendored Normal file
View File

@@ -0,0 +1,33 @@
{
"name": "nwsapi",
"version": "2.0.9",
"description": "Fast CSS Selectors API Engine",
"homepage": "http://javascript.nwbox.com/nwsapi/",
"main": "./src/nwsapi",
"licenses": [
{
"type": "MIT",
"url": "http://javascript.nwbox.com/nwsapi/MIT-LICENSE"
}
],
"license": "MIT",
"author": {
"name": "Diego Perini",
"email": "diego.perini@gmail.com",
"web": "http://www.iport.it/"
},
"maintainers": [
{
"name": "Diego Perini",
"email": "diego.perini@gmail.com",
"web": "http://www.iport.it/"
}
],
"repository": {
"type": "git",
"url": "git://github.com/dperini/nwsapi.git"
},
"devDependencies": {
"eslint": "^4.19.1"
}
}

133
node_modules/nwsapi/src/modules/nwsapi-jquery.js generated vendored Normal file
View File

@@ -0,0 +1,133 @@
/*
* Copyright (C) 2007-2017 Diego Perini
* All rights reserved.
*
* this is just a small example to show
* how an extension for NWMatcher could be
* adapted to handle special jQuery selectors
*
* Child Selectors
* :even, :odd, :eq, :lt, :gt, :first, :last, :nth
*
* Pseudo Selectors
* :has, :button, :header, :input, :checkbox, :radio, :file, :image
* :password, :reset, :submit, :text, :hidden, :visible, :parent
*
*/
// for structural pseudo-classes extensions
NW.Dom.registerSelector(
'jquery:child',
/^\:((?:(nth|eq|lt|gt)\(([^()]*)\))|(?:even|odd|first|last))(.*)/i,
(function(global) {
return function(match, source, mode, callback) {
var status = true,
macro = mode ? NW.Dom.S_BODY : NW.Dom.M_BODY;
macro = macro.replace('@', typeof callback == 'function' ? (mode ? NW.Dom.S_TEST : NW.Dom.M_TEST) : '');
switch (match[1].toLowerCase()) {
case 'odd':
source = source.replace(macro, 'if((n=n^1)==0){' + macro + '}');
break;
case 'even':
source = source.replace(macro, 'if((n=n^1)==1){' + macro + '}');
break;
case 'first':
source = 'n=s.root.getElementsByTagName(e.nodeName);if(n.length&&n[0]===e){' + source + '}';
break;
case 'last':
source = 'n=s.root.getElementsByTagName(e.nodeName);if(n.length&&n[n.length-1]===e){' + source + '}';
break;
default:
switch (match[2].toLowerCase()) {
case 'nth':
source = 'n=s.root.getElementsByTagName(e.nodeName);if(n.length&&n[' + match[3] + ']===e){' + source + '}';
break;
case 'eq':
source = source.replace(macro, 'if(x++==' + match[3] + '){' + macro + '}');
break;
case 'lt':
source = source.replace(macro, 'if(x++<' + match[3] + '){' + macro + '}');
break;
case 'gt':
source = source.replace(macro, 'if(x++>' + match[3] + '){' + macro + '}');
break;
default:
status = false;
break;
}
break;
}
// compiler will add this to "source"
return {
'source': source,
'status': status,
'modvar': 'x=0'
};
};
})(this));
// for element pseudo-classes extensions
NW.Dom.registerSelector(
'jquery:pseudo',
/^\:(has|checkbox|file|image|password|radio|reset|submit|text|button|input|header|hidden|visible|parent)(?:\(\s*(["']*)?([^'"()]*)\2\s*\))?(.*)/i,
(function(global) {
return function(match, source, mode, callback) {
var status = true,
macro = mode ? NW.Dom.S_BODY : NW.Dom.M_BODY;
macro = macro.replace('@', typeof callback == 'function' ? (mode ? NW.Dom.S_TEST : NW.Dom.M_TEST) : '');
switch(match[1].toLowerCase()) {
case 'has':
source = source.replace(macro, 'if(e.getElementsByTagName("' + match[3].replace(/^\s|\s$/g, '') + '")[0]){' + macro + '}');
break;
case 'checkbox':
case 'file':
case 'image':
case 'password':
case 'radio':
case 'reset':
case 'submit':
case 'text':
// :checkbox, :file, :image, :password, :radio, :reset, :submit, :text
source = 'if(/^' + match[1] + '$/i.test(e.type)){' + source + '}';
break;
case 'button':
case 'input':
source = 'if(e.type||/button/i.test(e.nodeName)){' + source + '}';
break;
case 'header':
source = 'if(/h[1-6]/i.test(e.nodeName)){' + source + '}';
break;
case 'hidden':
source = 'if(!e.offsetWidth&&!e.offsetHeight){' + source + '}';
break;
case 'visible':
source = 'if(e.offsetWidth||e.offsetHeight){' + source + '}';
break;
case 'parent':
source += 'if(e.firstChild){' + source + '}';
break;
default:
status = false;
break;
}
// compiler will add this to "source"
return {
'source': source,
'status': status
};
};
})(this));

90
node_modules/nwsapi/src/modules/nwsapi-traversal.js generated vendored Normal file
View File

@@ -0,0 +1,90 @@
/*
* Element Traversal methods from Juriy Zaytsev (kangax)
* used to emulate Prototype up/down/previous/next methods
*/
(function(D){
// TODO: all of this needs tests
var match = D.match, select = D.select, root = document.documentElement,
// Use the Element Traversal API if available.
nextElement = 'nextElementSibling',
previousElement = 'previousElementSibling',
parentElement = 'parentElement';
// Fall back to the DOM Level 1 API.
if (!(nextElement in root)) nextElement = 'nextSibling';
if (!(previousElement in root)) previousElement = 'previousSibling';
if (!(parentElement in root)) parentElement = 'parentNode';
function walkElements(property, element, expr) {
var i = 0, isIndex = typeof expr == 'number';
if (typeof expr == 'undefined') {
isIndex = true;
expr = 0;
}
while ((element = element[property])) {
if (element.nodeType != 1) continue;
if (isIndex) {
++i;
if (i == expr) return element;
} else if (match(element, expr)) {
return element;
}
}
return null;
}
/**
* @method up
* @param {HTMLElement} element element to walk from
* @param {String | Number} expr CSS expression or an index
* @return {HTMLElement | null}
*/
function up(element, expr) {
return walkElements(parentElement, element, expr);
}
/**
* @method next
* @param {HTMLElement} element element to walk from
* @param {String | Number} expr CSS expression or an index
* @return {HTMLElement | null}
*/
function next(element, expr) {
return walkElements(nextElement, element, expr);
}
/**
* @method previous
* @param {HTMLElement} element element to walk from
* @param {String | Number} expr CSS expression or an index
* @return {HTMLElement | null}
*/
function previous(element, expr) {
return walkElements(previousElement, element, expr);
}
/**
* @method down
* @param {HTMLElement} element element to walk from
* @param {String | Number} expr CSS expression or an index
* @return {HTMLElement | null}
*/
function down(element, expr) {
var isIndex = typeof expr == 'number', descendants, index, descendant;
if (expr === null) {
element = element.firstChild;
while (element && element.nodeType != 1) element = element[nextElement];
return element;
}
if (!isIndex && match(element, expr) || isIndex && expr === 0) return element;
descendants = select('*', element);
if (isIndex) return descendants[expr] || null;
index = 0;
while ((descendant = descendants[index]) && !match(descendant, expr)) { ++index; }
return descendant || null;
}
D.up = up;
D.down = down;
D.next = next;
D.previous = previous;
})(NW.Dom);

1741
node_modules/nwsapi/src/nwsapi.js generated vendored Normal file

File diff suppressed because it is too large Load Diff