{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@hotwired/turbo/dist/turbo.es2017-esm.js","webpack:///./node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable.js","webpack:///./node_modules/@hotwired/turbo-rails/app/javascript/turbo/cable_stream_source_element.js","webpack:///./app/javascript/packs/turbo.js"],"names":["webpackJsonpCallback","data","moduleId","chunkId","chunkIds","moreModules","i","resolves","length","Object","prototype","hasOwnProperty","call","installedChunks","push","modules","parentJsonpFunction","shift","installedModules","__webpack_require__","exports","module","l","e","promises","installedChunkData","promise","Promise","resolve","reject","onScriptComplete","script","document","createElement","charset","timeout","nc","setAttribute","src","p","jsonpScriptSrc","error","Error","event","onerror","onload","clearTimeout","chunk","errorType","type","realSrc","target","message","name","request","undefined","setTimeout","head","appendChild","all","m","c","d","getter","o","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","oe","err","console","jsonpArray","window","oldJsonpFunction","slice","s","Reflect","customElements","polyfillWrapFlushCallback","BuiltInHTMLElement","HTMLElement","wrapperForTheName","construct","this","constructor","setPrototypeOf","raise","errorConstructor","requestSubmit","submitter","form","TypeError","DOMException","validateSubmitter","click","hidden","removeChild","HTMLFormElement","submittersByForm","WeakMap","clickCaptured","element","Element","Node","parentElement","candidate","closest","findSubmitterFromClickTarget","set","FrameLoadingStyle","FetchMethod","FormSubmissionState","FormEnctype","TimingMetric","VisitState","Event","test","navigator","vendor","SubmitEvent","addEventListener","FrameElement","super","loaded","delegate","delegateConstructor","observedAttributes","connectedCallback","connect","disconnectedCallback","disconnect","reload","attributeChangedCallback","loadingStyleChanged","sourceURLChanged","disabledChanged","getAttribute","removeAttribute","loading","style","toLowerCase","lazy","eager","frameLoadingStyleFromString","disabled","hasAttribute","autoscroll","complete","isLoading","isActive","ownerDocument","isPreview","_a","_b","documentElement","expandURL","locatable","URL","toString","baseURI","getAnchor","url","anchorMatch","hash","href","match","getAction","action","getExtension","pathname","split","getPathComponents","getLastPathComponent","isPrefixedBy","baseURL","prefix","origin","endsWith","getPrefix","startsWith","locationIsVisitable","location","rootLocation","getRequestURL","anchor","toCacheKey","FetchResponse","response","succeeded","ok","failed","clientError","statusCode","serverError","redirected","isHTML","contentType","status","header","responseText","clone","text","responseHTML","headers","dispatch","eventName","cancelable","detail","arguments","CustomEvent","bubbles","isConnected","dispatchEvent","nextAnimationFrame","requestAnimationFrame","parseHTMLDocument","html","DOMParser","parseFromString","unindent","strings","_len","values","Array","_key","lines","interpolate","replace","indent","map","line","join","reduce","result","string","uuid","apply","_","Math","floor","random","attributeName","_len2","elements","_key2","markAsBusy","_len3","_key3","localName","clearBusyState","_len4","_key4","FetchRequest","method","body","URLSearchParams","abortController","AbortController","resolveRequestPromise","defaultHeaders","params","searchParams","entries","from","cancel","abort","async","fetchOptions","prepareHeadersForRequest","allowRequestToBeIntercepted","requestStarted","fetch","receive","requestErrored","requestFinished","fetchResponse","defaultPrevented","requestPreventedHandlingResponse","requestSucceededWithResponse","requestFailedWithResponse","toUpperCase","credentials","redirect","isIdempotent","signal","abortSignal","referrer","requestInterception","resume","AppearanceObserver","started","intersect","lastEntry","isIntersecting","elementAppearedInViewport","intersectionObserver","IntersectionObserver","start","observe","stop","unobserve","StreamMessage","templateElement","innerHTML","static","fragment","createDocumentFragment","foreignElements","importNode","templateChildren","streamElements","child","tagName","content","children","FormSubmission","formElement","mustRedirect","state","initialized","formData","FormData","append","buildFormData","File","search","mergeFormDataEntries","fetchRequest","confirm","post","put","patch","delete","fetchMethodFromString","formElementAction","enctype","urlEncoded","stringFormData","encoding","multipart","plain","formEnctypeFromString","_ref","concat","confirmationMessage","needsConfirmation","requesting","confirmMethod","perform","stopping","stopped","token","cookieName","cookie","find","decodeURIComponent","getCookieValue","getMetaContent","waiting","formSubmission","formSubmissionStarted","success","formSubmissionFailedWithResponse","requestMustRedirect","responseSucceededWithoutRedirect","formSubmissionErrored","receiving","formSubmissionSucceededWithResponse","assign","formSubmissionFinished","querySelector","Snapshot","hasAnchor","getElementForAnchor","firstAutofocusableElement","permanentElements","querySelectorAll","getPermanentElementById","id","getPermanentElementMapForSnapshot","snapshot","permanentElementMap","currentPermanentElement","newPermanentElement","FormInterceptor","submitBubbled","shouldInterceptFormSubmission","preventDefault","stopImmediatePropagation","formSubmissionIntercepted","removeEventListener","View","resolveRenderPromise","resolveInterceptionPromise","scrollToAnchor","scrollToElement","focusElement","scrollToPosition","x","y","scrollToAnchorFromLocation","scrollIntoView","focus","_ref2","scrollRoot","scrollTo","scrollToTop","renderer","shouldRender","newSnapshot","renderPromise","prepareToRenderSnapshot","renderInterception","allowsImmediateRender","renderSnapshot","viewRenderedSnapshot","finishRenderingSnapshot","invalidate","viewInvalidated","markAsPreview","prepareToRender","render","finishRendering","FrameView","LinkInterceptor","clickBubbled","respondsToEventTarget","clickEvent","linkClicked","shouldInterceptLinkClick","linkClickIntercepted","willVisit","Renderer","currentSnapshot","willRender","resolvingFunctions","createScriptElement","createdScriptElement","cspNonce","nonce","textContent","destinationElement","sourceElement","attributes","copyElementAttributes","preservingPermanentElements","callback","bardo","enter","leave","replaceNewPermanentElementWithPlaceholder","replaceCurrentPermanentElementWithClone","replacePlaceholderWithPermanentElement","permanentElement","placeholder","createPlaceholderForPermanentElement","replaceWith","cloneNode","getPlaceholderById","placeholders","focusFirstAutofocusableElement","connectedSnapshot","elementIsFocusable","currentElement","newElement","FrameRenderer","loadFrameElement","scrollFrameIntoView","activateScriptElements","destinationRange","createRange","selectNodeContents","deleteContents","frameElement","sourceRange","extractContents","firstElementChild","block","defaultValue","inertScriptElement","newScriptElements","activatedScriptElement","ProgressBar","hiding","visible","trickle","setValue","stylesheetElement","createStylesheetElement","progressElement","createProgressElement","installStylesheetElement","defaultCSS","animationDuration","show","installProgressElement","startTrickling","hide","fadeProgressElement","uninstallProgressElement","stopTrickling","refresh","insertBefore","firstChild","width","opacity","parentNode","trickleInterval","setInterval","clearInterval","className","HeadSnapshot","detailsByOuterHTML","filter","elementIsNoscript","elementWithoutNonce","outerHTML","details","elementType","tracked","elementIsTracked","trackedElementSignature","keys","getScriptElementsNotInSnapshot","getElementsMatchingTypeNotInSnapshot","getStylesheetElementsNotInSnapshot","matchedType","_ref3","_ref4","provisionalElements","getMetaValue","findMetaElementByName","elementIsMetaElementWithName","elementIsScript","elementIsStylesheet","PageSnapshot","headSnapshot","fromDocument","_ref5","headElement","getSetting","cacheControlValue","isPreviewable","isCacheable","isVisitable","defaultOptions","historyChanged","visitCachedSnapshot","SystemStatusCode","PageStage","Visit","restorationIdentifier","options","identifier","timingMetrics","followedRedirect","scrolled","snapshotCached","snapshotHTML","isSamePage","locationWithActionIsSamePage","adapter","view","history","restorationData","getRestorationDataForIdentifier","silent","recordTimingMetric","visitStart","visitStarted","cancelRender","canceled","visitEnd","completed","visitCompleted","followRedirect","fail","visitFailed","changeHistory","actionForHistory","getHistoryMethodForAction","update","issueRequest","hasPreloadedResponse","simulateRequest","shouldIssueRequest","startRequest","recordResponse","finishRequest","requestStart","visitRequestStarted","isSuccessful","visitRequestCompleted","visitRequestFailedWithStatusCode","requestEnd","visitRequestFinished","loadResponse","cacheSnapshot","renderPage","fromHTMLString","visitRendered","renderError","getCachedSnapshot","getCachedSnapshotForLocation","getPreloadedSnapshot","hasCachedSnapshot","loadCachedSnapshot","redirectedToLocation","visitProposedToLocation","goToSamePageAnchor","contentTypeMismatch","networkFailure","performScroll","scrollToRestoredPosition","visitScrolledToSamePageLocation","lastRenderedLocation","scrollPosition","metric","Date","getTime","getTimingMetrics","replaceState","pushState","then","frame","cancelAnimationFrame","BrowserAdapter","session","progressBar","showProgressBar","startVisit","visit","showVisitProgressBarAfterDelay","timeoutFailure","hideVisitProgressBar","pageInvalidated","showFormProgressBarAfterDelay","hideFormProgressBar","visitProgressBarTimeout","progressBarDelay","formProgressBarTimeout","CacheObserver","removeStaleElements","staleElements","remove","FormSubmitObserver","submitCaptured","willSubmitForm","formSubmitted","FrameRedirector","linkInterceptor","formInterceptor","shouldRedirect","findFrameElement","shouldSubmit","meta","History","pageLoaded","onPopState","shouldHandlePopState","turbo","historyPoppedToLocationWithRestorationIdentifier","onPageLoad","updateRestorationData","additionalData","assumeControlOfScrollRestoration","previousScrollRestoration","scrollRestoration","relinquishControlOfScrollRestoration","pageIsLoaded","readyState","LinkClickObserver","clickEventIsSignificant","composedPath","link","findLinkFromClickTarget","getLocationForLink","willFollowLinkToLocation","followedLinkToLocation","isContentEditable","which","altKey","ctrlKey","metaKey","shiftKey","isAction","Navigator","proposeVisit","allowsVisitingLocationWithAction","currentVisit","submitForm","clearSnapshotCache","visitOptions","getActionForFormSubmission","currentAnchor","isRestorationToTop","oldURL","newURL","PageObserver","stage","initial","interpretReadyState","pageIsInteractive","pageIsComplete","pageWillUnload","interactive","pageBecameInteractive","ScrollObserver","onScroll","updatePosition","pageXOffset","pageYOffset","position","scrollPositionChanged","StreamObserver","sources","Set","inspectFetchResponse","fetchResponseFromEvent","fetchResponseIsStream","receiveMessageResponse","receiveMessageEvent","receiveMessageHTML","connectStreamSource","source","streamSourceIsConnected","add","disconnectStreamSource","has","receivedMessageFromStream","ErrorRenderer","replaceHeadAndBody","replaceChild","newHead","replaceableElement","scriptElements","PageRenderer","trackedElementsAreIdentical","mergeHead","replaceBody","currentHeadSnapshot","newHeadSnapshot","copyNewHeadStylesheetElements","copyNewHeadScriptElements","removeCurrentHeadProvisionalElements","copyNewHeadProvisionalElements","activateNewBody","assignNewBody","newHeadStylesheetElements","newHeadScriptElements","currentHeadProvisionalElements","newHeadProvisionalElements","adoptNode","activateNewBodyScriptElements","newBodyScriptElements","HTMLBodyElement","SnapshotCache","size","snapshots","read","touch","write","clear","index","indexOf","splice","unshift","trim","PageView","snapshotCache","shouldCacheSnapshot","viewWillCacheSnapshot","cachedSnapshot","fromElement","extendURLWithDeprecatedProperties","defineProperties","deprecatedLocationPropertyDescriptors","absoluteURL","pageObserver","cacheObserver","linkClickObserver","formSubmitObserver","scrollObserver","streamObserver","frameRedirector","drive","enabled","disable","registerAdapter","renderStreamMessage","wrap","clearCache","setProgressBarDelay","delay","elementDriveEnabled","applicationAllowsFollowingLinkToLocation","getActionForLink","convertLinkWithMethodClickToFormSubmission","linkMethod","getTargetFrameForLink","applicationAllowsVisitingLocation","notifyApplicationAfterVisitingLocation","notifyApplicationAfterPageLoad","notifyApplicationAfterVisitingSamePageLocation","notifyApplicationBeforeCachingSnapshot","_ref6","notifyApplicationBeforeRender","notifyApplicationAfterRender","frameLoaded","notifyApplicationAfterFrameLoad","frameRendered","notifyApplicationAfterFrameRender","notifyApplicationAfterClickingLinkToLocation","notifyApplicationBeforeVisitingLocation","newBody","timing","HashChangeEvent","container","navigator$1","setConfirmMethod","Turbo","freeze","__proto__","SnapshotSubstitution","_ref9","getFrameElementById","getElementById","activateElement","currentURL","right","StreamActions","after","targetElements","forEach","templateContent","nextSibling","removeDuplicateTargetChildren","before","prepend","StreamElement","beforeRenderEvent","performAction","duplicateChildren","existingChildren","flatMap","newChildrenIds","includes","actionFunction","targetElementsById","targets","targetElementsByQuery","HTMLTemplateElement","description","consumer","getConsumer","setConsumer","createConsumer","newConsumer","fetchResponseLoaded","currentFetchRequest","resolveVisitPromise","connected","hasBeenLoaded","settingSourceURL","appearanceObserver","reloadable","loadingStyle","loadSourceURL","sourceURL","previousURL","extractForeignFrameElement","shouldInterceptNavigation","navigateFrame","_ref7","proposeVisitIfNavigatedWithAction","_ref8","CSS","escape","formActionIsVisitable","define","currentScript","warn","subscription","channel","mixin","subscriptions","subscribeTo","received","dispatchMessageEvent","unsubscribe","MessageEvent","signed_stream_name"],"mappings":"aACE,SAASA,EAAqBC,GAQ7B,IAPA,IAMIC,EAAUC,EANVC,EAAWH,EAAK,GAChBI,EAAcJ,EAAK,GAKAK,EAAI,EAAGC,EAAW,GACpCD,EAAIF,EAASI,OAAQF,IACzBH,EAAUC,EAASE,GAChBG,OAAOC,UAAUC,eAAeC,KAAKC,EAAiBV,IAAYU,EAAgBV,IACpFI,EAASO,KAAKD,EAAg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,GAAK3wB,IACDA,EAAQ4C,aAAa,+BACzB,KAAO5C,EAAUA,EAAQG,eACvB,GAAIH,GAAWnF,SAAS4O,KACtB,OAAOxL,QAAQ2yB,KAAKtpB,CAAQ;;;;;;;;;QASzBtH,EAAQ+Z,YAfjB,GAmBA5b,OAAO4uB,MAAQA,GACf3gB,KEl5GA,MAAM,WAAsCzN,YAC1C0L,0BACEyc,GAAoBhoB,MACpBA,KAAK+xB,mBDQFxmB,eAA2BymB,EAASC,GACzC,MAAM,cACJC,SACQ/B,KACV,OAAO+B,EAAcvzB,OAAOqzB,EAASC,GCZTE,CAAYnyB,KAAKgyB,QAAS,CAClDI,SAAUpyB,KAAKqyB,qBAAqBxzB,KAAKmB,QAG7C8C,uBACEslB,GAAuBpoB,MACnBA,KAAK+xB,cAAc/xB,KAAK+xB,aAAaO,cAE3CD,qBAAqBr4B,GACnB,MAAM0C,EAAQ,IAAI61B,aAAa,UAAW,CACxCv4B,SAEF,OAAOgG,KAAKiI,cAAcvL,GAExBs1B,cAGF,MAAO,CACLA,QAHchyB,KAAKqD,aAAa,WAIhCmvB,mBAHyBxyB,KAAKqD,aAAa,wBAOjD3D,eAAekyB,OAAO,4BAA6B,ICrBnD3D,EAAMjM,QAAQ8J,OAAQ","file":"js/turbo-c35d098087997607dd98.js","sourcesContent":[" \t// install a JSONP callback for chunk loading\n \tfunction webpackJsonpCallback(data) {\n \t\tvar chunkIds = data[0];\n \t\tvar moreModules = data[1];\n\n\n \t\t// add \"moreModules\" to the modules object,\n \t\t// then flag all \"chunkIds\" as loaded and fire callback\n \t\tvar moduleId, chunkId, i = 0, resolves = [];\n \t\tfor(;i < chunkIds.length; i++) {\n \t\t\tchunkId = chunkIds[i];\n \t\t\tif(Object.prototype.hasOwnProperty.call(installedChunks, chunkId) && installedChunks[chunkId]) {\n \t\t\t\tresolves.push(installedChunks[chunkId][0]);\n \t\t\t}\n \t\t\tinstalledChunks[chunkId] = 0;\n \t\t}\n \t\tfor(moduleId in moreModules) {\n \t\t\tif(Object.prototype.hasOwnProperty.call(moreModules, moduleId)) {\n \t\t\t\tmodules[moduleId] = moreModules[moduleId];\n \t\t\t}\n \t\t}\n \t\tif(parentJsonpFunction) parentJsonpFunction(data);\n\n \t\twhile(resolves.length) {\n \t\t\tresolves.shift()();\n \t\t}\n\n \t};\n\n\n \t// The module cache\n \tvar installedModules = {};\n\n \t// object to store loaded and loading chunks\n \t// undefined = chunk not loaded, null = chunk preloaded/prefetched\n \t// Promise = chunk loading, 0 = chunk loaded\n \tvar installedChunks = {\n \t\t4: 0\n \t};\n\n\n\n \t// script path function\n \tfunction jsonpScriptSrc(chunkId) {\n \t\treturn __webpack_require__.p + \"js/\" + ({\"0\":\"actioncable\"}[chunkId]||chunkId) + \"-\" + {\"0\":\"c449c7b0f783085c8663\"}[chunkId] + \".chunk.js\"\n \t}\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n \t// This file contains only the entry chunk.\n \t// The chunk loading function for additional chunks\n \t__webpack_require__.e = function requireEnsure(chunkId) {\n \t\tvar promises = [];\n\n\n \t\t// JSONP chunk loading for javascript\n\n \t\tvar installedChunkData = installedChunks[chunkId];\n \t\tif(installedChunkData !== 0) { // 0 means \"already installed\".\n\n \t\t\t// a Promise means \"currently loading\".\n \t\t\tif(installedChunkData) {\n \t\t\t\tpromises.push(installedChunkData[2]);\n \t\t\t} else {\n \t\t\t\t// setup Promise in chunk cache\n \t\t\t\tvar promise = new Promise(function(resolve, reject) {\n \t\t\t\t\tinstalledChunkData = installedChunks[chunkId] = [resolve, reject];\n \t\t\t\t});\n \t\t\t\tpromises.push(installedChunkData[2] = promise);\n\n \t\t\t\t// start chunk loading\n \t\t\t\tvar script = document.createElement('script');\n \t\t\t\tvar onScriptComplete;\n\n \t\t\t\tscript.charset = 'utf-8';\n \t\t\t\tscript.timeout = 120;\n \t\t\t\tif (__webpack_require__.nc) {\n \t\t\t\t\tscript.setAttribute(\"nonce\", __webpack_require__.nc);\n \t\t\t\t}\n \t\t\t\tscript.src = jsonpScriptSrc(chunkId);\n\n \t\t\t\t// create error before stack unwound to get useful stacktrace later\n \t\t\t\tvar error = new Error();\n \t\t\t\tonScriptComplete = function (event) {\n \t\t\t\t\t// avoid mem leaks in IE.\n \t\t\t\t\tscript.onerror = script.onload = null;\n \t\t\t\t\tclearTimeout(timeout);\n \t\t\t\t\tvar chunk = installedChunks[chunkId];\n \t\t\t\t\tif(chunk !== 0) {\n \t\t\t\t\t\tif(chunk) {\n \t\t\t\t\t\t\tvar errorType = event && (event.type === 'load' ? 'missing' : event.type);\n \t\t\t\t\t\t\tvar realSrc = event && event.target && event.target.src;\n \t\t\t\t\t\t\terror.message = 'Loading chunk ' + chunkId + ' failed.\\n(' + errorType + ': ' + realSrc + ')';\n \t\t\t\t\t\t\terror.name = 'ChunkLoadError';\n \t\t\t\t\t\t\terror.type = errorType;\n \t\t\t\t\t\t\terror.request = realSrc;\n \t\t\t\t\t\t\tchunk[1](error);\n \t\t\t\t\t\t}\n \t\t\t\t\t\tinstalledChunks[chunkId] = undefined;\n \t\t\t\t\t}\n \t\t\t\t};\n \t\t\t\tvar timeout = setTimeout(function(){\n \t\t\t\t\tonScriptComplete({ type: 'timeout', target: script });\n \t\t\t\t}, 120000);\n \t\t\t\tscript.onerror = script.onload = onScriptComplete;\n \t\t\t\tdocument.head.appendChild(script);\n \t\t\t}\n \t\t}\n \t\treturn Promise.all(promises);\n \t};\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"//d3szmo5vwjrpqq.cloudfront.net/packs/\";\n\n \t// on error function for async loading\n \t__webpack_require__.oe = function(err) { console.error(err); throw err; };\n\n \tvar jsonpArray = window[\"webpackJsonp\"] = window[\"webpackJsonp\"] || [];\n \tvar oldJsonpFunction = jsonpArray.push.bind(jsonpArray);\n \tjsonpArray.push = webpackJsonpCallback;\n \tjsonpArray = jsonpArray.slice();\n \tfor(var i = 0; i < jsonpArray.length; i++) webpackJsonpCallback(jsonpArray[i]);\n \tvar parentJsonpFunction = oldJsonpFunction;\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 1223);\n","/*\nTurbo 7.1.0\nCopyright © 2021 Basecamp, LLC\n */\n(function () {\n if (window.Reflect === undefined || window.customElements === undefined || window.customElements.polyfillWrapFlushCallback) {\n return;\n }\n const BuiltInHTMLElement = HTMLElement;\n const wrapperForTheName = {\n 'HTMLElement': function HTMLElement() {\n return Reflect.construct(BuiltInHTMLElement, [], this.constructor);\n }\n };\n window.HTMLElement = wrapperForTheName['HTMLElement'];\n HTMLElement.prototype = BuiltInHTMLElement.prototype;\n HTMLElement.prototype.constructor = HTMLElement;\n Object.setPrototypeOf(HTMLElement, BuiltInHTMLElement);\n})();\n\n/**\n * The MIT License (MIT)\n * \n * Copyright (c) 2019 Javan Makhmali\n * \n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to deal\n * in the Software without restriction, including without limitation the rights\n * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n * copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n * \n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n * \n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\n * THE SOFTWARE.\n */\n\n(function (prototype) {\n if (typeof prototype.requestSubmit == \"function\") return;\n prototype.requestSubmit = function (submitter) {\n if (submitter) {\n validateSubmitter(submitter, this);\n submitter.click();\n } else {\n submitter = document.createElement(\"input\");\n submitter.type = \"submit\";\n submitter.hidden = true;\n this.appendChild(submitter);\n submitter.click();\n this.removeChild(submitter);\n }\n };\n function validateSubmitter(submitter, form) {\n submitter instanceof HTMLElement || raise(TypeError, \"parameter 1 is not of type 'HTMLElement'\");\n submitter.type == \"submit\" || raise(TypeError, \"The specified element is not a submit button\");\n submitter.form == form || raise(DOMException, \"The specified element is not owned by this form element\", \"NotFoundError\");\n }\n function raise(errorConstructor, message, name) {\n throw new errorConstructor(\"Failed to execute 'requestSubmit' on 'HTMLFormElement': \" + message + \".\", name);\n }\n})(HTMLFormElement.prototype);\nconst submittersByForm = new WeakMap();\nfunction findSubmitterFromClickTarget(target) {\n const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n const candidate = element ? element.closest(\"input, button\") : null;\n return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == \"submit\" ? candidate : null;\n}\nfunction clickCaptured(event) {\n const submitter = findSubmitterFromClickTarget(event.target);\n if (submitter && submitter.form) {\n submittersByForm.set(submitter.form, submitter);\n }\n}\n(function () {\n if (\"submitter\" in Event.prototype) return;\n let prototype;\n if (\"SubmitEvent\" in window && /Apple Computer/.test(navigator.vendor)) {\n prototype = window.SubmitEvent.prototype;\n } else if (\"SubmitEvent\" in window) {\n return;\n } else {\n prototype = window.Event.prototype;\n }\n addEventListener(\"click\", clickCaptured, true);\n Object.defineProperty(prototype, \"submitter\", {\n get() {\n if (this.type == \"submit\" && this.target instanceof HTMLFormElement) {\n return submittersByForm.get(this.target);\n }\n }\n });\n})();\nvar FrameLoadingStyle;\n(function (FrameLoadingStyle) {\n FrameLoadingStyle[\"eager\"] = \"eager\";\n FrameLoadingStyle[\"lazy\"] = \"lazy\";\n})(FrameLoadingStyle || (FrameLoadingStyle = {}));\nclass FrameElement extends HTMLElement {\n constructor() {\n super();\n this.loaded = Promise.resolve();\n this.delegate = new FrameElement.delegateConstructor(this);\n }\n static get observedAttributes() {\n return [\"disabled\", \"loading\", \"src\"];\n }\n connectedCallback() {\n this.delegate.connect();\n }\n disconnectedCallback() {\n this.delegate.disconnect();\n }\n reload() {\n const {\n src\n } = this;\n this.src = null;\n this.src = src;\n }\n attributeChangedCallback(name) {\n if (name == \"loading\") {\n this.delegate.loadingStyleChanged();\n } else if (name == \"src\") {\n this.delegate.sourceURLChanged();\n } else {\n this.delegate.disabledChanged();\n }\n }\n get src() {\n return this.getAttribute(\"src\");\n }\n set src(value) {\n if (value) {\n this.setAttribute(\"src\", value);\n } else {\n this.removeAttribute(\"src\");\n }\n }\n get loading() {\n return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\");\n }\n set loading(value) {\n if (value) {\n this.setAttribute(\"loading\", value);\n } else {\n this.removeAttribute(\"loading\");\n }\n }\n get disabled() {\n return this.hasAttribute(\"disabled\");\n }\n set disabled(value) {\n if (value) {\n this.setAttribute(\"disabled\", \"\");\n } else {\n this.removeAttribute(\"disabled\");\n }\n }\n get autoscroll() {\n return this.hasAttribute(\"autoscroll\");\n }\n set autoscroll(value) {\n if (value) {\n this.setAttribute(\"autoscroll\", \"\");\n } else {\n this.removeAttribute(\"autoscroll\");\n }\n }\n get complete() {\n return !this.delegate.isLoading;\n }\n get isActive() {\n return this.ownerDocument === document && !this.isPreview;\n }\n get isPreview() {\n var _a, _b;\n return (_b = (_a = this.ownerDocument) === null || _a === void 0 ? void 0 : _a.documentElement) === null || _b === void 0 ? void 0 : _b.hasAttribute(\"data-turbo-preview\");\n }\n}\nfunction frameLoadingStyleFromString(style) {\n switch (style.toLowerCase()) {\n case \"lazy\":\n return FrameLoadingStyle.lazy;\n default:\n return FrameLoadingStyle.eager;\n }\n}\nfunction expandURL(locatable) {\n return new URL(locatable.toString(), document.baseURI);\n}\nfunction getAnchor(url) {\n let anchorMatch;\n if (url.hash) {\n return url.hash.slice(1);\n } else if (anchorMatch = url.href.match(/#(.*)$/)) {\n return anchorMatch[1];\n }\n}\nfunction getAction(form, submitter) {\n const action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formaction\")) || form.getAttribute(\"action\") || form.action;\n return expandURL(action);\n}\nfunction getExtension(url) {\n return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\";\n}\nfunction isHTML(url) {\n return !!getExtension(url).match(/^(?:|\\.(?:htm|html|xhtml))$/);\n}\nfunction isPrefixedBy(baseURL, url) {\n const prefix = getPrefix(url);\n return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);\n}\nfunction locationIsVisitable(location, rootLocation) {\n return isPrefixedBy(location, rootLocation) && isHTML(location);\n}\nfunction getRequestURL(url) {\n const anchor = getAnchor(url);\n return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;\n}\nfunction toCacheKey(url) {\n return getRequestURL(url);\n}\nfunction urlsAreEqual(left, right) {\n return expandURL(left).href == expandURL(right).href;\n}\nfunction getPathComponents(url) {\n return url.pathname.split(\"/\").slice(1);\n}\nfunction getLastPathComponent(url) {\n return getPathComponents(url).slice(-1)[0];\n}\nfunction getPrefix(url) {\n return addTrailingSlash(url.origin + url.pathname);\n}\nfunction addTrailingSlash(value) {\n return value.endsWith(\"/\") ? value : value + \"/\";\n}\nclass FetchResponse {\n constructor(response) {\n this.response = response;\n }\n get succeeded() {\n return this.response.ok;\n }\n get failed() {\n return !this.succeeded;\n }\n get clientError() {\n return this.statusCode >= 400 && this.statusCode <= 499;\n }\n get serverError() {\n return this.statusCode >= 500 && this.statusCode <= 599;\n }\n get redirected() {\n return this.response.redirected;\n }\n get location() {\n return expandURL(this.response.url);\n }\n get isHTML() {\n return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/);\n }\n get statusCode() {\n return this.response.status;\n }\n get contentType() {\n return this.header(\"Content-Type\");\n }\n get responseText() {\n return this.response.clone().text();\n }\n get responseHTML() {\n if (this.isHTML) {\n return this.response.clone().text();\n } else {\n return Promise.resolve(undefined);\n }\n }\n header(name) {\n return this.response.headers.get(name);\n }\n}\nfunction dispatch(eventName) {\n let {\n target,\n cancelable,\n detail\n } = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n const event = new CustomEvent(eventName, {\n cancelable,\n bubbles: true,\n detail\n });\n if (target && target.isConnected) {\n target.dispatchEvent(event);\n } else {\n document.documentElement.dispatchEvent(event);\n }\n return event;\n}\nfunction nextAnimationFrame() {\n return new Promise(resolve => requestAnimationFrame(() => resolve()));\n}\nfunction nextEventLoopTick() {\n return new Promise(resolve => setTimeout(() => resolve(), 0));\n}\nfunction nextMicrotask() {\n return Promise.resolve();\n}\nfunction parseHTMLDocument() {\n let html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n return new DOMParser().parseFromString(html, \"text/html\");\n}\nfunction unindent(strings) {\n for (var _len = arguments.length, values = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {\n values[_key - 1] = arguments[_key];\n }\n const lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n const match = lines[0].match(/^\\s+/);\n const indent = match ? match[0].length : 0;\n return lines.map(line => line.slice(indent)).join(\"\\n\");\n}\nfunction interpolate(strings, values) {\n return strings.reduce((result, string, i) => {\n const value = values[i] == undefined ? \"\" : values[i];\n return result + string + value;\n }, \"\");\n}\nfunction uuid() {\n return Array.apply(null, {\n length: 36\n }).map((_, i) => {\n if (i == 8 || i == 13 || i == 18 || i == 23) {\n return \"-\";\n } else if (i == 14) {\n return \"4\";\n } else if (i == 19) {\n return (Math.floor(Math.random() * 4) + 8).toString(16);\n } else {\n return Math.floor(Math.random() * 15).toString(16);\n }\n }).join(\"\");\n}\nfunction getAttribute(attributeName) {\n for (var _len2 = arguments.length, elements = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n elements[_key2 - 1] = arguments[_key2];\n }\n for (const value of elements.map(element => element === null || element === void 0 ? void 0 : element.getAttribute(attributeName))) {\n if (typeof value == \"string\") return value;\n }\n return null;\n}\nfunction markAsBusy() {\n for (var _len3 = arguments.length, elements = new Array(_len3), _key3 = 0; _key3 < _len3; _key3++) {\n elements[_key3] = arguments[_key3];\n }\n for (const element of elements) {\n if (element.localName == \"turbo-frame\") {\n element.setAttribute(\"busy\", \"\");\n }\n element.setAttribute(\"aria-busy\", \"true\");\n }\n}\nfunction clearBusyState() {\n for (var _len4 = arguments.length, elements = new Array(_len4), _key4 = 0; _key4 < _len4; _key4++) {\n elements[_key4] = arguments[_key4];\n }\n for (const element of elements) {\n if (element.localName == \"turbo-frame\") {\n element.removeAttribute(\"busy\");\n }\n element.removeAttribute(\"aria-busy\");\n }\n}\nvar FetchMethod;\n(function (FetchMethod) {\n FetchMethod[FetchMethod[\"get\"] = 0] = \"get\";\n FetchMethod[FetchMethod[\"post\"] = 1] = \"post\";\n FetchMethod[FetchMethod[\"put\"] = 2] = \"put\";\n FetchMethod[FetchMethod[\"patch\"] = 3] = \"patch\";\n FetchMethod[FetchMethod[\"delete\"] = 4] = \"delete\";\n})(FetchMethod || (FetchMethod = {}));\nfunction fetchMethodFromString(method) {\n switch (method.toLowerCase()) {\n case \"get\":\n return FetchMethod.get;\n case \"post\":\n return FetchMethod.post;\n case \"put\":\n return FetchMethod.put;\n case \"patch\":\n return FetchMethod.patch;\n case \"delete\":\n return FetchMethod.delete;\n }\n}\nclass FetchRequest {\n constructor(delegate, method, location) {\n let body = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new URLSearchParams();\n let target = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n this.abortController = new AbortController();\n this.resolveRequestPromise = value => {};\n this.delegate = delegate;\n this.method = method;\n this.headers = this.defaultHeaders;\n this.body = body;\n this.url = location;\n this.target = target;\n }\n get location() {\n return this.url;\n }\n get params() {\n return this.url.searchParams;\n }\n get entries() {\n return this.body ? Array.from(this.body.entries()) : [];\n }\n cancel() {\n this.abortController.abort();\n }\n async perform() {\n var _a, _b;\n const {\n fetchOptions\n } = this;\n (_b = (_a = this.delegate).prepareHeadersForRequest) === null || _b === void 0 ? void 0 : _b.call(_a, this.headers, this);\n await this.allowRequestToBeIntercepted(fetchOptions);\n try {\n this.delegate.requestStarted(this);\n const response = await fetch(this.url.href, fetchOptions);\n return await this.receive(response);\n } catch (error) {\n if (error.name !== 'AbortError') {\n this.delegate.requestErrored(this, error);\n throw error;\n }\n } finally {\n this.delegate.requestFinished(this);\n }\n }\n async receive(response) {\n const fetchResponse = new FetchResponse(response);\n const event = dispatch(\"turbo:before-fetch-response\", {\n cancelable: true,\n detail: {\n fetchResponse\n },\n target: this.target\n });\n if (event.defaultPrevented) {\n this.delegate.requestPreventedHandlingResponse(this, fetchResponse);\n } else if (fetchResponse.succeeded) {\n this.delegate.requestSucceededWithResponse(this, fetchResponse);\n } else {\n this.delegate.requestFailedWithResponse(this, fetchResponse);\n }\n return fetchResponse;\n }\n get fetchOptions() {\n var _a;\n return {\n method: FetchMethod[this.method].toUpperCase(),\n credentials: \"same-origin\",\n headers: this.headers,\n redirect: \"follow\",\n body: this.isIdempotent ? null : this.body,\n signal: this.abortSignal,\n referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href\n };\n }\n get defaultHeaders() {\n return {\n \"Accept\": \"text/html, application/xhtml+xml\"\n };\n }\n get isIdempotent() {\n return this.method == FetchMethod.get;\n }\n get abortSignal() {\n return this.abortController.signal;\n }\n async allowRequestToBeIntercepted(fetchOptions) {\n const requestInterception = new Promise(resolve => this.resolveRequestPromise = resolve);\n const event = dispatch(\"turbo:before-fetch-request\", {\n cancelable: true,\n detail: {\n fetchOptions,\n url: this.url,\n resume: this.resolveRequestPromise\n },\n target: this.target\n });\n if (event.defaultPrevented) await requestInterception;\n }\n}\nclass AppearanceObserver {\n constructor(delegate, element) {\n this.started = false;\n this.intersect = entries => {\n const lastEntry = entries.slice(-1)[0];\n if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {\n this.delegate.elementAppearedInViewport(this.element);\n }\n };\n this.delegate = delegate;\n this.element = element;\n this.intersectionObserver = new IntersectionObserver(this.intersect);\n }\n start() {\n if (!this.started) {\n this.started = true;\n this.intersectionObserver.observe(this.element);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n this.intersectionObserver.unobserve(this.element);\n }\n }\n}\nclass StreamMessage {\n constructor(html) {\n this.templateElement = document.createElement(\"template\");\n this.templateElement.innerHTML = html;\n }\n static wrap(message) {\n if (typeof message == \"string\") {\n return new this(message);\n } else {\n return message;\n }\n }\n get fragment() {\n const fragment = document.createDocumentFragment();\n for (const element of this.foreignElements) {\n fragment.appendChild(document.importNode(element, true));\n }\n return fragment;\n }\n get foreignElements() {\n return this.templateChildren.reduce((streamElements, child) => {\n if (child.tagName.toLowerCase() == \"turbo-stream\") {\n return [...streamElements, child];\n } else {\n return streamElements;\n }\n }, []);\n }\n get templateChildren() {\n return Array.from(this.templateElement.content.children);\n }\n}\nStreamMessage.contentType = \"text/vnd.turbo-stream.html\";\nvar FormSubmissionState;\n(function (FormSubmissionState) {\n FormSubmissionState[FormSubmissionState[\"initialized\"] = 0] = \"initialized\";\n FormSubmissionState[FormSubmissionState[\"requesting\"] = 1] = \"requesting\";\n FormSubmissionState[FormSubmissionState[\"waiting\"] = 2] = \"waiting\";\n FormSubmissionState[FormSubmissionState[\"receiving\"] = 3] = \"receiving\";\n FormSubmissionState[FormSubmissionState[\"stopping\"] = 4] = \"stopping\";\n FormSubmissionState[FormSubmissionState[\"stopped\"] = 5] = \"stopped\";\n})(FormSubmissionState || (FormSubmissionState = {}));\nvar FormEnctype;\n(function (FormEnctype) {\n FormEnctype[\"urlEncoded\"] = \"application/x-www-form-urlencoded\";\n FormEnctype[\"multipart\"] = \"multipart/form-data\";\n FormEnctype[\"plain\"] = \"text/plain\";\n})(FormEnctype || (FormEnctype = {}));\nfunction formEnctypeFromString(encoding) {\n switch (encoding.toLowerCase()) {\n case FormEnctype.multipart:\n return FormEnctype.multipart;\n case FormEnctype.plain:\n return FormEnctype.plain;\n default:\n return FormEnctype.urlEncoded;\n }\n}\nclass FormSubmission {\n constructor(delegate, formElement, submitter) {\n let mustRedirect = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n this.state = FormSubmissionState.initialized;\n this.delegate = delegate;\n this.formElement = formElement;\n this.submitter = submitter;\n this.formData = buildFormData(formElement, submitter);\n this.location = expandURL(this.action);\n if (this.method == FetchMethod.get) {\n mergeFormDataEntries(this.location, [...this.body.entries()]);\n }\n this.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);\n this.mustRedirect = mustRedirect;\n }\n static confirmMethod(message, element) {\n return confirm(message);\n }\n get method() {\n var _a;\n const method = ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formmethod\")) || this.formElement.getAttribute(\"method\") || \"\";\n return fetchMethodFromString(method.toLowerCase()) || FetchMethod.get;\n }\n get action() {\n var _a;\n const formElementAction = typeof this.formElement.action === 'string' ? this.formElement.action : null;\n return ((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formaction\")) || this.formElement.getAttribute(\"action\") || formElementAction || \"\";\n }\n get body() {\n if (this.enctype == FormEnctype.urlEncoded || this.method == FetchMethod.get) {\n return new URLSearchParams(this.stringFormData);\n } else {\n return this.formData;\n }\n }\n get enctype() {\n var _a;\n return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formenctype\")) || this.formElement.enctype);\n }\n get isIdempotent() {\n return this.fetchRequest.isIdempotent;\n }\n get stringFormData() {\n return [...this.formData].reduce((entries, _ref) => {\n let [name, value] = _ref;\n return entries.concat(typeof value == \"string\" ? [[name, value]] : []);\n }, []);\n }\n get confirmationMessage() {\n return this.formElement.getAttribute(\"data-turbo-confirm\");\n }\n get needsConfirmation() {\n return this.confirmationMessage !== null;\n }\n async start() {\n const {\n initialized,\n requesting\n } = FormSubmissionState;\n if (this.needsConfirmation) {\n const answer = FormSubmission.confirmMethod(this.confirmationMessage, this.formElement);\n if (!answer) {\n return;\n }\n }\n if (this.state == initialized) {\n this.state = requesting;\n return this.fetchRequest.perform();\n }\n }\n stop() {\n const {\n stopping,\n stopped\n } = FormSubmissionState;\n if (this.state != stopping && this.state != stopped) {\n this.state = stopping;\n this.fetchRequest.cancel();\n return true;\n }\n }\n prepareHeadersForRequest(headers, request) {\n if (!request.isIdempotent) {\n const token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n if (token) {\n headers[\"X-CSRF-Token\"] = token;\n }\n headers[\"Accept\"] = [StreamMessage.contentType, headers[\"Accept\"]].join(\", \");\n }\n }\n requestStarted(request) {\n var _a;\n this.state = FormSubmissionState.waiting;\n (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.setAttribute(\"disabled\", \"\");\n dispatch(\"turbo:submit-start\", {\n target: this.formElement,\n detail: {\n formSubmission: this\n }\n });\n this.delegate.formSubmissionStarted(this);\n }\n requestPreventedHandlingResponse(request, response) {\n this.result = {\n success: response.succeeded,\n fetchResponse: response\n };\n }\n requestSucceededWithResponse(request, response) {\n if (response.clientError || response.serverError) {\n this.delegate.formSubmissionFailedWithResponse(this, response);\n } else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n const error = new Error(\"Form responses must redirect to another location\");\n this.delegate.formSubmissionErrored(this, error);\n } else {\n this.state = FormSubmissionState.receiving;\n this.result = {\n success: true,\n fetchResponse: response\n };\n this.delegate.formSubmissionSucceededWithResponse(this, response);\n }\n }\n requestFailedWithResponse(request, response) {\n this.result = {\n success: false,\n fetchResponse: response\n };\n this.delegate.formSubmissionFailedWithResponse(this, response);\n }\n requestErrored(request, error) {\n this.result = {\n success: false,\n error\n };\n this.delegate.formSubmissionErrored(this, error);\n }\n requestFinished(request) {\n var _a;\n this.state = FormSubmissionState.stopped;\n (_a = this.submitter) === null || _a === void 0 ? void 0 : _a.removeAttribute(\"disabled\");\n dispatch(\"turbo:submit-end\", {\n target: this.formElement,\n detail: Object.assign({\n formSubmission: this\n }, this.result)\n });\n this.delegate.formSubmissionFinished(this);\n }\n requestMustRedirect(request) {\n return !request.isIdempotent && this.mustRedirect;\n }\n}\nfunction buildFormData(formElement, submitter) {\n const formData = new FormData(formElement);\n const name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"name\");\n const value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"value\");\n if (name && value != null && formData.get(name) != value) {\n formData.append(name, value);\n }\n return formData;\n}\nfunction getCookieValue(cookieName) {\n if (cookieName != null) {\n const cookies = document.cookie ? document.cookie.split(\"; \") : [];\n const cookie = cookies.find(cookie => cookie.startsWith(cookieName));\n if (cookie) {\n const value = cookie.split(\"=\").slice(1).join(\"=\");\n return value ? decodeURIComponent(value) : undefined;\n }\n }\n}\nfunction getMetaContent(name) {\n const element = document.querySelector(`meta[name=\"${name}\"]`);\n return element && element.content;\n}\nfunction responseSucceededWithoutRedirect(response) {\n return response.statusCode == 200 && !response.redirected;\n}\nfunction mergeFormDataEntries(url, entries) {\n const searchParams = new URLSearchParams();\n for (const [name, value] of entries) {\n if (value instanceof File) continue;\n searchParams.append(name, value);\n }\n url.search = searchParams.toString();\n return url;\n}\nclass Snapshot {\n constructor(element) {\n this.element = element;\n }\n get children() {\n return [...this.element.children];\n }\n hasAnchor(anchor) {\n return this.getElementForAnchor(anchor) != null;\n }\n getElementForAnchor(anchor) {\n return anchor ? this.element.querySelector(`[id='${anchor}'], a[name='${anchor}']`) : null;\n }\n get isConnected() {\n return this.element.isConnected;\n }\n get firstAutofocusableElement() {\n return this.element.querySelector(\"[autofocus]\");\n }\n get permanentElements() {\n return [...this.element.querySelectorAll(\"[id][data-turbo-permanent]\")];\n }\n getPermanentElementById(id) {\n return this.element.querySelector(`#${id}[data-turbo-permanent]`);\n }\n getPermanentElementMapForSnapshot(snapshot) {\n const permanentElementMap = {};\n for (const currentPermanentElement of this.permanentElements) {\n const {\n id\n } = currentPermanentElement;\n const newPermanentElement = snapshot.getPermanentElementById(id);\n if (newPermanentElement) {\n permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n }\n }\n return permanentElementMap;\n }\n}\nclass FormInterceptor {\n constructor(delegate, element) {\n this.submitBubbled = event => {\n const form = event.target;\n if (!event.defaultPrevented && form instanceof HTMLFormElement && form.closest(\"turbo-frame, html\") == this.element) {\n const submitter = event.submitter || undefined;\n const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.method;\n if (method != \"dialog\" && this.delegate.shouldInterceptFormSubmission(form, submitter)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n this.delegate.formSubmissionIntercepted(form, submitter);\n }\n }\n };\n this.delegate = delegate;\n this.element = element;\n }\n start() {\n this.element.addEventListener(\"submit\", this.submitBubbled);\n }\n stop() {\n this.element.removeEventListener(\"submit\", this.submitBubbled);\n }\n}\nclass View {\n constructor(delegate, element) {\n this.resolveRenderPromise = value => {};\n this.resolveInterceptionPromise = value => {};\n this.delegate = delegate;\n this.element = element;\n }\n scrollToAnchor(anchor) {\n const element = this.snapshot.getElementForAnchor(anchor);\n if (element) {\n this.scrollToElement(element);\n this.focusElement(element);\n } else {\n this.scrollToPosition({\n x: 0,\n y: 0\n });\n }\n }\n scrollToAnchorFromLocation(location) {\n this.scrollToAnchor(getAnchor(location));\n }\n scrollToElement(element) {\n element.scrollIntoView();\n }\n focusElement(element) {\n if (element instanceof HTMLElement) {\n if (element.hasAttribute(\"tabindex\")) {\n element.focus();\n } else {\n element.setAttribute(\"tabindex\", \"-1\");\n element.focus();\n element.removeAttribute(\"tabindex\");\n }\n }\n }\n scrollToPosition(_ref2) {\n let {\n x,\n y\n } = _ref2;\n this.scrollRoot.scrollTo(x, y);\n }\n scrollToTop() {\n this.scrollToPosition({\n x: 0,\n y: 0\n });\n }\n get scrollRoot() {\n return window;\n }\n async render(renderer) {\n const {\n isPreview,\n shouldRender,\n newSnapshot: snapshot\n } = renderer;\n if (shouldRender) {\n try {\n this.renderPromise = new Promise(resolve => this.resolveRenderPromise = resolve);\n this.renderer = renderer;\n this.prepareToRenderSnapshot(renderer);\n const renderInterception = new Promise(resolve => this.resolveInterceptionPromise = resolve);\n const immediateRender = this.delegate.allowsImmediateRender(snapshot, this.resolveInterceptionPromise);\n if (!immediateRender) await renderInterception;\n await this.renderSnapshot(renderer);\n this.delegate.viewRenderedSnapshot(snapshot, isPreview);\n this.finishRenderingSnapshot(renderer);\n } finally {\n delete this.renderer;\n this.resolveRenderPromise(undefined);\n delete this.renderPromise;\n }\n } else {\n this.invalidate();\n }\n }\n invalidate() {\n this.delegate.viewInvalidated();\n }\n prepareToRenderSnapshot(renderer) {\n this.markAsPreview(renderer.isPreview);\n renderer.prepareToRender();\n }\n markAsPreview(isPreview) {\n if (isPreview) {\n this.element.setAttribute(\"data-turbo-preview\", \"\");\n } else {\n this.element.removeAttribute(\"data-turbo-preview\");\n }\n }\n async renderSnapshot(renderer) {\n await renderer.render();\n }\n finishRenderingSnapshot(renderer) {\n renderer.finishRendering();\n }\n}\nclass FrameView extends View {\n invalidate() {\n this.element.innerHTML = \"\";\n }\n get snapshot() {\n return new Snapshot(this.element);\n }\n}\nclass LinkInterceptor {\n constructor(delegate, element) {\n this.clickBubbled = event => {\n if (this.respondsToEventTarget(event.target)) {\n this.clickEvent = event;\n } else {\n delete this.clickEvent;\n }\n };\n this.linkClicked = event => {\n if (this.clickEvent && this.respondsToEventTarget(event.target) && event.target instanceof Element) {\n if (this.delegate.shouldInterceptLinkClick(event.target, event.detail.url)) {\n this.clickEvent.preventDefault();\n event.preventDefault();\n this.delegate.linkClickIntercepted(event.target, event.detail.url);\n }\n }\n delete this.clickEvent;\n };\n this.willVisit = () => {\n delete this.clickEvent;\n };\n this.delegate = delegate;\n this.element = element;\n }\n start() {\n this.element.addEventListener(\"click\", this.clickBubbled);\n document.addEventListener(\"turbo:click\", this.linkClicked);\n document.addEventListener(\"turbo:before-visit\", this.willVisit);\n }\n stop() {\n this.element.removeEventListener(\"click\", this.clickBubbled);\n document.removeEventListener(\"turbo:click\", this.linkClicked);\n document.removeEventListener(\"turbo:before-visit\", this.willVisit);\n }\n respondsToEventTarget(target) {\n const element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n return element && element.closest(\"turbo-frame, html\") == this.element;\n }\n}\nclass Bardo {\n constructor(permanentElementMap) {\n this.permanentElementMap = permanentElementMap;\n }\n static preservingPermanentElements(permanentElementMap, callback) {\n const bardo = new this(permanentElementMap);\n bardo.enter();\n callback();\n bardo.leave();\n }\n enter() {\n for (const id in this.permanentElementMap) {\n const [, newPermanentElement] = this.permanentElementMap[id];\n this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n }\n }\n leave() {\n for (const id in this.permanentElementMap) {\n const [currentPermanentElement] = this.permanentElementMap[id];\n this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n }\n }\n replaceNewPermanentElementWithPlaceholder(permanentElement) {\n const placeholder = createPlaceholderForPermanentElement(permanentElement);\n permanentElement.replaceWith(placeholder);\n }\n replaceCurrentPermanentElementWithClone(permanentElement) {\n const clone = permanentElement.cloneNode(true);\n permanentElement.replaceWith(clone);\n }\n replacePlaceholderWithPermanentElement(permanentElement) {\n const placeholder = this.getPlaceholderById(permanentElement.id);\n placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);\n }\n getPlaceholderById(id) {\n return this.placeholders.find(element => element.content == id);\n }\n get placeholders() {\n return [...document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\")];\n }\n}\nfunction createPlaceholderForPermanentElement(permanentElement) {\n const element = document.createElement(\"meta\");\n element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n element.setAttribute(\"content\", permanentElement.id);\n return element;\n}\nclass Renderer {\n constructor(currentSnapshot, newSnapshot, isPreview) {\n let willRender = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;\n this.currentSnapshot = currentSnapshot;\n this.newSnapshot = newSnapshot;\n this.isPreview = isPreview;\n this.willRender = willRender;\n this.promise = new Promise((resolve, reject) => this.resolvingFunctions = {\n resolve,\n reject\n });\n }\n get shouldRender() {\n return true;\n }\n prepareToRender() {\n return;\n }\n finishRendering() {\n if (this.resolvingFunctions) {\n this.resolvingFunctions.resolve();\n delete this.resolvingFunctions;\n }\n }\n createScriptElement(element) {\n if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n return element;\n } else {\n const createdScriptElement = document.createElement(\"script\");\n if (this.cspNonce) {\n createdScriptElement.nonce = this.cspNonce;\n }\n createdScriptElement.textContent = element.textContent;\n createdScriptElement.async = false;\n copyElementAttributes(createdScriptElement, element);\n return createdScriptElement;\n }\n }\n preservingPermanentElements(callback) {\n Bardo.preservingPermanentElements(this.permanentElementMap, callback);\n }\n focusFirstAutofocusableElement() {\n const element = this.connectedSnapshot.firstAutofocusableElement;\n if (elementIsFocusable(element)) {\n element.focus();\n }\n }\n get connectedSnapshot() {\n return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;\n }\n get currentElement() {\n return this.currentSnapshot.element;\n }\n get newElement() {\n return this.newSnapshot.element;\n }\n get permanentElementMap() {\n return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);\n }\n get cspNonce() {\n var _a;\n return (_a = document.head.querySelector('meta[name=\"csp-nonce\"]')) === null || _a === void 0 ? void 0 : _a.getAttribute(\"content\");\n }\n}\nfunction copyElementAttributes(destinationElement, sourceElement) {\n for (const {\n name,\n value\n } of [...sourceElement.attributes]) {\n destinationElement.setAttribute(name, value);\n }\n}\nfunction elementIsFocusable(element) {\n return element && typeof element.focus == \"function\";\n}\nclass FrameRenderer extends Renderer {\n get shouldRender() {\n return true;\n }\n async render() {\n await nextAnimationFrame();\n this.preservingPermanentElements(() => {\n this.loadFrameElement();\n });\n this.scrollFrameIntoView();\n await nextAnimationFrame();\n this.focusFirstAutofocusableElement();\n await nextAnimationFrame();\n this.activateScriptElements();\n }\n loadFrameElement() {\n var _a;\n const destinationRange = document.createRange();\n destinationRange.selectNodeContents(this.currentElement);\n destinationRange.deleteContents();\n const frameElement = this.newElement;\n const sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();\n if (sourceRange) {\n sourceRange.selectNodeContents(frameElement);\n this.currentElement.appendChild(sourceRange.extractContents());\n }\n }\n scrollFrameIntoView() {\n if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n const element = this.currentElement.firstElementChild;\n const block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n if (element) {\n element.scrollIntoView({\n block\n });\n return true;\n }\n }\n return false;\n }\n activateScriptElements() {\n for (const inertScriptElement of this.newScriptElements) {\n const activatedScriptElement = this.createScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n }\n get newScriptElements() {\n return this.currentElement.querySelectorAll(\"script\");\n }\n}\nfunction readScrollLogicalPosition(value, defaultValue) {\n if (value == \"end\" || value == \"start\" || value == \"center\" || value == \"nearest\") {\n return value;\n } else {\n return defaultValue;\n }\n}\nclass ProgressBar {\n constructor() {\n this.hiding = false;\n this.value = 0;\n this.visible = false;\n this.trickle = () => {\n this.setValue(this.value + Math.random() / 100);\n };\n this.stylesheetElement = this.createStylesheetElement();\n this.progressElement = this.createProgressElement();\n this.installStylesheetElement();\n this.setValue(0);\n }\n static get defaultCSS() {\n return unindent`\n .turbo-progress-bar {\n position: fixed;\n display: block;\n top: 0;\n left: 0;\n height: 3px;\n background: #0076ff;\n z-index: 9999;\n transition:\n width ${ProgressBar.animationDuration}ms ease-out,\n opacity ${ProgressBar.animationDuration / 2}ms ${ProgressBar.animationDuration / 2}ms ease-in;\n transform: translate3d(0, 0, 0);\n }\n `;\n }\n show() {\n if (!this.visible) {\n this.visible = true;\n this.installProgressElement();\n this.startTrickling();\n }\n }\n hide() {\n if (this.visible && !this.hiding) {\n this.hiding = true;\n this.fadeProgressElement(() => {\n this.uninstallProgressElement();\n this.stopTrickling();\n this.visible = false;\n this.hiding = false;\n });\n }\n }\n setValue(value) {\n this.value = value;\n this.refresh();\n }\n installStylesheetElement() {\n document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n }\n installProgressElement() {\n this.progressElement.style.width = \"0\";\n this.progressElement.style.opacity = \"1\";\n document.documentElement.insertBefore(this.progressElement, document.body);\n this.refresh();\n }\n fadeProgressElement(callback) {\n this.progressElement.style.opacity = \"0\";\n setTimeout(callback, ProgressBar.animationDuration * 1.5);\n }\n uninstallProgressElement() {\n if (this.progressElement.parentNode) {\n document.documentElement.removeChild(this.progressElement);\n }\n }\n startTrickling() {\n if (!this.trickleInterval) {\n this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n }\n }\n stopTrickling() {\n window.clearInterval(this.trickleInterval);\n delete this.trickleInterval;\n }\n refresh() {\n requestAnimationFrame(() => {\n this.progressElement.style.width = `${10 + this.value * 90}%`;\n });\n }\n createStylesheetElement() {\n const element = document.createElement(\"style\");\n element.type = \"text/css\";\n element.textContent = ProgressBar.defaultCSS;\n return element;\n }\n createProgressElement() {\n const element = document.createElement(\"div\");\n element.className = \"turbo-progress-bar\";\n return element;\n }\n}\nProgressBar.animationDuration = 300;\nclass HeadSnapshot extends Snapshot {\n constructor() {\n super(...arguments);\n this.detailsByOuterHTML = this.children.filter(element => !elementIsNoscript(element)).map(element => elementWithoutNonce(element)).reduce((result, element) => {\n const {\n outerHTML\n } = element;\n const details = outerHTML in result ? result[outerHTML] : {\n type: elementType(element),\n tracked: elementIsTracked(element),\n elements: []\n };\n return Object.assign(Object.assign({}, result), {\n [outerHTML]: Object.assign(Object.assign({}, details), {\n elements: [...details.elements, element]\n })\n });\n }, {});\n }\n get trackedElementSignature() {\n return Object.keys(this.detailsByOuterHTML).filter(outerHTML => this.detailsByOuterHTML[outerHTML].tracked).join(\"\");\n }\n getScriptElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot);\n }\n getStylesheetElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot);\n }\n getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n return Object.keys(this.detailsByOuterHTML).filter(outerHTML => !(outerHTML in snapshot.detailsByOuterHTML)).map(outerHTML => this.detailsByOuterHTML[outerHTML]).filter(_ref3 => {\n let {\n type\n } = _ref3;\n return type == matchedType;\n }).map(_ref4 => {\n let {\n elements: [element]\n } = _ref4;\n return element;\n });\n }\n get provisionalElements() {\n return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n const {\n type,\n tracked,\n elements\n } = this.detailsByOuterHTML[outerHTML];\n if (type == null && !tracked) {\n return [...result, ...elements];\n } else if (elements.length > 1) {\n return [...result, ...elements.slice(1)];\n } else {\n return result;\n }\n }, []);\n }\n getMetaValue(name) {\n const element = this.findMetaElementByName(name);\n return element ? element.getAttribute(\"content\") : null;\n }\n findMetaElementByName(name) {\n return Object.keys(this.detailsByOuterHTML).reduce((result, outerHTML) => {\n const {\n elements: [element]\n } = this.detailsByOuterHTML[outerHTML];\n return elementIsMetaElementWithName(element, name) ? element : result;\n }, undefined);\n }\n}\nfunction elementType(element) {\n if (elementIsScript(element)) {\n return \"script\";\n } else if (elementIsStylesheet(element)) {\n return \"stylesheet\";\n }\n}\nfunction elementIsTracked(element) {\n return element.getAttribute(\"data-turbo-track\") == \"reload\";\n}\nfunction elementIsScript(element) {\n const tagName = element.tagName.toLowerCase();\n return tagName == \"script\";\n}\nfunction elementIsNoscript(element) {\n const tagName = element.tagName.toLowerCase();\n return tagName == \"noscript\";\n}\nfunction elementIsStylesheet(element) {\n const tagName = element.tagName.toLowerCase();\n return tagName == \"style\" || tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\";\n}\nfunction elementIsMetaElementWithName(element, name) {\n const tagName = element.tagName.toLowerCase();\n return tagName == \"meta\" && element.getAttribute(\"name\") == name;\n}\nfunction elementWithoutNonce(element) {\n if (element.hasAttribute(\"nonce\")) {\n element.setAttribute(\"nonce\", \"\");\n }\n return element;\n}\nclass PageSnapshot extends Snapshot {\n constructor(element, headSnapshot) {\n super(element);\n this.headSnapshot = headSnapshot;\n }\n static fromHTMLString() {\n let html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n return this.fromDocument(parseHTMLDocument(html));\n }\n static fromElement(element) {\n return this.fromDocument(element.ownerDocument);\n }\n static fromDocument(_ref5) {\n let {\n head,\n body\n } = _ref5;\n return new this(body, new HeadSnapshot(head));\n }\n clone() {\n return new PageSnapshot(this.element.cloneNode(true), this.headSnapshot);\n }\n get headElement() {\n return this.headSnapshot.element;\n }\n get rootLocation() {\n var _a;\n const root = (_a = this.getSetting(\"root\")) !== null && _a !== void 0 ? _a : \"/\";\n return expandURL(root);\n }\n get cacheControlValue() {\n return this.getSetting(\"cache-control\");\n }\n get isPreviewable() {\n return this.cacheControlValue != \"no-preview\";\n }\n get isCacheable() {\n return this.cacheControlValue != \"no-cache\";\n }\n get isVisitable() {\n return this.getSetting(\"visit-control\") != \"reload\";\n }\n getSetting(name) {\n return this.headSnapshot.getMetaValue(`turbo-${name}`);\n }\n}\nvar TimingMetric;\n(function (TimingMetric) {\n TimingMetric[\"visitStart\"] = \"visitStart\";\n TimingMetric[\"requestStart\"] = \"requestStart\";\n TimingMetric[\"requestEnd\"] = \"requestEnd\";\n TimingMetric[\"visitEnd\"] = \"visitEnd\";\n})(TimingMetric || (TimingMetric = {}));\nvar VisitState;\n(function (VisitState) {\n VisitState[\"initialized\"] = \"initialized\";\n VisitState[\"started\"] = \"started\";\n VisitState[\"canceled\"] = \"canceled\";\n VisitState[\"failed\"] = \"failed\";\n VisitState[\"completed\"] = \"completed\";\n})(VisitState || (VisitState = {}));\nconst defaultOptions = {\n action: \"advance\",\n historyChanged: false,\n visitCachedSnapshot: () => {},\n willRender: true\n};\nvar SystemStatusCode;\n(function (SystemStatusCode) {\n SystemStatusCode[SystemStatusCode[\"networkFailure\"] = 0] = \"networkFailure\";\n SystemStatusCode[SystemStatusCode[\"timeoutFailure\"] = -1] = \"timeoutFailure\";\n SystemStatusCode[SystemStatusCode[\"contentTypeMismatch\"] = -2] = \"contentTypeMismatch\";\n})(SystemStatusCode || (SystemStatusCode = {}));\nclass Visit {\n constructor(delegate, location, restorationIdentifier) {\n let options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n this.identifier = uuid();\n this.timingMetrics = {};\n this.followedRedirect = false;\n this.historyChanged = false;\n this.scrolled = false;\n this.snapshotCached = false;\n this.state = VisitState.initialized;\n this.delegate = delegate;\n this.location = location;\n this.restorationIdentifier = restorationIdentifier || uuid();\n const {\n action,\n historyChanged,\n referrer,\n snapshotHTML,\n response,\n visitCachedSnapshot,\n willRender\n } = Object.assign(Object.assign({}, defaultOptions), options);\n this.action = action;\n this.historyChanged = historyChanged;\n this.referrer = referrer;\n this.snapshotHTML = snapshotHTML;\n this.response = response;\n this.isSamePage = this.delegate.locationWithActionIsSamePage(this.location, this.action);\n this.visitCachedSnapshot = visitCachedSnapshot;\n this.willRender = willRender;\n this.scrolled = !willRender;\n }\n get adapter() {\n return this.delegate.adapter;\n }\n get view() {\n return this.delegate.view;\n }\n get history() {\n return this.delegate.history;\n }\n get restorationData() {\n return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);\n }\n get silent() {\n return this.isSamePage;\n }\n start() {\n if (this.state == VisitState.initialized) {\n this.recordTimingMetric(TimingMetric.visitStart);\n this.state = VisitState.started;\n this.adapter.visitStarted(this);\n this.delegate.visitStarted(this);\n }\n }\n cancel() {\n if (this.state == VisitState.started) {\n if (this.request) {\n this.request.cancel();\n }\n this.cancelRender();\n this.state = VisitState.canceled;\n }\n }\n complete() {\n if (this.state == VisitState.started) {\n this.recordTimingMetric(TimingMetric.visitEnd);\n this.state = VisitState.completed;\n this.adapter.visitCompleted(this);\n this.delegate.visitCompleted(this);\n this.followRedirect();\n }\n }\n fail() {\n if (this.state == VisitState.started) {\n this.state = VisitState.failed;\n this.adapter.visitFailed(this);\n }\n }\n changeHistory() {\n var _a;\n if (!this.historyChanged) {\n const actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? \"replace\" : this.action;\n const method = this.getHistoryMethodForAction(actionForHistory);\n this.history.update(method, this.location, this.restorationIdentifier);\n this.historyChanged = true;\n }\n }\n issueRequest() {\n if (this.hasPreloadedResponse()) {\n this.simulateRequest();\n } else if (this.shouldIssueRequest() && !this.request) {\n this.request = new FetchRequest(this, FetchMethod.get, this.location);\n this.request.perform();\n }\n }\n simulateRequest() {\n if (this.response) {\n this.startRequest();\n this.recordResponse();\n this.finishRequest();\n }\n }\n startRequest() {\n this.recordTimingMetric(TimingMetric.requestStart);\n this.adapter.visitRequestStarted(this);\n }\n recordResponse() {\n let response = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.response;\n this.response = response;\n if (response) {\n const {\n statusCode\n } = response;\n if (isSuccessful(statusCode)) {\n this.adapter.visitRequestCompleted(this);\n } else {\n this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n }\n }\n }\n finishRequest() {\n this.recordTimingMetric(TimingMetric.requestEnd);\n this.adapter.visitRequestFinished(this);\n }\n loadResponse() {\n if (this.response) {\n const {\n statusCode,\n responseHTML\n } = this.response;\n this.render(async () => {\n this.cacheSnapshot();\n if (this.view.renderPromise) await this.view.renderPromise;\n if (isSuccessful(statusCode) && responseHTML != null) {\n await this.view.renderPage(PageSnapshot.fromHTMLString(responseHTML), false, this.willRender);\n this.adapter.visitRendered(this);\n this.complete();\n } else {\n await this.view.renderError(PageSnapshot.fromHTMLString(responseHTML));\n this.adapter.visitRendered(this);\n this.fail();\n }\n });\n }\n }\n getCachedSnapshot() {\n const snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n if (snapshot && (!getAnchor(this.location) || snapshot.hasAnchor(getAnchor(this.location)))) {\n if (this.action == \"restore\" || snapshot.isPreviewable) {\n return snapshot;\n }\n }\n }\n getPreloadedSnapshot() {\n if (this.snapshotHTML) {\n return PageSnapshot.fromHTMLString(this.snapshotHTML);\n }\n }\n hasCachedSnapshot() {\n return this.getCachedSnapshot() != null;\n }\n loadCachedSnapshot() {\n const snapshot = this.getCachedSnapshot();\n if (snapshot) {\n const isPreview = this.shouldIssueRequest();\n this.render(async () => {\n this.cacheSnapshot();\n if (this.isSamePage) {\n this.adapter.visitRendered(this);\n } else {\n if (this.view.renderPromise) await this.view.renderPromise;\n await this.view.renderPage(snapshot, isPreview, this.willRender);\n this.adapter.visitRendered(this);\n if (!isPreview) {\n this.complete();\n }\n }\n });\n }\n }\n followRedirect() {\n var _a;\n if (this.redirectedToLocation && !this.followedRedirect && ((_a = this.response) === null || _a === void 0 ? void 0 : _a.redirected)) {\n this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n action: 'replace',\n response: this.response\n });\n this.followedRedirect = true;\n }\n }\n goToSamePageAnchor() {\n if (this.isSamePage) {\n this.render(async () => {\n this.cacheSnapshot();\n this.adapter.visitRendered(this);\n });\n }\n }\n requestStarted() {\n this.startRequest();\n }\n requestPreventedHandlingResponse(request, response) {}\n async requestSucceededWithResponse(request, response) {\n const responseHTML = await response.responseHTML;\n const {\n redirected,\n statusCode\n } = response;\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch,\n redirected\n });\n } else {\n this.redirectedToLocation = response.redirected ? response.location : undefined;\n this.recordResponse({\n statusCode: statusCode,\n responseHTML,\n redirected\n });\n }\n }\n async requestFailedWithResponse(request, response) {\n const responseHTML = await response.responseHTML;\n const {\n redirected,\n statusCode\n } = response;\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch,\n redirected\n });\n } else {\n this.recordResponse({\n statusCode: statusCode,\n responseHTML,\n redirected\n });\n }\n }\n requestErrored(request, error) {\n this.recordResponse({\n statusCode: SystemStatusCode.networkFailure,\n redirected: false\n });\n }\n requestFinished() {\n this.finishRequest();\n }\n performScroll() {\n if (!this.scrolled) {\n if (this.action == \"restore\") {\n this.scrollToRestoredPosition() || this.scrollToAnchor() || this.view.scrollToTop();\n } else {\n this.scrollToAnchor() || this.view.scrollToTop();\n }\n if (this.isSamePage) {\n this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);\n }\n this.scrolled = true;\n }\n }\n scrollToRestoredPosition() {\n const {\n scrollPosition\n } = this.restorationData;\n if (scrollPosition) {\n this.view.scrollToPosition(scrollPosition);\n return true;\n }\n }\n scrollToAnchor() {\n const anchor = getAnchor(this.location);\n if (anchor != null) {\n this.view.scrollToAnchor(anchor);\n return true;\n }\n }\n recordTimingMetric(metric) {\n this.timingMetrics[metric] = new Date().getTime();\n }\n getTimingMetrics() {\n return Object.assign({}, this.timingMetrics);\n }\n getHistoryMethodForAction(action) {\n switch (action) {\n case \"replace\":\n return history.replaceState;\n case \"advance\":\n case \"restore\":\n return history.pushState;\n }\n }\n hasPreloadedResponse() {\n return typeof this.response == \"object\";\n }\n shouldIssueRequest() {\n if (this.isSamePage) {\n return false;\n } else if (this.action == \"restore\") {\n return !this.hasCachedSnapshot();\n } else {\n return this.willRender;\n }\n }\n cacheSnapshot() {\n if (!this.snapshotCached) {\n this.view.cacheSnapshot().then(snapshot => snapshot && this.visitCachedSnapshot(snapshot));\n this.snapshotCached = true;\n }\n }\n async render(callback) {\n this.cancelRender();\n await new Promise(resolve => {\n this.frame = requestAnimationFrame(() => resolve());\n });\n await callback();\n delete this.frame;\n this.performScroll();\n }\n cancelRender() {\n if (this.frame) {\n cancelAnimationFrame(this.frame);\n delete this.frame;\n }\n }\n}\nfunction isSuccessful(statusCode) {\n return statusCode >= 200 && statusCode < 300;\n}\nclass BrowserAdapter {\n constructor(session) {\n this.progressBar = new ProgressBar();\n this.showProgressBar = () => {\n this.progressBar.show();\n };\n this.session = session;\n }\n visitProposedToLocation(location, options) {\n this.navigator.startVisit(location, uuid(), options);\n }\n visitStarted(visit) {\n visit.loadCachedSnapshot();\n visit.issueRequest();\n visit.changeHistory();\n visit.goToSamePageAnchor();\n }\n visitRequestStarted(visit) {\n this.progressBar.setValue(0);\n if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n this.showVisitProgressBarAfterDelay();\n } else {\n this.showProgressBar();\n }\n }\n visitRequestCompleted(visit) {\n visit.loadResponse();\n }\n visitRequestFailedWithStatusCode(visit, statusCode) {\n switch (statusCode) {\n case SystemStatusCode.networkFailure:\n case SystemStatusCode.timeoutFailure:\n case SystemStatusCode.contentTypeMismatch:\n return this.reload();\n default:\n return visit.loadResponse();\n }\n }\n visitRequestFinished(visit) {\n this.progressBar.setValue(1);\n this.hideVisitProgressBar();\n }\n visitCompleted(visit) {}\n pageInvalidated() {\n this.reload();\n }\n visitFailed(visit) {}\n visitRendered(visit) {}\n formSubmissionStarted(formSubmission) {\n this.progressBar.setValue(0);\n this.showFormProgressBarAfterDelay();\n }\n formSubmissionFinished(formSubmission) {\n this.progressBar.setValue(1);\n this.hideFormProgressBar();\n }\n showVisitProgressBarAfterDelay() {\n this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n hideVisitProgressBar() {\n this.progressBar.hide();\n if (this.visitProgressBarTimeout != null) {\n window.clearTimeout(this.visitProgressBarTimeout);\n delete this.visitProgressBarTimeout;\n }\n }\n showFormProgressBarAfterDelay() {\n if (this.formProgressBarTimeout == null) {\n this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n }\n hideFormProgressBar() {\n this.progressBar.hide();\n if (this.formProgressBarTimeout != null) {\n window.clearTimeout(this.formProgressBarTimeout);\n delete this.formProgressBarTimeout;\n }\n }\n reload() {\n window.location.reload();\n }\n get navigator() {\n return this.session.navigator;\n }\n}\nclass CacheObserver {\n constructor() {\n this.started = false;\n }\n start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n }\n }\n removeStaleElements() {\n const staleElements = [...document.querySelectorAll('[data-turbo-cache=\"false\"]')];\n for (const element of staleElements) {\n element.remove();\n }\n }\n}\nclass FormSubmitObserver {\n constructor(delegate) {\n this.started = false;\n this.submitCaptured = () => {\n removeEventListener(\"submit\", this.submitBubbled, false);\n addEventListener(\"submit\", this.submitBubbled, false);\n };\n this.submitBubbled = event => {\n if (!event.defaultPrevented) {\n const form = event.target instanceof HTMLFormElement ? event.target : undefined;\n const submitter = event.submitter || undefined;\n if (form) {\n const method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.getAttribute(\"method\");\n if (method != \"dialog\" && this.delegate.willSubmitForm(form, submitter)) {\n event.preventDefault();\n this.delegate.formSubmitted(form, submitter);\n }\n }\n }\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n addEventListener(\"submit\", this.submitCaptured, true);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n removeEventListener(\"submit\", this.submitCaptured, true);\n this.started = false;\n }\n }\n}\nclass FrameRedirector {\n constructor(element) {\n this.element = element;\n this.linkInterceptor = new LinkInterceptor(this, element);\n this.formInterceptor = new FormInterceptor(this, element);\n }\n start() {\n this.linkInterceptor.start();\n this.formInterceptor.start();\n }\n stop() {\n this.linkInterceptor.stop();\n this.formInterceptor.stop();\n }\n shouldInterceptLinkClick(element, url) {\n return this.shouldRedirect(element);\n }\n linkClickIntercepted(element, url) {\n const frame = this.findFrameElement(element);\n if (frame) {\n frame.delegate.linkClickIntercepted(element, url);\n }\n }\n shouldInterceptFormSubmission(element, submitter) {\n return this.shouldSubmit(element, submitter);\n }\n formSubmissionIntercepted(element, submitter) {\n const frame = this.findFrameElement(element, submitter);\n if (frame) {\n frame.removeAttribute(\"reloadable\");\n frame.delegate.formSubmissionIntercepted(element, submitter);\n }\n }\n shouldSubmit(form, submitter) {\n var _a;\n const action = getAction(form, submitter);\n const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n const rootLocation = expandURL((_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\");\n return this.shouldRedirect(form, submitter) && locationIsVisitable(action, rootLocation);\n }\n shouldRedirect(element, submitter) {\n const frame = this.findFrameElement(element, submitter);\n return frame ? frame != element.closest(\"turbo-frame\") : false;\n }\n findFrameElement(element, submitter) {\n const id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\");\n if (id && id != \"_top\") {\n const frame = this.element.querySelector(`#${id}:not([disabled])`);\n if (frame instanceof FrameElement) {\n return frame;\n }\n }\n }\n}\nclass History {\n constructor(delegate) {\n this.restorationIdentifier = uuid();\n this.restorationData = {};\n this.started = false;\n this.pageLoaded = false;\n this.onPopState = event => {\n if (this.shouldHandlePopState()) {\n const {\n turbo\n } = event.state || {};\n if (turbo) {\n this.location = new URL(window.location.href);\n const {\n restorationIdentifier\n } = turbo;\n this.restorationIdentifier = restorationIdentifier;\n this.delegate.historyPoppedToLocationWithRestorationIdentifier(this.location, restorationIdentifier);\n }\n }\n };\n this.onPageLoad = async event => {\n await nextMicrotask();\n this.pageLoaded = true;\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n addEventListener(\"popstate\", this.onPopState, false);\n addEventListener(\"load\", this.onPageLoad, false);\n this.started = true;\n this.replace(new URL(window.location.href));\n }\n }\n stop() {\n if (this.started) {\n removeEventListener(\"popstate\", this.onPopState, false);\n removeEventListener(\"load\", this.onPageLoad, false);\n this.started = false;\n }\n }\n push(location, restorationIdentifier) {\n this.update(history.pushState, location, restorationIdentifier);\n }\n replace(location, restorationIdentifier) {\n this.update(history.replaceState, location, restorationIdentifier);\n }\n update(method, location) {\n let restorationIdentifier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : uuid();\n const state = {\n turbo: {\n restorationIdentifier\n }\n };\n method.call(history, state, \"\", location.href);\n this.location = location;\n this.restorationIdentifier = restorationIdentifier;\n }\n getRestorationDataForIdentifier(restorationIdentifier) {\n return this.restorationData[restorationIdentifier] || {};\n }\n updateRestorationData(additionalData) {\n const {\n restorationIdentifier\n } = this;\n const restorationData = this.restorationData[restorationIdentifier];\n this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);\n }\n assumeControlOfScrollRestoration() {\n var _a;\n if (!this.previousScrollRestoration) {\n this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : \"auto\";\n history.scrollRestoration = \"manual\";\n }\n }\n relinquishControlOfScrollRestoration() {\n if (this.previousScrollRestoration) {\n history.scrollRestoration = this.previousScrollRestoration;\n delete this.previousScrollRestoration;\n }\n }\n shouldHandlePopState() {\n return this.pageIsLoaded();\n }\n pageIsLoaded() {\n return this.pageLoaded || document.readyState == \"complete\";\n }\n}\nclass LinkClickObserver {\n constructor(delegate) {\n this.started = false;\n this.clickCaptured = () => {\n removeEventListener(\"click\", this.clickBubbled, false);\n addEventListener(\"click\", this.clickBubbled, false);\n };\n this.clickBubbled = event => {\n if (this.clickEventIsSignificant(event)) {\n const target = event.composedPath && event.composedPath()[0] || event.target;\n const link = this.findLinkFromClickTarget(target);\n if (link) {\n const location = this.getLocationForLink(link);\n if (this.delegate.willFollowLinkToLocation(link, location)) {\n event.preventDefault();\n this.delegate.followedLinkToLocation(link, location);\n }\n }\n }\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n addEventListener(\"click\", this.clickCaptured, true);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n removeEventListener(\"click\", this.clickCaptured, true);\n this.started = false;\n }\n }\n clickEventIsSignificant(event) {\n return !(event.target && event.target.isContentEditable || event.defaultPrevented || event.which > 1 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);\n }\n findLinkFromClickTarget(target) {\n if (target instanceof Element) {\n return target.closest(\"a[href]:not([target^=_]):not([download])\");\n }\n }\n getLocationForLink(link) {\n return expandURL(link.getAttribute(\"href\") || \"\");\n }\n}\nfunction isAction(action) {\n return action == \"advance\" || action == \"replace\" || action == \"restore\";\n}\nclass Navigator {\n constructor(delegate) {\n this.delegate = delegate;\n }\n proposeVisit(location) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n if (locationIsVisitable(location, this.view.snapshot.rootLocation)) {\n this.delegate.visitProposedToLocation(location, options);\n } else {\n window.location.href = location.toString();\n }\n }\n }\n startVisit(locatable, restorationIdentifier) {\n let options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};\n this.stop();\n this.currentVisit = new Visit(this, expandURL(locatable), restorationIdentifier, Object.assign({\n referrer: this.location\n }, options));\n this.currentVisit.start();\n }\n submitForm(form, submitter) {\n this.stop();\n this.formSubmission = new FormSubmission(this, form, submitter, true);\n this.formSubmission.start();\n }\n stop() {\n if (this.formSubmission) {\n this.formSubmission.stop();\n delete this.formSubmission;\n }\n if (this.currentVisit) {\n this.currentVisit.cancel();\n delete this.currentVisit;\n }\n }\n get adapter() {\n return this.delegate.adapter;\n }\n get view() {\n return this.delegate.view;\n }\n get history() {\n return this.delegate.history;\n }\n formSubmissionStarted(formSubmission) {\n if (typeof this.adapter.formSubmissionStarted === 'function') {\n this.adapter.formSubmissionStarted(formSubmission);\n }\n }\n async formSubmissionSucceededWithResponse(formSubmission, fetchResponse) {\n if (formSubmission == this.formSubmission) {\n const responseHTML = await fetchResponse.responseHTML;\n if (responseHTML) {\n if (formSubmission.method != FetchMethod.get) {\n this.view.clearSnapshotCache();\n }\n const {\n statusCode,\n redirected\n } = fetchResponse;\n const action = this.getActionForFormSubmission(formSubmission);\n const visitOptions = {\n action,\n response: {\n statusCode,\n responseHTML,\n redirected\n }\n };\n this.proposeVisit(fetchResponse.location, visitOptions);\n }\n }\n }\n async formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n const responseHTML = await fetchResponse.responseHTML;\n if (responseHTML) {\n const snapshot = PageSnapshot.fromHTMLString(responseHTML);\n if (fetchResponse.serverError) {\n await this.view.renderError(snapshot);\n } else {\n await this.view.renderPage(snapshot);\n }\n this.view.scrollToTop();\n this.view.clearSnapshotCache();\n }\n }\n formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n formSubmissionFinished(formSubmission) {\n if (typeof this.adapter.formSubmissionFinished === 'function') {\n this.adapter.formSubmissionFinished(formSubmission);\n }\n }\n visitStarted(visit) {\n this.delegate.visitStarted(visit);\n }\n visitCompleted(visit) {\n this.delegate.visitCompleted(visit);\n }\n locationWithActionIsSamePage(location, action) {\n const anchor = getAnchor(location);\n const currentAnchor = getAnchor(this.view.lastRenderedLocation);\n const isRestorationToTop = action === 'restore' && typeof anchor === 'undefined';\n return action !== \"replace\" && getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) && (isRestorationToTop || anchor != null && anchor !== currentAnchor);\n }\n visitScrolledToSamePageLocation(oldURL, newURL) {\n this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);\n }\n get location() {\n return this.history.location;\n }\n get restorationIdentifier() {\n return this.history.restorationIdentifier;\n }\n getActionForFormSubmission(formSubmission) {\n const {\n formElement,\n submitter\n } = formSubmission;\n const action = getAttribute(\"data-turbo-action\", submitter, formElement);\n return isAction(action) ? action : \"advance\";\n }\n}\nvar PageStage;\n(function (PageStage) {\n PageStage[PageStage[\"initial\"] = 0] = \"initial\";\n PageStage[PageStage[\"loading\"] = 1] = \"loading\";\n PageStage[PageStage[\"interactive\"] = 2] = \"interactive\";\n PageStage[PageStage[\"complete\"] = 3] = \"complete\";\n})(PageStage || (PageStage = {}));\nclass PageObserver {\n constructor(delegate) {\n this.stage = PageStage.initial;\n this.started = false;\n this.interpretReadyState = () => {\n const {\n readyState\n } = this;\n if (readyState == \"interactive\") {\n this.pageIsInteractive();\n } else if (readyState == \"complete\") {\n this.pageIsComplete();\n }\n };\n this.pageWillUnload = () => {\n this.delegate.pageWillUnload();\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n if (this.stage == PageStage.initial) {\n this.stage = PageStage.loading;\n }\n document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n addEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n document.removeEventListener(\"readystatechange\", this.interpretReadyState, false);\n removeEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = false;\n }\n }\n pageIsInteractive() {\n if (this.stage == PageStage.loading) {\n this.stage = PageStage.interactive;\n this.delegate.pageBecameInteractive();\n }\n }\n pageIsComplete() {\n this.pageIsInteractive();\n if (this.stage == PageStage.interactive) {\n this.stage = PageStage.complete;\n this.delegate.pageLoaded();\n }\n }\n get readyState() {\n return document.readyState;\n }\n}\nclass ScrollObserver {\n constructor(delegate) {\n this.started = false;\n this.onScroll = () => {\n this.updatePosition({\n x: window.pageXOffset,\n y: window.pageYOffset\n });\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n addEventListener(\"scroll\", this.onScroll, false);\n this.onScroll();\n this.started = true;\n }\n }\n stop() {\n if (this.started) {\n removeEventListener(\"scroll\", this.onScroll, false);\n this.started = false;\n }\n }\n updatePosition(position) {\n this.delegate.scrollPositionChanged(position);\n }\n}\nclass StreamObserver {\n constructor(delegate) {\n this.sources = new Set();\n this.started = false;\n this.inspectFetchResponse = event => {\n const response = fetchResponseFromEvent(event);\n if (response && fetchResponseIsStream(response)) {\n event.preventDefault();\n this.receiveMessageResponse(response);\n }\n };\n this.receiveMessageEvent = event => {\n if (this.started && typeof event.data == \"string\") {\n this.receiveMessageHTML(event.data);\n }\n };\n this.delegate = delegate;\n }\n start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n connectStreamSource(source) {\n if (!this.streamSourceIsConnected(source)) {\n this.sources.add(source);\n source.addEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n disconnectStreamSource(source) {\n if (this.streamSourceIsConnected(source)) {\n this.sources.delete(source);\n source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n streamSourceIsConnected(source) {\n return this.sources.has(source);\n }\n async receiveMessageResponse(response) {\n const html = await response.responseHTML;\n if (html) {\n this.receiveMessageHTML(html);\n }\n }\n receiveMessageHTML(html) {\n this.delegate.receivedMessageFromStream(new StreamMessage(html));\n }\n}\nfunction fetchResponseFromEvent(event) {\n var _a;\n const fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;\n if (fetchResponse instanceof FetchResponse) {\n return fetchResponse;\n }\n}\nfunction fetchResponseIsStream(response) {\n var _a;\n const contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : \"\";\n return contentType.startsWith(StreamMessage.contentType);\n}\nclass ErrorRenderer extends Renderer {\n async render() {\n this.replaceHeadAndBody();\n this.activateScriptElements();\n }\n replaceHeadAndBody() {\n const {\n documentElement,\n head,\n body\n } = document;\n documentElement.replaceChild(this.newHead, head);\n documentElement.replaceChild(this.newElement, body);\n }\n activateScriptElements() {\n for (const replaceableElement of this.scriptElements) {\n const parentNode = replaceableElement.parentNode;\n if (parentNode) {\n const element = this.createScriptElement(replaceableElement);\n parentNode.replaceChild(element, replaceableElement);\n }\n }\n }\n get newHead() {\n return this.newSnapshot.headSnapshot.element;\n }\n get scriptElements() {\n return [...document.documentElement.querySelectorAll(\"script\")];\n }\n}\nclass PageRenderer extends Renderer {\n get shouldRender() {\n return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;\n }\n prepareToRender() {\n this.mergeHead();\n }\n async render() {\n if (this.willRender) {\n this.replaceBody();\n }\n }\n finishRendering() {\n super.finishRendering();\n if (!this.isPreview) {\n this.focusFirstAutofocusableElement();\n }\n }\n get currentHeadSnapshot() {\n return this.currentSnapshot.headSnapshot;\n }\n get newHeadSnapshot() {\n return this.newSnapshot.headSnapshot;\n }\n get newElement() {\n return this.newSnapshot.element;\n }\n mergeHead() {\n this.copyNewHeadStylesheetElements();\n this.copyNewHeadScriptElements();\n this.removeCurrentHeadProvisionalElements();\n this.copyNewHeadProvisionalElements();\n }\n replaceBody() {\n this.preservingPermanentElements(() => {\n this.activateNewBody();\n this.assignNewBody();\n });\n }\n get trackedElementsAreIdentical() {\n return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;\n }\n copyNewHeadStylesheetElements() {\n for (const element of this.newHeadStylesheetElements) {\n document.head.appendChild(element);\n }\n }\n copyNewHeadScriptElements() {\n for (const element of this.newHeadScriptElements) {\n document.head.appendChild(this.createScriptElement(element));\n }\n }\n removeCurrentHeadProvisionalElements() {\n for (const element of this.currentHeadProvisionalElements) {\n document.head.removeChild(element);\n }\n }\n copyNewHeadProvisionalElements() {\n for (const element of this.newHeadProvisionalElements) {\n document.head.appendChild(element);\n }\n }\n activateNewBody() {\n document.adoptNode(this.newElement);\n this.activateNewBodyScriptElements();\n }\n activateNewBodyScriptElements() {\n for (const inertScriptElement of this.newBodyScriptElements) {\n const activatedScriptElement = this.createScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n }\n assignNewBody() {\n if (document.body && this.newElement instanceof HTMLBodyElement) {\n document.body.replaceWith(this.newElement);\n } else {\n document.documentElement.appendChild(this.newElement);\n }\n }\n get newHeadStylesheetElements() {\n return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n get newHeadScriptElements() {\n return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n get currentHeadProvisionalElements() {\n return this.currentHeadSnapshot.provisionalElements;\n }\n get newHeadProvisionalElements() {\n return this.newHeadSnapshot.provisionalElements;\n }\n get newBodyScriptElements() {\n return this.newElement.querySelectorAll(\"script\");\n }\n}\nclass SnapshotCache {\n constructor(size) {\n this.keys = [];\n this.snapshots = {};\n this.size = size;\n }\n has(location) {\n return toCacheKey(location) in this.snapshots;\n }\n get(location) {\n if (this.has(location)) {\n const snapshot = this.read(location);\n this.touch(location);\n return snapshot;\n }\n }\n put(location, snapshot) {\n this.write(location, snapshot);\n this.touch(location);\n return snapshot;\n }\n clear() {\n this.snapshots = {};\n }\n read(location) {\n return this.snapshots[toCacheKey(location)];\n }\n write(location, snapshot) {\n this.snapshots[toCacheKey(location)] = snapshot;\n }\n touch(location) {\n const key = toCacheKey(location);\n const index = this.keys.indexOf(key);\n if (index > -1) this.keys.splice(index, 1);\n this.keys.unshift(key);\n this.trim();\n }\n trim() {\n for (const key of this.keys.splice(this.size)) {\n delete this.snapshots[key];\n }\n }\n}\nclass PageView extends View {\n constructor() {\n super(...arguments);\n this.snapshotCache = new SnapshotCache(10);\n this.lastRenderedLocation = new URL(location.href);\n }\n renderPage(snapshot) {\n let isPreview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n let willRender = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;\n const renderer = new PageRenderer(this.snapshot, snapshot, isPreview, willRender);\n return this.render(renderer);\n }\n renderError(snapshot) {\n const renderer = new ErrorRenderer(this.snapshot, snapshot, false);\n return this.render(renderer);\n }\n clearSnapshotCache() {\n this.snapshotCache.clear();\n }\n async cacheSnapshot() {\n if (this.shouldCacheSnapshot) {\n this.delegate.viewWillCacheSnapshot();\n const {\n snapshot,\n lastRenderedLocation: location\n } = this;\n await nextEventLoopTick();\n const cachedSnapshot = snapshot.clone();\n this.snapshotCache.put(location, cachedSnapshot);\n return cachedSnapshot;\n }\n }\n getCachedSnapshotForLocation(location) {\n return this.snapshotCache.get(location);\n }\n get snapshot() {\n return PageSnapshot.fromElement(this.element);\n }\n get shouldCacheSnapshot() {\n return this.snapshot.isCacheable;\n }\n}\nclass Session {\n constructor() {\n this.navigator = new Navigator(this);\n this.history = new History(this);\n this.view = new PageView(this, document.documentElement);\n this.adapter = new BrowserAdapter(this);\n this.pageObserver = new PageObserver(this);\n this.cacheObserver = new CacheObserver();\n this.linkClickObserver = new LinkClickObserver(this);\n this.formSubmitObserver = new FormSubmitObserver(this);\n this.scrollObserver = new ScrollObserver(this);\n this.streamObserver = new StreamObserver(this);\n this.frameRedirector = new FrameRedirector(document.documentElement);\n this.drive = true;\n this.enabled = true;\n this.progressBarDelay = 500;\n this.started = false;\n }\n start() {\n if (!this.started) {\n this.pageObserver.start();\n this.cacheObserver.start();\n this.linkClickObserver.start();\n this.formSubmitObserver.start();\n this.scrollObserver.start();\n this.streamObserver.start();\n this.frameRedirector.start();\n this.history.start();\n this.started = true;\n this.enabled = true;\n }\n }\n disable() {\n this.enabled = false;\n }\n stop() {\n if (this.started) {\n this.pageObserver.stop();\n this.cacheObserver.stop();\n this.linkClickObserver.stop();\n this.formSubmitObserver.stop();\n this.scrollObserver.stop();\n this.streamObserver.stop();\n this.frameRedirector.stop();\n this.history.stop();\n this.started = false;\n }\n }\n registerAdapter(adapter) {\n this.adapter = adapter;\n }\n visit(location) {\n let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.navigator.proposeVisit(expandURL(location), options);\n }\n connectStreamSource(source) {\n this.streamObserver.connectStreamSource(source);\n }\n disconnectStreamSource(source) {\n this.streamObserver.disconnectStreamSource(source);\n }\n renderStreamMessage(message) {\n document.documentElement.appendChild(StreamMessage.wrap(message).fragment);\n }\n clearCache() {\n this.view.clearSnapshotCache();\n }\n setProgressBarDelay(delay) {\n this.progressBarDelay = delay;\n }\n get location() {\n return this.history.location;\n }\n get restorationIdentifier() {\n return this.history.restorationIdentifier;\n }\n historyPoppedToLocationWithRestorationIdentifier(location, restorationIdentifier) {\n if (this.enabled) {\n this.navigator.startVisit(location, restorationIdentifier, {\n action: \"restore\",\n historyChanged: true\n });\n } else {\n this.adapter.pageInvalidated();\n }\n }\n scrollPositionChanged(position) {\n this.history.updateRestorationData({\n scrollPosition: position\n });\n }\n willFollowLinkToLocation(link, location) {\n return this.elementDriveEnabled(link) && locationIsVisitable(location, this.snapshot.rootLocation) && this.applicationAllowsFollowingLinkToLocation(link, location);\n }\n followedLinkToLocation(link, location) {\n const action = this.getActionForLink(link);\n this.convertLinkWithMethodClickToFormSubmission(link) || this.visit(location.href, {\n action\n });\n }\n convertLinkWithMethodClickToFormSubmission(link) {\n const linkMethod = link.getAttribute(\"data-turbo-method\");\n if (linkMethod) {\n const form = document.createElement(\"form\");\n form.method = linkMethod;\n form.action = link.getAttribute(\"href\") || \"undefined\";\n form.hidden = true;\n if (link.hasAttribute(\"data-turbo-confirm\")) {\n form.setAttribute(\"data-turbo-confirm\", link.getAttribute(\"data-turbo-confirm\"));\n }\n const frame = this.getTargetFrameForLink(link);\n if (frame) {\n form.setAttribute(\"data-turbo-frame\", frame);\n form.addEventListener(\"turbo:submit-start\", () => form.remove());\n } else {\n form.addEventListener(\"submit\", () => form.remove());\n }\n document.body.appendChild(form);\n return dispatch(\"submit\", {\n cancelable: true,\n target: form\n });\n } else {\n return false;\n }\n }\n allowsVisitingLocationWithAction(location, action) {\n return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);\n }\n visitProposedToLocation(location, options) {\n extendURLWithDeprecatedProperties(location);\n this.adapter.visitProposedToLocation(location, options);\n }\n visitStarted(visit) {\n extendURLWithDeprecatedProperties(visit.location);\n if (!visit.silent) {\n this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n }\n }\n visitCompleted(visit) {\n this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n }\n locationWithActionIsSamePage(location, action) {\n return this.navigator.locationWithActionIsSamePage(location, action);\n }\n visitScrolledToSamePageLocation(oldURL, newURL) {\n this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);\n }\n willSubmitForm(form, submitter) {\n const action = getAction(form, submitter);\n return this.elementDriveEnabled(form) && (!submitter || this.elementDriveEnabled(submitter)) && locationIsVisitable(expandURL(action), this.snapshot.rootLocation);\n }\n formSubmitted(form, submitter) {\n this.navigator.submitForm(form, submitter);\n }\n pageBecameInteractive() {\n this.view.lastRenderedLocation = this.location;\n this.notifyApplicationAfterPageLoad();\n }\n pageLoaded() {\n this.history.assumeControlOfScrollRestoration();\n }\n pageWillUnload() {\n this.history.relinquishControlOfScrollRestoration();\n }\n receivedMessageFromStream(message) {\n this.renderStreamMessage(message);\n }\n viewWillCacheSnapshot() {\n var _a;\n if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {\n this.notifyApplicationBeforeCachingSnapshot();\n }\n }\n allowsImmediateRender(_ref6, resume) {\n let {\n element\n } = _ref6;\n const event = this.notifyApplicationBeforeRender(element, resume);\n return !event.defaultPrevented;\n }\n viewRenderedSnapshot(snapshot, isPreview) {\n this.view.lastRenderedLocation = this.history.location;\n this.notifyApplicationAfterRender();\n }\n viewInvalidated() {\n this.adapter.pageInvalidated();\n }\n frameLoaded(frame) {\n this.notifyApplicationAfterFrameLoad(frame);\n }\n frameRendered(fetchResponse, frame) {\n this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n }\n applicationAllowsFollowingLinkToLocation(link, location) {\n const event = this.notifyApplicationAfterClickingLinkToLocation(link, location);\n return !event.defaultPrevented;\n }\n applicationAllowsVisitingLocation(location) {\n const event = this.notifyApplicationBeforeVisitingLocation(location);\n return !event.defaultPrevented;\n }\n notifyApplicationAfterClickingLinkToLocation(link, location) {\n return dispatch(\"turbo:click\", {\n target: link,\n detail: {\n url: location.href\n },\n cancelable: true\n });\n }\n notifyApplicationBeforeVisitingLocation(location) {\n return dispatch(\"turbo:before-visit\", {\n detail: {\n url: location.href\n },\n cancelable: true\n });\n }\n notifyApplicationAfterVisitingLocation(location, action) {\n markAsBusy(document.documentElement);\n return dispatch(\"turbo:visit\", {\n detail: {\n url: location.href,\n action\n }\n });\n }\n notifyApplicationBeforeCachingSnapshot() {\n return dispatch(\"turbo:before-cache\");\n }\n notifyApplicationBeforeRender(newBody, resume) {\n return dispatch(\"turbo:before-render\", {\n detail: {\n newBody,\n resume\n },\n cancelable: true\n });\n }\n notifyApplicationAfterRender() {\n return dispatch(\"turbo:render\");\n }\n notifyApplicationAfterPageLoad() {\n let timing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n clearBusyState(document.documentElement);\n return dispatch(\"turbo:load\", {\n detail: {\n url: this.location.href,\n timing\n }\n });\n }\n notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {\n dispatchEvent(new HashChangeEvent(\"hashchange\", {\n oldURL: oldURL.toString(),\n newURL: newURL.toString()\n }));\n }\n notifyApplicationAfterFrameLoad(frame) {\n return dispatch(\"turbo:frame-load\", {\n target: frame\n });\n }\n notifyApplicationAfterFrameRender(fetchResponse, frame) {\n return dispatch(\"turbo:frame-render\", {\n detail: {\n fetchResponse\n },\n target: frame,\n cancelable: true\n });\n }\n elementDriveEnabled(element) {\n const container = element === null || element === void 0 ? void 0 : element.closest(\"[data-turbo]\");\n if (this.drive) {\n if (container) {\n return container.getAttribute(\"data-turbo\") != \"false\";\n } else {\n return true;\n }\n } else {\n if (container) {\n return container.getAttribute(\"data-turbo\") == \"true\";\n } else {\n return false;\n }\n }\n }\n getActionForLink(link) {\n const action = link.getAttribute(\"data-turbo-action\");\n return isAction(action) ? action : \"advance\";\n }\n getTargetFrameForLink(link) {\n const frame = link.getAttribute(\"data-turbo-frame\");\n if (frame) {\n return frame;\n } else {\n const container = link.closest(\"turbo-frame\");\n if (container) {\n return container.id;\n }\n }\n }\n get snapshot() {\n return this.view.snapshot;\n }\n}\nfunction extendURLWithDeprecatedProperties(url) {\n Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\nconst deprecatedLocationPropertyDescriptors = {\n absoluteURL: {\n get() {\n return this.toString();\n }\n }\n};\nconst session = new Session();\nconst {\n navigator: navigator$1\n} = session;\nfunction start() {\n session.start();\n}\nfunction registerAdapter(adapter) {\n session.registerAdapter(adapter);\n}\nfunction visit(location, options) {\n session.visit(location, options);\n}\nfunction connectStreamSource(source) {\n session.connectStreamSource(source);\n}\nfunction disconnectStreamSource(source) {\n session.disconnectStreamSource(source);\n}\nfunction renderStreamMessage(message) {\n session.renderStreamMessage(message);\n}\nfunction clearCache() {\n session.clearCache();\n}\nfunction setProgressBarDelay(delay) {\n session.setProgressBarDelay(delay);\n}\nfunction setConfirmMethod(confirmMethod) {\n FormSubmission.confirmMethod = confirmMethod;\n}\nvar Turbo = /*#__PURE__*/Object.freeze({\n __proto__: null,\n navigator: navigator$1,\n session: session,\n PageRenderer: PageRenderer,\n PageSnapshot: PageSnapshot,\n start: start,\n registerAdapter: registerAdapter,\n visit: visit,\n connectStreamSource: connectStreamSource,\n disconnectStreamSource: disconnectStreamSource,\n renderStreamMessage: renderStreamMessage,\n clearCache: clearCache,\n setProgressBarDelay: setProgressBarDelay,\n setConfirmMethod: setConfirmMethod\n});\nclass FrameController {\n constructor(element) {\n this.fetchResponseLoaded = fetchResponse => {};\n this.currentFetchRequest = null;\n this.resolveVisitPromise = () => {};\n this.connected = false;\n this.hasBeenLoaded = false;\n this.settingSourceURL = false;\n this.element = element;\n this.view = new FrameView(this, this.element);\n this.appearanceObserver = new AppearanceObserver(this, this.element);\n this.linkInterceptor = new LinkInterceptor(this, this.element);\n this.formInterceptor = new FormInterceptor(this, this.element);\n }\n connect() {\n if (!this.connected) {\n this.connected = true;\n this.reloadable = false;\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n }\n this.linkInterceptor.start();\n this.formInterceptor.start();\n this.sourceURLChanged();\n }\n }\n disconnect() {\n if (this.connected) {\n this.connected = false;\n this.appearanceObserver.stop();\n this.linkInterceptor.stop();\n this.formInterceptor.stop();\n }\n }\n disabledChanged() {\n if (this.loadingStyle == FrameLoadingStyle.eager) {\n this.loadSourceURL();\n }\n }\n sourceURLChanged() {\n if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {\n this.loadSourceURL();\n }\n }\n loadingStyleChanged() {\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n } else {\n this.appearanceObserver.stop();\n this.loadSourceURL();\n }\n }\n async loadSourceURL() {\n if (!this.settingSourceURL && this.enabled && this.isActive && (this.reloadable || this.sourceURL != this.currentURL)) {\n const previousURL = this.currentURL;\n this.currentURL = this.sourceURL;\n if (this.sourceURL) {\n try {\n this.element.loaded = this.visit(expandURL(this.sourceURL));\n this.appearanceObserver.stop();\n await this.element.loaded;\n this.hasBeenLoaded = true;\n } catch (error) {\n this.currentURL = previousURL;\n throw error;\n }\n }\n }\n }\n async loadResponse(fetchResponse) {\n if (fetchResponse.redirected || fetchResponse.succeeded && fetchResponse.isHTML) {\n this.sourceURL = fetchResponse.response.url;\n }\n try {\n const html = await fetchResponse.responseHTML;\n if (html) {\n const {\n body\n } = parseHTMLDocument(html);\n const snapshot = new Snapshot(await this.extractForeignFrameElement(body));\n const renderer = new FrameRenderer(this.view.snapshot, snapshot, false, false);\n if (this.view.renderPromise) await this.view.renderPromise;\n await this.view.render(renderer);\n session.frameRendered(fetchResponse, this.element);\n session.frameLoaded(this.element);\n this.fetchResponseLoaded(fetchResponse);\n }\n } catch (error) {\n console.error(error);\n this.view.invalidate();\n } finally {\n this.fetchResponseLoaded = () => {};\n }\n }\n elementAppearedInViewport(element) {\n this.loadSourceURL();\n }\n shouldInterceptLinkClick(element, url) {\n if (element.hasAttribute(\"data-turbo-method\")) {\n return false;\n } else {\n return this.shouldInterceptNavigation(element);\n }\n }\n linkClickIntercepted(element, url) {\n this.reloadable = true;\n this.navigateFrame(element, url);\n }\n shouldInterceptFormSubmission(element, submitter) {\n return this.shouldInterceptNavigation(element, submitter);\n }\n formSubmissionIntercepted(element, submitter) {\n if (this.formSubmission) {\n this.formSubmission.stop();\n }\n this.reloadable = false;\n this.formSubmission = new FormSubmission(this, element, submitter);\n const {\n fetchRequest\n } = this.formSubmission;\n this.prepareHeadersForRequest(fetchRequest.headers, fetchRequest);\n this.formSubmission.start();\n }\n prepareHeadersForRequest(headers, request) {\n headers[\"Turbo-Frame\"] = this.id;\n }\n requestStarted(request) {\n markAsBusy(this.element);\n }\n requestPreventedHandlingResponse(request, response) {\n this.resolveVisitPromise();\n }\n async requestSucceededWithResponse(request, response) {\n await this.loadResponse(response);\n this.resolveVisitPromise();\n }\n requestFailedWithResponse(request, response) {\n console.error(response);\n this.resolveVisitPromise();\n }\n requestErrored(request, error) {\n console.error(error);\n this.resolveVisitPromise();\n }\n requestFinished(request) {\n clearBusyState(this.element);\n }\n formSubmissionStarted(_ref7) {\n let {\n formElement\n } = _ref7;\n markAsBusy(formElement, this.findFrameElement(formElement));\n }\n formSubmissionSucceededWithResponse(formSubmission, response) {\n const frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);\n this.proposeVisitIfNavigatedWithAction(frame, formSubmission.formElement, formSubmission.submitter);\n frame.delegate.loadResponse(response);\n }\n formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n this.element.delegate.loadResponse(fetchResponse);\n }\n formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n formSubmissionFinished(_ref8) {\n let {\n formElement\n } = _ref8;\n clearBusyState(formElement, this.findFrameElement(formElement));\n }\n allowsImmediateRender(snapshot, resume) {\n return true;\n }\n viewRenderedSnapshot(snapshot, isPreview) {}\n viewInvalidated() {}\n async visit(url) {\n var _a;\n const request = new FetchRequest(this, FetchMethod.get, url, new URLSearchParams(), this.element);\n (_a = this.currentFetchRequest) === null || _a === void 0 ? void 0 : _a.cancel();\n this.currentFetchRequest = request;\n return new Promise(resolve => {\n this.resolveVisitPromise = () => {\n this.resolveVisitPromise = () => {};\n this.currentFetchRequest = null;\n resolve();\n };\n request.perform();\n });\n }\n navigateFrame(element, url, submitter) {\n const frame = this.findFrameElement(element, submitter);\n this.proposeVisitIfNavigatedWithAction(frame, element, submitter);\n frame.setAttribute(\"reloadable\", \"\");\n frame.src = url;\n }\n proposeVisitIfNavigatedWithAction(frame, element, submitter) {\n const action = getAttribute(\"data-turbo-action\", submitter, element, frame);\n if (isAction(action)) {\n const {\n visitCachedSnapshot\n } = new SnapshotSubstitution(frame);\n frame.delegate.fetchResponseLoaded = fetchResponse => {\n if (frame.src) {\n const {\n statusCode,\n redirected\n } = fetchResponse;\n const responseHTML = frame.ownerDocument.documentElement.outerHTML;\n const response = {\n statusCode,\n redirected,\n responseHTML\n };\n session.visit(frame.src, {\n action,\n response,\n visitCachedSnapshot,\n willRender: false\n });\n }\n };\n }\n }\n findFrameElement(element, submitter) {\n var _a;\n const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;\n }\n async extractForeignFrameElement(container) {\n let element;\n const id = CSS.escape(this.id);\n try {\n if (element = activateElement(container.querySelector(`turbo-frame#${id}`), this.currentURL)) {\n return element;\n }\n if (element = activateElement(container.querySelector(`turbo-frame[src][recurse~=${id}]`), this.currentURL)) {\n await element.loaded;\n return await this.extractForeignFrameElement(element);\n }\n console.error(`Response has no matching element`);\n } catch (error) {\n console.error(error);\n }\n return new FrameElement();\n }\n formActionIsVisitable(form, submitter) {\n const action = getAction(form, submitter);\n return locationIsVisitable(expandURL(action), this.rootLocation);\n }\n shouldInterceptNavigation(element, submitter) {\n const id = getAttribute(\"data-turbo-frame\", submitter, element) || this.element.getAttribute(\"target\");\n if (element instanceof HTMLFormElement && !this.formActionIsVisitable(element, submitter)) {\n return false;\n }\n if (!this.enabled || id == \"_top\") {\n return false;\n }\n if (id) {\n const frameElement = getFrameElementById(id);\n if (frameElement) {\n return !frameElement.disabled;\n }\n }\n if (!session.elementDriveEnabled(element)) {\n return false;\n }\n if (submitter && !session.elementDriveEnabled(submitter)) {\n return false;\n }\n return true;\n }\n get id() {\n return this.element.id;\n }\n get enabled() {\n return !this.element.disabled;\n }\n get sourceURL() {\n if (this.element.src) {\n return this.element.src;\n }\n }\n get reloadable() {\n const frame = this.findFrameElement(this.element);\n return frame.hasAttribute(\"reloadable\");\n }\n set reloadable(value) {\n const frame = this.findFrameElement(this.element);\n if (value) {\n frame.setAttribute(\"reloadable\", \"\");\n } else {\n frame.removeAttribute(\"reloadable\");\n }\n }\n set sourceURL(sourceURL) {\n this.settingSourceURL = true;\n this.element.src = sourceURL !== null && sourceURL !== void 0 ? sourceURL : null;\n this.currentURL = this.element.src;\n this.settingSourceURL = false;\n }\n get loadingStyle() {\n return this.element.loading;\n }\n get isLoading() {\n return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;\n }\n get isActive() {\n return this.element.isActive && this.connected;\n }\n get rootLocation() {\n var _a;\n const meta = this.element.ownerDocument.querySelector(`meta[name=\"turbo-root\"]`);\n const root = (_a = meta === null || meta === void 0 ? void 0 : meta.content) !== null && _a !== void 0 ? _a : \"/\";\n return expandURL(root);\n }\n}\nclass SnapshotSubstitution {\n constructor(element) {\n this.visitCachedSnapshot = _ref9 => {\n let {\n element\n } = _ref9;\n var _a;\n const {\n id,\n clone\n } = this;\n (_a = element.querySelector(\"#\" + id)) === null || _a === void 0 ? void 0 : _a.replaceWith(clone);\n };\n this.clone = element.cloneNode(true);\n this.id = element.id;\n }\n}\nfunction getFrameElementById(id) {\n if (id != null) {\n const element = document.getElementById(id);\n if (element instanceof FrameElement) {\n return element;\n }\n }\n}\nfunction activateElement(element, currentURL) {\n if (element) {\n const src = element.getAttribute(\"src\");\n if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n throw new Error(`Matching element has a source URL which references itself`);\n }\n if (element.ownerDocument !== document) {\n element = document.importNode(element, true);\n }\n if (element instanceof FrameElement) {\n element.connectedCallback();\n element.disconnectedCallback();\n return element;\n }\n }\n}\nconst StreamActions = {\n after() {\n this.targetElements.forEach(e => {\n var _a;\n return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e.nextSibling);\n });\n },\n append() {\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach(e => e.append(this.templateContent));\n },\n before() {\n this.targetElements.forEach(e => {\n var _a;\n return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(this.templateContent, e);\n });\n },\n prepend() {\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach(e => e.prepend(this.templateContent));\n },\n remove() {\n this.targetElements.forEach(e => e.remove());\n },\n replace() {\n this.targetElements.forEach(e => e.replaceWith(this.templateContent));\n },\n update() {\n this.targetElements.forEach(e => {\n e.innerHTML = \"\";\n e.append(this.templateContent);\n });\n }\n};\nclass StreamElement extends HTMLElement {\n async connectedCallback() {\n try {\n await this.render();\n } catch (error) {\n console.error(error);\n } finally {\n this.disconnect();\n }\n }\n async render() {\n var _a;\n return (_a = this.renderPromise) !== null && _a !== void 0 ? _a : this.renderPromise = (async () => {\n if (this.dispatchEvent(this.beforeRenderEvent)) {\n await nextAnimationFrame();\n this.performAction();\n }\n })();\n }\n disconnect() {\n try {\n this.remove();\n } catch (_a) {}\n }\n removeDuplicateTargetChildren() {\n this.duplicateChildren.forEach(c => c.remove());\n }\n get duplicateChildren() {\n var _a;\n const existingChildren = this.targetElements.flatMap(e => [...e.children]).filter(c => !!c.id);\n const newChildrenIds = [...((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children)].filter(c => !!c.id).map(c => c.id);\n return existingChildren.filter(c => newChildrenIds.includes(c.id));\n }\n get performAction() {\n if (this.action) {\n const actionFunction = StreamActions[this.action];\n if (actionFunction) {\n return actionFunction;\n }\n this.raise(\"unknown action\");\n }\n this.raise(\"action attribute is missing\");\n }\n get targetElements() {\n if (this.target) {\n return this.targetElementsById;\n } else if (this.targets) {\n return this.targetElementsByQuery;\n } else {\n this.raise(\"target or targets attribute is missing\");\n }\n }\n get templateContent() {\n return this.templateElement.content.cloneNode(true);\n }\n get templateElement() {\n if (this.firstElementChild instanceof HTMLTemplateElement) {\n return this.firstElementChild;\n }\n this.raise(\"first child element must be a