htmx.org 2.0.0-beta1 → 2.0.0-beta3
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.
- package/README.md +1 -1
- package/dist/ext/ajax-header.js +5 -1
- package/dist/ext/alpine-morph.js +5 -1
- package/dist/ext/class-tools.js +6 -1
- package/dist/ext/client-side-templates.js +4 -0
- package/dist/ext/debug.js +4 -0
- package/dist/ext/disable-element.js +5 -3
- package/dist/ext/event-header.js +4 -0
- package/dist/ext/head-support.js +6 -1
- package/dist/ext/include-vals.js +4 -0
- package/dist/ext/json-enc.js +6 -2
- package/dist/ext/loading-states.js +6 -0
- package/dist/ext/method-override.js +4 -0
- package/dist/ext/morphdom-swap.js +4 -0
- package/dist/ext/multi-swap.js +6 -1
- package/dist/ext/path-deps.js +10 -7
- package/dist/ext/path-params.js +5 -1
- package/dist/ext/preload.js +14 -10
- package/dist/ext/rails-method.js +4 -0
- package/dist/ext/remove-me.js +4 -0
- package/dist/ext/response-targets.js +6 -1
- package/dist/ext/restored.js +5 -1
- package/dist/ext/sse.js +22 -17
- package/dist/ext/ws.js +5 -0
- package/dist/htmx.amd.js +24 -13
- package/dist/htmx.cjs.js +24 -13
- package/dist/htmx.esm.js +25 -14
- package/dist/htmx.js +24 -13
- package/dist/htmx.min.js +1 -1
- package/dist/htmx.min.js.gz +0 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,7 +33,7 @@ By removing these arbitrary constraints htmx completes HTML as a
|
|
|
33
33
|
## quick start
|
|
34
34
|
|
|
35
35
|
```html
|
|
36
|
-
<script src="https://unpkg.com/htmx.org@
|
|
36
|
+
<script src="https://unpkg.com/htmx.org@2.0.0-beta3"></script>
|
|
37
37
|
<!-- have a button POST a click via AJAX -->
|
|
38
38
|
<button hx-post="/clicked" hx-swap="outerHTML">
|
|
39
39
|
Click Me
|
package/dist/ext/ajax-header.js
CHANGED
|
@@ -1,7 +1,11 @@
|
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
1
5
|
htmx.defineExtension('ajax-header', {
|
|
2
6
|
onEvent: function (name, evt) {
|
|
3
7
|
if (name === "htmx:configRequest") {
|
|
4
8
|
evt.detail.headers['X-Requested-With'] = 'XMLHttpRequest';
|
|
5
9
|
}
|
|
6
10
|
}
|
|
7
|
-
});
|
|
11
|
+
});
|
package/dist/ext/alpine-morph.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
1
5
|
htmx.defineExtension('alpine-morph', {
|
|
2
6
|
isInlineSwap: function (swapStyle) {
|
|
3
7
|
return swapStyle === 'morph';
|
|
@@ -13,4 +17,4 @@ htmx.defineExtension('alpine-morph', {
|
|
|
13
17
|
}
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
|
-
});
|
|
20
|
+
});
|
package/dist/ext/class-tools.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
(function () {
|
|
2
2
|
|
|
3
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
4
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
5
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
6
|
+
}
|
|
7
|
+
|
|
3
8
|
function splitOnWhitespace(trigger) {
|
|
4
9
|
return trigger.split(/\s+/);
|
|
5
10
|
}
|
|
@@ -89,4 +94,4 @@
|
|
|
89
94
|
}
|
|
90
95
|
}
|
|
91
96
|
});
|
|
92
|
-
})();
|
|
97
|
+
})();
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
1
5
|
htmx.defineExtension('client-side-templates', {
|
|
2
6
|
transformResponse : function(text, xhr, elt) {
|
|
3
7
|
|
package/dist/ext/debug.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
1
5
|
htmx.defineExtension('debug', {
|
|
2
6
|
onEvent: function (name, evt) {
|
|
3
7
|
if (console.debug) {
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
"
|
|
2
|
-
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
3
5
|
// Disable Submit Button
|
|
4
6
|
htmx.defineExtension('disable-element', {
|
|
5
7
|
onEvent: function (name, evt) {
|
|
@@ -15,4 +17,4 @@ htmx.defineExtension('disable-element', {
|
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
}
|
|
18
|
-
});
|
|
20
|
+
});
|
package/dist/ext/event-header.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
(function(){
|
|
2
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
3
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
4
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
5
|
+
}
|
|
2
6
|
function stringifyEvent(event) {
|
|
3
7
|
var obj = {};
|
|
4
8
|
for (var key in event) {
|
package/dist/ext/head-support.js
CHANGED
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
//==========================================================
|
|
6
6
|
(function(){
|
|
7
7
|
|
|
8
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
9
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
10
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
11
|
+
}
|
|
12
|
+
|
|
8
13
|
var api = null;
|
|
9
14
|
|
|
10
15
|
function log() {
|
|
@@ -138,4 +143,4 @@
|
|
|
138
143
|
}
|
|
139
144
|
});
|
|
140
145
|
|
|
141
|
-
})()
|
|
146
|
+
})()
|
package/dist/ext/include-vals.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
(function(){
|
|
2
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
3
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
4
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
5
|
+
}
|
|
2
6
|
|
|
3
7
|
function mergeObjects(obj1, obj2) {
|
|
4
8
|
for (var key in obj2) {
|
package/dist/ext/json-enc.js
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
1
5
|
htmx.defineExtension('json-enc', {
|
|
2
6
|
onEvent: function (name, evt) {
|
|
3
7
|
if (name === "htmx:configRequest") {
|
|
4
8
|
evt.detail.headers['Content-Type'] = "application/json";
|
|
5
9
|
}
|
|
6
10
|
},
|
|
7
|
-
|
|
11
|
+
|
|
8
12
|
encodeParameters : function(xhr, parameters, elt) {
|
|
9
13
|
xhr.overrideMimeType('text/json');
|
|
10
14
|
return (JSON.stringify(parameters));
|
|
11
15
|
}
|
|
12
|
-
});
|
|
16
|
+
});
|
|
@@ -1,4 +1,10 @@
|
|
|
1
1
|
;(function () {
|
|
2
|
+
|
|
3
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
4
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
5
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
6
|
+
}
|
|
7
|
+
|
|
2
8
|
let loadingStatesUndoQueue = []
|
|
3
9
|
|
|
4
10
|
function loadingStateContainer(target) {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
1
5
|
htmx.defineExtension('method-override', {
|
|
2
6
|
onEvent: function (name, evt) {
|
|
3
7
|
if (name === "htmx:configRequest") {
|
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
1
5
|
htmx.defineExtension('morphdom-swap', {
|
|
2
6
|
isInlineSwap: function(swapStyle) {
|
|
3
7
|
return swapStyle === 'morphdom';
|
package/dist/ext/multi-swap.js
CHANGED
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
(function () {
|
|
2
2
|
|
|
3
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
4
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
5
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
6
|
+
}
|
|
7
|
+
|
|
3
8
|
/** @type {import("../htmx").HtmxInternalApi} */
|
|
4
9
|
var api;
|
|
5
10
|
|
|
@@ -42,4 +47,4 @@
|
|
|
42
47
|
}
|
|
43
48
|
}
|
|
44
49
|
});
|
|
45
|
-
})();
|
|
50
|
+
})();
|
package/dist/ext/path-deps.js
CHANGED
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
(function(undefined){
|
|
2
2
|
'use strict';
|
|
3
|
-
|
|
3
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
4
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
5
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
6
|
+
}
|
|
4
7
|
// Save a reference to the global object (window in the browser)
|
|
5
8
|
var _root = this;
|
|
6
|
-
|
|
9
|
+
|
|
7
10
|
function dependsOn(pathSpec, url) {
|
|
8
11
|
if (pathSpec === "ignore") {
|
|
9
12
|
return false;
|
|
@@ -30,8 +33,8 @@
|
|
|
30
33
|
if (dependsOn(elt.getAttribute('path-deps'), path)) {
|
|
31
34
|
htmx.trigger(elt, "path-deps");
|
|
32
35
|
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
36
|
+
}
|
|
37
|
+
}
|
|
35
38
|
|
|
36
39
|
htmx.defineExtension('path-deps', {
|
|
37
40
|
onEvent: function (name, evt) {
|
|
@@ -41,7 +44,7 @@
|
|
|
41
44
|
if (config.verb !== "get" && evt.target.getAttribute('path-deps') !== 'ignore') {
|
|
42
45
|
refreshPath(config.path);
|
|
43
46
|
}
|
|
44
|
-
}
|
|
47
|
+
}
|
|
45
48
|
}
|
|
46
49
|
});
|
|
47
50
|
|
|
@@ -49,12 +52,12 @@
|
|
|
49
52
|
* ********************
|
|
50
53
|
* Expose functionality
|
|
51
54
|
* ********************
|
|
52
|
-
*/
|
|
55
|
+
*/
|
|
53
56
|
|
|
54
57
|
_root.PathDeps = {
|
|
55
58
|
refresh: function(path) {
|
|
56
59
|
refreshPath(path);
|
|
57
60
|
}
|
|
58
61
|
};
|
|
59
|
-
|
|
62
|
+
|
|
60
63
|
}).call(this);
|
package/dist/ext/path-params.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
1
5
|
htmx.defineExtension('path-params', {
|
|
2
6
|
onEvent: function(name, evt) {
|
|
3
7
|
if (name === "htmx:configRequest") {
|
|
@@ -8,4 +12,4 @@ htmx.defineExtension('path-params', {
|
|
|
8
12
|
})
|
|
9
13
|
}
|
|
10
14
|
}
|
|
11
|
-
});
|
|
15
|
+
});
|
package/dist/ext/preload.js
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
5
|
+
// This adds the "preload" extension to htmx. By default, this will
|
|
6
|
+
// preload the targets of any tags with `href` or `hx-get` attributes
|
|
3
7
|
// if they also have a `preload` attribute as well. See documentation
|
|
4
8
|
// for more details
|
|
5
9
|
htmx.defineExtension("preload", {
|
|
@@ -18,8 +22,8 @@ htmx.defineExtension("preload", {
|
|
|
18
22
|
if (node == undefined) {return undefined;}
|
|
19
23
|
return node.getAttribute(property) || node.getAttribute("data-" + property) || attr(node.parentElement, property)
|
|
20
24
|
}
|
|
21
|
-
|
|
22
|
-
// load handles the actual HTTP fetch, and uses htmx.ajax in cases where we're
|
|
25
|
+
|
|
26
|
+
// load handles the actual HTTP fetch, and uses htmx.ajax in cases where we're
|
|
23
27
|
// preloading an htmx resource (this sends the same HTTP headers as a regular htmx request)
|
|
24
28
|
var load = function(node) {
|
|
25
29
|
|
|
@@ -43,7 +47,7 @@ htmx.defineExtension("preload", {
|
|
|
43
47
|
}
|
|
44
48
|
|
|
45
49
|
// Special handling for HX-GET - use built-in htmx.ajax function
|
|
46
|
-
// so that headers match other htmx requests, then set
|
|
50
|
+
// so that headers match other htmx requests, then set
|
|
47
51
|
// node.preloadState = TRUE so that requests are not duplicated
|
|
48
52
|
// in the future
|
|
49
53
|
var hxGet = node.getAttribute("hx-get") || node.getAttribute("data-hx-get")
|
|
@@ -57,8 +61,8 @@ htmx.defineExtension("preload", {
|
|
|
57
61
|
return;
|
|
58
62
|
}
|
|
59
63
|
|
|
60
|
-
// Otherwise, perform a standard xhr request, then set
|
|
61
|
-
// node.preloadState = TRUE so that requests are not duplicated
|
|
64
|
+
// Otherwise, perform a standard xhr request, then set
|
|
65
|
+
// node.preloadState = TRUE so that requests are not duplicated
|
|
62
66
|
// in the future.
|
|
63
67
|
if (node.getAttribute("href")) {
|
|
64
68
|
var r = new XMLHttpRequest();
|
|
@@ -83,16 +87,16 @@ htmx.defineExtension("preload", {
|
|
|
83
87
|
if (node.preloadState !== undefined) {
|
|
84
88
|
return;
|
|
85
89
|
}
|
|
86
|
-
|
|
90
|
+
|
|
87
91
|
// Get event name from config.
|
|
88
92
|
var on = attr(node, "preload") || "mousedown"
|
|
89
93
|
const always = on.indexOf("always") !== -1
|
|
90
94
|
if (always) {
|
|
91
95
|
on = on.replace('always', '').trim()
|
|
92
96
|
}
|
|
93
|
-
|
|
97
|
+
|
|
94
98
|
// FALL THROUGH to here means we need to add an EventListener
|
|
95
|
-
|
|
99
|
+
|
|
96
100
|
// Apply the listener to the node
|
|
97
101
|
node.addEventListener(on, function(evt) {
|
|
98
102
|
if (node.preloadState === "PAUSE") { // Only add one event listener
|
package/dist/ext/rails-method.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
1
5
|
htmx.defineExtension('rails-method', {
|
|
2
6
|
onEvent: function (name, evt) {
|
|
3
7
|
if (name === "configRequest.htmx") {
|
package/dist/ext/remove-me.js
CHANGED
|
@@ -1,4 +1,8 @@
|
|
|
1
1
|
(function(){
|
|
2
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
3
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
4
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
5
|
+
}
|
|
2
6
|
function maybeRemoveMe(elt) {
|
|
3
7
|
var timing = elt.getAttribute("remove-me") || elt.getAttribute("data-remove-me");
|
|
4
8
|
if (timing) {
|
|
@@ -1,5 +1,10 @@
|
|
|
1
1
|
(function(){
|
|
2
2
|
|
|
3
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
4
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
5
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
6
|
+
}
|
|
7
|
+
|
|
3
8
|
/** @type {import("../htmx").HtmxInternalApi} */
|
|
4
9
|
var api;
|
|
5
10
|
|
|
@@ -58,7 +63,7 @@
|
|
|
58
63
|
}
|
|
59
64
|
}
|
|
60
65
|
}
|
|
61
|
-
|
|
66
|
+
|
|
62
67
|
return null;
|
|
63
68
|
}
|
|
64
69
|
|
package/dist/ext/restored.js
CHANGED
|
@@ -1,3 +1,7 @@
|
|
|
1
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
2
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
3
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
4
|
+
}
|
|
1
5
|
htmx.defineExtension('restored', {
|
|
2
6
|
onEvent : function(name, evt) {
|
|
3
7
|
if (name === 'htmx:restored'){
|
|
@@ -12,4 +16,4 @@ htmx.defineExtension('restored', {
|
|
|
12
16
|
}
|
|
13
17
|
return;
|
|
14
18
|
}
|
|
15
|
-
})
|
|
19
|
+
})
|
package/dist/ext/sse.js
CHANGED
|
@@ -7,6 +7,11 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
|
|
7
7
|
|
|
8
8
|
(function() {
|
|
9
9
|
|
|
10
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
11
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
12
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
13
|
+
}
|
|
14
|
+
|
|
10
15
|
/** @type {import("../htmx").HtmxInternalApi} */
|
|
11
16
|
var api;
|
|
12
17
|
|
|
@@ -14,8 +19,8 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
|
|
14
19
|
|
|
15
20
|
/**
|
|
16
21
|
* Init saves the provided reference to the internal HTMX API.
|
|
17
|
-
*
|
|
18
|
-
* @param {import("../htmx").HtmxInternalApi} api
|
|
22
|
+
*
|
|
23
|
+
* @param {import("../htmx").HtmxInternalApi} api
|
|
19
24
|
* @returns void
|
|
20
25
|
*/
|
|
21
26
|
init: function(apiRef) {
|
|
@@ -30,9 +35,9 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
|
|
30
35
|
|
|
31
36
|
/**
|
|
32
37
|
* onEvent handles all events passed to this extension.
|
|
33
|
-
*
|
|
34
|
-
* @param {string} name
|
|
35
|
-
* @param {Event} evt
|
|
38
|
+
*
|
|
39
|
+
* @param {string} name
|
|
40
|
+
* @param {Event} evt
|
|
36
41
|
* @returns void
|
|
37
42
|
*/
|
|
38
43
|
onEvent: function(name, evt) {
|
|
@@ -64,8 +69,8 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
|
|
64
69
|
/**
|
|
65
70
|
* createEventSource is the default method for creating new EventSource objects.
|
|
66
71
|
* it is hoisted into htmx.config.createEventSource to be overridden by the user, if needed.
|
|
67
|
-
*
|
|
68
|
-
* @param {string} url
|
|
72
|
+
*
|
|
73
|
+
* @param {string} url
|
|
69
74
|
* @returns EventSource
|
|
70
75
|
*/
|
|
71
76
|
function createEventSource(url) {
|
|
@@ -105,7 +110,7 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
|
|
105
110
|
}
|
|
106
111
|
|
|
107
112
|
/**
|
|
108
|
-
* registerSSE looks for attributes that can contain sse events, right
|
|
113
|
+
* registerSSE looks for attributes that can contain sse events, right
|
|
109
114
|
* now hx-trigger and sse-swap and adds listeners based on these attributes too
|
|
110
115
|
* the closest event source
|
|
111
116
|
*
|
|
@@ -183,7 +188,7 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
|
|
183
188
|
if (sseEventName.slice(0, 4) != "sse:") {
|
|
184
189
|
return;
|
|
185
190
|
}
|
|
186
|
-
|
|
191
|
+
|
|
187
192
|
// remove the sse: prefix from here on out
|
|
188
193
|
sseEventName = sseEventName.substr(4);
|
|
189
194
|
|
|
@@ -269,8 +274,8 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
|
|
269
274
|
/**
|
|
270
275
|
* maybeCloseSSESource confirms that the parent element still exists.
|
|
271
276
|
* If not, then any associated SSE source is closed and the function returns true.
|
|
272
|
-
*
|
|
273
|
-
* @param {HTMLElement} elt
|
|
277
|
+
*
|
|
278
|
+
* @param {HTMLElement} elt
|
|
274
279
|
* @returns boolean
|
|
275
280
|
*/
|
|
276
281
|
function maybeCloseSSESource(elt) {
|
|
@@ -287,9 +292,9 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
|
|
287
292
|
|
|
288
293
|
/**
|
|
289
294
|
* queryAttributeOnThisOrChildren returns all nodes that contain the requested attributeName, INCLUDING THE PROVIDED ROOT ELEMENT.
|
|
290
|
-
*
|
|
291
|
-
* @param {HTMLElement} elt
|
|
292
|
-
* @param {string} attributeName
|
|
295
|
+
*
|
|
296
|
+
* @param {HTMLElement} elt
|
|
297
|
+
* @param {string} attributeName
|
|
293
298
|
*/
|
|
294
299
|
function queryAttributeOnThisOrChildren(elt, attributeName) {
|
|
295
300
|
|
|
@@ -310,7 +315,7 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
|
|
310
315
|
|
|
311
316
|
/**
|
|
312
317
|
* @param {HTMLElement} elt
|
|
313
|
-
* @param {string} content
|
|
318
|
+
* @param {string} content
|
|
314
319
|
*/
|
|
315
320
|
function swap(elt, content) {
|
|
316
321
|
|
|
@@ -340,10 +345,10 @@ This extension adds support for Server Sent Events to htmx. See /www/extensions
|
|
|
340
345
|
}
|
|
341
346
|
|
|
342
347
|
/**
|
|
343
|
-
* doSettle mirrors much of the functionality in htmx that
|
|
348
|
+
* doSettle mirrors much of the functionality in htmx that
|
|
344
349
|
* settles elements after their content has been swapped.
|
|
345
350
|
* TODO: this should be published by htmx, and not duplicated here
|
|
346
|
-
* @param {import("../htmx").HtmxSettleInfo} settleInfo
|
|
351
|
+
* @param {import("../htmx").HtmxSettleInfo} settleInfo
|
|
347
352
|
* @returns () => void
|
|
348
353
|
*/
|
|
349
354
|
function doSettle(settleInfo) {
|
package/dist/ext/ws.js
CHANGED
|
@@ -6,6 +6,11 @@ This extension adds support for WebSockets to htmx. See /www/extensions/ws.md f
|
|
|
6
6
|
|
|
7
7
|
(function () {
|
|
8
8
|
|
|
9
|
+
if (htmx.version && !htmx.version.startsWith("1.")) {
|
|
10
|
+
console.warn("WARNING: You are using an htmx 1 extension with htmx " + htmx.version +
|
|
11
|
+
". It is recommended that you move to the version of this extension found on https://extensions.htmx.org")
|
|
12
|
+
}
|
|
13
|
+
|
|
9
14
|
/** @type {import("../htmx").HtmxInternalApi} */
|
|
10
15
|
var api;
|
|
11
16
|
|
package/dist/htmx.amd.js
CHANGED
|
@@ -272,7 +272,7 @@ var htmx = (function() {
|
|
|
272
272
|
parseInterval: null,
|
|
273
273
|
/** @type {typeof internalEval} */
|
|
274
274
|
_: null,
|
|
275
|
-
version: '2.
|
|
275
|
+
version: '2.0.0-beta3'
|
|
276
276
|
}
|
|
277
277
|
// Tsc madness part 2
|
|
278
278
|
htmx.onLoad = onLoadHelper
|
|
@@ -2603,19 +2603,28 @@ var htmx = (function() {
|
|
|
2603
2603
|
* @param {Node} elt
|
|
2604
2604
|
* @returns {Element[]}
|
|
2605
2605
|
*/
|
|
2606
|
-
|
|
2606
|
+
const HX_ON_QUERY = new XPathEvaluator()
|
|
2607
|
+
.createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or' +
|
|
2608
|
+
' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]')
|
|
2609
|
+
|
|
2610
|
+
function processHXOnRoot(elt, elements) {
|
|
2611
|
+
if (shouldProcessHxOn(elt)) {
|
|
2612
|
+
elements.push(asElement(elt))
|
|
2613
|
+
}
|
|
2614
|
+
const iter = HX_ON_QUERY.evaluate(elt)
|
|
2607
2615
|
let node = null
|
|
2616
|
+
while (node = iter.iterateNext()) elements.push(asElement(node))
|
|
2617
|
+
}
|
|
2618
|
+
|
|
2619
|
+
function findHxOnWildcardElements(elt) {
|
|
2608
2620
|
/** @type {Element[]} */
|
|
2609
2621
|
const elements = []
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
elements.push(asElement(elt))
|
|
2622
|
+
if (elt instanceof DocumentFragment) {
|
|
2623
|
+
for (const child of elt.childNodes) {
|
|
2624
|
+
processHXOnRoot(child, elements)
|
|
2614
2625
|
}
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]', elt)
|
|
2618
|
-
while (node = iter.iterateNext()) elements.push(asElement(node))
|
|
2626
|
+
} else {
|
|
2627
|
+
processHXOnRoot(elt, elements)
|
|
2619
2628
|
}
|
|
2620
2629
|
return elements
|
|
2621
2630
|
}
|
|
@@ -3592,7 +3601,9 @@ var htmx = (function() {
|
|
|
3592
3601
|
return encodedParameters
|
|
3593
3602
|
} else {
|
|
3594
3603
|
if (usesFormData(elt)) {
|
|
3595
|
-
|
|
3604
|
+
// Force conversion to an actual FormData object in case filteredParameters is a formDataProxy
|
|
3605
|
+
// See https://github.com/bigskysoftware/htmx/issues/2317
|
|
3606
|
+
return overrideFormData(new FormData(), formDataFromObject(filteredParameters))
|
|
3596
3607
|
} else {
|
|
3597
3608
|
return urlEncode(filteredParameters)
|
|
3598
3609
|
}
|
|
@@ -3737,7 +3748,7 @@ var htmx = (function() {
|
|
|
3737
3748
|
* @returns {FormData}
|
|
3738
3749
|
*/
|
|
3739
3750
|
function getExpressionVars(elt) {
|
|
3740
|
-
return
|
|
3751
|
+
return mergeObjects(getHXVarsForElement(elt), getHXValsForElement(elt))
|
|
3741
3752
|
}
|
|
3742
3753
|
|
|
3743
3754
|
/**
|
|
@@ -4169,7 +4180,7 @@ var htmx = (function() {
|
|
|
4169
4180
|
if (etc.values) {
|
|
4170
4181
|
overrideFormData(rawFormData, formDataFromObject(etc.values))
|
|
4171
4182
|
}
|
|
4172
|
-
const expressionVars = getExpressionVars(elt)
|
|
4183
|
+
const expressionVars = formDataFromObject(getExpressionVars(elt))
|
|
4173
4184
|
const allFormData = overrideFormData(rawFormData, expressionVars)
|
|
4174
4185
|
let filteredFormData = filterValues(allFormData, elt)
|
|
4175
4186
|
|
package/dist/htmx.cjs.js
CHANGED
|
@@ -271,7 +271,7 @@ var htmx = (function() {
|
|
|
271
271
|
parseInterval: null,
|
|
272
272
|
/** @type {typeof internalEval} */
|
|
273
273
|
_: null,
|
|
274
|
-
version: '2.
|
|
274
|
+
version: '2.0.0-beta3'
|
|
275
275
|
}
|
|
276
276
|
// Tsc madness part 2
|
|
277
277
|
htmx.onLoad = onLoadHelper
|
|
@@ -2602,19 +2602,28 @@ var htmx = (function() {
|
|
|
2602
2602
|
* @param {Node} elt
|
|
2603
2603
|
* @returns {Element[]}
|
|
2604
2604
|
*/
|
|
2605
|
-
|
|
2605
|
+
const HX_ON_QUERY = new XPathEvaluator()
|
|
2606
|
+
.createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or' +
|
|
2607
|
+
' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]')
|
|
2608
|
+
|
|
2609
|
+
function processHXOnRoot(elt, elements) {
|
|
2610
|
+
if (shouldProcessHxOn(elt)) {
|
|
2611
|
+
elements.push(asElement(elt))
|
|
2612
|
+
}
|
|
2613
|
+
const iter = HX_ON_QUERY.evaluate(elt)
|
|
2606
2614
|
let node = null
|
|
2615
|
+
while (node = iter.iterateNext()) elements.push(asElement(node))
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
function findHxOnWildcardElements(elt) {
|
|
2607
2619
|
/** @type {Element[]} */
|
|
2608
2620
|
const elements = []
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
elements.push(asElement(elt))
|
|
2621
|
+
if (elt instanceof DocumentFragment) {
|
|
2622
|
+
for (const child of elt.childNodes) {
|
|
2623
|
+
processHXOnRoot(child, elements)
|
|
2613
2624
|
}
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]', elt)
|
|
2617
|
-
while (node = iter.iterateNext()) elements.push(asElement(node))
|
|
2625
|
+
} else {
|
|
2626
|
+
processHXOnRoot(elt, elements)
|
|
2618
2627
|
}
|
|
2619
2628
|
return elements
|
|
2620
2629
|
}
|
|
@@ -3591,7 +3600,9 @@ var htmx = (function() {
|
|
|
3591
3600
|
return encodedParameters
|
|
3592
3601
|
} else {
|
|
3593
3602
|
if (usesFormData(elt)) {
|
|
3594
|
-
|
|
3603
|
+
// Force conversion to an actual FormData object in case filteredParameters is a formDataProxy
|
|
3604
|
+
// See https://github.com/bigskysoftware/htmx/issues/2317
|
|
3605
|
+
return overrideFormData(new FormData(), formDataFromObject(filteredParameters))
|
|
3595
3606
|
} else {
|
|
3596
3607
|
return urlEncode(filteredParameters)
|
|
3597
3608
|
}
|
|
@@ -3736,7 +3747,7 @@ var htmx = (function() {
|
|
|
3736
3747
|
* @returns {FormData}
|
|
3737
3748
|
*/
|
|
3738
3749
|
function getExpressionVars(elt) {
|
|
3739
|
-
return
|
|
3750
|
+
return mergeObjects(getHXVarsForElement(elt), getHXValsForElement(elt))
|
|
3740
3751
|
}
|
|
3741
3752
|
|
|
3742
3753
|
/**
|
|
@@ -4168,7 +4179,7 @@ var htmx = (function() {
|
|
|
4168
4179
|
if (etc.values) {
|
|
4169
4180
|
overrideFormData(rawFormData, formDataFromObject(etc.values))
|
|
4170
4181
|
}
|
|
4171
|
-
const expressionVars = getExpressionVars(elt)
|
|
4182
|
+
const expressionVars = formDataFromObject(getExpressionVars(elt))
|
|
4172
4183
|
const allFormData = overrideFormData(rawFormData, expressionVars)
|
|
4173
4184
|
let filteredFormData = filterValues(allFormData, elt)
|
|
4174
4185
|
|
package/dist/htmx.esm.js
CHANGED
|
@@ -271,7 +271,7 @@ var htmx = (function() {
|
|
|
271
271
|
parseInterval: null,
|
|
272
272
|
/** @type {typeof internalEval} */
|
|
273
273
|
_: null,
|
|
274
|
-
version: '2.
|
|
274
|
+
version: '2.0.0-beta3'
|
|
275
275
|
}
|
|
276
276
|
// Tsc madness part 2
|
|
277
277
|
htmx.onLoad = onLoadHelper
|
|
@@ -2602,19 +2602,28 @@ var htmx = (function() {
|
|
|
2602
2602
|
* @param {Node} elt
|
|
2603
2603
|
* @returns {Element[]}
|
|
2604
2604
|
*/
|
|
2605
|
-
|
|
2605
|
+
const HX_ON_QUERY = new XPathEvaluator()
|
|
2606
|
+
.createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or' +
|
|
2607
|
+
' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]')
|
|
2608
|
+
|
|
2609
|
+
function processHXOnRoot(elt, elements) {
|
|
2610
|
+
if (shouldProcessHxOn(elt)) {
|
|
2611
|
+
elements.push(asElement(elt))
|
|
2612
|
+
}
|
|
2613
|
+
const iter = HX_ON_QUERY.evaluate(elt)
|
|
2606
2614
|
let node = null
|
|
2615
|
+
while (node = iter.iterateNext()) elements.push(asElement(node))
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
function findHxOnWildcardElements(elt) {
|
|
2607
2619
|
/** @type {Element[]} */
|
|
2608
2620
|
const elements = []
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
elements.push(asElement(elt))
|
|
2621
|
+
if (elt instanceof DocumentFragment) {
|
|
2622
|
+
for (const child of elt.childNodes) {
|
|
2623
|
+
processHXOnRoot(child, elements)
|
|
2613
2624
|
}
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]', elt)
|
|
2617
|
-
while (node = iter.iterateNext()) elements.push(asElement(node))
|
|
2625
|
+
} else {
|
|
2626
|
+
processHXOnRoot(elt, elements)
|
|
2618
2627
|
}
|
|
2619
2628
|
return elements
|
|
2620
2629
|
}
|
|
@@ -3591,7 +3600,9 @@ var htmx = (function() {
|
|
|
3591
3600
|
return encodedParameters
|
|
3592
3601
|
} else {
|
|
3593
3602
|
if (usesFormData(elt)) {
|
|
3594
|
-
|
|
3603
|
+
// Force conversion to an actual FormData object in case filteredParameters is a formDataProxy
|
|
3604
|
+
// See https://github.com/bigskysoftware/htmx/issues/2317
|
|
3605
|
+
return overrideFormData(new FormData(), formDataFromObject(filteredParameters))
|
|
3595
3606
|
} else {
|
|
3596
3607
|
return urlEncode(filteredParameters)
|
|
3597
3608
|
}
|
|
@@ -3736,7 +3747,7 @@ var htmx = (function() {
|
|
|
3736
3747
|
* @returns {FormData}
|
|
3737
3748
|
*/
|
|
3738
3749
|
function getExpressionVars(elt) {
|
|
3739
|
-
return
|
|
3750
|
+
return mergeObjects(getHXVarsForElement(elt), getHXValsForElement(elt))
|
|
3740
3751
|
}
|
|
3741
3752
|
|
|
3742
3753
|
/**
|
|
@@ -4168,7 +4179,7 @@ var htmx = (function() {
|
|
|
4168
4179
|
if (etc.values) {
|
|
4169
4180
|
overrideFormData(rawFormData, formDataFromObject(etc.values))
|
|
4170
4181
|
}
|
|
4171
|
-
const expressionVars = getExpressionVars(elt)
|
|
4182
|
+
const expressionVars = formDataFromObject(getExpressionVars(elt))
|
|
4172
4183
|
const allFormData = overrideFormData(rawFormData, expressionVars)
|
|
4173
4184
|
let filteredFormData = filterValues(allFormData, elt)
|
|
4174
4185
|
|
|
@@ -5082,4 +5093,4 @@ var htmx = (function() {
|
|
|
5082
5093
|
* @property {(swapStyle: HtmxSwapStyle, target: Element, fragment: Node, settleInfo: HtmxSettleInfo) => boolean} handleSwap
|
|
5083
5094
|
* @property {(xhr: XMLHttpRequest, parameters: FormData, elt: Element) => *|string|null} encodeParameters
|
|
5084
5095
|
*/
|
|
5085
|
-
export
|
|
5096
|
+
export default htmx
|
package/dist/htmx.js
CHANGED
|
@@ -271,7 +271,7 @@ var htmx = (function() {
|
|
|
271
271
|
parseInterval: null,
|
|
272
272
|
/** @type {typeof internalEval} */
|
|
273
273
|
_: null,
|
|
274
|
-
version: '2.
|
|
274
|
+
version: '2.0.0-beta3'
|
|
275
275
|
}
|
|
276
276
|
// Tsc madness part 2
|
|
277
277
|
htmx.onLoad = onLoadHelper
|
|
@@ -2602,19 +2602,28 @@ var htmx = (function() {
|
|
|
2602
2602
|
* @param {Node} elt
|
|
2603
2603
|
* @returns {Element[]}
|
|
2604
2604
|
*/
|
|
2605
|
-
|
|
2605
|
+
const HX_ON_QUERY = new XPathEvaluator()
|
|
2606
|
+
.createExpression('.//*[@*[ starts-with(name(), "hx-on:") or starts-with(name(), "data-hx-on:") or' +
|
|
2607
|
+
' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]')
|
|
2608
|
+
|
|
2609
|
+
function processHXOnRoot(elt, elements) {
|
|
2610
|
+
if (shouldProcessHxOn(elt)) {
|
|
2611
|
+
elements.push(asElement(elt))
|
|
2612
|
+
}
|
|
2613
|
+
const iter = HX_ON_QUERY.evaluate(elt)
|
|
2606
2614
|
let node = null
|
|
2615
|
+
while (node = iter.iterateNext()) elements.push(asElement(node))
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
function findHxOnWildcardElements(elt) {
|
|
2607
2619
|
/** @type {Element[]} */
|
|
2608
2620
|
const elements = []
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
elements.push(asElement(elt))
|
|
2621
|
+
if (elt instanceof DocumentFragment) {
|
|
2622
|
+
for (const child of elt.childNodes) {
|
|
2623
|
+
processHXOnRoot(child, elements)
|
|
2613
2624
|
}
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
' starts-with(name(), "hx-on-") or starts-with(name(), "data-hx-on-") ]]', elt)
|
|
2617
|
-
while (node = iter.iterateNext()) elements.push(asElement(node))
|
|
2625
|
+
} else {
|
|
2626
|
+
processHXOnRoot(elt, elements)
|
|
2618
2627
|
}
|
|
2619
2628
|
return elements
|
|
2620
2629
|
}
|
|
@@ -3591,7 +3600,9 @@ var htmx = (function() {
|
|
|
3591
3600
|
return encodedParameters
|
|
3592
3601
|
} else {
|
|
3593
3602
|
if (usesFormData(elt)) {
|
|
3594
|
-
|
|
3603
|
+
// Force conversion to an actual FormData object in case filteredParameters is a formDataProxy
|
|
3604
|
+
// See https://github.com/bigskysoftware/htmx/issues/2317
|
|
3605
|
+
return overrideFormData(new FormData(), formDataFromObject(filteredParameters))
|
|
3595
3606
|
} else {
|
|
3596
3607
|
return urlEncode(filteredParameters)
|
|
3597
3608
|
}
|
|
@@ -3736,7 +3747,7 @@ var htmx = (function() {
|
|
|
3736
3747
|
* @returns {FormData}
|
|
3737
3748
|
*/
|
|
3738
3749
|
function getExpressionVars(elt) {
|
|
3739
|
-
return
|
|
3750
|
+
return mergeObjects(getHXVarsForElement(elt), getHXValsForElement(elt))
|
|
3740
3751
|
}
|
|
3741
3752
|
|
|
3742
3753
|
/**
|
|
@@ -4168,7 +4179,7 @@ var htmx = (function() {
|
|
|
4168
4179
|
if (etc.values) {
|
|
4169
4180
|
overrideFormData(rawFormData, formDataFromObject(etc.values))
|
|
4170
4181
|
}
|
|
4171
|
-
const expressionVars = getExpressionVars(elt)
|
|
4182
|
+
const expressionVars = formDataFromObject(getExpressionVars(elt))
|
|
4172
4183
|
const allFormData = overrideFormData(rawFormData, expressionVars)
|
|
4173
4184
|
let filteredFormData = filterValues(allFormData, elt)
|
|
4174
4185
|
|
package/dist/htmx.min.js
CHANGED
|
@@ -1 +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=sn(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:"",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},parseInterval:null,_:null,version:"2.0a"};Q.onLoad=z;Q.process=It;Q.on=be;Q.off=we;Q.trigger=he;Q.ajax=Cn;Q.find=r;Q.findAll=p;Q.closest=g;Q.remove=K;Q.addClass=W;Q.removeClass=o;Q.toggleClass=Y;Q.takeClass=ge;Q.swap=$e;Q.defineExtension=Mn;Q.removeExtension=Xn;Q.logAll=$;Q.logNone=J;Q.parseInterval=d;Q._=_;const n={addTriggerHandler:St,bodyContains:le,canAccessLocalStorage:V,findThisElement:Ee,filterValues:fn,swap:$e,hasAttribute:s,getAttributeValue:te,getClosestAttributeValue:re,getClosestMatch:T,getExpressionVars:vn,getHeaders:cn,getInputValues:sn,getInternalData:ie,getSwapSpecification:hn,getTriggerSpecs:lt,getTarget:Ce,makeFragment:D,mergeObjects:ue,makeSettleInfo:pn,oobSwap:Te,querySelectorExt:fe,settleImmediately:$t,shouldCancel:ht,triggerEvent:he,triggerErrorEvent:ae,withExtensions:Mt};const v=["get","post","put","delete","patch"];const R=v.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");const O=e("head");function e(e,t=false){return new RegExp(`<${e}(\\s[^>]*>|>)([\\s\\S]*?)<\\/${e}>`,t?"gim":"im")}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 te(e,t){return ee(e,t)||ee(e,"data-"+t)}function u(e){const t=e.parentElement;if(!t&&e.parentNode instanceof ShadowRoot)return e.parentNode;return t}function ne(){return document}function H(e,t){return e.getRootNode?e.getRootNode({composed:t}):ne()}function T(e,t){while(e&&!t(e)){e=u(e)}return e||null}function q(e,t,n){const r=te(t,n);const o=te(t,"hx-disinherit");var i=te(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 re(t,n){let r=null;T(t,function(e){return!!(r=q(t,ce(e),n))});if(r!=="unset"){return r}}function a(e,t){const n=e instanceof Element&&(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector);return!!n&&n.call(e,t)}function L(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 A(e){const t=new DOMParser;return t.parseFromString(e,"text/html")}function N(e,t){while(t.childNodes.length>0){e.append(t.childNodes[0])}}function I(e){const t=ne().createElement("script");se(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 P(e){return e.matches("script")&&(e.type==="text/javascript"||e.type==="module"||e.type==="")}function k(e){Array.from(e.querySelectorAll("script")).forEach(e=>{if(P(e)){const t=I(e);const n=e.parentNode;try{n.insertBefore(t,e)}catch(e){w(e)}finally{e.remove()}}})}function D(e){const t=e.replace(O,"");const n=L(t);let r;if(n==="html"){r=new DocumentFragment;const i=A(e);N(r,i.body);r.title=i.title}else if(n==="body"){r=new DocumentFragment;const i=A(t);N(r,i.body);r.title=i.title}else{const i=A('<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){k(r)}else{r.querySelectorAll("script").forEach(e=>e.remove())}}return r}function oe(e){if(e){e()}}function t(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function M(e){return typeof e==="function"}function X(e){return t(e,"Object")}function ie(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 se(t,n){if(t){for(let e=0;e<t.length;e++){n(t[e])}}}function U(e){const t=e.getBoundingClientRect();const n=t.top;const r=t.bottom;return n<window.innerHeight&&r>=0}function le(e){const t=e.getRootNode&&e.getRootNode();if(t&&t instanceof window.ShadowRoot){return ne().body.contains(t.host)}else{return ne().body.contains(e)}}function B(e){return e.trim().split(/\s+/)}function ue(e,t){for(const n in t){if(t.hasOwnProperty(n)){e[n]=t[n]}}return e}function S(e){try{return JSON.parse(e)}catch(e){w(e);return null}}function V(){const e="htmx:localStorageTest";try{localStorage.setItem(e,e);localStorage.removeItem(e);return true}catch(e){return false}}function j(t){try{const e=new URL(t);if(e){t=e.pathname+e.search}if(!/^\/$/.test(t)){t=t.replace(/\/+$/,"")}return t}catch(e){return t}}function _(e){return yn(ne().body,function(){return eval(e)})}function z(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 J(){Q.logger=null}function r(e,t){if(typeof e!=="string"){return e.querySelector(t)}else{return r(ne(),e)}}function p(e,t){if(typeof e!=="string"){return e.querySelectorAll(t)}else{return p(ne(),e)}}function E(){return window}function K(e,t){e=x(e);if(t){E().setTimeout(function(){K(e);e=null},t)}else{u(e).removeChild(e)}}function ce(e){return e instanceof Element?e:null}function G(e){return e instanceof HTMLElement?e:null}function Z(e){return typeof e==="string"?e:null}function h(e){return e instanceof Element||e instanceof Document||e instanceof DocumentFragment?e:null}function W(e,t,n){e=ce(x(e));if(!e){return}if(n){E().setTimeout(function(){W(e,t);e=null},n)}else{e.classList&&e.classList.add(t)}}function o(e,t,n){let r=ce(x(e));if(!r){return}if(n){E().setTimeout(function(){o(r,t);r=null},n)}else{if(r.classList){r.classList.remove(t);if(r.classList.length===0){r.removeAttribute("class")}}}}function Y(e,t){e=x(e);e.classList.toggle(t)}function ge(e,t){e=x(e);se(e.parentElement.children,function(e){o(e,t)});W(ce(e),t)}function g(e,t){e=ce(x(e));if(e&&e.closest){return e.closest(t)}else{do{if(e==null||a(e,t)){return e}}while(e=e&&ce(u(e)));return null}}function l(e,t){return e.substring(0,t.length)===t}function pe(e,t){return e.substring(e.length-t.length)===t}function i(e){const t=e.trim();if(l(t,"<")&&pe(t,"/>")){return t.substring(1,t.length-2)}else{return t}}function m(e,t,n){e=x(e);if(t.indexOf("closest ")===0){return[g(ce(e),i(t.substr(8)))]}else if(t.indexOf("find ")===0){return[r(h(e),i(t.substr(5)))]}else if(t==="next"){return[ce(e).nextElementSibling]}else if(t.indexOf("next ")===0){return[me(e,i(t.substr(5)),!!n)]}else if(t==="previous"){return[ce(e).previousElementSibling]}else if(t.indexOf("previous ")===0){return[xe(e,i(t.substr(9)),!!n)]}else if(t==="document"){return[document]}else if(t==="window"){return[window]}else if(t==="body"){return[document.body]}else if(t==="root"){return[H(e,!!n)]}else if(t.indexOf("global ")===0){return m(e,t.slice(7),true)}else{return F(h(H(e,!!n)).querySelectorAll(i(t)))}}var me=function(t,e,n){const r=h(H(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 xe=function(t,e,n){const r=h(H(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 fe(e,t){if(typeof e!=="string"){return m(e,t)[0]}else{return m(ne().body,e)[0]}}function x(e,t){if(typeof e==="string"){return r(h(t)||document,e)}else{return e}}function ye(e,t,n){if(M(t)){return{target:ne().body,event:Z(e),listener:t}}else{return{target:x(e),event:Z(t),listener:n}}}function be(t,n,r){Bn(function(){const e=ye(t,n,r);e.target.addEventListener(e.event,e.listener)});const e=M(n);return e?n:r}function we(t,n,r){Bn(function(){const e=ye(t,n,r);e.target.removeEventListener(e.event,e.listener)});return M(n)?n:r}const ve=ne().createElement("output");function Se(e,t){const n=re(e,t);if(n){if(n==="this"){return[Ee(e,t)]}else{const r=m(e,n);if(r.length===0){w('The selector "'+n+'" on '+t+" returned no matches!");return[ve]}else{return r}}}}function Ee(e,t){return ce(T(e,function(e){return te(ce(e),t)!=null}))}function Ce(e){const t=re(e,"hx-target");if(t){if(t==="this"){return Ee(e,"hx-target")}else{return fe(e,t)}}else{const n=ie(e);if(n.boosted){return ne().body}else{return e}}}function Re(t){const n=Q.config.attributesToSettle;for(let e=0;e<n.length;e++){if(t===n[e]){return true}}return false}function Oe(t,n){se(t.attributes,function(e){if(!n.hasAttribute(e.name)&&Re(e.name)){t.removeAttribute(e.name)}});se(n.attributes,function(e){if(Re(e.name)){t.setAttribute(e.name,e.value)}})}function He(t,e){const n=Fn(e);for(let e=0;e<n.length;e++){const r=n[e];try{if(r.isInlineSwap(t)){return true}}catch(e){w(e)}}return t==="outerHTML"}function Te(e,o,i){let t="#"+ee(o,"id");let s="outerHTML";if(e==="true"){}else if(e.indexOf(":")>0){s=e.substr(0,e.indexOf(":"));t=e.substr(e.indexOf(":")+1,e.length)}else{s=e}const n=ne().querySelectorAll(t);if(n){se(n,function(e){let t;const n=o.cloneNode(true);t=ne().createDocumentFragment();t.appendChild(n);if(!He(s,e)){t=h(n)}const r={shouldSwap:true,target:e,fragment:t};if(!he(e,"htmx:oobBeforeSwap",r))return;e=r.target;if(r.shouldSwap){_e(s,e,e,t,i)}se(i.elts,function(e){he(e,"htmx:oobAfterSwap",r)})});o.parentNode.removeChild(o)}else{o.parentNode.removeChild(o);ae(ne().body,"htmx:oobErrorNoTarget",{content:o})}return e}function qe(e){se(p(e,"[hx-preserve], [data-hx-preserve]"),function(e){const t=te(e,"id");const n=ne().getElementById(t);if(n!=null){e.parentNode.replaceChild(n,e)}})}function Le(l,e,u){se(e.querySelectorAll("[id]"),function(t){const n=ee(t,"id");if(n&&n.length>0){const r=n.replace("'","\\'");const o=t.tagName.replace(":","\\:");const e=h(l);const i=e&&e.querySelector(o+"[id='"+r+"']");if(i&&i!==e){const s=t.cloneNode();Oe(t,i);u.tasks.push(function(){Oe(t,s)})}}})}function Ae(e){return function(){o(e,Q.config.addedClass);It(ce(e));Ne(h(e));he(e,"htmx:load")}}function Ne(e){const t="[autofocus]";const n=G(a(e,t)?e:e.querySelector(t));if(n!=null){n.focus()}}function c(e,t,n,r){Le(e,n,r);while(n.childNodes.length>0){const o=n.firstChild;W(ce(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 Pe(t){let n=0;if(t.attributes){for(let e=0;e<t.attributes.length;e++){const r=t.attributes[e];if(r.value){n=Ie(r.name,n);n=Ie(r.value,n)}}}return n}function ke(t){const n=ie(t);if(n.onHandlers){for(let e=0;e<n.onHandlers.length;e++){const r=n.onHandlers[e];we(t,r.event,r.listener)}delete n.onHandlers}}function De(e){const t=ie(e);if(t.timeout){clearTimeout(t.timeout)}if(t.listenerInfos){se(t.listenerInfos,function(e){if(e.on){we(e.on,e.trigger,e.listener)}})}ke(e);se(Object.keys(t),function(e){delete t[e]})}function f(e){he(e,"htmx:beforeCleanupElement");De(e);if(e.children){se(e.children,function(e){f(e)})}}function Me(t,e,n){let r;const o=t.previousSibling;c(u(t),t,e,n);if(o==null){r=u(t).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.nextElementSibling}else{r=null}}f(t);if(t instanceof Element){t.remove()}else{t.parentNode.removeChild(t)}}function Xe(e,t,n){return c(e,e.firstChild,t,n)}function Fe(e,t,n){return c(u(e),e,t,n)}function Ue(e,t,n){return c(e,null,t,n)}function Be(e,t,n){return c(u(e),e.nextSibling,t,n)}function Ve(e){f(e);return u(e).removeChild(e)}function je(e,t,n){const r=e.firstChild;c(e,r,t,n);if(r){while(r.nextSibling){f(r.nextSibling);e.removeChild(r.nextSibling)}f(r);e.removeChild(r)}}function _e(t,e,n,r,o){switch(t){case"none":return;case"outerHTML":Me(n,r,o);return;case"afterbegin":Xe(n,r,o);return;case"beforebegin":Fe(n,r,o);return;case"beforeend":Ue(n,r,o);return;case"afterend":Be(n,r,o);return;case"delete":Ve(n);return;default:var i=Fn(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(typeof l.length!=="undefined"){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){w(e)}}if(t==="innerHTML"){je(n,r,o)}else{_e(Q.config.defaultSwapStyle,e,n,r,o)}}}function ze(e,n){se(p(e,"[hx-swap-oob], [data-hx-swap-oob]"),function(e){if(Q.config.allowNestedOobSwaps||e.parentElement===null){const t=te(e,"hx-swap-oob");if(t!=null){Te(t,e,n)}}else{e.removeAttribute("hx-swap-oob");e.removeAttribute("data-hx-swap-oob")}})}function $e(e,t,r,o){if(!o){o={}}e=x(e);const n=document.activeElement;let i={};try{i={elt:n,start:n?n.selectionStart:null,end:n?n.selectionEnd:null}}catch(e){}const s=pn(e);if(r.swapStyle==="textContent"){e.textContent=t}else{let n=D(t);s.title=n.title;if(o.selectOOB){const u=o.selectOOB.split(",");for(let t=0;t<u.length;t++){const c=u[t].split(":",2);let e=c[0].trim();if(e.indexOf("#")===0){e=e.substring(1)}const f=c[1]||"true";const a=n.querySelector("#"+e);if(a){Te(f,a,s)}}}ze(n,s);se(p(n,"template"),function(e){ze(e.content,s);if(e.content.childElementCount===0){e.remove()}});if(o.select){const h=ne().createDocumentFragment();se(n.querySelectorAll(o.select),function(e){h.appendChild(e)});n=h}qe(n);_e(r.swapStyle,o.contextElement,e,n,s)}if(i.elt&&!le(i.elt)&&ee(i.elt,"id")){const d=document.getElementById(ee(i.elt,"id"));const g={preventScroll:r.focusScroll!==undefined?!r.focusScroll:!Q.config.defaultFocusScroll};if(d){if(i.start&&d.setSelectionRange){try{d.setSelectionRange(i.start,i.end)}catch(e){}}d.focus(g)}}e.classList.remove(Q.config.swappingClass);se(s.elts,function(e){if(e.classList){e.classList.add(Q.config.settlingClass)}he(e,"htmx:afterSwap",o.eventInfo)});if(o.afterSwapCallback){o.afterSwapCallback()}if(!r.ignoreTitle){In(s.title)}const l=function(){se(s.tasks,function(e){e.call()});se(s.elts,function(e){if(e.classList){e.classList.remove(Q.config.settlingClass)}he(e,"htmx:afterSettle",o.eventInfo)});if(o.anchor){const e=ce(x("#"+o.anchor));if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}mn(s.elts,r);if(o.afterSettleCallback){o.afterSettleCallback()}};if(r.settleDelay>0){E().setTimeout(l,r.settleDelay)}else{l()}}function Je(e,t,n){const r=e.getResponseHeader(t);if(r.indexOf("{")===0){const o=S(r);for(const i in o){if(o.hasOwnProperty(i)){let e=o[i];if(!X(e)){e={value:e}}he(n,i,e)}}}else{const s=r.split(",");for(let e=0;e<s.length;e++){he(n,s[e].trim(),[])}}}const Ke=/\s/;const y=/[\s,]/;const Ge=/[_$a-zA-Z]/;const Ze=/[_$a-zA-Z0-9]/;const We=['"',"'","/"];const Ye=/[^\s]/;const Qe=/[{(]/;const et=/[})]/;function tt(e){const t=[];let n=0;while(n<e.length){if(Ge.exec(e.charAt(n))){var r=n;while(Ze.exec(e.charAt(n+1))){n++}t.push(e.substr(r,n-r+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.substr(r,n-r+1))}else{const i=e.charAt(n);t.push(i)}n++}return t}function nt(e,t,n){return Ge.exec(e.charAt(0))&&e!=="true"&&e!=="false"&&e!=="this"&&e!==n&&t!=="."}function rt(r,o,i){if(o[0]==="["){o.shift();let e=1;let t=" return (function("+i+"){ return (";let n=null;while(o.length>0){const s=o[0];if(s==="]"){e--;if(e===0){if(n===null){t=t+"true"}o.shift();t+=")})";try{const l=yn(r,function(){return Function(t)()},function(){return true});l.source=t;return l}catch(e){ae(ne().body,"htmx:syntax:error",{error:e,source:t});return null}}}else if(s==="["){e++}if(nt(s,n,i)){t+="(("+i+"."+s+") ? ("+i+"."+s+") : (window."+s+"))"}else{t=t+s}n=o.shift()}}}function b(e,t){let n="";while(e.length>0&&!t.test(e[0])){n+=e.shift()}return n}function ot(e){let t;if(e.length>0&&Qe.test(e[0])){e.shift();t=b(e,et).trim();e.shift()}else{t=b(e,y)}return t}const it="input, textarea, select";function st(e,t,n){const r=[];const o=tt(t);do{b(o,Ye);const l=o.length;const u=b(o,/[,\[\s]/);if(u!==""){if(u==="every"){const c={trigger:"every"};b(o,Ye);c.pollInterval=d(b(o,/[,\[\s]/));b(o,Ye);var i=rt(e,o,"event");if(i){c.eventFilter=i}r.push(c)}else{const f={trigger:u};var i=rt(e,o,"event");if(i){f.eventFilter=i}while(o.length>0&&o[0]!==","){b(o,Ye);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(b(o,y))}else if(a==="from"&&o[0]===":"){o.shift();if(Qe.test(o[0])){var s=ot(o)}else{var s=b(o,y);if(s==="closest"||s==="find"||s==="next"||s==="previous"){o.shift();const h=ot(o);if(h.length>0){s+=" "+h}}}f.from=s}else if(a==="target"&&o[0]===":"){o.shift();f.target=ot(o)}else if(a==="throttle"&&o[0]===":"){o.shift();f.throttle=d(b(o,y))}else if(a==="queue"&&o[0]===":"){o.shift();f.queue=b(o,y)}else if(a==="root"&&o[0]===":"){o.shift();f[a]=ot(o)}else if(a==="threshold"&&o[0]===":"){o.shift();f[a]=b(o,y)}else{ae(e,"htmx:syntax:error",{token:o.shift()})}}r.push(f)}}if(o.length===l){ae(e,"htmx:syntax:error",{token:o.shift()})}b(o,Ye)}while(o[0]===","&&o.shift());if(n){n[t]=r}return r}function lt(e){const t=te(e,"hx-trigger");let n=[];if(t){const r=Q.config.triggerSpecsCache;n=r&&r[t]||st(e,t,r)}if(n.length>0){return n}else if(a(e,"form")){return[{trigger:"submit"}]}else if(a(e,'input[type="button"], input[type="submit"]')){return[{trigger:"click"}]}else if(a(e,it)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function ut(e){ie(e).cancelled=true}function ct(e,t,n){const r=ie(e);r.timeout=E().setTimeout(function(){if(le(e)&&r.cancelled!==true){if(!gt(n,e,kt("hx:poll:trigger",{triggerSpec:n,target:e}))){t(e)}ct(e,t,n)}},n.pollInterval)}function ft(e){return location.hostname===e.hostname&&ee(e,"href")&&ee(e,"href").indexOf("#")!==0}function at(t,n,e){if(t instanceof HTMLAnchorElement&&ft(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"){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";if(r==="get"){}o=ee(t,"action")}e.forEach(function(e){pt(t,function(e,t){const n=ce(e);if(g(n,Q.config.disableSelector)){f(n);return}de(r,o,n,t)},n,e,true)})}}function ht(e,t){const n=ce(t);if(!n){return false}if(e.type==="submit"||e.type==="click"){if(n.tagName==="FORM"){return true}if(a(n,'input[type="submit"], button')&&g(n,"form")!==null){return true}if(n instanceof HTMLAnchorElement&&n.href&&(n.getAttribute("href")==="#"||n.getAttribute("href").indexOf("#")!==0)){return true}}return false}function dt(e,t){return ie(e).boosted&&e instanceof HTMLAnchorElement&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function gt(e,t,n){const r=e.eventFilter;if(r){try{return r.call(t,n)!==true}catch(e){const o=r.source;ae(ne().body,"htmx:eventFilter:error",{error:e,source:o});return true}}return false}function pt(s,l,e,u,c){const f=ie(s);let t;if(u.from){t=m(s,u.from)}else{t=[s]}if(u.changed){t.forEach(function(e){const t=ie(e);t.lastValue=e.value})}se(t,function(o){const i=function(e){if(!le(s)){o.removeEventListener(u.trigger,i);return}if(dt(s,e)){return}if(c||ht(e,s)){e.preventDefault()}if(gt(u,s,e)){return}const t=ie(e);t.triggerSpec=u;if(t.handledFor==null){t.handledFor=[]}if(t.handledFor.indexOf(s)<0){t.handledFor.push(s);if(u.consume){e.stopPropagation()}if(u.target&&e.target){if(!a(ce(e.target),u.target)){return}}if(u.once){if(f.triggeredOnce){return}else{f.triggeredOnce=true}}if(u.changed){const n=ie(o);const r=o.value;if(n.lastValue===r){return}n.lastValue=r}if(f.delayed){clearTimeout(f.delayed)}if(f.throttle){return}if(u.throttle>0){if(!f.throttle){l(s,e);f.throttle=E().setTimeout(function(){f.throttle=null},u.throttle)}}else if(u.delay>0){f.delayed=E().setTimeout(function(){l(s,e)},u.delay)}else{he(s,"htmx:trigger");l(s,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:u.trigger,listener:i,on:o});o.addEventListener(u.trigger,i)})}let mt=false;let xt=null;function yt(){if(!xt){xt=function(){mt=true};window.addEventListener("scroll",xt);setInterval(function(){if(mt){mt=false;se(ne().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(e){bt(e)})}},200)}}function bt(e){if(!s(e,"data-hx-revealed")&&U(e)){e.setAttribute("data-hx-revealed","true");const t=ie(e);if(t.initHash){he(e,"revealed")}else{e.addEventListener("htmx:afterProcessNode",function(){he(e,"revealed")},{once:true})}}}function wt(e,t,n,r){const o=function(){if(!n.loaded){n.loaded=true;t(e)}};if(r>0){E().setTimeout(o,r)}else{o()}}function vt(t,n,e){let i=false;se(v,function(r){if(s(t,"hx-"+r)){const o=te(t,"hx-"+r);i=true;n.path=o;n.verb=r;e.forEach(function(e){St(t,e,n,function(e,t){const n=ce(e);if(g(n,Q.config.disableSelector)){f(n);return}de(r,o,n,t)})})}});return i}function St(r,e,t,n){if(e.trigger==="revealed"){yt();pt(r,n,t,e);bt(ce(r))}else if(e.trigger==="intersect"){const o={};if(e.root){o.root=fe(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){he(r,"intersect");break}}},o);i.observe(ce(r));pt(ce(r),n,t,e)}else if(e.trigger==="load"){if(!gt(e,r,kt("load",{elt:r}))){wt(ce(r),n,t,e.delay)}}else if(e.pollInterval>0){t.polling=true;ct(ce(r),n,e)}else{pt(r,n,t,e)}}function Et(e){const t=ce(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}function Ct(e){let t=null;const n=[];if(!(e instanceof ShadowRoot)){if(Et(e)){n.push(ce(e))}const r=document.evaluate('.//*[@*[ 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-") ]]',e);while(t=r.iterateNext())n.push(ce(t))}return n}function Rt(e){if(e.querySelectorAll){const t=", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]";const n=e.querySelectorAll(R+t+", form, [type='submit'],"+" [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]");return n}else{return[]}}function Ot(e){const t=g(ce(e.target),"button, input[type='submit']");const n=Tt(e);if(n){n.lastButtonClicked=t}}function Ht(e){const t=Tt(e);if(t){t.lastButtonClicked=null}}function Tt(e){const t=g(ce(e.target),"button, input[type='submit']");if(!t){return}const n=x("#"+ee(t,"form"),t.getRootNode())||g(t,"form");if(!n){return}return ie(n)}function qt(e){e.addEventListener("click",Ot);e.addEventListener("focusin",Ot);e.addEventListener("focusout",Ht)}function Lt(t,e,n){const r=ie(t);if(!Array.isArray(r.onHandlers)){r.onHandlers=[]}let o;const i=function(e){yn(t,function(){if(!o){o=new Function("event",n)}o.call(t,e)})};t.addEventListener(e,i);r.onHandlers.push({event:e,listener:i})}function At(t){ke(t);for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;const r=t.attributes[e].value;if(l(n,"hx-on")||l(n,"data-hx-on")){const o=n.indexOf("-on")+3;const i=n.slice(o,o+1);if(i==="-"||i===":"){let e=n.slice(o+1);if(l(e,":")){e="htmx"+e}else if(l(e,"-")){e="htmx:"+e.slice(1)}else if(l(e,"htmx-")){e="htmx:"+e.slice(5)}Lt(t,e,r)}}}}function Nt(t){if(g(t,Q.config.disableSelector)){f(t);return}const n=ie(t);if(n.initHash!==Pe(t)){De(t);n.initHash=Pe(t);he(t,"htmx:beforeProcessNode");if(t.value){n.lastValue=t.value}const e=lt(t);const r=vt(t,n,e);if(!r){if(re(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")){qt(t)}he(t,"htmx:afterProcessNode")}}function It(e){e=x(e);if(g(e,Q.config.disableSelector)){f(e);return}Nt(e);se(Rt(e),function(e){Nt(e)});se(Ct(e),At)}function Pt(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function kt(e,t){let n;if(window.CustomEvent&&typeof window.CustomEvent==="function"){n=new CustomEvent(e,{bubbles:true,cancelable:true,composed:true,detail:t})}else{n=ne().createEvent("CustomEvent");n.initCustomEvent(e,true,true,t)}return n}function ae(e,t,n){he(e,t,ue({error:t},n))}function Dt(e){return e==="htmx:afterProcessNode"}function Mt(e,t){se(Fn(e),function(e){try{t(e)}catch(e){w(e)}})}function w(e){if(console.error){console.error(e)}else if(console.log){console.log("ERROR: ",e)}}function he(e,t,n){e=x(e);if(n==null){n={}}n.elt=e;const r=kt(t,n);if(Q.logger&&!Dt(t)){Q.logger(e,t,n)}if(n.error){w(n.error);he(e,"htmx:error",{errorInfo:n})}let o=e.dispatchEvent(r);const i=Pt(t);if(o&&i!==t){const s=kt(i,r.detail);o=o&&e.dispatchEvent(s)}Mt(ce(e),function(e){o=o&&(e.onEvent(t,r)!==false&&!r.defaultPrevented)});return o}let Xt=location.pathname+location.search;function Ft(){const e=ne().querySelector("[hx-history-elt],[data-hx-history-elt]");return e||ne().body}function Ut(t,e){if(!V()){return}const n=Vt(e);const r=ne().title;const o=window.scrollY;if(Q.config.historyCacheSize<=0){localStorage.removeItem("htmx-history-cache");return}t=j(t);const i=S(localStorage.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};he(ne().body,"htmx:historyItemCreated",{item:s,cache:i});i.push(s);while(i.length>Q.config.historyCacheSize){i.shift()}while(i.length>0){try{localStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){ae(ne().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function Bt(t){if(!V()){return null}t=j(t);const n=S(localStorage.getItem("htmx-history-cache"))||[];for(let e=0;e<n.length;e++){if(n[e].url===t){return n[e]}}return null}function Vt(e){const t=Q.config.requestClass;const n=e.cloneNode(true);se(p(n,"."+t),function(e){o(e,t)});return n.innerHTML}function jt(){const e=Ft();const t=Xt||location.pathname+location.search;let n;try{n=ne().querySelector('[hx-history="false" i],[data-hx-history="false" i]')}catch(e){n=ne().querySelector('[hx-history="false"],[data-hx-history="false"]')}if(!n){he(ne().body,"htmx:beforeHistorySave",{path:t,historyElt:e});Ut(t,e)}if(Q.config.historyEnabled)history.replaceState({htmx:true},ne().title,window.location.href)}function _t(e){if(Q.config.getCacheBusterParam){e=e.replace(/org\.htmx\.cache-buster=[^&]*&?/,"");if(pe(e,"&")||pe(e,"?")){e=e.slice(0,-1)}}if(Q.config.historyEnabled){history.pushState({htmx:true},"",e)}Xt=e}function zt(e){if(Q.config.historyEnabled)history.replaceState({htmx:true},"",e);Xt=e}function $t(e){se(e,function(e){e.call(undefined)})}function Jt(o){const e=new XMLHttpRequest;const i={path:o,xhr:e};he(ne().body,"htmx:historyCacheMiss",i);e.open("GET",o,true);e.setRequestHeader("HX-Request","true");e.setRequestHeader("HX-History-Restore-Request","true");e.setRequestHeader("HX-Current-URL",ne().location.href);e.onload=function(){if(this.status>=200&&this.status<400){he(ne().body,"htmx:historyCacheMissLoad",i);const e=D(this.response);const t=e.querySelector("[hx-history-elt],[data-hx-history-elt]")||e;const n=Ft();const r=pn(n);In(e.title);je(n,t,r);$t(r.tasks);Xt=o;he(ne().body,"htmx:historyRestore",{path:o,cacheMiss:true,serverResponse:this.response})}else{ae(ne().body,"htmx:historyCacheMissLoadError",i)}};e.send()}function Kt(e){jt();e=e||location.pathname+location.search;const t=Bt(e);if(t){const n=D(t.content);const r=Ft();const o=pn(r);In(n.title);je(r,n,o);$t(o.tasks);E().setTimeout(function(){window.scrollTo(0,t.scroll)},0);Xt=e;he(ne().body,"htmx:historyRestore",{path:e,item:t})}else{if(Q.config.refreshOnHistoryMiss){window.location.reload(true)}else{Jt(e)}}}function Gt(e){let t=Se(e,"hx-indicator");if(t==null){t=[e]}se(t,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)+1;e.classList.add.call(e.classList,Q.config.requestClass)});return t}function Zt(e){let t=Se(e,"hx-disabled-elt");if(t==null){t=[]}se(t,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)+1;e.setAttribute("disabled","")});return t}function Wt(e,t){se(e,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.classList.remove.call(e.classList,Q.config.requestClass)}});se(t,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.removeAttribute("disabled")}})}function Yt(t,n){for(let e=0;e<t.length;e++){const r=t[e];if(r.isSameNode(n)){return true}}return false}function Qt(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 en(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 tn(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);se(e,e=>r.append(t,e))}}function nn(t,n,r,o,i){if(o==null||Yt(t,o)){return}else{t.push(o)}if(Qt(o)){const s=ee(o,"name");let e=o.value;if(o instanceof HTMLSelectElement&&o.multiple){e=F(o.querySelectorAll("option:checked")).map(function(e){return e.value})}if(o instanceof HTMLInputElement&&o.files){e=F(o.files)}en(s,e,n);if(i){rn(o,r)}}if(o instanceof HTMLFormElement){se(o.elements,function(e){if(t.indexOf(e)>=0){tn(e.name,e.value,n)}else{t.push(e)}if(i){rn(e,r)}});new FormData(o).forEach(function(e,t){en(t,e,n)})}}function rn(e,t){const n=e;if(n.willValidate){he(n,"htmx:validation:validate");if(!n.checkValidity()){t.push({elt:n,message:n.validationMessage,validity:n.validity});he(n,"htmx:validation:failed",{message:n.validationMessage,validity:n.validity})}}}function on(t,e){for(const n of e.keys()){t.delete(n);e.getAll(n).forEach(function(e){t.append(n,e)})}return t}function sn(e,t){const n=[];const r=new FormData;const o=new FormData;const i=[];const s=ie(e);if(s.lastButtonClicked&&!le(s.lastButtonClicked)){s.lastButtonClicked=null}let l=e instanceof HTMLFormElement&&e.noValidate!==true||te(e,"hx-validate")==="true";if(s.lastButtonClicked){l=l&&s.lastButtonClicked.formNoValidate!==true}if(t!=="get"){nn(n,o,i,g(e,"form"),l)}nn(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");en(f,c.value,o)}const u=Se(e,"hx-include");se(u,function(e){nn(n,r,i,ce(e),l);if(!a(e,"form")){se(h(e).querySelectorAll(it),function(e){nn(n,r,i,e,l)})}});on(r,o);return{errors:i,formData:r,values:qn(r)}}function ln(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 un(e){e=Hn(e);let n="";e.forEach(function(e,t){n=ln(n,t,e)});return n}function cn(e,t,n){const r={"HX-Request":"true","HX-Trigger":ee(e,"id"),"HX-Trigger-Name":ee(e,"name"),"HX-Target":te(t,"id"),"HX-Current-URL":ne().location.href};xn(e,"hx-headers",false,r);if(n!==undefined){r["HX-Prompt"]=n}if(ie(e).boosted){r["HX-Boosted"]="true"}return r}function fn(n,e){const t=re(e,"hx-params");if(t){if(t==="none"){return new FormData}else if(t==="*"){return n}else if(t.indexOf("not ")===0){se(t.substr(4).split(","),function(e){e=e.trim();n.delete(e)});return n}else{const r=new FormData;se(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 an(e){return!!ee(e,"href")&&ee(e,"href").indexOf("#")>=0}function hn(e,t){const n=t||re(e,"hx-swap");const r={swapStyle:ie(e).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&ie(e).boosted&&!an(e)){r.show="top"}if(n){const s=B(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.substr(5))}else if(l.indexOf("settle:")===0){r.settleDelay=d(l.substr(7))}else if(l.indexOf("transition:")===0){r.transition=l.substr(11)==="true"}else if(l.indexOf("ignoreTitle:")===0){r.ignoreTitle=l.substr(12)==="true"}else if(l.indexOf("scroll:")===0){const u=l.substr(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.substr(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.substr("focus-scroll:".length);r.focusScroll=h=="true"}else if(e==0){r.swapStyle=l}else{w("Unknown modifier in hx-swap: "+l)}}}}return r}function dn(e){return re(e,"hx-encoding")==="multipart/form-data"||a(e,"form")&&ee(e,"enctype")==="multipart/form-data"}function gn(t,n,r){let o=null;Mt(n,function(e){if(o==null){o=e.encodeParameters(t,r,n)}});if(o!=null){return o}else{if(dn(n)){return Hn(r)}else{return un(r)}}}function pn(e){return{tasks:[],elts:[e]}}function mn(e,t){const n=e[0];const r=e[e.length-1];if(t.scroll){var o=null;if(t.scrollTarget){o=ce(fe(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(t.show){var o=null;if(t.showTarget){let e=t.showTarget;if(t.showTarget==="window"){e="body"}o=ce(fe(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 xn(r,e,o,i){if(i==null){i={}}if(r==null){return i}const s=te(r,e);if(s){let e=s.trim();let t=o;if(e==="unset"){return null}if(e.indexOf("javascript:")===0){e=e.substr(11);t=true}else if(e.indexOf("js:")===0){e=e.substr(3);t=true}if(e.indexOf("{")!==0){e="{"+e+"}"}let n;if(t){n=yn(r,function(){return Function("return ("+e+")")()},{})}else{n=S(e)}for(const l in n){if(n.hasOwnProperty(l)){if(i[l]==null){i[l]=n[l]}}}}return xn(ce(u(r)),e,o,i)}function yn(e,t,n){if(Q.config.allowEval){return t()}else{ae(e,"htmx:evalDisallowedError");return n}}function bn(e,t){return xn(e,"hx-vars",true,t)}function wn(e,t){return xn(e,"hx-vals",false,t)}function vn(e){return Hn(ue(bn(e),wn(e)))}function Sn(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 En(t){if(t.responseURL&&typeof URL!=="undefined"){try{const e=new URL(t.responseURL);return e.pathname+e.search}catch(e){ae(ne().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function C(e,t){return t.test(e.getAllResponseHeaders())}function Cn(e,t,n){e=e.toLowerCase();if(n){if(n instanceof Element||typeof n==="string"){return de(e,t,null,null,{targetOverride:x(n),returnPromise:true})}else{return de(e,t,x(n.source),n.event,{handler:n.handler,headers:n.headers,values:n.values,targetOverride:x(n.target),swapOverride:n.swap,select:n.select,returnPromise:true})}}else{return de(e,t,null,null,{returnPromise:true})}}function Rn(e){const t=[];while(e){t.push(e);e=e.parentElement}return t}function On(e,t,n){let r;let o;if(typeof URL==="function"){o=new URL(t,document.location.href);const i=document.location.origin;r=i===o.origin}else{o=t;r=l(t,document.location.origin)}if(Q.config.selfRequestsOnly){if(!r){return false}}return he(e,"htmx:validateUrl",ue({url:o,sameHost:r},n))}function Hn(e){if(e instanceof FormData)return e;const t=new FormData;for(const n in e){if(e.hasOwnProperty(n)){if(typeof e[n].forEach==="function"){e[n].forEach(function(e){t.append(n,e)})}else if(typeof e[n]==="object"){t.append(n,JSON.stringify(e[n]))}else{t.append(n,e[n])}}}return t}function Tn(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 qn(r){return new Proxy(r,{get:function(e,t){if(typeof t==="symbol"){return Reflect.get(e,t)}if(t==="toJSON"){return()=>Object.fromEntries(r)}if(t in e){if(typeof e[t]==="function"){return function(){return r[t].apply(r,arguments)}}else{return e[t]}}const n=r.getAll(t);if(n.length===0){return undefined}else if(n.length===1){return n[0]}else{return Tn(e,t,n)}},set:function(t,n,e){if(typeof n!=="string"){return false}t.delete(n);if(typeof e.forEach==="function"){e.forEach(function(e){t.append(n,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 de(t,n,r,o,i,D){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=ne().body}const M=i.handler||Pn;const X=i.select||null;if(!le(r)){oe(s);return e}const u=i.targetOverride||ce(Ce(r));if(u==null||u==ve){ae(r,"htmx:targetError",{target:te(r,"hx-target")});oe(l);return e}let c=ie(r);const f=c.lastButtonClicked;if(f){const L=ee(f,"formaction");if(L!=null){n=L}const A=ee(f,"formmethod");if(A!=null){if(A.toLowerCase()!=="dialog"){t=A}}}const a=re(r,"hx-confirm");if(D===undefined){const K=function(e){return de(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(he(r,"htmx:confirm",G)===false){oe(s);return e}}let h=r;let d=re(r,"hx-sync");let g=null;let F=false;if(d){const N=d.split(":");const I=N[0].trim();if(I==="this"){h=Ee(r,"hx-sync")}else{h=ce(fe(r,I))}d=(N[1]||"drop").trim();c=ie(h);if(d==="drop"&&c.xhr&&c.abortable!==true){oe(s);return e}else if(d==="abort"){if(c.xhr){oe(s);return e}else{F=true}}else if(d==="replace"){he(h,"htmx:abort")}else if(d.indexOf("queue")===0){const Z=d.split(" ");g=(Z[1]||"last").trim()}}if(c.xhr){if(c.abortable){he(h,"htmx:abort")}else{if(g==null){if(o){const P=ie(o);if(P&&P.triggerSpec&&P.triggerSpec.queue){g=P.triggerSpec.queue}}if(g==null){g="last"}}if(c.queuedRequests==null){c.queuedRequests=[]}if(g==="first"&&c.queuedRequests.length===0){c.queuedRequests.push(function(){de(t,n,r,o,i)})}else if(g==="all"){c.queuedRequests.push(function(){de(t,n,r,o,i)})}else if(g==="last"){c.queuedRequests=[];c.queuedRequests.push(function(){de(t,n,r,o,i)})}oe(s);return e}}const p=new XMLHttpRequest;c.xhr=p;c.abortable=F;const m=function(){c.xhr=null;c.abortable=false;if(c.queuedRequests!=null&&c.queuedRequests.length>0){const e=c.queuedRequests.shift();e()}};const U=re(r,"hx-prompt");if(U){var x=prompt(U);if(x===null||!he(r,"htmx:prompt",{prompt:x,target:u})){oe(s);m();return e}}if(a&&!D){if(!confirm(a)){oe(s);m();return e}}let y=cn(r,u,x);if(t!=="get"&&!dn(r)){y["Content-Type"]="application/x-www-form-urlencoded"}if(i.headers){y=ue(y,i.headers)}const B=sn(r,t);let b=B.errors;const V=B.formData;if(i.values){on(V,Hn(i.values))}const j=vn(r);const w=on(V,j);let v=fn(w,r);if(Q.config.getCacheBusterParam&&t==="get"){v.set("org.htmx.cache-buster",ee(u,"id")||"true")}if(n==null||n===""){n=ne().location.href}const S=xn(r,"hx-request");const _=ie(r).boosted;let E=Q.config.methodsThatUseUrlParams.indexOf(t)>=0;const C={boosted:_,useUrlParams:E,formData:v,parameters:qn(v),unfilteredFormData:w,unfilteredParameters:qn(w),headers:y,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(!he(r,"htmx:configRequest",C)){oe(s);m();return e}n=C.path;t=C.verb;y=C.headers;v=Hn(C.parameters);b=C.errors;E=C.useUrlParams;if(b&&b.length>0){he(r,"htmx:validation:halted",C);oe(s);m();return e}const z=n.split("#");const $=z[0];const R=z[1];let O=n;if(E){O=$;const W=!v.keys().next().done;if(W){if(O.indexOf("?")<0){O+="?"}else{O+="&"}O+=un(v);if(R){O+="#"+R}}}if(!On(r,O,C)){ae(r,"htmx:invalidPath",C);oe(l);return e}p.open(t.toUpperCase(),O,true);p.overrideMimeType("text/html");p.withCredentials=C.withCredentials;p.timeout=C.timeout;if(S.noHeaders){}else{for(const k in y){if(y.hasOwnProperty(k)){const Y=y[k];Sn(p,k,Y)}}}const H={xhr:p,target:u,requestConfig:C,etc:i,boosted:_,select:X,pathInfo:{requestPath:n,finalRequestPath:O,responsePath:null,anchor:R}};p.onload=function(){try{const t=Rn(r);H.pathInfo.responsePath=En(p);M(r,H);Wt(T,q);he(r,"htmx:afterRequest",H);he(r,"htmx:afterOnLoad",H);if(!le(r)){let e=null;while(t.length>0&&e==null){const n=t.shift();if(le(n)){e=n}}if(e){he(e,"htmx:afterRequest",H);he(e,"htmx:afterOnLoad",H)}}oe(s);m()}catch(e){ae(r,"htmx:onLoadError",ue({error:e},H));throw e}};p.onerror=function(){Wt(T,q);ae(r,"htmx:afterRequest",H);ae(r,"htmx:sendError",H);oe(l);m()};p.onabort=function(){Wt(T,q);ae(r,"htmx:afterRequest",H);ae(r,"htmx:sendAbort",H);oe(l);m()};p.ontimeout=function(){Wt(T,q);ae(r,"htmx:afterRequest",H);ae(r,"htmx:timeout",H);oe(l);m()};if(!he(r,"htmx:beforeRequest",H)){oe(s);m();return e}var T=Gt(r);var q=Zt(r);se(["loadstart","loadend","progress","abort"],function(t){se([p,p.upload],function(e){e.addEventListener(t,function(e){he(r,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})})})});he(r,"htmx:beforeSend",H);const J=E?null:gn(p,r,v);p.send(J);return e}function Ln(e,t){const n=t.xhr;let r=null;let o=null;if(C(n,/HX-Push:/i)){r=n.getResponseHeader("HX-Push");o="push"}else if(C(n,/HX-Push-Url:/i)){r=n.getResponseHeader("HX-Push-Url");o="push"}else if(C(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;const l=re(e,"hx-push-url");const u=re(e,"hx-replace-url");const c=ie(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==="false"){return{}}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 An(e,t){var n=new RegExp(e.code);return n.test(t.toString(10))}function Nn(e){for(var t=0;t<Q.config.responseHandling.length;t++){var n=Q.config.responseHandling[t];if(An(n,e.status)){return n}}return{swap:false}}function In(e){if(e){const t=r("title");if(t){t.innerHTML=e}else{window.document.title=e}}}function Pn(o,i){const s=i.xhr;let l=i.target;const e=i.etc;const u=i.select;if(!he(o,"htmx:beforeOnLoad",i))return;if(C(s,/HX-Trigger:/i)){Je(s,"HX-Trigger",o)}if(C(s,/HX-Location:/i)){jt();let e=s.getResponseHeader("HX-Location");var t;if(e.indexOf("{")===0){t=S(e);e=t.path;delete t.path}Cn("get",e,t).then(function(){_t(e)});return}const n=C(s,/HX-Refresh:/i)&&s.getResponseHeader("HX-Refresh")==="true";if(C(s,/HX-Redirect:/i)){location.href=s.getResponseHeader("HX-Redirect");n&&location.reload();return}if(n){location.reload();return}if(C(s,/HX-Retarget:/i)){if(s.getResponseHeader("HX-Retarget")==="this"){i.target=o}else{i.target=ce(fe(o,s.getResponseHeader("HX-Retarget")))}}const c=Ln(o,i);const r=Nn(s);const f=r.swap;let a=!!r.error;let h=Q.config.ignoreTitle||r.ignoreTitle;let d=r.select;if(r.target){i.target=ce(fe(o,r.target))}var g=e.swapOverride;if(g==null&&r.swapOverride){g=r.swapOverride}if(C(s,/HX-Retarget:/i)){if(s.getResponseHeader("HX-Retarget")==="this"){i.target=o}else{i.target=ce(fe(o,s.getResponseHeader("HX-Retarget")))}}if(C(s,/HX-Reswap:/i)){g=s.getResponseHeader("HX-Reswap")}var p=s.response;var m=ue({shouldSwap:f,serverResponse:p,isError:a,ignoreTitle:h,selectOverride:d},i);if(r.event&&!he(l,r.event,m))return;if(!he(l,"htmx:beforeSwap",m))return;l=m.target;p=m.serverResponse;a=m.isError;h=m.ignoreTitle;d=m.selectOverride;i.target=l;i.failed=a;i.successful=!a;if(m.shouldSwap){if(s.status===286){ut(o)}Mt(o,function(e){p=e.transformResponse(p,s,o)});if(c.type){jt()}if(C(s,/HX-Reswap:/i)){g=s.getResponseHeader("HX-Reswap")}var x=hn(o,g);if(!x.hasOwnProperty("ignoreTitle")){x.ignoreTitle=h}l.classList.add(Q.config.swappingClass);let n=null;let r=null;if(u){d=u}if(C(s,/HX-Reselect:/i)){d=s.getResponseHeader("HX-Reselect")}const y=re(o,"hx-select-oob");const b=re(o,"hx-select");let e=function(){try{if(c.type){he(ne().body,"htmx:beforeHistoryUpdate",ue({history:c},i));if(c.type==="push"){_t(c.path);he(ne().body,"htmx:pushedIntoHistory",{path:c.path})}else{zt(c.path);he(ne().body,"htmx:replacedInHistory",{path:c.path})}}$e(l,p,x,{select:d||b,selectOOB:y,eventInfo:i,anchor:i.pathInfo.anchor,contextElement:o,afterSwapCallback:function(){if(C(s,/HX-Trigger-After-Swap:/i)){let e=o;if(!le(o)){e=ne().body}Je(s,"HX-Trigger-After-Swap",e)}},afterSettleCallback:function(){if(C(s,/HX-Trigger-After-Settle:/i)){let e=o;if(!le(o)){e=ne().body}Je(s,"HX-Trigger-After-Settle",e)}oe(n)}})}catch(e){ae(o,"htmx:swapError",i);oe(r);throw e}};let t=Q.config.globalViewTransitions;if(x.hasOwnProperty("transition")){t=x.transition}if(t&&he(o,"htmx:beforeTransition",i)&&typeof Promise!=="undefined"&&document.startViewTransition){const w=new Promise(function(e,t){n=e;r=t});const v=e;e=function(){document.startViewTransition(function(){v();return w})}}if(x.swapDelay>0){E().setTimeout(e,x.swapDelay)}else{e()}}if(a){ae(o,"htmx:responseError",ue({error:"Response Status Error Code "+s.status+" from "+i.pathInfo.requestPath},i))}}const kn={};function Dn(){return{init:function(e){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 Mn(e,t){if(t.init){t.init(n)}kn[e]=ue(Dn(),t)}function Xn(e){delete kn[e]}function Fn(e,n,r){if(n==undefined){n=[]}if(e==undefined){return n}if(r==undefined){r=[]}const t=te(e,"hx-ext");if(t){se(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=kn[e];if(t&&n.indexOf(t)<0){n.push(t)}}})}return Fn(ce(u(e)),n,r)}var Un=false;ne().addEventListener("DOMContentLoaded",function(){Un=true});function Bn(e){if(Un||ne().readyState==="complete"){e()}else{ne().addEventListener("DOMContentLoaded",e)}}function Vn(){if(Q.config.includeIndicatorStyles!==false){ne().head.insertAdjacentHTML("beforeend","<style> ."+Q.config.indicatorClass+"{opacity:0} ."+Q.config.requestClass+" ."+Q.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;} ."+Q.config.requestClass+"."+Q.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;} </style>")}}function jn(){const e=ne().querySelector('meta[name="htmx-config"]');if(e){return S(e.content)}else{return null}}function _n(){const e=jn();if(e){Q.config=ue(Q.config,e)}}Bn(function(){_n();Vn();let e=ne().body;It(e);const t=ne().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){const t=e.target;const n=ie(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){Kt();se(t,function(e){he(e,"htmx:restored",{document:ne(),triggerEvent:he})})}else{if(n){n(e)}}};E().setTimeout(function(){he(e,"htmx:load",{});e=null},0)});return Q}();
|
|
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=un(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:"",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},parseInterval:null,_:null,version:"2.0.0-beta3"};Q.onLoad=z;Q.process=kt;Q.on=be;Q.off=we;Q.trigger=he;Q.ajax=On;Q.find=r;Q.findAll=p;Q.closest=g;Q.remove=K;Q.addClass=W;Q.removeClass=o;Q.toggleClass=Y;Q.takeClass=ge;Q.swap=$e;Q.defineExtension=Fn;Q.removeExtension=Un;Q.logAll=$;Q.logNone=J;Q.parseInterval=d;Q._=_;const n={addTriggerHandler:St,bodyContains:le,canAccessLocalStorage:V,findThisElement:Ee,filterValues:hn,swap:$e,hasAttribute:s,getAttributeValue:te,getClosestAttributeValue:re,getClosestMatch:T,getExpressionVars:En,getHeaders:fn,getInputValues:un,getInternalData:ie,getSwapSpecification:gn,getTriggerSpecs:lt,getTarget:Ce,makeFragment:D,mergeObjects:ue,makeSettleInfo:xn,oobSwap:Te,querySelectorExt:ae,settleImmediately:Kt,shouldCancel:ht,triggerEvent:he,triggerErrorEvent:fe,withExtensions:Ft};const v=["get","post","put","delete","patch"];const R=v.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", ");const O=e("head");function e(e,t=false){return new RegExp(`<${e}(\\s[^>]*>|>)([\\s\\S]*?)<\\/${e}>`,t?"gim":"im")}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 te(e,t){return ee(e,t)||ee(e,"data-"+t)}function u(e){const t=e.parentElement;if(!t&&e.parentNode instanceof ShadowRoot)return e.parentNode;return t}function ne(){return document}function H(e,t){return e.getRootNode?e.getRootNode({composed:t}):ne()}function T(e,t){while(e&&!t(e)){e=u(e)}return e||null}function q(e,t,n){const r=te(t,n);const o=te(t,"hx-disinherit");var i=te(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 re(t,n){let r=null;T(t,function(e){return!!(r=q(t,ce(e),n))});if(r!=="unset"){return r}}function f(e,t){const n=e instanceof Element&&(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector);return!!n&&n.call(e,t)}function L(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 A(e){const t=new DOMParser;return t.parseFromString(e,"text/html")}function N(e,t){while(t.childNodes.length>0){e.append(t.childNodes[0])}}function I(e){const t=ne().createElement("script");se(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 P(e){return e.matches("script")&&(e.type==="text/javascript"||e.type==="module"||e.type==="")}function k(e){Array.from(e.querySelectorAll("script")).forEach(e=>{if(P(e)){const t=I(e);const n=e.parentNode;try{n.insertBefore(t,e)}catch(e){w(e)}finally{e.remove()}}})}function D(e){const t=e.replace(O,"");const n=L(t);let r;if(n==="html"){r=new DocumentFragment;const i=A(e);N(r,i.body);r.title=i.title}else if(n==="body"){r=new DocumentFragment;const i=A(t);N(r,i.body);r.title=i.title}else{const i=A('<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){k(r)}else{r.querySelectorAll("script").forEach(e=>e.remove())}}return r}function oe(e){if(e){e()}}function t(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function M(e){return typeof e==="function"}function X(e){return t(e,"Object")}function ie(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 se(t,n){if(t){for(let e=0;e<t.length;e++){n(t[e])}}}function U(e){const t=e.getBoundingClientRect();const n=t.top;const r=t.bottom;return n<window.innerHeight&&r>=0}function le(e){const t=e.getRootNode&&e.getRootNode();if(t&&t instanceof window.ShadowRoot){return ne().body.contains(t.host)}else{return ne().body.contains(e)}}function B(e){return e.trim().split(/\s+/)}function ue(e,t){for(const n in t){if(t.hasOwnProperty(n)){e[n]=t[n]}}return e}function S(e){try{return JSON.parse(e)}catch(e){w(e);return null}}function V(){const e="htmx:localStorageTest";try{localStorage.setItem(e,e);localStorage.removeItem(e);return true}catch(e){return false}}function j(t){try{const e=new URL(t);if(e){t=e.pathname+e.search}if(!/^\/$/.test(t)){t=t.replace(/\/+$/,"")}return t}catch(e){return t}}function _(e){return wn(ne().body,function(){return eval(e)})}function z(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 J(){Q.logger=null}function r(e,t){if(typeof e!=="string"){return e.querySelector(t)}else{return r(ne(),e)}}function p(e,t){if(typeof e!=="string"){return e.querySelectorAll(t)}else{return p(ne(),e)}}function E(){return window}function K(e,t){e=x(e);if(t){E().setTimeout(function(){K(e);e=null},t)}else{u(e).removeChild(e)}}function ce(e){return e instanceof Element?e:null}function G(e){return e instanceof HTMLElement?e:null}function Z(e){return typeof e==="string"?e:null}function h(e){return e instanceof Element||e instanceof Document||e instanceof DocumentFragment?e:null}function W(e,t,n){e=ce(x(e));if(!e){return}if(n){E().setTimeout(function(){W(e,t);e=null},n)}else{e.classList&&e.classList.add(t)}}function o(e,t,n){let r=ce(x(e));if(!r){return}if(n){E().setTimeout(function(){o(r,t);r=null},n)}else{if(r.classList){r.classList.remove(t);if(r.classList.length===0){r.removeAttribute("class")}}}}function Y(e,t){e=x(e);e.classList.toggle(t)}function ge(e,t){e=x(e);se(e.parentElement.children,function(e){o(e,t)});W(ce(e),t)}function g(e,t){e=ce(x(e));if(e&&e.closest){return e.closest(t)}else{do{if(e==null||f(e,t)){return e}}while(e=e&&ce(u(e)));return null}}function l(e,t){return e.substring(0,t.length)===t}function pe(e,t){return e.substring(e.length-t.length)===t}function i(e){const t=e.trim();if(l(t,"<")&&pe(t,"/>")){return t.substring(1,t.length-2)}else{return t}}function m(e,t,n){e=x(e);if(t.indexOf("closest ")===0){return[g(ce(e),i(t.substr(8)))]}else if(t.indexOf("find ")===0){return[r(h(e),i(t.substr(5)))]}else if(t==="next"){return[ce(e).nextElementSibling]}else if(t.indexOf("next ")===0){return[me(e,i(t.substr(5)),!!n)]}else if(t==="previous"){return[ce(e).previousElementSibling]}else if(t.indexOf("previous ")===0){return[xe(e,i(t.substr(9)),!!n)]}else if(t==="document"){return[document]}else if(t==="window"){return[window]}else if(t==="body"){return[document.body]}else if(t==="root"){return[H(e,!!n)]}else if(t.indexOf("global ")===0){return m(e,t.slice(7),true)}else{return F(h(H(e,!!n)).querySelectorAll(i(t)))}}var me=function(t,e,n){const r=h(H(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 xe=function(t,e,n){const r=h(H(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 ae(e,t){if(typeof e!=="string"){return m(e,t)[0]}else{return m(ne().body,e)[0]}}function x(e,t){if(typeof e==="string"){return r(h(t)||document,e)}else{return e}}function ye(e,t,n){if(M(t)){return{target:ne().body,event:Z(e),listener:t}}else{return{target:x(e),event:Z(t),listener:n}}}function be(t,n,r){jn(function(){const e=ye(t,n,r);e.target.addEventListener(e.event,e.listener)});const e=M(n);return e?n:r}function we(t,n,r){jn(function(){const e=ye(t,n,r);e.target.removeEventListener(e.event,e.listener)});return M(n)?n:r}const ve=ne().createElement("output");function Se(e,t){const n=re(e,t);if(n){if(n==="this"){return[Ee(e,t)]}else{const r=m(e,n);if(r.length===0){w('The selector "'+n+'" on '+t+" returned no matches!");return[ve]}else{return r}}}}function Ee(e,t){return ce(T(e,function(e){return te(ce(e),t)!=null}))}function Ce(e){const t=re(e,"hx-target");if(t){if(t==="this"){return Ee(e,"hx-target")}else{return ae(e,t)}}else{const n=ie(e);if(n.boosted){return ne().body}else{return e}}}function Re(t){const n=Q.config.attributesToSettle;for(let e=0;e<n.length;e++){if(t===n[e]){return true}}return false}function Oe(t,n){se(t.attributes,function(e){if(!n.hasAttribute(e.name)&&Re(e.name)){t.removeAttribute(e.name)}});se(n.attributes,function(e){if(Re(e.name)){t.setAttribute(e.name,e.value)}})}function He(t,e){const n=Bn(e);for(let e=0;e<n.length;e++){const r=n[e];try{if(r.isInlineSwap(t)){return true}}catch(e){w(e)}}return t==="outerHTML"}function Te(e,o,i){let t="#"+ee(o,"id");let s="outerHTML";if(e==="true"){}else if(e.indexOf(":")>0){s=e.substr(0,e.indexOf(":"));t=e.substr(e.indexOf(":")+1,e.length)}else{s=e}const n=ne().querySelectorAll(t);if(n){se(n,function(e){let t;const n=o.cloneNode(true);t=ne().createDocumentFragment();t.appendChild(n);if(!He(s,e)){t=h(n)}const r={shouldSwap:true,target:e,fragment:t};if(!he(e,"htmx:oobBeforeSwap",r))return;e=r.target;if(r.shouldSwap){_e(s,e,e,t,i)}se(i.elts,function(e){he(e,"htmx:oobAfterSwap",r)})});o.parentNode.removeChild(o)}else{o.parentNode.removeChild(o);fe(ne().body,"htmx:oobErrorNoTarget",{content:o})}return e}function qe(e){se(p(e,"[hx-preserve], [data-hx-preserve]"),function(e){const t=te(e,"id");const n=ne().getElementById(t);if(n!=null){e.parentNode.replaceChild(n,e)}})}function Le(l,e,u){se(e.querySelectorAll("[id]"),function(t){const n=ee(t,"id");if(n&&n.length>0){const r=n.replace("'","\\'");const o=t.tagName.replace(":","\\:");const e=h(l);const i=e&&e.querySelector(o+"[id='"+r+"']");if(i&&i!==e){const s=t.cloneNode();Oe(t,i);u.tasks.push(function(){Oe(t,s)})}}})}function Ae(e){return function(){o(e,Q.config.addedClass);kt(ce(e));Ne(h(e));he(e,"htmx:load")}}function Ne(e){const t="[autofocus]";const n=G(f(e,t)?e:e.querySelector(t));if(n!=null){n.focus()}}function c(e,t,n,r){Le(e,n,r);while(n.childNodes.length>0){const o=n.firstChild;W(ce(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 Pe(t){let n=0;if(t.attributes){for(let e=0;e<t.attributes.length;e++){const r=t.attributes[e];if(r.value){n=Ie(r.name,n);n=Ie(r.value,n)}}}return n}function ke(t){const n=ie(t);if(n.onHandlers){for(let e=0;e<n.onHandlers.length;e++){const r=n.onHandlers[e];we(t,r.event,r.listener)}delete n.onHandlers}}function De(e){const t=ie(e);if(t.timeout){clearTimeout(t.timeout)}if(t.listenerInfos){se(t.listenerInfos,function(e){if(e.on){we(e.on,e.trigger,e.listener)}})}ke(e);se(Object.keys(t),function(e){delete t[e]})}function a(e){he(e,"htmx:beforeCleanupElement");De(e);if(e.children){se(e.children,function(e){a(e)})}}function Me(t,e,n){let r;const o=t.previousSibling;c(u(t),t,e,n);if(o==null){r=u(t).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.nextElementSibling}else{r=null}}a(t);if(t instanceof Element){t.remove()}else{t.parentNode.removeChild(t)}}function Xe(e,t,n){return c(e,e.firstChild,t,n)}function Fe(e,t,n){return c(u(e),e,t,n)}function Ue(e,t,n){return c(e,null,t,n)}function Be(e,t,n){return c(u(e),e.nextSibling,t,n)}function Ve(e){a(e);return u(e).removeChild(e)}function je(e,t,n){const r=e.firstChild;c(e,r,t,n);if(r){while(r.nextSibling){a(r.nextSibling);e.removeChild(r.nextSibling)}a(r);e.removeChild(r)}}function _e(t,e,n,r,o){switch(t){case"none":return;case"outerHTML":Me(n,r,o);return;case"afterbegin":Xe(n,r,o);return;case"beforebegin":Fe(n,r,o);return;case"beforeend":Ue(n,r,o);return;case"afterend":Be(n,r,o);return;case"delete":Ve(n);return;default:var i=Bn(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(typeof l.length!=="undefined"){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){w(e)}}if(t==="innerHTML"){je(n,r,o)}else{_e(Q.config.defaultSwapStyle,e,n,r,o)}}}function ze(e,n){se(p(e,"[hx-swap-oob], [data-hx-swap-oob]"),function(e){if(Q.config.allowNestedOobSwaps||e.parentElement===null){const t=te(e,"hx-swap-oob");if(t!=null){Te(t,e,n)}}else{e.removeAttribute("hx-swap-oob");e.removeAttribute("data-hx-swap-oob")}})}function $e(e,t,r,o){if(!o){o={}}e=x(e);const n=document.activeElement;let i={};try{i={elt:n,start:n?n.selectionStart:null,end:n?n.selectionEnd:null}}catch(e){}const s=xn(e);if(r.swapStyle==="textContent"){e.textContent=t}else{let n=D(t);s.title=n.title;if(o.selectOOB){const u=o.selectOOB.split(",");for(let t=0;t<u.length;t++){const c=u[t].split(":",2);let e=c[0].trim();if(e.indexOf("#")===0){e=e.substring(1)}const a=c[1]||"true";const f=n.querySelector("#"+e);if(f){Te(a,f,s)}}}ze(n,s);se(p(n,"template"),function(e){ze(e.content,s);if(e.content.childElementCount===0){e.remove()}});if(o.select){const h=ne().createDocumentFragment();se(n.querySelectorAll(o.select),function(e){h.appendChild(e)});n=h}qe(n);_e(r.swapStyle,o.contextElement,e,n,s)}if(i.elt&&!le(i.elt)&&ee(i.elt,"id")){const d=document.getElementById(ee(i.elt,"id"));const g={preventScroll:r.focusScroll!==undefined?!r.focusScroll:!Q.config.defaultFocusScroll};if(d){if(i.start&&d.setSelectionRange){try{d.setSelectionRange(i.start,i.end)}catch(e){}}d.focus(g)}}e.classList.remove(Q.config.swappingClass);se(s.elts,function(e){if(e.classList){e.classList.add(Q.config.settlingClass)}he(e,"htmx:afterSwap",o.eventInfo)});if(o.afterSwapCallback){o.afterSwapCallback()}if(!r.ignoreTitle){kn(s.title)}const l=function(){se(s.tasks,function(e){e.call()});se(s.elts,function(e){if(e.classList){e.classList.remove(Q.config.settlingClass)}he(e,"htmx:afterSettle",o.eventInfo)});if(o.anchor){const e=ce(x("#"+o.anchor));if(e){e.scrollIntoView({block:"start",behavior:"auto"})}}yn(s.elts,r);if(o.afterSettleCallback){o.afterSettleCallback()}};if(r.settleDelay>0){E().setTimeout(l,r.settleDelay)}else{l()}}function Je(e,t,n){const r=e.getResponseHeader(t);if(r.indexOf("{")===0){const o=S(r);for(const i in o){if(o.hasOwnProperty(i)){let e=o[i];if(!X(e)){e={value:e}}he(n,i,e)}}}else{const s=r.split(",");for(let e=0;e<s.length;e++){he(n,s[e].trim(),[])}}}const Ke=/\s/;const y=/[\s,]/;const Ge=/[_$a-zA-Z]/;const Ze=/[_$a-zA-Z0-9]/;const We=['"',"'","/"];const Ye=/[^\s]/;const Qe=/[{(]/;const et=/[})]/;function tt(e){const t=[];let n=0;while(n<e.length){if(Ge.exec(e.charAt(n))){var r=n;while(Ze.exec(e.charAt(n+1))){n++}t.push(e.substr(r,n-r+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.substr(r,n-r+1))}else{const i=e.charAt(n);t.push(i)}n++}return t}function nt(e,t,n){return Ge.exec(e.charAt(0))&&e!=="true"&&e!=="false"&&e!=="this"&&e!==n&&t!=="."}function rt(r,o,i){if(o[0]==="["){o.shift();let e=1;let t=" return (function("+i+"){ return (";let n=null;while(o.length>0){const s=o[0];if(s==="]"){e--;if(e===0){if(n===null){t=t+"true"}o.shift();t+=")})";try{const l=wn(r,function(){return Function(t)()},function(){return true});l.source=t;return l}catch(e){fe(ne().body,"htmx:syntax:error",{error:e,source:t});return null}}}else if(s==="["){e++}if(nt(s,n,i)){t+="(("+i+"."+s+") ? ("+i+"."+s+") : (window."+s+"))"}else{t=t+s}n=o.shift()}}}function b(e,t){let n="";while(e.length>0&&!t.test(e[0])){n+=e.shift()}return n}function ot(e){let t;if(e.length>0&&Qe.test(e[0])){e.shift();t=b(e,et).trim();e.shift()}else{t=b(e,y)}return t}const it="input, textarea, select";function st(e,t,n){const r=[];const o=tt(t);do{b(o,Ye);const l=o.length;const u=b(o,/[,\[\s]/);if(u!==""){if(u==="every"){const c={trigger:"every"};b(o,Ye);c.pollInterval=d(b(o,/[,\[\s]/));b(o,Ye);var i=rt(e,o,"event");if(i){c.eventFilter=i}r.push(c)}else{const a={trigger:u};var i=rt(e,o,"event");if(i){a.eventFilter=i}while(o.length>0&&o[0]!==","){b(o,Ye);const f=o.shift();if(f==="changed"){a.changed=true}else if(f==="once"){a.once=true}else if(f==="consume"){a.consume=true}else if(f==="delay"&&o[0]===":"){o.shift();a.delay=d(b(o,y))}else if(f==="from"&&o[0]===":"){o.shift();if(Qe.test(o[0])){var s=ot(o)}else{var s=b(o,y);if(s==="closest"||s==="find"||s==="next"||s==="previous"){o.shift();const h=ot(o);if(h.length>0){s+=" "+h}}}a.from=s}else if(f==="target"&&o[0]===":"){o.shift();a.target=ot(o)}else if(f==="throttle"&&o[0]===":"){o.shift();a.throttle=d(b(o,y))}else if(f==="queue"&&o[0]===":"){o.shift();a.queue=b(o,y)}else if(f==="root"&&o[0]===":"){o.shift();a[f]=ot(o)}else if(f==="threshold"&&o[0]===":"){o.shift();a[f]=b(o,y)}else{fe(e,"htmx:syntax:error",{token:o.shift()})}}r.push(a)}}if(o.length===l){fe(e,"htmx:syntax:error",{token:o.shift()})}b(o,Ye)}while(o[0]===","&&o.shift());if(n){n[t]=r}return r}function lt(e){const t=te(e,"hx-trigger");let n=[];if(t){const r=Q.config.triggerSpecsCache;n=r&&r[t]||st(e,t,r)}if(n.length>0){return n}else if(f(e,"form")){return[{trigger:"submit"}]}else if(f(e,'input[type="button"], input[type="submit"]')){return[{trigger:"click"}]}else if(f(e,it)){return[{trigger:"change"}]}else{return[{trigger:"click"}]}}function ut(e){ie(e).cancelled=true}function ct(e,t,n){const r=ie(e);r.timeout=E().setTimeout(function(){if(le(e)&&r.cancelled!==true){if(!gt(n,e,Mt("hx:poll:trigger",{triggerSpec:n,target:e}))){t(e)}ct(e,t,n)}},n.pollInterval)}function at(e){return location.hostname===e.hostname&&ee(e,"href")&&ee(e,"href").indexOf("#")!==0}function ft(t,n,e){if(t instanceof HTMLAnchorElement&&at(t)&&(t.target===""||t.target==="_self")||t.tagName==="FORM"){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";if(r==="get"){}o=ee(t,"action")}e.forEach(function(e){pt(t,function(e,t){const n=ce(e);if(g(n,Q.config.disableSelector)){a(n);return}de(r,o,n,t)},n,e,true)})}}function ht(e,t){const n=ce(t);if(!n){return false}if(e.type==="submit"||e.type==="click"){if(n.tagName==="FORM"){return true}if(f(n,'input[type="submit"], button')&&g(n,"form")!==null){return true}if(n instanceof HTMLAnchorElement&&n.href&&(n.getAttribute("href")==="#"||n.getAttribute("href").indexOf("#")!==0)){return true}}return false}function dt(e,t){return ie(e).boosted&&e instanceof HTMLAnchorElement&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function gt(e,t,n){const r=e.eventFilter;if(r){try{return r.call(t,n)!==true}catch(e){const o=r.source;fe(ne().body,"htmx:eventFilter:error",{error:e,source:o});return true}}return false}function pt(s,l,e,u,c){const a=ie(s);let t;if(u.from){t=m(s,u.from)}else{t=[s]}if(u.changed){t.forEach(function(e){const t=ie(e);t.lastValue=e.value})}se(t,function(o){const i=function(e){if(!le(s)){o.removeEventListener(u.trigger,i);return}if(dt(s,e)){return}if(c||ht(e,s)){e.preventDefault()}if(gt(u,s,e)){return}const t=ie(e);t.triggerSpec=u;if(t.handledFor==null){t.handledFor=[]}if(t.handledFor.indexOf(s)<0){t.handledFor.push(s);if(u.consume){e.stopPropagation()}if(u.target&&e.target){if(!f(ce(e.target),u.target)){return}}if(u.once){if(a.triggeredOnce){return}else{a.triggeredOnce=true}}if(u.changed){const n=ie(o);const r=o.value;if(n.lastValue===r){return}n.lastValue=r}if(a.delayed){clearTimeout(a.delayed)}if(a.throttle){return}if(u.throttle>0){if(!a.throttle){l(s,e);a.throttle=E().setTimeout(function(){a.throttle=null},u.throttle)}}else if(u.delay>0){a.delayed=E().setTimeout(function(){l(s,e)},u.delay)}else{he(s,"htmx:trigger");l(s,e)}}};if(e.listenerInfos==null){e.listenerInfos=[]}e.listenerInfos.push({trigger:u.trigger,listener:i,on:o});o.addEventListener(u.trigger,i)})}let mt=false;let xt=null;function yt(){if(!xt){xt=function(){mt=true};window.addEventListener("scroll",xt);setInterval(function(){if(mt){mt=false;se(ne().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(e){bt(e)})}},200)}}function bt(e){if(!s(e,"data-hx-revealed")&&U(e)){e.setAttribute("data-hx-revealed","true");const t=ie(e);if(t.initHash){he(e,"revealed")}else{e.addEventListener("htmx:afterProcessNode",function(){he(e,"revealed")},{once:true})}}}function wt(e,t,n,r){const o=function(){if(!n.loaded){n.loaded=true;t(e)}};if(r>0){E().setTimeout(o,r)}else{o()}}function vt(t,n,e){let i=false;se(v,function(r){if(s(t,"hx-"+r)){const o=te(t,"hx-"+r);i=true;n.path=o;n.verb=r;e.forEach(function(e){St(t,e,n,function(e,t){const n=ce(e);if(g(n,Q.config.disableSelector)){a(n);return}de(r,o,n,t)})})}});return i}function St(r,e,t,n){if(e.trigger==="revealed"){yt();pt(r,n,t,e);bt(ce(r))}else if(e.trigger==="intersect"){const o={};if(e.root){o.root=ae(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){he(r,"intersect");break}}},o);i.observe(ce(r));pt(ce(r),n,t,e)}else if(e.trigger==="load"){if(!gt(e,r,Mt("load",{elt:r}))){wt(ce(r),n,t,e.delay)}}else if(e.pollInterval>0){t.polling=true;ct(ce(r),n,e)}else{pt(r,n,t,e)}}function Et(e){const t=ce(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 Rt(e,t){if(Et(e)){t.push(ce(e))}const n=Ct.evaluate(e);let r=null;while(r=n.iterateNext())t.push(ce(r))}function Ot(e){const t=[];if(e instanceof DocumentFragment){for(const n of e.childNodes){Rt(n,t)}}else{Rt(e,t)}return t}function Ht(e){if(e.querySelectorAll){const t=", [hx-boost] a, [data-hx-boost] a, a[hx-boost], a[data-hx-boost]";const n=e.querySelectorAll(R+t+", form, [type='submit'],"+" [hx-ext], [data-hx-ext], [hx-trigger], [data-hx-trigger]");return n}else{return[]}}function Tt(e){const t=g(ce(e.target),"button, input[type='submit']");const n=Lt(e);if(n){n.lastButtonClicked=t}}function qt(e){const t=Lt(e);if(t){t.lastButtonClicked=null}}function Lt(e){const t=g(ce(e.target),"button, input[type='submit']");if(!t){return}const n=x("#"+ee(t,"form"),t.getRootNode())||g(t,"form");if(!n){return}return ie(n)}function At(e){e.addEventListener("click",Tt);e.addEventListener("focusin",Tt);e.addEventListener("focusout",qt)}function Nt(t,e,n){const r=ie(t);if(!Array.isArray(r.onHandlers)){r.onHandlers=[]}let o;const i=function(e){wn(t,function(){if(!o){o=new Function("event",n)}o.call(t,e)})};t.addEventListener(e,i);r.onHandlers.push({event:e,listener:i})}function It(t){ke(t);for(let e=0;e<t.attributes.length;e++){const n=t.attributes[e].name;const r=t.attributes[e].value;if(l(n,"hx-on")||l(n,"data-hx-on")){const o=n.indexOf("-on")+3;const i=n.slice(o,o+1);if(i==="-"||i===":"){let e=n.slice(o+1);if(l(e,":")){e="htmx"+e}else if(l(e,"-")){e="htmx:"+e.slice(1)}else if(l(e,"htmx-")){e="htmx:"+e.slice(5)}Nt(t,e,r)}}}}function Pt(t){if(g(t,Q.config.disableSelector)){a(t);return}const n=ie(t);if(n.initHash!==Pe(t)){De(t);n.initHash=Pe(t);he(t,"htmx:beforeProcessNode");if(t.value){n.lastValue=t.value}const e=lt(t);const r=vt(t,n,e);if(!r){if(re(t,"hx-boost")==="true"){ft(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")){At(t)}he(t,"htmx:afterProcessNode")}}function kt(e){e=x(e);if(g(e,Q.config.disableSelector)){a(e);return}Pt(e);se(Ht(e),function(e){Pt(e)});se(Ot(e),It)}function Dt(e){return e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}function Mt(e,t){let n;if(window.CustomEvent&&typeof window.CustomEvent==="function"){n=new CustomEvent(e,{bubbles:true,cancelable:true,composed:true,detail:t})}else{n=ne().createEvent("CustomEvent");n.initCustomEvent(e,true,true,t)}return n}function fe(e,t,n){he(e,t,ue({error:t},n))}function Xt(e){return e==="htmx:afterProcessNode"}function Ft(e,t){se(Bn(e),function(e){try{t(e)}catch(e){w(e)}})}function w(e){if(console.error){console.error(e)}else if(console.log){console.log("ERROR: ",e)}}function he(e,t,n){e=x(e);if(n==null){n={}}n.elt=e;const r=Mt(t,n);if(Q.logger&&!Xt(t)){Q.logger(e,t,n)}if(n.error){w(n.error);he(e,"htmx:error",{errorInfo:n})}let o=e.dispatchEvent(r);const i=Dt(t);if(o&&i!==t){const s=Mt(i,r.detail);o=o&&e.dispatchEvent(s)}Ft(ce(e),function(e){o=o&&(e.onEvent(t,r)!==false&&!r.defaultPrevented)});return o}let Ut=location.pathname+location.search;function Bt(){const e=ne().querySelector("[hx-history-elt],[data-hx-history-elt]");return e||ne().body}function Vt(t,e){if(!V()){return}const n=_t(e);const r=ne().title;const o=window.scrollY;if(Q.config.historyCacheSize<=0){localStorage.removeItem("htmx-history-cache");return}t=j(t);const i=S(localStorage.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};he(ne().body,"htmx:historyItemCreated",{item:s,cache:i});i.push(s);while(i.length>Q.config.historyCacheSize){i.shift()}while(i.length>0){try{localStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(e){fe(ne().body,"htmx:historyCacheError",{cause:e,cache:i});i.shift()}}}function jt(t){if(!V()){return null}t=j(t);const n=S(localStorage.getItem("htmx-history-cache"))||[];for(let e=0;e<n.length;e++){if(n[e].url===t){return n[e]}}return null}function _t(e){const t=Q.config.requestClass;const n=e.cloneNode(true);se(p(n,"."+t),function(e){o(e,t)});return n.innerHTML}function zt(){const e=Bt();const t=Ut||location.pathname+location.search;let n;try{n=ne().querySelector('[hx-history="false" i],[data-hx-history="false" i]')}catch(e){n=ne().querySelector('[hx-history="false"],[data-hx-history="false"]')}if(!n){he(ne().body,"htmx:beforeHistorySave",{path:t,historyElt:e});Vt(t,e)}if(Q.config.historyEnabled)history.replaceState({htmx:true},ne().title,window.location.href)}function $t(e){if(Q.config.getCacheBusterParam){e=e.replace(/org\.htmx\.cache-buster=[^&]*&?/,"");if(pe(e,"&")||pe(e,"?")){e=e.slice(0,-1)}}if(Q.config.historyEnabled){history.pushState({htmx:true},"",e)}Ut=e}function Jt(e){if(Q.config.historyEnabled)history.replaceState({htmx:true},"",e);Ut=e}function Kt(e){se(e,function(e){e.call(undefined)})}function Gt(o){const e=new XMLHttpRequest;const i={path:o,xhr:e};he(ne().body,"htmx:historyCacheMiss",i);e.open("GET",o,true);e.setRequestHeader("HX-Request","true");e.setRequestHeader("HX-History-Restore-Request","true");e.setRequestHeader("HX-Current-URL",ne().location.href);e.onload=function(){if(this.status>=200&&this.status<400){he(ne().body,"htmx:historyCacheMissLoad",i);const e=D(this.response);const t=e.querySelector("[hx-history-elt],[data-hx-history-elt]")||e;const n=Bt();const r=xn(n);kn(e.title);je(n,t,r);Kt(r.tasks);Ut=o;he(ne().body,"htmx:historyRestore",{path:o,cacheMiss:true,serverResponse:this.response})}else{fe(ne().body,"htmx:historyCacheMissLoadError",i)}};e.send()}function Zt(e){zt();e=e||location.pathname+location.search;const t=jt(e);if(t){const n=D(t.content);const r=Bt();const o=xn(r);kn(n.title);je(r,n,o);Kt(o.tasks);E().setTimeout(function(){window.scrollTo(0,t.scroll)},0);Ut=e;he(ne().body,"htmx:historyRestore",{path:e,item:t})}else{if(Q.config.refreshOnHistoryMiss){window.location.reload(true)}else{Gt(e)}}}function Wt(e){let t=Se(e,"hx-indicator");if(t==null){t=[e]}se(t,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)+1;e.classList.add.call(e.classList,Q.config.requestClass)});return t}function Yt(e){let t=Se(e,"hx-disabled-elt");if(t==null){t=[]}se(t,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)+1;e.setAttribute("disabled","")});return t}function Qt(e,t){se(e,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.classList.remove.call(e.classList,Q.config.requestClass)}});se(t,function(e){const t=ie(e);t.requestCount=(t.requestCount||0)-1;if(t.requestCount===0){e.removeAttribute("disabled")}})}function en(t,n){for(let e=0;e<t.length;e++){const r=t[e];if(r.isSameNode(n)){return true}}return false}function tn(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 nn(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 rn(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);se(e,e=>r.append(t,e))}}function on(t,n,r,o,i){if(o==null||en(t,o)){return}else{t.push(o)}if(tn(o)){const s=ee(o,"name");let e=o.value;if(o instanceof HTMLSelectElement&&o.multiple){e=F(o.querySelectorAll("option:checked")).map(function(e){return e.value})}if(o instanceof HTMLInputElement&&o.files){e=F(o.files)}nn(s,e,n);if(i){sn(o,r)}}if(o instanceof HTMLFormElement){se(o.elements,function(e){if(t.indexOf(e)>=0){rn(e.name,e.value,n)}else{t.push(e)}if(i){sn(e,r)}});new FormData(o).forEach(function(e,t){nn(t,e,n)})}}function sn(e,t){const n=e;if(n.willValidate){he(n,"htmx:validation:validate");if(!n.checkValidity()){t.push({elt:n,message:n.validationMessage,validity:n.validity});he(n,"htmx:validation:failed",{message:n.validationMessage,validity:n.validity})}}}function ln(t,e){for(const n of e.keys()){t.delete(n);e.getAll(n).forEach(function(e){t.append(n,e)})}return t}function un(e,t){const n=[];const r=new FormData;const o=new FormData;const i=[];const s=ie(e);if(s.lastButtonClicked&&!le(s.lastButtonClicked)){s.lastButtonClicked=null}let l=e instanceof HTMLFormElement&&e.noValidate!==true||te(e,"hx-validate")==="true";if(s.lastButtonClicked){l=l&&s.lastButtonClicked.formNoValidate!==true}if(t!=="get"){on(n,o,i,g(e,"form"),l)}on(n,r,i,e,l);if(s.lastButtonClicked||e.tagName==="BUTTON"||e.tagName==="INPUT"&&ee(e,"type")==="submit"){const c=s.lastButtonClicked||e;const a=ee(c,"name");nn(a,c.value,o)}const u=Se(e,"hx-include");se(u,function(e){on(n,r,i,ce(e),l);if(!f(e,"form")){se(h(e).querySelectorAll(it),function(e){on(n,r,i,e,l)})}});ln(r,o);return{errors:i,formData:r,values:An(r)}}function cn(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 an(e){e=qn(e);let n="";e.forEach(function(e,t){n=cn(n,t,e)});return n}function fn(e,t,n){const r={"HX-Request":"true","HX-Trigger":ee(e,"id"),"HX-Trigger-Name":ee(e,"name"),"HX-Target":te(t,"id"),"HX-Current-URL":ne().location.href};bn(e,"hx-headers",false,r);if(n!==undefined){r["HX-Prompt"]=n}if(ie(e).boosted){r["HX-Boosted"]="true"}return r}function hn(n,e){const t=re(e,"hx-params");if(t){if(t==="none"){return new FormData}else if(t==="*"){return n}else if(t.indexOf("not ")===0){se(t.substr(4).split(","),function(e){e=e.trim();n.delete(e)});return n}else{const r=new FormData;se(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 dn(e){return!!ee(e,"href")&&ee(e,"href").indexOf("#")>=0}function gn(e,t){const n=t||re(e,"hx-swap");const r={swapStyle:ie(e).boosted?"innerHTML":Q.config.defaultSwapStyle,swapDelay:Q.config.defaultSwapDelay,settleDelay:Q.config.defaultSettleDelay};if(Q.config.scrollIntoViewOnBoost&&ie(e).boosted&&!dn(e)){r.show="top"}if(n){const s=B(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.substr(5))}else if(l.indexOf("settle:")===0){r.settleDelay=d(l.substr(7))}else if(l.indexOf("transition:")===0){r.transition=l.substr(11)==="true"}else if(l.indexOf("ignoreTitle:")===0){r.ignoreTitle=l.substr(12)==="true"}else if(l.indexOf("scroll:")===0){const u=l.substr(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 a=l.substr(5);var o=a.split(":");const f=o.pop();var i=o.length>0?o.join(":"):null;r.show=f;r.showTarget=i}else if(l.indexOf("focus-scroll:")===0){const h=l.substr("focus-scroll:".length);r.focusScroll=h=="true"}else if(e==0){r.swapStyle=l}else{w("Unknown modifier in hx-swap: "+l)}}}}return r}function pn(e){return re(e,"hx-encoding")==="multipart/form-data"||f(e,"form")&&ee(e,"enctype")==="multipart/form-data"}function mn(t,n,r){let o=null;Ft(n,function(e){if(o==null){o=e.encodeParameters(t,r,n)}});if(o!=null){return o}else{if(pn(n)){return ln(new FormData,qn(r))}else{return an(r)}}}function xn(e){return{tasks:[],elts:[e]}}function yn(e,t){const n=e[0];const r=e[e.length-1];if(t.scroll){var o=null;if(t.scrollTarget){o=ce(ae(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(t.show){var o=null;if(t.showTarget){let e=t.showTarget;if(t.showTarget==="window"){e="body"}o=ce(ae(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 bn(r,e,o,i){if(i==null){i={}}if(r==null){return i}const s=te(r,e);if(s){let e=s.trim();let t=o;if(e==="unset"){return null}if(e.indexOf("javascript:")===0){e=e.substr(11);t=true}else if(e.indexOf("js:")===0){e=e.substr(3);t=true}if(e.indexOf("{")!==0){e="{"+e+"}"}let n;if(t){n=wn(r,function(){return Function("return ("+e+")")()},{})}else{n=S(e)}for(const l in n){if(n.hasOwnProperty(l)){if(i[l]==null){i[l]=n[l]}}}}return bn(ce(u(r)),e,o,i)}function wn(e,t,n){if(Q.config.allowEval){return t()}else{fe(e,"htmx:evalDisallowedError");return n}}function vn(e,t){return bn(e,"hx-vars",true,t)}function Sn(e,t){return bn(e,"hx-vals",false,t)}function En(e){return ue(vn(e),Sn(e))}function Cn(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 Rn(t){if(t.responseURL&&typeof URL!=="undefined"){try{const e=new URL(t.responseURL);return e.pathname+e.search}catch(e){fe(ne().body,"htmx:badResponseUrl",{url:t.responseURL})}}}function C(e,t){return t.test(e.getAllResponseHeaders())}function On(e,t,n){e=e.toLowerCase();if(n){if(n instanceof Element||typeof n==="string"){return de(e,t,null,null,{targetOverride:x(n),returnPromise:true})}else{return de(e,t,x(n.source),n.event,{handler:n.handler,headers:n.headers,values:n.values,targetOverride:x(n.target),swapOverride:n.swap,select:n.select,returnPromise:true})}}else{return de(e,t,null,null,{returnPromise:true})}}function Hn(e){const t=[];while(e){t.push(e);e=e.parentElement}return t}function Tn(e,t,n){let r;let o;if(typeof URL==="function"){o=new URL(t,document.location.href);const i=document.location.origin;r=i===o.origin}else{o=t;r=l(t,document.location.origin)}if(Q.config.selfRequestsOnly){if(!r){return false}}return he(e,"htmx:validateUrl",ue({url:o,sameHost:r},n))}function qn(e){if(e instanceof FormData)return e;const t=new FormData;for(const n in e){if(e.hasOwnProperty(n)){if(typeof e[n].forEach==="function"){e[n].forEach(function(e){t.append(n,e)})}else if(typeof e[n]==="object"){t.append(n,JSON.stringify(e[n]))}else{t.append(n,e[n])}}}return t}function Ln(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 An(r){return new Proxy(r,{get:function(e,t){if(typeof t==="symbol"){return Reflect.get(e,t)}if(t==="toJSON"){return()=>Object.fromEntries(r)}if(t in e){if(typeof e[t]==="function"){return function(){return r[t].apply(r,arguments)}}else{return e[t]}}const n=r.getAll(t);if(n.length===0){return undefined}else if(n.length===1){return n[0]}else{return Ln(e,t,n)}},set:function(t,n,e){if(typeof n!=="string"){return false}t.delete(n);if(typeof e.forEach==="function"){e.forEach(function(e){t.append(n,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 de(t,n,r,o,i,D){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=ne().body}const M=i.handler||Dn;const X=i.select||null;if(!le(r)){oe(s);return e}const u=i.targetOverride||ce(Ce(r));if(u==null||u==ve){fe(r,"htmx:targetError",{target:te(r,"hx-target")});oe(l);return e}let c=ie(r);const a=c.lastButtonClicked;if(a){const L=ee(a,"formaction");if(L!=null){n=L}const A=ee(a,"formmethod");if(A!=null){if(A.toLowerCase()!=="dialog"){t=A}}}const f=re(r,"hx-confirm");if(D===undefined){const K=function(e){return de(t,n,r,o,i,!!e)};const G={target:u,elt:r,path:n,verb:t,triggeringEvent:o,etc:i,issueRequest:K,question:f};if(he(r,"htmx:confirm",G)===false){oe(s);return e}}let h=r;let d=re(r,"hx-sync");let g=null;let F=false;if(d){const N=d.split(":");const I=N[0].trim();if(I==="this"){h=Ee(r,"hx-sync")}else{h=ce(ae(r,I))}d=(N[1]||"drop").trim();c=ie(h);if(d==="drop"&&c.xhr&&c.abortable!==true){oe(s);return e}else if(d==="abort"){if(c.xhr){oe(s);return e}else{F=true}}else if(d==="replace"){he(h,"htmx:abort")}else if(d.indexOf("queue")===0){const Z=d.split(" ");g=(Z[1]||"last").trim()}}if(c.xhr){if(c.abortable){he(h,"htmx:abort")}else{if(g==null){if(o){const P=ie(o);if(P&&P.triggerSpec&&P.triggerSpec.queue){g=P.triggerSpec.queue}}if(g==null){g="last"}}if(c.queuedRequests==null){c.queuedRequests=[]}if(g==="first"&&c.queuedRequests.length===0){c.queuedRequests.push(function(){de(t,n,r,o,i)})}else if(g==="all"){c.queuedRequests.push(function(){de(t,n,r,o,i)})}else if(g==="last"){c.queuedRequests=[];c.queuedRequests.push(function(){de(t,n,r,o,i)})}oe(s);return e}}const p=new XMLHttpRequest;c.xhr=p;c.abortable=F;const m=function(){c.xhr=null;c.abortable=false;if(c.queuedRequests!=null&&c.queuedRequests.length>0){const e=c.queuedRequests.shift();e()}};const U=re(r,"hx-prompt");if(U){var x=prompt(U);if(x===null||!he(r,"htmx:prompt",{prompt:x,target:u})){oe(s);m();return e}}if(f&&!D){if(!confirm(f)){oe(s);m();return e}}let y=fn(r,u,x);if(t!=="get"&&!pn(r)){y["Content-Type"]="application/x-www-form-urlencoded"}if(i.headers){y=ue(y,i.headers)}const B=un(r,t);let b=B.errors;const V=B.formData;if(i.values){ln(V,qn(i.values))}const j=qn(En(r));const w=ln(V,j);let v=hn(w,r);if(Q.config.getCacheBusterParam&&t==="get"){v.set("org.htmx.cache-buster",ee(u,"id")||"true")}if(n==null||n===""){n=ne().location.href}const S=bn(r,"hx-request");const _=ie(r).boosted;let E=Q.config.methodsThatUseUrlParams.indexOf(t)>=0;const C={boosted:_,useUrlParams:E,formData:v,parameters:An(v),unfilteredFormData:w,unfilteredParameters:An(w),headers:y,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(!he(r,"htmx:configRequest",C)){oe(s);m();return e}n=C.path;t=C.verb;y=C.headers;v=qn(C.parameters);b=C.errors;E=C.useUrlParams;if(b&&b.length>0){he(r,"htmx:validation:halted",C);oe(s);m();return e}const z=n.split("#");const $=z[0];const R=z[1];let O=n;if(E){O=$;const W=!v.keys().next().done;if(W){if(O.indexOf("?")<0){O+="?"}else{O+="&"}O+=an(v);if(R){O+="#"+R}}}if(!Tn(r,O,C)){fe(r,"htmx:invalidPath",C);oe(l);return e}p.open(t.toUpperCase(),O,true);p.overrideMimeType("text/html");p.withCredentials=C.withCredentials;p.timeout=C.timeout;if(S.noHeaders){}else{for(const k in y){if(y.hasOwnProperty(k)){const Y=y[k];Cn(p,k,Y)}}}const H={xhr:p,target:u,requestConfig:C,etc:i,boosted:_,select:X,pathInfo:{requestPath:n,finalRequestPath:O,responsePath:null,anchor:R}};p.onload=function(){try{const t=Hn(r);H.pathInfo.responsePath=Rn(p);M(r,H);Qt(T,q);he(r,"htmx:afterRequest",H);he(r,"htmx:afterOnLoad",H);if(!le(r)){let e=null;while(t.length>0&&e==null){const n=t.shift();if(le(n)){e=n}}if(e){he(e,"htmx:afterRequest",H);he(e,"htmx:afterOnLoad",H)}}oe(s);m()}catch(e){fe(r,"htmx:onLoadError",ue({error:e},H));throw e}};p.onerror=function(){Qt(T,q);fe(r,"htmx:afterRequest",H);fe(r,"htmx:sendError",H);oe(l);m()};p.onabort=function(){Qt(T,q);fe(r,"htmx:afterRequest",H);fe(r,"htmx:sendAbort",H);oe(l);m()};p.ontimeout=function(){Qt(T,q);fe(r,"htmx:afterRequest",H);fe(r,"htmx:timeout",H);oe(l);m()};if(!he(r,"htmx:beforeRequest",H)){oe(s);m();return e}var T=Wt(r);var q=Yt(r);se(["loadstart","loadend","progress","abort"],function(t){se([p,p.upload],function(e){e.addEventListener(t,function(e){he(r,"htmx:xhr:"+t,{lengthComputable:e.lengthComputable,loaded:e.loaded,total:e.total})})})});he(r,"htmx:beforeSend",H);const J=E?null:mn(p,r,v);p.send(J);return e}function Nn(e,t){const n=t.xhr;let r=null;let o=null;if(C(n,/HX-Push:/i)){r=n.getResponseHeader("HX-Push");o="push"}else if(C(n,/HX-Push-Url:/i)){r=n.getResponseHeader("HX-Push-Url");o="push"}else if(C(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;const l=re(e,"hx-push-url");const u=re(e,"hx-replace-url");const c=ie(e).boosted;let a=null;let f=null;if(l){a="push";f=l}else if(u){a="replace";f=u}else if(c){a="push";f=s||i}if(f){if(f==="false"){return{}}if(f==="true"){f=s||i}if(t.pathInfo.anchor&&f.indexOf("#")===-1){f=f+"#"+t.pathInfo.anchor}return{type:a,path:f}}else{return{}}}function In(e,t){var n=new RegExp(e.code);return n.test(t.toString(10))}function Pn(e){for(var t=0;t<Q.config.responseHandling.length;t++){var n=Q.config.responseHandling[t];if(In(n,e.status)){return n}}return{swap:false}}function kn(e){if(e){const t=r("title");if(t){t.innerHTML=e}else{window.document.title=e}}}function Dn(o,i){const s=i.xhr;let l=i.target;const e=i.etc;const u=i.select;if(!he(o,"htmx:beforeOnLoad",i))return;if(C(s,/HX-Trigger:/i)){Je(s,"HX-Trigger",o)}if(C(s,/HX-Location:/i)){zt();let e=s.getResponseHeader("HX-Location");var t;if(e.indexOf("{")===0){t=S(e);e=t.path;delete t.path}On("get",e,t).then(function(){$t(e)});return}const n=C(s,/HX-Refresh:/i)&&s.getResponseHeader("HX-Refresh")==="true";if(C(s,/HX-Redirect:/i)){location.href=s.getResponseHeader("HX-Redirect");n&&location.reload();return}if(n){location.reload();return}if(C(s,/HX-Retarget:/i)){if(s.getResponseHeader("HX-Retarget")==="this"){i.target=o}else{i.target=ce(ae(o,s.getResponseHeader("HX-Retarget")))}}const c=Nn(o,i);const r=Pn(s);const a=r.swap;let f=!!r.error;let h=Q.config.ignoreTitle||r.ignoreTitle;let d=r.select;if(r.target){i.target=ce(ae(o,r.target))}var g=e.swapOverride;if(g==null&&r.swapOverride){g=r.swapOverride}if(C(s,/HX-Retarget:/i)){if(s.getResponseHeader("HX-Retarget")==="this"){i.target=o}else{i.target=ce(ae(o,s.getResponseHeader("HX-Retarget")))}}if(C(s,/HX-Reswap:/i)){g=s.getResponseHeader("HX-Reswap")}var p=s.response;var m=ue({shouldSwap:a,serverResponse:p,isError:f,ignoreTitle:h,selectOverride:d},i);if(r.event&&!he(l,r.event,m))return;if(!he(l,"htmx:beforeSwap",m))return;l=m.target;p=m.serverResponse;f=m.isError;h=m.ignoreTitle;d=m.selectOverride;i.target=l;i.failed=f;i.successful=!f;if(m.shouldSwap){if(s.status===286){ut(o)}Ft(o,function(e){p=e.transformResponse(p,s,o)});if(c.type){zt()}if(C(s,/HX-Reswap:/i)){g=s.getResponseHeader("HX-Reswap")}var x=gn(o,g);if(!x.hasOwnProperty("ignoreTitle")){x.ignoreTitle=h}l.classList.add(Q.config.swappingClass);let n=null;let r=null;if(u){d=u}if(C(s,/HX-Reselect:/i)){d=s.getResponseHeader("HX-Reselect")}const y=re(o,"hx-select-oob");const b=re(o,"hx-select");let e=function(){try{if(c.type){he(ne().body,"htmx:beforeHistoryUpdate",ue({history:c},i));if(c.type==="push"){$t(c.path);he(ne().body,"htmx:pushedIntoHistory",{path:c.path})}else{Jt(c.path);he(ne().body,"htmx:replacedInHistory",{path:c.path})}}$e(l,p,x,{select:d||b,selectOOB:y,eventInfo:i,anchor:i.pathInfo.anchor,contextElement:o,afterSwapCallback:function(){if(C(s,/HX-Trigger-After-Swap:/i)){let e=o;if(!le(o)){e=ne().body}Je(s,"HX-Trigger-After-Swap",e)}},afterSettleCallback:function(){if(C(s,/HX-Trigger-After-Settle:/i)){let e=o;if(!le(o)){e=ne().body}Je(s,"HX-Trigger-After-Settle",e)}oe(n)}})}catch(e){fe(o,"htmx:swapError",i);oe(r);throw e}};let t=Q.config.globalViewTransitions;if(x.hasOwnProperty("transition")){t=x.transition}if(t&&he(o,"htmx:beforeTransition",i)&&typeof Promise!=="undefined"&&document.startViewTransition){const w=new Promise(function(e,t){n=e;r=t});const v=e;e=function(){document.startViewTransition(function(){v();return w})}}if(x.swapDelay>0){E().setTimeout(e,x.swapDelay)}else{e()}}if(f){fe(o,"htmx:responseError",ue({error:"Response Status Error Code "+s.status+" from "+i.pathInfo.requestPath},i))}}const Mn={};function Xn(){return{init:function(e){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 Fn(e,t){if(t.init){t.init(n)}Mn[e]=ue(Xn(),t)}function Un(e){delete Mn[e]}function Bn(e,n,r){if(n==undefined){n=[]}if(e==undefined){return n}if(r==undefined){r=[]}const t=te(e,"hx-ext");if(t){se(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=Mn[e];if(t&&n.indexOf(t)<0){n.push(t)}}})}return Bn(ce(u(e)),n,r)}var Vn=false;ne().addEventListener("DOMContentLoaded",function(){Vn=true});function jn(e){if(Vn||ne().readyState==="complete"){e()}else{ne().addEventListener("DOMContentLoaded",e)}}function _n(){if(Q.config.includeIndicatorStyles!==false){ne().head.insertAdjacentHTML("beforeend","<style> ."+Q.config.indicatorClass+"{opacity:0} ."+Q.config.requestClass+" ."+Q.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;} ."+Q.config.requestClass+"."+Q.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;} </style>")}}function zn(){const e=ne().querySelector('meta[name="htmx-config"]');if(e){return S(e.content)}else{return null}}function $n(){const e=zn();if(e){Q.config=ue(Q.config,e)}}jn(function(){$n();_n();let e=ne().body;kt(e);const t=ne().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(e){const t=e.target;const n=ie(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){Zt();se(t,function(e){he(e,"htmx:restored",{document:ne(),triggerEvent:he})})}else{if(n){n(e)}}};E().setTimeout(function(){he(e,"htmx:load",{});e=null},0)});return Q}();
|
package/dist/htmx.min.js.gz
CHANGED
|
Binary file
|