if(void 0===addCsrfToForms)function addCsrfToForms(){let e=document.querySelector('meta[name="csrf-token"]');if(e){let a=e.getAttribute("content");document.querySelectorAll("form").forEach((e=>{if(e.querySelector('input[name="_token"]'))return;let t=document.createElement("input");t.type="hidden",t.name="_token",t.value=a,e.appendChild(t)}))}}!function(){let e=document.querySelector('meta[name="csrf-token"]');if(e){let a=e.getAttribute("content");$(document).ready((function(){addCsrfToForms(),$.ajaxSetup({headers:{"X-CSRF-TOKEN":a},statusCode:{419:function(e){window.swal?swal("Page Expired","Please refresh the page and try again.","warning"):alert("Page Expired. Please refresh the page and try again.")}}})})),$.ajaxSetup({headers:{"X-CSRF-TOKEN":a},statusCode:{419:function(e){window.swal?swal("Page Expired","Please refresh the page and try again.","warning"):alert("Page Expired. Please refresh the page and try again.")}}}),setTimeout((()=>{$.ajaxSetup({headers:{"X-CSRF-TOKEN":a},statusCode:{419:function(e){window.swal?swal("Page Expired","Please refresh the page and try again.","warning"):alert("Page Expired. Please refresh the page and try again.")}}})}),2e3),$(document).on("ajaxComplete",(function(){addCsrfToForms()}))}}();