From 60943e96a6a6a9fe6e8d368f9db2bf9aedf1a6bc Mon Sep 17 00:00:00 2001 From: Craig Jennings Date: Sat, 7 Mar 2026 11:28:56 -0600 Subject: chore: update calibre, mimeapps, authinfo, add outbox items Calibre window geometry and scheduler updates. Add Signal URI handlers. Move processed inbox items to outbox. --- .../26533-6b8040883d16f6ae.js" | 26 ++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 "assets/outbox/Release v0.54.0 \302\267 hyprwm_Hyprland_files/26533-6b8040883d16f6ae.js" (limited to 'assets/outbox/Release v0.54.0 · hyprwm_Hyprland_files/26533-6b8040883d16f6ae.js') diff --git "a/assets/outbox/Release v0.54.0 \302\267 hyprwm_Hyprland_files/26533-6b8040883d16f6ae.js" "b/assets/outbox/Release v0.54.0 \302\267 hyprwm_Hyprland_files/26533-6b8040883d16f6ae.js" new file mode 100644 index 0000000..6fb1d5b --- /dev/null +++ "b/assets/outbox/Release v0.54.0 \302\267 hyprwm_Hyprland_files/26533-6b8040883d16f6ae.js" @@ -0,0 +1,26 @@ +performance.mark("js-parse-end:26533-6b8040883d16f6ae.js"); +"use strict";(globalThis.webpackChunk_github_ui_github_ui=globalThis.webpackChunk_github_ui_github_ui||[]).push([["26533"],{7332(e,t,i){i.d(t,{H5:()=>eo,Uz:()=>eS,YR:()=>ev,gM:()=>eg,session:()=>em}),function(){if(void 0===window.Reflect||void 0===window.customElements||window.customElements.polyfillWrapFlushCallback)return;let e=HTMLElement;window.HTMLElement=({HTMLElement:function(){return Reflect.construct(e,[],this.constructor)}}).HTMLElement,HTMLElement.prototype=e.prototype,HTMLElement.prototype.constructor=HTMLElement,Object.setPrototypeOf(HTMLElement,e)}();var s=HTMLFormElement.prototype;function r(e,t,i){throw new e("Failed to execute 'requestSubmit' on 'HTMLFormElement': "+t+".",i)}"function"!=typeof s.requestSubmit&&(s.requestSubmit=function(e){var t,i;e?(t=e,i=this,t instanceof HTMLElement||r(TypeError,"parameter 1 is not of type 'HTMLElement'"),"submit"==t.type||r(TypeError,"The specified element is not a submit button"),t.form==i||r(DOMException,"The specified element is not owned by this form element","NotFoundError"),e.click()):((e=document.createElement("input")).type="submit",e.hidden=!0,this.appendChild(e),e.click(),this.removeChild(e))});let n=new WeakMap;function o(e){var t;let i,s,r=(null==(s=(i=(t=e.target)instanceof Element?t:t instanceof Node?t.parentElement:null)?i.closest("input, button"):null)?void 0:s.type)=="submit"?s:null;r&&r.form&&n.set(r.form,r)}!function(){let e;if(!("submitter"in Event.prototype)){if("SubmitEvent"in window&&/Apple Computer/.test(navigator.vendor))e=window.SubmitEvent.prototype;else{if("SubmitEvent"in window)return;e=window.Event.prototype}addEventListener("click",o,!0),Object.defineProperty(e,"submitter",{get(){if("submit"==this.type&&this.target instanceof HTMLFormElement)return n.get(this.target)}})}}();let a=null,l=null!=(ek=null==(eF=globalThis.trustedTypes)?void 0:eF.emptyHTML)?ek:"";(eE=eI||(eI={})).eager="eager",eE.lazy="lazy";class h extends HTMLElement{constructor(){super(),this.loaded=Promise.resolve(),this.previousSrc=null,this.delegate=new h.delegateConstructor(this)}static get observedAttributes(){return["disabled","complete","loading","src"]}connectedCallback(){this.delegate.connect()}disconnectedCallback(){this.delegate.disconnect()}reload(){return this.delegate.sourceURLReloaded()}attributeChangedCallback(e){"loading"==e?this.delegate.loadingStyleChanged():"complete"==e?this.delegate.completeChanged():"src"==e?this.delegate.sourceURLChanged():this.delegate.disabledChanged()}get src(){return this.getAttribute("src")}set src(e){if(e)if(a){let t=a.createScriptURL(e);this.setAttribute("src",t)}else this.setAttribute("src",e);else this.removeAttribute("src")}get loading(){return"lazy"===(this.getAttribute("loading")||"").toLowerCase()?eI.lazy:eI.eager}set loading(e){e?this.setAttribute("loading",e):this.removeAttribute("loading")}get disabled(){return this.hasAttribute("disabled")}set disabled(e){e?this.setAttribute("disabled",""):this.removeAttribute("disabled")}get autoscroll(){return this.hasAttribute("autoscroll")}set autoscroll(e){e?this.setAttribute("autoscroll",""):this.removeAttribute("autoscroll")}get complete(){return!this.delegate.isLoading}get isActive(){return this.ownerDocument===document&&!this.isPreview}get isPreview(){var e,t;return null==(t=null==(e=this.ownerDocument)?void 0:e.documentElement)?void 0:t.hasAttribute("data-turbo-preview")}}function c(e){return new URL(e.toString(),document.baseURI)}function d(e){let t;return e.hash?e.hash.slice(1):(t=e.href.match(/#(.*)$/))?t[1]:void 0}function u(e,t){return c((null==t?void 0:t.getAttribute("formaction"))||e.getAttribute("action")||e.action)}function m(e){let t=d(e);return null!=t?e.href.slice(0,-(t.length+1)):e.href}class p{constructor(e){this.response=e}get succeeded(){return this.response.ok}get failed(){return!this.succeeded}get clientError(){return this.statusCode>=400&&this.statusCode<=499}get serverError(){return this.statusCode>=500&&this.statusCode<=599}get redirected(){return this.response.redirected}get location(){return c(this.response.url)}get isHTML(){return this.contentType&&this.contentType.match(/^(?:text\/([^\s;,]+\b)?html|application\/xhtml\+xml)\b/)}get statusCode(){return this.response.status}get contentType(){return this.header("Content-Type")}get responseText(){return this.response.clone().text()}get responseHTML(){return this.isHTML?this.response.clone().text():Promise.resolve(void 0)}header(e){return this.response.headers.get(e)}}function g(e){return"advance"==e||"replace"==e||"restore"==e}function f(e){if("false"==e.getAttribute("data-turbo-eval"))return e;{let t=document.createElement("script"),i=T("csp-nonce");return i&&(t.nonce=i),null!==e.textContent&&(null!==a?t.textContent=a.createScript(e.textContent):t.textContent=e.textContent),t.async=!1,function(e,t){for(let{name:i,value:s}of t.attributes)if("src"===i&&null!==a){let t=a.createScriptURL(s);e.setAttribute(i,t)}else e.setAttribute(i,s)}(t,e),t}}function v(e,{target:t,cancelable:i,detail:s}={}){let r=new CustomEvent(e,{cancelable:i,bubbles:!0,detail:s});return t&&t.isConnected?t.dispatchEvent(r):document.documentElement.dispatchEvent(r),r}function b(){return new Promise(e=>requestAnimationFrame(()=>e()))}function w(e=""){return new DOMParser().parseFromString(e,"text/html")}function S(e,...t){var i,s;let r=(i=e,s=t,i.reduce((e,t,i)=>e+t+(void 0==s[i]?"":s[i]),"")).replace(/^\n/,"").split("\n"),n=r[0].match(/^\s+/),o=n?n[0].length:0;return r.map(e=>e.slice(o)).join("\n")}function E(){return Array.from({length:36}).map((e,t)=>8==t||13==t||18==t||23==t?"-":14==t?"4":19==t?(Math.floor(4*Math.random())+8).toString(16):Math.floor(15*Math.random()).toString(16)).join("")}function y(e,...t){for(let i of t.map(t=>null==t?void 0:t.getAttribute(e)))if("string"==typeof i)return i;return null}function L(...e){for(let t of e)"turbo-frame"==t.localName&&t.setAttribute("busy",""),t.setAttribute("aria-busy","true")}function R(...e){for(let t of e)"turbo-frame"==t.localName&&t.removeAttribute("busy"),t.removeAttribute("aria-busy")}function A(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}function C(e){return document.querySelector(`meta[name="${e}"]`)}function T(e){let t=C(e);return t&&t.content}(ey=eM||(eM={}))[ey.get=0]="get",ey[ey.post=1]="post",ey[ey.put=2]="put",ey[ey.patch=3]="patch",ey[ey.delete=4]="delete";class P{constructor(e,t,i,s=new URLSearchParams,r=null){this.abortController=new AbortController,this.resolveRequestPromise=e=>{},this.delegate=e,this.method=t,this.headers=this.defaultHeaders,this.body=s,this.url=i,this.target=r}get location(){return this.url}get params(){return this.url.searchParams}get entries(){return this.body?Array.from(this.body.entries()):[]}cancel(){this.abortController.abort()}async perform(){var e,t;let{fetchOptions:i}=this;null==(t=(e=this.delegate).prepareHeadersForRequest)||t.call(e,this.headers,this),await this.allowRequestToBeIntercepted(i);try{this.delegate.requestStarted(this);let e=await fetch(this.url.href,i);return await this.receive(e)}catch(e){if("AbortError"!==e.name)throw this.willDelegateErrorHandling(e)&&this.delegate.requestErrored(this,e),e}finally{this.delegate.requestFinished(this)}}async receive(e){let t=new p(e);return v("turbo:before-fetch-response",{cancelable:!0,detail:{fetchResponse:t},target:this.target}).defaultPrevented?this.delegate.requestPreventedHandlingResponse(this,t):t.succeeded?this.delegate.requestSucceededWithResponse(this,t):this.delegate.requestFailedWithResponse(this,t),t}get fetchOptions(){var e;return{method:eM[this.method].toUpperCase(),credentials:"same-origin",headers:this.headers,redirect:"follow",body:this.isIdempotent?null:this.body,signal:this.abortSignal,referrer:null==(e=this.delegate.referrer)?void 0:e.href}}get defaultHeaders(){return{Accept:"text/html, application/xhtml+xml"}}get isIdempotent(){return this.method==eM.get}get abortSignal(){return this.abortController.signal}acceptResponseType(e){this.headers.Accept=[e,this.headers.Accept].join(", ")}async allowRequestToBeIntercepted(e){let t=new Promise(e=>this.resolveRequestPromise=e);v("turbo:before-fetch-request",{cancelable:!0,detail:{fetchOptions:e,url:this.url,resume:this.resolveRequestPromise},target:this.target}).defaultPrevented&&await t}willDelegateErrorHandling(e){return!v("turbo:fetch-request-error",{target:this.target,cancelable:!0,detail:{request:this,error:e}}).defaultPrevented}}class F{constructor(e,t){this.started=!1,this.intersect=e=>{let t=e.slice(-1)[0];(null==t?void 0:t.isIntersecting)&&this.delegate.elementAppearedInViewport(this.element)},this.delegate=e,this.element=t,this.intersectionObserver=new IntersectionObserver(this.intersect)}start(){this.started||(this.started=!0,this.intersectionObserver.observe(this.element))}stop(){this.started&&(this.started=!1,this.intersectionObserver.unobserve(this.element))}}class k{constructor(e){this.fragment=function(e){for(let t of e.querySelectorAll("turbo-stream")){let e=document.importNode(t,!0);for(let t of e.templateElement.content.querySelectorAll("script"))"application/json"!==t.type&&t.replaceWith(f(t));t.replaceWith(e)}return e}(e)}static wrap(e){let t;if("string"!=typeof e)return e;return new this(((t=document.createElement("template")).innerHTML=e,t.content))}}k.contentType="text/vnd.turbo-stream.html",(eL=eH||(eH={}))[eL.initialized=0]="initialized",eL[eL.requesting=1]="requesting",eL[eL.waiting=2]="waiting",eL[eL.receiving=3]="receiving",eL[eL.stopping=4]="stopping",eL[eL.stopped=5]="stopped",(eR=eq||(eq={})).urlEncoded="application/x-www-form-urlencoded",eR.multipart="multipart/form-data",eR.plain="text/plain";class I{constructor(e,t,i,s=!1){this.state=eH.initialized,this.delegate=e,this.formElement=t,this.submitter=i,this.formData=function(e,t){let i=new FormData(e),s=null==t?void 0:t.getAttribute("name"),r=null==t?void 0:t.getAttribute("value");return s&&i.append(s,r||""),i}(t,i),this.location=c(this.action),this.method==eM.get&&function(e,t){let i=new URLSearchParams;for(let[e,s]of t)s instanceof File||i.append(e,s);e.search=i.toString()}(this.location,[...this.body.entries()]),this.fetchRequest=new P(this,this.method,this.location,this.body,this.formElement),this.mustRedirect=s}static confirmMethod(e,t,i){return Promise.resolve(confirm(e))}get method(){var e;return function(e){switch(e.toLowerCase()){case"get":return eM.get;case"post":return eM.post;case"put":return eM.put;case"patch":return eM.patch;case"delete":return eM.delete}}(((null==(e=this.submitter)?void 0:e.getAttribute("formmethod"))||this.formElement.getAttribute("method")||"").toLowerCase())||eM.get}get action(){var e;let t="string"==typeof this.formElement.action?this.formElement.action:null;return(null==(e=this.submitter)?void 0:e.hasAttribute("formaction"))?this.submitter.getAttribute("formaction")||"":this.formElement.getAttribute("action")||t||""}get body(){return this.enctype==eq.urlEncoded||this.method==eM.get?new URLSearchParams(this.stringFormData):this.formData}get enctype(){var e;switch(((null==(e=this.submitter)?void 0:e.getAttribute("formenctype"))||this.formElement.enctype).toLowerCase()){case eq.multipart:return eq.multipart;case eq.plain:return eq.plain;default:return eq.urlEncoded}}get isIdempotent(){return this.fetchRequest.isIdempotent}get stringFormData(){return[...this.formData].reduce((e,[t,i])=>e.concat("string"==typeof i?[[t,i]]:[]),[])}async start(){let{initialized:e,requesting:t}=eH,i=y("data-turbo-confirm",this.submitter,this.formElement);if(("string"!=typeof i||await I.confirmMethod(i,this.formElement,this.submitter))&&this.state==e)return this.state=t,this.fetchRequest.perform()}stop(){let{stopping:e,stopped:t}=eH;if(this.state!=e&&this.state!=t)return this.state=e,this.fetchRequest.cancel(),!0}prepareHeadersForRequest(e,t){if(!t.isIdempotent){let t=function(e){if(null!=e){let t=(document.cookie?document.cookie.split("; "):[]).find(t=>t.startsWith(e));if(t){let e=t.split("=").slice(1).join("=");return e?decodeURIComponent(e):void 0}}}(T("csrf-param"))||T("csrf-token");t&&(e["X-CSRF-Token"]=t)}this.requestAcceptsTurboStreamResponse(t)&&t.acceptResponseType(k.contentType)}requestStarted(e){var t;this.state=eH.waiting,null==(t=this.submitter)||t.setAttribute("disabled",""),v("turbo:submit-start",{target:this.formElement,detail:{formSubmission:this}}),this.delegate.formSubmissionStarted(this)}requestPreventedHandlingResponse(e,t){this.result={success:t.succeeded,fetchResponse:t}}requestSucceededWithResponse(e,t){if(t.clientError||t.serverError)this.delegate.formSubmissionFailedWithResponse(this,t);else{var i;if(this.requestMustRedirect(e)&&200==(i=t).statusCode&&!i.redirected){let e=Error("Form responses must redirect to another location");this.delegate.formSubmissionErrored(this,e)}else this.state=eH.receiving,this.result={success:!0,fetchResponse:t},this.delegate.formSubmissionSucceededWithResponse(this,t)}}requestFailedWithResponse(e,t){this.result={success:!1,fetchResponse:t},this.delegate.formSubmissionFailedWithResponse(this,t)}requestErrored(e,t){this.result={success:!1,error:t},this.delegate.formSubmissionErrored(this,t)}requestFinished(e){var t;this.state=eH.stopped,null==(t=this.submitter)||t.removeAttribute("disabled"),v("turbo:submit-end",{target:this.formElement,detail:Object.assign({formSubmission:this},this.result)}),this.delegate.formSubmissionFinished(this)}requestMustRedirect(e){return!e.isIdempotent&&this.mustRedirect}requestAcceptsTurboStreamResponse(e){return!e.isIdempotent||function(e,...t){return t.some(t=>t&&t.hasAttribute(e))}("data-turbo-stream",this.submitter,this.formElement)}}class M{constructor(e){this.element=e}get activeElement(){return this.element.ownerDocument.activeElement}get children(){return[...this.element.children]}hasAnchor(e){return null!=this.getElementForAnchor(e)}getElementForAnchor(e){return e?this.element.querySelector(`[id='${e}'], a[name='${e}']`):null}get isConnected(){return this.element.isConnected}get firstAutofocusableElement(){for(let e of this.element.querySelectorAll("[autofocus]"))if(null==e.closest("[inert], :disabled, [hidden], details:not([open]), dialog:not([open])"))return e;else continue;return null}get permanentElements(){return q(this.element)}getPermanentElementById(e){return H(this.element,e)}getPermanentElementMapForSnapshot(e){let t={};for(let i of this.permanentElements){let{id:s}=i,r=e.getPermanentElementById(s);r&&(t[s]=[i,r])}return t}}function H(e,t){return e.querySelector(`#${t}[data-turbo-permanent]`)}function q(e){return e.querySelectorAll("[id][data-turbo-permanent]")}class B{constructor(e,t){this.started=!1,this.submitCaptured=()=>{this.eventTarget.removeEventListener("submit",this.submitBubbled,!1),this.eventTarget.addEventListener("submit",this.submitBubbled,!1)},this.submitBubbled=e=>{if(!e.defaultPrevented){var t,i;let s=e.target instanceof HTMLFormElement?e.target:void 0,r=e.submitter||void 0;s&&(t=s,"dialog"!=((null==(i=r)?void 0:i.getAttribute("formmethod"))||t.getAttribute("method")))&&function(e,t){let i=(null==t?void 0:t.getAttribute("formtarget"))||e.target;for(let e of document.getElementsByName(i))if(e instanceof HTMLIFrameElement)return!1;return!0}(s,r)&&this.delegate.willSubmitForm(s,r)&&(e.preventDefault(),e.stopImmediatePropagation(),this.delegate.formSubmitted(s,r))}},this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("submit",this.submitCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("submit",this.submitCaptured,!0),this.started=!1)}}class O{constructor(e,t){this.resolveRenderPromise=e=>{},this.resolveInterceptionPromise=e=>{},this.delegate=e,this.element=t}scrollToAnchor(e){let t=this.snapshot.getElementForAnchor(e);t?(this.scrollToElement(t),this.focusElement(t)):this.scrollToPosition({x:0,y:0})}scrollToAnchorFromLocation(e){this.scrollToAnchor(d(e))}scrollToElement(e){e.scrollIntoView()}focusElement(e){e instanceof HTMLElement&&(e.hasAttribute("tabindex")?e.focus():(e.setAttribute("tabindex","-1"),e.focus(),e.removeAttribute("tabindex")))}scrollToPosition({x:e,y:t}){this.scrollRoot.scrollTo(e,t)}scrollToTop(){this.scrollToPosition({x:0,y:0})}get scrollRoot(){return window}async render(e){let{isPreview:t,shouldRender:i,newSnapshot:s}=e;if(i)try{this.renderPromise=new Promise(e=>this.resolveRenderPromise=e),this.renderer=e,await this.prepareToRenderSnapshot(e);let i=new Promise(e=>this.resolveInterceptionPromise=e),r={resume:this.resolveInterceptionPromise,render:this.renderer.renderElement};this.delegate.allowsImmediateRender(s,r)||await i,await this.renderSnapshot(e),this.delegate.viewRenderedSnapshot(s,t),this.delegate.preloadOnLoadLinksForView(this.element),this.finishRenderingSnapshot(e)}finally{delete this.renderer,this.resolveRenderPromise(void 0),delete this.renderPromise}else this.invalidate(e.reloadReason)}invalidate(e){this.delegate.viewInvalidated(e)}async prepareToRenderSnapshot(e){this.markAsPreview(e.isPreview),await e.prepareToRender()}markAsPreview(e){e?this.element.setAttribute("data-turbo-preview",""):this.element.removeAttribute("data-turbo-preview")}async renderSnapshot(e){await e.render()}finishRenderingSnapshot(e){e.finishRendering()}}class V extends O{invalidate(){this.element.textContent=""}get snapshot(){return new M(this.element)}}class N{constructor(e,t){this.clickBubbled=e=>{this.respondsToEventTarget(e.target)?this.clickEvent=e:delete this.clickEvent},this.linkClicked=e=>{this.clickEvent&&this.respondsToEventTarget(e.target)&&e.target instanceof Element&&this.delegate.shouldInterceptLinkClick(e.target,e.detail.url,e.detail.originalEvent)&&(this.clickEvent.preventDefault(),e.preventDefault(),this.delegate.linkClickIntercepted(e.target,e.detail.url,e.detail.originalEvent)),delete this.clickEvent},this.willVisit=e=>{delete this.clickEvent},this.delegate=e,this.element=t}start(){this.element.addEventListener("click",this.clickBubbled),document.addEventListener("turbo:click",this.linkClicked),document.addEventListener("turbo:before-visit",this.willVisit)}stop(){this.element.removeEventListener("click",this.clickBubbled),document.removeEventListener("turbo:click",this.linkClicked),document.removeEventListener("turbo:before-visit",this.willVisit)}respondsToEventTarget(e){let t=e instanceof Element?e:e instanceof Node?e.parentElement:null;return t&&t.closest("turbo-frame, html")==this.element}}class D{constructor(e,t){this.started=!1,this.clickCaptured=()=>{this.eventTarget.removeEventListener("click",this.clickBubbled,!1),this.eventTarget.addEventListener("click",this.clickBubbled,!1)},this.clickBubbled=e=>{if(e instanceof MouseEvent&&this.clickEventIsSignificant(e)){let t=e.composedPath&&e.composedPath()[0]||e.target,i=this.findLinkFromClickTarget(t);if(i&&function(e){for(let t of document.getElementsByName(e.target))if(t instanceof HTMLIFrameElement)return!1;return!0}(i)){let t=this.getLocationForLink(i);this.delegate.willFollowLinkToLocation(i,t,e)&&(e.preventDefault(),this.delegate.followedLinkToLocation(i,t))}}},this.delegate=e,this.eventTarget=t}start(){this.started||(this.eventTarget.addEventListener("click",this.clickCaptured,!0),this.started=!0)}stop(){this.started&&(this.eventTarget.removeEventListener("click",this.clickCaptured,!0),this.started=!1)}clickEventIsSignificant(e){return!(e.target&&e.target.isContentEditable||e.defaultPrevented||e.which>1||e.altKey||e.ctrlKey||e.metaKey||e.shiftKey)}findLinkFromClickTarget(e){if(e instanceof Element)return e.closest("a[href]:not([target^=_]):not([download])")}getLocationForLink(e){return c(e.getAttribute("href")||"")}}class W{constructor(e,t){this.delegate=e,this.linkInterceptor=new D(this,t)}start(){this.linkInterceptor.start()}stop(){this.linkInterceptor.stop()}willFollowLinkToLocation(e,t,i){return this.delegate.willSubmitFormLinkToLocation(e,t,i)&&e.hasAttribute("data-turbo-method")}followedLinkToLocation(e,t){let i=t.href,s=document.createElement("form");s.setAttribute("data-turbo","true"),s.setAttribute("action",i),s.setAttribute("hidden","");let r=e.getAttribute("data-turbo-method");r&&s.setAttribute("method",r);let n=e.getAttribute("data-turbo-frame");n&&s.setAttribute("data-turbo-frame",n);let o=e.getAttribute("data-turbo-action");o&&s.setAttribute("data-turbo-action",o);let a=e.getAttribute("data-turbo-confirm");a&&s.setAttribute("data-turbo-confirm",a),e.hasAttribute("data-turbo-stream")&&s.setAttribute("data-turbo-stream",""),this.delegate.submittedFormLinkToLocation(e,t,s),document.body.appendChild(s),s.addEventListener("turbo:submit-end",()=>s.remove(),{once:!0}),requestAnimationFrame(()=>s.requestSubmit())}}class x{constructor(e,t){this.delegate=e,this.permanentElementMap=t}static async preservingPermanentElements(e,t,i){let s=new this(e,t);s.enter(),await i(),s.leave()}enter(){for(let e in this.permanentElementMap){let[t,i]=this.permanentElementMap[e];this.delegate.enteringBardo(t,i),this.replaceNewPermanentElementWithPlaceholder(i)}}leave(){for(let e in this.permanentElementMap){let[t]=this.permanentElementMap[e];this.replaceCurrentPermanentElementWithClone(t),this.replacePlaceholderWithPermanentElement(t),this.delegate.leavingBardo(t)}}replaceNewPermanentElementWithPlaceholder(e){var t;let i,s=(t=e,(i=document.createElement("meta")).setAttribute("name","turbo-permanent-placeholder"),i.setAttribute("content",t.id),i);e.replaceWith(s)}replaceCurrentPermanentElementWithClone(e){let t=e.cloneNode(!0);e.replaceWith(t)}replacePlaceholderWithPermanentElement(e){let t=this.getPlaceholderById(e.id);null==t||t.replaceWith(e)}getPlaceholderById(e){return this.placeholders.find(t=>t.content==e)}get placeholders(){return[...document.querySelectorAll("meta[name=turbo-permanent-placeholder][content]")]}}class U{constructor(e,t,i,s,r=!0){this.activeElement=null,this.currentSnapshot=e,this.newSnapshot=t,this.isPreview=s,this.willRender=r,this.renderElement=i,this.promise=new Promise((e,t)=>this.resolvingFunctions={resolve:e,reject:t})}get shouldRender(){return!0}get reloadReason(){}prepareToRender(){}finishRendering(){this.resolvingFunctions&&(this.resolvingFunctions.resolve(),delete this.resolvingFunctions)}async preservingPermanentElements(e){await x.preservingPermanentElements(this,this.permanentElementMap,e)}focusFirstAutofocusableElement(){var e;let t=this.connectedSnapshot.firstAutofocusableElement;(e=t)&&"function"==typeof e.focus&&t.focus()}enteringBardo(e){!this.activeElement&&e.contains(this.currentSnapshot.activeElement)&&(this.activeElement=this.currentSnapshot.activeElement)}leavingBardo(e){e.contains(this.activeElement)&&this.activeElement instanceof HTMLElement&&(this.activeElement.focus(),this.activeElement=null)}get connectedSnapshot(){return this.newSnapshot.isConnected?this.newSnapshot:this.currentSnapshot}get currentElement(){return this.currentSnapshot.element}get newElement(){return this.newSnapshot.element}get permanentElementMap(){return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot)}}class _ extends U{constructor(e,t,i,s,r,n=!0){super(t,i,s,r,n),this.delegate=e}static renderElement(e,t){var i;let s=document.createRange();s.selectNodeContents(e),s.deleteContents();let r=null==(i=t.ownerDocument)?void 0:i.createRange();r&&(r.selectNodeContents(t),e.appendChild(r.extractContents()))}get shouldRender(){return!0}async render(){await b(),this.preservingPermanentElements(()=>{this.loadFrameElement()}),this.scrollFrameIntoView(),await b(),this.focusFirstAutofocusableElement(),await b(),this.activateScriptElements(),this.activateImageElements()}loadFrameElement(){this.delegate.willRenderFrame(this.currentElement,this.newElement),this.renderElement(this.currentElement,this.newElement)}scrollFrameIntoView(){if(this.currentElement.autoscroll||this.newElement.autoscroll){var e,t;let i=this.currentElement.firstElementChild,s="end"==(e=this.currentElement.getAttribute("data-autoscroll-block"))||"start"==e||"center"==e||"nearest"==e?e:"end",r="auto"==(t=this.currentElement.getAttribute("data-autoscroll-behavior"))||"smooth"==t?t:"auto";if(i)return i.scrollIntoView({block:s,behavior:r}),!0}return!1}activateScriptElements(){for(let e of this.newScriptElements){if("application/json"===e.type)continue;let t=f(e);e.replaceWith(t)}}activateImageElements(){for(let e of this.imageElements){let t=function(e){if("false"==e.getAttribute("data-turbo-eval"))return e;{let t=document.createElement("img");return function(e,t){for(let{name:i,value:s}of t.attributes)e.setAttribute(i,s)}(t,e),t}}(e);e.replaceWith(t)}}get newScriptElements(){return this.currentElement.querySelectorAll("script")}get imageElements(){return this.currentElement.querySelectorAll("img")}}class j{constructor(){this.hiding=!1,this.value=0,this.visible=!1,this.trickle=()=>{this.setValue(this.value+Math.random()/100)},this.stylesheetElement=this.createStylesheetElement(),this.progressElement=this.createProgressElement(),this.installStylesheetElement(),this.setValue(0)}static get defaultCSS(){return S` + .turbo-progress-bar { + position: fixed; + display: block; + top: 0; + left: 0; + height: 3px; + background: #0076ff; + z-index: 2147483647; + transition: + width ${j.animationDuration}ms ease-out, + opacity ${j.animationDuration/2}ms ${j.animationDuration/2}ms ease-in; + transform: translate3d(0, 0, 0); + } + `}show(){this.visible||(this.visible=!0,this.installProgressElement(),this.startTrickling())}hide(){this.visible&&!this.hiding&&(this.hiding=!0,this.fadeProgressElement(()=>{this.uninstallProgressElement(),this.stopTrickling(),this.visible=!1,this.hiding=!1}))}setValue(e){this.value=e,this.refresh()}installStylesheetElement(){document.head.insertBefore(this.stylesheetElement,document.head.firstChild)}installProgressElement(){this.progressElement.style.width="0",this.progressElement.style.opacity="1",document.documentElement.insertBefore(this.progressElement,document.body),this.refresh()}fadeProgressElement(e){this.progressElement.style.opacity="0",setTimeout(e,1.5*j.animationDuration)}uninstallProgressElement(){this.progressElement.parentNode&&document.documentElement.removeChild(this.progressElement)}startTrickling(){this.trickleInterval||(this.trickleInterval=window.setInterval(this.trickle,j.animationDuration))}stopTrickling(){window.clearInterval(this.trickleInterval),delete this.trickleInterval}refresh(){requestAnimationFrame(()=>{this.progressElement.style.width=`${10+90*this.value}%`})}createStylesheetElement(){let e=document.createElement("style");return e.type="text/css",e.textContent=j.defaultCSS,this.cspNonce&&(e.nonce=this.cspNonce),e}createProgressElement(){let e=document.createElement("div");return e.className="turbo-progress-bar",e}get cspNonce(){return T("csp-nonce")}}j.animationDuration=300;class $ extends M{constructor(){super(...arguments),this.detailsByOuterHTML=this.children.filter(e=>"noscript"!=e.localName).map(e=>{var t;return(t=e).hasAttribute("nonce")&&t.setAttribute("nonce",""),t}).reduce((e,t)=>{var i,s;let r,{outerHTML:n}=t,o=n in e?e[n]:{type:"script"==(i=t).localName?"script":"style"==(r=(s=i).localName)||"link"==r&&"stylesheet"==s.getAttribute("rel")?"stylesheet":void 0,tracked:"reload"==t.getAttribute("data-turbo-track"),elements:[]};return Object.assign(Object.assign({},e),{[n]:Object.assign(Object.assign({},o),{elements:[...o.elements,t]})})},{})}get trackedElementSignature(){return Object.keys(this.detailsByOuterHTML).filter(e=>this.detailsByOuterHTML[e].tracked).join("")}getScriptElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("script",e)}getStylesheetElementsNotInSnapshot(e){return this.getElementsMatchingTypeNotInSnapshot("stylesheet",e)}getElementsMatchingTypeNotInSnapshot(e,t){return Object.keys(this.detailsByOuterHTML).filter(e=>!(e in t.detailsByOuterHTML)).map(e=>this.detailsByOuterHTML[e]).filter(({type:t})=>t==e).map(({elements:[e]})=>e)}get provisionalElements(){return Object.keys(this.detailsByOuterHTML).reduce((e,t)=>{let{type:i,tracked:s,elements:r}=this.detailsByOuterHTML[t];return null!=i||s?r.length>1?[...e,...r.slice(1)]:e:[...e,...r]},[])}getMetaValue(e){let t=this.findMetaElementByName(e);return t?t.getAttribute("content"):null}findMetaElementByName(e){return Object.keys(this.detailsByOuterHTML).reduce((t,i)=>{var s,r;let{elements:[n]}=this.detailsByOuterHTML[i];return(s=n,r=e,"meta"==s.localName&&s.getAttribute("name")==r)?n:t},void 0)}}class z extends M{constructor(e,t){super(e),this.headSnapshot=t}static fromResponse(e,t=l){if(!e||null==a)return this.fromHTMLString(t);let i=a.createHTML(t,e);return this.fromHTMLString(i)}static fromHTMLString(e=l){return this.fromDocument(w(e))}static fromElement(e){return this.fromDocument(e.ownerDocument)}static fromDocument({head:e,body:t}){return new this(t,new $(e))}clone(){let e=this.element.cloneNode(!0),t=this.element.querySelectorAll("select"),i=e.querySelectorAll("select");for(let[e,s]of t.entries()){let t=i[e];for(let e of t.selectedOptions)e.selected=!1;for(let e of s.selectedOptions)t.options[e.index].selected=!0}for(let t of e.querySelectorAll('input[type="password"]'))t.value="";return new z(e,this.headSnapshot)}get headElement(){return this.headSnapshot.element}get rootLocation(){var e;return c(null!=(e=this.getSetting("root"))?e:"/")}get cacheControlValue(){return this.getSetting("cache-control")}get isPreviewable(){return"no-preview"!=this.cacheControlValue}get isCacheable(){return"no-cache"!=this.cacheControlValue}get isVisitable(){return"reload"!=this.getSetting("visit-control")}getSetting(e){return this.headSnapshot.getMetaValue(`turbo-${e}`)}}(eA=eB||(eB={})).visitStart="visitStart",eA.requestStart="requestStart",eA.requestEnd="requestEnd",eA.visitEnd="visitEnd",(eC=eO||(eO={})).initialized="initialized",eC.started="started",eC.canceled="canceled",eC.failed="failed",eC.completed="completed";let K={action:"advance",historyChanged:!1,visitCachedSnapshot:()=>{},willRender:!0,updateHistory:!0,shouldCacheSnapshot:!0,acceptsStreamResponse:!1};(eT=eV||(eV={}))[eT.networkFailure=0]="networkFailure",eT[eT.timeoutFailure=-1]="timeoutFailure",eT[eT.contentTypeMismatch=-2]="contentTypeMismatch";class Y{constructor(e,t,i,s={}){this.identifier=E(),this.timingMetrics={},this.followedRedirect=!1,this.historyChanged=!1,this.scrolled=!1,this.shouldCacheSnapshot=!0,this.acceptsStreamResponse=!1,this.snapshotCached=!1,this.state=eO.initialized,this.delegate=e,this.location=t,this.restorationIdentifier=i||E();const{action:r,historyChanged:n,referrer:o,snapshot:a,snapshotHTML:l,response:h,visitCachedSnapshot:c,willRender:d,updateHistory:u,shouldCacheSnapshot:m,acceptsStreamResponse:p}=Object.assign(Object.assign({},K),s);this.action=r,this.historyChanged=n,this.referrer=o,this.snapshot=a,this.snapshotHTML=l,this.response=h,this.isSamePage=this.delegate.locationWithActionIsSamePage(this.location,this.action),this.visitCachedSnapshot=c,this.willRender=d,this.updateHistory=u,this.scrolled=!d,this.shouldCacheSnapshot=m,this.acceptsStreamResponse=p}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}get restorationData(){return this.history.getRestorationDataForIdentifier(this.restorationIdentifier)}get silent(){return this.isSamePage}start(){this.state==eO.initialized&&(this.recordTimingMetric(eB.visitStart),this.state=eO.started,this.adapter.visitStarted(this),this.delegate.visitStarted(this))}cancel(){this.state==eO.started&&(this.request&&this.request.cancel(),this.cancelRender(),this.state=eO.canceled)}complete(){this.state==eO.started&&(this.recordTimingMetric(eB.visitEnd),this.state=eO.completed,this.followRedirect(),this.followedRedirect||(this.adapter.visitCompleted(this),this.delegate.visitCompleted(this)))}fail(){this.state==eO.started&&(this.state=eO.failed,this.adapter.visitFailed(this))}changeHistory(){var e;if(!this.historyChanged&&this.updateHistory){let t=A(this.location.href===(null==(e=this.referrer)?void 0:e.href)?"replace":this.action);this.history.update(t,this.location,this.restorationIdentifier),this.historyChanged=!0}}issueRequest(){this.hasPreloadedResponse()?this.simulateRequest():this.shouldIssueRequest()&&!this.request&&(this.request=new P(this,eM.get,this.location),this.request.perform())}simulateRequest(){this.response&&(this.startRequest(),this.recordResponse(),this.finishRequest())}startRequest(){this.recordTimingMetric(eB.requestStart),this.adapter.visitRequestStarted(this)}recordResponse(e=this.response){if(this.response=e,e){let{statusCode:t}=e;Q(t)?this.adapter.visitRequestCompleted(this):this.adapter.visitRequestFailedWithStatusCode(this,t)}}finishRequest(){this.recordTimingMetric(eB.requestEnd),this.adapter.visitRequestFinished(this)}loadResponse(){if(this.response){let{statusCode:e,response:t,responseHTML:i}=this.response;this.render(async()=>{this.shouldCacheSnapshot&&this.cacheSnapshot(),this.view.renderPromise&&await this.view.renderPromise,Q(e)&&null!=i?(await this.view.renderPage(z.fromResponse(t,i),!1,this.willRender,this),this.performScroll(),this.adapter.visitRendered(this),this.complete()):(await this.view.renderError(z.fromResponse(t,i),this),this.adapter.visitRendered(this),this.fail())})}}getCachedSnapshot(){let e=this.view.getCachedSnapshotForLocation(this.location)||this.getPreloadedSnapshot();if(e&&(!d(this.location)||e.hasAnchor(d(this.location)))&&("restore"==this.action||e.isPreviewable))return e}getPreloadedSnapshot(){if(this.snapshotHTML)return z.fromHTMLString(this.snapshotHTML)}hasCachedSnapshot(){return null!=this.getCachedSnapshot()}loadCachedSnapshot(){let e=this.getCachedSnapshot();if(e){let t=this.shouldIssueRequest();this.render(async()=>{this.cacheSnapshot(),this.isSamePage?this.adapter.visitRendered(this):(this.view.renderPromise&&await this.view.renderPromise,await this.view.renderPage(e,t,this.willRender,this),this.performScroll(),this.adapter.visitRendered(this),t||this.complete())})}}followRedirect(){var e;this.redirectedToLocation&&!this.followedRedirect&&(null==(e=this.response)?void 0:e.redirected)&&(this.adapter.visitProposedToLocation(this.redirectedToLocation,{action:"replace",response:this.response}),this.followedRedirect=!0)}goToSamePageAnchor(){this.isSamePage&&this.render(async()=>{this.cacheSnapshot(),this.performScroll(),this.changeHistory(),this.adapter.visitRendered(this)})}prepareHeadersForRequest(e,t){this.acceptsStreamResponse&&t.acceptResponseType(k.contentType)}requestStarted(){this.startRequest()}requestPreventedHandlingResponse(e,t){}async requestSucceededWithResponse(e,t){let i=await t.responseHTML,{redirected:s,statusCode:r,response:n}=t;void 0==i?this.recordResponse({statusCode:eV.contentTypeMismatch,redirected:s}):(this.redirectedToLocation=t.redirected?t.location:void 0,this.redirectedToLocation&&""===t.location.hash&&(this.redirectedToLocation.hash=e.url.hash),this.recordResponse({statusCode:r,redirected:s,response:n,responseHTML:i}))}async requestFailedWithResponse(e,t){let i=await t.responseHTML,{redirected:s,statusCode:r,response:n}=t;void 0==i?this.recordResponse({statusCode:eV.contentTypeMismatch,redirected:s}):this.recordResponse({statusCode:r,redirected:s,response:n,responseHTML:i})}requestErrored(e,t){this.recordResponse({statusCode:eV.networkFailure,redirected:!1})}requestFinished(){this.finishRequest()}performScroll(){this.scrolled||this.view.forceReloaded||("restore"==this.action?this.scrollToRestoredPosition()||this.scrollToAnchor()||this.view.scrollToTop():this.scrollToAnchor()||this.view.scrollToTop(),this.isSamePage&&this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation,this.location),this.scrolled=!0)}scrollToRestoredPosition(){let{scrollPosition:e}=this.restorationData;if(e)return this.view.scrollToPosition(e),!0}scrollToAnchor(){let e=d(this.location);if(null!=e)return this.view.scrollToAnchor(e),!0}recordTimingMetric(e){this.timingMetrics[e]=new Date().getTime()}getTimingMetrics(){return Object.assign({},this.timingMetrics)}getHistoryMethodForAction(e){switch(e){case"replace":return history.replaceState;case"advance":case"restore":return history.pushState}}hasPreloadedResponse(){return"object"==typeof this.response}shouldIssueRequest(){return!this.isSamePage&&("restore"==this.action?!this.hasCachedSnapshot():this.willRender)}cacheSnapshot(){this.snapshotCached||(this.view.cacheSnapshot(this.snapshot).then(e=>e&&this.visitCachedSnapshot(e)),this.snapshotCached=!0)}async render(e){this.cancelRender(),await new Promise(e=>{this.frame=requestAnimationFrame(()=>e())}),await e(),delete this.frame}cancelRender(){this.frame&&(cancelAnimationFrame(this.frame),delete this.frame)}}function Q(e){return e>=200&&e<300}class X{constructor(e){this.progressBar=new j,this.showProgressBar=()=>{this.progressBar.show()},this.session=e}visitProposedToLocation(e,t){this.navigator.startVisit(e,(null==t?void 0:t.restorationIdentifier)||E(),t)}visitStarted(e){this.location=e.location,e.loadCachedSnapshot(),e.issueRequest(),e.goToSamePageAnchor()}visitRequestStarted(e){this.progressBar.setValue(0),e.hasCachedSnapshot()||"restore"!=e.action?this.showVisitProgressBarAfterDelay():this.showProgressBar()}visitRequestCompleted(e){e.loadResponse()}visitRequestFailedWithStatusCode(e,t){switch(t){case eV.networkFailure:case eV.timeoutFailure:case eV.contentTypeMismatch:return this.reload({reason:"request_failed",context:{statusCode:t}});default:return e.loadResponse()}}visitRequestFinished(e){this.progressBar.setValue(1),this.hideVisitProgressBar()}visitCompleted(e){}pageInvalidated(e){this.reload(e)}visitFailed(e){}visitRendered(e){}formSubmissionStarted(e){this.progressBar.setValue(0),this.showFormProgressBarAfterDelay()}formSubmissionFinished(e){this.progressBar.setValue(1),this.hideFormProgressBar()}showVisitProgressBarAfterDelay(){this.visitProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay)}hideVisitProgressBar(){this.progressBar.hide(),null!=this.visitProgressBarTimeout&&(window.clearTimeout(this.visitProgressBarTimeout),delete this.visitProgressBarTimeout)}showFormProgressBarAfterDelay(){null==this.formProgressBarTimeout&&(this.formProgressBarTimeout=window.setTimeout(this.showProgressBar,this.session.progressBarDelay))}hideFormProgressBar(){this.progressBar.hide(),null!=this.formProgressBarTimeout&&(window.clearTimeout(this.formProgressBarTimeout),delete this.formProgressBarTimeout)}reload(e){var t;v("turbo:reload",{detail:e}),window.location.href=(null==(t=this.location)?void 0:t.toString())||window.location.href}get navigator(){return this.session.navigator}}class J{constructor(){this.started=!1,this.removeStaleElements=e=>{for(let e of[...document.querySelectorAll('[data-turbo-cache="false"]')])e.remove()}}start(){this.started||(this.started=!0,addEventListener("turbo:before-cache",this.removeStaleElements,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-cache",this.removeStaleElements,!1))}}class G{constructor(e,t){this.session=e,this.element=t,this.linkInterceptor=new N(this,t),this.formSubmitObserver=new B(this,t)}start(){this.linkInterceptor.start(),this.formSubmitObserver.start()}stop(){this.linkInterceptor.stop(),this.formSubmitObserver.stop()}shouldInterceptLinkClick(e,t,i){return this.shouldRedirect(e)&&this.frameAllowsVisitingLocation(e,c(t),i)}linkClickIntercepted(e,t,i){let s=this.findFrameElement(e);s&&s.delegate.linkClickIntercepted(e,t,i)}willSubmitForm(e,t){return null==e.closest("turbo-frame")&&this.shouldSubmit(e,t)&&this.shouldRedirect(e,t)}formSubmitted(e,t){let i=this.findFrameElement(e,t);i&&i.delegate.formSubmitted(e,t)}frameAllowsVisitingLocation(e,{href:t},i){return!v("turbo:frame-click",{target:e,detail:{url:t,originalEvent:i},cancelable:!0}).defaultPrevented}shouldSubmit(e,t){var i;let s=u(e,t),r=this.element.ownerDocument.querySelector('meta[name="turbo-root"]'),n=c(null!=(i=null==r?void 0:r.content)?i:"/");return this.shouldRedirect(e,t)&&this.session.locationIsVisitable(s,n)}shouldRedirect(e,t){if(!(e instanceof HTMLFormElement?this.session.submissionIsNavigatable(e,t):this.session.elementIsNavigatable(e)))return!1;{let i=this.findFrameElement(e,t);return!!i&&i!=e.closest("turbo-frame")}}findFrameElement(e,t){let i=(null==t?void 0:t.getAttribute("data-turbo-frame"))||e.getAttribute("data-turbo-frame");if(i&&"_top"!=i){let e=this.element.querySelector(`#${i}:not([disabled])`);if(e instanceof h)return e}}}class Z{constructor(e){this.restorationIdentifier=E(),this.restorationData={},this.started=!1,this.pageLoaded=!1,this.shouldRestore=()=>!0,this.onPopState=e=>{if(this.shouldHandlePopState()){let{turbo:t}=e.state||{};if(this.shouldRestore(e.state)&&t){this.location=new URL(window.location.href);let{restorationIdentifier:e}=t;this.restorationIdentifier=e,this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location,e)}}},this.onPageLoad=async e=>{await Promise.resolve(),this.pageLoaded=!0},this.delegate=e}start(){this.started||(addEventListener("popstate",this.onPopState,!1),addEventListener("load",this.onPageLoad,!1),this.started=!0,this.replace(new URL(window.location.href)))}stop(){this.started&&(removeEventListener("popstate",this.onPopState,!1),removeEventListener("load",this.onPageLoad,!1),this.started=!1)}push(e,t){this.update(history.pushState,e,t)}replace(e,t){this.update(history.replaceState,e,t)}update(e,t,i=E()){e.call(history,{turbo:{restorationIdentifier:i}},"",t.href),this.location=t,this.restorationIdentifier=i}getRestorationDataForIdentifier(e){return this.restorationData[e]||{}}updateRestorationData(e){let{restorationIdentifier:t}=this,i=this.restorationData[t];this.restorationData[t]=Object.assign(Object.assign({},i),e)}assumeControlOfScrollRestoration(){var e;this.previousScrollRestoration||(this.previousScrollRestoration=null!=(e=history.scrollRestoration)?e:"auto",history.scrollRestoration="manual")}relinquishControlOfScrollRestoration(){this.previousScrollRestoration&&(history.scrollRestoration=this.previousScrollRestoration,delete this.previousScrollRestoration)}shouldHandlePopState(){return this.pageIsLoaded()}pageIsLoaded(){return this.pageLoaded||"complete"==document.readyState}}class ee{constructor(e){this.delegate=e}proposeVisit(e,t={}){this.delegate.allowsVisitingLocationWithAction(e,t.action)&&(this.delegate.locationIsVisitable(e,this.view.snapshot.rootLocation)?this.delegate.visitProposedToLocation(e,t):window.location.href=e.toString())}startVisit(e,t,i={}){this.stop(),this.currentVisit=new Y(this,c(e),t,Object.assign({referrer:this.location},i)),this.currentVisit.start()}submitForm(e,t){this.stop(),this.formSubmission=new I(this,e,t,!0),this.formSubmission.start()}stop(){this.formSubmission&&(this.formSubmission.stop(),delete this.formSubmission),this.currentVisit&&(this.currentVisit.cancel(),delete this.currentVisit)}get adapter(){return this.delegate.adapter}get view(){return this.delegate.view}get history(){return this.delegate.history}formSubmissionStarted(e){"function"==typeof this.adapter.formSubmissionStarted&&this.adapter.formSubmissionStarted(e)}async formSubmissionSucceededWithResponse(e,t){if(e==this.formSubmission){let i=await t.responseHTML;if(i){let s=e.method==eM.get;s||this.view.clearSnapshotCache();let{statusCode:r,redirected:n,response:o}=t,a=this.getActionForFormSubmission(e),l=t.location;n&&""===t.location.hash&&(l.hash=e.fetchRequest.location.hash),this.proposeVisit(l,{action:a,shouldCacheSnapshot:s,response:{statusCode:r,redirected:n,response:o,responseHTML:i}})}}}async formSubmissionFailedWithResponse(e,t){let i=await t.responseHTML;if(i){let e=z.fromResponse(t.response,i);t.serverError?await this.view.renderError(e,this.currentVisit):await this.view.renderPage(e,!1,!0,this.currentVisit),this.view.scrollToTop(),this.view.clearSnapshotCache()}}formSubmissionErrored(e,t){console.error(t)}formSubmissionFinished(e){"function"==typeof this.adapter.formSubmissionFinished&&this.adapter.formSubmissionFinished(e)}visitStarted(e){this.delegate.visitStarted(e)}visitCompleted(e){this.delegate.visitCompleted(e)}locationWithActionIsSamePage(e,t){let i=d(e),s=d(this.view.lastRenderedLocation);return"replace"!==t&&m(e)===m(this.view.lastRenderedLocation)&&("restore"===t&&void 0===i||null!=i&&i!==s)}visitScrolledToSamePageLocation(e,t){this.delegate.visitScrolledToSamePageLocation(e,t)}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}getActionForFormSubmission(e){let{formElement:t,submitter:i}=e,s=y("data-turbo-action",i,t);return g(s)?s:"advance"}}(eP=eN||(eN={}))[eP.initial=0]="initial",eP[eP.loading=1]="loading",eP[eP.interactive=2]="interactive",eP[eP.complete=3]="complete";class et{constructor(e){this.stage=eN.initial,this.started=!1,this.interpretReadyState=()=>{let{readyState:e}=this;"interactive"==e?this.pageIsInteractive():"complete"==e&&this.pageIsComplete()},this.pageWillUnload=()=>{this.delegate.pageWillUnload()},this.delegate=e}start(){this.started||(this.stage==eN.initial&&(this.stage=eN.loading),document.addEventListener("readystatechange",this.interpretReadyState,!1),addEventListener("pagehide",this.pageWillUnload,!1),this.started=!0)}stop(){this.started&&(document.removeEventListener("readystatechange",this.interpretReadyState,!1),removeEventListener("pagehide",this.pageWillUnload,!1),this.started=!1)}pageIsInteractive(){this.stage==eN.loading&&(this.stage=eN.interactive,this.delegate.pageBecameInteractive())}pageIsComplete(){this.pageIsInteractive(),this.stage==eN.interactive&&(this.stage=eN.complete,this.delegate.pageLoaded())}get readyState(){return document.readyState}}class ei{constructor(e){this.started=!1,this.onScroll=()=>{this.updatePosition({x:window.pageXOffset,y:window.pageYOffset})},this.delegate=e}start(){this.started||(addEventListener("scroll",this.onScroll,!1),this.onScroll(),this.started=!0)}stop(){this.started&&(removeEventListener("scroll",this.onScroll,!1),this.started=!1)}updatePosition(e){this.delegate.scrollPositionChanged(e)}}class es{render({fragment:e}){x.preservingPermanentElements(this,function(e){let t=q(document.documentElement),i={};for(let s of t){let{id:t}=s;for(let r of e.querySelectorAll("turbo-stream")){let e=H(r.templateElement.content,t);e&&(i[t]=[s,e])}}return i}(e),()=>document.documentElement.appendChild(e))}enteringBardo(e,t){t.replaceWith(e.cloneNode(!0))}leavingBardo(){}}class er{constructor(e){this.sources=new Set,this.started=!1,this.inspectFetchResponse=e=>{var t;let i=function(e){var t;let i=null==(t=e.detail)?void 0:t.fetchResponse;if(i instanceof p)return i}(e);i&&(null!=(t=i.contentType)?t:"").startsWith(k.contentType)&&(e.preventDefault(),this.receiveMessageResponse(i))},this.receiveMessageEvent=e=>{this.started&&"string"==typeof e.data&&this.receiveMessageHTML(e.data)},this.delegate=e}start(){this.started||(this.started=!0,addEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}stop(){this.started&&(this.started=!1,removeEventListener("turbo:before-fetch-response",this.inspectFetchResponse,!1))}connectStreamSource(e){this.streamSourceIsConnected(e)||(this.sources.add(e),e.addEventListener("message",this.receiveMessageEvent,!1))}disconnectStreamSource(e){this.streamSourceIsConnected(e)&&(this.sources.delete(e),e.removeEventListener("message",this.receiveMessageEvent,!1))}streamSourceIsConnected(e){return this.sources.has(e)}async receiveMessageResponse(e){let t=await e.responseHTML;t&&this.receiveMessageHTML(t)}receiveMessageHTML(e){this.delegate.receivedMessageFromStream(k.wrap(e))}}class en extends U{static renderElement(e,t){let{documentElement:i,body:s}=document;i.replaceChild(t,s)}async render(){this.replaceHeadAndBody(),this.activateScriptElements()}replaceHeadAndBody(){let{documentElement:e,head:t}=document;e.replaceChild(this.newHead,t),this.renderElement(this.currentElement,this.newElement)}activateScriptElements(){for(let e of this.scriptElements){if("application/json"===e.type)continue;let t=e.parentNode;if(t){let i=f(e);t.replaceChild(i,e)}}}get newHead(){return this.newSnapshot.headSnapshot.element}get scriptElements(){return document.documentElement.querySelectorAll("script")}}class eo extends U{static renderElement(e,t){document.body&&t instanceof HTMLBodyElement?document.body.replaceWith(t):document.documentElement.appendChild(t)}get shouldRender(){return this.newSnapshot.isVisitable&&this.trackedElementsAreIdentical}get reloadReason(){return this.newSnapshot.isVisitable?this.trackedElementsAreIdentical?void 0:{reason:"tracked_element_mismatch"}:{reason:"turbo_visit_control_is_reload"}}async prepareToRender(){await this.mergeHead()}async render(){this.willRender&&await this.replaceBody()}finishRendering(){super.finishRendering(),this.isPreview||this.focusFirstAutofocusableElement()}get currentHeadSnapshot(){return this.currentSnapshot.headSnapshot}get newHeadSnapshot(){return this.newSnapshot.headSnapshot}get newElement(){return this.newSnapshot.element}async mergeHead(){let e=this.copyNewHeadStylesheetElements();this.copyNewHeadScriptElements(),this.removeCurrentHeadProvisionalElements(),this.copyNewHeadProvisionalElements(),await e}async replaceBody(){await this.preservingPermanentElements(async()=>{this.activateNewBody(),await this.assignNewBody()})}get trackedElementsAreIdentical(){return this.currentHeadSnapshot.trackedElementSignature==this.newHeadSnapshot.trackedElementSignature}async copyNewHeadStylesheetElements(){let e=[];for(let t of this.newHeadStylesheetElements)e.push(function(e,t=2e3){return new Promise(i=>{let s=()=>{e.removeEventListener("error",s),e.removeEventListener("load",s),i()};e.addEventListener("load",s,{once:!0}),e.addEventListener("error",s,{once:!0}),setTimeout(i,t)})}(t)),document.head.appendChild(t);await Promise.all(e)}copyNewHeadScriptElements(){for(let e of this.newHeadScriptElements)document.head.appendChild(f(e))}removeCurrentHeadProvisionalElements(){for(let e of this.currentHeadProvisionalElements)!function(e){for(let t in e)if("_"===t[0]&&"_"===t[1]){for(let e of ej)if(t.startsWith(e))return!0}return!1}(e)&&document.head.removeChild(e)}copyNewHeadProvisionalElements(){for(let e of this.newHeadProvisionalElements)document.head.appendChild(e)}activateNewBody(){document.adoptNode(this.newElement),this.activateNewBodyScriptElements()}activateNewBodyScriptElements(){for(let e of this.newBodyScriptElements){if("application/json"===e.type)continue;let t=f(e);e.replaceWith(t)}}async assignNewBody(){await this.renderElement(this.currentElement,this.newElement)}get newHeadStylesheetElements(){return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot)}get newHeadScriptElements(){return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot)}get currentHeadProvisionalElements(){return this.currentHeadSnapshot.provisionalElements}get newHeadProvisionalElements(){return this.newHeadSnapshot.provisionalElements}get newBodyScriptElements(){return this.newElement.querySelectorAll("script")}}class ea{constructor(e){this.keys=[],this.snapshots={},this.size=e}has(e){return m(e)in this.snapshots}get(e){if(this.has(e)){let t=this.read(e);return this.touch(e),t}}put(e,t){return this.write(e,t),this.touch(e),t}clear(){this.snapshots={}}read(e){return this.snapshots[m(e)]}write(e,t){this.snapshots[m(e)]=t}touch(e){let t=m(e),i=this.keys.indexOf(t);i>-1&&this.keys.splice(i,1),this.keys.unshift(t),this.trim()}trim(){for(let e of this.keys.splice(this.size))delete this.snapshots[e]}}class el extends O{constructor(){super(...arguments),this.snapshotCache=new ea(10),this.lastRenderedLocation=new URL(location.href),this.forceReloaded=!1}renderPage(e,t=!1,i=!0,s){let r=new eo(this.snapshot,e,eo.renderElement,t,i);return r.shouldRender?null==s||s.changeHistory():this.forceReloaded=!0,this.render(r)}renderError(e,t){null==t||t.changeHistory();let i=new en(this.snapshot,e,en.renderElement,!1);return this.render(i)}clearSnapshotCache(){this.snapshotCache.clear()}async cacheSnapshot(e=this.snapshot){if(e.isCacheable){this.delegate.viewWillCacheSnapshot();let{lastRenderedLocation:t}=this;await new Promise(e=>setTimeout(()=>e(),0));let i=e.clone();return this.snapshotCache.put(t,i),i}}getCachedSnapshotForLocation(e){return this.snapshotCache.get(e)}get snapshot(){return z.fromElement(this.element)}}class eh{constructor(e){this.selector="a[data-turbo-preload]",this.delegate=e}get snapshotCache(){return this.delegate.navigator.view.snapshotCache}start(){if("loading"===document.readyState)return document.addEventListener("DOMContentLoaded",()=>{this.preloadOnLoadLinksForView(document.body)});this.preloadOnLoadLinksForView(document.body)}preloadOnLoadLinksForView(e){for(let t of e.querySelectorAll(this.selector))this.preloadURL(t)}async preloadURL(e){let t=new URL(e.href);if(!this.snapshotCache.has(t))try{let e=await fetch(t.toString(),{headers:{"VND.PREFETCH":"true",Accept:"text/html"}}),i=await e.text(),s=z.fromResponse(e,i);this.snapshotCache.put(t,s)}catch(e){}}}function ec(e){Object.defineProperties(e,ed)}let ed={absoluteURL:{get(){return this.toString()}}},eu={after(){this.targetElements.forEach(e=>{var t;return null==(t=e.parentElement)?void 0:t.insertBefore(this.templateContent,e.nextSibling)})},append(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.append(this.templateContent))},before(){this.targetElements.forEach(e=>{var t;return null==(t=e.parentElement)?void 0:t.insertBefore(this.templateContent,e)})},prepend(){this.removeDuplicateTargetChildren(),this.targetElements.forEach(e=>e.prepend(this.templateContent))},remove(){this.targetElements.forEach(e=>e.remove())},replace(){this.targetElements.forEach(e=>e.replaceWith(this.templateContent))},update(){this.targetElements.forEach(e=>e.replaceChildren(this.templateContent))}},em=new class{constructor(){this.navigator=new ee(this),this.history=new Z(this),this.preloader=new eh(this),this.view=new el(this,document.documentElement),this.adapter=new X(this),this.pageObserver=new et(this),this.cacheObserver=new J,this.linkClickObserver=new D(this,window),this.formSubmitObserver=new B(this,document),this.scrollObserver=new ei(this),this.streamObserver=new er(this),this.formLinkClickObserver=new W(this,document.documentElement),this.frameRedirector=new G(this,document.documentElement),this.streamMessageRenderer=new es,this.drive=!0,this.enabled=!0,this.progressBarDelay=500,this.started=!1,this.formMode="on"}start(){this.started||(this.pageObserver.start(),this.cacheObserver.start(),this.formLinkClickObserver.start(),this.linkClickObserver.start(),this.formSubmitObserver.start(),this.scrollObserver.start(),this.streamObserver.start(),this.frameRedirector.start(),this.history.start(),this.preloader.start(),this.started=!0,this.enabled=!0)}disable(){this.enabled=!1}stop(){this.started&&(this.pageObserver.stop(),this.cacheObserver.stop(),this.formLinkClickObserver.stop(),this.linkClickObserver.stop(),this.formSubmitObserver.stop(),this.scrollObserver.stop(),this.streamObserver.stop(),this.frameRedirector.stop(),this.history.stop(),this.started=!1)}registerAdapter(e){this.adapter=e}visit(e,t={}){let i=t.frame?document.getElementById(t.frame):null;i instanceof h?(i.src=e.toString(),i.loaded):this.navigator.proposeVisit(c(e),t)}connectStreamSource(e){this.streamObserver.connectStreamSource(e)}disconnectStreamSource(e){this.streamObserver.disconnectStreamSource(e)}renderStreamMessage(e){this.streamMessageRenderer.render(k.wrap(e))}clearCache(){this.view.clearSnapshotCache()}isVisitable(e){return!!((e.pathname.split("/").slice(1).slice(-1)[0].match(/\.[^.]*$/)||[])[0]||"").match(/^(?:|\.(?:htm|html|xhtml|php))$/)}locationIsVisitable(e,t){var i,s;let r;return r=(s=(i=t).origin+i.pathname).endsWith("/")?s:s+"/",(e.href===c(r).href||e.href.startsWith(r))&&this.isVisitable(e)}setProgressBarDelay(e){this.progressBarDelay=e}setFormMode(e){this.formMode=e}get location(){return this.history.location}get restorationIdentifier(){return this.history.restorationIdentifier}historyPoppedToLocationWithRestorationIdentifier(e,t){this.enabled?this.navigator.startVisit(e,t,{action:"restore",historyChanged:!0}):this.adapter.pageInvalidated({reason:"turbo_disabled"})}scrollPositionChanged(e){this.history.updateRestorationData({scrollPosition:e})}willSubmitFormLinkToLocation(e,t){return this.elementIsNavigatable(e)&&this.locationIsVisitable(t,this.snapshot.rootLocation)}submittedFormLinkToLocation(){}willFollowLinkToLocation(e,t,i){return this.elementIsNavigatable(e)&&this.locationIsVisitable(t,this.snapshot.rootLocation)&&this.applicationAllowsFollowingLinkToLocation(e,t,i)}followedLinkToLocation(e,t){let i=this.getActionForLink(e),s=e.hasAttribute("data-turbo-stream");this.visit(t.href,{action:i,acceptsStreamResponse:s})}allowsVisitingLocationWithAction(e,t){return this.locationWithActionIsSamePage(e,t)||this.applicationAllowsVisitingLocation(e)}visitProposedToLocation(e,t){ec(e),this.adapter.visitProposedToLocation(e,t)}visitStarted(e){e.acceptsStreamResponse||L(document.documentElement),ec(e.location),e.silent||this.notifyApplicationAfterVisitingLocation(e.location,e.action)}visitCompleted(e){R(document.documentElement),this.notifyApplicationAfterPageLoad(e.getTimingMetrics())}locationWithActionIsSamePage(e,t){return this.navigator.locationWithActionIsSamePage(e,t)}visitScrolledToSamePageLocation(e,t){this.notifyApplicationAfterVisitingSamePageLocation(e,t)}willSubmitForm(e,t){let i=u(e,t);return this.submissionIsNavigatable(e,t)&&this.locationIsVisitable(c(i),this.snapshot.rootLocation)}formSubmitted(e,t){this.navigator.submitForm(e,t)}pageBecameInteractive(){this.view.lastRenderedLocation=this.location,this.notifyApplicationAfterPageLoad()}pageLoaded(){this.history.assumeControlOfScrollRestoration()}pageWillUnload(){this.history.relinquishControlOfScrollRestoration()}receivedMessageFromStream(e){this.renderStreamMessage(e)}viewWillCacheSnapshot(){var e;(null==(e=this.navigator.currentVisit)?void 0:e.silent)||this.notifyApplicationBeforeCachingSnapshot()}allowsImmediateRender({element:e},t){let{defaultPrevented:i,detail:{render:s}}=this.notifyApplicationBeforeRender(e,t);return this.view.renderer&&s&&(this.view.renderer.renderElement=s),!i}viewRenderedSnapshot(e,t){this.view.lastRenderedLocation=this.history.location,this.notifyApplicationAfterRender()}preloadOnLoadLinksForView(e){this.preloader.preloadOnLoadLinksForView(e)}viewInvalidated(e){this.adapter.pageInvalidated(e)}frameLoaded(e){this.notifyApplicationAfterFrameLoad(e)}frameRendered(e,t){this.notifyApplicationAfterFrameRender(e,t)}applicationAllowsFollowingLinkToLocation(e,t,i){return!this.notifyApplicationAfterClickingLinkToLocation(e,t,i).defaultPrevented}applicationAllowsVisitingLocation(e){return!this.notifyApplicationBeforeVisitingLocation(e).defaultPrevented}notifyApplicationAfterClickingLinkToLocation(e,t,i){return v("turbo:click",{target:e,detail:{url:t.href,originalEvent:i},cancelable:!0})}notifyApplicationBeforeVisitingLocation(e){return v("turbo:before-visit",{detail:{url:e.href},cancelable:!0})}notifyApplicationAfterVisitingLocation(e,t){return v("turbo:visit",{detail:{url:e.href,action:t}})}notifyApplicationBeforeCachingSnapshot(){return v("turbo:before-cache")}notifyApplicationBeforeRender(e,t){return v("turbo:before-render",{detail:Object.assign({newBody:e},t),cancelable:!0})}notifyApplicationAfterRender(){return v("turbo:render")}notifyApplicationAfterPageLoad(e={}){return v("turbo:load",{detail:{url:this.location.href,timing:e}})}notifyApplicationAfterVisitingSamePageLocation(e,t){dispatchEvent(new HashChangeEvent("hashchange",{oldURL:e.toString(),newURL:t.toString()}))}notifyApplicationAfterFrameLoad(e){return v("turbo:frame-load",{target:e})}notifyApplicationAfterFrameRender(e,t){return v("turbo:frame-render",{detail:{fetchResponse:e},target:t,cancelable:!0})}submissionIsNavigatable(e,t){if("off"==this.formMode)return!1;{let i=!t||this.elementIsNavigatable(t);return"optin"==this.formMode?i&&null!=e.closest('[data-turbo="true"]'):i&&this.elementIsNavigatable(e)}}elementIsNavigatable(e){let t=e.closest("[data-turbo]"),i=e.closest("turbo-frame");if(this.drive||i)if(t)return"false"!=t.getAttribute("data-turbo");else return!0;return!!t&&"true"==t.getAttribute("data-turbo")}getActionForLink(e){let t=e.getAttribute("data-turbo-action");return g(t)?t:"advance"}get snapshot(){return this.view.snapshot}},ep=new class{constructor(e){this.session=e}clear(){this.session.clearCache()}resetCacheControl(){this.setCacheControl("")}exemptPageFromCache(){this.setCacheControl("no-cache")}exemptPageFromPreview(){this.setCacheControl("no-preview")}setCacheControl(e){var t;let i;(i=C(t="turbo-cache-control"))||((i=document.createElement("meta")).setAttribute("name",t),document.head.appendChild(i)),i.setAttribute("content",e)}}(em),{navigator:eg}=em;function ef(){em.start()}function ev(e,t){em.visit(e,t)}function eb(e){em.connectStreamSource(e)}function ew(e){em.disconnectStreamSource(e)}function eS(e){em.setProgressBarDelay(e)}var eE,ey,eL,eR,eA,eC,eT,eP,eF,ek,eI,eM,eH,eq,eB,eO,eV,eN,eD=Object.freeze({__proto__:null,navigator:eg,session:em,cache:ep,PageRenderer:eo,PageSnapshot:z,FrameRenderer:_,start:ef,registerAdapter:function(e){em.registerAdapter(e)},visit:ev,connectStreamSource:eb,disconnectStreamSource:ew,renderStreamMessage:function(e){em.renderStreamMessage(e)},clearCache:function(){console.warn("Please replace `Turbo.clearCache()` with `Turbo.cache.clear()`. The top-level function is deprecated and will be removed in a future version of Turbo.`"),em.clearCache()},setProgressBarDelay:eS,setConfirmMethod:function(e){I.confirmMethod=e},setFormMode:function(e){em.setFormMode(e)},StreamActions:eu,setCSPTrustedTypesPolicy:function(e){a=e}});function eW(e){if(null!=e){let t=document.getElementById(e);if(t instanceof h)return t}}function ex(e,t){if(e){let i=e.getAttribute("src");if(null!=i&&null!=t&&c(i).href==c(t).href)throw Error(`Matching element has a source URL which references itself`);if(e.ownerDocument!==document&&(e=document.importNode(e,!0)),e instanceof h)return e.connectedCallback(),e.disconnectedCallback(),e}}class eU extends HTMLElement{static async renderElement(e){await e.performAction()}async connectedCallback(){try{await this.render()}catch(e){console.error(e)}finally{this.disconnect()}}async render(){var e;return null!=(e=this.renderPromise)?e:this.renderPromise=(async()=>{let e=this.beforeRenderEvent;this.dispatchEvent(e)&&(await b(),await e.detail.render(this))})()}disconnect(){try{this.remove()}catch(e){}}removeDuplicateTargetChildren(){this.duplicateChildren.forEach(e=>e.remove())}get duplicateChildren(){var e;let t=this.targetElements.flatMap(e=>[...e.children]).filter(e=>!!e.id),i=[...(null==(e=this.templateContent)?void 0:e.children)||[]].filter(e=>!!e.id).map(e=>e.id);return t.filter(e=>i.includes(e.id))}get performAction(){if(this.action){let e=eu[this.action];if(e)return e;this.raise("unknown action")}this.raise("action attribute is missing")}get targetElements(){return this.target?this.targetElementsById:this.targets?this.targetElementsByQuery:void this.raise("target or targets attribute is missing")}get templateContent(){return this.templateElement.content.cloneNode(!0)}get templateElement(){if(null===this.firstElementChild){let e=this.ownerDocument.createElement("template");return this.appendChild(e),e}if(this.firstElementChild instanceof HTMLTemplateElement)return this.firstElementChild;this.raise("first child element must be a