define("metaserver/static/js/modules/core/assert",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assert=t.overrideEnvironmentForTesting=void 0;let n="production";t.overrideEnvironmentForTesting=function(e){n=e},t.assert=function(e,t,r={}){if(e)return;"production"!==n&&alert(`Assertion Error: ${t}`);const o=new Error(`Assertion Error: ${t}`),{tags:i=[],exc_extra:s=null}=r;throw o.assertOptions={tags:i.concat("module:exception","assert"),exc_extra:s},o.isAssertion=!0,o}})),define("metaserver/static/js/modules/core/exception_tag_registry",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.clear_all_tags=t.unregister_tag=t.register_tag=t.get_registered_tags=void 0;let n=new Set;if(window.ensemble){const e=window;e.REGISTERED_EXCEPTION_TAGS||(e.REGISTERED_EXCEPTION_TAGS=new Set),n=e.REGISTERED_EXCEPTION_TAGS}t.get_registered_tags=function(){const e=[];return n.forEach(t=>e.push(t)),e},t.register_tag=function(e){n.add(e)},t.unregister_tag=function(e){n.delete(e)},t.clear_all_tags=function(){n.clear()}})),define("metaserver/static/js/modules/core/exception",["require","exports","tslib","metaserver/static/js/modules/constants/page_load","metaserver/static/js/modules/constants/request","metaserver/static/js/modules/core/exception_tag_registry","metaserver/static/js/modules/core/xhr","metaserver/static/js/modules/shims/tracekit"],(function(e,t,n,r,o,i,s,c){"use strict";var a;Object.defineProperty(t,"__esModule",{value:!0}),t.reportStack=t._reportException=t.reportException=t.unregisterOnFailedAssert=t.registerOnFailedAssert=t.SEVERITY=t.overrideEnvironmentForTesting=void 0,r=n.__importStar(r),o=n.__importStar(o),c=n.__importDefault(c);let l="production";t.overrideEnvironmentForTesting=function(e){l=e};let u=0;const f=[];let p=void 0;const d=null===(a=window.edisonExceptionContext)||void 0===a?void 0:a.exceptionExtras;function reportException(e){let{err:t,force:n,tags:r,severity:o,exc_extra:i}=e;if(t.reported)return;const s=c.default.computeStackTrace(t),a=null!=(s&&s.stack)?s.stack:[];if(t.isAssertion){const e=t;e.assertOptions&&e.assertOptions.tags&&(r=(r||[]).concat(e.assertOptions.tags)),e.assertOptions&&e.assertOptions.exc_extra&&(i=Object.assign(Object.assign({},null!=i?i:{}),e.assertOptions.exc_extra)),f.forEach(e=>e(s))}const l=t;l.excExtra&&(i=Object.assign(Object.assign({},null!=i?i:{}),l.excExtra)),l.tags&&(r=(null!=r?r:[]).concat(l.tags)),_reportException({msg:t.message,stack:a,force:n,tags:r,severity:o,exc_extra:i}),t.reported=!0}function _reportException(e){var n;let{msg:a,stack:l,force:f,tags:g,severity:x,exc_extra:h}=e;if(!p||f){const e=["\\b_reportException\\b","\\breportException\\b","\\bassert\\b","\\breportStack\\b"];let f=[];l=m(l,e);try{throw new Error}catch(t){const n=c.default.computeStackTrace(t);null!=n&&null!=n.stack&&(f=n.stack),f=m(f,e)}let _=l.length-f.length;_<=0&&(_=1);const v=l.slice(0,_),E=l.slice(_);g||(g=[]),g=g.concat(i.get_registered_tags()),(null===(n=window.edisonExceptionContext)||void 0===n?void 0:n.tags)&&(g=g.concat(window.edisonExceptionContext.tags));let w="";w=d&&"sessionId"in d?d.sessionId:r.SESSION_ID,g.push(`session-id:${w}`),h=h?Object.assign({},h):{},window.DB_FRAME_BUST&&(h.DB_FRAME_BUST=!0,x=t.SEVERITY.USER_ERROR),h.client_time=(new Date).toString(),h.client_utc_time=(new Date).toUTCString(),u+=1,h.exception_number=u,d?(h=Object.assign(Object.assign({},h),d),delete h.sessionId):h=Object.assign(Object.assign({},h),{page_repo_rev:r.REPO_REV,page_load_timestamp:o.PAGE_LOAD_TIME,page_load_hostname:r.HOSTNAME,yaps_project:r.YAPS_PROJECT,yaps_deployment:r.YAPS_DEPLOYMENT,user_locale:r.USER_LOCALE});const b={};for(const e in window.requireContexts)if(window.requireContexts.hasOwnProperty(e)){const t={},n=window.requireContexts[e].firstUndefinedModule;n&&(t.first_undefined_module=n),b[e]=t}h.page_alameda_failures=b;const k=window.ensemble;null!=k&&(null!=k.getExceptionInfo&&(h.dws_page_info=k.getExceptionInfo()),null!=k.getPageletInfoForExceptionReporting&&(h.pagelet_info=k.getPageletInfoForExceptionReporting()));const O={e:a,loc:window.location.href,ref:document.referrer,stack:JSON.stringify(v.reverse()),context_tb:JSON.stringify(E.reverse()),tags:JSON.stringify(g),sev:x||"",exc_extra:JSON.stringify(h||{})};s.sendXhr("/jse",O),p=a}}function m(e,t){const n=e=>{if(!e)return!1;for(const n of t)if(-1!==e.search(n))return!0;return!1};for(;e.length>0&&n(e[0].func);)e=e.slice(1);return e}t.SEVERITY={CRITICAL:"critical",NONCRITICAL:"non-critical",USER_ERROR:"user-error",UNCAUGHT:"uncaught",OPERATIONAL:"operational"},t.registerOnFailedAssert=function(e){f.push(e)},t.unregisterOnFailedAssert=function(e){const t=f.indexOf(e);t>=0&&f.splice(t,1)},t.reportException=reportException,t._reportException=_reportException,t.reportStack=function(e,n={}){n={severity:n.severity||t.SEVERITY.NONCRITICAL,tags:n.tags||[],exc_extra:n.exc_extra||{},silent:!!n.silent};const r=new Error(e);reportException({err:r,force:!0,tags:(n.tags||[]).concat("module:exception","reportStack"),severity:n.severity,exc_extra:n.exc_extra}),"production"!==l&&(n.severity===t.SEVERITY.CRITICAL?(n.silent||alert(e),console&&console.error&&console.error(r)):console&&console.warn&&console.warn(r))}})),define("metaserver/static/js/modules/shims/tracekit",["require","exports","tslib","tracekit"],(function(e,t,n,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),(r=n.__importDefault(r)).default.linesOfContext=1,r.default.remoteFetching=!1,r.default.noConflict(),t.default=r.default})),define("metaserver/static/js/modules/core/cookies",["require","exports"],(function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Cookies=t._setCookie=void 0;const assert=function(e,t){if(!e)throw new Error(t)},n=/^([0-9]{1,3}\.){3}[0-9]{1,3}$/,r=function(e){if(e.match(n))return[e];const t=e.split("."),r=[];for(let e=0;e0,`${t} must not be empty`),assert(!(function(e){if(null==e)return!1;for(const t of i)if(-1!==e.indexOf(t))return!0;return!1})(e),`${t} contains illegal characters`)},c=e=>s(e,"Cookie name",!1);t._setCookie=function(e,t,n={}){var r,o,i;c(e),(e=>{s(e,"Cookie value",!0)})(t),n.expires&&(r=n.expires,s(r,"Cookie expiration date",!1)),n.domain&&(o=n.domain,s(o,"Cookie domain",!1)),n.path&&(i=n.path,s(i,"Cookie path",!1));const a=[`${e}=${t}`];n.expires&&a.push(`expires=${n.expires}`),n.domain&&a.push(`domain=${n.domain}`),n.path&&a.push(`path=${n.path}`),n.samesite&&a.push(`samesite=${n.samesite}`),a.push("secure"),document.cookie=a.join("; ")};const a=new Date(1).toUTCString();t.Cookies={create(e,n,r,o,i="/",s="lax"){let c;if(null!=r){assert("number"==typeof r,"Cookie expiration must be a number");const e=new Date;e.setTime(e.getTime()+24*r*60*60*1e3),c=e.toUTCString()}t._setCookie(e,n,{expires:c,path:i,domain:o,samesite:s})},read(e){c(e);const n=[];for(const t of document.cookie.split(";")){const r=t.split("=",1)[0];r.trim()===e&&n.push(t.substring(r.length+1,t.length).trim())}let r=!1;const o=[];for(const e of n)""===e?r=!0:o.push(e);return 1===o.length?o[0]:o.length>1?(t.Cookies.delete(e),null):r?"":null},delete(e){const n=[null,...r(window.location.hostname)],i=[null,...o(window.location.pathname)];for(const r of n)for(const n of i)t._setCookie(e,"",{expires:a,domain:r,path:n,samesite:"lax"})},are_enabled:()=>navigator.cookieEnabled?navigator.cookieEnabled:(document.cookie="this_is_a_test_cookie",-1!==document.cookie.indexOf("this_is_a_test_cookie"))}})),define("metaserver/static/js/modules/core/xhr",["require","exports","metaserver/static/js/modules/clean/csrf"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sendXhr=void 0;const r=function(e){};t.sendXhr=function(e,t,o=r){n.assertDropboxDomain(e),(function(e){const t=n.readCsrfToken();e.is_xhr=!0,e.t=t})(t);const i=(function(e){const t=[];for(const n in e)e.hasOwnProperty(n)&&void 0!==e[n]&&t.push(`${encodeURIComponent(n)}=${encodeURIComponent(String(e[n]))}`);return t.join("&")})(t),s=new XMLHttpRequest;return s.onreadystatechange=function(){s.readyState===XMLHttpRequest.DONE&&o(s.status)},s.open("POST",e),s.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),s.send(i),s}})),define("metaserver/static/js/modules/clean/csrf",["require","exports","metaserver/static/js/modules/core/cookies"],(function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertDropboxDomain=t.readCsrfToken=void 0,t.readCsrfToken=function(){return n.Cookies.read("__Host-js_csrf")},t.assertDropboxDomain=function(e){const t=document.createElement("a");t.href=e;const n=t.hostname||window.location.hostname;if(-1===n.indexOf(".dropbox.com",n.length-".dropbox.com".length))throw new Error("Cannot send the CSRF token to "+n)}})),define("metaserver/static/js/prod_assets_web_modules/tracekit",["./common/_commonjsHelpers"],(function(e){"use strict";var t,n={exports:{}};return t=n,(function(e,n){if(e){var r={},o=e.TraceKit,i=[].slice,s="?";r.noConflict=function(){return e.TraceKit=o,r},r.wrap=function(e){return function(){try{return e.apply(this,arguments)}catch(e){throw r.report(e),e}}},r.report=(function(){var t,n,o=[],s=null,a=null,l=null;function u(e,t){var n=null;if(!t||r.collectWindowErrors){for(var s in o)if(c(o,s))try{o[s].apply(null,[e].concat(i.call(arguments,2)))}catch(e){n=e}if(n)throw n}}function f(e,n,o,i,s){if(l)r.computeStackTrace.augmentStackTraceWithInitialElement(l,n,o,e),p();else if(s)u(r.computeStackTrace(s),!0);else{var c={url:n,line:o,column:i};c.func=r.computeStackTrace.guessFunctionName(c.url,c.line),c.context=r.computeStackTrace.gatherContext(c.url,c.line),u({mode:"onerror",message:e,stack:[c]},!0)}return!!t&&t.apply(this,arguments)}function p(){var e=l,t=s;s=null,l=null,a=null,u.apply(null,[e,!1].concat(t))}function d(t){if(l){if(a===t)return;p()}var n=r.computeStackTrace(t);throw l=n,a=t,s=i.call(arguments,1),e.setTimeout((function(){a===t&&p()}),n.incomplete?2e3:0),t}return d.subscribe=function(r){!0!==n&&(t=e.onerror,e.onerror=f,n=!0),o.push(r)},d.unsubscribe=function(e){for(var t=o.length-1;t>=0;--t)o[t]===e&&o.splice(t,1)},d})(),r.computeStackTrace=(function(){var t={};function n(n){if("string"!=typeof n)return[];if(!c(t,n)){var o="",i="";try{i=e.document.domain}catch(e){}var s=/(.*)\:\/\/([^:\/]+)([:\d]*)\/{0,1}([\s\S]*)/.exec(n);s&&s[2]===i&&(o=(function(t){if(!r.remoteFetching)return"";try{var n=(function(){try{return new e.XMLHttpRequest}catch(t){return new e.ActiveXObject("Microsoft.XMLHTTP")}})();return n.open("GET",t,!1),n.send(""),n.responseText}catch(e){return""}})(n)),t[n]=o?o.split("\n"):[]}return t[n]}function o(e,t){var r,o=/function ([^(]*)\(([^)]*)\)/,i=/['"]?([0-9A-Za-z$_]+)['"]?\s*[:=]\s*(function|eval|new Function)/,c="",l=n(e);if(!l.length)return s;for(var u=0;u<10;++u)if(!a(c=l[t-u]+c)){if(r=i.exec(c))return r[1];if(r=o.exec(c))return r[1]}return s}function i(e,t){var o=n(e);if(!o.length)return null;var i=[],s=Math.floor(r.linesOfContext/2),c=s+r.linesOfContext%2,l=Math.max(0,t-s-1),u=Math.min(o.length,t+c-1);t-=1;for(var f=l;f0?i:null}function l(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#]/g,"\\$&")}function u(e){return l(e).replace("<","(?:<|<)").replace(">","(?:>|>)").replace("&","(?:&|&)").replace('"','(?:"|")').replace(/\s+/g,"\\s+")}function f(e,t){for(var r,o,i=0,s=t.length;ir&&(o=s.exec(i[r]))?o.index:null}function d(t){if(!a(e&&e.document)){for(var n,r,o,i,s=[e.location.href],c=e.document.getElementsByTagName("script"),p=""+t,d=0;d0&&e.stack[0].url===s.url){if(e.stack[0].line===s.line)return!1;if(!e.stack[0].line&&e.stack[0].func===s.func)return e.stack[0].line=s.line,e.stack[0].context=s.context,!1}return e.stack.unshift(s),e.partial=!0,!0}return e.incomplete=!0,!1}function g(e,t){for(var n,i,c,a=/function\s+([_$a-zA-Z\xA0-\uFFFF][_$a-zA-Z0-9\xA0-\uFFFF]*)?\s*\(/i,l=[],u={},f=!1,h=g.caller;h&&!f;h=h.caller)if(h!==x&&h!==r.report){if(i={url:null,func:s,args:[],line:null,column:null},h.name?i.func=h.name:(n=a.exec(h.toString()))&&(i.func=n[1]),void 0===i.func)try{i.func=n.input.substring(0,n.input.indexOf("{"))}catch(e){}if(c=d(h)){i.url=c.url,i.line=c.line,i.func===s&&(i.func=o(i.url,i.line));var _=/ '([^']+)' /.exec(e.message||e.description);_&&(i.column=p(_[1],c.url,c.line))}u[""+h]?f=!0:u[""+h]=!0,l.push(i)}t&&l.splice(0,t);var v={mode:"callers",name:e.name,message:e.message,stack:l};return m(v,e.sourceURL||e.fileName,e.line||e.lineNumber,e.message||e.description),v}function x(t,r){var l=null;r=null==r?0:+r;try{if(l=(function(e){var t=e.stacktrace;if(t){for(var n,r=/ line (\d+).*script (?:in )?(\S+)(?:: in function (\S+))?$/i,s=/ line (\d+), column (\d+)\s*(?:in (?:]+)>|([^\)]+))\((.*)\))? in (.*):\s*$/i,c=t.split("\n"),a=[],l=0;l=0&&(_.line=v+w.substring(0,b).split("\n").length)}}}else if(s=p.exec(r[h])){var k=e.location.href.replace(/#.*$/,""),O=f(new RegExp(u(r[h+1])),[k]);_={url:k,func:"",args:[],line:O?O.line:s[1],column:null}}if(_){_.func||(_.func=o(_.url,_.line));var S=i(_.url,_.line),T=S?S[Math.floor(S.length/2)]:null;S&&T.replace(/^\s*/,"")===r[h+1].replace(/^\s*/,"")?_.context=S:_.context=[r[h+1]],d.push(_)}}return d.length?{mode:"multiline",name:t.name,message:r[0],stack:d}:null})(t))return l}catch(e){}try{if(l=g(t,r+1))return l}catch(e){}return{mode:"failed"}}return x.augmentStackTraceWithInitialElement=m,x.guessFunctionName=o,x.gatherContext=i,x.ofCaller=function(e){e=1+(null==e?0:+e);try{throw new Error}catch(t){return x(t,e+1)}},x.getSource=n,x})(),r.extendToAsynchronousCallbacks=function(){var t=function(t){var n=e[t];e[t]=function(){var e=i.call(arguments),t=e[0];return"function"==typeof t&&(e[0]=r.wrap(t)),n.apply?n.apply(this,e):n(e[0],e[1])}};t("setTimeout"),t("setInterval")},r.remoteFetching||(r.remoteFetching=!0),r.collectWindowErrors||(r.collectWindowErrors=!0),(!r.linesOfContext||r.linesOfContext<1)&&(r.linesOfContext=11),t.exports&&e.module!==t?t.exports=r:e.TraceKit=r}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function a(e){return void 0===e}})("undefined"!=typeof window?window:e.commonjsGlobal),n.exports})); //# sourceMappingURL=pkg-exception-reporting.min.js-vflTbPps2.map