${highlight(status.Message, 'https://twitter.com/')}` }} />\n
${highlight(status.User, 'https://twitter.com/')} ${convertDate(status.Created)}` }} />\n {/* eslint-enable react/no-danger */}\n
\n {status.Likes}\n {status.Retweets}\n
\n
\n );\n};\n\nTwitterStatusComponent.propTypes = {\n status: PropTypes.shape({\n Created: PropTypes.string.isRequired,\n ID: PropTypes.string.isRequired,\n Likes: PropTypes.number.isRequired,\n Message: PropTypes.string.isRequired,\n Retweets: PropTypes.number.isRequired,\n User: PropTypes.string.isRequired,\n }).isRequired,\n convertDate: PropTypes.func.isRequired,\n highlight: PropTypes.func.isRequired,\n};\n\nTwitterStatusComponent.displayName = 'TwitterStatusComponent';\nexport default TwitterStatusComponent;\n","const labels = {\n da: {\n AUonSoMe: 'AU på sociale medier',\n followUs: 'Følg os på',\n },\n en: {\n AUonSoMe: 'AU on social media',\n followUs: 'Follow us',\n },\n};\n\nexport default labels;\n","export const GET_FACEBOOK = 'GET_FACEBOOK';\nexport const GET_FACEBOOK_IMAGE = 'GET_FACEBOOK_IMAGE';\nexport const GET_TWITTER = 'GET_TWITTER';\nexport const API_HOST = 'https://webtools.au.dk';\n","import axios from 'axios';\nimport { GET_FACEBOOK, API_HOST } from './const';\n\nconst API_URL = '/api/Social/GetFacebook/';\n\nexport default (seconds, identifier, take) => {\n const url = `${API_HOST}${API_URL}?seconds=${seconds}&identifier=${identifier}&take=${take}`;\n const request = axios.get(url);\n\n return {\n type: GET_FACEBOOK,\n payload: request,\n };\n};\n","import axios from 'axios';\nimport { GET_TWITTER, API_HOST } from './const';\n\nconst API_URL = '/api/Social/GetTwitter/';\n\nexport default (seconds, userId, take) => {\n const url = `${API_HOST}${API_URL}?seconds=${seconds}&userId=${userId}&take=${take}`;\n const request = axios.get(url);\n\n return {\n type: GET_TWITTER,\n payload: request,\n };\n};\n","/* eslint-env browser */\n/* eslint-disable jsx-a11y/anchor-has-content */\nimport React, { Component } from 'react';\nimport { bindActionCreators } from 'redux';\nimport { connect } from 'react-redux';\nimport PropTypes from 'prop-types';\nimport AUSpinnerComponent from '@aarhus-university/au-lib-react-components/src/components/AUSpinnerComponent';\n// import FacebookPostComponent from '../components/FacebookPostComponent';\nimport TwitterStatusComponent from '../components/TwitterStatusComponent';\nimport labels from '../i18n';\nimport getFacebook from '../actions/getFacebook';\nimport getTwitter from '../actions/getTwitter';\nimport '../styles/styles.scss';\n\nconst defaultTwitterSearch = 'aarhusuni';\nconst defaultElfsightApp = 'd5eb5118-ebf0-406f-b609-bdc54fc5034f';\nconst defaultFollowLinks = [\n {\n name: 'Facebook',\n uri: 'https://www.facebook.com/UniAarhus',\n },\n {\n name: 'Bluesky',\n uri: 'https://bsky.app/profile/did:plc:32imedc3eyp7jgro5uwcpmcg',\n },\n {\n name: 'Twitter',\n uri: 'https://x.com/AarhusUni',\n },\n {\n name: 'Instagram',\n uri: 'https://www.instagram.com/aarhusuni/?hl=en',\n },\n {\n name: 'LinkedIn',\n uri: 'https://www.linkedin.com/company/aarhus-university-denmark-?trk=hb_tab_compy_id_4648',\n },\n {\n name: 'YouTube',\n uri: 'https://www.youtube.com/user/AarhusUniversity',\n },\n];\n\nconst importer = {\n url: (url, defer = false) => new Promise((resolve, reject) => {\n const script = document.createElement('script');\n script.type = 'text/javascript';\n script.src = url;\n if (defer) {\n script.defer = true;\n }\n script.addEventListener('load', () => resolve(script), false);\n script.addEventListener('error', () => reject(script), false);\n document.body.appendChild(script);\n }),\n urls: (urls) => Promise.all(urls.map(importer.url)),\n};\nclass AppComponent extends Component {\n static convertDate(d, primaryLang = true) {\n const date = new Date(d);\n const day = date.getDate() < 10 ? (`0${date.getDate()}`) : date.getDate();\n const month = date.getMonth() + 1 < 10 ? (`0${date.getMonth() + 1}`) : (date.getMonth() + 1);\n const hours = date.getHours() < 10 ? (`0${date.getHours()}`) : date.getHours();\n const minutes = date.getMinutes() < 10 ? (`0${date.getMinutes()}`) : date.getMinutes();\n if (primaryLang) {\n return `${day}-${month}-${date.getFullYear()} ${hours}:${minutes}`;\n }\n return `${date.getFullYear()}-${month}-${day} ${hours}:${minutes}`;\n }\n\n static highlight(text, service) {\n const re = /(#\\w[a-zA-ZøæåØÆÅ]+)|(@\\w+)|(http|https):\\/\\/[a-zA-Z0-9\\-.]+\\.[a-zA-Z]{2,3}(\\/\\S*)?/g;\n return text.replace(re, (match, p1, p2, p3) => {\n if (typeof p2 !== 'undefined') {\n return `
${match}`;\n }\n\n if (typeof p3 !== 'undefined') {\n return `
${match}`;\n }\n return `
${match}`;\n });\n }\n\n render() {\n /* eslint-disable react/no-array-index-key */\n const { social, lang } = this.props;\n /*\n const renderFacebook = social.Facebook.Posts.slice(0, 2).map((f, i) => (\n
\n \n
\n ));\n */\n\n const renderTwitter = social.Twitter.slice(0, 4).map((t, i) => (\n
\n \n
\n ));\n\n // eslint-disable-next-line no-underscore-dangle\n let _followLinks = defaultFollowLinks;\n if (typeof window.followLinks !== 'undefined') {\n _followLinks = window.followLinks;\n }\n\n return (\n
{\n const { actions } = this.props;\n const cachePeriod = 3600;\n // const fbAccount = lang === 'da' ? 'UniAarhus' : 'aarhusuni';\n const twAccount = typeof window.twitterSearch !== 'undefined' ? window.twitterSearch : defaultTwitterSearch;\n // actions.getFacebook(cachePeriod, fbAccount, 2);\n if (twAccount !== '') {\n actions.getTwitter(cachePeriod, twAccount, 4);\n }\n\n setTimeout(() => {\n importer.url('https://apps.elfsight.com/p/platform.js', true);\n }, 1000);\n }}\n >\n \n
\n
\n
{labels[lang].AUonSoMe}
\n \n
\n
\n - \n {labels[lang].followUs}\n :\n {' '}\n
\n {\n _followLinks.map((link) => (\n - \n {link.name}\n
\n ))\n }\n
\n
\n
\n
\n
\n {renderTwitter}\n
\n
\n \n );\n }\n}\n\nAppComponent.propTypes = {\n actions: PropTypes.shape({\n getTwitter: PropTypes.func.isRequired,\n }).isRequired,\n social: PropTypes.shape({\n Twitter: PropTypes.arrayOf(PropTypes.shape({})).isRequired,\n loaded: PropTypes.bool.isRequired,\n }).isRequired,\n lang: PropTypes.string.isRequired,\n};\n\nfunction mapStateToProps(state) {\n const props = {\n social: state.social,\n };\n return props;\n}\n\nfunction mapDispatchToProps(dispatch) {\n const actions = {\n getFacebook,\n getTwitter,\n };\n\n const actionMap = { actions: bindActionCreators(actions, dispatch) };\n return actionMap;\n}\n\nAppComponent.displayName = 'AppComponent';\nexport default connect(mapStateToProps, mapDispatchToProps)(AppComponent);\n","import { GET_FACEBOOK, GET_TWITTER } from '../actions/const';\n\nconst initialState = {\n Facebook: {\n Posts: [],\n AccessToken: '',\n },\n Twitter: [],\n loaded: false,\n};\n\nexport default (state = initialState, action) => {\n const nextState = { ...state };\n switch (action.type) {\n case GET_FACEBOOK: {\n const { data } = action.payload;\n nextState.Facebook.Posts = data.Data;\n nextState.Facebook.AccessToken = data.AccessToken;\n nextState.loaded = true;\n return nextState;\n }\n\n case GET_TWITTER: {\n const { data } = action.payload;\n nextState.Twitter = data.Data;\n nextState.loaded = true;\n return nextState;\n }\n\n default: {\n return state;\n }\n }\n};\n","import { combineReducers } from 'redux';\nimport social from './social';\n\nconst reducers = {\n social,\n};\nexport default combineReducers(reducers);\n","/* eslint-env browser */\nimport React from 'react';\nimport { render } from 'react-dom';\nimport { Provider } from 'react-redux';\nimport { createStore, applyMiddleware } from 'redux';\nimport ReduxPromise from 'redux-promise';\n\nimport AppComponent from './containers/AppComponent';\nimport reducers from './reducers';\n\nconst createStoreWithMiddleware = applyMiddleware(ReduxPromise)(createStore);\n\nrender(\n
\n \n ,\n document.getElementById('some-container'),\n);\n"],"names":["root","factory","exports","module","require","define","amd","a","i","self","__WEBPACK_EXTERNAL_MODULE__119__","__WEBPACK_EXTERNAL_MODULE__545__","func","transform","funcProto","Function","prototype","objectProto","Object","funcToString","toString","hasOwnProperty","objectCtorString","call","objectToString","getPrototype","getPrototypeOf","arg","value","isObjectLike","result","e","isHostObject","proto","Ctor","constructor","fn","thisArg","args","Array","arguments","length","apply","utils","bind","Axios","mergeConfig","createInstance","defaultConfig","context","instance","request","extend","axios","create","instanceConfig","defaults","Cancel","CancelToken","isCancel","all","promises","Promise","spread","isAxiosError","headers","normalizedName","forEach","name","toUpperCase","payload","encode","val","encodeURIComponent","replace","url","params","paramsSerializer","serializedParams","isURLSearchParams","parts","key","isArray","v","isDate","toISOString","isObject","JSON","stringify","push","join","hashmarkIndex","indexOf","slice","test","reactIs","REACT_STATICS","childContextTypes","contextType","contextTypes","defaultProps","displayName","getDefaultProps","getDerivedStateFromError","getDerivedStateFromProps","mixins","propTypes","type","KNOWN_STATICS","caller","callee","arity","MEMO_STATICS","compare","TYPE_STATICS","getStatics","component","isMemo","ForwardRef","render","Memo","defineProperty","getOwnPropertyNames","getOwnPropertySymbols","getOwnPropertyDescriptor","objectPrototype","hoistNonReactStatics","targetComponent","sourceComponent","blacklist","inheritedComponent","keys","concat","targetStatics","sourceStatics","descriptor","buildURL","InterceptorManager","dispatchRequest","validator","validators","this","interceptors","response","config","method","toLowerCase","transitional","undefined","assertOptions","silentJSONParsing","boolean","forcedJSONParsing","clarifyTimeoutError","requestInterceptorChain","synchronousRequestInterceptors","interceptor","runWhen","synchronous","unshift","fulfilled","rejected","promise","responseInterceptorChain","chain","resolve","then","shift","newConfig","onFulfilled","onRejected","error","reject","getUri","data","executor","TypeError","resolvePromise","token","message","reason","throwIfRequested","source","cancel","c","isStandardBrowserEnv","originURL","msie","navigator","userAgent","urlParsingNode","document","createElement","resolveURL","href","setAttribute","protocol","host","search","hash","hostname","port","pathname","charAt","window","location","requestURL","parsed","isString","isPromise","obj","config1","config2","valueFromConfig2Keys","mergeDeepPropertiesKeys","defaultToConfig2Keys","directMergeKeys","getMergedValue","target","isPlainObject","merge","mergeDeepProperties","prop","isUndefined","axiosKeys","otherKeys","filter","code","toJSON","description","number","fileName","lineNumber","columnNumber","stack","handlers","use","options","eject","id","h","transformData","throwIfCancellationRequested","cancelToken","transformRequest","common","adapter","transformResponse","isFunction","l","isArrayBuffer","isBuffer","isFormData","FormData","isArrayBufferView","ArrayBuffer","isView","buffer","isNumber","isFile","isBlob","isStream","pipe","URLSearchParams","product","assignValue","b","trim","str","stripBOM","content","charCodeAt","createError","validateStatus","status","_ref","dispatch","next","action","_fluxStandardAction","isFSA","_isPromise","default","_objectSpread","catch","__esModule","ownKeys","sym","enumerable","_defineProperty","configurable","writable","settle","cookies","buildFullPath","parseHeaders","isURLSameOrigin","requestData","requestHeaders","responseType","XMLHttpRequest","auth","username","password","unescape","Authorization","btoa","fullPath","baseURL","onloadend","responseHeaders","getAllResponseHeaders","responseText","statusText","open","timeout","onreadystatechange","readyState","responseURL","setTimeout","onabort","onerror","ontimeout","timeoutErrorMessage","xsrfValue","withCredentials","xsrfCookieName","read","xsrfHeaderName","setRequestHeader","onDownloadProgress","addEventListener","onUploadProgress","upload","abort","send","isAbsoluteURL","combineURLs","requestedURL","ignoreDuplicateOf","split","line","substr","relativeURL","ReactPropTypesSecret","emptyFunction","emptyFunctionWithReset","resetWarningCache","shim","props","propName","componentName","propFullName","secret","err","Error","getShim","isRequired","ReactPropTypes","array","bigint","bool","object","string","symbol","any","arrayOf","element","elementType","instanceOf","node","objectOf","oneOf","oneOfType","shape","exact","checkPropTypes","PropTypes","enhanceError","Symbol","for","d","f","g","k","m","n","p","q","r","t","w","x","y","z","u","$$typeof","A","AsyncMode","ConcurrentMode","ContextConsumer","ContextProvider","Element","Fragment","Lazy","Portal","Profiler","StrictMode","Suspense","isAsyncMode","isConcurrentMode","isContextConsumer","isContextProvider","isElement","isForwardRef","isFragment","isLazy","isPortal","isProfiler","isStrictMode","isSuspense","isValidElementType","typeOf","pkg","thing","deprecatedWarnings","currentVerArr","version","isOlderVersion","thanVersion","pkgVersionArr","destVer","isDeprecated","formatMessage","opt","desc","opts","console","warn","schema","allowUnknown","__CANCEL__","fns","isError","_lodash","_interopRequireDefault","_lodash2","every","isValidKey","write","expires","path","domain","secure","cookie","Date","toGMTString","match","RegExp","decodeURIComponent","remove","now","callback","arr","normalizeHeaderName","DEFAULT_CONTENT_TYPE","setContentTypeIfUnset","process","rawValue","parse","stringifySafely","strictJSONParsing","maxContentLength","maxBodyLength","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","getter","definition","o","get","batch","getBatch","nullListeners","notify","store","parentSub","unsubscribe","listeners","handleChangeWrapper","subscription","onStateChange","trySubscribe","addNestedSub","subscribe","first","last","clear","listener","isSubscribed","prev","createListenerCollection","notifyNestedSubs","Boolean","tryUnsubscribe","getListeners","useLayoutEffect","useEffect","children","contextValue","useMemo","previousState","getState","Context","Provider","_extends","assign","_objectWithoutPropertiesLoose","_excluded","_excluded2","EMPTY_ARRAY","NO_SUBSCRIPTION_ARRAY","storeStateUpdatesReducer","state","updateCount","useIsomorphicLayoutEffectWithArgs","effectFunc","effectArgs","dependencies","captureWrapperProps","lastWrapperProps","lastChildProps","renderIsScheduled","wrapperProps","actualChildProps","childPropsFromStoreUpdate","current","subscribeUpdates","shouldHandleStateChanges","childPropsSelector","forceComponentUpdateDispatch","didUnsubscribe","lastThrownError","checkForUpdates","newChildProps","latestStoreState","initStateUpdates","connectAdvanced","selectorFactory","_ref2","_ref2$getDisplayName","getDisplayName","_ref2$methodName","methodName","_ref2$renderCountProp","renderCountProp","_ref2$shouldHandleSta","_ref2$storeKey","storeKey","_ref2$forwardRef","withRef","forwardRef","_ref2$context","connectOptions","WrappedComponent","wrappedComponentName","selectorFactoryOptions","pure","usePureOnlyMemo","ConnectFunction","_useMemo","reactReduxForwardedRef","propsContext","ContextToUse","Consumer","useContext","didStoreComeFromProps","createChildSelector","_useMemo2","overriddenContextValue","_useReducer","useReducer","previousStateUpdateResult","useRef","renderedWrappedComponent","ref","Connect","forwarded","is","shallowEqual","objA","objB","keysA","keysB","wrapMapToPropsConstant","getConstant","constant","constantSelector","dependsOnOwnProps","getDependsOnOwnProps","mapToProps","wrapMapToPropsFunc","proxy","stateOrDispatch","ownProps","mapDispatchToProps","actionCreators","boundActionCreators","_loop","actionCreator","bindActionCreators","mapStateToProps","defaultMergeProps","stateProps","dispatchProps","mergeProps","mergedProps","areMergedPropsEqual","hasRunOnce","nextMergedProps","wrapMergePropsFunc","impureFinalPropsSelectorFactory","pureFinalPropsSelectorFactory","areStatesEqual","areOwnPropsEqual","areStatePropsEqual","hasRunAtLeastOnce","nextState","nextOwnProps","nextStateProps","statePropsChanged","propsChanged","stateChanged","handleSubsequentCalls","finalPropsSelectorFactory","initMapStateToProps","initMapDispatchToProps","initMergeProps","factories","strictEqual","createConnect","_temp","_ref$connectHOC","connectHOC","_ref$mapStateToPropsF","mapStateToPropsFactories","_ref$mapDispatchToPro","mapDispatchToPropsFactories","_ref$mergePropsFactor","mergePropsFactories","_ref$selectorFactory","_ref3","_ref3$pure","_ref3$areStatesEqual","_ref3$areOwnPropsEqua","_ref3$areStatePropsEq","_ref3$areMergedPropsE","extraOptions","newBatch","_typeof","iterator","toPrimitive","String","toPropertyKey","_objectSpread2","getOwnPropertyDescriptors","defineProperties","formatProdErrorMessage","$$observable","observable","randomString","Math","random","substring","ActionTypes","INIT","REPLACE","PROBE_UNKNOWN_ACTION","bindActionCreator","compose","_len","funcs","_key","reduce","serviceScopeProfile","AUSpinnerComponent","React","super","loading","visible","lazyLoad","componentDidMount","componentDidUpdate","nextProps","prevState","loadingCondition","loaded","domID","onLoad","getElementById","rect","getBoundingClientRect","bottom","right","left","innerWidth","documentElement","clientWidth","top","innerHeight","clientHeight","isElementInViewport","setState","columns","className","TwitterStatusComponent","convertDate","highlight","dangerouslySetInnerHTML","__html","Message","User","Created","Likes","Retweets","ID","da","AUonSoMe","followUs","en","GET_FACEBOOK","GET_TWITTER","API_HOST","seconds","identifier","take","userId","defaultFollowLinks","uri","importer","defer","script","src","body","appendChild","urls","map","AppComponent","Component","primaryLang","date","day","getDate","month","getMonth","hours","getHours","minutes","getMinutes","getFullYear","text","service","p1","p2","p3","social","lang","renderTwitter","Twitter","_followLinks","followLinks","actions","twAccount","twitterSearch","getTwitter","labels","link","elfsightApp","connect","getFacebook","initialState","Facebook","Posts","AccessToken","reducers","reducerKeys","finalReducers","shapeAssertionError","finalReducerKeys","reducer","assertReducerShape","hasChanged","_i","previousStateForKey","nextStateForKey","Data","createStoreWithMiddleware","middlewares","createStore","_dispatch","middlewareAPI","middleware","applyMiddleware","ReduxPromise","preloadedState","enhancer","currentReducer","currentState","currentListeners","nextListeners","isDispatching","ensureCanMutateNextListeners","index","splice","replaceReducer","nextReducer","outerSubscribe","observer","observeState","querySelector","getAttribute"],"sourceRoot":""}