@ti-engine/web-framework 1.13.1

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 (42) hide show
  1. package/.env +4 -0
  2. package/CHANGELOG.md +274 -0
  3. package/README.md +26 -0
  4. package/bin/build/post-install.js +18 -0
  5. package/bin/localization/web-server-labels.json +28 -0
  6. package/bin/static/.well-known/appspecific/com.chrome.devtools.json +6 -0
  7. package/bin/static/favicon.ico +0 -0
  8. package/bin/static/fragments/components/component-notification-bar.html +21 -0
  9. package/bin/static/fragments/components/component-sidebar-flyout.html +37 -0
  10. package/bin/static/fragments/components/component-sidebar.html +33 -0
  11. package/bin/static/fragments/components/component-tooltip.html +11 -0
  12. package/bin/static/fragments/components/component-topbar.html +6 -0
  13. package/bin/static/fragments/frame-administration.html +3 -0
  14. package/bin/static/fragments/frame-application.html +19 -0
  15. package/bin/static/fragments/frame-dashboard.html +3 -0
  16. package/bin/static/fragments/frame-login.html +105 -0
  17. package/bin/static/fragments/frame-not-found.html +3 -0
  18. package/bin/static/fragments/frame-profile.html +3 -0
  19. package/bin/static/index.html +23 -0
  20. package/bin/static/scripts/lib/alpinejs-csp.min.js +7 -0
  21. package/bin/static/scripts/lib/htmx.min.js +1 -0
  22. package/bin/static/scripts/lib/safe-nonce.min.js +1 -0
  23. package/bin/static/scripts/ti-charts.js +1591 -0
  24. package/bin/static/scripts/ti-framework.css +3195 -0
  25. package/bin/static/scripts/ti-framework.js +1427 -0
  26. package/bin/static/scripts/ti-theme-black-glass.css +216 -0
  27. package/bin/static/scripts/ti-theme-daylight.css +87 -0
  28. package/bin/web-app-manager.js +564 -0
  29. package/bin/web-server.js +604 -0
  30. package/bin/web-server.json +49 -0
  31. package/components/admin-config-handlers.js +92 -0
  32. package/components/auth-manager.js +344 -0
  33. package/components/authorization.js +135 -0
  34. package/components/config-change-notifier.js +98 -0
  35. package/components/config-registry.js +246 -0
  36. package/components/config-service.js +349 -0
  37. package/components/config-store.js +246 -0
  38. package/components/definitions.types.js +26 -0
  39. package/components/session-store.js +111 -0
  40. package/components/user.js +133 -0
  41. package/components/web-handlers.js +765 -0
  42. package/package.json +66 -0
