posthog-js 1.25.0 → 1.26.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/CHANGELOG.md CHANGED
@@ -1,3 +1,16 @@
1
+ ## 1.26.0 - 2022-07-19
2
+
3
+ - fix: dont set initial referrer (#426)
4
+
5
+ ## 1.25.2 - 2022-07-12
6
+
7
+ - feat: Add msclkid param to campaign keywords (#424)
8
+ - chore(deps): Update @sentry/types for 7.2.0 (#412)
9
+
10
+ ## 1.25.1 - 2022-06-29
11
+
12
+ - fix: Add facebook crawlers to blocked user agents (#417)
13
+
1
14
  ## 1.25.0 - 2022-06-28
2
15
 
3
16
  - feat(feature-flags): Enable experience continuity (#404)
package/dist/array.js CHANGED
@@ -1,11 +1,11 @@
1
1
  parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c<t.length;c++)try{f(t[c])}catch(e){i||(i=e)}if(t.length){var l=f(t[t.length-1]);"object"==typeof exports&&"undefined"!=typeof module?module.exports=l:"function"==typeof define&&define.amd?define(function(){return l}):n&&(this[n]=l)}if(parcelRequire=f,i)throw i;return f}({"zdbk":[function(require,module,exports) {
2
2
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.LZString=void 0;var o=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",n={};function t(o,r){if(!n[o]){n[o]={};for(var e=0;e<o.length;e++)n[o][o.charAt(e)]=e}return n[o][r]}var s={compressToBase64:function(o){if(null==o)return"";var e=s._compress(o,6,function(o){return r.charAt(o)});switch(e.length%4){default:case 0:return e;case 1:return e+"===";case 2:return e+"==";case 3:return e+"="}},decompressFromBase64:function(o){return null==o?"":""==o?null:s._decompress(o.length,32,function(e){return t(r,o.charAt(e))})},compressToUTF16:function(r){return null==r?"":s._compress(r,15,function(r){return o(r+32)})+" "},decompressFromUTF16:function(o){return null==o?"":""==o?null:s._decompress(o.length,16384,function(r){return o.charCodeAt(r)-32})},compressToUint8Array:function(o){for(var r=s.compress(o),e=new Uint8Array(2*r.length),n=0,t=r.length;n<t;n++){var i=r.charCodeAt(n);e[2*n]=i>>>8,e[2*n+1]=i%256}return e},decompressFromUint8Array:function(r){if(null==r)return s.decompress(r);for(var e=new Array(r.length/2),n=0,t=e.length;n<t;n++)e[n]=256*r[2*n]+r[2*n+1];var i=[];return e.forEach(function(r){i.push(o(r))}),s.decompress(i.join(""))},compressToEncodedURIComponent:function(o){return null==o?"":s._compress(o,6,function(o){return e.charAt(o)})},decompressFromEncodedURIComponent:function(o){return null==o?"":""==o?null:(o=o.replace(/ /g,"+"),s._decompress(o.length,32,function(r){return t(e,o.charAt(r))}))},compress:function(r){return s._compress(r,16,function(r){return o(r)})},_compress:function(o,r,e){if(null==o)return"";var n,t,s,i={},p={},c="",a="",u="",l=2,f=3,h=2,d=[],m=0,v=0;for(s=0;s<o.length;s+=1)if(c=o.charAt(s),Object.prototype.hasOwnProperty.call(i,c)||(i[c]=f++,p[c]=!0),a=u+c,Object.prototype.hasOwnProperty.call(i,a))u=a;else{if(Object.prototype.hasOwnProperty.call(p,u)){if(u.charCodeAt(0)<256){for(n=0;n<h;n++)m<<=1,v==r-1?(v=0,d.push(e(m)),m=0):v++;for(t=u.charCodeAt(0),n=0;n<8;n++)m=m<<1|1&t,v==r-1?(v=0,d.push(e(m)),m=0):v++,t>>=1}else{for(t=1,n=0;n<h;n++)m=m<<1|t,v==r-1?(v=0,d.push(e(m)),m=0):v++,t=0;for(t=u.charCodeAt(0),n=0;n<16;n++)m=m<<1|1&t,v==r-1?(v=0,d.push(e(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete p[u]}else for(t=i[u],n=0;n<h;n++)m=m<<1|1&t,v==r-1?(v=0,d.push(e(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++),i[a]=f++,u=String(c)}if(""!==u){if(Object.prototype.hasOwnProperty.call(p,u)){if(u.charCodeAt(0)<256){for(n=0;n<h;n++)m<<=1,v==r-1?(v=0,d.push(e(m)),m=0):v++;for(t=u.charCodeAt(0),n=0;n<8;n++)m=m<<1|1&t,v==r-1?(v=0,d.push(e(m)),m=0):v++,t>>=1}else{for(t=1,n=0;n<h;n++)m=m<<1|t,v==r-1?(v=0,d.push(e(m)),m=0):v++,t=0;for(t=u.charCodeAt(0),n=0;n<16;n++)m=m<<1|1&t,v==r-1?(v=0,d.push(e(m)),m=0):v++,t>>=1}0==--l&&(l=Math.pow(2,h),h++),delete p[u]}else for(t=i[u],n=0;n<h;n++)m=m<<1|1&t,v==r-1?(v=0,d.push(e(m)),m=0):v++,t>>=1;0==--l&&(l=Math.pow(2,h),h++)}for(t=2,n=0;n<h;n++)m=m<<1|1&t,v==r-1?(v=0,d.push(e(m)),m=0):v++,t>>=1;for(;;){if(m<<=1,v==r-1){d.push(e(m));break}v++}return d.join("")},decompress:function(o){return null==o?"":""==o?null:s._decompress(o.length,32768,function(r){return o.charCodeAt(r)})},_decompress:function(r,e,n){var t,s,i,p,c,a,u,l=[],f=4,h=4,d=3,m="",v=[],w={val:n(0),position:e,index:1};for(t=0;t<3;t+=1)l[t]=t;for(i=0,c=Math.pow(2,2),a=1;a!=c;)p=w.val&w.position,w.position>>=1,0==w.position&&(w.position=e,w.val=n(w.index++)),i|=(p>0?1:0)*a,a<<=1;switch(i){case 0:for(i=0,c=Math.pow(2,8),a=1;a!=c;)p=w.val&w.position,w.position>>=1,0==w.position&&(w.position=e,w.val=n(w.index++)),i|=(p>0?1:0)*a,a<<=1;u=o(i);break;case 1:for(i=0,c=Math.pow(2,16),a=1;a!=c;)p=w.val&w.position,w.position>>=1,0==w.position&&(w.position=e,w.val=n(w.index++)),i|=(p>0?1:0)*a,a<<=1;u=o(i);break;case 2:return""}for(l[3]=u,s=u,v.push(u);;){if(w.index>r)return"";for(i=0,c=Math.pow(2,d),a=1;a!=c;)p=w.val&w.position,w.position>>=1,0==w.position&&(w.position=e,w.val=n(w.index++)),i|=(p>0?1:0)*a,a<<=1;switch(u=i){case 0:for(i=0,c=Math.pow(2,8),a=1;a!=c;)p=w.val&w.position,w.position>>=1,0==w.position&&(w.position=e,w.val=n(w.index++)),i|=(p>0?1:0)*a,a<<=1;l[h++]=o(i),u=h-1,f--;break;case 1:for(i=0,c=Math.pow(2,16),a=1;a!=c;)p=w.val&w.position,w.position>>=1,0==w.position&&(w.position=e,w.val=n(w.index++)),i|=(p>0?1:0)*a,a<<=1;l[h++]=o(i),u=h-1,f--;break;case 2:return v.join("")}if(0==f&&(f=Math.pow(2,d),d++),l[u])m=l[u];else{if(u!==h)return null;m=s+s.charAt(0)}v.push(m),l[h++]=s+m.charAt(0),s=m,0==--f&&(f=Math.pow(2,d),d++)}}};exports.LZString=s;
3
3
  },{}],"EHrm":[function(require,module,exports) {
4
- module.exports={name:"posthog-js",version:"1.25.0",description:"Posthog-js allows you to automatically capture usage and send events to PostHog.",repository:"https://github.com/PostHog/posthog-js",author:"hey@posthog.com",license:"MIT",scripts:{start:"parcel watch src/loader-globals.js --out-file dist/array.js",serve:"parcel serve src/loader-globals.js --port 3001 --out-file dist/array.js",build:"yarn build-array && yarn build-module && yarn build-es-module && yarn process-types && yarn build-react","build-array":"parcel build src/loader-globals.js --out-file dist/array.js --no-source-maps","build-module":"rollup -i src/loader-module.js -f cjs -o dist/module.js -c rollup.config.js","build-es-module":"rollup -i src/loader-module.js -f es -o dist/es.js -c rollup.config.js","build-react":"cd react; yarn; yarn build;","process-types":"mkdir -p dist; eslint src --ext .ts -c .eslintrc.ts.js --fix && tsc && cp -f src/*.d.ts dist/",lint:"eslint src --fix",prepublishOnly:"yarn lint && yarn test && yarn build && yarn test-react",test:"jest src","test-react":"cd react; yarn test","test-watch":"jest --watch src",cypress:"cypress open"},main:"dist/module.js",module:"dist/es.js",files:["dist/*","react/dist/*"],dependencies:{"@sentry/types":"^6.11.0",fflate:"^0.4.1","rrweb-snapshot":"^1.1.14"},devDependencies:{"@babel/core":"7.12.10","@babel/preset-env":"7.12.11","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^8.1.0","@typescript-eslint/eslint-plugin":"^3.5.0","@typescript-eslint/parser":"^3.5.0","babel-eslint":"10.1.0","babel-jest":"^26.6.3",cypress:"^9.2.0",eslint:"7.3.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","fast-check":"^2.17.0",given2:"^2.1.7",husky:"^4.2.5",jest:"^27.5.1",jsdom:"16.2.2","jsdom-global":"3.0.2","lint-staged":"^10.2.11",localStorage:"1.0.4","node-fetch":"^2.6.1",parcel:"^1.12.4","posthog-js":"link:.",prettier:"^2.0.5",rollup:"^2.18.2",rrweb:"^1.1.3",sinon:"9.0.2",testcafe:"^1.19.0","testcafe-browser-provider-browserstack":"^1.14.0",typescript:"^3.9.6"},husky:{hooks:{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,tsx,js,json}":"prettier --write","*.{ts,tsx}":["eslint -c .eslintrc.ts.js --fix","tsc --noEmit --esModuleInterop --jsx react"]},jest:{testPathIgnorePatterns:["/node_modules/","/cypress/","/react/","/test_data/"],moduleFileExtensions:["js","json"],setupFilesAfterEnv:["given2/setup","./src/__tests__/setup.js"],modulePathIgnorePatterns:["src/__tests__/setup.js"],clearMocks:!0,testEnvironment:"jsdom"}};
4
+ module.exports={name:"posthog-js",version:"1.26.0",description:"Posthog-js allows you to automatically capture usage and send events to PostHog.",repository:"https://github.com/PostHog/posthog-js",author:"hey@posthog.com",license:"MIT",scripts:{start:"parcel watch src/loader-globals.js --out-file dist/array.js",serve:"parcel serve src/loader-globals.js --port 3001 --out-file dist/array.js",build:"yarn build-array && yarn build-module && yarn build-es-module && yarn process-types && yarn build-react","build-array":"parcel build src/loader-globals.js --out-file dist/array.js --no-source-maps","build-module":"rollup -i src/loader-module.js -f cjs -o dist/module.js -c rollup.config.js","build-es-module":"rollup -i src/loader-module.js -f es -o dist/es.js -c rollup.config.js","build-react":"cd react; yarn; yarn build;","process-types":"mkdir -p dist; eslint src --ext .ts -c .eslintrc.ts.js --fix && tsc && cp -f src/*.d.ts dist/",lint:"eslint src --fix",prepublishOnly:"yarn lint && yarn test && yarn build && yarn test-react",test:"jest src","test-react":"cd react; yarn test","test-watch":"jest --watch src",cypress:"cypress open"},main:"dist/module.js",module:"dist/es.js",files:["dist/*","react/dist/*"],dependencies:{"@sentry/types":"^7.2.0",fflate:"^0.4.1","rrweb-snapshot":"^1.1.14"},devDependencies:{"@babel/core":"7.12.10","@babel/preset-env":"7.12.11","@rollup/plugin-babel":"^5.2.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^8.1.0","@typescript-eslint/eslint-plugin":"^3.5.0","@typescript-eslint/parser":"^3.5.0","babel-eslint":"10.1.0","babel-jest":"^26.6.3",cypress:"^9.2.0",eslint:"7.3.1","eslint-plugin-prettier":"^3.1.4","eslint-plugin-react":"^7.21.5","eslint-plugin-react-hooks":"^4.2.0","fast-check":"^2.17.0",given2:"^2.1.7",husky:"^4.2.5",jest:"^27.5.1",jsdom:"16.2.2","jsdom-global":"3.0.2","lint-staged":"^10.2.11",localStorage:"1.0.4","node-fetch":"^2.6.1",parcel:"^1.12.4","posthog-js":"link:.",prettier:"^2.0.5",rollup:"^2.18.2",rrweb:"^1.1.3",sinon:"9.0.2",testcafe:"^1.19.0","testcafe-browser-provider-browserstack":"^1.14.0",typescript:"^3.9.6"},husky:{hooks:{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,tsx,js,json}":"prettier --write","*.{ts,tsx}":["eslint -c .eslintrc.ts.js --fix","tsc --noEmit --esModuleInterop --jsx react"]},jest:{testPathIgnorePatterns:["/node_modules/","/cypress/","/react/","/test_data/"],moduleFileExtensions:["js","json"],setupFilesAfterEnv:["given2/setup","./src/__tests__/setup.js"],modulePathIgnorePatterns:["src/__tests__/setup.js"],clearMocks:!0,testEnvironment:"jsdom"}};
5
5
  },{}],"itQ5":[function(require,module,exports) {
6
6
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=require("../package.json"),r={DEBUG:!1,LIB_VERSION:e.version},t=r;exports.default=t;
7
7
  },{"../package.json":"EHrm"}],"FOZT":[function(require,module,exports) {
8
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.COPY_IN_PROGRESS_ATTRIBUTE=exports.document=exports.logger=exports.userAgent=exports._=exports.window=void 0;var e=r(require("./config"));function r(e){return e&&e.__esModule?e:{default:e}}var n=Array.prototype,o=Function.prototype,t=Object.prototype,i=n.slice,c=t.toString,a=t.hasOwnProperty,s="undefined"!=typeof window?window:{},u=s.navigator||{userAgent:""},d=s.document||{},l=u.userAgent;exports.userAgent=l,exports.document=d,exports.window=s;var f=o.bind,p=n.forEach,w=n.indexOf,h=Array.isArray,g={},b={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};exports._=b;var v={log:function(){if(e.default.DEBUG&&!b.isUndefined(window.console)&&window.console){var r=window.console.log.__rrweb_original__?window.console.log.__rrweb_original__:window.console.log;try{r.apply(window.console,arguments)}catch(n){b.each(arguments,function(e){r(e)})}}},error:function(){if(e.default.DEBUG&&!b.isUndefined(window.console)&&window.console){var r=["PostHog error:"].concat(Array.prototype.slice.call(arguments)),n=window.console.error.__rrweb_original__?window.console.error.__rrweb_original__:window.console.error;try{n.apply(window.console,r)}catch(o){b.each(r,function(e){n(e)})}}},critical:function(){if(!b.isUndefined(window.console)&&window.console){var e=["PostHog error:"].concat(Array.prototype.slice.call(arguments)),r=window.console.error.__rrweb_original__?window.console.error.__rrweb_original__:window.console.error;try{r.apply(window.console,e)}catch(n){b.each(e,function(e){r(e)})}}}};exports.logger=v,b.bind=function(e,r){var n,o;if(f&&e.bind===f)return f.apply(e,i.call(arguments,1));if(!b.isFunction(e))throw new TypeError;return n=i.call(arguments,2),o=function(){if(!(this instanceof o))return e.apply(r,n.concat(i.call(arguments)));var t={};t.prototype=e.prototype;var c=new t;t.prototype=null;var a=e.apply(c,n.concat(i.call(arguments)));return Object(a)===a?a:c}},b.bind_instance_methods=function(e){for(var r in e)"function"==typeof e[r]&&(e[r]=b.bind(e[r],e))},b.each=function(e,r,n){if(null!=e)if(p&&e.forEach===p)e.forEach(r,n);else if(e.length===+e.length){for(var o=0,t=e.length;o<t;o++)if(o in e&&r.call(n,e[o],o,e)===g)return}else for(var i in e)if(a.call(e,i)&&r.call(n,e[i],i,e)===g)return},b.extend=function(e){return b.each(i.call(arguments,1),function(r){for(var n in r)void 0!==r[n]&&(e[n]=r[n])}),e},b.isArray=h||function(e){return"[object Array]"===c.call(e)},b.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(r){return!1}},b.include=function(e,r){var n=!1;return null===e?n:w&&e.indexOf===w?-1!=e.indexOf(r):(b.each(e,function(e){if(n||(n=e===r))return g}),n)},b.includes=function(e,r){return-1!==e.indexOf(r)},b.isObject=function(e){return e===Object(e)&&!b.isArray(e)},b.isEmptyObject=function(e){if(b.isObject(e)){for(var r in e)if(a.call(e,r))return!1;return!0}return!1},b.isUndefined=function(e){return void 0===e},b.isString=function(e){return"[object String]"==c.call(e)},b.isDate=function(e){return"[object Date]"==c.call(e)},b.isNumber=function(e){return"[object Number]"==c.call(e)},b.encodeDates=function(e){return b.each(e,function(r,n){b.isDate(r)?e[n]=b.formatDate(r):b.isObject(r)&&(e[n]=b.encodeDates(r))}),e},b.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},b.formatDate=function(e){function r(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())},b.safewrap=function(r){return function(){try{return r.apply(this,arguments)}catch(n){v.critical("Implementation error. Please turn on debug and contact support@posthog.com."),e.default.DEBUG&&v.critical(n)}}},b.safewrap_class=function(e,r){for(var n=0;n<r.length;n++)e.prototype[r[n]]=b.safewrap(e.prototype[r[n]])},b.safewrap_instance_methods=function(e){for(var r in e)"function"==typeof e[r]&&(e[r]=b.safewrap(e[r]))},b.strip_empty_properties=function(e){var r={};return b.each(e,function(e,n){b.isString(e)&&e.length>0&&(r[n]=e)}),r};var _="undefined"!=typeof Symbol?Symbol("__deepCircularCopyInProgress__"):"__deepCircularCopyInProgress__";function y(e,r,n){return e!==Object(e)?r?r(e,n):e:e[_]?void 0:(e[_]=!0,b.isArray(e)?(o=[],b.each(e,function(e){o.push(y(e,r))})):(o={},b.each(e,function(e,n){n!==_&&(o[n]=y(e,r,n))})),delete e[_],o);var o}exports.COPY_IN_PROGRESS_ATTRIBUTE=_;var m=["$performance_raw"];b.copyAndTruncateStrings=function(e,r){return y(e,function(e,n){return n&&m.indexOf(n)>-1?e:("string"==typeof e&&null!==r&&(e=e.slice(0,r)),e)})},b.base64Encode=function(e){var r,n,o,t,i,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,s=0,u="",d=[];if(!e)return e;e=b.utf8Encode(e);do{r=(i=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=i>>12&63,o=i>>6&63,t=63&i,d[s++]=c.charAt(r)+c.charAt(n)+c.charAt(o)+c.charAt(t)}while(a<e.length);switch(u=d.join(""),e.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u},b.utf8Encode=function(e){var r,n,o,t,i="";for(r=n=0,o=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,t=0;t<o;t++){var c=e.charCodeAt(t),a=null;c<128?n++:a=c>127&&c<2048?String.fromCharCode(c>>6|192,63&c|128):String.fromCharCode(c>>12|224,c>>6&63|128,63&c|128),null!==a&&(n>r&&(i+=e.substring(r,n)),i+=a,r=n=t+1)}return n>r&&(i+=e.substring(r,e.length)),i},b.UUID=function(){var e=function(){for(var e=1*new Date,r=0;e==1*new Date;)r++;return e.toString(16)+r.toString(16)};return function(){var r=(window.screen.height*window.screen.width).toString(16);return e()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,r,n=l,o=[],t=0;function i(e,r){var n,t=0;for(n=0;n<r.length;n++)t|=o[n]<<8*n;return e^t}for(e=0;e<n.length;e++)r=n.charCodeAt(e),o.unshift(255&r),o.length>=4&&(t=i(t,o),o=[]);return o.length>0&&(t=i(t,o)),t.toString(16)}()+"-"+r+"-"+e()}}(),b.isBlockedUA=function(e){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot)/i.test(e)},b.HTTPBuildQuery=function(e,r){var n,o,t=[];return b.isUndefined(r)&&(r="&"),b.each(e,function(e,r){n=encodeURIComponent(e.toString()),o=encodeURIComponent(r),t[t.length]=o+"="+n}),t.join(r)},b.getQueryParam=function(e,r){r=r.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+r+"=([^&#]*)").exec(e);if(null===n||n&&"string"!=typeof n[1]&&n[1].length)return"";var o=n[1];try{o=decodeURIComponent(o)}catch(t){v.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},b.getHashParam=function(e,r){var n=e.match(new RegExp(r+"=([^&]*)"));return n?n[1]:null},b.register_event=function(){function e(r){return r&&(r.preventDefault=e.preventDefault,r.stopPropagation=e.stopPropagation),r}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(r,n,o,t,i){if(r)if(r.addEventListener&&!t)r.addEventListener(n,o,!!i);else{var c="on"+n,a=r[c];r[c]=function(r,n,o){return function(t){if(t=t||e(window.event)){var i,c,a=!0;return b.isFunction(o)&&(i=o(t)),c=n.call(r,t),!1!==i&&!1!==c||(a=!1),a}}}(r,o,a)}else v.error("No valid element provided to register_event")}}(),b.info={campaignParams:function(){var e="utm_source utm_medium utm_campaign utm_content utm_term gclid fbclid".split(" "),r={};return b.each(e,function(e){var n=b.getQueryParam(d.URL,e);n.length&&(r[e]=n)}),r},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var r=b.info.searchEngine(e),n="yahoo"!=r?"q":"p",o={};if(null!==r){o.$search_engine=r;var t=b.getQueryParam(e,n);t.length&&(o.ph_keyword=t)}return o},browser:function(e,r,n){return r=r||"",n||b.includes(e," OPR/")?b.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":b.includes(e,"IEMobile")||b.includes(e,"WPDesktop")?"Internet Explorer Mobile":b.includes(e,"SamsungBrowser/")?"Samsung Internet":b.includes(e,"Edge")||b.includes(e,"Edg/")?"Microsoft Edge":b.includes(e,"FBIOS")?"Facebook Mobile":b.includes(e,"Chrome")?"Chrome":b.includes(e,"CriOS")?"Chrome iOS":b.includes(e,"UCWEB")||b.includes(e,"UCBrowser")?"UC Browser":b.includes(e,"FxiOS")?"Firefox iOS":b.includes(r,"Apple")?b.includes(e,"Mobile")?"Mobile Safari":"Safari":b.includes(e,"Android")?"Android Mobile":b.includes(e,"Konqueror")?"Konqueror":b.includes(e,"Firefox")?"Firefox":b.includes(e,"MSIE")||b.includes(e,"Trident/")?"Internet Explorer":b.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,r,n){var o={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[b.info.browser(e,r,n)];if(void 0===o)return null;var t=e.match(o);return t?parseFloat(t[t.length-2]):null},os:function(){var e=l;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)&&!/Mobile/.test(e)?"Android Tablet":/Android/.test(e)?"Android":""},deviceType:function(e){var r=this.device(e);return"iPad"===r||"Android Tablet"===r?"Tablet":r?"Mobile":"Desktop"},referringDomain:function(e){var r=e.split("/");return r.length>=3?r[2]:""},properties:function(){return b.extend(b.strip_empty_properties({$os:b.info.os(),$browser:b.info.browser(l,u.vendor,window.opera),$device:b.info.device(l),$device_type:b.info.deviceType(l)}),{$current_url:window.location.href,$host:window.location.host,$pathname:window.location.pathname,$browser_version:b.info.browserVersion(l,u.vendor,window.opera),$screen_height:window.screen.height,$screen_width:window.screen.width,$viewport_height:window.innerHeight,$viewport_width:window.innerWidth,$lib:"web",$lib_version:e.default.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:b.timestamp()/1e3})},people_properties:function(){return b.extend(b.strip_empty_properties({$os:b.info.os(),$browser:b.info.browser(l,u.vendor,window.opera)}),{$browser_version:b.info.browserVersion(l,u.vendor,window.opera)})}},b.isObject=b.isObject,b.isBlockedUA=b.isBlockedUA,b.isEmptyObject=b.isEmptyObject,b.info=b.info,b.info.device=b.info.device,b.info.browser=b.info.browser,b.info.browserVersion=b.info.browserVersion,b.info.properties=b.info.properties;
8
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.COPY_IN_PROGRESS_ATTRIBUTE=exports.document=exports.logger=exports.userAgent=exports._=exports.window=void 0;var e=r(require("./config"));function r(e){return e&&e.__esModule?e:{default:e}}var n=Array.prototype,o=Function.prototype,t=Object.prototype,i=n.slice,c=t.toString,a=t.hasOwnProperty,s="undefined"!=typeof window?window:{},u=s.navigator||{userAgent:""},d=s.document||{},l=u.userAgent;exports.userAgent=l,exports.document=d,exports.window=s;var f=o.bind,p=n.forEach,w=n.indexOf,h=Array.isArray,g={},b={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}};exports._=b;var v={log:function(){if(e.default.DEBUG&&!b.isUndefined(window.console)&&window.console){var r=window.console.log.__rrweb_original__?window.console.log.__rrweb_original__:window.console.log;try{r.apply(window.console,arguments)}catch(n){b.each(arguments,function(e){r(e)})}}},error:function(){if(e.default.DEBUG&&!b.isUndefined(window.console)&&window.console){var r=["PostHog error:"].concat(Array.prototype.slice.call(arguments)),n=window.console.error.__rrweb_original__?window.console.error.__rrweb_original__:window.console.error;try{n.apply(window.console,r)}catch(o){b.each(r,function(e){n(e)})}}},critical:function(){if(!b.isUndefined(window.console)&&window.console){var e=["PostHog error:"].concat(Array.prototype.slice.call(arguments)),r=window.console.error.__rrweb_original__?window.console.error.__rrweb_original__:window.console.error;try{r.apply(window.console,e)}catch(n){b.each(e,function(e){r(e)})}}}};exports.logger=v,b.bind=function(e,r){var n,o;if(f&&e.bind===f)return f.apply(e,i.call(arguments,1));if(!b.isFunction(e))throw new TypeError;return n=i.call(arguments,2),o=function(){if(!(this instanceof o))return e.apply(r,n.concat(i.call(arguments)));var t={};t.prototype=e.prototype;var c=new t;t.prototype=null;var a=e.apply(c,n.concat(i.call(arguments)));return Object(a)===a?a:c}},b.bind_instance_methods=function(e){for(var r in e)"function"==typeof e[r]&&(e[r]=b.bind(e[r],e))},b.each=function(e,r,n){if(null!=e)if(p&&e.forEach===p)e.forEach(r,n);else if(e.length===+e.length){for(var o=0,t=e.length;o<t;o++)if(o in e&&r.call(n,e[o],o,e)===g)return}else for(var i in e)if(a.call(e,i)&&r.call(n,e[i],i,e)===g)return},b.extend=function(e){return b.each(i.call(arguments,1),function(r){for(var n in r)void 0!==r[n]&&(e[n]=r[n])}),e},b.isArray=h||function(e){return"[object Array]"===c.call(e)},b.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch(r){return!1}},b.include=function(e,r){var n=!1;return null===e?n:w&&e.indexOf===w?-1!=e.indexOf(r):(b.each(e,function(e){if(n||(n=e===r))return g}),n)},b.includes=function(e,r){return-1!==e.indexOf(r)},b.isObject=function(e){return e===Object(e)&&!b.isArray(e)},b.isEmptyObject=function(e){if(b.isObject(e)){for(var r in e)if(a.call(e,r))return!1;return!0}return!1},b.isUndefined=function(e){return void 0===e},b.isString=function(e){return"[object String]"==c.call(e)},b.isDate=function(e){return"[object Date]"==c.call(e)},b.isNumber=function(e){return"[object Number]"==c.call(e)},b.encodeDates=function(e){return b.each(e,function(r,n){b.isDate(r)?e[n]=b.formatDate(r):b.isObject(r)&&(e[n]=b.encodeDates(r))}),e},b.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()},b.formatDate=function(e){function r(e){return e<10?"0"+e:e}return e.getUTCFullYear()+"-"+r(e.getUTCMonth()+1)+"-"+r(e.getUTCDate())+"T"+r(e.getUTCHours())+":"+r(e.getUTCMinutes())+":"+r(e.getUTCSeconds())},b.safewrap=function(r){return function(){try{return r.apply(this,arguments)}catch(n){v.critical("Implementation error. Please turn on debug and contact support@posthog.com."),e.default.DEBUG&&v.critical(n)}}},b.safewrap_class=function(e,r){for(var n=0;n<r.length;n++)e.prototype[r[n]]=b.safewrap(e.prototype[r[n]])},b.safewrap_instance_methods=function(e){for(var r in e)"function"==typeof e[r]&&(e[r]=b.safewrap(e[r]))},b.strip_empty_properties=function(e){var r={};return b.each(e,function(e,n){b.isString(e)&&e.length>0&&(r[n]=e)}),r};var _="undefined"!=typeof Symbol?Symbol("__deepCircularCopyInProgress__"):"__deepCircularCopyInProgress__";function y(e,r,n){return e!==Object(e)?r?r(e,n):e:e[_]?void 0:(e[_]=!0,b.isArray(e)?(o=[],b.each(e,function(e){o.push(y(e,r))})):(o={},b.each(e,function(e,n){n!==_&&(o[n]=y(e,r,n))})),delete e[_],o);var o}exports.COPY_IN_PROGRESS_ATTRIBUTE=_;var m=["$performance_raw"];b.copyAndTruncateStrings=function(e,r){return y(e,function(e,n){return n&&m.indexOf(n)>-1?e:("string"==typeof e&&null!==r&&(e=e.slice(0,r)),e)})},b.base64Encode=function(e){var r,n,o,t,i,c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",a=0,s=0,u="",d=[];if(!e)return e;e=b.utf8Encode(e);do{r=(i=e.charCodeAt(a++)<<16|e.charCodeAt(a++)<<8|e.charCodeAt(a++))>>18&63,n=i>>12&63,o=i>>6&63,t=63&i,d[s++]=c.charAt(r)+c.charAt(n)+c.charAt(o)+c.charAt(t)}while(a<e.length);switch(u=d.join(""),e.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u},b.utf8Encode=function(e){var r,n,o,t,i="";for(r=n=0,o=(e=(e+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,t=0;t<o;t++){var c=e.charCodeAt(t),a=null;c<128?n++:a=c>127&&c<2048?String.fromCharCode(c>>6|192,63&c|128):String.fromCharCode(c>>12|224,c>>6&63|128,63&c|128),null!==a&&(n>r&&(i+=e.substring(r,n)),i+=a,r=n=t+1)}return n>r&&(i+=e.substring(r,e.length)),i},b.UUID=function(){var e=function(){for(var e=1*new Date,r=0;e==1*new Date;)r++;return e.toString(16)+r.toString(16)};return function(){var r=(window.screen.height*window.screen.width).toString(16);return e()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var e,r,n=l,o=[],t=0;function i(e,r){var n,t=0;for(n=0;n<r.length;n++)t|=o[n]<<8*n;return e^t}for(e=0;e<n.length;e++)r=n.charCodeAt(e),o.unshift(255&r),o.length>=4&&(t=i(t,o),o=[]);return o.length>0&&(t=i(t,o)),t.toString(16)}()+"-"+r+"-"+e()}}(),b.isBlockedUA=function(e){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog)/i.test(e)},b.HTTPBuildQuery=function(e,r){var n,o,t=[];return b.isUndefined(r)&&(r="&"),b.each(e,function(e,r){n=encodeURIComponent(e.toString()),o=encodeURIComponent(r),t[t.length]=o+"="+n}),t.join(r)},b.getQueryParam=function(e,r){r=r.replace(/[[]/,"\\[").replace(/[\]]/,"\\]");var n=new RegExp("[\\?&]"+r+"=([^&#]*)").exec(e);if(null===n||n&&"string"!=typeof n[1]&&n[1].length)return"";var o=n[1];try{o=decodeURIComponent(o)}catch(t){v.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")},b.getHashParam=function(e,r){var n=e.match(new RegExp(r+"=([^&]*)"));return n?n[1]:null},b.register_event=function(){function e(r){return r&&(r.preventDefault=e.preventDefault,r.stopPropagation=e.stopPropagation),r}return e.preventDefault=function(){this.returnValue=!1},e.stopPropagation=function(){this.cancelBubble=!0},function(r,n,o,t,i){if(r)if(r.addEventListener&&!t)r.addEventListener(n,o,!!i);else{var c="on"+n,a=r[c];r[c]=function(r,n,o){return function(t){if(t=t||e(window.event)){var i,c,a=!0;return b.isFunction(o)&&(i=o(t)),c=n.call(r,t),!1!==i&&!1!==c||(a=!1),a}}}(r,o,a)}else v.error("No valid element provided to register_event")}}(),b.info={campaignParams:function(){var e="utm_source utm_medium utm_campaign utm_content utm_term gclid fbclid msclkid".split(" "),r={};return b.each(e,function(e){var n=b.getQueryParam(d.URL,e);n.length&&(r[e]=n)}),r},searchEngine:function(e){return 0===e.search("https?://(.*)google.([^/?]*)")?"google":0===e.search("https?://(.*)bing.com")?"bing":0===e.search("https?://(.*)yahoo.com")?"yahoo":0===e.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(e){var r=b.info.searchEngine(e),n="yahoo"!=r?"q":"p",o={};if(null!==r){o.$search_engine=r;var t=b.getQueryParam(e,n);t.length&&(o.ph_keyword=t)}return o},browser:function(e,r,n){return r=r||"",n||b.includes(e," OPR/")?b.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":b.includes(e,"IEMobile")||b.includes(e,"WPDesktop")?"Internet Explorer Mobile":b.includes(e,"SamsungBrowser/")?"Samsung Internet":b.includes(e,"Edge")||b.includes(e,"Edg/")?"Microsoft Edge":b.includes(e,"FBIOS")?"Facebook Mobile":b.includes(e,"Chrome")?"Chrome":b.includes(e,"CriOS")?"Chrome iOS":b.includes(e,"UCWEB")||b.includes(e,"UCBrowser")?"UC Browser":b.includes(e,"FxiOS")?"Firefox iOS":b.includes(r,"Apple")?b.includes(e,"Mobile")?"Mobile Safari":"Safari":b.includes(e,"Android")?"Android Mobile":b.includes(e,"Konqueror")?"Konqueror":b.includes(e,"Firefox")?"Firefox":b.includes(e,"MSIE")||b.includes(e,"Trident/")?"Internet Explorer":b.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,r,n){var o={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/}[b.info.browser(e,r,n)];if(void 0===o)return null;var t=e.match(o);return t?parseFloat(t[t.length-2]):null},os:function(){var e=l;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)&&!/Mobile/.test(e)?"Android Tablet":/Android/.test(e)?"Android":""},deviceType:function(e){var r=this.device(e);return"iPad"===r||"Android Tablet"===r?"Tablet":r?"Mobile":"Desktop"},referringDomain:function(e){var r=e.split("/");return r.length>=3?r[2]:""},properties:function(){return b.extend(b.strip_empty_properties({$os:b.info.os(),$browser:b.info.browser(l,u.vendor,window.opera),$device:b.info.device(l),$device_type:b.info.deviceType(l)}),{$current_url:window.location.href,$host:window.location.host,$pathname:window.location.pathname,$browser_version:b.info.browserVersion(l,u.vendor,window.opera),$screen_height:window.screen.height,$screen_width:window.screen.width,$viewport_height:window.innerHeight,$viewport_width:window.innerWidth,$lib:"web",$lib_version:e.default.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:b.timestamp()/1e3})},people_properties:function(){return b.extend(b.strip_empty_properties({$os:b.info.os(),$browser:b.info.browser(l,u.vendor,window.opera)}),{$browser_version:b.info.browserVersion(l,u.vendor,window.opera)})}},b.isObject=b.isObject,b.isBlockedUA=b.isBlockedUA,b.isEmptyObject=b.isEmptyObject,b.info=b.info,b.info.device=b.info.device,b.info.browser=b.info.browser,b.info.browserVersion=b.info.browserVersion,b.info.properties=b.info.properties;
9
9
  },{"./config":"itQ5"}],"RYfg":[function(require,module,exports) {
10
10
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getClassName=r,exports.getSafeText=n,exports.isElementNode=o,exports.isTag=s,exports.isTextNode=i,exports.shouldCaptureDomEvent=u,exports.shouldCaptureElement=a,exports.isSensitiveElement=p,exports.shouldCaptureValue=l,exports.isAngularStyleAttr=d,exports.loadScript=f,exports.usefulElements=void 0;var e=require("./utils");function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function r(e){switch(t(e.className)){case"string":return e.className;case"object":return e.className.baseVal||e.getAttribute("class")||"";default:return""}}function n(t){var r="";return a(t)&&!p(t)&&t.childNodes&&t.childNodes.length&&e._.each(t.childNodes,function(t){i(t)&&t.textContent&&(r+=e._.trim(t.textContent).split(/(\s+)/).filter(l).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),e._.trim(r)}function o(e){return e&&1===e.nodeType}function s(e,t){return e&&e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function i(e){return e&&3===e.nodeType}var c=["a","button","form","input","select","textarea","label"];function u(e,t){if(!e||s(e,"html")||!o(e))return!1;for(var r=!1,n=[e],i=!0,u=e;u.parentNode&&!s(u,"body");)if(11!==u.parentNode.nodeType){if(!(i=u.parentNode))break;if(c.indexOf(i.tagName.toLowerCase())>-1)r=!0;else{var a=window.getComputedStyle(i);a&&"pointer"===a.getPropertyValue("cursor")&&(r=!0)}n.push(i),u=i}else n.push(u.parentNode.host),u=u.parentNode.host;var p=window.getComputedStyle(e);if(p&&"pointer"===p.getPropertyValue("cursor")&&"click"===t.type)return!0;var l=e.tagName.toLowerCase();switch(l){case"html":return!1;case"form":return"submit"===t.type;case"input":return"change"===t.type||"click"===t.type;case"select":case"textarea":return"change"===t.type||"click"===t.type;default:return r?"click"===t.type:"click"===t.type&&(c.indexOf(l)>-1||"true"===e.getAttribute("contenteditable"))}}function a(t){for(var n=t;n.parentNode&&!s(n,"body");n=n.parentNode){var o=r(n).split(" ");if(e._.includes(o,"ph-sensitive")||e._.includes(o,"ph-no-capture"))return!1}if(e._.includes(r(t).split(" "),"ph-include"))return!0;var i=t.type||"";if("string"==typeof i)switch(i.toLowerCase()){case"hidden":case"password":return!1}var c=t.name||t.id||"";if("string"==typeof c){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(c.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function p(e){return!!(s(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||s(e,"select")||s(e,"textarea")||"true"===e.getAttribute("contenteditable"))}function l(t){if(null===t||e._.isUndefined(t))return!1;if("string"==typeof t){t=e._.trim(t);if(/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test((t||"").replace(/[- ]/g,"")))return!1;if(/(^\d{3}-?\d{2}-?\d{4}$)/.test(t))return!1}return!0}function d(e){return"string"==typeof e&&("_ngcontent"===e.substring(0,10)||"_nghost"===e.substring(0,7))}function f(e,t){var r=document.createElement("script");r.type="text/javascript",r.src=e,r.onload=t;var n=document.getElementsByTagName("script");n.length>0?n[0].parentNode.insertBefore(r,n[0]):document.body.appendChild(r)}exports.usefulElements=c;
11
11
  },{"./utils":"FOZT"}],"Oszc":[function(require,module,exports) {
@@ -23,7 +23,7 @@ module.exports={name:"posthog-js",version:"1.25.0",description:"Posthog-js allow
23
23
  },{"./gdpr-utils":"rxSh","./api-actions":"os8r","./utils":"FOZT"}],"aVqC":[function(require,module,exports) {
24
24
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PostHogFeatureFlags=exports.parseFeatureFlagDecideResponse=void 0;var e=require("./utils");function t(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){for(var a=0;a<t.length;a++){var r=t[a];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function r(e,t,r){return t&&a(e.prototype,t),r&&a(e,r),e}var s=function(e,t){var a=e.featureFlags;if(a)if(Array.isArray(a)){var r={};if(a)for(var s=0;s<a.length;s++)r[a[s]]=!0;t&&t.register({$active_feature_flags:a,$enabled_feature_flags:r})}else t&&t.register({$active_feature_flags:Object.keys(a||{}),$enabled_feature_flags:a||{}});else t&&(t.unregister("$active_feature_flags"),t.unregister("$enabled_feature_flags"))};exports.parseFeatureFlagDecideResponse=s;var i=function(){function a(e){t(this,a),this.instance=e,this._override_warning=!1,this.flagCallReported={},this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return r(a,[{key:"getFlags",value:function(){return Object.keys(this.getFlagVariants())}},{key:"getFlagVariants",value:function(){var t=this.instance.get_property("$enabled_feature_flags"),a=this.instance.get_property("$override_feature_flags");if(!a)return t||{};for(var r=e._.extend({},t),s=Object.keys(a),i=0;i<s.length;i++)!1===a[s[i]]?delete r[s[i]]:r[s[i]]=a[s[i]];return this._override_warning||(console.warn("[PostHog] Overriding feature flags!",{enabledFlags:t,overriddenFlags:a,finalFlags:r}),this._override_warning=!0),r}},{key:"reloadFeatureFlags",value:function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())}},{key:"setAnonymousDistinctId",value:function(e){this.$anon_distinct_id=e}},{key:"setReloadingPaused",value:function(e){this.reloadFeatureFlagsInAction=e}},{key:"resetRequestQueue",value:function(){this.reloadFeatureFlagsQueued=!1}},{key:"_startReloadTimer",value:function(){var e=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!e.reloadFeatureFlagsInAction&&e.reloadFeatureFlagsQueued&&(e.reloadFeatureFlagsQueued=!1,e._reloadFeatureFlagsRequest())},5)}},{key:"_reloadFeatureFlagsRequest",value:function(){var t=this;this.setReloadingPaused(!0);var a=this.instance.get_config("token"),r=JSON.stringify({token:a,distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id}),s=e._.base64Encode(r);this.instance._send_request(this.instance.get_config("api_host")+"/decide/?v=2",{data:s},{method:"POST"},this.instance._prepare_callback(function(e){t.$anon_distinct_id=void 0,t.receivedFeatureFlags(e),t.setReloadingPaused(!1),t._startReloadTimer()}))}},{key:"getFeatureFlag",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.getFlags())return console.warn('getFeatureFlag for key "'+e+"\" failed. Feature flags didn't load in time."),!1;var a=this.getFlagVariants()[e];return!t.send_event&&"send_event"in t||this.flagCallReported[e]||(this.flagCallReported[e]=!0,this.instance.capture("$feature_flag_called",{$feature_flag:e,$feature_flag_response:a})),a}},{key:"isFeatureEnabled",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getFlags()?!!this.getFeatureFlag(e,t):(console.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time."),!1)}},{key:"addFeatureFlagsHandler",value:function(e){this.featureFlagEventHandlers.push(e)}},{key:"receivedFeatureFlags",value:function(e){s(e,this.instance.persistence);var t=this.getFlags(),a=this.getFlagVariants();this.featureFlagEventHandlers.forEach(function(e){return e(t,a)})}},{key:"override",value:function(e){if(this._override_warning=!1,!1===e)this.instance.persistence.unregister("$override_feature_flags");else if(Array.isArray(e)){for(var t={},a=0;a<e.length;a++)t[e[a]]=!0;this.instance.persistence.register({$override_feature_flags:t})}else this.instance.persistence.register({$override_feature_flags:e})}},{key:"onFeatureFlags",value:function(e){(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit)&&e(this.getFlags(),this.getFlagVariants())}}]),a}();exports.PostHogFeatureFlags=i;
25
25
  },{"./utils":"FOZT"}],"MAdm":[function(require,module,exports) {
26
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SESSION_ID=exports.SESSION_RECORDING_ENABLED_SERVER_SIDE=exports.EVENT_TIMERS_KEY=exports.CAMPAIGN_IDS_KEY=exports.ALIAS_ID_KEY=exports.PEOPLE_DISTINCT_ID_KEY=exports.SET_ONCE_QUEUE_KEY=exports.SET_QUEUE_KEY=exports.PostHogPersistence=void 0;var e=require("./utils"),t=require("./storage");function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var s="__mps";exports.SET_QUEUE_KEY=s;var o="__mpso";exports.SET_ONCE_QUEUE_KEY=o;var i="__mpus",p="__mpa",n="__mpap",_="__mpr",a="__mpu",c="$people_distinct_id";exports.PEOPLE_DISTINCT_ID_KEY=c;var h="__alias";exports.ALIAS_ID_KEY=h;var u="__cmpns";exports.CAMPAIGN_IDS_KEY=u;var d="__timers";exports.EVENT_TIMERS_KEY=d;var f="$session_recording_enabled_server_side";exports.SESSION_RECORDING_ENABLED_SERVER_SIDE=f;var m="$sesid";exports.SESSION_ID=m;var l="$enabled_feature_flags",E=[s,o,i,p,n,_,a,c,h,u,d,f,m,l],y=function(r){var s="";r.token&&(s=r.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,r.persistence_name?this.name="ph_"+r.persistence_name:this.name="ph_"+s+"_posthog";var o=r.persistence.toLowerCase();"cookie"!==o&&-1===o.indexOf("localstorage")&&"memory"!==o&&(e.logger.critical("Unknown persistence type "+o+"; falling back to cookie"),o=r.persistence="cookie"),"localstorage"===o&&t.localStore.is_supported()?this.storage=t.localStore:"localstorage+cookie"===o&&t.localPlusCookieStore.is_supported()?this.storage=t.localPlusCookieStore:this.storage="memory"===o?t.memoryStore:t.cookieStore,this.load(),this.update_config(r),this.save()};exports.PostHogPersistence=y,y.prototype.properties=function(){var t={};return e._.each(this.props,function(s,o){if(o===l&&"object"===r(s))for(var i=Object.keys(s),p=0;p<i.length;p++)t["$feature/".concat(i[p])]=s[i[p]];else e._.include(E,o)||(t[o]=s)}),t},y.prototype.load=function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=e._.extend({},t))}},y.prototype.save=function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)},y.prototype.remove=function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)},y.prototype.clear=function(){this.remove(),this.props={}},y.prototype.register_once=function(t,r,s){return!!e._.isObject(t)&&(void 0===r&&(r="None"),this.expire_days=void 0===s?this.default_expiry:s,e._.each(t,function(e,t){this.props.hasOwnProperty(t)&&this.props[t]!==r||(this.props[t]=e)},this),this.save(),!0)},y.prototype.register=function(t,r){return!!e._.isObject(t)&&(this.expire_days=void 0===r?this.default_expiry:r,e._.extend(this.props,t),this.save(),!0)},y.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},y.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register(e._.info.campaignParams()),this.campaign_params_saved=!0)},y.prototype.update_search_keyword=function(t){this.register(e._.info.searchInfo(t))},y.prototype.update_referrer_info=function(t){this.register_once({$initial_referrer:t||"$direct",$initial_referring_domain:e._.info.referringDomain(t)||"$direct"},""),this.register({$referrer:t||this.props.$referrer||"$direct",$referring_domain:e._.info.referringDomain(t)||this.props.$referring_domain||"$direct"})},y.prototype.get_referrer_info=function(){return e._.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})},y.prototype.safe_merge=function(t){return e._.each(this.props,function(e,r){r in t||(t[r]=e)}),t},y.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},y.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},y.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},y.prototype.get_cross_subdomain=function(){return this.cross_subdomain},y.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},y.prototype.set_event_timer=function(e,t){var r=this.props[d]||{};r[e]=t,this.props[d]=r,this.save()},y.prototype.remove_event_timer=function(t){var r=(this.props[d]||{})[t];return e._.isUndefined(r)||(delete this.props[d][t],this.save()),r};
26
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SESSION_ID=exports.SESSION_RECORDING_ENABLED_SERVER_SIDE=exports.EVENT_TIMERS_KEY=exports.CAMPAIGN_IDS_KEY=exports.ALIAS_ID_KEY=exports.PEOPLE_DISTINCT_ID_KEY=exports.SET_ONCE_QUEUE_KEY=exports.SET_QUEUE_KEY=exports.PostHogPersistence=void 0;var e=require("./utils"),t=require("./storage");function s(e){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var r="__mps";exports.SET_QUEUE_KEY=r;var o="__mpso";exports.SET_ONCE_QUEUE_KEY=o;var i="__mpus",p="__mpa",n="__mpap",_="__mpr",a="__mpu",c="$people_distinct_id";exports.PEOPLE_DISTINCT_ID_KEY=c;var h="__alias";exports.ALIAS_ID_KEY=h;var u="__cmpns";exports.CAMPAIGN_IDS_KEY=u;var d="__timers";exports.EVENT_TIMERS_KEY=d;var f="$session_recording_enabled_server_side";exports.SESSION_RECORDING_ENABLED_SERVER_SIDE=f;var m="$sesid";exports.SESSION_ID=m;var l="$enabled_feature_flags",E=[r,o,i,p,n,_,a,c,h,u,d,f,m,l],y=function(s){var r="";s.token&&(r=s.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),this.props={},this.campaign_params_saved=!1,s.persistence_name?this.name="ph_"+s.persistence_name:this.name="ph_"+r+"_posthog";var o=s.persistence.toLowerCase();"cookie"!==o&&-1===o.indexOf("localstorage")&&"memory"!==o&&(e.logger.critical("Unknown persistence type "+o+"; falling back to cookie"),o=s.persistence="cookie"),"localstorage"===o&&t.localStore.is_supported()?this.storage=t.localStore:"localstorage+cookie"===o&&t.localPlusCookieStore.is_supported()?this.storage=t.localPlusCookieStore:this.storage="memory"===o?t.memoryStore:t.cookieStore,this.load(),this.update_config(s),this.save()};exports.PostHogPersistence=y,y.prototype.properties=function(){var t={};return e._.each(this.props,function(r,o){if(o===l&&"object"===s(r))for(var i=Object.keys(r),p=0;p<i.length;p++)t["$feature/".concat(i[p])]=r[i[p]];else e._.include(E,o)||(t[o]=r)}),t},y.prototype.load=function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=e._.extend({},t))}},y.prototype.save=function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)},y.prototype.remove=function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)},y.prototype.clear=function(){this.remove(),this.props={}},y.prototype.register_once=function(t,s,r){return!!e._.isObject(t)&&(void 0===s&&(s="None"),this.expire_days=void 0===r?this.default_expiry:r,e._.each(t,function(e,t){this.props.hasOwnProperty(t)&&this.props[t]!==s||(this.props[t]=e)},this),this.save(),!0)},y.prototype.register=function(t,s){return!!e._.isObject(t)&&(this.expire_days=void 0===s?this.default_expiry:s,e._.extend(this.props,t),this.save(),!0)},y.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},y.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register(e._.info.campaignParams()),this.campaign_params_saved=!0)},y.prototype.update_search_keyword=function(t){this.register(e._.info.searchInfo(t))},y.prototype.update_referrer_info=function(t){this.register({$referrer:t||this.props.$referrer||"$direct",$referring_domain:e._.info.referringDomain(t)||this.props.$referring_domain||"$direct"})},y.prototype.get_referrer_info=function(){return e._.strip_empty_properties({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})},y.prototype.safe_merge=function(t){return e._.each(this.props,function(e,s){s in t||(t[s]=e)}),t},y.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)},y.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},y.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},y.prototype.get_cross_subdomain=function(){return this.cross_subdomain},y.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())},y.prototype.set_event_timer=function(e,t){var s=this.props[d]||{};s[e]=t,this.props[d]=s,this.save()},y.prototype.remove_event_timer=function(t){var s=(this.props[d]||{})[t];return e._.isUndefined(s)||(delete this.props[d][t],this.save()),s};
27
27
  },{"./utils":"FOZT","./storage":"KZ7Y"}],"vmk3":[function(require,module,exports) {
28
28
  "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.filterDataURLsFromLargeDataObjects=l,exports.truncateLargeConsoleLogs=d,exports.CONSOLE_LOG_PLUGIN_NAME=exports.replacementImageURI=void 0;var a=require("./sessionrecording");function t(a,t){var r;if("undefined"==typeof Symbol||null==a[Symbol.iterator]){if(Array.isArray(a)||(r=e(a))||t&&a&&"number"==typeof a.length){r&&(a=r);var o=0,n=function(){};return{s:n,n:function(){return o>=a.length?{done:!0}:{done:!1,value:a[o++]}},e:function(a){throw a},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var l,i=!0,d=!1;return{s:function(){r=a[Symbol.iterator]()},n:function(){var a=r.next();return i=a.done,a},e:function(a){d=!0,l=a},f:function(){try{i||null==r.return||r.return()}finally{if(d)throw l}}}}function e(a,t){if(a){if("string"==typeof a)return r(a,t);var e=Object.prototype.toString.call(a).slice(8,-1);return"Object"===e&&a.constructor&&(e=a.constructor.name),"Map"===e||"Set"===e?Array.from(a):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(a,t):void 0}}function r(a,t){(null==t||t>a.length)&&(t=a.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=a[e];return r}function o(a){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(a){return typeof a}:function(a){return a&&"function"==typeof Symbol&&a.constructor===Symbol&&a!==Symbol.prototype?"symbol":typeof a})(a)}var n="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==";function l(a){if(a&&"object"===o(a)){var e=JSON.stringify(a);if(e.length>5e6){var r,l=t(e.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim));try{for(l.s();!(r=l.n()).done;){var i=r.value;e="image/"===i[1].toLocaleLowerCase().slice(0,6)?e.replace(i[0],n):e.replace(i[0],"")}}catch(d){l.e(d)}finally{l.f()}}return JSON.parse(e)}return a}exports.replacementImageURI=n;var i="rrweb/console@1";function d(t){if(t&&"object"===o(t)&&t.type===a.PLUGIN_EVENT_TYPE&&"object"===o(t.data)&&t.data.plugin===i){t.data.payload.payload.length>10&&(t.data.payload.payload=t.data.payload.payload.slice(0,10),t.data.payload.payload.push("...[truncated]"));for(var e=[],r=0;r<t.data.payload.payload.length;r++)t.data.payload.payload[r]&&t.data.payload.payload[r].length>2e3?e.push(t.data.payload.payload[r].slice(0,2e3)+"...[truncated]"):e.push(t.data.payload.payload[r]);return t.data.payload.payload=e,t}return t}exports.CONSOLE_LOG_PLUGIN_NAME=i;
29
29
  },{"./sessionrecording":"Z2N4"}],"Z2N4":[function(require,module,exports) {
package/dist/es.js CHANGED
@@ -863,7 +863,7 @@ var LZString = {
863
863
  }
864
864
  };
865
865
 
866
- var version = "1.25.0";
866
+ var version = "1.26.0";
867
867
 
868
868
  var Config$1 = {
869
869
  DEBUG: false,
@@ -1394,7 +1394,7 @@ _.UUID = function () {
1394
1394
 
1395
1395
 
1396
1396
  _.isBlockedUA = function (ua) {
1397
- if (/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot)/i.test(ua)) {
1397
+ if (/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog)/i.test(ua)) {
1398
1398
  return true;
1399
1399
  }
1400
1400
 
@@ -1535,7 +1535,7 @@ _.register_event = function () {
1535
1535
 
1536
1536
  _.info = {
1537
1537
  campaignParams: function campaignParams() {
1538
- var campaign_keywords = 'utm_source utm_medium utm_campaign utm_content utm_term gclid fbclid'.split(' ');
1538
+ var campaign_keywords = 'utm_source utm_medium utm_campaign utm_content utm_term gclid fbclid msclkid'.split(' ');
1539
1539
  var params = {};
1540
1540
 
1541
1541
  _.each(campaign_keywords, function (kwkey) {
@@ -3594,13 +3594,6 @@ PostHogPersistence.prototype.update_search_keyword = function (referrer) {
3594
3594
 
3595
3595
 
3596
3596
  PostHogPersistence.prototype.update_referrer_info = function (referrer) {
3597
- // If referrer doesn't exist, we want to note the fact that it was type-in traffic.
3598
- // Register once, so first touch
3599
- this.register_once({
3600
- $initial_referrer: referrer || '$direct',
3601
- $initial_referring_domain: _.info.referringDomain(referrer) || '$direct'
3602
- }, ''); // Register the current referrer but override if it's different, hence register
3603
-
3604
3597
  this.register({
3605
3598
  $referrer: referrer || this['props']['$referrer'] || '$direct',
3606
3599
  $referring_domain: _.info.referringDomain(referrer) || this['props']['$referring_domain'] || '$direct'
@@ -3609,8 +3602,8 @@ PostHogPersistence.prototype.update_referrer_info = function (referrer) {
3609
3602
 
3610
3603
  PostHogPersistence.prototype.get_referrer_info = function () {
3611
3604
  return _.strip_empty_properties({
3612
- $initial_referrer: this['props']['$initial_referrer'],
3613
- $initial_referring_domain: this['props']['$initial_referring_domain']
3605
+ $referrer: this['props']['$referrer'],
3606
+ $referring_domain: this['props']['$referring_domain']
3614
3607
  });
3615
3608
  }; // safely fills the passed in object with stored properties,
3616
3609
  // does not override any properties defined in both
package/dist/module.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  // Type definitions for exported methods
2
2
 
3
- import { EventProcessor, Integration } from '@sentry/types'
3
+ import { EventProcessor, Hub, Integration } from '@sentry/types'
4
4
  import { MaskInputOptions, SlimDOMOptions } from 'rrweb-snapshot'
5
5
 
6
6
  declare class posthog {
@@ -851,7 +851,7 @@ declare namespace posthog {
851
851
  export class SentryIntegration implements Integration {
852
852
  constructor(posthog: posthog, organization?: string, projectId?: number, prefix?: string)
853
853
  name: string
854
- setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void): void
854
+ setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void
855
855
  }
856
856
 
857
857
  export type PostHog = typeof posthog
package/dist/module.js CHANGED
@@ -865,7 +865,7 @@ var LZString = {
865
865
  }
866
866
  };
867
867
 
868
- var version = "1.25.0";
868
+ var version = "1.26.0";
869
869
 
870
870
  var Config$1 = {
871
871
  DEBUG: false,
@@ -1396,7 +1396,7 @@ _.UUID = function () {
1396
1396
 
1397
1397
 
1398
1398
  _.isBlockedUA = function (ua) {
1399
- if (/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot)/i.test(ua)) {
1399
+ if (/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog)/i.test(ua)) {
1400
1400
  return true;
1401
1401
  }
1402
1402
 
@@ -1537,7 +1537,7 @@ _.register_event = function () {
1537
1537
 
1538
1538
  _.info = {
1539
1539
  campaignParams: function campaignParams() {
1540
- var campaign_keywords = 'utm_source utm_medium utm_campaign utm_content utm_term gclid fbclid'.split(' ');
1540
+ var campaign_keywords = 'utm_source utm_medium utm_campaign utm_content utm_term gclid fbclid msclkid'.split(' ');
1541
1541
  var params = {};
1542
1542
 
1543
1543
  _.each(campaign_keywords, function (kwkey) {
@@ -3596,13 +3596,6 @@ PostHogPersistence.prototype.update_search_keyword = function (referrer) {
3596
3596
 
3597
3597
 
3598
3598
  PostHogPersistence.prototype.update_referrer_info = function (referrer) {
3599
- // If referrer doesn't exist, we want to note the fact that it was type-in traffic.
3600
- // Register once, so first touch
3601
- this.register_once({
3602
- $initial_referrer: referrer || '$direct',
3603
- $initial_referring_domain: _.info.referringDomain(referrer) || '$direct'
3604
- }, ''); // Register the current referrer but override if it's different, hence register
3605
-
3606
3599
  this.register({
3607
3600
  $referrer: referrer || this['props']['$referrer'] || '$direct',
3608
3601
  $referring_domain: _.info.referringDomain(referrer) || this['props']['$referring_domain'] || '$direct'
@@ -3611,8 +3604,8 @@ PostHogPersistence.prototype.update_referrer_info = function (referrer) {
3611
3604
 
3612
3605
  PostHogPersistence.prototype.get_referrer_info = function () {
3613
3606
  return _.strip_empty_properties({
3614
- $initial_referrer: this['props']['$initial_referrer'],
3615
- $initial_referring_domain: this['props']['$initial_referring_domain']
3607
+ $referrer: this['props']['$referrer'],
3608
+ $referring_domain: this['props']['$referring_domain']
3616
3609
  });
3617
3610
  }; // safely fills the passed in object with stored properties,
3618
3611
  // does not override any properties defined in both
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "posthog-js",
3
- "version": "1.25.0",
3
+ "version": "1.26.0",
4
4
  "description": "Posthog-js allows you to automatically capture usage and send events to PostHog.",
5
5
  "repository": "https://github.com/PostHog/posthog-js",
6
6
  "author": "hey@posthog.com",
@@ -28,7 +28,7 @@
28
28
  "react/dist/*"
29
29
  ],
30
30
  "dependencies": {
31
- "@sentry/types": "^6.11.0",
31
+ "@sentry/types": "^7.2.0",
32
32
  "fflate": "^0.4.1",
33
33
  "rrweb-snapshot": "^1.1.14"
34
34
  },