1"use strict";(self.webpackChunkui_apps=self.webpackChunkui_apps||[]).push([[4325],{4325(__unused_webpack_module,__webpack_exports__,__webpack_require__){eval("{// ESM COMPAT FLAG\n__webpack_require__.r(__webpack_exports__);\n\n// EXPORTS\n__webpack_require__.d(__webpack_exports__, {\n activateTabIndicator: () => (/* binding */ activateTabIndicator),\n \"default\": () => (/* binding */ TabsRedesign),\n updateActiveIndicator: () => (/* binding */ updateActiveIndicator)\n});\n\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/toConsumableArray.js + 2 modules\nvar toConsumableArray = __webpack_require__(436);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/classCallCheck.js\nvar classCallCheck = __webpack_require__(3029);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/createClass.js\nvar createClass = __webpack_require__(2901);\n// EXTERNAL MODULE: ./node_modules/@babel/runtime/helpers/esm/defineProperty.js\nvar defineProperty = __webpack_require__(4467);\n// EXTERNAL MODULE: ../../core/ui.apps/src/main/content/jcr_root/apps/wd-core/components/datalayer/datalayer.js\nvar datalayer = __webpack_require__(5564);\n;// ./src/main/content/jcr_root/apps/atlas/components/content/redesign/tabs/tabs_analytics.ts\n/**\n * Adobe Analytics (AA) / Customer Journey Analytics (CJA) tracking for Tabs Redesign\n * tab-selection interactions.\n *\n * Fires a `linkInteraction` event when the active tab changes within the Tabs component.\n * Re-clicking the already-active tab does **not** fire a beacon; the guard lives in\n * `tabs.ts` {@link activate}, which calls {@link trackTabSelection} only when `index`\n * differs from the current `activeIndex`.\n *\n * ## Payload\n * | Field | Value |\n * |-------|--------|\n * | `eVar12` / `pageInfo.launchRule` | `Tab Component : Tab Selection` |\n * | `eVar59` / `webInteraction.name` / `linkInfo.linkName` | `Tab Component : {Tab Name}` |\n * | `event79` | `1` |\n *\n * Tab name is read exclusively from `.rd-tabs__bar-item-title` so that any icon SVG\n * sibling elements are excluded from the captured text, per requirements.\n *\n * @see tabs.ts â click handling, tab activation, and the same-index guard.\n * @see tabs.html â tab markup including `.rd-tabs__bar-item-title` and optional icon.\n * @module tabs_analytics\n *//** Title-only container inside each tab â excludes icon SVGs. */var TAB_TITLE_SELECTOR='.rd-tabs__bar-item-title';/** eVar12 (AA) and launchRule (CJA) value for tab selection events. */var RULE_NAME='Tab Component : Tab Selection';/**\n * Extracts the visible text label from a tab trigger, ignoring any icon elements.\n *\n * Text is sourced exclusively from `.rd-tabs__bar-item-title` so SVG icons present\n * beside or above the tab text are not included in the captured name.\n *\n * @param tab - A `.rd-tabs__bar-item` element.\n * @returns The trimmed tab title, or an empty string if none is found.\n */function getTabName(tab){var _tab$querySelector$te,_tab$querySelector;return(_tab$querySelector$te=(_tab$querySelector=tab.querySelector(TAB_TITLE_SELECTOR))===null||_tab$querySelector===void 0||(_tab$querySelector=_tab$querySelector.textContent)===null||_tab$querySelector===void 0?void 0:_tab$querySelector.replace(/\\s+/g,' ').trim())!==null&&_tab$querySelector$te!==void 0?_tab$querySelector$te:'';}/**\n * Sends the `linkInteraction` analytics beacon for a tab-selection change.\n *\n * Called by `tabs.ts` {@link activate} only when the incoming index differs from the\n * current `activeIndex`, so re-clicking the already-active tab never inflates counts.\n *\n * @param tab - The `.rd-tabs__bar-item` that was just activated.\n */function trackTabSelection(tab){var tabName=getTabName(tab);if(!tabName){return;}var linkName=\"Tab Component : \".concat(tabName);(0,datalayer/* trackAdobeEvent */.F0)('linkInteraction',{eVars:{eVar12:RULE_NAME,eVar59:linkName},events:{event1to100:{event79:{value:1}}},webInteraction:{name:linkName,url:window.location.href},pageInfo:{launchRule:RULE_NAME},linkInfo:{linkName:linkName}});}\n;// ./src/main/content/jcr_root/apps/atlas/components/content/redesign/tabs/tabs.ts\nfunction _createForOfIteratorHelper(r,e){var t=\"undefined\"!=typeof Symbol&&r[Symbol.iterator]||r[\"@@iterator\"];if(!t){if(Array.isArray(r)||(t=_unsupportedIterableToArray(r))||e&&r&&\"number\"==typeof r.length){t&&(r=t);var _n=0,F=function F(){};return{s:F,n:function n(){return _n>=r.length?{done:!0}:{done:!1,value:r[_n++]};},e:function e(r){throw r;},f:F};}throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\");}var o,a=!0,u=!1;return{s:function s(){t=t.call(r);},n:function n(){var r=t.next();return a=r.done,r;},e:function e(r){u=!0,o=r;},f:function f(){try{a||null==t[\"return\"]||t[\"return\"]();}finally{if(u)throw o;}}};}
1function _unsupportedIterableToArray(r,a){if(r){if(\"string\"==typeof r)return _arrayLikeToArray(r,a);var t={}.toString.call(r).slice(8,-1);return\"Object\"===t&&r.constructor&&(t=r.constructor.name),\"Map\"===t||\"Set\"===t?Array.from(r):\"Arguments\"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(r,a):void 0;}}function _arrayLikeToArray(r,a){(null==a||a>r.length)&&(a=r.length);for(var e=0,n=Array(a);e<a;e++)n[e]=r[e];return n;}/**\n * Publish entry point for the Tabs Redesign component.\n *\n * Loaded lazily by the Workday component loader when `.cmp-rd-tabs` nodes exist\n * (`clientlibs/common/publish/src/js/app.js` â `cmp-rd-tabs` â this module).\n * The loader constructs `new TabsRedesign()` and calls {@link TabsRedesign.run}\n * once per initialization batch.\n *\n * ## Responsibilities (this module)\n * - **Click** â activate the tab whose `[role=\"tab\"]` was clicked; no-ops on the already-active tab.\n * In above-content mode, also scrolls the page up to `.rd-tabs__panels` when the user has\n * scrolled past the panel stack.\n * - **Keyboard** â roving `tabindex` on the tab bar (`ArrowLeft` / `ArrowRight` /\n * `Home` / `End`), per the [WAI-ARIA Tabs pattern](https://www.w3.org/WAI/ARIA/apg/patterns/tabs/).\n * - **Uniform width** â when the tab bar uses the uniform-width modifier, sets every\n * `.rd-tabs__bar-item` to the width of the widest item (see {@link equalizeUniformTabWidths}).\n * - **Overflow navigation** â when tab items exceed the bar width, shows prev/next chevrons and\n * edge gradients. Prev/next activate the adjacent tab (same smooth {@link activateTabIndicator}\n * path as keyboard arrows). On selection, scrolls the active tab into view.\n * - **Analytics** â when a tab change occurs, {@link activate} calls {@link trackTabSelection}\n * to fire a `linkInteraction` beacon with `eVar12` / `launchRule` set to\n * `'Tab Component : Tab Selection'` and `eVar59` / `linkName` set to `'Tab Component : {Tab Name}'`.\n * Re-clicking the already-active tab is a no-op and does not produce a beacon.\n *\n * ## Out of scope\n * Title-width and full-width layout are CSS-only (`tabs.css`). Theming and tab position\n * are owned by `tabs.html` and `tabs.css`.\n * Authoring defaults (first tab active) are set server-side in HTL; this script\n * only syncs runtime state after user interaction.\n *\n * ## DOM contract\n * Each root `.cmp-rd-tabs` must contain:\n * - `.rd-tabs__wrapper` â sticky wrapper around the tab bar (above-content scroll offset).\n * - `.rd-tabs__bar` â outer pill; hosts overflow nav buttons and edge fades.\n * - `.rd-tabs__scroll` â `[role=\"tablist\"]` (keydown listener is attached here).\n * - `.rd-tabs__bar-item` â `[role=\"tab\"]` elements, same order as panels.\n * - `.rd-tabs__bar-item-title` â text-only title inside each tab (excludes icon SVGs).\n * - `.rd-tabs__panels` â panel stack container (above-content scroll target).\n * - `.rd-tabs__panel-item` â `[role=\"tabpanel\"]` elements, index-aligned with tabs.\n * - `--tabs-indicator-*` CSS variables on `.rd-tabs__scroll` â sliding active pill (`.rd-tabs__indicator`).\n *\n * @see tabs.html â markup, initial `--active` modifiers / `aria-*` attributes.\n * @see tabs.css â visual active/hover/focus styles for BEM `--active` modifiers.\n * @see tabs_analytics.ts â `linkInteraction` beacon fired on tab click.\n * @module tabs\n */;/** Root wrapper rendered by `tabs.html` (`class=\"cmp-rd-tabs\"`). */var ROOT_SELECTOR='.cmp-rd-tabs';/**\n * Converts a string to a URL-safe slug for tab-title matching.\n *\n * Trims whitespace, lowercases, collapses whitespace runs to `-`, and strips\n * any character that is not alphanumeric or `-`. This lets a URL param value\n * of `\"talent-management\"` match a tab titled `\"Talent Management\"`, and also\n * tolerates URL-encoded spaces (`\"Talent%20Management\"` â `\"talent-management\"`).\n *\n * @param text - Raw string to slugify.\n */function toUrlSlug(text){return text.trim().toLowerCase().replace(/\\s+/g,'-').replace(/[^a-z0-9-]/g,'');}/**\n * BEM modifier for the selected tab (`.rd-tabs__bar-item`).\n * Must stay in sync with HTL (`itemList.first`) and `tabs.css` selectors.\n */var CLASS_TAB_ACTIVE='rd-tabs__bar-item--active';/**\n * BEM modifier for the visible tab panel (`.rd-tabs__panel-item`).\n * Must stay in sync with HTL and `tabs.css` (`display` toggle).\n */var CLASS_PANEL_ACTIVE='rd-tabs__panel-item--active';/** Matches redesign `@variant desktop` / `--breakpoint-desktop` (1024px). */var DESKTOP_MEDIA_QUERY='(min-width: 1024px)';/** Mobile uniform-width modifier from the authoring dialog. */var CLASS_BAR_UNIFORM_WIDTH='rd-tabs__bar--uniform-width';/** Desktop uniform-width modifier from the authoring dialog. */var CLASS_BAR_UNIFORM_WIDTH_DESKTOP='desktop:rd-tabs__bar--uniform-width';/** Mobile tabs-above-content position from the authoring dialog (on `.cmp-rd-tabs`). */var CLASS_TABS_ABOVE_CONTENT='rd-tabs__bar--above-content';/** Desktop tabs-above-content position from the authoring dialog (on `.cmp-rd-tabs`). */var CLASS_TABS_ABOVE_CONTENT_DESKTOP='desktop:rd-tabs__bar--above-content';/** Bar can scroll content toward the start (left). */var CLASS_BAR_CAN_SCROLL_START='rd-tabs__bar--can-scroll-start';/** Bar can scroll content toward the end (right). */var CLASS_BAR_CAN_SCROLL_END='rd-tabs__bar--can-scroll-end';/** Sub-pixel tolerance when comparing tab bounds to the scroll viewport. */var SCROLL_EDGE_THRESHOLD=2;/**\n * Clears inline width overrides applied by {@link equalizeUniformTabWidths}.\n *\n * @param tabs - Tab trigger elements in the tablist.\n */function clearUniformTabWidths(tabs){tabs.forEac
1h(function(tab){tab.style.removeProperty('width');});}/**\n * Sets every tab item to the width of the widest item (uniform-width mode).\n *\n * @param tabs - Tab trigger elements in the tablist.\n */function equalizeUniformTabWidths(tabs){tabs.forEach(function(tab){tab.style.removeProperty('width');});var maxWidth=tabs.reduce(function(max,tab){var _tab$getBoundingClien=tab.getBoundingClientRect(),width=_tab$getBoundingClien.width;return Math.max(max,Math.ceil(width));},0);if(maxWidth<=0){return;}var widthPx=\"\".concat(maxWidth,\"px\");tabs.forEach(function(tab){tab.style.width=widthPx;});}/**\n * Returns whether the tab bar is in uniform-width mode for the current viewport.\n *\n * @param tabBar - The tablist element carrying width modifier classes.\n * @param isDesktopViewport - Whether the desktop breakpoint is active.\n */function isUniformWidthMode(tabBar,isDesktopViewport){return isDesktopViewport?tabBar.classList.contains(CLASS_BAR_UNIFORM_WIDTH_DESKTOP):tabBar.classList.contains(CLASS_BAR_UNIFORM_WIDTH);}/**\n * Returns whether the tab bar is positioned above its panels for the current viewport.\n *\n * Position modifiers are authored on `.cmp-rd-tabs`, not on `.rd-tabs__bar`.\n *\n * @param root - Component root (`.cmp-rd-tabs`).\n * @param isDesktopViewport - Whether the desktop breakpoint is active.\n */function isAboveContentPosition(root,isDesktopViewport){return isDesktopViewport?root.classList.contains(CLASS_TABS_ABOVE_CONTENT_DESKTOP):root.classList.contains(CLASS_TABS_ABOVE_CONTENT);}/**\n * Given the current tab index and tab count, returns the next index for a navigation key.\n *\n * @param current - Zero-based index of the currently selected tab.\n * @param count - Total number of tabs in the group.\n * @returns The target tab index (always within `[0, count - 1]` when `count > 0`).\n *//**\n * Maps keyboard keys to tab-index resolvers for the tablist.\n *\n * Navigation wraps at the ends for arrow keys (`% count`). `Home` / `End` jump to\n * the first and last tab respectively. Unlisted keys are ignored in {@link TabGroup.onKeyDown}.\n */var TAB_INDEX_BY_KEY={ArrowRight:function ArrowRight(i,n){return(i+1)%n;},ArrowLeft:function ArrowLeft(i,n){return(i-1+n)%n;},Home:function Home(){return 0;},End:function End(_,n){return n-1;}};/**\n * Applies selection state to a single tab: CSS class, `aria-selected`, and roving `tabindex`.\n *\n * Active tabs use `tabindex=\"0\"`; inactive tabs use `tabindex=\"-1\"` so focus moves\n * only via click or arrow-key navigation on the tablist.\n *\n * @param tab - A `.rd-tabs__bar-item` element with `role=\"tab\"`.\n * @param selected - Whether this tab is the selected tab in the group.\n */function setTabSelected(tab,selected){tab.classList.toggle(CLASS_TAB_ACTIVE,selected);tab.setAttribute('aria-selected',String(selected));tab.setAttribute('tabindex',selected?'0':'-1');}/**\n * Visible tab area inside `.rd-tabs__scroll`, inset when prev/next nav buttons overlay the track.\n *\n * @param scrollTrack - Horizontally scrollable tablist.\n */function getScrollViewportRect(scrollTrack){var trackRect=scrollTrack.getBoundingClientRect();var left=trackRect.left;var right=trackRect.right;var tabBar=scrollTrack.closest('.rd-tabs__bar');if(!tabBar){return trackRect;}var prevBtn=tabBar.querySelector('.rd-tabs__nav--prev');var nextBtn=tabBar.querySelector('.rd-tabs__nav--next');if(prevBtn&&!prevBtn.hidden){left=Math.max(left,prevBtn.getBoundingClientRect().right);}if(nextBtn&&!nextBtn.hidden){right=Math.min(right,nextBtn.getBoundingClientRect().left);}return new DOMRect(left,trackRect.top,Math.max(0,right-left),trackRect.height);}/** Duration of the JS-driven scroll + indicator animation (ms). */var INDICATOR_ANIMATION_MS=420;/** Monotonic token so a newer activation cancels any in-flight indicator animation. */var indicatorRunSeq=0;/** Clamp a scroll offset into the valid `[min, max]` range. */function clampScroll(value,min,max){return Math.max(min,Math.min(value,max));}/** Read a numeric px value from an inline CSS custom property (0 when unset). */function readIndicatorVar(scrollTrack,name){return parseFloat(scrollTrack.style.getPropertyValue(name))||0;}/** easeInOutCubic â matches the feel of the CSS indicator transition. */function easeInOutCubic(t){return t<0.5?4*t*t*t:1-Math.pow(-2*t+2,3)/2;}/** Whether the user has requested reduced motion. */function prefersReducedMotion(){return window.matchMedia('(prefers-reduced-motion: reduce)').matches;}/**\n * Computes the target `scrollLeft` that brings the active tab fully into view.\n *\n * Centers the active tab within the visible scroll viewport. The first tab scrolls to\n * the start edge and the last tab to the end edge so neither terminal tab is clipped.\n *\n * @param scrollTrack - Horizontally scrollable tablist.\n * @param activeTab - Tab that was just activated.\n * @param tabs - All tab triggers in document order.\n * @param activeIndex - Index of the activated tab.\n */function getActivateScrollTarget(scrollTrack,activeTab,tabs,activeIndex){var maxScroll=Math.max(0,scrollTrack.scrollWidth-scrollTrack.clientWidth);if(activeIndex<=0){return 0;}if(activeIndex===tabs.length-1){return maxScroll;}var viewport=getScrollViewportRect(scrollTrack);var tabRect=activeTab.getBoundingClientRect();var delta=tabRect.left+tabRect.width/2-(viewport.left+viewport.width/2);return clampScroll(scrollTrack.scrollLeft+delta,0,maxScroll);}// Scrolls the active tab into view and moves the sliding indicator. When a scroll is\n// needed, one rAF loop drives scrollLeft and the indicator from a shared easing curve so\n// they stay in lockstep (no CSS-transition vs native-scroll desync). No scroll needed â\n// plain transitioned
1slide; animate=false or reduced motion â instant snap.\nfunction activateTabIndicator(scrollTrack,activeTab,tabs,activeIndex){var animate=arguments.length>4&&arguments[4]!==undefined?arguments[4]:true;var onSettle=arguments.length>5?arguments[5]:undefined;var end=getTabOffsetInScrollTrack(scrollTrack,activeTab);var target=getActivateScrollTarget(scrollTrack,activeTab,tabs,activeIndex);var startScroll=scrollTrack.scrollLeft;var scrollDelta=target-startScroll;// Claim this run; any older in-flight animation becomes stale and self-cancels.\nvar runId=String(++indicatorRunSeq);scrollTrack.dataset.indicatorRun=runId;var isStale=function isStale(){return scrollTrack.dataset.indicatorRun!==runId;};var settle=function settle(){return onSettle===null||onSettle===void 0?void 0:onSettle();};var INSTANT='rd-tabs__scroll--indicator-instant';var needsScroll=Math.abs(scrollDelta)>SCROLL_EDGE_THRESHOLD;// First paint / resize / reduced motion: snap indicator and scroll with no animation.\nif(!animate||prefersReducedMotion()){scrollTrack.classList.add(INSTANT);updateActiveIndicator(scrollTrack,activeTab);void scrollTrack.offsetWidth;scrollTrack.classList.remove(INSTANT);if(needsScroll){var prevBehavior=scrollTrack.style.scrollBehavior;scrollTrack.style.scrollBehavior='auto';scrollTrack.scrollLeft=target;scrollTrack.style.scrollBehavior=prevBehavior;}settle();return;}// Target already visible: plain transitioned slide, no scroll needed.\nif(!needsScroll){scrollTrack.classList.remove(INSTANT);updateActiveIndicator(scrollTrack,activeTab);settle();return;}// Animate scrollLeft and the indicator together from one easing curve (see above).\nvar startX=readIndicatorVar(scrollTrack,'--tabs-indicator-x');var startWidth=readIndicatorVar(scrollTrack,'--tabs-indicator-width');var startHeight=readIndicatorVar(scrollTrack,'--tabs-indicator-height');scrollTrack.classList.add(INSTANT);scrollTrack.style.setProperty('--tabs-indicator-radius',getComputedStyle(activeTab).borderRadius);// Disable native smooth-scroll so it can't run a second, unsynchronized animation.\nscrollTrack.style.scrollBehavior='auto';var applyProgress=function applyProgress(eased){scrollTrack.scrollLeft=startScroll+scrollDelta*eased;scrollTrack.style.setProperty('--tabs-indicator-x',\"\".concat(startX+(end.x-startX)*eased,\"px\"));scrollTrack.style.setProperty('--tabs-indicator-width',\"\".concat(startWidth+(end.width-startWidth)*eased,\"px\"));scrollTrack.style.setProperty('--tabs-indicator-height',\"\".concat(startHeight+(end.height-startHeight)*eased,\"px\"));};var rafId=0;var startTime=performance.now();var cleanup=function cleanup(){cancelAnimationFrame(rafId);scrollTrack.style.scrollBehavior='';};var _step=function step(now){if(isStale()){cancelAnimationFrame(rafId);// a newer run owns the scroll track\nreturn;}var t=clampScroll((now-startTime)/INDICATOR_ANIMATION_MS,0,1);applyProgress(easeInOutCubic(t));if(t<1){rafId=requestAnimationFrame(_step);return;}cleanup();updateActiveIndicator(scrollTrack,activeTab);void scrollTrack.offsetWidth;scrollTrack.classList.remove(INSTANT);settle();};rafId=requestAnimationFrame(_step);}/**\n * Whether tab labels are clipped on each edge of the scroll viewport.\n *\n * Uses first/last tab bounds instead of `scrollWidth` / `scrollLeft`, which are often\n * inflated by padding, flex gap, or sub-pixel layout and leave arrows/fades visible\n * when nothing is scrollable in that direction.\n *\n * @param scrollTrack - Horizontally scrollable tablist.\n * @param tabs - Tab triggers in document order.\n */function getScrollEdges(scrollTrack,tabs){if(tabs.length===0){return{canScrollStart:false,canScrollEnd:false};}var trackRect=scrollTrack.getBoundingClientRect();var firstRect=tabs[0].getBoundingClientRect();var lastRect=tabs[tabs.length-1].getBoundingClientRect();return{canScrollStart:firstRect.left<trackRect.left-SCROLL_EDGE_THRESHOLD,canScrollEnd:lastRect.right>trackRect.right+SCROLL_EDGE_THRESHOLD};}/**\n * Returns the active tab's offset within the scroll track's content box.\n *\n * Content-relative coordinates keep the indicator aligned while `overflow-x: auto`\n * scrolls; viewport-based `getBoundingClientRect` math fights CSS transitions.\n *\n * @param scrollTrack - Horizontally scrollable `[role=\"tablist\"]`.\n * @param activeTab - The currently selected `.rd-tabs__bar-item`.\n */function getTabOffsetInScrollTrack(scrollTrack,activeTab){var x=0;var y=0;var node=activeTab;while(node&&node!==scrollTrack){x+=node.offsetLeft;y+=node.offsetTop;node=node.offsetParent;}return{x:x,y:y,width:activeTab.offsetWidth,height:activeTab.offsetHeight};}/**\n * Positions the sliding indicator thumb over the active tab.\n *\n * @param scrollTrack - Scrollable tablist; hosts `--tabs-indicator-*` for `.rd-tabs__indicator`.\n * @param activeTab - The currently selected `.rd-tabs__bar-item`.\n */function updateActiveIndicator(scrollTrack,activeTab){var _getTabOffsetInScroll=getTabOffsetInScrollTrack(scrollTrack,activeTab),x=_getTabOffsetInScroll.x,y=_getTabOffsetInScroll.y,width=_getTabOffsetInScroll.width,height=_getTabOffsetInScroll.height;scrollTrack.style.setProperty('--tabs-indicator-x',\"\".concat(x,\"px\"));scrollTrack.style.setProperty('--tabs-indicator-y',\"\".concat(y,\"px\"));scrollTrack.style.setProperty('--tabs-indicator-width',\"\".concat(width,\"px\"));scrollTrack.style.setProperty('--tabs-indicator-height',\"\".concat(height,\"px\"));scrollTrack.style.setProperty('--tabs-indicator-radius',getComputedStyle(activeTab).borderRadius);}/**\n * Controls one tablist and its associated tabpanels inside a single `.cmp-rd-tabs` root.\n *\n * Each instance tracks {@link TabGroup.activeIndex} in memory so keyboard handlers do not\n * re-query the DOM on every keypress. Tab and panel indices are assumed to match the order\n * returned by `querySelectorAll` (same order as `data-sly-list` in `tabs.html`).\n */var TabGroup=/*#__PURE__*/function(){/**\n * @param root - Component root (`.cmp-rd-tabs`).\n * @param tabBar - Outer pill container (`.rd-tabs__bar`).\n * @param tabBarWrapper - Sticky wrapper around the tab bar (`.rd-tabs__wrapper`).\n * @param panelsContainer - Panel stack (`.rd-tabs__panels`).\n * @param scrollTrack - Scrollable `[role=\"tablist\"]` (`.rd-tabs__scroll`).\n * @param prevBtn - Previous-tab scroll button, if present in markup.\n * @param nextBtn - Next-tab scroll button, if present in markup.\n * @param tabs - Tab triggers (`.rd-tabs__bar-item`), in document order.\n * @param panels - Tab panels (`.rd-tabs__panel-item`), index-aligned with `tabs`.\n */function TabGroup(root,tabBar,tabBarWrapper,panelsContainer,scrollTrack,prevBtn,nextBtn,tabs,panels){var _this=this;(0,classCallCheck/* default */.A)(this,TabGroup);this.root=root;this.tabBar=tabBar;this.tabBarWrapper=tabBarWrapper;this.panelsContainer=panelsContainer;this.scrollTrack=scrollTrack;this.prevBtn=prevBtn;this.nextBtn=nextBtn;this.tabs=tabs;this.panels=panels;/** Zero-based index of the currently selected tab. */(0,defineProperty/* default */.A)(this,\"activeIndex\",void 0);/**\n * True while a click/keyboard activation is in flight (between `activate()` and its\n * `requestAnimationFrame` callback). Used by `onTabBarResize` to avoid interrupting an\n * in-progress indicator slide with an instant snap.\n */(0,defineProperty/* default */.A)(this,\"isActivating\",false);/** Tracks the desktop breakpoint; re-evaluated on viewport change for uniform-width mode. */(0,defineProperty/* default */.A)(this,\"desktopMediaQuery\",window.matchMedia(DESKTOP_MEDIA_QUERY));/** Observes tab bar and scroll track size changes to re-equalize widths and reposition the indicator. */(0,defineProperty/* default */.A)(this,\"resizeObserver\",void 0);/** Re-equalizes tab widths when the viewport crosses the desktop breakpoint. */(0,defineProperty/* default */.A)(this,\"onViewportChange\",function(){_this.syncUniformTabWidths();});/**\n * Re-equalizes tab widths, repositions the indicator, and refreshes overflow nav on any bar resize.\n *\n * Skips the instant indicator snap while `isActivating` is true so that a ResizeObserver\n * callback triggered by nav-button visibility changes does not interrupt the CSS transition\n * that `activate`'s `requestAnimationFrame` is about to start.\n */(0,defineProperty/* default */.A)(this,\"onTabBarResize\",function(){_this.syncUniformTabWidths();if(!_this.isActivating){_this.syncActiveIndicator(false);}_this.syncOverflowNav();});/** Refreshes overflow chevron visibility and edge fades as the tablist scrolls. */(0,defineProperty/* default */.A)(this,\"onScrollTrackScroll\",function(){_this.syncOverflowNav();});this.activeIndex=TabGroup.resolveInitialIndex(tabs);}/**\n * Builds a {@link TabGroup} from a component root, or returns `null` if the markup is incomplete.\n *\n * @param root - The `.cmp-rd-tabs` element (`data-cmp-is=\"rd-tabs\"`).\n * @returns A configured instance, or `null` when required DOM nodes are missing (see DOM contract).\n */return (0,createClass/* default */.A)(TabGroup,[{key:\"init\",value:/**\n * Attaches click and keyboard handlers, initializes layout helpers, and wires analytics.\n *\n * - Click listeners on each tab trigger {@link activate}, which fires an analytics beacon\n * via {@link trackTabSelection} only when the selected tab actually changes.\n * - A single `keydown` listener on the tablist handles arrow / Home / End navigation.\n * - Uniform-width equalization and overflow navigation are set up and synced on first paint.\n *\n * Idempotent only if called once per instance; the Workday loader should not double-init\n * the same root without a full DOM replace.\n */function init(
1){var _this2=this;this.tabs.forEach(function(tab,index){tab.addEventListener('click',function(){_this2.activate(index);_this2.scrollToPanelsOnTabClick();});});this.scrollTrack.addEventListener('keydown',function(event){return _this2.onKeyDown(event);});this.initUniformTabWidths();this.initOverflowNav();this.syncActiveIndicator(false);this.activateFromUrl();}/**\n * Equalizes tab item widths when uniform-width is active; re-runs on resize and breakpoint changes.\n *\n * Registers a `MediaQueryList` listener for desktop/mobile breakpoint transitions and a\n * `ResizeObserver` on both the tab bar and scroll track. Also defers a re-sync to\n * `document.fonts.ready` so widths are correct once web fonts have loaded.\n */},{key:\"initUniformTabWidths\",value:function initUniformTabWidths(){var _document$fonts,_this3=this;this.syncUniformTabWidths();this.desktopMediaQuery.addEventListener('change',this.onViewportChange);this.resizeObserver=new ResizeObserver(this.onTabBarResize);this.resizeObserver.observe(this.tabBar);this.resizeObserver.observe(this.scrollTrack);(_document$fonts=document.fonts)===null||_document$fonts===void 0||_document$fonts.ready.then(function(){_this3.syncUniformTabWidths();_this3.syncActiveIndicator();_this3.syncOverflowNav();});}/**\n * Wires prev/next buttons and scroll listener for overflow navigation.\n */},{key:\"initOverflowNav\",value:function initOverflowNav(){var _this$prevBtn,_this4=this,_this$nextBtn;(_this$prevBtn=this.prevBtn)===null||_this$prevBtn===void 0||_this$prevBtn.addEventListener('click',function(){return _this4.onNavClick(-1);});(_this$nextBtn=this.nextBtn)===null||_this$nextBtn===void 0||_this$nextBtn.addEventListener('click',function(){return _this4.onNavClick(1);});this.scrollTrack.addEventListener('scroll',this.onScrollTrackScroll,{passive:true});this.syncOverflowNav();}/**\n * Handles prev/next nav clicks by activating the adjacent tab.\n *\n * Same selection path as keyboard arrows via {@link activateTabIndicator}.\n *\n * @param direction - `-1` for left, `1` for right.\n */},{key:\"onNavClick\",value:function onNavClick(direction){var count=this.tabs.length;if(count<=1){return;}var nextIndex=direction===1?(this.activeIndex+1)%count:(this.activeIndex-1+count)%count;this.activate(nextIndex);}/**\n * Toggles overflow chevrons, edge fades, and scroll affordances from visible clipping.\n */},{key:\"syncOverflowNav\",value:function syncOverflowNav(){var _getScrollEdges=getScrollEdges(this.scrollTrack,this.tabs),canScrollStart=_getScrollEdges.canScrollStart,canScrollEnd=_getScrollEdges.canScrollEnd;if(!canScrollStart&&!canScrollEnd&&this.scrollTrack.scrollLeft!==0){this.scrollTrack.scrollLeft=0;}this.tabBar.classList.toggle(CLASS_BAR_CAN_SCROLL_START,canScrollStart);this.tabBar.classList.toggle(CLASS_BAR_CAN_SCROLL_END,canScrollEnd);if(this.prevBtn){this.prevBtn.hidden=!canScrollStart;}if(this.nextBtn){this.nextBtn.hidden=!canScrollEnd;}}/**\n * Updates indicator CSS variables for the active tab (no transition control).\n */},{key:\"updateActiveIndicatorPosition\",value:function updateActiveIndicatorPosition(){var activeTab=this.tabs[this.activeIndex];if(!activeTab){return;}updateActiveIndicator(this.scrollTrack,activeTab);}/**\n * Moves the sliding indicator to the active tab.\n *\n * @param animate - When `false`, skips transition on first paint to avoid a visible slide-in.\n */},{key:\"syncActiveIndicator\",value:function syncActiveIndicator(){var animate=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;if(!animate){this.scrollTrack.classList.add('rd-tabs__scroll--indicator-instant');}this.updateActiveIndicatorPosition();if(!animate){void this.scrollTrack.offsetWidth;this.scrollTrack.classList.remove('rd-tabs__scroll--indicator-instant');}}/**\n * Applies or clears uniform tab widths based on the active width modifier for this viewport.\n */},{key:\"syncUniformTabWidths\",value:function syncUniformTabWidths(){if(isUniformWidthMode(this.tabBar,this.desktopMediaQuery.matches)){equalizeUniformTabWidths(this.tabs);return;}clearUniformTabWidths(this.tabs);}/**\n * Scrolls the page up to the panel stack when a tab is clicked in above-content mode.\n *\n * Only runs when the authored position is \"above content\" for the current viewport\n * and the user has scrolled below the panel stack. The target aligns `.rd-tabs__panels`\n * just below the sticky tab bar (`.rd-tabs__wrapper`).\n */},{key:\"scrollToPanelsOnTabClick\",value:function scrollToPanelsOnTabClick(){if(!isAboveContentPosition(this.root,this.desktopMediaQuery.matches)){return;}var stickyTop=parseFloat(getComputedStyle(this.tabBarWrapper).top)||0;var tabBarHeight=this.tabBarWrapper.getBoundingClientRect().height;var panelsTop=this.panelsContainer.getBoundingClientRect().top+window.scrollY;var targetScroll=panelsTop-stickyTop-tabBarHeight;if(window.scrollY<=targetScroll+SCROLL_EDGE_THRESHOLD){return;}window.scrollTo({top:Math.max(0,targetScroll),behavior:prefersReducedMotion()?'auto':'smooth'});}/**\n * Activates a tab whose title slug matches a URL search-parameter value, then\n * scrolls the page so the Tab component rests near the top of the viewport.\n *\n * Both the tab title and the URL parameter value are run through {@link toUrlSlug}\n * before comparison, so `\"Talent Management\"` matches `\"talent-management\"` and\n * URL-encoded spaces (`\"Talent%20Management\"`) are handled automatically.\n *\n * Only the first matching URL parameter value is used. If the matched tab is\n * already active (or no match is found) the method is a no-op.\n *\n * URL format: any parameter whose slug-normalized value equals the slug of a tab\n * title, e.g. `?tab=talent-management` or `?section=Overview`.\n */},{key:\"activateFromUrl\",value:function activateFromUrl(){var _this5=this;var params=new URLSearchParams(window.location.search);var _iterator=_createForOfIteratorHelper(params.values()),_step2;try{var _loop=function _loop(){var value=_step2.value;var normalizedValue=toUrlSlug(value);var matchIndex=_this5.tabs.findIndex(function(tab){var _titleEl$textContent;var titleEl=tab.querySelector('.rd-tabs__bar-item-title');return toUrlSlug((_titleEl$textContent=titleEl===null||titleEl===void 0?void 0:titleEl.textContent)!==null&&_titleEl$textContent!==void 0?_titleEl$textContent:'')===normalizedValue;});if(matchIndex>=0&&matchIndex!==_this5.activeIndex){_this5.activate(matchIndex,false);_this5.root.scrollIntoView({behavior:'smooth',block:'start'});return 1;// break\n}};for(_iterator.s();!(_step2=_iterator.n()).done;){if(_loop())break;}}catch(err){_iterator.e(err);}finally{_iterator.f();}}/**\n * Selects the tab at `index` and shows the matching panel.\n *\n * No-ops silently when `index` already equals {@link activeIndex}, preventing\n * duplicate analytics beacons and redundant DOM work on re-clicks of the active tab.\n *\n * When the selection changes:\n * - Updates {@link TabGroup.activeIndex} and toggles active modifiers on tabs and panels.\n * - Refreshes ARIA/tabindex on every tab via {@link setTabSelected}.\n * - Fires a {@link trackTabSelection} analytics beacon **only when `track` is `true`**\n * (the default). Pass `false` for programmatic activations (e.g. URL-driven) to avoid\n * inflating tab-selection counts in Adobe Analytics / CJA with non-user interactions.\n *\n * The indicator slide is deferred to `requestAnimationFrame` so layout is settled before\n * computing the new position. The deferred callback guards against a rapid second activation\n * (e.g. keyboard held down) by bailing if `activeIndex` has already moved on.\n *\n * @param index - Zero-based tab index to activate.\n * @param track - Whether to fire an analytics beacon. Defaults to `true`.\n */},{key:\"activate\",value:function activate(index){var _this6=this;var track=arguments.length>1&&arguments[1]!==undefined?arguments[1]:true;if(index===this.activeIndex){return;}this.activeIndex=index;
1this.tabs.forEach(function(tab,i){return setTabSelected(tab,i===index);});this.panels.forEach(function(panel,i){return panel.classList.toggle(CLASS_PANEL_ACTIVE,i===index);});var activeTab=this.tabs[index];if(activeTab){// Guard must be raised before syncOverflowNav so any ResizeObserver callback\n// that fires synchronously (due to nav-button DOM changes) does not snap the\n// indicator instantly and steal the in-flight scroll-synced animation. It is\n// cleared only once the indicator settles (via the onSettle callback below).\nthis.isActivating=true;this.syncOverflowNav();if(track){trackTabSelection(activeTab);}activateTabIndicator(this.scrollTrack,activeTab,this.tabs,index,true,function(){_this6.isActivating=false;});}}/**\n * Handles arrow and Home/End keys on the tablist.\n *\n * Ignores unmapped keys so other shortcuts (e.g. browser defaults) are unaffected.\n * Calls `preventDefault()` only for handled navigation keys, then moves focus to the\n * newly selected tab.\n *\n * @param event - `keydown` from the tablist element.\n */},{key:\"onKeyDown\",value:function onKeyDown(event){var _this$tabs$nextIndex;var resolveIndex=TAB_INDEX_BY_KEY[event.key];if(!resolveIndex){return;}event.preventDefault();var nextIndex=resolveIndex(this.activeIndex,this.tabs.length);this.activate(nextIndex);(_this$tabs$nextIndex=this.tabs[nextIndex])===null||_this$tabs$nextIndex===void 0||_this$tabs$nextIndex.focus({preventScroll:true});}}],[{key:\"fromRoot\",value:function fromRoot(root){var tabBarWrapper=root.querySelector('.rd-tabs__wrapper');var tabBar=tabBarWrapper===null||tabBarWrapper===void 0?void 0:tabBarWrapper.querySelector('.rd-tabs__bar');var panelsContainer=root.querySelector('.rd-tabs__panels');var scrollTrack=tabBar===null||tabBar===void 0?void 0:tabBar.querySelector('.rd-tabs__scroll');var tabs=root.querySelectorAll('.rd-tabs__bar-item');var panels=root.querySelectorAll('.rd-tabs__panel-item');if(!tabBarWrapper||!tabBar||!panelsContainer||!scrollTrack||tabs.length===0){var missing=[];if(!tabBarWrapper)missing.push('.rd-tabs__wrapper');if(!tabBar)missing.push('.rd-tabs__bar');if(!panelsContainer)missing.push('.rd-tabs__panels');if(!scrollTrack)missing.push('.rd-tabs__scroll');if(tabs.length===0)missing.push('.rd-tabs__bar-item');console.warn(\"[rd-tabs] Missing required DOM: \".concat(missing.join(', ')));return null;}return new TabGroup(root,tabBar,tabBarWrapper,panelsContainer,scrollTrack,tabBar.querySelector('.rd-tabs__nav--prev'),tabBar.querySelector('.rd-tabs__nav--next'),(0,toConsumableArray/* default */.A)(tabs),(0,toConsumableArray/* default */.A)(panels));}/**\n * Reads the initial selected tab from server-rendered markup.\n *\n * HTL marks the first tab with `rd-tabs__bar-item--active` in publish mode. If no tab has that class\n * (unexpected DOM), index `0` is used.\n *\n * @param tabs - Tab elements to inspect.\n * @returns The initial active index.\n */},{key:\"resolveInitialIndex\",value:function resolveInitialIndex(tabs){var fromDom=tabs.findIndex(function(tab){return tab.classList.contains(CLASS_TAB_ACTIVE);});return fromDom>=0?fromDom:0;}}]);}();/**\n * Workday component class for Tabs Redesign publish behavior.\n *\n * @example\n * ```ts\n * // Loaded by martech/workday.js â not called directly in page templates.\n * const Module = await import('./tabs');\n * new Module.default().run();\n * ```\n */var TabsRedesign=/*#__PURE__*/function(){function TabsRedesign(){(0,classCallCheck/* default */.A)(this,TabsRedesign);}return (0,createClass/* default */.A)(TabsRedesign,[{key:\"run\",value:/**\n * Initializes tab interaction for every `.cmp-rd-tabs` on the page.\n *\n * Skips roots that lack a tab bar or tab items. Safe to call from the Workday loader\n * whenever a new batch of components is initialized.\n */function run(){document.querySelectorAll(ROOT_SELECTOR).forEach(function(root){var _TabGroup$fromRoot;(_TabGroup$fromRoot=TabGroup.fromRoot(root))===null||_TabGroup$fromRoot===void 0||_TabGroup$fromRoot.init();});}}]);}();\n\n//# sourceURL=webpack://ui.apps/./src/main/content/jcr_root/apps/atlas/components/content/redesign/tabs/tabs.ts_+_1_modules?\n}")}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.