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D,OAAO,KAAK,EAAS,KAAM,mBAAoB,yBAA0B,GAC1E,EAGA,iBAAiB,UAAU,8BAAgC,WAC1D,KAAK,KAAM,KAAM,mBAAoB,gCAAiC,GACvE,EAEA,iBAAiB,UAAU,YAAc,SAAS,GACjD,KAAK,KAAM,KAAM,mBAAoB,cAAe,CAAC,GACtD,EAUA,iBAAiB,UAAU,YAAc,SAAS,EAAe,EAAS,GACzE,KAAK,EAAS,EAAO,mBAAoB,cAAe,CAAC,GAAiB,IAC3E,EAEA,iBAAiB,UAAU,uBAAyB,SAAS,GAC5D,KAAK,KAAM,KAAM,mBAAoB,yBAA0B,CAAC,GACjE,EAEA,OAAO,QAAU,IAAI","file":"/npm/pushwoosh-cordova-plugin@8.4.0/www/PushNotification.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.48.0.\n * Original file: /npm/pushwoosh-cordova-plugin@8.4.0/www/PushNotification.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","//\n//  PushNotification.js\n//\n// Based on the Push Notifications Cordova Plugin by Olivier Louvignes.\n// Modified by Pushwoosh team.\n//\n// Pushwoosh Push Notifications Plugin for Cordova\n// www.pushwoosh.com\n//\n// MIT Licensed\n\n/**\n * @fileoverview Pushwoosh Cordova Plugin - Integration Guide\n *\n * @description\n * Pushwoosh is a customer engagement platform for push notifications, in-app messages,\n * emails, SMS, and WhatsApp. This Cordova plugin wraps native iOS and Android Pushwoosh SDKs\n * and provides a JavaScript bridge for hybrid mobile applications built with Cordova / PhoneGap.\n *\n * @section Installation\n *\n * Using npm:\n * ```bash\n * cordova plugin add pushwoosh-cordova-plugin\n * ```\n *\n * Using git:\n * ```bash\n * cordova plugin add https://github.com/Pushwoosh/pushwoosh-phonegap-plugin.git\n * ```\n *\n * @section Quick Start\n *\n * Step 1: Initialize the plugin on deviceready event\n *\n * ```javascript\n * document.addEventListener('deviceready', function() {\n *     var pushwoosh = cordova.require(\"pushwoosh-cordova-plugin.PushNotification\");\n *\n *     pushwoosh.onDeviceReady({\n *         appid: \"XXXXX-XXXXX\"\n *     });\n *\n *     pushwoosh.registerDevice(\n *         function(status) {\n *             console.log(\"Registered with push token: \" + status.pushToken);\n *         },\n *         function(error) {\n *             console.error(\"Failed to register: \" + error);\n *         }\n *     );\n * }, false);\n * ```\n *\n * Step 2: Handle push notification events\n *\n * ```javascript\n * // Notification received while app is in foreground\n * document.addEventListener('push-receive', function(event) {\n *     var notification = event.notification;\n *     console.log(\"Push received: \" + JSON.stringify(notification));\n * });\n *\n * // Notification opened by user\n * document.addEventListener('push-notification', function(event) {\n *     var notification = event.notification;\n *     console.log(\"Push opened: \" + JSON.stringify(notification));\n * });\n * ```\n *\n * @section Common Use Cases\n *\n * User identification and cross-device tracking:\n *\n * ```javascript\n * var pushwoosh = cordova.require(\"pushwoosh-cordova-plugin.PushNotification\");\n *\n * // After user login\n * pushwoosh.setUserId(\"user_12345\");\n * pushwoosh.setEmail(\"user@example.com\");\n * ```\n *\n * User segmentation with tags:\n *\n * ```javascript\n * var pushwoosh = cordova.require(\"pushwoosh-cordova-plugin.PushNotification\");\n *\n * pushwoosh.setTags(\n *     { subscription: \"premium\", age: 25, interests: [\"sports\", \"music\"] },\n *     function() { console.log(\"Tags set successfully\"); },\n *     function(error) { console.error(\"Failed to set tags: \" + error); }\n * );\n *\n * pushwoosh.getTags(\n *     function(tags) {\n *         console.log(\"Tags: \" + JSON.stringify(tags));\n *     },\n *     function(error) {\n *         console.error(\"Get tags error: \" + error);\n *     }\n * );\n * ```\n *\n * Trigger In-App Messages with events:\n *\n * ```javascript\n * var pushwoosh = cordova.require(\"pushwoosh-cordova-plugin.PushNotification\");\n *\n * pushwoosh.setUserId(\"user_12345\");\n * pushwoosh.postEvent(\"purchase_complete\", {\n *     productName: \"Premium Plan\",\n *     amount: \"9.99\"\n * });\n * ```\n *\n * Schedule a local notification:\n *\n * ```javascript\n * var pushwoosh = cordova.require(\"pushwoosh-cordova-plugin.PushNotification\");\n *\n * pushwoosh.createLocalNotification({\n *     msg: \"Your order is ready!\",\n *     seconds: 60,\n *     userData: { orderId: \"12345\" }\n * });\n * ```\n *\n * Message Inbox with custom styling:\n *\n * ```javascript\n * var pushwoosh = cordova.require(\"pushwoosh-cordova-plugin.PushNotification\");\n *\n * pushwoosh.presentInboxUI({\n *     dateFormat: \"dd.MM.yyyy\",\n *     accentColor: \"#3498db\",\n *     backgroundColor: \"#ffffff\",\n *     titleColor: \"#333333\",\n *     descriptionColor: \"#666666\",\n *     dateColor: \"#999999\",\n *     listEmptyMessage: \"No messages yet\"\n * });\n *\n * // Or load messages programmatically\n * pushwoosh.loadMessages(\n *     function(messages) {\n *         messages.forEach(function(msg) {\n *             console.log(msg.title + \": \" + msg.message);\n *         });\n *     },\n *     function(error) {\n *         console.error(\"Failed to load messages: \" + error);\n *     }\n * );\n *\n * pushwoosh.unreadMessagesCount(function(count) {\n *     console.log(\"Unread messages: \" + count);\n * });\n * ```\n *\n * Multi-channel communication:\n *\n * ```javascript\n * var pushwoosh = cordova.require(\"pushwoosh-cordova-plugin.PushNotification\");\n *\n * pushwoosh.setEmail(\"user@example.com\");\n * pushwoosh.setEmails([\"work@example.com\", \"personal@example.com\"]);\n * pushwoosh.registerSMSNumber(\"+1234567890\");\n * pushwoosh.registerWhatsappNumber(\"+1234567890\");\n * ```\n *\n * Handle launch notification (app opened via push):\n *\n * ```javascript\n * var pushwoosh = cordova.require(\"pushwoosh-cordova-plugin.PushNotification\");\n *\n * pushwoosh.getLaunchNotification(function(notification) {\n *     if (notification) {\n *         console.log(\"App launched from push: \" + JSON.stringify(notification));\n *         // Navigate to the relevant screen\n *     }\n * });\n * ```\n *\n * Enable/disable Pushwoosh communication (e.g. for GDPR):\n *\n * ```javascript\n * var pushwoosh = cordova.require(\"pushwoosh-cordova-plugin.PushNotification\");\n *\n * // User opted out\n * pushwoosh.setCommunicationEnabled(false);\n *\n * // User opted in\n * pushwoosh.setCommunicationEnabled(true);\n *\n * // Check current status\n * pushwoosh.isCommunicationEnabled(function(enabled) {\n *     console.log(\"Communication enabled: \" + enabled);\n * });\n * ```\n *\n * @section Plugin Preferences\n *\n * Configure these in your config.xml:\n *\n * - LOG_LEVEL (default: \"DEBUG\") - Logging level\n * - IOS_FOREGROUND_ALERT_TYPE (default: \"ALERT\") - iOS foreground notification display type\n * - ANDROID_FOREGROUND_PUSH (default: \"true\") - Show notifications when app is in foreground on Android\n * - PW_VOIP_IOS_ENABLED (default: \"false\") - Enable VoIP calling features on iOS\n * - PW_VOIP_ANDROID_ENABLED (default: \"false\") - Enable VoIP calling features on Android\n *\n * @section Events\n *\n * The plugin dispatches the following DOM events:\n *\n * - \"push-receive\" - Fired when a notification is received while the app is in foreground.\n *   Access the notification payload via event.notification.\n * - \"push-notification\" - Fired when a notification is opened by the user.\n *   Access the notification payload via event.notification.\n *\n * @module pushwoosh-cordova-plugin\n */\n\n/**\n * Forwards a plugin call to `cordova.exec`, looking the bridge up on every call.\n *\n * The plugin is also published as a plain npm package with a `main` entry, so a bundler, an SSR\n * pass or a test runner can evaluate this module with no cordova in scope. Reading\n * `window.cordova.exec` while the module was being evaluated threw there and took the host's\n * whole bootstrap down with it. With no bridge available the call is now a logged no-op that\n * still reports the failure to the caller's fail callback, and on the cordova path the bridge is\n * resolved exactly as before.\n *\n * @private\n */\nfunction exec() {\n\tvar cordovaRef = typeof window !== 'undefined' ? window.cordova : undefined;\n\n\tif (!cordovaRef || typeof cordovaRef.exec !== 'function') {\n\t\tvar message = 'Pushwoosh: cordova.exec is not available, is cordova.js loaded? Ignored call: ' + arguments[3];\n\t\tvar fail = arguments[1];\n\n\t\tconsole.warn(message);\n\n\t\t// Deferred, because cordova.exec never calls back within the caller's own frame.\n\t\tif (typeof fail === 'function') {\n\t\t\tsetTimeout(function () { fail(message); }, 0);\n\t\t}\n\n\t\treturn;\n\t}\n\n\treturn cordovaRef.exec.apply(cordovaRef, arguments);\n}\n\n/**\n * PushNotification class provides the JavaScript API for interacting with the Pushwoosh SDK.\n * Access it via: `var pushwoosh = cordova.require(\"pushwoosh-cordova-plugin.PushNotification\");`\n *\n * @class PushNotification\n */\nfunction PushNotification() {}\n\n//Function: onDeviceReady\n//[android, ios, wp8, windows] Initialize Pushwoosh plugin and trigger a start push message\n//Should be called on every app launch\n//\n//Parameters:\n// \"config.appid\" - Pushwoosh application code\n// \"config.serviceName\" - MPNS service name for wp8 platform\n//\n//Example:\n//(start code)\n//\t//initialize Pushwoosh with appid : \"PUSHWOOSH_APP_ID\", serviceName : \"WINDOWS_PHONE_SERVICE\". This will trigger all pending push notifications on start.\n//\tpushwoosh.onDeviceReady({\n//\t\tappid : \"XXXXX-XXXXX\",\n//\t\tserviceName: \"XXXX\"\n//\t});\n//(end)\nPushNotification.prototype.onDeviceReady = function(config) {\n\texec(null, null, \"PushNotification\", \"onDeviceReady\", config ? [config] : []);\n};\n\n//Function: onAppActivated\n//[windows] The event fires when Windows Runtime activation has occurred\n//\n//Parameters:\n// \"args\" - activation arguments\n//\nPushNotification.prototype.onAppActivated = function (args) {\n    exec(null, null, \"PushNotification\", \"onAppActivated\", args ? [args] : []);\n};\n\n//Function: registerDevice\n//[android, ios, wp8, windows] Register device for push notifications and retreive a push Token\n//\n//Parameters:\n// \"success\" - success callback. Push token is passed as \"status.pushToken\" parameter to this callback\n// \"fail\" - error callback\n//\n//Example:\n//(start code)\n//\tpushwoosh.registerDevice(\n//\t\tfunction(status) {\n//\t\t\talert(\"Registered with push token: \" + status.pushToken);\n//\t\t},\n//\t\tfunction(error) {\n//\t\t\talert(\"Failed to register: \" +  error);\n//\t\t}\n//\t);\n//(end)\nPushNotification.prototype.registerDevice = function(success, fail) {\n\texec(success, fail, \"PushNotification\", \"registerDevice\", []);\n};\n\n//Function: additionalAuthorizationOptions\n//[ios] Authorization options in addition to UNAuthorizationOptionBadge | UNAuthorizationOptionSound | UNAuthorizationOptionAlert | UNAuthorizationOptionCarPlay. \n//Should be called before registering for pushes\n//\n//Parameters:\n// \"options.UNAuthorizationOptionCriticalAlert\" - adds UNAuthorizationOptionCriticalAlert option\n// \"options.UNAuthorizationOptionProvisional\" - adds UNAuthorizationOptionProvisional option\n// \"options.UNAuthorizationOptionProvidesAppNotificationSettings\" - adds UNAuthorizationOptionProvidesAppNotificationSettings option\n//\n//Example:\n//(start code)\n//\tpushwoosh.additionalAuthorizationOptions({ \n//\t\t\"UNAuthorizationOptionCriticalAlert\" : 1,\n//\t\t\"UNAuthorizationOptionProvisional\": 0 // set 0 or don't specify the option if you don't want to add it to your app. \n//\t});\n//(end)\nPushNotification.prototype.additionalAuthorizationOptions = function(options) {\n\texec(null, null, \"PushNotification\", \"additionalAuthorizationOptions\", options ? [options] : []);\n}\n\n//Function: unregisterDevice\n//[android, ios, wp8, windows] Unregister device form receiving push notifications\n//\n//Parameters:\n// \"success\" - success callback\n// \"fail\" - error callback\n//\n//Unregisters device from push notifications\nPushNotification.prototype.unregisterDevice = function(success, fail) {\n\texec(success, fail, \"PushNotification\", \"unregisterDevice\", []);\n};\n\n//Function: setTags\n//[android, ios, wp8, windows] Set tags for the device\n//\n//Parameters:\n// \"config\" - object with custom device tags\n// \"success\" - success callback\n// \"fail\" - error callback\n//\n//Example:\n//sets the following tags: \"deviceName\" with value \"hello\" and \"deviceId\" with value 10\n//(start code)\n//\tpushwoosh.setTags({deviceName:\"hello\", deviceId:10},\n//\t\tfunction() {\n//\t\t\tconsole.warn('setTags success');\n//\t\t},\n//\t\tfunction(error) {\n//\t\t\tconsole.warn('setTags failed');\n//\t\t}\n//\t);\n//\n//\t//setings list tags \"MyTag\" with values (array) \"hello\", \"world\"\n//\tpushwoosh.setTags({\"MyTag\":[\"hello\", \"world\"]});\n//(end)\nPushNotification.prototype.setTags = function(config, success, fail) {\n\texec(success, fail, \"PushNotification\", \"setTags\", config ? [config] : []);\n};\n\n//Function: getTags\n//[android, ios, wp8, windows] Returns tags for the device including default tags\n//\n//Parameters:\n// \"success\" - success callback. Receives tags as parameter\n// \"fail\" - error callback\n//\n//Example:\n//(start code)\n//\tpushwoosh.getTags(\n//\t\tfunction(tags) {\n//\t\t\tconsole.warn('tags for the device: ' + JSON.stringify(tags));\n//\t\t},\n//\t\tfunction(error) {\n//\t\t\tconsole.warn('get tags error: ' + JSON.stringify(error));\n//\t\t}\n//\t);\n//(end)\nPushNotification.prototype.getTags = function(success, fail) {\n\texec(success, fail, \"PushNotification\", \"getTags\", []);\n};\n\n//Function: getPushToken\n//[android, ios, wp8, windows] Returns push token if it is available. Note the token also comes in registerDevice function callback.\n//\n//Parameters:\n// \"success\" - getPushToken callback\n//\n//Example:\n//(start code)\n//\tpushwoosh.getPushToken(\n//\t\tfunction(token) {\n//\t\t\tconsole.warn('push token: ' + token);\n//\t\t}\n//\t);\n//(end)\nPushNotification.prototype.getPushToken = function(success) {\n\texec(success, null, \"PushNotification\", \"getPushToken\", []);\n};\n\n//Function: getPushwooshHWID\n//[android, ios, wp8, windows] Returns Pushwoosh HWID used for communications with Pushwoosh API\n//\n//Parameters:\n// \"success\" - getPushwooshHWID callback\n//\n//Example:\n//(start code)\n//\tpushwoosh.getPushwooshHWID(\n//\t\tfunction(token) {\n//\t\t\tconsole.warn('Pushwoosh HWID: ' + token);\n//\t\t}\n//\t);\n//(end)\nPushNotification.prototype.getPushwooshHWID = function(success) {\n\texec(success, null, \"PushNotification\", \"getPushwooshHWID\", []);\n};\n\n//Function: getRemoteNotificationStatus\n//[android, ios] Returns a detailed status of push notification permissions.\n//\n//Parameters:\n// \"callback\" - success callback\n// \"error\" - error callback\n//\n//Returns array with the following items:\n//\n//\"enabled\" - if push notificaions enabled.\n//\"pushBadge\" -  badges permission granted. (iOS only)\n//\"pushAlert\" -  alert permission granted. (iOS only)\n//\"pushSound\" -  sound permission granted. (iOS only)\n//\n//Every value is returned as the string \"1\" or \"0\", not as a boolean. Note that \"0\"\n//is truthy in JavaScript, so compare against \"1\" instead of testing the value directly.\n//\n//This reports the operating system notification permission, not the Pushwoosh\n//subscription: after a successful unregisterDevice() it still reports \"enabled\" : \"1\".\n//Use isRegisteredForPushNotifications to read the subscription state.\nPushNotification.prototype.getRemoteNotificationStatus = function(callback, error) {\n\texec(callback, error, \"PushNotification\", \"getRemoteNotificationStatus\", []);\n};\n\n//Function: isRegisteredForPushNotifications\n//[android, ios] Returns whether the device is currently subscribed to push notifications.\n//\n//Parameters:\n// \"success\" - success callback. Receives a boolean as parameter\n// \"fail\" - error callback\n//\n//On iOS reports whether a push token is available, on Android reports the native registration flag.\n//\n//This is the Pushwoosh subscription state, not the operating system notification\n//permission - use getRemoteNotificationStatus for the latter. The two are independent:\n//a device can be subscribed while the user has notifications turned off in system settings.\n//\n//Example:\n//(start code)\n//\tpushwoosh.isRegisteredForPushNotifications(\n//\t\tfunction(registered) {\n//\t\t\tconsole.warn('subscribed to push notifications: ' + registered);\n//\t\t},\n//\t\tfunction(error) {\n//\t\t\tconsole.warn('isRegisteredForPushNotifications failed: ' + JSON.stringify(error));\n//\t\t}\n//\t);\n//(end)\nPushNotification.prototype.isRegisteredForPushNotifications = function(success, fail) {\n\texec(success, fail, \"PushNotification\", \"isRegisteredForPushNotifications\", []);\n};\n\n//Function: setApplicationIconBadgeNumber\n//[android, ios, wp8, windows] Set the application icon badge number\n//\n//Parameters:\n// \"badgeNumber\" - icon badge number\n//\nPushNotification.prototype.setApplicationIconBadgeNumber = function(badgeNumber) {\n\texec(null, null, \"PushNotification\", \"setApplicationIconBadgeNumber\", [{\n\t\tbadge: badgeNumber\n\t}]);\n};\n\n//Function: getApplicationIconBadgeNumber\n//[android, ios] Returns the application icon badge number\n//\n//Parameters:\n// \"callback\" - success callback\n//\n//Example:\n//(start code)\n//\tpushwoosh.getApplicationIconBadgeNumber(function(badge){ alert(badge);} );\n//(end)\nPushNotification.prototype.getApplicationIconBadgeNumber = function(callback) {\n\texec(callback, callback, \"PushNotification\", \"getApplicationIconBadgeNumber\", []);\n};\n\n//Function: addToApplicationIconBadgeNumber\n//[android, ios] Adds value to the application icon badge\n//\n//Parameters:\n// \"badgeNumber\" - incremental icon badge number\n//\n//Example:\n//(start code)\n//\tpushwoosh.addToApplicationIconBadgeNumber(5);\n//\tpushwoosh.addToApplicationIconBadgeNumber(-5);\n//(end)\nPushNotification.prototype.addToApplicationIconBadgeNumber = function(badgeNumber) {\n\texec(null, null, \"PushNotification\", \"addToApplicationIconBadgeNumber\", [{\n\t\tbadge: badgeNumber\n\t}]);\n};\n\n//Function: getLaunchNotification\n//[android, ios] Returns push notification payload if the app was started in response to push notification\n//or null otherwise\n//\n//Parameters:\n// \"callback\" - success callback\n//\nPushNotification.prototype.getLaunchNotification = function(callback) {\n\texec(callback, callback, \"PushNotification\", \"getLaunchNotification\", []);\n};\n\n//Function: clearLaunchNotification\n//[android, ios] Clears launch notifiation, getLaunchNotification() will return null after this call.\nPushNotification.prototype.clearLaunchNotification = function(callback) {\n\texec(callback, callback, \"PushNotification\", \"clearLaunchNotification\", []);\n};\n\n//Function: setLanguage\n//[android, ios] Set custom application language (as opposed to the default system language).\n//This allows sending localized push messages\n//\n//Parameters:\n// \"language\" - string containing language code, i.e. \"en\", \"fr\"\n//\nPushNotification.prototype.setLanguage = function(language) {\n\texec(null, null, \"PushNotification\", \"setLanguage\", [language]);\n};\n\n//Function: setShowPushnotificationAlert\n//[android, ios] Configure custom foreground push notification settings distinct from the default system configuration.\n//This allows show foreground push notifications\n//\n//Parameters:\n// \"showPushnotificationAlert\" - bool value\n//\n\nPushNotification.prototype.setShowPushnotificationAlert = function(showPushnotificationAlert) {\n\texec(null, null, \"PushNotification\", \"setShowPushnotificationAlert\", [showPushnotificationAlert]);\n};\n\n//Function: setUserId\n//[android, ios] Set User indentifier. This could be Facebook ID, username or email, or any other user ID.\n//This allows data and events to be matched across multiple user devices.\n//\n//Parameters:\n// \"userId\" - user string identifier\n//\nPushNotification.prototype.setUserId = function(userId) {\n\texec(null, null, \"PushNotification\", \"setUserId\", [userId]);\n};\n\n//Function: postEvent\n//[android, ios] Post events for In-App Messages. This can trigger In-App message display as specified in Pushwoosh Control Panel.\n//\n//Parameters:\n// \"event\" - event to trigger\n// \"attributes\" - object with additional event attributes\n// \n// Example:\n//(start code)\n// pushwoosh.setUserId(\"XXXXXX\");\n// pushwoosh.postEvent(\"buttonPressed\", { \"buttonNumber\" : 4, \"buttonLabel\" : \"banner\" });\n//(end)\nPushNotification.prototype.postEvent = function(event, attributes) {\n\texec(null, null, \"PushNotification\", \"postEvent\", [event, attributes]);\n};\n\n//Function: addJavaScriptInterface\n//Adds javascript interface for In-App Messages.\n//Interface will be accessible from Rich Media as object with specified `name` and function 'callFunction('<function_name>', JSON.stringify(<params>))'.\n//\n//Parameters:\n// \"name\" - interface name\n//\n//Example:\n//Cordova part:\n//  function foo() {\n//      alert(\"Bridge is working!\");\n//  }\n//\n//\n//  pushwoosh.addJavaScriptInterface('testBridge');\n//\n//Rich Media part:\n//  testBridge.callFunction('foo', JSON.stringify({'param1':1,'param2':'test'}))\nPushNotification.prototype.addJavaScriptInterface = function(name) {\n    exec(null, null, \"PushNotification\", \"addJavaScriptInterface\", [name]);\n};\n\n//Function: createLocalNotification\n//[android, ios] Schedules local notification,\n//\n//Parameters:\n// \"config.msg\" - notification message\n// \"config.seconds\" - notification delay in seconds\n// \"config.userData\" - addition data to pass in notification\n// \"success\" - success callback\n// \"fail\" - error callback\n//\n//Example:\n//(start code)\n//\tpushwoosh.createLocalNotification({msg:\"Your pumpkins are ready!\", seconds:30, userData:\"optional\"});\n//(end)\nPushNotification.prototype.createLocalNotification = function(config, success, fail) {\n\texec(success, fail, \"PushNotification\", \"createLocalNotification\", config ? [config] : []);\n};\n\n//Function: clearLocalNotification\n//[android] Clears all pending local notifications created by <createLocalNotification>\nPushNotification.prototype.clearLocalNotification = function() {\n\texec(null, null, \"PushNotification\", \"clearLocalNotification\", []);\n};\n\n//Function: clearNotificationCenter\n//[android] Clears all notifications presented in Android Notification Center\nPushNotification.prototype.clearNotificationCenter = function() {\n\texec(null, null, \"PushNotification\", \"clearNotificationCenter\", []);\n};\n\n//Function: setMultiNotificationMode\n//[android] Allows multiple notifications to be displayed in the Android Notification Center\nPushNotification.prototype.setMultiNotificationMode = function(success, fail) {\n\texec(success, fail, \"PushNotification\", \"setMultiNotificationMode\", []);\n};\n\n//Function: setSingleNotificationMode\n//[android] Allows only the last one notification to be displayed in the Android Notification Center\nPushNotification.prototype.setSingleNotificationMode = function(success, fail) {\n\texec(success, fail, \"PushNotification\", \"setSingleNotificationMode\", []);\n};\n\n//Function: setSoundType\n//[android] Sets default sound to play when push notification arrive.\n//\n//Parameters:\n// \"type\" - Sound type (0 - default, 1 - no sound, 2 - always)\n//\nPushNotification.prototype.setSoundType = function(type, success, fail) {\n\texec(success, fail, \"PushNotification\", \"setSoundType\", [type]);\n};\n\n//Function: setVibrateType\n//[android] Sets default vibration mode when push notification arrive.\n//\n//Parameters:\n// \"type\" - Vibration type (0 - default, 1 - no vibration, 2 - always)\n//\nPushNotification.prototype.setVibrateType = function(type, success, fail) {\n\texec(success, fail, \"PushNotification\", \"setVibrateType\", [type]);\n};\n\n//Function: setLightScreenOnNotification\n//[android] Turns the screen on if notification arrives\n//\n//Parameters:\n// \"on\" - enable/disable screen unlock (is disabled by default)\n//\nPushNotification.prototype.setLightScreenOnNotification = function(on, success, fail) {\n\texec(success, fail, \"PushNotification\", \"setLightScreenOnNotification\", [on]);\n};\n\n//Function: setEnableLED\n//[android] Enables led blinking when notification arrives and display is off\n//\n//Parameters:\n// \"on\" - enable/disable led blink (is disabled by default)\n//\nPushNotification.prototype.setEnableLED = function(on, success, fail) {\n\texec(success, fail, \"PushNotification\", \"setEnableLED\", [on]);\n};\n\n//Function: setEnableLED\n//[android] Set led color. Use with <setEnableLED>\n//\n//Parameters:\n// \"color\" - led color in ARGB integer format\n//\nPushNotification.prototype.setColorLED = function(color, success, fail) {\n\texec(success, fail, \"PushNotification\", \"setColorLED\", [color]);\n};\n\n//Function: getPushHistory\n//[android] Returns array of push notifications received.\n//\n//Parameters:\n// \"success\" - success callback\n//\n//Example:\n//(start code)\n//\tpushwoosh.getPushHistory(function(pushHistory) {\n//\t\tif(pushHistory.length == 0)\n//\t\t\talert(\"no push history\");\n//\t\telse\n//\t\t\talert(JSON.stringify(pushHistory));\n//\t});\n//\n//\tpushwoosh.clearPushHistory();\n//(end)\nPushNotification.prototype.getPushHistory = function(success) {\n\texec(success, null, \"PushNotification\", \"getPushHistory\", []);\n};\n\n//Function: clearPushHistory\n//[android] Clears push history\nPushNotification.prototype.clearPushHistory = function() {\n\texec(null, null, \"PushNotification\", \"clearPushHistory\", []);\n};\n\n//Function: cancelAllLocalNotifications\n//[ios] Clears all notifications from the notification center\nPushNotification.prototype.cancelAllLocalNotifications = function(callback) {\n\texec(callback, callback, \"PushNotification\", \"cancelAllLocalNotifications\", []);\n};\n\n// Event spawned when a notification is received while the application is active\nPushNotification.prototype.pushReceivedCallback = function(notification) {\n\tvar ev = document.createEvent('HTMLEvents');\n\tev.notification = notification;\n\tev.initEvent('push-receive', true, true, arguments);\n\tdocument.dispatchEvent(ev);\n};\n\n// Event spawned when a notification is opened while the application is active\nPushNotification.prototype.notificationCallback = function(notification) {\n\tvar ev = document.createEvent('HTMLEvents');\n\tev.notification = notification;\n\tev.initEvent('push-notification', true, true, arguments);\n\tdocument.dispatchEvent(ev);\n};\n\n// CallKit, PushKit\n/**\n * Registers a callback for a specific VoIP-related event.\n *\n * This method allows you to subscribe to a predefined set of VoIP events.\n * When the specified event occurs, the provided success callback will be invoked.\n *\n * @param {string} eventName - The name of the event to register for.\n *                             Supported event names include:\n *                             - \"answer\": Triggered when the call is answered.\n *                             - \"hangup\": Triggered when the call is hung up.\n *                             - \"reject\": Triggered when the call is rejected.\n *                             - \"muted\": Triggered when the call is muted or unmuted.\n *                             - \"held\": Triggered when the call is put on or off hold.\n *                             - \"voipPushPayload\": Triggered when a VoIP push notification is received.\n *                             - \"incomingCallSuccess\": Triggered when an incoming call is successfully displayed.\n *                             - \"incomingCallFailure\": Triggered when displaying the incoming call fails.\n *                             - \"playDTMF\": Triggered when a DTMF tone is played.\n *                             - \"voipDidFailToRegisterTokenWithError\": Triggered when VoIP token registration fails (iOS only).\n *                             - \"voipDidRegisterTokenSuccessfully\": Triggered when VoIP token registration succeeds (iOS only).\n *                             - \"voipDidCancelCall\": Triggered when a call is remotely cancelled via VoIP push.\n *                             - \"voipDidFailToCancelCall\": Triggered when a call cancellation attempt fails.\n *\n * @param {Function} success - Callback function to be invoked when the event occurs.\n * @param {Function} fail - Callback function to be invoked if the registration fails.\n *\n * @remarks iOS: if you present the call UI in a secondary native WebView on top of the main\n * WebView, the main WebView is backgrounded and these callbacks are suspended. The plugin also\n * broadcasts every VoIP event via the `PushwooshVoIPEventDispatched` NSNotification so your native\n * view controller can inject the event into that WebView. See the README section\n * \"Forwarding VoIP events to a secondary WebView (iOS)\".\n *\n * @remarks Events that arrive before a subscription exists are buffered and replayed when\n * you call registerEvent() for that event name, in the order they occurred. Replay happens\n * per event name, so subscribe to every event you handle (\"voipPushPayload\", \"answer\",\n * \"hangup\", ...) back to back at startup, preferably after Cordova's `deviceready` event and\n * before the plugin's own onDeviceReady() call (the Init); subscribing to them at different\n * times changes the order in which a buffered call's events reach you.\n * This applies to iOS and Android alike. Known gap on Android under Capacitor: an in-page reload\n * (location.reload(), live reload) does not reset the native plugin, so the previous page's\n * subscriptions survive until the activity is recreated, and an event arriving between the reload\n * and the new page's registerEvent() call may reach the stale subscription instead of being\n * buffered - call registerEvent() as early as possible after a reload.\n */\nPushNotification.prototype.registerEvent = function(eventName, success, fail) {\n\texec(success, fail, \"PushNotification\", \"registerEvent\", [eventName]);\n};\n\n/**\n * Unregisters a callback for a specific VoIP-related event.\n *\n * This method allows you to unsubscribe from a previously registered VoIP event.\n * After unregistering, the event callback will no longer be invoked when the event occurs.\n *\n * @param {string} eventName - The name of the event to unregister from.\n *                             This should match the event name used in registerEvent().\n *                             Supported event names include:\n *                             - \"answer\": Triggered when the call is answered.\n *                             - \"hangup\": Triggered when the call is hung up.\n *                             - \"reject\": Triggered when the call is rejected.\n *                             - \"muted\": Triggered when the call is muted or unmuted.\n *                             - \"held\": Triggered when the call is put on or off hold.\n *                             - \"voipPushPayload\": Triggered when a VoIP push notification is received.\n *                             - \"incomingCallSuccess\": Triggered when an incoming call is successfully displayed.\n *                             - \"incomingCallFailure\": Triggered when displaying the incoming call fails.\n *                             - \"playDTMF\": Triggered when a DTMF tone is played.\n *                             - \"voipDidFailToRegisterTokenWithError\": Triggered when VoIP token registration fails (iOS only).\n *                             - \"voipDidRegisterTokenSuccessfully\": Triggered when VoIP token registration succeeds (iOS only).\n *                             - \"voipDidCancelCall\": Triggered when a call is remotely cancelled via VoIP push.\n *                             - \"voipDidFailToCancelCall\": Triggered when a call cancellation attempt fails.\n *\n * @param {Function} success - Callback function to be invoked when the event is successfully unregistered.\n * @param {Function} fail - Callback function to be invoked if the unregistration fails.\n */\nPushNotification.prototype.unregisterEvent = function(eventName, success, fail) {\n\texec(success, fail, \"PushNotification\", \"unregisterEvent\", [eventName]);\n};\n\n/**\n * VoIP Push API Reference\n *\n * Call parameters are configured server-side when sending a VoIP push via /createMessage API.\n * Set \"voip_push\": true and pass parameters in platform-specific root_params:\n *\n * iOS (ios_root_params):\n *   callerName      {string}  - Caller name (\"unknown caller\" if omitted)\n *   video           {boolean} - Video call support\n *   supportsHolding {boolean} - Hold functionality\n *   supportsDTMF    {boolean} - DTMF signal support\n *   handleType      {number}  - 1: generic, 2: phone number, 3: email\n *   callId          {string}  - Unique call ID (used with cancelCall)\n *   cancelCall      {boolean} - Cancel call with specified callId\n *\n * Android (android_root_params):\n *   callerName      {string}  - Caller name (\"unknown caller\" if omitted)\n *   video           {boolean} - Video call support\n *   callId          {number}  - Unique call ID (used with cancelCall)\n *   cancelCall      {boolean} - Cancel call with specified callId\n */\n\n/**\n * @deprecated VoIP is now auto-initialized. Use {@link setRingtone} to customize the ringtone sound.\n * All parameters except ringtoneSound are ignored. Only ringtoneSound is forwarded to setRingtone().\n *\n * @param {boolean} [supportsVideo] - Ignored.\n * @param {string} [ringtoneSound] - Forwarded to setRingtone().\n * @param {number} [handleTypes] - Ignored.\n * @param {Function} success - Callback invoked on success.\n * @param {Function} error - Callback invoked on failure.\n */\nPushNotification.prototype.initializeVoIPParameters = function(supportsVideo, ringtoneSound, handleTypes, success, error) {\n    if (typeof handleTypes === \"function\") {\n        error = ringtoneSound;\n        success = supportsVideo;\n        handleTypes = undefined;\n        ringtoneSound = undefined;\n        supportsVideo = undefined;\n    }\n\n    exec(success, error, \"PushNotification\", \"initializeVoIPParameters\", [\n        !!supportsVideo,\n        ringtoneSound || \"\",\n        handleTypes != null ? Number(handleTypes) : 1\n    ]);\n};\n\n/**\n * Enables the device speaker during an active call.\n *\n * This method routes the call audio output through the device’s loudspeaker\n * instead of the earpiece. Useful for hands-free or speakerphone mode.\n *\n * @param {Function} success - Callback invoked when the speaker is successfully enabled.\n * @param {Function} error - Callback invoked if the operation fails.\n *\n * @example\n * PushNotification.speakerOn(onSuccess, onError);\n */\nPushNotification.prototype.speakerOn = function(success, error) {\n    exec(success, error, \"PushNotification\", \"speakerOn\", []);\n};\n\n/**\n * Disables the device speaker and routes audio back to the earpiece.\n *\n * This method returns the audio output to the default mode (typically the earpiece),\n * which is used for private voice conversations.\n *\n * @param {Function} success - Callback invoked when the speaker is successfully disabled.\n * @param {Function} error - Callback invoked if the operation fails.\n *\n * @example\n * PushNotification.speakerOff(onSuccess, onError);\n */\nPushNotification.prototype.speakerOff = function(success, error) {\n    exec(success, error, \"PushNotification\", \"speakerOff\", []);\n};\n\n/**\n * Mute device microphone\n * @param {Function} success - Callback invoked when the microphone is successfully disabled.\n * @param {Function} error - Callback invoked if the operation fails.\n */\nPushNotification.prototype.mute = function(success, error) {\n\t    exec(success, error, \"PushNotification\", \"speakerOff\", []);\n\n}\n\n/**\n * Unmute device microphone\n * @param {Function} success - Callback invoked when the microphone is successfully enable.\n * @param {Function} error - Callback invoked if the operation fails.\n */\nPushNotification.prototype.unmute = function(success, error) {\n\t    exec(success, error, \"PushNotification\", \"unmute\", []);\n\n}\n\n// Android calls\n/**\n * Request call permission and register phone account\n * @param {Function} success - Callback invoked with permission result\n * @param {Function} error - Callback invoked if the operation fails\n */\nPushNotification.prototype.requestCallPermission = function(success, error) {\n\texec(success, error, \"PushNotification\", \"requestCallPermission\", []);\n}\n\n/**\n * Get call permission status\n * Returns a Promise or calls success callback with status:\n *   0 - Permission not requested yet\n *   1 - Permission granted by user\n *   2 - Permission denied by user\n * @param {Function} success - Callback invoked with permission status\n * @param {Function} error - Callback invoked if the operation fails\n */\nPushNotification.prototype.getCallPermissionStatus = function(success, error) {\n\texec(success, error, \"PushNotification\", \"getCallPermissionStatus\", []);\n}\n\n/**\n * Notifies Pushwoosh that the call has ended\n * @param {Function} success - Callback invoked when the call ends.\n * @param {Function} error - Callback invoked if the operation fails.\n */\nPushNotification.prototype.endCall = function(success, error) {\n\texec(success, error, \"PushNotification\", \"endCall\", []);\n}\n\n// Opens Inbox screen.\n//\n// Supported style keys:\n//\n// Customizes the date formatting\n// \"dateFormat\"\n//\n// The default icon in the cell next to the message; if not specified, the app icon is used\n// \"defaultImageIcon\"\n//\n// The appearance of the unread messages mark (iOS only)\n// \"unreadImage\"\n//\n// The image which is displayed if an error occurs and the list of inbox messages is empty\n// \"listErrorImage\"\n//\n// The image which is displayed if the list of inbox messages is empty\n// \"listEmptyImage\"\n//\n// The error text which is displayed when an error occurs; cannot be localized\n// \"listErrorMessage\"\n//\n// The text which is displayed if the list of inbox messages is empty; cannot be localized\n// \"listEmptyMessage\"\n//\n// The default text color (iOS only)\n// \"defaultTextColor\"\n//\n// The accent color\n// \"accentColor\"\n//\n// The default background color\n// \"backgroundColor\"\n//\n// The default selection color\n// \"highlightColor\"\n//\n// The color of message titles\n// \"titleColor\"\n//\n// The color of message titles if message was readed (Android only)\n// \"readTitleColor\"\n//\n// The color of messages descriptions\n// \"descriptionColor\"\n//\n// The color of messages descriptions if message was readed (Android only)\n// \"readDescriptionColor\"\n//\n// The color of message dates\n// \"dateColor\"\n//\n// The color of message dates if message was readed (Android only)\n// \"readDateColor\"\n//\n// The color of the separator\n// \"dividerColor\"\n//\n//Example:\n// Pushwoosh.presentInboxUI({\n//   \"dateFormat\" : \"dd.MMMM.yyyy\",\n//   \"defaultImageIcon\" : 'img/icon.png',\n//   \"listErrorImage\" : 'img/error.png',\n//   \"listEmptyImage\" : 'img/empty.png',\n//   \"listErrorMessage\" : \"Error message\",\n//   \"listEmptyMessage\" : \"Empty message\",\n//   \"accentColor\" : '#ff00ff',\n//   \"highlightColor\" : '#ff00ff',\n//   \"dateColor\" : '#ff00ff',\n//   \"titleColor\" : '#ff00ff',\n//   \"dividerColor\" : '#ff00ff',\n//   \"descriptionColor\" : '#ff00ff',\n//   \"backgroundColor\" : '#ff00ff'\n// });\nPushNotification.prototype.presentInboxUI = function(params) {\n\texec(null, null, \"PushNotification\", \"presentInboxUI\", [ params ]);\n}\n\n// Load an array of InboxNotification objects\nPushNotification.prototype.loadMessages = function(success, fail) {\n\texec(success, fail, \"PushNotification\", \"loadMessages\", []);\n}\n\n// Get number of inbox messages with no action performed\nPushNotification.prototype.messagesWithNoActionPerformedCount = function(success) {\n\texec(success, null, \"PushNotification\", \"messagesWithNoActionPerformedCount\", []);\n}\n\n// Get number of unread inbox messages\nPushNotification.prototype.unreadMessagesCount = function(success) {\n\texec(success, null,\"PushNotification\", \"unreadMessagesCount\", []);\n}\n\n// Get total number of inbox messages\nPushNotification.prototype.messagesCount = function(success) {\n\texec(success, null,\"PushNotification\", \"messagesCount\", []);\n}\n\n// Mark inbox message as read\nPushNotification.prototype.readMessage = function(number) {\n\texec(null, null, \"PushNotification\", \"readMessage\", [number]);\n}\n\n// Delete message from inbox\nPushNotification.prototype.deleteMessage = function(number) {\n\texec(null, null, \"PushNotification\", \"deleteMessage\", [number]);\n}\n\n// Perform action for specified inbox message (i.e. open URL)\nPushNotification.prototype.performAction = function(number) {\n\texec(null, null, \"PushNotification\", \"performAction\", [number]);\n}\n\n// Enable/disable all communication with Pushwoosh. Enabled by default.\nPushNotification.prototype.setCommunicationEnabled = function(enable, success, fail) {\n\texec(success, fail, \"PushNotification\", \"setCommunicationEnabled\", [enable]);\n};\n\n// Register email associated to the current user.\n// Email should be a string and could not be null or empty.\nPushNotification.prototype.setEmail = function(email, success, fail) {\n    exec(success, fail, \"PushNotification\", \"setEmail\", [email]);\n};\n\n// Register list of emails associated to the current user.\nPushNotification.prototype.setEmails = function(emails, success, fail) {\n    exec(success, fail, \"PushNotification\", \"setEmails\", [emails]);\n};\n\n// Set user identifier and register emails associated to the user.\n// userID can be Facebook ID or any other user ID.\n// This allows data and events to be matched across multiple user devices.\nPushNotification.prototype.setUserEmails = function(userId, emails, success, fail) {\n    exec(success, fail, \"PushNotification\", \"setUserEmails\", [userId, emails]);\n};\n\n// Registers phone number associated to the current user.\n// PhoneNumber should be a string and cannot be null or empty.\nPushNotification.prototype.registerSMSNumber = function(phoneNumber, success, fail) {\n\texec(success, fail, \"PushNotification\", \"registerSMSNumber\", [phoneNumber]);\n};\n\n// Registers Whatsapp number associated to the current user.\n// PhoneNumber should be a string and cannot be null or empty.\nPushNotification.prototype.registerWhatsappNumber = function(phoneNumber, success, fail) {\n\texec(success, fail, \"PushNotification\", \"registerWhatsappNumber\", [phoneNumber]);\n};\n\nPushNotification.prototype.isCommunicationEnabled = function(success) {\n\treturn exec(success, null, \"PushNotification\", \"isCommunicationEnabled\", []);\n};\n\n// Enable Huawei push notifications in Android\nPushNotification.prototype.enableHuaweiPushNotifications = function() {\n\texec(null, null, \"PushNotification\", \"enableHuaweiPushNotifications\", []);\n}\n\nPushNotification.prototype.setApiToken = function(token) {\n\texec(null, null, \"PushNotification\", \"setApiToken\", [token]);\n}\n\n/**\n * Sets custom ringtone sound for incoming VoIP calls.\n * Call this at any time; the new ringtone takes effect on the next incoming call.\n *\n * @param {string} ringtoneSound - The name of the ringtone sound file (e.g., \"ring.caf\").\n * @param {Function} success - Callback invoked when the ringtone is successfully set.\n * @param {Function} error - Callback invoked if the operation fails.\n */\nPushNotification.prototype.setRingtone = function(ringtoneSound, success, error) {\n\texec(success, error, \"PushNotification\", \"setRingtone\", [ringtoneSound || \"\"]);\n};\n\nPushNotification.prototype.setIncomingCallTimeout = function(timeoutSeconds) {\n\texec(null, null, \"PushNotification\", \"setIncomingCallTimeout\", [timeoutSeconds]);\n}\n\nmodule.exports = new PushNotification();\n"]}