{"version":3,"file":"whereintheworld.min.js","sources":["https:\/\/moodle.sonsbeekmedia.nl\/caie_test\/mod\/teachingtools\/teachingapp\/whereintheworld\/amd\/src\/whereintheworld.js"],"sourcesContent":["\/\/ This file is part of Moodle - http:\/\/moodle.org\/\n\/\/\n\/\/ Moodle is free software: you can redistribute it and\/or modify\n\/\/ it under the terms of the GNU General Public License as published by\n\/\/ the Free Software Foundation, either version 3 of the License, or\n\/\/ (at your option) any later version.\n\/\/\n\/\/ Moodle is distributed in the hope that it will be useful,\n\/\/ but WITHOUT ANY WARRANTY; without even the implied warranty of\n\/\/ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n\/\/ GNU General Public License for more details.\n\/\/\n\/\/ You should have received a copy of the GNU General Public License\n\/\/ along with Moodle. If not, see .\n\n\/**\n * The flipping of cards.\n *\n * @module teachingapp_whereintheworld\/whereintheworld\n * @class whereintheworld\n * @copyright 2023 Sonsbeekmedia\n * @author Bas Brands \n * @license http:\/\/www.gnu.org\/copyleft\/gpl.html GNU GPL v3 or later\n *\/\n\nimport GameEngineLoader from 'mod_teachingtools\/game_engine';\nimport * as Config from 'core\/config';\n\nclass GameElement {\n\n constructor(names, rootElement) {\n this.names = names;\n this.rootElement = rootElement.querySelector('[data-region=\"draw-zone\"]');\n\n \/\/ Create a new iframe and load the page whereintheworld.html\n const iFrame = document.createElement('iframe');\n\n iFrame.src = `${Config.wwwroot}\/mod\/teachingtools\/teachingapp\/whereintheworld\/iframe\/index.html`;\n iFrame.width = '100%';\n iFrame.height = '100%';\n iFrame.style.border = 'none';\n iFrame.style.overflow = 'hidden';\n iFrame.style.position = 'absolute';\n iFrame.style.top = '0';\n iFrame.style.left = '0';\n iFrame.style.right = '0';\n iFrame.style.bottom = '0';\n iFrame.style.zIndex = '1';\n iFrame.style.backgroundColor = 'transparent';\n this.rootElement.append(iFrame);\n }\n\n update(names) {\n this.unusedNames = names;\n }\n}\n\nconst init = async(cmid) => {\n const GE = new GameEngineLoader('whereintheworld', cmid);\n await GE.load();\n const game = new GameElement(GE.names, GE.rootElement);\n GE.run(game);\n};\n\nexport default {\n init: init,\n GameElement\n};\n"],"names":["GameElement","constructor","names","rootElement","querySelector","iFrame","document","createElement","src","Config","wwwroot","width","height","style","border","overflow","position","top","left","right","bottom","zIndex","backgroundColor","append","update","unusedNames","init","async","GE","GameEngineLoader","cmid","load","game","run"],"mappings":";;;;;;;;;4kCA4BMA,YAEFC,YAAYC,MAAOC,kBACVD,MAAQA,WACRC,YAAcA,YAAYC,cAAc,mCAGvCC,OAASC,SAASC,cAAc,UAEtCF,OAAOG,cAASC,OAAOC,4EACvBL,OAAOM,MAAQ,OACfN,OAAOO,OAAS,OAChBP,OAAOQ,MAAMC,OAAS,OACtBT,OAAOQ,MAAME,SAAW,SACxBV,OAAOQ,MAAMG,SAAW,WACxBX,OAAOQ,MAAMI,IAAM,IACnBZ,OAAOQ,MAAMK,KAAO,IACpBb,OAAOQ,MAAMM,MAAQ,IACrBd,OAAOQ,MAAMO,OAAS,IACtBf,OAAOQ,MAAMQ,OAAS,IACtBhB,OAAOQ,MAAMS,gBAAkB,mBAC1BnB,YAAYoB,OAAOlB,QAG5BmB,OAAOtB,YACEuB,YAAcvB,oBAWZ,CACXwB,KARSC,MAAAA,aACHC,GAAK,IAAIC,qBAAiB,kBAAmBC,YAC7CF,GAAGG,aACHC,KAAO,IAAIhC,YAAY4B,GAAG1B,MAAO0B,GAAGzB,aAC1CyB,GAAGK,IAAID,OAKPhC,YAAAA"}