create-absolutejs 0.17.3 → 0.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +37 -4
  3. package/changelog.json +24 -0
  4. package/dist/commands/migrateDatabase.d.ts +6 -0
  5. package/dist/commands/migrateDatabase.js +53 -0
  6. package/dist/data.d.ts +1 -1
  7. package/dist/data.js +1 -1
  8. package/dist/generators/angular/generateAngularPage.d.ts +5 -6
  9. package/dist/generators/angular/generateAngularPage.js +16 -33
  10. package/dist/generators/angular/scaffoldAngular.d.ts +1 -1
  11. package/dist/generators/angular/scaffoldAngular.js +8 -9
  12. package/dist/generators/configurations/generateDrizzleConfig.d.ts +5 -3
  13. package/dist/generators/configurations/generateDrizzleConfig.js +40 -14
  14. package/dist/generators/configurations/generateEnv.js +6 -0
  15. package/dist/generators/configurations/generateEslintConfig.js +4 -2
  16. package/dist/generators/configurations/generatePackageJson.js +33 -6
  17. package/dist/generators/db/drizzleTargets.d.ts +5 -0
  18. package/dist/generators/db/drizzleTargets.js +27 -0
  19. package/dist/generators/db/generateDatabaseTypes.js +21 -24
  20. package/dist/generators/db/generateDockerContainer.d.ts +5 -0
  21. package/dist/generators/db/generateDockerContainer.js +22 -4
  22. package/dist/generators/db/generateDrizzleSchema.js +65 -77
  23. package/dist/generators/db/generateHandlers.js +3 -2
  24. package/dist/generators/db/generateRelationalSchema.d.ts +1 -1
  25. package/dist/generators/db/generateRelationalSchema.js +1 -1
  26. package/dist/generators/db/handlerTemplates.d.ts +11 -5
  27. package/dist/generators/db/handlerTemplates.js +14 -12
  28. package/dist/generators/db/scaffoldDatabase.d.ts +2 -1
  29. package/dist/generators/db/scaffoldDatabase.js +25 -10
  30. package/dist/generators/db/scaffoldDocker.d.ts +3 -1
  31. package/dist/generators/db/scaffoldDocker.js +11 -5
  32. package/dist/generators/htmx/scaffoldHTMX.js +1 -0
  33. package/dist/generators/project/generateAbsoluteAuthConfig.d.ts +1 -1
  34. package/dist/generators/project/generateAbsoluteAuthConfig.js +11 -10
  35. package/dist/generators/project/generateDBBlock.js +16 -7
  36. package/dist/generators/project/generateIdentity.d.ts +1 -0
  37. package/dist/generators/project/generateIdentity.js +15 -0
  38. package/dist/generators/project/generateImportsBlock.js +15 -15
  39. package/dist/generators/project/generateRoutesBlock.d.ts +2 -1
  40. package/dist/generators/project/generateRoutesBlock.js +8 -13
  41. package/dist/generators/project/generateServer.js +26 -16
  42. package/dist/generators/project/scaffoldAgentic.d.ts +1 -1
  43. package/dist/generators/project/scaffoldAgentic.js +45 -45
  44. package/dist/generators/project/scaffoldBackend.js +4 -9
  45. package/dist/generators/react/scaffoldReact.js +2 -2
  46. package/dist/index.js +2 -1
  47. package/dist/messages.d.ts +2 -1
  48. package/dist/messages.js +2 -1
  49. package/dist/prompt.js +3 -2
  50. package/dist/questions/authOption.js +4 -1
  51. package/dist/questions/databaseEngine.d.ts +1 -1
  52. package/dist/questions/orm.js +2 -5
  53. package/dist/scaffold.d.ts +3 -1
  54. package/dist/scaffold.js +33 -4
  55. package/dist/templates/configurations/eslint.config.example.mjs +81 -41
  56. package/dist/templates/db/migrations/cockroach-count-history/20260926210314_init/migration.sql +5 -0
  57. package/dist/templates/db/migrations/cockroach-count-history/20260926210314_init/snapshot.json +69 -0
  58. package/dist/templates/db/migrations/cockroach-users/20260926210315_init/migration.sql +5 -0
  59. package/dist/templates/db/migrations/cockroach-users/20260926210315_init/snapshot.json +62 -0
  60. package/dist/templates/db/migrations/mssql-count-history/20260926210316_init/migration.sql +6 -0
  61. package/dist/templates/db/migrations/mssql-count-history/20260926210316_init/snapshot.json +64 -0
  62. package/dist/templates/db/migrations/mssql-users/20260926210317_init/migration.sql +6 -0
  63. package/dist/templates/db/migrations/mssql-users/20260926210317_init/snapshot.json +70 -0
  64. package/dist/templates/db/migrations/mysql-count-history/20260926210318_init/migration.sql +5 -0
  65. package/dist/templates/db/migrations/mysql-count-history/20260926210318_init/snapshot.json +61 -0
  66. package/dist/templates/db/migrations/mysql-users/20260926210319_init/migration.sql +5 -0
  67. package/dist/templates/db/migrations/mysql-users/20260926210319_init/snapshot.json +61 -0
  68. package/dist/templates/db/migrations/postgresql-count-history/20260926210320_init/migration.sql +5 -0
  69. package/dist/templates/db/migrations/postgresql-count-history/20260926210320_init/snapshot.json +71 -0
  70. package/dist/templates/db/migrations/postgresql-users/20260926210320_init/migration.sql +5 -0
  71. package/dist/templates/db/migrations/postgresql-users/20260926210320_init/snapshot.json +62 -0
  72. package/dist/templates/db/migrations/singlestore-count-history/20260926210321_init/migration.sql +5 -0
  73. package/dist/templates/db/migrations/singlestore-count-history/20260926210321_init/snapshot.json +61 -0
  74. package/dist/templates/db/migrations/singlestore-users/20260926210322_init/migration.sql +5 -0
  75. package/dist/templates/db/migrations/singlestore-users/20260926210322_init/snapshot.json +61 -0
  76. package/dist/templates/db/migrations/sqlite-count-history/20260926210323_init/migration.sql +5 -0
  77. package/dist/templates/db/migrations/sqlite-count-history/20260926210323_init/snapshot.json +50 -0
  78. package/dist/templates/db/migrations/sqlite-users/20260926210324_init/migration.sql +5 -0
  79. package/dist/templates/db/migrations/sqlite-users/20260926210324_init/snapshot.json +50 -0
  80. package/dist/templates/db/migrations/turso-count-history/20260926210324_init/migration.sql +5 -0
  81. package/dist/templates/db/migrations/turso-count-history/20260926210324_init/snapshot.json +50 -0
  82. package/dist/templates/db/migrations/turso-users/20260926210325_init/migration.sql +5 -0
  83. package/dist/templates/db/migrations/turso-users/20260926210325_init/snapshot.json +50 -0
  84. package/dist/templates/git/gitignore +0 -3
  85. package/dist/templates/htmx/LICENSE +13 -0
  86. package/dist/templates/htmx/htmx.2.0.11.min.js +1 -0
  87. package/dist/typeGuards.js +2 -2
  88. package/dist/utils/abort.d.ts +1 -1
  89. package/dist/utils/abort.js +2 -4
  90. package/dist/utils/getPackageVersion.js +7 -2
  91. package/dist/utils/parseCommandLineOptions.js +17 -34
  92. package/dist/utils/registryChannel.d.ts +2 -0
  93. package/dist/utils/registryChannel.js +20 -0
  94. package/dist/utils/validateDatabaseSelection.d.ts +11 -0
  95. package/dist/utils/validateDatabaseSelection.js +31 -0
  96. package/dist/versions.d.ts +66 -65
  97. package/dist/versions.js +66 -65
  98. package/package.json +27 -22
  99. package/dist/templates/configurations/drizzle.config.ts +0 -13
  100. package/dist/templates/htmx/htmx.2.0.6.min.js +0 -1
