{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./src/log.js","webpack:///./src/helpers/redact-secrets.js","webpack:///./src/api/index.js","webpack:///./src/App.vue?8f63","webpack:///./src/locales sync [A-Za-z0-9-_,\\s]+\\.json$/","webpack:///./src/locales sync nonrecursive [A-Za-z0-9-_,\\s]+\\.json$/","webpack:///./src/App.vue","webpack:///./src/components/Ui/ServerInfo.vue?a966","webpack:///src/components/Ui/ServerInfo.vue","webpack:///./src/components/Ui/ServerInfo.vue?eeb8","webpack:///./src/components/Ui/ServerInfo.vue","webpack:///./src/router.js","webpack:///./src/store/state.js","webpack:///./src/helpers/validateUnraidVersion.js","webpack:///./src/store/getters.js","webpack:///./src/store/mutations.js","webpack:///./src/store/myServers/client.js","webpack:///./src/store/myServers/fetch.js","webpack:///./src/store/actions.js","webpack:///./src/store/index.js","webpack:///src/App.vue","webpack:///./src/App.vue?c53a","webpack:///./src/App.vue?bff9","webpack:///./src/main.js","webpack:///./src/env.js","webpack:///./src/i18n.js","webpack:///./src/services/keyServer.js","webpack:///./src/consts.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","executeModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","deferredModules","apply","checkDeferredModules","result","deferredModule","fulfilled","j","depId","splice","__webpack_require__","s","installedModules","installedCssChunks","exports","module","l","e","promises","Promise","resolve","reject","href","fullhref","p","existingLinkTags","document","getElementsByTagName","tag","dataHref","getAttribute","rel","existingStyleTags","linkTag","createElement","type","onload","onerror","event","request","target","src","err","Error","code","parentNode","removeChild","appendChild","then","installedChunkData","promise","onScriptComplete","script","charset","timeout","nc","setAttribute","jsonpScriptSrc","error","clearTimeout","chunk","errorType","realSrc","message","name","setTimeout","head","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","console","jsonpArray","window","oldJsonpFunction","slice","redact","redacted","options","keys","values","a","b","isRedactable","isGenericSecret","isSecret","isUserSecret","some","regex","test","map","obj","traverse","default","val","update","forEach","redactSecrets","log","fromEntries","entries","loggerName","originalLogger","method","consoleMethod","optionalParams","arg","ForumWretch","wretch","catcher","KeyServerWretch","WanIp","WebguiInstallKey","WebguiState","WebguiUpdate","WebguiUpdateDns","WebguiUnraidApiCommand","webpackContext","req","id","webpackContextResolve","render","_vm","this","_c","_self","staticClass","logoNoLinkRoutes","includes","$route","attrs","$t","loading","state","_e","components","UnraidSvgUtilInfo","show","NODE_ENV","computed","mapState","showRegGuid","isRegGuidBlacklisted","isGuidBlacklisted","on","$event","directives","rawName","expression","_v","_s","serverdesc","flashvendor","flashproduct","class","guid","servername","internalip","regGuid","Vue","use","VueRouter","Meta","routes","path","component","router","USER_AGENT","navigator","userAgent","toLowerCase","ACCOUNT_PAYLOAD","url","ACCOUNT_URL","width","height","errorMessage","errorMessageSubtext","submissionFrom","darkMode","matchMedia","matches","darkTheme","alpha","beta","gamma","lightTheme","csrf","postMessageError","isLaunchpadOpen","isPromoOpen","triggerUPC","ts","tsHumanReadable","deviceCount","keyfile","wanip","sessionStorage","getItem","site","wanFQDN","reggen","registered","internalport","protocol","license","expiretime","regWizTime","rawServerState","plgPath","guidRegistered","guidValid","guidValidationRunning","replaceable","guidForValidation","guidBlacklisted","isPopUpOpen","regAtOpen","forumaccount","userEmail","username","avatar","userPassword","apikey","ipsValidated","accountAction","keyServerAction","licenseAction","receivedSuccessNewServerState","purchaseWindow","URL","PURCHASE_URL","sendSessionToPopUp","redeemWindow","trialWindow","TRIAL_URL","accountPayload","accountServerPayload","accountRegisterPayload","accountUnregisterPayload","accountKeyRecoverPayload","accountKeyReplacePayload","accountTrialExtendPayload","accountTroubleshootPayload","locale","messages","graphOnline","graphReconnected","myServers","myServersLoading","myServersError","myServersErrorShowSupportBtn","myServersEnv","apiVersion","cloud","hideMyServers","osVersion","plgVersion","plgInstalled","hasRemoteApikey","config","hasUnraidNetSSL","flashBackupActivated","extraOrigins","myServersOutOfDate","enabled","heading","link","linkSameTab","linkText","devEnv","signOutTriggered","apiReport","osGui","pirateKey","deprecatedUnraidSSL","location","hostname","processStarted","showPostMessageStatus","keyInstalling","keyInstallSuccess","keyInstallFail","registerSuccess","registerFail","unregisterSuccess","unregisterFail","accessToken","localStorage","idToken","refreshToken","iframeUrl","parent","validateUnraidVersion","unraidVersion","minVersion","recommendedVersion","satisfies","includePrerelease","stateDataDefault","actions","humanReadable","messageCenter","withKey","ENOFLASH","i18n","tc","signInToFix","EGUID_MSG","getters","statePhpPath","myServersCfgPath","requireGuidValidation","CAN_POST_MESSAGE","validApiKeyLength","validApiKeyForUpc","startsWith","showExpiretime","trialExtensionEligible","signedOutWithKey","self","stateData","stateDataKeyActions","_state","keyTypeForPurchase","isRemoteAccess","noRemoteApikeyRegisteredWithPlg","errorTooManyDisks","valid","allowedOrigins","ALLOWED_ORIGINS","myServersNotMinApiVer","semverLt","MIN_API_VER","myServersNotRecApiVer","REC_API_VER","osPrerelease","parse","prerelease","osVersionValid","MIN_OS_VER","REC_OS_VER","allowApiOutOfDate","plgInstallFailed","devMode","tsMilliseconds","Date","toString","server","GUID_NOT_RECEIVED","upcVersion","UPC_VER","features","title","copy","mutations","SET_APP_ERROR_MESSAGE","debug","SAFE_JSON_PARSE","parsedData","SET_APP_ERROR_MESSAGE_SUBTEXT","SET_LOADING_STATE","SET_IS_LAUNCHPAD_OPEN","removeItem","SET_IS_PROMO_OPEN","SET_STATE","SET_CONFIG","CHANGE_GUID_REGISTERED","CHANGE_GUID_VALID","CHANGE_GUID_VALIDATION_RUNNING","CHANGE_GUID_FOR_VALIDATION","CHANGE_GUID_BLACKLISTED","CHANGE_REPLACEABLE","CHANGE_POP_UP_WINDOW","STATE_AT_OPEN","MUTATE_KEYSERVER_RESPONSE","res","newKey","trial","validated","email","password","action","SET_TRIAL","SET_USER_EMAIL","SET_FULL_SERVER_STATE","mutateData","Boolean","Number","assign","SET_RAW_SERVER_STATE","SIGN_OUT","SUBMISSION_FROM","SET_WANIP","setItem","SET_SERVERDESC","SET_SITE","SET_CSRF","LICENSE_PINGBACK","ACCOUNT_PINGBACK","RECEIVED_SUCCESS_NEW_SERVERSTATE","SET_UPTIME","uptime","SET_EXPIRE_TIME","SET_REGWIZ_TIME","CHANGE_GUID_FORUMACCOUNT","SET_LOCALE","LOCALE_MESSAGES","decodeURIComponent","warn","SET_API_KEY","SET_GRAPH_ONLINE","SET_GRAPH_RECONNECTED","SET_MY_SERVERS","SET_MY_SERVERS_LOADING","SET_MY_SERVERS_ERROR","replace","SET_MY_SERVERS_ERROR_SHOW_SUPPORT_BTN","SET_MY_SERVERS_ENV","SET_MY_SERVERS_API_VERSION","TRIGGER_UPC","SET_HIDE_MY_SERVERS","SET_PLG_PATH","SET_POST_MESSAGE_ERROR","SET_OWNER","SET_REGISTRATION_SUB","keyFile","contents","expiration","SET_DEV_MODE","SET_SIGN_OUT_TRIGGERED","SET_API_EXECUTE_RESPONSE","SET_MY_SERVERS_CLOUD","SET_REPLACE_KEY","newkey","SET_PIRATE_KEY","SET_PROCESS_STARTED","SET_SHOW_POST_MESSAGE_STATUS","SET_KEY_INSTALLING","SET_KEY_INSTALL_SUCCESS","SET_KEY_INSTALL_FAIL","SET_REGISTER_SUCCESS","SET_REGISTER_FAIL","SET_UNREGISTER_SUCCESS","SET_UNREGISTER_FAIL","SET_JWTS","WINDOW_URL","DEV_GRAPH_URL","origin","clients","prioritizeCorsError","slowDownRetry","getGraphqlClient","context","client","disconnectTimeout","httpLink","ApolloLink","operation","forward","response","headers","getContext","env","commit","concat","HttpLink","uri","host","wsProtocol","wsLinkUri","wsLink","WebSocketLink","reconnect","connectionParams","subscriptionClient","maxConnectTimeGenerator","setMin","onConnected","onReconnected","onDisconnected","split","query","definition","getMainDefinition","kind","authLink","setContext","_","errorLink","onError","graphQLErrors","networkError","msg","ERROR_CORS_403","retryLink","RetryLink","attempts","max","Infinity","retryIf","_operation","delay","initial","jitter","ApolloClient","from","connectToDevTools","cache","InMemoryCache","defaultOptions","watchQuery","fetchPolicy","mutate","subscribe","shouldResubscribe","createGraphqlClient","mutateResponseDataForState","serverState","owner","info","os","flash","registration","flashProduct","product","vendor","sendCrashInfo","crashReportingEnabled","vars","regGen","regState","configError","configValid","detectOwnersResponseError","ERROR_MESSAGE_UNEXPECTED_OWNER_RESPONSE","serverStateFromApi","gql","errorPolicy","skip","next","fetchServers","servers","dispatch","deliverNewStateRetryCounter","updateDns","formUrl","csrf_token","post","updateDnsRes","catch","preventClose","preventDefault","returnValue","alert","popUpWindow","openPopUp","payload","focus","OPEN_POPUP","isDarkMode","isPurchase","lightModeBg","body","style","background","popupClosed","setInterval","clearInterval","closed","reloadWebGUI","onunload","close","resetPopUp","closePopUp","reload","closePopUpFromPopUp","sendDataPostMessageToServer","WEBGUI_PARENT","postMessage","JSON","stringify","requestUpdatedServerStateFromUpc","receivePostMessage","eventsAllowedToPassOriginCheck","acceptDebugEvents","payloadOrigin","fromRegWiz","REGWIZ_URL","fromPurchase","fromAccount","fromPreviewUrl","pmOriginMatchesDataServerUrl","pmOriginMatchesStateSite","pmOriginIncludedInExtraOrigins","fromWebGui","originAllowed","debugInfo","sendBackPostMessage","source","installKey","keyData","keyType","toUpperCase","success","installReponse","signOutUnraidNet","wanaccess","accesstoken","idtoken","refreshtoken","webGuiPathname","pathname","mergeLocaleMessage","catchError","keyToInstall","failedKeyInstall","oldState","newState","potentiallyStaleState","now","oem","countIntervalRuns","intervalForUpdatedState","updatedState","param1","semverGte","command","json","setStateFromWebComponentProp","updateServerState","validateGuid","regWizTimeGuid","previouslyRegistered","tweleveZeros","forbidden","usableErrMsg","parsedError","finally","startTrial","addEventListener","KeyServer","timestamp","Math","floor","getTime","trialRes","blur","removeEventListener","togglePromo","wcName","lp","jumpToUpc","scrollTo","top","behavior","getWanIp","text","executeUnraidApi","postRobotListeners","postRobot","process","installPlugin","plgType","file","modalTitle","openPlugin","openBox","stopGraphqlClient","_context","stop","Vuex","devtools","Store","store","metaInfo","titleTemplate","UnraidLogo","UnraidLoading","UiServerInfo","checkForSession","mapGetters","methods","mapActions","mapMutations","watch","oldVal","newVal","beforeCreate","locales","created","beforeMount","count","staticRenderFns","productionTip","h","App","$mount","VUE_APP_DEV_GRAPH_URL","VUE_APP_DEV_APIKEY","VueI18n","defaultLocale","fallbackLocale","require","matched","match","loadLocaleMessages","signup","formData","login","validate","troubleshoot","signOut","replaceKey","opener","w","dualScreenLeft","screenLeft","screenX","dualScreenTop","screenTop","screenY","innerWidth","documentElement","clientWidth","screen","innerHeight","clientHeight","systemZoom","availWidth","left","args","toolbar","status","menubar","scrollbars","resizable","reduce","open","str","OBJ_TO_STR"],"mappings":";;;;;;;;;;;;;;;;aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GACnBK,EAAiBL,EAAK,GAIHM,EAAI,EAAGC,EAAW,GACpCD,EAAIH,EAASK,OAAQF,IACzBJ,EAAUC,EAASG,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBX,IAAYW,EAAgBX,IACpFK,EAASO,KAAKD,EAAgBX,GAAS,IAExCW,EAAgBX,GAAW,EAE5B,IAAID,KAAYG,EACZK,OAAOC,UAAUC,eAAeC,KAAKR,EAAaH,KACpDc,EAAQd,GAAYG,EAAYH,IAKlC,IAFGe,GAAqBA,EAAoBhB,GAEtCO,EAASC,QACdD,EAASU,OAATV,GAOD,OAHAW,EAAgBJ,KAAKK,MAAMD,EAAiBb,GAAkB,IAGvDe,IAER,SAASA,IAER,IADA,IAAIC,EACIf,EAAI,EAAGA,EAAIY,EAAgBV,OAAQF,IAAK,CAG/C,IAFA,IAAIgB,EAAiBJ,EAAgBZ,GACjCiB,KACIC,EAAI,EAAGA,EAAIF,EAAed,OAAQgB,IAAK,CAC9C,IAAIC,EAAQH,EAAeE,GACG,IAA3BX,EAAgBY,KAAcF,MAE/BA,IACFL,EAAgBQ,OAAOpB,IAAK,GAC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AAY,MACZC,UAAW,MACXljB,MAAQ6hB,EAAIa,EACZziB,OAASwgB,EAAIiC,EACb1E,MACA4E,SAECO,QAAOA,SAAChpB,EAAGC,GAAC,OAAKD,EAAK,GAAJ,OAAOC,EAAE,GAAE,YAAIA,EAAE,GAAE,OAAK,IAG7C,OAAOT,OAAOypB,KACZtjB,EACAhI,EACA+qB,IAsBErX,EAAkB,SAAC6X,GACvB,IACE,MAAO,CAAC,KAAM/J,KAAKnP,MAAMkZ,IACzB,MAAO7sB,GACP,MAAO,CAACA,KASN8sB,EAAa,SAAAzoB,GAAG,OAAIvH,OAAOgI,QAAQT,GAAKsoB,QAAOA,SAACE,EAAK,GAAF,uBAAG/tB,EAAC,KAAE0F,EAAG,qBAASqoB,GAAG,OAAG/tB,EAAC,aAAK0F,EAAG,QAAM,KAI1FgZ,EAAiB","file":"js/index.b69c31ba.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n \t\tvar executeModules = data[2];\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t\t// add entry modules from loaded chunk to deferred list\n \t\tdeferredModules.push.apply(deferredModules, executeModules || []);\n\n \t\t// run deferred modules when all chunks ready\n \t\treturn checkDeferredModules();\n \t};\n \tfunction checkDeferredModules() {\n \t\tvar result;\n \t\tfor(var i = 0; i < deferredModules.length; i++) {\n \t\t\tvar deferredModule = deferredModules[i];\n \t\t\tvar fulfilled = true;\n \t\t\tfor(var j = 1; j < deferredModule.length; j++) {\n \t\t\t\tvar depId = deferredModule[j];\n \t\t\t\tif(installedChunks[depId] !== 0) fulfilled = false;\n \t\t\t}\n \t\t\tif(fulfilled) {\n \t\t\t\tdeferredModules.splice(i--, 1);\n \t\t\t\tresult = __webpack_require__(__webpack_require__.s = deferredModule[0]);\n \t\t\t}\n \t\t}\n\n \t\treturn result;\n \t}\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded CSS chunks\n \tvar installedCssChunks = {\n \t\t\"index\": 0\n \t}\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t\"index\": 0\n \t};\n\n \tvar deferredModules = [];\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"js/\" + ({\"Deprecated\":\"Deprecated\",\"ExtendTrial\":\"ExtendTrial\",\"NotAllowed\":\"NotAllowed\",\"Success\":\"Success\",\"Troubleshoot\":\"Troubleshoot\"}[chunkId]||chunkId) + \".\" + \"b69c31ba\" + \".js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// mini-css-extract-plugin CSS loading\n \t\tvar cssChunks = {\"Deprecated\":1};\n \t\tif(installedCssChunks[chunkId]) promises.push(installedCssChunks[chunkId]);\n \t\telse if(installedCssChunks[chunkId] !== 0 && cssChunks[chunkId]) {\n \t\t\tpromises.push(installedCssChunks[chunkId] = new Promise(function(resolve, reject) {\n \t\t\t\tvar href = \"css/\" + ({\"Deprecated\":\"Deprecated\",\"ExtendTrial\":\"ExtendTrial\",\"NotAllowed\":\"NotAllowed\",\"Success\":\"Success\",\"Troubleshoot\":\"Troubleshoot\"}[chunkId]||chunkId) + \".\" + {\"Deprecated\":\"8ed5fc2e\",\"ExtendTrial\":\"31d6cfe0\",\"NotAllowed\":\"31d6cfe0\",\"Success\":\"31d6cfe0\",\"Troubleshoot\":\"31d6cfe0\"}[chunkId] + \".css\";\n \t\t\t\tvar fullhref = __webpack_require__.p + href;\n \t\t\t\tvar existingLinkTags = document.getElementsByTagName(\"link\");\n \t\t\t\tfor(var i = 0; i < existingLinkTags.length; i++) {\n \t\t\t\t\tvar tag = existingLinkTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\") || tag.getAttribute(\"href\");\n \t\t\t\t\tif(tag.rel === \"stylesheet\" && (dataHref === href || dataHref === fullhref)) return resolve();\n \t\t\t\t}\n \t\t\t\tvar existingStyleTags = document.getElementsByTagName(\"style\");\n \t\t\t\tfor(var i = 0; i < existingStyleTags.length; i++) {\n \t\t\t\t\tvar tag = existingStyleTags[i];\n \t\t\t\t\tvar dataHref = tag.getAttribute(\"data-href\");\n \t\t\t\t\tif(dataHref === href || dataHref === fullhref) return resolve();\n \t\t\t\t}\n \t\t\t\tvar linkTag = document.createElement(\"link\");\n \t\t\t\tlinkTag.rel = \"stylesheet\";\n \t\t\t\tlinkTag.type = \"text/css\";\n \t\t\t\tlinkTag.onload = resolve;\n \t\t\t\tlinkTag.onerror = function(event) {\n \t\t\t\t\tvar request = event && event.target && event.target.src || fullhref;\n \t\t\t\t\tvar err = new Error(\"Loading CSS chunk \" + chunkId + \" failed.\\n(\" + request + \")\");\n \t\t\t\t\terr.code = \"CSS_CHUNK_LOAD_FAILED\";\n \t\t\t\t\terr.request = request;\n \t\t\t\t\tdelete installedCssChunks[chunkId]\n \t\t\t\t\tlinkTag.parentNode.removeChild(linkTag)\n \t\t\t\t\treject(err);\n \t\t\t\t};\n \t\t\t\tlinkTag.href = fullhref;\n\n \t\t\t\tvar head = document.getElementsByTagName(\"head\")[0];\n \t\t\t\thead.appendChild(linkTag);\n \t\t\t}).then(function() {\n \t\t\t\tinstalledCssChunks[chunkId] = 0;\n \t\t\t}));\n \t\t}\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// add entry module to deferred list\n \tdeferredModules.push([0,\"chunk-vendors\"]);\n \t// run deferred modules when ready\n \treturn checkDeferredModules();\n","import redactSecrets from './helpers/redact-secrets';\n\nconst redact = redactSecrets('[REDACTED]', {\n keys: [\n 'guid', // @FIXME - i don't think this is working\n ],\n values: [],\n});\n\n/**\n * Creates a wrapped logger\n *\n * @param {[string, Console['log']]} [loggerName, originalLogger]\n * @return {*}\n */\nconst createWrappedLogger = ([loggerName, originalLogger]) => {\n if (process.env.NODE_ENV === 'production') {\n // Disable debug in production\n if (loggerName === 'debug') {\n return [loggerName, () => {}];\n }\n }\n\n if (typeof method === 'function') {\n const consoleMethod = originalLogger.bind(console);\n const logger = (message, ...optionalParams) => (optionalParams.length >= 1 ? consoleMethod(message, ...optionalParams.map(arg => redact.map(arg))) : consoleMethod(message));\n return [loggerName, logger];\n }\n\n return [loggerName, originalLogger];\n};\n\n/**\n * This works just like console while redacting all incoming arguments.\n * Ensure you use specifers when logging.\n *\n * %s for Strings\n * %o for JSON\n *\n * @type Console\n */\n\n// eslint-disable-next-line import/prefer-default-export\nexport const log = {\n ...Object.fromEntries(Object.entries(console).map(createWrappedLogger)),\n};\n","/* eslint-disable no-param-reassign */\nimport traverse from 'traverse';\nimport * as isSecret from 'is-secret';\n\nconst redactSecrets = (redacted, options) => {\n if (options === undefined) {\n options = {\n keys: [],\n values: [],\n };\n }\n const a = options.keys;\n const keys = a === undefined ? [] : a;\n const b = options.values;\n const values = b === undefined ? [] : b;\n const isRedactable = (key, value) => {\n const isGenericSecret = isSecret.key(key) || isSecret.value(value);\n const isUserSecret = keys.some(regex => regex.test(key)) || values.some(regex => regex.test(value));\n return isGenericSecret || isUserSecret;\n };\n const map = (obj) => {\n const updated = traverse.default(obj).map((val) => {\n if (isRedactable(this.key, val)) {\n return this.update(redacted);\n }\n return false;\n });\n return updated;\n };\n const forEach = (obj) => {\n traverse.default(obj).forEach((val) => {\n if (isRedactable(this.key, val)) {\n this.update(redacted);\n }\n });\n };\n return {\n map,\n forEach,\n };\n};\n\nexport default redactSecrets;\n","import wretch from 'wretch';\nimport { log } from '../log';\n\n/**\n * @name ForumWretch\n * @description Api client using wretch\n */\nexport const ForumWretch = wretch('https://forums.unraid.net')\n .options({ mode: 'cors' })\n .catcher(error => log.error(error));\n/**\n * @name KeyServerWretch\n * @description Api client using wretch\n */\nexport const KeyServerWretch = wretch('https://keys.lime-technology.com')\n .catcher(error => log.error(error));\n/**\n * @name WanIp\n * @description used to get client's wanip to determine what URL to present in server list\n * @type GET\n * @returns {string}\n */\nexport const WanIp = wretch('https://wanip4.unraid.net/')\n .catcher(error => log.error(error));\n/**\n * @name WebguiInstallKey\n * @description used to auto install key urls\n * @type GET - data should be passed using wretch's `.query({ url: String })`\n * @param {string} url - URL of license key\n */\nexport const WebguiInstallKey = wretch('/webGui/include/InstallKey.php')\n .catcher(error => log.error(error));\n/**\n * @name WebguiState\n * @description frequently polled by UPC to keep UPC state update to date. Also used to populate pop-ups using postmessages.\n * @see - most include `.url(String)` since we allow the URL to be modified\n * @type GET\n */\nexport const WebguiState = wretch()\n .catcher(error => log.error(error));\n/**\n * @type POST\n * @dataType - `formUrl(Object)` https://github.com/elbywan/wretch#formurlinput-object--string\n * @param {string} csrf_token\n * @param {string} '#file' - ex: getters.myServersCfgPath\n * @param {string} '#section' - ex: 'remote'\n * @param {string} apikey\n * @param {string} avatar\n * @param {string} email\n * @param {string} username\n */\nexport const WebguiUpdate = wretch('/update.php')\n .catcher(error => log.error(error));\n/**\n * @name WebguiUpdateDns\n * @description used after Sign In to ensure URLs will work correctly\n * @type POST\n */\nexport const WebguiUpdateDns = wretch('/webGui/include/UpdateDNS.php')\n .catcher(error => log.error(error));\n/**\n * @name WebguiUpdateDns\n * @description used after Sign In to ensure URLs will work correctly\n * @type POST\n */\nexport const WebguiUnraidApiCommand = wretch('/plugins/dynamix.my.servers/include/unraid-api.php')\n .catcher(error => log.error(error));\n","export * from \"-!../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=style&index=0&id=462e42e4&prod&lang=postcss&\"","var map = {\n\t\"./en_US.json\": \"59c8\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"49f8\";","var map = {\n\t\"./en_US.json\": \"59c8\"\n};\n\n\nfunction webpackContext(req) {\n\tvar id = webpackContextResolve(req);\n\treturn __webpack_require__(id);\n}\nfunction webpackContextResolve(req) {\n\tif(!__webpack_require__.o(map, req)) {\n\t\tvar e = new Error(\"Cannot find module '\" + req + \"'\");\n\t\te.code = 'MODULE_NOT_FOUND';\n\t\tthrow e;\n\t}\n\treturn map[req];\n}\nwebpackContext.keys = function webpackContextKeys() {\n\treturn Object.keys(map);\n};\nwebpackContext.resolve = webpackContextResolve;\nmodule.exports = webpackContext;\nwebpackContext.id = \"4b3b\";","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"w-full m-auto p-4 sm:py-6 overflow-hidden\"},[_c('header',{staticClass:\"relative z-10 mb-6 mx-auto max-w-150px sm:max-w-200px\"},[(!_vm.logoNoLinkRoutes.includes(_vm.$route.name))?_c('router-link',{attrs:{\"to\":\"/\",\"title\":_vm.$t('regWizPopUp.toHome')}},[_c('UnraidLogo',{attrs:{\"gradientStart\":\"#ffffff\",\"gradientStop\":\"#ffffff\"}})],1):_c('UnraidLogo',{attrs:{\"gradientStart\":\"#ffffff\",\"gradientStop\":\"#ffffff\"}}),(!_vm.loading && _vm.state)?_c('UiServerInfo'):_vm._e()],1),_c('transition',{attrs:{\"name\":\"fade\",\"mode\":\"out-in\"}},[(_vm.loading)?_c('div',{staticClass:\"flex flex-col text-center\"},[_c('UnraidLoading',{attrs:{\"height\":64,\"gradientStart\":\"#ffffff\",\"gradientStop\":\"#ffffff\"}})],1):_c('router-view',{staticClass:\"relative w-full\"})],1)],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ServerInfo.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./ServerInfo.vue?vue&type=script&lang=js&\"","\n\n\n","import { render, staticRenderFns } from \"./ServerInfo.vue?vue&type=template&id=c335af6a&\"\nimport script from \"./ServerInfo.vue?vue&type=script&lang=js&\"\nexport * from \"./ServerInfo.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"text-right fixed top-0 right-0 mt-3 mr-3\",on:{\"mouseenter\":function($event){_vm.show = true},\"mouseleave\":function($event){_vm.show = false}}},[_c('button',{staticClass:\"text-white transform hover:scale-110 focus:scale-110\",attrs:{\"title\":_vm.$t('regWizPopUp.serverInfoToggle'),\"type\":\"button\"},on:{\"click\":function($event){_vm.show = !_vm.show}}},[_c('UnraidSvgUtilInfo',{staticClass:\"fill-current w-4 h-4\"})],1),_c('transition',{attrs:{\"name\":\"fade\",\"mode\":\"out-in\"}},[_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.show),expression:\"show\"}],staticClass:\"text-white text-left p-2 bg-black dark:text-black dark:bg-white rounded shadow-lg\"},[_c('div',{staticClass:\"text-sm flex flex-row\"},[_c('div',{staticClass:\"font-semibold text-right mr-2 pr-2 border-r-2 border-orange-dark\"},[_c('h4',[_vm._v(_vm._s(_vm.$t('regWizPopUp.serverInfo.name')))]),(_vm.serverdesc)?_c('h4',[_vm._v(_vm._s('Description'))]):_vm._e(),_c('h4',[_vm._v(_vm._s(_vm.$t('regWizPopUp.serverInfo.ip')))]),(_vm.flashvendor)?_c('h4',[_vm._v(_vm._s(_vm.$t('regWizPopUp.serverInfo.flash')))]):_vm._e(),(_vm.flashproduct)?_c('h4',[_vm._v(_vm._s(_vm.$t('regWizPopUp.serverInfo.product')))]):_vm._e(),(_vm.showRegGuid)?_c('h4',{class:{\n 'text-red': _vm.isRegGuidBlacklisted,\n },attrs:{\"title\":_vm.isRegGuidBlacklisted ? 'GUID Blacklisted' : ''}},[_vm._v(_vm._s(_vm.isRegGuidBlacklisted ? 'Registered GUID Blacklisted' : 'Registered GUID'))]):_vm._e(),(_vm.guid)?_c('h4',{class:{\n 'text-red': _vm.isGuidBlacklisted,\n },attrs:{\"title\":_vm.isGuidBlacklisted ? 'GUID Blacklisted' : ''}},[_vm._v(_vm._s(_vm.isGuidBlacklisted ? 'Blacklisted GUID' : _vm.$t('regWizPopUp.serverInfo.GUID')))]):_vm._e()]),_c('div',{staticClass:\"text-left\"},[_c('p',{staticClass:\"select-all\"},[_vm._v(_vm._s(_vm.servername))]),(_vm.serverdesc)?_c('p',{staticClass:\"select-all\"},[_vm._v(_vm._s(_vm.serverdesc))]):_vm._e(),_c('p',{staticClass:\"select-all\"},[_vm._v(_vm._s(_vm.internalip))]),(_vm.flashvendor)?_c('p',{staticClass:\"select-all\"},[_vm._v(_vm._s(_vm.flashvendor))]):_vm._e(),(_vm.flashproduct)?_c('p',{staticClass:\"select-all\"},[_vm._v(_vm._s(_vm.flashproduct))]):_vm._e(),(_vm.showRegGuid)?_c('p',{staticClass:\"select-all\",class:{\n 'text-red': _vm.isRegGuidBlacklisted,\n },attrs:{\"title\":_vm.isRegGuidBlacklisted ? 'GUID Blacklisted' : ''}},[_vm._v(_vm._s(_vm.regGuid))]):_vm._e(),(_vm.guid)?_c('p',{staticClass:\"select-all\",class:{\n 'text-red': _vm.isGuidBlacklisted,\n },attrs:{\"title\":_vm.isGuidBlacklisted ? 'GUID Blacklisted' : ''}},[_vm._v(_vm._s(_vm.guid))]):_vm._e()])]),(_vm.NODE_ENV === 'development')?_c('div',{staticClass:\"flex flex-col\"},[_c('hr',{staticClass:\"w-full h-2px my-2 bg-gradient-to-r from-red to-orange shadow-none border-none rounded-none\"}),_c('h4',{staticClass:\"text-sm uppercase italic\"},[_vm._v(\"Dev Helpers ⚙️\")]),_c('router-link',{staticClass:\"text-sm underline\",attrs:{\"to\":{ name: 'Troubleshoot' }}},[_vm._v(_vm._s(_vm.$t('regWizPopUp.routes.troubleshoot.heading.default')))])],1):_vm._e()])])],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import Vue from 'vue';\nimport VueRouter from 'vue-router';\nimport Meta from 'vue-meta';\n\nVue.use(VueRouter);\nVue.use(Meta);\n\nconst routes = [\n {\n path: '/extend-trial',\n name: 'ExtendTrial',\n component: () => import(/* webpackChunkName: \"ExtendTrial\" */'./views/Registration/ExtendTrial.vue'),\n },\n {\n path: '/success',\n name: 'Success',\n component: () => import(/* webpackChunkName: \"Success\" */'./views/Registration/Success.vue'),\n },\n {\n path: '/troubleshoot',\n name: 'Troubleshoot',\n component: () => import(/* webpackChunkName: \"Troubleshoot\" */'./views/Registration/Troubleshoot.vue'),\n },\n {\n path: '/500',\n name: 'NotAllowed',\n component: () => import(/* webpackChunkName: \"NotAllowed\" */'./views/NotAllowed.vue'),\n },\n {\n path: '/*',\n name: 'Deprecated',\n component: () => import(/* webpackChunkName: \"Deprecated\" */'./views/Deprecated.vue'),\n },\n];\n\n/**\n * @note Enabling `history` mode works locally. But doesn't work on Amplify environments.\n * Even with the redirect setup per the router docs. So don't use `mode: 'history',`\n * unless you have some time to fuck around with getting it working on Ampilfy. In the end\n * it doesn't really matter b/c the URLs are all autogenerated and directed to via the app in\n * the popup window. Which can't modify the URL manually.\n */\nconst router = new VueRouter({\n // mode: 'abstract',\n routes,\n});\n\nexport default router;\n","import {\n PURCHASE_URL, TRIAL_URL, ACCOUNT_URL,\n} from '../env';\n\nconst USER_AGENT = navigator?.userAgent?.toLowerCase() ?? 'NO_USER_AGENT';\n\nconst ACCOUNT_PAYLOAD = {\n url: ACCOUNT_URL,\n name: 'UnraidAccount',\n width: 1200,\n height: 850,\n};\n// eslint-disable-next-line import/prefer-default-export\nexport const state = {\n // global app\n errorMessage: '',\n errorMessageSubtext: '',\n loading: true,\n submissionFrom: null,\n darkMode: (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches),\n darkTheme: {\n alpha: '#1c1b1b',\n beta: '#f2f2f2',\n gamma: '#999999',\n },\n lightTheme: {\n alpha: '#f2f2f2',\n beta: '#1c1b1b',\n gamma: '#999999',\n },\n csrf: null,\n postMessageError: null,\n // launchpad related\n isLaunchpadOpen: false,\n isPromoOpen: false,\n // upc trigger\n triggerUPC: false,\n /**\n * Server State\n * Set via 3 different actions\n * @LAUNCHPAD - query string params via `initLaunchpad()`\n * @REGWIZ - DynamoDB.get via `initRegWiz()`\n * @USERPROFILE - via web component props\n */\n ts: null,\n tsHumanReadable: null,\n deviceCount: 0,\n flashproduct: null,\n flashvendor: null,\n guid: '',\n regGuid: '',\n keyfile: null,\n servername: null,\n serverdesc: null,\n wanip: sessionStorage.getItem('upc_wanip') || null,\n site: null,\n wanFQDN: null,\n state: '',\n reggen: 0,\n registered: null,\n internalip: null,\n internalport: null,\n protocol: null,\n license: '',\n expiretime: null,\n regWizTime: null, // if this is set we know the user has registered the server at some point. So we make the UPC show Sign In\n rawServerState: null,\n /**\n * @NOTE: do not set default string value b/c this path needs to be two different default values for older versions.\n * this allows the legacy path to be overwritten. In more recent versions the paths to statephp & myservers.cfg file\n * was moved, hence this being mutated then used in a getter.\n * @see ./getters.js.\n */\n plgPath: null,\n // mutated based on data above\n guidRegistered: false,\n guidValid: null,\n guidValidationRunning: false,\n replaceable: null,\n guidForValidation: null,\n guidBlacklisted: null,\n // DynamoDB\n id: null,\n // Pop-up related\n isPopUpOpen: false,\n regAtOpen: null,\n /**\n * IPS Auth Related\n * @TODO - we can save these and send to Key Server to return user info for auto SignIn/signup\n * then setup RouterGuard for routes that require user auth\n */\n forumaccount: null,\n userEmail: '',\n username: '',\n avatar: '',\n userPassword: '',\n apikey: '',\n ipsValidated: false,\n accountAction: null,\n keyServerAction: '',\n licenseAction: null,\n receivedSuccessNewServerState: null, // feed this Date.now()\n /**\n * payloads\n */\n purchaseWindow: { // and upgrade\n url: new URL(PURCHASE_URL),\n name: 'UnraidPurchaseLicense',\n width: 1198, // if you change these width/height values please update in in Craft's preflight.js\n height: 900,\n sendSessionToPopUp: true,\n },\n redeemWindow: {\n url: new URL(`${PURCHASE_URL}?r=1`),\n name: 'UnraidPurchaseLicense',\n width: 1198, // if you change these width/height values please update in in Craft's preflight.js\n height: 900,\n sendSessionToPopUp: true,\n },\n trialWindow: {\n url: new URL(TRIAL_URL),\n name: 'UnraidStartTrial',\n width: 400,\n height: 400,\n sendSessionToPopUp: true,\n },\n\n accountPayload: {\n ...ACCOUNT_PAYLOAD,\n },\n accountServerPayload: {\n ...ACCOUNT_PAYLOAD,\n url: `${ACCOUNT_URL}/server`,\n },\n accountRegisterPayload: {\n ...ACCOUNT_PAYLOAD,\n url: `${ACCOUNT_URL}/server/register`,\n },\n accountUnregisterPayload: {\n ...ACCOUNT_PAYLOAD,\n url: `${ACCOUNT_URL}/server/unregister`,\n },\n accountKeyRecoverPayload: {\n ...ACCOUNT_PAYLOAD,\n url: `${ACCOUNT_URL}/server/key-recover`,\n },\n accountKeyReplacePayload: {\n ...ACCOUNT_PAYLOAD,\n url: `${ACCOUNT_URL}/server/key-replace`,\n },\n accountTrialExtendPayload: {\n ...ACCOUNT_PAYLOAD,\n url: `${ACCOUNT_URL}/server/extend-trial`,\n },\n accountTroubleshootPayload: {\n ...ACCOUNT_PAYLOAD,\n url: `${ACCOUNT_URL}/troubleshoot`,\n },\n\n /** locale */\n locale: 'en_US',\n messages: null,\n /** graphql unraid api */\n graphOnline: false,\n graphReconnected: false,\n myServers: [],\n myServersLoading: false,\n myServersError: null,\n myServersErrorShowSupportBtn: false,\n myServersEnv: null,\n apiVersion: '0.0.0', // absolute fallback\n cloud: null,\n /** for support of 6.10 webgui without plugin included */\n hideMyServers: false,\n osVersion: null,\n plgVersion: null,\n plgInstalled: null,\n hasRemoteApikey: null, // Boolean. set via setStateFromWebComponentProp. used to detect if we need to have the user re-sign in to generate an apikeay for mothership\n config: null, // expect { valid: Boolean, error: String } // enum string expected 'UNKNOWN_ERROR', 'INVALID', 'NO_KEY_SERVER', 'WITHDRAWN', 'UNKNOWN_ERROR'. Only using 'INVALID' right now for errorTooManyDisks\n hasUnraidNetSSL: false, // combined with plgVersion we determine if we present user an error message about sign in required for Unraid Let's Encrypt cert\n flashBackupActivated: false, // if enabled this will be 'true'\n extraOrigins: [],\n myServersOutOfDate: { // use the getter for dynamic configuration not this state value\n enabled: true,\n error: false,\n heading: 'Connect Update Available',\n message: 'Please update to the latest version of the Connect plugin',\n link: '/Plugins',\n linkSameTab: true,\n linkText: 'Learn More',\n },\n devEnv: false,\n signOutTriggered: false,\n apiReport: null,\n /**\n * If true it means the UPC has been loaded in Unraid OS GUI mode Firefox.\n * This will change postMessage targetOrigins to be '*' because of a bug.\n * @see https://app.asana.com/0/inbox/1159909068082281/1201979506171119/1201615796158176\n */\n osGui: USER_AGENT.includes('linux') && USER_AGENT.includes('firefox'),\n pirateKey: sessionStorage.getItem('upc_yargMatey') || false,\n /**\n * Deprecation warning for [hash].unraid.net SSL certs. Deprecation starts 2023-01-01\n */\n deprecatedUnraidSSL: window.location.hostname.includes('.unraid.net'),\n /**\n * Registration via account.unraid.net\n */\n processStarted: false,\n showPostMessageStatus: false,\n keyInstalling: false,\n keyInstallSuccess: false,\n keyInstallFail: false,\n registerSuccess: false,\n registerFail: false,\n unregisterSuccess: false,\n unregisterFail: false,\n accessToken: localStorage.getItem('upc_accessToken') || '', // these values need to be sent by server via state prop\n idToken: localStorage.getItem('upc_idToken') || '', // these values need to be sent by server via state prop\n refreshToken: localStorage.getItem('upc_refreshToken') || '', // these values need to be sent by server via state prop\n iframeUrl: window !== window.parent ? window.location.href : null,\n};\n","import satisfies from 'semver/functions/satisfies';\n/**\n * @name validateUnraidVersion\n * @description Determine if provided Unraid OS Version satifies minimum and recommended OS versions\n * @param {string} unraidVersion\n * @param {string} minVersion\n * @param {string} recommendedVersion\n * @return {boolean}\n */\nconst validateUnraidVersion = (unraidVersion, minVersion, recommendedVersion) => {\n const greaterThanMinLessThanRecommended = satisfies(\n unraidVersion,\n `>=${minVersion} <${recommendedVersion}`,\n {\n includePrerelease: false,\n },\n );\n\n if (greaterThanMinLessThanRecommended) {\n return true;\n }\n\n const greaterThanOrEqualToRecommended = satisfies(\n unraidVersion,\n `>=${recommendedVersion}`,\n {\n includePrerelease: true,\n },\n );\n\n if (greaterThanOrEqualToRecommended) {\n return true;\n }\n\n return false;\n};\n\nexport default validateUnraidVersion;\n","import semverLt from 'semver/functions/lt';\nimport parse from 'semver/functions/parse';\n\nimport {\n CAN_POST_MESSAGE, GUID_NOT_RECEIVED, ALLOWED_ORIGINS,\n} from '../consts';\nimport {\n MIN_API_VER, REC_API_VER, MIN_OS_VER, REC_OS_VER, UPC_VER,\n} from '../env';\nimport i18n from '../i18n';\n\nimport validateUnraidVersion from '../helpers/validateUnraidVersion';\n\n/**\n * @property actions: {Array} - ['extend', 'purchase', 'recover', 'replace', 'upgrade']\n * @property humanReadable {String}\n * @property heading {String}\n * @property message {String}\n * @property error {Boolean|Object} // see `ENOFLASH` below for error object example\n * @property error.heading {String}\n * @property error.message {String}\n * @property error.signInToFix {Boolean}\n */\nconst stateDataDefault = {\n actions: [],\n humanReadable: '',\n heading: '',\n message: '',\n messageCenter: false,\n error: false,\n withKey: false,\n};\n\nconst ENOFLASH = {\n ...stateDataDefault,\n humanReadable: i18n.tc('stateData.ENOFLASH.humanReadable'),\n error: {\n heading: i18n.tc('stateData.ENOFLASH.error.heading'),\n message: i18n.tc('stateData.ENOFLASH.error.message'),\n signInToFix: false,\n },\n};\n\nlet EGUID_MSG = '';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const getters = {\n statePhpPath: state => `/plugins/${state.plgPath || 'dynamix.unraid.net'}/include/state.php`,\n myServersCfgPath: state => `${state.plgPath || 'Unraid.net'}/myservers.cfg`,\n requireGuidValidation: (state) => {\n if (CAN_POST_MESSAGE) return state.guidRegistered;\n return true; // this means we're in the UPC and can pass guid validation\n },\n validApiKeyLength: state => state.apikey.length === 64,\n validApiKeyForUpc: state => (state.apikey ? state.apikey.startsWith('unupc_') : false),\n hasRemoteApikey: state => (state.hasRemoteApikey === true || !!(state.validApiKeyLength && state.validApiKeyForUpc)),\n showExpiretime: state => (state.state === 'TRIAL' || state.state === 'EEXPIRED') && state.expiretime > 0,\n trialExtensionEligible: state => (!!(!state.reggen || state.reggen < 2)), // used below to allow button actions\n signedOutWithKey: (state, self) => (!!(self.stateData.withKey && !state.registered)), // watched in Launchpad & UPC\n stateData: (state, self) => {\n switch (state.state) {\n case 'ENOKEYFILE': return {\n ...stateDataDefault,\n actions: [\n state.registered ? 'signOut' : 'register',\n 'startTrial',\n 'purchase',\n 'redeem',\n ],\n humanReadable: i18n.tc('stateData.ENOKEYFILE.humanReadable'),\n heading: i18n.tc('stateData.ENOKEYFILE.heading'),\n message: i18n.tc('stateData.ENOKEYFILE.message'),\n };\n case 'TRIAL': return {\n ...stateDataDefault,\n actions: [\n 'purchase',\n state.registered ? 'signOut' : 'register',\n state.registered ? 'continueTrial' : null,\n ],\n humanReadable: i18n.tc('stateData.TRIAL.humanReadable'),\n heading: i18n.tc('stateData.TRIAL.heading'),\n message: i18n.tc('stateData.TRIAL.message'),\n withKey: true,\n };\n case 'EEXPIRED': return {\n ...stateDataDefault,\n actions: [\n state.registered ? 'signOut' : 'register',\n // both below used to use `&& state.guidRegistered`\n self.trialExtensionEligible ? 'extend' : null,\n 'purchase',\n ],\n humanReadable: i18n.tc('stateData.EEXPIRED.humanReadable'),\n error: {\n heading: i18n.tc('stateData.EEXPIRED.heading'),\n message: self.trialExtensionEligible\n ? i18n.tc('stateData.EEXPIRED.message.extensionEligible')\n : i18n.tc('stateData.EEXPIRED.message.extensionNotEligible'),\n },\n withKey: true,\n };\n case 'BASIC': return {\n ...stateDataDefault,\n actions: [\n state.registered ? 'signOut' : 'register',\n 'upgrade',\n ],\n humanReadable: i18n.tc('stateData.BASIC.humanReadable'),\n heading: i18n.tc('basicPlusPro.heading'),\n // eslint-disable-next-line no-nested-ternary\n message: !state.registered\n ? i18n.tc('basicPlusPro.message.registered')\n : (state.guidRegistered)\n ? i18n.tc('basicPlusPro.message.upgradeEligible')\n : '',\n messageCenter: !state.registered,\n withKey: true,\n };\n case 'PLUS': return {\n ...stateDataDefault,\n actions: [\n state.registered ? 'signOut' : 'register',\n 'upgrade',\n ],\n humanReadable: i18n.tc('stateData.PLUS.humanReadable'),\n heading: i18n.tc('basicPlusPro.heading'),\n // eslint-disable-next-line no-nested-ternary\n message: !state.registered\n ? i18n.tc('basicPlusPro.message.registered')\n : (state.guidRegistered)\n ? i18n.tc('basicPlusPro.message.upgradeEligible')\n : '',\n messageCenter: !state.registered,\n withKey: true,\n };\n case 'PRO': return {\n ...stateDataDefault,\n actions: [\n state.registered ? 'signOut' : 'register',\n state.registered ? 'close' : null,\n ],\n humanReadable: i18n.tc('stateData.PRO.humanReadable'),\n heading: i18n.tc('basicPlusPro.heading'),\n message: !state.registered\n ? i18n.tc('basicPlusPro.message.registered')\n : '',\n messageCenter: !state.registered,\n withKey: true,\n };\n case 'EGUID':\n if (state.replaceable) EGUID_MSG = i18n.tc('stateData.EGUID.error.message.replacementEligible');\n else if (state.replaceable === false && state.guidBlacklisted) EGUID_MSG = `${i18n.tc('stateData.EGUID.error.message.default')}
${i18n.tc('stateData.EGUID.error.message.blacklisted')}`;\n else if (state.replaceable === false && !state.guidBlacklisted) EGUID_MSG = `${i18n.tc('stateData.EGUID.error.message.default')}
${i18n.tc('stateData.EGUID.error.message.replacementIneligible')}`;\n else EGUID_MSG = i18n.tc('stateData.EGUID.error.message.replacementEligible'); // basically state.replaceable === null\n return {\n ...stateDataDefault,\n actions: [\n 'purchase',\n 'replace', // we always show replace key button until we rightfully know we shouldn't\n state.registered ? 'signOut' : 'register',\n ],\n humanReadable: i18n.tc('stateData.EGUID.humanReadable'),\n error: {\n heading: i18n.tc('stateData.EGUID.error.heading'),\n // eslint-disable-next-line no-nested-ternary\n message: EGUID_MSG,\n signInToFix: true,\n },\n };\n case 'EGUID1': return {\n ...stateDataDefault,\n actions: [\n 'purchase',\n state.registered ? 'signOut' : 'register',\n ],\n humanReadable: i18n.tc('stateData.EGUID1.humanReadable'),\n error: {\n heading: i18n.tc('stateData.EGUID1.error.heading'),\n message: i18n.tc('stateData.EGUID1.error.message'),\n signInToFix: true,\n },\n };\n case 'ENOKEYFILE2': return {\n ...stateDataDefault,\n actions: [\n 'purchase',\n state.registered ? 'signOut' : 'register',\n state.registered ? 'recover' : null, // recovery requires that there's an account associated with the guid\n ],\n humanReadable: i18n.tc('stateData.ENOKEYFILE2.humanReadable'),\n error: {\n heading: i18n.tc('stateData.ENOKEYFILE2.error.heading'),\n message: i18n.tc('stateData.ENOKEYFILE2.error.message'),\n signInToFix: true,\n },\n };\n case 'ETRIAL': return {\n ...stateDataDefault,\n actions: [\n state.registered ? 'signOut' : 'register',\n 'purchase',\n ],\n humanReadable: i18n.tc('stateData.ETRIAL.humanReadable'),\n error: {\n heading: i18n.tc('stateData.ETRIAL.error.heading'),\n message: i18n.tc('stateData.ETRIAL.error.message'),\n signInToFix: true,\n },\n };\n /**\n * Begin states without sign in / key actions\n */\n case 'ENOKEYFILE1': return {\n ...stateDataDefault,\n humanReadable: i18n.tc('stateData.ENOKEYFILE1.humanReadable'),\n error: {\n heading: i18n.tc('stateData.ENOKEYFILE1.error.heading'),\n message: i18n.tc('stateData.ENOKEYFILE1.error.message'),\n signInToFix: false,\n },\n };\n case 'ENOFLASH': return ENOFLASH;\n case 'ENOFLASH1': return ENOFLASH;\n case 'ENOFLASH2': return ENOFLASH;\n case 'ENOFLASH3': return ENOFLASH;\n case 'ENOFLASH4': return ENOFLASH;\n case 'ENOFLASH5': return ENOFLASH;\n case 'ENOFLASH6': return ENOFLASH;\n case 'ENOFLASH7': return ENOFLASH;\n case 'EBLACKLISTED': return {\n ...stateDataDefault,\n humanReadable: i18n.tc('stateData.EBLACKLISTED.humanReadable'),\n error: {\n heading: i18n.tc('stateData.EBLACKLISTED.error.heading'),\n message: i18n.tc('stateData.EBLACKLISTED.error.message'),\n signInToFix: false,\n },\n };\n case 'EBLACKLISTED1': return {\n ...stateDataDefault,\n humanReadable: i18n.tc('stateData.EBLACKLISTED1.humanReadable'),\n error: {\n heading: i18n.tc('stateData.EBLACKLISTED1.error.heading'),\n message: i18n.tc('stateData.EBLACKLISTED1.error.message'),\n signInToFix: false,\n },\n };\n case 'EBLACKLISTED2': return {\n ...stateDataDefault,\n humanReadable: i18n.tc('stateData.EBLACKLISTED2.humanReadable'),\n error: {\n heading: i18n.tc('stateData.EBLACKLISTED2.error.heading'),\n message: i18n.tc('stateData.EBLACKLISTED2.error.message'),\n signInToFix: false,\n },\n };\n case 'ENOCONN': return {\n ...stateDataDefault,\n humanReadable: i18n.tc('stateData.ENOCONN.humanReadable'),\n error: {\n heading: i18n.tc('stateData.ENOCONN.error.heading'),\n message: i18n.tc('stateData.ENOCONN.error.message'),\n signInToFix: false,\n },\n };\n case 'STALE': return {\n ...stateDataDefault,\n humanReadable: i18n.tc('stateData.STALE.humanReadable'),\n error: {\n heading: i18n.tc('stateData.STALE.error.heading'),\n message: i18n.tc('stateData.STALE.error.message'),\n signInToFix: false,\n },\n };\n default: return { ...stateDataDefault };\n }\n },\n stateDataKeyActions: (_state, self) => !!(self.stateData.actions.includes('purchase')\n || self.stateData.actions.includes('upgrade')\n || self.stateData.actions.includes('recover')\n || self.stateData.actions.includes('replace')\n || self.stateData.actions.includes('extend')),\n keyTypeForPurchase: (state) => { /** @NOTE - DO NOT TRANSLATE THESE !!! These string values are used in the Craft checkout flow */\n switch (state.state) {\n case 'BASIC': return 'Basic';\n case 'PLUS': return 'Plus';\n case 'PRO': return 'Pro';\n default: return 'Trial';\n }\n },\n /**\n * Use NGINX_WANFQDN as a separate variable to help keep track between plg versions\n * if not present no remote access OR its the old version of PLG\n * if old version of PLG look for www..unraid.net,\n * */\n isRemoteAccess: state => state.wanFQDN || (state.site && state.site.includes('www.') && state.site.includes('unraid.net')),\n noRemoteApikeyRegisteredWithPlg: state => !!(state.registered && !state.hideMyServers && !!(state.validApiKeyLength && state.validApiKeyForUpc)),\n errorTooManyDisks: state => !!((state.config && !state.config.valid) && state.config.error === 'INVALID'), // if config.valid=false. then check for enum value of 'INVALID'\n allowedOrigins: state => [\n ...ALLOWED_ORIGINS,\n ...(state.extraOrigins),\n ],\n myServersNotMinApiVer: state => !state.apiVersion || (state.apiVersion && semverLt(state.apiVersion, MIN_API_VER)), // if we don't have apiVersion set to true as it's a very old version of the api\n myServersNotRecApiVer: state => !state.apiVersion || (state.apiVersion && semverLt(state.apiVersion, REC_API_VER)),\n osPrerelease: (state) => {\n if (state.osVersion) {\n const parsed = parse(state.osVersion);\n return parsed.prerelease.length;\n }\n return false;\n },\n osVersionValid: state => state.osVersion && validateUnraidVersion(state.osVersion, MIN_OS_VER, REC_OS_VER),\n // must be a successful plg install to show API / PLG message\n allowApiOutOfDate: (state, self) => !self.plgInstallFailed && state.apiVersion && (self.myServersNotMinApiVer || self.myServersNotRecApiVer) && !state.devMode && !state.hideMyServers,\n /**\n * priority if there are multiple errors/warnings:\n * error about api/plugin\n * error about OS\n * warning about api/plugin\n * warning about OS\n */\n myServersOutOfDate: (state, self) => {\n // show as error since minimum api version is not met\n if (self.allowApiOutOfDate && self.myServersNotMinApiVer) {\n return {\n ...state.myServersOutOfDate,\n error: true,\n message: 'The Connect plugin (formly known as My Servers) is out-of-date and will not connect to Unraid\\'s cloud services. Please update the plugin.',\n linkText: 'Update now',\n };\n }\n // show OS version error\n if (!self.osVersionValid && !self.osPrerelease) {\n return {\n enabled: true,\n error: true,\n heading: 'Unraid OS Out-of-date',\n message: `You are running an unsupported release of Unraid, please upgrade to the current version.${state.plgInstalled && !self.plgInstallFailed ? ' This version of Unraid will be blocked from Connect (formly known as My Servers) in the future.' : ''}`,\n link: ' https://forums.unraid.net/topic/128328-my-servers-dropping-support-for-older-versions-of-unraid/',\n linkSameTab: false,\n linkText: i18n.tc('learnMore'),\n };\n }\n // show as warning since recomended api version is not met\n if (self.allowApiOutOfDate && !self.myServersNotMinApiVer && self.myServersNotRecApiVer) return state.myServersOutOfDate;\n // show OS version warning for non-stable\n if (!self.osVersionValid && self.osPrerelease) {\n return {\n enabled: true,\n error: false,\n heading: 'Unraid OS Out-of-date',\n message: `RC releases are not meant to used long term, please update to a stable release of Unraid.${state.plgInstalled && !self.plgInstallFailed ? ' This version of Unraid will be blocked from Connect (formly known as My Servers) in the future.' : ''}`,\n link: ' https://forums.unraid.net/topic/128328-my-servers-dropping-support-for-older-versions-of-unraid/',\n linkSameTab: false,\n linkText: i18n.tc('learnMore'),\n };\n }\n return { enabled: false, error: false };\n },\n /**\n * If we show the button we want to pass the error to the pop-up to use in the troubleshooting form\n * exception: let's hide the \"owner\" reponse error message in the pop-up on the success page\n */\n errorMessage: (state, self) => {\n if (!self.stateData.error && state.myServersError && state.myServersErrorShowSupportBtn) return state.myServersError;\n if (!self.stateData.error && state.cloud && state.cloud.error && state.myServersErrorShowSupportBtn) return state.cloud.error;\n return null;\n },\n tsHumanReadable: (state) => {\n if (!state.ts) return null;\n const tsMilliseconds = state.ts * 1000;\n const dateObject = new Date(tsMilliseconds);\n return dateObject.toString();\n },\n server: (state, self) => ({\n guid: state.guid || GUID_NOT_RECEIVED,\n regGuid: state.regGuid,\n guidRegistered: state.guidRegistered || state.regWizTime,\n guidValid: state.guidValid,\n hasRemoteApikey: self.hasRemoteApikey,\n regWizTime: state.regWizTime,\n keyfile: state.keyfile,\n keyTypeForPurchase: self.keyTypeForPurchase,\n flashproduct: state.flashproduct,\n flashvendor: state.flashvendor,\n servername: state.servername,\n serverdesc: state.serverdesc,\n internalip: state.internalip,\n site: state.site,\n wanFQDN: state.wanFQDN,\n state: state.state,\n internalport: state.internalport,\n protocol: state.protocol,\n registered: state.registered,\n reggen: state.reggen,\n userEmail: state.userEmail,\n expiretime: state.expiretime,\n ts: state.ts,\n tsHumanReadable: self.tsHumanReadable,\n locale: state.locale,\n deviceCount: state.deviceCount,\n plgPath: state.plgPath,\n plgVersion: state.plgVersion,\n osVersion: state.osVersion,\n apiVersion: state.apiVersion,\n upcVersion: UPC_VER,\n extraOrigins: state.extraOrigins,\n errorMessage: self.errorMessage,\n apiReport: state.apiReport,\n osGui: state.osGui,\n username: state.username,\n avatar: state.avatar,\n hideMyServers: state.hideMyServers,\n flashBackupActivated: state.flashBackupActivated,\n accessToken: state.accessToken,\n idToken: state.idToken,\n refreshToken: state.refreshToken,\n }),\n // eslint-disable-next-line no-unused-vars\n features: state => [\n {\n // title: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.dynamicRemoteAccess.heading'),\n // copy: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.dynamicRemoteAccess.copy'),\n title: 'Dynamic Remote Access',\n copy: 'Toggle on/off server accessibility with dynamic remote access. Automatically turn on UPnP and open a random WAN port on your router at the click of a button and close off access in seconds.',\n },\n {\n // title: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.manageWithinConnect.heading'),\n // copy: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.manageWithinConnect.copy'),\n title: 'Manage Your Server Within Connect',\n copy: 'Servers equipped with a myunraid.net certificate can be managed directly from within the Connect web UI. Manage multiple servers from your phone, tablet, laptop, or PC in the same browser window.',\n },\n {\n // title: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.deepLinking.heading'),\n // copy: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.deepLinking.copy'),\n title: 'Deep Linking',\n copy: 'The Connect dashboard links to relevant sections of the webgui, allowing quick access to those settings and server sections.',\n },\n {\n // title: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.onlineFlashBackup.heading'),\n // copy: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.onlineFlashBackup.copy'),\n title: 'Online Flash Backup',\n copy: 'Never ever be left without a backup of your config. If you need to change flash drives, generate a backup from Connect and be up and running in minutes.',\n },\n {\n // title: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.realTimeMonitoring.heading'),\n // copy: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.realTimeMonitoring.copy'),\n title: 'Real-time Monitoring',\n copy: 'Get an overview of your server\\'s state, storage space, apps and VMs status, and more.',\n },\n {\n // title: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.customizableDashboardTitles.heading'),\n // copy: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.customizableDashboardTitles.copy'),\n title: 'Customizable Dashboard Tiles',\n copy: 'Set custom server tiles how you like and automatically display your server\\'s banner image on your Connect Dashboard.',\n },\n {\n // title: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.licenseManagement.heading'),\n // copy: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.licenseManagement.copy'),\n title: 'License Management',\n copy: 'Manage your license keys at any time via the My Keys section.',\n },\n {\n // title: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.plusMore.heading'),\n // copy: i18n.tc('regWizPopUp.routes.whatIsMyServers.features.plusMore.copy'),\n title: 'Plus more on the way',\n copy: 'All you need is an active internet connection, an Unraid.net account, and the Connect plugin. Get started by installing the plugin.',\n },\n ],\n plgInstallFailed: state => state.plgInstalled && state.plgInstalled.includes('_installFailed'),\n};\n","import { SAFE_JSON_PARSE, CAN_POST_MESSAGE } from '../consts';\nimport { log } from '../log';\n\n// eslint-disable-next-line import/prefer-default-export\nexport const mutations = {\n SET_APP_ERROR_MESSAGE(state, data) {\n log.debug('[SET_APP_ERROR_MESSAGE]: initial %o', data);\n const [err, parsedData] = SAFE_JSON_PARSE(data); // see if we need to parse the string for json\n if ((!parsedData || err) && data) {\n log.debug('[SET_APP_ERROR_MESSAGE]: no json use original string %o', data);\n state.errorMessage = data;\n }\n if (!parsedData && (data === false || data === '')) {\n log.debug('[SET_APP_ERROR_MESSAGE]: allow falsely values to reset the field %o', data);\n state.errorMessage = '';\n }\n if (parsedData && parsedData.error) {\n log.debug('[SET_APP_ERROR_MESSAGE]: we got json %o', data);\n state.errorMessage = parsedData.error;\n }\n if (state.errorMessage) log.error('[SET_APP_ERROR_MESSAGE]: %s', state.errorMessage); // only show when setting an error not removing\n },\n SET_APP_ERROR_MESSAGE_SUBTEXT(state, data) {\n log.debug('[SET_APP_ERROR_MESSAGE_SUBTEXT]: %o', data);\n state.errorMessageSubtext = data;\n if (state.errorMessageSubtext) log.error('[SET_APP_ERROR_MESSAGE_SUBTEXT]: %s', state.errorMessageSubtext);\n },\n SET_LOADING_STATE(state, data) {\n log.debug('[SET_LOADING_STATE]: %o', data);\n state.loading = data;\n },\n SET_IS_LAUNCHPAD_OPEN(state, data) {\n log.debug('[SET_IS_LAUNCHPAD_OPEN]: %o', data);\n // we'll keep opening until it's closed once\n if (!data) sessionStorage.removeItem('clickedInstallMyServers');\n state.isLaunchpadOpen = data;\n },\n SET_IS_PROMO_OPEN(state, data) {\n log.debug('[SET_IS_PROMO_OPEN]: %o', data);\n state.isPromoOpen = data;\n },\n // server\n SET_STATE(state, data) {\n log.debug('[SET_STATE]: %o', data);\n state.state = data;\n },\n SET_CONFIG(state, data) {\n log.debug('[SET_CONFIG]: %o', data);\n state.config = data;\n },\n /**\n * @note follow specific order when committing mutations for\n * - `CHANGE_GUID_REGISTERED`\n * - `CHANGE_GUID_VALID` is watched in Index.vue to see if we should redirect\n * the user to Sign In or Up after validating their GUID in the pop-up. And this\n * conditional relies on the value set by `CHANGE_GUID_REGISTERED` aka `state.guidRegistered`\n */\n CHANGE_GUID_REGISTERED(state, data) { // put before CHANGE_GUID_REGISTERED when committing\n log.debug('[CHANGE_GUID_REGISTERED]: %o', data);\n state.guidRegistered = data;\n },\n CHANGE_GUID_VALID(state, data) { // put after CHANGE_GUID_REGISTERED when committing\n log.debug('[CHANGE_GUID_VALID]: %o', data);\n state.guidValid = data;\n },\n CHANGE_GUID_VALIDATION_RUNNING(state, data) {\n log.debug('[CHANGE_GUID_VALIDATION_RUNNING]: %o', data);\n state.guidValidationRunning = data;\n },\n CHANGE_GUID_FOR_VALIDATION(state, data) {\n log.debug('[CHANGE_GUID_FOR_VALIDATION]: %o', data);\n state.guidForValidation = data;\n },\n CHANGE_GUID_BLACKLISTED(state, data) {\n log.debug('[CHANGE_GUID_BLACKLISTED]: %o', data);\n state.guidBlacklisted = data;\n },\n CHANGE_REPLACEABLE(state, data) {\n log.debug('[CHANGE_REPLACEABLE]: %o', data);\n state.replaceable = data;\n },\n // Universal Pop-up Window\n CHANGE_POP_UP_WINDOW(state, data) {\n log.debug('[CHANGE_POP_UP_WINDOW]: %o', data);\n state.isPopUpOpen = !!data;\n state.regAtOpen = null; // always reset as `STATE_AT_OPEN` is used after we reset\n },\n STATE_AT_OPEN(state, data) {\n state.regAtOpen = data;\n },\n /**\n * @name MUTATE_KEYSERVER_RESPONSE\n * @description stores response data from key server submissions\n * @param {Object} state - Vuex state\n * @param {Object} res - response from Key Server\n * @param {string} res.apikey - 64 random chars\n * @param {boolean} res.validated\n * @param {string} res.license - url to license file\n * @param {string} res.email\n * @param {string} res.action - \"recovery|new\"\n */\n MUTATE_KEYSERVER_RESPONSE(state, res) {\n log.debug('[MUTATE_KEYSERVER_RESPONSE]: %o', res);\n if (res.license) state.license = res.license;\n if (res.newKey) state.keyfile = res.newKey;\n if (res.trial) state.keyfile = res.trial;\n if (res.apikey) state.apikey = res.apikey;\n if (res.validated) state.ipsValidated = res.validated;\n if (res.email) state.userEmail = res.email;\n if (res.password) state.userPassword = res.password;\n if (res.action || res.keyServerAction) state.keyServerAction = res.action || res.keyServerAction;\n if (res.username) state.username = res.username;\n if (res.avatar) state.avatar = res.avatar;\n },\n /**\n * @name SET_TRIAL\n * @description\n * @param {object} state - vuex state https://vuex.vuejs.org/guide/state.html\n * @param {string} trial\n */\n SET_TRIAL(state, res) {\n log.debug('[SET_TRIAL]: %o', res);\n state.license = res.license;\n state.keyfile = res.trial;\n state.keyServerAction = 'extendTrial';\n },\n /**\n * @name SET_USER_EMAIL\n * @description\n * @param {object} state - vuex state https://vuex.vuejs.org/guide/state.html\n * @param {string} email\n */\n SET_USER_EMAIL(state, email) {\n log.debug('[SET_USER_EMAIL]: %s', email);\n state.userEmail = email;\n },\n\n SET_FULL_SERVER_STATE(state, data) {\n log.debug('[SET_FULL_SERVER_STATE] start %o', data);\n // @TODO - UPC error state b/c we can't set state……?\n if (!data) return log.error('[SET_FULL_SERVER_STATE] No state data…🤬');\n let mutateData = data;\n if (mutateData.registered || mutateData.registered === 0) mutateData.registered = Boolean(Number(mutateData.registered)); // convert potential strings to number then to boolean @see: https://stackoverflow.com/a/45175346/3215809\n if (mutateData.hasRemoteApikey || mutateData.hasRemoteApikey === 0) mutateData.hasRemoteApikey = Boolean(Number(mutateData.hasRemoteApikey));\n if (mutateData.email) { // vuex store expects userEmail\n mutateData = {\n ...mutateData,\n userEmail: mutateData.email,\n };\n delete mutateData.email;\n }\n log.debug('[SET_FULL_SERVER_STATE] ✨ mutateData ✨ %o', { state, mutateData });\n state = Object.assign(state, mutateData); // eslint-disable-line\n return true;\n },\n\n /**\n * When we're in the pop-up we want to save the raw server state received from the postMessage.\n * This way we can troubleshoot raw server state data without having to worry about overwritting it.\n *\n * This means we'll only use this mutation when setting server state in the pop-up. So it won't be used\n * every time SET_FULL_SERVER_STATE is used. Like when setting state in the UPC.\n *\n * Usage example: there's no GUID passed to the pop-up so when we validate the GUID we change to state = 'EBLACKLISTED1'.\n * But perhaps that's not the true 'regState' of the server. But we need to overwrite the server state in the\n * pop-up so that the user can't sign in. But we still want to know the original 'regState' of the server at pop-up open.\n */\n SET_RAW_SERVER_STATE(state, data) {\n if (!CAN_POST_MESSAGE) return log.debug('[SET_RAW_SERVER_STATE] ❌ skipped not needed in non-pop-up ❌ %o', { CAN_POST_MESSAGE });\n state.rawServerState = data;\n return log.debug('[SET_RAW_SERVER_STATE] %o', data);\n },\n\n SIGN_OUT(state) {\n log.debug('[SIGN_OUT]: %s', '✨');\n state.registered = false;\n state.license = '';\n state.keyfile = '';\n state.apikey = '';\n state.ipsValidated = false;\n state.userEmail = '';\n state.userPassword = '';\n state.username = '';\n state.avatar = '';\n },\n\n SUBMISSION_FROM(state, val) {\n log.debug('[SUBMISSION_FROM]: %s', val);\n state.submissionFrom = val;\n },\n\n SET_WANIP(state, val) {\n log.debug('[SET_WANIP]: %s', val);\n state.wanip = val;\n sessionStorage.setItem('upc_wanip', val);\n },\n\n SET_SERVERDESC(state, val) {\n log.debug('[SET_SERVERDESC]: %s', val);\n state.serverdesc = val;\n },\n\n SET_SITE(state, val) {\n log.debug('[SET_SITE]: %s', val);\n state.site = val;\n },\n\n SET_CSRF(state, val) {\n log.debug('[SET_CSRF]: %s', val);\n state.csrf = val;\n },\n\n LICENSE_PINGBACK(state, val) { // this is reset to null when first arriving on Success. So that we prime ourselves to receive values for `licenseAction`\n log.debug('[LICENSE_PINGBACK]: %o', val);\n state.licenseAction = val;\n },\n\n ACCOUNT_PINGBACK(state, val) { // this is reset to null when first arriving on Success. So that we prime ourselves to receive values for `accountAction`\n log.debug('[ACCOUNT_PINGBACK]: %o', val);\n state.accountAction = val;\n },\n /**\n * @param {DateTimeStamp} val – feed it `Date.now()` as this will trigger the watcher of `receivedSuccessNewServerState` in Success.vue to trigger `this.loading = false`\n */\n RECEIVED_SUCCESS_NEW_SERVERSTATE(state, val) {\n log.debug('[RECEIVED_SUCCESS_NEW_SERVERSTATE]: %o', val);\n state.receivedSuccessNewServerState = val;\n },\n\n SET_UPTIME(state, val) {\n log.debug('[SET_UPTIME]: %s', val);\n state.uptime = val;\n },\n\n SET_EXPIRE_TIME(state, val) {\n log.debug('[SET_EXPIRE_TIME]: %s', val);\n state.expiretime = val;\n },\n\n SET_REGWIZ_TIME(state, val) {\n log.debug('[SET_REGWIZ_TIME]: %s', val);\n state.regWizTime = val;\n },\n\n CHANGE_GUID_FORUMACCOUNT(state, val) {\n log.debug('[CHANGE_GUID_FORUMACCOUNT]: %s', val);\n state.forumaccount = val;\n },\n\n SET_LOCALE(state, val) {\n log.debug('[SET_LOCALE]: %s', val);\n state.locale = val;\n },\n\n LOCALE_MESSAGES(state, val) {\n const [err, data] = SAFE_JSON_PARSE(decodeURIComponent(val));\n if (err) log.warn('[LOCALE_MESSAGES]: %o', err);\n else {\n log.debug('[LOCALE_MESSAGES]: %o', data);\n state.messages = data;\n }\n },\n\n SET_API_KEY(state, val) {\n log.debug('[SET_API_KEY]: %s', val);\n state.apikey = val;\n },\n\n SET_GRAPH_ONLINE(state, val) {\n log.debug('[SET_GRAPH_ONLINE]: %o', val);\n state.graphOnline = val;\n },\n\n SET_GRAPH_RECONNECTED(state, val) {\n log.debug('[SET_GRAPH_RECONNECTED]: %o', val);\n state.graphReconnected = val;\n },\n\n SET_MY_SERVERS(state, val) {\n log.debug('[SET_MY_SERVERS]: %o', val);\n state.myServers = [...val];\n },\n SET_MY_SERVERS_LOADING(state, val) {\n log.debug('[SET_MY_SERVERS_LOADING]: %o', val);\n state.myServersLoading = val;\n },\n SET_MY_SERVERS_ERROR(state, val) {\n if (!val) log.debug('[SET_MY_SERVERS_ERROR] unset');\n else log.error('[SET_MY_SERVERS_ERROR]: %o', val);\n state.myServersError = val ? val.replace('Graphql', 'unraid-api').replace('offline', 'stopped') : null; // the user won't know what `Graphql` is\n },\n SET_MY_SERVERS_ERROR_SHOW_SUPPORT_BTN(state, val) {\n log.debug('[SET_MY_SERVERS_ERROR_SHOW_SUPPORT_BTN]', val);\n state.myServersErrorShowSupportBtn = val;\n },\n SET_MY_SERVERS_ENV(state, val) {\n log.debug('[SET_MY_SERVERS_ENV]: %o', val);\n state.myServersEnv = val;\n },\n SET_MY_SERVERS_API_VERSION(state, val) {\n log.debug('[SET_MY_SERVERS_API_VERSION]: %o', val);\n state.apiVersion = val;\n },\n\n TRIGGER_UPC(state, val) {\n log.debug('[TRIGGER_UPC]: %o', val);\n state.triggerUPC = val;\n },\n\n /** for support of 6.10 webgui without plugin included */\n SET_HIDE_MY_SERVERS(state, val) {\n log.debug('[SET_HIDE_MY_SERVERS]: %o', val);\n state.hideMyServers = !!val; // ensure its a boolean\n },\n SET_PLG_PATH(state, val) {\n if (val !== 'dynamix.my.servers') return log.warn('[SET_PLG_PATH] value not allowed', val);\n log.debug('[SET_PLG_PATH]: %o', val);\n state.plgPath = val;\n return true;\n },\n // detect postMessage errors\n SET_POST_MESSAGE_ERROR(state, data) {\n state.postMessageError = data;\n if (state.postMessageError) log.error('[SET_POST_MESSAGE_ERROR]: %o', state.postMessageError);\n },\n // subscription\n SET_OWNER(state, data) {\n log.debug('[SET_OWNER]: %o', data);\n state.username = data && data.username ? data.username : '';\n state.avatar = data && data.avatar ? data.avatar : '';\n state.registered = !!(data && data.username);\n },\n // registration\n SET_REGISTRATION_SUB(state, data) {\n log.debug('[SET_REGISTRATION_SUB]: %o', data);\n if (data.keyfile) state.keyfile = data.keyFile.contents;\n if (data.expiration) state.expiretime = data.expiration;\n },\n SET_DEV_MODE(state, data) {\n log.debug('[SET_DEV_MODE]: %o', data);\n state.devEnv = data;\n },\n SET_SIGN_OUT_TRIGGERED(state, data) {\n log.debug('[SET_SIGN_OUT_TRIGGERED]: %o', data);\n state.signOutTriggered = data;\n },\n SET_API_EXECUTE_RESPONSE(state, val) {\n log.debug('[SET_API_EXECUTE_RESPONSE]: %o', val);\n state.apiReport = val;\n },\n SET_MY_SERVERS_CLOUD(state, val) {\n log.debug('[SET_MY_SERVERS_CLOUD]: %o', val);\n state.cloud = val;\n },\n /**\n * @name SET_REPLACE_KEY\n * @description\n * @param {object} state - vuex state https://vuex.vuejs.org/guide/state.html\n * @param {string} trial\n */\n SET_REPLACE_KEY(state, res) {\n log.debug('[SET_REPLACE_KEY]: %o', res);\n state.license = res.license;\n state.keyfile = res.newkey;\n state.keyServerAction = 'replace';\n },\n SET_PIRATE_KEY(state, res) {\n log.debug('[SET_PIRATE_KEY]: %s', res);\n state.pirateKey = !!res; // convert to boolean as that's all we need\n if (state.pirateKey) sessionStorage.setItem('upc_yargMatey', res);\n else sessionStorage.removeItem('upc_yargMatey');\n },\n\n SET_PROCESS_STARTED(state, res) {\n log.debug('[SET_PROCESS_STARTED]: %s', res);\n state.processStarted = res;\n },\n\n SET_SHOW_POST_MESSAGE_STATUS(state, res) {\n log.debug('[SET_SHOW_POST_MESSAGE_STATUS]: %s', res);\n state.showPostMessageStatus = res;\n },\n\n SET_KEY_INSTALLING(state, res) {\n log.debug('[SET_KEY_INSTALLING]: %s', res);\n state.keyInstalling = res;\n },\n\n SET_KEY_INSTALL_SUCCESS(state, res) {\n log.debug('[SET_KEY_INSTALL_SUCCESS]: %s', res);\n state.keyInstallSuccess = res;\n },\n\n SET_KEY_INSTALL_FAIL(state, res) {\n log.debug('[SET_KEY_INSTALL_FAIL]: %s', res);\n state.keyInstallFail = res;\n },\n\n SET_REGISTER_SUCCESS(state, res) {\n log.debug('[SET_REGISTER_SUCCESS]: %s', res);\n state.registerSuccess = res;\n },\n\n SET_REGISTER_FAIL(state, res) {\n log.debug('[SET_REGISTER_FAIL]: %s', res);\n state.registerFail = res;\n },\n\n SET_UNREGISTER_SUCCESS(state, res) {\n log.debug('[SET_UNREGISTER_SUCCESS]: %s', res);\n state.unregisterSuccess = res;\n },\n\n SET_UNREGISTER_FAIL(state, res) {\n log.debug('[SET_UNREGISTER_FAIL]: %s', res);\n state.unregisterFail = res;\n },\n\n /**\n * SET_JWTS\n * @param {*} state\n * @param {object} res\n * @param {string} res.accessToken\n * @param {string} res.idToken\n * @param {string} res.refreshToken\n */\n SET_JWTS(state, res) {\n log.debug('[SET_JWTS]: %s', res);\n if (!res) {\n state.accessToken = '';\n state.idToken = '';\n state.refreshToken = '';\n localStorage.removeItem('upc_accessToken');\n localStorage.removeItem('upc_idToken');\n localStorage.removeItem('upc_refreshToken');\n return;\n }\n state.accessToken = res.accessToken ? res.accessToken : '';\n state.idToken = res.idToken ? res.idToken : '';\n state.refreshToken = res.refreshToken ? res.refreshToken : '';\n if (res.accessToken) localStorage.setItem('upc_accessToken', res.accessToken);\n if (res.idToken) localStorage.setItem('upc_idToken', res.idToken);\n if (res.refreshToken) localStorage.setItem('upc_refreshToken', res.refreshToken);\n },\n};\n","import { ApolloClient } from 'apollo-client';\nimport { ApolloLink, split } from 'apollo-link';\nimport { setContext } from 'apollo-link-context';\nimport { HttpLink } from 'apollo-link-http';\nimport { InMemoryCache } from 'apollo-cache-inmemory';\nimport { WebSocketLink } from 'apollo-link-ws';\nimport { getMainDefinition } from 'apollo-utilities';\nimport { onError } from 'apollo-link-error';\nimport { RetryLink } from 'apollo-link-retry';\n\nimport { DEV_GRAPH_URL, NODE_ENV } from '../../env';\nimport { ERROR_CORS_403 } from '../../consts';\nimport { log } from '../../log';\n\nconst WINDOW_URL = new URL(DEV_GRAPH_URL || window.location.origin);\n\nconst clients = {};\n\nlet prioritizeCorsError = false; // Ensures we don't overwrite this specific error message with a non-descriptive network error message\nlet slowDownRetry = false; // used to slow down automatic retry on specific errors\n\nconst createGraphqlClient = (context) => {\n log.debug('[createGraphqlClient]');\n /**\n * Getting response headers\n * @see: https://stackoverflow.com/questions/54990173/graphql-cannot-read-response-headers-in-apollo-client\n */\n const authware = new ApolloLink((operation, forward) => forward(operation).map((response) => {\n const {\n response: { headers },\n } = operation.getContext();\n if (headers) {\n const env = headers.get('x-environment') || null;\n const apiVersion = headers.get('x-unraid-api-version') || null;\n if (env) context.commit('SET_MY_SERVERS_ENV', env);\n if (apiVersion) context.commit('SET_MY_SERVERS_API_VERSION', apiVersion);\n }\n return response;\n }));\n\n const httpLink = authware.concat(new HttpLink({ // HTTP connection to the API\n uri: `${WINDOW_URL.protocol}//${WINDOW_URL.host}/graphql`, // note the additional '//' slashes here for the URL\n }));\n // Create the subscription websocket link\n const wsProtocol = WINDOW_URL.protocol.includes('https') ? 'wss://' : 'ws://';\n const wsLinkUri = `${wsProtocol}${WINDOW_URL.host}/graphql`;\n const wsLink = new WebSocketLink({\n uri: wsLinkUri,\n options: {\n timeout: 65000,\n reconnect: true,\n connectionParams: {\n 'x-api-key': context.state.apikey,\n },\n },\n });\n /**\n * Monitor websocket connection\n */\n let disconnectTimeout;\n wsLink.subscriptionClient.maxConnectTimeGenerator.setMin(3000);\n wsLink.subscriptionClient.onConnected(() => {\n log.debug('[🚀 wslink.onConnected 🚀]');\n context.commit('SET_GRAPH_ONLINE', true);\n if (context.state.myServersError) context.commit('SET_MY_SERVERS_ERROR', null);\n });\n wsLink.subscriptionClient.onReconnected(() => {\n log.debug('[🚀 wslink.onReconnected 🚀]');\n context.commit('SET_GRAPH_ONLINE', true);\n context.commit('SET_GRAPH_RECONNECTED', true);\n if (context.state.myServersError) context.commit('SET_MY_SERVERS_ERROR', null);\n });\n wsLink.subscriptionClient.onDisconnected(() => {\n log.debug('[🚀 wslink.onDisconnected 🚀] 01');\n if (context.state.graphOnline) { /** prevents below from firing on first load && when navigating away from the page */\n clearTimeout(disconnectTimeout);\n disconnectTimeout = setTimeout(() => { /** prevents below from firing when navigating away from the page */\n log.debug('[🚀 wslink.onDisconnected 🚀] 02');\n context.commit('SET_GRAPH_ONLINE', false);\n /** So we don't to overwrite \"Graphql is offline\" error message */\n if (!context.state.myServersError) context.commit('SET_MY_SERVERS_ERROR', 'Disconnected from Unraid API');\n }, 150);\n }\n });\n\n const link = split( // using the ability to split links, you can send data to each link depending on what kind of operation is being sent\n ({ query }) => {\n const definition = getMainDefinition(query);\n return definition.kind === 'OperationDefinition' && definition.operation === 'subscription';\n },\n wsLink,\n httpLink,\n );\n const authLink = setContext((_, { headers }) => ({\n headers: {\n ...headers,\n 'x-api-key': context.state.apikey,\n },\n }));\n\n const errorLink = onError(({ graphQLErrors, networkError }) => {\n if (graphQLErrors) {\n log.error('[GraphQL error] %o', graphQLErrors);\n const msg = (graphQLErrors[0].message || graphQLErrors[0].error.message) || 'No error object - [UNRAID]';\n context.commit('SET_MY_SERVERS_ERROR', msg);\n if (msg && msg.includes(ERROR_CORS_403)) {\n prioritizeCorsError = true;\n slowDownRetry = true;\n }\n }\n if (networkError && !prioritizeCorsError) {\n log.error('[Network error]', networkError);\n const msg = networkError.message ? networkError.message : networkError;\n context.commit('SET_MY_SERVERS_ERROR', msg.includes('Unexpected token < in JSON at position 0') ? 'Unraid API • CORS Error' : msg);\n }\n context.commit('SET_MY_SERVERS_LOADING', false);\n });\n\n const retryLink = new RetryLink({\n attempts: {\n max: Infinity,\n retryIf: (error, _operation) => {\n log.debug('[retryLink - retryIf]', { error, _operation, prioritizeCorsError });\n context.commit('SET_GRAPH_ONLINE', false);\n return !!error && !prioritizeCorsError; // don't retry when ERROR_CORS_403\n },\n },\n delay: {\n initial: slowDownRetry ? 3000 : 300,\n max: Infinity,\n jitter: true,\n },\n });\n\n return new ApolloClient({\n link: ApolloLink.from([retryLink, errorLink, authLink, link]),\n connectToDevTools: NODE_ENV !== 'production',\n cache: new InMemoryCache(), // even though we aren't caching this is required because apollo…🙄 @see: https://github.com/apollographql/apollo-client/issues/6237\n defaultOptions: {\n watchQuery: {\n fetchPolicy: 'no-cache',\n },\n query: {\n fetchPolicy: 'no-cache',\n },\n mutate: {\n fetchPolicy: 'no-cache',\n },\n subscribe: {\n fetchPolicy: 'no-cache',\n shouldResubscribe: false,\n },\n },\n });\n};\n\n// eslint-disable-next-line import/prefer-default-export\nexport const getGraphqlClient = (context) => {\n if (!context.state.apikey) return log.debug('[getGraphqlClient] NO API KEY');\n if (Object.keys(clients).includes(context.state.apikey)) { // Return existing client\n log.debug('[getGraphqlClient] found existing client %o', clients[context.state.apikey]);\n return clients[context.state.apikey];\n }\n const client = createGraphqlClient(context);\n clients[context.state.apikey] = client;\n log.debug('[getGraphqlClient] new client inbound %o', client);\n return client;\n};\n\nexport const stopGraphqlClient = (_context, apikey) => {\n log.debug('[stopGraphqlClient] clients %o', { clients, apikey });\n if (!Object.keys(clients).includes(apikey)) return log.debug('[stopGraphqlClient] client does not exist for apikey %o', apikey);\n log.debug('[stopGraphqlClient] found existing client & stopping it %o', clients[apikey]);\n return clients[apikey].stop();\n};\n","/* eslint-disable no-unused-vars */\n/* eslint-disable import/prefer-default-export */\nimport gql from 'graphql-tag';\n\nimport { getGraphqlClient } from './client';\nimport { ERROR_MESSAGE_UNEXPECTED_OWNER_RESPONSE } from '../../consts';\nimport { log } from '../../log';\n\nconst mutateResponseDataForState = (context, response) => {\n const { data } = response;\n if (!data) return log.error('[🪐 serverStateFromApi] response %o', response);\n const serverState = {\n // if we get an owners obj back and the username is root we don't want to overwrite the values\n ...(data.owner && data.owner.username !== 'root' && {\n avatar: data.owner.avatar,\n username: data.owner.username,\n registered: true,\n }),\n // if owners obj is empty we need to sign user out\n ...(context.state.signOutTriggered && { username: '', avatar: '', registered: false }),\n servername: (data.info && data.info.os) ? data.info.os.hostname : null,\n guid: data.flash ? data.flash.guid : null,\n keyfile: (data.registration && data.registration.keyFile) ? data.registration.keyFile.contents : null,\n flashProduct: data.flash ? data.flash.product : null,\n flashvendor: data.flash ? data.flash.vendor : null,\n sendCrashInfo: data.crashReportingEnabled,\n reggen: data.vars ? data.vars.regGen : null,\n state: data.vars ? data.vars.regState : null,\n config: data.config ? data.config : {\n error: data.vars ? data.vars.configError : null,\n valid: data.vars ? data.vars.configValid : true,\n },\n expiretime: (data.registration && data.registration.expiration) ? data.registration.expiration : 0,\n ...(data.cloud && { cloud: data.cloud }),\n };\n log.debug('[🪐 serverStateFromApi] mutated response %o', serverState);\n return serverState;\n};\n\n/**\n * - if we haven't triggered a signout and we have an empty owners object this is an error\n * - or username of \"root\" is an error\n*/\nconst detectOwnersResponseError = (context, response) => {\n log.debug('[detectOwnersResponseError]', {\n 'context.state.registered': context.state.registered,\n 'context.state.signOutTriggered': context.state.signOutTriggered,\n 'response.data.owner': response.data.owner,\n 'context.state.myServersError': context.state.myServersError,\n });\n if (context.state.signOutTriggered) return log.debug('[detectOwnersResponseError] signed out; ignoring');\n if (!response.data.owner || (response.data.owner && response.data.owner.username === 'root')) {\n log.error(ERROR_MESSAGE_UNEXPECTED_OWNER_RESPONSE, response.data.owner);\n context.commit('SET_MY_SERVERS_ERROR', `${ERROR_MESSAGE_UNEXPECTED_OWNER_RESPONSE} Please update your Connect plugin (formly known as My Servers) to potentially fix this error. Thanks for working with us as we try to solve this bug.`);\n return context.commit('SET_MY_SERVERS_ERROR_SHOW_SUPPORT_BTN', true);\n }\n if (response.data.owner && response.data.owner.username !== 'root' && context.state.myServersError && context.state.myServersError.includes(ERROR_MESSAGE_UNEXPECTED_OWNER_RESPONSE)) {\n context.commit('SET_MY_SERVERS_ERROR', '');\n return context.commit('SET_MY_SERVERS_ERROR_SHOW_SUPPORT_BTN', false);\n }\n return log.debug('[detectOwnersResponseError] PASSED');\n};\n\nexport const serverStateFromApi = async (context) => {\n log.debug('[serverStateFromApi] %o', { apiVersion: context.state.apiVersion });\n const query = gql`query serverState {\n owner {\n username\n avatar\n }\n info {\n os {\n hostname\n }\n }\n flash {\n guid\n vendor\n product\n }\n registration {\n expiration\n keyFile {\n contents\n }\n }\n crashReportingEnabled\n vars {\n regGen\n regState\n configError\n configValid\n }\n config {\n error\n valid\n }\n cloud {\n error\n apiKey {\n valid\n error\n }\n relay {\n status\n error\n }\n cloud {\n status\n error\n }\n }\n }`;\n /** to grab the inital server state */\n const response = await getGraphqlClient(context).query({\n errorPolicy: 'all',\n query,\n });\n log.debug('[🪐 serverStateFromApi] response %o', response, context);\n // if we have a cloud error, allow the user to contact support about it\n context.commit('SET_MY_SERVERS_ERROR_SHOW_SUPPORT_BTN', true);\n context.commit('SET_MY_SERVERS_LOADING', false);\n // potentially set hasRemoteApiKey\n context.commit('SET_FULL_SERVER_STATE', mutateResponseDataForState(context, response));\n detectOwnersResponseError(context, response); // is owners response acting weird?\n\n log.debug('[🪐 serverStateFromApi] subscriptions %o', { skip: context.state.graphReconnected });\n if (!context.state.graphReconnected) { // prevent duplicate subscriptions\n /**\n * subscribe to vars\n */\n log.debug('[🪐 serverStateFromApi] serverVarsSub');\n getGraphqlClient(context).subscribe({\n query: gql`subscription serverVarsSub {\n vars {\n regGen\n regState\n configError\n configValid\n }\n }`,\n }).subscribe({ /** `subscribe().subscribe()` I know, wtf right? */\n next(res) {\n log.debug('[🪐 serverStateFromApi] serverVarsSub res %o', res);\n context.commit('SET_STATE', res.data.vars.regState);\n },\n error(err) {\n context.commit('SET_MY_SERVERS_ERROR', err);\n return context.state.myServersError;\n },\n });\n\n /**\n * subscribe to owner\n */\n log.debug('[🪐 serverStateFromApi] serverOwnerSub');\n getGraphqlClient(context).subscribe({\n query: gql`subscription serverOwnerSub {\n owner {\n username\n avatar\n }\n }`,\n }).subscribe({ /** `subscribe().subscribe()` I know, wtf right? */\n next(res) {\n log.debug('[🪐 serverStateFromApi] serverOwnerSub res %o', res);\n detectOwnersResponseError(context, res); // is owners response acting weird?\n // only set when we have data and username is not \"root\"\n if (res && res.data && res.data.owner && res.data.owner.username !== 'root') context.commit('SET_OWNER', res.data.owner);\n },\n error(err) {\n context.commit('SET_MY_SERVERS_ERROR', err);\n return context.state.myServersError;\n },\n });\n\n /**\n * subscribe to config\n */\n log.debug('[🪐 serverStateFromApi] serverConfigSub');\n getGraphqlClient(context).subscribe({\n query: gql`subscription serverConfigSub {\n config {\n error\n valid\n }\n }`,\n }).subscribe({ /** `subscribe().subscribe()` I know, wtf right? */\n next(res) {\n log.debug('[🪐 serverStateFromApi] serverConfigSub res %o', res);\n context.commit('SET_CONFIG', res.data.config);\n },\n error(err) {\n context.commit('SET_MY_SERVERS_ERROR', err);\n return context.state.myServersError;\n },\n });\n /**\n * subscribe to owner\n */\n log.debug('[🪐 serverStateFromApi] serverRegistrationSub');\n getGraphqlClient(context).subscribe({\n query: gql`subscription serverRegistrationSub {\n registration {\n expiration\n keyFile {\n contents\n }\n }\n }`,\n }).subscribe({ /** `subscribe().subscribe()` I know, wtf right? */\n next(res) {\n log.debug('[🪐 serverStateFromApi] serverRegistrationSub res %o', res);\n context.commit('SET_REGISTRATION_SUB', res.data.registration);\n },\n error(err) {\n context.commit('SET_MY_SERVERS_ERROR', err);\n return context.state.myServersError;\n },\n });\n }\n\n log.debug('[🪐 serverStateFromApi] DONE %o', response.data);\n return response.data;\n};\n\nexport const fetchServers = async (context) => {\n log.debug('[fetchServers]');\n context.commit('SET_MY_SERVERS_LOADING', true);\n /**\n * Initial query for servers data\n * @see: https://www.apollographql.com/docs/react/api/core/ApolloClient/#ApolloClient.query\n */\n const response = await getGraphqlClient(context).query({\n query: gql`query initialGetServers {\n servers {\n name\n guid\n status\n }\n }`,\n });\n log.debug('[fetchServers] response %o', response);\n const { data } = response;\n if (data) {\n /**\n * get wan ip to assist with determining local or remote URL for server dropdown.\n * We only need this when 2 or more servers b/c anything more than 1 means other servers.\n */\n if (data.servers.length > 1) context.dispatch('getWanIp');\n /** commit response data to vuex store */\n context.commit('SET_GRAPH_ONLINE', true);\n context.commit('SET_MY_SERVERS', data.servers);\n context.commit('SET_MY_SERVERS_LOADING', false);\n }\n log.debug('[fetchServers] getServers subscription %o', { skip: context.state.graphReconnected });\n if (!context.state.graphReconnected) { // prevent duplicate subscriptions\n /**\n * subscribe to servers\n */\n getGraphqlClient(context).subscribe({\n query: gql`subscription getServers {\n servers {\n name\n guid\n status\n }\n }`,\n }).subscribe({ /** `subscribe().subscribe()` I know, wtf right? */\n next(res) {\n log.debug('[new subscription data] %o', res);\n // if graph went offline, let's go back online\n if (!context.state.graphOnline) context.commit('SET_GRAPH_ONLINE', true);\n context.commit('SET_MY_SERVERS', res.data.servers);\n context.commit('SET_MY_SERVERS_LOADING', false);\n },\n error(err) {\n context.commit('SET_MY_SERVERS_ERROR', err);\n return context.state.myServersError;\n },\n });\n }\n};\n","/* eslint-disable W014 */\n/* eslint-disable no-nested-ternary */\n/* eslint-disable no-case-declarations */\nimport semverGte from 'semver/functions/gte';\nimport postRobot from 'post-robot';\n\nimport { fetchServers, serverStateFromApi } from './myServers/fetch';\nimport { stopGraphqlClient } from './myServers/client';\nimport i18n from '../i18n';\nimport {\n KeyServerWretch, WebguiInstallKey, WebguiUpdate, WebguiState, WanIp, WebguiUpdateDns, WebguiUnraidApiCommand,\n} from '../api';\nimport { KeyServer } from '../services';\nimport { log } from '../log';\n\nimport {\n OPEN_POPUP, CAN_POST_MESSAGE, SAFE_JSON_PARSE, GUID_NOT_RECEIVED, WEBGUI_PARENT,\n} from '../consts';\nimport {\n NODE_ENV, REGWIZ_URL, PURCHASE_URL, ACCOUNT_URL,\n} from '../env';\n\nlet deliverNewStateRetryCounter = 0; // Set outside of receivePostMessage so that it's not set as 0 each time we receive a post message…defeating it's purpose.\nconst deliverNewStateRetryLimit = 6;\n/**\n * @param {string} csrf // required for POSTs in the webgui. feed it `state.csrf`\n */\nconst updateDns = (csrf) => {\n // we need to run this when PLG is installed to ensure URLs will work in the dashboard after sign in\n setTimeout(() => {\n WebguiUpdateDns\n .formUrl({ csrf_token: csrf })\n .post()\n .res(updateDnsRes => log.debug('[WebguiUpdateDns] %o', updateDnsRes))\n .catch(error => log.error('[WebguiUpdateDns] %o', error));\n }, 500);\n};\n\n/**\n *\n */\nconst preventClose = (e) => {\n e.preventDefault();\n // eslint-disable-next-line no-param-reassign\n e.returnValue = '';\n // eslint-disable-next-line no-alert\n alert(i18n.tc('regWizPopUp.closingPopUpMayLeadToErrors'));\n};\n\n/**\n * Previously state.popUpWindow was used.\n * But this eventually lead to a Vue / Vuex error of cross-origin object on the pop-up window.\n * Storing to this variable \"fixed\" the issue.\n */\nlet popUpWindow = null;\n\n// eslint-disable-next-line import/prefer-default-export\nexport const actions = {\n /**\n * @module USERPROFILE\n * @method: openPopUp\n * @description: Open pop-up window or if one already exists we focus on it\n * @param: {string} payload.url\n * @param: {string} payload.name\n * @param: {string} payload.width\n * @param: {string} payload.height\n */\n openPopUp({ commit, dispatch, state }, payload) {\n log.debug('[openPopUp] %o', payload || 'focus existing pop-up');\n if (popUpWindow) return popUpWindow.focus(); // re-focus the existing pop-up window\n /**\n * @description Pop-up blocker detection\n * @see https://stackoverflow.com/a/27725432/3215809\n */\n try {\n // otherwise create a new one\n popUpWindow = OPEN_POPUP(payload.url, payload.name, payload.width, payload.height);\n const isDarkMode = (window.matchMedia && window.matchMedia('(prefers-color-scheme: dark)').matches);\n const isPurchase = payload.url.toString().includes('/preflight');\n const black = '#222';\n const white = '#fff';\n const orangeGradient = 'linear-gradient(to right, #E22828 0%, #ff8c2f 100%)';\n const lightModeBg = (isPurchase ? white : orangeGradient);\n popUpWindow.document.body.style.background = isDarkMode ? black : lightModeBg;\n popUpWindow.focus();\n // in pop-up blocker detection so vuex doesn't update until we know they will be a pop-up\n // after this the popUp is referenced & used via `popUpWindow` instead of `popUpWindow`\n commit('CHANGE_POP_UP_WINDOW', popUpWindow);\n commit('STATE_AT_OPEN', state.registered);\n /**\n * @description every 250ms\n * - detect if the pop up is closed\n * - sending server session postMessage\n */\n const popupClosed = setInterval(() => {\n if (!popUpWindow) clearInterval(popupClosed); // pop-up was close somewhere else so we need to stop checking\n if (popUpWindow && popUpWindow.closed) {\n clearInterval(popupClosed);\n dispatch('resetPopUp', { reloadWebGUI: false });\n }\n }, 250);\n // Detect closure of window that triggered pop-up\n window.onunload = () => {\n if (popUpWindow && !popUpWindow.closed) popUpWindow.close();\n };\n return true;\n } catch (e) {\n // eslint-disable-next-line no-alert\n return alert('Pop-up blocker detected.\\nTo continue successfully please add this website to your browser\\'s exeception list then refresh.');\n }\n },\n /**\n * @module REGWIZ,USERPROFILE\n * @method: resetPopUp\n * @description: clears cookies related to allowing purchasing. Resets state related to popUpWindow. Refreshes the iframe.\n * @param: {boolean} payload.reloadWebGUI\n */\n resetPopUp({ commit, dispatch }, payload = { reloadWebGUI: true }) {\n log.debug('[resetPopUp] %o', payload);\n popUpWindow = null;\n commit('CHANGE_POP_UP_WINDOW', null);\n dispatch('updateServerState'); // update UPC based on any potential changes that happened during the pop-up's lifespace\n if (payload.reloadWebGUI) dispatch('reloadWebGUI');\n },\n /**\n * @module REGWIZ,USERPROFILE\n * @method: closePopUp\n * @description: Close pop-up window attached to popUpWindow\n * @param: {boolean} payload.reloadWebGUI\n * ```\n */\n closePopUp({ dispatch }, payload = { reloadWebGUI: false }) {\n log.debug('[closePopUp] %o', payload);\n // check if we need to close any open pop-up window\n if (popUpWindow) {\n popUpWindow.close();\n dispatch('resetPopUp', { reloadWebGUI: payload.reloadWebGUI });\n }\n },\n /**\n * @module REGWIZ,USERPROFILE\n * @name reloadWebGUI\n * @description\n */\n reloadWebGUI() {\n log.debug('[reloadWebGUI] %s', '✨');\n window.location.reload();\n },\n /**\n * @module REGWIZ\n * @method closePopUpFromPopUp\n * @description We have a timer setup in the launchpad to autorefresh when it detects that a popup is closed. So explicitly close the popup just in case.\n */\n closePopUpFromPopUp({ dispatch }) {\n log.debug('[closePopUpFromPopUp] %o');\n dispatch('resetPopUp');\n window.close();\n },\n /**\n * @module REGWIZ\n * @name sendDataPostMessageToServer\n * @description\n * @param {object} getters - vuex getters / computed state https://vuex.vuejs.org/guide/getters.html\n */\n sendDataPostMessageToServer({ state }) {\n const payload = (state.submissionFrom === 'SignOut') ? { event: 'MYSERVERS_UNREGISTER' }\n : {\n event: 'REG_WIZARD',\n keyfile: state.keyfile,\n license: state.license,\n email: state.userEmail,\n apikey: state.apikey,\n avatar: state.avatar,\n username: state.username,\n guid: state.guid, // using for `regWizTime` in plg\n };\n log.debug('[sendDataPostMessageToServer] %o', payload);\n try {\n /**\n * if targetOrigin = `state.site` instead of '*' postMessages fail when using Firefox via Unraid OS GUI.\n * We check origins before allowing the postMessage in receivePostMessage this _should_ be fine.\n * We also disallow this code from being in iframes to help prevent postMessage exploits.\n */\n return WEBGUI_PARENT.postMessage(JSON.stringify(payload), state.osGui ? '*' : state.site);\n } catch (error) {\n if (!CAN_POST_MESSAGE) log.warn('[sendDataPostMessageToServer] !CAN_POST_MESSAGE', payload);\n return log.error('[sendDataPostMessageToServer] %o', error);\n }\n },\n /**\n * @REGWIZ\n * @method requestUpdatedServerStateFromUpc\n * @description used by Success page to request new server state from UPC / webgui\n */\n requestUpdatedServerStateFromUpc({ state }) {\n log.debug('[requestUpdatedServerStateFromUpc]');\n try {\n /**\n * if targetOrigin = `state.site` instead of '*' postMessages fail when using Firefox via Unraid OS GUI.\n * We check origins before allowing the postMessage in receivePostMessage this _should_ be fine.\n * We also disallow this code from being in iframes to help prevent postMessage exploits.\n */\n return WEBGUI_PARENT.postMessage(JSON.stringify({ event: 'SUCCESS_NEW_STATE' }), state.osGui ? '*' : state.site);\n } catch (error) {\n if (!CAN_POST_MESSAGE) log.warn('[requestUpdatedServerStateFromUpc] !CAN_POST_MESSAGE', CAN_POST_MESSAGE);\n return log.error('[requestUpdatedServerStateFromUpc] %o', error);\n }\n },\n /**\n * @module USERPROFILE\n * @method: receivePostMessage\n * @description: handles postMessages to the app\n * @param: {Object} payload\n * @param: {EventObject} payload.event - postMessage event. See mdn: https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage#The_dispatched_event\n * @param: {String} payload.event.data - MUST BE STRING AS WE ARE EXPECTING TO PARSE STRING TO JSON\n */\n receivePostMessage({\n commit, dispatch, getters, state,\n }, payload = { event: null }) {\n if (!payload.event) {\n log.error('postMessage no event');\n return;\n }\n log.debug('[receivePostMessage] payload.event %o', payload.event);\n const [err, data] = SAFE_JSON_PARSE(payload.event.data);\n if (err) return;\n if (payload.event.data.includes('post_robot')) {\n log.debug('IGNORE POST ROBOT MESSAGE');\n return;\n }\n if (NODE_ENV === 'development') log.debug('[receivePostMessage] payload.event.data.event %o', data);\n else log.log('[receivePostMessage] payload.event.data.event %o', data.event);\n // these events are allowed the skip the origin check. Used in cases where we block postMessage but still want troubleshooting data.\n const eventsAllowedToPassOriginCheck = ['REQUEST_API_REPORT', 'API_EXECUTE_PINGBACK'];\n const acceptDebugEvents = data && data.event && eventsAllowedToPassOriginCheck.includes(data.event);\n // check origin\n const payloadOrigin = payload.event.origin;\n /**\n * Certain extensions fire a postMessage on initial load of a page.\n * Which ultimately interferes with our communication because they use a similar structure for sending data.\n * So what we can do is attempt to ignore the postMessage and its data so further postMessages from us can come through.\n */\n if (payloadOrigin.includes('extension://')) {\n log.log('Skipping postMessage from browser extension', payloadOrigin);\n return;\n }\n // let's keep going to see if this postMessage is allowed\n const fromRegWiz = payloadOrigin === REGWIZ_URL;\n const fromPurchase = PURCHASE_URL.includes(payloadOrigin); // since PURCHASE_URL includes '/preflight'\n const fromAccount = payloadOrigin === ACCOUNT_URL;\n const fromPreviewUrl = payloadOrigin.includes('d1eohvtyc6gnee.amplifyapp.com'); // pull request preview URLs include this cname\n /**\n * Possible that this is the SESSION event being received so we don't have `state.site` yet.\n * If so use the postMessage's `data.server.site` to compare origin sending message.\n * Additional we'll check against extraOrigins which is set in /boot/config/plugins/dynamix.my.servers/data/extra-origins.json\n */\n const pmOriginMatchesDataServerUrl = data && data.server && data.server.site ? (payloadOrigin === data.server.site) : false;\n const pmOriginMatchesStateSite = (payloadOrigin === state.site);\n const pmOriginIncludedInExtraOrigins = data && data.server && data.server.extraOrigins ? data.server.extraOrigins.includes(payloadOrigin) : false;\n const fromWebGui = data.event === 'SESSION' ? (pmOriginMatchesDataServerUrl || pmOriginIncludedInExtraOrigins) : pmOriginMatchesStateSite;\n const originAllowed = acceptDebugEvents || fromRegWiz || fromPurchase || fromWebGui || fromAccount || fromPreviewUrl;\n /**\n * Capture postMessage not allowed\n * App.vue watches postMessageError – error message for front-end then redirects to Troubleshoot for user to send debugInfo\n * We're capturing data.server in SET_RAW_SERVER_STATE mutation so Troubleshoot can share server state info in email message\n */\n const debugInfo = {\n 'data.server.extraOrigins': data && data.server ? data.server.extraOrigins : '',\n 'data.server.site': data && data.server ? data.server.site : '',\n 'payload.event.origin': payloadOrigin,\n 'state.site': state.site,\n pmOriginMatchesDataServerUrl,\n pmOriginMatchesStateSite,\n pmOriginIncludedInExtraOrigins,\n fromRegWiz,\n fromPurchase,\n fromWebGui,\n fromAccount,\n acceptDebugEvents,\n originAllowed,\n };\n if (!originAllowed) {\n log.error('[receivePostMessage] ❌ postMessage origin not allowed ❌ %o', debugInfo);\n commit('SET_POST_MESSAGE_ERROR', debugInfo);\n commit('SET_RAW_SERVER_STATE', data.server); // save data to use for troubleshooting\n return;\n }\n log.debug('[receivePostMessage] originAllowed %o', debugInfo);\n /**\n * sendBackPostMessage\n * @param {object} message\n */\n const sendBackPostMessage = (message) => {\n try {\n log.log('[receivePostMessage.sendBackPostMessage] %o', NODE_ENV === 'development' ? message : message.event);\n /**\n * if targetOrigin = payloadOrigin instead of '*' postMessages fail when using Firefox via Unraid OS GUI.\n * We check origins before allowing the postMessage in receivePostMessage this _should_ be fine.\n * We also disallow this code from being in iframes to help prevent postMessage exploits.\n */\n return payload.event.source.postMessage(JSON.stringify(message), state.osGui ? '*' : payloadOrigin);\n } catch (error) {\n return log.error('[sendBackPostMessage.catch] %o', { error, message });\n }\n };\n /**\n * Handles key install for webgui\n */\n const installKey = async (keyData) => {\n if (!keyData) return log.error('[installKey] missing license data: %s', keyData);\n commit('SET_KEY_INSTALLING', true);\n /** check for duplicate attempt at install of key that matches current server state.\n * When detected same state this may indicate someone refreshed the pop-up while on the success page. */\n let keyType = keyData.split('/'); // parse out key type – make into array, get last item in array, remove '.key', uppercase to match ENUM of state\n keyType = keyType[keyType.length - 1].slice(0, -4).toUpperCase();\n if (keyType === state.state) {\n commit('SET_KEY_INSTALL_FAIL', true);\n sendBackPostMessage({\n event: 'LICENSE_PINGBACK',\n message: 'Failed to license new key – duplicate install detected',\n license: keyData,\n success: false,\n });\n return log.error('[installKey] duplicate install detected', {\n state: state.state,\n keyType,\n });\n }\n log.debug('[receivePostMessage.installKey] %o', keyData);\n const installReponse = await WebguiInstallKey\n .query({ url: keyData })\n .get()\n .res((res) => {\n log.debug('[receivePostMessage.installKey] SUCCESS %o', res);\n setTimeout(() => { // give more time for key install to finish\n /**\n * used here for key installs as UpdateDNS.php requires a key\n * when not installing a key `updateDns` is executed 🤺 in 'REG_WIZARD' handler\n * setTimeout used to avoid hitting \"Registration key required\" when POSTing\n */\n updateDns(state.csrf);\n }, 1000);\n sendBackPostMessage({\n event: 'LICENSE_PINGBACK',\n message: 'License key installed',\n license: keyData,\n success: true,\n });\n commit('SET_PIRATE_KEY', false); // after a key install we know they're not pirating as the key came from us\n })\n .catch((error) => {\n log.error(`[receivePostMessage.installKey] FAILED: ${keyData}`, error);\n sendBackPostMessage({\n event: 'LICENSE_PINGBACK',\n message: 'Failed to install license key',\n license: keyData,\n success: false,\n });\n });\n return installReponse;\n };\n /**\n * Signs user out of Unraid.net – resets the UPC\n */\n const signOutUnraidNet = async () => {\n log.debug('[receivePostMessage.signOutUnraidNet] 👋');\n const response = await WebguiUpdate\n .formUrl({\n csrf_token: state.csrf,\n '#file': getters.myServersCfgPath,\n '#section': 'remote',\n apikey: '',\n avatar: '',\n email: '',\n username: '',\n wanaccess: 'no',\n accesstoken: '',\n idtoken: '',\n refreshtoken: '',\n ...(!state.hideMyServers && { '#command': '/plugins/dynamix.my.servers/scripts/.nginx_reload' }), // reloads nginx to disable remote access\n })\n .post()\n .res((res) => {\n log.debug('[receivePostMessage.signOutUnraidNet] WebguiUpdate.res %o', res);\n commit('SET_SIGN_OUT_TRIGGERED', true);\n sendBackPostMessage({ // send a ping back to the regwiz\n event: 'ACCOUNT_PINGBACK',\n success: true,\n type: 'signOut',\n webGuiPathname: window.location.pathname,\n });\n })\n .catch((error) => {\n log.error(`[receivePostMessage.signOutUnraidNet] WebguiUpdate.catch Sign out ${state.servername} from Unraid.net failed 😢 %o`, error);\n sendBackPostMessage({ // send a ping back to the regwiz\n event: 'ACCOUNT_PINGBACK',\n success: false,\n type: 'signOut',\n webGuiPathname: window.location.pathname,\n message: 'Sign Out request failed',\n });\n });\n return response;\n };\n\n /**\n * @note\n * if we check origin here like `if (!ALLOWED_ORIGINS.includes(payloadOrigin)) return`\n * then this would potentially block our pop-up window from receiving a ping back response from the webGUI.\n * This is why we aren't checking postmessage event origin here\n */\n switch (data.event) {\n case 'SESSION': // received by pop-up\n log.debug('[receivePostMessage] SESSION');\n commit('SET_FULL_SERVER_STATE', data.server); // why both SET_FULL_SERVER_STATE & SET_RAW_SERVER_STATE? See comment in mutations.js for SET_RAW_SERVER_STATE\n commit('SET_RAW_SERVER_STATE', data.server); // save data that won't get mutated for troubleshooting\n i18n.mergeLocaleMessage(data.locale, data.messages); // add messages into i18n\n i18n.locale = data.locale; // set locale to received locale\n log.debug(`[receivePostMessage] SESSION ${i18n.locale} locale & messages set`, i18n.messages);\n break;\n case 'PREFLIGHT_REQUEST': // received by upc\n log.debug('[receivePostMessage] PREFLIGHT_REQUEST');\n if (!getters.allowedOrigins.includes(payloadOrigin)) { // ensure the requester is allowed, otherwise we say, NO NO!\n log.error('[🙅‍♂️ ACCESS DENIED]');\n break;\n }\n /**\n * @note - if you update anything here please double check both places that receives\n * this postMessage back to the sender of 'PREFLIGHT_REQUEST':\n * - swtich `case 'SESSION':` where we set `data.server` & `data.messages`\n * - @unraid/craft-unraid * `web/helpers/preflight.js`\n */\n try {\n dispatch('updateServerState')\n .then((res) => {\n log.debug('[receivePostMessage] PREFLIGHT_REQUEST.updateServerState.then %o', { res, 'getters.server': getters.server });\n sendBackPostMessage({\n event: 'SESSION',\n server: {\n ...getters.server,\n },\n // this feeds the existing locale data from UPC to the pop-up\n locale: i18n.locale,\n messages: {\n ...i18n.messages[i18n.locale],\n },\n });\n })\n .catch((error) => {\n log.error('[receivePostMessage] PREFLIGHT_REQUEST.updateServerState.catch %o', error);\n sendBackPostMessage({ event: 'DELIVER_NEW_STATE', success: false });\n });\n } catch (catchError) {\n log.error('[receivePostMessage] PREFLIGHT_REQUEST.updateServerState.trycatch %o', catchError);\n sendBackPostMessage({ event: 'DELIVER_NEW_STATE', success: false });\n }\n break;\n case 'LICENSE_PINGBACK': // received by pop-up\n log.debug('[receivePostMessage] LICENSE_PINGBACK');\n commit('LICENSE_PINGBACK', data);\n break;\n case 'ACCOUNT_PINGBACK': // received by pop-up\n log.debug('[receivePostMessage] ACCOUNT_PINGBACK');\n commit('ACCOUNT_PINGBACK', data);\n break;\n case 'DELIVER_NEW_STATE': // received by pop-up\n log.debug('[receivePostMessage] DELIVER_NEW_STATE %o', data);\n /**\n * If we've installed a key we need to check if the data received from the postmessage is \"new\" rather than stale / out-dated.\n * To do this we can check `state.state` and `data.state` (the data received in the postmessage). If they match we need to ask again.\n * This is the result of installing a key and very intermittently receiving the same server state before the key install.\n */\n const keyToInstall = !!(state.license);\n const failedKeyInstall = state.licenseAction && !state.licenseAction.success;\n const oldState = state.state;\n const newState = (data && data.state) ? data.state : null;\n const potentiallyStaleState = oldState === newState;\n log.debug('[receivePostMessage] DELIVER_NEW_STATE %o', {\n keyToInstall, failedKeyInstall, oldState, newState, potentiallyStaleState, deliverNewStateRetryCounter,\n });\n if (failedKeyInstall) { // we know the key installed failed so we don't really need the server state to be updated in the pop-up. Just the user to close and manually install the key.\n commit('RECEIVED_SUCCESS_NEW_SERVERSTATE', Date.now()); // this value is watched in Success.vue to set loading = false\n // commit('SET_APP_ERROR_MESSAGE', 'Detected failed key install. Please follow the manual install instructions.');\n break;\n }\n if (keyToInstall && potentiallyStaleState && deliverNewStateRetryCounter < deliverNewStateRetryLimit) { // send another postMessage from pop-up to UPC to ask for new state. Hopefully a non-stale one.\n setTimeout(() => { // give more time for key install to finish and server to update its state\n log.debug('[potentiallyStaleState] %o', { potentiallyStaleState });\n log.debug('[deliverNewStateRetryCounter] %o', { deliverNewStateRetryCounter });\n dispatch('requestUpdatedServerStateFromUpc');\n deliverNewStateRetryCounter += 1;\n }, 350 * deliverNewStateRetryCounter); // slight back off each retry\n break;\n } else if (keyToInstall && potentiallyStaleState && deliverNewStateRetryCounter >= deliverNewStateRetryLimit) { // hit retry limit or somehow got above it…\n /** set error for success page to mention disconnect between upc & pop-up */\n commit('SET_APP_ERROR_MESSAGE', `Failed to receive latest server info${state.licenseAction && state.licenseAction.success ? ' after successful key install' : ''}. Please close this pop-up and refresh the webGUI.`);\n commit('RECEIVED_SUCCESS_NEW_SERVERSTATE', Date.now()); // this value is watched in Success.vue to set loading = false\n break;\n }\n // if we reach here we assume the data received is fresh\n commit('SET_FULL_SERVER_STATE', data); // why both SET_FULL_SERVER_STATE & SET_RAW_SERVER_STATE? See comment in mutations.js for SET_RAW_SERVER_STATE\n commit('SET_RAW_SERVER_STATE', data); // save data that won't get mutated for troubleshooting\n commit('RECEIVED_SUCCESS_NEW_SERVERSTATE', Date.now()); // this value is watched in Success.vue to set loading = false\n deliverNewStateRetryCounter = 0; // reset counter once we receive non-stale state 🤝\n break;\n // these postMessage events we're originally handled in the webgui PLG\n case 'KEY_PURCHASE': // received by upc\n log.debug('[receivePostMessage] KEY_PURCHASE');\n installKey(data.license);\n if (state.processStarted) commit('SET_PROCESS_STARTED', null);\n if (data.oem) signOutUnraidNet(); // automatically sign out the OEM purchaser from the UPC so they don't need to manually sign out before shipping server to customer\n break;\n case 'MYSERVERS_UNREGISTER': // received by upc\n log.debug('[receivePostMessage] MYSERVERS_UNREGISTER WebguiUpdate');\n if (state.processStarted) commit('SET_PROCESS_STARTED', null);\n // Extract JWT Tokens and save them. Note camel casing here and it not being used below.\n commit('SET_JWTS', null); // reseting any saved JWTs\n signOutUnraidNet();\n break;\n case 'REG_WIZARD': // received by upc\n log.debug('[receivePostMessage] REG_WIZARD %o', data);\n // this.commit('SET_SHOW_POST_MESSAGE_STATUS', true);\n if (data.license && (getters.stateData.error || !state.keyfile)) { // only attempt to install a key if we need to\n // duplicate conditional so we don't get the error from installKey() b/c not every instance of this event will have license\n installKey(data.license);\n }\n log.debug('[receivePostMessage] REG_WIZARD WebguiUpdate %o', data);\n\n // Registration finished, reset the value\n if (state.processStarted) commit('SET_PROCESS_STARTED', null);\n\n // Extract JWT Tokens and save them. Note camel casing here and it not being used below.\n commit('SET_JWTS', {\n ...(data.accessToken && { accessToken: data.accessToken }),\n ...(data.idToken && { idToken: data.idToken }),\n ...(data.refreshToken && { refreshToken: data.refreshToken }),\n });\n\n WebguiUpdate\n .formUrl({\n csrf_token: state.csrf,\n '#file': getters.myServersCfgPath,\n '#section': 'remote',\n regWizTime: `${Date.now()}_${data.guid}`, // set when signing in the first time and never unset for the sake of displaying Sign In/Up in the UPC without needing to validate guid every time\n // conditionally spread\n ...((data.apikey) && { apikey: data.apikey }), // only add apikey when we have the plg installed\n ...(data.email && { email: data.email }),\n ...(data.username && { username: data.username }),\n ...(data.avatar && { avatar: data.avatar }),\n // note that the object keys here are all lowercase. Uraid API requires this.\n ...(data.accessToken && { accesstoken: data.accessToken }),\n ...(data.idToken && { idtoken: data.idToken }),\n ...(data.refreshToken && { refreshtoken: data.refreshToken }),\n // '#command': '/webGui/include/UpdateDNS.php',\n })\n .post()\n .res((res) => {\n log.debug('[receivePostMessage] REG_WIZARD WebguiUpdate.res %o', res);\n if (!data.license) updateDns(state.csrf); // used here for key installs as UpdateDNS.php requires a key\n commit('SET_SIGN_OUT_TRIGGERED', false);\n let countIntervalRuns = 0;\n const intervalForUpdatedState = setInterval(() => { // keep asking webgui for latest server state after sign in. Fixes: https://app.asana.com/0/inbox/1159909068082281/1202170924026637/1202171128984683\n log.debug('[receivePostMessage] REG_WIZARD WebguiUpdate.res intervalForUpdatedState');\n countIntervalRuns += 1; // increment the counter\n try {\n dispatch('updateServerState')\n .then((updatedState) => {\n log.debug('[receivePostMessage] REG_WIZARD WebguiUpdate.res intervalForUpdatedState updatedState %o', { updatedState, countIntervalRuns });\n if (\n (!state.hideMyServers\n && (\n (!state.registered && countIntervalRuns >= 4) // if not registered let it run 4 times\n || (state.registered && updatedState.username && updatedState.username !== 'root') // if registered ensure we finally received the username, tell the pop-up to proceed\n )\n )\n || (state.hideMyServers && countIntervalRuns >= 4) // if we don't have plugin installed let this run a few times\n ) {\n clearInterval(intervalForUpdatedState); // stop interval from running\n sendBackPostMessage({ // send a ping back to the regwiz\n event: 'ACCOUNT_PINGBACK',\n success: true,\n type: 'signIn',\n webGuiPathname: window.location.pathname,\n res: updatedState,\n });\n }\n })\n .catch((error) => {\n log.error('[receivePostMessage] REG_WIZARD WebguiUpdate.re intervalForUpdatedState error %o', { error, countIntervalRuns });\n clearInterval(intervalForUpdatedState); // stop interval from running\n sendBackPostMessage({ // send a ping back to the regwiz\n event: 'ACCOUNT_PINGBACK',\n success: false,\n type: 'signIn',\n webGuiPathname: window.location.pathname,\n message: 'Failed to receive updated server details',\n });\n });\n } catch (catchError) {\n log.error('[receivePostMessage] REG_WIZARD WebguiUpdate catchError %o', { catchError, countIntervalRuns });\n clearInterval(intervalForUpdatedState); // stop interval from running\n sendBackPostMessage({ // send a ping back to the regwiz\n event: 'ACCOUNT_PINGBACK',\n success: false,\n type: 'signIn',\n webGuiPathname: window.location.pathname,\n message: 'Failed to receive updated server details',\n });\n }\n }, 250);\n })\n .catch((error) => {\n log.error('[WebguiUpdate] %o', error);\n sendBackPostMessage({ // send a ping back to the regwiz\n event: 'ACCOUNT_PINGBACK',\n success: false,\n type: 'signIn',\n webGuiPathname: window.location.pathname,\n message: 'Failed clearing configuration',\n });\n });\n break;\n case 'RELOAD': // received by upc\n log.debug('[receivePostMessage] RELOAD');\n window.location.reload();\n break;\n case 'SUCCESS_NEW_STATE': // received by upc\n log.debug('[receivePostMessage] SUCCESS_NEW_STATE');\n try {\n dispatch('updateServerState')\n .then((res) => {\n log.debug('[receivePostMessage] SUCCESS_NEW_STATE.updateServerState.then');\n sendBackPostMessage({ ...res, event: 'DELIVER_NEW_STATE', success: true });\n })\n .catch((error) => {\n log.error('[receivePostMessage] SUCCESS_NEW_STATE.updateServerState.catch %o', error);\n sendBackPostMessage({ event: 'DELIVER_NEW_STATE', success: false });\n });\n } catch (catchError) {\n log.error('[receivePostMessage] SUCCESS_NEW_STATE.updateServerState.trycatch %o', catchError);\n sendBackPostMessage({ event: 'DELIVER_NEW_STATE', success: false });\n }\n break;\n case 'REDIRECT_MAIN': // received by upc\n log.debug('[receivePostMessage] REDIRECT_MAIN');\n window.location.href = '/Main';\n break;\n // interact with unraid-api in webgui\n case 'REQUEST_API_REPORT': // received by upc\n const param1 = (state.apiVersion && semverGte(state.apiVersion, '2.43.3')) ? '-vv' : '-v';\n log.debug('[receivePostMessage] REQUEST_API_REPORT %o', { apiVersion: state.apiVersion, param1 });\n try {\n // if 2.43 or higher run `unraid-api report -vv` for un anonymized data\n WebguiUnraidApiCommand\n .formUrl({\n csrf_token: state.csrf,\n command: 'report',\n param1,\n })\n .post()\n .json((json) => {\n log.debug('👼 [receivePostMessage] REQUEST_API_REPORT WebguiUnraidApiCommand.json %o', json);\n commit('SET_API_EXECUTE_RESPONSE', json.result);\n sendBackPostMessage({ // send a ping back to the regwiz\n event: 'API_EXECUTE_PINGBACK',\n result: json.result,\n });\n })\n .catch((error) => {\n log.error('[receivePostMessage] REQUEST_API_REPORT WebguiUnraidApiCommand.catch failed to execute `unraid-api` report 😢 %o', error);\n sendBackPostMessage({ // send a ping back to the regwiz\n event: 'API_EXECUTE_PINGBACK',\n error,\n });\n });\n } catch (catchError) {\n log.error('[receivePostMessage] REQUEST_API_REPORT WebguiUnraidApiCommand.catch failed to execute `unraid-api` report 😢 %o', catchError);\n sendBackPostMessage({ // send a ping back to the regwiz\n event: 'API_EXECUTE_PINGBACK',\n error: catchError,\n });\n }\n break;\n case 'API_EXECUTE_PINGBACK': // received by pop-up\n log.debug('[receivePostMessage] API_EXECUTE_PINGBACK');\n if (data && data.result) commit('SET_API_EXECUTE_RESPONSE', data.result);\n break;\n /**\n * Received by UPC to show message for pirate\n * @param {string} data.event\n * @param {string} data.ts\n */\n case 'YARG_MATEY':\n log.debug('[receivePostMessage] YARG_MATEY');\n commit('SET_PIRATE_KEY', data.ts);\n break;\n default: log.debug('[receivePostMessage] UNHANDLED_MESSAGE');\n }\n },\n /**\n * @module USERPROFILE\n * @param {stringify json object} payload – serverstate\n */\n setStateFromWebComponentProp({ commit }, payload) {\n log.debug('[setStateFromWebComponentProp]');\n // decode the encoded prop, then try to parse as JSON\n const [err, data] = SAFE_JSON_PARSE(decodeURIComponent(payload));\n if (err) return log.error('[setStateFromWebComponentProp] %o', payload);\n return commit('SET_FULL_SERVER_STATE', data);\n },\n /**\n * @module USERPROFILE,REGWIZ\n * @note RegWiz uses postMessages to request data from server\n */\n async updateServerState({\n commit, dispatch, getters, state,\n }) {\n log.debug('[updateServerState]');\n if (REGWIZ_URL === window.location.origin) return log.debug('[SKIPPED] updateServerState()'); // prevents an error when in UPC development env\n /** determine what endpoint to hit for state - state.php or the graphql API */\n log.debug('[updateServerState]', {\n 'state.signOutTriggered': state.signOutTriggered,\n 'state.hideMyServers': state.hideMyServers,\n '!state.graphOnline': !state.graphOnline,\n '!getters.validApiKeyLength': !getters.validApiKeyLength,\n '!getters.validApiKeyForUpc': !getters.validApiKeyForUpc,\n });\n if (state.signOutTriggered || state.hideMyServers || !state.graphOnline || !getters.validApiKeyLength || !getters.validApiKeyForUpc) {\n log.debug('[updateServerState] via ', getters.statePhpPath);\n await WebguiState\n .url(getters.statePhpPath)\n .get()\n .json()\n .then((res) => {\n if (!res) return log.error('[updateUpcFromStatePhp] no `res` skipping `SET_FULL_SERVER_STATE`');\n return commit('SET_FULL_SERVER_STATE', res);\n })\n .catch((error) => {\n /** @idea - potentially do `error.toString()` to prevent issues down the line\n * Unexpected token === server is running but CSRF token is wrong or something else is causing a redirect to home\n * 503 rate limited. stop polling.\n */\n log.error('[updateUpcFromStatePhp WebguiState.catch] %o', error);\n if (error.toString().includes('Unexpected token') || error.toString().includes('503')) { // Session is invalid, user has logged out from another tab\n window.location.href = '/'; // stop all polling, do NOT pass GO, DO NOT COLLECT $200\n } else if (error === 'TypeError: Failed to fetch') { // do nothing, server is probably rebooting\n }\n });\n } else {\n log.debug('[updateServerState] via serverStateFromApi');\n await dispatch('serverStateFromApi');\n }\n const newState = getters.server; // since we await both options this should be up-to-date by the time we get here\n log.debug('[updateServerState] newState %o', newState);\n return newState; // so we can access via promises. probably redundant since we can access getters.servers anyway.\n },\n /**\n * @module LAUNCHPAD,REGWIZ\n * @param {string} guid\n */\n async validateGuid({ commit, getters, state }) {\n await new Promise((resolve, reject) => {\n if (state.guidValidationRunning) return log.debug('[validateGuid] already validating');\n commit('CHANGE_GUID_VALIDATION_RUNNING', true); // help prevent duplicate validations from running\n const regWizTimeGuid = state.regWizTime ? state.regWizTime.split('_')[1] : null;\n const previouslyRegistered = regWizTimeGuid ? (regWizTimeGuid === state.guid) : false;\n log.debug('[validateGuid] %o', {\n guid: state.guid,\n regGuid: state.regGuid,\n regWizTimeGuid,\n previouslyRegistered,\n });\n /**\n * @NOTE – DO NOT do `commit('SET_LOADING_STATE', true);`\n * Unless you want to create an infinite loop in the pop-up Index.vue page\n */\n let errorMessage = 'GUID Invalid';\n if (!state.guid || state.guid === GUID_NOT_RECEIVED) {\n log.debug(`[validateGuid] ${errorMessage} %o`, { '!state.guid': !state.guid, GUID_NOT_RECEIVED });\n errorMessage = `${errorMessage}: not present`;\n commit('CHANGE_GUID_VALID', false);\n commit('CHANGE_REPLACEABLE', false);\n commit('SET_STATE', 'EBLACKLISTED1');\n commit('SET_APP_ERROR_MESSAGE', errorMessage);\n commit('CHANGE_GUID_VALIDATION_RUNNING', false);\n commit('SET_LOADING_STATE', false);\n return resolve(false);\n }\n /**\n * If the server has been registered before see if the GUID in the value saved matches\n * if so DO NOT ping the key server\n * - but we should always ping when stateData.error\n */\n if (previouslyRegistered && !getters.stateData.error) {\n log.debug('[validateGuid] previouslyRegistered %s', state.guid);\n commit('CHANGE_GUID_REGISTERED', true); /** @important must come before `CHANGE_GUID_VALID` */\n commit('CHANGE_GUID_VALID', true);\n commit('CHANGE_GUID_FORUMACCOUNT', true); // assuming true since guid is registered\n commit('CHANGE_GUID_VALIDATION_RUNNING', false);\n commit('SET_LOADING_STATE', false);\n return resolve(true);\n }\n const tweleveZeros = state.guid.includes('000000000000'); // 12 consecutive zeros\n // quick client side validation to prevent unnecessary endpoint POST\n // guid must be present and not equal to `GUID_NOT_RECEIVED`\n // But if there's twelve 0s or not long enough it's invalid so don't send to validation endpoint\n if (state.guid && state.guid !== GUID_NOT_RECEIVED && (tweleveZeros || state.guid.length !== 27)) {\n if (tweleveZeros) {\n errorMessage += ': Too many consecutive zeros';\n commit('SET_STATE', 'EBLACKLISTED2');\n } else {\n errorMessage += ': Not long enough';\n commit('SET_STATE', 'EBLACKLISTED1');\n }\n commit('CHANGE_GUID_VALID', false);\n commit('CHANGE_REPLACEABLE', false);\n commit('SET_APP_ERROR_MESSAGE', errorMessage);\n commit('CHANGE_GUID_VALIDATION_RUNNING', false);\n commit('SET_LOADING_STATE', false);\n return reject(new Error(errorMessage));\n }\n /**\n * ping validation endpoint\n * - when 'EGUID' we need to validate the registered GUID not the current flash GUID.\n * - Otherwise the `replaceable` value that's return will always be `false` since the current flash GUID will theoretically be new.\n */\n if (!state.regGuid) log.warn('[validateGuid] state.regGuid empty. Getting regGuid from state.regWizTime.');\n const regGuid = state.regGuid || regWizTimeGuid || ''; // There's been an instance when EGUID where `state.regGuid` is null but regWizTime contains the previous regGuid…so we try to take advantage of that here with const regGuid\n // if EGUID we need to first validate the regGuid to check eligibility replacement\n // if the regGuid has already been replaced this will result in an error in the pop-up\n commit('CHANGE_GUID_FOR_VALIDATION', state.state === 'EGUID' ? regGuid : state.guid);\n commit('CHANGE_GUID_BLACKLISTED', null);\n try {\n const validate = KeyServerWretch.url('/validate/guid')\n .formUrl({ guid: state.guidForValidation })\n .post()\n .forbidden((err) => {\n let usableErrMsg;\n const [parsedError, parsedData] = SAFE_JSON_PARSE(err.message); // see if we need to parse the string for json\n if ((!parsedData || parsedError) && err.message) usableErrMsg = err.message; // no json use original string\n if (parsedData && parsedData.error) usableErrMsg = parsedData.error; // we got json\n log.error('[validateGuid] POST.forbidden %o', usableErrMsg);\n // if the response error message includes 'blacklist' we know the server is blacklisted\n // we don't want to show blacklisted error for regGUID when in EGUID state as the error message displayed is incorrect.\n if (usableErrMsg.includes('blacklisted')) {\n commit('CHANGE_GUID_BLACKLISTED', true);\n if (state.state !== 'EGUID') {\n commit('SET_STATE', 'EBLACKLISTED');\n commit('SET_APP_ERROR_MESSAGE', usableErrMsg);\n } else log.warn('[validateGuid] skip EBLACKLISTED state overwrite');\n } else if (usableErrMsg.includes('invalid GUID')) { // to ensure we show the correct error state for the user if they dont have a valid GUID or there was no GUID passed\n if (state.state !== 'EGUID') {\n commit('SET_STATE', 'EBLACKLISTED1');\n commit('SET_APP_ERROR_MESSAGE', usableErrMsg);\n } else log.warn('[validateGuid] skip EBLACKLISTED state overwrite');\n }\n commit('CHANGE_GUID_VALID', false);\n commit('CHANGE_REPLACEABLE', false);\n })\n .json((json) => {\n log.debug('[validateGuid] POST.json %o', json);\n if (json.registered) commit('CHANGE_GUID_REGISTERED', json.registered); /** @important must come before `CHANGE_GUID_VALID` */\n commit('CHANGE_GUID_FORUMACCOUNT', json.forumaccount || false);\n commit('CHANGE_GUID_VALID', true); // successful response means the GUID is valid.\n commit('CHANGE_REPLACEABLE', json.replaceable);\n })\n .catch((err) => {\n log.error('[validateGuid] POST.catch %o', err);\n commit('SET_APP_ERROR_MESSAGE', err.message);\n reject(new Error(err));\n })\n .finally(() => {\n log.debug('[validateGuid] POST.finally');\n commit('CHANGE_GUID_VALIDATION_RUNNING', false);\n commit('SET_LOADING_STATE', false);\n });\n\n return resolve(validate);\n } catch (error) {\n log.error('[validateGuid] try/catch %o', error);\n commit('SET_APP_ERROR_MESSAGE', error);\n commit('CHANGE_GUID_VALIDATION_RUNNING', false);\n return reject(new Error(error));\n }\n });\n },\n\n /**\n * @module LAUNCHPAD,UPC\n * This action does two POSTs and a GET\n * POST 1. Key Server w/ timestamp in seconds + guid\n * POST 2. After receiving successful response, we install key\n */\n async startTrial({ commit, dispatch, state }) {\n log.debug('[startTrial]');\n commit('SET_LOADING_STATE', 'Fetching trial…');\n window.addEventListener('beforeunload', preventClose);\n // open launchpad for loading state while getting and installing trial\n if (!state.isLaunchpadOpen) commit('SET_IS_LAUNCHPAD_OPEN', false);\n // POST 1. Key Server w/ timestamp + guid\n await KeyServer.startTrial({\n timestamp: Math.floor(new Date().getTime() / 1000), // timestamp in seconds,\n guid: state.guid,\n })\n .json()\n .then((trialRes) => {\n // POST 2. After receiving successful response, we install key\n // we have the trial details now. Save to server\n commit('SET_LOADING_STATE', 'Installing trial…');\n WebguiInstallKey\n .query({ url: trialRes.license })\n .get()\n .res((res) => {\n log.debug('[KeyServer.startTrial.WebguiInstallKey] SUCCESS %o', res);\n setTimeout(() => { // give more time for key install to finish\n commit('SET_LOADING_STATE', 'Verifying trial install…');\n\n // open unraid.net pop-up window to track trial conversions\n dispatch('openPopUp', state.trialWindow); // open tiny cookie setting window behind the scenes\n if (popUpWindow) popUpWindow.blur(); // go away from new pop-up window\n window.focus(); // re-focus the current webgui window\n\n setTimeout(() => { // give more time for key install to finish\n commit('SET_LOADING_STATE', 'Reloading webgui…');\n // open the plg promo after installing trial\n sessionStorage.setItem('showPromoPostTrialInstall', Date.now());\n commit('SET_PIRATE_KEY', false); // after a key install we know they're not pirating as the key came from us\n window.removeEventListener('beforeunload', preventClose);\n window.location.reload();\n }, 4000);\n }, 1500);\n })\n .catch((error) => {\n log.error(`[KeyServer.startTrial.WebguiInstallKey.catch] FAILED: ${trialRes}`, error);\n // eslint-disable-next-line no-unused-vars\n const [err, data] = SAFE_JSON_PARSE(error.message);\n commit('SET_APP_ERROR_MESSAGE', data ? (data.errorMessage ? data.errorMessage : data.error) : error);\n commit('SET_LOADING_STATE', false);\n });\n })\n .catch((error) => {\n log.error('[KeyServer.startTrial.catch] FAILED', error);\n // eslint-disable-next-line no-unused-vars\n const [err, data] = SAFE_JSON_PARSE(error.message);\n commit('SET_APP_ERROR_MESSAGE', data ? (data.errorMessage ? data.errorMessage : data.error) : error);\n commit('SET_LOADING_STATE', false);\n });\n },\n /**\n *\n */\n togglePromo({ commit, state }) {\n log.debug('[togglePromo]');\n // do we need to inject the promo before showing it?\n const wcName = 'unraid-promo';\n if (!document.getElementsByTagName(wcName).length) {\n const body = document.getElementsByTagName('body')[0];\n const lp = document.createElement(wcName);\n body.appendChild(lp);\n }\n commit('SET_IS_LAUNCHPAD_OPEN', false);\n commit('SET_IS_PROMO_OPEN', !state.isPromoOpen);\n },\n /**\n *\n */\n jumpToUpc({ commit }) {\n // scroll to top\n window.scrollTo({ top: 0, behavior: 'smooth' });\n // open the UPC\n commit('TRIGGER_UPC', true);\n // reset `state.triggerUPC` after Xms\n setTimeout(() => {\n commit('TRIGGER_UPC', false);\n }, 500);\n },\n async getWanIp({ commit, state }) {\n log.debug('[getWanIp]');\n if (state.wanip) return log.debug('[getWanIp] SKIPPED', state.wanip);\n try {\n return commit('SET_WANIP', await WanIp.get().text());\n } catch (error) {\n return log.error('[getWanIp] Unable to get WAN IP');\n }\n },\n /**\n * Executes an unraid-api command\n * @param {String} payload.command ex: 'start', 'stop'\n * @param {Array} payload.param1 ex: ['-v'],\n */\n async executeUnraidApi({ commit, state }, payload = { command: '', param1: null }) {\n log.debug('[executeUnraidApi]', payload);\n const { command, param1 } = payload;\n // Trigger front-end interactivty based on command\n if (command === 'start') commit('SET_MY_SERVERS_LOADING', true);\n const response = await WebguiUnraidApiCommand\n .formUrl({\n csrf_token: state.csrf,\n command,\n param1,\n })\n .post()\n .json((json) => {\n log.debug('👼 [executeUnraidApi] json %o', json);\n })\n .catch((error) => {\n log.error(`[executeUnraidApi] catch failed to execute unraid-api ${command} 😢 %o`, error);\n });\n return response;\n },\n\n /**\n * Improved way of listening and responding to post messages instead of handling manually\n * @see https://www.npmjs.com/package/post-robot\n */\n postRobotListeners({ commit, state, getters }) {\n log.debug('[postRobotListeners] listening', ACCOUNT_URL);\n\n postRobot.on(\n 'getServer',\n { window: state.popUpWindow },\n () => {\n log.debug('[postRobotListeners] getServer');\n return getters.server;\n },\n );\n\n postRobot.on(\n 'processStarted',\n { window: state.popUpWindow },\n (event) => {\n log.debug('[postRobotListeners] processStarted', event.data);\n\n const process = event.data && event.data.process ? event.data.process : null;\n\n try {\n log.debug('[postRobotListeners] processStarted');\n commit('SET_PROCESS_STARTED', process);\n } catch (error) {\n // eslint-disable-next-line no-alert\n alert('Error setting SET_PROCESS_STARTED');\n }\n },\n );\n\n // postRobot.on(\n // 'postRegister',\n // { window: state.popUpWindow },\n // () => {\n // log.debug('[postRobotListeners] postRegister');\n // // Registration finished, reset the value\n // if (state.processStarted) commit('SET_PROCESS_STARTED', false);\n // return getters.server;\n // },\n // );\n\n postRobot.on(\n 'postUnregister',\n { window: state.popUpWindow },\n async () => {\n log.debug('[postRobotListeners] postUnregister');\n commit('SET_PROCESS_STARTED', false);\n const response = await WebguiUpdate\n .formUrl({\n csrf_token: state.csrf,\n '#file': getters.myServersCfgPath,\n '#section': 'remote',\n apikey: '',\n avatar: '',\n email: '',\n username: '',\n wanaccess: 'no',\n ...(!state.hideMyServers && { '#command': '/plugins/dynamix.my.servers/scripts/.nginx_reload' }), // reloads nginx to disable remote access\n })\n .post()\n .res((res) => {\n log.debug('[receivePostMessage.signOutUnraidNet] WebguiUpdate.res %o', res);\n commit('SET_SIGN_OUT_TRIGGERED', true);\n })\n .catch(error => log.error(`[receivePostMessage.signOutUnraidNet] WebguiUpdate.catch Sign out ${state.servername} from Unraid.net failed 😢 %o`, error));\n return response;\n },\n );\n\n // postRobot.on(\n // 'handleRecoverLicense',\n // { window: state.popUpWindow },\n // () => {\n // log.debug('[postRobotListeners] handleRecoverLicense');\n // return getters.server;\n // },\n // );\n\n // postRobot.on(\n // 'handleReplaceLicense',\n // { window: state.popUpWindow },\n // () => {\n // log.debug('[postRobotListeners] handleReplaceLicense');\n // return getters.server;\n // },\n // );\n },\n\n /**\n * @name installPlugin\n * @param {String} plgType - 'dynamix.unraid.net.plg' or 'dynamix.unraid.net.staging.plg'\n */\n installPlugin({ commit }, payload = { plgType: '', update: false }) {\n try {\n const file = `https://sfo2.digitaloceanspaces.com/unraid-dl/unraid-api/${payload.plgType || 'dynamix.unraid.net.plg'}`;\n log.debug('[installPlugin] %s', file);\n if (!payload.update) {\n sessionStorage.setItem('clickedinstallPlugin', Date.now());\n commit('SET_IS_PROMO_OPEN', false);\n }\n // payload.update ? i18n.tc('upc.updatingMyServers') : i18n.tc('upc.installingMyServers'),\n const modalTitle = payload.update ? 'Updating Connect (beta)' : 'Installing Connect (beta)';\n // eslint-disable-next-line no-undef\n if (typeof openPlugin === 'function') { // `openPlugin` will be included in 6.10.4+ DefaultPageLayout\n log.debug('[installPlugin] using openPlugin %s', file);\n // eslint-disable-next-line no-undef\n openPlugin(\n `plugin ${payload.update ? 'update' : 'install'} ${file}`,\n modalTitle,\n '',\n 'refresh',\n );\n } else {\n log.debug('[installPlugin] using openBox %s', file);\n // `openBox()` is defined in the webgui's DefaultPageLayout.php and used when openPlugin is not available\n // eslint-disable-next-line no-undef\n openBox(\n `/plugins/dynamix.plugin.manager/scripts/plugin&arg1=install&arg2=${file}`,\n modalTitle,\n 600,\n 900,\n true,\n );\n }\n } catch (error) {\n log.error(error);\n }\n },\n\n fetchServers,\n serverStateFromApi,\n stopGraphqlClient,\n};\n","/**\n * Music enjoyed making this\n * 🎧 Childish Gambino - 3.15.20\n * 🎧 https://drain831.bandcamp.com/\n * 🎧 Glitterer - Looking Through the Shades\n * 🎧 The Menzingers - Hello Exile\n *\n * This code has been inspired by the 🐅 Tiger 🐅 👑 King 👑 aka Joe Exotic. Rawreow!\n (\"\\ '' /\").___..--' ' \"`-._\n `ಠ_ ಠ ) `-. ( ).`-.__.`)\n (_Y_.)' ._ ) `._ `. ``-..-'\n _..`--'_. .-_/ /--'_.' .'\n (i l).-' ' ((i). ' ((!.-'\n */\nimport Vue from 'vue';\nimport Vuex from 'vuex';\n\nimport { state } from './state';\nimport { getters } from './getters';\nimport { mutations } from './mutations';\nimport { actions } from './actions';\n\nVue.use(Vuex);\nVue.config.devtools = true;\n\nexport default new Vuex.Store({\n state,\n getters,\n mutations,\n actions,\n});\n","\n\n\n\n\n","import mod from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../node_modules/cache-loader/dist/cjs.js??ref--12-0!../node_modules/babel-loader/lib/index.js!../node_modules/cache-loader/dist/cjs.js??ref--0-0!../node_modules/vue-loader/lib/index.js??vue-loader-options!./App.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./App.vue?vue&type=template&id=462e42e4&\"\nimport script from \"./App.vue?vue&type=script&lang=js&\"\nexport * from \"./App.vue?vue&type=script&lang=js&\"\nimport style0 from \"./App.vue?vue&type=style&index=0&id=462e42e4&prod&lang=postcss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue';\nimport App from './App.vue';\n/* eslint-disable import/no-unassigned-import */\nimport './css/tailwind.css';\nimport './css/button.css';\nimport './css/form.css';\n\nVue.config.productionTip = false;\n\nnew Vue({\n render: h => h(App),\n}).$mount('#app');\n","const NODE_ENV = process.env.NODE_ENV || null;\nconst REGWIZ_URL = process.env.VUE_APP_REGWIZ_URL || null;\nconst PURCHASE_URL = process.env.VUE_APP_PURCHASE_URL || null;\nconst TRIAL_URL = PURCHASE_URL.replace('preflight', 'upc/start-trial');\nconst DEV_GRAPH_URL = process.env.VUE_APP_DEV_GRAPH_URL || null;\nconst ACCOUNT_URL = process.env.VUE_APP_ACCOUNT_URL || 'https://account.unraid.net';\n\nconst DEV_APIKEY = process.env.VUE_APP_DEV_APIKEY || null;\nconst MIN_API_VER = process.env.VUE_APP_MIN_API_VER || null;\nconst REC_API_VER = process.env.VUE_APP_REC_API_VER || null;\nconst MIN_OS_VER = process.env.VUE_APP_MIN_OS_VER || null;\nconst REC_OS_VER = process.env.VUE_APP_REC_OS_VER || null;\nconst UPC_VER = process.env.VUE_APP_VERSION || null;\n\nexport {\n NODE_ENV,\n REGWIZ_URL,\n PURCHASE_URL,\n TRIAL_URL,\n DEV_GRAPH_URL,\n ACCOUNT_URL,\n DEV_APIKEY,\n MIN_API_VER,\n REC_API_VER,\n MIN_OS_VER,\n REC_OS_VER,\n UPC_VER,\n};\n","import Vue from 'vue';\nimport VueI18n from 'vue-i18n';\n\nVue.use(VueI18n);\n\nconst defaultLocale = 'en_US';\n\nfunction loadLocaleMessages() {\n const locales = require.context(\n './locales',\n false, // we DO NOT want subdirectories to be included here when built for prod\n /[A-Za-z0-9-_,\\s]+\\.json$/i,\n );\n const messages = {};\n locales.keys().forEach((key) => {\n const matched = key.match(/([A-Za-z0-9-_]+)\\./i);\n if (matched && matched.length > 1) {\n const locale = matched[1];\n messages[locale] = locales(key);\n }\n });\n return messages;\n}\n\nexport default new VueI18n({\n locale: defaultLocale,\n fallbackLocale: defaultLocale,\n messages: loadLocaleMessages(),\n});\n","import { KeyServerWretch } from '../api';\n\n/**\n * @deprecated\n * @name KeyServer.signup\n * @param {object} formData\n * @param {string} formData.username\n * @param {string} formData.email\n * @param {string} formData.password\n * @param {string} formData.guid\n * @param {string} formData.keyfile\n * @param {string} formData.internalip\n * @param {string} formData.servername\n * @param {string} formData.newsletter\n * @param {string} formData.comments - honeypot\n * @returns {Promise} data response body\n */\nexport const signup = formData => KeyServerWretch\n .url('/ips/newaccount')\n .formUrl(formData)\n .post();\n\n/**\n * @deprecated\n * @name KeyServer.login\n * @param {string} url - '/ips/login' | '/account/license/recover' | '/account/license/replace';\n * @param {object} formData\n * @param {string} formData.email\n * @param {string} formData.password\n * @param {string} formData.guid\n * @param {string} formData.keyfile\n * @param {string} formData.internalip\n * @param {string} formData.servername\n * @param {string} formData.comments - honeypot\n * @returns {Promise} data response body\n */\nexport const login = (url, formData) => KeyServerWretch\n .url(url)\n .formUrl(formData)\n .post();\n\n/**\n * @deprecated\n * @name KeyServer.validate\n * @param {object} formData\n * @param {string} formData.apikey (provided from the Sign Up or Sign In response)\n * @param {string} formData.code\n * @returns {Promise} data response body\n */\nexport const validate = formData => KeyServerWretch\n .url('/ips/validate')\n .formUrl(formData)\n .post();\n\n/**\n * @name KeyServer.troubleshoot\n * @param {object} formData\n * @param {string} formData.email required\n * @param {string} formData.subject required\n * @param {string} formData.message required\n * @param {string} formData.guid optional – if passed it'll be appended to the email subject instead of date/time\n * @param {string} formData.comments HONEYPOT FIELD. Passing a non-empty value for 'comments' will trigger the honeypot, thus not send an email but won't return any errors.\n * @returns {Promise} data response body\n */\nexport const troubleshoot = formData => KeyServerWretch\n .url('/ips/troubleshoot')\n .formUrl(formData)\n .post();\n\n/**\n * @deprecated\n * @name KeyServer.signOut\n * @param {object} formData\n * @param {string} formData.keyfile\n * @returns {Promise} data response body\n *\n * @NOTE endpoint must stay as ending with unregister even though we changed terminology to sign out\n */\nexport const signOut = formData => KeyServerWretch\n .url('/account/server/unregister')\n .formUrl(formData)\n .post();\n\n/**\n * @name KeyServer.startTrial\n * @param {object} formData\n * @param {string} formData.guid\n * @returns {Promise} data response body\n */\nexport const startTrial = formData => KeyServerWretch\n .url('/account/trial')\n .formUrl(formData)\n .post();\n\n/**\n * @deprecated\n * @name KeyServer.update\n * @param {object} formData\n * @param {string} formData.username\n * @param {string} formData.email\n * @param {string} formData.password\n * @param {string} formData.guid\n * @param {string} formData.comments - honeypot\n * @returns {Promise} data response body\n */\nexport const update = formData => KeyServerWretch\n .url('/ips/updateaccount')\n .formUrl(formData)\n .post();\n\n/**\n * @deprecated\n * @name KeyServer.replaceKey\n * @param {object} formData\n * @param {string} formData.guid (should be the new GUID)\n * @param {string} formData.keyfile\n * @param {string} formData.email (key server will send new key to this email)\n * @returns {Promise} data response body\n * Success response – Success page will send key down for install\n * HTTP 200 - JSON response:\n * {\n * \"newkey\": \"base64(new keyfile contents)\"\n * }\n * Failure response\n * HTTP 400/403/406 - JSON response:\n * {\n * \"error\": \"reason why operation failed\"\n * }\n */\nexport const replaceKey = formData => KeyServerWretch\n .url('/account/license/transfer')\n .formUrl(formData)\n .post();\n","import {\n PURCHASE_URL,\n REGWIZ_URL,\n ACCOUNT_URL,\n} from './env';\n\n/**\n * CONSTS\n */\nconst GUID_NOT_RECEIVED = 'GUID_NOT_RECEIVED';\nconst CAN_POST_MESSAGE = !!(window.opener && window.opener !== window);\nconst WEBGUI_PARENT = CAN_POST_MESSAGE ? window.opener.parent : window.parent; // for postMessage event listeners and senders\nconst ALLOWED_ORIGINS = [\n PURCHASE_URL,\n REGWIZ_URL,\n ACCOUNT_URL,\n 'https://localhost:8008',\n 'https://launchpad.unraid.test:8081',\n 'https://launchpad.unraid.test:6969',\n 'https://registration.unraid.net',\n 'https://registration-dev.unraid.net',\n 'https://registration-dev-logs.unraid.net',\n 'https://unraid.net',\n 'https://staging.unraid.net',\n 'https://craft.unraid.test',\n];\n\nconst ERROR_MESSAGE_UNEXPECTED_OWNER_RESPONSE = 'API error unexpected response for \"owner\".';\n\n/**\n * @method: OPEN_POPUP\n * @description: Creates a pop-up window on demand\n * @param: {string} url - URL of window\n * @param: {string} name - name of window\n * @param: {number} w - width of window\n * @param: {number} h - height of window\n * @see: https://stackoverflow.com/a/16861050/3215809 let's not reinvent the wheel\n */\nconst OPEN_POPUP = (url, name, w, h) => {\n const dualScreenLeft = window.screenLeft !== undefined ? window.screenLeft : window.screenX;\n const dualScreenTop = window.screenTop !== undefined ? window.screenTop : window.screenY;\n /* eslint-disable */\n const width = window.innerWidth ? window.innerWidth : (document.documentElement.clientWidth ? document.documentElement.clientWidth : window.screen.width);\n const height = window.innerHeight ? window.innerHeight : (document.documentElement.clientHeight ? document.documentElement.clientHeight : window.screen.height);\n /* eslint-enable */\n const systemZoom = width / window.screen.availWidth > 1 ? width / window.screen.availWidth : 1; // min set to 1 as it fixed window sizes being huge\n const left = (width - w) / 2 / systemZoom + dualScreenLeft;\n const top = (height - h) / 2 / systemZoom + dualScreenTop;\n // make it easier. Auto flatten into the correct string format: '{key}={value},{key}={value},…'\n const args = Object.entries({\n toolbar: 'no',\n location: 'yes',\n status: 'no',\n menubar: 'no',\n scrollbars: 'yes',\n resizable: 'yes',\n width: (w / systemZoom),\n height: (h / systemZoom),\n top,\n left,\n })/* eslint-disable */\n .reduce((a, b) => a += `${b[0]}=${b[1]},`, '');\n /* eslint-enable */\n\n return window.open(\n url,\n name,\n args,\n );\n};\n\n/* eslint-disable */\nconst REMOVE_EMPTY = (obj) => {\n Object.entries(obj).forEach(([key, val]) =>\n (val && typeof val === 'object') && REMOVE_EMPTY(val) ||\n (val === null || val === \"\") && delete obj[key]\n );\n return obj;\n};\n/* eslint-enable */\n/**\n * @name SAFE_JSON_PARSE\n * @param {string} str\n * @example\nconst [err, data] = SAFE_JSON_PARSE(e.data);\nif (err) return;\nswitch (data)\n…\n */\nconst SAFE_JSON_PARSE = (str) => {\n try {\n return [null, JSON.parse(str)];\n } catch (err) {\n return [err];\n }\n};\n/**\n * @name OBJ_TO_STR\n * @param {object} obj\n * @returns {String}\n * @description Output key + value for each item in the object. Adds new line after each item.\n */\nconst OBJ_TO_STR = obj => Object.entries(obj).reduce((str, [p, val]) => `${str}${p}: ${val}\\n`, '');\n\nconst X_ENV_KEY = 'x-env-unraid-api';\n\nconst ERROR_CORS_403 = 'The CORS policy for this site does not allow access from the specified Origin';\n\nexport {\n GUID_NOT_RECEIVED,\n CAN_POST_MESSAGE,\n WEBGUI_PARENT,\n ALLOWED_ORIGINS,\n ERROR_MESSAGE_UNEXPECTED_OWNER_RESPONSE,\n OPEN_POPUP,\n REMOVE_EMPTY,\n SAFE_JSON_PARSE,\n OBJ_TO_STR,\n X_ENV_KEY,\n ERROR_CORS_403,\n};\n"],"sourceRoot":""}