cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject [02/14] removed unnessary files
Date Fri, 23 Aug 2013 21:49:08 GMT
http://git-wip-us.apache.org/repos/asf/cordova-firefoxos/blob/29da7f53/lib/cordova.firefoxos-debug.js
----------------------------------------------------------------------
diff --git a/lib/cordova.firefoxos-debug.js b/lib/cordova.firefoxos-debug.js
deleted file mode 100644
index 84d589b..0000000
--- a/lib/cordova.firefoxos-debug.js
+++ /dev/null
@@ -1,129 +0,0 @@
-// Platform: firefoxos
-
-// commit 125dca530923a44a8f44f68f5e1970cbdd4e7faf
-
-// File generated at :: Wed Apr 03 2013 16:15:48 GMT-0700 (PDT)
-
-/*
- Licensed to the Apache Software Foundation (ASF) under one
- or more contributor license agreements.  See the NOTICE file
- distributed with this work for additional information
- regarding copyright ownership.  The ASF licenses this file
- to you under the Apache License, Version 2.0 (the
- "License"); you may not use this file except in compliance
- with the License.  You may obtain a copy of the License at
- 
-     http://www.apache.org/licenses/LICENSE-2.0
- 
- Unless required by applicable law or agreed to in writing,
- software distributed under the License is distributed on an
- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- KIND, either express or implied.  See the License for the
- specific language governing permissions and limitations
- under the License.
-*/
-
-;(function() {
-
-try {eval("\nvar require,\n    define;\n\n(function () {\n    var modules = {};\n    // Stack of moduleIds currently being built.\n    var requireStack = [];\n    // Map of module ID -> index into requireStack of modules currently being built.\n    var inProgressModules = {};\n\n    function build(module) {\n        var factory = module.factory;\n        module.exports = {};\n        delete module.factory;\n        factory(require, module.exports, module);\n        return module.exports;\n    }\n\n    require = function (id) {\n        if (!modules[id]) {\n            throw \"module \" + id + \" not found\";\n        } else if (id in inProgressModules) {\n            var cycle = requireStack.slice(inProgressModules[id]).join('->') + '->' + id;\n            throw \"Cycle in require graph: \" + cycle;\n        }\n        if (modules[id].factory) {\n            try {\n                inProgressModules[id] = requireStack.length;\n                requireStack.push(id);\n                r
 eturn build(modules[id]);\n            } finally {\n                delete inProgressModules[id];\n                requireStack.pop();\n            }\n        }\n        return modules[id].exports;\n    };\n\n    define = function (id, factory) {\n        if (modules[id]) {\n            throw \"module \" + id + \" already defined\";\n        }\n\n        modules[id] = {\n            id: id,\n            factory: factory\n        };\n    };\n\n    define.remove = function (id) {\n        delete modules[id];\n    };\n\n    define.moduleMap = modules;\n})();\n\n//Export for use in node\nif (typeof module === \"object\" && typeof require === \"function\") {\n    module.exports.require = require;\n    module.exports.define = define;\n}\n\n//@ sourceURL=lib/scripts/require.js")} catch(e) {console.log("exception: in lib/scripts/require.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova\", function(require, exports, module) {\n\n\nvar channel = require('cordova/channel');\n\n/**\n * Listen for DOMContentLoaded and notify our channel subscribers.\n */\ndocument.addEventListener('DOMContentLoaded', function() {\n    channel.onDOMContentLoaded.fire();\n}, false);\nif (document.readyState == 'complete' || document.readyState == 'interactive') {\n    channel.onDOMContentLoaded.fire();\n}\n\n/**\n * Intercept calls to addEventListener + removeEventListener and handle deviceready,\n * resume, and pause events.\n */\nvar m_document_addEventListener = document.addEventListener;\nvar m_document_removeEventListener = document.removeEventListener;\nvar m_window_addEventListener = window.addEventListener;\nvar m_window_removeEventListener = window.removeEventListener;\n\n/**\n * Houses custom event handlers to intercept on document + window event listeners.\n */\nvar documentEventHandlers = {},\n    windowEventHandlers = {};\n\ndocument.addEventListe
 ner = function(evt, handler, capture) {\n    var e = evt.toLowerCase();\n    if (typeof documentEventHandlers[e] != 'undefined') {\n        documentEventHandlers[e].subscribe(handler);\n    } else {\n        m_document_addEventListener.call(document, evt, handler, capture);\n    }\n};\n\nwindow.addEventListener = function(evt, handler, capture) {\n    var e = evt.toLowerCase();\n    if (typeof windowEventHandlers[e] != 'undefined') {\n        windowEventHandlers[e].subscribe(handler);\n    } else {\n        m_window_addEventListener.call(window, evt, handler, capture);\n    }\n};\n\ndocument.removeEventListener = function(evt, handler, capture) {\n    var e = evt.toLowerCase();\n    // If unsubscribing from an event that is handled by a plugin\n    if (typeof documentEventHandlers[e] != \"undefined\") {\n        documentEventHandlers[e].unsubscribe(handler);\n    } else {\n        m_document_removeEventListener.call(document, evt, handler, capture);\n    }\n};\n\nwindow.removeEventL
 istener = function(evt, handler, capture) {\n    var e = evt.toLowerCase();\n    // If unsubscribing from an event that is handled by a plugin\n    if (typeof windowEventHandlers[e] != \"undefined\") {\n        windowEventHandlers[e].unsubscribe(handler);\n    } else {\n        m_window_removeEventListener.call(window, evt, handler, capture);\n    }\n};\n\nfunction createEvent(type, data) {\n    var event = document.createEvent('Events');\n    event.initEvent(type, false, false);\n    if (data) {\n        for (var i in data) {\n            if (data.hasOwnProperty(i)) {\n                event[i] = data[i];\n            }\n        }\n    }\n    return event;\n}\n\nif(typeof window.console === \"undefined\") {\n    window.console = {\n        log:function(){}\n    };\n}\n\nvar cordova = {\n    define:define,\n    require:require,\n    /**\n     * Methods to add/remove your own addEventListener hijacking on document + window.\n     */\n    addWindowEventHandler:function(event) {\n      
   return (windowEventHandlers[event] = channel.create(event));\n    },\n    addStickyDocumentEventHandler:function(event) {\n        return (documentEventHandlers[event] = channel.createSticky(event));\n    },\n    addDocumentEventHandler:function(event) {\n        return (documentEventHandlers[event] = channel.create(event));\n    },\n    removeWindowEventHandler:function(event) {\n        delete windowEventHandlers[event];\n    },\n    removeDocumentEventHandler:function(event) {\n        delete documentEventHandlers[event];\n    },\n    /**\n     * Retrieve original event handlers that were replaced by Cordova\n     *\n     * @return object\n     */\n    getOriginalHandlers: function() {\n        return {'document': {'addEventListener': m_document_addEventListener, 'removeEventListener': m_document_removeEventListener},\n        'window': {'addEventListener': m_window_addEventListener, 'removeEventListener': m_window_removeEventListener}};\n    },\n    /**\n     * Method to fire 
 event from native code\n     * bNoDetach is required for events which cause an exception which needs to be caught in native code\n     */\n    fireDocumentEvent: function(type, data, bNoDetach) {\n        var evt = createEvent(type, data);\n        if (typeof documentEventHandlers[type] != 'undefined') {\n            if( bNoDetach ) {\n              documentEventHandlers[type].fire(evt);\n            }\n            else {\n              setTimeout(function() {\n                  documentEventHandlers[type].fire(evt);\n              }, 0);\n            }\n        } else {\n            document.dispatchEvent(evt);\n        }\n    },\n    fireWindowEvent: function(type, data) {\n        var evt = createEvent(type,data);\n        if (typeof windowEventHandlers[type] != 'undefined') {\n            setTimeout(function() {\n                windowEventHandlers[type].fire(evt);\n            }, 0);\n        } else {\n            window.dispatchEvent(evt);\n        }\n    },\n\n    /**\n     *
  Plugin callback mechanism.\n     */\n    // Randomize the starting callbackId to avoid collisions after refreshing or navigating.\n    // This way, it's very unlikely that any new callback would get the same callbackId as an old callback.\n    callbackId: Math.floor(Math.random() * 2000000000),\n    callbacks:  {},\n    callbackStatus: {\n        NO_RESULT: 0,\n        OK: 1,\n        CLASS_NOT_FOUND_EXCEPTION: 2,\n        ILLEGAL_ACCESS_EXCEPTION: 3,\n        INSTANTIATION_EXCEPTION: 4,\n        MALFORMED_URL_EXCEPTION: 5,\n        IO_EXCEPTION: 6,\n        INVALID_ACTION: 7,\n        JSON_EXCEPTION: 8,\n        ERROR: 9\n    },\n\n    /**\n     * Called by native code when returning successful result from an action.\n     */\n    callbackSuccess: function(callbackId, args) {\n        try {\n            cordova.callbackFromNative(callbackId, true, args.status, [args.message], args.keepCallback);\n        } catch (e) {\n            console.log(\"Error in error callback: \" + callba
 ckId + \" = \"+e);\n        }\n    },\n\n    /**\n     * Called by native code when returning error result from an action.\n     */\n    callbackError: function(callbackId, args) {\n        // TODO: Deprecate callbackSuccess and callbackError in favour of callbackFromNative.\n        // Derive success from status.\n        try {\n            cordova.callbackFromNative(callbackId, false, args.status, [args.message], args.keepCallback);\n        } catch (e) {\n            console.log(\"Error in error callback: \" + callbackId + \" = \"+e);\n        }\n    },\n\n    /**\n     * Called by native code when returning the result from an action.\n     */\n    callbackFromNative: function(callbackId, success, status, args, keepCallback) {\n        var callback = cordova.callbacks[callbackId];\n        if (callback) {\n            if (success && status == cordova.callbackStatus.OK) {\n                callback.success && callback.success.apply(null, args);\n            } else if (!success) {\n
                 callback.fail && callback.fail.apply(null, args);\n            }\n\n            // Clear callback if not expecting any more results\n            if (!keepCallback) {\n                delete cordova.callbacks[callbackId];\n            }\n        }\n    },\n    addConstructor: function(func) {\n        channel.onCordovaReady.subscribe(function() {\n            try {\n                func();\n            } catch(e) {\n                console.log(\"Failed to run constructor: \" + e);\n            }\n        });\n    }\n};\n\n// Register pause, resume and deviceready channels as events on document.\nchannel.onPause = cordova.addDocumentEventHandler('pause');\nchannel.onResume = cordova.addDocumentEventHandler('resume');\nchannel.onDeviceReady = cordova.addStickyDocumentEventHandler('deviceready');\n\nmodule.exports = cordova;\n\n});\n\n//@ sourceURL=lib/cordova.js")} catch(e) {console.log("exception: in lib/cordova.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/argscheck\", function(require, exports, module) {\n\nvar exec = require('cordova/exec');\nvar utils = require('cordova/utils');\n\nvar moduleExports = module.exports;\n\nvar typeMap = {\n    'A': 'Array',\n    'D': 'Date',\n    'N': 'Number',\n    'S': 'String',\n    'F': 'Function',\n    'O': 'Object'\n};\n\nfunction extractParamName(callee, argIndex) {\n  return (/.*?\\((.*?)\\)/).exec(callee)[1].split(', ')[argIndex];\n}\n\nfunction checkArgs(spec, functionName, args, opt_callee) {\n    if (!moduleExports.enableChecks) {\n        return;\n    }\n    var errMsg = null;\n    var typeName;\n    for (var i = 0; i < spec.length; ++i) {\n        var c = spec.charAt(i),\n            cUpper = c.toUpperCase(),\n            arg = args[i];\n        // Asterix means allow anything.\n        if (c == '*') {\n            continue;\n        }\n        typeName = utils.typeName(arg);\n        if ((arg === null || arg === undefined) && c == cUpper) {\n            conti
 nue;\n        }\n        if (typeName != typeMap[cUpper]) {\n            errMsg = 'Expected ' + typeMap[cUpper];\n            break;\n        }\n    }\n    if (errMsg) {\n        errMsg += ', but got ' + typeName + '.';\n        errMsg = 'Wrong type for parameter \"' + extractParamName(opt_callee || args.callee, i) + '\" of ' + functionName + ': ' + errMsg;\n        // Don't log when running jake test.\n        if (typeof jasmine == 'undefined') {\n            console.error(errMsg);\n        }\n        throw TypeError(errMsg);\n    }\n}\n\nfunction getValue(value, defaultValue) {\n    return value === undefined ? defaultValue : value;\n}\n\nmoduleExports.checkArgs = checkArgs;\nmoduleExports.getValue = getValue;\nmoduleExports.enableChecks = true;\n\n\n});\n\n//@ sourceURL=lib/common/argscheck.js")} catch(e) {console.log("exception: in lib/common/argscheck.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/builder\", function(require, exports, module) {\n\nvar utils = require('cordova/utils');\n\nfunction each(objects, func, context) {\n    for (var prop in objects) {\n        if (objects.hasOwnProperty(prop)) {\n            func.apply(context, [objects[prop], prop]);\n        }\n    }\n}\n\nfunction clobber(obj, key, value) {\n    exports.replaceHookForTesting(obj, key);\n    obj[key] = value;\n    // Getters can only be overridden by getters.\n    if (obj[key] !== value) {\n        utils.defineGetter(obj, key, function() {\n            return value;\n        });\n    }\n}\n\nfunction assignOrWrapInDeprecateGetter(obj, key, value, message) {\n    if (message) {\n        utils.defineGetter(obj, key, function() {\n            console.log(message);\n            delete obj[key];\n            clobber(obj, key, value);\n            return value;\n        });\n    } else {\n        clobber(obj, key, value);\n    }\n}\n\nfunction include(parent, objects, clobber, 
 merge) {\n    each(objects, function (obj, key) {\n        try {\n          var result = obj.path ? require(obj.path) : {};\n\n          if (clobber) {\n              // Clobber if it doesn't exist.\n              if (typeof parent[key] === 'undefined') {\n                  assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n              } else if (typeof obj.path !== 'undefined') {\n                  // If merging, merge properties onto parent, otherwise, clobber.\n                  if (merge) {\n                      recursiveMerge(parent[key], result);\n                  } else {\n                      assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n                  }\n              }\n              result = parent[key];\n          } else {\n            // Overwrite if not currently defined.\n            if (typeof parent[key] == 'undefined') {\n              assignOrWrapInDeprecateGetter(parent, key, result, obj.deprecated);\n            }
  else {\n              // Set result to what already exists, so we can build children into it if they exist.\n              result = parent[key];\n            }\n          }\n\n          if (obj.children) {\n            include(result, obj.children, clobber, merge);\n          }\n        } catch(e) {\n          utils.alert('Exception building cordova JS globals: ' + e + ' for key \"' + key + '\"');\n        }\n    });\n}\n\n/**\n * Merge properties from one object onto another recursively.  Properties from\n * the src object will overwrite existing target property.\n *\n * @param target Object to merge properties into.\n * @param src Object to merge properties from.\n */\nfunction recursiveMerge(target, src) {\n    for (var prop in src) {\n        if (src.hasOwnProperty(prop)) {\n            if (target.prototype && target.prototype.constructor === target) {\n                // If the target object is a constructor override off prototype.\n                clobber(target.prototype, pr
 op, src[prop]);\n            } else {\n                if (typeof src[prop] === 'object' && typeof target[prop] === 'object') {\n                    recursiveMerge(target[prop], src[prop]);\n                } else {\n                    clobber(target, prop, src[prop]);\n                }\n            }\n        }\n    }\n}\n\nexports.buildIntoButDoNotClobber = function(objects, target) {\n    include(target, objects, false, false);\n};\nexports.buildIntoAndClobber = function(objects, target) {\n    include(target, objects, true, false);\n};\nexports.buildIntoAndMerge = function(objects, target) {\n    include(target, objects, true, true);\n};\nexports.recursiveMerge = recursiveMerge;\nexports.assignOrWrapInDeprecateGetter = assignOrWrapInDeprecateGetter;\nexports.replaceHookForTesting = function() {};\n\n});\n\n//@ sourceURL=lib/common/builder.js")} catch(e) {console.log("exception: in lib/common/builder.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/channel\", function(require, exports, module) {\n\nvar utils = require('cordova/utils'),\n    nextGuid = 1;\n\n/**\n * Custom pub-sub \"channel\" that can have functions subscribed to it\n * This object is used to define and control firing of events for\n * cordova initialization, as well as for custom events thereafter.\n *\n * The order of events during page load and Cordova startup is as follows:\n *\n * onDOMContentLoaded*         Internal event that is received when the web page is loaded and parsed.\n * onNativeReady*              Internal event that indicates the Cordova native side is ready.\n * onCordovaReady*             Internal event fired when all Cordova JavaScript objects have been created.\n * onCordovaInfoReady*         Internal event fired when device properties are available.\n * onCordovaConnectionReady*   Internal event fired when the connection property has been set.\n * onDeviceReady*              User event fired to indicate that C
 ordova is ready\n * onResume                    User event fired to indicate a start/resume lifecycle event\n * onPause                     User event fired to indicate a pause lifecycle event\n * onDestroy*                  Internal event fired when app is being destroyed (User should use window.onunload event, not this one).\n *\n * The events marked with an * are sticky. Once they have fired, they will stay in the fired state.\n * All listeners that subscribe after the event is fired will be executed right away.\n *\n * The only Cordova events that user code should register for are:\n *      deviceready           Cordova native code is initialized and Cordova APIs can be called from JavaScript\n *      pause                 App has moved to background\n *      resume                App has returned to foreground\n *\n * Listeners can be registered as:\n *      document.addEventListener(\"deviceready\", myDeviceReadyListener, false);\n *      document.addEventListener(\"resume\", 
 myResumeListener, false);\n *      document.addEventListener(\"pause\", myPauseListener, false);\n *\n * The DOM lifecycle events should be used for saving and restoring state\n *      window.onload\n *      window.onunload\n *\n */\n\n/**\n * Channel\n * @constructor\n * @param type  String the channel name\n */\nvar Channel = function(type, sticky) {\n    this.type = type;\n    // Map of guid -> function.\n    this.handlers = {};\n    // 0 = Non-sticky, 1 = Sticky non-fired, 2 = Sticky fired.\n    this.state = sticky ? 1 : 0;\n    // Used in sticky mode to remember args passed to fire().\n    this.fireArgs = null;\n    // Used by onHasSubscribersChange to know if there are any listeners.\n    this.numHandlers = 0;\n    // Function that is called when the first listener is subscribed, or when\n    // the last listener is unsubscribed.\n    this.onHasSubscribersChange = null;\n},\n    channel = {\n        /**\n         * Calls the provided function only after all of the channels spe
 cified\n         * have been fired. All channels must be sticky channels.\n         */\n        join: function(h, c) {\n            var len = c.length,\n                i = len,\n                f = function() {\n                    if (!(--i)) h();\n                };\n            for (var j=0; j<len; j++) {\n                if (c[j].state === 0) {\n                    throw Error('Can only use join with sticky channels.');\n                }\n                c[j].subscribe(f);\n            }\n            if (!len) h();\n        },\n        create: function(type) {\n            return channel[type] = new Channel(type, false);\n        },\n        createSticky: function(type) {\n            return channel[type] = new Channel(type, true);\n        },\n\n        /**\n         * cordova Channels that must fire before \"deviceready\" is fired.\n         */\n        deviceReadyChannelsArray: [],\n        deviceReadyChannelsMap: {},\n\n        /**\n         * Indicate that a feature needs
  to be initialized before it is ready to be used.\n         * This holds up Cordova's \"deviceready\" event until the feature has been initialized\n         * and Cordova.initComplete(feature) is called.\n         *\n         * @param feature {String}     The unique feature name\n         */\n        waitForInitialization: function(feature) {\n            if (feature) {\n                var c = channel[feature] || this.createSticky(feature);\n                this.deviceReadyChannelsMap[feature] = c;\n                this.deviceReadyChannelsArray.push(c);\n            }\n        },\n\n        /**\n         * Indicate that initialization code has completed and the feature is ready to be used.\n         *\n         * @param feature {String}     The unique feature name\n         */\n        initializationComplete: function(feature) {\n            var c = this.deviceReadyChannelsMap[feature];\n            if (c) {\n                c.fire();\n            }\n        }\n    };\n\nfunction f
 orceFunction(f) {\n    if (typeof f != 'function') throw \"Function required as first argument!\";\n}\n\n/**\n * Subscribes the given function to the channel. Any time that\n * Channel.fire is called so too will the function.\n * Optionally specify an execution context for the function\n * and a guid that can be used to stop subscribing to the channel.\n * Returns the guid.\n */\nChannel.prototype.subscribe = function(f, c) {\n    // need a function to call\n    forceFunction(f);\n    if (this.state == 2) {\n        f.apply(c || this, this.fireArgs);\n        return;\n    }\n\n    var func = f,\n        guid = f.observer_guid;\n    if (typeof c == \"object\") { func = utils.close(c, f); }\n\n    if (!guid) {\n        // first time any channel has seen this subscriber\n        guid = '' + nextGuid++;\n    }\n    func.observer_guid = guid;\n    f.observer_guid = guid;\n\n    // Don't add the same handler more than once.\n    if (!this.handlers[guid]) {\n        this.handlers[guid] = f
 unc;\n        this.numHandlers++;\n        if (this.numHandlers == 1) {\n            this.onHasSubscribersChange && this.onHasSubscribersChange();\n        }\n    }\n};\n\n/**\n * Unsubscribes the function with the given guid from the channel.\n */\nChannel.prototype.unsubscribe = function(f) {\n    // need a function to unsubscribe\n    forceFunction(f);\n\n    var guid = f.observer_guid,\n        handler = this.handlers[guid];\n    if (handler) {\n        delete this.handlers[guid];\n        this.numHandlers--;\n        if (this.numHandlers === 0) {\n            this.onHasSubscribersChange && this.onHasSubscribersChange();\n        }\n    }\n};\n\n/**\n * Calls all functions subscribed to this channel.\n */\nChannel.prototype.fire = function(e) {\n    var fail = false,\n        fireArgs = Array.prototype.slice.call(arguments);\n    // Apply stickiness.\n    if (this.state == 1) {\n        this.state = 2;\n        this.fireArgs = fireArgs;\n    }\n    if (this.numHandlers) {\n     
    // Copy the values first so that it is safe to modify it from within\n        // callbacks.\n        var toCall = [];\n        for (var item in this.handlers) {\n            toCall.push(this.handlers[item]);\n        }\n        for (var i = 0; i < toCall.length; ++i) {\n            toCall[i].apply(this, fireArgs);\n        }\n        if (this.state == 2 && this.numHandlers) {\n            this.numHandlers = 0;\n            this.handlers = {};\n            this.onHasSubscribersChange && this.onHasSubscribersChange();\n        }\n    }\n};\n\n\n// defining them here so they are ready super fast!\n// DOM event that is received when the web page is loaded and parsed.\nchannel.createSticky('onDOMContentLoaded');\n\n// Event to indicate the Cordova native side is ready.\nchannel.createSticky('onNativeReady');\n\n// Event to indicate that all Cordova JavaScript objects have been created\n// and it's time to run plugin constructors.\nchannel.createSticky('onCordovaReady');\n\n// Event to
  indicate that device properties are available\nchannel.createSticky('onCordovaInfoReady');\n\n// Event to indicate that the connection property has been set.\nchannel.createSticky('onCordovaConnectionReady');\n\n// Event to indicate that all automatically loaded JS plugins are loaded and ready.\nchannel.createSticky('onPluginsReady');\n\n// Event to indicate that Cordova is ready\nchannel.createSticky('onDeviceReady');\n\n// Event to indicate a resume lifecycle event\nchannel.create('onResume');\n\n// Event to indicate a pause lifecycle event\nchannel.create('onPause');\n\n// Event to indicate a destroy lifecycle event\nchannel.createSticky('onDestroy');\n\n// Channels that must fire before \"deviceready\" is fired.\nchannel.waitForInitialization('onCordovaReady');\nchannel.waitForInitialization('onCordovaConnectionReady');\n\nmodule.exports = channel;\n\n});\n\n//@ sourceURL=lib/common/channel.js")} catch(e) {console.log("exception: in lib/common/channel.js: " + e);console.log(e.s
 tack);}
