@univerjs-pro/telemetry 1.0.0-alpha.6 → 1.0.0-alpha.8

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/lib/cjs/index.js CHANGED
@@ -1 +1 @@
1
- var _0x151b25=_0x352c;(function(_0x26dcbe,_0x1ea3f9){var _0x435e59=_0x352c,_0x24062b=_0x26dcbe();while(!![]){try{var _0xff6cc=parseInt(_0x435e59(0x1a5))/0x1*(parseInt(_0x435e59(0x198))/0x2)+parseInt(_0x435e59(0x196))/0x3*(-parseInt(_0x435e59(0x1e0))/0x4)+-parseInt(_0x435e59(0x1b2))/0x5*(-parseInt(_0x435e59(0x1cc))/0x6)+-parseInt(_0x435e59(0x1d6))/0x7*(-parseInt(_0x435e59(0x1aa))/0x8)+-parseInt(_0x435e59(0x1e4))/0x9+-parseInt(_0x435e59(0x1bd))/0xa*(-parseInt(_0x435e59(0x19c))/0xb)+-parseInt(_0x435e59(0x1c9))/0xc;if(_0xff6cc===_0x1ea3f9)break;else _0x24062b['push'](_0x24062b['shift']());}catch(_0x496bff){_0x24062b['push'](_0x24062b['shift']());}}}(_0x1538,0x940bb),Object['defineProperty'](exports,Symbol[_0x151b25(0x1cb)],{'value':_0x151b25(0x1a6)}));var e=Object[_0x151b25(0x1da)],t=Object[_0x151b25(0x1b0)],n=Object[_0x151b25(0x1ca)],r=Object['getOwnPropertyNames'],i=Object[_0x151b25(0x1cd)],a=Object[_0x151b25(0x1c4)][_0x151b25(0x1d0)],o=(_0x281fef,_0x3ee8ec,_0x1c346e,_0x5a83d9)=>{var _0x40dab9=_0x151b25;if(_0x3ee8ec&&typeof _0x3ee8ec=='object'||typeof _0x3ee8ec==_0x40dab9(0x195)){for(var _0x4036b1=r(_0x3ee8ec),_0x19c3d0=0x0,_0x178754=_0x4036b1[_0x40dab9(0x1bc)],_0x12baa5;_0x19c3d0<_0x178754;_0x19c3d0++)_0x12baa5=_0x4036b1[_0x19c3d0],!a['call'](_0x281fef,_0x12baa5)&&_0x12baa5!==_0x1c346e&&t(_0x281fef,_0x12baa5,{'get':(_0x588c56=>_0x3ee8ec[_0x588c56])['bind'](null,_0x12baa5),'enumerable':!(_0x5a83d9=n(_0x3ee8ec,_0x12baa5))||_0x5a83d9[_0x40dab9(0x1b3)]});}return _0x281fef;},s=(_0xf8dc0e,_0x22d1a4,_0x591aad)=>(_0x591aad=_0xf8dc0e==null?{}:e(i(_0xf8dc0e)),o(_0x22d1a4||!_0xf8dc0e||!_0xf8dc0e[_0x151b25(0x1c6)]?t(_0x591aad,_0x151b25(0x1c5),{'value':_0xf8dc0e,'enumerable':!0x0}):_0x591aad,_0xf8dc0e));let c=require('@univerjs/core'),l=require('@univerjs/telemetry'),u=require('posthog-js');u=s(u);var d=_0x151b25(0x1a1),f=_0x151b25(0x1d4);const p={};function m(_0x748235,_0x474df3){return function(_0xbad861,_0x2f1e1e){_0x474df3(_0xbad861,_0x2f1e1e,_0x748235);};}function h(_0x952cac,_0x273faf,_0x156df2,_0x31887d){var _0x10c950=_0x151b25,_0x4644e2=arguments[_0x10c950(0x1bc)],_0x4bdff5=_0x4644e2<0x3?_0x273faf:_0x31887d===null?_0x31887d=Object[_0x10c950(0x1ca)](_0x273faf,_0x156df2):_0x31887d,_0x374eb7;if(typeof Reflect==_0x10c950(0x1b7)&&typeof Reflect[_0x10c950(0x1ab)]==_0x10c950(0x195))_0x4bdff5=Reflect[_0x10c950(0x1ab)](_0x952cac,_0x273faf,_0x156df2,_0x31887d);else{for(var _0x544f7a=_0x952cac[_0x10c950(0x1bc)]-0x1;_0x544f7a>=0x0;_0x544f7a--)(_0x374eb7=_0x952cac[_0x544f7a])&&(_0x4bdff5=(_0x4644e2<0x3?_0x374eb7(_0x4bdff5):_0x4644e2>0x3?_0x374eb7(_0x273faf,_0x156df2,_0x4bdff5):_0x374eb7(_0x273faf,_0x156df2))||_0x4bdff5);}return _0x4644e2>0x3&&_0x4bdff5&&Object[_0x10c950(0x1b0)](_0x273faf,_0x156df2,_0x4bdff5),_0x4bdff5;}let g=class extends c[_0x151b25(0x19b)]{constructor(_0x1a924a,_0x2a7c45){var _0x346e9f=_0x151b25;super(),this[_0x346e9f(0x1af)]=_0x1a924a,this['_userManagerService']=_0x2a7c45,this['_trackService']();}[_0x151b25(0x1b5)](){var _0x3355e6=_0x151b25;this[_0x3355e6(0x1b9)](this[_0x3355e6(0x1cf)][_0x3355e6(0x1c0)][_0x3355e6(0x1ba)](_0x12b333=>{var _0x350584=_0x3355e6;_0x12b333&&this['_telemetryService'][_0x350584(0x1e3)](_0x12b333['userID'],{'name':_0x12b333[_0x350584(0x1d3)],'anonymous':String(!!_0x12b333[_0x350584(0x1c2)])});}));}};g=h([m(0x0,l['ITelemetryService']),m(0x1,(0x0,c[_0x151b25(0x1d7)])(c[_0x151b25(0x1b1)]))],g);function _(_0x424efc){'@babel/helpers - typeof';var _0x2bf9ae=_0x151b25;return _=typeof Symbol==_0x2bf9ae(0x195)&&typeof Symbol['iterator']==_0x2bf9ae(0x1bb)?function(_0x1a8a32){return typeof _0x1a8a32;}:function(_0x1d0d2d){var _0x1b4299=_0x2bf9ae;return _0x1d0d2d&&typeof Symbol==_0x1b4299(0x195)&&_0x1d0d2d[_0x1b4299(0x1a9)]===Symbol&&_0x1d0d2d!==Symbol[_0x1b4299(0x1c4)]?_0x1b4299(0x1bb):typeof _0x1d0d2d;},_(_0x424efc);}function v(_0x31461c,_0x1a14ec){var _0x1d89c0=_0x151b25;if(_(_0x31461c)!='object'||!_0x31461c)return _0x31461c;var _0x4158c6=_0x31461c[Symbol['toPrimitive']];if(_0x4158c6!==void 0x0){var _0x22f541=_0x4158c6[_0x1d89c0(0x19f)](_0x31461c,_0x1a14ec||'default');if(_(_0x22f541)!=_0x1d89c0(0x1b7))return _0x22f541;throw TypeError(_0x1d89c0(0x1a8));}return(_0x1a14ec===_0x1d89c0(0x197)?String:Number)(_0x31461c);}function y(_0x318305){var _0x10f968=_0x151b25,_0x204aa1=v(_0x318305,_0x10f968(0x197));return _(_0x204aa1)==_0x10f968(0x1bb)?_0x204aa1:_0x204aa1+'';}function _0x352c(_0x4f4934,_0x3fa23e){_0x4f4934=_0x4f4934-0x194;var _0x1538c8=_0x1538();var _0x352c95=_0x1538c8[_0x4f4934];return _0x352c95;}function b(_0x28f728,_0x568a9a,_0x429a79){var _0x1bda7b=_0x151b25;return(_0x568a9a=y(_0x568a9a))in _0x28f728?Object[_0x1bda7b(0x1b0)](_0x28f728,_0x568a9a,{'value':_0x429a79,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x28f728[_0x568a9a]=_0x429a79,_0x28f728;}let x=class extends c[_0x151b25(0x1e1)]{constructor(_0x51ec86=p,_0x1df6ba,_0x588f36){var _0x581942=_0x151b25;super(),this[_0x581942(0x19d)]=_0x51ec86,this[_0x581942(0x1dc)]=_0x1df6ba,this['_configService']=_0x588f36;let {..._0x6b1f68}=(0x0,c[_0x581942(0x1dd)])({},p,this[_0x581942(0x19d)]);this[_0x581942(0x1d8)][_0x581942(0x1a3)](_0x581942(0x1b8),_0x6b1f68);}[_0x151b25(0x1ad)](){var _0x34cdb5=_0x151b25;if(!this['_config'][_0x34cdb5(0x1c8)])throw Error(_0x34cdb5(0x1a7));[[l['ITelemetryService'],{'useClass':this[_0x34cdb5(0x19d)][_0x34cdb5(0x1c8)]}],[g]][_0x34cdb5(0x1c3)](_0x4428c6=>this['_injector'][_0x34cdb5(0x1d1)](_0x4428c6)),this['_injector'][_0x34cdb5(0x1ac)](g);}};function _0x1538(){var _0x340c9d=['4759875CiLHEE','now','function','159eRsSev','string','1537874HEcPnw','delete','_performanceRecords','Disposable','77FMpQKF','_config','version','call','trackPerformance','@univerjs-pro/telemetry','_init','setConfig','identified_only','1mZCUar','Module','[UniverTelemetryPlugin]:\x20Telemetry\x20service\x20not\x20provided','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','constructor','550344sWgZSP','decorate','get','onStarting','UniverTelemetryPlugin','_telemetryService','defineProperty','UserManagerService','5JNPDfO','enumerable','posthog','_trackService','Injector','object','telemetry.config','disposeWithMe','subscribe','symbol','length','855590vPuQvx','https://us.i.posthog.com','capture','currentUser$','reset','anonymous','forEach','prototype','default','__esModule','init','service','11327148sNDGcM','getOwnPropertyDescriptor','toStringTag','1808454UaRxBA','getPrototypeOf','$pageview','_userManagerService','hasOwnProperty','add','phc_57fDHywG9pssGGW4JSHpc3Pq8hQ9puPnoWHoM6x30T7','name','1.0.0-alpha.6','IConfigService','105bCxwbi','Inject','_configService','packageName','create','host','_injector','merge','dispose','_posthog','46940secoMg','Plugin','performance_function_time_cost','identify'];_0x1538=function(){return _0x340c9d;};return _0x1538();}b(x,'pluginName','UNIVER_TELEMETRY_PLUGIN'),b(x,_0x151b25(0x1d9),d),b(x,_0x151b25(0x19e),f),x=h([m(0x1,(0x0,c[_0x151b25(0x1d7)])(c[_0x151b25(0x1b6)])),m(0x2,c[_0x151b25(0x1d5)])],x);var S=class extends c[_0x151b25(0x19b)]{constructor(_0xd43867=!0x0){var _0x492d91=_0x151b25;super(),b(this,_0x492d91(0x19a),new Map()),b(this,_0x492d91(0x1df),void 0x0),_0xd43867&&this[_0x492d91(0x1a2)]();}get[_0x151b25(0x1b4)](){var _0x72fe98=_0x151b25;return this[_0x72fe98(0x1df)];}[_0x151b25(0x1a2)](){var _0x1880c4=_0x151b25;typeof window<'u'&&window['location'][_0x1880c4(0x1db)]['includes']('univer')&&this['init']();}['debug'](){var _0x41b63e=_0x151b25,_0x3e0ba3;(_0x3e0ba3=this[_0x41b63e(0x1df)])==null||_0x3e0ba3['debug']();}['init'](_0xea14ab){var _0x5608f0=_0x151b25;let {token:_0x58d924,..._0x2445f2}={'token':_0x5608f0(0x1d2),'api_host':_0x5608f0(0x1be),'person_profiles':_0x5608f0(0x1a4),'capture_pageleave':!0x0,..._0xea14ab};this[_0x5608f0(0x1df)]=u[_0x5608f0(0x1c5)][_0x5608f0(0x1c7)](_0x58d924,_0x2445f2);}[_0x151b25(0x1c1)](){var _0x4bb020=_0x151b25,_0xc18c68;(_0xc18c68=this[_0x4bb020(0x1df)])==null||_0xc18c68['reset']();}['startTime'](_0x5026d7){var _0x553cd4=_0x151b25;this['_performanceRecords']['set'](_0x5026d7,Date[_0x553cd4(0x194)]());}['endTime'](_0x467649){var _0x28ff88=_0x151b25;let _0x3e29ae=this[_0x28ff88(0x19a)][_0x28ff88(0x1ac)](_0x467649);if(this[_0x28ff88(0x19a)][_0x28ff88(0x199)](_0x467649),_0x3e29ae){let _0x1ac934=Date[_0x28ff88(0x194)]()-_0x3e29ae;this[_0x28ff88(0x1a0)]({'duration':_0x1ac934,'functionName':_0x467649});}}['trackPerformance'](_0x49b585){var _0x215421=_0x151b25;this[_0x215421(0x1bf)](_0x215421(0x1e2),_0x49b585);}[_0x151b25(0x1e3)](_0x271f7e,_0x2515d0){var _0x22cf0f=_0x151b25,_0x3b5c5e;(_0x3b5c5e=this['_posthog'])==null||_0x3b5c5e[_0x22cf0f(0x1e3)](_0x271f7e,_0x2515d0);}[_0x151b25(0x1bf)](_0x4c107e,_0x46a920){var _0x4cec30=_0x151b25,_0x22c7e2;(_0x22c7e2=this[_0x4cec30(0x1df)])==null||_0x22c7e2[_0x4cec30(0x1bf)](_0x4c107e,_0x46a920);}['onPageView'](_0x4cf2b1){var _0xa1e4bb=_0x151b25,_0x330296;(_0x330296=this[_0xa1e4bb(0x1df)])==null||_0x330296[_0xa1e4bb(0x1bf)](_0xa1e4bb(0x1ce),{'$current_url':_0x4cf2b1});}[_0x151b25(0x1de)](){var _0x50da9c=_0x151b25;super[_0x50da9c(0x1de)](),this[_0x50da9c(0x19a)]['clear']();}};exports['PosthogTelemetryService']=S,Object['defineProperty'](exports,_0x151b25(0x1ae),{'enumerable':!0x0,'get':function(){return x;}});
1
+ var _0x446ea2=_0x358d;(function(_0x5c032e,_0xaeae70){var _0x436cdc=_0x358d,_0x22b410=_0x5c032e();while(!![]){try{var _0x1ec21f=parseInt(_0x436cdc(0x17a))/0x1+-parseInt(_0x436cdc(0x175))/0x2*(parseInt(_0x436cdc(0x141))/0x3)+parseInt(_0x436cdc(0x16d))/0x4+parseInt(_0x436cdc(0x14d))/0x5+-parseInt(_0x436cdc(0x13f))/0x6*(parseInt(_0x436cdc(0x152))/0x7)+-parseInt(_0x436cdc(0x14c))/0x8+-parseInt(_0x436cdc(0x17c))/0x9;if(_0x1ec21f===_0xaeae70)break;else _0x22b410['push'](_0x22b410['shift']());}catch(_0x373b32){_0x22b410['push'](_0x22b410['shift']());}}}(_0x29d9,0xbffe9),Object['defineProperty'](exports,Symbol[_0x446ea2(0x133)],{'value':'Module'}));var e=Object['create'],t=Object[_0x446ea2(0x176)],n=Object[_0x446ea2(0x135)],r=Object[_0x446ea2(0x12e)],i=Object['getPrototypeOf'],a=Object[_0x446ea2(0x153)][_0x446ea2(0x178)],o=(_0x42ef2c,_0x1df177,_0x37ba65,_0x51430b)=>{var _0x466cc0=_0x446ea2;if(_0x1df177&&typeof _0x1df177==_0x466cc0(0x13d)||typeof _0x1df177=='function'){for(var _0xf8457b=r(_0x1df177),_0x2cbb60=0x0,_0x5616c4=_0xf8457b[_0x466cc0(0x151)],_0x146289;_0x2cbb60<_0x5616c4;_0x2cbb60++)_0x146289=_0xf8457b[_0x2cbb60],!a[_0x466cc0(0x148)](_0x42ef2c,_0x146289)&&_0x146289!==_0x37ba65&&t(_0x42ef2c,_0x146289,{'get':(_0x4b4a77=>_0x1df177[_0x4b4a77])[_0x466cc0(0x137)](null,_0x146289),'enumerable':!(_0x51430b=n(_0x1df177,_0x146289))||_0x51430b['enumerable']});}return _0x42ef2c;},s=(_0x304e9b,_0x8737a3,_0x58ec5c)=>(_0x58ec5c=_0x304e9b==null?{}:e(i(_0x304e9b)),o(_0x8737a3||!_0x304e9b||!_0x304e9b['__esModule']?t(_0x58ec5c,'default',{'value':_0x304e9b,'enumerable':!0x0}):_0x58ec5c,_0x304e9b));let c=require('@univerjs-pro/license'),l=require('@univerjs/core'),u=require('@univerjs/telemetry'),d=require('posthog-js');d=s(d);var f=_0x446ea2(0x177),p=_0x446ea2(0x140);const m={};function _0x358d(_0x934b9e,_0x9a5d0d){_0x934b9e=_0x934b9e-0x12d;var _0x29d929=_0x29d9();var _0x358dc1=_0x29d929[_0x934b9e];return _0x358dc1;}function h(_0x37f098,_0x5030cf){return function(_0x287312,_0x171d13){_0x5030cf(_0x287312,_0x171d13,_0x37f098);};}function _0x29d9(){var _0x1a7995=['packageName','PosthogTelemetryService','location','forEach','object','decorate','2355882iBthda','1.0.0-alpha.8','219363sWTzic','startTime','_trackService','host','Injector','string','name','call','_telemetryService','UniverTelemetryPlugin','reset','2521976DTOAHH','1480450lvuhjs','get','capture','https://us.i.posthog.com','length','21htsVlH','prototype','ITelemetryService','add','_performanceRecords','_config','telemetry.config','identified_only','univer','service','trackPerformance','currentUser$','disposeWithMe','toPrimitive','_injector','symbol','onStarting','DependentOn','onPageView','anonymous','Plugin','posthog','_userManagerService','default','Disposable','now','endTime','5999852pJjdnT','_configService','function','includes','[UniverTelemetryPlugin]:\x20Telemetry\x20service\x20not\x20provided','merge','Inject','iterator','6QkhDKi','defineProperty','@univerjs-pro/telemetry','hasOwnProperty','identify','1257083zhKJpu','UniverLicensePlugin','4987584lxbsKH','subscribe','debug','getOwnPropertyNames','dispose','version','pluginName','init','toStringTag','_posthog','getOwnPropertyDescriptor','set','bind','IConfigService'];_0x29d9=function(){return _0x1a7995;};return _0x29d9();}function g(_0x275645,_0x4f2f47,_0x42d102,_0x524f4e){var _0x4319b7=_0x446ea2,_0x54b9a6=arguments[_0x4319b7(0x151)],_0x50876a=_0x54b9a6<0x3?_0x4f2f47:_0x524f4e===null?_0x524f4e=Object['getOwnPropertyDescriptor'](_0x4f2f47,_0x42d102):_0x524f4e,_0x3f00f3;if(typeof Reflect==_0x4319b7(0x13d)&&typeof Reflect[_0x4319b7(0x13e)]==_0x4319b7(0x16f))_0x50876a=Reflect[_0x4319b7(0x13e)](_0x275645,_0x4f2f47,_0x42d102,_0x524f4e);else{for(var _0x410e97=_0x275645['length']-0x1;_0x410e97>=0x0;_0x410e97--)(_0x3f00f3=_0x275645[_0x410e97])&&(_0x50876a=(_0x54b9a6<0x3?_0x3f00f3(_0x50876a):_0x54b9a6>0x3?_0x3f00f3(_0x4f2f47,_0x42d102,_0x50876a):_0x3f00f3(_0x4f2f47,_0x42d102))||_0x50876a);}return _0x54b9a6>0x3&&_0x50876a&&Object['defineProperty'](_0x4f2f47,_0x42d102,_0x50876a),_0x50876a;}let _=class extends l[_0x446ea2(0x16a)]{constructor(_0x700cd8,_0x2f0973){var _0x254923=_0x446ea2;super(),this[_0x254923(0x149)]=_0x700cd8,this[_0x254923(0x168)]=_0x2f0973,this[_0x254923(0x143)]();}[_0x446ea2(0x143)](){var _0x576a8b=_0x446ea2;this[_0x576a8b(0x15e)](this[_0x576a8b(0x168)][_0x576a8b(0x15d)][_0x576a8b(0x17d)](_0x2e48a6=>{var _0x55949c=_0x576a8b;_0x2e48a6&&this['_telemetryService']['identify'](_0x2e48a6['userID'],{'name':_0x2e48a6[_0x55949c(0x147)],'anonymous':String(!!_0x2e48a6[_0x55949c(0x165)])});}));}};_=g([h(0x0,u[_0x446ea2(0x154)]),h(0x1,(0x0,l['Inject'])(l['UserManagerService']))],_);function v(_0x4f46ae){'@babel/helpers - typeof';var _0x282176=_0x446ea2;return v=typeof Symbol==_0x282176(0x16f)&&typeof Symbol[_0x282176(0x174)]==_0x282176(0x161)?function(_0x2beb9){return typeof _0x2beb9;}:function(_0x4944bd){var _0x3efe7f=_0x282176;return _0x4944bd&&typeof Symbol==_0x3efe7f(0x16f)&&_0x4944bd['constructor']===Symbol&&_0x4944bd!==Symbol['prototype']?'symbol':typeof _0x4944bd;},v(_0x4f46ae);}function y(_0x3e367b,_0x236527){var _0x11fabe=_0x446ea2;if(v(_0x3e367b)!=_0x11fabe(0x13d)||!_0x3e367b)return _0x3e367b;var _0x4b3ad6=_0x3e367b[Symbol[_0x11fabe(0x15f)]];if(_0x4b3ad6!==void 0x0){var _0x4182ef=_0x4b3ad6[_0x11fabe(0x148)](_0x3e367b,_0x236527||_0x11fabe(0x169));if(v(_0x4182ef)!=_0x11fabe(0x13d))return _0x4182ef;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x236527===_0x11fabe(0x146)?String:Number)(_0x3e367b);}function b(_0x100b9a){var _0x41f285=_0x446ea2,_0x1032ff=y(_0x100b9a,_0x41f285(0x146));return v(_0x1032ff)==_0x41f285(0x161)?_0x1032ff:_0x1032ff+'';}function x(_0x54a17a,_0x552977,_0x48d2f4){return(_0x552977=b(_0x552977))in _0x54a17a?Object['defineProperty'](_0x54a17a,_0x552977,{'value':_0x48d2f4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x54a17a[_0x552977]=_0x48d2f4,_0x54a17a;}let S=class extends l[_0x446ea2(0x166)]{constructor(_0xe044d0=m,_0x185217,_0x18cba5){var _0x504813=_0x446ea2;super(),this['_config']=_0xe044d0,this[_0x504813(0x160)]=_0x185217,this[_0x504813(0x16e)]=_0x18cba5;let {..._0x4559b5}=(0x0,l[_0x504813(0x172)])({},m,this[_0x504813(0x157)]);this['_configService']['setConfig'](_0x504813(0x158),_0x4559b5);}[_0x446ea2(0x162)](){var _0x51b3b7=_0x446ea2;if(!this[_0x51b3b7(0x157)][_0x51b3b7(0x15b)])throw Error(_0x51b3b7(0x171));[[u[_0x51b3b7(0x154)],{'useClass':this[_0x51b3b7(0x157)][_0x51b3b7(0x15b)]}],[_]][_0x51b3b7(0x13c)](_0x377309=>this[_0x51b3b7(0x160)][_0x51b3b7(0x155)](_0x377309)),this[_0x51b3b7(0x160)][_0x51b3b7(0x14e)](_);}};x(S,_0x446ea2(0x131),'UNIVER_TELEMETRY_PLUGIN'),x(S,_0x446ea2(0x139),f),x(S,_0x446ea2(0x130),p),S=g([(0x0,l[_0x446ea2(0x163)])(c[_0x446ea2(0x17b)]),h(0x1,(0x0,l[_0x446ea2(0x173)])(l[_0x446ea2(0x145)])),h(0x2,l[_0x446ea2(0x138)])],S);var C=class extends l[_0x446ea2(0x16a)]{constructor(_0x83f650=!0x0){var _0x5c79ee=_0x446ea2;super(),x(this,_0x5c79ee(0x156),new Map()),x(this,_0x5c79ee(0x134),void 0x0),_0x83f650&&this['_init']();}get[_0x446ea2(0x167)](){var _0x141d56=_0x446ea2;return this[_0x141d56(0x134)];}['_init'](){var _0xceb8b5=_0x446ea2;typeof window<'u'&&window[_0xceb8b5(0x13b)][_0xceb8b5(0x144)][_0xceb8b5(0x170)](_0xceb8b5(0x15a))&&this[_0xceb8b5(0x132)]();}[_0x446ea2(0x12d)](){var _0x53bbe2;(_0x53bbe2=this['_posthog'])==null||_0x53bbe2['debug']();}[_0x446ea2(0x132)](_0x512b52){var _0x25f319=_0x446ea2;let {token:_0x2161f0,..._0x3b8768}={'token':'phc_57fDHywG9pssGGW4JSHpc3Pq8hQ9puPnoWHoM6x30T7','api_host':_0x25f319(0x150),'person_profiles':_0x25f319(0x159),'capture_pageleave':!0x0,..._0x512b52};this['_posthog']=d[_0x25f319(0x169)][_0x25f319(0x132)](_0x2161f0,_0x3b8768);}['reset'](){var _0x3e4f08=_0x446ea2,_0x39fb8d;(_0x39fb8d=this[_0x3e4f08(0x134)])==null||_0x39fb8d[_0x3e4f08(0x14b)]();}[_0x446ea2(0x142)](_0x320d44){var _0x4209ce=_0x446ea2;this[_0x4209ce(0x156)][_0x4209ce(0x136)](_0x320d44,Date[_0x4209ce(0x16b)]());}[_0x446ea2(0x16c)](_0x435a82){var _0x3055f7=_0x446ea2;let _0x1a22b7=this[_0x3055f7(0x156)][_0x3055f7(0x14e)](_0x435a82);if(this[_0x3055f7(0x156)]['delete'](_0x435a82),_0x1a22b7){let _0x2bb0f7=Date[_0x3055f7(0x16b)]()-_0x1a22b7;this[_0x3055f7(0x15c)]({'duration':_0x2bb0f7,'functionName':_0x435a82});}}[_0x446ea2(0x15c)](_0x5edb96){var _0x1fd67a=_0x446ea2;this[_0x1fd67a(0x14f)]('performance_function_time_cost',_0x5edb96);}[_0x446ea2(0x179)](_0x53b759,_0x162670){var _0x20e413=_0x446ea2,_0x5bcd16;(_0x5bcd16=this[_0x20e413(0x134)])==null||_0x5bcd16['identify'](_0x53b759,_0x162670);}[_0x446ea2(0x14f)](_0x45761e,_0x6fd753){var _0x569547=_0x446ea2,_0x33cc94;(_0x33cc94=this[_0x569547(0x134)])==null||_0x33cc94['capture'](_0x45761e,_0x6fd753);}[_0x446ea2(0x164)](_0x26529f){var _0x56a2ea=_0x446ea2,_0x27962b;(_0x27962b=this['_posthog'])==null||_0x27962b[_0x56a2ea(0x14f)]('$pageview',{'$current_url':_0x26529f});}[_0x446ea2(0x12f)](){var _0x1c3f2e=_0x446ea2;super[_0x1c3f2e(0x12f)](),this[_0x1c3f2e(0x156)]['clear']();}};exports[_0x446ea2(0x13a)]=C,Object['defineProperty'](exports,_0x446ea2(0x14a),{'enumerable':!0x0,'get':function(){return S;}});
package/lib/es/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1cfe(_0x5e7e78,_0x3bd6fb){_0x5e7e78=_0x5e7e78-0x1cf;var _0xb0f029=_0xb0f0();var _0x1cfefa=_0xb0f029[_0x5e7e78];return _0x1cfefa;}var _0x3dfcb2=_0x1cfe;(function(_0x1fed95,_0x4a3d14){var _0xd052=_0x1cfe,_0x42ef17=_0x1fed95();while(!![]){try{var _0x28e58d=-parseInt(_0xd052(0x1e5))/0x1+parseInt(_0xd052(0x1d1))/0x2*(-parseInt(_0xd052(0x1f2))/0x3)+parseInt(_0xd052(0x20a))/0x4*(-parseInt(_0xd052(0x1fa))/0x5)+-parseInt(_0xd052(0x1e8))/0x6+-parseInt(_0xd052(0x1f5))/0x7+parseInt(_0xd052(0x1ec))/0x8+-parseInt(_0xd052(0x1eb))/0x9*(-parseInt(_0xd052(0x1ed))/0xa);if(_0x28e58d===_0x4a3d14)break;else _0x42ef17['push'](_0x42ef17['shift']());}catch(_0x9b7e69){_0x42ef17['push'](_0x42ef17['shift']());}}}(_0xb0f0,0xe071e));import{Disposable as _0x45fc83,IConfigService as _0x2ff16f,Inject as _0xfc7f2,Injector as _0x3d5ffc,Plugin as _0xa02cb3,UserManagerService as _0x2cfbc7,merge as _0x48f672}from'@univerjs/core';import{ITelemetryService as _0x35f567}from'@univerjs/telemetry';import _0x2fc79a from'posthog-js';var l='@univerjs-pro/telemetry',u=_0x3dfcb2(0x204);const d={};function f(_0x592868,_0x337369){return function(_0x4fe2e1,_0x5269ab){_0x337369(_0x4fe2e1,_0x5269ab,_0x592868);};}function p(_0x5e58f3,_0xb2b392,_0x1727f2,_0xe83783){var _0x42b219=_0x3dfcb2,_0x3fd591=arguments[_0x42b219(0x213)],_0x3a2ceb=_0x3fd591<0x3?_0xb2b392:_0xe83783===null?_0xe83783=Object[_0x42b219(0x1e1)](_0xb2b392,_0x1727f2):_0xe83783,_0x188da6;if(typeof Reflect=='object'&&typeof Reflect['decorate']=='function')_0x3a2ceb=Reflect[_0x42b219(0x1e2)](_0x5e58f3,_0xb2b392,_0x1727f2,_0xe83783);else{for(var _0x5503e6=_0x5e58f3[_0x42b219(0x213)]-0x1;_0x5503e6>=0x0;_0x5503e6--)(_0x188da6=_0x5e58f3[_0x5503e6])&&(_0x3a2ceb=(_0x3fd591<0x3?_0x188da6(_0x3a2ceb):_0x3fd591>0x3?_0x188da6(_0xb2b392,_0x1727f2,_0x3a2ceb):_0x188da6(_0xb2b392,_0x1727f2))||_0x3a2ceb);}return _0x3fd591>0x3&&_0x3a2ceb&&Object['defineProperty'](_0xb2b392,_0x1727f2,_0x3a2ceb),_0x3a2ceb;}let m=class extends _0x45fc83{constructor(_0x12f5fe,_0x140601){var _0x506d7e=_0x3dfcb2;super(),this[_0x506d7e(0x1d5)]=_0x12f5fe,this[_0x506d7e(0x1dc)]=_0x140601,this[_0x506d7e(0x1fd)]();}['_trackService'](){var _0x5469cf=_0x3dfcb2;this[_0x5469cf(0x1d6)](this[_0x5469cf(0x1dc)][_0x5469cf(0x1dd)][_0x5469cf(0x1ff)](_0x4bea0f=>{var _0x4d0638=_0x5469cf;_0x4bea0f&&this[_0x4d0638(0x1d5)][_0x4d0638(0x201)](_0x4bea0f[_0x4d0638(0x1d7)],{'name':_0x4bea0f[_0x4d0638(0x20e)],'anonymous':String(!!_0x4bea0f[_0x4d0638(0x1e9)])});}));}};m=p([f(0x0,_0x35f567),f(0x1,_0xfc7f2(_0x2cfbc7))],m);function h(_0x4daa19){'@babel/helpers - typeof';var _0x21cf0f=_0x3dfcb2;return h=typeof Symbol==_0x21cf0f(0x208)&&typeof Symbol[_0x21cf0f(0x203)]==_0x21cf0f(0x1ef)?function(_0x30170d){return typeof _0x30170d;}:function(_0x21abef){var _0x51cf5d=_0x21cf0f;return _0x21abef&&typeof Symbol==_0x51cf5d(0x208)&&_0x21abef[_0x51cf5d(0x1f3)]===Symbol&&_0x21abef!==Symbol[_0x51cf5d(0x200)]?_0x51cf5d(0x1ef):typeof _0x21abef;},h(_0x4daa19);}function g(_0x363cdf,_0x2fafc0){var _0x1551c3=_0x3dfcb2;if(h(_0x363cdf)!=_0x1551c3(0x1f1)||!_0x363cdf)return _0x363cdf;var _0xf127a3=_0x363cdf[Symbol[_0x1551c3(0x1d9)]];if(_0xf127a3!==void 0x0){var _0x1ef7a7=_0xf127a3[_0x1551c3(0x1d3)](_0x363cdf,_0x2fafc0||'default');if(h(_0x1ef7a7)!=_0x1551c3(0x1f1))return _0x1ef7a7;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2fafc0===_0x1551c3(0x20b)?String:Number)(_0x363cdf);}function _0xb0f0(){var _0x3c6ae1=['service','subscribe','prototype','identify','reset','iterator','1.0.0-alpha.6','phc_57fDHywG9pssGGW4JSHpc3Pq8hQ9puPnoWHoM6x30T7','onStarting','set','function','posthog','2186904ZdRfWO','string','delete','now','name','setConfig','capture','init','add','length','_performanceRecords','version','80420ImdGiZ','_init','call','includes','_telemetryService','disposeWithMe','userID','univer','toPrimitive','location','dispose','_userManagerService','currentUser$','trackPerformance','_config','debug','getOwnPropertyDescriptor','decorate','defineProperty','packageName','1259010kKQIAr','_injector','telemetry.config','8989410YPDJVS','anonymous','https://us.i.posthog.com','126waUwir','2761008pSqIow','3118030bLoUVv','startTime','symbol','performance_function_time_cost','object','15jeXRal','constructor','_posthog','2002147jRBpOK','$pageview','forEach','UNIVER_TELEMETRY_PLUGIN','_configService','5cEakjd','get','endTime','_trackService'];_0xb0f0=function(){return _0x3c6ae1;};return _0xb0f0();}function _(_0x241b50){var _0x836ac3=_0x3dfcb2,_0x59b87b=g(_0x241b50,_0x836ac3(0x20b));return h(_0x59b87b)==_0x836ac3(0x1ef)?_0x59b87b:_0x59b87b+'';}function v(_0x5ef31c,_0x482faf,_0x2a5102){var _0x5e3b6a=_0x3dfcb2;return(_0x482faf=_(_0x482faf))in _0x5ef31c?Object[_0x5e3b6a(0x1e3)](_0x5ef31c,_0x482faf,{'value':_0x2a5102,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5ef31c[_0x482faf]=_0x2a5102,_0x5ef31c;}let y=class extends _0xa02cb3{constructor(_0x1352a6=d,_0x4e88f8,_0xf157ba){var _0x4fa75a=_0x3dfcb2;super(),this[_0x4fa75a(0x1df)]=_0x1352a6,this[_0x4fa75a(0x1e6)]=_0x4e88f8,this[_0x4fa75a(0x1f9)]=_0xf157ba;let {..._0xfa60b4}=_0x48f672({},d,this[_0x4fa75a(0x1df)]);this['_configService'][_0x4fa75a(0x20f)](_0x4fa75a(0x1e7),_0xfa60b4);}[_0x3dfcb2(0x206)](){var _0xf42c9e=_0x3dfcb2;if(!this['_config'][_0xf42c9e(0x1fe)])throw Error('[UniverTelemetryPlugin]:\x20Telemetry\x20service\x20not\x20provided');[[_0x35f567,{'useClass':this[_0xf42c9e(0x1df)][_0xf42c9e(0x1fe)]}],[m]][_0xf42c9e(0x1f7)](_0x20dba0=>this[_0xf42c9e(0x1e6)][_0xf42c9e(0x212)](_0x20dba0)),this[_0xf42c9e(0x1e6)][_0xf42c9e(0x1fb)](m);}};v(y,'pluginName',_0x3dfcb2(0x1f8)),v(y,_0x3dfcb2(0x1e4),l),v(y,_0x3dfcb2(0x1d0),u),y=p([f(0x1,_0xfc7f2(_0x3d5ffc)),f(0x2,_0x2ff16f)],y);var b=class extends _0x45fc83{constructor(_0x5dd602=!0x0){var _0xdb180c=_0x3dfcb2;super(),v(this,_0xdb180c(0x1cf),new Map()),v(this,_0xdb180c(0x1f4),void 0x0),_0x5dd602&&this[_0xdb180c(0x1d2)]();}get[_0x3dfcb2(0x209)](){return this['_posthog'];}['_init'](){var _0x23e264=_0x3dfcb2;typeof window<'u'&&window[_0x23e264(0x1da)]['host'][_0x23e264(0x1d4)](_0x23e264(0x1d8))&&this['init']();}[_0x3dfcb2(0x1e0)](){var _0x3fef0e=_0x3dfcb2,_0x2f6a38;(_0x2f6a38=this[_0x3fef0e(0x1f4)])==null||_0x2f6a38[_0x3fef0e(0x1e0)]();}[_0x3dfcb2(0x211)](_0x144a49){var _0x4bc535=_0x3dfcb2;let {token:_0x2a4141,..._0x279a73}={'token':_0x4bc535(0x205),'api_host':_0x4bc535(0x1ea),'person_profiles':'identified_only','capture_pageleave':!0x0,..._0x144a49};this[_0x4bc535(0x1f4)]=_0x2fc79a[_0x4bc535(0x211)](_0x2a4141,_0x279a73);}[_0x3dfcb2(0x202)](){var _0x3c66db=_0x3dfcb2,_0x329e01;(_0x329e01=this[_0x3c66db(0x1f4)])==null||_0x329e01[_0x3c66db(0x202)]();}[_0x3dfcb2(0x1ee)](_0x414649){var _0xbcb0dc=_0x3dfcb2;this[_0xbcb0dc(0x1cf)][_0xbcb0dc(0x207)](_0x414649,Date[_0xbcb0dc(0x20d)]());}[_0x3dfcb2(0x1fc)](_0x2b9a49){var _0x14c5e2=_0x3dfcb2;let _0x2d7964=this[_0x14c5e2(0x1cf)][_0x14c5e2(0x1fb)](_0x2b9a49);if(this['_performanceRecords'][_0x14c5e2(0x20c)](_0x2b9a49),_0x2d7964){let _0x45bdca=Date[_0x14c5e2(0x20d)]()-_0x2d7964;this['trackPerformance']({'duration':_0x45bdca,'functionName':_0x2b9a49});}}[_0x3dfcb2(0x1de)](_0x4ece35){var _0x1cb75b=_0x3dfcb2;this[_0x1cb75b(0x210)](_0x1cb75b(0x1f0),_0x4ece35);}[_0x3dfcb2(0x201)](_0x136e82,_0x1ea091){var _0x35ffa7=_0x3dfcb2,_0x329f0e;(_0x329f0e=this['_posthog'])==null||_0x329f0e[_0x35ffa7(0x201)](_0x136e82,_0x1ea091);}['capture'](_0x3c594e,_0x25740e){var _0x2e3d86=_0x3dfcb2,_0x3151f1;(_0x3151f1=this[_0x2e3d86(0x1f4)])==null||_0x3151f1[_0x2e3d86(0x210)](_0x3c594e,_0x25740e);}['onPageView'](_0x1544e9){var _0x245672=_0x3dfcb2,_0x303c1b;(_0x303c1b=this['_posthog'])==null||_0x303c1b[_0x245672(0x210)](_0x245672(0x1f6),{'$current_url':_0x1544e9});}[_0x3dfcb2(0x1db)](){var _0xdf18b5=_0x3dfcb2;super['dispose'](),this[_0xdf18b5(0x1cf)]['clear']();}};export{b as PosthogTelemetryService,y as UniverTelemetryPlugin};
1
+ var _0x38659c=_0x2beb;(function(_0x1d6f2b,_0x465051){var _0x1bedce=_0x2beb,_0x2f6b54=_0x1d6f2b();while(!![]){try{var _0x2d9e32=parseInt(_0x1bedce(0xad))/0x1+-parseInt(_0x1bedce(0x87))/0x2*(parseInt(_0x1bedce(0x7b))/0x3)+-parseInt(_0x1bedce(0x96))/0x4+parseInt(_0x1bedce(0x72))/0x5+-parseInt(_0x1bedce(0x92))/0x6*(parseInt(_0x1bedce(0x6f))/0x7)+-parseInt(_0x1bedce(0xa6))/0x8*(parseInt(_0x1bedce(0x86))/0x9)+parseInt(_0x1bedce(0x77))/0xa;if(_0x2d9e32===_0x465051)break;else _0x2f6b54['push'](_0x2f6b54['shift']());}catch(_0x5d2249){_0x2f6b54['push'](_0x2f6b54['shift']());}}}(_0xd6c3,0xa1efe));import{UniverLicensePlugin as _0x142d17}from'@univerjs-pro/license';import{DependentOn as _0x4ecb82,Disposable as _0x42977b,IConfigService as _0x28dfde,Inject as _0x437d96,Injector as _0x3207f5,Plugin as _0x1fcfe5,UserManagerService as _0x1289ad,merge as _0x8805b3}from'@univerjs/core';import{ITelemetryService as _0x43a7e9}from'@univerjs/telemetry';import _0x506fcf from'posthog-js';var d=_0x38659c(0x74),f=_0x38659c(0x80);const p={};function m(_0x33d52f,_0x5811e0){return function(_0x223129,_0x4cd274){_0x5811e0(_0x223129,_0x4cd274,_0x33d52f);};}function h(_0x1873ed,_0x9585bb,_0x3453c8,_0x5ec469){var _0x2b566a=_0x38659c,_0x6b8768=arguments[_0x2b566a(0x6b)],_0x28748b=_0x6b8768<0x3?_0x9585bb:_0x5ec469===null?_0x5ec469=Object[_0x2b566a(0x73)](_0x9585bb,_0x3453c8):_0x5ec469,_0x54525e;if(typeof Reflect==_0x2b566a(0x6e)&&typeof Reflect['decorate']=='function')_0x28748b=Reflect[_0x2b566a(0x8a)](_0x1873ed,_0x9585bb,_0x3453c8,_0x5ec469);else{for(var _0x59a5f0=_0x1873ed['length']-0x1;_0x59a5f0>=0x0;_0x59a5f0--)(_0x54525e=_0x1873ed[_0x59a5f0])&&(_0x28748b=(_0x6b8768<0x3?_0x54525e(_0x28748b):_0x6b8768>0x3?_0x54525e(_0x9585bb,_0x3453c8,_0x28748b):_0x54525e(_0x9585bb,_0x3453c8))||_0x28748b);}return _0x6b8768>0x3&&_0x28748b&&Object['defineProperty'](_0x9585bb,_0x3453c8,_0x28748b),_0x28748b;}function _0xd6c3(){var _0x345037=['onStarting','_userManagerService','1084123YsYDYS','_performanceRecords','symbol','_configService','pluginName','length','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','https://us.i.posthog.com','object','70pylgTH','posthog','_config','535595SHQIGY','getOwnPropertyDescriptor','@univerjs-pro/telemetry','_trackService','_init','21494120YoyntP','host','[UniverTelemetryPlugin]:\x20Telemetry\x20service\x20not\x20provided','performance_function_time_cost','27UIAOXv','now','setConfig','currentUser$','capture','1.0.0-alpha.8','forEach','call','identify','onPageView','default','72qUgNBa','190534LGWzTs','_telemetryService','debug','decorate','init','version','_posthog','univer','identified_only','delete','endTime','499962wzQFHM','toPrimitive','reset','iterator','2679420JNuPEk','subscribe','get','function','name','string','disposeWithMe','prototype','userID','defineProperty','_injector','phc_57fDHywG9pssGGW4JSHpc3Pq8hQ9puPnoWHoM6x30T7','clear','anonymous','includes','telemetry.config','316832ckKNNZ','constructor','packageName','dispose','trackPerformance'];_0xd6c3=function(){return _0x345037;};return _0xd6c3();}let g=class extends _0x42977b{constructor(_0x547b97,_0xd33eb7){var _0x5b9702=_0x38659c;super(),this[_0x5b9702(0x88)]=_0x547b97,this[_0x5b9702(0xac)]=_0xd33eb7,this[_0x5b9702(0x75)]();}[_0x38659c(0x75)](){var _0x40ddab=_0x38659c;this[_0x40ddab(0x9c)](this[_0x40ddab(0xac)][_0x40ddab(0x7e)][_0x40ddab(0x97)](_0x2a8cf0=>{var _0x2bc9bc=_0x40ddab;_0x2a8cf0&&this[_0x2bc9bc(0x88)][_0x2bc9bc(0x83)](_0x2a8cf0[_0x2bc9bc(0x9e)],{'name':_0x2a8cf0[_0x2bc9bc(0x9a)],'anonymous':String(!!_0x2a8cf0[_0x2bc9bc(0xa3)])});}));}};g=h([m(0x0,_0x43a7e9),m(0x1,_0x437d96(_0x1289ad))],g);function _(_0x3d75d9){'@babel/helpers - typeof';var _0x40ac31=_0x38659c;return _=typeof Symbol==_0x40ac31(0x99)&&typeof Symbol[_0x40ac31(0x95)]==_0x40ac31(0xaf)?function(_0x338548){return typeof _0x338548;}:function(_0x514a3b){var _0x5dbea4=_0x40ac31;return _0x514a3b&&typeof Symbol==_0x5dbea4(0x99)&&_0x514a3b[_0x5dbea4(0xa7)]===Symbol&&_0x514a3b!==Symbol[_0x5dbea4(0x9d)]?_0x5dbea4(0xaf):typeof _0x514a3b;},_(_0x3d75d9);}function v(_0x2a8cfe,_0x325df8){var _0x445826=_0x38659c;if(_(_0x2a8cfe)!=_0x445826(0x6e)||!_0x2a8cfe)return _0x2a8cfe;var _0x54c79b=_0x2a8cfe[Symbol[_0x445826(0x93)]];if(_0x54c79b!==void 0x0){var _0x223154=_0x54c79b[_0x445826(0x82)](_0x2a8cfe,_0x325df8||_0x445826(0x85));if(_(_0x223154)!=_0x445826(0x6e))return _0x223154;throw TypeError(_0x445826(0x6c));}return(_0x325df8===_0x445826(0x9b)?String:Number)(_0x2a8cfe);}function y(_0x493cf4){var _0x1a5663=_0x38659c,_0x2b7435=v(_0x493cf4,_0x1a5663(0x9b));return _(_0x2b7435)==_0x1a5663(0xaf)?_0x2b7435:_0x2b7435+'';}function b(_0x3f2e6f,_0x16113e,_0x2e2af4){var _0x104c70=_0x38659c;return(_0x16113e=y(_0x16113e))in _0x3f2e6f?Object[_0x104c70(0x9f)](_0x3f2e6f,_0x16113e,{'value':_0x2e2af4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3f2e6f[_0x16113e]=_0x2e2af4,_0x3f2e6f;}let x=class extends _0x1fcfe5{constructor(_0x4743d0=p,_0x45acbb,_0xca5d12){var _0x11dc79=_0x38659c;super(),this[_0x11dc79(0x71)]=_0x4743d0,this[_0x11dc79(0xa0)]=_0x45acbb,this[_0x11dc79(0xb0)]=_0xca5d12;let {..._0x2fd493}=_0x8805b3({},p,this[_0x11dc79(0x71)]);this[_0x11dc79(0xb0)][_0x11dc79(0x7d)](_0x11dc79(0xa5),_0x2fd493);}[_0x38659c(0xab)](){var _0x553305=_0x38659c;if(!this[_0x553305(0x71)]['service'])throw Error(_0x553305(0x79));[[_0x43a7e9,{'useClass':this[_0x553305(0x71)]['service']}],[g]][_0x553305(0x81)](_0x28b795=>this[_0x553305(0xa0)]['add'](_0x28b795)),this['_injector'][_0x553305(0x98)](g);}};b(x,_0x38659c(0x6a),'UNIVER_TELEMETRY_PLUGIN'),b(x,_0x38659c(0xa8),d),b(x,_0x38659c(0x8c),f),x=h([_0x4ecb82(_0x142d17),m(0x1,_0x437d96(_0x3207f5)),m(0x2,_0x28dfde)],x);function _0x2beb(_0x54e01f,_0x33d448){_0x54e01f=_0x54e01f-0x6a;var _0xd6c32b=_0xd6c3();var _0x2bebf2=_0xd6c32b[_0x54e01f];return _0x2bebf2;}var S=class extends _0x42977b{constructor(_0x3a3bd1=!0x0){var _0x2e8ca2=_0x38659c;super(),b(this,_0x2e8ca2(0xae),new Map()),b(this,'_posthog',void 0x0),_0x3a3bd1&&this[_0x2e8ca2(0x76)]();}get[_0x38659c(0x70)](){return this['_posthog'];}[_0x38659c(0x76)](){var _0x11b31a=_0x38659c;typeof window<'u'&&window['location'][_0x11b31a(0x78)][_0x11b31a(0xa4)](_0x11b31a(0x8e))&&this[_0x11b31a(0x8b)]();}[_0x38659c(0x89)](){var _0x5afa16=_0x38659c,_0x2c7ffa;(_0x2c7ffa=this[_0x5afa16(0x8d)])==null||_0x2c7ffa[_0x5afa16(0x89)]();}['init'](_0x52f3f2){var _0x24e2d0=_0x38659c;let {token:_0x485a19,..._0x381153}={'token':_0x24e2d0(0xa1),'api_host':_0x24e2d0(0x6d),'person_profiles':_0x24e2d0(0x8f),'capture_pageleave':!0x0,..._0x52f3f2};this[_0x24e2d0(0x8d)]=_0x506fcf[_0x24e2d0(0x8b)](_0x485a19,_0x381153);}[_0x38659c(0x94)](){var _0x3cfa9f=_0x38659c,_0x149850;(_0x149850=this[_0x3cfa9f(0x8d)])==null||_0x149850[_0x3cfa9f(0x94)]();}['startTime'](_0x2794a5){var _0x5f1269=_0x38659c;this['_performanceRecords']['set'](_0x2794a5,Date[_0x5f1269(0x7c)]());}[_0x38659c(0x91)](_0x3c0c98){var _0x3e38fa=_0x38659c;let _0x2bb8d0=this[_0x3e38fa(0xae)][_0x3e38fa(0x98)](_0x3c0c98);if(this['_performanceRecords'][_0x3e38fa(0x90)](_0x3c0c98),_0x2bb8d0){let _0x515a49=Date['now']()-_0x2bb8d0;this[_0x3e38fa(0xaa)]({'duration':_0x515a49,'functionName':_0x3c0c98});}}[_0x38659c(0xaa)](_0xbe7c5f){var _0x4249c8=_0x38659c;this['capture'](_0x4249c8(0x7a),_0xbe7c5f);}[_0x38659c(0x83)](_0x26f68b,_0x2c1a95){var _0x2ab209=_0x38659c,_0x2d06ff;(_0x2d06ff=this['_posthog'])==null||_0x2d06ff[_0x2ab209(0x83)](_0x26f68b,_0x2c1a95);}['capture'](_0x3d3632,_0x281518){var _0x1a9e20;(_0x1a9e20=this['_posthog'])==null||_0x1a9e20['capture'](_0x3d3632,_0x281518);}[_0x38659c(0x84)](_0x41e0e4){var _0x414c3f=_0x38659c,_0x2e2921;(_0x2e2921=this['_posthog'])==null||_0x2e2921[_0x414c3f(0x7f)]('$pageview',{'$current_url':_0x41e0e4});}[_0x38659c(0xa9)](){var _0x57c4c7=_0x38659c;super[_0x57c4c7(0xa9)](),this[_0x57c4c7(0xae)][_0x57c4c7(0xa2)]();}};export{S as PosthogTelemetryService,x as UniverTelemetryPlugin};
package/lib/index.js CHANGED
@@ -1 +1 @@
1
- function _0x1cfe(_0x5e7e78,_0x3bd6fb){_0x5e7e78=_0x5e7e78-0x1cf;var _0xb0f029=_0xb0f0();var _0x1cfefa=_0xb0f029[_0x5e7e78];return _0x1cfefa;}var _0x3dfcb2=_0x1cfe;(function(_0x1fed95,_0x4a3d14){var _0xd052=_0x1cfe,_0x42ef17=_0x1fed95();while(!![]){try{var _0x28e58d=-parseInt(_0xd052(0x1e5))/0x1+parseInt(_0xd052(0x1d1))/0x2*(-parseInt(_0xd052(0x1f2))/0x3)+parseInt(_0xd052(0x20a))/0x4*(-parseInt(_0xd052(0x1fa))/0x5)+-parseInt(_0xd052(0x1e8))/0x6+-parseInt(_0xd052(0x1f5))/0x7+parseInt(_0xd052(0x1ec))/0x8+-parseInt(_0xd052(0x1eb))/0x9*(-parseInt(_0xd052(0x1ed))/0xa);if(_0x28e58d===_0x4a3d14)break;else _0x42ef17['push'](_0x42ef17['shift']());}catch(_0x9b7e69){_0x42ef17['push'](_0x42ef17['shift']());}}}(_0xb0f0,0xe071e));import{Disposable as _0x45fc83,IConfigService as _0x2ff16f,Inject as _0xfc7f2,Injector as _0x3d5ffc,Plugin as _0xa02cb3,UserManagerService as _0x2cfbc7,merge as _0x48f672}from'@univerjs/core';import{ITelemetryService as _0x35f567}from'@univerjs/telemetry';import _0x2fc79a from'posthog-js';var l='@univerjs-pro/telemetry',u=_0x3dfcb2(0x204);const d={};function f(_0x592868,_0x337369){return function(_0x4fe2e1,_0x5269ab){_0x337369(_0x4fe2e1,_0x5269ab,_0x592868);};}function p(_0x5e58f3,_0xb2b392,_0x1727f2,_0xe83783){var _0x42b219=_0x3dfcb2,_0x3fd591=arguments[_0x42b219(0x213)],_0x3a2ceb=_0x3fd591<0x3?_0xb2b392:_0xe83783===null?_0xe83783=Object[_0x42b219(0x1e1)](_0xb2b392,_0x1727f2):_0xe83783,_0x188da6;if(typeof Reflect=='object'&&typeof Reflect['decorate']=='function')_0x3a2ceb=Reflect[_0x42b219(0x1e2)](_0x5e58f3,_0xb2b392,_0x1727f2,_0xe83783);else{for(var _0x5503e6=_0x5e58f3[_0x42b219(0x213)]-0x1;_0x5503e6>=0x0;_0x5503e6--)(_0x188da6=_0x5e58f3[_0x5503e6])&&(_0x3a2ceb=(_0x3fd591<0x3?_0x188da6(_0x3a2ceb):_0x3fd591>0x3?_0x188da6(_0xb2b392,_0x1727f2,_0x3a2ceb):_0x188da6(_0xb2b392,_0x1727f2))||_0x3a2ceb);}return _0x3fd591>0x3&&_0x3a2ceb&&Object['defineProperty'](_0xb2b392,_0x1727f2,_0x3a2ceb),_0x3a2ceb;}let m=class extends _0x45fc83{constructor(_0x12f5fe,_0x140601){var _0x506d7e=_0x3dfcb2;super(),this[_0x506d7e(0x1d5)]=_0x12f5fe,this[_0x506d7e(0x1dc)]=_0x140601,this[_0x506d7e(0x1fd)]();}['_trackService'](){var _0x5469cf=_0x3dfcb2;this[_0x5469cf(0x1d6)](this[_0x5469cf(0x1dc)][_0x5469cf(0x1dd)][_0x5469cf(0x1ff)](_0x4bea0f=>{var _0x4d0638=_0x5469cf;_0x4bea0f&&this[_0x4d0638(0x1d5)][_0x4d0638(0x201)](_0x4bea0f[_0x4d0638(0x1d7)],{'name':_0x4bea0f[_0x4d0638(0x20e)],'anonymous':String(!!_0x4bea0f[_0x4d0638(0x1e9)])});}));}};m=p([f(0x0,_0x35f567),f(0x1,_0xfc7f2(_0x2cfbc7))],m);function h(_0x4daa19){'@babel/helpers - typeof';var _0x21cf0f=_0x3dfcb2;return h=typeof Symbol==_0x21cf0f(0x208)&&typeof Symbol[_0x21cf0f(0x203)]==_0x21cf0f(0x1ef)?function(_0x30170d){return typeof _0x30170d;}:function(_0x21abef){var _0x51cf5d=_0x21cf0f;return _0x21abef&&typeof Symbol==_0x51cf5d(0x208)&&_0x21abef[_0x51cf5d(0x1f3)]===Symbol&&_0x21abef!==Symbol[_0x51cf5d(0x200)]?_0x51cf5d(0x1ef):typeof _0x21abef;},h(_0x4daa19);}function g(_0x363cdf,_0x2fafc0){var _0x1551c3=_0x3dfcb2;if(h(_0x363cdf)!=_0x1551c3(0x1f1)||!_0x363cdf)return _0x363cdf;var _0xf127a3=_0x363cdf[Symbol[_0x1551c3(0x1d9)]];if(_0xf127a3!==void 0x0){var _0x1ef7a7=_0xf127a3[_0x1551c3(0x1d3)](_0x363cdf,_0x2fafc0||'default');if(h(_0x1ef7a7)!=_0x1551c3(0x1f1))return _0x1ef7a7;throw TypeError('@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.');}return(_0x2fafc0===_0x1551c3(0x20b)?String:Number)(_0x363cdf);}function _0xb0f0(){var _0x3c6ae1=['service','subscribe','prototype','identify','reset','iterator','1.0.0-alpha.6','phc_57fDHywG9pssGGW4JSHpc3Pq8hQ9puPnoWHoM6x30T7','onStarting','set','function','posthog','2186904ZdRfWO','string','delete','now','name','setConfig','capture','init','add','length','_performanceRecords','version','80420ImdGiZ','_init','call','includes','_telemetryService','disposeWithMe','userID','univer','toPrimitive','location','dispose','_userManagerService','currentUser$','trackPerformance','_config','debug','getOwnPropertyDescriptor','decorate','defineProperty','packageName','1259010kKQIAr','_injector','telemetry.config','8989410YPDJVS','anonymous','https://us.i.posthog.com','126waUwir','2761008pSqIow','3118030bLoUVv','startTime','symbol','performance_function_time_cost','object','15jeXRal','constructor','_posthog','2002147jRBpOK','$pageview','forEach','UNIVER_TELEMETRY_PLUGIN','_configService','5cEakjd','get','endTime','_trackService'];_0xb0f0=function(){return _0x3c6ae1;};return _0xb0f0();}function _(_0x241b50){var _0x836ac3=_0x3dfcb2,_0x59b87b=g(_0x241b50,_0x836ac3(0x20b));return h(_0x59b87b)==_0x836ac3(0x1ef)?_0x59b87b:_0x59b87b+'';}function v(_0x5ef31c,_0x482faf,_0x2a5102){var _0x5e3b6a=_0x3dfcb2;return(_0x482faf=_(_0x482faf))in _0x5ef31c?Object[_0x5e3b6a(0x1e3)](_0x5ef31c,_0x482faf,{'value':_0x2a5102,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x5ef31c[_0x482faf]=_0x2a5102,_0x5ef31c;}let y=class extends _0xa02cb3{constructor(_0x1352a6=d,_0x4e88f8,_0xf157ba){var _0x4fa75a=_0x3dfcb2;super(),this[_0x4fa75a(0x1df)]=_0x1352a6,this[_0x4fa75a(0x1e6)]=_0x4e88f8,this[_0x4fa75a(0x1f9)]=_0xf157ba;let {..._0xfa60b4}=_0x48f672({},d,this[_0x4fa75a(0x1df)]);this['_configService'][_0x4fa75a(0x20f)](_0x4fa75a(0x1e7),_0xfa60b4);}[_0x3dfcb2(0x206)](){var _0xf42c9e=_0x3dfcb2;if(!this['_config'][_0xf42c9e(0x1fe)])throw Error('[UniverTelemetryPlugin]:\x20Telemetry\x20service\x20not\x20provided');[[_0x35f567,{'useClass':this[_0xf42c9e(0x1df)][_0xf42c9e(0x1fe)]}],[m]][_0xf42c9e(0x1f7)](_0x20dba0=>this[_0xf42c9e(0x1e6)][_0xf42c9e(0x212)](_0x20dba0)),this[_0xf42c9e(0x1e6)][_0xf42c9e(0x1fb)](m);}};v(y,'pluginName',_0x3dfcb2(0x1f8)),v(y,_0x3dfcb2(0x1e4),l),v(y,_0x3dfcb2(0x1d0),u),y=p([f(0x1,_0xfc7f2(_0x3d5ffc)),f(0x2,_0x2ff16f)],y);var b=class extends _0x45fc83{constructor(_0x5dd602=!0x0){var _0xdb180c=_0x3dfcb2;super(),v(this,_0xdb180c(0x1cf),new Map()),v(this,_0xdb180c(0x1f4),void 0x0),_0x5dd602&&this[_0xdb180c(0x1d2)]();}get[_0x3dfcb2(0x209)](){return this['_posthog'];}['_init'](){var _0x23e264=_0x3dfcb2;typeof window<'u'&&window[_0x23e264(0x1da)]['host'][_0x23e264(0x1d4)](_0x23e264(0x1d8))&&this['init']();}[_0x3dfcb2(0x1e0)](){var _0x3fef0e=_0x3dfcb2,_0x2f6a38;(_0x2f6a38=this[_0x3fef0e(0x1f4)])==null||_0x2f6a38[_0x3fef0e(0x1e0)]();}[_0x3dfcb2(0x211)](_0x144a49){var _0x4bc535=_0x3dfcb2;let {token:_0x2a4141,..._0x279a73}={'token':_0x4bc535(0x205),'api_host':_0x4bc535(0x1ea),'person_profiles':'identified_only','capture_pageleave':!0x0,..._0x144a49};this[_0x4bc535(0x1f4)]=_0x2fc79a[_0x4bc535(0x211)](_0x2a4141,_0x279a73);}[_0x3dfcb2(0x202)](){var _0x3c66db=_0x3dfcb2,_0x329e01;(_0x329e01=this[_0x3c66db(0x1f4)])==null||_0x329e01[_0x3c66db(0x202)]();}[_0x3dfcb2(0x1ee)](_0x414649){var _0xbcb0dc=_0x3dfcb2;this[_0xbcb0dc(0x1cf)][_0xbcb0dc(0x207)](_0x414649,Date[_0xbcb0dc(0x20d)]());}[_0x3dfcb2(0x1fc)](_0x2b9a49){var _0x14c5e2=_0x3dfcb2;let _0x2d7964=this[_0x14c5e2(0x1cf)][_0x14c5e2(0x1fb)](_0x2b9a49);if(this['_performanceRecords'][_0x14c5e2(0x20c)](_0x2b9a49),_0x2d7964){let _0x45bdca=Date[_0x14c5e2(0x20d)]()-_0x2d7964;this['trackPerformance']({'duration':_0x45bdca,'functionName':_0x2b9a49});}}[_0x3dfcb2(0x1de)](_0x4ece35){var _0x1cb75b=_0x3dfcb2;this[_0x1cb75b(0x210)](_0x1cb75b(0x1f0),_0x4ece35);}[_0x3dfcb2(0x201)](_0x136e82,_0x1ea091){var _0x35ffa7=_0x3dfcb2,_0x329f0e;(_0x329f0e=this['_posthog'])==null||_0x329f0e[_0x35ffa7(0x201)](_0x136e82,_0x1ea091);}['capture'](_0x3c594e,_0x25740e){var _0x2e3d86=_0x3dfcb2,_0x3151f1;(_0x3151f1=this[_0x2e3d86(0x1f4)])==null||_0x3151f1[_0x2e3d86(0x210)](_0x3c594e,_0x25740e);}['onPageView'](_0x1544e9){var _0x245672=_0x3dfcb2,_0x303c1b;(_0x303c1b=this['_posthog'])==null||_0x303c1b[_0x245672(0x210)](_0x245672(0x1f6),{'$current_url':_0x1544e9});}[_0x3dfcb2(0x1db)](){var _0xdf18b5=_0x3dfcb2;super['dispose'](),this[_0xdf18b5(0x1cf)]['clear']();}};export{b as PosthogTelemetryService,y as UniverTelemetryPlugin};
1
+ var _0x38659c=_0x2beb;(function(_0x1d6f2b,_0x465051){var _0x1bedce=_0x2beb,_0x2f6b54=_0x1d6f2b();while(!![]){try{var _0x2d9e32=parseInt(_0x1bedce(0xad))/0x1+-parseInt(_0x1bedce(0x87))/0x2*(parseInt(_0x1bedce(0x7b))/0x3)+-parseInt(_0x1bedce(0x96))/0x4+parseInt(_0x1bedce(0x72))/0x5+-parseInt(_0x1bedce(0x92))/0x6*(parseInt(_0x1bedce(0x6f))/0x7)+-parseInt(_0x1bedce(0xa6))/0x8*(parseInt(_0x1bedce(0x86))/0x9)+parseInt(_0x1bedce(0x77))/0xa;if(_0x2d9e32===_0x465051)break;else _0x2f6b54['push'](_0x2f6b54['shift']());}catch(_0x5d2249){_0x2f6b54['push'](_0x2f6b54['shift']());}}}(_0xd6c3,0xa1efe));import{UniverLicensePlugin as _0x142d17}from'@univerjs-pro/license';import{DependentOn as _0x4ecb82,Disposable as _0x42977b,IConfigService as _0x28dfde,Inject as _0x437d96,Injector as _0x3207f5,Plugin as _0x1fcfe5,UserManagerService as _0x1289ad,merge as _0x8805b3}from'@univerjs/core';import{ITelemetryService as _0x43a7e9}from'@univerjs/telemetry';import _0x506fcf from'posthog-js';var d=_0x38659c(0x74),f=_0x38659c(0x80);const p={};function m(_0x33d52f,_0x5811e0){return function(_0x223129,_0x4cd274){_0x5811e0(_0x223129,_0x4cd274,_0x33d52f);};}function h(_0x1873ed,_0x9585bb,_0x3453c8,_0x5ec469){var _0x2b566a=_0x38659c,_0x6b8768=arguments[_0x2b566a(0x6b)],_0x28748b=_0x6b8768<0x3?_0x9585bb:_0x5ec469===null?_0x5ec469=Object[_0x2b566a(0x73)](_0x9585bb,_0x3453c8):_0x5ec469,_0x54525e;if(typeof Reflect==_0x2b566a(0x6e)&&typeof Reflect['decorate']=='function')_0x28748b=Reflect[_0x2b566a(0x8a)](_0x1873ed,_0x9585bb,_0x3453c8,_0x5ec469);else{for(var _0x59a5f0=_0x1873ed['length']-0x1;_0x59a5f0>=0x0;_0x59a5f0--)(_0x54525e=_0x1873ed[_0x59a5f0])&&(_0x28748b=(_0x6b8768<0x3?_0x54525e(_0x28748b):_0x6b8768>0x3?_0x54525e(_0x9585bb,_0x3453c8,_0x28748b):_0x54525e(_0x9585bb,_0x3453c8))||_0x28748b);}return _0x6b8768>0x3&&_0x28748b&&Object['defineProperty'](_0x9585bb,_0x3453c8,_0x28748b),_0x28748b;}function _0xd6c3(){var _0x345037=['onStarting','_userManagerService','1084123YsYDYS','_performanceRecords','symbol','_configService','pluginName','length','@@toPrimitive\x20must\x20return\x20a\x20primitive\x20value.','https://us.i.posthog.com','object','70pylgTH','posthog','_config','535595SHQIGY','getOwnPropertyDescriptor','@univerjs-pro/telemetry','_trackService','_init','21494120YoyntP','host','[UniverTelemetryPlugin]:\x20Telemetry\x20service\x20not\x20provided','performance_function_time_cost','27UIAOXv','now','setConfig','currentUser$','capture','1.0.0-alpha.8','forEach','call','identify','onPageView','default','72qUgNBa','190534LGWzTs','_telemetryService','debug','decorate','init','version','_posthog','univer','identified_only','delete','endTime','499962wzQFHM','toPrimitive','reset','iterator','2679420JNuPEk','subscribe','get','function','name','string','disposeWithMe','prototype','userID','defineProperty','_injector','phc_57fDHywG9pssGGW4JSHpc3Pq8hQ9puPnoWHoM6x30T7','clear','anonymous','includes','telemetry.config','316832ckKNNZ','constructor','packageName','dispose','trackPerformance'];_0xd6c3=function(){return _0x345037;};return _0xd6c3();}let g=class extends _0x42977b{constructor(_0x547b97,_0xd33eb7){var _0x5b9702=_0x38659c;super(),this[_0x5b9702(0x88)]=_0x547b97,this[_0x5b9702(0xac)]=_0xd33eb7,this[_0x5b9702(0x75)]();}[_0x38659c(0x75)](){var _0x40ddab=_0x38659c;this[_0x40ddab(0x9c)](this[_0x40ddab(0xac)][_0x40ddab(0x7e)][_0x40ddab(0x97)](_0x2a8cf0=>{var _0x2bc9bc=_0x40ddab;_0x2a8cf0&&this[_0x2bc9bc(0x88)][_0x2bc9bc(0x83)](_0x2a8cf0[_0x2bc9bc(0x9e)],{'name':_0x2a8cf0[_0x2bc9bc(0x9a)],'anonymous':String(!!_0x2a8cf0[_0x2bc9bc(0xa3)])});}));}};g=h([m(0x0,_0x43a7e9),m(0x1,_0x437d96(_0x1289ad))],g);function _(_0x3d75d9){'@babel/helpers - typeof';var _0x40ac31=_0x38659c;return _=typeof Symbol==_0x40ac31(0x99)&&typeof Symbol[_0x40ac31(0x95)]==_0x40ac31(0xaf)?function(_0x338548){return typeof _0x338548;}:function(_0x514a3b){var _0x5dbea4=_0x40ac31;return _0x514a3b&&typeof Symbol==_0x5dbea4(0x99)&&_0x514a3b[_0x5dbea4(0xa7)]===Symbol&&_0x514a3b!==Symbol[_0x5dbea4(0x9d)]?_0x5dbea4(0xaf):typeof _0x514a3b;},_(_0x3d75d9);}function v(_0x2a8cfe,_0x325df8){var _0x445826=_0x38659c;if(_(_0x2a8cfe)!=_0x445826(0x6e)||!_0x2a8cfe)return _0x2a8cfe;var _0x54c79b=_0x2a8cfe[Symbol[_0x445826(0x93)]];if(_0x54c79b!==void 0x0){var _0x223154=_0x54c79b[_0x445826(0x82)](_0x2a8cfe,_0x325df8||_0x445826(0x85));if(_(_0x223154)!=_0x445826(0x6e))return _0x223154;throw TypeError(_0x445826(0x6c));}return(_0x325df8===_0x445826(0x9b)?String:Number)(_0x2a8cfe);}function y(_0x493cf4){var _0x1a5663=_0x38659c,_0x2b7435=v(_0x493cf4,_0x1a5663(0x9b));return _(_0x2b7435)==_0x1a5663(0xaf)?_0x2b7435:_0x2b7435+'';}function b(_0x3f2e6f,_0x16113e,_0x2e2af4){var _0x104c70=_0x38659c;return(_0x16113e=y(_0x16113e))in _0x3f2e6f?Object[_0x104c70(0x9f)](_0x3f2e6f,_0x16113e,{'value':_0x2e2af4,'enumerable':!0x0,'configurable':!0x0,'writable':!0x0}):_0x3f2e6f[_0x16113e]=_0x2e2af4,_0x3f2e6f;}let x=class extends _0x1fcfe5{constructor(_0x4743d0=p,_0x45acbb,_0xca5d12){var _0x11dc79=_0x38659c;super(),this[_0x11dc79(0x71)]=_0x4743d0,this[_0x11dc79(0xa0)]=_0x45acbb,this[_0x11dc79(0xb0)]=_0xca5d12;let {..._0x2fd493}=_0x8805b3({},p,this[_0x11dc79(0x71)]);this[_0x11dc79(0xb0)][_0x11dc79(0x7d)](_0x11dc79(0xa5),_0x2fd493);}[_0x38659c(0xab)](){var _0x553305=_0x38659c;if(!this[_0x553305(0x71)]['service'])throw Error(_0x553305(0x79));[[_0x43a7e9,{'useClass':this[_0x553305(0x71)]['service']}],[g]][_0x553305(0x81)](_0x28b795=>this[_0x553305(0xa0)]['add'](_0x28b795)),this['_injector'][_0x553305(0x98)](g);}};b(x,_0x38659c(0x6a),'UNIVER_TELEMETRY_PLUGIN'),b(x,_0x38659c(0xa8),d),b(x,_0x38659c(0x8c),f),x=h([_0x4ecb82(_0x142d17),m(0x1,_0x437d96(_0x3207f5)),m(0x2,_0x28dfde)],x);function _0x2beb(_0x54e01f,_0x33d448){_0x54e01f=_0x54e01f-0x6a;var _0xd6c32b=_0xd6c3();var _0x2bebf2=_0xd6c32b[_0x54e01f];return _0x2bebf2;}var S=class extends _0x42977b{constructor(_0x3a3bd1=!0x0){var _0x2e8ca2=_0x38659c;super(),b(this,_0x2e8ca2(0xae),new Map()),b(this,'_posthog',void 0x0),_0x3a3bd1&&this[_0x2e8ca2(0x76)]();}get[_0x38659c(0x70)](){return this['_posthog'];}[_0x38659c(0x76)](){var _0x11b31a=_0x38659c;typeof window<'u'&&window['location'][_0x11b31a(0x78)][_0x11b31a(0xa4)](_0x11b31a(0x8e))&&this[_0x11b31a(0x8b)]();}[_0x38659c(0x89)](){var _0x5afa16=_0x38659c,_0x2c7ffa;(_0x2c7ffa=this[_0x5afa16(0x8d)])==null||_0x2c7ffa[_0x5afa16(0x89)]();}['init'](_0x52f3f2){var _0x24e2d0=_0x38659c;let {token:_0x485a19,..._0x381153}={'token':_0x24e2d0(0xa1),'api_host':_0x24e2d0(0x6d),'person_profiles':_0x24e2d0(0x8f),'capture_pageleave':!0x0,..._0x52f3f2};this[_0x24e2d0(0x8d)]=_0x506fcf[_0x24e2d0(0x8b)](_0x485a19,_0x381153);}[_0x38659c(0x94)](){var _0x3cfa9f=_0x38659c,_0x149850;(_0x149850=this[_0x3cfa9f(0x8d)])==null||_0x149850[_0x3cfa9f(0x94)]();}['startTime'](_0x2794a5){var _0x5f1269=_0x38659c;this['_performanceRecords']['set'](_0x2794a5,Date[_0x5f1269(0x7c)]());}[_0x38659c(0x91)](_0x3c0c98){var _0x3e38fa=_0x38659c;let _0x2bb8d0=this[_0x3e38fa(0xae)][_0x3e38fa(0x98)](_0x3c0c98);if(this['_performanceRecords'][_0x3e38fa(0x90)](_0x3c0c98),_0x2bb8d0){let _0x515a49=Date['now']()-_0x2bb8d0;this[_0x3e38fa(0xaa)]({'duration':_0x515a49,'functionName':_0x3c0c98});}}[_0x38659c(0xaa)](_0xbe7c5f){var _0x4249c8=_0x38659c;this['capture'](_0x4249c8(0x7a),_0xbe7c5f);}[_0x38659c(0x83)](_0x26f68b,_0x2c1a95){var _0x2ab209=_0x38659c,_0x2d06ff;(_0x2d06ff=this['_posthog'])==null||_0x2d06ff[_0x2ab209(0x83)](_0x26f68b,_0x2c1a95);}['capture'](_0x3d3632,_0x281518){var _0x1a9e20;(_0x1a9e20=this['_posthog'])==null||_0x1a9e20['capture'](_0x3d3632,_0x281518);}[_0x38659c(0x84)](_0x41e0e4){var _0x414c3f=_0x38659c,_0x2e2921;(_0x2e2921=this['_posthog'])==null||_0x2e2921[_0x414c3f(0x7f)]('$pageview',{'$current_url':_0x41e0e4});}[_0x38659c(0xa9)](){var _0x57c4c7=_0x38659c;super[_0x57c4c7(0xa9)](),this[_0x57c4c7(0xae)][_0x57c4c7(0xa2)]();}};export{S as PosthogTelemetryService,x as UniverTelemetryPlugin};