"use strict";(self.webpackChunk_postman_app_scratchpad=self.webpackChunk_postman_app_scratchpad||[]).push([[30],{7041:function(e,t,n){n.r(t),n.d(t,{default:function(){return h}});var a=n(1),o=n(4),i=n(4163),r=n(8),l=n(7042),u=n(6937),c=n(2149),d=n(3031),s=n(3001),f=n(7044),m=n(6938);window.BroadcastChannel=window.BroadcastChannel||r.default,window.onpageshow=function(e){e.persisted&&window.location.reload()};let p=!1;window.requestIdleCallback=window.requestIdleCallback||function(e){return setTimeout((function(){var t=Date.now();e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})}),1)},window.cancelIdleCallback=window.cancelIdleCallback||function(e){clearTimeout(e)};const w=document.getElementById("app-root");function g(e){!function(){let e=document.getElementsByClassName("pm-loader")[0];e&&e.classList.add("is-hidden")}(),e?(0,o.render)(a.createElement(d.default,{showError:!0}),w):(0,o.render)(a.createElement(d.default,null,a.createElement(s.Theme,null,a.createElement(i.ToastProvider,null,a.createElement(m.default,null)))),w,(()=>{let e=(0,u.getWindowLoadTime)();c.default.addEvent("app_performance_metric","requester_window_loaded",null,null,{load_time:e})}))}function h(e){p||f.default.init((()=>{l.default.init((()=>{p=!0,g(),e&&e()}))}))}},7042:function(e,t,n){n.r(t);var a=n(14),o=n.n(a),i=n(962),r=n(6496),l=n(6639),u=n(6646),c=n(6647),d=n(6710),s=n(6711),f=n(6719),m=n(6728),p=n(1198),w=n.n(p),g=n(2095),h=n(6731),k=n(6453),_=n(7043),E=n(6749),C=n(6750),v=n(6794),b=n(6795),S=n(6809),R=n(12);const y={process:"requester",ui:!0};window.pm=window.pm||{},window.process={},t.default={init:e=>{R.assign(window.pm,{windowConfig:y});const t=[C.default,h.initializeNavigationForDomains,u.bootWindowConfig,l.default,i.default,S.default,v.cleanupCookies,v.initializeCommunicationForCookies,r.default,s.default,f.default,E.default,c.default,b.default];o()(t,(t=>{(0,d.default)(t);let n=w().Url.parse(location.href).query;if(R.find(n,{key:"access_token"})){console.log("Found access token in URL, logging user in...",n);let e=R.mapValues(R.keyBy(n,"key"),"value"),t={email:e.email,id:e.user_id,name:e.name,username:e.username,auth:{access_token:e.access_token}};pm.eventBus.channel("auth-handler-events").publish((0,g.createEvent)("authenticated","authentication",{userData:t,hasAccounts:!1}))}return t&&pm.logger.error("Error in requester boot sequence",t),(0,m.default)(),k.default.deleteOfflineWorkspace().catch((e=>{pm.logger.warn("Requester~init: Error while deleting default offline workspace",e)})).then((()=>{(0,_.setupSocketStatusReaction)(),e&&e(t)}))}))}}},7044:function(e,t,n){n.r(t);var a=n(14),o=n.n(a),i=(n(60),n(312),n(6497),n(6501),n(6508),n(6710)),r=(n(6720),n(6803),n(4154),n(6805),n(2149)),l=n(6728),u=n(6777);n(4614),n(6792),n(6806),n(7045);window.pm=window.pm||{},pm.init=e=>{u.default.markPoint("app_exec:start");const t=[];o()(t,(t=>{(0,i.default)(t),t&&(pm.bulkAnalytics&&r.default.addEventV2AndPublish({category:"app_boot_failure",action:t.name,label:t.message},{noActiveWorkspace:!0}),pm.logger.error("Error in the app boot sequence",t)),(0,l.default)(),e&&e(t)}))},t.default=pm},7045:function(e,t,n){n.r(t),t.default=function(e){"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then((function(e){for(let t of e)t.unregister()})),e&&"function"==typeof e&&e()}},7043:function(e,t,n){n.r(t),n.d(t,{setupSocketStatusReaction:function(){return s}});var a=n(1019),o=n(2271),i=n(6471),r=n(4244),l=n(12);const u="userOffline",c="You seem to be offline. Data in this workspace might not be up to date.",d=1e3;function s(){(0,a.reaction)((()=>(0,o.getStore)("SyncStatusStore").isSocketConnected),l.debounce((function(e){e?i.default.dismiss(u):i.default.trigger({id:u,message:c,meta:{targets:[r.WORKSPACE_PRIVATE,r.WORKSPACE_PERSONAL,r.WORKSPACE_TEAM,r.WORKSPACE_PUBLIC]}})}),d,{leading:!1,trailing:!0}))}}}]);