���ѧۧݧ�ӧ�� �ާ֧ߧ֧էا֧� - ���֧էѧܧ�ڧ��ӧѧ�� - /home3/cpr76684/moodledata/filedir/2f/04/2f045c1a2710bc85f6df653e7c5d5bcb6bb59538
���ѧ٧ѧ�
!function(){"use strict";let t=function(){function t(){}return t.extend=function(){for(let t=1;t<arguments.length;t++)for(let e in arguments[t])Object.prototype.hasOwnProperty.call(arguments[t],e)&&("object"==typeof arguments[0][e]&&"object"==typeof arguments[t][e]?this.extend(arguments[0][e],arguments[t][e]):arguments[0][e]=arguments[t][e]);return arguments[0]},t.stripHTML=function(e){let i=document.createElement("div");return i.innerHTML=t.htmlDecode(e),i.textContent||i.innerText||""},t.htmlDecode=function(t){return t&&""!==t?(new DOMParser).parseFromString(t,"text/html").documentElement.textContent:""},t.project=function(t,e,i,s,n){return s+(n-s)*(t-e)/(i-e)},t.constrain=function(t,e,i){return Math.min(i,Math.max(e,t))},t.findClosest=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:".";if(!t)return null;for("."===e.substr(0,1)&&(e=e.substr(1));!t.classList.contains(e)&&(t=t.parentElement););return t},t.isMobileDevice=function(){let t=!1;var e;return e=navigator.userAgent||navigator.vendor||window.opera,(/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i.test(e)||/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw-(n|u)|c55\/|capi|ccwa|cdm-|cell|chtm|cldc|cmd-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc-s|devi|dica|dmob|do(c|p)o|ds(12|-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(-|_)|g1 u|g560|gene|gf-5|g-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd-(m|p|t)|hei-|hi(pt|ta)|hp( i|ip)|hs-c|ht(c(-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i-(20|go|ma)|i230|iac( |-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|-[a-w])|libw|lynx|m1-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|-([1-8]|c))|phil|pire|pl(ay|uc)|pn-2|po(ck|rt|se)|prox|psio|pt-g|qa-a|qc(07|12|21|32|60|-[2-7]|i-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h-|oo|p-)|sdk\/|se(c(-|0|1)|47|mc|nd|ri)|sgh-|shar|sie(-|m)|sk-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h-|v-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl-|tdg-|tel(i|m)|tim-|t-mo|to(pl|sh)|ts(70|m-|m3|m5)|tx-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas-|your|zeto|zte-/i.test(e.substr(0,4)))&&(t=!0),t},t}();var e=t;let i=function(){function t(e,i,s){this.selector=i,this.descriptionsContainer=document.createElement("div"),this.descriptionsContainer.classList.add("h5p-agamotto-descriptions-container"),this.descriptionWrappers=this.buildDescriptionWrappers(e),this.descriptionWrappers.forEach((t=>{this.descriptionsContainer.appendChild(t)})),this.descriptionWrappers[0].classList.remove("h5p-agamotto-hidden"),this.currentDescriptionText=this.descriptionWrappers[0].textContent,this.descriptionsContainer.addEventListener("mouseup",(e=>{-1!==t.TAGS_FOR_PROPAGATION_STOPPING.indexOf(e.target.tagName)&&(e.stopPropagation(),s.xAPIInteracted())}))}var i=t.prototype;return i.getDOM=function(){return this.descriptionsContainer},i.buildDescriptionWrappers=function(t){const e=[];return Array.isArray(t)?(t.forEach((t=>{const i=document.createElement("div");i.classList.add("h5p-agamotto-description-bottom"),i.classList.add("h5p-agamotto-hidden"),i.setAttribute("aria-hidden","true"),t&&(i.innerHTML=t),e.push(i)})),e):e},i.getCurrentDescriptionText=function(){return this.currentDescriptionText},i.setText=function(t,i){this.descriptionWrappers.forEach((t=>{t.classList.add("h5p-agamotto-hidden")}));const s=this.descriptionWrappers[t],n=this.descriptionWrappers[e.constrain(t+1,0,this.descriptionWrappers.length-1)];s.classList.remove("h5p-agamotto-hidden"),n.classList.remove("h5p-agamotto-hidden"),s.style.opacity=i,s!==n&&(n.style.opacity=1-i),this.currentDescriptionText=i>.5?s.textContent:n.textContent},i.resize=function(){let t=0;setTimeout((()=>{this.descriptionWrappers.forEach((e=>{t=Math.max(t,e.offsetHeight)})),this.descriptionsContainer.style.height=`${t}px`}),0)},t}();i.TAGS_FOR_PROPAGATION_STOPPING=["A","EM","STRONG","SUB","SUP","SPAN"];var s=i,n=function(t,e,i){if(i||2===arguments.length)for(var s,n=0,a=e.length;n<a;n++)!s&&n in e||(s||(s=Array.prototype.slice.call(e,0,n)),s[n]=e[n]);return t.concat(s||Array.prototype.slice.call(e))},a=function(t,e,i){this.name=t,this.version=e,this.os=i,this.type="browser"},o=function(t){this.version=t,this.type="node",this.name="node",this.os=process.platform},r=function(t,e,i,s){this.name=t,this.version=e,this.os=i,this.bot=s,this.type="bot-device"},l=function(){this.type="bot",this.bot=!0,this.name="bot",this.version=null,this.os=null},d=function(){this.type="react-native",this.name="react-native",this.version=null,this.os=null},c=/(nuhk|curl|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask\ Jeeves\/Teoma|ia_archiver)/,u=3,h=[["aol",/AOLShield\/([0-9\._]+)/],["edge",/Edge\/([0-9\._]+)/],["edge-ios",/EdgiOS\/([0-9\._]+)/],["yandexbrowser",/YaBrowser\/([0-9\._]+)/],["kakaotalk",/KAKAOTALK\s([0-9\.]+)/],["samsung",/SamsungBrowser\/([0-9\.]+)/],["silk",/\bSilk\/([0-9._-]+)\b/],["miui",/MiuiBrowser\/([0-9\.]+)$/],["beaker",/BeakerBrowser\/([0-9\.]+)/],["edge-chromium",/EdgA?\/([0-9\.]+)/],["chromium-webview",/(?!Chrom.*OPR)wv\).*Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["chrome",/(?!Chrom.*OPR)Chrom(?:e|ium)\/([0-9\.]+)(:?\s|$)/],["phantomjs",/PhantomJS\/([0-9\.]+)(:?\s|$)/],["crios",/CriOS\/([0-9\.]+)(:?\s|$)/],["firefox",/Firefox\/([0-9\.]+)(?:\s|$)/],["fxios",/FxiOS\/([0-9\.]+)/],["opera-mini",/Opera Mini.*Version\/([0-9\.]+)/],["opera",/Opera\/([0-9\.]+)(?:\s|$)/],["opera",/OPR\/([0-9\.]+)(:?\s|$)/],["pie",/^Microsoft Pocket Internet Explorer\/(\d+\.\d+)$/],["pie",/^Mozilla\/\d\.\d+\s\(compatible;\s(?:MSP?IE|MSInternet Explorer) (\d+\.\d+);.*Windows CE.*\)$/],["netfront",/^Mozilla\/\d\.\d+.*NetFront\/(\d.\d)/],["ie",/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/],["ie",/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],["ie",/MSIE\s(7\.0)/],["bb10",/BB10;\sTouch.*Version\/([0-9\.]+)/],["android",/Android\s([0-9\.]+)/],["ios",/Version\/([0-9\._]+).*Mobile.*Safari.*/],["safari",/Version\/([0-9\._]+).*Safari/],["facebook",/FB[AS]V\/([0-9\.]+)/],["instagram",/Instagram\s([0-9\.]+)/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Mobile/],["ios-webview",/AppleWebKit\/([0-9\.]+).*Gecko\)$/],["curl",/^curl\/([0-9\.]+)$/],["searchbot",/alexa|bot|crawl(er|ing)|facebookexternalhit|feedburner|google web preview|nagios|postrank|pingdom|slurp|spider|yahoo!|yandex/]],m=[["iOS",/iP(hone|od|ad)/],["Android OS",/Android/],["BlackBerry OS",/BlackBerry|BB10/],["Windows Mobile",/IEMobile/],["Amazon OS",/Kindle/],["Windows 3.11",/Win16/],["Windows 95",/(Windows 95)|(Win95)|(Windows_95)/],["Windows 98",/(Windows 98)|(Win98)/],["Windows 2000",/(Windows NT 5.0)|(Windows 2000)/],["Windows XP",/(Windows NT 5.1)|(Windows XP)/],["Windows Server 2003",/(Windows NT 5.2)/],["Windows Vista",/(Windows NT 6.0)/],["Windows 7",/(Windows NT 6.1)/],["Windows 8",/(Windows NT 6.2)/],["Windows 8.1",/(Windows NT 6.3)/],["Windows 10",/(Windows NT 10.0)/],["Windows ME",/Windows ME/],["Windows CE",/Windows CE|WinCE|Microsoft Pocket Internet Explorer/],["Open BSD",/OpenBSD/],["Sun OS",/SunOS/],["Chrome OS",/CrOS/],["Linux",/(Linux)|(X11)/],["Mac OS",/(Mac_PowerPC)|(Macintosh)/],["QNX",/QNX/],["BeOS",/BeOS/],["OS/2",/OS\/2/]];function p(t){return t?f(t):"undefined"==typeof document&&"undefined"!=typeof navigator&&"ReactNative"===navigator.product?new d:"undefined"!=typeof navigator?f(navigator.userAgent):"undefined"!=typeof process&&process.version?new o(process.version.slice(1)):null}function g(t){return""!==t&&h.reduce((function(e,i){var s=i[0],n=i[1];if(e)return e;var a=n.exec(t);return!!a&&[s,a]}),!1)}function f(t){var e=g(t);if(!e)return null;var i=e[0],s=e[1];if("searchbot"===i)return new l;var o=s[1]&&s[1].split(".").join("_").split("_").slice(0,3);o?o.length<u&&(o=n(n([],o,!0),function(t){for(var e=[],i=0;i<t;i++)e.push("0");return e}(u-o.length),!0)):o=[];var d=o.join("."),h=function(t){for(var e=0,i=m.length;e<i;e++){var s=m[e],n=s[0];if(s[1].exec(t))return n}return null}(t),p=c.exec(t);return p&&p[1]?new r(i,d,h,p[1]):new a(i,d,h)}let b=function(){function t(i){let s=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"#000000";this.images=i,this.images.map((t=>{t.alt=e.stripHTML(t.alt),t.title=e.stripHTML(t.title),t.description=e.stripHTML(t.description)})),this.ratio=this.images[0].img.naturalWidth/this.images[0].img.naturalHeight;const n=this.images[0].img.naturalWidth,a=this.images[0].img.naturalHeight;for(let i=0;i<this.images.length;i++){let o=n,r=a,l=this.images[i].img.naturalWidth,d=this.images[i].img.naturalHeight;l/d<this.ratio&&d>r&&(d=r,l*=r/this.images[i].img.naturalHeight),l/d>this.ratio&&l>o&&(l=o,d*=o/this.images[i].img.naturalWidth),l/d===this.ratio&&(o=Math.max(o,l),r=Math.max(r,d));const c=e.constrain((o-l)/2,0,o),u=e.constrain((r-d)/2,0,r),h=document.createElement("canvas");h.setAttribute("width",o),h.setAttribute("height",r);const m=h.getContext("2d");m.beginPath(),m.rect(0,0,o,r),m.fillStyle=s,m.fill(),m.drawImage(this.images[i].img,c,u,l,d);const g=new Image,f=h.toDataURL("image/jpeg");if(f.length<=6&&"ios"===(p().name||"").toLowerCase()){const e=this.images[i].img.naturalWidth*this.images[i].img.naturalHeight;e>t.FIVE_MEGAPIXELS||t.THREE_MEGAPIXELS}g.crossOrigin=this.images[i].img.crossOrigin,g.src=f,this.images[i].img=g}this.imageTop=document.createElement("img"),this.imageTop.classList.add("h5p-agamotto-image-top"),this.imageTop.src=i[0].img.src,this.imageTop.setAttribute("draggable","false"),this.imageTop.setAttribute("alt",this.images[0].alt),this.imageTop.setAttribute("title",this.images[0].title),this.imageTop.setAttribute("aria-label",""!==this.images[0].alt?`${i[0].alt}. ${this.images[0].description}`:this.images[0].description),this.imageBottom=document.createElement("img"),this.imageBottom.classList.add("h5p-agamotto-image-bottom"),this.imageBottom.src=this.images[1].img.src,this.imageBottom.setAttribute("draggable","false"),this.imageBottom.setAttribute("aria-hidden",!0),this.container=document.createElement("div"),this.container.classList.add("h5p-agamotto-images-container"),this.container.appendChild(this.imageTop),this.container.appendChild(this.imageBottom)}var i=t.prototype;return i.getDOM=function(){return this.container},i.getCurrentAltTag=function(){return this.imageTop.getAttribute("alt")},i.getAltTitleTags=function(){return this.images.map((t=>t.alt||t.title))},i.setImage=function(t,i){const s=e.constrain(t+Math.round(1-i),0,this.images.length-1);this.imageBottom.src=this.images[e.constrain(t+1,0,this.images.length-1)].img.src,this.imageTop.src=this.images[t].img.src,this.imageTop.setAttribute("alt",this.images[s].alt),this.imageTop.setAttribute("title",this.images[s].title),this.imageTop.setAttribute("aria-label",""!==this.images[s].alt?`${this.images[s].alt}. ${this.images[s].description}`:this.images[s].description),this.imageTop.style.opacity=i},i.resize=function(){setTimeout((()=>{this.container.style.height=this.container.offsetWidth/this.ratio+"px"}),0)},i.getSize=function(){return{width:this.container.offsetWidth,height:this.container.offsetHeight}},i.getRatio=function(){return this.ratio},i.getTopOpacity=function(){return parseFloat(this.imageTop.style.opacity||"")},t.loadImage=function(t,e){return new Promise(((i,s)=>{const n=new Image;if(n.onload=()=>{i(n)},n.onerror=t=>{s(t)},void 0!==H5P.setSource)H5P.setSource(n,t.params.file,e);else{const i=H5P.getPath(t.params.file.path,e);n.crossOrigin=void 0!==H5P.getCrossOrigin?H5P.getCrossOrigin(i):"Anonymous",n.src=i}}))},t}();b.THREE_MEGAPIXELS=2952192,b.FIVE_MEGAPIXELS=4915200;var v=b;function w(t,e){return w=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},w(t,e)}let E=function(t){function i(s){var n;let a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(n=t.call(this)||this).params=e.extend({snap:!0,ticks:!1,labels:!1,startRatio:0},s),n.callbacks=a,n.callbacks.onButtonFullscreenClicked=a.onButtonFullscreenClicked||(()=>{}),n.selector=s.selector,n.parent=s.parent,n.trackWidth=0,n.audioButtonOffset=0,n.thumbPosition=0,n.ratio=s.startRatio,n.ticks=[],n.labels=[],n.sliderdown=!1,n.keydown=!1,n.interactionstarted=!1,n.extraInitResizes=1,n.container=document.createElement("div"),n.container.classList.add("h5p-agamotto-slider-container"),n.params.audio&&(n.muted=!1,n.audioButton=document.createElement("button"),n.audioButton.classList.add("h5p-agamotto-slider-button"),n.audioButton.classList.add("h5p-agamotto-slider-audio-unmuted"),n.audioButton.setAttribute("tabindex",0),n.audioButton.setAttribute("aria-label",n.params.a11y.mute),n.audioButtonOffset=28,n.audioButton.addEventListener("click",(t=>{n.handleClickAudioButton(t)})),n.audioButton.addEventListener("touchstart",(t=>{n.handleClickAudioButton(t)})),n.container.appendChild(n.audioButton)),n.track=document.createElement("div"),n.track.classList.add("h5p-agamotto-slider-track"),n.container.appendChild(n.track),n.thumb=document.createElement("div"),n.thumb.classList.add("h5p-agamotto-slider-thumb"),n.thumb.setAttribute("tabindex",0),n.thumb.setAttribute("role","slider"),n.thumb.setAttribute("aria-label",n.params.a11y.imageSlider),n.container.appendChild(n.thumb),n.fullscreenButton=document.createElement("button"),n.fullscreenButton.classList.add("h5p-agamotto-slider-button"),n.fullscreenButton.classList.add("h5p-agamotto-slider-fullscreen"),n.fullscreenButton.classList.add("h5p-agamotto-slider-fullscreen-enter"),n.fullscreenButton.setAttribute("aria-label",n.params.a11y.buttonFullscreenEnter),n.fullscreenButton.classList.add("h5p-agamotto-button-none"),n.fullscreenButton.setAttribute("tabindex",0),n.fullscreenButton.addEventListener("click",(t=>{n.handleClickFullscreenButton(t)})),n.fullscreenButton.addEventListener("touchstart",(t=>{n.handleClickFullscreenButton(t)})),n.container.appendChild(n.fullscreenButton);let o=0;if(!0===n.params.ticks){const t=t=>{n.setPosition(parseInt(t.target.style.left)-i.TRACK_OFFSET-n.audioButtonOffset,!0)};for(o=0;o<=n.params.size;o++)n.ticks[o]=document.createElement("div"),n.ticks[o].classList.add("h5p-agamotto-tick"),n.ticks[o].addEventListener("click",t),n.container.appendChild(n.ticks[o])}if(!0===n.params.labels)for(o=0;o<=n.params.size;o++)n.labels[o]=document.createElement("div"),n.labels[o].classList.add("h5p-agamotto-tick-label"),n.labels[o].setAttribute("aria-hidden","true"),n.labels[o].innerHTML=n.params.labelTexts[o],n.container.appendChild(n.labels[o]);return document.addEventListener("mousemove",(t=>{n.sliderdown&&n.setPosition(t,!1)})),document.addEventListener("mouseup",(()=>{n.sliderdown&&(n.sliderdown=!1,n.snap())})),n.track.addEventListener("mousedown",(t=>{t=t||window.event,n.sliderdown=!0,n.setPosition(t,!1)})),n.thumb.addEventListener("mousedown",(t=>{t=t||window.event,n.sliderdown=!0,n.setPosition(t,!1)})),n.container.addEventListener("touchstart",(t=>{t.target!==n.fullscreenButton&&t.target!==n.audioButton&&((t=t||window.event).preventDefault(),t.stopPropagation(),n.setPosition(t,!1))})),n.container.addEventListener("touchmove",(t=>{t.target!==n.fullscreenButton&&t.target!==n.audioButton&&((t=t||window.event).preventDefault(),t.stopPropagation(),n.setPosition(t,!1))})),n.container.addEventListener("touchend",(t=>{t.target!==n.fullscreenButton&&t.target!==n.audioButton&&((t=t||window.event).preventDefault(),t.stopPropagation(),n.snap())})),n.thumb.addEventListener("keydown",(t=>{if(!1!==n.keydown)return;switch((t=t||window.event).which||t.keyCode){case 35:n.handleKeyMove(t,n.params.size);break;case 36:n.handleKeyMove(t,0);break;case 37:case 38:n.handleKeyMove(t,n.getCurrentItemId(!0)-1);break;case 39:case 40:n.handleKeyMove(t,n.getCurrentItemId(!0)+1)}})),n.thumb.addEventListener("keyup",(t=>{((t=t||window.event).which||t.keyCode)===n.keydown&&(n.keydown=!1,n.parent.xAPIInteracted(),n.parent.xAPICompleted())})),n}var s,n;n=t,(s=i).prototype=Object.create(n.prototype),s.prototype.constructor=s,w(s,n);var a=i.prototype;return a.isMuted=function(){return this.muted},a.handleClickFullscreenButton=function(t){return t.preventDefault(),this.callbacks.onButtonFullscreenClicked(),!1},a.enableFullscreenButton=function(){this.fullscreenButton.classList.remove("h5p-agamotto-button-none")},a.removeFullscreenButton=function(){this.container.removeChild(this.fullscreenButton),this.resize()},a.setFullScreenButtonTitle=function(t){this.fullscreenButton&&(t?this.fullscreenButton.setAttribute("aria-label",this.params.a11y.buttonFullscreenExit):this.fullscreenButton.setAttribute("aria-label",this.params.a11y.buttonFullscreenEnter))},a.handleClickAudioButton=function(t){return t.preventDefault(),this.toggleAudioButton(),!1},a.toggleAudioButton=function(t){this.audioButton&&("boolean"==typeof t&&(this.muted=!t),this.isMuted()?(this.audioButton.classList.remove("h5p-agamotto-slider-audio-muted"),this.audioButton.classList.add("h5p-agamotto-slider-audio-unmuted"),this.audioButton.setAttribute("aria-label",this.params.a11y.mute),this.trigger("unmuted"),this.muted=!1):(this.muted=!0,this.trigger("muted"),this.audioButton.classList.remove("h5p-agamotto-slider-audio-unmuted"),this.audioButton.classList.add("h5p-agamotto-slider-audio-muted"),this.audioButton.setAttribute("aria-label",this.params.a11y.unmute)))},a.handleKeyMove=function(t,i){t.preventDefault(),this.keydown=t.which||t.keyCode,i=e.constrain(i,0,this.params.size),this.setPosition(e.project(i,0,this.params.size,0,this.getWidth()),!0)},a.handleTouchMove=function(t){(t=t||window.event).preventDefault(),t.stopPropagation(),this.setPosition(t,!1)},a.getCurrentItemId=function(){let t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],i=this.getPosition()/this.getWidth()*this.params.size;return t&&(i=e.constrain(0,Math.round(i),this.params.size)),i},a.getDOM=function(){return this.container},a.disable=function(){this.track.classList.add("h5p-agamotto-disabled"),this.thumb.classList.add("h5p-agamotto-disabled")},a.enable=function(){this.track.classList.remove("h5p-agamotto-disabled"),this.thumb.classList.remove("h5p-agamotto-disabled")},a.setWidth=function(t){this.params.audio&&(this.track.style.left=`${i.TRACK_OFFSET+this.audioButtonOffset}px`);const e=this.fullscreenButton.offsetWidth+4;this.trackWidth=t-this.audioButtonOffset-e,this.track.style.width=t-this.audioButtonOffset-e+"px"},a.getWidth=function(){return this.trackWidth},a.setPosition=function(t,s,n){if(this.thumb.classList.contains("h5p-agamotto-disabled"))return;t="string"==typeof t||"number"==typeof t?parseInt(t):"object"==typeof t?this.getPointerX(t)-this.computeTrackOffset()-this.audioButtonOffset:0,t=e.constrain(t,0,this.getWidth()),!0===s?this.thumb.classList.add("h5p-agamotto-transition"):this.thumb.classList.remove("h5p-agamotto-transition"),n||(this.ratio=t/this.getWidth()),this.thumb.style.left=t+i.THUMB_OFFSET+this.audioButtonOffset+"px";const a=Math.round(t/this.getWidth()*100),o=this.getCurrentItemId()||0;this.thumb.setAttribute("aria-valuetext",this.params.labels?this.labels[o].innerHTML:this.params.altTitleTexts[o]||`${this.params.a11y.image} ${o+1}`),this.trigger("update",{position:t,percentage:a})},a.getPosition=function(){return this.thumb.style.left?parseInt(this.thumb.style.left)-i.THUMB_OFFSET:0},a.isUsed=function(){return this.sliderdown},a.focus=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.thumb.focus(t)},a.snap=function(){if(!0===this.params.snap){const t=Math.round(e.project(this.ratio,0,1,0,this.params.size));this.setPosition(t*this.getWidth()/this.params.size,!0)}this.parent.xAPIInteracted(),this.parent.xAPICompleted()},a.getPointerX=function(t){let e=0;return e=t.touches?t.touches[0].pageX:t.clientX,e},a.resize=function(){if(this.getWidth()===parseInt(this.container.offsetWidth)-2*i.TRACK_OFFSET&&this.extraInitResizes<0)return;this.extraInitResizes--,this.setWidth(parseInt(this.container.offsetWidth)-2*i.TRACK_OFFSET),this.setPosition(this.getWidth()*this.ratio,!1,!0);let t=0;if(!0===this.params.ticks)for(t=0;t<this.ticks.length;t++)this.ticks[t].style.left=i.TRACK_OFFSET+this.audioButtonOffset+t*this.getWidth()/(this.ticks.length-1)+"px";let e=0,s=!1;if(!0===this.params.labels){for(t=0;t<this.labels.length;t++){switch(e=Math.max(e,parseInt(window.getComputedStyle(this.labels[t]).height)),t){case 0:this.labels[t].style.left=i.TRACK_OFFSET/2+this.audioButtonOffset+"px";break;case this.labels.length-1:this.labels[t].style.right=i.TRACK_OFFSET/2+this.fullscreenButton.offsetWidth+4+"px";break;default:var n=Math.ceil(parseInt(window.getComputedStyle(this.labels[t]).width))/2;this.labels[t].style.left=i.TRACK_OFFSET+t*this.getWidth()/(this.labels.length-1)-n+this.audioButtonOffset+"px"}t<this.labels.length-1&&!s&&(s=this.areOverlapping(this.labels[t],this.labels[t+1]))}s?(this.labels.forEach((t=>{t.classList.add("h5p-agamotto-hidden")})),e=0):this.labels.forEach((t=>{t.classList.remove("h5p-agamotto-hidden")}));const a=!0===this.params.ticks||s||0===e?0:-7;this.container.style.height=i.CONTAINER_DEFAULT_HEIGHT+e+a+"px"}},a.computeTrackOffset=function(){const t=e.findClosest(this.container,"h5p-question-content");if(t){const e=window.getComputedStyle(t),s=this.container.offsetLeft===i.TRACK_OFFSET?i.TRACK_OFFSET:i.TRACK_OFFSET+this.container.offsetLeft;return t.getBoundingClientRect().left+parseInt(e.paddingLeft)+s}return this.container.offsetLeft+i.TRACK_OFFSET},a.areOverlapping=function(t,e){const i=t.getBoundingClientRect(),s=e.getBoundingClientRect();return!(i.right<s.left||i.left>s.right||i.bottom<s.top||i.top>s.bottom)},i}(H5P.EventDispatcher);E.CONTAINER_DEFAULT_HEIGHT=36,E.TRACK_OFFSET=16,E.THUMB_OFFSET=8;var y=E;var T=function(){function t(t){this.classNameBase=t,this.container=document.createElement("div"),this.container.classList.add(`${this.classNameBase}-container`),this.spinnerElement=document.createElement("div"),this.spinnerElement.classList.add(t);const e=document.createElement("div");e.classList.add(`${this.classNameBase}-circle-head`),this.spinnerElement.appendChild(e);const i=document.createElement("div");i.classList.add(`${this.classNameBase}-circle-neck-upper`),this.spinnerElement.appendChild(i);const s=document.createElement("div");s.classList.add(`${this.classNameBase}-circle-neck-lower`),this.spinnerElement.appendChild(s);const n=document.createElement("div");n.classList.add(`${this.classNameBase}-circle-body`),this.spinnerElement.appendChild(n),this.container.appendChild(this.spinnerElement)}var e=t.prototype;return e.getDOM=function(){return this.container},e.show=function(){this.container.classList.remove(`${this.classNameBase}-none`)},e.hide=function(){this.container.classList.add(`${this.classNameBase}-none`)},t}();function x(t,e){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},x(t,e)}let A=function(t){function i(n,a,o){var r;return r=t.call(this,"agamotto")||this,n.items?(r.params=n,r.params.items=i.sanitizeItems(r.params.items),r.params=e.extend({items:[],behaviour:{startImage:1,snap:!0,ticks:!1,labels:!1,transparencyReplacementColor:"#000000",imagesDescriptionsRatio:70},a11y:{image:"Image",imageSlider:"Image slider",mute:"Mute",unmute:"Unmute",buttonFullscreenEnter:"Enter fullscreen mode",buttonFullscreenExit:"Exit fullscreen mode"}},r.params),r.extras=o,r.isVisible=!1,r.maxItem=r.params.items.length-1,r.startImage=e.constrain(r.params.behaviour.startImage-1,0,r.maxItem),r.selector=".h5p-agamotto-wrapper",r.previousSizes=[],r.imagesRepeatedZeroHeight=0,r.hasDescription=r.params.items.some((t=>""!==t.description)),r.contentId=a,r.imageContainer=void 0,r.position=0,r.imagesViewed=[],r.completed=!1,r.updateContent=(t,e)=>{e=Math.round(10*e)/10,(!r.slider.isUsed()||e!==r.images.getTopOpacity()||1===e&&r.position!==t)&&(r.currentIndex=t,r.setAudio(t,e),r.images.setImage(t,e),r.hasDescription&&r.descriptions.setText(t,e),r.position=Math.round(t+(1-e)),!1===r.completed&&-1===r.imagesViewed.indexOf(r.position)&&r.imagesViewed.push(r.position))},r.setAudio=(t,e)=>{const i=Math.round(1+t-e);i!==r.currentAudioId&&(r.currentAudioId=i,r.muted||(r.stopAudios(),r.audios[i]&&r.startAudio(r.currentAudioId)))},r.startAudio=t=>{if(!r.isVisible||!0===r.muted)return;if(r.audios.length<=t)return;const e=r.audios[t];if(!e)return;const i=e.player?.getAttribute("type")||"";e.player.canPlayType(i)&&(e.promise||(e.promise=e.player.play(),e.promise.finally((()=>{e.promise=null})).catch((()=>{r.slider.toggleAudioButton(!0)}))))},r.stopAudios=()=>{r.audios.forEach((t=>{t&&(t.promise?t.promise.then((()=>{t.player.pause(),t.player.load(),t.promise=null})):(t.player.pause(),t.player.load()))}))},r.registerDomElements=()=>{r.content=r.createDOM(),r.setContent(r.content),window.requestAnimationFrame((()=>{new IntersectionObserver((t=>{const e=t[0];0===e.intersectionRatio?r.stopAudioTimeout=window.setTimeout((()=>{r.isVisible=!1,r.stopAudios()}),100):1===e.intersectionRatio&&(clearTimeout(r.stopAudioTimeout),r.isVisible=!0,r.startAudio(r.currentIndex))}),{root:document.documentElement,threshold:[0,1]}).observe(r.content)}))},r.createDOM=()=>{const t=document.createElement("div");if(t.classList.add("h5p-agamotto"),!r.params.items||r.maxItem<1){const e=document.createElement("div");return e.classList.add("h5p-agamotto-warning"),e.innerHTML="I really need at least two images :-)",t.appendChild(e),t}r.spinner=new T("h5p-agamotto-spinner"),t.appendChild(r.spinner.getDOM()),r.audios=r.createAudios(r.params.items),r.audios.forEach((e=>{e&&t.append(e.player)}));const i=[];return r.params.items.forEach((t=>{i.push(v.loadImage(t.image,r.contentId))})),Promise.all(i).then((i=>{r.images=i.map(((t,e)=>({img:t,alt:r.params.items[e].image.params.alt,title:r.params.items[e].image.params.title,description:r.params.items[e].description}))),r.spinner.hide(),r.wrapper=document.createElement("div"),r.wrapper.classList.add("h5p-agamotto-wrapper"),t.appendChild(r.wrapper),r.params.title&&(r.title=document.createElement("div"),r.title.classList.add("h5p-agamotto-title"),r.title.innerHTML=`<h2>${r.params.title}</h2>`,r.wrapper.appendChild(r.title)),r.images=new v(r.images,r.params.behaviour.transparencyReplacementColor),r.wrapper.appendChild(r.images.getDOM()),r.images.resize();const n=[];for(let t=0;t<=r.maxItem;t++)n[t]=r.params.items[t].labelText||"";if(r.slider=new y({audio:r.hasAudio(),snap:r.params.behaviour.snap,ticks:r.params.behaviour.ticks,labels:r.params.behaviour.labels,labelTexts:n,altTitleTexts:r.images.getAltTitleTags(),startRatio:r.startImage/r.maxItem,size:r.maxItem,a11y:{image:r.params.a11y.image,imageSlider:r.params.a11y.imageSlider,mute:r.params.a11y.mute,unmute:r.params.a11y.unmute,buttonFullscreenEnter:r.params.a11y.buttonFullscreenEnter,buttonFullscreenExit:r.params.a11y.buttonFullscreenExit},selector:r.selector,parent:r},{onButtonFullscreenClicked:()=>{r.handleFullscreenClicked()}}),r.wrapper.appendChild(r.slider.getDOM()),r.slider.resize(),r.hasDescription){const t=[];for(let e=0;e<=r.maxItem;e++)t[e]=r.params.items[e].description;r.descriptions=new s(t,r.selector,r,r.contentId),r.wrapper.appendChild(r.descriptions.getDOM()),r.descriptions.resize(),r.heightDescriptions=r.descriptions.offsetHeight}else r.heightDescriptions=0;r.imageContainer=r.images.getDOM(),r.imageContainer.addEventListener("click",(()=>{r.slider.focus({preventScroll:!0})})),r.xAPIExperienced(),r.slider.on("update",(t=>{const i=e.project(t.data.position,5,r.slider.getWidth()-5,0,r.maxItem),s=e.constrain(Math.round(i),0,r.maxItem),n=1-e.constrain(i-s,0,1),a=.5*(1-Math.cos(Math.PI*n));r.updateContent(s,a)})),r.slider.on("muted",(()=>{r.muted=!0,r.stopAudios()})),r.slider.on("unmuted",(()=>{r.muted=!1,r.startAudio(r.currentAudioId)})),r.on("resize",(()=>{r.handleResize()})),r.container=document.querySelector(".h5p-container"),r.container&&!r.noFullscreen&&r.isRoot()&&H5P.fullscreenSupported&&(r.slider.enableFullscreenButton(),r.on("enterFullScreen",(()=>{setTimeout((()=>{r.setFixedSize(!0),r.slider.setFullScreenButtonTitle(!0)}),250)})),r.on("exitFullScreen",(()=>{r.setFixedSize(!1),r.slider.setFullScreenButtonTitle(!1)})),window.addEventListener("orientationchange",(()=>{H5P.isFullscreen?setTimeout((()=>{r.setFixedSize(!0)}),250):r.setFixedSize(!1)}),!1)),r.trigger("resize")})).catch((t=>{})),t},r.handleResize=()=>{if(e.isMobileDevice()&&90===Math.abs(window.screen.orientation.angle)){const t=/iPhone/.test(navigator.userAgent)?screen.width:screen.height;r.wrapper.style.width=Math.round(t/2*r.images.getRatio())+"px"}else r.wrapper.style.width="auto";r.images.resize(),r.hasDescription&&r.descriptions.resize(),r.slider.resize(),window.requestAnimationFrame((()=>{r.previousSizes.push(r.images.getSize()),r.previousSizes.length>i.RESIZE_REPETITIONS&&r.previousSizes.shift(),r.isResizeNeeded()&&(clearTimeout(r.extraResize),r.extraResize=setTimeout((()=>{r.trigger("resize")}),i.RESIZE_COOLING_PERIOD))}))},r.isResizeNeeded=()=>{let t=r.previousSizes.length<i.RESIZE_REPETITIONS;if(t||(t=r.previousSizes.some((t=>0===t.height)),t?r.imagesRepeatedZeroHeight++:r.imagesRepeatedZeroHeight=0,r.imagesRepeatedZeroHeight===i.RESIZE_REPETITIONS_ZERO_HEIGHT&&(r.imagesRepeatedZeroHeight=0,t=!1)),!t){const e={};r.previousSizes.map((t=>`${t.width}|${t.height}`)).forEach((t=>{e[t]=!0})),t=Object.keys(e).length===i.RESIZE_REPETITIONS}return t},r.createAudios=t=>{const e=[];return t.forEach((t=>{if(!t.audio||t.audio.length<1||!t.audio[0].path)return void e.push(null);const i=document.createElement("audio");i.style.display="none",i.src=H5P.getPath(t.audio[0].path,r.contentId),t.audio[0].mime&&i.setAttribute("type",t.audio[0].mime),e.push({player:i,promise:null})})),e},r.hasAudio=()=>r.audios.some((t=>null!==t)),r.announceARIA=t=>{t=void 0!==t?e.htmlDecode(`${t} `):"";const i=r.descriptions?r.descriptions.getCurrentDescriptionText():"";let s=`${t}${r.images.getCurrentAltTag()}. ${i}`;s=e.stripHTML(s),r.read(s)},r.xAPIExperienced=()=>{r.triggerXAPI("experienced")},r.xAPIInteracted=()=>{r.triggerXAPI("interacted")},r.xAPICompleted=()=>{r.imagesViewed.length!==r.params.items.length||r.completed||(r.triggerXAPI("completed"),r.completed=!0)},r.getContext=()=>({type:"image",value:r.position+1}),r.getTitle=()=>H5P.createTitle(r.extras.metadata&&r.extras.metadata.title?r.extras.metadata.title:"Agamotto"),r.handleFullscreenClicked=()=>{setTimeout((()=>{r.toggleFullscreen()}),300)},r.toggleFullscreen=t=>{r.container&&("string"==typeof t&&("enter"===t?t=!1:"exit"===t&&(t=!0)),"boolean"!=typeof t&&(t=!H5P.isFullscreen),!0===t?H5P.fullScreen(H5P.jQuery(r.container),r):H5P.exitFullScreen())},r.removeFullscreenButton=()=>{r.slider?r.slider.removeFullscreenButton():r.noFullscreen=!0},r.setFixedSize=t=>{const e=r.images.getDOM(),i=r.slider.getDOM(),s=r.descriptions?r.descriptions.getDOM():null;r.title&&(r.title.style.maxWidth=""),e.style.maxWidth="",e.style.maxHeight="",i.style.maxWidth="",s&&(s.style.maxHeight="",s.style.maxWidth="",s.style.overflowY=""),setTimeout((()=>{if(t){const t=r.title?r.title.offsetHeight:0,n=i.offsetHeight,a=window.innerHeight-2*r.wrapper.offsetTop-t-n;let o=s?a*r.params.behaviour.imagesDescriptionsRatio/100:a;if(e.offsetHeight>o){const t=o*e.offsetWidth/e.offsetHeight+"px";r.title&&(r.title.style.maxWidth=t),e.style.maxWidth=t,i.style.maxWidth=t,s&&(s.style.maxWidth=t)}else o=e.offsetHeight;e.style.maxHeight=`${o}px`,s&&s.offsetHeight>a-o&&(s.style.maxHeight=a-o+"px",s.style.overflowY="auto")}window.requestAnimationFrame((()=>{r.slider.resize(),r.images.resize(),r.trigger("resize")}))}),0)},r):function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(r)}var n,a;return a=t,(n=i).prototype=Object.create(a.prototype),n.prototype.constructor=n,x(n,a),i.sanitizeItems=function(t){return t=t.filter((t=>!!(t.image&&t.image.params&&t.image.params.file))).splice(0,50).map((t=>(t.image.params.alt=t.image.params.alt||"",t.image.params.title=t.image.params.title||"",t)))},i}(H5P.Question);A.DEFAULT_DESCRIPTION="Agamotto",A.RESIZE_COOLING_PERIOD=75,A.RESIZE_REPETITIONS=3,A.RESIZE_REPETITIONS_ZERO_HEIGHT=50;var I=A;H5P.Agamotto=I}();
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | ���֧ߧ֧�ѧ�ڧ� ����ѧߧڧ��: 0 |
proxy
|
phpinfo
|
���ѧ����ۧܧ