Linux moodl-moodle-3s8bw1nuh5yqd9-5b875fdd66-8hs4m 4.4.0-186-generic #216-Ubuntu SMP Wed Jul 1 05:34:05 UTC 2020 x86_64
Apache/2.4.41 (Ubuntu)
: 10.39.0.36 | : 10.36.0.0
Cant Read [ /etc/named.conf ]
7.4.3
www-data
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
CREATE WP USER
README
+ Create Folder
+ Create File
/
var /
moodledata /
filedir /
6f /
5b /
[ HOME SHELL ]
Name
Size
Permission
Action
6f5b484e7b9762d172e40d4c7de45d...
98.72
KB
-rw-rw-rw-
Delete
Unzip
Zip
${this.title}
Close
Code Editor : 6f5b484e7b9762d172e40d4c7de45d62055f6cb5
(()=>{"use strict";const t=function(t){const e=t.length;return function n(){const o=Array.prototype.slice.call(arguments,0);return o.length>=e?t.apply(null,o):function(){const t=Array.prototype.slice.call(arguments,0);return n.apply(null,o.concat(t))}}},e=t((function(t,e){e.forEach(t)})),n=(t((function(t,e){return e.map(t)})),t((function(t,e){return e.filter(t)}))),o=(t((function(t,e){return e.some(t)})),t((function(t,e){return-1!=e.indexOf(t)}))),i=t((function(t,e){return n((e=>!o(e,t)),e)})),s=t(((t,e)=>e.getAttribute(t))),r=t(((t,e,n)=>n.setAttribute(t,e))),a=t(((t,e)=>e.removeAttribute(t))),c=t(((t,e)=>e.hasAttribute(t))),l=(t(((t,e,n)=>n.getAttribute(t)===e)),t(((t,e)=>{const n=s(t,e);r(t,("true"!==n).toString(),e)})),t(((t,e)=>t.appendChild(e))),t(((t,e)=>e.querySelector(t))),t(((t,e)=>{return n=e.querySelectorAll(t),Array.prototype.slice.call(n);var n})),t(((t,e)=>t.removeChild(e))),t(((t,e)=>e.classList.contains(t))),t(((t,e)=>e.classList.add(t)))),d=t(((t,e)=>e.classList.remove(t))),u=l("hidden"),h=d("hidden"),p=(t(((t,e)=>(t?h:u)(e))),t(((t,e,n)=>{n.classList[e?"add":"remove"](t)})),a("tabindex")),m=(e(p),r("tabindex","0")),v=r("tabindex","-1"),f=c("tabindex");class b{constructor(t){Object.assign(this,{listeners:{},on:function(t,e,n){const o={listener:e,scope:n};return this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(o),this},fire:function(t,e){return(this.listeners[t]||[]).every((function(t){return!1!==t.listener.call(t.scope||this,e)}))},propagate:function(t,e){let n=this;t.forEach((t=>e.on(t,(e=>n.fire(t,e)))))}}),this.plugins=t||[],this.elements=[],this.negativeTabIndexAllowed=!1,this.on("nextElement",this.nextElement,this),this.on("previousElement",this.previousElement,this),this.on("firstElement",this.firstElement,this),this.on("lastElement",this.lastElement,this),this.initPlugins()}addElement(t){this.elements.push(t),this.firesEvent("addElement",t),1===this.elements.length&&this.setTabbable(t)}insertElementAt(t,e){this.elements.splice(e,0,t),this.firesEvent("addElement",t),1===this.elements.length&&this.setTabbable(t)}removeElement(t){this.elements=i([t],this.elements),f(t)&&(this.setUntabbable(t),this.elements[0]&&this.setTabbable(this.elements[0])),this.firesEvent("removeElement",t)}count(){return this.elements.length}firesEvent(t,e){const n=this.elements.indexOf(e);return this.fire(t,{element:e,index:n,elements:this.elements,oldElement:this.tabbableElement})}nextElement({index:t}){const e=t===this.elements.length-1,n=this.elements[e?0:t+1];this.setTabbable(n),n.focus()}firstElement(){const t=this.elements[0];this.setTabbable(t),t.focus()}lastElement(){const t=this.elements[this.elements.length-1];this.setTabbable(t),t.focus()}setTabbableByIndex(t){const e=this.elements[t];e&&this.setTabbable(e)}setTabbable(t){e(this.setUntabbable.bind(this),this.elements),m(t),this.tabbableElement=t}setUntabbable(t){t!==document.activeElement&&(this.negativeTabIndexAllowed?v(t):p(t))}previousElement({index:t}){const e=0===t,n=this.elements[e?this.elements.length-1:t-1];this.setTabbable(n),n.focus()}useNegativeTabIndex(){this.negativeTabIndexAllowed=!0,this.elements.forEach((t=>{t.hasAttribute("tabindex")||v(t)}))}initPlugins(){this.plugins.forEach((function(t){void 0!==t.init&&t.init(this)}),this)}}class g{constructor(){this.selectability=!0}init(t){this.boundHandleKeyDown=this.handleKeyDown.bind(this),this.controls=t,this.controls.on("addElement",this.listenForKeyDown,this),this.controls.on("removeElement",this.removeKeyDownListener,this)}listenForKeyDown({element:t}){t.addEventListener("keydown",this.boundHandleKeyDown)}removeKeyDownListener({element:t}){t.removeEventListener("keydown",this.boundHandleKeyDown)}handleKeyDown(t){switch(t.which){case 27:this.close(t.target),t.preventDefault(),t.stopPropagation();break;case 35:this.lastElement(t.target),t.preventDefault(),t.stopPropagation();break;case 36:this.firstElement(t.target),t.preventDefault(),t.stopPropagation();break;case 13:case 32:this.select(t.target),t.preventDefault(),t.stopPropagation();break;case 37:case 38:this.hasChromevoxModifiers(t)||(this.previousElement(t.target),t.preventDefault(),t.stopPropagation());break;case 39:case 40:this.hasChromevoxModifiers(t)||(this.nextElement(t.target),t.preventDefault(),t.stopPropagation())}}hasChromevoxModifiers(t){return t.shiftKey||t.ctrlKey}previousElement(t){!1!==this.controls.firesEvent("beforePreviousElement",t)&&(this.controls.firesEvent("previousElement",t),this.controls.firesEvent("afterPreviousElement",t))}nextElement(t){!1!==this.controls.firesEvent("beforeNextElement",t)&&(this.controls.firesEvent("nextElement",t),this.controls.firesEvent("afterNextElement",t))}select(t){this.selectability&&!1!==this.controls.firesEvent("before-select",t)&&(this.controls.firesEvent("select",t),this.controls.firesEvent("after-select",t))}firstElement(t){!1!==this.controls.firesEvent("beforeFirstElement",t)&&(this.controls.firesEvent("firstElement",t),this.controls.firesEvent("afterFirstElement",t))}lastElement(t){!1!==this.controls.firesEvent("beforeLastElement",t)&&(this.controls.firesEvent("lastElement",t),this.controls.firesEvent("afterLastElement",t))}disableSelectability(){this.selectability=!1}enableSelectability(){this.selectability=!0}close(t){!1!==this.controls.firesEvent("before-close",t)&&(this.controls.firesEvent("close",t),this.controls.firesEvent("after-close",t))}}var y=0,k=1,S=function(t,e,n,o,i,s){var r=this,a="interactive-video-".concat(s,"-menu-").concat(t),c=new b([new g]);c.on("close",(function(){return u()}));var l,d=[];H5P.EventDispatcher.call(r);var u=function(){r.control.setAttribute("aria-expanded","false"),r.control.focus(),r.popup.classList.remove("h5p-show"),r.trigger("close")},h=function(){"true"===r.control.getAttribute("aria-expanded")?u():(r.control.setAttribute("aria-expanded","true"),r.popup.classList.add("h5p-show"),r.trigger("open"),r.popup.querySelector('li[tabindex="0"]').focus())},p=function(t){var e=t.value===n.value,i=w(null,k,t.label,(function(){!function(t,e){n=e,function(t,e,n){for(var o=0;o<t.length;o++)e.call(n,t[o],o)}(l.querySelectorAll('[aria-checked="true"]'),(function(t){return t.setAttribute("aria-checked","false")}),this),t.setAttribute("aria-checked","true"),u(),r.trigger("select",e)}(this,t)}),"li",o);return d.push({option:t,element:i}),i.setAttribute("aria-checked",e.toString()),i.setAttribute("aria-describedby",a),c.addElement(i),e?i.setAttribute("tabindex","0"):i.removeAttribute("tabindex"),i};r.updateOptions=function(t){l&&l.parentNode.removeChild(l),(l=$(null,null,"ol")).setAttribute("role","menu");for(var e=0;e<t.length;e++)l.appendChild(p(t[e]));r.popup.appendChild(l)},r.popup=$("h5p-chooser h5p-"+t,'<h2 id="'.concat(a,'">').concat(i[t],"</h2>")),r.popup.setAttribute("role","dialog");var m=w("h5p-chooser-close-button",y,i.close,h,"div","button");r.popup.appendChild(m),r.control=w("h5p-control h5p-"+t,y,i[t],h,"div","button"),r.control.setAttribute("aria-haspopup","true"),r.overlayControl=w("h5p-minimal-button h5p-"+t,k,i[t],h,"div","menuitem"),r.overlayControl.tabIndex="-1",r.updateOptions(e)};(S.prototype=Object.create(H5P.EventDispatcher.prototype)).constructor=S;var $=function(t,e,n){var o=document.createElement(n||"div");return t&&(o.className=t),e&&(o.innerHTML=e),o},w=function(t,e,n,o,i,s){var r=$(t,e===k?n:"",i);return r.tabIndex=0,r.setAttribute("role",s),e===y&&(r.title=n),r.addEventListener("click",(function(t){o.call(r,t)}),!1),r.addEventListener("keydown",(function(t){32!==t.which&&13!==t.which||(t.preventDefault(),o.call(r,t))}),!1),r};const C=S,T={ENTER:13,SPACE:32,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90},x=(t,e,n={ctrl:!1,shift:!1})=>-1!==e.indexOf(t.which)&&(!(n.ctrl&&!t.ctrlKey)&&!(n.shift&&!t.shiftKey)),P=t=>-1!==[T.ENTER,T.SPACE].indexOf(t.which),I=(t,e,n)=>{t.on("keydown",(t=>{for(let o=0;o<e.length;o++){const i=e[o];if(x(t,[i.key],{ctrl:i.ctrl,shift:i.shift}))return i.preventDefault&&t.preventDefault(),n(t)}}))};function E(t){return E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},E(t)}var B=H5P.jQuery,A=function(t){return void 0!==t&&"string"==typeof t&&t.length>0},M=function(t){return A(t)?B("<div>".concat(t,"</div>")).text():void 0},H="timecode",D=function(t,e){return void 0!==t.goto&&t.goto.type===e},R=["H5P.Image","H5P.Nil","H5P.Table","H5P.Link","H5P.GoToQuestion","H5P.IVHotspot","H5P.Text"],V=["H5P.Text","H5P.Table"],O=function(t){return-1!==V.indexOf(t)};function q(t,e,n){var o,i,s,r,a=this;H5P.EventDispatcher.call(a);var c=t.action;n&&(c.userDatas={state:n});var l,d,u,h,p=c.library.split(" ")[0],m=e.l10n[function(t,e){return-1!==R.indexOf(t)||D(e,H)}(p,t)?"content":"interaction"],v="H5P.Nil"!==p&&"button"===t.displayType,f=[c.params.contentName,v?M(t.label):"","H5P.Link"===p&&void 0!==c.params.title?c.params.title:t.libraryTitle].filter(A)[0],b=!1,g=!1,y=!1,k=t.action.metadata;this.on("open-dialog",(function(){P()})),this.on("show-mask",(function(){L(this.getElement())}));var S=function(n){o=B("<div/>",{tabindex:0,role:"button",class:"h5p-interaction "+l+(n?"":" h5p-hidden"),"aria-popup":"true","aria-expanded":"false","aria-label":f,css:{left:t.x+"%",top:t.y+"%",width:"",height:""},on:{click:function(){a.dialogDisabled||(P(),o.attr("aria-expanded","true"))},keydown:function(t){13!==t.which&&32!==t.which||a.dialogDisabled||(P(),o.attr("aria-expanded","true"),t.preventDefault())}}}),a.getRequiresCompletion()&&void 0===e.editor&&e.currentState!==H5P.InteractiveVideo.SEEKING&&P(!0),B("<div/>",{class:"h5p-touch-area"}).appendTo(o),B("<div/>",{class:"h5p-interaction-button"}).appendTo(o),e.editor&&o.hover((function(){o.is(".focused")||o.is(":focus")||e.dnb&&(!e.dnb||e.dnb.newElement)?(e.editor.hideInteractionTitle(),b=!1):(e.editor.showInteractionTitle(f,o),b=!0)}),(function(){e.editor.hideInteractionTitle(),b=!1})).focus((function(){e.editor.hideInteractionTitle(),b=!1})).click((function(){e.editor.hideInteractionTitle()}));var s=A(M(t.label));t.label&&s&&(i=$(t.label,"h5p-interaction").appendTo(o)),a.trigger("display",o),setTimeout((function(){o&&o.removeClass("h5p-hidden")}),0)},$=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return B("<div/>",{class:"h5p-interaction-label ".concat(e),html:'<div class="h5p-interaction-label-text">'.concat(t,"</div>")})},w=function(){return(o=$(t.label,"h5p-interaction h5p-interaction-label-standalone")).css({left:"".concat(t.x,"%"),top:"".concat(t.y,"%"),width:"",height:"initial"}),a.trigger("display",o),setTimeout((function(){o&&o.removeClass("h5p-hidden")}),0),o},C=function(e){if("timecode"===t.goto.type)e.click((function(e){1===e.which&&V({data:t.goto.time})})).keypress((function(e){32===e.which&&V({data:t.goto.time})})).attr("href","#").attr("tabindex","0");else{var n=t.goto.url;e.keypress((function(t){32===t.which&&this.click()})).attr({href:("other"!==n.protocol?n.protocol:"")+n.url,target:"_blank"})}return e.addClass("goto-clickable")},T=function(t){var n=!e.hasUncompletedRequiredInteractions(t);d&&d.trigger("hide"),o&&a.trigger("hide",o),a.isButton()?n&&e.dnb.dialog.close():(e.isMobileView&&n&&e.dnb.dialog.close(),o&&o.detach()),a.trigger("remove",o),n&&N(o)},x=function(t){if("H5P.Questionnaire"===p){if(t.find(".h5p-interaction-continue-button").length)return;var n=function(){var t=document.createElement("button");return t.innerHTML=e.l10n.continueWithVideo,t.className="h5p-interaction-continue-button",t.addEventListener("click",(function(){T(),e.play()})),t}(),o=t.find(".h5p-questionnaire-success-center");o.length&&o.get(0).appendChild(n),d.on("noSuccessScreen",(function(){T(),e.play()}))}"H5P.FreeTextQuestion"===p&&d.on("continue",(function(){T(),e.play()}))},P=function(n){var i=e.$container.find(".h5p-dialog-wrapper"),s=i.find(".h5p-dialog-titlebar");"function"==typeof d.setActivityStarted&&"function"==typeof d.getScore&&d.setActivityStarted();var r=a.isGotoClickable(),l=i.find("[tabindex]"),u=B(r?"<a>":"<div>",{class:"h5p-dialog-interaction h5p-frame"});!r&&O(p)&&u.attr("tabindex","0"),void 0!==e.editor?u.attr("tabindex",-1):0===l.length&&u.attr("tabindex",0),a.getRequiresCompletion()&&i.keydown((function(t){!function(t,e){var n=function(t){return e.target===t.get(0)},o=9===e.which,i=t.first(),s=t.last();o&&e.shiftKey&&n(i)?(s.focus(),e.preventDefault()):o&&n(s)&&(i.focus(),e.preventDefault())}(i.find('[tabindex="0"], button, input').filter(":visible"),t)}));var h=r?C(u):u;if(d.attach(h),x(h),K(d)&&(a.score=d.getScore(),a.maxScore=d.getMaxScore()),a.hasFullScore()&&n){if(i.hasClass("h5p-hidden"))return}else a.getRequiresCompletion()&&!a.hasFullScore()&&(e.dnb.dialog.hideCloseButton(),e.dnb.dialog.disableOverlay=!0,i.click((function(){a.hasFullScore()||e.showWarningMask().find(".h5p-button-back").click((function(){return u.find("button").last().focus()}))})));e.dnb.dialog.open(u),e.disableTabIndexes(),e.dnb.dialog.addLibraryClass(p),e.dnb.dialog.toggleClass("goto-clickable-visualize",!(!r||!t.goto.visualize)),e.dnb.dialog.toggleClass("h5p-goto-timecode",D(t,H)),e.dnb.dialog.disableOverlay&&e.restorePosterTabIndexes();e.dnb.dialog.once("close",(function(){e.dnb.$dialogContainer.one("transitionend",(function(){u.is(".h5p-image")&&u.find("img").css({width:"",height:""})}));try{void 0!==d.pause&&(d.pause instanceof Function||"function"==typeof d.pause)&&d.pause()}catch(t){H5P.error(t)}o&&(o.focus(),o.attr("aria-expanded","false")),d&&d.trigger("hide");var t=i.find(".h5p-dialog-titlebar").find(".h5p-sc-sound-control");t.length&&i.find(".h5p-sc-set-wrapper").append(t)}));if(e.dnb.dialog.on("close",(function t(){a.dialogWidth=e.dnb.dialog.getDialogWidth(),e.dnb.dialog.off("close",t)})),"H5P.Image"===p){var m=e.dnb.dialog.getMaxSize(o),v=u.find("img");c.params.file.width&&c.params.file.height?I(v,m,{width:c.params.file.width,height:c.params.file.height},!e.isMobileView):(v.on("load",(function(){v.is(":visible")&&I(v,m,{width:this.width,height:this.height},!e.isMobileView)})),e.dnb.dialog.position(o))}else e.isMobileView||("H5P.FreeTextQuestion"===p?e.dnb.dialog.position(o,{width:a.dialogWidth/16},"big"):"H5P.Text"!==p&&"H5P.Table"!==p?e.dnb.dialog.position(o,{width:a.dialogWidth/16},"medium"):e.dnb.dialog.position(o,{width:a.dialogWidth/16},null));if("H5P.Summary"===p){var f=0;H5P.on(d,"resize",(function(){var t=u.height();(f>t+10||f<t-10)&&setTimeout((function(){e.dnb.dialog.scroll(t,300)}),500),f=t}))}if(s.find(".h5p-sc-sound-control").remove(),i.find(".h5p-sc-sound-control").length){var b=i.find(".h5p-sc-sound-control"),g=i.find(".h5p-dialog-close");if(g.length&&"none"!==g.css("display")){var y=2*parseFloat(g.css("right"))+2*parseFloat(g.css("padding-right"));b.css({right:y+"px"})}s.append(b)}setTimeout((function(){H5P.trigger(d,"resize")}),0)},I=function(t,n,i,s){i.width/=16,i.height/=16,i.height>n.height&&(i.width=i.width*n.height/i.height,i.height=n.height),i.width>n.width&&(i.height=i.height*n.width/i.width,i.width=n.width);var r=16/Number(t.css("fontSize").replace("px",""));t.css({width:i.width*r+"em",height:i.height*r+"em"}),s&&e.dnb.dialog.position(o,i)},V=function(n){a.isButton()&&e.dnb.dialog.close(),e.currentState!==H5P.Video.PAUSED&&e.currentState!==H5P.Video.ENDED||e.play();var o=n.data;o===t.duration.from&&(o+=.2),e.seek(o)},q=function(){var n=t.height||10,o=t.width||10,i=e.width/e.fontSize;return{height:n/(i/(e.$videoWrapper.width()/e.$videoWrapper.height()))*100+"%",width:o/i*100+"%"}},L=function(t){t.css("zIndex",52),e.showOverlayMask()},N=function(t){t&&t.css("zIndex",""),e.hideOverlayMask()},W=function(){var n=a.isGotoClickable(),i=q(),c=B.extend({},{backgroundColor:"rgb(255,255,255)",boxShadow:!0},t.visuals);if(o=B("<div/>",{"aria-label":e.l10n.interaction,tabindex:"-1",class:"h5p-interaction h5p-poster "+l+(n&&t.goto.visualize?" goto-clickable-visualize":""),css:{left:t.x+"%",top:t.y+"%",width:i.width,height:i.height}}),"H5P.IVHotspot"!==p){o.css("background",c.backgroundColor);var u=c.backgroundColor.split(",");if(u[3])0===parseFloat(u[3].replace(")",""))&&o.addClass("h5p-transparent-interaction")}!1===c.boxShadow&&o.addClass("h5p-box-shadow-disabled"),"H5P.Link"===p&&(o.css("height","auto"),o.css("width","auto"),void 0===e.editor&&o.click((function(){return window.open(d.getUrl()),e.pause(),!1}))),r=B("<div>",{class:"h5p-interaction-outer"}).appendTo(o),s=B(n?"<a>":"<div>",{class:"h5p-interaction-inner h5p-frame"}).appendTo(r),!n&&O(p)&&s.attr("tabindex","0"),void 0!==e.editor&&d.disableAutoPlay&&d.disableAutoPlay();var h=n?C(s):s;d.attach(h),x(h),a.trigger("display",o),a.getRequiresCompletion()&&e.currentState!==H5P.InteractiveVideo.SEEKING&&void 0===e.editor&&!a.hasFullScore()&&(L(o),o.focus()),setTimeout((function(){H5P.trigger(d,"resize")}),0),"function"==typeof d.setActivityStarted&&"function"==typeof d.getScore&&d.setActivityStarted()},z=function(){var n,i,s=!0;if(t.adaptivity&&(i=a.hasFullScore(),s=!a.getRequiresCompletion()||i,i?n=t.adaptivity.correct:i||(n=t.adaptivity.wrong)),n&&void 0!==n.seekTo){e.pause(),!n.allowOptOut&&o&&(a.isButton()?(e.dnb.dialog.disableOverlay=!0,e.dnb.dialog.hideCloseButton()):L(o));var r=i?"correct":"wrong",c=n.seekLabel?n.seekLabel:e.l10n.defaultAdaptivitySeekLabel;d.hideButton("iv-continue").addButton("iv-adaptivity-"+r,c,(function(){T(n.seekTo),!i&&d.resetTask&&(d.resetTask(),d.hideButton("iv-adaptivity-"+r)),a.remove(),F(n.seekTo)})).showButton("iv-adaptivity-"+r,1).hideButton("iv-adaptivity-"+(i?"wrong":"correct"),1).hideButton("check-answer",1).hideButton("show-solution",1).hideButton("try-again",1),void 0!==d.disableInput&&(d.disableInput instanceof Function||"function"==typeof d.disableInput)&&d.disableInput(),setTimeout((function(){var t=n.message.replace("<p>","").replace("</p>","");d.updateFeedbackContent(t,!0),d.read(t)}),0)}else void 0!==d.hasButton&&(d.hasButton("iv-continue")||d.addButton("iv-continue",e.l10n.defaultAdaptivitySeekLabel,(function(){T(),F()})),d[s?"showButton":"hideButton"]("iv-continue"))},F=function(t){var n=U(),o=n.filter((function(t){return!t.isButton()}));if(o.length?n=o:n.length&&e.$container.find(".h5p-dialog-wrapper .h5p-dialog").show(),n.length){var i=n[0];return i.isButton()?i.trigger("open-dialog"):i.trigger("show-mask"),void e.pause()}e.currentState!==H5P.Video.ENDED&&(void 0!==t&&(e.pause(),e.seek(t)),e.play(),e.controls.$play.focus())},U=function(){return e.getVisibleInteractions().filter((function(t){return t!==a})).filter((function(t){return t.getRequiresCompletion()&&!t.hasFullScore()}))};a.isGotoClickable=function(){return-1!==["H5P.Text","H5P.Image"].indexOf(p)&&t.goto&&-1!==["timecode","url"].indexOf(t.goto.type)},a.getCurrentState=function(){if(d&&(d.getCurrentState instanceof Function||"function"==typeof d.getCurrentState))return d.getCurrentState()},a.getDuration=function(){return{from:t.duration.from,to:t.duration.to+1}},a.getRequiresCompletion=function(){return!!t.adaptivity&&!!t.adaptivity.requireCompletion},a.pause=function(){return t.pause},a.isButton=function(){return"button"===t.displayType||!(!e.isMobileView||"H5P.IVHotspot"===p)&&("H5P.Image"!==p||!1!==t.buttonOnMobile)},a.isStandaloneLabel=function(){return"H5P.Nil"===p},a.isMainSummary=function(){return!0===t.mainSummary},a.selectDot=function(){e.preventSkipping||(e.seekingTo=!0,Math.floor(10*e.video.getCurrentTime())!==Math.floor(10*t.duration.from)&&(e.currentState===H5P.Video.VIDEO_CUED?(e.play(),e.seek(t.duration.from)):e.currentState===H5P.Video.PLAYING?e.seek(t.duration.from):(e.play(),e.seek(t.duration.from),e.pause())))},a.addDot=function(){if("H5P.Nil"===p)return B("<div/>",{class:n});var n="h5p-seekbar-interaction "+l,o=B("<div/>",{role:"menuitem",class:n,"aria-label":"".concat(m,". ").concat(f),title:f,css:{left:t.duration.from*e.oneSecondInPercentage+"%"},on:{click:a.selectDot,keydown:function(t){if(13===t.which||32===t.which)return a.selectDot(),!1}}});return e.preventSkipping&&o.attr("aria-disabled","true").attr("tabindex","-1"),a.$menuitem=o,o},a.isVisible=function(){return y},a.visibleAt=function(e){return!(e<t.duration.from||e>=t.duration.to+1)},a.toggle=function(n,i){return a.visibleAt(n)?o?void 0:(y=!0,a.isStandaloneLabel()?w():a.isButton()?S(i):W(),void 0===e.editor?h=e.dnb.add(o,void 0,{dnbElement:h,disableContextMenu:!0}):(a.fit&&(e.editor.fit(o,t),a.fit=!1),o.focus((function(){e.pause()}))),o):(y=!1,void(o&&(h&&(h.hideContextMenu(),h===e.dnb.focusedElement&&(h.blur(),delete e.dnb.focusedElement)),e.editor&&b&&(e.editor.hideInteractionTitle(),b=!1),a.remove())))},a.setTitle=function(t){o&&o.attr("aria-label",t),f=t},a.reCreateInteraction=function(){"H5P.IVHotspot"!==p&&o&&(d&&d.trigger("hide"),a.trigger("hide",o),o.detach(),a.isStandaloneLabel()?w():a.isButton()?S(!0):W())},a.resizeInteraction=function(){a.isStandaloneLabel()||H5P.trigger(d,"resize")},a.positionLabel=function(t){o&&a.isButton()&&i&&!a.isStandaloneLabel()&&(i.removeClass("h5p-left-label"),parseInt(o.css("left"))+i.position().left+i.outerWidth()>t&&i.addClass("h5p-left-label"))},a.setPosition=function(e,n){t.x=e,t.y=n,o.css({left:e+"%",top:n+"%"})},a.setSize=function(e,n){e&&(t.width=e),n&&(t.height=n),H5P.trigger(d,"resize")},a.remove=function(){o&&(a.trigger("domHidden",{$dom:o,key:"videoProgressedPast"},{bubbles:!0,external:!0}),d&&d.trigger("hide"),a.trigger("hide",o),o.detach(),o=void 0)},a.reCreate=function(){l=function(){var e=t.className;if(void 0===e){var n=c.library.split(" ")[0].toLowerCase().split(".");e=n[0]+"-"+n[1]+"-interaction"}return t.goto&&"timecode"===t.goto.type&&(e+=" h5p-goto-timecode"),e}(),a.isStandaloneLabel()||(c.params=c.params||{},d=H5P.newRunnable(c,e.contentId,void 0,void 0,{parent:e,editing:void 0!==e.editor}),void 0===a.maxScore&&d.getMaxScore&&(a.maxScore=d.getMaxScore()),c.userDatas&&K(d)&&(a.score=d.getScore()),e.isTask||void 0===e.options.assets.endscreens||(d.isTask||void 0===d.isTask&&void 0!==d.showSolutions)&&(e.isTask=!0),d.on&&(d.on("xAPI",(function(t){var n=t.getVerifiedStatementValue(["context","contextActivities","parent"])||[],o=t.getContentXAPIId(e),i="completed"===t.getVerb()||"answered"===t.getVerb(),s=n.some((function(t){return t.id===o}));d.getScore&&(a.score=d.getScore()),d.getMaxScore&&(a.maxScore=d.getMaxScore()),s&&i&&t.getMaxScore()&&(a.score=null==t.getScore()?0:t.getScore(),a.maxScore=a.maxScore?a.maxScore:t.getMaxScore(),z()),a.setLastXAPIVerb(t.getVerb()),a.trigger(t)})),d.on("question-finished",(function(){z()})),d.on("resize",(function(){delete a.dialogWidth,e&&e.dnb&&e.dnb.dialog.removeStaticWidth()})),"H5P.IVHotspot"===p&&d.on("goto",V),"H5P.GoToQuestion"===p&&d.on("chosen",V)))};var K=function(t){return"undefined"!==E(t)&&"function"==typeof t.getScore&&"function"==typeof t.getMaxScore};a.setDnbElement=function(t){return h!==t&&(h=t,!0)},a.hasFullScore=function(){return a.score>=a.maxScore},a.getLibraryName=function(){return p},a.getMetadata=function(){return k},a.getTitle=function(){return f},a.isAnswerable=function(){return-1===R.indexOf(a.getLibraryName())&&!a.isStandaloneLabel()},a.setProgress=function(t){this.progress=t},a.getProgress=function(){return this.progress},a.setLastXAPIVerb=function(t){u=t},a.getLastXAPIVerb=function(){return u},a.getClass=function(){return l},a.getCopyrights=function(){if(!a.isStandaloneLabel()){var n=H5P.newRunnable(c,e.contentId);if(void 0!==n){var o=new H5P.ContentCopyrights;return o.addContent(H5P.getCopyrights(n,t,e.contentId)),o.setLabel(f+" "+H5P.InteractiveVideo.humanizeTime(t.duration.from)+" - "+H5P.InteractiveVideo.humanizeTime(t.duration.to)),o}}},a.getXAPIData=function(){if(d&&(d.getXAPIData instanceof Function||"function"==typeof d.getXAPIData))return d.getXAPIData()},a.getSubcontentId=function(){return c.subContentId},a.getElement=function(){return o},a.focusOnFirstTabbableElement=function(){if(o){var t=B(o.get(0)).find("[tabindex]");t&&t.length?t.get(0).focus():a.focus()}},a.focus=function(){o&&o.focus()},a.getClipboardData=function(){return H5P.DragNBar.clipboardify(H5PEditor.InteractiveVideo.clipboardKey,t,"action")},a.repositionToWrapper=function(e){if(o&&"H5P.IVHotspot"!==p&&"H5P.FreeTextQuestion"!==p){if(g&&(o.css({top:t.y+"%",left:t.x+"%"}),o.css(a.isButton()?{height:"",width:""}:q()),g=!1),o.position().top+o.height()>e.height()){var n=(e.height()-o.height())/e.height()*100;if(n<0){n=0;var i=e.height()/parseFloat(o.css("font-size"));o.css("height",i+"em")}o.css("top",n+"%"),g=!0}if(o.position().left+o.width()>e.width()){var s=(e.width()-o.width())/e.width()*100;if(s<0){s=0;var r=e.width()/parseFloat(o.css("font-size"));o.css("width",r+"em")}o.css("left",s+"%"),g=!0}}},a.resetTask=function(){void 0!==c.userDatas&&void 0!==c.userDatas.state&&delete c.userDatas.state,delete a.score,delete a.maxScore,a.reCreate()},a.getInstance=function(){return d},a.reCreate()}q.prototype=Object.create(H5P.EventDispatcher.prototype),q.prototype.constructor=q,q.PROGRESS_INTERACTED=0,q.PROGRESS_ANSWERED=1;const L=q;var N=function(){function t(t){this.l10n=t;var e=document.createElement("div");e.classList.add("h5p-iv-interactions-announcer"),e.setAttribute("aria-live","polite"),this.interactionsAnnouncer=e}var e=t.prototype;return e.getInteractionAnnouncer=function(){return this.interactionsAnnouncer},e.announceInteractions=function(t){t.length>0&&(this.interactionsAnnouncer.textContent="",this.interactionsAnnouncer.textContent="\n ".concat(this.getAnnouncementMessage(t.length),"\n ").concat(this.getTitleAnnouncement(t.length,t[0]),"\n ").concat(this.getPauseAnnouncement(t)))},e.getAnnouncementMessage=function(t){return 0===t?"":1===t?this.l10n.singleInteractionAnnouncement:this.l10n.multipleInteractionsAnnouncement},e.getTitleAnnouncement=function(t,e){return 1===t?e.getTitle():""},e.getPauseAnnouncement=function(t){return t.some((function(t){return t.pause()}))?". ".concat(this.l10n.videoPausedAnnouncement):""},t}(),W=H5P.jQuery,z=!!navigator.userAgent.match(/iPod|iPhone|iPad/g),F=function(){function t(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{content:"",maxWidth:"auto",style:"h5p-interactive-video-bubble",mode:"centered",focus:function(){}};this.$reference=t,this.maxWidth=e.maxWidth,this.style=e.style,this.mode=e.mode,this.focus=e.focus,this.$tail=W("<div/>",{class:"".concat(this.style,"-tail")}),this.$innerTail=W("<div/>",{class:"".concat(this.style,"-inner-tail")}),this.$content=W("<div/>",{class:"".concat(this.style,"-text")}),"string"==typeof e.content?this.$content.html(e.content):this.$content.append(e.content),this.$innerBubble=W("<div/>",{class:"".concat(this.style,"-inner")}).append(this.$content).prepend(this.$innerTail),this.$h5pContainer=this.$reference.closest(".h5p-interactive-video"),this.$bubble=W("<div/>",{class:this.style,"aria-live":"polite"}).append([this.$tail,this.$innerBubble]).addClass("".concat(this.style,"-inactive")).appendTo(this.$h5pContainer),z&&H5P.$body.css("cursor","pointer"),"centered"===this.mode&&this.$bubble.css({width:"auto"===this.maxWidth?"auto":"".concat(this.maxWidth,"px")}),this.update()}var e=t.prototype;return e.update=function(){var t=this,e=this.getOffsetBetween(this.$h5pContainer,this.$reference),n="full"===this.mode?this.$bubble.outerWidth():Math.min(.9*e.outerWidth,"auto"===this.maxWidth?this.$bubble.outerWidth():this.maxWidth),o=this.getBubblePosition(n,e,this.mode);"centered"===this.mode&&this.$bubble.css({bottom:void 0===o.bottom?void 0:"".concat(o.bottom,"px"),left:"".concat(o.left,"px")}),setTimeout((function(){var e=t.getTailPosition(t.$reference),n={bottom:"".concat(e.bottom,"px"),left:"string"==typeof e.left?e.left:"".concat(e.left,"px")};t.$tail.css(n),t.$innerTail.css(n)}),75)},e.animate=function(){var t=this;this.$bubble.hasClass("".concat(this.style,"-inactive"))&&(this.$bubble.removeClass("".concat(this.style,"-inactive")).addClass("".concat(this.style,"-active")),setTimeout((function(){t.$bubble.removeClass("".concat(t.style,"-active")).addClass("".concat(t.style,"-inactive"))}),2e3))},e.setContent=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";this.$content.html(t),this.update()},e.getContent=function(){return this.$content.get(0).outerHTML},e.isActive=function(){return this.$bubble.hasClass("".concat(this.style,"-active"))},e.toggle=function(t){var e=this,n=arguments.length>1&&void 0!==arguments[1]&&arguments[1];(t=void 0===t?!this.isActive():t)&&n?(setTimeout((function(){e.$bubble.removeClass("".concat(e.style,"-preparing")).addClass("".concat(e.style,"-active")),setTimeout((function(){return e.focus()}),400)}),100),this.$bubble.removeClass("".concat(this.style,"-inactive")).addClass("".concat(this.style,"-preparing"))):this.$bubble.toggleClass("".concat(this.style,"-inactive"),!t).toggleClass("".concat(this.style,"-active"),t),this.update()},e.getBubblePosition=function(t,e,n){var o=t/2;return{bottom:"full"===n?void 0:e.bottom+e.innerHeight+4,left:"full"===n?(e.outerWidth-t)/2:e.left-o+16}},e.getTailPosition=function(t){return{left:t.offset().left-this.$tail.parent().offset().left+8,top:-6,bottom:-6}},e.getOffsetBetween=function(t,e){var n=t[0].getBoundingClientRect(),o=e[0].getBoundingClientRect();return{top:o.top-n.top,right:n.right-o.right,bottom:n.bottom-o.bottom,left:o.left-n.left+parseInt(e.css("marginLeft")),innerWidth:o.width,innerHeight:o.height,outerWidth:n.width,outerHeight:n.height}},e.fullscreen=function(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:void 0,o=this.isMobilePhone(),i=t&&!o&&void 0!==e&&void 0!==n,s={maxHeight:"",top:""};i&&(s.maxHeight="calc(".concat(n,"px - 1em - 9px)"),s.top="calc(((".concat(e-n,"px + 1em) / 2) - 9px)")),this.$bubble.toggleClass("mobile-fullscreen",o&&t),this.$bubble.css(s)},e.isMobilePhone=function(){return/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|Android|Silk|lge |maemo|midp|mmp|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|phone)|xda|xiino/i.test(navigator.userAgent)||/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(navigator.userAgent.substr(0,4))},t}();const U=F,K=(t,e,{ignoreKeyboard:n=!1,preventDefaultForKeys:o=!0}={})=>{const i=t=>{"click"!==t.type&&o&&t.preventDefault(),e(t)};t.click(i),!0!==n&&I(t,[{key:T.SPACE},{key:T.ENTER}],i)};function G(t,e){return G=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},G(t,e)}var Q=H5P.jQuery,j="h5p-interactive-video-endscreen",Y="h5p-interactive-video-endscreen-submit-button-hidden",_=function(t){return null!=t};const X=function(t){var e,n;function o(e){var n,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return(n=t.call(this)||this).parent=e,n.l10n=Q.extend({title:"@answered Questions answered",information:"You have answered @answered questions, click below to submit your answers.",informationOnSubmitButtonDisabled:"You have answered @answered questions.",informationNoAnswers:"You have not answered any questions.",informationMustHaveAnswer:"You have to answer at least one question before you can submit your answers.",submitButton:"Submit Answers",submitMessage:"Your answers have been submitted!",tableRowAnswered:"Answered questions",tableRowScore:"Score",answeredScore:"answered",tableRowSummaryWithScore:"You got @score out of @total points for the @question that appeared after @minutes minutes and @seconds seconds.",tableRowSummaryWithoutScore:"You have answered the @question that appeared after @minutes minutes and @seconds seconds."},o.l10n),n.isSubmitButtonEnabled=n.parent.isSubmitButtonEnabled,n.buildDOM(),n}n=t,(e=o).prototype=Object.create(n.prototype),e.prototype.constructor=e,G(e,n);var i=o.prototype;return i.buildDOM=function(){var t=this;this.$endscreenIntroductionTitleText=Q("<div/>",{class:"".concat(j,"-introduction-title-text"),id:"".concat(j,"-introduction-title-text")}),this.$closeButton=Q("<div>",{role:"button",class:"".concat(j,"-close-button"),tabindex:"0","aria-label":this.parent.l10n.close}),K(this.$closeButton,(function(){return t.parent.toggleEndscreen(!1)}));var e=Q("<div/>",{class:"".concat(j,"-introduction-title")}).append([this.$endscreenIntroductionTitleText,this.$closeButton]);this.$endscreenIntroductionText=Q("<div/>",{class:"".concat(j,"-introduction-text"),id:"".concat(j,"-introduction-text")}),this.isSubmitButtonEnabled&&(this.$submitButtonContainer=Q("<div/>",{class:"".concat(j,"-submit-button-container ").concat(Y)}),this.$submitButton=H5P.JoubelUI.createButton({class:"".concat(j,"-submit-button"),html:this.l10n.submitButton,appendTo:this.$submitButtonContainer,click:function(){return t.handleSubmit()}})),this.$endscreenOverviewTitle=Q("<div/>",{class:"".concat(j,"-overview-title")}).append(Q("<div/>",{class:"".concat(j,"-overview-title-answered-questions"),html:this.l10n.tableRowAnswered})).append(Q("<div/>",{class:"".concat(j,"-overview-title-score"),html:this.l10n.tableRowScore})),this.$endscreenBottomTable=Q("<div/>",{class:"".concat(j,"-overview-table")}),this.$endscreen=Q("<div/>",{class:j,role:"dialog","aria-labelledby":"".concat(j,"-introduction-title-text"),"aria-describedby":"".concat(j,"-introduction-text")}).append(Q("<div/>",{class:"".concat(j,"-introduction")}).append(Q("<div/>",{class:"".concat(j,"-star-symbol")})).append(Q("<div/>",{class:"".concat(j,"-introduction-container")}).append([e,this.$endscreenIntroductionText,this.$submitButtonContainer]))).append(Q("<div/>",{class:"".concat(j,"-overview")}).append(this.$endscreenOverviewTitle).append(this.$endscreenBottomTable))},i.handleSubmit=function(){var t=this;this.$submitButtonContainer.hasClass(Y)||(this.$submitButtonContainer.addClass(Y),this.$endscreenIntroductionText.html('<div class="'.concat(j,'-introduction-text-submitted">').concat(this.l10n.submitMessage,"</div>")),this.answered.forEach((function(e){if("completed"!==e.getLastXAPIVerb()&&"answered"!==e.getLastXAPIVerb()){var n=new H5P.XAPIEvent;n.data.statement=e.getXAPIData().statement,e.setLastXAPIVerb(n.getVerb()),t.trigger(n)}})),this.parent.triggerXAPIScored(this.parent.getUsersScore(),this.parent.getUsersMaxScore(),"completed"))},i.getDOM=function(){return this.$endscreen},i.buildTableRow=function(t,e,n,o){var i=this,s=_(n)&&_(o),r=s?this.l10n.tableRowSummaryWithScore:this.l10n.tableRowSummaryWithoutScore,a=this.parent.skippingPrevented()?" ".concat(j,"-no-link"):"",c=Q("<div/>",{class:"".concat(j,"-overview-table-row").concat(a),role:"row",tabIndex:0,"aria-label":r.replace("@score",n).replace("@total",o).replace("@question",e).replace("@minutes",Math.floor(t/60)).replace("@seconds",t%60)});return K(c,(function(){return i.jump(t)})),Q("<div/>",{class:"".concat(j,"-overview-table-row-time"),html:H5P.InteractiveVideo.humanizeTime(t),appendTo:c,"aria-hidden":!0}),Q("<div/>",{class:"".concat(j,"-overview-table-row-title"),html:e,appendTo:c,"aria-hidden":!0}),Q("<div/>",{class:"".concat(j,"-overview-table-row-score"),html:s?"".concat(n," / ").concat(o):this.l10n.answeredScore,appendTo:c,"aria-hidden":!0}),c},i.jump=function(t){this.parent.skippingPrevented()||(this.parent.seek(t),this.parent.toggleEndscreen(!1))},i.update=function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];this.answered=e.filter((function(t){return void 0!==t.getProgress()})).sort((function(t,e){return t.getDuration().from-e.getDuration().from})),this.$endscreenBottomTable.empty(),this.answered.forEach((function(e){var n=e.getDuration().from,o=t.getDescription(e),i=e.getInstance(),s=i.getScore?i.getScore():void 0,r=i.getMaxScore?i.getMaxScore():void 0;t.$endscreenBottomTable.append(t.buildTableRow(n,o,s,r))}));var n=this.answered.length;this.$endscreenIntroductionTitleText.html(this.l10n.title.replace("@answered",n)),0===n?this.$endscreenIntroductionText.html('<div class="'.concat(j,'-bold-text">').concat(this.l10n.informationNoAnswers,"</div>\n ").concat(this.isSubmitButtonEnabled?"<div>".concat(this.l10n.informationMustHaveAnswer,"<div>"):"")):this.$endscreenIntroductionText.html(this.isSubmitButtonEnabled?this.l10n.information.replace("@answered",n):this.l10n.informationOnSubmitButtonDisabled.replace("@answered",n)),this.isSubmitButtonEnabled&&n>0&&this.$submitButtonContainer.removeClass(Y)},i.getDescription=function(t){return"function"==typeof t.getInstance&&"function"==typeof t.getInstance().getTitle?t.getInstance().getTitle():t.getTitle()},i.focus=function(){!this.isSubmitButtonEnabled||this.$submitButtonContainer.hasClass(Y)?this.$closeButton.focus():this.$submitButton.focus()},o}(H5P.EventDispatcher);var J=H5P.jQuery;function Z(t,e,n){var o,i,s=this;H5P.EventDispatcher.call(s),s.contentId=e,s.contentData=n,s.instanceIndex=ot(),s.isSubmitButtonEnabled=void 0===n||void 0===n.isScoringEnabled||void 0===n.isReportingEnabled||n.isScoringEnabled||n.isReportingEnabled,s.bookmarksMenuId="interactive-video-"+this.contentId+"-bookmarks-chooser",s.endscreensMenuId="interactive-video-"+this.contentId+"-endscreens-chooser",s.qualityMenuId="interactive-video-"+this.contentId+"-quality-chooser",s.captionsMenuId="interactive-video-"+this.contentId+"-captions-chooser",s.playbackRateMenuId="interactive-video-"+this.contentId+"-playback-rate-chooser",s.popupMenuButtons=[],s.popupMenuChoosers=[],this.visibleInteractions=[],s.isMinimal=!1,s.options=J.extend({video:{textTracks:{videoTrack:[]}},assets:{}},t.interactiveVideo),s.options.video.startScreenOptions=s.options.video.startScreenOptions||{},s.qualities=void 0,s.options.video.startScreenOptions.title||(s.options.video.startScreenOptions.title="Interactive Video"),s.startScreenOptions=J.extend({hideStartTitle:!1,shortStartDescription:""},s.options.video.startScreenOptions),t.override&&(t.override.showSolutionButton||t.override.retryButton)&&(s.override={},t.override.showSolutionButton&&(s.override.enableSolutionsButton="on"===t.override.showSolutionButton),t.override.retryButton&&(s.override.enableRetry="on"===t.override.retryButton)),void 0!==t.override&&(s.showRewind10=void 0!==t.override.showRewind10&&t.override.showRewind10,s.showBookmarksmenuOnLoad=void 0!==t.override.showBookmarksmenuOnLoad&&t.override.showBookmarksmenuOnLoad,s.preventSkipping=t.override.preventSkipping||!1,s.deactivateSound=t.override.deactivateSound||!1),s.l10n=J.extend({interaction:"Interaction",play:"Play",pause:"Pause",mute:"Mute, currently unmuted",unmute:"Unmute, currently muted",quality:"Video quality",captions:"Captions",close:"Close",fullscreen:"Fullscreen",exitFullscreen:"Exit fullscreen",summary:"Open summary dialog",bookmarks:"Bookmarks",endscreen:"Submit Screen",endscreens:"Submit Screens",defaultAdaptivitySeekLabel:"Continue",continueWithVideo:"Continue with video",more:"More",playbackRate:"Playback rate",rewind10:"Rewind 10 seconds",navDisabled:"Navigation is disabled",sndDisabled:"Sound is disabled",requiresCompletionWarning:"You need to answer all the questions correctly before continuing.",back:"Back",hours:"Hours",minutes:"Minutes",seconds:"Seconds",currentTime:"Current time:",totalTime:"Total time:",singleInteractionAnnouncement:"Interaction appeared:",multipleInteractionsAnnouncement:"Multiple interactions appeared:",videoPausedAnnouncement:"Video was paused",content:"Content",answered:"@answered answered!"},t.l10n),s.l10n.play+=" (k)",s.l10n.pause+=" (k)",s.l10n.mute+=" (m)",s.l10n.unmute+=" (m)",n&&void 0!==n.previousState&&void 0!==n.previousState.progress&&void 0!==n.previousState.answers&&(s.previousState=n.previousState),s.menuitems=[],s.lastState=H5P.Video.ENDED,s.justVideo=!1;var r=navigator.userAgent.match(/(iPhone|iPod) OS (\d*)_/i);null!==r&&3===r.length&&(s.justVideo=r[2]<10),0===(o=s.previousState&&s.previousState.progress?Math.floor(s.previousState.progress):0)&&t.override&&t.override.startVideoAt&&(o=t.override.startVideoAt),s.interactionsProgress=[],s.previousState&&s.previousState.interactionsProgress&&(s.interactionsProgress=s.previousState.interactionsProgress),i=t.override&&!!t.override.loop,this.autoplay=t.override&&!!t.override.autoplay,s.$videoWrapper=J("<div>",{class:"h5p-video-wrapper"}),s.$controls=J("<div>",{role:"toolbar",class:"h5p-controls hidden"}),s.$read=J("<div/>",{"aria-live":"polite",class:"hidden-but-read"}),this.fontSize=16,this.width=640;var a=!1,c=!0,l=!1;if(s.isTask=!1,s.interactions=[],s.options.assets.interactions)for(var d=0;d<s.options.assets.interactions.length;d++)this.initInteraction(d);s.initialize=function(){if(!l){l=!0,s.on("resize",(function(){s.resize()}));var e=this.editor?[]:s.options.video.textTracks&&s.options.video.textTracks.videoTrack?s.options.video.textTracks.videoTrack:[];s.video=H5P.newRunnable({library:"H5P.Video 1.3",params:{sources:s.options.video.files,visuals:{poster:s.options.video.startScreenOptions.poster,controls:s.justVideo,fit:!1,disableRemotePlayback:!0},startAt:o,a11y:e}},s.contentId,void 0,void 0,{parent:s}),s.justVideo?s.video.on("loaded",(function(){s.trigger("resize")})):(s.video.on("containerLoaded",(function(){s.trigger("resize")})),s.video.on("loaded",(function(){a=!0,s.loaded()})),s.video.on("canplay",(function(){s.trigger("resize")})),s.video.on("error",(function(){s.removeSplash()})),s.video.on("stateChange",(function(e){!s.controls&&a&&(s.addControls(),s.trigger("resize"));var n=e.data;if(s.currentState!==Z.SEEKING)switch(n){case H5P.Video.ENDED:s.currentState=H5P.Video.ENDED,s.controls.$play.addClass("h5p-pause").attr("aria-label",s.l10n.play),s.timeUpdate(s.video.getCurrentTime()),s.updateCurrentTime(s.getDuration());var o=s.interactions.map((function(t){return t.getProgress()||0})).reduce((function(t,e){return t+e}),0);if(s.endscreensMap[s.getDuration()]&&o>0&&s.toggleEndscreen(!0),i){s.video.play();var r=t.override&&t.override.startVideoAt?t.override.startVideoAt:0;s.seek(r)}break;case H5P.Video.PLAYING:if(c){s.addQualityChooser(),s.addPlaybackRateChooser(),s.removeSplash(),s.startUpdatingBufferBar(),s.toggleBookmarksChooser(!1,{firstPlay:c}),s.toggleEndscreensChooser(!1,{firstPlay:c}),c=!1;var l=s.options.video.startScreenOptions.poster;l&&void 0!==l.path&&setTimeout((function(){s.trigger("resize")}),400)}s.currentState=H5P.Video.PLAYING,s.controls.$play.removeClass("h5p-pause").attr("aria-label",s.l10n.pause),s.controls.$play.is(":focus")&&(s.controls.$play.blur(),s.controls.$play.focus()),s.timeUpdate(s.video.getCurrentTime());break;case H5P.Video.PAUSED:s.currentState=H5P.Video.PAUSED,s.controls.$play.addClass("h5p-pause").attr("aria-label",s.l10n.play),s.focusInteraction?(s.focusInteraction.focusOnFirstTabbableElement(),delete s.focusInteraction):s.controls.$play.is(":focus")&&(s.controls.$play.blur(),s.controls.$play.focus()),s.timeUpdate(s.video.getCurrentTime());break;case H5P.Video.BUFFERING:s.currentState=H5P.Video.BUFFERING,s.removeSplash(),s.startUpdatingBufferBar()}})),s.video.on("qualityChange",(function(t){var e=t.data;if(s.controls&&s.controls.$qualityChooser){if("YouTube"===this.getHandlerName()){if(!s.qualities)return;var n=s.qualities.filter((function(e){return e.name===t.data}))[0];return void s.controls.$qualityChooser.find("li").attr("data-quality",t.data).html(n.label)}s.controls.$qualityChooser.find("li").attr("aria-checked","false").filter('[data-quality="'+e+'"]').attr("aria-checked","true")}})),s.video.on("playbackRateChange",(function(t){var e=t.data;s.controls&&s.controls.$playbackRateChooser&&s.controls.$playbackRateChooser.find("li").attr("aria-checked","false").filter('[playback-rate="'+e+'"]').attr("aria-checked","true")})),s.on("enterFullScreen",(function(){var t=this;s.hasFullScreen=!0,s.$container.parent(".h5p-content").css("height","100%"),s.controls.$fullscreen.addClass("h5p-exit").attr("aria-label",s.l10n.exitFullscreen),s.controls.$fullscreen.blur(),s.controls.$fullscreen.focus(),s.resizeInteractions(),setTimeout((function(){void 0!==t.bubbleEndscreen&&t.bubbleEndscreen.update()}),225)})),s.on("exitFullScreen",(function(){s.$container.hasClass("h5p-standalone")&&s.$container.hasClass("h5p-minimal")&&s.pause(),s.hasFullScreen=!1,s.$container.parent(".h5p-content").css("height",""),s.controls.$fullscreen.removeClass("h5p-exit").attr("aria-label",s.l10n.fullscreen),s.controls.$fullscreen.blur(),s.controls.$fullscreen.focus(),s.resizeInteractions(),s.dnb&&s.dnb.dialog&&!s.hasUncompletedRequiredInteractions()&&s.dnb.dialog.close()})),s.video.on("captions",(function(t){s.controls||(s.addControls(),s.trigger("resize")),s.setCaptionTracks(t.data)})),s.accessibility=new N(s.l10n))}},s.togglePlayPause=function(){var t=s.isDisabled(s.controls.$play);if(s.controls.$play.hasClass("h5p-pause")&&!t){var e=!screen||Math.min(screen.width,screen.height)<=s.width;H5P.fullscreenSupported&&!s.hasFullScreen&&e&&s.$container.hasClass("h5p-standalone")&&s.$container.hasClass("h5p-minimal")&&s.toggleFullScreen(),s.video.play(),s.toggleEndscreen(!1),s.closePopupMenus()}else s.video.pause();s.handleAnswered()},s.toggleMute=function(){var t=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],e=s.controls.$volume;s.deactivateSound||(e.hasClass("h5p-muted")?(e.removeClass("h5p-muted").attr("aria-label",s.l10n.mute),s.video.unMute()):(e.addClass("h5p-muted").attr("aria-label",s.l10n.unmute),s.video.mute()),t&&(e.blur(),e.focus()))}}Z.prototype=Object.create(H5P.EventDispatcher.prototype),Z.prototype.constructor=Z,Z.prototype.setCaptionTracks=function(t){var e=this;if(t.unshift(new H5P.Video.LabelValue("Off","off")),e.captionsTrackSelector)e.captionsTrackSelector.updateOptions(t);else{var n=this.editor?void 0:e.options.video.textTracks.defaultTrackLabel,o=t.reduce((function(t,e){return void 0===t&&n&&e.label===n?e:t}),void 0)||e.video.getCaptionsTrack();o||(o=t[0]),e.captionsTrackSelector=new C("captions",t,o,"menuitemradio",e.l10n,e.contentId),e.controls.$captionsButton=J(e.captionsTrackSelector.control),e.popupMenuButtons.push(e.controls.$captionsButton),e.controls.$volume?J(e.captionsTrackSelector.control).insertAfter(e.controls.$volume):J(e.captionsTrackSelector.control).insertAfter(e.controls.$qualityButton),J(e.captionsTrackSelector.popup).css(e.controlsCss).insertAfter(J(e.captionsTrackSelector.control)),e.popupMenuChoosers.push(J(e.captionsTrackSelector.popup)),J(e.captionsTrackSelector.overlayControl).insertAfter(e.controls.$qualityButtonMinimal),e.controls.$overlayButtons=e.controls.$overlayButtons.add(e.captionsTrackSelector.overlayControl),e.captionsTrackSelector.on("select",(function(t){e.video.setCaptionsTrack("off"===t.data.value?null:t.data)})),e.captionsTrackSelector.on("close",(function(){e.controls.$overlayButtons.removeClass("h5p-hide"),"true"===e.controls.$more.attr("aria-expanded")&&e.controls.$more.click(),e.resumeVideo()})),e.captionsTrackSelector.on("open",(function(){e.controls.$overlayButtons.addClass("h5p-hide"),e.closePopupMenus(e.controls.$captionsButton)})),e.minimalMenuKeyboardControls.insertElementAt(e.captionsTrackSelector.overlayControl,2)}},Z.prototype.getCurrentState=function(){var t=this;if(t.video&&t.video.play){var e={progress:t.video.getCurrentTime(),answers:[],interactionsProgress:t.interactions.slice().sort((function(t,e){return t.getDuration().from-e.getDuration().from})).map((function(t){return t.getProgress()}))};if(void 0!==t.interactions)for(var n=0;n<t.interactions.length;n++)e.answers[n]=t.interactions[n].getCurrentState();return e.progress?e:t.previousState&&t.previousState.progress?t.previousState:void 0}},Z.prototype.removeSplash=function(){void 0!==this.$splash&&(this.$splash.remove(),delete this.$splash)},Z.prototype.attach=function(t){var e=this;this.$container=t,this.initialize(),void 0!==this.isRoot&&this.isRoot()&&this.setActivityStarted(),t.addClass("h5p-interactive-video").html(""),this.$videoWrapper.appendTo(t),this.$controls.appendTo(t);var n=this.hasMainSummary();if(this.interactions&&this.interactions.forEach((function(t){t.reCreate(),t.isAnswerable()&&(n=!0)})),this.hasStar=this.editor||void 0!==this.options.assets.endscreens&&this.options.assets.endscreens.length&&n,this.attachVideo(this.$videoWrapper),this.justVideo)return this.$videoWrapper.find("video").css("minHeight","200px"),void t.children(":not(.h5p-video-wrapper)").remove();this.$read.appendTo(t),this.readText=null,void 0===this.editor?(this.dnb=new H5P.DragNBar([],this.$videoWrapper,this.$container,{disableEditor:!0}),this.dnb.dialog.on("open",(function(){e.lastState=e.currentState,e.currentState!==H5P.Video.PAUSED&&e.currentState!==H5P.Video.ENDED&&e.video.pause()})),this.dnb.dialog.on("close",(function(){e.restoreTabIndexes(),e.lastState!==H5P.Video.PAUSED&&e.lastState!==H5P.Video.ENDED&&e.video.play(),e.handleAnswered()}))):e.on("dnbEditorReady",(function(){e.dnb=e.editor.dnb,e.dnb.dialog.disableOverlay=!0})),this.video.pressToPlay||(this.currentState===Z.LOADED?this.addControls():this.addSplash()),t.attr("tabindex","-1");var o=function(t,n){var o=e.controls&&e.controls[n]?e.controls[n]:void 0;return!(void 0!==o&&"-1"!==o.attr("tabindex"))||"INPUT"===t.target.nodeName};I(t,[{key:T.M}],(function(t){o(t,"$volume")||e.toggleMute(!1)})),I(t,[{key:T.K}],(function(t){if(!o(t,"$play"))if(e.hasUncompletedRequiredInteractions()){var n=J(document.activeElement);e.showWarningMask().find(".h5p-button-back").click((function(){return n.focus()}))}else e.togglePlayPause()})),this.$container.append(J(this.accessibility.getInteractionAnnouncer())),this.currentState=Z.ATTACHED,this.autoplay&&e.video.play()},Z.prototype.attachVideo=function(t){this.video.attach(t),this.justVideo||(this.$overlay=J('<div class="h5p-overlay h5p-ie-transparent-background"></div>').appendTo(t))},Z.prototype.addSplash=function(){var t=this;void 0!==this.editor||this.video.pressToPlay||!this.video.play||this.$splash||(this.$splash=J('<div class="h5p-splash-wrapper"><div class="h5p-splash-outer"><div class="h5p-splash" role="button" tabindex="0"><div class="h5p-splash-main"><div class="h5p-splash-main-outer"><div class="h5p-splash-main-inner"><div class="h5p-splash-play-icon" aria-label="'+this.l10n.play+'"></div><div class="h5p-splash-title">'+this.options.video.startScreenOptions.title+'</div></div></div></div><div class="h5p-splash-footer"><div class="h5p-splash-footer-holder"><div class="h5p-splash-description">'+t.startScreenOptions.shortStartDescription+"</div></div></div></div></div></div>").click((function(){t.video.play()})).appendTo(this.$overlay).find(".h5p-interaction-button").click((function(){return!1})).end(),J(".h5p-splash",this.$splash).keydown((function(e){P(e)&&(t.video.play(),e.preventDefault(),t.$controls.find(".h5p-play").focus())})),void 0!==this.startScreenOptions.shortStartDescription&&this.startScreenOptions.shortStartDescription.length||this.$splash.addClass("no-description"),this.startScreenOptions.hideStartTitle&&this.$splash.addClass("no-title"))},Z.prototype.getDuration=function(){return void 0===this.duration&&(this.duration=this.video.getDuration()),this.duration},Z.prototype.addControls=function(){var t=this;this.addSplash(),this.attachControls(this.$controls.removeClass("hidden"));var e=this.getDuration(),n=Z.humanizeTime(e),o=Z.formatTimeForA11y(e,this.l10n);if(this.controls.$totalTime.find(".human-time").html(n),this.controls.$totalTime.find(".hidden-but-read").html("".concat(this.l10n.totalTime," ").concat(o)),this.controls.$slider.slider("option","max",e),this.bookmarkMenuKeyboardControls=new b([new g]),this.bookmarkMenuKeyboardControls.on("close",(function(){return t.toggleBookmarksChooser(!1)})),this.endscreenMenuKeyboardControls=new b([new g]),this.endscreenMenuKeyboardControls.on("close",(function(){return t.toggleEndscreensChooser(!1)})),this.addSliderInteractions(),this.addBookmarks(),this.options.assets.endscreens&&this.options.assets.endscreens.length>0)for(var i=!1,s=this.getDuration(),r=this.options.assets.endscreens.length-1;r>=0;r--){this.options.assets.endscreens[r].time>s&&(i?(this.options.assets.endscreens.splice(r,1),this.trigger("endscreensChanged",{index:r,number:-1})):(this.options.assets.endscreens[r].time=s,this.options.assets.endscreens[r].label=Z.humanizeTime(s)+" "+this.l10n.endscreen,this.trigger("endscreensChanged",{index:r,number:1}),i=!0))}this.addEndscreenMarkers(),this.addBubbles(),this.trigger("controls")},Z.prototype.loaded=function(){var t=this.getDuration();if(this.oneSecondInPercentage=100/t,t=Math.floor(t),void 0!==this.editor){var e=et("interactions",this.editor.field.fields),n=et("duration",e.field.fields).fields;n[0].max=n[1].max=t,n[0].min=n[1].min=0;for(var o=et("adaptivity",e.field.fields).fields,i=0;i<o.length;i++)o[i].fields&&(et("seekTo",o[i].fields).max=t)}if(this.options.assets.interactions&&this.options.assets.interactions.length>0)for(i=this.options.assets.interactions.length-1;i>=0;i--)if(this.options.assets.interactions[i].duration.to>t){var s=this.options.assets.interactions[i].duration.to-this.options.assets.interactions[i].duration.from,r=t-s<=0?0:t-s;this.options.assets.interactions[i].duration.from=r,this.options.assets.interactions[i].duration.to=t}if(this.hasMainSummary()){var a=t-this.options.summary.displayAt;a<0&&(a=0),void 0===this.options.assets.interactions&&(this.options.assets.interactions=[]),this.options.assets.interactions.push({action:this.options.summary.task,x:80,y:80,duration:{from:a,to:t},displayType:"button",bigDialog:!0,className:"h5p-summary-interaction h5p-end-summary",label:"<p>"+this.l10n.summary+"</p>",mainSummary:!0}),this.initInteraction(this.options.assets.interactions.length-1)}this.currentState===Z.ATTACHED&&(this.video.pressToPlay||this.addControls(),this.trigger("resize")),this.currentState=Z.LOADED},Z.prototype.initInteraction=function(t){var e,n=this,o=n.options.assets.interactions[t];if(n.override){var i={};o.adaptivity&&o.adaptivity.requireCompletion&&(i.enableRetry=!0),H5P.jQuery.extend(o.action.params.behaviour,n.override,i)}void 0!==n.previousState&&void 0!==n.previousState.answers&&null!==n.previousState.answers[t]&&(e=n.previousState.answers[t]);var s=new L(o,n,e);return s.on("display",(function(t){var e=t.data;e.appendTo(n.$overlay),s.repositionToWrapper(n.$videoWrapper);var o=void 0!==n.video.pressToPlay;nt(o?100:null,(function(){(n.currentState===H5P.Video.PLAYING||n.currentState===H5P.Video.BUFFERING)&&s.pause()&&(n.focusInteraction||(n.focusInteraction=s),n.video.pause())})),n.seekingTo&&(n.seekingTo=void 0,e.focus()),setTimeout((function(){s.positionLabel(n.$videoWrapper.width())}),0),n.toggleEndscreen(!1)})),s.on("hide",(function(){n.handleAnswered()})),s.on("xAPI",(function(t){var e=t.getVerb();"interacted"===e&&this.setProgress(L.PROGRESS_INTERACTED),-1!==J.inArray(e,["completed","answered"])&&t.setVerb("answered"),void 0===t.data.statement.context.extensions&&(t.data.statement.context.extensions={}),t.data.statement.context.extensions["http://id.tincanapi.com/extension/ending-point"]="PT"+Math.floor(n.video.getCurrentTime())+"S"})),n.interactions.push(s),s},Z.prototype.handleAnswered=function(){var t=this;t.interactions.forEach((function(e){e.getProgress()===L.PROGRESS_INTERACTED&&(e.setProgress(L.PROGRESS_ANSWERED),e.$menuitem.addClass("h5p-interaction-answered"),t.hasStar&&(t.playStarAnimation(),t.playBubbleAnimation(t.l10n.answered.replace("@answered","<strong>"+t.getAnsweredTotal()+"</strong>")),t.endscreen.update(t.interactions)))}))},Z.prototype.getAnsweredTotal=function(){return this.interactions.filter((function(t){return t.getProgress()===L.PROGRESS_ANSWERED})).length},Z.prototype.hasMainSummary=function(){var t=this.options.summary;return!(void 0===t||void 0===t.displayAt||void 0===t.task||void 0===t.task.params||void 0===t.task.params.summaries||!t.task.params.summaries.length||void 0===t.task.params.summaries[0].summary||!t.task.params.summaries[0].summary.length)},Z.prototype.addSliderInteractions=function(){var t=this,e=this;this.controls.$interactionsContainer.children().remove(),this.interactionKeyboardControls.elements=[],H5P.jQuery.extend([],this.interactions).sort((function(t,e){return t.getDuration().from-e.getDuration().from})).forEach((function(n){var o=n.addDot();e.menuitems.push(o),void 0===e.previousState&&e.interactionsProgress.push(void 0),e.interactionsProgress[e.menuitems.length-1]===L.PROGRESS_ANSWERED&&(n.setProgress(e.interactionsProgress[e.menuitems.length-1]),o.addClass("h5p-interaction-answered")),void 0!==o&&(o.appendTo(t.controls.$interactionsContainer),t.preventSkipping||t.interactionKeyboardControls.addElement(o.get(0)))})),e.interactionKeyboardControls.on("afterNextElement",(function(e){return t.handleInteractionTabIndex(e)})),e.interactionKeyboardControls.on("afterPreviousElement",(function(e){return t.handleInteractionTabIndex(e)}))},Z.prototype.handleInteractionTabIndex=function(t){t.element.removeAttribute("tabindex")},Z.prototype.closePopupMenus=function(t){this.popupMenuButtons.forEach((function(e){void 0!==e&&e!==t&&void 0===e.attr("aria-disabled")&&"true"===e.attr("aria-expanded")&&e.click()}))},Z.prototype.displayBookmarks=function(){return this.options.assets.bookmarks&&this.options.assets.bookmarks.length&&!this.preventSkipping},Z.prototype.addBookmarks=function(){if(this.bookmarksMap={},void 0!==this.options.assets.bookmarks&&!this.preventSkipping)for(var t=0;t<this.options.assets.bookmarks.length;t++)this.addBookmark(t)},Z.prototype.addEndscreenMarkers=function(){if(this.endscreensMap={},void 0!==this.options.assets.endscreens)for(var t=0;t<this.options.assets.endscreens.length;t++)this.addEndscreen(t);this.editor&&this.editor.freshVideo&&(this.endscreensMap[this.getDuration()]||this.editor.addEndscreen(this.getDuration(),!0))},Z.prototype.addBubbles=function(){var t=this;!this.editor&&this.hasStar&&(this.bubbleScore=new U(this.$star),this.endscreen=new X(this,{l10n:{title:this.l10n.endcardTitle,information:this.l10n.endcardInformation,informationOnSubmitButtonDisabled:this.l10n.endcardInformationOnSubmitButtonDisabled,informationNoAnswers:this.l10n.endcardInformationNoAnswers,informationMustHaveAnswer:this.l10n.endcardInformationMustHaveAnswer,submitButton:this.l10n.endcardSubmitButton,submitMessage:this.l10n.endcardSubmitMessage,tableRowAnswered:this.l10n.endcardTableRowAnswered,tableRowScore:this.l10n.endcardTableRowScore,answeredScore:this.l10n.endcardAnsweredScore,tableRowSummary:this.l10n.endCardTableRowSummary,tableRowSummaryWithoutScore:this.l10n.endCardTableRowSummaryWithoutScore}}),this.endscreen.update(this.interactions),this.bubbleEndscreen=new U(this.$star,{content:this.endscreen.getDOM(),focus:function(){return t.endscreen.focus()},maxWidth:"auto",style:"h5p-interactive-video-bubble-endscreen",mode:"full"}))},Z.prototype.toggleBookmarksChooser=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{initialLoad:!1,keepStopped:!1,firstPlay:!1};if(this.controls.$bookmarksButton){t=void 0===t?!this.controls.$bookmarksChooser.hasClass("h5p-show"):t;var n=this.controls.$bookmarksChooser.hasClass("h5p-show");this.controls.$minimalOverlay.toggleClass("h5p-show",t),this.controls.$minimalOverlay.find(".h5p-minimal-button").toggleClass("h5p-hide",t),this.controls.$bookmarksButton.attr("aria-expanded",!!t&&"true"),this.controls.$more.attr("aria-expanded",t?"true":"false"),this.controls.$bookmarksChooser.css({maxHeight:t?this.controlsCss.maxHeight:"32px"}).toggleClass("h5p-show",t).toggleClass("h5p-transitioning",t||n)}t?(this.closePopupMenus(this.controls.$bookmarksButton),this.showBookmarksmenuOnLoad&&e.initialLoad||this.controls.$bookmarksChooser.find('[tabindex="0"]').first().focus(),this.editor&&(this.interruptVideo(),this.updateChooserTime(this.controls.$bookmarksChooser,".h5p-add-bookmark"))):e.firstPlay||(this.editor&&!e.keepStopped&&this.resumeVideo(),this.controls.$bookmarksChooser.hasClass("h5p-show")||this.controls.$bookmarksButton.focus())},Z.prototype.toggleEndscreensChooser=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{keepStopped:!1,firstPlay:!1};if(this.editor&&this.controls.$endscreensButton){t=void 0===t?!this.controls.$endscreensChooser.hasClass("h5p-show"):t;var n=this.controls.$endscreensChooser.hasClass("h5p-show");this.controls.$minimalOverlay.toggleClass("h5p-show",t),this.controls.$minimalOverlay.find(".h5p-minimal-button").toggleClass("h5p-hide",t),this.controls.$endscreensButton.attr("aria-expanded",t?"true":"false").toggleClass("h5p-star-active-editor",t),this.controls.$more.attr("aria-expanded",t?"true":"false");var o=-10+Math.min(0,this.$container.outerWidth()-this.controls.$endscreensChooser.parent().offset().left-this.controls.$endscreensChooser.outerWidth())+"px";this.controls.$endscreensChooser.css({maxHeight:t?this.controlsCss.maxHeight:"32px"}).css({left:o}).toggleClass("h5p-show",t).toggleClass("h5p-transitioning",t||n)}t?(this.closePopupMenus(this.controls.$endscreensButton),this.editor&&(this.interruptVideo(),this.updateChooserTime(this.controls.$endscreensChooser,".h5p-add-endscreen")),this.controls.$endscreensChooser.find('[tabindex="0"]').first().focus()):e.firstPlay||(this.editor&&!e.keepStopped&&this.resumeVideo(),this.controls.$endscreensChooser.hasClass("h5p-show")||this.controls.$endscreensButton.focus())},Z.prototype.updateChooserTime=function(t,e){var n=t.find(e);n.html(n.data("default").replace("@timecode",Z.humanizeTime(this.video.getCurrentTime())))},Z.prototype.interruptVideo=function(){this.currentState===H5P.Video.PLAYING&&(this.interruptedTemporarily=!0,this.video.pause())},Z.prototype.resumeVideo=function(t){if(!t){if(!this.interruptedTemporarily)return;if(this.popupMenuChoosers.some((function(t){return t.hasClass("h5p-show")})))return}this.interruptedTemporarily=!1,this.video.play()},Z.prototype.toggleEndscreen=function(t){!this.editor&&this.hasStar&&t!==this.bubbleEndscreen.isActive()&&((t=void 0===t?!this.bubbleEndscreen.isActive():t)?(this.disableTabIndexes(".h5p-interactive-video-endscreen"),this.stateBeforeEndscreen=this.currentState,this.video.pause()):(this.restoreTabIndexes(),this.controls.$endscreensButton.focus(),this.stateBeforeEndscreen===H5P.Video.PLAYING&&(this.video.play(),this.stateBeforeEndscreen=void 0)),this.controls.$endscreensButton.toggleClass("h5p-star-active",t),this.bubbleEndscreen.toggle(t,!0))},Z.prototype.showPreventSkippingMessage=function(t){var e=this;e.preventSkippingWarningTimeout||(e.$preventSkippingMessage||(e.$preventSkippingMessage=J("<div>",{class:"h5p-prevent-skipping-message",appendTo:e.controls.$bookmarksContainer}),e.$preventSkippingMessage=J("<div>",{class:"h5p-prevent-skipping-message",appendTo:e.controls.$endscreensContainer}),e.$preventSkippingMessageText=J("<div>",{class:"h5p-prevent-skipping-message-text",html:e.l10n.navDisabled,appendTo:e.$preventSkippingMessage}),e.$preventSkippingMessageTextA11y=J("<div>",{class:"hidden-but-read",html:e.l10n.navDisabled,appendTo:e.controls.$slider})),e.$preventSkippingMessage.css("left",t),setTimeout((function(){e.$preventSkippingMessage.addClass("h5p-show").attr("aria-hidden","false")}),0),e.preventSkippingWarningTimeout=setTimeout((function(){e.$preventSkippingMessage.removeClass("h5p-show").attr("aria-hidden","true"),setTimeout((function(){e.preventSkippingWarningTimeout=void 0}),500)}),2e3))},Z.prototype.onBookmarkSelect=function(t,e){var n=this;n.currentState!==H5P.Video.PLAYING&&(t.mouseover().mouseout(),setTimeout((function(){n.timeUpdate(n.video.getCurrentTime())}),0)),"true"===n.controls.$more.attr("aria-expanded")&&n.$container.hasClass("h5p-minimal")?n.controls.$more.click():n.toggleBookmarksChooser(!1),n.video.play(),n.seek(e.time);var o=Z.formatTimeForA11y(e.time,n.l10n);setTimeout((function(){return n.read("".concat(n.l10n.currentTime," ").concat(o))}),150)},Z.prototype.onEndscreenSelect=function(t,e){var n=this;n.currentState!==H5P.Video.PLAYING&&(t.mouseover().mouseout(),setTimeout((function(){n.timeUpdate(n.video.getCurrentTime())}),0)),"true"===n.controls.$more.attr("aria-expanded")&&n.$container.hasClass("h5p-minimal")?n.controls.$more.click():n.toggleEndscreensChooser(!1),n.video.play(),n.seek(e.time);var o=Z.formatTimeForA11y(e.time,n.l10n);setTimeout((function(){return n.read("".concat(n.l10n.currentTime," ").concat(o))}),150)},Z.prototype.addBookmark=function(t,e){var n=this,o=n.options.assets.bookmarks[t];void 0===e&&(e=Math.floor(10*o.time)/10);var i=n.bookmarksMap[e]=J('<div class="h5p-bookmark" style="left:'+o.time*n.oneSecondInPercentage+'%"><div class="h5p-bookmark-label"><div class="h5p-bookmark-text">'+o.label+"</div></div></div>").appendTo(n.controls.$bookmarksContainer).data("id",t).hover((function(){void 0!==n.bookmarkTimeout&&clearTimeout(n.bookmarkTimeout),n.controls.$bookmarksContainer.children(".h5p-show").removeClass("h5p-show"),i.addClass("h5p-show")}),(function(){n.bookmarkTimeout=setTimeout((function(){i.removeClass("h5p-show")}),n.editor?1e3:2e3)}));i.find(".h5p-bookmark-label").css("maxWidth",parseInt(n.controls.$slider.parent().css("marginRight"))-35),void 0===n.controls.$bookmarksList&&(n.controls.$bookmarksList=J('<ul role="menu"></ul>').insertAfter(n.controls.$bookmarksChooser.find("h2")));var s=J('<li role="menuitem" aria-describedby="'.concat(n.bookmarksMenuId,'">').concat(o.label,"</li>")).click((function(){return n.onBookmarkSelect(i,o)})).keydown((function(t){P(t)&&n.onBookmarkSelect(i,o),t.stopPropagation()}));n.bookmarkMenuKeyboardControls.addElement(s.get(0));var r=n.controls.$bookmarksList.children(":eq("+t+")");return 0!==r.length?s.insertBefore(r):s.appendTo(n.controls.$bookmarksList),n.on("bookmarksChanged",(function(o){var r=o.data.index,a=o.data.number;r===t&&a<0?(s.remove(),delete n.bookmarksMap[e]):t>=r&&(t+=a,i.data("id",t))})),n.trigger("bookmarkAdded",{bookmark:i}),i},Z.prototype.addEndscreen=function(t,e){var n,o=this,i=o.options.assets.endscreens[t];if(void 0===e&&(e=Math.floor(10*i.time)/10),!this.editor)return o.getDuration()-e<1&&(e=o.getDuration()),void(n=o.endscreensMap[e]=!0);n=o.endscreensMap[e]=J('<div class="h5p-endscreen" style="left:'+i.time*o.oneSecondInPercentage+'%"><div class="h5p-endscreen-label"><div class="h5p-endscreen-text">'+i.label+"</div></div></div>").appendTo(o.controls.$endscreensContainer).data("id",t).hover((function(){void 0!==o.endscreenTimeout&&clearTimeout(o.endscreenTimeout),o.controls.$endscreensContainer.children(".h5p-show").removeClass("h5p-show"),n.addClass("h5p-show")}),(function(){o.endscreenTimeout=setTimeout((function(){n.removeClass("h5p-show")}),o.editor?1e3:2e3)})),o.editor&&(o.endscreenTimeout=setTimeout((function(){n.removeClass("h5p-show")}),1e3)),n.find(".h5p-endscreen-label").css("maxWidth",parseInt(o.controls.$slider.parent().css("marginRight"))-35),void 0===o.controls.$endscreensList&&(o.controls.$endscreensList=J('<ul role="menu"></ul>').insertAfter(o.controls.$endscreensChooser.find("h2")));var s=J('<li role="menuitem" aria-describedby="'.concat(o.endscreensMenuId,'">').concat(i.label,"</li>")).click((function(){return o.onEndscreenSelect(n,i)})).keydown((function(t){P(t)&&o.onEndscreenSelect(n,i),t.stopPropagation()}));o.endscreenMenuKeyboardControls.addElement(s.get(0));var r=o.controls.$endscreensList.children(":eq("+t+")");return 0!==r.length?s.insertBefore(r):s.appendTo(o.controls.$endscreensList),o.on("endscreensChanged",(function(i){var r=i.data.index,a=i.data.number;r===t&&a<0?(s.remove(),delete o.endscreensMap[e]):t>=r&&(t+=a,n.data("id",t))})),o.trigger("endscreenAdded",{endscreen:n}),n},Z.prototype.attachControls=function(t){var e=this,n=J("<div/>",{class:"h5p-controls-left",appendTo:t}),o=J("<div/>",{class:"h5p-control h5p-slider",appendTo:t});e.hasStar&&(e.$star=J("<div/>",{class:"h5p-control h5p-star",appendTo:t}),e.$starBar=J("<div/>",{class:"h5p-control h5p-star h5p-star-bar",appendTo:e.$star}),J("<div/>",{class:"h5p-control h5p-star h5p-star-background",appendTo:e.$star}),e.$starAnimation=J("<div/>",{class:"h5p-control h5p-star h5p-star-animation h5p-star-animation-inactive",appendTo:e.$star}));var i=J("<div/>",{class:"h5p-controls-right",appendTo:t});e.preventSkipping&&e.setDisabled(o),e.controls={},e.controls.$play=e.createButton("play","h5p-control h5p-pause",n,e.togglePlayPause),e.showRewind10&&(e.controls.$rewind10=e.createButton("rewind10","h5p-control",n,(function(){if(e.video.getCurrentTime()>0){var t=Math.max(e.video.getCurrentTime()-10,0);e.seek(t),e.currentState===H5P.Video.PAUSED&&e.timeUpdate(t),e.currentState===H5P.Video.ENDED&&e.video.play()}})));var s=function(t,n){return function(){var o=e.controls[t],i=e.controls[n],s="true"===o.attr("aria-disabled"),r="true"===o.attr("aria-expanded");s||(r?(o.attr("aria-expanded","false"),i.hasClass("h5p-show")||o.focus(),i.removeClass("h5p-show"),function(){var t=e.$container.hasClass("h5p-minimal")&&"true"===e.controls.$more.attr("aria-expanded");t&&e.controls.$more.click()}(),e.resumeVideo()):(o.attr("aria-expanded","true"),i.addClass("h5p-show"),i.find('[tabindex="0"]').focus(),e.closePopupMenus(o)))}},r=e.editor||e.displayBookmarks();if(r&&(e.controls.$bookmarksChooser=H5P.jQuery("<div/>",{class:"h5p-chooser h5p-bookmarks",role:"dialog",html:'<h2 id="'.concat(e.bookmarksMenuId,'">').concat(e.l10n.bookmarks,"</h2>")}),e.popupMenuChoosers.push(e.controls.$bookmarksChooser),e.controls.$bookmarksChooser.append(J("<span>",{role:"button",class:"h5p-chooser-close-button",tabindex:"0","aria-label":e.l10n.close,click:function(){return e.toggleBookmarksChooser()},keydown:function(t){P(t)&&(e.toggleBookmarksChooser(),t.preventDefault())}})),e.showRewind10&&e.controls.$bookmarksChooser.addClass("h5p-rewind-displacement"),e.controls.$bookmarksButton=e.createButton("bookmarks","h5p-control",n,(function(){e.toggleBookmarksChooser()})),e.controls.$bookmarksButton.attr("aria-haspopup","true"),e.controls.$bookmarksButton.attr("aria-expanded","false"),e.controls.$bookmarksChooser.insertAfter(e.controls.$bookmarksButton),e.controls.$bookmarksChooser.bind("transitionend",(function(){e.controls.$bookmarksChooser.removeClass("h5p-transitioning")})),e.popupMenuButtons.push(e.controls.$bookmarksButton)),e.hasStar){var a=e.editor?"star h5p-star-foreground-editor":"star h5p-star-foreground",c=e.editor?function(){return e.toggleEndscreensChooser()}:function(){return e.toggleEndscreen()};e.controls.$endscreensButton=e.createButton(a,"h5p-control",e.$star,c),e.controls.$endscreensButton.attr("aria-label",e.l10n.summary),e.popupMenuButtons.push(e.controls.$endscreensButton)}e.editor&&(e.controls.$endscreensChooser=H5P.jQuery("<div/>",{class:"h5p-chooser h5p-endscreens",role:"dialog",html:'<h2 id="'.concat(e.endscreensMenuId,'">').concat(e.l10n.endscreens,"</h2>")}),e.popupMenuChoosers.push(e.controls.$endscreensChooser),e.controls.$endscreensChooser.append(J("<span>",{role:"button",class:"h5p-chooser-close-button",tabindex:"0","aria-label":e.l10n.close,click:function(){return e.toggleEndscreensChooser()},keydown:function(t){P(t)&&(e.toggleEndscreensChooser(),t.preventDefault())}})),e.hasStar&&(e.controls.$endscreensButton.attr("aria-haspopup","true").attr("aria-expanded","false"),e.controls.$endscreensChooser.insertAfter(e.controls.$endscreensButton).bind("transitionend",(function(){e.controls.$endscreensChooser.removeClass("h5p-transitioning")}))));var l='<time class="h5p-current">\n <span class="hidden-but-read"></span>\n <span class="human-time" aria-hidden="true">0:00</span>\n </time>',d=J('<div class="h5p-control h5p-simple-time">'.concat(l,"</div>")).appendTo(n);e.controls.$currentTimeSimple=d.find(".human-time"),e.controls.$currentTimeA11ySimple=d.find(".hidden-but-read");var u=Z.formatTimeForA11y(0,e.l10n),h=J('<div class="h5p-control h5p-time">\n '.concat(l,'\n <span aria-hidden="true"> / </span>\n <time class="h5p-total">\n <span class="hidden-but-read">').concat(e.l10n.totalTime," ").concat(u,'</span>\n <span class="human-time" aria-hidden="true">0:00</span>\n </time>\n </div>')).appendTo(i),p=h.find(".h5p-current");e.controls.$currentTime=p.find(".human-time"),e.controls.$currentTimeA11y=p.find(".hidden-but-read"),e.controls.$totalTime=h.find(".h5p-total"),e.updateCurrentTime(0);var m=function(){e.controls.$minimalOverlay.removeClass("h5p-show"),e.controls.$more.attr("aria-expanded","false"),e.controls.$more.focus(),setTimeout((function(){e.controls.$overlayButtons.removeClass("h5p-hide")}),150)};e.controls.$more=e.createButton("more","h5p-control",i,(function(){"true"===e.controls.$more.attr("aria-expanded")?m():(e.controls.$minimalOverlay.addClass("h5p-show"),e.controls.$more.attr("aria-expanded","true"),e.removeSplash(),setTimeout((function(){e.controls.$minimalOverlay.find('[tabindex="0"]').focus()}),150)),e.closePopupMenus()})),e.controls.$playbackRateChooser=H5P.jQuery("<div/>",{class:"h5p-chooser h5p-playbackRate",role:"dialog",html:'<h2 id="'.concat(e.playbackRateMenuId,'">').concat(e.l10n.playbackRate,"</h2>")}),e.popupMenuChoosers.push(e.controls.$playbackRateChooser);var v=function(){e.isMinimal?e.controls.$more.click():e.controls.$playbackRateButton.click(),e.resumeVideo()};e.controls.$playbackRateChooser.append(J("<span>",{role:"button",class:"h5p-chooser-close-button",tabindex:"0","aria-label":e.l10n.close,click:function(){return v()},keydown:function(t){P(t)&&(v(),t.preventDefault())}})),e.controls.$playbackRateButton=e.createButton("playbackRate","h5p-control",i,s("$playbackRateButton","$playbackRateChooser")),e.popupMenuButtons.push(e.controls.$playbackRateButton),e.setDisabled(e.controls.$playbackRateButton),e.controls.$playbackRateButton.attr("aria-haspopup","true"),e.controls.$playbackRateButton.attr("aria-expanded","false"),e.controls.$playbackRateChooser.insertAfter(e.controls.$playbackRateButton),-1===navigator.userAgent.indexOf("Android")&&-1===navigator.userAgent.indexOf("iPad")&&(e.controls.$volume=e.createButton("mute","h5p-control",i,e.toggleMute),e.deactivateSound&&(e.controls.$volume.addClass("h5p-muted").attr("aria-label",e.l10n.sndDisabled),e.setDisabled(e.controls.$volume))),e.deactivateSound&&e.video.mute(),e.video.isMuted()&&e.controls.$volume.addClass("h5p-muted").attr("aria-label",e.l10n.sndDisabled),e.controls.$qualityChooser=H5P.jQuery("<div/>",{class:"h5p-chooser h5p-quality",role:"dialog",html:'<h2 id="'.concat(e.qualityMenuId,'">').concat(e.l10n.quality,"</h2>")}),e.popupMenuChoosers.push(e.controls.$qualityChooser);var f=function(){e.isMinimal?e.controls.$more.click():e.controls.$qualityButton.click(),e.resumeVideo()};e.controls.$qualityChooser.append(J("<span>",{role:"button",class:"h5p-chooser-close-button",tabindex:"0","aria-label":e.l10n.close,click:function(){return f()},keydown:function(t){P(t)&&(f(),t.preventDefault())}})),e.controls.$qualityButton=e.createButton("quality","h5p-control",i,s("$qualityButton","$qualityChooser")),e.popupMenuButtons.push(e.controls.$qualityButton),e.setDisabled(e.controls.$qualityButton),e.controls.$qualityButton.attr("aria-haspopup","true"),e.controls.$qualityButton.attr("aria-expanded","false"),e.controls.$qualityChooser.insertAfter(e.controls.$qualityButton),e.editor||!1===H5P.fullscreenSupported||(e.controls.$fullscreen=e.createButton("fullscreen","h5p-control",i,(function(){e.toggleFullScreen()}))),e.controls.$minimalOverlay=H5P.jQuery("<div/>",{class:"h5p-minimal-overlay",appendTo:e.$container});var y=H5P.jQuery("<div/>",{role:"menu",class:"h5p-minimal-wrap",appendTo:e.controls.$minimalOverlay});e.minimalMenuKeyboardControls=new b([new g]),e.minimalMenuKeyboardControls.on("close",(function(){return m()})),e.controls.$overlayButtons=H5P.jQuery([]),r&&(e.controls.$bookmarkButtonMinimal=e.createButton("bookmarks","h5p-minimal-button",y,(function(){e.controls.$overlayButtons.addClass("h5p-hide"),e.toggleBookmarksChooser(!0)}),!0),e.controls.$bookmarkButtonMinimal.attr("role","menuitem"),e.controls.$bookmarkButtonMinimal.attr("tabindex","-1"),e.controls.$overlayButtons=e.controls.$overlayButtons.add(e.controls.$bookmarkButtonMinimal),e.minimalMenuKeyboardControls.addElement(e.controls.$bookmarkButtonMinimal.get(0))),e.controls.$qualityButtonMinimal=e.createButton("quality","h5p-minimal-button",y,(function(){e.isDisabled(e.controls.$qualityButton)||(e.controls.$overlayButtons.addClass("h5p-hide"),e.controls.$qualityButton.click())}),!0),e.setDisabled(e.controls.$qualityButtonMinimal),e.controls.$qualityButtonMinimal.attr("role","menuitem"),e.controls.$overlayButtons=e.controls.$overlayButtons.add(e.controls.$qualityButtonMinimal),e.minimalMenuKeyboardControls.addElement(e.controls.$qualityButtonMinimal.get(0)),e.controls.$playbackRateButtonMinimal=e.createButton("playbackRate","h5p-minimal-button",y,(function(){e.isDisabled(e.controls.$playbackRateButton)||(e.controls.$overlayButtons.addClass("h5p-hide"),e.controls.$playbackRateButton.click())}),!0),e.controls.$playbackRateButtonMinimal.attr("role","menuitem"),e.setDisabled(e.controls.$playbackRateButtonMinimal),e.controls.$overlayButtons=e.controls.$overlayButtons.add(e.controls.$playbackRateButtonMinimal),e.minimalMenuKeyboardControls.addElement(e.controls.$playbackRateButtonMinimal.get(0)),e.addQualityChooser(),e.addPlaybackRateChooser(),e.interactionKeyboardControls=new b([new g]),e.controls.$interactionsContainer=J("<div/>",{role:"menu",class:"h5p-interactions-container","aria-label":e.l10n.interaction}),e.controls.$bookmarksContainer=J("<div/>",{class:"h5p-bookmarks-container",appendTo:o}),e.controls.$endscreensContainer=J("<div/>",{class:"h5p-endscreens-container",appendTo:o}),e.hasPlayPromise=!1,e.hasQueuedPause=!1,e.delayed=!1,e.controls.$slider=J("<div/>",{appendTo:o}).slider({value:0,step:.01,orientation:"horizontal",range:"min",max:0,create:function(t){var n=J(t.target).find(".ui-slider-handle");n.attr("role","slider").attr("aria-valuemin","0").attr("aria-valuemax",e.getDuration().toString()).attr("aria-valuetext",Z.formatTimeForA11y(0,e.l10n)).attr("aria-valuenow","0"),e.preventSkipping&&e.setDisabled(n).attr("aria-hidden","true")},start:function(){e.currentState!==Z.SEEKING&&(e.toggleEndscreen(!1),e.delayedState||(e.currentState===H5P.Video.ENDED?e.lastState=H5P.Video.PLAYING:e.currentState===H5P.Video.BUFFERING&&e.lastState||(e.lastState=e.currentState)),e.delayedState=!0,clearTimeout(e.delayTimeout),e.delayTimeout=setTimeout((function(){e.delayedState=!1}),200),e.hasPlayPromise?e.hasQueuedPause=!0:e.video.pause(),e.currentState=Z.SEEKING,e.removeSplash(),e.$overlay.addClass("h5p-visible"))},slide:function(t,n){var o=x(t,[T.ARROW_LEFT,T.ARROW_RIGHT]),i=n.value;if(o){var s=x(t,[T.ARROW_RIGHT]),r=e.getDuration();i=s?Math.min(i+5,r):Math.max(i-5,0),e.timeUpdate(i,!0)}return e.seek(i),e.updateInteractions(i),e.updateCurrentTime(i),!o},stop:function(t,n){e.currentState=e.lastState,e.seek(n.value),e.recreateCurrentInteractions();var o=e.lastState===H5P.Video.PLAYING||e.lastState===H5P.Video.VIDEO_CUED||e.hasQueuedPause;if(e.hasPlayPromise)e.hasQueuedPause=!1;else if(o){e.hasQueuedPause=!1;var i=e.video.play();e.hasQueuedPause=!1,i&&i.then?(e.hasPlayPromise=!0,i.then((function(){setTimeout((function(){(e.hasQueuedPause||e.hasActivePauseInteraction())&&e.video.pause(),e.hasPlayPromise=!1}),0)}))):e.hasActivePauseInteraction()&&(e.video.play(),setTimeout((function(){e.video.pause()}),50))}else e.timeUpdate(n.value);e.$overlay.removeClass("h5p-visible"),e.editor&&(e.updateChooserTime(e.controls.$bookmarksChooser,".h5p-add-bookmark"),e.updateChooserTime(e.controls.$endscreensChooser,".h5p-add-endscreen"))}}),e.controls.$interactionsContainer.appendTo(o),e.preventSkipping&&(e.controls.$slider.slider("disable"),e.controls.$slider.click((function(t){return e.showPreventSkippingMessage(t.offsetX),!1}))),e.displayBookmarks()&&e.showBookmarksmenuOnLoad&&!1===e.video.pressToPlay&&e.toggleBookmarksChooser(!0,{initialLoad:!0}),e.controls.$buffered=J("<div/>",{class:"h5p-buffered",prependTo:e.controls.$slider})},Z.prototype.playStarAnimation=function(){var t=this;this.$starAnimation.hasClass("h5p-star-animation-inactive")&&(this.$starAnimation.removeClass("h5p-star-animation-inactive").addClass("h5p-star-animation-active"),setTimeout((function(){t.$starAnimation.removeClass("h5p-star-animation-active").addClass("h5p-star-animation-inactive")}),1e3))},Z.prototype.playBubbleAnimation=function(t){this.bubbleScore.setContent(t),this.bubbleScore.animate()},Z.prototype.hasActivePauseInteraction=function(){var t=!1;return this.interactions.forEach((function(e){e.getElement()&&e.pause()&&(t=!0)})),t},Z.prototype.createButton=function(t,e,n,o,i){var s={role:"button",tabindex:0,class:(void 0===e?"":e+" ")+"h5p-"+t,on:{click:function(){o.call(this)},keydown:function(t){P(t)&&(o.call(this),t.preventDefault(),t.stopPropagation())}},appendTo:n};return s[i?"text":"aria-label"]=this.l10n[t],H5P.jQuery("<div/>",s)},Z.prototype.addQualityChooser=function(){var t=this;if(t.qualityMenuKeyboardControls=new b([new g]),t.qualityMenuKeyboardControls.on("close",(function(){return t.controls.$qualityButton.click()})),this.video.getQualities&&(t.qualities=this.video.getQualities(),t.qualities&&void 0!==this.controls.$qualityButton&&t.isDisabled(t.controls.$qualityButton))){var e=this.video.getQuality(),n=t.qualities;"YouTube"===this.video.getHandlerName()&&(n=n.filter((function(t){return t.name===e})));for(var o="",i=0;i<n.length;i++){var s=n[i],r=s.name===e;o+='<li role="menuitemradio" data-quality="'.concat(s.name,'" aria-checked="').concat(r,'" aria-describedby="').concat(t.qualityMenuId,'">').concat(s.label,"</li>")}var a=J('<ul role="menu">'.concat(o,"</ul>")).appendTo(this.controls.$qualityChooser);a.children().click((function(){var e=J(this).attr("data-quality");t.updateQuality(e)})).keydown((function(e){if(P(e)){var n=J(this).attr("data-quality");t.updateQuality(n)}e.stopPropagation()})),a.find("li").get().forEach((function(e){t.qualityMenuKeyboardControls.addElement(e);var n="true"===e.getAttribute("aria-checked");tt(e,n)})),t.removeDisabled(this.controls.$qualityButton.add(this.controls.$qualityButtonMinimal))}},Z.prototype.updateQuality=function(t){var e=this;e.video.setQuality(t),"true"===e.controls.$more.attr("aria-expanded")?e.controls.$more.click():(e.controls.$qualityButton.click(),e.controls.$qualityButton.focus())},Z.prototype.addPlaybackRateChooser=function(){var t=this,e=this;if(this.playbackRateMenuKeyboardControls=new b([new g]),this.playbackRateMenuKeyboardControls.on("close",(function(){return e.controls.$playbackRateButton.click()})),this.video.getPlaybackRates){var n=this.video.getPlaybackRates();if(!(n.length<2)&&n&&void 0!==this.controls.$playbackRateButton&&e.isDisabled(this.controls.$playbackRateButton)){for(var o=this.video.getPlaybackRate(),i="",s=0;s<n.length;s++){var r=n[s],a=r===o;i+='<li role="menuitemradio" playback-rate="'.concat(r,'" aria-checked="').concat(a,'" aria-describedby="').concat(e.playbackRateMenuId,'">').concat(r,"</li>")}var c=J('<ul role="menu">'+i+"</ul>").appendTo(this.controls.$playbackRateChooser);c.children().click((function(){var t=J(this).attr("playback-rate");e.updatePlaybackRate(t)})).keydown((function(t){if(P(t)){var n=J(this).attr("playback-rate");e.updatePlaybackRate(n)}t.stopPropagation()})),c.find("li").get().forEach((function(e){t.playbackRateMenuKeyboardControls.addElement(e);var n="true"===e.getAttribute("aria-checked");tt(e,n)})),e.removeDisabled(this.controls.$playbackRateButton.add(this.controls.$playbackRateButtonMinimal))}}},Z.prototype.updatePlaybackRate=function(t){var e=this;e.video.setPlaybackRate(t),"true"===e.controls.$more.attr("aria-expanded")?e.controls.$more.click():e.controls.$playbackRateButton.click()},Z.prototype.startUpdatingBufferBar=function(){var t=this;if(!t.bufferLoop){!function e(){var n=t.video.getBuffered();n&&t.controls.$buffered&&(t.controls.$buffered.css("width",n+"%"),t.hasStar&&(n>99?t.$starBar.addClass("h5p-star-bar-buffered"):t.$starBar.removeClass("h5p-star-bar-buffered"))),t.bufferLoop=setTimeout(e,500)}()}},Z.prototype.resize=function(){if(this.$container){var t,e,n=this.$container.hasClass("h5p-fullscreen")||this.$container.hasClass("h5p-semi-fullscreen");this.$videoWrapper.css({marginTop:"",marginLeft:"",width:"",height:""}),this.video.trigger("resize");var o=this.justVideo?0:this.$controls.height(),i=this.$container.height();if(n){if((e=this.$videoWrapper.height())+o<=i)this.$videoWrapper.css("marginTop",(i-o-e)/2),t=this.$videoWrapper.width(),void 0!==this.bubbleEndscreen&&this.bubbleEndscreen.fullscreen(!0,i,e);else{var s=i-o;t=s*(this.$videoWrapper.width()/e),this.$videoWrapper.css({marginLeft:(this.$container.width()-t)/2,width:t,height:s}),void 0!==this.bubbleEndscreen&&this.bubbleEndscreen.fullscreen(!0)}this.video.trigger("resize")}else t=this.$container.width(),void 0!==this.bubbleEndscreen&&this.bubbleEndscreen.fullscreen();this.scaledFontSize=t>this.width?this.fontSize*(t/this.width):this.fontSize,this.$container.css("fontSize",this.scaledFontSize+"px"),this.editor||(t<this.width?this.$container.hasClass("h5p-minimal")||this.$container.addClass("h5p-minimal"):this.$container.hasClass("h5p-minimal")&&this.$container.removeClass("h5p-minimal")),this.isMinimal=this.$container.hasClass("h5p-minimal");var r=this.$videoWrapper.height();if(this.controlsCss={bottom:"",maxHeight:r+"px"},n){var a=o;e+o<=i&&(a=o+(i-o-e)/2),this.controlsCss.bottom=a+"px"}this.controls&&this.controls.$minimalOverlay&&this.controls.$minimalOverlay.css(this.controlsCss),this.$container.find(".h5p-chooser").css(this.controlsCss),this.editor?this.editor.dnb&&this.editor.dnb.dnr.setContainerEm(this.scaledFontSize):(this.resizeMobileView(),void 0!==this.$splash&&this.resizeStartScreen()),this.bubbleScore&&(this.bubbleScore.update(),this.bubbleEndscreen.update()),this.resizeInteractions()}},Z.prototype.resizeMobileView=function(){if(!isNaN(this.currentState)){if(this.$container.width()/parseInt(this.$container.css("font-size"),10)<30){if(this.resizeInteractions(),!this.isMobileView){if(this.$container.addClass("mobile"),this.isMobileView=!0,this.hasUncompletedRequiredInteractions())J(".h5p-dialog",this.$container).show();else this.restoreTabIndexes(),this.dnb.dialog.closeOverlay();this.recreateCurrentInteractions()}}else if(this.isMobileView){if(this.dnb&&this.dnb.dialog&&!this.hasUncompletedRequiredInteractions())this.dnb.dialog.close(!0),this.$container.find(".h5p-dialog .h5p-image img").css({width:"",height:""});this.$container.removeClass("mobile"),this.isMobileView=!1,this.recreateCurrentInteractions()}}},Z.prototype.resizeInteractions=function(){if(!isNaN(this.currentState)){var t=this;this.interactions.forEach((function(e){e.resizeInteraction(),e.repositionToWrapper(t.$videoWrapper),e.positionLabel(t.$videoWrapper.width())}))}},Z.prototype.recreateCurrentInteractions=function(){void 0!==this.dnb&&this.dnb.blurAll(),this.interactions.forEach((function(t){t.reCreateInteraction()}))},Z.prototype.resizeStartScreen=function(){var t=50,e=!0,n=!0;void 0!==this.startScreenOptions.shortStartDescription&&this.startScreenOptions.shortStartDescription.length||(e=!1,this.startScreenOptions.hideStartTitle&&(n=!1,t=45));var o=J(".h5p-splash-description",this.$splash),i=J(".h5p-splash-title",this.$splash),s=o.clone().css("position","absolute").addClass("minimum-font-size").appendTo(o.parent()),r=i.clone().css("position","absolute").addClass("minimum-font-size").appendTo(i.parent()),a=parseInt(s.css("font-size"),10),c=parseInt(r.css("font-size"),10),l=this.$container.width(),d=parseInt(l/t,10);e||(n&&d<a?d=a:d<10&&(d=10)),l<510?this.$splash.addClass("mobile"):this.$splash.removeClass("mobile"),.8*d<a?o.addClass("minimum-font-size"):o.removeClass("minimum-font-size"),1.5*d<c?i.addClass("minimum-font-size"):i.removeClass("minimum-font-size"),this.$splash.css("font-size",d),s.remove(),r.remove()},Z.prototype.toggleFullScreen=function(){H5P.isFullscreen||this.$container.hasClass("h5p-fullscreen")||this.$container.hasClass("h5p-semi-fullscreen")?void 0!==H5P.exitFullScreen&&void 0!==H5P.fullScreenBrowserPrefix?H5P.exitFullScreen():(void 0===H5P.fullScreenBrowserPrefix?J(".h5p-disable-fullscreen").click():""===H5P.fullScreenBrowserPrefix?window.top.document.exitFullScreen():"ms"===H5P.fullScreenBrowserPrefix?window.top.document.msExitFullscreen():window.top.document[H5P.fullScreenBrowserPrefix+"CancelFullScreen"](),this.trigger("exitFullScreen")):(H5P.fullScreen(this.$container,this),void 0===H5P.exitFullScreen&&this.trigger("enterFullScreen")),this.resizeInteractions()},Z.prototype.timeUpdate=function(t,e){var n=this;if(t>=0)try{var o=n.controls.$slider.find(".ui-slider-handle"),i=Z.formatTimeForA11y(t,n.l10n);n.controls.$slider.slider("option","value",t),o.attr("aria-valuetext",i),o.attr("aria-valuenow",t.toString())}catch(t){return}n.updateInteractions(t),e||setTimeout((function(){(n.currentState===H5P.Video.PLAYING||n.currentState===H5P.Video.BUFFERING&&n.lastState===H5P.Video.PLAYING)&&n.timeUpdate(n.video.getCurrentTime())}),40)},Z.prototype.updateInteractions=function(t){var e=this,n=Math.floor(10*t)/10;if(n!==e.lastTenth){void 0!==e.bookmarksMap&&void 0!==e.bookmarksMap[n]&&e.bookmarksMap[n].mouseover().mouseout();void 0!==e.endscreensMap&&void 0!==e.endscreensMap[n]&&e.currentState!==Z.SEEKING&&e.getAnsweredTotal()>0&&e.toggleEndscreen(!0)}e.lastTenth=n,e.toggleInteractions(t);var o=Math.floor(t);o!==e.lastSecond&&(e.currentState!==H5P.Video.PLAYING&&e.currentState!==H5P.Video.PAUSED||e.updateCurrentTime(o)),e.lastSecond=o},Z.prototype.updateCurrentTime=function(t){var e=this;t=Math.max(t,0);var n=Z.humanizeTime(t),o=Z.formatTimeForA11y(t,e.l10n);e.controls.$currentTime.html(n),e.controls.$currentTimeA11y.html("".concat(e.l10n.currentTime," ").concat(o)),e.controls.$currentTimeSimple.html(n),e.controls.$currentTimeA11ySimple.html("".concat(e.l10n.currentTime," ").concat(o))},Z.prototype.getUsersScore=function(){for(var t=0,e=0;e<this.interactions.length;e++)this.interactions[e].score&&(t+=this.interactions[e].score);return t},Z.prototype.getUsersMaxScore=function(){for(var t=0,e=0;e<this.interactions.length;e++)this.interactions[e].maxScore&&(t+=this.interactions[e].maxScore);return t},Z.prototype.getScore=function(){return this.getUsersScore()},Z.prototype.getMaxScore=function(){return this.getUsersMaxScore()},Z.prototype.showOverlayMask=function(){var t=this;t.$videoWrapper.addClass("h5p-disable-opt-out"),t.disableTabIndexes(),t.dnb.dialog.openOverlay(),t.restorePosterTabIndexes(),t.$container.find(".h5p-dialog-wrapper").click((function(){t.hasUncompletedRequiredInteractions()&&t.showWarningMask()})),t.toggleFocusTrap()},Z.prototype.restorePosterTabIndexes=function(){var t=this;t.$overlay.find(".h5p-interaction.h5p-poster").each((function(){t.restoreTabIndexes(J(this))}))},Z.prototype.disableTabIndexes=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:".h5p-dialog-wrapper",e=this,n=e.$container.find(t);e.$tabbables=e.$container.find("a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, *[tabindex], *[contenteditable]").filter((function(){var t=J(this),e=J.contains(n.get(0),t.get(0));if(t.data("tabindex"))return!0;if(!e){var o=t.attr("tabindex");return t.data("tabindex",o),t.attr("tabindex","-1"),!0}return!1}))},Z.prototype.restoreTabIndexes=function(t){var e=this;e.$tabbables&&(e.$tabbables.each((function(){var e=J(this),n=e.data("tabindex");if(t&&!J.contains(t.get(0),e.get(0)))return!0;e.hasClass("ui-slider-handle")?(e.attr("tabindex",0),e.removeData("tabindex")):void 0!==n?(e.attr("tabindex",n),e.removeData("tabindex")):e.removeAttr("tabindex")})),t||(e.$tabbables=void 0))},Z.prototype.toggleFocusTrap=function(){var t=this,e=this.getVisibleInteractions().filter((function(t){return t.getRequiresCompletion()&&!t.hasFullScore()}));e.length>0?this.$container.off("focusin").on("focusin",(function(n){return t.trapFocusInInteractions(e,J(n.target))})):this.$container.off("focusin","**")},Z.prototype.trapFocusInInteractions=function(t,e){var n=t.some((function(t){var n=t.getElement();return rt(n,e)})),o=!!this.$mask&&rt(this.$mask,e);if(!n&&!o){var i=t[0].getElement();i&&i.focus()}},Z.prototype.hideOverlayMask=function(){var t=this;return t.restoreTabIndexes(),t.dnb.dialog.closeOverlay(),t.$videoWrapper.removeClass("h5p-disable-opt-out"),t.toggleFocusTrap(),t.$container.find(".h5p-dialog-wrapper")},Z.prototype.showWarningMask=function(){var t=this,e="interactive-video-".concat(t.contentId,"-").concat(t.instanceIndex,"-completion-warning-text");return t.$mask||(t.$mask=J('<div class="h5p-warning-mask" role="alertdialog" aria-describedby="'.concat(e,'">\n <div class="h5p-warning-mask-wrapper">\n <div id="').concat(e,'" class="h5p-warning-mask-content">').concat(t.l10n.requiresCompletionWarning,'</div>\n <button type="button" class="h5p-joubelui-button h5p-button-back">').concat(t.l10n.back,"</button>\n </div>\n </div>")).click((function(){t.$mask.hide()})).appendTo(t.$container)),t.$mask.show(),t.$mask.find(".h5p-button-back").focus(),t.$mask},Z.prototype.setDisabled=function(t){return t.attr("aria-disabled","true").attr("tabindex","-1")},Z.prototype.isDisabled=function(t){return"true"===t.attr("aria-disabled")},Z.prototype.removeDisabled=function(t){return t.removeAttr("aria-disabled").attr("tabindex","0")},Z.prototype.hasUncompletedRequiredInteractions=function(t){return(void 0!==t?this.getVisibleInteractionsAt(t):this.getVisibleInteractions()).some((function(t){return t.getRequiresCompletion()&&!t.hasFullScore()}))},Z.prototype.getVisibleInteractions=function(){return this.interactions.filter((function(t){return t.isVisible()}))},Z.prototype.getVisibleInteractionsAt=function(t){return this.interactions.filter((function(e){return e.visibleAt(t)}))},Z.prototype.showSolutions=function(){},Z.prototype.getTitle=function(){return H5P.createTitle(this.contentData&&this.contentData.metadata&&this.contentData.metadata.title?this.contentData.metadata.title:"Interactive Video")},Z.prototype.findNextInteractionToShow=function(t,e){for(var n,o=0;o<this.interactions.length;o++){var i=this.interactions[o].getDuration();if(this.interactions[o].visibleAt(t)&&!this.interactions[o].isVisible()){n=o;break}(i.from>t||i.from==t&&(void 0===e||o>e))&&(void 0===n||i.from<this.interactions[n].getDuration().from)&&(n=o)}return n},Z.prototype.findNextInteractionToHide=function(t){for(var e,n=0;n<this.visibleInteractions.length;n++){var o=this.interactions[this.visibleInteractions[n]].getDuration();(void 0===e||o.to<this.interactions[this.visibleInteractions[e]].getDuration().to)&&(e=n)}return e},Z.prototype.hideInteractions=function(t){void 0===this.nextInteractionToHide&&(this.nextInteractionToHide=this.findNextInteractionToHide(t));for(var e=void 0!==this.nextInteractionToHide?this.interactions[this.visibleInteractions[this.nextInteractionToHide]]:null;e&&!e.visibleAt(t);)e.toggle(t),this.visibleInteractions.splice(this.nextInteractionToHide,1),this.nextInteractionToHide=this.findNextInteractionToHide(t),e=void 0!==this.nextInteractionToHide?this.interactions[this.visibleInteractions[this.nextInteractionToHide]]:null},Z.prototype.showInteractions=function(t){void 0===this.nextInteractionToShow&&(this.nextInteractionToShow=this.findNextInteractionToShow(t));for(var e=[],n=void 0!==this.nextInteractionToShow?this.interactions[this.nextInteractionToShow]:null;n&&n.getDuration().from<=t;)n.toggle(t),n.repositionToWrapper(this.$videoWrapper),this.visibleInteractions.push(this.nextInteractionToShow),this.nextInteractionToHide=void 0,e.push(n),this.nextInteractionToShow=this.findNextInteractionToShow(t,this.nextInteractionToShow),n=void 0!==this.nextInteractionToShow?this.interactions[this.nextInteractionToShow]:null;this.accessibility.announceInteractions(e)},Z.prototype.toggleInteractions=function(t){this.hideInteractions(t),this.showInteractions(t)},Z.prototype.play=function(){this.video.play()},Z.prototype.seek=function(t){this.nextInteractionToShow=this.nextInteractionToHide=void 0,this.video.seek(t)},Z.prototype.pause=function(){this.video&&this.video.pause&&this.video.pause()},Z.prototype.resetTask=function(){this.interactionsProgress=[];for(var t=0;t<this.interactions.length;t++)this.interactions[t].resetTask();(void 0!==this.bubbleEndscreen&&this.bubbleEndscreen.toggle(!1,!1),void 0!==this.controls)&&(this.addSliderInteractions(),this.video.getCurrentTime()>0&&this.seek(0),this.timeUpdate(-1),this.controls.$slider.slider("option","value",0))},Z.prototype.read=function(t){var e=this;e.$read&&(e.readText?e.readText+=("."===e.readText.substr(-1,1)?" ":". ")+t:e.readText=t,e.$read.html(e.readText),setTimeout((function(){e.readText=null,e.$read.html("")}),100))},Z.prototype.getCopyrights=function(){var t=this,e=new H5P.ContentCopyrights;void 0!==t.options.video.files&&void 0!==t.options.video.files[0]&&e.addMedia(new H5P.MediaCopyright(t.options.video.files[0].copyright,t.l10n)),void 0!==t.options.video.startScreenOptions.copyright&&e.addMedia(t.options.video.startScreenOptions.copyright);var n=t.options.video.startScreenOptions.poster;if(n&&void 0!==n.copyright){var o=new H5P.MediaCopyright(n.copyright,t.l10n),i=H5P.getPath(n.path,t.contentId);o.setThumbnail(new H5P.Thumbnail(i,n.width,n.height)),e.addMedia(o)}for(var s=0;s<t.interactions.length;s++){var r=t.interactions[s].getCopyrights();r&&e.addContent(r)}if(t.hasMainSummary()){var a=H5P.newRunnable(t.options.summary.task,t.contentId);if(void 0!==a){var c=new H5P.ContentCopyrights;c.addContent(H5P.getCopyrights(a,{action:t.options.summary.task},t.contentId)),c.setLabel(t.l10n.summary),e.addContent(c)}}return e},Z.prototype.skippingPrevented=function(){return this.preventSkipping},Z.SEEKING=4,Z.LOADED=5,Z.ATTACHED=6,Z.humanizeTime=function(t){var e=Z.secondsToMinutesAndHours(t),n="";return 0!==e.hours&&(n+=e.hours+":",e.minutes<10&&(n+="0")),n+=e.minutes+":",e.seconds<10&&(n+="0"),n+=e.seconds},Z.formatTimeForA11y=function(t,e){var n=Z.secondsToMinutesAndHours(t),o=n.hours>0?"".concat(n.hours," ").concat(e.hours,", "):"";return"".concat(o).concat(n.minutes," ").concat(e.minutes,", ").concat(n.seconds," ").concat(e.seconds)},Z.secondsToMinutesAndHours=function(t){var e=Math.floor(t/60);return{seconds:Math.floor(t%60),minutes:e%60,hours:Math.floor(e/60)}};var tt=function(t,e){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")},et=function(t,e){for(var n=0;n<e.length;n++)if(e[n].name===t)return e[n]},nt=function(t,e){null===t?e():setTimeout(e,t)},ot=function(){return void 0===window.interactiveVideoCounter&&(window.interactiveVideoCounter=0),window.interactiveVideoCounter++};Z.prototype.getXAPIData=function(){var t=this,e=this.createXAPIEventTemplate("answered");it(e),e.setScoredResult(t.getScore(),t.getMaxScore(),t,!0,t.getScore()===t.getMaxScore());var n=at(t.interactions);return{statement:e.data.statement,children:n}},Z.prototype.getContext=function(){var t=this.video.getCurrentTime();return void 0===t?{}:{type:"time",value:t}};var it=function(t){var e=t.getVerifiedStatementValue(["object","definition"]);H5P.jQuery.extend(e,st())},st=function(){var t={interactionType:"compound",type:"http://adlnet.gov/expapi/activities/cmi.interaction",description:{"en-US":""}};return t},rt=function(t,e){return void 0!==t&&void 0!==e&&(t.is(e)||J.contains(t.get(0),e.get(0)))},at=function(t){return t.map((function(t){return t.getXAPIData()})).filter((function(t){return!!t}))};const ct=Z;H5P=H5P||{},H5P.InteractiveVideo=ct})();
Close