diff --git a/ChangeLog b/ChangeLog
index 1ab674f77..562321477 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+14-MAR-2024: 24.0.7
+
+- Moves Cloudflare workers to mxgraph-gliffy-java repository
+- Fixes possible HTML content as SVG subtree
+- Fixes overridden font in background page images
+- Fixes timeout for invalid image in SVG export
+- Disables and removes links in background pages
+- Adds tooltips for values in Property pane
+- Fixes clipped cell ID in Property pane [drawio-4262]
+- Fixes regex performance in Graph.isLink [drawio-3939]
+- [conf cloud] Adds upload embed diagrams to custom templates parsing [DID-11066]
+
13-MAR-2024: 24.0.6
- Moves subtree when tree is collapsed [drawio-3113]
diff --git a/VERSION b/VERSION
index 460897ead..352755d10 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-24.0.6
\ No newline at end of file
+24.0.7
\ No newline at end of file
diff --git a/etc/imageResize/README.md b/etc/imageResize/README.md
new file mode 100644
index 000000000..d0228e8a5
--- /dev/null
+++ b/etc/imageResize/README.md
@@ -0,0 +1,17 @@
+draw.io file sizing script
+
+Takes any draw.io file or mx model as input and resizes embedded PNG and JPEG images according to passed in parameters.
+
+Installing
+
+Run 'npm install' in this folder. Ensure you have node locally.
+
+Running
+
+To resize all images to 200 width:
+
+node drawImageResize.js --file=path/to/your/file.drawio --width=200
+
+To resize all images to 40% their current width:
+
+node drawImageResize.js --file=path/to/your/file.drawio --percentage=40
\ No newline at end of file
diff --git a/etc/imageResize/drawImageResize.js b/etc/imageResize/drawImageResize.js
new file mode 100644
index 000000000..392f80a3e
--- /dev/null
+++ b/etc/imageResize/drawImageResize.js
@@ -0,0 +1,84 @@
+const fs = require('fs');
+const sharp = require('sharp');
+const yargs = require('yargs/yargs');
+const { hideBin } = require('yargs/helpers');
+const sizeOf = require('image-size');
+
+const argv = yargs(hideBin(process.argv)).options({
+ file: { type: 'string', demandOption: true, describe: 'The path to the .drawio file' },
+ percentage: { type: 'number', demandOption: false, describe: 'The percentage to resize the images to' },
+ width: { type: 'number', demandOption: false, describe: 'The width to resize the images to' }
+}).argv;
+
+const resizeImage = async (base64Image, percentage, width) =>
+{
+ console.log(`Resizing image...`);
+ // Adjust the regex to match the new end character ";" instead of ","
+ const matches = base64Image.match(/^data:image\/(jpeg|png),(.*);$/);
+ if (!matches) return null;
+
+ const imageBuffer = Buffer.from(matches[2], 'base64');
+ const dimensions = sizeOf(imageBuffer);
+
+ console.log(`width = ${width}`);
+ console.log(`percentage = ${percentage}`);
+
+ if (percentage && !width)
+ {
+ // Width isn't passed in, use percentage
+ width = Math.floor(dimensions.width * (percentage / 100));
+ console.log(`dimensions.width = ${dimensions.width}`);
+ }
+ console.log(`width = ${width}`);
+ return sharp(imageBuffer)
+ .resize({ width: width, withoutEnlargement: true })
+ .toBuffer()
+ .then(resizedBuffer =>
+ {
+ console.log(`Image resized to ${percentage}% of its original size.`);
+ // Ensure to append ";" at the end after re-encoding to base64
+ return `data:image/${matches[1]},` + resizedBuffer.toString('base64') + ';';
+ });
+};
+
+const processDrawioFile = async (filePath, percentage, width) =>
+{
+ console.log(`Starting processing of ${filePath}`);
+
+ if (!(percentage || width))
+ {
+ console.log(`You must pass in one of percentage or width`);
+ return;
+ }
+
+ try
+ {
+ let data = fs.readFileSync(filePath, { encoding: 'utf-8' });
+ // Adjust the regex pattern to expect ";" as the closing character of the base64 data
+ const base64Pattern = /data:image\/(?:jpeg|png),[^;]+;/g;
+ const images = [...data.matchAll(base64Pattern)].map(match => match[0]);
+
+ console.log(`Found ${images.length} images to process.`);
+
+ for (let i = 0; i < images.length; i++)
+ {
+ console.log(`Processing image ${i + 1} of ${images.length}...`);
+ const newBase64 = await resizeImage(images[i], percentage, width);
+
+ if (newBase64)
+ {
+ data = data.replace(images[i], newBase64);
+ }
+ }
+
+ fs.writeFileSync(filePath, data, { encoding: 'utf-8' });
+ console.log(`All images processed. Updated file saved.`);
+ }
+ catch (error)
+ {
+ console.error(`Error processing file: ${error.message}`);
+ }
+};
+
+processDrawioFile(argv.file, argv.percentage, argv.width);
+
diff --git a/etc/imageResize/package-lock.json b/etc/imageResize/package-lock.json
new file mode 100644
index 000000000..648b8889c
--- /dev/null
+++ b/etc/imageResize/package-lock.json
@@ -0,0 +1,763 @@
+{
+ "name": "drawio-image-resize",
+ "version": "1.0.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "drawio-image-resize",
+ "version": "1.0.0",
+ "license": "ISC",
+ "dependencies": {
+ "image-size": "^1.1.1",
+ "sharp": "^0.33.2",
+ "yargs": "^17.7.2"
+ }
+ },
+ "node_modules/@emnapi/runtime": {
+ "version": "0.45.0",
+ "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-0.45.0.tgz",
+ "integrity": "sha512-Txumi3td7J4A/xTTwlssKieHKTGl3j4A1tglBx72auZ49YK7ePY6XZricgIg9mnZT4xPfA+UPCUdnhRuEFDL+w==",
+ "optional": true,
+ "dependencies": {
+ "tslib": "^2.4.0"
+ }
+ },
+ "node_modules/@img/sharp-darwin-arm64": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.33.2.tgz",
+ "integrity": "sha512-itHBs1rPmsmGF9p4qRe++CzCgd+kFYktnsoR1sbIAfsRMrJZau0Tt1AH9KVnufc2/tU02Gf6Ibujx+15qRE03w==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "glibc": ">=2.26",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-arm64": "1.0.1"
+ }
+ },
+ "node_modules/@img/sharp-darwin-x64": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.33.2.tgz",
+ "integrity": "sha512-/rK/69Rrp9x5kaWBjVN07KixZanRr+W1OiyKdXcbjQD6KbW+obaTeBBtLUAtbBsnlTTmWthw99xqoOS7SsySDg==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "glibc": ">=2.26",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-darwin-x64": "1.0.1"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-arm64": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.0.1.tgz",
+ "integrity": "sha512-kQyrSNd6lmBV7O0BUiyu/OEw9yeNGFbQhbxswS1i6rMDwBBSX+e+rPzu3S+MwAiGU3HdLze3PanQ4Xkfemgzcw==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "macos": ">=11",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-darwin-x64": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.0.1.tgz",
+ "integrity": "sha512-eVU/JYLPVjhhrd8Tk6gosl5pVlvsqiFlt50wotCvdkFGf+mDNBJxMh+bvav+Wt3EBnNZWq8Sp2I7XfSjm8siog==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "macos": ">=10.13",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.0.1.tgz",
+ "integrity": "sha512-FtdMvR4R99FTsD53IA3LxYGghQ82t3yt0ZQ93WMZ2xV3dqrb0E8zq4VHaTOuLEAuA83oDawHV3fd+BsAPadHIQ==",
+ "cpu": [
+ "arm"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.28",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-arm64": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.0.1.tgz",
+ "integrity": "sha512-bnGG+MJjdX70mAQcSLxgeJco11G+MxTz+ebxlz8Y3dxyeb3Nkl7LgLI0mXupoO+u1wRNx/iRj5yHtzA4sde1yA==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.26",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-s390x": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.0.1.tgz",
+ "integrity": "sha512-3+rzfAR1YpMOeA2zZNp+aYEzGNWK4zF3+sdMxuCS3ey9HhDbJ66w6hDSHDMoap32DueFwhhs3vwooAB2MaK4XQ==",
+ "cpu": [
+ "s390x"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.28",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linux-x64": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.0.1.tgz",
+ "integrity": "sha512-3NR1mxFsaSgMMzz1bAnnKbSAI+lHXVTqAHgc1bgzjHuXjo4hlscpUxc0vFSAPKI3yuzdzcZOkq7nDPrP2F8Jgw==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.26",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linuxmusl-arm64": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.0.1.tgz",
+ "integrity": "sha512-5aBRcjHDG/T6jwC3Edl3lP8nl9U2Yo8+oTl5drd1dh9Z1EBfzUKAJFUDTDisDjUwc7N4AjnPGfCA3jl3hY8uDg==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "musl": ">=1.2.2",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-libvips-linuxmusl-x64": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.0.1.tgz",
+ "integrity": "sha512-dcT7inI9DBFK6ovfeWRe3hG30h51cBAP5JXlZfx6pzc/Mnf9HFCQDLtYf4MCBjxaaTfjCCjkBxcy3XzOAo5txw==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "musl": ">=1.2.2",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.33.2.tgz",
+ "integrity": "sha512-Fndk/4Zq3vAc4G/qyfXASbS3HBZbKrlnKZLEJzPLrXoJuipFNNwTes71+Ki1hwYW5lch26niRYoZFAtZVf3EGA==",
+ "cpu": [
+ "arm"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.28",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm": "1.0.1"
+ }
+ },
+ "node_modules/@img/sharp-linux-arm64": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.33.2.tgz",
+ "integrity": "sha512-pz0NNo882vVfqJ0yNInuG9YH71smP4gRSdeL09ukC2YLE6ZyZePAlWKEHgAzJGTiOh8Qkaov6mMIMlEhmLdKew==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.26",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-arm64": "1.0.1"
+ }
+ },
+ "node_modules/@img/sharp-linux-s390x": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.33.2.tgz",
+ "integrity": "sha512-MBoInDXDppMfhSzbMmOQtGfloVAflS2rP1qPcUIiITMi36Mm5YR7r0ASND99razjQUpHTzjrU1flO76hKvP5RA==",
+ "cpu": [
+ "s390x"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.28",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-s390x": "1.0.1"
+ }
+ },
+ "node_modules/@img/sharp-linux-x64": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.33.2.tgz",
+ "integrity": "sha512-xUT82H5IbXewKkeF5aiooajoO1tQV4PnKfS/OZtb5DDdxS/FCI/uXTVZ35GQ97RZXsycojz/AJ0asoz6p2/H/A==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "glibc": ">=2.26",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linux-x64": "1.0.1"
+ }
+ },
+ "node_modules/@img/sharp-linuxmusl-arm64": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.33.2.tgz",
+ "integrity": "sha512-F+0z8JCu/UnMzg8IYW1TMeiViIWBVg7IWP6nE0p5S5EPQxlLd76c8jYemG21X99UzFwgkRo5yz2DS+zbrnxZeA==",
+ "cpu": [
+ "arm64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "musl": ">=1.2.2",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-arm64": "1.0.1"
+ }
+ },
+ "node_modules/@img/sharp-linuxmusl-x64": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.33.2.tgz",
+ "integrity": "sha512-+ZLE3SQmSL+Fn1gmSaM8uFusW5Y3J9VOf+wMGNnTtJUMUxFhv+P4UPaYEYT8tqnyYVaOVGgMN/zsOxn9pSsO2A==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "musl": ">=1.2.2",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-libvips-linuxmusl-x64": "1.0.1"
+ }
+ },
+ "node_modules/@img/sharp-wasm32": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.33.2.tgz",
+ "integrity": "sha512-fLbTaESVKuQcpm8ffgBD7jLb/CQLcATju/jxtTXR1XCLwbOQt+OL5zPHSDMmp2JZIeq82e18yE0Vv7zh6+6BfQ==",
+ "cpu": [
+ "wasm32"
+ ],
+ "optional": true,
+ "dependencies": {
+ "@emnapi/runtime": "^0.45.0"
+ },
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-ia32": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.33.2.tgz",
+ "integrity": "sha512-okBpql96hIGuZ4lN3+nsAjGeggxKm7hIRu9zyec0lnfB8E7Z6p95BuRZzDDXZOl2e8UmR4RhYt631i7mfmKU8g==",
+ "cpu": [
+ "ia32"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/@img/sharp-win32-x64": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.33.2.tgz",
+ "integrity": "sha512-E4magOks77DK47FwHUIGH0RYWSgRBfGdK56kIHSVeB9uIS4pPFr4N2kIVsXdQQo4LzOsENKV5KAhRlRL7eMAdg==",
+ "cpu": [
+ "x64"
+ ],
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0",
+ "npm": ">=9.6.5",
+ "pnpm": ">=7.1.0",
+ "yarn": ">=3.2.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ }
+ },
+ "node_modules/ansi-regex": {
+ "version": "5.0.1",
+ "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz",
+ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/ansi-styles": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz",
+ "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/cliui": {
+ "version": "8.0.1",
+ "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz",
+ "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==",
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.1",
+ "wrap-ansi": "^7.0.0"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/color": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz",
+ "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==",
+ "dependencies": {
+ "color-convert": "^2.0.1",
+ "color-string": "^1.9.0"
+ },
+ "engines": {
+ "node": ">=12.5.0"
+ }
+ },
+ "node_modules/color-convert": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz",
+ "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/color-name": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz",
+ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
+ },
+ "node_modules/color-string": {
+ "version": "1.9.1",
+ "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz",
+ "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==",
+ "dependencies": {
+ "color-name": "^1.0.0",
+ "simple-swizzle": "^0.2.2"
+ }
+ },
+ "node_modules/detect-libc": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.2.tgz",
+ "integrity": "sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/emoji-regex": {
+ "version": "8.0.0",
+ "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz",
+ "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
+ },
+ "node_modules/escalade": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
+ "integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/get-caller-file": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz",
+ "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/image-size": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/image-size/-/image-size-1.1.1.tgz",
+ "integrity": "sha512-541xKlUw6jr/6gGuk92F+mYM5zaFAc5ahphvkqvNe2bQ6gVBkd6bfrmVJ2t4KDAfikAYZyIqTnktX3i6/aQDrQ==",
+ "dependencies": {
+ "queue": "6.0.2"
+ },
+ "bin": {
+ "image-size": "bin/image-size.js"
+ },
+ "engines": {
+ "node": ">=16.x"
+ }
+ },
+ "node_modules/inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ=="
+ },
+ "node_modules/is-arrayish": {
+ "version": "0.3.2",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz",
+ "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ=="
+ },
+ "node_modules/is-fullwidth-code-point": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
+ "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/queue": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/queue/-/queue-6.0.2.tgz",
+ "integrity": "sha512-iHZWu+q3IdFZFX36ro/lKBkSvfkztY5Y7HMiPlOUjhupPcG2JMfst2KKEpu5XndviX/3UhFbRngUPNKtgvtZiA==",
+ "dependencies": {
+ "inherits": "~2.0.3"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/semver": {
+ "version": "7.6.0",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
+ "integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/sharp": {
+ "version": "0.33.2",
+ "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.33.2.tgz",
+ "integrity": "sha512-WlYOPyyPDiiM07j/UO+E720ju6gtNtHjEGg5vovUk1Lgxyjm2LFO+37Nt/UI3MMh2l6hxTWQWi7qk3cXJTutcQ==",
+ "hasInstallScript": true,
+ "dependencies": {
+ "color": "^4.2.3",
+ "detect-libc": "^2.0.2",
+ "semver": "^7.5.4"
+ },
+ "engines": {
+ "libvips": ">=8.15.1",
+ "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/libvips"
+ },
+ "optionalDependencies": {
+ "@img/sharp-darwin-arm64": "0.33.2",
+ "@img/sharp-darwin-x64": "0.33.2",
+ "@img/sharp-libvips-darwin-arm64": "1.0.1",
+ "@img/sharp-libvips-darwin-x64": "1.0.1",
+ "@img/sharp-libvips-linux-arm": "1.0.1",
+ "@img/sharp-libvips-linux-arm64": "1.0.1",
+ "@img/sharp-libvips-linux-s390x": "1.0.1",
+ "@img/sharp-libvips-linux-x64": "1.0.1",
+ "@img/sharp-libvips-linuxmusl-arm64": "1.0.1",
+ "@img/sharp-libvips-linuxmusl-x64": "1.0.1",
+ "@img/sharp-linux-arm": "0.33.2",
+ "@img/sharp-linux-arm64": "0.33.2",
+ "@img/sharp-linux-s390x": "0.33.2",
+ "@img/sharp-linux-x64": "0.33.2",
+ "@img/sharp-linuxmusl-arm64": "0.33.2",
+ "@img/sharp-linuxmusl-x64": "0.33.2",
+ "@img/sharp-wasm32": "0.33.2",
+ "@img/sharp-win32-ia32": "0.33.2",
+ "@img/sharp-win32-x64": "0.33.2"
+ }
+ },
+ "node_modules/simple-swizzle": {
+ "version": "0.2.2",
+ "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz",
+ "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==",
+ "dependencies": {
+ "is-arrayish": "^0.3.1"
+ }
+ },
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/tslib": {
+ "version": "2.6.2",
+ "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.2.tgz",
+ "integrity": "sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==",
+ "optional": true
+ },
+ "node_modules/wrap-ansi": {
+ "version": "7.0.0",
+ "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz",
+ "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==",
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A=="
+ },
+ "node_modules/yargs": {
+ "version": "17.7.2",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz",
+ "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==",
+ "dependencies": {
+ "cliui": "^8.0.1",
+ "escalade": "^3.1.1",
+ "get-caller-file": "^2.0.5",
+ "require-directory": "^2.1.1",
+ "string-width": "^4.2.3",
+ "y18n": "^5.0.5",
+ "yargs-parser": "^21.1.1"
+ },
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "21.1.1",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz",
+ "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==",
+ "engines": {
+ "node": ">=12"
+ }
+ }
+ }
+}
diff --git a/etc/imageResize/package.json b/etc/imageResize/package.json
new file mode 100644
index 000000000..ec07ebddf
--- /dev/null
+++ b/etc/imageResize/package.json
@@ -0,0 +1,17 @@
+{
+ "name": "drawio-image-resize",
+ "version": "1.0.0",
+ "description": "",
+ "main": "drawImageResize.js",
+ "scripts": {
+ "test": "echo \"Error: no test specified\" && exit 1"
+ },
+ "keywords": [],
+ "author": "",
+ "license": "ISC",
+ "dependencies": {
+ "image-size": "^1.1.1",
+ "sharp": "^0.33.2",
+ "yargs": "^17.7.2"
+ }
+}
diff --git a/src/main/webapp/js/app.min.js b/src/main/webapp/js/app.min.js
index 45f08bb20..ed2cf6cbc 100644
--- a/src/main/webapp/js/app.min.js
+++ b/src/main/webapp/js/app.min.js
@@ -144,9 +144,9 @@ window.uiTheme=window.uiTheme||function(){var a=urlParams.ui;"1"==urlParams.extA
a),DRAWIO_GITLAB_URL=a);a=urlParams["gitlab-id"];null!=a&&(DRAWIO_GITLAB_ID=a);window.DRAWIO_LOG_URL=window.DRAWIO_LOG_URL||"";a=window.location.host;if("test.draw.io"!=a){var c="diagrams.net";b=a.length-c.length;c=a.lastIndexOf(c,b);-1!==c&&c===b?window.DRAWIO_LOG_URL="https://log.diagrams.net":(c="draw.io",b=a.length-c.length,c=a.lastIndexOf(c,b),-1!==c&&c===b&&(window.DRAWIO_LOG_URL="https://log.draw.io"))}})();
if("1"==urlParams.offline||"1"==urlParams.demo||"1"==urlParams.stealth||"1"==urlParams.local||"1"==urlParams.lockdown)urlParams.picker="0",urlParams.gapi="0",urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0";
"se.diagrams.net"==window.location.hostname&&(urlParams.db="0",urlParams.od="0",urlParams.gh="0",urlParams.gl="0",urlParams.tr="0",urlParams.plugins="0",urlParams.mode="google",urlParams.lockdown="1",window.DRAWIO_GOOGLE_APP_ID=window.DRAWIO_GOOGLE_APP_ID||"184079235871",window.DRAWIO_GOOGLE_CLIENT_ID=window.DRAWIO_GOOGLE_CLIENT_ID||"184079235871-pjf5nn0lff27lk8qf0770gmffiv9gt61.apps.googleusercontent.com");"trello"==urlParams.mode&&(urlParams.tr="1");
-"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";
-window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";window.mxLanguage=window.mxLanguage||urlParams.lang;
-window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.6",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
+"embed.diagrams.net"==window.location.hostname&&(urlParams.embed="1");(null==window.location.hash||1>=window.location.hash.length)&&null!=urlParams.open&&(window.location.hash=urlParams.open);window.urlParams=window.urlParams||{};window.DOM_PURIFY_CONFIG=window.DOM_PURIFY_CONFIG||{ADD_TAGS:["use","foreignObject"],FORBID_TAGS:["form"],ALLOWED_URI_REGEXP:/^((?!javascript:).)*$/i,ADD_ATTR:["target","content","pointer-events","requiredFeatures"]};window.MAX_REQUEST_SIZE=window.MAX_REQUEST_SIZE||10485760;window.MAX_AREA=window.MAX_AREA||225E6;window.EXPORT_URL=window.EXPORT_URL||"/export";window.SAVE_URL=window.SAVE_URL||"/save";window.OPEN_URL=window.OPEN_URL||"/open";
+window.RESOURCES_PATH=window.RESOURCES_PATH||"resources";window.RESOURCE_BASE=window.RESOURCE_BASE||window.RESOURCES_PATH+"/grapheditor";window.STENCIL_PATH=window.STENCIL_PATH||"stencils";window.IMAGE_PATH=window.IMAGE_PATH||"images";window.STYLE_PATH=window.STYLE_PATH||"styles";window.CSS_PATH=window.CSS_PATH||"styles";window.OPEN_FORM=window.OPEN_FORM||"open.html";window.mxBasePath=window.mxBasePath||"mxgraph";window.mxImageBasePath=window.mxImageBasePath||"mxgraph/images";
+window.mxLanguage=window.mxLanguage||urlParams.lang;window.mxLanguages=window.mxLanguages||["de","se"];var mxClient={VERSION:"24.0.7",IS_IE:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("MSIE"),IS_IE11:null!=navigator.userAgent&&!!navigator.userAgent.match(/Trident\/7\./),IS_EDGE:null!=navigator.userAgent&&!!navigator.userAgent.match(/Edge\//),IS_EM:"spellcheck"in document.createElement("textarea")&&8==document.documentMode,VML_PREFIX:"v",OFFICE_PREFIX:"o",IS_NS:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Mozilla/")&&0>navigator.userAgent.indexOf("MSIE")&&0>navigator.userAgent.indexOf("Edge/"),
IS_OP:null!=navigator.userAgent&&(0<=navigator.userAgent.indexOf("Opera/")||0<=navigator.userAgent.indexOf("OPR/")),IS_OT:null!=navigator.userAgent&&0<=navigator.userAgent.indexOf("Presto/")&&0>navigator.userAgent.indexOf("Presto/2.4.")&&0>navigator.userAgent.indexOf("Presto/2.3.")&&0>navigator.userAgent.indexOf("Presto/2.2.")&&0>navigator.userAgent.indexOf("Presto/2.1.")&&0>navigator.userAgent.indexOf("Presto/2.0.")&&0>navigator.userAgent.indexOf("Presto/1."),IS_SF:/Apple Computer, Inc/.test(navigator.vendor),
IS_ANDROID:0<=navigator.appVersion.indexOf("Android"),IS_IOS:/iP(hone|od|ad)/.test(navigator.platform)||navigator.userAgent.match(/Mac/)&&navigator.maxTouchPoints&&2
"));b.innerHTML=Graph.sanitizeHtml(e);w.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=p&&p()}),l.className="geBtn",e.appendChild(l));
-var C=mxUtils.button(f,function(){r&&a.hideDialog();null!=g&&g()});C.className="geBtn";e.appendChild(C);null!=h&&(f=mxUtils.button(h,function(){r&&a.hideDialog();null!=n&&n()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};w.appendChild(e);this.container=w},PrintDialog=function(a,b){this.create(a,b)};
-PrintDialog.prototype.create=function(a){function b(C){var F=h.checked||l.checked,D=parseInt(w.value)/100;isNaN(D)&&(D=1,w.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/e.pageScale;if(F){var J=h.checked?1:parseInt(p.value);isNaN(J)||(I=mxUtils.getScaleForPageCount(J,e,G))}var O=J=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);I*=D;!F&&e.pageVisible?(D=e.getPageLayout(),J-=D.x*G.width,O-=D.y*G.height):
+var ErrorDialog=function(a,b,e,f,g,d,h,n,r,l,p){r=null!=r?r:!0;var x=document.createElement("div");x.style.textAlign="center";if(null!=b){var z=document.createElement("div");z.style.padding="0px";z.style.margin="0px";z.style.fontSize="18px";z.style.paddingBottom="16px";z.style.marginBottom="10px";z.style.borderBottom="1px solid #c0c0c0";z.style.color="gray";z.style.whiteSpace="nowrap";z.style.textOverflow="ellipsis";z.style.overflow="hidden";mxUtils.write(z,b);z.setAttribute("title",b);x.appendChild(z)}b=
+document.createElement("div");b.style.lineHeight="1.2em";b.style.padding="6px";"string"===typeof e&&(e=e.replace(/\n/g,"
"));b.innerHTML=Graph.sanitizeHtml(e);x.appendChild(b);e=document.createElement("div");e.style.marginTop="12px";e.style.textAlign="center";null!=d&&(b=mxUtils.button(mxResources.get("tryAgain"),function(){a.hideDialog();d()}),b.className="geBtn",e.appendChild(b),e.style.textAlign="center");null!=l&&(l=mxUtils.button(l,function(){null!=p&&p()}),l.className="geBtn",e.appendChild(l));
+var C=mxUtils.button(f,function(){r&&a.hideDialog();null!=g&&g()});C.className="geBtn";e.appendChild(C);null!=h&&(f=mxUtils.button(h,function(){r&&a.hideDialog();null!=n&&n()}),f.className="geBtn gePrimaryBtn",e.appendChild(f));this.init=function(){C.focus()};x.appendChild(e);this.container=x},PrintDialog=function(a,b){this.create(a,b)};
+PrintDialog.prototype.create=function(a){function b(C){var F=h.checked||l.checked,D=parseInt(x.value)/100;isNaN(D)&&(D=1,x.value="100%");mxClient.IS_SF&&(D*=.75);var G=e.pageFormat||mxConstants.PAGE_FORMAT_A4_PORTRAIT,I=1/e.pageScale;if(F){var J=h.checked?1:parseInt(p.value);isNaN(J)||(I=mxUtils.getScaleForPageCount(J,e,G))}var O=J=0;G=mxRectangle.fromRectangle(G);G.width=Math.ceil(G.width*D);G.height=Math.ceil(G.height*D);I*=D;!F&&e.pageVisible?(D=e.getPageLayout(),J-=D.x*G.width,O-=D.y*G.height):
F=!0;F=PrintDialog.createPrintPreview(e,I,G,0,J,O,F);F.open();C&&PrintDialog.printPreview(F)}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");var d=document.createElement("tr");var h=document.createElement("input");h.setAttribute("type","checkbox");var n=document.createElement("td");n.setAttribute("colspan","2");n.style.fontSize="10pt";n.appendChild(h);var r=document.createElement("span");mxUtils.write(r," "+mxResources.get("fitPage"));
n.appendChild(r);mxEvent.addListener(r,"click",function(C){h.checked=!h.checked;l.checked=!h.checked;mxEvent.consume(C)});mxEvent.addListener(h,"change",function(){l.checked=!h.checked});d.appendChild(n);g.appendChild(d);d=d.cloneNode(!1);var l=document.createElement("input");l.setAttribute("type","checkbox");n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(l);r=document.createElement("span");mxUtils.write(r," "+mxResources.get("posterPrint")+":");n.appendChild(r);mxEvent.addListener(r,
"click",function(C){l.checked=!l.checked;h.checked=!l.checked;mxEvent.consume(C)});d.appendChild(n);var p=document.createElement("input");p.setAttribute("value","1");p.setAttribute("type","number");p.setAttribute("min","1");p.setAttribute("size","4");p.setAttribute("disabled","disabled");p.style.width="50px";n=document.createElement("td");n.style.fontSize="10pt";n.appendChild(p);mxUtils.write(n," "+mxResources.get("pages")+" (max)");d.appendChild(n);g.appendChild(d);mxEvent.addListener(l,"change",
-function(){l.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");h.checked=!l.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var w=document.createElement("input");w.setAttribute("value","100 %");w.setAttribute("size","5");w.style.width="50px";n.appendChild(w);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2;
+function(){l.checked?p.removeAttribute("disabled"):p.setAttribute("disabled","disabled");h.checked=!l.checked});d=d.cloneNode(!1);n=document.createElement("td");mxUtils.write(n,mxResources.get("pageScale")+":");d.appendChild(n);n=document.createElement("td");var x=document.createElement("input");x.setAttribute("value","100 %");x.setAttribute("size","5");x.style.width="50px";n.appendChild(x);d.appendChild(n);g.appendChild(d);d=document.createElement("tr");n=document.createElement("td");n.colSpan=2;
n.style.paddingTop="20px";n.setAttribute("align","right");r=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});r.className="geBtn";a.editor.cancelFirst&&n.appendChild(r);if(PrintDialog.previewEnabled){var z=mxUtils.button(mxResources.get("preview"),function(){a.hideDialog();b(!1)});z.className="geBtn";n.appendChild(z)}z=mxUtils.button(mxResources.get(PrintDialog.previewEnabled?"print":"ok"),function(){a.hideDialog();b(!0)});z.className="geBtn gePrimaryBtn";n.appendChild(z);a.editor.cancelFirst||
n.appendChild(r);d.appendChild(n);g.appendChild(d);f.appendChild(g);this.container=f};PrintDialog.printPreview=function(a){try{null!=a.wnd&&window.setTimeout(function(){a.wnd.focus();a.wnd.print();a.wnd.close()},500)}catch(b){}};
PrintDialog.createPrintPreview=function(a,b,e,f,g,d,h){b=new mxPrintPreview(a,b,e,f,g,d);b.title=mxResources.get("preview");b.addPageCss=!mxClient.IS_SF;b.printBackgroundImage=!0;b.autoOrigin=h;h=a.background;if(null==h||""==h||h==mxConstants.NONE)h="#ffffff";b.backgroundColor=h;var n=b.isTextLabel;b.isTextLabel=function(p){return"geHint"==!p.className&&n.apply(this,arguments)};var r=b.getLinkForCellState;b.getLinkForCellState=function(p){return a.getAbsoluteUrl(r.apply(this,arguments))};var l=b.writeHead;
b.writeHead=function(p){l.apply(this,arguments);p.writeln('")};return b};PrintDialog.previewEnabled=!0;
-var PageSetupDialog=function(a){function b(){var D=w;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(p.style.backgroundImage="url("+D.src+")",p.style.display="inline-block"):(p.style.backgroundImage="",p.style.display="none");p.style.backgroundColor="";null!=z&&z!=mxConstants.NONE&&(p.style.backgroundColor=z,p.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");
+var PageSetupDialog=function(a){function b(){var D=x;null!=D&&null!=D.originalSrc&&(D=a.createImageForPageLink(D.originalSrc,null));null!=D&&null!=D.src?(p.style.backgroundImage="url("+D.src+")",p.style.display="inline-block"):(p.style.backgroundImage="",p.style.display="none");p.style.backgroundColor="";null!=z&&z!=mxConstants.NONE&&(p.style.backgroundColor=z,p.style.display="inline-block")}var e=a.editor.graph,f=document.createElement("table");f.style.width="100%";f.style.height="100%";var g=document.createElement("tbody");
var d=document.createElement("tr");var h=document.createElement("td");h.style.verticalAlign="top";h.style.fontSize="10pt";mxUtils.write(h,mxResources.get("paperSize")+":");d.appendChild(h);h=document.createElement("td");h.style.verticalAlign="top";h.style.fontSize="10pt";var n=PageSetupDialog.addPageFormatPanel(h,"pagesetupdialog",e.pageFormat);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("gridSize")+":");d.appendChild(h);
h=document.createElement("td");h.style.whiteSpace="nowrap";var r=document.createElement("input");r.setAttribute("type","number");r.setAttribute("min","0");r.style.width="40px";r.style.marginLeft="6px";r.value=e.getGridSize();h.appendChild(r);mxEvent.addListener(r,"change",function(){var D=parseInt(r.value);r.value=Math.max(1,isNaN(D)?e.getGridSize():D)});d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");mxUtils.write(h,mxResources.get("background")+":");
d.appendChild(h);h=document.createElement("td");var l=document.createElement("button");l.className="geBtn";l.style.margin="0px";mxUtils.write(l,mxResources.get("change")+"...");var p=document.createElement("div");p.style.display="inline-block";p.style.verticalAlign="middle";p.style.backgroundPosition="center center";p.style.backgroundRepeat="no-repeat";p.style.backgroundSize="contain";p.style.border="1px solid lightGray";p.style.borderRadius="4px";p.style.marginRight="14px";p.style.height="32px";
-p.style.width="64px";p.style.cursor="pointer";p.style.padding="4px";var w=e.backgroundImage,z=e.background,C=e.shadowVisible,F=function(D){a.showBackgroundImageDialog(function(G,I,J,O){I||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),w=G,C=O);z=J;b()},w,z,!0);mxEvent.consume(D)};mxEvent.addListener(l,"click",F);mxEvent.addListener(p,"click",F);b();h.appendChild(p);h.appendChild(l);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");
-h.colSpan=2;h.style.paddingTop="16px";h.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&h.appendChild(l);F=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(r.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,z,w,n.get());D.ignoreColor=e.background==z;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=w?w.src:null);null!=C&&
+p.style.width="64px";p.style.cursor="pointer";p.style.padding="4px";var x=e.backgroundImage,z=e.background,C=e.shadowVisible,F=function(D){a.showBackgroundImageDialog(function(G,I,J,O){I||(null!=G&&null!=G.src&&Graph.isPageLink(G.src)&&(G={originalSrc:G.src}),x=G,C=O);z=J;b()},x,z,!0);mxEvent.consume(D)};mxEvent.addListener(l,"click",F);mxEvent.addListener(p,"click",F);b();h.appendChild(p);h.appendChild(l);d.appendChild(h);g.appendChild(d);d=document.createElement("tr");h=document.createElement("td");
+h.colSpan=2;h.style.paddingTop="16px";h.setAttribute("align","right");l=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});l.className="geBtn";a.editor.cancelFirst&&h.appendChild(l);F=mxUtils.button(mxResources.get("apply"),function(){a.hideDialog();var D=parseInt(r.value);isNaN(D)||e.gridSize===D||e.setGridSize(D);D=new ChangePageSetup(a,z,x,n.get());D.ignoreColor=e.background==z;D.ignoreImage=(null!=e.backgroundImage?e.backgroundImage.src:null)===(null!=x?x.src:null);null!=C&&
(D.shadowVisible=C);e.pageFormat.width==D.previousFormat.width&&e.pageFormat.height==D.previousFormat.height&&D.ignoreColor&&D.ignoreImage&&D.shadowVisible==e.shadowVisible||e.model.execute(D)});F.className="geBtn gePrimaryBtn";h.appendChild(F);a.editor.cancelFirst||h.appendChild(l);d.appendChild(h);g.appendChild(d);f.appendChild(g);this.container=f};
-PageSetupDialog.addPageFormatPanel=function(a,b,e,f){function g(Z,S,X){if(X||w!=document.activeElement&&z!=document.activeElement){Z=!1;for(S=0;S
"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";
-var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight="normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=
-ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var O=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,A){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var B=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=
-160*B;this.bounds.height=60*B;var E=null!=u.text?u.text.margin:null;null==E&&(E=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));this.bounds.x+=E.x*this.bounds.width;this.bounds.y+=E.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow=
-"auto";this.textarea.clientHeight
").replace(/\n/g,"
"),0
"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("
")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,
-A){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==A&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style,
-mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==u.text?30:u.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u?
-b(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;u=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(u,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-
-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),this.hint=null)};var S=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,A){S.apply(this,arguments);var B=this.graph.getCellStyle(u);if(null==B.childLayout){var E=this.graph.model.getParent(u),L=null!=E?this.graph.getCellGeometry(E):
-null;if(null!=L&&(B=this.graph.getCellStyle(E),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(E);L=L.clone();B?L.height=A.height+W.y+W.height+2*P:L.width=A.width+W.x+W.width+2*P;this.graph.model.setGeometry(E,L)}}};var X=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(ja){B.get(ja)||
-(B.put(ja,!0),L.push(ja))}for(var A=X.apply(this,arguments),B=new mxDictionary,E=this.graph.model,L=[],P=0;P
"));ja=Graph.sanitizeHtml(A?ja.replace(/\n/g,"").replace(/<br\s*.?>/g,"
"):ja,!0);this.textarea.className="mxCellEditor mxPlainTextEditor";var ea=mxConstants.DEFAULT_FONTSIZE;this.textarea.style.lineHeight=mxConstants.ABSOLUTE_LINE_HEIGHT?Math.round(ea*mxConstants.LINE_HEIGHT)+"px":mxConstants.LINE_HEIGHT;this.textarea.style.fontSize=Math.round(ea)+"px";this.textarea.style.textDecoration="";this.textarea.style.fontWeight=
+"normal";this.textarea.style.fontStyle="";this.textarea.style.fontFamily=mxConstants.DEFAULT_FONTFAMILY;this.textarea.style.textAlign="left";this.textarea.style.width="";this.textarea.style.padding="2px";this.textarea.innerHTML!=ja&&(this.textarea.innerHTML=ja);this.codeViewMode=!0}this.textarea.focus();null!=this.switchSelectionState&&this.restoreSelection(this.switchSelectionState);this.switchSelectionState=B;this.resize()}};var O=mxCellEditor.prototype.resize;mxCellEditor.prototype.resize=function(u,
+A){if(null!=this.textarea)if(u=this.graph.getView().getState(this.editingCell),this.codeViewMode&&null!=u){var B=u.view.scale;this.bounds=mxRectangle.fromRectangle(u);if(0==this.bounds.width&&0==this.bounds.height){this.bounds.width=160*B;this.bounds.height=60*B;var E=null!=u.text?u.text.margin:null;null==E&&(E=mxUtils.getAlignmentAsPoint(mxUtils.getValue(u.style,mxConstants.STYLE_ALIGN,mxConstants.ALIGN_CENTER),mxUtils.getValue(u.style,mxConstants.STYLE_VERTICAL_ALIGN,mxConstants.ALIGN_MIDDLE)));
+this.bounds.x+=E.x*this.bounds.width;this.bounds.y+=E.y*this.bounds.height}this.textarea.style.width=Math.round((this.bounds.width-4)/B)+"px";this.textarea.style.height=Math.round((this.bounds.height-4)/B)+"px";this.textarea.style.overflow="auto";this.textarea.clientHeight
").replace(/\n/g,"
"),0
"==A.substring(A.length-4))&&(A=A.substring(0,A.lastIndexOf("
")):A=A.replace(/\r\n/g,"").replace(/\n/g,"");return A};var K=mxCellEditor.prototype.stopEditing;mxCellEditor.prototype.stopEditing=function(u){this.codeViewMode&&
+this.toggleViewMode();K.apply(this,arguments);this.focusContainer()};mxCellEditor.prototype.focusContainer=function(){try{this.graph.container.focus()}catch(u){}};var Z=mxCellEditor.prototype.applyValue;mxCellEditor.prototype.applyValue=function(u,A){this.graph.getModel().beginUpdate();try{Z.apply(this,arguments),""==A&&this.graph.isCellDeletable(u.cell)&&0==this.graph.model.getChildCount(u.cell)&&this.graph.isTransparentState(u)&&this.graph.removeCells([u.cell],!1)}finally{this.graph.getModel().endUpdate()}};
+mxCellEditor.prototype.getBackgroundColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BACKGROUNDCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getBorderColor=function(u){u=mxUtils.getValue(u.style,mxConstants.STYLE_LABEL_BORDERCOLOR,null);u==mxConstants.NONE&&(u=null);return u};mxCellEditor.prototype.getMinimumSize=function(u){var A=this.graph.getView().scale;return new mxRectangle(0,0,null==u.text?30:u.text.size*A+20,30)};mxGraphHandlerIsValidDropTarget=
+mxGraphHandler.prototype.isValidDropTarget;mxGraphHandler.prototype.isValidDropTarget=function(u,A){return mxGraphHandlerIsValidDropTarget.apply(this,arguments)&&!mxEvent.isAltDown(A.getEvent)};mxGraphView.prototype.formatUnitText=function(u){return u?b(u,this.unit):u};mxGraphHandler.prototype.updateHint=function(u){if(null!=this.pBounds&&(null!=this.shape||this.livePreviewActive)){null==this.hint&&(this.hint=a(),this.graph.container.appendChild(this.hint));var A=this.graph.view.translate,B=this.graph.view.scale;
+u=this.roundLength((this.bounds.x+this.currentDx)/B-A.x);A=this.roundLength((this.bounds.y+this.currentDy)/B-A.y);B=this.graph.view.unit;this.hint.innerHTML=b(u,B)+", "+b(A,B);this.hint.style.left=this.pBounds.x+this.currentDx+Math.round((this.pBounds.width-this.hint.clientWidth)/2)+"px";this.hint.style.top=this.pBounds.y+this.currentDy+this.pBounds.height+Editor.hintOffset+"px"}};mxGraphHandler.prototype.removeHint=function(){null!=this.hint&&(null!=this.hint.parentNode&&this.hint.parentNode.removeChild(this.hint),
+this.hint=null)};var S=mxStackLayout.prototype.resizeCell;mxStackLayout.prototype.resizeCell=function(u,A){S.apply(this,arguments);var B=this.graph.getCellStyle(u);if(null==B.childLayout){var E=this.graph.model.getParent(u),L=null!=E?this.graph.getCellGeometry(E):null;if(null!=L&&(B=this.graph.getCellStyle(E),"stackLayout"==B.childLayout)){var P=parseFloat(mxUtils.getValue(B,"stackBorder",mxStackLayout.prototype.border));B="1"==mxUtils.getValue(B,"horizontalStack","1");var W=this.graph.getActualStartSize(E);
+L=L.clone();B?L.height=A.height+W.y+W.height+2*P:L.width=A.width+W.x+W.width+2*P;this.graph.model.setGeometry(E,L)}}};var X=mxSelectionCellsHandler.prototype.getHandledSelectionCells;mxSelectionCellsHandler.prototype.getHandledSelectionCells=function(){function u(ja){B.get(ja)||(B.put(ja,!0),L.push(ja))}for(var A=X.apply(this,arguments),B=new mxDictionary,E=this.graph.model,L=[],P=0;P
w?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(m-v,0),c.lineTo(m,v),c.lineTo(v, v),c.close(),c.fill()),0!=H&&(c.setFillAlpha(Math.abs(H)),c.setFillColor(0>H?"#FFFFFF":"#000000"),c.begin(),c.moveTo(0,0),c.lineTo(v,v),c.lineTo(v,q),c.lineTo(0,q-v),c.close(),c.fill()),c.begin(),c.moveTo(v,q),c.lineTo(v,v),c.lineTo(0,0),c.moveTo(v,v),c.lineTo(m,v),c.end(),c.stroke())};f.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?(c=parseFloat(mxUtils.getValue(this.style,"size",this.size))*this.scale,new mxRectangle(c,c,0,0)):null};mxCellRenderer.registerShape("cube", -f);var Ra=Math.tan(mxUtils.toRadians(30)),Pa=(.5-Ra)/2;mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(g,mxConnector);g.prototype.paintEdgeShape=function(c,k){var t=this.createMarker(c,k,!0),m=this.createMarker(c,k,!1);c.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&c.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);c.setShadow(!1);c.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this, +f);var Qa=Math.tan(mxUtils.toRadians(30)),Pa=(.5-Qa)/2;mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(g,mxConnector);g.prototype.paintEdgeShape=function(c,k){var t=this.createMarker(c,k,!0),m=this.createMarker(c,k,!1);c.setDashed(!1);mxPolyline.prototype.paintEdgeShape.apply(this,arguments);null!=this.isDashed&&c.setDashed(this.isDashed,null!=this.style?1==mxUtils.getValue(this.style,mxConstants.STYLE_FIX_DASH,!1):!1);c.setShadow(!1);c.setStrokeColor(this.fill);mxPolyline.prototype.paintEdgeShape.apply(this, arguments);c.setStrokeColor(this.stroke);c.setFillColor(this.stroke);c.setDashed(!1);null!=t&&t();null!=m&&m()};mxCellRenderer.registerShape("wire",g);mxUtils.extend(d,mxCylinder);d.prototype.size=6;d.prototype.paintVertexShape=function(c,k,t,m,q){c.setFillColor(this.stroke);var v=Math.max(0,parseFloat(mxUtils.getValue(this.style,"size",this.size))-2)+2*this.strokewidth;c.ellipse(k+.5*(m-v),t+.5*(q-v),v,v);c.fill();c.setFillColor(mxConstants.NONE);c.rect(k,t,m,q);c.fill()};mxCellRenderer.registerShape("waypoint", -d);mxUtils.extend(h,mxActor);h.prototype.size=20;h.prototype.redrawPath=function(c,k,t,m,q){k=Math.min(m,q/Ra);c.translate((m-k)/2,(q-k)/2+k/4);c.moveTo(0,.25*k);c.lineTo(.5*k,k*Pa);c.lineTo(k,.25*k);c.lineTo(.5*k,(.5-Pa)*k);c.lineTo(0,.25*k);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.redrawPath=function(c,k,t,m,q,v){k=Math.min(m,q/(.5+Ra));v?(c.moveTo(0,.25*k),c.lineTo(.5*k,(.5-Pa)*k),c.lineTo(k,.25*k),c.moveTo(.5* +d);mxUtils.extend(h,mxActor);h.prototype.size=20;h.prototype.redrawPath=function(c,k,t,m,q){k=Math.min(m,q/Qa);c.translate((m-k)/2,(q-k)/2+k/4);c.moveTo(0,.25*k);c.lineTo(.5*k,k*Pa);c.lineTo(k,.25*k);c.lineTo(.5*k,(.5-Pa)*k);c.lineTo(0,.25*k);c.close();c.end()};mxCellRenderer.registerShape("isoRectangle",h);mxUtils.extend(n,mxCylinder);n.prototype.size=20;n.prototype.redrawPath=function(c,k,t,m,q,v){k=Math.min(m,q/(.5+Qa));v?(c.moveTo(0,.25*k),c.lineTo(.5*k,(.5-Pa)*k),c.lineTo(k,.25*k),c.moveTo(.5* k,(.5-Pa)*k),c.lineTo(.5*k,(1-Pa)*k)):(c.translate((m-k)/2,(q-k)/2),c.moveTo(0,.25*k),c.lineTo(.5*k,k*Pa),c.lineTo(k,.25*k),c.lineTo(k,.75*k),c.lineTo(.5*k,(1-Pa)*k),c.lineTo(0,.75*k),c.close());c.end()};mxCellRenderer.registerShape("isoCube",n);mxUtils.extend(r,mxCylinder);r.prototype.redrawPath=function(c,k,t,m,q,v){k=Math.min(q/2,Math.round(q/8)+this.strokewidth-1);if(v&&null!=this.fill||!v&&null==this.fill)c.moveTo(0,k),c.curveTo(0,2*k,m,2*k,m,k),v||(c.stroke(),c.begin()),c.translate(0,k/2),c.moveTo(0, k),c.curveTo(0,2*k,m,2*k,m,k),v||(c.stroke(),c.begin()),c.translate(0,k/2),c.moveTo(0,k),c.curveTo(0,2*k,m,2*k,m,k),v||(c.stroke(),c.begin()),c.translate(0,-k);v||(c.moveTo(0,k),c.curveTo(0,-k/3,m,-k/3,m,k),c.lineTo(m,q-k),c.curveTo(m,q+k/3,0,q+k/3,0,q-k),c.close())};r.prototype.getLabelMargins=function(c){return new mxRectangle(0,2.5*Math.min(c.height/2,Math.round(c.height/8)+this.strokewidth-1),0,0)};mxCellRenderer.registerShape("datastore",r);mxUtils.extend(l,mxCylinder);l.prototype.size=30;l.prototype.darkOpacity= -0;l.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(m,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),x=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(k,t);c.begin();c.moveTo(0,0);c.lineTo(m-v,0);c.lineTo(m,v);c.lineTo(m,q);c.lineTo(0,q);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=x&&(c.setFillAlpha(Math.abs(x)),c.setFillColor(0>x?"#FFFFFF":"#000000"), -c.begin(),c.moveTo(m-v,0),c.lineTo(m-v,v),c.lineTo(m,v),c.close(),c.fill()),c.begin(),c.moveTo(m-v,0),c.lineTo(m-v,v),c.lineTo(m,v),c.end(),c.stroke())};mxCellRenderer.registerShape("note",l);mxUtils.extend(p,l);mxCellRenderer.registerShape("note2",p);p.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,k*this.scale),0,0)}return null};mxUtils.extend(w,mxShape);w.prototype.isoAngle= -15;w.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(m*Math.tan(v),.5*q);c.translate(k,t);c.begin();c.moveTo(.5*m,0);c.lineTo(m,v);c.lineTo(m,q-v);c.lineTo(.5*m,q);c.lineTo(0,q-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*m,2*v);c.lineTo(m,v);c.moveTo(.5*m,2*v);c.lineTo(.5*m,q);c.stroke()};mxCellRenderer.registerShape("isoCube2", -w);mxUtils.extend(z,mxShape);z.prototype.size=15;z.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(k,t);0==v?(c.rect(0,0,m,q),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*m,v,0,0,1,.5*m,0),c.arcTo(.5*m,v,0,0,1,m,v),c.lineTo(m,q-v),c.arcTo(.5*m,v,0,0,1,.5*m,q),c.arcTo(.5*m,v,0,0,1,0,q-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(m,v),c.arcTo(.5*m,v,0,0,1,.5*m,2*v),c.arcTo(.5* -m,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",z);mxUtils.extend(C,mxCylinder);C.prototype.size=15;C.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),x=mxUtils.getValue(this.style,"lid",!0);c.translate(k,t);0==v?(c.rect(0,0,m,q),c.fillAndStroke()):(c.begin(),x?(c.moveTo(0,v),c.arcTo(.5*m,v,0,0,1,.5*m,0),c.arcTo(.5*m,v,0,0,1,m,v)):(c.moveTo(0,0),c.arcTo(.5*m,v,0,0,0,.5*m,v),c.arcTo(.5*m,v, -0,0,0,m,0)),c.lineTo(m,q-v),c.arcTo(.5*m,v,0,0,1,.5*m,q),c.arcTo(.5*m,v,0,0,1,0,q-v),c.close(),c.fillAndStroke(),c.setShadow(!1),x&&(c.begin(),c.moveTo(m,v),c.arcTo(.5*m,v,0,0,1,.5*m,2*v),c.arcTo(.5*m,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",C);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,k,t,m,q){c.moveTo(0,0);c.quadTo(m/2,.5*q,m,0);c.quadTo(.5*m,q/2,m,q);c.quadTo(m/2,.5*q,0,q);c.quadTo(.5*m,q/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(D, -mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(c,k,t,m,q){c.translate(k,t);k=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),x=mxUtils.getValue(this.style,"rounded",!1),H=mxUtils.getValue(this.style, -"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));H||(y*=Math.min(m,q));y=Math.min(y,.5*m,.5*(q-t));k=Math.max(k,y);k=Math.min(m-y,k);x||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),t),c.lineTo(Math.max(y,0),0),c.lineTo(k,0),c.lineTo(k,t)):(c.moveTo(m-k,t),c.lineTo(m-k,0),c.lineTo(m-Math.max(y,0),0),c.lineTo(m-Math.max(y,0),t));x?(c.moveTo(0,y+t),c.arcTo(y,y,0,0,1,y,t),c.lineTo(m-y,t),c.arcTo(y,y,0,0,1,m,y+t),c.lineTo(m,q-y),c.arcTo(y,y,0,0,1,m-y,q),c.lineTo(y, +0;l.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(m,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size))))),w=Math.max(-1,Math.min(1,parseFloat(mxUtils.getValue(this.style,"darkOpacity",this.darkOpacity))));c.translate(k,t);c.begin();c.moveTo(0,0);c.lineTo(m-v,0);c.lineTo(m,v);c.lineTo(m,q);c.lineTo(0,q);c.lineTo(0,0);c.close();c.end();c.fillAndStroke();this.outline||(c.setShadow(!1),0!=w&&(c.setFillAlpha(Math.abs(w)),c.setFillColor(0>w?"#FFFFFF":"#000000"), +c.begin(),c.moveTo(m-v,0),c.lineTo(m-v,v),c.lineTo(m,v),c.close(),c.fill()),c.begin(),c.moveTo(m-v,0),c.lineTo(m-v,v),c.lineTo(m,v),c.end(),c.stroke())};mxCellRenderer.registerShape("note",l);mxUtils.extend(p,l);mxCellRenderer.registerShape("note2",p);p.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",15);return new mxRectangle(0,Math.min(c.height*this.scale,k*this.scale),0,0)}return null};mxUtils.extend(x,mxShape);x.prototype.isoAngle= +15;x.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(.01,Math.min(94,parseFloat(mxUtils.getValue(this.style,"isoAngle",this.isoAngle))))*Math.PI/200;v=Math.min(m*Math.tan(v),.5*q);c.translate(k,t);c.begin();c.moveTo(.5*m,0);c.lineTo(m,v);c.lineTo(m,q-v);c.lineTo(.5*m,q);c.lineTo(0,q-v);c.lineTo(0,v);c.close();c.fillAndStroke();c.setShadow(!1);c.begin();c.moveTo(0,v);c.lineTo(.5*m,2*v);c.lineTo(m,v);c.moveTo(.5*m,2*v);c.lineTo(.5*m,q);c.stroke()};mxCellRenderer.registerShape("isoCube2", +x);mxUtils.extend(z,mxShape);z.prototype.size=15;z.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.translate(k,t);0==v?(c.rect(0,0,m,q),c.fillAndStroke()):(c.begin(),c.moveTo(0,v),c.arcTo(.5*m,v,0,0,1,.5*m,0),c.arcTo(.5*m,v,0,0,1,m,v),c.lineTo(m,q-v),c.arcTo(.5*m,v,0,0,1,.5*m,q),c.arcTo(.5*m,v,0,0,1,0,q-v),c.close(),c.fillAndStroke(),c.setShadow(!1),c.begin(),c.moveTo(m,v),c.arcTo(.5*m,v,0,0,1,.5*m,2*v),c.arcTo(.5* +m,v,0,0,1,0,v),c.stroke())};mxCellRenderer.registerShape("cylinder2",z);mxUtils.extend(C,mxCylinder);C.prototype.size=15;C.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.max(0,Math.min(.5*q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))),w=mxUtils.getValue(this.style,"lid",!0);c.translate(k,t);0==v?(c.rect(0,0,m,q),c.fillAndStroke()):(c.begin(),w?(c.moveTo(0,v),c.arcTo(.5*m,v,0,0,1,.5*m,0),c.arcTo(.5*m,v,0,0,1,m,v)):(c.moveTo(0,0),c.arcTo(.5*m,v,0,0,0,.5*m,v),c.arcTo(.5*m,v, +0,0,0,m,0)),c.lineTo(m,q-v),c.arcTo(.5*m,v,0,0,1,.5*m,q),c.arcTo(.5*m,v,0,0,1,0,q-v),c.close(),c.fillAndStroke(),c.setShadow(!1),w&&(c.begin(),c.moveTo(m,v),c.arcTo(.5*m,v,0,0,1,.5*m,2*v),c.arcTo(.5*m,v,0,0,1,0,v),c.stroke()))};mxCellRenderer.registerShape("cylinder3",C);mxUtils.extend(F,mxActor);F.prototype.redrawPath=function(c,k,t,m,q){c.moveTo(0,0);c.quadTo(m/2,.5*q,m,0);c.quadTo(.5*m,q/2,m,q);c.quadTo(m/2,.5*q,0,q);c.quadTo(.5*m,q/2,0,0);c.end()};mxCellRenderer.registerShape("switch",F);mxUtils.extend(D, +mxCylinder);D.prototype.tabWidth=60;D.prototype.tabHeight=20;D.prototype.tabPosition="right";D.prototype.arcSize=.1;D.prototype.paintVertexShape=function(c,k,t,m,q){c.translate(k,t);k=Math.max(0,Math.min(m,parseFloat(mxUtils.getValue(this.style,"tabWidth",this.tabWidth))));t=Math.max(0,Math.min(q,parseFloat(mxUtils.getValue(this.style,"tabHeight",this.tabHeight))));var v=mxUtils.getValue(this.style,"tabPosition",this.tabPosition),w=mxUtils.getValue(this.style,"rounded",!1),H=mxUtils.getValue(this.style, +"absoluteArcSize",!1),y=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));H||(y*=Math.min(m,q));y=Math.min(y,.5*m,.5*(q-t));k=Math.max(k,y);k=Math.min(m-y,k);w||(y=0);c.begin();"left"==v?(c.moveTo(Math.max(y,0),t),c.lineTo(Math.max(y,0),0),c.lineTo(k,0),c.lineTo(k,t)):(c.moveTo(m-k,t),c.lineTo(m-k,0),c.lineTo(m-Math.max(y,0),0),c.lineTo(m-Math.max(y,0),t));w?(c.moveTo(0,y+t),c.arcTo(y,y,0,0,1,y,t),c.lineTo(m-y,t),c.arcTo(y,y,0,0,1,m,y+t),c.lineTo(m,q-y),c.arcTo(y,y,0,0,1,m-y,q),c.lineTo(y, q),c.arcTo(y,y,0,0,1,0,q-y)):(c.moveTo(0,t),c.lineTo(m,t),c.lineTo(m,q),c.lineTo(0,q));c.close();c.fillAndStroke();c.setShadow(!1);"triangle"==mxUtils.getValue(this.style,"folderSymbol",null)&&(c.begin(),c.moveTo(m-30,t+20),c.lineTo(m-20,t+10),c.lineTo(m-10,t+20),c.close(),c.stroke())};mxCellRenderer.registerShape("folder",D);D.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style, "labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;k=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var m=mxUtils.getValue(this.style,"rounded",!1),q=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q||(v*=Math.min(c.width,c.height));v=Math.min(v,.5*c.width,.5*(c.height-k));m||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width- -t),Math.min(c.height,c.height-k)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-k))}return new mxRectangle(0,Math.min(c.height,k),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,k,t,m,q){c.translate(k,t);var v=mxUtils.getValue(this.style,"rounded",!1),x=mxUtils.getValue(this.style,"absoluteArcSize",!1);k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t=mxUtils.getValue(this.style,"umlStateConnection", -null);x||(k*=Math.min(m,q));k=Math.min(k,.5*m,.5*q);v||(k=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,k);c.arcTo(k,k,0,0,1,v+k,0);c.lineTo(m-k,0);c.arcTo(k,k,0,0,1,m,k);c.lineTo(m,q-k);c.arcTo(k,k,0,0,1,m-k,q);c.lineTo(v+k,q);c.arcTo(k,k,0,0,1,v,q-k);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(m-40,q-20,10,10,3,3),c.stroke(),c.roundrect(m-20,q-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(m-30,q-15),c.lineTo(m-20,q-15), +t),Math.min(c.height,c.height-k)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-k))}return new mxRectangle(0,Math.min(c.height,k),0,0)}return null};mxUtils.extend(G,mxCylinder);G.prototype.arcSize=.1;G.prototype.paintVertexShape=function(c,k,t,m,q){c.translate(k,t);var v=mxUtils.getValue(this.style,"rounded",!1),w=mxUtils.getValue(this.style,"absoluteArcSize",!1);k=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));t=mxUtils.getValue(this.style,"umlStateConnection", +null);w||(k*=Math.min(m,q));k=Math.min(k,.5*m,.5*q);v||(k=0);v=0;null!=t&&(v=10);c.begin();c.moveTo(v,k);c.arcTo(k,k,0,0,1,v+k,0);c.lineTo(m-k,0);c.arcTo(k,k,0,0,1,m,k);c.lineTo(m,q-k);c.arcTo(k,k,0,0,1,m-k,q);c.lineTo(v+k,q);c.arcTo(k,k,0,0,1,v,q-k);c.close();c.fillAndStroke();c.setShadow(!1);"collapseState"==mxUtils.getValue(this.style,"umlStateSymbol",null)&&(c.roundrect(m-40,q-20,10,10,3,3),c.stroke(),c.roundrect(m-20,q-20,10,10,3,3),c.stroke(),c.begin(),c.moveTo(m-30,q-15),c.lineTo(m-20,q-15), c.stroke());"connPointRefEntry"==t?(c.ellipse(0,.5*q-10,20,20),c.fillAndStroke()):"connPointRefExit"==t&&(c.ellipse(0,.5*q-10,20,20),c.fillAndStroke(),c.begin(),c.moveTo(5,.5*q-5),c.lineTo(15,.5*q+5),c.moveTo(15,.5*q-5),c.lineTo(5,.5*q+5),c.stroke())};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10*this.scale,0,0,0):null};mxCellRenderer.registerShape("umlState",G);mxUtils.extend(I, mxActor);I.prototype.size=30;I.prototype.isRoundable=function(){return!0};I.prototype.redrawPath=function(c,k,t,m,q){k=Math.max(0,Math.min(m,Math.min(q,parseFloat(mxUtils.getValue(this.style,"size",this.size)))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(k,0),new mxPoint(m,0),new mxPoint(m,q),new mxPoint(0,q),new mxPoint(0,k)],this.isRounded,t,!0);c.end()};mxCellRenderer.registerShape("card",I);mxUtils.extend(J,mxActor);J.prototype.size= .4;J.prototype.redrawPath=function(c,k,t,m,q){k=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,k/2);c.quadTo(m/4,1.4*k,m/2,k/2);c.quadTo(3*m/4,k*(1-1.4),m,k/2);c.lineTo(m,q-k/2);c.quadTo(3*m/4,q-1.4*k,m/2,q-k/2);c.quadTo(m/4,q-k*(1-1.4),0,q-k/2);c.lineTo(0,k/2);c.close();c.end()};J.prototype.getLabelBounds=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",this.size),t=c.width,m=c.height;if(null==this.direction|| this.direction==mxConstants.DIRECTION_EAST||this.direction==mxConstants.DIRECTION_WEST)return k*=m,new mxRectangle(c.x,c.y+k,t,m-2*k);k*=t;return new mxRectangle(c.x+k,c.y,t-2*k,m)}return c};mxCellRenderer.registerShape("tape",J);mxUtils.extend(O,mxActor);O.prototype.size=.3;O.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)?new mxRectangle(0,0,0,parseFloat(mxUtils.getValue(this.style,"size",this.size))*c.height):null};O.prototype.redrawPath=function(c,k,t, -m,q){k=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(m,0);c.lineTo(m,q-k/2);c.quadTo(3*m/4,q-1.4*k,m/2,q-k/2);c.quadTo(m/4,q-k*(1-1.4),0,q-k/2);c.lineTo(0,k/2);c.close();c.end()};mxCellRenderer.registerShape("document",O);var Wa=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,k,t,m){var q=mxUtils.getValue(this.style,"size");return null!=q?m*Math.max(0,Math.min(1,q)):Wa.apply(this,arguments)};mxCylinder.prototype.getLabelMargins= +m,q){k=q*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));c.moveTo(0,0);c.lineTo(m,0);c.lineTo(m,q-k/2);c.quadTo(3*m/4,q-1.4*k,m/2,q-k/2);c.quadTo(m/4,q-k*(1-1.4),0,q-k/2);c.lineTo(0,k/2);c.close();c.end()};mxCellRenderer.registerShape("document",O);var Va=mxCylinder.prototype.getCylinderSize;mxCylinder.prototype.getCylinderSize=function(c,k,t,m){var q=mxUtils.getValue(this.style,"size");return null!=q?m*Math.max(0,Math.min(1,q)):Va.apply(this,arguments)};mxCylinder.prototype.getLabelMargins= function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=2*mxUtils.getValue(this.style,"size",.15);return new mxRectangle(0,Math.min(this.maxHeight*this.scale,c.height*k),0,0)}return null};C.prototype.getLabelMargins=function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"size",15);mxUtils.getValue(this.style,"lid",!0)||(k/=2);return new mxRectangle(0,Math.min(c.height*this.scale,2*k*this.scale),0,Math.max(0,.3*k*this.scale))}return null};D.prototype.getLabelMargins= function(c){if(mxUtils.getValue(this.style,"boundedLbl",!1)){var k=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;if(mxUtils.getValue(this.style,"labelInHeader",!1)){var t=mxUtils.getValue(this.style,"tabWidth",15)*this.scale;k=mxUtils.getValue(this.style,"tabHeight",15)*this.scale;var m=mxUtils.getValue(this.style,"rounded",!1),q=mxUtils.getValue(this.style,"absoluteArcSize",!1),v=parseFloat(mxUtils.getValue(this.style,"arcSize",this.arcSize));q||(v*=Math.min(c.width,c.height));v=Math.min(v, .5*c.width,.5*(c.height-k));m||(v=0);return"left"==mxUtils.getValue(this.style,"tabPosition",this.tabPosition)?new mxRectangle(v,0,Math.min(c.width,c.width-t),Math.min(c.height,c.height-k)):new mxRectangle(Math.min(c.width,c.width-t),0,v,Math.min(c.height,c.height-k))}return new mxRectangle(0,Math.min(c.height,k),0,0)}return null};G.prototype.getLabelMargins=function(c){return mxUtils.getValue(this.style,"boundedLbl",!1)&&null!=mxUtils.getValue(this.style,"umlStateConnection",null)?new mxRectangle(10* @@ -3376,180 +3375,180 @@ this.scale,0,0,0):null};p.prototype.getLabelMargins=function(c){if(mxUtils.getVa k,t,m,q){k="0"!=mxUtils.getValue(this.style,"fixedSize","0")?Math.max(0,Math.min(.5*m,parseFloat(mxUtils.getValue(this.style,"size",this.fixedSize)))):m*Math.max(0,Math.min(.5,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(0,q),new mxPoint(k,0),new mxPoint(m-k,0),new mxPoint(m,q)],this.isRounded,t,!0)};mxCellRenderer.registerShape("trapezoid",Z);mxUtils.extend(S,mxActor); S.prototype.size=.5;S.prototype.redrawPath=function(c,k,t,m,q){c.setFillColor(null);k=m*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"size",this.size))));t=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/2;this.addPoints(c,[new mxPoint(m,0),new mxPoint(k,0),new mxPoint(k,q/2),new mxPoint(0,q/2),new mxPoint(k,q/2),new mxPoint(k,q),new mxPoint(m,q)],this.isRounded,t,!1);c.end()};mxCellRenderer.registerShape("curlyBracket",S);mxUtils.extend(X,mxActor); X.prototype.redrawPath=function(c,k,t,m,q){c.setStrokeWidth(1);c.setFillColor(this.stroke);k=m/5;c.rect(0,0,k,q);c.fillAndStroke();c.rect(2*k,0,k,q);c.fillAndStroke();c.rect(4*k,0,k,q);c.fillAndStroke()};mxCellRenderer.registerShape("parallelMarker",X);ca.prototype.moveTo=function(c,k){this.originalMoveTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;this.firstX=c;this.firstY=k};ca.prototype.close=function(){null!=this.firstX&&null!=this.firstY&&(this.lineTo(this.firstX,this.firstY),this.originalClose.apply(this.canvas, -arguments));this.originalClose.apply(this.canvas,arguments)};ca.prototype.quadTo=function(c,k,t,m){this.originalQuadTo.apply(this.canvas,arguments);this.lastX=t;this.lastY=m};ca.prototype.curveTo=function(c,k,t,m,q,v){this.originalCurveTo.apply(this.canvas,arguments);this.lastX=q;this.lastY=v};ca.prototype.arcTo=function(c,k,t,m,q,v,x){this.originalArcTo.apply(this.canvas,arguments);this.lastX=v;this.lastY=x};ca.prototype.lineTo=function(c,k){if(null!=this.lastX&&null!=this.lastY){var t=function(N){return"number"=== -typeof N?N?0>N?-1:1:N===N?0:NaN:NaN},m=Math.abs(c-this.lastX),q=Math.abs(k-this.lastY),v=Math.sqrt(m*m+q*q);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;return}var x=Math.round(v/10),H=this.defaultVariation;5>x&&(x=5,H/=3);var y=t(c-this.lastX)*m/x;t=t(k-this.lastY)*q/x;m/=v;q/=v;for(v=0;vN?-1:1:N===N?0:NaN:NaN},m=Math.abs(c-this.lastX),q=Math.abs(k-this.lastY),v=Math.sqrt(m*m+q*q);if(2>v){this.originalLineTo.apply(this.canvas,arguments);this.lastX=c;this.lastY=k;return}var w=Math.round(v/10),H=this.defaultVariation;5>w&&(w=5,H/=3);var y=t(c-this.lastX)*m/w;t=t(k-this.lastY)*q/w;m/=v;q/=v;for(v=0;v x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?Z.prototype.fixedSize:Z.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale); -var x=c.x,H=c.y,y=c.width,ba=c.height;k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_EAST?(q=q?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+q,H),new mxPoint(x+y-q,H),new mxPoint(x+y,H+ba),new mxPoint(x,H+ba),new mxPoint(x+q,H)]):k==mxConstants.DIRECTION_WEST?(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H),new mxPoint(x+y-q,H+ -ba),new mxPoint(x+q,H+ba),new mxPoint(x,H)]):k==mxConstants.DIRECTION_NORTH?(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H+q),new mxPoint(x+y,H),new mxPoint(x+y,H+ba),new mxPoint(x,H+ba-q),new mxPoint(x,H+q)]):(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y,H+q),new mxPoint(x+y,H+ba-q),new mxPoint(x,H+ba),new mxPoint(x,H)]);ba=c.getCenterX();c=c.getCenterY();c=new mxPoint(ba,c);m&&(t.x x+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H, -c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?ma.prototype.fixedSize:ma.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale);var x=c.x,H=c.y,y=c.width,ba=c.height,N=c.getCenterX();c=c.getCenterY();k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_EAST? -(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(x+y-q,H),new mxPoint(x+y,c),new mxPoint(x+y-q,H+ba),new mxPoint(x,H+ba),new mxPoint(x+q,c),new mxPoint(x,H)]):k==mxConstants.DIRECTION_WEST?(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+q,H),new mxPoint(x+y,H),new mxPoint(x+y-q,c),new mxPoint(x+y,H+ba),new mxPoint(x+q,H+ba),new mxPoint(x,c),new mxPoint(x+q,H)]):k==mxConstants.DIRECTION_NORTH?(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0, -Math.min(1,v)),H=[new mxPoint(x,H+q),new mxPoint(N,H),new mxPoint(x+y,H+q),new mxPoint(x+y,H+ba),new mxPoint(N,H+ba-q),new mxPoint(x,H+ba),new mxPoint(x,H+q)]):(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(x,H),new mxPoint(N,H+q),new mxPoint(x+y,H),new mxPoint(x+y,H+ba-q),new mxPoint(N,H+ba),new mxPoint(x,H+ba-q),new mxPoint(x,H)]);N=new mxPoint(N,c);m&&(t.x x+y?N.y=t.y:N.x=t.x);return mxUtils.getPerimeterPoint(H,N,t)};mxStyleRegistry.putValue("stepPerimeter", -mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?la.prototype.fixedSize:la.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale);var x=c.x,H=c.y,y=c.width,ba=c.height,N=c.getCenterX();c=c.getCenterY();k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_SOUTH?(q=q?Math.max(0, -Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(N,H),new mxPoint(x+y,H+q),new mxPoint(x+y,H+ba-q),new mxPoint(N,H+ba),new mxPoint(x,H+ba-q),new mxPoint(x,H+q),new mxPoint(N,H)]):(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(x+q,H),new mxPoint(x+y-q,H),new mxPoint(x+y,c),new mxPoint(x+y-q,H+ba),new mxPoint(x+q,H+ba),new mxPoint(x,c),new mxPoint(x+q,H)]);N=new mxPoint(N,c);m&&(t.x x+y?N.y=t.y:N.x=t.x);return mxUtils.getPerimeterPoint(H,N,t)};mxStyleRegistry.putValue("hexagonPerimeter2", -mxPerimeter.HexagonPerimeter2);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(k,t);c.ellipse((m-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(m/2,v);c.lineTo(m/2,q);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",va);mxUtils.extend(Ca,mxShape);Ca.prototype.size=10;Ca.prototype.inset=2;Ca.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style, -"size",this.size)),x=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(k,t);c.begin();c.moveTo(m/2,v+x);c.lineTo(m/2,q);c.end();c.stroke();c.begin();c.moveTo((m-v)/2-x,v/2);c.quadTo((m-v)/2-x,v+x,m/2,v+x);c.quadTo((m+v)/2+x,v+x,(m+v)/2+x,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ca);mxUtils.extend(Qa,mxShape);Qa.prototype.paintBackground=function(c,k,t,m,q){c.translate(k,t);c.begin();c.moveTo(0,0);c.quadTo(m,0,m,q/2);c.quadTo(m,q,0,q); -c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Qa);mxUtils.extend(Na,mxShape);Na.prototype.inset=2;Na.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(k,t);c.ellipse(0,v,m-2*v,q-2*v);c.fillAndStroke();c.begin();c.moveTo(m/2,0);c.quadTo(m,0,m,q/2);c.quadTo(m,q,m/2,q);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",Na);mxUtils.extend(Fa,mxCylinder);Fa.prototype.jettyWidth= -20;Fa.prototype.jettyHeight=10;Fa.prototype.redrawPath=function(c,k,t,m,q,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var H=Math.min(k,q-k),y=Math.min(H+2*k,q-k);v?(c.moveTo(t,H),c.lineTo(x,H),c.lineTo(x,H+k),c.lineTo(t,H+k),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+k),c.lineTo(t,y+k)):(c.moveTo(t,0),c.lineTo(m,0),c.lineTo(m,q),c.lineTo(t,q),c.lineTo(t,y+k),c.lineTo(0,y+k),c.lineTo(0, -y),c.lineTo(t,y),c.lineTo(t,H+k),c.lineTo(0,H+k),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("module",Fa);mxUtils.extend(La,mxCylinder);La.prototype.jettyWidth=32;La.prototype.jettyHeight=12;La.prototype.redrawPath=function(c,k,t,m,q,v){var x=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=x/2;x=t+x/2;var H=.3*q-k/2,y=.7*q-k/2;v?(c.moveTo(t,H),c.lineTo(x,H),c.lineTo(x, -H+k),c.lineTo(t,H+k),c.moveTo(t,y),c.lineTo(x,y),c.lineTo(x,y+k),c.lineTo(t,y+k)):(c.moveTo(t,0),c.lineTo(m,0),c.lineTo(m,q),c.lineTo(t,q),c.lineTo(t,y+k),c.lineTo(0,y+k),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,H+k),c.lineTo(0,H+k),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("component",La);mxUtils.extend(ta,mxRectangleShape);ta.prototype.paintForeground=function(c,k,t,m,q){var v=m/2,x=q/2,H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ -2;c.begin();this.addPoints(c,[new mxPoint(k+v,t),new mxPoint(k+m,t+x),new mxPoint(k+v,t+q),new mxPoint(k,t+x)],this.isRounded,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ta);mxUtils.extend(Ma,mxDoubleEllipse);Ma.prototype.outerStroke=!0;Ma.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.min(4,Math.min(m/5,q/5));0 w+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H,c,t)};mxStyleRegistry.putValue("parallelogramPerimeter",mxPerimeter.ParallelogramPerimeter);mxPerimeter.TrapezoidPerimeter=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?Z.prototype.fixedSize:Z.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale); +var w=c.x,H=c.y,y=c.width,ba=c.height;k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_EAST?(q=q?Math.max(0,Math.min(.5*y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+q,H),new mxPoint(w+y-q,H),new mxPoint(w+y,H+ba),new mxPoint(w,H+ba),new mxPoint(w+q,H)]):k==mxConstants.DIRECTION_WEST?(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H),new mxPoint(w+y-q,H+ +ba),new mxPoint(w+q,H+ba),new mxPoint(w,H)]):k==mxConstants.DIRECTION_NORTH?(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H+q),new mxPoint(w+y,H),new mxPoint(w+y,H+ba),new mxPoint(w,H+ba-q),new mxPoint(w,H+q)]):(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y,H+q),new mxPoint(w+y,H+ba-q),new mxPoint(w,H+ba),new mxPoint(w,H)]);ba=c.getCenterX();c=c.getCenterY();c=new mxPoint(ba,c);m&&(t.x w+y?c.y=t.y:c.x=t.x);return mxUtils.getPerimeterPoint(H, +c,t)};mxStyleRegistry.putValue("trapezoidPerimeter",mxPerimeter.TrapezoidPerimeter);mxPerimeter.StepPerimeter=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?ma.prototype.fixedSize:ma.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale);var w=c.x,H=c.y,y=c.width,ba=c.height,N=c.getCenterX();c=c.getCenterY();k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_EAST? +(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(w+y-q,H),new mxPoint(w+y,c),new mxPoint(w+y-q,H+ba),new mxPoint(w,H+ba),new mxPoint(w+q,c),new mxPoint(w,H)]):k==mxConstants.DIRECTION_WEST?(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+q,H),new mxPoint(w+y,H),new mxPoint(w+y-q,c),new mxPoint(w+y,H+ba),new mxPoint(w+q,H+ba),new mxPoint(w,c),new mxPoint(w+q,H)]):k==mxConstants.DIRECTION_NORTH?(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0, +Math.min(1,v)),H=[new mxPoint(w,H+q),new mxPoint(N,H),new mxPoint(w+y,H+q),new mxPoint(w+y,H+ba),new mxPoint(N,H+ba-q),new mxPoint(w,H+ba),new mxPoint(w,H+q)]):(q=q?Math.max(0,Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(w,H),new mxPoint(N,H+q),new mxPoint(w+y,H),new mxPoint(w+y,H+ba-q),new mxPoint(N,H+ba),new mxPoint(w,H+ba-q),new mxPoint(w,H)]);N=new mxPoint(N,c);m&&(t.x w+y?N.y=t.y:N.x=t.x);return mxUtils.getPerimeterPoint(H,N,t)};mxStyleRegistry.putValue("stepPerimeter", +mxPerimeter.StepPerimeter);mxPerimeter.HexagonPerimeter2=function(c,k,t,m){var q="0"!=mxUtils.getValue(k.style,"fixedSize","0"),v=q?la.prototype.fixedSize:la.prototype.size;null!=k&&(v=mxUtils.getValue(k.style,"size",v));q&&(v*=k.view.scale);var w=c.x,H=c.y,y=c.width,ba=c.height,N=c.getCenterX();c=c.getCenterY();k=null!=k?mxUtils.getValue(k.style,mxConstants.STYLE_DIRECTION,mxConstants.DIRECTION_EAST):mxConstants.DIRECTION_EAST;k==mxConstants.DIRECTION_NORTH||k==mxConstants.DIRECTION_SOUTH?(q=q?Math.max(0, +Math.min(ba,v)):ba*Math.max(0,Math.min(1,v)),H=[new mxPoint(N,H),new mxPoint(w+y,H+q),new mxPoint(w+y,H+ba-q),new mxPoint(N,H+ba),new mxPoint(w,H+ba-q),new mxPoint(w,H+q),new mxPoint(N,H)]):(q=q?Math.max(0,Math.min(y,v)):y*Math.max(0,Math.min(1,v)),H=[new mxPoint(w+q,H),new mxPoint(w+y-q,H),new mxPoint(w+y,c),new mxPoint(w+y-q,H+ba),new mxPoint(w+q,H+ba),new mxPoint(w,c),new mxPoint(w+q,H)]);N=new mxPoint(N,c);m&&(t.x w+y?N.y=t.y:N.x=t.x);return mxUtils.getPerimeterPoint(H,N,t)};mxStyleRegistry.putValue("hexagonPerimeter2", +mxPerimeter.HexagonPerimeter2);mxUtils.extend(va,mxShape);va.prototype.size=10;va.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style,"size",this.size));c.translate(k,t);c.ellipse((m-v)/2,0,v,v);c.fillAndStroke();c.begin();c.moveTo(m/2,v);c.lineTo(m/2,q);c.end();c.stroke()};mxCellRenderer.registerShape("lollipop",va);mxUtils.extend(Ba,mxShape);Ba.prototype.size=10;Ba.prototype.inset=2;Ba.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style, +"size",this.size)),w=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(k,t);c.begin();c.moveTo(m/2,v+w);c.lineTo(m/2,q);c.end();c.stroke();c.begin();c.moveTo((m-v)/2-w,v/2);c.quadTo((m-v)/2-w,v+w,m/2,v+w);c.quadTo((m+v)/2+w,v+w,(m+v)/2+w,v/2);c.end();c.stroke()};mxCellRenderer.registerShape("requires",Ba);mxUtils.extend(Sa,mxShape);Sa.prototype.paintBackground=function(c,k,t,m,q){c.translate(k,t);c.begin();c.moveTo(0,0);c.quadTo(m,0,m,q/2);c.quadTo(m,q,0,q); +c.end();c.stroke()};mxCellRenderer.registerShape("requiredInterface",Sa);mxUtils.extend(Na,mxShape);Na.prototype.inset=2;Na.prototype.paintBackground=function(c,k,t,m,q){var v=parseFloat(mxUtils.getValue(this.style,"inset",this.inset))+this.strokewidth;c.translate(k,t);c.ellipse(0,v,m-2*v,q-2*v);c.fillAndStroke();c.begin();c.moveTo(m/2,0);c.quadTo(m,0,m,q/2);c.quadTo(m,q,m/2,q);c.end();c.stroke()};mxCellRenderer.registerShape("providedRequiredInterface",Na);mxUtils.extend(Fa,mxCylinder);Fa.prototype.jettyWidth= +20;Fa.prototype.jettyHeight=10;Fa.prototype.redrawPath=function(c,k,t,m,q,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=w/2;w=t+w/2;var H=Math.min(k,q-k),y=Math.min(H+2*k,q-k);v?(c.moveTo(t,H),c.lineTo(w,H),c.lineTo(w,H+k),c.lineTo(t,H+k),c.moveTo(t,y),c.lineTo(w,y),c.lineTo(w,y+k),c.lineTo(t,y+k)):(c.moveTo(t,0),c.lineTo(m,0),c.lineTo(m,q),c.lineTo(t,q),c.lineTo(t,y+k),c.lineTo(0,y+k),c.lineTo(0, +y),c.lineTo(t,y),c.lineTo(t,H+k),c.lineTo(0,H+k),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("module",Fa);mxUtils.extend(La,mxCylinder);La.prototype.jettyWidth=32;La.prototype.jettyHeight=12;La.prototype.redrawPath=function(c,k,t,m,q,v){var w=parseFloat(mxUtils.getValue(this.style,"jettyWidth",this.jettyWidth));k=parseFloat(mxUtils.getValue(this.style,"jettyHeight",this.jettyHeight));t=w/2;w=t+w/2;var H=.3*q-k/2,y=.7*q-k/2;v?(c.moveTo(t,H),c.lineTo(w,H),c.lineTo(w, +H+k),c.lineTo(t,H+k),c.moveTo(t,y),c.lineTo(w,y),c.lineTo(w,y+k),c.lineTo(t,y+k)):(c.moveTo(t,0),c.lineTo(m,0),c.lineTo(m,q),c.lineTo(t,q),c.lineTo(t,y+k),c.lineTo(0,y+k),c.lineTo(0,y),c.lineTo(t,y),c.lineTo(t,H+k),c.lineTo(0,H+k),c.lineTo(0,H),c.lineTo(t,H),c.close());c.end()};mxCellRenderer.registerShape("component",La);mxUtils.extend(ta,mxRectangleShape);ta.prototype.paintForeground=function(c,k,t,m,q){var v=m/2,w=q/2,H=mxUtils.getValue(this.style,mxConstants.STYLE_ARCSIZE,mxConstants.LINE_ARCSIZE)/ +2;c.begin();this.addPoints(c,[new mxPoint(k+v,t),new mxPoint(k+m,t+w),new mxPoint(k+v,t+q),new mxPoint(k,t+w)],this.isRounded,H,!0);c.stroke();mxRectangleShape.prototype.paintForeground.apply(this,arguments)};mxCellRenderer.registerShape("associativeEntity",ta);mxUtils.extend(Ma,mxDoubleEllipse);Ma.prototype.outerStroke=!0;Ma.prototype.paintVertexShape=function(c,k,t,m,q){var v=Math.min(4,Math.min(m/5,q/5));0 5*c&&m.push(new mxConnectionConstraint(new mxPoint(0,.75),!1,null,k));t>8*c&&m.push(new mxConnectionConstraint(new mxPoint(0, @@ -3593,43 +3592,43 @@ W.prototype.constraints=mxEllipse.prototype.constraints;Ja.prototype.constraints function(c,k,t){c=[];var m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",this.arrowWidth)))),q=k*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",this.arrowSize))));m=(t-m)/2;c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-q),m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-q,0));c.push(new mxConnectionConstraint(new mxPoint(1, .5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-q,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k-q),t-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,t-m));return c};Ia.prototype.getConstraints=function(c,k,t){c=[];var m=t*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowWidth",fa.prototype.arrowWidth)))),q=k*Math.max(0,Math.min(1,parseFloat(mxUtils.getValue(this.style,"arrowSize",fa.prototype.arrowSize))));m=(t-m)/2;c.push(new mxConnectionConstraint(new mxPoint(0, .5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-q,0));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k-q,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*k,t-m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,t));return c};xa.prototype.getConstraints= -function(c,k,t){c=[];var m=Math.min(t,k),q=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(t-q)/2;var v=m+q,x=(k-q)/2;q=x+q;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*m));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,q,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t-.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,t-.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+q),m));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,k,m));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+q),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, -0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*x,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,x,m));return c};ra.prototype.constraints=null;u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, -.9),!1)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Qa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, +function(c,k,t){c=[];var m=Math.min(t,k),q=Math.max(0,Math.min(m,m*parseFloat(mxUtils.getValue(this.style,"size",this.size))));m=(t-q)/2;var v=m+q,w=(k-q)/2;q=w+q;c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,0));c.push(new mxConnectionConstraint(new mxPoint(.5,0),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,0));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,.5*m));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,q,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,t-.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,t));c.push(new mxConnectionConstraint(new mxPoint(.5,1),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,t));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,t-.5*m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,q,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+q),m));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,k,m));c.push(new mxConnectionConstraint(new mxPoint(1,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,k,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*(k+q),v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,m));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,0,m));c.push(new mxConnectionConstraint(new mxPoint(0,.5),!1));c.push(new mxConnectionConstraint(new mxPoint(0, +0),!1,null,0,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,.5*w,v));c.push(new mxConnectionConstraint(new mxPoint(0,0),!1,null,w,m));return c};ra.prototype.constraints=null;u.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.25),!1),new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(0,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7, +.9),!1)];A.prototype.constraints=[new mxConnectionConstraint(new mxPoint(.175,.25),!1),new mxConnectionConstraint(new mxPoint(.25,.5),!1),new mxConnectionConstraint(new mxPoint(.175,.75),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1),new mxConnectionConstraint(new mxPoint(.7,.1),!1),new mxConnectionConstraint(new mxPoint(.7,.9),!1)];Sa.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0,.5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)];Na.prototype.constraints=[new mxConnectionConstraint(new mxPoint(0, .5),!1),new mxConnectionConstraint(new mxPoint(1,.5),!1)]})();function Actions(a){this.editorUi=a;this.actions={};this.init()} -Actions.prototype.init=function(){function a(l){d.escape();l=d.deleteCells(d.getDeletableCells(d.getSelectionCells()),l);null!=l&&d.setSelectionCells(l)}function b(){if(!d.isSelectionEmpty()){d.getModel().beginUpdate();try{for(var l=d.getSelectionCells(),p=0;p Math.abs(l-d.view.scale)&&5>Math.abs(p-d.container.scrollLeft)&&5>Math.abs(w-d.container.scrollTop)&&z==d.view.translate.x&&C==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?f.actions.get("smartFit").funct(): -d.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(l,p){try{var w=mxUtils.parseXml(l);g.graph.setSelectionCells(g.graph.importGraphModel(w.documentElement))}catch(z){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+z.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile= +function(){d.popupMenuHandler.hideMenu();var l=d.view.scale,p=d.container.scrollLeft,x=d.container.scrollTop,z=d.view.translate.x,C=d.view.translate.y;f.actions.get("resetView").funct();1E-5>Math.abs(l-d.view.scale)&&5>Math.abs(p-d.container.scrollLeft)&&5>Math.abs(x-d.container.scrollTop)&&z==d.view.translate.x&&C==d.view.translate.y&&f.actions.get("fitWindow").funct()},null,null,"Enter"));this.addAction("keyPressEnter",function(){d.isEnabled()&&(d.isSelectionEmpty()?f.actions.get("smartFit").funct(): +d.startEditingAtCell())});this.addAction("import...",function(){window.openNew=!1;window.openKey="import";window.openFile=new OpenFile(mxUtils.bind(this,function(){f.hideDialog()}));window.openFile.setConsumer(mxUtils.bind(this,function(l,p){try{var x=mxUtils.parseXml(l);g.graph.setSelectionCells(g.graph.importGraphModel(x.documentElement))}catch(z){mxUtils.alert(mxResources.get("invalidOrMissingFile")+": "+z.message)}}));f.showDialog((new OpenDialog(this)).container,320,220,!0,!0,function(){window.openFile= null})}).isEnabled=h;this.addAction("save",function(){f.saveFile(!1)},null,null,Editor.ctrlKey+"+S").isEnabled=h;this.addAction("saveAs...",function(){f.saveFile(!0)},null,null,Editor.ctrlKey+"+Shift+S").isEnabled=h;this.addAction("export...",function(){f.showDialog((new ExportDialog(f)).container,300,340,!0,!0)});this.addAction("editDiagram...",function(){var l=new EditDiagramDialog(f);f.showDialog(l.container,620,420,!0,!1);l.init()}).isEnabled=h;this.addAction("pageSetup...",function(){f.showDialog((new PageSetupDialog(f)).container, 320,240,!0,!0)}).isEnabled=h;this.addAction("print...",function(){f.showDialog((new PrintDialog(f)).container,300,180,!0,!0)},null,"sprite-print",Editor.ctrlKey+"+P");this.addAction("preview",function(){mxUtils.show(d,null,10,10)});this.addAction("undo",function(){f.undo()},null,"sprite-undo",Editor.ctrlKey+"+Z");this.addAction("redo",function(){f.redo()},null,"sprite-redo",mxClient.IS_WIN?Editor.ctrlKey+"+Y":Editor.ctrlKey+"+Shift+Z");this.addAction("cut",function(){var l=null;try{l=f.copyXml(), null!=l&&d.removeCells(l,!1)}catch(p){}try{null==l&&mxClipboard.cut(d)}catch(p){f.handleError(p)}},null,"sprite-cut",Editor.ctrlKey+"+X");this.addAction("copy",function(){try{f.copyXml()}catch(l){}try{mxClipboard.copy(d)}catch(l){f.handleError(l)}},null,"sprite-copy",Editor.ctrlKey+"+C");this.addAction("paste",function(){if(d.isEnabled()&&!d.isCellLocked(d.getDefaultParent())){var l=!1;try{Editor.enableNativeCipboard&&(f.readGraphModelFromClipboard(function(p){if(null!=p){d.getModel().beginUpdate(); try{f.pasteXml(p,!0)}finally{d.getModel().endUpdate()}}else mxClipboard.paste(d)}),l=!0)}catch(p){}l||mxClipboard.paste(d)}},!1,"sprite-paste",Editor.ctrlKey+"+V");this.addAction("pasteHere",function(l){function p(z){if(null!=z){for(var C=!0,F=0;F "));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C));d.setCellStyles("html",l,[p[w]])}}f.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=l?l:"0"],"cells",p))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var l=d.getView().getState(d.getSelectionCell()),p="wrap";d.stopEditing();null!=l&&"wrap"==l.style[mxConstants.STYLE_WHITE_SPACE]&&(p=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE, -p)});this.addAction("rotation",function(){var l="0",p=d.getView().getState(d.getSelectionCell());null!=p&&(l=p.style[mxConstants.STYLE_ROTATION]||l);l=new FilenameDialog(f,l,mxResources.get("apply"),function(w){null!=w&&0 "));d.cellLabelChanged(state.cell,Graph.sanitizeHtml(C));d.setCellStyles("html",l,[p[x]])}}f.fireEvent(new mxEventObject("styleChanged","keys",["html"],"values",[null!=l?l:"0"],"cells",p))}finally{d.getModel().endUpdate()}});this.addAction("wordWrap",function(){var l=d.getView().getState(d.getSelectionCell()),p="wrap";d.stopEditing();null!=l&&"wrap"==l.style[mxConstants.STYLE_WHITE_SPACE]&&(p=null);d.setCellStyles(mxConstants.STYLE_WHITE_SPACE, +p)});this.addAction("rotation",function(){var l="0",p=d.getView().getState(d.getSelectionCell());null!=p&&(l=p.style[mxConstants.STYLE_ROTATION]||l);l=new FilenameDialog(f,l,mxResources.get("apply"),function(x){null!=x&&0 mxUtils.indexOf(this.customFonts,n)&&(this.customFonts.push(n),this.editorUi.fireEvent(new mxEventObject("customFontsChanged")))}))})));this.put("formatBlock",new Menu(mxUtils.bind(this,function(f,g){function d(h,n){return f.addItem(h,null,mxUtils.bind(this,function(){null!=b.cellEditor.textarea&&(b.cellEditor.textarea.focus(),document.execCommand("formatBlock",!1,"<"+ n+">"))}),g)}d(mxResources.get("normal"),"p");d("","h1").firstChild.nextSibling.innerHTML=' '+mxResources.get("heading")+" 1
";d("","h2").firstChild.nextSibling.innerHTML=''+mxResources.get("heading")+" 2
";d("","h3").firstChild.nextSibling.innerHTML=''+mxResources.get("heading")+" 3
";d("","h4").firstChild.nextSibling.innerHTML=''+mxResources.get("heading")+" 4
";d("","h5").firstChild.nextSibling.innerHTML= ''+mxResources.get("heading")+" 5
";d("","h6").firstChild.nextSibling.innerHTML=''+mxResources.get("heading")+" 6
";d("","pre").firstChild.nextSibling.innerHTML=''+mxResources.get("formatted")+"";d("","blockquote").firstChild.nextSibling.innerHTML=''+mxResources.get("blockquote")+""})));this.put("fontSize",new Menu(mxUtils.bind(this,function(f,g){var d= -[6,8,9,10,11,12,14,18,24,36,48,72];0>mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(w,z){return w-z}));for(var h=mxUtils.bind(this,function(w){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var z=b.cellEditor.textarea.getElementsByTagName("font"),C=0;CmxUtils.indexOf(d,this.customFontSizes[r])&&(n(this.customFontSizes[r]),l++);0 mxUtils.indexOf(d,this.defaultFontSize)&&(d.push(this.defaultFontSize),d.sort(function(x,z){return x-z}));for(var h=mxUtils.bind(this,function(x){if(null!=b.cellEditor.textarea){document.execCommand("fontSize",!1,"3");for(var z=b.cellEditor.textarea.getElementsByTagName("font"),C=0;C mxUtils.indexOf(d,this.customFontSizes[r])&&(n(this.customFontSizes[r]),l++);0 "];for(var O=0;O ");for(var K=0;K
");I.push("")}I.push("");F=I.join("");J.call(G,F);F=G.cellEditor.textarea.getElementsByTagName("table");if(F.length==C.length+1)for(J=F.length-1;0<=J;J--)if(0==J||F[J]!=C[J-1]){G.selectNode(F[J].rows[0].cells[0]);break}}});var d=this.editorUi.editor.graph,h=null,n=null;null==e&&(a.div.className+=" geToolbarMenu", a.labels=!1);a=a.addItem("",null,null,e,null,null,null,!0);a.firstChild.style.fontSize=Menus.prototype.defaultFontSize+"px";e=a.getElementsByTagName("td");1d.div.clientHeight&&(d.div.style.width="40px");d.hideMenu=mxUtils.bind(this,function(){mxPopupMenu.prototype.hideMenu.apply(d, arguments);this.editorUi.resetCurrentMenu();d.destroy()});var r=mxUtils.getOffset(a);d.popup(r.x,r.y+a.offsetHeight,null,n);this.editorUi.setCurrentMenu(d,a)}h=!0;mxEvent.consume(n)}));mxEvent.addListener(a,mxClient.IS_POINTER?"pointerdown":"mousedown",mxUtils.bind(this,function(n){h=null==d||null==d.div||null==d.div.parentNode;n.preventDefault()}))}};Toolbar.prototype.destroy=function(){null!=this.gestureHandler&&(mxEvent.removeGestureListeners(document,this.gestureHandler),this.gestureHandler=null)};var OpenDialog=function(){var a=document.createElement("iframe");a.style.backgroundColor="transparent";a.allowTransparency="true";a.style.borderStyle="none";a.style.borderWidth="0px";a.style.overflow="hidden";a.style.maxWidth="100%";a.frameBorder="0";a.setAttribute("width",(Editor.useLocalStorage?640:320)+"px");a.setAttribute("height",(Editor.useLocalStorage?480:220)+"px");a.setAttribute("src",OPEN_FORM);this.container=a},ColorDialog=function(a,b,e,f,g,d){function h(K,Z,S){var X=K.toLowerCase();if(null!= g&&(""==K||"automatic"==X||X==z.toLowerCase()||X==mxResources.get("default").toLowerCase())||X==mxResources.get("automatic").toLowerCase())K="default";X==mxResources.get("none").toLowerCase()&&(K="none");if(null!=g&&"default"==K)Z?K=d:null!=S&&(K=S);else if("none"!=K&&"#"!=K.charAt(0))try{var ca=document.createElement("canvas").getContext("2d");ca.fillStyle="#"+K;ca.fillStyle!="#"+K.toLowerCase()&&(ca.fillStyle=K,K=ca.fillStyle.substring(1).toUpperCase())}catch(Q){}return K}function n(){var K=h(p.value, -!1);/(^#?[a-zA-Z0-9]*$)/.test(K)?("default"!=K&&("none"!=K&&"#"!=K.charAt(0)&&(K="#"+K),ColorDialog.addRecentColor("none"!=K?K.substring(1):K,12)),w(K),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function r(){mxClient.IS_TOUCH||(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null))}function l(){var K=D(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);K.style.marginBottom= -"8px";return K}this.editorUi=a;var p=document.createElement("input");p.style.marginBottom="10px";p.style.marginLeft="8px";mxClient.IS_IE&&(p.style.marginTop="10px",document.body.appendChild(p));var w=null!=e?e:this.createApplyFunction();null==d&&(d=Editor.isDarkMode()&&"default"==g?"#ffffff":"#000000");var z=d.substring(1).toUpperCase()+" ("+mxResources.get("automatic")+")";this.init=function(){r()};var C=new mxJSColor.color(p);C.pickerOnfocus=!1;C.showPicker();e=document.createElement("div");mxJSColor.picker.box.style.position= +!1);/(^#?[a-zA-Z0-9]*$)/.test(K)?("default"!=K&&("none"!=K&&"#"!=K.charAt(0)&&(K="#"+K),ColorDialog.addRecentColor("none"!=K?K.substring(1):K,12)),x(K),a.hideDialog()):a.handleError({message:mxResources.get("invalidInput")})}function r(){mxClient.IS_TOUCH||(p.focus(),mxClient.IS_GC||mxClient.IS_FF||5<=document.documentMode?p.select():document.execCommand("selectAll",!1,null))}function l(){var K=D(0==ColorDialog.recentColors.length?["FFFFFF"]:ColorDialog.recentColors,11,"FFFFFF",!0);K.style.marginBottom= +"8px";return K}this.editorUi=a;var p=document.createElement("input");p.style.marginBottom="10px";p.style.marginLeft="8px";mxClient.IS_IE&&(p.style.marginTop="10px",document.body.appendChild(p));var x=null!=e?e:this.createApplyFunction();null==d&&(d=Editor.isDarkMode()&&"default"==g?"#ffffff":"#000000");var z=d.substring(1).toUpperCase()+" ("+mxResources.get("automatic")+")";this.init=function(){r()};var C=new mxJSColor.color(p);C.pickerOnfocus=!1;C.showPicker();e=document.createElement("div");mxJSColor.picker.box.style.position= "relative";mxJSColor.picker.box.style.width="230px";mxJSColor.picker.box.style.height="100px";mxJSColor.picker.box.style.paddingBottom="10px";e.appendChild(mxJSColor.picker.box);var F=document.createElement("center"),D=mxUtils.bind(this,function(K,Z,S,X){Z=null!=Z?Z:12;var ca=document.createElement("table");ca.style.borderCollapse="collapse";ca.setAttribute("cellspacing","0");ca.style.marginBottom="20px";ca.style.cellSpacing="0px";ca.style.marginLeft="1px";var Q=document.createElement("tbody");ca.appendChild(Q); for(var aa=K.length/Z,da=0;da =b&&ColorDialog.recentColors.pop())};ColorDialog.resetRecentColors=function(){ColorDialog.recentColors=[]}; var AboutDialog=function(a){var b=document.createElement("div");b.setAttribute("align","center");var e=document.createElement("h3");mxUtils.write(e,mxResources.get("about")+" GraphEditor");b.appendChild(e);e=document.createElement("img");e.style.border="0px";e.setAttribute("width","176");e.setAttribute("width","151");e.setAttribute("src",IMAGE_PATH+"/logo.png");b.appendChild(e);mxUtils.br(b);mxUtils.write(b,"Powered by mxGraph "+mxClient.VERSION);mxUtils.br(b);e=document.createElement("a");e.setAttribute("href", -"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,g,d,h,n,r,l,p,w,z,C,F){l=null!=l?l:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";n=document.createElement("div"); +"http://www.jgraph.com/");e.setAttribute("target","_blank");mxUtils.write(e,"www.jgraph.com");b.appendChild(e);mxUtils.br(b);mxUtils.br(b);e=mxUtils.button(mxResources.get("close"),function(){a.hideDialog()});e.className="geBtn gePrimaryBtn";b.appendChild(e);this.container=b},TextareaDialog=function(a,b,e,f,g,d,h,n,r,l,p,x,z,C,F){l=null!=l?l:!1;h=document.createElement("div");h.style.position="absolute";h.style.top="20px";h.style.bottom="20px";h.style.left="20px";h.style.right="20px";n=document.createElement("div"); n.style.position="absolute";n.style.left="0px";n.style.right="0px";var D=n.cloneNode(!1),G=n.cloneNode(!1);n.style.top="0px";n.style.height="20px";D.style.top="20px";D.style.bottom="64px";G.style.bottom="0px";G.style.height="60px";G.style.textAlign="right";G.style.paddingTop="14px";G.style.boxSizing="border-box";mxUtils.write(n,b);h.appendChild(n);h.appendChild(D);h.appendChild(G);null!=F&&n.appendChild(F);var I=document.createElement("textarea");p&&I.setAttribute("wrap","off");I.setAttribute("spellcheck", "false");I.setAttribute("autocorrect","off");I.setAttribute("autocomplete","off");I.setAttribute("autocapitalize","off");mxUtils.write(I,e||"");I.style.resize="none";I.style.outline="none";I.style.position="absolute";I.style.boxSizing="border-box";I.style.top="0px";I.style.left="0px";I.style.height="100%";I.style.width="100%";this.textarea=I;this.init=function(){I.focus();I.scrollTop=0};D.appendChild(I);null==z||a.isOffline()||G.appendChild(a.createHelpIcon(z));if(null!=C)for(b=0;b MAX_AREA||0>=C.value?"red":"";F.style.backgroundColor=C.value*F.value>MAX_AREA||0>=F.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/ +var ExportDialog=function(a){function b(){var X=p.value,ca=X.lastIndexOf(".");p.value=0 MAX_AREA||0>=C.value?"red":"";F.style.backgroundColor=C.value*F.value>MAX_AREA||0>=F.value?"red":""}var f=a.editor.graph,g=f.getGraphBounds(),d=f.view.scale,h=Math.ceil(g.width/ d),n=Math.ceil(g.height/d);d=document.createElement("table");var r=document.createElement("tbody");d.setAttribute("cellpadding",mxClient.IS_SF?"0":"2");g=document.createElement("tr");var l=document.createElement("td");l.style.fontSize="10pt";l.style.width="100px";mxUtils.write(l,mxResources.get("filename")+":");g.appendChild(l);var p=document.createElement("input");p.setAttribute("value",a.editor.getOrCreateFilename());p.style.width="180px";l=document.createElement("td");l.appendChild(p);g.appendChild(l); -r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("format")+":");g.appendChild(l);var w=document.createElement("select");w.style.width="180px";l=document.createElement("option");l.setAttribute("value","png");mxUtils.write(l,mxResources.get("formatPng"));w.appendChild(l);l=document.createElement("option");ExportDialog.showGifOption&&(l.setAttribute("value","gif"),mxUtils.write(l,mxResources.get("formatGif")),w.appendChild(l)); -l=document.createElement("option");l.setAttribute("value","jpg");mxUtils.write(l,mxResources.get("formatJpg"));w.appendChild(l);a.printPdfExport||(l=document.createElement("option"),l.setAttribute("value","pdf"),mxUtils.write(l,mxResources.get("formatPdf")),w.appendChild(l));l=document.createElement("option");l.setAttribute("value","svg");mxUtils.write(l,mxResources.get("formatSvg"));w.appendChild(l);ExportDialog.showXmlOption&&(l=document.createElement("option"),l.setAttribute("value","xml"),mxUtils.write(l, -mxResources.get("formatXml")),w.appendChild(l));l=document.createElement("td");l.appendChild(w);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("zoom")+" (%):");g.appendChild(l);var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("value","100");z.style.width="180px";l=document.createElement("td");l.appendChild(z);g.appendChild(l);r.appendChild(g);g=document.createElement("tr"); +r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("format")+":");g.appendChild(l);var x=document.createElement("select");x.style.width="180px";l=document.createElement("option");l.setAttribute("value","png");mxUtils.write(l,mxResources.get("formatPng"));x.appendChild(l);l=document.createElement("option");ExportDialog.showGifOption&&(l.setAttribute("value","gif"),mxUtils.write(l,mxResources.get("formatGif")),x.appendChild(l)); +l=document.createElement("option");l.setAttribute("value","jpg");mxUtils.write(l,mxResources.get("formatJpg"));x.appendChild(l);a.printPdfExport||(l=document.createElement("option"),l.setAttribute("value","pdf"),mxUtils.write(l,mxResources.get("formatPdf")),x.appendChild(l));l=document.createElement("option");l.setAttribute("value","svg");mxUtils.write(l,mxResources.get("formatSvg"));x.appendChild(l);ExportDialog.showXmlOption&&(l=document.createElement("option"),l.setAttribute("value","xml"),mxUtils.write(l, +mxResources.get("formatXml")),x.appendChild(l));l=document.createElement("td");l.appendChild(x);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("zoom")+" (%):");g.appendChild(l);var z=document.createElement("input");z.setAttribute("type","number");z.setAttribute("value","100");z.style.width="180px";l=document.createElement("td");l.appendChild(z);g.appendChild(l);r.appendChild(g);g=document.createElement("tr"); l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("width")+":");g.appendChild(l);var C=document.createElement("input");C.setAttribute("value",h);C.style.width="180px";l=document.createElement("td");l.appendChild(C);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("height")+":");g.appendChild(l);var F=document.createElement("input");F.setAttribute("value",n);F.style.width= "180px";l=document.createElement("td");l.appendChild(F);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("dpi")+":");g.appendChild(l);var D=document.createElement("select");D.style.width="180px";l=document.createElement("option");l.setAttribute("value","100");mxUtils.write(l,"100dpi");D.appendChild(l);l=document.createElement("option");l.setAttribute("value","200");mxUtils.write(l,"200dpi");D.appendChild(l); l=document.createElement("option");l.setAttribute("value","300");mxUtils.write(l,"300dpi");D.appendChild(l);l=document.createElement("option");l.setAttribute("value","400");mxUtils.write(l,"400dpi");D.appendChild(l);l=document.createElement("option");l.setAttribute("value","custom");mxUtils.write(l,mxResources.get("custom"));D.appendChild(l);var G=document.createElement("input");G.style.width="180px";G.style.display="none";G.setAttribute("value","100");G.setAttribute("type","number");G.setAttribute("min", "50");G.setAttribute("step","50");var I=!1;mxEvent.addListener(D,"change",function(){"custom"==this.value?(this.style.display="none",G.style.display="",G.focus()):(G.value=this.value,I||(z.value=this.value))});mxEvent.addListener(G,"change",function(){var X=parseInt(G.value);isNaN(X)||0>=X?G.style.backgroundColor="red":(G.style.backgroundColor="",I||(z.value=X))});l=document.createElement("td");l.appendChild(D);l.appendChild(G);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td"); l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("background")+":");g.appendChild(l);var J=document.createElement("input");J.setAttribute("type","checkbox");J.checked=null==f.background||f.background==mxConstants.NONE;l=document.createElement("td");l.appendChild(J);mxUtils.write(l,mxResources.get("transparent"));g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("grid")+":");g.appendChild(l); var O=document.createElement("input");O.setAttribute("type","checkbox");O.checked=!1;l=document.createElement("td");l.appendChild(O);g.appendChild(l);r.appendChild(g);g=document.createElement("tr");l=document.createElement("td");l.style.fontSize="10pt";mxUtils.write(l,mxResources.get("borderWidth")+":");g.appendChild(l);var K=document.createElement("input");K.setAttribute("type","number");K.setAttribute("value",ExportDialog.lastBorderValue);K.style.width="180px";l=document.createElement("td");l.appendChild(K); -g.appendChild(l);r.appendChild(g);d.appendChild(r);mxEvent.addListener(w,"change",b);b();mxEvent.addListener(z,"change",function(){I=!0;var X=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*X).toFixed(2));0 =parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var X=p.value,ca=w.value,Q=Math.max(0,parseFloat(z.value)||100)/ +g.appendChild(l);r.appendChild(g);d.appendChild(r);mxEvent.addListener(x,"change",b);b();mxEvent.addListener(z,"change",function(){I=!0;var X=Math.max(0,parseFloat(z.value)||100)/100;z.value=parseFloat((100*X).toFixed(2));0 =parseInt(z.value))mxUtils.alert(mxResources.get("drawingEmpty"));else{var X=p.value,ca=x.value,Q=Math.max(0,parseFloat(z.value)||100)/ 100,aa=Math.max(0,parseInt(K.value)),da=f.background,ma=Math.max(1,parseInt(G.value));if(("svg"==ca||"png"==ca||"pdf"==ca)&&J.checked)da=null;else if(null==da||da==mxConstants.NONE)da="#ffffff";ExportDialog.lastBorderValue=aa;ExportDialog.exportFile(a,X,ca,da,Q,aa,ma,O.checked)}}));Z.className="geBtn gePrimaryBtn";var S=mxUtils.button(mxResources.get("cancel"),function(){a.hideDialog()});S.className="geBtn";a.editor.cancelFirst?(l.appendChild(S),l.appendChild(Z)):(l.appendChild(Z),l.appendChild(S)); g.appendChild(l);r.appendChild(g);d.appendChild(r);this.container=d};ExportDialog.lastBorderValue=0;ExportDialog.showGifOption=!0;ExportDialog.showXmlOption=!0; ExportDialog.exportFile=function(a,b,e,f,g,d,h,n){n=a.editor.graph;if("xml"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(a.editor.getGraphXml()),b,e);else if("svg"==e)ExportDialog.saveLocalFile(a,mxUtils.getXml(n.getSvg(f,g,d)),b,e);else{var r=n.getGraphBounds(),l=mxUtils.createXmlDocument(),p=l.createElement("output");l.appendChild(p);l=new mxXmlCanvas2D(p);l.translate(Math.floor((d/g-r.x)/n.view.scale),Math.floor((d/g-r.y)/n.view.scale));l.scale(g/n.view.scale);(new mxImageExport).drawState(n.getView().getState(n.model.root), l);p="xml="+encodeURIComponent(mxUtils.getXml(p));l=Math.ceil(r.width*g/n.view.scale+2*d);g=Math.ceil(r.height*g/n.view.scale+2*d);p.length<=MAX_REQUEST_SIZE&&l*g X.name?1:0});if(null!=F){p=document.createElement("div");p.style.width= "100%";p.style.fontSize="11px";p.style.textAlign="center";mxUtils.write(p,F);var J=l.addField(mxResources.get("id")+":",p);mxEvent.addListener(p,"dblclick",function(S){S=new FilenameDialog(a,F,mxResources.get("apply"),mxUtils.bind(this,function(X){if(null!=X&&0 S.indexOf(":"))try{var X=mxUtils.indexOf(w,S);if(0<=X&&null!=z[X])z[X].focus();else{d.cloneNode(!1).setAttribute(S,"");0<=X&&(w.splice(X,1),z.splice(X,1));w.push(S);var ca=l.addTextarea(S+":","",2);ca.style.width="100%"; +"1px";O.style.borderStyle="solid";O.style.marginLeft="2px";O.style.padding="4px";O.style.width="100%";h.appendChild(O);r.appendChild(h);f.appendChild(r);var K=mxUtils.button(mxResources.get("addProperty"),function(){var S=O.value;if(0 S.indexOf(":"))try{var X=mxUtils.indexOf(x,S);if(0<=X&&null!=z[X])z[X].focus();else{d.cloneNode(!1).setAttribute(S,"");0<=X&&(x.splice(X,1),z.splice(X,1));x.push(S);var ca=l.addTextarea(S+":","",2);ca.style.width="100%"; z.push(ca);D(ca,S);ca.focus()}K.setAttribute("disabled","disabled");O.value=""}catch(Q){mxUtils.alert(Q)}else mxUtils.alert(mxResources.get("invalidName"))});mxEvent.addListener(O,"keypress",function(S){13==S.keyCode&&K.click()});this.init=function(){0 ")});mxEvent.addListener(U,"dragend",function(R){null!=z&&null!=C&&r.addCell(la,r.model.root,C);C=z=null;R.stopPropagation();R.preventDefault()});var Y=document.createElement("img");Y.setAttribute("draggable","false");Y.setAttribute("align","top");Y.setAttribute("border","0");Y.className="geAdaptiveAsset"; @@ -3860,9 +3859,9 @@ Y.style.width="16px";Y.style.padding="0px 6px 0 4px";Y.style.marginTop="2px";Y.s "52px";Y.style.right="8px";Y.style.top="8px";T.appendChild(Y);U.appendChild(T);if(r.isEnabled()){if(mxClient.IS_TOUCH||mxClient.IS_POINTER||mxClient.IS_IE&&10>document.documentMode)ma=document.createElement("div"),ma.style.display="block",ma.style.textAlign="right",ma.style.whiteSpace="nowrap",ma.style.position="absolute",ma.style.right="16px",ma.style.top="6px",0 ";if(Ha||"undefined"===typeof mxMermaidToDrawio)la=aa=ua;ua=z.cloneNode(!0);pa.appendChild(ua);Ua=function(Ja){P=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};La=function(Ja){P||A(Sa,mxEvent.getClientX(Ja), -mxEvent.getClientY(Ja),Wa,Na)};mxEvent.addGestureListeners(Wa,Ua,null,La);mxEvent.addGestureListeners(ua,Ua,null,La)},function(ua){mxMermaidToDrawio.resetListeners();b.handleError(ua)})});Ra.setAttribute("disabled","disabled");Ra.className="geBtn gePrimaryBtn";va=function(){window.setTimeout(function(){""!=wa.value?Ra.removeAttribute("disabled"):Ra.setAttribute("disabled","disabled")},0)};sa=urlParams["smart-template"];null!=sa&&"1"!=sa&&(wa.value=decodeURIComponent(sa),va(),"1"==urlParams["smart-template-generate"]&& -window.setTimeout(function(){Ra.click()},0));mxEvent.addListener(wa,"change",va);mxEvent.addListener(wa,"keydown",va);mxEvent.addListener(wa,"cut",va);mxEvent.addListener(wa,"paste",va);mxEvent.addListener(wa,"keydown",function(Ta){13==Ta.keyCode&&Ra.click()});va=document.createElement("div");va.style.height="40px";va.style.marginTop="4px";va.style.marginBottom="4px";va.style.whiteSpace="nowrap";va.style.overflowX="auto";va.style.overflowY="hidden";va.appendChild(qa);va.appendChild(Ra);ia.appendChild(va); -ia.appendChild(pa);return ia}function L(){if(ma&&null!=d)f||b.hideDialog(),d(ma,ka,K.value);else if(c)f||b.hideDialog(),c(aa,K.value,ba,ca);else{var ia=K.value;null!=ia&&0 =Qa.getStatus()&&(Ua=Qa.getText());Va(Ua,La)}))):Va(Ua,La)}function Na(Ka,Va){if(null== +e.appendChild(D);b.editor.cancelFirst||e.appendChild(E);this.container=e},NewDialog=function(b,e,f,c,k,p,q,u,E,D,B,M,J,d,g,m,t,v){function y(ia){null!=ia&&(xa=sa=ia?135:140);ia=!0;if(null!=Da)for(;Q ";if(Ha||"undefined"===typeof mxMermaidToDrawio)na=aa=ua;ua=z.cloneNode(!0);pa.appendChild(ua);Ua=function(Ja){P=null!=b.sidebar.tooltip&&"none"!=b.sidebar.tooltip.style.display};La=function(Ja){P||A(Sa,mxEvent.getClientX(Ja), +mxEvent.getClientY(Ja),Wa,Na)};mxEvent.addGestureListeners(Wa,Ua,null,La);mxEvent.addGestureListeners(ua,Ua,null,La)},function(ua){mxMermaidToDrawio.resetListeners();b.handleError(ua)})});Ra.setAttribute("disabled","disabled");Ra.className="geBtn gePrimaryBtn";va=function(){window.setTimeout(function(){""!=ya.value?Ra.removeAttribute("disabled"):Ra.setAttribute("disabled","disabled")},0)};ta=urlParams["smart-template"];null!=ta&&"1"!=ta&&(ya.value=decodeURIComponent(ta),va(),"1"==urlParams["smart-template-generate"]&& +window.setTimeout(function(){Ra.click()},0));mxEvent.addListener(ya,"change",va);mxEvent.addListener(ya,"keydown",va);mxEvent.addListener(ya,"cut",va);mxEvent.addListener(ya,"paste",va);mxEvent.addListener(ya,"keydown",function(Ta){13==Ta.keyCode&&Ra.click()});va=document.createElement("div");va.style.height="40px";va.style.marginTop="4px";va.style.marginBottom="4px";va.style.whiteSpace="nowrap";va.style.overflowX="auto";va.style.overflowY="hidden";va.appendChild(qa);va.appendChild(Ra);ia.appendChild(va); +ia.appendChild(pa);return ia}function L(){if(la&&null!=d)f||b.hideDialog(),d(la,ka,K.value);else if(c)f||b.hideDialog(),c(aa,K.value,ba,ca);else{var ia=K.value;null!=ia&&0 =Qa.getStatus()&&(Ua=Qa.getText());Va(Ua,La)}))):Va(Ua,La)}function Na(Ka,Va){if(null== ia||F||b.sidebar.currentElt==ua)b.sidebar.hideTooltip();else if(b.sidebar.hideTooltip(),null!=N){var Qa=" ";A(Qa,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka),pa,ia)}else b.sidebar.currentElt= -ua,F=!0,Ha(ia,function(Za){if(F&&b.sidebar.currentElt==ua)try{A(Za,mxEvent.getClientX(Ka),mxEvent.getClientY(Ka),ua,Va)}catch($a){b.sidebar.currentElt=null,b.handleError($a)}F=!1})}var ua=document.createElement("div");ua.className="geTemplate geAdaptiveAsset";ua.style.position="relative";ua.style.height=ta+"px";ua.style.width=xa+"px";ua.style.border="1px solid transparent";var Ua=null,La=ia;null!=pa?ua.setAttribute("title",mxResources.get(pa,null,pa)):null!=va&&0 "+Graph.compress(' ')+" = -ja.scrollHeight&&(y(),mxEvent.consume(Na))}));if(0 = +ja.scrollHeight&&(y(),mxEvent.consume(Na))}));if(0 (window.innerWidth||document.documentElement.clientWidth||document.body.clientWidth);f=null!=f?f:!0;k=null!=k?k:!1;q=null!=q?q:Editor.isDarkMode()?Editor.darkColor:"#ebf2f9";u=null!=u?u:Editor.isDarkMode()?"#fff":"#e6eff8";E=null!=E?E:Editor.isDarkMode()?"1px dashed #00a8ff":"1px solid #ccd9ea";B=null!=B?B:EditorUi.templateFile;var x=document.createElement("div");x.style.userSelect="none";x.style.height="100%";var I=document.createElement("div");I.style.whiteSpace="nowrap";I.style.height= "46px";f&&x.appendChild(I);var C=document.createElement("img");C.setAttribute("border","0");C.setAttribute("align","absmiddle");C.style.width="40px";C.style.height="40px";C.style.marginRight="10px";C.style.paddingBottom="4px";C.src=b.mode==App.MODE_GOOGLE?IMAGE_PATH+"/google-drive-logo.svg":b.mode==App.MODE_DROPBOX?IMAGE_PATH+"/dropbox-logo.svg":b.mode==App.MODE_ONEDRIVE?IMAGE_PATH+"/onedrive-logo.svg":b.mode==App.MODE_GITHUB?IMAGE_PATH+"/github-logo.svg":b.mode==App.MODE_GITLAB?IMAGE_PATH+"/gitlab-logo.svg": b.mode==App.MODE_TRELLO?IMAGE_PATH+"/trello-logo.svg":b.mode==App.MODE_BROWSER?IMAGE_PATH+"/osa_database.png":IMAGE_PATH+"/osa_drive-harddisk.png";e||n||!f||I.appendChild(C);f&&mxUtils.write(I,(n?mxResources.get("name"):null==b.mode||b.mode==App.MODE_GOOGLE||b.mode==App.MODE_BROWSER?mxResources.get("diagramName"):mxResources.get("filename"))+":");C=".drawio";b.mode==App.MODE_GOOGLE&&null!=b.drive?C=b.drive.extension:b.mode==App.MODE_DROPBOX&&null!=b.dropbox?C=b.dropbox.extension:b.mode==App.MODE_ONEDRIVE&& null!=b.oneDrive?C=b.oneDrive.extension:b.mode==App.MODE_GITHUB&&null!=b.gitHub?C=b.gitHub.extension:b.mode==App.MODE_GITLAB&&null!=b.gitLab?C=b.gitLab.extension:b.mode==App.MODE_TRELLO&&null!=b.trello&&(C=b.trello.extension);var K=document.createElement("input");K.setAttribute("value",b.defaultFilename+C);K.style.marginLeft="10px";K.style.width=e||n?"144px":"244px";this.init=function(){f&&Editor.selectFilename(K);null!=ja.parentNode&&null!=ja.parentNode.parentNode&&mxEvent.addGestureListeners(ja.parentNode.parentNode, mxUtils.bind(this,function(ia){b.sidebar.hideTooltip()}),null,null)};f&&(I.appendChild(K),v?K.style.width=e||n?"350px":"450px":null!=b.editor.diagramFileTypes&&(v=FilenameDialog.createFileTypes(b,K,b.editor.diagramFileTypes),v.style.marginLeft="6px",v.style.width=e||n?"80px":"180px",I.appendChild(v)));n=!1;var Q=0,O=new Spinner({lines:12,length:10,width:5,radius:10,rotate:0,color:"#000",speed:1.5,trail:60,shadow:!1,hwaccel:!1,top:"40%",zIndex:2E9}),l=mxUtils.button(m||mxResources.get("create"),function(){l.setAttribute("disabled", "disabled");L();l.removeAttribute("disabled")});l.className="geBtn gePrimaryBtn";var z=document.createElement("img");z.setAttribute("src",Editor.magnifyImage);z.setAttribute("title",mxResources.get("preview"));z.className="geAdaptiveAsset geActiveButton";z.style.position="absolute";z.style.cursor="default";z.style.padding="6px";z.style.opacity="0.5";z.style.height="16px";z.style.right="0px";z.style.top="0px";var F=!1,N=null,P=!1;if(M||J){var T=[],S=null,V=null,W=null,X=function(ia){l.setAttribute("disabled", -"disabled");for(var wa=0;wa mxUtils.indexOf(c,I))if(O=null!=O?O:b.getTitleForService(I),0<=mxUtils.indexOf(H,I)||null!=b.getServiceForName(I)){z=document.createElement("option");if("pick"==l)z.innerHTML=mxUtils.htmlEntities(O)+" – "+mxUtils.htmlEntities(mxResources.get("pickFolder"))+"...",z.setAttribute("value","pickFolder-"+I),z.setAttribute("title",O+" - "+mxResources.get("pickFolder")+"...");else{var F=I+(null!= K?"-"+K:""),N=n[F];null!=N&&null!=N.option&&N.option.parentNode.removeChild(N.option);N=null;if(null!=C){"/"==C.charAt(C.length-1)&&(C=C.substring(0,C.length-1));"/"==C.charAt(0)&&(C=C.substring(1));N=C;if(I!=App.MODE_GITHUB&&I==App.MODE_GITLAB){var P=N.lastIndexOf("/");0<=P&&(N=N.substring(P+1))}40 =ca.getStatus()){var ha=JSON.parse(ca.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",P,"response:",ha);var aa=mxUtils.trim(ha.choices[0].message.content);if("create"==t.value){var ea=b.extractMermaidDeclaration(aa);null!=ea?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ka){Y(ka)})),b.generateMermaidImage(ea,null,function(){}, -function(ka){mxMermaidToDrawio.resetListeners();Z(ka)})):(Y(aa),Q.appendChild(q(mxResources.get("tryAgain"),S)))}else Y(aa)}else{var ma="Error: "+ca.getStatus();try{var ba=JSON.parse(ca.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(ma=ba.error.message)}catch(ka){}Q.innerHTML="";mxUtils.write(Q,ma);Q.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ka){Z(ka)}}),Z)}),function(W){Q.innerHTML="";mxUtils.write(Q,W.message);Q.appendChild(q(mxResources.get("tryAgain"), +function(ca){var ha=E(ca),aa=null!=ha?b.stringToCells(ha[1]):null;if(null!=aa&&0 =ca.getStatus()){var ha=JSON.parse(ca.getText());EditorUi.debug("EditorUi.ChatWindow.addMessage","prompt:",P,"response:",ha);var aa=mxUtils.trim(ha.choices[0].message.content);if("create"==t.value){var fa=b.extractMermaidDeclaration(aa);null!=fa?(mxMermaidToDrawio.addListener(mxUtils.bind(this,function(ka){Y(ka)})),b.generateMermaidImage(fa,null,function(){}, +function(ka){mxMermaidToDrawio.resetListeners();Z(ka)})):(Y(aa),Q.appendChild(q(mxResources.get("tryAgain"),S)))}else Y(aa)}else{var la="Error: "+ca.getStatus();try{var ba=JSON.parse(ca.getText());null!=ba&&null!=ba.error&&null!=ba.error.message&&(la=ba.error.message)}catch(ka){}Q.innerHTML="";mxUtils.write(Q,la);Q.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})}}catch(ka){Z(ka)}}),Z)}),function(W){Q.innerHTML="";mxUtils.write(Q,W.message);Q.appendChild(q(mxResources.get("tryAgain"), S));Q.scrollIntoView({behavior:"smooth",block:"end",inline:"nearest"})})});S()}function B(){""!=mxUtils.trim(R.value)&&(D(R.value),R.value="")}var M=b.editor.graph,J=document.createElement("div");J.style.textAlign="center";J.style.overflow="hidden";J.style.height="100%";var d=document.createElement("div");d.style.position="absolute";d.style.overflow="auto";d.style.top="0px";d.style.left="0px";d.style.right="0px";d.style.bottom="104px";J.appendChild(d);var g=document.createElement("div");g.style.position= "absolute";g.style.boxSizing="border-box";g.style.borderRadius="4px";g.style.border="1px solid lightgray";g.style.margin="8px 8px 16px 8px";g.style.padding="8px";g.style.left="0px";g.style.right="0px";g.style.bottom="0px";g.style.padding="6px";g.style.height="80px";var m=document.createElement("div");m.style.display="flex";m.style.gap="6px";m.style.marginBottom="6px";var t=document.createElement("select");t.style.textOverflow="ellipsis";t.style.flexGrow="1";t.style.padding="4px";t.style.minWidth= "0";g.appendChild(m);var v=document.createElement("option");v.setAttribute("value","includeCopyOfMyDiagram");mxUtils.write(v,mxResources.get("includeCopyOfMyDiagram"));t.appendChild(v);var y=document.createElement("option");y.setAttribute("value","selectionOnly");mxUtils.write(y,mxResources.get("selectionOnly"));t.appendChild(y);m.appendChild(t);if("undefined"!==typeof mxMermaidToDrawio){var A=document.createElement("option");A.setAttribute("value","create");mxUtils.write(A,mxResources.get("create")); @@ -11601,10 +11600,10 @@ f.setCellStyles(mxConstants.STYLE_ROTATION,Number(v.value),[e[A]])}}finally{f.ge R.clientY);null!=R&&R.parentNode!=g;)R=R.parentNode;var n=null;if(null!=R){var x=g.firstChild;for(n=0;null!=x&&x!=R;)x=x.nextSibling,n++}return n}function E(R,n,x,I,C,K,Q,O,l){try{if(b.spinner.stop(),null==n||"image/"==n.substring(0,6))if(null==R&&null!=Q||null==t[R]){var z=function(){X.innerText="";X.style.cursor="pointer";X.style.whiteSpace="nowrap";X.style.textOverflow="ellipsis";mxUtils.write(X,null!=Z.title&&0 b.maxImageSize||K>b.maxImageSize){var P=Math.min(1,Math.min(b.maxImageSize/Math.max(1,C)),b.maxImageSize/Math.max(1,K));C*=P;K*=P}F>N?(N=Math.round(100*N/F),F=100):(F=Math.round(100*F/N),N=100);var T=document.createElement("div");T.setAttribute("draggable","true");T.style.display="inline-block";T.style.position="relative";T.style.padding="0 12px";T.style.cursor="move";mxUtils.setPrefixedStyle(T.style,"transition", "transform .1s ease-in-out");if(null!=R){var S=document.createElement("img");S.setAttribute("src",G.convert(R));S.style.width=F+"px";S.style.height=N+"px";S.style.margin="10px";S.style.paddingBottom=Math.floor((100-N)/2)+"px";S.style.paddingLeft=Math.floor((100-F)/2)+"px";T.appendChild(S)}else if(null!=Q){var V=b.stringToCells("<"==Q.xml.charAt(0)?Q.xml:Graph.decompress(Q.xml));0 X.getStatus()||299 >2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P& +S[Y];null==ca?this.convertImageToDataUri(Y,function(ha){null!=ha&&(S[Y]=ha,Z.setAttribute(W,ha));P()},null,Editor.svgRasterScale):(Z.setAttribute(W,ca),P())}else null!=Y&&Z.setAttribute(W,Y),P()}}catch(ha){P()}}))})(V[X])});F("image","xlink:href");F("img","src");P()};Editor.base64Encode=function(l){for(var z="",F=0,N=l.length,P,T,S;F >2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P& 3)<<4);z+="==";break}T=l.charCodeAt(F++);if(F==N){z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P&3)<<4|(T&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2);z+="=";break}S=l.charCodeAt(F++);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(P>>2);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((P& 3)<<4|(T&240)>>4);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt((T&15)<<2|(S&192)>>6);z+="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charAt(S&63)}return z};Editor.prototype.loadUrl=function(l,z,F,N,P,T,S,V){try{var W=!S&&(N||/(\.png)($|\?)/i.test(l)||/(\.jpe?g)($|\?)/i.test(l)||/(\.gif)($|\?)/i.test(l)||/(\.pdf)($|\?)/i.test(l));P=null!=P?P:!0;var X=mxUtils.bind(this,function(){mxUtils.get(l,mxUtils.bind(this,function(Z){if(200<=Z.getStatus()&& 299>=Z.getStatus()){if(null!=z){var Y=Z.getText();if(W){if((9==document.documentMode||10==document.documentMode)&&"undefined"!==typeof window.mxUtilsBinaryToArray){Z=mxUtilsBinaryToArray(Z.request.responseBody).toArray();Y=Array(Z.length);for(var ca=0;ca N.indexOf("mxPageSelector")&&0 k;k++)for(var p=k,q=0;8>q;q++)p=1==(p&1)? +(N=N.cloneNode(!1),mxUtils.setTextContent(N,z.join("\n")),F.appendChild(N))}};Editor.prototype.isExportToCanvas=function(){return mxClient.IS_CHROMEAPP||this.useCanvasForExport};Editor.prototype.getMaxCanvasScale=function(l,z,F){var N=mxClient.IS_FF?8192:16384;return Math.min(F,Math.min(N/l,N/z))};Editor.prototype.exportToCanvas=function(l,z,F,N,P,T,S,V,W,X,Z,Y,ca,ha,aa,fa,la,ba){try{T=null!=T?T:!0;S=null!=S?S:!0;Y=null!=Y?Y:this.graph;ca=null!=ca?ca:0;var ka=W?null:Y.background;ka==mxConstants.NONE&& +(ka=null);null==ka&&(ka=N);null==ka&&0==W&&(ka="dark"==fa?Editor.darkColor:"#ffffff");this.convertImages(Y.getSvg(null,null,ca,ha,null,S,null,null,null,X,null,fa,la,ba),mxUtils.bind(this,function(na){try{var ja=new Image;ja.onload=mxUtils.bind(this,function(){try{var ea=function(){mxClient.IS_SF?window.setTimeout(function(){sa.drawImage(ja,0,0);l(wa,na)},0):(sa.drawImage(ja,0,0),l(wa,na))},wa=document.createElement("canvas"),oa=parseInt(na.getAttribute("width")),xa=parseInt(na.getAttribute("height")); +V=null!=V?V:1;null!=z&&(V=T?Math.min(1,Math.min(3*z/(4*xa),z/oa)):z/oa);V=this.getMaxCanvasScale(oa,xa,V);oa=Math.ceil(V*oa);xa=Math.ceil(V*xa);wa.setAttribute("width",oa);wa.setAttribute("height",xa);var sa=wa.getContext("2d");null!=ka&&(sa.beginPath(),sa.rect(0,0,oa,xa),sa.fillStyle=ka,sa.fill());1!=V&&sa.scale(V,V);if(aa){var da=Y.view,ma=da.scale;da.scale=1;var Aa=btoa(unescape(encodeURIComponent(da.createSvgGrid(da.gridColor))));da.scale=ma;Aa="data:image/svg+xml;base64,"+Aa;var za=Y.gridSize* +da.gridSteps*V,Ia=Y.getGraphBounds(),Ba=da.translate.x*ma,Ga=da.translate.y*ma,Da=Ba+(Ia.x-Ba)/ma-ca,Pa=Ga+(Ia.y-Ga)/ma-ca,Oa=new Image;Oa.onload=function(){try{for(var Ea=-Math.round(za-mxUtils.mod((Ba-Da)*V,za)),ia=-Math.round(za-mxUtils.mod((Ga-Pa)*V,za));Ea k;k++)for(var p=k,q=0;8>q;q++)p=1==(p&1)? 3988292384^p>>>1:p>>>1,Editor.crcTable[k]=p;Editor.updateCRC=function(l,z,F,N){for(var P=0;P >>8;return l};Editor.crc32=function(l){for(var z=-1,F=0;F >>8^Editor.crcTable[(z^l.charCodeAt(F))&255];return(z^-1)>>>0};Editor.writeGraphModelToPng=function(l,z,F,N,P){function T(Z,Y){var ca=W;W+=Y;return Z.substring(ca,W)}function S(Z){Z=T(Z,4);return Z.charCodeAt(3)+(Z.charCodeAt(2)<<8)+(Z.charCodeAt(1)<<16)+(Z.charCodeAt(0)<<24)}function V(Z){return String.fromCharCode(Z>> 24&255,Z>>16&255,Z>>8&255,Z&255)}l=l.substring(l.indexOf(",")+1);l=window.atob?atob(l):Base64.decode(l,!0);var W=0;if(T(l,8)!=String.fromCharCode(137)+"PNG"+String.fromCharCode(13,10,26,10))null!=P&&P();else if(T(l,4),"IHDR"!=T(l,4))null!=P&&P();else{T(l,17);P=l.substring(0,W);do{var X=S(l);if("IDAT"==T(l,4)){P=l.substring(0,W-8);"pHYs"==z&&"dpi"==F?(F=Math.round(N/.0254),F=V(F)+V(F)+String.fromCharCode(1)):F=F+String.fromCharCode(0)+("zTXt"==z?String.fromCharCode(0):"")+N;N=4294967295;N=Editor.updateCRC(N, z,0,4);N=Editor.updateCRC(N,F,0,F.length);P+=V(F.length)+z+F+V(N^4294967295);P+=l.substring(W-8,l.length);break}P+=l.substring(W-8,W-4+X);T(l,X);T(l,4)}while(X);return"data:image/png;base64,"+(window.btoa?btoa(P):Base64.encode(P,!0))}};if(window.ColorDialog){FilenameDialog.filenameHelpLink="https://www.drawio.com/doc/faq/save-file-formats";var u=ColorDialog.addRecentColor;ColorDialog.addRecentColor=function(l,z){u.apply(this,arguments);mxSettings.setRecentColors(ColorDialog.recentColors);mxSettings.save()}; @@ -11865,33 +11864,34 @@ stroke:"#23445d"}],[{fill:"",stroke:""},{fill:"#f5f5f5",stroke:"#666666",gradien null!=P&&null!=P.shape&&(P.shape.commonCustomPropAdded||(P.shape.commonCustomPropAdded=!0,P.shape.customProperties=P.shape.customProperties||[],P.cell.vertex?Array.prototype.push.apply(P.shape.customProperties,Editor.commonVertexProperties):Array.prototype.push.apply(P.shape.customProperties,Editor.commonEdgeProperties)),N(P.shape.customProperties));l=l.getAttribute("customProperties");if(null!=l)try{N(JSON.parse(l))}catch(T){}}};var J=StyleFormatPanel.prototype.init;StyleFormatPanel.prototype.init= function(){var l=this.editorUi.getSelectionState();null!=this.defaultColorSchemes&&0 na.size&&(Ba=Ba.slice(0,na.size));da=Ba.join(",");null!=na.countProperty&&(ca.setCellStyles(na.countProperty,Ba.length, -ca.getSelectionCells()),za.push(na.countProperty),Ia.push(Ba.length))}ca.setCellStyles(xa,da,ca.getSelectionCells());za.push(xa);Ia.push(da);if(null!=na.dependentProps)for(xa=0;xa da)Pa=Pa.slice(0,da);else for(var Oa=Pa.length;Oa na.max&&(ia=na.max);var wa=null;try{wa="numbers"==Ba?ia.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==Ba?parseInt(ia):ia)+"")}catch(pa){}P(xa,wa,na,null,Ea)}var Ea=document.createElement("input");T(Da,Ea,!0);Ea.value=decodeURIComponent(da);Ea.className="gePropEditor";"int"!=Ba&&"float"!=Ba||na.allowAuto||(Ea.type="number",Ea.step="int"==Ba?"1":"any",null!=na.min&&(Ea.min=parseFloat(na.min)),null!=na.max&&(Ea.max=parseFloat(na.max)));l.appendChild(Ea); -mxEvent.addListener(Ea,"keypress",function(ia){13==ia.keyCode&&Oa()});Ea.focus();mxEvent.addListener(Ea,"blur",function(){Oa()})})));na.isDeletable&&(za=mxUtils.button("-",mxUtils.bind(Y,function(Oa){P(xa,"",na,na.index);mxEvent.consume(Oa)})),za.style.height="16px",za.style.width="25px",za.style.float="right",za.className="geColorBtn",Da.appendChild(za));Ga.appendChild(Da);return Ga}var Y=this,ca=this.editorUi.editor.graph,ha=[];l.style.position="relative";l.style.padding="0";var aa=document.createElement("table"); -aa.className="geProperties";aa.style.whiteSpace="nowrap";aa.style.width="100%";var ea=document.createElement("tr");ea.className="gePropHeader";var ma=document.createElement("th");ma.className="gePropHeaderCell";var ba=document.createElement("img");ba.src=Sidebar.prototype.expandedImage;ba.style.verticalAlign="middle";ma.appendChild(ba);mxUtils.write(ma,mxResources.get("property"));ea.style.cursor="pointer";var ka=function(){var xa=aa.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ba.src= -Sidebar.prototype.collapsedImage;var da="none";for(var na=l.childNodes.length-1;0<=na;na--)try{var Aa=l.childNodes[na],za=Aa.nodeName.toUpperCase();"INPUT"!=za&&"SELECT"!=za||l.removeChild(Aa)}catch(Ia){}}else ba.src=Sidebar.prototype.expandedImage,da="";for(na=0;na =this.defaultColorSchemes.length?"24px":"30px";ka.style.margin="0px 6px 6px 0px";if(null!=ba){var la=Editor.isDarkMode()?"2px solid":"1px solid";null!=ba.border&&(la=ba.border);null!=ba.gradient?mxClient.IS_IE&&10>document.documentMode?ka.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ba.fill+"', EndColorStr='"+ba.gradient+"', GradientType=0)":ka.style.backgroundImage="linear-gradient("+ba.fill+" 0px,"+ba.gradient+ -" 100%)":ba.fill==mxConstants.NONE?ka.style.background="url('"+Dialog.prototype.noColorImage+"')":ka.style.backgroundColor=""==ba.fill?mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff"):ba.fill||mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");ka.style.border=ba.stroke==mxConstants.NONE?la+" transparent":""==ba.stroke?la+" "+mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR, -Editor.isDarkMode()?"#ffffff":Editor.darkColor):la+" "+(ba.stroke||mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=ba.title&&ka.setAttribute("title",ba.title)}else{la=mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ja=mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");ka.style.backgroundColor=la;ka.style.border="1px solid "+ja}ka.style.borderRadius="0";P.appendChild(ka)}); -P.innerText="";for(var ma=0;ma =this.defaultColorSchemes.length?28:8;var ca=document.createElement("div");ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+W+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; +z,F,N){function P(sa,da,ma,Aa,za){if(null!=ma.valueChanged)ma.valueChanged(da,za);else{ca.getModel().beginUpdate();try{za=[];var Ia=[];if(null!=ma.index){for(var Ba=[],Ga=ma.parentRow.nextSibling;Ga&&Ga.getAttribute("data-pName")==sa;)Ba.push(Ga.getAttribute("data-pValue")),Ga=Ga.nextSibling;ma.index ma.size&&(Ba=Ba.slice(0,ma.size));da=Ba.join(",");null!=ma.countProperty&&(ca.setCellStyles(ma.countProperty,Ba.length, +ca.getSelectionCells()),za.push(ma.countProperty),Ia.push(Ba.length))}ca.setCellStyles(sa,da,ca.getSelectionCells());za.push(sa);Ia.push(da);if(null!=ma.dependentProps)for(sa=0;sa da)Pa=Pa.slice(0,da);else for(var Oa=Pa.length;Oa ma.max&&(ia=ma.max);var ya=null;try{ya="numbers"==Ba?ia.match(/\d+/g).map(Number).join(" "):encodeURIComponent(("int"==Ba?parseInt(ia):ia)+"")}catch(pa){}P(sa,ya,ma,null,Ea)}var Ea=document.createElement("input"); +T(Da,Ea,!0);Ea.value=decodeURIComponent(da);Ea.className="gePropEditor";"int"!=Ba&&"float"!=Ba||ma.allowAuto||(Ea.type="number",Ea.step="int"==Ba?"1":"any",null!=ma.min&&(Ea.min=parseFloat(ma.min)),null!=ma.max&&(Ea.max=parseFloat(ma.max)));l.appendChild(Ea);mxEvent.addListener(Ea,"keypress",function(ia){13==ia.keyCode&&Oa()});Ea.focus();mxEvent.addListener(Ea,"blur",function(){Oa()})})));ma.isDeletable&&(za=mxUtils.button("-",mxUtils.bind(Y,function(Oa){P(sa,"",ma,ma.index);mxEvent.consume(Oa)})), +za.style.height="16px",za.style.width="25px",za.style.float="right",za.className="geColorBtn",Da.appendChild(za));Ga.appendChild(Da);return Ga}var Y=this,ca=this.editorUi.editor.graph,ha=[];l.style.position="relative";l.style.padding="0";var aa=document.createElement("table");aa.className="geProperties";aa.style.whiteSpace="nowrap";aa.style.width="100%";var fa=document.createElement("tr");fa.className="gePropHeader";var la=document.createElement("th");la.className="gePropHeaderCell";var ba=document.createElement("img"); +ba.src=Sidebar.prototype.expandedImage;ba.style.verticalAlign="middle";la.appendChild(ba);mxUtils.write(la,mxResources.get("property"));fa.style.cursor="pointer";var ka=function(){var sa=aa.querySelectorAll(".gePropNonHeaderRow");if(Y.editorUi.propertiesCollapsed){ba.src=Sidebar.prototype.collapsedImage;var da="none";for(var ma=l.childNodes.length-1;0<=ma;ma--)try{var Aa=l.childNodes[ma],za=Aa.nodeName.toUpperCase();"INPUT"!=za&&"SELECT"!=za||l.removeChild(Aa)}catch(Ia){}}else ba.src=Sidebar.prototype.expandedImage, +da="";for(ma=0;ma =this.defaultColorSchemes.length?"24px":"30px";ka.style.margin="0px 6px 6px 0px";if(null!=ba){var na=Editor.isDarkMode()?"2px solid":"1px solid";null!=ba.border&& +(na=ba.border);null!=ba.gradient?mxClient.IS_IE&&10>document.documentMode?ka.style.filter="progid:DXImageTransform.Microsoft.Gradient(StartColorStr='"+ba.fill+"', EndColorStr='"+ba.gradient+"', GradientType=0)":ka.style.backgroundImage="linear-gradient("+ba.fill+" 0px,"+ba.gradient+" 100%)":ba.fill==mxConstants.NONE?ka.style.background="url('"+Dialog.prototype.noColorImage+"')":ka.style.backgroundColor=""==ba.fill?mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()? +Editor.darkColor:"#ffffff"):ba.fill||mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,Editor.isDarkMode()?Editor.darkColor:"#ffffff");ka.style.border=ba.stroke==mxConstants.NONE?na+" transparent":""==ba.stroke?na+" "+mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor):na+" "+(ba.stroke||mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,Editor.isDarkMode()?"#ffffff":Editor.darkColor));null!=ba.title&& +ka.setAttribute("title",ba.title)}else{na=mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_FILLCOLOR,"#ffffff");var ja=mxUtils.getValue(N.defaultVertexStyle,mxConstants.STYLE_STROKECOLOR,"#000000");ka.style.backgroundColor=na;ka.style.border="1px solid "+ja}ka.style.borderRadius="0";P.appendChild(ka)});P.innerText="";for(var la=0;la =this.defaultColorSchemes.length?28:8;var ca=document.createElement("div");ca.style.cssText="position:absolute;left:10px;top:8px;bottom:"+W+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ4eHh3d3d1dXVxcXF2dnZ2dnZ2dnZxcXF2dnYmb3w1AAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADRJREFUCNdjwACMAmBKaiGYs2oJmLPKAZ3DabU8AMRTXpUKopislqFyVzCAuUZgikkBZjoAcMYLnp53P/UAAAAASUVORK5CYII=);"; mxEvent.addListener(ca,"click",mxUtils.bind(this,function(){Z(mxUtils.mod(this.format.currentScheme-1,this.defaultColorSchemes.length))}));var ha=document.createElement("div");ha.style.cssText="position:absolute;left:202px;top:8px;bottom:"+W+"px;width:20px;margin:4px;opacity:0.5;background-repeat:no-repeat;background-position:center center;background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAQBAMAAADQT4M0AAAAIVBMVEUAAAB2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnYBuwCcAAAACnRSTlMAfCTkhhvb7cQSPH2JPgAAADZJREFUCNdjQAOMAmBKaiGY8loF5rKswsZlrVo8AUiFrTICcbIWK8A5DF1gDoMymMPApIAwHwCS0Qx/U7qCBQAAAABJRU5ErkJggg==);"; 1 =this.defaultColorSchemes.length&&l.appendChild(S)}return l}}Graph.fontMapping={"https://fonts.googleapis.com/css?family=Architects+Daughter":'@font-face { font-family: "Architects Daughter"; src: url('+STYLE_PATH+'/fonts/ArchitectsDaughter-Regular.ttf) format("truetype"); }'}; Graph.customFontElements={};Graph.isGoogleFontUrl=function(l){return l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS||l.substring(0,Editor.GOOGLE_FONTS_CSS2.length)==Editor.GOOGLE_FONTS_CSS2};Graph.isCssFontUrl=function(l){return Graph.isGoogleFontUrl(l)};Graph.rewriteGoogleFontUrl=function(l){null!=l&&l.substring(0,Editor.GOOGLE_FONTS.length)==Editor.GOOGLE_FONTS&&(l=Editor.GOOGLE_FONTS_CSS2+l.substring(Editor.GOOGLE_FONTS.length)+":wght@400;500");return l};Graph.createFontElement= @@ -11902,26 +11902,26 @@ null);if(null!=z){var F=mxUtils.getValue(l,mxConstants.STYLE_FONTFAMILY,null);nu "1.7";Graph.prototype.svgShadowSize="3";Graph.prototype.hiddenTags=[];Graph.prototype.defaultMathEnabled=!1;var g=Graph.prototype.init;Graph.prototype.init=function(){function l(P){z=P}g.apply(this,arguments);this.hiddenTags=[];window.mxFreehand&&(this.freehand=new mxFreehand(this));var z=null;mxEvent.addListener(this.container,"mouseenter",l);mxEvent.addListener(this.container,"mousemove",l);mxEvent.addListener(this.container,"mouseleave",function(P){z=null});this.isMouseInsertPoint=function(){return null!= z};var F=this.getInsertPoint;this.getInsertPoint=function(){return null!=z?this.getPointForEvent(z):F.apply(this,arguments)};var N=this.layoutManager.getLayout;this.layoutManager.getLayout=function(P){var T=this.graph.getCellStyle(P);if(null!=T&&"rack"==T.childLayout){var S=new mxStackLayout(this.graph,!1);S.gridSize=null!=T.rackUnitSize?parseFloat(T.rackUnitSize):"undefined"!==typeof mxRackContainer?mxRackContainer.unitSize:20;S.marginLeft=T.marginLeft||0;S.marginRight=T.marginRight||0;S.marginTop= T.marginTop||0;S.marginBottom=T.marginBottom||0;S.allowGaps=T.allowGaps||0;S.horizontal="1"==mxUtils.getValue(T,"horizontalRack","0");S.resizeParent=!1;S.fill=!0;return S}return N.apply(this,arguments)};this.updateGlobalUrlVariables()};var m=Graph.prototype.postProcessCellStyle;Graph.prototype.postProcessCellStyle=function(l,z){return Graph.processFontStyle(m.apply(this,arguments))};var t=mxSvgCanvas2D.prototype.updateTextNodes;mxSvgCanvas2D.prototype.updateTextNodes=function(l,z,F,N,P,T,S,V,W,X, -Z,Y){t.apply(this,arguments);Graph.processFontAttributes(Y)};var v=mxText.prototype.redraw;mxText.prototype.redraw=function(){v.apply(this,arguments);null!=this.node&&"DIV"==this.node.nodeName&&Graph.processFontAttributes(this.node)};Graph.prototype.createTagsDialog=function(l,z,F,N){function P(){for(var ea=V.getSelectionCells(),ma=[],ba=0;ba mxUtils.indexOf(V.hiddenTags,ja),ya=document.createElement("tr"), -oa=document.createElement("td");oa.style.align="center";oa.style.width="16px";var ta=document.createElement("img");ta.setAttribute("src",fa?Editor.visibleImage:Editor.hiddenImage);ta.setAttribute("title",mxResources.get(fa?"hideIt":"show",[ja]));mxUtils.setOpacity(ta,fa?75:25);ta.className="geAdaptiveAsset";ta.style.verticalAlign="middle";ta.style.cursor="pointer";ta.style.width="16px";if(z||Editor.isDarkMode())ta.style.filter="invert(100%)";oa.appendChild(ta);mxEvent.addListener(ta,"click",function(da){mxEvent.isShiftDown(da)? -T(0<=mxUtils.indexOf(V.hiddenTags,ja)):(V.toggleHiddenTag(ja),P(),V.refresh());mxEvent.consume(da)});ya.appendChild(oa);oa=document.createElement("td");oa.style.align="center";oa.style.width="16px";ta=document.createElement("img");ta.setAttribute("src",Editor.selectImage);ta.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(ta,fa?75:25);ta.className="geAdaptiveAsset";ta.style.verticalAlign="middle";ta.style.cursor="pointer";ta.style.width="16px";if(z||Editor.isDarkMode())ta.style.filter= -"invert(100%)";mxEvent.addListener(ta,"click",function(da){T(!0);ra();mxEvent.consume(da)});oa.appendChild(ta);ya.appendChild(oa);oa=document.createElement("td");oa.style.overflow="hidden";oa.style.whiteSpace="nowrap";oa.style.textOverflow="ellipsis";oa.style.verticalAlign="middle";oa.style.cursor="pointer";oa.setAttribute("title",ja);a=document.createElement("a");mxUtils.write(a,ja);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,fa?100:40);oa.appendChild(a);mxEvent.addListener(oa, -"click",function(da){if(mxEvent.isShiftDown(da))T(!0),ra();else if(fa&&0 mxUtils.indexOf(V.hiddenTags,ja),wa=document.createElement("tr"), +oa=document.createElement("td");oa.style.align="center";oa.style.width="16px";var xa=document.createElement("img");xa.setAttribute("src",ea?Editor.visibleImage:Editor.hiddenImage);xa.setAttribute("title",mxResources.get(ea?"hideIt":"show",[ja]));mxUtils.setOpacity(xa,ea?75:25);xa.className="geAdaptiveAsset";xa.style.verticalAlign="middle";xa.style.cursor="pointer";xa.style.width="16px";if(z||Editor.isDarkMode())xa.style.filter="invert(100%)";oa.appendChild(xa);mxEvent.addListener(xa,"click",function(da){mxEvent.isShiftDown(da)? +T(0<=mxUtils.indexOf(V.hiddenTags,ja)):(V.toggleHiddenTag(ja),P(),V.refresh());mxEvent.consume(da)});wa.appendChild(oa);oa=document.createElement("td");oa.style.align="center";oa.style.width="16px";xa=document.createElement("img");xa.setAttribute("src",Editor.selectImage);xa.setAttribute("title",mxResources.get("select"));mxUtils.setOpacity(xa,ea?75:25);xa.className="geAdaptiveAsset";xa.style.verticalAlign="middle";xa.style.cursor="pointer";xa.style.width="16px";if(z||Editor.isDarkMode())xa.style.filter= +"invert(100%)";mxEvent.addListener(xa,"click",function(da){T(!0);ra();mxEvent.consume(da)});oa.appendChild(xa);wa.appendChild(oa);oa=document.createElement("td");oa.style.overflow="hidden";oa.style.whiteSpace="nowrap";oa.style.textOverflow="ellipsis";oa.style.verticalAlign="middle";oa.style.cursor="pointer";oa.setAttribute("title",ja);a=document.createElement("a");mxUtils.write(a,ja);a.style.textOverflow="ellipsis";a.style.position="relative";mxUtils.setOpacity(a,ea?100:40);oa.appendChild(a);mxEvent.addListener(oa, +"click",function(da){if(mxEvent.isShiftDown(da))T(!0),ra();else if(ea&&0 mxUtils.indexOf(W,ea[ma])&&W.push(ea[ma]);W.sort();V.isSelectionEmpty()?S(W):S(W,V.getCommonTagsForCells(V.getSelectionCells()))}});V.selectionModel.addListener(mxEvent.CHANGE,ha);V.model.addListener(mxEvent.CHANGE,ha);V.addListener(mxEvent.REFRESH,ha);var aa=document.createElement("div");aa.style.display="flex";aa.style.alignItems="center";aa.style.boxSizing="border-box";aa.style.whiteSpace="nowrap";aa.style.position= +"10px";X.appendChild(Z);var Y=mxUtils.button(mxResources.get("reset"),function(fa){V.setHiddenTags([]);mxEvent.isShiftDown(fa)||(W=V.hiddenTags.slice());P();V.refresh()});Y.setAttribute("title",mxResources.get("reset"));Y.className="geBtn";Y.style.margin="0 4px 0 0";var ca=mxUtils.button(mxResources.get("add"),function(){null!=F&&F(W,function(fa){W=fa;ha()})});ca.setAttribute("title",mxResources.get("add"));ca.className="geBtn";ca.style.margin="0";V.addListener(mxEvent.ROOT,function(){W=V.hiddenTags.slice()}); +var ha=mxUtils.bind(this,function(fa,la){if(l()){fa=V.getAllTags();for(la=0;la mxUtils.indexOf(W,fa[la])&&W.push(fa[la]);W.sort();V.isSelectionEmpty()?S(W):S(W,V.getCommonTagsForCells(V.getSelectionCells()))}});V.selectionModel.addListener(mxEvent.CHANGE,ha);V.model.addListener(mxEvent.CHANGE,ha);V.addListener(mxEvent.REFRESH,ha);var aa=document.createElement("div");aa.style.display="flex";aa.style.alignItems="center";aa.style.boxSizing="border-box";aa.style.whiteSpace="nowrap";aa.style.position= "absolute";aa.style.overflow="hidden";aa.style.bottom="6px";aa.style.height="42px";aa.style.right="10px";aa.style.left="10px";V.isEnabled()&&(aa.appendChild(Y),aa.appendChild(ca),X.appendChild(aa));null!=N&&aa.appendChild(N);return{div:X,refresh:ha}};Graph.prototype.getCustomFonts=function(){var l=this.extFonts;l=null!=l?l.slice():[];for(var z in Graph.customFontElements){var F=Graph.customFontElements[z];l.push({name:F.name,url:F.url})}return l};Graph.prototype.setFont=function(l,z){Graph.addFont(l, z);var F=Editor.guid();document.execCommand("fontname",!1,F);for(var N=this.cellEditor.textarea.getElementsByTagName("font"),P=null,T=0;T '+mxUtils.htmlEntities(l)+""};mxGraphView.prototype.redrawEnumerationState=function(l){var z="1"==mxUtils.getValue(l.style,"enumerate",0);z&&null==l.secondLabel?(l.secondLabel=new mxText("",new mxRectangle,mxConstants.ALIGN_LEFT,mxConstants.ALIGN_BOTTOM),l.secondLabel.size=12,l.secondLabel.state=l,l.secondLabel.dialect= mxConstants.DIALECT_STRICTHTML,this.graph.cellRenderer.initializeLabel(l,l.secondLabel)):z||null==l.secondLabel||(l.secondLabel.destroy(),l.secondLabel=null);z=l.secondLabel;if(null!=z){var F=l.view.scale,N=this.createEnumerationValue(l);l=this.graph.model.isVertex(l.cell)?new mxRectangle(l.x+l.width-4*F,l.y+4*F,0,0):mxRectangle.fromPoint(l.view.getPoint(l));z.bounds.equals(l)&&z.value==N&&z.scale==F||(z.bounds=l,z.value=N,z.scale=F,z.redraw())}};var R=Graph.prototype.refresh;Graph.prototype.refresh= @@ -11931,8 +11931,8 @@ V=mxUtils.bind(this,function(){N&&(N=!1,this.model.endUpdate())}),W=mxUtils.bind window.setTimeout(this.pendingExecuteNextAction,""!=Y.wait?parseInt(Y.wait):1E3),V());null!=Y.opacity&&null!=Y.opacity.value&&Graph.setOpacityForNodes(this.getNodesForCells(this.getCellsForAction(Y.opacity,!0)),Y.opacity.value);null!=Y.fadeIn&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeIn,!0)),0,1,W,Z?0:Y.fadeIn.delay));null!=Y.fadeOut&&(P++,Graph.fadeNodes(this.getNodesForCells(this.getCellsForAction(Y.fadeOut,!0)),1,0,W,Z?0:Y.fadeOut.delay));null!=Y.wipeIn&&(ca=ca.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeIn, !0),!0)));null!=Y.wipeOut&&(ca=ca.concat(this.createWipeAnimations(this.getCellsForAction(Y.wipeOut,!0),!1)));null!=Y.toggle&&(S(),this.toggleCells(this.getCellsForAction(Y.toggle,!0)));if(null!=Y.show){S();var ha=this.getCellsForAction(Y.show,!0);Graph.setOpacityForNodes(this.getNodesForCells(ha),1);this.setCellsVisible(ha,!0)}null!=Y.hide&&(S(),ha=this.getCellsForAction(Y.hide,!0),Graph.setOpacityForNodes(this.getNodesForCells(ha),0),this.setCellsVisible(ha,!1));null!=Y.toggleStyle&&null!=Y.toggleStyle.key&& (S(),this.toggleCellStyles(Y.toggleStyle.key,null!=Y.toggleStyle.defaultValue?Y.toggleStyle.defaultValue:"0",this.getCellsForAction(Y.toggleStyle,!0)));null!=Y.style&&null!=Y.style.key&&(S(),this.setCellStyles(Y.style.key,Y.style.value,this.getCellsForAction(Y.style,!0)));ha=[];null!=Y.select&&this.isEnabled()&&(ha=this.getCellsForAction(Y.select),this.setSelectionCells(ha));null!=Y.highlight&&(ha=this.getCellsForAction(Y.highlight),this.highlightCells(ha,Y.highlight.color,Y.highlight.duration,Y.highlight.opacity)); -null!=Y.scroll&&(ha=this.getCellsForAction(Y.scroll));null!=Y.viewbox&&this.fitWindow(Y.viewbox,Y.viewbox.border);0 mxUtils.indexOf(Y.tags.visible,ea[ha])&&0>mxUtils.indexOf(aa,ea[ha])&&aa.push(ea[ha])}null!=aa&&this.setHiddenTags(aa);this.refresh()}0 mxUtils.indexOf(Y.tags.visible,fa[ha])&&0>mxUtils.indexOf(aa,fa[ha])&&aa.push(fa[ha])}null!=aa&&this.setHiddenTags(aa);this.refresh()}0 l.excludeCells.indexOf(z[N].id)&&F.push(z[N]);z=F}return z};Graph.prototype.getCellsById=function(l){var z=[];if(null!=l)for(var F=0;F '), Ya.writeln("@media print {"),Ya.writeln(".MathJax svg { shape-rendering: crispEdges; }"),Ya.writeln("}"),Ya.writeln(""));null!=l.editor.fontCss&&(Ya.writeln('"));for(var bb=Ca.getCustomFonts(),ab=0;ab '): (Ya.writeln('"))}};if(Editor.enableCssDarkMode){var hb=Ha.getBackgroundImage;Ha.getBackgroundImage=function(){return P.adaptBackgroundPage(hb.apply(this,arguments))}}if("undefined"!==typeof MathJax){var ib=Ha.renderPage;Ha.renderPage=function(Ya,bb,ab,db,cb,kb){var jb=mxClient.NO_FO,eb=ib.apply(this,arguments);mxClient.NO_FO=jb;this.graph.mathEnabled? this.mathEnabled=this.mathEnabled||!0:eb.className="geDisableMathJax";return eb}}Ka=null;Va=P.shapeForegroundColor;$a=P.shapeBackgroundColor;Qa=P.enableFlowAnimation;P.enableFlowAnimation=!1;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(Ka=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor="#000000",P.shapeBackgroundColor="#ffffff",P.refresh());Ha.open(null,null,Na,!0,ua);P.enableFlowAnimation=Qa;null!=Ka&&(P.shapeForegroundColor=Va,P.shapeBackgroundColor=$a,P.stylesheet= Ka,P.refresh())}else{Qa=Ca.background;if(null==Qa||""==Qa||Qa==mxConstants.NONE)Qa="#ffffff";Ha.backgroundColor=Qa;Ha.autoOrigin=$a;Ha.appendGraph(Ca,Za,Ka,Va,Na,!0,ua);Na=Ca.getCustomFonts();if(null!=Ha.wnd)for(Ka=0;Ka '):(Ha.wnd.document.writeln('"))}Ua&&(Ca.useCssTransforms=Ua,Ca.currentTranslate=La,Ca.currentScale=Xa,Ca.view.translate=Wa,Ca.view.scale=Sa);return Ha}var Ga=parseInt(za.value)/100;isNaN(Ga)&&(Ga=1,za.value="100 %");mxClient.IS_SF&&(Ga*=.75);var Da=null,Pa=P.shapeForegroundColor,Oa=P.shapeBackgroundColor;null!=P.themes&&"darkTheme"==P.defaultThemeName&&(Da=P.stylesheet,P.stylesheet=P.getDefaultStylesheet(),P.shapeForegroundColor= -"#000000",P.shapeBackgroundColor="#ffffff",P.refresh());var Ea=Y.value,ia=ca.value,wa=!X.checked,pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(l,X.checked,Ea,ia,ba.checked,da.value,na.value,parseInt(ma.value)/100,parseInt(za.value)/100,Aa.get());else{wa&&(wa=ha.checked||Ea==W&&ia==W);if(!wa&&null!=l.pages&&l.pages.length){var va=0;wa=l.pages.length-1;X.checked||(va=parseInt(Ea)-1,wa=parseInt(ia)-1);for(var qa=va;qa<=wa;qa++){var sa=l.pages[qa];Ea=sa==l.currentPage?P:null;if(null==Ea){Ea= -l.createTemporaryGraph(P.stylesheet);Ea.shapeForegroundColor=P.shapeForegroundColor;Ea.shapeBackgroundColor=P.shapeBackgroundColor;ia=!0;va=!1;var Ma=null,Fa=null;null==sa.viewState&&null==sa.root&&l.updatePageRoot(sa);null!=sa.viewState&&(ia=sa.viewState.pageVisible,va=sa.viewState.mathEnabled,Ma=sa.viewState.background,Fa=sa.viewState.backgroundImage,Ea.extFonts=sa.viewState.extFonts);null!=Fa&&null!=Fa.originalSrc&&(Fa=l.createImageForPageLink(Fa.originalSrc,sa));Ea.background=Ma;Ea.backgroundImage= +"#000000",P.shapeBackgroundColor="#ffffff",P.refresh());var Ea=Y.value,ia=ca.value,ya=!X.checked,pa=null;if(EditorUi.isElectronApp)PrintDialog.electronPrint(l,X.checked,Ea,ia,ba.checked,da.value,ma.value,parseInt(la.value)/100,parseInt(za.value)/100,Aa.get());else{ya&&(ya=ha.checked||Ea==W&&ia==W);if(!ya&&null!=l.pages&&l.pages.length){var va=0;ya=l.pages.length-1;X.checked||(va=parseInt(Ea)-1,ya=parseInt(ia)-1);for(var qa=va;qa<=ya;qa++){var ta=l.pages[qa];Ea=ta==l.currentPage?P:null;if(null==Ea){Ea= +l.createTemporaryGraph(P.stylesheet);Ea.shapeForegroundColor=P.shapeForegroundColor;Ea.shapeBackgroundColor=P.shapeBackgroundColor;ia=!0;va=!1;var Ma=null,Fa=null;null==ta.viewState&&null==ta.root&&l.updatePageRoot(ta);null!=ta.viewState&&(ia=ta.viewState.pageVisible,va=ta.viewState.mathEnabled,Ma=ta.viewState.background,Fa=ta.viewState.backgroundImage,Ea.extFonts=ta.viewState.extFonts);null!=Fa&&null!=Fa.originalSrc&&(Fa=l.createImageForPageLink(Fa.originalSrc,ta));Ea.background=Ma;Ea.backgroundImage= null!=Fa?new mxImage(Fa.src,Fa.width,Fa.height,Fa.x,Fa.y):null;Ea.pageVisible=ia;Ea.mathEnabled=va;var Ra=Ea.getGraphBounds;Ea.getGraphBounds=function(){var Ca=Ra.apply(this,arguments),Ha=this.backgroundImage;if(null!=Ha&&null!=Ha.width&&null!=Ha.height){var Na=this.view.translate,ua=this.view.scale;Ca=mxRectangle.fromRectangle(Ca);Ca.add(new mxRectangle((Na.x+Ha.x)*ua,(Na.y+Ha.y)*ua,Ha.width*ua,Ha.height*ua))}return Ca};var Ta=Ea.getGlobalVariable;Ea.getGlobalVariable=function(Ca){return"page"== -Ca?sa.getName():"pagenumber"==Ca?qa+1:"pagecount"==Ca?null!=l.pages?l.pages.length:1:Ta.apply(this,arguments)};document.body.appendChild(Ea.container);l.updatePageRoot(sa);Ea.model.setRoot(sa.root)}pa=Ba(Ea,pa,qa!=wa,sa.getId());Ea!=P&&Ea.container.parentNode.removeChild(Ea.container)}}else pa=Ba(P);null==pa||null==pa.wnd?l.handleError({message:mxResources.get("errorUpdatingPreview")}):(pa.mathEnabled&&(wa=pa.wnd.document,Ia&&(pa.wnd.IMMEDIATE_PRINT=!0),wa.writeln('