mirror of
https://github.com/x1xhlol/system-prompts-and-models-of-ai-tools.git
synced 2026-02-04 14:00:49 +00:00
nhj
more
This commit is contained in:
8
unified-ai-platform/node_modules/encoding/.prettierrc.js
generated
vendored
Normal file
8
unified-ai-platform/node_modules/encoding/.prettierrc.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
module.exports = {
|
||||
printWidth: 160,
|
||||
tabWidth: 4,
|
||||
singleQuote: true,
|
||||
endOfLine: 'lf',
|
||||
trailingComma: 'none',
|
||||
arrowParens: 'avoid'
|
||||
};
|
||||
16
unified-ai-platform/node_modules/encoding/LICENSE
generated
vendored
Normal file
16
unified-ai-platform/node_modules/encoding/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
Copyright (c) 2012-2014 Andris Reinman
|
||||
|
||||
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 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.
|
||||
83
unified-ai-platform/node_modules/encoding/lib/encoding.js
generated
vendored
Normal file
83
unified-ai-platform/node_modules/encoding/lib/encoding.js
generated
vendored
Normal file
@@ -0,0 +1,83 @@
|
||||
'use strict';
|
||||
|
||||
var iconvLite = require('iconv-lite');
|
||||
|
||||
// Expose to the world
|
||||
module.exports.convert = convert;
|
||||
|
||||
/**
|
||||
* Convert encoding of an UTF-8 string or a buffer
|
||||
*
|
||||
* @param {String|Buffer} str String to be converted
|
||||
* @param {String} to Encoding to be converted to
|
||||
* @param {String} [from='UTF-8'] Encoding to be converted from
|
||||
* @return {Buffer} Encoded string
|
||||
*/
|
||||
function convert(str, to, from) {
|
||||
from = checkEncoding(from || 'UTF-8');
|
||||
to = checkEncoding(to || 'UTF-8');
|
||||
str = str || '';
|
||||
|
||||
var result;
|
||||
|
||||
if (from !== 'UTF-8' && typeof str === 'string') {
|
||||
str = Buffer.from(str, 'binary');
|
||||
}
|
||||
|
||||
if (from === to) {
|
||||
if (typeof str === 'string') {
|
||||
result = Buffer.from(str);
|
||||
} else {
|
||||
result = str;
|
||||
}
|
||||
} else {
|
||||
try {
|
||||
result = convertIconvLite(str, to, from);
|
||||
} catch (E) {
|
||||
console.error(E);
|
||||
result = str;
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof result === 'string') {
|
||||
result = Buffer.from(result, 'utf-8');
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert encoding of astring with iconv-lite
|
||||
*
|
||||
* @param {String|Buffer} str String to be converted
|
||||
* @param {String} to Encoding to be converted to
|
||||
* @param {String} [from='UTF-8'] Encoding to be converted from
|
||||
* @return {Buffer} Encoded string
|
||||
*/
|
||||
function convertIconvLite(str, to, from) {
|
||||
if (to === 'UTF-8') {
|
||||
return iconvLite.decode(str, from);
|
||||
} else if (from === 'UTF-8') {
|
||||
return iconvLite.encode(str, to);
|
||||
} else {
|
||||
return iconvLite.encode(iconvLite.decode(str, from), to);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts charset name if needed
|
||||
*
|
||||
* @param {String} name Character set
|
||||
* @return {String} Character set name
|
||||
*/
|
||||
function checkEncoding(name) {
|
||||
return (name || '')
|
||||
.toString()
|
||||
.trim()
|
||||
.replace(/^latin[\-_]?(\d+)$/i, 'ISO-8859-$1')
|
||||
.replace(/^win(?:dows)?[\-_]?(\d+)$/i, 'WINDOWS-$1')
|
||||
.replace(/^utf[\-_]?(\d+)$/i, 'UTF-$1')
|
||||
.replace(/^ks_c_5601\-1987$/i, 'CP949')
|
||||
.replace(/^us[\-_]?ascii$/i, 'ASCII')
|
||||
.toUpperCase();
|
||||
}
|
||||
12
unified-ai-platform/node_modules/encoding/node_modules/iconv-lite/.idea/iconv-lite.iml
generated
vendored
Normal file
12
unified-ai-platform/node_modules/encoding/node_modules/iconv-lite/.idea/iconv-lite.iml
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="WEB_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/temp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/.tmp" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/tmp" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
21
unified-ai-platform/node_modules/encoding/node_modules/iconv-lite/LICENSE
generated
vendored
Normal file
21
unified-ai-platform/node_modules/encoding/node_modules/iconv-lite/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
Copyright (c) 2011 Alexander Shtuchkin
|
||||
|
||||
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.
|
||||
|
||||
52
unified-ai-platform/node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js
generated
vendored
Normal file
52
unified-ai-platform/node_modules/encoding/node_modules/iconv-lite/lib/bom-handling.js
generated
vendored
Normal file
@@ -0,0 +1,52 @@
|
||||
"use strict";
|
||||
|
||||
var BOMChar = '\uFEFF';
|
||||
|
||||
exports.PrependBOM = PrependBOMWrapper
|
||||
function PrependBOMWrapper(encoder, options) {
|
||||
this.encoder = encoder;
|
||||
this.addBOM = true;
|
||||
}
|
||||
|
||||
PrependBOMWrapper.prototype.write = function(str) {
|
||||
if (this.addBOM) {
|
||||
str = BOMChar + str;
|
||||
this.addBOM = false;
|
||||
}
|
||||
|
||||
return this.encoder.write(str);
|
||||
}
|
||||
|
||||
PrependBOMWrapper.prototype.end = function() {
|
||||
return this.encoder.end();
|
||||
}
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
exports.StripBOM = StripBOMWrapper;
|
||||
function StripBOMWrapper(decoder, options) {
|
||||
this.decoder = decoder;
|
||||
this.pass = false;
|
||||
this.options = options || {};
|
||||
}
|
||||
|
||||
StripBOMWrapper.prototype.write = function(buf) {
|
||||
var res = this.decoder.write(buf);
|
||||
if (this.pass || !res)
|
||||
return res;
|
||||
|
||||
if (res[0] === BOMChar) {
|
||||
res = res.slice(1);
|
||||
if (typeof this.options.stripBOM === 'function')
|
||||
this.options.stripBOM();
|
||||
}
|
||||
|
||||
this.pass = true;
|
||||
return res;
|
||||
}
|
||||
|
||||
StripBOMWrapper.prototype.end = function() {
|
||||
return this.decoder.end();
|
||||
}
|
||||
|
||||
0
unified-ai-platform/node_modules/encoding/test/test.js
generated
vendored
Normal file
0
unified-ai-platform/node_modules/encoding/test/test.js
generated
vendored
Normal file
Reference in New Issue
Block a user