@@ -0,0 +1,3 @@
1
+ <div>
2
+ <span>Profile</span>
3
+ </div>
@@ -0,0 +1,23 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en" data-theme="daylight">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1"/>
6
+ <meta name="htmx-config" content='{ti-htmx-config-placeholder}'/>
7
+ <title id="ti-page-title">Main Page</title>
8
+ <link rel="icon" href="/static/favicon.ico" type="image/ico">
9
+ <script defer src="/static/scripts/ti-framework.js" nonce='{ti-nonce-placeholder}'></script>
10
+ <script defer src="/static/scripts/ti-charts.js" nonce='{ti-nonce-placeholder}'></script>
11
+ <script defer src="/static/scripts/lib/alpinejs-csp.min.js" nonce='{ti-nonce-placeholder}'></script>
12
+ <script defer src="/static/scripts/lib/htmx.min.js" nonce='{ti-nonce-placeholder}'></script>
13
+ <script defer src="/static/scripts/lib/safe-nonce.min.js" nonce='{ti-nonce-placeholder}'></script>
14
+ <link rel="stylesheet" type="text/css" href="/static/scripts/ti-framework.css"/>
15
+ <link rel="stylesheet" type="text/css" href="/static/scripts/ti-theme-daylight.css"/>
16
+ <link rel="stylesheet" type="text/css" href="/static/scripts/ti-theme-black-glass.css"/>
17
+ </head>
18
+ <body hx-ext="safe-nonce">
19
+ <div id="ti-main" class="ti-main">
20
+ <ti-nested-frame-placeholder hx-get="/app/enter" hx-trigger="load" hx-target="this" hx-swap="outerHTML"></ti-nested-frame-placeholder>
21
+ </div>
22
+ </body>
23
+ </html>
@@ -0,0 +1,7 @@
1
+ (()=>{var re=!1,ne=!1,Z=[],ie=-1,oe=!1;function Je(t){Vn(t)}function Ye(){oe=!0}function Ze(){oe=!1,Qe()}function Vn(t){Z.includes(t)||Z.push(t),Qe()}function Xe(t){let e=Z.indexOf(t);e!==-1&&e>ie&&Z.splice(e,1)}function Qe(){if(!ne&&!re){if(oe)return;re=!0,queueMicrotask(zn)}}function zn(){re=!1,ne=!0;for(let t=0;t<Z.length;t++)Z[t](),ie=t;Z.length=0,ie=-1,ne=!1}var C,D,B,ae,se=!0;function tr(t){se=!1,t(),se=!0}function er(t){C=t.reactive,B=t.release,D=e=>t.effect(e,{scheduler:r=>{se?Je(r):r()}}),ae=t.raw}function ue(t){D=t}function rr(t){let e=()=>{};return[n=>{let i=D(n);return t._x_effects||(t._x_effects=new Set,t._x_runEffects=()=>{t._x_effects.forEach(o=>o())}),t._x_effects.add(i),e=()=>{i!==void 0&&(t._x_effects.delete(i),B(i))},i},()=>{e()}]}function At(t,e){let r=!0,n,i,o=D(()=>{let s=t(),a=JSON.stringify(s);if(!r&&(typeof s=="object"||s!==n)){let u=typeof n=="object"?JSON.parse(i):n;queueMicrotask(()=>{e(s,u)})}n=s,i=a,r=!1});return()=>B(o)}async function nr(t){Ye();try{await t(),await Promise.resolve()}finally{Ze()}}var ir=[],or=[],sr=[];function ar(t){sr.push(t)}function it(t,e){typeof e=="function"?(t._x_cleanups||(t._x_cleanups=[]),t._x_cleanups.push(e)):(e=t,or.push(e))}function St(t){ir.push(t)}function Tt(t,e,r){t._x_attributeCleanups||(t._x_attributeCleanups={}),t._x_attributeCleanups[e]||(t._x_attributeCleanups[e]=[]),t._x_attributeCleanups[e].push(r)}function ce(t,e){t._x_attributeCleanups&&Object.entries(t._x_attributeCleanups).forEach(([r,n])=>{(e===void 0||e.includes(r))&&(n.forEach(i=>i()),delete t._x_attributeCleanups[r])})}function ur(t){for(t._x_effects?.forEach(Xe);t._x_cleanups?.length;)t._x_cleanups.pop()()}var le=new MutationObserver(he),fe=!1;function ft(){le.observe(document,{subtree:!0,childList:!0,attributes:!0,attributeOldValue:!0}),fe=!0}function pe(){Hn(),le.disconnect(),fe=!1}var lt=[];function Hn(){let t=le.takeRecords();lt.push(()=>t.length>0&&he(t));let e=lt.length;queueMicrotask(()=>{if(lt.length===e)for(;lt.length>0;)lt.shift()()})}function _(t){if(!fe)return t();pe();let e=t();return ft(),e}var de=!1,Ot=[];function cr(){de=!0}function lr(){de=!1,he(Ot),Ot=[]}function he(t){if(de){Ot=Ot.concat(t);return}let e=[],r=new Set,n=new Map,i=new Map;for(let o=0;o<t.length;o++)if(!t[o].target._x_ignoreMutationObserver&&(t[o].type==="childList"&&(t[o].removedNodes.forEach(s=>{s.nodeType===1&&s._x_marker&&r.add(s)}),t[o].addedNodes.forEach(s=>{if(s.nodeType===1){if(r.has(s)){r.delete(s);return}s._x_marker||e.push(s)}})),t[o].type==="attributes")){let s=t[o].target,a=t[o].attributeName,u=t[o].oldValue,c=()=>{n.has(s)||n.set(s,[]),n.get(s).push({name:a,value:s.getAttribute(a)})},l=()=>{i.has(s)||i.set(s,[]),i.get(s).push(a)};s.hasAttribute(a)&&u===null?c():s.hasAttribute(a)?(l(),c()):l()}i.forEach((o,s)=>{ce(s,o)}),n.forEach((o,s)=>{ir.forEach(a=>a(s,o))});for(let o of r)e.some(s=>s.contains(o))||or.forEach(s=>s(o));for(let o of e)o.isConnected&&sr.forEach(s=>s(o));e=null,r=null,n=null,i=null}function Nt(t){return k(V(t))}function U(t,e,r){return t._x_dataStack=[e,...V(r||t)],()=>{t._x_dataStack=t._x_dataStack.filter(n=>n!==e)}}function V(t){return t._x_dataStack?t._x_dataStack:typeof ShadowRoot=="function"&&t instanceof ShadowRoot?V(t.host):t.parentNode?V(t.parentNode):[]}function k(t){return new Proxy({objects:t},Kn)}function fr(t,e){return t===null||t===Object.prototype?null:Object.prototype.hasOwnProperty.call(t,e)?t:fr(Object.getPrototypeOf(t),e)}var Kn={ownKeys({objects:t}){return Array.from(new Set(t.flatMap(e=>Object.keys(e))))},has({objects:t},e){return e==Symbol.unscopables?!1:t.some(r=>Object.prototype.hasOwnProperty.call(r,e)||Reflect.has(r,e))},get({objects:t},e,r){return e=="toJSON"?qn:Reflect.get(t.find(n=>Reflect.has(n,e))||{},e,r)},set({objects:t},e,r,n){let i;for(let s of t)if(i=fr(s,e),i)break;i||(i=t[t.length-1]);let o=Object.getOwnPropertyDescriptor(i,e);return o?.set&&o?.get?o.set.call(n,r)||!0:Reflect.set(i,e,r)}};function qn(){return Reflect.ownKeys(this).reduce((e,r)=>(e[r]=Reflect.get(this,r),e),{})}function ot(t){let e=n=>typeof n=="object"&&!Array.isArray(n)&&n!==null,r=(n,i="")=>{Object.entries(Object.getOwnPropertyDescriptors(n)).forEach(([o,{value:s,enumerable:a}])=>{if(a===!1||s===void 0||typeof s=="object"&&s!==null&&s.__v_skip)return;let u=i===""?o:`${i}.${o}`;typeof s=="object"&&s!==null&&s._x_interceptor?n[o]=s.initialize(t,u,o):e(s)&&s!==n&&!(s instanceof Element)&&r(s,u)})};return r(t)}function Ct(t,e=()=>{}){let r={initialValue:void 0,_x_interceptor:!0,initialize(n,i,o){return t(this.initialValue,()=>Wn(n,i),s=>me(n,i,s),i,o)}};return e(r),n=>{if(typeof n=="object"&&n!==null&&n._x_interceptor){let i=r.initialize.bind(r);r.initialize=(o,s,a)=>{let u=n.initialize(o,s,a);return r.initialValue=u,i(o,s,a)}}else r.initialValue=n;return r}}function Wn(t,e){return e.split(".").reduce((r,n)=>r[n],t)}function me(t,e,r){if(typeof e=="string"&&(e=e.split(".")),e.length===1)t[e[0]]=r;else{if(e.length===0)throw error;return t[e[0]]||(t[e[0]]={}),me(t[e[0]],e.slice(1),r)}}var pr={};function b(t,e){pr[t]=e}function K(t,e){let r=Gn(e);return Object.entries(pr).forEach(([n,i])=>{Object.defineProperty(t,`$${n}`,{get(){return i(e,r)},enumerable:!1})}),t}function Gn(t){let[e,r]=_e(t),n={interceptor:Ct,...e};return it(t,r),n}function ge(t,e,r,...n){try{return r(...n)}catch(i){pt(i,t,e)}}function pt(...t){return dr(...t)}var dr=Jn;function hr(t){dr=t}function Jn(t,e,r=void 0){t=Object.assign(t??{message:"No error message given."},{el:e,expression:r}),console.warn(`Alpine Expression Error: ${t.message}
2
+
3
+ ${r?'Expression: "'+r+`"
4
+
5
+ `:""}`,e),setTimeout(()=>{throw t},0)}var q=!0;function kt(t){let e=q;q=!1;let r=t();return q=e,r}function R(t,e,r={}){let n;return y(t,e)(i=>n=i,r),n}function y(...t){return mr(...t)}var mr=()=>{};function _r(t){mr=t}var gr;function xr(t){gr=t}function yr(t,e){return(r=()=>{},{scope:n={},params:i=[],context:o}={})=>{if(!q){xe(r,e,k([n,...t]),i);return}let s=e.apply(k([n,...t]),i);xe(r,s)}}function xe(t,e,r,n,i){if(q&&typeof e=="function"){let o=e.apply(r,n);o instanceof Promise?o.then(s=>xe(t,s,r,n)).catch(s=>pt(s,i,e)):t(o)}else typeof e=="object"&&e instanceof Promise?e.then(o=>t(o)):t(e)}function br(...t){return gr(...t)}var we="x-";function N(t=""){return we+t}function wr(t){we=t}var Rt={};function h(t,e){return Rt[t]=e,{before(r){if(!Rt[r]){console.warn(String.raw`Cannot find directive \`${r}\`. \`${t}\` will use the default order of execution`);return}let n=X.indexOf(r);X.splice(n>=0?n:X.indexOf("DEFAULT"),0,t)}}}function Er(t){return Object.keys(Rt).includes(t)}function ht(t,e,r){if(e=Array.from(e),t._x_virtualDirectives){let o=Object.entries(t._x_virtualDirectives).map(([a,u])=>({name:a,value:u})),s=Ee(o);o=o.map(a=>s.find(u=>u.name===a.name)?{name:`x-bind:${a.name}`,value:`"${a.value}"`}:a),e=e.concat(o)}let n={};return e.map(Or((o,s)=>n[o]=s)).filter(Tr).map(Zn(n,r)).sort(Xn).map(o=>Yn(t,o))}function Ee(t){return Array.from(t).map(Or()).filter(e=>!Tr(e))}var ye=!1,dt=new Map,vr=Symbol();function Ar(t){ye=!0;let e=Symbol();vr=e,dt.set(e,[]);let r=()=>{for(;dt.get(e).length;)dt.get(e).shift()();dt.delete(e)},n=()=>{ye=!1,r()};t(r),n()}function _e(t){let e=[],r=a=>e.push(a),[n,i]=rr(t);return e.push(i),[{Alpine:z,effect:n,cleanup:r,evaluateLater:y.bind(y,t),evaluate:R.bind(R,t)},()=>e.forEach(a=>a())]}function Yn(t,e){let r=()=>{},n=Rt[e.type]||r,[i,o]=_e(t);Tt(t,e.original,o);let s=()=>{t._x_ignore||t._x_ignoreSelf||(n.inline&&n.inline(t,e,i),n=n.bind(n,t,e,i),ye?dt.get(vr).push(n):n())};return s.runCleanups=o,s}var Mt=(t,e)=>({name:r,value:n})=>(r.startsWith(t)&&(r=r.replace(t,e)),{name:r,value:n}),Pt=t=>t;function Or(t=()=>{}){return({name:e,value:r})=>{let{name:n,value:i}=Sr.reduce((o,s)=>s(o),{name:e,value:r});return n!==e&&t(n,e),{name:n,value:i}}}var Sr=[];function st(t){Sr.push(t)}function Tr({name:t}){return Nr().test(t)}var Nr=()=>new RegExp(`^${we}([^:^.]+)\\b`);function Zn(t,e){return({name:r,value:n})=>{r===n&&(n="");let i=r.match(Nr()),o=r.match(/:([a-zA-Z0-9\-_:]+)/),s=r.match(/\.[^.\]]+(?=[^\]]*$)/g)||[],a=e||t[r]||r;return{type:i?i[1]:null,value:o?o[1]:null,modifiers:s.map(u=>u.replace(".","")),expression:n,original:a}}}var be="DEFAULT",X=["ignore","ref","id","data","anchor","bind","init","for","model","modelable","transition","show","if",be,"teleport"];function Xn(t,e){let r=X.indexOf(t.type)===-1?be:t.type,n=X.indexOf(e.type)===-1?be:e.type;return X.indexOf(r)-X.indexOf(n)}function Q(t,e,r={},n={}){return t.dispatchEvent(new CustomEvent(e,{detail:r,bubbles:!0,composed:!0,cancelable:!0,...n}))}function L(t,e){if(typeof ShadowRoot=="function"&&t instanceof ShadowRoot){Array.from(t.children).forEach(i=>L(i,e));return}let r=!1;if(e(t,()=>r=!0),r)return;let n=t.firstElementChild;for(;n;)L(n,e,!1),n=n.nextElementSibling}function A(t,...e){console.warn(`Alpine Warning: ${t}`,...e)}var Cr=!1;function kr(){Cr&&A("Alpine has already been initialized on this page. Calling Alpine.start() more than once can cause problems."),Cr=!0,document.body||A("Unable to initialize. Trying to load Alpine before `<body>` is available. Did you forget to add `defer` in Alpine's `<script>` tag?"),Q(document,"alpine:init"),Q(document,"alpine:initializing"),ft(),ar(e=>O(e,L)),it(e=>$(e)),St((e,r)=>{ht(e,r).forEach(n=>n())});let t=e=>!tt(e.parentElement,!0);Array.from(document.querySelectorAll(Pr().join(","))).filter(t).forEach(e=>{O(e)}),Q(document,"alpine:initialized"),setTimeout(()=>{ti()})}var ve=[],Rr=[];function Mr(){return ve.map(t=>t())}function Pr(){return ve.concat(Rr).map(t=>t())}function It(t){ve.push(t)}function Dt(t){Rr.push(t)}function tt(t,e=!1){return T(t,r=>{if((e?Pr():Mr()).some(i=>r.matches(i)))return!0})}function T(t,e){if(t){if(e(t))return t;if(t._x_teleportBack)return T(t._x_teleportBack,e);if(t.parentNode instanceof ShadowRoot)return T(t.parentNode.host,e);if(t.parentElement)return T(t.parentElement,e)}}function Ir(t){return Mr().some(e=>t.matches(e))}var Dr=[];function Ur(t){Dr.push(t)}var Qn=1;function O(t,e=L,r=()=>{}){T(t,n=>n._x_ignore)||Ar(()=>{e(t,(n,i)=>{n._x_marker||(r(n,i),Dr.forEach(o=>o(n,i)),ht(n,n.attributes).forEach(o=>o()),n._x_ignore||(n._x_marker=Qn++),n._x_ignore&&i())})})}function $(t,e=L){e(t,r=>{ur(r),ce(r),delete r._x_marker})}function ti(){[["ui","dialog",["[x-dialog], [x-popover]"]],["anchor","anchor",["[x-anchor]"]],["sort","sort",["[x-sort]"]]].forEach(([e,r,n])=>{Er(r)||n.some(i=>{if(document.querySelector(i))return A(`found "${i}", but missing ${e} plugin`),!0})})}var Ae=[],Oe=!1;function at(t=()=>{}){return queueMicrotask(()=>{Oe||setTimeout(()=>{Ut()})}),new Promise(e=>{Ae.push(()=>{t(),e()})})}function Ut(){for(Oe=!1;Ae.length;)Ae.shift()()}function Lr(){Oe=!0}function mt(t,e){return Array.isArray(e)?$r(t,e.join(" ")):typeof e=="object"&&e!==null?ei(t,e):typeof e=="function"?mt(t,e()):$r(t,e)}function Se(t){return t.split(/\s/).filter(Boolean)}function $r(t,e){let r=i=>Se(i).filter(o=>!t.classList.contains(o)).filter(Boolean),n=i=>(t.classList.add(...i),()=>{t.classList.remove(...i)});return e=e===!0?e="":e||"",n(r(e))}function ei(t,e){let r=Object.entries(e).flatMap(([s,a])=>a?Se(s):!1).filter(Boolean),n=Object.entries(e).flatMap(([s,a])=>a?!1:Se(s)).filter(Boolean),i=[],o=[];return n.forEach(s=>{t.classList.contains(s)&&(t.classList.remove(s),o.push(s))}),r.forEach(s=>{t.classList.contains(s)||(t.classList.add(s),i.push(s))}),()=>{o.forEach(s=>t.classList.add(s)),i.forEach(s=>t.classList.remove(s))}}function et(t,e){return typeof e=="object"&&e!==null?ri(t,e):ni(t,e)}function ri(t,e){let r={};return Object.entries(e).forEach(([n,i])=>{r[n]=t.style[n],n.startsWith("--")||(n=ii(n)),t.style.setProperty(n,i)}),setTimeout(()=>{t.style.length===0&&t.removeAttribute("style")}),()=>{et(t,r)}}function ni(t,e){let r=t.getAttribute("style",e);return t.setAttribute("style",e),()=>{t.setAttribute("style",r||"")}}function ii(t){return t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()}function _t(t,e=()=>{}){let r=!1;return function(){r?e.apply(this,arguments):(r=!0,t.apply(this,arguments))}}h("transition",(t,{value:e,modifiers:r,expression:n},{evaluate:i})=>{typeof n=="function"&&(n=i(n)),n!==!1&&(!n||typeof n=="boolean"?si(t,r,e):oi(t,n,e))});function oi(t,e,r){jr(t,mt,""),{enter:i=>{t._x_transition.enter.during=i},"enter-start":i=>{t._x_transition.enter.start=i},"enter-end":i=>{t._x_transition.enter.end=i},leave:i=>{t._x_transition.leave.during=i},"leave-start":i=>{t._x_transition.leave.start=i},"leave-end":i=>{t._x_transition.leave.end=i}}[r](e)}function si(t,e,r){jr(t,et);let n=!e.includes("in")&&!e.includes("out")&&!r,i=n||e.includes("in")||["enter"].includes(r),o=n||e.includes("out")||["leave"].includes(r);e.includes("in")&&!n&&(e=e.filter((p,g)=>g<e.indexOf("out"))),e.includes("out")&&!n&&(e=e.filter((p,g)=>g>e.indexOf("out")));let s=!e.includes("opacity")&&!e.includes("scale"),a=s||e.includes("opacity"),u=s||e.includes("scale"),c=a?0:1,l=u?gt(e,"scale",95)/100:1,f=gt(e,"delay",0)/1e3,w=gt(e,"origin","center"),m="opacity, transform",P=gt(e,"duration",150)/1e3,d=gt(e,"duration",75)/1e3,E="cubic-bezier(0.4, 0.0, 0.2, 1)";i&&(t._x_transition.enter.during={transformOrigin:w,transitionDelay:`${f}s`,transitionProperty:m,transitionDuration:`${P}s`,transitionTimingFunction:E},t._x_transition.enter.start={opacity:c,transform:`scale(${l})`},t._x_transition.enter.end={opacity:1,transform:"scale(1)"}),o&&(t._x_transition.leave.during={transformOrigin:w,transitionDelay:`${f}s`,transitionProperty:m,transitionDuration:`${d}s`,transitionTimingFunction:E},t._x_transition.leave.start={opacity:1,transform:"scale(1)"},t._x_transition.leave.end={opacity:c,transform:`scale(${l})`})}function jr(t,e,r={}){t._x_transition||(t._x_transition={enter:{during:r,start:r,end:r},leave:{during:r,start:r,end:r},in(n=()=>{},i=()=>{}){Lt(t,e,{during:this.enter.during,start:this.enter.start,end:this.enter.end},n,i)},out(n=()=>{},i=()=>{}){Lt(t,e,{during:this.leave.during,start:this.leave.start,end:this.leave.end},n,i)}})}window.Element.prototype._x_toggleAndCascadeWithTransitions=function(t,e,r,n){let i=document.visibilityState==="visible"?requestAnimationFrame:setTimeout,o=()=>i(r);if(e){t._x_transition&&(t._x_transition.enter||t._x_transition.leave)?t._x_transition.enter&&(Object.entries(t._x_transition.enter.during).length||Object.entries(t._x_transition.enter.start).length||Object.entries(t._x_transition.enter.end).length)?t._x_transition.in(r):o():t._x_transition?t._x_transition.in(r):o();return}t._x_hidePromise=t._x_transition?new Promise((s,a)=>{t._x_transition.out(()=>{},()=>s(n)),t._x_transitioning&&t._x_transitioning.beforeCancel(()=>a({isFromCancelledTransition:!0}))}):Promise.resolve(n),queueMicrotask(()=>{let s=Fr(t);s?(s._x_hideChildren||(s._x_hideChildren=[]),s._x_hideChildren.push(t)):i(()=>{let a=u=>{let c=Promise.all([u._x_hidePromise,...(u._x_hideChildren||[]).map(a)]).then(([l])=>l?.());return delete u._x_hidePromise,delete u._x_hideChildren,c};a(t).catch(u=>{if(!u.isFromCancelledTransition)throw u})})})};function Fr(t){let e=t.parentNode;if(e)return e._x_hidePromise?e:Fr(e)}function Lt(t,e,{during:r,start:n,end:i}={},o=()=>{},s=()=>{}){if(t._x_transitioning&&t._x_transitioning.cancel(),Object.keys(r).length===0&&Object.keys(n).length===0&&Object.keys(i).length===0){o(),s();return}let a,u,c;ai(t,{start(){a=e(t,n)},during(){u=e(t,r)},before:o,end(){a(),c=e(t,i)},after:s,cleanup(){u(),c()}})}function ai(t,e){let r,n,i,o=_t(()=>{_(()=>{r=!0,n||e.before(),i||(e.end(),Ut()),e.after(),t.isConnected&&e.cleanup(),delete t._x_transitioning})});t._x_transitioning={beforeCancels:[],beforeCancel(s){this.beforeCancels.push(s)},cancel:_t(function(){for(;this.beforeCancels.length;)this.beforeCancels.shift()();o()}),finish:o},_(()=>{e.start(),e.during()}),Lr(),requestAnimationFrame(()=>{if(r)return;let s=Number(getComputedStyle(t).transitionDuration.replace(/,.*/,"").replace("s",""))*1e3,a=Number(getComputedStyle(t).transitionDelay.replace(/,.*/,"").replace("s",""))*1e3;s===0&&(s=Number(getComputedStyle(t).animationDuration.replace("s",""))*1e3),_(()=>{e.before()}),n=!0,requestAnimationFrame(()=>{r||(_(()=>{e.end()}),Ut(),setTimeout(t._x_transitioning.finish,s+a),i=!0)})})}function gt(t,e,r){if(t.indexOf(e)===-1)return r;let n=t[t.indexOf(e)+1];if(!n||e==="scale"&&isNaN(n))return r;if(e==="duration"||e==="delay"){let i=n.match(/([0-9]+)ms/);if(i)return i[1]}return e==="origin"&&["top","right","left","center","bottom"].includes(t[t.indexOf(e)+2])?[n,t[t.indexOf(e)+2]].join(" "):n}var j=!1;function S(t,e=()=>{}){return(...r)=>j?e(...r):t(...r)}function Br(t){return(...e)=>j&&t(...e)}var Vr=[];function W(t){Vr.push(t)}function zr(t,e){Vr.forEach(r=>r(t,e)),j=!0,Kr(()=>{O(e,(r,n)=>{n(r,()=>{})})}),j=!1}var $t=!1;function Hr(t,e){e._x_dataStack||(e._x_dataStack=t._x_dataStack),j=!0,$t=!0,Kr(()=>{ui(e)}),j=!1,$t=!1}function ui(t){let e=!1;O(t,(n,i)=>{L(n,(o,s)=>{if(e&&Ir(o))return s();e=!0,i(o,s)})})}function Kr(t){let e=D;ue((r,n)=>{let i=e(r);return B(i),()=>{}}),t(),ue(e)}function xt(t,e,r,n=[]){switch(t._x_bindings||(t._x_bindings=C({})),t._x_bindings[e]=r,e=n.includes("camel")?_i(e):e,e){case"value":ci(t,r);break;case"style":fi(t,r);break;case"class":li(t,r);break;case"selected":case"checked":pi(t,e,r);break;default:qr(t,e,r);break}}function ci(t,e){if(jt(t))t.attributes.value===void 0&&(t.value=e);else if(bt(t))Number.isInteger(e)?t.value=e:!Array.isArray(e)&&typeof e!="boolean"&&![null,void 0].includes(e)?t.value=String(e):Array.isArray(e)?t.checked=e.some(r=>gi(r,t.value)):t.checked=!!e;else if(t.tagName==="SELECT")mi(t,e);else{if(t.value===e)return;t.value=e===void 0?"":e}}function li(t,e){t._x_undoAddedClasses&&t._x_undoAddedClasses(),t._x_undoAddedClasses=mt(t,e)}function fi(t,e){t._x_undoAddedStyles&&t._x_undoAddedStyles(),t._x_undoAddedStyles=et(t,e)}function pi(t,e,r){qr(t,e,r),hi(t,e,r)}function qr(t,e,r){[null,void 0,!1].includes(r)&&yi(e)?t.removeAttribute(e):(Wr(e)&&(r=e),di(t,e,r))}function di(t,e,r){t.getAttribute(e)!=r&&t.setAttribute(e,r)}function hi(t,e,r){t[e]!==r&&(t[e]=r)}function mi(t,e){let r=[].concat(e).map(n=>n+"");Array.from(t.options).forEach(n=>{n.selected=r.includes(n.value)})}function _i(t){return t.toLowerCase().replace(/-(\w)/g,(e,r)=>r.toUpperCase())}function gi(t,e){return t==e}function yt(t){return[1,"1","true","on","yes",!0].includes(t)?!0:[0,"0","false","off","no",!1].includes(t)?!1:t?Boolean(t):null}var xi=new Set(["allowfullscreen","async","autofocus","autoplay","checked","controls","default","defer","disabled","formnovalidate","inert","ismap","itemscope","loop","multiple","muted","nomodule","novalidate","open","playsinline","readonly","required","reversed","selected","shadowrootclonable","shadowrootdelegatesfocus","shadowrootserializable"]);function Wr(t){return xi.has(t)}function yi(t){return!["aria-pressed","aria-checked","aria-expanded","aria-selected"].includes(t)}function Gr(t,e,r){return t._x_bindings&&t._x_bindings[e]!==void 0?t._x_bindings[e]:Yr(t,e,r)}function Jr(t,e,r,n=!0){if(t._x_bindings&&t._x_bindings[e]!==void 0)return t._x_bindings[e];if(t._x_inlineBindings&&t._x_inlineBindings[e]!==void 0){let i=t._x_inlineBindings[e];return i.extract=n,kt(()=>R(t,i.expression))}return Yr(t,e,r)}function Yr(t,e,r){let n=t.getAttribute(e);return n===null?typeof r=="function"?r():r:n===""?!0:Wr(e)?!![e,"true"].includes(n):n}function bt(t){return t.type==="checkbox"||t.localName==="ui-checkbox"||t.localName==="ui-switch"}function jt(t){return t.type==="radio"||t.localName==="ui-radio"}function Ft(t,e){let r;return function(){let n=this,i=arguments,o=function(){r=null,t.apply(n,i)};clearTimeout(r),r=setTimeout(o,e)}}function Bt(t,e){let r;return function(){let n=this,i=arguments;r||(t.apply(n,i),r=!0,setTimeout(()=>r=!1,e))}}function Vt({get:t,set:e},{get:r,set:n}){let i=!0,o,s,a=D(()=>{let u=t(),c=r();if(i)n(Te(u)),i=!1;else{let l=JSON.stringify(u),f=JSON.stringify(c);l!==o?n(Te(u)):l!==f&&e(Te(c))}o=JSON.stringify(t()),s=JSON.stringify(r())});return()=>{B(a)}}function Te(t){return typeof t=="object"?JSON.parse(JSON.stringify(t)):t}function Zr(t){(Array.isArray(t)?t:[t]).forEach(r=>r(z))}var rt={},Xr=!1;function Qr(t,e){if(Xr||(rt=C(rt),Xr=!0),e===void 0)return rt[t];rt[t]=e,ot(rt[t]),typeof e=="object"&&e!==null&&e.hasOwnProperty("init")&&typeof e.init=="function"&&rt[t].init()}function tn(){return rt}var en={};function rn(t,e){let r=typeof e!="function"?()=>e:e;return t instanceof Element?Ne(t,r()):(en[t]=r,()=>{})}function nn(t){return Object.entries(en).forEach(([e,r])=>{Object.defineProperty(t,e,{get(){return(...n)=>r(...n)}})}),t}function Ne(t,e,r){let n=[];for(;n.length;)n.pop()();let i=Object.entries(e).map(([s,a])=>({name:s,value:a})),o=Ee(i);return i=i.map(s=>o.find(a=>a.name===s.name)?{name:`x-bind:${s.name}`,value:`"${s.value}"`}:s),ht(t,i,r).map(s=>{n.push(s.runCleanups),s()}),()=>{for(;n.length;)n.pop()()}}var on={};function sn(t,e){on[t]=e}function an(t,e){return Object.entries(on).forEach(([r,n])=>{Object.defineProperty(t,r,{get(){return(...i)=>n.bind(e)(...i)},enumerable:!1})}),t}var bi={get reactive(){return C},get release(){return B},get effect(){return D},get raw(){return ae},get transaction(){return nr},version:"3.15.12",flushAndStopDeferringMutations:lr,dontAutoEvaluateFunctions:kt,disableEffectScheduling:tr,startObservingMutations:ft,stopObservingMutations:pe,setReactivityEngine:er,onAttributeRemoved:Tt,onAttributesAdded:St,closestDataStack:V,skipDuringClone:S,onlyDuringClone:Br,addRootSelector:It,addInitSelector:Dt,setErrorHandler:hr,interceptClone:W,addScopeToNode:U,deferMutations:cr,mapAttributes:st,evaluateLater:y,interceptInit:Ur,initInterceptors:ot,injectMagics:K,setEvaluator:_r,setRawEvaluator:xr,mergeProxies:k,extractProp:Jr,findClosest:T,onElRemoved:it,closestRoot:tt,destroyTree:$,interceptor:Ct,transition:Lt,setStyles:et,mutateDom:_,directive:h,entangle:Vt,throttle:Bt,debounce:Ft,evaluate:R,evaluateRaw:br,initTree:O,nextTick:at,prefixed:N,prefix:wr,plugin:Zr,magic:b,store:Qr,start:kr,clone:Hr,cloneNode:zr,bound:Gr,$data:Nt,watch:At,walk:L,data:sn,bind:rn},z=bi;var un=new WeakMap,cn=new Set;Object.getOwnPropertyNames(globalThis).forEach(t=>{t==="styleMedia"||t==="sharedStorage"||cn.add(globalThis[t])});var v=class{constructor(e,r,n,i){this.type=e,this.value=r,this.start=n,this.end=i}},Ce=class{constructor(e){this.input=e,this.position=0,this.tokens=[]}tokenize(){for(;this.position<this.input.length&&(this.skipWhitespace(),!(this.position>=this.input.length));){let e=this.input[this.position];this.isDigit(e)?this.readNumber():this.isAlpha(e)||e==="_"||e==="$"?this.readIdentifierOrKeyword():e==='"'||e==="'"?this.readString():e==="/"&&this.peek()==="/"?this.skipLineComment():this.readOperatorOrPunctuation()}return this.tokens.push(new v("EOF",null,this.position,this.position)),this.tokens}skipWhitespace(){for(;this.position<this.input.length&&/\s/.test(this.input[this.position]);)this.position++}skipLineComment(){for(;this.position<this.input.length&&this.input[this.position]!==`
6
+ `;)this.position++}isDigit(e){return/[0-9]/.test(e)}isAlpha(e){return/[a-zA-Z]/.test(e)}isAlphaNumeric(e){return/[a-zA-Z0-9_$]/.test(e)}peek(e=1){return this.input[this.position+e]||""}readNumber(){let e=this.position,r=!1;for(;this.position<this.input.length;){let i=this.input[this.position];if(this.isDigit(i))this.position++;else if(i==="."&&!r)r=!0,this.position++;else break}let n=this.input.slice(e,this.position);this.tokens.push(new v("NUMBER",parseFloat(n),e,this.position))}readIdentifierOrKeyword(){let e=this.position;for(;this.position<this.input.length&&this.isAlphaNumeric(this.input[this.position]);)this.position++;let r=this.input.slice(e,this.position);["true","false","null","undefined","new","typeof","void","delete","in","instanceof"].includes(r)?r==="true"||r==="false"?this.tokens.push(new v("BOOLEAN",r==="true",e,this.position)):r==="null"?this.tokens.push(new v("NULL",null,e,this.position)):r==="undefined"?this.tokens.push(new v("UNDEFINED",void 0,e,this.position)):this.tokens.push(new v("KEYWORD",r,e,this.position)):this.tokens.push(new v("IDENTIFIER",r,e,this.position))}readString(){let e=this.position,r=this.input[this.position];this.position++;let n="",i=!1;for(;this.position<this.input.length;){let o=this.input[this.position];if(i){switch(o){case"n":n+=`
7
+ `;break;case"t":n+=" ";break;case"r":n+="\r";break;case"\\":n+="\\";break;case r:n+=r;break;default:n+=o}i=!1}else if(o==="\\")i=!0;else if(o===r){this.position++,this.tokens.push(new v("STRING",n,e,this.position));return}else n+=o;this.position++}throw new Error(`Unterminated string starting at position ${e}`)}readOperatorOrPunctuation(){let e=this.position,r=this.input[this.position],n=this.peek(),i=this.peek(2);if(r==="="&&n==="="&&i==="=")this.position+=3,this.tokens.push(new v("OPERATOR","===",e,this.position));else if(r==="!"&&n==="="&&i==="=")this.position+=3,this.tokens.push(new v("OPERATOR","!==",e,this.position));else if(r==="="&&n==="=")this.position+=2,this.tokens.push(new v("OPERATOR","==",e,this.position));else if(r==="!"&&n==="=")this.position+=2,this.tokens.push(new v("OPERATOR","!=",e,this.position));else if(r==="<"&&n==="=")this.position+=2,this.tokens.push(new v("OPERATOR","<=",e,this.position));else if(r===">"&&n==="=")this.position+=2,this.tokens.push(new v("OPERATOR",">=",e,this.position));else if(r==="&"&&n==="&")this.position+=2,this.tokens.push(new v("OPERATOR","&&",e,this.position));else if(r==="|"&&n==="|")this.position+=2,this.tokens.push(new v("OPERATOR","||",e,this.position));else if(r==="+"&&n==="+")this.position+=2,this.tokens.push(new v("OPERATOR","++",e,this.position));else if(r==="-"&&n==="-")this.position+=2,this.tokens.push(new v("OPERATOR","--",e,this.position));else{this.position++;let o="()[]{},.;:?".includes(r)?"PUNCTUATION":"OPERATOR";this.tokens.push(new v(o,r,e,this.position))}}},ke=class{constructor(e){this.tokens=e,this.position=0}parse(){if(this.isAtEnd())throw new Error("Empty expression");let e=this.parseExpression();if(this.match("PUNCTUATION",";"),!this.isAtEnd())throw new Error(`Unexpected token: ${this.current().value}`);return e}parseExpression(){return this.parseAssignment()}parseAssignment(){let e=this.parseTernary();if(this.match("OPERATOR","=")){let r=this.parseAssignment();if(e.type==="Identifier"||e.type==="MemberExpression")return{type:"AssignmentExpression",left:e,operator:"=",right:r};throw new Error("Invalid assignment target")}return e}parseTernary(){let e=this.parseLogicalOr();if(this.match("PUNCTUATION","?")){let r=this.parseExpression();this.consume("PUNCTUATION",":");let n=this.parseExpression();return{type:"ConditionalExpression",test:e,consequent:r,alternate:n}}return e}parseLogicalOr(){let e=this.parseLogicalAnd();for(;this.match("OPERATOR","||");){let r=this.previous().value,n=this.parseLogicalAnd();e={type:"BinaryExpression",operator:r,left:e,right:n}}return e}parseLogicalAnd(){let e=this.parseEquality();for(;this.match("OPERATOR","&&");){let r=this.previous().value,n=this.parseEquality();e={type:"BinaryExpression",operator:r,left:e,right:n}}return e}parseEquality(){let e=this.parseRelational();for(;this.match("OPERATOR","==","!=","===","!==");){let r=this.previous().value,n=this.parseRelational();e={type:"BinaryExpression",operator:r,left:e,right:n}}return e}parseRelational(){let e=this.parseAdditive();for(;this.match("OPERATOR","<",">","<=",">=");){let r=this.previous().value,n=this.parseAdditive();e={type:"BinaryExpression",operator:r,left:e,right:n}}return e}parseAdditive(){let e=this.parseMultiplicative();for(;this.match("OPERATOR","+","-");){let r=this.previous().value,n=this.parseMultiplicative();e={type:"BinaryExpression",operator:r,left:e,right:n}}return e}parseMultiplicative(){let e=this.parseUnary();for(;this.match("OPERATOR","*","/","%");){let r=this.previous().value,n=this.parseUnary();e={type:"BinaryExpression",operator:r,left:e,right:n}}return e}parseUnary(){if(this.match("OPERATOR","++","--")){let e=this.previous().value,r=this.parseUnary();return{type:"UpdateExpression",operator:e,argument:r,prefix:!0}}if(this.match("OPERATOR","!","-","+")){let e=this.previous().value,r=this.parseUnary();return{type:"UnaryExpression",operator:e,argument:r,prefix:!0}}return this.parsePostfix()}parsePostfix(){let e=this.parseMember();return this.match("OPERATOR","++","--")?{type:"UpdateExpression",operator:this.previous().value,argument:e,prefix:!1}:e}parseMember(){let e=this.parsePrimary();for(;;)if(this.match("PUNCTUATION",".")){let r=this.consume("IDENTIFIER");e={type:"MemberExpression",object:e,property:{type:"Identifier",name:r.value},computed:!1}}else if(this.match("PUNCTUATION","[")){let r=this.parseExpression();this.consume("PUNCTUATION","]"),e={type:"MemberExpression",object:e,property:r,computed:!0}}else if(this.match("PUNCTUATION","(")){let r=this.parseArguments();e={type:"CallExpression",callee:e,arguments:r}}else break;return e}parseArguments(){let e=[];if(!this.check("PUNCTUATION",")"))do e.push(this.parseExpression());while(this.match("PUNCTUATION",","));return this.consume("PUNCTUATION",")"),e}parsePrimary(){if(this.match("NUMBER"))return{type:"Literal",value:this.previous().value};if(this.match("STRING"))return{type:"Literal",value:this.previous().value};if(this.match("BOOLEAN"))return{type:"Literal",value:this.previous().value};if(this.match("NULL"))return{type:"Literal",value:null};if(this.match("UNDEFINED"))return{type:"Literal",value:void 0};if(this.match("IDENTIFIER"))return{type:"Identifier",name:this.previous().value};if(this.match("PUNCTUATION","(")){let e=this.parseExpression();return this.consume("PUNCTUATION",")"),e}if(this.match("PUNCTUATION","["))return this.parseArrayLiteral();if(this.match("PUNCTUATION","{"))return this.parseObjectLiteral();throw new Error(`Unexpected token: ${this.current().type} "${this.current().value}"`)}parseArrayLiteral(){let e=[];for(;!this.check("PUNCTUATION","]")&&!this.isAtEnd()&&(e.push(this.parseExpression()),this.match("PUNCTUATION",","));)if(this.check("PUNCTUATION","]"))break;return this.consume("PUNCTUATION","]"),{type:"ArrayExpression",elements:e}}parseObjectLiteral(){let e=[];for(;!this.check("PUNCTUATION","}")&&!this.isAtEnd();){let r,n=!1;if(this.match("STRING"))r={type:"Literal",value:this.previous().value};else if(this.match("IDENTIFIER"))r={type:"Identifier",name:this.previous().value};else if(this.match("PUNCTUATION","["))r=this.parseExpression(),n=!0,this.consume("PUNCTUATION","]");else throw new Error("Expected property key");this.consume("PUNCTUATION",":");let i=this.parseExpression();if(e.push({type:"Property",key:r,value:i,computed:n,shorthand:!1}),this.match("PUNCTUATION",",")){if(this.check("PUNCTUATION","}"))break}else break}return this.consume("PUNCTUATION","}"),{type:"ObjectExpression",properties:e}}match(...e){for(let r=0;r<e.length;r++){let n=e[r];if(r===0&&e.length>1){let i=n;for(let o=1;o<e.length;o++)if(this.check(i,e[o]))return this.advance(),!0;return!1}else if(e.length===1)return this.checkType(n)?(this.advance(),!0):!1}return!1}check(e,r){return this.isAtEnd()?!1:r!==void 0?this.current().type===e&&this.current().value===r:this.current().type===e}checkType(e){return this.isAtEnd()?!1:this.current().type===e}advance(){return this.isAtEnd()||this.position++,this.previous()}isAtEnd(){return this.current().type==="EOF"}current(){return this.tokens[this.position]}previous(){return this.tokens[this.position-1]}consume(e,r){if(r!==void 0){if(this.check(e,r))return this.advance();throw new Error(`Expected ${e} "${r}" but got ${this.current().type} "${this.current().value}"`)}if(this.check(e))return this.advance();throw new Error(`Expected ${e} but got ${this.current().type} "${this.current().value}"`)}},Re=class{evaluate({node:e,scope:r={},context:n=null,forceBindingRootScopeToFunctions:i=!0}){switch(e.type){case"Literal":return e.value;case"Identifier":if(e.name in r){let p=r[e.name];return this.checkForDangerousValues(p),typeof p=="function"?p.bind(r):p}throw new Error(`Undefined variable: ${e.name}`);case"MemberExpression":let o=this.evaluate({node:e.object,scope:r,context:n,forceBindingRootScopeToFunctions:i});if(o==null)throw new Error("Cannot read property of null or undefined");let s;e.computed?s=this.evaluate({node:e.property,scope:r,context:n,forceBindingRootScopeToFunctions:i}):s=e.property.name,this.checkForDangerousKeywords(s);let a=o[s];return this.checkForDangerousValues(a),typeof a=="function"?i?a.bind(r):a.bind(o):a;case"CallExpression":let u=e.arguments.map(p=>this.evaluate({node:p,scope:r,context:n,forceBindingRootScopeToFunctions:i})),c;if(e.callee.type==="MemberExpression"){let p=this.evaluate({node:e.callee.object,scope:r,context:n,forceBindingRootScopeToFunctions:i}),g;e.callee.computed?g=this.evaluate({node:e.callee.property,scope:r,context:n,forceBindingRootScopeToFunctions:i}):g=e.callee.property.name,this.checkForDangerousKeywords(g);let I=p[g];if(typeof I!="function")throw new Error("Value is not a function");c=I.apply(p,u)}else if(e.callee.type==="Identifier"){let p=e.callee.name,g;if(p in r)g=r[p];else throw new Error(`Undefined variable: ${p}`);if(typeof g!="function")throw new Error("Value is not a function");let I=n!==null?n:r;c=g.apply(I,u)}else{let p=this.evaluate({node:e.callee,scope:r,context:n,forceBindingRootScopeToFunctions:i});if(typeof p!="function")throw new Error("Value is not a function");c=p.apply(n,u)}return this.checkForDangerousValues(c),c;case"UnaryExpression":let l=this.evaluate({node:e.argument,scope:r,context:n,forceBindingRootScopeToFunctions:i});switch(e.operator){case"!":return!l;case"-":return-l;case"+":return+l;default:throw new Error(`Unknown unary operator: ${e.operator}`)}case"UpdateExpression":if(e.argument.type==="Identifier"){let p=e.argument.name;if(!(p in r))throw new Error(`Undefined variable: ${p}`);let g=r[p];return e.operator==="++"?r[p]=g+1:e.operator==="--"&&(r[p]=g-1),e.prefix?r[p]:g}else if(e.argument.type==="MemberExpression"){let p=this.evaluate({node:e.argument.object,scope:r,context:n,forceBindingRootScopeToFunctions:i}),g=e.argument.computed?this.evaluate({node:e.argument.property,scope:r,context:n,forceBindingRootScopeToFunctions:i}):e.argument.property.name;if(this.isDOMObject(p))throw new Error("Property assignments on DOM objects are prohibited in the CSP build");this.checkForDangerousKeywords(g);let I=p[g];return e.operator==="++"?p[g]=I+1:e.operator==="--"&&(p[g]=I-1),e.prefix?p[g]:I}throw new Error("Invalid update expression target");case"BinaryExpression":let f=this.evaluate({node:e.left,scope:r,context:n,forceBindingRootScopeToFunctions:i}),w=()=>this.evaluate({node:e.right,scope:r,context:n,forceBindingRootScopeToFunctions:i});if(e.operator==="&&")return f&&w();if(e.operator==="||")return f||w();let m=w();switch(e.operator){case"+":return f+m;case"-":return f-m;case"*":return f*m;case"/":return f/m;case"%":return f%m;case"==":return f==m;case"!=":return f!=m;case"===":return f===m;case"!==":return f!==m;case"<":return f<m;case">":return f>m;case"<=":return f<=m;case">=":return f>=m;default:throw new Error(`Unknown binary operator: ${e.operator}`)}case"ConditionalExpression":return this.evaluate({node:e.test,scope:r,context:n,forceBindingRootScopeToFunctions:i})?this.evaluate({node:e.consequent,scope:r,context:n,forceBindingRootScopeToFunctions:i}):this.evaluate({node:e.alternate,scope:r,context:n,forceBindingRootScopeToFunctions:i});case"AssignmentExpression":let d=this.evaluate({node:e.right,scope:r,context:n,forceBindingRootScopeToFunctions:i});if(e.left.type==="Identifier")return r[e.left.name]=d,d;if(e.left.type==="MemberExpression"){let p=this.evaluate({node:e.left.object,scope:r,context:n,forceBindingRootScopeToFunctions:i}),g=e.left.computed?this.evaluate({node:e.left.property,scope:r,context:n,forceBindingRootScopeToFunctions:i}):e.left.property.name;if(this.isDOMObject(p))throw new Error("Property assignments on DOM objects are prohibited in the CSP build");return this.checkForDangerousKeywords(g),p[g]=d,d}throw new Error("Invalid assignment target");case"ArrayExpression":return e.elements.map(p=>this.evaluate({node:p,scope:r,context:n,forceBindingRootScopeToFunctions:i}));case"ObjectExpression":let E={};for(let p of e.properties){let g=p.computed?this.evaluate({node:p.key,scope:r,context:n,forceBindingRootScopeToFunctions:i}):p.key.type==="Identifier"?p.key.name:this.evaluate({node:p.key,scope:r,context:n,forceBindingRootScopeToFunctions:i}),I=this.evaluate({node:p.value,scope:r,context:n,forceBindingRootScopeToFunctions:i});E[g]=I}return E;default:throw new Error(`Unknown node type: ${e.type}`)}}isDOMObject(e){return e instanceof Node||typeof CSSStyleDeclaration<"u"&&e instanceof CSSStyleDeclaration||typeof DOMStringMap<"u"&&e instanceof DOMStringMap||typeof DOMTokenList<"u"&&e instanceof DOMTokenList||typeof NamedNodeMap<"u"&&e instanceof NamedNodeMap}checkForDangerousKeywords(e){if(["constructor","prototype","__proto__","__defineGetter__","__defineSetter__","insertAdjacentHTML","setAttribute","setAttributeNS","setAttributeNode","setAttributeNodeNS"].includes(e))throw new Error(`Accessing "${e}" is prohibited in the CSP build`)}checkForDangerousValues(e){if(e!==null&&!(typeof e!="object"&&typeof e!="function")&&!un.has(e)){if(e instanceof HTMLIFrameElement||e instanceof HTMLScriptElement)throw new Error("Accessing iframes and scripts is prohibited in the CSP build");if(cn.has(e))throw new Error("Accessing global variables is prohibited in the CSP build");return un.set(e,!0),!0}}};function Me(t){try{let r=new Ce(t).tokenize(),i=new ke(r).parse(),o=new Re;return function(s={}){let{scope:a={},context:u=null,forceBindingRootScopeToFunctions:c=!1}=s;return o.evaluate({node:i,scope:a,context:u,forceBindingRootScopeToFunctions:c})}}catch(e){throw new Error(`CSP Parser Error: ${e.message}`)}}function ln(t,e,r={}){let n=pn(t),i=k([r.scope??{},...n]),o=r.params??[],a=Me(e)({scope:i,forceBindingRootScopeToFunctions:!0});return typeof a=="function"&&q?a.apply(i,o):a}function fn(t,e){let r=pn(t);if(typeof e=="function")return yr(r,e);let n=wi(t,e,r);return ge.bind(null,t,e,n)}function pn(t){let e={};return K(e,t),[e,...V(t)]}function wi(t,e,r){if(t instanceof HTMLIFrameElement)throw new Error("Evaluating expressions on an iframe is prohibited in the CSP build");if(t instanceof HTMLScriptElement)throw new Error("Evaluating expressions on a script is prohibited in the CSP build");return(n=()=>{},{scope:i={},params:o=[]}={})=>{let s=k([i,...r]),u=Me(e)({scope:s,forceBindingRootScopeToFunctions:!0});if(q&&typeof u=="function"){let c=u.apply(u,o);c instanceof Promise?c.then(l=>n(l)):n(c)}else typeof u=="object"&&u instanceof Promise?u.then(c=>n(c)):n(u)}}function Pe(t,e){let r=Object.create(null),n=t.split(",");for(let i=0;i<n.length;i++)r[n[i]]=!0;return e?i=>!!r[i.toLowerCase()]:i=>!!r[i]}var Ei="itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly";var oa=Pe(Ei+",async,autofocus,autoplay,controls,default,defer,disabled,hidden,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");var dn=Object.freeze({}),sa=Object.freeze([]);var vi=Object.prototype.hasOwnProperty,wt=(t,e)=>vi.call(t,e),G=Array.isArray,ut=t=>hn(t)==="[object Map]";var Ai=t=>typeof t=="string",zt=t=>typeof t=="symbol",Et=t=>t!==null&&typeof t=="object";var Oi=Object.prototype.toString,hn=t=>Oi.call(t),Ie=t=>hn(t).slice(8,-1);var Ht=t=>Ai(t)&&t!=="NaN"&&t[0]!=="-"&&""+parseInt(t,10)===t;var Kt=t=>{let e=Object.create(null);return r=>e[r]||(e[r]=t(r))},Si=/-(\w)/g,aa=Kt(t=>t.replace(Si,(e,r)=>r?r.toUpperCase():"")),Ti=/\B([A-Z])/g,ua=Kt(t=>t.replace(Ti,"-$1").toLowerCase()),De=Kt(t=>t.charAt(0).toUpperCase()+t.slice(1)),ca=Kt(t=>t?`on${De(t)}`:""),Ue=(t,e)=>t!==e&&(t===t||e===e);var Le=new WeakMap,vt=[],F,nt=Symbol("iterate"),$e=Symbol("Map key iterate");function Ni(t){return t&&t._isEffect===!0}function bn(t,e=dn){Ni(t)&&(t=t.raw);let r=ki(t,e);return e.lazy||r(),r}function wn(t){t.active&&(En(t),t.options.onStop&&t.options.onStop(),t.active=!1)}var Ci=0;function ki(t,e){let r=function(){if(!r.active)return t();if(!vt.includes(r)){En(r);try{return Mi(),vt.push(r),F=r,t()}finally{vt.pop(),vn(),F=vt[vt.length-1]}}};return r.id=Ci++,r.allowRecurse=!!e.allowRecurse,r._isEffect=!0,r.active=!0,r.raw=t,r.deps=[],r.options=e,r}function En(t){let{deps:e}=t;if(e.length){for(let r=0;r<e.length;r++)e[r].delete(t);e.length=0}}var ct=!0,Fe=[];function Ri(){Fe.push(ct),ct=!1}function Mi(){Fe.push(ct),ct=!0}function vn(){let t=Fe.pop();ct=t===void 0?!0:t}function M(t,e,r){if(!ct||F===void 0)return;let n=Le.get(t);n||Le.set(t,n=new Map);let i=n.get(r);i||n.set(r,i=new Set),i.has(F)||(i.add(F),F.deps.push(i),F.options.onTrack&&F.options.onTrack({effect:F,target:t,type:e,key:r}))}function Y(t,e,r,n,i,o){let s=Le.get(t);if(!s)return;let a=new Set,u=l=>{l&&l.forEach(f=>{(f!==F||f.allowRecurse)&&a.add(f)})};if(e==="clear")s.forEach(u);else if(r==="length"&&G(t))s.forEach((l,f)=>{(f==="length"||f>=n)&&u(l)});else switch(r!==void 0&&u(s.get(r)),e){case"add":G(t)?Ht(r)&&u(s.get("length")):(u(s.get(nt)),ut(t)&&u(s.get($e)));break;case"delete":G(t)||(u(s.get(nt)),ut(t)&&u(s.get($e)));break;case"set":ut(t)&&u(s.get(nt));break}let c=l=>{l.options.onTrigger&&l.options.onTrigger({effect:l,target:t,key:r,type:e,newValue:n,oldValue:i,oldTarget:o}),l.options.scheduler?l.options.scheduler(l):l()};a.forEach(c)}var Pi=Pe("__proto__,__v_isRef,__isVue"),An=new Set(Object.getOwnPropertyNames(Symbol).map(t=>Symbol[t]).filter(zt)),Ii=On();var Di=On(!0);var mn=Ui();function Ui(){let t={};return["includes","indexOf","lastIndexOf"].forEach(e=>{t[e]=function(...r){let n=x(this);for(let o=0,s=this.length;o<s;o++)M(n,"get",o+"");let i=n[e](...r);return i===-1||i===!1?n[e](...r.map(x)):i}}),["push","pop","shift","unshift","splice"].forEach(e=>{t[e]=function(...r){Ri();let n=x(this)[e].apply(this,r);return vn(),n}}),t}function On(t=!1,e=!1){return function(n,i,o){if(i==="__v_isReactive")return!t;if(i==="__v_isReadonly")return t;if(i==="__v_raw"&&o===(t?e?Xi:Cn:e?Zi:Nn).get(n))return n;let s=G(n);if(!t&&s&&wt(mn,i))return Reflect.get(mn,i,o);let a=Reflect.get(n,i,o);return(zt(i)?An.has(i):Pi(i))||(t||M(n,"get",i),e)?a:je(a)?!s||!Ht(i)?a.value:a:Et(a)?t?kn(a):Xt(a):a}}var Li=$i();function $i(t=!1){return function(r,n,i,o){let s=r[n];if(!t&&(i=x(i),s=x(s),!G(r)&&je(s)&&!je(i)))return s.value=i,!0;let a=G(r)&&Ht(n)?Number(n)<r.length:wt(r,n),u=Reflect.set(r,n,i,o);return r===x(o)&&(a?Ue(i,s)&&Y(r,"set",n,i,s):Y(r,"add",n,i)),u}}function ji(t,e){let r=wt(t,e),n=t[e],i=Reflect.deleteProperty(t,e);return i&&r&&Y(t,"delete",e,void 0,n),i}function Fi(t,e){let r=Reflect.has(t,e);return(!zt(e)||!An.has(e))&&M(t,"has",e),r}function Bi(t){return M(t,"iterate",G(t)?"length":nt),Reflect.ownKeys(t)}var Vi={get:Ii,set:Li,deleteProperty:ji,has:Fi,ownKeys:Bi},zi={get:Di,set(t,e){return console.warn(`Set operation on key "${String(e)}" failed: target is readonly.`,t),!0},deleteProperty(t,e){return console.warn(`Delete operation on key "${String(e)}" failed: target is readonly.`,t),!0}};var Be=t=>Et(t)?Xt(t):t,Ve=t=>Et(t)?kn(t):t,ze=t=>t,Zt=t=>Reflect.getPrototypeOf(t);function qt(t,e,r=!1,n=!1){t=t.__v_raw;let i=x(t),o=x(e);e!==o&&!r&&M(i,"get",e),!r&&M(i,"get",o);let{has:s}=Zt(i),a=n?ze:r?Ve:Be;if(s.call(i,e))return a(t.get(e));if(s.call(i,o))return a(t.get(o));t!==i&&t.get(e)}function Wt(t,e=!1){let r=this.__v_raw,n=x(r),i=x(t);return t!==i&&!e&&M(n,"has",t),!e&&M(n,"has",i),t===i?r.has(t):r.has(t)||r.has(i)}function Gt(t,e=!1){return t=t.__v_raw,!e&&M(x(t),"iterate",nt),Reflect.get(t,"size",t)}function _n(t){t=x(t);let e=x(this);return Zt(e).has.call(e,t)||(e.add(t),Y(e,"add",t,t)),this}function gn(t,e){e=x(e);let r=x(this),{has:n,get:i}=Zt(r),o=n.call(r,t);o?Tn(r,n,t):(t=x(t),o=n.call(r,t));let s=i.call(r,t);return r.set(t,e),o?Ue(e,s)&&Y(r,"set",t,e,s):Y(r,"add",t,e),this}function xn(t){let e=x(this),{has:r,get:n}=Zt(e),i=r.call(e,t);i?Tn(e,r,t):(t=x(t),i=r.call(e,t));let o=n?n.call(e,t):void 0,s=e.delete(t);return i&&Y(e,"delete",t,void 0,o),s}function yn(){let t=x(this),e=t.size!==0,r=ut(t)?new Map(t):new Set(t),n=t.clear();return e&&Y(t,"clear",void 0,void 0,r),n}function Jt(t,e){return function(n,i){let o=this,s=o.__v_raw,a=x(s),u=e?ze:t?Ve:Be;return!t&&M(a,"iterate",nt),s.forEach((c,l)=>n.call(i,u(c),u(l),o))}}function Yt(t,e,r){return function(...n){let i=this.__v_raw,o=x(i),s=ut(o),a=t==="entries"||t===Symbol.iterator&&s,u=t==="keys"&&s,c=i[t](...n),l=r?ze:e?Ve:Be;return!e&&M(o,"iterate",u?$e:nt),{next(){let{value:f,done:w}=c.next();return w?{value:f,done:w}:{value:a?[l(f[0]),l(f[1])]:l(f),done:w}},[Symbol.iterator](){return this}}}}function J(t){return function(...e){{let r=e[0]?`on key "${e[0]}" `:"";console.warn(`${De(t)} operation ${r}failed: target is readonly.`,x(this))}return t==="delete"?!1:this}}function Hi(){let t={get(o){return qt(this,o)},get size(){return Gt(this)},has:Wt,add:_n,set:gn,delete:xn,clear:yn,forEach:Jt(!1,!1)},e={get(o){return qt(this,o,!1,!0)},get size(){return Gt(this)},has:Wt,add:_n,set:gn,delete:xn,clear:yn,forEach:Jt(!1,!0)},r={get(o){return qt(this,o,!0)},get size(){return Gt(this,!0)},has(o){return Wt.call(this,o,!0)},add:J("add"),set:J("set"),delete:J("delete"),clear:J("clear"),forEach:Jt(!0,!1)},n={get(o){return qt(this,o,!0,!0)},get size(){return Gt(this,!0)},has(o){return Wt.call(this,o,!0)},add:J("add"),set:J("set"),delete:J("delete"),clear:J("clear"),forEach:Jt(!0,!0)};return["keys","values","entries",Symbol.iterator].forEach(o=>{t[o]=Yt(o,!1,!1),r[o]=Yt(o,!0,!1),e[o]=Yt(o,!1,!0),n[o]=Yt(o,!0,!0)}),[t,r,e,n]}var[Ki,qi,Wi,Gi]=Hi();function Sn(t,e){let r=e?t?Gi:Wi:t?qi:Ki;return(n,i,o)=>i==="__v_isReactive"?!t:i==="__v_isReadonly"?t:i==="__v_raw"?n:Reflect.get(wt(r,i)&&i in n?r:n,i,o)}var Ji={get:Sn(!1,!1)};var Yi={get:Sn(!0,!1)};function Tn(t,e,r){let n=x(r);if(n!==r&&e.call(t,n)){let i=Ie(t);console.warn(`Reactive ${i} contains both the raw and reactive versions of the same object${i==="Map"?" as keys":""}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`)}}var Nn=new WeakMap,Zi=new WeakMap,Cn=new WeakMap,Xi=new WeakMap;function Qi(t){switch(t){case"Object":case"Array":return 1;case"Map":case"Set":case"WeakMap":case"WeakSet":return 2;default:return 0}}function to(t){return t.__v_skip||!Object.isExtensible(t)?0:Qi(Ie(t))}function Xt(t){return t&&t.__v_isReadonly?t:Rn(t,!1,Vi,Ji,Nn)}function kn(t){return Rn(t,!0,zi,Yi,Cn)}function Rn(t,e,r,n,i){if(!Et(t))return console.warn(`value cannot be made reactive: ${String(t)}`),t;if(t.__v_raw&&!(e&&t.__v_isReactive))return t;let o=i.get(t);if(o)return o;let s=to(t);if(s===0)return t;let a=new Proxy(t,s===2?n:r);return i.set(t,a),a}function x(t){return t&&x(t.__v_raw)||t}function je(t){return Boolean(t&&t.__v_isRef===!0)}b("nextTick",()=>at);b("dispatch",t=>Q.bind(Q,t));b("watch",(t,{evaluateLater:e,cleanup:r})=>(n,i)=>{let o=e(n),a=At(()=>{let u;return o(c=>u=c),u},i);r(a)});b("store",tn);b("data",t=>Nt(t));b("root",t=>tt(t));b("refs",t=>(t._x_refs_proxy||(t._x_refs_proxy=k(eo(t))),t._x_refs_proxy));function eo(t){let e=[];return T(t,r=>{r._x_refs&&e.push(r._x_refs)}),e}var He={};function Ke(t){return He[t]||(He[t]=0),++He[t]}function Mn(t,e){return T(t,r=>{if(r._x_ids&&r._x_ids[e])return!0})}function Pn(t,e){t._x_ids||(t._x_ids={}),t._x_ids[e]||(t._x_ids[e]=Ke(e))}b("id",(t,{cleanup:e})=>(r,n=null)=>{let i=`${r}${n?`-${n}`:""}`;return ro(t,i,e,()=>{let o=Mn(t,r),s=o?o._x_ids[r]:Ke(r);return n?`${r}-${s}-${n}`:`${r}-${s}`})});W((t,e)=>{t._x_id&&(e._x_id=t._x_id)});function ro(t,e,r,n){if(t._x_id||(t._x_id={}),t._x_id[e])return t._x_id[e];let i=n();return t._x_id[e]=i,r(()=>{delete t._x_id[e]}),i}b("el",t=>t);In("Focus","focus","focus");In("Persist","persist","persist");function In(t,e,r){b(e,n=>A(`You can't use [$${e}] without first installing the "${t}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}h("modelable",(t,{expression:e},{effect:r,evaluateLater:n,cleanup:i})=>{let o=n(e),s=()=>{let l;return o(f=>l=f),l},a=n(`${e} = __placeholder`),u=l=>a(()=>{},{scope:{__placeholder:l}}),c=s();u(c),queueMicrotask(()=>{if(!t._x_model)return;t._x_removeModelListeners.default();let l=t._x_model.get,f=t._x_model.setWithModifiers,w=Vt({get(){return l()},set(m){f(m)}},{get(){return s()},set(m){u(m)}});i(w)})});h("teleport",(t,{modifiers:e,expression:r},{cleanup:n})=>{t.tagName.toLowerCase()!=="template"&&A("x-teleport can only be used on a <template> tag",t);let i=Dn(r),o=t.content.cloneNode(!0).firstElementChild;t._x_teleport=o,o._x_teleportBack=t,t.setAttribute("data-teleport-template",!0),o.setAttribute("data-teleport-target",!0),t._x_forwardEvents&&t._x_forwardEvents.forEach(a=>{o.addEventListener(a,u=>{u.stopPropagation(),t.dispatchEvent(new u.constructor(u.type,u))})}),U(o,{},t);let s=(a,u,c)=>{c.includes("prepend")?u.parentNode.insertBefore(a,u):c.includes("append")?u.parentNode.insertBefore(a,u.nextSibling):u.appendChild(a)};_(()=>{S(()=>{s(o,i,e),O(o)})()}),t._x_teleportPutBack=()=>{let a=Dn(r);_(()=>{s(t._x_teleport,a,e)})},n(()=>_(()=>{o.remove(),$(o)}))});var no=document.createElement("div");function Dn(t){let e=S(()=>document.querySelector(t),()=>no)();return e||A(`Cannot find x-teleport element for selector: "${t}"`),e}var Un=()=>{};Un.inline=(t,{modifiers:e},{cleanup:r})=>{e.includes("self")?t._x_ignoreSelf=!0:t._x_ignore=!0,r(()=>{e.includes("self")?delete t._x_ignoreSelf:delete t._x_ignore})};h("ignore",Un);h("effect",S((t,{expression:e},{effect:r})=>{r(y(t,e))}));function H(t,e,r,n){let i=t,o=u=>n(u),s={},a=(u,c)=>l=>c(u,l);return r.includes("dot")&&(e=io(e)),r.includes("camel")&&(e=oo(e)),r.includes("capture")&&(s.capture=!0),r.includes("window")&&(i=window),r.includes("document")&&(i=document),r.includes("passive")&&(s.passive=r[r.indexOf("passive")+1]!=="false"),o=qe(r,o),r.includes("prevent")&&(o=a(o,(u,c)=>{c.preventDefault(),u(c)})),r.includes("stop")&&(o=a(o,(u,c)=>{c.stopPropagation(),u(c)})),r.includes("once")&&(o=a(o,(u,c)=>{u(c),i.removeEventListener(e,o,s)})),(r.includes("away")||r.includes("outside"))&&(i=document,o=a(o,(u,c)=>{t.contains(c.target)||c.target.isConnected!==!1&&(t.offsetWidth<1&&t.offsetHeight<1||t._x_isShown!==!1&&u(c))})),r.includes("self")&&(o=a(o,(u,c)=>{c.target===t&&u(c)})),e==="submit"&&(o=a(o,(u,c)=>{c.target._x_pendingModelUpdates&&c.target._x_pendingModelUpdates.forEach(l=>l()),u(c)})),(ao(e)||$n(e))&&(o=a(o,(u,c)=>{uo(c,r)||u(c)})),i.addEventListener(e,o,s),()=>{i.removeEventListener(e,o,s)}}function qe(t,e){if(t.includes("debounce")){let r=t[t.indexOf("debounce")+1]||"invalid-wait",n=Qt(r.split("ms")[0])?Number(r.split("ms")[0]):250;e=Ft(e,n)}if(t.includes("throttle")){let r=t[t.indexOf("throttle")+1]||"invalid-wait",n=Qt(r.split("ms")[0])?Number(r.split("ms")[0]):250;e=Bt(e,n)}return e}function io(t){return t.replace(/-/g,".")}function oo(t){return t.toLowerCase().replace(/-(\w)/g,(e,r)=>r.toUpperCase())}function Qt(t){return!Array.isArray(t)&&!isNaN(t)}function so(t){return[" ","_"].includes(t)?t:t.replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[_\s]/,"-").toLowerCase()}function ao(t){return["keydown","keyup"].includes(t)}function $n(t){return["contextmenu","click","mouse"].some(e=>t.includes(e))}function uo(t,e){let r=e.filter(o=>!["window","document","prevent","stop","once","capture","self","away","outside","passive","preserve-scroll","blur","change","lazy"].includes(o));if(r.includes("debounce")){let o=r.indexOf("debounce");r.splice(o,Qt((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.includes("throttle")){let o=r.indexOf("throttle");r.splice(o,Qt((r[o+1]||"invalid-wait").split("ms")[0])?2:1)}if(r.length===0||r.length===1&&Ln(t.key).includes(r[0]))return!1;let i=["ctrl","shift","alt","meta","cmd","super"].filter(o=>r.includes(o));return r=r.filter(o=>!i.includes(o)),!(i.length>0&&i.filter(s=>((s==="cmd"||s==="super")&&(s="meta"),t[`${s}Key`])).length===i.length&&($n(t.type)||Ln(t.key).includes(r[0])))}function Ln(t){if(!t)return[];t=so(t);let e={ctrl:"control",slash:"/",space:" ",spacebar:" ",cmd:"meta",esc:"escape",up:"arrow-up",down:"arrow-down",left:"arrow-left",right:"arrow-right",period:".",comma:",",equal:"=",minus:"-",underscore:"_"};return e[t]=t,Object.keys(e).map(r=>{if(e[r]===t)return r}).filter(r=>r)}h("model",(t,{modifiers:e,expression:r},{effect:n,cleanup:i})=>{let o=t;e.includes("parent")&&(o=T(t,d=>d!==t));let s=y(o,r),a;typeof r=="string"?a=y(o,`${r} = __placeholder`):typeof r=="function"&&typeof r()=="string"?a=y(o,`${r()} = __placeholder`):a=()=>{};let u=()=>{let d;return s(E=>d=E),jn(d)?d.get():d},c=d=>{let E;s(p=>E=p),jn(E)?E.set(d):a(()=>{},{scope:{__placeholder:d}})};typeof r=="string"&&t.type==="radio"&&_(()=>{t.hasAttribute("name")||t.setAttribute("name",r)});let l=e.includes("change")||e.includes("lazy"),f=e.includes("blur"),w=e.includes("enter"),m=l||f||w,P;if(j)P=()=>{};else if(m){let d=[],E=p=>c(te(t,e,p,u()));if(l&&d.push(H(t,"change",e,E)),f&&(d.push(H(t,"blur",e,E)),t.form)){let p=t.form,g=()=>E({target:t});p._x_pendingModelUpdates||(p._x_pendingModelUpdates=[]),p._x_pendingModelUpdates.push(g),i(()=>{p._x_pendingModelUpdates&&p._x_pendingModelUpdates.splice(p._x_pendingModelUpdates.indexOf(g),1)})}w&&d.push(H(t,"keydown",e,p=>{p.key==="Enter"&&E(p)})),P=()=>d.forEach(p=>p())}else{let d=t.tagName.toLowerCase()==="select"||["checkbox","radio"].includes(t.type)?"change":"input";P=H(t,d,e,E=>{c(te(t,e,E,u()))})}if(e.includes("fill")&&([void 0,null,""].includes(u())||bt(t)&&Array.isArray(u())||t.tagName.toLowerCase()==="select"&&t.multiple)&&c(te(t,e,{target:t},u())),t._x_removeModelListeners||(t._x_removeModelListeners={}),t._x_removeModelListeners.default=P,i(()=>t._x_removeModelListeners.default()),t.form){let d=H(t.form,"reset",[],E=>{at(()=>t._x_model&&t._x_model.set(te(t,e,{target:t},u())))});i(()=>d())}t._x_model={get(){return u()},set(d){c(d)},setWithModifiers:qe(e,c)},t._x_forceModelUpdate=d=>{d===void 0&&typeof r=="string"&&r.match(/\./)&&(d=""),_(()=>{bt(t)?Array.isArray(d)?t.checked=d.some(E=>E==t.value):t.checked=!!d:jt(t)?typeof d=="boolean"?t.checked=yt(t.value)===d:t.checked=t.value==d:xt(t,"value",d)})},n(()=>{let d=u();e.includes("unintrusive")&&document.activeElement.isSameNode(t)||t._x_forceModelUpdate(d)})});function te(t,e,r,n){return _(()=>{if(r instanceof CustomEvent&&r.detail!==void 0)return r.detail!==null&&r.detail!==void 0?r.detail:r.target.value;if(bt(t))if(Array.isArray(n)){let i=null;return e.includes("number")?i=We(r.target.value):e.includes("boolean")?i=yt(r.target.value):i=r.target.value,r.target.checked?n.includes(i)?n:n.concat([i]):n.filter(o=>!co(o,i))}else return r.target.checked;else{if(t.tagName.toLowerCase()==="select"&&t.multiple)return e.includes("number")?Array.from(r.target.selectedOptions).map(i=>{let o=i.value||i.text;return We(o)}):e.includes("boolean")?Array.from(r.target.selectedOptions).map(i=>{let o=i.value||i.text;return yt(o)}):Array.from(r.target.selectedOptions).map(i=>i.value||i.text);{let i;return jt(t)?r.target.checked?i=r.target.value:i=n:i=r.target.value,e.includes("number")?We(i):e.includes("boolean")?yt(i):e.includes("trim")?i.trim():i}}})}function We(t){let e=t?parseFloat(t):null;return lo(e)?e:t}function co(t,e){return t==e}function lo(t){return!Array.isArray(t)&&!isNaN(t)}function jn(t){return t!==null&&typeof t=="object"&&typeof t.get=="function"&&typeof t.set=="function"}h("cloak",t=>queueMicrotask(()=>_(()=>t.removeAttribute(N("cloak")))));Dt(()=>`[${N("init")}]`);h("init",S((t,{expression:e},{evaluate:r})=>typeof e=="string"?!!e.trim()&&r(e,{},!1):r(e,{},!1)));h("text",(t,{expression:e},{effect:r,evaluateLater:n})=>{let i=n(e);r(()=>{i(o=>{_(()=>{t.textContent=o})})})});h("html",(t,{expression:e},{effect:r,evaluateLater:n})=>{let i=n(e);r(()=>{i(o=>{_(()=>{t.innerHTML=o??"",t._x_ignoreSelf=!0,O(t),delete t._x_ignoreSelf})})})});st(Mt(":",Pt(N("bind:"))));var Fn=(t,{value:e,modifiers:r,expression:n,original:i},{effect:o,cleanup:s})=>{if(!e){let u={};nn(u),y(t,n)(l=>{Ne(t,l,i)},{scope:u});return}if(e==="key")return fo(t,n);if(t._x_inlineBindings&&t._x_inlineBindings[e]&&t._x_inlineBindings[e].extract)return;let a=y(t,n);o(()=>a(u=>{u===void 0&&typeof n=="string"&&n.match(/\./)&&(u=""),_(()=>xt(t,e,u,r))})),s(()=>{t._x_undoAddedClasses&&t._x_undoAddedClasses(),t._x_undoAddedStyles&&t._x_undoAddedStyles()})};Fn.inline=(t,{value:e,modifiers:r,expression:n})=>{e&&(t._x_inlineBindings||(t._x_inlineBindings={}),t._x_inlineBindings[e]={expression:n,extract:!1})};h("bind",Fn);function fo(t,e){t._x_keyExpression=e}It(()=>`[${N("data")}]`);h("data",(t,{expression:e},{cleanup:r})=>{if(po(t))return;e=e===""?"{}":e;let n={};K(n,t);let i={};an(i,n);let o=R(t,e,{scope:i});(o===void 0||o===!0)&&(o={}),K(o,t);let s=C(o);ot(s);let a=U(t,s);s.init&&R(t,s.init),r(()=>{s.destroy&&R(t,s.destroy),a()})});W((t,e)=>{t._x_dataStack&&(e._x_dataStack=t._x_dataStack,e.setAttribute("data-has-alpine-state",!0))});function po(t){return j?$t?!0:t.hasAttribute("data-has-alpine-state"):!1}h("show",(t,{modifiers:e,expression:r},{effect:n})=>{let i=y(t,r);t._x_doHide||(t._x_doHide=()=>{_(()=>{t.style.setProperty("display","none",e.includes("important")?"important":void 0)})}),t._x_doShow||(t._x_doShow=()=>{_(()=>{t.style.length===1&&t.style.display==="none"?t.removeAttribute("style"):t.style.removeProperty("display")})});let o=()=>{t._x_doHide(),t._x_isShown=!1},s=()=>{t._x_doShow(),t._x_isShown=!0},a=()=>setTimeout(s),u=_t(f=>f?s():o(),f=>{typeof t._x_toggleAndCascadeWithTransitions=="function"?t._x_toggleAndCascadeWithTransitions(t,f,s,o):f?a():o()}),c,l=!0;n(()=>i(f=>{!l&&f===c||(e.includes("immediate")&&(f?a():o()),u(f),c=f,l=!1)}))});h("for",(t,{expression:e},{effect:r,cleanup:n})=>{let i=_o(e),o=y(t,i.items),s=y(t,t._x_keyExpression||"index");t._x_lookup=new Map,r(()=>mo(t,i,o,s)),n(()=>{t._x_lookup.forEach(a=>_(()=>{$(a),a.remove()})),delete t._x_lookup})});function ho(t){return e=>{Object.entries(e).forEach(([r,n])=>{t[r]=n})}}function mo(t,e,r,n){r(i=>{xo(i)&&(i=Array.from({length:i},(c,l)=>l+1)),i==null&&(i=[]),i instanceof Set&&(i=Array.from(i)),i instanceof Map&&(i=Array.from(i));let o=t._x_lookup,s=new Map;t._x_lookup=s;let a=yo(i),u=Object.entries(i).map(([c,l])=>{a||(c=parseInt(c));let f=go(e,l,c,i),w;return n(m=>{typeof m=="object"&&A("x-for key cannot be an object, it must be a string or an integer",t),o.has(m)&&(s.set(m,o.get(m)),o.delete(m)),w=m},{scope:{index:c,...f}}),[w,f]});_(()=>{o.forEach(f=>{$(f),f.remove()});let c=new Set,l=t;u.forEach(([f,w])=>{if(s.has(f)){let d=s.get(f);d._x_refreshXForScope(w),l.nextElementSibling!==d&&(l.nextElementSibling&&d.replaceWith(l.nextElementSibling),l.after(d)),l=d,d._x_currentIfEl&&(d.nextElementSibling!==d._x_currentIfEl&&l.after(d._x_currentIfEl),l=d._x_currentIfEl);return}t.content.children.length>1&&A("x-for templates require a single root element, additional elements will be ignored.",t);let m=document.importNode(t.content,!0).firstElementChild,P=C(w);U(m,P,t),m._x_refreshXForScope=ho(P),s.set(f,m),c.add(m),l.after(m),l=m}),S(()=>c.forEach(f=>O(f)))()})})}function _o(t){let e=/,([^,\}\]]*)(?:,([^,\}\]]*))?$/,r=/^\s*\(|\)\s*$/g,n=/([\s\S]*?)\s+(?:in|of)\s+([\s\S]*)/,i=t.match(n);if(!i)return;let o={};o.items=i[2].trim();let s=i[1].replace(r,"").trim(),a=s.match(e);return a?(o.item=s.replace(e,"").trim(),o.index=a[1].trim(),a[2]&&(o.collection=a[2].trim())):o.item=s,o}function go(t,e,r,n){let i={};return/^\[.*\]$/.test(t.item)&&Array.isArray(e)?t.item.replace("[","").replace("]","").split(",").map(s=>s.trim()).forEach((s,a)=>{i[s]=e[a]}):/^\{.*\}$/.test(t.item)&&!Array.isArray(e)&&typeof e=="object"?t.item.replace("{","").replace("}","").split(",").map(s=>s.trim()).forEach(s=>{i[s]=e[s]}):i[t.item]=e,t.index&&(i[t.index]=r),t.collection&&(i[t.collection]=n),i}function xo(t){return typeof t!="object"&&!isNaN(t)}function yo(t){return typeof t=="object"&&!Array.isArray(t)}function Bn(){}Bn.inline=(t,{expression:e},{cleanup:r})=>{let n=tt(t);n&&(n._x_refs||(n._x_refs={}),n._x_refs[e]=t,r(()=>delete n._x_refs[e]))};h("ref",Bn);h("if",(t,{expression:e},{effect:r,cleanup:n})=>{t.tagName.toLowerCase()!=="template"&&A("x-if can only be used on a <template> tag",t);let i=y(t,e),o=()=>{if(t._x_currentIfEl)return t._x_currentIfEl;let a=t.content.cloneNode(!0).firstElementChild;return U(a,{},t),_(()=>{t.after(a),S(()=>O(a))()}),t._x_currentIfEl=a,t._x_undoIf=()=>{_(()=>{$(a),a.remove()}),delete t._x_currentIfEl},a},s=()=>{t._x_undoIf&&(t._x_undoIf(),delete t._x_undoIf)};r(()=>i(a=>{a?o():s()})),n(()=>t._x_undoIf&&t._x_undoIf())});h("id",(t,{expression:e},{evaluate:r})=>{r(e).forEach(i=>Pn(t,i))});W((t,e)=>{t._x_ids&&(e._x_ids=t._x_ids)});st(Mt("@",Pt(N("on:"))));h("on",S((t,{value:e,modifiers:r,expression:n},{cleanup:i})=>{let o=n?y(t,n):()=>{};t.tagName.toLowerCase()==="template"&&(t._x_forwardEvents||(t._x_forwardEvents=[]),t._x_forwardEvents.includes(e)||t._x_forwardEvents.push(e));let s=H(t,e,r,a=>{o(()=>{},{scope:{$event:a},params:[a]})});i(()=>s())}));ee("Collapse","collapse","collapse");ee("Intersect","intersect","intersect");ee("Focus","trap","focus");ee("Mask","mask","mask");function ee(t,e,r){h(e,n=>A(`You can't use [x-${e}] without first installing the "${t}" plugin here: https://alpinejs.dev/plugins/${r}`,n))}h("html",(t,{expression:e})=>{pt(new Error("Using the x-html directive is prohibited in the CSP build"),t)});z.setEvaluator(fn);z.setRawEvaluator(ln);z.setReactivityEngine({reactive:Xt,effect:bn,release:wn,raw:x});var Ge=z;window.Alpine=Ge;queueMicrotask(()=>{Ge.start()});})();
@@ -0,0 +1 @@
1
+ var htmx=function(){"use strict";const Q={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(e,t){const n=dn(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.10"};Q.onLoad=j;Q.process=Ft;Q.on=ye;Q.off=xe;Q.trigger=ae;Q.ajax=Nn;Q.find=f;Q.findAll=y;Q.closest=g;Q.remove=z;Q.addClass=w;Q.removeClass=b;Q.toggleClass=G;Q.takeClass=W;Q.swap=_e;Q.defineExtension=_n;Q.removeExtension=zn;Q.logAll=$;Q.logNone=_;Q.parseInterval=d;Q._=e;const n={addTriggerHandler:St,bodyContains:se,canAccessLocalStorage:U,findThisElement:we,filterValues:yn,swap:_e,hasAttribute:s,getAttributeValue:a,getClosestAttributeValue:ne,getClosestMatch:A,getExpressionVars:Rn,getHeaders:mn,getInputValues:dn,getInternalData:oe,getSwapSpecification:bn,getTriggerSpecs:st,getTarget:Se,makeFragment:P,mergeObjects:le,makeSettleInfo:Sn,oobSwap:He,querySelectorExt:ce,settleImmediately:Yt,shouldCancel:ht,triggerEvent:ae,triggerErrorEvent:fe,withExtensions:Vt};const de=["get","post","put","delete","patch"];const R=de.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 ee(e,t){return e instanceof Element&&e.getAttribute(t)}function s(e,t){return!!e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function a(e,t){return ee(e,t)||ee(e,"data-"+t)}function c(e){const t=e.parentElement;if(!t&&e.parentNode instanceof ShadowRoot)return e.parentNode;return t}function te(){return document}function q(e,t){return e.getRootNode?e.getRootNode({composed:t}):te()}function A(e,t){while(e&&!t(e)){e=c(e)}return e||null}function o(e,t,n){const r=a(t,n);const o=a(t,"hx-disinherit");var i=a(t,"hx-inherit");if(e!==t){if(Q.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 ne(t,n){let r=null;A(t,function(e){return!!(r=o(t,ue(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=te().createElement("script");ie(e.attributes,function(e){t.setAttribute(e.name,e.value)});t.textContent=e.textContent;t.async=false;if(Q.config.inlineScriptNonce){t.nonce=Q.config.inlineScriptNonce}return t}function i(e){return e.matches("script")&&(e.type==="text/javascript"||e.type==="module"||e.type==="")}function D(e){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){H(e)}finally{e.remove()}}})}function P(e){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){if(Q.config.allowScriptTags){D(r)}else{r.querySelectorAll("script").forEach(e=>e.remove())}}return r}function re(e){if(e){e()}}function t(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function k(e){return typeof e==="function"}function M(e){return t(e,"Object")}function oe(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 ie(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 se(e){return e.getRootNode({composed:true})===document}function X(e){return e.trim().split(/\s+/)}function le(e,t){for(const n in t){if(t.hasOwnProperty(n)){e[n]=t[n]}}return e}function v(e){try{return JSON.parse(e)}catch(e){H(e);return null}}function U(){const e="htmx:sessionStorageTest";try{sessionStorage.setItem(e,e);sessionStorage.removeItem(e);return true}catch(e){return false}}function V(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 On(te().body,function(){return eval(e)})}function j(t){const e=Q.on("htmx:load",function(e){t(e.detail.elt)});return e}function $(){Q.logger=function(e,t,n){if(console){console.log(t,e,n)}}}function _(){Q.logger=null}function f(e,t){if(typeof e!=="string"){return e.querySelector(t)}else{return f(te(),e)}}function y(e,t){if(typeof e!=="string"){return e.querySelectorAll(t)}else{return y(te(),e)}}function x(){return window}function z(e,t){e=S(e);if(t){x().setTimeout(function(){z(e);e=null},t)}else{c(e).removeChild(e)}}function ue(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=ue(S(e));if(!e){return}if(n){x().setTimeout(function(){w(e,t);e=null},n)}else{e.classList&&e.classList.add(t)}}function b(e,t,n){let r=ue(S(e));if(!r){return}if(n){x().setTimeout(function(){b(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=S(e);e.classList.toggle(t)}function W(e,t){e=S(e);ie(e.parentElement.children,function(e){b(e,t)});w(ue(e),t)}function g(e,t){e=ue(S(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 Y(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=S(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=Y(o.shift());let e;if(r.indexOf("closest ")===0){e=g(ue(t),Y(r.slice(8)))}else if(r.indexOf("find ")===0){e=f(p(t),Y(r.slice(5)))}else if(r==="next"||r==="nextElementSibling"){e=ue(t).nextElementSibling}else if(r.indexOf("next ")===0){e=pe(t,Y(r.slice(5)),!!n)}else if(r==="previous"||r==="previousElementSibling"){e=ue(t).previousElementSibling}else if(r.indexOf("previous ")===0){e=ge(t,Y(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 u=p(q(t,!!n));i.push(...F(u.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(te().body,e)[0]}}function S(e,t){if(typeof e==="string"){return f(p(t)||document,e)}else{return e}}function me(e,t,n,r){if(k(t)){return{target:te().body,event:K(e),listener:t,options:n}}else{return{target:S(e),event:K(t),listener:n,options:r}}}function ye(t,n,r,o){Gn(function(){const e=me(t,n,r,o);e.target.addEventListener(e.event,e.listener,e.options)});const e=k(n);return e?n:r}function xe(t,n,r){Gn(function(){const e=me(t,n,r);e.target.removeEventListener(e.event,e.listener)});return k(n)?n:r}const be=te().createElement("output");function ve(t,n){const e=ne(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=ue(A(t,function(e){return e!==t&&s(ue(e),n)}));if(i){r.push(...ve(i,n))}}if(r.length===0){H('The selector "'+e+'" on '+n+" returned no matches!");return[be]}else{return r}}}}function we(e,t){return ue(A(e,function(e){return a(ue(e),t)!=null}))}function Se(e){const t=ne(e,"hx-target");if(t){if(t==="this"){return we(e,"hx-target")}else{return ce(e,t)}}else{const n=oe(e);if(n.boosted){return te().body}else{return e}}}function Ee(e){return Q.config.attributesToSettle.includes(e)}function Ce(t,n){ie(Array.from(t.attributes),function(e){if(!n.hasAttribute(e.name)&&Ee(e.name)){t.removeAttribute(e.name)}});ie(n.attributes,function(e){if(Ee(e.name)){t.setAttribute(e.name,e.value)}})}function Oe(t,e){const n=Jn(e);for(let e=0;e<n.length;e++){const r=n[e];try{if(r.isInlineSwap(t)){return true}}catch(e){H(e)}}return t==="outerHTML"}function He(e,o,i,t){t=t||te();let n="#"+CSS.escape(ee(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){ie(r,function(e){let t;const n=o.cloneNode(true);t=te().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);je(s,e,e,t,i);Te()}ie(i.elts,function(e){ae(e,"htmx:oobAfterSwap",r)})});o.parentNode.removeChild(o)}else{o.parentNode.removeChild(o);fe(te().body,"htmx:oobErrorNoTarget",{content:o,target:n})}return e}function Te(){const e=f("#--htmx-preserve-pantry--");if(e){for(const t of[...e.children]){const n=f("#"+t.id);n.parentNode.moveBefore(t,n);n.remove()}e.remove()}}function Re(e){ie(y(e,"[hx-preserve], [data-hx-preserve]"),function(e){const t=a(e,"id");const n=te().getElementById(t);if(n!=null){if(e.moveBefore){let e=f("#--htmx-preserve-pantry--");if(e==null){te().body.insertAdjacentHTML("afterend","<div id='--htmx-preserve-pantry--'></div>");e=f("#--htmx-preserve-pantry--")}e.moveBefore(n,null)}else{e.parentNode.replaceChild(n,e)}}})}function qe(i,e,s){ie(e.querySelectorAll("[id]"),function(t){const n=ee(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(){b(e,Q.config.addedClass);Ft(ue(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 u(e,t,n,r){qe(e,n,r);while(n.childNodes.length>0){const o=n.firstChild;w(ue(o),Q.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 De(t){const n=oe(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 Pe(e){const t=oe(e);if(t.timeout){clearTimeout(t.timeout)}if(t.listenerInfos){ie(t.listenerInfos,function(e){if(e.on){xe(e.on,e.trigger,e.listener)}})}De(e);ie(Object.keys(t),function(e){if(e!=="firstInitCompleted")delete t[e]})}function E(e){ae(e,"htmx:beforeCleanupElement");Pe(e);ie(e.children,function(e){E(e)})}function ke(t,e,n){if(t.tagName==="BODY"){return Ve(t,e,n)}let r;const o=t.previousSibling;const i=c(t);if(!i){return}u(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}E(t);t.remove()}function Me(e,t,n){return u(e,e.firstChild,t,n)}function Fe(e,t,n){return u(c(e),e,t,n)}function Be(e,t,n){return u(e,null,t,n)}function Xe(e,t,n){return u(c(e),e.nextSibling,t,n)}function Ue(e){E(e);const t=c(e);if(t){return t.removeChild(e)}}function Ve(e,t,n){const r=e.firstChild;u(e,r,t,n);if(r){while(r.nextSibling){E(r.nextSibling);e.removeChild(r.nextSibling)}E(r);e.removeChild(r)}}function je(t,e,n,r,o){switch(t){case"none":return;case"outerHTML":ke(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=Jn(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 u=l[e];if(u.nodeType!==Node.TEXT_NODE&&u.nodeType!==Node.COMMENT_NODE){o.tasks.push(Ae(u))}}}return}}catch(e){H(e)}}if(t==="innerHTML"){Ve(n,r,o)}else{je(Q.config.defaultSwapStyle,e,n,r,o)}}}function $e(e,n,r){var t=y(e,"[hx-swap-oob], [data-hx-swap-oob]");ie(t,function(e){if(Q.config.allowNestedOobSwaps||e.parentElement===null){const t=a(e,"hx-swap-oob");if(t!=null){He(t,e,n,r)}}else{e.removeAttribute("hx-swap-oob");e.removeAttribute("data-hx-swap-oob")}});return t.length>0}function _e(h,d,p,g){if(!g){g={}}let m=null;let n=null;let e=function(){re(g.beforeSwapCallback);h=S(h);const r=g.contextElement?q(g.contextElement,false):te();const e=document.activeElement;let t={};t={elt:e,start:e?e.selectionStart:null,end:e?e.selectionEnd:null};const o=Sn(h);if(p.swapStyle==="textContent"){h.textContent=d}else{let n=P(d);o.title=g.title||n.title;if(g.historyRequest){n=n.querySelector("[hx-history-elt],[data-hx-history-elt]")||n}if(g.selectOOB){const i=g.selectOOB.split(",");for(let t=0;t<i.length;t++){const s=i[t].split(":",2);let e=s[0].trim();if(e.indexOf("#")===0){e=e.substring(1)}const l=s[1]||"true";const u=n.querySelector("#"+e);if(u){He(l,u,o,r)}}}$e(n,o,r);ie(y(n,"template"),function(e){if(e.content&&$e(e.content,o,r)){e.remove()}});if(g.select){const c=te().createDocumentFragment();ie(n.querySelectorAll(g.select),function(e){c.appendChild(e)});n=c}Re(n);je(p.swapStyle,g.contextElement,h,n,o);Te()}if(t.elt&&!se(t.elt)&&ee(t.elt,"id")){const f=document.getElementById(ee(t.elt,"id"));const a={preventScroll:p.focusScroll!==undefined?!p.focusScroll:!Q.config.defaultFocusScroll};if(f){if(t.start&&f.setSelectionRange){try{f.setSelectionRange(t.start,t.end)}catch(e){}}f.focus(a)}}b(h,Q.config.swappingClass);ie(o.elts,function(e){if(e.classList){w(e,Q.config.settlingClass)}ae(e,"htmx:afterSwap",g.eventInfo)});re(g.afterSwapCallback);if(!p.ignoreTitle){Xn(o.title)}const n=function(){ie(o.tasks,function(e){e.call()});ie(o.elts,function(e){if(e.classList){b(e,Q.config.settlingClass)}ae(e,"htmx:afterSettle",g.eventInfo)});if(g.anchor){const e=ue(S("#"+g.anchor));if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}En(o.elts,p);re(g.afterSettleCallback);re(m)};if(p.settleDelay>0){x().setTimeout(n,p.settleDelay)}else{n()}};let t=Q.config.globalViewTransitions;if(p.hasOwnProperty("transition")){t=p.transition}const r=g.contextElement||te();if(t&&ae(r,"htmx:beforeTransition",g.eventInfo)&&typeof Promise!=="undefined"&&document.startViewTransition){const o=new Promise(function(e,t){m=e;n=t});const i=e;e=function(){document.startViewTransition(function(){i();return o})}}try{if(p?.swapDelay&&p.swapDelay>0){x().setTimeout(e,p.swapDelay)}else{e()}}catch(e){fe(r,"htmx:swapError",g.eventInfo);re(n);throw e}}function ze(e,t,n){const r=e.getResponseHeader(t);if(r.indexOf("{")===0){const o=v(r);for(const i in o){if(o.hasOwnProperty(i)){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 C=/[\s,]/;const Ke=/[_$a-zA-Z]/;const Ge=/[_$a-zA-Z0-9]/;const We=['"',"'","/"];const Ze=/[^\s]/;const Ye=/[{(]/;const Qe=/[})]/;function et(e){const t=[];let n=0;while(n<e.length){if(Ke.exec(e.charAt(n))){var r=n;while(Ge.exec(e.charAt(n+1))){n++}t.push(e.substring(r,n+1))}else if(We.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 tt(e,t,n){return Ke.exec(e.charAt(0))&&e!=="true"&&e!=="false"&&e!=="this"&&e!==n&&t!=="."}function nt(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=On(r,function(){return Function(t)()},function(){return true});l.source=t;return l}catch(e){fe(te().body,"htmx:syntax:error",{error:e,source:t});return null}}}else if(s==="["){e++}if(tt(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 rt(e){let t;if(e.length>0&&Ye.test(e[0])){e.shift();t=O(e,Qe).trim();e.shift()}else{t=O(e,C)}return t}const ot="input, textarea, select";function it(e,t,n){const r=[];const o=et(t);do{O(o,Ze);const l=o.length;const u=O(o,/[,\[\s]/);if(u!==""){if(u==="every"){const c={trigger:"every"};O(o,Ze);c.pollInterval=d(O(o,/[,\[\s]/));O(o,Ze);var i=nt(e,o,"event");if(i){c.eventFilter=i}r.push(c)}else{const f={trigger:u};var i=nt(e,o,"event");if(i){f.eventFilter=i}O(o,Ze);while(o.length>0&&o[0]!==","){const a=o.shift();if(a==="changed"){f.changed=true}else if(a==="once"){f.once=true}else if(a==="consume"){f.consume=true}else if(a==="delay"&&o[0]===":"){o.shift();f.delay=d(O(o,C))}else if(a==="from"&&o[0]===":"){o.shift();if(Ye.test(o[0])){var s=rt(o)}else{var s=O(o,C);if(s==="closest"||s==="find"||s==="next"||s==="previous"){o.shift();const h=rt(o);if(h.length>0){s+=" "+h}}}f.from=s}else if(a==="target"&&o[0]===":"){o.shift();f.target=rt(o)}else if(a==="throttle"&&o[0]===":"){o.shift();f.throttle=d(O(o,C))}else if(a==="queue"&&o[0]===":"){o.shift();f.queue=O(o,C)}else if(a==="root"&&o[0]===":"){o.shift();f[a]=rt(o)}else if(a==="threshold"&&o[0]===":"){o.shift();f[a]=O(o,C)}else{fe(e,"htmx:syntax:error",{token:o.shift()})}O(o,Ze)}r.push(f)}}if(o.length===l){fe(e,"htmx:syntax:error",{token:o.shift()})}O(o,Ze)}while(o[0]===","&&o.shift());if(n){n[t]=r}return r}function st(e){const t=a(e,"hx-trigger");let n=[];if(t){const r=Q.config.triggerSpecsCache;n=r&&r[t]||it(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,ot)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function lt(e){oe(e).cancelled=true}function ut(e,t,n){const r=oe(e);r.timeout=x().setTimeout(function(){if(se(e)&&r.cancelled!==true){if(!pt(n,e,Xt("hx:poll:trigger",{triggerSpec:n,target:e}))){t(e)}ut(e,t,n)}},n.pollInterval)}function ct(e){return location.hostname===e.hostname&&ee(e,"href")&&ee(e,"href").indexOf("#")!==0}function ft(e){return g(e,Q.config.disableSelector)}function at(t,n,e){if(t instanceof HTMLAnchorElement&&ct(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"&&String(ee(t,"method")).toLowerCase()!=="dialog"){n.boosted=true;let r,o;if(t.tagName==="A"){r="get";o=ee(t,"href")}else{const i=ee(t,"method");r=i?i.toLowerCase():"get";o=ee(t,"action");if(o==null||o===""){o=location.href}if(r==="get"&&o.includes("?")){o=o.replace(/\?[^#]+/,"")}}e.forEach(function(e){gt(t,function(e,t){const n=ue(e);if(ft(n)){E(n);return}he(r,o,n,t)},n,e,true)})}}function ht(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 dt(e,t){return oe(e).boosted&&e instanceof HTMLAnchorElement&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function pt(e,t,n){const r=e.eventFilter;if(r){try{return r.call(t,n)!==true}catch(e){const o=r.source;fe(te().body,"htmx:eventFilter:error",{error:e,source:o});return true}}return false}function gt(l,u,e,c,f){const a=oe(l);let t;if(c.from){t=m(l,c.from)}else{t=[l]}if(c.changed){if(!("lastValue"in a)){a.lastValue=new WeakMap}t.forEach(function(e){if(!a.lastValue.has(c)){a.lastValue.set(c,new WeakMap)}a.lastValue.get(c).set(e,e.value)})}ie(t,function(i){const s=function(e){if(!se(l)){i.removeEventListener(c.trigger,s);return}if(dt(l,e)){return}if(f||ht(e,i)){e.preventDefault()}if(pt(c,l,e)){return}const t=oe(e);t.triggerSpec=c;if(t.handledFor==null){t.handledFor=[]}if(t.handledFor.indexOf(l)<0){t.handledFor.push(l);if(c.consume){e.stopPropagation()}if(c.target&&e.target){if(!h(ue(e.target),c.target)){return}}if(c.once){if(a.triggeredOnce){return}else{a.triggeredOnce=true}}if(c.changed){const n=e.target;const r=n.value;const o=a.lastValue.get(c);if(o.has(n)&&o.get(n)===r){return}o.set(n,r)}if(a.delayed){clearTimeout(a.delayed)}if(a.throttle){return}if(c.throttle>0){if(!a.throttle){ae(l,"htmx:trigger");u(l,e);a.throttle=x().setTimeout(function(){a.throttle=null},c.throttle)}}else if(c.delay>0){a.delayed=x().setTimeout(function(){ae(l,"htmx:trigger");u(l,e)},c.delay)}else{ae(l,"htmx:trigger");u(l,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:c.trigger,listener:s,on:i});i.addEventListener(c.trigger,s)})}let mt=false;let yt=null;function xt(){if(!yt){yt=function(){mt=true};window.addEventListener("scroll",yt);window.addEventListener("resize",yt);setInterval(function(){if(mt){mt=false;ie(te().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(e){bt(e)})}},200)}}function bt(e){if(!s(e,"data-hx-revealed")&&B(e)){e.setAttribute("data-hx-revealed","true");const t=oe(e);if(t.initHash){ae(e,"revealed")}else{e.addEventListener("htmx:afterProcessNode",function(){ae(e,"revealed")},{once:true})}}}function vt(e,t,n,r){const o=function(){if(!n.loaded){n.loaded=true;ae(e,"htmx:trigger");t(e)}};if(r>0){x().setTimeout(o,r)}else{o()}}function wt(t,n,e){let i=false;ie(de,function(r){if(s(t,"hx-"+r)){const o=a(t,"hx-"+r);i=true;n.path=o;n.verb=r;e.forEach(function(e){St(t,e,n,function(e,t){const n=ue(e);if(ft(n)){E(n);return}he(r,o,n,t)})})}});return i}function St(r,e,t,n){if(e.trigger==="revealed"){xt();gt(r,n,t,e);bt(ue(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(ue(r));gt(ue(r),n,t,e)}else if(!t.firstInitCompleted&&e.trigger==="load"){if(!pt(e,r,Xt("load",{elt:r}))){vt(ue(r),n,t,e.delay)}}else if(e.pollInterval>0){t.polling=true;ut(ue(r),n,e)}else{gt(r,n,t,e)}}function Et(e){const t=ue(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 Ct=(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 Ot(e,t){if(Et(e)){t.push(ue(e))}const n=Ct.evaluate(e);let r=null;while(r=n.iterateNext())t.push(ue(r))}function Ht(e){const t=[];if(e instanceof DocumentFragment){for(const n of e.childNodes){Ot(n,t)}}else{Ot(e,t)}return t}function Tt(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 in jn){const s=jn[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 Rt(e){const t=At(e.target);const n=It(e);if(n){n.lastButtonClicked=t}}function qt(e){const t=It(e);if(t){t.lastButtonClicked=null}}function At(e){return g(ue(e),"button, input[type='submit']")}function Nt(e){return e.form||g(e,"form")}function It(e){const t=At(e.target);if(!t){return}const n=Nt(t);if(!n){return}return oe(n)}function Lt(e){e.addEventListener("click",Rt);e.addEventListener("focusin",Rt);e.addEventListener("focusout",qt)}function Dt(t,e,n){const r=oe(t);if(!Array.isArray(r.onHandlers)){r.onHandlers=[]}let o;const i=function(e){On(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){De(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 kt(t){ae(t,"htmx:beforeProcessNode");const n=oe(t);const e=st(t);const r=wt(t,n,e);if(!r){if(ne(t,"hx-boost")==="true"){at(t,n,e)}else if(s(t,"hx-trigger")){e.forEach(function(e){St(t,e,n,function(){})})}}if(t.tagName==="FORM"||ee(t,"type")==="submit"&&s(t,"form")){Lt(t)}n.firstInitCompleted=true;ae(t,"htmx:afterProcessNode")}function Mt(e){if(!(e instanceof Element)){return false}const t=oe(e);const n=Le(e);if(t.initHash!==n){Pe(e);t.initHash=n;return true}return false}function Ft(e){e=S(e);if(ft(e)){E(e);return}const t=[];if(Mt(e)){t.push(e)}ie(Tt(e),function(e){if(ft(e)){E(e);return}if(Mt(e)){t.push(e)}});ie(Ht(e),Pt);ie(t,kt)}function Bt(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Xt(e,t){return new CustomEvent(e,{bubbles:true,cancelable:true,composed:true,detail:t})}function fe(e,t,n){ae(e,t,le({error:t},n))}function Ut(e){return e==="htmx:afterProcessNode"}function Vt(e,t,n){ie(Jn(e,[],n),function(e){try{t(e)}catch(e){H(e)}})}function H(e){console.error(e)}function ae(e,t,n){e=S(e);if(n==null){n={}}n.elt=e;const r=Xt(t,n);if(Q.logger&&!Ut(t)){Q.logger(e,t,n)}if(n.error){H(n.error+(n.target?", "+n.target:""));ae(e,"htmx:error",{errorInfo:n})}let o=e.dispatchEvent(r);const i=Bt(t);if(o&&i!==t){const s=Xt(i,r.detail);o=o&&e.dispatchEvent(s)}Vt(ue(e),function(e){o=o&&(e.onEvent(t,r)!==false&&!r.defaultPrevented)});return o}let jt;function $t(e){jt=e;if(U()){sessionStorage.setItem("htmx-current-path-for-history",e)}}$t(location.pathname+location.search);function _t(){const e=te().querySelector("[hx-history-elt],[data-hx-history-elt]");return e||te().body}function zt(t,e){if(!U()){return}const n=Kt(e);const r=te().title;const o=window.scrollY;if(Q.config.historyCacheSize<=0){sessionStorage.removeItem("htmx-history-cache");return}t=V(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(te().body,"htmx:historyItemCreated",{item:s,cache:i});i.push(s);while(i.length>Q.config.historyCacheSize){i.shift()}while(i.length>0){try{sessionStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){fe(te().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function Jt(t){if(!U()){return null}t=V(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 Kt(e){const t=Q.config.requestClass;const n=e.cloneNode(true);ie(y(n,"."+t),function(e){b(e,t)});ie(y(n,"[data-disabled-by-htmx]"),function(e){e.removeAttribute("disabled")});return n.innerHTML}function Gt(){const e=_t();let t=jt;if(U()){t=sessionStorage.getItem("htmx-current-path-for-history")}t=t||location.pathname+location.search;const n=te().querySelector('[hx-history="false" i],[data-hx-history="false" i]');if(!n){ae(te().body,"htmx:beforeHistorySave",{path:t,historyElt:e});zt(t,e)}if(Q.config.historyEnabled)history.replaceState({htmx:true},te().title,location.href)}function Wt(e){if(Q.config.getCacheBusterParam){e=e.replace(/org\.htmx\.cache-buster=[^&]*&?/,"");if(Z(e,"&")||Z(e,"?")){e=e.slice(0,-1)}}if(Q.config.historyEnabled){history.pushState({htmx:true},"",e)}$t(e)}function Zt(e){if(Q.config.historyEnabled)history.replaceState({htmx:true},"",e);$t(e)}function Yt(e){ie(e,function(e){e.call(undefined)})}function Qt(e){const t=new XMLHttpRequest;const n={swapStyle:"innerHTML",swapDelay:0,settleDelay:0};const r={path:e,xhr:t,historyElt:_t(),swapSpec:n};t.open("GET",e,true);if(Q.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(te().body,"htmx:historyCacheMissLoad",r);_e(r.historyElt,r.response,n,{contextElement:r.historyElt,historyRequest:true});$t(r.path);ae(te().body,"htmx:historyRestore",{path:e,cacheMiss:true,serverResponse:r.response})}else{fe(te().body,"htmx:historyCacheMissLoadError",r)}};if(ae(te().body,"htmx:historyCacheMiss",r)){t.send()}}function en(e){Gt();e=e||location.pathname+location.search;const t=Jt(e);if(t){const n={swapStyle:"innerHTML",swapDelay:0,settleDelay:0,scroll:t.scroll};const r={path:e,item:t,historyElt:_t(),swapSpec:n};if(ae(te().body,"htmx:historyCacheHit",r)){_e(r.historyElt,t.content,n,{contextElement:r.historyElt,title:t.title});$t(r.path);ae(te().body,"htmx:historyRestore",r)}}else{if(Q.config.refreshOnHistoryMiss){Q.location.reload(true)}else{Qt(e)}}}function tn(e){let t=ve(e,"hx-indicator");if(t==null){t=[e]}ie(t,function(e){const t=oe(e);t.requestCount=(t.requestCount||0)+1;w(e,Q.config.requestClass)});return t}function nn(e){let t=ve(e,"hx-disabled-elt");if(t==null){t=[]}ie(t,function(e){const t=oe(e);t.requestCount=(t.requestCount||0)+1;if(!e.hasAttribute("disabled")){e.setAttribute("disabled","");e.setAttribute("data-disabled-by-htmx","")}});return t}function rn(e,t){ie(e.concat(t),function(e){const t=oe(e);t.requestCount=(t.requestCount||1)-1});ie(e,function(e){const t=oe(e);if(t.requestCount===0){b(e,Q.config.requestClass)}});ie(t,function(e){const t=oe(e);if(t.requestCount===0&&e.hasAttribute("data-disabled-by-htmx")){e.removeAttribute("disabled");e.removeAttribute("data-disabled-by-htmx")}})}function on(t,n){for(let e=0;e<t.length;e++){const r=t[e];if(r.isSameNode(n)){return true}}return false}function sn(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 ln(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);ie(e,e=>r.append(t,e))}}function cn(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||on(t,e)){return}else{t.push(e)}if(sn(e)){const i=ee(e,"name");ln(i,cn(e),n);if(o){an(e,r)}}if(e instanceof HTMLFormElement){ie(e.elements,function(e){if(t.indexOf(e)>=0){un(e.name,cn(e),n)}else{t.push(e)}if(o){an(e,r)}});new FormData(e).forEach(function(e,t){if(e instanceof File&&e.name===""){return}ln(t,e,n)})}}function an(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&&Q.config.reportValidityOfForms){n.reportValidity()}t.push({elt:n,message:n.validationMessage,validity:n.validity})}}}function hn(n,e){for(const t of e.keys()){n.delete(t)}e.forEach(function(e,t){n.append(t,e)});return n}function dn(e,t){const n=[];const r=new FormData;const o=new FormData;const i=[];const s=oe(e);if(s.lastButtonClicked&&!se(s.lastButtonClicked)){s.lastButtonClicked=null}let l=e instanceof HTMLFormElement&&e.noValidate!==true||a(e,"hx-validate")==="true";if(s.lastButtonClicked){l=l&&s.lastButtonClicked.formNoValidate!==true}if(t!=="get"){fn(n,o,i,Nt(e),l)}fn(n,r,i,e,l);if(s.lastButtonClicked||e.tagName==="BUTTON"||e.tagName==="INPUT"&&ee(e,"type")==="submit"){const c=s.lastButtonClicked||e;const f=ee(c,"name");ln(f,c.value,o)}const u=ve(e,"hx-include");ie(u,function(e){fn(n,r,i,ue(e),l);if(!h(e,"form")){ie(p(e).querySelectorAll(ot),function(e){fn(n,r,i,e,l)})}});hn(r,o);return{errors:i,formData:r,values:kn(r)}}function pn(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 gn(e){e=Dn(e);let n="";e.forEach(function(e,t){n=pn(n,t,e)});return n}function mn(e,t,n){const r={"HX-Request":"true","HX-Trigger":ee(e,"id"),"HX-Trigger-Name":ee(e,"name"),"HX-Target":a(t,"id"),"HX-Current-URL":location.href};Cn(e,"hx-headers",false,r);if(n!==undefined){r["HX-Prompt"]=n}if(oe(e).boosted){r["HX-Boosted"]="true"}return r}function yn(n,e){const t=ne(e,"hx-params");if(t){if(t==="none"){return new FormData}else if(t==="*"){return n}else if(t.indexOf("not ")===0){ie(t.slice(4).split(","),function(e){e=e.trim();n.delete(e)});return n}else{const r=new FormData;ie(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 xn(e){return!!ee(e,"href")&&ee(e,"href").indexOf("#")>=0}function bn(e,t){const n=t||ne(e,"hx-swap");const r={swapStyle:oe(e).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&oe(e).boosted&&!xn(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 u=l.slice(7);var o=u.split(":");const c=o.pop();var i=o.length>0?o.join(":"):null;r.scroll=c;r.scrollTarget=i}else if(l.indexOf("show:")===0){const f=l.slice(5);var o=f.split(":");const a=o.pop();var i=o.length>0?o.join(":"):null;r.show=a;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{H("Unknown modifier in hx-swap: "+l)}}}}return r}function vn(e){return ne(e,"hx-encoding")==="multipart/form-data"||h(e,"form")&&ee(e,"enctype")==="multipart/form-data"}function wn(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(vn(n)){return hn(new FormData,Dn(r))}else{return gn(r)}}}function Sn(e){return{tasks:[],elts:[e]}}function En(e,t){const n=e[0];const r=e[e.length-1];if(t.scroll){var o=null;if(t.scrollTarget){o=ue(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"){x().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=ue(ce(n,e))}if(t.show==="top"&&(n||o)){o=o||n;o.scrollIntoView({block:"start",behavior:Q.config.scrollBehavior})}if(t.show==="bottom"&&(r||o)){o=o||r;o.scrollIntoView({block:"end",behavior:Q.config.scrollBehavior})}}}function Cn(r,e,o,i,s){if(i==null){i={}}if(r==null){return i}const l=a(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=On(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 u in n){if(n.hasOwnProperty(u)){if(i[u]==null){i[u]=n[u]}}}}return Cn(ue(c(r)),e,o,i,s)}function On(e,t,n){if(Q.config.allowEval){return t()}else{fe(e,"htmx:evalDisallowedError");return n}}function Hn(e,t,n){return Cn(e,"hx-vars",true,n,t)}function Tn(e,t,n){return Cn(e,"hx-vals",false,n,t)}function Rn(e,t){return le(Hn(e,t),Tn(e,t))}function qn(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 An(t){if(t.responseURL){try{const e=new URL(t.responseURL);return e.pathname+e.search}catch(e){fe(te().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function T(e,t){return t.test(e.getAllResponseHeaders())}function Nn(t,n,r){t=t.toLowerCase();if(r){if(r instanceof Element||typeof r==="string"){return he(t,n,null,null,{targetOverride:S(r)||be,returnPromise:true})}else{let e=S(r.target);if(r.target&&!e||r.source&&!e&&!S(r.source)){e=be}return he(t,n,S(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 he(t,n,null,null,{returnPromise:true})}}function In(e){const t=[];while(e){t.push(e);e=e.parentElement}return t}function Ln(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(Q.config.selfRequestsOnly){if(!i){return false}}return ae(e,"htmx:validateUrl",le({url:r,sameHost:i},n))}function Dn(e){if(e instanceof FormData)return e;const t=new FormData;for(const n in e){if(e.hasOwnProperty(n)){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 kn(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 he(t,n,r,o,i,k){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=te().body}const M=i.handler||Vn;const F=i.select||null;if(!se(r)){re(s);return e}const u=i.targetOverride||ue(Se(r));if(u==null||u==be){fe(r,"htmx:targetError",{target:ne(r,"hx-target")});re(l);return e}let c=oe(r);const f=c.lastButtonClicked;if(f){const A=ee(f,"formaction");if(A!=null){n=A}const N=ee(f,"formmethod");if(N!=null){if(de.includes(N.toLowerCase())){t=N}else{re(s);return e}}}const a=ne(r,"hx-confirm");if(k===undefined){const K=function(e){return he(t,n,r,o,i,!!e)};const G={target:u,elt:r,path:n,verb:t,triggeringEvent:o,etc:i,issueRequest:K,question:a};if(ae(r,"htmx:confirm",G)===false){re(s);return e}}let h=r;let d=ne(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=ue(ce(r,L))}d=(I[1]||"drop").trim();c=oe(h);if(d==="drop"&&c.xhr&&c.abortable!==true){re(s);return e}else if(d==="abort"){if(c.xhr){re(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(c.xhr){if(c.abortable){ae(h,"htmx:abort")}else{if(p==null){if(o){const D=oe(o);if(D&&D.triggerSpec&&D.triggerSpec.queue){p=D.triggerSpec.queue}}if(p==null){p="last"}}if(c.queuedRequests==null){c.queuedRequests=[]}if(p==="first"&&c.queuedRequests.length===0){c.queuedRequests.push(function(){he(t,n,r,o,i)})}else if(p==="all"){c.queuedRequests.push(function(){he(t,n,r,o,i)})}else if(p==="last"){c.queuedRequests=[];c.queuedRequests.push(function(){he(t,n,r,o,i)})}re(s);return e}}const g=new XMLHttpRequest;c.xhr=g;c.abortable=B;const m=function(){c.xhr=null;c.abortable=false;if(c.queuedRequests!=null&&c.queuedRequests.length>0){const e=c.queuedRequests.shift();e()}};const X=ne(r,"hx-prompt");if(X){var y=prompt(X);if(y===null||!ae(r,"htmx:prompt",{prompt:y,target:u})){re(s);m();return e}}if(a&&!k){if(!confirm(a)){re(s);m();return e}}let x=mn(r,u,y);if(t!=="get"&&!vn(r)){x["Content-Type"]="application/x-www-form-urlencoded"}if(i.headers){x=le(x,i.headers)}const U=dn(r,t);let b=U.errors;const V=U.formData;if(i.values){hn(V,Dn(i.values))}const j=Dn(Rn(r,o));const v=hn(V,j);let w=yn(v,r);if(Q.config.getCacheBusterParam&&t==="get"){w.set("org.htmx.cache-buster",ee(u,"id")||"true")}if(n==null||n===""){n=location.href}const S=Cn(r,"hx-request");const $=oe(r).boosted;let E=Q.config.methodsThatUseUrlParams.indexOf(t)>=0;const C={boosted:$,useUrlParams:E,formData:w,parameters:kn(w),unfilteredFormData:v,unfilteredParameters:kn(v),headers:x,elt:r,target:u,verb:t,errors:b,withCredentials:i.credentials||S.credentials||Q.config.withCredentials,timeout:i.timeout||S.timeout||Q.config.timeout,path:n,triggeringEvent:o};if(!ae(r,"htmx:configRequest",C)){re(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);re(s);m();return e}const _=n.split("#");const z=_[0];const O=_[1];let H=n;if(E){H=z;const Z=!w.keys().next().done;if(Z){if(H.indexOf("?")<0){H+="?"}else{H+="&"}H+=gn(w);if(O){H+="#"+O}}}if(!Ln(r,H,C)){fe(r,"htmx:invalidPath",C);re(l);m();return e}g.open(t.toUpperCase(),H,true);g.overrideMimeType("text/html");g.withCredentials=C.withCredentials;g.timeout=C.timeout;if(S.noHeaders){}else{for(const P in x){if(x.hasOwnProperty(P)){const Y=x[P];qn(g,P,Y)}}}const T={xhr:g,target:u,requestConfig:C,etc:i,boosted:$,select:F,pathInfo:{requestPath:n,finalRequestPath:H,responsePath:null,anchor:O}};g.onload=function(){try{const t=In(r);T.pathInfo.responsePath=An(g);M(r,T);if(T.keepIndicators!==true){rn(R,q)}ae(r,"htmx:afterRequest",T);ae(r,"htmx:afterOnLoad",T);if(!se(r)){let e=null;while(t.length>0&&e==null){const n=t.shift();if(se(n)){e=n}}if(e){ae(e,"htmx:afterRequest",T);ae(e,"htmx:afterOnLoad",T)}}re(s)}catch(e){fe(r,"htmx:onLoadError",le({error:e},T));throw e}finally{m()}};g.onerror=function(){rn(R,q);fe(r,"htmx:afterRequest",T);fe(r,"htmx:sendError",T);re(l);m()};g.onabort=function(){rn(R,q);fe(r,"htmx:afterRequest",T);fe(r,"htmx:sendAbort",T);re(l);m()};g.ontimeout=function(){rn(R,q);fe(r,"htmx:afterRequest",T);fe(r,"htmx:timeout",T);re(l);m()};if(!ae(r,"htmx:beforeRequest",T)){re(s);m();return e}var R=tn(r);var q=nn(r);ie(["loadstart","loadend","progress","abort"],function(t){ie([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",T);const J=E?null:wn(g,r,w);g.send(J);return e}function Mn(e,t){const n=t.xhr;let r=null;let o=null;if(T(n,/HX-Push:/i)){r=n.getResponseHeader("HX-Push");o="push"}else if(T(n,/HX-Push-Url:/i)){r=n.getResponseHeader("HX-Push-Url");o="push"}else if(T(n,/HX-Replace-Url:/i)){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;let l=t.etc.push||ne(e,"hx-push-url");let u=t.etc.replace||ne(e,"hx-replace-url");if(l==="false")l=null;if(u==="false")u=null;const c=oe(e).boosted;let f=null;let a=null;if(l){f="push";a=l}else if(u){f="replace";a=u}else if(c){f="push";a=s||i}if(a){if(a==="true"){a=s||i}if(t.pathInfo.anchor&&a.indexOf("#")===-1){a=a+"#"+t.pathInfo.anchor}return{type:f,path:a}}else{return{}}}function Fn(e,t){var n=new RegExp(e.code);return n.test(t.toString(10))}function Bn(e){for(var t=0;t<Q.config.responseHandling.length;t++){var n=Q.config.responseHandling[t];if(Fn(n,e.status)){return n}}return{swap:false}}function Xn(e){if(e){const t=f("title");if(t){t.textContent=e}else{window.document.title=e}}}function Un(e,t){if(t==="this"){return e}const n=ue(ce(e,t));if(n==null){fe(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(T(n,/HX-Trigger:/i)){ze(n,"HX-Trigger",t)}if(T(n,/HX-Location:/i)){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";Nn("get",e,s);return}const l=T(n,/HX-Refresh:/i)&&n.getResponseHeader("HX-Refresh")==="true";if(T(n,/HX-Redirect:/i)){e.keepIndicators=true;Q.location.href=n.getResponseHeader("HX-Redirect");l&&Q.location.reload();return}if(l){e.keepIndicators=true;Q.location.reload();return}const u=Mn(t,e);const c=Bn(n);const f=c.swap;let a=!!c.error;let h=Q.config.ignoreTitle||c.ignoreTitle;let d=c.select;if(c.target){e.target=Un(t,c.target)}var p=o.swapOverride;if(p==null&&c.swapOverride){p=c.swapOverride}if(T(n,/HX-Retarget:/i)){e.target=Un(t,n.getResponseHeader("HX-Retarget"))}if(T(n,/HX-Reswap:/i)){p=n.getResponseHeader("HX-Reswap")}var g=n.response;var m=le({shouldSwap:f,serverResponse:g,isError:a,ignoreTitle:h,selectOverride:d,swapOverride:p},e);if(c.event&&!ae(r,c.event,m))return;if(!ae(r,"htmx:beforeSwap",m))return;r=m.target;g=m.serverResponse;a=m.isError;h=m.ignoreTitle;d=m.selectOverride;p=m.swapOverride;e.target=r;e.failed=a;e.successful=!a;if(m.shouldSwap){if(n.status===286){lt(t)}Vt(t,function(e){g=e.transformResponse(g,n,t)});if(u.type){Gt()}var y=bn(t,p);if(!y.hasOwnProperty("ignoreTitle")){y.ignoreTitle=h}w(r,Q.config.swappingClass);if(i){d=i}if(T(n,/HX-Reselect:/i)){d=n.getResponseHeader("HX-Reselect")}const x=o.selectOOB||ne(t,"hx-select-oob");const b=ne(t,"hx-select");_e(r,g,y,{select:d==="unset"?null:d||b,selectOOB:x,eventInfo:e,anchor:e.pathInfo.anchor,contextElement:t,afterSwapCallback:function(){if(T(n,/HX-Trigger-After-Swap:/i)){let e=t;if(!se(t)){e=te().body}ze(n,"HX-Trigger-After-Swap",e)}},afterSettleCallback:function(){if(T(n,/HX-Trigger-After-Settle:/i)){let e=t;if(!se(t)){e=te().body}ze(n,"HX-Trigger-After-Settle",e)}},beforeSwapCallback:function(){if(u.type){ae(te().body,"htmx:beforeHistoryUpdate",le({history:u},e));if(u.type==="push"){Wt(u.path);ae(te().body,"htmx:pushedIntoHistory",{path:u.path})}else{Zt(u.path);ae(te().body,"htmx:replacedInHistory",{path:u.path})}}}})}if(a){fe(t,"htmx:responseError",le({error:"Response Status Error Code "+n.status+" from "+e.pathInfo.requestPath},e))}}const jn={};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 _n(e,t){if(t.init){t.init(n)}jn[e]=le($n(),t)}function zn(e){delete jn[e]}function Jn(e,n,r){if(n==undefined){n=[]}if(e==undefined){return n}if(r==undefined){r=[]}const t=a(e,"hx-ext");if(t){ie(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=jn[e];if(t&&n.indexOf(t)<0){n.push(t)}}})}return Jn(ue(c(e)),n,r)}var Kn=false;te().addEventListener("DOMContentLoaded",function(){Kn=true});function Gn(e){if(Kn||te().readyState==="complete"){e()}else{te().addEventListener("DOMContentLoaded",e)}}function Wn(){if(Q.config.includeIndicatorStyles!==false){const e=Q.config.inlineStyleNonce?` nonce="${Q.config.inlineStyleNonce}"`:"";const t=Q.config.indicatorClass;const n=Q.config.requestClass;te().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 Zn(){const e=te().querySelector('meta[name="htmx-config"]');if(e){return v(e.content)}else{return null}}function Yn(){const e=Zn();if(e){Q.config=le(Q.config,e)}}Gn(function(){Yn();Wn();let e=te().body;Ft(e);const t=te().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){const t=e.detail.elt||e.target;const n=oe(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){en();ie(t,function(e){ae(e,"htmx:restored",{document:te(),triggerEvent:ae})})}else{if(n){n(e)}}};x().setTimeout(function(){ae(e,"htmx:load",{});e=null},0)});return Q}();
@@ -0,0 +1 @@
1
+ htmx.defineExtension("safe-nonce",{transformResponse:function(e,n,o){htmx.config.refreshOnHistoryMiss=true;let t=new RegExp(`<script(\\s[^>]*>|>).*?<\\/script(\\s[^>]*>|>)`,"gis");let r=n.getResponseHeader("HX-Nonce");if(!r){const i=n.getResponseHeader("content-security-policy");if(i){const s=i.match(/(default|script)-src[^;]*'nonce-([^']*)'/i);if(s){r=s[2]}}}if(window.location.hostname){const c=new URL(n.responseURL);if(c.hostname!==window.location.hostname){r=""}}if(r){t=new RegExp(`<script(\\s(?!nonce="${r.replace(/[\\\[\]\/^*.+?$(){}'#:!=|]/g,"\\$&")}")[^>]*>|>).*?<\\/script(\\s[^>]*>|>)`,"gis")}return e.replace(t,"").replace(/ignore:safe-nonce/g,"")},onEvent:function(e,n){if(e==="htmx:load"){Array.from(n.detail.elt.querySelectorAll("script")).forEach(e=>{if(e.nonce!==htmx.config.inlineScriptNonce){e.remove()}});Array.from(n.detail.elt.querySelectorAll('[hx-ext*="ignore:safe-nonce"], [data-hx-ext*="ignore:safe-nonce"]')).forEach(e=>{e.remove()})}}});