"use strict"; (() => { // ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/services.js var social_limiter = (tweets, toots) => { const numberTweets = 20; let posts = tweets.concat(toots); let byDate = (fst, snd) => Date.parse(fst.time) - Date.parse(snd.time); let postsSorted = posts.sort(byDate); if (postsSorted.length > 0) { while (postsSorted.length < numberTweets) { postsSorted = postsSorted.concat(postsSorted); } } postsSorted = postsSorted.reverse().slice(0, numberTweets); return postsSorted; }; var tweet_author = (data, tweet) => { let authorId = tweet.author_id; let users = data.includes.users; let author = users.find((item) => item.id === authorId); let userName = author !== void 0 ? author.username : "NoOne"; return userName; }; var tweet_profile_image = (data, tweet) => { const defaultProfileImageUrl = "https://abs.twimg.com/sticky/default_profile_images/default_profile_normal.png"; let authorId = tweet.author_id; let users = data.includes.users; let author = users.find((item) => item.id === authorId); let profileImageUrl = author !== void 0 ? author.profile_image_url : defaultProfileImageUrl; return profileImageUrl; }; var tweet_text = (tweet) => tweet.text; var tweet_time = (tweet) => tweet.created_at; var twitter_filter = (inputData) => { let tweets; inputData.forEach((d) => tweets = d.data.map((t) => { return { author: tweet_author(d, t), image: tweet_profile_image(d, t), text: tweet_text(t), time: tweet_time(t), source: "twitter" }; })); return tweets; }; var toot_author = (toot) => toot.account.username; var toot_profile_image = (toot) => toot.account.avatar_static; var toot_text = (toot) => toot.content; var toot_time = (toot) => toot.created_at; var html_plainify = (html2) => { let span = document.createElement("span"); span.innerHTML = html2; let children = span.querySelectorAll("*"); children.forEach((child) => { child.textContent += " "; }); return span.textContent.toString().replace(/ +/g, " "); }; var mastodon_filter = (idata) => { let toots; idata.forEach((d) => { toots = d.map((t) => { return { author: toot_author(t), image: toot_profile_image(t), text: html_plainify(toot_text(t)), time: toot_time(t), source: "mastodon" }; }); }); return toots; }; var schedule_filter = (data) => { let dataDays = data.schedule.conference.days; let talksData = dataDays.map((d) => { let rooms = Object.values(d.rooms); rooms.flat().forEach((t) => { t.day = d.index; }); return rooms; }).flat(2); let byDate = (fst, snd) => Date.parse(fst.date) - Date.parse(snd.date); let talksDataSorted = talksData.sort(byDate); return talksDataSorted; }; var future_events = (schedule, datetime) => { let scheduleFiltered = schedule.filter((e) => Date.parse(e.date) > datetime); return scheduleFiltered; }; // ns-hugo:/home/raoul-web/rc3_2021/html-infobeamer-content/assets/js/dom.js var html = htm.bind(preact.h); var speaker_names = (talk) => talk.persons.map((p) => p.public_name); var speaker_dom = (talk) => { const separator = ", "; let names = speaker_names(talk); let inner; if (names.length > 0) { let string = names.join(separator); inner = html`