@pendo/agent 2.283.0 → 2.284.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/dist/debugger-plugin.min.js +1 -1
- package/dist/dom.esm.js +1 -1
- package/dist/pendo.debugger.min.js +1 -1
- package/dist/pendo.module.js +397 -4605
- package/dist/pendo.module.min.js +11 -11
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(){"use strict";class t{constructor(t,e){this.path=t,this.handler=e}}class e{routes={};addRoute(e,n){this.routes[e]||(this.routes[e]=[]),this.routes[e].unshift(new t(e,n))}removeRoute(t){this.routes[t].shift()}lookupRouteProvider(){return t=>this.routes[t]?this.routes[t][0].handler:void 0}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var o=Array.isArray,i="object"==typeof n&&n&&n.Object===Object&&n,a=i,s="object"==typeof self&&self&&self.Object===Object&&self,c=a||s||Function("return this")(),u=c.Symbol,d=u,l=Object.prototype,p=l.hasOwnProperty,f=l.toString,h=d?d.toStringTag:void 0;var g=function(t){var e=p.call(t,h),n=t[h];try{t[h]=void 0;var r=!0}catch(t){}var o=f.call(t);return r&&(e?t[h]=n:delete t[h]),o},v=Object.prototype.toString;var b=g,y=function(t){return v.call(t)},m=u?u.toStringTag:void 0;var w=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":m&&m in Object(t)?b(t):y(t)};var j=function(t){return null!=t&&"object"==typeof t},_=w,T=j;var P=function(t){return"symbol"==typeof t||T(t)&&"[object Symbol]"==_(t)},O=o,I=P,A=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,C=/^\w*$/;var E=function(t,e){if(O(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!I(t))||(C.test(t)||!A.test(t)||null!=e&&t in Object(e))};var S=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},x=w,R=S;var z,N=function(t){if(!R(t))return!1;var e=x(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},D=r(N),M=c["__core-js_shared__"],$=(z=/[^.]+$/.exec(M&&M.keys&&M.keys.IE_PROTO||""))?"Symbol(src)_1."+z:"";var H=function(t){return!!$&&$ in t},k=Function.prototype.toString;var W=function(t){if(null!=t){try{return k.call(t)}catch(t){}try{return t+""}catch(t){}}return""},L=N,U=H,F=S,G=W,B=/^\[object .+?Constructor\]$/,q=Function.prototype,Q=Object.prototype,V=q.toString,K=Q.hasOwnProperty,J=RegExp("^"+V.call(K).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var X=function(t){return!(!F(t)||U(t))&&(L(t)?J:B).test(G(t))},Y=function(t,e){return null==t?void 0:t[e]};var Z=function(t,e){var n=Y(t,e);return X(n)?n:void 0},tt=Z(Object,"create"),et=tt;var nt=function(){this.__data__=et?et(null):{},this.size=0};var rt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},ot=tt,it=Object.prototype.hasOwnProperty;var at=function(t){var e=this.__data__;if(ot){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return it.call(e,t)?e[t]:void 0},st=tt,ct=Object.prototype.hasOwnProperty;var ut=tt;var dt=nt,lt=rt,pt=at,ft=function(t){var e=this.__data__;return st?void 0!==e[t]:ct.call(e,t)},ht=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=ut&&void 0===e?"__lodash_hash_undefined__":e,this};function gt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}gt.prototype.clear=dt,gt.prototype.delete=lt,gt.prototype.get=pt,gt.prototype.has=ft,gt.prototype.set=ht;var vt=gt;var bt=function(){this.__data__=[],this.size=0};var yt=function(t,e){return t===e||t!=t&&e!=e},mt=yt;var wt=function(t,e){for(var n=t.length;n--;)if(mt(t[n][0],e))return n;return-1},jt=wt,_t=Array.prototype.splice;var Tt=wt;var Pt=wt;var Ot=wt;var It=bt,At=function(t){var e=this.__data__,n=jt(e,t);return!(n<0)&&(n==e.length-1?e.pop():_t.call(e,n,1),--this.size,!0)},Ct=function(t){var e=this.__data__,n=Tt(e,t);return n<0?void 0:e[n][1]},Et=function(t){return Pt(this.__data__,t)>-1},St=function(t,e){var n=this.__data__,r=Ot(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this};function xt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}xt.prototype.clear=It,xt.prototype.delete=At,xt.prototype.get=Ct,xt.prototype.has=Et,xt.prototype.set=St;var Rt=xt,zt=Z(c,"Map"),Nt=vt,Dt=Rt,Mt=zt;var $t=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var Ht=function(t,e){var n=t.__data__;return $t(e)?n["string"==typeof e?"string":"hash"]:n.map},kt=Ht;var Wt=Ht;var Lt=Ht;var Ut=Ht;var Ft=function(){this.size=0,this.__data__={hash:new Nt,map:new(Mt||Dt),string:new Nt}},Gt=function(t){var e=kt(this,t).delete(t);return this.size-=e?1:0,e},Bt=function(t){return Wt(this,t).get(t)},qt=function(t){return Lt(this,t).has(t)},Qt=function(t,e){var n=Ut(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this};function Vt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}Vt.prototype.clear=Ft,Vt.prototype.delete=Gt,Vt.prototype.get=Bt,Vt.prototype.has=qt,Vt.prototype.set=Qt;var Kt=Vt,Jt=Kt;function Xt(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var a=t.apply(this,r);return n.cache=i.set(o,a)||i,a};return n.cache=new(Xt.Cache||Jt),n}Xt.Cache=Jt;var Yt=Xt;var Zt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,te=/\\(\\)?/g,ee=function(t){var e=Yt(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(Zt,(function(t,n,r,o){e.push(r?o.replace(te,"$1"):n||t)})),e}));var ne=function(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o},re=ne,oe=o,ie=P,ae=u?u.prototype:void 0,se=ae?ae.toString:void 0;var ce=function t(e){if("string"==typeof e)return e;if(oe(e))return re(e,t)+"";if(ie(e))return se?se.call(e):"";var n=e+"";return"0"==n&&1/e==-Infinity?"-0":n},ue=ce;var de=function(t){return null==t?"":ue(t)},le=o,pe=E,fe=ee,he=de;var ge=function(t,e){return le(t)?t:pe(t,e)?[t]:fe(he(t))},ve=P;var be=function(t){if("string"==typeof t||ve(t))return t;var e=t+"";return"0"==e&&1/t==-Infinity?"-0":e},ye=ge,me=be;var we=function(t,e){for(var n=0,r=(e=ye(e,t)).length;null!=t&&n<r;)t=t[me(e[n++])];return n&&n==r?t:void 0},je=we;var _e=r((function(t,e,n){var r=null==t?void 0:je(t,e);return void 0===r?n:r}));class Te{app=null;router=null;destination=window.parent||window.top;origin="*";constructor(t,e={}){this.app=t,this.router=t.router,this.config=e,this.events=t.PluginAPI.getEventable()}getConfig(t,e){return _e(this.config,t,e)}getDestinationProvider(){return()=>this.destination}getOriginProvider(){return()=>this.origin}triggerOpened(){this.events.trigger("opened",{containerType:this.type})}triggerClosed(){this.events.trigger("closed",{containerType:this.type})}}var Pe={padding:"0 !important",margin:"0 !important","box-sizing":"border-box !important",border:"none !important",display:"block !important",visibility:"visible !important"},Oe=2147483647,Ie={WINDOW_MARGIN:10,HEADER_HEIGHT:50,TOP:100,LEFT:100,HEIGHT:700,WIDTH:500,MIN_HEIGHT:500,MIN_WIDTH:500};const{MIN_HEIGHT:Ae,MIN_WIDTH:Ce,WINDOW_MARGIN:Ee}=Ie;function Se(t,e,n,r,o){let i=0,a=0,s=0,c=0;function u(n){n.preventDefault(),e.css({visibility:"hidden"}),t.releasePointerCapture(n.pointerId),t.removeEventListener("pointermove",d),o()}function d(t){-1===t.button&&0!==t.buttons?(t.preventDefault(),s=i-t.clientX,c=a-t.clientY,i=t.clientX,a=t.clientY,r(s,c)):u(t)}t.addEventListener("pointerdown",(function(r){if(0!==r.button)return;r.preventDefault(),e.css({visibility:"visible"}),i=r.clientX,a=r.clientY,t.setPointerCapture(r.pointerId),t.addEventListener("pointermove",d),n()})),t.addEventListener("pointerup",u),t.addEventListener("pointerout",u)}function xe(t,e){const n=t.offsetLeft-e,r=window.innerWidth-t.offsetWidth-Ee;return n<Ee||r<Ee?Ee:n>r?r:n}function Re(t,e){const n=t.offsetTop-e,r=window.innerHeight-t.offsetHeight-Ee;return n<Ee||r<Ee?Ee:n>r?r:n}function ze(t,e){const n=t.offsetWidth-e,r=window.innerWidth-t.offsetLeft-Ee;return n>r?r:n<Ce?Ce:n}function Ne(t,e){const n=t.offsetHeight-e,r=window.innerHeight-t.offsetTop-Ee;return n>r?r:n<Ae?Ae:n}class De extends Te{type="frame";destination=window.parent||window.top;origin=window.location.origin;constructor(t,e){super(t,e);const{pendo:n,PluginAPI:r}=t,o=this.getConfig("containerId","pendo-client-app");this.container=n.dom(`<div id="${o}" class="pendo-ignore">`).css({...Pe,height:t.state.height,width:t.state.width,"z-index":Oe-1,"background-color":"#FFFFFF",position:"fixed","box-shadow":"rgb(136, 136, 136) 0px 0px 20px 0px",overflow:"hidden"}),this.handle=n.dom('<div id="pendo-app-draggable-handle">').css({...Pe,"z-index":Oe,height:Ie.HEADER_HEIGHT,width:"calc(100% - 100px)",position:"absolute",cursor:"grab"}).on("dblclick",(()=>{t.state.minimized||(this.container.css({height:Ie.HEIGHT,width:Ie.WIDTH,transition:"all 250ms linear"}),setTimeout((()=>{this.container&&(this.container.css({transition:"none"}),this.saveSize())}),250))})).appendTo(this.container),this.resizeHandle=n.dom('<div id="pendo-app-resize-handle">').css({...Pe,"z-index":Oe,visibility:this.app.state.minimized?"hidden":"visible",height:0,width:0,"border-left":"10px solid transparent","border-bottom":"10px solid rgb(136, 136, 136)",cursor:"nwse-resize",position:"absolute",bottom:0,right:0}).appendTo(this.container),this.frame=n.dom('<iframe id="pendo-agent-application" src="about:blank">').css({...Pe,height:"100%",width:"100%"}).on("load",(()=>{if(r.ConfigReader.get("inlineStyleNonce")){const t=this.frame[0].contentDocument.createElement.bind(this.frame[0].contentDocument);this.frame[0].contentDocument.createElement=(e,...n)=>{const o=t(e,...n);if("style"===e){const t=r.ConfigReader.get("inlineStyleNonce");t&&o.setAttribute("nonce",t)}return o}}const e=document.createElement("script");var o;e.src=(o=n,o&&o.trustedTypesPolicy?o.trustedTypesPolicy:{createScriptURL:t=>t}).createScriptURL(r.getAssetUrl(t.assetName)),this.frame[0].contentDocument.body.appendChild(e),this.frame[0].contentWindow.ignoreIframeMonitor=!0,this.triggerOpened()})).appendTo(this.container),this.blockout=n.dom('<div id="pendo-app-dragging-blockout">').css({"z-index":Oe-2,position:"absolute",height:"100%",width:"100%",top:0,left:0,visibility:"hidden"}).appendTo(n.dom.getBody()),this.elements=[this.container,this.blockout],this.positionFrame=t=>{let{left:e,top:n,height:r}=t;const{minimized:o,width:i}=t;e=e||Ie.LEFT,n=n||Ie.TOP,r=o?Ie.HEADER_HEIGHT:r,e=xe({offsetLeft:e,offsetWidth:i},0),n=Re({offsetTop:n,offsetHeight:r},0),this.container.css({left:e,top:n,height:r}),this.savePosition()},this.saveSize=()=>{const{offsetHeight:t,offsetWidth:e}=this.container[0];t&&e&&this.app.setProperties({height:t,width:e})},this.savePosition=()=>{const{offsetLeft:t,offsetTop:e}=this.container[0];t&&e&&this.app.setProperties({left:t,top:e})},this.toggleMinimize=()=>{this.app.setProperties({minimized:!this.app.state.minimized}),this.resizeHandle.css({visibility:this.app.state.minimized?"hidden":"visible"}),this.positionFrame(this.app.state)},this.positionFrame(this.app.state),function(t,e){const n=t.handle[0],r=t.container[0];Se(n,t.blockout,(function(){n.style.cursor="grabbing"}),(function(t,e){r.style.left=`${xe(r,t)}px`,r.style.top=`${Re(r,e)}px`}),(function(){n.style.cursor="grab",e()}))}(this,this.savePosition),function(t,e){const n=t.resizeHandle[0],r=t.container[0];Se(n,t.blockout,(()=>{}),(function(t,e){r.style.width=`${ze(r,t)}px`,r.style.height=`${Ne(r,e)}px`}),e)}(this,this.saveSize),window.addEventListener("resize",s),this.listeners=[["resize",s]];const i=n._.throttle((()=>function(t){const e=t.offsetLeft+t.offsetWidth+Ee-window.innerWidth;e>0&&(t.style.left=`${xe(t,e)}px`,t.offsetWidth>Ce&&(t.style.width=`${ze(t,e)}px`));const n=t.offsetTop+t.offsetHeight+Ee-window.innerHeight;n>0&&(t.style.top=`${Re(t,n)}px`,t.offsetHeight>Ae&&(t.style.height=`${Ne(t,n)}px`))}(this.container[0])),10),a=n._.debounce((()=>{this.savePosition(),this.saveSize()}),1e3);function s(){i(),a()}}open(){return this.router.addRoute("app::toggleMinimize",this.toggleMinimize),this.container.appendTo(this.app.pendo.dom.getBody()),Promise.resolve()}close(){this.router.removeRoute("app::toggleMinimize"),this.listeners.forEach((([t,e])=>window.removeEventListener(t,e))),this.elements.forEach((t=>t.remove())),this.triggerClosed()}}var Me=c,$e=/\s/;var He=function(t){for(var e=t.length;e--&&$e.test(t.charAt(e)););return e},ke=/^\s+/;var We=function(t){return t?t.slice(0,He(t)+1).replace(ke,""):t},Le=S,Ue=P,Fe=/^[-+]0x[0-9a-f]+$/i,Ge=/^0b[01]+$/i,Be=/^0o[0-7]+$/i,qe=parseInt;var Qe=S,Ve=function(){return Me.Date.now()},Ke=function(t){if("number"==typeof t)return t;if(Ue(t))return NaN;if(Le(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=Le(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=We(t);var n=Ge.test(t);return n||Be.test(t)?qe(t.slice(2),n?2:8):Fe.test(t)?NaN:+t},Je=Math.max,Xe=Math.min;var Ye=function(t,e,n){var r,o,i,a,s,c,u=0,d=!1,l=!1,p=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function f(e){var n=r,i=o;return r=o=void 0,u=e,a=t.apply(i,n)}function h(t){var n=t-c;return void 0===c||n>=e||n<0||l&&t-u>=i}function g(){var t=Ve();if(h(t))return v(t);s=setTimeout(g,function(t){var n=e-(t-c);return l?Xe(n,i-(t-u)):n}(t))}function v(t){return s=void 0,p&&r?f(t):(r=o=void 0,a)}function b(){var t=Ve(),n=h(t);if(r=arguments,o=this,c=t,n){if(void 0===s)return function(t){return u=t,s=setTimeout(g,e),d?f(t):a}(c);if(l)return clearTimeout(s),s=setTimeout(g,e),f(c)}return void 0===s&&(s=setTimeout(g,e)),a}return e=Ke(e)||0,Qe(n)&&(d=!!n.leading,i=(l="maxWait"in n)?Je(Ke(n.maxWait)||0,e):i,p="trailing"in n?!!n.trailing:p),b.cancel=function(){void 0!==s&&clearTimeout(s),u=0,r=c=o=s=void 0},b.flush=function(){return void 0===s?a:v(Ve())},b},Ze=Ye,tn=S;var en=r((function(t,e,n){var r=!0,o=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return tn(n)&&(r="leading"in n?!!n.leading:r,o="trailing"in n?!!n.trailing:o),Ze(t,e,{leading:r,maxWait:e,trailing:o})})),nn=de,rn=0;var on=r((function(t){var e=++rn;return nn(t)+e})),an=Rt;var sn=Rt,cn=zt,un=Kt;var dn=Rt,ln=function(){this.__data__=new an,this.size=0},pn=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},fn=function(t){return this.__data__.get(t)},hn=function(t){return this.__data__.has(t)},gn=function(t,e){var n=this.__data__;if(n instanceof sn){var r=n.__data__;if(!cn||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new un(r)}return n.set(t,e),this.size=n.size,this};function vn(t){var e=this.__data__=new dn(t);this.size=e.size}vn.prototype.clear=ln,vn.prototype.delete=pn,vn.prototype.get=fn,vn.prototype.has=hn,vn.prototype.set=gn;var bn=vn;var yn=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t},mn=Z,wn=function(){try{var t=mn(Object,"defineProperty");return t({},"",{}),t}catch(t){}}(),jn=wn;var _n=function(t,e,n){"__proto__"==e&&jn?jn(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Tn=_n,Pn=yt,On=Object.prototype.hasOwnProperty;var In=function(t,e,n){var r=t[e];On.call(t,e)&&Pn(r,n)&&(void 0!==n||e in t)||Tn(t,e,n)},An=In,Cn=_n;var En=function(t,e,n,r){var o=!n;n||(n={});for(var i=-1,a=e.length;++i<a;){var s=e[i],c=r?r(n[s],t[s],s,n,t):void 0;void 0===c&&(c=t[s]),o?Cn(n,s,c):An(n,s,c)}return n};var Sn=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r},xn=w,Rn=j;var zn=function(t){return Rn(t)&&"[object Arguments]"==xn(t)},Nn=j,Dn=Object.prototype,Mn=Dn.hasOwnProperty,$n=Dn.propertyIsEnumerable,Hn=zn(function(){return arguments}())?zn:function(t){return Nn(t)&&Mn.call(t,"callee")&&!$n.call(t,"callee")},kn=Hn,Wn={exports:{}};var Ln=function(){return!1};!function(t,e){var n=c,r=Ln,o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,a=i&&i.exports===o?n.Buffer:void 0,s=(a?a.isBuffer:void 0)||r;t.exports=s}(Wn,Wn.exports);var Un=Wn.exports,Fn=/^(?:0|[1-9]\d*)$/;var Gn=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&Fn.test(t))&&t>-1&&t%1==0&&t<e};var Bn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},qn=w,Qn=Bn,Vn=j,Kn={};Kn["[object Float32Array]"]=Kn["[object Float64Array]"]=Kn["[object Int8Array]"]=Kn["[object Int16Array]"]=Kn["[object Int32Array]"]=Kn["[object Uint8Array]"]=Kn["[object Uint8ClampedArray]"]=Kn["[object Uint16Array]"]=Kn["[object Uint32Array]"]=!0,Kn["[object Arguments]"]=Kn["[object Array]"]=Kn["[object ArrayBuffer]"]=Kn["[object Boolean]"]=Kn["[object DataView]"]=Kn["[object Date]"]=Kn["[object Error]"]=Kn["[object Function]"]=Kn["[object Map]"]=Kn["[object Number]"]=Kn["[object Object]"]=Kn["[object RegExp]"]=Kn["[object Set]"]=Kn["[object String]"]=Kn["[object WeakMap]"]=!1;var Jn=function(t){return Vn(t)&&Qn(t.length)&&!!Kn[qn(t)]};var Xn=function(t){return function(e){return t(e)}},Yn={exports:{}};!function(t,e){var n=i,r=e&&!e.nodeType&&e,o=r&&t&&!t.nodeType&&t,a=o&&o.exports===r&&n.process,s=function(){try{var t=o&&o.require&&o.require("util").types;return t||a&&a.binding&&a.binding("util")}catch(t){}}();t.exports=s}(Yn,Yn.exports);var Zn=Yn.exports,tr=Jn,er=Xn,nr=Zn&&Zn.isTypedArray,rr=nr?er(nr):tr,or=Sn,ir=kn,ar=o,sr=Un,cr=Gn,ur=rr,dr=Object.prototype.hasOwnProperty;var lr=function(t,e){var n=ar(t),r=!n&&ir(t),o=!n&&!r&&sr(t),i=!n&&!r&&!o&&ur(t),a=n||r||o||i,s=a?or(t.length,String):[],c=s.length;for(var u in t)!e&&!dr.call(t,u)||a&&("length"==u||o&&("offset"==u||"parent"==u)||i&&("buffer"==u||"byteLength"==u||"byteOffset"==u)||cr(u,c))||s.push(u);return s},pr=Object.prototype;var fr=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||pr)};var hr=function(t,e){return function(n){return t(e(n))}},gr=hr(Object.keys,Object),vr=fr,br=gr,yr=Object.prototype.hasOwnProperty;var mr=N,wr=Bn;var jr=function(t){return null!=t&&wr(t.length)&&!mr(t)},_r=lr,Tr=function(t){if(!vr(t))return br(t);var e=[];for(var n in Object(t))yr.call(t,n)&&"constructor"!=n&&e.push(n);return e},Pr=jr;var Or=function(t){return Pr(t)?_r(t):Tr(t)},Ir=En,Ar=Or;var Cr=function(t,e){return t&&Ir(e,Ar(e),t)};var Er=S,Sr=fr,xr=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},Rr=Object.prototype.hasOwnProperty;var zr=lr,Nr=function(t){if(!Er(t))return xr(t);var e=Sr(t),n=[];for(var r in t)("constructor"!=r||!e&&Rr.call(t,r))&&n.push(r);return n},Dr=jr;var Mr=function(t){return Dr(t)?zr(t,!0):Nr(t)},$r=En,Hr=Mr;var kr=function(t,e){return t&&$r(e,Hr(e),t)},Wr={exports:{}};!function(t,e){var n=c,r=e&&!e.nodeType&&e,o=r&&t&&!t.nodeType&&t,i=o&&o.exports===r?n.Buffer:void 0,a=i?i.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=a?a(n):new t.constructor(n);return t.copy(r),r}}(Wr,Wr.exports);var Lr=Wr.exports;var Ur=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e};var Fr=function(){return[]},Gr=function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var a=t[n];e(a,n,t)&&(i[o++]=a)}return i},Br=Fr,qr=Object.prototype.propertyIsEnumerable,Qr=Object.getOwnPropertySymbols,Vr=Qr?function(t){return null==t?[]:(t=Object(t),Gr(Qr(t),(function(e){return qr.call(t,e)})))}:Br,Kr=En,Jr=Vr;var Xr=function(t,e){return Kr(t,Jr(t),e)};var Yr=function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t},Zr=hr(Object.getPrototypeOf,Object),to=Yr,eo=Zr,no=Vr,ro=Fr,oo=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)to(e,no(t)),t=eo(t);return e}:ro,io=En,ao=oo;var so=function(t,e){return io(t,ao(t),e)},co=Yr,uo=o;var lo=function(t,e,n){var r=e(t);return uo(t)?r:co(r,n(t))},po=lo,fo=Vr,ho=Or;var go=function(t){return po(t,ho,fo)},vo=lo,bo=oo,yo=Mr;var mo=function(t){return vo(t,yo,bo)},wo=Z(c,"DataView"),jo=zt,_o=Z(c,"Promise"),To=Z(c,"Set"),Po=Z(c,"WeakMap"),Oo=w,Io=W,Ao="[object Map]",Co="[object Promise]",Eo="[object Set]",So="[object WeakMap]",xo="[object DataView]",Ro=Io(wo),zo=Io(jo),No=Io(_o),Do=Io(To),Mo=Io(Po),$o=Oo;(wo&&$o(new wo(new ArrayBuffer(1)))!=xo||jo&&$o(new jo)!=Ao||_o&&$o(_o.resolve())!=Co||To&&$o(new To)!=Eo||Po&&$o(new Po)!=So)&&($o=function(t){var e=Oo(t),n="[object Object]"==e?t.constructor:void 0,r=n?Io(n):"";if(r)switch(r){case Ro:return xo;case zo:return Ao;case No:return Co;case Do:return Eo;case Mo:return So}return e});var Ho=$o,ko=Object.prototype.hasOwnProperty;var Wo=function(t){var e=t.length,n=new t.constructor(e);return e&&"string"==typeof t[0]&&ko.call(t,"index")&&(n.index=t.index,n.input=t.input),n},Lo=c.Uint8Array;var Uo=function(t){var e=new t.constructor(t.byteLength);return new Lo(e).set(new Lo(t)),e},Fo=Uo;var Go=function(t,e){var n=e?Fo(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)},Bo=/\w*$/;var qo=function(t){var e=new t.constructor(t.source,Bo.exec(t));return e.lastIndex=t.lastIndex,e},Qo=u?u.prototype:void 0,Vo=Qo?Qo.valueOf:void 0;var Ko=Uo;var Jo=Uo,Xo=Go,Yo=qo,Zo=function(t){return Vo?Object(Vo.call(t)):{}},ti=function(t,e){var n=e?Ko(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};var ei=function(t,e,n){var r=t.constructor;switch(e){case"[object ArrayBuffer]":return Jo(t);case"[object Boolean]":case"[object Date]":return new r(+t);case"[object DataView]":return Xo(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return ti(t,n);case"[object Map]":case"[object Set]":return new r;case"[object Number]":case"[object String]":return new r(t);case"[object RegExp]":return Yo(t);case"[object Symbol]":return Zo(t)}},ni=S,ri=Object.create,oi=function(){function t(){}return function(e){if(!ni(e))return{};if(ri)return ri(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}(),ii=Zr,ai=fr;var si=function(t){return"function"!=typeof t.constructor||ai(t)?{}:oi(ii(t))},ci=Ho,ui=j;var di=function(t){return ui(t)&&"[object Map]"==ci(t)},li=Xn,pi=Zn&&Zn.isMap,fi=pi?li(pi):di,hi=Ho,gi=j;var vi=function(t){return gi(t)&&"[object Set]"==hi(t)},bi=Xn,yi=Zn&&Zn.isSet,mi=yi?bi(yi):vi,wi=bn,ji=yn,_i=In,Ti=Cr,Pi=kr,Oi=Lr,Ii=Ur,Ai=Xr,Ci=so,Ei=go,Si=mo,xi=Ho,Ri=Wo,zi=ei,Ni=si,Di=o,Mi=Un,$i=fi,Hi=S,ki=mi,Wi=Or,Li=Mr,Ui="[object Arguments]",Fi="[object Function]",Gi="[object Object]",Bi={};Bi[Ui]=Bi["[object Array]"]=Bi["[object ArrayBuffer]"]=Bi["[object DataView]"]=Bi["[object Boolean]"]=Bi["[object Date]"]=Bi["[object Float32Array]"]=Bi["[object Float64Array]"]=Bi["[object Int8Array]"]=Bi["[object Int16Array]"]=Bi["[object Int32Array]"]=Bi["[object Map]"]=Bi["[object Number]"]=Bi[Gi]=Bi["[object RegExp]"]=Bi["[object Set]"]=Bi["[object String]"]=Bi["[object Symbol]"]=Bi["[object Uint8Array]"]=Bi["[object Uint8ClampedArray]"]=Bi["[object Uint16Array]"]=Bi["[object Uint32Array]"]=!0,Bi["[object Error]"]=Bi[Fi]=Bi["[object WeakMap]"]=!1;var qi=function t(e,n,r,o,i,a){var s,c=1&n,u=2&n,d=4&n;if(r&&(s=i?r(e,o,i,a):r(e)),void 0!==s)return s;if(!Hi(e))return e;var l=Di(e);if(l){if(s=Ri(e),!c)return Ii(e,s)}else{var p=xi(e),f=p==Fi||"[object GeneratorFunction]"==p;if(Mi(e))return Oi(e,c);if(p==Gi||p==Ui||f&&!i){if(s=u||f?{}:Ni(e),!c)return u?Ci(e,Pi(s,e)):Ai(e,Ti(s,e))}else{if(!Bi[p])return i?e:{};s=zi(e,p,c)}}a||(a=new wi);var h=a.get(e);if(h)return h;a.set(e,s),ki(e)?e.forEach((function(o){s.add(t(o,n,r,o,e,a))})):$i(e)&&e.forEach((function(o,i){s.set(i,t(o,n,r,i,e,a))}));var g=l?void 0:(d?u?Si:Ei:u?Li:Wi)(e);return ji(g||e,(function(o,i){g&&(o=e[i=o]),_i(s,i,t(o,n,r,i,e,a))})),s};var Qi=function(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=Array(o);++r<o;)i[r]=t[r+e];return i},Vi=we,Ki=Qi;var Ji=ge,Xi=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0},Yi=function(t,e){return e.length<2?t:Vi(t,Ki(e,0,-1))},Zi=be;var ta=function(t,e){return e=Ji(e,t),null==(t=Yi(t,e))||delete t[Zi(Xi(e))]},ea=w,na=Zr,ra=j,oa=Function.prototype,ia=Object.prototype,aa=oa.toString,sa=ia.hasOwnProperty,ca=aa.call(Object);var ua=function(t){if(!ra(t)||"[object Object]"!=ea(t))return!1;var e=na(t);if(null===e)return!0;var n=sa.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&aa.call(n)==ca};var da=function(t){return ua(t)?void 0:t},la=kn,pa=o,fa=u?u.isConcatSpreadable:void 0;var ha=Yr,ga=function(t){return pa(t)||la(t)||!!(fa&&t&&t[fa])};var va=function t(e,n,r,o,i){var a=-1,s=e.length;for(r||(r=ga),i||(i=[]);++a<s;){var c=e[a];n>0&&r(c)?n>1?t(c,n-1,r,o,i):ha(i,c):o||(i[i.length]=c)}return i},ba=va;var ya=function(t){return(null==t?0:t.length)?ba(t,1):[]};var ma=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},wa=Math.max;var ja=function(t,e,n){return e=wa(void 0===e?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=wa(r.length-e,0),a=Array(i);++o<i;)a[o]=r[e+o];o=-1;for(var s=Array(e+1);++o<e;)s[o]=r[o];return s[e]=n(a),ma(t,this,s)}};var _a=function(t){return t},Ta=function(t){return function(){return t}},Pa=wn,Oa=Pa?function(t,e){return Pa(t,"toString",{configurable:!0,enumerable:!1,value:Ta(e),writable:!0})}:_a,Ia=Date.now;var Aa=function(t){var e=0,n=0;return function(){var r=Ia(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}},Ca=Aa(Oa),Ea=ya,Sa=ja,xa=Ca;var Ra=ne,za=qi,Na=ta,Da=ge,Ma=En,$a=da,Ha=mo,ka=r(function(t){return xa(Sa(t,void 0,Ea),t+"")}((function(t,e){var n={};if(null==t)return n;var r=!1;e=Ra(e,(function(e){return e=Da(e,t),r||(r=e.length>1),e})),Ma(t,Ha(t),n),r&&(n=za(n,7,$a));for(var o=e.length;o--;)Na(n,e[o]);return n})));const Wa="promise";function La(t,e,n){this.name=t,this.type=e,this.data=n}La.prototype.toString=function(){return`Message.${this.type} - ${this.name}`};const Ua=t=>{try{const{name:e,type:n,isResponse:r,data:o,requestId:i,sender:a}=t.data||{},s=new La(e,n,null!=o?JSON.parse(o):void 0);return s.requestId=i,s.sender=a,s.destination=t.source,s.isResponse=r,s}catch(t){return!1}},Fa=t=>(t.isResponse=!0,t),Ga=(...t)=>e=>[].concat(t).reduce(((t,n,r,o)=>{const i=n(t,e);return i||o.splice(r,o.length-r),i}),e);var Ba=function(t){return function(e,n,r){for(var o=-1,i=Object(e),a=r(e),s=a.length;s--;){var c=a[t?s:++o];if(!1===n(i[c],c,i))break}return e}}(),qa=Or;var Qa=jr;var Va=function(t,e){return function(n,r){if(null==n)return n;if(!Qa(n))return t(n,r);for(var o=n.length,i=e?o:-1,a=Object(n);(e?i--:++i<o)&&!1!==r(a[i],i,a););return n}}((function(t,e){return t&&Ba(t,e,qa)})),Ka=_a;var Ja=yn,Xa=Va,Ya=function(t){return"function"==typeof t?t:Ka},Za=o;var ts=r((function(t,e){return(Za(t)?Ja:Xa)(t,Ya(e))}));const es="disconnected",ns={lastMessageReceivedAt:0,currentConnectionQuality:es,changeCallbacks:{},evalCallbacks:{}},rs=t=>{t!==ns.currentConnectionQuality&&(ns.currentConnectionQuality=t,ts(ns.changeCallbacks,(t=>{t(ns.currentConnectionQuality)})))},os=()=>{if(0===ns.lastMessageReceivedAt)return void rs(es);const t=Date.now()-ns.lastMessageReceivedAt;t<1e4?rs("connected"):(t=>t>1e4)(t)&&((t=>t>3e4)(t)?rs("dead_connection"):rs(es)),ts(ns.evalCallbacks,(t=>{t(ns.currentConnectionQuality)}))};let is;let as=0;const ss=()=>{ns.currentConnectionQuality=es,ns.lastMessageReceivedAt=0},cs={appName:void 0,connectionName:void 0,frameId:void 0,pendingRequests:{},topics:{},senderIds:{},originProvider:void 0,destinationProvider:void 0},us=()=>`${cs.appName}${cs.connectionName}(${cs.frameId})`,ds=t=>{t.sender||(t.sender=us());const e=t.destination||cs.destinationProvider(),n=(t=>{const e=ka(t,["destination","toString","data"]);return e.data=JSON.stringify(t.data,((t,e)=>"function"==typeof e||e instanceof RegExp?e.toString?e.toString():void 0:e)),e})(t),r=fs(t.sender),o=hs(t.sender);if(r||o)r?r.postMessage(n):e.postMessage(n,cs.originProvider());else{const r=new MessageChannel;_s(r.port1,t.sender),e.postMessage(n,cs.originProvider(),[r.port2])}},ls=(t,e,n=1e3)=>new Promise(((r,o)=>{const i=((t,e,n)=>{const r=new La(t,e,n);return e===Wa&&(r.requestId=on()),r})(t,Wa,e),a=setTimeout((()=>{o(`${t} timeout`),vs(i),Ps(i)}),n);gs(i,(()=>clearTimeout(a)),r,o),ds(i)})),ps=t=>(cs.senderIds[t]||(t=>{cs.senderIds[t]||(cs.senderIds[t]={port:void 0,hasTriedToUpgradeToMessageChannel:!1})})(t),cs.senderIds[t]),fs=t=>ps(t).port,hs=t=>ps(t).hasTriedToUpgradeToMessageChannel,gs=(t,e,n,r)=>{cs.pendingRequests[t.requestId]={message:t,clearTimeoutfn:e,resolve:n,reject:r}},vs=t=>{const{requestId:e}=t;return cs.pendingRequests[e].clearTimeoutfn(),delete cs.pendingRequests[e],t},bs="message::ping",ys=Ga((t=>{const e=cs.pendingRequests[t.requestId];return e&&(e.resolve(t.data),vs(t)),t}),(t=>{const e=cs.topics[t.name];return e&&e.forEach((e=>e(t.data))),t}),(t=>{if(!t)return t;if(t.isResponse)return t;if(t.name===bs)return ds(Fa(t)),t;const e=cs.routeHandlerLookup(t.name);if(e){const n=e=>{t.data=e,ds(Fa(t))};e(t,n)}else console.log(us(),`No route handler for ${t.name}`,t);return t}),(ms=()=>{((t=Date.now())=>{ns.lastMessageReceivedAt=t})()},(t,...e)=>(ms(t,...e),t)));var ms;const ws=t=>("*"===cs.originProvider()||t.origin===cs.originProvider())&&t,js=t=>{const e=_e(t,"data.sender");return!(!e||"string"!=typeof e)&&(!!e.includes(cs.appName)&&t)},_s=(t,e)=>{const n=ps(e);n.port=t,n.hasTriedToUpgradeToMessageChannel=!0,n.port.onmessage=Ga(Ua,ys)},Ts=(t,e)=>(!ps(t.sender).hasTriedToUpgradeToMessageChannel&&e.ports&&e.ports[0]&&_s(e.ports[0],t.sender),t),Ps=t=>{(t=>{const e=ps(t);e.port=void 0,e.hasTriedToUpgradeToMessageChannel=!1})(t.sender)};let Os=()=>{};const Is=()=>{Os(),Os=()=>{},is&&is(),ss()},As=en((t=>{"connected"!==t&&cs.usePingAutoReconnect&&ls(bs).catch((()=>{console.log("message::ping timedout")}))}),1e3),Cs=(t,e,n,r,o,i=!1,a)=>{if(!window.addEventListener)return;cs.appName=t,cs.frameId=e,cs.routeHandlerLookup=n,cs.usePingAutoReconnect=i,cs.connectionName=a||"",cs.originProvider=r||(()=>window.location.origin||"*"),cs.destinationProvider=o||(()=>window.parent||window.top),((t={})=>{const e=setInterval(os,100);is=()=>clearInterval(e)})(),(t=>{if(!D(t))return;const e=as++;ns.evalCallbacks[e]=t})(As);const s=Ga(ws,js,Ua,Ts,ys);window.addEventListener("message",s),Os=()=>window.removeEventListener("message",s)},Es=t=>{(t=>{if(!D(t))return;const e=as++;ns.changeCallbacks[e]=t})(t)};function Ss(){return(new Date).getTime()}class xs extends Te{type="window";testUrl="";realUrl=void 0;getTitle(){return this.getConfig("title",this.getName())}getName(){return this.getConfig("name","Agent_Application")}open(){return this.router.addRoute("app::windowClosed",(()=>{this.app.setProperties({containerType:"frame"}),this.app.stop()})),this.testConnection().then((()=>{this.triggerOpened()})).catch((()=>{return this.createWindow(),t=this.app,e=1e3,new Promise(((n,r)=>{const o=Ss(),i=()=>{t.getConnectionStatus()?n():Ss()-o>e?r():setTimeout(i,50)};i()}));var t,e}))}testConnection(){return this.destination=window.open(this.testUrl,this.getName(),`width=${this.app.state.width},height=${this.app.state.height},resizable=yes,scrollbars=yes,status=yes,location=no`),ls("app::reconnect")}createWindow(){this.realUrl&&(this.destination=window.open(this.realUrl,this.getName(),`width=${this.app.state.width},height=${this.app.state.height},resizable=yes,scrollbars=yes,status=yes,location=no`));const t=document.createElement("script");t.src=this.app.PluginAPI.getAssetUrl(this.app.assetName),this.destination.document.body.appendChild(t),this.destination.document.title=this.getTitle()}close(){this.router.removeRoute("app::windowClosed"),this.destination.close(),this.triggerClosed()}}const Rs=()=>({});class zs{defaultState={containerType:"frame",minimized:!1,height:500,width:500,left:100,top:100};state={};containerClosedCallbacks=[];container=null;isConnected=!1;constructor(t,n,r,o,i,a=Rs,s=Rs){this.appName=t,this.assetName=n,this.assetStorageKey=r,this.connectionName=o,this.frameConfigProvider=a,this.windowConfigProvider=s,i&&Object.assign(this.defaultState,i),this.router=new e}init(t,e){this.pendo=t,this.PluginAPI=e,this.events=e.getEventable(),this.router.addRoute("app::ping",((t,e)=>{e()})),this.router.addRoute("app::setProperties",(({data:t})=>{this.setProperties(t)})),this.router.addRoute("app::toggleContainer",(()=>{this.setProperties({minimized:!1}),this.toggleContainerType()})),this.router.addRoute("app::windowClosed",(()=>{})),this.loadState(),this.prepContainer()}prepContainer(){this.container="window"===this.state.containerType?new xs(this,this.windowConfigProvider()):new De(this,this.frameConfigProvider())}setConnectionStatus(t){this.isConnected="connected"===t}getConnectionStatus(){return this.isConnected}setProperties(t){Object.assign(this.state,t),this.writeState()}getDefaultState(){return this.defaultState||{}}loadState(){try{const t=JSON.parse(this.PluginAPI.agentStorage.read(this.assetStorageKey,!0));this.state=Object.assign({},this.getDefaultState(),this.state,t)}catch(t){this.PluginAPI.log.error(t),this.state=Object.assign({},this.getDefaultState(),this.state)}}writeState(){this.PluginAPI.agentStorage.write(this.assetStorageKey,JSON.stringify(this.state),null,!0)}toggleContainerType(){const t="frame"===this.state.containerType?"window":"frame";this.setProperties({containerType:t}),this.stop(),this.start()}start(){this.container||this.prepContainer();const{frameId:t}=this.PluginAPI.EventTracer.addTracerIds({});Cs(this.appName,t,this.router.lookupRouteProvider(),this.container.getOriginProvider(),this.container.getDestinationProvider(),!0,this.connectionName),Es((t=>{this.setConnectionStatus(t)})),this.container.open().then((()=>{this.events.trigger("mounted")})).catch((()=>{"window"===this.state.containerType?(this.setProperties({containerType:"frame"}),this.prepContainer(),this.start()):(this.PluginAPI.log(`Failed to start ${this.appName} in either window or frame.`),this.stop())}))}stop(){this.container.close(),this.container=null,this.events.trigger("unmounted"),Is()}}const Ns=t=>({apiKey:t.apiKey,environment:t.debugging.isStagingServer()?"staging":"production",device:t.debugging.isMobileUserAgent()?"mobile":"desktop",browserCookies:window.navigator.cookieEnabled,guideStatus:t.areGuidesDisabled()?"disabled":t.debugging.areGuidesDelayed()?"delayed":"enabled"}),Ds=function(){const t={height:Ie.HEIGHT,width:Ie.WIDTH};let e,n;const r=new zs("Debugger","pendo.debugger.min.js","debug-enabled","AgentPlugin",t,(()=>({containerId:"pendo-client-debugger"})),(()=>({title:"Pendo Debugger"}))),o={app:r,init(t,o){e=t,n=o,n.restartDebugger=this.start,r.init(e,n),r.router.addRoute("debugger::connect",((t,o)=>{o({config:n.ConfigReader.audit(),env:Ns(e),container:r.state,events:n.store.state.debugger.eventsCaptured})})),r.router.addRoute("debugger::stop",(()=>{e.disableDebugging()})),r.router.addRoute("debugger::showGuideById",((t,n)=>{n(e.showGuideById(t.data))})),r.router.addRoute("debugger::toggleGuideLoop",(t=>{t.data?e.startGuides():e.stopGuides()})),r.router.addRoute("debugger::tombstoneGuide",(t=>{const r=e.findGuideById(t.data);n.Tombstone.addGuide(r)})),r.router.addRoute("debugger::openGuidePage",(t=>{const r=((t,e,n)=>{const r=e.findGuideById(t);if(!r||!e._.get(r,"attributes.resourceCenter"))return`${n}/guides/${t}`;if(r.attributes.resourceCenter.isTopLevel)return`${n}/resource-center/${r.id}/draft`;const o=e.BuildingBlocks.BuildingBlockResourceCenter.getResourceCenter();return o&&o.id?`${n}/resource-center/${o.id}/module/${r.id}`:""})(t.data,e,n.hosts.SERVER);r&&window.open(r,"_blank")})),r.router.addRoute("debugger::restore",(({data:t})=>{(t=>{if(!t||!t.length)return;const e=document.createElement("iframe");e.sandbox="allow-same-origin",e.src="about:blank",e.hidden=!0,document.body.appendChild(e),e.contentWindow.ignoreIframeMonitor=!0,t.forEach((t=>{t.id.split(".").reduce(((t,e,n,r)=>n===r.length-1?(t.destination[e]=t.source[e],t.destination[e]):(t.destination=t.destination[e],t.source=t.source[e],t)),{destination:window,source:e.contentWindow})})),document.body.removeChild(e)})(t)})),r.router.addRoute("debugger::findShadowRoot",((t,e)=>{e((()=>{let t,e=!1,n=0;const r=document.createNodeIterator(document.body,NodeFilter.SHOW_ELEMENT);if(!r||!r.nextNode)return!0;for(;n<1e4&&!e;)n++,t=r.nextNode(),t&&t.shadowRoot&&(e=!0);return e})())})),r.router.addRoute("debugger::sync",((t,o)=>{const i=n.store.subscribe(((t,e)=>{"debugger/eventsCaptured"===t.type&&o({action:"events/eventsCaptured",data:e.debugger.eventsCaptured})})),a=setInterval((()=>{o({action:"agent/sync",data:n.store.state}),o({action:"environment/validateEnvironment",data:e.validateEnvironment(!0)})}),500);r.events.on("unmounted",(()=>{clearInterval(a),i()}))})),r.router.addRoute("debugger::enableEventLogging",(({data:t})=>{r.setProperties({enableEventLogging:t}),n.store.dispatch("debugger/enableEventLogging",t)})),r.router.addRoute("debugger::clearEventsCaptured",(()=>{n.store.dispatch("debugger/clearEventsCaptured")})),r.router.addRoute("debugger::checkGuideEligibility",(({data:t},e)=>{n.store.dispatch("debugger/checkGuideEligibility",{guideId:t,response:e})}))},start(){r.start()},stop(){r.stop(),r.setProperties({enabled:!1,containerType:"frame"})}};return o}();const Ms={initialize:function(t,e){Ds.init(t,e),Ds.start();const n=t.disableDebugging;t.disableDebugging=()=>{Ds.stop(),n()}},teardown:function(){Ds.stop()}},$s=document.getElementById("pendo-debugger-plugin");let Hs="pendo";$s&&(Hs=$s.getAttribute("data-pendo-global-key")||"pendo"),window[Hs].addExtension&&window[Hs].addExtension({name:"Debugger",version:"1.0.0",type:"agent",use:"plugin",uri:Ms})}();
|
|
1
|
+
!function(){"use strict";class e{constructor(e,t){this.path=e,this.handler=t}}class t{routes={};addRoute(t,n){this.routes[t]||(this.routes[t]=[]),this.routes[t].unshift(new e(t,n))}removeRoute(e){this.routes[e].shift()}lookupRouteProvider(){return e=>this.routes[e]?this.routes[e][0].handler:void 0}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var o=Array.isArray,r="object"==typeof n&&n&&n.Object===Object&&n,s="object"==typeof self&&self&&self.Object===Object&&self,a=r||s||Function("return this")(),d=a.Symbol,c=d,u=Object.prototype,l=u.hasOwnProperty,p=u.toString,h=c?c.toStringTag:void 0;var g=function(e){var t=l.call(e,h),n=e[h];try{e[h]=void 0;var i=!0}catch(e){}var o=p.call(e);return i&&(t?e[h]=n:delete e[h]),o},f=Object.prototype.toString;var v=g,b=function(e){return f.call(e)},y=d?d.toStringTag:void 0;var m=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":y&&y in Object(e)?v(e):b(e)};var w=m,_=function(e){return null!=e&&"object"==typeof e};var T=function(e){return"symbol"==typeof e||_(e)&&"[object Symbol]"==w(e)},P=o,C=T,I=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,E=/^\w*$/;var R=function(e,t){if(P(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!C(e))||(E.test(e)||!I.test(e)||null!=t&&e in Object(t))};var S=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)},z=m,O=S;var N,A=function(e){if(!O(e))return!1;var t=z(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t},H=a["__core-js_shared__"],$=(N=/[^.]+$/.exec(H&&H.keys&&H.keys.IE_PROTO||""))?"Symbol(src)_1."+N:"";var D=function(e){return!!$&&$ in e},x=Function.prototype.toString;var j=A,k=D,M=S,L=function(e){if(null!=e){try{return x.call(e)}catch(e){}try{return e+""}catch(e){}}return""},G=/^\[object .+?Constructor\]$/,W=Function.prototype,F=Object.prototype,U=W.toString,q=F.hasOwnProperty,B=RegExp("^"+U.call(q).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Q=function(e){return!(!M(e)||k(e))&&(j(e)?B:G).test(L(e))},K=function(e,t){return null==e?void 0:e[t]};var J=function(e,t){var n=K(e,t);return Q(n)?n:void 0},X=J(Object,"create"),Y=X;var V=function(){this.__data__=Y?Y(null):{},this.size=0};var Z=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ee=X,te=Object.prototype.hasOwnProperty;var ne=function(e){var t=this.__data__;if(ee){var n=t[e];return"__lodash_hash_undefined__"===n?void 0:n}return te.call(t,e)?t[e]:void 0},ie=X,oe=Object.prototype.hasOwnProperty;var re=X;var se=V,ae=Z,de=ne,ce=function(e){var t=this.__data__;return ie?void 0!==t[e]:oe.call(t,e)},ue=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=re&&void 0===t?"__lodash_hash_undefined__":t,this};function le(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}le.prototype.clear=se,le.prototype.delete=ae,le.prototype.get=de,le.prototype.has=ce,le.prototype.set=ue;var pe=le;var he=function(){this.__data__=[],this.size=0};var ge=function(e,t){return e===t||e!=e&&t!=t};var fe=function(e,t){for(var n=e.length;n--;)if(ge(e[n][0],t))return n;return-1},ve=fe,be=Array.prototype.splice;var ye=fe;var me=fe;var we=fe;var _e=he,Te=function(e){var t=this.__data__,n=ve(t,e);return!(n<0)&&(n==t.length-1?t.pop():be.call(t,n,1),--this.size,!0)},Pe=function(e){var t=this.__data__,n=ye(t,e);return n<0?void 0:t[n][1]},Ce=function(e){return me(this.__data__,e)>-1},Ie=function(e,t){var n=this.__data__,i=we(n,e);return i<0?(++this.size,n.push([e,t])):n[i][1]=t,this};function Ee(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Ee.prototype.clear=_e,Ee.prototype.delete=Te,Ee.prototype.get=Pe,Ee.prototype.has=Ce,Ee.prototype.set=Ie;var Re=Ee,Se=J(a,"Map"),ze=pe,Oe=Re,Ne=Se;var Ae=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e};var He=function(e,t){var n=e.__data__;return Ae(t)?n["string"==typeof t?"string":"hash"]:n.map},$e=He;var De=He;var xe=He;var je=He;var ke=function(){this.size=0,this.__data__={hash:new ze,map:new(Ne||Oe),string:new ze}},Me=function(e){var t=$e(this,e).delete(e);return this.size-=t?1:0,t},Le=function(e){return De(this,e).get(e)},Ge=function(e){return xe(this,e).has(e)},We=function(e,t){var n=je(this,e),i=n.size;return n.set(e,t),this.size+=n.size==i?0:1,this};function Fe(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var i=e[t];this.set(i[0],i[1])}}Fe.prototype.clear=ke,Fe.prototype.delete=Me,Fe.prototype.get=Le,Fe.prototype.has=Ge,Fe.prototype.set=We;var Ue=Fe;function qe(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var n=function(){var i=arguments,o=t?t.apply(this,i):i[0],r=n.cache;if(r.has(o))return r.get(o);var s=e.apply(this,i);return n.cache=r.set(o,s)||r,s};return n.cache=new(qe.Cache||Ue),n}qe.Cache=Ue;var Be=qe;var Qe=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Ke=/\\(\\)?/g,Je=function(e){var t=Be(e,(function(e){return 500===n.size&&n.clear(),e})),n=t.cache;return t}((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(Qe,(function(e,n,i,o){t.push(i?o.replace(Ke,"$1"):n||e)})),t}));var Xe=function(e,t){for(var n=-1,i=null==e?0:e.length,o=Array(i);++n<i;)o[n]=t(e[n],n,e);return o},Ye=o,Ve=T,Ze=d?d.prototype:void 0,et=Ze?Ze.toString:void 0;var tt=function e(t){if("string"==typeof t)return t;if(Ye(t))return Xe(t,e)+"";if(Ve(t))return et?et.call(t):"";var n=t+"";return"0"==n&&1/t==-Infinity?"-0":n},nt=tt;var it=o,ot=R,rt=Je,st=function(e){return null==e?"":nt(e)};var at=T;var dt=function(e,t){return it(e)?e:ot(e,t)?[e]:rt(st(e))},ct=function(e){if("string"==typeof e||at(e))return e;var t=e+"";return"0"==t&&1/e==-Infinity?"-0":t};var ut=function(e,t){for(var n=0,i=(t=dt(t,e)).length;null!=e&&n<i;)e=e[ct(t[n++])];return n&&n==i?e:void 0};var lt=i((function(e,t,n){var i=null==e?void 0:ut(e,t);return void 0===i?n:i}));class pt{app=null;router=null;destination=window.parent||window.top;origin="*";constructor(e,t={}){this.app=e,this.router=e.router,this.config=t,this.events=e.PluginAPI.getEventable()}getConfig(e,t){return lt(this.config,e,t)}getDestinationProvider(){return()=>this.destination}getOriginProvider(){return()=>this.origin}triggerOpened(){this.events.trigger("opened",{containerType:this.type})}triggerClosed(){this.events.trigger("closed",{containerType:this.type})}}var ht={padding:"0 !important",margin:"0 !important","box-sizing":"border-box !important",border:"none !important",display:"block !important",visibility:"visible !important"},gt=2147483647,ft={WINDOW_MARGIN:10,HEADER_HEIGHT:50,TOP:100,LEFT:100,HEIGHT:700,WIDTH:500,MIN_HEIGHT:500,MIN_WIDTH:500};const{MIN_HEIGHT:vt,MIN_WIDTH:bt,WINDOW_MARGIN:yt}=ft;function mt(e,t,n,i,o){let r=0,s=0,a=0,d=0;function c(n){n.preventDefault(),t.css({visibility:"hidden"}),e.releasePointerCapture(n.pointerId),e.removeEventListener("pointermove",u),o()}function u(e){-1===e.button&&0!==e.buttons?(e.preventDefault(),a=r-e.clientX,d=s-e.clientY,r=e.clientX,s=e.clientY,i(a,d)):c(e)}e.addEventListener("pointerdown",(function(i){if(0!==i.button)return;i.preventDefault(),t.css({visibility:"visible"}),r=i.clientX,s=i.clientY,e.setPointerCapture(i.pointerId),e.addEventListener("pointermove",u),n()})),e.addEventListener("pointerup",c),e.addEventListener("pointerout",c)}function wt(e,t){const n=e.offsetLeft-t,i=window.innerWidth-e.offsetWidth-yt;return n<yt||i<yt?yt:n>i?i:n}function _t(e,t){const n=e.offsetTop-t,i=window.innerHeight-e.offsetHeight-yt;return n<yt||i<yt?yt:n>i?i:n}function Tt(e,t){const n=e.offsetWidth-t,i=window.innerWidth-e.offsetLeft-yt;return n>i?i:n<bt?bt:n}function Pt(e,t){const n=e.offsetHeight-t,i=window.innerHeight-e.offsetTop-yt;return n>i?i:n<vt?vt:n}class Ct extends pt{type="frame";destination=window.parent||window.top;origin=window.location.origin;constructor(e,t){super(e,t);const{pendo:n,PluginAPI:i}=e,o=this.getConfig("containerId","pendo-client-app");this.container=n.dom(`<div id="${o}" class="pendo-ignore">`).css({...ht,height:e.state.height,width:e.state.width,"z-index":gt-1,"background-color":"#FFFFFF",position:"fixed","box-shadow":"rgb(136, 136, 136) 0px 0px 20px 0px",overflow:"hidden"}),this.handle=n.dom('<div id="pendo-app-draggable-handle">').css({...ht,"z-index":gt,height:ft.HEADER_HEIGHT,width:"calc(100% - 100px)",position:"absolute",cursor:"grab"}).on("dblclick",(()=>{e.state.minimized||(this.container.css({height:ft.HEIGHT,width:ft.WIDTH,transition:"all 250ms linear"}),setTimeout((()=>{this.container&&(this.container.css({transition:"none"}),this.saveSize())}),250))})).appendTo(this.container),this.resizeHandle=n.dom('<div id="pendo-app-resize-handle">').css({...ht,"z-index":gt,visibility:this.app.state.minimized?"hidden":"visible",height:0,width:0,"border-left":"10px solid transparent","border-bottom":"10px solid rgb(136, 136, 136)",cursor:"nwse-resize",position:"absolute",bottom:0,right:0}).appendTo(this.container),this.frame=n.dom('<iframe id="pendo-agent-application" src="about:blank">').css({...ht,height:"100%",width:"100%"}).on("load",(()=>{if(i.ConfigReader.get("inlineStyleNonce")){const e=this.frame[0].contentDocument.createElement.bind(this.frame[0].contentDocument);this.frame[0].contentDocument.createElement=(t,...n)=>{const o=e(t,...n);if("style"===t){const e=i.ConfigReader.get("inlineStyleNonce");e&&o.setAttribute("nonce",e)}return o}}const t=document.createElement("script");var o;t.src=(o=n,o&&o.trustedTypesPolicy?o.trustedTypesPolicy:{createScriptURL:e=>e}).createScriptURL(i.getAssetUrl(e.assetName)),this.frame[0].contentDocument.body.appendChild(t),this.frame[0].contentWindow.ignoreIframeMonitor=!0,this.triggerOpened()})).appendTo(this.container),this.blockout=n.dom('<div id="pendo-app-dragging-blockout">').css({"z-index":gt-2,position:"absolute",height:"100%",width:"100%",top:0,left:0,visibility:"hidden"}).appendTo(n.dom.getBody()),this.elements=[this.container,this.blockout],this.positionFrame=e=>{let{left:t,top:n,height:i}=e;const{minimized:o,width:r}=e;t=t||ft.LEFT,n=n||ft.TOP,i=o?ft.HEADER_HEIGHT:i,t=wt({offsetLeft:t,offsetWidth:r},0),n=_t({offsetTop:n,offsetHeight:i},0),this.container.css({left:t,top:n,height:i}),this.savePosition()},this.saveSize=()=>{const{offsetHeight:e,offsetWidth:t}=this.container[0];e&&t&&this.app.setProperties({height:e,width:t})},this.savePosition=()=>{const{offsetLeft:e,offsetTop:t}=this.container[0];e&&t&&this.app.setProperties({left:e,top:t})},this.toggleMinimize=()=>{this.app.setProperties({minimized:!this.app.state.minimized}),this.resizeHandle.css({visibility:this.app.state.minimized?"hidden":"visible"}),this.positionFrame(this.app.state)},this.positionFrame(this.app.state),function(e,t){const n=e.handle[0],i=e.container[0];mt(n,e.blockout,(function(){n.style.cursor="grabbing"}),(function(e,t){i.style.left=`${wt(i,e)}px`,i.style.top=`${_t(i,t)}px`}),(function(){n.style.cursor="grab",t()}))}(this,this.savePosition),function(e,t){const n=e.resizeHandle[0],i=e.container[0];mt(n,e.blockout,(()=>{}),(function(e,t){i.style.width=`${Tt(i,e)}px`,i.style.height=`${Pt(i,t)}px`}),t)}(this,this.saveSize),window.addEventListener("resize",a),this.listeners=[["resize",a]];const r=n._.throttle((()=>function(e){const t=e.offsetLeft+e.offsetWidth+yt-window.innerWidth;t>0&&(e.style.left=`${wt(e,t)}px`,e.offsetWidth>bt&&(e.style.width=`${Tt(e,t)}px`));const n=e.offsetTop+e.offsetHeight+yt-window.innerHeight;n>0&&(e.style.top=`${_t(e,n)}px`,e.offsetHeight>vt&&(e.style.height=`${Pt(e,n)}px`))}(this.container[0])),10),s=n._.debounce((()=>{this.savePosition(),this.saveSize()}),1e3);function a(){r(),s()}}open(){return this.router.addRoute("app::toggleMinimize",this.toggleMinimize),this.container.appendTo(this.app.pendo.dom.getBody()),Promise.resolve()}close(){this.router.removeRoute("app::toggleMinimize"),this.listeners.forEach((([e,t])=>window.removeEventListener(e,t))),this.elements.forEach((e=>e.remove())),this.triggerClosed()}}const It=(...e)=>t=>[].concat(e).reduce(((e,n,i,o)=>{const r=n(e,t);return r||o.splice(i,o.length-i),r}),t);let Et=0;const Rt=(e,t)=>{if(!e||!t)return e;if(Array.isArray(e))for(let n=0;n<e.length;n++)t(e[n],n,e);else if("object"==typeof e)for(const n in e)e.hasOwnProperty(n)&&t(e[n],n,e);return e},St=e=>"function"==typeof e,zt="promise";function Ot(e,t,n){this.name=e,this.type=t,this.data=n}Ot.prototype.toString=function(){return`Message.${this.type} - ${this.name}`};const Nt=(e,t,n)=>{const i=new Ot(e,t,n);return t===zt&&(i.requestId=((e="")=>(Et+=1,e+Et))()),i},At=e=>{try{const{name:t,type:n,isResponse:i,data:o,requestId:r,sender:s}=e.data||{},a=new Ot(t,n,null!=o?JSON.parse(o):void 0);return a.requestId=r,a.sender=s,a.destination=e.source,a.isResponse=i,a}catch(e){return!1}},Ht=e=>{const t=((e,t)=>{if(!e||"object"!=typeof e)return{};const n=Array.isArray(t)?t:[t],i={};for(const t in e)e.hasOwnProperty(t)&&!n.includes(t)&&(i[t]=e[t]);return i})(e,["destination","toString","data"]);return t.data=JSON.stringify(e.data,((e,t)=>"function"==typeof t||t instanceof RegExp?t.toString?t.toString():void 0:t)),t},$t=e=>(e.isResponse=!0,e),Dt="disconnected",xt={lastMessageReceivedAt:0,currentConnectionQuality:Dt,changeCallbacks:{},evalCallbacks:{}},jt=e=>{e!==xt.currentConnectionQuality&&(xt.currentConnectionQuality=e,Rt(xt.changeCallbacks,(e=>{e(xt.currentConnectionQuality)})))},kt=()=>{if(0===xt.lastMessageReceivedAt)return void jt(Dt);const e=Date.now()-xt.lastMessageReceivedAt;e<1e4?jt("connected"):(e=>e>1e4)(e)&&((e=>e>3e4)(e)?jt("dead_connection"):jt(Dt)),Rt(xt.evalCallbacks,(e=>{e(xt.currentConnectionQuality)}))};let Mt;let Lt=0;const Gt=()=>{xt.currentConnectionQuality=Dt,xt.lastMessageReceivedAt=0},Wt={appName:void 0,connectionName:void 0,frameId:void 0,pendingRequests:{},topics:{},senderIds:{},originProvider:void 0,destinationProvider:void 0},Ft=()=>`${Wt.appName}${Wt.connectionName}(${Wt.frameId})`,Ut=e=>{e.sender||(e.sender=Ft());const t=e.destination||Wt.destinationProvider(),n=Ht(e),i=Qt(e.sender),o=Kt(e.sender);if(i||o)i?i.postMessage(n):t.postMessage(n,Wt.originProvider());else{const i=new MessageChannel;nn(i.port1,e.sender),t.postMessage(n,Wt.originProvider(),[i.port2])}},qt=(e,t,n=1e3)=>new Promise(((i,o)=>{const r=Nt(e,zt,t),s=setTimeout((()=>{o(`${e} timeout`),Xt(r),rn(r)}),n);Jt(r,(()=>clearTimeout(s)),i,o),Ut(r)})),Bt=e=>(Wt.senderIds[e]||(e=>{Wt.senderIds[e]||(Wt.senderIds[e]={port:void 0,hasTriedToUpgradeToMessageChannel:!1})})(e),Wt.senderIds[e]),Qt=e=>Bt(e).port,Kt=e=>Bt(e).hasTriedToUpgradeToMessageChannel,Jt=(e,t,n,i)=>{Wt.pendingRequests[e.requestId]={message:e,clearTimeoutfn:t,resolve:n,reject:i}},Xt=e=>{const{requestId:t}=e;return Wt.pendingRequests[t].clearTimeoutfn(),delete Wt.pendingRequests[t],e},Yt="message::ping",Vt=It((e=>{const t=Wt.pendingRequests[e.requestId];return t&&(t.resolve(e.data),Xt(e)),e}),(e=>{const t=Wt.topics[e.name];return t&&t.forEach((t=>t(e.data))),e}),(e=>{if(!e)return e;if(e.isResponse)return e;if(e.name===Yt)return Ut($t(e)),e;const t=Wt.routeHandlerLookup(e.name);if(t){const n=t=>{e.data=t,Ut($t(e))};t(e,n)}else console.log(Ft(),`No route handler for ${e.name}`,e);return e}),(Zt=()=>{((e=Date.now())=>{xt.lastMessageReceivedAt=e})()},(e,...t)=>(Zt(e,...t),e)));var Zt;const en=e=>("*"===Wt.originProvider()||e.origin===Wt.originProvider())&&e,tn=e=>{const t=((e,t,n)=>{if(!e||"string"!=typeof t)return n;const i=t.split(".");let o=e;for(const e of i){if(null==o)return n;o=o[e]}return void 0===o?n:o})(e,"data.sender");return!(!t||"string"!=typeof t)&&(!!t.includes(Wt.appName)&&e)},nn=(e,t)=>{const n=Bt(t);n.port=e,n.hasTriedToUpgradeToMessageChannel=!0,n.port.onmessage=It(At,Vt)},on=(e,t)=>(!Bt(e.sender).hasTriedToUpgradeToMessageChannel&&t.ports&&t.ports[0]&&nn(t.ports[0],e.sender),e),rn=e=>{(e=>{const t=Bt(e);t.port=void 0,t.hasTriedToUpgradeToMessageChannel=!1})(e.sender)};let sn=()=>{};const an=()=>{sn(),sn=()=>{},Mt&&Mt(),Gt()},dn=((e,t=0)=>{let n,i,o=0;return function(...r){const s=Date.now(),a=t-(s-o);return a<=0||a>t?(n&&(clearTimeout(n),n=null),o=s,i=e.apply(this,r)):!n&&t>0&&(n=setTimeout((()=>{o=Date.now(),n=null,i=e.apply(this,r)}),a)),i}})((e=>{"connected"!==e&&Wt.usePingAutoReconnect&&qt(Yt).catch((()=>{console.log("message::ping timedout")}))}),1e3),cn=(e,t,n,i,o,r=!1,s)=>{if(!window.addEventListener)return;Wt.appName=e,Wt.frameId=t,Wt.routeHandlerLookup=n,Wt.usePingAutoReconnect=r,Wt.connectionName=s||"",Wt.originProvider=i||(()=>window.location.origin||"*"),Wt.destinationProvider=o||(()=>window.parent||window.top),((e={})=>{const t=setInterval(kt,100);Mt=()=>clearInterval(t)})(),(e=>{if(!St(e))return;const t=Lt++;xt.evalCallbacks[t]=e})(dn);const a=It(en,tn,At,on,Vt);window.addEventListener("message",a),sn=()=>window.removeEventListener("message",a)},un=e=>{(e=>{if(!St(e))return;const t=Lt++;xt.changeCallbacks[t]=e})(e)};function ln(){return(new Date).getTime()}class pn extends pt{type="window";testUrl="";realUrl=void 0;getTitle(){return this.getConfig("title",this.getName())}getName(){return this.getConfig("name","Agent_Application")}open(){return this.router.addRoute("app::windowClosed",(()=>{this.app.setProperties({containerType:"frame"}),this.app.stop()})),this.testConnection().then((()=>{this.triggerOpened()})).catch((()=>{return this.createWindow(),e=this.app,t=1e3,new Promise(((n,i)=>{const o=ln(),r=()=>{e.getConnectionStatus()?n():ln()-o>t?i():setTimeout(r,50)};r()}));var e,t}))}testConnection(){return this.destination=window.open(this.testUrl,this.getName(),`width=${this.app.state.width},height=${this.app.state.height},resizable=yes,scrollbars=yes,status=yes,location=no`),qt("app::reconnect")}createWindow(){this.realUrl&&(this.destination=window.open(this.realUrl,this.getName(),`width=${this.app.state.width},height=${this.app.state.height},resizable=yes,scrollbars=yes,status=yes,location=no`));const e=document.createElement("script");e.src=this.app.PluginAPI.getAssetUrl(this.app.assetName),this.destination.document.body.appendChild(e),this.destination.document.title=this.getTitle()}close(){this.router.removeRoute("app::windowClosed"),this.destination.close(),this.triggerClosed()}}const hn=()=>({});class gn{defaultState={containerType:"frame",minimized:!1,height:500,width:500,left:100,top:100};state={};containerClosedCallbacks=[];container=null;isConnected=!1;constructor(e,n,i,o,r,s=hn,a=hn){this.appName=e,this.assetName=n,this.assetStorageKey=i,this.connectionName=o,this.frameConfigProvider=s,this.windowConfigProvider=a,r&&Object.assign(this.defaultState,r),this.router=new t}init(e,t){this.pendo=e,this.PluginAPI=t,this.events=t.getEventable(),this.router.addRoute("app::ping",((e,t)=>{t()})),this.router.addRoute("app::setProperties",(({data:e})=>{this.setProperties(e)})),this.router.addRoute("app::toggleContainer",(()=>{this.setProperties({minimized:!1}),this.toggleContainerType()})),this.router.addRoute("app::windowClosed",(()=>{})),this.loadState(),this.prepContainer()}prepContainer(){this.container="window"===this.state.containerType?new pn(this,this.windowConfigProvider()):new Ct(this,this.frameConfigProvider())}setConnectionStatus(e){this.isConnected="connected"===e}getConnectionStatus(){return this.isConnected}setProperties(e){Object.assign(this.state,e),this.writeState()}getDefaultState(){return this.defaultState||{}}loadState(){try{const e=JSON.parse(this.PluginAPI.agentStorage.read(this.assetStorageKey,!0));this.state=Object.assign({},this.getDefaultState(),this.state,e)}catch(e){this.PluginAPI.log.error(e),this.state=Object.assign({},this.getDefaultState(),this.state)}}writeState(){this.PluginAPI.agentStorage.write(this.assetStorageKey,JSON.stringify(this.state),null,!0)}toggleContainerType(){const e="frame"===this.state.containerType?"window":"frame";this.setProperties({containerType:e}),this.stop(),this.start()}start(){this.container||this.prepContainer();const{frameId:e}=this.PluginAPI.EventTracer.addTracerIds({});cn(this.appName,e,this.router.lookupRouteProvider(),this.container.getOriginProvider(),this.container.getDestinationProvider(),!0,this.connectionName),un((e=>{this.setConnectionStatus(e)})),this.container.open().then((()=>{this.events.trigger("mounted")})).catch((()=>{"window"===this.state.containerType?(this.setProperties({containerType:"frame"}),this.prepContainer(),this.start()):(this.PluginAPI.log(`Failed to start ${this.appName} in either window or frame.`),this.stop())}))}stop(){this.container.close(),this.container=null,this.events.trigger("unmounted"),an()}}const fn=e=>({apiKey:e.apiKey,environment:e.debugging.isStagingServer()?"staging":"production",device:e.debugging.isMobileUserAgent()?"mobile":"desktop",browserCookies:window.navigator.cookieEnabled,guideStatus:e.areGuidesDisabled()?"disabled":e.debugging.areGuidesDelayed()?"delayed":"enabled"}),vn=function(){const e={height:ft.HEIGHT,width:ft.WIDTH};let t,n;const i=new gn("Debugger","pendo.debugger.min.js","debug-enabled","AgentPlugin",e,(()=>({containerId:"pendo-client-debugger"})),(()=>({title:"Pendo Debugger"}))),o={app:i,init(e,o){t=e,n=o,n.restartDebugger=this.start,i.init(t,n),i.router.addRoute("debugger::connect",((e,o)=>{o({config:n.ConfigReader.audit(),env:fn(t),container:i.state,events:n.store.state.debugger.eventsCaptured})})),i.router.addRoute("debugger::stop",(()=>{t.disableDebugging()})),i.router.addRoute("debugger::showGuideById",((e,n)=>{n(t.showGuideById(e.data))})),i.router.addRoute("debugger::toggleGuideLoop",(e=>{e.data?t.startGuides():t.stopGuides()})),i.router.addRoute("debugger::tombstoneGuide",(e=>{const i=t.findGuideById(e.data);n.Tombstone.addGuide(i)})),i.router.addRoute("debugger::openGuidePage",(e=>{const i=((e,t,n)=>{const i=t.findGuideById(e);if(!i||!t._.get(i,"attributes.resourceCenter"))return`${n}/guides/${e}`;if(i.attributes.resourceCenter.isTopLevel)return`${n}/resource-center/${i.id}/draft`;const o=t.BuildingBlocks.BuildingBlockResourceCenter.getResourceCenter();return o&&o.id?`${n}/resource-center/${o.id}/module/${i.id}`:""})(e.data,t,n.hosts.SERVER);i&&window.open(i,"_blank")})),i.router.addRoute("debugger::restore",(({data:e})=>{(e=>{if(!e||!e.length)return;const t=document.createElement("iframe");t.sandbox="allow-same-origin",t.src="about:blank",t.hidden=!0,document.body.appendChild(t),t.contentWindow.ignoreIframeMonitor=!0,e.forEach((e=>{e.id.split(".").reduce(((e,t,n,i)=>n===i.length-1?(e.destination[t]=e.source[t],e.destination[t]):(e.destination=e.destination[t],e.source=e.source[t],e)),{destination:window,source:t.contentWindow})})),document.body.removeChild(t)})(e)})),i.router.addRoute("debugger::findShadowRoot",((e,t)=>{t((()=>{let e,t=!1,n=0;const i=document.createNodeIterator(document.body,NodeFilter.SHOW_ELEMENT);if(!i||!i.nextNode)return!0;for(;n<1e4&&!t;)n++,e=i.nextNode(),e&&e.shadowRoot&&(t=!0);return t})())})),i.router.addRoute("debugger::sync",((e,o)=>{const r=n.store.subscribe(((e,t)=>{"debugger/eventsCaptured"===e.type&&o({action:"events/eventsCaptured",data:t.debugger.eventsCaptured})})),s=setInterval((()=>{o({action:"agent/sync",data:n.store.state}),o({action:"environment/validateEnvironment",data:t.validateEnvironment(!0)})}),500);i.events.on("unmounted",(()=>{clearInterval(s),r()}))})),i.router.addRoute("debugger::enableEventLogging",(({data:e})=>{i.setProperties({enableEventLogging:e}),n.store.dispatch("debugger/enableEventLogging",e)})),i.router.addRoute("debugger::clearEventsCaptured",(()=>{n.store.dispatch("debugger/clearEventsCaptured")})),i.router.addRoute("debugger::checkGuideEligibility",(({data:e},t)=>{n.store.dispatch("debugger/checkGuideEligibility",{guideId:e,response:t})}))},start(){i.start()},stop(){i.stop(),i.setProperties({enabled:!1,containerType:"frame"})}};return o}();const bn={initialize:function(e,t){vn.init(e,t),vn.start();const n=e.disableDebugging;e.disableDebugging=()=>{vn.stop(),n()}},teardown:function(){vn.stop()}},yn=document.getElementById("pendo-debugger-plugin");let mn="pendo";yn&&(mn=yn.getAttribute("data-pendo-global-key")||"pendo"),window[mn].addExtension&&window[mn].addExtension({name:"Debugger",version:"1.0.0",type:"agent",use:"plugin",uri:bn})}();
|
package/dist/dom.esm.js
CHANGED
|
@@ -7295,7 +7295,7 @@ function getScreenPosition(element) {
|
|
|
7295
7295
|
};
|
|
7296
7296
|
}
|
|
7297
7297
|
|
|
7298
|
-
var VERSION = '2.
|
|
7298
|
+
var VERSION = '2.284.0_';
|
|
7299
7299
|
function isExtensionAgent() {
|
|
7300
7300
|
var installType = getPendoConfigValue('installType') || getPendoConfigFromEnclosingScope().installType;
|
|
7301
7301
|
return installType === EXTENSION_INSTALL_TYPE;
|