@elliemae/pui-logrocket 1.1.31 → 1.1.32

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.
Files changed (28) hide show
  1. package/build/docs/404.html +2 -2
  2. package/build/docs/api/functions/buildLogRocketQueryParams/index.html +2 -2
  3. package/build/docs/api/functions/hasUserConsentedToSessionRecording/index.html +2 -2
  4. package/build/docs/api/functions/initLogRocket/index.html +2 -2
  5. package/build/docs/api/index.html +2 -2
  6. package/build/docs/api/type-aliases/LROptions/index.html +2 -2
  7. package/build/docs/assets/js/e376fc56.a06c4dde.js +1 -0
  8. package/build/docs/assets/js/{main.d9838ecf.js → main.b96527ee.js} +2 -2
  9. package/build/docs/assets/js/{runtime~main.16dcbf24.js → runtime~main.614dfeb2.js} +1 -1
  10. package/build/docs/compliance/index.html +2 -2
  11. package/build/docs/index.html +2 -2
  12. package/build/docs/usage-guide/index.html +2 -2
  13. package/dist/cjs/logrocket.js +1 -1
  14. package/dist/esm/logrocket.js +1 -1
  15. package/dist/public/index.html +1 -1
  16. package/dist/public/js/{emuiLogrocket.436f95cb9c84877fed75.js → emuiLogrocket.b46444885454ab900d88.js} +2 -2
  17. package/dist/public/js/emuiLogrocket.b46444885454ab900d88.js.br +0 -0
  18. package/dist/public/js/{emuiLogrocket.436f95cb9c84877fed75.js.gz → emuiLogrocket.b46444885454ab900d88.js.gz} +0 -0
  19. package/dist/public/js/{emuiLogrocket.436f95cb9c84877fed75.js.map → emuiLogrocket.b46444885454ab900d88.js.map} +1 -1
  20. package/dist/types/tsconfig.tsbuildinfo +1 -1
  21. package/dist/umd/index.js +1 -1
  22. package/dist/umd/index.js.br +0 -0
  23. package/dist/umd/index.js.gz +0 -0
  24. package/dist/umd/index.js.map +1 -1
  25. package/package.json +1 -1
  26. package/build/docs/assets/js/e376fc56.8f124f07.js +0 -1
  27. package/dist/public/js/emuiLogrocket.436f95cb9c84877fed75.js.br +0 -0
  28. /package/build/docs/assets/js/{main.d9838ecf.js.LICENSE.txt → main.b96527ee.js.LICENSE.txt} +0 -0
package/dist/umd/index.js CHANGED
@@ -40,6 +40,6 @@ Error generating stack: `+i.message+`
40
40
  *
41
41
  * This source code is licensed under the MIT license found in the
42
42
  * LICENSE file in the root directory of this source tree.
