\r\n *
\r\n *
\r\n * \r\n * ...more frames where the (page) id should match the 'tab-id' of the radio button in a list item.\r\n *
\r\n *
\r\n * \r\n * Depends on the core and event-broadcaster class.\r\n */\r\nclass tabstrip {\r\n\r\n // #region: Constructor **********************************************************************/\r\n /**\r\n * The constructor does work that needs to be executed exactly once.\r\n */\r\n constructor(defaultTab, callback) {\r\n\r\n // A callback can be provided that is called on tab click.\r\n this.callback = callback;\r\n\r\n // Is selecting a new tab active.\r\n this.isSwitchingTab = false;\r\n\r\n // All tabs present in this tabstrip.\r\n this.tabs = [...document.querySelectorAll(\".tabstrip input[name=tabs]\")];\r\n\r\n // Add the events to the tabstrip instance.\r\n this.tabs.forEach((tab) => {\r\n // Add the click event on the radio (tab) to (re)load the url.\r\n // We use 'click' as the 'change' event will not fire when we set the selected radio to checked from script.\r\n // We can however reliably fire the click event.\r\n tab.addEventListener(\"click\", (e) => {\r\n if (this.callback && !this.callback(e, tab)) {\r\n return false;\r\n }\r\n \r\n // Select active tab.\r\n this.handleTabChange(tab.id);\r\n }, { capture: false });\r\n });\r\n\r\n // React to url change.\r\n top.window.addEventListener(\"popstate\", () => {\r\n var urlTab = isEmbed ? core.getEmbedUrl().searchParams.get(\"tab\") : core.getQueryParameter(\"tab\");\r\n\r\n this.selectTab(urlTab || defaultTab);\r\n });\r\n\r\n // Set initial tab.\r\n this.selectTab(core.getQueryParameter(\"tab\", window) || defaultTab);\r\n }\r\n // #endregion ********************************************************************************/\r\n\r\n // #region: Build ****************************************************************************/\r\n /**\r\n * Identifies class.\r\n * @returns {string} The string representation of this class.\r\n */\r\n toString() {\r\n return \"[tabstrip]\";\r\n }\r\n\r\n static toString() {\r\n return \"[tabstrip]\";\r\n }\r\n\r\n /** \r\n * Identifies the version.\r\n * @returns {string} The version number of this class.\r\n */\r\n static version() {\r\n return \"1.0.0\";\r\n }\r\n // #endregion ********************************************************************************/\r\n\r\n // #region: Public Methods *******************************************************************/\r\n /**\r\n * Enables all tabs.\r\n */\r\n enableAllTabs() {\r\n this.tabs.forEach((tab) => {\r\n tab.removeAttribute(\"disabled\");\r\n });\r\n }\r\n\r\n /**\r\n * Get the active tab.\r\n * @returns The currently active tab or the first in the list.\r\n */\r\n getActiveTab() {\r\n return document.querySelector(\".frames > iframe.active\") ?? this.tabs[0];\r\n }\r\n\r\n /**\r\n * Performs the action needed to switch tabs.\r\n * @param {String} newTabId The id for the new tab selected.\r\n */\r\n handleTabChange(newTabId) {\r\n const activeTab = this.getActiveTab();\r\n\r\n const url = document.querySelector(`#${newTabId}`).dataset.page;\r\n const iframe = document.querySelector(`#${newTabId}-page`);\r\n\r\n // So no tab is active at all.\r\n activeTab.classList.remove(\"active\");\r\n\r\n // Make this tab active.\r\n iframe.classList.add(\"active\");\r\n document.querySelector(`#${newTabId}`).checked = true;\r\n\r\n // Set new URL if needed.\r\n if (!iframe.contentWindow?.location.href.includes(url)) {\r\n var loadHandler = function () {\r\n eventBroadcaster.broadcast({ detail: { show: false }, message: broadcasts.LOCK_SCREEN });\r\n \r\n this.switchTabUrl(top.window, newTabId, iframe);\r\n this.isSwitchingTab = false;\r\n\r\n iframe.removeEventListener(\"load\", loadHandler);\r\n }.bind(this);\r\n\r\n iframe.addEventListener(\"load\", loadHandler, { capture: false });\r\n\r\n eventBroadcaster.broadcast({ detail: { show: true }, message: broadcasts.LOCK_SCREEN });\r\n iframe.src = baseUrl + url;\r\n }\r\n else {\r\n this.switchTabUrl(top.window, newTabId, iframe);\r\n this.isSwitchingTab = false;\r\n }\r\n }\r\n\r\n /**\r\n * In some cases the current tab may need to be reloaded.\r\n */\r\n reloadActiveTab() {\r\n const currentTab = document.querySelector(\"iframe.active\");\r\n\r\n currentTab.addEventListener(\"load\", function handler() {\r\n eventBroadcaster.broadcast({ detail: { show: false }, message: broadcasts.LOCK_SCREEN });\r\n this.removeEventListener(\"load\", handler);\r\n }, { capture: false });\r\n\r\n eventBroadcaster.broadcast({ detail: { show: true }, message: broadcasts.LOCK_SCREEN });\r\n currentTab.contentWindow.location.reload(true);\r\n }\r\n\r\n /**\r\n * Changing/saving any of the content in any of the tabs (might) need a reload to reflect the change.\r\n * @@param {String} tabId The id of the tab to reload.\r\n */\r\n reloadTab(tabId) {\r\n document.querySelector(`#${tabId}-page`)?.contentWindow.location.reload(true);\r\n }\r\n\r\n /**\r\n * Changing/saving any of the content in any of the tabs (might) need a reload to reflect the change.\r\n */\r\n reloadTabs() {\r\n [...document.querySelectorAll(\"iframe:not(.active)\")].forEach((frame) => {\r\n if (frame.src) {\r\n frame.contentWindow.location.reload(true);\r\n }\r\n });\r\n }\r\n\r\n /**\r\n * Performs the action needed to undo the switching of the tabs, make the original tab button active again.\r\n * @param {String} newtab The id for the new tab selected.\r\n */\r\n resetTabChange(newTab) {\r\n document.querySelector(`#${this.getActiveTab().id.replace(\"-page\", \"\")}`).checked = true;\r\n newTab.checked = false;\r\n }\r\n\r\n /**\r\n * Select the tab (by its id).\r\n * Also called form the outside (on push state change?).\r\n * @@param {Integer} id The tab to show.\r\n */\r\n selectTab(id) {\r\n if (!id) {\r\n return;\r\n }\r\n\r\n const tab = document.querySelector(\"#\" + id);\r\n\r\n if (tab && !tab.checked) {\r\n this.isSwitchingTab = true;\r\n\r\n tab.disabled = false;\r\n tab.click();\r\n }\r\n }\r\n\r\n /**\r\n * Update tab info om the document and browsing history.\r\n * @param {Window} mainWindow The window reference to use.\r\n * @param {String} id The identifier for the tab to select.\r\n * @param {HTMLIFrameElement} iframe The active selected iFrame.\r\n */\r\n switchTabUrl(mainWindow, id, iframe) {\r\n const newTabUrl = core.setQueryParameter(window.location.href, \"tab\", id);\r\n\r\n // Using replaceState to fix history navigation to specific tab.\r\n window.history.replaceState({ path: newTabUrl }, null, newTabUrl);\r\n\r\n if (!this.isSwitchingTab) {\r\n // Using pushState as a tabstrip is nested iFrames in a main iFrame.\r\n // Because of the nesting there is no history entry created in the parent page.\r\n if (isEmbed) {\r\n const embedUrl = core.removeQueryParameter(newTabUrl, \"embed\");\r\n core.setEmbedUrl(embedUrl, true);\r\n } else {\r\n const newUrl = core.setQueryParameter(mainWindow.location.href, \"tab\", id);\r\n mainWindow.history.pushState({ path: newTabUrl }, null, newUrl);\r\n }\r\n }\r\n\r\n topWindow.document.title = resources.consoleTitle.replace(\"{Page}\", `: ${iframe.contentWindow.document.title}`);\r\n }\r\n // #endregion ********************************************************************************/\r\n\r\n};\r\n// #endregion ************************************************************************************/"],"mappings":"AAIAA,OAAOC,aAAe,IAAI,MAMtB,WAAAC,GAEIC,EAAEC,eAAc,SAAUC,QAASC,gBAAiBC,KAChD,MAAMC,iBAAmBL,EAAE,qCAAqCM,MAChE,GAAID,kBAAoBA,mBAAqB,GAAI,CAC7CD,IAAIG,iBAAiBC,kBAAmBH,iBAC5C,CACJ,IAEAL,EAAES,UAAU,CACRC,MAAO,QAGXC,KAAKC,cAAgB,CACjBC,KAAM,EACNC,SAAU,EACVC,SAAU,EACVC,OAAQ,EACRC,SAAU,EACVC,WAAY,EACZC,YAAa,EACbC,QAAS,EACTC,QAAS,IAGbV,KAAKW,oBAAsB,CACvBC,cAAe,OACfC,eAAgB,SAGpB,IAAIC,eAAiBC,OAAOC,UAAUC,YACtC,IAAIC,6BAA+B,MAGnC,IAAIC,cAAmBC,MAAMC,GAAGC,OAChCH,aAAaI,gBAAgBhC,QAAQiC,MAAQ,KAC7CL,aAAaM,gBAAgBlC,QAAQiC,MAAQ,MAE7CJ,MAAMC,GAAGC,OAAOI,GAAGnC,QAAQoC,aAAe,CACtCC,KAAM,KACNC,IAAK,KACLC,gBAAiB,MAGrBV,MAAMC,GAAGU,eAAeL,GAAGnC,QAAQyC,WAAa,KAChDZ,MAAMC,GAAGY,WAAWP,GAAGnC,QAAQyC,WAAa,KAE5C,UAAWE,UAAUC,yBAA2B,YAAa,CACzDf,MAAMC,GAAGU,eAAeL,GAAGnC,QAAQ6C,SAAWF,UAAUC,uBACxDf,MAAMC,GAAGgB,WAAWX,GAAGnC,QAAQ6C,SAAWF,UAAUC,uBACpDf,MAA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