{"version":3,"file":"js/chapterOverviewCompact.5fc59671328a592ef796.js","mappings":"+JAEM,qCAENA,OAAOC,GAAKD,OAAOC,IAAM,CAAC,EAE1BD,OAAOC,GAAGC,uBAAyB,IAAI,WACnC,MAAMC,EAAOC,KACbD,EAAKE,sBAAmBC,EAExBH,EAAKI,cAAgB,WACZJ,EAAKE,kBAIVF,EAAKE,iBAAiBG,SAAQ,SAAUC,GACpC,IAAIC,EAAQD,EAAQE,iBAAiB,aACjCC,EAAc,EAElB,GAAIF,EAAMG,OAAS,EAAG,CAClBH,EAAMF,SAAQ,SAAUM,GACpBA,EAAKC,MAAMC,OAAS,OAEhBF,EAAKG,aAAeL,IACpBA,EAAcE,EAAKG,aAE3B,IAEA,MAAMC,EAAkBT,EAAQU,cAAc,wBAC9CD,EAAgBH,MAAMC,OAAS,OAE3BE,EAAgBE,WAAaF,EAAgBD,aAAeL,IAC5DA,EAAcM,EAAgBD,cAGlCP,EAAMF,SAAQ,SAAUM,GACpBA,EAAKC,MAAMC,OAASJ,EAAc,IACtC,IAEAM,EAAgBH,MAAMC,OAASJ,EAAc,IACjD,CACJ,GACJ,EAEAT,EAAKkB,gBAAkB,WACdlB,EAAKE,kBAAkBQ,QAG5BV,EAAKI,eACT,EAEAJ,EAAKmB,KAAO,WACR,MAAMC,EAAW,sCAGjB,GAFApB,EAAKE,iBAAmBmB,SAASb,iBAAiBY,GAEd,GAAhCpB,EAAKE,iBAAiBQ,OACtB,OAGJ,MAAMY,EAAY,KACdC,EAAG,GAAEH,oBAA2BI,cAChCxB,EAAKkB,iBAAiB,EAG1BI,IACAzB,OAAO4B,iBAAiB,SAAUH,GAClCzB,OAAO4B,iBAAiB,oBAAqBH,EACjD,CACJ,EAEAzB,OAAOC,GAAGC,uBAAuBoB,O","sources":["webpack://netzkern.am/./src/Feature/ContentElements/code/Scripts/ChapterOverviewCompact/chapterOverviewCompact.js"],"sourcesContent":["import '../../Styles/ChapterOverviewCompact/chapterOverviewCompact.scss';\r\n\r\nawait import(\"jquery-match-height\");\r\n\r\nwindow.am = window.am || {};\r\n\r\nwindow.am.chapterOverviewCompact = new function () {\r\n const that = this;\r\n that.chapterOverviews = undefined;\r\n\r\n that.setTileHeight = function () {\r\n if (!that.chapterOverviews) {\r\n return;\r\n }\r\n\r\n that.chapterOverviews.forEach(function (chapter) {\r\n var tiles = chapter.querySelectorAll('.chapters');\r\n var highestTile = 0;\r\n\r\n if (tiles.length > 0) {\r\n tiles.forEach(function (tile) {\r\n tile.style.height = 'auto';\r\n\r\n if (tile.offsetHeight > highestTile) {\r\n highestTile = tile.offsetHeight;\r\n }\r\n });\r\n\r\n const searchContainer = chapter.querySelector('.edit-mode-highlight');\r\n searchContainer.style.height = 'auto';\r\n\r\n if (searchContainer.innerText && searchContainer.offsetHeight > highestTile) {\r\n highestTile = searchContainer.offsetHeight;\r\n }\r\n\r\n tiles.forEach(function (tile) {\r\n tile.style.height = highestTile + 'px';\r\n });\r\n\r\n searchContainer.style.height = highestTile + 'px';\r\n }\r\n });\r\n };\r\n\r\n that.checkTileHeight = function () {\r\n if (!that.chapterOverviews?.length) {\r\n return;\r\n }\r\n that.setTileHeight();\r\n };\r\n\r\n that.init = function () {\r\n const selector = '.chapter-overview-compact-container';\r\n that.chapterOverviews = document.querySelectorAll(selector);\r\n\r\n if (that.chapterOverviews.length == 0) {\r\n return;\r\n }\r\n\r\n const setLayout = () => {\r\n $(`${selector} .chapter-title`).matchHeight();\r\n that.checkTileHeight();\r\n }\r\n\r\n setLayout();\r\n window.addEventListener('resize', setLayout);\r\n window.addEventListener('orientationchange', setLayout);\r\n };\r\n}\r\n\r\nwindow.am.chapterOverviewCompact.init();"],"names":["window","am","chapterOverviewCompact","that","this","chapterOverviews","undefined","setTileHeight","forEach","chapter","tiles","querySelectorAll","highestTile","length","tile","style","height","offsetHeight","searchContainer","querySelector","innerText","checkTileHeight","init","selector","document","setLayout","$","matchHeight","addEventListener"],"sourceRoot":""}