43
- */function he(w,k){var Z=w.length;w.push(k);e:for(;0<Z;){var ue=Z-1>>>1,c=w[ue];if(0<a(c,k))w[ue]=k,w[Z]=c,Z=ue;else break e}}function ye(w){return w.length===0?null:w[0]}function we(w){if(w.length===0)return null;var k=w[0],Z=w.pop();if(Z!==k){w[0]=Z;e:for(var ue=0,c=w.length,X=c>>>1;ue<X;){var fe=2*(ue+1)-1,de=w[fe],ee=fe+1,ie=w[ee];if(0>a(de,Z))ee<c&&0>a(ie,de)?(w[ue]=ie,w[ee]=Z,ue=ee):(w[ue]=de,w[fe]=Z,ue=fe);else if(ee<c&&0>a(ie,Z))w[ue]=ie,w[ee]=Z,ue=ee;else break e}}return k}function a(w,k){var Z=w.sortIndex-k.sortIndex;return Z!==0?Z:w.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var S=performance;b.unstable_now=function(){return S.now()}}else{var d=Date,_=d.now();b.unstable_now=function(){return d.now()-_}}var L=[],P=[],x=1,A=null,U=3,T=!1,F=!1,R=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,s=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(w){for(var k=ye(P);k!==null;){if(k.callback===null)we(P);else if(k.startTime<=w)we(P),k.sortIndex=k.expirationTime,he(L,k);else break;k=ye(P)}}function H(w){if(R=!1,C(w),!F)if(ye(L)!==null)F=!0,te(I);else{var k=ye(P);k!==null&&ne(H,k.startTime-w)}}function I(w,k){F=!1,R&&(R=!1,m(v),v=-1),T=!0;var Z=U;try{for(C(k),A=ye(L);A!==null&&(!(A.expirationTime>k)||w&&!z());){var ue=A.callback;if(typeof ue=="function"){A.callback=null,U=A.priorityLevel;var c=ue(A.expirationTime<=k);k=b.unstable_now(),typeof c=="function"?A.callback=c:A===ye(L)&&we(L),C(k)}else we(L);A=ye(L)}if(A!==null)var X=!0;else{var fe=ye(P);fe!==null&&ne(H,fe.startTime-k),X=!1}return X}finally{A=null,U=Z,T=!1}}var M=!1,D=null,v=-1,g=5,N=-1;function z(){return!(b.unstable_now()-N<g)}function W(){if(D!==null){var w=b.unstable_now();N=w;var k=!0;try{k=D(!0,w)}finally{k?B():(M=!1,D=null)}}else M=!1}var B;if(typeof s=="function")B=function(){s(W)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,J=$.port2;$.port1.onmessage=W,B=function(){J.postMessage(null)}}else B=function(){y(W,0)};function te(w){D=w,M||(M=!0,B())}function ne(w,k){v=y(function(){w(b.unstable_now())},k)}b.unstable_IdlePriority=5,b.unstable_ImmediatePriority=1,b.unstable_LowPriority=4,b.unstable_NormalPriority=3,b.unstable_Profiling=null,b.unstable_UserBlockingPriority=2,b.unstable_cancelCallback=function(w){w.callback=null},b.unstable_continueExecution=function(){F||T||(F=!0,te(I))},b.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):g=0<w?Math.floor(1e3/w):5},b.unstable_getCurrentPriorityLevel=function(){return U},b.unstable_getFirstCallbackNode=function(){return ye(L)},b.unstable_next=function(w){switch(U){case 1:case 2:case 3:var k=3;break;default:k=U}var Z=U;U=k;try{return w()}finally{U=Z}},b.unstable_pauseExecution=function(){},b.unstable_requestPaint=function(){},b.unstable_runWithPriority=function(w,k){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var Z=U;U=w;try{return k()}finally{U=Z}},b.unstable_scheduleCallback=function(w,k,Z){var ue=b.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ue+Z:ue):Z=ue,w){case 1:var c=-1;break;case 2:c=250;break;case 5:c=1073741823;break;case 4:c=1e4;break;default:c=5e3}return c=Z+c,w={id:x++,callback:k,priorityLevel:w,startTime:Z,expirationTime:c,sortIndex:-1},Z>ue?(w.sortIndex=Z,he(P,w),ye(L)===null&&w===ye(P)&&(R?(m(v),v=-1):R=!0,ne(H,Z-ue))):(w.sortIndex=c,he(L,w),F||T||(F=!0,te(I))),w},b.unstable_shouldYield=z,b.unstable_wrapCallback=function(w){var k=U;return function(){var Z=U;U=k;try{return w.apply(this,arguments)}finally{U=Z}}}},755(_e,b,he){"use strict";var ye;ye={value:!0},b.A=d;var we=he(143);let a;const S=we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;S&&S.Events&&S.Events[0]&&(a=S.Events[0]);function d(){const _=L=>{try{const x=a(L.target),A=[];let U=x;for(;U;){var P=typeof U.elementType=="function"&&U.elementType.displayName;P&&A.push(P),U=U.return}L.__lrName=A}catch{console.error("logrocket-react caught an error while hooking into React. Please make sure you are using the correct version of logrocket-react for your version of react-dom.")}};document.body.addEventListener("click",_,{capture:!0,passive:!0})}},758(_e,b,he){"use strict";_e.exports=he(713)},896(_e,b,he){"use strict";_e.exports=he(733)}},zr={};function Fe(_e){var b=zr[_e];if(b!==void 0)return b.exports;var he=zr[_e]={exports:{}};return Ml[_e].call(he.exports,he,he.exports,Fe),he.exports}Fe.n=_e=>{var b=_e&&_e.__esModule?()=>_e.default:()=>_e;return Fe.d(b,{a:b}),b},Fe.d=(_e,b)=>{for(var he in b)Fe.o(b,he)&&!Fe.o(_e,he)&&Object.defineProperty(_e,he,{enumerable:!0,get:b[he]})},Fe.o=(_e,b)=>Object.prototype.hasOwnProperty.call(_e,b),Fe.r=_e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_e,"__esModule",{value:!0})};var Xo={};return(()=>{"use strict";Fe.r(Xo),Fe.d(Xo,{buildLogRocketQueryParams:()=>M,hasUserConsentedToSessionRecording:()=>H,initLogRocket:()=>g});var _e=Fe(5),b=Fe.n(_e),he=Fe(755);const ye=N=>N!==null&&typeof N=="object"&&!Array.isArray(N),we=(N,z)=>{const W={...N};return ye(N)&&ye(z)&&Object.keys(z).forEach(B=>{const $=z[B],J=W[B];ye($)&&ye(J)?W[B]=we(J,$):W[B]=$}),W},a=he.A.default||he.A,S=b().default||b();window.emui=window.emui||{},window.emui.isLogRocketInitialized=window.emui.isLogRocketInitialized??!1;let d=window.emui.cdnDomain??null,_=!1,L=null;if(typeof document<"u"&&document.currentScript&&(L=document.currentScript.src),!L)try{L=typeof import.meta<"u"?import.meta.url:null}catch{}if(L&&/(cdn\.mortgagetech\..*\.ice\.com|\/\/localhost[\d:/])/.test(L))try{const N=new URL(L);d=N.hostname==="localhost"?"https://cdn.mortgagetech.d1.ice.com":N.origin}catch{d=null}d&&(_=!0,window._lrAsyncScript=`${d}/logrocket/logger-1.min.js`);const P=window.emui.logRocket||S({..._&&d?{ingestServer:d}:{}});let x=null;const A=()=>window.emui?.logger??console,U=()=>{let N=null;try{N=window.parent.location.origin}catch{try{N=new URL(document.referrer).origin}catch{}}return N===window.location.origin?null:N},T=N=>{if(!N||N.length===0)return null;const z=N.filter(W=>W!==window.location.origin);return z.length>0?z:null},F=[".ice.com",".elliemae.com",".encompassloconnect.com",".ellielabs.com",".elliemae.io",".intcx.net"],R=()=>{let N;try{N=window.top?.location?.hostname??window.location.hostname}catch{N=window.location.hostname}const z=N.split(".");if(z.length<2)return null;const W=`.${z.slice(-2).join(".")}`;return F.includes(W)?W:null},y=()=>{const N=T(window.emui?.logRocketConfig?.childDomains),z=window.emui?.logRocketConfig?.parentDomain??U();return{browser:{urlSanitizer:W=>{let B=W;return B=B.replace(/([?&])code=([^&]*)/g,"$1code=REDACTED"),B}},dom:{hiddenAttributes:["aria-label","aria-labelledby","aria-describedby","aria-details","aria-errormessage","aria-valuetext","aria-placeholder"],inputSanitizer:"lipsum",isEnabled:!1,textSanitizer:!0},mergeIframes:!0,network:{requestSanitizer:W=>{const B=Object.keys(W.headers).reduce(($,J)=>($[J]=/^authorization$/i.test(J)?"**redacted**":W.headers[J]??"",$),{});return{...W,headers:B,body:null}},responseSanitizer:W=>W.headers["x-secret"]?null:{...W,body:null}},release:"MISSING_ENV_VAR".APP_VERSION,rootHostname:window.emui?.logRocketConfig?.rootHostname??R()??void 0,...N&&N.length>0?{childDomains:N}:{},...z?{parentDomain:z}:{}}},m=()=>window.OnetrustActiveGroups?.split(",").map(N=>N.trim()).filter(Boolean)??[],s=()=>window.OnetrustActiveGroups?m().includes("C0002"):!0,C=()=>{if(!s())return!0;window.location.hostname;const N=new URLSearchParams(window.location.search);return window.emui?.logRocketConfig?.enable===!1||N.get("lrEnabled")==="false"},H=()=>{if(typeof window.emui?.dangerouslyOverrideSessionRecordingConsent=="boolean")return A().warn("Using dangerouslyOverrideSessionRecordingConsent - this should only be used for testing purposes"),window.emui.dangerouslyOverrideSessionRecordingConsent;if(window.OnetrustActiveGroups)return m().includes("C0003");if(new URLSearchParams(window.location.search).get("analyticsConsent")==="true")return!0;if(window.frameElement)try{if(new URL(window.frameElement.src).searchParams.get("analyticsConsent")==="true")return!0}catch{}return!1},I=N=>{const W=new URLSearchParams(window.location.search).get("lrAppId"),B=window.emui?.logRocketConfig?.appId;return W||N||B||null},M=()=>{const N=new URLSearchParams,z=window.emui?.lrSessionRecordingConsent??H(),W=window.emui?.lrEnabled??!C();return N.append("analyticsConsent",z?"true":"false"),N.append("lrEnabled",W?"true":"false"),N.append("lrAppId",I()??""),N.toString()},D=N=>{const{appId:z,isReact:W=!0,...B}=N??{};if(x=I(z),!x)throw new Error("LogRocket appId is required to initialize LogRocket. Either pass it as parameter or set window.emui.logRocketConfig.appId");if(C()){window.emui.isLogRocketInitialized=!1,window.emui.lrEnabled=!1,A().info("LogRocket is disabled in this environment");return}window.emui.lrEnabled=!0;const $=y(),J=H();window.emui.lrSessionRecordingConsent=J,$.dom&&($.dom.isEnabled=J);const te=we($,B);P.init(x,te),W&&a(P),A().info(`LogRocket initialized ${te.dom?.isEnabled?"with":"without"} session recording`)},v=()=>{const N=document.cookie.match(/(^|;\s*)OptanonAlertBoxClosed=([^;]+)/);if(!N)return!1;try{return!!decodeURIComponent(N[2])}catch{return!1}},g=N=>{if(!window.emui.isLogRocketInitialized){if(!I(N?.appId))throw new Error("LogRocket appId is required to initialize LogRocket. Either pass it as parameter or set window.emui.logRocketConfig.appId");if(window.emui.isLogRocketInitialized=!0,window.hasOneTrust){let z=!1;const W=()=>{if(!z){z=!0;try{D(N)}catch($){window.emui.isLogRocketInitialized=!1,A().error({message:"LogRocket initialization failed",exception:$})}}},B=$=>{window.addEventListener($,W,{once:!0}),setTimeout(()=>{z||(A().warn(`OneTrust event '${$}' not received within 10s, initializing LogRocket with current consent state`),W())},1e4)};v()?B("OneTrustGroupsUpdated"):m().includes("C0002")?W():B("OTConsentApplied")}else setTimeout(()=>{try{D(N)}catch(z){window.emui.isLogRocketInitialized=!1,A().error({message:"LogRocket initialization failed",exception:z})}},0)}};window.emui.logRocket=window.emui.logRocket??P})(),Xo})());
43
+ */function he(w,k){var Z=w.length;w.push(k);e:for(;0<Z;){var ue=Z-1>>>1,c=w[ue];if(0<a(c,k))w[ue]=k,w[Z]=c,Z=ue;else break e}}function ye(w){return w.length===0?null:w[0]}function we(w){if(w.length===0)return null;var k=w[0],Z=w.pop();if(Z!==k){w[0]=Z;e:for(var ue=0,c=w.length,X=c>>>1;ue<X;){var fe=2*(ue+1)-1,de=w[fe],ee=fe+1,ie=w[ee];if(0>a(de,Z))ee<c&&0>a(ie,de)?(w[ue]=ie,w[ee]=Z,ue=ee):(w[ue]=de,w[fe]=Z,ue=fe);else if(ee<c&&0>a(ie,Z))w[ue]=ie,w[ee]=Z,ue=ee;else break e}}return k}function a(w,k){var Z=w.sortIndex-k.sortIndex;return Z!==0?Z:w.id-k.id}if(typeof performance=="object"&&typeof performance.now=="function"){var S=performance;b.unstable_now=function(){return S.now()}}else{var d=Date,_=d.now();b.unstable_now=function(){return d.now()-_}}var L=[],P=[],x=1,A=null,U=3,T=!1,F=!1,R=!1,y=typeof setTimeout=="function"?setTimeout:null,m=typeof clearTimeout=="function"?clearTimeout:null,s=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(w){for(var k=ye(P);k!==null;){if(k.callback===null)we(P);else if(k.startTime<=w)we(P),k.sortIndex=k.expirationTime,he(L,k);else break;k=ye(P)}}function H(w){if(R=!1,C(w),!F)if(ye(L)!==null)F=!0,te(I);else{var k=ye(P);k!==null&&ne(H,k.startTime-w)}}function I(w,k){F=!1,R&&(R=!1,m(v),v=-1),T=!0;var Z=U;try{for(C(k),A=ye(L);A!==null&&(!(A.expirationTime>k)||w&&!z());){var ue=A.callback;if(typeof ue=="function"){A.callback=null,U=A.priorityLevel;var c=ue(A.expirationTime<=k);k=b.unstable_now(),typeof c=="function"?A.callback=c:A===ye(L)&&we(L),C(k)}else we(L);A=ye(L)}if(A!==null)var X=!0;else{var fe=ye(P);fe!==null&&ne(H,fe.startTime-k),X=!1}return X}finally{A=null,U=Z,T=!1}}var M=!1,D=null,v=-1,g=5,N=-1;function z(){return!(b.unstable_now()-N<g)}function W(){if(D!==null){var w=b.unstable_now();N=w;var k=!0;try{k=D(!0,w)}finally{k?B():(M=!1,D=null)}}else M=!1}var B;if(typeof s=="function")B=function(){s(W)};else if(typeof MessageChannel<"u"){var $=new MessageChannel,J=$.port2;$.port1.onmessage=W,B=function(){J.postMessage(null)}}else B=function(){y(W,0)};function te(w){D=w,M||(M=!0,B())}function ne(w,k){v=y(function(){w(b.unstable_now())},k)}b.unstable_IdlePriority=5,b.unstable_ImmediatePriority=1,b.unstable_LowPriority=4,b.unstable_NormalPriority=3,b.unstable_Profiling=null,b.unstable_UserBlockingPriority=2,b.unstable_cancelCallback=function(w){w.callback=null},b.unstable_continueExecution=function(){F||T||(F=!0,te(I))},b.unstable_forceFrameRate=function(w){0>w||125<w?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):g=0<w?Math.floor(1e3/w):5},b.unstable_getCurrentPriorityLevel=function(){return U},b.unstable_getFirstCallbackNode=function(){return ye(L)},b.unstable_next=function(w){switch(U){case 1:case 2:case 3:var k=3;break;default:k=U}var Z=U;U=k;try{return w()}finally{U=Z}},b.unstable_pauseExecution=function(){},b.unstable_requestPaint=function(){},b.unstable_runWithPriority=function(w,k){switch(w){case 1:case 2:case 3:case 4:case 5:break;default:w=3}var Z=U;U=w;try{return k()}finally{U=Z}},b.unstable_scheduleCallback=function(w,k,Z){var ue=b.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?ue+Z:ue):Z=ue,w){case 1:var c=-1;break;case 2:c=250;break;case 5:c=1073741823;break;case 4:c=1e4;break;default:c=5e3}return c=Z+c,w={id:x++,callback:k,priorityLevel:w,startTime:Z,expirationTime:c,sortIndex:-1},Z>ue?(w.sortIndex=Z,he(P,w),ye(L)===null&&w===ye(P)&&(R?(m(v),v=-1):R=!0,ne(H,Z-ue))):(w.sortIndex=c,he(L,w),F||T||(F=!0,te(I))),w},b.unstable_shouldYield=z,b.unstable_wrapCallback=function(w){var k=U;return function(){var Z=U;U=k;try{return w.apply(this,arguments)}finally{U=Z}}}},755(_e,b,he){"use strict";var ye;ye={value:!0},b.A=d;var we=he(143);let a;const S=we.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;S&&S.Events&&S.Events[0]&&(a=S.Events[0]);function d(){const _=L=>{try{const x=a(L.target),A=[];let U=x;for(;U;){var P=typeof U.elementType=="function"&&U.elementType.displayName;P&&A.push(P),U=U.return}L.__lrName=A}catch{console.error("logrocket-react caught an error while hooking into React. Please make sure you are using the correct version of logrocket-react for your version of react-dom.")}};document.body.addEventListener("click",_,{capture:!0,passive:!0})}},758(_e,b,he){"use strict";_e.exports=he(713)},896(_e,b,he){"use strict";_e.exports=he(733)}},zr={};function Fe(_e){var b=zr[_e];if(b!==void 0)return b.exports;var he=zr[_e]={exports:{}};return Ml[_e].call(he.exports,he,he.exports,Fe),he.exports}Fe.n=_e=>{var b=_e&&_e.__esModule?()=>_e.default:()=>_e;return Fe.d(b,{a:b}),b},Fe.d=(_e,b)=>{for(var he in b)Fe.o(b,he)&&!Fe.o(_e,he)&&Object.defineProperty(_e,he,{enumerable:!0,get:b[he]})},Fe.o=(_e,b)=>Object.prototype.hasOwnProperty.call(_e,b),Fe.r=_e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(_e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(_e,"__esModule",{value:!0})};var Xo={};return(()=>{"use strict";Fe.r(Xo),Fe.d(Xo,{buildLogRocketQueryParams:()=>M,hasUserConsentedToSessionRecording:()=>H,initLogRocket:()=>g});var _e=Fe(5),b=Fe.n(_e),he=Fe(755);const ye=N=>N!==null&&typeof N=="object"&&!Array.isArray(N),we=(N,z)=>{const W={...N};return ye(N)&&ye(z)&&Object.keys(z).forEach(B=>{const $=z[B],J=W[B];ye($)&&ye(J)?W[B]=we(J,$):W[B]=$}),W},a=he.A.default||he.A,S=b().default||b();window.emui=window.emui||{},window.emui.isLogRocketInitialized=window.emui.isLogRocketInitialized??!1;let d=window.emui.cdnDomain??null,_=!1,L=null;if(typeof document<"u"&&document.currentScript&&(L=document.currentScript.src),!L)try{L=typeof import.meta<"u"?import.meta.url:null}catch{}if(L&&/(cdn\.mortgagetech\.(.*\.)?ice\.com|\/\/localhost[\d:/])/.test(L))try{const N=new URL(L);d=N.hostname==="localhost"?"https://cdn.mortgagetech.d1.ice.com":N.origin}catch{d=null}d&&(_=!0,window._lrAsyncScript=`${d}/logrocket/logger-1.min.js`);const P=window.emui.logRocket||S({..._&&d?{ingestServer:d}:{}});let x=null;const A=()=>window.emui?.logger??console,U=()=>{let N=null;try{N=window.parent.location.origin}catch{try{N=new URL(document.referrer).origin}catch{}}return N===window.location.origin?null:N},T=N=>{if(!N||N.length===0)return null;const z=N.filter(W=>W!==window.location.origin);return z.length>0?z:null},F=[".ice.com",".elliemae.com",".encompassloconnect.com",".ellielabs.com",".elliemae.io",".intcx.net"],R=()=>{let N;try{N=window.top?.location?.hostname??window.location.hostname}catch{N=window.location.hostname}const z=N.split(".");if(z.length<2)return null;const W=`.${z.slice(-2).join(".")}`;return F.includes(W)?W:null},y=()=>{const N=T(window.emui?.logRocketConfig?.childDomains),z=window.emui?.logRocketConfig?.parentDomain??U();return{browser:{urlSanitizer:W=>{let B=W;return B=B.replace(/([?&])code=([^&]*)/g,"$1code=REDACTED"),B}},dom:{hiddenAttributes:["aria-label","aria-labelledby","aria-describedby","aria-details","aria-errormessage","aria-valuetext","aria-placeholder"],inputSanitizer:"lipsum",isEnabled:!1,textSanitizer:!0},mergeIframes:!0,network:{requestSanitizer:W=>{const B=Object.keys(W.headers).reduce(($,J)=>($[J]=/^authorization$/i.test(J)?"**redacted**":W.headers[J]??"",$),{});return{...W,headers:B,body:null}},responseSanitizer:W=>W.headers["x-secret"]?null:{...W,body:null}},release:"MISSING_ENV_VAR".APP_VERSION,rootHostname:window.emui?.logRocketConfig?.rootHostname??R()??void 0,...N&&N.length>0?{childDomains:N}:{},...z?{parentDomain:z}:{}}},m=()=>window.OnetrustActiveGroups?.split(",").map(N=>N.trim()).filter(Boolean)??[],s=()=>window.OnetrustActiveGroups?m().includes("C0002"):!0,C=()=>{if(!s())return!0;window.location.hostname;const N=new URLSearchParams(window.location.search);return window.emui?.logRocketConfig?.enable===!1||N.get("lrEnabled")==="false"},H=()=>{if(typeof window.emui?.dangerouslyOverrideSessionRecordingConsent=="boolean")return A().warn("Using dangerouslyOverrideSessionRecordingConsent - this should only be used for testing purposes"),window.emui.dangerouslyOverrideSessionRecordingConsent;if(window.OnetrustActiveGroups)return m().includes("C0003");if(new URLSearchParams(window.location.search).get("analyticsConsent")==="true")return!0;if(window.frameElement)try{if(new URL(window.frameElement.src).searchParams.get("analyticsConsent")==="true")return!0}catch{}return!1},I=N=>{const W=new URLSearchParams(window.location.search).get("lrAppId"),B=window.emui?.logRocketConfig?.appId;return W||N||B||null},M=()=>{const N=new URLSearchParams,z=window.emui?.lrSessionRecordingConsent??H(),W=window.emui?.lrEnabled??!C();return N.append("analyticsConsent",z?"true":"false"),N.append("lrEnabled",W?"true":"false"),N.append("lrAppId",I()??""),N.toString()},D=N=>{const{appId:z,isReact:W=!0,...B}=N??{};if(x=I(z),!x)throw new Error("LogRocket appId is required to initialize LogRocket. Either pass it as parameter or set window.emui.logRocketConfig.appId");if(C()){window.emui.isLogRocketInitialized=!1,window.emui.lrEnabled=!1,A().info("LogRocket is disabled in this environment");return}window.emui.lrEnabled=!0;const $=y(),J=H();window.emui.lrSessionRecordingConsent=J,$.dom&&($.dom.isEnabled=J);const te=we($,B);P.init(x,te),W&&a(P),A().info(`LogRocket initialized ${te.dom?.isEnabled?"with":"without"} session recording`)},v=()=>{const N=document.cookie.match(/(^|;\s*)OptanonAlertBoxClosed=([^;]+)/);if(!N)return!1;try{return!!decodeURIComponent(N[2])}catch{return!1}},g=N=>{if(!window.emui.isLogRocketInitialized){if(!I(N?.appId))throw new Error("LogRocket appId is required to initialize LogRocket. Either pass it as parameter or set window.emui.logRocketConfig.appId");if(window.emui.isLogRocketInitialized=!0,window.hasOneTrust){let z=!1;const W=()=>{if(!z){z=!0;try{D(N)}catch($){window.emui.isLogRocketInitialized=!1,A().error({message:"LogRocket initialization failed",exception:$})}}},B=$=>{window.addEventListener($,W,{once:!0}),setTimeout(()=>{z||(A().warn(`OneTrust event '${$}' not received within 10s, initializing LogRocket with current consent state`),W())},1e4)};v()?B("OneTrustGroupsUpdated"):m().includes("C0002")?W():B("OTConsentApplied")}else setTimeout(()=>{try{D(N)}catch(z){window.emui.isLogRocketInitialized=!1,A().error({message:"LogRocket initialization failed",exception:z})}},0)}};window.emui.logRocket=window.emui.logRocket??P})(),Xo})());
44
44
 
45
45
  //# sourceMappingURL=index.js.map
Binary file
Binary file