|
@@ -1,114 +0,0 @@
|
|
|
-
|
|
|
- Load this script as well as require.js (works in any order;
|
|
|
- either defines 'require', thus passing config, if loaded prior require.js;
|
|
|
- or calls require.config, if loaded post require.js).
|
|
|
- Usage example:
|
|
|
- require(['amber/devel'], function(amber) {
|
|
|
- amber.initialize({"transport.defaultAmdNamespace": "com_example_myproject"});
|
|
|
-
|
|
|
- amber.globals.Browser._open();
|
|
|
- amber.popupHelios();
|
|
|
- });
|
|
|
- For detailed explanation of amber loading, see:
|
|
|
- https:
|
|
|
- */
|
|
|
-
|
|
|
-var require;
|
|
|
-
|
|
|
-require = function (require) {
|
|
|
- function uniquelyMapped(symbolicPath) {
|
|
|
- if (require && typeof define !== "undefined" && define.amd) {
|
|
|
- var mappedPath = require.toUrl(symbolicPath),
|
|
|
- basePath = require.toUrl('') + symbolicPath;
|
|
|
- if (resolveViaDOM(mappedPath) !== resolveViaDOM(basePath)) {
|
|
|
- return mappedPath;
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- function myTag() {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- var result = uniquelyMapped('amber/amber');
|
|
|
- if (result) {
|
|
|
- return {src: result, hasAttribute: function () { return false; }};
|
|
|
- }
|
|
|
- var me = document.getElementById("amber-path-mapper");
|
|
|
- if (me && me.tagName.toLowerCase() === "script") {
|
|
|
- return me;
|
|
|
- }
|
|
|
- var scripts = document.getElementsByTagName("script");
|
|
|
- return scripts[scripts.length - 1];
|
|
|
- }
|
|
|
- var me = myTag();
|
|
|
- var src = me.src;
|
|
|
-
|
|
|
-
|
|
|
- var amber_home = resolveViaDOM(src).replace(/\/[^\/]+\/[^\/]+$/, "");
|
|
|
-
|
|
|
- var library_home = uniquelyMapped('amber_lib') || me.hasAttribute('data-libs') && me.getAttribute('data-libs');
|
|
|
-
|
|
|
-
|
|
|
- if (!library_home) {
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- var match = amber_home.match(/^(.*\/bower_components)\//);
|
|
|
- library_home = match ? match[1] : amber_home + '/bower_components';
|
|
|
- }
|
|
|
-
|
|
|
- function resolveViaDOM(url) {
|
|
|
- var a = document.createElement("a");
|
|
|
- a.href = url;
|
|
|
- return a.href;
|
|
|
- }
|
|
|
-
|
|
|
- var config = {
|
|
|
- paths: {
|
|
|
- 'amber': amber_home + '/support',
|
|
|
- 'amber_vm': amber_home + '/support/deprecated-vm-files',
|
|
|
- 'amber_vm/_st': amber_home + '/support/deprecated-vm-files/as-receiver',
|
|
|
- 'amber_css': amber_home + '/support/resources',
|
|
|
- 'amber_lib': library_home,
|
|
|
- 'amber_core': amber_home + '/src',
|
|
|
- 'helios': amber_home + '/support/helios/src',
|
|
|
- 'helios/set': amber_home + '/support/helios/set',
|
|
|
- 'helios/resources': amber_home + '/support/helios/resources',
|
|
|
- 'helios/index': amber_home + '/support/helios/index',
|
|
|
- 'jquery': [ library_home + '/jquery/dist/jquery.min', library_home + '/jquery/jquery.min' ]
|
|
|
- },
|
|
|
- map: {
|
|
|
- '*': {
|
|
|
- 'css': 'amber_lib/require-css/css'
|
|
|
- }
|
|
|
- },
|
|
|
- shim: {
|
|
|
- 'ensure-console': {
|
|
|
- exports: 'console'
|
|
|
- }
|
|
|
- }
|
|
|
- };
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
- if (require) {
|
|
|
- require.config(config);
|
|
|
- return require;
|
|
|
- } else {
|
|
|
- return config;
|
|
|
- }
|
|
|
-}(require);
|