@elliemae/ssf-guest 2.5.3 → 2.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/cjs/guest.js +4 -8
- package/dist/cjs/tests/utils.js +2 -4
- package/dist/cjs/utils.js +1 -2
- package/dist/esm/guest.js +4 -8
- package/dist/esm/tests/utils.js +2 -4
- package/dist/esm/utils.js +1 -2
- package/dist/public/creditService.html +1 -1
- package/dist/public/index.html +1 -1
- package/dist/public/js/{emuiSsfGuest.11dd502cfb083007c6d1.js → emuiSsfGuest.dbfd586165d44ec4850e.js} +3 -3
- package/dist/public/js/emuiSsfGuest.dbfd586165d44ec4850e.js.br +0 -0
- package/dist/public/js/emuiSsfGuest.dbfd586165d44ec4850e.js.gz +0 -0
- package/dist/public/js/emuiSsfGuest.dbfd586165d44ec4850e.js.map +1 -0
- package/dist/public/loanValidation.html +1 -1
- package/dist/public/pricingService.html +1 -1
- package/dist/public/titleService.html +1 -1
- package/dist/public/v2-guest.html +1 -1
- package/dist/types/tests/utils.d.ts +3 -3
- package/dist/umd/index.js +2 -2
- 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 +6 -7
- package/dist/public/js/emuiSsfGuest.11dd502cfb083007c6d1.js.br +0 -0
- package/dist/public/js/emuiSsfGuest.11dd502cfb083007c6d1.js.gz +0 -0
- package/dist/public/js/emuiSsfGuest.11dd502cfb083007c6d1.js.map +0 -1
package/README.md
ADDED
package/dist/cjs/guest.js
CHANGED
|
@@ -315,8 +315,7 @@ class SSFGuest {
|
|
|
315
315
|
* Extend token lifetime
|
|
316
316
|
*/
|
|
317
317
|
#extendTokenLifetime = async () => {
|
|
318
|
-
if (!this.#authToken || !this.#authClientId || !this.#hostDomain)
|
|
319
|
-
return;
|
|
318
|
+
if (!this.#authToken || !this.#authClientId || !this.#hostDomain) return;
|
|
320
319
|
await fetch(`${this.#hostDomain}/oauth2/v1/token/introspection`, {
|
|
321
320
|
headers: {
|
|
322
321
|
"content-type": "application/x-www-form-urlencoded;charset=UTF-8"
|
|
@@ -384,8 +383,7 @@ class SSFGuest {
|
|
|
384
383
|
* Close the connection to the host
|
|
385
384
|
*/
|
|
386
385
|
close = () => {
|
|
387
|
-
if (!this.#isConnected)
|
|
388
|
-
return;
|
|
386
|
+
if (!this.#isConnected) return;
|
|
389
387
|
this.#remoting.send({
|
|
390
388
|
targetWin: this.#hostWindow,
|
|
391
389
|
targetOrigin: this.#hostOrigin,
|
|
@@ -467,8 +465,7 @@ class SSFGuest {
|
|
|
467
465
|
* @returns auth token
|
|
468
466
|
*/
|
|
469
467
|
getAuthToken = async () => {
|
|
470
|
-
if (!this.#cacheAuthToken)
|
|
471
|
-
return null;
|
|
468
|
+
if (!this.#cacheAuthToken) return null;
|
|
472
469
|
if (!this.#authToken) {
|
|
473
470
|
try {
|
|
474
471
|
const authObj = await this.getObject("Auth");
|
|
@@ -516,8 +513,7 @@ class SSFGuest {
|
|
|
516
513
|
* remove the guest from the host
|
|
517
514
|
*/
|
|
518
515
|
removeScript = () => {
|
|
519
|
-
if (!this.#created)
|
|
520
|
-
return;
|
|
516
|
+
if (!this.#created) return;
|
|
521
517
|
if (this.#scriptElement) {
|
|
522
518
|
const { parentNode } = this.#scriptElement;
|
|
523
519
|
parentNode?.removeChild?.(this.#scriptElement);
|
package/dist/cjs/tests/utils.js
CHANGED
|
@@ -97,8 +97,7 @@ const appraisalServiceObject = {
|
|
|
97
97
|
};
|
|
98
98
|
const getAppraisalService = (hostWindow, ssfGuest) => new Promise((resolve, reject) => {
|
|
99
99
|
const onMessage = ({ data }) => {
|
|
100
|
-
if (data?.type !== import_microfe_common.MessageType.ObjectGet)
|
|
101
|
-
return;
|
|
100
|
+
if (data?.type !== import_microfe_common.MessageType.ObjectGet) return;
|
|
102
101
|
postMessage({
|
|
103
102
|
srcWindow: hostWindow,
|
|
104
103
|
targetWindow: window,
|
|
@@ -159,8 +158,7 @@ const hostObjects = {
|
|
|
159
158
|
};
|
|
160
159
|
const setupHost = (hostWindow) => {
|
|
161
160
|
const onMessage = ({ data }) => {
|
|
162
|
-
if (data?.type !== import_microfe_common.MessageType.ObjectGet)
|
|
163
|
-
return;
|
|
161
|
+
if (data?.type !== import_microfe_common.MessageType.ObjectGet) return;
|
|
164
162
|
const scriptingObject = hostObjects[data?.body?.objectId ?? ""] ?? null;
|
|
165
163
|
if (scriptingObject)
|
|
166
164
|
postMessage({
|
package/dist/cjs/utils.js
CHANGED
|
@@ -35,8 +35,7 @@ const getParentWindowLocation = () => {
|
|
|
35
35
|
}
|
|
36
36
|
};
|
|
37
37
|
const getOrigin = (url) => {
|
|
38
|
-
if (!url || url === "about:blank")
|
|
39
|
-
return "*";
|
|
38
|
+
if (!url || url === "about:blank") return "*";
|
|
40
39
|
const { origin } = new URL(url);
|
|
41
40
|
return origin === "null" || !origin ? url : origin;
|
|
42
41
|
};
|
package/dist/esm/guest.js
CHANGED
|
@@ -309,8 +309,7 @@ class SSFGuest {
|
|
|
309
309
|
* Extend token lifetime
|
|
310
310
|
*/
|
|
311
311
|
#extendTokenLifetime = async () => {
|
|
312
|
-
if (!this.#authToken || !this.#authClientId || !this.#hostDomain)
|
|
313
|
-
return;
|
|
312
|
+
if (!this.#authToken || !this.#authClientId || !this.#hostDomain) return;
|
|
314
313
|
await fetch(`${this.#hostDomain}/oauth2/v1/token/introspection`, {
|
|
315
314
|
headers: {
|
|
316
315
|
"content-type": "application/x-www-form-urlencoded;charset=UTF-8"
|
|
@@ -378,8 +377,7 @@ class SSFGuest {
|
|
|
378
377
|
* Close the connection to the host
|
|
379
378
|
*/
|
|
380
379
|
close = () => {
|
|
381
|
-
if (!this.#isConnected)
|
|
382
|
-
return;
|
|
380
|
+
if (!this.#isConnected) return;
|
|
383
381
|
this.#remoting.send({
|
|
384
382
|
targetWin: this.#hostWindow,
|
|
385
383
|
targetOrigin: this.#hostOrigin,
|
|
@@ -461,8 +459,7 @@ class SSFGuest {
|
|
|
461
459
|
* @returns auth token
|
|
462
460
|
*/
|
|
463
461
|
getAuthToken = async () => {
|
|
464
|
-
if (!this.#cacheAuthToken)
|
|
465
|
-
return null;
|
|
462
|
+
if (!this.#cacheAuthToken) return null;
|
|
466
463
|
if (!this.#authToken) {
|
|
467
464
|
try {
|
|
468
465
|
const authObj = await this.getObject("Auth");
|
|
@@ -510,8 +507,7 @@ class SSFGuest {
|
|
|
510
507
|
* remove the guest from the host
|
|
511
508
|
*/
|
|
512
509
|
removeScript = () => {
|
|
513
|
-
if (!this.#created)
|
|
514
|
-
return;
|
|
510
|
+
if (!this.#created) return;
|
|
515
511
|
if (this.#scriptElement) {
|
|
516
512
|
const { parentNode } = this.#scriptElement;
|
|
517
513
|
parentNode?.removeChild?.(this.#scriptElement);
|
package/dist/esm/tests/utils.js
CHANGED
|
@@ -74,8 +74,7 @@ const appraisalServiceObject = {
|
|
|
74
74
|
};
|
|
75
75
|
const getAppraisalService = (hostWindow, ssfGuest) => new Promise((resolve, reject) => {
|
|
76
76
|
const onMessage = ({ data }) => {
|
|
77
|
-
if (data?.type !== MessageType.ObjectGet)
|
|
78
|
-
return;
|
|
77
|
+
if (data?.type !== MessageType.ObjectGet) return;
|
|
79
78
|
postMessage({
|
|
80
79
|
srcWindow: hostWindow,
|
|
81
80
|
targetWindow: window,
|
|
@@ -136,8 +135,7 @@ const hostObjects = {
|
|
|
136
135
|
};
|
|
137
136
|
const setupHost = (hostWindow) => {
|
|
138
137
|
const onMessage = ({ data }) => {
|
|
139
|
-
if (data?.type !== MessageType.ObjectGet)
|
|
140
|
-
return;
|
|
138
|
+
if (data?.type !== MessageType.ObjectGet) return;
|
|
141
139
|
const scriptingObject = hostObjects[data?.body?.objectId ?? ""] ?? null;
|
|
142
140
|
if (scriptingObject)
|
|
143
141
|
postMessage({
|
package/dist/esm/utils.js
CHANGED
|
@@ -8,8 +8,7 @@ const getParentWindowLocation = () => {
|
|
|
8
8
|
}
|
|
9
9
|
};
|
|
10
10
|
const getOrigin = (url) => {
|
|
11
|
-
if (!url || url === "about:blank")
|
|
12
|
-
return "*";
|
|
11
|
+
if (!url || url === "about:blank") return "*";
|
|
13
12
|
const { origin } = new URL(url);
|
|
14
13
|
return origin === "null" || !origin ? url : origin;
|
|
15
14
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Credit Service</title><style>body{margin:0}</style><script src="https://qa.assets.rd.elliemae.io/pui-diagnostics@3"></script><script>window.addEventListener("DOMContentLoaded",(async()=>{window.__ICE__={diagnosticsUrl:"https://int.api.ellielabs.com/diagnostics/v2/logging"};const e=new URL(window.location),i=e?.searchParams?.get?.("src");window.__ICE__.ssfGuest=new ice.guest.SSFGuest({logger:{index:"creditServiceGuest",team:"ui platform",appName:"credit-service"}}),await window.__ICE__.ssfGuest.addScript(i,document.body)}))</script><script defer="defer" src="js/emuiSsfGuest.
|
|
1
|
+
<!doctype html><html lang="en"><head><meta charset="UTF-8"/><meta http-equiv="X-UA-Compatible" content="IE=edge"/><meta name="viewport" content="width=device-width,initial-scale=1"/><title>Credit Service</title><style>body{margin:0}</style><script src="https://qa.assets.rd.elliemae.io/pui-diagnostics@3"></script><script>window.addEventListener("DOMContentLoaded",(async()=>{window.__ICE__={diagnosticsUrl:"https://int.api.ellielabs.com/diagnostics/v2/logging"};const e=new URL(window.location),i=e?.searchParams?.get?.("src");window.__ICE__.ssfGuest=new ice.guest.SSFGuest({logger:{index:"creditServiceGuest",team:"ui platform",appName:"credit-service"}}),await window.__ICE__.ssfGuest.addScript(i,document.body)}))</script><script defer="defer" src="js/emuiSsfGuest.dbfd586165d44ec4850e.js"></script></head><body></body></html>
|
package/dist/public/index.html
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
<!doctype html><html lang="en" style="height:100%"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Plugin</title><script src="https://cdn.tailwindcss.com?plugins=forms"></script><script defer="defer" src="js/emuiSsfGuest.
|
|
1
|
+
<!doctype html><html lang="en" style="height:100%"><head><meta charset="UTF-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Plugin</title><script src="https://cdn.tailwindcss.com?plugins=forms"></script><script defer="defer" src="js/emuiSsfGuest.dbfd586165d44ec4850e.js"></script></head><body class="px-2 h-full"><main class="h-full"><h1 class="text-md font-bold">Credit Score Service</h1><div class="h-full mt-2"><output id="msg" class="mt-2 p-2"></output></div></main></body></html>
|
package/dist/public/js/{emuiSsfGuest.11dd502cfb083007c6d1.js → emuiSsfGuest.dbfd586165d44ec4850e.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(function(We,ye){typeof exports=="object"&&typeof module=="object"?module.exports=ye(require("emuiDiagnostics")):typeof define=="function"&&define.amd?define(["emuiDiagnostics"],ye):typeof exports=="object"?exports.ice=ye(require("emuiDiagnostics")):(We.ice=We.ice||{},We.ice.guest=ye(We.emuiDiagnostics))})(globalThis,Hi=>(()=>{var We={
|
|
1
|
+
(function(We,ye){typeof exports=="object"&&typeof module=="object"?module.exports=ye(require("emuiDiagnostics")):typeof define=="function"&&define.amd?define(["emuiDiagnostics"],ye):typeof exports=="object"?exports.ice=ye(require("emuiDiagnostics")):(We.ice=We.ice||{},We.ice.guest=ye(We.emuiDiagnostics))})(globalThis,Hi=>(()=>{var We={918:function($,rn,X){$=X.nmd($);var Qe;/**
|
|
2
2
|
* @license
|
|
3
3
|
* Lodash <https://lodash.com/>
|
|
4
4
|
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
@@ -24,6 +24,6 @@ __p += '`),D&&(v+=`' +
|
|
|
24
24
|
function print() { __p += __j.call(arguments, '') }
|
|
25
25
|
`:`;
|
|
26
26
|
`)+v+`return __p
|
|
27
|
-
}`;var W=Af(function(){return M(s,I+"return "+v).apply(o,f)});if(W.source=v,Wi(W))throw W;return W}function pd(n){return F(n).toLowerCase()}function _d(n){return F(n).toUpperCase()}function vd(n,e,t){if(n=F(n),n&&(t||e===o))return Ou(n);if(!n||!(e=An(e)))return n;var r=Hn(n),i=Hn(e),s=Lu(r,i),f=Cu(r,i)+1;return xe(r,s,f).join("")}function wd(n,e,t){if(n=F(n),n&&(t||e===o))return n.slice(0,Pu(n)+1);if(!n||!(e=An(e)))return n;var r=Hn(n),i=Cu(r,Hn(e))+1;return xe(r,0,i).join("")}function md(n,e,t){if(n=F(n),n&&(t||e===o))return n.replace(Pr,"");if(!n||!(e=An(e)))return n;var r=Hn(n),i=Lu(r,Hn(e));return xe(r,i).join("")}function xd(n,e){var t=xt,r=mr;if(Z(e)){var i="separator"in e?e.separator:i;t="length"in e?C(e.length):t,r="omission"in e?An(e.omission):r}n=F(n);var s=n.length;if(Ge(n)){var f=Hn(n);s=f.length}if(t>=s)return n;var l=t-qe(r);if(l<1)return r;var c=f?xe(f,0,l).join(""):n.slice(0,l);if(i===o)return c+r;if(f&&(l+=c.length-l),Pi(i)){if(n.slice(l).search(i)){var p,_=c;for(i.global||(i=kr(i.source,F(Ji.exec(i))+"g")),i.lastIndex=0;p=i.exec(_);)var v=p.index;c=c.slice(0,v===o?l:v)}}else if(n.indexOf(An(i),l)!=l){var A=c.lastIndexOf(i);A>-1&&(c=c.slice(0,A))}return c+r}function Ad(n){return n=F(n),n&&Cf.test(n)?n.replace(Zi,Jo):n}var yd=Ze(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Di=As("toUpperCase");function xf(n,e,t){return n=F(n),e=t?o:e,e===o?zo(n)?jo(n):Do(n):n.match(e)||[]}var Af=P(function(n,e){try{return mn(n,o,e)}catch(t){return Wi(t)?t:new O(t)}}),Ed=se(function(n,e){return Pn(e,function(t){t=Qn(t),ie(n,t,Li(n[t],n))}),n});function Id(n){var e=n==null?0:n.length,t=b();return n=e?Y(n,function(r){if(typeof r[1]!="function")throw new Un(wn);return[t(r[0]),r[1]]}):[],P(function(r){for(var i=-1;++i<e;){var s=n[i];if(mn(s[0],this,r))return mn(s[1],this,r)}})}function bd(n){return Jl(Dn(n,Gn))}function Mi(n){return function(){return n}}function Sd(n,e){return n==null||n!==n?e:n}var Rd=Es(),Td=Es(!0);function vn(n){return n}function Fi(n){return ju(typeof n=="function"?n:Dn(n,Gn))}function Od(n){return es(Dn(n,Gn))}function Ld(n,e){return ts(n,Dn(e,Gn))}var Cd=P(function(n,e){return function(t){return gt(t,n,e)}}),Wd=P(function(n,e){return function(t){return gt(n,t,e)}});function $i(n,e,t){var r=tn(e),i=kt(e,r);t==null&&!(Z(e)&&(i.length||!r.length))&&(t=e,e=n,n=this,i=kt(e,tn(e)));var s=!(Z(t)&&"chain"in t)||!!t.chain,f=oe(n);return Pn(i,function(l){var c=e[l];n[l]=c,f&&(n.prototype[l]=function(){var p=this.__chain__;if(s||p){var _=n(this.__wrapped__),v=_.__actions__=dn(this.__actions__);return v.push({func:c,args:arguments,thisArg:n}),_.__chain__=p,_}return c.apply(n,de([this.value()],arguments))})}),n}function Pd(){return un._===this&&(un._=ul),this}function Gi(){}function Ud(n){return n=C(n),P(function(e){return rs(e,n)})}var Bd=vi(Y),Dd=vi(Iu),Md=vi(Nr);function yf(n){return Ii(n)?Hr(Qn(n)):ga(n)}function Fd(n){return function(e){return n==null?o:Te(n,e)}}var $d=bs(),Gd=bs(!0);function qi(){return[]}function Ni(){return!1}function qd(){return{}}function Nd(){return""}function Hd(){return!0}function Kd(n,e){if(n=C(n),n<1||n>Xn)return[];var t=m,r=fn(n,m);e=b(e),n-=m;for(var i=Yr(r,e);++t<n;)e(t);return i}function zd(n){return L(n)?Y(n,Qn):yn(n)?[n]:dn(qs(F(n)))}function Yd(n){var e=++rl;return F(n)+e}var Zd=er(function(n,e){return n+e},0),Xd=wi("ceil"),kd=er(function(n,e){return n/e},1),Jd=wi("floor");function Qd(n){return n&&n.length?Xt(n,vn,ri):o}function Vd(n,e){return n&&n.length?Xt(n,b(e,2),ri):o}function jd(n){return Ru(n,vn)}function np(n,e){return Ru(n,b(e,2))}function ep(n){return n&&n.length?Xt(n,vn,fi):o}function tp(n,e){return n&&n.length?Xt(n,b(e,2),fi):o}var rp=er(function(n,e){return n*e},1),ip=wi("round"),up=er(function(n,e){return n-e},0);function sp(n){return n&&n.length?zr(n,vn):0}function fp(n,e){return n&&n.length?zr(n,b(e,2)):0}return u.after=Oh,u.ary=Vs,u.assign=_g,u.assignIn=gf,u.assignInWith=dr,u.assignWith=vg,u.at=wg,u.before=js,u.bind=Li,u.bindAll=Ed,u.bindKey=nf,u.castArray=qh,u.chain=ks,u.chunk=Ja,u.compact=Qa,u.concat=Va,u.cond=Id,u.conforms=bd,u.constant=Mi,u.countBy=sh,u.create=mg,u.curry=ef,u.curryRight=tf,u.debounce=rf,u.defaults=xg,u.defaultsDeep=Ag,u.defer=Lh,u.delay=Ch,u.difference=ja,u.differenceBy=nc,u.differenceWith=ec,u.drop=tc,u.dropRight=rc,u.dropRightWhile=ic,u.dropWhile=uc,u.fill=sc,u.filter=oh,u.flatMap=ch,u.flatMapDeep=hh,u.flatMapDepth=gh,u.flatten=zs,u.flattenDeep=fc,u.flattenDepth=oc,u.flip=Wh,u.flow=Rd,u.flowRight=Td,u.fromPairs=lc,u.functions=Tg,u.functionsIn=Og,u.groupBy=dh,u.initial=cc,u.intersection=hc,u.intersectionBy=gc,u.intersectionWith=dc,u.invert=Cg,u.invertBy=Wg,u.invokeMap=_h,u.iteratee=Fi,u.keyBy=vh,u.keys=tn,u.keysIn=_n,u.map=or,u.mapKeys=Ug,u.mapValues=Bg,u.matches=Od,u.matchesProperty=Ld,u.memoize=ar,u.merge=Dg,u.mergeWith=df,u.method=Cd,u.methodOf=Wd,u.mixin=$i,u.negate=cr,u.nthArg=Ud,u.omit=Mg,u.omitBy=Fg,u.once=Ph,u.orderBy=wh,u.over=Bd,u.overArgs=Uh,u.overEvery=Dd,u.overSome=Md,u.partial=Ci,u.partialRight=uf,u.partition=mh,u.pick=$g,u.pickBy=pf,u.property=yf,u.propertyOf=Fd,u.pull=wc,u.pullAll=Zs,u.pullAllBy=mc,u.pullAllWith=xc,u.pullAt=Ac,u.range=$d,u.rangeRight=Gd,u.rearg=Bh,u.reject=yh,u.remove=yc,u.rest=Dh,u.reverse=Ti,u.sampleSize=Ih,u.set=qg,u.setWith=Ng,u.shuffle=bh,u.slice=Ec,u.sortBy=Th,u.sortedUniq=Lc,u.sortedUniqBy=Cc,u.split=cd,u.spread=Mh,u.tail=Wc,u.take=Pc,u.takeRight=Uc,u.takeRightWhile=Bc,u.takeWhile=Dc,u.tap=Qc,u.throttle=Fh,u.thru=fr,u.toArray=af,u.toPairs=_f,u.toPairsIn=vf,u.toPath=zd,u.toPlainObject=hf,u.transform=Hg,u.unary=$h,u.union=Mc,u.unionBy=Fc,u.unionWith=$c,u.uniq=Gc,u.uniqBy=qc,u.uniqWith=Nc,u.unset=Kg,u.unzip=Oi,u.unzipWith=Xs,u.update=zg,u.updateWith=Yg,u.values=Je,u.valuesIn=Zg,u.without=Hc,u.words=xf,u.wrap=Gh,u.xor=Kc,u.xorBy=zc,u.xorWith=Yc,u.zip=Zc,u.zipObject=Xc,u.zipObjectDeep=kc,u.zipWith=Jc,u.entries=_f,u.entriesIn=vf,u.extend=gf,u.extendWith=dr,$i(u,u),u.add=Zd,u.attempt=Af,u.camelCase=Qg,u.capitalize=wf,u.ceil=Xd,u.clamp=Xg,u.clone=Nh,u.cloneDeep=Kh,u.cloneDeepWith=zh,u.cloneWith=Hh,u.conformsTo=Yh,u.deburr=mf,u.defaultTo=Sd,u.divide=kd,u.endsWith=Vg,u.eq=zn,u.escape=jg,u.escapeRegExp=nd,u.every=fh,u.find=lh,u.findIndex=Hs,u.findKey=yg,u.findLast=ah,u.findLastIndex=Ks,u.findLastKey=Eg,u.floor=Jd,u.forEach=Js,u.forEachRight=Qs,u.forIn=Ig,u.forInRight=bg,u.forOwn=Sg,u.forOwnRight=Rg,u.get=Ui,u.gt=Zh,u.gte=Xh,u.has=Lg,u.hasIn=Bi,u.head=Ys,u.identity=vn,u.includes=ph,u.indexOf=ac,u.inRange=kg,u.invoke=Pg,u.isArguments=Ce,u.isArray=L,u.isArrayBuffer=kh,u.isArrayLike=pn,u.isArrayLikeObject=J,u.isBoolean=Jh,u.isBuffer=Ae,u.isDate=Qh,u.isElement=Vh,u.isEmpty=jh,u.isEqual=ng,u.isEqualWith=eg,u.isError=Wi,u.isFinite=tg,u.isFunction=oe,u.isInteger=sf,u.isLength=hr,u.isMap=ff,u.isMatch=rg,u.isMatchWith=ig,u.isNaN=ug,u.isNative=sg,u.isNil=og,u.isNull=fg,u.isNumber=of,u.isObject=Z,u.isObjectLike=k,u.isPlainObject=mt,u.isRegExp=Pi,u.isSafeInteger=lg,u.isSet=lf,u.isString=gr,u.isSymbol=yn,u.isTypedArray=ke,u.isUndefined=ag,u.isWeakMap=cg,u.isWeakSet=hg,u.join=pc,u.kebabCase=ed,u.last=Fn,u.lastIndexOf=_c,u.lowerCase=td,u.lowerFirst=rd,u.lt=gg,u.lte=dg,u.max=Qd,u.maxBy=Vd,u.mean=jd,u.meanBy=np,u.min=ep,u.minBy=tp,u.stubArray=qi,u.stubFalse=Ni,u.stubObject=qd,u.stubString=Nd,u.stubTrue=Hd,u.multiply=rp,u.nth=vc,u.noConflict=Pd,u.noop=Gi,u.now=lr,u.pad=id,u.padEnd=ud,u.padStart=sd,u.parseInt=fd,u.random=Jg,u.reduce=xh,u.reduceRight=Ah,u.repeat=od,u.replace=ld,u.result=Gg,u.round=ip,u.runInContext=a,u.sample=Eh,u.size=Sh,u.snakeCase=ad,u.some=Rh,u.sortedIndex=Ic,u.sortedIndexBy=bc,u.sortedIndexOf=Sc,u.sortedLastIndex=Rc,u.sortedLastIndexBy=Tc,u.sortedLastIndexOf=Oc,u.startCase=hd,u.startsWith=gd,u.subtract=up,u.sum=sp,u.sumBy=fp,u.template=dd,u.times=Kd,u.toFinite=le,u.toInteger=C,u.toLength=cf,u.toLower=pd,u.toNumber=$n,u.toSafeInteger=pg,u.toString=F,u.toUpper=_d,u.trim=vd,u.trimEnd=wd,u.trimStart=md,u.truncate=xd,u.unescape=Ad,u.uniqueId=Yd,u.upperCase=yd,u.upperFirst=Di,u.each=Js,u.eachRight=Qs,u.first=Ys,$i(u,function(){var n={};return kn(u,function(e,t){G.call(u.prototype,t)||(n[t]=e)}),n}(),{chain:!1}),u.VERSION=V,Pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){u[n].placeholder=u}),Pn(["drop","take"],function(n,e){B.prototype[n]=function(t){t=t===o?1:nn(C(t),0);var r=this.__filtered__&&!e?new B(this):this.clone();return r.__filtered__?r.__takeCount__=fn(t,r.__takeCount__):r.__views__.push({size:fn(t,m),type:n+(r.__dir__<0?"Right":"")}),r},B.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Pn(["filter","map","takeWhile"],function(n,e){var t=e+1,r=t==At||t==yr;B.prototype[n]=function(i){var s=this.clone();return s.__iteratees__.push({iteratee:b(i,3),type:t}),s.__filtered__=s.__filtered__||r,s}}),Pn(["head","last"],function(n,e){var t="take"+(e?"Right":"");B.prototype[n]=function(){return this[t](1).value()[0]}}),Pn(["initial","tail"],function(n,e){var t="drop"+(e?"":"Right");B.prototype[n]=function(){return this.__filtered__?new B(this):this[t](1)}}),B.prototype.compact=function(){return this.filter(vn)},B.prototype.find=function(n){return this.filter(n).head()},B.prototype.findLast=function(n){return this.reverse().find(n)},B.prototype.invokeMap=P(function(n,e){return typeof n=="function"?new B(this):this.map(function(t){return gt(t,n,e)})}),B.prototype.reject=function(n){return this.filter(cr(b(n)))},B.prototype.slice=function(n,e){n=C(n);var t=this;return t.__filtered__&&(n>0||e<0)?new B(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=C(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},B.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},B.prototype.toArray=function(){return this.take(m)},kn(B.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],s=r||/^find/.test(e);i&&(u.prototype[e]=function(){var f=this.__wrapped__,l=r?[1]:arguments,c=f instanceof B,p=l[0],_=c||L(f),v=function(U){var D=i.apply(u,de([U],l));return r&&A?D[0]:D};_&&t&&typeof p=="function"&&p.length!=1&&(c=_=!1);var A=this.__chain__,I=!!this.__actions__.length,S=s&&!A,W=c&&!I;if(!s&&_){f=W?f:new B(this);var R=n.apply(f,l);return R.__actions__.push({func:fr,args:[v],thisArg:o}),new Bn(R,A)}return S&&W?n.apply(this,l):(R=this.thru(v),S?r?R.value()[0]:R.value():R)})}),Pn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Pt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var s=this.value();return e.apply(L(s)?s:[],i)}return this[t](function(f){return e.apply(L(f)?f:[],i)})}}),kn(B.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";G.call(Ke,r)||(Ke[r]=[]),Ke[r].push({name:e,func:t})}}),Ke[nr(o,jn).name]=[{name:"wrapper",func:o}],B.prototype.clone=Al,B.prototype.reverse=yl,B.prototype.value=El,u.prototype.at=Vc,u.prototype.chain=jc,u.prototype.commit=nh,u.prototype.next=eh,u.prototype.plant=rh,u.prototype.reverse=ih,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=uh,u.prototype.first=u.prototype.head,st&&(u.prototype[st]=th),u},Wt=nl();un._=Wt,Qe=(function(){return Wt}).call(rn,X,rn,$),Qe!==o&&($.exports=Qe)}).call(this)},270:$=>{"use strict";$.exports=Hi}},ye={};function bn($){var rn=ye[$];if(rn!==void 0)return rn.exports;var X=ye[$]={id:$,loaded:!1,exports:{}};return We[$].call(X.exports,X,X.exports,bn),X.loaded=!0,X.exports}bn.d=($,rn)=>{for(var X in rn)bn.o(rn,X)&&!bn.o($,X)&&Object.defineProperty($,X,{enumerable:!0,get:rn[X]})},bn.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),bn.o=($,rn)=>Object.prototype.hasOwnProperty.call($,rn),bn.r=$=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty($,Symbol.toStringTag,{value:"Module"}),Object.defineProperty($,"__esModule",{value:!0})},bn.nmd=$=>($.paths=[],$.children||($.children=[]),$);var pr={};return(()=>{"use strict";bn.r(pr),bn.d(pr,{ProxyEvent:()=>ne,SSFGuest:()=>De});const rn={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let X;const Qe=new Uint8Array(16);function o(){if(!X&&(X=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!X))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return X(Qe)}const V=[];for(let m=0;m<256;++m)V.push((m+256).toString(16).slice(1));function Pe(m,h=0){return V[m[h+0]]+V[m[h+1]]+V[m[h+2]]+V[m[h+3]]+"-"+V[m[h+4]]+V[m[h+5]]+"-"+V[m[h+6]]+V[m[h+7]]+"-"+V[m[h+8]]+V[m[h+9]]+"-"+V[m[h+10]]+V[m[h+11]]+V[m[h+12]]+V[m[h+13]]+V[m[h+14]]+V[m[h+15]]}function Ki(m,h=0){const w=Pe(m,h);if(!validate(w))throw TypeError("Stringified UUID is invalid");return w}const wn=null;function _r(m,h,w){if(rn.randomUUID&&!h&&!m)return rn.randomUUID();m=m||{};const x=m.random||(m.rng||o)();if(x[6]=x[6]&15|64,x[8]=x[8]&63|128,h){w=w||0;for(let y=0;y<16;++y)h[w+y]=x[y];return h}return Pe(x)}const ce=_r;var vr=bn(378);const Ee="elli:remoting",Gn="elli:remoting:response",Ve="elli:remoting:exception",Sn=({messageType:m,messageBody:h,onewayMsg:w=!1})=>({requestId:w?null:ce(),source:Ee,type:m,body:h}),Vn=m=>{const{targetWin:h,targetOrigin:w,messageType:x,messageBody:y}=m,T=Sn({messageType:x,messageBody:y});h.postMessage(T,w)};class Ue{#o;#n;#e=new Map;#t=new Map;#r=null;#i=new Map;constructor(h,w){if(!h)throw new Error("logger is required");if(!w)throw new Error("correlationId is required");this.#o=w,this.#n=h}#l=()=>{const h=Date.now(),w=[];this.#t.forEach((x,y)=>{const{requestId:T,cancelTime:N}=x;this.#n.debug(`Checking response timeout for requestId: ${T}) @ ${N??""}`),x.cancelTime&&x.cancelTime<h&&(this.#n.debug(`Detected response timeout for requestId: ${T}...`),w.push(y),x.resolve(),this.#n.debug(`Aborted waiting for response to requestid: ${T})`))}),w.forEach(x=>{this.#n.debug(`removing invocations with requestId ${x} from cache since response time has expired`),this.#t.delete(x)}),this.#t.size===0&&(this.#n.debug("stopping response monitor"),this.#g())};#h=()=>{this.#r===null&&(this.#n.debug("Staring response timeout evaluator"),this.#r=window.setInterval(this.#l,200))};#g=()=>{this.#r!==null&&(window.clearInterval(this.#r),this.#r=null,this.#n.debug("Stopped response timeout evaluator"))};#a=h=>{const w=this.#t.get(h);return this.#n.debug(`serving requestId: ${h}`),this.#t.delete(h),w};#u=h=>{const{requestId:w}=h;this.#n.debug(`Response received for invocation requestId: ${w}`);const x=this.#a(w);return x?(x.resolve(h.body),!0):(this.#n.warn(`Received response to stale/invalid request with requestId: ${w}`),!1)};#s=h=>{this.#n.debug(`Exception received for invocation (requestId = ${h.requestId})`);const w=this.#a(h.requestId);return w?(w.reject(new Error(h.body)),!0):(this.#n.warn(`Received exception for stale/invalid request (requestId = ${h.requestId})`),!1)};#d=({sourceWin:h,sourceOrigin:w,message:x})=>{this.#n.debug(`Received message of type "${x.type}"`);const y=this.#e.get(x.type);return y?(y.forEach(T=>{this.#n.debug(`Invoking message handler ${T.name}`),T({sourceWin:h,sourceOrigin:w,requestId:x.requestId,type:x.type,body:x.body})}),!0):!1};#f=h=>{if(this.#n.debug(`Remoting: Received message ${JSON.stringify(h.data)}`),this.#i.size===0||!h.source)return!1;const w=this.#i.get(h.source);return!w||h?.data?.source!==Ee?!1:(h.data.type===Gn?this.#u(h.data):h.data.type===Ve?this.#s(h.data):this.#d({sourceWin:h.source,sourceOrigin:w,message:h.data}),!0)};addSender=h=>{const{origin:w,window:x}=h;if(!w)throw new Error("origin is required");if(!x)throw new Error("window is required");this.#i.set(x,w)};initialize=h=>{h.removeEventListener("message",this.#f),h.addEventListener("message",this.#f),this.#n.debug(`initialized remoting id: ${this.#o}`)};close=()=>{window.removeEventListener("message",this.#f),this.#n.debug(`closed remoting id: ${this.#o}`)};invoke=h=>{const{targetWin:w,targetOrigin:x,messageType:y,messageBody:T,responseTimeoutMs:N}=h;return new Promise((en,hn)=>{const gn=Sn({messageType:y,messageBody:T});this.#t.set(gn.requestId,{requestId:gn.requestId,resolve:en,reject:hn,cancelTime:N?Date.now()+Number.parseInt(N,10):null}),w.postMessage(gn,x);const{requestId:Cn}=gn;this.#n.debug(`Posted invocation message of type ${y} requestId: ${Cn||""}`),N&&(this.#n.debug(`starting response monitor for requestId: ${Cn||""} for ${N} ms`),this.#h())})};listen=h=>{const{messageType:w,callback:x}=h,y=this.#e.get(w)||[];y.push(x),this.#e.set(w,y)};send=h=>{const{targetWin:w,targetOrigin:x,messageType:y,messageBody:T}=h,N=Sn({messageType:y,messageBody:T,onewayMsg:!0});w.postMessage(N,x),this.#n.debug(`Posted one-way message of type "${y}"`)};removeSender=h=>{const{window:w}=h;w&&this.#i.delete(w)};respond=h=>{const{targetWin:w,targetOrigin:x,requestId:y,response:T}=h,N=Sn({messageType:Gn,messageBody:T});N.requestId=y,w.postMessage(N,x),this.#n.debug(`Response sent to caller for invocation requestId: ${y}`)};raiseException=h=>{const{targetWin:w,targetOrigin:x,requestId:y,ex:T}=h,N=Sn({messageType:Ve,messageBody:T});N.requestId=y,w.postMessage(N,x),this.#n.debug(`Exception sent to caller for invocation. requestId: ${y}`)}}var z=(m=>(m.GuestReady="guest:ready",m.GuestClose="guest:close",m.GuestReadyComplete="guest:readyComplete",m.GuestResize="guest:resize",m.GuestFocus="guest:focus",m.HandShake="handshake",m.HandShakeAck="handshake:ack",m.ObjectInvoke="object:invoke",m.ObjectGet="object:get",m.ObjectEvent="object:event",m.HostConfig="host:config",m))(z||{});class jn{scriptingObject;name;objectId;requiresFeedback;id;constructor(h){const{name:w,requiresFeedback:x=!1,so:y}=h;if(!w)throw new Error("Event name is required");if(!y)throw new Error("Scripting object is required");this.scriptingObject=y,this.objectId=y.id,this.name=w,this.id=`${this.objectId}.${this.name}`.toLowerCase(),this.requiresFeedback=x}}const wr=m=>m instanceof jn,Rn=(m,h)=>`${m.toLowerCase()}.${h.toLowerCase()}`;var Tn=bn(270);class On{id;objectType;constructor(h,w){this.id=h,this.objectType=w}}class ne{objectId;name;id;constructor(h){const{name:w,objectId:x}=h;this.objectId=x,this.name=w,this.id=`${this.objectId}.${this.name}`.toLowerCase()}}const Ln=()=>{const{parent:m}=window;try{return m?.location?.href}catch{return null}},he=m=>{if(!m||m==="about:blank")return"*";const{origin:h}=new URL(m);return h==="null"||!h?m:h},Be=()=>window.self!==window.parent,xt=(m,h)=>{const w=h||document.body,x=document.defaultView?.getComputedStyle?.(w,null),y=x?x[m]:"0";return parseInt(y,10)},mr=new RegExp("^https?://(.*.elliemae.io|.*.ellielabs.com|.*.ellieservices.com|.*.encompassloconnect.com|.*.ice.com|localhost:[0-9]+)","i"),xr="elli:remoting",Ar=()=>new Promise(m=>{Be()?m({origin:he(document.referrer||Ln()),window:window.parent}):window.addEventListener("message",h=>{if(mr.test(h.origin)){const{source:w,type:x}=h.data||{};if(w===xr&&x===z.HandShake){const{origin:y}=h,T=h.source;Vn({targetWin:T,targetOrigin:y,messageType:z.HandShakeAck,messageBody:{}}),m({origin:y,window:T})}}})});var At=(m=>(m.OBJECT="object",m.VALUE="value",m))(At||{});const yt=12e4,yr={eventFeedback:!0},Zn=()=>{const{document:m}=window,h=m.body,w=m.documentElement,y={height:h.offsetHeight+xt("marginTop")+xt("marginBottom"),width:Math.max(h.scrollWidth,w.scrollWidth)};Vn({targetWin:window.parent,targetOrigin:he(m.referrer||Ln()),messageType:z.GuestResize,messageBody:y}),window.removeEventListener("load",Zn)};Be()&&window.addEventListener("load",Zn);const Xn="https://api.ellielabs.com/diagnostics/v2/logging",Et=["click","scroll","keypress","touchstart"];class De{#o;#n;#e;#t=!1;#r=null;#i=!1;#l=new Map;#h=null;#g=null;#a=null;#u=null;#s=null;#d=!1;#f=null;#_=null;#v=null;#m=!1;#x=yt;#p=null;constructor(h){const{console:w=!1,url:x=window.__ICE__?.diagnosticsUrl||Xn,index:y,team:T,appName:N}=h?.logger||{};this.#d=h?.cacheAuthToken??!1,this.#m=h?.keepAlive??!1,this.#x=h?.keepAliveInterval??yt;const en=w?(0,Tn.Console)():(0,Tn.http)(x);this.#n=(0,Tn.logger)({transport:en,index:y,team:T,appName:N}),(0,Tn.webvitals)(this.#n),(0,Tn.logUnhandledErrors)(this.#n),this.#o=ce(),this.#e=new Ue(this.#n,this.#o),this.#n.audit({message:"Guest created",guestUrl:window.location.href,correlationId:this.#o})}#c=()=>({guestId:this.#h,guestTitle:this.#g,guestUrl:this.#a});#w=h=>{if(!h||!h.objectId)throw this.#n.error("Deserialization of scripting object failed. Object does not have an Object ID."),new Error("Cannot deserialize object JSON into proxy.");const w=new On(h.objectId,h.objectType);return h.functions&&h.functions.forEach(x=>{Object.defineProperty(w,x,{value:async(...y)=>this.#A({objectId:w.id,functionName:x,functionParams:[].slice.call(y)}),enumerable:!0})}),h.events&&h.events.forEach(x=>{Object.defineProperty(w,x,{value:new ne({objectId:w.id,name:x}),enumerable:!0})}),this.#n.debug(`Created guest proxy for scripting object (id = "${w.id}")`),w};#A=async({objectId:h,functionName:w,functionParams:x})=>{this.#n.debug(`Invoking scripting object method ${h}.${w}()...`);const y=[];if(x)for(let en=0;en<x.length;en+=1){const hn=x[en];hn instanceof Promise&&y.push(hn.then(gn=>{x[en]=gn}))}await Promise.all(y);const T=await this.#e.invoke({targetWin:this.#s,targetOrigin:this.#u,messageType:z.ObjectInvoke,messageBody:{objectId:h,functionName:w,functionParams:x}}),N=this.#y(T);return this.#n.audit({message:"Guest proxy invoked Scripting Object method",scriptingObject:h,scriptingMethod:w,...this.#c()}),N};#y=h=>h?.type==="object"&&"object"in h?this.#w(h.object):h?.type==="value"?h.value:h;#E=({body:h})=>{h?.logLevel&&(this.#n.setLogLevel(h.logLevel),this.#n.debug(`Log level changed by host to ${h.logLevel}`)),this.#h=h?.guestId??null,this.#g=h?.guestTitle??null,this.#a=h?.guestUrl??null,this.#n.audit({message:"Received configuration from Host",...this.#c()})};#I=()=>{window.focus()};#b=async({sourceWin:h,sourceOrigin:w,requestId:x,body:y})=>{const T=this.#w(y.object);if(T){const N=Rn(T.id,y.eventName);this.#n.debug(`Received event "${N}" from host`);let en;y.eventHandler?en=[{callback:window[y.eventHandler],token:ce()}]:en=this.#l.get(N)||[];const hn=[];if(en.forEach(gn=>{if(gn?.callback){this.#n.debug(`Invoking event subscriber ${gn.callback.name} for event ${N}`);const Cn=gn.callback({obj:T,eventName:y.eventName,eventParams:y.eventParams,eventOptions:y.eventOptions});Cn instanceof Promise?hn.push(Cn):typeof Cn<"u"&&hn.push(Promise.resolve(Cn))}}),x){const gn=await Promise.all(hn);this.#e.respond({targetWin:h,targetOrigin:w,requestId:x,response:gn}),this.#n.audit({message:"Guest proxy processed event from host and responded",scriptingEventId:N,scriptingObject:T.id,...this.#c()})}else this.#n.audit({message:"Guest proxy processed event from host",scriptingEventId:N,scriptingObject:T.id,...this.#c()})}};#S=async()=>{!this.#f||!this.#_||!this.#v||await fetch(`${this.#v}/oauth2/v1/token/introspection`,{headers:{"content-type":"application/x-www-form-urlencoded;charset=UTF-8"},body:`token=${this.#f}&client_id=${this.#_}`,method:"POST"})};#R=async()=>{if(this.#m)try{const h=await this.getObject("Application");h&&(this.#p=(0,vr.throttle)(async()=>{try{await h.keepSessionAlive(),await this.#S()}catch(w){this.#n.error(`Error keeping session alive. ${w.message}`)}},this.#x,{leading:!1}),Et.forEach(w=>{document.addEventListener(w,this.#p)}))}catch(h){this.#n.error(`Error getting application object. ${h.message}`)}};addScript=async(h,w)=>{if(!this.#t&&h){await this.connect();const x=document.createElement("script");x.setAttribute("src",h),await new Promise(y=>{const T=()=>{x?.removeEventListener?.("load",T),this.#t=!0,y()};x.addEventListener("load",T),this.#r=w.appendChild(x)})}};close=()=>{this.#i&&(this.#e.send({targetWin:this.#s,targetOrigin:this.#u,messageType:z.GuestClose,messageBody:{}}),this.#e.removeSender({origin:this.#u,window:this.#s}),this.#e.close(),this.#p&&Et.forEach(h=>{document.removeEventListener(h,this.#p)}),this.#i=!1,this.#n.audit({message:"Guest disconnected from host",...this.#c()}),this.#h=null,this.#a=null,this.#g=null)};connect=async h=>{if(!this.#i){let w=window,x={...yr};if(h){w=h.window||w;const T={...h};delete T.window,x=Object.assign(x,T)}const y=await Ar();this.#u=y.origin,this.#s=y.window,this.#e.initialize(w),this.#e.addSender({origin:this.#u,window:this.#s}),this.#e.listen({messageType:z.ObjectEvent,callback:this.#b.bind(this)}),this.#e.listen({messageType:z.HostConfig,callback:this.#E.bind(this)}),this.#e.listen({messageType:z.GuestFocus,callback:this.#I.bind(this)}),this.#e.send({targetWin:this.#s,targetOrigin:this.#u,messageType:z.GuestReady,messageBody:x}),this.#i=!0,this.#n.audit({message:"Guest connected to host",guestUrl:window.location.href}),await this.getAuthToken(),await this.#R()}};getAuthToken=async()=>{if(!this.#d)return null;if(!this.#f)try{const h=await this.getObject("Auth");if(h){const w=await h.getAccessToken();this.#f=w?.access_token,this.#v=w?.host_name,this.#_=w?.client_id}}catch(h){console.dir(h,{depth:null}),this.#n.error(`Error getting access token from auth object. ${h.message}`)}return this.#f};getObject=async h=>{this.#n.debug(`Retrieving scripting object "${h}" from host...`);const w=await this.#e.invoke({targetWin:this.#s,targetOrigin:this.#u,messageType:z.ObjectGet,messageBody:{objectId:h}}),x=this.#w(w.object);return this.#n.audit({message:"Received scripting object from host",scriptingObject:h,...this.#c()}),x};removeScript=()=>{if(this.#t&&this.#r){const{parentNode:h}=this.#r;h?.removeChild?.(this.#r)}};setLogLevel=h=>{this.#n.setLogLevel(h),this.#n.debug(`Log level changed by guest to ${h}`)};subscribe=h=>{const{eventId:w,callback:x}=h;this.#n.debug(`Registering subscription for event ${w}`);const y=this.#l.get(w)||[],T=ce();return y.push({callback:x,token:T}),this.#l.set(w,y),T};unsubscribe=h=>{const{eventId:w,token:x}=h;let y=this.#l.get(w);y&&(y=y.filter(T=>T.token!==x),this.#l.set(w,y))}}})(),pr})());
|
|
27
|
+
}`;var W=Af(function(){return M(s,I+"return "+v).apply(o,f)});if(W.source=v,Wi(W))throw W;return W}function pd(n){return F(n).toLowerCase()}function _d(n){return F(n).toUpperCase()}function vd(n,e,t){if(n=F(n),n&&(t||e===o))return Ou(n);if(!n||!(e=An(e)))return n;var r=Hn(n),i=Hn(e),s=Lu(r,i),f=Cu(r,i)+1;return xe(r,s,f).join("")}function wd(n,e,t){if(n=F(n),n&&(t||e===o))return n.slice(0,Pu(n)+1);if(!n||!(e=An(e)))return n;var r=Hn(n),i=Cu(r,Hn(e))+1;return xe(r,0,i).join("")}function md(n,e,t){if(n=F(n),n&&(t||e===o))return n.replace(Pr,"");if(!n||!(e=An(e)))return n;var r=Hn(n),i=Lu(r,Hn(e));return xe(r,i).join("")}function xd(n,e){var t=xt,r=mr;if(Z(e)){var i="separator"in e?e.separator:i;t="length"in e?C(e.length):t,r="omission"in e?An(e.omission):r}n=F(n);var s=n.length;if(Ge(n)){var f=Hn(n);s=f.length}if(t>=s)return n;var l=t-qe(r);if(l<1)return r;var c=f?xe(f,0,l).join(""):n.slice(0,l);if(i===o)return c+r;if(f&&(l+=c.length-l),Pi(i)){if(n.slice(l).search(i)){var p,_=c;for(i.global||(i=kr(i.source,F(Ji.exec(i))+"g")),i.lastIndex=0;p=i.exec(_);)var v=p.index;c=c.slice(0,v===o?l:v)}}else if(n.indexOf(An(i),l)!=l){var A=c.lastIndexOf(i);A>-1&&(c=c.slice(0,A))}return c+r}function Ad(n){return n=F(n),n&&Cf.test(n)?n.replace(Zi,Jo):n}var yd=Ze(function(n,e,t){return n+(t?" ":"")+e.toUpperCase()}),Di=As("toUpperCase");function xf(n,e,t){return n=F(n),e=t?o:e,e===o?zo(n)?jo(n):Do(n):n.match(e)||[]}var Af=P(function(n,e){try{return mn(n,o,e)}catch(t){return Wi(t)?t:new O(t)}}),Ed=se(function(n,e){return Pn(e,function(t){t=Qn(t),ie(n,t,Li(n[t],n))}),n});function Id(n){var e=n==null?0:n.length,t=b();return n=e?Y(n,function(r){if(typeof r[1]!="function")throw new Un(wn);return[t(r[0]),r[1]]}):[],P(function(r){for(var i=-1;++i<e;){var s=n[i];if(mn(s[0],this,r))return mn(s[1],this,r)}})}function bd(n){return Jl(Dn(n,Gn))}function Mi(n){return function(){return n}}function Sd(n,e){return n==null||n!==n?e:n}var Rd=Es(),Td=Es(!0);function vn(n){return n}function Fi(n){return ju(typeof n=="function"?n:Dn(n,Gn))}function Od(n){return es(Dn(n,Gn))}function Ld(n,e){return ts(n,Dn(e,Gn))}var Cd=P(function(n,e){return function(t){return gt(t,n,e)}}),Wd=P(function(n,e){return function(t){return gt(n,t,e)}});function $i(n,e,t){var r=tn(e),i=kt(e,r);t==null&&!(Z(e)&&(i.length||!r.length))&&(t=e,e=n,n=this,i=kt(e,tn(e)));var s=!(Z(t)&&"chain"in t)||!!t.chain,f=oe(n);return Pn(i,function(l){var c=e[l];n[l]=c,f&&(n.prototype[l]=function(){var p=this.__chain__;if(s||p){var _=n(this.__wrapped__),v=_.__actions__=dn(this.__actions__);return v.push({func:c,args:arguments,thisArg:n}),_.__chain__=p,_}return c.apply(n,de([this.value()],arguments))})}),n}function Pd(){return un._===this&&(un._=ul),this}function Gi(){}function Ud(n){return n=C(n),P(function(e){return rs(e,n)})}var Bd=vi(Y),Dd=vi(Iu),Md=vi(Nr);function yf(n){return Ii(n)?Hr(Qn(n)):ga(n)}function Fd(n){return function(e){return n==null?o:Te(n,e)}}var $d=bs(),Gd=bs(!0);function qi(){return[]}function Ni(){return!1}function qd(){return{}}function Nd(){return""}function Hd(){return!0}function Kd(n,e){if(n=C(n),n<1||n>Xn)return[];var t=m,r=fn(n,m);e=b(e),n-=m;for(var i=Yr(r,e);++t<n;)e(t);return i}function zd(n){return L(n)?Y(n,Qn):yn(n)?[n]:dn(qs(F(n)))}function Yd(n){var e=++rl;return F(n)+e}var Zd=er(function(n,e){return n+e},0),Xd=wi("ceil"),kd=er(function(n,e){return n/e},1),Jd=wi("floor");function Qd(n){return n&&n.length?Xt(n,vn,ri):o}function Vd(n,e){return n&&n.length?Xt(n,b(e,2),ri):o}function jd(n){return Ru(n,vn)}function np(n,e){return Ru(n,b(e,2))}function ep(n){return n&&n.length?Xt(n,vn,fi):o}function tp(n,e){return n&&n.length?Xt(n,b(e,2),fi):o}var rp=er(function(n,e){return n*e},1),ip=wi("round"),up=er(function(n,e){return n-e},0);function sp(n){return n&&n.length?zr(n,vn):0}function fp(n,e){return n&&n.length?zr(n,b(e,2)):0}return u.after=Oh,u.ary=Vs,u.assign=_g,u.assignIn=gf,u.assignInWith=dr,u.assignWith=vg,u.at=wg,u.before=js,u.bind=Li,u.bindAll=Ed,u.bindKey=nf,u.castArray=qh,u.chain=ks,u.chunk=Ja,u.compact=Qa,u.concat=Va,u.cond=Id,u.conforms=bd,u.constant=Mi,u.countBy=sh,u.create=mg,u.curry=ef,u.curryRight=tf,u.debounce=rf,u.defaults=xg,u.defaultsDeep=Ag,u.defer=Lh,u.delay=Ch,u.difference=ja,u.differenceBy=nc,u.differenceWith=ec,u.drop=tc,u.dropRight=rc,u.dropRightWhile=ic,u.dropWhile=uc,u.fill=sc,u.filter=oh,u.flatMap=ch,u.flatMapDeep=hh,u.flatMapDepth=gh,u.flatten=zs,u.flattenDeep=fc,u.flattenDepth=oc,u.flip=Wh,u.flow=Rd,u.flowRight=Td,u.fromPairs=lc,u.functions=Tg,u.functionsIn=Og,u.groupBy=dh,u.initial=cc,u.intersection=hc,u.intersectionBy=gc,u.intersectionWith=dc,u.invert=Cg,u.invertBy=Wg,u.invokeMap=_h,u.iteratee=Fi,u.keyBy=vh,u.keys=tn,u.keysIn=_n,u.map=or,u.mapKeys=Ug,u.mapValues=Bg,u.matches=Od,u.matchesProperty=Ld,u.memoize=ar,u.merge=Dg,u.mergeWith=df,u.method=Cd,u.methodOf=Wd,u.mixin=$i,u.negate=cr,u.nthArg=Ud,u.omit=Mg,u.omitBy=Fg,u.once=Ph,u.orderBy=wh,u.over=Bd,u.overArgs=Uh,u.overEvery=Dd,u.overSome=Md,u.partial=Ci,u.partialRight=uf,u.partition=mh,u.pick=$g,u.pickBy=pf,u.property=yf,u.propertyOf=Fd,u.pull=wc,u.pullAll=Zs,u.pullAllBy=mc,u.pullAllWith=xc,u.pullAt=Ac,u.range=$d,u.rangeRight=Gd,u.rearg=Bh,u.reject=yh,u.remove=yc,u.rest=Dh,u.reverse=Ti,u.sampleSize=Ih,u.set=qg,u.setWith=Ng,u.shuffle=bh,u.slice=Ec,u.sortBy=Th,u.sortedUniq=Lc,u.sortedUniqBy=Cc,u.split=cd,u.spread=Mh,u.tail=Wc,u.take=Pc,u.takeRight=Uc,u.takeRightWhile=Bc,u.takeWhile=Dc,u.tap=Qc,u.throttle=Fh,u.thru=fr,u.toArray=af,u.toPairs=_f,u.toPairsIn=vf,u.toPath=zd,u.toPlainObject=hf,u.transform=Hg,u.unary=$h,u.union=Mc,u.unionBy=Fc,u.unionWith=$c,u.uniq=Gc,u.uniqBy=qc,u.uniqWith=Nc,u.unset=Kg,u.unzip=Oi,u.unzipWith=Xs,u.update=zg,u.updateWith=Yg,u.values=Je,u.valuesIn=Zg,u.without=Hc,u.words=xf,u.wrap=Gh,u.xor=Kc,u.xorBy=zc,u.xorWith=Yc,u.zip=Zc,u.zipObject=Xc,u.zipObjectDeep=kc,u.zipWith=Jc,u.entries=_f,u.entriesIn=vf,u.extend=gf,u.extendWith=dr,$i(u,u),u.add=Zd,u.attempt=Af,u.camelCase=Qg,u.capitalize=wf,u.ceil=Xd,u.clamp=Xg,u.clone=Nh,u.cloneDeep=Kh,u.cloneDeepWith=zh,u.cloneWith=Hh,u.conformsTo=Yh,u.deburr=mf,u.defaultTo=Sd,u.divide=kd,u.endsWith=Vg,u.eq=zn,u.escape=jg,u.escapeRegExp=nd,u.every=fh,u.find=lh,u.findIndex=Hs,u.findKey=yg,u.findLast=ah,u.findLastIndex=Ks,u.findLastKey=Eg,u.floor=Jd,u.forEach=Js,u.forEachRight=Qs,u.forIn=Ig,u.forInRight=bg,u.forOwn=Sg,u.forOwnRight=Rg,u.get=Ui,u.gt=Zh,u.gte=Xh,u.has=Lg,u.hasIn=Bi,u.head=Ys,u.identity=vn,u.includes=ph,u.indexOf=ac,u.inRange=kg,u.invoke=Pg,u.isArguments=Ce,u.isArray=L,u.isArrayBuffer=kh,u.isArrayLike=pn,u.isArrayLikeObject=J,u.isBoolean=Jh,u.isBuffer=Ae,u.isDate=Qh,u.isElement=Vh,u.isEmpty=jh,u.isEqual=ng,u.isEqualWith=eg,u.isError=Wi,u.isFinite=tg,u.isFunction=oe,u.isInteger=sf,u.isLength=hr,u.isMap=ff,u.isMatch=rg,u.isMatchWith=ig,u.isNaN=ug,u.isNative=sg,u.isNil=og,u.isNull=fg,u.isNumber=of,u.isObject=Z,u.isObjectLike=k,u.isPlainObject=mt,u.isRegExp=Pi,u.isSafeInteger=lg,u.isSet=lf,u.isString=gr,u.isSymbol=yn,u.isTypedArray=ke,u.isUndefined=ag,u.isWeakMap=cg,u.isWeakSet=hg,u.join=pc,u.kebabCase=ed,u.last=Fn,u.lastIndexOf=_c,u.lowerCase=td,u.lowerFirst=rd,u.lt=gg,u.lte=dg,u.max=Qd,u.maxBy=Vd,u.mean=jd,u.meanBy=np,u.min=ep,u.minBy=tp,u.stubArray=qi,u.stubFalse=Ni,u.stubObject=qd,u.stubString=Nd,u.stubTrue=Hd,u.multiply=rp,u.nth=vc,u.noConflict=Pd,u.noop=Gi,u.now=lr,u.pad=id,u.padEnd=ud,u.padStart=sd,u.parseInt=fd,u.random=Jg,u.reduce=xh,u.reduceRight=Ah,u.repeat=od,u.replace=ld,u.result=Gg,u.round=ip,u.runInContext=a,u.sample=Eh,u.size=Sh,u.snakeCase=ad,u.some=Rh,u.sortedIndex=Ic,u.sortedIndexBy=bc,u.sortedIndexOf=Sc,u.sortedLastIndex=Rc,u.sortedLastIndexBy=Tc,u.sortedLastIndexOf=Oc,u.startCase=hd,u.startsWith=gd,u.subtract=up,u.sum=sp,u.sumBy=fp,u.template=dd,u.times=Kd,u.toFinite=le,u.toInteger=C,u.toLength=cf,u.toLower=pd,u.toNumber=$n,u.toSafeInteger=pg,u.toString=F,u.toUpper=_d,u.trim=vd,u.trimEnd=wd,u.trimStart=md,u.truncate=xd,u.unescape=Ad,u.uniqueId=Yd,u.upperCase=yd,u.upperFirst=Di,u.each=Js,u.eachRight=Qs,u.first=Ys,$i(u,function(){var n={};return kn(u,function(e,t){G.call(u.prototype,t)||(n[t]=e)}),n}(),{chain:!1}),u.VERSION=V,Pn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(n){u[n].placeholder=u}),Pn(["drop","take"],function(n,e){B.prototype[n]=function(t){t=t===o?1:nn(C(t),0);var r=this.__filtered__&&!e?new B(this):this.clone();return r.__filtered__?r.__takeCount__=fn(t,r.__takeCount__):r.__views__.push({size:fn(t,m),type:n+(r.__dir__<0?"Right":"")}),r},B.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}}),Pn(["filter","map","takeWhile"],function(n,e){var t=e+1,r=t==At||t==yr;B.prototype[n]=function(i){var s=this.clone();return s.__iteratees__.push({iteratee:b(i,3),type:t}),s.__filtered__=s.__filtered__||r,s}}),Pn(["head","last"],function(n,e){var t="take"+(e?"Right":"");B.prototype[n]=function(){return this[t](1).value()[0]}}),Pn(["initial","tail"],function(n,e){var t="drop"+(e?"":"Right");B.prototype[n]=function(){return this.__filtered__?new B(this):this[t](1)}}),B.prototype.compact=function(){return this.filter(vn)},B.prototype.find=function(n){return this.filter(n).head()},B.prototype.findLast=function(n){return this.reverse().find(n)},B.prototype.invokeMap=P(function(n,e){return typeof n=="function"?new B(this):this.map(function(t){return gt(t,n,e)})}),B.prototype.reject=function(n){return this.filter(cr(b(n)))},B.prototype.slice=function(n,e){n=C(n);var t=this;return t.__filtered__&&(n>0||e<0)?new B(t):(n<0?t=t.takeRight(-n):n&&(t=t.drop(n)),e!==o&&(e=C(e),t=e<0?t.dropRight(-e):t.take(e-n)),t)},B.prototype.takeRightWhile=function(n){return this.reverse().takeWhile(n).reverse()},B.prototype.toArray=function(){return this.take(m)},kn(B.prototype,function(n,e){var t=/^(?:filter|find|map|reject)|While$/.test(e),r=/^(?:head|last)$/.test(e),i=u[r?"take"+(e=="last"?"Right":""):e],s=r||/^find/.test(e);i&&(u.prototype[e]=function(){var f=this.__wrapped__,l=r?[1]:arguments,c=f instanceof B,p=l[0],_=c||L(f),v=function(U){var D=i.apply(u,de([U],l));return r&&A?D[0]:D};_&&t&&typeof p=="function"&&p.length!=1&&(c=_=!1);var A=this.__chain__,I=!!this.__actions__.length,S=s&&!A,W=c&&!I;if(!s&&_){f=W?f:new B(this);var R=n.apply(f,l);return R.__actions__.push({func:fr,args:[v],thisArg:o}),new Bn(R,A)}return S&&W?n.apply(this,l):(R=this.thru(v),S?r?R.value()[0]:R.value():R)})}),Pn(["pop","push","shift","sort","splice","unshift"],function(n){var e=Pt[n],t=/^(?:push|sort|unshift)$/.test(n)?"tap":"thru",r=/^(?:pop|shift)$/.test(n);u.prototype[n]=function(){var i=arguments;if(r&&!this.__chain__){var s=this.value();return e.apply(L(s)?s:[],i)}return this[t](function(f){return e.apply(L(f)?f:[],i)})}}),kn(B.prototype,function(n,e){var t=u[e];if(t){var r=t.name+"";G.call(Ke,r)||(Ke[r]=[]),Ke[r].push({name:e,func:t})}}),Ke[nr(o,jn).name]=[{name:"wrapper",func:o}],B.prototype.clone=Al,B.prototype.reverse=yl,B.prototype.value=El,u.prototype.at=Vc,u.prototype.chain=jc,u.prototype.commit=nh,u.prototype.next=eh,u.prototype.plant=rh,u.prototype.reverse=ih,u.prototype.toJSON=u.prototype.valueOf=u.prototype.value=uh,u.prototype.first=u.prototype.head,st&&(u.prototype[st]=th),u},Wt=nl();un._=Wt,Qe=function(){return Wt}.call(rn,X,rn,$),Qe!==o&&($.exports=Qe)}).call(this)},388:$=>{"use strict";$.exports=Hi}},ye={};function bn($){var rn=ye[$];if(rn!==void 0)return rn.exports;var X=ye[$]={id:$,loaded:!1,exports:{}};return We[$].call(X.exports,X,X.exports,bn),X.loaded=!0,X.exports}bn.d=($,rn)=>{for(var X in rn)bn.o(rn,X)&&!bn.o($,X)&&Object.defineProperty($,X,{enumerable:!0,get:rn[X]})},bn.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),bn.o=($,rn)=>Object.prototype.hasOwnProperty.call($,rn),bn.r=$=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty($,Symbol.toStringTag,{value:"Module"}),Object.defineProperty($,"__esModule",{value:!0})},bn.nmd=$=>($.paths=[],$.children||($.children=[]),$);var pr={};return(()=>{"use strict";bn.r(pr),bn.d(pr,{ProxyEvent:()=>ne,SSFGuest:()=>De});const rn={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let X;const Qe=new Uint8Array(16);function o(){if(!X&&(X=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!X))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return X(Qe)}const V=[];for(let m=0;m<256;++m)V.push((m+256).toString(16).slice(1));function Pe(m,h=0){return V[m[h+0]]+V[m[h+1]]+V[m[h+2]]+V[m[h+3]]+"-"+V[m[h+4]]+V[m[h+5]]+"-"+V[m[h+6]]+V[m[h+7]]+"-"+V[m[h+8]]+V[m[h+9]]+"-"+V[m[h+10]]+V[m[h+11]]+V[m[h+12]]+V[m[h+13]]+V[m[h+14]]+V[m[h+15]]}function Ki(m,h=0){const w=Pe(m,h);if(!validate(w))throw TypeError("Stringified UUID is invalid");return w}const wn=null;function _r(m,h,w){if(rn.randomUUID&&!h&&!m)return rn.randomUUID();m=m||{};const x=m.random||(m.rng||o)();if(x[6]=x[6]&15|64,x[8]=x[8]&63|128,h){w=w||0;for(let y=0;y<16;++y)h[w+y]=x[y];return h}return Pe(x)}const ce=_r;var vr=bn(918);const Ee="elli:remoting",Gn="elli:remoting:response",Ve="elli:remoting:exception",Sn=({messageType:m,messageBody:h,onewayMsg:w=!1})=>({requestId:w?null:ce(),source:Ee,type:m,body:h}),Vn=m=>{const{targetWin:h,targetOrigin:w,messageType:x,messageBody:y}=m,T=Sn({messageType:x,messageBody:y});h.postMessage(T,w)};class Ue{#o;#n;#e=new Map;#t=new Map;#r=null;#i=new Map;constructor(h,w){if(!h)throw new Error("logger is required");if(!w)throw new Error("correlationId is required");this.#o=w,this.#n=h}#l=()=>{const h=Date.now(),w=[];this.#t.forEach((x,y)=>{const{requestId:T,cancelTime:N}=x;this.#n.debug(`Checking response timeout for requestId: ${T}) @ ${N??""}`),x.cancelTime&&x.cancelTime<h&&(this.#n.debug(`Detected response timeout for requestId: ${T}...`),w.push(y),x.resolve(),this.#n.debug(`Aborted waiting for response to requestid: ${T})`))}),w.forEach(x=>{this.#n.debug(`removing invocations with requestId ${x} from cache since response time has expired`),this.#t.delete(x)}),this.#t.size===0&&(this.#n.debug("stopping response monitor"),this.#g())};#h=()=>{this.#r===null&&(this.#n.debug("Staring response timeout evaluator"),this.#r=window.setInterval(this.#l,200))};#g=()=>{this.#r!==null&&(window.clearInterval(this.#r),this.#r=null,this.#n.debug("Stopped response timeout evaluator"))};#a=h=>{const w=this.#t.get(h);return this.#n.debug(`serving requestId: ${h}`),this.#t.delete(h),w};#u=h=>{const{requestId:w}=h;this.#n.debug(`Response received for invocation requestId: ${w}`);const x=this.#a(w);return x?(x.resolve(h.body),!0):(this.#n.warn(`Received response to stale/invalid request with requestId: ${w}`),!1)};#s=h=>{this.#n.debug(`Exception received for invocation (requestId = ${h.requestId})`);const w=this.#a(h.requestId);return w?(w.reject(new Error(h.body)),!0):(this.#n.warn(`Received exception for stale/invalid request (requestId = ${h.requestId})`),!1)};#d=({sourceWin:h,sourceOrigin:w,message:x})=>{this.#n.debug(`Received message of type "${x.type}"`);const y=this.#e.get(x.type);return y?(y.forEach(T=>{this.#n.debug(`Invoking message handler ${T.name}`),T({sourceWin:h,sourceOrigin:w,requestId:x.requestId,type:x.type,body:x.body})}),!0):!1};#f=h=>{if(this.#n.debug(`Remoting: Received message ${JSON.stringify(h.data)}`),this.#i.size===0||!h.source)return!1;const w=this.#i.get(h.source);return!w||h?.data?.source!==Ee?!1:(h.data.type===Gn?this.#u(h.data):h.data.type===Ve?this.#s(h.data):this.#d({sourceWin:h.source,sourceOrigin:w,message:h.data}),!0)};addSender=h=>{const{origin:w,window:x}=h;if(!w)throw new Error("origin is required");if(!x)throw new Error("window is required");this.#i.set(x,w)};initialize=h=>{h.removeEventListener("message",this.#f),h.addEventListener("message",this.#f),this.#n.debug(`initialized remoting id: ${this.#o}`)};close=()=>{window.removeEventListener("message",this.#f),this.#n.debug(`closed remoting id: ${this.#o}`)};invoke=h=>{const{targetWin:w,targetOrigin:x,messageType:y,messageBody:T,responseTimeoutMs:N}=h;return new Promise((en,hn)=>{const gn=Sn({messageType:y,messageBody:T});this.#t.set(gn.requestId,{requestId:gn.requestId,resolve:en,reject:hn,cancelTime:N?Date.now()+Number.parseInt(N,10):null}),w.postMessage(gn,x);const{requestId:Cn}=gn;this.#n.debug(`Posted invocation message of type ${y} requestId: ${Cn||""}`),N&&(this.#n.debug(`starting response monitor for requestId: ${Cn||""} for ${N} ms`),this.#h())})};listen=h=>{const{messageType:w,callback:x}=h,y=this.#e.get(w)||[];y.push(x),this.#e.set(w,y)};send=h=>{const{targetWin:w,targetOrigin:x,messageType:y,messageBody:T}=h,N=Sn({messageType:y,messageBody:T,onewayMsg:!0});w.postMessage(N,x),this.#n.debug(`Posted one-way message of type "${y}"`)};removeSender=h=>{const{window:w}=h;w&&this.#i.delete(w)};respond=h=>{const{targetWin:w,targetOrigin:x,requestId:y,response:T}=h,N=Sn({messageType:Gn,messageBody:T});N.requestId=y,w.postMessage(N,x),this.#n.debug(`Response sent to caller for invocation requestId: ${y}`)};raiseException=h=>{const{targetWin:w,targetOrigin:x,requestId:y,ex:T}=h,N=Sn({messageType:Ve,messageBody:T});N.requestId=y,w.postMessage(N,x),this.#n.debug(`Exception sent to caller for invocation. requestId: ${y}`)}}var z=(m=>(m.GuestReady="guest:ready",m.GuestClose="guest:close",m.GuestReadyComplete="guest:readyComplete",m.GuestResize="guest:resize",m.GuestFocus="guest:focus",m.HandShake="handshake",m.HandShakeAck="handshake:ack",m.ObjectInvoke="object:invoke",m.ObjectGet="object:get",m.ObjectEvent="object:event",m.HostConfig="host:config",m))(z||{});class jn{scriptingObject;name;objectId;requiresFeedback;id;constructor(h){const{name:w,requiresFeedback:x=!1,so:y}=h;if(!w)throw new Error("Event name is required");if(!y)throw new Error("Scripting object is required");this.scriptingObject=y,this.objectId=y.id,this.name=w,this.id=`${this.objectId}.${this.name}`.toLowerCase(),this.requiresFeedback=x}}const wr=m=>m instanceof jn,Rn=(m,h)=>`${m.toLowerCase()}.${h.toLowerCase()}`;var Tn=bn(388);class On{id;objectType;constructor(h,w){this.id=h,this.objectType=w}}class ne{objectId;name;id;constructor(h){const{name:w,objectId:x}=h;this.objectId=x,this.name=w,this.id=`${this.objectId}.${this.name}`.toLowerCase()}}const Ln=()=>{const{parent:m}=window;try{return m?.location?.href}catch{return null}},he=m=>{if(!m||m==="about:blank")return"*";const{origin:h}=new URL(m);return h==="null"||!h?m:h},Be=()=>window.self!==window.parent,xt=(m,h)=>{const w=h||document.body,x=document.defaultView?.getComputedStyle?.(w,null),y=x?x[m]:"0";return parseInt(y,10)},mr=new RegExp("^https?://(.*.elliemae.io|.*.ellielabs.com|.*.ellieservices.com|.*.encompassloconnect.com|.*.ice.com|localhost:[0-9]+)","i"),xr="elli:remoting",Ar=()=>new Promise(m=>{Be()?m({origin:he(document.referrer||Ln()),window:window.parent}):window.addEventListener("message",h=>{if(mr.test(h.origin)){const{source:w,type:x}=h.data||{};if(w===xr&&x===z.HandShake){const{origin:y}=h,T=h.source;Vn({targetWin:T,targetOrigin:y,messageType:z.HandShakeAck,messageBody:{}}),m({origin:y,window:T})}}})});var At=(m=>(m.OBJECT="object",m.VALUE="value",m))(At||{});const yt=12e4,yr={eventFeedback:!0},Zn=()=>{const{document:m}=window,h=m.body,w=m.documentElement,y={height:h.offsetHeight+xt("marginTop")+xt("marginBottom"),width:Math.max(h.scrollWidth,w.scrollWidth)};Vn({targetWin:window.parent,targetOrigin:he(m.referrer||Ln()),messageType:z.GuestResize,messageBody:y}),window.removeEventListener("load",Zn)};Be()&&window.addEventListener("load",Zn);const Xn="https://api.ellielabs.com/diagnostics/v2/logging",Et=["click","scroll","keypress","touchstart"];class De{#o;#n;#e;#t=!1;#r=null;#i=!1;#l=new Map;#h=null;#g=null;#a=null;#u=null;#s=null;#d=!1;#f=null;#_=null;#v=null;#m=!1;#x=yt;#p=null;constructor(h){const{console:w=!1,url:x=window.__ICE__?.diagnosticsUrl||Xn,index:y,team:T,appName:N}=h?.logger||{};this.#d=h?.cacheAuthToken??!1,this.#m=h?.keepAlive??!1,this.#x=h?.keepAliveInterval??yt;const en=w?(0,Tn.Console)():(0,Tn.http)(x);this.#n=(0,Tn.logger)({transport:en,index:y,team:T,appName:N}),(0,Tn.webvitals)(this.#n),(0,Tn.logUnhandledErrors)(this.#n),this.#o=ce(),this.#e=new Ue(this.#n,this.#o),this.#n.audit({message:"Guest created",guestUrl:window.location.href,correlationId:this.#o})}#c=()=>({guestId:this.#h,guestTitle:this.#g,guestUrl:this.#a});#w=h=>{if(!h||!h.objectId)throw this.#n.error("Deserialization of scripting object failed. Object does not have an Object ID."),new Error("Cannot deserialize object JSON into proxy.");const w=new On(h.objectId,h.objectType);return h.functions&&h.functions.forEach(x=>{Object.defineProperty(w,x,{value:async(...y)=>this.#A({objectId:w.id,functionName:x,functionParams:[].slice.call(y)}),enumerable:!0})}),h.events&&h.events.forEach(x=>{Object.defineProperty(w,x,{value:new ne({objectId:w.id,name:x}),enumerable:!0})}),this.#n.debug(`Created guest proxy for scripting object (id = "${w.id}")`),w};#A=async({objectId:h,functionName:w,functionParams:x})=>{this.#n.debug(`Invoking scripting object method ${h}.${w}()...`);const y=[];if(x)for(let en=0;en<x.length;en+=1){const hn=x[en];hn instanceof Promise&&y.push(hn.then(gn=>{x[en]=gn}))}await Promise.all(y);const T=await this.#e.invoke({targetWin:this.#s,targetOrigin:this.#u,messageType:z.ObjectInvoke,messageBody:{objectId:h,functionName:w,functionParams:x}}),N=this.#y(T);return this.#n.audit({message:"Guest proxy invoked Scripting Object method",scriptingObject:h,scriptingMethod:w,...this.#c()}),N};#y=h=>h?.type==="object"&&"object"in h?this.#w(h.object):h?.type==="value"?h.value:h;#E=({body:h})=>{h?.logLevel&&(this.#n.setLogLevel(h.logLevel),this.#n.debug(`Log level changed by host to ${h.logLevel}`)),this.#h=h?.guestId??null,this.#g=h?.guestTitle??null,this.#a=h?.guestUrl??null,this.#n.audit({message:"Received configuration from Host",...this.#c()})};#I=()=>{window.focus()};#b=async({sourceWin:h,sourceOrigin:w,requestId:x,body:y})=>{const T=this.#w(y.object);if(T){const N=Rn(T.id,y.eventName);this.#n.debug(`Received event "${N}" from host`);let en;y.eventHandler?en=[{callback:window[y.eventHandler],token:ce()}]:en=this.#l.get(N)||[];const hn=[];if(en.forEach(gn=>{if(gn?.callback){this.#n.debug(`Invoking event subscriber ${gn.callback.name} for event ${N}`);const Cn=gn.callback({obj:T,eventName:y.eventName,eventParams:y.eventParams,eventOptions:y.eventOptions});Cn instanceof Promise?hn.push(Cn):typeof Cn<"u"&&hn.push(Promise.resolve(Cn))}}),x){const gn=await Promise.all(hn);this.#e.respond({targetWin:h,targetOrigin:w,requestId:x,response:gn}),this.#n.audit({message:"Guest proxy processed event from host and responded",scriptingEventId:N,scriptingObject:T.id,...this.#c()})}else this.#n.audit({message:"Guest proxy processed event from host",scriptingEventId:N,scriptingObject:T.id,...this.#c()})}};#S=async()=>{!this.#f||!this.#_||!this.#v||await fetch(`${this.#v}/oauth2/v1/token/introspection`,{headers:{"content-type":"application/x-www-form-urlencoded;charset=UTF-8"},body:`token=${this.#f}&client_id=${this.#_}`,method:"POST"})};#R=async()=>{if(this.#m)try{const h=await this.getObject("Application");h&&(this.#p=(0,vr.throttle)(async()=>{try{await h.keepSessionAlive(),await this.#S()}catch(w){this.#n.error(`Error keeping session alive. ${w.message}`)}},this.#x,{leading:!1}),Et.forEach(w=>{document.addEventListener(w,this.#p)}))}catch(h){this.#n.error(`Error getting application object. ${h.message}`)}};addScript=async(h,w)=>{if(!this.#t&&h){await this.connect();const x=document.createElement("script");x.setAttribute("src",h),await new Promise(y=>{const T=()=>{x?.removeEventListener?.("load",T),this.#t=!0,y()};x.addEventListener("load",T),this.#r=w.appendChild(x)})}};close=()=>{this.#i&&(this.#e.send({targetWin:this.#s,targetOrigin:this.#u,messageType:z.GuestClose,messageBody:{}}),this.#e.removeSender({origin:this.#u,window:this.#s}),this.#e.close(),this.#p&&Et.forEach(h=>{document.removeEventListener(h,this.#p)}),this.#i=!1,this.#n.audit({message:"Guest disconnected from host",...this.#c()}),this.#h=null,this.#a=null,this.#g=null)};connect=async h=>{if(!this.#i){let w=window,x={...yr};if(h){w=h.window||w;const T={...h};delete T.window,x=Object.assign(x,T)}const y=await Ar();this.#u=y.origin,this.#s=y.window,this.#e.initialize(w),this.#e.addSender({origin:this.#u,window:this.#s}),this.#e.listen({messageType:z.ObjectEvent,callback:this.#b.bind(this)}),this.#e.listen({messageType:z.HostConfig,callback:this.#E.bind(this)}),this.#e.listen({messageType:z.GuestFocus,callback:this.#I.bind(this)}),this.#e.send({targetWin:this.#s,targetOrigin:this.#u,messageType:z.GuestReady,messageBody:x}),this.#i=!0,this.#n.audit({message:"Guest connected to host",guestUrl:window.location.href}),await this.getAuthToken(),await this.#R()}};getAuthToken=async()=>{if(!this.#d)return null;if(!this.#f)try{const h=await this.getObject("Auth");if(h){const w=await h.getAccessToken();this.#f=w?.access_token,this.#v=w?.host_name,this.#_=w?.client_id}}catch(h){console.dir(h,{depth:null}),this.#n.error(`Error getting access token from auth object. ${h.message}`)}return this.#f};getObject=async h=>{this.#n.debug(`Retrieving scripting object "${h}" from host...`);const w=await this.#e.invoke({targetWin:this.#s,targetOrigin:this.#u,messageType:z.ObjectGet,messageBody:{objectId:h}}),x=this.#w(w.object);return this.#n.audit({message:"Received scripting object from host",scriptingObject:h,...this.#c()}),x};removeScript=()=>{if(this.#t&&this.#r){const{parentNode:h}=this.#r;h?.removeChild?.(this.#r)}};setLogLevel=h=>{this.#n.setLogLevel(h),this.#n.debug(`Log level changed by guest to ${h}`)};subscribe=h=>{const{eventId:w,callback:x}=h;this.#n.debug(`Registering subscription for event ${w}`);const y=this.#l.get(w)||[],T=ce();return y.push({callback:x,token:T}),this.#l.set(w,y),T};unsubscribe=h=>{const{eventId:w,token:x}=h;let y=this.#l.get(w);y&&(y=y.filter(T=>T.token!==x),this.#l.set(w,y))}}})(),pr})());
|
|
28
28
|
|
|
29
|
-
//# sourceMappingURL=emuiSsfGuest.
|
|
29
|
+
//# sourceMappingURL=emuiSsfGuest.dbfd586165d44ec4850e.js.map
|
|
Binary file
|
|
Binary file
|