@w6s/cordova-import
Version:
Automatic CordovaJs import util.
2 lines • 77.4 kB
JavaScript
!function(){var CORDOVA_JS_BUILD_LABEL="3.6.3",require,define;!function(){function e(e){var o=e.factory,t=function(o){var t=o;return"."===o.charAt(0)&&(t=e.id.slice(0,e.id.lastIndexOf(r))+r+o.slice(2)),require(t)};return e.exports={},delete e.factory,o(t,e.exports,e),e.exports}var o={},t=[],n={},r=".";require=function(r){if(!o[r])throw"module "+r+" not found";if(r in n){var i=t.slice(n[r]).join("->")+"->"+r;throw"Cycle in require graph: "+i}if(o[r].factory)try{return n[r]=t.length,t.push(r),e(o[r])}finally{delete n[r],t.pop()}return o[r].exports},define=function(e,t){if(o[e])throw"module "+e+" already defined";o[e]={id:e,factory:t}},define.remove=function(e){delete o[e]},define.moduleMap=o}(),"object"==typeof module&&"function"==typeof require&&(module.exports.require=require,module.exports.define=define),define("cordova",function(e,o,t){function n(e,o){var t=document.createEvent("Events");if(t.initEvent(e,!1,!1),o)for(var n in o)o.hasOwnProperty(n)&&(t[n]=o[n]);return t}var r=e("cordova/channel"),i=e("cordova/platform"),a=document.addEventListener,c=document.removeEventListener,s=window.addEventListener,l=window.removeEventListener,d={},u={};document.addEventListener=function(e,o,t){var n=e.toLowerCase();"undefined"!=typeof d[n]?d[n].subscribe(o):a.call(document,e,o,t)},window.addEventListener=function(e,o,t){var n=e.toLowerCase();"undefined"!=typeof u[n]?u[n].subscribe(o):s.call(window,e,o,t)},document.removeEventListener=function(e,o,t){var n=e.toLowerCase();"undefined"!=typeof d[n]?d[n].unsubscribe(o):c.call(document,e,o,t)},window.removeEventListener=function(e,o,t){var n=e.toLowerCase();"undefined"!=typeof u[n]?u[n].unsubscribe(o):l.call(window,e,o,t)};var f={define:define,require:e,version:CORDOVA_JS_BUILD_LABEL,platformId:i.id,addWindowEventHandler:function(e){return u[e]=r.create(e)},addStickyDocumentEventHandler:function(e){return d[e]=r.createSticky(e)},addDocumentEventHandler:function(e){return d[e]=r.create(e)},removeWindowEventHandler:function(e){delete u[e]},removeDocumentEventHandler:function(e){delete d[e]},getOriginalHandlers:function(){return{document:{addEventListener:a,removeEventListener:c},window:{addEventListener:s,removeEventListener:l}}},fireDocumentEvent:function(e,o,t){var r=n(e,o);"undefined"!=typeof d[e]?t?d[e].fire(r):setTimeout(function(){"deviceready"==e&&document.dispatchEvent(r),d[e].fire(r)},0):document.dispatchEvent(r)},fireWindowEvent:function(e,o){var t=n(e,o);"undefined"!=typeof u[e]?setTimeout(function(){u[e].fire(t)},0):window.dispatchEvent(t)},callbackId:Math.floor(2e9*Math.random()),callbacks:{},callbackStatus:{NO_RESULT:0,OK:1,CLASS_NOT_FOUND_EXCEPTION:2,ILLEGAL_ACCESS_EXCEPTION:3,INSTANTIATION_EXCEPTION:4,MALFORMED_URL_EXCEPTION:5,IO_EXCEPTION:6,INVALID_ACTION:7,JSON_EXCEPTION:8,ERROR:9},callbackSuccess:function(e,o){try{f.callbackFromNative(e,!0,o.status,[o.message],o.keepCallback)}catch(t){console.log("Error in success callback: "+e+" = "+t)}},callbackError:function(e,o){try{f.callbackFromNative(e,!1,o.status,[o.message],o.keepCallback)}catch(t){console.log("Error in error callback: "+e+" = "+t)}},callbackFromNative:function(e,o,t,n,r){var i=f.callbacks[e];i&&(o&&t==f.callbackStatus.OK?i.success&&i.success.apply(null,n):o||i.fail&&i.fail.apply(null,n),r||delete f.callbacks[e])},addConstructor:function(e){r.onCordovaReady.subscribe(function(){try{e()}catch(o){console.log("Failed to run constructor: "+o)}})}};t.exports=f}),define("cordova/android/nativeapiprovider",function(e,o,t){var n=this._cordovaNative||e("cordova/android/promptbasednativeapi"),r=n;t.exports={get:function(){return r},setPreferPrompt:function(o){r=o?e("cordova/android/promptbasednativeapi"):n},set:function(e){r=e}}}),define("cordova/android/promptbasednativeapi",function(e,o,t){t.exports={exec:function(e,o,t,n,r){return prompt(r,"gap:"+JSON.stringify([e,o,t,n]))},setNativeToJsBridgeMode:function(e,o){prompt(o,"gap_bridge_mode:"+e)},retrieveJsMessages:function(e,o){return prompt(+o,"gap_poll:"+e)}}}),define("cordova/argscheck",function(e,o,t){function n(e,o){return/.*?\((.*?)\)/.exec(e)[1].split(", ")[o]}function r(e,o,t,r){if(c.enableChecks){for(var i,l=null,d=0;d<e.length;++d){var u=e.charAt(d),f=u.toUpperCase(),p=t[d];if("*"!=u&&(i=a.typeName(p),(null!==p&&void 0!==p||u!=f)&&i!=s[f])){l="Expected "+s[f];break}}if(l)throw l+=", but got "+i+".",l='Wrong type for parameter "'+n(r||t.callee,d)+'" of '+o+": "+l,"undefined"==typeof jasmine&&console.error(l),TypeError(l)}}function i(e,o){return void 0===e?o:e}var a=(e("cordova/exec"),e("cordova/utils")),c=t.exports,s={A:"Array",D:"Date",N:"Number",S:"String",F:"Function",O:"Object"};c.checkArgs=r,c.getValue=i,c.enableChecks=!0}),define("cordova/base64",function(e,o,t){function n(e){for(var o,t=e.byteLength,n="",r=c(),i=0;t-2>i;i+=3)o=(e[i]<<16)+(e[i+1]<<8)+e[i+2],n+=r[o>>12],n+=r[4095&o];return t-i==2?(o=(e[i]<<16)+(e[i+1]<<8),n+=r[o>>12],n+=a[(4095&o)>>6],n+="="):t-i==1&&(o=e[i]<<16,n+=r[o>>12],n+="=="),n}var r=o;r.fromArrayBuffer=function(e){var o=new Uint8Array(e);return n(o)},r.toArrayBuffer=function(e){for(var o="undefined"!=typeof atob?atob(e):new Buffer(e,"base64").toString("binary"),t=new ArrayBuffer(o.length),n=new Uint8Array(t),r=0,i=o.length;i>r;r++)n[r]=o.charCodeAt(r);return t};var i,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=function(){i=[];for(var e=0;64>e;e++)for(var o=0;64>o;o++)i[64*e+o]=a[e]+a[o];return c=function(){return i},i}}),define("cordova/builder",function(e,o,t){function n(e,o,t){for(var n in e)e.hasOwnProperty(n)&&o.apply(t,[e[n],n])}function r(e,t,n){o.replaceHookForTesting(e,t),e[t]=n,e[t]!==n&&s.defineGetter(e,t,function(){return n})}function i(e,o,t,n){n?s.defineGetter(e,o,function(){return console.log(n),delete e[o],r(e,o,t),t}):r(e,o,t)}function a(o,t,r,l){n(t,function(t,n){try{var d=t.path?e(t.path):{};r?("undefined"==typeof o[n]?i(o,n,d,t.deprecated):"undefined"!=typeof t.path&&(l?c(o[n],d):i(o,n,d,t.deprecated)),d=o[n]):"undefined"==typeof o[n]?i(o,n,d,t.deprecated):d=o[n],t.children&&a(d,t.children,r,l)}catch(u){s.alert("Exception building Cordova JS globals: "+u+' for key "'+n+'"')}})}function c(e,o){for(var t in o)o.hasOwnProperty(t)&&(e.prototype&&e.prototype.constructor===e?r(e.prototype,t,o[t]):"object"==typeof o[t]&&"object"==typeof e[t]?c(e[t],o[t]):r(e,t,o[t]))}var s=e("cordova/utils");o.buildIntoButDoNotClobber=function(e,o){a(o,e,!1,!1)},o.buildIntoAndClobber=function(e,o){a(o,e,!0,!1)},o.buildIntoAndMerge=function(e,o){a(o,e,!0,!0)},o.recursiveMerge=c,o.assignOrWrapInDeprecateGetter=i,o.replaceHookForTesting=function(){}}),define("cordova/channel",function(e,o,t){function n(e){if("function"!=typeof e)throw"Function required as first argument!"}var r=e("cordova/utils"),i=1,a=function(e,o){this.type=e,this.handlers={},this.state=o?1:0,this.fireArgs=null,this.numHandlers=0,this.onHasSubscribersChange=null},c={join:function(e,o){for(var t=o.length,n=t,r=function(){--n||e()},i=0;t>i;i++){if(0===o[i].state)throw Error("Can only use join with sticky channels.");o[i].subscribe(r)}t||e()},create:function(e){return c[e]=new a(e,!1)},createSticky:function(e){return c[e]=new a(e,!0)},deviceReadyChannelsArray:[],deviceReadyChannelsMap:{},waitForInitialization:function(e){if(e){var o=c[e]||this.createSticky(e);this.deviceReadyChannelsMap[e]=o,this.deviceReadyChannelsArray.push(o)}},initializationComplete:function(e){var o=this.deviceReadyChannelsMap[e];o&&o.fire()}};a.prototype.subscribe=function(e,o){if(n(e),2==this.state)return void e.apply(o||this,this.fireArgs);var t=e,a=e.observer_guid;"object"==typeof o&&(t=r.close(o,e)),a||(a=""+i++),t.observer_guid=a,e.observer_guid=a,this.handlers[a]||(this.handlers[a]=t,this.numHandlers++,1==this.numHandlers&&this.onHasSubscribersChange&&this.onHasSubscribersChange())},a.prototype.unsubscribe=function(e){n(e);var o=e.observer_guid,t=this.handlers[o];t&&(delete this.handlers[o],this.numHandlers--,0===this.numHandlers&&this.onHasSubscribersChange&&this.onHasSubscribersChange())},a.prototype.fire=function(e){var o=Array.prototype.slice.call(arguments);if(1==this.state&&(this.state=2,this.fireArgs=o),this.numHandlers){var t=[];for(var n in this.handlers)t.push(this.handlers[n]);for(var r=0;r<t.length;++r)t[r].apply(this,o);2==this.state&&this.numHandlers&&(this.numHandlers=0,this.handlers={},this.onHasSubscribersChange&&this.onHasSubscribersChange())}},c.createSticky("onDOMContentLoaded"),c.createSticky("onNativeReady"),c.createSticky("onCordovaReady"),c.createSticky("onPluginsReady"),c.createSticky("onDeviceReady"),c.create("onResume"),c.create("onPause"),c.createSticky("onDestroy"),c.waitForInitialization("onCordovaReady"),c.waitForInitialization("onDOMContentLoaded"),t.exports=c}),define("cordova/exec",function(require,exports,module){function androidExec(e,o,t,n,r){if(0>bridgeSecret)throw new Error("exec() called without bridgeSecret");void 0===jsToNativeBridgeMode&&androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT);for(var i=0;i<r.length;i++)"ArrayBuffer"==utils.typeName(r[i])&&(r[i]=base64.fromArrayBuffer(r[i]));var a=t+cordova.callbackId++,c=JSON.stringify(r);(e||o)&&(cordova.callbacks[a]={success:e,fail:o});var s=nativeApiProvider.get().exec(bridgeSecret,t,n,a,c);return jsToNativeBridgeMode==jsToNativeModes.JS_OBJECT&&"@Null arguments."===s?(androidExec.setJsToNativeBridgeMode(jsToNativeModes.PROMPT),androidExec(e,o,t,n,r),void androidExec.setJsToNativeBridgeMode(jsToNativeModes.JS_OBJECT)):void androidExec.processMessages(s,!0)}function pollOnceFromOnlineEvent(){pollOnce(!0)}function pollOnce(e){if(!(0>bridgeSecret)){var o=nativeApiProvider.get().retrieveJsMessages(bridgeSecret,!!e);androidExec.processMessages(o)}}function pollingTimerFunc(){pollEnabled&&(pollOnce(),setTimeout(pollingTimerFunc,50))}function hookOnlineApis(){function e(e){cordova.fireWindowEvent(e.type)}window.addEventListener("online",pollOnceFromOnlineEvent,!1),window.addEventListener("offline",pollOnceFromOnlineEvent,!1),cordova.addWindowEventHandler("online"),cordova.addWindowEventHandler("offline"),document.addEventListener("online",e,!1),document.addEventListener("offline",e,!1)}function processMessage(message){try{var firstChar=message.charAt(0);if("J"==firstChar)eval(message.slice(1));else if("S"==firstChar||"F"==firstChar){var success="S"==firstChar,keepCallback="1"==message.charAt(1),spaceIdx=message.indexOf(" ",2),status=+message.slice(2,spaceIdx),nextSpaceIdx=message.indexOf(" ",spaceIdx+1),callbackId=message.slice(spaceIdx+1,nextSpaceIdx),payloadKind=message.charAt(nextSpaceIdx+1),payload;if("s"==payloadKind)payload=message.slice(nextSpaceIdx+2);else if("t"==payloadKind)payload=!0;else if("f"==payloadKind)payload=!1;else if("N"==payloadKind)payload=null;else if("n"==payloadKind)payload=+message.slice(nextSpaceIdx+2);else if("A"==payloadKind){for(var data=message.slice(nextSpaceIdx+2),bytes=window.atob(data),arraybuffer=new Uint8Array(bytes.length),i=0;i<bytes.length;i++)arraybuffer[i]=bytes.charCodeAt(i);payload=arraybuffer.buffer}else payload="S"==payloadKind?window.atob(message.slice(nextSpaceIdx+2)):JSON.parse(message.slice(nextSpaceIdx+1));cordova.callbackFromNative(callbackId,success,status,[payload],keepCallback)}else console.log("processMessage failed: invalid message: "+JSON.stringify(message))}catch(e){console.log("processMessage failed: Error: "+e),console.log("processMessage failed: Stack: "+e.stack),console.log("processMessage failed: Message: "+message)}}function popMessageFromQueue(){var e=messagesFromNative.shift();if("*"==e)return"*";var o=e.indexOf(" "),t=+e.slice(0,o),n=e.substr(o+1,t);return e=e.slice(o+t+1),e&&messagesFromNative.unshift(e),n}var cordova=require("cordova"),nativeApiProvider=require("cordova/android/nativeapiprovider"),utils=require("cordova/utils"),base64=require("cordova/base64"),channel=require("cordova/channel"),jsToNativeModes={PROMPT:0,JS_OBJECT:1},nativeToJsModes={POLLING:0,LOAD_URL:1,ONLINE_EVENT:2,PRIVATE_API:3},jsToNativeBridgeMode,nativeToJsBridgeMode=nativeToJsModes.ONLINE_EVENT,pollEnabled=!1,messagesFromNative=[],bridgeSecret=-1;androidExec.init=function(){bridgeSecret=+prompt("","gap_init:"+nativeToJsBridgeMode),channel.onNativeReady.fire()},hookOnlineApis(),androidExec.jsToNativeModes=jsToNativeModes,androidExec.nativeToJsModes=nativeToJsModes,androidExec.setJsToNativeBridgeMode=function(e){e!=jsToNativeModes.JS_OBJECT||window._cordovaNative||(e=jsToNativeModes.PROMPT),nativeApiProvider.setPreferPrompt(e==jsToNativeModes.PROMPT),jsToNativeBridgeMode=e},androidExec.setNativeToJsBridgeMode=function(e){e!=nativeToJsBridgeMode&&(nativeToJsBridgeMode==nativeToJsModes.POLLING&&(pollEnabled=!1),nativeToJsBridgeMode=e,bridgeSecret>=0&&nativeApiProvider.get().setNativeToJsBridgeMode(bridgeSecret,e),e==nativeToJsModes.POLLING&&(pollEnabled=!0,setTimeout(pollingTimerFunc,1)))};var isProcessing=!1;androidExec.processMessages=function(e,o){if(e&&messagesFromNative.push(e),!isProcessing){if(o)return void window.setTimeout(androidExec.processMessages,0);isProcessing=!0;try{for(;messagesFromNative.length;){var t=popMessageFromQueue();if("*"==t&&0===messagesFromNative.length)return void setTimeout(pollOnce,0);processMessage(t)}}finally{isProcessing=!1}}},module.exports=androidExec}),define("cordova/exec/proxy",function(e,o,t){var n={};t.exports={add:function(e,o){return console.log("adding proxy for "+e),n[e]=o,o},remove:function(e){var o=n[e];return delete n[e],n[e]=null,o},get:function(e,o){return n[e]?n[e][o]:null}}}),define("cordova/init",function(e,o,t){function n(e){for(var o=0;o<e.length;++o)2!=e[o].state&&console.log("Channel not fired: "+e[o].type)}function r(e){var o=function(){};o.prototype=e;var t=new o;if(o.bind)for(var n in e)"function"==typeof e[n]&&(t[n]=e[n].bind(e));return t}var i=e("cordova/channel"),a=e("cordova"),c=e("cordova/modulemapper"),s=e("cordova/platform"),l=e("cordova/pluginloader"),d=[i.onNativeReady,i.onPluginsReady];window.setTimeout(function(){2!=i.onDeviceReady.state&&(console.log("deviceready has not fired after 5 seconds."),n(d),n(i.deviceReadyChannelsArray))},5e3),window.navigator&&(window.navigator=r(window.navigator)),window.console||(window.console={log:function(){}}),window.console.warn||(window.console.warn=function(e){this.log("warn: "+e)}),i.onPause=a.addDocumentEventHandler("pause"),i.onResume=a.addDocumentEventHandler("resume"),i.onDeviceReady=a.addStickyDocumentEventHandler("deviceready"),"complete"==document.readyState||"interactive"==document.readyState?i.onDOMContentLoaded.fire():document.addEventListener("DOMContentLoaded",function(){i.onDOMContentLoaded.fire()},!1),window._nativeReady&&i.onNativeReady.fire(),c.clobbers("cordova","cordova"),c.clobbers("cordova/exec","cordova.exec"),c.clobbers("cordova/exec","Cordova.exec"),s.bootstrap&&s.bootstrap(),setTimeout(function(){l.load(function(){i.onPluginsReady.fire()})},0),i.join(function(){c.mapModules(window),s.initialize&&s.initialize(),i.onCordovaReady.fire(),i.join(function(){e("cordova").fireDocumentEvent("deviceready")},i.deviceReadyChannelsArray)},d)}),define("cordova/init_b",function(e,o,t){function n(e){for(var o=0;o<e.length;++o)2!=e[o].state&&console.log("Channel not fired: "+e[o].type)}function r(e){var o=function(){};o.prototype=e;var t=new o;if(o.bind)for(var n in e)"function"==typeof e[n]&&(t[n]=e[n].bind(e));return t}var i=e("cordova/channel"),a=e("cordova"),c=e("cordova/platform"),s=[i.onDOMContentLoaded,i.onNativeReady];a.exec=e("cordova/exec"),window.setTimeout(function(){2!=i.onDeviceReady.state&&(console.log("deviceready has not fired after 5 seconds."),n(s),n(i.deviceReadyChannelsArray))},5e3),window.navigator&&(window.navigator=r(window.navigator)),window.console||(window.console={log:function(){}}),window.console.warn||(window.console.warn=function(e){this.log("warn: "+e)}),i.onPause=a.addDocumentEventHandler("pause"),i.onResume=a.addDocumentEventHandler("resume"),i.onDeviceReady=a.addStickyDocumentEventHandler("deviceready"),"complete"==document.readyState||"interactive"==document.readyState?i.onDOMContentLoaded.fire():document.addEventListener("DOMContentLoaded",function(){i.onDOMContentLoaded.fire()},!1),window._nativeReady&&i.onNativeReady.fire(),c.bootstrap&&c.bootstrap(),i.join(function(){c.initialize&&c.initialize(),i.onCordovaReady.fire(),i.join(function(){e("cordova").fireDocumentEvent("deviceready")},i.deviceReadyChannelsArray)},s)}),define("cordova/modulemapper",function(e,o,t){function n(e,o,t,n){if(!(o in s))throw new Error("Module "+o+" does not exist.");i.push(e,o,t),n&&(a[t]=n)}function r(e,o){if(!e)return o;for(var t,n=e.split("."),r=o,i=0;t=n[i];++i)r=r[t]=r[t]||{};return r}var i,a,c=e("cordova/builder"),s=define.moduleMap;o.reset=function(){i=[],a={}},o.clobbers=function(e,o,t){n("c",e,o,t)},o.merges=function(e,o,t){n("m",e,o,t)},o.defaults=function(e,o,t){n("d",e,o,t)},o.runs=function(e){n("r",e,null)},o.mapModules=function(o){var t={};o.CDV_origSymbols=t;for(var n=0,s=i.length;s>n;n+=3){var l=i[n],d=i[n+1],u=e(d);if("r"!=l){var f=i[n+2],p=f.lastIndexOf("."),v=f.substr(0,p),h=f.substr(p+1),g=f in a?"Access made to deprecated symbol: "+f+". "+g:null,y=r(v,o),m=y[h];"m"==l&&m?c.recursiveMerge(m,u):("d"==l&&!m||"d"!=l)&&(f in t||(t[f]=m),c.assignOrWrapInDeprecateGetter(y,h,u,g))}}},o.getOriginalSymbol=function(e,o){var t=e.CDV_origSymbols;if(t&&o in t)return t[o];for(var n=o.split("."),r=e,i=0;i<n.length;++i)r=r&&r[n[i]];return r},o.reset()}),define("cordova/platform",function(e,o,t){t.exports={id:"android",bootstrap:function(){function o(e){var o=n.addDocumentEventHandler(e+"button");o.onHasSubscribersChange=function(){r(null,null,"App","overrideButton",[e,1==this.numHandlers])}}var t=e("cordova/channel"),n=e("cordova"),r=e("cordova/exec"),i=e("cordova/modulemapper");r.init(),i.clobbers("cordova/plugin/android/app","navigator.app");var a=n.addDocumentEventHandler("backbutton");a.onHasSubscribersChange=function(){r(null,null,"App","overrideBackbutton",[1==this.numHandlers])},n.addDocumentEventHandler("menubutton"),n.addDocumentEventHandler("searchbutton"),o("volumeup"),o("volumedown"),t.onCordovaReady.subscribe(function(){r(null,null,"App","show",[])})}}}),define("cordova/plugin/android/app",function(e,o,t){var n=e("cordova/exec");t.exports={clearCache:function(){n(null,null,"App","clearCache",[])},loadUrl:function(e,o){n(null,null,"App","loadUrl",[e,o])},cancelLoadUrl:function(){n(null,null,"App","cancelLoadUrl",[])},clearHistory:function(){n(null,null,"App","clearHistory",[])},backHistory:function(){n(null,null,"App","backHistory",[])},overrideBackbutton:function(e){n(null,null,"App","overrideBackbutton",[e])},overrideButton:function(e,o){n(null,null,"App","overrideButton",[e,o])},exitApp:function(){return n(null,null,"App","exitApp",[])}}}),define("cordova/pluginloader",function(e,o,t){function n(e,t,n,r){r=r||n,e in define.moduleMap?n():o.injectScript(t,function(){e in define.moduleMap?n():r()},r)}function r(e,o){for(var t,n=0;t=e[n];n++){if(t.clobbers&&t.clobbers.length)for(var r=0;r<t.clobbers.length;r++)c.clobbers(t.id,t.clobbers[r]);if(t.merges&&t.merges.length)for(var i=0;i<t.merges.length;i++)c.merges(t.id,t.merges[i]);t.runs&&c.runs(t.id)}o()}function i(e,o,t){function i(){--a||r(o,t)}var a=o.length;if(!a)return void t();for(var c=0;c<o.length;c++)n(o[c].id,e+o[c].file,i)}function a(){for(var e=null,o=document.getElementsByTagName("script"),t="/cordova.js",n=o.length-1;n>-1;n--){var r=o[n].src.replace(/\?.*$/,"");if(r.indexOf(t)==r.length-t.length){e=r.substring(0,r.length-t.length)+"/";break}}return e}{var c=e("cordova/modulemapper");e("cordova/urlutil")}o.injectScript=function(e,o,t){var n=document.createElement("script");n.onload=o,n.onerror=t,n.src=e,document.head.appendChild(n)},o.load=function(o){var t=a();null===t&&(console.log("Could not find cordova.js script tag. Plugin loading may fail."),t=""),n("cordova/plugin_list",t+"cordova_plugins.js",function(){var n=e("cordova/plugin_list");i(t,n,o)},o)}}),define("cordova/urlutil",function(e,o,t){o.makeAbsolute=function(e){var o=document.createElement("a");return o.href=e,o.href}}),define("cordova/utils",function(e,o,t){function n(e){for(var o="",t=0;e>t;t++){var n=parseInt(256*Math.random(),10).toString(16);1==n.length&&(n="0"+n),o+=n}return o}var r=o;r.defineGetterSetter=function(e,o,t,n){if(Object.defineProperty){var r={get:t,configurable:!0};n&&(r.set=n),Object.defineProperty(e,o,r)}else e.__defineGetter__(o,t),n&&e.__defineSetter__(o,n)},r.defineGetter=r.defineGetterSetter,r.arrayIndexOf=function(e,o){if(e.indexOf)return e.indexOf(o);for(var t=e.length,n=0;t>n;++n)if(e[n]==o)return n;return-1},r.arrayRemove=function(e,o){var t=r.arrayIndexOf(e,o);return-1!=t&&e.splice(t,1),-1!=t},r.typeName=function(e){return Object.prototype.toString.call(e).slice(8,-1)},r.isArray=function(e){return"Array"==r.typeName(e)},r.isDate=function(e){return"Date"==r.typeName(e)},r.clone=function(e){if(!e||"function"==typeof e||r.isDate(e)||"object"!=typeof e)return e;var o,t;if(r.isArray(e)){for(o=[],t=0;t<e.length;++t)o.push(r.clone(e[t]));return o}o={};for(t in e)t in o&&o[t]==e[t]||(o[t]=r.clone(e[t]));return o},r.close=function(e,o,t){return"undefined"==typeof t?function(){return o.apply(e,arguments)}:function(){return o.apply(e,t)}},r.createUUID=function(){return n(4)+"-"+n(2)+"-"+n(2)+"-"+n(2)+"-"+n(6)},r.extend=function(){var e=function(){};return function(o,t){e.prototype=t.prototype,o.prototype=new e,o.__super__=t.prototype,o.prototype.constructor=o}}(),r.alert=function(e){window.alert?window.alert(e):console&&console.log&&console.log(e)}}),window.cordova=require("cordova"),require("cordova/init")}(),cordova.define("cordova/plugin_list",function(e,o,t){t.exports=[{file:"plugins/org.apache.cordova.device/www/device.js",id:"org.apache.cordova.device.device",clobbers:["device"]},{file:"plugins/org.apache.cordova.device-orientation/www/CompassError.js",id:"org.apache.cordova.device-orientation.CompassError",clobbers:["CompassError"]},{file:"plugins/org.apache.cordova.device-orientation/www/CompassHeading.js",id:"org.apache.cordova.device-orientation.CompassHeading",clobbers:["CompassHeading"]},{file:"plugins/org.apache.cordova.device-orientation/www/compass.js",id:"org.apache.cordova.device-orientation.compass",clobbers:["navigator.compass"]},{file:"plugins/org.apache.cordova.dialogs/www/notification.js",id:"org.apache.cordova.dialogs.notification",merges:["navigator.notification"]},{file:"plugins/org.apache.cordova.dialogs/www/android/notification.js",id:"org.apache.cordova.dialogs.notification_android",merges:["navigator.notification"]},{file:"plugins/org.apache.cordova.globalization/www/GlobalizationError.js",id:"org.apache.cordova.globalization.GlobalizationError",clobbers:["window.GlobalizationError"]},{file:"plugins/org.apache.cordova.globalization/www/globalization.js",id:"org.apache.cordova.globalization.globalization",clobbers:["navigator.globalization"]},{file:"plugins/org.apache.cordova.inappbrowser/www/inappbrowser.js",id:"org.apache.cordova.inappbrowser.inappbrowser",clobbers:["window.open"]},{file:"plugins/org.apache.cordova.splashscreen/www/splashscreen.js",id:"org.apache.cordova.splashscreen.SplashScreen",clobbers:["navigator.splashscreen"]},{file:"plugins/org.apache.cordova.vibration/www/vibration.js",id:"org.apache.cordova.vibration.notification",merges:["navigator.notification"]},{file:"plugins/org.apache.cordova.contacts/www/contacts.js",id:"org.apache.cordova.contacts.contacts",clobbers:["navigator.contacts"]},{file:"plugins/org.apache.cordova.contacts/www/Contact.js",id:"org.apache.cordova.contacts.Contact",clobbers:["Contact"]},{file:"plugins/org.apache.cordova.contacts/www/ContactAddress.js",id:"org.apache.cordova.contacts.ContactAddress",clobbers:["ContactAddress"]},{file:"plugins/org.apache.cordova.contacts/www/ContactError.js",id:"org.apache.cordova.contacts.ContactError",clobbers:["ContactError"]},{file:"plugins/org.apache.cordova.contacts/www/ContactField.js",id:"org.apache.cordova.contacts.ContactField",clobbers:["ContactField"]},{file:"plugins/org.apache.cordova.contacts/www/ContactFindOptions.js",id:"org.apache.cordova.contacts.ContactFindOptions",clobbers:["ContactFindOptions"]},{file:"plugins/org.apache.cordova.contacts/www/ContactName.js",id:"org.apache.cordova.contacts.ContactName",clobbers:["ContactName"]},{file:"plugins/org.apache.cordova.contacts/www/ContactOrganization.js",id:"org.apache.cordova.contacts.ContactOrganization",clobbers:["ContactOrganization"]},{file:"plugins/org.apache.cordova.contacts/www/ContactFieldType.js",id:"org.apache.cordova.contacts.ContactFieldType"},{file:"plugins/org.apache.cordova.device-motion/www/Acceleration.js",id:"org.apache.cordova.device-motion.Acceleration",clobbers:["Acceleration"]},{file:"plugins/org.apache.cordova.device-motion/www/accelerometer.js",id:"org.apache.cordova.device-motion.accelerometer",clobbers:["navigator.accelerometer"]},{file:"plugins/org.apache.cordova.battery-status/www/battery.js",id:"org.apache.cordova.battery-status.battery",clobbers:["navigator.battery"]},{file:"plugins/de.appplant.cordova.plugin.local-notification/www/local-notification.js",id:"de.appplant.cordova.plugin.local-notification.LocalNotification",clobbers:["plugin.notification.local"]},{file:"plugins/org.apache.cordova.file/www/DirectoryEntry.js",id:"org.apache.cordova.file.DirectoryEntry",clobbers:["window.DirectoryEntry"]},{file:"plugins/org.apache.cordova.file/www/DirectoryReader.js",id:"org.apache.cordova.file.DirectoryReader",clobbers:["window.DirectoryReader"]},{file:"plugins/org.apache.cordova.file/www/Entry.js",id:"org.apache.cordova.file.Entry",clobbers:["window.Entry"]},{file:"plugins/org.apache.cordova.file/www/File.js",id:"org.apache.cordova.file.File",clobbers:["window.File"]},{file:"plugins/org.apache.cordova.file/www/FileEntry.js",id:"org.apache.cordova.file.FileEntry",clobbers:["window.FileEntry"]},{file:"plugins/org.apache.cordova.file/www/FileError.js",id:"org.apache.cordova.file.FileError",clobbers:["window.FileError"]},{file:"plugins/org.apache.cordova.file/www/FileReader.js",id:"org.apache.cordova.file.FileReader",clobbers:["window.FileReader"]},{file:"plugins/org.apache.cordova.file/www/FileSystem.js",id:"org.apache.cordova.file.FileSystem",clobbers:["window.FileSystem"]},{file:"plugins/org.apache.cordova.file/www/FileUploadOptions.js",id:"org.apache.cordova.file.FileUploadOptions",clobbers:["window.FileUploadOptions"]},{file:"plugins/org.apache.cordova.file/www/FileUploadResult.js",id:"org.apache.cordova.file.FileUploadResult",clobbers:["window.FileUploadResult"]},{file:"plugins/org.apache.cordova.file/www/FileWriter.js",id:"org.apache.cordova.file.FileWriter",clobbers:["window.FileWriter"]},{file:"plugins/org.apache.cordova.file/www/Flags.js",id:"org.apache.cordova.file.Flags",clobbers:["window.Flags"]},{file:"plugins/org.apache.cordova.file/www/LocalFileSystem.js",id:"org.apache.cordova.file.LocalFileSystem",clobbers:["window.LocalFileSystem"],merges:["window"]},{file:"plugins/org.apache.cordova.file/www/Metadata.js",id:"org.apache.cordova.file.Metadata",clobbers:["window.Metadata"]},{file:"plugins/org.apache.cordova.file/www/ProgressEvent.js",id:"org.apache.cordova.file.ProgressEvent",clobbers:["window.ProgressEvent"]},{file:"plugins/org.apache.cordova.file/www/fileSystems.js",id:"org.apache.cordova.file.fileSystems"},{file:"plugins/org.apache.cordova.file/www/requestFileSystem.js",id:"org.apache.cordova.file.requestFileSystem",clobbers:["window.requestFileSystem"]},{file:"plugins/org.apache.cordova.file/www/resolveLocalFileSystemURI.js",id:"org.apache.cordova.file.resolveLocalFileSystemURI",merges:["window"]},{file:"plugins/org.apache.cordova.file/www/android/FileSystem.js",id:"org.apache.cordova.file.androidFileSystem",merges:["FileSystem"]},{file:"plugins/org.apache.cordova.file/www/fileSystems-roots.js",id:"org.apache.cordova.file.fileSystems-roots",runs:!0},{file:"plugins/org.apache.cordova.file/www/fileSystemPaths.js",id:"org.apache.cordova.file.fileSystemPaths",merges:["cordova"],runs:!0},{file:"plugins/org.apache.cordova.file-transfer/www/FileTransferError.js",id:"org.apache.cordova.file-transfer.FileTransferError",clobbers:["window.FileTransferError"]},{file:"plugins/org.apache.cordova.file-transfer/www/FileTransfer.js",id:"org.apache.cordova.file-transfer.FileTransfer",clobbers:["window.FileTransfer"]},{file:"plugins/org.apache.cordova.media/www/MediaError.js",id:"org.apache.cordova.media.MediaError",clobbers:["window.MediaError"]},{file:"plugins/org.apache.cordova.media/www/Media.js",id:"org.apache.cordova.media.Media",clobbers:["window.Media"]},{file:"plugins/org.apache.cordova.media-capture/www/CaptureAudioOptions.js",id:"org.apache.cordova.media-capture.CaptureAudioOptions",clobbers:["CaptureAudioOptions"]},{file:"plugins/org.apache.cordova.media-capture/www/CaptureImageOptions.js",id:"org.apache.cordova.media-capture.CaptureImageOptions",clobbers:["CaptureImageOptions"]},{file:"plugins/org.apache.cordova.media-capture/www/CaptureVideoOptions.js",id:"org.apache.cordova.media-capture.CaptureVideoOptions",clobbers:["CaptureVideoOptions"]},{file:"plugins/org.apache.cordova.media-capture/www/CaptureError.js",id:"org.apache.cordova.media-capture.CaptureError",clobbers:["CaptureError"]},{file:"plugins/org.apache.cordova.media-capture/www/MediaFileData.js",id:"org.apache.cordova.media-capture.MediaFileData",clobbers:["MediaFileData"]},{file:"plugins/org.apache.cordova.media-capture/www/MediaFile.js",id:"org.apache.cordova.media-capture.MediaFile",clobbers:["MediaFile"]},{file:"plugins/org.apache.cordova.media-capture/www/capture.js",id:"org.apache.cordova.media-capture.capture",clobbers:["navigator.device.capture"]},{file:"plugins/org.apache.cordova.statusbar/www/statusbar.js",id:"org.apache.cordova.statusbar.statusbar",clobbers:["window.StatusBar"]},{file:"plugins/org.chromium.zip/zip.js",id:"org.chromium.zip.Zip",clobbers:["zip"]},{file:"plugins/org.chromium.zip/tests/tests.js",id:"org.chromium.zip.tests"}]}),cordova.define("org.chromium.zip.Zip",function(e,o,t){function n(e){var o={loaded:e.loaded,total:e.total};return o}var r=cordova.require("cordova/exec");o.unzip=function(e,o,t,i){var a=function(e){if(e&&"undefined"!=typeof e.loaded){if(i)return i(n(e))}else t&&t(0)},c=function(e){t&&t(-1)};r(a,c,"Zip","unzip",[e,o])}}),cordova.define("org.apache.cordova.battery-status.battery",function(e,o,t){function n(){return l.channels.batterystatus.numHandlers+l.channels.batterylow.numHandlers+l.channels.batterycritical.numHandlers}var r=e("cordova"),i=e("cordova/exec"),a=5,c=20,s=function(){this._level=null,this._isPlugged=null,this.channels={batterystatus:r.addWindowEventHandler("batterystatus"),batterylow:r.addWindowEventHandler("batterylow"),batterycritical:r.addWindowEventHandler("batterycritical")};for(var e in this.channels)this.channels[e].onHasSubscribersChange=s.onHasSubscribersChange};s.onHasSubscribersChange=function(){1===this.numHandlers&&1===n()?i(l._status,l._error,"Battery","start",[]):0===n()&&i(null,null,"Battery","stop",[])},s.prototype._status=function(e){if(e&&(l._level!==e.level||l._isPlugged!==e.isPlugged)){if(null==e.level&&null!=l._level)return;r.fireWindowEvent("batterystatus",e),e.isPlugged||(l._level>a&&e.level<=a?r.fireWindowEvent("batterycritical",e):l._level>c&&e.level<=c&&r.fireWindowEvent("batterylow",e)),l._level=e.level,l._isPlugged=e.isPlugged}},s.prototype._error=function(e){console.log("Error initializing Battery: "+e)};var l=new s;t.exports=l}),cordova.define("de.appplant.cordova.plugin.local-notification.LocalNotification",function(require,exports,module){var LocalNotification=function(){this._defaults={message:"",title:"",autoCancel:!1,badge:0,id:"0",json:"",repeat:""}};LocalNotification.prototype={getDefaults:function(){return this._defaults},setDefaults:function(e){var o=this.getDefaults();for(var t in o)void 0!==e[t]&&(o[t]=e[t])},mergeWithDefaults:function(e){var o=this.getDefaults();for(var t in o)void 0===e[t]&&(e[t]=o[t]);return e},applyPlatformSpecificOptions:function(){
var e=this._defaults;switch(device.platform){case"Android":e.icon="icon",e.smallIcon=null,e.ongoing=!1,e.sound="TYPE_NOTIFICATION";break;case"iOS":e.sound="";break;case"WinCE":case"Win32NT":e.smallImage=null,e.image=null,e.wideImage=null}},add:function(options){var options=this.mergeWithDefaults(options),callbackFn=null;return options.id&&(options.id=options.id.toString()),void 0===options.date&&(options.date=new Date),"object"==typeof options.date&&(options.date=Math.round(options.date.getTime()/1e3)),["WinCE","Win32NT"].indexOf(device.platform)&&(callbackFn=function(cmd){eval(cmd)}),cordova.exec(callbackFn,null,"LocalNotification","add",[options]),options.id},cancel:function(e){cordova.exec(null,null,"LocalNotification","cancel",[e.toString()])},cancelAll:function(){cordova.exec(null,null,"LocalNotification","cancelAll",[])},getScheduledIds:function(e){cordova.exec(e,null,"LocalNotification","getScheduledIds",[])},isScheduled:function(e,o){cordova.exec(o,null,"LocalNotification","isScheduled",[e.toString()])},hasPermission:function(e,o){var t=function(t){e.call(o||this,t)};cordova.exec(t,null,"LocalNotification","hasPermission",[])},promptForPermission:function(){cordova.exec(null,null,"LocalNotification","promptForPermission",[])},onadd:function(e,o,t){},ontrigger:function(e,o,t){},onclick:function(e,o,t){},oncancel:function(e,o,t){}};var plugin=new LocalNotification,channel=require("cordova/channel");channel.deviceready.subscribe(function(){cordova.exec(null,null,"LocalNotification","deviceready",[])}),channel.onCordovaReady.subscribe(function(){channel.onCordovaInfoReady.subscribe(function(){"Android"==device.platform&&(channel.onPause.subscribe(function(){cordova.exec(null,null,"LocalNotification","pause",[])}),channel.onResume.subscribe(function(){cordova.exec(null,null,"LocalNotification","resume",[])}),cordova.exec(null,null,"LocalNotification","resume",[])),plugin.applyPlatformSpecificOptions()})}),module.exports=plugin}),cordova.define("org.apache.cordova.contacts.Contact",function(e,o,t){function n(e){var o=e.birthday;try{e.birthday=new Date(parseFloat(o))}catch(t){console.log("Cordova Contact convertIn error: exception creating date.")}return e}function r(e){var o=e.birthday;if(null!==o){if(!s.isDate(o))try{o=new Date(o)}catch(t){o=null}s.isDate(o)&&(o=o.valueOf()),e.birthday=o}return e}var i=e("cordova/argscheck"),a=e("cordova/exec"),c=e("./ContactError"),s=e("cordova/utils"),l=function(e,o,t,n,r,i,a,c,s,l,d,u,f,p){this.id=e||null,this.rawId=null,this.displayName=o||null,this.name=t||null,this.nickname=n||null,this.phoneNumbers=r||null,this.emails=i||null,this.addresses=a||null,this.ims=c||null,this.organizations=s||null,this.birthday=l||null,this.note=d||null,this.photos=u||null,this.categories=f||null,this.urls=p||null};l.prototype.remove=function(e,o){i.checkArgs("FF","Contact.remove",arguments);var t=o&&function(e){o(new c(e))};null===this.id?t(c.UNKNOWN_ERROR):a(e,t,"Contacts","remove",[this.id])},l.prototype.clone=function(){function e(e){if(e)for(var o=0;o<e.length;++o)e[o].id=null}var o=s.clone(this);return o.id=null,o.rawId=null,e(o.phoneNumbers),e(o.emails),e(o.addresses),e(o.ims),e(o.organizations),e(o.categories),e(o.photos),e(o.urls),o},l.prototype.save=function(o,t){i.checkArgs("FFO","Contact.save",arguments);var l=t&&function(e){t(new c(e))},d=function(t){if(t){if(o){var r=e("./contacts").create(t);o(n(r))}}else l(c.UNKNOWN_ERROR)},u=r(s.clone(this));a(d,l,"Contacts","save",[u])},t.exports=l}),cordova.define("org.apache.cordova.contacts.ContactAddress",function(e,o,t){var n=function(e,o,t,n,r,i,a,c){this.id=null,this.pref="undefined"!=typeof e?e:!1,this.type=o||null,this.formatted=t||null,this.streetAddress=n||null,this.locality=r||null,this.region=i||null,this.postalCode=a||null,this.country=c||null};t.exports=n}),cordova.define("org.apache.cordova.contacts.ContactError",function(e,o,t){var n=function(e){this.code="undefined"!=typeof e?e:null};n.UNKNOWN_ERROR=0,n.INVALID_ARGUMENT_ERROR=1,n.TIMEOUT_ERROR=2,n.PENDING_OPERATION_ERROR=3,n.IO_ERROR=4,n.NOT_SUPPORTED_ERROR=5,n.PERMISSION_DENIED_ERROR=20,t.exports=n}),cordova.define("org.apache.cordova.contacts.ContactField",function(e,o,t){var n=function(e,o,t){this.id=null,this.type=e&&e.toString()||null,this.value=o&&o.toString()||null,this.pref="undefined"!=typeof t?t:!1};t.exports=n}),cordova.define("org.apache.cordova.contacts.ContactFieldType",function(e,o,t){var n={addresses:"addresses",birthday:"birthday",categories:"categories",country:"country",department:"department",displayName:"displayName",emails:"emails",familyName:"familyName",formatted:"formatted",givenName:"givenName",honorificPrefix:"honorificPrefix",honorificSuffix:"honorificSuffix",id:"id",ims:"ims",locality:"locality",middleName:"middleName",name:"name",nickname:"nickname",note:"note",organizations:"organizations",phoneNumbers:"phoneNumbers",photos:"photos",postalCode:"postalCode",region:"region",streetAddress:"streetAddress",title:"title",urls:"urls"};t.exports=n}),cordova.define("org.apache.cordova.contacts.ContactFindOptions",function(e,o,t){var n=function(e,o,t){this.filter=e||"",this.multiple="undefined"!=typeof o?o:!1,this.desiredFields="undefined"!=typeof t?t:[]};t.exports=n}),cordova.define("org.apache.cordova.contacts.ContactName",function(e,o,t){var n=function(e,o,t,n,r,i){this.formatted=e||null,this.familyName=o||null,this.givenName=t||null,this.middleName=n||null,this.honorificPrefix=r||null,this.honorificSuffix=i||null};t.exports=n}),cordova.define("org.apache.cordova.contacts.ContactOrganization",function(e,o,t){var n=function(e,o,t,n,r){this.id=null,this.pref="undefined"!=typeof e?e:!1,this.type=o||null,this.name=t||null,this.department=n||null,this.title=r||null};t.exports=n}),cordova.define("org.apache.cordova.contacts.contacts",function(e,o,t){var n=e("cordova/argscheck"),r=e("cordova/exec"),i=e("./ContactError"),a=(e("cordova/utils"),e("./Contact")),c=e("./ContactFieldType"),s={fieldType:c,find:function(e,o,t,a){if(n.checkArgs("afFO","contacts.find",arguments),e.length){a=a||{filter:"",multiple:!0};var c=function(e){for(var t=[],n=0,r=e.length;r>n;n++)t.push(s.create(e[n]));o(t)};r(c,t,"Contacts","search",[e,a])}else t&&t(new i(i.INVALID_ARGUMENT_ERROR))},pickContact:function(e,o){n.checkArgs("fF","contacts.pick",arguments);var t=function(o){var t=o instanceof a?o:s.create(o);e(t)};r(t,o,"Contacts","pickContact",[])},create:function(e){n.checkArgs("O","contacts.create",arguments);var o=new a;for(var t in e)"undefined"!=typeof o[t]&&e.hasOwnProperty(t)&&(o[t]=e[t]);return o}};t.exports=s}),cordova.define("org.apache.cordova.device.device",function(e,o,t){function n(){this.available=!1,this.platform=null,this.version=null,this.uuid=null,this.cordova=null,this.model=null;var e=this;i.onCordovaReady.subscribe(function(){e.getInfo(function(o){var t=s.version;e.available=!0,e.platform=o.platform,e.version=o.version,e.uuid=o.uuid,e.cordova=t,e.model=o.model,i.onCordovaInfoReady.fire()},function(o){e.available=!1,a.alert("[ERROR] Error initializing Cordova: "+o)})})}var r=e("cordova/argscheck"),i=e("cordova/channel"),a=e("cordova/utils"),c=e("cordova/exec"),s=e("cordova");i.createSticky("onCordovaInfoReady"),i.waitForInitialization("onCordovaInfoReady"),n.prototype.getInfo=function(e,o){r.checkArgs("fF","Device.getInfo",arguments),c(e,o,"Device","getDeviceInfo",[])},t.exports=new n}),cordova.define("org.apache.cordova.camera.camera",function(e,o,t){var n=e("cordova/argscheck"),r=e("cordova/exec"),i=e("./Camera"),a={};for(var c in i)a[c]=i[c];a.getPicture=function(e,o,t){n.checkArgs("fFO","Camera.getPicture",arguments),t=t||{};var a=n.getValue,c=a(t.quality,50),s=a(t.destinationType,i.DestinationType.FILE_URI),l=a(t.sourceType,i.PictureSourceType.CAMERA),d=a(t.targetWidth,-1),u=a(t.targetHeight,-1),f=a(t.encodingType,i.EncodingType.JPEG),p=a(t.mediaType,i.MediaType.PICTURE),v=!!t.allowEdit,h=!!t.correctOrientation,g=!!t.saveToPhotoAlbum,y=a(t.popoverOptions,null),m=a(t.cameraDirection,i.Direction.BACK),w=[c,s,l,d,u,f,p,v,h,g,y,m];r(e,o,"Camera","takePicture",w)},a.cleanup=function(e,o){r(e,o,"Camera","cleanup",[])},t.exports=a}),cordova.define("org.apache.cordova.camera.Camera",function(e,o,t){t.exports={DestinationType:{DATA_URL:0,FILE_URI:1,NATIVE_URI:2},EncodingType:{JPEG:0,PNG:1},MediaType:{PICTURE:0,VIDEO:1,ALLMEDIA:2},PictureSourceType:{PHOTOLIBRARY:0,CAMERA:1,SAVEDPHOTOALBUM:2},PopoverArrowDirection:{ARROW_UP:1,ARROW_DOWN:2,ARROW_LEFT:4,ARROW_RIGHT:8,ARROW_ANY:15},Direction:{BACK:0,FRONT:1}}}),cordova.define("org.apache.cordova.camera.CameraPopoverHandle",function(e,o,t){var n=(e("cordova/exec"),function(){this.setPosition=function(e){console.log("CameraPopoverHandle.setPosition is only supported on iOS.")}});t.exports=n}),cordova.define("org.apache.cordova.camera.CameraPopoverOptions",function(e,o,t){var n=e("./Camera"),r=function(e,o,t,r,i){this.x=e||0,this.y=o||32,this.width=t||320,this.height=r||480,this.arrowDir=i||n.PopoverArrowDirection.ARROW_ANY};t.exports=r}),cordova.define("org.apache.cordova.device-motion.Acceleration",function(e,o,t){var n=function(e,o,t,n){this.x=e,this.y=o,this.z=t,this.timestamp=n||(new Date).getTime()};t.exports=n}),cordova.define("org.apache.cordova.device-motion.accelerometer",function(e,o,t){function n(){l(function(e){var o=p.slice(0);v=new d(e.x,e.y,e.z,e.timestamp);for(var t=0,n=o.length;n>t;t++)o[t].win(v)},function(e){for(var o=p.slice(0),t=0,n=o.length;n>t;t++)o[t].fail(e)},"Accelerometer","start",[]),u=!0}function r(){l(null,null,"Accelerometer","stop",[]),u=!1}function i(e,o){return{win:e,fail:o}}function a(e){var o=p.indexOf(e);o>-1&&(p.splice(o,1),0===p.length&&r())}var c=e("cordova/argscheck"),s=e("cordova/utils"),l=e("cordova/exec"),d=e("./Acceleration"),u=!1,f={},p=[],v=null,h={getCurrentAcceleration:function(e,o,t){c.checkArgs("fFO","accelerometer.getCurrentAcceleration",arguments);var r,s=function(o){a(r),e(o)},l=function(e){a(r),o&&o(e)};r=i(s,l),p.push(r),u||n()},watchAcceleration:function(e,o,t){c.checkArgs("fFO","accelerometer.watchAcceleration",arguments);var r=t&&t.frequency&&"number"==typeof t.frequency?t.frequency:1e4,l=s.createUUID(),d=i(function(){},function(e){a(d),o&&o(e)});return p.push(d),f[l]={timer:window.setInterval(function(){v&&e(v)},r),listeners:d},u?v&&e(v):n(),l},clearWatch:function(e){e&&f[e]&&(window.clearInterval(f[e].timer),a(f[e].listeners),delete f[e])}};t.exports=h}),cordova.define("org.apache.cordova.device-orientation.CompassError",function(e,o,t){var n=function(e){this.code=void 0!==e?e:null};n.COMPASS_INTERNAL_ERR=0,n.COMPASS_NOT_SUPPORTED=20,t.exports=n}),cordova.define("org.apache.cordova.device-orientation.CompassHeading",function(e,o,t){var n=function(e,o,t,n){this.magneticHeading=e,this.trueHeading=o,this.headingAccuracy=t,this.timestamp=n||(new Date).getTime()};t.exports=n}),cordova.define("org.apache.cordova.device-orientation.compass",function(e,o,t){var n=e("cordova/argscheck"),r=e("cordova/exec"),i=e("cordova/utils"),a=e("./CompassHeading"),c=e("./CompassError"),s={},l={getCurrentHeading:function(e,o,t){n.checkArgs("fFO","compass.getCurrentHeading",arguments);var i=function(o){var t=new a(o.magneticHeading,o.trueHeading,o.headingAccuracy,o.timestamp);e(t)},s=o&&function(e){var t=new c(e);o(t)};r(i,s,"Compass","getHeading",[t])},watchHeading:function(e,o,t){n.checkArgs("fFO","compass.watchHeading",arguments);var r=void 0!==t&&void 0!==t.frequency?t.frequency:100,a=void 0!==t&&void 0!==t.filter?t.filter:0,c=i.createUUID();return a>0?(s[c]="iOS",l.getCurrentHeading(e,o,t)):s[c]=window.setInterval(function(){l.getCurrentHeading(e,o)},r),c},clearWatch:function(e){e&&s[e]&&("iOS"!=s[e]?clearInterval(s[e]):r(null,null,"Compass","stopHeading",[]),delete s[e])}};t.exports=l}),cordova.define("org.apache.cordova.dialogs.notification",function(e,o,t){var n=e("cordova/exec"),r=e("cordova/platform");t.exports={alert:function(e,o,t,r){var i=t||"Alert",a=r||"OK";n(o,null,"Notification","alert",[e,i,a])},confirm:function(e,o,t,i){var a=t||"Confirm",c=i||["OK","Cancel"];if("string"==typeof c&&console.log("Notification.confirm(string, function, string, string) is deprecated. Use Notification.confirm(string, function, string, array)."),"amazon-fireos"==r.id||"android"==r.id||"ios"==r.id||"windowsphone"==r.id||"firefoxos"==r.id||"ubuntu"==r.id){if("string"==typeof c){c=c.split(",")}}else if(Array.isArray(c)){var s=c;c=s.toString()}n(o,null,"Notification","confirm",[e,a,c])},prompt:function(e,o,t,r,i){var a=e||"Prompt message",c=t||"Prompt",s=r||["OK","Cancel"],l=i||"";n(o,null,"Notification","prompt",[a,c,s,l])},beep:function(e){var o=e||1;n(null,null,"Notification","beep",[o])}}}),cordova.define("org.apache.cordova.file.DirectoryEntry",function(e,o,t){var n=e("cordova/argscheck"),r=e("cordova/utils"),i=e("cordova/exec"),a=e("./Entry"),c=e("./FileError"),s=e("./DirectoryReader"),l=function(e,o,t,n){o&&!/\/$/.test(o)&&(o+="/"),n&&!/\/$/.test(n)&&(n+="/"),l.__super__.constructor.call(this,!1,!0,e,o,t,n)};r.extend(l,a),l.prototype.createReader=function(){return new s(this.toInternalURL())},l.prototype.getDirectory=function(e,o,t,r){n.checkArgs("sOFF","DirectoryEntry.getDirectory",arguments);var a=this.filesystem,s=t&&function(e){var o=new l(e.name,e.fullPath,a,e.nativeURL);t(o)},d=r&&function(e){r(new c(e))};i(s,d,"File","getDirectory",[this.toInternalURL(),e,o])},l.prototype.removeRecursively=function(e,o){n.checkArgs("FF","DirectoryEntry.removeRecursively",arguments);var t=o&&function(e){o(new c(e))};i(e,t,"File","removeRecursively",[this.toInternalURL()])},l.prototype.getFile=function(o,t,r,a){n.checkArgs("sOFF","DirectoryEntry.getFile",arguments);var s=this.filesystem,l=r&&function(o){var t=e("./FileEntry"),n=new t(o.name,o.fullPath,s,o.nativeURL);r(n)},d=a&&function(e){a(new c(e))};i(l,d,"File","getFile",[this.toInternalURL(),o,t])},t.exports=l}),cordova.define("org.apache.cordova.file.DirectoryReader",function(e,o,t){function n(e){this.localURL=e||null,this.hasReadEntries=!1}var r=e("cordova/exec"),i=e("./FileError");n.prototype.readEntries=function(o,t){if(this.hasReadEntries)return void o([]);var n=this,a="function"!=typeof o?null:function(t){for(var r=[],i=0;i<t.length;i++){var a=null;t[i].isDirectory?a=new(e("./DirectoryEntry")):t[i].isFile&&(a=new(e("./FileEntry"))),a.isDirectory=t[i].isDirectory,a.isFile=t[i].isFile,a.name=t[i].name,a.fullPath=t[i].fullPath,a.filesystem=new(e("./FileSystem"))(t[i].filesystemName),a.nativeURL=t[i].nativeURL,r.push(a)}n.hasReadEntries=!0,o(r)},c="function"!=typeof t?null:function(e){t(new i(e))};r(a,c,"File","readEntries",[this.localURL])},t.exports=n}),cordova.define("org.apache.cordova.file.Entry",function(e,o,t){function n(e,o,t,n,r,i){this.isFile=!!e,this.isDirectory=!!o,this.name=t||"",this.fullPath=n||"",this.filesystem=r||null,this.nativeURL=i||null}var r=e("cordova/argscheck"),i=e("cordova/exec"),a=e("./FileError"),c=e("./Metadata");n.prototype.getMetadata=function(e,o){r.checkArgs("FF","Entry.getMetadata",arguments);var t=e&&function(o){var t=new c({size:o.size,modificationTime:o.lastModifiedDate});e(t)},n=o&&function(e){o(new a(e))};i(t,n,"File","getFileMetadata",[this.toInternalURL()])},n.prototype.setMetadata=function(e,o,t){r.checkArgs("FFO","Entry.setMetadata",arguments),i(e,o,"File","setMetadata",[this.toInternalURL(),t])},n.prototype.moveTo=function(o,t,n,c){r.checkArgs("oSFF","Entry.moveTo",arguments);var s=c&&function(e){c(new a(e))},l=(this.filesystem,this.toInternalURL()),d=t||this.name,u=function(t){if(t){if(n){var r=t.filesystemName||t.filesystem&&t.filesystem.name,i=r?new FileSystem(r,{name:"",fullPath:"/"}):new FileSystem(o.filesystem.name,{name:"",fullPath:"/"}),c=t.isDirectory?new(e("./DirectoryEntry"))(t.name,t.fullPath,i,t.nativeURL):new(e("org.apache.cordova.file.FileEntry"))(t.name,t.fullPath,i,t.nativeURL);n(c)}}else s&&s(a.NOT_FOUND_ERR)};i(u,s,"File","moveTo",[l,o.toInternalURL(),d])},n.prototype.copyTo=function(o,t,n,c){r.checkArgs("oSFF","Entry.copyTo",arguments);var s=c&&function(e){c(new a(e))},l=(this.filesystem,this.toInternalURL()),d=t||this.name,u=function(t){if(t){if(n){var r=t.filesystemName||t.filesystem&&t.filesystem.name,i=r?new FileSystem(r,{name:"",fullPath:"/"}):new FileSystem(o.filesystem.name,{name:"",fullPath:"/"}),c=t.isDirectory?new(e("./DirectoryEntry"))(t.name,t.fullPath,i,t.nativeURL):new(e("org.apache.cordova.file.FileEntry"))(t.name,t.fullPath,i,t.nativeURL);n(c)}}else s&&s(a.NOT_FOUND_ERR)};i(u,s,"File","copyTo",[l,o.toInternalURL(),d])},n.prototype.toInternalURL=function(){return this.filesystem&&this.filesystem.__format__?this.filesystem.__format__(this.fullPath):void 0},n.prototype.toURL=function(){return this.nativeURL?this.nativeURL:this.toInternalURL()||"file://localhost"+this.fullPath},n.prototype.toNativeURL=function(){return console.log("DEPRECATED: Update your code to use 'toURL'"),this.toURL()},n.prototype.toURI=function(e){return console.log("DEPRECATED: Update your code to use 'toURL'"),this.toURL()},n.prototype.remove=function(e,o){r.checkArgs("FF","Entry.remove",arguments);var t=o&&function(e){o(new a(e))};i(e,t,"File","remove",[this.toInternalURL()])},n.prototype.getParent=function(o,t){r.checkArgs("FF","Entry.getParent",arguments);var n=this.filesystem,c=o&&function(t){var r=e("./DirectoryEntry"),i=new r(t.name,t.fullPath,n,t.nativeURL);o(i)},s=t&&function(e){t(new a(e))};i(c,s,"File","getParent",[this.toInternalURL()])},t.exports=n}),cordova.define("org.apache.cordova.file.File",function(e,o,t){var n=function(e,o,t,n,r){this.name=e||"",this.localURL=o||null,this.type=t||null,this.lastModified=n||null,this.lastModifiedDate=n||null,this.size=r||0,this.start=0,this.end=this.size};n.prototype.slice=function(e,o){var t=this.end-this.start,r=0,i=t;arguments.length&&(r=0>e?Math.max(t+e,0):Math.min(t,e)),arguments.length>=2&&(i=0>o?Math.max(t+o,0):Math.min(o,t));var a=new n(this.name,this.localURL,this.type,this.lastModified,this.size);return a.start=this.start+r,a.end=this.start+i,a},t.exports=