Skip to content

Commit

Permalink
graph
Browse files Browse the repository at this point in the history
  • Loading branch information
gigamaster committed Jul 24, 2024
1 parent 6425771 commit 7781382
Show file tree
Hide file tree
Showing 368 changed files with 332,050 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/web-tools/drawio/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Manifest-Version: 1.0
Class-Path:

8 changes: 8 additions & 0 deletions app/web-tools/drawio/js/PostConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/**
* Copyright (c) 2006-2024, JGraph Ltd
* Copyright (c) 2006-2024, draw.io AG
*/
// null'ing of global vars need to be after init.js
window.VSD_CONVERT_URL = null;
window.EMF_CONVERT_URL = null;
window.ICONSEARCH_PATH = null;
14 changes: 14 additions & 0 deletions app/web-tools/drawio/js/PreConfig.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/**
* Copyright (c) 2006-2024, JGraph Ltd
* Copyright (c) 2006-2024, draw.io AG
*/
// Overrides of global vars need to be pre-loaded
window.DRAWIO_PUBLIC_BUILD = true;
window.EXPORT_URL = 'REPLACE_WITH_YOUR_IMAGE_SERVER';
window.PLANT_URL = 'REPLACE_WITH_YOUR_PLANTUML_SERVER';
window.DRAWIO_BASE_URL = null; // Replace with path to base of deployment, e.g. https://www.example.com/folder
window.DRAWIO_VIEWER_URL = null; // Replace your path to the viewer js, e.g. https://www.example.com/js/viewer.min.js
window.DRAWIO_LIGHTBOX_URL = null; // Replace with your lightbox URL, eg. https://www.example.com
window.DRAW_MATH_URL = 'math/es5';
window.DRAWIO_CONFIG = null; // Replace with your custom draw.io configurations. For more details, https://www.drawio.com/doc/faq/configure-diagram-editor
urlParams['sync'] = 'manual';
14,149 changes: 14,149 additions & 0 deletions app/web-tools/drawio/js/app.min.js

Large diffs are not rendered by default.

67 changes: 67 additions & 0 deletions app/web-tools/drawio/js/clear.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
try
{
function write(text)
{
document.body.appendChild(document.createTextNode(text));
};

function writeln(text)
{
write(text);
document.body.appendChild(document.createElement('br'));
};

write('Clearing Cached version ' + EditorUi.VERSION + '...');

navigator.serviceWorker.getRegistrations().then(function(registrations)
{
if (registrations != null && registrations.length > 0)
{
for (var i = 0; i < registrations.length; i++)
{
registrations[i].unregister();
}

writeln('Done');
}
else
{
writeln('OK');
}

var link = document.createElement('a');
link.style.marginRight = '6px';
link.setAttribute('href', 'javascript:window.location.reload();');
link.appendChild(document.createTextNode('Reload'));
document.body.appendChild(link);

if ((/test\.draw\.io$/.test(window.location.hostname)) ||
(/preprod\.diagrams\.net$/.test(window.location.hostname)) ||
(/app\.diagrams\.net$/.test(window.location.hostname)))
{
link = link.cloneNode(false);
link.setAttribute('href', './');
link.appendChild(document.createTextNode('Start App'));
document.body.appendChild(link);
}
});

// Clears corresponding domain of current domain
var iframe = document.createElement('iframe');
iframe.style.display = 'none';

if (window.location.hostname == 'ac.draw.io')
{
iframe.src = 'https://clear.diagrams.net';
}
else
{
iframe.src = 'https://clear.draw.io';
}

document.body.appendChild(iframe);
}
catch (e)
{
write('Error: ' + e.message);
}
6 changes: 6 additions & 0 deletions app/web-tools/drawio/js/cryptojs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# aes.min.js

Source: rollups/aes.js from https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/crypto-js/CryptoJS%20v3.1.2.zip
See https://code.google.com/archive/p/crypto-js/downloads

Note: This is not affected by https://github.com/jgraph/drawio-dev/security/dependabot/148 as the code does not use Math.random().
35 changes: 35 additions & 0 deletions app/web-tools/drawio/js/cryptojs/aes.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions app/web-tools/drawio/js/deflate/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Updating (with IE 11 compatibility)

