posthog-js 1.26.0 → 1.27.0-alpha1
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/dist/array.js +57 -54
- package/dist/array.js.map +1 -0
- package/dist/es.js +2281 -2254
- package/dist/es.js.map +1 -0
- package/dist/module.d.ts +602 -508
- package/dist/module.js +2287 -2256
- package/dist/module.js.map +1 -0
- package/package.json +32 -53
package/dist/array.js
CHANGED
|
@@ -1,57 +1,60 @@
|
|
|
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}({"
|
|
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=
|
|
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}({"iwXh":[function(require,module,exports) {
|
|
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=2,u=3,l=2,f=0,h=0,d={},m={},v=[];for(s=0;s<o.length;s+=1)if(i=o.charAt(s),Object.prototype.hasOwnProperty.call(d,i)||(d[i]=u++,m[i]=!0),p=c+i,Object.prototype.hasOwnProperty.call(d,p))c=p;else{if(Object.prototype.hasOwnProperty.call(m,c)){if(c.charCodeAt(0)<256){for(n=0;n<l;n++)f<<=1,h==r-1?(h=0,v.push(e(f)),f=0):h++;for(t=c.charCodeAt(0),n=0;n<8;n++)f=f<<1|1&t,h==r-1?(h=0,v.push(e(f)),f=0):h++,t>>=1}else{for(t=1,n=0;n<l;n++)f=f<<1|t,h==r-1?(h=0,v.push(e(f)),f=0):h++,t=0;for(t=c.charCodeAt(0),n=0;n<16;n++)f=f<<1|1&t,h==r-1?(h=0,v.push(e(f)),f=0):h++,t>>=1}0==--a&&(a=Math.pow(2,l),l++),delete m[c]}else for(t=d[c],n=0;n<l;n++)f=f<<1|1&t,h==r-1?(h=0,v.push(e(f)),f=0):h++,t>>=1;0==--a&&(a=Math.pow(2,l),l++),d[p]=u++,c=String(i)}if(""!==c){if(Object.prototype.hasOwnProperty.call(m,c)){if(c.charCodeAt(0)<256){for(n=0;n<l;n++)f<<=1,h==r-1?(h=0,v.push(e(f)),f=0):h++;for(t=c.charCodeAt(0),n=0;n<8;n++)f=f<<1|1&t,h==r-1?(h=0,v.push(e(f)),f=0):h++,t>>=1}else{for(t=1,n=0;n<l;n++)f=f<<1|t,h==r-1?(h=0,v.push(e(f)),f=0):h++,t=0;for(t=c.charCodeAt(0),n=0;n<16;n++)f=f<<1|1&t,h==r-1?(h=0,v.push(e(f)),f=0):h++,t>>=1}0==--a&&(a=Math.pow(2,l),l++),delete m[c]}else for(t=d[c],n=0;n<l;n++)f=f<<1|1&t,h==r-1?(h=0,v.push(e(f)),f=0):h++,t>>=1;0==--a&&(a=Math.pow(2,l),l++)}for(t=2,n=0;n<l;n++)f=f<<1|1&t,h==r-1?(h=0,v.push(e(f)),f=0):h++,t>>=1;for(;;){if(f<<=1,h==r-1){v.push(e(f));break}h++}return v.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=[],h={val:n(0),position:e,index:1},d=4,m=4,v=3,w="";for(t=0;t<3;t+=1)l[t]=t;for(i=0,c=Math.pow(2,2),a=1;a!=c;)p=h.val&h.position,h.position>>=1,0==h.position&&(h.position=e,h.val=n(h.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=h.val&h.position,h.position>>=1,0==h.position&&(h.position=e,h.val=n(h.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=h.val&h.position,h.position>>=1,0==h.position&&(h.position=e,h.val=n(h.index++)),i|=(p>0?1:0)*a,a<<=1;u=o(i);break;case 2:return""}for(l[3]=u,s=u,f.push(u);;){if(h.index>r)return"";for(i=0,c=Math.pow(2,v),a=1;a!=c;)p=h.val&h.position,h.position>>=1,0==h.position&&(h.position=e,h.val=n(h.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=h.val&h.position,h.position>>=1,0==h.position&&(h.position=e,h.val=n(h.index++)),i|=(p>0?1:0)*a,a<<=1;l[m++]=o(i),u=m-1,d--;break;case 1:for(i=0,c=Math.pow(2,16),a=1;a!=c;)p=h.val&h.position,h.position>>=1,0==h.position&&(h.position=e,h.val=n(h.index++)),i|=(p>0?1:0)*a,a<<=1;l[m++]=o(i),u=m-1,d--;break;case 2:return f.join("")}if(0==d&&(d=Math.pow(2,v),v++),l[u])w=l[u];else{if(u!==m)return null;w=s+s.charAt(0)}f.push(w),l[m++]=s+w.charAt(0),s=w,0==--d&&(d=Math.pow(2,v),v++)}}};exports.LZString=s;
|
|
3
3
|
},{}],"EHrm":[function(require,module,exports) {
|
|
4
|
-
module.exports={name:"posthog-js",version:"1.
|
|
5
|
-
},{}],"
|
|
4
|
+
module.exports={name:"posthog-js",version:"1.27.0-alpha1",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.ts --out-file dist/array.js",serve:"parcel serve src/loader-globals.ts --port 3001 --out-file dist/array.js",build:"yarn build-array && yarn build-rollup && yarn build-react","build-array":"parcel build src/loader-globals.ts --out-file dist/array.js --public-url=/static","build-rollup":"tsc -b && rollup -c","build-react":"cd react; yarn; yarn build;",lint:"eslint ./src/**/*.{ts,js}",prettier:"prettier --write src/**/*",prepublishOnly:"yarn lint && yarn test && yarn build && yarn test-react",test:"jest","test-react":"cd react; yarn test","test-watch":"jest --watch",cypress:"cypress open"},main:"dist/module.js",module:"dist/es.js",types:"dist/module.d.ts",files:["dist/*","react/dist/*"],dependencies:{"@sentry/types":"^7.2.0",fflate:"^0.4.1","rrweb-snapshot":"^1.1.14"},devDependencies:{"@babel/core":"7.18.9","@babel/preset-env":"7.18.9","@babel/preset-typescript":"^7.18.6","@rollup/plugin-babel":"^5.3.1","@rollup/plugin-json":"^4.1.0","@rollup/plugin-node-resolve":"^13.3.0","@rollup/plugin-typescript":"^8.3.3","@typescript-eslint/eslint-plugin":"^5.30.7","@typescript-eslint/parser":"^5.30.7","babel-eslint":"10.1.0","babel-jest":"^26.6.3",cypress:"10.3.1",eslint:"8.20.0","eslint-config-prettier":"^8.5.0","eslint-plugin-prettier":"^4.2.1","eslint-plugin-react":"^7.30.1","eslint-plugin-react-hooks":"^4.6.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.3","posthog-js":"link:.",prettier:"^2.7.1",rollup:"^2.77.0","rollup-plugin-dts":"^4.2.2",rrweb:"^1.1.3",sinon:"9.0.2",testcafe:"^1.19.0","testcafe-browser-provider-browserstack":"^1.14.0",tslib:"^2.4.0",typescript:"^4.7.4"},"lint-staged":{"*.{ts,tsx,js,json}":"prettier --write","*.{ts,tsx}":["eslint --fix","tsc --noEmit --esModuleInterop --jsx react"]}};
|
|
5
|
+
},{}],"C9JJ":[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
|
-
},{"../package.json":"EHrm"}],"
|
|
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
|
-
},{"./config":"
|
|
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.
|
|
11
|
-
},{"./utils":"
|
|
12
|
-
"use strict";
|
|
13
|
-
},{}],"
|
|
14
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.autocapture=void 0;var e=require("./utils"),t=require("./autocapture-utils"),n=r(require("./extensions/rageclick"));function r(e){return e&&e.__esModule?e:{default:e}}var i={_initializedTokens:[],_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;do{
|
|
15
|
-
},{"./utils":"
|
|
16
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.sessionStore=exports.
|
|
17
|
-
},{"./utils":"
|
|
18
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
19
|
-
},{"./utils":"
|
|
20
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
21
|
-
},{"./utils":"
|
|
22
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
23
|
-
},{"./
|
|
24
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
25
|
-
},{"./utils":"
|
|
26
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
27
|
-
},{"./
|
|
28
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
29
|
-
},{"./sessionrecording":"
|
|
30
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
31
|
-
},{"
|
|
32
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
33
|
-
},{"
|
|
34
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
35
|
-
},{
|
|
36
|
-
"use strict";
|
|
37
|
-
},{}],"
|
|
38
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
39
|
-
},{
|
|
40
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CaptureMetrics=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 r(e,t){for(var r=0;r<t.length;r++){var i=t[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,i.key,i)}}function i(e,t,i){return t&&r(e.prototype,t),i&&r(e,i),e}var n=function(){function e(r){t(this,e),this.enabled=r,this.metrics={}}return i(e,[{key:"incr",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)+t)}},{key:"decr",value:function(e){this.enabled&&(e="phjs-".concat(e),this.metrics[e]=(this.metrics[e]||0)-1)}}]),e}();exports.CaptureMetrics=n;
|
|
41
|
-
},{
|
|
42
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.deflate=xt,exports.deflateSync=bt,exports.inflate=Mt,exports.inflateSync=kt,exports.compress=exports.gzip=Dt,exports.compressSync=exports.gzipSync=Ot,exports.gunzip=It,exports.gunzipSync=Zt,exports.zlib=Tt,exports.zlibSync=jt,exports.unzlib=_t,exports.unzlibSync=Bt,exports.decompress=Wt,exports.decompressSync=Yt,exports.strToU8=Jt,exports.strFromU8=Kt,exports.zip=tn,exports.zipSync=nn,exports.unzip=rn,exports.unzipSync=en,exports.AsyncDecompress=exports.Decompress=exports.AsyncUnzlib=exports.Unzlib=exports.AsyncZlib=exports.Zlib=exports.AsyncGunzip=exports.Gunzip=exports.AsyncCompress=exports.AsyncGzip=exports.Compress=exports.Gzip=exports.AsyncInflate=exports.Inflate=exports.AsyncDeflate=exports.Deflate=void 0;var t={},n=function(n,r,e,i,o){var a=t[r]||(t[r]=URL.createObjectURL(new Blob([n],{type:"text/javascript"}))),f=new Worker(a);return f.onerror=function(t){return o(t.error,null)},f.onmessage=function(t){return o(null,t.data)},f.postMessage(e,i),f},r=Uint8Array,e=Uint16Array,i=Uint32Array,o=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),f=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,n){for(var r=new e(31),o=0;o<31;++o)r[o]=n+=1<<t[o-1];var a=new i(r[30]);for(o=1;o<30;++o)for(var f=r[o];f<r[o+1];++f)a[f]=f-r[o]<<5|o;return[r,a]},u=s(o,2),l=u[0],c=u[1];l[28]=258,c[258]=28;for(var h=s(a,0),p=h[0],v=h[1],d=new e(32768),g=0;g<32768;++g){var w=(43690&g)>>>1|(21845&g)<<1;w=(61680&(w=(52428&w)>>>2|(13107&w)<<2))>>>4|(3855&w)<<4,d[g]=((65280&w)>>>8|(255&w)<<8)>>>1}var y=function(t,n,r){for(var i=t.length,o=0,a=new e(n);o<i;++o)++a[t[o]-1];var f,s=new e(n);for(o=0;o<n;++o)s[o]=s[o-1]+a[o-1]<<1;if(r){f=new e(1<<n);var u=15-n;for(o=0;o<i;++o)if(t[o])for(var l=o<<4|t[o],c=n-t[o],h=s[t[o]-1]++<<c,p=h|(1<<c)-1;h<=p;++h)f[d[h]>>>u]=l}else for(f=new e(i),o=0;o<i;++o)f[o]=d[s[t[o]-1]++]>>>15-t[o];return f},m=new r(288);for(g=0;g<144;++g)m[g]=8;for(g=144;g<256;++g)m[g]=9;for(g=256;g<280;++g)m[g]=7;for(g=280;g<288;++g)m[g]=8;var x=new r(32);for(g=0;g<32;++g)x[g]=5;var b=y(m,9,0),z=y(m,9,1),A=y(x,5,0),M=y(x,5,1),k=function(t){for(var n=t[0],r=1;r<t.length;++r)t[r]>n&&(n=t[r]);return n},S=function(t,n,r){var e=n/8>>0;return(t[e]|t[e+1]<<8)>>>(7&n)&r},C=function(t,n){var r=n/8>>0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>>(7&n)},D=function(t){return(t/8>>0)+(7&t&&1)},O=function(t,n,o){(null==n||n<0)&&(n=0),(null==o||o>t.length)&&(o=t.length);var a=new(t instanceof e?e:t instanceof i?i:r)(o-n);return a.set(t.subarray(n,o)),a},G=function(t,n,e){var i=t.length,s=!n||e,u=!e||e.i;e||(e={}),n||(n=new r(3*i));var c=function(t){var e=n.length;if(t>e){var i=new r(Math.max(2*e,t));i.set(n),n=i}},h=e.f||0,v=e.p||0,d=e.b||0,g=e.l,w=e.d,m=e.m,x=e.n,b=8*i;do{if(!g){e.f=h=S(t,v,1);var A=S(t,v+1,3);if(v+=3,!A){var G=t[(B=D(v)+4)-4]|t[B-3]<<8,U=B+G;if(U>i){if(u)throw"unexpected EOF";break}s&&c(d+G),n.set(t.subarray(B,U),d),e.b=d+=G,e.p=v=8*U;continue}if(1==A)g=z,w=M,m=9,x=5;else{if(2!=A)throw"invalid block type";var I=S(t,v,31)+257,Z=S(t,v+10,15)+4,E=I+S(t,v+5,31)+1;v+=14;for(var F=new r(E),T=new r(19),j=0;j<Z;++j)T[f[j]]=S(t,v+3*j,7);v+=3*Z;var L=k(T),R=(1<<L)-1;if(!u&&v+E*(L+7)>b)break;var _=y(T,L,1);for(j=0;j<E;){var B,H=_[S(t,v,R)];if(v+=15&H,(B=H>>>4)<16)F[j++]=B;else{var P=0,W=0;for(16==B?(W=3+S(t,v,3),v+=2,P=F[j-1]):17==B?(W=3+S(t,v,7),v+=3):18==B&&(W=11+S(t,v,127),v+=7);W--;)F[j++]=P}}var Y=F.subarray(0,I),q=F.subarray(I);m=k(Y),x=k(q),g=y(Y,m,1),w=y(q,x,1)}if(v>b)throw"unexpected EOF"}s&&c(d+131072);for(var J=(1<<m)-1,K=(1<<x)-1,N=m+x+18;u||v+N<b;){var Q=(P=g[C(t,v)&J])>>>4;if((v+=15&P)>b)throw"unexpected EOF";if(!P)throw"invalid length/literal";if(Q<256)n[d++]=Q;else{if(256==Q){g=null;break}var V=Q-254;if(Q>264){var X=o[j=Q-257];V=S(t,v,(1<<X)-1)+l[j],v+=X}var $=w[C(t,v)&K],tt=$>>>4;if(!$)throw"invalid distance";v+=15&$;q=p[tt];if(tt>3){X=a[tt];q+=C(t,v)&(1<<X)-1,v+=X}if(v>b)throw"unexpected EOF";s&&c(d+131072);for(var nt=d+V;d<nt;d+=4)n[d]=n[d-q],n[d+1]=n[d+1-q],n[d+2]=n[d+2-q],n[d+3]=n[d+3-q];d=nt}}e.l=g,e.p=v,e.b=d,g&&(h=1,e.m=m,e.d=w,e.n=x)}while(!h);return d==n.length?n:O(n,0,d)},U=function(t,n,r){r<<=7&n;var e=n/8>>0;t[e]|=r,t[e+1]|=r>>>8},I=function(t,n,r){r<<=7&n;var e=n/8>>0;t[e]|=r,t[e+1]|=r>>>8,t[e+2]|=r>>>16},Z=function(t,n){for(var i=[],o=0;o<t.length;++o)t[o]&&i.push({s:o,f:t[o]});var a=i.length,f=i.slice();if(!a)return[new r(0),0];if(1==a){var s=new r(i[0].s+1);return s[i[0].s]=1,[s,1]}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var u=i[0],l=i[1],c=0,h=1,p=2;for(i[0]={s:-1,f:u.f+l.f,l:u,r:l};h!=a-1;)u=i[i[c].f<i[p].f?c++:p++],l=i[c!=h&&i[c].f<i[p].f?c++:p++],i[h++]={s:-1,f:u.f+l.f,l:u,r:l};var v=f[0].s;for(o=1;o<a;++o)f[o].s>v&&(v=f[o].s);var d=new e(v+1),g=E(i[h-1],d,0);if(g>n){o=0;var w=0,y=g-n,m=1<<y;for(f.sort(function(t,n){return d[n.s]-d[t.s]||t.f-n.f});o<a;++o){var x=f[o].s;if(!(d[x]>n))break;w+=m-(1<<g-d[x]),d[x]=n}for(w>>>=y;w>0;){var b=f[o].s;d[b]<n?w-=1<<n-d[b]++-1:++o}for(;o>=0&&w;--o){var z=f[o].s;d[z]==n&&(--d[z],++w)}g=n}return[new r(d),g]},E=function(t,n,r){return-1==t.s?Math.max(E(t.l,n,r+1),E(t.r,n,r+1)):n[t.s]=r},F=function(t){for(var n=t.length;n&&!t[--n];);for(var r=new e(++n),i=0,o=t[0],a=1,f=function(t){r[i++]=t},s=1;s<=n;++s)if(t[s]==o&&s!=n)++a;else{if(!o&&a>2){for(;a>138;a-=138)f(32754);a>2&&(f(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(f(o),--a;a>6;a-=6)f(8304);a>2&&(f(a-3<<5|8208),a=0)}for(;a--;)f(o);a=1,o=t[s]}return[r.subarray(0,i),n]},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},j=function(t,n,r){var e=r.length,i=D(n+2);t[i]=255&e,t[i+1]=e>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var o=0;o<e;++o)t[i+o+4]=r[o];return 8*(i+4+e)},L=function(t,n,r,i,s,u,l,c,h,p,v){U(n,v++,r),++s[256];for(var d=Z(s,15),g=d[0],w=d[1],z=Z(u,15),M=z[0],k=z[1],S=F(g),C=S[0],D=S[1],O=F(M),G=O[0],E=O[1],L=new e(19),R=0;R<C.length;++R)L[31&C[R]]++;for(R=0;R<G.length;++R)L[31&G[R]]++;for(var _=Z(L,7),B=_[0],H=_[1],P=19;P>4&&!B[f[P-1]];--P);var W,Y,q,J,K=p+5<<3,N=T(s,m)+T(u,x)+l,Q=T(s,g)+T(u,M)+l+14+3*P+T(L,B)+(2*L[16]+3*L[17]+7*L[18]);if(K<=N&&K<=Q)return j(n,v,t.subarray(h,h+p));if(U(n,v,1+(Q<N)),v+=2,Q<N){W=y(g,w,0),Y=g,q=y(M,k,0),J=M;var V=y(B,H,0);U(n,v,D-257),U(n,v+5,E-1),U(n,v+10,P-4),v+=14;for(R=0;R<P;++R)U(n,v+3*R,B[f[R]]);v+=3*P;for(var X=[C,G],$=0;$<2;++$){var tt=X[$];for(R=0;R<tt.length;++R){var nt=31&tt[R];U(n,v,V[nt]),v+=B[nt],nt>15&&(U(n,v,tt[R]>>>5&127),v+=tt[R]>>>12)}}}else W=b,Y=m,q=A,J=x;for(R=0;R<c;++R)if(i[R]>255){nt=i[R]>>>18&31;I(n,v,W[nt+257]),v+=Y[nt+257],nt>7&&(U(n,v,i[R]>>>23&31),v+=o[nt]);var rt=31&i[R];I(n,v,q[rt]),v+=J[rt],rt>3&&(I(n,v,i[R]>>>5&8191),v+=a[rt])}else I(n,v,W[i[R]]),v+=Y[i[R]];return I(n,v,W[256]),v+Y[256]},R=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_=new r(0),B=function(t,n,f,s,u,l){var h=t.length,p=new r(s+h+5*(1+Math.floor(h/7e3))+u),d=p.subarray(s,p.length-u),g=0;if(!n||h<8)for(var w=0;w<=h;w+=65535){var y=w+65535;y<h?g=j(d,g,t.subarray(w,y)):(d[w]=l,g=j(d,g,t.subarray(w,h)))}else{for(var m=R[n-1],x=m>>>13,b=8191&m,z=(1<<f)-1,A=new e(32768),M=new e(z+1),k=Math.ceil(f/3),S=2*k,C=function(n){return(t[n]^t[n+1]<<k^t[n+2]<<S)&z},G=new i(25e3),U=new e(288),I=new e(32),Z=0,E=0,F=(w=0,0),T=0,B=0;w<h;++w){var H=C(w),P=32767&w,W=M[H];if(A[P]=W,M[H]=P,T<=w){var Y=h-w;if((Z>7e3||F>24576)&&Y>423){g=L(t,d,0,G,U,I,E,F,B,w-B,g),F=Z=E=0,B=w;for(var q=0;q<286;++q)U[q]=0;for(q=0;q<30;++q)I[q]=0}var J=2,K=0,N=b,Q=P-W&32767;if(Y>2&&H==C(w-Q))for(var V=Math.min(x,Y)-1,X=Math.min(32767,w),$=Math.min(258,Y);Q<=X&&--N&&P!=W;){if(t[w+J]==t[w+J-Q]){for(var tt=0;tt<$&&t[w+tt]==t[w+tt-Q];++tt);if(tt>J){if(J=tt,K=Q,tt>V)break;var nt=Math.min(Q,tt-2),rt=0;for(q=0;q<nt;++q){var et=w-Q+q+32768&32767,it=et-A[et]+32768&32767;it>rt&&(rt=it,W=et)}}}Q+=(P=W)-(W=A[P])+32768&32767}if(K){G[F++]=268435456|c[J]<<18|v[K];var ot=31&c[J],at=31&v[K];E+=o[ot]+a[at],++U[257+ot],++I[at],T=w+J,++Z}else G[F++]=t[w],++U[t[w]]}}g=L(t,d,l,G,U,I,E,F,B,w-B,g),l||(g=j(d,g,_))}return O(p,0,s+D(g)+u)},H=function(){for(var t=new i(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&3988292384)^r>>>1;t[n]=r}return t}(),P=function(){var t=4294967295;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=H[255&r^n[e]]^r>>>8;t=r},d:function(){return 4294967295^t}}},W=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,o=r.length,a=0;a!=o;){for(var f=Math.min(a+5552,o);a<f;++a)i+=e+=r[a];e%=65521,i%=65521}t=e,n=i},d:function(){return(t>>>8<<16|(255&n)<<8|n>>>8)+2*((255&t)<<23)}}},Y=function(t,n,r,e,i){return B(t,null==n.level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+n.mem,r,e,!i)},q=function(t,n){var r={};for(var e in t)r[e]=t[e];for(var e in n)r[e]=n[e];return r},J=function(t,n,r){for(var e=t(),i=t.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/ /g,"").split(","),a=0;a<e.length;++a){var f=e[a],s=o[a];if("function"==typeof f){n+=";"+s+"=";var u=f.toString();if(f.prototype)if(-1!=u.indexOf("[native code]")){var l=u.indexOf(" ",8)+1;n+=u.slice(l,u.indexOf("(",l))}else for(var c in n+=u,f.prototype)n+=";"+s+".prototype."+c+"="+f.prototype[c].toString();else n+=u}else r[s]=f}return[n,r]},K=[],N=function(t){var n=[];for(var o in t)(t[o]instanceof r||t[o]instanceof e||t[o]instanceof i)&&n.push((t[o]=new t[o].constructor(t[o])).buffer);return n},Q=function(t,r,e,i){var o;if(!K[e]){for(var a="",f={},s=t.length-1,u=0;u<s;++u)a=(o=J(t[u],a,f))[0],f=o[1];K[e]=J(t[s],a,f)}var l=q({},K[e][1]);return n(K[e][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+r.toString()+"}",e,l,N(l),i)},V=function(){return[r,e,i,o,a,f,l,p,z,M,d,y,k,S,C,D,O,G,kt,et,it]},X=function(){return[r,e,i,o,a,f,c,v,b,m,A,x,d,R,_,y,U,I,Z,E,F,T,j,L,D,O,B,Y,bt,et]},$=function(){return[ct,vt,lt,P,H]},tt=function(){return[ht,pt]},nt=function(){return[dt,lt,W]},rt=function(){return[gt]},et=function(t){return postMessage(t,[t.buffer])},it=function(t){return t&&t.size&&new r(t.size)},ot=function(t,n,e,i,o,a){var f=Q(e,i,o,function(t,n){f.terminate(),a(t,n)});return n.consume||(t=new r(t)),f.postMessage([t,n],[t.buffer]),function(){f.terminate()}},at=function(t){return t.ondata=function(t,n){return postMessage([t,n],[t.buffer])},function(n){return t.push(n.data[0],n.data[1])}},ft=function(t,n,r,e,i){var o,a=Q(t,e,i,function(t,r){t?(a.terminate(),n.ondata.call(n,t)):(r[1]&&a.terminate(),n.ondata.call(n,t,r[0],r[1]))});a.postMessage(r),n.push=function(t,r){if(o)throw"stream finished";if(!n.ondata)throw"no stream handler";a.postMessage([t,o=r],[t.buffer])},n.terminate=function(){a.terminate()}},st=function(t,n){return t[n]|t[n+1]<<8},ut=function(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16)+2*(t[n+3]<<23)},lt=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},ct=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&<(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},ht=function(t){if(31!=t[0]||139!=t[1]||8!=t[2])throw"invalid gzip data";var n=t[3],r=10;4&n&&(r+=t[10]|2+(t[11]<<8));for(var e=(n>>3&1)+(n>>4&1);e>0;e-=!t[r++]);return r+(2&n)},pt=function(t){var n=t.length;return(t[n-4]|t[n-3]<<8|t[n-2]<<16)+2*(t[n-1]<<23)},vt=function(t){return 10+(t.filename&&t.filename.length+1||0)},dt=function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;t[0]=120,t[1]=e<<6|(e?32-2*e:1)},gt=function(t){if(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(32&t[1])throw"invalid zlib data: preset dictionaries not supported"};function wt(t,n){return n||"function"!=typeof t||(n=t,t={}),this.ondata=n,t}var yt=function(){function t(t,n){n||"function"!=typeof t||(n=t,t={}),this.ondata=n,this.o=t||{}}return t.prototype.p=function(t,n){this.ondata(Y(t,this.o,0,0,!n),n)},t.prototype.push=function(t,n){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=n,this.p(t,n||!1)},t}();exports.Deflate=yt;var mt=function(){return function(t,n){ft([X,function(){return[at,yt]}],this,wt.call(this,t,n),function(t){var n=new yt(t.data);onmessage=at(n)},6)}}();function xt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[X],function(t){return et(bt(t.data[0],t.data[1]))},0,r)}function bt(t,n){return void 0===n&&(n={}),Y(t,n,0,0)}exports.AsyncDeflate=mt;var zt=function(){function t(t){this.s={},this.p=new r(0),this.ondata=t}return t.prototype.e=function(t){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var n=this.p.length,e=new r(n+t.length);e.set(this.p),e.set(t,n),this.p=e},t.prototype.c=function(t){this.d=this.s.i=t||!1;var n=this.s.b,r=G(this.p,this.o,this.s);this.ondata(O(r,n,this.s.b),this.d),this.o=O(r,this.s.b-32768),this.s.b=this.o.length,this.p=O(this.p,this.s.p/8>>0),this.s.p&=7},t.prototype.push=function(t,n){this.e(t),this.c(n)},t}();exports.Inflate=zt;var At=function(){return function(t){this.ondata=t,ft([V,function(){return[at,zt]}],this,0,function(){var t=new zt;onmessage=at(t)},7)}}();function Mt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[V],function(t){return et(kt(t.data[0],it(t.data[1])))},1,r)}function kt(t,n){return G(t,n)}exports.AsyncInflate=At;var St=function(){function t(t,n){this.c=P(),this.l=0,this.v=1,yt.call(this,t,n)}return t.prototype.push=function(t,n){yt.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){this.c.p(t),this.l+=t.length;var r=Y(t,this.o,this.v&&vt(this.o),n&&8,!n);this.v&&(ct(r,this.o),this.v=0),n&&(lt(r,r.length-8,this.c.d()),lt(r,r.length-4,this.l)),this.ondata(r,n)},t}();exports.Compress=exports.Gzip=St;var Ct=function(){return function(t,n){ft([X,$,function(){return[at,yt,St]}],this,wt.call(this,t,n),function(t){var n=new St(t.data);onmessage=at(n)},8)}}();function Dt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[X,$,function(){return[Ot]}],function(t){return et(Ot(t.data[0],t.data[1]))},2,r)}function Ot(t,n){void 0===n&&(n={});var r=P(),e=t.length;r.p(t);var i=Y(t,n,vt(n),8),o=i.length;return ct(i,n),lt(i,o-8,r.d()),lt(i,o-4,e),i}exports.AsyncCompress=exports.AsyncGzip=Ct;var Gt=function(){function t(t){this.v=1,zt.call(this,t)}return t.prototype.push=function(t,n){if(zt.prototype.e.call(this,t),this.v){var r=ht(this.p);if(r>=this.p.length&&!n)return;this.p=this.p.subarray(r),this.v=0}if(n){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}zt.prototype.c.call(this,n)},t}();exports.Gunzip=Gt;var Ut=function(){return function(t){this.ondata=t,ft([V,tt,function(){return[at,zt,Gt]}],this,0,function(){var t=new Gt;onmessage=at(t)},9)}}();function It(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[V,tt,function(){return[Zt]}],function(t){return et(Zt(t.data[0]))},3,r)}function Zt(t,n){return G(t.subarray(ht(t),-8),n||new r(pt(t)))}exports.AsyncGunzip=Ut;var Et=function(){function t(t,n){this.c=W(),this.v=1,yt.call(this,t,n)}return t.prototype.push=function(t,n){yt.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){this.c.p(t);var r=Y(t,this.o,this.v&&2,n&&4,!n);this.v&&(dt(r,this.o),this.v=0),n&<(r,r.length-4,this.c.d()),this.ondata(r,n)},t}();exports.Zlib=Et;var Ft=function(){return function(t,n){ft([X,nt,function(){return[at,yt,Et]}],this,wt.call(this,t,n),function(t){var n=new Et(t.data);onmessage=at(n)},10)}}();function Tt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[X,nt,function(){return[jt]}],function(t){return et(jt(t.data[0],t.data[1]))},4,r)}function jt(t,n){void 0===n&&(n={});var r=W();r.p(t);var e=Y(t,n,2,4);return dt(e,n),lt(e,e.length-4,r.d()),e}exports.AsyncZlib=Ft;var Lt=function(){function t(t){this.v=1,zt.call(this,t)}return t.prototype.push=function(t,n){if(zt.prototype.e.call(this,t),this.v){if(this.p.length<2&&!n)return;this.p=this.p.subarray(2),this.v=0}if(n){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}zt.prototype.c.call(this,n)},t}();exports.Unzlib=Lt;var Rt=function(){return function(t){this.ondata=t,ft([V,rt,function(){return[at,zt,Lt]}],this,0,function(){var t=new Lt;onmessage=at(t)},11)}}();function _t(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[V,rt,function(){return[Bt]}],function(t){return et(Bt(t.data[0],it(t.data[1])))},5,r)}function Bt(t,n){return G((gt(t),t.subarray(2,-4)),n)}exports.AsyncUnzlib=Rt;var Ht=function(){function t(t){this.G=Gt,this.I=zt,this.Z=Lt,this.ondata=t}return t.prototype.push=function(t,n){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(t,n);else{if(this.p&&this.p.length){var e=new r(this.p.length+t.length);e.set(this.p),e.set(t,this.p.length)}else this.p=t;if(this.p.length>2){var i=this,o=function(){i.ondata.apply(i,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(o):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(o):new this.Z(o),this.s.push(this.p,n),this.p=null}}},t}();exports.Decompress=Ht;var Pt=function(){function t(t){this.G=Ut,this.I=At,this.Z=Rt,this.ondata=t}return t.prototype.push=function(t,n){Ht.prototype.push.call(this,t,n)},t}();function Wt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return 31==t[0]&&139==t[1]&&8==t[2]?It(t,n,r):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?Mt(t,n,r):_t(t,n,r)}function Yt(t,n){return 31==t[0]&&139==t[1]&&8==t[2]?Zt(t,n):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?kt(t,n):Bt(t,n)}exports.AsyncDecompress=Pt;var qt=function(t,n,e,i){for(var o in t){var a=t[o],f=n+o;a instanceof r?e[f]=[a,i]:Array.isArray(a)?e[f]=[a[0],q(i,a[1])]:qt(a,f+"/",e,i)}};function Jt(t,n){var e=t.length;if(!n&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(t);for(var i=new r(t.length+(t.length>>>1)),o=0,a=function(t){i[o++]=t},f=0;f<e;++f){if(o+5>i.length){var s=new r(o+8+(e-f<<1));s.set(i),i=s}var u=t.charCodeAt(f);u<128||n?a(u):u<2048?(a(192|u>>>6),a(128|63&u)):u>55295&&u<57344?(a(240|(u=65536+(1047552&u)|1023&t.charCodeAt(++f))>>>18),a(128|u>>>12&63),a(128|u>>>6&63),a(128|63&u)):(a(224|u>>>12),a(128|u>>>6&63),a(128|63&u))}return O(i,0,o)}function Kt(t,n){var r="";if(!n&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e=0;e<t.length;){var i=t[e++];i<128||n?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((31&i)<<6|63&t[e++]):i<240?r+=String.fromCharCode((15&i)<<12|(63&t[e++])<<6|63&t[e++]):(i=((15&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}return r}var Nt=function(t,n){return n+30+st(t,n+26)+st(t,n+28)},Qt=function(t,n,r){var e=st(t,n+28),i=Kt(t.subarray(n+46,n+46+e),!(2048&st(t,n+8))),o=n+46+e,a=r?Vt(t,o):[ut(t,n+20),ut(t,n+24),ut(t,n+42)],f=a[0],s=a[1],u=a[2];return[st(t,n+10),f,s,i,o+st(t,n+30)+st(t,n+32),u]},Vt=function(t,n){for(;1!=st(t,n);n+=4+st(t,n+2));return[ut(t,n+12),ut(t,n+4),ut(t,n+20)]},Xt=function(t,n,r,e,i,o,a,f,s,u){var l=o.length,c=e.length;lt(t,n,null!=s?33639248:67324752),n+=4,null!=s&&(t[n]=20,n+=2),t[n]=20,n+=2,t[n++]=8==u&&(1==f.level?6:f.level<6?4:9==f.level?2:0),t[n++]=a&&8,t[n]=u,n+=2;var h=new Date(f.mtime||Date.now()),p=h.getFullYear()-1980;if(p<0||p>119)throw"date not in range 1980-2099";lt(t,n,2*(p<<24)|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>>1),lt(t,n+=4,r),lt(t,n+4,c),lt(t,n+8,i),lt(t,n+12,l),n+=16,null!=s&&(lt(t,n+=10,s),n+=4),t.set(o,n),n+=l,null==s&&t.set(e,n)},$t=function(t,n,r,e,i){lt(t,n,101010256),lt(t,n+8,r),lt(t,n+10,r),lt(t,n+12,e),lt(t,n+16,i)};function tn(t,n,e){if(e||(e=n,n={}),"function"!=typeof e)throw"no callback";var i={};qt(t,"",i,n);var o=Object.keys(i),a=o.length,f=0,s=0,u=a,l=new Array(a),c=[],h=function(){for(var t=0;t<c.length;++t)c[t]()},p=function(){var t=new r(s+22),n=f,i=s-f;s=0;for(var o=0;o<u;++o){var a=l[o];try{Xt(t,s,a.c,a.d,a.m,a.n,a.u,a.p,null,a.t),Xt(t,f,a.c,a.d,a.m,a.n,a.u,a.p,s,a.t),f+=46+a.n.length,s+=30+a.n.length+a.d.length}catch(c){return e(c,null)}}$t(t,f,l.length,i,n),e(null,t)};a||p();for(var v=function(t){var n=o[t],r=i[n],u=r[0],v=r[1],d=P(),g=u.length;d.p(u);var w=Jt(n),y=w.length,m=0==v.level?0:8,x=function(r,i){if(r)h(),e(r,null);else{var o=i.length;l[t]={t:m,d:i,m:g,c:d.d(),u:n.length!=o,n:w,p:v},f+=30+y+o,s+=76+2*y+o,--a||p()}};if(w.length>65535&&x("filename too long",null),m)if(g<16e4)try{x(null,bt(u,v))}catch(b){x(b,null)}else c.push(xt(u,v,x));else x(null,u)},d=0;d<u;++d)v(d);return h}function nn(t,n){void 0===n&&(n={});var e={},i=[];qt(t,"",e,n);var o=0,a=0;for(var f in e){var s=e[f],u=s[0],l=s[1],c=0==l.level?0:8,h=Jt(f),p=h.length;if(h.length>65535)throw"filename too long";var v=c?bt(u,l):u,d=v.length,g=P();g.p(u),i.push({t:c,d:v,m:u.length,c:g.d(),u:f.length!=p,n:h,o:o,p:l}),o+=30+p+d,a+=76+2*p+d}for(var w=new r(a+22),y=o,m=a-o,x=0;x<i.length;++x){var b=i[x];Xt(w,b.o,b.c,b.d,b.m,b.n,b.u,b.p,null,b.t),Xt(w,o,b.c,b.d,b.m,b.n,b.u,b.p,b.o,b.t),o+=46+b.n.length}return $t(w,o,i.length,m,y),w}function rn(t,n){if("function"!=typeof n)throw"no callback";for(var e=[],i=function(){for(var t=0;t<e.length;++t)e[t]()},o={},a=t.length-22;101010256!=ut(t,a);--a)if(!a||t.length-a>65558)return void n("invalid zip file",null);var f=st(t,a+8);f||n(null,{});var s=f,u=ut(t,a+16),l=4294967295==u;if(l){if(a=ut(t,a-12),101075792!=ut(t,a))throw"invalid zip file";s=f=ut(t,a+32),u=ut(t,a+48)}for(var c=function(s){var c=Qt(t,u,l),h=c[0],p=c[1],v=c[2],d=c[3],g=c[4],w=c[5],y=Nt(t,w);u=g;var m=function(t,r){t?(i(),n(t,null)):(o[d]=r,--f||n(null,o))};if(h)if(8==h){var x=t.subarray(y,y+p);if(p<32e4)try{m(null,kt(x,new r(v)))}catch(a){m(a,null)}else e.push(Mt(x,{size:v},m))}else m("unknown compression type "+h,null);else m(null,O(t,y,y+p))},h=0;h<s;++h)c();return i}function en(t){for(var n={},e=t.length-22;101010256!=ut(t,e);--e)if(!e||t.length-e>65558)throw"invalid zip file";var i=st(t,e+8);if(!i)return{};var o=ut(t,e+16),a=4294967295==o;if(a){if(e=ut(t,e-12),101075792!=ut(t,e))throw"invalid zip file";i=ut(t,e+32),o=ut(t,e+48)}for(var f=0;f<i;++f){var s=Qt(t,o,a),u=s[0],l=s[1],c=s[2],h=s[3],p=s[4],v=s[5],d=Nt(t,v);if(o=p,u){if(8!=u)throw"unknown compression type "+u;n[h]=kt(t.subarray(d,d+l),new r(c))}else n[h]=O(t,d,d+l)}return n}
|
|
43
|
-
},{}],"
|
|
44
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
45
|
-
},{"./lz-string":"
|
|
46
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.xhr=exports.encodePostData=exports.addParamsToURL=void 0;var e=require("./utils"),r=t(require("./config"));function t(e){return e&&e.__esModule?e:{default:e}}function
|
|
47
|
-
},{"./utils":"
|
|
48
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RetryQueue=void 0;var e=require("./base-request-queue"),t=require("./send-request")
|
|
49
|
-
},{"./base-request-queue":"
|
|
50
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SessionIdManager=void 0;var
|
|
51
|
-
},{"./posthog-persistence":"
|
|
52
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.
|
|
53
|
-
},{"./utils":"
|
|
54
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.init_from_snippet=N,exports.init_as_module=Y,exports.PostHogLib=void 0;var e,t,o=require("./lz-string"),r=w(require("./config")),i=require("./utils"),n=require("./autocapture"),s=require("./posthog-people"),p=require("./posthog-featureflags"),a=require("./posthog-persistence"),c=require("./extensions/sessionrecording"),_=require("./decide"),u=require("./extensions/toolbar"),d=require("./gdpr-utils"),g=require("./storage"),l=require("./request-queue"),h=require("./capture-metrics"),f=require("./compression"),y=require("./send-request"),b=require("./retry-queue"),v=require("./sessionid"),m=require("./apm");function w(e){return e&&e.__esModule?e:{default:e}}function k(e,t){var o=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),o.push.apply(o,r)}return o}function q(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?k(Object(o),!0).forEach(function(t){P(e,t,o[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):k(Object(o)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))})}return e}function P(e,t,o){return t in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}function S(e,t){return I(e)||E(e,t)||F(e,t)||x()}function x(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function F(e,t){if(e){if("string"==typeof e)return O(e,t);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?O(e,t):void 0}}function O(e,t){(null==t||t>e.length)&&(t=e.length);for(var o=0,r=new Array(t);o<t;o++)r[o]=e[o];return r}function E(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var o=[],r=!0,i=!1,n=void 0;try{for(var s,p=e[Symbol.iterator]();!(r=(s=p.next()).done)&&(o.push(s.value),!t||o.length!==t);r=!0);}catch(a){i=!0,n=a}finally{try{r||null==p.return||p.return()}finally{if(i)throw n}}return o}}function I(e){if(Array.isArray(e))return e}var $=0,A=1,R=function(){},H={},j="posthog",M=i.window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,D=!M&&-1===i.userAgent.indexOf("MSIE")&&-1===i.userAgent.indexOf("Mozilla"),L=function(){return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",autocapture:!0,rageclick:!1,cross_subdomain_cookie:-1===i.document.location.hostname.indexOf("herokuapp.com"),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:function(){},store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:!1,secure_cookie:"https:"===i.window.location.protocol,ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,property_blacklist:[],sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(e){var t="Bad HTTP status: "+e.status+" "+e.statusText;console.error(t)},get_device_id:function(e){return e},_onCapture:function(){},_capture_metrics:!1,_capture_performance:!1}},U=function(){};exports.PostHogLib=U;var C=function(o,a,_){var d,g=_!==j&&t?t[_]:t;if(g&&e===$)d=g;else{if(g&&!i._.isArray(g))return void console.error("You have already initialized "+_);d=new U}if(d._init(o,a,_),d.people=new s.PostHogPeople,d.people._init(d),d.featureFlags=new p.PostHogFeatureFlags(d),d.feature_flags=d.featureFlags,d.toolbar=new u.Toolbar(d),d.toolbar.maybeLoadEditor(),d.sessionRecording=new c.SessionRecording(d),d.sessionRecording.startRecordingIfEnabled(),d.__autocapture_enabled=d.get_config("autocapture"),d.get_config("autocapture")){n.autocapture.enabledForProject(d.get_config("token"),100,100)?n.autocapture.isBrowserSupported()?n.autocapture.init(d):(d.__autocapture_enabled=!1,i.logger.log("Disabling Automatic Event Collection because this browser is not supported")):(d.__autocapture_enabled=!1,i.logger.log("Not in active bucket: disabling Automatic Event Collection."))}return r.default.DEBUG=r.default.DEBUG||d.get_config("debug"),!i._.isUndefined(g)&&i._.isArray(g)&&(d._execute_array.call(d.people,g.people),d._execute_array(g)),d};U.prototype.init=function(e,o,r){if(i._.isUndefined(r))console.error("You must name your new library: init(token, config, name)");else{if(r!==j){var n=C(e,o,r);return t[r]=n,n._loaded(),n}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}},U.prototype._init=function(e,t,o){if(this.__loaded=!0,this.config={},this._triggered_notifs=[],this.compression={},this.set_config(i._.extend({},L(),t,{name:o,token:e,callback_fn:(o===j?o:j+"."+o)+"._jsc"})),this._jsc=function(){},this._captureMetrics=new h.CaptureMetrics(this.get_config("_capture_metrics")),this._requestQueue=new l.RequestQueue(this._captureMetrics,i._.bind(this._handle_queued_event,this)),this._retryQueue=new b.RetryQueue(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new a.PostHogPersistence(this.config),this.sessionManager=new v.SessionIdManager(this.config,this.persistence),this._gdpr_init(),!this.get_distinct_id()){var r=this.get_config("get_device_id")(i._.UUID());this.register_once({distinct_id:r,$device_id:r},"")}i.window.addEventListener&&i.window.addEventListener("unload",this._handle_unload.bind(this))},U.prototype._loaded=function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(e){console.error("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new _.Decide(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)},U.prototype._start_queue_if_opted_in=function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()},U.prototype._dom_loaded=function(){this.has_opted_out_capturing()||i._.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__request_queue,this._start_queue_if_opted_in()},U.prototype._prepare_callback=function(e,t){if(i._.isUndefined(e))return null;if(M){return function(o){e(o,t)}}var o=this._jsc,r=""+Math.floor(1e8*Math.random()),n=this.get_config("callback_fn")+"["+r+"]";return o[r]=function(i){delete o[r],e(i,t)},n},U.prototype._handle_unload=function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.capture("$pageleave",null,{transport:"sendbeacon"})},U.prototype._handle_queued_event=function(e,t,o){var r=JSON.stringify(t);this.__compress_and_send_json_request(e,r,o||H,R)},U.prototype.__compress_and_send_json_request=function(e,t,o,r){var i=S((0,f.compressData)((0,f.decideCompression)(this.compression),t,o),2),n=i[0],s=i[1];this._send_request(e,n,s,r)},U.prototype._send_request=function(e,t,o,r){if(D)this.__request_queue.push(arguments);else{var n={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};o=i._.extend(n,o||{}),M||(o.method="GET");var s=i.window.navigator.sendBeacon&&"sendbeacon"===o.transport.toLowerCase();if(e=(0,y.addParamsToURL)(e,o.urlQueryArgs,{ip:this.get_config("ip")}),i._.isObject(t)&&this.get_config("img")){var p=i.document.createElement("img");p.src=e,i.document.body.appendChild(p)}else if(s)try{i.window.navigator.sendBeacon(e,(0,y.encodePostData)(t,q(q({},o),{},{sendBeacon:!0})))}catch(_){this.get_config("debug")&&console.error(_)}else if(M)try{(0,y.xhr)({url:e,data:t,headers:this.get_config("xhr_headers"),options:o,captureMetrics:this._captureMetrics,callback:r,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(_){console.error(_)}else{var a=i.document.createElement("script");a.type="text/javascript",a.async=!0,a.defer=!0,a.src=e;var c=i.document.getElementsByTagName("script")[0];c.parentNode.insertBefore(a,c)}}},U.prototype._execute_array=function(e){var t,o=[],r=[],n=[];i._.each(e,function(e){e&&(t=e[0],i._.isArray(t)?n.push(e):"function"==typeof e?e.call(this):i._.isArray(e)&&"alias"===t?o.push(e):i._.isArray(e)&&-1!==t.indexOf("capture")&&"function"==typeof this[t]?n.push(e):r.push(e))},this);var s=function(e,t){i._.each(e,function(e){if(i._.isArray(e[0])){var o=t;i._.each(e,function(e){o=o[e[0]].apply(o,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};s(o,this),s(r,this),s(n,this)},U.prototype.push=function(e){this._execute_array([e])},U.prototype.capture=(0,d.addOptOutCheckPostHogLib)(function(e,t,o){if(this.__loaded){this._captureMetrics.incr("capture"),"$snapshot"===e&&this._captureMetrics.incr("snapshot");var r=(o=o||H).transport;if(r&&(o.transport=r),i._.isUndefined(e)||"string"!=typeof e)console.error("No event name provided to posthog.capture");else if(!i._.isBlockedUA(i.userAgent)){var n=this.persistence.remove_event_timer(e);this.persistence.update_search_keyword(i.document.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(i.document.referrer);var s={event:e,properties:this._calculate_event_properties(e,t,n)};"$identify"===e&&o.$set&&(s.$set=o.$set),s=i._.copyAndTruncateStrings(s,o._noTruncate?null:this.get_config("properties_string_max_length")),this.get_config("debug")&&i.logger.log("PostHog.js send",s);var p=JSON.stringify(s),a=this.get_config("api_host")+(o.endpoint||"/e/"),c=o!==H;return!this.get_config("request_batching")||c&&!o._batchKey||o.send_instantly?this.__compress_and_send_json_request(a,p,o):(s.timestamp=new Date,this._requestQueue.enqueue(a,s,o)),this._invokeCaptureHooks(e,s),s}}}),U.prototype._addCaptureHook=function(e){this.__captureHooks.push(e)},U.prototype._invokeCaptureHooks=function(e,t){this.config._onCapture(e,t),i._.each(this.__captureHooks,function(t){return t(e)})},U.prototype._calculate_event_properties=function(e,t,o){var r=q({},t);if(r.token=this.get_config("token"),"$snapshot"===e){var n=this.persistence.properties();return r.distinct_id=n.distinct_id,r}if(!i._.isUndefined(o)){var s=(new Date).getTime()-o;r.$duration=parseFloat((s/1e3).toFixed(3))}if(this.sessionManager){var p=this.sessionManager.checkAndGetSessionAndWindowId(),a=p.sessionId,c=p.windowId;r.$session_id=a,r.$window_id=c}r=i._.extend({},i._.info.properties(),this.persistence.properties(),r),"$pageview"===e&&this.get_config("_capture_performance")&&(r=i._.extend(r,(0,m.getPerformanceData)()));var _=this.get_config("property_blacklist");i._.isArray(_)?i._.each(_,function(e){delete r[e]}):console.error("Invalid value for property_blacklist config: "+_);var u=this.get_config("sanitize_properties");return u&&(r=u(r,e)),r},U.prototype.register=function(e,t){this.persistence.register(e,t)},U.prototype.register_once=function(e,t,o){this.persistence.register_once(e,t,o)},U.prototype.unregister=function(e){this.persistence.unregister(e)},U.prototype._register_single=function(e,t){var o={};o[e]=t,this.register(o)},U.prototype.getFeatureFlag=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.featureFlags.getFeatureFlag(e,t)},U.prototype.isFeatureEnabled=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.featureFlags.isFeatureEnabled(e,t)},U.prototype.reloadFeatureFlags=function(){return this.featureFlags.reloadFeatureFlags()},U.prototype.onFeatureFlags=function(e){this.featureFlags.onFeatureFlags(e)},U.prototype.identify=function(e,t,o){if(e){this._captureMetrics.incr("identify");var r=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var i=r;this.register_once({$had_persisted_distinct_id:!0,$device_id:i},"")}e!==r&&e!==this.get_property(a.ALIAS_ID_KEY)&&(this.unregister(a.ALIAS_ID_KEY),this.register({distinct_id:e})),e===r||this.get_property("$device_id")&&r!==this.get_property("$device_id")?(t&&this.people.set(t),o&&this.people.set_once(o)):(this.capture("$identify",{distinct_id:e,$anon_distinct_id:r},{$set:t||{}},{$set_once:o||{}}),this.featureFlags.setAnonymousDistinctId(r)),e!==r&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")},U.prototype.group=function(e,t,o){if(e&&t){this._captureMetrics.incr("group");var r=this.getGroups();this.register({$groups:q(q({},r),{},P({},e,t))}),o&&this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:o}),r[e]!==t&&this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")},U.prototype.reset=function(e){var t=this.get_property("$device_id");this.persistence.clear();var o=this.get_config("get_device_id")(i._.UUID());this.register_once({distinct_id:o,$device_id:e?o:t},"")},U.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},U.prototype.getGroups=function(){return this.get_property("$groups")||{}},U.prototype.alias=function(e,t){if(e===this.get_property(a.PEOPLE_DISTINCT_ID_KEY))return console.critical("Attempting to create alias for existing People user - aborting."),-2;var o=this;return i._.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(a.ALIAS_ID_KEY,e),this.capture("$create_alias",{alias:e,distinct_id:t},function(){o.identify(e)})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)},U.prototype.set_config=function(e){var t=q({},this.config);i._.isObject(e)&&(i._.extend(this.config,e),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),g.localStore.is_supported()&&"true"===g.localStore.get("ph_debug")&&(this.config.debug=!0),r.default.DEBUG=r.default.DEBUG||this.get_config("debug"),this.sessionRecording&&void 0!==e.disable_session_recording&&t.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))},U.prototype.startSessionRecording=function(){this.set_config({disable_session_recording:!1})},U.prototype.stopSessionRecording=function(){this.set_config({disable_session_recording:!0})},U.prototype.sessionRecordingStarted=function(){return this.sessionRecording.started()},U.prototype.get_config=function(e){var t;return null===(t=this.config)||void 0===t?void 0:t[e]},U.prototype.get_property=function(e){return this.persistence.props[e]},U.prototype.toString=function(){var e=this.get_config("name");return e!==j&&(e=j+"."+e),e},U.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_capturing_persistence_type")&&g.localStore.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!g.cookieStore.get("ph_optout")||(g.cookieStore.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},U.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t)},U.prototype._gdpr_call_func=function(e,t){return t=i._.extend({capture:i._.bind(this.capture,this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},t),g.localStore.is_supported()||"localStorage"!==t.persistence_type||(t.persistence_type="cookie"),e(this.get_config("token"),{capture:t.capture,captureEventName:t.capture_event_name,captureProperties:t.capture_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieExpiration:t.cookie_expiration,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie})},U.prototype.opt_in_capturing=function(e){e=i._.extend({enable_persistence:!0},e),this._gdpr_call_func(d.optIn,e),this._gdpr_update_persistence(e)},U.prototype.opt_out_capturing=function(e){e=i._.extend({clear_persistence:!0},e),this._gdpr_call_func(d.optOut,e),this._gdpr_update_persistence(e)},U.prototype.has_opted_in_capturing=function(e){return this._gdpr_call_func(d.hasOptedIn,e)},U.prototype.has_opted_out_capturing=function(e){return this._gdpr_call_func(d.hasOptedOut,e)},U.prototype.clear_opt_in_out_capturing=function(e){e=i._.extend({enable_persistence:!0},e),this._gdpr_call_func(d.clearOptInOut,e),this._gdpr_update_persistence(e)},U.prototype.sentry_integration=function(e,t,o,r){this.name="posthog-js",this.setupOnce=function(i){i(function(i){if("error"!==i.level||!e.__loaded)return i;i.tags||(i.tags={}),i.tags["PostHog Person URL"]=e.config.api_host+"/person/"+e.get_distinct_id(),e.sessionRecordingStarted()&&(i.tags["PostHog Recording URL"]=e.config.api_host+"/recordings/#sessionRecordingId="+e.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var n={$sentry_event_id:i.event_id,$sentry_exception:i.exception};return t&&o&&(n.$sentry_url=(r||"https://sentry.io/organizations/")+t+"/issues/?project="+o+"&query="+i.event_id),e.capture("$exception",n),i})}},U.prototype.debug=function(e){!1===e?(i.window.console.log("You've disabled debug mode."),localStorage&&localStorage.setItem("ph_debug",void 0),this.set_config({debug:!1})):(i.window.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0}))},U.prototype.decodeLZ64=o.LZString.decompressFromBase64,U.prototype.init=U.prototype.init,U.prototype.reset=U.prototype.reset,U.prototype.capture=U.prototype.capture,U.prototype.register=U.prototype.register,U.prototype.register_once=U.prototype.register_once,U.prototype.unregister=U.prototype.unregister,U.prototype.identify=U.prototype.identify,U.prototype.getGroups=U.prototype.getGroups,U.prototype.group=U.prototype.group,U.prototype.alias=U.prototype.alias,U.prototype.set_config=U.prototype.set_config,U.prototype.get_config=U.prototype.get_config,U.prototype.get_property=U.prototype.get_property,U.prototype.get_distinct_id=U.prototype.get_distinct_id,U.prototype.toString=U.prototype.toString,U.prototype.opt_out_captureing=U.prototype.opt_out_captureing,U.prototype.opt_in_captureing=U.prototype.opt_in_captureing,U.prototype.has_opted_out_captureing=U.prototype.has_opted_out_captureing,U.prototype.has_opted_in_captureing=U.prototype.has_opted_in_captureing,U.prototype.clear_opt_in_out_captureing=U.prototype.clear_opt_in_out_captureing,U.prototype.opt_out_capturing=U.prototype.opt_out_capturing,U.prototype.opt_in_capturing=U.prototype.opt_in_capturing,U.prototype.has_opted_out_capturing=U.prototype.has_opted_out_capturing,U.prototype.has_opted_in_capturing=U.prototype.has_opted_in_capturing,U.prototype.clear_opt_in_out_capturing=U.prototype.clear_opt_in_out_capturing,U.prototype.getFeatureFlag=U.prototype.getFeatureFlag,U.prototype.isFeatureEnabled=U.prototype.isFeatureEnabled,U.prototype.reloadFeatureFlags=U.prototype.reloadFeatureFlags,U.prototype.onFeatureFlags=U.prototype.onFeatureFlags,U.prototype.decodeLZ64=U.prototype.decodeLZ64,U.prototype.SentryIntegration=U.prototype.sentry_integration,U.prototype.debug=U.prototype.debug,U.prototype.LIB_VERSION=r.default.LIB_VERSION,U.prototype.startSessionRecording=U.prototype.startSessionRecording,U.prototype.stopSessionRecording=U.prototype.stopSessionRecording,U.prototype.sessionRecordingStarted=U.prototype.sessionRecordingStarted,a.PostHogPersistence.prototype.properties=a.PostHogPersistence.prototype.properties,a.PostHogPersistence.prototype.update_search_keyword=a.PostHogPersistence.prototype.update_search_keyword,a.PostHogPersistence.prototype.update_referrer_info=a.PostHogPersistence.prototype.update_referrer_info,a.PostHogPersistence.prototype.get_cross_subdomain=a.PostHogPersistence.prototype.get_cross_subdomain,a.PostHogPersistence.prototype.clear=a.PostHogPersistence.prototype.clear,i._.safewrap_class(U,["identify"]);var T={},B=function(){i._.each(T,function(e,o){o!==j&&(t[o]=e)}),t._=i._},Q=function(){t.init=function(o,r,n){if(n)return t[n]||(t[n]=T[n]=C(o,r,n),t[n]._loaded()),t[n];var s=t;T[j]?s=T[j]:o&&((s=C(o,r,j))._loaded(),T[j]=s),t=s,e===A&&(i.window[j]=t),B()}},G=function(){function e(){e.done||(e.done=!0,D=!1,i._.each(T,function(e){e._dom_loaded()}))}if(i.document.addEventListener)"complete"===i.document.readyState?e():i.document.addEventListener("DOMContentLoaded",e,!1);else if(i.document.attachEvent){i.document.attachEvent("onreadystatechange",e);var t=!1;try{t=null===i.window.frameElement}catch(o){}i.document.documentElement.doScroll&&t&&function t(){try{i.document.documentElement.doScroll("left")}catch(o){return void setTimeout(t,1)}e()}()}i._.register_event(i.window,"load",e,!0)};function N(){e=A,i._.isUndefined(i.window.posthog)&&(i.window.posthog=[]),(t=i.window.posthog).__loaded||t.config&&t.persistence?console.error("PostHog library has already been downloaded at least once."):(i._.each(t._i,function(e){e&&i._.isArray(e)&&(T[e[e.length-1]]=C.apply(this,e))}),Q(),t.init(),i._.each(T,function(e){e._loaded()}),G())}function Y(){return e=$,t=new U,Q(),t.init(),G(),t}
|
|
55
|
-
},{
|
|
7
|
+
},{"../package.json":"EHrm"}],"UnXq":[function(require,module,exports) {
|
|
8
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports._UUID=exports._HTTPBuildQuery=exports.COPY_IN_PROGRESS_ATTRIBUTE=void 0,exports._base64Encode=N,exports._bind_instance_methods=void 0,exports._copyAndTruncateStrings=q,exports._each=x,exports._eachArray=b,exports._include=exports._getQueryParam=exports._getHashParam=exports._formatDate=exports._extend=exports._encodeDates=void 0,exports._includes=A,exports.window=exports.userAgent=exports.logger=exports.document=exports._utf8Encode=exports._trim=exports._timestamp=exports._strip_empty_properties=exports._safewrap_instance_methods=exports._safewrap_class=exports._safewrap=exports._register_event=exports._isUndefined=exports._isString=exports._isObject=exports._isNumber=exports._isFunction=exports._isEmptyObject=exports._isDate=exports._isBlockedUA=exports._isArray=exports._info=void 0;var r=e(require("./config"));function e(r){return r&&r.__esModule?r:{default:r}}var o=function(r,e){var o="function"==typeof Symbol&&r[Symbol.iterator];if(!o)return r;var t,n,i=o.call(r),a=[];try{for(;(void 0===e||e-- >0)&&!(t=i.next()).done;)a.push(t.value)}catch(s){n={error:s}}finally{try{t&&!t.done&&(o=i.return)&&o.call(i)}finally{if(n)throw n.error}}return a},t=function(r,e,o){if(o||2===arguments.length)for(var t,n=0,i=e.length;n<i;n++)!t&&n in e||(t||(t=Array.prototype.slice.call(e,0,n)),t[n]=e[n]);return r.concat(t||Array.prototype.slice.call(e))},n=Array.prototype,i=Object.prototype,a=i.toString,s=i.hasOwnProperty,c="undefined"!=typeof window?window:{};exports.window=c;var u=c.navigator||{userAgent:""},l=c.document||{};exports.document=l;var d=u.userAgent;exports.userAgent=d;var p=n.forEach,f=n.indexOf,_=Array.isArray,g={},h={log:function(){for(var e=[],o=0;o<arguments.length;o++)e[o]=arguments[o];if(r.default.DEBUG&&!E(window.console)&&window.console){var t="__rrweb_original__"in window.console.log?window.console.log.__rrweb_original__:window.console.log;try{t.apply(window.console,e)}catch(n){b(e,function(r){t(r)})}}},error:function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];if(r.default.DEBUG&&!E(window.console)&&window.console){var i=t(["PostHog error:"],o(e),!1),a="__rrweb_original__"in window.console.error?window.console.error.__rrweb_original__:window.console.error;try{a.apply(window.console,i)}catch(s){b(i,function(r){a(r)})}}},critical:function(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];if(!E(window.console)&&window.console){var n=t(["PostHog error:"],o(r),!1),i="__rrweb_original__"in window.console.error?window.console.error.__rrweb_original__:window.console.error;try{i.apply(window.console,n)}catch(a){b(n,function(r){i(r)})}}}};exports.logger=h;var w=function(r){return r.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};exports._trim=w;var v=function(r){for(var e in r)"function"==typeof r[e]&&(r[e]=r[e].bind(r))};function x(r,e,o){if(null!=r)if(p&&Array.isArray(r)&&r.forEach===p)r.forEach(e,o);else if("length"in r&&r.length===+r.length){for(var t=0,n=r.length;t<n;t++)if(t in r&&e.call(o,r[t],t)===g)return}else for(var i in r)if(s.call(r,i)&&e.call(o,r[i],i)===g)return}function b(r,e,o){if(Array.isArray(r))if(p&&r.forEach===p)r.forEach(e,o);else if("length"in r&&r.length===+r.length)for(var t=0,n=r.length;t<n;t++)if(t in r&&e.call(o,r[t],t)===g)return}exports._bind_instance_methods=v;var m=function(r){for(var e=[],o=1;o<arguments.length;o++)e[o-1]=arguments[o];return b(e,function(e){for(var o in e)void 0!==e[o]&&(r[o]=e[o])}),r};exports._extend=m;var y=_||function(r){return"[object Array]"===a.call(r)};exports._isArray=y;var S=function(r){try{return/^\s*\bfunction\b/.test(r)}catch(e){return!1}};exports._isFunction=S;var B=function(r,e){var o=!1;return null===r?o:f&&r.indexOf===f?-1!=r.indexOf(e):(x(r,function(r){if(o||(o=r===e))return g}),o)};function A(r,e){return-1!==r.indexOf(e)}exports._include=B;var P=function(r){return r===Object(r)&&!y(r)};exports._isObject=P;var C=function(r){if(P(r)){for(var e in r)if(s.call(r,e))return!1;return!0}return!1};exports._isEmptyObject=C;var E=function(r){return void 0===r};exports._isUndefined=E;var O=function(r){return"[object String]"==a.call(r)};exports._isString=O;var k=function(r){return"[object Date]"==a.call(r)};exports._isDate=k;var U=function(r){return"[object Number]"==a.call(r)};exports._isNumber=U;var M=function r(e){return x(e,function(o,t){k(o)?e[t]=I(o):P(o)&&(e[t]=r(o))}),e};exports._encodeDates=M;var D=function(){return Date.now=Date.now||function(){return+new Date},Date.now()};exports._timestamp=D;var I=function(r){function e(r){return r<10?"0"+r:r}return r.getUTCFullYear()+"-"+e(r.getUTCMonth()+1)+"-"+e(r.getUTCDate())+"T"+e(r.getUTCHours())+":"+e(r.getUTCMinutes())+":"+e(r.getUTCSeconds())};exports._formatDate=I;var T=function(e){return function(){for(var o=[],t=0;t<arguments.length;t++)o[t]=arguments[t];try{return e.apply(this,o)}catch(n){h.critical("Implementation error. Please turn on debug and contact support@posthog.com."),r.default.DEBUG&&h.critical(n)}}};exports._safewrap=T;var $=function(r,e){for(var o=0;o<e.length;o++)r.prototype[e[o]]=T(r.prototype[e[o]])};exports._safewrap_class=$;var F=function(r){for(var e in r)"function"==typeof r[e]&&(r[e]=T(r[e]))};exports._safewrap_instance_methods=F;var R=function(r){var e={};return x(r,function(r,o){O(r)&&r.length>0&&(e[o]=r)}),e};exports._strip_empty_properties=R;var j="undefined"!=typeof Symbol?Symbol("__deepCircularCopyInProgress__"):"__deepCircularCopyInProgress__";function W(r,e,o){return r!==Object(r)?e?e(r,o):r:r[j]?void 0:(r[j]=!0,y(r)?(t=[],b(r,function(r){t.push(W(r,e))})):(t={},x(r,function(r,o){o!==j&&(t[o]=W(r,e,o))})),delete r[j],t);var t}exports.COPY_IN_PROGRESS_ATTRIBUTE=j;var H=["$performance_raw"];function q(r,e){return W(r,function(r,o){return o&&H.indexOf(o)>-1?r:"string"==typeof r&&null!==e?r.slice(0,e):r})}function N(r){var e,o,t,n,i,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",s=0,c=0,u="",l=[];if(!r)return r;r=V(r);do{e=(i=r.charCodeAt(s++)<<16|r.charCodeAt(s++)<<8|r.charCodeAt(s++))>>18&63,o=i>>12&63,t=i>>6&63,n=63&i,l[c++]=a.charAt(e)+a.charAt(o)+a.charAt(t)+a.charAt(n)}while(s<r.length);switch(u=l.join(""),r.length%3){case 1:u=u.slice(0,-2)+"==";break;case 2:u=u.slice(0,-1)+"="}return u}var V=function(r){var e,o,t,n,i="";for(e=o=0,t=(r=(r+"").replace(/\r\n/g,"\n").replace(/\r/g,"\n")).length,n=0;n<t;n++){var a=r.charCodeAt(n),s=null;a<128?o++:s=a>127&&a<2048?String.fromCharCode(a>>6|192,63&a|128):String.fromCharCode(a>>12|224,a>>6&63|128,63&a|128),null!==s&&(o>e&&(i+=r.substring(e,o)),i+=s,e=o=n+1)}return o>e&&(i+=r.substring(e,r.length)),i};exports._utf8Encode=V;var G=function(){var r=function(){for(var r=(new Date).valueOf(),e=0;r==(new Date).valueOf();)e++;return r.toString(16)+e.toString(16)};return function(){var e=(window.screen.height*window.screen.width).toString(16);return r()+"-"+Math.random().toString(16).replace(".","")+"-"+function(){var r,e,o=d,t=0,n=[];function i(r,e){var o,t=0;for(o=0;o<e.length;o++)t|=n[o]<<8*o;return r^t}for(r=0;r<o.length;r++)e=o.charCodeAt(r),n.unshift(255&e),n.length>=4&&(t=i(t,n),n=[]);return n.length>0&&(t=i(t,n)),t.toString(16)}()+"-"+e+"-"+r()}}();exports._UUID=G;var L=function(r){return!!/(google web preview|baiduspider|yandexbot|bingbot|googlebot|yahoo! slurp|ahrefsbot|facebookexternalhit|facebookcatalog)/i.test(r)};exports._isBlockedUA=L;var K=function(r,e){var o,t;void 0===e&&(e="&");var n=[];return x(r,function(r,e){o=encodeURIComponent(r.toString()),t=encodeURIComponent(e),n[n.length]=t+"="+o}),n.join(e)};exports._HTTPBuildQuery=K;var Q=function(r,e){var o=e.replace(/[[]/,"\\[").replace(/[\]]/,"\\]"),t=new RegExp("[\\?&]"+o+"=([^&#]*)").exec(r);if(null===t||t&&"string"!=typeof t[1]&&t[1].length)return"";var n=t[1];try{n=decodeURIComponent(n)}catch(i){h.error("Skipping decoding for malformed query param: "+n)}return n.replace(/\+/g," ")};exports._getQueryParam=Q;var Y=function(r,e){var o=r.match(new RegExp(e+"=([^&]*)"));return o?o[1]:null};exports._getHashParam=Y;var z=function(){function r(e){return e&&(e.preventDefault=r.preventDefault,e.stopPropagation=r.stopPropagation),e}return r.preventDefault=function(){this.returnValue=!1},r.stopPropagation=function(){this.cancelBubble=!0},function(e,o,t,n,i){if(e)if(e.addEventListener&&!n)e.addEventListener(o,t,!!i);else{var a="on"+o,s=e[a];e[a]=function(e,o,t){return function(n){if(n=n||r(window.event)){var i,a=!0;S(t)&&(i=t(n));var s=o.call(e,n);return!1!==i&&!1!==s||(a=!1),a}}}(e,t,s)}else h.error("No valid element provided to register_event")}}();exports._register_event=z;var X={campaignParams:function(){var r="utm_source utm_medium utm_campaign utm_content utm_term gclid fbclid msclkid".split(" "),e={};return x(r,function(r){var o=Q(l.URL,r);o.length&&(e[r]=o)}),e},searchEngine:function(r){return 0===r.search("https?://(.*)google.([^/?]*)")?"google":0===r.search("https?://(.*)bing.com")?"bing":0===r.search("https?://(.*)yahoo.com")?"yahoo":0===r.search("https?://(.*)duckduckgo.com")?"duckduckgo":null},searchInfo:function(r){var e=X.searchEngine(r),o="yahoo"!=e?"q":"p",t={};if(null!==e){t.$search_engine=e;var n=Q(r,o);n.length&&(t.ph_keyword=n)}return t},browser:function(r,e,o){return e=e||"",o||A(r," OPR/")?A(r,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(r)?"BlackBerry":A(r,"IEMobile")||A(r,"WPDesktop")?"Internet Explorer Mobile":A(r,"SamsungBrowser/")?"Samsung Internet":A(r,"Edge")||A(r,"Edg/")?"Microsoft Edge":A(r,"FBIOS")?"Facebook Mobile":A(r,"Chrome")?"Chrome":A(r,"CriOS")?"Chrome iOS":A(r,"UCWEB")||A(r,"UCBrowser")?"UC Browser":A(r,"FxiOS")?"Firefox iOS":A(e,"Apple")?A(r,"Mobile")?"Mobile Safari":"Safari":A(r,"Android")?"Android Mobile":A(r,"Konqueror")?"Konqueror":A(r,"Firefox")?"Firefox":A(r,"MSIE")||A(r,"Trident/")?"Internet Explorer":A(r,"Gecko")?"Mozilla":""},browserVersion:function(r,e,o){var t={"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+)?)/}[X.browser(r,e,o)];if(void 0===t)return null;var n=r.match(t);return n?parseFloat(n[n.length-2]):null},os:function(){var r=d;return/Windows/i.test(r)?/Phone/.test(r)||/WPDesktop/.test(r)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(r)?"iOS":/Android/.test(r)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(r)?"BlackBerry":/Mac/i.test(r)?"Mac OS X":/Linux/.test(r)?"Linux":/CrOS/.test(r)?"Chrome OS":""},device:function(r){return/Windows Phone/i.test(r)||/WPDesktop/.test(r)?"Windows Phone":/iPad/.test(r)?"iPad":/iPod/.test(r)?"iPod Touch":/iPhone/.test(r)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(r)?"BlackBerry":/Android/.test(r)&&!/Mobile/.test(r)?"Android Tablet":/Android/.test(r)?"Android":""},deviceType:function(r){var e=this.device(r);return"iPad"===e||"Android Tablet"===e?"Tablet":e?"Mobile":"Desktop"},referringDomain:function(r){var e=r.split("/");return e.length>=3?e[2]:""},properties:function(){return m(R({$os:X.os(),$browser:X.browser(d,u.vendor,window.opera),$device:X.device(d),$device_type:X.deviceType(d)}),{$current_url:window.location.href,$host:window.location.host,$pathname:window.location.pathname,$browser_version:X.browserVersion(d,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:r.default.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:D()/1e3})},people_properties:function(){return m(R({$os:X.os(),$browser:X.browser(d,u.vendor,window.opera)}),{$browser_version:X.browserVersion(d,u.vendor,window.opera)})}};exports._info=X;
|
|
9
|
+
},{"./config":"C9JJ"}],"h4lk":[function(require,module,exports) {
|
|
10
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.getClassName=r,exports.getSafeText=n,exports.isAngularStyleAttr=f,exports.isDocumentFragment=u,exports.isElementNode=o,exports.isSensitiveElement=l,exports.isTag=s,exports.isTextNode=i,exports.loadScript=m,exports.shouldCaptureDomEvent=a,exports.shouldCaptureElement=p,exports.shouldCaptureValue=d,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("baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";default:return""}}function n(t){var r="";return p(t)&&!l(t)&&t.childNodes&&t.childNodes.length&&(0,e._each)(t.childNodes,function(t){i(t)&&t.textContent&&(r+=(0,e._trim)(t.textContent).split(/(\s+)/).filter(d).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255))}),(0,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}function u(e){return!!e&&11===e.nodeType}var c=["a","button","form","input","select","textarea","label"];function a(e,t){if(!e||s(e,"html")||!o(e))return!1;for(var r=!1,n=[e],i=!0,a=e;a.parentNode&&!s(a,"body");)if(u(a.parentNode))n.push(a.parentNode.host),a=a.parentNode.host;else{if(!(i=a.parentNode||!1))break;if(c.indexOf(i.tagName.toLowerCase())>-1)r=!0;else{var p=window.getComputedStyle(i);p&&"pointer"===p.getPropertyValue("cursor")&&(r=!0)}n.push(i),a=i}var l=window.getComputedStyle(e);if(l&&"pointer"===l.getPropertyValue("cursor")&&"click"===t.type)return!0;var d=e.tagName.toLowerCase();switch(d){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(d)>-1||"true"===e.getAttribute("contenteditable"))}}function p(t){for(var n=t;n.parentNode&&!s(n,"body");n=n.parentNode){var o=r(n).split(" ");if((0,e._includes)(o,"ph-sensitive")||(0,e._includes)(o,"ph-no-capture"))return!1}if((0,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 u=t.name||t.id||"";if("string"==typeof u){if(/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(u.replace(/[^a-zA-Z0-9]/g,"")))return!1}return!0}function l(e){return!!(s(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||s(e,"select")||s(e,"textarea")||"true"===e.getAttribute("contenteditable"))}function d(t){if(null===t||(0,e._isUndefined)(t))return!1;if("string"==typeof t){t=(0,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 f(e){return"string"==typeof e&&("_ngcontent"===e.substring(0,10)||"_nghost"===e.substring(0,7))}function m(e,t){var r,n=document.createElement("script");n.type="text/javascript",n.src=e,n.onload=t;var o=document.getElementsByTagName("script");o.length>0?null===(r=o[0].parentNode)||void 0===r||r.insertBefore(n,o[0]):document.body.appendChild(n)}exports.usefulElements=c;
|
|
11
|
+
},{"./utils":"UnXq"}],"SHfu":[function(require,module,exports) {
|
|
12
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var t=30,i=1e3,e=3,s=function(){function s(t,i){void 0===i&&(i=t.get_config("rageclick")),this.clicks=[],this.instance=t,this.enabled=i}return s.prototype.click=function(s,c,a){if(this.enabled){var l=this.clicks[this.clicks.length-1];l&&Math.abs(s-l.x)+Math.abs(c-l.y)<t&&a-l.timestamp<i?(this.clicks.push({x:s,y:c,timestamp:a}),this.clicks.length===e&&this.instance.capture("$rageclick")):this.clicks=[{x:s,y:c,timestamp:a}]}},s}(),c=s;exports.default=c;
|
|
13
|
+
},{}],"+QN3":[function(require,module,exports) {
|
|
14
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.autocapture=void 0;var e=require("./utils"),t=require("./autocapture-utils"),n=r(require("./extensions/rageclick"));function r(e){return e&&e.__esModule?e:{default:e}}var i={_initializedTokens:[],_previousElementSibling:function(e){if(e.previousElementSibling)return e.previousElementSibling;var n=e;do{n=n.previousSibling}while(n&&!(0,t.isElementNode)(n));return n},_getPropertiesFromElement:function(n,r,i){var o=n.tagName.toLowerCase(),a={tag_name:o};t.usefulElements.indexOf(o)>-1&&!i&&(a.$el_text=(0,t.getSafeText)(n));var u=(0,t.getClassName)(n);u.length>0&&(a.classes=u.split(" ").filter(function(e){return""!==e})),(0,e._each)(n.attributes,function(e){(0,t.isSensitiveElement)(n)&&-1===["name","id","class"].indexOf(e.name)||r||!(0,t.shouldCaptureValue)(e.value)||(0,t.isAngularStyleAttr)(e.name)||(a["attr__"+e.name]=e.value)});for(var s=1,l=1,c=n;c=this._previousElementSibling(c);)s++,c.tagName===n.tagName&&l++;return a.nth_child=s,a.nth_of_type=l,a},_getDefaultProperties:function(e){return{$event_type:e,$ce_version:1}},_extractCustomPropertyValue:function(n){var r=[];return(0,e._each)(document.querySelectorAll(n.css_selector),function(e){var n;["input","select"].indexOf(e.tagName.toLowerCase())>-1?n=e.value:e.textContent&&(n=e.textContent),(0,t.shouldCaptureValue)(n)&&r.push(n)}),r.join(", ")},_getCustomProperties:function(n){var r=this,i={};return(0,e._each)(this._customProperties,function(o){(0,e._each)(o.event_selectors,function(a){var u=document.querySelectorAll(a);(0,e._each)(u,function(a){(0,e._includes)(n,a)&&(0,t.shouldCaptureElement)(a)&&(i[o.name]=r._extractCustomPropertyValue(o))})})}),i},_getEventTarget:function(e){var t;return void 0===e.target?e.srcElement||null:(null===(t=e.target)||void 0===t?void 0:t.shadowRoot)?e.composedPath()[0]||null:e.target||null},_captureEvent:function(n,r){var i,o=this,a=this._getEventTarget(n);if((0,t.isTextNode)(a)&&(a=a.parentNode||null),"click"===n.type&&n instanceof MouseEvent&&(null===(i=this.rageclicks)||void 0===i||i.click(n.clientX,n.clientY,(new Date).getTime())),a&&(0,t.shouldCaptureDomEvent)(a,n)){for(var u=[a],s=a;s.parentNode&&!(0,t.isTag)(s,"body");)(0,t.isDocumentFragment)(s.parentNode)?(u.push(s.parentNode.host),s=s.parentNode.host):(u.push(s.parentNode),s=s.parentNode);var l,c=[],_=!1;if((0,e._each)(u,function(n){var i=(0,t.shouldCaptureElement)(n);"a"===n.tagName.toLowerCase()&&(l=n.getAttribute("href"),l=i&&(0,t.shouldCaptureValue)(l)&&l);var a=(0,t.getClassName)(n).split(" ");(0,e._includes)(a,"ph-no-capture")&&(_=!0),c.push(o._getPropertiesFromElement(n,r.get_config("mask_all_element_attributes"),r.get_config("mask_all_text")))}),r.get_config("mask_all_text")||(c[0].$el_text=(0,t.getSafeText)(a)),l&&(c[0].attr__href=l),_)return!1;var d=(0,e._extend)(this._getDefaultProperties(n.type),{$elements:c},this._getCustomProperties(u));return r.capture("$autocapture",d),!0}},_navigate:function(e){window.location.href=e},_addDomEventHandlers:function(t){var n=this,r=function(e){e=e||window.event,n._captureEvent(e,t)};(0,e._register_event)(document,"submit",r,!1,!0),(0,e._register_event)(document,"change",r,!1,!0),(0,e._register_event)(document,"click",r,!1,!0)},_customProperties:[],rageclicks:null,init:function(e){this.rageclicks=new n.default(e)},afterDecideResponse:function(t,n){var r=n.get_config("token");this._initializedTokens.indexOf(r)>-1?e.logger.log('autocapture already initialized for token "'+r+'"'):(this._initializedTokens.push(r),t&&t.config&&t.config.enable_collect_everything&&n.get_config("autocapture")?(t.custom_properties&&(this._customProperties=t.custom_properties),this._addDomEventHandlers(n)):n.__autocapture_enabled=!1)},enabledForProject:function(t,n,r){if(!t)return!0;n=(0,e._isUndefined)(n)?10:n,r=(0,e._isUndefined)(r)?10:r;for(var i=0,o=0;o<t.length;o++)i+=t.charCodeAt(o);return i%n<r},isBrowserSupported:function(){return(0,e._isFunction)(document.querySelectorAll)}};exports.autocapture=i,(0,e._bind_instance_methods)(i),(0,e._safewrap_instance_methods)(i);
|
|
15
|
+
},{"./utils":"UnXq","./autocapture-utils":"h4lk","./extensions/rageclick":"SHfu"}],"1GYW":[function(require,module,exports) {
|
|
16
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.sessionStore=exports.resetSessionStorageSupported=exports.memoryStore=exports.localStore=exports.localPlusCookieStore=exports.cookieStore=void 0;var r=require("./utils"),e=t(require("./config"));function t(r){return r&&r.__esModule?r:{default:r}}var o=function(){return(o=Object.assign||function(r){for(var e,t=1,o=arguments.length;t<o;t++)for(var n in e=arguments[t])Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}).apply(this,arguments)},n=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,i={is_supported:function(){return!0},error:function(e){r.logger.error("cookieStore error: "+e)},get:function(r){try{for(var e=r+"=",t=document.cookie.split(";"),o=0;o<t.length;o++){for(var n=t[o];" "==n.charAt(0);)n=n.substring(1,n.length);if(0===n.indexOf(e))return decodeURIComponent(n.substring(e.length,n.length))}}catch(i){}return null},parse:function(r){var e;try{e=JSON.parse(i.get(r))||{}}catch(t){}return e},set:function(r,e,t,o,i){try{var c="",s="",u="";if(o){var a=document.location.hostname.match(n),l=a?a[0]:"";c=l?"; domain=."+l:""}if(t){var p=new Date;p.setTime(p.getTime()+24*t*60*60*1e3),s="; expires="+p.toUTCString()}i&&(u="; secure");var f=r+"="+encodeURIComponent(JSON.stringify(e))+s+"; path=/"+c+u;return document.cookie=f,f}catch(g){return}},remove:function(r,e){try{i.set(r,"",-1,e)}catch(t){return}}};exports.cookieStore=i;var c=null,s={is_supported:function(){if(null!==c)return c;var e=!0;if(window)try{var t="__mplssupport__";s.set(t,"xyz"),'"xyz"'!==s.get(t)&&(e=!1),s.remove(t)}catch(o){e=!1}else e=!1;return e||r.logger.error("localStorage unsupported; falling back to cookie store"),c=e,e},error:function(e){r.logger.error("localStorage error: "+e)},get:function(r){try{return window.localStorage.getItem(r)}catch(e){s.error(e)}return null},parse:function(r){try{return JSON.parse(s.get(r))||{}}catch(e){}return null},set:function(r,e){try{window.localStorage.setItem(r,JSON.stringify(e))}catch(t){s.error(t)}},remove:function(r){try{window.localStorage.removeItem(r)}catch(e){s.error(e)}}};exports.localStore=s;var u=o(o({},s),{parse:function(e){try{var t={};try{(t=i.parse(e)||{}).distinct_id&&i.set(e,{distinct_id:t.distinct_id})}catch(n){}var o=(0,r._extend)(t,JSON.parse(s.get(e)||"{}"));return s.set(e,o),o}catch(n){}return null},set:function(r,e){try{s.set(r,e),e.distinct_id&&i.set(r,{distinct_id:e.distinct_id})}catch(t){s.error(t)}},remove:function(r){try{window.localStorage.removeItem(r),i.remove(r)}catch(e){s.error(e)}}});exports.localPlusCookieStore=u;var a={},l={is_supported:function(){return!0},error:function(e){r.logger.error("memoryStorage error: "+e)},get:function(r){return a[r]||null},parse:function(r){return a[r]||null},set:function(r,e){a[r]=e},remove:function(r){delete a[r]}};exports.memoryStore=l;var p=null,f=function(){p=null};exports.resetSessionStorageSupported=f;var g={is_supported:function(){if(null!==p)return p;if(p=!0,window)try{var r="__support__";g.set(r,"xyz"),'"xyz"'!==g.get(r)&&(p=!1),g.remove(r)}catch(e){p=!1}else p=!1;return p},error:function(t){e.default.DEBUG&&r.logger.error("sessionStorage error: ",t)},get:function(r){try{return window.sessionStorage.getItem(r)}catch(e){g.error(e)}return null},parse:function(r){try{return JSON.parse(g.get(r))||null}catch(e){}return null},set:function(r,e){try{window.sessionStorage.setItem(r,JSON.stringify(e))}catch(t){g.error(t)}},remove:function(r){try{window.sessionStorage.removeItem(r)}catch(e){g.error(e)}}};exports.sessionStore=g;
|
|
17
|
+
},{"./utils":"UnXq","./config":"C9JJ"}],"LECo":[function(require,module,exports) {
|
|
18
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.addOptOutCheck=g,exports.clearOptInOut=u,exports.hasOptedIn=i,exports.hasOptedOut=c,exports.optIn=r,exports.optOut=n,exports.userOptedOut=l;var e=require("./utils"),t=require("./storage"),o="__ph_opt_in_out_";function r(e,t){_(!0,e,t)}function n(e,t){_(!1,e,t)}function i(e,t){return"1"===a(e,t)}function c(e,t){return!!f(t)||"0"===a(e,t)}function u(e,t){p(t=t||{}).remove(s(e,t),!!t.crossSubdomainCookie)}function p(e){return"localStorage"===(e=e||{}).persistenceType?t.localStore:"localStorage+cookie"===e.persistenceType?t.localPlusCookieStore:t.cookieStore}function s(e,t){return((t=t||{}).persistencePrefix||o)+e}function a(e,t){return p(t).get(s(e,t))}function f(t){if(t&&t.respectDnt){var o=t&&t.window||e.window,r=o.navigator||{},n=!1;return(0,e._each)([r.doNotTrack,r.msDoNotTrack,o.doNotTrack],function(t){(0,e._includes)([!0,1,"1","yes"],t)&&(n=!0)}),n}return!1}function _(t,o,r){(0,e._isString)(o)&&o.length?(p(r=r||{}).set(s(o,r),t?1:0,(0,e._isNumber)(r.cookieExpiration)?r.cookieExpiration:null,r.crossSubdomainCookie,r.secureCookie),r.capture&&t&&r.capture(r.captureEventName||"$opt_in",r.captureProperties||{},{send_instantly:!0})):console.error("gdpr."+(t?"optIn":"optOut")+" called with an invalid token")}function l(e,t){var o=!1;try{var r=e.get_config("token"),n=e.get_config("respect_dnt"),i=e.get_config("opt_out_capturing_persistence_type"),u=e.get_config("opt_out_capturing_cookie_prefix")||void 0,p=e.get_config("window");r&&(o=c(r,{respectDnt:n,persistenceType:i,persistencePrefix:u,window:p}))}catch(s){t||console.error("Unexpected error when checking capturing opt-out status: "+s)}return o}function g(e,t,o){return function(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];if(!l(e,o))return t.apply(this,r);var i=r[r.length-1];"function"==typeof i&&i(0)}}
|
|
19
|
+
},{"./utils":"UnXq","./storage":"1GYW"}],"GxDb":[function(require,module,exports) {
|
|
20
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PostHogPeople=void 0;var t=require("./gdpr-utils"),e=require("./utils"),r="$set",i="$set_once",o=function(){function o(i){var o=this;this._posthog=i,this.set=(0,t.addOptOutCheck)(i,function(t,i,s){var _=o.set_action(t,i);return(0,e._isObject)(t)&&(s=i),o._get_config("save_referrer")&&o._posthog.persistence.update_referrer_info(document.referrer),_[r]=(0,e._extend)({},e._info.people_properties(),o._posthog.persistence.get_referrer_info(),_[r]),o._send_request(_,s)}),this.set_once=(0,t.addOptOutCheck)(i,function(t,r,i){var s=o.set_once_action(t,r);return(0,e._isObject)(t)&&(i=r),o._send_request(s,i)})}return o.prototype.toString=function(){return this._posthog.toString()+".people"},o.prototype._send_request=function(t,r){t.$token=this._get_config("token"),t.$distinct_id=this._posthog.get_distinct_id();var i=this._posthog.get_property("$device_id"),o=this._posthog.get_property("$user_id"),s=this._posthog.get_property("$had_persisted_distinct_id");i&&(t.$device_id=i),o&&(t.$user_id=o),s&&(t.$had_persisted_distinct_id=s);var _=(0,e._encodeDates)(t),n=(0,e._copyAndTruncateStrings)(_,this._get_config("properties_string_max_length")),p=JSON.stringify(_),c=(0,e._base64Encode)(p);return this._posthog._send_request(this._get_config("api_host")+"/engage/",{data:c},{},this._posthog._prepare_callback(r,n)),n},o.prototype._get_config=function(t){return this._posthog.get_config(t)},o.prototype._is_reserved_property=function(t){return"$distinct_id"===t||"$token"===t||"$device_id"===t||"$user_id"===t||"$had_persisted_distinct_id"===t},o.prototype.set_action=function(t,e){return this.apiActionParser(r,t,e)},o.prototype.set_once_action=function(t,e){return this.apiActionParser(i,t,e)},o.prototype.apiActionParser=function(t,r,i){var o=this,s={},_={};return(0,e._isObject)(r)?(0,e._each)(r,function(t,e){o._is_reserved_property(e)||(_[e]=t)}):_[r]=i,s[t]=_,s},o}();exports.PostHogPeople=o;
|
|
21
|
+
},{"./gdpr-utils":"LECo","./utils":"UnXq"}],"rr+t":[function(require,module,exports) {
|
|
22
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.parseFeatureFlagDecideResponse=exports.PostHogFeatureFlags=void 0;var e=require("./utils"),t=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=t;var a=function(){function a(e){this.instance=e,this._override_warning=!1,this.flagCallReported={},this.featureFlagEventHandlers=[],this.reloadFeatureFlagsQueued=!1,this.reloadFeatureFlagsInAction=!1}return a.prototype.getFlags=function(){return Object.keys(this.getFlagVariants())},a.prototype.getFlagVariants=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=(0,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},a.prototype.reloadFeatureFlags=function(){this.reloadFeatureFlagsQueued||(this.reloadFeatureFlagsQueued=!0,this._startReloadTimer())},a.prototype.setAnonymousDistinctId=function(e){this.$anon_distinct_id=e},a.prototype.setReloadingPaused=function(e){this.reloadFeatureFlagsInAction=e},a.prototype.resetRequestQueue=function(){this.reloadFeatureFlagsQueued=!1},a.prototype._startReloadTimer=function(){var e=this;this.reloadFeatureFlagsQueued&&!this.reloadFeatureFlagsInAction&&setTimeout(function(){!e.reloadFeatureFlagsInAction&&e.reloadFeatureFlagsQueued&&(e.reloadFeatureFlagsQueued=!1,e._reloadFeatureFlagsRequest())},5)},a.prototype._reloadFeatureFlagsRequest=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=(0,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()}))},a.prototype.getFeatureFlag=function(e,t){if(void 0===t&&(t={}),!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},a.prototype.isFeatureEnabled=function(e,t){return void 0===t&&(t={}),this.getFlags()?!!this.getFeatureFlag(e,t):(console.warn('isFeatureEnabled for key "'+e+"\" failed. Feature flags didn't load in time."),!1)},a.prototype.addFeatureFlagsHandler=function(e){this.featureFlagEventHandlers.push(e)},a.prototype.receivedFeatureFlags=function(e){t(e,this.instance.persistence);var a=this.getFlags(),r=this.getFlagVariants();this.featureFlagEventHandlers.forEach(function(e){return e(a,r)})},a.prototype.override=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})},a.prototype.onFeatureFlags=function(e){(this.addFeatureFlagsHandler(e),this.instance.decideEndpointWasHit)&&e(this.getFlags(),this.getFlagVariants())},a}();exports.PostHogFeatureFlags=a;
|
|
23
|
+
},{"./utils":"UnXq"}],"8kGX":[function(require,module,exports) {
|
|
24
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.UNSET_QUEUE_KEY=exports.UNION_QUEUE_KEY=exports.SET_QUEUE_KEY=exports.SET_ONCE_QUEUE_KEY=exports.SESSION_RECORDING_ENABLED_SERVER_SIDE=exports.SESSION_ID=exports.RESERVED_PROPERTIES=exports.REMOVE_QUEUE_KEY=exports.PostHogPersistence=exports.PEOPLE_DISTINCT_ID_KEY=exports.EVENT_TIMERS_KEY=exports.ENABLED_FEATURE_FLAGS=exports.CAMPAIGN_IDS_KEY=exports.APPEND_QUEUE_KEY=exports.ALIAS_ID_KEY=exports.ADD_QUEUE_KEY=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";exports.UNSET_QUEUE_KEY=i;var p="__mpa";exports.ADD_QUEUE_KEY=p;var _="__mpap";exports.APPEND_QUEUE_KEY=_;var n="__mpr";exports.REMOVE_QUEUE_KEY=n;var a="__mpu";exports.UNION_QUEUE_KEY=a;var E="$people_distinct_id";exports.PEOPLE_DISTINCT_ID_KEY=E;var c="__alias";exports.ALIAS_ID_KEY=c;var h="__cmpns";exports.CAMPAIGN_IDS_KEY=h;var u="__timers";exports.EVENT_TIMERS_KEY=u;var d="$session_recording_enabled_server_side";exports.SESSION_RECORDING_ENABLED_SERVER_SIDE=d;var f="$sesid";exports.SESSION_ID=f;var m="$enabled_feature_flags";exports.ENABLED_FEATURE_FLAGS=m;var l=[s,o,i,p,_,n,a,E,c,h,u,d,f,m];exports.RESERVED_PROPERTIES=l;var v=function(){function s(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()}return s.prototype.properties=function(){var t={};return(0,e._each)(this.props,function(s,o){if(o===m&&"object"===r(s))for(var i=Object.keys(s),p=0;p<i.length;p++)t["$feature/".concat(i[p])]=s[i[p]];else(0,e._include)(l,o)||(t[o]=s)}),t},s.prototype.load=function(){if(!this.disabled){var t=this.storage.parse(this.name);t&&(this.props=(0,e._extend)({},t))}},s.prototype.save=function(){this.disabled||this.storage.set(this.name,this.props,this.expire_days,this.cross_subdomain,this.secure)},s.prototype.remove=function(){this.storage.remove(this.name,!1),this.storage.remove(this.name,!0)},s.prototype.clear=function(){this.remove(),this.props={}},s.prototype.register_once=function(t,r,s){var o=this;return!!(0,e._isObject)(t)&&(void 0===r&&(r="None"),this.expire_days=void 0===s?this.default_expiry:s,(0,e._each)(t,function(e,t){o.props.hasOwnProperty(t)&&o.props[t]!==r||(o.props[t]=e)}),this.save(),!0)},s.prototype.register=function(t,r){return!!(0,e._isObject)(t)&&(this.expire_days=void 0===r?this.default_expiry:r,(0,e._extend)(this.props,t),this.save(),!0)},s.prototype.unregister=function(e){e in this.props&&(delete this.props[e],this.save())},s.prototype.update_campaign_params=function(){this.campaign_params_saved||(this.register(e._info.campaignParams()),this.campaign_params_saved=!0)},s.prototype.update_search_keyword=function(t){this.register(e._info.searchInfo(t))},s.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"})},s.prototype.get_referrer_info=function(){return(0,e._strip_empty_properties)({$referrer:this.props.$referrer,$referring_domain:this.props.$referring_domain})},s.prototype.safe_merge=function(t){return(0,e._each)(this.props,function(e,r){r in t||(t[r]=e)}),t},s.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)},s.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()},s.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())},s.prototype.get_cross_subdomain=function(){return!!this.cross_subdomain},s.prototype.set_secure=function(e){e!==this.secure&&(this.secure=e,this.remove(),this.save())},s.prototype.set_event_timer=function(e,t){var r=this.props[u]||{};r[e]=t,this.props[u]=r,this.save()},s.prototype.remove_event_timer=function(t){var r=(this.props[u]||{})[t];return(0,e._isUndefined)(r)||(delete this.props[u][t],this.save()),r},s}();exports.PostHogPersistence=v;
|
|
25
|
+
},{"./utils":"UnXq","./storage":"1GYW"}],"+gtL":[function(require,module,exports) {
|
|
26
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CONSOLE_LOG_PLUGIN_NAME=void 0,exports.filterDataURLsFromLargeDataObjects=r,exports.replacementImageURI=void 0,exports.truncateLargeConsoleLogs=n;var a=require("./sessionrecording");function e(a){return(e="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 t=function(a){var e="function"==typeof Symbol&&Symbol.iterator,t=e&&a[e],o=0;if(t)return t.call(a);if(a&&"number"==typeof a.length)return{next:function(){return a&&o>=a.length&&(a=void 0),{value:a&&a[o++],done:!a}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},o="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTYiIGhlaWdodD0iMTYiIHZpZXdCb3g9IjAgMCAxNiAxNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHJlY3Qgd2lkdGg9IjE2IiBoZWlnaHQ9IjE2IiBmaWxsPSJibGFjayIvPgo8cGF0aCBkPSJNOCAwSDE2TDAgMTZWOEw4IDBaIiBmaWxsPSIjMkQyRDJEIi8+CjxwYXRoIGQ9Ik0xNiA4VjE2SDhMMTYgOFoiIGZpbGw9IiMyRDJEMkQiLz4KPC9zdmc+Cg==";function r(a){var r,l;if(a&&"object"===e(a)){var n=JSON.stringify(a);if(n.length>5e6){var i=n.matchAll(/data:([\w\/\-\.]+);(\w+),([^)"]*)/gim);try{for(var d=t(i),y=d.next();!y.done;y=d.next()){var p=y.value;n="image/"===p[1].toLocaleLowerCase().slice(0,6)?n.replace(p[0],o):n.replace(p[0],"")}}catch(c){r={error:c}}finally{try{y&&!y.done&&(l=d.return)&&l.call(d)}finally{if(r)throw r.error}}}return JSON.parse(n)}return a}exports.replacementImageURI=o;var l="rrweb/console@1";function n(t){if(t&&"object"===e(t)&&t.type===a.PLUGIN_EVENT_TYPE&&"object"===e(t.data)&&t.data.plugin===l){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 o=[],r=0;r<t.data.payload.payload.length;r++)t.data.payload.payload[r]&&t.data.payload.payload[r].length>2e3?o.push(t.data.payload.payload[r].slice(0,2e3)+"...[truncated]"):o.push(t.data.payload.payload[r]);return t.data.payload.payload=o,t}return t}exports.CONSOLE_LOG_PLUGIN_NAME=l;
|
|
27
|
+
},{"./sessionrecording":"3pq5"}],"3pq5":[function(require,module,exports) {
|
|
28
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SessionRecording=exports.PLUGIN_EVENT_TYPE=exports.MUTATION_SOURCE_TYPE=exports.META_EVENT_TYPE=exports.INCREMENTAL_SNAPSHOT_EVENT_TYPE=exports.FULL_SNAPSHOT_EVENT_TYPE=void 0;var t=require("../autocapture-utils"),e=require("../posthog-persistence"),n=i(require("../config")),r=require("./sessionrecording-utils");function i(t){return t&&t.__esModule?t:{default:t}}var o=function(){return(o=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t}).apply(this,arguments)},s=function(t){var e="function"==typeof Symbol&&Symbol.iterator,n=e&&t[e],r=0;if(n)return n.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&r>=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},a=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),s=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(a){i={error:a}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return s},d="/e/",c=2;exports.FULL_SNAPSHOT_EVENT_TYPE=c;var p=4;exports.META_EVENT_TYPE=p;var u=3;exports.INCREMENTAL_SNAPSHOT_EVENT_TYPE=u;var l=6;exports.PLUGIN_EVENT_TYPE=l;var h=0;exports.MUTATION_SOURCE_TYPE=h;var _=function(){function i(t){this.instance=t,this.captureStarted=!1,this.snapshots=[],this.emit=!1,this.endpoint=d,this.stopRrweb=void 0,this.windowId=null,this.sessionId=null,this.receivedDecide=!1}return i.prototype.startRecordingIfEnabled=function(){this.isRecordingEnabled()?this.startCaptureAndTrySendingQueuedSnapshots():this.stopRecording()},i.prototype.started=function(){return this.captureStarted},i.prototype.stopRecording=function(){this.captureStarted&&this.stopRrweb&&(this.stopRrweb(),this.stopRrweb=void 0,this.captureStarted=!1)},i.prototype.isRecordingEnabled=function(){var t=!!this.instance.get_property(e.SESSION_RECORDING_ENABLED_SERVER_SIDE),n=!this.instance.get_config("disable_session_recording");return t&&n},i.prototype.afterDecideResponse=function(t){var n,r,i;this.receivedDecide=!0,this.instance.persistence&&this.instance.persistence.register(((n={})[e.SESSION_RECORDING_ENABLED_SERVER_SIDE]=!!t.sessionRecording,n)),(null===(r=t.sessionRecording)||void 0===r?void 0:r.endpoint)&&(this.endpoint=null===(i=t.sessionRecording)||void 0===i?void 0:i.endpoint),this.startRecordingIfEnabled()},i.prototype.startCaptureAndTrySendingQueuedSnapshots=function(){var t=this;this.receivedDecide&&(this.emit=!0,this.snapshots.forEach(function(e){return t._captureSnapshot(e)})),this._startCapture()},i.prototype._startCapture=function(){void 0!==Object.assign&&(this.captureStarted||this.instance.get_config("disable_session_recording")||(this.captureStarted=!0,(0,t.loadScript)(this.instance.get_config("api_host")+"/static/recorder.js?v="+n.default.LIB_VERSION,this._onScriptLoaded.bind(this))))},i.prototype._updateWindowAndSessionIds=function(t){var e,n,r=t.type===u&&(null===(e=t.data)||void 0===e?void 0:e.source)===h,i=this.instance.sessionManager.checkAndGetSessionAndWindowId(r,t.timestamp),o=i.windowId,s=i.sessionId;this.windowId===o&&this.sessionId===s||-1!==[c,p].indexOf(t.type)||null===(n=this.rrwebRecord)||void 0===n||n.takeFullSnapshot(),this.windowId=o,this.sessionId=s},i.prototype._onScriptLoaded=function(){var t,e,n,i=this,d={blockClass:"ph-no-capture",blockSelector:void 0,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:void 0,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0};this.rrwebRecord=window.rrweb?window.rrweb.record:window.rrwebRecord;var c=this.instance.get_config("session_recording");try{for(var p=s(Object.entries(c||{})),u=p.next();!u.done;u=p.next()){var l=a(u.value,2),h=l[0],_=l[1];h in d&&(d[h]=_)}}catch(f){t={error:f}}finally{try{u&&!u.done&&(e=p.return)&&e.call(p)}finally{if(t)throw t.error}}this.stopRrweb=null===(n=this.rrwebRecord)||void 0===n?void 0:n.call(this,o({emit:function(t){t=(0,r.truncateLargeConsoleLogs)((0,r.filterDataURLsFromLargeDataObjects)(t)),i._updateWindowAndSessionIds(t);var e={$snapshot_data:t,$session_id:i.sessionId,$window_id:i.windowId};i.instance._captureMetrics.incr("rrweb-record"),i.instance._captureMetrics.incr("rrweb-record-".concat(t.type)),i.emit?i._captureSnapshot(e):i.snapshots.push(e)},plugins:window.rrwebConsoleRecord&&this.instance.get_config("enable_recording_console_log")?[window.rrwebConsoleRecord.getRecordConsolePlugin()]:[]},d)),this.instance._addCaptureHook(function(t){var e;"$pageview"===t&&(null===(e=i.rrwebRecord)||void 0===e||e.addCustomEvent("$pageview",{href:window.location.href}))})},i.prototype._captureSnapshot=function(t){this.instance.capture("$snapshot",t,{transport:"XHR",method:"POST",endpoint:this.endpoint,_noTruncate:!0,_batchKey:"sessionRecording",_metrics:{rrweb_full_snapshot:t.$snapshot_data.type===c}})},i}();exports.SessionRecording=_;
|
|
29
|
+
},{"../autocapture-utils":"h4lk","../posthog-persistence":"8kGX","../config":"C9JJ","./sessionrecording-utils":"+gtL"}],"UrLq":[function(require,module,exports) {
|
|
30
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Decide=void 0;var e=require("./autocapture"),t=require("./utils"),n=function(e){var t="function"==typeof Symbol&&Symbol.iterator,n=t&&e[t],i=0;if(n)return n.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=function(){function i(e){this.instance=e,this.instance.decideEndpointWasHit=!1}return i.prototype.call=function(){var e=this,n=JSON.stringify({token:this.instance.get_config("token"),distinct_id:this.instance.get_distinct_id(),groups:this.instance.getGroups()}),i=(0,t._base64Encode)(n);this.instance._send_request("".concat(this.instance.get_config("api_host"),"/decide/?v=2"),{data:i,verbose:!0},{method:"POST"},function(t){return e.parseDecideResponse(t)})},i.prototype.parseDecideResponse=function(t){var i,o,s,r=this;if(0!==(null==t?void 0:t.status)){if(this.instance.decideEndpointWasHit=!0,!document||!document.body)return console.log("document not ready yet, trying again in 500 milliseconds..."),void setTimeout(function(){r.parseDecideResponse(t)},500);if(this.instance.toolbar.afterDecideResponse(t),null===(s=this.instance.sessionRecording)||void 0===s||s.afterDecideResponse(t),e.autocapture.afterDecideResponse(t,this.instance),this.instance.featureFlags.receivedFeatureFlags(t),t.supportedCompression){var c={};try{for(var a=n(t.supportedCompression),d=a.next();!d.done;d=a.next()){c[d.value]=!0}}catch(u){i={error:u}}finally{try{d&&!d.done&&(o=a.return)&&o.call(a)}finally{if(i)throw i.error}}this.instance.compression=c}else this.instance.compression={}}else console.error("Failed to fetch feature flags from PostHog.")},i}();exports.Decide=i;
|
|
31
|
+
},{"./autocapture":"+QN3","./utils":"UnXq"}],"1RJB":[function(require,module,exports) {
|
|
32
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Toolbar=void 0;var t=require("../autocapture-utils"),o=require("../utils"),e=function(){return(e=Object.assign||function(t){for(var o,e=1,i=arguments.length;e<i;e++)for(var a in o=arguments[e])Object.prototype.hasOwnProperty.call(o,a)&&(t[a]=o[a]);return t}).apply(this,arguments)},i=function(){function i(t){this.instance=t}return i.prototype.afterDecideResponse=function(t){var o=t.editorParams||(t.toolbarVersion?{toolbarVersion:t.toolbarVersion}:{});t.isAuthenticated&&o.toolbarVersion&&0===o.toolbarVersion.indexOf("toolbar")&&this._loadEditor(e(e({},o),{apiURL:this.instance.get_config("api_host")}))},i.prototype.maybeLoadEditor=function(t,e,i){void 0===t&&(t=window.location),void 0===e&&(e=void 0),void 0===i&&(i=window.history);try{if(!e){try{window.localStorage.setItem("test","test"),window.localStorage.removeItem("test")}catch(d){return!1}e=window.localStorage}var a=(0,o._getHashParam)(t.hash,"__posthog")||(0,o._getHashParam)(t.hash,"state"),r=a?JSON.parse(decodeURIComponent(a)):null,n=r&&("mpeditor"===r.action||"ph_authorize"===r.action),s=void 0;return n?(s=r)&&Object.keys(s).length>0&&(e.setItem("_postHogEditorParams",JSON.stringify(s)),r.desiredHash?t.hash=r.desiredHash:i?i.replaceState("",document.title,t.pathname+t.search):t.hash=""):delete(s=JSON.parse(e.getItem("_postHogEditorParams")||"{}")).userIntent,s.apiURL=this.instance.get_config("api_host"),!(!s.token||this.instance.get_config("token")!==s.token)&&(this._loadEditor(s),!0)}catch(c){return!1}},i.prototype._loadEditor=function(i){var a=this;if(!window._postHogToolbarLoaded){window._postHogToolbarLoaded=!0;var r=i.jsURL||i.apiURL||this.instance.get_config("api_host"),n=r+(r.endsWith("/")?"":"/")+"static/toolbar.js?_ts="+(new Date).getTime(),s="https://app.posthog.com"!==this.instance.get_config("api_host")&&this.instance.get_config("advanced_disable_toolbar_metrics");return i=e(e({},i),s?{instrument:!1}:{}),(0,t.loadScript)(n,function(){window.ph_load_editor(i,a.instance)}),(0,o._register_event)(window,"turbolinks:load",function(){window._postHogToolbarLoaded=!1,a._loadEditor(i)}),!0}return!1},i}();exports.Toolbar=i;
|
|
33
|
+
},{"../autocapture-utils":"h4lk","../utils":"UnXq"}],"VdzR":[function(require,module,exports) {
|
|
34
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RequestQueueScaffold=void 0;var e=function(){function e(e){void 0===e&&(e=3e3),this.isPolling=!0,this._event_queue=[],this._empty_queue_count=0,this._poller=void 0,this._pollInterval=e}return e.prototype.setPollInterval=function(e){this._pollInterval=e,this.isPolling&&this.poll()},e.prototype.poll=function(){},e.prototype.unload=function(){},e.prototype.getTime=function(){return(new Date).getTime()},e}();exports.RequestQueueScaffold=e;
|
|
35
|
+
},{}],"YL63":[function(require,module,exports) {
|
|
36
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RequestQueue=void 0;var t=require("./base-request-queue"),e=require("./utils"),r=function(){var t=function(e,r){return(t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])})(e,r)};return function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),n=function(){return(n=Object.assign||function(t){for(var e,r=1,n=arguments.length;r<n;r++)for(var o in e=arguments[r])Object.prototype.hasOwnProperty.call(e,o)&&(t[o]=e[o]);return t}).apply(this,arguments)},o=function(t){function o(e,r,n){void 0===n&&(n=3e3);var o=t.call(this,n)||this;return o.handlePollRequest=r,o.captureMetrics=e,o}return r(o,t),o.prototype.enqueue=function(t,e,r){this.captureMetrics.incr("batch-enqueue"),this._event_queue.push({url:t,data:e,options:r}),this.isPolling||(this.isPolling=!0,this.poll())},o.prototype.poll=function(){var t=this;clearTimeout(this._poller),this._poller=setTimeout(function(){if(t._event_queue.length>0){var r=t.formatQueue(),n=function(n){var o=r[n],u=o.url,i=o.data,s=o.options;(0,e._each)(i,function(e,r){i[r].offset=Math.abs(i[r].timestamp-t.getTime()),delete i[r].timestamp}),t.handlePollRequest(u,i,s),t.captureMetrics.incr("batch-requests"),t.captureMetrics.incr("batch-requests-".concat(u.slice(u.length-2))),t.captureMetrics.incr("batch-handle",i.length),t.captureMetrics.incr("batch-handle-".concat(u.slice(u.length-2)),i.length)};for(var o in r)n(o);t._event_queue.length=0,t._empty_queue_count=0}else t._empty_queue_count++;t._empty_queue_count>4&&(t.isPolling=!1,t._empty_queue_count=0),t.isPolling&&t.poll()},this._pollInterval)},o.prototype.updateUnloadMetrics=function(){var t=this.formatQueue();for(var e in t){var r=t[e],n=r.url,o=r.data;this.captureMetrics.incr("batch-unload-requests"),this.captureMetrics.incr("batch-unload-requests-".concat(n.slice(n.length-2))),this.captureMetrics.incr("batch-unload",o.length),this.captureMetrics.incr("batch-unload-".concat(n.slice(n.length-2)),o.length)}},o.prototype.unload=function(){clearTimeout(this._poller);var t=this._event_queue.length>0?this.formatQueue():{};for(var e in this._event_queue.length=0,t){var r=t[e],o=r.url,u=r.data,i=r.options;this.handlePollRequest(o,u,n(n({},i),{transport:"sendBeacon"}))}},o.prototype.formatQueue=function(){var t={};return(0,e._each)(this._event_queue,function(e){var r=e.url,n=e.data,o=e.options,u=(o?o._batchKey:null)||r;void 0===t[u]&&(t[u]={data:[],url:r,options:o}),o&&t[u].options&&t[u].options._metrics&&!t[u].options._metrics.rrweb_full_snapshot&&(t[u].options._metrics.rrweb_full_snapshot=o._metrics.rrweb_full_snapshot),t[u].data.push(n)}),t},o}(t.RequestQueueScaffold);exports.RequestQueue=o;
|
|
37
|
+
},{"./base-request-queue":"VdzR","./utils":"UnXq"}],"K3eQ":[function(require,module,exports) {
|
|
38
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.CaptureMetrics=void 0;var t=function(){function t(t){this.enabled=t,this.metrics={}}return t.prototype.incr=function(t,e){void 0===e&&(e=1),this.enabled&&(t="phjs-".concat(t),this.metrics[t]=(this.metrics[t]||0)+e)},t.prototype.decr=function(t){this.enabled&&(t="phjs-".concat(t),this.metrics[t]=(this.metrics[t]||0)-1)},t}();exports.CaptureMetrics=t;
|
|
39
|
+
},{}],"UJm1":[function(require,module,exports) {
|
|
40
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Zlib=exports.Unzlib=exports.Inflate=exports.Gzip=exports.Gunzip=exports.Deflate=exports.Decompress=exports.Compress=exports.AsyncZlib=exports.AsyncUnzlib=exports.AsyncInflate=exports.AsyncGzip=exports.AsyncGunzip=exports.AsyncDeflate=exports.AsyncDecompress=exports.AsyncCompress=void 0,exports.decompress=Wt,exports.decompressSync=Yt,exports.deflate=xt,exports.deflateSync=bt,exports.gunzip=It,exports.gunzipSync=Zt,exports.compress=exports.gzip=Dt,exports.compressSync=exports.gzipSync=Ot,exports.inflate=Mt,exports.inflateSync=kt,exports.strFromU8=Kt,exports.strToU8=Jt,exports.unzip=rn,exports.unzipSync=en,exports.unzlib=_t,exports.unzlibSync=Bt,exports.zip=tn,exports.zipSync=nn,exports.zlib=Tt,exports.zlibSync=jt;var t={},n=function(n,r,e,i,o){var a=t[r]||(t[r]=URL.createObjectURL(new Blob([n],{type:"text/javascript"}))),f=new Worker(a);return f.onerror=function(t){return o(t.error,null)},f.onmessage=function(t){return o(null,t.data)},f.postMessage(e,i),f},r=Uint8Array,e=Uint16Array,i=Uint32Array,o=new r([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),a=new r([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),f=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),s=function(t,n){for(var r=new e(31),o=0;o<31;++o)r[o]=n+=1<<t[o-1];var a=new i(r[30]);for(o=1;o<30;++o)for(var f=r[o];f<r[o+1];++f)a[f]=f-r[o]<<5|o;return[r,a]},u=s(o,2),l=u[0],c=u[1];l[28]=258,c[258]=28;for(var h=s(a,0),p=h[0],v=h[1],d=new e(32768),g=0;g<32768;++g){var w=(43690&g)>>>1|(21845&g)<<1;w=(61680&(w=(52428&w)>>>2|(13107&w)<<2))>>>4|(3855&w)<<4,d[g]=((65280&w)>>>8|(255&w)<<8)>>>1}var y=function(t,n,r){for(var i=t.length,o=0,a=new e(n);o<i;++o)++a[t[o]-1];var f,s=new e(n);for(o=0;o<n;++o)s[o]=s[o-1]+a[o-1]<<1;if(r){f=new e(1<<n);var u=15-n;for(o=0;o<i;++o)if(t[o])for(var l=o<<4|t[o],c=n-t[o],h=s[t[o]-1]++<<c,p=h|(1<<c)-1;h<=p;++h)f[d[h]>>>u]=l}else for(f=new e(i),o=0;o<i;++o)f[o]=d[s[t[o]-1]++]>>>15-t[o];return f},m=new r(288);for(g=0;g<144;++g)m[g]=8;for(g=144;g<256;++g)m[g]=9;for(g=256;g<280;++g)m[g]=7;for(g=280;g<288;++g)m[g]=8;var x=new r(32);for(g=0;g<32;++g)x[g]=5;var b=y(m,9,0),z=y(m,9,1),A=y(x,5,0),M=y(x,5,1),k=function(t){for(var n=t[0],r=1;r<t.length;++r)t[r]>n&&(n=t[r]);return n},S=function(t,n,r){var e=n/8>>0;return(t[e]|t[e+1]<<8)>>>(7&n)&r},C=function(t,n){var r=n/8>>0;return(t[r]|t[r+1]<<8|t[r+2]<<16)>>>(7&n)},D=function(t){return(t/8>>0)+(7&t&&1)},O=function(t,n,o){(null==n||n<0)&&(n=0),(null==o||o>t.length)&&(o=t.length);var a=new(t instanceof e?e:t instanceof i?i:r)(o-n);return a.set(t.subarray(n,o)),a},G=function(t,n,e){var i=t.length,s=!n||e,u=!e||e.i;e||(e={}),n||(n=new r(3*i));var c=function(t){var e=n.length;if(t>e){var i=new r(Math.max(2*e,t));i.set(n),n=i}},h=e.f||0,v=e.p||0,d=e.b||0,g=e.l,w=e.d,m=e.m,x=e.n,b=8*i;do{if(!g){e.f=h=S(t,v,1);var A=S(t,v+1,3);if(v+=3,!A){var G=t[(B=D(v)+4)-4]|t[B-3]<<8,U=B+G;if(U>i){if(u)throw"unexpected EOF";break}s&&c(d+G),n.set(t.subarray(B,U),d),e.b=d+=G,e.p=v=8*U;continue}if(1==A)g=z,w=M,m=9,x=5;else{if(2!=A)throw"invalid block type";var I=S(t,v,31)+257,Z=S(t,v+10,15)+4,E=I+S(t,v+5,31)+1;v+=14;for(var F=new r(E),T=new r(19),j=0;j<Z;++j)T[f[j]]=S(t,v+3*j,7);v+=3*Z;var L=k(T),R=(1<<L)-1;if(!u&&v+E*(L+7)>b)break;var _=y(T,L,1);for(j=0;j<E;){var B,H=_[S(t,v,R)];if(v+=15&H,(B=H>>>4)<16)F[j++]=B;else{var P=0,W=0;for(16==B?(W=3+S(t,v,3),v+=2,P=F[j-1]):17==B?(W=3+S(t,v,7),v+=3):18==B&&(W=11+S(t,v,127),v+=7);W--;)F[j++]=P}}var Y=F.subarray(0,I),q=F.subarray(I);m=k(Y),x=k(q),g=y(Y,m,1),w=y(q,x,1)}if(v>b)throw"unexpected EOF"}s&&c(d+131072);for(var J=(1<<m)-1,K=(1<<x)-1,N=m+x+18;u||v+N<b;){var Q=(P=g[C(t,v)&J])>>>4;if((v+=15&P)>b)throw"unexpected EOF";if(!P)throw"invalid length/literal";if(Q<256)n[d++]=Q;else{if(256==Q){g=null;break}var V=Q-254;if(Q>264){var X=o[j=Q-257];V=S(t,v,(1<<X)-1)+l[j],v+=X}var $=w[C(t,v)&K],tt=$>>>4;if(!$)throw"invalid distance";v+=15&$;q=p[tt];if(tt>3){X=a[tt];q+=C(t,v)&(1<<X)-1,v+=X}if(v>b)throw"unexpected EOF";s&&c(d+131072);for(var nt=d+V;d<nt;d+=4)n[d]=n[d-q],n[d+1]=n[d+1-q],n[d+2]=n[d+2-q],n[d+3]=n[d+3-q];d=nt}}e.l=g,e.p=v,e.b=d,g&&(h=1,e.m=m,e.d=w,e.n=x)}while(!h);return d==n.length?n:O(n,0,d)},U=function(t,n,r){r<<=7&n;var e=n/8>>0;t[e]|=r,t[e+1]|=r>>>8},I=function(t,n,r){r<<=7&n;var e=n/8>>0;t[e]|=r,t[e+1]|=r>>>8,t[e+2]|=r>>>16},Z=function(t,n){for(var i=[],o=0;o<t.length;++o)t[o]&&i.push({s:o,f:t[o]});var a=i.length,f=i.slice();if(!a)return[new r(0),0];if(1==a){var s=new r(i[0].s+1);return s[i[0].s]=1,[s,1]}i.sort(function(t,n){return t.f-n.f}),i.push({s:-1,f:25001});var u=i[0],l=i[1],c=0,h=1,p=2;for(i[0]={s:-1,f:u.f+l.f,l:u,r:l};h!=a-1;)u=i[i[c].f<i[p].f?c++:p++],l=i[c!=h&&i[c].f<i[p].f?c++:p++],i[h++]={s:-1,f:u.f+l.f,l:u,r:l};var v=f[0].s;for(o=1;o<a;++o)f[o].s>v&&(v=f[o].s);var d=new e(v+1),g=E(i[h-1],d,0);if(g>n){o=0;var w=0,y=g-n,m=1<<y;for(f.sort(function(t,n){return d[n.s]-d[t.s]||t.f-n.f});o<a;++o){var x=f[o].s;if(!(d[x]>n))break;w+=m-(1<<g-d[x]),d[x]=n}for(w>>>=y;w>0;){var b=f[o].s;d[b]<n?w-=1<<n-d[b]++-1:++o}for(;o>=0&&w;--o){var z=f[o].s;d[z]==n&&(--d[z],++w)}g=n}return[new r(d),g]},E=function(t,n,r){return-1==t.s?Math.max(E(t.l,n,r+1),E(t.r,n,r+1)):n[t.s]=r},F=function(t){for(var n=t.length;n&&!t[--n];);for(var r=new e(++n),i=0,o=t[0],a=1,f=function(t){r[i++]=t},s=1;s<=n;++s)if(t[s]==o&&s!=n)++a;else{if(!o&&a>2){for(;a>138;a-=138)f(32754);a>2&&(f(a>10?a-11<<5|28690:a-3<<5|12305),a=0)}else if(a>3){for(f(o),--a;a>6;a-=6)f(8304);a>2&&(f(a-3<<5|8208),a=0)}for(;a--;)f(o);a=1,o=t[s]}return[r.subarray(0,i),n]},T=function(t,n){for(var r=0,e=0;e<n.length;++e)r+=t[e]*n[e];return r},j=function(t,n,r){var e=r.length,i=D(n+2);t[i]=255&e,t[i+1]=e>>>8,t[i+2]=255^t[i],t[i+3]=255^t[i+1];for(var o=0;o<e;++o)t[i+o+4]=r[o];return 8*(i+4+e)},L=function(t,n,r,i,s,u,l,c,h,p,v){U(n,v++,r),++s[256];for(var d=Z(s,15),g=d[0],w=d[1],z=Z(u,15),M=z[0],k=z[1],S=F(g),C=S[0],D=S[1],O=F(M),G=O[0],E=O[1],L=new e(19),R=0;R<C.length;++R)L[31&C[R]]++;for(R=0;R<G.length;++R)L[31&G[R]]++;for(var _=Z(L,7),B=_[0],H=_[1],P=19;P>4&&!B[f[P-1]];--P);var W,Y,q,J,K=p+5<<3,N=T(s,m)+T(u,x)+l,Q=T(s,g)+T(u,M)+l+14+3*P+T(L,B)+(2*L[16]+3*L[17]+7*L[18]);if(K<=N&&K<=Q)return j(n,v,t.subarray(h,h+p));if(U(n,v,1+(Q<N)),v+=2,Q<N){W=y(g,w,0),Y=g,q=y(M,k,0),J=M;var V=y(B,H,0);U(n,v,D-257),U(n,v+5,E-1),U(n,v+10,P-4),v+=14;for(R=0;R<P;++R)U(n,v+3*R,B[f[R]]);v+=3*P;for(var X=[C,G],$=0;$<2;++$){var tt=X[$];for(R=0;R<tt.length;++R){var nt=31&tt[R];U(n,v,V[nt]),v+=B[nt],nt>15&&(U(n,v,tt[R]>>>5&127),v+=tt[R]>>>12)}}}else W=b,Y=m,q=A,J=x;for(R=0;R<c;++R)if(i[R]>255){nt=i[R]>>>18&31;I(n,v,W[nt+257]),v+=Y[nt+257],nt>7&&(U(n,v,i[R]>>>23&31),v+=o[nt]);var rt=31&i[R];I(n,v,q[rt]),v+=J[rt],rt>3&&(I(n,v,i[R]>>>5&8191),v+=a[rt])}else I(n,v,W[i[R]]),v+=Y[i[R]];return I(n,v,W[256]),v+Y[256]},R=new i([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),_=new r(0),B=function(t,n,f,s,u,l){var h=t.length,p=new r(s+h+5*(1+Math.floor(h/7e3))+u),d=p.subarray(s,p.length-u),g=0;if(!n||h<8)for(var w=0;w<=h;w+=65535){var y=w+65535;y<h?g=j(d,g,t.subarray(w,y)):(d[w]=l,g=j(d,g,t.subarray(w,h)))}else{for(var m=R[n-1],x=m>>>13,b=8191&m,z=(1<<f)-1,A=new e(32768),M=new e(z+1),k=Math.ceil(f/3),S=2*k,C=function(n){return(t[n]^t[n+1]<<k^t[n+2]<<S)&z},G=new i(25e3),U=new e(288),I=new e(32),Z=0,E=0,F=(w=0,0),T=0,B=0;w<h;++w){var H=C(w),P=32767&w,W=M[H];if(A[P]=W,M[H]=P,T<=w){var Y=h-w;if((Z>7e3||F>24576)&&Y>423){g=L(t,d,0,G,U,I,E,F,B,w-B,g),F=Z=E=0,B=w;for(var q=0;q<286;++q)U[q]=0;for(q=0;q<30;++q)I[q]=0}var J=2,K=0,N=b,Q=P-W&32767;if(Y>2&&H==C(w-Q))for(var V=Math.min(x,Y)-1,X=Math.min(32767,w),$=Math.min(258,Y);Q<=X&&--N&&P!=W;){if(t[w+J]==t[w+J-Q]){for(var tt=0;tt<$&&t[w+tt]==t[w+tt-Q];++tt);if(tt>J){if(J=tt,K=Q,tt>V)break;var nt=Math.min(Q,tt-2),rt=0;for(q=0;q<nt;++q){var et=w-Q+q+32768&32767,it=et-A[et]+32768&32767;it>rt&&(rt=it,W=et)}}}Q+=(P=W)-(W=A[P])+32768&32767}if(K){G[F++]=268435456|c[J]<<18|v[K];var ot=31&c[J],at=31&v[K];E+=o[ot]+a[at],++U[257+ot],++I[at],T=w+J,++Z}else G[F++]=t[w],++U[t[w]]}}g=L(t,d,l,G,U,I,E,F,B,w-B,g),l||(g=j(d,g,_))}return O(p,0,s+D(g)+u)},H=function(){for(var t=new i(256),n=0;n<256;++n){for(var r=n,e=9;--e;)r=(1&r&&3988292384)^r>>>1;t[n]=r}return t}(),P=function(){var t=4294967295;return{p:function(n){for(var r=t,e=0;e<n.length;++e)r=H[255&r^n[e]]^r>>>8;t=r},d:function(){return 4294967295^t}}},W=function(){var t=1,n=0;return{p:function(r){for(var e=t,i=n,o=r.length,a=0;a!=o;){for(var f=Math.min(a+5552,o);a<f;++a)i+=e+=r[a];e%=65521,i%=65521}t=e,n=i},d:function(){return(t>>>8<<16|(255&n)<<8|n>>>8)+2*((255&t)<<23)}}},Y=function(t,n,r,e,i){return B(t,null==n.level?6:n.level,null==n.mem?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(t.length)))):12+n.mem,r,e,!i)},q=function(t,n){var r={};for(var e in t)r[e]=t[e];for(var e in n)r[e]=n[e];return r},J=function(t,n,r){for(var e=t(),i=t.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/ /g,"").split(","),a=0;a<e.length;++a){var f=e[a],s=o[a];if("function"==typeof f){n+=";"+s+"=";var u=f.toString();if(f.prototype)if(-1!=u.indexOf("[native code]")){var l=u.indexOf(" ",8)+1;n+=u.slice(l,u.indexOf("(",l))}else for(var c in n+=u,f.prototype)n+=";"+s+".prototype."+c+"="+f.prototype[c].toString();else n+=u}else r[s]=f}return[n,r]},K=[],N=function(t){var n=[];for(var o in t)(t[o]instanceof r||t[o]instanceof e||t[o]instanceof i)&&n.push((t[o]=new t[o].constructor(t[o])).buffer);return n},Q=function(t,r,e,i){var o;if(!K[e]){for(var a="",f={},s=t.length-1,u=0;u<s;++u)a=(o=J(t[u],a,f))[0],f=o[1];K[e]=J(t[s],a,f)}var l=q({},K[e][1]);return n(K[e][0]+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+r.toString()+"}",e,l,N(l),i)},V=function(){return[r,e,i,o,a,f,l,p,z,M,d,y,k,S,C,D,O,G,kt,et,it]},X=function(){return[r,e,i,o,a,f,c,v,b,m,A,x,d,R,_,y,U,I,Z,E,F,T,j,L,D,O,B,Y,bt,et]},$=function(){return[ct,vt,lt,P,H]},tt=function(){return[ht,pt]},nt=function(){return[dt,lt,W]},rt=function(){return[gt]},et=function(t){return postMessage(t,[t.buffer])},it=function(t){return t&&t.size&&new r(t.size)},ot=function(t,n,e,i,o,a){var f=Q(e,i,o,function(t,n){f.terminate(),a(t,n)});return n.consume||(t=new r(t)),f.postMessage([t,n],[t.buffer]),function(){f.terminate()}},at=function(t){return t.ondata=function(t,n){return postMessage([t,n],[t.buffer])},function(n){return t.push(n.data[0],n.data[1])}},ft=function(t,n,r,e,i){var o,a=Q(t,e,i,function(t,r){t?(a.terminate(),n.ondata.call(n,t)):(r[1]&&a.terminate(),n.ondata.call(n,t,r[0],r[1]))});a.postMessage(r),n.push=function(t,r){if(o)throw"stream finished";if(!n.ondata)throw"no stream handler";a.postMessage([t,o=r],[t.buffer])},n.terminate=function(){a.terminate()}},st=function(t,n){return t[n]|t[n+1]<<8},ut=function(t,n){return(t[n]|t[n+1]<<8|t[n+2]<<16)+2*(t[n+3]<<23)},lt=function(t,n,r){for(;r;++n)t[n]=r,r>>>=8},ct=function(t,n){var r=n.filename;if(t[0]=31,t[1]=139,t[2]=8,t[8]=n.level<2?4:9==n.level?2:0,t[9]=3,0!=n.mtime&<(t,4,Math.floor(new Date(n.mtime||Date.now())/1e3)),r){t[3]=8;for(var e=0;e<=r.length;++e)t[e+10]=r.charCodeAt(e)}},ht=function(t){if(31!=t[0]||139!=t[1]||8!=t[2])throw"invalid gzip data";var n=t[3],r=10;4&n&&(r+=t[10]|2+(t[11]<<8));for(var e=(n>>3&1)+(n>>4&1);e>0;e-=!t[r++]);return r+(2&n)},pt=function(t){var n=t.length;return(t[n-4]|t[n-3]<<8|t[n-2]<<16)+2*(t[n-1]<<23)},vt=function(t){return 10+(t.filename&&t.filename.length+1||0)},dt=function(t,n){var r=n.level,e=0==r?0:r<6?1:9==r?3:2;t[0]=120,t[1]=e<<6|(e?32-2*e:1)},gt=function(t){if(8!=(15&t[0])||t[0]>>>4>7||(t[0]<<8|t[1])%31)throw"invalid zlib data";if(32&t[1])throw"invalid zlib data: preset dictionaries not supported"};function wt(t,n){return n||"function"!=typeof t||(n=t,t={}),this.ondata=n,t}var yt=function(){function t(t,n){n||"function"!=typeof t||(n=t,t={}),this.ondata=n,this.o=t||{}}return t.prototype.p=function(t,n){this.ondata(Y(t,this.o,0,0,!n),n)},t.prototype.push=function(t,n){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";this.d=n,this.p(t,n||!1)},t}();exports.Deflate=yt;var mt=function(){return function(t,n){ft([X,function(){return[at,yt]}],this,wt.call(this,t,n),function(t){var n=new yt(t.data);onmessage=at(n)},6)}}();function xt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[X],function(t){return et(bt(t.data[0],t.data[1]))},0,r)}function bt(t,n){return void 0===n&&(n={}),Y(t,n,0,0)}exports.AsyncDeflate=mt;var zt=function(){function t(t){this.s={},this.p=new r(0),this.ondata=t}return t.prototype.e=function(t){if(this.d)throw"stream finished";if(!this.ondata)throw"no stream handler";var n=this.p.length,e=new r(n+t.length);e.set(this.p),e.set(t,n),this.p=e},t.prototype.c=function(t){this.d=this.s.i=t||!1;var n=this.s.b,r=G(this.p,this.o,this.s);this.ondata(O(r,n,this.s.b),this.d),this.o=O(r,this.s.b-32768),this.s.b=this.o.length,this.p=O(this.p,this.s.p/8>>0),this.s.p&=7},t.prototype.push=function(t,n){this.e(t),this.c(n)},t}();exports.Inflate=zt;var At=function(){return function(t){this.ondata=t,ft([V,function(){return[at,zt]}],this,0,function(){var t=new zt;onmessage=at(t)},7)}}();function Mt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[V],function(t){return et(kt(t.data[0],it(t.data[1])))},1,r)}function kt(t,n){return G(t,n)}exports.AsyncInflate=At;var St=function(){function t(t,n){this.c=P(),this.l=0,this.v=1,yt.call(this,t,n)}return t.prototype.push=function(t,n){yt.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){this.c.p(t),this.l+=t.length;var r=Y(t,this.o,this.v&&vt(this.o),n&&8,!n);this.v&&(ct(r,this.o),this.v=0),n&&(lt(r,r.length-8,this.c.d()),lt(r,r.length-4,this.l)),this.ondata(r,n)},t}();exports.Compress=exports.Gzip=St;var Ct=function(){return function(t,n){ft([X,$,function(){return[at,yt,St]}],this,wt.call(this,t,n),function(t){var n=new St(t.data);onmessage=at(n)},8)}}();function Dt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[X,$,function(){return[Ot]}],function(t){return et(Ot(t.data[0],t.data[1]))},2,r)}function Ot(t,n){void 0===n&&(n={});var r=P(),e=t.length;r.p(t);var i=Y(t,n,vt(n),8),o=i.length;return ct(i,n),lt(i,o-8,r.d()),lt(i,o-4,e),i}exports.AsyncCompress=exports.AsyncGzip=Ct;var Gt=function(){function t(t){this.v=1,zt.call(this,t)}return t.prototype.push=function(t,n){if(zt.prototype.e.call(this,t),this.v){var r=ht(this.p);if(r>=this.p.length&&!n)return;this.p=this.p.subarray(r),this.v=0}if(n){if(this.p.length<8)throw"invalid gzip stream";this.p=this.p.subarray(0,-8)}zt.prototype.c.call(this,n)},t}();exports.Gunzip=Gt;var Ut=function(){return function(t){this.ondata=t,ft([V,tt,function(){return[at,zt,Gt]}],this,0,function(){var t=new Gt;onmessage=at(t)},9)}}();function It(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[V,tt,function(){return[Zt]}],function(t){return et(Zt(t.data[0]))},3,r)}function Zt(t,n){return G(t.subarray(ht(t),-8),n||new r(pt(t)))}exports.AsyncGunzip=Ut;var Et=function(){function t(t,n){this.c=W(),this.v=1,yt.call(this,t,n)}return t.prototype.push=function(t,n){yt.prototype.push.call(this,t,n)},t.prototype.p=function(t,n){this.c.p(t);var r=Y(t,this.o,this.v&&2,n&&4,!n);this.v&&(dt(r,this.o),this.v=0),n&<(r,r.length-4,this.c.d()),this.ondata(r,n)},t}();exports.Zlib=Et;var Ft=function(){return function(t,n){ft([X,nt,function(){return[at,yt,Et]}],this,wt.call(this,t,n),function(t){var n=new Et(t.data);onmessage=at(n)},10)}}();function Tt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[X,nt,function(){return[jt]}],function(t){return et(jt(t.data[0],t.data[1]))},4,r)}function jt(t,n){void 0===n&&(n={});var r=W();r.p(t);var e=Y(t,n,2,4);return dt(e,n),lt(e,e.length-4,r.d()),e}exports.AsyncZlib=Ft;var Lt=function(){function t(t){this.v=1,zt.call(this,t)}return t.prototype.push=function(t,n){if(zt.prototype.e.call(this,t),this.v){if(this.p.length<2&&!n)return;this.p=this.p.subarray(2),this.v=0}if(n){if(this.p.length<4)throw"invalid zlib stream";this.p=this.p.subarray(0,-4)}zt.prototype.c.call(this,n)},t}();exports.Unzlib=Lt;var Rt=function(){return function(t){this.ondata=t,ft([V,rt,function(){return[at,zt,Lt]}],this,0,function(){var t=new Lt;onmessage=at(t)},11)}}();function _t(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return ot(t,n,[V,rt,function(){return[Bt]}],function(t){return et(Bt(t.data[0],it(t.data[1])))},5,r)}function Bt(t,n){return G((gt(t),t.subarray(2,-4)),n)}exports.AsyncUnzlib=Rt;var Ht=function(){function t(t){this.G=Gt,this.I=zt,this.Z=Lt,this.ondata=t}return t.prototype.push=function(t,n){if(!this.ondata)throw"no stream handler";if(this.s)this.s.push(t,n);else{if(this.p&&this.p.length){var e=new r(this.p.length+t.length);e.set(this.p),e.set(t,this.p.length)}else this.p=t;if(this.p.length>2){var i=this,o=function(){i.ondata.apply(i,arguments)};this.s=31==this.p[0]&&139==this.p[1]&&8==this.p[2]?new this.G(o):8!=(15&this.p[0])||this.p[0]>>4>7||(this.p[0]<<8|this.p[1])%31?new this.I(o):new this.Z(o),this.s.push(this.p,n),this.p=null}}},t}();exports.Decompress=Ht;var Pt=function(){function t(t){this.G=Ut,this.I=At,this.Z=Rt,this.ondata=t}return t.prototype.push=function(t,n){Ht.prototype.push.call(this,t,n)},t}();function Wt(t,n,r){if(r||(r=n,n={}),"function"!=typeof r)throw"no callback";return 31==t[0]&&139==t[1]&&8==t[2]?It(t,n,r):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?Mt(t,n,r):_t(t,n,r)}function Yt(t,n){return 31==t[0]&&139==t[1]&&8==t[2]?Zt(t,n):8!=(15&t[0])||t[0]>>4>7||(t[0]<<8|t[1])%31?kt(t,n):Bt(t,n)}exports.AsyncDecompress=Pt;var qt=function(t,n,e,i){for(var o in t){var a=t[o],f=n+o;a instanceof r?e[f]=[a,i]:Array.isArray(a)?e[f]=[a[0],q(i,a[1])]:qt(a,f+"/",e,i)}};function Jt(t,n){var e=t.length;if(!n&&"undefined"!=typeof TextEncoder)return(new TextEncoder).encode(t);for(var i=new r(t.length+(t.length>>>1)),o=0,a=function(t){i[o++]=t},f=0;f<e;++f){if(o+5>i.length){var s=new r(o+8+(e-f<<1));s.set(i),i=s}var u=t.charCodeAt(f);u<128||n?a(u):u<2048?(a(192|u>>>6),a(128|63&u)):u>55295&&u<57344?(a(240|(u=65536+(1047552&u)|1023&t.charCodeAt(++f))>>>18),a(128|u>>>12&63),a(128|u>>>6&63),a(128|63&u)):(a(224|u>>>12),a(128|u>>>6&63),a(128|63&u))}return O(i,0,o)}function Kt(t,n){var r="";if(!n&&"undefined"!=typeof TextDecoder)return(new TextDecoder).decode(t);for(var e=0;e<t.length;){var i=t[e++];i<128||n?r+=String.fromCharCode(i):i<224?r+=String.fromCharCode((31&i)<<6|63&t[e++]):i<240?r+=String.fromCharCode((15&i)<<12|(63&t[e++])<<6|63&t[e++]):(i=((15&i)<<18|(63&t[e++])<<12|(63&t[e++])<<6|63&t[e++])-65536,r+=String.fromCharCode(55296|i>>10,56320|1023&i))}return r}var Nt=function(t,n){return n+30+st(t,n+26)+st(t,n+28)},Qt=function(t,n,r){var e=st(t,n+28),i=Kt(t.subarray(n+46,n+46+e),!(2048&st(t,n+8))),o=n+46+e,a=r?Vt(t,o):[ut(t,n+20),ut(t,n+24),ut(t,n+42)],f=a[0],s=a[1],u=a[2];return[st(t,n+10),f,s,i,o+st(t,n+30)+st(t,n+32),u]},Vt=function(t,n){for(;1!=st(t,n);n+=4+st(t,n+2));return[ut(t,n+12),ut(t,n+4),ut(t,n+20)]},Xt=function(t,n,r,e,i,o,a,f,s,u){var l=o.length,c=e.length;lt(t,n,null!=s?33639248:67324752),n+=4,null!=s&&(t[n]=20,n+=2),t[n]=20,n+=2,t[n++]=8==u&&(1==f.level?6:f.level<6?4:9==f.level?2:0),t[n++]=a&&8,t[n]=u,n+=2;var h=new Date(f.mtime||Date.now()),p=h.getFullYear()-1980;if(p<0||p>119)throw"date not in range 1980-2099";lt(t,n,2*(p<<24)|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>>1),lt(t,n+=4,r),lt(t,n+4,c),lt(t,n+8,i),lt(t,n+12,l),n+=16,null!=s&&(lt(t,n+=10,s),n+=4),t.set(o,n),n+=l,null==s&&t.set(e,n)},$t=function(t,n,r,e,i){lt(t,n,101010256),lt(t,n+8,r),lt(t,n+10,r),lt(t,n+12,e),lt(t,n+16,i)};function tn(t,n,e){if(e||(e=n,n={}),"function"!=typeof e)throw"no callback";var i={};qt(t,"",i,n);var o=Object.keys(i),a=o.length,f=0,s=0,u=a,l=new Array(a),c=[],h=function(){for(var t=0;t<c.length;++t)c[t]()},p=function(){var t=new r(s+22),n=f,i=s-f;s=0;for(var o=0;o<u;++o){var a=l[o];try{Xt(t,s,a.c,a.d,a.m,a.n,a.u,a.p,null,a.t),Xt(t,f,a.c,a.d,a.m,a.n,a.u,a.p,s,a.t),f+=46+a.n.length,s+=30+a.n.length+a.d.length}catch(c){return e(c,null)}}$t(t,f,l.length,i,n),e(null,t)};a||p();for(var v=function(t){var n=o[t],r=i[n],u=r[0],v=r[1],d=P(),g=u.length;d.p(u);var w=Jt(n),y=w.length,m=0==v.level?0:8,x=function(r,i){if(r)h(),e(r,null);else{var o=i.length;l[t]={t:m,d:i,m:g,c:d.d(),u:n.length!=o,n:w,p:v},f+=30+y+o,s+=76+2*y+o,--a||p()}};if(w.length>65535&&x("filename too long",null),m)if(g<16e4)try{x(null,bt(u,v))}catch(b){x(b,null)}else c.push(xt(u,v,x));else x(null,u)},d=0;d<u;++d)v(d);return h}function nn(t,n){void 0===n&&(n={});var e={},i=[];qt(t,"",e,n);var o=0,a=0;for(var f in e){var s=e[f],u=s[0],l=s[1],c=0==l.level?0:8,h=Jt(f),p=h.length;if(h.length>65535)throw"filename too long";var v=c?bt(u,l):u,d=v.length,g=P();g.p(u),i.push({t:c,d:v,m:u.length,c:g.d(),u:f.length!=p,n:h,o:o,p:l}),o+=30+p+d,a+=76+2*p+d}for(var w=new r(a+22),y=o,m=a-o,x=0;x<i.length;++x){var b=i[x];Xt(w,b.o,b.c,b.d,b.m,b.n,b.u,b.p,null,b.t),Xt(w,o,b.c,b.d,b.m,b.n,b.u,b.p,b.o,b.t),o+=46+b.n.length}return $t(w,o,i.length,m,y),w}function rn(t,n){if("function"!=typeof n)throw"no callback";for(var e=[],i=function(){for(var t=0;t<e.length;++t)e[t]()},o={},a=t.length-22;101010256!=ut(t,a);--a)if(!a||t.length-a>65558)return void n("invalid zip file",null);var f=st(t,a+8);f||n(null,{});var s=f,u=ut(t,a+16),l=4294967295==u;if(l){if(a=ut(t,a-12),101075792!=ut(t,a))throw"invalid zip file";s=f=ut(t,a+32),u=ut(t,a+48)}for(var c=function(s){var c=Qt(t,u,l),h=c[0],p=c[1],v=c[2],d=c[3],g=c[4],w=c[5],y=Nt(t,w);u=g;var m=function(t,r){t?(i(),n(t,null)):(o[d]=r,--f||n(null,o))};if(h)if(8==h){var x=t.subarray(y,y+p);if(p<32e4)try{m(null,kt(x,new r(v)))}catch(a){m(a,null)}else e.push(Mt(x,{size:v},m))}else m("unknown compression type "+h,null);else m(null,O(t,y,y+p))},h=0;h<s;++h)c();return i}function en(t){for(var n={},e=t.length-22;101010256!=ut(t,e);--e)if(!e||t.length-e>65558)throw"invalid zip file";var i=st(t,e+8);if(!i)return{};var o=ut(t,e+16),a=4294967295==o;if(a){if(e=ut(t,e-12),101075792!=ut(t,e))throw"invalid zip file";i=ut(t,e+32),o=ut(t,e+48)}for(var f=0;f<i;++f){var s=Qt(t,o,a),u=s[0],l=s[1],c=s[2],h=s[3],p=s[4],v=s[5],d=Nt(t,v);if(o=p,u){if(8!=u)throw"unknown compression type "+u;n[h]=kt(t.subarray(d,d+l),new r(c))}else n[h]=O(t,d,d+l)}return n}
|
|
41
|
+
},{}],"UL96":[function(require,module,exports) {
|
|
42
|
+
"use strict";var e;Object.defineProperty(exports,"__esModule",{value:!0}),exports.Compression=void 0,exports.Compression=e,function(e){e.GZipJS="gzip-js",e.LZ64="lz64",e.Base64="base64"}(e||(exports.Compression=e={}));
|
|
43
|
+
},{}],"/wh9":[function(require,module,exports) {
|
|
44
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.compressData=t,exports.decideCompression=n;var e=require("./lz-string"),r=require("fflate"),s=require("./utils"),o=require("./types"),i=function(){return(i=Object.assign||function(e){for(var r,s=1,o=arguments.length;s<o;s++)for(var i in r=arguments[s])Object.prototype.hasOwnProperty.call(r,i)&&(e[i]=r[i]);return e}).apply(this,arguments)};function n(e){return e[o.Compression.GZipJS]?o.Compression.GZipJS:e[o.Compression.LZ64]?o.Compression.LZ64:o.Compression.Base64}function t(n,t,p){return n===o.Compression.LZ64?[{data:e.LZString.compressToBase64(t),compression:o.Compression.LZ64},p]:n===o.Compression.GZipJS?[(0,r.gzipSync)((0,r.strToU8)(t),{mtime:0}),i(i({},p),{blob:!0,urlQueryArgs:{compression:o.Compression.GZipJS}})]:[{data:(0,s._base64Encode)(t)},p]}
|
|
45
|
+
},{"./lz-string":"iwXh","fflate":"UJm1","./utils":"UnXq","./types":"UL96"}],"9tuT":[function(require,module,exports) {
|
|
46
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.xhr=exports.encodePostData=exports.addParamsToURL=void 0;var e=require("./utils"),r=t(require("./config"));function t(e){return e&&e.__esModule?e:{default:e}}var o=function(e){var r="function"==typeof Symbol&&Symbol.iterator,t=r&&e[r],o=0;if(t)return t.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(r?"Object is not iterable.":"Symbol.iterator is not defined.")},n=function(t,n,a){var i,s,u=n||{};u.ip=a.ip?1:0,u._=(new Date).getTime().toString(),u.ver=r.default.LIB_VERSION;var d=t.split("?");if(d.length>1){var l=d[1].split("&");try{for(var c=o(l),f=c.next();!f.done;f=c.next()){var p=f.value.split("=")[0];u[p]&&delete u[p]}}catch(y){i={error:y}}finally{try{f&&!f.done&&(s=c.return)&&s.call(c)}finally{if(i)throw i.error}}}var v=t.indexOf("?")>-1?"&":"?";return t+v+(0,e._HTTPBuildQuery)(u)};exports.addParamsToURL=n;var a=function e(r,t){if(t.blob&&r.buffer)return new Blob([r.buffer],{type:"text/plain"});if(t.sendBeacon||t.blob){var o=e(r,{method:"POST"});return new Blob([o],{type:"application/x-www-form-urlencoded"})}if("POST"!==t.method)return null;var n,a;return n=Array.isArray(r)||(a=r,"[object Uint8Array]"===Object.prototype.toString.call(a))?"data="+encodeURIComponent(r):"data="+encodeURIComponent(r.data),"compression"in r&&r.compression&&(n+="&compression="+r.compression),n};exports.encodePostData=a;var i=function(r){var t=r.url,o=r.data,n=r.headers,i=r.options,s=r.captureMetrics,u=r.callback,d=r.retriesPerformedSoFar,l=r.retryQueue,c=r.onXHRError,f=new XMLHttpRequest;f.open(i.method||"GET",t,!0);var p=a(o,i);s.incr("_send_request"),s.incr("_send_request_inflight"),(0,e._each)(n,function(e,r){f.setRequestHeader(r,e)}),"POST"!==i.method||i.blob||f.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),f.withCredentials=!0,f.onreadystatechange=function(){if(4===f.readyState)if(s.incr("xhr-response"),s.incr("xhr-response-".concat(f.status)),s.decr("_send_request_inflight"),200===f.status){if(u){var r=void 0;try{r=JSON.parse(f.responseText)}catch(a){return void e.logger.error(a)}u(r)}}else"function"==typeof c&&c(f),[401,403,404,500].indexOf(f.status)<0&&l.enqueue({url:t,data:o,options:i,headers:n,retriesPerformedSoFar:(d||0)+1,callback:u}),u&&u({status:0})},f.send(p)};exports.xhr=i;
|
|
47
|
+
},{"./utils":"UnXq","./config":"C9JJ"}],"8mr1":[function(require,module,exports) {
|
|
48
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.RetryQueue=void 0;var e=require("./base-request-queue"),t=require("./send-request"),r=n(require("./config"));function n(e){return e&&e.__esModule?e:{default:e}}var o=function(){var e=function(t,r){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])})(t,r)};return function(t,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=t}e(t,r),t.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}}(),i=function(){return(i=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},u=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=function(e){function n(t,r){var n=e.call(this)||this;return n.captureMetrics=t,n.isPolling=!1,n.queue=[],n.areWeOnline=!0,n.onXHRError=r,"onLine"in window.navigator&&(n.areWeOnline=window.navigator.onLine,window.addEventListener("online",function(){n._handleWeAreNowOnline()}),window.addEventListener("offline",function(){n.areWeOnline=!1})),n}return o(n,e),n.prototype.enqueue=function(e){var t=e.retriesPerformedSoFar||0;if(!(t>=10)){var r=3e3*Math.pow(2,t),n=new Date(Date.now()+r);console.warn("Enqueued failed request for retry in ".concat(r)),this.queue.push({retryAt:n,requestData:e}),this.isPolling||(this.isPolling=!0,this.poll())}},n.prototype.poll=function(){var e=this;this._poller&&clearTimeout(this._poller),this._poller=setTimeout(function(){e.areWeOnline&&e.queue.length>0&&e.flush(),e.poll()},this._pollInterval)},n.prototype.flush=function(){var e,t,r=new Date(Date.now()),n=this.queue.filter(function(e){return e.retryAt<r});if(n.length>0){this.queue=this.queue.filter(function(e){return e.retryAt>=r});try{for(var o=u(n),i=o.next();!i.done;i=o.next()){var a=i.value.requestData;this._executeXhrRequest(a)}}catch(l){e={error:l}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}}},n.prototype.unload=function(){var e,n;this._poller&&(clearTimeout(this._poller),this._poller=void 0);try{for(var o=u(this.queue),a=o.next();!a.done;a=o.next()){var l=a.value.requestData,s=l.url,c=l.data,f=l.options;try{window.navigator.sendBeacon(s,(0,t.encodePostData)(c,i(i({},f),{sendBeacon:!0})))}catch(p){r.default.DEBUG&&console.error(p)}}}catch(h){e={error:h}}finally{try{a&&!a.done&&(n=o.return)&&n.call(o)}finally{if(e)throw e.error}}this.queue=[]},n.prototype._executeXhrRequest=function(e){var r=e.url,n=e.data,o=e.options,i=e.headers,u=e.callback,a=e.retriesPerformedSoFar;(0,t.xhr)({url:r,data:n||{},options:o||{},headers:i||{},retriesPerformedSoFar:a||0,callback:u,captureMetrics:this.captureMetrics,retryQueue:this,onXHRError:this.onXHRError})},n.prototype._handleWeAreNowOnline=function(){this.areWeOnline=!0,this.flush()},n}(e.RequestQueueScaffold);exports.RetryQueue=a;
|
|
49
|
+
},{"./base-request-queue":"VdzR","./send-request":"9tuT","./config":"C9JJ"}],"Rb1F":[function(require,module,exports) {
|
|
50
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SessionIdManager=void 0;var s=require("./posthog-persistence"),e=require("./storage"),t=require("./utils"),i=function(s,e){var t="function"==typeof Symbol&&s[Symbol.iterator];if(!t)return s;var i,n,o=t.call(s),r=[];try{for(;(void 0===e||e-- >0)&&!(i=o.next()).done;)r.push(i.value)}catch(d){n={error:d}}finally{try{i&&!i.done&&(t=o.return)&&t.call(o)}finally{if(n)throw n.error}}return r},n=18e5,o=864e5,r=function(){function r(s,e){this.persistence=e,this._windowId=void 0,this._sessionId=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,s.persistence_name?this.window_id_storage_key="ph_"+s.persistence_name+"_window_id":this.window_id_storage_key="ph_"+s.token+"_window_id"}return r.prototype._setWindowId=function(s){s!==this._windowId&&(this._windowId=s,!this.persistence.disabled&&e.sessionStore.is_supported()&&e.sessionStore.set(this.window_id_storage_key,s))},r.prototype._getWindowId=function(){return this._windowId?this._windowId:!this.persistence.disabled&&e.sessionStore.is_supported()?e.sessionStore.parse(this.window_id_storage_key):null},r.prototype._setSessionId=function(e,t,i){var n;e===this._sessionId&&t===this._sessionActivityTimestamp&&i===this._sessionStartTimestamp||(this._sessionStartTimestamp=i,this._sessionActivityTimestamp=t,this._sessionId=e,this.persistence.register(((n={})[s.SESSION_ID]=[t,e,i],n)))},r.prototype._getSessionId=function(){if(this._sessionId&&this._sessionActivityTimestamp&&this._sessionStartTimestamp)return[this._sessionActivityTimestamp,this._sessionId,this._sessionStartTimestamp];var e=this.persistence.props[s.SESSION_ID];return Array.isArray(e)&&2===e.length&&e.push(e[0]),e||[0,null,0]},r.prototype.resetSessionId=function(){this._setSessionId(null,null,null)},r.prototype.checkAndGetSessionAndWindowId=function(s,e){void 0===s&&(s=!1),void 0===e&&(e=null);var r=e||(new Date).getTime(),d=i(this._getSessionId(),3),_=d[0],a=d[1],p=d[2],h=this._getWindowId(),u=p&&p>0&&Math.abs(r-p)>o;!a||!s&&Math.abs(r-_)>n||u?(a=(0,t._UUID)(),h=(0,t._UUID)(),p=r):h||(h=(0,t._UUID)());var l=0===_||!s||u?r:_,w=0===p?(new Date).getTime():p;return this._setWindowId(h),this._setSessionId(a,l,w),{sessionId:a,windowId:h}},r}();exports.SessionIdManager=r;
|
|
51
|
+
},{"./posthog-persistence":"8kGX","./storage":"1GYW","./utils":"UnXq"}],"Z1nr":[function(require,module,exports) {
|
|
52
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.deduplicateKeys=u,exports.getPerformanceData=f,exports.getPerformanceEntriesByType=a,exports.optimisePerformanceData=i,exports.pageLoadFrom=c;var e=require("./utils"),r=n(require("./config"));function n(e){return e&&e.__esModule?e:{default:e}}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 o(e){return Number(e)===e&&e%1!=0}function i(e){return e.forEach(function(r,n){for(var t in r){var i=t;o(r[i])&&r[i].toString().match(/^\d+\.\d{4,}$/)&&(e[n][i]=Number(r[i].toFixed(3))),"serverTiming"===i&&0===r[i].length&&delete e[n][i],"entryType"===i&&"resource"===r[i]&&delete e[n][i],"nextHopProtocol"===i&&delete e[n][i],0===r[i]&&delete e[n][i]}}),u(e)}function a(n){try{return i(JSON.parse(JSON.stringify(e.window.performance.getEntriesByType(n))))}catch(t){return r.default.DEBUG&&console.warn("not able to capture performance data ("+n+") - "+t),[]}}function u(e){if(0===e.length)return[];var r=Object.keys(e[0]);return[r,e.map(function(e){return r.map(function(r){return e[r]})})]}function c(e){var r=e.navigation&&e.navigation[0],n=e.navigation&&e.navigation[1]&&e.navigation[1][0],t=r&&r.indexOf("duration");if(t>-1)return n[t];var o=r&&r.indexOf("loadEventEnd"),i=r&&r.indexOf("startTime");return o>-1?(n&&n[o])-(n&&n[i]||0):void 0}function f(){var r={navigation:a("navigation"),paint:a("paint"),resource:a("resource")};void 0!==t(e.window)&&e.window.performance&&e.window.performance.clearResourceTimings&&e.window.performance.clearResourceTimings();var n={},o=c(r);return o&&(n.$performance_page_loaded=o),n.$performance_raw=JSON.stringify(r),n}
|
|
53
|
+
},{"./utils":"UnXq","./config":"C9JJ"}],"ivfD":[function(require,module,exports) {
|
|
54
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.SentryIntegration=void 0;var e=function(){return function(e,t,n,s){this.name="posthog-js",this.setupOnce=function(o){o(function(o){if("error"!==o.level||!e.__loaded)return o;o.tags||(o.tags={}),o.tags["PostHog Person URL"]=e.config.api_host+"/person/"+e.get_distinct_id(),e.sessionRecordingStarted()&&(o.tags["PostHog Recording URL"]=e.config.api_host+"/recordings/#sessionRecordingId="+e.sessionManager.checkAndGetSessionAndWindowId(!0).sessionId);var i={$sentry_event_id:o.event_id,$sentry_exception:o.exception};return t&&n&&(i.$sentry_url=(s||"https://sentry.io/organizations/")+t+"/issues/?project="+n+"&query="+o.event_id),e.capture("$exception",i),o})}}}();exports.SentryIntegration=e;
|
|
55
|
+
},{}],"fQdl":[function(require,module,exports) {
|
|
56
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.PostHog=void 0,exports.init_as_module=L,exports.init_from_snippet=U;var e=require("./lz-string"),t=m(require("./config")),i=require("./utils"),o=require("./autocapture"),r=require("./posthog-people"),s=require("./posthog-featureflags"),n=require("./posthog-persistence"),a=require("./extensions/sessionrecording"),c=require("./decide"),_=require("./extensions/toolbar"),p=require("./gdpr-utils"),u=require("./storage"),d=require("./request-queue"),g=require("./capture-metrics"),l=require("./compression"),h=require("./send-request"),f=require("./retry-queue"),y=require("./sessionid"),v=require("./apm"),b=require("./extensions/sentry-integration");function m(e){return e&&e.__esModule?e:{default:e}}var k,w,q,I=function(){return(I=Object.assign||function(e){for(var t,i=1,o=arguments.length;i<o;i++)for(var r in t=arguments[i])Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e}).apply(this,arguments)},x=function(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var o,r,s=i.call(e),n=[];try{for(;(void 0===t||t-- >0)&&!(o=s.next()).done;)n.push(o.value)}catch(a){r={error:a}}finally{try{o&&!o.done&&(i=s.return)&&i.call(s)}finally{if(r)throw r.error}}return n},S=function(e,t,i){if(i||2===arguments.length)for(var o,r=0,s=t.length;r<s;r++)!o&&r in t||(o||(o=Array.prototype.slice.call(t,0,r)),o[r]=t[r]);return e.concat(o||Array.prototype.slice.call(t))};!function(e){e[e.INIT_MODULE=0]="INIT_MODULE",e[e.INIT_SNIPPET=1]="INIT_SNIPPET"}(k||(k={}));var E=function(){},F={},P="posthog",$=i.window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,A=!$&&-1===i.userAgent.indexOf("MSIE")&&-1===i.userAgent.indexOf("Mozilla"),M=function(){var e,t,o;return{api_host:"https://app.posthog.com",api_method:"POST",api_transport:"XHR",token:"",autocapture:!0,rageclick:!1,cross_subdomain_cookie:-1===(null===(t=null===(e=null===i.document||void 0===i.document?void 0:i.document.location)||void 0===e?void 0:e.hostname)||void 0===t?void 0:t.indexOf("herokuapp.com")),persistence:"cookie",persistence_name:"",cookie_name:"",loaded:E,store_google:!0,save_referrer:!0,test:!1,verbose:!1,img:!1,capture_pageview:!0,debug:!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_cookie:!1,enable_recording_console_log:!1,secure_cookie:"https:"===(null===(o=null===i.window||void 0===i.window?void 0:i.window.location)||void 0===o?void 0:o.protocol),ip:!0,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_capturing_persistence_type:"localStorage",opt_out_capturing_cookie_prefix:null,property_blacklist:[],respect_dnt:!1,sanitize_properties:null,xhr_headers:{},inapp_protocol:"//",inapp_link_new_window:!1,request_batching:!0,properties_string_max_length:65535,session_recording:{blockClass:"ph-no-capture",blockSelector:null,ignoreClass:"ph-ignore-input",maskAllInputs:!0,maskInputOptions:{},maskInputFn:null,slimDOMOptions:{},collectFonts:!1,inlineStylesheet:!0},mask_all_element_attributes:!1,mask_all_text:!1,advanced_disable_decide:!1,advanced_disable_toolbar_metrics:!1,on_xhr_error:function(e){var t="Bad HTTP status: "+e.status+" "+e.statusText;console.error(t)},get_device_id:function(e){return e},_onCapture:E,_capture_metrics:!1,_capture_performance:!1,name:"posthog",callback_fn:"posthog._jsc"}},O=function(e,r,s){var n,c=s!==P&&q?q[s]:q;if(c&&w===k.INIT_MODULE)n=c;else{if(c&&!(0,i._isArray)(c))return void console.error("You have already initialized "+s);n=new T}if(n._init(e,r,s),n.toolbar.maybeLoadEditor(),n.sessionRecording=new a.SessionRecording(n),n.sessionRecording.startRecordingIfEnabled(),n.__autocapture_enabled=n.get_config("autocapture"),n.get_config("autocapture")){o.autocapture.enabledForProject(n.get_config("token"),100,100)?o.autocapture.isBrowserSupported()?o.autocapture.init(n):(n.__autocapture_enabled=!1,i.logger.log("Disabling Automatic Event Collection because this browser is not supported")):(n.__autocapture_enabled=!1,i.logger.log("Not in active bucket: disabling Automatic Event Collection."))}return t.default.DEBUG=t.default.DEBUG||n.get_config("debug"),void 0!==c&&(0,i._isArray)(c)&&(n._execute_array.call(n.people,c.people),n._execute_array(c)),n},T=function(){function o(){this.config=M(),this.compression={},this.decideEndpointWasHit=!1,this.SentryIntegration=b.SentryIntegration,this.__captureHooks=[],this.__request_queue=[],this.__loaded=!1,this.__autocapture_enabled=void 0,this._jsc=function(){},this.people=new r.PostHogPeople(this),this.featureFlags=new s.PostHogFeatureFlags(this),this.feature_flags=this.featureFlags,this.toolbar=new _.Toolbar(this),this._captureMetrics=void 0,this._requestQueue=void 0,this._retryQueue=void 0,this.persistence=void 0,this.sessionManager=void 0}return o.prototype.init=function(e,t,o){if((0,i._isUndefined)(o))console.error("You must name your new library: init(token, config, name)");else{if(o!==P){var r=O(e,t,o);return q[o]=r,r._loaded(),r}console.error("You must initialize the main posthog object right after you include the PostHog js snippet")}},o.prototype._init=function(e,t,o){if(this.__loaded=!0,this.config={},this._triggered_notifs=[],this.set_config((0,i._extend)({},M(),t,{name:o,token:e,callback_fn:(o===P?o:P+"."+o)+"._jsc"})),this._jsc=function(){},this._captureMetrics=new g.CaptureMetrics(this.get_config("_capture_metrics")),this._requestQueue=new d.RequestQueue(this._captureMetrics,this._handle_queued_event.bind(this)),this._retryQueue=new f.RetryQueue(this._captureMetrics,this.get_config("on_xhr_error")),this.__captureHooks=[],this.__request_queue=[],this.persistence=new n.PostHogPersistence(this.config),this.sessionManager=new y.SessionIdManager(this.config,this.persistence),this._gdpr_init(),!this.get_distinct_id()){var r=this.get_config("get_device_id")((0,i._UUID)());this.register_once({distinct_id:r,$device_id:r},"")}i.window.addEventListener&&i.window.addEventListener("unload",this._handle_unload.bind(this))},o.prototype._loaded=function(){this.featureFlags.setReloadingPaused(!0);try{this.get_config("loaded")(this)}catch(e){console.error("`loaded` function failed",e)}this._start_queue_if_opted_in(),this.get_config("capture_pageview")&&this.capture("$pageview",{},{send_instantly:!0}),this.get_config("advanced_disable_decide")||new c.Decide(this).call(),this.featureFlags.resetRequestQueue(),this.featureFlags.setReloadingPaused(!1)},o.prototype._start_queue_if_opted_in=function(){this.has_opted_out_capturing()||this.get_config("request_batching")&&this._requestQueue.poll()},o.prototype._dom_loaded=function(){var e=this;this.has_opted_out_capturing()||(0,i._eachArray)(this.__request_queue,function(t){e._send_request.apply(e,S([],x(t),!1))}),this.__request_queue=[],this._start_queue_if_opted_in()},o.prototype._prepare_callback=function(e,t){if((0,i._isUndefined)(e))return null;if($)return function(i){e(i,t)};var o=this._jsc,r=""+Math.floor(1e8*Math.random()),s=this.get_config("callback_fn")+"["+r+"]";return o[r]=function(i){delete o[r],e(i,t)},s},o.prototype._handle_unload=function(){this.get_config("request_batching")?(this.get_config("capture_pageview")&&this.capture("$pageleave"),this.get_config("_capture_metrics")&&(this._requestQueue.updateUnloadMetrics(),this.capture("$capture_metrics",this._captureMetrics.metrics)),this._requestQueue.unload(),this._retryQueue.unload()):this.get_config("capture_pageview")&&this.capture("$pageleave",null,{transport:"sendBeacon"})},o.prototype._handle_queued_event=function(e,t,i){var o=JSON.stringify(t);this.__compress_and_send_json_request(e,o,i||F,E)},o.prototype.__compress_and_send_json_request=function(e,t,i,o){var r=x((0,l.compressData)((0,l.decideCompression)(this.compression),t,i),2),s=r[0],n=r[1];this._send_request(e,s,n,o)},o.prototype._send_request=function(e,t,o,r){var s;if(A)this.__request_queue.push([e,t,o,r]);else{var n={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose:this.get_config("verbose")};o=(0,i._extend)(n,o||{}),$||(o.method="GET");var a="sendBeacon"in i.window.navigator&&"sendBeacon"===o.transport;if(e=(0,h.addParamsToURL)(e,o.urlQueryArgs||{},{ip:this.get_config("ip")}),(0,i._isObject)(t)&&this.get_config("img")){var c=i.document.createElement("img");c.src=e,i.document.body.appendChild(c)}else if(a)try{i.window.navigator.sendBeacon(e,(0,h.encodePostData)(t,I(I({},o),{sendBeacon:!0})))}catch(u){this.get_config("debug")&&console.error(u)}else if($)try{(0,h.xhr)({url:e,data:t,headers:this.get_config("xhr_headers"),options:o,captureMetrics:this._captureMetrics,callback:r,retriesPerformedSoFar:0,retryQueue:this._retryQueue,onXHRError:this.get_config("on_xhr_error")})}catch(u){console.error(u)}else{var _=i.document.createElement("script");_.type="text/javascript",_.async=!0,_.defer=!0,_.src=e;var p=i.document.getElementsByTagName("script")[0];null===(s=p.parentNode)||void 0===s||s.insertBefore(_,p)}}},o.prototype._execute_array=function(e){var t,o=this,r=[],s=[],n=[];(0,i._eachArray)(e,function(e){e&&(t=e[0],(0,i._isArray)(t)?n.push(e):"function"==typeof e?e.call(o):(0,i._isArray)(e)&&"alias"===t?r.push(e):(0,i._isArray)(e)&&-1!==t.indexOf("capture")&&"function"==typeof o[t]?n.push(e):s.push(e))});var a=function(e,t){(0,i._eachArray)(e,function(e){if((0,i._isArray)(e[0])){var o=t;(0,i._each)(e,function(e){o=o[e[0]].apply(o,e.slice(1))})}else this[e[0]].apply(this,e.slice(1))},t)};a(r,this),a(s,this),a(n,this)},o.prototype.push=function(e){this._execute_array([e])},o.prototype.capture=function(e,t,o){if(void 0===o&&(o=F),this.__loaded&&!(0,p.userOptedOut)(this,!1)){this._captureMetrics.incr("capture"),"$snapshot"===e&&this._captureMetrics.incr("snapshot");var r=(o=o||F).transport;if(r&&(o.transport=r),(0,i._isUndefined)(e)||"string"!=typeof e)console.error("No event name provided to posthog.capture");else if(!(0,i._isBlockedUA)(i.userAgent)){var s=this.persistence.remove_event_timer(e);this.persistence.update_search_keyword(i.document.referrer),this.get_config("store_google")&&this.persistence.update_campaign_params(),this.get_config("save_referrer")&&this.persistence.update_referrer_info(i.document.referrer);var n={event:e,properties:this._calculate_event_properties(e,t||{},s)};"$identify"===e&&o.$set&&(n.$set=o.$set),n=(0,i._copyAndTruncateStrings)(n,o._noTruncate?null:this.get_config("properties_string_max_length")),this.get_config("debug")&&i.logger.log("PostHog.js send",n);var a=JSON.stringify(n),c=this.get_config("api_host")+(o.endpoint||"/e/"),_=o!==F;return!this.get_config("request_batching")||_&&!o._batchKey||o.send_instantly?this.__compress_and_send_json_request(c,a,o):(n.timestamp=new Date,this._requestQueue.enqueue(c,n,o)),this._invokeCaptureHooks(e,n),n}}},o.prototype._addCaptureHook=function(e){this.__captureHooks.push(e)},o.prototype._invokeCaptureHooks=function(e,t){this.config._onCapture(e,t),(0,i._each)(this.__captureHooks,function(t){return t(e)})},o.prototype._calculate_event_properties=function(e,t,o){var r=I({},t);if(r.token=this.get_config("token"),"$snapshot"===e){var s=this.persistence.properties();return r.distinct_id=s.distinct_id,r}if(void 0!==o){var n=(new Date).getTime()-o;r.$duration=parseFloat((n/1e3).toFixed(3))}if(this.sessionManager){var a=this.sessionManager.checkAndGetSessionAndWindowId(),c=a.sessionId,_=a.windowId;r.$session_id=c,r.$window_id=_}r=(0,i._extend)({},i._info.properties(),this.persistence.properties(),r),"$pageview"===e&&this.get_config("_capture_performance")&&(r=(0,i._extend)(r,(0,v.getPerformanceData)()));var p=this.get_config("property_blacklist");(0,i._isArray)(p)?(0,i._each)(p,function(e){delete r[e]}):console.error("Invalid value for property_blacklist config: "+p);var u=this.get_config("sanitize_properties");return u&&(r=u(r,e)),r},o.prototype.register=function(e,t){this.persistence.register(e,t)},o.prototype.register_once=function(e,t,i){this.persistence.register_once(e,t,i)},o.prototype.unregister=function(e){this.persistence.unregister(e)},o.prototype._register_single=function(e,t){var i;this.register(((i={})[e]=t,i))},o.prototype.getFeatureFlag=function(e,t){return this.featureFlags.getFeatureFlag(e,t)},o.prototype.isFeatureEnabled=function(e,t){return this.featureFlags.isFeatureEnabled(e,t)},o.prototype.reloadFeatureFlags=function(){this.featureFlags.reloadFeatureFlags()},o.prototype.onFeatureFlags=function(e){return this.featureFlags.onFeatureFlags(e)},o.prototype.identify=function(e,t,i){if(e){this._captureMetrics.incr("identify");var o=this.get_distinct_id();if(this.register({$user_id:e}),!this.get_property("$device_id")){var r=o;this.register_once({$had_persisted_distinct_id:!0,$device_id:r},"")}e!==o&&e!==this.get_property(n.ALIAS_ID_KEY)&&(this.unregister(n.ALIAS_ID_KEY),this.register({distinct_id:e})),e===o||this.get_property("$device_id")&&o!==this.get_property("$device_id")?(t&&this.people.set(t),i&&this.people.set_once(i)):(this.capture("$identify",{distinct_id:e,$anon_distinct_id:o},{$set:t||{},$set_once:i||{}}),this.featureFlags.setAnonymousDistinctId(o)),e!==o&&this.reloadFeatureFlags()}else console.error("Unique user id has not been set in posthog.identify")},o.prototype.group=function(e,t,i){var o;if(e&&t){this._captureMetrics.incr("group");var r=this.getGroups();this.register({$groups:I(I({},r),(o={},o[e]=t,o))}),i&&this.capture("$groupidentify",{$group_type:e,$group_key:t,$group_set:i}),r[e]!==t&&this.reloadFeatureFlags()}else console.error("posthog.group requires a group type and group key")},o.prototype.reset=function(e){var t=this.get_property("$device_id");this.persistence.clear();var o=this.get_config("get_device_id")((0,i._UUID)());this.register_once({distinct_id:o,$device_id:e?o:t},"")},o.prototype.get_distinct_id=function(){return this.get_property("distinct_id")},o.prototype.getGroups=function(){return this.get_property("$groups")||{}},o.prototype.alias=function(e,t){return e===this.get_property(n.PEOPLE_DISTINCT_ID_KEY)?(i.logger.critical("Attempting to create alias for existing People user - aborting."),-2):((0,i._isUndefined)(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(n.ALIAS_ID_KEY,e),this.capture("$create_alias",{alias:e,distinct_id:t})):(console.error("alias matches current distinct_id - skipping api call."),this.identify(e),-1))},o.prototype.set_config=function(e){var o=I({},this.config);(0,i._isObject)(e)&&((0,i._extend)(this.config,e),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),u.localStore.is_supported()&&"true"===u.localStore.get("ph_debug")&&(this.config.debug=!0),this.get_config("debug")&&(t.default.DEBUG=!0),this.sessionRecording&&void 0!==e.disable_session_recording&&o.disable_session_recording!==e.disable_session_recording&&(e.disable_session_recording?this.sessionRecording.stopRecording():this.sessionRecording.startRecordingIfEnabled()))},o.prototype.startSessionRecording=function(){this.set_config({disable_session_recording:!1})},o.prototype.stopSessionRecording=function(){this.set_config({disable_session_recording:!0})},o.prototype.sessionRecordingStarted=function(){var e;return!!(null===(e=this.sessionRecording)||void 0===e?void 0:e.started())},o.prototype.get_config=function(e){var t;return null===(t=this.config)||void 0===t?void 0:t[e]},o.prototype.get_property=function(e){return this.persistence.props[e]},o.prototype.toString=function(){var e,t=null!==(e=this.get_config("name"))&&void 0!==e?e:P;return t!==P&&(t=P+"."+t),t},o.prototype._gdpr_init=function(){"localStorage"===this.get_config("opt_out_capturing_persistence_type")&&u.localStore.is_supported()&&(!this.has_opted_in_capturing()&&this.has_opted_in_capturing({persistence_type:"cookie"})&&this.opt_in_capturing({enable_persistence:!1}),!this.has_opted_out_capturing()&&this.has_opted_out_capturing({persistence_type:"cookie"})&&this.opt_out_capturing({clear_persistence:!1}),this.clear_opt_in_out_capturing({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_capturing()?this._gdpr_update_persistence({clear_persistence:!0}):this.has_opted_in_capturing()||!this.get_config("opt_out_capturing_by_default")&&!u.cookieStore.get("ph_optout")||(u.cookieStore.remove("ph_optout"),this.opt_out_capturing({clear_persistence:this.get_config("opt_out_persistence_by_default")}))},o.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else{if(!e||!e.enable_persistence)return;t=!1}this.get_config("disable_persistence")||this.persistence.disabled===t||this.persistence.set_disabled(t)},o.prototype._gdpr_call_func=function(e,t){return t=(0,i._extend)({capture:this.capture.bind(this),persistence_type:this.get_config("opt_out_capturing_persistence_type"),cookie_prefix:this.get_config("opt_out_capturing_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),secure_cookie:this.get_config("secure_cookie")},t||{}),u.localStore.is_supported()||"localStorage"!==t.persistence_type||(t.persistence_type="cookie"),e(this.get_config("token"),{capture:t.capture,captureEventName:t.capture_event_name,captureProperties:t.capture_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieExpiration:t.cookie_expiration,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie})},o.prototype.opt_in_capturing=function(e){e=(0,i._extend)({enable_persistence:!0},e||{}),this._gdpr_call_func(p.optIn,e),this._gdpr_update_persistence(e)},o.prototype.opt_out_capturing=function(e){var t=(0,i._extend)({clear_persistence:!0},e||{});this._gdpr_call_func(p.optOut,t),this._gdpr_update_persistence(t)},o.prototype.has_opted_in_capturing=function(e){return this._gdpr_call_func(p.hasOptedIn,e)},o.prototype.has_opted_out_capturing=function(e){return this._gdpr_call_func(p.hasOptedOut,e)},o.prototype.clear_opt_in_out_capturing=function(e){var t=(0,i._extend)({enable_persistence:!0},null!=e?e:{});this._gdpr_call_func(p.clearOptInOut,t),this._gdpr_update_persistence(t)},o.prototype.debug=function(e){e?(i.window.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),localStorage&&localStorage.setItem("ph_debug","true"),this.set_config({debug:!0})):(i.window.console.log("You've disabled debug mode."),localStorage&&localStorage.removeItem("ph_debug"),this.set_config({debug:!1}))},o.prototype.decodeLZ64=function(t){return e.LZString.decompressFromBase64(t||null)},o}();exports.PostHog=T,(0,i._safewrap_class)(T,["identify"]);var D={},R=function(){(0,i._each)(D,function(e,t){t!==P&&(q[t]=e)})},H=function(){q.init=function(e,t,o){if(o)return q[o]||(q[o]=D[o]=O(e||"",t||{},o),q[o]._loaded()),q[o];var r=q;return D[P]?r=D[P]:e&&((r=O(e,t||{},P))._loaded(),D[P]=r),q=r,w===k.INIT_SNIPPET&&(i.window[P]=q),R(),r}},N=function(){function e(){e.done||(e.done=!0,A=!1,(0,i._each)(D,function(e){e._dom_loaded()}))}i.document.addEventListener&&("complete"===i.document.readyState?e():i.document.addEventListener("DOMContentLoaded",e,!1)),(0,i._register_event)(i.window,"load",e,!0)};function U(){w=k.INIT_SNIPPET,(0,i._isUndefined)(i.window.posthog)&&(i.window.posthog={}),(q=i.window.posthog).__loaded||q.config&&q.persistence?console.error("PostHog library has already been downloaded at least once."):((0,i._each)(q._i,function(e){e&&(0,i._isArray)(e)&&(D[e[2]]=O.apply(void 0,S([],x(e),!1)))}),H(),q.init(),(0,i._each)(D,function(e){e._loaded()}),N())}function L(){return w=k.INIT_MODULE,q=new T,H(),q.init(),N(),q}
|
|
57
|
+
},{"./lz-string":"iwXh","./config":"C9JJ","./utils":"UnXq","./autocapture":"+QN3","./posthog-people":"GxDb","./posthog-featureflags":"rr+t","./posthog-persistence":"8kGX","./extensions/sessionrecording":"3pq5","./decide":"UrLq","./extensions/toolbar":"1RJB","./gdpr-utils":"LECo","./storage":"1GYW","./request-queue":"YL63","./capture-metrics":"K3eQ","./compression":"/wh9","./send-request":"9tuT","./retry-queue":"8mr1","./sessionid":"Rb1F","./apm":"Z1nr","./extensions/sentry-integration":"ivfD"}],"SSOK":[function(require,module,exports) {
|
|
56
58
|
"use strict";var r=require("./posthog-core");(0,r.init_from_snippet)();
|
|
57
|
-
},{"./posthog-core":"
|
|
59
|
+
},{"./posthog-core":"fQdl"}]},{},["SSOK"], null)
|
|
60
|
+
//# sourceMappingURL=/static/array.js.map
|