PageSourceSearch

https://progresivne.sk/wp-content/cache/min/1/forms/v1/setup.js?ver=1790682532

js progresivne.sk collected 2026-10-02 11:38:47 UTC 4,612 bytes, 19 lines download raw bytes

1var __awaiter=(this&&this.__awaiter)||function(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value)})}
2return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value))}catch(e){reject(e)}}
3function rejected(value){try{step(generator["throw"](value))}catch(e){reject(e)}}
4function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected)}
5step((generator=generator.apply(thisArg,_arguments||[])).next())})};let mappingFile={};let bucketName="cdn-form.qomon.org";const getMappingFile=(formBaseId)=>__awaiter(this,void 0,void 0,function*(){try{const response=yield fetch(`https://${bucketName}/${formBaseId}/manifest.json`);if(!response.ok){console.warn(`Manifest download error: HTTP ${response.status} for ${formBaseId}`);return!1}
6mappingFile=yield response.json();return!0}catch(error){console.warn(`Manifest download error: ${error.message}`);return!1}});const resolveWebComponentFileName=(formTypeAttributeValue)=>formTypeAttributeValue==="petition"?"qomonPetition":"qomonForm";const fallbackWebComponentFileName=(webComponentFileName)=>webComponentFileName==="qomonPetition"?"qomonForm":"qomonPetition";const getManifestEntry=(webComponentFileName)=>{const primaryKey=`src/webComponents/${webComponentFileName}.js`;if(mappingFile[primaryKey]!==undefined)
7return mappingFile[primaryKey];const fallbackKey=`src/webComponents/${fallbackWebComponentFileName(webComponentFileName)}.js`;return mappingFile[fallbackKey]};const addEmbedFormScript=(formBaseId,formTypeAttributeValue="")=>{const webComponentFileName=resolveWebComponentFileName(formTypeAttributeValue);const entry=getManifestEntry(webComponentFileName);const embedFormScript=`https://${bucketName}/${formBaseId}/${entry.file}`;if(document.querySelector(`script[src="${embedFormScript}"]`))
8return;const scriptElement=document.createElement("script");scriptElement.setAttribute("type","module");scriptElement.setAttribute("src",embedFormScript);scriptElement.dataset.base_id=formBaseId;document.head.appendChild(scriptElement)};const addEmbedFormStyleInDataset=(formBaseId,el,formTypeAttributeValue="")=>{const webComponentFileName=resolveWebComponentFileName(formTypeAttributeValue);const entry=getManifestEntry(webComponentFileName);const embedFormStyle=`https://${bucketName}/${formBaseId}/${entry.css[0]}`;el.dataset.styleLink=embedFormStyle};const addOnlineFormFileInDataset=(formBaseId,el)=>{var _a,_b;const onlineFormFile=(_b=(_a=mappingFile["online-form"])===null||_a===void 0?void 0:_a.file)!==null&&_b!==void 0?_b:"online-form.json";el.dataset.onlineFormFile=`https://${bucketName}/${formBaseId}/${onlineFormFile}`};const init=()=>{function initLoadForms(qomonFormElm,formTypeAttributeValue=""){return __awaiter(this,void 0,void 0,function*(){if(!qomonFormElm)
9return;if(qomonFormElm.dataset.qomonInitialized==="true")
10return;qomonFormElm.dataset.qomonInitialized="true";
10if(qomonFormElm.dataset.env){bucketName=qomonFormElm.dataset.env}
11const formBaseId=qomonFormElm.dataset.base_id;const manifestLoaded=yield getMappingFile(formBaseId);if(!manifestLoaded){qomonFormElm.dispatchEvent(new CustomEvent("qomon-form:error",{detail:{reason:"manifest-load-failed",baseId:formBaseId},bubbles:!0,}));return}
12const webComponentFileName=resolveWebComponentFileName(formTypeAttributeValue);const manifestEntry=getManifestEntry(webComponentFileName);if(!manifestEntry){qomonFormElm.dispatchEvent(new CustomEvent("qomon-form:error",{detail:{reason:"manifest-entry-not-found",baseId:formBaseId},bubbles:!0,}));return}
13addEmbedFormStyleInDataset(formBaseId,qomonFormElm,formTypeAttributeValue);addOnlineFormFileInDataset(formBaseId,qomonFormElm);addEmbedFormScript(formBaseId,formTypeAttributeValue);qomonFormElm.dispatchEvent(new CustomEvent("qomon-form:ready",{bubbles:!0}))})}
14function initFormElement(node){var _a;const formTypeAttributeValue=(_a=node.getAttribute("form-type"))!==null&&_a!==void 0?_a:"";initLoadForms(node,formTypeAttributeValue)}
15function handleDomUpdate(mutationsList){for(const mutation of mutationsList){if(mutation.type!=="childList")
16continue;for(const node of mutation.addedNodes){if(!(node instanceof Element))
17continue;if(node.matches("div.qomon-form[data-base_id]")){initFormElement(node)}
18node.querySelectorAll("div.qomon-form[data-base_id]").forEach(initFormElement)}}}
19const observer=new MutationObserver(handleDomUpdate);observer.observe(document.body,{childList:!0,subtree:!0});document.querySelectorAll("div.qomon-form[data-base_id]").forEach(initFormElement)};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.