Copy https://github.com/nodeca/pako/blob/master/dist/pako.es5.min.js to
src/main/webapp/js/deflate/pako.min.js in this repository
151 changes: 151 additions & 0 deletions app/web-tools/drawio/js/deflate/base64.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@

/**
*
* Base64 encode / decode
* http://www.webtoolkit.info/
*
**/

var Base64 = {

// private property
_keyStr : "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",

// public method for encoding
encode : function (input, binary) {
binary = (binary != null) ? binary : false;
var output = "";
var chr1, chr2, chr3, enc1, enc2, enc3, enc4;
var i = 0;

if (!binary)
{
input = Base64._utf8_encode(input);
}

while (i < input.length) {

chr1 = input.charCodeAt(i++);
chr2 = input.charCodeAt(i++);
chr3 = input.charCodeAt(i++);

enc1 = chr1 >> 2;
enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);
enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);
enc4 = chr3 & 63;

if (isNaN(chr2)) {
enc3 = enc4 = 64;
} else if (isNaN(chr3)) {
enc4 = 64;
}

output = output +
this._keyStr.charAt(enc1) + this._keyStr.charAt(enc2) +
this._keyStr.charAt(enc3) + this._keyStr.charAt(enc4);

}

return output;
},

// public method for decoding
decode : function (input, binary) {
binary = (binary != null) ? binary : false;
var output = "";
var chr1, chr2, chr3;
var enc1, enc2, enc3, enc4;
var i = 0;

input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "");

while (i < input.length) {

enc1 = this._keyStr.indexOf(input.charAt(i++));
enc2 = this._keyStr.indexOf(input.charAt(i++));
enc3 = this._keyStr.indexOf(input.charAt(i++));
enc4 = this._keyStr.indexOf(input.charAt(i++));

chr1 = (enc1 << 2) | (enc2 >> 4);
chr2 = ((enc2 & 15) << 4) | (enc3 >> 2);
chr3 = ((enc3 & 3) << 6) | enc4;

output = output + String.fromCharCode(chr1);

if (enc3 != 64) {
output = output + String.fromCharCode(chr2);
}
if (enc4 != 64) {
output = output + String.fromCharCode(chr3);
}

}

if (!binary)
{
output = Base64._utf8_decode(output);
}

return output;

},

// private method for UTF-8 encoding
_utf8_encode : function (string) {
string = string.replace(/\r\n/g,"\n");
var utftext = "";

for (var n = 0; n < string.length; n++) {

var c = string.charCodeAt(n);

if (c < 128) {
utftext += String.fromCharCode(c);
}
else if((c > 127) && (c < 2048)) {
utftext += String.fromCharCode((c >> 6) | 192);
utftext += String.fromCharCode((c & 63) | 128);
}
else {
utftext += String.fromCharCode((c >> 12) | 224);
utftext += String.fromCharCode(((c >> 6) & 63) | 128);
utftext += String.fromCharCode((c & 63) | 128);
}

}

return utftext;
},

// private method for UTF-8 decoding
_utf8_decode : function (utftext) {
var string = "";
var i = 0;
var c = c1 = c2 = 0;

while ( i < utftext.length ) {

c = utftext.charCodeAt(i);

if (c < 128) {
string += String.fromCharCode(c);
i++;
}
else if((c > 191) && (c < 224)) {
c2 = utftext.charCodeAt(i+1);
string += String.fromCharCode(((c & 31) << 6) | (c2 & 63));
i += 2;
}
else {
c2 = utftext.charCodeAt(i+1);
c3 = utftext.charCodeAt(i+2);
string += String.fromCharCode(((c & 15) << 12) | ((c2 & 63) << 6) | (c3 & 63));
i += 3;
}

}

return string;
}

}
2 changes: 2 additions & 0 deletions app/web-tools/drawio/js/deflate/pako.min.js

Large diffs are not rendered by default.

Loading

0 comments on commit 7781382

Please sign in to comment.