var _r=function(){"use strict";let htmx={onLoad:null,process:null,on:null,off:null,trigger:null,ajax:null,find:null,findAll:null,closest:null,values:function(e,t){return getInputValues(e,t||"post").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:!0,historyCacheSize:10,refreshOnHistoryMiss:!1,defaultSwapStyle:"innerHTML",defaultSwapDelay:0,defaultSettleDelay:20,includeIndicatorStyles:!0,indicatorClass:"htmx-indicator",requestClass:"htmx-request",addedClass:"htmx-added",settlingClass:"htmx-settling",swappingClass:"htmx-swapping",allowEval:!0,allowScriptTags:!0,inlineScriptNonce:"",inlineStyleNonce:"",attributesToSettle:["class","style","width","height"],withCredentials:!1,timeout:0,wsReconnectDelay:"full-jitter",wsBinaryType:"blob",disableSelector:"[hx-disable], [data-hx-disable]",scrollBehavior:"instant",defaultFocusScroll:!1,getCacheBusterParam:!1,globalViewTransitions:!1,methodsThatUseUrlParams:["get","delete"],selfRequestsOnly:!0,ignoreTitle:!1,scrollIntoViewOnBoost:!0,triggerSpecsCache:null,disableInheritance:!1,responseHandling:[{code:"204",swap:!1},{code:"[23]..",swap:!0},{code:"[45]..",swap:!1,error:!0}],allowNestedOobSwaps:!0},parseInterval:null,_:null,version:"2.0.2"};htmx.onLoad=onLoadHelper,htmx.process=processNode,htmx.on=addEventListenerImpl,htmx.off=removeEventListenerImpl,htmx.trigger=triggerEvent,htmx.ajax=ajaxHelper,htmx.find=find,htmx.findAll=findAll,htmx.closest=closest,htmx.remove=removeElement,htmx.addClass=addClassToElement,htmx.removeClass=removeClassFromElement,htmx.toggleClass=toggleClassOnElement,htmx.takeClass=takeClassForElement,htmx.swap=swap,htmx.defineExtension=defineExtension,htmx.removeExtension=removeExtension,htmx.logAll=logAll,htmx.logNone=logNone,htmx.parseInterval=parseInterval,htmx._=internalEval;let internalAPI={addTriggerHandler,bodyContains,canAccessLocalStorage,findThisElement,filterValues,swap,hasAttribute,getAttributeValue,getClosestAttributeValue,getClosestMatch,getExpressionVars,getHeaders,getInputValues,getInternalData,getSwapSpecification,getTriggerSpecs,getTarget,makeFragment,mergeObjects,makeSettleInfo,oobSwap,querySelectorExt,settleImmediately,shouldCancel,triggerEvent,triggerErrorEvent,withExtensions},VERBS=["get","post","put","delete","patch"],VERB_SELECTOR=VERBS.map(function(e){return"[hx-"+e+"], [data-hx-"+e+"]"}).join(", "),HEAD_TAG_REGEX=makeTagRegEx("head");function makeTagRegEx(e,t=!1){return new RegExp(`<${e}(\\s[^>]*>|>)([\\s\\S]*?)<\\/${e}>`,t?"gim":"im")}function parseInterval(e){if(e==null)return;let t=NaN;return e.slice(-2)=="ms"?t=parseFloat(e.slice(0,-2)):e.slice(-1)=="s"?t=parseFloat(e.slice(0,-1))*1e3:e.slice(-1)=="m"?t=parseFloat(e.slice(0,-1))*1e3*60:t=parseFloat(e),isNaN(t)?void 0:t}function getRawAttribute(e,t){return e instanceof Element&&e.getAttribute(t)}function hasAttribute(e,t){return!!e.hasAttribute&&(e.hasAttribute(t)||e.hasAttribute("data-"+t))}function getAttributeValue(e,t){return getRawAttribute(e,t)||getRawAttribute(e,"data-"+t)}function parentElt(e){let t=e.parentElement;return!t&&e.parentNode instanceof ShadowRoot?e.parentNode:t}function getDocument(){return document}function getRootNode(e,t){return e.getRootNode?e.getRootNode({composed:t}):getDocument()}function getClosestMatch(e,t){for(;e&&!t(e);)e=parentElt(e);return e||null}function getAttributeValueWithDisinheritance(e,t,r){let n=getAttributeValue(t,r),o=getAttributeValue(t,"hx-disinherit");var i=getAttributeValue(t,"hx-inherit");if(e!==t){if(htmx.config.disableInheritance)return i&&(i==="*"||i.split(" ").indexOf(r)>=0)?n:null;if(o&&(o==="*"||o.split(" ").indexOf(r)>=0))return"unset"}return n}function getClosestAttributeValue(e,t){let r=null;if(getClosestMatch(e,function(n){return!!(r=getAttributeValueWithDisinheritance(e,asElement(n),t))}),r!=="unset")return r}function matches(e,t){let r=e instanceof Element&&(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector);return!!r&&r.call(e,t)}function getStartTag(e){let r=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i.exec(e);return r?r[1].toLowerCase():""}function parseHTML(e){return new DOMParser().parseFromString(e,"text/html")}function takeChildrenFor(e,t){for(;t.childNodes.length>0;)e.append(t.childNodes[0])}function duplicateScript(e){let t=getDocument().createElement("script");return forEach(e.attributes,function(r){t.setAttribute(r.name,r.value)}),t.textContent=e.textContent,t.async=!1,htmx.config.inlineScriptNonce&&(t.nonce=htmx.config.inlineScriptNonce),t}function isJavaScriptScriptNode(e){return e.matches("script")&&(e.type==="text/javascript"||e.type==="module"||e.type==="")}function normalizeScriptTags(e){Array.from(e.querySelectorAll("script")).forEach(t=>{if(isJavaScriptScriptNode(t)){let r=duplicateScript(t),n=t.parentNode;try{n.insertBefore(r,t)}catch(o){logError(o)}finally{t.remove()}}})}function makeFragment(e){let t=e.replace(HEAD_TAG_REGEX,""),r=getStartTag(t),n;if(r==="html"){n=new DocumentFragment;let i=parseHTML(e);takeChildrenFor(n,i.body),n.title=i.title}else if(r==="body"){n=new DocumentFragment;let i=parseHTML(t);takeChildrenFor(n,i.body),n.title=i.title}else{let i=parseHTML('");n=i.querySelector("template").content,n.title=i.title;var o=n.querySelector("title");o&&o.parentNode===n&&(o.remove(),n.title=o.innerText)}return n&&(htmx.config.allowScriptTags?normalizeScriptTags(n):n.querySelectorAll("script").forEach(i=>i.remove())),n}function maybeCall(e){e&&e()}function isType(e,t){return Object.prototype.toString.call(e)==="[object "+t+"]"}function isFunction(e){return typeof e=="function"}function isRawObject(e){return isType(e,"Object")}function getInternalData(e){let t="htmx-internal-data",r=e[t];return r||(r=e[t]={}),r}function toArray(e){let t=[];if(e)for(let r=0;r=0}function bodyContains(e){let t=e.getRootNode&&e.getRootNode();return t&&t instanceof window.ShadowRoot?getDocument().body.contains(t.host):getDocument().body.contains(e)}function splitOnWhitespace(e){return e.trim().split(/\s+/)}function mergeObjects(e,t){for(let r in t)t.hasOwnProperty(r)&&(e[r]=t[r]);return e}function parseJSON(e){try{return JSON.parse(e)}catch(t){return logError(t),null}}function canAccessLocalStorage(){let e="htmx:localStorageTest";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch{return!1}}function normalizePath(e){try{let t=new URL(e);return t&&(e=t.pathname+t.search),/^\/$/.test(e)||(e=e.replace(/\/+$/,"")),e}catch{return e}}function internalEval(str){return maybeEval(getDocument().body,function(){return eval(str)})}function onLoadHelper(e){return htmx.on("htmx:load",function(r){e(r.detail.elt)})}function logAll(){htmx.logger=function(e,t,r){console&&console.log(t,e,r)}}function logNone(){htmx.logger=null}function find(e,t){return typeof e!="string"?e.querySelector(t):find(getDocument(),e)}function findAll(e,t){return typeof e!="string"?e.querySelectorAll(t):findAll(getDocument(),e)}function getWindow(){return window}function removeElement(e,t){e=resolveTarget(e),t?getWindow().setTimeout(function(){removeElement(e),e=null},t):parentElt(e).removeChild(e)}function asElement(e){return e instanceof Element?e:null}function asHtmlElement(e){return e instanceof HTMLElement?e:null}function asString(e){return typeof e=="string"?e:null}function asParentNode(e){return e instanceof Element||e instanceof Document||e instanceof DocumentFragment?e:null}function addClassToElement(e,t,r){e=asElement(resolveTarget(e)),e&&(r?getWindow().setTimeout(function(){addClassToElement(e,t),e=null},r):e.classList&&e.classList.add(t))}function removeClassFromElement(e,t,r){let n=asElement(resolveTarget(e));n&&(r?getWindow().setTimeout(function(){removeClassFromElement(n,t),n=null},r):n.classList&&(n.classList.remove(t),n.classList.length===0&&n.removeAttribute("class")))}function toggleClassOnElement(e,t){e=resolveTarget(e),e.classList.toggle(t)}function takeClassForElement(e,t){e=resolveTarget(e),forEach(e.parentElement.children,function(r){removeClassFromElement(r,t)}),addClassToElement(asElement(e),t)}function closest(e,t){if(e=asElement(resolveTarget(e)),e&&e.closest)return e.closest(t);do if(e==null||matches(e,t))return e;while(e=e&&asElement(parentElt(e)));return null}function startsWith(e,t){return e.substring(0,t.length)===t}function endsWith(e,t){return e.substring(e.length-t.length)===t}function normalizeSelector(e){let t=e.trim();return startsWith(t,"<")&&endsWith(t,"/>")?t.substring(1,t.length-2):t}function querySelectorAllExt(e,t,r){return e=resolveTarget(e),t.indexOf("closest ")===0?[closest(asElement(e),normalizeSelector(t.substr(8)))]:t.indexOf("find ")===0?[find(asParentNode(e),normalizeSelector(t.substr(5)))]:t==="next"?[asElement(e).nextElementSibling]:t.indexOf("next ")===0?[scanForwardQuery(e,normalizeSelector(t.substr(5)),!!r)]:t==="previous"?[asElement(e).previousElementSibling]:t.indexOf("previous ")===0?[scanBackwardsQuery(e,normalizeSelector(t.substr(9)),!!r)]:t==="document"?[document]:t==="window"?[window]:t==="body"?[document.body]:t==="root"?[getRootNode(e,!!r)]:t.indexOf("global ")===0?querySelectorAllExt(e,t.slice(7),!0):toArray(asParentNode(getRootNode(e,!!r)).querySelectorAll(normalizeSelector(t)))}var scanForwardQuery=function(e,t,r){let n=asParentNode(getRootNode(e,r)).querySelectorAll(t);for(let o=0;o=0;o--){let i=n[o];if(i.compareDocumentPosition(e)===Node.DOCUMENT_POSITION_FOLLOWING)return i}};function querySelectorExt(e,t){return typeof e!="string"?querySelectorAllExt(e,t)[0]:querySelectorAllExt(getDocument().body,e)[0]}function resolveTarget(e,t){return typeof e=="string"?find(asParentNode(t)||document,e):e}function processEventArgs(e,t,r){return isFunction(t)?{target:getDocument().body,event:asString(e),listener:t}:{target:resolveTarget(e),event:asString(t),listener:r}}function addEventListenerImpl(e,t,r){return ready(function(){let o=processEventArgs(e,t,r);o.target.addEventListener(o.event,o.listener)}),isFunction(t)?t:r}function removeEventListenerImpl(e,t,r){return ready(function(){let n=processEventArgs(e,t,r);n.target.removeEventListener(n.event,n.listener)}),isFunction(t)?t:r}let DUMMY_ELT=getDocument().createElement("output");function findAttributeTargets(e,t){let r=getClosestAttributeValue(e,t);if(r){if(r==="this")return[findThisElement(e,t)];{let n=querySelectorAllExt(e,r);return n.length===0?(logError('The selector "'+r+'" on '+t+" returned no matches!"),[DUMMY_ELT]):n}}}function findThisElement(e,t){return asElement(getClosestMatch(e,function(r){return getAttributeValue(asElement(r),t)!=null}))}function getTarget(e){let t=getClosestAttributeValue(e,"hx-target");return t?t==="this"?findThisElement(e,"hx-target"):querySelectorExt(e,t):getInternalData(e).boosted?getDocument().body:e}function shouldSettleAttribute(e){let t=htmx.config.attributesToSettle;for(let r=0;r0?(o=e.substr(0,e.indexOf(":")),n=e.substr(e.indexOf(":")+1,e.length)):o=e);let i=getDocument().querySelectorAll(n);return i?(forEach(i,function(s){let l,a=t.cloneNode(!0);l=getDocument().createDocumentFragment(),l.appendChild(a),isInlineSwap(o,s)||(l=asParentNode(a));let c={shouldSwap:!0,target:s,fragment:l};triggerEvent(s,"htmx:oobBeforeSwap",c)&&(s=c.target,c.shouldSwap&&swapWithStyle(o,s,s,l,r),forEach(r.elts,function(d){triggerEvent(d,"htmx:oobAfterSwap",c)}))}),t.parentNode.removeChild(t)):(t.parentNode.removeChild(t),triggerErrorEvent(getDocument().body,"htmx:oobErrorNoTarget",{content:t})),e}function handlePreservedElements(e){forEach(findAll(e,"[hx-preserve], [data-hx-preserve]"),function(t){let r=getAttributeValue(t,"id"),n=getDocument().getElementById(r);n!=null&&t.parentNode.replaceChild(n,t)})}function handleAttributes(e,t,r){forEach(t.querySelectorAll("[id]"),function(n){let o=getRawAttribute(n,"id");if(o&&o.length>0){let i=o.replace("'","\\'"),s=n.tagName.replace(":","\\:"),l=asParentNode(e),a=l&&l.querySelector(s+"[id='"+i+"']");if(a&&a!==l){let c=n.cloneNode();cloneAttributes(n,a),r.tasks.push(function(){cloneAttributes(n,c)})}}})}function makeAjaxLoadTask(e){return function(){removeClassFromElement(e,htmx.config.addedClass),processNode(asElement(e)),processFocus(asParentNode(e)),triggerEvent(e,"htmx:load")}}function processFocus(e){let t="[autofocus]",r=asHtmlElement(matches(e,t)?e:e.querySelector(t));r?.focus()}function insertNodesBefore(e,t,r,n){for(handleAttributes(e,r,n);r.childNodes.length>0;){let o=r.firstChild;addClassToElement(asElement(o),htmx.config.addedClass),e.insertBefore(o,t),o.nodeType!==Node.TEXT_NODE&&o.nodeType!==Node.COMMENT_NODE&&n.tasks.push(makeAjaxLoadTask(o))}}function stringHash(e,t){let r=0;for(;r0}function swap(e,t,r,n){n||(n={}),e=resolveTarget(e);let o=document.activeElement,i={};try{i={elt:o,start:o?o.selectionStart:null,end:o?o.selectionEnd:null}}catch{}let s=makeSettleInfo(e);if(r.swapStyle==="textContent")e.textContent=t;else{let a=makeFragment(t);if(s.title=a.title,n.selectOOB){let c=n.selectOOB.split(",");for(let d=0;d0?getWindow().setTimeout(l,r.settleDelay):l()}function handleTriggerHeader(e,t,r){let n=e.getResponseHeader(t);if(n.indexOf("{")===0){let o=parseJSON(n);for(let i in o)if(o.hasOwnProperty(i)){let s=o[i];isRawObject(s)?r=s.target!==void 0?s.target:r:s={value:s},triggerEvent(r,i,s)}}else{let o=n.split(",");for(let i=0;i0;){let s=t[0];if(s==="]"){if(n--,n===0){i===null&&(o=o+"true"),t.shift(),o+=")})";try{let l=maybeEval(e,function(){return Function(o)()},function(){return!0});return l.source=o,l}catch(l){return triggerErrorEvent(getDocument().body,"htmx:syntax:error",{error:l,source:o}),null}}}else s==="["&&n++;isPossibleRelativeReference(s,i,r)?o+="(("+r+"."+s+") ? ("+r+"."+s+") : (window."+s+"))":o=o+s,i=t.shift()}}}function consumeUntil(e,t){let r="";for(;e.length>0&&!t.test(e[0]);)r+=e.shift();return r}function consumeCSSSelector(e){let t;return e.length>0&&COMBINED_SELECTOR_START.test(e[0])?(e.shift(),t=consumeUntil(e,COMBINED_SELECTOR_END).trim(),e.shift()):t=consumeUntil(e,WHITESPACE_OR_COMMA),t}let INPUT_SELECTOR="input, textarea, select";function parseAndCacheTrigger(e,t,r){let n=[],o=tokenizeString(t);do{consumeUntil(o,NOT_WHITESPACE);let l=o.length,a=consumeUntil(o,/[,\[\s]/);if(a!=="")if(a==="every"){let c={trigger:"every"};consumeUntil(o,NOT_WHITESPACE),c.pollInterval=parseInterval(consumeUntil(o,/[,\[\s]/)),consumeUntil(o,NOT_WHITESPACE);var i=maybeGenerateConditional(e,o,"event");i&&(c.eventFilter=i),n.push(c)}else{let c={trigger:a};var i=maybeGenerateConditional(e,o,"event");for(i&&(c.eventFilter=i);o.length>0&&o[0]!==",";){consumeUntil(o,NOT_WHITESPACE);let u=o.shift();if(u==="changed")c.changed=!0;else if(u==="once")c.once=!0;else if(u==="consume")c.consume=!0;else if(u==="delay"&&o[0]===":")o.shift(),c.delay=parseInterval(consumeUntil(o,WHITESPACE_OR_COMMA));else if(u==="from"&&o[0]===":"){if(o.shift(),COMBINED_SELECTOR_START.test(o[0]))var s=consumeCSSSelector(o);else{var s=consumeUntil(o,WHITESPACE_OR_COMMA);if(s==="closest"||s==="find"||s==="next"||s==="previous"){o.shift();let g=consumeCSSSelector(o);g.length>0&&(s+=" "+g)}}c.from=s}else u==="target"&&o[0]===":"?(o.shift(),c.target=consumeCSSSelector(o)):u==="throttle"&&o[0]===":"?(o.shift(),c.throttle=parseInterval(consumeUntil(o,WHITESPACE_OR_COMMA))):u==="queue"&&o[0]===":"?(o.shift(),c.queue=consumeUntil(o,WHITESPACE_OR_COMMA)):u==="root"&&o[0]===":"?(o.shift(),c[u]=consumeCSSSelector(o)):u==="threshold"&&o[0]===":"?(o.shift(),c[u]=consumeUntil(o,WHITESPACE_OR_COMMA)):triggerErrorEvent(e,"htmx:syntax:error",{token:o.shift()})}n.push(c)}o.length===l&&triggerErrorEvent(e,"htmx:syntax:error",{token:o.shift()}),consumeUntil(o,NOT_WHITESPACE)}while(o[0]===","&&o.shift());return r&&(r[t]=n),n}function getTriggerSpecs(e){let t=getAttributeValue(e,"hx-trigger"),r=[];if(t){let n=htmx.config.triggerSpecsCache;r=n&&n[t]||parseAndCacheTrigger(e,t,n)}return r.length>0?r:matches(e,"form")?[{trigger:"submit"}]:matches(e,'input[type="button"], input[type="submit"]')?[{trigger:"click"}]:matches(e,INPUT_SELECTOR)?[{trigger:"change"}]:[{trigger:"click"}]}function cancelPolling(e){getInternalData(e).cancelled=!0}function processPolling(e,t,r){let n=getInternalData(e);n.timeout=getWindow().setTimeout(function(){bodyContains(e)&&n.cancelled!==!0&&(maybeFilterEvent(r,e,makeEvent("hx:poll:trigger",{triggerSpec:r,target:e}))||t(e),processPolling(e,t,r))},r.pollInterval)}function isLocalLink(e){return location.hostname===e.hostname&&getRawAttribute(e,"href")&&getRawAttribute(e,"href").indexOf("#")!==0}function eltIsDisabled(e){return closest(e,htmx.config.disableSelector)}function boostElement(e,t,r){if(e instanceof HTMLAnchorElement&&isLocalLink(e)&&(e.target===""||e.target==="_self")||e.tagName==="FORM"&&String(getRawAttribute(e,"method")).toLowerCase()!=="dialog"){t.boosted=!0;let n,o;if(e.tagName==="A")n="get",o=getRawAttribute(e,"href");else{let i=getRawAttribute(e,"method");n=i?i.toLowerCase():"get",o=getRawAttribute(e,"action")}r.forEach(function(i){addEventListener(e,function(s,l){let a=asElement(s);if(eltIsDisabled(a)){cleanUpElement(a);return}issueAjaxRequest(n,o,a,l)},t,i,!0)})}}function shouldCancel(e,t){let r=asElement(t);return r?!!((e.type==="submit"||e.type==="click")&&(r.tagName==="FORM"||matches(r,'input[type="submit"], button')&&closest(r,"form")!==null||r instanceof HTMLAnchorElement&&r.href&&(r.getAttribute("href")==="#"||r.getAttribute("href").indexOf("#")!==0))):!1}function ignoreBoostedAnchorCtrlClick(e,t){return getInternalData(e).boosted&&e instanceof HTMLAnchorElement&&t.type==="click"&&(t.ctrlKey||t.metaKey)}function maybeFilterEvent(e,t,r){let n=e.eventFilter;if(n)try{return n.call(t,r)!==!0}catch(o){let i=n.source;return triggerErrorEvent(getDocument().body,"htmx:eventFilter:error",{error:o,source:i}),!0}return!1}function addEventListener(e,t,r,n,o){let i=getInternalData(e),s;n.from?s=querySelectorAllExt(e,n.from):s=[e],n.changed&&s.forEach(function(l){let a=getInternalData(l);a.lastValue=l.value}),forEach(s,function(l){let a=function(c){if(!bodyContains(e)){l.removeEventListener(n.trigger,a);return}if(ignoreBoostedAnchorCtrlClick(e,c)||((o||shouldCancel(c,e))&&c.preventDefault(),maybeFilterEvent(n,e,c)))return;let d=getInternalData(c);if(d.triggerSpec=n,d.handledFor==null&&(d.handledFor=[]),d.handledFor.indexOf(e)<0){if(d.handledFor.push(e),n.consume&&c.stopPropagation(),n.target&&c.target&&!matches(asElement(c.target),n.target))return;if(n.once){if(i.triggeredOnce)return;i.triggeredOnce=!0}if(n.changed){let u=getInternalData(l),h=l.value;if(u.lastValue===h)return;u.lastValue=h}if(i.delayed&&clearTimeout(i.delayed),i.throttle)return;n.throttle>0?i.throttle||(triggerEvent(e,"htmx:trigger"),t(e,c),i.throttle=getWindow().setTimeout(function(){i.throttle=null},n.throttle)):n.delay>0?i.delayed=getWindow().setTimeout(function(){triggerEvent(e,"htmx:trigger"),t(e,c)},n.delay):(triggerEvent(e,"htmx:trigger"),t(e,c))}};r.listenerInfos==null&&(r.listenerInfos=[]),r.listenerInfos.push({trigger:n.trigger,listener:a,on:l}),l.addEventListener(n.trigger,a)})}let windowIsScrolling=!1,scrollHandler=null;function initScrollHandler(){scrollHandler||(scrollHandler=function(){windowIsScrolling=!0},window.addEventListener("scroll",scrollHandler),setInterval(function(){windowIsScrolling&&(windowIsScrolling=!1,forEach(getDocument().querySelectorAll("[hx-trigger*='revealed'],[data-hx-trigger*='revealed']"),function(e){maybeReveal(e)}))},200))}function maybeReveal(e){!hasAttribute(e,"data-hx-revealed")&&isScrolledIntoView(e)&&(e.setAttribute("data-hx-revealed","true"),getInternalData(e).initHash?triggerEvent(e,"revealed"):e.addEventListener("htmx:afterProcessNode",function(){triggerEvent(e,"revealed")},{once:!0}))}function loadImmediately(e,t,r,n){let o=function(){r.loaded||(r.loaded=!0,t(e))};n>0?getWindow().setTimeout(o,n):o()}function processVerbs(e,t,r){let n=!1;return forEach(VERBS,function(o){if(hasAttribute(e,"hx-"+o)){let i=getAttributeValue(e,"hx-"+o);n=!0,t.path=i,t.verb=o,r.forEach(function(s){addTriggerHandler(e,s,t,function(l,a){let c=asElement(l);if(closest(c,htmx.config.disableSelector)){cleanUpElement(c);return}issueAjaxRequest(o,i,c,a)})})}}),n}function addTriggerHandler(e,t,r,n){if(t.trigger==="revealed")initScrollHandler(),addEventListener(e,n,r,t),maybeReveal(asElement(e));else if(t.trigger==="intersect"){let o={};t.root&&(o.root=querySelectorExt(e,t.root)),t.threshold&&(o.threshold=parseFloat(t.threshold)),new IntersectionObserver(function(s){for(let l=0;l0?(r.polling=!0,processPolling(asElement(e),n,t)):addEventListener(e,n,r,t)}function shouldProcessHxOn(e){let t=asElement(e);if(!t)return!1;let r=t.attributes;for(let n=0;n", "+i).join(""))}else return[]}function maybeSetLastButtonClicked(e){let t=closest(asElement(e.target),"button, input[type='submit']"),r=getRelatedFormData(e);r&&(r.lastButtonClicked=t)}function maybeUnsetLastButtonClicked(e){let t=getRelatedFormData(e);t&&(t.lastButtonClicked=null)}function getRelatedFormData(e){let t=closest(asElement(e.target),"button, input[type='submit']");if(!t)return;let r=resolveTarget("#"+getRawAttribute(t,"form"),t.getRootNode())||closest(t,"form");if(r)return getInternalData(r)}function initButtonTracking(e){e.addEventListener("click",maybeSetLastButtonClicked),e.addEventListener("focusin",maybeSetLastButtonClicked),e.addEventListener("focusout",maybeUnsetLastButtonClicked)}function addHxOnEventHandler(e,t,r){let n=getInternalData(e);Array.isArray(n.onHandlers)||(n.onHandlers=[]);let o,i=function(s){maybeEval(e,function(){eltIsDisabled(e)||(o||(o=new Function("event",r)),o.call(e,s))})};e.addEventListener(t,i),n.onHandlers.push({event:t,listener:i})}function processHxOnWildcard(e){deInitOnHandlers(e);for(let t=0;thtmx.config.historyCacheSize;)i.shift();for(;i.length>0;)try{localStorage.setItem("htmx-history-cache",JSON.stringify(i));break}catch(l){triggerErrorEvent(getDocument().body,"htmx:historyCacheError",{cause:l,cache:i}),i.shift()}}function getCachedHistory(e){if(!canAccessLocalStorage())return null;e=normalizePath(e);let t=parseJSON(localStorage.getItem("htmx-history-cache"))||[];for(let r=0;r=200&&this.status<400){triggerEvent(getDocument().body,"htmx:historyCacheMissLoad",r);let n=makeFragment(this.response),o=n.querySelector("[hx-history-elt],[data-hx-history-elt]")||n,i=getHistoryElement(),s=makeSettleInfo(i);handleTitle(n.title),swapInnerHTML(i,o,s),settleImmediately(s.tasks),currentPathForHistory=e,triggerEvent(getDocument().body,"htmx:historyRestore",{path:e,cacheMiss:!0,serverResponse:this.response})}else triggerErrorEvent(getDocument().body,"htmx:historyCacheMissLoadError",r)},t.send()}function restoreHistory(e){saveCurrentPageToHistory(),e=e||location.pathname+location.search;let t=getCachedHistory(e);if(t){let r=makeFragment(t.content),n=getHistoryElement(),o=makeSettleInfo(n);handleTitle(r.title),swapInnerHTML(n,r,o),settleImmediately(o.tasks),getWindow().setTimeout(function(){window.scrollTo(0,t.scroll)},0),currentPathForHistory=e,triggerEvent(getDocument().body,"htmx:historyRestore",{path:e,item:t})}else htmx.config.refreshOnHistoryMiss?window.location.reload(!0):loadHistoryFromServer(e)}function addRequestIndicatorClasses(e){let t=findAttributeTargets(e,"hx-indicator");return t==null&&(t=[e]),forEach(t,function(r){let n=getInternalData(r);n.requestCount=(n.requestCount||0)+1,r.classList.add.call(r.classList,htmx.config.requestClass)}),t}function disableElements(e){let t=findAttributeTargets(e,"hx-disabled-elt");return t==null&&(t=[]),forEach(t,function(r){let n=getInternalData(r);n.requestCount=(n.requestCount||0)+1,r.setAttribute("disabled",""),r.setAttribute("data-disabled-by-htmx","")}),t}function removeRequestIndicators(e,t){forEach(e,function(r){let n=getInternalData(r);n.requestCount=(n.requestCount||0)-1,n.requestCount===0&&r.classList.remove.call(r.classList,htmx.config.requestClass)}),forEach(t,function(r){let n=getInternalData(r);n.requestCount=(n.requestCount||0)-1,n.requestCount===0&&(r.removeAttribute("disabled"),r.removeAttribute("data-disabled-by-htmx"))})}function haveSeenNode(e,t){for(let r=0;rt.indexOf(o)<0):n=n.filter(o=>o!==t),r.delete(e),forEach(n,o=>r.append(e,o))}}function processInputValue(e,t,r,n,o){if(!(n==null||haveSeenNode(e,n))){if(e.push(n),shouldInclude(n)){let i=getRawAttribute(n,"name"),s=n.value;n instanceof HTMLSelectElement&&n.multiple&&(s=toArray(n.querySelectorAll("option:checked")).map(function(l){return l.value})),n instanceof HTMLInputElement&&n.files&&(s=toArray(n.files)),addValueToFormData(i,s,t),o&&validateElement(n,r)}n instanceof HTMLFormElement&&(forEach(n.elements,function(i){e.indexOf(i)>=0?removeValueFromFormData(i.name,i.value,t):e.push(i),o&&validateElement(i,r)}),new FormData(n).forEach(function(i,s){i instanceof File&&i.name===""||addValueToFormData(s,i,t)}))}}function validateElement(e,t){let r=e;r.willValidate&&(triggerEvent(r,"htmx:validation:validate"),r.checkValidity()||(t.push({elt:r,message:r.validationMessage,validity:r.validity}),triggerEvent(r,"htmx:validation:failed",{message:r.validationMessage,validity:r.validity})))}function overrideFormData(e,t){for(let r of t.keys())e.delete(r);return t.forEach(function(r,n){e.append(n,r)}),e}function getInputValues(e,t){let r=[],n=new FormData,o=new FormData,i=[],s=getInternalData(e);s.lastButtonClicked&&!bodyContains(s.lastButtonClicked)&&(s.lastButtonClicked=null);let l=e instanceof HTMLFormElement&&e.noValidate!==!0||getAttributeValue(e,"hx-validate")==="true";if(s.lastButtonClicked&&(l=l&&s.lastButtonClicked.formNoValidate!==!0),t!=="get"&&processInputValue(r,o,i,closest(e,"form"),l),processInputValue(r,n,i,e,l),s.lastButtonClicked||e.tagName==="BUTTON"||e.tagName==="INPUT"&&getRawAttribute(e,"type")==="submit"){let c=s.lastButtonClicked||e,d=getRawAttribute(c,"name");addValueToFormData(d,c.value,o)}let a=findAttributeTargets(e,"hx-include");return forEach(a,function(c){processInputValue(r,n,i,asElement(c),l),matches(c,"form")||forEach(asParentNode(c).querySelectorAll(INPUT_SELECTOR),function(d){processInputValue(r,n,i,d,l)})}),overrideFormData(n,o),{errors:i,formData:n,values:formDataProxy(n)}}function appendParam(e,t,r){e!==""&&(e+="&"),String(r)==="[object Object]"&&(r=JSON.stringify(r));let n=encodeURIComponent(r);return e+=encodeURIComponent(t)+"="+n,e}function urlEncode(e){e=formDataFromObject(e);let t="";return e.forEach(function(r,n){t=appendParam(t,n,r)}),t}function getHeaders(e,t,r){let n={"HX-Request":"true","HX-Trigger":getRawAttribute(e,"id"),"HX-Trigger-Name":getRawAttribute(e,"name"),"HX-Target":getAttributeValue(t,"id"),"HX-Current-URL":getDocument().location.href};return getValuesForElement(e,"hx-headers",!1,n),r!==void 0&&(n["HX-Prompt"]=r),getInternalData(e).boosted&&(n["HX-Boosted"]="true"),n}function filterValues(e,t){let r=getClosestAttributeValue(t,"hx-params");if(r){if(r==="none")return new FormData;if(r==="*")return e;if(r.indexOf("not ")===0)return forEach(r.substr(4).split(","),function(n){n=n.trim(),e.delete(n)}),e;{let n=new FormData;return forEach(r.split(","),function(o){o=o.trim(),e.has(o)&&e.getAll(o).forEach(function(i){n.append(o,i)})}),n}}else return e}function isAnchorLink(e){return!!getRawAttribute(e,"href")&&getRawAttribute(e,"href").indexOf("#")>=0}function getSwapSpecification(e,t){let r=t||getClosestAttributeValue(e,"hx-swap"),n={swapStyle:getInternalData(e).boosted?"innerHTML":htmx.config.defaultSwapStyle,swapDelay:htmx.config.defaultSwapDelay,settleDelay:htmx.config.defaultSettleDelay};if(htmx.config.scrollIntoViewOnBoost&&getInternalData(e).boosted&&!isAnchorLink(e)&&(n.show="top"),r){let s=splitOnWhitespace(r);if(s.length>0)for(let l=0;l0?o.join(":"):null;n.scroll=d,n.scrollTarget=i}else if(a.indexOf("show:")===0){var o=a.substr(5).split(":");let u=o.pop();var i=o.length>0?o.join(":"):null;n.show=u,n.showTarget=i}else if(a.indexOf("focus-scroll:")===0){let c=a.substr(13);n.focusScroll=c=="true"}else l==0?n.swapStyle=a:logError("Unknown modifier in hx-swap: "+a)}}return n}function usesFormData(e){return getClosestAttributeValue(e,"hx-encoding")==="multipart/form-data"||matches(e,"form")&&getRawAttribute(e,"enctype")==="multipart/form-data"}function encodeParamsForBody(e,t,r){let n=null;return withExtensions(t,function(o){n==null&&(n=o.encodeParameters(e,r,t))}),n??(usesFormData(t)?overrideFormData(new FormData,formDataFromObject(r)):urlEncode(r))}function makeSettleInfo(e){return{tasks:[],elts:[e]}}function updateScrollState(e,t){let r=e[0],n=e[e.length-1];if(t.scroll){var o=null;t.scrollTarget&&(o=asElement(querySelectorExt(r,t.scrollTarget))),t.scroll==="top"&&(r||o)&&(o=o||r,o.scrollTop=0),t.scroll==="bottom"&&(n||o)&&(o=o||n,o.scrollTop=o.scrollHeight)}if(t.show){var o=null;if(t.showTarget){let s=t.showTarget;t.showTarget==="window"&&(s="body"),o=asElement(querySelectorExt(r,s))}t.show==="top"&&(r||o)&&(o=o||r,o.scrollIntoView({block:"start",behavior:htmx.config.scrollBehavior})),t.show==="bottom"&&(n||o)&&(o=o||n,o.scrollIntoView({block:"end",behavior:htmx.config.scrollBehavior}))}}function getValuesForElement(e,t,r,n){if(n==null&&(n={}),e==null)return n;let o=getAttributeValue(e,t);if(o){let i=o.trim(),s=r;if(i==="unset")return null;i.indexOf("javascript:")===0?(i=i.substr(11),s=!0):i.indexOf("js:")===0&&(i=i.substr(3),s=!0),i.indexOf("{")!==0&&(i="{"+i+"}");let l;s?l=maybeEval(e,function(){return Function("return ("+i+")")()},{}):l=parseJSON(i);for(let a in l)l.hasOwnProperty(a)&&n[a]==null&&(n[a]=l[a])}return getValuesForElement(asElement(parentElt(e)),t,r,n)}function maybeEval(e,t,r){return htmx.config.allowEval?t():(triggerErrorEvent(e,"htmx:evalDisallowedError"),r)}function getHXVarsForElement(e,t){return getValuesForElement(e,"hx-vars",!0,t)}function getHXValsForElement(e,t){return getValuesForElement(e,"hx-vals",!1,t)}function getExpressionVars(e){return mergeObjects(getHXVarsForElement(e),getHXValsForElement(e))}function safelySetHeaderValue(e,t,r){if(r!==null)try{e.setRequestHeader(t,r)}catch{e.setRequestHeader(t,encodeURIComponent(r)),e.setRequestHeader(t+"-URI-AutoEncoded","true")}}function getPathFromResponse(e){if(e.responseURL&&typeof URL<"u")try{let t=new URL(e.responseURL);return t.pathname+t.search}catch{triggerErrorEvent(getDocument().body,"htmx:badResponseUrl",{url:e.responseURL})}}function hasHeader(e,t){return t.test(e.getAllResponseHeaders())}function ajaxHelper(e,t,r){return e=e.toLowerCase(),r?r instanceof Element||typeof r=="string"?issueAjaxRequest(e,t,null,null,{targetOverride:resolveTarget(r),returnPromise:!0}):issueAjaxRequest(e,t,resolveTarget(r.source),r.event,{handler:r.handler,headers:r.headers,values:r.values,targetOverride:resolveTarget(r.target),swapOverride:r.swap,select:r.select,returnPromise:!0}):issueAjaxRequest(e,t,null,null,{returnPromise:!0})}function hierarchyForElt(e){let t=[];for(;e;)t.push(e),e=e.parentElement;return t}function verifyPath(e,t,r){let n,o;return typeof URL=="function"?(o=new URL(t,document.location.href),n=document.location.origin===o.origin):(o=t,n=startsWith(t,document.location.origin)),htmx.config.selfRequestsOnly&&!n?!1:triggerEvent(e,"htmx:validateUrl",mergeObjects({url:o,sameHost:n},r))}function formDataFromObject(e){if(e instanceof FormData)return e;let t=new FormData;for(let r in e)e.hasOwnProperty(r)&&(typeof e[r].forEach=="function"?e[r].forEach(function(n){t.append(r,n)}):typeof e[r]=="object"&&!(e[r]instanceof Blob)?t.append(r,JSON.stringify(e[r])):t.append(r,e[r]));return t}function formDataArrayProxy(e,t,r){return new Proxy(r,{get:function(n,o){return typeof o=="number"?n[o]:o==="length"?n.length:o==="push"?function(i){n.push(i),e.append(t,i)}:typeof n[o]=="function"?function(){n[o].apply(n,arguments),e.delete(t),n.forEach(function(i){e.append(t,i)})}:n[o]&&n[o].length===1?n[o][0]:n[o]},set:function(n,o,i){return n[o]=i,e.delete(t),n.forEach(function(s){e.append(t,s)}),!0}})}function formDataProxy(e){return new Proxy(e,{get:function(t,r){if(typeof r=="symbol")return Reflect.get(t,r);if(r==="toJSON")return()=>Object.fromEntries(e);if(r in t)return typeof t[r]=="function"?function(){return e[r].apply(e,arguments)}:t[r];let n=e.getAll(r);if(n.length!==0)return n.length===1?n[0]:formDataArrayProxy(t,r,n)},set:function(t,r,n){return typeof r!="string"?!1:(t.delete(r),typeof n.forEach=="function"?n.forEach(function(o){t.append(r,o)}):typeof n=="object"&&!(n instanceof Blob)?t.append(r,JSON.stringify(n)):t.append(r,n),!0)},deleteProperty:function(t,r){return typeof r=="string"&&t.delete(r),!0},ownKeys:function(t){return Reflect.ownKeys(Object.fromEntries(t))},getOwnPropertyDescriptor:function(t,r){return Reflect.getOwnPropertyDescriptor(Object.fromEntries(t),r)}})}function issueAjaxRequest(e,t,r,n,o,i){let s=null,l=null;if(o=o??{},o.returnPromise&&typeof Promise<"u")var a=new Promise(function(m,b){s=m,l=b});r==null&&(r=getDocument().body);let c=o.handler||handleAjaxResponse,d=o.select||null;if(!bodyContains(r))return maybeCall(s),a;let u=o.targetOverride||asElement(getTarget(r));if(u==null||u==DUMMY_ELT)return triggerErrorEvent(r,"htmx:targetError",{target:getAttributeValue(r,"hx-target")}),maybeCall(l),a;let h=getInternalData(r),g=h.lastButtonClicked;if(g){let m=getRawAttribute(g,"formaction");m!=null&&(t=m);let b=getRawAttribute(g,"formmethod");b!=null&&b.toLowerCase()!=="dialog"&&(e=b)}let E=getClosestAttributeValue(r,"hx-confirm");if(i===void 0&&triggerEvent(r,"htmx:confirm",{target:u,elt:r,path:t,verb:e,triggeringEvent:n,etc:o,issueRequest:function(F){return issueAjaxRequest(e,t,r,n,o,!!F)},question:E})===!1)return maybeCall(s),a;let O=r,x=getClosestAttributeValue(r,"hx-sync"),w=null,L=!1;if(x){let m=x.split(":"),b=m[0].trim();if(b==="this"?O=findThisElement(r,"hx-sync"):O=asElement(querySelectorExt(r,b)),x=(m[1]||"drop").trim(),h=getInternalData(O),x==="drop"&&h.xhr&&h.abortable!==!0)return maybeCall(s),a;if(x==="abort"){if(h.xhr)return maybeCall(s),a;L=!0}else x==="replace"?triggerEvent(O,"htmx:abort"):x.indexOf("queue")===0&&(w=(x.split(" ")[1]||"last").trim())}if(h.xhr)if(h.abortable)triggerEvent(O,"htmx:abort");else{if(w==null){if(n){let m=getInternalData(n);m&&m.triggerSpec&&m.triggerSpec.queue&&(w=m.triggerSpec.queue)}w==null&&(w="last")}return h.queuedRequests==null&&(h.queuedRequests=[]),w==="first"&&h.queuedRequests.length===0?h.queuedRequests.push(function(){issueAjaxRequest(e,t,r,n,o)}):w==="all"?h.queuedRequests.push(function(){issueAjaxRequest(e,t,r,n,o)}):w==="last"&&(h.queuedRequests=[],h.queuedRequests.push(function(){issueAjaxRequest(e,t,r,n,o)})),maybeCall(s),a}let v=new XMLHttpRequest;h.xhr=v,h.abortable=L;let D=function(){h.xhr=null,h.abortable=!1,h.queuedRequests!=null&&h.queuedRequests.length>0&&h.queuedRequests.shift()()},Ae=getClosestAttributeValue(r,"hx-prompt");if(Ae){var X=prompt(Ae);if(X===null||!triggerEvent(r,"htmx:prompt",{prompt:X,target:u}))return maybeCall(s),D(),a}if(E&&!i&&!confirm(E))return maybeCall(s),D(),a;let P=getHeaders(r,u,X);e!=="get"&&!usesFormData(r)&&(P["Content-Type"]="application/x-www-form-urlencoded"),o.headers&&(P=mergeObjects(P,o.headers));let _=getInputValues(r,e),le=_.errors,_e=_.formData;o.values&&overrideFormData(_e,formDataFromObject(o.values));let je=formDataFromObject(getExpressionVars(r)),Xe=overrideFormData(_e,je),Q=filterValues(Xe,r);htmx.config.getCacheBusterParam&&e==="get"&&Q.set("org.htmx.cache-buster",getRawAttribute(u,"id")||"true"),(t==null||t==="")&&(t=getDocument().location.href);let Ke=getValuesForElement(r,"hx-request"),xt=getInternalData(r).boosted,Se=htmx.config.methodsThatUseUrlParams.indexOf(e)>=0,T={boosted:xt,useUrlParams:Se,formData:Q,parameters:formDataProxy(Q),unfilteredFormData:Xe,unfilteredParameters:formDataProxy(Xe),headers:P,target:u,verb:e,errors:le,withCredentials:o.credentials||Ke.credentials||htmx.config.withCredentials,timeout:o.timeout||Ke.timeout||htmx.config.timeout,path:t,triggeringEvent:n};if(!triggerEvent(r,"htmx:configRequest",T))return maybeCall(s),D(),a;if(t=T.path,e=T.verb,P=T.headers,Q=formDataFromObject(T.parameters),le=T.errors,Se=T.useUrlParams,le&&le.length>0)return triggerEvent(r,"htmx:validation:halted",T),maybeCall(s),D(),a;let wt=t.split("#"),wr=wt[0],Ge=wt[1],M=t;if(Se&&(M=wr,!Q.keys().next().done&&(M.indexOf("?")<0?M+="?":M+="&",M+=urlEncode(Q),Ge&&(M+="#"+Ge))),!verifyPath(r,M,T))return triggerErrorEvent(r,"htmx:invalidPath",T),maybeCall(l),a;if(v.open(e.toUpperCase(),M,!0),v.overrideMimeType("text/html"),v.withCredentials=T.withCredentials,v.timeout=T.timeout,!Ke.noHeaders){for(let m in P)if(P.hasOwnProperty(m)){let b=P[m];safelySetHeaderValue(v,m,b)}}let A={xhr:v,target:u,requestConfig:T,etc:o,boosted:xt,select:d,pathInfo:{requestPath:t,finalRequestPath:M,responsePath:null,anchor:Ge}};if(v.onload=function(){try{let m=hierarchyForElt(r);if(A.pathInfo.responsePath=getPathFromResponse(v),c(r,A),A.keepIndicators!==!0&&removeRequestIndicators(Ce,Te),triggerEvent(r,"htmx:afterRequest",A),triggerEvent(r,"htmx:afterOnLoad",A),!bodyContains(r)){let b=null;for(;m.length>0&&b==null;){let F=m.shift();bodyContains(F)&&(b=F)}b&&(triggerEvent(b,"htmx:afterRequest",A),triggerEvent(b,"htmx:afterOnLoad",A))}maybeCall(s),D()}catch(m){throw triggerErrorEvent(r,"htmx:onLoadError",mergeObjects({error:m},A)),m}},v.onerror=function(){removeRequestIndicators(Ce,Te),triggerErrorEvent(r,"htmx:afterRequest",A),triggerErrorEvent(r,"htmx:sendError",A),maybeCall(l),D()},v.onabort=function(){removeRequestIndicators(Ce,Te),triggerErrorEvent(r,"htmx:afterRequest",A),triggerErrorEvent(r,"htmx:sendAbort",A),maybeCall(l),D()},v.ontimeout=function(){removeRequestIndicators(Ce,Te),triggerErrorEvent(r,"htmx:afterRequest",A),triggerErrorEvent(r,"htmx:timeout",A),maybeCall(l),D()},!triggerEvent(r,"htmx:beforeRequest",A))return maybeCall(s),D(),a;var Ce=addRequestIndicatorClasses(r),Te=disableElements(r);forEach(["loadstart","loadend","progress","abort"],function(m){forEach([v,v.upload],function(b){b.addEventListener(m,function(F){triggerEvent(r,"htmx:xhr:"+m,{lengthComputable:F.lengthComputable,loaded:F.loaded,total:F.total})})})}),triggerEvent(r,"htmx:beforeSend",A);let Ar=Se?null:encodeParamsForBody(v,r,Q);return v.send(Ar),a}function determineHistoryUpdates(e,t){let r=t.xhr,n=null,o=null;if(hasHeader(r,/HX-Push:/i)?(n=r.getResponseHeader("HX-Push"),o="push"):hasHeader(r,/HX-Push-Url:/i)?(n=r.getResponseHeader("HX-Push-Url"),o="push"):hasHeader(r,/HX-Replace-Url:/i)&&(n=r.getResponseHeader("HX-Replace-Url"),o="replace"),n)return n==="false"?{}:{type:o,path:n};let i=t.pathInfo.finalRequestPath,s=t.pathInfo.responsePath,l=getClosestAttributeValue(e,"hx-push-url"),a=getClosestAttributeValue(e,"hx-replace-url"),c=getInternalData(e).boosted,d=null,u=null;return l?(d="push",u=l):a?(d="replace",u=a):c&&(d="push",u=s||i),u?u==="false"?{}:(u==="true"&&(u=s||i),t.pathInfo.anchor&&u.indexOf("#")===-1&&(u=u+"#"+t.pathInfo.anchor),{type:d,path:u}):{}}function codeMatches(e,t){var r=new RegExp(e.code);return r.test(t.toString(10))}function resolveResponseHandling(e){for(var t=0;t0?getWindow().setTimeout(X,w.swapDelay):X()}u&&triggerErrorEvent(e,"htmx:responseError",mergeObjects({error:"Response Status Error Code "+r.status+" from "+t.pathInfo.requestPath},t))}}let extensions={};function extensionBase(){return{init:function(e){return null},getSelectors:function(){return null},onEvent:function(e,t){return!0},transformResponse:function(e,t,r){return e},isInlineSwap:function(e){return!1},handleSwap:function(e,t,r,n){return!1},encodeParameters:function(e,t,r){return null}}}function defineExtension(e,t){t.init&&t.init(internalAPI),extensions[e]=mergeObjects(extensionBase(),t)}function removeExtension(e){delete extensions[e]}function getExtensions(e,t,r){if(t==null&&(t=[]),e==null)return t;r==null&&(r=[]);let n=getAttributeValue(e,"hx-ext");return n&&forEach(n.split(","),function(o){if(o=o.replace(/ /g,""),o.slice(0,7)=="ignore:"){r.push(o.slice(7));return}if(r.indexOf(o)<0){let i=extensions[o];i&&t.indexOf(i)<0&&t.push(i)}}),getExtensions(asElement(parentElt(e)),t,r)}var isReady=!1;getDocument().addEventListener("DOMContentLoaded",function(){isReady=!0});function ready(e){isReady||getDocument().readyState==="complete"?e():getDocument().addEventListener("DOMContentLoaded",e)}function insertIndicatorStyles(){if(htmx.config.includeIndicatorStyles!==!1){let e=htmx.config.inlineStyleNonce?` nonce="${htmx.config.inlineStyleNonce}"`:"";getDocument().head.insertAdjacentHTML("beforeend"," ."+htmx.config.indicatorClass+"{opacity:0} ."+htmx.config.requestClass+" ."+htmx.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;} ."+htmx.config.requestClass+"."+htmx.config.indicatorClass+"{opacity:1; transition: opacity 200ms ease-in;} ")}}function getMetaConfig(){let e=getDocument().querySelector('meta[name="htmx-config"]');return e?parseJSON(e.content):null}function mergeMetaConfig(){let e=getMetaConfig();e&&(htmx.config=mergeObjects(htmx.config,e))}return ready(function(){mergeMetaConfig(),insertIndicatorStyles();let e=getDocument().body;processNode(e);let t=getDocument().querySelectorAll("[hx-trigger='restored'],[data-hx-trigger='restored']");e.addEventListener("htmx:abort",function(n){let o=n.target,i=getInternalData(o);i&&i.xhr&&i.xhr.abort()});let r=window.onpopstate?window.onpopstate.bind(window):null;window.onpopstate=function(n){n.state&&n.state.htmx?(restoreHistory(),forEach(t,function(o){triggerEvent(o,"htmx:restored",{document:getDocument(),triggerEvent})})):r&&r(n)},getWindow().setTimeout(function(){triggerEvent(e,"htmx:load",{}),e=null},0)}),htmx}(),Z=_r;var Re=globalThis,He=Re.ShadowRoot&&(Re.ShadyCSS===void 0||Re.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,Ye=Symbol(),At=new WeakMap,fe=class{constructor(t,r,n){if(this._$cssResult$=!0,n!==Ye)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t,this.t=r}get styleSheet(){let t=this.o,r=this.t;if(He&&t===void 0){let n=r!==void 0&&r.length===1;n&&(t=At.get(r)),t===void 0&&((this.o=t=new CSSStyleSheet).replaceSync(this.cssText),n&&At.set(r,t))}return t}toString(){return this.cssText}},_t=e=>new fe(typeof e=="string"?e:e+"",void 0,Ye),I=(e,...t)=>{let r=e.length===1?e[0]:t.reduce((n,o,i)=>n+(s=>{if(s._$cssResult$===!0)return s.cssText;if(typeof s=="number")return s;throw Error("Value passed to 'css' function must be a 'css' function result: "+s+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(o)+e[i+1],e[0]);return new fe(r,e,Ye)},Je=(e,t)=>{if(He)e.adoptedStyleSheets=t.map(r=>r instanceof CSSStyleSheet?r:r.styleSheet);else for(let r of t){let n=document.createElement("style"),o=Re.litNonce;o!==void 0&&n.setAttribute("nonce",o),n.textContent=r.cssText,e.appendChild(n)}},$e=He?e=>e:e=>e instanceof CSSStyleSheet?(t=>{let r="";for(let n of t.cssRules)r+=n.cssText;return _t(r)})(e):e;var{is:Sr,defineProperty:Cr,getOwnPropertyDescriptor:Tr,getOwnPropertyNames:Rr,getOwnPropertySymbols:Hr,getPrototypeOf:$r}=Object,Oe=globalThis,St=Oe.trustedTypes,Or=St?St.emptyScript:"",Lr=Oe.reactiveElementPolyfillSupport,me=(e,t)=>e,pe={toAttribute(e,t){switch(t){case Boolean:e=e?Or:null;break;case Object:case Array:e=e==null?e:JSON.stringify(e)}return e},fromAttribute(e,t){let r=e;switch(t){case Boolean:r=e!==null;break;case Number:r=e===null?null:Number(e);break;case Object:case Array:try{r=JSON.parse(e)}catch{r=null}}return r}},Le=(e,t)=>!Sr(e,t),Ct={attribute:!0,type:String,converter:pe,reflect:!1,hasChanged:Le};Symbol.metadata??=Symbol("metadata"),Oe.litPropertyMetadata??=new WeakMap;var q=class extends HTMLElement{static addInitializer(t){this._$Ei(),(this.l??=[]).push(t)}static get observedAttributes(){return this.finalize(),this._$Eh&&[...this._$Eh.keys()]}static createProperty(t,r=Ct){if(r.state&&(r.attribute=!1),this._$Ei(),this.elementProperties.set(t,r),!r.noAccessor){let n=Symbol(),o=this.getPropertyDescriptor(t,n,r);o!==void 0&&Cr(this.prototype,t,o)}}static getPropertyDescriptor(t,r,n){let{get:o,set:i}=Tr(this.prototype,t)??{get(){return this[r]},set(s){this[r]=s}};return{get(){return o?.call(this)},set(s){let l=o?.call(this);i.call(this,s),this.requestUpdate(t,l,n)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)??Ct}static _$Ei(){if(this.hasOwnProperty(me("elementProperties")))return;let t=$r(this);t.finalize(),t.l!==void 0&&(this.l=[...t.l]),this.elementProperties=new Map(t.elementProperties)}static finalize(){if(this.hasOwnProperty(me("finalized")))return;if(this.finalized=!0,this._$Ei(),this.hasOwnProperty(me("properties"))){let r=this.properties,n=[...Rr(r),...Hr(r)];for(let o of n)this.createProperty(o,r[o])}let t=this[Symbol.metadata];if(t!==null){let r=litPropertyMetadata.get(t);if(r!==void 0)for(let[n,o]of r)this.elementProperties.set(n,o)}this._$Eh=new Map;for(let[r,n]of this.elementProperties){let o=this._$Eu(r,n);o!==void 0&&this._$Eh.set(o,r)}this.elementStyles=this.finalizeStyles(this.styles)}static finalizeStyles(t){let r=[];if(Array.isArray(t)){let n=new Set(t.flat(1/0).reverse());for(let o of n)r.unshift($e(o))}else t!==void 0&&r.push($e(t));return r}static _$Eu(t,r){let n=r.attribute;return n===!1?void 0:typeof n=="string"?n:typeof t=="string"?t.toLowerCase():void 0}constructor(){super(),this._$Ep=void 0,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Em=null,this._$Ev()}_$Ev(){this._$ES=new Promise(t=>this.enableUpdating=t),this._$AL=new Map,this._$E_(),this.requestUpdate(),this.constructor.l?.forEach(t=>t(this))}addController(t){(this._$EO??=new Set).add(t),this.renderRoot!==void 0&&this.isConnected&&t.hostConnected?.()}removeController(t){this._$EO?.delete(t)}_$E_(){let t=new Map,r=this.constructor.elementProperties;for(let n of r.keys())this.hasOwnProperty(n)&&(t.set(n,this[n]),delete this[n]);t.size>0&&(this._$Ep=t)}createRenderRoot(){let t=this.shadowRoot??this.attachShadow(this.constructor.shadowRootOptions);return Je(t,this.constructor.elementStyles),t}connectedCallback(){this.renderRoot??=this.createRenderRoot(),this.enableUpdating(!0),this._$EO?.forEach(t=>t.hostConnected?.())}enableUpdating(t){}disconnectedCallback(){this._$EO?.forEach(t=>t.hostDisconnected?.())}attributeChangedCallback(t,r,n){this._$AK(t,n)}_$EC(t,r){let n=this.constructor.elementProperties.get(t),o=this.constructor._$Eu(t,n);if(o!==void 0&&n.reflect===!0){let i=(n.converter?.toAttribute!==void 0?n.converter:pe).toAttribute(r,n.type);this._$Em=t,i==null?this.removeAttribute(o):this.setAttribute(o,i),this._$Em=null}}_$AK(t,r){let n=this.constructor,o=n._$Eh.get(t);if(o!==void 0&&this._$Em!==o){let i=n.getPropertyOptions(o),s=typeof i.converter=="function"?{fromAttribute:i.converter}:i.converter?.fromAttribute!==void 0?i.converter:pe;this._$Em=o,this[o]=s.fromAttribute(r,i.type),this._$Em=null}}requestUpdate(t,r,n){if(t!==void 0){if(n??=this.constructor.getPropertyOptions(t),!(n.hasChanged??Le)(this[t],r))return;this.P(t,r,n)}this.isUpdatePending===!1&&(this._$ES=this._$ET())}P(t,r,n){this._$AL.has(t)||this._$AL.set(t,r),n.reflect===!0&&this._$Em!==t&&(this._$Ej??=new Set).add(t)}async _$ET(){this.isUpdatePending=!0;try{await this._$ES}catch(r){Promise.reject(r)}let t=this.scheduleUpdate();return t!=null&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){if(!this.isUpdatePending)return;if(!this.hasUpdated){if(this.renderRoot??=this.createRenderRoot(),this._$Ep){for(let[o,i]of this._$Ep)this[o]=i;this._$Ep=void 0}let n=this.constructor.elementProperties;if(n.size>0)for(let[o,i]of n)i.wrapped!==!0||this._$AL.has(o)||this[o]===void 0||this.P(o,this[o],i)}let t=!1,r=this._$AL;try{t=this.shouldUpdate(r),t?(this.willUpdate(r),this._$EO?.forEach(n=>n.hostUpdate?.()),this.update(r)):this._$EU()}catch(n){throw t=!1,this._$EU(),n}t&&this._$AE(r)}willUpdate(t){}_$AE(t){this._$EO?.forEach(r=>r.hostUpdated?.()),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$EU(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$ES}shouldUpdate(t){return!0}update(t){this._$Ej&&=this._$Ej.forEach(r=>this._$EC(r,this[r])),this._$EU()}updated(t){}firstUpdated(t){}};q.elementStyles=[],q.shadowRootOptions={mode:"open"},q[me("elementProperties")]=new Map,q[me("finalized")]=new Map,Lr?.({ReactiveElement:q}),(Oe.reactiveElementVersions??=[]).push("2.0.4");var Ze=globalThis,De=Ze.trustedTypes,Tt=De?De.createPolicy("lit-html",{createHTML:e=>e}):void 0,et="$lit$",U=`lit$${Math.random().toFixed(9).slice(2)}$`,tt="?"+U,Dr=`<${tt}>`,re=document,ye=()=>re.createComment(""),ve=e=>e===null||typeof e!="object"&&typeof e!="function",rt=Array.isArray,Dt=e=>rt(e)||typeof e?.[Symbol.iterator]=="function",Qe=`[ \f\r]`,ge=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,Rt=/-->/g,Ht=/>/g,ee=RegExp(`>|${Qe}(?:([^\\s"'>=/]+)(${Qe}*=${Qe}*(?:[^ \f\r"'\`<>=]|("|')|))|$)`,"g"),$t=/'/g,Ot=/"/g,Pt=/^(?:script|style|textarea|title)$/i,nt=e=>(t,...r)=>({_$litType$:e,strings:t,values:r}),V=nt(1),It=nt(2),kt=nt(3),B=Symbol.for("lit-noChange"),y=Symbol.for("lit-nothing"),Lt=new WeakMap,te=re.createTreeWalker(re,129);function Nt(e,t){if(!rt(e)||!e.hasOwnProperty("raw"))throw Error("invalid template strings array");return Tt!==void 0?Tt.createHTML(t):t}var Mt=(e,t)=>{let r=e.length-1,n=[],o,i=t===2?"":t===3?"":"",s=ge;for(let l=0;l"?(s=o??ge,u=-1):d[1]===void 0?u=-2:(u=s.lastIndex-d[2].length,c=d[1],s=d[3]===void 0?ee:d[3]==='"'?Ot:$t):s===Ot||s===$t?s=ee:s===Rt||s===Ht?s=ge:(s=ee,o=void 0);let g=s===ee&&e[l+1].startsWith("/>")?" ":"";i+=s===ge?a+Dr:u>=0?(n.push(c),a.slice(0,u)+et+a.slice(u)+U+g):a+U+(u===-2?l:g)}return[Nt(e,i+(e[r]||"")+(t===2?"":t===3?"":"")),n]},be=class e{constructor({strings:t,_$litType$:r},n){let o;this.parts=[];let i=0,s=0,l=t.length-1,a=this.parts,[c,d]=Mt(t,r);if(this.el=e.createElement(c,n),te.currentNode=this.el.content,r===2||r===3){let u=this.el.content.firstChild;u.replaceWith(...u.childNodes)}for(;(o=te.nextNode())!==null&&a.length0){o.textContent=De?De.emptyScript:"";for(let g=0;g2||n[0]!==""||n[1]!==""?(this._$AH=Array(n.length-1).fill(new String),this.strings=n):this._$AH=y}_$AI(t,r=this,n,o){let i=this.strings,s=!1;if(i===void 0)t=ne(this,t,r,0),s=!ve(t)||t!==this._$AH&&t!==B,s&&(this._$AH=t);else{let l=t,a,c;for(t=i[0],a=0;a{let n=r?.renderBefore??t,o=n._$litPart$;if(o===void 0){let i=r?.renderBefore??null;n._$litPart$=o=new ce(t.insertBefore(ye(),i),i,void 0,r??{})}return o._$AI(e),o};var K=class extends q{constructor(){super(...arguments),this.renderOptions={host:this},this.o=void 0}createRenderRoot(){let t=super.createRenderRoot();return this.renderOptions.renderBefore??=t.firstChild,t}update(t){let r=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this.o=qt(r,this.renderRoot,this.renderOptions)}connectedCallback(){super.connectedCallback(),this.o?.setConnected(!0)}disconnectedCallback(){super.disconnectedCallback(),this.o?.setConnected(!1)}render(){return B}};K._$litElement$=!0,K.finalized=!0,globalThis.litElementHydrateSupport?.({LitElement:K});var Ir=globalThis.litElementPolyfillSupport;Ir?.({LitElement:K});(globalThis.litElementVersions??=[]).push("4.1.0");var Ut=I` :host { display: block; } .details { border: solid 1px var(--sl-color-neutral-200); border-radius: var(--sl-border-radius-medium); background-color: var(--sl-color-neutral-0); overflow-anchor: none; } .details--disabled { opacity: 0.5; } .details__header { display: flex; align-items: center; border-radius: inherit; padding: var(--sl-spacing-medium); user-select: none; -webkit-user-select: none; cursor: pointer; } .details__header::-webkit-details-marker { display: none; } .details__header:focus { outline: none; } .details__header:focus-visible { outline: var(--sl-focus-ring); outline-offset: calc(1px + var(--sl-focus-ring-offset)); } .details--disabled .details__header { cursor: not-allowed; } .details--disabled .details__header:focus-visible { outline: none; box-shadow: none; } .details__summary { flex: 1 1 auto; display: flex; align-items: center; } .details__summary-icon { flex: 0 0 auto; display: flex; align-items: center; transition: var(--sl-transition-medium) rotate ease; } .details--open .details__summary-icon { rotate: 90deg; } .details--open.details--rtl .details__summary-icon { rotate: -90deg; } .details--open slot[name='expand-icon'], .details:not(.details--open) slot[name='collapse-icon'] { display: none; } .details__body { overflow: hidden; } .details__content { display: block; padding: var(--sl-spacing-medium); } `;var zt=Object.defineProperty,kr=Object.defineProperties,Nr=Object.getOwnPropertyDescriptor,Mr=Object.getOwnPropertyDescriptors,Bt=Object.getOwnPropertySymbols,Fr=Object.prototype.hasOwnProperty,qr=Object.prototype.propertyIsEnumerable,ot=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Vt=(e,t,r)=>t in e?zt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,G=(e,t)=>{for(var r in t||(t={}))Fr.call(t,r)&&Vt(e,r,t[r]);if(Bt)for(var r of Bt(t))qr.call(t,r)&&Vt(e,r,t[r]);return e},Fe=(e,t)=>kr(e,Mr(t)),f=(e,t,r,n)=>{for(var o=n>1?void 0:n?Nr(t,r):t,i=e.length-1,s;i>=0;i--)(s=e[i])&&(o=(n?s(t,r,o):s(o))||o);return n&&o&&zt(t,r,o),o},Wt=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)},jt=(e,t,r)=>(Wt(e,t,"read from private field"),r?r.call(e):t.get(e)),Xt=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},Kt=(e,t,r,n)=>(Wt(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r),Ur=function(e,t){this[0]=e,this[1]=t},Gt=e=>{var t=e[ot("asyncIterator")],r=!1,n,o={};return t==null?(t=e[ot("iterator")](),n=i=>o[i]=s=>t[i](s)):(t=t.call(e),n=i=>o[i]=s=>{if(r){if(r=!1,i==="throw")throw s;return s}return r=!0,{done:!1,value:new Ur(new Promise(l=>{var a=t[i](s);if(!(a instanceof Object))throw TypeError("Object expected");l(a)}),1)}}),o[ot("iterator")]=()=>o,n("next"),"throw"in t?n("throw"):o.throw=i=>{throw i},"return"in t&&n("return"),o};var Jt=new Map,Br=new WeakMap;function Vr(e){return e??{keyframes:[],options:{duration:0}}}function Yt(e,t){return t.toLowerCase()==="rtl"?{keyframes:e.rtlKeyframes||e.keyframes,options:e.options}:e}function z(e,t){Jt.set(e,Vr(t))}function W(e,t,r){let n=Br.get(e);if(n?.[t])return Yt(n[t],r.dir);let o=Jt.get(t);return o?Yt(o,r.dir):{keyframes:[],options:{duration:0}}}function ue(e,t){return new Promise(r=>{function n(o){o.target===e&&(e.removeEventListener(t,n),r())}e.addEventListener(t,n)})}function j(e,t,r){return new Promise(n=>{if(r?.duration===1/0)throw new Error("Promise-based animations must be finite.");let o=e.animate(t,Fe(G({},r),{duration:zr()?0:r.duration}));o.addEventListener("cancel",n,{once:!0}),o.addEventListener("finish",n,{once:!0})})}function zr(){return window.matchMedia("(prefers-reduced-motion: reduce)").matches}function Y(e){return Promise.all(e.getAnimations().map(t=>new Promise(r=>{t.cancel(),requestAnimationFrame(r)})))}function it(e,t){return e.map(r=>Fe(G({},r),{height:r.height==="auto"?`${t}px`:r.height}))}var st=new Set,de=new Map,ie,at="ltr",lt="en",Qt=typeof MutationObserver<"u"&&typeof document<"u"&&typeof document.documentElement<"u";if(Qt){let e=new MutationObserver(Zt);at=document.documentElement.dir||"ltr",lt=document.documentElement.lang||navigator.language,e.observe(document.documentElement,{attributes:!0,attributeFilter:["dir","lang"]})}function Ee(...e){e.map(t=>{let r=t.$code.toLowerCase();de.has(r)?de.set(r,Object.assign(Object.assign({},de.get(r)),t)):de.set(r,t),ie||(ie=t)}),Zt()}function Zt(){Qt&&(at=document.documentElement.dir||"ltr",lt=document.documentElement.lang||navigator.language),[...st.keys()].map(e=>{typeof e.requestUpdate=="function"&&e.requestUpdate()})}var qe=class{constructor(t){this.host=t,this.host.addController(this)}hostConnected(){st.add(this.host)}hostDisconnected(){st.delete(this.host)}dir(){return`${this.host.dir||at}`.toLowerCase()}lang(){return`${this.host.lang||lt}`.toLowerCase()}getTranslationData(t){var r,n;let o=new Intl.Locale(t.replace(/_/g,"-")),i=o?.language.toLowerCase(),s=(n=(r=o?.region)===null||r===void 0?void 0:r.toLowerCase())!==null&&n!==void 0?n:"",l=de.get(`${i}-${s}`),a=de.get(i);return{locale:o,language:i,region:s,primary:l,secondary:a}}exists(t,r){var n;let{primary:o,secondary:i}=this.getTranslationData((n=r.lang)!==null&&n!==void 0?n:this.lang());return r=Object.assign({includeFallback:!1},r),!!(o&&o[t]||i&&i[t]||r.includeFallback&&ie&&ie[t])}term(t,...r){let{primary:n,secondary:o}=this.getTranslationData(this.lang()),i;if(n&&n[t])i=n[t];else if(o&&o[t])i=o[t];else if(ie&&ie[t])i=ie[t];else return console.error(`No translation found for: ${String(t)}`),String(t);return typeof i=="function"?i(...r):i}date(t,r){return t=new Date(t),new Intl.DateTimeFormat(this.lang(),r).format(t)}number(t,r){return t=Number(t),isNaN(t)?"":new Intl.NumberFormat(this.lang(),r).format(t)}relativeTime(t,r,n){return new Intl.RelativeTimeFormat(this.lang(),n).format(t,r)}};var er={$code:"en",$name:"English",$dir:"ltr",carousel:"Carousel",clearEntry:"Clear entry",close:"Close",copied:"Copied",copy:"Copy",currentValue:"Current value",error:"Error",goToSlide:(e,t)=>`Go to slide ${e} of ${t}`,hidePassword:"Hide password",loading:"Loading",nextSlide:"Next slide",numOptionsSelected:e=>e===0?"No options selected":e===1?"1 option selected":`${e} options selected`,previousSlide:"Previous slide",progress:"Progress",remove:"Remove",resize:"Resize",scrollToEnd:"Scroll to end",scrollToStart:"Scroll to start",selectAColorFromTheScreen:"Select a color from the screen",showPassword:"Show password",slideNum:e=>`Slide ${e}`,toggleColorFormat:"Toggle color format"};Ee(er);var tr=er;var Ue=class extends qe{};Ee(tr);var ct="";function rr(e){ct=e}function nr(e=""){if(!ct){let t=[...document.getElementsByTagName("script")],r=t.find(n=>n.hasAttribute("data-shoelace"));if(r)rr(r.getAttribute("data-shoelace"));else{let n=t.find(i=>/shoelace(\.min)?\.js($|\?)/.test(i.src)||/shoelace-autoloader(\.min)?\.js($|\?)/.test(i.src)),o="";n&&(o=n.getAttribute("src")),rr(o.split("/").slice(0,-1).join("/"))}}return ct.replace(/\/$/,"")+(e?`/${e.replace(/^\//,"")}`:"")}var Wr={name:"default",resolver:e=>nr(`assets/icons/${e}.svg`)},or=Wr;var ir={caret:` `,check:` `,"chevron-down":` `,"chevron-left":` `,"chevron-right":` `,copy:` `,eye:` `,"eye-slash":` `,eyedropper:` `,"grip-vertical":` `,indeterminate:` `,"person-fill":` `,"play-fill":` `,"pause-fill":` `,radio:` `,"star-fill":` `,"x-lg":` `,"x-circle-fill":` `},jr={name:"system",resolver:e=>e in ir?`data:image/svg+xml,${encodeURIComponent(ir[e])}`:""},sr=jr;var Xr=[or,sr],ut=[];function ar(e){ut.push(e)}function lr(e){ut=ut.filter(t=>t!==e)}function dt(e){return Xr.find(t=>t.name===e)}var cr=I` :host { display: inline-block; width: 1em; height: 1em; box-sizing: content-box !important; } svg { display: block; height: 100%; width: 100%; } `;function se(e,t){let r=G({waitUntilFirstUpdate:!1},t);return(n,o)=>{let{update:i}=n,s=Array.isArray(e)?e:[e];n.update=function(l){s.forEach(a=>{let c=a;if(l.has(c)){let d=l.get(c),u=this[c];d!==u&&(!r.waitUntilFirstUpdate||this.hasUpdated)&&this[o](d,u)}}),i.call(this,l)}}}var J=I` :host { box-sizing: border-box; } :host *, :host *::before, :host *::after { box-sizing: inherit; } [hidden] { display: none !important; } `;var Kr={attribute:!0,type:String,converter:pe,reflect:!1,hasChanged:Le},Gr=(e=Kr,t,r)=>{let{kind:n,metadata:o}=r,i=globalThis.litPropertyMetadata.get(o);if(i===void 0&&globalThis.litPropertyMetadata.set(o,i=new Map),i.set(r.name,e),n==="accessor"){let{name:s}=r;return{set(l){let a=t.get.call(this);t.set.call(this,l),this.requestUpdate(s,a,e)},init(l){return l!==void 0&&this.P(s,void 0,e),l}}}if(n==="setter"){let{name:s}=r;return function(l){let a=this[s];t.call(this,l),this.requestUpdate(s,a,e)}}throw Error("Unsupported decorator location: "+n)};function p(e){return(t,r)=>typeof r=="object"?Gr(e,t,r):((n,o,i)=>{let s=o.hasOwnProperty(i);return o.constructor.createProperty(i,s?{...n,wrapped:!0}:n),s?Object.getOwnPropertyDescriptor(o,i):void 0})(e,t,r)}function Be(e){return p({...e,state:!0,attribute:!1})}var ae=(e,t,r)=>(r.configurable=!0,r.enumerable=!0,Reflect.decorate&&typeof t!="object"&&Object.defineProperty(e,t,r),r);function k(e,t){return(r,n,o)=>{let i=s=>s.renderRoot?.querySelector(e)??null;if(t){let{get:s,set:l}=typeof n=="object"?r:o??(()=>{let a=Symbol();return{get(){return this[a]},set(c){this[a]=c}}})();return ae(r,n,{get(){let a=s.call(this);return a===void 0&&(a=i(this),(a!==null||this.hasUpdated)&&l.call(this,a)),a}})}return ae(r,n,{get(){return i(this)}})}}var Ve,R=class extends K{constructor(){super(),Xt(this,Ve,!1),this.initialReflectedProperties=new Map,Object.entries(this.constructor.dependencies).forEach(([e,t])=>{this.constructor.define(e,t)})}emit(e,t){let r=new CustomEvent(e,G({bubbles:!0,cancelable:!1,composed:!0,detail:{}},t));return this.dispatchEvent(r),r}static define(e,t=this,r={}){let n=customElements.get(e);if(!n){try{customElements.define(e,t,r)}catch{customElements.define(e,class extends t{},r)}return}let o=" (unknown version)",i=o;"version"in t&&t.version&&(o=" v"+t.version),"version"in n&&n.version&&(i=" v"+n.version),!(o&&i&&o===i)&&console.warn(`Attempted to register <${e}>${o}, but <${e}>${i} has already been registered.`)}attributeChangedCallback(e,t,r){jt(this,Ve)||(this.constructor.elementProperties.forEach((n,o)=>{n.reflect&&this[o]!=null&&this.initialReflectedProperties.set(o,this[o])}),Kt(this,Ve,!0)),super.attributeChangedCallback(e,t,r)}willUpdate(e){super.willUpdate(e),this.initialReflectedProperties.forEach((t,r)=>{e.has(r)&&this[r]==null&&(this[r]=t)})}};Ve=new WeakMap;R.version="2.17.1";R.dependencies={};f([p()],R.prototype,"dir",2);f([p()],R.prototype,"lang",2);var{I:Do}=Ft;var ur=(e,t)=>t===void 0?e?._$litType$!==void 0:e?._$litType$===t;var xe=Symbol(),ze=Symbol(),ht,ft=new Map,H=class extends R{constructor(){super(...arguments),this.initialRender=!1,this.svg=null,this.label="",this.library="default"}async resolveIcon(e,t){var r;let n;if(t?.spriteSheet)return this.svg=V` `,this.svg;try{if(n=await fetch(e,{mode:"cors"}),!n.ok)return n.status===410?xe:ze}catch{return ze}try{let o=document.createElement("div");o.innerHTML=await n.text();let i=o.firstElementChild;if(((r=i?.tagName)==null?void 0:r.toLowerCase())!=="svg")return xe;ht||(ht=new DOMParser);let l=ht.parseFromString(i.outerHTML,"text/html").body.querySelector("svg");return l?(l.part.add("svg"),document.adoptNode(l)):xe}catch{return xe}}connectedCallback(){super.connectedCallback(),ar(this)}firstUpdated(){this.initialRender=!0,this.setIcon()}disconnectedCallback(){super.disconnectedCallback(),lr(this)}getIconSource(){let e=dt(this.library);return this.name&&e?{url:e.resolver(this.name),fromLibrary:!0}:{url:this.src,fromLibrary:!1}}handleLabelChange(){typeof this.label=="string"&&this.label.length>0?(this.setAttribute("role","img"),this.setAttribute("aria-label",this.label),this.removeAttribute("aria-hidden")):(this.removeAttribute("role"),this.removeAttribute("aria-label"),this.setAttribute("aria-hidden","true"))}async setIcon(){var e;let{url:t,fromLibrary:r}=this.getIconSource(),n=r?dt(this.library):void 0;if(!t){this.svg=null;return}let o=ft.get(t);if(o||(o=this.resolveIcon(t,n),ft.set(t,o)),!this.initialRender)return;let i=await o;if(i===ze&&ft.delete(t),t===this.getIconSource().url){if(ur(i)){if(this.svg=i,n){await this.updateComplete;let s=this.shadowRoot.querySelector("[part='svg']");typeof n.mutator=="function"&&s&&n.mutator(s)}return}switch(i){case ze:case xe:this.svg=null,this.emit("sl-error");break;default:this.svg=i.cloneNode(!0),(e=n?.mutator)==null||e.call(n,this.svg),this.emit("sl-load")}}}render(){return this.svg}};H.styles=[J,cr];f([Be()],H.prototype,"svg",2);f([p({reflect:!0})],H.prototype,"name",2);f([p()],H.prototype,"src",2);f([p()],H.prototype,"label",2);f([p({reflect:!0})],H.prototype,"library",2);f([se("label")],H.prototype,"handleLabelChange",1);f([se(["name","src","library"])],H.prototype,"setIcon",1);var dr={ATTRIBUTE:1,CHILD:2,PROPERTY:3,BOOLEAN_ATTRIBUTE:4,EVENT:5,ELEMENT:6},hr=e=>(...t)=>({_$litDirective$:e,values:t}),We=class{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,r,n){this.t=t,this._$AM=r,this.i=n}_$AS(t,r){return this.update(t,r)}update(t,r){return this.render(...r)}};var he=hr(class extends We{constructor(e){if(super(e),e.type!==dr.ATTRIBUTE||e.name!=="class"||e.strings?.length>2)throw Error("`classMap()` can only be used in the `class` attribute and must be the only part in the attribute.")}render(e){return" "+Object.keys(e).filter(t=>e[t]).join(" ")+" "}update(e,[t]){if(this.st===void 0){this.st=new Set,e.strings!==void 0&&(this.nt=new Set(e.strings.join(" ").split(/\s/).filter(n=>n!=="")));for(let n in t)t[n]&&!this.nt?.has(n)&&this.st.add(n);return this.render(t)}let r=e.element.classList;for(let n of this.st)n in t||(r.remove(n),this.st.delete(n));for(let n in t){let o=!!t[n];o===this.st.has(n)||this.nt?.has(n)||(o?(r.add(n),this.st.add(n)):(r.remove(n),this.st.delete(n)))}return B}});var $=class extends R{constructor(){super(...arguments),this.localize=new Ue(this),this.open=!1,this.disabled=!1}firstUpdated(){this.body.style.height=this.open?"auto":"0",this.open&&(this.details.open=!0),this.detailsObserver=new MutationObserver(e=>{for(let t of e)t.type==="attributes"&&t.attributeName==="open"&&(this.details.open?this.show():this.hide())}),this.detailsObserver.observe(this.details,{attributes:!0})}disconnectedCallback(){var e;super.disconnectedCallback(),(e=this.detailsObserver)==null||e.disconnect()}handleSummaryClick(e){e.preventDefault(),this.disabled||(this.open?this.hide():this.show(),this.header.focus())}handleSummaryKeyDown(e){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),this.open?this.hide():this.show()),(e.key==="ArrowUp"||e.key==="ArrowLeft")&&(e.preventDefault(),this.hide()),(e.key==="ArrowDown"||e.key==="ArrowRight")&&(e.preventDefault(),this.show())}async handleOpenChange(){if(this.open){if(this.details.open=!0,this.emit("sl-show",{cancelable:!0}).defaultPrevented){this.open=!1,this.details.open=!1;return}await Y(this.body);let{keyframes:t,options:r}=W(this,"details.show",{dir:this.localize.dir()});await j(this.body,it(t,this.body.scrollHeight),r),this.body.style.height="auto",this.emit("sl-after-show")}else{if(this.emit("sl-hide",{cancelable:!0}).defaultPrevented){this.details.open=!0,this.open=!0;return}await Y(this.body);let{keyframes:t,options:r}=W(this,"details.hide",{dir:this.localize.dir()});await j(this.body,it(t,this.body.scrollHeight),r),this.body.style.height="auto",this.details.open=!1,this.emit("sl-after-hide")}}async show(){if(!(this.open||this.disabled))return this.open=!0,ue(this,"sl-after-show")}async hide(){if(!(!this.open||this.disabled))return this.open=!1,ue(this,"sl-after-hide")}render(){let e=this.matches(":dir(rtl)");return V`
${this.summary}
`}};$.styles=[J,Ut];$.dependencies={"sl-icon":H};f([k(".details")],$.prototype,"details",2);f([k(".details__header")],$.prototype,"header",2);f([k(".details__body")],$.prototype,"body",2);f([k(".details__expand-icon-slot")],$.prototype,"expandIconSlot",2);f([p({type:Boolean,reflect:!0})],$.prototype,"open",2);f([p()],$.prototype,"summary",2);f([p({type:Boolean,reflect:!0})],$.prototype,"disabled",2);f([se("open",{waitUntilFirstUpdate:!0})],$.prototype,"handleOpenChange",1);z("details.show",{keyframes:[{height:"0",opacity:"0"},{height:"auto",opacity:"1"}],options:{duration:250,easing:"linear"}});z("details.hide",{keyframes:[{height:"auto",opacity:"1"},{height:"0",opacity:"0"}],options:{duration:250,easing:"linear"}});$.define("sl-details");var fr=new WeakMap;function mr(e){let t=fr.get(e);return t||(t=window.getComputedStyle(e,null),fr.set(e,t)),t}function Yr(e){if(typeof e.checkVisibility=="function")return e.checkVisibility({checkOpacity:!1,checkVisibilityCSS:!0});let t=mr(e);return t.visibility!=="hidden"&&t.display!=="none"}function Jr(e){let t=mr(e),{overflowY:r,overflowX:n}=t;return r==="scroll"||n==="scroll"?!0:r!=="auto"||n!=="auto"?!1:e.scrollHeight>e.clientHeight&&r==="auto"||e.scrollWidth>e.clientWidth&&n==="auto"}function Qr(e){let t=e.tagName.toLowerCase(),r=Number(e.getAttribute("tabindex"));return e.hasAttribute("tabindex")&&(isNaN(r)||r<=-1)||e.hasAttribute("disabled")||e.closest("[inert]")||t==="input"&&e.getAttribute("type")==="radio"&&!e.hasAttribute("checked")||!Yr(e)?!1:(t==="audio"||t==="video")&&e.hasAttribute("controls")||e.hasAttribute("tabindex")||e.hasAttribute("contenteditable")&&e.getAttribute("contenteditable")!=="false"||["button","input","select","textarea","a","audio","video","summary","iframe"].includes(t)?!0:Jr(e)}function Zr(e,t){var r;return((r=e.getRootNode({composed:!0}))==null?void 0:r.host)!==t}function mt(e){let t=new WeakMap,r=[];function n(o){if(o instanceof Element){if(o.hasAttribute("inert")||o.closest("[inert]")||t.has(o))return;t.set(o,!0),!r.includes(o)&&Qr(o)&&r.push(o),o instanceof HTMLSlotElement&&Zr(o,e)&&o.assignedElements({flatten:!0}).forEach(i=>{n(i)}),o.shadowRoot!==null&&o.shadowRoot.mode==="open"&&n(o.shadowRoot)}for(let i of o.children)n(i)}return n(e),r.sort((o,i)=>{let s=Number(o.getAttribute("tabindex"))||0;return(Number(i.getAttribute("tabindex"))||0)-s})}function*pt(e=document.activeElement){e!=null&&(yield e,"shadowRoot"in e&&e.shadowRoot&&e.shadowRoot.mode!=="closed"&&(yield*Gt(pt(e.shadowRoot.activeElement))))}function en(){return[...pt()].pop()}var we=[],pr=class{constructor(e){this.tabDirection="forward",this.handleFocusIn=()=>{this.isActive()&&this.checkFocus()},this.handleKeyDown=t=>{var r;if(t.key!=="Tab"||this.isExternalActivated||!this.isActive())return;let n=en();if(this.previousFocus=n,this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus))return;t.shiftKey?this.tabDirection="backward":this.tabDirection="forward";let o=mt(this.element),i=o.findIndex(l=>l===n);this.previousFocus=this.currentFocus;let s=this.tabDirection==="forward"?1:-1;for(;;){i+s>=o.length?i=0:i+s<0?i=o.length-1:i+=s,this.previousFocus=this.currentFocus;let l=o[i];if(this.tabDirection==="backward"&&this.previousFocus&&this.possiblyHasTabbableChildren(this.previousFocus)||l&&this.possiblyHasTabbableChildren(l))return;t.preventDefault(),this.currentFocus=l,(r=this.currentFocus)==null||r.focus({preventScroll:!1});let a=[...pt()];if(a.includes(this.currentFocus)||!a.includes(this.previousFocus))break}setTimeout(()=>this.checkFocus())},this.handleKeyUp=()=>{this.tabDirection="forward"},this.element=e,this.elementsWithTabbableControls=["iframe"]}activate(){we.push(this.element),document.addEventListener("focusin",this.handleFocusIn),document.addEventListener("keydown",this.handleKeyDown),document.addEventListener("keyup",this.handleKeyUp)}deactivate(){we=we.filter(e=>e!==this.element),this.currentFocus=null,document.removeEventListener("focusin",this.handleFocusIn),document.removeEventListener("keydown",this.handleKeyDown),document.removeEventListener("keyup",this.handleKeyUp)}isActive(){return we[we.length-1]===this.element}activateExternal(){this.isExternalActivated=!0}deactivateExternal(){this.isExternalActivated=!1}checkFocus(){if(this.isActive()&&!this.isExternalActivated){let e=mt(this.element);if(!this.element.matches(":focus-within")){let t=e[0],r=e[e.length-1],n=this.tabDirection==="forward"?t:r;typeof n?.focus=="function"&&(this.currentFocus=n,n.focus({preventScroll:!1}))}}}possiblyHasTabbableChildren(e){return this.elementsWithTabbableControls.includes(e.tagName.toLowerCase())||e.hasAttribute("controls")}};var gt=new Set;function tn(){let e=document.documentElement.clientWidth;return Math.abs(window.innerWidth-e)}function rn(){let e=Number(getComputedStyle(document.body).paddingRight.replace(/px/,""));return isNaN(e)||!e?0:e}function yt(e){if(gt.add(e),!document.documentElement.classList.contains("sl-scroll-lock")){let t=tn()+rn(),r=getComputedStyle(document.documentElement).scrollbarGutter;(!r||r==="auto")&&(r="stable"),t<2&&(r=""),document.documentElement.style.setProperty("--sl-scroll-lock-gutter",r),document.documentElement.classList.add("sl-scroll-lock"),document.documentElement.style.setProperty("--sl-scroll-lock-size",`${t}px`)}}function vt(e){gt.delete(e),gt.size===0&&(document.documentElement.classList.remove("sl-scroll-lock"),document.documentElement.style.removeProperty("--sl-scroll-lock-size"))}var gr=I` :host { --width: 31rem; --header-spacing: var(--sl-spacing-large); --body-spacing: var(--sl-spacing-large); --footer-spacing: var(--sl-spacing-large); display: contents; } .dialog { display: flex; align-items: center; justify-content: center; position: fixed; top: 0; right: 0; bottom: 0; left: 0; z-index: var(--sl-z-index-dialog); } .dialog__panel { display: flex; flex-direction: column; z-index: 2; width: var(--width); max-width: calc(100% - var(--sl-spacing-2x-large)); max-height: calc(100% - var(--sl-spacing-2x-large)); background-color: var(--sl-panel-background-color); border-radius: var(--sl-border-radius-medium); box-shadow: var(--sl-shadow-x-large); } .dialog__panel:focus { outline: none; } /* Ensure there's enough vertical padding for phones that don't update vh when chrome appears (e.g. iPhone) */ @media screen and (max-width: 420px) { .dialog__panel { max-height: 80vh; } } .dialog--open .dialog__panel { display: flex; opacity: 1; } .dialog__header { flex: 0 0 auto; display: flex; } .dialog__title { flex: 1 1 auto; font: inherit; font-size: var(--sl-font-size-large); line-height: var(--sl-line-height-dense); padding: var(--header-spacing); margin: 0; } .dialog__header-actions { flex-shrink: 0; display: flex; flex-wrap: wrap; justify-content: end; gap: var(--sl-spacing-2x-small); padding: 0 var(--header-spacing); } .dialog__header-actions sl-icon-button, .dialog__header-actions ::slotted(sl-icon-button) { flex: 0 0 auto; display: flex; align-items: center; font-size: var(--sl-font-size-medium); } .dialog__body { flex: 1 1 auto; display: block; padding: var(--body-spacing); overflow: auto; -webkit-overflow-scrolling: touch; } .dialog__footer { flex: 0 0 auto; text-align: right; padding: var(--footer-spacing); } .dialog__footer ::slotted(sl-button:not(:first-of-type)) { margin-inline-start: var(--sl-spacing-x-small); } .dialog:not(.dialog--has-footer) .dialog__footer { display: none; } .dialog__overlay { position: fixed; top: 0; right: 0; bottom: 0; left: 0; background-color: var(--sl-overlay-background-color); } @media (forced-colors: active) { .dialog__panel { border: solid 1px var(--sl-color-neutral-0); } } `;var yr=I` :host { display: inline-block; color: var(--sl-color-neutral-600); } .icon-button { flex: 0 0 auto; display: flex; align-items: center; background: none; border: none; border-radius: var(--sl-border-radius-medium); font-size: inherit; color: inherit; padding: var(--sl-spacing-x-small); cursor: pointer; transition: var(--sl-transition-x-fast) color; -webkit-appearance: none; } .icon-button:hover:not(.icon-button--disabled), .icon-button:focus-visible:not(.icon-button--disabled) { color: var(--sl-color-primary-600); } .icon-button:active:not(.icon-button--disabled) { color: var(--sl-color-primary-700); } .icon-button:focus { outline: none; } .icon-button--disabled { opacity: 0.5; cursor: not-allowed; } .icon-button:focus-visible { outline: var(--sl-focus-ring); outline-offset: var(--sl-focus-ring-offset); } .icon-button__icon { pointer-events: none; } `;var br=Symbol.for(""),nn=e=>{if(e?.r===br)return e?._$litStatic$};var bt=(e,...t)=>({_$litStatic$:t.reduce((r,n,o)=>r+(i=>{if(i._$litStatic$!==void 0)return i._$litStatic$;throw Error(`Value passed to 'literal' function must be a 'literal' result: ${i}. Use 'unsafeStatic' to pass non-literal values, but take care to ensure page security.`)})(n)+e[o+1],e[0]),r:br}),vr=new Map,Et=e=>(t,...r)=>{let n=r.length,o,i,s=[],l=[],a,c=0,d=!1;for(;ce??y;var C=class extends R{constructor(){super(...arguments),this.hasFocus=!1,this.label="",this.disabled=!1}handleBlur(){this.hasFocus=!1,this.emit("sl-blur")}handleFocus(){this.hasFocus=!0,this.emit("sl-focus")}handleClick(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}click(){this.button.click()}focus(e){this.button.focus(e)}blur(){this.button.blur()}render(){let e=!!this.href,t=e?bt`a`:bt`button`;return Er` <${t} part="base" class=${he({"icon-button":!0,"icon-button--disabled":!e&&this.disabled,"icon-button--focused":this.hasFocus})} ?disabled=${S(e?void 0:this.disabled)} type=${S(e?void 0:"button")} href=${S(e?this.href:void 0)} target=${S(e?this.target:void 0)} download=${S(e?this.download:void 0)} rel=${S(e&&this.target?"noreferrer noopener":void 0)} role=${S(e?void 0:"button")} aria-disabled=${this.disabled?"true":"false"} aria-label="${this.label}" tabindex=${this.disabled?"-1":"0"} @blur=${this.handleBlur} @focus=${this.handleFocus} @click=${this.handleClick} > `}};C.styles=[J,yr];C.dependencies={"sl-icon":H};f([k(".icon-button")],C.prototype,"button",2);f([Be()],C.prototype,"hasFocus",2);f([p()],C.prototype,"name",2);f([p()],C.prototype,"library",2);f([p()],C.prototype,"src",2);f([p()],C.prototype,"href",2);f([p()],C.prototype,"target",2);f([p()],C.prototype,"download",2);f([p()],C.prototype,"label",2);f([p({type:Boolean,reflect:!0})],C.prototype,"disabled",2);var xr=class{constructor(e,...t){this.slotNames=[],this.handleSlotChange=r=>{let n=r.target;(this.slotNames.includes("[default]")&&!n.name||n.name&&this.slotNames.includes(n.name))&&this.host.requestUpdate()},(this.host=e).addController(this),this.slotNames=t}hasDefaultSlot(){return[...this.host.childNodes].some(e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent.trim()!=="")return!0;if(e.nodeType===e.ELEMENT_NODE){let t=e;if(t.tagName.toLowerCase()==="sl-visually-hidden")return!1;if(!t.hasAttribute("slot"))return!0}return!1})}hasNamedSlot(e){return this.host.querySelector(`:scope > [slot="${e}"]`)!==null}test(e){return e==="[default]"?this.hasDefaultSlot():this.hasNamedSlot(e)}hostConnected(){this.host.shadowRoot.addEventListener("slotchange",this.handleSlotChange)}hostDisconnected(){this.host.shadowRoot.removeEventListener("slotchange",this.handleSlotChange)}};var N=class extends R{constructor(){super(...arguments),this.hasSlotController=new xr(this,"footer"),this.localize=new Ue(this),this.modal=new pr(this),this.open=!1,this.label="",this.noHeader=!1,this.handleDocumentKeyDown=e=>{e.key==="Escape"&&this.modal.isActive()&&this.open&&(e.stopPropagation(),this.requestClose("keyboard"))}}firstUpdated(){this.dialog.hidden=!this.open,this.open&&(this.addOpenListeners(),this.modal.activate(),yt(this))}disconnectedCallback(){var e;super.disconnectedCallback(),this.modal.deactivate(),vt(this),(e=this.closeWatcher)==null||e.destroy()}requestClose(e){if(this.emit("sl-request-close",{cancelable:!0,detail:{source:e}}).defaultPrevented){let r=W(this,"dialog.denyClose",{dir:this.localize.dir()});j(this.panel,r.keyframes,r.options);return}this.hide()}addOpenListeners(){var e;"CloseWatcher"in window?((e=this.closeWatcher)==null||e.destroy(),this.closeWatcher=new CloseWatcher,this.closeWatcher.onclose=()=>this.requestClose("keyboard")):document.addEventListener("keydown",this.handleDocumentKeyDown)}removeOpenListeners(){var e;(e=this.closeWatcher)==null||e.destroy(),document.removeEventListener("keydown",this.handleDocumentKeyDown)}async handleOpenChange(){if(this.open){this.emit("sl-show"),this.addOpenListeners(),this.originalTrigger=document.activeElement,this.modal.activate(),yt(this);let e=this.querySelector("[autofocus]");e&&e.removeAttribute("autofocus"),await Promise.all([Y(this.dialog),Y(this.overlay)]),this.dialog.hidden=!1,requestAnimationFrame(()=>{this.emit("sl-initial-focus",{cancelable:!0}).defaultPrevented||(e?e.focus({preventScroll:!0}):this.panel.focus({preventScroll:!0})),e&&e.setAttribute("autofocus","")});let t=W(this,"dialog.show",{dir:this.localize.dir()}),r=W(this,"dialog.overlay.show",{dir:this.localize.dir()});await Promise.all([j(this.panel,t.keyframes,t.options),j(this.overlay,r.keyframes,r.options)]),this.emit("sl-after-show")}else{this.emit("sl-hide"),this.removeOpenListeners(),this.modal.deactivate(),await Promise.all([Y(this.dialog),Y(this.overlay)]);let e=W(this,"dialog.hide",{dir:this.localize.dir()}),t=W(this,"dialog.overlay.hide",{dir:this.localize.dir()});await Promise.all([j(this.overlay,t.keyframes,t.options).then(()=>{this.overlay.hidden=!0}),j(this.panel,e.keyframes,e.options).then(()=>{this.panel.hidden=!0})]),this.dialog.hidden=!0,this.overlay.hidden=!1,this.panel.hidden=!1,vt(this);let r=this.originalTrigger;typeof r?.focus=="function"&&setTimeout(()=>r.focus()),this.emit("sl-after-hide")}}async show(){if(!this.open)return this.open=!0,ue(this,"sl-after-show")}async hide(){if(this.open)return this.open=!1,ue(this,"sl-after-hide")}render(){return V`
this.requestClose("overlay")} tabindex="-1">
`}};N.styles=[J,gr];N.dependencies={"sl-icon-button":C};f([k(".dialog")],N.prototype,"dialog",2);f([k(".dialog__panel")],N.prototype,"panel",2);f([k(".dialog__overlay")],N.prototype,"overlay",2);f([p({type:Boolean,reflect:!0})],N.prototype,"open",2);f([p({reflect:!0})],N.prototype,"label",2);f([p({attribute:"no-header",type:Boolean,reflect:!0})],N.prototype,"noHeader",2);f([se("open",{waitUntilFirstUpdate:!0})],N.prototype,"handleOpenChange",1);z("dialog.show",{keyframes:[{opacity:0,scale:.8},{opacity:1,scale:1}],options:{duration:250,easing:"ease"}});z("dialog.hide",{keyframes:[{opacity:1,scale:1},{opacity:0,scale:.8}],options:{duration:250,easing:"ease"}});z("dialog.denyClose",{keyframes:[{scale:1},{scale:1.02},{scale:1}],options:{duration:250}});z("dialog.overlay.show",{keyframes:[{opacity:0},{opacity:1}],options:{duration:250}});z("dialog.overlay.hide",{keyframes:[{opacity:1},{opacity:0}],options:{duration:250}});N.define("sl-dialog");Z.config.historyCacheSize=0;Z.config.refreshOnHistoryMiss=!1;Z.config.scrollBehavior="smooth";Z.config.scrollIntoViewOnBoost=!1;Z.config.withCredentials=!0;window.htmx=Z;import("./chunks/head-support-NHYW2OV7.js");import("./chunks/preload-6TX6OLDL.js");import("./chunks/response-targets-YXWOLJSK.js");import("./chunks/loading-states-GW5V237B.js");import("./chunks/preserve-attributes-QOS32GJI.js");var on=e=>{if(!window.htmx){console.warn("htmx not found");return}document.body.addEventListener("htmx:beforeSwap",t),document.body.addEventListener("htmx:historyRestore",t);function t(r){r.type==="htmx:historyRestore"?e(r):r.detail.isError||e(r),document.body.removeEventListener("htmx:beforeSwap",t),document.body.removeEventListener("htmx:historyRestore",t)}};window.onViewLeave=on; /*! Bundled license information: @lit/reactive-element/css-tag.js: (** * @license * Copyright 2019 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/reactive-element.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/lit-html.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-element/lit-element.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/is-server.js: (** * @license * Copyright 2022 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/decorators/custom-element.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/decorators/property.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/decorators/state.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/decorators/event-options.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/decorators/base.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/decorators/query.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/decorators/query-all.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/decorators/query-async.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/decorators/query-assigned-elements.js: (** * @license * Copyright 2021 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) @lit/reactive-element/decorators/query-assigned-nodes.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/directive-helpers.js: (** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/directive.js: (** * @license * Copyright 2017 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/directives/class-map.js: (** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/static.js: (** * @license * Copyright 2020 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) lit-html/directives/if-defined.js: (** * @license * Copyright 2018 Google LLC * SPDX-License-Identifier: BSD-3-Clause *) */