@elliemae/pui-logrocket 1.2.3 → 1.2.4
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/build/docs/404.html +2 -2
- package/build/docs/api/functions/buildLogRocketQueryParams/index.html +2 -2
- package/build/docs/api/functions/hasUserConsentedToSessionRecording/index.html +3 -3
- package/build/docs/api/functions/initLogRocket/index.html +2 -2
- package/build/docs/api/index.html +2 -2
- package/build/docs/api/type-aliases/LROptions/index.html +2 -2
- package/build/docs/assets/js/04ee7372.c7af6b05.js +1 -0
- package/build/docs/assets/js/211c08f1.c26e72ea.js +1 -0
- package/build/docs/assets/js/e376fc56.0c9034e0.js +1 -0
- package/build/docs/assets/js/{main.7d3be447.js → main.33883ccf.js} +2 -2
- package/build/docs/assets/js/{runtime~main.5e481bc4.js → runtime~main.4402f01c.js} +1 -1
- package/build/docs/compliance/index.html +6 -6
- package/build/docs/index.html +2 -2
- package/build/docs/usage-guide/index.html +36 -106
- package/dist/cjs/logrocket.js +2 -2
- package/dist/esm/logrocket.js +2 -2
- package/dist/public/index.html +1 -1
- package/dist/public/js/{emuiLogrocket.32efbf89608d7f1ff787.js → emuiLogrocket.b05aab66ef02cf198fdf.js} +2 -2
- package/dist/public/js/emuiLogrocket.b05aab66ef02cf198fdf.js.br +0 -0
- package/dist/public/js/{emuiLogrocket.32efbf89608d7f1ff787.js.gz → emuiLogrocket.b05aab66ef02cf198fdf.js.gz} +0 -0
- package/dist/public/js/emuiLogrocket.b05aab66ef02cf198fdf.js.map +1 -0
- package/dist/types/lib/logrocket.d.ts +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/dist/umd/index.js +1 -1
- package/dist/umd/index.js.br +0 -0
- package/dist/umd/index.js.gz +0 -0
- package/dist/umd/index.js.map +1 -1
- package/package.json +1 -1
- package/build/docs/assets/js/04ee7372.91effd96.js +0 -1
- package/build/docs/assets/js/211c08f1.f5d0523b.js +0 -1
- package/build/docs/assets/js/e376fc56.609d201b.js +0 -1
- package/dist/public/js/emuiLogrocket.32efbf89608d7f1ff787.js.br +0 -0
- package/dist/public/js/emuiLogrocket.32efbf89608d7f1ff787.js.map +0 -1
- /package/build/docs/assets/js/{main.7d3be447.js.LICENSE.txt → main.33883ccf.js.LICENSE.txt} +0 -0
|
@@ -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(p,m){var V=p.length;p.push(m);e:for(;0<V;){var ne=V-1>>>1,s=p[ne];if(0<a(s,m))p[ne]=m,p[V]=s,V=ne;else break e}}function ye(p){return p.length===0?null:p[0]}function we(p){if(p.length===0)return null;var m=p[0],V=p.pop();if(V!==m){p[0]=V;e:for(var ne=0,s=p.length,$=s>>>1;ne<$;){var fe=2*(ne+1)-1,de=p[fe],re=fe+1,le=p[re];if(0>a(de,V))re<s&&0>a(le,de)?(p[ne]=le,p[re]=V,ne=re):(p[ne]=de,p[fe]=V,ne=fe);else if(re<s&&0>a(le,V))p[ne]=le,p[re]=V,ne=re;else break e}}return m}function a(p,m){var V=p.sortIndex-m.sortIndex;return V!==0?V:p.id-m.id}if(typeof performance=="object"&&typeof performance.now=="function"){var S=performance;G.unstable_now=function(){return S.now()}}else{var f=Date,_=f.now();G.unstable_now=function(){return f.now()-_}}var x=[],P=[],D=1,N=null,A=3,C=!1,U=!1,R=!1,k=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(p){for(var m=ye(P);m!==null;){if(m.callback===null)we(P);else if(m.startTime<=p)we(P),m.sortIndex=m.expirationTime,he(x,m);else break;m=ye(P)}}function F(p){if(R=!1,T(p),!U)if(ye(x)!==null)U=!0,L(M);else{var m=ye(P);m!==null&&W(F,m.startTime-p)}}function M(p,m){U=!1,R&&(R=!1,h(g),g=-1),C=!0;var V=A;try{for(T(m),N=ye(x);N!==null&&(!(N.expirationTime>m)||p&&!B());){var ne=N.callback;if(typeof ne=="function"){N.callback=null,A=N.priorityLevel;var s=ne(N.expirationTime<=m);m=G.unstable_now(),typeof s=="function"?N.callback=s:N===ye(x)&&we(x),T(m)}else we(x);N=ye(x)}if(N!==null)var $=!0;else{var fe=ye(P);fe!==null&&W(F,fe.startTime-m),$=!1}return $}finally{N=null,A=V,C=!1}}var z=!1,I=null,g=-1,y=5,q=-1;function B(){return!(G.unstable_now()-q<y)}function ee(){if(I!==null){var p=G.unstable_now();q=p;var m=!0;try{m=I(!0,p)}finally{m?b():(z=!1,I=null)}}else z=!1}var b;if(typeof c=="function")b=function(){c(ee)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,te=Z.port2;Z.port1.onmessage=ee,b=function(){te.postMessage(null)}}else b=function(){k(ee,0)};function L(p){I=p,z||(z=!0,b())}function W(p,m){g=k(function(){p(G.unstable_now())},m)}G.unstable_IdlePriority=5,G.unstable_ImmediatePriority=1,G.unstable_LowPriority=4,G.unstable_NormalPriority=3,G.unstable_Profiling=null,G.unstable_UserBlockingPriority=2,G.unstable_cancelCallback=function(p){p.callback=null},G.unstable_continueExecution=function(){U||C||(U=!0,L(M))},G.unstable_forceFrameRate=function(p){0>p||125<p?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=0<p?Math.floor(1e3/p):5},G.unstable_getCurrentPriorityLevel=function(){return A},G.unstable_getFirstCallbackNode=function(){return ye(x)},G.unstable_next=function(p){switch(A){case 1:case 2:case 3:var m=3;break;default:m=A}var V=A;A=m;try{return p()}finally{A=V}},G.unstable_pauseExecution=function(){},G.unstable_requestPaint=function(){},G.unstable_runWithPriority=function(p,m){switch(p){case 1:case 2:case 3:case 4:case 5:break;default:p=3}var V=A;A=p;try{return m()}finally{A=V}},G.unstable_scheduleCallback=function(p,m,V){var ne=G.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ne+V:ne):V=ne,p){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=V+s,p={id:D++,callback:m,priorityLevel:p,startTime:V,expirationTime:s,sortIndex:-1},V>ne?(p.sortIndex=V,he(P,p),ye(x)===null&&p===ye(P)&&(R?(h(g),g=-1):R=!0,W(F,V-ne))):(p.sortIndex=s,he(x,p),U||C||(U=!0,L(M))),p},G.unstable_shouldYield=B,G.unstable_wrapCallback=function(p){var m=A;return function(){var V=A;A=m;try{return p.apply(this,arguments)}finally{A=V}}}},755(_e,G,he){"use strict";var ye;ye={value:!0},G.A=f;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 f(){const _=x=>{try{const D=a(x.target),N=[];let A=D;for(;A;){var P=typeof A.elementType=="function"&&A.elementType.displayName;P&&N.push(P),A=A.return}x.__lrName=N}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,G,he){"use strict";_e.exports=he(713)},896(_e,G,he){"use strict";_e.exports=he(733)}},zr={};function Fe(_e){var G=zr[_e];if(G!==void 0)return G.exports;var he=zr[_e]={exports:{}};return Ml[_e].call(he.exports,he,he.exports,Fe),he.exports}Fe.n=_e=>{var G=_e&&_e.__esModule?()=>_e.default:()=>_e;return Fe.d(G,{a:G}),G},Fe.d=(_e,G)=>{for(var he in G)Fe.o(G,he)&&!Fe.o(_e,he)&&Object.defineProperty(_e,he,{enumerable:!0,get:G[he]})},Fe.o=(_e,G)=>Object.prototype.hasOwnProperty.call(_e,G),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:()=>q,hasUserConsentedToSessionRecording:()=>g,initLogRocket:()=>te});var _e=Fe(5),G=Fe.n(_e),he=Fe(755);const ye=L=>L!==null&&typeof L=="object"&&!Array.isArray(L),we=(L,W)=>{const p={...L};return ye(L)&&ye(W)&&Object.keys(W).forEach(m=>{const V=W[m],ne=p[m];ye(V)&&ye(ne)?p[m]=we(ne,V):p[m]=V}),p},a=he.A.default||he.A,S=G().default||G();window.emui=window.emui||{},window.emui.isLogRocketInitialized=window.emui.isLogRocketInitialized??!1;let f=window.emui.cdnDomain??"https://cdn.mortgagetech.ice.com";f&&!f.startsWith("https://")&&(f=`https://${f.replace(/^http:\/\//,"")}`);let _=!1,x=null;if(typeof document<"u"&&document.currentScript&&(x=document.currentScript.src),!x)try{x=typeof import.meta<"u"?import.meta.url:null}catch{}if(x&&/(cdn\.mortgagetech\.(.*\.)?ice\.com|\/\/localhost[\d:/])/.test(x))try{const L=new URL(x);f=L.hostname==="localhost"?"https://cdn.mortgagetech.d1.ice.com":L.origin}catch{f=null}f&&(_=!0,window._lrAsyncScript=`${f}/logrocket/logger-1.min.js`);const P=window.emui.logRocket||S({..._&&f?{ingestServer:f}:{}});let D=null;const N=()=>window.emui?.logger??console,A=L=>{try{return new URL(L).origin===L}catch{return!1}},C=L=>{const W=new URLSearchParams(L).get("lrParentOrigin");return W&&A(W)?W:null},U=()=>{const L=C(window.location.search);if(L)return L;if(window.frameElement)try{const W=new URL(window.frameElement.src);return C(W.search)}catch{}return null},R=()=>{let L=U();if(!L)try{L=window.parent.location.origin}catch{try{L=new URL(document.referrer).origin}catch{}}return window===window.top&&L===window.location.origin?null:L},k=L=>{const W=window.location.origin;if(L==null)return[W];if(!Array.isArray(L))return N().warn(`LogRocket childDomains override ignored: must be an array of full origins. Falling back to [${W}].`),[W];const{valid:p,invalid:m}=L.reduce((V,ne)=>(typeof ne=="string"&&A(ne)?V.valid.push(ne):V.invalid.push(String(ne)),V),{valid:[],invalid:[]});if(m.length>0){const V=m.join(", ");N().warn(`LogRocket childDomains entries dropped (must be full origins like "https://example.com"): ${V}`)}return p.includes(W)?p:[...p,W]},h=L=>{if(L!=null){if(typeof L=="string"&&A(L))return L;const W=String(L);N().warn(`LogRocket parentDomain override "${W}" ignored: must be a full origin. Using auto-detected value.`)}return R()},c=/[^.]+\.[^.]+$/,T=L=>{const W=c.exec(window.location.hostname),p=W?`.${W[0]}`:void 0;if(typeof L=="string"&&p&&L.startsWith(".")&&L.endsWith(p))return L;if(L!=null){const m=p??"(none)";N().warn(`LogRocket rootHostname override "${String(L)}" ignored: must start with "." and end with the auto-detected "${m}". Using auto-detected value.`)}return p},F=L=>{const W=k(L.childDomains),p=h(L.parentDomain);return{browser:{urlSanitizer:m=>{let V=m;return V=V.replace(/([?&])code=([^&]*)/g,"$1code=REDACTED"),V}},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:m=>{const V=Object.keys(m.headers).reduce((ne,s)=>(ne[s]=/^authorization$/i.test(s)?"**redacted**":m.headers[s]??"",ne),{});return{...m,headers:V,body:null}},responseSanitizer:m=>m.headers["x-secret"]?null:{...m,body:null}},release:"MISSING_ENV_VAR".APP_VERSION,rootHostname:T(L.rootHostname),childDomains:W,...p?{parentDomain:p}:{}}},M=()=>window.OnetrustActiveGroups?.split(",").map(L=>L.trim()).filter(Boolean)??[],z=()=>window.OnetrustActiveGroups?M().includes("C0002"):!0,I=()=>{if(!z())return!0;window.location.hostname;const L=new URLSearchParams(window.location.search);return window.emui?.logRocketConfig?.enable===!1||L.get("lrEnabled")==="false"},g=()=>{if(typeof window.emui?.dangerouslyOverrideSessionRecordingConsent=="boolean")return N().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},y=L=>{const p=new URLSearchParams(window.location.search).get("lrAppId"),m=window.emui?.logRocketConfig?.appId;return p||L||m||null},q=()=>{const L=new URLSearchParams,W=window.emui?.lrSessionRecordingConsent??g(),p=window.emui?.lrEnabled??!I();return L.append("analyticsConsent",W?"true":"false"),L.append("lrEnabled",p?"true":"false"),L.append("lrAppId",y()??""),L.append("lrParentOrigin",window.location.origin),L.toString()},B=L=>{N().info(`LogRocket initialized ${L?"with":"without"} session recording`),P.getSessionURL(W=>{N().info(`LogRocket session URL: ${W}`)})},ee=L=>{const W=window.emui?.logRocketConfig;return{rootHostname:L.rootHostname??W?.rootHostname,childDomains:L.childDomains??W?.childDomains,parentDomain:L.parentDomain??W?.parentDomain}},b=L=>{const{appId:W,isReact:p=!0,rootHostname:m,childDomains:V,parentDomain:ne,...s}=L??{};if(D=y(W),!D)throw new Error("LogRocket appId is required to initialize LogRocket. Either pass it as parameter or set window.emui.logRocketConfig.appId");if(I()){window.emui.isLogRocketInitialized=!1,window.emui.lrEnabled=!1,N().info("LogRocket is disabled in this environment");return}window.emui.lrEnabled=!0;const $=F(ee({rootHostname:m,childDomains:V,parentDomain:ne})),fe=g();window.emui.lrSessionRecordingConsent=fe,$.dom&&($.dom.isEnabled=fe);const de=we($,s);P.init(D,de),p&&a(P),B(de.dom?.isEnabled===!0)},Z=()=>{const L=document.cookie.match(/(^|;\s*)OptanonAlertBoxClosed=([^;]+)/);if(!L)return!1;try{return!!decodeURIComponent(L[2])}catch{return!1}},te=L=>{if(!window.emui.isLogRocketInitialized){if(!y(L?.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 W=!1;const p=()=>{if(!W){W=!0;try{b(L)}catch(V){window.emui.isLogRocketInitialized=!1,N().error({message:"LogRocket initialization failed",exception:V})}}},m=V=>{window.addEventListener(V,p,{once:!0}),setTimeout(()=>{W||(N().warn(`OneTrust event '${V}' not received within 10s, initializing LogRocket with current consent state`),p())},1e4)};Z()?m("OneTrustGroupsUpdated"):M().includes("C0002")?p():m("OTConsentApplied")}else setTimeout(()=>{try{b(L)}catch(W){window.emui.isLogRocketInitialized=!1,N().error({message:"LogRocket initialization failed",exception:W})}},0)}};window.emui.logRocket=window.emui.logRocket??P})(),Xo})());
|
|
43
|
+
*/function he(p,m){var V=p.length;p.push(m);e:for(;0<V;){var ne=V-1>>>1,s=p[ne];if(0<a(s,m))p[ne]=m,p[V]=s,V=ne;else break e}}function ye(p){return p.length===0?null:p[0]}function we(p){if(p.length===0)return null;var m=p[0],V=p.pop();if(V!==m){p[0]=V;e:for(var ne=0,s=p.length,$=s>>>1;ne<$;){var fe=2*(ne+1)-1,de=p[fe],re=fe+1,le=p[re];if(0>a(de,V))re<s&&0>a(le,de)?(p[ne]=le,p[re]=V,ne=re):(p[ne]=de,p[fe]=V,ne=fe);else if(re<s&&0>a(le,V))p[ne]=le,p[re]=V,ne=re;else break e}}return m}function a(p,m){var V=p.sortIndex-m.sortIndex;return V!==0?V:p.id-m.id}if(typeof performance=="object"&&typeof performance.now=="function"){var S=performance;G.unstable_now=function(){return S.now()}}else{var f=Date,_=f.now();G.unstable_now=function(){return f.now()-_}}var x=[],P=[],D=1,N=null,A=3,C=!1,U=!1,R=!1,k=typeof setTimeout=="function"?setTimeout:null,h=typeof clearTimeout=="function"?clearTimeout:null,c=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function T(p){for(var m=ye(P);m!==null;){if(m.callback===null)we(P);else if(m.startTime<=p)we(P),m.sortIndex=m.expirationTime,he(x,m);else break;m=ye(P)}}function F(p){if(R=!1,T(p),!U)if(ye(x)!==null)U=!0,L(M);else{var m=ye(P);m!==null&&W(F,m.startTime-p)}}function M(p,m){U=!1,R&&(R=!1,h(g),g=-1),C=!0;var V=A;try{for(T(m),N=ye(x);N!==null&&(!(N.expirationTime>m)||p&&!B());){var ne=N.callback;if(typeof ne=="function"){N.callback=null,A=N.priorityLevel;var s=ne(N.expirationTime<=m);m=G.unstable_now(),typeof s=="function"?N.callback=s:N===ye(x)&&we(x),T(m)}else we(x);N=ye(x)}if(N!==null)var $=!0;else{var fe=ye(P);fe!==null&&W(F,fe.startTime-m),$=!1}return $}finally{N=null,A=V,C=!1}}var z=!1,I=null,g=-1,y=5,q=-1;function B(){return!(G.unstable_now()-q<y)}function ee(){if(I!==null){var p=G.unstable_now();q=p;var m=!0;try{m=I(!0,p)}finally{m?b():(z=!1,I=null)}}else z=!1}var b;if(typeof c=="function")b=function(){c(ee)};else if(typeof MessageChannel<"u"){var Z=new MessageChannel,te=Z.port2;Z.port1.onmessage=ee,b=function(){te.postMessage(null)}}else b=function(){k(ee,0)};function L(p){I=p,z||(z=!0,b())}function W(p,m){g=k(function(){p(G.unstable_now())},m)}G.unstable_IdlePriority=5,G.unstable_ImmediatePriority=1,G.unstable_LowPriority=4,G.unstable_NormalPriority=3,G.unstable_Profiling=null,G.unstable_UserBlockingPriority=2,G.unstable_cancelCallback=function(p){p.callback=null},G.unstable_continueExecution=function(){U||C||(U=!0,L(M))},G.unstable_forceFrameRate=function(p){0>p||125<p?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):y=0<p?Math.floor(1e3/p):5},G.unstable_getCurrentPriorityLevel=function(){return A},G.unstable_getFirstCallbackNode=function(){return ye(x)},G.unstable_next=function(p){switch(A){case 1:case 2:case 3:var m=3;break;default:m=A}var V=A;A=m;try{return p()}finally{A=V}},G.unstable_pauseExecution=function(){},G.unstable_requestPaint=function(){},G.unstable_runWithPriority=function(p,m){switch(p){case 1:case 2:case 3:case 4:case 5:break;default:p=3}var V=A;A=p;try{return m()}finally{A=V}},G.unstable_scheduleCallback=function(p,m,V){var ne=G.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?ne+V:ne):V=ne,p){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return s=V+s,p={id:D++,callback:m,priorityLevel:p,startTime:V,expirationTime:s,sortIndex:-1},V>ne?(p.sortIndex=V,he(P,p),ye(x)===null&&p===ye(P)&&(R?(h(g),g=-1):R=!0,W(F,V-ne))):(p.sortIndex=s,he(x,p),U||C||(U=!0,L(M))),p},G.unstable_shouldYield=B,G.unstable_wrapCallback=function(p){var m=A;return function(){var V=A;A=m;try{return p.apply(this,arguments)}finally{A=V}}}},755(_e,G,he){"use strict";var ye;ye={value:!0},G.A=f;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 f(){const _=x=>{try{const D=a(x.target),N=[];let A=D;for(;A;){var P=typeof A.elementType=="function"&&A.elementType.displayName;P&&N.push(P),A=A.return}x.__lrName=N}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,G,he){"use strict";_e.exports=he(713)},896(_e,G,he){"use strict";_e.exports=he(733)}},zr={};function Fe(_e){var G=zr[_e];if(G!==void 0)return G.exports;var he=zr[_e]={exports:{}};return Ml[_e].call(he.exports,he,he.exports,Fe),he.exports}Fe.n=_e=>{var G=_e&&_e.__esModule?()=>_e.default:()=>_e;return Fe.d(G,{a:G}),G},Fe.d=(_e,G)=>{for(var he in G)Fe.o(G,he)&&!Fe.o(_e,he)&&Object.defineProperty(_e,he,{enumerable:!0,get:G[he]})},Fe.o=(_e,G)=>Object.prototype.hasOwnProperty.call(_e,G),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:()=>q,hasUserConsentedToSessionRecording:()=>g,initLogRocket:()=>te});var _e=Fe(5),G=Fe.n(_e),he=Fe(755);const ye=L=>L!==null&&typeof L=="object"&&!Array.isArray(L),we=(L,W)=>{const p={...L};return ye(L)&&ye(W)&&Object.keys(W).forEach(m=>{const V=W[m],ne=p[m];ye(V)&&ye(ne)?p[m]=we(ne,V):p[m]=V}),p},a=he.A.default||he.A,S=G().default||G();window.emui=window.emui||{},window.emui.isLogRocketInitialized=window.emui.isLogRocketInitialized??!1;let f=window.emui.cdnDomain??"https://cdn.mortgagetech.ice.com";f&&!f.startsWith("https://")&&(f=`https://${f.replace(/^http:\/\//,"")}`);let _=!1,x=null;if(typeof document<"u"&&document.currentScript&&(x=document.currentScript.src),!x)try{x=typeof import.meta<"u"?import.meta.url:null}catch{}if(x&&/(cdn\.mortgagetech\.(.*\.)?ice\.com|\/\/localhost[\d:/])/.test(x))try{const L=new URL(x);f=L.hostname==="localhost"?"https://cdn.mortgagetech.d1.ice.com":L.origin}catch{f=null}f&&(_=!0,window._lrAsyncScript=`${f}/logrocket/logger-1.min.js`);const P=window.emui.logRocket||S({..._&&f?{ingestServer:f}:{}});let D=null;const N=()=>window.emui?.logger??console,A=L=>{try{return new URL(L).origin===L}catch{return!1}},C=L=>{const W=new URLSearchParams(L).get("lrParentOrigin");return W&&A(W)?W:null},U=()=>{const L=C(window.location.search);if(L)return L;if(window.frameElement)try{const W=new URL(window.frameElement.src);return C(W.search)}catch{}return null},R=()=>{let L=U();if(!L)try{L=window.parent.location.origin}catch{try{L=new URL(document.referrer).origin}catch{}}return window===window.top&&L===window.location.origin?null:L},k=L=>{const W=window.location.origin;if(L==null)return[W];if(!Array.isArray(L))return N().warn(`LogRocket childDomains override ignored: must be an array of full origins. Falling back to [${W}].`),[W];const{valid:p,invalid:m}=L.reduce((V,ne)=>(typeof ne=="string"&&A(ne)?V.valid.push(ne):V.invalid.push(String(ne)),V),{valid:[],invalid:[]});if(m.length>0){const V=m.join(", ");N().warn(`LogRocket childDomains entries dropped (must be full origins like "https://example.com"): ${V}`)}return p.includes(W)?p:[...p,W]},h=L=>{if(L!=null){if(typeof L=="string"&&A(L))return L;const W=String(L);N().warn(`LogRocket parentDomain override "${W}" ignored: must be a full origin. Using auto-detected value.`)}return R()},c=/[^.]+\.[^.]+$/,T=L=>{const W=c.exec(window.location.hostname),p=W?`.${W[0]}`:void 0;if(typeof L=="string"&&p&&L.startsWith(".")&&L.endsWith(p))return L;if(L!=null){const m=p??"(none)";N().warn(`LogRocket rootHostname override "${String(L)}" ignored: must start with "." and end with the auto-detected "${m}". Using auto-detected value.`)}return p},F=L=>{const W=k(L.childDomains),p=h(L.parentDomain);return{browser:{urlSanitizer:m=>{let V=m;return V=V.replace(/([?&])code=([^&]*)/g,"$1code=REDACTED"),V}},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:m=>{const V=Object.keys(m.headers).reduce((ne,s)=>(ne[s]=/^authorization$/i.test(s)?"**redacted**":m.headers[s]??"",ne),{});return{...m,headers:V,body:null}},responseSanitizer:m=>m.headers["x-secret"]?null:{...m,body:null}},release:"MISSING_ENV_VAR".APP_VERSION,rootHostname:T(L.rootHostname),childDomains:W,...p?{parentDomain:p}:{}}},M=()=>window.OnetrustActiveGroups?.split(",").map(L=>L.trim()).filter(Boolean)??[],z=()=>window.OnetrustActiveGroups?M().includes("C0002"):!0,I=()=>{if(!z())return!0;window.location.hostname;const L=new URLSearchParams(window.location.search);return window.emui?.logRocketConfig?.enable===!1||L.get("lrEnabled")==="false"},g=()=>{if(window.emui?.dangerouslyOverrideSessionRecordingConsent===!0)return N().warn("Using dangerouslyOverrideSessionRecordingConsent - this should only be used for testing purposes"),!0;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},y=L=>{const p=new URLSearchParams(window.location.search).get("lrAppId"),m=window.emui?.logRocketConfig?.appId;return p||L||m||null},q=()=>{const L=new URLSearchParams,W=window.emui?.lrSessionRecordingConsent??g(),p=window.emui?.lrEnabled??!I();return L.append("analyticsConsent",W?"true":"false"),L.append("lrEnabled",p?"true":"false"),L.append("lrAppId",y()??""),L.append("lrParentOrigin",window.location.origin),L.toString()},B=L=>{N().info(`LogRocket initialized ${L?"with":"without"} session recording`),P.getSessionURL(W=>{N().info(`LogRocket session URL: ${W}`)})},ee=L=>{const W=window.emui?.logRocketConfig;return{rootHostname:L.rootHostname??W?.rootHostname,childDomains:L.childDomains??W?.childDomains,parentDomain:L.parentDomain??W?.parentDomain}},b=L=>{const{appId:W,isReact:p=!0,rootHostname:m,childDomains:V,parentDomain:ne,...s}=L??{};if(D=y(W),!D)throw new Error("LogRocket appId is required to initialize LogRocket. Either pass it as parameter or set window.emui.logRocketConfig.appId");if(I()){window.emui.isLogRocketInitialized=!1,window.emui.lrEnabled=!1,N().info("LogRocket is disabled in this environment");return}window.emui.lrEnabled=!0;const $=F(ee({rootHostname:m,childDomains:V,parentDomain:ne})),fe=g();window.emui.lrSessionRecordingConsent=fe,$.dom&&($.dom.isEnabled=fe);const de=we($,s);P.init(D,de),p&&a(P),B(de.dom?.isEnabled===!0)},Z=()=>{const L=document.cookie.match(/(^|;\s*)OptanonAlertBoxClosed=([^;]+)/);if(!L)return!1;try{return!!decodeURIComponent(L[2])}catch{return!1}},te=L=>{if(!window.emui.isLogRocketInitialized){if(!y(L?.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 W=!1;const p=()=>{if(!W){W=!0;try{b(L)}catch(V){window.emui.isLogRocketInitialized=!1,N().error({message:"LogRocket initialization failed",exception:V})}}},m=V=>{window.addEventListener(V,p,{once:!0}),setTimeout(()=>{W||(N().warn(`OneTrust event '${V}' not received within 10s, initializing LogRocket with current consent state`),p())},1e4)};Z()?m("OneTrustGroupsUpdated"):M().includes("C0002")?p():m("OTConsentApplied")}else setTimeout(()=>{try{b(L)}catch(W){window.emui.isLogRocketInitialized=!1,N().error({message:"LogRocket initialization failed",exception:W})}},0)}};window.emui.logRocket=window.emui.logRocket??P})(),Xo})());
|
|
44
44
|
|
|
45
|
-
//# sourceMappingURL=emuiLogrocket.
|
|
45
|
+
//# sourceMappingURL=emuiLogrocket.b05aab66ef02cf198fdf.js.map
|
|
Binary file
|