diff --git a/js/dist/admin.js b/js/dist/admin.js index 89132b0..8926f67 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,3 @@ -(()=>{var t={n:e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return t.d(a,{a}),a},d:(e,a)=>{for(var r in a)t.o(a,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:a[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};(()=>{"use strict";t.r(e);const a=flarum.core.compat["admin/app"];var r=t.n(a);r().initializers.add("fof/recaptcha",(function(){r().extensionData.for("fof-recaptcha").registerSetting({setting:"fof-recaptcha.type",label:r().translator.trans("fof-recaptcha.admin.settings.type_label"),options:{checkbox:"Checkbox",invisible:"Invisible"},required:!0,default:"checkbox",type:"select"}).registerSetting({setting:"fof-recaptcha.credentials.site",label:r().translator.trans("fof-recaptcha.admin.settings.site_key_label"),type:"text",required:!0,help:r().translator.trans("fof-recaptcha.admin.settings.help_text",{a:m("a",{href:"https://www.google.com/recaptcha/admin",target:"_blank",rel:"noopener"})})}).registerSetting({setting:"fof-recaptcha.credentials.secret",label:r().translator.trans("fof-recaptcha.admin.settings.secret_key_label"),type:"password",required:!0}).registerSetting({setting:"fof-recaptcha.signup",type:"bool",label:r().translator.trans("fof-recaptcha.admin.settings.signup")}).registerSetting({setting:"fof-recaptcha.signin",type:"bool",label:r().translator.trans("fof-recaptcha.admin.settings.signin")}).registerSetting({setting:"fof-recaptcha.forgot",type:"bool",label:r().translator.trans("fof-recaptcha.admin.settings.forgot")}).registerPermission({permission:"fof-recaptcha.postWithoutCaptcha",label:r().translator.trans("fof-recaptcha.admin.permissions.post_without_captcha"),icon:"fas fa-robot"},"reply")}))})(),module.exports=e})(); +/*! For license information please see admin.js.LICENSE.txt */ +(()=>{var t={648:(t,e,r)=>{var n=r(288).default;function o(){"use strict";t.exports=o=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},s="function"==typeof Symbol?Symbol:{},c=s.iterator||"@@iterator",u=s.asyncIterator||"@@asyncIterator",l=s.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(t){p=function(t,e,r){return t[e]=r}}function f(t,e,r,n){var o=e&&e.prototype instanceof m?e:m,a=Object.create(o.prototype),s=new E(n||[]);return i(a,"_invoke",{value:L(t,r,s)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=f;var d={};function m(){}function v(){}function y(){}var g={};p(g,c,(function(){return this}));var b=Object.getPrototypeOf,w=b&&b(b(P([])));w&&w!==r&&a.call(w,c)&&(g=w);var x=y.prototype=m.prototype=Object.create(g);function _(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function k(t,e){function r(o,i,s,c){var u=h(t[o],t,i);if("throw"!==u.type){var l=u.arg,p=l.value;return p&&"object"==n(p)&&a.call(p,"__await")?e.resolve(p.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(p).then((function(t){l.value=t,s(l)}),(function(t){return r("throw",t,s,c)}))}c(u.arg)}var o;i(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}})}function L(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var s=O(i,r);if(s){if(s===d)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var c=h(t,e,r);if("normal"===c.type){if(n=r.done?"completed":"suspendedYield",c.arg===d)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n="completed",r.method="throw",r.arg=c.arg)}}}function O(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,O(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=h(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function j(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t){var e=t[c];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=a.call(o,"catchLoc"),c=a.call(o,"finallyLoc");if(s&&c){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),j(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;j(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},288:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},357:(t,e,r)=>{var n=r(648)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n);const t=flarum.core.compat["admin/app"];var e=r.n(t);function o(){return o=Object.assign?Object.assign.bind():function(t){for(var e=1;e {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","import app from 'flarum/admin/app';\n\napp.initializers.add('fof/recaptcha', () => {\n app.extensionData\n .for('fof-recaptcha')\n .registerSetting({\n setting: 'fof-recaptcha.type',\n label: app.translator.trans('fof-recaptcha.admin.settings.type_label'),\n options: {\n checkbox: 'Checkbox',\n invisible: 'Invisible',\n },\n required: true,\n default: 'checkbox',\n type: 'select',\n })\n .registerSetting({\n setting: 'fof-recaptcha.credentials.site',\n label: app.translator.trans('fof-recaptcha.admin.settings.site_key_label'),\n type: 'text',\n required: true,\n help: app.translator.trans('fof-recaptcha.admin.settings.help_text', {\n a: ,\n }),\n })\n .registerSetting({\n setting: 'fof-recaptcha.credentials.secret',\n label: app.translator.trans('fof-recaptcha.admin.settings.secret_key_label'),\n type: 'password',\n required: true,\n })\n .registerSetting({\n setting: 'fof-recaptcha.signup',\n type: 'bool',\n label: app.translator.trans('fof-recaptcha.admin.settings.signup'),\n })\n .registerSetting({\n setting: 'fof-recaptcha.signin',\n type: 'bool',\n label: app.translator.trans('fof-recaptcha.admin.settings.signin'),\n })\n .registerSetting({\n setting: 'fof-recaptcha.forgot',\n type: 'bool',\n label: app.translator.trans('fof-recaptcha.admin.settings.forgot'),\n })\n .registerPermission(\n {\n permission: 'fof-recaptcha.postWithoutCaptcha',\n label: app.translator.trans('fof-recaptcha.admin.permissions.post_without_captcha'),\n icon: 'fas fa-robot',\n },\n 'reply'\n );\n});\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","app","registerSetting","setting","label","options","checkbox","invisible","required","default","type","help","m","href","target","rel","registerPermission","permission","icon"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"admin.js","mappings":";2BAAA,IAAIA,EAAUC,EAAAA,KAAAA,QACd,SAASC,IACP,aACAC,EAAOC,QAAUF,EAAsB,WACrC,OAAOE,CACT,EAAGD,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,QACxE,IAAIA,EAAU,CAAC,EACbE,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eACZC,EAAiBJ,OAAOI,gBAAkB,SAAUC,EAAKC,EAAKC,GAC5DF,EAAIC,GAAOC,EAAKC,KAClB,EACAC,EAAU,mBAAqBC,OAASA,OAAS,CAAC,EAClDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAC7C,SAASC,EAAOZ,EAAKC,EAAKE,GACxB,OAAOR,OAAOI,eAAeC,EAAKC,EAAK,CACrCE,MAAOA,EACPU,YAAY,EACZC,cAAc,EACdC,UAAU,IACRf,EAAIC,EACV,CACA,IACEW,EAAO,CAAC,EAAG,GACb,CAAE,MAAOI,GACPJ,EAAS,SAAgBZ,EAAKC,EAAKE,GACjC,OAAOH,EAAIC,GAAOE,CACpB,CACF,CACA,SAASc,EAAKC,EAASC,EAASC,EAAMC,GACpC,IAAIC,EAAiBH,GAAWA,EAAQvB,qBAAqB2B,EAAYJ,EAAUI,EACjFC,EAAY7B,OAAO8B,OAAOH,EAAe1B,WACzC8B,EAAU,IAAIC,EAAQN,GAAe,IACvC,OAAOtB,EAAeyB,EAAW,UAAW,CAC1CrB,MAAOyB,EAAiBV,EAASE,EAAMM,KACrCF,CACN,CACA,SAASK,EAASC,EAAI9B,EAAK+B,GACzB,IACE,MAAO,CACLC,KAAM,SACND,IAAKD,EAAGG,KAAKjC,EAAK+B,GAEtB,CAAE,MAAOf,GACP,MAAO,CACLgB,KAAM,QACND,IAAKf,EAET,CACF,CACA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KAAO4K,EACZA,EAAS5K,aAAgBuI,WAC3BqC,EAAS5K,GAAO4K,EAAS5K,GAAKgC,KAAKK,OAQvC,OAJAmO,EAAMC,IAAI,YAAalD,EAACc,EAAa,CAACzD,SAAUA,KAEhD4F,EAAME,YAAY,eAAgB,GAE3BF,CACT,EAACH,CAAA,CAjB+B,CAASM,KCF3C3F,IAAAA,aAAAA,IAAqB,iBAAiB,WACpCA,IAAAA,cAAAA,IACO,iBACJ4F,aAAaP,GACbQ,gBAAgB,CACfC,QAAS,qBACTC,MAAO/F,IAAAA,WAAAA,MAAqB,2CAC5BgG,KAAMhG,IAAAA,WAAAA,MAAqB,0CAC3BiG,QAAS,CACPC,SAAU,WACVC,UAAW,aAEbC,UAAU,EACVC,QAAS,WACTtP,KAAM,WAEP8O,gBAAgB,CACfC,QAAS,iCACTC,MAAO/F,IAAAA,WAAAA,MAAqB,+CAC5BjJ,KAAM,OACNqP,UAAU,EACVJ,KAAMhG,IAAAA,WAAAA,MAAqB,yCAA0C,CACnEhC,EAAGuE,EAAA,KAAG+D,KAAK,yCAAyC1H,OAAO,SAAS4C,IAAI,iBAG3EqE,gBAAgB,CACfC,QAAS,mCACTC,MAAO/F,IAAAA,WAAAA,MAAqB,iDAC5BjJ,KAAM,WACNqP,UAAU,IAEXP,gBAAgB,CACfC,QAAS,uBACT/O,KAAM,OACNgP,MAAO/F,IAAAA,WAAAA,MAAqB,yCAE7B6F,gBAAgB,CACfC,QAAS,uBACT/O,KAAM,OACNgP,MAAO/F,IAAAA,WAAAA,MAAqB,yCAE7B6F,gBAAgB,CACfC,QAAS,uBACT/O,KAAM,OACNgP,MAAO/F,IAAAA,WAAAA,MAAqB,yCAE7BuG,mBACC,CACEC,WAAY,mCACZT,MAAO/F,IAAAA,WAAAA,MAAqB,wDAC5ByG,KAAM,gBAER,QAEN","sources":["webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/recaptcha/webpack/bootstrap","webpack://@fof/recaptcha/webpack/runtime/compat get default export","webpack://@fof/recaptcha/webpack/runtime/define property getters","webpack://@fof/recaptcha/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/recaptcha/webpack/runtime/make namespace object","webpack://@fof/recaptcha/external root \"flarum.core.compat['admin/app']\"","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/recaptcha/external root \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/recaptcha/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['common/app']\"","webpack://@fof/recaptcha/./src/common/states/RecaptchaState.js","webpack://@fof/recaptcha/./node_modules/external-load/index.js","webpack://@fof/recaptcha/./src/common/components/Recaptcha.js","webpack://@fof/recaptcha/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['common/components/Alert']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/recaptcha/./src/admin/components/RecaptchaTest.tsx","webpack://@fof/recaptcha/./src/admin/components/RecaptchaPage.tsx","webpack://@fof/recaptcha/./src/admin/index.tsx"],"sourcesContent":["var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/ExtensionPage'];","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\n\nexport default class RecaptchaState {\n constructor(settings, callback, errorCallback = null) {\n this.settings = settings;\n this.callback = callback;\n this.errorCallback =\n errorCallback ||\n ((alertAttrs) => {\n // By default, the alert will just be shown globally\n app.alerts.show(alertAttrs);\n });\n this.widgetId = null;\n\n this.type = this.settings['fof-recaptcha.type'];\n }\n\n render(element) {\n this.widgetId = grecaptcha.render(element, {\n sitekey: this.settings['fof-recaptcha.credentials.site'],\n theme: !!Number(this.settings['theme_dark_mode']) ? 'dark' : 'light',\n type: this.type,\n size: this.settings['fof-recaptcha.type'] === 'invisible' ? 'invisible' : 'normal',\n callback: this.callback,\n 'error-callback': () => {\n // Similarly to error.alert, we create an alert payload that can then be shown in-context depending where the code is called from\n const alertAttrs = {\n type: 'error',\n content: app.translator.trans('fof-recaptcha.forum.error'),\n };\n this.errorCallback(alertAttrs);\n },\n });\n }\n\n getResponse() {\n return grecaptcha.getResponse(this.widgetId);\n }\n\n execute() {\n return grecaptcha.execute(this.widgetId);\n }\n\n reset() {\n return grecaptcha.reset(this.widgetId);\n }\n\n isInvisible() {\n return this.type === 'invisible';\n }\n}\n","/**\n * Simple resource loader based on David Walsh's tutorial\n * https://davidwalsh.name/javascript-loader\n * https://davidwalsh.name/javascript-functions\n */\nexport default (function() {\n // Function which returns a function\n function _load(tag) {\n return function(url) {\n // This promise will be used by Promise.all to determine success or failure\n return new Promise(function(resolve, reject) {\n var element = document.createElement(tag);\n var parent = \"body\";\n var attr = \"src\";\n\n // Important success and error for the promise\n element.onload = function() {\n resolve(url);\n };\n element.onerror = function() {\n reject(url);\n };\n\n // Need to set different attributes depending on tag type\n switch (tag) {\n case \"script\":\n element.async = true;\n break;\n case \"link\":\n element.type = \"text/css\";\n element.rel = \"stylesheet\";\n attr = \"href\";\n parent = \"head\";\n }\n\n // Inject into document to kick off loading\n element[attr] = url;\n document[parent].appendChild(element);\n });\n };\n }\n\n return {\n css: _load(\"link\"),\n js: _load(\"script\"),\n img: _load(\"img\")\n };\n})();\n","import app from 'flarum/common/app';\nimport Component from 'flarum/common/Component';\nimport load from 'external-load';\n\nconst addResources = async () => {\n if (app.recaptchaLoaded) return;\n\n await load.js(`https://www.recaptcha.net/recaptcha/api.js?hl=${app.translator.getLocale()}&render=explicit`);\n\n app.recaptchaLoaded = true;\n};\n\nexport default class Recaptcha extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n }\n\n view() {\n return (\n
\n
\n
\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n addResources().then(() => {\n const interval = setInterval(() => {\n if (window.recaptcha) {\n clearInterval(interval);\n this.attrs.state.render(vnode.dom.querySelector('.g-recaptcha'));\n }\n }, 250);\n });\n\n // It's possible to TAB into the reCAPTCHA iframe, and it's very confusing when using the invisible mode\n if (this.attrs.state.type === 'invisible') {\n const iframe = vnode.dom.querySelector('iframe');\n\n if (iframe) {\n iframe.tabIndex = -1;\n }\n }\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Alert'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/classList'];","import type Mithril from 'mithril';\nimport app from 'flarum/admin/app';\n\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport RecaptchaState from '../../common/states/RecaptchaState';\nimport Recaptcha from '../../common/components/Recaptcha';\nimport Button from 'flarum/common/components/Button';\nimport Alert from 'flarum/common/components/Alert';\nimport classList from 'flarum/common/utils/classList';\n\nexport default class RecaptchaTest extends Component {\n loading = false;\n alertAttrs: any;\n\n view(vnode: Mithril.Vnode): Mithril.Children {\n return (\n
\n
\n
\n

{app.translator.trans('fof-recaptcha.admin.test.title')}

\n
\n
\n
\n
\n
\n

{app.translator.trans('fof-recaptcha.admin.test.help_text')}

\n\n {this.alertAttrs && }\n\n {this.state && }\n
\n\n
\n
\n \n\n {this.state && (\n \n )}\n
\n
\n\n
\n
\n
\n
\n );\n }\n\n destroy() {\n this.state = null;\n this.alertAttrs = null;\n this.loading = false;\n\n m.redraw.sync();\n }\n\n initialize() {\n this.destroy();\n\n const data = this.attrs.settings || app.data.settings;\n\n this.state = new RecaptchaState(\n data,\n () => {\n if (this.state!.isInvisible()) {\n // Create \"fake\" event so this works when other extensions extend onsubmit as well\n const event = new Event('submit');\n event.isRecaptchaSecondStep = true;\n this.onsubmit(event);\n }\n },\n this.onerror\n );\n }\n\n async onsubmit(e: Event) {\n e.preventDefault();\n\n if (!this.state) {\n return this.initialize();\n }\n\n this.alertAttrs = null;\n this.loading = true;\n m.redraw();\n\n if (this.state.isInvisible() && !e.isRecaptchaSecondStep) {\n // When recaptcha is invisible, onsubmit will be called two times\n // First time with normal event, we will call recaptcha.execute\n // Second time is called from recaptcha callback with a special isRecaptcha attribute\n e.preventDefault();\n this.state.execute();\n return;\n }\n\n const body = {\n 'g-recaptcha-response': this.state.getResponse(),\n };\n\n try {\n await app.request({\n method: 'POST',\n url: `${app.forum.attribute('apiUrl')}/fof/recaptcha/test`,\n body,\n errorHandler: () => {},\n });\n } catch (e) {\n return this.onerror(e);\n }\n\n this.loading = false;\n this.alertAttrs = {\n type: 'success',\n content: app.translator.trans('fof-recaptcha.admin.test.success_message'),\n };\n this.state.reset();\n m.redraw();\n }\n\n onerror(error) {\n const alert = error.alert || error;\n\n this.loading = false;\n this.alertAttrs = alert;\n this.state?.reset();\n m.redraw();\n }\n}\n","import ExtensionPage, { ExtensionPageAttrs } from 'flarum/admin/components/ExtensionPage';\nimport Mithril from 'mithril';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport RecaptchaTest from './RecaptchaTest';\n\nexport default class RecaptchaPage extends ExtensionPage {\n sections(vnode: Mithril.VnodeDOM): ItemList {\n const items = super.sections(vnode);\n\n const settings = { ...this.settings };\n\n for (const key in settings) {\n if (settings[key] instanceof Function) {\n settings[key] = settings[key].call(this);\n }\n }\n\n items.add('recaptcha', );\n\n items.setPriority('permissions', -1);\n\n return items;\n }\n}\n","import app from 'flarum/admin/app';\nimport RecaptchaPage from './components/RecaptchaPage';\n\napp.initializers.add('fof/recaptcha', () => {\n app.extensionData\n .for('fof-recaptcha')\n .registerPage(RecaptchaPage)\n .registerSetting({\n setting: 'fof-recaptcha.type',\n label: app.translator.trans('fof-recaptcha.admin.settings.type_label'),\n help: app.translator.trans('fof-recaptcha.admin.settings.type_help'),\n options: {\n checkbox: 'Checkbox',\n invisible: 'Invisible',\n },\n required: true,\n default: 'checkbox',\n type: 'select',\n })\n .registerSetting({\n setting: 'fof-recaptcha.credentials.site',\n label: app.translator.trans('fof-recaptcha.admin.settings.site_key_label'),\n type: 'text',\n required: true,\n help: app.translator.trans('fof-recaptcha.admin.settings.help_text', {\n a:
,\n }),\n })\n .registerSetting({\n setting: 'fof-recaptcha.credentials.secret',\n label: app.translator.trans('fof-recaptcha.admin.settings.secret_key_label'),\n type: 'password',\n required: true,\n })\n .registerSetting({\n setting: 'fof-recaptcha.signup',\n type: 'bool',\n label: app.translator.trans('fof-recaptcha.admin.settings.signup'),\n })\n .registerSetting({\n setting: 'fof-recaptcha.signin',\n type: 'bool',\n label: app.translator.trans('fof-recaptcha.admin.settings.signin'),\n })\n .registerSetting({\n setting: 'fof-recaptcha.forgot',\n type: 'bool',\n label: app.translator.trans('fof-recaptcha.admin.settings.forgot'),\n })\n .registerPermission(\n {\n permission: 'fof-recaptcha.postWithoutCaptcha',\n label: app.translator.trans('fof-recaptcha.admin.permissions.post_without_captcha'),\n icon: 'fas fa-robot',\n },\n 'reply'\n );\n});\n"],"names":["_typeof","require","_regeneratorRuntime","module","exports","__esModule","Op","Object","prototype","hasOwn","hasOwnProperty","defineProperty","obj","key","desc","value","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","type","call","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","d","a","definition","o","get","prop","r","flarum","core","compat","_extends","assign","bind","target","arguments","source","apply","_setPrototypeOf","p","_inheritsLoose","subClass","superClass","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","RecaptchaState","settings","callback","errorCallback","alertAttrs","app","widgetId","_proto","render","element","_this","grecaptcha","sitekey","theme","Number","size","content","getResponse","execute","isInvisible","_load","tag","url","document","createElement","parent","attr","onload","onerror","rel","appendChild","css","js","img","addResources","_ref","_callee","_context","load","Recaptcha","_Component","oninit","vnode","view","m","className","oncreate","interval","setInterval","window","recaptcha","clearInterval","attrs","dom","querySelector","iframe","tabIndex","Component","RecaptchaTest","_len","Array","_key","concat","loading","_this$state","class","onsubmit","classList","Alert","dismissible","Button","onclick","initialize","destroy","redraw","sync","_this2","data","event","Event","isRecaptchaSecondStep","_onsubmit","e","body","preventDefault","errorHandler","t0","_x","_this$state2","alert","RecaptchaPage","_ExtensionPage","sections","items","add","setPriority","ExtensionPage","registerPage","registerSetting","setting","label","help","options","checkbox","invisible","required","default","href","registerPermission","permission","icon"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index b622b03..582f03a 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,3 +1,3 @@ /*! For license information please see forum.js.LICENSE.txt */ -(()=>{var t={648:(t,e,r)=>{var o=r(288).default;function n(){"use strict";t.exports=n=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",p=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function l(t,e,r,o){var n=e&&e.prototype instanceof v?e:v,a=Object.create(n.prototype),c=new k(o||[]);return i(a,"_invoke",{value:S(t,r,c)}),a}function h(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var d={};function v(){}function y(){}function m(){}var g={};f(g,u,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(P([])));x&&x!==r&&a.call(x,u)&&(g=x);var w=m.prototype=v.prototype=Object.create(g);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(n,i,c,u){var s=h(t[n],t,i);if("throw"!==s.type){var p=s.arg,f=p.value;return f&&"object"==o(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){p.value=t,c(p)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var n;i(this,"_invoke",{value:function(t,o){function a(){return new e((function(e,n){r(t,o,e,n)}))}return n=n?n.then(a,a):a()}})}function S(t,e,r){var o="suspendedStart";return function(n,a){if("executing"===o)throw new Error("Generator is already running");if("completed"===o){if("throw"===n)throw a;return{value:void 0,done:!0}}for(r.method=n,r.arg=a;;){var i=r.delegate;if(i){var c=j(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===o)throw o="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);o="executing";var u=h(t,e,r);if("normal"===u.type){if(o=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(o="completed",r.method="throw",r.arg=u.arg)}}}function j(t,e){var r=e.method,o=t.iterator[r];if(void 0===o)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var n=h(o,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,d;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r=0;--o){var n=this.tryEntries[o],i=n.completion;if("root"===n.tryLoc)return r("end");if(n.tryLoc<=this.prev){var c=a.call(n,"catchLoc"),u=a.call(n,"finallyLoc");if(c&&u){if(this.prev=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&a.call(o,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var o=r.completion;if("throw"===o.type){var n=o.arg;O(r)}return n}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}t.exports=n,t.exports.__esModule=!0,t.exports.default=t.exports},288:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},357:(t,e,r)=>{var o=r(648)();t.exports=o;try{regeneratorRuntime=o}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=o:Function("r","regeneratorRuntime = r")(o)}}},e={};function r(o){var n=e[o];if(void 0!==n)return n.exports;var a=e[o]={exports:{}};return t[o](a,a.exports,r),a.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var o in e)r.o(e,o)&&!r.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:e[o]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var o={};(()=>{"use strict";r.r(o);const t=flarum.core.compat["forum/app"];var e=r.n(t);const n=flarum.core.compat["forum/components/DiscussionComposer"];var a=r.n(n);const i=flarum.core.compat["forum/components/ReplyComposer"];var c=r.n(i);const u=flarum.core.compat["common/extend"];var s=function(){function t(t,r){void 0===r&&(r=null),this.callback=t,this.errorCallback=r||function(t){e().alerts.show(t)},this.widgetId=null}var r=t.prototype;return r.render=function(t){var r=this;this.widgetId=grecaptcha.render(t,{sitekey:e().data["fof-recaptcha.credentials.site"],theme:e().forum.attribute("darkMode")?"dark":"light",type:e().data["fof-recaptcha.type"],size:"invisible"===e().data["fof-recaptcha.type"]?"invisible":"normal",callback:this.callback,"error-callback":function(){var t={type:"error",content:e().translator.trans("fof-recaptcha.forum.error")};r.errorCallback(t)}})},r.getResponse=function(){return grecaptcha.getResponse(this.widgetId)},r.execute=function(){return grecaptcha.execute(this.widgetId)},r.reset=function(){return grecaptcha.reset(this.widgetId)},t}();function p(t,e){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},p(t,e)}function f(t,e,r,o,n,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(o,n)}var l=r(357),h=r.n(l);const d=flarum.core.compat["common/Component"];var v=r.n(d);const y=function(){function t(t){return function(e){return new Promise((function(r,o){var n=document.createElement(t),a="body",i="src";switch(n.onload=function(){r(e)},n.onerror=function(){o(e)},t){case"script":n.async=!0;break;case"link":n.type="text/css",n.rel="stylesheet",i="href",a="head"}n[i]=e,document[a].appendChild(n)}))}}return{css:t("link"),js:t("script"),img:t("img")}}();var g=function(){var t,r=(t=h().mark((function t(){return h().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!e().recaptchaLoaded){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,y.js("https://www.recaptcha.net/recaptcha/api.js?hl="+e().translator.locale+"&render=explicit");case 4:e().recaptchaLoaded=!0;case 5:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(o,n){var a=t.apply(e,r);function i(t){f(a,o,n,i,c,"next",t)}function c(t){f(a,o,n,i,c,"throw",t)}i(void 0)}))});return function(){return r.apply(this,arguments)}}(),b=function(t){var r,o;function n(){return t.apply(this,arguments)||this}o=t,(r=n).prototype=Object.create(o.prototype),r.prototype.constructor=r,p(r,o);var a=n.prototype;return a.oninit=function(e){t.prototype.oninit.call(this,e)},a.view=function(){return m("div",{className:"Form-group"},m("div",{className:"g-recaptcha"}))},a.oncreate=function(r){var o=this;if(t.prototype.oncreate.call(this,r),g().then((function(){var t=setInterval((function(){window.recaptcha&&(clearInterval(t),o.attrs.state.render(r.dom.querySelector(".g-recaptcha")))}),250)})),"invisible"===e().data["fof-recaptcha.type"]){var n=r.dom.querySelector("iframe");n&&(n.tabIndex=-1)}},n}(v());function x(t){var r="invisible"===e().data["fof-recaptcha.type"];(0,u.extend)(t.prototype,"oninit",(function(){var t=this;e().forum.attribute("postWithoutCaptcha")||(this.recaptcha=new s((function(){r&&t.onsubmit("recaptchaSecondStep")})))})),(0,u.extend)(t.prototype,"data",(function(t){e().forum.attribute("postWithoutCaptcha")||(t["g-recaptcha-response"]=this.recaptcha.getResponse())})),(0,u.extend)(t.prototype,"headerItems",(function(t){e().forum.attribute("postWithoutCaptcha")||t.add("recaptcha",b.component({state:this.recaptcha}),-5)})),(0,u.extend)(t.prototype,"loaded",(function(){e().forum.attribute("postWithoutCaptcha")||this.recaptcha.reset()})),(0,u.override)(t.prototype,"onsubmit",(function(t,o){return!e().forum.attribute("postWithoutCaptcha")&&r&&"recaptchaSecondStep"!==o?(this.loading=!0,void this.recaptcha.execute()):t()}))}const w=flarum.core.compat["forum/components/ForgotPasswordModal"];var L=r.n(w);const _=flarum.core.compat["forum/components/LogInModal"];var S=r.n(_);const j=flarum.core.compat["forum/components/SignUpModal"];var E=r.n(j),O=function(t){var r=t.modal,o=t.type,n=t.dataMethod,a="invisible"===e().data["fof-recaptcha.type"],i=function(){return!!e().forum.attribute("fof-recaptcha."+o)};(0,u.extend)(r.prototype,"oninit",(function(){var t=this;i()&&(this.recaptcha=new s((function(){if(a){var e=new Event("submit");e.isRecaptchaSecondStep=!0,t.onsubmit(e)}}),(function(e){t.loaded(),t.alertAttrs=e})))})),(0,u.extend)(r.prototype,n,(function(t){i()&&(t["g-recaptcha-response"]=this.recaptcha.getResponse())})),(0,u.extend)(r.prototype,"fields",(function(t){i()&&t.add("recaptcha",m(b,{state:this.recaptcha}),-5)})),(0,u.extend)(r.prototype,"onerror",(function(){i()&&this.recaptcha.reset()})),(0,u.override)(r.prototype,"onsubmit",(function(t,e){return i()&&a&&!e.isRecaptchaSecondStep?(e.preventDefault(),this.loading=!0,void this.recaptcha.execute()):t(e)}))};e().initializers.add("fof/recaptcha",(function(){e().recaptchaLoaded=!1,x(a()),x(c()),O({modal:L(),type:"forgot",dataMethod:"requestParams"}),O({modal:S(),type:"signin",dataMethod:"loginParams"}),O({modal:E(),type:"signup",dataMethod:"submitData"})}))})(),module.exports=o})(); +(()=>{var t={648:(t,e,r)=>{var n=r(288).default;function o(){"use strict";t.exports=o=function(){return e},t.exports.__esModule=!0,t.exports.default=t.exports;var e={},r=Object.prototype,a=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},u=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",p=c.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function h(t,e,r,n){var o=e&&e.prototype instanceof v?e:v,a=Object.create(o.prototype),c=new k(n||[]);return i(a,"_invoke",{value:S(t,r,c)}),a}function l(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=h;var d={};function v(){}function m(){}function y(){}var g={};f(g,u,(function(){return this}));var b=Object.getPrototypeOf,x=b&&b(b(P([])));x&&x!==r&&a.call(x,u)&&(g=x);var w=y.prototype=v.prototype=Object.create(g);function L(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,c,u){var s=l(t[o],t,i);if("throw"!==s.type){var p=s.arg,f=p.value;return f&&"object"==n(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,c,u)}),(function(t){r("throw",t,c,u)})):e.resolve(f).then((function(t){p.value=t,c(p)}),(function(t){return r("throw",t,c,u)}))}u(s.arg)}var o;i(this,"_invoke",{value:function(t,n){function a(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(a,a):a()}})}function S(t,e,r){var n="suspendedStart";return function(o,a){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===o)throw a;return{value:void 0,done:!0}}for(r.method=o,r.arg=a;;){var i=r.delegate;if(i){var c=j(i,r);if(c){if(c===d)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if("suspendedStart"===n)throw n="completed",r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n="executing";var u=l(t,e,r);if("normal"===u.type){if(n=r.done?"completed":"suspendedYield",u.arg===d)continue;return{value:u.arg,done:r.done}}"throw"===u.type&&(n="completed",r.method="throw",r.arg=u.arg)}}}function j(t,e){var r=e.method,n=t.iterator[r];if(void 0===n)return e.delegate=null,"throw"===r&&t.iterator.return&&(e.method="return",e.arg=void 0,j(t,e),"throw"===e.method)||"return"!==r&&(e.method="throw",e.arg=new TypeError("The iterator does not provide a '"+r+"' method")),d;var o=l(n,t.iterator,e.arg);if("throw"===o.type)return e.method="throw",e.arg=o.arg,e.delegate=null,d;var a=o.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,d):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,d)}function E(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function k(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function P(t){if(t){var e=t[u];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,n=function e(){for(;++r=0;--n){var o=this.tryEntries[n],i=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=a.call(o,"catchLoc"),u=a.call(o,"finallyLoc");if(c&&u){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),O(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;O(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),d}},e}t.exports=o,t.exports.__esModule=!0,t.exports.default=t.exports},288:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports.default=t.exports},357:(t,e,r)=>{var n=r(648)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},e={};function r(n){var o=e[n];if(void 0!==o)return o.exports;var a=e[n]={exports:{}};return t[n](a,a.exports,r),a.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var n in e)r.o(e,n)&&!r.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n);const t=flarum.core.compat["forum/app"];var e=r.n(t);const o=flarum.core.compat["forum/components/DiscussionComposer"];var a=r.n(o);const i=flarum.core.compat["forum/components/ReplyComposer"];var c=r.n(i);const u=flarum.core.compat["common/extend"],s=flarum.core.compat["common/app"];var p=r.n(s),f=function(){function t(t,e,r){void 0===r&&(r=null),this.settings=t,this.callback=e,this.errorCallback=r||function(t){p().alerts.show(t)},this.widgetId=null,this.type=this.settings["fof-recaptcha.type"]}var e=t.prototype;return e.render=function(t){var e=this;this.widgetId=grecaptcha.render(t,{sitekey:this.settings["fof-recaptcha.credentials.site"],theme:Number(this.settings.theme_dark_mode)?"dark":"light",type:this.type,size:"invisible"===this.settings["fof-recaptcha.type"]?"invisible":"normal",callback:this.callback,"error-callback":function(){var t={type:"error",content:p().translator.trans("fof-recaptcha.forum.error")};e.errorCallback(t)}})},e.getResponse=function(){return grecaptcha.getResponse(this.widgetId)},e.execute=function(){return grecaptcha.execute(this.widgetId)},e.reset=function(){return grecaptcha.reset(this.widgetId)},e.isInvisible=function(){return"invisible"===this.type},t}();function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}function l(t,e,r,n,o,a,i){try{var c=t[a](i),u=c.value}catch(t){return void r(t)}c.done?e(u):Promise.resolve(u).then(n,o)}var d=r(357),v=r.n(d);const y=flarum.core.compat["common/Component"];var g=r.n(y);const b=function(){function t(t){return function(e){return new Promise((function(r,n){var o=document.createElement(t),a="body",i="src";switch(o.onload=function(){r(e)},o.onerror=function(){n(e)},t){case"script":o.async=!0;break;case"link":o.type="text/css",o.rel="stylesheet",i="href",a="head"}o[i]=e,document[a].appendChild(o)}))}}return{css:t("link"),js:t("script"),img:t("img")}}();var x=function(){var t,e=(t=v().mark((function t(){return v().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!p().recaptchaLoaded){t.next=2;break}return t.abrupt("return");case 2:return t.next=4,b.js("https://www.recaptcha.net/recaptcha/api.js?hl="+p().translator.getLocale()+"&render=explicit");case 4:p().recaptchaLoaded=!0;case 5:case"end":return t.stop()}}),t)})),function(){var e=this,r=arguments;return new Promise((function(n,o){var a=t.apply(e,r);function i(t){l(a,n,o,i,c,"next",t)}function c(t){l(a,n,o,i,c,"throw",t)}i(void 0)}))});return function(){return e.apply(this,arguments)}}(),w=function(t){var e,r;function n(){return t.apply(this,arguments)||this}r=t,(e=n).prototype=Object.create(r.prototype),e.prototype.constructor=e,h(e,r);var o=n.prototype;return o.oninit=function(e){t.prototype.oninit.call(this,e)},o.view=function(){return m("div",{className:"Form-group"},m("div",{className:"g-recaptcha"}))},o.oncreate=function(e){var r=this;if(t.prototype.oncreate.call(this,e),x().then((function(){var t=setInterval((function(){window.recaptcha&&(clearInterval(t),r.attrs.state.render(e.dom.querySelector(".g-recaptcha")))}),250)})),"invisible"===this.attrs.state.type){var n=e.dom.querySelector("iframe");n&&(n.tabIndex=-1)}},n}(g());function L(t){(0,u.extend)(t.prototype,"oninit",(function(){var t=this;e().forum.attribute("postWithoutCaptcha")||(this.recaptcha=new f(e().forum.data.attributes,(function(){t.recaptcha.isInvisible()&&t.onsubmit("recaptchaSecondStep")})))})),(0,u.extend)(t.prototype,"data",(function(t){e().forum.attribute("postWithoutCaptcha")||(t["g-recaptcha-response"]=this.recaptcha.getResponse())})),(0,u.extend)(t.prototype,"headerItems",(function(t){e().forum.attribute("postWithoutCaptcha")||t.add("recaptcha",w.component({state:this.recaptcha}),-5)})),(0,u.extend)(t.prototype,"loaded",(function(){e().forum.attribute("postWithoutCaptcha")||this.recaptcha.reset()})),(0,u.override)(t.prototype,"onsubmit",(function(t,r){return!e().forum.attribute("postWithoutCaptcha")&&this.recaptcha.isInvisible()&&"recaptchaSecondStep"!==r?(this.loading=!0,void this.recaptcha.execute()):t()}))}const _=flarum.core.compat["forum/components/ForgotPasswordModal"];var S=r.n(_);const j=flarum.core.compat["forum/components/LogInModal"];var E=r.n(j);const O=flarum.core.compat["forum/components/SignUpModal"];var k=r.n(O),P=function(t){var r=t.modal,n=t.type,o=t.dataMethod,a=function(){return!!e().forum.attribute("fof-recaptcha."+n)};(0,u.extend)(r.prototype,"oninit",(function(){var t=this;a()&&(this.recaptcha=new f(e().forum.data.attributes,(function(){if(t.recaptcha.isInvisible()){var e=new Event("submit");e.isRecaptchaSecondStep=!0,t.onsubmit(e)}}),(function(e){t.loaded(),t.alertAttrs=e})))})),(0,u.extend)(r.prototype,o,(function(t){a()&&(t["g-recaptcha-response"]=this.recaptcha.getResponse())})),(0,u.extend)(r.prototype,"fields",(function(t){a()&&t.add("recaptcha",m(w,{state:this.recaptcha}),-5)})),(0,u.extend)(r.prototype,"onerror",(function(){a()&&this.recaptcha.reset()})),(0,u.override)(r.prototype,"onsubmit",(function(t,e){return a()&&this.recaptcha.isInvisible()&&!e.isRecaptchaSecondStep?(e.preventDefault(),this.loading=!0,void this.recaptcha.execute()):t(e)}))};e().initializers.add("fof/recaptcha",(function(){e().recaptchaLoaded=!1,L(a()),L(c()),P({modal:S(),type:"forgot",dataMethod:"requestParams"}),P({modal:E(),type:"signin",dataMethod:"loginParams"}),P({modal:k(),type:"signup",dataMethod:"submitData"})}))})(),module.exports=n})(); //# sourceMappingURL=forum.js.map \ No newline at end of file diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index e9ddca3..500077e 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":";2BAAA,IAAIA,EAAUC,EAAAA,KAAAA,QACd,SAASC,IACP,aACAC,EAAOC,QAAUF,EAAsB,WACrC,OAAOE,CACT,EAAGD,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,QACxE,IAAIA,EAAU,CAAC,EACbE,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eACZC,EAAiBJ,OAAOI,gBAAkB,SAAUC,EAAKC,EAAKC,GAC5DF,EAAIC,GAAOC,EAAKC,KAClB,EACAC,EAAU,mBAAqBC,OAASA,OAAS,CAAC,EAClDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAC7C,SAASC,EAAOZ,EAAKC,EAAKE,GACxB,OAAOR,OAAOI,eAAeC,EAAKC,EAAK,CACrCE,MAAOA,EACPU,YAAY,EACZC,cAAc,EACdC,UAAU,IACRf,EAAIC,EACV,CACA,IACEW,EAAO,CAAC,EAAG,GACb,CAAE,MAAOI,GACPJ,EAAS,SAAgBZ,EAAKC,EAAKE,GACjC,OAAOH,EAAIC,GAAOE,CACpB,CACF,CACA,SAASc,EAAKC,EAASC,EAASC,EAAMC,GACpC,IAAIC,EAAiBH,GAAWA,EAAQvB,qBAAqB2B,EAAYJ,EAAUI,EACjF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AAA,UAAoB,iBAAiB9H,EAAO,GAEtE+L,EAAAA,EAAAA,QAAOW,EAAM9O,UAAW,UAAU,WAAY,IAAAuK,EAAA,KACvCyE,MAELtM,KAAK+K,UAAY,IAAI3D,GACnB,WACE,GAAIoE,EAAa,CAEf,IAAMe,EAAQ,IAAIC,MAAM,UACxBD,EAAME,uBAAwB,EAC9B5E,EAAK6D,SAASa,EAChB,CACF,IACA,SAAChF,GAECM,EAAK6E,SACL7E,EAAKN,WAAaA,CACpB,IAEJ,KAEAkE,EAAAA,EAAAA,QAAOW,EAAM9O,UAAW+O,GAAY,SAAUV,GACvCW,MAELX,EAAK,wBAA0B3L,KAAK+K,UAAU5C,cAChD,KAEAsD,EAAAA,EAAAA,QAAOW,EAAM9O,UAAW,UAAU,SAAUsO,GACrCU,KAELV,EAAOC,IAAI,YAAapB,EAACP,EAAS,CAAC3I,MAAOvB,KAAK+K,aAAgB,EACjE,KAEAU,EAAAA,EAAAA,QAAOW,EAAM9O,UAAW,WAAW,WAC5BgP,KAELtM,KAAK+K,UAAU5H,OACjB,KAEA4I,EAAAA,EAAAA,UAASK,EAAM9O,UAAW,YAAY,SAAU0O,EAAUW,GACxD,OAAIL,KAAed,IAAgBmB,EAAEF,uBAInCE,EAAEC,iBACF5M,KAAKkM,SAAU,OACflM,KAAK+K,UAAU3C,WAIV4D,EAASW,EAClB,GACF,EClEAnF,IAAAA,aAAAA,IAAqB,iBAAiB,WACpCA,IAAAA,iBAAsB,EAEtBqF,EAAeC,KACfD,EAAeE,KDiEfZ,EAAwB,CAAEC,MAAOY,IAAqBtN,KAAM,SAAU2M,WAAY,kBAClFF,EAAwB,CAAEC,MAAOa,IAAYvN,KAAM,SAAU2M,WAAY,gBACzEF,EAAwB,CAAEC,MAAOc,IAAaxN,KAAM,SAAU2M,WAAY,cCjE5E","sources":["webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/recaptcha/webpack/bootstrap","webpack://@fof/recaptcha/webpack/runtime/compat get default export","webpack://@fof/recaptcha/webpack/runtime/define property getters","webpack://@fof/recaptcha/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/recaptcha/webpack/runtime/make namespace object","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/components/ReplyComposer']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/recaptcha/./src/forum/states/RecaptchaState.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/recaptcha/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/recaptcha/./node_modules/external-load/index.js","webpack://@fof/recaptcha/./src/forum/components/Recaptcha.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/recaptcha/./src/forum/extendComposer.js","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/components/ForgotPasswordModal']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/components/SignUpModal']\"","webpack://@fof/recaptcha/./src/forum/extendAuthModals.tsx","webpack://@fof/recaptcha/./src/forum/index.js"],"sourcesContent":["var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionComposer'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ReplyComposer'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","import app from 'flarum/forum/app';\n\nexport default class RecaptchaState {\n constructor(callback, errorCallback = null) {\n this.callback = callback;\n this.errorCallback =\n errorCallback ||\n ((alertAttrs) => {\n // By default, the alert will just be shown globally\n app.alerts.show(alertAttrs);\n });\n this.widgetId = null;\n }\n\n render(element) {\n this.widgetId = grecaptcha.render(element, {\n sitekey: app.data['fof-recaptcha.credentials.site'],\n theme: app.forum.attribute('darkMode') ? 'dark' : 'light',\n type: app.data['fof-recaptcha.type'],\n size: app.data['fof-recaptcha.type'] === 'invisible' ? 'invisible' : 'normal',\n callback: this.callback,\n 'error-callback': () => {\n // Similarly to error.alert, we create an alert payload that can then be shown in-context depending where the code is called from\n const alertAttrs = {\n type: 'error',\n content: app.translator.trans('fof-recaptcha.forum.error'),\n };\n this.errorCallback(alertAttrs);\n },\n });\n }\n\n getResponse() {\n return grecaptcha.getResponse(this.widgetId);\n }\n\n execute() {\n return grecaptcha.execute(this.widgetId);\n }\n\n reset() {\n return grecaptcha.reset(this.widgetId);\n }\n}\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","/**\n * Simple resource loader based on David Walsh's tutorial\n * https://davidwalsh.name/javascript-loader\n * https://davidwalsh.name/javascript-functions\n */\nexport default (function() {\n // Function which returns a function\n function _load(tag) {\n return function(url) {\n // This promise will be used by Promise.all to determine success or failure\n return new Promise(function(resolve, reject) {\n var element = document.createElement(tag);\n var parent = \"body\";\n var attr = \"src\";\n\n // Important success and error for the promise\n element.onload = function() {\n resolve(url);\n };\n element.onerror = function() {\n reject(url);\n };\n\n // Need to set different attributes depending on tag type\n switch (tag) {\n case \"script\":\n element.async = true;\n break;\n case \"link\":\n element.type = \"text/css\";\n element.rel = \"stylesheet\";\n attr = \"href\";\n parent = \"head\";\n }\n\n // Inject into document to kick off loading\n element[attr] = url;\n document[parent].appendChild(element);\n });\n };\n }\n\n return {\n css: _load(\"link\"),\n js: _load(\"script\"),\n img: _load(\"img\")\n };\n})();\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport load from 'external-load';\n\nconst addResources = async () => {\n if (app.recaptchaLoaded) return;\n\n await load.js(`https://www.recaptcha.net/recaptcha/api.js?hl=${app.translator.locale}&render=explicit`);\n\n app.recaptchaLoaded = true;\n};\n\nexport default class Recaptcha extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n }\n\n view() {\n return (\n
\n
\n
\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n addResources().then(() => {\n const interval = setInterval(() => {\n if (window.recaptcha) {\n clearInterval(interval);\n this.attrs.state.render(vnode.dom.querySelector('.g-recaptcha'));\n }\n }, 250);\n });\n\n // It's possible to TAB into the reCAPTCHA iframe, and it's very confusing when using the invisible mode\n if (app.data['fof-recaptcha.type'] === 'invisible') {\n const iframe = vnode.dom.querySelector('iframe');\n\n if (iframe) {\n iframe.tabIndex = -1;\n }\n }\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport RecaptchaState from './states/RecaptchaState';\nimport Recaptcha from './components/Recaptcha';\n\nexport default function (Composer) {\n const isInvisible = app.data['fof-recaptcha.type'] === 'invisible';\n\n extend(Composer.prototype, 'oninit', function () {\n if (app.forum.attribute('postWithoutCaptcha')) {\n return;\n }\n\n this.recaptcha = new RecaptchaState(() => {\n if (isInvisible) {\n // onsubmit is usually called without any argument.\n // We use the first argument to indicate the second call after invisible recaptcha\n this.onsubmit('recaptchaSecondStep');\n }\n });\n });\n\n extend(Composer.prototype, 'data', function (data) {\n if (app.forum.attribute('postWithoutCaptcha')) {\n return;\n }\n\n data['g-recaptcha-response'] = this.recaptcha.getResponse();\n });\n\n extend(Composer.prototype, 'headerItems', function (fields) {\n if (app.forum.attribute('postWithoutCaptcha')) {\n return;\n }\n\n fields.add(\n 'recaptcha',\n Recaptcha.component({\n state: this.recaptcha,\n }),\n -5\n );\n });\n\n // There's no onerror handler on composer classes, but we can react to loaded which is called after errors\n extend(Composer.prototype, 'loaded', function () {\n if (app.forum.attribute('postWithoutCaptcha')) {\n return;\n }\n\n this.recaptcha.reset();\n });\n\n override(Composer.prototype, 'onsubmit', function (original, argument1) {\n if (!app.forum.attribute('postWithoutCaptcha') && isInvisible && argument1 !== 'recaptchaSecondStep') {\n this.loading = true;\n this.recaptcha.execute();\n return;\n }\n\n return original();\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ForgotPasswordModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/LogInModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/SignUpModal'];","import app from 'flarum/forum/app';\nimport ForgotPasswordModal from 'flarum/forum/components/ForgotPasswordModal';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport SignUpModal from 'flarum/forum/components/SignUpModal';\nimport { extend, override } from 'flarum/common/extend';\n\nimport RecaptchaState from './states/RecaptchaState';\nimport Recaptcha from './components/Recaptcha';\n\nexport const addRecaptchaToAuthModal = ({\n modal,\n type,\n dataMethod,\n}: {\n modal: T;\n type: string;\n dataMethod: string;\n}) => {\n const isInvisible = app.data['fof-recaptcha.type'] === 'invisible';\n const isEnabled = () => !!app.forum.attribute(`fof-recaptcha.${type}`);\n\n extend(modal.prototype, 'oninit', function () {\n if (!isEnabled()) return;\n\n this.recaptcha = new RecaptchaState(\n () => {\n if (isInvisible) {\n // Create \"fake\" event so this works when other extensions extend onsubmit as well\n const event = new Event('submit');\n event.isRecaptchaSecondStep = true;\n this.onsubmit(event);\n }\n },\n (alertAttrs) => {\n // Removes the spinner on the submit button so we can try again\n this.loaded();\n this.alertAttrs = alertAttrs;\n }\n );\n });\n\n extend(modal.prototype, dataMethod, function (data) {\n if (!isEnabled()) return;\n\n data['g-recaptcha-response'] = this.recaptcha.getResponse();\n });\n\n extend(modal.prototype, 'fields', function (fields) {\n if (!isEnabled()) return;\n\n fields.add('recaptcha', , -5);\n });\n\n extend(modal.prototype, 'onerror', function () {\n if (!isEnabled()) return;\n\n this.recaptcha.reset();\n });\n\n override(modal.prototype, 'onsubmit', function (original, e) {\n if (isEnabled() && isInvisible && !e.isRecaptchaSecondStep) {\n // When recaptcha is invisible, onsubmit will be called two times\n // First time with normal event, we will call recaptcha.execute\n // Second time is called from recaptcha callback with a special isRecaptcha attribute\n e.preventDefault();\n this.loading = true;\n this.recaptcha.execute();\n return;\n }\n\n return original(e);\n });\n};\n\nexport default () => {\n addRecaptchaToAuthModal({ modal: ForgotPasswordModal, type: 'forgot', dataMethod: 'requestParams' });\n addRecaptchaToAuthModal({ modal: LogInModal, type: 'signin', dataMethod: 'loginParams' });\n addRecaptchaToAuthModal({ modal: SignUpModal, type: 'signup', dataMethod: 'submitData' });\n};\n","import app from 'flarum/forum/app';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport ReplyComposer from 'flarum/forum/components/ReplyComposer';\nimport extendComposer from './extendComposer';\nimport extendAuthModals from './extendAuthModals';\n\napp.initializers.add('fof/recaptcha', () => {\n app.recaptchaLoaded = false;\n\n extendComposer(DiscussionComposer);\n extendComposer(ReplyComposer);\n extendAuthModals();\n});\n"],"names":["_typeof","require","_regeneratorRuntime","module","exports","__esModule","Op","Object","prototype","hasOwn","hasOwnProperty","defineProperty","obj","key","desc","value","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","type","call","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","d","a","definition","o","get","prop","r","flarum","core","compat","RecaptchaState","callback","errorCallback","alertAttrs","app","widgetId","_proto","render","element","_this","grecaptcha","sitekey","theme","size","content","getResponse","execute","_setPrototypeOf","p","bind","asyncGeneratorStep","gen","_next","_throw","_load","tag","url","document","createElement","parent","attr","onload","onerror","rel","appendChild","css","js","img","addResources","_ref","_callee","_context","load","args","arguments","apply","Recaptcha","_Component","subClass","superClass","oninit","vnode","view","m","className","oncreate","interval","setInterval","window","recaptcha","clearInterval","attrs","dom","querySelector","iframe","tabIndex","Component","Composer","isInvisible","extend","onsubmit","data","fields","add","component","override","original","argument1","loading","addRecaptchaToAuthModal","modal","dataMethod","isEnabled","event","Event","isRecaptchaSecondStep","loaded","e","preventDefault","extendComposer","DiscussionComposer","ReplyComposer","ForgotPasswordModal","LogInModal","SignUpModal"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":";2BAAA,IAAIA,EAAUC,EAAAA,KAAAA,QACd,SAASC,IACP,aACAC,EAAOC,QAAUF,EAAsB,WACrC,OAAOE,CACT,EAAGD,EAAOC,QAAQC,YAAa,EAAMF,EAAOC,QAAiB,QAAID,EAAOC,QACxE,IAAIA,EAAU,CAAC,EACbE,EAAKC,OAAOC,UACZC,EAASH,EAAGI,eACZC,EAAiBJ,OAAOI,gBAAkB,SAAUC,EAAKC,EAAKC,GAC5DF,EAAIC,GAAOC,EAAKC,KAClB,EACAC,EAAU,mBAAqBC,OAASA,OAAS,CAAC,EAClDC,EAAiBF,EAAQG,UAAY,aACrCC,EAAsBJ,EAAQK,eAAiB,kBAC/CC,EAAoBN,EAAQO,aAAe,gBAC7C,SAASC,EAAOZ,EAAKC,EAAKE,GACxB,OAAOR,OAAOI,eAAeC,EAAKC,EAAK,CACrCE,MAAOA,EACPU,YAAY,EACZC,cAAc,EACdC,UAAU,IACRf,EAAIC,EACV,CACA,IACEW,EAAO,CAAC,EAAG,GACb,CAAE,MAAOI,GACPJ,EAAS,SAAgBZ,EAAKC,EAAKE,GACjC,OAAOH,EAAIC,GAAOE,CACpB,CACF,CACA,SAASc,EAAKC,EAASC,EAASC,EAAMC,GACpC,IAAIC,EAAiBH,GAAWA,EAAQvB,qBAAqB2B,EAAYJ,EAAUI,EACjFC,EAAY7B,OAAO8B,OAAOH,EAAe1B,WACzC8B,EAAU,IAAIC,EAAQN,GAAe,IACvC,OAAOtB,EAAeyB,EAAW,UAAW,CAC1CrB,MAAOyB,EAAiBV,EAASE,EAAMM,KACrCF,CACN,CACA,SAASK,EAASC,EAAI9B,EAAK+B,GACzB,IACE,MAAO,C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EAAMhP,UAAW,UAAU,WAAY,IAAAwK,EAAA,KACvC0E,MAELxM,KAAKkL,UAAY,IAAI9D,EACnBK,IAAAA,MAAAA,KAAAA,YACA,WACE,GAAIK,EAAKoD,UAAU3C,cAAe,CAEhC,IAAMkE,EAAQ,IAAIC,MAAM,UACxBD,EAAME,uBAAwB,EAC9B7E,EAAK8D,SAASa,EAChB,CACF,IACA,SAACjF,GAECM,EAAK8E,SACL9E,EAAKN,WAAaA,CACpB,IAEJ,KAEAmE,EAAAA,EAAAA,QAAOW,EAAMhP,UAAWiP,GAAY,SAAUV,GACvCW,MAELX,EAAK,wBAA0B7L,KAAKkL,UAAU7C,cAChD,KAEAsD,EAAAA,EAAAA,QAAOW,EAAMhP,UAAW,UAAU,SAAUwO,GACrCU,KAELV,EAAOC,IAAI,YAAanB,EAACP,EAAS,CAAC9I,MAAOvB,KAAKkL,aAAgB,EACjE,KAEAS,EAAAA,EAAAA,QAAOW,EAAMhP,UAAW,WAAW,WAC5BkP,KAELxM,KAAKkL,UAAU/H,OACjB,KAEA8I,EAAAA,EAAAA,UAASK,EAAMhP,UAAW,YAAY,SAAU4O,EAAUW,GACxD,OAAIL,KAAexM,KAAKkL,UAAU3C,gBAAkBsE,EAAEF,uBAIpDE,EAAEC,iBACF9M,KAAKoM,SAAU,OACfpM,KAAKkL,UAAU5C,WAIV4D,EAASW,EAClB,GACF,EClEApF,IAAAA,aAAAA,IAAqB,iBAAiB,WACpCA,IAAAA,iBAAsB,EAEtBsF,EAAeC,KACfD,EAAeE,KDiEfZ,EAAwB,CAAEC,MAAOY,IAAqBxN,KAAM,SAAU6M,WAAY,kBAClFF,EAAwB,CAAEC,MAAOa,IAAYzN,KAAM,SAAU6M,WAAY,gBACzEF,EAAwB,CAAEC,MAAOc,IAAa1N,KAAM,SAAU6M,WAAY,cCjE5E","sources":["webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/recaptcha/webpack/bootstrap","webpack://@fof/recaptcha/webpack/runtime/compat get default export","webpack://@fof/recaptcha/webpack/runtime/define property getters","webpack://@fof/recaptcha/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/recaptcha/webpack/runtime/make namespace object","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/components/ReplyComposer']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['common/app']\"","webpack://@fof/recaptcha/./src/common/states/RecaptchaState.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/recaptcha/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/recaptcha/./node_modules/external-load/index.js","webpack://@fof/recaptcha/./src/common/components/Recaptcha.js","webpack://@fof/recaptcha/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/recaptcha/./src/forum/extendComposer.js","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/components/ForgotPasswordModal']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@fof/recaptcha/external root \"flarum.core.compat['forum/components/SignUpModal']\"","webpack://@fof/recaptcha/./src/forum/extendAuthModals.tsx","webpack://@fof/recaptcha/./src/forum/index.js"],"sourcesContent":["var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return exports;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var exports = {},\n Op = Object.prototype,\n hasOwn = Op.hasOwnProperty,\n defineProperty = Object.defineProperty || function (obj, key, desc) {\n obj[key] = desc.value;\n },\n $Symbol = \"function\" == typeof Symbol ? Symbol : {},\n iteratorSymbol = $Symbol.iterator || \"@@iterator\",\n asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\",\n toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n function define(obj, key, value) {\n return Object.defineProperty(obj, key, {\n value: value,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), obj[key];\n }\n try {\n define({}, \"\");\n } catch (err) {\n define = function define(obj, key, value) {\n return obj[key] = value;\n };\n }\n function wrap(innerFn, outerFn, self, tryLocsList) {\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,\n generator = Object.create(protoGenerator.prototype),\n context = new Context(tryLocsList || []);\n return defineProperty(generator, \"_invoke\", {\n value: makeInvokeMethod(innerFn, self, context)\n }), generator;\n }\n function tryCatch(fn, obj, arg) {\n try {\n return {\n type: \"normal\",\n arg: fn.call(obj, arg)\n };\n } catch (err) {\n return {\n type: \"throw\",\n arg: err\n };\n }\n }\n exports.wrap = wrap;\n var ContinueSentinel = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n var getProto = Object.getPrototypeOf,\n NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);\n var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function (method) {\n define(prototype, method, function (arg) {\n return this._invoke(method, arg);\n });\n });\n }\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (\"throw\" !== record.type) {\n var result = record.arg,\n value = result.value;\n return value && \"object\" == _typeof(value) && hasOwn.call(value, \"__await\") ? PromiseImpl.resolve(value.__await).then(function (value) {\n invoke(\"next\", value, resolve, reject);\n }, function (err) {\n invoke(\"throw\", err, resolve, reject);\n }) : PromiseImpl.resolve(value).then(function (unwrapped) {\n result.value = unwrapped, resolve(result);\n }, function (error) {\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n reject(record.arg);\n }\n var previousPromise;\n defineProperty(this, \"_invoke\", {\n value: function value(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function (resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(innerFn, self, context) {\n var state = \"suspendedStart\";\n return function (method, arg) {\n if (\"executing\" === state) throw new Error(\"Generator is already running\");\n if (\"completed\" === state) {\n if (\"throw\" === method) throw arg;\n return doneResult();\n }\n for (context.method = method, context.arg = arg;;) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n if (\"next\" === context.method) context.sent = context._sent = context.arg;else if (\"throw\" === context.method) {\n if (\"suspendedStart\" === state) throw state = \"completed\", context.arg;\n context.dispatchException(context.arg);\n } else \"return\" === context.method && context.abrupt(\"return\", context.arg);\n state = \"executing\";\n var record = tryCatch(innerFn, self, context);\n if (\"normal\" === record.type) {\n if (state = context.done ? \"completed\" : \"suspendedYield\", record.arg === ContinueSentinel) continue;\n return {\n value: record.arg,\n done: context.done\n };\n }\n \"throw\" === record.type && (state = \"completed\", context.method = \"throw\", context.arg = record.arg);\n }\n };\n }\n function maybeInvokeDelegate(delegate, context) {\n var methodName = context.method,\n method = delegate.iterator[methodName];\n if (undefined === method) return context.delegate = null, \"throw\" === methodName && delegate.iterator[\"return\"] && (context.method = \"return\", context.arg = undefined, maybeInvokeDelegate(delegate, context), \"throw\" === context.method) || \"return\" !== methodName && (context.method = \"throw\", context.arg = new TypeError(\"The iterator does not provide a '\" + methodName + \"' method\")), ContinueSentinel;\n var record = tryCatch(method, delegate.iterator, context.arg);\n if (\"throw\" === record.type) return context.method = \"throw\", context.arg = record.arg, context.delegate = null, ContinueSentinel;\n var info = record.arg;\n return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, \"return\" !== context.method && (context.method = \"next\", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = \"throw\", context.arg = new TypeError(\"iterator result is not an object\"), context.delegate = null, ContinueSentinel);\n }\n function pushTryEntry(locs) {\n var entry = {\n tryLoc: locs[0]\n };\n 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);\n }\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\", delete record.arg, entry.completion = record;\n }\n function Context(tryLocsList) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) return iteratorMethod.call(iterable);\n if (\"function\" == typeof iterable.next) return iterable;\n if (!isNaN(iterable.length)) {\n var i = -1,\n next = function next() {\n for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;\n return next.value = undefined, next.done = !0, next;\n };\n return next.next = next;\n }\n }\n return {\n next: doneResult\n };\n }\n function doneResult() {\n return {\n value: undefined,\n done: !0\n };\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), defineProperty(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, \"GeneratorFunction\"), exports.isGeneratorFunction = function (genFun) {\n var ctor = \"function\" == typeof genFun && genFun.constructor;\n return !!ctor && (ctor === GeneratorFunction || \"GeneratorFunction\" === (ctor.displayName || ctor.name));\n }, exports.mark = function (genFun) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, \"GeneratorFunction\")), genFun.prototype = Object.create(Gp), genFun;\n }, exports.awrap = function (arg) {\n return {\n __await: arg\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n void 0 === PromiseImpl && (PromiseImpl = Promise);\n var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);\n return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {\n return result.done ? result.value : iter.next();\n });\n }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, \"Generator\"), define(Gp, iteratorSymbol, function () {\n return this;\n }), define(Gp, \"toString\", function () {\n return \"[object Generator]\";\n }), exports.keys = function (val) {\n var object = Object(val),\n keys = [];\n for (var key in object) keys.push(key);\n return keys.reverse(), function next() {\n for (; keys.length;) {\n var key = keys.pop();\n if (key in object) return next.value = key, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, exports.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(skipTempReset) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) \"t\" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);\n },\n stop: function stop() {\n this.done = !0;\n var rootRecord = this.tryEntries[0].completion;\n if (\"throw\" === rootRecord.type) throw rootRecord.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(exception) {\n if (this.done) throw exception;\n var context = this;\n function handle(loc, caught) {\n return record.type = \"throw\", record.arg = exception, context.next = loc, caught && (context.method = \"next\", context.arg = undefined), !!caught;\n }\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i],\n record = entry.completion;\n if (\"root\" === entry.tryLoc) return handle(\"end\");\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\"),\n hasFinally = hasOwn.call(entry, \"finallyLoc\");\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);\n } else {\n if (!hasFinally) throw new Error(\"try statement without catch or finally\");\n if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev && hasOwn.call(entry, \"finallyLoc\") && this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n finallyEntry && (\"break\" === type || \"continue\" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);\n var record = finallyEntry ? finallyEntry.completion : {};\n return record.type = type, record.arg = arg, finallyEntry ? (this.method = \"next\", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);\n },\n complete: function complete(record, afterLoc) {\n if (\"throw\" === record.type) throw record.arg;\n return \"break\" === record.type || \"continue\" === record.type ? this.next = record.arg : \"return\" === record.type ? (this.rval = this.arg = record.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;\n },\n finish: function finish(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;\n }\n },\n \"catch\": function _catch(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (\"throw\" === record.type) {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(iterable, resultName, nextLoc) {\n return this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n }, \"next\" === this.method && (this.arg = undefined), ContinueSentinel;\n }\n }, exports;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(obj) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (obj) {\n return typeof obj;\n } : function (obj) {\n return obj && \"function\" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(obj);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\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","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (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 = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (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};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/DiscussionComposer'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ReplyComposer'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","import app from 'flarum/common/app';\n\nexport default class RecaptchaState {\n constructor(settings, callback, errorCallback = null) {\n this.settings = settings;\n this.callback = callback;\n this.errorCallback =\n errorCallback ||\n ((alertAttrs) => {\n // By default, the alert will just be shown globally\n app.alerts.show(alertAttrs);\n });\n this.widgetId = null;\n\n this.type = this.settings['fof-recaptcha.type'];\n }\n\n render(element) {\n this.widgetId = grecaptcha.render(element, {\n sitekey: this.settings['fof-recaptcha.credentials.site'],\n theme: !!Number(this.settings['theme_dark_mode']) ? 'dark' : 'light',\n type: this.type,\n size: this.settings['fof-recaptcha.type'] === 'invisible' ? 'invisible' : 'normal',\n callback: this.callback,\n 'error-callback': () => {\n // Similarly to error.alert, we create an alert payload that can then be shown in-context depending where the code is called from\n const alertAttrs = {\n type: 'error',\n content: app.translator.trans('fof-recaptcha.forum.error'),\n };\n this.errorCallback(alertAttrs);\n },\n });\n }\n\n getResponse() {\n return grecaptcha.getResponse(this.widgetId);\n }\n\n execute() {\n return grecaptcha.execute(this.widgetId);\n }\n\n reset() {\n return grecaptcha.reset(this.widgetId);\n }\n\n isInvisible() {\n return this.type === 'invisible';\n }\n}\n","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","/**\n * Simple resource loader based on David Walsh's tutorial\n * https://davidwalsh.name/javascript-loader\n * https://davidwalsh.name/javascript-functions\n */\nexport default (function() {\n // Function which returns a function\n function _load(tag) {\n return function(url) {\n // This promise will be used by Promise.all to determine success or failure\n return new Promise(function(resolve, reject) {\n var element = document.createElement(tag);\n var parent = \"body\";\n var attr = \"src\";\n\n // Important success and error for the promise\n element.onload = function() {\n resolve(url);\n };\n element.onerror = function() {\n reject(url);\n };\n\n // Need to set different attributes depending on tag type\n switch (tag) {\n case \"script\":\n element.async = true;\n break;\n case \"link\":\n element.type = \"text/css\";\n element.rel = \"stylesheet\";\n attr = \"href\";\n parent = \"head\";\n }\n\n // Inject into document to kick off loading\n element[attr] = url;\n document[parent].appendChild(element);\n });\n };\n }\n\n return {\n css: _load(\"link\"),\n js: _load(\"script\"),\n img: _load(\"img\")\n };\n})();\n","import app from 'flarum/common/app';\nimport Component from 'flarum/common/Component';\nimport load from 'external-load';\n\nconst addResources = async () => {\n if (app.recaptchaLoaded) return;\n\n await load.js(`https://www.recaptcha.net/recaptcha/api.js?hl=${app.translator.getLocale()}&render=explicit`);\n\n app.recaptchaLoaded = true;\n};\n\nexport default class Recaptcha extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n }\n\n view() {\n return (\n
\n
\n
\n );\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n addResources().then(() => {\n const interval = setInterval(() => {\n if (window.recaptcha) {\n clearInterval(interval);\n this.attrs.state.render(vnode.dom.querySelector('.g-recaptcha'));\n }\n }, 250);\n });\n\n // It's possible to TAB into the reCAPTCHA iframe, and it's very confusing when using the invisible mode\n if (this.attrs.state.type === 'invisible') {\n const iframe = vnode.dom.querySelector('iframe');\n\n if (iframe) {\n iframe.tabIndex = -1;\n }\n }\n }\n}\n","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport RecaptchaState from '../common/states/RecaptchaState';\nimport Recaptcha from '../common/components/Recaptcha';\n\nexport default function (Composer) {\n extend(Composer.prototype, 'oninit', function () {\n if (app.forum.attribute('postWithoutCaptcha')) {\n return;\n }\n\n this.recaptcha = new RecaptchaState(app.forum.data.attributes, () => {\n if (this.recaptcha.isInvisible()) {\n // onsubmit is usually called without any argument.\n // We use the first argument to indicate the second call after invisible recaptcha\n this.onsubmit('recaptchaSecondStep');\n }\n });\n });\n\n extend(Composer.prototype, 'data', function (data) {\n if (app.forum.attribute('postWithoutCaptcha')) {\n return;\n }\n\n data['g-recaptcha-response'] = this.recaptcha.getResponse();\n });\n\n extend(Composer.prototype, 'headerItems', function (fields) {\n if (app.forum.attribute('postWithoutCaptcha')) {\n return;\n }\n\n fields.add(\n 'recaptcha',\n Recaptcha.component({\n state: this.recaptcha,\n }),\n -5\n );\n });\n\n // There's no onerror handler on composer classes, but we can react to loaded which is called after errors\n extend(Composer.prototype, 'loaded', function () {\n if (app.forum.attribute('postWithoutCaptcha')) {\n return;\n }\n\n this.recaptcha.reset();\n });\n\n override(Composer.prototype, 'onsubmit', function (original, argument1) {\n if (!app.forum.attribute('postWithoutCaptcha') && this.recaptcha.isInvisible() && argument1 !== 'recaptchaSecondStep') {\n this.loading = true;\n this.recaptcha.execute();\n return;\n }\n\n return original();\n });\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/ForgotPasswordModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/LogInModal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/SignUpModal'];","import app from 'flarum/forum/app';\nimport ForgotPasswordModal from 'flarum/forum/components/ForgotPasswordModal';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport SignUpModal from 'flarum/forum/components/SignUpModal';\nimport { extend, override } from 'flarum/common/extend';\n\nimport RecaptchaState from '../common/states/RecaptchaState';\nimport Recaptcha from '../common/components/Recaptcha';\n\nexport const addRecaptchaToAuthModal = ({\n modal,\n type,\n dataMethod,\n}: {\n modal: T;\n type: string;\n dataMethod: string;\n}) => {\n const isEnabled = () => !!app.forum.attribute(`fof-recaptcha.${type}`);\n\n extend(modal.prototype, 'oninit', function () {\n if (!isEnabled()) return;\n\n this.recaptcha = new RecaptchaState(\n app.forum.data.attributes,\n () => {\n if (this.recaptcha.isInvisible()) {\n // Create \"fake\" event so this works when other extensions extend onsubmit as well\n const event = new Event('submit');\n event.isRecaptchaSecondStep = true;\n this.onsubmit(event);\n }\n },\n (alertAttrs) => {\n // Removes the spinner on the submit button so we can try again\n this.loaded();\n this.alertAttrs = alertAttrs;\n }\n );\n });\n\n extend(modal.prototype, dataMethod, function (data) {\n if (!isEnabled()) return;\n\n data['g-recaptcha-response'] = this.recaptcha.getResponse();\n });\n\n extend(modal.prototype, 'fields', function (fields) {\n if (!isEnabled()) return;\n\n fields.add('recaptcha', , -5);\n });\n\n extend(modal.prototype, 'onerror', function () {\n if (!isEnabled()) return;\n\n this.recaptcha.reset();\n });\n\n override(modal.prototype, 'onsubmit', function (original, e) {\n if (isEnabled() && this.recaptcha.isInvisible() && !e.isRecaptchaSecondStep) {\n // When recaptcha is invisible, onsubmit will be called two times\n // First time with normal event, we will call recaptcha.execute\n // Second time is called from recaptcha callback with a special isRecaptcha attribute\n e.preventDefault();\n this.loading = true;\n this.recaptcha.execute();\n return;\n }\n\n return original(e);\n });\n};\n\nexport default () => {\n addRecaptchaToAuthModal({ modal: ForgotPasswordModal, type: 'forgot', dataMethod: 'requestParams' });\n addRecaptchaToAuthModal({ modal: LogInModal, type: 'signin', dataMethod: 'loginParams' });\n addRecaptchaToAuthModal({ modal: SignUpModal, type: 'signup', dataMethod: 'submitData' });\n};\n","import app from 'flarum/forum/app';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport ReplyComposer from 'flarum/forum/components/ReplyComposer';\nimport extendComposer from './extendComposer';\nimport extendAuthModals from './extendAuthModals';\n\napp.initializers.add('fof/recaptcha', () => {\n app.recaptchaLoaded = false;\n\n extendComposer(DiscussionComposer);\n extendComposer(ReplyComposer);\n extendAuthModals();\n});\n"],"names":["_typeof","require","_regeneratorRuntime","module","exports","__esModule","Op","Object","prototype","hasOwn","hasOwnProperty","defineProperty","obj","key","desc","value","$Symbol","Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","toStringTag","define","enumerable","configurable","writable","err","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","create","context","Context","makeInvokeMethod","tryCatch","fn","arg","type","call","ContinueSentinel","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","method","_invoke","AsyncIterator","PromiseImpl","invoke","resolve","reject","record","result","__await","then","unwrapped","error","previousPromise","callInvokeWithMethodAndArg","state","Error","undefined","done","delegate","delegateResult","maybeInvokeDelegate","sent","_sent","dispatchException","abrupt","methodName","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","push","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","length","i","doneResult","displayName","isGeneratorFunction","genFun","ctor","constructor","name","mark","setPrototypeOf","__proto__","awrap","async","Promise","iter","keys","val","object","reverse","pop","skipTempReset","prev","charAt","slice","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","__webpack_module_cache__","__webpack_require__","moduleId","cachedModule","__webpack_modules__","n","getter","d","a","definition","o","get","prop","r","flarum","core","compat","RecaptchaState","settings","callback","errorCallback","alertAttrs","app","widgetId","_proto","render","element","_this","grecaptcha","sitekey","theme","Number","size","content","getResponse","execute","isInvisible","_setPrototypeOf","p","bind","asyncGeneratorStep","gen","_next","_throw","_load","tag","url","document","createElement","parent","attr","onload","onerror","rel","appendChild","css","js","img","addResources","_ref","_callee","_context","load","args","arguments","apply","Recaptcha","_Component","subClass","superClass","oninit","vnode","view","m","className","oncreate","interval","setInterval","window","recaptcha","clearInterval","attrs","dom","querySelector","iframe","tabIndex","Component","Composer","extend","onsubmit","data","fields","add","component","override","original","argument1","loading","addRecaptchaToAuthModal","modal","dataMethod","isEnabled","event","Event","isRecaptchaSecondStep","loaded","e","preventDefault","extendComposer","DiscussionComposer","ReplyComposer","ForgotPasswordModal","LogInModal","SignUpModal"],"sourceRoot":""} \ No newline at end of file