You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by he...@apache.org on 2013/01/21 23:27:18 UTC

[3/4] update cordova-js libs to 2.4.0

http://git-wip-us.apache.org/repos/asf/cordova-webos/blob/3868d63d/lib/cordova.webos-debug.js
----------------------------------------------------------------------
diff --git a/lib/cordova.webos-debug.js b/lib/cordova.webos-debug.js
index 71ef689..2db2f0f 100644
--- a/lib/cordova.webos-debug.js
+++ b/lib/cordova.webos-debug.js
@@ -1,6 +1,6 @@
-// commit 24d65ab645742e8360c3dd16d7a36411cc3383e0
+// commit 1aa3643deaa9f14970806277d5f651f3cd78caa9
 
-// File generated at :: Thu Jan 03 2013 11:30:14 GMT-0800 (PST)
+// File generated at :: Mon Jan 21 2013 13:22:05 GMT-0800 (PST)
 
 /*
  Licensed to the Apache Software Foundation (ASF) under one
@@ -23,28 +23,29 @@
 
 ;(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})();\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("\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: \" + callback
 Id + \" = \"+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, message, keepCallback) {\n        var callback = cordova.callbacks[callbackId];\n        if (callback) {\n            if (success && status == cordova.callbackStatus.OK) {\n                callback.success && callback.success(message);\n            } else if (!success) {\n          
       callback.fail && callback.fail(message);\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 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 type;\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        type = Object.prototype.toString.call(arg).slice(8, -1);\n        if ((arg === null || arg === undefined) && c == cUpper) {\n            continue;\n        }\n   
      if (type != typeMap[cUpper]) {\n            errMsg = 'Expected ' + typeMap[cUpper];\n            break;\n        }\n    }\n    if (errMsg) {\n        errMsg += ', but got ' + type + '.';\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\nmoduleExports.checkArgs = checkArgs;\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    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            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.pat
 h) : {};\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 if (merge && typeof obj.path !== 'undefined') {\n              // If merging, merge parent onto result\n     
          recursiveMerge(result, parent[key]);\n              parent[key] = result;\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 (typeof target.prototype !== 'undefined' && target.prototype.constructor === target) {\n      
           // If the target object is a constructor override off prototype.\n                target.prototype[prop] = src[prop];\n            } else {\n                if (typeof src[prop] === 'object') {\n                    target[prop] = recursiveMerge(target[prop], src[prop]);\n                } else {\n                    clobber(target, prop, src[prop]);\n                }\n            }\n        }\n    }\n    return target;\n}\n\nmodule.exports = {\n    buildIntoButDoNotClobber: function(objects, target) {\n        include(target, objects, false, false);\n    },\n    buildIntoAndClobber: function(objects, target) {\n        include(target, objects, true, false);\n    },\n    buildIntoAndMerge: function(objects, target) {\n        include(target, objects, true, true);\n    }\n};\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/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    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 a
 lready 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, prop, 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\nmodule.exports = {\n    buildIntoButDoNotClobber: function(objects, target) {\n        include(target, objects, false, false);\n    },\n    buildIntoAndClobber: function(objects, target) {\n        include(target, objects, true, false);\n    },\n    buildIntoAndMerge: function(objects, target) {\n        include(target, objects, true, true);\n    },\n    recursiveMerge: recursiveMerge,\n    assignOrWrapInDeprecateGetter: assignOrWrapInDeprecateGetter\n};\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 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.stack);}
 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/common\", function(require, exports, module) {\n\nmodule.exports = {\n    defaults: {\n        cordova: {\n            path: 'cordova',\n            children: {\n                exec: {\n                    path: 'cordova/exec'\n                },\n                logger: {\n                    path: 'cordova/plugin/logger'\n                }\n            }\n        },\n        Cordova: {\n            children: {\n                exec: {\n                    path: 'cordova/exec'\n                }\n            }\n        },\n        open : {\n            path: 'cordova/plugin/InAppBrowser'\n        },\n        navigator: {\n            children: {\n                notification: {\n                    path: 'cordova/plugin/notification'\n                },\n                accelerometer: {\n                    path: 'cordova/plugin/accelerometer'\n                },\n                battery: {\n                    path: 'cordova/plugin/battery'\n          
       },\n                camera:{\n                    path: 'cordova/plugin/Camera'\n                },\n                compass:{\n                    path: 'cordova/plugin/compass'\n                },\n                contacts: {\n                    path: 'cordova/plugin/contacts'\n                },\n                device:{\n                    children:{\n                        capture: {\n                            path: 'cordova/plugin/capture'\n                        }\n                    }\n                },\n                geolocation: {\n                    path: 'cordova/plugin/geolocation'\n                },\n                globalization: {\n                    path: 'cordova/plugin/globalization'\n                },\n                network: {\n                    children: {\n                        connection: {\n                            path: 'cordova/plugin/network',\n                            deprecated: 'navigator.network.connection is deprecated.
  Use navigator.connection instead.'\n                        }\n                    }\n                },\n                splashscreen: {\n                    path: 'cordova/plugin/splashscreen'\n                }\n            }\n        },\n        Acceleration: {\n            path: 'cordova/plugin/Acceleration'\n        },\n        Camera:{\n            path: 'cordova/plugin/CameraConstants'\n        },\n        CameraPopoverOptions: {\n            path: 'cordova/plugin/CameraPopoverOptions'\n        },\n        CaptureError: {\n            path: 'cordova/plugin/CaptureError'\n        },\n        CaptureAudioOptions:{\n            path: 'cordova/plugin/CaptureAudioOptions'\n        },\n        CaptureImageOptions: {\n            path: 'cordova/plugin/CaptureImageOptions'\n        },\n        CaptureVideoOptions: {\n            path: 'cordova/plugin/CaptureVideoOptions'\n        },\n        CompassHeading:{\n            path: 'cordova/plugin/CompassHeading'\n        },\n        Co
 mpassError:{\n            path: 'cordova/plugin/CompassError'\n        },\n        ConfigurationData: {\n            path: 'cordova/plugin/ConfigurationData'\n        },\n        Connection: {\n            path: 'cordova/plugin/Connection'\n        },\n        Contact: {\n            path: 'cordova/plugin/Contact'\n        },\n        ContactAddress: {\n            path: 'cordova/plugin/ContactAddress'\n        },\n        ContactError: {\n            path: 'cordova/plugin/ContactError'\n        },\n        ContactField: {\n            path: 'cordova/plugin/ContactField'\n        },\n        ContactFindOptions: {\n            path: 'cordova/plugin/ContactFindOptions'\n        },\n        ContactName: {\n            path: 'cordova/plugin/ContactName'\n        },\n        ContactOrganization: {\n            path: 'cordova/plugin/ContactOrganization'\n        },\n        Coordinates: {\n            path: 'cordova/plugin/Coordinates'\n        },\n        device: {\n            path: 'co
 rdova/plugin/device'\n        },\n        DirectoryEntry: {\n            path: 'cordova/plugin/DirectoryEntry'\n        },\n        DirectoryReader: {\n            path: 'cordova/plugin/DirectoryReader'\n        },\n        Entry: {\n            path: 'cordova/plugin/Entry'\n        },\n        File: {\n            path: 'cordova/plugin/File'\n        },\n        FileEntry: {\n            path: 'cordova/plugin/FileEntry'\n        },\n        FileError: {\n            path: 'cordova/plugin/FileError'\n        },\n        FileReader: {\n            path: 'cordova/plugin/FileReader'\n        },\n        FileSystem: {\n            path: 'cordova/plugin/FileSystem'\n        },\n        FileTransfer: {\n            path: 'cordova/plugin/FileTransfer'\n        },\n        FileTransferError: {\n            path: 'cordova/plugin/FileTransferError'\n        },\n        FileUploadOptions: {\n            path: 'cordova/plugin/FileUploadOptions'\n        },\n        FileUploadResult: {\n        
     path: 'cordova/plugin/FileUploadResult'\n        },\n        FileWriter: {\n            path: 'cordova/plugin/FileWriter'\n        },\n        Flags: {\n            path: 'cordova/plugin/Flags'\n        },\n        GlobalizationError: {\n            path: 'cordova/plugin/GlobalizationError'\n        },\n        LocalFileSystem: {\n            path: 'cordova/plugin/LocalFileSystem'\n        },\n        Media: {\n            path: 'cordova/plugin/Media'\n        },\n        MediaError: {\n            path: 'cordova/plugin/MediaError'\n        },\n        MediaFile: {\n            path: 'cordova/plugin/MediaFile'\n        },\n        MediaFileData:{\n            path: 'cordova/plugin/MediaFileData'\n        },\n        Metadata:{\n            path: 'cordova/plugin/Metadata'\n        },\n        Position: {\n            path: 'cordova/plugin/Position'\n        },\n        PositionError: {\n            path: 'cordova/plugin/PositionError'\n        },\n        ProgressEvent: {\n      
       path: 'cordova/plugin/ProgressEvent'\n        },\n        requestFileSystem:{\n            path: 'cordova/plugin/requestFileSystem'\n        },\n        resolveLocalFileSystemURI:{\n            path: 'cordova/plugin/resolveLocalFileSystemURI'\n        }\n    },\n    clobbers: {\n        navigator: {\n            children: {\n                connection: {\n                    path: 'cordova/plugin/network'\n                }\n            }\n        }\n    }\n};\n\n});\n\n//@ sourceURL=lib/common/common.js")} catch(e) {console.log("exception: in lib/common/common.js: " + e);console.log(e.stack);}
+try {eval("define(\"cordova/common\", function(require, exports, module) {\n\nmodule.exports = {\n    defaults: {\n        cordova: {\n            path: 'cordova',\n            children: {\n                exec: {\n                    path: 'cordova/exec'\n                },\n                logger: {\n                    path: 'cordova/plugin/logger'\n                }\n            }\n        },\n        Cordova: {\n            children: {\n                exec: {\n                    path: 'cordova/exec'\n                }\n            }\n        },\n        open : {\n            path: 'cordova/plugin/InAppBrowser'\n        },\n        navigator: {\n            children: {\n                notification: {\n                    path: 'cordova/plugin/notification'\n                },\n                accelerometer: {\n                    path: 'cordova/plugin/accelerometer'\n                },\n                battery: {\n                    path: 'cordova/plugin/battery'\n          
       },\n                camera:{\n                    path: 'cordova/plugin/Camera'\n                },\n                compass:{\n                    path: 'cordova/plugin/compass'\n                },\n                contacts: {\n                    path: 'cordova/plugin/contacts'\n                },\n                device:{\n                    children:{\n                        capture: {\n                            path: 'cordova/plugin/capture'\n                        }\n                    }\n                },\n                geolocation: {\n                    path: 'cordova/plugin/geolocation'\n                },\n                globalization: {\n                    path: 'cordova/plugin/globalization'\n                },\n                network: {\n                    children: {\n                        connection: {\n                            path: 'cordova/plugin/network',\n                            deprecated: 'navigator.network.connection is deprecated.
  Use navigator.connection instead.'\n                        }\n                    }\n                },\n                splashscreen: {\n                    path: 'cordova/plugin/splashscreen'\n                }\n            }\n        },\n        Acceleration: {\n            path: 'cordova/plugin/Acceleration'\n        },\n        Camera:{\n            path: 'cordova/plugin/CameraConstants'\n        },\n        CameraPopoverOptions: {\n            path: 'cordova/plugin/CameraPopoverOptions'\n        },\n        CaptureError: {\n            path: 'cordova/plugin/CaptureError'\n        },\n        CaptureAudioOptions:{\n            path: 'cordova/plugin/CaptureAudioOptions'\n        },\n        CaptureImageOptions: {\n            path: 'cordova/plugin/CaptureImageOptions'\n        },\n        CaptureVideoOptions: {\n            path: 'cordova/plugin/CaptureVideoOptions'\n        },\n        CompassHeading:{\n            path: 'cordova/plugin/CompassHeading'\n        },\n        Co
 mpassError:{\n            path: 'cordova/plugin/CompassError'\n        },\n        ConfigurationData: {\n            path: 'cordova/plugin/ConfigurationData'\n        },\n        Connection: {\n            path: 'cordova/plugin/Connection'\n        },\n        Contact: {\n            path: 'cordova/plugin/Contact'\n        },\n        ContactAddress: {\n            path: 'cordova/plugin/ContactAddress'\n        },\n        ContactError: {\n            path: 'cordova/plugin/ContactError'\n        },\n        ContactField: {\n            path: 'cordova/plugin/ContactField'\n        },\n        ContactFindOptions: {\n            path: 'cordova/plugin/ContactFindOptions'\n        },\n        ContactName: {\n            path: 'cordova/plugin/ContactName'\n        },\n        ContactOrganization: {\n            path: 'cordova/plugin/ContactOrganization'\n        },\n        Coordinates: {\n            path: 'cordova/plugin/Coordinates'\n        },\n        device: {\n            path: 'co
 rdova/plugin/device'\n        },\n        GlobalizationError: {\n            path: 'cordova/plugin/GlobalizationError'\n        },\n        Media: {\n            path: 'cordova/plugin/Media'\n        },\n        MediaError: {\n            path: 'cordova/plugin/MediaError'\n        },\n        MediaFile: {\n            path: 'cordova/plugin/MediaFile'\n        },\n        MediaFileData:{\n            path: 'cordova/plugin/MediaFileData'\n        },\n        Position: {\n            path: 'cordova/plugin/Position'\n        },\n        PositionError: {\n            path: 'cordova/plugin/PositionError'\n        },\n        ProgressEvent: {\n            path: 'cordova/plugin/ProgressEvent'\n        }\n    },\n    clobbers: {\n        navigator: {\n            children: {\n                connection: {\n                    path: 'cordova/plugin/network'\n                }\n            }\n        }\n    }\n};\n\n});\n\n//@ sourceURL=lib/common/common.js")} catch(e) {console.log("exception:
  in lib/common/common.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/webos/device'),\n    \"NetworkStatus\": require('cordova/plugin/webos/network'),\n    \"Compass\": require('cordova/plugin/webos/compass'),\n    \"Camera\": require
 ('cordova/plugin/webos/camera'),\n    \"Accelerometer\" : require('cordova/plugin/webos/accelerometer'),\n    \"Notification\" : require('cordova/plugin/webos/notification'),\n    \"Geolocation\": require('cordova/plugin/webos/geolocation')\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/webos/exec.js")} catch(e) {console.log("exception: in lib/webos/exec.js: " + e);console.log(e.stack);}
-try {eval("define(\"cordova/platform\", function(require, exports, module) {\n\nvar service=require('cordova/plugin/webos/service'),\n    cordova = require('cordova');\n\nmodule.exports = {\n    id: \"webos\",\n    initialize: function() {\n        if (window.PalmSystem) {\n            window.PalmSystem.stageReady();\n        }\n\n        var Mojo = window.Mojo || {};\n\n        // wait for deviceready before listening and firing document events\n        document.addEventListener(\"deviceready\", function () {\n\n            // LunaSysMgr calls this when the windows is maximized or opened.\n            window.Mojo.stageActivated = function() {\n                console.log(\"stageActivated\");\n                cordova.fireDocumentEvent(\"resume\");\n            };\n            // LunaSysMgr calls this when the windows is minimized or closed.\n            window.Mojo.stageDeactivated = function() {\n                console.log(\"stageDeactivated\");\n                cordova.fireDocume
 ntEvent(\"pause\");\n            };\n            // LunaSysMgr calls this when a KeepAlive app's window is hidden\n            window.Mojo.hide = function() {\n                console.log(\"hide\");\n            };\n            // LunaSysMgr calls this when a KeepAlive app's window is shown\n            window.Mojo.show = function() {\n                console.log(\"show\");\n            };\n\n            // LunaSysMgr calls this whenever an app is \"launched;\"\n            window.Mojo.relaunch = function() {\n                // need to return true to tell sysmgr the relaunch succeeded.\n                // otherwise, it'll try to focus the app, which will focus the first\n                // opened window of an app with multiple windows.\n                console.log(\"relaunch\");\n                return true;\n            };\n\n            // start to listen for network connection changes\n            service.Request('palm://com.palm.connectionmanager', {\n                method: 'g
 etstatus',\n                parameters: { subscribe: true },\n                onSuccess: function (result) {\n                    console.log(\"subscribe:result:\"+JSON.stringify(result));\n\n                    if (!result.isInternetConnectionAvailable) {\n                        if (navigator.onLine) {\n                            console.log(\"Firing event:offline\");\n                            cordova.fireDocumentEvent(\"offline\");\n                        }\n                    } else {\n                        console.log(\"Firing event:online\");\n                        cordova.fireDocumentEvent(\"online\");\n                    }\n                },\n                onFailure: function(e) {\n                    console.error(\"subscribe:error\");\n                }\n            });\n\n        });\n    },\n    clobbers: {\n        requestFileSystem:{\n            path: 'cordova/plugin/webos/requestfilesystem'\n        },\n        FileReader: {\n            path: \"cordova
 /plugin/webos/filereader\"\n        }\n    },\n    merges: {\n        navigator: {\n            children: {\n                service: {\n                    path: \"cordova/plugin/webos/service\"\n                },\n                application: {\n                    path: \"cordova/plugin/webos/application\"\n                },\n                window: {\n                    path: \"cordova/plugin/webos/window\"\n                },\n                notification: {\n                    path: \"cordova/plugin/webos/notification\"\n                },\n                orientation: {\n                    path: \"cordova/plugin/webos/orientation\"\n                },\n                keyboard: {\n                    path: \"cordova/plugin/webos/keyboard\"\n                }\n            }\n        }\n    }\n};\n\n});\n\n//@ sourceURL=lib/webos/platform.js")} catch(e) {console.log("exception: in lib/webos/platform.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\nexports.clobbers = addEntry.bind(null, 'c');\nexports.merges = addEntry.bind(null, 'm');\nexports.defaults = addEntry.bind(null, 'd');\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[part] = cur[part] || {};\n    }\n    return cur[parts[i-1]];\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 = symbolPath 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 (target) {\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    return 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\nvar service=require('cordova/plugin/webos/service'),\n    cordova = require('cordova');\n\nmodule.exports = {\n    id: \"webos\",\n    initialize: function() {\n        var modulemapper = require('cordova/modulemapper');\n\n        modulemapper.loadMatchingModules(/cordova.*\\/symbols$/);\n        modulemapper.mapModules(window);\n\n        if (window.PalmSystem) {\n            window.PalmSystem.stageReady();\n        }\n\n        var Mojo = window.Mojo || {};\n\n        // wait for deviceready before listening and firing document events\n        document.addEventListener(\"deviceready\", function () {\n\n            // LunaSysMgr calls this when the windows is maximized or opened.\n            window.Mojo.stageActivated = function() {\n                console.log(\"stageActivated\");\n                cordova.fireDocumentEvent(\"resume\");\n            };\n            // LunaSysMgr calls this when the wi
 ndows is minimized or closed.\n            window.Mojo.stageDeactivated = function() {\n                console.log(\"stageDeactivated\");\n                cordova.fireDocumentEvent(\"pause\");\n            };\n            // LunaSysMgr calls this when a KeepAlive app's window is hidden\n            window.Mojo.hide = function() {\n                console.log(\"hide\");\n            };\n            // LunaSysMgr calls this when a KeepAlive app's window is shown\n            window.Mojo.show = function() {\n                console.log(\"show\");\n            };\n\n            // LunaSysMgr calls this whenever an app is \"launched;\"\n            window.Mojo.relaunch = function() {\n                // need to return true to tell sysmgr the relaunch succeeded.\n                // otherwise, it'll try to focus the app, which will focus the first\n                // opened window of an app with multiple windows.\n\n                var lp=JSON.parse(PalmSystem.launchParams) || {};\n\n    
             if (lp['palm-command'] && lp['palm-command'] == 'open-app-menu') {\n                    console.log(\"event:ToggleAppMenu\");\n                    cordova.fireDocumentEvent(\"menubutton\");\n                }\n                \n                console.log(\"relaunch\");\n                return true;\n            };\n\n            // start to listen for network connection changes\n            service.Request('palm://com.palm.connectionmanager', {\n                method: 'getstatus',\n                parameters: { subscribe: true },\n                onSuccess: function (result) {\n                    console.log(\"subscribe:result:\"+JSON.stringify(result));\n\n                    if (!result.isInternetConnectionAvailable) {\n                        if (navigator.onLine) {\n                            console.log(\"Firing event:offline\");\n                            cordova.fireDocumentEvent(\"offline\");\n                        }\n                    } else {\n       
                  console.log(\"Firing event:online\");\n                        cordova.fireDocumentEvent(\"online\");\n                    }\n                },\n                onFailure: function(e) {\n                    console.error(\"subscribe:error\");\n                }\n            });\n\n        });\n    },\n    merges: {\n        navigator: {\n            children: {\n                service: {\n                    path: \"cordova/plugin/webos/service\"\n                },\n                application: {\n                    path: \"cordova/plugin/webos/application\"\n                },\n                window: {\n                    path: \"cordova/plugin/webos/window\"\n                },\n                notification: {\n                    path: \"cordova/plugin/webos/notification\"\n                },\n                orientation: {\n                    path: \"cordova/plugin/webos/orientation\"\n                },\n                keyboard: {\n                    p
 ath: \"cordova/plugin/webos/keyboard\"\n                }\n            }\n        }\n    }\n};\n\n});\n\n//@ sourceURL=lib/webos/platform.js")} catch(e) {console.log("exception: in lib/webos/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 exec = require('cordova/exec'),\n    Camera = require('cordova/plugin/CameraConstants');\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    options = options || {};\n    // successCallback required\n    if (typeof successCallback != \"function\") {\n        console.log(\"Camera Error: successCallback is not a function\");\n        return;\n    }\n\n    // errorCallback optional\n  
   if (errorCallback && (typeof errorCallback != \"function\")) {\n        console.log(\"Camera Error: errorCallback is not a function\");\n        return;\n    }\n\n    var quality = 50;\n    if (typeof options.quality == \"number\") {\n        quality = options.quality;\n    } else if (typeof options.quality == \"string\") {\n        var qlity = parseInt(options.quality, 10);\n        if (isNaN(qlity) === false) {\n            quality = qlity.valueOf();\n        }\n    }\n\n    var destinationType = Camera.DestinationType.FILE_URI;\n    if (typeof options.destinationType == \"number\") {\n        destinationType = options.destinationType;\n    }\n\n    var sourceType = Camera.PictureSourceType.CAMERA;\n    if (typeof options.sourceType == \"number\") {\n        sourceType = options.sourceType;\n    }\n\n    var targetWidth = -1;\n    if (typeof options.targetWidth == \"number\") {\n        targetWidth = options.targetWidth;\n    } else if (typeof options.targetWidth == \"string\") 
 {\n        var width = parseInt(options.targetWidth, 10);\n        if (isNaN(width) === false) {\n            targetWidth = width.valueOf();\n        }\n    }\n\n    var targetHeight = -1;\n    if (typeof options.targetHeight == \"number\") {\n        targetHeight = options.targetHeight;\n    } else if (typeof options.targetHeight == \"string\") {\n        var height = parseInt(options.targetHeight, 10);\n        if (isNaN(height) === false) {\n            targetHeight = height.valueOf();\n        }\n    }\n\n    var encodingType = Camera.EncodingType.JPEG;\n    if (typeof options.encodingType == \"number\") {\n        encodingType = options.encodingType;\n    }\n\n    var mediaType = Camera.MediaType.PICTURE;\n    if (typeof options.mediaType == \"number\") {\n        mediaType = options.mediaType;\n    }\n    var allowEdit = false;\n    if (typeof options.allowEdit == \"boolean\") {\n        allowEdit = options.allowEdit;\n    } else if (typeof options.allowEdit == \"number\") {\n
         allowEdit = options.allowEdit <= 0 ? false : true;\n    }\n    var correctOrientation = false;\n    if (typeof options.correctOrientation == \"boolean\") {\n        correctOrientation = options.correctOrientation;\n    } else if (typeof options.correctOrientation == \"number\") {\n        correctOrientation = options.correctOrientation <=0 ? false : true;\n    }\n    var saveToPhotoAlbum = false;\n    if (typeof options.saveToPhotoAlbum == \"boolean\") {\n        saveToPhotoAlbum = options.saveToPhotoAlbum;\n    } else if (typeof options.saveToPhotoAlbum == \"number\") {\n        saveToPhotoAlbum = options.saveToPhotoAlbum <=0 ? false : true;\n    }\n    var popoverOptions = null;\n    if (typeof options.popoverOptions == \"object\") {\n        popoverOptions = options.popoverOptions;\n    }\n\n    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,\n                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOpti
 ons];\n\n    exec(successCallback, errorCallback, \"Camera\", \"takePicture\", args);\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  },\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    SAVEDPHOTOALBUM : 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};\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/Camera\", function(require, exports, module) {\n\nvar argscheck = require('cordova/argscheck'),\n    exec = require('cordova/exec'),\n    Camera = require('cordova/plugin/CameraConstants');\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.getValue;\n\n    var quality = getValue(options.quality, 50);\n    var destin
 ationType = 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\n    var args = [quality, destinationType, sourceType, targetWidth, targetHeight, encodingType,\n                mediaType, allowEdit, correctOrientation, saveToPhotoAlbum, popoverOptions];\n\n    exec(successCallback, errorCallback, \"Camera\", \"takePicture\", args);\n};\n\ncameraExport.cleanup = function(successCallback, erro
 rCallback) {\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};\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/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 !== undefined ? magneticHeading : null);\n  this.trueHeading = (trueHeading !== undefined ? trueHeading : null);\n  this.headingAccuracy = (headingAccuracy !== undefined ? headingAccuracy : null);\n  this.timestamp = (timestamp !== undefined ? 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/CompassHeading\", function(require, exports, module) {\n\nvar CompassHeading = function(magneticHeading, trueHeading, headingAccuracy, timestamp) {\n  this.magneticHeading = magneticHeading || null;\n  this.trueHeading = trueHeading || null;\n  this.headingAccuracy = headingAccuracy || null;\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        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 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.<ContactField>} 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.pro
 totype.remove = function(successCB, errorCB) {\n    var fail = 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    var i;\n    clonedContact.id = null;\n    clonedContact.rawId = null;\n    // Loop through and clear out any id's in phones, emails, etc.\n    if (clonedContact.phoneNumbers) {\n        for (i = 0; i < clonedContact.phoneNumbers.length; i++) {\n            clonedContact.phoneNumbers[i].id = null;\n        }\n    }\n    if (clonedContact.emails) {\n        for (i = 0; i < clonedContact.emails.length; i++) {\n            clonedContact.emails[i].id = null;\n        }\n    }\n    if (clo
 nedContact.addresses) {\n        for (i = 0; i < clonedContact.addresses.length; i++) {\n            clonedContact.addresses[i].id = null;\n        }\n    }\n    if (clonedContact.ims) {\n        for (i = 0; i < clonedContact.ims.length; i++) {\n            clonedContact.ims[i].id = null;\n        }\n    }\n    if (clonedContact.organizations) {\n        for (i = 0; i < clonedContact.organizations.length; i++) {\n            clonedContact.organizations[i].id = null;\n        }\n    }\n    if (clonedContact.categories) {\n        for (i = 0; i < clonedContact.categories.length; i++) {\n            clonedContact.categories[i].id = null;\n        }\n    }\n    if (clonedContact.photos) {\n        for (i = 0; i < clonedContact.photos.length; i++) {\n            clonedContact.photos[i].id = null;\n        }\n    }\n    if (clonedContact.urls) {\n        for (i = 0; i < clonedContact.urls.length; i++) {\n            clonedContact.urls[i].id = null;\n        }\n    }\n    return clonedCont
 act;\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  var fail = function(code) {\n      errorCB(new ContactError(code));\n  };\n    var success = function(result) {\n      if (result) {\n          if (typeof successCB === 'function') {\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 = convertOut(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/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);}
@@ -52,24 +53,24 @@ try {eval("define(\"cordova/plugin/ContactFindOptions\", function(require, expor
 try {eval("define(\"cordova/plugin/ContactName\", function(require, exports, module) {\n\n/**\n* Contact name.\n* @constructor\n* @param formatted // NOTE: not part of W3

<TRUNCATED>