{"version":3,"file":"Feedback_recaptcha.min.js","sources":["Feedback_recaptcha.js"],"sourcesContent":["(function (w, d, ps) {\n\n const assetId = '~/Controls/MsForm/Feedback_recaptcha.min.js';\n\n if (!w.umwAssets || !w.umwAssets[assetId]) {\n console.error('No context found for ' + assetId);\n return;\n }\n\n w.recaptcha_load();\n\n for (let ctx of w.umwAssets[assetId]) {\n \n let captchaWidgetId;\n const btnSend = d.getElementById(ctx.btnSendId);\n const hRecaptcha2Result = d.getElementById(ctx.hRecaptcha2ResultId);\n\n ps.subscribe('recaptcha.callback.loaded', function() {\n captchaWidgetId = w.grecaptcha.render(ctx.divRecaptcha2Id, {\n 'sitekey': ctx.recaptcha2SiteKey,\n 'theme': ctx.recaptchaTheme,\n 'size': ctx.recaptchaSize\n });\n });\n\n btnSend.onclick = _ => {\n // Validate page first\n var validationResult = true;\n if (typeof (w.Page_ClientValidate) == 'function') {\n validationResult = w.Page_ClientValidate(ctx.validationGroup);\n }\n if (validationResult) { \n var captchaResponse = w.grecaptcha.getResponse(captchaWidgetId);\n hRecaptcha2Result.value = captchaResponse;\n return true;\n }\n return false;\n };\n }\n})(window, document, window.PubSub);"],"names":["w","d","ps","assetId","umwAssets","recaptcha_load","let","ctx","captchaWidgetId","btnSend","getElementById","btnSendId","hRecaptcha2Result","hRecaptcha2ResultId","subscribe","grecaptcha","render","divRecaptcha2Id","sitekey","recaptcha2SiteKey","theme","recaptchaTheme","size","recaptchaSize","onclick","_","validationResult","Page_ClientValidate","validationGroup","captchaResponse","getResponse","value","console","error","window","document","PubSub"],"mappings":"AAAA,CAAA,SAAWA,EAAGC,EAAGC,GAEb,IAAMC,EAAU,8CAEhB,GAAKH,EAAEI,WAAcJ,EAAEI,UAAUD,GAAjC,CAKAH,EAAEK,eAAe,EAEjB,IAAKC,IAAIC,KAAOP,EAAEI,UAAUD,GAAU,CAElCG,IAAIE,EACJ,IAAMC,EAAUR,EAAES,eAAeH,EAAII,SAAS,EAC9C,MAAMC,EAAoBX,EAAES,eAAeH,EAAIM,mBAAmB,EAElEX,EAAGY,UAAU,4BAA6B,WACtCN,EAAkBR,EAAEe,WAAWC,OAAOT,EAAIU,gBAAiB,CACvDC,QAAWX,EAAIY,kBACfC,MAASb,EAAIc,eACbC,KAAQf,EAAIgB,aAChB,CAAC,CACL,CAAC,EAEDd,EAAQe,QAAUC,IAEd,IAAIC,EAAmB,CAAA,EAIvB,MAHA,CAAA,EACIA,EADkC,YAAlC,OAAQ1B,EAAqB,oBACVA,EAAE2B,oBAAoBpB,EAAIqB,eAAe,EAE5DF,KACIG,EAAkB7B,EAAEe,WAAWe,YAAYtB,CAAe,EAC9DI,EAAkBmB,MAAQF,EACnB,CAAA,EAGf,CACJ,CA/BA,MAFIG,QAAQC,MAAM,wBAA0B9B,CAAO,CAkCtD,EAAE+B,OAAQC,SAAUD,OAAOE,MAAM"}