Return-Path: X-Original-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Delivered-To: apmail-incubator-callback-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 6AD1ACB70 for ; Sat, 28 Jul 2012 02:01:30 +0000 (UTC) Received: (qmail 93364 invoked by uid 500); 28 Jul 2012 02:01:29 -0000 Delivered-To: apmail-incubator-callback-commits-archive@incubator.apache.org Received: (qmail 93305 invoked by uid 500); 28 Jul 2012 02:01:29 -0000 Mailing-List: contact callback-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: callback-dev@incubator.apache.org Delivered-To: mailing list callback-commits@incubator.apache.org Received: (qmail 92907 invoked by uid 99); 28 Jul 2012 02:01:29 -0000 Received: from tyr.zones.apache.org (HELO tyr.zones.apache.org) (140.211.11.114) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 28 Jul 2012 02:01:29 +0000 Received: by tyr.zones.apache.org (Postfix, from userid 65534) id 15A8D19ACC; Sat, 28 Jul 2012 02:01:29 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: anis@apache.org To: callback-commits@incubator.apache.org X-Mailer: ASF-Git Admin Mailer Subject: [17/21] [Cordova - Tizen] Message-Id: <20120728020129.15A8D19ACC@tyr.zones.apache.org> Date: Sat, 28 Jul 2012 02:01:29 +0000 (UTC) http://git-wip-us.apache.org/repos/asf/incubator-cordova-tizen/blob/9ef463ae/js/cordova.tizen-debug.js ---------------------------------------------------------------------- diff --git a/js/cordova.tizen-debug.js b/js/cordova.tizen-debug.js new file mode 100644 index 0000000..03c7512 --- /dev/null +++ b/js/cordova.tizen-debug.js @@ -0,0 +1,114 @@ +// commit 7dd17b00544742d14ecdeff2148a66480680f12b + +// File generated at :: Thu Jul 26 2012 17:32:56 GMT+0200 (CEST) + +/* + 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("var require,\n define;\n\n(function () {\n var modules = {};\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 }\n return modules[id].factory ? build(modules[id]) : 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//@ 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) {\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.addEventListener = function(evt, handler, capture) {\n var e = evt.toLowerCase();\n if (typeof documentEventHandlers[e] != 'undefined') {\n if (evt === 'deviceready') {\n documentEventHandlers[e].subscribeOnce(handler);\n } else {\n documentEventHandlers[e].subscribe(handler);\n }\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 unsubcribing 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.removeEventListener = function(evt, handler, capture) {\n var e = evt.toLowerCase();\n // If unsubcribing 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, opts) {\n return (windowEventHandlers[event] = channel.create(event, opts));\n },\n addDocumentEventHandler:function(event, opts) {\n return (documentEventHandlers[event] = channel.create(event, opts));\n },\n removeWindowEventHandler:function(event) {\n delete windowEventHandlers[event];\n },\n removeDocumentEventHandler:function(event) {\n delete documentEventHandlers[event];\n },\n /**\n * Retreive 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 * Met hod to fire event from native code\n */\n fireDocumentEvent: function(type, data) {\n var evt = createEvent(type, data);\n if (typeof documentEventHandlers[type] != 'undefined') {\n setTimeout(function() {\n documentEventHandlers[type].fire(evt);\n }, 0);\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 // TODO: this is Android only; think about how to do this better\n shuttingDown:false,\n UsePolling:false,\n // END TODO\n\n // TODO: iOS only\n // This queue holds the currently executing command and all pending\n // commands executed with cordova.exec().\n commandQueue:[],\n // Indicates if we're currently in the middle of flushing the command\n // queue on the native side.\n commandQueueFlushing:false,\n // END TODO\n /**\n * Plugin callback mechanism.\n */\n callbackId: 0,\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 * @param callbackId\n * @param args\n */\n callbackSuccess: function(callbackId, args) {\n if (cordova.callbacks[callbackId]) {\n\n // If result is to be sent to callback\n if (args.status == cordova.callbackStatus.OK) {\n try {\n if (cordova.callbacks[callbackId].success) {\n cordova.callbacks[callbackId].success(args.message);\n }\n }\n catch (e) {\n console.log(\"Error in success callback: \"+callbackId+\" = \"+e);\n }\n }\n\n // Clear callback if not expecting any more results\n if (!args.keepCallback) {\n delete cordova.callbacks[callbackId];\n }\n }\n },\n\n /**\n * Called by native code when returning error result from an action.\n *\n * @param callbackId\n * @param args\n */\n callbackError: function(callbackId, args) {\n if (cordova.callbacks[callbackId]) {\n try {\n if (cordova.callbacks[callbackId].fail) {\n cordova.callbacks[callbackId].fail(args.message);\n }\n }\n catch (e) {\n console.log(\"Error in error callback: \"+callbackId+\" = \"+e);\n }\n\n // Clear callback if not expecting any more results\n if (!args.keepCallback) {\n delete cordova.callbacks[callbackId];\n }\n }\n },\n addConstructor: function(func) {\n channel.onCordovaReady.subscribeOnce(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.addDocumentEventHandler('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/builder\", function(require, exports, module) {\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 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 parent[key] = result;\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 parent[key] = result;\n }\n }\n result = parent[key];\n } else {\n // Overwrite if not currently defined.\n if (typeof parent[key] == 'undefined') {\n parent[key] = result;\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 p roperty.\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 target[prop] = typeof src[prop] === 'object' ? recursiveMerge(\n target[prop], src[prop]) : src[prop];\n }\n }\n }\n return target;\n}\n\nmodule.exports = {\n build: function (objects) {\n return {\n intoButDontClobber: function (target) {\n include(target, objects, false, false);\n },\n intoAndClobber: function(target) {\n include(target, objects, true, false);\n },\n intoAndMerge: function(target) {\n include(target, objects, true, true);\n }\n };\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/channel\", function(require, exports, module) {\nvar utils = require('cordova/utils');\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.\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 Cordova is ready\n * onResume User event fired to i ndicate 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 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 * @constr uctor\n * @param type String the channel name\n * @param opts Object options to pass into the channel, currently\n * supports:\n * onSubscribe: callback that fires when\n * something subscribes to the Channel. Sets\n * context to the Channel.\n * onUnsubscribe: callback that fires when\n * something unsubscribes to the Channel. Sets\n * context to the Channel.\n */\nvar Channel = function(type, opts) {\n this.type = type;\n this.handlers = {};\n this.numHandlers = 0;\n this.guid = 1;\n this.fired = false;\n this.enabled = true;\n this.events = {\n onSubscribe:null,\n onUnsubscribe:null\n };\n if (opts) {\n if (opts.onSubscribe) this.events.onSubscribe = opts.onSubscribe;\n if (opts.onUnsubscribe) this.events.onUnsubscribe = opts.onUnsubscribe;\n }\n},\n channel = {\n / **\n * Calls the provided function only after all of the channels specified\n * have been fired.\n */\n join: function (h, c) {\n var i = c.length;\n var len = i;\n var f = function() {\n if (!(--i)) h();\n };\n for (var j=0; j} phoneNumbers array of phone numbers\n* @param {Array.} emails array of email addresses\n* @param {Array.} addresses array of addresses\n* @param {Array.} ims instant messaging user ids\n* @param {Array.} organizations\n* @param {DOMString} birthday contact's birthday\n* @param {DOMString} note user notes about contact\n* @param {Array.} photos\n* @param {Array.} categories\n* @param {Array.} urls contact's web sites\n*/\nvar Contact = f unction (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.proto type.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 (clone dContact.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 clonedContac t;\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/ContactAddress\", function(require, exports, module) {\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//@ sourceURL=lib/common/plugin/ContactAddress.js")} catch(e) {console.log("exception: in lib/common/plugin/ContactAddr ess.js: " + e);console.log(e.stack);} +try {eval("define(\"cordova/plugin/ContactError\", function(require, exports, module) {\n/**\n * ContactError.\n * An error code assigned by an implementation when an error has occured\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//@ 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* 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//@ 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 * 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//@ 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* 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//@ 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* 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//@ 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 * 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.speed = (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) {\nvar 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.apply(this, [false, true, name, fullPath]);\n};\n\nutils.extend(DirectoryEntry, Entry);\n\n/**\n * Creates a new DirectoryReader to read entries fro m 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 excluively 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 var win = typeof successCallback !== 'function' ? null : function(result) {\n var entry = new DirectoryEntry(result.name, result.fullPath);\n successCallback(entry);\n };\n var fail = typeof errorCallback !== 'function' ? null : function(code) {\n errorCallback(new FileError(code));\n };\n exec(win, fail, \"File\", \"getDirectory\", [this.fullPath, pa th, 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 var fail = typeof errorCallback !== 'function' ? null : 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 excluively create the file\n * @param {Function} successCallback is called with the new entry\n * @param {Function} errorCallback is called with a FileError\n */\nDirectoryEntry.prototype.getFile = function(path, options, successCallback, errorCallback) {\n var win = ty peof successCallback !== 'function' ? null : 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 = typeof errorCallback !== 'function' ? null : 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) {\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][;base64],\n *\n * @param file {File} File object containing file properties\n */\nFileReader.prototype.readAsDataURL = function(file) {\n this.fileName = \"\";\n if (typeof file.fullPath === \"undefined\") {\n this.fileName = file;\n } else {\n this.fileName = file.fullPath;\n }\n\n // Already loading something\n if (this.readyState == FileReader.LOADING) {\n throw new FileError(FileError.INVALID_STATE_ERR);\n }\n\n // LOADING state\n this.readyState = FileReader.LOADING;\n\n // If loadstart callback\n if (typeof this.onloadstart === \"function\") {\n this.onloadstart(new ProgressEvent(\"loadstart\", {target:this}));\n }\n\n var me = this;\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\", [this.fileName]);\n};\n\n/**\n * Read file and return data as a binary data.\n *\n * @param file {File} File object contai ning file properties\n */\nFileReader.prototype.readAsBinaryString = function(file) {\n // TODO - Can't return binary data to browser.\n console.log('method \"readAsBinaryString\" is not supported at this time.');\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 // TODO - Can't return binary data to browser.\n console.log('This method is not supported at this time.');\n};\n\nmodule.exports = FileReader;\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) {\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) {\nvar exec = require('cordova/exec'),\n FileTransferError = require('cordova/plugin/FileTransferError');\n\n/**\n * FileTransfer uploads a file to a remote server.\n * @constructor\n */\nvar FileTransfer = function() {};\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, ser ver, successCallback, errorCallback, options, trustAllHosts) {\n // sanity parameter checking\n if (!filePath || !server) throw new Error(\"FileTransfer.upload requires filePath and server URL parameters at the minimum.\");\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 if (options) {\n fileKey = options.fileKey;\n fileName = options.fileName;\n mimeType = options.mimeType;\n if (options.chunkedMode !== null || typeof options.chunkedMode != \"undefined\") {\n chunkedMode = options.chunkedMode;\n }\n if (options.params) {\n params = options.params;\n }\n else {\n params = {};\n }\n }\n\n var fail = function(e) {\n var error = new FileTransferError(e.code, e.source, e.target, e.http_status);\n errorCallback(error);\n };\n\n exec(successCallback, f ail, 'FileTransfer', 'upload', [filePath, server, fileKey, fileName, mimeType, params, trustAllHosts, chunkedMode]);\n};\n\n/**\n * Downloads a file form a given URL and saves it to the specified directory.\n * @param source {String} URL of the server to receive the file\n * @param target {String} Full path of the file on the device\n * @param successCallback (Function} Callback to be invoked when upload has completed\n * @param errorCallback {Function} Callback to be invoked upon error\n */\nFileTransfer.prototype.download = function(source, target, successCallback, errorCallback) {\n // sanity parameter checking\n if (!source || !target) throw new Error(\"FileTransfer.download requires source URI and target URI parameters at the minimum.\");\n var win = function(result) {\n var entry = null;\n if (result.isDirectory) {\n entry = new (require('cordova/plugin/DirectoryEntry'))();\n }\n else if (result.isFile) {\n entry = new (require('cordova/plugin/FileEntry'))();\n }\n entry.isDirectory = result.isDirectory;\n entry.isFile = result.isFile;\n entry.name = result.name;\n entry.fullPath = result.fullPath;\n successCallback(entry);\n };\n\n var fail = function(e) {\n var error = new FileTransferError(e.code, e.source, e.target, e.http_status);\n errorCallback(error);\n };\n\n exec(win, errorCallback, 'FileTransfer', 'download', [source, target]);\n};\n\nmodule.exports = FileTransfer;\n\n});\n\n//@ sourceURL=lib/common/plugin/FileTransfer.js")} catch(e) {console.log("exception: in lib/common/plugin/FileTransfer.js: " + e);console.log(e.stack);} +try {eval("define(\"cordova/plugin/FileTransferError\", function(require, exports, module) {\n/**\n * FileTransferError\n * @constructor\n */\nvar FileTransferError = function(code, source, target, status) {\n this.code = code || null;\n this.source = source || null;\n this.target = target || null;\n this.http_status = status || null;\n};\n\nFileTransferError.FILE_NOT_FOUND_ERR = 1;\nFileTransferError.INVALID_URL_ERR = 2;\nFileTransferError.CONNECTION_ERR = 3;\n\nmodule.exports = FileTransferError;\n\n});\n\n//@ sourceURL=lib/common/plugin/FileTransferError.js")} catch(e) {console.log("exception: in lib/common/plugin/FileTransferError.js: " + e);console.log(e.stack);} +try {eval("define(\"cordova/plugin/FileUploadOptions\", function(require, exports, module) {\n/**\n * Options to customize the HTTP request used to upload files.\n * @constructor\n * @param fileKey {String} Name of file request parameter.\n * @param fileName {String} Filename to be used by the server. Defaults to image.jpg.\n * @param mimeType {String} Mimetype of the uploaded file. Defaults to image/jpeg.\n * @param params {Object} Object with key: value params to send to the server.\n */\nvar FileUploadOptions = function(fileKey, fileName, mimeType, params) {\n this.fileKey = fileKey || null;\n this.fileName = fileName || null;\n this.mimeType = mimeType || null;\n this.params = params || null;\n};\n\nmodule.exports = FileUploadOptions;\n});\n\n//@ sourceURL=lib/common/plugin/FileUploadOptions.js")} catch(e) {console.log("exception: in lib/common/plugin/FileUploadOptions.js: " + e);console.log(e.stack);} +try {eval("define(\"cordova/plugin/FileUploadResult\", function(require, exports, module) {\n/**\n * FileUploadResult\n * @constructor\n */\nvar FileUploadResult = function() {\n this.bytesSent = 0;\n this.responseCode = null;\n this.response = null;\n};\n\nmodule.exports = FileUploa