{"version":3,"file":"ExpandableNavigationGallery.Main.min.js","mappings":"yBAIMA,OAAQC,sCCFP,WACN,MAAMC,EAAsBC,EAAE,0CACxBC,EAAiBD,EAAE,oDACzB,IAAIE,GAAgB,EAEpB,SAASC,IACJD,IAKJD,EAAOG,MAAM,EAFc,GAESC,OACpCJ,EAAOG,MAHoB,GAGME,OAE7BL,EAAOM,OALgB,EAM1BR,EAAYM,OAEZN,EAAYO,OAEd,CAEAP,EAAYS,GAAG,kBAAkB,SAAUC,GAC1C,GAAe,aAAXA,EAAEC,MAAmC,KAAZD,EAAEE,MAC9B,OAEDT,GAAgB,EAChB,MAAMU,EAAmBX,EAAOY,OAAO,WAAWC,QAElDb,EAAOI,OACPL,EAAEe,MAAMT,OAERM,EAAiBI,KAAK,KAAKC,OAC5B,IAEAd,IACAH,EAAEH,QAAQqB,OAAOf,EAClB,C","sources":["/./ExpandableNavigationGallery/ExpandableNavigationGallery.Main.ts","/./ExpandableNavigationGallery/ExpandableNavigationGallery.ts"],"sourcesContent":["// Copyright (C) Microsoft Corporation. All rights reserved.\r\n\r\nimport { InitializeExpandableNavigationGallery } from './ExpandableNavigationGallery';\r\n\r\n(window).InitializeExpandableNavigationGallery = InitializeExpandableNavigationGallery;\r\n","// Copyright (C) Microsoft Corporation. All rights reserved.\r\n\r\nexport function InitializeExpandableNavigationGallery() {\r\n\tconst $seeAllLink: JQuery = $('.expandableNavigationGallerySeeAllLink');\r\n\tconst $items: JQuery = $('.nav-gallery-expandable__cta-grid__column--image');\r\n\tlet seeAllClicked = false;\r\n\r\n\tfunction updateItemVisibility() {\r\n\t\tif (seeAllClicked) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tconst initialItemsToShow = 8;\r\n\r\n\t\t$items.slice(0, initialItemsToShow).show();\r\n\t\t$items.slice(initialItemsToShow).hide();\r\n\r\n\t\tif ($items.length > initialItemsToShow) {\r\n\t\t\t$seeAllLink.show();\r\n\t\t} else {\r\n\t\t\t$seeAllLink.hide();\r\n\t\t}\r\n\t} \r\n\r\n\t$seeAllLink.on('click keypress', function (e: JQuery.Event) {\r\n\t\tif (e.type === 'keypress' && e.which !== 13) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tseeAllClicked = true;\r\n\t\tconst $firstHiddenItem = $items.filter(':hidden').first();\r\n\r\n\t\t$items.show();\r\n\t\t$(this).hide();\r\n\r\n\t\t$firstHiddenItem.find('a').focus();\r\n\t});\r\n\r\n\tupdateItemVisibility();\r\n\t$(window).resize(updateItemVisibility);\r\n}\r\n"],"names":["window","InitializeExpandableNavigationGallery","$seeAllLink","$","$items","seeAllClicked","updateItemVisibility","slice","show","hide","length","on","e","type","which","$firstHiddenItem","filter","first","this","find","focus","resize"],"sourceRoot":""}