-try {eval("define(\"cordova/commandProxy\", function(require, exports, module) {\n\n\n// internal map of proxy function\nvar CommandProxyMap = {};\n\nmodule.exports = {\n\n    // example: cordova.commandProxy.add(\"Accelerometer\",{getCurrentAcceleration: function(successCallback, errorCallback, options) {...},...);\n    add:function(id,proxyObj) {\n        console.log(\"adding proxy for \" + id);\n        CommandProxyMap[id] = proxyObj;\n        return proxyObj;\n    },\n\n    // cordova.commandProxy.remove(\"Accelerometer\");\n    remove:function(id) {\n        var proxy = CommandProxyMap[id];\n        delete CommandProxyMap[id];\n        CommandProxyMap[id] = null;\n        return proxy;\n    },\n\n    get:function(service,action) {\n        return ( CommandProxyMap[service] ? CommandProxyMap[service][action] : null );\n    }\n};\n});\n\n//@ sourceURL=lib/common/commandProxy.js")} catch(e) {console.log("exception: in lib/common/commandProxy.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/exec\", function(require, exports, module) {\n\n/**\n * Execute a cordova command.  It is up to the native side whether this action\n * is synchronous or asynchronous.  The native side can return:\n *      Synchronous: PluginResult object as a JSON string\n *      Asynchrounous: Empty string \"\"\n * If async, the native side will cordova.callbackSuccess or cordova.callbackError,\n * depending upon the result of the action.\n *\n * @param {Function} success    The success callback\n * @param {Function} fail       The fail callback\n * @param {String} service      The name of the service to use\n * @param {String} action       Action to be run in cordova\n * @param {String[]} [args]     Zero or more arguments to pass to the method\n */\n\nvar plugins = {\n    \"Device\": require('cordova/plugin/firefoxos/device'),\n    \"NetworkStatus\": require('cordova/plugin/firefoxos/network'),\n    \"Accelerometer\" : require('cordova/plugin/firefoxos/accelerometer')\
 n    //\"Notification\" : require('cordova/plugin/firefoxos/notification')\n};\n\nmodule.exports = function(success, fail, service, action, args) {\n    try {\n        console.error(\"exec:call plugin:\"+service+\":\"+action);\n        plugins[service][action](success, fail, args);\n    }\n    catch(e) {\n        console.error(\"missing exec: \" + service + \".\" + action);\n        console.error(args);\n        console.error(e);\n        console.error(e.stack);\n    }\n};\n\n});\n\n//@ sourceURL=lib/firefoxos/exec.js")} catch(e) {console.log("exception: in lib/firefoxos/exec.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/modulemapper\", function(require, exports, module) {\n\nvar builder = require('cordova/builder'),\n    moduleMap = define.moduleMap,\n    symbolList,\n    deprecationMap;\n\nexports.reset = function() {\n    symbolList = [];\n    deprecationMap = {};\n};\n\nfunction addEntry(strategy, moduleName, symbolPath, opt_deprecationMessage) {\n    if (!(moduleName in moduleMap)) {\n        throw new Error('Module ' + moduleName + ' does not exist.');\n    }\n    symbolList.push(strategy, moduleName, symbolPath);\n    if (opt_deprecationMessage) {\n        deprecationMap[symbolPath] = opt_deprecationMessage;\n    }\n}\n\n// Note: Android 2.3 does have Function.bind().\nexports.clobbers = function(moduleName, symbolPath, opt_deprecationMessage) {\n    addEntry('c', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nexports.merges = function(moduleName, symbolPath, opt_deprecationMessage) {\n    addEntry('m', moduleName, symbolPath, opt_deprecationMessage);\n};\
 n\nexports.defaults = function(moduleName, symbolPath, opt_deprecationMessage) {\n    addEntry('d', moduleName, symbolPath, opt_deprecationMessage);\n};\n\nfunction prepareNamespace(symbolPath, context) {\n    if (!symbolPath) {\n        return context;\n    }\n    var parts = symbolPath.split('.');\n    var cur = context;\n    for (var i = 0, part; part = parts[i]; ++i) {\n        cur = cur[part] = cur[part] || {};\n    }\n    return cur;\n}\n\nexports.mapModules = function(context) {\n    var origSymbols = {};\n    context.CDV_origSymbols = origSymbols;\n    for (var i = 0, len = symbolList.length; i < len; i += 3) {\n        var strategy = symbolList[i];\n        var moduleName = symbolList[i + 1];\n        var symbolPath = symbolList[i + 2];\n        var lastDot = symbolPath.lastIndexOf('.');\n        var namespace = symbolPath.substr(0, lastDot);\n        var lastName = symbolPath.substr(lastDot + 1);\n\n        var module = require(moduleName);\n        var deprecationMsg = sy
 mbolPath in deprecationMap ? 'Access made to deprecated symbol: ' + symbolPath + '. ' + deprecationMsg : null;\n        var parentObj = prepareNamespace(namespace, context);\n        var target = parentObj[lastName];\n\n        if (strategy == 'm' && target) {\n            builder.recursiveMerge(target, module);\n        } else if ((strategy == 'd' && !target) || (strategy != 'd')) {\n            if (!(symbolPath in origSymbols)) {\n                origSymbols[symbolPath] = target;\n            }\n            builder.assignOrWrapInDeprecateGetter(parentObj, lastName, module, deprecationMsg);\n        }\n    }\n};\n\nexports.getOriginalSymbol = function(context, symbolPath) {\n    var origSymbols = context.CDV_origSymbols;\n    if (origSymbols && (symbolPath in origSymbols)) {\n        return origSymbols[symbolPath];\n    }\n    var parts = symbolPath.split('.');\n    var obj = context;\n    for (var i = 0; i < parts.length; ++i) {\n        obj = obj && obj[parts[i]];\n    }\n    ret
 urn obj;\n};\n\nexports.loadMatchingModules = function(matchingRegExp) {\n    for (var k in moduleMap) {\n        if (matchingRegExp.exec(k)) {\n            require(k);\n        }\n    }\n};\n\nexports.reset();\n\n\n});\n\n//@ sourceURL=lib/common/modulemapper.js")} catch(e) {console.log("exception: in lib/common/modulemapper.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/platform\", function(require, exports, module) {\n\nmodule.exports = {\n    id: \"firefoxos\",\n    initialize: function() {\n    }\n};\n});\n\n//@ sourceURL=lib/firefoxos/platform.js")} catch(e) {console.log("exception: in lib/firefoxos/platform.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/Acceleration\", function(require, exports, module) {\n\nvar Acceleration = function(x, y, z, timestamp) {\n    this.x = x;\n    this.y = y;\n    this.z = z;\n    this.timestamp = timestamp || (new Date()).getTime();\n};\n\nmodule.exports = Acceleration;\n\n});\n\n//@ sourceURL=lib/common/plugin/Acceleration.js")} catch(e) {console.log("exception: in lib/common/plugin/Acceleration.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/Camera\", function(require, exports, module) {\n\nvar argscheck = require('cordova/argscheck'),\n    exec = require('cordova/exec'),\n    Camera = require('cordova/plugin/CameraConstants'),\n    CameraPopoverHandle = require('cordova/plugin/CameraPopoverHandle');\n\nvar cameraExport = {};\n\n// Tack on the Camera Constants to the base camera plugin.\nfor (var key in Camera) {\n    cameraExport[key] = Camera[key];\n}\n\n/**\n * Gets a picture from source defined by \"options.sourceType\", and returns the\n * image as defined by the \"options.destinationType\" option.\n\n * The defaults are sourceType=CAMERA and destinationType=FILE_URI.\n *\n * @param {Function} successCallback\n * @param {Function} errorCallback\n * @param {Object} options\n */\ncameraExport.getPicture = function(successCallback, errorCallback, options) {\n    argscheck.checkArgs('fFO', 'Camera.getPicture', arguments);\n    options = options || {};\n    var getValue = argscheck.get
 Value;\n\n    var quality = getValue(options.quality, 50);\n    var destinationType = getValue(options.destinationType, Camera.DestinationType.FILE_URI);\n    var sourceType = getValue(options.sourceType, Camera.PictureSourceType.CAMERA);\n    var targetWidth = getValue(options.targetWidth, -1);\n    var targetHeight = getValue(options.targetHeight, -1);\n    var encodingType = getValue(options.encodingType, Camera.EncodingType.JPEG);\n    var mediaType = getValue(options.mediaType, Camera.MediaType.PICTURE);\n    var allowEdit = !!options.allowEdit;\n    var correctOrientation = !!options.correctOrientation;\n    var saveToPhotoAlbum = !!options.saveToPhotoAlbum;\n    var popoverOptions = getValue(options.popoverOptions, null);\n    var cameraDirection = getValue(options.cameraDirection, Camera.Direction.BACK);\n\n    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,\n                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum
 , popoverOptions, cameraDirection];\n\n    exec(successCallback, errorCallback, \"Camera\", \"takePicture\", args);\n    return new CameraPopoverHandle();\n};\n\ncameraExport.cleanup = function(successCallback, errorCallback) {\n    exec(successCallback, errorCallback, \"Camera\", \"cleanup\", []);\n};\n\nmodule.exports = cameraExport;\n\n});\n\n//@ sourceURL=lib/common/plugin/Camera.js")} catch(e) {console.log("exception: in lib/common/plugin/Camera.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/CameraConstants\", function(require, exports, module) {\n\nmodule.exports = {\n  DestinationType:{\n    DATA_URL: 0,         // Return base64 encoded string\n    FILE_URI: 1,         // Return file uri (content://media/external/images/media/2 for Android)\n    NATIVE_URI: 2        // Return native uri (eg. asset-library://... for iOS)\n  },\n  EncodingType:{\n    JPEG: 0,             // Return JPEG encoded image\n    PNG: 1               // Return PNG encoded image\n  },\n  MediaType:{\n    PICTURE: 0,          // allow selection of still pictures only. DEFAULT. Will return format specified via DestinationType\n    VIDEO: 1,            // allow selection of video only, ONLY RETURNS URL\n    ALLMEDIA : 2         // allow selection from all media types\n  },\n  PictureSourceType:{\n    PHOTOLIBRARY : 0,    // Choose image from picture library (same as SAVEDPHOTOALBUM for Android)\n    CAMERA : 1,          // Take picture from camera\n    SAVEDPHOTOAL
 BUM : 2  // Choose image from picture library (same as PHOTOLIBRARY for Android)\n  },\n  PopoverArrowDirection:{\n      ARROW_UP : 1,        // matches iOS UIPopoverArrowDirection constants to specify arrow location on popover\n      ARROW_DOWN : 2,\n      ARROW_LEFT : 4,\n      ARROW_RIGHT : 8,\n      ARROW_ANY : 15\n  },\n  Direction:{\n      BACK: 0,\n      FRONT: 1\n  }\n};\n\n});\n\n//@ sourceURL=lib/common/plugin/CameraConstants.js")} catch(e) {console.log("exception: in lib/common/plugin/CameraConstants.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/CameraPopoverHandle\", function(require, exports, module) {\n\nvar exec = require('cordova/exec');\n\n/**\n * A handle to an image picker popover.\n */\nvar CameraPopoverHandle = function() {\n    this.setPosition = function(popoverOptions) {\n        console.log('CameraPopoverHandle.setPosition is only supported on iOS.');\n    };\n};\n\nmodule.exports = CameraPopoverHandle;\n\n});\n\n//@ sourceURL=lib/common/plugin/CameraPopoverHandle.js")} catch(e) {console.log("exception: in lib/common/plugin/CameraPopoverHandle.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/CameraPopoverOptions\", function(require, exports, module) {\n\nvar Camera = require('cordova/plugin/CameraConstants');\n\n/**\n * Encapsulates options for iOS Popover image picker\n */\nvar CameraPopoverOptions = function(x,y,width,height,arrowDir){\n    // information of rectangle that popover should be anchored to\n    this.x = x || 0;\n    this.y = y || 32;\n    this.width = width || 320;\n    this.height = height || 480;\n    // The direction of the popover arrow\n    this.arrowDir = arrowDir || Camera.PopoverArrowDirection.ARROW_ANY;\n};\n\nmodule.exports = CameraPopoverOptions;\n\n});\n\n//@ sourceURL=lib/common/plugin/CameraPopoverOptions.js")} catch(e) {console.log("exception: in lib/common/plugin/CameraPopoverOptions.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/CaptureAudioOptions\", function(require, exports, module) {\n\n/**\n * Encapsulates all audio capture operation configuration options.\n */\nvar CaptureAudioOptions = function(){\n    // Upper limit of sound clips user can record. Value must be equal or greater than 1.\n    this.limit = 1;\n    // Maximum duration of a single sound clip in seconds.\n    this.duration = 0;\n    // The selected audio mode. Must match with one of the elements in supportedAudioModes array.\n    this.mode = null;\n};\n\nmodule.exports = CaptureAudioOptions;\n\n});\n\n//@ sourceURL=lib/common/plugin/CaptureAudioOptions.js")} catch(e) {console.log("exception: in lib/common/plugin/CaptureAudioOptions.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/CaptureError\", function(require, exports, module) {\n\n/**\n * The CaptureError interface encapsulates all errors in the Capture API.\n */\nvar CaptureError = function(c) {\n   this.code = c || null;\n};\n\n// Camera or microphone failed to capture image or sound.\nCaptureError.CAPTURE_INTERNAL_ERR = 0;\n// Camera application or audio capture application is currently serving other capture request.\nCaptureError.CAPTURE_APPLICATION_BUSY = 1;\n// Invalid use of the API (e.g. limit parameter has value less than one).\nCaptureError.CAPTURE_INVALID_ARGUMENT = 2;\n// User exited camera application or audio capture application before capturing anything.\nCaptureError.CAPTURE_NO_MEDIA_FILES = 3;\n// The requested capture operation is not supported.\nCaptureError.CAPTURE_NOT_SUPPORTED = 20;\n\nmodule.exports = CaptureError;\n\n});\n\n//@ sourceURL=lib/common/plugin/CaptureError.js")} catch(e) {console.log("exception: in lib/common/plugin/CaptureError.js: "
  + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/CaptureImageOptions\", function(require, exports, module) {\n\n/**\n * Encapsulates all image capture operation configuration options.\n */\nvar CaptureImageOptions = function(){\n    // Upper limit of images user can take. Value must be equal or greater than 1.\n    this.limit = 1;\n    // The selected image mode. Must match with one of the elements in supportedImageModes array.\n    this.mode = null;\n};\n\nmodule.exports = CaptureImageOptions;\n\n});\n\n//@ sourceURL=lib/common/plugin/CaptureImageOptions.js")} catch(e) {console.log("exception: in lib/common/plugin/CaptureImageOptions.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/CaptureVideoOptions\", function(require, exports, module) {\n\n/**\n * Encapsulates all video capture operation configuration options.\n */\nvar CaptureVideoOptions = function(){\n    // Upper limit of videos user can record. Value must be equal or greater than 1.\n    this.limit = 1;\n    // Maximum duration of a single video clip in seconds.\n    this.duration = 0;\n    // The selected video mode. Must match with one of the elements in supportedVideoModes array.\n    this.mode = null;\n};\n\nmodule.exports = CaptureVideoOptions;\n\n});\n\n//@ sourceURL=lib/common/plugin/CaptureVideoOptions.js")} catch(e) {console.log("exception: in lib/common/plugin/CaptureVideoOptions.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/CompassError\", function(require, exports, module) {\n\n/**\n *  CompassError.\n *  An error code assigned by an implementation when an error has occurred\n * @constructor\n */\nvar CompassError = function(err) {\n    this.code = (err !== undefined ? err : null);\n};\n\nCompassError.COMPASS_INTERNAL_ERR = 0;\nCompassError.COMPASS_NOT_SUPPORTED = 20;\n\nmodule.exports = CompassError;\n\n});\n\n//@ sourceURL=lib/common/plugin/CompassError.js")} catch(e) {console.log("exception: in lib/common/plugin/CompassError.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/CompassHeading\", function(require, exports, module) {\n\nvar CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {\n  this.magneticHeading = magneticHeading;\n  this.trueHeading = trueHeading;\n  this.headingAccuracy = headingAccuracy;\n  this.timestamp = timestamp || new Date().getTime();\n};\n\nmodule.exports = CompassHeading;\n\n});\n\n//@ sourceURL=lib/common/plugin/CompassHeading.js")} catch(e) {console.log("exception: in lib/common/plugin/CompassHeading.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/ConfigurationData\", function(require, exports, module) {\n\n/**\n * Encapsulates a set of parameters that the capture device supports.\n */\nfunction ConfigurationData() {\n    // The ASCII-encoded string in lower case representing the media type.\n    this.type = null;\n    // The height attribute represents height of the image or video in pixels.\n    // In the case of a sound clip this attribute has value 0.\n    this.height = 0;\n    // The width attribute represents width of the image or video in pixels.\n    // In the case of a sound clip this attribute has value 0\n    this.width = 0;\n}\n\nmodule.exports = ConfigurationData;\n\n});\n\n//@ sourceURL=lib/common/plugin/ConfigurationData.js")} catch(e) {console.log("exception: in lib/common/plugin/ConfigurationData.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/Connection\", function(require, exports, module) {\n\n/**\n * Network status\n */\nmodule.exports = {\n        UNKNOWN: \"unknown\",\n        ETHERNET: \"ethernet\",\n        WIFI: \"wifi\",\n        CELL_2G: \"2g\",\n        CELL_3G: \"3g\",\n        CELL_4G: \"4g\",\n        CELL:\"cellular\",\n        NONE: \"none\"\n};\n\n});\n\n//@ sourceURL=lib/common/plugin/Connection.js")} catch(e) {console.log("exception: in lib/common/plugin/Connection.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/Contact\", function(require, exports, module) {\n\nvar argscheck = require('cordova/argscheck'),\n    exec = require('cordova/exec'),\n    ContactError = require('cordova/plugin/ContactError'),\n    utils = require('cordova/utils');\n\n/**\n* Converts primitives into Complex Object\n* Currently only used for Date fields\n*/\nfunction convertIn(contact) {\n    var value = contact.birthday;\n    try {\n      contact.birthday = new Date(parseFloat(value));\n    } catch (exception){\n      console.log(\"Cordova Contact convertIn error: exception creating date.\");\n    }\n    return contact;\n}\n\n/**\n* Converts Complex objects into primitives\n* Only conversion at present is for Dates.\n**/\n\nfunction convertOut(contact) {\n    var value = contact.birthday;\n    if (value !== null) {\n        // try to make it a Date object if it is not already\n        if (!utils.isDate(value)){\n            try {\n                value = new Date(value);\n        
     } catch(exception){\n                value = null;\n            }\n        }\n        if (utils.isDate(value)){\n            value = value.valueOf(); // convert to milliseconds\n        }\n        contact.birthday = value;\n    }\n    return contact;\n}\n\n/**\n* Contains information about a single contact.\n* @constructor\n* @param {DOMString} id unique identifier\n* @param {DOMString} displayName\n* @param {ContactName} name\n* @param {DOMString} nickname\n* @param {Array.<ContactField>} phoneNumbers array of phone numbers\n* @param {Array.<ContactField>} emails array of email addresses\n* @param {Array.<ContactAddress>} addresses array of addresses\n* @param {Array.<ContactField>} ims instant messaging user ids\n* @param {Array.<ContactOrganization>} organizations\n* @param {DOMString} birthday contact's birthday\n* @param {DOMString} note user notes about contact\n* @param {Array.<ContactField>} photos\n* @param {Array.<ContactField>} categories\n* @param {Array.<ContactFiel
 d>} urls contact's web sites\n*/\nvar Contact = function (id, displayName, name, nickname, phoneNumbers, emails, addresses,\n    ims, organizations, birthday, note, photos, categories, urls) {\n    this.id = id || null;\n    this.rawId = null;\n    this.displayName = displayName || null;\n    this.name = name || null; // ContactName\n    this.nickname = nickname || null;\n    this.phoneNumbers = phoneNumbers || null; // ContactField[]\n    this.emails = emails || null; // ContactField[]\n    this.addresses = addresses || null; // ContactAddress[]\n    this.ims = ims || null; // ContactField[]\n    this.organizations = organizations || null; // ContactOrganization[]\n    this.birthday = birthday || null;\n    this.note = note || null;\n    this.photos = photos || null; // ContactField[]\n    this.categories = categories || null; // ContactField[]\n    this.urls = urls || null; // ContactField[]\n};\n\n/**\n* Removes contact from device storage.\n* @param successCB success callback\n*
  @param errorCB error callback\n*/\nContact.prototype.remove = function(successCB, errorCB) {\n    argscheck.checkArgs('FF', 'Contact.remove', arguments);\n    var fail = errorCB && function(code) {\n        errorCB(new ContactError(code));\n    };\n    if (this.id === null) {\n        fail(ContactError.UNKNOWN_ERROR);\n    }\n    else {\n        exec(successCB, fail, \"Contacts\", \"remove\", [this.id]);\n    }\n};\n\n/**\n* Creates a deep copy of this Contact.\n* With the contact ID set to null.\n* @return copy of this Contact\n*/\nContact.prototype.clone = function() {\n    var clonedContact = utils.clone(this);\n    clonedContact.id = null;\n    clonedContact.rawId = null;\n\n    function nullIds(arr) {\n        if (arr) {\n            for (var i = 0; i < arr.length; ++i) {\n                arr[i].id = null;\n            }\n        }\n    }\n\n    // Loop through and clear out any id's in phones, emails, etc.\n    nullIds(clonedContact.phoneNumbers);\n    nullIds(clonedContact.e
 mails);\n    nullIds(clonedContact.addresses);\n    nullIds(clonedContact.ims);\n    nullIds(clonedContact.organizations);\n    nullIds(clonedContact.categories);\n    nullIds(clonedContact.photos);\n    nullIds(clonedContact.urls);\n    return clonedContact;\n};\n\n/**\n* Persists contact to device storage.\n* @param successCB success callback\n* @param errorCB error callback\n*/\nContact.prototype.save = function(successCB, errorCB) {\n    argscheck.checkArgs('FFO', 'Contact.save', arguments);\n    var fail = errorCB && function(code) {\n        errorCB(new ContactError(code));\n    };\n    var success = function(result) {\n        if (result) {\n            if (successCB) {\n                var fullContact = require('cordova/plugin/contacts').create(result);\n                successCB(convertIn(fullContact));\n            }\n        }\n        else {\n            // no Entry object returned\n            fail(ContactError.UNKNOWN_ERROR);\n        }\n    };\n    var dupContact = co
 nvertOut(utils.clone(this));\n    exec(success, fail, \"Contacts\", \"save\", [dupContact]);\n};\n\n\nmodule.exports = Contact;\n\n});\n\n//@ sourceURL=lib/common/plugin/Contact.js")} catch(e) {console.log("exception: in lib/common/plugin/Contact.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/ContactAddress\", function(require, exports, module) {\n\n/**\n* Contact address.\n* @constructor\n* @param {DOMString} id unique identifier, should only be set by native code\n* @param formatted // NOTE: not a W3C standard\n* @param streetAddress\n* @param locality\n* @param region\n* @param postalCode\n* @param country\n*/\n\nvar ContactAddress = function(pref, type, formatted, streetAddress, locality, region, postalCode, country) {\n    this.id = null;\n    this.pref = (typeof pref != 'undefined' ? pref : false);\n    this.type = type || null;\n    this.formatted = formatted || null;\n    this.streetAddress = streetAddress || null;\n    this.locality = locality || null;\n    this.region = region || null;\n    this.postalCode = postalCode || null;\n    this.country = country || null;\n};\n\nmodule.exports = ContactAddress;\n\n});\n\n//@ sourceURL=lib/common/plugin/ContactAddress.js")} catch(e) {console.log("exception: in lib/common/plugin/Contact
 Address.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/ContactError\", function(require, exports, module) {\n\n/**\n *  ContactError.\n *  An error code assigned by an implementation when an error has occurred\n * @constructor\n */\nvar ContactError = function(err) {\n    this.code = (typeof err != 'undefined' ? err : null);\n};\n\n/**\n * Error codes\n */\nContactError.UNKNOWN_ERROR = 0;\nContactError.INVALID_ARGUMENT_ERROR = 1;\nContactError.TIMEOUT_ERROR = 2;\nContactError.PENDING_OPERATION_ERROR = 3;\nContactError.IO_ERROR = 4;\nContactError.NOT_SUPPORTED_ERROR = 5;\nContactError.PERMISSION_DENIED_ERROR = 20;\n\nmodule.exports = ContactError;\n\n});\n\n//@ sourceURL=lib/common/plugin/ContactError.js")} catch(e) {console.log("exception: in lib/common/plugin/ContactError.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/ContactField\", function(require, exports, module) {\n\n/**\n* Generic contact field.\n* @constructor\n* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard\n* @param type\n* @param value\n* @param pref\n*/\nvar ContactField = function(type, value, pref) {\n    this.id = null;\n    this.type = (type && type.toString()) || null;\n    this.value = (value && value.toString()) || null;\n    this.pref = (typeof pref != 'undefined' ? pref : false);\n};\n\nmodule.exports = ContactField;\n\n});\n\n//@ sourceURL=lib/common/plugin/ContactField.js")} catch(e) {console.log("exception: in lib/common/plugin/ContactField.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/ContactFindOptions\", function(require, exports, module) {\n\n/**\n * ContactFindOptions.\n * @constructor\n * @param filter used to match contacts against\n * @param multiple boolean used to determine if more than one contact should be returned\n */\n\nvar ContactFindOptions = function(filter, multiple) {\n    this.filter = filter || '';\n    this.multiple = (typeof multiple != 'undefined' ? multiple : false);\n};\n\nmodule.exports = ContactFindOptions;\n\n});\n\n//@ sourceURL=lib/common/plugin/ContactFindOptions.js")} catch(e) {console.log("exception: in lib/common/plugin/ContactFindOptions.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/ContactName\", function(require, exports, module) {\n\n/**\n* Contact name.\n* @constructor\n* @param formatted // NOTE: not part of W3C standard\n* @param familyName\n* @param givenName\n* @param middle\n* @param prefix\n* @param suffix\n*/\nvar ContactName = function(formatted, familyName, givenName, middle, prefix, suffix) {\n    this.formatted = formatted || null;\n    this.familyName = familyName || null;\n    this.givenName = givenName || null;\n    this.middleName = middle || null;\n    this.honorificPrefix = prefix || null;\n    this.honorificSuffix = suffix || null;\n};\n\nmodule.exports = ContactName;\n\n});\n\n//@ sourceURL=lib/common/plugin/ContactName.js")} catch(e) {console.log("exception: in lib/common/plugin/ContactName.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/ContactOrganization\", function(require, exports, module) {\n\n/**\n* Contact organization.\n* @constructor\n* @param {DOMString} id unique identifier, should only be set by native code // NOTE: not a W3C standard\n* @param name\n* @param dept\n* @param title\n* @param startDate\n* @param endDate\n* @param location\n* @param desc\n*/\n\nvar ContactOrganization = function(pref, type, name, dept, title) {\n    this.id = null;\n    this.pref = (typeof pref != 'undefined' ? pref : false);\n    this.type = type || null;\n    this.name = name || null;\n    this.department = dept || null;\n    this.title = title || null;\n};\n\nmodule.exports = ContactOrganization;\n\n});\n\n//@ sourceURL=lib/common/plugin/ContactOrganization.js")} catch(e) {console.log("exception: in lib/common/plugin/ContactOrganization.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/Coordinates\", function(require, exports, module) {\n\n/**\n * This class contains position information.\n * @param {Object} lat\n * @param {Object} lng\n * @param {Object} alt\n * @param {Object} acc\n * @param {Object} head\n * @param {Object} vel\n * @param {Object} altacc\n * @constructor\n */\nvar Coordinates = function(lat, lng, alt, acc, head, vel, altacc) {\n    /**\n     * The latitude of the position.\n     */\n    this.latitude = lat;\n    /**\n     * The longitude of the position,\n     */\n    this.longitude = lng;\n    /**\n     * The accuracy of the position.\n     */\n    this.accuracy = acc;\n    /**\n     * The altitude of the position.\n     */\n    this.altitude = (alt !== undefined ? alt : null);\n    /**\n     * The direction the device is moving at the position.\n     */\n    this.heading = (head !== undefined ? head : null);\n    /**\n     * The velocity with which the device is moving at the position.\n     */\n    this.spe
 ed = (vel !== undefined ? vel : null);\n\n    if (this.speed === 0 || this.speed === null) {\n        this.heading = NaN;\n    }\n\n    /**\n     * The altitude accuracy of the position.\n     */\n    this.altitudeAccuracy = (altacc !== undefined) ? altacc : null;\n};\n\nmodule.exports = Coordinates;\n\n});\n\n//@ sourceURL=lib/common/plugin/Coordinates.js")} catch(e) {console.log("exception: in lib/common/plugin/Coordinates.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/DirectoryEntry\", function(require, exports, module) {\n\nvar argscheck = require('cordova/argscheck'),\n    utils = require('cordova/utils'),\n    exec = require('cordova/exec'),\n    Entry = require('cordova/plugin/Entry'),\n    FileError = require('cordova/plugin/FileError'),\n    DirectoryReader = require('cordova/plugin/DirectoryReader');\n\n/**\n * An interface representing a directory on the file system.\n *\n * {boolean} isFile always false (readonly)\n * {boolean} isDirectory always true (readonly)\n * {DOMString} name of the directory, excluding the path leading to it (readonly)\n * {DOMString} fullPath the absolute full path to the directory (readonly)\n * TODO: implement this!!! {FileSystem} filesystem on which the directory resides (readonly)\n */\nvar DirectoryEntry = function(name, fullPath) {\n     DirectoryEntry.__super__.constructor.call(this, false, true, name, fullPath);\n};\n\nutils.extend(DirectoryEntry, Entry);\n\n/**\n * Cre
 ates a new DirectoryReader to read entries from this directory\n */\nDirectoryEntry.prototype.createReader = function() {\n    return new DirectoryReader(this.fullPath);\n};\n\n/**\n * Creates or looks up a directory\n *\n * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a directory\n * @param {Flags} options to create or exclusively create the directory\n * @param {Function} successCallback is called with the new entry\n * @param {Function} errorCallback is called with a FileError\n */\nDirectoryEntry.prototype.getDirectory = function(path, options, successCallback, errorCallback) {\n    argscheck.checkArgs('sOFF', 'DirectoryEntry.getDirectory', arguments);\n    var win = successCallback && function(result) {\n        var entry = new DirectoryEntry(result.name, result.fullPath);\n        successCallback(entry);\n    };\n    var fail = errorCallback && function(code) {\n        errorCallback(new FileError(code));\n    };\
 n    exec(win, fail, \"File\", \"getDirectory\", [this.fullPath, path, options]);\n};\n\n/**\n * Deletes a directory and all of it's contents\n *\n * @param {Function} successCallback is called with no parameters\n * @param {Function} errorCallback is called with a FileError\n */\nDirectoryEntry.prototype.removeRecursively = function(successCallback, errorCallback) {\n    argscheck.checkArgs('FF', 'DirectoryEntry.removeRecursively', arguments);\n    var fail = errorCallback && function(code) {\n        errorCallback(new FileError(code));\n    };\n    exec(successCallback, fail, \"File\", \"removeRecursively\", [this.fullPath]);\n};\n\n/**\n * Creates or looks up a file\n *\n * @param {DOMString} path either a relative or absolute path from this directory in which to look up or create a file\n * @param {Flags} options to create or exclusively create the file\n * @param {Function} successCallback is called with the new entry\n * @param {Function} errorCallback is called with a FileErr
 or\n */\nDirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {\n    argscheck.checkArgs('sOFF', 'DirectoryEntry.getFile', arguments);\n    var win = successCallback && function(result) {\n        var FileEntry = require('cordova/plugin/FileEntry');\n        var entry = new FileEntry(result.name, result.fullPath);\n        successCallback(entry);\n    };\n    var fail = errorCallback && function(code) {\n        errorCallback(new FileError(code));\n    };\n    exec(win, fail, \"File\", \"getFile\", [this.fullPath, path, options]);\n};\n\nmodule.exports = DirectoryEntry;\n\n});\n\n//@ sourceURL=lib/common/plugin/DirectoryEntry.js")} catch(e) {console.log("exception: in lib/common/plugin/DirectoryEntry.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/DirectoryReader\", function(require, exports, module) {\n\nvar exec = require('cordova/exec'),\n    FileError = require('cordova/plugin/FileError') ;\n\n/**\n * An interface that lists the files and directories in a directory.\n */\nfunction DirectoryReader(path) {\n    this.path = path || null;\n}\n\n/**\n * Returns a list of entries from a directory.\n *\n * @param {Function} successCallback is called with a list of entries\n * @param {Function} errorCallback is called with a FileError\n */\nDirectoryReader.prototype.readEntries = function(successCallback, errorCallback) {\n    var win = typeof successCallback !== 'function' ? null : function(result) {\n        var retVal = [];\n        for (var i=0; i<result.length; i++) {\n            var entry = null;\n            if (result[i].isDirectory) {\n                entry = new (require('cordova/plugin/DirectoryEntry'))();\n            }\n            else if (result[i].isFile) {\n                entr
 y = new (require('cordova/plugin/FileEntry'))();\n            }\n            entry.isDirectory = result[i].isDirectory;\n            entry.isFile = result[i].isFile;\n            entry.name = result[i].name;\n            entry.fullPath = result[i].fullPath;\n            retVal.push(entry);\n        }\n        successCallback(retVal);\n    };\n    var fail = typeof errorCallback !== 'function' ? null : function(code) {\n        errorCallback(new FileError(code));\n    };\n    exec(win, fail, \"File\", \"readEntries\", [this.path]);\n};\n\nmodule.exports = DirectoryReader;\n\n});\n\n//@ sourceURL=lib/common/plugin/DirectoryReader.js")} catch(e) {console.log("exception: in lib/common/plugin/DirectoryReader.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/Entry\", function(require, exports, module) {\n\nvar argscheck = require('cordova/argscheck'),\n    exec = require('cordova/exec'),\n    FileError = require('cordova/plugin/FileError'),\n    Metadata = require('cordova/plugin/Metadata');\n\n/**\n * Represents a file or directory on the local file system.\n *\n * @param isFile\n *            {boolean} true if Entry is a file (readonly)\n * @param isDirectory\n *            {boolean} true if Entry is a directory (readonly)\n * @param name\n *            {DOMString} name of the file or directory, excluding the path\n *            leading to it (readonly)\n * @param fullPath\n *            {DOMString} the absolute full path to the file or directory\n *            (readonly)\n */\nfunction Entry(isFile, isDirectory, name, fullPath, fileSystem) {\n    this.isFile = !!isFile;\n    this.isDirectory = !!isDirectory;\n    this.name = name || '';\n    this.fullPath = fullPath || '';\n    this.filesystem = fil
 eSystem || null;\n}\n\n/**\n * Look up the metadata of the entry.\n *\n * @param successCallback\n *            {Function} is called with a Metadata object\n * @param errorCallback\n *            {Function} is called with a FileError\n */\nEntry.prototype.getMetadata = function(successCallback, errorCallback) {\n    argscheck.checkArgs('FF', 'Entry.getMetadata', arguments);\n    var success = successCallback && function(lastModified) {\n        var metadata = new Metadata(lastModified);\n        successCallback(metadata);\n    };\n    var fail = errorCallback && function(code) {\n        errorCallback(new FileError(code));\n    };\n\n    exec(success, fail, \"File\", \"getMetadata\", [this.fullPath]);\n};\n\n/**\n * Set the metadata of the entry.\n *\n * @param successCallback\n *            {Function} is called with a Metadata object\n * @param errorCallback\n *            {Function} is called with a FileError\n * @param metadataObject\n *            {Object} keys and values to set
 \n */\nEntry.prototype.setMetadata = function(successCallback, errorCallback, metadataObject) {\n    argscheck.checkArgs('FFO', 'Entry.setMetadata', arguments);\n    exec(successCallback, errorCallback, \"File\", \"setMetadata\", [this.fullPath, metadataObject]);\n};\n\n/**\n * Move a file or directory to a new location.\n *\n * @param parent\n *            {DirectoryEntry} the directory to which to move this entry\n * @param newName\n *            {DOMString} new name of the entry, defaults to the current name\n * @param successCallback\n *            {Function} called with the new DirectoryEntry object\n * @param errorCallback\n *            {Function} called with a FileError\n */\nEntry.prototype.moveTo = function(parent, newName, successCallback, errorCallback) {\n    argscheck.checkArgs('oSFF', 'Entry.moveTo', arguments);\n    var fail = errorCallback && function(code) {\n        errorCallback(new FileError(code));\n    };\n    // source path\n    var srcPath = this.fullPath,\n
         // entry name\n        name = newName || this.name,\n        success = function(entry) {\n            if (entry) {\n                if (successCallback) {\n                    // create appropriate Entry object\n                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);\n                    successCallback(result);\n                }\n            }\n            else {\n                // no Entry object returned\n                fail && fail(FileError.NOT_FOUND_ERR);\n            }\n        };\n\n    // copy\n    exec(success, fail, \"File\", \"moveTo\", [srcPath, parent.fullPath, name]);\n};\n\n/**\n * Copy a directory to a different location.\n *\n * @param parent\n *            {DirectoryEntry} the directory to which to copy the entry\n * @param newName\n *            {DOMString} new name of the entry, defaults to the current name
 \n * @param successCallback\n *            {Function} called with the new Entry object\n * @param errorCallback\n *            {Function} called with a FileError\n */\nEntry.prototype.copyTo = function(parent, newName, successCallback, errorCallback) {\n    argscheck.checkArgs('oSFF', 'Entry.copyTo', arguments);\n    var fail = errorCallback && function(code) {\n        errorCallback(new FileError(code));\n    };\n\n        // source path\n    var srcPath = this.fullPath,\n        // entry name\n        name = newName || this.name,\n        // success callback\n        success = function(entry) {\n            if (entry) {\n                if (successCallback) {\n                    // create appropriate Entry object\n                    var result = (entry.isDirectory) ? new (require('cordova/plugin/DirectoryEntry'))(entry.name, entry.fullPath) : new (require('cordova/plugin/FileEntry'))(entry.name, entry.fullPath);\n                    successCallback(result);\n                }\n 
            }\n            else {\n                // no Entry object returned\n                fail && fail(FileError.NOT_FOUND_ERR);\n            }\n        };\n\n    // copy\n    exec(success, fail, \"File\", \"copyTo\", [srcPath, parent.fullPath, name]);\n};\n\n/**\n * Return a URL that can be used to identify this entry.\n */\nEntry.prototype.toURL = function() {\n    // fullPath attribute contains the full URL\n    return this.fullPath;\n};\n\n/**\n * Returns a URI that can be used to identify this entry.\n *\n * @param {DOMString} mimeType for a FileEntry, the mime type to be used to interpret the file, when loaded through this URI.\n * @return uri\n */\nEntry.prototype.toURI = function(mimeType) {\n    console.log(\"DEPRECATED: Update your code to use 'toURL'\");\n    // fullPath attribute contains the full URI\n    return this.toURL();\n};\n\n/**\n * Remove a file or directory. It is an error to attempt to delete a\n * directory that is not empty. It is an error to attempt t
 o delete a\n * root directory of a file system.\n *\n * @param successCallback {Function} called with no parameters\n * @param errorCallback {Function} called with a FileError\n */\nEntry.prototype.remove = function(successCallback, errorCallback) {\n    argscheck.checkArgs('FF', 'Entry.remove', arguments);\n    var fail = errorCallback && function(code) {\n        errorCallback(new FileError(code));\n    };\n    exec(successCallback, fail, \"File\", \"remove\", [this.fullPath]);\n};\n\n/**\n * Look up the parent DirectoryEntry of this entry.\n *\n * @param successCallback {Function} called with the parent DirectoryEntry object\n * @param errorCallback {Function} called with a FileError\n */\nEntry.prototype.getParent = function(successCallback, errorCallback) {\n    argscheck.checkArgs('FF', 'Entry.getParent', arguments);\n    var win = successCallback && function(result) {\n        var DirectoryEntry = require('cordova/plugin/DirectoryEntry');\n        var entry = new DirectoryEnt
 ry(result.name, result.fullPath);\n        successCallback(entry);\n    };\n    var fail = errorCallback && function(code) {\n        errorCallback(new FileError(code));\n    };\n    exec(win, fail, \"File\", \"getParent\", [this.fullPath]);\n};\n\nmodule.exports = Entry;\n\n});\n\n//@ sourceURL=lib/common/plugin/Entry.js")} catch(e) {console.log("exception: in lib/common/plugin/Entry.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/File\", function(require, exports, module) {\n\n/**\n * Constructor.\n * name {DOMString} name of the file, without path information\n * fullPath {DOMString} the full path of the file, including the name\n * type {DOMString} mime type\n * lastModifiedDate {Date} last modified date\n * size {Number} size of the file in bytes\n */\n\nvar File = function(name, fullPath, type, lastModifiedDate, size){\n    this.name = name || '';\n    this.fullPath = fullPath || null;\n    this.type = type || null;\n    this.lastModifiedDate = lastModifiedDate || null;\n    this.size = size || 0;\n\n    // These store the absolute start and end for slicing the file.\n    this.start = 0;\n    this.end = this.size;\n};\n\n/**\n * Returns a \"slice\" of the file. Since Cordova Files don't contain the actual\n * content, this really returns a File with adjusted start and end.\n * Slices of slices are supported.\n * start {Number} The index at which to start the slice (incl
 usive).\n * end {Number} The index at which to end the slice (exclusive).\n */\nFile.prototype.slice = function(start, end) {\n    var size = this.end - this.start;\n    var newStart = 0;\n    var newEnd = size;\n    if (arguments.length) {\n        if (start < 0) {\n            newStart = Math.max(size + start, 0);\n        } else {\n            newStart = Math.min(size, start);\n        }\n    }\n\n    if (arguments.length >= 2) {\n        if (end < 0) {\n            newEnd = Math.max(size + end, 0);\n        } else {\n            newEnd = Math.min(end, size);\n        }\n    }\n\n    var newFile = new File(this.name, this.fullPath, this.type, this.lastModifiedData, this.size);\n    newFile.start = this.start + newStart;\n    newFile.end = this.start + newEnd;\n    return newFile;\n};\n\n\nmodule.exports = File;\n\n});\n\n//@ sourceURL=lib/common/plugin/File.js")} catch(e) {console.log("exception: in lib/common/plugin/File.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/FileEntry\", function(require, exports, module) {\n\nvar utils = require('cordova/utils'),\n    exec = require('cordova/exec'),\n    Entry = require('cordova/plugin/Entry'),\n    FileWriter = require('cordova/plugin/FileWriter'),\n    File = require('cordova/plugin/File'),\n    FileError = require('cordova/plugin/FileError');\n\n/**\n * An interface representing a file on the file system.\n *\n * {boolean} isFile always true (readonly)\n * {boolean} isDirectory always false (readonly)\n * {DOMString} name of the file, excluding the path leading to it (readonly)\n * {DOMString} fullPath the absolute full path to the file (readonly)\n * {FileSystem} filesystem on which the file resides (readonly)\n */\nvar FileEntry = function(name, fullPath) {\n     FileEntry.__super__.constructor.apply(this, [true, false, name, fullPath]);\n};\n\nutils.extend(FileEntry, Entry);\n\n/**\n * Creates a new FileWriter associated with the file that this FileEntry represe
 nts.\n *\n * @param {Function} successCallback is called with the new FileWriter\n * @param {Function} errorCallback is called with a FileError\n */\nFileEntry.prototype.createWriter = function(successCallback, errorCallback) {\n    this.file(function(filePointer) {\n        var writer = new FileWriter(filePointer);\n\n        if (writer.fileName === null || writer.fileName === \"\") {\n            errorCallback && errorCallback(new FileError(FileError.INVALID_STATE_ERR));\n        } else {\n            successCallback && successCallback(writer);\n        }\n    }, errorCallback);\n};\n\n/**\n * Returns a File that represents the current state of the file that this FileEntry represents.\n *\n * @param {Function} successCallback is called with the new File object\n * @param {Function} errorCallback is called with a FileError\n */\nFileEntry.prototype.file = function(successCallback, errorCallback) {\n    var win = successCallback && function(f) {\n        var file = new File(f.name, 
 f.fullPath, f.type, f.lastModifiedDate, f.size);\n        successCallback(file);\n    };\n    var fail = errorCallback && function(code) {\n        errorCallback(new FileError(code));\n    };\n    exec(win, fail, \"File\", \"getFileMetadata\", [this.fullPath]);\n};\n\n\nmodule.exports = FileEntry;\n\n});\n\n//@ sourceURL=lib/common/plugin/FileEntry.js")} catch(e) {console.log("exception: in lib/common/plugin/FileEntry.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/FileError\", function(require, exports, module) {\n\n/**\n * FileError\n */\nfunction FileError(error) {\n  this.code = error || null;\n}\n\n// File error codes\n// Found in DOMException\nFileError.NOT_FOUND_ERR = 1;\nFileError.SECURITY_ERR = 2;\nFileError.ABORT_ERR = 3;\n\n// Added by File API specification\nFileError.NOT_READABLE_ERR = 4;\nFileError.ENCODING_ERR = 5;\nFileError.NO_MODIFICATION_ALLOWED_ERR = 6;\nFileError.INVALID_STATE_ERR = 7;\nFileError.SYNTAX_ERR = 8;\nFileError.INVALID_MODIFICATION_ERR = 9;\nFileError.QUOTA_EXCEEDED_ERR = 10;\nFileError.TYPE_MISMATCH_ERR = 11;\nFileError.PATH_EXISTS_ERR = 12;\n\nmodule.exports = FileError;\n\n});\n\n//@ sourceURL=lib/common/plugin/FileError.js")} catch(e) {console.log("exception: in lib/common/plugin/FileError.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/FileReader\", function(require, exports, module) {\n\nvar exec = require('cordova/exec'),\n    modulemapper = require('cordova/modulemapper'),\n    utils = require('cordova/utils'),\n    File = require('cordova/plugin/File'),\n    FileError = require('cordova/plugin/FileError'),\n    ProgressEvent = require('cordova/plugin/ProgressEvent'),\n    origFileReader = modulemapper.getOriginalSymbol(this, 'FileReader');\n\n/**\n * This class reads the mobile device file system.\n *\n * For Android:\n *      The root directory is the root of the file system.\n *      To read from the SD card, the file name is \"sdcard/my_file.txt\"\n * @constructor\n */\nvar FileReader = function() {\n    this._readyState = 0;\n    this._error = null;\n    this._result = null;\n    this._fileName = '';\n    this._realReader = origFileReader ? new origFileReader() : {};\n};\n\n// States\nFileReader.EMPTY = 0;\nFileReader.LOADING = 1;\nFileReader.DONE = 2;\n\nutils.defineGett
 er(FileReader.prototype, 'readyState', function() {\n    return this._fileName ? this._readyState : this._realReader.readyState;\n});\n\nutils.defineGetter(FileReader.prototype, 'error', function() {\n    return this._fileName ? this._error: this._realReader.error;\n});\n\nutils.defineGetter(FileReader.prototype, 'result', function() {\n    return this._fileName ? this._result: this._realReader.result;\n});\n\nfunction defineEvent(eventName) {\n    utils.defineGetterSetter(FileReader.prototype, eventName, function() {\n        return this._realReader[eventName] || null;\n    }, function(value) {\n        this._realReader[eventName] = value;\n    });\n}\ndefineEvent('onloadstart');    // When the read starts.\ndefineEvent('onprogress');     // While reading (and decoding) file or fileBlob data, and reporting partial file data (progress.loaded/progress.total)\ndefineEvent('onload');         // When the read has successfully completed.\ndefineEvent('onerror');        // When the read h
 as failed (see errors).\ndefineEvent('onloadend');      // When the request has completed (either in success or failure).\ndefineEvent('onabort');        // When the read has been aborted. For instance, by invoking the abort() method.\n\nfunction initRead(reader, file) {\n    // Already loading something\n    if (reader.readyState == FileReader.LOADING) {\n      throw new FileError(FileError.INVALID_STATE_ERR);\n    }\n\n    reader._result = null;\n    reader._error = null;\n    reader._readyState = FileReader.LOADING;\n\n    if (typeof file == 'string') {\n        // Deprecated in Cordova 2.4.\n        console.warning('Using a string argument with FileReader.readAs functions is deprecated.');\n        reader._fileName = file;\n    } else if (typeof file.fullPath == 'string') {\n        reader._fileName = file.fullPath;\n    } else {\n        reader._fileName = '';\n        return true;\n    }\n\n    reader.onloadstart && reader.onloadstart(new ProgressEvent(\"loadstart\", {target:r
 eader}));\n}\n\n/**\n * Abort reading file.\n */\nFileReader.prototype.abort = function() {\n    if (origFileReader && !this._fileName) {\n        return this._realReader.abort();\n    }\n    this._result = null;\n\n    if (this._readyState == FileReader.DONE || this._readyState == FileReader.EMPTY) {\n      return;\n    }\n\n    this._readyState = FileReader.DONE;\n\n    // If abort callback\n    if (typeof this.onabort === 'function') {\n        this.onabort(new ProgressEvent('abort', {target:this}));\n    }\n    // If load end callback\n    if (typeof this.onloadend === 'function') {\n        this.onloadend(new ProgressEvent('loadend', {target:this}));\n    }\n};\n\n/**\n * Read text file.\n *\n * @param file          {File} File object containing file properties\n * @param encoding      [Optional] (see http://www.iana.org/assignments/character-sets)\n */\nFileReader.prototype.readAsText = function(file, encoding) {\n    if (initRead(this, file)) {\n        return this._realReade
 r.readAsText(file, encoding);\n    }\n\n    // Default encoding is UTF-8\n    var enc = encoding ? encoding : \"UTF-8\";\n    var me = this;\n    var execArgs = [this._fileName, enc, file.start, file.end];\n\n    // Read file\n    exec(\n        // Success callback\n        function(r) {\n            // If DONE (cancelled), then don't do anything\n            if (me._readyState === FileReader.DONE) {\n                return;\n            }\n\n            // Save result\n            me._result = r;\n\n            // If onload callback\n            if (typeof me.onload === \"function\") {\n                me.onload(new ProgressEvent(\"load\", {target:me}));\n            }\n\n            // DONE state\n            me._readyState = FileReader.DONE;\n\n            // If onloadend callback\n            if (typeof me.onloadend === \"function\") {\n                me.onloadend(new ProgressEvent(\"loadend\", {target:me}));\n            }\n        },\n        // Error callback\n        functi
 on(e) {\n            // If DONE (cancelled), then don't do anything\n            if (me._readyState === FileReader.DONE) {\n                return;\n            }\n\n            // DONE state\n            me._readyState = FileReader.DONE;\n\n            // null result\n            me._result = null;\n\n            // Save error\n            me._error = new FileError(e);\n\n            // If onerror callback\n            if (typeof me.onerror === \"function\") {\n                me.onerror(new ProgressEvent(\"error\", {target:me}));\n            }\n\n            // If onloadend callback\n            if (typeof me.onloadend === \"function\") {\n                me.onloadend(new ProgressEvent(\"loadend\", {target:me}));\n            }\n        }, \"File\", \"readAsText\", execArgs);\n};\n\n\n/**\n * Read file and return data as a base64 encoded data url.\n * A data url is of the form:\n *      data:[<mediatype>][;base64],<data>\n *\n * @param file          {File} File object containing 
 file properties\n */\nFileReader.prototype.readAsDataURL = function(file) {\n    if (initRead(this, file)) {\n        return this._realReader.readAsDataURL(file);\n    }\n\n    var me = this;\n    var execArgs = [this._fileName, file.start, file.end];\n\n    // Read file\n    exec(\n        // Success callback\n        function(r) {\n            // If DONE (cancelled), then don't do anything\n            if (me._readyState === FileReader.DONE) {\n                return;\n            }\n\n            // DONE state\n            me._readyState = FileReader.DONE;\n\n            // Save result\n            me._result = r;\n\n            // If onload callback\n            if (typeof me.onload === \"function\") {\n                me.onload(new ProgressEvent(\"load\", {target:me}));\n            }\n\n            // If onloadend callback\n            if (typeof me.onloadend === \"function\") {\n                me.onloadend(new ProgressEvent(\"loadend\", {target:me}));\n            }\n       
  },\n        // Error callback\n        function(e) {\n            // If DONE (cancelled), then don't do anything\n            if (me._readyState === FileReader.DONE) {\n                return;\n            }\n\n            // DONE state\n            me._readyState = FileReader.DONE;\n\n            me._result = null;\n\n            // Save error\n            me._error = new FileError(e);\n\n            // If onerror callback\n            if (typeof me.onerror === \"function\") {\n                me.onerror(new ProgressEvent(\"error\", {target:me}));\n            }\n\n            // If onloadend callback\n            if (typeof me.onloadend === \"function\") {\n                me.onloadend(new ProgressEvent(\"loadend\", {target:me}));\n            }\n        }, \"File\", \"readAsDataURL\", execArgs);\n};\n\n/**\n * Read file and return data as a binary data.\n *\n * @param file          {File} File object containing file properties\n */\nFileReader.prototype.readAsBinaryString = func
 tion(file) {\n    if (initRead(this, file)) {\n        return this._realReader.readAsBinaryString(file);\n    }\n\n    var me = this;\n    var execArgs = [this._fileName, file.start, file.end];\n\n    // Read file\n    exec(\n        // Success callback\n        function(r) {\n            // If DONE (cancelled), then don't do anything\n            if (me._readyState === FileReader.DONE) {\n                return;\n            }\n\n            // DONE state\n            me._readyState = FileReader.DONE;\n\n            me._result = r;\n\n            // If onload callback\n            if (typeof me.onload === \"function\") {\n                me.onload(new ProgressEvent(\"load\", {target:me}));\n            }\n\n            // If onloadend callback\n            if (typeof me.onloadend === \"function\") {\n                me.onloadend(new ProgressEvent(\"loadend\", {target:me}));\n            }\n        },\n        // Error callback\n        function(e) {\n            // If DONE (cancell
 ed), then don't do anything\n            if (me._readyState === FileReader.DONE) {\n                return;\n            }\n\n            // DONE state\n            me._readyState = FileReader.DONE;\n\n            me._result = null;\n\n            // Save error\n            me._error = new FileError(e);\n\n            // If onerror callback\n            if (typeof me.onerror === \"function\") {\n                me.onerror(new ProgressEvent(\"error\", {target:me}));\n            }\n\n            // If onloadend callback\n            if (typeof me.onloadend === \"function\") {\n                me.onloadend(new ProgressEvent(\"loadend\", {target:me}));\n            }\n        }, \"File\", \"readAsBinaryString\", execArgs);\n};\n\n/**\n * Read file and return data as a binary data.\n *\n * @param file          {File} File object containing file properties\n */\nFileReader.prototype.readAsArrayBuffer = function(file) {\n    if (initRead(this, file)) {\n        return this._realReader.rea
 dAsArrayBuffer(file);\n    }\n\n    var me = this;\n    var execArgs = [this._fileName, file.start, file.end];\n\n    // Read file\n    exec(\n        // Success callback\n        function(r) {\n            // If DONE (cancelled), then don't do anything\n            if (me._readyState === FileReader.DONE) {\n                return;\n            }\n\n            // DONE state\n            me._readyState = FileReader.DONE;\n\n            me._result = r;\n\n            // If onload callback\n            if (typeof me.onload === \"function\") {\n                me.onload(new ProgressEvent(\"load\", {target:me}));\n            }\n\n            // If onloadend callback\n            if (typeof me.onloadend === \"function\") {\n                me.onloadend(new ProgressEvent(\"loadend\", {target:me}));\n            }\n        },\n        // Error callback\n        function(e) {\n            // If DONE (cancelled), then don't do anything\n            if (me._readyState === FileReader.DONE) {\
 n                return;\n            }\n\n            // DONE state\n            me._readyState = FileReader.DONE;\n\n            me._result = null;\n\n            // Save error\n            me._error = new FileError(e);\n\n            // If onerror callback\n            if (typeof me.onerror === \"function\") {\n                me.onerror(new ProgressEvent(\"error\", {target:me}));\n            }\n\n            // If onloadend callback\n            if (typeof me.onloadend === \"function\") {\n                me.onloadend(new ProgressEvent(\"loadend\", {target:me}));\n            }\n        }, \"File\", \"readAsArrayBuffer\", execArgs);\n};\n\nmodule.exports = FileReader;\n\n});\n\n//@ sourceURL=lib/common/plugin/FileReader.js")} catch(e) {console.log("exception: in lib/common/plugin/FileReader.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/FileSystem\", function(require, exports, module) {\n\nvar DirectoryEntry = require('cordova/plugin/DirectoryEntry');\n\n/**\n * An interface representing a file system\n *\n * @constructor\n * {DOMString} name the unique name of the file system (readonly)\n * {DirectoryEntry} root directory of the file system (readonly)\n */\nvar FileSystem = function(name, root) {\n    this.name = name || null;\n    if (root) {\n        this.root = new DirectoryEntry(root.name, root.fullPath);\n    }\n};\n\nmodule.exports = FileSystem;\n\n});\n\n//@ sourceURL=lib/common/plugin/FileSystem.js")} catch(e) {console.log("exception: in lib/common/plugin/FileSystem.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/plugin/FileTransfer\", function(require, exports, module) {\n\nvar argscheck = require('cordova/argscheck'),\n    exec = require('cordova/exec'),\n    FileTransferError = require('cordova/plugin/FileTransferError'),\n    ProgressEvent = require('cordova/plugin/ProgressEvent');\n\nfunction newProgressEvent(result) {\n    var pe = new ProgressEvent();\n    pe.lengthComputable = result.lengthComputable;\n    pe.loaded = result.loaded;\n    pe.total = result.total;\n    return pe;\n}\n\nfunction getBasicAuthHeader(urlString) {\n    var header =  null;\n\n    if (window.btoa) {\n        // parse the url using the Location object\n        var url = document.createElement('a');\n        url.href = urlString;\n\n        var credentials = null;\n        var protocol = url.protocol + \"//\";\n        var origin = protocol + url.host;\n\n        // check whether there are the username:password credentials in the url\n        if (url.href.indexOf(origin) != 0) { // c
 redentials found\n            var atIndex = url.href.indexOf(\"@\");\n            credentials = url.href.substring(protocol.length, atIndex);\n        }\n\n        if (credentials) {\n            var authHeader = \"Authorization\";\n            var authHeaderValue = \"Basic \" + window.btoa(credentials);\n\n            header = {\n                name : authHeader,\n                value : authHeaderValue\n            };\n        }\n    }\n\n    return header;\n}\n\nvar idCounter = 0;\n\n/**\n * FileTransfer uploads a file to a remote server.\n * @constructor\n */\nvar FileTransfer = function() {\n    this._id = ++idCounter;\n    this.onprogress = null; // optional callback\n};\n\n/**\n* Given an absolute file path, uploads a file on the device to a remote server\n* using a multipart HTTP request.\n* @param filePath {String}           Full path of the file on the device\n* @param server {String}             URL of the server to receive the file\n* @param successCallback (Function}  
 Callback to be invoked when upload has completed\n* @param errorCallback {Function}    Callback to be invoked upon error\n* @param options {FileUploadOptions} Optional parameters such as file name and mimetype\n* @param trustAllHosts {Boolean} Optional trust all hosts (e.g. for self-signed certs), defaults to false\n*/\nFileTransfer.prototype.upload = function(filePath, server, successCallback, errorCallback, options, trustAllHosts) {\n    argscheck.checkArgs('ssFFO*', 'FileTransfer.upload', arguments);\n    // check for options\n    var fileKey = null;\n    var fileName = null;\n    var mimeType = null;\n    var params = null;\n    var chunkedMode = true;\n    var headers = null;\n\n    var basicAuthHeader = getBasicAuthHeader(server);\n    if (basicAuthHeader) {\n        if (!options) {\n            options = new FileUploadOptions();\n        }\n        if (!options.headers) {\n            options.headers = {};\n        }\n        options.headers[basicAuthHeader.name] = basicAuthH
 eader.value;\n    }\n\n    if (options) {\n        fileKey = options.fileKey;\n        fileName = options.fileName;\n        mimeType = options.mimeType;\n        headers = options.headers;\n        if (options.chunkedMode !== null || typeof optio

<TRUNCATED>

Mime
View raw message