├── .gitignore ├── LICENSE ├── README.md ├── _config.yml ├── build.sh ├── cfg ├── apiConfig.json └── smtpConfig.json ├── genkeys.sh ├── install.sh ├── js ├── holomap.core.js ├── holomap.httpserver.js ├── holomap.membrane.js └── holomap.nodestore.js ├── package.json ├── pub ├── css │ ├── bootstrap-combined.no-icons.min.css │ ├── bootstrap-datepicker.css │ ├── croppie.css │ ├── jquery.timepicker.css │ ├── page.css │ ├── quill.snow.css │ ├── skin.css │ └── sweetalert.css ├── embed.dev.html ├── embed.html ├── holomap.js ├── ico │ └── favicon.ico ├── img │ ├── button_background.png │ ├── cancel.png │ ├── close.png │ ├── create.png │ ├── decrease.png │ ├── default.png │ ├── default_avatar.png │ ├── delete.png │ ├── edit.png │ ├── increase.png │ ├── loading.gif │ ├── logo.png │ ├── mask.jpg │ ├── navHome.png │ ├── navPrep.png │ ├── navProfile.png │ ├── navSearch.png │ ├── settings.png │ └── sprites │ │ ├── default.png │ │ ├── orb.png │ │ ├── ring.png │ │ └── shell.png ├── index.dev.html ├── index.html ├── js │ ├── holomap.browser.js │ ├── holomap.corelink.js │ ├── holomap.infopanel.commentsResizer.js │ ├── holomap.infopanel.js │ ├── holomap.infopanel.resizer.js │ ├── holomap.template.js │ ├── holomap.viewer.js │ └── holomap.viewer.ring.js ├── lib │ ├── ColorPropsPlugin.min.js │ ├── OrbitControls.js │ ├── TweenMax.min.js │ ├── active-line.js │ ├── aes.js │ ├── bootstrap-datepicker.js │ ├── bootstrap-typeahead.js │ ├── closebrackets.js │ ├── codemirror.js │ ├── croppie.js │ ├── datepair.js │ ├── empty.js │ ├── javascript.js │ ├── jquery.datepair.js │ ├── jquery.form.js │ ├── jquery.min.js │ ├── jquery.timepicker.js │ ├── jquery.timepicker.min.js │ ├── jquery.tinymce.min.js │ ├── langs │ │ └── readme.md │ ├── matchbrackets.js │ ├── pixi.js │ ├── plugins │ │ ├── advlist │ │ │ └── plugin.min.js │ │ ├── anchor │ │ │ └── plugin.min.js │ │ ├── autolink │ │ │ └── plugin.min.js │ │ ├── autoresize │ │ │ └── plugin.min.js │ │ ├── autosave │ │ │ └── plugin.min.js │ │ ├── bbcode │ │ │ └── plugin.min.js │ │ ├── charmap │ │ │ └── plugin.min.js │ │ ├── code │ │ │ └── plugin.min.js │ │ ├── codesample │ │ │ ├── css │ │ │ │ └── prism.css │ │ │ └── plugin.min.js │ │ ├── colorpicker │ │ │ └── plugin.min.js │ │ ├── contextmenu │ │ │ └── plugin.min.js │ │ ├── directionality │ │ │ └── plugin.min.js │ │ ├── emoticons │ │ │ ├── img │ │ │ │ ├── smiley-cool.gif │ │ │ │ ├── smiley-cry.gif │ │ │ │ ├── smiley-embarassed.gif │ │ │ │ ├── smiley-foot-in-mouth.gif │ │ │ │ ├── smiley-frown.gif │ │ │ │ ├── smiley-innocent.gif │ │ │ │ ├── smiley-kiss.gif │ │ │ │ ├── smiley-laughing.gif │ │ │ │ ├── smiley-money-mouth.gif │ │ │ │ ├── smiley-sealed.gif │ │ │ │ ├── smiley-smile.gif │ │ │ │ ├── smiley-surprised.gif │ │ │ │ ├── smiley-tongue-out.gif │ │ │ │ ├── smiley-undecided.gif │ │ │ │ ├── smiley-wink.gif │ │ │ │ └── smiley-yell.gif │ │ │ └── plugin.min.js │ │ ├── fullpage │ │ │ └── plugin.min.js │ │ ├── fullscreen │ │ │ └── plugin.min.js │ │ ├── help │ │ │ ├── img │ │ │ │ └── logo.png │ │ │ └── plugin.min.js │ │ ├── hr │ │ │ └── plugin.min.js │ │ ├── image │ │ │ └── plugin.min.js │ │ ├── imagetools │ │ │ └── plugin.min.js │ │ ├── importcss │ │ │ └── plugin.min.js │ │ ├── insertdatetime │ │ │ └── plugin.min.js │ │ ├── legacyoutput │ │ │ └── plugin.min.js │ │ ├── link │ │ │ └── plugin.min.js │ │ ├── lists │ │ │ └── plugin.min.js │ │ ├── media │ │ │ └── plugin.min.js │ │ ├── nonbreaking │ │ │ └── plugin.min.js │ │ ├── noneditable │ │ │ └── plugin.min.js │ │ ├── pagebreak │ │ │ └── plugin.min.js │ │ ├── paste │ │ │ └── plugin.min.js │ │ ├── preview │ │ │ └── plugin.min.js │ │ ├── print │ │ │ └── plugin.min.js │ │ ├── save │ │ │ └── plugin.min.js │ │ ├── searchreplace │ │ │ └── plugin.min.js │ │ ├── spellchecker │ │ │ └── plugin.min.js │ │ ├── tabfocus │ │ │ └── plugin.min.js │ │ ├── table │ │ │ └── plugin.min.js │ │ ├── template │ │ │ └── plugin.min.js │ │ ├── textcolor │ │ │ └── plugin.min.js │ │ ├── textpattern │ │ │ └── plugin.min.js │ │ ├── toc │ │ │ └── plugin.min.js │ │ ├── visualblocks │ │ │ ├── css │ │ │ │ └── visualblocks.css │ │ │ └── plugin.min.js │ │ ├── visualchars │ │ │ └── plugin.min.js │ │ └── wordcount │ │ │ └── plugin.min.js │ ├── quill.htmlEditButton.min.js │ ├── quill.js │ ├── require.js │ ├── sha3.js │ ├── sha512.js │ ├── site.js │ ├── skins │ │ └── lightgray │ │ │ ├── content.inline.min.css │ │ │ ├── content.min.css │ │ │ ├── fonts │ │ │ ├── tinymce-small.eot │ │ │ ├── tinymce-small.svg │ │ │ ├── tinymce-small.ttf │ │ │ ├── tinymce-small.woff │ │ │ ├── tinymce.eot │ │ │ ├── tinymce.svg │ │ │ ├── tinymce.ttf │ │ │ └── tinymce.woff │ │ │ ├── img │ │ │ ├── anchor.gif │ │ │ ├── loader.gif │ │ │ ├── object.gif │ │ │ └── trans.gif │ │ │ └── skin.min.css │ ├── sweetalert.min.js │ ├── themes │ │ ├── inlite │ │ │ └── theme.min.js │ │ └── modern │ │ │ └── theme.min.js │ ├── three.min.js │ ├── tinymce.min.js │ └── twin-bcrypt.min.js ├── mp3 │ └── beep.mp3 ├── portal.html └── ttf │ ├── Archivo-Bold.ttf │ ├── Archivo-BoldItalic.ttf │ ├── Archivo-Italic.ttf │ ├── Archivo-Medium.ttf │ ├── Archivo-MediumItalic.ttf │ ├── Archivo-Regular.ttf │ ├── Archivo-SemiBold.ttf │ └── Archivo-SemiBoldItalic.ttf ├── server.js ├── setup.txt ├── start_dev └── start_production /.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | /.env 3 | /node_modules/ 4 | /npm-debug.log 5 | /pub/holomap.build.js 6 | /tmp/ 7 | /pub/img/user/ 8 | /pub/img/user/thumb/ 9 | db 10 | subscriptions 11 | package-lock.json 12 | sslcert 13 | /pub/privacy.html 14 | /pub/terms.html 15 | /cfg/apiConfig.json 16 | /cfg/smtpConfig.json 17 | /pub/css/skin.css 18 | /log/ 19 | /log/* 20 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Holomap Proton 2 | 3 | Holomap is a real-time collaborative holonic mapping platform. For more information please visit holomap.org. 4 | 5 | ## Installation 6 | 7 | 1. Install imagemagick (`sudo apt install imagemagick` on most systems) 8 | 9 | 2. `./install.sh` 10 | 11 | ## Dev Server 12 | `./start_dev` 13 | 14 | You should see it running at 15 | 16 | Front-end files are loaded from pub/index.dev.html, pub/holomap.js and /pub/js 17 | 18 | Note that this server will restart when files are changed. 19 | 20 | ## Production server 21 | `./start_production` 22 | 23 | Front-end files are loaded from pub/index.html and pub/holomap.build.js only. 24 | 25 | Note that build.sh will need to be run to create holomap.build.js (based on files in /pub/js used in development). 26 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-midnight -------------------------------------------------------------------------------- /build.sh: -------------------------------------------------------------------------------- 1 | node ./node_modules/requirejs/bin/r.js -o baseUrl=./pub/ name=holomap out=./pub/holomap.build.js 2 | -------------------------------------------------------------------------------- /cfg/apiConfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "origins": ["https://yourdomain.com:443"] 3 | } -------------------------------------------------------------------------------- /cfg/smtpConfig.json: -------------------------------------------------------------------------------- 1 | {"host": "", 2 | "secure": "true", 3 | "requiresAuth": "true", 4 | "port": "465", 5 | "auth": {"user": "", "pass": ""} 6 | } 7 | -------------------------------------------------------------------------------- /genkeys.sh: -------------------------------------------------------------------------------- 1 | cd sslcert 2 | openssl genrsa -out server.key 2048 3 | openssl rsa -in server.key -out server.key 4 | openssl req -sha256 -new -key server.key -out server.csr -subj '/CN=localhost' 5 | openssl x509 -req -sha256 -days 365 -in server.csr -signkey server.key -out server.crt 6 | cd ../ 7 | -------------------------------------------------------------------------------- /install.sh: -------------------------------------------------------------------------------- 1 | echo; echo; echo; 2 | echo "Installing NPM modules..." 3 | echo; echo; echo; 4 | npm i 5 | echo; echo; echo; 6 | echo "Creating SSL keys for local development..." 7 | echo; echo; echo; 8 | mkdir sslcert 9 | ./genkeys.sh 10 | echo;echo;echo; 11 | echo "Building production file holomap.build.js" 12 | ./build.sh 13 | echo;echo;echo; 14 | mkdir ./pub/img/user 15 | mkdir ./pub/img/user/thumb 16 | echo "INSTALL COMPLETE. If no errors were encountered above, proceed to post-installation setup." 17 | echo;echo;echo; 18 | cat setup.txt 19 | echo;echo; 20 | -------------------------------------------------------------------------------- /js/holomap.nodestore.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Holomap - Real-time collaborative holonic mapping platform 4 | Copyright (C) 2020 Chris Larcombe 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU Affero General Public License as 8 | published by the Free Software Foundation, either version 3 of the 9 | License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU Affero General Public License for more details. 15 | 16 | You should have received a copy of the GNU Affero General Public License 17 | along with this program. If not, see . 18 | 19 | */ 20 | 21 | var NodeStore; 22 | 23 | NodeStore = (function() 24 | { 25 | var db; 26 | 27 | function NodeStore(dbTitle) 28 | { 29 | var Datastore = require('nedb'); 30 | db = new Datastore({ filename: './db', autoload: true }); 31 | } 32 | 33 | NodeStore.prototype.create_node = function(content) 34 | { 35 | var newNode = {}; 36 | newNode.n = content; 37 | 38 | db.insert(newNode, function(err) 39 | { 40 | if (err) 41 | { 42 | console.log("error saving node:", err); 43 | } 44 | }); 45 | } 46 | 47 | NodeStore.prototype.destroy_node = function(id, callback) 48 | { 49 | db.remove({'n._id': id}, {}, function(err) 50 | { 51 | if (err) 52 | { 53 | console.log("error deleting node:", err); 54 | callback(null); 55 | } 56 | else 57 | { 58 | callback(true); 59 | } 60 | }); 61 | } 62 | 63 | NodeStore.prototype.get_node_fields = function(query, fields, callback) 64 | { 65 | db.findOne(query, function (err, doc) 66 | { 67 | if (!err && doc) 68 | callback(doc.n); 69 | else 70 | callback(null); 71 | }); 72 | } 73 | 74 | NodeStore.prototype.get_node = function(query, callback) 75 | { 76 | db.findOne(query, function (err, doc) 77 | { 78 | if (!err && doc) 79 | callback(doc.n); 80 | else 81 | callback(null); 82 | }); 83 | } 84 | 85 | NodeStore.prototype.count = function(query, callback) 86 | { 87 | db.count(query, function (err, c) 88 | { 89 | if (!err && c != undefined) 90 | callback(c); 91 | else 92 | callback(null); 93 | }); 94 | } 95 | 96 | 97 | NodeStore.prototype.get_nodes = function(query, callback) 98 | { 99 | db.find(query, function (err, docs) 100 | { 101 | if (!err && docs) 102 | { 103 | var ns = []; 104 | for (var i = docs.length - 1; i >= 0; i--) 105 | ns.push(docs[i].n); 106 | callback(ns); 107 | } 108 | else 109 | { 110 | console.log("error getting nodes:",err, "---> query ", query); 111 | } 112 | }); 113 | } 114 | 115 | NodeStore.prototype.update_node = function(id, updateObject, callback) 116 | { 117 | db.update({'n._id': id}, {$set: updateObject}, {}, function(err, res) 118 | { 119 | if (err) 120 | { 121 | console.log("Error updating node", err); 122 | } 123 | else if (!res) 124 | { 125 | console.log("Error updating node", err); 126 | } 127 | else 128 | { 129 | //console.log("Node updated"); 130 | callback(); 131 | } 132 | }); 133 | } 134 | 135 | return NodeStore; 136 | 137 | })(); 138 | 139 | module.exports = NodeStore; -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "holomap-proton", 3 | "description": "Real-time collaborative holonic mapping platform.", 4 | "author": "Chris Larcombe (https://larcombe.io)", 5 | "keywords": [], 6 | "scripts": { 7 | "dev": "./node_modules/.bin/nodemon", 8 | "start": "node server.js", 9 | "watch": "coffee --bare --watch --compile ." 10 | }, 11 | "dependencies": { 12 | "cookie": "^0.4.1", 13 | "cookie-parser": "^1.4.5", 14 | "crypto": "^1.0.1", 15 | "dotenv": "0.5.1", 16 | "express": "^4.17.1", 17 | "imagemagick": "^0.1.3", 18 | "js-sha3": "^0.8.0", 19 | "js-sha512": "^0.8.0", 20 | "moment": "^2.24.0", 21 | "multer": "^1.4.1", 22 | "nedb": "^1.8.0", 23 | "nodemailer": "^6.4.5", 24 | "nodemon": "^1.19.1", 25 | "requirejs": "^2.3.6", 26 | "socket.io": "^2.4.1", 27 | "twin-bcrypt": "^2.1.1" 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /pub/css/croppie.css: -------------------------------------------------------------------------------- 1 | .croppie-container { 2 | width: 100%; 3 | height: 100%; 4 | } 5 | 6 | .croppie-container .cr-image { 7 | z-index: -1; 8 | position: absolute; 9 | top: 0; 10 | left: 0; 11 | transform-origin: 0 0; 12 | max-height: none; 13 | max-width: none; 14 | } 15 | 16 | .croppie-container .cr-boundary { 17 | position: relative; 18 | overflow: hidden; 19 | margin: 0 auto; 20 | z-index: 1; 21 | width: 100%; 22 | height: 100%; 23 | } 24 | 25 | .croppie-container .cr-viewport, 26 | .croppie-container .cr-resizer { 27 | position: absolute; 28 | border: 2px solid #fff; 29 | margin: auto; 30 | top: 0; 31 | bottom: 0; 32 | right: 0; 33 | left: 0; 34 | box-shadow: 0 0 2000px 2000px rgba(0, 0, 0, 0.5); 35 | z-index: 0; 36 | } 37 | 38 | .croppie-container .cr-resizer { 39 | z-index: 2; 40 | box-shadow: none; 41 | pointer-events: none; 42 | } 43 | 44 | .croppie-container .cr-resizer-vertical, 45 | .croppie-container .cr-resizer-horisontal { 46 | position: absolute; 47 | pointer-events: all; 48 | } 49 | 50 | .croppie-container .cr-resizer-vertical::after, 51 | .croppie-container .cr-resizer-horisontal::after { 52 | display: block; 53 | position: absolute; 54 | box-sizing: border-box; 55 | border: 1px solid black; 56 | background: #fff; 57 | width: 10px; 58 | height: 10px; 59 | content: ''; 60 | } 61 | 62 | .croppie-container .cr-resizer-vertical { 63 | bottom: -5px; 64 | cursor: row-resize; 65 | width: 100%; 66 | height: 10px; 67 | } 68 | 69 | .croppie-container .cr-resizer-vertical::after { 70 | left: 50%; 71 | margin-left: -5px; 72 | } 73 | 74 | .croppie-container .cr-resizer-horisontal { 75 | right: -5px; 76 | cursor: col-resize; 77 | width: 10px; 78 | height: 100%; 79 | } 80 | 81 | .croppie-container .cr-resizer-horisontal::after { 82 | top: 50%; 83 | margin-top: -5px; 84 | } 85 | 86 | .croppie-container .cr-original-image { 87 | display: none; 88 | } 89 | 90 | .croppie-container .cr-vp-circle { 91 | border-radius: 50%; 92 | } 93 | 94 | .croppie-container .cr-overlay { 95 | z-index: 1; 96 | position: absolute; 97 | cursor: move; 98 | touch-action: none; 99 | } 100 | 101 | .croppie-container .cr-slider-wrap { 102 | width: 75%; 103 | margin: 15px auto; 104 | text-align: center; 105 | } 106 | 107 | .croppie-result { 108 | position: relative; 109 | overflow: hidden; 110 | } 111 | 112 | .croppie-result img { 113 | position: absolute; 114 | } 115 | 116 | .croppie-container .cr-image, 117 | .croppie-container .cr-overlay, 118 | .croppie-container .cr-viewport { 119 | -webkit-transform: translateZ(0); 120 | -moz-transform: translateZ(0); 121 | -ms-transform: translateZ(0); 122 | transform: translateZ(0); 123 | } 124 | 125 | /*************************************/ 126 | /***** STYLING RANGE INPUT ***********/ 127 | /*************************************/ 128 | /*http://brennaobrien.com/blog/2014/05/style-input-type-range-in-every-browser.html */ 129 | /*************************************/ 130 | 131 | .cr-slider { 132 | -webkit-appearance: none; 133 | /*removes default webkit styles*/ 134 | /*border: 1px solid white; *//*fix for FF unable to apply focus style bug */ 135 | width: 300px; 136 | /*required for proper track sizing in FF*/ 137 | max-width: 100%; 138 | padding-top: 8px; 139 | padding-bottom: 8px; 140 | background-color: transparent; 141 | } 142 | 143 | .cr-slider::-webkit-slider-runnable-track { 144 | width: 100%; 145 | height: 3px; 146 | background: rgba(0, 0, 0, 0.5); 147 | border: 0; 148 | border-radius: 3px; 149 | } 150 | 151 | .cr-slider::-webkit-slider-thumb { 152 | -webkit-appearance: none; 153 | border: none; 154 | height: 16px; 155 | width: 16px; 156 | border-radius: 50%; 157 | background: #ddd; 158 | margin-top: -6px; 159 | } 160 | 161 | .cr-slider:focus { 162 | outline: none; 163 | } 164 | /* 165 | .cr-slider:focus::-webkit-slider-runnable-track { 166 | background: #ccc; 167 | } 168 | */ 169 | 170 | .cr-slider::-moz-range-track { 171 | width: 100%; 172 | height: 3px; 173 | background: rgba(0, 0, 0, 0.5); 174 | border: 0; 175 | border-radius: 3px; 176 | } 177 | 178 | .cr-slider::-moz-range-thumb { 179 | border: none; 180 | height: 16px; 181 | width: 16px; 182 | border-radius: 50%; 183 | background: #ddd; 184 | margin-top: -6px; 185 | } 186 | 187 | /*hide the outline behind the border*/ 188 | .cr-slider:-moz-focusring { 189 | outline: 1px solid white; 190 | outline-offset: -1px; 191 | } 192 | 193 | .cr-slider::-ms-track { 194 | width: 100%; 195 | height: 5px; 196 | background: transparent; 197 | /*remove bg colour from the track, we'll use ms-fill-lower and ms-fill-upper instead */ 198 | border-color: transparent;/*leave room for the larger thumb to overflow with a transparent border */ 199 | border-width: 6px 0; 200 | color: transparent;/*remove default tick marks*/ 201 | } 202 | .cr-slider::-ms-fill-lower { 203 | background: rgba(0, 0, 0, 0.5); 204 | border-radius: 10px; 205 | } 206 | .cr-slider::-ms-fill-upper { 207 | background: rgba(0, 0, 0, 0.5); 208 | border-radius: 10px; 209 | } 210 | .cr-slider::-ms-thumb { 211 | border: none; 212 | height: 16px; 213 | width: 16px; 214 | border-radius: 50%; 215 | background: #ddd; 216 | margin-top:1px; 217 | } 218 | .cr-slider:focus::-ms-fill-lower { 219 | background: rgba(0, 0, 0, 0.5); 220 | } 221 | .cr-slider:focus::-ms-fill-upper { 222 | background: rgba(0, 0, 0, 0.5); 223 | } 224 | /*******************************************/ 225 | 226 | /***********************************/ 227 | /* Rotation Tools */ 228 | /***********************************/ 229 | .cr-rotate-controls { 230 | position: absolute; 231 | bottom: 5px; 232 | left: 5px; 233 | z-index: 1; 234 | } 235 | .cr-rotate-controls button { 236 | border: 0; 237 | background: none; 238 | } 239 | .cr-rotate-controls i:before { 240 | display: inline-block; 241 | font-style: normal; 242 | font-weight: 900; 243 | font-size: 22px; 244 | } 245 | .cr-rotate-l i:before { 246 | content: '↺'; 247 | } 248 | .cr-rotate-r i:before { 249 | content: '↻'; 250 | } 251 | -------------------------------------------------------------------------------- /pub/css/jquery.timepicker.css: -------------------------------------------------------------------------------- 1 | .ui-timepicker-wrapper { 2 | overflow-y: auto; 3 | height: 150px; 4 | width: 6.5em; 5 | background: #fff; 6 | border: 1px solid #ddd; 7 | -webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2); 8 | -moz-box-shadow:0 5px 10px rgba(0,0,0,0.2); 9 | box-shadow:0 5px 10px rgba(0,0,0,0.2); 10 | outline: none; 11 | z-index: 10001; 12 | margin: 0; 13 | } 14 | 15 | .ui-timepicker-wrapper.ui-timepicker-with-duration { 16 | width: 13em; 17 | } 18 | 19 | .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-30, 20 | .ui-timepicker-wrapper.ui-timepicker-with-duration.ui-timepicker-step-60 { 21 | width: 11em; 22 | } 23 | 24 | .ui-timepicker-list { 25 | margin: 0; 26 | padding: 0; 27 | list-style: none; 28 | } 29 | 30 | .ui-timepicker-duration { 31 | margin-left: 5px; color: #888; 32 | } 33 | 34 | .ui-timepicker-list:hover .ui-timepicker-duration { 35 | color: #888; 36 | } 37 | 38 | .ui-timepicker-list li { 39 | padding: 3px 0 3px 5px; 40 | cursor: pointer; 41 | white-space: nowrap; 42 | color: #000; 43 | list-style: none; 44 | margin: 0; 45 | } 46 | 47 | .ui-timepicker-list:hover .ui-timepicker-selected { 48 | background: #fff; color: #000; 49 | } 50 | 51 | li.ui-timepicker-selected, 52 | .ui-timepicker-list li:hover, 53 | .ui-timepicker-list .ui-timepicker-selected:hover { 54 | background: #1980EC; color: #fff; 55 | } 56 | 57 | li.ui-timepicker-selected .ui-timepicker-duration, 58 | .ui-timepicker-list li:hover .ui-timepicker-duration { 59 | color: #ccc; 60 | } 61 | 62 | .ui-timepicker-list li.ui-timepicker-disabled, 63 | .ui-timepicker-list li.ui-timepicker-disabled:hover, 64 | .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled { 65 | color: #888; 66 | cursor: default; 67 | } 68 | 69 | .ui-timepicker-list li.ui-timepicker-disabled:hover, 70 | .ui-timepicker-list li.ui-timepicker-selected.ui-timepicker-disabled { 71 | background: #f2f2f2; 72 | } 73 | -------------------------------------------------------------------------------- /pub/css/skin.css: -------------------------------------------------------------------------------- 1 | body 2 | { 3 | background-image: -webkit-gradient( 4 | linear, 5 | left top, 6 | left bottom, 7 | color-stop(0, #000000), 8 | color-stop(1, #002255) 9 | ); 10 | background-image: -o-linear-gradient(bottom, #000000 50%, #002255 100%); 11 | background-image: -moz-linear-gradient(bottom, #000000 50%, #002255 100%); 12 | background-image: -webkit-linear-gradient(bottom, #000000 50%, #002255 100%); 13 | background-image: -ms-linear-gradient(bottom, #000000 50%, #002f55 100%); 14 | background-image: linear-gradient(to bottom, #000000 50%, #002255 100%); 15 | } 16 | 17 | A:link { text-decoration: none; font-weight: bold; color: rgb(130, 150, 228);} 18 | A:hover { text-decoration: none; font-weight: bold; color: rgb(130, 150, 228);} 19 | A:active { text-decoration: none; color: rgb(130, 150, 228); } 20 | A:visited { text-decoration: none; color: rgb(130, 150, 228); } -------------------------------------------------------------------------------- /pub/embed.dev.html: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | Holomap Proton (Development Mode) 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 59 | 60 | 61 | 62 | 63 | 64 |
65 | 66 |
67 | 68 |
69 |
70 | 71 |
72 | © 2020 Chris Larcombe. Source. 73 |
74 |
75 | 76 | -------------------------------------------------------------------------------- /pub/embed.html: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | Holomap Proton 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 58 | 59 | 60 | 61 | 62 | 63 |
64 | 65 |
66 | 67 |
68 |
69 | 70 |
71 | © 2020 Chris Larcombe. Source. 72 |
73 |
74 | 75 | -------------------------------------------------------------------------------- /pub/holomap.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Holomap - Real-time collaborative holonic mapping platform 4 | Copyright (C) 2020 Chris Larcombe 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU Affero General Public License as 8 | published by the Free Software Foundation, either version 3 of the 9 | License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU Affero General Public License for more details. 15 | 16 | You should have received a copy of the GNU Affero General Public License 17 | along with this program. If not, see . 18 | 19 | */ 20 | 21 | if (!EMBEDDED) 22 | { 23 | require([""+'/socket.io/socket.io.js', "js/holomap.viewer.js", "lib/pixi.js", "lib/TweenMax.min.js", "lib/ColorPropsPlugin.min.js", "js/holomap.corelink.js", "js/holomap.infopanel.js", "js/holomap.browser.js"], function(m0,m1,m2,m3,m4,m5,m6,m7) 24 | { 25 | // Define general modules 26 | io = m0; 27 | PIXI = m2; 28 | 29 | // Define modules 30 | var VIEWER = m1; 31 | var CORELINK = m5; 32 | var INFOPANEL = m6; 33 | var BROWSER = m7; 34 | 35 | // Initialise 36 | BROWSER.init(VIEWER, CORELINK, INFOPANEL); 37 | }); 38 | } 39 | else 40 | { 41 | require([""+'/socket.io/socket.io.js', "js/holomap.viewer.js", "lib/pixi.js", "lib/TweenMax.min.js", "lib/ColorPropsPlugin.min.js", "js/holomap.corelink.js", "js/holomap.browser.js"], function(m0,m1,m2,m3,m4,m5,m6,m7) 42 | { 43 | // Define general modules 44 | io = m0; 45 | PIXI = m2; 46 | 47 | // Define modules 48 | var VIEWER = m1; 49 | var CORELINK = m5; 50 | var BROWSER = m6; 51 | 52 | // Initialise 53 | BROWSER.init(VIEWER, CORELINK, null); 54 | }); 55 | } -------------------------------------------------------------------------------- /pub/ico/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/ico/favicon.ico -------------------------------------------------------------------------------- /pub/img/button_background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/button_background.png -------------------------------------------------------------------------------- /pub/img/cancel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/cancel.png -------------------------------------------------------------------------------- /pub/img/close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/close.png -------------------------------------------------------------------------------- /pub/img/create.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/create.png -------------------------------------------------------------------------------- /pub/img/decrease.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/decrease.png -------------------------------------------------------------------------------- /pub/img/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/default.png -------------------------------------------------------------------------------- /pub/img/default_avatar.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/default_avatar.png -------------------------------------------------------------------------------- /pub/img/delete.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/delete.png -------------------------------------------------------------------------------- /pub/img/edit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/edit.png -------------------------------------------------------------------------------- /pub/img/increase.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/increase.png -------------------------------------------------------------------------------- /pub/img/loading.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/loading.gif -------------------------------------------------------------------------------- /pub/img/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/logo.png -------------------------------------------------------------------------------- /pub/img/mask.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/mask.jpg -------------------------------------------------------------------------------- /pub/img/navHome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/navHome.png -------------------------------------------------------------------------------- /pub/img/navPrep.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/navPrep.png -------------------------------------------------------------------------------- /pub/img/navProfile.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/navProfile.png -------------------------------------------------------------------------------- /pub/img/navSearch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/navSearch.png -------------------------------------------------------------------------------- /pub/img/settings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/settings.png -------------------------------------------------------------------------------- /pub/img/sprites/default.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/sprites/default.png -------------------------------------------------------------------------------- /pub/img/sprites/orb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/sprites/orb.png -------------------------------------------------------------------------------- /pub/img/sprites/ring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/sprites/ring.png -------------------------------------------------------------------------------- /pub/img/sprites/shell.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/img/sprites/shell.png -------------------------------------------------------------------------------- /pub/index.dev.html: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | Holomap Proton (Development Mode) 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 57 | 58 | 59 | 60 | 63 | 64 | 65 | 66 | 67 | 68 |
69 |
70 | 71 | 72 |
73 | 74 |
75 | Close 76 |

Login to Holomap

77 | 93 |
94 | 95 |
96 | Close 97 |

Join Holomap

98 | 121 |
122 | 123 |
124 | 125 |
126 | 127 |
128 | 129 | 130 |
131 | 132 |
133 | 134 |
135 | 136 | 137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 | 145 |
146 | 147 | 150 | 151 | 154 | 155 |
156 |
157 | 158 |
159 | © 2021 Holomap.orgTerms of UsePrivacy PolicySource 160 |
161 | 162 |
163 | 164 | 165 | 166 | 167 |
168 |
169 | 170 | -------------------------------------------------------------------------------- /pub/index.html: -------------------------------------------------------------------------------- 1 | 20 | 21 | 22 | Holomap Proton 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 56 | 57 | 58 | 59 | 62 | 63 | 64 | 65 | 66 | 67 |
68 |
69 | 70 | 71 |
72 | 73 |
74 | Close 75 |

Login to Holomap

76 | 92 |
93 | 94 |
95 | Close 96 |

Join Holomap

97 | 120 |
121 | 122 |
123 | 124 |
125 | 126 |
127 | 128 | 129 |
130 | 131 |
132 | 133 |
134 | 135 | 136 |
137 |
138 |
139 |
140 |
141 |
142 |
143 |
144 | 145 | 148 | 149 | 152 | 153 |
154 |
155 | 156 |
157 | © 2021 Holomap.orgTerms of UsePrivacy PolicySource 158 |
159 | 160 |
161 | 162 | 163 | 164 | 165 |
166 |
167 | 168 | -------------------------------------------------------------------------------- /pub/js/holomap.infopanel.commentsResizer.js: -------------------------------------------------------------------------------- 1 | /* 2 | 3 | Holomap - Real-time collaborative holonic mapping platform 4 | Copyright (C) 2020 Chris Larcombe 5 | 6 | This program is free software: you can redistribute it and/or modify 7 | it under the terms of the GNU Affero General Public License as 8 | published by the Free Software Foundation, either version 3 of the 9 | License, or (at your option) any later version. 10 | 11 | This program is distributed in the hope that it will be useful, 12 | but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 | GNU Affero General Public License for more details. 15 | 16 | You should have received a copy of the GNU Affero General Public License 17 | along with this program. If not, see . 18 | 19 | */ 20 | 21 | (function(){ 22 | 23 | var RESIZER = {}; 24 | var root = this; 25 | 26 | var defaultHeight; 27 | var minSize; 28 | var onPanelResized; 29 | 30 | RESIZER.init = function(_defaultHeight, _minSize, opr) 31 | { 32 | defaultHeight = _defaultHeight; 33 | minSize = _minSize; 34 | onPanelResized = opr; 35 | 36 | ///////////////////////////////////////////////////////////////////////// 37 | // Generic Resize by Erik Arvidsson // 38 | // // 39 | // You may use this script as long as this disclaimer is remained. // 40 | // See www.dtek.chalmers.se/~d96erik/dhtml/ for mor info // 41 | // // 42 | // How to use this script! // 43 | // Link the script in the HEAD and create a container (DIV, preferable // 44 | // absolute positioned) and add the class="resizeMe" to it. // 45 | ///////////////////////////////////////////////////////////////////////// 46 | 47 | // Thank you to Erik Avidsson - this is a modified version of his script. - Chris. 48 | 49 | var theobject; 50 | 51 | 52 | RESIZER.maximise = function() 53 | { 54 | document.getElementById('infoPanelInfoContentAttributes').style.height = "0px"; 55 | document.getElementById('infoPanelInfoContentComments').style.height = (window.innerHeight - 230) + "px"; 56 | } 57 | RESIZER.minimise = function() 58 | { 59 | document.getElementById('infoPanelInfoContentAttributes').style.height = window.innerHeight - 75 + "px"; 60 | } 61 | 62 | RESIZER.minimise(); 63 | 64 | RESIZER.invertMinMax = function() 65 | { 66 | if (document.getElementById('infoPanelInfoContentAttributes').style.height == "0px") 67 | RESIZER.minimise(); 68 | else 69 | RESIZER.maximise(); 70 | } 71 | 72 | minMaxCommentsAndCocreation = RESIZER.invertMinMax; 73 | 74 | RESIZER.displaySpecificComment = function() 75 | { 76 | document.getElementById('infoPanelInfoContentAttributes').style.height = "130px"; 77 | document.getElementById('infoPanelInfoContentComments').style.height = (window.innerHeight - 360) + "px"; 78 | } 79 | 80 | function resizeObject() { 81 | this.el = null; //pointer to the object 82 | this.dir = ""; //type of current resize (n, s, e, w, ne, nw, se, sw) 83 | this.grabx = null; //Some useful values 84 | this.graby = null; 85 | this.width = null; 86 | this.height = null; 87 | this.left = null; 88 | this.top = null; 89 | } 90 | 91 | //Find out what kind of resize! Return a string inlcluding the directions 92 | function getDirection(el) { 93 | var xPos, offset, dir; 94 | dir = ""; 95 | yPos = window.event.offsetY; 96 | offset = 20; //The distance from the edge in pixels 97 | if (yPos. 18 | 19 | */ 20 | 21 | (function(){ 22 | 23 | var RESIZER = {}; 24 | var root = this; 25 | 26 | RESIZER.el = null; 27 | var defaultWidth; 28 | 29 | var minSize; 30 | var onPanelResized; 31 | 32 | RESIZER.init = function(_defaultWidth, _minSize, opr) 33 | { 34 | defaultWidth = _defaultWidth; 35 | minSize = _minSize; 36 | onPanelResized = opr; 37 | 38 | ///////////////////////////////////////////////////////////////////////// 39 | // Generic Resize by Erik Arvidsson // 40 | // // 41 | // You may use this script as long as this disclaimer is remained. // 42 | // See www.dtek.chalmers.se/~d96erik/dhtml/ for mor info // 43 | // // 44 | // How to use this script! // 45 | // Link the script in the HEAD and create a container (DIV, preferable // 46 | // absolute positioned) and add the class="resizeMe" to it. // 47 | ///////////////////////////////////////////////////////////////////////// 48 | 49 | // Thank you to Erik Avidsson - this is a modified version of his script. - Chris. 50 | 51 | var theobject; 52 | 53 | function resizeObject() { 54 | this.el = null; //pointer to the object 55 | this.dir = ""; //type of current resize (n, s, e, w, ne, nw, se, sw) 56 | this.grabx = null; //Some useful values 57 | this.graby = null; 58 | this.width = null; 59 | this.height = null; 60 | this.left = null; 61 | this.top = null; 62 | } 63 | 64 | //Find out what kind of resize! Return a string inlcluding the directions 65 | function getDirection(el) { 66 | var xPos, offset, dir; 67 | dir = ""; 68 | xPos = window.event.offsetX; 69 | offset = 20; //The distance from the edge in pixels 70 | if (xPos. 18 | 19 | */ 20 | 21 | (function(){ 22 | 23 | var TEMPLATE = {}; 24 | var root = this; 25 | 26 | //// 27 | 28 | 29 | // Functions 30 | 31 | TEMPLATE.init = function() 32 | { 33 | console.log("TEMPLATE init") 34 | } 35 | 36 | //// 37 | 38 | if (typeof exports !== 'undefined') { 39 | if (typeof module !== 'undefined' && module.exports) { 40 | exports = module.exports = TEMPLATE; 41 | } 42 | exports.TEMPLATE = TEMPLATE; 43 | } else if (typeof define !== 'undefined' && define.amd) { 44 | define(TEMPLATE); 45 | } else { 46 | root.TEMPLATE = TEMPLATE; 47 | } 48 | 49 | 50 | }).call(this); -------------------------------------------------------------------------------- /pub/lib/ColorPropsPlugin.min.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * VERSION: beta 1.3.0 3 | * DATE: 2015-02-06 4 | * UPDATES AND DOCS AT: http://greensock.com 5 | * 6 | * @license Copyright (c) 2008-2015, GreenSock. All rights reserved. 7 | * This work is subject to the terms at http://greensock.com/standard-license or for 8 | * Club GreenSock members, the software agreement that was issued with your membership. 9 | * 10 | * @author: Jack Doyle, jack@greensock.com 11 | **/ 12 | var _gsScope="undefined"!=typeof module&&module.exports&&"undefined"!=typeof global?global:this||window;(_gsScope._gsQueue||(_gsScope._gsQueue=[])).push(function(){"use strict";var t=/(\d|\.)+/g,e={aqua:[0,255,255],lime:[0,255,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,255],navy:[0,0,128],white:[255,255,255],fuchsia:[255,0,255],olive:[128,128,0],yellow:[255,255,0],orange:[255,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[255,0,0],pink:[255,192,203],cyan:[0,255,255],transparent:[255,255,255,0]},i=function(t,e,i){return t=0>t?t+1:t>1?t-1:t,0|255*(1>6*t?e+6*(i-e)*t:.5>t?i:2>3*t?e+6*(i-e)*(2/3-t):e)+.5},r=function(r){if(""===r||null==r||"none"===r)return e.transparent;if(e[r])return e[r];if("number"==typeof r)return[r>>16,255&r>>8,255&r];if("#"===r.charAt(0))return 4===r.length&&(r="#"+r.charAt(1)+r.charAt(1)+r.charAt(2)+r.charAt(2)+r.charAt(3)+r.charAt(3)),r=parseInt(r.substr(1),16),[r>>16,255&r>>8,255&r];if("hsl"===r.substr(0,3)){r=r.match(t);var s=Number(r[0])%360/360,n=Number(r[1])/100,a=Number(r[2])/100,o=.5>=a?a*(n+1):a+n-a*n,l=2*a-o;return r.length>3&&(r[3]=Number(r[3])),r[0]=i(s+1/3,l,o),r[1]=i(s,l,o),r[2]=i(s-1/3,l,o),r}return r.match(t)||e.transparent};_gsScope._gsDefine.plugin({propName:"colorProps",version:"1.3.0",priority:-1,API:2,init:function(t,e){this._target=t;var i,s,n,a;this.numFormat="number"===e.format;for(i in e)"format"!==i&&(n=r(e[i]),this._firstPT=a={_next:this._firstPT,p:i,f:"function"==typeof t[i],n:i,r:!1},s=r(a.f?t[i.indexOf("set")||"function"!=typeof t["get"+i.substr(3)]?i:"get"+i.substr(3)]():t[i]),a.s=Number(s[0]),a.c=Number(n[0])-a.s,a.gs=Number(s[1]),a.gc=Number(n[1])-a.gs,a.bs=Number(s[2]),a.bc=Number(n[2])-a.bs,(a.rgba=s.length>3||n.length>3)&&(a.as=4>s.length?1:Number(s[3]),a.ac=(4>n.length?1:Number(n[3]))-a.as),a._next&&(a._next._prev=a));return!0},set:function(t){for(var e,i=this._firstPT;i;)e=this.numFormat?i.s+t*i.c<<16|i.gs+t*i.gc<<8|i.bs+t*i.bc:(i.rgba?"rgba(":"rgb(")+(i.s+t*i.c>>0)+", "+(i.gs+t*i.gc>>0)+", "+(i.bs+t*i.bc>>0)+(i.rgba?", "+(i.as+t*i.ac):"")+")",i.f?this._target[i.p](e):this._target[i.p]=e,i=i._next}})}),_gsScope._gsDefine&&_gsScope._gsQueue.pop()(); -------------------------------------------------------------------------------- /pub/lib/active-line.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | // Because sometimes you need to style the cursor's line. 5 | // 6 | // Adds an option 'styleActiveLine' which, when enabled, gives the 7 | // active line's wrapping
the CSS class "CodeMirror-activeline", 8 | // and gives its background
the class "CodeMirror-activeline-background". 9 | 10 | (function(mod) { 11 | if (typeof exports == "object" && typeof module == "object") // CommonJS 12 | mod(require("../../lib/codemirror")); 13 | else if (typeof define == "function" && define.amd) // AMD 14 | define(["../../lib/codemirror"], mod); 15 | else // Plain browser env 16 | mod(CodeMirror); 17 | })(function(CodeMirror) { 18 | "use strict"; 19 | var WRAP_CLASS = "CodeMirror-activeline"; 20 | var BACK_CLASS = "CodeMirror-activeline-background"; 21 | 22 | CodeMirror.defineOption("styleActiveLine", false, function(cm, val, old) { 23 | var prev = old && old != CodeMirror.Init; 24 | if (val && !prev) { 25 | cm.state.activeLines = []; 26 | updateActiveLines(cm, cm.listSelections()); 27 | cm.on("beforeSelectionChange", selectionChange); 28 | } else if (!val && prev) { 29 | cm.off("beforeSelectionChange", selectionChange); 30 | clearActiveLines(cm); 31 | delete cm.state.activeLines; 32 | } 33 | }); 34 | 35 | function clearActiveLines(cm) { 36 | for (var i = 0; i < cm.state.activeLines.length; i++) { 37 | cm.removeLineClass(cm.state.activeLines[i], "wrap", WRAP_CLASS); 38 | cm.removeLineClass(cm.state.activeLines[i], "background", BACK_CLASS); 39 | } 40 | } 41 | 42 | function sameArray(a, b) { 43 | if (a.length != b.length) return false; 44 | for (var i = 0; i < a.length; i++) 45 | if (a[i] != b[i]) return false; 46 | return true; 47 | } 48 | 49 | function updateActiveLines(cm, ranges) { 50 | var active = []; 51 | for (var i = 0; i < ranges.length; i++) { 52 | var range = ranges[i]; 53 | if (!range.empty()) continue; 54 | var line = cm.getLineHandleVisualStart(range.head.line); 55 | if (active[active.length - 1] != line) active.push(line); 56 | } 57 | if (sameArray(cm.state.activeLines, active)) return; 58 | cm.operation(function() { 59 | clearActiveLines(cm); 60 | for (var i = 0; i < active.length; i++) { 61 | cm.addLineClass(active[i], "wrap", WRAP_CLASS); 62 | cm.addLineClass(active[i], "background", BACK_CLASS); 63 | } 64 | cm.state.activeLines = active; 65 | }); 66 | } 67 | 68 | function selectionChange(cm, sel) { 69 | updateActiveLines(cm, sel.ranges); 70 | } 71 | }); 72 | -------------------------------------------------------------------------------- /pub/lib/closebrackets.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | var DEFAULT_BRACKETS = "()[]{}''\"\""; 13 | var DEFAULT_EXPLODE_ON_ENTER = "[]{}"; 14 | var SPACE_CHAR_REGEX = /\s/; 15 | 16 | var Pos = CodeMirror.Pos; 17 | 18 | CodeMirror.defineOption("autoCloseBrackets", false, function(cm, val, old) { 19 | if (old != CodeMirror.Init && old) 20 | cm.removeKeyMap("autoCloseBrackets"); 21 | if (!val) return; 22 | var pairs = DEFAULT_BRACKETS, explode = DEFAULT_EXPLODE_ON_ENTER; 23 | if (typeof val == "string") pairs = val; 24 | else if (typeof val == "object") { 25 | if (val.pairs != null) pairs = val.pairs; 26 | if (val.explode != null) explode = val.explode; 27 | } 28 | var map = buildKeymap(pairs); 29 | if (explode) map.Enter = buildExplodeHandler(explode); 30 | cm.addKeyMap(map); 31 | }); 32 | 33 | function charsAround(cm, pos) { 34 | var str = cm.getRange(Pos(pos.line, pos.ch - 1), 35 | Pos(pos.line, pos.ch + 1)); 36 | return str.length == 2 ? str : null; 37 | } 38 | 39 | // Project the token type that will exists after the given char is 40 | // typed, and use it to determine whether it would cause the start 41 | // of a string token. 42 | function enteringString(cm, pos, ch) { 43 | var line = cm.getLine(pos.line); 44 | var token = cm.getTokenAt(pos); 45 | if (/\bstring2?\b/.test(token.type)) return false; 46 | var stream = new CodeMirror.StringStream(line.slice(0, pos.ch) + ch + line.slice(pos.ch), 4); 47 | stream.pos = stream.start = token.start; 48 | for (;;) { 49 | var type1 = cm.getMode().token(stream, token.state); 50 | if (stream.pos >= pos.ch + 1) return /\bstring2?\b/.test(type1); 51 | stream.start = stream.pos; 52 | } 53 | } 54 | 55 | function buildKeymap(pairs) { 56 | var map = { 57 | name : "autoCloseBrackets", 58 | Backspace: function(cm) { 59 | if (cm.getOption("disableInput")) return CodeMirror.Pass; 60 | var ranges = cm.listSelections(); 61 | for (var i = 0; i < ranges.length; i++) { 62 | if (!ranges[i].empty()) return CodeMirror.Pass; 63 | var around = charsAround(cm, ranges[i].head); 64 | if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass; 65 | } 66 | for (var i = ranges.length - 1; i >= 0; i--) { 67 | var cur = ranges[i].head; 68 | cm.replaceRange("", Pos(cur.line, cur.ch - 1), Pos(cur.line, cur.ch + 1)); 69 | } 70 | } 71 | }; 72 | var closingBrackets = ""; 73 | for (var i = 0; i < pairs.length; i += 2) (function(left, right) { 74 | if (left != right) closingBrackets += right; 75 | map["'" + left + "'"] = function(cm) { 76 | if (cm.getOption("disableInput")) return CodeMirror.Pass; 77 | var ranges = cm.listSelections(), type, next; 78 | for (var i = 0; i < ranges.length; i++) { 79 | var range = ranges[i], cur = range.head, curType; 80 | var next = cm.getRange(cur, Pos(cur.line, cur.ch + 1)); 81 | if (!range.empty()) { 82 | curType = "surround"; 83 | } else if (left == right && next == right) { 84 | if (cm.getRange(cur, Pos(cur.line, cur.ch + 3)) == left + left + left) 85 | curType = "skipThree"; 86 | else 87 | curType = "skip"; 88 | } else if (left == right && cur.ch > 1 && 89 | cm.getRange(Pos(cur.line, cur.ch - 2), cur) == left + left && 90 | (cur.ch <= 2 || cm.getRange(Pos(cur.line, cur.ch - 3), Pos(cur.line, cur.ch - 2)) != left)) { 91 | curType = "addFour"; 92 | } else if (left == '"' || left == "'") { 93 | if (!CodeMirror.isWordChar(next) && enteringString(cm, cur, left)) curType = "both"; 94 | else return CodeMirror.Pass; 95 | } else if (cm.getLine(cur.line).length == cur.ch || closingBrackets.indexOf(next) >= 0 || SPACE_CHAR_REGEX.test(next)) { 96 | curType = "both"; 97 | } else { 98 | return CodeMirror.Pass; 99 | } 100 | if (!type) type = curType; 101 | else if (type != curType) return CodeMirror.Pass; 102 | } 103 | 104 | cm.operation(function() { 105 | if (type == "skip") { 106 | cm.execCommand("goCharRight"); 107 | } else if (type == "skipThree") { 108 | for (var i = 0; i < 3; i++) 109 | cm.execCommand("goCharRight"); 110 | } else if (type == "surround") { 111 | var sels = cm.getSelections(); 112 | for (var i = 0; i < sels.length; i++) 113 | sels[i] = left + sels[i] + right; 114 | cm.replaceSelections(sels, "around"); 115 | } else if (type == "both") { 116 | cm.replaceSelection(left + right, null); 117 | cm.execCommand("goCharLeft"); 118 | } else if (type == "addFour") { 119 | cm.replaceSelection(left + left + left + left, "before"); 120 | cm.execCommand("goCharRight"); 121 | } 122 | }); 123 | }; 124 | if (left != right) map["'" + right + "'"] = function(cm) { 125 | var ranges = cm.listSelections(); 126 | for (var i = 0; i < ranges.length; i++) { 127 | var range = ranges[i]; 128 | if (!range.empty() || 129 | cm.getRange(range.head, Pos(range.head.line, range.head.ch + 1)) != right) 130 | return CodeMirror.Pass; 131 | } 132 | cm.execCommand("goCharRight"); 133 | }; 134 | })(pairs.charAt(i), pairs.charAt(i + 1)); 135 | return map; 136 | } 137 | 138 | function buildExplodeHandler(pairs) { 139 | return function(cm) { 140 | if (cm.getOption("disableInput")) return CodeMirror.Pass; 141 | var ranges = cm.listSelections(); 142 | for (var i = 0; i < ranges.length; i++) { 143 | if (!ranges[i].empty()) return CodeMirror.Pass; 144 | var around = charsAround(cm, ranges[i].head); 145 | if (!around || pairs.indexOf(around) % 2 != 0) return CodeMirror.Pass; 146 | } 147 | cm.operation(function() { 148 | cm.replaceSelection("\n\n", null); 149 | cm.execCommand("goCharLeft"); 150 | ranges = cm.listSelections(); 151 | for (var i = 0; i < ranges.length; i++) { 152 | var line = ranges[i].head.line; 153 | cm.indentLine(line, null, true); 154 | cm.indentLine(line + 1, null, true); 155 | } 156 | }); 157 | }; 158 | } 159 | }); 160 | -------------------------------------------------------------------------------- /pub/lib/empty.js: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/holoweb/holomap-proton/7e240d5027e9649a369d3857b617763bbd0f09ce/pub/lib/empty.js -------------------------------------------------------------------------------- /pub/lib/jquery.datepair.js: -------------------------------------------------------------------------------- 1 | /*! 2 | * datepair.js v0.4.14 - A javascript plugin for intelligently selecting date and time ranges inspired by Google Calendar. 3 | * Copyright (c) 2015 Jon Thornton - http://jonthornton.github.com/Datepair.js 4 | * License: MIT 5 | */ 6 | 7 | (function($) { 8 | 9 | if(!$) { 10 | return; 11 | } 12 | 13 | //////////// 14 | // Plugin // 15 | //////////// 16 | 17 | $.fn.datepair = function(option) { 18 | var out; 19 | this.each(function() { 20 | var $this = $(this); 21 | var data = $this.data('datepair'); 22 | var options = typeof option === 'object' && option; 23 | 24 | if (!data) { 25 | data = new Datepair(this, options); 26 | $this.data('datepair', data); 27 | } 28 | 29 | if (typeof option === 'string') { 30 | out = data[option](); 31 | } 32 | }); 33 | 34 | return out || this; 35 | }; 36 | 37 | ////////////// 38 | // Data API // 39 | ////////////// 40 | 41 | $('[data-datepair]').each(function() { 42 | var $this = $(this); 43 | $this.datepair($this.data()); 44 | }); 45 | 46 | }(window.Zepto || window.jQuery)); -------------------------------------------------------------------------------- /pub/lib/jquery.tinymce.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0&&(c=h.get(d[0].id)))return c.getContent()}function d(a){var b=null;return a&&a.id&&g.tinymce&&(b=h.get(a.id)),b}function e(a){return!!(a&&a.length&&g.tinymce&&a.is(":tinymce"))}var i={};f.each(["text","html","val"],function(a,g){var h=i[g]=f.fn[g],j="text"===g;f.fn[g]=function(a){var g=this;if(!e(g))return h.apply(g,arguments);if(a!==c)return b.call(g.filter(":tinymce"),a),h.apply(g.not(":tinymce"),arguments),g;var i="",k=arguments;return(j?g:g.eq(0)).each(function(a,b){var c=d(b);i+=c?j?c.getContent().replace(/<(?:"[^"]*"|'[^']*'|[^'">])*>/g,""):c.getContent({save:!0}):h.apply(f(b),k)}),i}}),f.each(["append","prepend"],function(a,b){var g=i[b]=f.fn[b],h="prepend"===b;f.fn[b]=function(a){var b=this;return e(b)?a!==c?("string"==typeof a&&b.filter(":tinymce").each(function(b,c){var e=d(c);e&&e.setContent(h?a+e.getContent():e.getContent()+a)}),g.apply(b.not(":tinymce"),arguments),b):void 0:g.apply(b,arguments)}}),f.each(["remove","replaceWith","replaceAll","empty"],function(b,c){var d=i[c]=f.fn[c];f.fn[c]=function(){return a.call(this,c),d.apply(this,arguments)}}),i.attr=f.fn.attr,f.fn.attr=function(a,g){var h=this,j=arguments;if(!a||"value"!==a||!e(h))return g!==c?i.attr.apply(h,j):i.attr.apply(h,j);if(g!==c)return b.call(h.filter(":tinymce"),g),i.attr.apply(h.not(":tinymce"),j),h;var k=h[0],l=d(k);return l?l.getContent({save:!0}):i.attr.apply(f(k),j)}}var c,d,e,f,g,h,i=[];g=a?a:window,h=g.tinymce,f=g.jQuery,f.fn.tinymce=function(a){function c(){var c=[],d=0;e||(b(),e=!0),m.each(function(b,e){var f,g=e.id,i=a.oninit;g||(e.id=g=h.DOM.uniqueId()),h.get(g)||(f=h.createEditor(g,a),c.push(f),f.on("init",function(){var a,b=i;m.css("visibility",""),i&&++d==c.length&&("string"==typeof b&&(a=b.indexOf(".")===-1?null:h.resolve(b.replace(/\.\w+$/,"")),b=h.resolve(b)),b.apply(a||h,c))}))}),f.each(c,function(a,b){b.render()})}var j,k,l,m=this,n="";if(!m.length)return m;if(!a)return g.tinymce?h.get(m[0].id):null;if(m.css("visibility","hidden"),g.tinymce||d||!(j=a.script_url))1===d?i.push(c):c();else{d=1,k=j.substring(0,j.lastIndexOf("/")),j.indexOf(".min")!=-1&&(n=".min"),g.tinymce=g.tinyMCEPreInit||{base:k,suffix:n},j.indexOf("gzip")!=-1&&(l=a.language||"en",j=j+(/\?/.test(j)?"&":"?")+"js=true&core=true&suffix="+escape(n)+"&themes="+escape(a.theme||"modern")+"&plugins="+escape(a.plugins||"")+"&languages="+(l||""),g.tinyMCE_GZ||(g.tinyMCE_GZ={start:function(){function b(a){h.ScriptLoader.markDone(h.baseURI.toAbsolute(a))}b("langs/"+l+".js"),b("themes/"+a.theme+"/theme"+n+".js"),b("themes/"+a.theme+"/langs/"+l+".js"),f.each(a.plugins.split(","),function(a,c){c&&(b("plugins/"+c+"/plugin"+n+".js"),b("plugins/"+c+"/langs/"+l+".js"))})},end:function(){}}));var o=document.createElement("script");o.type="text/javascript",o.onload=o.onreadystatechange=function(b){b=b||window.event,2===d||"load"!=b.type&&!/complete|loaded/.test(o.readyState)||(h.dom.Event.domLoaded=1,d=2,a.script_loaded&&a.script_loaded(),c(),f.each(i,function(a,b){b()}))},o.src=j,document.body.appendChild(o)}return m},f.extend(f.expr[":"],{tinymce:function(a){var b;return!!(a.id&&"tinymce"in g&&(b=h.get(a.id),b&&b.editorManager===h))}})}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/langs/readme.md: -------------------------------------------------------------------------------- 1 | This is where language files should be placed. 2 | 3 | Please DO NOT translate these directly use this service: https://www.transifex.com/projects/p/tinymce/ 4 | -------------------------------------------------------------------------------- /pub/lib/matchbrackets.js: -------------------------------------------------------------------------------- 1 | // CodeMirror, copyright (c) by Marijn Haverbeke and others 2 | // Distributed under an MIT license: http://codemirror.net/LICENSE 3 | 4 | (function(mod) { 5 | if (typeof exports == "object" && typeof module == "object") // CommonJS 6 | mod(require("../../lib/codemirror")); 7 | else if (typeof define == "function" && define.amd) // AMD 8 | define(["../../lib/codemirror"], mod); 9 | else // Plain browser env 10 | mod(CodeMirror); 11 | })(function(CodeMirror) { 12 | var ie_lt8 = /MSIE \d/.test(navigator.userAgent) && 13 | (document.documentMode == null || document.documentMode < 8); 14 | 15 | var Pos = CodeMirror.Pos; 16 | 17 | var matching = {"(": ")>", ")": "(<", "[": "]>", "]": "[<", "{": "}>", "}": "{<"}; 18 | 19 | function findMatchingBracket(cm, where, strict, config) { 20 | var line = cm.getLineHandle(where.line), pos = where.ch - 1; 21 | var match = (pos >= 0 && matching[line.text.charAt(pos)]) || matching[line.text.charAt(++pos)]; 22 | if (!match) return null; 23 | var dir = match.charAt(1) == ">" ? 1 : -1; 24 | if (strict && (dir > 0) != (pos == where.ch)) return null; 25 | var style = cm.getTokenTypeAt(Pos(where.line, pos + 1)); 26 | 27 | var found = scanForBracket(cm, Pos(where.line, pos + (dir > 0 ? 1 : 0)), dir, style || null, config); 28 | if (found == null) return null; 29 | return {from: Pos(where.line, pos), to: found && found.pos, 30 | match: found && found.ch == match.charAt(0), forward: dir > 0}; 31 | } 32 | 33 | // bracketRegex is used to specify which type of bracket to scan 34 | // should be a regexp, e.g. /[[\]]/ 35 | // 36 | // Note: If "where" is on an open bracket, then this bracket is ignored. 37 | // 38 | // Returns false when no bracket was found, null when it reached 39 | // maxScanLines and gave up 40 | function scanForBracket(cm, where, dir, style, config) { 41 | var maxScanLen = (config && config.maxScanLineLength) || 10000; 42 | var maxScanLines = (config && config.maxScanLines) || 1000; 43 | 44 | var stack = []; 45 | var re = config && config.bracketRegex ? config.bracketRegex : /[(){}[\]]/; 46 | var lineEnd = dir > 0 ? Math.min(where.line + maxScanLines, cm.lastLine() + 1) 47 | : Math.max(cm.firstLine() - 1, where.line - maxScanLines); 48 | for (var lineNo = where.line; lineNo != lineEnd; lineNo += dir) { 49 | var line = cm.getLine(lineNo); 50 | if (!line) continue; 51 | var pos = dir > 0 ? 0 : line.length - 1, end = dir > 0 ? line.length : -1; 52 | if (line.length > maxScanLen) continue; 53 | if (lineNo == where.line) pos = where.ch - (dir < 0 ? 1 : 0); 54 | for (; pos != end; pos += dir) { 55 | var ch = line.charAt(pos); 56 | if (re.test(ch) && (style === undefined || cm.getTokenTypeAt(Pos(lineNo, pos + 1)) == style)) { 57 | var match = matching[ch]; 58 | if ((match.charAt(1) == ">") == (dir > 0)) stack.push(ch); 59 | else if (!stack.length) return {pos: Pos(lineNo, pos), ch: ch}; 60 | else stack.pop(); 61 | } 62 | } 63 | } 64 | return lineNo - dir == (dir > 0 ? cm.lastLine() : cm.firstLine()) ? false : null; 65 | } 66 | 67 | function matchBrackets(cm, autoclear, config) { 68 | // Disable brace matching in long lines, since it'll cause hugely slow updates 69 | var maxHighlightLen = cm.state.matchBrackets.maxHighlightLineLength || 1000; 70 | var marks = [], ranges = cm.listSelections(); 71 | for (var i = 0; i < ranges.length; i++) { 72 | var match = ranges[i].empty() && findMatchingBracket(cm, ranges[i].head, false, config); 73 | if (match && cm.getLine(match.from.line).length <= maxHighlightLen) { 74 | var style = match.match ? "CodeMirror-matchingbracket" : "CodeMirror-nonmatchingbracket"; 75 | marks.push(cm.markText(match.from, Pos(match.from.line, match.from.ch + 1), {className: style})); 76 | if (match.to && cm.getLine(match.to.line).length <= maxHighlightLen) 77 | marks.push(cm.markText(match.to, Pos(match.to.line, match.to.ch + 1), {className: style})); 78 | } 79 | } 80 | 81 | if (marks.length) { 82 | // Kludge to work around the IE bug from issue #1193, where text 83 | // input stops going to the textare whever this fires. 84 | if (ie_lt8 && cm.state.focused) cm.display.input.focus(); 85 | 86 | var clear = function() { 87 | cm.operation(function() { 88 | for (var i = 0; i < marks.length; i++) marks[i].clear(); 89 | }); 90 | }; 91 | if (autoclear) setTimeout(clear, 800); 92 | else return clear; 93 | } 94 | } 95 | 96 | var currentlyHighlighted = null; 97 | function doMatchBrackets(cm) { 98 | cm.operation(function() { 99 | if (currentlyHighlighted) {currentlyHighlighted(); currentlyHighlighted = null;} 100 | currentlyHighlighted = matchBrackets(cm, false, cm.state.matchBrackets); 101 | }); 102 | } 103 | 104 | CodeMirror.defineOption("matchBrackets", false, function(cm, val, old) { 105 | if (old && old != CodeMirror.Init) 106 | cm.off("cursorActivity", doMatchBrackets); 107 | if (val) { 108 | cm.state.matchBrackets = typeof val == "object" ? val : {}; 109 | cm.on("cursorActivity", doMatchBrackets); 110 | } 111 | }); 112 | 113 | CodeMirror.defineExtension("matchBrackets", function() {matchBrackets(this, true);}); 114 | CodeMirror.defineExtension("findMatchingBracket", function(pos, strict, config){ 115 | return findMatchingBracket(this, pos, strict, config); 116 | }); 117 | CodeMirror.defineExtension("scanForBracket", function(pos, dir, style, config){ 118 | return scanForBracket(this, pos, dir, style, config); 119 | }); 120 | }); 121 | -------------------------------------------------------------------------------- /pub/lib/plugins/advlist/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0&&f[0].nodeName===c)})}};j(a,"lists")&&(a.addCommand("ApplyUnorderedListStyle",function(a,b){f("UL",b["list-style-type"])}),a.addCommand("ApplyOrderedListStyle",function(a,b){f("OL",b["list-style-type"])}),a.addButton("numlist",{type:h.length>0?"splitbutton":"button",tooltip:"Numbered list",menu:h,onPostRender:k("OL"),onshow:g,onselect:function(a){f("OL",a.control.settings.data)},onclick:function(){f("OL",!1)}}),a.addButton("bullist",{type:i.length>0?"splitbutton":"button",tooltip:"Bullet list",onPostRender:k("UL"),menu:i,onshow:g,onselect:function(a){f("UL",a.control.settings.data)},onclick:function(){f("UL",!1)}}))}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/anchor/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;ic&&(b=c)}return b}function e(a,b){1!=a.nodeType||a.hasChildNodes()?g.setStart(a,d(a,b)):g.setStartBefore(a)}function f(a,b){1!=a.nodeType||a.hasChildNodes()?g.setEnd(a,d(a,b)):g.setEndAfter(a)}var g,i,j,k,l,m,n,o,p,q;if("A"!=a.selection.getNode().tagName){if(g=a.selection.getRng(!0).cloneRange(),g.startOffset<5){if(o=g.endContainer.previousSibling,!o){if(!g.endContainer.firstChild||!g.endContainer.firstChild.nextSibling)return;o=g.endContainer.firstChild.nextSibling}if(p=o.length,e(o,p),f(o,p),g.endOffset<5)return;i=g.endOffset,k=o}else{if(k=g.endContainer,3!=k.nodeType&&k.firstChild){for(;3!=k.nodeType&&k.firstChild;)k=k.firstChild;3==k.nodeType&&(e(k,0),f(k,k.nodeValue.length))}i=1==g.endOffset?2:g.endOffset-1-b}j=i;do e(k,i>=2?i-2:0),f(k,i>=1?i-1:0),i-=1,q=g.toString();while(" "!=q&&""!==q&&160!=q.charCodeAt(0)&&i-2>=0&&q!=c);g.toString()==c||160==g.toString().charCodeAt(0)?(e(k,i),f(k,j),i+=1):0===g.startOffset?(e(k,0),f(k,j)):(e(k,i),f(k,j)),m=g.toString(),"."==m.charAt(m.length-1)&&f(k,j-1),m=g.toString(),n=m.match(h),n&&("www."==n[1]?n[1]="http://www.":/@$/.test(n[1])&&!/^mailto:/.test(n[1])&&(n[1]="mailto:"+n[1]),l=a.selection.getBookmark(),a.selection.setRng(g),a.execCommand("createlink",!1,n[1]+n[2]),a.settings.default_link_target&&a.dom.setAttrib(a.selection.getNode(),"target",a.settings.default_link_target),a.selection.moveToBookmark(l),a.nodeChanged())}}var g,h=/^(https?:\/\/|ssh:\/\/|ftp:\/\/|file:\/|www\.|(?:mailto:)?[A-Z0-9._%+\-]+@)(.+)$/i;return b.settings.autolink_pattern&&(h=b.settings.autolink_pattern),b.on("keydown",function(a){if(13==a.keyCode)return e(b)}),a.ie?void b.on("focus",function(){if(!g){g=!0;try{b.execCommand("AutoUrlDetect",!1,!0)}catch(a){}}}):(b.on("keypress",function(a){if(41==a.keyCode)return c(b)}),void b.on("keyup",function(a){if(32==a.keyCode)return d(b)}))}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/autoresize/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;ih.autoresize_min_height&&(m=n),h.autoresize_max_height&&n>h.autoresize_max_height?(m=h.autoresize_max_height,k.style.overflowY="auto",l.style.overflowY="auto"):(k.style.overflowY="hidden",l.style.overflowY="hidden",k.scrollTop=0),m!==i&&(g=m-i,e.setStyle(a.iframeElement,"height",m+"px"),i=m,b.webKit&&g<0&&f(d))}}function g(b,c,e){d.setEditorTimeout(a,function(){f({}),b--?g(b,c,e):e&&e()},c)}var h=a.settings,i=0;a.settings.inline||(h.autoresize_min_height=parseInt(a.getParam("autoresize_min_height",a.getElement().offsetHeight),10),h.autoresize_max_height=parseInt(a.getParam("autoresize_max_height",0),10),a.on("init",function(){var b,c;b=a.getParam("autoresize_overflow_padding",1),c=a.getParam("autoresize_bottom_margin",50),b!==!1&&a.dom.setStyles(a.getBody(),{paddingLeft:b,paddingRight:b}),c!==!1&&a.dom.setStyles(a.getBody(),{paddingBottom:c})}),a.on("nodechange setcontent keyup FullscreenStateChanged",f),a.getParam("autoresize_on_init",!0)&&a.on("init",function(){g(20,100,function(){g(5,1e3)})}),a.addCommand("mceAutoResize",f))}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/autosave/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;iq.autosave_retention)||(h(!1),!1)}function h(a){c.removeItem(o+"draft"),c.removeItem(o+"time"),a!==!1&&b.fire("RemoveDraft")}function i(){!n()&&b.isDirty()&&(c.setItem(o+"draft",b.getContent({format:"raw",no_events:!0})),c.setItem(o+"time",(new Date).getTime()),b.fire("StoreDraft"))}function j(){g()&&(b.setContent(c.getItem(o+"draft"),{format:"raw"}),b.fire("RestoreDraft"))}function k(){p||(setInterval(function(){b.removed||i()},q.autosave_interval),p=!0)}function l(){var a=this;a.disabled(!g()),b.on("StoreDraft RestoreDraft RemoveDraft",function(){a.disabled(!g())}),k()}function m(){b.undoManager.beforeChange(),j(),h(),b.undoManager.add()}function n(a){var c=b.settings.forced_root_block;return a=d.trim("undefined"==typeof a?b.getBody().innerHTML:a),""===a||new RegExp("^<"+c+"[^>]*>((\xa0| |[ \t]|]*>)+?|)|
$","i").test(a)}var o,p,q=b.settings;o=q.autosave_prefix||"tinymce-autosave-{path}{query}-{id}-",o=o.replace(/\{path\}/g,document.location.pathname),o=o.replace(/\{query\}/g,document.location.search),o=o.replace(/\{id\}/g,b.id),q.autosave_interval=f(q.autosave_interval,"30s"),q.autosave_retention=f(q.autosave_retention,"20m"),b.addButton("restoredraft",{title:"Restore last draft",onclick:m,onPostRender:l}),b.addMenuItem("restoredraft",{text:"Restore last draft",onclick:m,onPostRender:l,context:"file"}),b.settings.autosave_restore_when_empty!==!1&&(b.on("init",function(){g()&&n()&&j()}),b.on("saveContent",function(){h()})),e.onbeforeunload=a._beforeUnloadHandler,this.hasDraft=g,this.storeDraft=i,this.restoreDraft=j,this.removeDraft=h,this.isEmpty=n}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/bbcode/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i(.*?)<\/a>/gi,"[url=$1]$2[/url]"),c(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),c(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),c(/(.*?)<\/font>/gi,"[code][color=$1]$2[/color][/code]"),c(/(.*?)<\/font>/gi,"[quote][color=$1]$2[/color][/quote]"),c(/(.*?)<\/span>/gi,"[color=$1]$2[/color]"),c(/(.*?)<\/font>/gi,"[color=$1]$2[/color]"),c(/(.*?)<\/span>/gi,"[size=$1]$2[/size]"),c(/(.*?)<\/font>/gi,"$1"),c(//gi,"[img]$1[/img]"),c(/(.*?)<\/span>/gi,"[code]$1[/code]"),c(/(.*?)<\/span>/gi,"[quote]$1[/quote]"),c(/(.*?)<\/strong>/gi,"[code][b]$1[/b][/code]"),c(/(.*?)<\/strong>/gi,"[quote][b]$1[/b][/quote]"),c(/(.*?)<\/em>/gi,"[code][i]$1[/i][/code]"),c(/(.*?)<\/em>/gi,"[quote][i]$1[/i][/quote]"),c(/(.*?)<\/u>/gi,"[code][u]$1[/u][/code]"),c(/(.*?)<\/u>/gi,"[quote][u]$1[/u][/quote]"),c(/<\/(strong|b)>/gi,"[/b]"),c(/<(strong|b)>/gi,"[b]"),c(/<\/(em|i)>/gi,"[/i]"),c(/<(em|i)>/gi,"[i]"),c(/<\/u>/gi,"[/u]"),c(/(.*?)<\/span>/gi,"[u]$1[/u]"),c(//gi,"[u]"),c(/]*>/gi,"[quote]"),c(/<\/blockquote>/gi,"[/quote]"),c(/
/gi,"\n"),c(//gi,"\n"),c(/
/gi,"\n"),c(/

/gi,""),c(/<\/p>/gi,"\n"),c(/ |\u00a0/gi," "),c(/"/gi,'"'),c(/</gi,"<"),c(/>/gi,">"),c(/&/gi,"&"),a},_punbb_bbcode2html:function(a){function c(b,c){a=a.replace(b,c)}return a=b.trim(a),c(/\n/gi,"
"),c(/\[b\]/gi,""),c(/\[\/b\]/gi,""),c(/\[i\]/gi,""),c(/\[\/i\]/gi,""),c(/\[u\]/gi,""),c(/\[\/u\]/gi,""),c(/\[url=([^\]]+)\](.*?)\[\/url\]/gi,'$2'),c(/\[url\](.*?)\[\/url\]/gi,'$1'),c(/\[img\](.*?)\[\/img\]/gi,''),c(/\[color=(.*?)\](.*?)\[\/color\]/gi,'$2'),c(/\[code\](.*?)\[\/code\]/gi,'$1 '),c(/\[quote.*?\](.*?)\[\/quote\]/gi,'$1 '),a}}}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/code/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i code[class*="language-"], 58 | pre[class*="language-"] { 59 | background: #f5f2f0; 60 | } 61 | 62 | /* Inline code */ 63 | :not(pre) > code[class*="language-"] { 64 | padding: .1em; 65 | border-radius: .3em; 66 | } 67 | 68 | .token.comment, 69 | .token.prolog, 70 | .token.doctype, 71 | .token.cdata { 72 | color: slategray; 73 | } 74 | 75 | .token.punctuation { 76 | color: #999; 77 | } 78 | 79 | .namespace { 80 | opacity: .7; 81 | } 82 | 83 | .token.property, 84 | .token.tag, 85 | .token.boolean, 86 | .token.number, 87 | .token.constant, 88 | .token.symbol, 89 | .token.deleted { 90 | color: #905; 91 | } 92 | 93 | .token.selector, 94 | .token.attr-name, 95 | .token.string, 96 | .token.char, 97 | .token.builtin, 98 | .token.inserted { 99 | color: #690; 100 | } 101 | 102 | .token.operator, 103 | .token.entity, 104 | .token.url, 105 | .language-css .token.string, 106 | .style .token.string { 107 | color: #a67f59; 108 | background: hsla(0, 0%, 100%, .5); 109 | } 110 | 111 | .token.atrule, 112 | .token.attr-value, 113 | .token.keyword { 114 | color: #07a; 115 | } 116 | 117 | .token.function { 118 | color: #DD4A68; 119 | } 120 | 121 | .token.regex, 122 | .token.important, 123 | .token.variable { 124 | color: #e90; 125 | } 126 | 127 | .token.important, 128 | .token.bold { 129 | font-weight: bold; 130 | } 131 | .token.italic { 132 | font-style: italic; 133 | } 134 | 135 | .token.entity { 136 | cursor: help; 137 | } 138 | 139 | -------------------------------------------------------------------------------- /pub/lib/plugins/colorpicker/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i'}),a+=""}),a+=""}var e=[["cool","cry","embarassed","foot-in-mouth"],["frown","innocent","kiss","laughing"],["money-mouth","sealed","smile","surprised"],["tongue-out","undecided","wink","yell"]];a.addButton("emoticons",{type:"panelbutton",panel:{role:"application",autohide:!0,html:d,onclick:function(b){var c=a.dom.getParent(b.target,"a");c&&(a.insertContent(''+c.getAttribute('),this.hide())}},tooltip:"Emoticons"})}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/fullpage/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i"})}),c},c=function(a){return a.replace(//g,function(a,b){return unescape(b)})};return{protectHtml:b,unprotectHtml:c}}),g("0",["1","2","3","4","5","6"],function(a,b,c,d,e,f){return d.add("fullpage",function(d){function g(){var a=h();d.windowManager.open({title:"Document properties",data:a,defaults:{type:"textbox",size:40},body:[{name:"title",label:"Title"},{name:"keywords",label:"Keywords"},{name:"description",label:"Description"},{name:"robots",label:"Robots"},{name:"author",label:"Author"},{name:"docencoding",label:"Encoding"}],onSubmit:function(b){i(e.extend(a,b.data))}})}function h(){function a(a,b){var c=a.attr(b);return c||""}var b,c,f=j(),g={};return g.fontface=d.getParam("fullpage_default_fontface",""),g.fontsize=d.getParam("fullpage_default_fontsize",""),b=f.firstChild,7==b.type&&(g.xml_pi=!0,c=/encoding="([^"]+)"/.exec(b.value),c&&(g.docencoding=c[1])),b=f.getAll("#doctype")[0],b&&(g.doctype=""),b=f.getAll("title")[0],b&&b.firstChild&&(g.title=b.firstChild.value),p(f.getAll("meta"),function(a){var b,c=a.attr("name"),d=a.attr("http-equiv");c?g[c.toLowerCase()]=a.attr("content"):"Content-Type"==d&&(b=/charset\s*=\s*(.*)\s*/gi.exec(a.attr("content")),b&&(g.docencoding=b[1]))}),b=f.getAll("html")[0],b&&(g.langcode=a(b,"lang")||a(b,"xml:lang")),g.stylesheets=[],e.each(f.getAll("link"),function(a){"stylesheet"==a.attr("rel")&&g.stylesheets.push(a.attr("href"))}),b=f.getAll("body")[0],b&&(g.langdir=a(b,"dir"),g.style=a(b,"style"),g.visited_color=a(b,"vlink"),g.link_color=a(b,"link"),g.active_color=a(b,"alink")),g}function i(a){function f(a,b,c){a.attr(b,c?c:void 0)}function g(a){i.firstChild?i.insert(a,i.firstChild):i.append(a)}var h,i,k,l,m,o=d.dom;h=j(),i=h.getAll("head")[0],i||(l=h.getAll("html")[0],i=new b("head",1),l.firstChild?l.insert(i,l.firstChild,!0):l.append(i)),l=h.firstChild,a.xml_pi?(m='version="1.0"',a.docencoding&&(m+=' encoding="'+a.docencoding+'"'),7!=l.type&&(l=new b("xml",7),h.insert(l,h.firstChild,!0)),l.value=m):l&&7==l.type&&l.remove(),l=h.getAll("#doctype")[0],a.doctype?(l||(l=new b("#doctype",10),a.xml_pi?h.insert(l,h.firstChild):g(l)),l.value=a.doctype.substring(9,a.doctype.length-1)):l&&l.remove(),l=null,p(h.getAll("meta"),function(a){"Content-Type"==a.attr("http-equiv")&&(l=a)}),a.docencoding?(l||(l=new b("meta",1),l.attr("http-equiv","Content-Type"),l.shortEnded=!0,g(l)),l.attr("content","text/html; charset="+a.docencoding)):l&&l.remove(),l=h.getAll("title")[0],a.title?(l?l.empty():(l=new b("title",1),g(l)),l.append(new b("#text",3)).value=a.title):l&&l.remove(),p("keywords,description,author,copyright,robots".split(","),function(c){var d,e,f=h.getAll("meta"),i=a[c];for(d=0;d"))}function j(){return new a({validate:!1,root_name:"#document"}).parse(n)}function k(a){function b(a){return a.replace(/<\/?[A-Z]+/g,function(a){return a.toLowerCase()})}var c,g,h,i,k,m="",q=d.dom;if(!(a.selection||(h=f.protectHtml(d.settings.protect,a.content),"raw"==a.format&&n||a.source_view&&d.getParam("fullpage_hide_in_source_view")))){0!==h.length||a.source_view||(h=e.trim(n)+"\n"+e.trim(h)+"\n"+e.trim(o)),h=h.replace(/<(\/?)BODY/gi,"<$1body"),c=h.indexOf("",c),n=b(h.substring(0,c+1)),g=h.indexOf("\n"),i=j(),p(i.getAll("style"),function(a){a.firstChild&&(m+=a.firstChild.value)}),k=i.getAll("body")[0],k&&q.setAttribs(d.getBody(),{style:k.attr("style")||"",dir:k.attr("dir")||"",vLink:k.attr("vlink")||"",link:k.attr("link")||"",aLink:k.attr("alink")||""}),q.remove("fullpage_styles");var r=d.getDoc().getElementsByTagName("head")[0];m&&(q.add(r,"style",{id:"fullpage_styles"},m),k=q.get("fullpage_styles"),k.styleSheet&&(k.styleSheet.cssText=m));var s={};e.each(r.getElementsByTagName("link"),function(a){"stylesheet"==a.rel&&a.getAttribute("data-mce-fullpage")&&(s[a.href]=a)}),e.each(i.getAll("link"),function(a){var b=a.attr("href");return!b||(s[b]||"stylesheet"!=a.attr("rel")||q.add(r,"link",{rel:"stylesheet",text:"text/css",href:b,"data-mce-fullpage":"1"}),void delete s[b])}),e.each(s,function(a){a.parentNode.removeChild(a)})}}function l(){var a,b="",c="";return d.getParam("fullpage_default_xml_pi")&&(b+='\n'),b+=d.getParam("fullpage_default_doctype",""),b+="\n\n\n",(a=d.getParam("fullpage_default_title"))&&(b+=""+a+"\n"),(a=d.getParam("fullpage_default_encoding"))&&(b+='\n'),(a=d.getParam("fullpage_default_font_family"))&&(c+="font-family: "+a+";"),(a=d.getParam("fullpage_default_font_size"))&&(c+="font-size: "+a+";"),(a=d.getParam("fullpage_default_text_color"))&&(c+="color: "+a+";"),b+="\n\n"}function m(a){a.selection||a.source_view&&d.getParam("fullpage_hide_in_source_view")||(a.content=f.unprotectHtml(e.trim(n)+"\n"+e.trim(a.content)+"\n"+e.trim(o)))}var n,o,p=e.each;d.addCommand("mceFullPageProperties",g),d.addButton("fullpage",{title:"Document properties",cmd:"mceFullPageProperties"}),d.addMenuItem("fullpage",{text:"Document properties",cmd:"mceFullPageProperties",context:"file"}),d.on("BeforeSetContent",k),d.on("GetContent",m)}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/fullscreen/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i")}),a.addButton("hr",{icon:"hr",tooltip:"Horizontal line",cmd:"InsertHorizontalRule"}),a.addMenuItem("hr",{icon:"hr",text:"Horizontal line",cmd:"InsertHorizontalRule",context:"insert"})}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/importcss/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0)e.each(b,function(b){var c=s(a,b);c&&b.item.menu.push(c)});else{var c=s(a,null);c&&j.add(c)}}}),r(m,function(a){a.item.menu.length>0&&j.add(a.item)}),a.control.renderNew()}),q.convertSelectorToFormat=j}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/insertdatetime/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i'+d+"";var f=a.dom.getParent(a.selection.getStart(),"time");if(f)return void a.dom.setOuterHTML(f,d)}a.insertContent(d)}var e,f,g="Sun Mon Tue Wed Thu Fri Sat Sun".split(" "),h="Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sunday".split(" "),i="Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),j="January February March April May June July August September October November December".split(" "),k=[];a.addCommand("mceInsertDate",function(){d(a.getParam("insertdatetime_dateformat",a.translate("%Y-%m-%d")))}),a.addCommand("mceInsertTime",function(){d(a.getParam("insertdatetime_timeformat",a.translate("%H:%M:%S")))}),a.addButton("insertdatetime",{type:"splitbutton",title:"Insert date/time",onclick:function(){d(e||f)},menu:k}),b.each(a.settings.insertdatetime_formats||["%H:%M:%S","%Y-%m-%d","%I:%M:%S %p","%D"],function(a){f||(f=a),k.push({text:c(a),onclick:function(){e=a,d(a)}})}),a.addMenuItem("insertdatetime",{icon:"date",text:"Date/time",menu:k,context:"insert"})}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/legacyoutput/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i1&&(d=f[0],e=f[1]),b.push({text:d,value:e})}),{type:"listbox",text:"Font Sizes",tooltip:"Font Sizes",values:b,fixedWidth:!0,onPostRender:function(){var b=this;a.on("NodeChange",function(){var c;c=a.dom.getParent(a.selection.getNode(),"font"),c?b.value(c.size):b.value("")})},onclick:function(b){b.control.settings.value&&a.execCommand("FontSize",!1,b.control.settings.value)}}}),a.addButton("fontselect",function(){function b(a){a=a.replace(/;$/,"").split(";");for(var b=a.length;b--;)a[b]=a[b].split("=");return a}var c="Andale Mono=andale mono,monospace;Arial=arial,helvetica,sans-serif;Arial Black=arial black,sans-serif;Book Antiqua=book antiqua,palatino,serif;Comic Sans MS=comic sans ms,sans-serif;Courier New=courier new,courier,monospace;Georgia=georgia,palatino,serif;Helvetica=helvetica,arial,sans-serif;Impact=impact,sans-serif;Symbol=symbol;Tahoma=tahoma,arial,helvetica,sans-serif;Terminal=terminal,monaco,monospace;Times New Roman=times new roman,times,serif;Trebuchet MS=trebuchet ms,geneva,sans-serif;Verdana=verdana,geneva,sans-serif;Webdings=webdings;Wingdings=wingdings,zapf dingbats",e=[],f=b(a.settings.font_formats||c);return d.each(f,function(a,b){e.push({text:{raw:b[0]},value:b[1],textStyle:b[1].indexOf("dings")==-1?"font-family:"+b[1]:""})}),{type:"listbox",text:"Font Family",tooltip:"Font Family",values:e,fixedWidth:!0,onPostRender:function(){var b=this;a.on("NodeChange",function(){var c;c=a.dom.getParent(a.selection.getNode(),"font"),c?b.value(c.face):b.value("")})},onselect:function(b){b.control.settings.value&&a.execCommand("FontName",!1,b.control.settings.value)}}})}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/nonbreaking/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i ':" "),a.dom.setAttrib(a.dom.select("span.mce-nbsp"),"data-mce-bogus","1")}),a.addButton("nonbreaking",{title:"Nonbreaking space",cmd:"mceNonBreaking"}),a.addMenuItem("nonbreaking",{text:"Nonbreaking space",cmd:"mceNonBreaking",context:"insert"}),b){var c=+b>1?+b:3;a.on("keydown",function(b){if(9==b.keyCode){if(b.shiftKey)return;b.preventDefault();for(var d=0;d0?h.charAt(d-1):"";if('"'===e)return b;if(">"===e){var f=h.lastIndexOf("<",d);if(f!==-1){var g=h.substring(f,d);if(g.indexOf('contenteditable="false"')!==-1)return b}}return''+a.dom.encode("string"==typeof c[1]?c[1]:c[0])+""}var e=g.length,h=c.content,i=b.trim(f);if("raw"!=c.format){for(;e--;)h=h.replace(g[e],d);c.content=h}}var e,f,g,h="contenteditable";e=" "+b.trim(a.getParam("noneditable_editable_class","mceEditable"))+" ",f=" "+b.trim(a.getParam("noneditable_noneditable_class","mceNonEditable"))+" ";var i=c(e),j=c(f);g=a.getParam("noneditable_regexp"),g&&!g.length&&(g=[g]),a.on("PreInit",function(){g&&a.on("BeforeSetContent",d),a.parser.addAttributeFilter("class",function(a){for(var b,c=a.length;c--;)b=a[c],i(b)?b.attr(h,"true"):j(b)&&b.attr(h,"false")}),a.serializer.addAttributeFilter(h,function(a){for(var b,c=a.length;c--;)b=a[c],(i(b)||j(b))&&(g&&b.attr("data-mce-content")?(b.name="#text",b.type=3,b.raw=!0,b.value=b.attr("data-mce-content")):b.attr(h,null))})})}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/pagebreak/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i"),e=new RegExp(d.replace(/[\?\.\*\[\]\(\)\{\}\+\^\$\:]/g,function(a){return"\\"+a}),"gi"),f='';a.addCommand("mcePageBreak",function(){a.settings.pagebreak_split_block?a.insertContent("

"+f+"

"):a.insertContent(f)}),a.addButton("pagebreak",{title:"Page break",cmd:"mcePageBreak"}),a.addMenuItem("pagebreak",{text:"Page break",icon:"pagebreak",cmd:"mcePageBreak",context:"insert"}),a.on("ResolveName",function(b){"IMG"==b.target.nodeName&&a.dom.hasClass(b.target,c)&&(b.name="pagebreak")}),a.on("click",function(b){b=b.target,"IMG"===b.nodeName&&a.dom.hasClass(b,c)&&a.selection.select(b)}),a.on("BeforeSetContent",function(a){a.content=a.content.replace(e,f)}),a.on("PreInit",function(){a.serializer.addNodeFilter("img",function(b){for(var c,e,f=b.length;f--;)if(c=b[f],e=c.attr("class"),e&&e.indexOf("mce-pagebreak")!==-1){var g=c.parent;if(a.schema.getBlockElements()[g.name]&&a.settings.pagebreak_split_block){g.type=3,g.value=d,g.raw=!0,c.remove();continue}c.type=3,c.value=d,c.raw=!0}})})}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/preview/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i",buttons:{text:"Close",onclick:function(){this.parent().parent().close()}},onPostRender:function(){var b,f="";f+='',c.each(a.contentCSS,function(b){f+=''});var g=d.body_id||"tinymce";g.indexOf("=")!=-1&&(g=a.getParam("body_id","","hash"),g=g[a.id]||g);var h=d.body_class||"";h.indexOf("=")!=-1&&(h=a.getParam("body_class","","hash"),h=h[a.id]||"");var i=' ',j=a.settings.directionality?' dir="'+a.settings.directionality+'"':"";if(b=""+f+'"+a.getContent()+i+"",e)this.getEl("body").firstChild.src="data:text/html;charset=utf-8,"+encodeURIComponent(b);else{var k=this.getEl("body").firstChild.contentWindow.document;k.open(),k.write(b),k.close()}}})}),a.addButton("preview",{title:"Preview",cmd:"mcePreview"}),a.addMenuItem("preview",{text:"Preview",cmd:"mcePreview",context:"view"})}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/print/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i0){var d=a[b];if(!d)throw"Invalid capture group";c+=a[0].indexOf(d),a[0]=d}return[c,c+a[0].length,[a[0]]]}function h(b){var c;if(3===b.nodeType)return b.data;if(o[b.nodeName]&&!n[b.nodeName])return"";if(c="",a(b))return"\n";if((n[b.nodeName]||p[b.nodeName])&&(c+="\n"),b=b.firstChild)do c+=h(b);while(b=b.nextSibling);return c}function i(b,c,d){var e,f,g,h,i=[],j=0,k=b,l=c.shift(),m=0;a:for(;;){if((n[k.nodeName]||p[k.nodeName]||a(k))&&j++,3===k.nodeType&&(!f&&k.length+j>=l[1]?(f=k,h=l[1]-j):e&&i.push(k),!e&&k.length+j>l[0]&&(e=k,g=l[0]-j),j+=k.length),e&&f){if(k=d({startNode:e,startNodeIndex:g,endNode:f,endNodeIndex:h,innerNodes:i,match:l[2],matchIndex:m}),j-=f.length-h,e=null,f=null,i=[],l=c.shift(),m++,!l)break}else if(o[k.nodeName]&&!n[k.nodeName]||!k.firstChild){if(k.nextSibling){k=k.nextSibling;continue}}else if(!a(k)){k=k.firstChild;continue}for(;;){if(k.nextSibling){k=k.nextSibling;break}if(k.parentNode===b)break a;k=k.parentNode}}}function j(a){var b;if("function"!=typeof a){var c=a.nodeType?a:m.createElement(a);b=function(a,b){var d=c.cloneNode(!1);return d.setAttribute("data-mce-index",b),a&&d.appendChild(m.createTextNode(a)),d}}else b=a;return function(a){var c,d,e,f=a.startNode,g=a.endNode,h=a.matchIndex;if(f===g){var i=f;e=i.parentNode,a.startNodeIndex>0&&(c=m.createTextNode(i.data.substring(0,a.startNodeIndex)),e.insertBefore(c,i));var j=b(a.match[0],h);return e.insertBefore(j,i),a.endNodeIndex0}var l=this,m=-1;l.init=function(a){a.addMenuItem("searchreplace",{text:"Find and replace",shortcut:"Meta+F",onclick:d,separator:"before",context:"edit"}),a.addButton("searchreplace",{tooltip:"Find and replace",shortcut:"Meta+F",onclick:d}),a.addCommand("SearchReplace",d),a.shortcuts.add("Meta+F","",d)},l.find=function(a,b,c){a=a.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),a=c?"\\b"+a+"\\b":a;var d=f(new RegExp(a,b?"g":"gi"));return d&&(m=-1,m=i(!0)),d},l.next=function(){var a=i(!0);a!==-1&&(m=a)},l.prev=function(){var a=i(!1);a!==-1&&(m=a)},l.replace=function(c,d,f){var i,n,o,p,q,r,s=m;for(d=d!==!1,o=a.getBody(),n=b.grep(b.toArray(o.getElementsByTagName("span")),k),i=0;im&&n[i].setAttribute("data-mce-index",q-1)}return a.undoManager.add(),m=s,d?(r=h(s+1).length>0,l.next()):(r=h(s-1).length>0,l.prev()),!f&&r},l.done=function(c){var d,f,h,i;for(f=b.toArray(a.getBody().getElementsByTagName("span")),d=0;d0){for(l=h+1;l=0;l--)if(g(j[l]))return j[l];return null}var h,j,k,l;if(!(9!==b.keyCode||b.ctrlKey||b.altKey||b.metaKey||b.isDefaultPrevented())&&(k=c.explode(a.getParam("tab_focus",a.getParam("tabfocus_elements",":prev,:next"))),1==k.length&&(k[1]=k[0],k[0]=":prev"),j=b.shiftKey?":prev"==k[0]?g(-1):i.get(k[0]):":next"==k[1]?g(1):i.get(k[1]))){var m=d.get(j.id||j.name);j.id&&m?m.focus():e.setTimeout(function(){f.webkit||window.focus(),j.focus()},10),b.preventDefault()}}var i=b.DOM;a.on("init",function(){a.inline&&i.setAttrib(a.getBody(),"tabIndex",null),a.on("keyup",g),f.gecko?a.on("keypress keydown",h):a.on("keydown",h)})}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/template/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i")==-1){var c="";d.each(b.contentCSS,function(a){c+=''});var e=b.settings.body_class||"";e.indexOf("=")!=-1&&(e=b.getParam("body_class","","hash"),e=e[b.id]||""),a=""+c+''+a+""}a=j(a,"template_preview_replace_values");var f=g.find("iframe")[0].getEl().contentWindow.document;f.open(),f.write(a),f.close()}var f=a.control.value();f.url?e.send({url:f.url,success:function(a){h=a,c(h)}}):(h=f.content,c(h)),g.find("#description")[0].text(a.control.value().description)}var g,h,i=[];if(!c||0===c.length){var l=b.translate("No templates defined.");return void b.notificationManager.open({text:l,type:"info"})}d.each(c,function(a){i.push({selected:!i.length,text:a.title,value:{url:a.url,content:a.content,description:a.description}})}),g=b.windowManager.open({title:"Insert template",layout:"flex",direction:"column",align:"stretch",padding:15,spacing:10,items:[{type:"form",flex:0,padding:0,items:[{type:"container",label:"Templates",items:{type:"listbox",label:"Templates",name:"template",values:i,onselect:f}}]},{type:"label",name:"description",label:"Description",text:"\xa0"},{type:"iframe",flex:1,border:1}],onsubmit:function(){k(!1,h)},minWidth:Math.min(a.DOM.getViewPort().w,b.getParam("template_popup_width",600)),minHeight:Math.min(a.DOM.getViewPort().h,b.getParam("template_popup_height",500))}),g.find("listbox")[0].fire("select")}function h(a,c){function d(a,b){if(a=""+a,a.length0&&(f=k.create("div",null),f.appendChild(g[0].cloneNode(!0))),d.each(k.select("*",f),function(a){e(a,b.getParam("template_cdate_classes","cdate").replace(/\s+/g,"|"))&&(a.innerHTML=h(b.getParam("template_cdate_format",b.getLang("template.cdate_format")))),e(a,b.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(a.innerHTML=h(b.getParam("template_mdate_format",b.getLang("template.mdate_format")))),e(a,b.getParam("template_selected_content_classes","selcontent").replace(/\s+/g,"|"))&&(a.innerHTML=l)}),i(f),b.execCommand("mceInsertContent",!1,f.innerHTML),b.addVisual()}b.addCommand("mceInsertTemplate",k),b.addButton("template",{title:"Insert template",onclick:f(g)}),b.addMenuItem("template",{text:"Template",onclick:f(g),context:"insert"}),b.on("PreProcess",function(a){var c=b.dom;d.each(c.select("div",a.node),function(a){c.hasClass(a,"mceTmpl")&&(d.each(c.select("*",a),function(a){c.hasClass(a,b.getParam("template_mdate_classes","mdate").replace(/\s+/g,"|"))&&(a.innerHTML=h(b.getParam("template_mdate_format",b.getLang("template.mdate_format"))))}),i(a))})})}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/textcolor/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i
'+(c?"×":"")+"
"}var c,d,g,h,i,j,k,n,o=this,p=o._id,q=0;for(n=o.settings.origin,c=f(n),c.push({text:e("No color"),color:"transparent"}),g='',h=c.length-1,j=0;j",i=0;ih?g+="":(d=c[k],g+=a(d.color,d.text));g+=""}if(b.settings.color_picker_callback){for(g+='",g+="",i=0;ib.start.length?-1:a.start.length0},e=function(b,e,f,g){var h,i,j=a(b);for(i=0;i0?a.splitText(d):a,a.splitText(c-d-e),a.deleteData(0,b.start.length),a.deleteData(a.data.length-b.end.length,b.end.length),a},e=function(a,b,e){var f,g,h,i,j,k,l,m,n,o,p;if(f=a.selection,g=a.dom,f.isCollapsed()&&(h=f.getRng(!0),i=h.startContainer,j=h.startOffset,l=i.data,o=e===!0?1:0,3==i.nodeType&&(n=c.findEndPattern(b,l,j,o),void 0!==n&&(k=Math.max(0,j-o),k=l.lastIndexOf(n.start,k-n.end.length-1),k!==-1&&(m=g.createRng(),m.setStart(i,k),m.setEnd(i,j-o),n=c.findPattern(b,m.toString()),n&&n.end&&!(i.data.length<=n.start.length+n.end.length))))))return p=a.formatter.get(n.format),p&&p[0].inline?(a.undoManager.transact(function(){i=d(i,n,j,k,o),a.formatter.apply(n.format,{},i)}),i):void 0},f=function(d,e){var f,g,h,i,j,k,l,m,n,o,p;if(f=d.selection,g=d.dom,f.isCollapsed()&&(l=g.getParent(f.getStart(),"p"))){for(n=new a(l,l);j=n.next();)if(3==j.nodeType){i=j;break}if(i){if(m=c.findPattern(e,i.data),!m)return;if(o=f.getRng(!0),h=o.startContainer,p=o.startOffset,i==h&&(p=Math.max(0,p-m.start.length)),b.trim(i.data).length==m.start.length)return;m.format&&(k=d.formatter.get(m.format),k&&k[0].block&&(i.deleteData(0,m.start.length),d.formatter.apply(m.format,{},i),o.setStart(h,p),o.collapse(!0),f.setRng(o))),m.cmd&&d.undoManager.transact(function(){i.deleteData(0,m.start.length),d.execCommand(m.cmd)})}}};return{applyInlineFormat:e,applyBlockFormat:f}}),g("5",["3","4"],function(a,b){function c(a,c){var d,e;e=b.applyInlineFormat(a,c,!1),e&&(d=a.dom.createRng(),d.setStart(e,e.data.length),d.setEnd(e,e.data.length),a.selection.setRng(d)),b.applyBlockFormat(a,c)}function d(a,c){var d,e,f,g,h;d=b.applyInlineFormat(a,c,!0),d&&(h=a.dom,e=d.data.slice(-1),/[\u00a0 ]/.test(e)&&(d.deleteData(d.data.length-1,1),f=h.doc.createTextNode(e),d.nextSibling?h.insertAfter(f,d.nextSibling):d.parentNode.appendChild(f),g=h.createRng(),g.setStart(f,1),g.setEnd(f,1),a.selection.setRng(g)))}var e=function(a,b,c){for(var d=0;d',e="";return d+a.dom.encode(c)+e}function l(a){var b=m(a);return'
'+b+"
"}function m(a){var c,d,e,f,g="",h=i(a),l=j(h)-1;if(!h.length)return"";for(g+=k(a.headerTag,b.translate("Table of Contents")),c=0;c";else for(d=l;d
  • ";if(g+=''+e.title+"",f!==e.level&&f)for(d=e.level;d>f;d--)g+="
  • ";else g+="
  • ",f||(g+="");l=e.level}return g}var n,o=a.$,p={depth:3,headerTag:"h2",className:"mce-toc"},q=function(a){var b=0;return function(){var c=(new Date).getTime().toString(32);return a+c+(b++).toString(32)}},r=q("mcetoc_");a.on("PreInit",function(){var b=a.settings,c=parseInt(b.toc_depth,10)||0;n={depth:c>=1&&c<=9?c:p.depth,headerTag:d(b.toc_header)?b.toc_header:p.headerTag,className:b.toc_class?a.dom.encode(b.toc_class):p.className}}),a.on("PreProcess",function(a){var b=o("."+n.className,a.node);b.length&&(b.removeAttr("contentEditable"),b.find("[contenteditable]").removeAttr("contentEditable"))}),a.on("SetContent",function(){var a=o("."+n.className);a.length&&(a.attr("contentEditable",!1),a.children(":first-child").attr("contentEditable",!0))});var s=function(b){return!b.length||a.dom.getParents(b[0],".mce-offscreen-selection").length>0};a.addCommand("mceInsertToc",function(){var b=o("."+n.className);s(b)?a.insertContent(l(n)):a.execCommand("mceUpdateToc")}),a.addCommand("mceUpdateToc",function(){var b=o("."+n.className);b.length&&a.undoManager.transact(function(){b.html(m(n))})}),a.addButton("toc",{tooltip:"Table of Contents",cmd:"mceInsertToc",icon:"toc",onPostRender:f}),a.addButton("tocupdate",{tooltip:"Update",cmd:"mceUpdateToc",icon:"reload"}),a.addContextToolbar(e,"tocupdate"),a.addMenuItem("toc",{text:"Table of Contents",context:"insert",cmd:"mceInsertToc",onPostRender:f})}),function(){}}),d("0")()}(); -------------------------------------------------------------------------------- /pub/lib/plugins/visualblocks/css/visualblocks.css: -------------------------------------------------------------------------------- 1 | .mce-visualblocks p { 2 | padding-top: 10px; 3 | border: 1px dashed #BBB; 4 | margin-left: 3px; 5 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhCQAJAJEAAAAAAP///7u7u////yH5BAEAAAMALAAAAAAJAAkAAAIQnG+CqCN/mlyvsRUpThG6AgA7); 6 | } 7 | 8 | .mce-visualblocks h1 { 9 | padding-top: 10px; 10 | border: 1px dashed #BBB; 11 | margin-left: 3px; 12 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGu1JuxHoAfRNRW3TWXyF2YiRUAOw==); 13 | } 14 | 15 | .mce-visualblocks h2 { 16 | padding-top: 10px; 17 | border: 1px dashed #BBB; 18 | margin-left: 3px; 19 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8Hybbx4oOuqgTynJd6bGlWg3DkJzoaUAAAOw==); 20 | } 21 | 22 | .mce-visualblocks h3 { 23 | padding-top: 10px; 24 | border: 1px dashed #BBB; 25 | margin-left: 3px; 26 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIZjI8Hybbx4oOuqgTynJf2Ln2NOHpQpmhAAQA7); 27 | } 28 | 29 | .mce-visualblocks h4 { 30 | padding-top: 10px; 31 | border: 1px dashed #BBB; 32 | margin-left: 3px; 33 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxInR0zqeAdhtJlXwV1oCll2HaWgAAOw==); 34 | } 35 | 36 | .mce-visualblocks h5 { 37 | padding-top: 10px; 38 | border: 1px dashed #BBB; 39 | margin-left: 3px; 40 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjane4iq5GlW05GgIkIZUAAAOw==); 41 | } 42 | 43 | .mce-visualblocks h6 { 44 | padding-top: 10px; 45 | border: 1px dashed #BBB; 46 | margin-left: 3px; 47 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDgAKAIABALu7u////yH5BAEAAAEALAAAAAAOAAoAAAIajI8HybbxIoiuwjan04jep1iZ1XRlAo5bVgAAOw==); 48 | } 49 | 50 | .mce-visualblocks div:not([data-mce-bogus]) { 51 | padding-top: 10px; 52 | border: 1px dashed #BBB; 53 | margin-left: 3px; 54 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhEgAKAIABALu7u////yH5BAEAAAEALAAAAAASAAoAAAIfjI9poI0cgDywrhuxfbrzDEbQM2Ei5aRjmoySW4pAAQA7); 55 | } 56 | 57 | .mce-visualblocks section { 58 | padding-top: 10px; 59 | border: 1px dashed #BBB; 60 | margin: 0 0 1em 3px; 61 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKAAKAIABALu7u////yH5BAEAAAEALAAAAAAoAAoAAAI5jI+pywcNY3sBWHdNrplytD2ellDeSVbp+GmWqaDqDMepc8t17Y4vBsK5hDyJMcI6KkuYU+jpjLoKADs=); 62 | } 63 | 64 | .mce-visualblocks article { 65 | padding-top: 10px; 66 | border: 1px dashed #BBB; 67 | margin: 0 0 1em 3px; 68 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhKgAKAIABALu7u////yH5BAEAAAEALAAAAAAqAAoAAAI6jI+pywkNY3wG0GBvrsd2tXGYSGnfiF7ikpXemTpOiJScasYoDJJrjsG9gkCJ0ag6KhmaIe3pjDYBBQA7); 69 | } 70 | 71 | .mce-visualblocks blockquote { 72 | padding-top: 10px; 73 | border: 1px dashed #BBB; 74 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhPgAKAIABALu7u////yH5BAEAAAEALAAAAAA+AAoAAAJPjI+py+0Knpz0xQDyuUhvfoGgIX5iSKZYgq5uNL5q69asZ8s5rrf0yZmpNkJZzFesBTu8TOlDVAabUyatguVhWduud3EyiUk45xhTTgMBBQA7); 75 | } 76 | 77 | .mce-visualblocks address { 78 | padding-top: 10px; 79 | border: 1px dashed #BBB; 80 | margin: 0 0 1em 3px; 81 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhLQAKAIABALu7u////yH5BAEAAAEALAAAAAAtAAoAAAI/jI+pywwNozSP1gDyyZcjb3UaRpXkWaXmZW4OqKLhBmLs+K263DkJK7OJeifh7FicKD9A1/IpGdKkyFpNmCkAADs=); 82 | } 83 | 84 | .mce-visualblocks pre { 85 | padding-top: 10px; 86 | border: 1px dashed #BBB; 87 | margin-left: 3px; 88 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhFQAKAIABALu7uwAAACH5BAEAAAEALAAAAAAVAAoAAAIjjI+ZoN0cgDwSmnpz1NCueYERhnibZVKLNnbOq8IvKpJtVQAAOw==); 89 | } 90 | 91 | .mce-visualblocks figure { 92 | padding-top: 10px; 93 | border: 1px dashed #BBB; 94 | margin: 0 0 1em 3px; 95 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJAAKAIAAALu7u////yH5BAEAAAEALAAAAAAkAAoAAAI0jI+py+2fwAHUSFvD3RlvG4HIp4nX5JFSpnZUJ6LlrM52OE7uSWosBHScgkSZj7dDKnWAAgA7); 96 | } 97 | 98 | .mce-visualblocks hgroup { 99 | padding-top: 10px; 100 | border: 1px dashed #BBB; 101 | margin: 0 0 1em 3px; 102 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhJwAKAIABALu7uwAAACH5BAEAAAEALAAAAAAnAAoAAAI3jI+pywYNI3uB0gpsRtt5fFnfNZaVSYJil4Wo03Hv6Z62uOCgiXH1kZIIJ8NiIxRrAZNMZAtQAAA7); 103 | } 104 | 105 | .mce-visualblocks aside { 106 | padding-top: 10px; 107 | border: 1px dashed #BBB; 108 | margin: 0 0 1em 3px; 109 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhHgAKAIABAKqqqv///yH5BAEAAAEALAAAAAAeAAoAAAItjI+pG8APjZOTzgtqy7I3f1yehmQcFY4WKZbqByutmW4aHUd6vfcVbgudgpYCADs=); 110 | } 111 | 112 | .mce-visualblocks figcaption { 113 | border: 1px dashed #BBB; 114 | } 115 | 116 | .mce-visualblocks ul { 117 | padding-top: 10px; 118 | border: 1px dashed #BBB; 119 | margin: 0 0 1em 3px; 120 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIAAALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybGuYnqUVSjvw26DzzXiqIDlVwAAOw==) 121 | } 122 | 123 | .mce-visualblocks ol { 124 | padding-top: 10px; 125 | border: 1px dashed #BBB; 126 | margin: 0 0 1em 3px; 127 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybH6HHt0qourxC6CvzXieHyeWQAAOw==); 128 | } 129 | 130 | .mce-visualblocks dl { 131 | padding-top: 10px; 132 | border: 1px dashed #BBB; 133 | margin: 0 0 1em 3px; 134 | background: transparent no-repeat url(data:image/gif;base64,R0lGODlhDQAKAIABALu7u////yH5BAEAAAEALAAAAAANAAoAAAIXjI8GybEOnmOvUoWznTqeuEjNSCqeGRUAOw==); 135 | } 136 | -------------------------------------------------------------------------------- /pub/lib/plugins/visualblocks/plugin.min.js: -------------------------------------------------------------------------------- 1 | !function(){var a={},b=function(b){for(var c=a[b],e=c.deps,f=c.defn,g=e.length,h=new Array(g),i=0;i>>2]|=(c[n>>>2]>>>24-8*(n%4)&255)<<24-8*((j+n)%4);else if(65535>>2]=c[n>>>2];else b.push.apply(b,c);this.sigBytes+=a;return this},clamp:function(){var a=this.words,b=this.sigBytes;a[b>>>2]&=4294967295<< 9 | 32-8*(b%4);a.length=v.ceil(b/4)},clone:function(){var a=f.clone.call(this);a.words=this.words.slice(0);return a},random:function(a){for(var b=[],c=0;c>>2]>>>24-8*(j%4)&255;c.push((n>>>4).toString(16));c.push((n&15).toString(16))}return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>3]|=parseInt(a.substr(j, 10 | 2),16)<<24-4*(j%8);return new s.init(c,b/2)}},e=x.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var c=[],j=0;j>>2]>>>24-8*(j%4)&255));return c.join("")},parse:function(a){for(var b=a.length,c=[],j=0;j>>2]|=(a.charCodeAt(j)&255)<<24-8*(j%4);return new s.init(c,b)}},q=x.Utf8={stringify:function(a){try{return decodeURIComponent(escape(e.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return e.parse(unescape(encodeURIComponent(a)))}}, 11 | t=u.BufferedBlockAlgorithm=f.extend({reset:function(){this._data=new s.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=q.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(a){var b=this._data,c=b.words,j=b.sigBytes,n=this.blockSize,e=j/(4*n),e=a?v.ceil(e):v.max((e|0)-this._minBufferSize,0);a=e*n;j=v.min(4*a,j);if(a){for(var f=0;ft;t++){s[e+5*q]=(t+1)*(t+2)/2%64;var w=(2*e+3*q)%5,e=q%5,q=w}for(e=0;5>e;e++)for(q=0;5>q;q++)x[e+5*q]=q+5*((2*e+3*q)%5);e=1;for(q=0;24>q;q++){for(var a=w=t=0;7>a;a++){if(e&1){var b=(1<b?w^=1<e;e++)c[e]=f.create();d=d.SHA3=r.extend({cfg:r.cfg.extend({outputLength:512}),_doReset:function(){for(var a=this._state= 16 | [],b=0;25>b;b++)a[b]=new f.init;this.blockSize=(1600-2*this.cfg.outputLength)/32},_doProcessBlock:function(a,b){for(var e=this._state,f=this.blockSize/2,h=0;h>>24)&16711935|(l<<24|l>>>8)&4278255360,m=(m<<8|m>>>24)&16711935|(m<<24|m>>>8)&4278255360,g=e[h];g.high^=m;g.low^=l}for(f=0;24>f;f++){for(h=0;5>h;h++){for(var d=l=0,k=0;5>k;k++)g=e[h+5*k],l^=g.high,d^=g.low;g=c[h];g.high=l;g.low=d}for(h=0;5>h;h++){g=c[(h+4)%5];l=c[(h+1)%5];m=l.high;k=l.low;l=g.high^ 17 | (m<<1|k>>>31);d=g.low^(k<<1|m>>>31);for(k=0;5>k;k++)g=e[h+5*k],g.high^=l,g.low^=d}for(m=1;25>m;m++)g=e[m],h=g.high,g=g.low,k=s[m],32>k?(l=h<>>32-k,d=g<>>32-k):(l=g<>>64-k,d=h<>>64-k),g=c[x[m]],g.high=l,g.low=d;g=c[0];h=e[0];g.high=h.high;g.low=h.low;for(h=0;5>h;h++)for(k=0;5>k;k++)m=h+5*k,g=e[m],l=c[m],m=c[(h+1)%5+5*k],d=c[(h+2)%5+5*k],g.high=l.high^~m.high&d.high,g.low=l.low^~m.low&d.low;g=e[0];h=y[f];g.high^=h.high;g.low^=h.low}},_doFinalize:function(){var a=this._data, 18 | b=a.words,c=8*a.sigBytes,e=32*this.blockSize;b[c>>>5]|=1<<24-c%32;b[(v.ceil((c+1)/e)*e>>>5)-1]|=128;a.sigBytes=4*b.length;this._process();for(var a=this._state,b=this.cfg.outputLength/8,c=b/8,e=[],h=0;h>>24)&16711935|(f<<24|f>>>8)&4278255360,d=(d<<8|d>>>24)&16711935|(d<<24|d>>>8)&4278255360;e.push(d);e.push(f)}return new u.init(e,b)},clone:function(){for(var a=r.clone.call(this),b=a._state=this._state.slice(0),c=0;25>c;c++)b[c]=b[c].clone();return a}}); 19 | p.SHA3=r._createHelper(d);p.HmacSHA3=r._createHmacHelper(d)})(Math); 20 | -------------------------------------------------------------------------------- /pub/lib/sha512.js: -------------------------------------------------------------------------------- 1 | /* 2 | CryptoJS v3.1.2 3 | code.google.com/p/crypto-js 4 | (c) 2009-2013 by Jeff Mott. All rights reserved. 5 | code.google.com/p/crypto-js/wiki/License 6 | */ 7 | var CryptoJS=CryptoJS||function(a,m){var r={},f=r.lib={},g=function(){},l=f.Base={extend:function(a){g.prototype=this;var b=new g;a&&b.mixIn(a);b.hasOwnProperty("init")||(b.init=function(){b.$super.init.apply(this,arguments)});b.init.prototype=b;b.$super=this;return b},create:function(){var a=this.extend();a.init.apply(a,arguments);return a},init:function(){},mixIn:function(a){for(var b in a)a.hasOwnProperty(b)&&(this[b]=a[b]);a.hasOwnProperty("toString")&&(this.toString=a.toString)},clone:function(){return this.init.prototype.extend(this)}}, 8 | p=f.WordArray=l.extend({init:function(a,b){a=this.words=a||[];this.sigBytes=b!=m?b:4*a.length},toString:function(a){return(a||q).stringify(this)},concat:function(a){var b=this.words,d=a.words,c=this.sigBytes;a=a.sigBytes;this.clamp();if(c%4)for(var j=0;j>>2]|=(d[j>>>2]>>>24-8*(j%4)&255)<<24-8*((c+j)%4);else if(65535>>2]=d[j>>>2];else b.push.apply(b,d);this.sigBytes+=a;return this},clamp:function(){var n=this.words,b=this.sigBytes;n[b>>>2]&=4294967295<< 9 | 32-8*(b%4);n.length=a.ceil(b/4)},clone:function(){var a=l.clone.call(this);a.words=this.words.slice(0);return a},random:function(n){for(var b=[],d=0;d>>2]>>>24-8*(c%4)&255;d.push((j>>>4).toString(16));d.push((j&15).toString(16))}return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>3]|=parseInt(a.substr(c, 10 | 2),16)<<24-4*(c%8);return new p.init(d,b/2)}},G=y.Latin1={stringify:function(a){var b=a.words;a=a.sigBytes;for(var d=[],c=0;c>>2]>>>24-8*(c%4)&255));return d.join("")},parse:function(a){for(var b=a.length,d=[],c=0;c>>2]|=(a.charCodeAt(c)&255)<<24-8*(c%4);return new p.init(d,b)}},fa=y.Utf8={stringify:function(a){try{return decodeURIComponent(escape(G.stringify(a)))}catch(b){throw Error("Malformed UTF-8 data");}},parse:function(a){return G.parse(unescape(encodeURIComponent(a)))}}, 11 | h=f.BufferedBlockAlgorithm=l.extend({reset:function(){this._data=new p.init;this._nDataBytes=0},_append:function(a){"string"==typeof a&&(a=fa.parse(a));this._data.concat(a);this._nDataBytes+=a.sigBytes},_process:function(n){var b=this._data,d=b.words,c=b.sigBytes,j=this.blockSize,l=c/(4*j),l=n?a.ceil(l):a.max((l|0)-this._minBufferSize,0);n=l*j;c=a.min(4*n,c);if(n){for(var h=0;hq;q++)y[q]=a();f=f.SHA512=r.extend({_doReset:function(){this._hash=new l.init([new g.init(1779033703,4089235720),new g.init(3144134277,2227873595),new g.init(1013904242,4271175723),new g.init(2773480762,1595750129),new g.init(1359893119,2917565137),new g.init(2600822924,725511199),new g.init(528734635,4215389547),new g.init(1541459225,327033209)])},_doProcessBlock:function(a,f){for(var h=this._hash.words, 20 | g=h[0],n=h[1],b=h[2],d=h[3],c=h[4],j=h[5],l=h[6],h=h[7],q=g.high,m=g.low,r=n.high,N=n.low,Z=b.high,O=b.low,$=d.high,P=d.low,aa=c.high,Q=c.low,ba=j.high,R=j.low,ca=l.high,S=l.low,da=h.high,T=h.low,v=q,s=m,H=r,E=N,I=Z,F=O,W=$,J=P,w=aa,t=Q,U=ba,K=R,V=ca,L=S,X=da,M=T,x=0;80>x;x++){var B=y[x];if(16>x)var u=B.high=a[f+2*x]|0,e=B.low=a[f+2*x+1]|0;else{var u=y[x-15],e=u.high,z=u.low,u=(e>>>1|z<<31)^(e>>>8|z<<24)^e>>>7,z=(z>>>1|e<<31)^(z>>>8|e<<24)^(z>>>7|e<<25),D=y[x-2],e=D.high,k=D.low,D=(e>>>19|k<<13)^ 21 | (e<<3|k>>>29)^e>>>6,k=(k>>>19|e<<13)^(k<<3|e>>>29)^(k>>>6|e<<26),e=y[x-7],Y=e.high,C=y[x-16],A=C.high,C=C.low,e=z+e.low,u=u+Y+(e>>>0>>0?1:0),e=e+k,u=u+D+(e>>>0>>0?1:0),e=e+C,u=u+A+(e>>>0>>0?1:0);B.high=u;B.low=e}var Y=w&U^~w&V,C=t&K^~t&L,B=v&H^v&I^H&I,ha=s&E^s&F^E&F,z=(v>>>28|s<<4)^(v<<30|s>>>2)^(v<<25|s>>>7),D=(s>>>28|v<<4)^(s<<30|v>>>2)^(s<<25|v>>>7),k=p[x],ia=k.high,ea=k.low,k=M+((t>>>14|w<<18)^(t>>>18|w<<14)^(t<<23|w>>>9)),A=X+((w>>>14|t<<18)^(w>>>18|t<<14)^(w<<23|t>>>9))+(k>>>0>> 22 | 0?1:0),k=k+C,A=A+Y+(k>>>0>>0?1:0),k=k+ea,A=A+ia+(k>>>0>>0?1:0),k=k+e,A=A+u+(k>>>0>>0?1:0),e=D+ha,B=z+B+(e>>>0>>0?1:0),X=V,M=L,V=U,L=K,U=w,K=t,t=J+k|0,w=W+A+(t>>>0>>0?1:0)|0,W=I,J=F,I=H,F=E,H=v,E=s,s=k+e|0,v=A+B+(s>>>0>>0?1:0)|0}m=g.low=m+s;g.high=q+v+(m>>>0>>0?1:0);N=n.low=N+E;n.high=r+H+(N>>>0>>0?1:0);O=b.low=O+F;b.high=Z+I+(O>>>0>>0?1:0);P=d.low=P+J;d.high=$+W+(P>>>0>>0?1:0);Q=c.low=Q+t;c.high=aa+w+(Q>>>0>>0?1:0);R=j.low=R+K;j.high=ba+U+(R>>>0>>0?1:0);S=l.low= 23 | S+L;l.high=ca+V+(S>>>0>>0?1:0);T=h.low=T+M;h.high=da+X+(T>>>0>>0?1:0)},_doFinalize:function(){var a=this._data,f=a.words,h=8*this._nDataBytes,g=8*a.sigBytes;f[g>>>5]|=128<<24-g%32;f[(g+128>>>10<<5)+30]=Math.floor(h/4294967296);f[(g+128>>>10<<5)+31]=h;a.sigBytes=4*f.length;this._process();return this._hash.toX32()},clone:function(){var a=r.clone.call(this);a._hash=this._hash.clone();return a},blockSize:32});m.SHA512=r._createHelper(f);m.HmacSHA512=r._createHmacHelper(f)})(); 24 | -------------------------------------------------------------------------------- /pub/lib/site.js: -------------------------------------------------------------------------------- 1 | /* Rainbow v1.1.9 rainbowco.de | included languages: generic, javascript */ 2 | window.Rainbow=function(){function q(a){var b,c=a.getAttribute&&a.getAttribute("data-language")||0;if(!c){a=a.attributes;for(b=0;b=e[d][c])delete e[d][c],delete j[d][c];if(a>=c&&ac&&b'+b+""}function s(a,b,c,h){var f=a.exec(c);if(f){++t;!b.name&&"string"==typeof b.matches[0]&&(b.name=b.matches[0],delete b.matches[0]);var k=f[0],i=f.index,u=f[0].length+i,g=function(){function f(){s(a,b,c,h)}t%100>0?f():setTimeout(f,0)};if(C(i,u))g();else{var m=v(b.matches),l=function(a,c,h){if(a>=c.length)h(k);else{var d=f[c[a]];if(d){var e=b.matches[c[a]],i=e.language,g=e.name&&e.matches? 4 | e.matches:e,j=function(b,d,e){var i;i=0;var g;for(g=1;g/g,">").replace(/&(?![\w\#]+;)/g, 6 | "&"),b,c)}function o(a,b,c){if(b. 18 | 19 | */ 20 | 21 | // ----------------------------------------------------------------------------------------------------------- 22 | 23 | require('dotenv').load(); 24 | holomapPublicRootPath = './pub/'; 25 | holomapServerPort = process.env.PORT || 80; 26 | 27 | var fs = require('fs'); 28 | if (!fs.existsSync('./log')) fs.mkdirSync('./log'); 29 | 30 | var HolomapCore, HolomapMembrane; 31 | 32 | // ----------------------------------------------------------------------------------------------------------- 33 | 34 | // Require modules 35 | 36 | HolomapCore = require('./js/holomap.core.js'); 37 | HolomapMembrane = require('./js/holomap.membrane.js'); 38 | 39 | // Initialise 40 | 41 | var core = new HolomapCore(); 42 | var membrane = new HolomapMembrane(core); 43 | core.set_membrane(membrane); -------------------------------------------------------------------------------- /setup.txt: -------------------------------------------------------------------------------- 1 | Post-installation Setup: 2 | 3 | 1. Start the server with ./start_dev or ./start_production 4 | 5 | 2. Create admin username and set password 6 | 7 | - Open https://localhost/?j=1 8 | - Click Join (top right of screen) 9 | - Complete form, entering admin as username 10 | 11 | 3. Once logged in as admin, navigate to: ~hmadmin.admin (enter this in the search bar) 12 | 13 | 4. Create ontologies (holon types). 14 | -------------------------------------------------------------------------------- /start_dev: -------------------------------------------------------------------------------- 1 | export HOLOMAP_DEV=1 2 | sudo -E npm run dev 3 | -------------------------------------------------------------------------------- /start_production: -------------------------------------------------------------------------------- 1 | sudo npm start 2 | --------------------------------------------------------------------------------