Skipped 1 file(s) >100MB (GitHub limit): source/__polyfill/04xxx/module_4759.js (118.4 MB)
48 lines
1.7 KiB
TypeScript
48 lines
1.7 KiB
TypeScript
// Module ID: 7010
|
|
// Function ID: 7011
|
|
// Name: SettingSearchSessionAnalyticsManager
|
|
// Dependencies: [1256, 7011, 2]
|
|
|
|
// Module 7010 (SettingSearchSessionAnalyticsManager)
|
|
import v1 from "v1" /* 1256 */;
|
|
import Tracking from "Tracking" /* 7011 */;
|
|
import size from "module_2" /* 2 */;
|
|
|
|
class SettingSearchSessionAnalyticsManager {
|
|
constructor() {
|
|
return Object.assign({ searchSessionId: null, searchSessionStartTime: null, isQueryEnteredTracked: false });
|
|
}
|
|
}
|
|
const prototype = SettingSearchSessionAnalyticsManager.prototype;
|
|
prototype["getSearchSessionId"] = function getSearchSessionId() {
|
|
return this.searchSessionId;
|
|
};
|
|
prototype["isSessionActive"] = function isSessionActive() {
|
|
return null != this.searchSessionId;
|
|
};
|
|
prototype["initialize"] = function initialize() {
|
|
this.searchSessionId = v1.v4();
|
|
this.searchSessionStartTime = Date.now();
|
|
this.isQueryEnteredTracked = false;
|
|
};
|
|
prototype["maybeTrackQueryEntered"] = function maybeTrackQueryEntered() {
|
|
if (!this.isQueryEnteredTracked) {
|
|
const result = Tracking.trackSettingSearchQueryEntered();
|
|
tmp.isQueryEnteredTracked = true;
|
|
}
|
|
};
|
|
prototype["terminate"] = function terminate() {
|
|
const self = this;
|
|
if (tmp) {
|
|
const obj2 = { searchSessionDuration: null };
|
|
const _Date = Date;
|
|
obj2.searchSessionDuration = Date.now() - self.searchSessionStartTime;
|
|
const result = Tracking.trackSettingSearchClosed(obj2);
|
|
self.searchSessionId = null;
|
|
self.searchSessionStartTime = null;
|
|
self.isQueryEnteredTracked = false;
|
|
}
|
|
};
|
|
let result = size.fileFinishedImporting("modules/settings/tracking/SettingSearchSessionAnalyticsManager.tsx");
|
|
|
|
export default Object.assign({ searchSessionId: null, searchSessionStartTime: null, isQueryEnteredTracked: false });
|