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AAOH,EAAEI,OAEfC,WAAWC,OAAM,IAAWC,OAAA,6BACxB,GAAIJ,aAAgBK,gBAAiB,CACjC,MAAMC,EAASN,EAAKO,aAAa,gBAAkB,SAC7CC,QAAcN,WAAWO,QAAQ,2CAA4C,CAAEH,OAAQA,IACvFI,EAAQnD,SAASoD,cAAc,SACrCD,EAAME,KAAO,SACbF,EAAMG,KAAO,YACbH,EAAMjB,MAAQe,EACdR,EAAKc,YAAYJ,GACjBV,EAAKe,Q,CAEb,KAAE,GACJ,G","sources":["webpack://bm3giraffe/./WebRoot/js/util.ts","webpack://bm3giraffe/webpack/bootstrap","webpack://bm3giraffe/webpack/runtime/define property getters","webpack://bm3giraffe/webpack/runtime/hasOwnProperty shorthand","webpack://bm3giraffe/webpack/runtime/make namespace object","webpack://bm3giraffe/./WebRoot/js/recaptcha-callback.ts"],"sourcesContent":["function first(selector: string, root?: Element) : T {\r\n const foundElement = (root || document).querySelector(selector);\r\n if (!foundElement) {\r\n throw new Error(`element '${selector}' was not found.`);\r\n } else {\r\n return foundElement as T;\r\n }\r\n}\r\n\r\nfunction tryFirst(selector: string, root?: Element): T | null {\r\n const foundElement = (root || document).querySelector(selector);\r\n if (!foundElement) {\r\n console.warn(`element '${selector}' was not found.`);\r\n }\r\n return foundElement;\r\n}\r\n\r\nfunction all(selector: string, root?: Element): Array {\r\n return Array.from((root || document).querySelectorAll(selector));\r\n}\r\n\r\n\r\nexport {\r\n first,\r\n tryFirst,\r\n all\r\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","import { all } from \"./util\";\r\n\r\n(() => {\n all(\".recaptcha-form\").forEach(f => {\n f.addEventListener('submit', e => {\n e.preventDefault();\n e.stopPropagation();\n\n const form = e.target;\n \n grecaptcha.ready(async () => {\n if (form instanceof HTMLFormElement) {\n const action = form.getAttribute('data-action') || 'submit'\n const token = await grecaptcha.execute('6LdqUdoZAAAAAHv-O46UPz6g6fGYCUDMcWr4EOP4', { action: action })\n const input = document.createElement('input');\n input.type = 'hidden';\n input.name = 'recaptcha';\n input.value = token;\n form.appendChild(input);\n form.submit();\n }\n });\n });\n });\n})()"],"names":["first","selector","root","foundElement","document","querySelector","Error","tryFirst","console","warn","all","Array","from","querySelectorAll","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","undefined","exports","module","__webpack_modules__","d","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","r","Symbol","toStringTag","value","forEach","f","addEventListener","e","preventDefault","stopPropagation","form","target","grecaptcha","ready","__awaiter","HTMLFormElement","action","getAttribute","token","execute","input","createElement","type","name","appendChild","submit"],"sourceRoot":""}