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IAAII,KAAI,CAACI,WAAW,IAAI,IAAI,EAAE;MAC1B,IAAIM,aAAa,GAAGd,CAAC,CAACe,cAAc,CAAC,CAAC,CAAC,CAACH,KAAK;MAC7C,IAAKE,aAAa,GAAGV,KAAI,CAACI,WAAW,GAAIJ,KAAI,CAACE,SAAS,EAAE;QACrDF,KAAI,CAACI,WAAW,GAAG,IAAI;QACvBJ,KAAI,CAACb,UAAU,CAACyB,IAAI,CAAC,CAAC;MAC1B,CAAC,MAAM,IAAKZ,KAAI,CAACI,WAAW,GAAGM,aAAa,GAAIV,KAAI,CAACE,SAAS,EAAE;QAC5DF,KAAI,CAACI,WAAW,GAAG,IAAI;QACvBJ,KAAI,CAACb,UAAU,CAAC0B,IAAI,CAAC,CAAC;MAC1B;IACJ;EACJ,CAAC,EAAEzB,eAAe,GAAG;IAAEqB,OAAO,EAAE;EAAK,CAAC,GAAG,KAAK,CAAC;EAC/C,IAAI,CAACV,EAAE,CAACL,gBAAgB,CAAC,UAAU,EAAE,YAAM;IACvCM,KAAI,CAACI,WAAW,GAAG,IAAI;EAC3B,CAAC,EAAEhB,eAAe,GAAG;IAAEqB,OAAO,EAAE;EAAK,CAAC,GAAG,KAAK,CAAC;AACnD,CAAC,GAIL;AACO,SAASK,UAAUA,CAACC,QAAQ,EAAE;EACjCA,QAAQ,CAACC,OAAO,CAAC,UAACC,IAAI,EAAK;IACvB;IACA,IAAIA,IAAI,CAACC,QAAQ,KAAK,CAAC,EAAE;MACrB,IAAIrB,aAAa,CAACoB,IAAI,CAAC;IAC3B;EACJ,CAAC,CAAC;AACN","sources":["webpack://WebpackConfig.Web/./app/src/js/bootstrap-carousel-swipe.js"],"sourcesContent":["import { Carousel as bsCarousel } from 'bootstrap';\r\n\r\n// Test via a getter in the options object to see if the passive property is accessed\r\nvar supportsPassive = false;\r\ntry {\r\n var opts = Object.defineProperty({}, 'passive', {\r\n get: function() {\r\n supportsPassive = true;\r\n }\r\n });\r\n window.addEventListener(\"testPassive\", null, opts);\r\n window.removeEventListener(\"testPassive\", null, opts);\r\n} catch (e) {}\r\n\r\nclass CarouselSwipe {\r\n\r\n constructor(el) {\r\n this.el = el;\r\n this.threshold = 60;\r\n this.bsCarousel = bsCarousel.getOrCreateInstance(this.el);\r\n this.touchStartX = null;\r\n this.el.addEventListener('touchstart', (e) => {\r\n if (e.touches.length == 1) {\r\n let touch = e.touches[0];\r\n this.touchStartX = touch.pageX;\r\n }\r\n }, supportsPassive ? { passive: true } : false);\r\n this.el.addEventListener('touchmove', (e) => {\r\n if (this.touchStartX != null) {\r\n let touchCurrentX = e.changedTouches[0].pageX;\r\n if ((touchCurrentX - this.touchStartX) > this.threshold) {\r\n this.touchStartX = null;\r\n this.bsCarousel.prev();\r\n } else if ((this.touchStartX - touchCurrentX) > this.threshold) {\r\n this.touchStartX = null;\r\n this.bsCarousel.next();\r\n }\r\n }\r\n }, supportsPassive ? { passive: true } : false);\r\n this.el.addEventListener('touchend', () => {\r\n this.touchStartX = null;\r\n }, supportsPassive ? { passive: true } : false);\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 CarouselSwipe(node);\r\n }\r\n });\r\n}"],"names":["Carousel","bsCarousel","supportsPassive","opts","Object","defineProperty","get","window","addEventListener","removeEventListener","e","CarouselSwipe","_createClass","el","_this","_classCallCheck","threshold","getOrCreateInstance","touchStartX","touches","length","touch","pageX","passive","touchCurrentX","changedTouches","prev","next","createFrom","wrappers","forEach","node","nodeType"],"sourceRoot":""}