{"version":3,"sources":["webpack:///./widgets/featureArticleHero.js"],"names":["WG","concat","FeatureArticleHero","$el","_classCallCheck","this","$","key","value","playVideo","setImageHeight","_this","document","on","$video","find","length","youTubePlayers","attr","setVolume","utils","isIPhone","isIPad","inIframe","h","window","top","innerHeight","css"],"mappings":"k3BACA,IAEMA,EAAK,IAAHC,OADI,qBACM,KAQLC,EAAkB,WAK7B,O,EAHD,SAAAA,EAAYC,I,4FAAKC,CAAA,KAAAF,GAEhBG,KAAKF,IAAMG,EAAEH,K,EACb,EAAAI,IAAA,OAAAC,MAED,WACCH,KAAKI,YACLJ,KAAKK,mBACL,CAAAH,IAAA,YAAAC,MAED,WAAY,IAAAG,EAAA,KACXL,EAAEM,UAAUC,GAAG,qBAAqB,WACnC,IAAIC,EAASH,EAAKR,IAAIY,KAAK,GAADd,OAAID,EAAE,UAC5Bc,EAAOE,OAAS,GACnBC,eAAeH,EAAOI,KAAK,qBAAqBC,UAAU,QAG5D,CAAAZ,IAAA,iBAAAC,MAED,WAEC,IAAKY,IAAMC,YAAcD,IAAME,WAAaF,IAAMG,WAAY,CAC7D,IAAIC,EAAIC,OAAOC,IAAIC,aAAe,IAClCtB,KAAKF,IAAIyB,IAAI,SAAU,GAAF3B,OAAKuB,EAAC,OACvBJ,IAAMC,YAAYhB,KAAKF,IAAIY,KAAKf,EAAK,QAAQ4B,IAAI,SAAU,c,0FA1BnC,I","file":"32.js","sourcesContent":["// CONSTANTS are all caps.\nconst NS = \"FeatureArticleHero\";\nconst CLS = \"featureArticleHero\";\nconst WG = `.${CLS}-`;\n\n// Import stuff here if you need to or even better to import them dynamically\n// for ex. of dynamic import check out src/scripts/loadWg/featureArticleHero.js using Webpack dynamic imports as chunks.\n// import $ from 'jquery'\n\nimport utils from '../utils';\n\nexport class FeatureArticleHero {\n\n\tconstructor($el) {\n\t\t// $el is the widget node return by the loadFeatureArticleHero function\n\t\tthis.$el = $($el);\n\t}\n\n\tinit() {\n\t\tthis.playVideo();\n\t\tthis.setImageHeight();\n\t}\n\n\tplayVideo() {\n\t\t$(document).on(\"youtubeVideoReady\", () => {\n\t\t\tlet $video = this.$el.find(`${WG}video`);\n\t\t\tif ($video.length > 0) {\n\t\t\t\tyouTubePlayers[$video.attr(\"data-array-index\")].setVolume(0);\n\t\t\t}\n\t\t});\n\t}\n\n\tsetImageHeight() {\n\t\t//there's a bu on iframe for using \"vh\" unit. so need to override it using pixel\n\t\tif ((utils.isIPhone() || utils.isIPad()) && utils.inIframe()) {\n\t\t\tvar h = window.top.innerHeight || 530;\t\t\t\n\t\t\tthis.$el.css('height', `${h}px`);\n\t\t\tif (utils.isIPhone()) this.$el.find(WG + 'chev').css('bottom', '50px');\n\t\t}\n\t}\n\n}\n"],"sourceRoot":""}