{"version":3,"sources":["webpack:///C:/a/2/s/Cognito.Web.Client/libs/shared-components/src/mixins/trap-focus.js","webpack:///C:/a/2/s/Cognito.Web.Client/libs/shared-components/src/components/dialogs/dialog-util.js","webpack:///C:/a/2/s/Cognito.Web.Client/libs/shared-components/src/focusable-elements.ts"],"names":["obj","_focusableElements","require","__esModule","default","_toConsumableArray","arr","Array","isArray","_arrayLikeToArray","_arrayWithoutHoles","iter","Symbol","iterator","from","_iterableToArray","o","minLen","n","Object","prototype","toString","call","slice","constructor","name","test","_unsupportedIterableToArray","TypeError","_nonIterableSpread","len","length","i","arr2","exports","methods","trapFocus","e","el","which","els","querySelectorAll","focusableEls","shiftKey","document","activeElement","preventDefault","focus","isVisible","window","console","warn","_unused","Cognito","Messaging","body","className","includes","trigger","handler","_unused2","addHandler"],"mappings":"6JAAA,IAAiDA,EAAjDC,GAAiDD,EAAjDE,EAAA,QAAiDF,EAAAG,WAAAH,EAAA,CAAAI,QAAAJ,GAAA,SAAAK,EAAAC,GAAA,gBAAAA,GAAA,GAAAC,MAAAC,QAAAF,GAAA,OAAAG,EAAAH,GAAAI,CAAAJ,IAAA,SAAAK,GAAA,uBAAAC,QAAA,MAAAD,EAAAC,OAAAC,WAAA,MAAAF,EAAA,qBAAAJ,MAAAO,KAAAH,GAAAI,CAAAT,IAAA,SAAAU,EAAAC,GAAA,IAAAD,EAAA,2BAAAA,EAAA,OAAAP,EAAAO,EAAAC,GAAA,IAAAC,EAAAC,OAAAC,UAAAC,SAAAC,KAAAN,GAAAO,MAAA,iBAAAL,GAAAF,EAAAQ,cAAAN,EAAAF,EAAAQ,YAAAC,MAAA,WAAAP,GAAA,QAAAA,EAAA,OAAAX,MAAAO,KAAAE,GAAA,iBAAAE,GAAA,2CAAAQ,KAAAR,GAAA,OAAAT,EAAAO,EAAAC,GAAAU,CAAArB,IAAA,qBAAAsB,UAAA,wIAAAC,GAAA,SAAApB,EAAAH,EAAAwB,IAAA,MAAAA,KAAAxB,EAAAyB,UAAAD,EAAAxB,EAAAyB,QAAA,QAAAC,EAAA,EAAAC,EAAA,IAAA1B,MAAAuB,GAAAE,EAAAF,EAAAE,IAAAC,EAAAD,GAAA1B,EAAA0B,GAAA,OAAAC,EAAAC,EAAA9B,QAElC,CACd+B,QAAS,CACRC,UAAS,SAACC,EAAGC,GACZ,GAAgB,IAAZD,EAAEE,MAAa,CAClB,IAAMC,EAAGnC,EAAOiC,EAAGG,iBAAiBC,YAGhCL,EAAEM,UAAYH,EAAI,KAAOI,SAASC,eACrCR,EAAES,iBACFN,EAAIA,EAAIT,OAAS,GAAGgB,SAEXV,EAAEM,UAAYH,EAAIA,EAAIT,OAAS,KAAOa,SAASC,gBACxDR,EAAES,iBACFN,EAAI,GAAGO,c,4GCbL,SAAgCC,GACtC,IACMC,QACJC,QAAQC,KAAK,sBAEf,MAAAC,GACC,OAIGH,OAAOI,SAAWJ,OAAOI,QAAQC,YAAcN,IAAcJ,SAASW,KAAKC,UAAUC,SAAS,oBAEjGJ,QAAQC,UAAUI,QAAQV,EAAY,cAAgB,gB,iCAIjD,SAAwCW,GAC9C,IACMV,QACJC,QAAQC,KAAK,sBAEf,MAAAS,GACC,OAGGX,OAAOI,SAAWJ,OAAOI,QAAQC,WAEpCD,QAAQC,UAAUO,WAAW,iBAAkBF,K,8GC7BlC","file":"13.a04b98cee11a9b40ff42.js","sourcesContent":["import focusableEls from '../focusable-elements';\r\n\r\nexport default {\r\n\tmethods: {\r\n\t\ttrapFocus(e, el) {\r\n\t\t\tif (e.which === 9) {\r\n\t\t\t\tconst els = [...el.querySelectorAll(focusableEls)];\r\n\t\t\t\t// Handle shift-tabbing when on first element of the dialog,\r\n\t\t\t\t// then handle forward tabbing when on last element\r\n\t\t\t\tif (e.shiftKey && els[0] === document.activeElement) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\tels[els.length - 1].focus();\r\n\t\t\t\t}\r\n\t\t\t\telse if (!e.shiftKey && els[els.length - 1] === document.activeElement) {\r\n\t\t\t\t\te.preventDefault();\r\n\t\t\t\t\tels[0].focus();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n};\r\n","\r\n// Called when vue dialogs are shown/hidden for compatibility with admin modal overlays\r\nexport function handleDialogVisibility(isVisible) {\r\n\ttry {\r\n\t\tif (!window)\r\n\t\t\tconsole.warn('Window not defined');\r\n\t}\r\n\tcatch {\r\n\t\treturn;\r\n\t}\r\n\r\n\t// do not hide the overlay if a legacy modal is open underneath a vue dialog\r\n\tif (window.Cognito && window.Cognito.Messaging && (isVisible || !document.body.className.includes('c-modal-active'))) {\r\n\t\t// eslint-disable-next-line no-undef\r\n\t\tCognito.Messaging.trigger(isVisible ? 'showOverlay' : 'hideOverlay');\r\n\t}\r\n}\r\n\r\nexport function setupChromeOverlayClickHandler(handler) {\r\n\ttry {\r\n\t\tif (!window)\r\n\t\t\tconsole.warn('Window not defined');\r\n\t}\r\n\tcatch {\r\n\t\treturn;\r\n\t}\r\n\r\n\tif (window.Cognito && window.Cognito.Messaging) {\r\n\t\t// eslint-disable-next-line no-undef\r\n\t\tCognito.Messaging.addHandler('overlayClicked', handler);\r\n\t}\r\n}","export default 'a[href]:not([disabled]), select:not([disabled]), input:not([disabled]), textarea:not([disabled]), button:not([disabled]), .el-radio:not([disabled])';"],"sourceRoot":""}