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uD,UAAUxB,YAAY/B,KAAKa,SAASO,IAE7CpB,KAAKiD,gBAAgBlB,YAAY/B,KAAKuD,UAgB1C,CAIA,UAAAf,GACInC,EAAEL,KAAK8B,WAAW0B,OAClBnD,EAAEL,KAAK0C,OAAOc,OACdnD,EAAEL,KAAK8B,WACF2B,KAAK,eACLC,MAAK,SAAUtC,EAAGuC,GACfA,EAAGC,WAAWC,SAClB,GACR,CACA,UAAAjB,GACIvC,EAAEL,KAAK8B,WAAWE,OAClB3B,EAAEL,KAAKkC,OAAOsB,MAClB,EAQJnD,EAAEuB,UAAUkC,GAAG,4BAA4B,WASvC,GARAzD,EAAE,2BAA2BqD,MAAK,SAAUK,GACxC,IACIrE,EAAWM,KAAKG,IAAM,IAAIR,EAAO,CAAEI,KAAMC,MAC7C,CAAE,MAAOgE,GACLC,QAAQC,IAAI,0BAA0BlE,KAAKG,KAC/C,CACJ,IAEIgE,YAAYC,aACZ,IAAK,MAAMlE,KAASmE,OAAOC,KAAK5E,GACxBA,EAAWQ,GAAOK,gBAClBb,EAAWQ,GAAO2C,yBAIlC,G","sources":["webpack://WebComponents/./runestone/reveal/js/reveal.js"],"sourcesContent":["/*==========================================\n======= Master reveal.js ========\n============================================\n=== This file contains the JS for ===\n=== the Runestone reval component. ===\n============================================\n=== Created by ===\n=== Isaiah Mayerchak ===\n=== 06/12/15 ===\n==========================================*/\n\"use strict\";\n\nvar RevealList = {}; // Dictionary that contains all instances of Reveal objects\n\nimport RunestoneBase from \"../../common/js/runestonebase\";\nimport \"../css/reveal.css\";\n\n// Define Reveal object\nclass Reveal extends RunestoneBase {\n constructor(opts) {\n super(opts);\n var orig = opts.orig; // entire
element that will be replaced by new HTML\n this.origElem = orig;\n this.divid = orig.id;\n this.dataModal = false; // is a model dialog vs. inline\n if ($(this.origElem).is(\"[data-modal]\")) {\n this.dataModal = true;\n }\n if ($(this.origElem).is(\"[data-instructoronly]\")) {\n this.instructorOnly = true;\n } else {\n this.instructorOnly = false;\n }\n this.modalTitle = null;\n this.showtitle = null; // Title of button that shows the concealed data\n this.hidetitle = null;\n this.origContent = $(this.origElem).html();\n this.children = [];\n this.adoptChildren();\n this.checkForTitle();\n this.getButtonTitles();\n // Delay creating instructoronly buttons until login\n if (!this.instructorOnly) {\n this.createShowButton();\n if (!this.dataModal) {\n this.createHideButton(); // Hide button is already implemented in modal dialog\n }\n }\n this.indicate_component_ready();\n }\n /*====================================\n == Get text for buttons/modal title ==\n ====================================*/\n adoptChildren() {\n for (var i = 0; i < this.origElem.childNodes.length; i++) {\n this.children.push(this.origElem.childNodes[i]);\n }\n }\n getButtonTitles() {\n this.showtitle = $(this.origElem).data(\"showtitle\");\n if (this.showtitle === undefined) {\n this.showtitle = \"Show\"; // default\n }\n if (this.instructorOnly) {\n this.showtitle += \" IG\";\n }\n this.hidetitle = $(this.origElem).data(\"hidetitle\");\n if (this.hidetitle === undefined) {\n this.hidetitle = \"Hide\"; // default\n }\n }\n checkForTitle() {\n this.modalTitle = $(this.origElem).data(\"title\");\n if (this.modalTitle === undefined) {\n this.modalTitle = \"Message from the author\"; // default\n }\n }\n /*============================\n == Create show/hide buttons ==\n ============================*/\n createShowButton() {\n var _this = this;\n this.containerDiv = document.createElement(\"div\"); // wrapper div\n this.containerDiv.id = this.divid;\n if (!this.dataModal) {\n this.revealDiv = document.createElement(\"div\"); // Div that is hidden that contains content\n // Get original content, put it inside revealDiv and replace original div with revealDiv\n //$(this.revealDiv).html(this.origContent);\n for (var i = 0; i < this.children.length; i++) {\n this.revealDiv.appendChild(this.children[i]);\n }\n $(this.revealDiv).hide();\n this.containerDiv.appendChild(this.revealDiv);\n }\n if (this.instructorOnly) {\n $(this.revealDiv).addClass(\"iguide\");\n }\n this.sbutt = document.createElement(\"button\");\n $(this.sbutt).addClass(\"btn reveal_button\");\n if (this.instructorOnly) {\n $(this.sbutt).addClass(\"btn-info\");\n } else {\n $(this.sbutt).addClass(\"btn-default\");\n }\n $(this.sbutt).css(\"margin-bottom\", \"10px\");\n this.sbutt.textContent = this.showtitle;\n this.sbutt.id = this.divid + \"_show\";\n if (!this.dataModal) {\n this.sbutt.onclick = function () {\n _this.showInline();\n $(this).hide();\n };\n } else {\n this.createModal();\n $(this.sbutt).attr({\n \"data-toggle\": \"modal\",\n \"data-target\": \"#\" + this.divid + \"_modal\",\n });\n }\n this.containerDiv.appendChild(this.sbutt);\n $(this.origElem).replaceWith(this.containerDiv);\n }\n createHideButton() {\n var _this = this;\n this.hbutt = document.createElement(\"button\");\n $(this.hbutt).hide();\n this.hbutt.textContent = this.hidetitle;\n this.hbutt.className = \"btn btn-default reveal_button\";\n $(this.hbutt).css(\"margin-bottom\", \"10px\");\n this.hbutt.id = this.divid + \"_hide\";\n this.hbutt.onclick = function () {\n _this.hideInline();\n $(this).hide();\n };\n this.containerDiv.appendChild(this.hbutt);\n }\n createInstructorButtons() {\n this.createShowButton();\n if (!this.dataModal) {\n this.createHideButton();\n }\n }\n /*=================\n === Modal logic ===\n =================*/\n createModal() {\n this.modalContainerDiv = document.createElement(\"div\");\n $(this.modalContainerDiv).addClass(\"modal fade\");\n this.modalContainerDiv.id = this.divid + \"_modal\";\n $(this.modalContainerDiv).attr(\"role\", \"dialog\");\n document.body.appendChild(this.modalContainerDiv);\n this.modalDialogDiv = document.createElement(\"div\");\n $(this.modalDialogDiv).addClass(\"modal-dialog\");\n this.modalContainerDiv.appendChild(this.modalDialogDiv);\n this.modalContentDiv = document.createElement(\"div\");\n $(this.modalContentDiv).addClass(\"modal-content\");\n this.modalDialogDiv.appendChild(this.modalContentDiv);\n this.modalHeaderDiv = document.createElement(\"div\");\n $(this.modalHeaderDiv).addClass(\"modal-header\");\n this.modalContentDiv.appendChild(this.modalHeaderDiv);\n this.modalButton = document.createElement(\"button\");\n this.modalButton.type = \"button\";\n $(this.modalButton).addClass(\"close\");\n $(this.modalButton).attr({\n \"aria-hidden\": \"true\",\n \"data-dismiss\": \"modal\",\n });\n this.modalButton.innerHTML = \"×\";\n this.modalHeaderDiv.appendChild(this.modalButton);\n this.modalTitleE = document.createElement(\"h4\");\n $(this.modalTitleE).addClass(\"modal-title\");\n this.modalTitleE.innerHTML = this.modalTitle;\n this.modalHeaderDiv.appendChild(this.modalTitleE);\n this.modalBody = document.createElement(\"div\");\n $(this.modalBody).addClass(\"modal-body\");\n for (var i = 0; i < this.children.length; i++) {\n this.modalBody.appendChild(this.children[i]);\n }\n this.modalContentDiv.appendChild(this.modalBody);\n /*var html = \"\";*/\n //var el = $(this.modalContainerDiv);\n //el.modal();\n }\n /*==================\n === Inline logic ===\n ==================*/\n showInline() {\n $(this.revealDiv).show();\n $(this.hbutt).show();\n $(this.revealDiv)\n .find(\".CodeMirror\")\n .each(function (i, el) {\n el.CodeMirror.refresh();\n });\n }\n hideInline() {\n $(this.revealDiv).hide();\n $(this.sbutt).show();\n }\n}\n\n/*=================================\n== Find the custom HTML tags and ==\n== execute our code on them ==\n=================================*/\n\n$(document).on(\"runestone:login-complete\", function () {\n $(\"[data-component=reveal]\").each(function (index) {\n try {\n RevealList[this.id] = new Reveal({ orig: this });\n } catch (err) {\n console.log(`Error rendering Reveal ${this.id}`);\n }\n });\n\n if (eBookConfig.isInstructor) {\n for (const divid of Object.keys(RevealList)) {\n if (RevealList[divid].instructorOnly) {\n RevealList[divid].createInstructorButtons();\n }\n }\n }\n});\n"],"names":["RevealList","Reveal","constructor","opts","super","orig","this","origElem","divid","id","dataModal","$","is","instructorOnly","modalTitle","showtitle","hidetitle","origContent","html","children","adoptChildren","checkForTitle","getButtonTitles","createShowButton","createHideButton","indicate_component_ready","i","childNodes","length","push","data","undefined","_this","containerDiv","document","createElement","revealDiv","appendChild","hide","addClass","sbutt","css","textContent","createModal","attr","onclick","showInline","replaceWith","hbutt","className","hideInline","createInstructorButtons","modalContainerDiv","body","modalDialogDiv","modalContentDiv","modalHeaderDiv","modalButton","type","innerHTML","modalTitleE","modalBody","show","find","each","el","CodeMirror","refresh","on","index","err","console","log","eBookConfig","isInstructor","Object","keys"],"sourceRoot":""}