PageSourceSearch

https://www.sympoziumrenemacha.cz/dist/Amca/assets/form.1c1ccb87.js

js sympoziumrenemacha.cz collected 2026-10-07 03:52:00 UTC 8,986 bytes, 19 lines download raw bytes

1var H=Object.defineProperty;var D=(p,o,c)=>o in p?H(p,o,{enumerable:!0,configurable:!0,writable:!0,value:c}):p[o]=c;var C=(p,o,c)=>(D(p,typeof o!="symbol"?o+"":o,c),c);import{c as O}from"./_commonjsHelpers.b8add541.js";class V{constructor(o){C(this,"input");C(this,"parent");this.input=o,this.parent=o.closest("div"),this.init()}componentLayout(){var c;const o=document.createElement("div");o.className="pux-file-upload-component",o.setAttribute("data-pux-file-input",""),o.innerHTML=`
2            <div>
3                <div class='pux-file-upload-input' data-pux-file-input-upload>
4                    ${(c=this.input.getAttribute("data-upload"))!=null?c:""}
5                </div>
6            </div>
7
8            ${this.input.files&&this.input.files.length>0?`
9                <div class='pux-file-upload-input-files'>
10                    ${[...this.input.files].map(g=>{const[m,h]=g.name.split(/\.(?=[^\.]+$)/);return`
11                            <div class='pux-file-upload-input-file' data-pux-file-input-file data-id='${g.name}'>
12                                <div class='pux-file-upload-input-file-name'>${m}</div>
13                                <div class='pux-file-upload-input-file-type'>${h}</div>
14                                <div class='pux-file-upload-input-file-clear' data-remove></div>
15                            </div>
16                        `}).join("")}
17                </div>
18            `:""}
19        `,this.clearLayout(),this.parent.insertAdjacentHTML("beforeend",o.outerHTML),this.bindListeners()}clearLayout(){const o=this.parent.querySelector("[data-pux-file-input]");o!==null&&o.remove()}bindListeners(){const o=this.parent.querySelector("[data-pux-file-input]"),c=this.parent.querySelector("[data-pux-file-input-clear]"),g=[...this.parent.querySelectorAll("[data-pux-file-input-file]")];o&&o.addEventListener("click",()=>{this.input.click()}),c&&c.addEventListener("click",m=>{m.preventDefault(),m.stopPropagation(),this.input.value="",this.componentLayout()}),g.forEach(m=>{var A;const h=new DataTransfer,E=m.getAttribute("data-id");(A=m.querySelector("[data-remove]"))==null||A.addEventListener("click",T=>{T.preventDefault(),T.stopPropagation(),this.input.files!==null&&([...this.input.files].forEach(L=>{L.name!==E&&h.items.add(L)}),this.input.files=h.files,this.componentLayout())})})}watchChange(){this.input.addEventListener("change",()=>{this.componentLayout()})}init(){this.input.classList.contains("d-none")||(this.watchChange(),this.componentLayout(),this.input.classList.add("d-none"))}}var R={exports:{}};(function(p,o){(function(c,g){p.exports=g()})(O,function(){var c={required:"This field is required",email:"This field requires a valid e-mail address",number:"This field requires a number",integer:"This field requires an integer value",url:"This field requires a valid website URL",tel:"This field requires a valid telephone number",maxlength:"This fields length must be < ${1}",minlength:"This fields length must be > ${1}",min:"Minimum value for this field is ${1}",max:"Maximum value for this field is ${1}",pattern:"Please match the requested format"};function g(s,t){for(;(s=s.parentElement)&&!s.classList.contains(t););return s}function m(s){var t=arguments;return this.replace(/\${([^{}]*)}/g,function(l,r){return t[r]})}function h(s){return s.pristine.self.form.querySelectorAll('input[name="'+s.getAttribute("name")+'"]:checked').length}function E(s,t){for(var l in t)l in s||(s[l]=t[l]);return s}function A(s){return!!(s&&s.constructor&&s.call&&s.apply)}var T={classTo:"form-group",errorClass:"has-danger",successClass:"has-success",errorTextParent:"form-group",errorTextTag:"div",errorTextClass:"text-help"},L="pristine-error",_="input:not([type^=hidden]):not([type^=submit]), select, textarea",k=["required","min","max","minlength","maxlength","pattern"],M=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,$={},v=function(t,l){l.name=t,l.msg||(l.msg=c[t]),l.priority===void 0&&(l.priority=1),$[t]=l};v("text",{fn:function(t){return!0},priority:0}),v("required",{fn:function(t){return this.type==="radio"||this.type==="checkbox"?h(this):t!==void 0&&t!==""},priority:99,halt:!0}),v("email",{fn:function(t){return!t||M.test(t)}}),v("number",{fn:function(t){return!t||!isNaN(parseFloat(t))},priority:2}),v("integer",{fn:function(t){return!t||/^\d+$/.test(t)}}),v("minlength",{fn:function(t,l){return!t||t.length>=parseInt(l)}}),v("maxlength",{fn:function(t,l){return!t||t.length<=parseInt(l)}}
19),v("min",{fn:function(t,l){return!t||(this.type==="checkbox"?h(this)>=parseInt(l):parseFloat(t)>=parseFloat(l))}}),v("max",{fn:function(t,l){return!t||(this.type==="checkbox"?h(this)<=parseInt(l):parseFloat(t)<=parseFloat(l))}}),v("pattern",{fn:function(t,l){var r=l.match(new RegExp("^/(.*?)/([gimy]*)$"));return!t||new RegExp(r[1],r[2]).test(t)}});function S(s,t,l){var r=this;b(s,t,l);function b(e,n,a){e.setAttribute("novalidate","true"),r.form=e,r.config=E(n||{},T),r.live=a!==!1,r.fields=Array.from(e.querySelectorAll(_)).map(function(i){var u=[],f={},y={};return[].forEach.call(i.attributes,function(d){if(/^data-pristine-/.test(d.name)){var x=d.name.substr(14);if(x.endsWith("-message")){y[x.slice(0,x.length-8)]=d.value;return}x==="type"&&(x=d.value),q(u,f,x,d.value)}else~k.indexOf(d.name)?q(u,f,d.name,d.value):d.name==="type"&&q(u,f,d.value)}),u.sort(function(d,x){return x.priority-d.priority}),r.live&&i.addEventListener(~["radio","checkbox"].indexOf(i.getAttribute("type"))?"change":"input",function(d){r.validate(d.target)}.bind(r)),i.pristine={input:i,validators:u,params:f,messages:y,self:r}}.bind(r))}function q(e,n,a,i){var u=$[a];if(u&&(e.push(u),i)){var f=i.split(",");f.unshift(null),n[a]=f}}
19r.validate=function(e,n){n=e&&n===!0||e===!0;var a=r.fields;e!==!0&&e!==!1&&(e instanceof HTMLElement?a=[e.pristine]:(e instanceof NodeList||e instanceof(window.$||Array)||e instanceof Array)&&(a=Array.from(e).map(function(y){return y.pristine})));for(var i=!0,u=0;a[u];u++){var f=a[u];N(f)?!n&&F(f):(i=!1,!n&&I(f))}return i},r.getErrors=function(e){if(!e){for(var n=[],a=0;a<r.fields.length;a++){var i=r.fields[a];i.errors.length&&n.push({input:i.input,errors:i.errors})}return n}return e.tagName&&e.tagName.toLowerCase()==="select"?e.pristine.errors:e.length?e[0].pristine.errors:e.pristine.errors};function N(e){for(var n=[],a=!0,i=0;e.validators[i];i++){var u=e.validators[i],f=e.params[u.name]?e.params[u.name]:[];if(f[0]=e.input.value,!u.fn.apply(e.input,f)){if(a=!1,A(u.msg))n.push(u.msg(e.input.value,f));else{var y=e.messages[u.name]||u.msg;n.push(m.apply(y,f))}if(u.halt===!0)break}}return e.errors=n,a}r.addValidator=function(e,n,a,i,u){e instanceof HTMLElement?(e.pristine.validators.push({fn:n,msg:a,priority:i,halt:u}),e.pristine.validators.sort(function(f,y){return y.priority-f.priority})):console.warn("The parameter elem must be a dom element")};function w(e){if(e.errorElements)return e.errorElements;var n=g(e.input,r.config.classTo),a=null,i=null;return r.config.classTo===r.config.errorTextParent?a=n:a=n.querySelector("."+r.config.errorTextParent),a&&(i=a.querySelector("."+L),i||(i=document.createElement(r.config.errorTextTag),i.className=L+" "+r.config.errorTextClass,a.appendChild(i),i.pristineDisplay=i.style.display)),e.errorElements=[n,i]}function I(e){var n=w(e),a=n[0],i=n[1];a&&(a.classList.remove(r.config.successClass),a.classList.add(r.config.errorClass)),i&&(i.innerHTML=e.errors.join("<br/>"),i.style.display=i.pristineDisplay||"")}r.addError=function(e,n){e=e.length?e[0]:e,e.pristine.errors.push(n),I(e.pristine)};function P(e){var n=w(e),a=n[0],i=n[1];return a&&(a.classList.remove(r.config.errorClass),a.classList.remove(r.config.successClass)),i&&(i.innerHTML="",i.style.display="none"),n}function F(e){var n=P(e)[0];n&&n.classList.add(r.config.successClass)}return r.reset=function(){for(var e=0;r.fields[e];e++)r.fields[e].errorElements=null;Array.from(r.form.querySelectorAll("."+L)).map(function(n){n.parentNode.removeChild(n)}),Array.from(r.form.querySelectorAll("."+r.config.classTo)).map(function(n){n.classList.remove(r.config.successClass),n.classList.remove(r.config.errorClass)})},r.destroy=function(){r.reset(),r.fields.forEach(function(e){delete e.input.pristine}),r.fields=[]},r.setGlobalConfig=function(e){T=e},r}return S.addValidator=function(s,t,l,r,b){v(s,{fn:t,msg:l,priority:r,halt:b})},S})})(R);var B=R.exports;const G=p=>{const o=new B(p);p.addEventListener("submit",function(c){c.preventDefault(),o.validate();var g=Array.from(document.querySelectorAll(".g-recaptcha")),m=p.querySelector(".g-recaptcha"),h=m!=null?g.indexOf(m):-1;const E=p.querySelector(".has-danger");if(E===null){typeof grecaptcha!="undefined"&&h!=-1?grecaptcha.execute(h):p.onSubmit();return}E.scrollIntoView()})},U=()=>{document.querySelectorAll("[data-form]").forEach(o=>{o.querySelectorAll("input[type=file]").forEach(c=>{new V(c)}),G(o)})},Z=()=>{U()};export{Z as 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.