Sindbad~EG File Manager

Current Path : /var/www/moodledata/mdata-demo/filedir/9d/3d/
Upload File :
Current File : /var/www/moodledata/mdata-demo/filedir/9d/3d/9d3dd479d43fdad5c9d2a9388b55f90daaa1a4d6

!function(){"use strict";var e={697:function(e,t,n){var r,i,s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol?"symbol":typeof e},a=function(){return"object"===("undefined"==typeof window?"undefined":s(window))},c=a()?window:n.g,o=!!a()&&document.attachEvent,d=!1,h=null,l=null,u=null,p=null,b=function(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight},g=(r=c.requestAnimationFrame||c.mozRequestAnimationFrame||c.webkitRequestAnimationFrame||function(e){return setTimeout(e,20)},function(e){return r(e)}),m=(i=c.cancelAnimationFrame||c.mozCancelAnimationFrame||c.webkitCancelAnimationFrame||c.clearTimeout,function(e){return i(e)}),y=function(e){var t=this;b(this),this.__resizeRAF__&&m(this.__resizeRAF__),this.__resizeRAF__=g((function(){(function(e){return e.offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height})(t)&&(t.__resizeLast__.width=t.offsetWidth,t.__resizeLast__.height=t.offsetHeight,t.__resizeListeners__.forEach((function(n){n.call(t,e)})))}))};if(a()&&!o){var v=!1,f="";p="animationstart";var S="Webkit Moz O ms".split(" "),L="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),x="",I=document.createElement("fakeelement");if(void 0!==I.style.animationName&&(v=!0),!1===v)for(var B=0;B<S.length;B++)if(void 0!==I.style[S[B]+"AnimationName"]){(x=S[B])+"Animation",f="-"+x.toLowerCase()+"-",p=L[B],v=!0;break}l="@"+f+"keyframes "+(h="resizeanim")+" { from { opacity: 0; } to { opacity: 0; } } ",u=f+"animation: 1ms "+h+"; "}t.w9=function(e,t){o?e.attachEvent("onresize",t):a()&&(e.__resizeTriggers__||("static"==getComputedStyle(e).position&&(e.style.position="relative"),function(){if(!d){var e=(l||"")+".resize-triggers { "+(u||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),d=!0}}(),e.__resizeLast__={},e.__resizeListeners__=[],(e.__resizeTriggers__=document.createElement("div")).className="resize-triggers",e.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',e.appendChild(e.__resizeTriggers__),b(e),e.addEventListener("scroll",y,!0),p&&e.__resizeTriggers__.addEventListener(p,(function(t){t.animationName==h&&b(e)}))),e.__resizeListeners__.push(t))}}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var s=t[r]={exports:{}};return e[r](s,s.exports,n),s.exports}function r(e,t){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},r(e,t)}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();let i=function(e){var t,n;function i(t){var n;let r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};(n=e.call(this)||this).parent=t,n.screenData=r,n.isShowing=n.screenData.isStartScreen,n.isFeedbackAvailable=!1,n.screenWrapper=document.createElement("div"),n.screenWrapper.classList.add(n.screenData.isStartScreen?"h5p-start-screen":"h5p-end-screen"),n.screenWrapper.classList.add(n.screenData.isCurrentScreen?"h5p-current-screen":"h5p-next-screen"),n.screenData.isCurrentScreen?n.parent.currentHeight="45em":n.screenWrapper.classList.add("h5p-branching-hidden");const i=document.createElement("div");i.classList.add("h5p-branching-scenario-screen-content"),n.feedbackText=document.createElement("div"),n.feedbackText.classList.add("h5p-feedback-content-content"),i.appendChild(n.feedbackText);const s=document.createElement("h1");s.className="h5p-branching-scenario-title-text",s.innerHTML=n.screenData.titleText;const a=document.createElement("div");a.className="h5p-branching-scenario-subtitle-text",a.innerHTML=n.screenData.subtitleText;const c=document.createElement("button");c.classList.add(n.screenData.isStartScreen?"h5p-start-button":"h5p-end-button"),c.classList.add("transition"),c.addEventListener("click",(()=>{n.screenData.isStartScreen?n.parent.trigger("started"):n.parent.trigger("restarted");let e=document.getElementsByClassName("h5p-start-screen")[0];n.screenData.isStartScreen||(e.style.height=""),n.parent.navigating=!0})),n.navButton=c;const o=document.createTextNode(n.screenData.buttonText);if(c.appendChild(o),n.feedbackText.appendChild(s),n.feedbackText.appendChild(a),i.appendChild(c),n.screenData.showScore&&void 0!==n.screenData.score&&(n.scoreWrapper=n.createResultContainer(n.screenData.scoreText,n.screenData.score,n.screenData.maxScore),i.insertBefore(n.scoreWrapper,i.firstChild)),H5P.fullscreenSupported){const e=document.createElement("button");e.className="h5p-branching-full-screen",e.setAttribute("aria-label",n.parent.params.l10n.fullscreenAria),e.addEventListener("click",(()=>{n.trigger("toggleFullScreen")})),n.screenWrapper.appendChild(e)}return n.screenWrapper.appendChild(n.createScreenBackground(n.screenData.isStartScreen,n.screenData.image,n.screenData.altText)),n.screenWrapper.appendChild(i),(n.screenData.showScore&&void 0!==n.screenData.score||""!==n.screenData.titleText||""!==n.screenData.subtitleText)&&(n.feedbackText.tabIndex=-1,n.isFeedbackAvailable=!0),n}n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,r(t,n);var s=i.prototype;return s.getScore=function(){return this.screenData.score},s.getMaxScore=function(){return this.screenData.maxScore},s.getRecreationData=function(){return{endScreenTitle:this.screenData.titleText,endScreenSubtitle:this.screenData.subtitleText,endScreenImage:this.screenData.image,endScreenScore:this.screenData.score}},s.checkIntroReset=function(){let e=document.getElementsByClassName("h5p-start-screen")[0];["h5p-end-screen","h5p-current-screen"].every((e=>this.screenWrapper.classList.contains(e)))?e.classList.add("h5p-reset-start"):e.classList.contains("h5p-reset-start")&&e.classList.remove("h5p-reset-start")},s.getElement=function(){return this.screenWrapper},s.setScore=function(e){this.scoreValue&&"number"==typeof e&&(this.scoreValue.textContent=e.toString())},s.setMaxScore=function(e){this.maxScoreValue&&"number"==typeof e&&(this.maxScoreValue.textContent=e.toString())},s.createResultContainer=function(e,t,n){const r=document.createElement("div");r.classList.add("h5p-result-wrapper");const i=document.createElement("div");i.classList.add("h5p-result-container");const s=document.createElement("div");s.classList.add("h5p-score-text"),s.appendChild(document.createTextNode(e));const a=document.createElement("div");a.classList.add("h5p-score-circle");const c=document.createElement("span");c.className="h5p-score-value",this.scoreValue=document.createTextNode(t.toString()),c.appendChild(this.scoreValue),a.appendChild(c);const o=document.createElement("span");o.className="h5p-score-delimiter",o.textContent="/",a.appendChild(o);const d=document.createElement("span");return d.className="h5p-max-score",this.maxScoreValue=document.createTextNode(n.toString()),d.appendChild(this.maxScoreValue),a.appendChild(d),i.appendChild(s),i.appendChild(a),r.appendChild(i),r},s.createScreenBackground=function(e,t,n){const r=document.createElement("div");r.classList.add("h5p-screen-background");const i=document.createElement("div");i.classList.add("h5p-screen-banner");const s=document.createElement("img");return s.classList.add("h5p-background-image"),s.src=t?.path?H5P.getPath(t.path,this.parent.contentId):e?this.parent.getLibraryFilePath("dist/assets/start-screen-default.jpg"):this.parent.getLibraryFilePath("dist/assets/end-screen-default.jpg"),n?.length&&s.setAttribute("aria-label",n),s.addEventListener("load",(()=>{this.parent.trigger("resize")})),r.appendChild(i),r.appendChild(s),r},s.show=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.isShowing=!0,e.slideBack=e.slideBack&&!e.skipAnimation,e.slideBack&&(this.screenWrapper.classList.remove("h5p-next-screen"),this.screenWrapper.classList.add("h5p-previous"));const t=()=>{e.slideBack&&this.screenWrapper.classList.remove("h5p-previous"),this.screenWrapper.classList.remove("h5p-next-screen"),this.screenWrapper.classList.remove("h5p-slide-in"),this.screenWrapper.classList.add("h5p-current-screen"),this.screenWrapper.setAttribute("aria-hidden",!1),this.parent.trigger("resize"),e.skipFocus||(this.isFeedbackAvailable?this.feedbackText.focus():this.navButton.focus()),this.checkIntroReset()};this.parent.libraryScreen.contentOverlays?.forEach((e=>{e.hide()})),this.parent.libraryScreen.branchingQuestions?.forEach((e=>{e.remove()})),this.parent.libraryScreen.overlay?.remove(),e.skipAnimation?(this.screenWrapper.classList.remove("h5p-branching-hidden"),t()):(this.screenWrapper.classList.add("h5p-slide-in"),this.screenWrapper.classList.remove("h5p-branching-hidden"),this.screenWrapper.addEventListener("animationend",(e=>{"slide-in"===e.animationName&&t()})))},s.hide=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.isShowing=!1;const t=()=>{this.screenWrapper.classList.add("h5p-branching-hidden"),this.screenWrapper.classList.remove("h5p-current-screen"),this.screenWrapper.classList.add("h5p-next-screen"),this.screenWrapper.classList.remove("h5p-slide-out")};e.skipAnimation?t():(this.screenWrapper.classList.add("h5p-slide-out"),this.screenWrapper.addEventListener("animationend",(e=>{"slide-out"===e.animationName&&t()})))},i}(H5P.EventDispatcher),s=function(){function e(e){this.hidden=!0,this.parent=e,this.overlay=document.createElement("div"),this.overlay.classList.add("h5p-content-overlay"),this.overlay.classList.add("h5p-hidden"),this.buttonsContainer=document.createElement("div"),this.buttonsContainer.classList.add("h5p-content-overlay-buttons-container"),this.overlay.appendChild(this.buttonsContainer),this.buttons={}}var t=e.prototype;return t.getDOM=function(){return this.overlay},t.show=function(){this.overlay.classList.remove("h5p-hidden"),window.requestAnimationFrame((()=>{this.buttonsContainer.classList.remove("h5p-hidden"),this.hidden=!1,Object.values(this.buttons)[Object.keys(this.buttons).length-1].focus()}))},t.hide=function(){this.hidden=!0,this.overlay.classList.add("h5p-hidden"),this.buttonsContainer.classList.add("h5p-hidden")},t.isVisible=function(){return!this.hidden},t.addButton=function(e,t,n){if(!e&&0!==e||!t||"function"!=typeof n||this.buttons[e])return null;const r=document.createElement("button");return r.classList.add("transition"),r.classList.add("h5p-nav-button"),r.classList.add(`h5p-nav-button-${e}`),r.innerText=t,r.addEventListener("click",(()=>{n(e)})),this.buttons[e]=r,this.buttonsContainer.appendChild(r),r},t.removeButton=function(e){(e||0===e)&&this.buttons[e]&&(this.buttonsContainer.removeChild(this.buttons[e]),delete this.buttons[e])},e}();var a=n(697);function c(e,t){return c=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},c(e,t)}let o=function(e){var t,n;function r(t,n,r,i){var s;let a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:0;(s=e.call(this)||this).parent=t,s.previousState=i??{},s.lastNodeId=a,s.currentLibraryElement,s.currentLibraryInstance,s.currentLibraryId=0,s.nextLibraryId=r.nextContentId,s.libraryFeedback=r.feedback,s.nextLibraries={},s.libraryInstances={},s.libraryFinishingRequirements=[],s.libraryTitle,s.branchingQuestions=[],s.navButton,s.header,s.isShowing=!1,s.contentOverlays=[];const c=r.type&&r.type.metadata&&r.type.metadata.title?r.type.metadata.title:"";s.wrapper=s.createWrapper(n,c||"Untitled Content",r.showContentTitle&&c),s.wrapper.classList.add("h5p-next-screen"),s.wrapper.classList.add("h5p-branching-hidden");const o=s.createLibraryElement(r,!1);return s.currentLibraryWrapper=o,s.currentLibraryElement=o.getElementsByClassName("h5p-branching-scenario-content")[0],s.currentLibraryInstance=s.libraryInstances[0],s.createNextLibraries(r),s.wrapper.appendChild(o),s.createNavButtons(),s.parent.on("enterFullScreen",(()=>{setTimeout((()=>{s.currentLibraryInstance&&s.currentLibraryInstance.trigger("resize")}),500)})),s}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,c(t,n);var i=r.prototype;return i.handleLibraryResize=function(){if(this.parent.isFullScreen())return this.currentLibraryWrapper.style.height="",void(this.wrapper.style.minHeight="");this.currentLibraryWrapper.style.height=`${this.currentLibraryElement.clientHeight+40}px`,this.wrapper.style.minHeight=`${this.currentLibraryElement.clientHeight+40+70.17}px`,this.currentLibraryWrapper.offsetHeight<this.currentLibraryElement.scrollHeight&&(this.currentLibraryElement.tabIndex=0)},i.createWrapper=function(e,t,n){const r=document.createElement("div"),i=document.createElement("div");if(i.classList.add("h5p-title-wrapper"),H5P.fullscreenSupported){const e=document.createElement("button");e.className="h5p-branching-full-screen",e.setAttribute("aria-label",this.parent.params.l10n.fullscreenAria),e.addEventListener("click",(()=>{this.trigger("toggleFullScreen")})),i.appendChild(e)}const s=document.createElement("div");s.className="h5p-branching-header";const c=document.createElement("h1");c.innerHTML=e,s.appendChild(c);const o=document.createElement("h2");o.classList.add("library-subtitle"),o.innerHTML=n?t:"&nbsp;",o.setAttribute("tabindex","-1"),o.setAttribute("aria-label",t),s.appendChild(o),i.appendChild(s),this.libraryTitle=o;const d=document.createElement("div");d.classList.add("h5p-screen-header"),this.header=d,d.appendChild(i),r.appendChild(d);return(0,a.w9)(r,(()=>{this.wrapper.clientHeight>500&&(this.wrapper.style.minHeight=`${this.wrapper.clientHeight}px`)})),r.addEventListener("animationend",(e=>{"slide-in"===e.animationName&&this.currentLibraryElement&&(this.parent.trigger("resize"),window.setTimeout((()=>{(0,a.w9)(this.currentLibraryElement,(()=>{this.handleLibraryResize(),this.parent.bubblingUpwards=!0,this.parent.trigger("resize"),this.parent.bubblingUpwards=!1}))}),100))})),r},i.createBackButton=function(e){const t=document.createElement("button");return t.classList.add("transition"),t.classList.add("h5p-back-button"),t.addEventListener("click",(e=>{if(e.currentTarget.hasAttribute("isBQ"))return this.overlay&&(null!==this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay),this.overlay=void 0,this.branchingQuestions.forEach((e=>{null!==e.parentNode&&e.parentNode.removeChild(e)})),this.showBackgroundToReadspeaker()),"H5P.BranchingQuestion"===this.parent.params.content[0].type.library.split(" ")[0]&&0===this.parent.currentId?(this.parent.trigger("restarted",{keepStates:!0}),t):void this.parent.trigger("navigated",{reverse:!0});if(!0!==this.parent.navigating){if(0===this.currentLibraryId&&"H5P.BranchingQuestion"!==this.parent.params.content[this.parent.currentId].type.library.split(" ")[0])return this.parent.isReverseTransition=!0,this.parent.trigger("restarted",{keepStates:!0}),t;this.parent.trigger("navigated",{reverse:!0}),this.parent.navigating=!0}})),t.appendChild(document.createTextNode(e)),t},i.handleProceed=function(){let e=!0;if(!1===this.parent.navigating){const t=this.libraryFeedback.title&&this.libraryFeedback.title.trim(),n=this.libraryFeedback.subtitle&&this.libraryFeedback.subtitle.trim(),r=!!(t||n||this.libraryFeedback.image);if(r&&-1!==this.nextLibraryId){void 0===this.overlay&&(this.overlay=document.createElement("div"),this.overlay.className="h5p-branching-scenario-overlay",this.wrapper.appendChild(this.overlay),this.hideBackgroundFromReadspeaker());const e=document.createElement("div");e.classList.add("h5p-branching-question-wrapper"),e.classList.add("h5p-branching-scenario-feedback-dialog");const t=document.createElement("div");t.classList.add("h5p-branching-question-container"),e.appendChild(t);const n=this.createFeedbackScreen(this.libraryFeedback,this.nextLibraryId);t.appendChild(n),t.classList.add("h5p-start-outside"),t.classList.add("h5p-fly-in"),this.currentLibraryWrapper.style.zIndex=0,setTimeout((()=>{this.wrapper.appendChild(e),parseInt(this.currentLibraryWrapper.style.height)<t.offsetHeight&&(this.currentLibraryElement.style.height=t.offsetHeight+"px",this.wrapper.style.height=t.offsetHeight+"px",this.parent.trigger("resize"))}),100),n.focus(),this.parent.navigating=!0}else{const t={nextContentId:this.nextLibraryId};(r||void 0!==this.libraryFeedback.endScreenScore)&&(t.feedback=this.libraryFeedback),e=!1,new Promise((e=>{e(this.parent.trigger("navigated",t))})).then((()=>{this.parent.proceedButtonInProgress=!1,this.parent.navigating=!0}))}}if(e)return e},i.createFeedbackScreen=function(e,t){const n="h5p-branching-feedback-title-"+r.idCounter++,i=document.createElement("div");if(i.classList.add("h5p-branching-question"),i.classList.add(void 0!==e.image?"h5p-feedback-has-image":"h5p-feedback-default"),i.setAttribute("role","dialog"),i.setAttribute("tabindex","-1"),i.setAttribute("aria-labelledby",n),void 0!==e.image&&void 0!==e.image.path){const t=document.createElement("div");t.classList.add("h5p-branching-question"),t.classList.add("h5p-feedback-image");const n=document.createElement("img");n.src=H5P.getPath(e.image.path,this.parent.contentId),t.appendChild(n),i.appendChild(t)}const s=document.createElement("div");s.classList.add("h5p-branching-question"),s.classList.add("h5p-feedback-content");const a=document.createElement("div");a.classList.add("h5p-feedback-content-content"),s.appendChild(a);const c=document.createElement("h1");if(c.id=n,c.innerHTML=e.title||"",a.appendChild(c),e.subtitle){const t=document.createElement("div");t.innerHTML=e.subtitle||"",a.appendChild(t)}const o=document.createElement("button");o.addEventListener("click",(()=>{this.parent.trigger("navigated",{nextContentId:t})}));const d=this.parent.getLibrary(this.currentLibraryId).proceedButtonText,h=document.createTextNode(d);return o.appendChild(h),s.appendChild(o),i.appendChild(s),i},i.createLibraryElement=function(e,t){const n=document.createElement("div");n.classList.add("h5p-library-wrapper");const r=document.createElement("div");r.classList.add("h5p-branching-scenario-content"),this.appendRunnable(r,e.type,e.contentId);const i=e.type?.library.split(" ")[0];return this.contentOverlays[e.contentId]=new s(this),n.appendChild(this.contentOverlays[e.contentId].getDOM()),"H5P.InteractiveVideo"!==i&&"H5P.Video"!==i||(this.contentOverlays[e.contentId].addButton("replay",this.parent.params.l10n.replayButtonText,(()=>{this.handleReplayVideo(i,e)})),this.contentOverlays[e.contentId].addButton("proceed",e.proceedButtonText,(()=>{this.handleProceedAfterVideo()}))),n.appendChild(r),t&&(n.classList.add("h5p-next"),r.classList.add("h5p-branching-hidden")),"H5P.BranchingQuestion"===i&&r.classList.add("h5p-branching-hidden"),n},i.handleReplayVideo=function(e,t){this.contentOverlays[this.currentLibraryId].hide(),!0===this.libraryFinishingRequirements[t.contentId]&&this.hasValidVideo(t)&&this.parent.disableNavButton(),this.currentLibraryInstance.currentState=3,this.currentLibraryInstance.seek(0),this.currentLibraryInstance.play(),"H5P.InteractiveVideo"===e&&this.resetIVProgress()},i.resetIVProgress=function(){this.currentLibraryInstance.interactions.forEach((e=>{e.resetTask()}));let e=this.currentLibraryInstance;e.addSliderInteractions(),e.endscreen&&(e.endscreen.update(),e.endscreen.$closeButton[0].click(),this.wrapper.getElementsByClassName("h5p-star-foreground")[0].classList.remove("h5p-star-active"))},i.handleProceedAfterVideo=function(){this.contentOverlays[this.currentLibraryId].hide(),this.handleProceed()},i.appendRunnable=function(e,t,n){const r=t.library.split(" ")[0];if("H5P.Video"===r)t.params.visuals.fit=!1;else if("H5P.BranchingQuestion"===r){const e=this.parent.getLibrary(n).proceedButtonText;t.params.proceedButtonText=e}const i=window.structuredClone?structuredClone(t):H5P.jQuery.extend(!0,{},t),s={parent:this.parent},a="number"==typeof this.lastNodeId&&this.lastNodeId===n;this.previousState&&a&&(s.previousState=this.previousState);const c=H5P.newRunnable(i,this.parent.contentId,H5P.jQuery(e),!0,s);if(("enabled"===this.parent.params.content[n].forceContentFinished||"useBehavioural"===this.parent.params.content[n].forceContentFinished&&!0===this.parent.params.behaviour.forceContentFinished)&&(this.libraryFinishingRequirements[n]=this.forceContentFinished(c,r),this.addFinishedListeners(c,r)),c.setActivityStarted(),"H5P.Video"===r&&this.nextIsBranching(n)?c.on("stateChange",(e=>{e.data===H5P.Video.ENDED&&this.navButton&&this.handleProceed()})):"H5P.Image"===r&&c.on("loaded",(()=>{this.handleLibraryResize(),this.parent.trigger("resize")})),"H5P.Video"===r||"H5P.InteractiveVideo"===r){const e="H5P.Video"===r?c:c.video;e.on("loaded",(()=>{this.handleLibraryResize()})),e.on("error",(()=>{this.parent.enableNavButton()}))}c.on("navigated",(e=>{this.parent.trigger("navigated",e.data)})),this.libraryInstances[n]=c,this.bubbleUp(c,"resize",this.parent),this.disableFullscreen(c)},i.getCurrentState=function(){return this.currentLibraryInstance?.getCurrentState?.()},i.stopPlayback=function(e){const t=this.libraryInstances[e];if(t)try{"function"==typeof t.pause?t.pause():"function"==typeof t.video?.pause?t.video.pause():"function"==typeof t.stop?t.stop():"function"==typeof t.pauseMedia&&t.elementInstances[t.currentSlideIndex]&&t.elementInstances[t.currentSlideIndex].forEach((e=>{t.pauseMedia(e)}))}catch(e){H5P.error(e)}},i.forceContentFinished=function(e,t){let n=!1;return e&&(n=n||"function"==typeof e?.getScore),t&&(n=n||"H5P.Audio"===t||"H5P.Video"===t),("H5P.CoursePresentation"===t&&e?.children.length+(e.isTask?1:0)===1||!0===e?.activeSurface)&&(n=!1),n},i.addFinishedListeners=function(e,t){if("string"==typeof t&&e)switch(t){case"H5P.CoursePresentation":e.on("xAPI",(t=>{if("progressed"===t.data.statement.verb.display["en-US"]){parseInt(t.data.statement.object.definition.extensions["http://id.tincanapi.com/extension/ending-point"])===e.children.length+(e.isTask?1:0)&&this.navButton.classList.contains("h5p-disabled")&&this.parent.enableNavButton(!0)}}));break;case"H5P.InteractiveVideo":e.on("xAPI",(e=>{"completed"===e.data.statement.verb.display["en-US"]&&this.handleVideoOver()})),e.video.on("stateChange",(t=>{if(t.data===H5P.Video.ENDED||t.data===H5P.Video.PLAYING&&!1===this.contentOverlays[this.currentLibraryId].hidden){const t=e.interactions.filter((e=>void 0!==e.getProgress()));e.hasStar&&t.length>0?this.parent.enableNavButton():this.handleVideoOver(),this.pause()}}));break;case"H5P.Video":e.on("stateChange",(e=>{e.data===H5P.Video.ENDED&&(this.nextIsBranching(this.currentLibraryId)||this.handleVideoOver())}));break;case"H5P.Audio":e.audio.on("ended",(()=>{this.parent.enableNavButton()}));break;default:"function"==typeof e.getAnswerGiven&&e.on("xAPI",(e=>{"answered"!==e.data.statement.verb.display["en-US"]&&"completed"!==e.data.statement.verb.display["en-US"]||this.parent.enableNavButton()}))}},i.handleVideoOver=function(){this.nextIsBranching(this.currentLibraryId)?this.handleProceed():this.showContentOverlay(),this.parent.enableNavButton()},i.showContentOverlay=function(){this.contentOverlays[this.currentLibraryId].show()},i.hideContentOverlay=function(){this.contentOverlays[this.currentLibraryId].hide()},i.getXAPIData=function(e){if(this.libraryInstances[e]&&this.libraryInstances[e].getXAPIData)return this.libraryInstances[e].getXAPIData()},i.nextIsBranching=function(e){const t=void 0!==e?this.parent.params.content[e].nextContentId:void 0;return void 0!==t&&t>0&&r.isBranching(this.parent.params.content[t])},i.createNextLibraries=function(e){this.removeNextLibraries(),this.nextLibraries={},this.loadLibrary(e)},i.createNextLibrary=function(e){this.removeNextLibraries(),this.nextLibraries={},this.loadLibrary(e,e.contentId)},i.loadLibrary=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;const n=null!==t?t:e.nextContentId;if("H5P.BranchingQuestion"!==e.type.library.split(" ")[0]){const e=this.parent.getLibrary(n);if(!1===e)return;"H5P.BranchingQuestion"!==e?.type.library.split(" ")[0]&&(this.nextLibraries[n]=this.createLibraryElement(e,!0),this.wrapper.appendChild(this.nextLibraries[n]))}else{(e.type.params.branchingQuestion.alternatives||[]).map((e=>e.nextContentId)).forEach((e=>{const t=this.parent.getLibrary(e);!1!==t&&"H5P.BranchingQuestion"!==t?.type.library.split(" ")[0]&&(this.nextLibraries[e]=this.createLibraryElement(t,!0),this.wrapper.appendChild(this.nextLibraries[e]))}))}},i.removeNextLibraries=function(){[...this.wrapper.getElementsByClassName("h5p-next")].forEach((e=>{e.parentNode.removeChild(e)}))},i.disableFullscreen=function(e){switch(e.libraryInfo.machineName){case"H5P.CoursePresentation":e.$fullScreenButton&&e.$fullScreenButton.remove();break;case"H5P.InteractiveVideo":e.on("controls",(()=>{e.controls.$fullscreen&&e.controls.$fullscreen.remove()}))}},i.bubbleUp=function(e,t,n){e.on(t,(e=>{n.bubblingUpwards=!0,n.trigger(t,e),n.bubblingUpwards=!1}))},i.hasValidVideo=function(e){const t=e.type,n=t.metadata.contentType;let r="Interactive Video"===n?t.params.interactiveVideo.video.files:t.params.sources;return!(!t||"Interactive Video"!==n&&"Video"!==n||!r||!r[0].mime||"video/unknown"===r[0].mime||!("video/webm"!==r[0].mime&&"video/mp4"!==r[0].mime||H5P.VideoHtml5.canPlay(r)))},i.show=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const t=this.parent.params.content[this.currentLibraryId];!0!==this.libraryFinishingRequirements[this.currentLibraryId]||!this.hasValidVideo(t)&&"H5P.CoursePresentation"!==t.type.library.split(" ")[0]||(this.contentOverlays[this.currentLibraryId].hide(),this.parent.disableNavButton()),this.isShowing=!0,this.wrapper.classList.remove("h5p-branching-hidden");const n=()=>{this.wrapper.classList.remove("h5p-next-screen"),this.wrapper.classList.remove("h5p-slide-in"),this.wrapper.classList.add("h5p-current-screen"),this.parent.navigating=!1,this.wrapper.style.minHeight=this.parent.currentHeight,e.skipFocus||this.libraryTitle.focus()};e.skipAnimation?n():(this.wrapper.classList.add("h5p-slide-in"),this.wrapper.addEventListener("animationend",(e=>{"h5p-next-screen h5p-slide-in"===e.target.className&&n()})))},i.hide=function(e){this.isShowing=!1;for(let e=0;e<this.nextLibraries.length;e++)this.nextLibraries[e].style.display="none",null!==this.nextLibraries[e].parentNode&&this.nextLibraries[e].parentNode.removeChild(this.nextLibraries[e]);this.overlay&&(null!==this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay),this.overlay=void 0,this.branchingQuestions.forEach((e=>{null!==e.parentNode&&e.parentNode.removeChild(e)}))),this.wrapper.classList.add("h5p-slide-out");const t=()=>{this.wrapper.classList.remove("h5p-current-screen"),this.wrapper.classList.add("h5p-next-screen"),this.wrapper.classList.remove("h5p-slide-out"),this.wrapper.classList.remove("h5p-slide-out-reverse"),this.wrapper.classList.remove("h5p-slide-pseudo"),setTimeout((()=>{null!==this.wrapper.parentNode&&(this.wrapper.parentNode.removeChild(this.wrapper),this.remove(),this.parent.trigger("resize"))}),100)};e?window.setTimeout((()=>{t()}),800):this.wrapper.addEventListener("animationend",(()=>{t()}))},i.hideFeedbackDialogs=function(){this.overlay&&(null!==this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay),this.overlay=void 0,this.showBackgroundToReadspeaker());const e=document.querySelector(".h5p-current-screen");if(!e)return;const t=e.querySelector(".h5p-branching-question-wrapper");t&&t.parentNode.removeChild(t)},i.resizeScreen=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.questionContainer)return;let t=e?this.parent.startScreen.screenWrapper:this.wrapper;const n=window.getComputedStyle(this.questionContainer,null),r=parseInt(n.getPropertyValue("padding-top"));t.style.height=`${this.questionContainer.offsetHeight+r}px`},i.showNextLibrary=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(this.nextLibraryId=e.nextContentId,this.libraryFeedback=e.feedback,r.isBranching(e)){!0===this.parent.params.behaviour&&this.parent.disableNavButton(),this.branchingQuestions.forEach((e=>{null!==e.parentNode&&e.parentNode.removeChild(e)}));const t=document.querySelector(".h5p-current-screen");void 0===this.overlay&&(this.overlay=document.createElement("div"),this.overlay.className="h5p-branching-scenario-overlay",t.appendChild(this.overlay),this.hideBackgroundFromReadspeaker());const s=document.createElement("div");s.classList.add("h5p-nav-button-wrapper"),-1!==this.parent.backwardsAllowedFlags.indexOf(!0)&&(this.bqBackButton=this.createBackButton(this.parent.params.l10n.backButtonText),this.bqBackButton.setAttribute("isBQ",!0),!1===this.parent.canEnableBackButton(e.contentId)&&(this.bqBackButton.classList.add("h5p-disabled"),this.bqBackButton.setAttribute("disabled",!0)),s.appendChild(this.bqBackButton));const a=document.createElement("div");a.className="h5p-branching-question-wrapper",this.appendRunnable(a,e.type,e.contentId),t.appendChild(a),this.branchingQuestions.push(a),this.currentLibraryId=e.contentId,this.currentLibraryInstance=this.libraryInstances[e.contentId];const c="h5p-branching-question-title-"+r.idCounter++,o=a.querySelector(".h5p-branching-question-container");this.questionContainer=o,o.setAttribute("role","dialog"),o.setAttribute("tabindex","-1"),o.setAttribute("aria-labelledby",c),n||o.classList.add("h5p-start-outside"),o.classList.add("h5p-fly-in"),a.querySelector(".h5p-branching-question-title").id=c;const d=a.querySelector(".h5p-multichoice-wrapper");d.setAttribute("role","group"),d.setAttribute("aria-labelledby",c),document.querySelector(".h5p-branching-question").appendChild(s),this.currentLibraryWrapper.style.zIndex=0;const h=this.parent.isFullScreen(),l=this.parent.container.classList.contains("h5p-mobile-screen");""!==this.currentLibraryWrapper.style.height||this.parent.startScreen.isShowing||h||l?this.parent.startScreen.isShowing&&!h?this.resizeScreen(!0):parseInt(this.currentLibraryWrapper.style.height)<o.offsetHeight&&(this.currentLibraryWrapper.style.height=o.offsetHeight+"px"):this.resizeScreen(),this.createNextLibraries(e),this.parent.navigating=!1,a.addEventListener("animationend",(()=>{const e=a.querySelectorAll(".h5p-branching-question-alternative")[0];i||void 0===e||o.focus()}))}else{let r=!0;!0!==this.libraryFinishingRequirements[e.contentId]||!this.hasValidVideo(e)&&"H5P.CoursePresentation"!==e.type.library.split(" ")[0]||(this.contentOverlays[this.currentLibraryId]?.hide(),this.parent.disableNavButton(),r=!1);document.querySelector(".h5p-proceed-button").innerHTML=e.proceedButtonText;const s=e.type&&e.type.metadata&&e.type.metadata.title?e.type.metadata.title:"";this.libraryTitle.setAttribute("aria-label",s||"Untitled Content"),this.libraryTitle.innerHTML=e.showContentTitle&&s?s:"&nbsp;",n||(this.currentLibraryId===e.contentId?this.currentLibraryWrapper.classList.add("h5p-slide-pseudo"):t?this.currentLibraryWrapper.classList.add("h5p-slide-out-reverse"):this.currentLibraryWrapper.classList.add("h5p-slide-out")),this.overlay&&(null!==this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay),this.overlay=void 0,this.branchingQuestions.forEach((e=>{null!==e.parentNode&&e.parentNode.removeChild(e)})),this.showBackgroundToReadspeaker()),this.nextLibraries[e.contentId]||this.createNextLibrary(e);const a=this.nextLibraries[e.contentId];if(!a.offsetParent){const e=document.querySelector(".h5p-screen-footer");this.wrapper.insertBefore(a,e)}t&&(a.classList.remove("h5p-next"),a.classList.add("h5p-previous"));const c=()=>{null!==this.currentLibraryWrapper.parentNode&&this.currentLibraryWrapper.parentNode.removeChild(this.currentLibraryWrapper),this.currentLibraryWrapper=a,this.wrapper.setAttribute("aria-hidden",!1),this.currentLibraryWrapper.classList.remove("h5p-previous"),this.currentLibraryWrapper.classList.remove("h5p-next"),this.currentLibraryWrapper.classList.remove("h5p-slide-in"),this.currentLibraryElement=a.getElementsByClassName("h5p-branching-scenario-content")[0],this.createNextLibraries(e),this.parent.navigating=!1,i||this.libraryTitle.focus(),r&&this.parent.enableNavButton(),this.resize(new H5P.Event("resize",{element:o}))};n||a.classList.add("h5p-slide-in");const o=a.getElementsByClassName("h5p-branching-scenario-content")[0];o.classList.remove("h5p-branching-hidden"),this.currentLibraryId=e.contentId,this.currentLibraryInstance=this.libraryInstances[e.contentId],this.currentLibraryInstance.resize&&this.currentLibraryInstance.resize(),n?c():this.currentLibraryWrapper.addEventListener("animationend",(()=>{c()}))}},i.hideBackgroundFromReadspeaker=function(){this.header.setAttribute("aria-hidden","true"),this.currentLibraryWrapper.setAttribute("aria-hidden","true");let e=document.querySelector(".h5p-container");if(!e&&(e=document.querySelector(".preview-wrapper"),!e))return;this.tabbables=[],e.querySelectorAll("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button, iframe, object, embed, *[tabindex], *[contenteditable], video, audio").forEach((e=>{if(e instanceof HTMLMediaElement)e.controls&&(e.controls=!1,this.tabbables.push({element:e}));else{const t=e.classList.contains("ui-slider-handle")?0:e.getAttribute("tabindex");e.setAttribute("tabindex","-1"),this.tabbables.push({element:e,tabindex:t})}}))},i.showBackgroundToReadspeaker=function(){this.header.setAttribute("aria-hidden","false"),this.currentLibraryWrapper.setAttribute("aria-hidden","false"),this.tabbables&&(this.tabbables.forEach((e=>{const t=e.element;t instanceof HTMLMediaElement?t.controls=!0:void 0!==e.tabindex&&null!==e.tabindex?t.setAttribute("tabindex",e.tabindex):t.removeAttribute("tabindex")})),this.tabbables=null)},i.getElement=function(){return this.wrapper},i.remove=function(){null!==this.wrapper.parentNode&&this.wrapper.parentNode.removeChild(this.wrapper)},i.resize=function(e){const t=this.currentLibraryInstance,n=e?.data?.element??this.currentLibraryElement,r="H5P.Image"===t?.libraryInfo.machineName,i="H5P.CoursePresentation"===t?.libraryInfo.machineName,s="H5P.ImageHotspots"===t?.libraryInfo.machineName,a="H5P.Video"===t?.libraryInfo.machineName,c="H5P.InteractiveVideo"===t?.libraryInfo.machineName,o=t?.width&&t.height,d=n.classList.contains("h5p-youtube"),h=o&&(r||i)||s||a;if(h&&(n.style.width="",n.style.height="",s&&(n.style.maxWidth="")),this.parent.isFullScreen()){if(n.classList.add("h5p-fullscreen"),c&&t.$videoWrapper[0].firstChild.style&&(t.videoHeight=t.$videoWrapper[0].firstChild.style.height),h){const e=a&&void 0!==this.parent.params.content[this.currentLibraryId].type.params.sources?n.getBoundingClientRect():null;if(a&&void 0===this.parent.params.content[this.currentLibraryId].type.params.sources?n.classList.add("h5p-video-no-source"):n.classList.remove("h5p-video-no-source"),e||s||i||r){const r=s?t.options.image.height:a?e.height:t.height,o=s?t.options.image.width:i?t.ratio*r:a?e.width:t.width,h=r/o,l=c?n.lastChild:n,u=l.getBoundingClientRect();if(h>u.height/u.width){const e=u.height*(o/r)+"px";s?l.style.maxWidth=e:l.style.width=e}else{const e=u.width*h+"px";l.style.height=e,d&&null!==n.querySelector("iframe")&&(n.querySelector("iframe").style.height=e)}}}}else{this.parent.startScreen.isShowing?this.resizeScreen(!0):this.overlay?this.resizeScreen():this.wrapper.style.height="";const e=n.getElementsByClassName("h5p-video-wrapper");if(c&&e.length>0){let n=e[0].firstChild;n.style&&(n.style.height=t.videoHeight)}else d&&null!==n.querySelector("iframe")&&(n.querySelector("iframe").style.height="");n.classList.remove("h5p-fullscreen")}t&&(t.trigger("resize",e),this.handleLibraryResize())},r.isBranching=function(e){return!!e?.type?.library&&0===e.type.library.indexOf("H5P.BranchingQuestion ")},i.createNavButtons=function(){const e=document.createElement("div");e.classList.add("h5p-nav-button-wrapper"),-1!==this.parent.backwardsAllowedFlags.indexOf(!0)&&(this.backButton=this.createBackButton(this.parent.params.l10n.backButtonText),e.appendChild(this.backButton)),this.navButton=document.createElement("button"),this.navButton.classList.add("transition"),this.navButton.addEventListener("animationend",(()=>{this.parent.unanimateNavButton()})),this.navButton.addEventListener("click",(()=>{this.parent.proceedButtonInProgress||(this.parent.proceedButtonInProgress=!0,new Promise((e=>{this.handleProceed()&&e(!0)})).then((()=>{this.parent.proceedButtonInProgress=!1})))})),this.navButton.classList.add("h5p-nav-button","h5p-proceed-button");const t=this.parent.getLibrary(this.currentLibraryId).proceedButtonText;this.navButton.appendChild(document.createTextNode(t)),e.appendChild(this.navButton);const n=document.createElement("div");n.classList.add("h5p-screen-footer"),n.appendChild(e),this.wrapper.appendChild(n)},i.resetInstance=function(e){const t=e?this.libraryInstances[e]:this.currentLibraryInstance;t&&t.resetTask?.(),delete this.previousState,delete this.lastNodeId},r}(H5P.EventDispatcher);o.idCounter=0;let d=function(){function e(e){this.params=e,this.scores=[],this.visitedIndex=0}var t=e.prototype;return t.hasEndScreenScore=function(e){return void 0!==e?.feedback?.endScreenScore},t.findBranchingPaths=function(e,t){if(!this.isBranchingQuestion(e))return this.findBranchingEndings(e,t);let n=[];return e.type.params.branchingQuestion.alternatives.forEach(((e,r)=>{const i=t.concat({type:"alternative",index:r,alternativeParent:t[t.length-1].index}),s=this.findBranchingEndings(e,i);n=n.concat(s)})),n},t.findBranchingEndings=function(e,t){if(-1===e.nextContentId)return[t];if(!t.some((t=>"content"===t.type&&t.index===e.nextContentId))){const n=this.params.content[e.nextContentId],r=t.concat({type:"content",index:e.nextContentId,alternativeParent:null});return this.findBranchingPaths(n,r)}return[]},t.calculateMaxScore=function(){return this.params.scoringOptionGroup.scoringOption===h.STATIC_SCORE?this.calculateStaticMaxScore():this.params.scoringOptionGroup.scoringOption===h.DYNAMIC_SCORE?this.calculateDynamicMaxScore():0},t.calculateStaticMaxScore=function(){const e=this.params.endScreens[0].endScreenScore,t=void 0!==e?e:0;return this.params.content.reduce(((e,t)=>{let n=[t];return this.isBranchingQuestion(t)&&(n=t.type.params.branchingQuestion.alternatives),e.concat(n)}),[]).filter((e=>-1===e.nextContentId)).reduce(((e,n)=>{let r=this.hasEndScreenScore(n)?n.feedback.endScreenScore:t;return e>=r?e:r}),0)},t.calculateDynamicMaxScore=function(){return this.scores.reduce(((e,t)=>e+t.maxScore),0)},t.getAlternativeScore=function(e,t){if(!(t>=0))return 0;if(!(e&&e.type&&e.type.params&&e.type.params.branchingQuestion&&e.type.params.branchingQuestion.alternatives&&e.type.params.branchingQuestion.alternatives[t]))return 0;const n=e.type.params.branchingQuestion.alternatives[t];return!this.hasEndScreenScore(n)||void 0===n.nextContentId||n.nextContentId<0?0:n.feedback.endScreenScore},t.getQuestionMaxScore=function(e,t){if(!(t>=0))return 0;const n=e.type.params.branchingQuestion.alternatives;let r=0;return n.forEach(((e,t)=>{n[t].feedback.endScreenScore>r&&-1!==n[t].nextContentId&&(r=n[t].feedback.endScreenScore)})),r},t.getScore=function(e){return this.params.scoringOptionGroup.scoringOption===h.DYNAMIC_SCORE?this.scores.reduce(((e,t)=>e+t.score),0):this.params.scoringOptionGroup.scoringOption===h.STATIC_SCORE?e:0},t.getMaxScore=function(){return this.calculateMaxScore()},t.getCurrentState=function(){return{scores:this.scores,visitedIndex:this.visitedIndex}},t.setState=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.scores&&(this.scores=e.scores),e.visitedIndex&&(this.visitedIndex=e.visitedIndex)},t.restart=function(){this.scores=[],this.visitedIndex=0},t.addLibraryScore=function(e,t,n,r){this.visitedIndex++;const i=this.params.content[e];let s=0,a=0;this.isBranchingQuestion(i)?(s=this.getAlternativeScore(i,n),a=this.getQuestionMaxScore(i,n)):(this.hasEndScreenScore(i)&&i.nextContentId&&i.nextContentId>-1&&(s=i.feedback.endScreenScore,a=i.feedback.endScreenScore),this.params.scoringOptionGroup.includeInteractionsScores&&0!==Object.entries(r).length&&(s+=r.score,a+=r.maxScore));let c=!1,o=null,d=-1;this.scores.forEach(((t,n)=>{if(t.id===e){t.score=s,t.visitedIndex=this.visitedIndex,d=t.visitedIndex;this.scores.length>n+1&&this.params.content[t.id].nextContentId===this.scores[n+1].id?c=!0:o=n}})),c?(this.scores=this.scores.filter((e=>e.visitedIndex<=d)),this.visitedIndex=d):(null!==o&&this.scores.splice(o,1),this.scores.push({visitedIndex:this.visitedIndex,id:e,score:s,maxScore:a}))},t.isBranchingQuestion=function(e){return"H5P.BranchingQuestion"===(e?.type?.library??e).split(" ")[0]},t.isDynamicScoring=function(){return this.params.scoringOptionGroup.scoringOption===h.DYNAMIC_SCORE},t.shouldShowScore=function(){return this.params.scoringOptionGroup.scoringOption===h.STATIC_SCORE||this.isDynamicScoring()},e}();const h={STATIC_SCORE:"static-end-score",DYNAMIC_SCORE:"dynamic-score",NO_SCORE:"no-score"},l=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];for(let e=1;e<t.length;e++)for(let n in t[e])Object.prototype.hasOwnProperty.call(t[e],n)&&("object"==typeof t[0][n]&&"object"==typeof t[e][n]?l(t[0][n],t[e][n]):t[0][n]=t[e][n]);return t[0]};function u(e,t){return u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},u(e,t)}let p=function(e){var t,n;function r(t,n){var r;let i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return(r=e.call(this,"")||this).contentId=n,r.extras=i,r.startScreen={},r.libraryScreen={},r.endScreens={},r.navigating,r.currentHeight,r.currentId=-1,r.userPath=[],r.xAPIData=[],r.backwardsAllowedFlags=[],r.proceedButtonInProgress=!1,r.isReverseTransition=!1,r.params=l({content:[],startScreen:{startScreenTitle:"",startScreenSubtitle:""},endScreens:[{endScreenTitle:"",endScreenSubtitle:"",contentId:-1}],scoringOptionGroup:{scoringOption:"no-score"},l10n:{startScreenButtonText:"Start the course",endScreenButtonText:"Restart the course",proceedButtonText:"Proceed",scoreText:"Your score:",backButtonText:"Back",fullscreenAria:"Fullscreen",replayButtonText:"Replay the video",disableProceedButtonText:"Require to complete the current module"},behaviour:"individual"},t.branchingScenario),r.params.content.forEach(((e,t)=>{e.contentId=t,void 0===e.nextContentId&&(e.nextContentId=-1),r.params.behaviour.randomizeBranchingQuestions&&-1!==e.type.library.indexOf("H5P.BranchingQuestion")&&(e.type.params.branchingQuestion.randomize=!0),e.proceedButtonText=e.proceedButtonText||r.params.l10n.proceedButtonText})),r.backwardsAllowedFlags=r.params.content.map((e=>"useBehavioural"===e.contentBehaviour?r.params.behaviour.enableBackwardsNavigation:"enabled"===e.contentBehaviour)),r.scoring=new d(r.params),r.restoreState(r.extras.previousState),r.on("exitFullScreen",(()=>{window.setTimeout((()=>{r.trigger("resize")}),100)})),r.on("started",(()=>{const e=r.params.content[0];!1===r.canEnableBackButton(0)?r.disableBackButton():r.enableBackButton(),"H5P.BranchingQuestion"===e?.type?.library?.split(" ")[0]?r.trigger("navigated",{nextContentId:0}):(r.startScreen.hide(),r.libraryScreen.show(),r.triggerXAPI("progressed"),0===r.userPath.length&&r.userPath.push(0)),r.currentId=0})),r.on("navigated",(e=>{e.data.reverse&&(r.libraryScreen?.wrapper&&(r.libraryScreen.wrapper.style.height=""),r.userPath.pop(),e.data.nextContentId=r.userPath.pop()||0);const t=parseInt(e.data.nextContentId),n=r.container.querySelector('.h5p-back-button[isBQ="true"]');r.currentId>-1&&o.isBranching(r.getLibrary(r.currentId))&&n&&n.remove();const i=r.getLibrary(t);let s=!0;if(r.libraryScreen.stopPlayback(r.currentId),!r.params.preventXAPI){const e=r.libraryScreen.getXAPIData(r.currentId),t=o.isBranching(r.getLibrary(r.currentId)),n=t&&void 0!==e.statement?.result?.response;!e||t&&!n||r.xAPIData.push(e)}if(e.data.isResuming||o.isBranching(r.getLibrary(r.currentId))&&r.libraryScreen.resetInstance(),o.isBranching(r.getLibrary(r.currentId))&&document.querySelector(".h5p-current-screen").setAttribute("aria-hidden",!0),r.currentEndScreen?.isShowing?i?o.isBranching(i)||(r.currentEndScreen.hide(),r.currentEndScreen=null,r.libraryScreen.show({skipAnimation:e.data.isResuming})):(r.libraryScreen.hideFeedbackDialogs(),r.currentEndScreen.hide({skipAnimation:e.data.isResuming}),r.currentEndScreen=null):r.startScreen?.isShowing&&i?o.isBranching(i)||(r.startScreen.hide({skipAnimation:e.data.isResuming}),r.libraryScreen.show({skipAnimation:e.data.isResuming,skipFocus:e.data.isResuming}),s=!1):r.libraryScreen.hideFeedbackDialogs(),s&&r.trigger("resize"),-1!==r.currentId){r.triggerXAPI("progressed");let t={};r.libraryScreen.currentLibraryInstance?.getScore&&(t={score:r.libraryScreen.currentLibraryInstance.getScore(),maxScore:r.libraryScreen.currentLibraryInstance.getMaxScore()}),r.scoring.addLibraryScore(r.currentId,r.libraryScreen.currentLibraryId,e.data.chosenAlternative,t)}if(!1===i){if(r.currentEndScreen=r.endScreens[t],e.data.feedback){const t=r.createEndScreen({endScreenTitle:e.data.feedback.title||"",endScreenSubtitle:e.data.feedback.subtitle||"",endScreenImage:e.data.feedback.image,endScreenScore:e.data.feedback.endScreenScore});r.container.append(t.getElement()),r.currentEndScreen=t}else r.scoring.isDynamicScoring()&&(r.currentEndScreen.setScore(r.getScore()),r.currentEndScreen.setMaxScore(r.getMaxScore()));r.startScreen.hide(),r.libraryScreen.hide(!0),r.currentEndScreen.show(),r.triggerXAPICompleted(r.scoring.getScore(r.currentEndScreen.getScore()),r.scoring.getMaxScore())}else r.libraryScreen.showNextLibrary(i,e.data.reverse,e.data.isResuming,e.data.isResuming),!1===r.canEnableBackButton(t)?r.disableBackButton():r.enableBackButton(),r.currentId=t;if(0!==e.data.nextContentId&&document.querySelector(".h5p-start-screen").classList.contains("h5p-current-screen")){const e=r.libraryScreen.wrapper.querySelector(".h5p-slide-in");e&&(e.classList.remove("h5p-next"),r.startScreen.hide(),r.libraryScreen.show())}e.data.isResuming||r.userPath.push(t)})),r.on("restarted",(e=>{r.resetTask({keepStates:e.data?.keepStates??!1})})),r.on("resize",(e=>{if(r.bubblingUpwards)return;r.changeLayoutToFitWidth(),r.libraryScreen?.resize?.(e);const t=r.container.getBoundingClientRect();t.width<=480?r.container.classList.add("h5p-phone-size"):r.container.classList.remove("h5p-phone-size"),t.width<768?r.container.classList.add("h5p-medium-tablet-size"):r.container.classList.remove("h5p-medium-tablet-size")})),r}n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,u(t,n);var s=r.prototype;return s.restoreState=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.scoring&&this.scoring.setState(e.scoring),this.userPath=e.userPath||[],this.xAPIData=e.xAPIData||[]},s.restoreView=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(0===this.userPath.length);else if(e.endScreen){const t=this.createEndScreen({...e.endScreen,isCurrentScreen:!0});this.container.append(t.getElement()),this.currentEndScreen=t,this.startScreen.hide({skipAnimation:!0}),this.libraryScreen.hide(!0),this.currentEndScreen.show({skipAnimation:!0,skipFocus:!0})}else{const e=this.userPath[this.userPath.length-1];if(o.isBranching(this.getLibrary(e))&&this.userPath.length>1){const e=this.userPath[this.userPath.length-2];this.trigger("navigated",{nextContentId:e,isResuming:!0})}this.trigger("navigated",{nextContentId:e,isResuming:!0})}},s.createStartScreen=function(e,t){let{startScreenTitle:n,startScreenSubtitle:r,startScreenImage:s,startScreenAltText:a}=e;const c=new i(this,{isStartScreen:!0,titleText:n,subtitleText:r,image:s,altText:a,fullscreenAria:this.params.l10n.fullscreenAria,buttonText:this.params.l10n.startScreenButtonText,isCurrentScreen:t});return c.on("toggleFullScreen",(()=>{this.toggleFullScreen()})),c},s.createEndScreen=function(e){const t=new i(this,{isStartScreen:!1,titleText:e.endScreenTitle,subtitleText:e.endScreenSubtitle,image:e.endScreenImage,buttonText:this.params.l10n.endScreenButtonText,fullscreenAria:this.params.l10n.fullscreenAria,isCurrentScreen:!1,scoreText:this.params.l10n.scoreText,score:this.scoring.getScore(e.endScreenScore),maxScore:this.scoring.getMaxScore(),showScore:this.scoring.shouldShowScore()});return t.on("toggleFullScreen",(()=>{this.toggleFullScreen()})),t},s.getLibrary=function(e){return void 0!==this.params.content[e]&&this.params.content[e]},s.toggleFullScreen=function(){this.isFullScreen()?H5P.exitFullScreen?.():H5P.fullScreen(H5P.jQuery(this.container),this)},s.isFullScreen=function(){return H5P.isFullscreen||this.container?.classList.contains("h5p-fullscreen")||this.container?.classList.contains("h5p-semi-fullscreen")},s.disableNavButton=function(){this.libraryScreen.navButton&&(this.libraryScreen.navButton.classList.add("h5p-disabled"),this.libraryScreen.navButton.setAttribute("disabled",!0),this.libraryScreen.navButton.setAttribute("title",this.params.l10n.disableProceedButtonText))},s.enableNavButton=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.libraryScreen.navButton&&(this.libraryScreen.navButton.classList.remove("h5p-disabled"),this.libraryScreen.navButton.removeAttribute("disabled"),this.libraryScreen.navButton.removeAttribute("title"),e&&this.animateNavButton())},s.hideNavButton=function(){this.libraryScreen.navButton&&this.libraryScreen.navButton.classList.add("h5p-hidden")},s.showNavButton=function(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];if(!this.libraryScreen.navButton)return;this.libraryScreen.navButton.classList.remove("h5p-hidden"),document.activeElement.blur();e&&this.animateNavButton(),setTimeout((()=>{this.libraryScreen.navButton.focus()}),100)},s.animateNavButton=function(){this.libraryScreen.navButton.classList.contains("h5p-animate")||this.libraryScreen.navButton.classList.add("h5p-animate")},s.unanimateNavButton=function(){this.libraryScreen.navButton.classList.remove("h5p-animate")},s.getScore=function(){return this.scoring.getScore()},s.getMaxScore=function(){return this.scoring.getMaxScore()},s.resetTask=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.currentEndScreen&&(this.currentEndScreen.hide(),this.currentEndScreen=null),this.scoring.restart(),this.startScreen.screenWrapper.style.height="",this.startScreen.screenWrapper.classList.remove("h5p-slide-out"),this.startScreen.show({slideBack:this.isReverseTransition}),this.isReverseTransition=!1,this.currentId=-1,this.userPath=[],this.xAPIData=[],e.keepStates||delete this.extras.previousState,this.libraryScreen&&this.libraryScreen.remove(),this.libraryScreen=new o(this,this.params.startScreen.startScreenTitle,this.getLibrary(0),this.extras.previousState?.child),this.libraryScreen.on("toggleFullScreen",(()=>{this.toggleFullScreen()})),this.container.append(this.libraryScreen.getElement())},s.changeLayoutToFitWidth=function(){const e=window.getComputedStyle(document.getElementsByTagName("body")[0]),t=parseInt(e.fontSize,10);this.container.offsetWidth/t>43?this.container.classList.add("h5p-wide-screen"):this.container.classList.add("h5p-mobile-screen")},s.disableBackButton=function(){this.libraryScreen?.backButton&&(this.libraryScreen.backButton.classList.add("h5p-disabled"),this.libraryScreen.backButton.setAttribute("disabled",!0))},s.enableBackButton=function(){this.libraryScreen?.backButton&&(this.libraryScreen.backButton.classList.remove("h5p-disabled"),this.libraryScreen.backButton.removeAttribute("disabled"))},s.canEnableBackButton=function(e){return"number"==typeof e&&(!(e<0||e>this.backwardsAllowedFlags.length-1)&&this.backwardsAllowedFlags[e])},s.attach=function(e){if(void 0!==this.isRoot&&this.isRoot()&&this.setActivityStarted(),this.container=e.get(0),this.container.classList.add("h5p-branching-scenario"),this.container.innerHTML="",!this.params.content?.length){const e=document.createElement("div");return e.innerHTML="No content",void this.container.append(e)}this.startScreen=this.createStartScreen(this.params.startScreen,!0),this.container.append(this.startScreen.getElement()),this.currentId=-1,this.libraryScreen=new o(this,this.params.startScreen.startScreenTitle,this.getLibrary(0),this.extras.previousState?.child,this.extras.previousState?.userPath?.slice(-1)[0]),this.libraryScreen.on("toggleFullScreen",(()=>{this.toggleFullScreen()})),this.container.append(this.libraryScreen.getElement()),this.params.endScreens.forEach((e=>{this.endScreens[e.contentId]=this.createEndScreen(e),this.container.append(this.endScreens[e.contentId].getElement())})),this.restoreView(this.extras.previousState)},s.getXAPIData=function(){if(!this.currentEndScreen)return;const e=this.createXAPIEventTemplate("answered");let t=e.getVerifiedStatementValue(["object","definition"]);l(t,{interactionType:"compound",type:"http://adlnet.gov/expapi/activities/cmi.interaction"}),l(t.extensions,{"https://h5p.org/x-api/no-question-score":1});const n=this.scoring.getScore(this.currentEndScreen.getScore()),r=this.scoring.getMaxScore();return e.setScoredResult(n,r,this,!0,n===r),{statement:e.data.statement,children:this.xAPIData}},s.getCurrentState=function(){if(!this.libraryScreen.getCurrentState)return null;if(0===this.userPath.length)return null;const e={userPath:this.userPath,scoring:this.scoring.getCurrentState(),child:this.libraryScreen.getCurrentState(),xAPIData:this.xAPIData};return this.currentEndScreen&&(e.endScreen=this.currentEndScreen.getRecreationData()),e},r}(H5P.EventDispatcher);H5P.BranchingScenario=p}();

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists