posthog-js
Advanced tools
Comparing version 1.205.1 to 1.206.0
@@ -1,2 +0,2 @@ | ||
!function(){"use strict";var e="undefined"!=typeof window?window:void 0,r="undefined"!=typeof globalThis?globalThis:e,n=Array.prototype.forEach,t=null==r?void 0:r.navigator,i=null==r?void 0:r.document,o=null==r?void 0:r.location;null==r||r.fetch,null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest&&r.XMLHttpRequest,null==r||r.AbortController;var a,s=null==t?void 0:t.userAgent,l=null!=e?e:{};function u(e,r){return-1!==e.indexOf(r)}!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var c=function(e){return e.replace(/^\$/,"")},p=Array.isArray,f=Object.prototype,d=f.hasOwnProperty,g=f.toString,v=p||function(e){return"[object Array]"===g.call(e)},h=e=>void 0===e,w=e=>null===e,_=e=>"[object Number]"==g.call(e),m={DEBUG:!1,LIB_VERSION:"1.205.1"},b=r=>{var n={_log:function(n){if(e&&l.POSTHOG_DEBUG&&!h(e.console)&&e.console){for(var t=("__rrweb_original__"in e.console[n]?e.console[n].__rrweb_original__:e.console[n]),i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];t(r,...o)}},info:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("error",...r)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(r,...n)},uninitializedWarning:e=>{n.error("You must initialize PostHog before calling ".concat(e))},createLogger:e=>b("".concat(r," ").concat(e))};return n},$=b("[PostHog.js]"),y={};function E(e,r,t){if(v(e))if(n&&e.forEach===n)e.forEach(r,t);else if("length"in e&&e.length===+e.length)for(var i=0,o=e.length;i<o;i++)if(i in e&&r.call(t,e[i],i)===y)return}function P(e,r,n){if(!h(t=e)&&!w(t)){var t;if(v(e))return E(e,r,n);if((e=>e instanceof FormData)(e)){for(var i of e.entries())if(r.call(n,i[1],i[0])===y)return}else for(var o in e)if(d.call(e,o)&&r.call(n,e[o],o)===y)return}}var x=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return E(n,(function(r){for(var n in r)void 0!==r[n]&&(e[n]=r[n])})),e},O=function(e){var r={};return P(e,(function(e,n){var t;t=e,"[object String]"==g.call(t)&&e.length>0&&(r[n]=e)})),r},R=e=>{var r=null==i?void 0:i.createElement("a");return h(r)?null:(r.href=e,r)},S=function(e,r){for(var n,t=((e.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<t.length;i++){var o=t[i].split("=");if(o[0]===r){n=o;break}}if(!v(n)||n.length<2)return"";var a=n[1];try{a=decodeURIComponent(a)}catch(e){$.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},B="Mobile",I="iOS",A="Android",k="Tablet",j=A+" "+k,C="iPad",M="Apple",F=M+" Watch",T="Safari",D="BlackBerry",L="Samsung",z=L+"Browser",U=L+" Internet",W="Chrome",N=W+" OS",H=W+" "+I,X="Internet Explorer",V=X+" "+B,q="Opera",G=q+" Mini",K="Edge",Z="Microsoft "+K,Q="Firefox",J=Q+" "+I,Y="Nintendo",ee="PlayStation",re="Xbox",ne=A+" "+B,te=B+" "+T,ie="Windows",oe=ie+" Phone",ae="Nokia",se="Ouya",le="Generic",ue=le+" "+B.toLowerCase(),ce=le+" "+k.toLowerCase(),pe="Konqueror",fe="(\\d+(\\.\\d+)?)",de=new RegExp("Version/"+fe),ge=new RegExp(re,"i"),ve=new RegExp(ee+" \\w+","i"),he=new RegExp(Y+" \\w+","i"),we=new RegExp(D+"|PlayBook|BB10","i"),_e={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};var me=(e,r)=>r&&u(r,M)||function(e){return u(e,T)&&!u(e,W)&&!u(e,A)}(e),be=function(e,r){return r=r||"",u(e," OPR/")&&u(e,"Mini")?G:u(e," OPR/")?q:we.test(e)?D:u(e,"IE"+B)||u(e,"WPDesktop")?V:u(e,z)?U:u(e,K)||u(e,"Edg/")?Z:u(e,"FBIOS")?"Facebook "+B:u(e,"UCWEB")||u(e,"UCBrowser")?"UC Browser":u(e,"CriOS")?H:u(e,"CrMo")||u(e,W)?W:u(e,A)&&u(e,T)?ne:u(e,"FxiOS")?J:u(e.toLowerCase(),pe.toLowerCase())?pe:me(e,r)?u(e,B)?te:T:u(e,Q)?Q:u(e,"MSIE")||u(e,"Trident/")?X:u(e,"Gecko")?Q:""},$e={[V]:[new RegExp("rv:"+fe)],[Z]:[new RegExp(K+"?\\/"+fe)],[W]:[new RegExp("("+W+"|CrMo)\\/"+fe)],[H]:[new RegExp("CriOS\\/"+fe)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+fe)],[T]:[de],[te]:[de],[q]:[new RegExp("(Opera|OPR)\\/"+fe)],[Q]:[new RegExp(Q+"\\/"+fe)],[J]:[new RegExp("FxiOS\\/"+fe)],[pe]:[new RegExp("Konqueror[:/]?"+fe,"i")],[D]:[new RegExp(D+" "+fe),de],[ne]:[new RegExp("android\\s"+fe,"i")],[U]:[new RegExp(z+"\\/"+fe)],[X]:[new RegExp("(rv:|MSIE )"+fe)],Mozilla:[new RegExp("rv:"+fe)]},ye=[[new RegExp(re+"; "+re+" (.*?)[);]","i"),e=>[re,e&&e[1]||""]],[new RegExp(Y,"i"),[Y,""]],[new RegExp(ee,"i"),[ee,""]],[we,[D,""]],[new RegExp(ie,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[oe,""];if(new RegExp(B).test(r)&&!/IEMobile\b/.test(r))return[ie+" "+B,""];var n=/Windows NT ([0-9.]+)/i.exec(r);if(n&&n[1]){var t=n[1],i=_e[t]||"";return/arm/i.test(r)&&(i="RT"),[ie,i]}return[ie,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var r=[e[3],e[4],e[5]||"0"];return[I,r.join(".")]}return[I,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=h(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+A+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+A+")","i"),e=>{if(e&&e[2]){var r=[e[2],e[3],e[4]||"0"];return[A,r.join(".")]}return[A,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var r=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];r[1]=n.join(".")}return r}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[N,""]],[/Linux|debian/i,["Linux",""]]],Ee=function(e){return he.test(e)?Y:ve.test(e)?ee:ge.test(e)?re:new RegExp(se,"i").test(e)?se:new RegExp("("+oe+"|WPDesktop)","i").test(e)?oe:/iPad/.test(e)?C:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?F:we.test(e)?D:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ae,"i").test(e)?ae:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(B).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?A:j:A:new RegExp("(pda|"+B+")","i").test(e)?ue:new RegExp(k,"i").test(e)&&!new RegExp(k+" pc","i").test(e)?ce:""},Pe="https?://(.*)",xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid"],Oe=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer"],Re={campaignParams:function(e){return i?this._campaignParamsFromUrl(i.URL,e):{}},_campaignParamsFromUrl:function(e,r){var n=xe.concat(r||[]),t={};return P(n,(function(r){var n=S(e,r);t[r]=n||null})),t},_searchEngine:function(e){return e?0===e.search(Pe+"google.([^/?]*)")?"google":0===e.search(Pe+"bing.com")?"bing":0===e.search(Pe+"yahoo.com")?"yahoo":0===e.search(Pe+"duckduckgo.com")?"duckduckgo":null:null},_searchInfoFromReferrer:function(e){var r=Re._searchEngine(e),n="yahoo"!=r?"q":"p",t={};if(!w(r)){t.$search_engine=r;var o=i?S(i.referrer,n):"";o.length&&(t.ph_keyword=o)}return t},searchInfo:function(){var e=null==i?void 0:i.referrer;return e?this._searchInfoFromReferrer(e):{}},browser:be,browserVersion:function(e,r){var n=be(e,r),t=$e[n];if(h(t))return null;for(var i=0;i<t.length;i++){var o=t[i],a=e.match(o);if(a)return parseFloat(a[a.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},browserLanguagePrefix:function(){var e=this.browserLanguage();return"string"==typeof e?e.split("-")[0]:void 0},os:function(e){for(var r=0;r<ye.length;r++){var[n,t]=ye[r],i=n.exec(e),o=i&&("function"==typeof t?t(i,e):t);if(o)return o}return["",""]},device:Ee,deviceType:function(e){var r=Ee(e);return r===C||r===j||"Kobo"===r||"Kindle Fire"===r||r===ce?k:r===Y||r===re||r===ee||r===se?"Console":r===F?"Wearable":r?B:"Desktop"},referrer:function(){return(null==i?void 0:i.referrer)||"$direct"},referringDomain:function(){var e;return null!=i&&i.referrer&&(null===(e=R(i.referrer))||void 0===e?void 0:e.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer().substring(0,1e3),u:null==o?void 0:o.href.substring(0,1e3)}},initialPersonPropsFromInfo:function(e){var r,{r:n,u:t}=e,i={$initial_referrer:n,$initial_referring_domain:null==n?void 0:"$direct"==n?"$direct":null===(r=R(n))||void 0===r?void 0:r.host};if(t){i.$initial_current_url=t;var o=R(t);i.$initial_host=null==o?void 0:o.host,i.$initial_pathname=null==o?void 0:o.pathname,P(this._campaignParamsFromUrl(t),(function(e,r){i["$initial_"+c(r)]=e}))}n&&P(this._searchInfoFromReferrer(n),(function(e,r){i["$initial_"+c(r)]=e}));return i},timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}},timezoneOffset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}},properties:function(){if(!s)return{};var[r,n]=Re.os(s);return x(O({$os:r,$os_version:n,$browser:Re.browser(s,navigator.vendor),$device:Re.device(s),$device_type:Re.deviceType(s),$timezone:Re.timezone(),$timezone_offset:Re.timezoneOffset()}),{$current_url:null==o?void 0:o.href,$host:null==o?void 0:o.host,$pathname:null==o?void 0:o.pathname,$raw_user_agent:s.length>1e3?s.substring(0,997)+"...":s,$browser_version:Re.browserVersion(s,navigator.vendor),$browser_language:Re.browserLanguage(),$browser_language_prefix:Re.browserLanguagePrefix(),$screen_height:null==e?void 0:e.screen.height,$screen_width:null==e?void 0:e.screen.width,$viewport_height:null==e?void 0:e.innerHeight,$viewport_width:null==e?void 0:e.innerWidth,$lib:"web",$lib_version:m.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})},people_properties:function(){if(!s)return{};var[e,r]=Re.os(s);return x(O({$os:e,$os_version:r,$browser:Re.browser(s,navigator.vendor)}),{$browser_version:Re.browserVersion(s,navigator.vendor)})}};function Se(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Be(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Se(Object(n),!0).forEach((function(r){Ie(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ie(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ae(e,r,n,t,i){return _(e)?e>n?n:e<r?r:e:Ae(n,r,n)}function ke(e,r){return[...e||[],...v(r)?r:[r]]}function je(e,r){return(h(e)?1:e)*r}function Ce(e,r){return function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return Math.abs(r)}(e)%100<Ae(100*r,0,100)}var Me=Object.freeze({__proto__:null,printAndDropEverything:e=>(console.log("Would have sent event:",e),null),sampleByDistinctId:function(e){return r=>r&&Ce(r.properties.distinct_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null},sampleByEvent:function(e,r){return n=>{var t,i,o;return n?u(e,n.event)?100*Math.random()<Ae(100*r,0,100)?Be(Be({},n),{},{properties:Be(Be({},n.properties),{},{$sample_type:ke(null===(t=n.properties)||void 0===t?void 0:t.$sample_type,"sampleByEvent"),$sample_threshold:je(null===(i=n.properties)||void 0===i?void 0:i.$sample_threshold,r),$sampled_events:ke(null===(o=n.properties)||void 0===o?void 0:o.$sampled_events,e)})}):null:n:null}},sampleBySessionId:function(e){return r=>r&&Ce(r.properties.$session_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:ke(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:je(r.properties.$sample_threshold,e)})}):null},setAllPersonProfilePropertiesAsPersonPropertiesForFlags:e=>{var r=x({},Re.properties(),Re.campaignParams(),Re.referrerInfo()),n={};P(r,(function(e,r){(u(xe,r)||u(Oe,r))&&(n[r]=e)})),e.setPersonPropertiesForFlags(n)}});l.posthogCustomizations=Me}(); | ||
!function(){"use strict";var e="undefined"!=typeof window?window:void 0,r="undefined"!=typeof globalThis?globalThis:e,n=Array.prototype.forEach,t=null==r?void 0:r.navigator,i=null==r?void 0:r.document,o=null==r?void 0:r.location;null==r||r.fetch,null!=r&&r.XMLHttpRequest&&"withCredentials"in new r.XMLHttpRequest&&r.XMLHttpRequest,null==r||r.AbortController;var a,s=null==t?void 0:t.userAgent,l=null!=e?e:{};function u(e,r){return-1!==e.indexOf(r)}!function(e){e.GZipJS="gzip-js",e.Base64="base64"}(a||(a={}));var c=function(e){return e.replace(/^\$/,"")},p=Array.isArray,f=Object.prototype,d=f.hasOwnProperty,g=f.toString,v=p||function(e){return"[object Array]"===g.call(e)},h=e=>void 0===e,w=e=>null===e,_=e=>"[object Number]"==g.call(e),m={DEBUG:!1,LIB_VERSION:"1.206.0"},b=r=>{var n={_log:function(n){if(e&&l.POSTHOG_DEBUG&&!h(e.console)&&e.console){for(var t=("__rrweb_original__"in e.console[n]?e.console[n].__rrweb_original__:e.console[n]),i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];t(r,...o)}},info:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("log",...r)},warn:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("warn",...r)},error:function(){for(var e=arguments.length,r=new Array(e),t=0;t<e;t++)r[t]=arguments[t];n._log("error",...r)},critical:function(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];console.error(r,...n)},uninitializedWarning:e=>{n.error("You must initialize PostHog before calling ".concat(e))},createLogger:e=>b("".concat(r," ").concat(e))};return n},$=b("[PostHog.js]"),y={};function E(e,r,t){if(v(e))if(n&&e.forEach===n)e.forEach(r,t);else if("length"in e&&e.length===+e.length)for(var i=0,o=e.length;i<o;i++)if(i in e&&r.call(t,e[i],i)===y)return}function P(e,r,n){if(!h(t=e)&&!w(t)){var t;if(v(e))return E(e,r,n);if((e=>e instanceof FormData)(e)){for(var i of e.entries())if(r.call(n,i[1],i[0])===y)return}else for(var o in e)if(d.call(e,o)&&r.call(n,e[o],o)===y)return}}var x=function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),t=1;t<r;t++)n[t-1]=arguments[t];return E(n,(function(r){for(var n in r)void 0!==r[n]&&(e[n]=r[n])})),e},O=function(e){var r={};return P(e,(function(e,n){var t;t=e,"[object String]"==g.call(t)&&e.length>0&&(r[n]=e)})),r},R=e=>{var r=null==i?void 0:i.createElement("a");return h(r)?null:(r.href=e,r)},S=function(e,r){for(var n,t=((e.split("#")[0]||"").split("?")[1]||"").split("&"),i=0;i<t.length;i++){var o=t[i].split("=");if(o[0]===r){n=o;break}}if(!v(n)||n.length<2)return"";var a=n[1];try{a=decodeURIComponent(a)}catch(e){$.error("Skipping decoding for malformed query param: "+a)}return a.replace(/\+/g," ")},B="Mobile",I="iOS",A="Android",k="Tablet",j=A+" "+k,C="iPad",M="Apple",F=M+" Watch",T="Safari",D="BlackBerry",L="Samsung",z=L+"Browser",U=L+" Internet",W="Chrome",N=W+" OS",H=W+" "+I,X="Internet Explorer",V=X+" "+B,q="Opera",G=q+" Mini",K="Edge",Z="Microsoft "+K,Q="Firefox",J=Q+" "+I,Y="Nintendo",ee="PlayStation",re="Xbox",ne=A+" "+B,te=B+" "+T,ie="Windows",oe=ie+" Phone",ae="Nokia",se="Ouya",le="Generic",ue=le+" "+B.toLowerCase(),ce=le+" "+k.toLowerCase(),pe="Konqueror",fe="(\\d+(\\.\\d+)?)",de=new RegExp("Version/"+fe),ge=new RegExp(re,"i"),ve=new RegExp(ee+" \\w+","i"),he=new RegExp(Y+" \\w+","i"),we=new RegExp(D+"|PlayBook|BB10","i"),_e={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"};var me=(e,r)=>r&&u(r,M)||function(e){return u(e,T)&&!u(e,W)&&!u(e,A)}(e),be=function(e,r){return r=r||"",u(e," OPR/")&&u(e,"Mini")?G:u(e," OPR/")?q:we.test(e)?D:u(e,"IE"+B)||u(e,"WPDesktop")?V:u(e,z)?U:u(e,K)||u(e,"Edg/")?Z:u(e,"FBIOS")?"Facebook "+B:u(e,"UCWEB")||u(e,"UCBrowser")?"UC Browser":u(e,"CriOS")?H:u(e,"CrMo")||u(e,W)?W:u(e,A)&&u(e,T)?ne:u(e,"FxiOS")?J:u(e.toLowerCase(),pe.toLowerCase())?pe:me(e,r)?u(e,B)?te:T:u(e,Q)?Q:u(e,"MSIE")||u(e,"Trident/")?X:u(e,"Gecko")?Q:""},$e={[V]:[new RegExp("rv:"+fe)],[Z]:[new RegExp(K+"?\\/"+fe)],[W]:[new RegExp("("+W+"|CrMo)\\/"+fe)],[H]:[new RegExp("CriOS\\/"+fe)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+fe)],[T]:[de],[te]:[de],[q]:[new RegExp("(Opera|OPR)\\/"+fe)],[Q]:[new RegExp(Q+"\\/"+fe)],[J]:[new RegExp("FxiOS\\/"+fe)],[pe]:[new RegExp("Konqueror[:/]?"+fe,"i")],[D]:[new RegExp(D+" "+fe),de],[ne]:[new RegExp("android\\s"+fe,"i")],[U]:[new RegExp(z+"\\/"+fe)],[X]:[new RegExp("(rv:|MSIE )"+fe)],Mozilla:[new RegExp("rv:"+fe)]},ye=[[new RegExp(re+"; "+re+" (.*?)[);]","i"),e=>[re,e&&e[1]||""]],[new RegExp(Y,"i"),[Y,""]],[new RegExp(ee,"i"),[ee,""]],[we,[D,""]],[new RegExp(ie,"i"),(e,r)=>{if(/Phone/.test(r)||/WPDesktop/.test(r))return[oe,""];if(new RegExp(B).test(r)&&!/IEMobile\b/.test(r))return[ie+" "+B,""];var n=/Windows NT ([0-9.]+)/i.exec(r);if(n&&n[1]){var t=n[1],i=_e[t]||"";return/arm/i.test(r)&&(i="RT"),[ie,i]}return[ie,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var r=[e[3],e[4],e[5]||"0"];return[I,r.join(".")]}return[I,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var r="";return e&&e.length>=3&&(r=h(e[2])?e[3]:e[2]),["watchOS",r]}],[new RegExp("("+A+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+A+")","i"),e=>{if(e&&e[2]){var r=[e[2],e[3],e[4]||"0"];return[A,r.join(".")]}return[A,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var r=["Mac OS X",""];if(e&&e[1]){var n=[e[1],e[2],e[3]||"0"];r[1]=n.join(".")}return r}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[N,""]],[/Linux|debian/i,["Linux",""]]],Ee=function(e){return he.test(e)?Y:ve.test(e)?ee:ge.test(e)?re:new RegExp(se,"i").test(e)?se:new RegExp("("+oe+"|WPDesktop)","i").test(e)?oe:/iPad/.test(e)?C:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?F:we.test(e)?D:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(ae,"i").test(e)?ae:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(B).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?A:j:A:new RegExp("(pda|"+B+")","i").test(e)?ue:new RegExp(k,"i").test(e)&&!new RegExp(k+" pc","i").test(e)?ce:""},Pe="https?://(.*)",xe=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gclid","gad_source","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","mc_cid","igshid","ttclid","rdt_cid","irclid","_kx"],Oe=["$app_build","$app_name","$app_namespace","$app_version","$browser","$browser_version","$device_type","$current_url","$pathname","$os","$os_name","$os_version","$referring_domain","$referrer"],Re={campaignParams:function(e){return i?this._campaignParamsFromUrl(i.URL,e):{}},_campaignParamsFromUrl:function(e,r){var n=xe.concat(r||[]),t={};return P(n,(function(r){var n=S(e,r);t[r]=n||null})),t},_searchEngine:function(e){return e?0===e.search(Pe+"google.([^/?]*)")?"google":0===e.search(Pe+"bing.com")?"bing":0===e.search(Pe+"yahoo.com")?"yahoo":0===e.search(Pe+"duckduckgo.com")?"duckduckgo":null:null},_searchInfoFromReferrer:function(e){var r=Re._searchEngine(e),n="yahoo"!=r?"q":"p",t={};if(!w(r)){t.$search_engine=r;var o=i?S(i.referrer,n):"";o.length&&(t.ph_keyword=o)}return t},searchInfo:function(){var e=null==i?void 0:i.referrer;return e?this._searchInfoFromReferrer(e):{}},browser:be,browserVersion:function(e,r){var n=be(e,r),t=$e[n];if(h(t))return null;for(var i=0;i<t.length;i++){var o=t[i],a=e.match(o);if(a)return parseFloat(a[a.length-2])}return null},browserLanguage:function(){return navigator.language||navigator.userLanguage},browserLanguagePrefix:function(){var e=this.browserLanguage();return"string"==typeof e?e.split("-")[0]:void 0},os:function(e){for(var r=0;r<ye.length;r++){var[n,t]=ye[r],i=n.exec(e),o=i&&("function"==typeof t?t(i,e):t);if(o)return o}return["",""]},device:Ee,deviceType:function(e){var r=Ee(e);return r===C||r===j||"Kobo"===r||"Kindle Fire"===r||r===ce?k:r===Y||r===re||r===ee||r===se?"Console":r===F?"Wearable":r?B:"Desktop"},referrer:function(){return(null==i?void 0:i.referrer)||"$direct"},referringDomain:function(){var e;return null!=i&&i.referrer&&(null===(e=R(i.referrer))||void 0===e?void 0:e.host)||"$direct"},referrerInfo:function(){return{$referrer:this.referrer(),$referring_domain:this.referringDomain()}},initialPersonInfo:function(){return{r:this.referrer().substring(0,1e3),u:null==o?void 0:o.href.substring(0,1e3)}},initialPersonPropsFromInfo:function(e){var r,{r:n,u:t}=e,i={$initial_referrer:n,$initial_referring_domain:null==n?void 0:"$direct"==n?"$direct":null===(r=R(n))||void 0===r?void 0:r.host};if(t){i.$initial_current_url=t;var o=R(t);i.$initial_host=null==o?void 0:o.host,i.$initial_pathname=null==o?void 0:o.pathname,P(this._campaignParamsFromUrl(t),(function(e,r){i["$initial_"+c(r)]=e}))}n&&P(this._searchInfoFromReferrer(n),(function(e,r){i["$initial_"+c(r)]=e}));return i},timezone:function(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch(e){return}},timezoneOffset:function(){try{return(new Date).getTimezoneOffset()}catch(e){return}},properties:function(){if(!s)return{};var[r,n]=Re.os(s);return x(O({$os:r,$os_version:n,$browser:Re.browser(s,navigator.vendor),$device:Re.device(s),$device_type:Re.deviceType(s),$timezone:Re.timezone(),$timezone_offset:Re.timezoneOffset()}),{$current_url:null==o?void 0:o.href,$host:null==o?void 0:o.host,$pathname:null==o?void 0:o.pathname,$raw_user_agent:s.length>1e3?s.substring(0,997)+"...":s,$browser_version:Re.browserVersion(s,navigator.vendor),$browser_language:Re.browserLanguage(),$browser_language_prefix:Re.browserLanguagePrefix(),$screen_height:null==e?void 0:e.screen.height,$screen_width:null==e?void 0:e.screen.width,$viewport_height:null==e?void 0:e.innerHeight,$viewport_width:null==e?void 0:e.innerWidth,$lib:"web",$lib_version:m.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})},people_properties:function(){if(!s)return{};var[e,r]=Re.os(s);return x(O({$os:e,$os_version:r,$browser:Re.browser(s,navigator.vendor)}),{$browser_version:Re.browserVersion(s,navigator.vendor)})}};function Se(e,r){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(e);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable}))),n.push.apply(n,t)}return n}function Be(e){for(var r=1;r<arguments.length;r++){var n=null!=arguments[r]?arguments[r]:{};r%2?Se(Object(n),!0).forEach((function(r){Ie(e,r,n[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))}))}return e}function Ie(e,r,n){return r in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,e}function Ae(e,r,n,t,i){return _(e)?e>n?n:e<r?r:e:Ae(n,r,n)}function ke(e,r){return[...e||[],...v(r)?r:[r]]}function je(e,r){return(h(e)?1:e)*r}function Ce(e,r){return function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return Math.abs(r)}(e)%100<Ae(100*r,0,100)}var Me=Object.freeze({__proto__:null,printAndDropEverything:e=>(console.log("Would have sent event:",e),null),sampleByDistinctId:function(e){return r=>r&&Ce(r.properties.distinct_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:["sampleByDistinctId"],$sample_threshold:e})}):null},sampleByEvent:function(e,r){return n=>{var t,i,o;return n?u(e,n.event)?100*Math.random()<Ae(100*r,0,100)?Be(Be({},n),{},{properties:Be(Be({},n.properties),{},{$sample_type:ke(null===(t=n.properties)||void 0===t?void 0:t.$sample_type,"sampleByEvent"),$sample_threshold:je(null===(i=n.properties)||void 0===i?void 0:i.$sample_threshold,r),$sampled_events:ke(null===(o=n.properties)||void 0===o?void 0:o.$sampled_events,e)})}):null:n:null}},sampleBySessionId:function(e){return r=>r&&Ce(r.properties.$session_id,e)?Be(Be({},r),{},{properties:Be(Be({},r.properties),{},{$sample_type:ke(r.properties.$sample_type,"sampleBySessionId"),$sample_threshold:je(r.properties.$sample_threshold,e)})}):null},setAllPersonProfilePropertiesAsPersonPropertiesForFlags:e=>{var r=x({},Re.properties(),Re.campaignParams(),Re.referrerInfo()),n={};P(r,(function(e,r){(u(xe,r)||u(Oe,r))&&(n[r]=e)})),e.setPersonPropertiesForFlags(n)}});l.posthogCustomizations=Me}(); | ||
//# sourceMappingURL=customizations.full.js.map |
@@ -47,5 +47,5 @@ export declare const PEOPLE_DISTINCT_ID_KEY = "$people_distinct_id"; | ||
* */ | ||
export declare const COOKIELESS_SENTINEL_VALUE = "$posthog_cklsh"; | ||
export declare const COOKIELESS_MODE_FLAG_PROPERTY = "$cklsh_mode"; | ||
export declare const COOKIELESS_SENTINEL_VALUE = "$posthog_cookieless"; | ||
export declare const COOKIELESS_MODE_FLAG_PROPERTY = "$cookieless_mode"; | ||
export declare const WEB_EXPERIMENTS = "$web_experiments"; | ||
export declare const PERSISTENCE_RESERVED_PROPERTIES: string[]; |
{ | ||
"name": "posthog-js", | ||
"version": "1.205.1", | ||
"version": "1.206.0", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
@@ -47,5 +47,5 @@ export declare const PEOPLE_DISTINCT_ID_KEY = "$people_distinct_id"; | ||
* */ | ||
export declare const COOKIELESS_SENTINEL_VALUE = "$posthog_cklsh"; | ||
export declare const COOKIELESS_MODE_FLAG_PROPERTY = "$cklsh_mode"; | ||
export declare const COOKIELESS_SENTINEL_VALUE = "$posthog_cookieless"; | ||
export declare const COOKIELESS_MODE_FLAG_PROPERTY = "$cookieless_mode"; | ||
export declare const WEB_EXPERIMENTS = "$web_experiments"; | ||
export declare const PERSISTENCE_RESERVED_PROPERTIES: string[]; |
@@ -52,4 +52,4 @@ /* | ||
* */ | ||
export var COOKIELESS_SENTINEL_VALUE = '$posthog_cklsh'; | ||
export var COOKIELESS_MODE_FLAG_PROPERTY = '$cklsh_mode'; | ||
export var COOKIELESS_SENTINEL_VALUE = '$posthog_cookieless'; | ||
export var COOKIELESS_MODE_FLAG_PROPERTY = '$cookieless_mode'; | ||
export var WEB_EXPERIMENTS = '$web_experiments'; | ||
@@ -56,0 +56,0 @@ // These are properties that are reserved and will not be automatically included in events |
@@ -46,2 +46,4 @@ var __read = (this && this.__read) || function (o, n) { | ||
'rdt_cid', // reddit | ||
'irclid', // impact | ||
'_kx', // klaviyo | ||
]; | ||
@@ -48,0 +50,0 @@ export var EVENT_TO_PERSON_PROPERTIES = [ |
{ | ||
"name": "posthog-js", | ||
"version": "1.205.1", | ||
"version": "1.206.0", | ||
"description": "Posthog-js allows you to automatically capture usage and send events to PostHog.", | ||
@@ -5,0 +5,0 @@ "repository": "https://github.com/PostHog/posthog-js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
19395656
43715
51
4
15
1
299