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AAlBra,EAAoBua,cAAM,IAAAF,GAAU,QAAVC,EAA1BD,EAA4BG,gBAAQ,IAAAF,OAA9B,EAANA,EAHiB,8CAI/B,MAA+C,QAAxCjhB,OAAOnB,QAAAA,EAAS,MAAM+K,aAAuB,EAmH7CmX,GACJ,MAAMD,EAEP,OAAOnB,GACNU,EAAoBT,iBACpBS,EAAoBlC,SACpB5S,EACA+L,GACC2F,MAAMmE,IAEP,MADAN,EAAeM,gBAAkBA,EAC3BN,CAAc,GACnB,GACD,EASSO,GAAiCxb,UAAyB,IAAAyb,EAAAC,EACtE,IAAI9Z,EACJ,IACC,MAAM3B,QAAuBkB,IAC7BS,QAAiB3B,EAAemB,QAC/B,GAAG5D,KAAmCoS,IACtC,SAEF,CAAE,MAAOlO,GACR,MAAM6X,GACL7X,EACA,0DAEF,CACA,MAAMqZ,EAA2B,QAAXU,EAAG7Z,SAAQ,IAAA6Z,GAAM,QAANC,EAARD,EAAU1Z,YAAI,IAAA2Z,OAAN,EAARA,EAAgB1Z,OACzCsU,GAA0ByE,GAC1Bta,EAA0BwB,QACzBG,IACA2Y,GAED5E,IAA4B,EAQhBwF,GAAkB3b,UAC9B,IACC,MAAMC,QAAuBkB,UACvBlB,EAAemB,QAAQ5D,EAAiC,SAC/D,CAAE,MAAOkE,GACR,MAAM6X,GACL7X,EACA,wDAEF,CACA4U,GAA0B,CAAC,GAC3B7V,EAA0BwB,QAAQG,IAAmC,CAAC,GACtE+T,KACA3V,EAAgC4V,OAAO,C","sources":["webpack:///external import \"/uxasset/externals/sn-http-request/26.3.3/index.jsdbx\"","webpack:///@babel/runtime/7.24.8/helpers/defineProperty.js","webpack:///@babel/runtime/7.24.8/helpers/extends.js","webpack:///@babel/runtime/7.24.8/helpers/toPrimitive.js","webpack:///@babel/runtime/7.24.8/helpers/toPropertyKey.js","webpack:///@babel/runtime/7.24.8/helpers/typeof.js","webpack:///webpack/bootstrap","webpack:///webpack/runtime/compat get default export","webpack:///webpack/runtime/define property getters","webpack:///webpack/runtime/hasOwnProperty shorthand","webpack:///@servicenow/now-trigger-library/src/helpers/constants.js","webpack:///external module \"/uxasset/externals/@devsnc/snowdash/28.1.16/index.jsdbx\"","webpack:///@servicenow/now-trigger-library/src/helpers/getLogger.js","webpack:///@servicenow/now-trigger-library/src/helpers/supportedPlatforms.js","webpack:///@servicenow/now-trigger-library/src/snHttpInstance/index.js","webpack:///external module \"/uxasset/externals/@devsnc/library-unified-cache/24.0.8/index.jsdbx\"","webpack:///@servicenow/now-trigger-library/src/helpers/cacheInstance.js","webpack:///@servicenow/now-trigger-library/src/helpers/fetchShortcuts.js","webpack:///@servicenow/now-trigger-library/src/helpers/overridesHelpers.js","webpack:///@servicenow/now-trigger-library/src/helpers/fetchUserOverrides.js","webpack:///@servicenow/now-trigger-library/src/helpers/dedupeShortcuts.js","webpack:///@servicenow/now-trigger-library/src/helpers/keyFormatter.js","webpack:///@servicenow/now-trigger-library/src/helpers/shortcutUtils.js","webpack:///@servicenow/now-trigger-library/src/helpers/domHelpers.js","webpack:///@servicenow/now-trigger-library/src/contextManager.js","webpack:///@servicenow/now-trigger-library/src/helpers/querySelectors.js","webpack:///@servicenow/now-trigger-library/src/componentRegistry.js","webpack:///@servicenow/now-trigger-library/src/shortcutsState.js","webpack:///@servicenow/now-trigger-library/src/ApplicableComponentAdapter.js","webpack:///@servicenow/now-trigger-library/src/helpers/ActionStateQueue.js","webpack:///@servicenow/now-trigger-library/src/shortcutActionManager.js","webpack:///@servicenow/now-trigger-library/src/landmarkEngine.js","webpack:///@servicenow/now-trigger-library/src/shortcutRegistry.js","webpack:///external module \"/uxasset/externals/@servicenow/ui-metrics/index.jsdbx\"","webpack:///@servicenow/now-trigger-library/src/trackUsageShortcutHandler.js","webpack:///@servicenow/now-trigger-library/src/shortcutEngine.js","webpack:///@servicenow/now-trigger-library/src/overrideRegistry.js","webpack:///@servicenow/now-trigger-library/src/initializeShortcuts.js","webpack:///@servicenow/now-trigger-library/src/helpers/kbsMetrics.js","webpack:///@servicenow/now-trigger-library/src/overrideManager.js"],"sourcesContent":["module.exports = import(\"/uxasset/externals/sn-http-request/26.3.3/index.jsdbx\");;","var toPropertyKey = require(\"./toPropertyKey.js\");\nfunction _defineProperty(e, r, t) {\n  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n    value: t,\n    enumerable: !0,\n    configurable: !0,\n    writable: !0\n  }) : e[r] = t, e;\n}\nmodule.exports = _defineProperty, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _extends() {\n  return (module.exports = _extends = Object.assign ? Object.assign.bind() : function (n) {\n    for (var e = 1; e < arguments.length; e++) {\n      var t = arguments[e];\n      for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);\n    }\n    return n;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _extends.apply(null, arguments);\n}\nmodule.exports = _extends, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction toPrimitive(t, r) {\n  if (\"object\" != _typeof(t) || !t) return t;\n  var e = t[Symbol.toPrimitive];\n  if (void 0 !== e) {\n    var i = e.call(t, r || \"default\");\n    if (\"object\" != _typeof(i)) return i;\n    throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n  }\n  return (\"string\" === r ? String : Number)(t);\n}\nmodule.exports = toPrimitive, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","var _typeof = require(\"./typeof.js\")[\"default\"];\nvar toPrimitive = require(\"./toPrimitive.js\");\nfunction toPropertyKey(t) {\n  var i = toPrimitive(t, \"string\");\n  return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nmodule.exports = toPropertyKey, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n  \"@babel/helpers - typeof\";\n\n  return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n    return typeof o;\n  } : function (o) {\n    return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n  }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// dedupe shortcuts\n// This is an exception for a use case where we want to allow the same shortcut to work across two specific components - now-uxf-tab-set & now-contextual-sidebar\nexport const DUPLICATE_SHORTCUT_TAB_SET_EXCEPTIONS = [\n\t'NOW-CONTEXTUAL-SIDEBAR',\n\t'NOW-UXF-TAB-SET'\n];\n\n// key formatter\n// Intentionally leaving out Shift key here as the Shift key must be used in conjunction with another modifier key\nexport const MODIFIER_KEYS = {\n\tALT: 'Alt',\n\tCONTROL: 'Control',\n\tMETA: 'Meta'\n};\nexport const SUPPORTED_SPECIAL_CHARACTERS = {\n\tSEMICOLON: 'Semicolon',\n\tBRACKET_LEFT: 'BracketLeft',\n\tBRACKET_RIGHT: 'BracketRight',\n\tQUOTE: 'Quote',\n\tCOMMA: 'Comma',\n\tPERIOD: 'Period',\n\tSLASH: 'Slash',\n\tDASH: 'Dash',\n\tEQUAL: 'Equal'\n};\nexport const KEY_PREFIXES = {\n\tKEY: 'Key',\n\tDIGIT: 'Digit'\n};\n\n// component registry\nexport const APP_SHELL_MODAL_HOIST = 'SN-CANVAS-MODAL-HOIST';\nexport const APP_SHELL_ROOT = 'SN-CANVAS-APPSHELL-ROOT';\nexport const CANVAS_TOOL_BAR = 'SN-CANVAS-TOOLBAR';\nexport const SN_POLARIS_LAYOUT = 'SN-POLARIS-LAYOUT';\nexport const SN_CANVAS_TABS = 'SN-CANVAS-TABS';\n\n// IMPORTANT!!! If you are working on shortcuts for an app shell component, add it to this array else the shortcut will not work\nexport const APP_SHELL_COMPONENTS = [\n\tSN_POLARIS_LAYOUT,\n\tCANVAS_TOOL_BAR,\n\tSN_CANVAS_TABS\n];\n\n// shortcut registry\nexport const ACTION_BAR = 'NOW-RECORD-COMMON-UIACTIONBAR';\n\n// Shortcut Data Fetching\n// KEYBOARD_SHORTCUTS_API is used as API endpoint for REST service as well as cache key\n// in the KEY_SHORTCUTS cache store.\nexport const KEYBOARD_SHORTCUTS_API = '/api/now/uxframework/keyboard_shortcuts';\nexport const KEYBOARD_SHORTCUTS_CACHE_BUSTER = 'ux_kbs_cb';\nexport const KEY_SHORTCUTS = 'now_ux_shortcuts';\nexport const KEY_SHORTCUT_CB_HASH = 'now_ux_shortcut_cb_hash';\n\n// landmarks\nconst LANDMARK_FOCUS_FORWARD = 'LANDMARK_FOCUS_FORWARD';\nconst LANDMARK_FOCUS_BACKWARD = 'LANDMARK_FOCUS_BACKWARD';\nconst LANDMARK_FOCUS_ATTR = 'data-landmarkfocus';\nconst LANDMARK_ACTIVE_ELEMENT_ATTR = 'data-activelement';\nconst LANDMARK_LAST_CLICKED_ATTR = 'data-lastclicked';\nconst LANDMARK_SELECTOR = `[${LANDMARK_ACTIVE_ELEMENT_ATTR}], [${LANDMARK_FOCUS_ATTR}=\"true\"]`;\n\nexport const landmarkConstants = {\n\tLANDMARK_FOCUS_FORWARD,\n\tLANDMARK_FOCUS_BACKWARD,\n\tLANDMARK_FOCUS_ATTR,\n\tLANDMARK_ACTIVE_ELEMENT_ATTR,\n\tLANDMARK_LAST_CLICKED_ATTR,\n\tLANDMARK_SELECTOR\n};\n\n// Context Management\nexport const KBS_MODAL_OPENED = 'UXF_KBS#MODAL_OPENED';\nexport const KBS_MODAL_CLOSED = 'UXF_KBS#MODAL_CLOSED';\n\n// DOM Helpers\nexport const COMPONENT_ID = 'component-id';\nexport const HIDDEN = 'hidden';\nexport const COLLAPSED = 'collapsed';\n\nexport const SHORTCUT_DIRECTORY_MODAL_ACTION =\n\t'KEYBOARD_SHORTCUTS_BEHAVIOR#MODAL_OPENED';\n\n/**\n * User Override data fetching API path for \"shortcut\" category.\n * Also, used as a key in USER_OVERRIDE_SHORTCUT_CACHE_KEY cache store.\n */\nexport const USER_OVERRIDE_SHORTCUT_API_PATH =\n\t'/api/now/uxframework/user_override/shortcut';\nexport const SHORTCUT_RECOMMENDER_API_PATH =\n\t'/api/now/ux_keyboard_shortcut_recommender/recommend';\n/** User Override Shortcuts cache key. */\nexport const USER_OVERRIDE_SHORTCUT_CACHE = 'now_ux_user_override_shortcut';\nexport const USER_OVERRIDE_SHORTCUT_CACHE_CB_HASH =\n\t'now_ux_user_override_shortcut_cb_hash';\n\n// Cache configuration for shortcuts and overrides\nexport const CACHE_CONFIGS = {\n\t[KEY_SHORTCUTS]: {\n\t\tdescription: 'keyboard shortcut responses',\n\t\tadapter: ['indexedDB'],\n\t\tevictionPolicy: 'LRU',\n\t\tname: 'kb_shortcut_lru',\n\t\tstoreName: 'kb_shortcut_store'\n\t},\n\t[KEY_SHORTCUT_CB_HASH]: {\n\t\tdescription: 'used for invalidating stale keyboard shortcut metadata',\n\t\tadapter: ['localStorage'],\n\t\tevictionPolicy: 'LRU',\n\t\tname: 'shortcut_cb_hash_lru',\n\t\tstoreName: 'shortcut_cb_hash_store'\n\t},\n\t[USER_OVERRIDE_SHORTCUT_CACHE]: {\n\t\tdescription: 'user override shortcut',\n\t\tadapter: ['indexedDB'],\n\t\tevictionPolicy: 'LRU',\n\t\tname: 'user_override_lru',\n\t\tstoreName: 'user_override_shortcut_store'\n\t},\n\t[USER_OVERRIDE_SHORTCUT_CACHE_CB_HASH]: {\n\t\tdescription: 'used for invalidating stale shortcut override metadata',\n\t\tadapter: ['localStorage'],\n\t\tevictionPolicy: 'LRU',\n\t\tname: 'user_override_shortcut_cb_hash_lru',\n\t\tstoreName: 'user_override_shortcut_cb_hash_store'\n\t}\n};\n\nexport const NOW_UX_INTERACTION = 'NOW-UX-INTERACTION';\n","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"get\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.__esModule\n\t\t\t\t\tif (cjsModule && 'get' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].get;\n\t\t\t\t\t} else if ('get' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.get || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].get;\n\t\t\t\t}, [\"inRange\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.__esModule\n\t\t\t\t\tif (cjsModule && 'inRange' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].inRange;\n\t\t\t\t\t} else if ('inRange' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.inRange || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].inRange;\n\t\t\t\t}, [\"isEqual\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.__esModule\n\t\t\t\t\tif (cjsModule && 'isEqual' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].isEqual;\n\t\t\t\t\t} else if ('isEqual' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.isEqual || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].isEqual;\n\t\t\t\t}, [\"isNil\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.__esModule\n\t\t\t\t\tif (cjsModule && 'isNil' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].isNil;\n\t\t\t\t\t} else if ('isNil' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.isNil || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].isNil;\n\t\t\t\t}, [\"noop\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.__esModule\n\t\t\t\t\tif (cjsModule && 'noop' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].noop;\n\t\t\t\t\t} else if ('noop' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.noop || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].noop;\n\t\t\t\t}, [\"set\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.__esModule\n\t\t\t\t\tif (cjsModule && 'set' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].set;\n\t\t\t\t\t} else if ('set' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__.set || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__[\"default\"].set;\n\t\t\t\t} });","import {get, noop} from '@devsnc/snowdash';\n\nconst LOGGING_ENABLED = get(\n\twindow,\n\t['nowUiFramework', 'loggingEnabled'],\n\tfalse\n);\n\nconst PRODUCTION_CONSOLE_METHODS = ['error', 'warn'];\n\nexport const shortcutLogger = new Proxy(console, {\n\tget(target, property) {\n\t\tif (\n\t\t\ttypeof target[property] === 'function' &&\n\t\t\t(PRODUCTION_CONSOLE_METHODS.includes(property) || LOGGING_ENABLED)\n\t\t) {\n\t\t\treturn function (...args) {\n\t\t\t\tif (typeof args[0] === 'string') {\n\t\t\t\t\targs[0] = `[UXF Shortcuts]: ${args[0]}`;\n\t\t\t\t}\n\n\t\t\t\ttarget[property].apply(console, args);\n\t\t\t};\n\t\t}\n\n\t\treturn noop;\n\t}\n});\n","const {userAgent} = navigator;\n\n/**\n * @function isMac\n *\n * @description Checks if the current userAgent is a Mac-based platform\n *\n * @returns {Boolean}\n */\nexport const isMac = () => /Mac/i.test(userAgent);\n\n/**\n * @function isWindows\n *\n * @description Checks if the current userAgent is a Windows-based platform\n *\n * @returns {Boolean}\n */\nexport const isWindows = () => /Win/i.test(userAgent);\n\n/**\n * @function isSupportedPlatform\n *\n * @description Checks if the current userAgent is supported for keyboard shortcuts\n *\n * @returns {Boolean}\n */\nexport const isSupportedPlatform = () => isMac() || isWindows();\n","let snHttpRef;\n\nconst snHttp = async () => {\n\tif (snHttpRef) {\n\t\treturn snHttpRef;\n\t}\n\n\tconst {snHttpInstance} = await import('sn-http-request');\n\tsnHttpRef = snHttpInstance;\n\treturn snHttpInstance;\n};\n\nexport default snHttp;\n","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"default\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__.__esModule\n\t\t\t\t\tif (cjsModule && 'default' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"][\"default\"];\n\t\t\t\t\t} else if ('default' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"] || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__[\"default\"][\"default\"];\n\t\t\t\t} });","import unifiedCache from '@devsnc/library-unified-cache';\nimport {\n\tKEY_SHORTCUTS,\n\tKEY_SHORTCUT_CB_HASH,\n\tUSER_OVERRIDE_SHORTCUT_CACHE,\n\tUSER_OVERRIDE_SHORTCUT_CACHE_CB_HASH,\n\tCACHE_CONFIGS\n} from './constants';\n\nconst instance = {};\n\n/**\n * @function getCacheInstance\n * @description Generic & singleton-esque providing the instance for interacting with unified cache\n * @param {string} key - Key for which instance to access\n * @returns the relevant unified cache instance\n */\nconst getCacheInstance = (key) => {\n\tif (!instance[key])\n\t\tinstance[key] = unifiedCache.createInstance(CACHE_CONFIGS[key]);\n\treturn instance[key];\n};\n\nexport const shortcutCache = getCacheInstance(KEY_SHORTCUTS);\n\nexport const shortcutCBHashCache = getCacheInstance(KEY_SHORTCUT_CB_HASH);\nexport const userOverrideShortcutCBHashCache = getCacheInstance(\n\tUSER_OVERRIDE_SHORTCUT_CACHE_CB_HASH\n);\n\nexport const userOverrideShortcutCache = getCacheInstance(\n\tUSER_OVERRIDE_SHORTCUT_CACHE\n);\n","import snHttp from '../snHttpInstance/index.js';\nimport {shortcutCache, shortcutCBHashCache} from './cacheInstance';\nimport {shortcutLogger as console} from './getLogger';\nimport {inRange} from '@devsnc/snowdash';\nimport {\n\tKEYBOARD_SHORTCUTS_API,\n\tKEYBOARD_SHORTCUTS_CACHE_BUSTER,\n\tNOW_UX_INTERACTION\n} from './constants';\n\n/**\n * @function fetchShortcutsFromServer\n * @description Makes the request to the server to capture shortcuts and caches it.\n *\n * @returns {Promise<Array<ShortcutMetadata>>} shortcuts\n */\nconst fetchShortcutsFromServer = async () => {\n\tconsole.log('fetching shortcuts from server'); // Used for debugging while maint\n\n\tlet results;\n\ttry {\n\t\tconst snHttpInstance = await snHttp();\n\t\tresults = await snHttpInstance.request(KEYBOARD_SHORTCUTS_API, 'GET', {\n\t\t\theaders: {\n\t\t\t\t[NOW_UX_INTERACTION]:\n\t\t\t\t\twindow.nowUiFramework?.uxrInteractionId ||\n\t\t\t\t\twindow.nowUiFramework?.metrics?.uxfInteractionIdBase\n\t\t\t}\n\t\t});\n\t} catch (error) {\n\t\t// Unautheticated, unauthorized, or preconditions not met error responses\n\t\tif (inRange(error?.response?.status, 400, 500)) {\n\t\t\tconsole.info(\n\t\t\t\t'A client error occurred while fetching keyboard shortcuts from server:',\n\t\t\t\terror\n\t\t\t);\n\t\t\treturn [];\n\t\t}\n\t\tconsole.error(\n\t\t\t'An error occurred while fetching keyboard shortcuts from server:',\n\t\t\terror\n\t\t);\n\n\t\treturn [];\n\t}\n\n\tconst shortcuts = results?.data?.result;\n\tshortcutCache.setItem(KEYBOARD_SHORTCUTS_API, shortcuts);\n\tshortcutCBHashCache.setItem(\n\t\tKEYBOARD_SHORTCUTS_CACHE_BUSTER,\n\t\twindow?.ux_globals?.uxKeyboardShortcutClientCacheBuster\n\t);\n\treturn shortcuts;\n};\n\n/**\n * @function fetchShortcuts\n * @description Fetches cached shortcuts\n * @example\n * const shortcuts = await fetchShortcuts();\n *\n * @returns {Promise<Array<ShortcutMetadata>>} shortcuts - the response from the API\n */\nexport const fetchShortcuts = async () => {\n\tconst kbsCB = await shortcutCBHashCache.getItem(\n\t\tKEYBOARD_SHORTCUTS_CACHE_BUSTER\n\t);\n\n\t// Fetch from server & cache for up-to-date shortcut information after\n\t// flush sources (ex. keyboardshortcut table metadata) change\n\tif (window?.ux_globals?.uxKeyboardShortcutClientCacheBuster !== kbsCB) {\n\t\tconsole.log('CB didnt match up, fetching shortcuts from server', {\n\t\t\tuxGlob: window?.ux_globals?.uxKeyboardShortcutClientCacheBuster,\n\t\t\tstoredCB: kbsCB\n\t\t});\n\t\treturn await fetchShortcutsFromServer();\n\t}\n\n\t// Fetch shortcuts from cache, fetchShortcutsFromServer call is\n\t// not intended to be hit but is there as a fail safe in the unlikely case\n\t// that cache buster is empty/none and equal to each other and shortcut cache\n\t// is empty.\n\treturn shortcutCache\n\t\t.getItem(KEYBOARD_SHORTCUTS_API)\n\t\t.then(async (shortcuts) => {\n\t\t\tif (shortcuts) console.log(`fetched shortcuts from cache`);\n\t\t\treturn shortcuts ?? (await fetchShortcutsFromServer());\n\t\t});\n};\n\nexport const exportOnlyForTesting = {\n\tfetchShortcutsFromServer\n};\n","import {get} from '@devsnc/snowdash';\nimport {USER_OVERRIDE_SHORTCUT_API_PATH} from './constants';\n\n/**\n * Retrieves User SysId from window UX global properties.\n * @returns {String}\n */\nconst getUserSysId = () => get(window, 'ux_globals.session.output.user.sys_id');\n\n/**\n * Cache key combines user override shortcut endpoint path and user sys_id to uniquely identify the\n * cache. Used to store fetched user override shortcut data in the cache separately.\n */\nexport const getUserOverrideShortcutCacheKey = () =>\n\tUSER_OVERRIDE_SHORTCUT_API_PATH + getUserSysId();\n","import {inRange} from '@devsnc/snowdash';\nimport snHttp from '../snHttpInstance/index.js';\nimport {\n\tuserOverrideShortcutCache,\n\tuserOverrideShortcutCBHashCache\n} from './cacheInstance';\nimport {USER_OVERRIDE_SHORTCUT_API_PATH} from './constants.js';\nimport {getUserOverrideShortcutCacheKey} from './overridesHelpers';\nimport {shortcutLogger as console} from './getLogger';\n\n/**\n * Fetches and caches user override shortcuts for current user from server.\n * @returns {Promise<UserOverrideShortcuts>} user override shortcut data\n */\nconst fetchUserOverrideShortcutsFromServer = async () => {\n\tconsole.log('Fetching user overrides from server');\n\tlet results;\n\ttry {\n\t\tconst snHttpInstance = await snHttp();\n\t\tresults = await snHttpInstance.get(USER_OVERRIDE_SHORTCUT_API_PATH);\n\t} catch (error) {\n\t\t// Unautheticated, unauthorized, or preconditions not met error responses\n\t\tif (inRange(error?.response?.status, 400, 500)) {\n\t\t\tconsole.info(\n\t\t\t\t'A client error occurred while fetching user overrides from server:',\n\t\t\t\terror\n\t\t\t);\n\t\t\treturn {};\n\t\t}\n\t\tconsole.error(\n\t\t\t'An error occurred while fetching user overrides from server:',\n\t\t\terror\n\t\t);\n\t\treturn {};\n\t}\n\n\tconst userOverrideShortcuts = results?.data?.result || {};\n\tuserOverrideShortcutCache.setItem(\n\t\tgetUserOverrideShortcutCacheKey(),\n\t\tuserOverrideShortcuts\n\t);\n\n\tuserOverrideShortcutCBHashCache.setItem(\n\t\tgetUserOverrideShortcutCacheKey(),\n\t\twindow?.ux_globals?.uxKeyboardShortcutOverrideClientCacheBuster\n\t);\n\treturn userOverrideShortcuts;\n};\n\n/**\n * Attempts to retrieve user override shortcuts from cache, fetches from server if not found.\n * @returns {UserOverrideShortcuts}\n */\nexport const fetchUserOverrideShortcuts = async () => {\n\tconst overrideCB = await userOverrideShortcutCBHashCache.getItem(\n\t\tgetUserOverrideShortcutCacheKey()\n\t);\n\n\t// Fetch from server & cache for up-to-date override information\n\tif (\n\t\twindow?.ux_globals?.uxKeyboardShortcutOverrideClientCacheBuster !==\n\t\toverrideCB\n\t) {\n\t\treturn await fetchUserOverrideShortcutsFromServer();\n\t}\n\n\treturn userOverrideShortcutCache\n\t\t.getItem(getUserOverrideShortcutCacheKey())\n\t\t.then(async (userOverrideShortcuts) => {\n\t\t\tif (userOverrideShortcuts)\n\t\t\t\tconsole.log('Fetched user override shortcuts from cache');\n\t\t\treturn (\n\t\t\t\tuserOverrideShortcuts ?? (await fetchUserOverrideShortcutsFromServer())\n\t\t\t);\n\t\t});\n};\n","import {isEqual} from '@devsnc/snowdash';\nimport {\n\tfindNearestParentElement,\n\tfindFirstChildElement,\n\tgetActiveElement\n} from './querySelectors';\nimport {shortcutLogger as console} from './getLogger';\nimport {DUPLICATE_SHORTCUT_TAB_SET_EXCEPTIONS} from './constants';\n\nconst getReturnValue = (shortcuts, element) => {\n\tconst {actionKey, actionPayload, name} = shortcuts.find(\n\t\t(shortcut) => shortcut.componentTagName === element.tagName\n\t);\n\n\treturn {\n\t\telement,\n\t\tactionKey,\n\t\tactionPayload,\n\t\tname\n\t};\n};\n\n/**\n * @function dedupeShortcuts\n *\n * @description - Dedupes shortcuts on the page and returns the resolved shortcut.\n *\n * @param {Array<ShortcutMetadata>} shortcuts\n *\n * @returns {ShortcutMetadata} - Resolved shortcut\n */\nexport const dedupeShortcuts = (shortcuts) => {\n\tconst componentTagNames = shortcuts\n\t\t.flatMap((shortcut) => shortcut.componentTagName)\n\t\t.sort();\n\n\t// Need to ensure the only duplicate shortcuts on the page are the ones that are supported (i.e. now-uxf-tab-set & now-contextual-sidebar)\n\tif (\n\t\t!isEqual(\n\t\t\tDUPLICATE_SHORTCUT_TAB_SET_EXCEPTIONS.sort(),\n\t\t\tcomponentTagNames.sort()\n\t\t)\n\t) {\n\t\tconsole.warn(\n\t\t\t'Shortcut could not be triggered - Duplicate shortcuts detected with the same key combination!',\n\t\t\tshortcuts\n\t\t);\n\t\treturn;\n\t}\n\n\tfor (const componentTagName of componentTagNames) {\n\t\tconst activeElement = getActiveElement();\n\t\tconst element = findNearestParentElement(activeElement, componentTagName);\n\n\t\tif (element) {\n\t\t\treturn getReturnValue(shortcuts, element);\n\t\t}\n\t}\n\n\t// Reversing because we need to favor now-uxf-tab-set over now-contextual-sidebar when searching top down as the tab set should always come before the sidebar\n\tfor (const componentTagName of componentTagNames.reverse()) {\n\t\tconst element = findFirstChildElement(componentTagName);\n\t\tif (element) {\n\t\t\treturn getReturnValue(shortcuts, element);\n\t\t}\n\t}\n};\n","import {shortcutLogger as console} from './getLogger';\nimport {SUPPORTED_SPECIAL_CHARACTERS, KEY_PREFIXES} from './constants';\n\n/**\n * @function isAlphabetic\n *\n * @description Uses regex to test if the given character is alphabetic\n *\n * @param {String} char\n *\n * @returns {Boolean}\n */\nfunction isAlphabetic(char) {\n\treturn /^[a-zA-Z]$/.test(char);\n}\n\n/**\n * @function isNumeric\n * @description Evaluates if a given value is a numeric string\n * @param {String} char\n * @returns {Boolean}\n */\nexport const isNumeric = (char) => /[0-9]+/.test(`${char}`);\n\n// Keeping for now, but currently no longer needed.\n// Added a User Restriction in Miro that shift-enabled special characters are not supported\n// https://miro.com/app/board/uXjVMcMU5Hs=/?moveToWidget=3458764552676725388&cot=14\n// function isSpecialCharacter(char) {\n// \tvar regex = /[!@#$%^&*()_+\\-=\\[\\]{};':\"\\\\|,.<>\\/?]/;\n// \treturn regex.test(char);\n// }\n\n/**\n * @function formatKeyCode\n *\n * @description Formats the key stored in sys_ux_keyboard_shortcut.shortcut into the equivlent KeyboardEvent:code string\n *\n * @param {KeyboardEvent.code} key\n *\n * @returns {String}\n */\nexport const formatKeyCode = (key) => {\n\tswitch (key) {\n\t\tcase ';':\n\t\t\treturn SUPPORTED_SPECIAL_CHARACTERS.SEMICOLON;\n\t\tcase '[':\n\t\t\treturn SUPPORTED_SPECIAL_CHARACTERS.BRACKET_LEFT;\n\t\tcase ']':\n\t\t\treturn SUPPORTED_SPECIAL_CHARACTERS.BRACKET_RIGHT;\n\t\tcase \"'\":\n\t\t\treturn SUPPORTED_SPECIAL_CHARACTERS.QUOTE;\n\t\tcase ',':\n\t\t\treturn SUPPORTED_SPECIAL_CHARACTERS.COMMA;\n\t\tcase '.':\n\t\t\treturn SUPPORTED_SPECIAL_CHARACTERS.PERIOD;\n\t\tcase '/':\n\t\t\treturn SUPPORTED_SPECIAL_CHARACTERS.SLASH;\n\t\tcase '-':\n\t\t\treturn SUPPORTED_SPECIAL_CHARACTERS.DASH;\n\t\tcase '=':\n\t\t\treturn SUPPORTED_SPECIAL_CHARACTERS.EQUAL;\n\t\tdefault:\n\t\t\tif (isAlphabetic(key)) {\n\t\t\t\treturn `${KEY_PREFIXES.KEY}${key}`;\n\t\t\t} else if (isNumeric(key)) {\n\t\t\t\treturn `${KEY_PREFIXES.DIGIT}${key}`;\n\t\t\t}\n\t\t\tconsole.error(`Key '${key}' is not supported for keyboard shortcuts!`);\n\t}\n};\n","import {formatKeyCode} from './keyFormatter';\nimport {get} from '@devsnc/snowdash';\nimport {shortcutLogger as console} from './getLogger';\n/**\n * @function prettifyMacShortcut\n *\n * @description Prettifies Mac KeyboardMetadata to user-friendly keyboard commands. NOTE: Mac shortcuts do not support ctrlKey!\n * @param {KeyboardMetadata} keys\n *\n * @example\n *\n * const macShortcut = {\n * \tmetaKey: true,\n * \tshiftKey: true,\n * \taltKey: false,\n * \tkey: \"s\"\n * }\n *\n * const prettyShortcut = prettifyMacShortcut(macShortcut);\n *\n * console.log(prettyShortcut); // Outputs \"Cmd + Shift + s\"\n *\n * @returns {String} - Prettified Mac representation of KeyboardMetadata\n */\nexport const prettifyMacShortcut = (keys) => {\n\tconst shortcutPretty = [];\n\tconst {metaKey, altKey, shiftKey, key} = keys;\n\n\tif (metaKey) {\n\t\tshortcutPretty.push('Cmd');\n\t}\n\n\tif (altKey) {\n\t\tshortcutPretty.push('Opt');\n\t}\n\n\tif (shiftKey) {\n\t\tshortcutPretty.push('Shift');\n\t}\n\n\tshortcutPretty.push(key);\n\n\treturn shortcutPretty.join(' + ');\n};\n\n/**\n * @function prettifyWindowsShortcut\n *\n * @description Prettifies Windows KeyboardMetadata to user-friendly keyboard commands. NOTE: Windows shortcuts do not support metaKey!\n * @param {KeyboardMetadata} keys\n *\n * @example\n *\n * const windowsShortcut = {\n * \tctrlKey: true,\n * \tshiftKey: true,\n * \taltKey: false,\n * \tkey: \"s\"\n * }\n *\n * const prettyShortcut = prettifyWindowsShortcut(windowsShortcut);\n *\n * console.log(prettyShortcut); // Outputs \"Ctrl + Shift + s\"\n *\n * @returns {String} - Prettified Windows representation of KeyboardMetadata\n */\nexport const prettifyWindowsShortcut = (keys) => {\n\tconst shortcutPretty = [];\n\tconst {ctrlKey, altKey, shiftKey, key} = keys;\n\n\tif (ctrlKey) {\n\t\tshortcutPretty.push('Ctrl');\n\t}\n\n\tif (altKey) {\n\t\tshortcutPretty.push('Alt');\n\t}\n\n\tif (shiftKey) {\n\t\tshortcutPretty.push('Shift');\n\t}\n\n\tshortcutPretty.push(key);\n\n\treturn shortcutPretty.join(' + ');\n};\n\n/**\n * Formats shortcut code.\n * @param {KeyboardMetadata} shortcut\n * @returns {KeyboardMetadata}\n */\nconst formatShortcutCode = (shortcut) => ({\n\t...shortcut,\n\tcode: formatKeyCode(shortcut.key).toLowerCase()\n});\n\n/**\n * @function transformShortcutKeys\n *\n * @description Formats the mac.key & windows.key to the appropriate KeyboardEvent.code\n *\n * @param {PlatformShortcuts} platformShortcuts\n *\n * @returns {PlatformShortcuts}\n */\nexport const transformShortcutKeys = (platformShortcuts) => ({\n\tmac: platformShortcuts.mac\n\t\t? formatShortcutCode(platformShortcuts.mac)\n\t\t: undefined,\n\twindows: platformShortcuts.windows\n\t\t? formatShortcutCode(platformShortcuts.windows)\n\t\t: undefined\n});\n\n/**\n * @function toBoolean\n *\n * @description Converts a string to a boolean\n *\n * @param {String|Boolean} value - The value to check\n *\n * @returns {Boolean} - If value is string, returns result of comparing against 'true', otherwise will return value\n */\nexport const toBoolean = (value) => {\n\tswitch (typeof value) {\n\t\tcase 'string':\n\t\t\treturn value.toLowerCase() === 'true';\n\t\tcase 'boolean':\n\t\t\treturn value;\n\t\tdefault:\n\t\t\tconsole.error('toBoolean: Invalid value type');\n\t\t\tbreak;\n\t}\n};\n\n/**\n * @function areShortcutsEnabled\n *\n * @description Checks if keyboard shortcuts are enabled for the user via userPrefs or instance via sysprops\n *\n * @returns {Boolean} - True if keyboard shortcuts are enabled, false otherwise\n */\nexport const areShortcutsEnabled = () => {\n\tconst shortcutsEnabledUserPref = get(\n\t\twindow,\n\t\t['ux_globals', 'userPrefs', ['glide.ui.keyboard.shortcuts.enabled']],\n\t\ttrue\n\t);\n\n\t// ux_globals.keyboardShortcutsEnabled translates to glide.ui.keyboard.shortcuts.enabled sysProp on the server\n\tconst shortcutsEnabledSysProp = get(\n\t\twindow,\n\t\t['ux_globals', 'keyboardShortcutsEnabled'],\n\t\ttrue\n\t);\n\n\treturn (\n\t\ttoBoolean(shortcutsEnabledUserPref) && toBoolean(shortcutsEnabledSysProp)\n\t);\n};\n\n/**\n * @function isUserLoggedIn\n *\n * @description Checks if the user is logged in via the ux_globals object\n *\n *  @returns {Boolean} - True if the user is logged in, false otherwise\n */\nexport const isUserLoggedIn = () =>\n\tget(window, ['ux_globals', 'session', 'output', 'isLoggedIn'], false);\n","import {COMPONENT_ID, HIDDEN, COLLAPSED} from './constants';\n\n/**\n * @function checkVisibility\n *\n * @description Checks if an element is visible on the page\n *\n * @param {HTMLElement} element - The element to check\n *\n * @returns {Boolean} - Whether or not the element is visible\n */\nexport const checkVisibility = (element) => {\n\tconst computedStyles = window.getComputedStyle(element);\n\tconst {visibility} = computedStyles;\n\tif (visibility === HIDDEN || visibility === COLLAPSED) {\n\t\treturn false;\n\t}\n\n\t// getBoundingClientRect().toJSON() breaks unit tests!\n\tconst rect = JSON.parse(JSON.stringify(element.getBoundingClientRect()));\n\tconst rectValues = Object.values(rect);\n\n\treturn rectValues.some((val) => val !== 0);\n};\n\n/**\n * @function isSeismicElement\n *\n * @description Checks if an element is a seismic component\n *\n * @param {HTMLElement} element - The element to check\n *\n * @returns {Boolean} - Whether or not the element is a seismic component\n */\nexport const isSeismicElement = (element) =>\n\t(element.tagName || '').includes('-') && element.hasAttribute(COMPONENT_ID);\n","import {shortcutLogger as console} from './helpers/getLogger';\nimport {set} from '@devsnc/snowdash';\nimport {KBS_MODAL_CLOSED, KBS_MODAL_OPENED} from './helpers';\n\n/**\n * @constant ContextManagerSingleton\n *\n * @description - Singleton for managing the context of the keyboard shortcuts. Currently only used for modals\n */\nconst ContextManagerSingleton = (function () {\n\treturn {\n\t\tgetInstance() {\n\t\t\tif (!window.uxfTriggerLibrary?.contextManager) {\n\t\t\t\tset(window, ['uxfTriggerLibrary', 'contextManager'], {});\n\t\t\t}\n\n\t\t\treturn window.uxfTriggerLibrary.contextManager;\n\t\t}\n\t};\n})();\n\nexport const ContextManager = ContextManagerSingleton.getInstance();\n\n/**\n * @function setModalContext\n *\n * @description - Sets the modal context based on the event detail\n *\n * @param {obj} detail - The event details. Used to determine if a modal is opened or closed.\n */\nexport const setModalContext = (detail) => {\n\tconst {payload, type} = detail;\n\tconst {host} = payload;\n\n\tContextManager.modalContext = type === KBS_MODAL_OPENED ? host : null;\n\tContextManager.isModalOpen = type === KBS_MODAL_OPENED;\n\tconsole.log(`Modal ${type === KBS_MODAL_OPENED ? 'opened' : 'closed'}`);\n};\n\n/**\n * @function initializeContextListeners\n *\n * @description - Initializes the listeners for the context manager\n */\nexport const initializeContextListeners = () => {\n\twindow.addEventListener(KBS_MODAL_CLOSED, (e) => {\n\t\tsetModalContext(e.detail);\n\t});\n\n\twindow.addEventListener(KBS_MODAL_OPENED, (e) => {\n\t\tsetModalContext(e.detail);\n\t});\n};\n","import {getComponentFromRegistry} from '../componentRegistry';\nimport {APP_SHELL_COMPONENTS, APP_SHELL_MODAL_HOIST} from './constants';\nimport {ContextManager} from '../contextManager';\nimport {checkVisibility} from './domHelpers';\n\n/**\n * @function shadowQuerySelectorAll\n *\n * @description Finds and returns an array of all elements across shadow roots\n * that match the selector in the order of their position in the DOM.  If the selector\n * is an element attribute you must wrap the string in square brackets.\n * @param  {String} selector selector\n * @param  {Node} root root node\n * @param {Number} maxDepth maximum depth the function will recurse to\n * @param {Number} currentDepth current depth of the recursion\n * @return {Array<Node>} returns the array of all matching elements across shadow roots\n */\nexport const shadowQuerySelectorAll = (\n\tselector,\n\troot = document,\n\tmaxDepth = Infinity,\n\tcurrentDepth = 0\n) => {\n\tif (!selector || currentDepth > maxDepth) return [];\n\n\tconst expandedNodes = [];\n\n\tif (root.shadowRoot) root = root.shadowRoot;\n\n\t// Create a Set for O(1) lookups\n\tconst nodesThatMatchedOriginalSelector = new Set(\n\t\troot.querySelectorAll(selector)\n\t);\n\n\t// Use the joined selector to fetch nodes, the component-id finds elements with shadowroots\n\tconst nodes = root.querySelectorAll(`[component-id], ${selector}`);\n\n\tnodes.forEach((node) => {\n\t\t// if the shadowrooted node matches the original selector add it to the\n\t\t// results before any of its matching children to maintain DOM position order\n\t\tif (nodesThatMatchedOriginalSelector.has(node)) {\n\t\t\texpandedNodes.push(node);\n\t\t}\n\t\t// add all matching child elements recursively\n\t\tif (node.shadowRoot) {\n\t\t\tconst childNodes = shadowQuerySelectorAll(\n\t\t\t\tselector,\n\t\t\t\tnode,\n\t\t\t\tmaxDepth,\n\t\t\t\tcurrentDepth + 1\n\t\t\t);\n\t\t\texpandedNodes.push(...childNodes); // spread the results directly into the array\n\t\t}\n\t});\n\n\treturn expandedNodes;\n};\n\n/**\n * @function validateElement\n *\n * @description Validates the element passed exists in the component registry\n *\n * @param {HTMLElement} element Element to check\n *\n * @returns {Boolean} Whether the element is valid or not\n */\nconst validateElement = (element) =>\n\telement !== null && element.nowId && getComponentFromRegistry(element.nowId);\n\n/**\n * @function shadowQuerySelector\n *\n * @description Finds and returns the first element across shadow roots\n * that matches the selector\n * @param  {String} selector selector\n * @param  {Node} root root node\n * @return {Node} returns the first node that matches the selector\n */\nexport const shadowQuerySelector = (selector, root = document) => {\n\tif (!selector) return [];\n\t// adding component-id to the selector so it finds elements with shadowroots\n\n\tif (root.shadowRoot) root = root.shadowRoot;\n\tconst singleNode = root.querySelector(selector);\n\tif (singleNode) {\n\t\treturn singleNode;\n\t}\n\tconst shadowRootNodes = root.querySelectorAll('[component-id]');\n\n\tlet result;\n\tshadowRootNodes.forEach((node) => {\n\t\tif (!result) {\n\t\t\t// add all matching child elements recursively\n\t\t\tresult = shadowQuerySelector(selector, node);\n\t\t}\n\t});\n\treturn result;\n};\n/**\n * @function queryDeepBySelector\n *\n * @description Queries nested shadow root elements for a given selector under the root element param (parent element). Returns the first element found within the DOM\n *\n * @param {String} selector - The CSS selector used to query for elements\n * @param {Element|Document|ShadowRoot} parentElement - Parent Element to start querying under. The root Document is used by default\n *\n * @returns {Element} - First matching element\n */\nconst queryDeepBySelector = (selector, parentElement = document.body) => {\n\t// Search for matching elements in the current root\n\tconst element = parentElement.querySelector(selector);\n\n\tif (element) {\n\t\treturn element;\n\t}\n\n\tconst nestedElements = Array.from(parentElement.querySelectorAll('*'));\n\n\tif (parentElement?.shadowRoot && nestedElements.length === 0) {\n\t\tconst element = queryDeepBySelector(selector, parentElement.shadowRoot);\n\t\tif (element) {\n\t\t\treturn element;\n\t\t}\n\t}\n\n\tfor (const nestedElement of nestedElements) {\n\t\tconst {shadowRoot} = nestedElement;\n\n\t\tif (shadowRoot) {\n\t\t\tconst element = queryDeepBySelector(selector, shadowRoot);\n\t\t\t// When traversing the dom from the document body its possible we encounter elements that match our selector\n\t\t\t// but are not applicable components for an action, they are not visible.\n\t\t\tif (element && checkVisibility(element)) {\n\t\t\t\treturn element;\n\t\t\t}\n\t\t}\n\t}\n\n\treturn element;\n};\n\n/**\n * @function getActiveExperience\n *\n * @description Gets the currently active sn-canvas-experience-shell element on the page\n *\n * @returns {Element} - The active experience element\n */\nexport const getActiveExperience = () => {\n\tconst appShellLayout = queryDeepBySelector('sn-canvas-appshell-layout');\n\tconst experiences = shadowQuerySelectorAll('sn-canvas-experience-shell');\n\n\t// If there is only one then we can safely assume this is the currently active experience\n\tif (experiences.length === 1) {\n\t\treturn experiences.pop();\n\t}\n\n\t// There's a bug with sn-canvas-experience-shell where both experienceData.isActive props are false\n\t// when one is currently active. The appShellLayout is the central source of truth so we need to grab the key\n\t// to get the active experience\n\tconst activeExperience = (() => {\n\t\tif (!appShellLayout) return '';\n\t\tfor (const [key, value] of appShellLayout.experiencesData.entries()) {\n\t\t\tif (value.isActive === true) return key;\n\t\t}\n\t})();\n\n\t// Match against the active experience in appshell-layout\n\treturn experiences.find(\n\t\t(experience) =>\n\t\t\texperience.experienceData.experiencePath === activeExperience\n\t);\n};\n\n// TODO - There's an intermittent bug where all shortcuts will show up regardless of the active screen. Thinking it's due to some bug within UXR not seeing isActive in all cases\n/**\n * @function getActiveScreen\n *\n * @description Gets the currently active sn-canvas-screen element on the page\n *\n * @returns {Element} - The active screen element\n */\nexport const getActiveScreen = () => {\n\tconst activeExperience = getActiveExperience();\n\tconst screens = shadowQuerySelectorAll('sn-canvas-screen', activeExperience);\n\tconst activeScreen = screens.find((screen) => screen.screenData.isActive);\n\n\treturn activeScreen;\n};\n\n/**\n * @function findNearestParentElement\n *\n * @description Finds the nearest parent element with the given tag name\n *\n * @param {Element} element Current element to query against\n * @param {String} tagName Element tag name to search for\n * @param {Boolean} shouldValidateElement - Whether to validate the element or not\n *\n * @returns {Element} - The nearest parent element with the given tag name\n */\nexport const findNearestParentElement = (\n\telement,\n\ttagName,\n\tshouldValidateElement = true\n) => {\n\tif (!element || !tagName || element.tagName === 'BODY') {\n\t\treturn null;\n\t}\n\n\tif (\n\t\telement.tagName.toLowerCase() === tagName &&\n\t\t(!shouldValidateElement || validateElement(element))\n\t) {\n\t\treturn element;\n\t}\n\n\t// find closest parent\n\tconst ancestor = element.closest(tagName);\n\tif (ancestor && (!shouldValidateElement || validateElement(ancestor))) {\n\t\treturn ancestor;\n\t}\n\n\tif (element.getRootNode?.().host) {\n\t\t// Check if the element is within a shadow root\n\t\tconst shadowRoot = element.getRootNode().host;\n\t\tconst closest = shadowRoot.closest(tagName);\n\t\tif (closest && (!shouldValidateElement || validateElement(closest))) {\n\t\t\treturn closest;\n\t\t}\n\t\treturn findNearestParentElement(shadowRoot, tagName, shouldValidateElement);\n\t}\n\n\t/**\n\t * traverse up the dom tree - in theory, we should never hit this condition\n\t * because all seismic components are in a shadow root - at some point\n\t * we're going to find the parent by looking at the shadow root\n\t */\n\treturn findNearestParentElement(\n\t\telement.parentElement,\n\t\ttagName,\n\t\tshouldValidateElement\n\t);\n};\n\n/**\n * @function isChildOfRootElement\n *\n * @description Checks if the childElement is a child of the rootElement\n *\n * @param {HTMLElement} rootElement - Root element to check if childElement is a child of\n * @param {HTMLElement} childElement - Child element to check if it is a child of rootElement\n * @returns {Boolean} - Whether the childElement is a child of rootElement\n */\nexport const isChildOfRootElement = (rootElement, childElement) => {\n\tfunction isChildOf(parent, child) {\n\t\tif (parent.contains(child)) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif (parent.shadowRoot) {\n\t\t\tconst {shadowRoot} = parent;\n\n\t\t\tif (isChildOf(shadowRoot, child)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\tconst {childNodes} = parent;\n\t\tfor (const node of childNodes) {\n\t\t\tif (node.nodeType === Node.ELEMENT_NODE) {\n\t\t\t\tif (isChildOf(node, child)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}\n\n\treturn isChildOf(rootElement, childElement);\n};\n\n/**\n * @function getRootElement\n *\n * @description Gets the root element component to start querying from; Modal, Document or Active Screen\n *\n * @param {String} componentTagName - Component tag name to query for in the DOM\n *\n * @returns {HTMLElement} - Root element to start querying from\n */\nconst getRootElement = (componentTagName) => {\n\tif (ContextManager.isModalOpen) {\n\t\t// Modal was opened, need to query from sn-canvas-modal-hoist\n\t\t// TODO - May need to rethink this strategy when Polaris App Shell implements their shortcut directory modal as this will need to render on top of current modal\n\t\treturn queryDeepBySelector(APP_SHELL_MODAL_HOIST);\n\t}\n\n\t// Need to query from the active screen for all components except for the app shell components\n\treturn APP_SHELL_COMPONENTS.includes(componentTagName)\n\t\t? document.body\n\t\t: getActiveScreen();\n};\n\n/**\n * @function findFirstChildElement\n *\n * @description Queries for the first element in the DOM matching the component tag name\n *\n * @param {String} componentTagName - Component tag to query for in the DOM\n * @param {HTMLElement} rootElement - Root element to query for the target component\n * @param {Boolean} shouldValidateElement - Whether to validate the element or not\n *\n * @returns {HTMLElement} - Root element to query for the target component\n */\nexport const findFirstChildElement = (\n\tcomponentTagName,\n\trootElement = getRootElement(componentTagName),\n\tshouldValidateElement = true\n) => {\n\tconst element = queryDeepBySelector(componentTagName, rootElement);\n\n\tif (element && (!shouldValidateElement || validateElement(element))) {\n\t\treturn element;\n\t}\n\n\treturn findFirstChildElement(\n\t\tcomponentTagName,\n\t\telement || rootElement,\n\t\tshouldValidateElement\n\t);\n};\n\n/**\n * @function getActiveElement\n *\n * @description Iterates through the Shadow DOM and gets the activeElement\n *\n * @param {Document|ShadowRoot} root\n *\n * @returns {Element} active element in the DOM\n */\nexport const getActiveElement = (root = document) => {\n\tconst activeEl = root.activeElement;\n\n\tif (!activeEl) {\n\t\treturn null;\n\t}\n\n\tif (activeEl.shadowRoot) {\n\t\treturn getActiveElement(activeEl.shadowRoot);\n\t}\n\treturn activeEl;\n};\n\n/**\n * @function getTargetElement\n *\n * @description Gets the target element to execute the appropriate action\n *\n * @param {String} componentTagName - Component tag name to query for in the DOM\n *\n * @returns {HTMLElement}\n */\nexport const getTargetElement = (componentTagName) => {\n\tconst activeElement = getActiveElement();\n\n\tconst element =\n\t\tactiveElement === document.body\n\t\t\t? null\n\t\t\t: findNearestParentElement(activeElement, componentTagName);\n\n\tif (element) {\n\t\treturn element;\n\t}\n\n\treturn findFirstChildElement(componentTagName);\n};\n","import {findNearestParentElement} from './helpers/querySelectors';\nimport {set} from '@devsnc/snowdash';\nimport {shortcutLogger as console} from './helpers/getLogger';\n\nconst ComponentRegistrySingleton = (function () {\n\treturn {\n\t\tgetInstance() {\n\t\t\tif (!window?.uxfTriggerLibrary?.componentRegistry) {\n\t\t\t\tset(window, ['uxfTriggerLibrary', 'componentRegistry'], new Map());\n\t\t\t}\n\t\t\treturn window.uxfTriggerLibrary.componentRegistry;\n\t\t}\n\t};\n})();\n\nexport const ComponentRegistry = ComponentRegistrySingleton.getInstance();\n\nexport const transformAction = (action) => ({\n\tactive: action.active !== undefined ? action.active : true,\n\taction: typeof action === 'function' ? action : action.action\n});\n\n/**\n * @function transformActionMap\n *\n * @description - Transforms an action map to the new format with active status\n *\n * @param {Object} actionMap - An object of action handlers defining reactions to user keyboard input\n *\n * @returns {Object} - New action map format\n */\nexport const transformActionMap = (actionMap) => {\n\tconst transformedActionMap = {};\n\n\tObject.entries(actionMap).forEach(([actionKey, action]) => {\n\t\ttransformedActionMap[actionKey] = transformAction(action);\n\t});\n\n\treturn transformedActionMap;\n};\n\n/**\n * @function mergeActionMaps\n * @description takes two actionmaps belonging to a single component being\n * registered through registerComponent and merges it into a single actionMap.\n * @param {Object} originalActionMap\n * @param {Object} registryValueActionMap\n * @returns A single object of both maps.\n */\nconst mergeActionMaps = (originalActionMap, registryValueActionMap) => {\n\tconst mergedMap = {...originalActionMap};\n\tfor (const actionKey in registryValueActionMap) {\n\t\tif (!mergedMap[actionKey]) {\n\t\t\tmergedMap[actionKey] = registryValueActionMap[actionKey];\n\t\t}\n\t}\n\treturn mergedMap;\n};\n\n/**\n * @function setComponentInRegistry\n * @description If component has already been registered, merge their action maps, otherwise set component\n * into registry as normal.\n * @param {String} nowId\n * @param {ComponentRegistryMetadata} registryValue\n */\nconst setComponentInRegistry = (nowId, registryValue) => {\n\tconst registeredComponent = ComponentRegistry.get(nowId.toUpperCase());\n\tif (registeredComponent) {\n\t\t// Already registered.\n\t\tregistryValue.actionMap = mergeActionMaps(\n\t\t\tregisteredComponent.actionMap,\n\t\t\tregistryValue.actionMap\n\t\t);\n\t}\n\n\tComponentRegistry.set(nowId.toUpperCase(), registryValue);\n\n\tconsole.log(\n\t\t`Registered component ${registryValue.registeredElement.tagName} - ${nowId}:`,\n\t\tregistryValue\n\t);\n};\n\n/**\n * @function registerComponent\n *\n * @description - Registers a component in the keyboard shortcut component registry\n *\n * @example\n *\n * let registeredId = \"\";\n *\n * actionHandlers: {\n * [actionTypes.COMPONENT_BOOTSTRAPPED]({host, dispatch, updateState, properties}) {\n * \tregisteredId = registerComponent(host, {\n * \t\tparentComponentTagName: 'now-record-common-uiactionbar',\n * \t\tupdateState,\n * \t\tactionMap: {\n * \t\t\t['TRIGGER_SOMETHING']({payload, properties, state}) {\n * \t\t\t\tconst {someStateValue} = state;\n * \t\t\t\tconst {someProp} = properties;\n * \t\t\t\tdispatch('MY_ACTION', {someProp, someStateValue});\n * \t\t\t},\n * \t\t},\n * \t});\n * }\n * @param {HTMLElement} host - host element\n * @param {Object} metadata - object containing keyboard action metadata\n * @param {String} metadata.parentComponentTagName - parent component of an \"internal component\". Parent Component must have an associated sys_ux_macroponent record. This is required when the host.tagName does not have an associated sys_ux_macroponent record\n * @param {Function} metadata.updateState - updateState function from Seismic actionHandler\n * @param {Object} metadata.actionMap - an object of action handlers defining reactions to user keyboard input\n *\n * @returns {String} nowId of registered component. Only needed when updating available actions\n */\nexport const registerComponent = (host, metadata) => {\n\tif (!host) {\n\t\tconsole.warn(\n\t\t\t'Failed to register component for shortcuts. Host element null or undefined.'\n\t\t);\n\t\treturn;\n\t}\n\n\tif (!metadata?.actionMap || !metadata?.updateState) {\n\t\tconsole.warn(\n\t\t\t'Failed to register component for shortcuts. Second param must contain both actionMap and updateState!',\n\t\t\thost\n\t\t);\n\t\treturn;\n\t}\n\n\tconst {parentComponentTagName, actionMap, updateState} = metadata;\n\n\t// Resolving the correct nowId attribute:\n\t// When parentComponentTagName is not present, it is assumed the host element is a component that has an associated sys_ux_macroponent element\n\t// When parentComponentTagName is present, it means an \"internal component\" is being registered (i.e. no sys_ux_macroponent) and we need to grab the parent component tag's nowId\n\tconst registeredElement = parentComponentTagName\n\t\t? findNearestParentElement(host, parentComponentTagName, false)\n\t\t: host;\n\tconst {nowId} = registeredElement;\n\tconst registryValue = {\n\t\tregisteredElement,\n\t\thost,\n\t\tupdateState,\n\t\tactionMap: transformActionMap(actionMap)\n\t};\n\n\tsetComponentInRegistry(nowId, registryValue);\n\n\treturn nowId;\n};\n\n/**\n * @function deregisterComponent\n *\n * @description - Deregisters a component from the keyboard shortcut component registry\n *\n * @param {String} nowId - The id returned from registerComponent()\n */\nexport const deregisterComponent = (nowId) => {\n\tif (!nowId) {\n\t\tconsole.warn(\n\t\t\t'Failed to deregister component from registry. nowId must be provided.'\n\t\t);\n\t\treturn;\n\t}\n\n\tComponentRegistry.delete(nowId.toUpperCase());\n\tconsole.log(`Deregistered component ${nowId}`);\n};\n\n/**\n * @function getComponentFromRegistry\n *\n * @description - Gets a component from the registry matching the passed nowId\n *\n * @param {String} nowId - The seismic nowId attribute of the component\n *\n * @returns {ComponentRegistryMetadata}\n */\nexport const getComponentFromRegistry = (nowId) =>\n\tComponentRegistry.get(nowId.toUpperCase());\n\n/**\n * @function getAllComponentsFromRegistry\n *\n * @description - Gets all values from the component registry\n *\n * @returns {Array<ComponentRegistryMetadata>}\n */\nexport const getAllComponentsFromRegistry = () =>\n\tArray.from(ComponentRegistry.values());\n","/**\n * @typedef {Object} ShortcutsState\n * @property {Boolean} active - Whether or not UX Keyboard Shortcuts are active and handle keyboard events.\n * @property {Boolean} initialized - Whether shortcuts initialized (loaded and registered OOB and Overriden shortcuts).\n */\n\n/**\n * Parameters that are allowed to be set in the shortcuts state.\n * @typedef {Object} SetShortcutsStateParams\n * @property {Boolean} active - Whether or not UX Keyboard Shortcuts are active and handle keyboard events.\n */\n\n/**\n * UX Keyboard Shortcut Active state.\n * When set to false, prevents keyboard events to be handled by shortcut engine.\n * @type {ShortcutsState}\n */\nconst shortcutState = {\n\tactive: true,\n\tinitialized: false\n};\n\n/**\n * @returns {ShortcutsState} - Whether or not UX Keyboard Shortcuts are active.\n */\nexport const getShortcutsState = () => ({...shortcutState});\n\n/**\n * Applies allowed UX Keyboard Shortcuts state parameters.\n * @param {SetShortcutsStateParams} newStateParams - New state parameters to apply.\n */\nexport const setShortcutsState = (newStateParams = {}) => {\n\tif (Object.hasOwn(newStateParams, 'active')) {\n\t\tif (typeof newStateParams.active !== 'boolean') {\n\t\t\tthrow new Error('Invalid parameter type. \"active\" must be a boolean.');\n\t\t}\n\t\tshortcutState.active = newStateParams.active;\n\t}\n};\n\n/**\n * Array of objects with Promise resolvers that resolve once shortcuts initialized.\n * @type {Array<Object>}\n */\nconst initializedPromiseResolvers = [];\n\n/**\n * Internal function to register initialized state and notify {@link onShortcutInitialize} listeners\n * @param {Boolean} initialized - Whether shortcuts are initialized.\n */\nexport const setInitialized = (initialized) => {\n\tshortcutState.initialized = initialized;\n\tif (!shortcutState.initialized) {\n\t\treturn;\n\t}\n\tfor (const promiseResolver of initializedPromiseResolvers) {\n\t\tpromiseResolver.resolve();\n\t}\n\t// Clear the array of resolved promises.\n\tinitializedPromiseResolvers.splice(0, initializedPromiseResolvers.length);\n};\n\n/**\n * Returns a Promise that resolves once shortcuts are initialized.\n * Note: The returned Promise does not reject. Any failures during shortcuts initialization fallback\n * gracefully.\n * @returns {Promise<void>}\n */\nexport const onShortcutsInitialized = () => {\n\tif (shortcutState.initialized) {\n\t\treturn Promise.resolve();\n\t}\n\treturn new Promise((resolve) => {\n\t\tinitializedPromiseResolvers.push({resolve});\n\t});\n};\n","import {getAllComponentsFromRegistry} from './componentRegistry';\nimport {\n\tACTION_BAR,\n\tcheckVisibility,\n\tisChildOfRootElement,\n\tSN_POLARIS_LAYOUT\n} from './helpers';\nimport {isNil} from '@devsnc/snowdash';\nimport {ContextManager} from './contextManager';\n\n/**\n * @function filterActiveComponents\n *\n * @description - Filters out components that are not visible or have no active actions.\n * If Modal is opened, it will only include shortcuts that are applicable to components in the modal.\n * Also if modal is opened, it will always return polaris-app-shell and will later only include the shortcut directory modal shortcut\n *\n * @param {HTMLElement} component - The component to filter\n *\n * @returns {Boolean} - Whether or not the component is visible with active actions\n */\nexport const filterActiveComponents = (component) => {\n\t// We always need to allow polaris-app-shell if the modal is opened (for shortcut directory modal), but will filter out the non-shortcut modal shortcuts in the getApplicableComponents method\n\tconst modalCase =\n\t\t!ContextManager.isModalOpen ||\n\t\t(ContextManager.isModalOpen &&\n\t\t\t(isChildOfRootElement(\n\t\t\t\tContextManager.modalContext,\n\t\t\t\tcomponent.registeredElement\n\t\t\t) ||\n\t\t\t\tcomponent.registeredElement.tagName === SN_POLARIS_LAYOUT));\n\n\treturn (\n\t\tcheckVisibility(component.registeredElement) &&\n\t\tObject.values(component.actionMap).some((action) => action.active) &&\n\t\tmodalCase\n\t);\n};\n\n/**\n * @class ApplicableComponentAdapter\n *\n * @classdesc Adapter used to link applicable components from the component registry to keyboard shortcuts\n */\nexport class ApplicableComponentAdapter {\n\tconstructor() {\n\t\tthis._setActiveComponents();\n\t}\n\n\t/**\n\t * @function _setActiveComponents\n\t *\n\t * @description - Internal use only! Sets the active components for the current page\n\t */\n\t_setActiveComponents() {\n\t\tthis.activeComponents = getAllComponentsFromRegistry().filter(\n\t\t\tfilterActiveComponents\n\t\t);\n\t}\n\n\t/**\n\t * @function getActiveComponents\n\t *\n\t * @description Gets all registered components relevant to the current page that have active actions\n\t *\n\t * @returns {Array<ComponentRegistryMetadata>} - Array of components which have active actions and match the currently active page\n\t */\n\tgetActiveComponents() {\n\t\treturn this.activeComponents;\n\t}\n\n\t/**\n\t * @function getApplicableElements\n\t *\n\t * @description Gets all component instances that are applicable to a specific shortcut\n\t *\n\t * @param {String} componentTagName - The tag name of the component to get applicable elements for\n\t * @param {String} actionKey - The action key to filter against\n\t * @param {Object} actionPayload - The action payload to filter against when componentTagName is ACTION_BAR\n\t *\n\t * @returns {Array<ComponentRegistryMetadata>} - Array of applicable components\n\t *\n\t */\n\tgetApplicableComponents(componentTagName, actionKey, actionPayload) {\n\t\treturn this.activeComponents\n\t\t\t.filter(\n\t\t\t\t(component) =>\n\t\t\t\t\tcomponent.registeredElement.tagName === componentTagName.toUpperCase()\n\t\t\t)\n\t\t\t.filter((component) => {\n\t\t\t\tconst {actionMap} = component;\n\n\t\t\t\treturn (\n\t\t\t\t\tObject.keys(actionMap).includes(actionKey) &&\n\t\t\t\t\tactionMap[actionKey].active\n\t\t\t\t);\n\t\t\t})\n\t\t\t.filter((component) => {\n\t\t\t\tconst {registeredElement} = component;\n\t\t\t\tconst {tagName} = registeredElement;\n\n\t\t\t\treturn (\n\t\t\t\t\ttagName !== ACTION_BAR ||\n\t\t\t\t\tisNil(actionPayload?.actionName) ||\n\t\t\t\t\tcomponent.availableActions.includes(actionPayload.actionName)\n\t\t\t\t);\n\t\t\t});\n\t}\n}\n","/**\n * @class ActionStateQueue\n * @description Array based queue representing the action states that\n * are dependent on shortcut registry\n */\nexport class ActionStateQueue extends Array {\n\tstatic __queue = null;\n\n\t/**\n\t * @function enqueue\n\t * @description Adds an action state to the action state queue\n\t * @param {obj} element - action state to be added to the queue\n\t */\n\tenqueue(element) {\n\t\tActionStateQueue.__queue.push(element);\n\t}\n\n\t/**\n\t * @function dequeue\n\t * @description Removes and returns the next action state in the queue\n\t * @returns the removed action state\n\t */\n\tdequeue() {\n\t\treturn ActionStateQueue.__queue.length > 0\n\t\t\t? ActionStateQueue.__queue.shift()\n\t\t\t: null;\n\t}\n}\n\n/**\n * @function actionStateQueue\n * @description accessor that fufills the singleton for the ActionStateQueue.\n * Provides access to the actionStateQueue methods.\n */\nexport const actionStateQueue = (() => {\n\tif (!ActionStateQueue.__queue) {\n\t\tActionStateQueue.__queue = new ActionStateQueue();\n\t}\n\treturn ActionStateQueue.__queue;\n})();\n\nexport default actionStateQueue;\n","import {\n\tgetShortcutByKey,\n\thasRegisteredShortcuts,\n\tgetShortcutByPayloadCondition\n} from './shortcutRegistry';\nimport {getComponentFromRegistry} from './componentRegistry';\nimport {actionStateQueue} from './helpers/ActionStateQueue';\nimport {shortcutLogger as console} from './helpers/getLogger';\n\n/**\n * @function setComponentAction\n * @description - Toggles the active state of a shortcut action\n * @param {ComponentRegistryMetadata} component - component registered\n * @param {String} actionKey - The key of the action to toggle\n * @param {boolean} [active=true] - The active state to set\n */\nconst setComponentAction = (component, actionKey, active = true) => {\n\tif (!component || !actionKey) {\n\t\tconsole.warn('Failed to set action state - missing params.');\n\t\treturn;\n\t}\n\n\tif (!component.actionMap[actionKey]) {\n\t\tconsole.warn(\n\t\t\t'Failed to set action state - action not found in component action map.'\n\t\t);\n\t\treturn;\n\t}\n\n\tcomponent.actionMap[actionKey].active = active;\n};\n\n/**\n * @function setActionStateByPayload\n * @description Allow for custom payloads to be the identifier for shortcuts using the same defined action\n * @param {ComponentRegistryMetadata} component - component registered\n * @param {String} actionKey - Shortcut action key\n * @param {boolean} [active=true] - State to set the shortcut to\n * @param {Object} payloadCondition - The payload to match with, expecting key:value pairs\n * @example new ActionStateByPayload(registeredComponentId, CLICK_TOOLBAR_BUTTON_SHORTCUT, {'id': id});\n */\nconst setActionStateByPayload = (\n\tcomponent,\n\tactionKey,\n\tactive = true,\n\tpayloadCondition\n) => ({\n\tsetAction() {\n\t\tconst {registeredElement} = component;\n\t\tconst shortcut = getShortcutByPayloadCondition(\n\t\t\tregisteredElement.tagName,\n\t\t\tactionKey,\n\t\t\tpayloadCondition\n\t\t);\n\n\t\tif (shortcut.length) {\n\t\t\tsetComponentAction(component, actionKey, active);\n\t\t}\n\t}\n});\n\n/**\n * @function setActionStateBySysId\n * @description Sets the active state of a shortcut action by shortcut key\n * @param {ComponentRegistryMetadata} component - component registered\n * @param {boolean} [active=true] - State to set the shortcut to\n * @param {String} shortcutDefinitionSysId - sysId belonging to the shortcut definition\n */\nconst setActionStateBySysId = (component, active, shortcutDefinitionSysId) => ({\n\tsetAction() {\n\t\tconst shortcut = getShortcutByKey(shortcutDefinitionSysId);\n\n\t\tif (shortcut) {\n\t\t\tconst {actionKey} = shortcut;\n\t\t\tsetComponentAction(component, actionKey, active);\n\t\t}\n\t}\n});\n\n/**\n * @function setActionStateFactory\n * @description Called outside of now-trigger-library for special case\n * activation of shortcuts. factory for determining the specific use case of set action based on\n * metadata provided. *Implements the factory & decorator patterns, not intended for use\n * outside this file.\n * @param {String} registeredComponentId - nowId returned from registerComponent\n * @param {boolean} active - The active state to set\n * @param {ActionStateMetadata} shortcutMetadata - optional param that represents an object of specific metadata information\n */\nexport const setActionStateForShortcut = (\n\tregisteredComponentId,\n\tactive = true,\n\tshortcutMetadata\n) => {\n\tconst component = getComponentFromRegistry(registeredComponentId);\n\n\tlet handleState;\n\n\tif (shortcutMetadata?.condition) {\n\t\t// Payload Condition\n\t\tconst {actionKey, condition} = shortcutMetadata;\n\t\thandleState = setActionStateByPayload(\n\t\t\tcomponent,\n\t\t\tactionKey,\n\t\t\tactive,\n\t\t\tcondition\n\t\t);\n\t} else if (shortcutMetadata?.shortcutDefinitionSysId) {\n\t\t// Shortcut sysID\n\t\tconst {shortcutDefinitionSysId} = shortcutMetadata;\n\t\thandleState = setActionStateBySysId(\n\t\t\tcomponent,\n\t\t\tactive,\n\t\t\tshortcutDefinitionSysId\n\t\t);\n\t} else if (shortcutMetadata?.actionKey) {\n\t\t// Default Action Key\n\t\tconst {actionKey} = shortcutMetadata;\n\t\tsetComponentAction(component, actionKey, active);\n\t\treturn;\n\t}\n\n\t// Because cases are dependent on whether shortcuts have been registered or not yet,\n\t// Only call setAction() on the object constructed when shortcuts registered.\n\t// Otherwise the object will be added to a queue to later call setAction upon at shortcut registry\n\tif (hasRegisteredShortcuts()) {\n\t\thandleState.setAction();\n\t} else {\n\t\tactionStateQueue.enqueue(handleState);\n\t}\n};\n\n/**\n * @function setActionState\n *\n * @description - Toggles the active state of a shortcut action\n *\n * @param {String} registeredComponentId - The id returned from registerComponent()\n * @param {String} actionKey - The key of the action to toggle\n * @param {String} active - The active state to set\n *\n */\nexport const setActionState = (registeredComponentId, actionKey, active) => {\n\tif (!registeredComponentId || !actionKey || active === undefined) {\n\t\tconsole.warn('Failed to set action state - missing params.');\n\t\treturn;\n\t}\n\n\tconst component = getComponentFromRegistry(registeredComponentId);\n\n\tsetComponentAction(component, actionKey, active);\n};\n\n/**\n * @function setAvailableActions\n *\n * @description - Only intended to be used by the ActionBar component! Used to update a pre-registered component's availableActions array which is used for filtering the shortcut modal\n * @see {@link getContextualizedShortcuts}\n *\n * @example\n * const availableActions = properties\n * \t.actionNodes\n *  .flatMap(node => node.children.flatMap(child => child.action.name));\n *\n *  setAvailableActions(registeredId, availableActions); // registeredId comes from registerComponent();\n *\n * @param {String} nowId - String that was returned from registerComponent()\n * @param {Array<String>} actionNames -  Array of action names to set against the registered component\n */\nexport const setAvailableActions = (nowId, actionNames) => {\n\tconst component = getComponentFromRegistry(nowId);\n\n\tif (!component) {\n\t\tconsole.warn(\n\t\t\t'Failed to set available actions - component not found in registry.'\n\t\t);\n\t\treturn;\n\t}\n\n\tcomponent.availableActions = actionNames;\n};\n\n/**\n * @function setQueuedActionStates\n * @description Empties the queue of action states while calling their\n * setAction statement. See {@link setActionStateForShortcut} for use case where\n * states are enqueued due to registerShortcut race condition.\n */\nexport const setQueuedActionStates = () => {\n\twhile (actionStateQueue.length) {\n\t\tactionStateQueue.dequeue().setAction();\n\t}\n};\n","/* global WeakRef */\nimport {\n\tgetActiveElement,\n\tshadowQuerySelectorAll,\n\tshortcutLogger as console,\n\tcheckVisibility\n} from './helpers';\n\nimport {landmarkConstants} from './helpers/constants';\n\nconst {\n\tLANDMARK_FOCUS_FORWARD,\n\tLANDMARK_FOCUS_BACKWARD,\n\tLANDMARK_FOCUS_ATTR,\n\tLANDMARK_ACTIVE_ELEMENT_ATTR,\n\tLANDMARK_SELECTOR\n} = landmarkConstants;\n\nlet previousLandmark = null;\n\nexport const isLandmarkAction = (actionKey) =>\n\tactionKey === LANDMARK_FOCUS_FORWARD || actionKey === LANDMARK_FOCUS_BACKWARD;\n\nexport const landmarkAction = (actionKey) => {\n\tconst focusIncrement = actionKey === LANDMARK_FOCUS_FORWARD ? 1 : -1;\n\tconst currentActiveElement = getActiveElement();\n\n\tlet processedActiveElement;\n\tif (currentActiveElement.tagName === 'BODY') {\n\t\t// if the body is the current active element it means nothing has focus\n\t\t// or the user clicked a non-focusable part of the page\n\t\tif (window?.uxfTriggerLibrary?.lastClickedElement) {\n\t\t\t// there is a last clicked element, use that\n\t\t\t// note: there is a chance that the user clicks somewhere unfocusable,\n\t\t\t// then tabs to a focusable item, then that focus gets blurred somehow\n\t\t\t// which will cause the body to be the active element but won't reset\n\t\t\t// the last clicked element. This will likely be very rare, and not\n\t\t\t// a big deal even when it does happen but maybe if it gets complained\n\t\t\t// about we could address it somehow.\n\t\t\tprocessedActiveElement =\n\t\t\t\twindow.uxfTriggerLibrary.lastClickedElement.deref?.() ??\n\t\t\t\tcurrentActiveElement;\n\t\t} else {\n\t\t\t// if the body is the active element and there isn't a last-clicked element\n\t\t\t// then we'll use the body directly\n\t\t\tprocessedActiveElement = currentActiveElement;\n\t\t}\n\t} else {\n\t\t// the active element is not the body, so we'll just grab its host\n\t\tprocessedActiveElement = currentActiveElement.getRootNode().host;\n\t}\n\n\t// add this attribute to allow the active element to be included in the\n\t// array of landmarks in its relative position in the DOM\n\tprocessedActiveElement.setAttribute(LANDMARK_ACTIVE_ELEMENT_ATTR, true);\n\t// get all landmark enabled components and the active element\n\tconst landmarks = shadowQuerySelectorAll(LANDMARK_SELECTOR);\n\t// remove the active element attr since it's no longer needed\n\tprocessedActiveElement.removeAttribute(LANDMARK_ACTIVE_ELEMENT_ATTR);\n\tif (landmarks.length === 0) {\n\t\t//this won't happen because there'll always at least be the activeElement\n\t\tconsole.log(\n\t\t\t`[UXF Shortcuts] - Landmark shortcut triggered but there are no landmark elements on the page.`\n\t\t);\n\t\treturn;\n\t}\n\n\tif (landmarks.length === 1) {\n\t\tif (landmarks[0].getAttribute(LANDMARK_FOCUS_ATTR) === 'true') {\n\t\t\tconsole.log(`[UXF Shortcuts] - Focus is already on the only landmark.`);\n\t\t} else {\n\t\t\tconsole.log(\n\t\t\t\t`[UXF Shortcuts] - Landmark shortcut triggered but there are no landmark elements on the page.`\n\t\t\t);\n\t\t}\n\t\treturn;\n\t}\n\n\tconst landmarkIndex = landmarks.indexOf(processedActiveElement);\n\tlet incrementedIndex =\n\t\t(landmarkIndex + landmarks.length + focusIncrement) % landmarks.length;\n\n\twhile (\n\t\tlandmarks[incrementedIndex].getAttribute('component-id') ===\n\t\t\tpreviousLandmark ||\n\t\t(!checkVisibility(landmarks[incrementedIndex]) &&\n\t\t\tincrementedIndex !== landmarkIndex)\n\t) {\n\t\tincrementedIndex =\n\t\t\t(incrementedIndex + landmarks.length + focusIncrement) % landmarks.length;\n\t}\n\tpreviousLandmark = landmarks[incrementedIndex].getAttribute('component-id');\n\tlandmarks[incrementedIndex]?.focus();\n\treturn;\n};\n\n/**\n * @funciton handleLastClicked\n *\n * @description Handles the last clicked element. This is used for landmark focusing shortcuts\n *\n * @param {PointerEvent} e\n */\nexport const handleLastClicked = (e) => {\n\tconst composedPath = e.composedPath();\n\tif (!window.uxfTriggerLibrary) {\n\t\twindow.uxfTriggerLibrary = {lastClickedElement: undefined};\n\t}\n\n\twindow.uxfTriggerLibrary.lastClickedElement = new WeakRef(composedPath[0]);\n};\n\n/**\n * @function hasLandmarksOnPage\n *\n * @description Checks if there are landmarks on the page\n *\n * @returns {Boolean} - Whether or not there are landmarks on the page\n */\nexport const hasLandmarksOnPage = () => {\n\tconst landmarks = shadowQuerySelectorAll(`[${LANDMARK_FOCUS_ATTR}]`);\n\n\tfor (const landmark of landmarks) {\n\t\t// At least one visible landmark on the page.\n\t\tif (checkVisibility(landmark)) {\n\t\t\treturn true;\n\t\t}\n\t}\n\n\treturn false;\n};\n","import {\n\ttransformShortcutKeys,\n\tprettifyMacShortcut,\n\tprettifyWindowsShortcut,\n\tisMac,\n\tshortcutLogger as console,\n\tSHORTCUT_DIRECTORY_MODAL_ACTION,\n\tSN_POLARIS_LAYOUT\n} from './helpers';\nimport {ApplicableComponentAdapter} from './ApplicableComponentAdapter';\nimport {setQueuedActionStates} from './shortcutActionManager';\nimport {hasLandmarksOnPage, isLandmarkAction} from './landmarkEngine';\nimport {ContextManager} from './contextManager';\n\n/**\n * OOB shortcuts (no overrides)\n * @type {Map<String, RuntimeShortcut>}\n */\nexport const ShortcutRegistry = new Map();\n\nexport const getAllOOBShortcuts = () => ShortcutRegistry;\n\n/**\n * Stores all user keyboard shortcut: both OOB and overriden.\n * Map key is a shortcut sysId.\n * @type {Map<String, RuntimeShortcut>}\n */\nexport const IntersectedShortcutRegistry = new Map();\n\n/**\n * @function getAllShortcuts\n *\n * @description Returns an array of all registered keyboard shortcuts, including user overriden\n * shortcuts.\n *\n * @example\n * const shortcuts = getAllShortcuts();\n *\n * @returns {Array<RuntimeShortcut>} shortcuts - An array of keyboard shortcut objects\n */\nconst getAllShortcuts = () => Array.from(IntersectedShortcutRegistry.values());\n\n/**\n * @function getShortcutByKey\n * @param {String} key - The sysId of the shortcut to retrieve\n * @returns {RuntimeShortcut} shortcut - The shortcut matching the given key\n */\nexport const getShortcutByKey = (key) => IntersectedShortcutRegistry.get(key);\n\n/**\n * @function getAllShortcutsByActionKey\n * @param {String} componentTagName\n * @param {String} actionKey\n * @returns array of shortcuts with the action key associated to the component tag name\n */\nexport const getAllShortcutsByActionKey = (componentTagName, actionKey) =>\n\tgetAllShortcuts().filter(\n\t\t(shortcut) =>\n\t\t\tshortcut.componentTagName == componentTagName &&\n\t\t\tshortcut.actionKey == actionKey\n\t);\n\n/**\n * @function getShortcutByPayloadCondition\n * @param {String} componentTagName\n * @param {String} actionKey\n * @param {Object} payloadCondition\n * @returns shortcut that has the matching payload\n */\nexport const getShortcutByPayloadCondition = (\n\tcomponentTagName,\n\tactionKey,\n\tpayloadCondition\n) =>\n\tgetAllShortcutsByActionKey(componentTagName, actionKey).filter((shortcut) =>\n\t\tObject.entries(payloadCondition).every(\n\t\t\t([key, value]) => shortcut.actionPayload[key] === value\n\t\t)\n\t);\n\n/**\n * @function hasRegisteredShortcuts\n * @returns {Boolean} whether the shortcuts have been registered or not\n */\nexport const hasRegisteredShortcuts = () => ShortcutRegistry.size > 0;\n\n/**\n * @function registerShortcuts\n *\n * @description Registers the fetched OOB shortcuts in the ShortcutRegistry map.\n *\n * @param {Array<ShortcutMetadata>} shortcuts\n */\nexport const registerShortcuts = (shortcuts) => {\n\tshortcuts.forEach((shortcutMetadata) => {\n\t\tconst {\n\t\t\tsysId,\n\t\t\tdefinitionSysId,\n\t\t\tname,\n\t\t\tlabel,\n\t\t\tdescription,\n\t\t\tcategory,\n\t\t\tcategoryValue,\n\t\t\torder,\n\t\t\treadonly,\n\t\t\tactionPayload,\n\t\t\tcomponentTag,\n\t\t\tactionKey,\n\t\t\tshortcut\n\t\t} = shortcutMetadata;\n\n\t\tconst {mac, windows} = shortcut;\n\n\t\tShortcutRegistry.set(definitionSysId, {\n\t\t\tname,\n\t\t\tlabel,\n\t\t\tshortcutSysId: sysId,\n\t\t\tdescription,\n\t\t\tcategory,\n\t\t\tcategoryValue,\n\t\t\torder,\n\t\t\toverriden: false,\n\t\t\treadonly,\n\t\t\tactionPayload,\n\t\t\tcomponentTagName: componentTag.toUpperCase(),\n\t\t\tactionKey,\n\t\t\tshortcut: transformShortcutKeys(shortcut),\n\t\t\tprettifiedShortcuts: {\n\t\t\t\tmac: prettifyMacShortcut(mac),\n\t\t\t\twindows: prettifyWindowsShortcut(windows)\n\t\t\t}\n\t\t});\n\t});\n\n\tsetQueuedActionStates();\n\n\tconsole.log('Shortcuts registered: ', ShortcutRegistry.entries());\n};\n\n/**\n * @function getContextualizedShortcuts\n *\n * @description Gets all shortcuts that are currently applicable to a given page (i.e. Filters out List shortcuts when on the Record Page, vice versa)\n *\n * @example\n * const shortcuts = getContextualizedShortcuts();\n *\n * @returns {Object[]} shortcuts - an array of keyboard shortcuts that are global or applicable\n * to a specific page\n */\nexport const getContextualizedShortcuts = () => {\n\tconst applicableComponentAdapter = new ApplicableComponentAdapter();\n\n\t// flatten the active components array to only get the registered tag names\n\tconst activeComponentTagNames = applicableComponentAdapter\n\t\t.getActiveComponents()\n\t\t.flatMap((c) => c?.registeredElement?.tagName);\n\n\treturn getAllShortcuts()\n\t\t.filter((shortcut) =>\n\t\t\tactiveComponentTagNames.includes(shortcut.componentTagName)\n\t\t)\n\t\t.filter((shortcut) => {\n\t\t\tconst {componentTagName, actionKey, actionPayload} = shortcut;\n\n\t\t\t// Actions can be dynamically activated & deactivated, components can be added & removed from DOM.\n\t\t\t// We need to always ensure the shortcut's applicableComponents is up to date prior to returning the shortcut\n\t\t\tshortcut.applicableComponents =\n\t\t\t\tapplicableComponentAdapter.getApplicableComponents(\n\t\t\t\t\tcomponentTagName,\n\t\t\t\t\tactionKey,\n\t\t\t\t\tactionPayload\n\t\t\t\t);\n\n\t\t\t// In the case of a modal being opened, we need to force an override to allow the shortcut modal to load.\n\t\t\t// When a modal is opened, the shortcut directory modal has no applicableComponents as polaris-app-shell shortcuts \"should\" be disabled. Only the component shortcuts within a modal are applicable.\n\t\t\tif (\n\t\t\t\tContextManager.isModalOpen &&\n\t\t\t\tcomponentTagName === SN_POLARIS_LAYOUT\n\t\t\t) {\n\t\t\t\treturn actionKey === SHORTCUT_DIRECTORY_MODAL_ACTION;\n\t\t\t}\n\t\t\treturn (\n\t\t\t\t(!ContextManager.isModalOpen &&\n\t\t\t\t\tisLandmarkAction(actionKey) &&\n\t\t\t\t\thasLandmarksOnPage()) ||\n\t\t\t\tshortcut.applicableComponents.some(\n\t\t\t\t\t(component) => component.actionMap[shortcut.actionKey]?.active\n\t\t\t\t)\n\t\t\t);\n\t\t});\n};\n\n/**\n * @function getAllPrettifiedShortcuts\n * @param {Boolean} avoidContextualize - If true, returns all shortcuts regardless of page context\n *\n * @description Gets all \"prettified\" shortcuts matching the current user platform (e.g. \"Cmd + Shift + s\")\n *\n * @returns {Array<{name: String, shortcut: PrettifiedShortcut}>}\n */\nexport const getAllPrettifiedShortcuts = (avoidContextualize = false) => {\n\tconst shortcuts = avoidContextualize\n\t\t? getAllShortcuts()\n\t\t: getContextualizedShortcuts();\n\n\tconst prettifiedShortcuts = shortcuts.map((s) => {\n\t\tconst {prettifiedShortcuts} = s;\n\t\tconst shortcut = isMac()\n\t\t\t? prettifiedShortcuts.mac\n\t\t\t: prettifiedShortcuts.windows;\n\n\t\treturn {\n\t\t\tlabel: s.label,\n\t\t\t// TODO: Remove \"name\" as it's deprecated for UI (\"label\" is provided instead)\n\t\t\tname: s.name,\n\t\t\tdescription: s.description,\n\t\t\tcategory: s.category,\n\t\t\tcategoryValue: s.categoryValue,\n\t\t\toverriden: s.overriden,\n\t\t\treadonly: s.readonly,\n\t\t\tshortcutSysId: s.shortcutSysId,\n\t\t\tshortcut\n\t\t};\n\t});\n\n\treturn avoidContextualize\n\t\t? prettifiedShortcuts\n\t\t: prettifiedShortcuts.filter(\n\t\t\t\t(shortcut, index, self) =>\n\t\t\t\t\t// remove duplicate shortcuts when both now-sidebar & now-uxf-tab-set are on the page\n\t\t\t\t\tindex === self.findIndex((s) => s.shortcut === shortcut.shortcut)\n\t\t  );\n};\n\n/**\n * @description Exported for testing purposes ONLY, not inteded for use in non-test code\n */\nexport const exportOnlyForTesting = {\n\tgetAllShortcuts\n};\n","var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }\nvar y = x => () => x\nconst __WEBPACK_NAMESPACE_OBJECT__ = x({ [\"createInteractionId\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.__esModule\n\t\t\t\t\tif (cjsModule && 'createInteractionId' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"].createInteractionId;\n\t\t\t\t\t} else if ('createInteractionId' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.createInteractionId || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"].createInteractionId;\n\t\t\t\t}, [\"defineMetric\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.__esModule\n\t\t\t\t\tif (cjsModule && 'defineMetric' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"].defineMetric;\n\t\t\t\t\t} else if ('defineMetric' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.defineMetric || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"].defineMetric;\n\t\t\t\t}, [\"getMetricTypes\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.__esModule\n\t\t\t\t\tif (cjsModule && 'getMetricTypes' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"].getMetricTypes;\n\t\t\t\t\t} else if ('getMetricTypes' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.getMetricTypes || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"].getMetricTypes;\n\t\t\t\t}, [\"mark\"]: () => {\n\t\t\t\t\tconst cjsModule = __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.default && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.__esModule\n\t\t\t\t\tif (cjsModule && 'mark' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"];\n\t\t\t\t\t} else if (cjsModule)  {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"].mark;\n\t\t\t\t\t} else if ('mark' === 'default') {\n\t\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] ? (__WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] ? __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"][\"default\"] : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"]) : __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__;\n\t\t\t\t\t}\n\t\t\t\t\treturn __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__.mark || __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"] && __WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__[\"default\"].mark;\n\t\t\t\t} });","import {\n\tcreateInteractionId,\n\tdefineMetric,\n\tmark,\n\tgetMetricTypes\n} from '@servicenow/ui-metrics';\nimport {get} from '@devsnc/snowdash';\n\nconst isMetricDefined = (event) => getMetricTypes()[event];\nexport const EVENT_METRIC = 'Keyboard Shortcut Usage';\nexport const USAGE_METRIC_LEVEL = 5;\nexport const METRIC_TYPE = 'usage';\n\nexport const initCustomKeyboardShortcutMetric = (metric = EVENT_METRIC) => {\n\tif (!window.nowUiFramework) {\n\t\twindow.nowUiFramework = {};\n\t}\n\n\twindow.nowUiFramework.uxfKeyboardShortcutInteractionId =\n\t\tcreateInteractionId();\n\tdefineMetric(metric, USAGE_METRIC_LEVEL);\n};\n\nexport const getKeyboardShortcutInteractionId = () =>\n\tget(\n\t\twindow,\n\t\t'nowUiFramework.uxfKeyboardShortcutInteractionId',\n\t\tcreateInteractionId()\n\t);\n\nexport const sysPropPerfEnabled = () =>\n\tget(\n\t\twindow,\n\t\t[\n\t\t\t'ux_globals',\n\t\t\t'libuxf',\n\t\t\t'sysprops',\n\t\t\t'glide.uxf.lib.performance.monitoring.enabled'\n\t\t],\n\t\t'false'\n\t) === 'true';\n\nexport const markKeyboardShortcut = (\n\telement,\n\tshortcutName,\n\tmetric = EVENT_METRIC,\n\textraMeta = {}\n) => {\n\t// don't log marks if usage tracking is disabled\n\tif (!sysPropPerfEnabled()) return;\n\n\t// make sure custom metric is defined\n\tif (!isMetricDefined(metric)) {\n\t\tinitCustomKeyboardShortcutMetric(metric);\n\t}\n\n\tconst interactionId = getKeyboardShortcutInteractionId();\n\tconst timestamp = Date.now();\n\tconst pageId = get(\n\t\twindow,\n\t\t'ux_globals.snCanvasScreen.screenData.macroponentSysId'\n\t);\n\tconst pageName = get(\n\t\twindow,\n\t\t'ux_globals.snCanvasScreen.screenData.defaultTitle'\n\t);\n\tconst componentId = element.nowId;\n\tconst workspaceName = get(\n\t\twindow,\n\t\t'ux_globals.snCanvasScreen.screenData.context.experienceName'\n\t);\n\tconst markOptions = {\n\t\tshortcutName,\n\t\ttimestamp,\n\t\tpageId,\n\t\tpageName,\n\t\tcomponentId,\n\t\tworkspaceName,\n\t\t...extraMeta\n\t};\n\tmark(element, interactionId, metric, markOptions, METRIC_TYPE);\n};\n","import {getComponentFromRegistry} from './componentRegistry';\nimport {getShortcutsState} from './shortcutsState';\nimport {getContextualizedShortcuts} from './shortcutRegistry';\nimport {landmarkAction, isLandmarkAction} from './landmarkEngine';\nimport {\n\tdedupeShortcuts,\n\tgetTargetElement,\n\tisMac,\n\tisWindows,\n\tKEY_PREFIXES,\n\tMODIFIER_KEYS,\n\tSUPPORTED_SPECIAL_CHARACTERS,\n\tshortcutLogger as console\n} from './helpers';\nimport {markKeyboardShortcut} from './trackUsageShortcutHandler';\n\n/**\n * @function triggerAction\n *\n * @description Looks up the component in the registry and executes the function in the actionMap matching the actionKey parameter\n *\n * @example\n *\n * triggerAction('1ta0nrjbs20k-144', 'HANDLE_ACTION', { foo: 'bar' });\n *\n * @param {String} nowId - The nowId of the matching component\n * @param {String} actionKey - The key of the action - sys_ux_keyboard_shortcut_definition.actionKey\n * @param {Object} actionPayload  - The payload to pass to the action - sys_ux_keyboard_shortcut_definition.actionPayload\n */\nexport const triggerAction = (nowId, actionKey, actionPayload) => {\n\tconst component = getComponentFromRegistry(nowId);\n\n\treturn new Promise((resolve, reject) => {\n\t\tif (!component) {\n\t\t\tconst errorMessage = `Component not found in registry for nowId '${nowId}'`;\n\t\t\tconsole.error(errorMessage);\n\t\t\treject(errorMessage);\n\t\t\treturn;\n\t\t}\n\n\t\tif (!component?.actionMap) {\n\t\t\tconst errorMessage = `No actionMap found for '${component?.registeredElement?.tagName?.toLowerCase()}' with nowId '${nowId}'`;\n\t\t\tconsole.error(errorMessage);\n\t\t\treject(errorMessage);\n\t\t\treturn;\n\t\t}\n\n\t\tconst {actionMap, updateState, host} = component;\n\t\tconst actionFn = actionMap[actionKey].action;\n\n\t\t// TODO - We need to account for the use case where there are several component instances on the page that have the same action map, but only one of them have disabled a single action\n\t\t// yet, one of the component instances has disabled a single action.\n\n\t\tif (!actionFn) {\n\t\t\tconst errorMessage = `Action function '${actionKey}' not found for '${component?.registeredElement?.tagName?.toLowerCase()}' with nowId '${nowId}'`;\n\t\t\tconsole.error(errorMessage);\n\t\t\treject(errorMessage);\n\t\t\treturn;\n\t\t}\n\n\t\t// Using updateState to get the latest coeffects for the component\n\t\tupdateState((coeffects) => {\n\t\t\tconst result = actionFn({\n\t\t\t\tpayload: actionPayload,\n\t\t\t\thost,\n\t\t\t\t...coeffects\n\t\t\t});\n\t\t\tconsole.log(\n\t\t\t\t`action '${actionKey}' triggered for ${component?.registeredElement?.tagName?.toLowerCase()} - nowId: ${nowId}`,\n\t\t\t\t{\n\t\t\t\t\tactionPayload,\n\t\t\t\t\thost,\n\t\t\t\t\tcoeffects\n\t\t\t\t}\n\t\t\t);\n\t\t\tresolve(result);\n\t\t});\n\t});\n};\n\n/**\n * @function filterShortcuts\n *\n * @description Checks the current keys being pressed and matches against a shortcut in the registry. If shortcut is found, will return the shortcut metadata\n *\n * @param {KeyboardEvent} e - KeyboardEvent from the keydown event\n *\n * @returns {Array<ShortcutMetadata>}\n */\nconst filterShortcuts = (e) => {\n\tconst {metaKey, altKey, ctrlKey, shiftKey, code} = e;\n\n\tconst contextualizedShortcuts = getContextualizedShortcuts();\n\n\tconsole.log(\n\t\t'Shortcut key combo detected; Attempting to match shortcut against contextualized shortcuts',\n\t\t{\n\t\t\tshortcut: {metaKey, altKey, ctrlKey, shiftKey, code: code.toLowerCase()},\n\t\t\tcontextualizedShortcuts\n\t\t}\n\t);\n\n\treturn contextualizedShortcuts.filter((shortcutMetadata) => {\n\t\tconst {shortcut} = shortcutMetadata;\n\t\tconst {mac, windows} = shortcut;\n\n\t\t// Platform verification was already performed during initializeShortcuts()\n\t\tconst platformShortcut = isMac() ? mac : windows;\n\n\t\treturn (\n\t\t\t!!platformShortcut.altKey === !!altKey &&\n\t\t\t!!platformShortcut.ctrlKey === !!ctrlKey &&\n\t\t\t!!platformShortcut.shiftKey === !!shiftKey &&\n\t\t\t!!platformShortcut.metaKey === !!metaKey &&\n\t\t\tplatformShortcut.code === code.toLowerCase()\n\t\t);\n\t});\n};\n\n/**\n * @function isModifierKeyPressedWithKey\n *\n * @description - Used for early exit of keydown event - Checks if at least one modifier key and one other non-modifier key is pressed at the same time.\n *\n * @param {KeyboardEvent} event\n * @param {Boolean} forPlatform - Optional parameter to account for platform when determining allowed modifiers\n * @returns {Boolean}\n */\nexport const isModifierKeyPressedWithKey = (event, forPlatform = false) => {\n\t// Check if any modifier key is pressed\n\tconst isModifierKeyPressed = Object.values(MODIFIER_KEYS).some((key) => {\n\t\tif (forPlatform) {\n\t\t\t// Control key on Mac and Meta key on Windows are not supported modifier keys\n\t\t\tif (\n\t\t\t\t(isMac() && key === MODIFIER_KEYS.CONTROL) ||\n\t\t\t\t(isWindows() && key === MODIFIER_KEYS.META)\n\t\t\t) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn event.getModifierState(key);\n\t});\n\tif (!isModifierKeyPressed) {\n\t\treturn false;\n\t}\n\n\t// Check if the key is alphanumeric or a special character\n\tconst isAlphanumericKey = Object.values(KEY_PREFIXES).some((prefix) =>\n\t\tevent.code.startsWith(prefix)\n\t);\n\n\t// Check if any supported special character keys are pressed\n\tconst isSpecialCharacterKey = Object.values(\n\t\tSUPPORTED_SPECIAL_CHARACTERS\n\t).includes(event.code);\n\n\treturn isAlphanumericKey || isSpecialCharacterKey;\n};\n\n/**\n * @function getResolvedShortcut\n *\n * @description - Validates duplicate shortcuts on the page and returns the resolved shortcut\n *\n * @param {Array} shortcuts - Shortcuts to validate\n *\n * @returns {ShortcutMetadata} - Resolved shortcut\n */\nconst getResolvedShortcut = (shortcuts) => {\n\tif (!shortcuts || !shortcuts.length) {\n\t\treturn;\n\t}\n\n\tif (shortcuts.length > 2) {\n\t\tconsole.warn('Duplicate shortcuts detected for the same key combination!');\n\t\treturn;\n\t}\n\n\tif (shortcuts.length === 1) {\n\t\tconst {\n\t\t\tcomponentTagName,\n\t\t\tactionKey,\n\t\t\tactionPayload,\n\t\t\tname,\n\t\t\tapplicableComponents\n\t\t} = shortcuts[0];\n\t\tlet element;\n\n\t\tif (applicableComponents.length === 1) {\n\t\t\t// If there is only one applicable component, use it's registeredElement to avoid DOM querying\n\t\t\telement = applicableComponents[0].registeredElement;\n\t\t} else {\n\t\t\tconsole.log(\n\t\t\t\t`Multiple applicable components found for shortcut. Attempting to resolve by querying DOM by tagName ${componentTagName} using strategy nearest parent or first child`\n\t\t\t);\n\t\t\telement = getTargetElement(componentTagName);\n\t\t}\n\n\t\treturn {\n\t\t\telement,\n\t\t\tactionKey,\n\t\t\tactionPayload,\n\t\t\tname\n\t\t};\n\t}\n\n\t// Should only ever fall into this use case on record pages that have both a now-contextual-sidebar & now-uxf-tab-set component (non-SRP)\n\treturn dedupeShortcuts(shortcuts);\n};\n\n/**\n * @function resolveKeyboardEvent\n *\n * @description - Resolves the keyboard event from a CustomEvent or KeyboardEvent\n *\n * @param {Event} event - CustomEvent or KeyboardEvent\n *\n * @returns {KeyboardEvent|undefined} - KeyboardEvent or undefined if not found\n */\nexport const resolveKeyboardEvent = (event) => {\n\tif (!event) {\n\t\treturn;\n\t}\n\n\tif (\n\t\tevent instanceof CustomEvent &&\n\t\tevent?.detail?.payload?.event instanceof KeyboardEvent\n\t) {\n\t\treturn event.detail.payload.event;\n\t}\n\n\t//else, event instanceof KeyboardEvent\n\treturn event;\n};\n\n/**\n * @function handleShortcutKeyDown\n *\n * @description key down handler attached to window\n *\n * @param {KeyboardEvent} e - Keyboard event\n */\nexport const handleShortcutKeyDown = (e) => {\n\tconst event = resolveKeyboardEvent(e);\n\n\t// Early exit if no modifier key is pressed with a non-modifier key\n\tif (!event || !isModifierKeyPressedWithKey(event)) {\n\t\treturn;\n\t}\n\n\tif (getShortcutsState().active === false) {\n\t\tconsole.log(\n\t\t\t'UX Keyboard shortcuts are inactive.',\n\t\t\t'keyDown event was not handled and will be propagated:',\n\t\t\tevent\n\t\t);\n\t\treturn;\n\t}\n\n\t// Parse key combo into shortcut\n\tconst shortcuts = filterShortcuts(event);\n\n\tif (shortcuts.length === 1 && isLandmarkAction(shortcuts[0].actionKey)) {\n\t\tevent.stopPropagation();\n\t\tevent.preventDefault();\n\t\treturn landmarkAction(shortcuts[0].actionKey);\n\t}\n\n\t// Ideally, there will only be one shortcut returned from filterShortcuts(). If there is more than one, we need to validate if the shortcut is a known duplicate\n\tconst shortcut = getResolvedShortcut(shortcuts);\n\n\tif (!shortcut) {\n\t\treturn;\n\t}\n\n\tconst {element, actionKey, actionPayload, name} = shortcut;\n\n\tif (!element?.nowId) {\n\t\treturn;\n\t}\n\n\tevent.stopPropagation();\n\tevent.preventDefault(); // Need to prevent default to prevent browser shortcuts from firing or any other shortcuts that may be registered\n\ttriggerAction(element.nowId, actionKey, actionPayload);\n\tmarkKeyboardShortcut(element, name);\n};\n\n/**\n * @description Exported for testing purposes ONLY, not inteded for use in non-test code\n */\nexport const exportOnlyForTesting = {\n\tfilterShortcuts,\n\tgetResolvedShortcut\n};\n","import {isMac} from './helpers/supportedPlatforms.js';\nimport {\n\tgetAllOOBShortcuts,\n\tIntersectedShortcutRegistry\n} from './shortcutRegistry.js';\nimport {\n\tprettifyMacShortcut,\n\tprettifyWindowsShortcut,\n\ttransformShortcutKeys\n} from './helpers/shortcutUtils.js';\nimport {shortcutLogger as console} from './helpers/getLogger';\n\n/**\n * Stores ONLY Keyboard Shortcut Overrides for the current user, data coming from the server.\n * Map key is a shortcut sys_id.\n * @type {Map<String, PlatformShortcuts>}\n */\nconst UserOverrideShortcutsRegistry = new Map();\n\n/**\n * Returns keyboard shortcut overrides registered for current user.\n *\n * @returns {MapIterator<String, PlatformShortcuts>} Key is a shortcut sysId.\n */\nexport const getKeyboardShortcutOverrides = () =>\n\tUserOverrideShortcutsRegistry.entries();\n\nexport const hasShortcutOverrides = () =>\n\tUserOverrideShortcutsRegistry.size > 0;\n\nconst formatAndPrettifyShortcutByPlatform = (shortcutOverride) => {\n\tconst shortcutByPlatform = isMac()\n\t\t? shortcutOverride.mac\n\t\t: shortcutOverride.windows;\n\tconst prettifiedShortcutByPlatform = isMac()\n\t\t? prettifyMacShortcut(shortcutByPlatform)\n\t\t: prettifyWindowsShortcut(shortcutByPlatform);\n\n\tlet formattedShortcutByPlatform;\n\tlet formattedPrettifiedShortcutByPlatform;\n\tif (isMac()) {\n\t\tformattedShortcutByPlatform = {\n\t\t\tmac: shortcutByPlatform\n\t\t};\n\t\tformattedPrettifiedShortcutByPlatform = {\n\t\t\tmac: prettifiedShortcutByPlatform\n\t\t};\n\t} else {\n\t\tformattedShortcutByPlatform = {\n\t\t\twindows: shortcutByPlatform\n\t\t};\n\t\tformattedPrettifiedShortcutByPlatform = {\n\t\t\twindows: prettifiedShortcutByPlatform\n\t\t};\n\t}\n\treturn {formattedShortcutByPlatform, formattedPrettifiedShortcutByPlatform};\n};\n\n/**\n * Applies keyboard shortcut overrides to the registered OOB keyboard shortcuts.\n */\nexport const intersectShortcutOverrides = () => {\n\tIntersectedShortcutRegistry.clear();\n\tfor (const [\n\t\tshortcutKey,\n\t\tshortcutMetadata\n\t] of getAllOOBShortcuts().entries()) {\n\t\tconst {shortcutSysId} = shortcutMetadata;\n\n\t\tif (UserOverrideShortcutsRegistry.has(shortcutSysId)) {\n\t\t\tconst shortcutOverride = UserOverrideShortcutsRegistry.get(shortcutSysId);\n\n\t\t\t// Format and prettify shortcut override combination\n\t\t\tconst {\n\t\t\t\tformattedShortcutByPlatform,\n\t\t\t\tformattedPrettifiedShortcutByPlatform\n\t\t\t} = formatAndPrettifyShortcutByPlatform(shortcutOverride);\n\n\t\t\tIntersectedShortcutRegistry.set(shortcutKey, {\n\t\t\t\t...shortcutMetadata,\n\t\t\t\toverriden: true,\n\t\t\t\tshortcut: transformShortcutKeys(formattedShortcutByPlatform),\n\t\t\t\tprettifiedShortcuts: formattedPrettifiedShortcutByPlatform\n\t\t\t});\n\t\t} else {\n\t\t\tIntersectedShortcutRegistry.set(shortcutKey, shortcutMetadata);\n\t\t}\n\t}\n};\n\n/**\n * Registers keyboard shortcut overrides for the current user.\n * @param {UserOverrideShortcuts} userOverrideShortcuts\n */\nexport const registerShortcutOverrides = (userOverrideShortcuts = {}) => {\n\tUserOverrideShortcutsRegistry.clear();\n\tObject.keys(userOverrideShortcuts).forEach((shortcutSysId) => {\n\t\tUserOverrideShortcutsRegistry.set(\n\t\t\tshortcutSysId,\n\t\t\tuserOverrideShortcuts[shortcutSysId]\n\t\t);\n\t});\n\tconsole.log(\n\t\t'Shortcut Overrides registered: ',\n\t\tUserOverrideShortcutsRegistry.entries()\n\t);\n};\n","import {handleShortcutKeyDown} from './shortcutEngine';\nimport {handleLastClicked} from './landmarkEngine';\nimport {registerShortcuts} from './shortcutRegistry';\nimport {\n\tregisterShortcutOverrides,\n\tintersectShortcutOverrides\n} from './overrideRegistry';\nimport {\n\tisSupportedPlatform,\n\tfetchShortcuts,\n\tfetchUserOverrideShortcuts,\n\tshortcutLogger as console,\n\tareShortcutsEnabled,\n\tisUserLoggedIn\n} from './helpers';\nimport {setInitialized} from './shortcutsState';\n\n/**\n * @function initializeShortcuts\n *\n * @description Initialization for now-trigger-library. Required to activate shortcuts on an\n * application.\n */\nexport const initializeShortcuts = async () => {\n\tsetInitialized(false);\n\tif (!areShortcutsEnabled()) {\n\t\tconsole.info('Keyboard shortcuts have been disabled for this instance.');\n\t\treturn;\n\t}\n\n\tif (!isSupportedPlatform()) {\n\t\tconsole.info('Unsupported platform detected for keyboard shortcuts');\n\t\treturn;\n\t}\n\n\t// Do not initialize shortcuts when user is not logged in (as shortcuts API is not public).\n\t// Example: public page that is accessed by unauthorized user.\n\tif (!isUserLoggedIn()) {\n\t\tconsole.info(\n\t\t\t'User is not logged in. Skipping keyboard shortcuts initialization.'\n\t\t);\n\t\treturn;\n\t}\n\n\t// First, fetch the OOB shortcuts from the server and register them\n\tlet shortcutsMetadata;\n\ttry {\n\t\tshortcutsMetadata = await fetchShortcuts();\n\t\tregisterShortcuts(shortcutsMetadata);\n\t\twindow.addEventListener('click', handleLastClicked);\n\t\twindow.addEventListener('keydown', handleShortcutKeyDown);\n\t} catch (error) {\n\t\tconsole.error('Failed to register keyboard shortcuts:', error);\n\t}\n\n\t// Second, fetch the user override shortcuts from the server and register them, as registering\n\t// user keyboard shortcut overrides depends on the OOB shortcuts being registered\n\tlet userOverrideShortcuts;\n\ttry {\n\t\tuserOverrideShortcuts = await fetchUserOverrideShortcuts();\n\t\tregisterShortcutOverrides(userOverrideShortcuts);\n\t} catch (error) {\n\t\tconsole.error('Failed to fetch user override shortcuts:', error);\n\t}\n\t// Third, we do the intersection of the OOB shortcuts and the user overriden shortcuts.\n\t// Even if override shortuts fetching failed, it falls back to the OOB shortcuts.\n\tintersectShortcutOverrides();\n\tsetInitialized(true);\n};\n","import {markKeyboardShortcut} from '../trackUsageShortcutHandler';\n\nexport const KBS_METRICS = {\n\tREMAP_SUCCESS: 'KBS Remap Success',\n\tREMAP_FAILURE: 'KBS Remap Failure',\n\tSUGGESTION_SHOWN: 'KBS Suggestion Shown',\n\tSUGGESTION_USED: 'KBS Suggestion Used'\n};\n\n// Per-tab remap session state. Tracks across multiple save attempts on the same\n// shortcut so the FE never has to.\nconst initialSession = () => ({\n\t\tfailedAttempts: 0,\n\t\tsuggestionShownOnce: false,\n\t\tlastSuggestionSource: null\n\t});\n\nlet session = initialSession();\n// Tracks which shortcut the current session belongs to. Set by\n// `ensureKbsRemapSessionFor` at each save attempt; cleared on session reset.\nlet activeShortcutSysId = null;\n\n/**\n * Reset the remap session. Called automatically after a successful save.\n */\nexport const resetKbsRemapSession = () => {\n\tsession = initialSession();\n\tactiveShortcutSysId = null;\n};\n\n/**\n * Scope the remap session to a specific shortcut. If a different shortcut is\n * targeted than the previous attempt, the session resets first so failedAttempts\n * / suggestionShownOnce don't leak across unrelated remaps.\n */\nexport const ensureKbsRemapSessionFor = (shortcutSysId) => {\n\tif (!shortcutSysId) {\n\t\treturn;\n\t}\n\tif (activeShortcutSysId !== null && activeShortcutSysId !== shortcutSysId) {\n\t\tsession = initialSession();\n\t}\n\tactiveShortcutSysId = shortcutSysId;\n};\n\nconst recordSuggestionShown = (source) => {\n\tsession.suggestionShownOnce = true;\n\tsession.lastSuggestionSource = source || null;\n};\n\nconst recordRemapFailure = () => {\n\tsession.failedAttempts += 1;\n};\n\n/**\n * Emit a KBS metric event. Reuses the existing `markKeyboardShortcut` helper so\n * interaction id, metric definition, page-context fields, and `sysPropPerfEnabled`\n * gating stay in one place. Telemetry must never break the remap flow.\n */\nconst emitKbsMetric = (eventName, metadata, host, shortcutName) => {\n\tif (!eventName) {\n\t\treturn;\n\t}\n\ttry {\n\t\tmarkKeyboardShortcut(host, shortcutName || null, eventName, metadata);\n\t} catch (_) {\n\t\t// metric emission is best-effort; never propagate\n\t}\n};\n\nconst toFlag = (v) => v ? 'yes' : 'no';\n\n/**\n * Called by overrideManager when suggestions come back from the recommender.\n * Emits SUGGESTION_SHOWN and updates session state.\n */\nexport const trackSuggestionShown = ({\n\tsource,\n\tcount,\n\tplatform,\n\thost,\n\tshortcutName\n}) => {\n\trecordSuggestionShown(source);\n\temitKbsMetric(\n\t\tKBS_METRICS.SUGGESTION_SHOWN,\n\t\t{source: source || null, count, platform},\n\t\thost,\n\t\tshortcutName\n\t);\n};\n\n/**\n * Called by overrideManager when a save attempt is initiated. If the attempt came\n * from clicking a Use-Suggestion button, also emits SUGGESTION_USED.\n */\nexport const trackRemapAttemptStarted = ({\n\tinputSource,\n\tsuggestionSource,\n\thost,\n\tshortcutName\n}) => {\n\tif (inputSource === 'suggestion') {\n\t\temitKbsMetric(\n\t\t\tKBS_METRICS.SUGGESTION_USED,\n\t\t\t{source: suggestionSource || null},\n\t\t\thost,\n\t\t\tshortcutName\n\t\t);\n\t}\n};\n\n/**\n * Called by overrideManager on successful save. Emits REMAP_SUCCESS using session\n * state and the attempt's inputSource, then resets the session.\n */\nexport const trackRemapSuccess = ({\n\tinputSource,\n\tsuggestionSource,\n\thost,\n\tshortcutName\n}) => {\n\tconst usedSuggestion = inputSource === 'suggestion';\n\temitKbsMetric(\n\t\tKBS_METRICS.REMAP_SUCCESS,\n\t\t{\n\t\t\tafter_error: toFlag(session.failedAttempts > 0),\n\t\t\tsuggestion_shown: toFlag(session.suggestionShownOnce),\n\t\t\tsuggestion_used: toFlag(usedSuggestion),\n\t\t\tsuggestion_source: usedSuggestion\n\t\t\t\t? suggestionSource || session.lastSuggestionSource || null\n\t\t\t\t: null\n\t\t},\n\t\thost,\n\t\tshortcutName\n\t);\n\tresetKbsRemapSession();\n};\n\n/**\n * Called by overrideManager on failed save. Emits REMAP_FAILURE using session\n * state + inputSource, then increments failedAttempts for the next try.\n */\nexport const trackRemapFailure = ({\n\tinputSource,\n\tsuggestionSource,\n\thost,\n\tshortcutName\n}) => {\n\tconst fromSuggestion = inputSource === 'suggestion';\n\tconst attemptNumber = session.failedAttempts + 1;\n\temitKbsMetric(\n\t\tKBS_METRICS.REMAP_FAILURE,\n\t\t{\n\t\t\tattempt_type: attemptNumber === 1 ? 'first' : 'repeat',\n\t\t\tinput_source: fromSuggestion ? 'suggestion' : 'manual',\n\t\t\tsuggestion_source: fromSuggestion ? suggestionSource || null : null\n\t\t},\n\t\thost,\n\t\tshortcutName\n\t);\n\trecordRemapFailure();\n};\n\n// Exposed for tests so they can inspect derived metricContext without poking\n// internal state.\nexport const __getKbsRemapSessionForTests = () => ({...session});\n","import snHttp from './snHttpInstance/index.js';\nimport {\n\tuserOverrideShortcutCache,\n\tuserOverrideShortcutCBHashCache\n} from './helpers/cacheInstance';\nimport {getUserOverrideShortcutCacheKey} from './helpers/overridesHelpers';\nimport {\n\tregisterShortcutOverrides,\n\thasShortcutOverrides,\n\tintersectShortcutOverrides\n} from './overrideRegistry.js';\nimport {\n\tUSER_OVERRIDE_SHORTCUT_API_PATH,\n\tSHORTCUT_RECOMMENDER_API_PATH\n} from './helpers/constants';\nimport {shortcutLogger as console} from './helpers/getLogger';\nimport {prettifyMacShortcut, prettifyWindowsShortcut} from './helpers';\nimport {\n\ttrackSuggestionShown,\n\ttrackRemapAttemptStarted,\n\ttrackRemapSuccess,\n\ttrackRemapFailure,\n\tensureKbsRemapSessionFor\n} from './helpers/kbsMetrics';\n\n/**\n * Builds the request payload using provided shortcut override object.\n * @param {NewShortcutOverride} newShortcutOverride\n * @returns {NewShortcutOverrideRequestPayload} - request payload\n */\nconst buildSetShortcutOverrideRequestPayload = (newShortcutOverride) => {\n\tconst payload = {\n\t\toverride: {\n\t\t\t[newShortcutOverride.shortcutSysId]: {\n\t\t\t\t[newShortcutOverride.platform]: newShortcutOverride.keyboardMetadata\n\t\t\t}\n\t\t}\n\t};\n\treturn payload;\n};\n\n/**\n * Attempts to parse the response error according to the API response schema. Returns the original\n * error if the error is not in the expected format.\n * @param {Error} error\n * @param {String} logMessage - message to log in console and append to the error\n * @returns {Error} - formatter Error with additional \"logMessage\" and optional \"detail\" properties\n */\nconst logAndFormatError = (error, logMessage) => {\n\tconsole.error(logMessage, error);\n\tlet message = error.message || 'Unexpected Keyboard Shortcut Error';\n\tlet detail;\n\tif (error?.response?.data?.error) {\n\t\t// UXFrameworkError from server contains the actual error message in \"detail\" field\n\t\tmessage = error.response.data.error.detail || message;\n\t\tdetail = error.response.data.error.message; // \"UXFrameworkError\"\n\t}\n\tconst err = new Error(message, {cause: error});\n\terr.name = 'UXKeyboardShortcutError';\n\terr.detail = detail;\n\terr.logMessage = logMessage;\n\terr.stack = error.stack;\n\treturn err;\n};\n\nconst KBS_SUGGESTIONS_SYSPROP = 'glide.uxf.lib.sn_workspace_kbs_suggestions';\n\nconst isKbsSuggestionsEnabled = () => {\n\tconst value = window?.ux_globals?.libuxf?.sysprops?.[KBS_SUGGESTIONS_SYSPROP];\n\treturn String(value ?? 'on').toLowerCase() !== 'off';\n};\n\n/**\n * Fetches alternative keyboard shortcut suggestions for a conflicting shortcut.\n * @param {KeyboardMetadata} keyboardMetadata\n * @param {'mac' | 'windows'} platform\n * @returns {Promise<Array<{shortcut: KeyboardMetadata, prettyShortcut: string}>>}\n */\nexport const fetchKeyboardShortcutSuggestions = async (\n\tkeyboardMetadata,\n\tplatform,\n\thost,\n\tshortcutName\n) => {\n\ttry {\n\t\tconst snHttpInstance = await snHttp();\n\t\tconst response = await snHttpInstance.request(\n\t\t\tSHORTCUT_RECOMMENDER_API_PATH,\n\t\t\t'POST',\n\t\t\t{data: {shortcut: {[platform]: keyboardMetadata}, platform}}\n\t\t);\n\t\tconst result = response?.data?.result || {};\n\t\tconst {recommendation, source} = result;\n\t\tif (!Array.isArray(recommendation) || !recommendation.length) {\n\t\t\treturn [];\n\t\t}\n\t\tconst mapped = recommendation\n\t\t\t.map((item) => {\n\t\t\t\tconst shortcut = item[platform];\n\t\t\t\tif (!shortcut) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tconst prettyShortcut =\n\t\t\t\t\tplatform === 'mac'\n\t\t\t\t\t\t? prettifyMacShortcut(shortcut)\n\t\t\t\t\t\t: prettifyWindowsShortcut(shortcut);\n\t\t\t\treturn {shortcut, prettyShortcut, source};\n\t\t\t})\n\t\t\t.filter(Boolean);\n\t\tif (mapped.length > 0) {\n\t\t\ttrackSuggestionShown({\n\t\t\t\tsource,\n\t\t\t\tcount: mapped.length,\n\t\t\t\tplatform,\n\t\t\t\thost,\n\t\t\t\tshortcutName\n\t\t\t});\n\t\t}\n\t\treturn mapped;\n\t} catch (error) {\n\t\tconsole.error('Failed to fetch keyboard shortcut suggestions', error);\n\t\treturn [];\n\t}\n};\n\n/**\n * Set a new keyboard shortcut override for the current user.\n * @param {NewShortcutOverride} newShortcutOverride\n * @returns {Promise<void>}\n * @throws {Error}\n */\nexport const setKeyboardShortcutOverride = (newShortcutOverride) => {\n\tconst payload = buildSetShortcutOverrideRequestPayload(newShortcutOverride);\n\tconst restMethod = hasShortcutOverrides() ? 'PUT' : 'POST';\n\tconst {\n\t\thost,\n\t\tinputSource = 'manual',\n\t\tsuggestionSource,\n\t\tshortcutName\n\t} = newShortcutOverride;\n\n\t// Scope the telemetry session to this shortcut so prior failures on a\n\t// different shortcut don't leak into this attempt's after_error flag.\n\tensureKbsRemapSessionFor(newShortcutOverride.shortcutSysId);\n\n\ttrackRemapAttemptStarted({\n\t\tinputSource,\n\t\tsuggestionSource,\n\t\thost,\n\t\tshortcutName\n\t});\n\n\treturn snHttp()\n\t\t.then((snHttpInstance) =>\n\t\t\tsnHttpInstance.request(USER_OVERRIDE_SHORTCUT_API_PATH, restMethod, {\n\t\t\t\tdata: payload\n\t\t\t})\n\t\t)\n\t\t.then((response) => {\n\t\t\tconst updatedOverrides = response?.data?.result;\n\t\t\tregisterShortcutOverrides(updatedOverrides);\n\t\t\tuserOverrideShortcutCache.setItem(\n\t\t\t\tgetUserOverrideShortcutCacheKey(),\n\t\t\t\tupdatedOverrides\n\t\t\t);\n\t\t\tintersectShortcutOverrides();\n\t\t\ttrackRemapSuccess({\n\t\t\t\tinputSource,\n\t\t\t\tsuggestionSource,\n\t\t\t\thost,\n\t\t\t\tshortcutName\n\t\t\t});\n\t\t})\n\t\t.catch((error) => {\n\t\t\tconst formattedError = logAndFormatError(\n\t\t\t\terror,\n\t\t\t\t'Failed to set user keyboard shortcut override'\n\t\t\t);\n\t\t\ttrackRemapFailure({\n\t\t\t\tinputSource,\n\t\t\t\tsuggestionSource,\n\t\t\t\thost,\n\t\t\t\tshortcutName\n\t\t\t});\n\t\t\tif (!isKbsSuggestionsEnabled()) {\n\t\t\t\tthrow formattedError;\n\t\t\t}\n\t\t\treturn fetchKeyboardShortcutSuggestions(\n\t\t\t\tnewShortcutOverride.keyboardMetadata,\n\t\t\t\tnewShortcutOverride.platform,\n\t\t\t\thost,\n\t\t\t\tshortcutName\n\t\t\t).then((recommendations) => {\n\t\t\t\tformattedError.recommendations = recommendations;\n\t\t\t\tthrow formattedError;\n\t\t\t});\n\t\t});\n};\n\n/**\n * Deletes a single user keyboard shortcut override for the current user.\n * @param {String} shortcutSysId\n * @returns {Promise<void>}\n * @throws {Error}\n */\nexport const deleteKeyboardShortcutOverride = async (shortcutSysId) => {\n\tlet response;\n\ttry {\n\t\tconst snHttpInstance = await snHttp();\n\t\tresponse = await snHttpInstance.request(\n\t\t\t`${USER_OVERRIDE_SHORTCUT_API_PATH}/${shortcutSysId}`,\n\t\t\t'DELETE'\n\t\t);\n\t} catch (error) {\n\t\tthrow logAndFormatError(\n\t\t\terror,\n\t\t\t'Failed to delete single user keyboard shortcut override'\n\t\t);\n\t}\n\tconst updatedOverrides = response?.data?.result;\n\tregisterShortcutOverrides(updatedOverrides);\n\tuserOverrideShortcutCache.setItem(\n\t\tgetUserOverrideShortcutCacheKey(),\n\t\tupdatedOverrides\n\t);\n\tintersectShortcutOverrides();\n};\n\n/**\n * Deletes all user keyboard shortcut overrides for the current user.\n * @returns {Promise<void>}\n * @throws {Error}\n */\nexport const restoreDefaults = async () => {\n\ttry {\n\t\tconst snHttpInstance = await snHttp();\n\t\tawait snHttpInstance.request(USER_OVERRIDE_SHORTCUT_API_PATH, 'DELETE');\n\t} catch (error) {\n\t\tthrow logAndFormatError(\n\t\t\terror,\n\t\t\t'Failed to delete all user keyboard shortcut overrides'\n\t\t);\n\t}\n\tregisterShortcutOverrides({});\n\tuserOverrideShortcutCache.setItem(getUserOverrideShortcutCacheKey(), {});\n\tintersectShortcutOverrides();\n\tuserOverrideShortcutCBHashCache.clear();\n};\n"],"names":["module","exports","import","toPropertyKey","require","e","r","t","Object","defineProperty","value","enumerable","configurable","writable","__esModule","_extends","assign","bind","n","arguments","length","hasOwnProperty","call","apply","_typeof","Symbol","toPrimitive","i","TypeError","String","Number","o","iterator","constructor","prototype","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","__webpack_modules__","getter","d","a","definition","key","get","obj","prop","DUPLICATE_SHORTCUT_TAB_SET_EXCEPTIONS","MODIFIER_KEYS","ALT","CONTROL","META","SUPPORTED_SPECIAL_CHARACTERS","SEMICOLON","BRACKET_LEFT","BRACKET_RIGHT","QUOTE","COMMA","PERIOD","SLASH","DASH","EQUAL","KEY_PREFIXES","KEY","DIGIT","SN_POLARIS_LAYOUT","APP_SHELL_COMPONENTS","KEYBOARD_SHORTCUTS_API","KEYBOARD_SHORTCUTS_CACHE_BUSTER","KEY_SHORTCUTS","KEY_SHORTCUT_CB_HASH","LANDMARK_FOCUS_ATTR","LANDMARK_ACTIVE_ELEMENT_ATTR","landmarkConstants","LANDMARK_FOCUS_FORWARD","LANDMARK_FOCUS_BACKWARD","LANDMARK_LAST_CLICKED_ATTR","LANDMARK_SELECTOR","KBS_MODAL_OPENED","KBS_MODAL_CLOSED","USER_OVERRIDE_SHORTCUT_API_PATH","USER_OVERRIDE_SHORTCUT_CACHE","USER_OVERRIDE_SHORTCUT_CACHE_CB_HASH","CACHE_CONFIGS","description","adapter","evictionPolicy","name","storeName","NOW_UX_INTERACTION","y","x","cjsModule","__WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_snowdash_28_1_16_index_jsdbx_09dbc0a0__","default","inRange","isEqual","isNil","noop","set","LOGGING_ENABLED","window","PRODUCTION_CONSOLE_METHODS","shortcutLogger","Proxy","console","target","property","includes","_len","args","Array","_key","userAgent","navigator","isMac","test","isWindows","isSupportedPlatform","snHttpRef","async","snHttpInstance","__WEBPACK_EXTERNAL_MODULE__uxasset_externals_devsnc_library_unified_cache_24_0_8_index_jsdbx_a071ecf8__","instance","getCacheInstance","unifiedCache","shortcutCache","shortcutCBHashCache","userOverrideShortcutCBHashCache","userOverrideShortcutCache","fetchShortcutsFromServer","_results","_results$data","_window","_window$ux_globals","results","_window$nowUiFramewor","_window$nowUiFramewor2","_window$nowUiFramewor3","snHttp","request","headers","nowUiFramework","uxrInteractionId","metrics","uxfInteractionIdBase","error","_error$response","response","status","shortcuts","data","result","setItem","ux_globals","uxKeyboardShortcutClientCacheBuster","getUserOverrideShortcutCacheKey","fetchUserOverrideShortcutsFromServer","userOverrideShortcuts","uxKeyboardShortcutOverrideClientCacheBuster","getReturnValue","element","actionKey","actionPayload","find","shortcut","componentTagName","tagName","formatKeyCode","char","isNumeric","prettifyMacShortcut","keys","shortcutPretty","metaKey","altKey","shiftKey","push","join","prettifyWindowsShortcut","ctrlKey","formatShortcutCode","code","toLowerCase","transformShortcutKeys","platformShortcuts","mac","windows","toBoolean","checkVisibility","computedStyles","getComputedStyle","visibility","rect","JSON","parse","stringify","getBoundingClientRect","values","some","val","ContextManager","getInstance","_window$uxfTriggerLib","uxfTriggerLibrary","contextManager","setModalContext","detail","payload","type","host","modalContext","isModalOpen","initializeContextListeners","addEventListener","shadowQuerySelectorAll","selector","root","document","maxDepth","Infinity","currentDepth","expandedNodes","shadowRoot","nodesThatMatchedOriginalSelector","Set","querySelectorAll","forEach","node","has","childNodes","validateElement","nowId","getComponentFromRegistry","queryDeepBySelector","parentElement","body","querySelector","nestedElements","from","nestedElement","getActiveScreen","activeExperience","getActiveExperience","appShellLayout","experiences","pop","experiencesData","entries","isActive","experience","experienceData","experiencePath","screen","screenData","findNearestParentElement","_element$getRootNode","shouldValidateElement","ancestor","closest","getRootNode","findFirstChildElement","rootElement","getRootElement","getActiveElement","activeEl","activeElement","ComponentRegistry","componentRegistry","Map","transformActionMap","actionMap","transformedActionMap","_ref","action","active","transformAction","setComponentInRegistry","registryValue","registeredComponent","toUpperCase","mergeActionMaps","originalActionMap","registryValueActionMap","mergedMap","registeredElement","registerComponent","metadata","updateState","parentComponentTagName","deregisterComponent","delete","shortcutState","initialized","getShortcutsState","setShortcutsState","newStateParams","hasOwn","Error","initializedPromiseResolvers","setInitialized","promiseResolver","resolve","splice","onShortcutsInitialized","Promise","filterActiveComponents","component","modalCase","childElement","isChildOf","parent","child","contains","nodeType","Node","ELEMENT_NODE","isChildOfRootElement","ApplicableComponentAdapter","this","_setActiveComponents","activeComponents","filter","getActiveComponents","getApplicableComponents","actionName","availableActions","ActionStateQueue","enqueue","__queue","dequeue","shift","_defineProperty","actionStateQueue","setComponentAction","setActionStateForShortcut","registeredComponentId","shortcutMetadata","handleState","condition","payloadCondition","setAction","getShortcutByPayloadCondition","setActionStateByPayload","shortcutDefinitionSysId","setActionStateBySysId","getShortcutByKey","hasRegisteredShortcuts","setActionState","setAvailableActions","actionNames","previousLandmark","isLandmarkAction","handleLastClicked","composedPath","lastClickedElement","WeakRef","ShortcutRegistry","IntersectedShortcutRegistry","getAllShortcuts","getAllShortcutsByActionKey","every","size","registerShortcuts","sysId","definitionSysId","label","category","categoryValue","order","readonly","componentTag","shortcutSysId","overriden","prettifiedShortcuts","setQueuedActionStates","getContextualizedShortcuts","applicableComponentAdapter","activeComponentTagNames","flatMap","c","_c$registeredElement","applicableComponents","hasLandmarksOnPage","landmarks","landmark","_component$actionMap$","getAllPrettifiedShortcuts","avoidContextualize","map","s","index","self","findIndex","__WEBPACK_EXTERNAL_MODULE__uxasset_externals_servicenow_ui_metrics_index_jsdbx_a3ad35c5__","createInteractionId","defineMetric","getMetricTypes","mark","EVENT_METRIC","markKeyboardShortcut","shortcutName","metric","extraMeta","event","uxfKeyboardShortcutInteractionId","initCustomKeyboardShortcutMetric","interactionId","timestamp","Date","now","pageId","pageName","componentId","workspaceName","markOptions","triggerAction","reject","errorMessage","_component$registered","_component$registered2","actionFn","_component$registered3","_component$registered4","coeffects","_component$registered5","_component$registered6","filterShortcuts","contextualizedShortcuts","platformShortcut","isModifierKeyPressedWithKey","forPlatform","getModifierState","isAlphanumericKey","prefix","startsWith","isSpecialCharacterKey","getResolvedShortcut","getTargetElement","componentTagNames","sort","reverse","dedupeShortcuts","handleShortcutKeyDown","_event$detail","_event$detail$payload","CustomEvent","KeyboardEvent","resolveKeyboardEvent","stopPropagation","preventDefault","_landmarks$incremente","focusIncrement","currentActiveElement","processedActiveElement","_window$uxfTriggerLib2","_window$uxfTriggerLib3","_window$uxfTriggerLib4","deref","setAttribute","removeAttribute","getAttribute","landmarkIndex","indexOf","incrementedIndex","focus","landmarkAction","UserOverrideShortcutsRegistry","getKeyboardShortcutOverrides","formatAndPrettifyShortcutByPlatform","shortcutOverride","shortcutByPlatform","prettifiedShortcutByPlatform","formattedShortcutByPlatform","formattedPrettifiedShortcutByPlatform","intersectShortcutOverrides","clear","shortcutKey","registerShortcutOverrides","initializeShortcuts","areShortcutsEnabled","shortcutsEnabledUserPref","shortcutsEnabledSysProp","shortcutsMetadata","_window2","_window2$ux_globals","kbsCB","getItem","_window3","_window3$ux_globals","uxGlob","storedCB","then","fetchShortcuts","overrideCB","fetchUserOverrideShortcuts","KBS_METRICS","session","failedAttempts","suggestionShownOnce","lastSuggestionSource","activeShortcutSysId","emitKbsMetric","eventName","_","toFlag","v","trackSuggestionShown","source","count","platform","recordSuggestionShown","trackRemapSuccess","_ref3","inputSource","suggestionSource","usedSuggestion","after_error","suggestion_shown","suggestion_used","suggestion_source","trackRemapFailure","_ref4","fromSuggestion","attemptNumber","attempt_type","input_source","logAndFormatError","logMessage","_error$response$data","message","err","cause","stack","fetchKeyboardShortcutSuggestions","keyboardMetadata","_response$data","recommendation","isArray","mapped","item","prettyShortcut","Boolean","setKeyboardShortcutOverride","newShortcutOverride","override","buildSetShortcutOverrideRequestPayload","restMethod","_ref2","trackRemapAttemptStarted","_response$data2","updatedOverrides","catch","formattedError","isKbsSuggestionsEnabled","_window$ux_globals$li","_window$ux_globals$li2","libuxf","sysprops","recommendations","deleteKeyboardShortcutOverride","_response","_response$data3","restoreDefaults"]}