!function(){function n(n){if(Array.isArray(n))return n}function t(n){if(Symbol.iterator in Object(n)||"[object Arguments]"===Object.prototype.toString.call(n))return Array.from(n)}function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}function r(r,i){return n(r)||t(r)||e()}var i={version:"5.7.6",init:function(r){var a,o=(r instanceof Element?r:document).querySelectorAll("[data-pagy-json]"),c=!0,u=!1,l=void 0;try{for(var f,s=o[Symbol.iterator]();!(c=(f=s.next()).done);c=!0){var p=f.value;try{var v=p.getAttribute("data-pagy-json"),g=n(a=JSON.parse(v))||t(a)||e(),y=g[0],d=g.slice(1);"nav"===y?i.initNav(p,d):"combo"===y?i.initCombo(p,d):"selector"===y?i.initSelector(p,d):i.initWarn(p,'Illegal PagyJSON keyword: expected "nav"|"combo"|"selector", got "'.concat(y,'"'))}catch(n){i.initWarn(p,n)}}}catch(n){u=!0,l=n}finally{try{c||null==s.return||s.return()}finally{if(u)throw l}}},initWarn:function(n,t){console.warn("Pagy.init() skipped element: %o\n%s",n,t)},initNav:function(n,t){var e,a=r(t),o=a[0],c=a[1],u=a[2],l=a[3],f=null!==(e=n.parentElement)&&void 0!==e?e:n,s=Object.keys(c).map((function(n){return parseInt(n)})).sort((function(n,t){return t-n})),p=-1,v=function(n,t,e){return n.replace(/__pagy_page__/g,t).replace(/__pagy_label__/g,e)};(n.pagyRender=function(){var t=s.find((function(n){return nf)return a.value=o,void a.select();var s=r(t(a.value)),p=s[0],v=s[1];"string"==typeof e&&"1"===p&&(v=i.trim(v,e)),n.insertAdjacentHTML("afterbegin",v),n.querySelector("a").click()}};["change","focus"].forEach((function(n){return a.addEventListener(n,a.select)})),a.addEventListener("focusout",c),a.addEventListener("keypress",(function(n){"Enter"===n.key&&c()}))},trim:function(n,t){return n.replace(new RegExp("[?&]".concat(t,"=1\\b(?!&)|\\b").concat(t,"=1&")),"")}},a=i;window.Pagy=a}();