vendor: 4,491 bytes, line 1
1function _typeof(e){return _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_typeof(e)}function _arrayLikeToArray(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function _defineProperties(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(i=function(e){if("object"!==_typeof(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!==_typeof(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(r.key),"symbol"===_typeof(i)?i:String(i)),r)}var i}function _createClass(e,t,n){return t&&_defineProperties(e.prototype,t),n&&_defineProperties(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}!function(){"use strict";function e(){for(;a.length;)a[0](),a.shift()}function t(e){this.a=c,this.b=void 0,this.f=[];var t=this;try{e((function(e){r(t,e)}),(function(e){i(t,e)}))}catch(n){i(t,n)}}function n(e){return new t((function(t){t(e)}))}function r(e,t){if(e.a==c){if(t==e)throw new TypeError;var n=!1;try{var s=t&&t.then;if(null!=t&&"object"==typeof t&&"function"==typeof s)return void s.call(t,(function(t){n||r(e,t),n=!0}),(function(t){n||i(e,t),n=!0}))}catch(a){return void(n||i(e,a))}e.a=0,e.b=t,o(e)}}function i(e,t){if(e.a==c){if(t==e)throw new TypeError;e.a=1,e.b=t,o(e)}}function o(e){!function(e){a.push(e),1==a.length&&s()}((function(){if(e.a!=c)for(;e.f.length;){var t=(i=e.f.shift())[0],n=i[1],r=i[2],i=i[3];try{0==e.a?r("function"==typeof t?t.call(void 0,e.b):e.b):1==e.a&&("function"==typeof n?r(n.call(void 0,e.b)):i(e.b))}catch(o){i(o)}}}))}var s,a=[];s=function(){setTimeout(e)};var c=2;t.prototype.g=function(e){return this.c(void 0,e)},t.prototype.c=function(e,n){var r=this;return new t((function(t,i){r.f.push([e,n,t,i]),o(r)}))},window.Promise||(window.Promise=t,window.Promise.resolve=n,window.Promise.reject=function(e){return new t((function(t,n){n(e)}))},window.Promise.race=function(e){return new t((function(t,r){for(var i=0;i<e.length;i+=1)n(e[i]).c(t,r)}))},window.Promise.all=function(e){return new t((function(t,r){function i(n){return function(r){s[n]=r,(o+=1)==e.length&&t(s)}}var o=0,s=[];0==e.length&&t(s);for(var a=0;a<e.length;a+=1)n(e[a]).c(i(a),r)}))},window.Promise.prototype.then=t.prototype.c,window.Promise.prototype.catch=t.prototype.g)}(),"undefined"!=typeof Map&&Map.prototype.keys&&"undefined"!=typeof Set&&Set.prototype.keys||function(){function e(e,t){if(t==t)return e.indexOf(t);for(n=0,r=e.length;e[n]==e[n]&&++n!==r;);return n}var t,n,r,i,o,s,a={delete:function(n){return!!~(t=e(this.k,n))&&(this.k.splice(t,1),this.v.splice(t,1),--this.size,!0)},get:function(t){return this.v[e(this.k,t)]},set:function(n,r){return~(t=e(this.k,n))||(this.k[t=this.size++]=n),this.v[t]=r,this},has:function(t){return e(this.k,t)>-1},clear:function(){this.k.length=this.v.length=this.size=0},forEach:function(e,t){t&&(e=e.bind(t));for(var n=-1,r=this.size;++n!==r;)e(this.v[n],this.k[n],this)},entries:function(){var e=0,t=this;return{next:function(){return e!==t.size?{value:[t.k[e++],t.v[e]],done:!1}:{done:!0}}}},keys:function(){var e=0,t=this;return{next:function(){return e!==t.size?{value:t.k[e++],done:!1}:{done:!0}}}},values:function(){var e=0,t=this;return{next:function(){return e!==t.size?{value:t.v[e++],done:!1}:{done:!0}}}},toString:function(){return"[object Map]"}};WeakMap=Map=function(t){if(i=this.k=[],o=this.v=[],r=0,null!=t){if(s=Object(t),(n=+s.length)!=n)throw new TypeError("("+(t.toString||s.toString)()+") is not iterable");for(;n--;){if(!(s[n]instanceof Object))throw new TypeError("Iterator value "+s[n]+" is not an entry object");~e(i,s[n][0])||(i[r]=s[n][0],o[r++]=s[n][1])}i.reverse(),o.reverse()}this.size=r},Map.prototype=a,WeakSet=Set=function(t){if(i=this.k=this.v=[],r=0,null!=t){if(s=Object(t),(n=+s.length)!=n)throw new TypeError("("+(t.toString||s.toString)()+") is not iterable");for(;n--;)~e(i,s[n])||(i[r++]=s[n]);i.reverse()}this.size=r},Set.prototype={delete:function(n){return!!~(t=e(this.k,n))&&(this.k.splice(t,1),--this.size,!0)},add:function(n){return~(t=e(this.k,n))||(t=this.size++),this.k[t]=n,this}
1,has:a.has,clear:a.clear,forEach:a.forEach,entries:a.entries,keys:a.keys,values:a.keys,toString:function(){return"[object Set]"}}}(),function(){function e(){return document.querySelectorAll(".frc-captcha")}function t(e,t,n){""===e.style[t]&&(e.style[t]=n)}function n(e){var t,n,r=new Promise((function(e,r){t=e,n=r}));return e&&e(t,n),{promise:r,resolve:t,reject:n}}function r(e,t){return 0===e.lastIndexOf(t,0)}function i(e){for(var t=[],n=Object.keys(e),r=encodeURIComponent,i=0;i<n.length;i++)t.push("".concat(r(n[i]),"=").concat(r(e[n[i]])));return t.join("&")}function o(e){var t=document.location;if(r(e,"/")||r(e,"."))return t.origin?t.origin:t.protocol+"//"+t.host;var n=e.match(M);if(!n)throw new Error("Invalid URL: "+e);return n[1]}function s(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n="",r=0;r<e;r++)n+=t.charAt(Math.floor(Math.random()*t.length));return n}function a(e){return new Promise((function(t,n){e.oncomplete=e.onsuccess=function(){return t(e.result)},e.onabort=e.onerror=function(){return n(e.error)}}))}function c(e,t){var n=indexedDB.open(e);n.onupgradeneeded=function(){return n.result.createObjectStore(t)};var r=a(n);return function(e,n){return r.then((function(r){return n(r.transaction(t,e).objectStore(t))}))}}function u(){return S||(S=c("keyval-store","keyval")),S}function d(e){if(!T){var t=0;try{t=parseInt(sessionStorage.getItem(P)||"",10)}catch(n){}isNaN(t)&&(t=0),e&&t++,I=t.toString();try{sessionStorage.setItem(P,I)}catch(n){}}return I}function l(){var e;try{e=sessionStorage.getItem(F)}catch(t){return O}return e||(e=s(12),sessionStorage.setItem(F,e)),e}function f(e){e.textDecoration=e.fontStyle="none",e.fontWeight="500",e.fontFamily='-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif',e.lineHeight="1",e.letterSpacing="-0.0125rem"}function h(){var e=window.performance;return e?e.now():0}function m(e){for(var t=0;t<(arguments.length<=1?0:arguments.length-1);t++){var n=t+1<1||arguments.length<=t+1?void 0:arguments[t+1];for(var r in n)n.hasOwnProperty(r)&&(e[r]=n[r])}return e}function g(){var e=[0,0,0,0,0,0,0];return{s:e,add:function(t){var n=++e[0],r=t-e[1],i=r/n,o=i*i,s=r*i*(n-1);e[1]+=i,e[4]+=s*o*(n*n-3*n+3)+6*o*e[2]-4*i*e[3],e[3]+=s*i*(n-2)-3*i*e[2],e[2]+=s,1==n?e[5]=e[6]=t:(t<e[5]&&(e[5]=t),t>e[6]&&(e[6]=t))}}}function v(){return/Android/i.test(navigator.userAgent)}function p(e,t){var n,r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:document.body,o=g(),s=!1;return i[Y](e,(function(e){s&&!r||(n=e.timeStamp,s=!0)})),i[Y](t,(function(e){s&&(o.add(e.timeStamp-n),s=!1)})),o.s}function y(e){for(var t=[],n=function(n){t.push(0),document[Y](e[n],(function(){return t[n]++}
1))},r=0;r<e.length;r++)n(r);return t}function w(e,t,n,r){return z.sqrt(z.pow(e-t,2)+z.pow(n-r,2))}function b(e,t,n){return z.sqrt(z.pow(e,2)+z.pow(t,2)+z.pow(n,2))}function k(e,t){var n=t-e;return n+(n>180?-360:n<-180?360:0)}function _(e){return e?q[e]||e:q.global}var S,E,C,R,M=/^((?:\w+:)?\/\/([^\/]+))/,A=function(){function e(t){_classCallCheck(this,e),this.ready=!1,this.buffer=[],this.id=t.id,this.type=t.type,this.element=t.element,this.onReady=t.onReady,this.origin=o(t.element.src)}return _createClass(e,[{key:"send",value:function(e){this.ready?this.element.contentWindow.postMessage(e,this.origin):this.buffer.push(e)}},{key:"setReady",value:function(e){this.onReady(),this.ready=e,this.ready&&this.flush()}},{key:"flush",value:function(){for(var e=0;e<this.buffer.length;e++)this.element.contentWindow.postMessage(this.buffer[e],this.origin);this.buffer=[]}}]),e}(),x=function(){function e(){var t=this;_classCallCheck(this,e),this.origins=new Set,this.targets={},this.answered=new Set,this.onReceiveRootMessage=function(){},window.addEventListener("message",(function(e){t.onReceive(e)}))}return _createClass(e,[{key:"listen",value:function(e){var t=this.onReceiveRootMessage;this.onReceiveRootMessage=function(n){t(n),e(n)}}},{key:"addOrigin",value:function(e){this.origins.add(e)}},{key:"send",value:function(e){if(e.from_id){var t=this.targets[e.from_id];if(!t)return void console.error("[bus] Unexpected message from unknown sender ".concat(e.from_id),e);"widget_announce"!==e.type&&"agent_announce"!==e.type||t.setReady(!0)}var n=e.rid;if(n){if(this.answered.has(n+e.to_id))return;this.answered.add(n+e.to_id)}if(""!==e.to_id){var r=this.targets[e.to_id];r?r.send(e):console.error("[bus] Unexpected message to unknown target ".concat(e.to_id),e)}else this.onReceiveRootMessage(e)}},{key:"onReceive",value:function(e){if(t=e.origin,n=this.origins,"*"===t||n.has(t)){var t,n,r=e.data;r._frc&&this.send(r)}else console.debug("Friendly Captcha communication bus ignored message from origin "+e.origin,this.origins)}},{key:"registerTarget",value:function(e){this.targets[e.id]=e}},{key:"registerTargetIFrame",value:function(e,t,r,i){var o=n(),s=new Promise((function(e){return setTimeout((function(){return e("timeout")}),i)})),a=new A({id:t,element:r,type:e,onReady:function(){return o.resolve("registered")}});return this.registerTarget(a),Promise.race([o.promise,s])}},{key:"removeTarget",value:function(e){delete this.targets[e]}}]),e}(),P="frc_sc",F="frc_sid",T=!1,I="0",O="__"+s(10),D=function(){function e(t){_classCallCheck(this,e),this.mem=new Map,this.storePrefix=t}return _createClass(e,[{key:"setup",value:function(){var e=this;return new Promise((function(t,n){if(void 0!==e._hasSA)return t(e._hasSA);try{indexedDB.open("")}catch(r){return t(e._hasSA=!1)}if(!document.hasStorageAccess)return t(e._hasSA=!0);document.hasStorageAccess().then((function(n){return e._hasSA=n,e._hasSA?e.idb=c("friendlycaptcha","frc"):console.debug("FRC has no storage access"),t(e._hasSA)})).catch(n)}))}},{key:"get",value:function(e,t){var n=this;return this.setup().then((function(r){var i=n.storePrefix+"__"+e;if(t.p)return r?function(e){return(arguments.length>1&&void 0!==arguments[1]?arguments[1]:u())("readonly",(function(t){return a(t.get(e))}))}(i,n.idb):n.mem.get(e);try{var o=sessionStorage.getItem(i);return null===o?void 0:o}catch(s){}return n.mem.get(e)}))}},{key:"set",value:function(e,t,n){var r=this;return this.setup().then((function(i){var o=r.storePrefix+"__"+e;if(n.p){if(i)return function(e,t){return(arguments.length>2&&void 0!==arguments[2]?arguments[2]:u())("readwrite",(function(n){return n.put(t,e),a(n.transaction)}))}(o,t,r.idb);void 0===t?r.mem.delete(e):r.mem.set(e,t)}else try{void 0===t?(r.mem.delete(e),sessionStorage.removeItem(o)):(r.mem.set(e,t),sessionStorage.setItem(o,t))}catch(s){}}))}},{key:"hasSA",value:function(){return this._hasSA}}]),e}(),j="undefined"!=typeof navigator&&void 0!==navigator.userAgentData,W="FrcFrameId",N="frc-i-agent",L=function(){function e(t){var n=this;_classCallCheck(this,e),this.state="init",this.response=".UNINITIALIZED",this.focusEventPending=!1,this.isDestroyed=!1,this.id=t.id;var r=t.createOpts;if(this.e=r.element,this.ready=t.registered,!this.e)throw new Error("No element provided to mount widget under.");if(this.e.frcWidget=this,this.formFieldName=void 0===r.formFieldName?"frc-captcha-response":r.formFieldName,this.sitekey=r.sitekey,this._reset=t.callbacks.onReset,this._destroy=t.callbacks.onDestroy,this._trigger=t.callbacks.onTrigger,this.startMode=t.createOpts.startMode||"focus",null!==this.formFieldName){var i=document.createElement("input");i.type="hidden",i.style.display="none",i.name=this.formFieldName,this.hiddenFormEl=i,this.e.a
1ppendChild(i)}this.setState({response:".UNCONNECTED",state:"init"}),this.ready.then((function(){n.handleStartMode()}))}return _createClass(e,[{key:"handleStartMode",value:function(){var e,t=this;if("focus"!==this.startMode||this.focusEventPending||this.isDestroyed)"auto"===this.startMode&&this.trigger("auto");else{var n=function(e){for(;"FORM"!==e.tagName;)if(!(e=e.parentElement))return null;return e}(this.e);n&&(this.focusEventPending=!0,e=function(e){t.trigger("focus",{ev:e}),t.focusEventPending=!1},n.addEventListener("focusin",e,{once:!0,passive:!0}))}}},{key:"reset",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{trigger:"root"};if(this.isDestroyed)throw new Error("Can not reset destroyed widget.");this.setState({response:".RESET",state:"reset",resetTrigger:e.trigger}),this._reset(e),this.handleStartMode()}},{key:"destroy",value:function(){this.isDestroyed=!0,this.hiddenFormEl&&this.hiddenFormEl.remove(),this.hiddenFormEl=void 0,this.setState({response:".DESTROYED",state:"destroyed"}),this._destroy()}},{key:"trigger",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(this.isDestroyed)throw new Error("Can not start destroyed widget.");var n=function(e,t,n,r){var i=h(),o=n.getBoundingClientRect(),s={v:1,tt:e,pnow:i,sm:t,el:{bcr:[o.left,o.top,o.width,o.height],con:document.body.contains(n)},stack:(new Error).stack||"",we:!!window.event,weit:!!window.event&&!!window.event.isTrusted};return r&&(s.ev={ts:r.timeStamp,rt:!!r.relatedTarget,eot:!!r.explicitOriginalTarget,it:r.isTrusted}),s}(e,this.startMode,this.e,t.ev);this._trigger({trigger:n})}},{key:"start",value:function(){this.trigger("programmatic")}},{key:"setState",value:function(e){var t=this.state!==e.state;this.response=e.response,this.state=e.state,this.hiddenFormEl&&!1!==this.e.isConnected&&(this.hiddenFormEl.value=e.response),t&&this.dispatchWidgetEvent({name:"frc:widget.statechange",error:e.error}),"expired"===this.state?this.dispatchWidgetEvent({name:"frc:widget.expire"}):"completed"===this.state?this.dispatchWidgetEvent({name:"frc:widget.complete"}):"error"===this.state?this.dispatchWidgetEvent({name:"frc:widget.error",error:e.error}):"reset"===this.state&&this.dispatchWidgetEvent({name:"frc:widget.reset",trigger:e.resetTrigger})}},{key:"dispatchWidgetEvent",value:function(e){var t={response:this.response,state:this.state,id:this.id};m(t,e),function(e,t){var n;"function"==typeof window.CustomEvent?n=new CustomEvent(t.name,{bubbles:!0,detail:t}):(n=document.createEvent("CustomEvent")).initCustomEvent(t.name,!0,!1,t),e.dispatchEvent(n)}(this.e,t)}},{key:"addEventListener",value:function(e,t,n){this.e.addEventListener(e,t,n)}},{key:"removeEventListener",value:function(e,t,n){this.e.removeEventListener(e,t,n)}},{key:"getState",value:function(){return this.state}},{key:"getResponse",value:function(){return this.response}},{key:"getElement",value:function(){return this.e}}]),e}(),X=function(){var e=[],t=new Map,n=window,r=function(){try{var e=document.createElement("iframe");e.style.display="none",(document.body||document.head).appendChild(e);var t=e?e.contentWindow:0;return e.remove(),t||n}catch(r){return n}}(),i=Function.prototype.toString,o=function(){for(var e="function"==typeof this&&t.get(this),n=this===o?i:e||this,r=arguments.length,s=new Array(r),a=0;a<r;a++)s[a]=arguments[a];return i.apply(n,s)};Function.prototype.toString=o;var s="prototype",a="constructor",c=n.EventTarget?n.EventTarget[s].dispatchEvent:{};return[["Document."+s+".documentElement",n.Document[s],"documentElement"],["Element."+s+".shadowRoot",n.Element[s],"shadowRoot"],["Node."+s+".nodeType",n.Node[s],"nodeType"],["eval",n,"eval"],["Object.is",n.Object,"is"],["Array."+s+".slice",n.Array[s],"slice"],["Document."+s+".querySelectorAll",n.Document[s],"querySelectorAll"],["Document."+s+".createElement",n.Document[s],"createElement"],["EventTarget."+s+".dispatchEvent",c,"dispatchEvent"],["Promise."+s+"."+a,n.Promise[s],a]].forEach((function(i){var o,s=function(e){if(Array.isArray(e))return e}(o=i)||function(e){var t=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=t){var n,r,i,o,s=[],a=!0,c=!1;try{for(i=(t=t.call(e)).next;!(a=(n=i.call(t)).done)&&(s.push(n.value),3!==s.length);a=!0);}catch(e){c=!0,r=e}
1finally{try{if(!a&&null!=t.return&&(o=t.return(),Object(o)!==o))return}finally{if(c)throw r}}return s}}(o)||function(e){if(e){if("string"==typeof e)return _arrayLikeToArray(e,3);var t=Object.prototype.toString.call(e).slice(8,-1);return"Object"===t&&e.constructor&&(t=e.constructor.name),"Map"===t||"Set"===t?Array.from(e):"Arguments"===t||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)?_arrayLikeToArray(e,3):void 0}}(o)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),c=s[0],u=s[1],d=s[2],l=Object.getOwnPropertyDescriptor(u,d),f=l&&(l.get||l.set);if((d!==a||n.Symbol&&n.Symbol.species)&&l){if(f){if(!l.get)return}else if("object"!==_typeof(l.value)&&"function"!=typeof l.value)return;var g=function(){var t={d:Date.now(),pnow:h(),n:c,st:(r.Error||n.Error)("FriendlyCaptcha_DummyTrace").stack||""};e.push(t);for(var i=arguments.length,o=new Array(i),s=0;s<i;s++)o[s]=arguments[s];return(f?l.get:l.value).apply(this,o)};try{var v=f?l.get?l.get():void 0:l.value();v&&(g.length=v.length,g.name=v.name)}catch(y){}try{var p=m({},l);f?p.get=g:p.value=g,Object.defineProperty(u,d,p),t.set(g,f?l.get:l.value)}catch(y){}}})),function(){return e.splice(0,e.length)}}(),Y="addEventListener",z=Math,U=function(){function e(){_classCallCheck(this,e),this.rn=0,this.i=0,this.smel={n:0,ts:0,d:0};var t,n,r="mouse",i=this.smel,o=function(e){i.n||(i.fts=e.timeStamp,i.fxy=[e.clientX,e.clientY,e.screenX,e.screenY]),i.n++,e.type===r+"leave"&&(i.d+=e.timeStamp-i.ts),i.ts=e.timeStamp,i.xy=[e.clientX,e.clientY]},s=document,a=s.body;a[Y](r+"enter",o),a[Y](r+"leave",o),this.bh={onoff:{kdu:p("keydown","keyup"),cse:p("compositionstart","compositionend"),mdu:p(r+"down",r+"up"),mle:p(r+"leave",r+"enter"),med:p(r+"enter",r+"down",!0),semd:p("scrollend",r+"down",!0,s),se:p("scroll","scrollend",!1,s),pdc:p("pointerdown","pointercancel",!0),mmc:p(r+"move","click",!0),tse:p("touchstart","touchend"),fikd:p("focusin","keydown",!0)},nev:y([r+"out","pointercancel","focus","focusin","blur","visibilitychange","copy","paste","cut","contextmenu","click","auxclick","wheel","resize"]),nk:(t=[0,0,0,0,0,0,0,0],n={8:1,46:1,9:2,45:3,17:4,13:5,37:6,38:6,39:6,40:6,33:7,34:7},document[Y]("keydown",(function(e){var r=e.keyCode;n[r]?t[n[r]]++:r>=112&&r<=123&&t[0]++})),t),mov:this.setupMovementMetrics(),dm:this.setupMotionMetrics(),do:this.setupOrientationMetrics()}}return _createClass(e,[{key:"setupMovementMetrics",value:function(){var e=this,t=void 0,n=[],r=g(),i=g(),o=g(),s={t:r.s,v:o.s,d:i.s,ns:0},a=document.body,c=function(){var a=n[n.length-1];if(n.length>=200||a&&(a[0]&&e.tm.timeStamp===a[1]||!a[0]&&e.mm.timeStamp===a[1])){if(clearInterval(t),t=void 0,1===n.length)return s.ns++,void(n=[]);var c=n[0];r.add(a[1]-c[1]),i.add(w(a[2],c[2],a[3],c[3]));for(var u=1;u<n.length;u++){var d=n[u],l=n[u-1],f=1e3*w(d[2],l[2],d[3],l[3]),h=d[1]-l[1];o.add(f/h)}n=[]}else{var m=0;if(a?m=a[0]:e.mm&&e.tm?m=e.mm.timeStamp>e.tm.timeStamp?0:1:e.mm||(m=1),m){var g=e.tm.touches[0];g&&n.push([1,e.tm.timeStamp,g.screenX,g.screenY])}else n.push([0,e.mm.timeStamp,e.mm.screenX,e.mm.screenY])}};a[Y]("mousemove",(function(n){e.mm=n,void 0===t&&(c(),t=setInterval(c,50))}));var u=-1;return a[Y]("touchmove",(function(n){e.tm=n;var r=n.touches[0];if(r){var i=r.radiusX+1.234*r.radiusY;i!==u&&(u=i,e.rn++)}void 0===t&&(c(),t=setInterval(c,50))})),s}},{key:"setupMotionMetrics",value:function(){var e=g(),t=g(),n={n:0,ts:0,ac:e.s,rr:t.s,i:0,g:!1};return v()?(window[Y]("devicemotion",(function(r){n.ts=r.timeStamp,n.i=r.interval,n.g=!r.acceleration;var i=r.acceleration||r.accelerationIncludingGravity;i&&e.add(b(i.x,i.y,i.z));var o=r.rotationRate;o&&t.add(b(o.alpha,o.beta,o.gamma))})),n):n}},{key:"setupOrientationMetrics",value:function(){var e,t=g(),n=g(),r={fts:0,ts:0,gd:t.s,bd:n.s};return v()?(window[Y]("deviceorientation",(function(i){null!=i.gamma&&null!=i.beta&&null!=i.alpha&&(r.ts=i.timeStamp,r.a=i.alpha,r.b=i.beta,r.g=i.gamma,e?(t.add(k(i.gamma,r.g)),n.add(k(r.b,i.beta))):(r.fts=r.ts,e=!0))})),r):r}},{key:"gmm",value:function(){var e=this.mm;return e&&{xy:[e.clientX,e.clientY,e.screenX,e.screenY,e.offsetX,e.offsetY,e.pageX,e.pageY,e.movementX,e.movementY],ts:e.timeStamp}}},{key:"gtm",value:function(){var e=this.tm,t=e&&e.touches,n=t&&t[0];return e&&n&&{id:n.identifier,xy:[n.clientX,n.clientY,n.screenX,n.screenY,n.pageX,n.pageY],r:[n.radiusX,n.radiusX,n.rotationAngle,n.force],n:t.length,ts:e.timeStamp,rn:this.rn}}},{key:"get",value:function(e){var t=document.body,n=window,r=n.performance;return{v:1,i:++this.i,hl:history.length,fe:!!window.frameElement,wid:e,sc:parseInt(d(!1)),sid:l(),conv:0,t:{pnow:h(),pto:r&&r.timeOrigin||0,ts:Date.now()},dims:{d:[n.innerWidth,n.innerHeight,n.outerWidth,n.outerHeight,n.screenX,n.screenY,n.pageXOffset,n.pageYOffset,t.clientWidth,t.clientHeight],dpr:n.devicePixelRatio},mel:this.smel,mm:this.gmm(),tm:this.gtm(),bh:this.bh,stack:(new Error).stack||"",trc:X()}}}]),e}(),q={eu:"https://eu.frcapi.com/api/v2/captcha",global:"https://global.frcapi.com/api/v2/captcha"},H="FrcFrameId",B=0,G=function(){function a(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};_classCallCheck(this,a),this.agents=new Map,this.agentState=new Map,this.widgets=new Map,this._attached=n(),this.attached=this._attached.promise,this.signals=E||(E=new U),this.baseURL=_(t.apiEndpoint||function(){var e=document.querySelector('meta[name="frc-api-endpoint"]');if(e)return e.content;var t=document.currentScript;if(t){var n=t.dataset.frcApiEndpoint;if(n)return n}
1var r=document.querySelector(".frc-captcha[data-api-endpoint]");if(r){var i=r.dataset.apiEndpoint;if(i)return i}}()),(C=C||new x).addOrigin(o(this.baseURL)),C.listen((function(t){return e.onReceiveMessage(t)})),this.bus=C,++B>1&&console.warn("Multiple Friendly Captcha SDKs created, this is not recommended. Please use a single SDK instance."),!1!==t.startAgent&&this.ensureAgentIFrame(),this.setupPeriodicRefresh()}return _createClass(a,[{key:"onReceiveMessage",value:function(e){if("root_set_response"===e.type){var t=this.widgets.get(e.widget_id);if(!t)return void(1===B&&console.warn("Received set response message for widget ".concat(e.widget_id," that doesn't exist")));t.setState(e)}else if(r(e.type,"root_store"))this.handleStoreMessage(e);else if("root_signals_get"===e.type)this.handleSignalsGetMessage(e);else if("widget_reset"===e.type){var n=this.widgets.get(e.from_id);if(!n)return void(1===B&&console.warn("Received reset message for widget ".concat(e.from_id," that doesn't exist")));n.reset({trigger:"widget"})}}},{key:"handleSignalsGetMessage",value:function(e){var t=this.signals.get(e.widget_id);this.bus.send({type:"root_signals_get_reply",from_id:"",to_id:e.from_id,_frc:1,rid:e.rid,value:t})}},{key:"handleStoreMessage",value:function(e){var t=this,n=e.from_id,r=this.agentState.get(n);r?"root_store_get"===e.type?r.store.get(e.key,{p:e.p}).then((function(i){t.bus.send({type:"root_store_get_reply",from_id:"",to_id:n,_frc:1,rid:e.rid,value:i,sa:r.store.hasSA()})})):"root_store_set"===e.type&&r.store.set(e.key,e.value,{p:e.p}).then((function(){t.bus.send({type:"root_store_set_reply",from_id:"",to_id:n,_frc:1,rid:e.rid,sa:r.store.hasSA()})})):console.error("Store not found ".concat(n))}},{key:"getAPIUrls",value:function(e){if(e&&"string"!=typeof e)return{agent:e.agent,widget:e.widget};var t=e||this.baseURL;return{agent:t+"/agent",widget:t+"/widget"}}},{key:"ensureAgentIFrame",value:function(e){for(var t=this,n=this.getAPIUrls(e).agent,r=o(n),a=document.getElementsByClassName(N),c=0;c<a.length;c++){var u=a[c];if(o(u.src)===r&&u.dataset[H])return u.dataset[H]}var f="a_"+s(12),h=function(e,t,n){var r={origin:document.location.origin,sess_id:l(),sess_c:d(!0),comm_id:t,sdk_v:"0.1.11",v:"1",agent_id:t,ts:Date.now().toString()},o=document.createElement("iframe");o.className=N,o.dataset[W]=t,o.src=n+"?"+i(r),o.frcSDK=e;var s=o.style;return s.width=s.height=s.border=s.visibility="0",s.display="none",o}(this,f,n);this.agents.set(r,h),this.agentState.set(f,{store:new D(r),origin:r}),document.body.appendChild(h);var m=1;return function e(){t.bus.registerTargetIFrame("agent",f,h,3e3*m).then((function(n){if("timeout"===n){if(m>15)return console.error("[Friendly Captcha] Failed to load agent iframe after 15 retries."),h.remove(),void t.agents.delete(r);console.warn("[Friendly Captcha] Retrying agent iframe load."),h.src+="&retry="+m++,e()}}))}(),f}},{key:"setupPeriodicRefresh",value:function(){var e=this,t=1;setInterval((function(){var n="&expire="+t++;e.agents.forEach((function(e){e.src+=n})),e.widgets.forEach((function(e){e.getElement().querySelector("iframe").src+=n}))}),1296e5)}},{key:"attach",value:function(t){void 0===t&&(t=e()),Array.isArray(t)||t instanceof NodeList||(t=[t]);for(var n=[],r=0;r<t.length;r++){var i=t[r];if(i&&!i.frcWidget){var o=i.dataset,s={element:i,sitekey:o.sitekey,formFieldName:o.formFieldName,apiEndpoint:o.apiEndpoint,language:o.lang,theme:o.theme,startMode:o.start};n.push(this.createWidget(s))}}var a=this.getAllWidgets();return this._attached.resolve(a),this.attached=Promise.resolve(a),n}},{key:"createWidget",value:function(e){var r=this,a=e.apiEndpoint&&_(e.apiEndpoint),c=this.ensureAgentIFrame(a),u="w_"+s(12),h=function(e){var t={from_id:u,to_id:c,_frc:1};r.bus.send(m(t,e))},g={onDestroy:function(){h({type:"root_destroy_widget"}),r.bus.removeTarget(u),r.widgets.delete(u),e.element.innerHTML="",e.element.removeAttribute("style")},onReset:function(){h({type:"root_reset_widget"})},onTrigger:function(e){h({type:"root_trigger_widget",trigger:e.trigger})}},v=n(),p=new L({id:u,createOpts:e,callbacks:g,registered:v.promise});this.widgets.set(u,p);var y,w,b=this.getAPIUrls(a).widget,k=function(e,t,n,r){var o=document.createElement("iframe"),s=r.language;s&&"html"!==s||(s=function(e){for(;!e.lang;)if(!(e=e.parentElement))return null;return e.lang}(r.element)||"");var a={origin:document.location.origin,sess_id:l(),sess_c:d(!0),comm_id:t,sdk_v:"0.1.11",v:"1",agent_id:e,lang:s,sitekey:r.sitekey||"",ts:Date.now().toString()};r.theme&&(a.theme=r.theme),j&&(o.allow="clipboard-write"),o.frameBorder="0",o.src=n+"?"+i(a),o.className="frc-i-widget",o.dataset[W]=t;var c=o.style;return c.border=c.visibility="0",c.position="absolute",c.height=c.width="100%",c.display="none",r.element.appendChild(o),o}(c,u,b,e),S=function(e){var t=document.createElement("div");t.classList.add("frc-widget-placeholder");var n=t.style,r="dark"===e.theme||"auto"===e.theme&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches;return n.color=r?"#fff":"#222",n.backgroundColor=r?"#171717":"#fafafa",n.borderRadius="4px",n.border="1px solid",n.borderColor="#ddd",n.padding="8px",n.height=n.width="100%",n.fontSize="14px",f(n),e.element.appendChild(t),t}(e);(w=t)(y=e.element,"position","relative"),w(y,"height","70px"),w(y,"padding","0"),w(y,"width","316px"),w(y,"maxWidth","100%"),w(y,"maxHeight","100%"),w(y,"overflow","hidden"),w(y,"borderRadius","4px"),function(e){var t=document.createElement("div");t.classList.add("frc-banner");var n=t.style;n.position="absolute",n.bottom="2px",n.right="6px",n.lineHeight="1";var r=document.createElement("a");r.href="https://friendlycaptcha.com",r.rel="noopener";var i=r.style;f(i),i.fontSize="10px",i.color="#777",i.letterSpacing="-0.0125rem",r.target="_blank",r.textContent="Friendly Captcha",r.onmouseenter=function(){return i.textDecoration="underline"},r.onmouseleave=function(){return i.textDecoration="none"},t.appendChild(r),e.element.appendChild(t)}(e);var E=S.style;S.textContent="Anti-Robot check connecting...";var C=1;return function t(){r.bus.registerTargetIFrame("widget",u,k,2500*C+2e3).then((function(n){if("timeout"===n){if(C>4)return console.error("[Friendly Captcha] Failed to load widget iframe after 4 retries."),p.setState({state:"error",response:".ERROR",error:{code:"network_error",detail:"Widget load timeout, stopped retrying"}}),E.borderColor="#f00",E.fontSize="12px",void(S.textContent="Anti-Robot check failed to connect to page or ".concat(o(k.src),"\nCheck your connection and try again."));E.backgroundColor="#fee",E.color="#222",S.textContent="Anti-Robot check took too long to connect.\n\nRetrying... (".concat(C,")"),console.warn("[Friendly Captcha] Retrying widget ".concat(u," iframe load.")),p.setState({state:"error",response:".ERROR",error:{code:"network_error",detail:"Widget load timeout, will retry."}}),k.src+="&retry="+C++,t()}else"registered"===n&&(e.element.removeChild(S),k.style.display="")}))}(),v.resolve(),p}},{key:"getAllWidgets",value:function(){var e=[];
1return this.widgets.forEach((function(t){e.push(t)})),e}},{key:"getWidgetById",value:function(e){return this.widgets.get(e)}},{key:"clear",value:function(){this.widgets.forEach((function(e){e.destroy()})),this.agents.forEach((function(e){e.remove()})),this.agents.clear()}}]),a}();window.frcaptcha=new G,R=function(){var t=e();window.frcaptcha.attach(t)},"loading"!==document.readyState?R():document.addEventListener("DOMContentLoaded",R)}(); 2/*! 3 * Copyright (c) Friendly Captcha GmbH 2023. 4 * This Source Code Form is subject to the terms of the Mozilla Public 5 * License, v. 2.0. If a copy of the MPL was not distributed with this 6 * file, You can obtain one at https://mozilla.org/MPL/2.0/. 7 */
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.