File Editor
Directories:
.. (Back)
Files:
feedback.js
gutenberg.js
leadin.js
Create New File
Create
Edit File: leadin.js
window.wp=window.wp||{},window.wp.leadin=function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=54)}([,function(e,t,n){"use strict";n.r(t),n.d(t,"adminUrl",(function(){return o})),n.d(t,"ajaxUrl",(function(){return a})),n.d(t,"didDisconnect",(function(){return i})),n.d(t,"env",(function(){return s})),n.d(t,"formsScript",(function(){return l})),n.d(t,"formsScriptPayload",(function(){return c})),n.d(t,"hubspotBaseUrl",(function(){return u})),n.d(t,"i18n",(function(){return R})),n.d(t,"leadinPluginVersion",(function(){return d})),n.d(t,"loginUrl",(function(){return f})),n.d(t,"pluginPath",(function(){return p})),n.d(t,"nonce",(function(){return h})),n.d(t,"plugins",(function(){return g})),n.d(t,"phpVersion",(function(){return v})),n.d(t,"portalId",(function(){return m})),n.d(t,"portalEmail",(function(){return _})),n.d(t,"iframeUrl",(function(){return b})),n.d(t,"accountName",(function(){return E})),n.d(t,"routes",(function(){return y})),n.d(t,"theme",(function(){return w})),n.d(t,"wpVersion",(function(){return x})),n.d(t,"signupUrl",(function(){return S})),n.d(t,"portalDomain",(function(){return O})),n.d(t,"dismissedReview",(function(){return k}));var r=window.leadinConfig,o=r.adminUrl,a=r.ajaxUrl,i=r.didDisconnect,s=r.env,l=r.formsScript,c=r.formsScriptPayload,u=r.hubspotBaseUrl,d=r.leadinPluginVersion,f=r.loginUrl,p=r.pluginPath,h=r.nonce,g=r.plugins,v=r.phpVersion,m=r.portalId,_=r.portalEmail,b=r.iframeUrl,E=r.accountName,y=r.routes,w=r.theme,x=r.wpVersion,S=r.signupUrl,O=r.portalDomain,k=r.dismissedReview,R=window.leadinI18n},function(e,t){e.exports=window.jQuery},,function(e,t,n){(function(t){var r=n(11),o="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},a=o.Raven,i=new r;i.noConflict=function(){return o.Raven=a,i},i.afterLoad(),e.exports=i}).call(this,n(5))},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(4),o=n.n(r),a=n(1);function i(){"prod"===a.env&&(o.a.config("https://e9b8f382cdd130c0d415cd977d2be56f@exceptions.hubspot.com/1",{instrument:{tryCatch:!1}}).install(),o.a.setTagsContext({v:a.leadinPluginVersion,php:a.phpVersion,wordpress:a.wpVersion}),o.a.setUserContext({hub:a.portalId,plugins:Object.keys(a.plugins).map((function(e){return"".concat(e,"#").concat(a.plugins[e].Version)})).join(",")}))}t.b=o.a},function(e,t,n){"use strict";n.d(t,"a",(function(){return r}));var r={iframe:"#leadin-iframe",subMenuButtons:".toplevel_page_leadin > ul > li",deactivatePluginButton:'[data-slug="leadin"] .deactivate a',deactivateFeedbackForm:"form.leadin-deactivate-form",deactivateFeedbackSubmit:"button#leadin-feedback-submit",deactivateFeedbackSkip:"button#leadin-feedback-skip",thickboxModalClose:".leadin-modal-close",thickboxModalWindow:"div#TB_window.thickbox-loading",thickboxModalContent:"div#TB_ajaxContent.TB_modal"}},function(e,t,n){(function(t){var n="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{};function r(e){return void 0===e}function o(e){return"[object String]"===Object.prototype.toString.call(e)}function a(){try{return new ErrorEvent(""),!0}catch(e){return!1}}function i(e,t){var n,o;if(r(e.length))for(n in e)s(e,n)&&t.call(null,n,e[n]);else if(o=e.length)for(n=0;n<o;n++)t.call(null,n,e[n])}function s(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function l(e){var t,n,r,a,i,s=[];if(!e||!e.tagName)return"";if(s.push(e.tagName.toLowerCase()),e.id&&s.push("#"+e.id),(t=e.className)&&o(t))for(n=t.split(/\s+/),i=0;i<n.length;i++)s.push("."+n[i]);var l=["type","name","title","alt"];for(i=0;i<l.length;i++)r=l[i],(a=e.getAttribute(r))&&s.push("["+r+'="'+a+'"]');return s.join("")}function c(e,t){return!!(!!e^!!t)}function u(e,t){if(c(e,t))return!1;var n,r,o=e.frames,a=t.frames;if(o.length!==a.length)return!1;for(var i=0;i<o.length;i++)if(n=o[i],r=a[i],n.filename!==r.filename||n.lineno!==r.lineno||n.colno!==r.colno||n.function!==r.function)return!1;return!0}e.exports={isObject:function(e){return"object"==typeof e&&null!==e},isError:function(e){switch({}.toString.call(e)){case"[object Error]":case"[object Exception]":case"[object DOMException]":return!0;default:return e instanceof Error}},isErrorEvent:function(e){return a()&&"[object ErrorEvent]"==={}.toString.call(e)},isUndefined:r,isFunction:function(e){return"function"==typeof e},isString:o,isEmptyObject:function(e){for(var t in e)return!1;return!0},supportsErrorEvent:a,wrappedCallback:function(e){return function(t,n){var r=e(t)||t;return n&&n(r)||r}},each:i,objectMerge:function(e,t){return t?(i(t,(function(t,n){e[t]=n})),e):e},truncate:function(e,t){return!t||e.length<=t?e:e.substr(0,t)+"…"},objectFrozen:function(e){return!!Object.isFrozen&&Object.isFrozen(e)},hasKey:s,joinRegExp:function(e){for(var t,n=[],r=0,a=e.length;r<a;r++)o(t=e[r])?n.push(t.replace(/([.*+?^=!:${}()|\[\]\/\\])/g,"\\$1")):t&&t.source&&n.push(t.source);return new RegExp(n.join("|"),"i")},urlencode:function(e){var t=[];return i(e,(function(e,n){t.push(encodeURIComponent(e)+"="+encodeURIComponent(n))})),t.join("&")},uuid4:function(){var e=n.crypto||n.msCrypto;if(!r(e)&&e.getRandomValues){var t=new Uint16Array(8);e.getRandomValues(t),t[3]=4095&t[3]|16384,t[4]=16383&t[4]|32768;var o=function(e){for(var t=e.toString(16);t.length<4;)t="0"+t;return t};return o(t[0])+o(t[1])+o(t[2])+o(t[3])+o(t[4])+o(t[5])+o(t[6])+o(t[7])}return"xxxxxxxxxxxx4xxxyxxxxxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))},htmlTreeAsString:function(e){for(var t,n=[],r=0,o=0,a=" > ".length;e&&r++<5&&!("html"===(t=l(e))||r>1&&o+n.length*a+t.length>=80);)n.push(t),o+=t.length,e=e.parentNode;return n.reverse().join(" > ")},htmlElementAsString:l,isSameException:function(e,t){return!c(e,t)&&(e=e.values[0],t=t.values[0],e.type===t.type&&e.value===t.value&&u(e.stacktrace,t.stacktrace))},isSameStacktrace:u,parseUrl:function(e){var t=e.match(/^(([^:\/?#]+):)?(\/\/([^\/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?$/);if(!t)return{};var n=t[6]||"",r=t[8]||"";return{protocol:t[2],host:t[4],path:t[5],relative:t[5]+n+r}},fill:function(e,t,n,r){var o=e[t];e[t]=n(o),r&&r.push([e,t,o])}}}).call(this,n(5))},,,function(e,t,n){(function(t){var r=n(12),o=n(13),a=n(14),i=n(8),s=i.isError,l=i.isObject,c=(l=i.isObject,i.isErrorEvent),u=i.isUndefined,d=i.isFunction,f=i.isString,p=i.isEmptyObject,h=i.each,g=i.objectMerge,v=i.truncate,m=i.objectFrozen,_=i.hasKey,b=i.joinRegExp,E=i.urlencode,y=i.uuid4,w=i.htmlTreeAsString,x=i.isSameException,S=i.isSameStacktrace,O=i.parseUrl,k=i.fill,R=n(15).wrapMethod,C="source protocol user pass host port path".split(" "),T=/^(?:(\w+):)?\/\/(?:(\w+)(:\w+)?@)?([\w\.-]+)(?::(\d+))?(\/.*)/;function N(){return+new Date}var I="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},j=I.document,D=I.navigator;function P(e,t){return d(t)?function(n){return t(n,e)}:t}function L(){for(var e in this._hasJSON=!("object"!=typeof JSON||!JSON.stringify),this._hasDocument=!u(j),this._hasNavigator=!u(D),this._lastCapturedException=null,this._lastData=null,this._lastEventId=null,this._globalServer=null,this._globalKey=null,this._globalProject=null,this._globalContext={},this._globalOptions={logger:"javascript",ignoreErrors:[],ignoreUrls:[],whitelistUrls:[],includePaths:[],collectWindowErrors:!0,maxMessageLength:0,maxUrlLength:250,stackTraceLimit:50,autoBreadcrumbs:!0,instrument:!0,sampleRate:1},this._ignoreOnError=0,this._isRavenInstalled=!1,this._originalErrorStackTraceLimit=Error.stackTraceLimit,this._originalConsole=I.console||{},this._originalConsoleMethods={},this._plugins=[],this._startTime=N(),this._wrappedBuiltIns=[],this._breadcrumbs=[],this._lastCapturedEvent=null,this._keypressTimeout,this._location=I.location,this._lastHref=this._location&&this._location.href,this._resetBackoff(),this._originalConsole)this._originalConsoleMethods[e]=this._originalConsole[e]}L.prototype={VERSION:"3.19.1",debug:!1,TraceKit:r,config:function(e,t){var n=this;if(n._globalServer)return this._logDebug("error","Error: Raven has already been configured"),n;if(!e)return n;var o=n._globalOptions;t&&h(t,(function(e,t){"tags"===e||"extra"===e||"user"===e?n._globalContext[e]=t:o[e]=t})),n.setDSN(e),o.ignoreErrors.push(/^Script error\.?$/),o.ignoreErrors.push(/^Javascript error: Script error\.? on line 0$/),o.ignoreErrors=b(o.ignoreErrors),o.ignoreUrls=!!o.ignoreUrls.length&&b(o.ignoreUrls),o.whitelistUrls=!!o.whitelistUrls.length&&b(o.whitelistUrls),o.includePaths=b(o.includePaths),o.maxBreadcrumbs=Math.max(0,Math.min(o.maxBreadcrumbs||100,100));var a={xhr:!0,console:!0,dom:!0,location:!0},i=o.autoBreadcrumbs;"[object Object]"==={}.toString.call(i)?i=g(a,i):!1!==i&&(i=a),o.autoBreadcrumbs=i;var s={tryCatch:!0},l=o.instrument;return"[object Object]"==={}.toString.call(l)?l=g(s,l):!1!==l&&(l=s),o.instrument=l,r.collectWindowErrors=!!o.collectWindowErrors,n},install:function(){var e=this;return e.isSetup()&&!e._isRavenInstalled&&(r.report.subscribe((function(){e._handleOnErrorStackInfo.apply(e,arguments)})),e._globalOptions.instrument&&e._globalOptions.instrument.tryCatch&&e._instrumentTryCatch(),e._globalOptions.autoBreadcrumbs&&e._instrumentBreadcrumbs(),e._drainPlugins(),e._isRavenInstalled=!0),Error.stackTraceLimit=e._globalOptions.stackTraceLimit,this},setDSN:function(e){var t=this._parseDSN(e),n=t.path.lastIndexOf("/"),r=t.path.substr(1,n);this._dsn=e,this._globalKey=t.user,this._globalSecret=t.pass&&t.pass.substr(1),this._globalProject=t.path.substr(n+1),this._globalServer=this._getGlobalServer(t),this._globalEndpoint=this._globalServer+"/"+r+"api/"+this._globalProject+"/store/",this._resetBackoff()},context:function(e,t,n){return d(e)&&(n=t||[],t=e,e=void 0),this.wrap(e,t).apply(this,n)},wrap:function(e,t,n){var r=this;if(u(t)&&!d(e))return e;if(d(e)&&(t=e,e=void 0),!d(t))return t;try{if(t.__raven__)return t;if(t.__raven_wrapper__)return t.__raven_wrapper__}catch(e){return t}function o(){var o=[],a=arguments.length,i=!e||e&&!1!==e.deep;for(n&&d(n)&&n.apply(this,arguments);a--;)o[a]=i?r.wrap(e,arguments[a]):arguments[a];try{return t.apply(this,o)}catch(t){throw r._ignoreNextOnError(),r.captureException(t,e),t}}for(var a in t)_(t,a)&&(o[a]=t[a]);return o.prototype=t.prototype,t.__raven_wrapper__=o,o.__raven__=!0,o.__inner__=t,o},uninstall:function(){return r.report.uninstall(),this._restoreBuiltIns(),Error.stackTraceLimit=this._originalErrorStackTraceLimit,this._isRavenInstalled=!1,this},captureException:function(e,t){var n=!s(e),o=!c(e),a=c(e)&&!e.error;if(n&&o||a)return this.captureMessage(e,g({trimHeadFrames:1,stacktrace:!0},t));c(e)&&(e=e.error),this._lastCapturedException=e;try{var i=r.computeStackTrace(e);this._handleStackInfo(i,t)}catch(t){if(e!==t)throw t}return this},captureMessage:function(e,t){if(!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(e)){var n,o=g({message:e+""},t=t||{});try{throw new Error(e)}catch(e){n=e}n.name=null;var a=r.computeStackTrace(n),i=a.stack[1],s=i&&i.url||"";if((!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(s))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(s))){if(this._globalOptions.stacktrace||t&&t.stacktrace){t=g({fingerprint:e,trimHeadFrames:(t.trimHeadFrames||0)+1},t);var l=this._prepareFrames(a,t);o.stacktrace={frames:l.reverse()}}return this._send(o),this}}},captureBreadcrumb:function(e){var t=g({timestamp:N()/1e3},e);if(d(this._globalOptions.breadcrumbCallback)){var n=this._globalOptions.breadcrumbCallback(t);if(l(n)&&!p(n))t=n;else if(!1===n)return this}return this._breadcrumbs.push(t),this._breadcrumbs.length>this._globalOptions.maxBreadcrumbs&&this._breadcrumbs.shift(),this},addPlugin:function(e){var t=[].slice.call(arguments,1);return this._plugins.push([e,t]),this._isRavenInstalled&&this._drainPlugins(),this},setUserContext:function(e){return this._globalContext.user=e,this},setExtraContext:function(e){return this._mergeContext("extra",e),this},setTagsContext:function(e){return this._mergeContext("tags",e),this},clearContext:function(){return this._globalContext={},this},getContext:function(){return JSON.parse(o(this._globalContext))},setEnvironment:function(e){return this._globalOptions.environment=e,this},setRelease:function(e){return this._globalOptions.release=e,this},setDataCallback:function(e){var t=this._globalOptions.dataCallback;return this._globalOptions.dataCallback=P(t,e),this},setBreadcrumbCallback:function(e){var t=this._globalOptions.breadcrumbCallback;return this._globalOptions.breadcrumbCallback=P(t,e),this},setShouldSendCallback:function(e){var t=this._globalOptions.shouldSendCallback;return this._globalOptions.shouldSendCallback=P(t,e),this},setTransport:function(e){return this._globalOptions.transport=e,this},lastException:function(){return this._lastCapturedException},lastEventId:function(){return this._lastEventId},isSetup:function(){return!!this._hasJSON&&(!!this._globalServer||(this.ravenNotConfiguredError||(this.ravenNotConfiguredError=!0,this._logDebug("error","Error: Raven has not been configured.")),!1))},afterLoad:function(){var e=I.RavenConfig;e&&this.config(e.dsn,e.config).install()},showReportDialog:function(e){if(j){var t=(e=e||{}).eventId||this.lastEventId();if(!t)throw new a("Missing eventId");var n=e.dsn||this._dsn;if(!n)throw new a("Missing DSN");var r=encodeURIComponent,o="";o+="?eventId="+r(t),o+="&dsn="+r(n);var i=e.user||this._globalContext.user;i&&(i.name&&(o+="&name="+r(i.name)),i.email&&(o+="&email="+r(i.email)));var s=this._getGlobalServer(this._parseDSN(n)),l=j.createElement("script");l.async=!0,l.src=s+"/api/embed/error-page/"+o,(j.head||j.body).appendChild(l)}},_ignoreNextOnError:function(){var e=this;this._ignoreOnError+=1,setTimeout((function(){e._ignoreOnError-=1}))},_triggerEvent:function(e,t){var n,r;if(this._hasDocument){for(r in t=t||{},e="raven"+e.substr(0,1).toUpperCase()+e.substr(1),j.createEvent?(n=j.createEvent("HTMLEvents")).initEvent(e,!0,!0):(n=j.createEventObject()).eventType=e,t)_(t,r)&&(n[r]=t[r]);if(j.createEvent)j.dispatchEvent(n);else try{j.fireEvent("on"+n.eventType.toLowerCase(),n)}catch(e){}}},_breadcrumbEventHandler:function(e){var t=this;return function(n){if(t._keypressTimeout=null,t._lastCapturedEvent!==n){var r;t._lastCapturedEvent=n;try{r=w(n.target)}catch(e){r="<unknown>"}t.captureBreadcrumb({category:"ui."+e,message:r})}}},_keypressEventHandler:function(){var e=this;return function(t){var n;try{n=t.target}catch(e){return}var r=n&&n.tagName;if(r&&("INPUT"===r||"TEXTAREA"===r||n.isContentEditable)){var o=e._keypressTimeout;o||e._breadcrumbEventHandler("input")(t),clearTimeout(o),e._keypressTimeout=setTimeout((function(){e._keypressTimeout=null}),1e3)}}},_captureUrlChange:function(e,t){var n=O(this._location.href),r=O(t),o=O(e);this._lastHref=t,n.protocol===r.protocol&&n.host===r.host&&(t=r.relative),n.protocol===o.protocol&&n.host===o.host&&(e=o.relative),this.captureBreadcrumb({category:"navigation",data:{to:t,from:e}})},_instrumentTryCatch:function(){var e=this,t=e._wrappedBuiltIns;function n(t){return function(n,r){for(var o=new Array(arguments.length),a=0;a<o.length;++a)o[a]=arguments[a];var i=o[0];return d(i)&&(o[0]=e.wrap(i)),t.apply?t.apply(this,o):t(o[0],o[1])}}var r=this._globalOptions.autoBreadcrumbs;function o(n){var o=I[n]&&I[n].prototype;o&&o.hasOwnProperty&&o.hasOwnProperty("addEventListener")&&(k(o,"addEventListener",(function(t){return function(o,a,i,s){try{a&&a.handleEvent&&(a.handleEvent=e.wrap(a.handleEvent))}catch(e){}var l,c,u;return r&&r.dom&&("EventTarget"===n||"Node"===n)&&(c=e._breadcrumbEventHandler("click"),u=e._keypressEventHandler(),l=function(e){if(e){var t;try{t=e.type}catch(e){return}return"click"===t?c(e):"keypress"===t?u(e):void 0}}),t.call(this,o,e.wrap(a,void 0,l),i,s)}}),t),k(o,"removeEventListener",(function(e){return function(t,n,r,o){try{n=n&&(n.__raven_wrapper__?n.__raven_wrapper__:n)}catch(e){}return e.call(this,t,n,r,o)}}),t))}k(I,"setTimeout",n,t),k(I,"setInterval",n,t),I.requestAnimationFrame&&k(I,"requestAnimationFrame",(function(t){return function(n){return t(e.wrap(n))}}),t);for(var a=["EventTarget","Window","Node","ApplicationCache","AudioTrackList","ChannelMergerNode","CryptoOperation","EventSource","FileReader","HTMLUnknownElement","IDBDatabase","IDBRequest","IDBTransaction","KeyOperation","MediaController","MessagePort","ModalWindow","Notification","SVGElementInstance","Screen","TextTrack","TextTrackCue","TextTrackList","WebSocket","WebSocketWorker","Worker","XMLHttpRequest","XMLHttpRequestEventTarget","XMLHttpRequestUpload"],i=0;i<a.length;i++)o(a[i])},_instrumentBreadcrumbs:function(){var e=this,t=this._globalOptions.autoBreadcrumbs,n=e._wrappedBuiltIns;function r(t,n){t in n&&d(n[t])&&k(n,t,(function(t){return e.wrap(t)}))}if(t.xhr&&"XMLHttpRequest"in I){var o=XMLHttpRequest.prototype;k(o,"open",(function(t){return function(n,r){return f(r)&&-1===r.indexOf(e._globalKey)&&(this.__raven_xhr={method:n,url:r,status_code:null}),t.apply(this,arguments)}}),n),k(o,"send",(function(t){return function(n){var o=this;function a(){if(o.__raven_xhr&&4===o.readyState){try{o.__raven_xhr.status_code=o.status}catch(e){}e.captureBreadcrumb({type:"http",category:"xhr",data:o.__raven_xhr})}}for(var i=["onload","onerror","onprogress"],s=0;s<i.length;s++)r(i[s],o);return"onreadystatechange"in o&&d(o.onreadystatechange)?k(o,"onreadystatechange",(function(t){return e.wrap(t,void 0,a)})):o.onreadystatechange=a,t.apply(this,arguments)}}),n)}t.xhr&&"fetch"in I&&k(I,"fetch",(function(t){return function(n,r){for(var o=new Array(arguments.length),a=0;a<o.length;++a)o[a]=arguments[a];var i,s=o[0],l="GET";"string"==typeof s?i=s:"Request"in I&&s instanceof I.Request?(i=s.url,s.method&&(l=s.method)):i=""+s,o[1]&&o[1].method&&(l=o[1].method);var c={method:l,url:i,status_code:null};return e.captureBreadcrumb({type:"http",category:"fetch",data:c}),t.apply(this,o).then((function(e){return c.status_code=e.status,e}))}}),n),t.dom&&this._hasDocument&&(j.addEventListener?(j.addEventListener("click",e._breadcrumbEventHandler("click"),!1),j.addEventListener("keypress",e._keypressEventHandler(),!1)):(j.attachEvent("onclick",e._breadcrumbEventHandler("click")),j.attachEvent("onkeypress",e._keypressEventHandler())));var a=I.chrome,i=!(a&&a.app&&a.app.runtime)&&I.history&&history.pushState&&history.replaceState;if(t.location&&i){var s=I.onpopstate;I.onpopstate=function(){var t=e._location.href;if(e._captureUrlChange(e._lastHref,t),s)return s.apply(this,arguments)};var l=function(t){return function(){var n=arguments.length>2?arguments[2]:void 0;return n&&e._captureUrlChange(e._lastHref,n+""),t.apply(this,arguments)}};k(history,"pushState",l,n),k(history,"replaceState",l,n)}if(t.console&&"console"in I&&console.log){var c=function(t,n){e.captureBreadcrumb({message:t,level:n.level,category:"console"})};h(["debug","info","warn","error","log"],(function(e,t){R(console,t,c)}))}},_restoreBuiltIns:function(){for(var e;this._wrappedBuiltIns.length;){var t=(e=this._wrappedBuiltIns.shift())[0],n=e[1],r=e[2];t[n]=r}},_drainPlugins:function(){var e=this;h(this._plugins,(function(t,n){var r=n[0],o=n[1];r.apply(e,[e].concat(o))}))},_parseDSN:function(e){var t=T.exec(e),n={},r=7;try{for(;r--;)n[C[r]]=t[r]||""}catch(t){throw new a("Invalid DSN: "+e)}if(n.pass&&!this._globalOptions.allowSecretKey)throw new a("Do not specify your secret key in the DSN. See: http://bit.ly/raven-secret-key");return n},_getGlobalServer:function(e){var t="//"+e.host+(e.port?":"+e.port:"");return e.protocol&&(t=e.protocol+":"+t),t},_handleOnErrorStackInfo:function(){this._ignoreOnError||this._handleStackInfo.apply(this,arguments)},_handleStackInfo:function(e,t){var n=this._prepareFrames(e,t);this._triggerEvent("handle",{stackInfo:e,options:t}),this._processException(e.name,e.message,e.url,e.lineno,n,t)},_prepareFrames:function(e,t){var n=this,r=[];if(e.stack&&e.stack.length&&(h(e.stack,(function(t,o){var a=n._normalizeFrame(o,e.url);a&&r.push(a)})),t&&t.trimHeadFrames))for(var o=0;o<t.trimHeadFrames&&o<r.length;o++)r[o].in_app=!1;return r=r.slice(0,this._globalOptions.stackTraceLimit)},_normalizeFrame:function(e,t){var n={filename:e.url,lineno:e.line,colno:e.column,function:e.func||"?"};return e.url||(n.filename=t),n.in_app=!(this._globalOptions.includePaths.test&&!this._globalOptions.includePaths.test(n.filename)||/(Raven|TraceKit)\./.test(n.function)||/raven\.(min\.)?js$/.test(n.filename)),n},_processException:function(e,t,n,r,o,a){var i,s=(e?e+": ":"")+(t||"");if((!this._globalOptions.ignoreErrors.test||!this._globalOptions.ignoreErrors.test(t)&&!this._globalOptions.ignoreErrors.test(s))&&(o&&o.length?(n=o[0].filename||n,o.reverse(),i={frames:o}):n&&(i={frames:[{filename:n,lineno:r,in_app:!0}]}),(!this._globalOptions.ignoreUrls.test||!this._globalOptions.ignoreUrls.test(n))&&(!this._globalOptions.whitelistUrls.test||this._globalOptions.whitelistUrls.test(n)))){var l=g({exception:{values:[{type:e,value:t,stacktrace:i}]},culprit:n},a);this._send(l)}},_trimPacket:function(e){var t=this._globalOptions.maxMessageLength;if(e.message&&(e.message=v(e.message,t)),e.exception){var n=e.exception.values[0];n.value=v(n.value,t)}var r=e.request;return r&&(r.url&&(r.url=v(r.url,this._globalOptions.maxUrlLength)),r.Referer&&(r.Referer=v(r.Referer,this._globalOptions.maxUrlLength))),e.breadcrumbs&&e.breadcrumbs.values&&this._trimBreadcrumbs(e.breadcrumbs),e},_trimBreadcrumbs:function(e){for(var t,n,r,o=["to","from","url"],a=0;a<e.values.length;++a)if((n=e.values[a]).hasOwnProperty("data")&&l(n.data)&&!m(n.data)){r=g({},n.data);for(var i=0;i<o.length;++i)t=o[i],r.hasOwnProperty(t)&&r[t]&&(r[t]=v(r[t],this._globalOptions.maxUrlLength));e.values[a].data=r}},_getHttpData:function(){if(this._hasNavigator||this._hasDocument){var e={};return this._hasNavigator&&D.userAgent&&(e.headers={"User-Agent":navigator.userAgent}),this._hasDocument&&(j.location&&j.location.href&&(e.url=j.location.href),j.referrer&&(e.headers||(e.headers={}),e.headers.Referer=j.referrer)),e}},_resetBackoff:function(){this._backoffDuration=0,this._backoffStart=null},_shouldBackoff:function(){return this._backoffDuration&&N()-this._backoffStart<this._backoffDuration},_isRepeatData:function(e){var t=this._lastData;return!(!t||e.message!==t.message||e.culprit!==t.culprit)&&(e.stacktrace||t.stacktrace?S(e.stacktrace,t.stacktrace):!e.exception&&!t.exception||x(e.exception,t.exception))},_setBackoffState:function(e){if(!this._shouldBackoff()){var t=e.status;if(400===t||401===t||429===t){var n;try{n=e.getResponseHeader("Retry-After"),n=1e3*parseInt(n,10)}catch(e){}this._backoffDuration=n||(2*this._backoffDuration||1e3),this._backoffStart=N()}}},_send:function(e){var t=this._globalOptions,n={project:this._globalProject,logger:t.logger,platform:"javascript"},r=this._getHttpData();r&&(n.request=r),e.trimHeadFrames&&delete e.trimHeadFrames,(e=g(n,e)).tags=g(g({},this._globalContext.tags),e.tags),e.extra=g(g({},this._globalContext.extra),e.extra),e.extra["session:duration"]=N()-this._startTime,this._breadcrumbs&&this._breadcrumbs.length>0&&(e.breadcrumbs={values:[].slice.call(this._breadcrumbs,0)}),p(e.tags)&&delete e.tags,this._globalContext.user&&(e.user=this._globalContext.user),t.environment&&(e.environment=t.environment),t.release&&(e.release=t.release),t.serverName&&(e.server_name=t.serverName),d(t.dataCallback)&&(e=t.dataCallback(e)||e),e&&!p(e)&&(d(t.shouldSendCallback)&&!t.shouldSendCallback(e)||(this._shouldBackoff()?this._logDebug("warn","Raven dropped error due to backoff: ",e):"number"==typeof t.sampleRate?Math.random()<t.sampleRate&&this._sendProcessedPayload(e):this._sendProcessedPayload(e)))},_getUuid:function(){return y()},_sendProcessedPayload:function(e,t){var n=this,r=this._globalOptions;if(this.isSetup())if(e=this._trimPacket(e),this._globalOptions.allowDuplicates||!this._isRepeatData(e)){this._lastEventId=e.event_id||(e.event_id=this._getUuid()),this._lastData=e,this._logDebug("debug","Raven about to send:",e);var o={sentry_version:"7",sentry_client:"raven-js/"+this.VERSION,sentry_key:this._globalKey};this._globalSecret&&(o.sentry_secret=this._globalSecret);var a=e.exception&&e.exception.values[0];this.captureBreadcrumb({category:"sentry",message:a?(a.type?a.type+": ":"")+a.value:e.message,event_id:e.event_id,level:e.level||"error"});var i=this._globalEndpoint;(r.transport||this._makeRequest).call(this,{url:i,auth:o,data:e,options:r,onSuccess:function(){n._resetBackoff(),n._triggerEvent("success",{data:e,src:i}),t&&t()},onError:function(r){n._logDebug("error","Raven transport failed to send: ",r),r.request&&n._setBackoffState(r.request),n._triggerEvent("failure",{data:e,src:i}),r=r||new Error("Raven send failed (no additional details provided)"),t&&t(r)}})}else this._logDebug("warn","Raven dropped repeat event: ",e)},_makeRequest:function(e){var t=I.XMLHttpRequest&&new I.XMLHttpRequest;if(t&&("withCredentials"in t||"undefined"!=typeof XDomainRequest)){var n=e.url;"withCredentials"in t?t.onreadystatechange=function(){if(4===t.readyState)if(200===t.status)e.onSuccess&&e.onSuccess();else if(e.onError){var n=new Error("Sentry error code: "+t.status);n.request=t,e.onError(n)}}:(t=new XDomainRequest,n=n.replace(/^https?:/,""),e.onSuccess&&(t.onload=e.onSuccess),e.onError&&(t.onerror=function(){var n=new Error("Sentry error code: XDomainRequest");n.request=t,e.onError(n)})),t.open("POST",n+"?"+E(e.auth)),t.send(o(e.data))}},_logDebug:function(e){this._originalConsoleMethods[e]&&this.debug&&Function.prototype.apply.call(this._originalConsoleMethods[e],this._originalConsole,[].slice.call(arguments,1))},_mergeContext:function(e,t){u(t)?delete this._globalContext[e]:this._globalContext[e]=g(this._globalContext[e]||{},t)}},L.prototype.setUser=L.prototype.setUserContext,L.prototype.setReleaseContext=L.prototype.setRelease,e.exports=L}).call(this,n(5))},function(e,t,n){(function(t){var r=n(8),o={collectWindowErrors:!0,debug:!1},a="undefined"!=typeof window?window:void 0!==t?t:"undefined"!=typeof self?self:{},i=[].slice,s=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/;function l(){return"undefined"==typeof document||null==document.location?"":document.location.href}o.report=function(){var e,t,n=[],c=null,u=null,d=null;function f(e,t){var r=null;if(!t||o.collectWindowErrors){for(var a in n)if(n.hasOwnProperty(a))try{n[a].apply(null,[e].concat(i.call(arguments,2)))}catch(e){r=e}if(r)throw r}}function p(t,n,a,i,c){if(d)o.computeStackTrace.augmentStackTraceWithInitialElement(d,n,a,t),h();else if(c&&r.isError(c))f(o.computeStackTrace(c),!0);else{var u,p={url:n,line:a,column:i},g=void 0,v=t;if("[object String]"==={}.toString.call(t))(u=t.match(s))&&(g=u[1],v=u[2]);p.func="?",f({name:g,message:v,url:l(),stack:[p]},!0)}return!!e&&e.apply(this,arguments)}function h(){var e=d,t=c;c=null,d=null,u=null,f.apply(null,[e,!1].concat(t))}function g(e,t){var n=i.call(arguments,1);if(d){if(u===e)return;h()}var r=o.computeStackTrace(e);if(d=r,u=e,c=n,setTimeout((function(){u===e&&h()}),r.incomplete?2e3:0),!1!==t)throw e}return g.subscribe=function(r){!function(){if(t)return;e=a.onerror,a.onerror=p,t=!0}(),n.push(r)},g.unsubscribe=function(e){for(var t=n.length-1;t>=0;--t)n[t]===e&&n.splice(t,1)},g.uninstall=function(){!function(){if(!t)return;a.onerror=e,t=!1,e=void 0}(),n=[]},g}(),o.computeStackTrace=function(){function e(e){if(void 0!==e.stack&&e.stack){for(var t,n,r,o=/^\s*at (.*?) ?\(((?:file|https?|blob|chrome-extension|native|eval|webpack|<anonymous>|[a-z]:|\/).*?)(?::(\d+))?(?::(\d+))?\)?\s*$/i,a=/^\s*(.*?)(?:\((.*?)\))?(?:^|@)((?:file|https?|blob|chrome|webpack|resource|\[native).*?|[^@]*bundle)(?::(\d+))?(?::(\d+))?\s*$/i,i=/^\s*at (?:((?:\[object object\])?.+) )?\(?((?:file|ms-appx|https?|webpack|blob):.*?):(\d+)(?::(\d+))?\)?\s*$/i,s=/(\S+) line (\d+)(?: > eval line \d+)* > eval/i,c=/\((\S*)(?::(\d+))(?::(\d+))\)/,u=e.stack.split("\n"),d=[],f=(/^(.*) is undefined$/.exec(e.message),0),p=u.length;f<p;++f){if(n=o.exec(u[f])){var h=n[2]&&0===n[2].indexOf("native");n[2]&&0===n[2].indexOf("eval")&&(t=c.exec(n[2]))&&(n[2]=t[1],n[3]=t[2],n[4]=t[3]),r={url:h?null:n[2],func:n[1]||"?",args:h?[n[2]]:[],line:n[3]?+n[3]:null,column:n[4]?+n[4]:null}}else if(n=i.exec(u[f]))r={url:n[2],func:n[1]||"?",args:[],line:+n[3],column:n[4]?+n[4]:null};else{if(!(n=a.exec(u[f])))continue;n[3]&&n[3].indexOf(" > eval")>-1&&(t=s.exec(n[3]))?(n[3]=t[1],n[4]=t[2],n[5]=null):0!==f||n[5]||void 0===e.columnNumber||(d[0].column=e.columnNumber+1),r={url:n[3],func:n[1]||"?",args:n[2]?n[2].split(","):[],line:n[4]?+n[4]:null,column:n[5]?+n[5]:null}}!r.func&&r.line&&(r.func="?"),d.push(r)}return d.length?{name:e.name,message:e.message,url:l(),stack:d}:null}}function t(e,t,n,r){var o={url:t,line:n};if(o.url&&o.line){if(e.incomplete=!1,o.func||(o.func="?"),e.stack.length>0&&e.stack[0].url===o.url){if(e.stack[0].line===o.line)return!1;if(!e.stack[0].line&&e.stack[0].func===o.func)return e.stack[0].line=o.line,!1}return e.stack.unshift(o),e.partial=!0,!0}return e.incomplete=!0,!1}function n(e,a){for(var i,s,c=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,u=[],d={},f=!1,p=n.caller;p&&!f;p=p.caller)if(p!==r&&p!==o.report){if(s={url:null,func:"?",line:null,column:null},p.name?s.func=p.name:(i=c.exec(p.toString()))&&(s.func=i[1]),void 0===s.func)try{s.func=i.input.substring(0,i.input.indexOf("{"))}catch(e){}d[""+p]?f=!0:d[""+p]=!0,u.push(s)}a&&u.splice(0,a);var h={name:e.name,message:e.message,url:l(),stack:u};return t(h,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),h}function r(t,r){var a=null;r=null==r?0:+r;try{if(a=e(t))return a}catch(e){if(o.debug)throw e}try{if(a=n(t,r+1))return a}catch(e){if(o.debug)throw e}return{name:t.name,message:t.message,url:l()}}return r.augmentStackTraceWithInitialElement=t,r.computeStackTraceFromStackProp=e,r}(),e.exports=o}).call(this,n(5))},function(e,t){function n(e,t){for(var n=0;n<e.length;++n)if(e[n]===t)return n;return-1}function r(e,t){var r=[],o=[];return null==t&&(t=function(e,t){return r[0]===t?"[Circular ~]":"[Circular ~."+o.slice(0,n(r,t)).join(".")+"]"}),function(a,i){if(r.length>0){var s=n(r,this);~s?r.splice(s+1):r.push(this),~s?o.splice(s,1/0,a):o.push(a),~n(r,i)&&(i=t.call(this,a,i))}else r.push(i);return null==e?i instanceof Error?function(e){var t={stack:e.stack,message:e.message,name:e.name};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t}(i):i:e.call(this,a,i)}}(e.exports=function(e,t,n,o){return JSON.stringify(e,r(t,o),n)}).getSerialize=r},function(e,t){function n(e){this.name="RavenConfigError",this.message=e}n.prototype=new Error,n.prototype.constructor=n,e.exports=n},function(e,t){e.exports={wrapMethod:function(e,t,n){var r=e[t],o=e;if(t in e){var a="warn"===t?"warning":t;e[t]=function(){var e=[].slice.call(arguments),i=""+e.join(" "),s={level:a,logger:"console",extra:{arguments:e}};"assert"===t?!1===e[0]&&(i="Assertion failed: "+(e.slice(1).join(" ")||"console.assert"),s.extra.arguments=e.slice(1),n&&n(i,s)):n&&n(i,s),r&&Function.prototype.apply.call(r,o,e)}}}}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DATA_CLONE_ERROR=t.MESSAGE=t.REJECTED=t.FULFILLED=t.REPLY=t.CALL=t.HANDSHAKE_REPLY=t.HANDSHAKE=void 0;t.HANDSHAKE="handshake";t.HANDSHAKE_REPLY="handshake-reply";t.CALL="call";t.REPLY="reply";t.FULFILLED="fulfilled";t.REJECTED="rejected";t.MESSAGE="message";t.DATA_CLONE_ERROR="DataCloneError"},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ERR_NO_IFRAME_SRC=t.ERR_NOT_IN_IFRAME=t.ERR_CONNECTION_TIMEOUT=t.ERR_CONNECTION_DESTROYED=void 0;t.ERR_CONNECTION_DESTROYED="ConnectionDestroyed";t.ERR_CONNECTION_TIMEOUT="ConnectionTimeout";t.ERR_NOT_IN_IFRAME="NotInIframe";t.ERR_NO_IFRAME_SRC="NoIframeSrc"},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.deserializeError=t.serializeError=void 0;t.serializeError=e=>({name:e.name,message:e.message,stack:e.stack});t.deserializeError=e=>{const t=new Error;return Object.keys(e).forEach(n=>t[n]=e[n]),t}},,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(19),o=n(23),a=u(n(35)),i=u(n(36)),s=u(n(37)),l=u(n(38)),c=u(n(39));function u(e){return e&&e.__esModule?e:{default:e}}t.default=e=>{let t=e.iframe,n=e.methods,u=void 0===n?{}:n,d=e.childOrigin,f=e.timeout,p=e.debug;const h=(0,s.default)(p),g=window,v=(0,a.default)(),m=v.destroy,_=v.onDestroy;if(!d){if(!t.src&&!t.srcdoc){const e=new Error("Iframe must have src or srcdoc property defined.");throw e.code=o.ERR_NO_IFRAME_SRC,e}d=(0,i.default)(t.src)}const b="null"===d?"*":d;return{promise:new Promise((e,n)=>{let a;void 0!==f&&(a=setTimeout(()=>{const e=new Error(`Connection to child timed out after ${f}ms`);e.code=o.ERR_CONNECTION_TIMEOUT,n(e),m()},f));const i={};let s,p;const v=n=>{const o=t.contentWindow;if(n.source!==o||n.data.penpal!==r.HANDSHAKE)return;if(n.origin!==d)return void h(`Parent received handshake from origin ${n.origin} which did not match expected origin ${d}`);h("Parent: Received handshake, sending reply"),n.source.postMessage({penpal:r.HANDSHAKE_REPLY,methodNames:Object.keys(u)},b);const f={localName:"Parent",local:g,remote:o,originForSending:b,originForReceiving:d};p&&p(),p=(0,l.default)(f,u,h),_(p),s&&s.forEach(e=>{delete i[e]}),s=n.data.methodNames;const v=(0,c.default)(i,f,s,m,h);_(v),clearTimeout(a),e(i)};g.addEventListener(r.MESSAGE,v),h("Parent: Awaiting handshake");var E=setInterval(()=>{document.contains(t)||(clearInterval(E),m())},6e4);_(()=>{g.removeEventListener(r.MESSAGE,v),clearInterval(E);const e=new Error("Connection destroyed");e.code=o.ERR_CONNECTION_DESTROYED,n(e)})}),destroy:m}},e.exports=t.default},,,,,,,function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=()=>{const e=[];let t=!1;return{destroy(){t=!0,e.forEach(e=>{e()})},onDestroy(n){t?n():e.push(n)}}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;const r={"http:":"80","https:":"443"},o=/^(https?:)?\/\/([^/:]+)?(:(\d+))?/,a=["file:","data:"];t.default=e=>{if(e&&a.find(t=>e.startsWith(t)))return"null";const t=document.location,n=o.exec(e);let i,s,l;return n?(i=n[1]?n[1]:t.protocol,s=n[2],l=n[4]):(i=t.protocol,s=t.hostname,l=t.port),`${i}//${s}${l&&l!==r[i]?":"+l:""}`},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;t.default=e=>function(){if(e){for(var t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];console.log("[Penpal]",...n)}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=n(19),o=n(24);t.default=(e,t,n)=>{const a=e.localName,i=e.local,s=e.remote,l=e.originForSending,c=e.originForReceiving;let u=!1;n(a+": Connecting call receiver");const d=e=>{if(e.source!==s||e.data.penpal!==r.CALL)return;if(e.origin!==c)return void n(`${a} received message from origin ${e.origin} which did not match expected origin ${c}`);const i=e.data,d=i.methodName,f=i.args,p=i.id;n(`${a}: Received ${d}() call`);const h=e=>t=>{if(n(`${a}: Sending ${d}() reply`),u)return void n(`${a}: Unable to send ${d}() reply due to destroyed connection`);const i={penpal:r.REPLY,id:p,resolution:e,returnValue:t};e===r.REJECTED&&t instanceof Error&&(i.returnValue=(0,o.serializeError)(t),i.returnValueIsError=!0);try{s.postMessage(i,l)}catch(e){throw e.name===r.DATA_CLONE_ERROR&&s.postMessage({penpal:r.REPLY,id:p,resolution:r.REJECTED,returnValue:(0,o.serializeError)(e),returnValueIsError:!0},l),e}};new Promise(e=>e(t[d].apply(t,f))).then(h(r.FULFILLED),h(r.REJECTED))};return i.addEventListener(r.MESSAGE,d),()=>{u=!0,i.removeEventListener(r.MESSAGE,d)}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r,o=n(19),a=n(23),i=(r=n(40))&&r.__esModule?r:{default:r},s=n(24);t.default=(e,t,n,r,l)=>{const c=t.localName,u=t.local,d=t.remote,f=t.originForSending,p=t.originForReceiving;let h=!1;l(c+": Connecting call sender");return n.reduce((e,t)=>(e[t]=(e=>function(){for(var t=arguments.length,n=new Array(t),g=0;g<t;g++)n[g]=arguments[g];let v;l(`${c}: Sending ${e}() call`);try{d.closed&&(v=!0)}catch(e){v=!0}if(v&&r(),h){const t=new Error(`Unable to send ${e}() call due to destroyed connection`);throw t.code=a.ERR_CONNECTION_DESTROYED,t}return new Promise((t,r)=>{const a=(0,i.default)(),h=n=>{if(n.source!==d||n.data.penpal!==o.REPLY||n.data.id!==a)return;if(n.origin!==p)return void l(`${c} received message from origin ${n.origin} which did not match expected origin ${p}`);l(`${c}: Received ${e}() reply`),u.removeEventListener(o.MESSAGE,h);let i=n.data.returnValue;n.data.returnValueIsError&&(i=(0,s.deserializeError)(i)),(n.data.resolution===o.FULFILLED?t:r)(i)};u.addEventListener(o.MESSAGE,h),d.postMessage({penpal:o.CALL,id:a,methodName:e,args:n},f)})})(t),e),e),()=>{h=!0}},e.exports=t.default},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;let r=0;t.default=()=>++r,e.exports=t.default},,,,,,,,,,,,,,function(e,t,n){"use strict";n.r(t);var r=n(2),o=n.n(r),a=n(6),i=n(1);function s(e,t){var n=o()('<li><a href="'.concat(t,'" target="_blank">').concat(e,"</a></li>")),r=o()("#toplevel_page_leadin").find("li").last().prev();o()(r).before(n)}var l=n(28),c=n.n(l),u=(n(7),{});Object.keys(i.routes).forEach((function(e){u[i.routes[e]]=e}));var d=u;function f(){var e,t,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",r=Object.keys(d).sort((function(e,t){return e.length<t.length?1:-1}));if(r.some((function(r){return 0===n.indexOf(r)&&(e=d[r],t=n.replace(r,"").substr(1),!0)})),e){var o=t.split("/").map((function(e,t){return"".concat(encodeURIComponent("leadin_route[".concat(t,"]")),"=").concat(e)})).join("&"),a="?page=".concat(e).concat(t?"&".concat(o):"");window.history.replaceState(null,null,a)}}var p=function(){return window.location.reload(!0)};function h(e,t){var n=function(e,t,n){var r="".concat(i.ajaxUrl,"?action=").concat(e,"&_ajax_nonce=").concat(i.nonce);return new Promise((function(e,a){var i={url:r,method:t,contentType:"application/json",success:function(t){return e(t)},error:function(e){return a(e)}};n&&(i.data=JSON.stringify(n)),o.a.ajax(i)}))}(e,"post",t);return n.catch((function(e){return a.b.captureMessage("HTTP request failed with code ".concat(e.status,": ").concat(e.message))})),n}var g={leadinClearQueryParam:function(){var e=window.location.toString();e.indexOf("?")>0&&(e=e.substring(0,e.indexOf("?")));var t="".concat(e,"?page=leadin");window.history.pushState({},"",t)},leadinPageReload:p,leadinPageRedirect:function(e){f(e),p()},leadinGetPortalInfo:function(){return{portalDomain:i.portalDomain,portalId:i.portalId,portalEmail:i.portalEmail,accountName:i.accountName}},leadinConnectPortal:function(e){return h("leadin_registration_ajax",e)},leadinDisconnectPortal:function(){return h("leadin_disconnect_ajax",{})},getLeadinConfig:function(){return i}},v=i.hubspotBaseUrl;function m(e){if(e){window.childFrameConnection||(window.childFrameConnection=function(e){return c()({iframe:e,childOrigin:v,methods:g})}(e),window.childFrameConnection.promise.catch((function(e){return a.b.captureException(e,{fingerprint:["INTERFRAME_CONNECTION_ERROR"]})})));var t=function(e){for(var t=window.location.search.substring(1).split("&"),n=0;n<t.length;n++){var r=t[n].split("=");if(decodeURIComponent(r[0])===e)return decodeURIComponent(r[1])}return null}("page");"leadin_settings"!==t&&"leadin"!==t&&window.addEventListener("message",(function t(n){"unauthorized"===n.data&&(window.removeEventListener("message",t),e.src=i.loginUrl)})),window.addEventListener("message",(function(e){if(e.origin===v)try{var t=JSON.parse(e.data);if(t.leadin_sync_route)f(t.leadin_sync_route);else"REDIRECT"===t.message&&(window.location.href=t.url)}catch(e){}}))}}Object(a.a)(),a.b.context((function(){o()(document).ready((function(){var e,t,n,r;e="".concat(i.hubspotBaseUrl,"/chatflows/").concat(i.portalId),t="".concat(i.hubspotBaseUrl,"/email/").concat(i.portalId),s(i.i18n.chatflows,e),s(i.i18n.email,t),n=o()("#leadin-iframe-container"),m((r=o()('<iframe id="leadin-iframe" src="'.concat(i.iframeUrl,'"></iframe>')))[0]),n.append(r)}))}))}]); //# sourceMappingURL=leadin.js.map
Save Changes
Rename File
Rename