',o.appendTo=function(t){o.$scoreBar.appendTo(t)},o.setScore=function(t){t!==o.score&&(o.score=t>o.maxScore?o.maxScore:t,o.updateVisuals())},o.incrementScore=function(t){o.setScore(o.score+(t||1))},o.setMaxScore=function(t){o.maxScore=t},o.updateVisuals=function(){o.$progress.html(s(o.score)),o.$scoreCounter.text(o.score),o.$maxScore.text(o.maxScore),setTimeout(function(){o.$progress.css({width:o.score/o.maxScore*100+"%"}),H5P.Transition.onTransitionEnd(o.$progress,function(){o.$scoreBar.toggleClass("h5p-joubelui-score-bar-full-score",o.score===o.maxScore),o.$scoreBar.toggleClass("h5p-joubelui-score-bar-animation-active",o.score===o.maxScore),o.$scoreBar.one("animationend",function(){o.$scoreBar.removeClass("h5p-joubelui-score-bar-animation-active")})},600)},300)},o.reset=function(){o.$scoreBar.removeClass("h5p-joubelui-score-bar-full-score")},function(){o.$scoreBar=r("
",{class:"h5p-joubelui-score-bar"});var t=r("
",{class:"h5p-joubelui-score-bar-visuals",appendTo:o.$scoreBar});o.$progressWrapper=r("
",{class:"h5p-joubelui-score-bar-progress-wrapper",appendTo:t}),o.$progress=r("
",{class:"h5p-joubelui-score-bar-progress",html:s(o.score),appendTo:o.$progressWrapper}),r("
",{class:"h5p-joubelui-score-bar-star",html:o.STAR_MARKUP}).appendTo(t);t=r("
",{class:"h5p-joubelui-score-numeric",appendTo:o.$scoreBar,"aria-hidden":!0});o.$scoreCounter=r("",{class:"h5p-joubelui-score-number h5p-joubelui-score-number-counter",text:0,appendTo:t}),r("",{class:"h5p-joubelui-score-number-separator",text:"/",appendTo:t}),o.$maxScore=r("",{class:"h5p-joubelui-score-number h5p-joubelui-score-max",text:o.maxScore,appendTo:t}),i&&(H5P.JoubelUI.createTip(i,{tipLabel:n||i,helpIcon:!0}).appendTo(o.$scoreBar),o.$scoreBar.addClass("h5p-score-bar-has-help"))}()}}(H5P.jQuery),(H5P=H5P||{}).JoubelProgressbar=function(s){function t(t,e){H5P.EventDispatcher.call(this);var i=this;this.options=s.extend({progressText:"Slide :num of :total"},e),this.currentStep=0,this.steps=t,this.$progressbar=s("
",{class:"h5p-joubelui-progressbar",on:{click:function(){return i.toggleTooltip(),!1},mouseenter:function(){i.showTooltip()},mouseleave:function(){setTimeout(function(){i.hideTooltip()},1500)}}}),this.$background=s("
",{class:"h5p-joubelui-progressbar-background"}).appendTo(this.$progressbar),s("body").click(function(){i.toggleTooltip(!0)})}return((t.prototype=Object.create(H5P.EventDispatcher.prototype)).constructor=t).prototype.showTooltip=function(){var n,o=this;0!==this.currentStep&&void 0===this.tooltip&&(n=o.$progressbar.offset().left+o.$progressbar.width(),this.tooltip=new H5P.Drop({target:this.$background.get(0),content:this.currentStep+"/"+this.steps,classes:"drop-theme-arrows-bounce h5p-joubelui-drop",position:"top right",openOn:"always",tetherOptions:{attachment:"bottom center",targetAttachment:"top right"}}),this.tooltip.on("open",function(){var t=s(o.tooltip.drop),e=t.position().left,i=t.width();e<0?t.css({marginLeft:-e+"px"}):n",{class:"h5p-joubelui-progressbar-slide-status-text","aria-live":"assertive"}).appendTo(this.$progressbar)),t=this.options.progressText.replace(":num",this.currentStep).replace(":total",this.steps),this.$currentStatus.html(t))},t.prototype.hideTooltip=function(){void 0!==this.tooltip&&(this.tooltip.remove(),this.tooltip.destroy(),this.tooltip=void 0)},t.prototype.toggleTooltip=function(t){void 0!==this.tooltip||t?void 0!==this.tooltip&&this.hideTooltip():this.showTooltip()},t.prototype.appendTo=function(t){this.$progressbar.appendTo(t)},t.prototype.setProgress=function(t){t>this.steps||t<0||(this.currentStep=t,this.$background.css({width:this.currentStep/this.steps*100+"%"}),this.updateAria())},t.prototype.next=function(){this.setProgress(this.currentStep+1)},t.prototype.reset=function(){this.setProgress(0)},t.prototype.isLastStep=function(){return this.steps===this.currentStep},t}(H5P.jQuery),(H5P=H5P||{}).JoubelUI=function(i){function t(){}var e;return t.createTip=function(t,e){return new H5P.JoubelTip(t,e)},t.createMessageDialog=function(t,e){return new H5P.JoubelMessageDialog(t,e)},t.createHelpTextDialog=function(t,e,i){return new H5P.JoubelHelpTextDialog(t,e,i)},t.createProgressCircle=function(t,e,i,n){return new H5P.JoubelProgressCircle(t,e,i,n)},t.createThrobber=function(){return new H5P.JoubelThrobber},t.createSimpleRoundedButton=function(t){return new H5P.SimpleRoundedButton(t)},t.createSlider=function(t){return new H5P.JoubelSlider(t)},t.createScoreBar=function(t,e,i,n){return new H5P.JoubelScoreBar(t,e,i,n)},t.createProgressbar=function(t,e){return new H5P.JoubelProgressbar(t,e)},t.createButton=function(t){var e="button";return t.href?e="a":t.type="button",t.class?t.class+=" h5p-joubelui-button":t.class="h5p-joubelui-button",i("<"+e+"/>",t)},H5P.isFramed&&!H5P.hasiOSiframeScrollFix&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&(H5P.hasiOSiframeScrollFix=!0,e=HTMLElement.prototype.focus,HTMLElement.prototype.focus=function(){(this instanceof HTMLAnchorElement||this instanceof HTMLInputElement||this instanceof HTMLSelectElement||this instanceof HTMLTextAreaElement||this instanceof HTMLButtonElement||this instanceof HTMLIFrameElement||this instanceof HTMLAreaElement)&&!this.getAttribute("role")&&e.call(this)}),t}(H5P.jQuery),/*!@license H5P.Question-1.4/scripts/question.js by Joubel licensed under MIT*/H5P.Question=function(R,t,W){function e(o){var u=this;t.call(u),u.order=["video","image","introduction","content","explanation","feedback","scorebar","buttons","read"];function h(t,e){x[t]={},t=x[t].$element=R("
",{class:"h5p-question-"+t}),e&&t[e instanceof R?"append":"html"](e)}function d(t,e){e instanceof R?x[t].$element.html("").append(e):x[t].$element.html(e)}function p(t,e,i,n){for(var o=0;or.height()-15,o=e[0].offsetLeft<15,s=e[0].offsetLeft+e.width()>r.width()-15,d=e[0].offsetLeft-l/2+e.width()/2,h=e[0].offsetTop-c-15,p=d+l/2-a.width()/2,f=h+c-a.height()/2,m=225,c+15>e[0].offsetTop&&(f=(h=e[0].offsetTop+e.height()+15)-a.height()/2,m=45),(d=d<0?0:d)+l>r.width()&&(d=r.width()-l),i&&(o||s)?(d=e[0].offsetLeft+(o?e.width():-l),h=e[0].offsetTop+e.height(),u=!0):n&&(o||s)?(d=e[0].offsetLeft+(o?e.width():-l),h=e[0].offsetTop-c,u=!0):i||n||(o||s)&&(h=e[0].offsetTop-c/2+e.width()/2,(d=e[0].offsetLeft+(o?e.width()+15:-l-15))<0?u=!(d=0):(p=d+(o?-a.width()/2:l-a.width()/2),f=h+c/2-a.height()/2,m=o?315:135)),h+c>r.height()&&(h=r.height()-c,c>r.height()-(e[0].offsetTop+e.height()+15)&&(u=!0))):u=!0,t.css({top:h=h<0?0:h,left:d}),a.css({top:f,left:p}),u?a.hide():a.css({left:p,top:f,transform:"rotate("+m+"deg)"}).show()},A=function(t){if(t.is(":visible")){var e=t.hasClass("h5p-question-popup"),i=t.clone().css({position:"absolute","max-height":"none",width:e?"":"100%"}).appendTo(t.parent()),n=parseFloat(t.css("margin-left"))+parseFloat(t.css("margin-right")),e=i.css("width")?i.css("width"):"100%";i.css("width","calc("+e+" - "+n+"px)");e=Math.round(i.get(0).getBoundingClientRect().height),n=parseFloat(t.css("fontSize"));return t.css("max-height",e/n+"em"),i.remove(),0t?L:O)(e.current,t),!0)}B(!1);var o=Math.floor(x.buttons.$element.width())-1;n(o)||(B(!0),n(Math.floor(x.buttons.$element.width())-1))}},x.buttons.$element.is(":visible")?t():(e&&clearTimeout(e),e=setTimeout(function(){e=void 0,t()},0)))},B=function(t){x.scorebar&&x.scorebar.$element&&x.scorebar.$element.hasClass("h5p-question-visible")?(x.buttons.$element.addClass("has-scorebar"),x.buttons.$element.toggleClass("wrap",t),x.scorebar.$element.toggleClass("full-width",t)):x.buttons.$element.removeClass("has-scorebar")},L=function(t,e){for(var i=k.length-1;0<=i;i--){var n=k[i],o=C[n];if(!o.isTruncated&&o.isVisible){n=o.$element;if(t-=o.width.max-o.width.min,o.$element.attr("aria-label",n.text()).html("").addClass("truncated"),o.isTruncated=!0,t<=e)return}}},O=function(t,e){for(var i=0;i",{class:"h5p-question-video"})},S&&t.params.playback&&(t.params.playback.autoplay=!1),t.params.visuals||(t.params.visuals={}),t.params.visuals.fit=!1,x.video.instance=H5P.newRunnable(t,u.contentId,x.video.$element,!0);var e=!1;return x.video.instance.on("resize",function(){e=!0,u.trigger("resize"),e=!1}),u.on("resize",function(){e||x.video.instance.trigger("resize")}),u},u.pause=function(){x.video&&x.video.isVisible&&x.video.instance.pause()},u.play=function(){x.video&&x.video.isVisible&&x.video.instance.play()},u.disableAutoPlay=function(){S=!0},u.setImage=function(t,e){e=e||{},x.image={},x.image.$element=R("
",{class:"h5p-question-image h5p-question-image-fill-width"});var i=R("
",{class:"h5p-question-image-wrap",appendTo:x.image.$element}),n=R("",{src:H5P.getPath(t,u.contentId),alt:void 0===e.alt?"":e.alt,title:void 0===e.title?"":e.title,on:{load:function(){u.trigger("imageLoaded",this),u.trigger("resize")}},appendTo:i});if(!e.disableImageZooming){var o=!1;return u.on("resize",function(){!o&&n.is(":visible")&&(i.addClass("h5p-question-image-scalable").attr("aria-expanded",!1).attr("role","button").attr("tabIndex","0").on("click",function(t){1===t.which&&s.apply(this)}).on("keypress",function(t){32===t.which&&(t.preventDefault(),s.apply(this))}),x.image.$element.removeClass("h5p-question-image-fill-width"),o=!0)}),u}n.css("maxHeight","none");e=function(){var t=x.image.$element.get(0).getBoundingClientRect().width;i.css({"-webkit-transition":"none",transition:"none"});var e=2*(i.get(0).getBoundingClientRect().left-x.image.$element.get(0).getBoundingClientRect().left);n.get(0).naturalWidth>=t-e?x.image.$element.addClass("h5p-question-image-fill-width"):x.image.$element.removeClass("h5p-question-image-fill-width"),i.css({"-webkit-transition":"",transition:""})};n.is(":visible")?e():n.on("load",e)},u.setIntroduction=function(t){return h("introduction",t),u},u.setContent=function(t,e){return h("content",t),e&&e.class&&x.content.$element.addClass(e.class),u},u.read=function(t){c&&(w?w+=("."===w.substr(-1,1)?" ":". ")+t:w=t,c.html(w),setTimeout(function(){w=null,c.html("")},100))},u.readFeedback=function(){var t;H.disableReadSpeaker||!b||!x.feedback||!x.feedback.$element||(t=R(".h5p-question-feedback-content-text",x.feedback.$element))&&t.html()&&t.html().length&&u.read(t.html())},u.removeFeedback=function(){return clearTimeout(y),x.feedback&&b&&(b=!1,z(x.scorebar),z(x.feedback),E=!0,y=setTimeout(function(){b||(x.feedback.$element.children().detach(),x.scorebar.$element.children().detach(),u.trigger("resize")),E=!1,v.setScore(0)},150),m&&m.find(".h5p-question-feedback-tail").remove()),u},u.setFeedback=function(t,e,i,n,o,s,r){if(H.disableFeedback)return u;f(),g=null!=s&&null!=s.click?s.click:null,clearTimeout(y);var a=R("
",{class:"h5p-question-feedback-container"}),l=R("
",{class:"h5p-question-feedback-content"}).appendTo(a);R("
",{class:"h5p-question-feedback-content-text",html:t}).appendTo(l);var c=R("
",{class:"h5p-question-scorebar-container"});return(v=void 0===v?W.createScoreBar(i,n,o,r):v).appendTo(c),l.toggleClass("has-content",void 0!==t&&0",{class:"h5p-question-feedback-tail"}).hide().appendTo(i),t=R("
",{class:"h5p-question-feedback-close",tabindex:0,title:t,on:{click:function(t){e.remove(),o.remove(),t.preventDefault()},keydown:function(t){switch(t.which){case 13:case 32:e.remove(),o.remove(),t.preventDefault()}}}}).hide().appendTo(e);null!=n&&(n.hasClass("correct")?(e.addClass("h5p-question-feedback-correct"),t.show(),x.buttons.$element.hide()):x.buttons.$element.appendTo(x.feedback.$element)),I(e,n)}(s.closeText),v.setScore(e)):y=setTimeout(function(){var t;A(x.feedback.$element),A(x.scorebar.$element),E=!0,!m||m.hasClass("h5p-standalone")&&!H5P.isFullscreen||(t=$(m))&&t.animate({scrollTop:m.css("height")},"slow"),y=setTimeout(function(){E=!1,u.trigger("resize"),v.setScore(e)},150)},0),u},u.updateFeedbackContent=function(t,e){return x.feedback&&x.feedback.$element&&(e&&(t=R(".h5p-question-feedback-content",x.feedback.$element).html()+" "+t),R(".h5p-question-feedback-content",x.feedback.$element).html(t).addClass("has-content"),A(x.feedback.$element),setTimeout(u.trigger.bind(u,"resize"),150)),u},u.setExplanation=function(t,e){return t?(t=new H5P.Question.Explainer(e,t),x.explanation?d("explanation",t.getElement()):(h("explanation",t.getElement()),T&&m&&p(u.order,"explanation",x,m))):x.explanation&&x.explanation.$element.children().detach(),u},u.hasButton=function(t){return void 0!==C[t]},u.addButton=function(t,e,i,n,o,s){if(C[t])return u;void 0===x.buttons&&(h("buttons"),T&&p(u.order,"buttons",x,m)),(s=s||{}).confirmationDialog=s.confirmationDialog||{},o=o||{};function r(){s.confirmationDialog.enable&&a?(s.confirmationDialog.$parentElement||x.popups.$element.removeClass("hidden"),a.show(c.position().top)):i()}var a=u.addConfirmationDialogToButton(s.confirmationDialog,i);C[t]={isTruncated:!1,text:e,isVisible:!1};var l=void 0!==o.href,c=C[t].$element=W.createButton(R.extend({class:"h5p-question-"+t,html:e,title:e,on:{click:function(t){r(),l&&t.preventDefault()}}},o));return k.push(t),l&&c.on("keypress",function(t){32===t.which&&(r(),t.preventDefault())}),void 0!==n&&!n||(c.appendTo(x.buttons.$element),C[t].isVisible=!0,F(x.buttons)),u};var j=function(t){var e=t.$element,e=e.clone().css({position:"absolute","white-space":"nowrap","max-width":"none"}).removeClass("truncated").html(t.text).appendTo(e.parent());t.width={max:Math.ceil(e.outerWidth()+parseFloat(e.css("margin-left"))+parseFloat(e.css("margin-right")))},e.html("").addClass("truncated"),t.width.min=Math.ceil(e.outerWidth()+parseFloat(e.css("margin-left"))+parseFloat(e.css("margin-right"))),e.remove()};u.addConfirmationDialogToButton=function(t,e){if((t=t||{}).enable){var i=new H5P.ConfirmationDialog({instance:t.instance,headerText:t.l10n.header,dialogText:t.l10n.body,cancelText:t.l10n.cancelLabel,confirmText:t.l10n.confirmLabel});return t.$parentElement?i.appendTo(t.$parentElement.get(0)):(void 0===x.popups&&(h("popups"),T&&p(u.order,"popups",x,m),x.popups.$element.addClass("hidden"),u.order.push("popups")),i.appendTo(x.popups.$element.get(0))),i.on("confirmed",function(){t.$parentElement||x.popups.$element.addClass("hidden"),e(),u.trigger("confirmed")}),i.on("canceled",function(){t.$parentElement||x.popups.$element.addClass("hidden"),u.trigger("canceled")}),i}},u.showButton=function(t,e){var i=-1!==n(t,"id",P);if(void 0===C[t]||!0===C[t].isVisible&&!i)return u;e=e||0;i=n(t,"id",_);if(-1!==i)return _[i].priority",{"aria-live":"polite",class:"h5p-hidden-read"}),h("read",c),u.trigger("registerDomElements")),(m=t).html("").addClass("h5p-question h5p-"+o);for(var e=[],i=0;i=e&&o)return n.feedback}return""},e}(H5P.jQuery,H5P.EventDispatcher,H5P.JoubelUI),/*!@license H5P.Question-1.4/scripts/explainer.js by Joubel licensed under MIT*/H5P.Question.Explainer=function(l){return function(s,r){var a=this;!function(){a.$explanation=l("
",{class:"h5p-question-explanation-container"}),l("
",{class:"h5p-question-explanation-title",role:"heading",html:s,appendTo:a.$explanation});for(var t=l("
    ",{class:"h5p-question-explanation-list",appendTo:a.$explanation}),e=0;e",{class:"h5p-question-explanation-item",appendTo:t}),o=l("
    ",{class:"h5p-question-explanation-status"});i.correct&&l("",{class:"h5p-question-explanation-correct",html:i.correct,appendTo:o}),i.wrong&&l("",{class:"h5p-question-explanation-wrong",html:i.wrong,appendTo:o}),o.appendTo(n),i.text&&l("
    ",{class:"h5p-question-explanation-text",html:i.text,appendTo:n})}}(),a.getElement=function(){return a.$explanation}}}(H5P.jQuery),H5P.Question.ScorePoints=function(){var i,n=[];this.getElement=function(t){var e=document.createElement("div");return e.classList.add(t?"h5p-question-plus-one":"h5p-question-minus-one"),e.classList.add("h5p-question-hidden-one"),n.push(e),i&&clearTimeout(i),i=setTimeout(o,0),e};var o=function(){var t=0,e=150;n.length&&n.length>Math.ceil(1e3/e)&&(e=1e3/n.length);for(var i=0;i=n?t.apply(null,i):function(){var t=Array.prototype.slice.call(arguments,0);return e.apply(null,i.concat(t))}}},o=(e.compose=function(){for(var t=arguments.length,e=Array(t),i=0;i=n?t.apply(null,i):function(){var t=Array.prototype.slice.call(arguments,0);return e.apply(null,i.concat(t))}}}function o(t,e){return e.substr(0,1)===t}function s(t,e){return e.substr(-1)===t}var r=n(function(t,e){return o(t,e)&&(e=e.slice(1)),e=s(t,e)?e.slice(0,-1):e});e.default={curry:n,cleanCharacter:r,startsWith:o,endsWith:s,shuffle:function(t){for(var e=t.length;0"),this.introductionId="h5p-drag-text-"+e+"-introduction",this.selectedElement=void 0,this.ariaDragControls=new p.default,this.ariaDropControls=new f.default,this.dragControls=new d.default([new m.default,new g.default,this.ariaDragControls]),this.dragControls.useNegativeTabIndex(),this.dropControls=new d.default([new m.default,new g.default,this.ariaDropControls]),this.dropControls.useNegativeTabIndex(),this.dragControls.on("before-select",function(t){return!n.isElementDisabled(t.element)}),this.dragControls.on("select",this.keyboardDraggableSelected,this),this.dropControls.on("select",this.keyboardDroppableSelected,this),this.on("start",this.addAllDroppablesToControls,this),this.on("revert",this.removeControlsFromEmptyDropZones,this),this.on("stop",function(t){t.data.target||n.removeControlsFromDropZonesIfAllEmpty()},this),this.on("drop",this.removeControlsFromEmptyDropZones,this),this.on("start",function(t){var e=t.data.element,t=n.getDraggableByElement(e);n.toggleDropEffect(),e.setAttribute("aria-grabbed","true"),n.setDraggableAriaLabel(t)}),this.on("stop",function(t){var e=t.data.element,t=n.getDraggableByElement(e);n.toggleDropEffect(),e.setAttribute("aria-grabbed","false"),n.setDraggableAriaLabel(t)}),this.on("drop",this.ariaDropControls.setAllToNone,this.ariaDropControls),this.on("drop",function(t){this.dragControls.removeElement(t.data.element)},this),this.on("revert",function(t){this.dragControls.insertElementAt(t.data.element,0)},this),this.on("drop",this.updateDroppableElement,this),this.on("revert",this.updateDroppableElement,this),this.initDragText(),this.stopWatch=new a.default,this.stopWatch.start(),this.on("resize",this.resize,this),this.on("revert",this.toggleDraggablesContainer,this),this.on("drop",this.toggleDraggablesContainer,this),this.on("stop",function(t){t.data.target||n.read(n.params.cancelledDragging)}),this.params.behaviour.instantFeedback&&this.on("revert",function(){return n.instantFeedbackEvaluation()})}H5P.DragText=(l=H5P.jQuery,o=H5P.Question,s=H5P.ConfirmationDialog,((v.prototype=Object.create(o.prototype)).constructor=v).prototype.updateDroppableElement=function(t){var e=t.data.target,i=t.data.element,t=this.getDroppableByElement(e);e&&this.setDroppableLabel(e,i.textContent,t.getIndex())},v.prototype.removeControlsFromDropZonesIfAllEmpty=function(){this.anyDropZoneHasDraggable()||this.removeAllDroppablesFromControls()},v.prototype.removeControlsFromEmptyDropZones=function(){var e=this;this.droppables.filter(function(t){return!t.hasDraggable()}).map(function(t){return t.getElement()}).forEach(function(t){e.dropControls.removeElement(t)})},v.prototype.addAllDroppablesToControls=function(){var e=this;0'+this.params.taskDescription+"

    "),this.setIntroduction(this.$introduction),this.$introduction.parent().attr("tabindex","-1"),this.setContent(this.$inner),this.addButtons()},v.prototype.initDragText=function(){return this.$inner=l("
    ",{"aria-describedby":this.introductionId,class:"h5p-drag-inner"}),this.addTaskTo(this.$inner),this.setH5PUserState(),this.$inner},v.prototype.resize=function(){this.changeLayoutToFitWidth()},v.prototype.changeLayoutToFitWidth=function(){var t=this;t.addDropzoneWidth(),43",{class:"h5p-drag-task"}),o.$draggables=l("
    ",{class:"h5p-drag-draggables-container"}),o.$wordContainer=l("
    ",{class:"h5p-drag-droppable-words"}),(0,r.parseText)(o.textFieldHtml).forEach(function(t){var e,i,n;o.isAnswerPart(t)?(e=(0,r.lex)(t),i=o.createDraggable(e.text),n=o.createDroppable(e.text,e.tip,e.correctFeedback,e.incorrectFeedback),o.params.behaviour.instantFeedback&&i.getDraggableElement().on("dragstop",function(){n.addFeedback(),o.instantFeedbackEvaluation()})):(t=c.default.createElementWithTextPart(t),o.$wordContainer.append(t))}),o.shuffleAndAddDraggables(o.$draggables),o.$draggables.appendTo(o.$taskContainer),o.$wordContainer.appendTo(o.$taskContainer),o.$taskContainer.appendTo(t),o.addDropzoneWidth()},v.prototype.isAnswerPart=function(t){return c.default.startsWith("*",t)&&c.default.endsWith("*",t)},v.prototype.addDropzoneWidth=function(){var e=this,n=0,o=0,t=parseInt(this.$inner.css("font-size"),10),i=3*t,s=t;this.draggables.forEach(function(t){var e=t.getDraggableElement(),i=e.clone().css({position:"absolute","white-space":"nowrap",width:"auto",padding:0,margin:0}).html(t.getAnswerText()).appendTo(e.parent()),e=i.outerWidth();o=o",{html:""+t+"",role:"button","aria-grabbed":"false",tabindex:"-1"}).draggable({revert:function(t){return t||e.revert(n),!1},drag:e.propagateDragEvent("drag",e),start:e.propagateDragEvent("start",e),stop:function(t){e.trigger("stop",{element:n.getElement(),target:t.target})},containment:e.$taskContainer}).append(l("",{class:"h5p-hidden-read"})),n=new u.default(t,i,e.draggables.length);return n.on("addedToZone",function(){e.triggerXAPI("interacted")}),e.draggables.push(n),n},v.prototype.createDroppable=function(t,e,i,n){var o=this,s=this.draggables.length,r=l("
    ",{class:"h5p-drag-dropzone-container"}),a=l("
    ",{"aria-dropeffect":"none","aria-label":this.params.dropZoneIndex.replace("@index",s.toString())+" "+this.params.empty.replace("@index",s.toString()),tabindex:"-1"}).appendTo(r).droppable({tolerance:"pointer",drop:function(t,e){e=o.getDraggableByElement(e.draggable[0]),t=o.getDroppableByElement(t.target);e&&t&&o.drop(e,t)}}),s=new h.default(t,e,i,n,a,r,s,o.params);return s.appendDroppableTo(o.$wordContainer),o.droppables.push(s),s},v.prototype.propagateDragEvent=c.default.curry(function(t,e,i){e.trigger(t,{element:i.target})}),v.prototype.revert=function(t){var e=t.removeFromZone(),e=e?e.getElement():void 0;t.revertDraggableTo(this.$draggables),this.setDraggableAriaLabel(t),this.trigger("revert",{element:t.getElement(),target:e}),this.trigger("resize")},v.prototype.drop=function(t,e){this.answered=!0,t.removeFromZone();var i=e.appendInsideDroppableTo(this.$draggables);i&&this.trigger("revert",{element:i.getElement(),target:e.getElement()}),e.setDraggable(t),t.appendDraggableTo(e.getDropzone()),this.params.behaviour.instantFeedback&&(e.addFeedback(),this.instantFeedbackEvaluation(),this.params.behaviour.enableRetry&&!e.isCorrect()||e.disableDropzoneAndContainedDraggable()),this.trigger("drop",{element:t.getElement(),target:e.getElement()}),this.trigger("resize"),e.getElement().focus()},v.prototype.shuffleAndAddDraggables=function(e){var i=this;return c.default.shuffle(this.draggables).map(function(t,e){return t.setIndex(e)}).map(function(t){return i.addDraggableToContainer(e,t)}).map(function(t){return i.setDraggableAriaLabel(t)}).map(function(t){return i.addDraggableToControls(i.dragControls,t)})},v.prototype.setDraggableAriaLabel=function(t){return t.updateAriaLabel(this.params.ariaDraggableIndex.replace("@index",(t.getIndex()+1).toString()).replace("@count",this.draggables.length.toString())),t},v.prototype.isGrabbed=function(t){return"true"===t.getAttribute("aria-grabbed")},v.prototype.addDraggableToContainer=function(t,e){return e.appendDraggableTo(t),e},v.prototype.addDraggableToControls=function(t,e){return t.addElement(e.getElement()),e},v.prototype.instantFeedbackEvaluation=function(){var t=this;t.isAllAnswersFilled()?(t.params.behaviour.enableSolutionsButton&&t.showButton("show-solution"),t.params.behaviour.enableRetry&&t.showButton("try-again"),t.showEvaluation(!t.instantFeedbackEvaluationFilled),t.instantFeedbackEvaluationFilled=!0):(t.instantFeedbackEvaluationFilled=!1,t.hideButton("try-again"),t.hideButton("show-solution"),t.hideEvaluation())},v.prototype.isAllAnswersFilled=function(){return this.draggables.every(function(t){return t.isInsideDropZone()})},v.prototype.enableAllDropzonesAndDraggables=function(){this.enableDraggables(),this.droppables.forEach(function(t){t.enableDropzone()})},v.prototype.disableDraggables=function(){this.draggables.forEach(function(t){t.disableDraggable()})},v.prototype.enableDraggables=function(){this.draggables.forEach(function(t){t.enableDraggable()})},v.prototype.getAnswerGiven=function(){return this.answered},v.prototype.getScore=function(){return this.calculateScore()},v.prototype.getMaxScore=function(){return this.droppables.length},v.prototype.getTitle=function(){return H5P.createTitle(this.contentData&&this.contentData.metadata&&this.contentData.metadata.title?this.contentData.metadata.title:"Drag the Words")},v.prototype.toggleDropEffect=function(){var t=void 0!==this.selectedElement;this.ariaDropControls[t?"setAllToMove":"setAllToNone"]()},v.prototype.getDraggableByElement=function(e){return this.draggables.filter(function(t){return t.$draggable.get(0)===e},this)[0]},v.prototype.getDroppableByElement=function(e){return this.droppables.filter(function(t){return t.$dropzone.get(0)===e},this)[0]},v.prototype.showSolutions=function(){this.showEvaluation(!0),this.droppables.forEach(function(t){t.addFeedback(),t.showSolution()}),this.removeAllDroppablesFromControls(),this.disableDraggables(),this.hideButton("try-again"),this.hideButton("show-solution"),this.hideButton("check-answer"),this.trigger("resize")},v.prototype.resetTask=function(){var t=this;t.answered=!1,t.instantFeedbackEvaluationFilled=!1,t.resetDraggables(),t.hideEvaluation(),t.hideExplanation(),t.enableAllDropzonesAndDraggables(),t.hideButton("try-again"),t.hideButton("show-solution"),t.params.behaviour.instantFeedback||t.showButton("check-answer"),t.hideAllSolutions(),this.trigger("resize")},v.prototype.resetDraggables=function(){c.default.shuffle(this.draggables).forEach(this.revert,this)},v.prototype.getCurrentState=function(){var e=this;if(void 0!==this.draggables)return this.draggables.filter(function(t){return null!==t.getInsideDropzone()}).map(function(t){return{draggable:t.getInitialIndex(),droppable:e.droppables.indexOf(t.getInsideDropzone())}})},v.prototype.setH5PUserState=function(){var i=this,n=this;void 0!==this.previousState&&(this.previousState.forEach(function(t){if(!n.isValidIndex(t.draggable)||!n.isValidIndex(t.droppable))throw new Error("Stored user state is invalid");var e=i.getDraggableByInitialIndex(t.draggable),t=n.droppables[t.droppable];n.drop(e,t),n.params.behaviour.instantFeedback&&(null!==t&&t.addFeedback(),t.isCorrect()&&t.disableDropzoneAndContainedDraggable())}),n.params.behaviour.instantFeedback&&n.isAllAnswersFilled()&&!n.showEvaluation()&&(n.params.behaviour.enableSolutionsButton&&(n.initShowShowSolutionButton=!0),n.params.behaviour.enableRetry&&(n.initShowTryAgainButton=!0)))},v.prototype.isValidIndex=function(t){return!isNaN(t)&&t";return t.description={"en-US":i+this.replaceSolutionsWithBlanks(e)},t.correctResponsesPattern=[this.getSolutionsFromQuestion(e)],t},v.prototype.addResponseToXAPI=function(t){var e,i=this.getScore(),n=this.droppables.length;t.setScoredResult(i,n,this);n={min:0,raw:i,max:n,scaled:Math.round(i/n*1e4)/1e4};this.stopWatch&&(e="PT"+this.stopWatch.stop()+"S"),t.data.statement.result={response:this.getXAPIResponse(),score:n,duration:e,completion:!0}},v.prototype.getXAPIResponse=function(){return this.droppables.map(function(t){return t.hasDraggable()?t.containedDraggable.text:""}).join("[,]")},v.prototype.replaceSolutionsWithBlanks=function(t){var e=this;return(0,r.parseText)(t).map(function(t){return e.isAnswerPart(t)?"__________":t}).join("")},v.prototype.getSolutionsFromQuestion=function(t){return(0,r.parseText)(t).filter(this.isAnswerPart).map(function(t){return(0,r.lex)(t)}).map(function(t){return t.text}).join("[,]")},v),e.default=H5P.DragText},function(t,e){},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=function(t,e,i){return e&&h(t.prototype,e),i&&h(t,i),t},o=i(1),s=i(0),r=(0,o.setAttribute)("aria-grabbed"),a=(0,o.attributeEquals)("aria-grabbed","true"),i=(0,s.filter)((0,o.hasAttribute)("aria-grabbed")),l=(0,s.compose)((0,s.forEach)((0,o.setAttribute)("aria-grabbed","false")),i),c=(0,s.compose)((0,s.some)(a),i),n=(n(u,[{key:"init",value:function(t){this.controls=t,this.controls.on("select",this.select,this)}},{key:"addElement",value:function(t){r("false",t),this.controls.addElement(t)}},{key:"setAllGrabbedToFalse",value:function(){l(this.controls.elements)}},{key:"hasAnyGrabbed",value:function(){return c(this.controls.elements)}},{key:"select",value:function(t){var e=t.element,t=a(e);this.setAllGrabbedToFalse(),t||r("true",e)}}]),u);function u(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u)}function h(t,e){for(var i=0;i",{html:l.params.incorrectText+" "+l.params.correctAnswer,class:"correct-answer"}),l.$correctText=c("
    ",{html:l.params.correctText,class:"correct-answer"}),l.$showSolution=c("
    ",{class:"h5p-drag-show-solution-container"}).appendTo(l.$dropzoneContainer).hide()}var c,o,s;Object.defineProperty(e,"__esModule",{value:!0}),H5P.TextDroppable=(c=H5P.jQuery,o="h5p-drag-correct-feedback",s="h5p-drag-wrong-feedback",n.prototype.removeTipTabIndexIfNoFocus=function(){var t=this;setTimeout(function(){t.$dropzone.is(":focus")||t.$tip.is(":focus")||t.$tip.attr("tabindex","-1")},0)},n.prototype.showSolution=function(){var t=null!==this.containedDraggable&&this.containedDraggable.getAnswerText()===this.text;t||this.$showSolution.html(this.text),this.$showSolution.prepend(t?this.$correctText:this.$incorrectText),this.$showSolution.toggleClass("incorrect",!t),this.$showSolution.show()},n.prototype.hideSolution=function(){this.$showSolution.html(""),this.$showSolution.hide()},n.prototype.getElement=function(){return this.$dropzone.get(0)},n.prototype.appendDroppableTo=function(t){this.$dropzoneContainer.appendTo(t)},n.prototype.appendInsideDroppableTo=function(t){if(null!==this.containedDraggable)return this.containedDraggable.revertDraggableTo(t),this.containedDraggable},n.prototype.setDraggable=function(t){this.containedDraggable!==t&&(null!==this.containedDraggable&&this.containedDraggable.removeFromZone(),(this.containedDraggable=t).addToZone(this))},n.prototype.hasDraggable=function(){return!!this.containedDraggable},n.prototype.removeDraggable=function(){null!==this.containedDraggable&&(this.containedDraggable=null)},n.prototype.isCorrect=function(){return null!==this.containedDraggable&&this.containedDraggable.getAnswerText()===this.text},n.prototype.addFeedback=function(){this.isCorrect()?(this.$dropzone.removeClass(s).addClass(o),this.containedDraggable.getDraggableElement().removeClass("h5p-drag-draggable-wrong").addClass("h5p-drag-draggable-correct")):null===this.containedDraggable?this.$dropzone.removeClass(s).removeClass(o):(this.$dropzone.removeClass(o).addClass(s),null!==this.containedDraggable&&this.containedDraggable.getDraggableElement().addClass("h5p-drag-draggable-wrong").removeClass("h5p-drag-draggable-correct"))},n.prototype.removeFeedback=function(){this.$dropzone.removeClass(s).removeClass(o),null!==this.containedDraggable&&this.containedDraggable.getDraggableElement().removeClass("h5p-drag-draggable-wrong").removeClass("h5p-drag-draggable-correct")},n.prototype.hasFeedback=function(){return this.$dropzone.hasClass(s)||this.$dropzone.hasClass(o)},n.prototype.setShortFormat=function(){null!==this.containedDraggable&&this.containedDraggable.setShortFormat()},n.prototype.disableDropzoneAndContainedDraggable=function(){null!==this.containedDraggable&&this.containedDraggable.disableDraggable(),this.$dropzone.droppable({disabled:!0})},n.prototype.enableDropzone=function(){this.$dropzone.droppable({disabled:!1})},n.prototype.removeShortFormat=function(){null!==this.containedDraggable&&this.containedDraggable.removeShortFormat()},n.prototype.getDropzone=function(){return this.$dropzone},n.prototype.getIndex=function(){return this.index},n),e.default=H5P.TextDroppable},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.lex=e.parseText=void 0;var i=i(2),o=i&&i.__esModule?i:{default:i};e.parseText=function(t){return t.split(/(\*.*?\*)/).filter(function(t){return 0"+t+"
    ").text().trim()},l=function(t){return void 0!==t};function c(t,e,i,n){l(i)?t[e]=i:n&&console.error("xApiEventBuilder: No value for ["+e+"] in",t)}return o.create=function(){return new o},o.createDefinition=function(){return new i},o.createResult=function(){return new n},o.createChoice=function(t,e){return{id:t,description:s(e)}},o.createCorrectResponsePattern=function(t){return t.join("[,]")},o.interactionTypes={CHOICE:"choice",COMPOUND:"compound",FILL_IN:"fill-in",MATCHING:"matching",TRUE_FALSE:"true-false"},o.verbs={ANSWERED:"answered"},o}(H5P.jQuery,H5P.EventDispatcher),/*!@license H5P.Summary-1.10/js/summary.js by Joubel licensed under MIT*/H5P.Summary=function(s,r,a,e){var l=0;function t(t,e,i){if(!(this instanceof H5P.Summary))return new H5P.Summary(t,e);if(this.id=this.contentId=e,this.contentData=i,this.summaryId=l,r.call(this,"summary"),this.offset=0,this.score=0,this.progress=0,this.answers=[],this.answer=[],this.errorCounts=[],l+=1,this.userResponses=[],this.dataBitMap=[],t.summaries&&(t.summaries=t.summaries.filter(function(t){return void 0!==t.summary})),i&&void 0!==i.previousState&&void 0!==i.previousState.progress&&i.previousState.answers){this.progress=i.previousState.progress||this.progress,this.answers=i.previousState.answers||this.answers;var n=this.progress;this.progress>=t.summaries.length&&(n=t.summaries.length-1);for(var o=0;o<=n;o++)void 0===this.errorCounts[o]&&(this.errorCounts[o]=0),this.answers[o]&&(this.score+=this.answers[o].length,this.errorCounts[o]++)}this.stopWatches=[],this.startStopWatch(this.progress),this.options=H5P.jQuery.extend({},{overallFeedback:[],resultLabel:"Your result:",intro:"Choose the correct statement.",solvedLabel:"Solved:",scoreLabel:"Wrong answers:",labelCorrect:"Correct.",labelIncorrect:"Incorrect! Please try again.",labelCorrectAnswers:"List of correct answers.",alternativeIncorrectLabel:"Incorrect",postUserStatistics:!0===H5P.postUserStatistics,tipButtonLabel:"Show tip",scoreBarLabel:"You got :num out of :total points",progressText:"Progress :num of :total"},t),this.summaries=this.options.summaries,this.setBehaviour({disableReadSpeaker:!0}),this.showSolutions=function(){},this.getMaxScore=function(){return this.summaries?this.summaries.length:0},this.getScore=function(){var n=this;return n.summaries?n.summaries.reduce(function(t,e,i){i=n.userResponses[i]||[];return t+(n.correctOnFirstTry(i)?1:0)},0):0},this.getTitle=function(){return H5P.createTitle(this.contentData&&this.contentData.metadata&&this.contentData.metadata.title?this.contentData.metadata.title:"Summary")},this.getCurrentState=function(){return{progress:this.progress,answers:this.answers}}}return((t.prototype=Object.create(r.prototype)).constructor=t).prototype.registerDomElements=function(){this.setContent(this.createQuestion())},t.prototype.createQuestion=function(){var e,h=this,t=0,d=[],p=H5P.jQuery;if(this.$myDom=p("
    ",{class:"summary-content"}),this.$answerAnnouncer=p("
    ",{class:"hidden-but-read","aria-live":"assertive",appendTo:this.$myDom}),void 0!==h.summaries&&0!==h.summaries.length){for(var i=0;i
    '),m=p('
      '),g=p('
      '),v=p('
      '+h.options.intro+"
      "),b=p('
      '),a=p('
      '),y=p('
      '),w=p(''),x=parseInt(a.css("paddingLeft")),l=p('
      '+h.options.labelCorrectAnswers+"
      ");this.score&&b.html(h.options.scoreLabel+" "+this.score).show(),f.attr("aria-hidden","true"),f.html(l),f.append(m),this.$myDom.append(f),this.$myDom.append(g),this.$myDom.append(a),g.append(v),g.append(g),g.append(y),g.append(w),g.append(b);function c(t,n){var o,e,i,s,r,a,l,c=Number(t.attr("data-bit")),u=Number(t.parent().data("panel"));"true"!=t.attr("aria-checked")&&(void 0===h.errorCounts[u]&&(h.errorCounts[u]=0),h.storeUserResponse(u,c),h.answer[c]?(h.announceAnswer(!0),h.stopStopWatch(u),h.progress++,i=t.position(),l=m.position(),o=p('
    • '+t.html()+"
    • "),w.html(h.options.solvedLabel+" "+(u+1)+"/"+h.summaries.length),e=h.options.progressText.replace(":num",u+1).replace(":total",h.summaries.length),y.html(e),t.attr("aria-checked","true"),m.append(o),f.addClass("has-results"),f.attr("aria-hidden","false"),h.adjustTargetHeight(f,m,o),o.css({display:"block",width:t.css("width"),height:t.css("height")}),o.css({position:"absolute",top:i.top,left:i.left}),o.css({backgroundColor:"#9dd8bb",border:""}),setTimeout(function(){o.css({backgroundColor:""})},1),i=parseInt(t.parent().attr("data-panel")),s=p(".h5p-panel:eq("+i+")",h.$myDom),r=p(".h5p-panel:eq("+(i+1)+")",h.$myDom),a=0===r.length,s.addClass("panel-disabled"),v.find(".joubel-tip-container").remove(),void 0!==d[h.progress]&&void 0!==d[h.progress].tip&&0'+k.text+""),f.addClass("has-results");break}}var P=p('
        ');0==u&&void 0!==C.tip&&0'+C.summaries[s].text+"");0==s?T.attr("tabindex","0"):T.attr("tabindex","-1"),T.on("focus",function(){var t=p(this).attr("data-name");H(t)});var H=function(t){e=t};"summary-failed"!==_?(T.click(function(){c(p(this))}).keydown(function(t){switch(t.which){case 13:case 32:c(p(this),!0),t.preventDefault();break;case 37:case 38:h.gotoPreviousOption(h,e),t.preventDefault();break;case 39:case 40:h.gotoNextOption(h,e),t.preventDefault()}}),P.append(T)):P.append(T)}a.append(P)}return h.progress===d.length?(v.html(h.options.resultLabel),h.doFinalEvaluation()):(p(".h5p-panel:eq("+h.progress+")",h.$myDom).css({display:"block"}),h.progress&&(h.offset=p(".summary-claim-unclicked:visible:first",h.$myDom).outerHeight()*h.errorCounts.length)),h.trigger("resize"),this.$myDom}},t.prototype.announceAnswer=function(t){t=t?this.options.labelCorrect:this.options.labelIncorrect;this.$answerAnnouncer.html(t),setTimeout(function(){this.$answerAnnouncer.html("")}.bind(this),100)},t.prototype.getAnswerGiven=function(){return 0parseInt(t.css("height"))&&t.animate({height:i})},t.prototype.countErrors=function(){for(var t=0,e=0;e'),t.width=t.height=t.id=t.w3c=t.src=null,t.onFail=t.version=t.expressInstall=null,t)t[i]&&(n+='');var o,s="";if(e){for(var r in e)e[r]&&(o=e[r],s+=r+"="+(/function|object/.test(typeof o)?c.asString(o):o)+"&");n+='"}return n+=""},isSupported:function(t){return r[0]>t[0]||r[0]==t[0]&&r[1]>=t[1]}}),r=c.getVersion();function u(t,e,i){var n;c.isSupported(e.version)?t.innerHTML=c.getHTML(e,i):e.expressInstall&&c.isSupported([6,65])?t.innerHTML=c.getHTML(l(e,{src:e.expressInstall}),{MMredirectURL:encodeURIComponent(location.href),MMplayerType:"PlugIn",MMdoctitle:document.title}):(t.innerHTML.replace(/\s/g,"")||(t.innerHTML="

        Flash version "+e.version+" or greater is required

        "+(0"+("A"==t.tagName?"

        Click here to download latest version

        ":"

        Download latest version from here

        "),"A"!=t.tagName&&"DIV"!=t.tagName||(t.onclick=function(){location.href=o})),!e.onFail||"string"==typeof(n=e.onFail.call(this))&&(t.innerHTML=n)),a&&(window[e.id]=document.getElementById(e.id)),l(this,{getRoot:function(){return t},getOptions:function(){return e},getConf:function(){return i},getApi:function(){return t.firstChild}})}t&&(jQuery.tools=jQuery.tools||{version:"3.2.12"},jQuery.tools.flashembed={conf:s},jQuery.fn.flashembed=function(t,e){return this.each(function(){$(this).data("flashembed",flashembed(this,t,e))})})}(),/*!@license H5P.Video-1.5/scripts/youtube.js by Joubel licensed under MIT*/ H5P.VideoYouTube=function(t){function e(i,o,s){var r,a=this,l=1,c="h5p-youtube-"+m;m++;var u=t("
        "),h=t("
        ",{id:c,text:s.loading}).appendTo(u),d=function(){var t,n,e;h.is(":visible")&&void 0===r&&(void 0!==window.YT?void 0!==YT.Player&&((t=u.width())<200&&(t=200),n=!0,e=p(i[0].path),r=new YT.Player(c,{width:t,height:t*(9/16),videoId:e,playerVars:{origin:g,autoplay:o.autoplay?1:0,controls:o.controls?1:0,disablekb:o.controls?0:1,fs:0,playlist:o.loop?e:void 0,rel:0,showinfo:0,iv_load_policy:3,wmode:"opaque",start:o.startAt,playsinline:1},events:{onReady:function(){a.trigger("ready"),a.trigger("loaded")},onApiChange:function(){var t;n&&(n=!1,r.loadModule("captions"));try{t=r.getOption("captions","tracklist")}catch(t){}if(t&&t.length){for(var e=[],i=0;i"),c=t("
        ",{id:a,html:"
        "+o.loading+"
        "}).appendTo(l),u=function(){var t,e;c.is(":visible")&&void 0===s&&(void 0!==window.EmbedApi?((t=l.width())<200&&(t=200),e=d(i[0].path),s=new EmbedApi(a,{width:t,height:t*(9/16),serverName:e[0],sessionId:e[1],videoParams:{interactivity:"none",showtitle:!1,autohide:!0,offerviewer:!1,autoplay:!!n.autoplay,showbrand:!1,start:0,hideoverlay:!n.controls},events:{onIframeReady:function(){c.children(0).text(""),r.trigger("loaded")},onReady:function(){if(r.trigger("loaded"),s.hasCaptions()){const e=[];var t=s.getCaptionTracks();for(trackIndex in t)e.push(new H5P.Video.LabelValue(t[trackIndex],trackIndex));h=s.getSelectedCaptionTrack(),h=e[h]||null,r.trigger("captions",e)}},onStateChange:function(t){-1",{class:"h5p-video-loading"}),d=y("
        ",{class:"h5p-video-error"}),p=!1,f=1,m=!1,g=document.createElement("video"),v=w(t,g);for(u in numQualities=0,v)numQualities++;if(1i&&g.currentTime",{class:"h5p-video-flash",css:{width:"100%",height:"100%"}}),a=c("
        ",{class:"h5p-video-error"}),t={buffering:!0,clip:{url:t[0].path,autoPlay:e.autoplay,autoBuffering:!0,scaling:"fit",onSeek:function(){},onMetaData:function(){setTimeout(function(){void 0!==i?(l.seek(n),i===H5P.Video.PLAYING&&l.play(),i=void 0,a.is(":visible")&&a.remove()):(s.trigger("ready"),s.trigger("loaded"))},0)},onBegin:function(){s.trigger("stateChange",H5P.Video.PLAYING)},onResume:function(){s.trigger("stateChange",H5P.Video.PLAYING)},onPause:function(){s.trigger("stateChange",H5P.Video.PAUSED)},onFinish:function(){s.trigger("stateChange",H5P.Video.ENDED)},onError:function(t,e){console.log("ERROR",t,e),s.trigger("error",e)}},plugins:{controls:null},play:null,onPlaylistReplace:function(){that.playlistReplaced()}};e.controls&&(t.plugins.controls={},delete t.play);var l=flowplayer(r[0],{src:"http://releases.flowplayer.org/swf/flowplayer-3.2.16.swf",wmode:"opaque"},t);s.appendTo=function(t){r.appendTo(t)},s.getQualities=function(){},s.getQuality=function(){return o},s.setQuality=function(t){void 0!==qualities[t]&&t!==o&&(setPreferredQuality(t),i||(i=lastState,n=video.currentTime),o=t,s.trigger("qualityChange",o),s.trigger("stateChange",H5P.Video.BUFFERING),l.setClip(qualities[t].source.path),l.startBuffering())},s.play=function(){a.is(":visible")||l.play()},s.pause=function(){l.pause()},s.seek=function(t){l.seek(t)},s.getCurrentTime=function(){return l.getTime()},s.getDuration=function(){return l.getClip().metaData.duration},s.getBuffered=function(){return l.getClip().buffer},s.mute=function(){l.mute()},s.unMute=function(){l.unmute()},s.isMuted=function(){return l.muted},s.getVolume=function(){return 100*l.volumeLevel},s.setVolume=function(t){l.volume(t/100)},s.on("resize",function(){var t=H5P.jQuery(l.getParent()).children("object"),e=l.getClip();void 0!==e&&t.css("height",t.width()*(e.metaData.height/e.metaData.width))})}return t.canPlay=function(t){for(var e=0;e");return t.LabelValue=function(t,e){this.label=t,this.value=e},t.IE11_PLAYBACK_RATE_FIX=!!navigator.userAgent.match(/Trident.*rv[ :]*11\./),t}(H5P.jQuery,(H5P.ContentCopyrights,H5P.MediaCopyright,H5P.videoHandlers||[])),(H5P=H5P||{}).DragNDrop=function(t,e){H5P.EventDispatcher.call(this),this.dnb=t,this.$container=e,this.scrollLeft=0,this.scrollTop=0},H5P.DragNDrop.prototype=Object.create(H5P.EventDispatcher.prototype),H5P.DragNDrop.prototype.constructor=H5P.DragNDrop,H5P.DragNDrop.prototype.setElement=function(t){this.$element=t},H5P.DragNDrop.prototype.press=function(t,e,i){var n={instance:this};H5P.$window.mousemove(n,H5P.DragNDrop.moveHandler).bind("mouseup",n,H5P.DragNDrop.release),H5P.$body.css({"-moz-user-select":"none","-webkit-user-select":"none"}).attr("unselectable","on")[0].onselectstart=H5P.$body[0].ondragstart=function(){return!1},this.containerOffset=t.offsetParent().offset(),this.$element=t,this.moving=!1,this.startX=e,this.startY=i,this.marginX=parseInt(t.css("marginLeft"))+parseInt(t.css("marginRight")),this.marginY=parseInt(t.css("marginTop"))+parseInt(t.css("marginBottom"));t=t.offset();this.adjust={x:e-t.left+this.marginX,y:i-t.top-this.marginY},this.dnb&&this.dnb.newElement&&this.move(e,i)},H5P.DragNDrop.moveHandler=function(t){t.stopPropagation(),t.data.instance.move(t.pageX,t.pageY)},H5P.DragNDrop.prototype.move=function(t,e){var i=this;if(!i.moving){if(void 0!==i.startMovingCallback&&!i.startMovingCallback(t,e))return;i.moving=!0,i.$element.addClass("h5p-moving")}t-=i.adjust.x,e-=i.adjust.y;var n=t-i.containerOffset.left+i.scrollLeft,o=e-i.containerOffset.top+i.scrollTop;void 0!==i.snap&&(n=Math.round(n/i.snap)*i.snap,o=Math.round(o/i.snap)*i.snap),void 0!==i.min&&(ni.max.x&&(n=i.max.x,t=i.max.x+i.containerOffset.left-i.scrollLeft),o>i.max.y&&(o=i.max.y,e=i.max.y+i.containerOffset.top-i.scrollTop));var s=i.startX-i.adjust.x-i.containerOffset.left+i.scrollLeft,r=i.startY-i.adjust.y-i.containerOffset.top+i.scrollTop;i.snap||n===s&&o===r?i.snap&&(s=Math.round(n/i.snap)*i.snap!=Math.round(s/i.snap)*i.snap,r=Math.round(o/i.snap)*i.snap!=Math.round(r/i.snap)*i.snap,(s||r)&&i.trigger("showTransformPanel")):i.trigger("showTransformPanel"),i.$element.css({left:n,top:o}),i.dnb&&i.dnb.updateCoordinates(),void 0!==i.moveCallback&&i.moveCallback(t,e,i.$element)},H5P.DragNDrop.release=function(t){var e=t.data.instance;H5P.$window.unbind("mousemove",H5P.DragNDrop.moveHandler).unbind("mouseup",H5P.DragNDrop.release),H5P.$body.css({"-moz-user-select":"","-webkit-user-select":""}).removeAttr("unselectable")[0].onselectstart=H5P.$body[0].ondragstart=null,void 0!==e.releaseCallback&&e.releaseCallback(),e.moving&&(e.$element.removeClass("h5p-moving"),void 0!==e.stopMovingCallback&&e.stopMovingCallback(t)),e.trigger("hideTransformPanel")},/*!@license H5P.DragNResize-1.2/H5P.DragNResize.js by Frode Petterson licensed under unknown license*/ H5P.DragNResize=function(t,i){function o(t){var e=this;this.$container=t,e.disabledModifiers=!1,this.minSize=H5P.DragNResize.MIN_SIZE,i.call(this),H5P.$body.keydown(function(t){e.disabledModifiers||(17===t.keyCode?e.revertSnap=!0:16===t.keyCode&&(e.revertLock=!0))}).keyup(function(t){e.disabledModifiers||(17===t.keyCode?e.revertSnap=!1:16===t.keyCode&&(e.revertLock=!1))})}return((o.prototype=Object.create(i.prototype)).constructor=o).prototype.add=function(n,o){function e(e,i){t("
        ",{class:"h5p-dragnresize-handle "+e}).mousedown(function(t){s.lock=o&&(o.lock||i&&o.cornerLock),o.cornerLock&&(s.isImage=!0),s.$element=n,s.press(t.clientX,t.clientY,e,o.minSize)}).data("position",e).appendTo(n)}var s=this;o.directionLock||["nw","ne","sw","se"].forEach(function(t){e(t,!0)}),o&&o.lock||("vertical"!=o.directionLock&&["w","e"].forEach(function(t){e(t)}),"horizontal"!=o.directionLock&&["n","s"].forEach(function(t){e(t)})),o.minSize?this.minSize=o.minSize:this.minSize=H5P.DragNResize.MIN_SIZE},o.prototype.getElementPaddings=function(){return{horizontal:Number(this.$element.css("padding-left").replace("px",""))+Number(this.$element.css("padding-right").replace("px","")),vertical:Number(this.$element.css("padding-top").replace("px",""))+Number(this.$element.css("padding-bottom").replace("px",""))}},o.prototype.getElementBorders=function(){return{horizontal:Number(this.$element.css("border-left-width").replace("px",""))+Number(this.$element.css("border-right-width").replace("px","")),vertical:Number(this.$element.css("border-top-width").replace("px",""))+Number(this.$element.css("border-bottom-width").replace("px",""))}},o.prototype.setContainerEm=function(t){this.containerEm=t},o.prototype.press=function(t,e,i,n){this.active=!0;i={instance:this,direction:i};this.minSize=n||H5P.DragNResize.MIN_SIZE,H5P.$window.bind("mouseup",i,o.release).mousemove(i,o.move),H5P.$body.css({"-moz-user-select":"none","-webkit-user-select":"none","user-select":"none","-ms-user-select":"none"}).attr("unselectable","on")[0].onselectstart=H5P.$body[0].ondragstart=function(){return!1},this.startX=t,this.startY=e,this.padding=this.getElementPaddings(),this.borders=this.getElementBorders(),this.startWidth=this.$element.outerWidth(),this.startHeight=this.$element.outerHeight(),this.ratio=this.startWidth/this.startHeight;e=this.$element.position();this.left=e.left,this.top=e.top,this.containerWidth=this.$container.width(),this.containerHeight=this.$container.height(),this.newLeft=this.left,this.newTop=this.top,this.newWidth=this.startWidth,this.newHeight=this.startHeight,this.trigger("startResizing",i),this.trigger("showTransformPanel")},o.move=function(t){var e=t.data.direction||"se",i=t.data.instance,n="nw"===e||"sw"===e||"w"===e,o="nw"===e||"ne"===e||"n"===e,s="nw"===e||"ne"===e||"sw"===e||"se"===e,r="w"===e||"e"===e,a="n"===e||"s"===e,e=i.startX-t.clientX,t=i.startY-t.clientY;i.minLeft=i.left+i.startWidth-i.minSize,i.minTop=i.top+i.startHeight-i.minSize,n?(i.newLeft=i.left-e,i.newWidth=i.startWidth+e,i.newLeft<0?(i.newLeft=0,i.newWidth=i.left+i.startWidth):i.newLeft>i.minLeft&&(i.newLeft=i.minLeft,i.newWidth=i.left-i.minLeft+i.startWidth),i.snap&&!i.revertSnap&&(i.newLeft=Math.round(i.newLeft/i.snap)*i.snap,i.newLeft>i.minLeft&&(i.newLeft=Math.floor(i.minLeft/i.snap)*i.snap),i.newWidth=i.left-i.newLeft+i.startWidth)):a||(i.newWidth=i.startWidth-e,i.snap&&!i.revertSnap&&(i.newWidth=Math.round(i.newWidth/i.snap)*i.snap),i.left+i.newWidth>i.containerWidth&&(i.newWidth=i.containerWidth-i.left)),o?(i.newTop=i.top-t,i.newHeight=i.startHeight+t,i.newTop<0?(i.newTop=0,i.newHeight=i.top+i.startHeight):i.newTop>i.minTop&&(i.newTop=i.minTop,i.newHeight=i.top-i.minTop+i.startHeight),i.snap&&!i.revertSnap&&(i.newTop=Math.round(i.newTop/i.snap)*i.snap,i.newTop>i.minTop&&(i.newTop=Math.floor(i.minTop/i.snap)*i.snap),i.newHeight=i.top-i.newTop+i.startHeight)):r||(i.newHeight=i.startHeight-t,i.snap&&!i.revertSnap&&(i.newHeight=Math.round(i.newHeight/i.snap)*i.snap),i.top+i.newHeight>i.containerHeight&&(i.newHeight=i.containerHeight-i.top)),i.newWidth<=i.minSize&&(i.newWidth=i.minSize),i.newHeight<=i.minSize&&(i.newHeight=i.minSize),!(i.revertLock?!i.lock:i.lock)||!s&&i.isImage||i.lockDimensions(n,o,a,r),i.finalWidth=i.newWidth,i.finalHeight=i.newHeight,"border-box"!==i.$element.css("boxSizing")&&(i.finalWidth-=i.padding.horizontal+i.borders.horizontal,i.finalHeight-=i.padding.vertical+i.borders.vertical),i.$element.css({width:i.finalWidth/i.containerEm+"em",height:i.finalHeight/i.containerEm+"em",left:i.newLeft/i.containerWidth*100+"%",top:i.newTop/i.containerHeight*100+"%"}),i.trigger("moveResizing")},o.prototype.lockDimensions=function(t,e,i,n){function o(t){t&&(s.newTop=s.top-(s.newHeight-s.startHeight),s.newTop<=0&&(s.newTop=0))}var s=this;i?(this.newWidth=this.newHeight*this.ratio,this.newWidththis.newHeight/this.startHeight?this.newHeight=this.newWidth/this.ratio:this.newWidth=this.newHeight*this.ratio,e?(o(e),s.newTop<=0&&(s.newHeight=s.top+s.startHeight,s.newWidth=s.newHeight*s.ratio)):this.top+this.newHeight>this.containerHeight&&(this.newHeight=this.containerHeight-this.top,this.newWidth=this.newHeight*this.ratio),t?(this.newLeft=this.left-(this.newWidth-this.startWidth),this.newLeft<=0&&(this.newLeft=0,this.newWidth=this.left+this.startWidth,this.newHeight=this.newWidth/this.ratio)):this.left+this.newWidth>this.containerWidth&&(this.newWidth=this.containerWidth-this.left,this.newHeight=this.newWidth/this.ratio),o(e)},o.release=function(t){var e=t.data.instance;e.active=!1,H5P.$window.unbind("mouseup",o.release).unbind("mousemove",o.move),H5P.$body.css({"-moz-user-select":"","-webkit-user-select":"","user-select":"","-ms-user-select":""}).removeAttr("unselectable")[0].onselectstart=H5P.$body[0].ondragstart=null,e.newWidth===e.startWidth&&e.newHeight===e.startHeight||e.trigger("stoppedResizing",{left:e.newLeft,top:e.newTop,width:e.finalWidth/e.containerEm,height:e.finalHeight/e.containerEm}),setTimeout(function(){e.$element.focus()},0),e.trigger("hideTransformPanel")},o.prototype.toggleModifiers=function(t){this.disabledModifiers=void 0===t?!this.disabledModifiers:!t},o.MIN_SIZE=24,o}(H5P.jQuery,H5P.EventDispatcher),/*!@license H5P.DragNBar-1.5/scripts/drag-n-bar.js by Joubel licensed under unknown license*/ H5P.DragNBar=function(o){var r=0;function t(t,e,i,n){var s=this;o.call(this),this.overflowThreshold=13,this.buttons=t,this.$container=e,this.$dialogContainer=i,this.dnd=new H5P.DragNDrop(this,e),this.dnd.snap=10,this.newElement=!1;n=H5P.jQuery.extend({disableEditor:!1,enableCopyPaste:!0},n),this.enableCopyPaste=n.enableCopyPaste,this.isEditor=!n.disableEditor,this.$blurHandlers=n.$blurHandlers||void 0,this.libraries=n.libraries,this.instanceIndex=r++,this.elements=[],this.dialog=new H5P.DragNBarDialog(i,e),this.$container.addClass("hardware-accelerated"),this.isEditor&&(this.transformButtonActive=!1,this.initEditor(),this.initClickListeners(),H5P.$window.resize(function(){s.resize()})),this.addButtonGroup=function(t,e,i){const n=H5P.jQuery('
      • ');i&&i.title&&""!==i.title&&H5P.jQuery('
        '+i.title+"
        ").appendTo(n);const o=H5P.jQuery('
          ').appendTo(n);return t.forEach(function(t){s.addButton(t,o)}),n.insertAfter(e.parent()),n}}return(t.prototype=Object.create(o.prototype)).constructor=t}(H5P.EventDispatcher),H5P.DragNBar.prototype.initEditor=function(){var i=this;function t(t){i.focusedElement&&i.focusedElement.contextMenu.trigger("contextMenuTransform",{showTransformPanel:t})}this.dnr=new H5P.DragNResize(this.$container),this.dnr.snap=10,this.dnr.on("moveResizing",function(){var t=i.$element.offset(),e=i.$element.position();i.updateCoordinates(t.left,t.top,e.left,e.top)}),this.dnr.on("stoppedResizing",function(){i.pressed=!0,setTimeout(function(){delete i.pressed},10)}),this.dnr.on("showTransformPanel",function(){t(!0)}),this.dnd.on("showTransformPanel",function(){t(!0)}),this.dnr.on("hideTransformPanel",function(){i.transformButtonActive||t(!1)}),this.dnd.on("hideTransformPanel",function(){i.transformButtonActive||t(!1)}),this.dnd.startMovingCallback=function(){return i.dnd.min={x:0,y:0},i.dnd.max={x:i.$container.width()-i.$element.outerWidth(),y:i.$container.height()-i.$element.outerHeight()},i.newElement&&(i.dnd.adjust.x=10,i.dnd.adjust.y=10,i.dnd.min.y-=i.$list.height()),!0},this.dnd.stopMovingCallback=function(){var t={};i.newElement&&(i.$container.css("overflow",""),Math.round(parseFloat(i.$element.css("top")))<0&&(t.x=i.dnd.max.x/2,t.y=i.dnd.max.y/2,i.avoidOverlapping(t,i.$element))),void 0!==t.x&&void 0!==t.y||(t.x=Math.round(parseFloat(i.$element.css("left"))),t.y=Math.round(parseFloat(i.$element.css("top")))),i.stopMoving(t.x,t.y),i.newElement=!1,delete i.dnd.min,delete i.dnd.max}},H5P.DragNBar.prototype.avoidOverlapping=function(t,e){var i=e;i instanceof H5P.jQuery?(i=window.getComputedStyle(i[0]),i={width:parseFloat(i.width),height:parseFloat(i.height)}):e=void 0;for(var n=window.getComputedStyle(this.$container[0]),o=parseFloat(n.width)-i.width,s=parseFloat(n.height)-i.height,r=0;r<16&&this.elementOverlaps(t.x,t.y,e);)0

        ').appendTo(t);this.$list=i;for(var n=0;n
          ');i=s.appendTo(i).click(function(t){i.stop().slideToggle(300),t.preventDefault()}).children(":first").next(),H5P.jQuery(document).click(function(t){H5P.jQuery(t.target).is(s.find(".h5p-dragnbar-more-button"))||"none"===i.css("display")||i.stop().slideToggle(300)})}this.addButton(o,i)}this.enableCopyPaste&&(this.$pasteButton=H5P.jQuery('
        • '),H5P.jQuery("",{class:"h5p-dragnbar-tooltip",text:H5PEditor.t("H5P.DragNBar","paste")}).appendTo(this.$pasteButton),this.$pasteButton.find(".h5p-dragnbar-paste-button").click(function(t){t.preventDefault(),e.pasteHandler()}),this.buttons.length>this.overflowThreshold?this.$pasteButton.insertAfter(i.parent()):this.$pasteButton.appendTo(i)),this.containTooltips()},H5P.DragNBar.prototype.addButton=function(i,t){var n=this,e=i.title&&""!==i.title,o=e?' aria-label="'+i.title+'"':"",s=H5P.jQuery('
        • ").appendTo(t);e&&H5P.jQuery("",{class:"h5p-dragnbar-tooltip",text:i.title}).appendTo(s);let r;"group"===i.type&&(r=this.addButtonGroup(i.buttons,s,{title:i.titleGroup}),r.addClass("h5peditor-dragnbar-gone"),H5P.jQuery(document).click(function(t){var e=H5P.jQuery(t.target).is(s),t=1===H5P.jQuery(t.target).closest(".h5p-dragnbar-button-group").length;e||t||(r.toggleClass("h5peditor-dragnbar-gone",!0),s.find(".h5p-dragnbar-tooltip").toggleClass("h5peditor-dragnbar-gone",!1))})),s.hover(function(){n.containTooltips()}).children().click(function(){return!1}).mousedown(function(t){var e;1===t.which&&("group"===i.type?void 0!==r&&(e=parseFloat(s.closest(".h5p-dragnbar").css("padding-left")),0<(e=s.position().left-r.position().left-e)&&r.css("left",e),r.toggleClass("h5peditor-dragnbar-gone"),s.find(".h5p-dragnbar-tooltip").toggleClass("h5peditor-dragnbar-gone")):(n.newElement=!0,n.pressed=!0,e=i.createElement(),n.$element=e,n.$container.css("overflow","visible"),n.dnd.press(n.$element,t.pageX,0),n.focus(n.$element)))})},H5P.DragNBar.prototype.containTooltips=function(){var n=this.$container.outerWidth();this.$list.find(".h5p-dragnbar-tooltip").each(function(){var t=H5P.jQuery(this).outerWidth(),e=H5P.jQuery(this).parents(".h5p-dragnbar-li").last().outerWidth();H5P.jQuery(this).css("left",-t/2+e/2+"px");var i=H5P.jQuery(this).position().left+=H5P.jQuery(this).parents(".h5p-dragnbar-li").last().position().left;i<=0&&H5P.jQuery(this).css("left",0),nt.containerWidth&&(e.left=t.containerWidth-t.width,e.left<0&&(e.left=0,e.width=t.containerWidth)),t.top<0&&(e.top=t.top=0),t.height+t.top>t.containerHeight&&(e.top=t.containerHeight-t.height,e.top<0&&(e.top=0,e.height=t.containerHeight)),e},H5P.DragNBar.prototype.remove=function(){var t=this.instanceIndex;H5P.$body.off("keydown.dnb"+t,H5P.DragNBar.keydownHandler).off("keypress.dnb"+t,H5P.DragNBar.keypressHandler).off("keyup.dnb"+t,H5P.DragNBar.keyupHandler).off("click.dnb"+t,H5P.DragNBar.clickHandler)},/*!@license H5P.DragNBar-1.5/scripts/context-menu.js by Joubel licensed under unknown license*/ H5P.DragNBarContextMenu=function(l,a){function t(t,e,i,n,o,s){var r=this;a.call(this),this.dnb=e.dnb,this.directionLock=s,this.dnbElement=e,this.$contextMenu=l("
          ",{class:"h5p-dragnbar-context-menu"}),this.$buttons=l("
          ",{class:"h5p-context-menu-buttons"}),this.$transformPanel=l("
          ",{class:"h5p-transform-panel hide"}),this.$parent=t,this.hasCoordinates=void 0===i||i,this.canResize=!n,this.showingTransformPanel=!1,this.buttons=[{name:"Edit",label:H5PEditor.t("H5P.DragNBar","editLabel")},{name:"BringToFront",label:H5PEditor.t("H5P.DragNBar","bringToFrontLabel")},{name:"SendToBack",label:H5PEditor.t("H5P.DragNBar","sendToBackLabel")},{name:"Remove",label:H5PEditor.t("H5P.DragNBar","removeLabel")}],o||this.buttons.splice(1,0,{name:"Copy",label:H5PEditor.t("H5P.DragNBar","copyLabel")}),r.on("contextMenuTransform",function(t){t&&void 0!==t.data.showTransformPanel?r.showingTransformPanel=t.data.showTransformPanel:r.showingTransformPanel=!r.showingTransformPanel,"Transform"===t.data.button&&(r.dnb.transformButtonActive?r.dnb.transformButtonActive=!1:r.dnb.transformButtonActive=!0),0==t.data.showTransformPanel&&(r.dnb.transformButtonActive=!1),r.toggleButtonsBar(!r.showingTransformPanel),r.toggleTransformPanel(r.showingTransformPanel),r.$transformButtonWrapper.toggleClass("active",r.showingTransformPanel),r.dnb.updateCoordinates()}),this.updateContextMenu()}return((t.prototype=Object.create(a.prototype)).constructor=t).prototype.addCoordinates=function(){var r;this.hasCoordinates&&!this.$coordinates&&((r=this).$coordinates=l('
          '+H5PEditor.t("H5P.DragNBar","positionLabel")+'
          ,
          ').mousedown(function(){r.dnb.pressed=!0}).appendTo(this.$transformPanel),this.$x=this.$coordinates.find(".h5p-dragnbar-x"),this.$y=this.$coordinates.find(".h5p-dragnbar-y"),this.$x.add(this.$y).on("change keydown",function(t){var e,i,n,o,s;"change"!==t.type&&13!==t.which||(e=Number(r.$x.val()),i=Number(r.$y.val()),isNaN(e)||isNaN(i)||(o=n=0,s={x:r.dnb.$container.width()-r.dnbElement.getElement().outerWidth(),y:r.dnb.$container.height()-r.dnbElement.getElement().outerHeight()},r.dnb.stopMoving(e=s.x<(e=e<0?n:e)?s.x:e,i=s.y<(i=i<0?o:i)?s.y:i),13===t.which&&setTimeout(function(){t.target.focus(),t.target.setSelectionRange(0,t.target.value.length)},0),r.dnb.updateCoordinates()))}).click(function(t){t.target.focus(),t.target.setSelectionRange(0,t.target.value.length)}))},t.prototype.updateCoordinates=function(t,e,i,n){this.$contextMenu.css({left:t,top:e}),this.hasCoordinates&&(this.$x.val(Math.round(i)),this.$y.val(Math.round(n)))},t.prototype.addDimensions=function(){var a=this;a.$dimensions=l("
          ",{class:"h5p-dragnbar-dimensions"}),l("
          ",{class:"h5p-dragnbar-label",appendTo:a.$dimensions,text:H5PEditor.t("H5P.DragNBar","sizeLabel")});function t(t){var e,i,n,o,s,r=parseFloat(this.value);isNaN(r)||(e=a.dnbElement.getElement(),i=H5P.DragNResize.MIN_SIZE,s=parseFloat(window.getComputedStyle(a.dnb.$container[0])[t]),o=window.getComputedStyle(e[0]),(n=s-parseFloat(o["width"===t?"left":"top"]))<(r=r",{class:"h5p-dragnbar-dimensions-separator",text:"×",appendTo:a.$dimensions}),a.$height=a.getNewInput("height",H5PEditor.t("H5P.DragNBar","heightLabel"),a.$dimensions,t,"horizontal"===a.directionLock),a.dnb.dnr.on("moveResizing",function(){a.updateDimensions()}),a.$dimensions.appendTo(a.$transformPanel)},t.prototype.addTransform=function(t){var e={name:"Transform",label:H5PEditor.t("H5P.DragNBar","transformLabel")},i=l("
          ",{class:"h5p-transform-button-wrapper"});return t&&this.createButton(e).appendTo(i),this.$transformButtonWrapper=i},t.prototype.updateDimensions=function(){var t=this.dnbElement.getElement(),e=window.getComputedStyle(t[0]),i=t[0].getBoundingClientRect().width-parseFloat(e.width),t=t[0].getBoundingClientRect().height-parseFloat(e.height);this.$width.val(Math.round(parseFloat(e.width)+i)),this.$height.val(Math.round(parseFloat(e.height)+t))},t.prototype.getNewInput=function(i,t,e,n,o){var e=l("
          ",{class:"h5p-dragnbar-input h5p-dragnbar-"+i,"aria-label":t,appendTo:e}),s=l("",{maxLength:5,disabled:!0===o,on:{change:function(){n.call(this,i)},keydown:function(t){var e;13===t.which?(n.call(this,i),s.focus().select()):38!==t.which&&40!==t.which||(e=parseFloat(s.val()),isNaN(e)||(s.val(e+(38===t.which?1:-1)),n.call(this,i)))},keyup:function(t){38!==t.which&&40!==t.which||s.select()},click:function(){s.select()}},appendTo:e});return s},t.prototype.addToMenu=function(t){this.createButton(t).appendTo(this.$buttons)},t.prototype.createButton=function(t){var e=this;return l("
          ",{class:"h5p-dragnbar-context-menu-button "+t.name.toLowerCase(),role:"button",tabindex:0,"aria-label":t.label}).click(function(){e.dnb.pressed=!0,e.trigger("contextMenu"+t.name,{button:t.name})}).keydown(function(t){32===t.which&&l(this).click()})},t.prototype.removeFromMenu=function(t){this.$buttons.children(".h5p-context-menu-button-"+t).remove()},t.prototype.updateContextMenu=function(){var e=this;this.$buttons.children().remove();var t=!1;this.hasCoordinates&&(this.addCoordinates(),t=!0),this.canResize&&(this.addDimensions(),t=!0),this.buttons.forEach(function(t){e.addToMenu(t)}),this.addTransform(t).appendTo(this.$contextMenu),this.$buttons.appendTo(this.$contextMenu),this.$transformPanel.appendTo(this.$contextMenu)},t.prototype.addButton=function(t,e){this.buttons.push({name:t,label:e}),this.updateContextMenu()},t.prototype.removeButton=function(i){var n=this;n.buttons.forEach(function(t,e){t.name===i&&n.buttons.splice(e,1)}),this.updateContextMenu()},t.prototype.toggleButtonsBar=function(t){void 0!==t?this.$buttons.toggleClass("hide",!t):this.$buttons.toggleClass("hide")},t.prototype.toggleTransformPanel=function(t){void 0!==t?this.$transformPanel.toggleClass("hide",!t):this.$transformPanel.toggleClass("hide")},t.prototype.toggleCoordinates=function(t){this.hasCoordinates=void 0===t?!this.hasCoordinates:!!t,this.updateContextMenu()},t.prototype.attach=function(){this.$contextMenu.appendTo(this.$parent)},t.prototype.detach=function(){this.$contextMenu.detach()},t}(H5P.jQuery,H5P.EventDispatcher),/*!@license H5P.DragNBar-1.5/scripts/dialog.js by Joubel licensed under unknown license*/ H5P.DragNBarDialog=function(n,m){function t(a,l){var o=this,t="dialog-title-"+H5P.createUUID();m.call(o);function e(t){75===t.which&&t.stopPropagation()}var s,i=n("
          ",{class:"h5p-dialog-wrapper h5p-ie-transparent-background h5p-hidden",on:{click:function(){o.disableOverlay||o.close()},keyup:e,keydown:e}}),c=n("
          ",{class:"h5p-dialog h5p-big","aria-labelledby":t,on:{click:function(t){t.stopPropagation()},keydown:function(t){var e=h.is(":visible");27===t.which&&e&&o.close()}}}).appendTo(i),u=n("
          ",{class:"h5p-dialog-titlebar",appendTo:c}),r=n("
          ",{class:"h5p-dialog-title",id:t,appendTo:u}),h=n("
          ",{role:"button",class:"h5p-dialog-close",tabindex:"0",title:H5P.t("close"),"aria-label":H5P.t("close"),on:{click:function(t){1===t.which&&o.close()},keypress:function(t){32!==t.which&&13!==t.which||(o.close(),t.preventDefault())}},appendTo:u}),d=n("
          ",{class:"h5p-dialog-inner"}).appendTo(c);i.appendTo(a);function p(){c.css({left:"",top:"",height:"",width:"",fontSize:"",bottom:""}),d.css({width:"",height:"",overflow:""})}function f(t){i.show(),setTimeout(function(){i.removeClass("h5p-hidden"),t&&t()},0)}o.open=function(t,e,i,n){f(),d.children().detach().end().append(t),p(),c.addClass("h5p-big"),r.attr("class","h5p-dialog-title"+(i?" "+i:"")),r.html(e=e||""),s&&(s.remove(),h.show()),n&&(s=n,h.hide(),n.appendTo(u)),o.resize(),o.trigger("open"),c.one("transitionend",function(){var t=d.find("input:visible:not(:disabled)"),e=d.find("[tabindex]");t.length?t.get(0).focus():e.length&&e.get(0).focus()})},o.resize=function(){var t,e,i;c.hasClass("h5p-big")&&(t=g(d.css("fontSize")),e=u.outerHeight()/t,i=a.height(),i-=2*Number(c.css("top").replace("px","")),d.css({width:"100%",maxHeight:i/t-e+"em",marginTop:e+"em"}),c.css({bottom:"auto",maxHeight:""}))},o.addLibraryClass=function(t){c.attr("data-lib",t)},o.toggleClass=function(t,e){c.toggleClass(t,e)},o.isOpen=function(){return i.is(":visible")},o.position=function(t,e,i){!0===i&&(i="medium"),p(),c.removeClass("h5p-big h5p-medium");var n=Number(d[0].style.marginTop.replace("em",""));e&&(r=16/g(a.css("fontSize")),e.width&&(e.width=e.width*r,c.css("width",e.width+"em")),e.height&&(e.height=e.height*r+n,c.css("height",e.height+"em"),d.css({width:"auto",overflow:"hidden"}))),"medium"===i&&c.addClass("h5p-medium"),"big"===i&&(c.addClass("h5p-big"),c.addClass("h5p-stretch"));var o=t.outerWidth(!0),s=t.position(),r=a.width(),n=a.height(),e=s.left,t=c.outerWidth(!0);"medium"===i&&rr/2-o/2&&(e-=t-o),ro/2-i/2?t.width=n.left:t.width=o-n.left-i;i=g(a.css("fontSize"));return t.width=t.width/i*(i/16),t.height=t.height/i*(i/16),t},o.scroll=function(t,e){d.stop().animate({scrollTop:t},e)},o.close=function(t){i.addClass("h5p-hidden"),t?(i.hide(),o.disableOverlay=!1,h.show()):setTimeout(function(){i.hide(),o.disableOverlay=!1,h.show()},201),o.trigger("close"),o.trigger("domHidden",{$dom:i,key:"dialogClosed"},{bubbles:!0,external:!0})},o.openOverlay=function(){o.disableOverlay=!0,c.hide(),f()},o.closeOverlay=function(){var t;i.addClass("h5p-hidden"),t=function(){c.show(),o.disableOverlay=!1},i.addClass("h5p-hidden"),setTimeout(function(){i.hide(),t&&t()},200)},o.hideCloseButton=function(){h.hide()},o.getDialogWidth=function(){return c.width()},o.removeStaticWidth=function(){c.css("width","")}}t.prototype=Object.create(m.prototype);var g=function(t){return Number(t.replace("px",""))};return t.prototype.constructor=t}(H5P.jQuery,H5P.EventDispatcher),/*!@license H5P.DragNBar-1.5/scripts/drag-n-bar-element.js by Joubel licensed under unknown license*/ H5P.DragNBarElement=function(o,s){function t(t,i,e){var n=this;s.call(this),this.dnb=t,this.options=e||{},this.options.disableContextMenu||(this.contextMenu=new o(this.dnb.$dialogContainer,this,this.options.hasCoordinates,this.options.disableResize,this.options.disableCopy,this.options.directionLock)),this.focused=!1,this.options.createElement?(this.$element=this.options.createElement().appendTo(t.$container),this.focus()):this.$element=this.options.element,this.$element&&(this.dnb.isEditor&&this.$element.mousedown(function(){n.dnb.pressed=!0}),this.$element.focus(function(){n.focus()})),n.toClipboard=function(t,e){i&&localStorage&&(i.width=t,i.height=e,H5P.setClipboard(i))}}return((t.prototype=Object.create(s.prototype)).constructor=t).prototype.addButton=function(t,e){this.contextMenu.addToMenu({name:t,label:e})},t.prototype.getElement=function(){return this.$element},t.prototype.setElement=function(t){var e=this;this.$element=t,this.$element.focus(function(){e.focus()})},t.prototype.showContextMenu=function(){this.contextMenu&&this.contextMenu.attach()},t.prototype.hideContextMenu=function(){this.contextMenu&&this.contextMenu.detach()},t.prototype.updateCoordinates=function(t,e,i,n){this.contextMenu&&(this.contextMenu.updateCoordinates(t,e,i,n),this.resizeContextMenu(i))},t.prototype.resizeContextMenu=function(t){var e,i,n;this.options.disableContextMenu||(n=Number(this.contextMenu.$parent.css("padding-left").replace("px","")),t=(t||this.$element.position().left)+n,e=this.dnb.$container.width(),(i=this.contextMenu.$contextMenu).css({position:"absolute",left:0}),n=i.outerWidth(!0),i.css({position:"",left:t}),e<=t+n?(this.contextMenu.$contextMenu.css("left",t-n+"px"),this.contextMenu.$contextMenu.addClass("left-aligned")):this.contextMenu.$contextMenu.removeClass("left-aligned"))},t.prototype.blur=function(){this.$element&&(this.$element.removeClass("focused"),this.focused=!1,this.options.disableContextMenu||this.contextMenu.trigger("contextMenuTransform",{showTransformPanel:!1})),this.hideContextMenu()},t.prototype.focus=function(){this.$element.addClass("focused"),this.focused=!0,this.contextMenu&&this.resizeContextMenu(this.$element.position().left)},t.prototype.removeElement=function(){this.$element.detach(),this.hideContextMenu()},t}((H5P.jQuery,H5P.DragNBarContextMenu),H5P.EventDispatcher),/*!@license H5P.DragNBar-1.5/scripts/drag-n-bar-form-manager.js by Joubel licensed under unknown license*/function(i,t){i.FormManager=function(n,o,p){var r=this;t.call(r);const s=[r];let a,l,c,u,h,d,f,m;const g=function(t,e,i){const n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("form-manager-button"),n.classList.add("form-manager-"+t),n.setAttribute("aria-label",e),n.addEventListener("click",i);const o=document.createElement("span");return o.classList.add("form-manager-button-inner"),o.innerText=e,o.tabIndex=-1,n.appendChild(o),n},v=function(t,e,i){const n=t.params&&t.params.library?t.params.library:t.currentLibrary||void 0,o=document.createElement("div");o.classList.add("form-manager-title");const s=document.createElement("div");s.classList.add("form-manager-menutitle"),s.tabIndex="0",s.addEventListener("click",function(){C.call(o)}),s.addEventListener("keypress",function(t){k.call(o,t)});const r=document.createElement("span");r.classList.add("form-manager-menutitle-text"),s.appendChild(r);const a=document.createElement("span");a.classList.add("form-manager-tooltip"),s.appendChild(a);const l=document.createElement("span");l.classList.add("truncatable-text"),l.tabIndex=-1,o.appendChild(l);const c=document.createElement("span");c.classList.add("form-manager-tooltip"),o.appendChild(c);const u=function(t){l.innerText=r.innerText=c.innerText=a.innerText=t},h=function(){return e||(t.params&&t.params.metadata&&t.params.metadata.title&&"Untitled"!==t.params.metadata.title.substr(0,8)||t.metadata&&t.metadata.title&&"Untitled"!==t.metadata.title.substr(0,8)?_((t.metadata?t:t.params).metadata.title):void 0!==t.$select?t.$select.children(":selected").text():H5PEditor.libraryCache[n].title)};u(h());function d(){t.metadataForm&&t.metadataForm.on("titlechange",function(t){u(h()),P.updateFormResponsiveness()}),"Loading..."===l.innerText&&(u(h()),P.updateFormResponsiveness())}void 0===t.metadataForm&&t.change?t.change(d):d();i=i||n.split(" ")[0].split(".")[1].toLowerCase();return o.classList.add("form-manager-icon-"+i),s.classList.add("form-manager-icon-"+i),p&&(o.classList.add("form-manager-"+p),s.classList.add("form-manager-"+p)),{breadcrumb:o,menu:s}},e=function(t){return t instanceof i.FormManager?t.getFormManager():t.parent?e(t.parent):r},b=function(t){t.classList.add("form-manager-hidden"),t.setAttribute("aria-hidden",!0)},y=function(t){t.classList.remove("form-manager-hidden"),t.removeAttribute("aria-hidden")},w=function(t,e){e?(t.setAttribute("aria-label",H5PEditor.t("core","exitFullscreenButtonLabel")),t.classList.add("form-manager-exit")):(t.setAttribute("aria-label",H5PEditor.t("core","enterFullscreenButtonLabel")),t.classList.remove("form-manager-exit"))},x=function(){const t=s.pop();H5PEditor.Html&&H5PEditor.Html.removeWysiwyg(),t.trigger("formclose");const e=t.popForm();h&&(e.removeEventListener("transitionend",h),h=null);const i=t.popTitles();P.formBreadcrumbMenu.removeChild(i.menu);const n=i.breadcrumb.previousSibling;n.removeEventListener("click",C),n.removeEventListener("keypress",k),n.classList.remove("clickable"),n.removeAttribute("tabindex");var o=P.getFormHeadHeight();if(P.formContainer.style.height=e.getBoundingClientRect().height+o+"px",e.previousSibling.classList.contains("form-manager-form"))y(e.previousSibling);else{for(let t=1;tn.firstChild.offsetWidth+1?(n.classList.add("form-mananger-tooltip-active"),i=!0):n.classList.remove("form-mananger-tooltip-active")}return i}t(r.formBreadcrumb)&&(a.classList.add("mobile-view-large"),t(r.formBreadcrumb)),t(r.formBreadcrumbMenu)},r.setAlwaysShowButtons=function(t){m=t,m&&(y(P.formButtons),P.formButtons.classList.add("form-manager-comein"))};const P=e(n);P===r&&function(){r.isMainLibrary=!(n instanceof H5PEditor.Library),r.formContainer=(r.isMainLibrary?n.$form:n.$libraryWrapper)[0],r.formContainer.classList.add("form-manager"),r.formContainer.classList.add("root-form"),a=document.createElement("div"),a.classList.add("form-manager-head"),l=document.createElement("div"),l.classList.add("form-manager-head"),l.classList.add("form-manager-footer"),r.footer=l,f=g("breadcrumb-menu",o.expandBreadcrumbButtonLabel,r.toggleBreadcrumbMenu),f.classList.add("form-manager-disabled"),a.appendChild(f),r.formBreadcrumbMenu=document.createElement("div"),r.formBreadcrumbMenu.classList.add("form-manager-breadcrumb-menulist"),a.appendChild(r.formBreadcrumbMenu),r.formBreadcrumb=document.createElement("div"),r.formBreadcrumb.classList.add("form-manager-breadcrumb"),a.appendChild(r.formBreadcrumb);const t=v(n);if(t.breadcrumb.classList.add("form-manager-comein"),r.formBreadcrumb.appendChild(t.breadcrumb),r.formBreadcrumbMenu.appendChild(t.menu),d=g("proceed",H5PEditor.t("core","proceedButtonLabel"),function(){P.exitSemiFullscreen&&(P.exitSemiFullscreen(),P.exitSemiFullscreen=null)}),b(d),a.appendChild(d),r.formButtons=document.createElement("div"),r.formButtons.classList.add("form-manager-buttons"),r.footerFormButtons=document.createElement("div"),r.footerFormButtons.classList.add("form-manager-buttons"),b(r.footerFormButtons),b(r.formButtons),l.appendChild(r.footerFormButtons),a.appendChild(r.formButtons),r.formButtons.appendChild(g("delete",o.deleteButtonLabel,function(){const t=new H5P.Event("formremove");t.data=s.length,s[s.length-1].trigger(t),!t.preventRemove&&1=n?t.apply(null,i):function(){var t=Array.prototype.slice.call(arguments,0);return e.apply(null,i.concat(t))}}},o=(e.compose=function(){for(var t=arguments.length,e=Array(t),i=0;i",{class:"h5p-video-wrapper"}),s.$controls=m("
          ",{role:"toolbar",class:"h5p-controls hidden"}),s.$read=m("
          ",{"aria-live":"polite",class:"hidden-but-read"}),this.fontSize=16;var r=!(this.width=640),a=!0,l=!1;if(s.isTask=!1,s.interactions=[],s.options.assets.interactions)for(var c=0;c
          ').appendTo(t))},h.prototype.addSplash=function(){var e=this;void 0!==this.editor||this.video.pressToPlay||!this.video.play||this.$splash||(this.$splash=m('
          '+this.options.video.startScreenOptions.title+'
          ").click(function(){e.video.play()}).appendTo(this.$overlay).find(".h5p-interaction-button").click(function(){return!1}).end(),m(".h5p-splash",this.$splash).keydown(function(t){(0,f.isSpaceOrEnterKey)(t)&&(e.video.play(),t.preventDefault(),e.$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"))},h.prototype.getDuration=function(){return void 0===this.duration&&(this.duration=this.video.getDuration()),this.duration},h.prototype.addControls=function(){var t=this;this.addSplash(),this.attachControls(this.$controls.removeClass("hidden"));var e=this.getDuration(),i=h.humanizeTime(e),n=h.formatTimeForA11y(e,this.l10n);this.controls.$totalTime.find(".human-time").html(i),this.controls.$totalTime.find(".hidden-but-read").html(this.l10n.totalTime+" "+n),this.controls.$slider.slider("option","max",e),this.bookmarkMenuKeyboardControls=new d.default([new p.default]),this.bookmarkMenuKeyboardControls.on("close",function(){return t.toggleBookmarksChooser(!1)}),this.endscreenMenuKeyboardControls=new d.default([new p.default]),this.endscreenMenuKeyboardControls.on("close",function(){return t.toggleEndscreensChooser(!1)}),this.addSliderInteractions(),this.addBookmarks(),this.addEndscreenMarkers(),this.addBubbles(),this.trigger("controls")},h.prototype.loaded=function(){var t=this.getDuration();if(this.oneSecondInPercentage=100/t,t=Math.floor(t),void 0!==this.editor){var e=c("interactions",this.editor.field.fields),i=c("duration",e.field.fields).fields;i[0].max=i[1].max=t,i[0].min=i[1].min=0;for(var n=c("adaptivity",e.field.fields).fields,o=0;o"+this.l10n.summary+"

          ",mainSummary:!0}),this.initInteraction(this.options.assets.interactions.length-1)),this.currentState===h.ATTACHED&&(this.video.pressToPlay||this.addControls(),this.trigger("resize")),this.currentState=h.LOADED},h.prototype.initInteraction=function(t){var e,i,n=this,o=n.options.assets.interactions[t];n.override&&(e={},o.adaptivity&&o.adaptivity.requireCompletion&&(e.enableRetry=!0),H5P.jQuery.extend(o.action.params.behaviour,n.override,e)),void 0!==n.previousState&&void 0!==n.previousState.answers&&null!==n.previousState.answers[t]&&(i=n.previousState.answers[t]);var s=new r.default(o,n,i);return s.on("display",function(t){var e=t.data;e.appendTo(n.$overlay),s.repositionToWrapper(n.$videoWrapper);t=void 0!==n.video.pressToPlay;g(t?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(r.default.PROGRESS_INTERACTED),-1!==m.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},h.prototype.handleAnswered=function(){var e=this;e.interactions.forEach(function(t){t.getProgress()===r.default.PROGRESS_INTERACTED&&(t.setProgress(r.default.PROGRESS_ANSWERED),t.$menuitem.addClass("h5p-interaction-answered"),e.hasStar&&(e.playStarAnimation(),e.playBubbleAnimation(e.l10n.answered.replace("@answered",""+e.getAnsweredTotal()+"")),e.endscreen.update(e.interactions)))})},h.prototype.getAnsweredTotal=function(){return this.interactions.filter(function(t){return t.getProgress()===r.default.PROGRESS_ANSWERED}).length},h.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)},h.prototype.addSliderInteractions=function(){var i=this,n=this;this.controls.$interactionsContainer.children().remove(),H5P.jQuery.extend([],this.interactions).sort(function(t,e){return t.getDuration().from-e.getDuration().from}).forEach(function(t){var e=t.addDot();n.menuitems.push(e),void 0===n.previousState&&n.interactionsProgress.push(void 0),n.interactionsProgress[n.menuitems.length-1]===r.default.PROGRESS_ANSWERED&&(t.setProgress(n.interactionsProgress[n.menuitems.length-1]),e.addClass("h5p-interaction-answered")),void 0!==e&&(e.appendTo(i.controls.$interactionsContainer),i.preventSkipping||i.interactionKeyboardControls.addElement(e.get(0)))})},h.prototype.closePopupMenus=function(e){this.popupMenuButtons.forEach(function(t){void 0!==t&&t!==e&&void 0===t.attr("aria-disabled")&&"true"===t.attr("aria-expanded")&&t.click()})},h.prototype.displayBookmarks=function(){return this.options.assets.bookmarks&&this.options.assets.bookmarks.length&&!this.preventSkipping},h.prototype.addBookmarks=function(){if(this.bookmarksMap={},void 0!==this.options.assets.bookmarks&&!this.preventSkipping)for(var t=0;t",{class:"h5p-prevent-skipping-message",appendTo:e.controls.$bookmarksContainer}),e.$preventSkippingMessage=m("
          ",{class:"h5p-prevent-skipping-message",appendTo:e.controls.$endscreensContainer}),e.$preventSkippingMessageText=m("
          ",{class:"h5p-prevent-skipping-message-text",html:e.l10n.navDisabled,appendTo:e.$preventSkippingMessage}),e.$preventSkippingMessageTextA11y=m("
          ",{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))},h.prototype.onBookmarkSelect=function(t,e){var i=this;i.currentState!==H5P.Video.PLAYING&&(t.mouseover().mouseout(),setTimeout(function(){i.timeUpdate(i.video.getCurrentTime())},0)),"true"===i.controls.$more.attr("aria-expanded")&&i.$container.hasClass("h5p-minimal")?i.controls.$more.click():i.toggleBookmarksChooser(!1),i.video.play(),i.seek(e.time);var n=h.formatTimeForA11y(e.time,i.l10n);setTimeout(function(){return i.read(i.l10n.currentTime+" "+n)},150)},h.prototype.onEndscreenSelect=function(t,e){var i=this;i.currentState!==H5P.Video.PLAYING&&(t.mouseover().mouseout(),setTimeout(function(){i.timeUpdate(i.video.getCurrentTime())},0)),"true"===i.controls.$more.attr("aria-expanded")&&i.$container.hasClass("h5p-minimal")?i.controls.$more.click():i.toggleEndscreensChooser(!1),i.video.play(),i.seek(e.time);var n=h.formatTimeForA11y(e.time,i.l10n);setTimeout(function(){return i.read(i.l10n.currentTime+" "+n)},150)},h.prototype.addBookmark=function(i,n){var o=this,e=o.options.assets.bookmarks[i];void 0===n&&(n=Math.floor(10*e.time)/10);var s=o.bookmarksMap[n]=m('
          '+e.label+"
          ").appendTo(o.controls.$bookmarksContainer).data("id",i).hover(function(){void 0!==o.bookmarkTimeout&&clearTimeout(o.bookmarkTimeout),o.controls.$bookmarksContainer.children(".h5p-show").removeClass("h5p-show"),s.addClass("h5p-show")},function(){o.bookmarkTimeout=setTimeout(function(){s.removeClass("h5p-show")},o.editor?1e3:2e3)});s.find(".h5p-bookmark-label").css("maxWidth",parseInt(o.controls.$slider.parent().css("marginRight"))-35),void 0===o.controls.$bookmarksList&&(o.controls.$bookmarksList=m('
            ').insertAfter(o.controls.$bookmarksChooser.find("h3")));var r=m('
          • '+e.label+"
          • ").click(function(){return o.onBookmarkSelect(s,e)}).keydown(function(t){(0,f.isSpaceOrEnterKey)(t)&&o.onBookmarkSelect(s,e),t.stopPropagation()});o.bookmarkMenuKeyboardControls.addElement(r.get(0));var t=o.controls.$bookmarksList.children(":eq("+i+")");return 0!==t.length?r.insertBefore(t):r.appendTo(o.controls.$bookmarksList),o.on("bookmarksChanged",function(t){var e=t.data.index,t=t.data.number;e===i&&t<0?(r.remove(),delete o.bookmarksMap[n]):e<=i&&(i+=t,s.data("id",i))}),o.trigger("bookmarkAdded",{bookmark:s}),s},h.prototype.addEndscreen=function(i,n){var o,s=this,e=s.options.assets.endscreens[i];if(void 0===n&&(n=Math.floor(10*e.time)/10),!this.editor)return s.getDuration()-n<1&&(n=s.getDuration()),void(o=s.endscreensMap[n]=!0);o=s.endscreensMap[n]=m('
            '+e.label+"
            ").appendTo(s.controls.$endscreensContainer).data("id",i).hover(function(){void 0!==s.endscreenTimeout&&clearTimeout(s.endscreenTimeout),s.controls.$endscreensContainer.children(".h5p-show").removeClass("h5p-show"),o.addClass("h5p-show")},function(){s.endscreenTimeout=setTimeout(function(){o.removeClass("h5p-show")},s.editor?1e3:2e3)}),s.editor&&(s.endscreenTimeout=setTimeout(function(){o.removeClass("h5p-show")},1e3)),o.find(".h5p-endscreen-label").css("maxWidth",parseInt(s.controls.$slider.parent().css("marginRight"))-35),void 0===s.controls.$endscreensList&&(s.controls.$endscreensList=m('
              ').insertAfter(s.controls.$endscreensChooser.find("h3")));var r=m('
            • '+e.label+"
            • ").click(function(){return s.onEndscreenSelect(o,e)}).keydown(function(t){(0,f.isSpaceOrEnterKey)(t)&&s.onEndscreenSelect(o,e),t.stopPropagation()});s.endscreenMenuKeyboardControls.addElement(r.get(0));var t=s.controls.$endscreensList.children(":eq("+i+")");return 0!==t.length?r.insertBefore(t):r.appendTo(s.controls.$endscreensList),s.on("endscreensChanged",function(t){var e=t.data.index,t=t.data.number;e===i&&t<0?(r.remove(),delete s.endscreensMap[n]):e<=i&&(i+=t,o.data("id",i))}),s.trigger("endscreenAdded",{endscreen:o}),o},h.prototype.attachControls=function(t){var r=this,e=m("
              ",{class:"h5p-controls-left",appendTo:t}),i=m("
              ",{class:"h5p-control h5p-slider",appendTo:t});r.hasStar&&(r.$star=m("
              ",{class:"h5p-control h5p-star",appendTo:t}),r.$starBar=m("
              ",{class:"h5p-control h5p-star h5p-star-bar",appendTo:r.$star}),m("
              ",{class:"h5p-control h5p-star h5p-star-background",appendTo:r.$star}),r.$starAnimation=m("
              ",{class:"h5p-control h5p-star h5p-star-animation h5p-star-animation-inactive",appendTo:r.$star}));var n=m("
              ",{class:"h5p-controls-right",appendTo:t});r.preventSkipping&&r.setDisabled(i),r.controls={},r.controls.$play=r.createButton("play","h5p-control h5p-pause",e,r.togglePlayPause),r.showRewind10&&(r.controls.$rewind10=r.createButton("rewind10","h5p-control",e,function(){var t;0",{class:"h5p-chooser h5p-bookmarks",role:"dialog",html:'

              '+r.l10n.bookmarks+"

              "}),r.popupMenuChoosers.push(r.controls.$bookmarksChooser),r.controls.$bookmarksChooser.append(m("",{role:"button",class:"h5p-chooser-close-button",tabindex:"0","aria-label":r.l10n.close,click:function(){return r.toggleBookmarksChooser()},keydown:function(t){(0,f.isSpaceOrEnterKey)(t)&&(r.toggleBookmarksChooser(),t.preventDefault())}})),r.showRewind10&&r.controls.$bookmarksChooser.addClass("h5p-rewind-displacement"),r.controls.$bookmarksButton=r.createButton("bookmarks","h5p-control",e,function(){r.toggleBookmarksChooser()}),r.controls.$bookmarksButton.attr("aria-haspopup","true"),r.controls.$bookmarksButton.attr("aria-expanded","false"),r.controls.$bookmarksChooser.insertAfter(r.controls.$bookmarksButton),r.controls.$bookmarksChooser.bind("transitionend",function(){r.controls.$bookmarksChooser.removeClass("h5p-transitioning")}),r.popupMenuButtons.push(r.controls.$bookmarksButton)),r.hasStar&&(t=r.editor?"star h5p-star-foreground-editor":"star h5p-star-foreground",a=r.editor?function(){return r.toggleEndscreensChooser()}:function(){return r.toggleEndscreen()},r.controls.$endscreensButton=r.createButton(t,"h5p-control",r.$star,a),r.controls.$endscreensButton.attr("aria-label",r.l10n.summary),r.popupMenuButtons.push(r.controls.$endscreensButton)),r.editor&&(r.controls.$endscreensChooser=H5P.jQuery("
              ",{class:"h5p-chooser h5p-endscreens",role:"dialog",html:'

              '+r.l10n.endscreens+"

              "}),r.popupMenuChoosers.push(r.controls.$endscreensChooser),r.controls.$endscreensChooser.append(m("",{role:"button",class:"h5p-chooser-close-button",tabindex:"0","aria-label":r.l10n.close,click:function(){return r.toggleEndscreensChooser()},keydown:function(t){(0,f.isSpaceOrEnterKey)(t)&&(r.toggleEndscreensChooser(),t.preventDefault())}})),r.hasStar&&(r.controls.$endscreensButton.attr("aria-haspopup","true").attr("aria-expanded","false"),r.controls.$endscreensChooser.insertAfter(r.controls.$endscreensButton).bind("transitionend",function(){r.controls.$endscreensChooser.removeClass("h5p-transitioning")})));var a='',e=m('
              '+a+"
              ").appendTo(e);r.controls.$currentTimeSimple=e.find(".human-time"),r.controls.$currentTimeA11ySimple=e.find(".hidden-but-read");e=h.formatTimeForA11y(0,r.l10n),a=m('
              \n '+a+'\n \n \n
              ').appendTo(n),e=a.find(".h5p-current");r.controls.$currentTime=e.find(".human-time"),r.controls.$currentTimeA11y=e.find(".hidden-but-read"),r.controls.$totalTime=a.find(".h5p-total"),r.updateCurrentTime(0);function l(){r.controls.$minimalOverlay.removeClass("h5p-show"),r.controls.$more.attr("aria-expanded","false"),r.controls.$more.focus(),setTimeout(function(){r.controls.$overlayButtons.removeClass("h5p-hide")},150)}r.controls.$more=r.createButton("more","h5p-control",n,function(){"true"===r.controls.$more.attr("aria-expanded")?l():(r.controls.$minimalOverlay.addClass("h5p-show"),r.controls.$more.attr("aria-expanded","true"),r.removeSplash(),setTimeout(function(){r.controls.$minimalOverlay.find('[tabindex="0"]').focus()},150)),r.closePopupMenus()}),r.controls.$playbackRateChooser=H5P.jQuery("
              ",{class:"h5p-chooser h5p-playbackRate",role:"dialog",html:'

              '+r.l10n.playbackRate+"

              "}),r.popupMenuChoosers.push(r.controls.$playbackRateChooser);function c(){(r.isMinimal?r.controls.$more:r.controls.$playbackRateButton).click(),r.resumeVideo()}r.controls.$playbackRateChooser.append(m("",{role:"button",class:"h5p-chooser-close-button",tabindex:"0","aria-label":r.l10n.close,click:c,keydown:function(t){(0,f.isSpaceOrEnterKey)(t)&&(c(),t.preventDefault())}})),r.controls.$playbackRateButton=r.createButton("playbackRate","h5p-control",n,o("$playbackRateButton","$playbackRateChooser")),r.popupMenuButtons.push(r.controls.$playbackRateButton),r.setDisabled(r.controls.$playbackRateButton),r.controls.$playbackRateButton.attr("aria-haspopup","true"),r.controls.$playbackRateButton.attr("aria-expanded","false"),r.controls.$playbackRateChooser.insertAfter(r.controls.$playbackRateButton),-1!==navigator.userAgent.indexOf("Android")||-1!==navigator.userAgent.indexOf("iPad")||(r.controls.$volume=r.createButton("mute","h5p-control",n,r.toggleMute),r.deactivateSound&&(r.controls.$volume.addClass("h5p-muted").attr("aria-label",r.l10n.sndDisabled),r.setDisabled(r.controls.$volume))),r.deactivateSound&&r.video.mute(),r.video.isMuted()&&r.controls.$volume.addClass("h5p-muted").attr("aria-label",r.l10n.sndDisabled),r.controls.$qualityChooser=H5P.jQuery("
              ",{class:"h5p-chooser h5p-quality",role:"dialog",html:'

              '+r.l10n.quality+"

              "}),r.popupMenuChoosers.push(r.controls.$qualityChooser);function u(){(r.isMinimal?r.controls.$more:r.controls.$qualityButton).click(),r.resumeVideo()}r.controls.$qualityChooser.append(m("",{role:"button",class:"h5p-chooser-close-button",tabindex:"0","aria-label":r.l10n.close,click:u,keydown:function(t){(0,f.isSpaceOrEnterKey)(t)&&(u(),t.preventDefault())}})),r.controls.$qualityButton=r.createButton("quality","h5p-control",n,o("$qualityButton","$qualityChooser")),r.popupMenuButtons.push(r.controls.$qualityButton),r.setDisabled(r.controls.$qualityButton),r.controls.$qualityButton.attr("aria-haspopup","true"),r.controls.$qualityButton.attr("aria-expanded","false"),r.controls.$qualityChooser.insertAfter(r.controls.$qualityButton),r.editor||!1===H5P.fullscreenSupported||(r.controls.$fullscreen=r.createButton("fullscreen","h5p-control",n,function(){r.toggleFullScreen()})),r.controls.$minimalOverlay=H5P.jQuery("
              ",{class:"h5p-minimal-overlay",appendTo:r.$container});n=H5P.jQuery("
              ",{role:"menu",class:"h5p-minimal-wrap",appendTo:r.controls.$minimalOverlay});r.minimalMenuKeyboardControls=new d.default([new p.default]),r.minimalMenuKeyboardControls.on("close",l),r.controls.$overlayButtons=H5P.jQuery([]),s&&(r.controls.$bookmarkButtonMinimal=r.createButton("bookmarks","h5p-minimal-button",n,function(){r.controls.$overlayButtons.addClass("h5p-hide"),r.toggleBookmarksChooser(!0)},!0),r.controls.$bookmarkButtonMinimal.attr("role","menuitem"),r.controls.$bookmarkButtonMinimal.attr("tabindex","-1"),r.controls.$overlayButtons=r.controls.$overlayButtons.add(r.controls.$bookmarkButtonMinimal),r.minimalMenuKeyboardControls.addElement(r.controls.$bookmarkButtonMinimal.get(0))),r.controls.$qualityButtonMinimal=r.createButton("quality","h5p-minimal-button",n,function(){r.isDisabled(r.controls.$qualityButton)||(r.controls.$overlayButtons.addClass("h5p-hide"),r.controls.$qualityButton.click())},!0),r.setDisabled(r.controls.$qualityButtonMinimal),r.controls.$qualityButtonMinimal.attr("role","menuitem"),r.controls.$overlayButtons=r.controls.$overlayButtons.add(r.controls.$qualityButtonMinimal),r.minimalMenuKeyboardControls.addElement(r.controls.$qualityButtonMinimal.get(0)),r.controls.$playbackRateButtonMinimal=r.createButton("playbackRate","h5p-minimal-button",n,function(){r.isDisabled(r.controls.$playbackRateButton)||(r.controls.$overlayButtons.addClass("h5p-hide"),r.controls.$playbackRateButton.click())},!0),r.controls.$playbackRateButtonMinimal.attr("role","menuitem"),r.setDisabled(r.controls.$playbackRateButtonMinimal),r.controls.$overlayButtons=r.controls.$overlayButtons.add(r.controls.$playbackRateButtonMinimal),r.minimalMenuKeyboardControls.addElement(r.controls.$playbackRateButtonMinimal.get(0)),r.addQualityChooser(),r.addPlaybackRateChooser(),r.interactionKeyboardControls=new d.default([new p.default]),r.controls.$interactionsContainer=m("
              ",{role:"menu",class:"h5p-interactions-container","aria-label":r.l10n.interaction}),r.controls.$bookmarksContainer=m("
              ",{class:"h5p-bookmarks-container",appendTo:i}),r.controls.$endscreensContainer=m("
              ",{class:"h5p-endscreens-container",appendTo:i}),r.hasPlayPromise=!1,r.hasQueuedPause=!1,r.delayed=!1,r.controls.$slider=m("
              ",{appendTo:i}).slider({value:0,step:.01,orientation:"horizontal",range:"min",max:0,create:function(t){t=m(t.target).find(".ui-slider-handle");t.attr("role","slider").attr("aria-valuemin","0").attr("aria-valuemax",r.getDuration().toString()).attr("aria-valuetext",h.formatTimeForA11y(0,r.l10n)).attr("aria-valuenow","0"),r.preventSkipping&&r.setDisabled(t).attr("aria-hidden","true")},start:function(){r.currentState!==h.SEEKING&&(r.toggleEndscreen(!1),r.delayedState||(r.currentState===H5P.Video.ENDED?r.lastState=H5P.Video.PLAYING:r.currentState===H5P.Video.BUFFERING&&r.lastState||(r.lastState=r.currentState)),r.delayedState=!0,clearTimeout(r.delayTimeout),r.delayTimeout=setTimeout(function(){r.delayedState=!1},200),r.hasPlayPromise?r.hasQueuedPause=!0:r.video.pause(),r.currentState=h.SEEKING,r.removeSplash(),r.$overlay.addClass("h5p-visible"))},slide:function(t,e){var i=(0,f.isKey)(t,[f.Keys.ARROW_LEFT,f.Keys.ARROW_RIGHT]),n=e.value;return i&&(e=(0,f.isKey)(t,[f.Keys.ARROW_RIGHT]),t=r.getDuration(),n=e?Math.min(n+5,t):Math.max(n-5,0),r.timeUpdate(n,!0)),r.seek(n),r.updateInteractions(n),r.updateCurrentTime(n),!i},stop:function(t,e){r.currentState=r.lastState,r.seek(e.value),r.recreateCurrentInteractions();var i=r.lastState===H5P.Video.PLAYING||r.lastState===H5P.Video.VIDEO_CUED||r.hasQueuedPause;r.hasPlayPromise?r.hasQueuedPause=!1:i?(r.hasQueuedPause=!1,i=r.video.play(),r.hasQueuedPause=!1,i&&i.then?(r.hasPlayPromise=!0,i.then(function(){setTimeout(function(){(r.hasQueuedPause||r.hasActivePauseInteraction())&&r.video.pause(),r.hasPlayPromise=!1},0)})):r.hasActivePauseInteraction()&&(r.video.play(),setTimeout(function(){r.video.pause()},50))):r.timeUpdate(e.value),r.$overlay.removeClass("h5p-visible"),r.editor&&(r.updateChooserTime(r.controls.$bookmarksChooser,".h5p-add-bookmark"),r.updateChooserTime(r.controls.$endscreensChooser,".h5p-add-endscreen"))}}),r.controls.$interactionsContainer.appendTo(i),r.preventSkipping&&(r.controls.$slider.slider("disable"),r.controls.$slider.click(function(t){return r.showPreventSkippingMessage(t.offsetX),!1})),r.displayBookmarks()&&r.showBookmarksmenuOnLoad&&!1===r.video.pressToPlay&&r.toggleBookmarksChooser(!0),r.controls.$buffered=m("
              ",{class:"h5p-buffered",prependTo:r.controls.$slider})},h.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))},h.prototype.playBubbleAnimation=function(t){this.bubbleScore.setContent(t),this.bubbleScore.animate()},h.prototype.hasActivePauseInteraction=function(){var e=!1;return this.interactions.forEach(function(t){t.getElement()&&t.pause()&&(e=!0)}),e},h.prototype.createButton=function(t,e,i,n,o){i={role:"button",tabindex:0,class:(void 0===e?"":e+" ")+"h5p-"+t,on:{click:function(){n.call(this)},keydown:function(t){(0,f.isSpaceOrEnterKey)(t)&&(n.call(this),t.preventDefault(),t.stopPropagation())}},appendTo:i};return i[o?"text":"aria-label"]=this.l10n[t],H5P.jQuery("
              ",i)},h.prototype.addQualityChooser=function(){var i=this;if(i.qualityMenuKeyboardControls=new d.default([new p.default]),i.qualityMenuKeyboardControls.on("close",function(){return i.controls.$qualityButton.click()}),this.video.getQualities&&(i.qualities=this.video.getQualities(),i.qualities&&void 0!==this.controls.$qualityButton&&i.isDisabled(i.controls.$qualityButton))){var e=this.video.getQuality(),t=i.qualities;"YouTube"===this.video.getHandlerName()&&(t=t.filter(function(t){return t.name===e}));for(var n="",o=0;o'+s.label+""}var a=m('
                '+n+"
              ").appendTo(this.controls.$qualityChooser);a.children().click(function(){var t=m(this).attr("data-quality");i.updateQuality(t)}).keydown(function(t){var e;(0,f.isSpaceOrEnterKey)(t)&&(e=m(this).attr("data-quality"),i.updateQuality(e)),t.stopPropagation()}),a.find("li").get().forEach(function(t){i.qualityMenuKeyboardControls.addElement(t);var e="true"===t.getAttribute("aria-checked");l(t,e)}),i.removeDisabled(this.controls.$qualityButton.add(this.controls.$qualityButtonMinimal))}},h.prototype.updateQuality=function(t){this.video.setQuality(t),"true"===this.controls.$more.attr("aria-expanded")?this.controls.$more.click():(this.controls.$qualityButton.click(),this.controls.$qualityButton.focus())},h.prototype.addPlaybackRateChooser=function(){var i=this,n=this;if(this.playbackRateMenuKeyboardControls=new d.default([new p.default]),this.playbackRateMenuKeyboardControls.on("close",function(){return n.controls.$playbackRateButton.click()}),this.video.getPlaybackRates){var t=this.video.getPlaybackRates();if(!(t.length<2)&&t&&void 0!==this.controls.$playbackRateButton&&n.isDisabled(this.controls.$playbackRateButton)){for(var e=this.video.getPlaybackRate(),o="",s=0;s'+r+""}var a=m('
                '+o+"
              ").appendTo(this.controls.$playbackRateChooser);a.children().click(function(){var t=m(this).attr("playback-rate");n.updatePlaybackRate(t)}).keydown(function(t){var e;(0,f.isSpaceOrEnterKey)(t)&&(e=m(this).attr("playback-rate"),n.updatePlaybackRate(e)),t.stopPropagation()}),a.find("li").get().forEach(function(t){i.playbackRateMenuKeyboardControls.addElement(t);var e="true"===t.getAttribute("aria-checked");l(t,e)}),n.removeDisabled(this.controls.$playbackRateButton.add(this.controls.$playbackRateButtonMinimal))}}},h.prototype.updatePlaybackRate=function(t){this.video.setPlaybackRate(t),("true"===this.controls.$more.attr("aria-expanded")?this.controls.$more:this.controls.$playbackRateButton).click()},h.prototype.startUpdatingBufferBar=function(){var i=this;i.bufferLoop||!function t(){var e=i.video.getBuffered();e&&i.controls.$buffered&&(i.controls.$buffered.css("width",e+"%"),i.hasStar&&(99this.width?this.fontSize*(s/this.width):this.fontSize,this.$container.css("fontSize",this.scaledFontSize+"px"),this.editor||(s\n
              \n
              '+t.l10n.requiresCompletionWarning+'
              \n \n
              \n
              ").click(function(){t.$mask.hide()}).appendTo(t.$container)),t.$mask.show(),t.$mask.find(".h5p-button-back").focus(),t.$mask},h.prototype.setDisabled=function(t){return t.attr("aria-disabled","true").attr("tabindex","-1")},h.prototype.isDisabled=function(t){return"true"===t.attr("aria-disabled")},h.prototype.removeDisabled=function(t){return t.removeAttr("aria-disabled").attr("tabindex","0")},h.prototype.hasUncompletedRequiredInteractions=function(t){return(void 0!==t?this.getVisibleInteractionsAt(t):this.getVisibleInteractions()).some(function(t){return t.getRequiresCompletion()&&!t.hasFullScore()})},h.prototype.getVisibleInteractions=function(){return this.interactions.filter(function(t){return t.isVisible()})},h.prototype.getVisibleInteractionsAt=function(e){return this.interactions.filter(function(t){return t.visibleAt(e)})},h.prototype.showSolutions=function(){},h.prototype.getTitle=function(){return H5P.createTitle(this.contentData&&this.contentData.metadata&&this.contentData.metadata.title?this.contentData.metadata.title:"Interactive Video")},h.prototype.findNextInteractionToShow=function(t,e){for(var i=void 0,n=0;nt||o.from==t&&(void 0===e||e'+i[t]+""),r.popup.setAttribute("role","dialog");s=y("h5p-chooser-close-button",g,i.close,u,"div","button");r.popup.appendChild(s),r.control=y("h5p-control h5p-"+t,g,i[t],u,"div","button"),r.control.setAttribute("aria-haspopup","true"),r.overlayControl=y("h5p-minimal-button h5p-"+t,v,i[t],u,"div","menuitem"),r.overlayControl.tabIndex="-1",r.overlayControl.classList.add("h5p-hide"),r.updateOptions(e)};i.prototype=Object.create(H5P.EventDispatcher.prototype);var b=function(t,e,i){i=document.createElement(i||"div");return t&&(i.className=t),e&&(i.innerHTML=e),i},y=function(t,e,i,n,o,s){var r=b(t,e===v?i:"",o);return r.tabIndex=0,r.setAttribute("role",s),e===g&&(r.title=i),r.addEventListener("click",function(t){n.call(r,t)},!1),r.addEventListener("keydown",function(t){32!==t.which&&13!==t.which||(t.preventDefault(),n.call(r,t))},!1),r};e.default=i.prototype.constructor=i},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.createElement=e.toggleClass=e.toggleVisibility=e.show=e.hide=e.removeClass=e.addClass=e.classListContains=e.removeChild=e.querySelectorAll=e.nodeListToArray=e.querySelector=e.appendChild=e.toggleAttribute=e.attributeEquals=e.hasAttribute=e.removeAttribute=e.setAttribute=e.getAttribute=void 0;var n=i(1),o=e.getAttribute=(0,n.curry)(function(t,e){return e.getAttribute(t)}),s=e.setAttribute=(0,n.curry)(function(t,e,i){return i.setAttribute(t,e)}),r=(e.removeAttribute=(0,n.curry)(function(t,e){return e.removeAttribute(t)}),e.hasAttribute=(0,n.curry)(function(t,e){return e.hasAttribute(t)}),e.attributeEquals=(0,n.curry)(function(t,e,i){return i.getAttribute(t)===e}),e.toggleAttribute=(0,n.curry)(function(t,e){var i=o(t,e);s(t,(0,n.inverseBooleanString)(i),e)}),e.appendChild=(0,n.curry)(function(t,e){return t.appendChild(e)}),e.querySelector=(0,n.curry)(function(t,e){return e.querySelector(t)}),e.nodeListToArray=function(t){return Array.prototype.slice.call(t)}),a=(e.querySelectorAll=(0,n.curry)(function(t,e){return r(e.querySelectorAll(t))}),e.removeChild=(0,n.curry)(function(t,e){return t.removeChild(e)}),e.classListContains=(0,n.curry)(function(t,e){return e.classList.contains(t)}),e.addClass=(0,n.curry)(function(t,e){return e.classList.add(t)})),i=e.removeClass=(0,n.curry)(function(t,e){return e.classList.remove(t)}),l=e.hide=a("hidden"),c=e.show=i("hidden");e.toggleVisibility=(0,n.curry)(function(t,e){return(t?c:l)(e)}),e.toggleClass=(0,n.curry)(function(t,e,i){i.classList[e?"add":"remove"](t)}),e.createElement=function(t){var e=t.tag,i=t.id,n=t.classes,o=t.attributes,s=document.createElement(e);return i&&(s.id=i),n&&n.forEach(function(t){s.classList.add(t)}),o&&Object.keys(o).forEach(function(t){s.setAttribute(t,o[t])}),s}},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.Eventful=function(){return{listeners:{},on:function(t,e,i){i={listener:e,scope:i};return this.listeners[t]=this.listeners[t]||[],this.listeners[t].push(i),this},fire:function(t,e){return(this.listeners[t]||[]).every(function(t){return!1!==t.listener.call(t.scope||this,e)})},propagate:function(t,i){var n=this;t.forEach(function(e){return i.on(e,function(t){return n.fire(e,t)})})}}}},function(t,e,i){"use strict";function n(l,c,t){var u=this;H5P.EventDispatcher.call(u);var h,e,n,d=l.action;t&&(d.userDatas={state:t});var o,p,i,s,r,f=d.library.split(" ")[0],a=c.l10n[r=f,t=l,-1!==V.indexOf(r)||z(t,q)?"content":"interaction"],t="H5P.Nil"!==f&&"button"===l.displayType,m=[d.params.contentName,t?F(l.label):"",l.libraryTitle].filter(O)[0],g=!1,v=!1,b=!1,y=l.action.metadata;this.on("open-dialog",function(){S()}),this.on("show-mask",function(){M(this.getElement())});function w(t){h=W("
              ",{tabindex:0,role:"button",class:"h5p-interaction "+o+(t?"":" h5p-hidden"),"aria-popup":"true","aria-expanded":"false","aria-label":m,css:{left:l.x+"%",top:l.y+"%",width:"",height:""},on:{click:function(){u.dialogDisabled||(S(),h.attr("aria-expanded","true"))},keydown:function(t){13!==t.which&&32!==t.which||u.dialogDisabled||(S(),h.attr("aria-expanded","true"),t.preventDefault())}}}),u.getRequiresCompletion()&&void 0===c.editor&&c.currentState!==H5P.InteractiveVideo.SEEKING&&S(!0),W("
              ",{class:"h5p-touch-area"}).appendTo(h),W("
              ",{class:"h5p-interaction-button"}).appendTo(h),c.editor&&h.hover(function(){g=h.is(".focused")||h.is(":focus")||c.dnb&&(!c.dnb||c.dnb.newElement)?(c.editor.hideInteractionTitle(),!1):(c.editor.showInteractionTitle(m,h),!0)},function(){c.editor.hideInteractionTitle(),g=!1}).focus(function(){c.editor.hideInteractionTitle(),g=!1}).click(function(){c.editor.hideInteractionTitle()}),t=O(F(l.label)),l.label&&t&&(e=E(l.label,"h5p-interaction").appendTo(h)),u.trigger("display",h),setTimeout(function(){h&&h.removeClass("h5p-hidden")},0)}function x(){return(h=E(l.label,"h5p-interaction h5p-interaction-label-standalone")).css({left:l.x+"%",top:l.y+"%",width:"",height:"initial"}),u.trigger("display",h),setTimeout(function(){h&&h.removeClass("h5p-hidden")},0),h}function C(t){var e;return"timecode"===l.goto.type?t.click(function(t){1===t.which&&A({data:l.goto.time})}).keypress(function(t){32===t.which&&A({data:l.goto.time})}).attr("href","#").attr("tabindex","0"):(e=l.goto.url,t.keypress(function(t){32===t.which&&this.click()}).attr({href:("other"!==e.protocol?e.protocol:"")+e.url,target:"_blank"})),t.addClass("goto-clickable")}function k(t){t=!c.hasUncompletedRequiredInteractions(t),p&&p.trigger("hide"),h&&u.trigger("hide",h),u.isButton()?t&&c.dnb.dialog.close():(c.isMobileView&&t&&c.dnb.dialog.close(),h&&h.detach()),u.trigger("remove",h),t&&$(h)}function P(t){if("H5P.Questionnaire"===f){if(t.find(".h5p-interaction-continue-button").length)return;e=((e=document.createElement("button")).innerHTML=c.l10n.continueWithVideo,e.className="h5p-interaction-continue-button",e.addEventListener("click",function(){k(),c.play()}),e),t=t.find(".h5p-questionnaire-success-center");t.length&&t.get(0).appendChild(e),p.on("noSuccessScreen",function(){k(),c.play()})}var e;"H5P.FreeTextQuestion"===f&&p.on("continue",function(){k(),c.play()})}function _(t,e){function i(t){return e.target===t.get(0)}var n=9===e.which,o=t.first(),t=t.last();n&&e.shiftKey&&i(o)?(t.focus(),e.preventDefault()):n&&i(t)&&(o.focus(),e.preventDefault())}function T(){var t=l.height||10,e=l.width||10,i=c.width/c.fontSize;return{height:t/(i/(c.$videoWrapper.width()/c.$videoWrapper.height()))*100+"%",width:e/i*100+"%"}}function H(){var t=u.isGotoClickable(),e=T(),i=W.extend({},{backgroundColor:"rgb(255,255,255)",boxShadow:!0},l.visuals);h=W("
              ",{"aria-label":c.l10n.interaction,tabindex:"-1",class:"h5p-interaction h5p-poster "+o+(t&&l.goto.visualize?" goto-clickable-visualize":""),css:{left:l.x+"%",top:l.y+"%",width:e.width,height:e.height}}),"H5P.IVHotspot"!==f&&(h.css("background",i.backgroundColor),(e=i.backgroundColor.split(","))[3]&&0===parseFloat(e[3].replace(")",""))&&h.addClass("h5p-transparent-interaction")),!1===i.boxShadow&&h.addClass("h5p-box-shadow-disabled"),"H5P.Link"===f&&(h.css("height","auto"),h.css("width","auto"),void 0===c.editor&&h.click(function(){return window.open(p.getUrl()),c.pause(),!1})),n=W("
              ",{class:"h5p-interaction-outer"}).appendTo(h),n=W(t?"":"
              ",{class:"h5p-interaction-inner h5p-frame"}).appendTo(n),!t&&j(f)&&n.attr("tabindex","0"),void 0!==c.editor&&p.disableAutoPlay&&p.disableAutoPlay(),t=t?C(n):n,p.attach(t),P(t),u.trigger("display",h),u.getRequiresCompletion()&&c.currentState!==H5P.InteractiveVideo.SEEKING&&void 0===c.editor&&!u.hasFullScore()&&(M(h),h.focus()),setTimeout(function(){H5P.trigger(p,"resize")},0),"function"==typeof p.setActivityStarted&&"function"==typeof p.getScore&&p.setActivityStarted()}function D(){var e,t,i,n,o=!0;l.adaptivity&&(t=u.hasFullScore(),o=!u.getRequiresCompletion()||t,t?e=l.adaptivity.correct:t||(e=l.adaptivity.wrong)),e&&void 0!==e.seekTo?(c.pause(),!e.allowOptOut&&h&&(u.isButton()?(c.dnb.dialog.disableOverlay=!0,c.dnb.dialog.hideCloseButton()):M(h)),i=t?"correct":"wrong",n=e.seekLabel||c.l10n.defaultAdaptivitySeekLabel,p.hideButton("iv-continue").addButton("iv-adaptivity-"+i,n,function(){k(e.seekTo),!t&&p.resetTask&&(p.resetTask(),p.hideButton("iv-adaptivity-"+i)),u.remove(),N(e.seekTo)}).showButton("iv-adaptivity-"+i,1).hideButton("iv-adaptivity-"+(t?"wrong":"correct"),1).hideButton("check-answer",1).hideButton("show-solution",1).hideButton("try-again",1),void 0!==p.disableInput&&(p.disableInput instanceof Function||"function"==typeof p.disableInput)&&p.disableInput(),setTimeout(function(){var t=e.message.replace("

              ","").replace("

              ","");p.updateFeedbackContent(t,!0),p.read(t)},0)):void 0!==p.hasButton&&(p.hasButton("iv-continue")||p.addButton("iv-continue",c.l10n.defaultAdaptivitySeekLabel,function(){k(),N()}),p[o?"showButton":"hideButton"]("iv-continue"))}var E=function(t){return W("
              ",{class:"h5p-interaction-label "+(1'+t+"
              "})},S=function(t){var i=c.$container.find(".h5p-dialog-wrapper");"function"==typeof p.setActivityStarted&&"function"==typeof p.getScore&&p.setActivityStarted();var e=u.isGotoClickable(),n=i.find("[tabindex]"),o=W(e?"
              ":"
              ",{class:"h5p-dialog-interaction h5p-frame"});!e&&j(f)&&o.attr("tabindex","0"),void 0!==c.editor?o.attr("tabindex",-1):0===n.length&&o.attr("tabindex",0),u.getRequiresCompletion()&&i.keydown(function(t){var e=i.find('[tabindex="0"], button, input').filter(":visible");_(e,t)});n=e?C(o):o;if(p.attach(n),P(n),L(p)&&(u.score=p.getScore(),u.maxScore=p.getMaxScore()),u.hasFullScore()&&t){if(i.hasClass("h5p-hidden"))return}else u.getRequiresCompletion()&&!u.hasFullScore()&&(c.dnb.dialog.hideCloseButton(),c.dnb.dialog.disableOverlay=!0,i.click(function(){u.hasFullScore()||c.showWarningMask().find(".h5p-button-back").click(function(){return o.find("button").last().focus()})}));c.dnb.dialog.open(o),c.disableTabIndexes(),c.dnb.dialog.addLibraryClass(f),c.dnb.dialog.toggleClass("goto-clickable-visualize",!(!e||!l.goto.visualize)),c.dnb.dialog.toggleClass("h5p-goto-timecode",z(l,q)),c.dnb.dialog.disableOverlay&&c.restorePosterTabIndexes();c.dnb.dialog.once("close",function(){c.dnb.$dialogContainer.one("transitionend",function(){o.is(".h5p-image")&&o.find("img").css({width:"",height:""})});try{void 0!==p.pause&&(p.pause instanceof Function||"function"==typeof p.pause)&&p.pause()}catch(t){H5P.error(t)}h&&(h.focus(),h.attr("aria-expanded","false")),p&&p.trigger("hide")});var s,r,a,e=function t(){u.dialogWidth=c.dnb.dialog.getDialogWidth(),c.dnb.dialog.off("close",t)};c.dnb.dialog.on("close",e),"H5P.Image"===f?(s=c.dnb.dialog.getMaxSize(h),r=o.find("img"),d.params.file.width&&d.params.file.height?I(r,s,{width:d.params.file.width,height:d.params.file.height},!c.isMobileView):(r.on("load",function(){r.is(":visible")&&I(r,s,{width:this.width,height:this.height},!c.isMobileView)}),c.dnb.dialog.position(h))):c.isMobileView||("H5P.FreeTextQuestion"===f?c.dnb.dialog.position(h,{width:u.dialogWidth/16},"big"):"H5P.Text"!==f&&"H5P.Table"!==f?c.dnb.dialog.position(h,{width:u.dialogWidth/16},"medium"):c.dnb.dialog.position(h,{width:u.dialogWidth/16},null)),"H5P.Summary"===f&&(a=0,H5P.on(p,"resize",function(){var t=o.height();(t+10e.height&&(i.width=i.width*e.height/i.height,i.height=e.height),i.width>e.width&&(i.height=i.height*e.width/i.width,i.width=e.width);e=16/Number(t.css("fontSize").replace("px",""));t.css({width:i.width*e+"em",height:i.height*e+"em"}),n&&c.dnb.dialog.position(h,i)},A=function(t){u.isButton()&&c.dnb.dialog.close(),c.currentState!==H5P.Video.PAUSED&&c.currentState!==H5P.Video.ENDED||c.play();t=t.data;t===l.duration.from&&(t+=.2),c.seek(t)},M=function(t){t.css("zIndex",52),c.showOverlayMask()},$=function(t){t&&t.css("zIndex",""),c.hideOverlayMask()},N=function(t){var e=B(),i=e.filter(function(t){return!t.isButton()});if(i.length?e=i:e.length&&c.$container.find(".h5p-dialog-wrapper .h5p-dialog").show(),e.length){e=e[0];return e.isButton()?e.trigger("open-dialog"):e.trigger("show-mask"),void c.pause()}c.currentState!==H5P.Video.ENDED&&(void 0!==t&&(c.pause(),c.seek(t)),c.play(),c.controls.$play.focus())},B=function(){return c.getVisibleInteractions().filter(function(t){return t!==u}).filter(function(t){return t.getRequiresCompletion()&&!t.hasFullScore()})};u.isGotoClickable=function(){return-1!==["H5P.Text","H5P.Image"].indexOf(f)&&l.goto&&-1!==["timecode","url"].indexOf(l.goto.type)},u.getCurrentState=function(){if(p&&(p.getCurrentState instanceof Function||"function"==typeof p.getCurrentState))return p.getCurrentState()},u.getDuration=function(){return{from:l.duration.from,to:l.duration.to+1}},u.getRequiresCompletion=function(){return!!l.adaptivity&&!!l.adaptivity.requireCompletion},u.pause=function(){return l.pause},u.isButton=function(){return"button"===l.displayType||!(!c.isMobileView||"H5P.IVHotspot"===f)&&("H5P.Image"!==f||!1!==l.buttonOnMobile)},u.isStandaloneLabel=function(){return"H5P.Nil"===f},u.isMainSummary=function(){return!0===l.mainSummary},u.selectDot=function(){c.preventSkipping||(c.seekingTo=!0,Math.floor(10*c.video.getCurrentTime())!==Math.floor(10*l.duration.from)&&(c.currentState===H5P.Video.VIDEO_CUED?(c.play(),c.seek(l.duration.from)):c.currentState===H5P.Video.PLAYING?c.seek(l.duration.from):(c.play(),c.seek(l.duration.from),c.pause())))},u.addDot=function(){if("H5P.Nil"===f)return W("
              ",{class:t});var t="h5p-seekbar-interaction "+o,t=W("
              ",{role:"menuitem",class:t,"aria-label":a+". "+m,title:m,css:{left:l.duration.from*c.oneSecondInPercentage+"%"},on:{click:u.selectDot,keydown:function(t){if(13===t.which||32===t.which)return u.selectDot(),!1}}});return c.preventSkipping&&t.attr("aria-disabled","true").attr("tabindex","-1"),u.$menuitem=t},u.isVisible=function(){return b},u.visibleAt=function(t){return!(t=l.duration.to+1)},u.toggle=function(t,e){return u.visibleAt(t)?h?void 0:(b=!0,u.isStandaloneLabel()?x():u.isButton()?w(e):H(),void 0===c.editor?s=c.dnb.add(h,void 0,{dnbElement:s,disableContextMenu:!0}):(u.fit&&(c.editor.fit(h,l),u.fit=!1),h.focus(function(){c.pause()})),h):(b=!1,void(h&&(s&&(s.hideContextMenu(),s===c.dnb.focusedElement&&(s.blur(),delete c.dnb.focusedElement)),c.editor&&g&&(c.editor.hideInteractionTitle(),g=!1),u.remove())))},u.setTitle=function(t){h&&h.attr("aria-label",t),m=t},u.reCreateInteraction=function(){"H5P.IVHotspot"!==f&&h&&(p&&p.trigger("hide"),u.trigger("hide",h),h.detach(),u.isStandaloneLabel()?x():u.isButton()?w(!0):H())},u.resizeInteraction=function(){u.isStandaloneLabel()||H5P.trigger(p,"resize")},u.positionLabel=function(t){h&&u.isButton()&&e&&!u.isStandaloneLabel()&&(e.removeClass("h5p-left-label"),parseInt(h.css("left"))+e.position().left+e.outerWidth()>t&&e.addClass("h5p-left-label"))},u.setPosition=function(t,e){l.x=t,l.y=e,h.css({left:t+"%",top:e+"%"})},u.setSize=function(t,e){t&&(l.width=t),e&&(l.height=e),H5P.trigger(p,"resize")},u.remove=function(){h&&(u.trigger("domHidden",{$dom:h,key:"videoProgressedPast"},{bubbles:!0,external:!0}),p&&p.trigger("hide"),u.trigger("hide",h),h.detach(),h=void 0)},u.reCreate=function(){var t,e;void 0===(e=l.className)&&(e=(t=d.library.split(" ")[0].toLowerCase().split("."))[0]+"-"+t[1]+"-interaction"),l.goto&&"timecode"===l.goto.type&&(e+=" h5p-goto-timecode"),o=e,u.isStandaloneLabel()||(d.params=d.params||{},p=H5P.newRunnable(d,c.contentId,void 0,void 0,{parent:c,editing:void 0!==c.editor}),void 0===u.maxScore&&p.getMaxScore&&(u.maxScore=p.getMaxScore()),d.userDatas&&L(p)&&(u.score=p.getScore()),c.isTask||void 0===c.options.assets.endscreens||(p.isTask||void 0===p.isTask&&void 0!==p.showSolutions)&&(c.isTask=!0),p.on&&(p.on("xAPI",function(t){var e=t.getVerifiedStatementValue(["context","contextActivities","parent"])||[],i=t.getContentXAPIId(c),n="completed"===t.getVerb()||"answered"===t.getVerb(),e=e.some(function(t){return t.id===i});p.getScore&&(u.score=p.getScore()),p.getMaxScore&&(u.maxScore=p.getMaxScore()),e&&n&&t.getMaxScore()&&(u.score=null==t.getScore()?0:t.getScore(),u.maxScore=u.maxScore||t.getMaxScore(),D()),u.setLastXAPIVerb(t.getVerb()),u.trigger(t)}),p.on("question-finished",function(){D()}),p.on("resize",function(){delete u.dialogWidth,c&&c.dnb&&c.dnb.dialog.removeStaticWidth()}),"H5P.IVHotspot"===f&&p.on("goto",A),"H5P.GoToQuestion"===f&&p.on("chosen",A)))};var L=function(t){return"undefined"!==(void 0===t?"undefined":R(t))&&"function"==typeof t.getScore&&"function"==typeof t.getMaxScore};u.setDnbElement=function(t){return s!==t&&(s=t,!0)},u.hasFullScore=function(){return u.score>=u.maxScore},u.getLibraryName=function(){return f},u.getMetadata=function(){return y},u.getTitle=function(){return m},u.isAnswerable=function(){return-1===V.indexOf(u.getLibraryName())&&!u.isStandaloneLabel()},u.setProgress=function(t){this.progress=t},u.getProgress=function(){return this.progress},u.setLastXAPIVerb=function(t){i=t},u.getLastXAPIVerb=function(){return i},u.getClass=function(){return o},u.getCopyrights=function(){if(!u.isStandaloneLabel()){var t=H5P.newRunnable(d,c.contentId);if(void 0!==t){var e=new H5P.ContentCopyrights;return e.addContent(H5P.getCopyrights(t,l,c.contentId)),e.setLabel(m+" "+H5P.InteractiveVideo.humanizeTime(l.duration.from)+" - "+H5P.InteractiveVideo.humanizeTime(l.duration.to)),e}}},u.getXAPIData=function(){if(p&&(p.getXAPIData instanceof Function||"function"==typeof p.getXAPIData))return p.getXAPIData()},u.getSubcontentId=function(){return d.subContentId},u.getElement=function(){return h},u.focusOnFirstTabbableElement=function(){var t;h&&((t=W(h.get(0)).find("[tabindex]"))&&t.length?t.get(0):u).focus()},u.focus=function(){h&&h.focus()},u.getClipboardData=function(){return H5P.DragNBar.clipboardify(H5PEditor.InteractiveVideo.clipboardKey,l,"action")},u.repositionToWrapper=function(t){var e,i;h&&"H5P.IVHotspot"!==f&&"H5P.FreeTextQuestion"!==f&&(v&&(h.css({top:l.y+"%",left:l.x+"%"}),h.css(u.isButton()?{height:"",width:""}:T()),v=!1),h.position().top+h.height()>t.height()&&((i=(t.height()-h.height())/t.height()*100)<0&&(i=0,e=t.height()/parseFloat(h.css("font-size")),h.css("height",e+"em")),h.css("top",i+"%"),v=!0),h.position().left+h.width()>t.width()&&((i=(t.width()-h.width())/t.width()*100)<0&&(i=0,t=t.width()/parseFloat(h.css("font-size")),h.css("width",t+"em")),h.css("left",i+"%"),v=!0))},u.resetTask=function(){void 0!==d.userDatas&&void 0!==d.userDatas.state&&delete d.userDatas.state,delete u.score,delete u.maxScore,u.reCreate()},u.getInstance=function(){return p},u.reCreate()}Object.defineProperty(e,"__esModule",{value:!0});function O(t){return void 0!==t&&"string"==typeof t&&0"+t+"
              ").text():void 0}function z(t,e){return void 0!==t.goto&&t.goto.type===e}function j(t){return-1!==o.indexOf(t)}var R="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},W=H5P.jQuery,q="timecode",V=["H5P.Image","H5P.Nil","H5P.Table","H5P.Link","H5P.GoToQuestion","H5P.IVHotspot","H5P.Text"],o=["H5P.Text","H5P.Table"];((n.prototype=Object.create(H5P.EventDispatcher.prototype)).constructor=n).PROGRESS_INTERACTED=0,n.PROGRESS_ANSWERED=1,e.default=n},function(t,e,i){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var n=(function(t,e,i){return e&&s(t.prototype,e),i&&s(t,i),t}(o,[{key:"getInteractionAnnouncer",value:function(){return this.interactionsAnnouncer}},{key:"announceInteractions",value:function(t){0",{class:this.style+"-tail"}),this.$innerTail=o("
              ",{class:this.style+"-inner-tail"}),this.$content=o("
              ",{class:this.style+"-text"}),"string"==typeof e.content?this.$content.html(e.content):this.$content.append(e.content),this.$innerBubble=o("
              ",{class:this.style+"-inner"}).append(this.$content).prepend(this.$innerTail),this.$h5pContainer=this.$reference.closest(".h5p-interactive-video"),this.$bubble=o("
              ",{class:this.style,"aria-live":"polite"}).append([this.$tail,this.$innerBubble]).addClass(this.style+"-inactive").appendTo(this.$h5pContainer),s&&H5P.$body.css("cursor","pointer"),"centered"===this.mode&&this.$bubble.css({width:"auto"===this.maxWidth?"auto":this.maxWidth+"px"}),this.update()}function a(t,e){for(var i=0;i",{class:h+"-introduction-title-text",id:h+"-introduction-title-text"}),this.$closeButton=u("
              ",{role:"button",class:h+"-close-button",tabindex:"0","aria-label":this.parent.l10n.close}),(0,c.onClick)(this.$closeButton,function(){return t.parent.toggleEndscreen(!1)});var e=u("
              ",{class:h+"-introduction-title"}).append([this.$endscreenIntroductionTitleText,this.$closeButton]);this.$endscreenIntroductionText=u("
              ",{class:h+"-introduction-text",id:h+"-introduction-text"}),this.$submitButtonContainer=u("
              ",{class:h+"-submit-button-container "+s}),this.$submitButton=H5P.JoubelUI.createButton({class:h+"-submit-button",html:this.l10n.submitButton,appendTo:this.$submitButtonContainer,click:function(){return t.handleSubmit()}}),this.$endscreenOverviewTitle=u("
              ",{class:h+"-overview-title"}).append(u("
              ",{class:h+"-overview-title-answered-questions",html:this.l10n.tableRowAnswered})).append(u("
              ",{class:h+"-overview-title-score",html:this.l10n.tableRowScore})),this.$endscreenBottomTable=u("
              ",{class:h+"-overview-table"}),this.$endscreen=u("
              ",{class:h,role:"dialog","aria-labelledby":h+"-introduction-title-text","aria-describedby":h+"-introduction-text"}).append(u("
              ",{class:h+"-introduction"}).append(u("
              ",{class:h+"-star-symbol"})).append(u("
              ",{class:h+"-introduction-container"}).append([e,this.$endscreenIntroductionText,this.$submitButtonContainer]))).append(u("
              ",{class:h+"-overview"}).append(this.$endscreenOverviewTitle).append(this.$endscreenBottomTable))}},{key:"handleSubmit",value:function(){var i=this;this.$submitButtonContainer.hasClass(s)||(this.$submitButtonContainer.addClass(s),this.$endscreenIntroductionText.html('"),this.answered.forEach(function(t){var e;"completed"!==t.getLastXAPIVerb()&&"answered"!==t.getLastXAPIVerb()&&((e=new H5P.XAPIEvent).data.statement=t.getXAPIData().statement,t.setLastXAPIVerb(e.getVerb()),i.trigger(e))}),this.parent.triggerXAPIScored(this.parent.getUsersScore(),this.parent.getUsersMaxScore(),"completed"))}},{key:"getDOM",value:function(){return this.$endscreen}},{key:"buildTableRow",value:function(t,e,i,n){var o=this,s=l(i)&&l(n),r=s?this.l10n.tableRowSummaryWithScore:this.l10n.tableRowSummaryWithoutScore,a=this.parent.skippingPrevented()?" "+h+"-no-link":"",r=u("
              ",{class:h+"-overview-table-row"+a,role:"row",tabIndex:0,"aria-label":r.replace("@score",i).replace("@total",n).replace("@question",e).replace("@minutes",Math.floor(t/60)).replace("@seconds",t%60)});return(0,c.onClick)(r,function(){return o.jump(t)}),u("
              ",{class:h+"-overview-table-row-time",html:H5P.InteractiveVideo.humanizeTime(t),appendTo:r,"aria-hidden":!0}),u("
              ",{class:h+"-overview-table-row-title",html:e,appendTo:r,"aria-hidden":!0}),u("
              ",{class:h+"-overview-table-row-score",html:s?i+" / "+n:this.l10n.answeredScore,appendTo:r,"aria-hidden":!0}),r}},{key:"jump",value:function(t){this.parent.skippingPrevented()||(this.parent.seek(t),this.parent.toggleEndscreen(!1))}},{key:"update",value:function(){var o=this;this.answered=(0'+this.l10n.informationNoAnswers+"
              "+this.l10n.informationMustHaveAnswer+"
              "):this.$endscreenIntroductionText.html(this.l10n.information.replace("@answered",t)),0