@@ -0,0 +1 @@
1
+ var htmx=function(){"use strict";const Y={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(e,t){const n=pn(e,t||"post");return n.values},remove:null,addClass:null,removeClass:null,toggleClass:null,takeClass:null,swap:null,defineExtension:null,removeExtension:null,logAll:null,logNone:null,logger:null,config:{historyEnabled:true,historyCacheSize:10,refreshOnHistoryMiss:false,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:true,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:true,allowScriptTags:true,inlineScriptNonce:"",inlineStyleNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:false,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",scrollBehavior:"instant",defaultFocusScroll:false,getCacheBusterParam:false,globalViewTransitions:false,methodsThatUseUrlParams:["get","delete"],selfRequestsOnly:true,ignoreTitle:false,scrollIntoViewOnBoost:true,triggerSpecsCache:null,disableInheritance:false,responseHandling:[{code:"204",swap:false},{code:"[23]..",swap:true},{code:"[45]..",swap:false,error:true}],allowNestedOobSwaps:true,historyRestoreAsHxRequest:true,reportValidityOfForms:false},parseInterval:null,location:location,_:null,version:"2.0.11"};Y.onLoad=V;Y.process=Bt;Y.on=ye;Y.off=xe;Y.trigger=ae;Y.ajax=In;Y.find=a;Y.findAll=x;Y.closest=g;Y.remove=z;Y.addClass=w;Y.removeClass=S;Y.toggleClass=G;Y.takeClass=W;Y.swap=C;Y.defineExtension=zn;Y.removeExtension=Jn;Y.logAll=$;Y.logNone=_;Y.parseInterval=d;Y._=e;const n={addTriggerHandler:Et,bodyContains:ie,canAccessLocalStorage:U,findThisElement:we,filterValues:xn,swap:C,hasAttribute:s,getAttributeValue:f,getClosestAttributeValue:te,getClosestMatch:A,getExpressionVars:qn,getHeaders:yn,getInputValues:pn,getInternalData:re,getSwapSpecification:vn,getTriggerSpecs:lt,getTarget:Se,makeFragment:D,mergeObjects:se,makeSettleInfo:En,oobSwap:Te,querySelectorExt:ce,settleImmediately:Qt,shouldCancel:dt,triggerEvent:ae,triggerErrorEvent:ue,withExtensions:Vt};const he=["get","post","put","delete","patch"];const R=he.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");function d(e){if(e==undefined){return undefined}let t=NaN;if(e.slice(-2)=="ms"){t=parseFloat(e.slice(0,-2))}else if(e.slice(-1)=="s"){t=parseFloat(e.slice(0,-1))*1e3}else if(e.slice(-1)=="m"){t=parseFloat(e.slice(0,-1))*1e3*60}else{t=parseFloat(e)}return isNaN(t)?undefined:t}function Q(e,t){return e instanceof Element&&e.getAttribute(t)}function s(e,t){return!!e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function f(e,t){return Q(e,t)||Q(e,"data-"+t)}function u(e){const t=e.parentElement;if(!t&&e.parentNode instanceof ShadowRoot)return e.parentNode;return t}function ee(){return document}function q(e,t){return e.getRootNode?e.getRootNode({composed:t}):ee()}function A(e,t){while(e&&!t(e)){e=u(e)}return e||null}function o(e,t,n){const r=f(t,n);const o=f(t,"hx-disinherit");var i=f(t,"hx-inherit");if(e!==t){if(Y.config.disableInheritance){if(i&&(i==="*"||i.split(" ").indexOf(n)>=0)){return r}else{return null}}if(o&&(o==="*"||o.split(" ").indexOf(n)>=0)){return"unset"}}return r}function te(t,n){let r=null;A(t,function(e){return!!(r=o(t,le(e),n))});if(r!=="unset"){return r}}function h(e,t){return e instanceof Element&&e.matches(t)}function N(e){const t=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i;const n=t.exec(e);if(n){return n[1].toLowerCase()}else{return""}}function I(e){if("parseHTMLUnsafe"in Document){return Document.parseHTMLUnsafe(e)}const t=new DOMParser;return t.parseFromString(e,"text/html")}function L(e,t){while(t.childNodes.length>0){e.append(t.childNodes[0])}}function r(e){const t=ee().createElement("script");oe(e.attributes,function(e){t.setAttribute(e.name,e.value)});t.textContent=e.textContent;t.async=false;if(Y.config.inlineScriptNonce){t.nonce=Y.config.inlineScriptNonce}return t}function i(e){return e.matches("script")&&(e.type==="text/javascript"||e.type==="module"||e.type==="")}function k(e){if(!Y.config.allowScriptTags){e.querySelectorAll("script").forEach(e=>e.remove());return}Array.from(e.querySelectorAll("script")).forEach(e=>{if(i(e)){const t=r(e);const n=e.parentNode;try{n.insertBefore(t,e)}catch(e){T(e)}finally{e.remove()}}})}function D(e){e=e.replace(/<hx-([a-z]+)((?:\s[^>]*)?)>/gi,'<template hx type="$1"$2>').replace(/<\/hx-[a-z]+>/gi,"</template>");const t=e.replace(/<head(\s[^>]*)?>[\s\S]*?<\/head>/i,"");const n=N(t);let r;if(n==="html"){r=new DocumentFragment;const i=I(e);L(r,i.body);r.title=i.title}else if(n==="body"){r=new DocumentFragment;const i=I(t);L(r,i.body);r.title=i.title}else{const i=I('<body><template class="internal-htmx-wrapper">'+t+"</template></body>");r=i.querySelector("template").content;r.title=i.title;var o=r.querySelector("title");if(o&&o.parentNode===r){o.remove();r.title=o.innerText}}if(r){k(r)}return r}function ne(e){if(e){e()}}function t(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function P(e){return typeof e==="function"}function M(e){return t(e,"Object")}function re(e){const t="htmx-internal-data";let n=e[t];if(!n){n=e[t]={}}return n}function F(t){const n=[];if(t){for(let e=0;e<t.length;e++){n.push(t[e])}}return n}function oe(t,n){if(t){for(let e=0;e<t.length;e++){n(t[e])}}}function B(e){const t=e.getBoundingClientRect();const n=t.top;const r=t.bottom;return n<window.innerHeight&&r>=0}function ie(e){return e.getRootNode({composed:true})===document}function X(e){return e.trim().split(/\s+/)}function se(e,t){return Object.assign({},e,t)}function v(e){try{return JSON.parse(e)}catch(e){T(e);return null}}function U(){const e="htmx:sessionStorageTest";try{sessionStorage.setItem(e,e);sessionStorage.removeItem(e);return true}catch(e){return false}}function j(e){try{const t=new URL(e,window.location.href);e=t.pathname+t.search}catch(e){}if(e!="/"){e=e.replace(/\/+$/,"")}return e}function e(e){return Tn(ee().body,function(){return eval(e)})}function V(t){const e=Y.on("htmx:load",function(e){t(e.detail.elt)});return e}function $(){Y.logger=function(e,t,n){if(console){console.log(t,e,n)}}}function _(){Y.logger=null}function a(e,t){if(typeof e!=="string"){return e.querySelector(t)}else{return a(ee(),e)}}function x(e,t){if(typeof e!=="string"){return e.querySelectorAll(t)}else{return x(ee(),e)}}function b(){return window}function z(e,t){e=E(e);if(t){b().setTimeout(function(){z(e);e=null},t)}else{u(e).removeChild(e)}}function le(e){return e instanceof Element?e:null}function J(e){return e instanceof HTMLElement?e:null}function K(e){return typeof e==="string"?e:null}function p(e){return e instanceof Element||e instanceof Document||e instanceof DocumentFragment?e:null}function w(e,t,n){e=le(E(e));if(!e){return}if(n){b().setTimeout(function(){w(e,t);e=null},n)}else{e.classList&&e.classList.add(t)}}function S(e,t,n){let r=le(E(e));if(!r){return}if(n){b().setTimeout(function(){S(r,t);r=null},n)}else{if(r.classList){r.classList.remove(t);if(r.classList.length===0){r.removeAttribute("class")}}}}function G(e,t){e=E(e);e.classList.toggle(t)}function W(e,t){e=E(e);oe(e.parentElement.children,function(e){S(e,t)});w(le(e),t)}function g(e,t){e=le(E(e));if(e){return e.closest(t)}return null}function l(e,t){return e.substring(0,t.length)===t}function Z(e,t){return e.substring(e.length-t.length)===t}function de(e){const t=e.trim();if(l(t,"<")&&Z(t,"/>")){return t.substring(1,t.length-2)}else{return t}}function m(t,r,n){if(r.indexOf("global ")===0){return m(t,r.slice(7),true)}t=E(t);const o=[];{let t=0;let n=0;for(let e=0;e<r.length;e++){const l=r[e];if(l===","&&t===0){o.push(r.substring(n,e));n=e+1;continue}if(l==="<"){t++}else if(l==="/"&&e<r.length-1&&r[e+1]===">"){t--}}if(n<r.length){o.push(r.substring(n))}}const i=[];const s=[];while(o.length>0){const r=de(o.shift());let e;if(r.indexOf("closest ")===0){e=g(le(t),de(r.slice(8)))}else if(r.indexOf("find ")===0){e=a(p(t),de(r.slice(5)))}else if(r==="next"||r==="nextElementSibling"){e=le(t).nextElementSibling}else if(r.indexOf("next ")===0){e=pe(t,de(r.slice(5)),!!n)}else if(r==="previous"||r==="previousElementSibling"){e=le(t).previousElementSibling}else if(r.indexOf("previous ")===0){e=ge(t,de(r.slice(9)),!!n)}else if(r==="document"){e=document}else if(r==="window"){e=window}else if(r==="body"){e=document.body}else if(r==="root"){e=q(t,!!n)}else if(r==="host"){e=t.getRootNode().host}else{s.push(r)}if(e){i.push(e)}}if(s.length>0){const e=s.join(",");const c=p(q(t,!!n));i.push(...F(c.querySelectorAll(e)))}return i}var pe=function(t,e,n){const r=p(q(t,n)).querySelectorAll(e);for(let e=0;e<r.length;e++){const o=r[e];if(o.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_PRECEDING){return o}}};var ge=function(t,e,n){const r=p(q(t,n)).querySelectorAll(e);for(let e=r.length-1;e>=0;e--){const o=r[e];if(o.compareDocumentPosition(t)===Node.DOCUMENT_POSITION_FOLLOWING){return o}}};function ce(e,t){if(typeof e!=="string"){return m(e,t)[0]}else{return m(ee().body,e)[0]}}function E(e,t){if(typeof e==="string"){return a(p(t)||document,e)}else{return e}}function me(e,t,n,r){if(P(t)){return{target:ee().body,event:K(e),listener:t,options:n}}else{return{target:E(e),event:K(t),listener:n,options:r}}}function ye(t,n,r,o){Wn(function(){const e=me(t,n,r,o);e.target.addEventListener(e.event,e.listener,e.options)});const e=P(n);return e?n:r}function xe(t,n,r){Wn(function(){const e=me(t,n,r);e.target.removeEventListener(e.event,e.listener)});return P(n)?n:r}const be=ee().createElement("output");function ve(t,n){const e=te(t,n);if(e){if(e==="this"){return[we(t,n)]}else{const r=m(t,e);const o=/(^|,)(\s*)inherit(\s*)($|,)/.test(e);if(o){const i=le(A(t,function(e){return e!==t&&s(le(e),n)}));if(i){r.push(...ve(i,n))}}if(r.length===0){T('The selector "'+e+'" on '+n+" returned no matches!");return[be]}else{return r}}}}function we(e,t){return le(A(e,function(e){return f(le(e),t)!=null}))}function Se(e){const t=te(e,"hx-target");if(t){if(t==="this"){return we(e,"hx-target")}else{return ce(e,t)}}else{const n=re(e);if(n.boosted){return ee().body}else{return e}}}function Ee(e){return Y.config.attributesToSettle.includes(e)}function Ce(t,n){oe(Array.from(t.attributes),function(e){if(!n.hasAttribute(e.name)&&Ee(e.name)){t.removeAttribute(e.name)}});oe(n.attributes,function(e){if(Ee(e.name)){t.setAttribute(e.name,e.value)}})}function Oe(t,e){const n=Kn(e);for(let e=0;e<n.length;e++){const r=n[e];try{if(r.isInlineSwap(t)){return true}}catch(e){T(e)}}return t==="outerHTML"}function Te(e,o,i,t){t=t||ee();let n="#"+CSS.escape(Q(o,"id"));let s="outerHTML";if(e==="true"){}else if(e.indexOf(":")>0){s=e.substring(0,e.indexOf(":"));n=e.substring(e.indexOf(":")+1)}else{s=e}o.removeAttribute("hx-swap-oob");o.removeAttribute("data-hx-swap-oob");const r=m(t,n,false);if(r.length){oe(r,function(e){let t;const n=o.cloneNode(true);t=ee().createDocumentFragment();t.appendChild(n);if(!Oe(s,e)){t=p(n)}const r={shouldSwap:true,target:e,fragment:t};if(!ae(e,"htmx:oobBeforeSwap",r))return;e=r.target;if(r.shouldSwap){Re(t);Ve(s,e,e,t,i);He()}oe(i.elts,function(e){ae(e,"htmx:oobAfterSwap",r)})});o.parentNode.removeChild(o)}else{o.parentNode.removeChild(o);ue(ee().body,"htmx:oobErrorNoTarget",{content:o,target:n})}return e}function He(){const e=a("#--htmx-preserve-pantry--");if(e){for(const t of[...e.children]){const n=a("#"+t.id);n.parentNode.moveBefore(t,n);n.remove()}e.remove()}}function Re(e){oe(x(e,"[hx-preserve], [data-hx-preserve]"),function(e){const t=f(e,"id");const n=ee().getElementById(t);if(n!=null){if(e.moveBefore){let e=a("#--htmx-preserve-pantry--");if(e==null){ee().body.insertAdjacentHTML("afterend","<div id='--htmx-preserve-pantry--'></div>");e=a("#--htmx-preserve-pantry--")}e.moveBefore(n,null)}else{e.parentNode.replaceChild(n,e)}}})}function qe(i,e,s){oe(e.querySelectorAll("[id]"),function(t){const n=Q(t,"id");if(n&&n.length>0){const e=p(i);const r=e&&e.querySelector(CSS.escape(t.tagName)+"#"+CSS.escape(n));if(r&&r!==e){const o=t.cloneNode();Ce(t,r);s.tasks.push(function(){Ce(t,o)})}}})}function Ae(e){return function(){S(e,Y.config.addedClass);Bt(le(e));Ne(p(e));ae(e,"htmx:load")}}function Ne(e){const t="[autofocus]";const n=J(h(e,t)?e:e.querySelector(t));if(n!=null){n.focus()}}function c(e,t,n,r){qe(e,n,r);while(n.childNodes.length>0){const o=n.firstChild;w(le(o),Y.config.addedClass);e.insertBefore(o,t);if(o.nodeType!==Node.TEXT_NODE&&o.nodeType!==Node.COMMENT_NODE){r.tasks.push(Ae(o))}}}function Ie(e,t){let n=0;while(n<e.length){t=(t<<5)-t+e.charCodeAt(n++)|0}return t}function Le(t){let n=0;for(let e=0;e<t.attributes.length;e++){const r=t.attributes[e];if(r.value){n=Ie(r.name,n);n=Ie(r.value,n)}}return n}function ke(t){const n=re(t);if(n.onHandlers){for(let e=0;e<n.onHandlers.length;e++){const r=n.onHandlers[e];xe(t,r.event,r.listener)}delete n.onHandlers}}function De(e){const t=re(e);if(t.timeout){clearTimeout(t.timeout)}if(t.listenerInfos){oe(t.listenerInfos,function(e){if(e.on){xe(e.on,e.trigger,e.listener)}})}ke(e);oe(Object.keys(t),function(e){if(e!=="firstInitCompleted")delete t[e]})}function y(e){ae(e,"htmx:beforeCleanupElement");De(e);oe(e.children,function(e){y(e)})}function Pe(t,e,n){if(t.tagName==="BODY"){return je(t,e,n)}let r;const o=t.previousSibling;const i=u(t);if(!i){return}c(i,t,e,n);if(o==null){r=i.firstChild}else{r=o.nextSibling}n.elts=n.elts.filter(function(e){return e!==t});while(r&&r!==t){if(r instanceof Element){n.elts.push(r)}r=r.nextSibling}y(t);t.remove()}function Me(e,t,n){return c(e,e.firstChild,t,n)}function Fe(e,t,n){return c(u(e),e,t,n)}function Be(e,t,n){return c(e,null,t,n)}function Xe(e,t,n){return c(u(e),e.nextSibling,t,n)}function Ue(e){y(e);const t=u(e);if(t){return t.removeChild(e)}}function je(e,t,n){const r=e.firstChild;c(e,r,t,n);if(r){while(r.nextSibling){y(r.nextSibling);e.removeChild(r.nextSibling)}y(r);e.removeChild(r)}}function Ve(t,e,n,r,o){switch(t){case"none":return;case"outerHTML":Pe(n,r,o);return;case"afterbegin":Me(n,r,o);return;case"beforebegin":Fe(n,r,o);return;case"beforeend":Be(n,r,o);return;case"afterend":Xe(n,r,o);return;case"delete":Ue(n);return;default:var i=Kn(e);for(let e=0;e<i.length;e++){const s=i[e];try{const l=s.handleSwap(t,n,r,o);if(l){if(Array.isArray(l)){for(let e=0;e<l.length;e++){const c=l[e];if(c.nodeType!==Node.TEXT_NODE&&c.nodeType!==Node.COMMENT_NODE){o.tasks.push(Ae(c))}}}return}}catch(e){T(e)}}if(t==="innerHTML"){je(n,r,o)}else{Ve(Y.config.defaultSwapStyle,e,n,r,o)}}}function $e(e,s,l){var t=x(e,"template[hx]");oe(t,function(r){var e=Q(r,"type");if(e==="partial"){var t=f(r,"hx-target")||(r.id?"#"+CSS.escape(r.id):null);if(t){var n=f(r,"hx-swap");var o=vn(r,n);var i=m(l||ee().body,t,false);if(i.length===0){ue(ee().body,"htmx:partialErrorNoTarget",{template:r,targetSelector:t,sourceElement:l})}oe(i,function(e){e=le(e);if(e){var t=r.content.cloneNode(true);k(t);var n={shouldSwap:true,target:e,fragment:t};if(!ae(e,"htmx:partialBeforeSwap",n))return;e=n.target;if(n.shouldSwap){C(e,n.fragment,o,{contextElement:e,afterSwapCallback:function(){oe(s.elts,function(e){ae(e,"htmx:partialAfterSwap",n)})}})}}})}}else{ae(ee().body,"htmx:processTemplate",{type:e,template:r,settleInfo:s,sourceElement:l})}r.parentNode.removeChild(r)});return t.length>0}function _e(e,n,r){var t=x(e,"[hx-swap-oob], [data-hx-swap-oob]");oe(t,function(e){if(Y.config.allowNestedOobSwaps||e.parentElement===null){const t=f(e,"hx-swap-oob");if(t!=null){Te(t,e,n,r)}}else{e.removeAttribute("hx-swap-oob");e.removeAttribute("data-hx-swap-oob")}});return t.length>0}function C(d,p,g,m){if(!m){m={}}let y=null;let n=null;let e=function(){ne(m.beforeSwapCallback);d=E(d);const r=m.contextElement&&m.contextElement.isConnected?q(m.contextElement,false):ee();const e=document.activeElement;let t={};t={elt:e,start:e?e.selectionStart:null,end:e?e.selectionEnd:null};const o=En(d);if(g.swapStyle==="textContent"){d.textContent=p}else{let n=typeof p==="string"?D(p):p;o.title=m.title||n.title;if(m.historyRequest){n=n.querySelector("[hx-history-elt],[data-hx-history-elt]")||n}if(m.selectOOB){const s=m.selectOOB.split(",");for(let t=0;t<s.length;t++){const l=s[t].split(":",2);let e=l[0].trim();if(e.indexOf("#")===0){e=e.substring(1)}const c=l[1]||"true";const u=n.querySelector("#"+e);if(u){Te(c,u,o,r)}}}_e(n,o,r);oe(x(n,"template"),function(e){if(e.content&&_e(e.content,o,r)){e.remove()}});var i=$e(n,o,m.contextElement||le(d));if(m.select){const a=ee().createDocumentFragment();oe(n.querySelectorAll(m.select),function(e){a.appendChild(e)});n=a}Re(n);if(i&&!n.childElementCount&&!n.textContent.trim()){o.elts=[le(d)]}else{Ve(g.swapStyle,m.contextElement,d,n,o)}He()}if(t.elt&&!ie(t.elt)&&Q(t.elt,"id")){const f=document.getElementById(Q(t.elt,"id"));const h={preventScroll:g.focusScroll!==undefined?!g.focusScroll:!Y.config.defaultFocusScroll};if(f){if(t.start&&f.setSelectionRange){try{f.setSelectionRange(t.start,t.end)}catch(e){}}f.focus(h)}}S(d,Y.config.swappingClass);oe(o.elts,function(e){if(e.classList){w(e,Y.config.settlingClass)}ae(e,"htmx:afterSwap",m.eventInfo)});ne(m.afterSwapCallback);if(!g.ignoreTitle){Un(o.title)}const n=function(){oe(o.tasks,function(e){e.call()});oe(o.elts,function(e){if(e.classList){S(e,Y.config.settlingClass)}ae(e,"htmx:afterSettle",m.eventInfo)});if(m.anchor){const e=le(E("#"+m.anchor));if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}Cn(o.elts,g);ne(m.afterSettleCallback);ne(y)};if(g.settleDelay>0){b().setTimeout(n,g.settleDelay)}else{n()}};let t=Y.config.globalViewTransitions;if(g.hasOwnProperty("transition")){t=g.transition}const r=m.contextElement||ee();if(t&&ae(r,"htmx:beforeTransition",m.eventInfo)&&typeof Promise!=="undefined"&&document.startViewTransition){const o=new Promise(function(e,t){y=e;n=t});const i=e;e=function(){document.startViewTransition(function(){i();return o})}}try{if(g?.swapDelay&&g.swapDelay>0){b().setTimeout(e,g.swapDelay)}else{e()}}catch(e){ue(r,"htmx:swapError",m.eventInfo);ne(n);throw e}}function ze(e,t,n){const r=e.getResponseHeader(t);if(r.indexOf("{")===0){const o=v(r)||{};for(const i of Object.keys(o)){let e=o[i];if(M(e)){n=e.target!==undefined?e.target:n}else{e={value:e}}ae(n,i,e)}}else{const s=r.split(",");for(let e=0;e<s.length;e++){ae(n,s[e].trim(),[])}}}const Je=/\s/;const Ke=/[\s,]/;const Ge=/[_$a-zA-Z]/;const We=/[_$a-zA-Z0-9]/;const Ze=['"',"'","/"];const Ye=/[^\s]/;const Qe=/[{(]/;const et=/[})]/;function tt(e){const t=[];let n=0;while(n<e.length){if(Ge.exec(e.charAt(n))){var r=n;while(We.exec(e.charAt(n+1))){n++}t.push(e.substring(r,n+1))}else if(Ze.indexOf(e.charAt(n))!==-1){const o=e.charAt(n);var r=n;n++;while(n<e.length&&e.charAt(n)!==o){if(e.charAt(n)==="\\"){n++}n++}t.push(e.substring(r,n+1))}else{const i=e.charAt(n);t.push(i)}n++}return t}function nt(e,t,n){return Ge.exec(e.charAt(0))&&e!=="true"&&e!=="false"&&e!=="this"&&e!==n&&t!=="."}function rt(r,o,i){if(o[0]==="["){o.shift();let e=1;let t=" return (function("+i+"){ return (";let n=null;while(o.length>0){const s=o[0];if(s==="]"){e--;if(e===0){if(n===null){t=t+"true"}o.shift();t+=")})";try{const l=Tn(r,function(){return Function(t)()},function(){return true});l.source=t;return l}catch(e){ue(ee().body,"htmx:syntax:error",{error:e,source:t});return null}}}else if(s==="["){e++}if(nt(s,n,i)){t+="(("+i+"."+s+") ? ("+i+"."+s+") : (window."+s+"))"}else{t=t+s}n=o.shift()}}}function O(e,t){let n="";while(e.length>0&&!t.test(e[0])){n+=e.shift()}return n}function ot(e){let t;if(e.length>0&&Qe.test(e[0])){e.shift();t=O(e,et).trim();e.shift()}else{t=O(e,Ke)}return t}const it="input, textarea, select";function st(e,t,n){const r=[];const o=tt(t);do{O(o,Ye);const l=o.length;const c=O(o,/[,\[\s]/);if(c!==""){if(c==="every"){const u={trigger:"every"};O(o,Ye);u.pollInterval=d(O(o,/[,\[\s]/));O(o,Ye);var i=rt(e,o,"event");if(i){u.eventFilter=i}r.push(u)}else{const a={trigger:c};var i=rt(e,o,"event");if(i){a.eventFilter=i}O(o,Ye);while(o.length>0&&o[0]!==","){const f=o.shift();if(f==="changed"){a.changed=true}else if(f==="once"){a.once=true}else if(f==="consume"){a.consume=true}else if(f==="delay"&&o[0]===":"){o.shift();a.delay=d(O(o,Ke))}else if(f==="from"&&o[0]===":"){o.shift();if(Qe.test(o[0])){var s=ot(o)}else{var s=O(o,Ke);if(s==="closest"||s==="find"||s==="next"||s==="previous"){o.shift();const h=ot(o);if(h.length>0){s+=" "+h}}}a.from=s}else if(f==="target"&&o[0]===":"){o.shift();a.target=ot(o)}else if(f==="throttle"&&o[0]===":"){o.shift();a.throttle=d(O(o,Ke))}else if(f==="queue"&&o[0]===":"){o.shift();a.queue=O(o,Ke)}else if(f==="root"&&o[0]===":"){o.shift();a[f]=ot(o)}else if(f==="threshold"&&o[0]===":"){o.shift();a[f]=O(o,Ke)}else{ue(e,"htmx:syntax:error",{token:o.shift()})}O(o,Ye)}r.push(a)}}if(o.length===l){ue(e,"htmx:syntax:error",{token:o.shift()})}O(o,Ye)}while(o[0]===","&&o.shift());if(n){n[t]=r}return r}function lt(e){const t=f(e,"hx-trigger");let n=[];if(t){const r=Y.config.triggerSpecsCache;n=r&&r[t]||st(e,t,r)}if(n.length>0){return n}else if(h(e,"form")){return[{trigger:"submit"}]}else if(h(e,'input[type="button"], input[type="submit"]')){return[{trigger:"click"}]}else if(h(e,it)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function ct(e){re(e).cancelled=true}function ut(e,t,n){const r=re(e);r.timeout=b().setTimeout(function(){if(ie(e)&&r.cancelled!==true){if(!gt(n,e,Ut("hx:poll:trigger",{triggerSpec:n,target:e}))){t(e)}ut(e,t,n)}},n.pollInterval)}function at(e){return location.hostname===e.hostname&&Q(e,"href")&&Q(e,"href").indexOf("#")!==0}function ft(e){return g(e,Y.config.disableSelector)}function ht(t,n,e){if(t instanceof HTMLAnchorElement&&at(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"&&String(Q(t,"method")).toLowerCase()!=="dialog"){n.boosted=true;let r,o;if(t.tagName==="A"){r="get";o=Q(t,"href")}else{const i=Q(t,"method");r=i?i.toLowerCase():"get";o=Q(t,"action");if(o==null||o===""){o=location.href}if(r==="get"&&o.includes("?")){o=o.replace(/\?[^#]+/,"")}}e.forEach(function(e){mt(t,function(e,t){const n=le(e);if(ft(n)){y(n);return}fe(r,o,n,t)},n,e,true)})}}function dt(e,t){if(e.type==="submit"&&t.tagName==="FORM"){return true}else if(e.type==="click"){const n=t.closest('input[type="submit"], button');if(n&&n.form&&n.type==="submit"){return true}const r=t.closest("a");const o=/^#.+/;if(r&&r.href&&!o.test(r.getAttribute("href"))){return true}}return false}function pt(e,t){return re(e).boosted&&e instanceof HTMLAnchorElement&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function gt(e,t,n){const r=e.eventFilter;if(r){try{return r.call(t,n)!==true}catch(e){const o=r.source;ue(ee().body,"htmx:eventFilter:error",{error:e,source:o});return true}}return false}function mt(l,c,e,u,a){const f=re(l);let t;if(u.from){t=m(l,u.from)}else{t=[l]}if(u.changed){if(!("lastValue"in f)){f.lastValue=new WeakMap}t.forEach(function(e){if(!f.lastValue.has(u)){f.lastValue.set(u,new WeakMap)}f.lastValue.get(u).set(e,e.value)})}oe(t,function(i){const s=function(e){if(!ie(l)){i.removeEventListener(u.trigger,s);return}if(pt(l,e)){return}if(a||dt(e,i)){e.preventDefault()}if(gt(u,l,e)){return}const t=re(e);t.triggerSpec=u;if(t.handledFor==null){t.handledFor=[]}if(t.handledFor.indexOf(l)<0){t.handledFor.push(l);if(u.consume){e.stopPropagation()}if(u.target&&e.target){if(!h(le(e.target),u.target)){return}}if(u.once){if(f.triggeredOnce){return}else{f.triggeredOnce=true}}if(u.changed){const n=e.target;const r=n.value;const o=f.lastValue.get(u);if(o.has(n)&&o.get(n)===r){return}o.set(n,r)}if(f.delayed){clearTimeout(f.delayed)}if(f.throttle){return}if(u.throttle>0){if(!f.throttle){ae(l,"htmx:trigger");c(l,e);f.throttle=b().setTimeout(function(){f.throttle=null},u.throttle)}}else if(u.delay>0){f.delayed=b().setTimeout(function(){ae(l,"htmx:trigger");c(l,e)},u.delay)}else{ae(l,"htmx:trigger");c(l,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:u.trigger,listener:s,on:i});i.addEventListener(u.trigger,s)})}let yt=false;let xt=null;function bt(){if(!xt){xt=function(){yt=true};window.addEventListener("scroll",xt);window.addEventListener("resize",xt);setInterval(function(){if(yt){yt=false;oe(ee().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(e){vt(e)})}},200)}}function vt(e){if(!s(e,"data-hx-revealed")&&B(e)){e.setAttribute("data-hx-revealed","true");const t=re(e);if(t.initHash){ae(e,"revealed")}else{e.addEventListener("htmx:afterProcessNode",function(){ae(e,"revealed")},{once:true})}}}function wt(e,t,n,r){const o=function(){if(!n.loaded){n.loaded=true;ae(e,"htmx:trigger");t(e)}};if(r>0){b().setTimeout(o,r)}else{o()}}function St(t,n,e){let i=false;oe(he,function(r){if(s(t,"hx-"+r)){const o=f(t,"hx-"+r);i=true;n.path=o;n.verb=r;e.forEach(function(e){Et(t,e,n,function(e,t){const n=le(e);if(ft(n)){y(n);return}fe(r,o,n,t)})})}});return i}function Et(r,e,t,n){if(e.trigger==="revealed"){bt();mt(r,n,t,e);vt(le(r))}else if(e.trigger==="intersect"){const o={};if(e.root){o.root=ce(r,e.root)}if(e.threshold){o.threshold=parseFloat(e.threshold)}const i=new IntersectionObserver(function(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.isIntersecting){ae(r,"intersect");break}}},o);i.observe(le(r));mt(le(r),n,t,e)}else if(!t.firstInitCompleted&&e.trigger==="load"){if(!gt(e,r,Ut("load",{elt:r}))){wt(le(r),n,t,e.delay)}}else if(e.pollInterval>0){t.polling=true;ut(le(r),n,e)}else{mt(r,n,t,e)}}function Ct(e){const t=le(e);if(!t){return false}const n=t.attributes;for(let e=0;e<n.length;e++){const r=n[e].name;if(l(r,"hx-on:")||l(r,"data-hx-on:")||l(r,"hx-on-")||l(r,"data-hx-on-")){return true}}return false}const Ot=(new XPathEvaluator).createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or'+' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]');function Tt(e,t){if(Ct(e)){t.push(le(e))}const n=Ot.evaluate(e);let r=null;while(r=n.iterateNext())t.push(le(r))}function Ht(e){const t=[];if(e instanceof DocumentFragment){for(const n of e.childNodes){Tt(n,t)}}else{Tt(e,t)}return t}function Rt(e){if(e.querySelectorAll){const n=", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]";const r=[];for(const i of Object.keys($n)){const s=$n[i];if(s.getSelectors){var t=s.getSelectors();if(t){r.push(t)}}}const o=e.querySelectorAll(R+n+", form, [type='submit'],"+" [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]"+r.flat().map(e=>", "+e).join(""));return o}else{return[]}}function qt(e){const t=Nt(e.target);const n=Lt(e);if(n){n.lastButtonClicked=t}}function At(e){const t=Lt(e);if(t){t.lastButtonClicked=null}}function Nt(e){return g(le(e),"button, input[type='submit']")}function It(e){return e.form||g(e,"form")}function Lt(e){const t=Nt(e.target);if(!t){return}const n=It(t);if(!n){return}return re(n)}function kt(e){e.addEventListener("click",qt);e.addEventListener("focusin",qt);e.addEventListener("focusout",At)}function Dt(t,e,n){const r=re(t);if(!Array.isArray(r.onHandlers)){r.onHandlers=[]}let o;const i=function(e){Tn(t,function(){if(ft(t)){return}if(!o){o=new Function("event",n)}o.call(t,e)})};t.addEventListener(e,i);r.onHandlers.push({event:e,listener:i})}function Pt(t){ke(t);for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;const r=t.attributes[e].value;if(l(n,"hx-on")||l(n,"data-hx-on")){const o=n.indexOf("-on")+3;const i=n.slice(o,o+1);if(i==="-"||i===":"){let e=n.slice(o+1);if(l(e,":")){e="htmx"+e}else if(l(e,"-")){e="htmx:"+e.slice(1)}else if(l(e,"htmx-")){e="htmx:"+e.slice(5)}Dt(t,e,r)}}}}function Mt(t){ae(t,"htmx:beforeProcessNode");const n=re(t);const e=lt(t);const r=St(t,n,e);if(!r){if(te(t,"hx-boost")==="true"){ht(t,n,e)}else if(s(t,"hx-trigger")){e.forEach(function(e){Et(t,e,n,function(){})})}}if(t.tagName==="FORM"||Q(t,"type")==="submit"&&s(t,"form")){kt(t)}n.firstInitCompleted=true;ae(t,"htmx:afterProcessNode")}function Ft(e){if(!(e instanceof Element)){return false}const t=re(e);const n=Le(e);if(t.initHash!==n){De(e);t.initHash=n;return true}return false}function Bt(e){e=E(e);if(ft(e)){y(e);return}const t=[];if(Ft(e)){t.push(e)}oe(Rt(e),function(e){if(ft(e)){y(e);return}if(Ft(e)){t.push(e)}});oe(Ht(e),Pt);oe(t,Mt)}function Xt(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Ut(e,t){return new CustomEvent(e,{bubbles:true,cancelable:true,composed:true,detail:t})}function ue(e,t,n){ae(e,t,se({error:t},n))}function jt(e){return e==="htmx:afterProcessNode"}function Vt(e,t,n){oe(Kn(e,[],n),function(e){try{t(e)}catch(e){T(e)}})}function T(e){console.error(e)}function ae(e,t,n){e=E(e);if(n==null){n={}}n.elt=e;const r=Ut(t,n);if(Y.logger&&!jt(t)){Y.logger(e,t,n)}if(n.error){T(n.error+(n.target?", "+n.target:""));ae(e,"htmx:error",{errorInfo:n})}let o=e.dispatchEvent(r);const i=Xt(t);if(o&&i!==t){const s=Ut(i,r.detail);o=o&&e.dispatchEvent(s)}Vt(le(e),function(e){o=o&&(e.onEvent(t,r)!==false&&!r.defaultPrevented)});return o}let $t;function _t(e){$t=e;if(U()){sessionStorage.setItem("htmx-current-path-for-history",e)}}_t(location.pathname+location.search);function zt(){const e=ee().querySelector("[hx-history-elt],[data-hx-history-elt]");return e||ee().body}function Jt(t,e){if(!U()){return}const n=Gt(e);const r=ee().title;const o=window.scrollY;if(Y.config.historyCacheSize<=0){sessionStorage.removeItem("htmx-history-cache");return}t=j(t);const i=v(sessionStorage.getItem("htmx-history-cache"))||[];for(let e=0;e<i.length;e++){if(i[e].url===t){i.splice(e,1);break}}const s={url:t,content:n,title:r,scroll:o};ae(ee().body,"htmx:historyItemCreated",{item:s,cache:i});i.push(s);while(i.length>Y.config.historyCacheSize){i.shift()}while(i.length>0){try{sessionStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){ue(ee().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function Kt(t){if(!U()){return null}t=j(t);const n=v(sessionStorage.getItem("htmx-history-cache"))||[];for(let e=0;e<n.length;e++){if(n[e].url===t){return n[e]}}return null}function Gt(e){const t=Y.config.requestClass;const n=e.cloneNode(true);oe(x(n,"."+t),function(e){S(e,t)});oe(x(n,"[data-disabled-by-htmx]"),function(e){e.removeAttribute("disabled")});return n.innerHTML}function Wt(){const e=zt();let t=$t;if(U()){t=sessionStorage.getItem("htmx-current-path-for-history")}t=t||location.pathname+location.search;const n=ee().querySelector('[hx-history="false" i],[data-hx-history="false" i]');if(!n){ae(ee().body,"htmx:beforeHistorySave",{path:t,historyElt:e});Jt(t,e)}if(Y.config.historyEnabled)history.replaceState({htmx:true},ee().title,location.href)}function Zt(e){if(Y.config.getCacheBusterParam){e=e.replace(/org\.htmx\.cache-buster=[^&]*&?/,"");if(Z(e,"&")||Z(e,"?")){e=e.slice(0,-1)}}if(Y.config.historyEnabled){history.pushState({htmx:true},"",e)}_t(e)}function Yt(e){if(Y.config.historyEnabled)history.replaceState({htmx:true},"",e);_t(e)}function Qt(e){oe(e,function(e){e.call(undefined)})}function en(e){const t=new XMLHttpRequest;const n={swapStyle:"innerHTML",swapDelay:0,settleDelay:0};const r={path:e,xhr:t,historyElt:zt(),swapSpec:n};t.open("GET",e,true);if(Y.config.historyRestoreAsHxRequest){t.setRequestHeader("HX-Request","true")}t.setRequestHeader("HX-History-Restore-Request","true");t.setRequestHeader("HX-Current-URL",location.href);t.onload=function(){if(this.status>=200&&this.status<400){r.response=this.response;ae(ee().body,"htmx:historyCacheMissLoad",r);C(r.historyElt,r.response,n,{contextElement:r.historyElt,historyRequest:true});_t(r.path);ae(ee().body,"htmx:historyRestore",{path:e,cacheMiss:true,serverResponse:r.response})}else{ue(ee().body,"htmx:historyCacheMissLoadError",r)}};if(ae(ee().body,"htmx:historyCacheMiss",r)){t.send()}}function tn(e){Wt();e=e||location.pathname+location.search;const t=Kt(e);if(t){const n={swapStyle:"innerHTML",swapDelay:0,settleDelay:0,scroll:t.scroll};const r={path:e,item:t,historyElt:zt(),swapSpec:n};if(ae(ee().body,"htmx:historyCacheHit",r)){C(r.historyElt,t.content,n,{contextElement:r.historyElt,title:t.title});_t(r.path);ae(ee().body,"htmx:historyRestore",r)}}else{if(Y.config.refreshOnHistoryMiss){Y.location.reload(true)}else{en(e)}}}function nn(e){let t=ve(e,"hx-indicator");if(t==null){t=[e]}oe(t,function(e){const t=re(e);t.requestCount=(t.requestCount||0)+1;w(e,Y.config.requestClass)});return t}function rn(e){let t=ve(e,"hx-disabled-elt");if(t==null){t=[]}oe(t,function(e){const t=re(e);t.requestCount=(t.requestCount||0)+1;if(!e.hasAttribute("disabled")){e.setAttribute("disabled","");e.setAttribute("data-disabled-by-htmx","")}});return t}function on(e,t){oe(e.concat(t),function(e){const t=re(e);t.requestCount=(t.requestCount||1)-1});oe(e,function(e){const t=re(e);if(t.requestCount===0){S(e,Y.config.requestClass)}});oe(t,function(e){const t=re(e);if(t.requestCount===0&&e.hasAttribute("data-disabled-by-htmx")){e.removeAttribute("disabled");e.removeAttribute("data-disabled-by-htmx")}})}function sn(t,n){for(let e=0;e<t.length;e++){const r=t[e];if(r.isSameNode(n)){return true}}return false}function ln(e){const t=e;if(t.name===""||t.name==null||t.disabled||g(t,"fieldset[disabled]")){return false}if(t.type==="button"||t.type==="submit"||t.tagName==="image"||t.tagName==="reset"||t.tagName==="file"){return false}if(t.type==="checkbox"||t.type==="radio"){return t.checked}return true}function cn(t,e,n){if(t!=null&&e!=null){if(Array.isArray(e)){e.forEach(function(e){n.append(t,e)})}else{n.append(t,e)}}}function un(t,n,r){if(t!=null&&n!=null){let e=r.getAll(t);if(Array.isArray(n)){e=e.filter(e=>n.indexOf(e)<0)}else{e=e.filter(e=>e!==n)}r.delete(t);oe(e,e=>r.append(t,e))}}function an(e){if(e instanceof HTMLSelectElement&&e.multiple){return F(e.querySelectorAll("option:checked")).map(function(e){return e.value})}if(e instanceof HTMLInputElement&&e.files){return F(e.files)}return e.value}function fn(t,n,r,e,o){if(e==null||sn(t,e)){return}else{t.push(e)}if(ln(e)){const i=Q(e,"name");cn(i,an(e),n);if(o){hn(e,r)}}if(e instanceof HTMLFormElement){oe(e.elements,function(e){if(t.indexOf(e)>=0){un(e.name,an(e),n)}else{t.push(e)}if(o){hn(e,r)}});new FormData(e).forEach(function(e,t){if(e instanceof File&&e.name===""){return}cn(t,e,n)})}}function hn(e,t){const n=e;if(n.willValidate){ae(n,"htmx:validation:validate");if(!n.checkValidity()){if(ae(n,"htmx:validation:failed",{message:n.validationMessage,validity:n.validity})&&!t.length&&Y.config.reportValidityOfForms){n.reportValidity()}t.push({elt:n,message:n.validationMessage,validity:n.validity})}}}function dn(n,e){for(const t of e.keys()){n.delete(t)}e.forEach(function(e,t){n.append(t,e)});return n}function pn(e,t){const n=[];const r=new FormData;const o=new FormData;const i=[];const s=re(e);if(s.lastButtonClicked&&!ie(s.lastButtonClicked)){s.lastButtonClicked=null}let l=e instanceof HTMLFormElement&&e.noValidate!==true||f(e,"hx-validate")==="true";if(s.lastButtonClicked){l=l&&s.lastButtonClicked.formNoValidate!==true}if(t!=="get"){fn(n,o,i,It(e),l)}fn(n,r,i,e,l);if(s.lastButtonClicked||e.tagName==="BUTTON"||e.tagName==="INPUT"&&Q(e,"type")==="submit"){const u=s.lastButtonClicked||e;const a=Q(u,"name");cn(a,u.value,o)}const c=ve(e,"hx-include");oe(c,function(e){fn(n,r,i,le(e),l);if(!h(e,"form")){oe(p(e).querySelectorAll(it),function(e){fn(n,r,i,e,l)})}});dn(r,o);return{errors:i,formData:r,values:Mn(r)}}function gn(e,t,n){if(e!==""){e+="&"}if(String(n)==="[object Object]"){n=JSON.stringify(n)}const r=encodeURIComponent(n);e+=encodeURIComponent(t)+"="+r;return e}function mn(e){e=Dn(e);let n="";e.forEach(function(e,t){n=gn(n,t,e)});return n}function yn(e,t,n){const r={"HX-Request":"true","HX-Trigger":Q(e,"id"),"HX-Trigger-Name":Q(e,"name"),"HX-Target":f(t,"id"),"HX-Current-URL":location.href};On(e,"hx-headers",false,r);if(n!==undefined){r["HX-Prompt"]=n}if(re(e).boosted){r["HX-Boosted"]="true"}return r}function xn(n,e){const t=te(e,"hx-params");if(t){if(t==="none"){return new FormData}else if(t==="*"){return n}else if(t.indexOf("not ")===0){oe(t.slice(4).split(","),function(e){e=e.trim();n.delete(e)});return n}else{const r=new FormData;oe(t.split(","),function(t){t=t.trim();if(n.has(t)){n.getAll(t).forEach(function(e){r.append(t,e)})}});return r}}else{return n}}function bn(e){return!!Q(e,"href")&&Q(e,"href").indexOf("#")>=0}function vn(e,t){const n=t||te(e,"hx-swap");const r={swapStyle:re(e).boosted?"innerHTML":Y.config.defaultSwapStyle,swapDelay:Y.config.defaultSwapDelay,settleDelay:Y.config.defaultSettleDelay};if(Y.config.scrollIntoViewOnBoost&&re(e).boosted&&!bn(e)){r.show="top"}if(n){const s=X(n);if(s.length>0){for(let e=0;e<s.length;e++){const l=s[e];if(l.indexOf("swap:")===0){r.swapDelay=d(l.slice(5))}else if(l.indexOf("settle:")===0){r.settleDelay=d(l.slice(7))}else if(l.indexOf("transition:")===0){r.transition=l.slice(11)==="true"}else if(l.indexOf("ignoreTitle:")===0){r.ignoreTitle=l.slice(12)==="true"}else if(l.indexOf("scroll:")===0){const c=l.slice(7);var o=c.split(":");const u=o.pop();var i=o.length>0?o.join(":"):null;r.scroll=u;r.scrollTarget=i}else if(l.indexOf("show:")===0){const a=l.slice(5);var o=a.split(":");const f=o.pop();var i=o.length>0?o.join(":"):null;r.show=f;r.showTarget=i}else if(l.indexOf("focus-scroll:")===0){const h=l.slice("focus-scroll:".length);r.focusScroll=h=="true"}else if(e==0){r.swapStyle=l}else{T("Unknown modifier in hx-swap: "+l)}}}}return r}function wn(e){return te(e,"hx-encoding")==="multipart/form-data"||h(e,"form")&&Q(e,"enctype")==="multipart/form-data"}function Sn(t,n,r){let o=null;Vt(n,function(e){if(o==null){o=e.encodeParameters(t,r,n)}});if(o!=null){return o}else{if(wn(n)){return dn(new FormData,Dn(r))}else{return mn(r)}}}function En(e){return{tasks:[],elts:[e]}}function Cn(e,t){const n=e[0];const r=e[e.length-1];if(t.scroll){var o=null;if(t.scrollTarget){o=le(ce(n,t.scrollTarget))}if(t.scroll==="top"&&(n||o)){o=o||n;o.scrollTop=0}if(t.scroll==="bottom"&&(r||o)){o=o||r;o.scrollTop=o.scrollHeight}if(typeof t.scroll==="number"){b().setTimeout(function(){window.scrollTo(0,t.scroll)},0)}}if(t.show){var o=null;if(t.showTarget){let e=t.showTarget;if(t.showTarget==="window"){e="body"}o=le(ce(n,e))}if(t.show==="top"&&(n||o)){o=o||n;o.scrollIntoView({block:"start",behavior:Y.config.scrollBehavior})}if(t.show==="bottom"&&(r||o)){o=o||r;o.scrollIntoView({block:"end",behavior:Y.config.scrollBehavior})}}}function On(r,e,o,i,s){if(i==null){i={}}if(r==null){return i}const l=f(r,e);if(l){let e=l.trim();let t=o;if(e==="unset"){return null}if(e.indexOf("javascript:")===0){e=e.slice(11);t=true}else if(e.indexOf("js:")===0){e=e.slice(3);t=true}if(e.indexOf("{")!==0){e="{"+e+"}"}let n;if(t){n=Tn(r,function(){if(s){return Function("event","return ("+e+")").call(r,s)}else{return Function("return ("+e+")").call(r)}},{})}else{n=v(e)}for(const c of Object.keys(n)){if(i[c]==null){i[c]=n[c]}}}return On(le(u(r)),e,o,i,s)}function Tn(e,t,n){if(Y.config.allowEval){return t()}else{ue(e,"htmx:evalDisallowedError");return n}}function Hn(e,t,n){return On(e,"hx-vars",true,n,t)}function Rn(e,t,n){return On(e,"hx-vals",false,n,t)}function qn(e,t){return se(Hn(e,t),Rn(e,t))}function An(t,n,r){if(r!==null){try{t.setRequestHeader(n,r)}catch(e){t.setRequestHeader(n,encodeURIComponent(r));t.setRequestHeader(n+"-URI-AutoEncoded","true")}}}function Nn(t){if(t.responseURL){try{const e=new URL(t.responseURL);return e.pathname+e.search}catch(e){ue(ee().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function H(e,t){return e.getResponseHeader(t)!==null}function In(t,n,r){t=t.toLowerCase();if(r){if(r instanceof Element||typeof r==="string"){return fe(t,n,null,null,{targetOverride:E(r)||be,returnPromise:true})}else{let e=E(r.target);if(r.target&&!e||r.source&&!e&&!E(r.source)){e=be}return fe(t,n,E(r.source),r.event,{handler:r.handler,headers:r.headers,values:r.values,targetOverride:e,swapOverride:r.swap,select:r.select,returnPromise:true,push:r.push,replace:r.replace,selectOOB:r.selectOOB})}}else{return fe(t,n,null,null,{returnPromise:true})}}function Ln(e){const t=[];while(e){t.push(e);e=e.parentElement}return t}function kn(e,t,n){const r=new URL(t,location.protocol!=="about:"?location.href:window.origin);const o=location.protocol!=="about:"?location.origin:window.origin;const i=o===r.origin;if(Y.config.selfRequestsOnly){if(!i){return false}}return ae(e,"htmx:validateUrl",se({url:r,sameHost:i},n))}function Dn(e){if(e instanceof FormData)return e;const t=new FormData;for(const n of Object.keys(e)){if(e[n]&&typeof e[n].forEach==="function"){e[n].forEach(function(e){t.append(n,e)})}else if(typeof e[n]==="object"&&!(e[n]instanceof Blob)){t.append(n,JSON.stringify(e[n]))}else{t.append(n,e[n])}}return t}function Pn(r,o,e){return new Proxy(e,{get:function(t,e){if(typeof e==="number")return t[e];if(e==="length")return t.length;if(e==="push"){return function(e){t.push(e);r.append(o,e)}}if(typeof t[e]==="function"){return function(){t[e].apply(t,arguments);r.delete(o);t.forEach(function(e){r.append(o,e)})}}if(t[e]&&t[e].length===1){return t[e][0]}else{return t[e]}},set:function(e,t,n){e[t]=n;r.delete(o);e.forEach(function(e){r.append(o,e)});return true}})}function Mn(o){return new Proxy(o,{get:function(e,t){if(typeof t==="symbol"){const r=Reflect.get(e,t);if(typeof r==="function"){return function(){return r.apply(o,arguments)}}else{return r}}if(t==="toJSON"){return()=>Object.fromEntries(o)}if(t in e){if(typeof e[t]==="function"){return function(){return o[t].apply(o,arguments)}}}const n=o.getAll(t);if(n.length===0){return undefined}else if(n.length===1){return n[0]}else{return Pn(e,t,n)}},set:function(t,n,e){if(typeof n!=="string"){return false}t.delete(n);if(e&&typeof e.forEach==="function"){e.forEach(function(e){t.append(n,e)})}else if(typeof e==="object"&&!(e instanceof Blob)){t.append(n,JSON.stringify(e))}else{t.append(n,e)}return true},deleteProperty:function(e,t){if(typeof t==="string"){e.delete(t)}return true},ownKeys:function(e){return Reflect.ownKeys(Object.fromEntries(e))},getOwnPropertyDescriptor:function(e,t){return Reflect.getOwnPropertyDescriptor(Object.fromEntries(e),t)}})}function fe(t,n,r,o,i,P){let s=null;let l=null;i=i!=null?i:{};if(i.returnPromise&&typeof Promise!=="undefined"){var e=new Promise(function(e,t){s=e;l=t})}if(r==null){r=ee().body}const M=i.handler||Vn;const F=i.select||null;if(!ie(r)){ne(s);return e}const c=i.targetOverride||le(Se(r));if(c==null||c==be){ue(r,"htmx:targetError",{target:te(r,"hx-target")});ne(l);return e}let u=re(r);const a=u.lastButtonClicked;if(a){const A=Q(a,"formaction");if(A!=null){n=A}const N=Q(a,"formmethod");if(N!=null){if(he.includes(N.toLowerCase())){t=N}else{ne(s);return e}}}const f=te(r,"hx-confirm");if(P===undefined){const K=function(e){return fe(t,n,r,o,i,!!e)};const G={target:c,elt:r,path:n,verb:t,triggeringEvent:o,etc:i,issueRequest:K,question:f};if(ae(r,"htmx:confirm",G)===false){ne(s);return e}}let h=r;let d=te(r,"hx-sync");let p=null;let B=false;if(d){const I=d.split(":");const L=I[0].trim();if(L==="this"){h=we(r,"hx-sync")}else{h=le(ce(r,L))}d=(I[1]||"drop").trim();u=re(h);if(d==="drop"&&u.xhr&&u.abortable!==true){ne(s);return e}else if(d==="abort"){if(u.xhr){ne(s);return e}else{B=true}}else if(d==="replace"){ae(h,"htmx:abort")}else if(d.indexOf("queue")===0){const W=d.split(" ");p=(W[1]||"last").trim()}}if(u.xhr){if(u.abortable){ae(h,"htmx:abort")}else{if(p==null){if(o){const k=re(o);if(k&&k.triggerSpec&&k.triggerSpec.queue){p=k.triggerSpec.queue}}if(p==null){p="last"}}if(u.queuedRequests==null){u.queuedRequests=[]}if(p==="first"&&u.queuedRequests.length===0){u.queuedRequests.push(function(){fe(t,n,r,o,i)})}else if(p==="all"){u.queuedRequests.push(function(){fe(t,n,r,o,i)})}else if(p==="last"){u.queuedRequests=[];u.queuedRequests.push(function(){fe(t,n,r,o,i)})}ne(s);return e}}const g=new XMLHttpRequest;u.xhr=g;u.abortable=B;const m=function(){u.xhr=null;u.abortable=false;if(u.queuedRequests!=null&&u.queuedRequests.length>0){const e=u.queuedRequests.shift();e()}};const X=te(r,"hx-prompt");if(X){var y=prompt(X);if(y===null||!ae(r,"htmx:prompt",{prompt:y,target:c})){ne(s);m();return e}}if(f&&!P){if(!confirm(f)){ne(s);m();return e}}let x=yn(r,c,y);if(t!=="get"&&!wn(r)){x["Content-Type"]="application/x-www-form-urlencoded"}if(i.headers){x=se(x,i.headers)}const U=pn(r,t);let b=U.errors;const j=U.formData;if(i.values){dn(j,Dn(i.values))}const V=Dn(qn(r,o));const v=dn(j,V);let w=xn(v,r);if(Y.config.getCacheBusterParam&&t==="get"){w.set("org.htmx.cache-buster",Q(c,"id")||"true")}if(n==null||n===""){n=location.href}const S=On(r,"hx-request");const $=re(r).boosted;let E=Y.config.methodsThatUseUrlParams.indexOf(t)>=0;const C={boosted:$,useUrlParams:E,formData:w,parameters:Mn(w),unfilteredFormData:v,unfilteredParameters:Mn(v),headers:x,elt:r,target:c,verb:t,errors:b,withCredentials:i.credentials||S.credentials||Y.config.withCredentials,timeout:i.timeout||S.timeout||Y.config.timeout,path:n,triggeringEvent:o};if(!ae(r,"htmx:configRequest",C)){ne(s);m();return e}n=C.path;t=C.verb;x=C.headers;w=Dn(C.parameters);b=C.errors;E=C.useUrlParams;if(b&&b.length>0){ae(r,"htmx:validation:halted",C);ne(s);m();return e}const _=n.split("#");const z=_[0];const O=_[1];let T=n;if(E){T=z;const Z=!w.keys().next().done;if(Z){if(T.indexOf("?")<0){T+="?"}else{T+="&"}T+=mn(w);if(O){T+="#"+O}}}if(!kn(r,T,C)){ue(r,"htmx:invalidPath",C);ne(l);m();return e}g.open(t.toUpperCase(),T,true);g.overrideMimeType("text/html");g.withCredentials=C.withCredentials;g.timeout=C.timeout;if(S.noHeaders){}else{for(const D of Object.keys(x)){An(g,D,x[D])}}const H={xhr:g,target:c,requestConfig:C,etc:i,boosted:$,select:F,pathInfo:{requestPath:n,finalRequestPath:T,responsePath:null,anchor:O}};g.onload=function(){try{const t=Ln(r);H.pathInfo.responsePath=Nn(g);M(r,H);if(H.keepIndicators!==true){on(R,q)}ae(r,"htmx:afterRequest",H);ae(r,"htmx:afterOnLoad",H);if(!ie(r)){let e=null;while(t.length>0&&e==null){const n=t.shift();if(ie(n)){e=n}}if(e){ae(e,"htmx:afterRequest",H);ae(e,"htmx:afterOnLoad",H)}}ne(s)}catch(e){ue(r,"htmx:onLoadError",se({error:e},H));throw e}finally{m()}};g.onerror=function(){on(R,q);ue(r,"htmx:afterRequest",H);ue(r,"htmx:sendError",H);ne(l);m()};g.onabort=function(){on(R,q);ue(r,"htmx:afterRequest",H);ue(r,"htmx:sendAbort",H);ne(l);m()};g.ontimeout=function(){on(R,q);ue(r,"htmx:afterRequest",H);ue(r,"htmx:timeout",H);ne(l);m()};if(!ae(r,"htmx:beforeRequest",H)){ne(s);m();return e}var R=nn(r);var q=rn(r);oe(["loadstart","loadend","progress","abort"],function(t){oe([g,g.upload],function(e){e.addEventListener(t,function(e){ae(r,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})})})});ae(r,"htmx:beforeSend",H);const J=E?null:Sn(g,r,w);g.send(J);return e}function Fn(e,t){const n=t.xhr;let r=null;let o=null;if(H(n,"HX-Push")){r=n.getResponseHeader("HX-Push");o="push"}else if(H(n,"HX-Push-Url")){r=n.getResponseHeader("HX-Push-Url");o="push"}else if(H(n,"HX-Replace-Url")){r=n.getResponseHeader("HX-Replace-Url");o="replace"}if(r){if(r==="false"){return{}}else{return{type:o,path:r}}}const i=t.pathInfo.finalRequestPath;const s=t.pathInfo.responsePath;const l=t.etc.push||te(e,"hx-push-url");let c=t.etc.replace||te(e,"hx-replace-url");if(c==="false")c=null;const u=re(e).boosted;let a=null;let f=null;if(l){a="push";f=l}else if(c){a="replace";f=c}else if(u){a="push";f=s||i}if(f){if(f==="false"){return{}}if(f==="true"){f=s||i}if(t.pathInfo.anchor&&f.indexOf("#")===-1){f=f+"#"+t.pathInfo.anchor}return{type:a,path:f}}else{return{}}}function Bn(e,t){var n=new RegExp(e.code);return n.test(t.toString(10))}function Xn(e){for(var t=0;t<Y.config.responseHandling.length;t++){var n=Y.config.responseHandling[t];if(Bn(n,e.status)){return n}}return{swap:false}}function Un(e){if(e){const t=a("title");if(t){t.textContent=e}else{window.document.title=e}}}function jn(e,t){if(t==="this"){return e}const n=le(ce(e,t));if(n==null){ue(e,"htmx:targetError",{target:t});throw new Error(`Invalid re-target ${t}`)}return n}function Vn(t,e){const n=e.xhr;let r=e.target;const o=e.etc;const i=e.select;if(!ae(t,"htmx:beforeOnLoad",e))return;if(H(n,"HX-Trigger")){ze(n,"HX-Trigger",t)}if(H(n,"HX-Location")){let e=n.getResponseHeader("HX-Location");var s={};if(e.indexOf("{")===0){s=v(e);e=s.path;delete s.path}s.push=s.push??"true";In("get",e,s);return}const l=H(n,"HX-Refresh")&&n.getResponseHeader("HX-Refresh")==="true";if(H(n,"HX-Redirect")){e.keepIndicators=true;Y.location.href=n.getResponseHeader("HX-Redirect");l&&Y.location.reload();return}if(l){e.keepIndicators=true;Y.location.reload();return}const c=Fn(t,e);const u=Xn(n);const a=u.swap;let f=!!u.error;let h=Y.config.ignoreTitle||u.ignoreTitle;let d=u.select;if(u.target){e.target=jn(t,u.target)}var p=o.swapOverride;if(p==null&&u.swapOverride){p=u.swapOverride}if(H(n,"HX-Retarget")){e.target=jn(t,n.getResponseHeader("HX-Retarget"))}if(H(n,"HX-Reswap")){p=n.getResponseHeader("HX-Reswap")}var g=n.response;var m=se({shouldSwap:a,serverResponse:g,isError:f,ignoreTitle:h,selectOverride:d,swapOverride:p},e);if(u.event&&!ae(r,u.event,m))return;if(!ae(r,"htmx:beforeSwap",m))return;r=m.target;g=m.serverResponse;f=m.isError;h=m.ignoreTitle;d=m.selectOverride;p=m.swapOverride;e.target=r;e.failed=f;e.successful=!f;if(m.shouldSwap){if(n.status===286){ct(t)}Vt(t,function(e){g=e.transformResponse(g,n,t)});if(c.type){Wt()}var y=vn(t,p);if(!y.hasOwnProperty("ignoreTitle")){y.ignoreTitle=h}w(r,Y.config.swappingClass);if(i){d=i}if(H(n,"HX-Reselect")){d=n.getResponseHeader("HX-Reselect")}const x=o.selectOOB||te(t,"hx-select-oob");const b=te(t,"hx-select");C(r,g,y,{select:d==="unset"?null:d||b,selectOOB:x,eventInfo:e,anchor:e.pathInfo.anchor,contextElement:t,afterSwapCallback:function(){if(H(n,"HX-Trigger-After-Swap")){let e=t;if(!ie(t)){e=ee().body}ze(n,"HX-Trigger-After-Swap",e)}},afterSettleCallback:function(){if(H(n,"HX-Trigger-After-Settle")){let e=t;if(!ie(t)){e=ee().body}ze(n,"HX-Trigger-After-Settle",e)}},beforeSwapCallback:function(){if(c.type){ae(ee().body,"htmx:beforeHistoryUpdate",se({history:c},e));if(c.type==="push"){Zt(c.path);ae(ee().body,"htmx:pushedIntoHistory",{path:c.path})}else{Yt(c.path);ae(ee().body,"htmx:replacedInHistory",{path:c.path})}}}})}if(f){ue(t,"htmx:responseError",se({error:"Response Status Error Code "+n.status+" from "+e.pathInfo.requestPath},e))}}const $n={};function _n(){return{init:function(e){return null},getSelectors:function(){return null},onEvent:function(e,t){return true},transformResponse:function(e,t,n){return e},isInlineSwap:function(e){return false},handleSwap:function(e,t,n,r){return false},encodeParameters:function(e,t,n){return null}}}function zn(e,t){if(t.init){t.init(n)}$n[e]=se(_n(),t)}function Jn(e){delete $n[e]}function Kn(e,n,r){if(n==undefined){n=[]}if(e==undefined){return n}if(r==undefined){r=[]}const t=f(e,"hx-ext");if(t){oe(t.split(","),function(e){e=e.replace(/ /g,"");if(e.slice(0,7)=="ignore:"){r.push(e.slice(7));return}if(r.indexOf(e)<0){const t=$n[e];if(t&&n.indexOf(t)<0){n.push(t)}}})}return Kn(le(u(e)),n,r)}var Gn=false;ee().addEventListener("DOMContentLoaded",function(){Gn=true});function Wn(e){if(Gn||ee().readyState==="complete"){e()}else{ee().addEventListener("DOMContentLoaded",e)}}function Zn(){if(Y.config.includeIndicatorStyles!==false){const e=Y.config.inlineStyleNonce?` nonce="${Y.config.inlineStyleNonce}"`:"";const t=Y.config.indicatorClass;const n=Y.config.requestClass;ee().head.insertAdjacentHTML("beforeend",`<style${e}>`+`.${t}{opacity:0;visibility: hidden} `+`.${n} .${t}, .${n}.${t}{opacity:1;visibility: visible;transition: opacity 200ms ease-in}`+"</style>")}}function Yn(){const e=ee().querySelector('meta[name="htmx-config"]');if(e){return v(e.content)}else{return null}}function Qn(){const e=Yn();if(e){Y.config=se(Y.config,e)}}Wn(function(){Qn();Zn();let e=ee().body;Bt(e);const t=ee().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){const t=e.detail.elt||e.target;const n=re(t);if(n&&n.xhr){n.xhr.abort()}});const n=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(e){if(e.state&&e.state.htmx){tn();oe(t,function(e){ae(e,"htmx:restored",{document:ee(),triggerEvent:ae})})}else{if(n){n(e)}}};b().setTimeout(function(){ae(e,"htmx:load",{});e=null},0)});return Y}();
@@ -1,4 +1,4 @@
1
- import { availableDatabaseEngines, availableDatabaseHosts, availableDrizzleDialects, availablePrismaDialects, frontendLabels } from './data';
1
+ import { availableDatabaseEngines, availableDatabaseHosts, availableDrizzleDialects, availableORMs, availablePrismaDialects, frontendLabels } from './data';
2
2
  export const isCodeQualityTool = (value) => value === 'eslint+prettier' || value === 'biome' || value === undefined;
3
3
  export const isDatabaseEngine = (value) => availableDatabaseEngines.some((engine) => engine === value);
4
4
  export const isDatabaseHost = (value) => availableDatabaseHosts.some((host) => host === value);
@@ -6,6 +6,6 @@ export const isDirectoryConfig = (value) => value === 'default' || value === 'cu
6
6
  export const isDrizzleDialect = (value) => availableDrizzleDialects.some((dialect) => dialect === value);
7
7
  export const isFrontend = (value) => value !== undefined && Object.keys(frontendLabels).includes(value);
8
8
  export const isGithubLinkOption = (value) => value === 'existing' || value === 'create' || value === 'skip';
9
- export const isORM = (value) => value === 'drizzle' || value === 'prisma' || value === undefined;
9
+ export const isORM = (value) => value === undefined || availableORMs.some((orm) => orm === value);
10
10
  export const isPrismaDialect = (value) => availablePrismaDialects.some((dialect) => dialect === value);
11
11
  export const isValidAuthOption = (value) => value === 'abs' || value === 'none' || value === undefined;
@@ -1 +1 @@
1
- export declare function abort(): never;
1
+ export declare const abort: () => never;
@@ -1,8 +1,6 @@
1
1
  import { exit } from 'process';
2
2
  import { cancel } from '@clack/prompts';
3
- /* eslint-disable */
4
- export function abort() {
3
+ export const abort = () => {
5
4
  cancel('Operation cancelled');
6
5
  exit(0);
7
- }
8
- /* eslint-enable */
6
+ };
@@ -1,10 +1,15 @@
1
- const h2IfHttps = (url) => url.startsWith('https://') ? { protocol: 'http2' } : {};
1
+ import { registryChannel } from './registryChannel';
2
+ const h2IfHttps = (url) => (url.startsWith('https://') ? { protocol: 'http2' } : {});
2
3
  export const getPackageVersions = async (packageNames) => {
3
4
  const results = await Promise.all(packageNames.map(async (name) => {
4
5
  try {
5
- const target = `https://registry.npmjs.org/${name}/latest`;
6
+ const target = `https://registry.npmjs.org/${encodeURIComponent(name)}/${registryChannel(name)}`;
6
7
  const res = await fetch(target, h2IfHttps(target));
8
+ if (!res.ok)
9
+ throw new Error(`Registry lookup failed for ${name}`);
7
10
  const data = (await res.json());
11
+ if (typeof data.version !== 'string')
12
+ throw new Error(`Registry returned no version for ${name}`);
8
13
  return [name, data.version];
9
14
  }
10
15
  catch {
@@ -2,9 +2,10 @@ import { argv, exit } from 'process';
2
2
  import { parseArgs } from 'util';
3
3
  import { isValidProviderOption, providers } from '@absolutejs/auth';
4
4
  import { DEFAULT_ARG_LENGTH } from '../constants';
5
- import { availableAuthProviders, availableDatabaseEngines, availableDatabaseHosts, availableDirectoryConfigurations, availableDrizzleDialects, availableORMs, availablePrismaDialects } from '../data';
6
- import { isValidAuthOption, isDatabaseEngine, isDatabaseHost, isDirectoryConfig, isDrizzleDialect, isGithubLinkOption, isORM, isPrismaDialect } from '../typeGuards';
5
+ import { availableAuthProviders, availableDatabaseEngines, availableDatabaseHosts, availableDirectoryConfigurations, availableORMs, availablePrismaDialects } from '../data';
6
+ import { isValidAuthOption, isDatabaseEngine, isDatabaseHost, isDirectoryConfig, isGithubLinkOption, isORM, isPrismaDialect } from '../typeGuards';
7
7
  import { normalizeRepoInput } from './github';
8
+ import { validateDatabaseSelection } from './validateDatabaseSelection';
8
9
  export const parseCommandLineOptions = () => {
9
10
  const { values, positionals } = parseArgs({
10
11
  allowNegative: true,
@@ -128,43 +129,26 @@ export const parseCommandLineOptions = () => {
128
129
  else {
129
130
  codeQualityTool = undefined;
130
131
  }
132
+ const defaultDirectory = values.skip ? 'default' : undefined;
131
133
  const directoryConfig = values.directory !== undefined && isDirectoryConfig(values.directory)
132
134
  ? values.directory
133
- : // --skip defaults every prompted axis (headless callers hang on
134
- // missing ones).
135
- values.skip
136
- ? 'default'
137
- : undefined;
135
+ : defaultDirectory;
138
136
  if (values.directory !== undefined && directoryConfig === undefined) {
139
137
  errors.push(`Invalid directory configuration: "${values.directory}". Expected: [ ${availableDirectoryConfigurations.join(', ')} ]`);
140
138
  }
141
- if (values.orm === 'drizzle' &&
142
- databaseEngine !== undefined &&
143
- databaseEngine !== 'none' &&
144
- !isDrizzleDialect(databaseEngine)) {
145
- errors.push(`Invalid database engine for Drizzle ORM: "${databaseEngine}". Expected: [ ${availableDrizzleDialects.join(', ')} ]`);
146
- }
139
+ const databaseSelection = validateDatabaseSelection({
140
+ databaseEngine,
141
+ databaseHost,
142
+ orm
143
+ });
144
+ ({ databaseEngine } = databaseSelection);
145
+ errors.push(...databaseSelection.errors);
147
146
  if (values.orm === 'prisma' &&
148
147
  databaseEngine !== undefined &&
149
148
  databaseEngine !== 'none' &&
150
149
  !isPrismaDialect(databaseEngine)) {
151
150
  errors.push(`Invalid database engine for Prisma ORM: "${databaseEngine}". Expected: [ ${availablePrismaDialects.join(', ')} ]`);
152
151
  }
153
- if (values['db-host'] === 'turso' &&
154
- (databaseEngine === undefined || databaseEngine === 'none')) {
155
- databaseEngine = 'sqlite';
156
- }
157
- else if (values['db-host'] === 'turso' && databaseEngine !== 'sqlite') {
158
- errors.push(`Invalid database engine for Turso: "${databaseEngine}". Expected: "sqlite".`);
159
- }
160
- if (values['db-host'] === 'neon' && databaseEngine !== 'postgresql') {
161
- errors.push(`Invalid database engine for Neon: "${databaseEngine}". Expected: "postgresql".`);
162
- }
163
- if (values['db-host'] === 'planetscale' &&
164
- databaseEngine !== 'postgresql' &&
165
- databaseEngine !== 'mysql') {
166
- errors.push(`Invalid database engine for PlanetScale: "${databaseEngine}". Expected: "postgresql" or "mysql".`);
167
- }
168
152
  if (errors.length > 0) {
169
153
  console.error(errors.join('\n'));
170
154
  exit(1);
@@ -225,8 +209,8 @@ export const parseCommandLineOptions = () => {
225
209
  let tailwind = hasTailwindFiles
226
210
  ? { input: values['tailwind-input'], output: values['tailwind-output'] }
227
211
  : undefined;
228
- const useTailwind = values.tailwind ??
229
- (hasTailwindFiles ? true : values.skip ? false : undefined);
212
+ const defaultTailwind = values.skip ? false : undefined;
213
+ const useTailwind = values.tailwind ?? (hasTailwindFiles ? true : defaultTailwind);
230
214
  if (useTailwind === false && hasTailwindFiles) {
231
215
  console.warn('Warning: Tailwind CSS input/output files are specified but Tailwind is disabled.');
232
216
  tailwind = undefined;
@@ -253,9 +237,10 @@ export const parseCommandLineOptions = () => {
253
237
  const githubVisibility = repoVisibility === 'public' || repoVisibility === 'private'
254
238
  ? repoVisibility
255
239
  : undefined;
240
+ const defaultFrontends = values.skip ? [] : undefined;
256
241
  const argumentConfiguration = {
257
- agentic: values.agentic ?? (values.skip ? false : undefined),
258
242
  absProviders: absProviders.length ? absProviders : undefined,
243
+ agentic: values.agentic ?? (values.skip ? false : undefined),
259
244
  assetsDirectory: values.assets,
260
245
  authOption,
261
246
  buildDirectory: values.build,
@@ -267,9 +252,7 @@ export const parseCommandLineOptions = () => {
267
252
  frontendDirectories,
268
253
  frontends: selectedFrontends.length
269
254
  ? selectedFrontends
270
- : values.skip
271
- ? []
272
- : undefined,
255
+ : defaultFrontends,
273
256
  githubLink: isGithubLinkOption(values.github)
274
257
  ? values.github
275
258
  : undefined,
@@ -0,0 +1,2 @@
1
+ /** Published release channels compatible with the generated framework contract. */
2
+ export declare const registryChannel: (name: string) => "2.0.0-beta.2" | "2.0.0-beta.6" | "5.9.3" | "next" | "beta" | "rc" | "v21-lts" | "latest";
@@ -0,0 +1,20 @@
1
+ /** Published release channels compatible with the generated framework contract. */
2
+ export const registryChannel = (name) => {
3
+ // Published AbsoluteJS plugins still use ElysiaStatus.code, renamed in newer betas.
4
+ if (name === 'elysia')
5
+ return '2.0.0-beta.6';
6
+ if (name === '@elysia/openapi')
7
+ return '2.0.0-beta.2';
8
+ if (name.startsWith('@elysia/'))
9
+ return 'next';
10
+ if (name === '@absolutejs/absolute')
11
+ return 'beta';
12
+ if (name === 'drizzle-orm' || name === 'drizzle-kit')
13
+ return 'rc';
14
+ if (name.startsWith('@angular/'))
15
+ return 'v21-lts';
16
+ // AbsoluteJS's compiler integration and Angular 21 require TypeScript 5.9.
17
+ if (name === 'typescript')
18
+ return '5.9.3';
19
+ return 'latest';
20
+ };
@@ -0,0 +1,11 @@
1
+ import type { DatabaseEngine, DatabaseHost, ORM } from '../types';
2
+ type DatabaseSelection = {
3
+ databaseEngine: DatabaseEngine;
4
+ databaseHost: DatabaseHost;
5
+ orm: ORM;
6
+ };
7
+ export declare const validateDatabaseSelection: ({ databaseEngine, databaseHost, orm }: DatabaseSelection) => {
8
+ databaseEngine: DatabaseEngine;
9
+ errors: string[];
10
+ };
11
+ export {};
@@ -0,0 +1,31 @@
1
+ import { availableDrizzleDialects } from '../data';
2
+ import { isDrizzleDialect } from '../typeGuards';
3
+ const hostEngines = {
4
+ neon: { engines: ['postgresql'], label: 'Neon' },
5
+ none: undefined,
6
+ planetscale: { engines: ['postgresql', 'mysql'], label: 'PlanetScale' },
7
+ turso: { engines: ['sqlite'], label: 'Turso' }
8
+ };
9
+ const formatEngines = (engines) => engines.map((engine) => `"${engine}"`).join(' or ');
10
+ /* Every engine/host/ORM combination the CLI accepts must scaffold working code,
11
+ so unsupported ones are refused here, before anything is written. Turso only
12
+ serves SQLite, so choosing it without an engine selects SQLite. */
13
+ export const validateDatabaseSelection = ({ databaseEngine, databaseHost, orm }) => {
14
+ const errors = [];
15
+ const hasEngine = databaseEngine !== undefined && databaseEngine !== 'none';
16
+ const resolvedEngine = databaseHost === 'turso' && !hasEngine ? 'sqlite' : databaseEngine;
17
+ if (orm === 'drizzle' && databaseEngine === 'gel') {
18
+ errors.push('Drizzle ORM 1.0 does not support Gel. Use "--orm none" with "--db gel".');
19
+ }
20
+ else if (orm === 'drizzle' &&
21
+ hasEngine &&
22
+ !isDrizzleDialect(databaseEngine)) {
23
+ errors.push(`Invalid database engine for Drizzle ORM: "${databaseEngine}". Expected: [ ${availableDrizzleDialects.join(', ')} ]`);
24
+ }
25
+ const host = databaseHost === undefined ? undefined : hostEngines[databaseHost];
26
+ const acceptsEngine = host?.engines.some((engine) => engine === resolvedEngine);
27
+ if (host !== undefined && !acceptsEngine) {
28
+ errors.push(`Invalid database engine for ${host.label}: "${resolvedEngine}". Expected: ${formatEngines(host.engines)}.`);
29
+ }
30
+ return { databaseEngine: resolvedEngine, errors };
31
+ };
@@ -4,81 +4,82 @@
4
4
  * Run `bun run check-versions` to compare against latest npm versions.
5
5
  */
6
6
  export declare const versions: {
7
- readonly '@absolutejs/absolute': "0.20.0-beta.0";
8
- readonly '@absolutejs/a2a': "0.3.2";
9
- readonly '@absolutejs/agency': "0.6.3";
10
- readonly '@absolutejs/agent-conformance': "0.3.0";
11
- readonly '@absolutejs/agent-discovery': "0.1.0";
12
- readonly '@absolutejs/agent-inbox': "0.3.3";
13
- readonly '@absolutejs/agent-memory': "0.1.5";
14
- readonly '@absolutejs/agent-runtime': "0.2.3";
15
- readonly '@absolutejs/agent-sandbox': "0.1.0";
16
- readonly '@absolutejs/agent-trust': "0.1.0";
17
- readonly '@absolutejs/agent-control': "0.5.3";
18
- readonly '@absolutejs/auth': "0.56.17";
19
- readonly '@absolutejs/egress': "0.1.0";
20
- readonly '@absolutejs/execution': "0.14.4";
21
- readonly '@absolutejs/manifest': "0.9.0";
22
- readonly '@absolutejs/mcp': "0.12.0";
23
- readonly '@absolutejs/observability': "0.6.0";
24
- readonly '@absolutejs/policy': "0.2.0";
25
- readonly '@absolutejs/secrets': "0.7.0";
26
- readonly '@absolutejs/sync-bus-pg': "0.2.0";
27
- readonly '@absolutejs/wallet': "0.8.6";
28
- readonly '@angular/common': "21.2.0";
29
- readonly '@angular/compiler': "21.2.0";
30
- readonly '@angular/compiler-cli': "21.2.0";
31
- readonly '@angular/core': "21.2.0";
32
- readonly '@angular/platform-browser': "21.2.0";
33
- readonly '@angular/platform-server': "21.2.0";
34
- readonly '@angular/ssr': "21.2.0";
7
+ readonly '@absolutejs/a2a': "0.3.6";
8
+ readonly '@absolutejs/absolute': "0.20.0-beta.120";
9
+ readonly '@absolutejs/agency': "0.7.4";
10
+ readonly '@absolutejs/agent-conformance': "0.15.1";
11
+ readonly '@absolutejs/agent-control': "0.5.8";
12
+ readonly '@absolutejs/agent-discovery': "0.2.4";
13
+ readonly '@absolutejs/agent-inbox': "0.3.5";
14
+ readonly '@absolutejs/agent-memory': "0.1.7";
15
+ readonly '@absolutejs/agent-runtime': "0.2.6";
16
+ readonly '@absolutejs/agent-sandbox': "0.2.2";
17
+ readonly '@absolutejs/agent-trust': "0.2.2";
18
+ readonly '@absolutejs/auth': "0.85.0";
19
+ readonly '@absolutejs/egress': "0.2.0";
20
+ readonly '@absolutejs/execution': "0.14.8";
21
+ readonly '@absolutejs/manifest': "0.10.0";
22
+ readonly '@absolutejs/mcp': "0.26.5";
23
+ readonly '@absolutejs/observability': "0.6.1";
24
+ readonly '@absolutejs/policy': "0.4.1";
25
+ readonly '@absolutejs/scoped-state': "0.3.1";
26
+ readonly '@absolutejs/secrets': "0.9.7";
27
+ readonly '@absolutejs/sync-bus-pg': "0.2.3";
28
+ readonly '@absolutejs/wallet': "0.9.3";
29
+ readonly '@angular/common': "21.2.24";
30
+ readonly '@angular/compiler': "21.2.24";
31
+ readonly '@angular/compiler-cli': "21.2.24";
32
+ readonly '@angular/core': "21.2.24";
33
+ readonly '@angular/platform-browser': "21.2.24";
34
+ readonly '@angular/platform-server': "21.2.24";
35
+ readonly '@angular/ssr': "21.2.24";
35
36
  readonly '@elysia/cors': "2.0.0-beta.1";
36
37
  readonly '@elysia/eden': "2.0.0-beta.5";
37
- readonly '@elysia/openapi': "2.0.0-beta.1";
38
+ readonly '@elysia/openapi': "2.0.0-beta.2";
38
39
  readonly '@elysia/static': "2.0.0-beta.2";
39
- readonly '@eslint/compat': "2.0.2";
40
- readonly '@eslint/js': "9.39.2";
41
- readonly '@libsql/client': "0.17.0";
42
- readonly '@neondatabase/serverless': "1.0.2";
43
- readonly '@planetscale/database': "1.19.0";
44
- readonly '@stylistic/eslint-plugin': "5.9.0";
45
- readonly '@tailwindcss/cli': "4.2.0";
46
- readonly '@types/bun': "1.3.14";
47
- readonly '@types/mssql': "9.1.9";
48
- readonly '@types/pg': "8.16.0";
49
- readonly '@types/react': "19.2.14";
50
- readonly '@typescript-eslint/parser': "8.56.0";
51
- readonly autoprefixer: "10.4.24";
40
+ readonly '@eslint/compat': "2.1.1";
41
+ readonly '@eslint/js': "10.0.1";
42
+ readonly '@libsql/client': "0.18.0";
43
+ readonly '@neondatabase/serverless': "1.1.0";
44
+ readonly '@planetscale/database': "1.20.2";
45
+ readonly '@stylistic/eslint-plugin': "5.10.0";
46
+ readonly '@tailwindcss/cli': "4.3.3";
47
+ readonly '@types/bun': "1.4.2";
48
+ readonly '@types/mssql': "12.3.0";
49
+ readonly '@types/pg': "8.23.1";
50
+ readonly '@types/react': "19.3.0";
51
+ readonly '@typescript-eslint/parser': "8.70.1";
52
+ readonly autoprefixer: "10.6.1";
52
53
  readonly 'drizzle-kit': "1.0.0-rc.4";
53
54
  readonly 'drizzle-orm': "1.0.0-rc.4";
54
55
  readonly elysia: "2.0.0-beta.6";
55
- readonly 'elysia-rate-limit': "4.5.0";
56
- readonly '@absolutejs/scoped-state': "0.2.0";
57
- readonly eslint: "9.39.2";
56
+ readonly 'elysia-rate-limit': "5.1.1";
57
+ readonly eslint: "10.11.0";
58
58
  readonly 'eslint-plugin-absolute': "0.12.0";
59
59
  readonly 'eslint-plugin-import': "2.32.0";
60
60
  readonly 'eslint-plugin-jsx-a11y': "6.10.2";
61
- readonly 'eslint-plugin-promise': "7.2.1";
61
+ readonly 'eslint-plugin-promise': "7.3.0";
62
62
  readonly 'eslint-plugin-react': "7.37.5";
63
63
  readonly 'eslint-plugin-react-compiler': "19.1.0-rc.2";
64
- readonly 'eslint-plugin-react-hooks': "7.1.0-canary-e8c63626-20260213";
65
- readonly 'eslint-plugin-security': "4.0.0";
66
- readonly gel: "2.2.0";
67
- readonly globals: "17.3.0";
68
- readonly mongodb: "7.1.0";
69
- readonly mssql: "12.2.0";
70
- readonly mysql2: "3.17.3";
71
- readonly pg: "8.18.0";
72
- readonly postcss: "8.5.6";
73
- readonly prettier: "3.8.1";
74
- readonly 'prettier-plugin-svelte': "3.5.0";
75
- readonly react: "19.2.4";
76
- readonly 'react-dom': "19.2.4";
77
- readonly 'react-refresh': "0.18.0";
78
- readonly svelte: "5.53.0";
79
- readonly tailwindcss: "4.2.0";
64
+ readonly 'eslint-plugin-react-hooks': "7.1.1";
65
+ readonly 'eslint-plugin-security': "4.0.1";
66
+ readonly gel: "2.2.1";
67
+ readonly globals: "17.12.0";
68
+ readonly 'htmx.org': "2.0.11";
69
+ readonly mongodb: "7.6.0";
70
+ readonly mssql: "12.7.2";
71
+ readonly mysql2: "3.24.4";
72
+ readonly pg: "8.23.0";
73
+ readonly postcss: "8.5.28";
74
+ readonly prettier: "3.9.9";
75
+ readonly 'prettier-plugin-svelte': "4.1.1";
76
+ readonly react: "19.3.0";
77
+ readonly 'react-dom': "19.3.0";
78
+ readonly 'react-refresh': "0.19.0";
79
+ readonly svelte: "5.57.1";
80
+ readonly tailwindcss: "4.3.3";
80
81
  readonly typescript: "5.9.3";
81
- readonly 'typescript-eslint': "8.56.0";
82
- readonly vue: "3.5.28";
83
- readonly 'zod-validation-error': "4.0.2";
82
+ readonly 'typescript-eslint': "8.70.1";
83
+ readonly vue: "3.5.43";
84
+ readonly 'zod-validation-error': "5.0.0";
84
85
  };