PageSourceSearch

https://lespectacledumonde.fr/assets/plugins/hcaptcha-for-forms-an…/js/hcaptcha-spectra.min.js?ver=4.18.0

js lespectacledumonde.fr collected 2026-10-02 11:55:52 UTC 9,825 bytes, 1 lines download raw bytes

1(()=>{"use strict";var t={2981:(t,e,r)=>{function n(t){return n="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},n(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,a,c,i=[],u=!0,l=!1;try{if(a=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;u=!1}else for(;!(u=(n=a.call(r)).done)&&(i.push(n.value),i.length!==e);u=!0);}catch(t){l=!0,o=t}finally{try{if(!u&&null!=r.return&&(c=r.return(),Object(c)!==c))return}finally{if(l)throw o}}return i}}(t,e)||function(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}(t,e)||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.")}()}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(t){var e=function(t,e){if("object"!=n(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var o=r.call(t,e||"default");if("object"!=n(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==n(e)?e:e+""}function u(t){var e;if(!t)return"";var r;return String("value"in t?null!==(r=t.value)&&void 0!==r?r:"":null!==(e=t.getAttribute("value"))&&void 0!==e?e:"")}r.d(e,{d:()=>l});var l=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.params=null}return e=t,n=[{key:"checkAction",value:function(t,e,r){var n,o=null!==(n=t.data)&&void 0!==n?n:"";if("string"!=typeof o)return!1;var a=o.startsWith("?")?o.slice(1):o;try{this.params=new URLSearchParams(a)}catch(t){this.params=new URLSearchParams}return this.params.get(e)===r}},{key:"addHCaptchaData",value:function(e,r,n,a){if(t.checkAction(e,"action",r)){for(var c=t.getHCaptchaData(a,n),i="",u=0,l=Object.entries(c);u<l.length;u++){var f=o(l[u],2),s=f[0],d=f[1];this.params.has(s)||(i+="&".concat(s,"=").concat(d))}e.data+=i}}},{key:"getHCaptchaData",value:function(t,e){for(var r,n,o=(n=t)?n.jquery||Array.isArray(n)?n[0]||document:n:document,a=null!=o&&o.querySelector?o.querySelector('input[id^="hcap_hp_"]'):null,c={},i=0,l=["h-captcha-response","hcaptcha-widget-id",e,null!==(r=null==a?void 0:a.getAttribute("name"))&&void 0!==r?r:"","hcap_hp_sig","hcap_fst_token"];i<l.length;i++){var f=l[i];if(f){var s=null!=o&&o.querySelector?o.querySelector('[name="'.concat(f,'"]')):null;c[f]=u(s)}}return c}},{key:"installFetchEvents",value:function(){if("undefined"!=typeof window&&"function"==typeof window.fetch&&!window.__hcapFetchWrapped){var t;t=window.fetch,window.fetch=function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];try{window.dispatchEvent(new CustomEvent("hCaptchaFetch:before",{detail:{args:r}}))}catch(t){}var o=t.apply(void 0,r);return o.then(function(t){try{window.dispatchEvent(new CustomEvent("hCaptchaFetch:success",{detail:{args:r,response:t.clone()}}))}catch(t){}}).catch(function(t){try{window.dispatchEvent(new CustomEvent("hCaptchaFetch:error",{detail:{args:r,error:t}}))}catch(t){}}).finally(function(){try{window.dispatchEvent(new CustomEvent("hCaptchaFetch:complete",{detail:{args:r}}))}catch(t){}}),o};try{Object.defineProperty(window,"__hcapFetchWrapped",{value:!0,configurable:!0})}catch(t){window.__hcapFetchWrapped=!0}}}}],(r=null)&&c(e.prototype,r),n&&c(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,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.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);var n=r(2981);function o(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */var t,e,r="function"==typeof Symbol?Symbol:{},n=r.iterator||"@@iterator",c=r.toStringTag||"@@toStringTag";function i(r,n,o,c){var i=n&&n.prototype instanceof l?n:l,f=Object.create(i.prototype);return a(f,"_invoke",function(r,n,o){var a,c,i,l=0,f=o||[],s=!1,d={p:0,n:0,v:t,a:h,f:h.bind(t,4),d:function(e,r){return a=e,c=0,i=t,d.n=r,u}};function h(r,n){for(c=r,i=n,e=0;!s&&l&&!o&&e<f.length;e++){var o,a=f[e],h=d.p,p=a[2];r>3?(o=p===n)&&(i=a[(c=a[4])?5:(c=3,3)],a[4]=a[5]=t):a[0]<=h&&((o=r<2&&h<a[1])?(c=0,d.v=n,d.n=a[1]):h<p&&(o=r<3||a[0]>n||n>p)&&(a[4]=r,a[5]=n,d.n=p,c=0))}if(o||r>1)return u;throw s=!0,n}return function(o,f,p){if(l>1)throw TypeError("Generator is already running");
1for(s&&1===f&&h(f,p),c=f,i=p;(e=c<2?t:i)||!s;){a||(c?c<3?(c>1&&(d.n=-1),h(c,i)):d.n=i:d.v=i);try{if(l=2,a){if(c||(o="next"),e=a[o]){if(!(e=e.call(a,i)))throw TypeError("iterator result is not an object");if(!e.done)return e;i=e.value,c<2&&(c=0)}else 1===c&&(e=a.return)&&e.call(a),c<2&&(i=TypeError("The iterator does not provide a '"+o+"' method"),c=1);a=t}else if((e=(s=d.n<0)?i:r.call(n,d))!==u)break}catch(e){a=t,c=1,i=e}finally{l=1}}return{value:e,done:s}}}(r,o,c),!0),f}var u={};function l(){}function f(){}function s(){}e=Object.getPrototypeOf;var d=[][n]?e(e([][n]())):(a(e={},n,function(){return this}),e),h=s.prototype=l.prototype=Object.create(d);function p(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,s):(t.__proto__=s,a(t,c,"GeneratorFunction")),t.prototype=Object.create(h),t}return f.prototype=s,a(h,"constructor",s),a(s,"constructor",f),f.displayName="GeneratorFunction",a(s,c,"GeneratorFunction"),a(h),a(h,c,"Generator"),a(h,n,function(){return this}),a(h,"toString",function(){return"[object Generator]"}),(o=function(){return{w:i,m:p}})()}function a(t,e,r,n){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}a=function(t,e,r,n){function c(e,r){a(t,e,function(t){return this._invoke(e,r,t)})}e?o?o(t,e,{value:r,enumerable:!n,configurable:!n,writable:!n}):t[e]=r:(c("next",0),c("throw",1),c("return",2))},a(t,e,r,n)}function c(t,e,r,n,o,a,c){try{var i=t[a](c),u=i.value}catch(t){return void r(t)}i.done?e(u):Promise.resolve(u).then(n,o)}var i=window.hCaptchaSpectra||function(t){var e,r={init:function(){n.d.installFetchEvents(),t.addEventListener("hCaptchaFetch:before",r.fetchBefore),t.addEventListener("hCaptchaFetch:success",r.fetchSuccess),t.addEventListener("hCaptchaFetch:complete",r.fetchComplete)},fetchBefore:function(t){var e,r,n=null!==(e=null==t||null===(r=t.detail)||void 0===r||null===(r=r.args)||void 0===r?void 0:r[1])&&void 0!==e?e:{},o=n.body;if(o instanceof URLSearchParams){var a=o.get("block_id"),c=document.querySelector(".uagb-block-".concat(a)),i=c.querySelector(".hcaptcha-error-message");i&&i.remove();var u="h-captcha-response",l=JSON.parse(o.get("form_data"));if("uagb_process_forms"===o.get("action")&&!l.hasOwnProperty(u)){var f="hcaptcha-widget-id",s="hcap_hp_sig",d="hcap_fst_token",h="hcaptcha_spectra_form_nonce",p=c.querySelector('[name="'.concat(f,'"]')),v=c.querySelector('[name="'.concat(u,'"]')),y=c.querySelector('[name="'.concat(h,'"]')),m=c.querySelector('[id^="hcap_hp_"]'),b=c.querySelector('[name="'.concat(s,'"]')),g=c.querySelector('[name="'.concat(d,'"]'));l[f]=null==p?void 0:p.value,l[u]=null==v?void 0:v.value,l[h]=null==y?void 0:y.value,l[null==m?void 0:m.id]=null==m?void 0:m.value,l[s]=null==b?void 0:b.value,l[d]=null==g?void 0:g.value,o.set("form_data",JSON.stringify(l)),n.body=o,t.detail.args.config=n}}},fetchSuccess:function(t){return(r=o().m(function r(){var n,a,c,i,u,l,f,s,d,h,p;return o().w(function(r){for(;;)switch(r.n){case 0:if(c=null==t||null===(n=t.detail)||void 0===n||null===(n=n.args)||void 0===n?void 0:n[1],i=null==t||null===(a=t.detail)||void 0===a?void 0:a.response,c&&i){r.n=1;break}return r.a(2);case 1:if((u=c.body)instanceof FormData||u instanceof URLSearchParams){r.n=2;break}return r.a(2);case 2:return r.n=3,i.clone().json().catch(function(){return null});case 3:if(l=r.v,"uagb_process_forms"===u.get("action")&&"string"==typeof(null==l?void 0:l.data)){r.n=4;break}return r.a(2);case 4:f=u.get("block_id"),s='[name="uagb-form-'.concat(f,'"]'),(e=document.createElement("style")).id="hcaptcha-style-".concat(f),e.textContent="\n\t\t".concat(s," {\n\t\t\tdisplay: block !important;\n\t\t}\n"),document.getElementById(e.id)||document.head.appendChild(e),(d=document.querySelector(".uagb-block-"+f+" .hcaptcha-error-message"))&&d.remove(),(h=document.createElement("div")).className="hcaptcha-error-message",h.textContent=l.data,h.style.color="red",h.style.padding="10px 0",(p=document.querySelector(".uagb-block-"+f+" h-captcha"))&&p.parentNode.insertBefore(h,p);case 5:return r.a(2)}},r)}),function(){var t=this,e=arguments;return new Promise(function(n,o){var a=r.apply(t,e);function i(t){c(a,n,o,i,u,"next",t)}function u(t){c(a,n,o,i,u,"throw",t)}i(void 0)})})();var r},fetchComplete:function(r){var n,o,a,c=(null!==(n=null==r||null===(o=r.detail)||void 0===o||null===(o=o.args)||void 0===o?void 0:o[1])&&void 0!==n?n:{}).body;if(c instanceof URLSearchParams&&"uagb_process_forms"===c.get("action")){var i=document.getElementById(null===(a=e)||void 0===a?void 0:a.id);i&&i.remove(),t.hCaptchaBindEvents()}}};return r}(window);window.hCaptchaSpectra=i,i.init()})();

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.