<commit_before>!function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){n(1),n(2)(),n(3)},function(t,e){!function(t,e){"use strict";function n(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,o=this.intersectionRect,r=o.width*o.height;this.intersectionRatio=n?r/n:this.isIntersecting?1:0}function o(t,e){var n=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(n.root&&1!=n.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=i(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(n.rootMargin),this.thresholds=this._initThresholds(n.threshold),this.root=n.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" ")}function r(){return t.performance&&performance.now&&performance.now()}function i(t,e){var n=null;return function(){n||(n=setTimeout(function(){t(),n=null},e))}}function s(t,e,n,o){"function"==typeof t.addEventListener?t.addEventListener(e,n,o||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function c(t,e,n,o){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,o||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function a(t,e){var n=Math.max(t.top,e.top),o=Math.min(t.bottom,e.bottom),r=Math.max(t.left,e.left),i=Math.min(t.right,e.right),s=i-r,c=o-n;return s>=0&&c>=0&&{top:n,bottom:o,left:r,right:i,width:s,height:c}}function u(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function l(t,e){for(var n=e;n;){if(n==t)return!0;n=d(n)}return!1}function d(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e}if("IntersectionObserver"in t&&"IntersectionObserverEntry"in t&&"intersectionRatio"in t.IntersectionObserverEntry.prototype)"isIntersecting"in t.IntersectionObserverEntry.prototype||Object.defineProperty(t.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var h=[];o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections()}},o.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},o.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},o.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},o.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this._checkForIntersections(),this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(s(t,"resize",this._checkForIntersections,!0),s(e,"scroll",this._checkForIntersections,!0),"MutationObserver"in t&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},o.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,c(t,"resize",this._checkForIntersections,!0),c(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},o.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(o){var i=o.element,s=u(i),c=this._rootContainsTarget(i),a=o.entry,l=t&&c&&this._computeTargetAndRootIntersection(i,e),d=o.entry=new n({time:r(),target:i,boundingClientRect:s,rootBounds:e,intersectionRect:l});a?t&&c?this._hasCrossedThreshold(a,d)&&this._queuedEntries.push(d):a&&a.isIntersecting&&this._queuedEntries.push(d):this._queuedEntries.push(d)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},o.prototype._computeTargetAndRootIntersection=function(n,o){if("none"!=t.getComputedStyle(n).display){for(var r=u(n),i=d(n),s=!1;!s;){var c=null,l=1==i.nodeType?t.getComputedStyle(i):{};if("none"==l.display)return;if(i==this.root||i==e?(s=!0,c=o):i!=e.body&&i!=e.documentElement&&"visible"!=l.overflow&&(c=u(i)),c&&!(r=a(c,r)))break;i=d(i)}return r}},o.prototype._getRootRect=function(){var t;if(this.root)t=u(this.root);else{var n=e.documentElement,o=e.body;t={top:0,left:0,right:n.clientWidth||o.clientWidth,width:n.clientWidth||o.clientWidth,bottom:n.clientHeight||o.clientHeight,height:n.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(t)},o.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var r=0;r<this.thresholds.length;r++){var i=this.thresholds[r];if(i==n||i==o||i<n!=i<o)return!0}},o.prototype._rootIsInDom=function(){return!this.root||l(e,this.root)},o.prototype._rootContainsTarget=function(t){return l(this.root||e,t)},o.prototype._registerInstance=function(){h.indexOf(this)<0&&h.push(this)},o.prototype._unregisterInstance=function(){var t=h.indexOf(this);-1!=t&&h.splice(t,1)},t.IntersectionObserver=o,t.IntersectionObserverEntry=n}}(window,document)},function(t,e,n){"use strict";function o(t,e){for(const n of t)!1!==n.isIntersecting&&(e.unobserve(n.target),r().then(()=>{const t=document.querySelector(Z.class.main);e.observe(t.lastElementChild)}).catch(t=>{console.info(t),"disconnect"in IntersectionObserver.prototype?e.disconnect():console.error("IntersectionObserver.disconnect not available.")}))}function r(){const t=document.querySelector(Z.class.main);return 0===documentsData.length?Promise.reject("No documents left to load."):i(10).then(e=>{console.info("Loaded document batch."),e.forEach(e=>s(t,e))})}function i(t){const e=[];for(let n=0;n<t&&documentsData.length>0;n++){const t=documentsData.shift();e.push(c(t[0],t[1]))}return Promise.all(e)}function s(t,e){t.insertAdjacentHTML("beforeend",e);const n=t.lastElementChild;et.viewObserver.observe(n),a(n.querySelector(Z.class.doc)),u(n)}function c(t,e){return new Promise((n,o)=>{let r="";for(var i=0;i<e;i++){const e=`${Z.assetPath}/${t}-${i}.png`;r+=`
        <div class="${Z.class.item.slice(1)}" data-page="${i+1}">
          <img data-src="${e}" alt="page ${i+1}">
        </div>
      `}const s=`${Z.assetPath}/${t}`;n(`
      <div
        class="${Z.class.view.slice(1)}"
        id="${t}"
        data-doc-source="${s}"
        data-page-count="${e+1}">
        <div class="${Z.class.doc.slice(1)}">
          <div class="${Z.class.item.slice(1)} doc-info active" data-page="0">
            <h2 class="doc-title">
              <a href="${s}">${t}</a>
            </h2>
            by <span class="doc-author">author</span>,
            <span class="doc-pages-count">${e}</span> pages,
            2018
          </div>
          ${r}
        </div>
      </div>
    `)})}function a(t){const e=G(t,"margin-left")+G(t,"border-left-width")+J(t)+G(t,"border-right-width")+G(t,"margin-right");t.style.setProperty("width",e+"px")}function u(t){let e,n,o,r;t.addEventListener("touchstart",function(n){Z.moveViewItemsWithTransform&&t.style.setProperty("will-change","transform"),et.touched=!0,r=t.querySelector(Z.class.doc),o=getComputedStyle(r).getPropertyValue("transition"),r.style.setProperty("transition","none"),e=n.targetTouches[0].clientX},!!st&&{passive:!0}),t.addEventListener("touchmove",function(o){if(et.touched){const r=o.targetTouches[0],i=r.clientX-e,s=r.clientY-n;if(Math.abs(i/s)<1)return;f(o);const c=k(t)-i;A(t,c,!0),e=r.clientX,n=r.clientY}},!!st&&{passive:!0}),t.addEventListener("touchend",function(e){if(et.touched){const e=L(t);T(t,Math.round(e)),Z.moveViewItemsWithTransform&&t.style.setProperty("will-change","auto"),et.touched=!1,r.style.setProperty("transition",o)}},!!st&&{passive:!0})}function l(){const t=Q(document.querySelector(Z.class.item));t!==Z.itemWidth&&(console.info("Pre-configured page width does not match actual page width.","Updating configuration."),Z.itemWidth=t)}function d(){const t=Q(document.querySelector(Z.class.item)),e=G(document.querySelector(Z.class.view),"width");return Math.floor(e/t)}function h(t){if(t.keyCode in ot){t.preventDefault();const e=ot[t.keyCode];rt[e].trigger(t)}}function f(t){const e=t.target.closest(Z.class.view),n=t.target.closest(Z.class.item);null!==e&&null!==n&&(q(e),P(e,n))}function m(t){13===t.keyCode&&(H(t.target)||null!==et.activeView&&v(et.activeView,t.ctrlKey))}function v(t,e){const n=t.getAttribute("data-doc-source"),o=M(t).getAttribute("data-page"),r=n+("0"!==o?`#page=${o}`:"");e?window.open(r):window.location.href=r}function g(){const t=Z.modifierKey.replace("Key","");Array.from(document.querySelectorAll(".shortcut__modifier")).forEach(e=>e.innerText=t),document.addEventListener("keydown",y,at),document.addEventListener("keyup",b,at),window.addEventListener("blur",w,at)}function p(){document.removeEventListener("keydown",y,at),document.removeEventListener("keyup",b,at),window.removeEventListener("blur",w,at)}function y(t){nt[t.keyCode]===Z.modifierKey&&et.activeView.querySelector(Z.class.doc).style.setProperty("cursor","ew-resize")}function b(t){nt[t.keyCode]===Z.modifierKey&&et.activeView.querySelector(Z.class.doc).style.setProperty("cursor","auto")}function w(){et.activeView.querySelector(Z.class.doc).style.setProperty("cursor","auto")}function E(t){if(!1!==t[Z.modifierKey]&&0!==t.deltaY){const e=t.target.closest(Z.class.view);null!==e&&(t.preventDefault(),e.querySelector(Z.class.doc).childElementCount<=et.visibleItems||_(Math.sign(t.deltaY)))}}function _(t){const e=et.activeView;null!==e&&T(e,L(e)+t)}function I(t){const e=et.activeView,n=M(e),o=parseInt(n.getAttribute("data-page")),r=$(o+t,0,C(e)-1),i=V(e,r);P(e,i);const s=i.getBoundingClientRect(),c=e.getBoundingClientRect(),a=G(i,"margin-left"),u=G(i,"margin-right"),l=r-o;!1!=(s.left>=c.left&&s.right+a+u<=c.left+c.width)||_(l)}function L(t){return k(t)/Z.itemWidth}function k(t){return Z.moveViewItemsWithTransform?-1*O(t.querySelector(Z.class.doc)):t.scrollLeft}function T(t,e){null!==t&&(t.querySelector(Z.class.doc),A(t,(e=$(e,0,C(t)-et.visibleItems))*Z.itemWidth))}function A(t,e,n=!1){const o=t.querySelector(Z.class.doc);Z.moveViewItemsWithTransform?o.style.setProperty("transform",`translateX(${-e}px)`):t.scrollLeft=e}function O(t){const e=getComputedStyle(t).getPropertyValue("transform");return"none"===e?0:parseFloat(e.split(",")[4])}function R(){const t=et.activeView.previousElementSibling;null!==t&&q(t)}function S(){const t=et.activeView.nextElementSibling;null!==t&&q(t)}function q(t){const e=document.querySelectorAll(`${Z.class.view}.active`);Array.from(e).forEach(t=>t.classList.remove("active")),et.activeView=t,et.activeView.classList.add("active"),document.activeElement.blur()}function C(t){return parseInt(t.getAttribute("data-page-count"))}function M(t){return t.querySelector(`${Z.class.item}.active`)}function P(t,e){M(t).classList.remove("active"),e.classList.add("active"),document.activeElement.blur()}function V(t,e){return t.querySelector(Z.class.doc).children[e]}function x(){Array.from(document.querySelectorAll(".open-modal")).forEach(t=>{t.removeAttribute("disabled"),t.addEventListener("click",K)}),Array.from(document.querySelectorAll(".close-modal")).forEach(t=>{t.addEventListener("click",F)})}function K(t){const e=t.currentTarget.getAttribute("data-target-modal"),n=document.querySelector(`.${e}`);null!==n&&(et.lastFocusedElement=document.activeElement,document.body.setAttribute("aria-hidden","true"),n.setAttribute("aria-hidden","false"),n.classList.remove("closed"),N(n)[0].focus(),n.addEventListener("keydown",D,at),n.addEventListener("keydown",j,ct),n.addEventListener("click",W,at))}function F(t){const e=t.target.closest(".modal");null!==e&&(document.body.setAttribute("aria-hidden","false"),e.setAttribute("aria-hidden","true"),e.classList.add("closed"),e.removeEventListener("keydown",D,at),e.removeEventListener("keydown",j,ct),e.removeEventListener("click",W,at),et.lastFocusedElement.focus())}function W(t){t.target===t.currentTarget&&F(t)}function D(t){27===t.keyCode&&F(t)}function j(t){if(9===t.keyCode){const e=document.activeElement,n=N(t.currentTarget).filter(t=>t.tabIndex>-1);n.length<2?t.preventDefault():t.shiftKey?e===n[0]&&(n[n.length-1].focus(),t.preventDefault()):e===n[n.length-1]&&(n[0].focus(),t.preventDefault())}}function N(t=document){return Array.from(t.querySelectorAll(it))}function H(t){const e=t.tagName.toLowerCase();let n=!1;switch(!0){case["a","area"].includes(e):if(!1===t.hasAttribute("href"))return!1;n=!0;break;case["input","select","textarea","button"].includes(e):if(t.disabled)return!1;n=!0;break;case["iframe","object","embed"].includes(e):n=!0;break;default:"true"===t.getAttribute("contenteditable")&&(n=!0)}return!(!n||null===t.offsetParent)}function B(){Array.from(document.querySelectorAll(".switch")).forEach(t=>{t.addEventListener("click",t=>{const e=t.currentTarget,n="true"===e.getAttribute("aria-checked"),o=tt[e.getAttribute("data-feature")];n?o.disable():o.enable(),e.setAttribute("aria-checked",String(!n))})})}function z(){const t={rootMargin:`500px 0px`};et.viewObserver=new IntersectionObserver(U,t)}function U(t,e){for(const n of t)if(n.isIntersecting){const t=n.target,o=Array.from(t.querySelectorAll("img[data-src]"));o.forEach(t=>{t.hasAttribute("data-src")&&(t.setAttribute("src",t.getAttribute("data-src")),t.removeAttribute("data-src"))}),o[0].addEventListener("load",function(){Y(n.target)}),e.unobserve(n.target)}}function Y(t){Z.preserveAspectRatio&&X(t)}function X(t){const e=t.querySelector(`${Z.class.item} > img`),n=e.naturalWidth/e.naturalHeight;t.style.setProperty("--page-aspect-ratio",n)}function $(t,e,n){return Math.max(e,Math.min(t,n))}function G(t,e){const n=getComputedStyle(t).getPropertyValue(e);return""===n?0:parseFloat(n)}function J(t){let e=0;return Array.from(t.children).forEach(t=>{e+=Q(t)}),e}function Q(t){const e=G(t,"width");return G(t,"margin-left")+e+G(t,"margin-right")}const Z={assetPath:"https://www.uni-weimar.de/medien/webis/tmp/slides/data",itemWidth:300,moveViewItemsWithTransform:!0,preserveAspectRatio:!0,class:{main:".main-content",view:".doc-view",doc:".doc",item:".doc__page"},modifierKey:"shiftKey"},tt={core:{enable:function(){x(),B()},disable:function(){console.error("Can’t disable core feature.")}},wheelNavigation:{enable:function(){g(),document.addEventListener("wheel",E,ct)},disable:function(){p(),document.removeEventListener("wheel",E,ct)}},keyboardNavigation:{enable:function(){document.addEventListener("keydown",h,ct)},disable:function(){document.removeEventListener("keydown",h,ct)}},itemLinking:{enable:function(){document.addEventListener("keydown",m,at)},disable:function(){document.removeEventListener("keydown",m,at)}},activatingOnHover:{enable:function(){document.addEventListener("mousemove",f,at)},disable:function(){document.removeEventListener("mousemove",f,at)}}},et={activeView:null,viewObserver:null,visibleItems:null,lastFocusedElement:null,touched:!1},nt=Object.freeze({16:"shiftKey",17:"ctrlKey",18:"altKey"}),ot=Object.freeze({35:"endKey",36:"homeKey",37:"arrowLeft",38:"arrowUp",39:"arrowRight",40:"arrowDown"}),rt=Object.freeze({homeKey:{direction:-1,trigger:function(){I(this.direction*C(et.activeView))}},endKey:{direction:1,trigger:function(){I(this.direction*C(et.activeView))}},arrowLeft:{direction:-1,trigger:function(t){I(this.direction*(t.ctrlKey?3:1))}},arrowRight:{direction:1,trigger:function(t){I(this.direction*(t.ctrlKey?3:1))}},arrowUp:{trigger:function(){R()}},arrowDown:{trigger:function(){S()}},tabKey:{trigger:function(t){t.shiftKey?R():S()}}});t.exports=function(){z(),document.addEventListener("DOMContentLoaded",function(){const t=new IntersectionObserver(o,{threshold:1});r().then(()=>{q(document.querySelector(Z.class.view)),l(),et.visibleItems=d();const e=document.querySelector(Z.class.main);t.observe(e.lastElementChild)}),Object.values(tt).forEach(t=>t.enable())})};const it=`
  a[href],
  area[href],
  input:not([disabled]),
  select:not([disabled]),
  textarea:not([disabled]),
  button:not([disabled]),
  iframe,
  object,
  embed,<commit_msg>New build: Enhance touchpad wheel scrolling<commit_after>!function(t){function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}var n={};e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:o})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=0)}([function(t,e,n){n(1),n(2)(),n(3)},function(t,e){!function(t,e){"use strict";function n(t){this.time=t.time,this.target=t.target,this.rootBounds=t.rootBounds,this.boundingClientRect=t.boundingClientRect,this.intersectionRect=t.intersectionRect||{top:0,bottom:0,left:0,right:0,width:0,height:0},this.isIntersecting=!!t.intersectionRect;var e=this.boundingClientRect,n=e.width*e.height,o=this.intersectionRect,r=o.width*o.height;this.intersectionRatio=n?r/n:this.isIntersecting?1:0}function o(t,e){var n=e||{};if("function"!=typeof t)throw new Error("callback must be a function");if(n.root&&1!=n.root.nodeType)throw new Error("root must be an Element");this._checkForIntersections=i(this._checkForIntersections.bind(this),this.THROTTLE_TIMEOUT),this._callback=t,this._observationTargets=[],this._queuedEntries=[],this._rootMarginValues=this._parseRootMargin(n.rootMargin),this.thresholds=this._initThresholds(n.threshold),this.root=n.root||null,this.rootMargin=this._rootMarginValues.map(function(t){return t.value+t.unit}).join(" ")}function r(){return t.performance&&performance.now&&performance.now()}function i(t,e){var n=null;return function(){n||(n=setTimeout(function(){t(),n=null},e))}}function s(t,e,n,o){"function"==typeof t.addEventListener?t.addEventListener(e,n,o||!1):"function"==typeof t.attachEvent&&t.attachEvent("on"+e,n)}function c(t,e,n,o){"function"==typeof t.removeEventListener?t.removeEventListener(e,n,o||!1):"function"==typeof t.detatchEvent&&t.detatchEvent("on"+e,n)}function a(t,e){var n=Math.max(t.top,e.top),o=Math.min(t.bottom,e.bottom),r=Math.max(t.left,e.left),i=Math.min(t.right,e.right),s=i-r,c=o-n;return s>=0&&c>=0&&{top:n,bottom:o,left:r,right:i,width:s,height:c}}function u(t){var e;try{e=t.getBoundingClientRect()}catch(t){}return e?(e.width&&e.height||(e={top:e.top,right:e.right,bottom:e.bottom,left:e.left,width:e.right-e.left,height:e.bottom-e.top}),e):{top:0,bottom:0,left:0,right:0,width:0,height:0}}function l(t,e){for(var n=e;n;){if(n==t)return!0;n=d(n)}return!1}function d(t){var e=t.parentNode;return e&&11==e.nodeType&&e.host?e.host:e}if("IntersectionObserver"in t&&"IntersectionObserverEntry"in t&&"intersectionRatio"in t.IntersectionObserverEntry.prototype)"isIntersecting"in t.IntersectionObserverEntry.prototype||Object.defineProperty(t.IntersectionObserverEntry.prototype,"isIntersecting",{get:function(){return this.intersectionRatio>0}});else{var h=[];o.prototype.THROTTLE_TIMEOUT=100,o.prototype.POLL_INTERVAL=null,o.prototype.observe=function(t){if(!this._observationTargets.some(function(e){return e.element==t})){if(!t||1!=t.nodeType)throw new Error("target must be an Element");this._registerInstance(),this._observationTargets.push({element:t,entry:null}),this._monitorIntersections()}},o.prototype.unobserve=function(t){this._observationTargets=this._observationTargets.filter(function(e){return e.element!=t}),this._observationTargets.length||(this._unmonitorIntersections(),this._unregisterInstance())},o.prototype.disconnect=function(){this._observationTargets=[],this._unmonitorIntersections(),this._unregisterInstance()},o.prototype.takeRecords=function(){var t=this._queuedEntries.slice();return this._queuedEntries=[],t},o.prototype._initThresholds=function(t){var e=t||[0];return Array.isArray(e)||(e=[e]),e.sort().filter(function(t,e,n){if("number"!=typeof t||isNaN(t)||t<0||t>1)throw new Error("threshold must be a number between 0 and 1 inclusively");return t!==n[e-1]})},o.prototype._parseRootMargin=function(t){var e=(t||"0px").split(/\s+/).map(function(t){var e=/^(-?\d*\.?\d+)(px|%)$/.exec(t);if(!e)throw new Error("rootMargin must be specified in pixels or percent");return{value:parseFloat(e[1]),unit:e[2]}});return e[1]=e[1]||e[0],e[2]=e[2]||e[0],e[3]=e[3]||e[1],e},o.prototype._monitorIntersections=function(){this._monitoringIntersections||(this._monitoringIntersections=!0,this._checkForIntersections(),this.POLL_INTERVAL?this._monitoringInterval=setInterval(this._checkForIntersections,this.POLL_INTERVAL):(s(t,"resize",this._checkForIntersections,!0),s(e,"scroll",this._checkForIntersections,!0),"MutationObserver"in t&&(this._domObserver=new MutationObserver(this._checkForIntersections),this._domObserver.observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0}))))},o.prototype._unmonitorIntersections=function(){this._monitoringIntersections&&(this._monitoringIntersections=!1,clearInterval(this._monitoringInterval),this._monitoringInterval=null,c(t,"resize",this._checkForIntersections,!0),c(e,"scroll",this._checkForIntersections,!0),this._domObserver&&(this._domObserver.disconnect(),this._domObserver=null))},o.prototype._checkForIntersections=function(){var t=this._rootIsInDom(),e=t?this._getRootRect():{top:0,bottom:0,left:0,right:0,width:0,height:0};this._observationTargets.forEach(function(o){var i=o.element,s=u(i),c=this._rootContainsTarget(i),a=o.entry,l=t&&c&&this._computeTargetAndRootIntersection(i,e),d=o.entry=new n({time:r(),target:i,boundingClientRect:s,rootBounds:e,intersectionRect:l});a?t&&c?this._hasCrossedThreshold(a,d)&&this._queuedEntries.push(d):a&&a.isIntersecting&&this._queuedEntries.push(d):this._queuedEntries.push(d)},this),this._queuedEntries.length&&this._callback(this.takeRecords(),this)},o.prototype._computeTargetAndRootIntersection=function(n,o){if("none"!=t.getComputedStyle(n).display){for(var r=u(n),i=d(n),s=!1;!s;){var c=null,l=1==i.nodeType?t.getComputedStyle(i):{};if("none"==l.display)return;if(i==this.root||i==e?(s=!0,c=o):i!=e.body&&i!=e.documentElement&&"visible"!=l.overflow&&(c=u(i)),c&&!(r=a(c,r)))break;i=d(i)}return r}},o.prototype._getRootRect=function(){var t;if(this.root)t=u(this.root);else{var n=e.documentElement,o=e.body;t={top:0,left:0,right:n.clientWidth||o.clientWidth,width:n.clientWidth||o.clientWidth,bottom:n.clientHeight||o.clientHeight,height:n.clientHeight||o.clientHeight}}return this._expandRectByRootMargin(t)},o.prototype._expandRectByRootMargin=function(t){var e=this._rootMarginValues.map(function(e,n){return"px"==e.unit?e.value:e.value*(n%2?t.width:t.height)/100}),n={top:t.top-e[0],right:t.right+e[1],bottom:t.bottom+e[2],left:t.left-e[3]};return n.width=n.right-n.left,n.height=n.bottom-n.top,n},o.prototype._hasCrossedThreshold=function(t,e){var n=t&&t.isIntersecting?t.intersectionRatio||0:-1,o=e.isIntersecting?e.intersectionRatio||0:-1;if(n!==o)for(var r=0;r<this.thresholds.length;r++){var i=this.thresholds[r];if(i==n||i==o||i<n!=i<o)return!0}},o.prototype._rootIsInDom=function(){return!this.root||l(e,this.root)},o.prototype._rootContainsTarget=function(t){return l(this.root||e,t)},o.prototype._registerInstance=function(){h.indexOf(this)<0&&h.push(this)},o.prototype._unregisterInstance=function(){var t=h.indexOf(this);-1!=t&&h.splice(t,1)},t.IntersectionObserver=o,t.IntersectionObserverEntry=n}}(window,document)},function(t,e,n){"use strict";function o(t,e){for(const n of t)!1!==n.isIntersecting&&(e.unobserve(n.target),r().then(()=>{const t=document.querySelector(Z.class.main);e.observe(t.lastElementChild)}).catch(t=>{console.info(t),"disconnect"in IntersectionObserver.prototype?e.disconnect():console.error("IntersectionObserver.disconnect not available.")}))}function r(){const t=document.querySelector(Z.class.main);return 0===documentsData.length?Promise.reject("No documents left to load."):i(10).then(e=>{console.info("Loaded document batch."),e.forEach(e=>s(t,e))})}function i(t){const e=[];for(let n=0;n<t&&documentsData.length>0;n++){const t=documentsData.shift();e.push(c(t[0],t[1]))}return Promise.all(e)}function s(t,e){t.insertAdjacentHTML("beforeend",e);const n=t.lastElementChild;et.viewObserver.observe(n),a(n.querySelector(Z.class.doc)),u(n)}function c(t,e){return new Promise((n,o)=>{let r="";for(var i=0;i<e;i++){const e=`${Z.assetPath}/${t}-${i}.png`;r+=`
        <div class="${Z.class.item.slice(1)}" data-page="${i+1}">
          <img data-src="${e}" alt="page ${i+1}">
        </div>
      `}const s=`${Z.assetPath}/${t}`;n(`
      <div
        class="${Z.class.view.slice(1)}"
        id="${t}"
        data-doc-source="${s}"
        data-page-count="${e+1}">
        <div class="${Z.class.doc.slice(1)}">
          <div class="${Z.class.item.slice(1)} doc-info active" data-page="0">
            <h2 class="doc-title">
              <a href="${s}">${t}</a>
            </h2>
            by <span class="doc-author">author</span>,
            <span class="doc-pages-count">${e}</span> pages,
            2018
          </div>
          ${r}
        </div>
      </div>
    `)})}function a(t){const e=G(t,"margin-left")+G(t,"border-left-width")+J(t)+G(t,"border-right-width")+G(t,"margin-right");t.style.setProperty("width",e+"px")}function u(t){let e,n,o,r;t.addEventListener("touchstart",function(n){Z.moveViewItemsWithTransform&&t.style.setProperty("will-change","transform"),et.touched=!0,r=t.querySelector(Z.class.doc),o=getComputedStyle(r).getPropertyValue("transition"),r.style.setProperty("transition","none"),e=n.targetTouches[0].clientX},!!st&&{passive:!0}),t.addEventListener("touchmove",function(o){if(et.touched){const r=o.targetTouches[0],i=r.clientX-e,s=r.clientY-n;if(Math.abs(i/s)<1)return;f(o);const c=k(t)-i;A(t,c,!0),e=r.clientX,n=r.clientY}},!!st&&{passive:!0}),t.addEventListener("touchend",function(e){if(et.touched){const e=L(t);T(t,Math.round(e)),Z.moveViewItemsWithTransform&&t.style.setProperty("will-change","auto"),et.touched=!1,r.style.setProperty("transition",o)}},!!st&&{passive:!0})}function l(){const t=Q(document.querySelector(Z.class.item));t!==Z.itemWidth&&(console.info("Pre-configured page width does not match actual page width.","Updating configuration."),Z.itemWidth=t)}function d(){const t=Q(document.querySelector(Z.class.item)),e=G(document.querySelector(Z.class.view),"width");return Math.floor(e/t)}function h(t){if(t.keyCode in ot){t.preventDefault();const e=ot[t.keyCode];rt[e].trigger(t)}}function f(t){const e=t.target.closest(Z.class.view),n=t.target.closest(Z.class.item);null!==e&&null!==n&&(q(e),P(e,n))}function m(t){13===t.keyCode&&(H(t.target)||null!==et.activeView&&v(et.activeView,t.ctrlKey))}function v(t,e){const n=t.getAttribute("data-doc-source"),o=M(t).getAttribute("data-page"),r=n+("0"!==o?`#page=${o}`:"");e?window.open(r):window.location.href=r}function g(){const t=Z.modifierKey.replace("Key","");Array.from(document.querySelectorAll(".shortcut__modifier")).forEach(e=>e.innerText=t),document.addEventListener("keydown",y,at),document.addEventListener("keyup",b,at),window.addEventListener("blur",w,at)}function p(){document.removeEventListener("keydown",y,at),document.removeEventListener("keyup",b,at),window.removeEventListener("blur",w,at)}function y(t){nt[t.keyCode]===Z.modifierKey&&et.activeView.querySelector(Z.class.doc).style.setProperty("cursor","ew-resize")}function b(t){nt[t.keyCode]===Z.modifierKey&&et.activeView.querySelector(Z.class.doc).style.setProperty("cursor","auto")}function w(){et.activeView.querySelector(Z.class.doc).style.setProperty("cursor","auto")}function E(t){const e=Math.abs(t.deltaX/t.deltaY)<1,n=e?t.deltaY:t.deltaX;if(!e||!1!==t[Z.modifierKey]){e||console.log("handle horizontal wheel scrolling properly");const o=t.target.closest(Z.class.view);null!==o&&(t.preventDefault(),o.querySelector(Z.class.doc).childElementCount<=et.visibleItems||_(Math.sign(n)))}}function _(t){const e=et.activeView;null!==e&&T(e,L(e)+t)}function I(t){const e=et.activeView,n=M(e),o=parseInt(n.getAttribute("data-page")),r=$(o+t,0,C(e)-1),i=V(e,r);P(e,i);const s=i.getBoundingClientRect(),c=e.getBoundingClientRect(),a=G(i,"margin-left"),u=G(i,"margin-right"),l=r-o;!1!=(s.left>=c.left&&s.right+a+u<=c.left+c.width)||_(l)}function L(t){return k(t)/Z.itemWidth}function k(t){return Z.moveViewItemsWithTransform?-1*O(t.querySelector(Z.class.doc)):t.scrollLeft}function T(t,e){null!==t&&(t.querySelector(Z.class.doc),A(t,(e=$(e,0,C(t)-et.visibleItems))*Z.itemWidth))}function A(t,e,n=!1){const o=t.querySelector(Z.class.doc);Z.moveViewItemsWithTransform?o.style.setProperty("transform",`translateX(${-e}px)`):t.scrollLeft=e}function O(t){const e=getComputedStyle(t).getPropertyValue("transform");return"none"===e?0:parseFloat(e.split(",")[4])}function R(){const t=et.activeView.previousElementSibling;null!==t&&q(t)}function S(){const t=et.activeView.nextElementSibling;null!==t&&q(t)}function q(t){const e=document.querySelectorAll(`${Z.class.view}.active`);Array.from(e).forEach(t=>t.classList.remove("active")),et.activeView=t,et.activeView.classList.add("active"),document.activeElement.blur()}function C(t){return parseInt(t.getAttribute("data-page-count"))}function M(t){return t.querySelector(`${Z.class.item}.active`)}function P(t,e){M(t).classList.remove("active"),e.classList.add("active"),document.activeElement.blur()}function V(t,e){return t.querySelector(Z.class.doc).children[e]}function x(){Array.from(document.querySelectorAll(".open-modal")).forEach(t=>{t.removeAttribute("disabled"),t.addEventListener("click",K)}),Array.from(document.querySelectorAll(".close-modal")).forEach(t=>{t.addEventListener("click",F)})}function K(t){const e=t.currentTarget.getAttribute("data-target-modal"),n=document.querySelector(`.${e}`);null!==n&&(et.lastFocusedElement=document.activeElement,document.body.setAttribute("aria-hidden","true"),n.setAttribute("aria-hidden","false"),n.classList.remove("closed"),N(n)[0].focus(),n.addEventListener("keydown",D,at),n.addEventListener("keydown",j,ct),n.addEventListener("click",W,at))}function F(t){const e=t.target.closest(".modal");null!==e&&(document.body.setAttribute("aria-hidden","false"),e.setAttribute("aria-hidden","true"),e.classList.add("closed"),e.removeEventListener("keydown",D,at),e.removeEventListener("keydown",j,ct),e.removeEventListener("click",W,at),et.lastFocusedElement.focus())}function W(t){t.target===t.currentTarget&&F(t)}function D(t){27===t.keyCode&&F(t)}function j(t){if(9===t.keyCode){const e=document.activeElement,n=N(t.currentTarget).filter(t=>t.tabIndex>-1);n.length<2?t.preventDefault():t.shiftKey?e===n[0]&&(n[n.length-1].focus(),t.preventDefault()):e===n[n.length-1]&&(n[0].focus(),t.preventDefault())}}function N(t=document){return Array.from(t.querySelectorAll(it))}function H(t){const e=t.tagName.toLowerCase();let n=!1;switch(!0){case["a","area"].includes(e):if(!1===t.hasAttribute("href"))return!1;n=!0;break;case["input","select","textarea","button"].includes(e):if(t.disabled)return!1;n=!0;break;case["iframe","object","embed"].includes(e):n=!0;break;default:"true"===t.getAttribute("contenteditable")&&(n=!0)}return!(!n||null===t.offsetParent)}function B(){Array.from(document.querySelectorAll(".switch")).forEach(t=>{t.addEventListener("click",t=>{const e=t.currentTarget,n="true"===e.getAttribute("aria-checked"),o=tt[e.getAttribute("data-feature")];n?o.disable():o.enable(),e.setAttribute("aria-checked",String(!n))})})}function z(){const t={rootMargin:`500px 0px`};et.viewObserver=new IntersectionObserver(U,t)}function U(t,e){for(const n of t)if(n.isIntersecting){const t=n.target,o=Array.from(t.querySelectorAll("img[data-src]"));o.forEach(t=>{t.hasAttribute("data-src")&&(t.setAttribute("src",t.getAttribute("data-src")),t.removeAttribute("data-src"))}),o[0].addEventListener("load",function(){X(n.target)}),e.unobserve(n.target)}}function X(t){Z.preserveAspectRatio&&Y(t)}function Y(t){const e=t.querySelector(`${Z.class.item} > img`),n=e.naturalWidth/e.naturalHeight;t.style.setProperty("--page-aspect-ratio",n)}function $(t,e,n){return Math.max(e,Math.min(t,n))}function G(t,e){const n=getComputedStyle(t).getPropertyValue(e);return""===n?0:parseFloat(n)}function J(t){let e=0;return Array.from(t.children).forEach(t=>{e+=Q(t)}),e}function Q(t){const e=G(t,"width");return G(t,"margin-left")+e+G(t,"margin-right")}const Z={assetPath:"https://www.uni-weimar.de/medien/webis/tmp/slides/data",itemWidth:300,moveViewItemsWithTransform:!0,preserveAspectRatio:!0,class:{main:".main-content",view:".doc-view",doc:".doc",item:".doc__page"},modifierKey:"shiftKey"},tt={core:{enable:function(){x(),B()},disable:function(){console.error("Can’t disable core feature.")}},wheelNavigation:{enable:function(){g(),document.addEventListener("wheel",E,ct)},disable:function(){p(),document.removeEventListener("wheel",E,ct)}},keyboardNavigation:{enable:function(){document.addEventListener("keydown",h,ct)},disable:function(){document.removeEventListener("keydown",h,ct)}},itemLinking:{enable:function(){document.addEventListener("keydown",m,at)},disable:function(){document.removeEventListener("keydown",m,at)}},activatingOnHover:{enable:function(){document.addEventListener("mousemove",f,at)},disable:function(){document.removeEventListener("mousemove",f,at)}}},et={activeView:null,viewObserver:null,visibleItems:null,lastFocusedElement:null,touched:!1},nt=Object.freeze({16:"shiftKey",17:"ctrlKey",18:"altKey"}),ot=Object.freeze({35:"endKey",36:"homeKey",37:"arrowLeft",38:"arrowUp",39:"arrowRight",40:"arrowDown"}),rt=Object.freeze({homeKey:{direction:-1,trigger:function(){I(this.direction*C(et.activeView))}},endKey:{direction:1,trigger:function(){I(this.direction*C(et.activeView))}},arrowLeft:{direction:-1,trigger:function(t){I(this.direction*(t.ctrlKey?3:1))}},arrowRight:{direction:1,trigger:function(t){I(this.direction*(t.ctrlKey?3:1))}},arrowUp:{trigger:function(){R()}},arrowDown:{trigger:function(){S()}},tabKey:{trigger:function(t){t.shiftKey?R():S()}}});t.exports=function(){z(),document.addEventListener("DOMContentLoaded",function(){const t=new IntersectionObserver(o,{threshold:1});r().then(()=>{q(document.querySelector(Z.class.view)),l(),et.visibleItems=d();const e=document.querySelector(Z.class.main);t.observe(e.lastElementChild)}),Object.values(tt).forEach(t=>t.enable())})};const it=`
  a[href],
  area[href],
  input:not([disabled]),
  select:not([disabled]),
  textarea:not([disabled]),
  button:not([disabled]),
  iframe,
  object,
  embed,
{'fraction_non_alphanumeric': 0.23908058528062895, 'fraction_numerical': 0.01070102642498362, 'mean_word_length': 13.067972350230415, 'pattern_counts': {'":': 0, '<': 60, '<?xml version=': 0, '>': 85, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6145072', 'n_tokens_mistral': 13368, 'n_tokens_neox': 13387, 'n_words': 619}