PageSourceSearch

https://www.albany.org/dist/CmsForm-DNazAwiw.js

js albany.org collected 2026-10-02 02:53:46 UTC 1,570 bytes, 1 lines download raw bytes

1class m{constructor(e){this.refreshTokens(e),this.validateDateRange(e),e.addEventListener("freeform-ajax-success",()=>{e.querySelectorAll(".row").forEach(t=>{t.hidden=!0});const r=e.querySelector(".callout.success");r&&r.scrollIntoView({behavior:"smooth",block:"center"})})}validateDateRange(e){const r=e.querySelector('[name="allDay"]'),t=e.querySelector('[name="startDateTime"]'),a=e.querySelector('[name="endDateTime"]'),n=e.querySelector('[name="startDate"]'),c=e.querySelector('[name="endDate"]');!t&&!n||e.addEventListener("submit",o=>{const l=r?.checked??!1,i=(l?n:t)?.value,d=(l?c:a)?.value,s=l?c:a;if(!i||!d||!s)return;const u=new Date(i);new Date(d)<=u&&(o.preventDefault(),o.stopPropagation(),s.classList.add("is-invalid"),s.setCustomValidity("End date must be after the start date."),s.reportValidity(),s.addEventListener("change",()=>{s.classList.remove("is-invalid"),s.setCustomValidity("")},{once:!0}))})}refreshTokens(e){const r=e.dataset.handle??"";(async()=>{try{const t=await fetch("/ajax/form/?form="+encodeURIComponent(r),{method:"GET",credentials:"same-origin",headers:{Accept:"application/json"}});if(!t.ok)return;const a=await t.json();e.querySelector("input[name=formHash]").value=a.hash,e.querySelector("input[name=freeform_payload]").value=a.payload;const n=e.querySelector('input[name^="freeform_form_handle"]');if(n!==null){const o=a.honeypot;n.setAttribute("id",o.name),n.setAttribute("name",o.name),n.value=o.hash}const c=a.csrf;e.querySelector("input[name="+c.name+"]").value=c.value}catch(t){console.error(t)}})()}}export{m as default};

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.