File: hist/frdl-main-3.js

Recommend this page to a friend!
  Classes of Till Wehowski   µ.Flow   hist/frdl-main-3.js   Download  
File: hist/frdl-main-3.js
Role: Class source
Content type: text/plain
Description: Class source
Class: µ.Flow
General purpose library of objects
Author: By
Last change: Update frdl-main-3.js
Date: 7 years ago
Size: 87,872 bytes
 

Contents

Class file image Download
/* webfan (C) Till Wehowski, Webfan.de - All rights reserved. */ function Module(scope, require, webfan, jQuery){ var main = this; var Scope = scope; Scope.main = main; main.state = new frdl.EventEmitter(); var dependency = [ 'loading', // 'frdl::ready', ]; if(false===isWorker){ dependency.push(Symbol.frdl.LOAD.flow); dependency.push('module $1:ui/frdlui loaded'); dependency.push('module $1:libraries/angular/angular loaded'); } // dependency.push('frdl.Registry.Types.Classes'); /** e.g. main.dependency.add('module $frdl.inX loaded'); */ main.dependency = main.state.required(dependency, function (dataArray) { require.state.emit(Symbol.frdl.main.dependency.ready); try{ main.dependency.stateGet(Symbol.frdl.LOAD.flow).emitter.emit('main modules', dataArray, main); }catch(err){ console.error(err); } }, main); Object.defineProperty(main, 'isLoading', { 'get':function() { if('loading'=== document.readyState)return true; if('complete'!== document.readyState || false === main.isReady)return true; return false; } }); Object.defineProperty(main, 'isReady', { 'get':function() { if(true !== main.dependency.stateReady())return false; // if(false!==main.interactive())return false; return true; } }); require.state.on('resolved', function(){ var args = Array.prototype.slice.call(arguments); main.state.emit('module $'+args[0].identifier+' loaded', args[0].module); }); frdl.ready(function(){ main.state.emit('frdl::ready', true); }); //webfan.$Async(function(){ main.init(scope, require, webfan, jQuery); //}, 250); return main; } Module.prototype.init = function(scope, require, webfan, jQuery){ var main = this; var Scope = scope; var dummy = false; //if (typeof Symbol !== 'function') { // require('es6-symbol'); //} main .jQueryPlugins(jQuery, jQuery) .mapjQueryPlugins(jQuery, jQuery) .misc() ; scope.url = require.cache('url'); /* Object.defineProperty(scope, 'watchFor', { 'get':function() { return require('webfan/navigator/dom-observer'); } }); scope.watchFor = require('webfan/navigator/dom-observer', function(watchFor){ scope.watchFor = watchFor; }); */ if('undefined' === typeof Array.from) { require('es6-array-extras/lib/es6-array-extras', function() { }); } require('common/json2', function(JSON) { JSON = JSON; if('undefined' === typeof global.JSON || 'undefined' === typeof global.JSON.parse || 'undefined' === typeof global.JSON.stringify)global.JSON=window.JSON=JSON; }); Object.defineProperty(frdl, 'sql', { 'get':function() { return require('webfan/ql'); }, 'set':function(v) { frdl.sql = v; }/* , configurable : true, writable :true */ }); Object.defineProperty(Scope, 'cipher', { 'get':function() { return require('sjcl/sjcl'); } }); Object.defineProperty(global, 'Buffer', { 'get':function() { return require('buffer'); } }); if('undefined' === typeof localStorage){ var _localStorage = {}; localStorage = frdl.globalScope.localStorage = global.localStorage = window.localStorage = self.localStorage = { setItem : function(id, val) { return _localStorage[id] = String(val); }, getItem : function(id) { return _localStorage.hasOwnProperty(id) ? _localStorage[id] : null; }, removeItem : function(id) { return delete _localStorage[id]; }, clear : function() { return _localStorage = {}; } }; } if('undefined' === typeof sessionStorage){ var _sessionStorage = {}; sessionStorage = frdl.globalScope.sessionStorage = global.sessionStorage = window.sessionStorage = self.sessionStorage = { setItem : function(id, val) { return _sessionStorage[id] = String(val); }, getItem : function(id) { return _sessionStorage.hasOwnProperty(id) ? _sessionStorage[id] : null; }, removeItem : function(id) { return delete _sessionStorage[id]; }, clear : function() { return _sessionStorage = {}; } }; } require('webfan/navigator/WebkitWebfanStorage', function(mod){ Scope.$S = mod; Scope.$DB = new Scope.$S({ prefix : 'frdl://$S/schema.info/', user :null, crypt : false, pwd : null }, false); require.state.emit('resolved', { identifier : 'frdl.$DB', module :Scope.$DB }); require.state.emit('resolved frdl.$DB', { identifier : 'frdl.$DB', module : Scope.$DB }); try{ var debugmode = parseInt( frdl.$DB.load('settings/debugmode').toString() ); if(!debugmode || isNaN(debugmode))debugmode=0; } catch(err){ var debugmode = 0; } frdl.debug.mode(debugmode); frdl.ready(function(){ webfan.$Async(function(){ if(0<frdl.debug.mode()){ if('undefined'!==frdl.alert)frdl.alert.log('DEBUG ENABLED ('+frdl.debug.mode()+')'); } },3000); }); }); require.state.on('resolved 1:ui/frdlui', function(){ var args = Array.prototype.slice.call(arguments); var UI = args[0].module; UI.emitter.once('dependency.resolved', function(){ if(1<frdl.debug.mode())console.log('dependency.resolved => frdl.main.state.emit'); }); require.state.emit('resolved', { identifier : 'UI', module : UI }); require.state.emit('resolved UI', { identifier : 'UI', module : UI }); main.state.emit(Symbol.frdl.LOAD.flow, UI); }); require.state.on('resolved 3:webfan/navigator/simpledialog', function(){ var args = Array.prototype.slice.call(arguments); var alert = args[0].module; webfan.$Async(function(){ require.state.emit('resolved', { identifier : 'frdl.alert', module : alert }); require.state.emit('resolved frdl.alert', { identifier : 'frdl.alert', module : alert }); },1); }); Object.defineProperty(scope, 'alert', { 'get':function() { return require('webfan/navigator/simpledialog'); } }); require('webfan/navigator/anchor-routing', function(HashHandler) { frdl.Hash = HashHandler; require.state.emit('resolved', { identifier : 'frdl.Hash', module :frdl.Hash }); require.state.emit('resolved frdl.Hash', { identifier : 'frdl.Hash', module : frdl.Hash }); }); //webfan.$Async(function(){ // require('1:ui/frdlui', function(UI){ // scope.UI =UI; // }); //},1); webfan.$Async(function(){ dummy = require('1:libraries/angular/angular', function(angular) { scope.a = angular; require('webfan/navigator/dom-observer', function(watchFor){ scope.watchFor = watchFor; require('1:ui/frdlui', function(UI){ scope.UI =UI; }); }); }); },1); dummy = require('common/x2js', function(){ }); require('webfan/tasks', function(){ }); if(false===isWorker){ webfan.$Async(function(){ var _url='5:'+location.protocol+'//'+frdl.route('HOST_CDN_PUBLIC_FRDL')+'/cdn/frdl/flow/components/locale/jsin/jsin.js'; require(_url, function(Translator) { frdl.inX = Translator; webfan.$Async(function(){ Scope.inX.start(); },250); require.state.emit('resolved', { identifier : 'frdl.inX', module :frdl.inX }); require.state.emit('resolved frdl.inX', { identifier : 'frdl.inX', module : frdl.inX }); }); },1); } frdl.formatBytes = function(bytes,decimals) { if(bytes == 0) return '0 Byte'; // var k = 1000; // or 1024 for binary var k = 1024; var dm = decimals + 1 || 3; var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; var i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; }; //deprectaed... webfan.plug('$fs --local', function(){ if(!!frdl.nw){ return require('fs'); } return frdl.fs5.polyfill.getFiler(); }); webfan.plug('$fs --local root', function(){ try{ return webfan['$fs --local']().fs.root.toURL(); }catch(err){ return document.base || window.location.href; } }); webfan.plug('file://', function(){ try{ return webfan['$fs --local']().fs.root.toURL(); }catch(err){ return document.base || window.location.href; } }); webfan.plug('app://', function(){ try{ if('temp' === Array.prototype.slice.call(arguments)[0])return webfan['$fs --local']('temp').fs.root.toURL(); return webfan['$fs --local']().fs.root.toURL(); }catch(err){ return window.location.href; } }); webfan.plug('path.exec', function(){ try{ return webfan['$fs --local']().fs.root.toURL(); }catch(err){ return document.base || window.location.href; } }); webfan.plug('$win open', function(){ var args = Array.prototype.slice.call(arguments); return window.open(args[0][0]); }); require.state.emit('resolved frdl.main', { identifier : 'frdl.main', module : main }); require.state.emit('resolved', { identifier : 'frdl.main', module : main }); return main; }; Module.prototype.jQueryPlugins = function($, jQuery){ $ = jQuery = global.jQuery; if('function'!==typeof $.each){ $.each = jQuery.each; } /*! http://unwrongest.com/projects/lazy/ Original: https://github.com/janjarfalk/jquery-lazy * @name Lazy * @descripton Lazy is Jquery plugin that lazy loads Jquery plugins * @version 1.5 * @requires Jquery 1.2.6+ * @author Jan Jarfalk jan.jarfalk@unwrongest.com * * @param{String}src Path to the plugin you want to load * @param{String}name Function name of the plugin * @param{Hash}dependencies Hash with the keys js and css * @param{Array}js Array of paths to javascript dependencies * @param{Array}css Array of paths to css dependencies * @param{Bool}cache Enable or disable caching Edited: by Till Wehowski, http://frdl.de https://github.com/frdl/jquery-lazy */ function str_replace(search, replace, subject) { try { return subject.split(search).join(replace); } catch (err) { console.warn(err); return ''; } } jQuery.lazy = $.lazy = function(options) { var url = function(plugin, url) { return ('function' === typeof $.lazy.url) ? $.lazy.url(plugin, url) : (('string' === typeof $.lazy.url) ? str_replace($.lazy.token, plugin, $.lazy.url) : false); }; if (typeof options.name === 'string') { options.name = [options.name]; } $.each(options.name, function(i) { var J = 0, src = options.src, name = options.name[i], cache = options.cache || true, isFunction = options.isFunction || true, isMethod = options.isMethod || true, self, arg, object = {}, isjQuery = options.isjQuery || true; var u = new frdl.Url(src), plugin = plugin || name, _u; if ('' === u.getScheme() && '' === u.getHost() && '' === u.getPath() && '' === u.getQuery() && '' === u.getFile()) { plugin = src; src = url(plugin, plugin); } else if ('' === u.getScheme() || '' === u.getHost() || '' === u.getPath() || '' === u.getQuery() || '' === u.getFile()) { if ('' !== u.getQuery() && true === u.hasParam($.lazy.plugin_param_default)) { plugin = u.getParam($.lazy.plugin_param_default); } if ('' === u.getScheme()) { u.setScheme(new frdl.Url(url(plugin, plugin)).getScheme()); } if ('' === u.getHost()) { u.setHost(new frdl.Url(url(plugin, plugin)).getHost()); } if ('' === u.getPath()) { u.setPath(new frdl.Url(url(plugin, plugin)).getPath()); } if ('' === u.getQuery()) { u.setQuery(new frdl.Url(url(plugin, plugin)).getQuery()); } if ('' === u.getFile()) { u.setFile(new frdl.Url(url(plugin, plugin)).getFile()); } var _port_def = new frdl.Url(url(plugin, plugin)).getPort(); if ('' !== _port_def && '' === u.getPort()) { u.setPort(_port_def); } src = u.urlMakeNew(); } else { if ('' !== u.getQuery() && true === u.hasParam($.lazy.plugin_param_default)) { plugin = u.getParam($.lazy.plugin_param_default); } } u = new frdl.Url(src); if ('' !== u.getScheme() && 'http' !== u.getScheme() && 'https' !== u.getScheme()) { u.setScheme('http'); src = str_replace('flow://', '', u.urlMakeNew()); src = str_replace('http:///', location.protocol + '//', src); } if (false === src && true === frdl.strictmode) { throw 'Invalid plugin identifier'; return false; } else if (false === src) { console.warn('Invalid frdl Plugin Asset "' + plugin + '/' + src + '"'); return false; } else if ('string' !== typeof src) { throw 'Unexpected exception in $.lazy().'; } $.lazy.archive[src] = { 'status': 'unloaded', 'plugin': plugin, 'que': [] }; function loadCSS(src, callback, self, name, arg) { var u = new frdl.Url(src); if ('' !== u.getScheme() && 'http' !== u.getScheme() && 'https' !== u.getScheme()) { u.setScheme('http'); src = str_replace('flow://', '', u.urlMakeNew()); src = str_replace('http:///', location.protocol + '//', src); } $.lazy.archive[src].status = "loading"; var node = document.createElement('link'); node.type = 'text/css'; node.rel = 'stylesheet'; node.href = src; node.setAttribute($.lazy.f_style, plugin); document.getElementsByTagName("head")[0].appendChild(node); $.lazy.archive[src].status = 'loaded'; if (callback) callback(self, name, arg); } function loadJS(src, callback, self, name, arg) { var u = new frdl.Url(src); if ('' !== u.getScheme() && 'http' !== u.getScheme() && 'https' !== u.getScheme()) { u.setScheme('https'); src = str_replace('flow://', '', u.urlMakeNew()); src = str_replace('http:///', location.protocol + '//', src); } $.lazy.archive[src].status = "loading"; // alert('5:' + src); require(/*'5:' +*/src, function(pl) { //alert(src + JSON.stringify(pl)); var s = frdl.Dom.create('script'); s.setAttribute('flow-required-src', src); s.setAttribute($.lazy.f_script, plugin); frdl.Dom.add(s, frdl.$q('head', false)); $.lazy.archive[src].status = 'loaded'; var _j = ''; _j += 'var module = new (frdl.Registry.Types.Classes.TModule)("' + src + '");'; _j += 'var exports = module.exports = function(){};'; window.eval(_j + pl.content); if (callback) { try { callback(); } catch (err) { console.warn(err); } } }, frdl.require.getCompiler('text/plain'), 'text/plain'); } function loadPlugin(self, name, arg) { function callback() { try { if (typeof self === 'object') { if (arg.length > 0) { $(self)[name].apply(self, arg); } else { $(self)[name](); } } else { $[name].apply(null, arg); } } catch (err) { console.warn(err); } $.each($.lazy.archive[src].que, function(i) { var queItem = $.lazy.archive[src].que[i]; if (typeof object[queItem.name] === 'undefined') { console.error('Could not load ' + queItem.name); } else { object[queItem.name].apply(queItem.self, queItem.arguments); } }); $.lazy.archive[src].que = []; } loadJS(src, callback, self, name, arg); } function proxy() { var self = this; arg = arguments; if ($.lazy.archive[src].status === 'loaded') { $.each(this, function() { $(this)[name].apply(self, arg); }); } else if ($.lazy.archive[src].status === 'loading') { $.lazy.archive[src].que.push({ 'name': name, 'self': self, 'arguments': arg }); } else { $.lazy.archive[src].status = 'loading'; if (options.dependencies) { var css = options.dependencies.css || [], js = options.dependencies.js || []; var total = css.length + js.length; function loadDependencies(array, callback, callbackCallback) { var length = array.length, src; array = array.reverse(); while (length-- && total--) { src = array[length]; if (typeof $.lazy.archive[src] === 'undefined') { $.lazy.archive[src] = { 'status': 'unloaded', 'que': [] }; } if ($.lazy.archive[src].status === 'unloaded') { if (!total) { callback(src, function() { loadPlugin(self, name, arg); }); } else { callback(src); } } else if (!total) { loadPlugin(self, name, arg); } } } loadDependencies(css, loadCSS); loadDependencies(js, loadJS); } else { loadPlugin(self, name, arg); } } return this; }; object[name] = proxy; if (isMethod) { jQuery.fn.extend(object); } if (isFunction) { jQuery.extend(object); } }); }; $.lazy.archive = {}; $.lazy.token = '%%PLUGINNAME%%'; $.lazy.plugin_param_default = 'plugin'; $.lazy.url = function(plugin, url) { if ('undefined' === typeof url) url = location.protocol + '//' + 'api.webfan.de/api-d/4/js-api/library.js?plugin=' + $.lazy.token; return str_replace($.lazy.token, plugin, url); }; $.lazy.f_style = 'data-frdl-plugin-asset-style'; $.lazy.f_script = 'data-frdl-plugin-asset-script'; $.lazy.loadMap = function(a) { frdl.each(a, function(ix, arr) { if ('array' === typeof arr) { try { for (var i = 0; i < arr.length; i++) { $.lazy(arr[i]); } } catch (err) { console.error(err); } } else { $.lazy(arr); } }); }; /*!#FRDL * jquery.hide-event.js * Currently supported hides: hide, fadeOut, slideUp, remove, toggle, fadeToggle, slideToggle, * css (display), animate (height: hide, opacity: hide). * When a hide `h` is called, the event "hide" is triggered, with the additional parameter ["h"]. If it is * called as an action, the second parameter will be "action". If it is set as a CSS property it will be * "css". * https://github.com/hypesystem/showandtell.js */ function applyIfExistsOrNull(fun, self, args) { return typeof fun !== "undefined" ? fun.apply(self, args) : null; } function proxy$Functions(functionProxies) { $.each(functionProxies, function(old_function_name, proxy_settings) { var old_function = $.fn[old_function_name]; $.fn[old_function_name] = function() { var pre_result = applyIfExistsOrNull(proxy_settings.pre, this, arguments); var result = old_function.apply(this, arguments); var postArguments = [result, pre_result, arguments]; applyIfExistsOrNull(proxy_settings.post, this, postArguments); return result; } }); } function checkIfElementWasHidden() { return $(this).is(":hidden"); } if (!$.showandtell) { $.showandtell = true; proxy$Functions({ hide: { pre: checkIfElementWasHidden, post: function(result, elementWasHidden, old_args) { if (!elementWasHidden) this.triggerHandler("hide", { type: "action" }); } }, show: { pre: checkIfElementWasHidden, post: function(result, elementWasHidden, old_args) { if (elementWasHidden) this.triggerHandler("show", { type: "action" }); } }, remove: { pre: function() { this.triggerHandler("remove", { type: "action" }); } }, css: { pre: checkIfElementWasHidden, post: function(result, elementWasHidden, old_args) { if (!elementWasHidden && old_args[0] == "display" && old_args[1] == "none") $(this).triggerHandler("hide", { type: "css" }); if (elementWasHidden && old_args[0] == "display" && old_args[1] != "none") $(this).triggerHandler("show", { type: "css" }); } } }); } return this; }; Module.prototype.ready = function(){ if(true===this.isReady){ this.state.emit('ready', true); return true; } return false; }; Module.prototype.interactive = function(){ var body; return !( body = !!document.body && 'complete' ) && 'complete' === document.readyState; }; Module.prototype.complete = function(){ if(false===this.isLoading && true===this.isReady){ this.state.emit('complete', true); return true; } return false; }; Module.prototype.loading = function(){ this.state.emit('loading', true); if(true===this.isLoading){ return true; } return false; }; Module.prototype.mapjQueryPlugins = function($, jQuery, m){ $ = jQuery = global.jQuery; if('undefined' !== typeof m){ $.lazy.loadMap(m); } $.lazy.loadMap([{ src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/locale/js/localizationTool.js', name: ['localizationTool', 'locale'], dependencies: { js: [], css: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/locale/css/langselect.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.js', name: ['ui', 'draggable', 'progressbar'], dependencies: { js: [], css: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.css', ] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/mobile/jquery.mobile-1.4.5.js', name: ['mobile', 'page', 'pagecreate', 'create', 'initializePage', 'pagecontainer'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.js'], css: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/mobile/css/jquery.mobile-1.4.5.min.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/mobile/css/jquery.mobile.structure-1.4.5.min.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/mobile/themes/frdl3/jquery.mobile.icons.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/mobile/themes/frdl3/frdl-mobile-1.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/cli/js/console.js', name: ['PttyLoad', 'Ptty', 'cliExec'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/cli/js/ptty.js'], css: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/cli/css/ptty.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=messenger', name: ['notificationcenter'], dependencies: { js: [], css: [location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/messenger/messenger.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/jquery-ui/jquery-ui.min.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/win.js', name: ['frdlWin', 'frdl.win'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/jquerydesktop.js', name: ['JQD'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.js'], css: [location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/reset.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/ie.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/desktop.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js', name: ['WebfanDesktop', 'wd_CloneModul', 'wd_CloneWindow', 'WebfanDesktopWindow', 'WebfanDesktopTheme', 'WebfanDesktopThemeOption', 'wd_setThemeOption'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.js', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/jquerydesktop.js', 'http://' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/win.js'], css: [location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/reset.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/ie.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/desktop.css'] }, cache: true, isjQuery: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=jquery-contextmenu', name: ['jcontextmenu'], dependencies: { js: [], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=bpopup&minify=no', name: ['bPopup'], dependencies: { js: [], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=files', name: ['fileReaderJS', 'fileClipboard'], dependencies: { js: [], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=wd-dialogs', name: ['wd_dialogs', 'FlowDialogs', 'FlowDialogsPrompt'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=bpopup'], css: [location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/jquery-ui/jquery-ui.min.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/desktop.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/ie.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=download', name: ['fileDownload'], dependencies: { js: [], css: [location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/jquery-ui/jquery-ui.min.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=socialshare', name: ['socialshare'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=cookiechoices'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=package', name: ['pack', 'package'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js', location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=application-composer'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=wd-moduleslistinstalled', name: ['wd_ModulesListInstalled'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=wd-themes', name: ['WebfanDesktopThemesList', 'wd_ThemesList'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=FlowRegister', name: ['FlowRegister'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=application-composer', name: ['ApplicationComposerOpen', 'ApplicationComposer'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=fileman', name: ['fileman'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js', location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=files', location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=schema', location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=jsoneditor'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=jsoneditor', name: ['jsoneditor'], dependencies: { js: [], css: [] }, cache: true }]); return this; }; Module.prototype.misc = function(){ window.eval(base64_decode("IHdpbmRvdy5mcmRsX3dlYmZhbl9mbG93X2FkdmVydGlzaW5nX2V4dGVybmFsX2xpbmtpbmcgPSBmdW5jdGlvbihob3N0X2xpYil7aWYoMCA8IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJypbaWQqPSJmcmRsX3dlYmZhbl9mbG93X2FkdmVydGlzaW5nX2V4dGVybmFsX2xpbmtpbmciXScpLmxlbmd0aCl7cmV0dXJuIGZhbHNlO31pZigndW5kZWZpbmVkJz09PXR5cGVvZiBob3N0X2xpYil7dmFyIGhvc3RfbGliID0gbmV3IGZyZGwuVXJsKGZyZGwuX19GSUxFX18oKSkuZ2V0SG9zdCgpO31zZXRUaW1lb3V0KGZ1bmN0aW9uKCl7ZnJkbC5yZWFkeShmdW5jdGlvbigpe2lmKDAgPCBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcqW2lkKj0iZnJkbF93ZWJmYW5fZmxvd19hZHZlcnRpc2luZ19leHRlcm5hbF9saW5raW5nIl0nKS5sZW5ndGgpe3JldHVybiBmYWxzZTt9dmFyIElEID0gJ2ZyZGxfd2ViZmFuX2Zsb3dfYWR2ZXJ0aXNpbmdfZXh0ZXJuYWxfbGlua2luZycgKyBHdWlkLm5ld0d1aWQoKTt2YXIgaG9zdCA9IG5ldyBmcmRsLlVybCgpLmdldEhvc3QoKTt2YXIgZDEgPSBleHBsb2RlKCcuJywgaG9zdC5yZXZlcnNlKCkpO3ZhciBkb21haW4xID0gZDFbMV0rJy4nK2QxWzBdO3ZhciBkMiA9IGV4cGxvZGUoJy4nLCBob3N0X2xpYi5yZXZlcnNlKCkpO3ZhciBkb21haW4yID0gZDJbMV0rJy4nK2QyWzBdO2lmKGRvbWFpbjEgIT09IGRvbWFpbjIgJiYgdHJ1ZSAhPT0gbmF2aWdhdG9yWyctd2Via2l0LXdlYmZhbiddICl7JCgnYm9keScpLnByZXBlbmQoJzxkaXYgZGF0YS13ZC1oYW5kbGU9ImRlc2t0b3AtY29udGVudCI+PGRpdiBpZD0iJysgSUQgKyciIHN0eWxlPSJwb3NpdGlvbjpmaXhlZDt6LUluZGV4Ojk5OTk7cmlnaHQ6MHB4O2JvdHRvbTowcHg7Ij4nICsnPGEgaHJlZj0iaHR0cDovL2ZyZGwud2ViZmFuLmRlLyxmbG93LjI4MC5odG1sIiB0YXJnZXQ9Il9ibGFuayIgc3R5bGU9ImZvbnQtc3R5bGU6aXRhbGljO2ZvbnQtc2l6ZTowLjZlbTtjb2xvcjojNjQ5NUVEOyI+cG93ZXJlZCZuYnNwO2J5Jm5ic3A7Jm1pY3JvOy5GbG93PC9hPicgKyc8L2Rpdj48L2Rpdj4nKTsvKiB1aHJUaW1lci5hZGQoJ1RpbWVyX2JyaW5nVG9Gcm9udF8nICsgSUQsIGZ1bmN0aW9uKCl7Ki8gZnJkbC5Eb20uYnJpbmdUb0Zyb250KGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJypbaWQqPSJmcmRsX3dlYmZhbl9mbG93X2FkdmVydGlzaW5nX2V4dGVybmFsX2xpbmtpbmciXScpLCB0cnVlKTsvKn0pOyovfX0pO30sIDgwMDApO307d2luZG93LmZyZGxfd2ViZmFuX2Zsb3dfYWR2ZXJ0aXNpbmdfZXh0ZXJuYWxfbGlua2luZygpOw==")); }; exports =module.exports = Module; var dummy = false; //if (typeof Symbol !== 'function') { // require('es6-symbol'); //} main .jQueryPlugins(jQuery, jQuery) .mapjQueryPlugins(jQuery, jQuery) .misc() ; scope.url = require.cache('url'); /* Object.defineProperty(frdl, 'a', { 'get':function() { let angular = require('1:libraries/angular/angular'); return angular; } }); */ scope.a = require('1:libraries/angular/angular', function(angular) { scope.a = angular; }); Object.defineProperty(scope, 'watchFor', { 'get':function() { return require('webfan/navigator/dom-observer'); } }); if('undefined' === typeof Array.from) { require('es6-array-extras/lib/es6-array-extras', function() { }); } Object.defineProperty(frdl, 'reg', { 'get':function() { return require('symbol-registry'); }, 'set':function(v) { throw 'Illegal set of frdl.reg'; } }); require('common/json2', function(JSON) { JSON = JSON; if('undefined' === typeof global.JSON || 'undefined' === typeof global.JSON.parse || 'undefined' === typeof global.JSON.stringify)global.JSON=window.JSON=JSON; }); Object.defineProperty(frdl, 'sql', { 'get':function() { return require('webfan/ql'); }, 'set':function(v) { frdl.sql = v; }/* , configurable : true, writable :true */ }); Object.defineProperty(Scope, 'cipher', { 'get':function() { return require('sjcl/sjcl'); } }); Object.defineProperty(global, 'Buffer', { 'get':function() { return require('buffer'); } }); if('undefined' === typeof localStorage){ var _localStorage = {}; localStorage = frdl.globalScope.localStorage = global.localStorage = window.localStorage = self.localStorage = { setItem : function(id, val) { return _localStorage[id] = String(val); }, getItem : function(id) { return _localStorage.hasOwnProperty(id) ? _localStorage[id] : null; }, removeItem : function(id) { return delete _localStorage[id]; }, clear : function() { return _localStorage = {}; } }; } if('undefined' === typeof sessionStorage){ var _sessionStorage = {}; sessionStorage = frdl.globalScope.sessionStorage = global.sessionStorage = window.sessionStorage = self.sessionStorage = { setItem : function(id, val) { return _sessionStorage[id] = String(val); }, getItem : function(id) { return _sessionStorage.hasOwnProperty(id) ? _sessionStorage[id] : null; }, removeItem : function(id) { return delete _sessionStorage[id]; }, clear : function() { return _sessionStorage = {}; } }; } require('webfan/navigator/WebkitWebfanStorage', function(mod){ Scope.$S = mod; Scope.$DB = new Scope.$S({ prefix : 'frdl://$S/schema.info/', user :null, crypt : false, pwd : null }, false); require.state.emit('resolved', { identifier : 'frdl.$DB', module :Scope.$DB }); require.state.emit('resolved frdl.$DB', { identifier : 'frdl.$DB', module : Scope.$DB }); try{ var debugmode = parseInt( frdl.$DB.load('settings/debugmode').toString() ); if(!debugmode || isNaN(debugmode))debugmode=0; } catch(err){ var debugmode = 0; } frdl.debug.mode(debugmode); frdl.ready(function(){ webfan.$Async(function(){ if(0<frdl.debug.mode()){ if('undefined'!==frdl.alert)frdl.alert.log('DEBUG ENABLED ('+frdl.debug.mode()+')'); } },3000); }); }); require.state.on('resolved 1:ui/frdlui', function(){ var args = Array.prototype.slice.call(arguments); var UI = args[0].module; UI.emitter.once('dependency.resolved', function(){ if(1<frdl.debug.mode())console.log('dependency.resolved => frdl.main.state.emit'); }); require.state.emit('resolved', { identifier : 'UI', module : UI }); require.state.emit('resolved UI', { identifier : 'UI', module : UI }); main.state.emit(Symbol.frdl.LOAD.flow, UI); }); require.state.on('resolved 3:webfan/navigator/simpledialog', function(){ var args = Array.prototype.slice.call(arguments); var alert = args[0].module; webfan.$Async(function(){ require.state.emit('resolved', { identifier : 'frdl.alert', module : alert }); require.state.emit('resolved frdl.alert', { identifier : 'frdl.alert', module : alert }); },1); }); Object.defineProperty(scope, 'alert', { 'get':function() { return require('webfan/navigator/simpledialog'); } }); require('webfan/navigator/anchor-routing', function(HashHandler) { frdl.Hash = HashHandler; require.state.emit('resolved', { identifier : 'frdl.Hash', module :frdl.Hash }); require.state.emit('resolved frdl.Hash', { identifier : 'frdl.Hash', module : frdl.Hash }); }); webfan.$Async(function(){ require('1:ui/frdlui', function(UI){ scope.UI =UI; }); },1); dummy = require('common/x2js', function(){ }); require('webfan/tasks', function(){ }); if(false===isWorker){ webfan.$Async(function(){ var _url='5:'+location.protocol+'//'+frdl.route('HOST_CDN_PUBLIC_FRDL')+'/cdn/frdl/flow/components/locale/jsin/jsin.js'; require(_url, function(Translator) { frdl.inX = Translator; webfan.$Async(function(){ Scope.inX.start(); },250); require.state.emit('resolved', { identifier : 'frdl.inX', module :frdl.inX }); require.state.emit('resolved frdl.inX', { identifier : 'frdl.inX', module : frdl.inX }); }); },1); } frdl.formatBytes = function(bytes,decimals) { if(bytes == 0) return '0 Byte'; // var k = 1000; // or 1024 for binary var k = 1024; var dm = decimals + 1 || 3; var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB']; var i = Math.floor(Math.log(bytes) / Math.log(k)); return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i]; }; (function(){ function symbolReplacer(key, value) { if (typeof value === 'symbol') { return '@@' + Symbol.keyFor(value) + '@@'; } return value; } const REGEX_SYMOBL_STRING = /^@@(.*)@@$/; function symbolReviver(key, value) { if (typeof value === 'string') { let match = REGEX_SYMOBL_STRING.test(value); if (match) { return Symbol.for(match[1]) } } return value; } /* const MY_SYMBOL = Symbol.for('http://example.com/my_symbol'); let obj = { [MY_SYMBOL]: 123 }; let str = JSON.stringify(obj, symbolReplacer); console.log(str); let parsed = JSON.parse(str, symbolReviver); console.log(parse); */ frdl.symbolReplacer = symbolReplacer; frdl.symbolReviver = symbolReviver; }()); //deprectaed... webfan.plug('$fs --local', function(){ if(!!frdl.nw){ return require('fs'); } return frdl.fs5.polyfill.getFiler(); }); webfan.plug('$fs --local root', function(){ try{ return webfan['$fs --local']().fs.root.toURL(); }catch(err){ return document.base || window.location.href; } }); webfan.plug('file://', function(){ try{ return webfan['$fs --local']().fs.root.toURL(); }catch(err){ return document.base || window.location.href; } }); webfan.plug('app://', function(){ try{ if('temp' === Array.prototype.slice.call(arguments)[0])return webfan['$fs --local']('temp').fs.root.toURL(); return webfan['$fs --local']().fs.root.toURL(); }catch(err){ return window.location.href; } }); webfan.plug('path.exec', function(){ try{ return webfan['$fs --local']().fs.root.toURL(); }catch(err){ return document.base || window.location.href; } }); webfan.plug('$win open', function(){ var args = Array.prototype.slice.call(arguments); return window.open(args[0][0]); }); require.state.emit('resolved frdl.main', { identifier : 'frdl.main', module : main }); require.state.emit('resolved', { identifier : 'frdl.main', module : main }); return main; }; Module.prototype.jQueryPlugins = function($, jQuery){ $ = jQuery = global.jQuery; if('function'!==typeof $.each){ $.each = jQuery.each; } /*! http://unwrongest.com/projects/lazy/ Original: https://github.com/janjarfalk/jquery-lazy * @name Lazy * @descripton Lazy is Jquery plugin that lazy loads Jquery plugins * @version 1.5 * @requires Jquery 1.2.6+ * @author Jan Jarfalk jan.jarfalk@unwrongest.com * * @param{String}src Path to the plugin you want to load * @param{String}name Function name of the plugin * @param{Hash}dependencies Hash with the keys js and css * @param{Array}js Array of paths to javascript dependencies * @param{Array}css Array of paths to css dependencies * @param{Bool}cache Enable or disable caching Edited: by Till Wehowski, http://frdl.de https://github.com/frdl/jquery-lazy */ function str_replace(search, replace, subject) { try { return subject.split(search).join(replace); } catch (err) { console.warn(err); return ''; } } jQuery.lazy = $.lazy = function(options) { var url = function(plugin, url) { return ('function' === typeof $.lazy.url) ? $.lazy.url(plugin, url) : (('string' === typeof $.lazy.url) ? str_replace($.lazy.token, plugin, $.lazy.url) : false); }; if (typeof options.name === 'string') { options.name = [options.name]; } $.each(options.name, function(i) { var J = 0, src = options.src, name = options.name[i], cache = options.cache || true, isFunction = options.isFunction || true, isMethod = options.isMethod || true, self, arg, object = {}, isjQuery = options.isjQuery || true; var u = new frdl.Url(src), plugin = plugin || name, _u; if ('' === u.getScheme() && '' === u.getHost() && '' === u.getPath() && '' === u.getQuery() && '' === u.getFile()) { plugin = src; src = url(plugin, plugin); } else if ('' === u.getScheme() || '' === u.getHost() || '' === u.getPath() || '' === u.getQuery() || '' === u.getFile()) { if ('' !== u.getQuery() && true === u.hasParam($.lazy.plugin_param_default)) { plugin = u.getParam($.lazy.plugin_param_default); } if ('' === u.getScheme()) { u.setScheme(new frdl.Url(url(plugin, plugin)).getScheme()); } if ('' === u.getHost()) { u.setHost(new frdl.Url(url(plugin, plugin)).getHost()); } if ('' === u.getPath()) { u.setPath(new frdl.Url(url(plugin, plugin)).getPath()); } if ('' === u.getQuery()) { u.setQuery(new frdl.Url(url(plugin, plugin)).getQuery()); } if ('' === u.getFile()) { u.setFile(new frdl.Url(url(plugin, plugin)).getFile()); } var _port_def = new frdl.Url(url(plugin, plugin)).getPort(); if ('' !== _port_def && '' === u.getPort()) { u.setPort(_port_def); } src = u.urlMakeNew(); } else { if ('' !== u.getQuery() && true === u.hasParam($.lazy.plugin_param_default)) { plugin = u.getParam($.lazy.plugin_param_default); } } u = new frdl.Url(src); if ('' !== u.getScheme() && 'http' !== u.getScheme() && 'https' !== u.getScheme()) { u.setScheme('http'); src = str_replace('flow://', '', u.urlMakeNew()); src = str_replace('http:///', location.protocol + '//', src); } if (false === src && true === frdl.strictmode) { throw 'Invalid plugin identifier'; return false; } else if (false === src) { console.warn('Invalid frdl Plugin Asset "' + plugin + '/' + src + '"'); return false; } else if ('string' !== typeof src) { throw 'Unexpected exception in $.lazy().'; } $.lazy.archive[src] = { 'status': 'unloaded', 'plugin': plugin, 'que': [] }; function loadCSS(src, callback, self, name, arg) { var u = new frdl.Url(src); if ('' !== u.getScheme() && 'http' !== u.getScheme() && 'https' !== u.getScheme()) { u.setScheme('http'); src = str_replace('flow://', '', u.urlMakeNew()); src = str_replace('http:///', location.protocol + '//', src); } $.lazy.archive[src].status = "loading"; var node = document.createElement('link'); node.type = 'text/css'; node.rel = 'stylesheet'; node.href = src; node.setAttribute($.lazy.f_style, plugin); document.getElementsByTagName("head")[0].appendChild(node); $.lazy.archive[src].status = 'loaded'; if (callback) callback(self, name, arg); } function loadJS(src, callback, self, name, arg) { var u = new frdl.Url(src); if ('' !== u.getScheme() && 'http' !== u.getScheme() && 'https' !== u.getScheme()) { u.setScheme('https'); src = str_replace('flow://', '', u.urlMakeNew()); src = str_replace('http:///', location.protocol + '//', src); } $.lazy.archive[src].status = "loading"; // alert('5:' + src); require(/*'5:' +*/src, function(pl) { //alert(src + JSON.stringify(pl)); var s = frdl.Dom.create('script'); s.setAttribute('flow-required-src', src); s.setAttribute($.lazy.f_script, plugin); frdl.Dom.add(s, frdl.$q('head', false)); $.lazy.archive[src].status = 'loaded'; var _j = ''; _j += 'var module = new (frdl.Registry.Types.Classes.TModule)("' + src + '");'; _j += 'var exports = module.exports = function(){};'; window.eval(_j + pl.content); if (callback) { try { callback(); } catch (err) { console.warn(err); } } }, frdl.require.getCompiler('text/plain'), 'text/plain'); } function loadPlugin(self, name, arg) { function callback() { try { if (typeof self === 'object') { if (arg.length > 0) { $(self)[name].apply(self, arg); } else { $(self)[name](); } } else { $[name].apply(null, arg); } } catch (err) { console.warn(err); } $.each($.lazy.archive[src].que, function(i) { var queItem = $.lazy.archive[src].que[i]; if (typeof object[queItem.name] === 'undefined') { console.error('Could not load ' + queItem.name); } else { object[queItem.name].apply(queItem.self, queItem.arguments); } }); $.lazy.archive[src].que = []; } loadJS(src, callback, self, name, arg); } function proxy() { var self = this; arg = arguments; if ($.lazy.archive[src].status === 'loaded') { $.each(this, function() { $(this)[name].apply(self, arg); }); } else if ($.lazy.archive[src].status === 'loading') { $.lazy.archive[src].que.push({ 'name': name, 'self': self, 'arguments': arg }); } else { $.lazy.archive[src].status = 'loading'; if (options.dependencies) { var css = options.dependencies.css || [], js = options.dependencies.js || []; var total = css.length + js.length; function loadDependencies(array, callback, callbackCallback) { var length = array.length, src; array = array.reverse(); while (length-- && total--) { src = array[length]; if (typeof $.lazy.archive[src] === 'undefined') { $.lazy.archive[src] = { 'status': 'unloaded', 'que': [] }; } if ($.lazy.archive[src].status === 'unloaded') { if (!total) { callback(src, function() { loadPlugin(self, name, arg); }); } else { callback(src); } } else if (!total) { loadPlugin(self, name, arg); } } } loadDependencies(css, loadCSS); loadDependencies(js, loadJS); } else { loadPlugin(self, name, arg); } } return this; }; object[name] = proxy; if (isMethod) { jQuery.fn.extend(object); } if (isFunction) { jQuery.extend(object); } }); }; $.lazy.archive = {}; $.lazy.token = '%%PLUGINNAME%%'; $.lazy.plugin_param_default = 'plugin'; $.lazy.url = function(plugin, url) { if ('undefined' === typeof url) url = location.protocol + '//' + 'api.webfan.de/api-d/4/js-api/library.js?plugin=' + $.lazy.token; return str_replace($.lazy.token, plugin, url); }; $.lazy.f_style = 'data-frdl-plugin-asset-style'; $.lazy.f_script = 'data-frdl-plugin-asset-script'; $.lazy.loadMap = function(a) { frdl.each(a, function(ix, arr) { if ('array' === typeof arr) { try { for (var i = 0; i < arr.length; i++) { $.lazy(arr[i]); } } catch (err) { console.error(err); } } else { $.lazy(arr); } }); }; /*!#FRDL * jquery.hide-event.js * Currently supported hides: hide, fadeOut, slideUp, remove, toggle, fadeToggle, slideToggle, * css (display), animate (height: hide, opacity: hide). * When a hide `h` is called, the event "hide" is triggered, with the additional parameter ["h"]. If it is * called as an action, the second parameter will be "action". If it is set as a CSS property it will be * "css". * https://github.com/hypesystem/showandtell.js */ function applyIfExistsOrNull(fun, self, args) { return typeof fun !== "undefined" ? fun.apply(self, args) : null; } function proxy$Functions(functionProxies) { $.each(functionProxies, function(old_function_name, proxy_settings) { var old_function = $.fn[old_function_name]; $.fn[old_function_name] = function() { var pre_result = applyIfExistsOrNull(proxy_settings.pre, this, arguments); var result = old_function.apply(this, arguments); var postArguments = [result, pre_result, arguments]; applyIfExistsOrNull(proxy_settings.post, this, postArguments); return result; } }); } function checkIfElementWasHidden() { return $(this).is(":hidden"); } if (!$.showandtell) { $.showandtell = true; proxy$Functions({ hide: { pre: checkIfElementWasHidden, post: function(result, elementWasHidden, old_args) { if (!elementWasHidden) this.triggerHandler("hide", { type: "action" }); } }, show: { pre: checkIfElementWasHidden, post: function(result, elementWasHidden, old_args) { if (elementWasHidden) this.triggerHandler("show", { type: "action" }); } }, remove: { pre: function() { this.triggerHandler("remove", { type: "action" }); } }, css: { pre: checkIfElementWasHidden, post: function(result, elementWasHidden, old_args) { if (!elementWasHidden && old_args[0] == "display" && old_args[1] == "none") $(this).triggerHandler("hide", { type: "css" }); if (elementWasHidden && old_args[0] == "display" && old_args[1] != "none") $(this).triggerHandler("show", { type: "css" }); } } }); } return this; }; Module.prototype.ready = function(){ if(true===this.isReady){ this.state.emit('ready', true); return true; } return false; }; Module.prototype.interactive = function(){ var body; return !( body = !!document.body && 'complete' ) && 'complete' === document.readyState; }; Module.prototype.complete = function(){ if(false===this.isLoading && true===this.isReady){ this.state.emit('complete', true); return true; } return false; }; Module.prototype.loading = function(){ this.state.emit('loading', true); if(true===this.isLoading){ return true; } return false; }; Module.prototype.mapjQueryPlugins = function($, jQuery, m){ $ = jQuery = global.jQuery; if('undefined' !== typeof m){ $.lazy.loadMap(m); } $.lazy.loadMap([{ src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/locale/js/localizationTool.js', name: ['localizationTool', 'locale'], dependencies: { js: [], css: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/locale/css/langselect.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.js', name: ['ui', 'draggable', 'progressbar'], dependencies: { js: [], css: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.css', ] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/mobile/jquery.mobile-1.4.5.js', name: ['mobile', 'page', 'pagecreate', 'create', 'initializePage', 'pagecontainer'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.js'], css: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/mobile/css/jquery.mobile-1.4.5.min.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/mobile/css/jquery.mobile.structure-1.4.5.min.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/mobile/themes/frdl3/jquery.mobile.icons.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/mobile/themes/frdl3/frdl-mobile-1.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/cli/js/console.js', name: ['PttyLoad', 'Ptty', 'cliExec'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/cli/js/ptty.js'], css: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/cli/css/ptty.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=messenger', name: ['notificationcenter'], dependencies: { js: [], css: [location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/messenger/messenger.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/jquery-ui/jquery-ui.min.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/win.js', name: ['frdlWin', 'frdl.win'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/jquerydesktop.js', name: ['JQD'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.js'], css: [location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/reset.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/ie.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/desktop.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js', name: ['WebfanDesktop', 'wd_CloneModul', 'wd_CloneWindow', 'WebfanDesktopWindow', 'WebfanDesktopTheme', 'WebfanDesktopThemeOption', 'wd_setThemeOption'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.js', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/jquerydesktop.js', 'http://' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/win.js'], css: [location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/reset.css', location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/libraries/jquery/ui/jquery-ui.min.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/ie.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/desktop.css'] }, cache: true, isjQuery: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=jquery-contextmenu', name: ['jcontextmenu'], dependencies: { js: [], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=bpopup&minify=no', name: ['bPopup'], dependencies: { js: [], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=files', name: ['fileReaderJS', 'fileClipboard'], dependencies: { js: [], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=wd-dialogs', name: ['wd_dialogs', 'FlowDialogs', 'FlowDialogsPrompt'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=bpopup'], css: [location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/jquery-ui/jquery-ui.min.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/desktop.css', location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/desktop/ie.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=download', name: ['fileDownload'], dependencies: { js: [], css: [location.protocol + '//' + 'interface.' + frdl.route('HOST_API') + '/v1/public/files/frdl/widgets/css/jquery-ui/jquery-ui.min.css'] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=socialshare', name: ['socialshare'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=cookiechoices'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=package', name: ['pack', 'package'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js', location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=application-composer'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=wd-moduleslistinstalled', name: ['wd_ModulesListInstalled'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=wd-themes', name: ['WebfanDesktopThemesList', 'wd_ThemesList'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=FlowRegister', name: ['FlowRegister'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=application-composer', name: ['ApplicationComposerOpen', 'ApplicationComposer'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=fileman', name: ['fileman'], dependencies: { js: [location.protocol + '//' + frdl.route('HOST_CDN_PUBLIC_FRDL') + '/cdn/frdl/flow/components/webfan/workspace/js/desktop2.js', location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=files', location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=schema', location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=jsoneditor'], css: [] }, cache: true }, { src: location.protocol + '//' + frdl.route('HOST_API') + '/api-d/4/js-api/library.js?plugin=jsoneditor', name: ['jsoneditor'], dependencies: { js: [], css: [] }, cache: true }]); return this; }; Module.prototype.misc = function(){ window.eval(base64_decode("IHdpbmRvdy5mcmRsX3dlYmZhbl9mbG93X2FkdmVydGlzaW5nX2V4dGVybmFsX2xpbmtpbmcgPSBmdW5jdGlvbihob3N0X2xpYil7aWYoMCA8IGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3JBbGwoJypbaWQqPSJmcmRsX3dlYmZhbl9mbG93X2FkdmVydGlzaW5nX2V4dGVybmFsX2xpbmtpbmciXScpLmxlbmd0aCl7cmV0dXJuIGZhbHNlO31pZigndW5kZWZpbmVkJz09PXR5cGVvZiBob3N0X2xpYil7dmFyIGhvc3RfbGliID0gbmV3IGZyZGwuVXJsKGZyZGwuX19GSUxFX18oKSkuZ2V0SG9zdCgpO31zZXRUaW1lb3V0KGZ1bmN0aW9uKCl7ZnJkbC5yZWFkeShmdW5jdGlvbigpe2lmKDAgPCBkb2N1bWVudC5xdWVyeVNlbGVjdG9yQWxsKCcqW2lkKj0iZnJkbF93ZWJmYW5fZmxvd19hZHZlcnRpc2luZ19leHRlcm5hbF9saW5raW5nIl0nKS5sZW5ndGgpe3JldHVybiBmYWxzZTt9dmFyIElEID0gJ2ZyZGxfd2ViZmFuX2Zsb3dfYWR2ZXJ0aXNpbmdfZXh0ZXJuYWxfbGlua2luZycgKyBHdWlkLm5ld0d1aWQoKTt2YXIgaG9zdCA9IG5ldyBmcmRsLlVybCgpLmdldEhvc3QoKTt2YXIgZDEgPSBleHBsb2RlKCcuJywgaG9zdC5yZXZlcnNlKCkpO3ZhciBkb21haW4xID0gZDFbMV0rJy4nK2QxWzBdO3ZhciBkMiA9IGV4cGxvZGUoJy4nLCBob3N0X2xpYi5yZXZlcnNlKCkpO3ZhciBkb21haW4yID0gZDJbMV0rJy4nK2QyWzBdO2lmKGRvbWFpbjEgIT09IGRvbWFpbjIgJiYgdHJ1ZSAhPT0gbmF2aWdhdG9yWyctd2Via2l0LXdlYmZhbiddICl7JCgnYm9keScpLnByZXBlbmQoJzxkaXYgZGF0YS13ZC1oYW5kbGU9ImRlc2t0b3AtY29udGVudCI+PGRpdiBpZD0iJysgSUQgKyciIHN0eWxlPSJwb3NpdGlvbjpmaXhlZDt6LUluZGV4Ojk5OTk7cmlnaHQ6MHB4O2JvdHRvbTowcHg7Ij4nICsnPGEgaHJlZj0iaHR0cDovL2ZyZGwud2ViZmFuLmRlLyxmbG93LjI4MC5odG1sIiB0YXJnZXQ9Il9ibGFuayIgc3R5bGU9ImZvbnQtc3R5bGU6aXRhbGljO2ZvbnQtc2l6ZTowLjZlbTtjb2xvcjojNjQ5NUVEOyI+cG93ZXJlZCZuYnNwO2J5Jm5ic3A7Jm1pY3JvOy5GbG93PC9hPicgKyc8L2Rpdj48L2Rpdj4nKTsvKiB1aHJUaW1lci5hZGQoJ1RpbWVyX2JyaW5nVG9Gcm9udF8nICsgSUQsIGZ1bmN0aW9uKCl7Ki8gZnJkbC5Eb20uYnJpbmdUb0Zyb250KGRvY3VtZW50LnF1ZXJ5U2VsZWN0b3IoJypbaWQqPSJmcmRsX3dlYmZhbl9mbG93X2FkdmVydGlzaW5nX2V4dGVybmFsX2xpbmtpbmciXScpLCB0cnVlKTsvKn0pOyovfX0pO30sIDgwMDApO307d2luZG93LmZyZGxfd2ViZmFuX2Zsb3dfYWR2ZXJ0aXNpbmdfZXh0ZXJuYWxfbGlua2luZygpOw==")); }; exports =module.exports = Module;