@leanbase.com/js 0.1.3 → 0.2.0-alpha.0
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.
- package/LICENSE +37 -0
- package/dist/autocapture-utils.d.ts +17 -0
- package/dist/autocapture.d.ts +35 -0
- package/dist/config.d.ts +5 -0
- package/dist/constants.d.ts +54 -0
- package/dist/entrypoints/main.cjs.d.ts +4 -0
- package/dist/entrypoints/module.es.d.ts +4 -0
- package/dist/extensions/rageclick.d.ts +9 -0
- package/dist/iife.d.ts +19 -0
- package/dist/index.d.ts +2 -779
- package/dist/leanbase-logger.d.ts +6 -0
- package/dist/leanbase-persistence.d.ts +64 -0
- package/dist/leanbase.d.ts +49 -0
- package/dist/leanbase.iife.js +1 -4747
- package/dist/leanbase.iife.js.map +1 -1
- package/dist/main.js +2 -0
- package/dist/main.js.map +1 -0
- package/dist/module.d.ts +780 -0
- package/dist/module.js +2 -0
- package/dist/module.js.map +1 -0
- package/dist/page-view.d.ts +29 -0
- package/dist/scroll-manager.d.ts +21 -0
- package/dist/session-props.d.ts +32 -0
- package/dist/sessionid.d.ts +50 -0
- package/dist/storage.d.ts +24 -0
- package/{src/types.ts → dist/types.d.ts} +145 -235
- package/dist/utils/blocked-uas.d.ts +17 -0
- package/dist/utils/element-utils.d.ts +5 -0
- package/dist/utils/event-utils.d.ts +22 -0
- package/dist/utils/index.d.ts +44 -0
- package/dist/utils/request-utils.d.ts +12 -0
- package/dist/utils/simple-event-emitter.d.ts +6 -0
- package/dist/utils/user-agent-utils.d.ts +18 -0
- package/dist/uuidv7.d.ts +43 -0
- package/dist/version.d.ts +1 -0
- package/lib/autocapture-utils.d.ts +17 -0
- package/{src/autocapture-utils.ts → lib/autocapture-utils.js} +196 -280
- package/lib/autocapture-utils.js.map +1 -0
- package/lib/autocapture.d.ts +35 -0
- package/lib/autocapture.js +311 -0
- package/lib/autocapture.js.map +1 -0
- package/lib/config.d.ts +5 -0
- package/lib/config.js +7 -0
- package/lib/config.js.map +1 -0
- package/lib/constants.d.ts +54 -0
- package/{src/constants.ts → lib/constants.js} +50 -57
- package/lib/constants.js.map +1 -0
- package/lib/entrypoints/main.cjs.d.ts +4 -0
- package/lib/entrypoints/main.cjs.js +3 -0
- package/lib/entrypoints/main.cjs.js.map +1 -0
- package/lib/entrypoints/module.es.d.ts +4 -0
- package/lib/entrypoints/module.es.js +3 -0
- package/lib/entrypoints/module.es.js.map +1 -0
- package/lib/extensions/rageclick.d.ts +9 -0
- package/lib/extensions/rageclick.js +27 -0
- package/lib/extensions/rageclick.js.map +1 -0
- package/lib/iife.d.ts +19 -0
- package/lib/iife.js +67 -0
- package/lib/iife.js.map +1 -0
- package/{src/index.ts → lib/index.d.ts} +2 -2
- package/lib/index.js +2 -0
- package/lib/index.js.map +1 -0
- package/lib/leanbase-logger.d.ts +6 -0
- package/lib/leanbase-logger.js +25 -0
- package/lib/leanbase-logger.js.map +1 -0
- package/lib/leanbase-persistence.d.ts +64 -0
- package/lib/leanbase-persistence.js +287 -0
- package/lib/leanbase-persistence.js.map +1 -0
- package/lib/leanbase.d.ts +49 -0
- package/lib/leanbase.js +294 -0
- package/lib/leanbase.js.map +1 -0
- package/lib/page-view.d.ts +29 -0
- package/lib/page-view.js +81 -0
- package/lib/page-view.js.map +1 -0
- package/lib/scroll-manager.d.ts +21 -0
- package/lib/scroll-manager.js +79 -0
- package/lib/scroll-manager.js.map +1 -0
- package/lib/session-props.d.ts +32 -0
- package/lib/session-props.js +73 -0
- package/lib/session-props.js.map +1 -0
- package/lib/sessionid.d.ts +50 -0
- package/{src/sessionid.ts → lib/sessionid.js} +128 -204
- package/lib/sessionid.js.map +1 -0
- package/lib/storage.d.ts +24 -0
- package/{src/storage.ts → lib/storage.js} +182 -225
- package/lib/storage.js.map +1 -0
- package/lib/types.d.ts +544 -0
- package/lib/types.js +7 -0
- package/lib/types.js.map +1 -0
- package/lib/utils/blocked-uas.d.ts +17 -0
- package/{src/utils/blocked-uas.ts → lib/utils/blocked-uas.js} +19 -48
- package/lib/utils/blocked-uas.js.map +1 -0
- package/lib/utils/element-utils.d.ts +5 -0
- package/{src/utils/element-utils.ts → lib/utils/element-utils.js} +13 -17
- package/lib/utils/element-utils.js.map +1 -0
- package/lib/utils/event-utils.d.ts +22 -0
- package/lib/utils/event-utils.js +258 -0
- package/lib/utils/event-utils.js.map +1 -0
- package/lib/utils/index.d.ts +44 -0
- package/lib/utils/index.js +183 -0
- package/lib/utils/index.js.map +1 -0
- package/lib/utils/request-utils.d.ts +12 -0
- package/lib/utils/request-utils.js +107 -0
- package/lib/utils/request-utils.js.map +1 -0
- package/lib/utils/simple-event-emitter.d.ts +6 -0
- package/lib/utils/simple-event-emitter.js +24 -0
- package/lib/utils/simple-event-emitter.js.map +1 -0
- package/lib/utils/user-agent-utils.d.ts +18 -0
- package/lib/utils/user-agent-utils.js +369 -0
- package/lib/utils/user-agent-utils.js.map +1 -0
- package/lib/uuidv7.d.ts +43 -0
- package/{src/uuidv7.ts → lib/uuidv7.js} +103 -131
- package/lib/uuidv7.js.map +1 -0
- package/lib/version.d.ts +1 -0
- package/lib/version.js +2 -0
- package/lib/version.js.map +1 -0
- package/package.json +56 -45
- package/dist/index.cjs +0 -3034
- package/dist/index.cjs.map +0 -1
- package/dist/index.mjs +0 -3032
- package/dist/index.mjs.map +0 -1
- package/src/autocapture.ts +0 -415
- package/src/config.ts +0 -8
- package/src/extensions/rageclick.ts +0 -34
- package/src/iife.ts +0 -87
- package/src/leanbase-logger.ts +0 -26
- package/src/leanbase-persistence.ts +0 -374
- package/src/leanbase.ts +0 -424
- package/src/page-view.ts +0 -124
- package/src/scroll-manager.ts +0 -103
- package/src/session-props.ts +0 -114
- package/src/utils/event-utils.ts +0 -304
- package/src/utils/index.ts +0 -222
- package/src/utils/request-utils.ts +0 -128
- package/src/utils/simple-event-emitter.ts +0 -27
- package/src/utils/user-agent-utils.ts +0 -357
- package/src/version.ts +0 -1
|
@@ -1,26 +1,15 @@
|
|
|
1
|
-
import { extend } from './utils'
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
SESSION_ID,
|
|
8
|
-
SESSION_RECORDING_IS_SAMPLED,
|
|
9
|
-
} from './constants'
|
|
10
|
-
|
|
11
|
-
import { isNull, isUndefined } from '@posthog/core'
|
|
12
|
-
import { window, document } from './utils'
|
|
13
|
-
import { logger } from './leanbase-logger'
|
|
14
|
-
import { uuidv7 } from './uuidv7'
|
|
15
|
-
|
|
1
|
+
import { extend } from './utils';
|
|
2
|
+
import { DISTINCT_ID, ENABLE_PERSON_PROCESSING, INITIAL_PERSON_INFO, SESSION_ID, SESSION_RECORDING_IS_SAMPLED, } from './constants';
|
|
3
|
+
import { isNull, isUndefined } from '@posthog/core';
|
|
4
|
+
import { window, document } from './utils';
|
|
5
|
+
import { logger } from './leanbase-logger';
|
|
6
|
+
import { uuidv7 } from './uuidv7';
|
|
16
7
|
// we store the discovered subdomain in memory because it might be read multiple times
|
|
17
|
-
let firstNonPublicSubDomain = ''
|
|
18
|
-
|
|
8
|
+
let firstNonPublicSubDomain = '';
|
|
19
9
|
// helper to allow tests to clear this "cache"
|
|
20
10
|
export const resetSubDomainCache = () => {
|
|
21
|
-
firstNonPublicSubDomain = ''
|
|
22
|
-
}
|
|
23
|
-
|
|
11
|
+
firstNonPublicSubDomain = '';
|
|
12
|
+
};
|
|
24
13
|
/**
|
|
25
14
|
* Browsers don't offer a way to check if something is a public suffix
|
|
26
15
|
* e.g. `.com.au`, `.io`, `.org.uk`
|
|
@@ -34,227 +23,202 @@ export const resetSubDomainCache = () => {
|
|
|
34
23
|
*
|
|
35
24
|
* inspired by https://github.com/AngusFu/browser-root-domain
|
|
36
25
|
*/
|
|
37
|
-
export function seekFirstNonPublicSubDomain(hostname
|
|
26
|
+
export function seekFirstNonPublicSubDomain(hostname, cookieJar = document) {
|
|
38
27
|
if (firstNonPublicSubDomain) {
|
|
39
|
-
return firstNonPublicSubDomain
|
|
28
|
+
return firstNonPublicSubDomain;
|
|
40
29
|
}
|
|
41
|
-
|
|
42
30
|
if (!cookieJar) {
|
|
43
|
-
return ''
|
|
31
|
+
return '';
|
|
44
32
|
}
|
|
45
|
-
if (['localhost', '127.0.0.1'].includes(hostname))
|
|
46
|
-
|
|
47
|
-
const list = hostname.split('.')
|
|
48
|
-
let len = Math.min(list.length, 8) // paranoia - we know this number should be small
|
|
49
|
-
const key = 'dmn_chk_' + uuidv7()
|
|
50
|
-
|
|
33
|
+
if (['localhost', '127.0.0.1'].includes(hostname))
|
|
34
|
+
return '';
|
|
35
|
+
const list = hostname.split('.');
|
|
36
|
+
let len = Math.min(list.length, 8); // paranoia - we know this number should be small
|
|
37
|
+
const key = 'dmn_chk_' + uuidv7();
|
|
51
38
|
while (!firstNonPublicSubDomain && len--) {
|
|
52
|
-
const candidate = list.slice(len).join('.')
|
|
53
|
-
const candidateCookieValue = key + '=1;domain=.' + candidate + ';path=/'
|
|
54
|
-
|
|
39
|
+
const candidate = list.slice(len).join('.');
|
|
40
|
+
const candidateCookieValue = key + '=1;domain=.' + candidate + ';path=/';
|
|
55
41
|
// try to set cookie, include a short expiry in seconds since we'll check immediately
|
|
56
|
-
cookieJar.cookie = candidateCookieValue + ';max-age=3'
|
|
57
|
-
|
|
42
|
+
cookieJar.cookie = candidateCookieValue + ';max-age=3';
|
|
58
43
|
if (cookieJar.cookie.includes(key)) {
|
|
59
44
|
// the cookie was accepted by the browser, remove the test cookie
|
|
60
|
-
cookieJar.cookie = candidateCookieValue + ';max-age=0'
|
|
61
|
-
firstNonPublicSubDomain = candidate
|
|
45
|
+
cookieJar.cookie = candidateCookieValue + ';max-age=0';
|
|
46
|
+
firstNonPublicSubDomain = candidate;
|
|
62
47
|
}
|
|
63
48
|
}
|
|
64
|
-
|
|
65
|
-
return firstNonPublicSubDomain
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
const DOMAIN_MATCH_REGEX = /[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i
|
|
69
|
-
const originalCookieDomainFn = (hostname: string): string => {
|
|
70
|
-
const matches = hostname.match(DOMAIN_MATCH_REGEX)
|
|
71
|
-
return matches ? matches[0] : ''
|
|
49
|
+
return firstNonPublicSubDomain;
|
|
72
50
|
}
|
|
73
|
-
|
|
74
|
-
|
|
51
|
+
const DOMAIN_MATCH_REGEX = /[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;
|
|
52
|
+
const originalCookieDomainFn = (hostname) => {
|
|
53
|
+
const matches = hostname.match(DOMAIN_MATCH_REGEX);
|
|
54
|
+
return matches ? matches[0] : '';
|
|
55
|
+
};
|
|
56
|
+
export function chooseCookieDomain(hostname, cross_subdomain) {
|
|
75
57
|
if (cross_subdomain) {
|
|
76
58
|
// NOTE: Could we use this for cross domain tracking?
|
|
77
|
-
let matchedSubDomain = seekFirstNonPublicSubDomain(hostname)
|
|
78
|
-
|
|
59
|
+
let matchedSubDomain = seekFirstNonPublicSubDomain(hostname);
|
|
79
60
|
if (!matchedSubDomain) {
|
|
80
|
-
const originalMatch = originalCookieDomainFn(hostname)
|
|
61
|
+
const originalMatch = originalCookieDomainFn(hostname);
|
|
81
62
|
if (originalMatch !== matchedSubDomain) {
|
|
82
|
-
logger.info('Warning: cookie subdomain discovery mismatch', originalMatch, matchedSubDomain)
|
|
63
|
+
logger.info('Warning: cookie subdomain discovery mismatch', originalMatch, matchedSubDomain);
|
|
83
64
|
}
|
|
84
|
-
matchedSubDomain = originalMatch
|
|
65
|
+
matchedSubDomain = originalMatch;
|
|
85
66
|
}
|
|
86
|
-
|
|
87
|
-
return matchedSubDomain ? '; domain=.' + matchedSubDomain : ''
|
|
67
|
+
return matchedSubDomain ? '; domain=.' + matchedSubDomain : '';
|
|
88
68
|
}
|
|
89
|
-
return ''
|
|
69
|
+
return '';
|
|
90
70
|
}
|
|
91
|
-
|
|
92
71
|
// Methods partially borrowed from quirksmode.org/js/cookies.html
|
|
93
|
-
export const cookieStore
|
|
72
|
+
export const cookieStore = {
|
|
94
73
|
_is_supported: () => !!document,
|
|
95
|
-
|
|
96
74
|
_error: function (msg) {
|
|
97
|
-
logger.error('cookieStore error: ' + msg)
|
|
75
|
+
logger.error('cookieStore error: ' + msg);
|
|
98
76
|
},
|
|
99
|
-
|
|
100
77
|
_get: function (name) {
|
|
101
78
|
if (!document) {
|
|
102
|
-
return
|
|
79
|
+
return;
|
|
103
80
|
}
|
|
104
|
-
|
|
105
81
|
try {
|
|
106
|
-
const nameEQ = name + '='
|
|
107
|
-
const ca = document.cookie.split(';').filter((x) => x.length)
|
|
82
|
+
const nameEQ = name + '=';
|
|
83
|
+
const ca = document.cookie.split(';').filter((x) => x.length);
|
|
108
84
|
for (let i = 0; i < ca.length; i++) {
|
|
109
|
-
let c = ca[i]
|
|
85
|
+
let c = ca[i];
|
|
110
86
|
while (c.charAt(0) == ' ') {
|
|
111
|
-
c = c.substring(1, c.length)
|
|
87
|
+
c = c.substring(1, c.length);
|
|
112
88
|
}
|
|
113
89
|
if (c.indexOf(nameEQ) === 0) {
|
|
114
|
-
return decodeURIComponent(c.substring(nameEQ.length, c.length))
|
|
90
|
+
return decodeURIComponent(c.substring(nameEQ.length, c.length));
|
|
115
91
|
}
|
|
116
92
|
}
|
|
117
|
-
}
|
|
118
|
-
|
|
93
|
+
}
|
|
94
|
+
catch { }
|
|
95
|
+
return null;
|
|
119
96
|
},
|
|
120
|
-
|
|
121
97
|
_parse: function (name) {
|
|
122
|
-
let cookie
|
|
98
|
+
let cookie;
|
|
123
99
|
try {
|
|
124
|
-
cookie = JSON.parse(cookieStore._get(name)) || {}
|
|
125
|
-
}
|
|
100
|
+
cookie = JSON.parse(cookieStore._get(name)) || {};
|
|
101
|
+
}
|
|
102
|
+
catch {
|
|
126
103
|
// noop
|
|
127
104
|
}
|
|
128
|
-
return cookie
|
|
105
|
+
return cookie;
|
|
129
106
|
},
|
|
130
|
-
|
|
131
107
|
_set: function (name, value, days, cross_subdomain, is_secure) {
|
|
132
108
|
if (!document) {
|
|
133
|
-
return
|
|
109
|
+
return;
|
|
134
110
|
}
|
|
135
111
|
try {
|
|
136
|
-
let expires = '',
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
const cdomain = chooseCookieDomain(document.location.hostname, cross_subdomain)
|
|
140
|
-
|
|
112
|
+
let expires = '', secure = '';
|
|
113
|
+
const cdomain = chooseCookieDomain(document.location.hostname, cross_subdomain);
|
|
141
114
|
if (days) {
|
|
142
|
-
const date = new Date()
|
|
143
|
-
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000)
|
|
144
|
-
expires = '; expires=' + date.toUTCString()
|
|
115
|
+
const date = new Date();
|
|
116
|
+
date.setTime(date.getTime() + days * 24 * 60 * 60 * 1000);
|
|
117
|
+
expires = '; expires=' + date.toUTCString();
|
|
145
118
|
}
|
|
146
|
-
|
|
147
119
|
if (is_secure) {
|
|
148
|
-
secure = '; secure'
|
|
120
|
+
secure = '; secure';
|
|
149
121
|
}
|
|
150
|
-
|
|
151
|
-
const new_cookie_val =
|
|
152
|
-
name +
|
|
122
|
+
const new_cookie_val = name +
|
|
153
123
|
'=' +
|
|
154
124
|
encodeURIComponent(JSON.stringify(value)) +
|
|
155
125
|
expires +
|
|
156
126
|
'; SameSite=Lax; path=/' +
|
|
157
127
|
cdomain +
|
|
158
|
-
secure
|
|
159
|
-
|
|
128
|
+
secure;
|
|
160
129
|
// 4096 bytes is the size at which some browsers (e.g. firefox) will not store a cookie, warn slightly before that
|
|
161
130
|
if (new_cookie_val.length > 4096 * 0.9) {
|
|
162
|
-
logger.warn('cookieStore warning: large cookie, len=' + new_cookie_val.length)
|
|
131
|
+
logger.warn('cookieStore warning: large cookie, len=' + new_cookie_val.length);
|
|
163
132
|
}
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
return
|
|
133
|
+
document.cookie = new_cookie_val;
|
|
134
|
+
return new_cookie_val;
|
|
135
|
+
}
|
|
136
|
+
catch {
|
|
137
|
+
return;
|
|
169
138
|
}
|
|
170
139
|
},
|
|
171
|
-
|
|
172
140
|
_remove: function (name, cross_subdomain) {
|
|
173
141
|
if (!document?.cookie) {
|
|
174
|
-
return
|
|
142
|
+
return;
|
|
175
143
|
}
|
|
176
144
|
try {
|
|
177
|
-
cookieStore._set(name, '', -1, cross_subdomain)
|
|
178
|
-
}
|
|
179
|
-
|
|
145
|
+
cookieStore._set(name, '', -1, cross_subdomain);
|
|
146
|
+
}
|
|
147
|
+
catch {
|
|
148
|
+
return;
|
|
180
149
|
}
|
|
181
150
|
},
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
let _localStorage_supported: boolean | null = null
|
|
151
|
+
};
|
|
152
|
+
let _localStorage_supported = null;
|
|
185
153
|
export const resetLocalStorageSupported = () => {
|
|
186
|
-
_localStorage_supported = null
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
export const localStore: PersistentStore = {
|
|
154
|
+
_localStorage_supported = null;
|
|
155
|
+
};
|
|
156
|
+
export const localStore = {
|
|
190
157
|
_is_supported: function () {
|
|
191
158
|
if (!isNull(_localStorage_supported)) {
|
|
192
|
-
return _localStorage_supported
|
|
159
|
+
return _localStorage_supported;
|
|
193
160
|
}
|
|
194
|
-
|
|
195
|
-
let supported = true
|
|
161
|
+
let supported = true;
|
|
196
162
|
if (!isUndefined(window)) {
|
|
197
163
|
try {
|
|
198
|
-
const key = '__mplssupport__',
|
|
199
|
-
|
|
200
|
-
localStore._set(key, val)
|
|
164
|
+
const key = '__mplssupport__', val = 'xyz';
|
|
165
|
+
localStore._set(key, val);
|
|
201
166
|
if (localStore._get(key) !== '"xyz"') {
|
|
202
|
-
supported = false
|
|
167
|
+
supported = false;
|
|
203
168
|
}
|
|
204
|
-
localStore._remove(key)
|
|
205
|
-
} catch {
|
|
206
|
-
supported = false
|
|
169
|
+
localStore._remove(key);
|
|
207
170
|
}
|
|
208
|
-
|
|
209
|
-
|
|
171
|
+
catch {
|
|
172
|
+
supported = false;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
else {
|
|
176
|
+
supported = false;
|
|
210
177
|
}
|
|
211
178
|
if (!supported) {
|
|
212
|
-
logger.error('localStorage unsupported; falling back to cookie store')
|
|
179
|
+
logger.error('localStorage unsupported; falling back to cookie store');
|
|
213
180
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
return supported
|
|
181
|
+
_localStorage_supported = supported;
|
|
182
|
+
return supported;
|
|
217
183
|
},
|
|
218
|
-
|
|
219
184
|
_error: function (msg) {
|
|
220
|
-
logger.error('localStorage error: ' + msg)
|
|
185
|
+
logger.error('localStorage error: ' + msg);
|
|
221
186
|
},
|
|
222
|
-
|
|
223
187
|
_get: function (name) {
|
|
224
188
|
try {
|
|
225
|
-
return window?.localStorage.getItem(name)
|
|
226
|
-
} catch (err) {
|
|
227
|
-
localStore._error(err)
|
|
189
|
+
return window?.localStorage.getItem(name);
|
|
228
190
|
}
|
|
229
|
-
|
|
191
|
+
catch (err) {
|
|
192
|
+
localStore._error(err);
|
|
193
|
+
}
|
|
194
|
+
return null;
|
|
230
195
|
},
|
|
231
|
-
|
|
232
196
|
_parse: function (name) {
|
|
233
197
|
try {
|
|
234
|
-
return JSON.parse(localStore._get(name)) || {}
|
|
235
|
-
}
|
|
198
|
+
return JSON.parse(localStore._get(name)) || {};
|
|
199
|
+
}
|
|
200
|
+
catch {
|
|
236
201
|
// noop
|
|
237
202
|
}
|
|
238
|
-
return null
|
|
203
|
+
return null;
|
|
239
204
|
},
|
|
240
|
-
|
|
241
205
|
_set: function (name, value) {
|
|
242
206
|
try {
|
|
243
|
-
window?.localStorage.setItem(name, JSON.stringify(value))
|
|
244
|
-
}
|
|
245
|
-
|
|
207
|
+
window?.localStorage.setItem(name, JSON.stringify(value));
|
|
208
|
+
}
|
|
209
|
+
catch (err) {
|
|
210
|
+
localStore._error(err);
|
|
246
211
|
}
|
|
247
212
|
},
|
|
248
|
-
|
|
249
213
|
_remove: function (name) {
|
|
250
214
|
try {
|
|
251
|
-
window?.localStorage.removeItem(name)
|
|
252
|
-
}
|
|
253
|
-
|
|
215
|
+
window?.localStorage.removeItem(name);
|
|
216
|
+
}
|
|
217
|
+
catch (err) {
|
|
218
|
+
localStore._error(err);
|
|
254
219
|
}
|
|
255
220
|
},
|
|
256
|
-
}
|
|
257
|
-
|
|
221
|
+
};
|
|
258
222
|
// Use localstorage for most data but still use cookie for COOKIE_PERSISTED_PROPERTIES
|
|
259
223
|
// This solves issues with cookies having too much data in them causing headers too large
|
|
260
224
|
// Also makes sure we don't have to send a ton of data to the server
|
|
@@ -264,147 +228,140 @@ const COOKIE_PERSISTED_PROPERTIES = [
|
|
|
264
228
|
SESSION_RECORDING_IS_SAMPLED,
|
|
265
229
|
ENABLE_PERSON_PROCESSING,
|
|
266
230
|
INITIAL_PERSON_INFO,
|
|
267
|
-
]
|
|
268
|
-
|
|
269
|
-
export const localPlusCookieStore: PersistentStore = {
|
|
231
|
+
];
|
|
232
|
+
export const localPlusCookieStore = {
|
|
270
233
|
...localStore,
|
|
271
234
|
_parse: function (name) {
|
|
272
235
|
try {
|
|
273
|
-
let cookieProperties
|
|
236
|
+
let cookieProperties = {};
|
|
274
237
|
try {
|
|
275
238
|
// See if there's a cookie stored with data.
|
|
276
|
-
cookieProperties = cookieStore._parse(name) || {}
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
localStore.
|
|
280
|
-
|
|
281
|
-
|
|
239
|
+
cookieProperties = cookieStore._parse(name) || {};
|
|
240
|
+
}
|
|
241
|
+
catch { }
|
|
242
|
+
const value = extend(cookieProperties, JSON.parse(localStore._get(name) || '{}'));
|
|
243
|
+
localStore._set(name, value);
|
|
244
|
+
return value;
|
|
245
|
+
}
|
|
246
|
+
catch {
|
|
282
247
|
// noop
|
|
283
248
|
}
|
|
284
|
-
return null
|
|
249
|
+
return null;
|
|
285
250
|
},
|
|
286
|
-
|
|
287
251
|
_set: function (name, value, days, cross_subdomain, is_secure, debug) {
|
|
288
252
|
try {
|
|
289
|
-
localStore._set(name, value, undefined, undefined, debug)
|
|
290
|
-
const cookiePersistedProperties
|
|
253
|
+
localStore._set(name, value, undefined, undefined, debug);
|
|
254
|
+
const cookiePersistedProperties = {};
|
|
291
255
|
COOKIE_PERSISTED_PROPERTIES.forEach((key) => {
|
|
292
256
|
if (value[key]) {
|
|
293
|
-
cookiePersistedProperties[key] = value[key]
|
|
257
|
+
cookiePersistedProperties[key] = value[key];
|
|
294
258
|
}
|
|
295
|
-
})
|
|
296
|
-
|
|
259
|
+
});
|
|
297
260
|
if (Object.keys(cookiePersistedProperties).length) {
|
|
298
|
-
cookieStore._set(name, cookiePersistedProperties, days, cross_subdomain, is_secure, debug)
|
|
261
|
+
cookieStore._set(name, cookiePersistedProperties, days, cross_subdomain, is_secure, debug);
|
|
299
262
|
}
|
|
300
|
-
}
|
|
301
|
-
|
|
263
|
+
}
|
|
264
|
+
catch (err) {
|
|
265
|
+
localStore._error(err);
|
|
302
266
|
}
|
|
303
267
|
},
|
|
304
|
-
|
|
305
268
|
_remove: function (name, cross_subdomain) {
|
|
306
269
|
try {
|
|
307
|
-
window?.localStorage.removeItem(name)
|
|
308
|
-
cookieStore._remove(name, cross_subdomain)
|
|
309
|
-
}
|
|
310
|
-
|
|
270
|
+
window?.localStorage.removeItem(name);
|
|
271
|
+
cookieStore._remove(name, cross_subdomain);
|
|
272
|
+
}
|
|
273
|
+
catch (err) {
|
|
274
|
+
localStore._error(err);
|
|
311
275
|
}
|
|
312
276
|
},
|
|
313
|
-
}
|
|
314
|
-
|
|
315
|
-
const memoryStorage: Properties = {}
|
|
316
|
-
|
|
277
|
+
};
|
|
278
|
+
const memoryStorage = {};
|
|
317
279
|
// Storage that only lasts the length of the pageview if we don't want to use cookies
|
|
318
|
-
export const memoryStore
|
|
280
|
+
export const memoryStore = {
|
|
319
281
|
_is_supported: function () {
|
|
320
|
-
return true
|
|
282
|
+
return true;
|
|
321
283
|
},
|
|
322
|
-
|
|
323
284
|
_error: function (msg) {
|
|
324
|
-
logger.error('memoryStorage error: ' + msg)
|
|
285
|
+
logger.error('memoryStorage error: ' + msg);
|
|
325
286
|
},
|
|
326
|
-
|
|
327
287
|
_get: function (name) {
|
|
328
|
-
return memoryStorage[name] || null
|
|
288
|
+
return memoryStorage[name] || null;
|
|
329
289
|
},
|
|
330
|
-
|
|
331
290
|
_parse: function (name) {
|
|
332
|
-
return memoryStorage[name] || null
|
|
291
|
+
return memoryStorage[name] || null;
|
|
333
292
|
},
|
|
334
|
-
|
|
335
293
|
_set: function (name, value) {
|
|
336
|
-
memoryStorage[name] = value
|
|
294
|
+
memoryStorage[name] = value;
|
|
337
295
|
},
|
|
338
|
-
|
|
339
296
|
_remove: function (name) {
|
|
340
|
-
delete memoryStorage[name]
|
|
297
|
+
delete memoryStorage[name];
|
|
341
298
|
},
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
let sessionStorageSupported: boolean | null = null
|
|
299
|
+
};
|
|
300
|
+
let sessionStorageSupported = null;
|
|
345
301
|
export const resetSessionStorageSupported = () => {
|
|
346
|
-
sessionStorageSupported = null
|
|
347
|
-
}
|
|
302
|
+
sessionStorageSupported = null;
|
|
303
|
+
};
|
|
348
304
|
// Storage that only lasts the length of a tab/window. Survives page refreshes
|
|
349
|
-
export const sessionStore
|
|
305
|
+
export const sessionStore = {
|
|
350
306
|
_is_supported: function () {
|
|
351
307
|
if (!isNull(sessionStorageSupported)) {
|
|
352
|
-
return sessionStorageSupported
|
|
308
|
+
return sessionStorageSupported;
|
|
353
309
|
}
|
|
354
|
-
sessionStorageSupported = true
|
|
310
|
+
sessionStorageSupported = true;
|
|
355
311
|
if (!isUndefined(window)) {
|
|
356
312
|
try {
|
|
357
|
-
const key = '__support__',
|
|
358
|
-
|
|
359
|
-
sessionStore._set(key, val)
|
|
313
|
+
const key = '__support__', val = 'xyz';
|
|
314
|
+
sessionStore._set(key, val);
|
|
360
315
|
if (sessionStore._get(key) !== '"xyz"') {
|
|
361
|
-
sessionStorageSupported = false
|
|
316
|
+
sessionStorageSupported = false;
|
|
362
317
|
}
|
|
363
|
-
sessionStore._remove(key)
|
|
364
|
-
}
|
|
365
|
-
|
|
318
|
+
sessionStore._remove(key);
|
|
319
|
+
}
|
|
320
|
+
catch {
|
|
321
|
+
sessionStorageSupported = false;
|
|
366
322
|
}
|
|
367
|
-
} else {
|
|
368
|
-
sessionStorageSupported = false
|
|
369
323
|
}
|
|
370
|
-
|
|
324
|
+
else {
|
|
325
|
+
sessionStorageSupported = false;
|
|
326
|
+
}
|
|
327
|
+
return sessionStorageSupported;
|
|
371
328
|
},
|
|
372
|
-
|
|
373
329
|
_error: function (msg) {
|
|
374
|
-
logger.error('sessionStorage error: ', msg)
|
|
330
|
+
logger.error('sessionStorage error: ', msg);
|
|
375
331
|
},
|
|
376
|
-
|
|
377
332
|
_get: function (name) {
|
|
378
333
|
try {
|
|
379
|
-
return window?.sessionStorage.getItem(name)
|
|
380
|
-
}
|
|
381
|
-
|
|
334
|
+
return window?.sessionStorage.getItem(name);
|
|
335
|
+
}
|
|
336
|
+
catch (err) {
|
|
337
|
+
sessionStore._error(err);
|
|
382
338
|
}
|
|
383
|
-
return null
|
|
339
|
+
return null;
|
|
384
340
|
},
|
|
385
|
-
|
|
386
341
|
_parse: function (name) {
|
|
387
342
|
try {
|
|
388
|
-
return JSON.parse(sessionStore._get(name)) || null
|
|
389
|
-
}
|
|
343
|
+
return JSON.parse(sessionStore._get(name)) || null;
|
|
344
|
+
}
|
|
345
|
+
catch {
|
|
390
346
|
// noop
|
|
391
347
|
}
|
|
392
|
-
return null
|
|
348
|
+
return null;
|
|
393
349
|
},
|
|
394
|
-
|
|
395
350
|
_set: function (name, value) {
|
|
396
351
|
try {
|
|
397
|
-
window?.sessionStorage.setItem(name, JSON.stringify(value))
|
|
398
|
-
}
|
|
399
|
-
|
|
352
|
+
window?.sessionStorage.setItem(name, JSON.stringify(value));
|
|
353
|
+
}
|
|
354
|
+
catch (err) {
|
|
355
|
+
sessionStore._error(err);
|
|
400
356
|
}
|
|
401
357
|
},
|
|
402
|
-
|
|
403
358
|
_remove: function (name) {
|
|
404
359
|
try {
|
|
405
|
-
window?.sessionStorage.removeItem(name)
|
|
406
|
-
}
|
|
407
|
-
|
|
360
|
+
window?.sessionStorage.removeItem(name);
|
|
361
|
+
}
|
|
362
|
+
catch (err) {
|
|
363
|
+
sessionStore._error(err);
|
|
408
364
|
}
|
|
409
365
|
},
|
|
410
|
-
}
|
|
366
|
+
};
|
|
367
|
+
//# sourceMappingURL=storage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAA;AAEhC,OAAO,EACH,WAAW,EACX,wBAAwB,EACxB,mBAAmB,EACnB,UAAU,EACV,4BAA4B,GAC/B,MAAM,aAAa,CAAA;AAEpB,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AACnD,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAA;AAC1C,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,sFAAsF;AACtF,IAAI,uBAAuB,GAAG,EAAE,CAAA;AAEhC,8CAA8C;AAC9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,GAAG,EAAE;IACpC,uBAAuB,GAAG,EAAE,CAAA;AAChC,CAAC,CAAA;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,2BAA2B,CAAC,QAAgB,EAAE,SAAS,GAAG,QAAQ;IAC9E,IAAI,uBAAuB,EAAE,CAAC;QAC1B,OAAO,uBAAuB,CAAA;IAClC,CAAC;IAED,IAAI,CAAC,SAAS,EAAE,CAAC;QACb,OAAO,EAAE,CAAA;IACb,CAAC;IACD,IAAI,CAAC,WAAW,EAAE,W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