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AI,CAACb,UAAU,CAACc,IAAI,CAAC,CAAC;UACtB,IAAI,CAACxB,EAAE,CAACyB,YAAY,CAAC,UAAU,EAAC,IAAI,CAAC;QACzC;MACJ;IACJ;EAAC;AAAA,KAIL;AACO,SAASC,UAAUA,CAACC,QAAQ,EAAE;EACjCA,QAAQ,CAACC,OAAO,CAAC,UAACC,IAAI,EAAK;IACvB;IACA,IAAIA,IAAI,CAACC,QAAQ,KAAK,CAAC,EAAE;MACrB,IAAI/B,gBAAgB,CAAC8B,IAAI,CAAC;IAC9B;EACJ,CAAC,CAAC;AACN;;;;;;;;;;;;;;ACpDO,IAAM/B,UAAU,GAAG;EACtBiC,EAAE,EAAE,GAAG;EACPC,EAAE,EAAE,GAAG;EACPX,EAAE,EAAE,GAAG;EACPY,EAAE,EAAE,IAAI;EACRC,GAAG,EAAE;AACT,CAAC","sources":["webpack://WebpackConfig.Web/./app/src/js/collapse-expand-for-desktop.js","webpack://WebpackConfig.Web/./app/src/js/config.js"],"sourcesContent":["// *****************************\r\n// ***** Main Navigation *****\r\n// *****************************\r\n\r\nimport { Collapse as bsCollapse } from 'bootstrap';\r\nimport { breakPoint } from './config';\r\n\r\nclass ExpandForDesktop {\r\n\r\n constructor(el) {\r\n this.mobile = true;\r\n this.el = el; // collapse controller element\r\n this.resizeRequested = null;\r\n let target = document.querySelector(el.dataset.bsTarget);\r\n if(target != null) {\r\n this.collapseEl = bsCollapse.getOrCreateInstance(target, {\r\n toggle: false\r\n });\r\n if(this.collapseEl != null) {\r\n this.resize();\r\n window.addEventListener('window-resize', () => {\r\n this.resize();\r\n });\r\n }\r\n }\r\n }\r\n\r\n resize() {\r\n let isMobile = window.innerWidth < breakPoint.LG;\r\n this.resizeRequested = false;\r\n if(isMobile != this.mobile) {\r\n this.mobile = isMobile;\r\n if(isMobile) {\r\n this.collapseEl.hide();\r\n this.el.removeAttribute('disabled');\r\n } else {\r\n this.collapseEl.show();\r\n this.el.setAttribute('disabled',true);\r\n }\r\n }\r\n }\r\n\r\n}\r\n\r\n// export the default function to create\r\nexport function createFrom(wrappers) {\r\n wrappers.forEach((node) => {\r\n // if node is an element\r\n if (node.nodeType === 1) {\r\n new ExpandForDesktop(node);\r\n }\r\n });\r\n}","export const breakPoint = {\r\n SM: 576,\r\n MD: 768,\r\n LG: 992,\r\n XL: 1200,\r\n XXL: 1400\r\n}\r\n"],"names":["Collapse","bsCollapse","breakPoint","ExpandForDesktop","el","_this","_classCallCheck","mobile","resizeRequested","target","document","querySelector","dataset","bsTarget","collapseEl","getOrCreateInstance","toggle","resize","window","addEventListener","_createClass","key","value","isMobile","innerWidth","LG","hide","removeAttribute","show","setAttribute","createFrom","wrappers","forEach","node","nodeType","SM","MD","XL","XXL"],"sourceRoot":""}