@qikdev/sdk 1.0.2 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. package/README.md +1 -1
  2. package/dist/{docs/access.html → access.html} +353 -20
  3. package/dist/api.html +444 -0
  4. package/dist/{docs/auth.html → auth.html} +14 -14
  5. package/dist/cache.html +351 -0
  6. package/dist/{docs/content.html → content.html} +46 -21
  7. package/dist/{docs/files.html → files.html} +147 -6
  8. package/dist/{docs/filter.html → filter.html} +9 -9
  9. package/dist/geo.html +1029 -0
  10. package/dist/global.html +240 -0
  11. package/dist/index.html +96 -0
  12. package/dist/main.js +2 -3
  13. package/dist/module-QikStorage-CookieStorageAdapter.html +407 -0
  14. package/dist/module-QikStorage-LocalStorageAdapter.html +193 -0
  15. package/dist/module-QikStorage-StorageAdapter.html +977 -0
  16. package/dist/module-QikStorage.html +433 -0
  17. package/dist/qik.access.js.html +904 -0
  18. package/dist/qik.api.js.html +409 -0
  19. package/dist/{docs/qik.auth.js.html → qik.auth.js.html} +142 -104
  20. package/dist/qik.cache.js.html +125 -0
  21. package/dist/qik.content.js.html +967 -0
  22. package/dist/qik.core.js.html +322 -0
  23. package/dist/qik.files.js.html +249 -0
  24. package/dist/{docs/qik.filter.js.html → qik.filter.js.html} +3 -3
  25. package/dist/qik.geo.js.html +963 -0
  26. package/dist/{docs/qik.socket.js.html → qik.socket.js.html} +53 -12
  27. package/dist/qik.storage.js.html +375 -0
  28. package/dist/qik.system.js.html +117 -0
  29. package/dist/qik.utils.js.html +1548 -0
  30. package/dist/{docs/socket.html → socket.html} +7 -7
  31. package/dist/{docs/styles → styles}/jsdoc.css +2 -2
  32. package/dist/system.html +197 -0
  33. package/dist/utils.html +4422 -0
  34. package/package.json +2 -2
  35. package/src/api/qik.filter.js +1 -1
  36. package/src/api/qik.geo.js +1 -1
  37. package/src/api/qik.socket.js +18 -12
  38. package/src/api/qik.utils.js +6 -0
  39. package/src/version.js +1 -1
  40. package/dist/docs/api.html +0 -1356
  41. package/dist/docs/cache.html +0 -351
  42. package/dist/docs/index.html +0 -96
  43. package/dist/docs/qik.access.js.html +0 -790
  44. package/dist/docs/qik.api.js.html +0 -511
  45. package/dist/docs/qik.cache.js.html +0 -131
  46. package/dist/docs/qik.content.js.html +0 -918
  47. package/dist/docs/qik.core.js.html +0 -301
  48. package/dist/docs/qik.files.js.html +0 -219
  49. package/dist/docs/qik.system.js.html +0 -117
  50. package/dist/docs/qik.utils.js.html +0 -1467
  51. package/dist/docs/system.html +0 -197
  52. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Bold.eot +0 -0
  53. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Bold.ttf +0 -0
  54. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Bold.woff +0 -0
  55. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Bold.woff2 +0 -0
  56. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Regular.eot +0 -0
  57. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Regular.ttf +0 -0
  58. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Regular.woff +0 -0
  59. /package/dist/{docs/fonts → fonts}/Montserrat/Montserrat-Regular.woff2 +0 -0
  60. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-light-webfont.eot +0 -0
  61. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-light-webfont.svg +0 -0
  62. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-light-webfont.ttf +0 -0
  63. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-light-webfont.woff +0 -0
  64. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-light-webfont.woff2 +0 -0
  65. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-regular-webfont.eot +0 -0
  66. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-regular-webfont.svg +0 -0
  67. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-regular-webfont.ttf +0 -0
  68. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-regular-webfont.woff +0 -0
  69. /package/dist/{docs/fonts → fonts}/Source-Sans-Pro/sourcesanspro-regular-webfont.woff2 +0 -0
  70. /package/dist/{docs/scripts → scripts}/collapse.js +0 -0
  71. /package/dist/{docs/scripts → scripts}/linenumber.js +0 -0
  72. /package/dist/{docs/scripts → scripts}/nav.js +0 -0
  73. /package/dist/{docs/scripts → scripts}/polyfill.js +0 -0
  74. /package/dist/{docs/scripts → scripts}/prettify/Apache-License-2.0.txt +0 -0
  75. /package/dist/{docs/scripts → scripts}/prettify/lang-css.js +0 -0
  76. /package/dist/{docs/scripts → scripts}/prettify/prettify.js +0 -0
  77. /package/dist/{docs/scripts → scripts}/search.js +0 -0
  78. /package/dist/{docs/styles → styles}/prettify.css +0 -0
