!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var r=t();for(var i in r)("object"==typeof exports?exports:e)[i]=r[i]}}(Depicter,(()=>(()=>{const{Layer:e,env:t}=window.Depicter;class r extends e{constructor(e,r,i,s,o,n){super(e,r,i,s,o,n),this.type="form:input",this.frame.classList.add(`${t.prefix}-form-input-layer`),this.frame.classList.add(`${t.prefix}-no-swipe`),this.element.classList.add(`${t.prefix}-form-field`);const d=this.element.querySelector("textarea");d&&(d.classList.add(`${t.prefix}-input`),d.classList.add(`${t.prefix}-text-input`));const{formId:p,preventProceed:a,resolveProceed:f}=this.holder.composer?.survey||{},c=d||this.element.querySelector("input");if(p&&c.setAttribute("form",p),c.required&&a){let e;const t=()=>{e!==!c.value&&(e=!c.value,e?a(this.holder.index):f(this.holder.index))};t(),c.addEventListener("input",t)}}}return window.Depicter.externalLayers["form:input"]=r,window.Depicter.externalLayers["survey:input"]=r,{}})()));