Get the Best IPTV Service
define("discourse/plugins/discourse-lazy-videos/discourse/components/lazy-iframe",["exports","@glimmer/component","@ember/component","@ember/template-factory"],(function(e,t,i,s){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 class o extends t.default{get iframeSrc(){switch(this.args.providerName){case"youtube":let e=`https://www.youtube.com/embed/${this.args.videoId}?autoplay=1&rel=0` return this.args.startTime&&(e+=`&start=${function(e){const t=e.toString().match(/(?:(\d+)h)?(?:(\d+)m)?(?:(\d+)s)?/),[i,s,o]=t.slice(1) if(i||s||o)return 3600*(parseInt(i,10)||0)+60*(parseInt(s,10)||0)+(parseInt(o,10)||0) return e}(this.args.startTime)}`),e case"vimeo":return`https://player.vimeo.com/video/${this.args.videoId}${this.args.videoId.includes("?")?"&":"?"}autoplay=1` case"tiktok":return`https://www.tiktok.com/embed/v2/${this.args.videoId}`}}static#e=(()=>(0,i.setComponentTemplate)((0,s.createTemplateFactory)({id:"GBbnVjZj",block:'[[[1,"\\n"],[41,[30,1],[[[1," "],[10,"iframe"],[15,"src",[30,0,["iframeSrc"]]],[15,"title",[30,2]],[14,"allowFullScreen",""],[14,"scrolling","no"],[14,"frameborder","0"],[14,"seamless","seamless"],[14,"allow","accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture"],[12],[13],[1,"\\n"]],[]],null],[1," "]],["@providerName","@title"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-lazy-videos/discourse/components/lazy-iframe.js",isStrictMode:!0}),this))()}e.default=o})),define("discourse/plugins/discourse-lazy-videos/discourse/components/lazy-video",["exports","@glimmer/component","@glimmer/tracking","@ember/helper","@ember/modifier","@ember/object","@ember/template","discourse/helpers/concat-class","discourse/plugins/discourse-lazy-videos/discourse/components/lazy-iframe","@ember/component","@ember/template-factory"],(function(e,t,i,s,o,a,r,d,l,n,c){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 class u extends t.default{static#e=(()=>dt7948.g(this.prototype,"isLoaded",[i.tracked],(function(){return!1})))() #t=(()=>{dt7948.i(this,"isLoaded")})() get thumbnailStyle(){const e=this.args.videoAttributes.dominantColor if(e?.match(/^[0-9A-Fa-f]+$/))return(0,r.htmlSafe)(`background-color: #${e};`)}loadEmbed(){this.isLoaded||(this.isLoaded=!0,this.args.onLoadedVideo?.())}static#i=(()=>dt7948.n(this.prototype,"loadEmbed",[a.action]))() onKeyPress(e){"Enter"===e.key&&(e.preventDefault(),this.loadEmbed())}static#s=(()=>dt7948.n(this.prototype,"onKeyPress",[a.action]))() static#o=(()=>(0,n.setComponentTemplate)((0,c.createTemplateFactory)({id:"1eaF/Mtc",block:'[[[1,"\\n "],[10,0],[15,"data-video-id",[30,1,["id"]]],[15,"data-video-title",[30,1,["title"]]],[15,"data-video-start-time",[30,1,["startTime"]]],[15,"data-provider-name",[30,1,["providerName"]]],[15,0,[28,[32,0],["lazy-video-container",[28,[32,1],[[30,1,["providerName"]],"-onebox"],null],[52,[30,0,["isLoaded"]],"video-loaded"]],null]],[12],[1,"\\n"],[41,[30,0,["isLoaded"]],[[[1," "],[8,[32,2],null,[["@providerName","@title","@videoId","@startTime"],[[30,1,["providerName"]],[30,1,["title"]],[30,1,["id"]],[30,1,["startTime"]]]],null],[1,"\\n"]],[]],[[[1," "],[11,0],[24,"tabindex","0"],[16,5,[30,0,["thumbnailStyle"]]],[16,0,[28,[32,0],["video-thumbnail",[30,1,["providerName"]]],null]],[4,[32,3],["click",[30,0,["loadEmbed"]]],null],[4,[32,3],["keypress",[30,0,["loadEmbed"]]],null],[12],[1,"\\n "],[10,"img"],[15,"src",[30,1,["thumbnail"]]],[15,"title",[30,1,["title"]]],[14,"loading","lazy"],[15,0,[28,[32,1],[[30,1,["providerName"]],"-thumbnail"],null]],[12],[13],[1,"\\n "],[10,0],[15,0,[28,[32,0],["icon",[28,[32,1],[[30,1,["providerName"]],"-icon"],null]],null]],[12],[13],[1,"\\n "],[13],[1,"\\n "],[10,0],[14,0,"title-container"],[12],[1,"\\n "],[10,0],[14,0,"title-wrapper"],[12],[1,"\\n "],[10,3],[15,6,[30,1,["url"]]],[15,"title",[30,1,["title"]]],[14,"target","_blank"],[14,"rel","noopener noreferrer"],[14,0,"title-link"],[12],[1,"\\n "],[1,[30,1,["title"]]],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n "],[13],[1,"\\n"]],[]]],[1," "],[13],[1,"\\n "]],["@videoAttributes"],false,["if"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-lazy-videos/discourse/components/lazy-video.js",scope:()=>[d.default,s.concat,l.default,o.on],isStrictMode:!0}),this))()}e.default=u})),define("discourse/plugins/discourse-lazy-videos/initializers/lazy-videos",["exports","discourse/lib/plugin-api","discourse/plugins/discourse-lazy-videos/lib/lazy-video-attributes","@ember/template-factory"],(function(e,t,i,s){"use strict" function o(e){e.decorateCookedElement(((t,o)=>{if(t.classList.contains("d-editor-preview"))return t.querySelectorAll(".lazy-video-container").forEach((a=>{const r=e.container.lookup("service:site-settings"),d=(0,i.default)(a) if(r[`lazy_${d.providerName}_enabled`]){const i=()=>{const i=t.closest("article")?.dataset?.postId i&&e.preventCloak(parseInt(i,10))},r=o.renderGlimmer("p.lazy-video-wrapper",(0,s.createTemplateFactory)({id:"BIb4XPBx",block:'[[[8,[39,0],null,[["@videoAttributes","@onLoadedVideo"],[[30,1,["param"]],[30,1,["onLoadedVideo"]]]],null]],["@data"],false,["lazy-video"]]',moduleName:"/var/www/discourse/app/assets/javascripts/discourse/discourse/plugins/discourse-lazy-videos/initializers/lazy-videos.js",isStrictMode:!1}),{param:d,onLoadedVideo:i}) a.replaceWith(r)}}))}),{onlyStream:!0})}Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0 e.default={name:"discourse-lazy-videos",initialize(){(0,t.withPluginApi)("1.6.0",o)}}})),define("discourse/plugins/discourse-lazy-videos/lib/lazy-video-attributes",["exports"],(function(e){"use strict" Object.defineProperty(e,"__esModule",{value:!0}),e.default=function(e){if(!e.classList.contains("lazy-video-container"))return{} const t=e.querySelector("a")?.getAttribute("href"),i=e.querySelector("img"),s=i?.getAttribute("src"),o=i?.dataset?.dominantColor,a=e.dataset.videoTitle,r=e.dataset.videoStartTime,d=e.dataset.providerName,l=e.dataset.videoId return{url:t,thumbnail:s,title:a,providerName:d,id:l,dominantColor:o,startTime:r}}})) //# sourceMappingURL=discourse-lazy-videos-2608f28c9b903bd8b8cc3be99e14db5996dac33143503cda3b15a6c2695085d3.map //! ; Flash Sale Popup