@@ -0,0 +1,963 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en">
3
+ <head>
4
+
5
+ <meta charset="utf-8">
6
+ <title>qik.geo.js - Documentation</title>
7
+
8
+
9
+ <script src="scripts/prettify/prettify.js"></script>
10
+ <script src="scripts/prettify/lang-css.js"></script>
11
+ <!--[if lt IE 9]>
12
+ <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
13
+ <![endif]-->
14
+ <link type="text/css" rel="stylesheet" href="styles/prettify.css">
15
+ <link type="text/css" rel="stylesheet" href="styles/jsdoc.css">
16
+ <script src="scripts/nav.js" defer></script>
17
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
18
+ </head>
19
+ <body>
20
+
21
+ <input type="checkbox" id="nav-trigger" class="nav-trigger" />
22
+ <label for="nav-trigger" class="navicon-button x">
23
+ <div class="navicon"></div>
24
+ </label>
25
+
26
+ <label for="nav-trigger" class="overlay"></label>
27
+
28
+ <nav >
29
+
30
+ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="access.html">access</a><ul class='methods'><li data-type='method'><a href="access.html#.actionableScopes">actionableScopes</a></li><li data-type='method'><a href="access.html#.allPermissions">allPermissions</a></li><li data-type='method'><a href="access.html#.allPermissionTypes">allPermissionTypes</a></li><li data-type='method'><a href="access.html#.allUserScopes">allUserScopes</a></li><li data-type='method'><a href="access.html#.canCreate">canCreate</a></li><li data-type='method'><a href="access.html#.canDeleteItem">canDeleteItem</a></li><li data-type='method'><a href="access.html#.canEditItem">canEditItem</a></li><li data-type='method'><a href="access.html#.canEraseItem">canEraseItem</a></li><li data-type='method'><a href="access.html#.canKnowOf">canKnowOf</a></li><li data-type='method'><a href="access.html#.canListItem">canListItem</a></li><li data-type='method'><a href="access.html#.canRestoreItem">canRestoreItem</a></li><li data-type='method'><a href="access.html#.canViewItem">canViewItem</a></li><li data-type='method'><a href="access.html#.checkActionAccess">checkActionAccess</a></li><li data-type='method'><a href="access.html#.getAllDescendants">getAllDescendants</a></li><li data-type='method'><a href="access.html#.has">has</a></li><li data-type='method'><a href="access.html#.hasFeature">hasFeature</a></li><li data-type='method'><a href="access.html#.hashPermissions">hashPermissions</a></li><li data-type='method'><a href="access.html#.isAdministrator">isAdministrator</a></li><li data-type='method'><a href="access.html#.isAssignee">isAssignee</a></li><li data-type='method'><a href="access.html#.isOwner">isOwner</a></li></ul></li><li><a href="api.html">api</a><ul class='methods'><li data-type='method'><a href="api.html#.generateEndpointURL">generateEndpointURL</a></li></ul></li><li><a href="auth.html">auth</a><ul class='methods'><li data-type='method'><a href="auth.html#.changeOrganisation">changeOrganisation</a></li><li data-type='method'><a href="auth.html#.ensureValidToken">ensureValidToken</a></li><li data-type='method'><a href="auth.html#.getCurrentToken">getCurrentToken</a></li><li data-type='method'><a href="auth.html#.getCurrentUser">getCurrentUser</a></li><li data-type='method'><a href="auth.html#.impersonate">impersonate</a></li><li data-type='method'><a href="auth.html#.login">login</a></li><li data-type='method'><a href="auth.html#.logout">logout</a></li><li data-type='method'><a href="auth.html#.retrieveUserFromResetToken">retrieveUserFromResetToken</a></li><li data-type='method'><a href="auth.html#.sendResetPasswordRequest">sendResetPasswordRequest</a></li><li data-type='method'><a href="auth.html#.set">set</a></li><li data-type='method'><a href="auth.html#.sync">sync</a></li><li data-type='method'><a href="auth.html#.updateUserWithToken">updateUserWithToken</a></li></ul></li><li><a href="cache.html">cache</a><ul class='methods'><li data-type='method'><a href="cache.html#.get">get</a></li><li data-type='method'><a href="cache.html#.reset">reset</a></li></ul></li><li><a href="content.html">content</a><ul class='methods'><li data-type='method'><a href="content.html#.create">create</a></li><li data-type='method'><a href="content.html#.delete">delete</a></li><li data-type='method'><a href="content.html#.get">get</a></li><li data-type='method'><a href="content.html#.getFromSlug">getFromSlug</a></li><li data-type='method'><a href="content.html#.glossary">glossary</a></li><li data-type='method'><a href="content.html#.list">list</a></li><li data-type='method'><a href="content.html#.patch">patch</a></li><li data-type='method'><a href="content.html#.restore">restore</a></li><li data-type='method'><a href="content.html#.scopeGlossary">scopeGlossary</a></li><li data-type='method'><a href="content.html#.update">update</a></li><li data-type='method'><a href="content.html#.validateField">validateField</a></li><li data-type='method'><a href="content.html#.variables">variables</a></li></ul></li><li><a href="files.html">files</a><ul class='methods'><li data-type='method'><a href="files.html#.downloadUrl">downloadUrl</a></li><li data-type='method'><a href="files.html#.duration">duration</a></li><li data-type='method'><a href="files.html#.filesize">filesize</a></li><li data-type='method'><a href="files.html#.getBinaryTypeFromMime">getBinaryTypeFromMime</a></li><li data-type='method'><a href="files.html#.mediaUrl">mediaUrl</a></li></ul></li><li><a href="filter.html">filter</a><ul class='methods'><li data-type='method'><a href="filter.html#.activeFilterComparators">activeFilterComparators</a></li><li data-type='method'><a href="filter.html#.activeFilterKeys">activeFilterKeys</a></li><li data-type='method'><a href="filter.html#.activeFilterOperators">activeFilterOperators</a></li><li data-type='method'><a href="filter.html#.activeFilters">activeFilters</a></li><li data-type='method'><a href="filter.html#.activeFilterValues">activeFilterValues</a></li><li data-type='method'><a href="filter.html#.filterChangeString">filterChangeString</a></li><li data-type='method'><a href="filter.html#.isValidFilter">isValidFilter</a></li></ul></li><li><a href="geo.html">geo</a><ul class='methods'><li data-type='method'><a href="geo.html#.distance">distance</a></li><li data-type='method'><a href="geo.html#.getDefaultCountry">getDefaultCountry</a></li><li data-type='method'><a href="geo.html#.getDefaultTimezone">getDefaultTimezone</a></li><li data-type='method'><a href="geo.html#.getPosition">getPosition</a></li><li data-type='method'><a href="geo.html#.stopWatchPosition">stopWatchPosition</a></li><li data-type='method'><a href="geo.html#.watchPosition">watchPosition</a></li></ul></li><li><a href="module-QikStorage-CookieStorageAdapter.html">CookieStorageAdapter</a><ul class='methods'><li data-type='method'><a href="module-QikStorage-CookieStorageAdapter.html#getCookieOptions">getCookieOptions</a></li><li data-type='method'><a href="module-QikStorage-CookieStorageAdapter.html#isCookieMode">isCookieMode</a></li></ul></li><li><a href="module-QikStorage-LocalStorageAdapter.html">LocalStorageAdapter</a></li><li><a href="module-QikStorage-StorageAdapter.html">StorageAdapter</a><ul class='methods'><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#clearUser">clearUser</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getAccessToken">getAccessToken</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getRefreshToken">getRefreshToken</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getTokenExpiry">getTokenExpiry</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#getUser">getUser</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#isAvailable">isAvailable</a></li><li data-type='method'><a href="module-QikStorage-StorageAdapter.html#setUser">setUser</a></li></ul></li><li><a href="socket.html">socket</a><ul class='methods'><li data-type='method'><a href="socket.html#.channel">channel</a></li><li data-type='method'><a href="socket.html#.close">close</a></li><li data-type='method'><a href="socket.html#.connect">connect</a></li><li data-type='method'><a href="socket.html#.reconnect">reconnect</a></li><li data-type='method'><a href="socket.html#.subscribe">subscribe</a></li><li data-type='method'><a href="socket.html#.unsubscribe">unsubscribe</a></li></ul></li><li><a href="system.html">system</a><ul class='methods'><li data-type='method'><a href="system.html#.countries">countries</a></li></ul></li><li><a href="utils.html">utils</a><ul class='methods'><li data-type='method'><a href="utils.html#.cleanValue">cleanValue</a></li><li data-type='method'><a href="utils.html#.comma">comma</a></li><li data-type='method'><a href="utils.html#.errorMessage">errorMessage</a></li><li data-type='method'><a href="utils.html#.exists">exists</a></li><li data-type='method'><a href="utils.html#.extractFromArray">extractFromArray</a></li><li data-type='method'><a href="utils.html#.formatCurrency">formatCurrency</a></li><li data-type='method'><a href="utils.html#.getTypeFromID">getTypeFromID</a></li><li data-type='method'><a href="utils.html#.guid">guid</a></li><li data-type='method'><a href="utils.html#.hash">hash</a></li><li data-type='method'><a href="utils.html#.id">id</a></li><li data-type='method'><a href="utils.html#.ids">ids</a></li><li data-type='method'><a href="utils.html#.isValidEmailAddress">isValidEmailAddress</a></li><li data-type='method'><a href="utils.html#.loadExternalScript">loadExternalScript</a></li><li data-type='method'><a href="utils.html#.loadExternalStyle">loadExternalStyle</a></li><li data-type='method'><a href="utils.html#.machineName">machineName</a></li><li data-type='method'><a href="utils.html#.mapParameters">mapParameters</a></li><li data-type='method'><a href="utils.html#.matchInArray">matchInArray</a></li><li data-type='method'><a href="utils.html#.parseBoolean">parseBoolean</a></li><li data-type='method'><a href="utils.html#.parseDate">parseDate</a></li><li data-type='method'><a href="utils.html#.parseEmail">parseEmail</a></li><li data-type='method'><a href="utils.html#.parseInt">parseInt</a></li><li data-type='method'><a href="utils.html#.parseNumber">parseNumber</a></li><li data-type='method'><a href="utils.html#.parseURL">parseURL</a></li></ul></li></ul><h3>Modules</h3><ul><li><a href="module-QikStorage.html">QikStorage</a><ul class='methods'><li data-type='method'><a href="module-QikStorage.html#.createStorageAdapter">createStorageAdapter</a></li></ul></li></ul><h3>Global</h3><ul><li><a href="global.html#EventDispatcher">EventDispatcher</a></li></ul>
31
+ </nav>
32
+
33
+ <div id="main">
34
+
35
+ <h1 class="page-title">qik.geo.js</h1>
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+ <section>
44
+ <article>
45
+ <pre class="prettyprint source linenums"><code>///////////////////////////////////////////////////
46
+
47
+ /**
48
+ * Creates a new QikGeo instance.
49
+ * This module provides a number of geolocation features and functions
50
+ * @alias geo
51
+ * @constructor
52
+ * @hideconstructor
53
+ * @param {QikCore} qik A reference to the parent instance of the QikCore module. This module is usually created by a QikCore instance that passes itself in as the first argument.
54
+ */
55
+ export default function(qik) {
56
+
57
+ ///////////////////////////////////////////////////
58
+
59
+ var service = {}
60
+
61
+ function isEnabled() {
62
+ if (typeof window === 'undefined') {
63
+ return false;
64
+ }
65
+
66
+ if (!window.navigator) {
67
+ return false;
68
+ }
69
+
70
+ if (!window.navigator.geolocation) {
71
+ return false;
72
+ }
73
+
74
+ return true;
75
+ }
76
+
77
+ /**
78
+ *
79
+ * Get the distance between two geo location points
80
+ * @alias geo.distance
81
+ * @param {Object} positionOne The first position
82
+ * @param {Number} positionOne.lat The first positions latitude
83
+ * @param {Number} positionOne.lon The first positions longitude
84
+ * @param {Object} positionTwo The second position
85
+ * @param {Number} positionTwo.lat The second positions latitude
86
+ * @param {Number} positionTwo.lon The second positions longitude
87
+ * @example
88
+ * const meters = await sdk.geo.distance({lat, lon}, {lat, lon})
89
+ * // Returns 634
90
+ */
91
+ service.distance = function({ lat: lat1, lon: lon1 }, { lat: lat2, lon: lon2 }) {
92
+ function deg2rad(deg) {
93
+ return deg * (Math.PI / 180)
94
+ }
95
+
96
+ var R = 6371000; // Radius of the earth in meters
97
+ var dLat = deg2rad(lat2 - lat1);
98
+ var dLon = deg2rad(lon2 - lon1);
99
+ var a =
100
+ Math.sin(dLat / 2) * Math.sin(dLat / 2) +
101
+ Math.cos(deg2rad(lat1)) * Math.cos(deg2rad(lat2)) *
102
+ Math.sin(dLon / 2) * Math.sin(dLon / 2);
103
+ var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));
104
+ var d = R * c; // Distance in meters
105
+ return d;
106
+ }
107
+
108
+ /**
109
+ *
110
+ * Start watching the user's geolocation
111
+ * @alias geo.getPosition
112
+ * @param {Function} callback A function that will be called with updated position data
113
+ * @example
114
+ * const position = await sdk.geo.getPosition()
115
+ * // Returns {coords:{latitude, longitude, altitude, accuracy, ...}}
116
+ */
117
+ service.getPosition = async function() {
118
+
119
+ if (!isEnabled()) {
120
+ return Promise.reject({ message: 'Geolocation is not enabled' });
121
+ }
122
+
123
+ console.log('qik:geo: getting location');
124
+ return new Promise(function(resolve, reject) {
125
+ navigator.geolocation.getCurrentPosition(resolve, reject);
126
+ })
127
+ }
128
+
129
+ /**
130
+ *
131
+ * Start watching the user's geolocation
132
+ * @alias geo.watchPosition
133
+ * @param {Function} callback A function that will be called with updated position data
134
+ * @example
135
+ * const result = await sdk.geo.watchPosition(callback)
136
+ * // Returns {id:&lt;watcherID>}
137
+ */
138
+ service.watchPosition = async function(positionDataReceived) {
139
+
140
+ if (!isEnabled()) {
141
+ return Promise.reject({ message: 'Geolocation is not enabled' });
142
+ }
143
+
144
+ console.log('qik:geo: watching location');
145
+ return new Promise(function(resolve, reject) {
146
+ const watchID = navigator.geolocation.watchPosition(positionDataReceived, reject);
147
+ resolve({
148
+ id: watchID,
149
+ })
150
+ })
151
+ }
152
+
153
+ /**
154
+ *
155
+ * Start watching the user's geolocation
156
+ * @alias geo.stopWatchPosition
157
+ * @param {String} watchID the id of the watcher to stop
158
+ * @example
159
+ * const result = await sdk.geo.stopWatchPosition(watchID)
160
+ * // Returns true after the watcher has been stopped
161
+ */
162
+ service.stopWatchPosition = async function(watchID) {
163
+ if (!isEnabled()) {
164
+ return Promise.reject({ message: 'Geolocation is not enabled' });
165
+ }
166
+
167
+ console.log('qik:geo: watch stopped');
168
+ navigator.geolocation.clearWatch(this.watchID);
169
+ return true;
170
+ }
171
+
172
+
173
+ ///////////////////////////////////////////////////
174
+
175
+ /**
176
+ *
177
+ * Retrieves the default timezone for the current user/application
178
+ * will attempt to retrieve an accurate timezone either from the user's organisation or available services within the browser
179
+ * @alias geo.getDefaultTimezone
180
+ * @example
181
+ * const result = sdk.geo.getDefaultTimezone()
182
+ * // Would return something similar to:
183
+ * // Australia/Melbourne
184
+ */
185
+ service.getDefaultTimezone = function() {
186
+
187
+ const {session:currentUser} = qik.auth.getCurrentUser();
188
+
189
+ if(currentUser) {
190
+ const defaultUserTimezone = currentUser?.organisation?.timezone;
191
+ if(defaultUserTimezone) {
192
+ return defaultUserTimezone;
193
+ }
194
+ }
195
+
196
+ if (typeof window === 'undefined') {
197
+ return;
198
+ }
199
+
200
+ if (!window.Intl) {
201
+ return;
202
+ }
203
+ return window.Intl.DateTimeFormat().resolvedOptions().timeZone;
204
+ }
205
+
206
+ ///////////////////////////////////////////////////
207
+
208
+ service.countryLookup = {
209
+ "AC": "Ascension Island",
210
+ "AD": "Andorra",
211
+ "AE": "United Arab Emirates",
212
+ "AF": "Afghanistan",
213
+ "AG": "Antigua And Barbuda",
214
+ "AI": "Anguilla",
215
+ "AL": "Albania",
216
+ "AM": "Armenia",
217
+ "AO": "Angola",
218
+ "AQ": "Antarctica",
219
+ "AR": "Argentina",
220
+ "AS": "American Samoa",
221
+ "AT": "Austria",
222
+ "AU": "Australia",
223
+ "AW": "Aruba",
224
+ "AX": "Åland Islands",
225
+ "AZ": "Azerbaijan",
226
+ "BA": "Bosnia &amp; Herzegovina",
227
+ "BB": "Barbados",
228
+ "BD": "Bangladesh",
229
+ "BE": "Belgium",
230
+ "BF": "Burkina Faso",
231
+ "BG": "Bulgaria",
232
+ "BH": "Bahrain",
233
+ "BI": "Burundi",
234
+ "BJ": "Benin",
235
+ "BL": "Saint Barthélemy",
236
+ "BM": "Bermuda",
237
+ "BN": "Brunei Darussalam",
238
+ "BO": "Bolivia, Plurinational State Of",
239
+ "BQ": "Bonaire, Saint Eustatius And Saba",
240
+ "BR": "Brazil",
241
+ "BS": "Bahamas",
242
+ "BT": "Bhutan",
243
+ "BV": "Bouvet Island",
244
+ "BW": "Botswana",
245
+ "BY": "Belarus",
246
+ "BZ": "Belize",
247
+ "CA": "Canada",
248
+ "CC": "Cocos (Keeling) Islands",
249
+ "CD": "Democratic Republic Of Congo",
250
+ "CF": "Central African Republic",
251
+ "CG": "Republic Of Congo",
252
+ "CH": "Switzerland",
253
+ "CI": "Côte d'Ivoire",
254
+ "CK": "Cook Islands",
255
+ "CL": "Chile",
256
+ "CM": "Cameroon",
257
+ "CN": "China",
258
+ "CO": "Colombia",
259
+ "CP": "Clipperton Island",
260
+ "CR": "Costa Rica",
261
+ "CU": "Cuba",
262
+ "CV": "Cabo Verde",
263
+ "CW": "Curacao",
264
+ "CX": "Christmas Island",
265
+ "CY": "Cyprus",
266
+ "CZ": "Czech Republic",
267
+ "DE": "Germany",
268
+ "DG": "Diego Garcia",
269
+ "DJ": "Djibouti",
270
+ "DK": "Denmark",
271
+ "DM": "Dominica",
272
+ "DO": "Dominican Republic",
273
+ "DZ": "Algeria",
274
+ "EA": "Ceuta, Mulilla",
275
+ "EC": "Ecuador",
276
+ "EE": "Estonia",
277
+ "EG": "Egypt",
278
+ "EH": "Western Sahara",
279
+ "ER": "Eritrea",
280
+ "ES": "Spain",
281
+ "ET": "Ethiopia",
282
+ "EU": "European Union",
283
+ "FI": "Finland",
284
+ "FJ": "Fiji",
285
+ "FK": "Falkland Islands",
286
+ "FM": "Micronesia, Federated States Of",
287
+ "FO": "Faroe Islands",
288
+ "TF": "French Southern Territories",
289
+ "FR": "France",
290
+ "FX": "France, Metropolitan",
291
+ "GA": "Gabon",
292
+ "GB": "United Kingdom",
293
+ "GD": "Grenada",
294
+ "GE": "Georgia",
295
+ "GF": "French Guiana",
296
+ "GG": "Guernsey",
297
+ "GH": "Ghana",
298
+ "GI": "Gibraltar",
299
+ "GL": "Greenland",
300
+ "GM": "Gambia",
301
+ "GN": "Guinea",
302
+ "GP": "Guadeloupe",
303
+ "GQ": "Equatorial Guinea",
304
+ "GR": "Greece",
305
+ "GS": "South Georgia And The South Sandwich Islands",
306
+ "GT": "Guatemala",
307
+ "GU": "Guam",
308
+ "GW": "Guinea-bissau",
309
+ "GY": "Guyana",
310
+ "HK": "Hong Kong",
311
+ "HM": "Heard Island And McDonald Islands",
312
+ "HN": "Honduras",
313
+ "HR": "Croatia",
314
+ "HT": "Haiti",
315
+ "HU": "Hungary",
316
+ "IC": "Canary Islands",
317
+ "ID": "Indonesia",
318
+ "IE": "Ireland",
319
+ "IL": "Israel",
320
+ "IM": "Isle Of Man",
321
+ "IN": "India",
322
+ "IO": "British Indian Ocean Territory",
323
+ "IQ": "Iraq",
324
+ "IR": "Iran, Islamic Republic Of",
325
+ "IS": "Iceland",
326
+ "IT": "Italy",
327
+ "JE": "Jersey",
328
+ "JM": "Jamaica",
329
+ "JO": "Jordan",
330
+ "JP": "Japan",
331
+ "KE": "Kenya",
332
+ "KG": "Kyrgyzstan",
333
+ "KH": "Cambodia",
334
+ "KI": "Kiribati",
335
+ "KM": "Comoros",
336
+ "KN": "Saint Kitts And Nevis",
337
+ "KP": "Korea, Democratic People's Republic Of",
338
+ "KR": "Korea, Republic Of",
339
+ "KW": "Kuwait",
340
+ "KY": "Cayman Islands",
341
+ "KZ": "Kazakhstan",
342
+ "LA": "Lao People's Democratic Republic",
343
+ "LB": "Lebanon",
344
+ "LC": "Saint Lucia",
345
+ "LI": "Liechtenstein",
346
+ "LK": "Sri Lanka",
347
+ "LR": "Liberia",
348
+ "LS": "Lesotho",
349
+ "LT": "Lithuania",
350
+ "LU": "Luxembourg",
351
+ "LV": "Latvia",
352
+ "LY": "Libya",
353
+ "MA": "Morocco",
354
+ "MC": "Monaco",
355
+ "MD": "Moldova",
356
+ "ME": "Montenegro",
357
+ "MF": "Saint Martin",
358
+ "MG": "Madagascar",
359
+ "MH": "Marshall Islands",
360
+ "MK": "Macedonia, The Former Yugoslav Republic Of",
361
+ "ML": "Mali",
362
+ "MM": "Myanmar",
363
+ "MN": "Mongolia",
364
+ "MO": "Macao",
365
+ "MP": "Northern Mariana Islands",
366
+ "MQ": "Martinique",
367
+ "MR": "Mauritania",
368
+ "MS": "Montserrat",
369
+ "MT": "Malta",
370
+ "MU": "Mauritius",
371
+ "MV": "Maldives",
372
+ "MW": "Malawi",
373
+ "MX": "Mexico",
374
+ "MY": "Malaysia",
375
+ "MZ": "Mozambique",
376
+ "NA": "Namibia",
377
+ "NC": "New Caledonia",
378
+ "NE": "Niger",
379
+ "NF": "Norfolk Island",
380
+ "NG": "Nigeria",
381
+ "NI": "Nicaragua",
382
+ "NL": "Netherlands",
383
+ "NO": "Norway",
384
+ "NP": "Nepal",
385
+ "NR": "Nauru",
386
+ "NU": "Niue",
387
+ "NZ": "New Zealand",
388
+ "OM": "Oman",
389
+ "PA": "Panama",
390
+ "PE": "Peru",
391
+ "PF": "French Polynesia",
392
+ "PG": "Papua New Guinea",
393
+ "PH": "Philippines",
394
+ "PK": "Pakistan",
395
+ "PL": "Poland",
396
+ "PM": "Saint Pierre And Miquelon",
397
+ "PN": "Pitcairn",
398
+ "PR": "Puerto Rico",
399
+ "PS": "Palestinian Territory, Occupied",
400
+ "PT": "Portugal",
401
+ "PW": "Palau",
402
+ "PY": "Paraguay",
403
+ "QA": "Qatar",
404
+ "RE": "Reunion",
405
+ "RO": "Romania",
406
+ "RS": "Serbia",
407
+ "RU": "Russian Federation",
408
+ "RW": "Rwanda",
409
+ "SA": "Saudi Arabia",
410
+ "SB": "Solomon Islands",
411
+ "SC": "Seychelles",
412
+ "SD": "Sudan",
413
+ "SE": "Sweden",
414
+ "SG": "Singapore",
415
+ "SH": "Saint Helena, Ascension And Tristan Da Cunha",
416
+ "SI": "Slovenia",
417
+ "SJ": "Svalbard And Jan Mayen",
418
+ "SK": "Slovakia",
419
+ "SL": "Sierra Leone",
420
+ "SM": "San Marino",
421
+ "SN": "Senegal",
422
+ "SO": "Somalia",
423
+ "SR": "Suriname",
424
+ "SS": "South Sudan",
425
+ "ST": "Sao Tome and Principe",
426
+ "SU": "USSR",
427
+ "SV": "El Salvador",
428
+ "SX": "Sint Maarten",
429
+ "SY": "Syrian Arab Republic",
430
+ "SZ": "Swaziland",
431
+ "TA": "Tristan de Cunha",
432
+ "TC": "Turks And Caicos Islands",
433
+ "TD": "Chad",
434
+ "TG": "Togo",
435
+ "TH": "Thailand",
436
+ "TJ": "Tajikistan",
437
+ "TK": "Tokelau",
438
+ "TL": "Timor-Leste, Democratic Republic of",
439
+ "TM": "Turkmenistan",
440
+ "TN": "Tunisia",
441
+ "TO": "Tonga",
442
+ "TR": "Turkey",
443
+ "TT": "Trinidad And Tobago",
444
+ "TV": "Tuvalu",
445
+ "TW": "Taiwan",
446
+ "TZ": "Tanzania, United Republic Of",
447
+ "UA": "Ukraine",
448
+ "UG": "Uganda",
449
+ "UK": "United Kingdom",
450
+ "UM": "United States Minor Outlying Islands",
451
+ "US": "United States",
452
+ "UY": "Uruguay",
453
+ "UZ": "Uzbekistan",
454
+ "VA": "Vatican City State",
455
+ "VC": "Saint Vincent And The Grenadines",
456
+ "VE": "Venezuela, Bolivarian Republic Of",
457
+ "VG": "Virgin Islands (British)",
458
+ "VI": "Virgin Islands (US)",
459
+ "VN": "Viet Nam",
460
+ "VU": "Vanuatu",
461
+ "WF": "Wallis And Futuna",
462
+ "WS": "Samoa",
463
+ "XK": "Kosovo",
464
+ "YE": "Yemen",
465
+ "YT": "Mayotte",
466
+ "ZA": "South Africa",
467
+ "ZM": "Zambia",
468
+ "ZW": "Zimbabwe"
469
+ }
470
+
471
+ service.countryNames = Object.values(service.countryLookup);
472
+
473
+ service.timezones = [
474
+ "Africa/Abidjan",
475
+ "Africa/Accra",
476
+ "Africa/Addis_Ababa",
477
+ "Africa/Algiers",
478
+ "Africa/Asmera",
479
+ "Africa/Bamako",
480
+ "Africa/Bangui",
481
+ "Africa/Banjul",
482
+ "Africa/Bissau",
483
+ "Africa/Blantyre",
484
+ "Africa/Brazzaville",
485
+ "Africa/Bujumbura",
486
+ "Africa/Cairo",
487
+ "Africa/Casablanca",
488
+ "Africa/Ceuta",
489
+ "Africa/Conakry",
490
+ "Africa/Dakar",
491
+ "Africa/Dar_es_Salaam",
492
+ "Africa/Djibouti",
493
+ "Africa/Douala",
494
+ "Africa/El_Aaiun",
495
+ "Africa/Freetown",
496
+ "Africa/Gaborone",
497
+ "Africa/Harare",
498
+ "Africa/Johannesburg",
499
+ "Africa/Juba",
500
+ "Africa/Kampala",
501
+ "Africa/Khartoum",
502
+ "Africa/Kigali",
503
+ "Africa/Kinshasa",
504
+ "Africa/Lagos",
505
+ "Africa/Libreville",
506
+ "Africa/Lome",
507
+ "Africa/Luanda",
508
+ "Africa/Lubumbashi",
509
+ "Africa/Lusaka",
510
+ "Africa/Malabo",
511
+ "Africa/Maputo",
512
+ "Africa/Maseru",
513
+ "Africa/Mbabane",
514
+ "Africa/Mogadishu",
515
+ "Africa/Monrovia",
516
+ "Africa/Nairobi",
517
+ "Africa/Ndjamena",
518
+ "Africa/Niamey",
519
+ "Africa/Nouakchott",
520
+ "Africa/Ouagadougou",
521
+ "Africa/Porto-Novo",
522
+ "Africa/Sao_Tome",
523
+ "Africa/Tripoli",
524
+ "Africa/Tunis",
525
+ "Africa/Windhoek",
526
+ "America/Anchorage",
527
+ "America/Anguilla",
528
+ "America/Antigua",
529
+ "America/Araguaina",
530
+ "America/Argentina/La_Rioja",
531
+ "America/Argentina/Rio_Gallegos",
532
+ "America/Argentina/Salta",
533
+ "America/Argentina/San_Juan",
534
+ "America/Argentina/San_Luis",
535
+ "America/Argentina/Tucuman",
536
+ "America/Argentina/Ushuaia",
537
+ "America/Aruba",
538
+ "America/Asuncion",
539
+ "America/Bahia",
540
+ "America/Bahia_Banderas",
541
+ "America/Barbados",
542
+ "America/Belem",
543
+ "America/Belize",
544
+ "America/Blanc-Sablon",
545
+ "America/Boa_Vista",
546
+ "America/Bogota",
547
+ "America/Boise",
548
+ "America/Buenos_Aires",
549
+ "America/Cambridge_Bay",
550
+ "America/Campo_Grande",
551
+ "America/Cancun",
552
+ "America/Caracas",
553
+ "America/Catamarca",
554
+ "America/Cayenne",
555
+ "America/Cayman",
556
+ "America/Chicago",
557
+ "America/Chihuahua",
558
+ "America/Coral_Harbour",
559
+ "America/Cordoba",
560
+ "America/Costa_Rica",
561
+ "America/Creston",
562
+ "America/Cuiaba",
563
+ "America/Curacao",
564
+ "America/Danmarkshavn",
565
+ "America/Dawson",
566
+ "America/Dawson_Creek",
567
+ "America/Denver",
568
+ "America/Detroit",
569
+ "America/Dominica",
570
+ "America/Edmonton",
571
+ "America/Eirunepe",
572
+ "America/El_Salvador",
573
+ "America/Fortaleza",
574
+ "America/Glace_Bay",
575
+ "America/Godthab",
576
+ "America/Goose_Bay",
577
+ "America/Grand_Turk",
578
+ "America/Grenada",
579
+ "America/Guadeloupe",
580
+ "America/Guatemala",
581
+ "America/Guayaquil",
582
+ "America/Guyana",
583
+ "America/Halifax",
584
+ "America/Havana",
585
+ "America/Hermosillo",
586
+ "America/Indiana/Knox",
587
+ "America/Indiana/Marengo",
588
+ "America/Indiana/Petersburg",
589
+ "America/Indiana/Tell_City",
590
+ "America/Indiana/Vevay",
591
+ "America/Indiana/Vincennes",
592
+ "America/Indiana/Winamac",
593
+ "America/Indianapolis",
594
+ "America/Inuvik",
595
+ "America/Iqaluit",
596
+ "America/Jamaica",
597
+ "America/Jujuy",
598
+ "America/Juneau",
599
+ "America/Kentucky/Monticello",
600
+ "America/Kralendijk",
601
+ "America/La_Paz",
602
+ "America/Lima",
603
+ "America/Los_Angeles",
604
+ "America/Louisville",
605
+ "America/Lower_Princes",
606
+ "America/Maceio",
607
+ "America/Managua",
608
+ "America/Manaus",
609
+ "America/Marigot",
610
+ "America/Martinique",
611
+ "America/Matamoros",
612
+ "America/Mazatlan",
613
+ "America/Mendoza",
614
+ "America/Menominee",
615
+ "America/Merida",
616
+ "America/Mexico_City",
617
+ "America/Moncton",
618
+ "America/Monterrey",
619
+ "America/Montevideo",
620
+ "America/Montreal",
621
+ "America/Montserrat",
622
+ "America/Nassau",
623
+ "America/New_York",
624
+ "America/Nipigon",
625
+ "America/Nome",
626
+ "America/Noronha",
627
+ "America/North_Dakota/Beulah",
628
+ "America/North_Dakota/Center",
629
+ "America/North_Dakota/New_Salem",
630
+ "America/Ojinaga",
631
+ "America/Panama",
632
+ "America/Pangnirtung",
633
+ "America/Paramaribo",
634
+ "America/Phoenix",
635
+ "America/Port-au-Prince",
636
+ "America/Port_of_Spain",
637
+ "America/Porto_Velho",
638
+ "America/Puerto_Rico",
639
+ "America/Rainy_River",
640
+ "America/Rankin_Inlet",
641
+ "America/Recife",
642
+ "America/Regina",
643
+ "America/Resolute",
644
+ "America/Rio_Branco",
645
+ "America/Santa_Isabel",
646
+ "America/Santarem",
647
+ "America/Santiago",
648
+ "America/Santo_Domingo",
649
+ "America/Sao_Paulo",
650
+ "America/Scoresbysund",
651
+ "America/Sitka",
652
+ "America/St_Barthelemy",
653
+ "America/St_Johns",
654
+ "America/St_Kitts",
655
+ "America/St_Lucia",
656
+ "America/St_Thomas",
657
+ "America/St_Vincent",
658
+ "America/Swift_Current",
659
+ "America/Tegucigalpa",
660
+ "America/Thule",
661
+ "America/Thunder_Bay",
662
+ "America/Tijuana",
663
+ "America/Toronto",
664
+ "America/Tortola",
665
+ "America/Vancouver",
666
+ "America/Whitehorse",
667
+ "America/Winnipeg",
668
+ "America/Yakutat",
669
+ "America/Yellowknife",
670
+ "Antarctica/Casey",
671
+ "Antarctica/Davis",
672
+ "Antarctica/DumontDUrville",
673
+ "Antarctica/Macquarie",
674
+ "Antarctica/Mawson",
675
+ "Antarctica/McMurdo",
676
+ "Antarctica/Palmer",
677
+ "Antarctica/Rothera",
678
+ "Antarctica/Syowa",
679
+ "Antarctica/Vostok",
680
+ "Arctic/Longyearbyen",
681
+ "Asia/Aden",
682
+ "Asia/Almaty",
683
+ "Asia/Amman",
684
+ "Asia/Anadyr",
685
+ "Asia/Aqtau",
686
+ "Asia/Aqtobe",
687
+ "Asia/Ashgabat",
688
+ "Asia/Baghdad",
689
+ "Asia/Bahrain",
690
+ "Asia/Baku",
691
+ "Asia/Bangkok",
692
+ "Asia/Beirut",
693
+ "Asia/Bishkek",
694
+ "Asia/Brunei",
695
+ "Asia/Calcutta",
696
+ "Asia/Chita",
697
+ "Asia/Choibalsan",
698
+ "Asia/Colombo",
699
+ "Asia/Damascus",
700
+ "Asia/Dhaka",
701
+ "Asia/Dili",
702
+ "Asia/Dubai",
703
+ "Asia/Dushanbe",
704
+ "Asia/Hong_Kong",
705
+ "Asia/Hovd",
706
+ "Asia/Irkutsk",
707
+ "Asia/Jakarta",
708
+ "Asia/Jayapura",
709
+ "Asia/Jerusalem",
710
+ "Asia/Kabul",
711
+ "Asia/Kamchatka",
712
+ "Asia/Karachi",
713
+ "Asia/Kathmandu",
714
+ "Asia/Khandyga",
715
+ "Asia/Kolkata",
716
+ "Asia/Krasnoyarsk",
717
+ "Asia/Kuala_Lumpur",
718
+ "Asia/Kuching",
719
+ "Asia/Kuwait",
720
+ "Asia/Macau",
721
+ "Asia/Magadan",
722
+ "Asia/Makassar",
723
+ "Asia/Manila",
724
+ "Asia/Muscat",
725
+ "Asia/Nicosia",
726
+ "Asia/Novokuznetsk",
727
+ "Asia/Novosibirsk",
728
+ "Asia/Omsk",
729
+ "Asia/Oral",
730
+ "Asia/Phnom_Penh",
731
+ "Asia/Pontianak",
732
+ "Asia/Pyongyang",
733
+ "Asia/Qatar",
734
+ "Asia/Qyzylorda",
735
+ "Asia/Rangoon",
736
+ "Asia/Riyadh",
737
+ "Asia/Saigon",
738
+ "Asia/Sakhalin",
739
+ "Asia/Samarkand",
740
+ "Asia/Seoul",
741
+ "Asia/Shanghai",
742
+ "Asia/Singapore",
743
+ "Asia/Srednekolymsk",
744
+ "Asia/Taipei",
745
+ "Asia/Tashkent",
746
+ "Asia/Tbilisi",
747
+ "Asia/Tehran",
748
+ "Asia/Thimphu",
749
+ "Asia/Tokyo",
750
+ "Asia/Ulaanbaatar",
751
+ "Asia/Urumqi",
752
+ "Asia/Ust-Nera",
753
+ "Asia/Vientiane",
754
+ "Asia/Vladivostok",
755
+ "Asia/Yakutsk",
756
+ "Asia/Yekaterinburg",
757
+ "Asia/Yerevan",
758
+ "Atlantic/Azores",
759
+ "Atlantic/Bermuda",
760
+ "Atlantic/Canary",
761
+ "Atlantic/Cape_Verde",
762
+ "Atlantic/Faeroe",
763
+ "Atlantic/Madeira",
764
+ "Atlantic/Reykjavik",
765
+ "Atlantic/South_Georgia",
766
+ "Atlantic/St_Helena",
767
+ "Atlantic/Stanley",
768
+ "Australia/Adelaide",
769
+ "Australia/Brisbane",
770
+ "Australia/Broken_Hill",
771
+ "Australia/Currie",
772
+ "Australia/Darwin",
773
+ "Australia/Hobart",
774
+ "Australia/Lindeman",
775
+ "Australia/Melbourne",
776
+ "Australia/Perth",
777
+ "Australia/Sydney",
778
+ "CST6CDT",
779
+ "EST5EDT",
780
+ "Etc/GMT",
781
+ "Etc/GMT+1",
782
+ "Etc/GMT+10",
783
+ "Etc/GMT+11",
784
+ "Etc/GMT+12",
785
+ "Etc/GMT+2",
786
+ "Etc/GMT+3",
787
+ "Etc/GMT+4",
788
+ "Etc/GMT+5",
789
+ "Etc/GMT+6",
790
+ "Etc/GMT+7",
791
+ "Etc/GMT-1",
792
+ "Etc/GMT-10",
793
+ "Etc/GMT-11",
794
+ "Etc/GMT-12",
795
+ "Etc/GMT-13",
796
+ "Etc/GMT-2",
797
+ "Etc/GMT-3",
798
+ "Etc/GMT-4",
799
+ "Etc/GMT-5",
800
+ "Etc/GMT-6",
801
+ "Etc/GMT-7",
802
+ "Etc/GMT-8",
803
+ "Etc/GMT-9",
804
+ "Europe/Amsterdam",
805
+ "Europe/Andorra",
806
+ "Europe/Astrakhan",
807
+ "Europe/Athens",
808
+ "Europe/Belgrade",
809
+ "Europe/Berlin",
810
+ "Europe/Bratislava",
811
+ "Europe/Brussels",
812
+ "Europe/Bucharest",
813
+ "Europe/Budapest",
814
+ "Europe/Busingen",
815
+ "Europe/Chisinau",
816
+ "Europe/Copenhagen",
817
+ "Europe/Dublin",
818
+ "Europe/Gibraltar",
819
+ "Europe/Guernsey",
820
+ "Europe/Helsinki",
821
+ "Europe/Isle_of_Man",
822
+ "Europe/Istanbul",
823
+ "Europe/Jersey",
824
+ "Europe/Kaliningrad",
825
+ "Europe/Kiev",
826
+ "Europe/Kirov",
827
+ "Europe/Lisbon",
828
+ "Europe/Ljubljana",
829
+ "Europe/London",
830
+ "Europe/Luxembourg",
831
+ "Europe/Madrid",
832
+ "Europe/Malta",
833
+ "Europe/Mariehamn",
834
+ "Europe/Minsk",
835
+ "Europe/Monaco",
836
+ "Europe/Moscow",
837
+ "Europe/Nicosia",
838
+ "Europe/Oslo",
839
+ "Europe/Paris",
840
+ "Europe/Podgorica",
841
+ "Europe/Prague",
842
+ "Europe/Riga",
843
+ "Europe/Rome",
844
+ "Europe/Samara",
845
+ "Europe/San_Marino",
846
+ "Europe/Sarajevo",
847
+ "Europe/Simferopol",
848
+ "Europe/Skopje",
849
+ "Europe/Sofia",
850
+ "Europe/Stockholm",
851
+ "Europe/Tallinn",
852
+ "Europe/Tirane",
853
+ "Europe/Ulyanovsk",
854
+ "Europe/Uzhgorod",
855
+ "Europe/Vaduz",
856
+ "Europe/Vatican",
857
+ "Europe/Vienna",
858
+ "Europe/Vilnius",
859
+ "Europe/Volgograd",
860
+ "Europe/Warsaw",
861
+ "Europe/Zagreb",
862
+ "Europe/Zaporozhye",
863
+ "Europe/Zurich",
864
+ "Indian/Antananarivo",
865
+ "Indian/Chagos",
866
+ "Indian/Christmas",
867
+ "Indian/Cocos",
868
+ "Indian/Comoro",
869
+ "Indian/Kerguelen",
870
+ "Indian/Mahe",
871
+ "Indian/Maldives",
872
+ "Indian/Mauritius",
873
+ "Indian/Mayotte",
874
+ "Indian/Reunion",
875
+ "MST7MDT",
876
+ "PST8PDT",
877
+ "Pacific/Apia",
878
+ "Pacific/Auckland",
879
+ "Pacific/Efate",
880
+ "Pacific/Enderbury",
881
+ "Pacific/Fakaofo",
882
+ "Pacific/Fiji",
883
+ "Pacific/Funafuti",
884
+ "Pacific/Galapagos",
885
+ "Pacific/Guadalcanal",
886
+ "Pacific/Guam",
887
+ "Pacific/Honolulu",
888
+ "Pacific/Johnston",
889
+ "Pacific/Kosrae",
890
+ "Pacific/Kwajalein",
891
+ "Pacific/Majuro",
892
+ "Pacific/Midway",
893
+ "Pacific/Nauru",
894
+ "Pacific/Niue",
895
+ "Pacific/Noumea",
896
+ "Pacific/Pago_Pago",
897
+ "Pacific/Palau",
898
+ "Pacific/Ponape",
899
+ "Pacific/Port_Moresby",
900
+ "Pacific/Rarotonga",
901
+ "Pacific/Saipan",
902
+ "Pacific/Tahiti",
903
+ "Pacific/Tarawa",
904
+ "Pacific/Tongatapu",
905
+ "Pacific/Truk",
906
+ "Pacific/Wake",
907
+ "Pacific/Wallis",
908
+ ]
909
+
910
+ /**
911
+ *
912
+ * Retrieves the default country for the current user/application
913
+ * will attempt to retrieve the country from the user or application's organisation or from services available within the browser
914
+ * @alias geo.getDefaultCountry
915
+ * @example
916
+ * const result = sdk.geo.getDefaultCountry()
917
+ * // Would return something similar to:
918
+ * // { code:'AU', name:'Australia' }
919
+ */
920
+ service.getDefaultCountry = function() {
921
+ const {session:currentUser} = qik.auth.getCurrentUser();
922
+
923
+ if(currentUser) {
924
+ const code = currentUser?.organisation?.countryCode;
925
+ if(code) {
926
+ const name = service.countryLookup[code];
927
+ return {
928
+ code,
929
+ name
930
+ };
931
+ }
932
+ }
933
+ }
934
+
935
+ ///////////////////////////////////////////////////
936
+
937
+ return service;
938
+
939
+ }</code></pre>
940
+ </article>
941
+ </section>
942
+
943
+
944
+
945
+
946
+
947
+
948
+ </div>
949
+
950
+ <br class="clear">
951
+
952
+ <footer>
953
+ Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.11</a> on Mon Jul 13 2026 18:47:22 GMT+1000 (Australian Eastern Standard Time) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
954
+ </footer>
955
+
956
+ <script>prettyPrint();</script>
957
+ <script src="scripts/polyfill.js"></script>
958
+ <script src="scripts/linenumber.js"></script>
959
+
960
+
961
+
962
+ </body>
963
+ </html>