{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/@babel/runtime/regenerator/index.js","webpack:///./node_modules/regenerator-runtime/runtime.js","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/application.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","runtime","Op","hasOwn","$Symbol","iteratorSymbol","iterator","asyncIteratorSymbol","asyncIterator","toStringTagSymbol","define","obj","configurable","writable","wrap","innerFn","outerFn","self","tryLocsList","protoGenerator","Generator","generator","context","Context","_invoke","state","GenStateSuspendedStart","method","arg","GenStateExecuting","GenStateCompleted","doneResult","delegate","delegateResult","maybeInvokeDelegate","ContinueSentinel","sent","_sent","dispatchException","abrupt","record","tryCatch","done","GenStateSuspendedYield","makeInvokeMethod","fn","GeneratorFunction","GeneratorFunctionPrototype","IteratorPrototype","this","getProto","getPrototypeOf","NativeIteratorPrototype","values","Gp","defineIteratorMethods","forEach","AsyncIterator","PromiseImpl","invoke","result","__await","then","unwrapped","previousPromise","callInvokeWithMethodAndArg","TypeError","info","resultName","next","nextLoc","pushTryEntry","locs","entry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","reset","iterable","iteratorMethod","isNaN","displayName","isGeneratorFunction","genFun","ctor","constructor","mark","setPrototypeOf","__proto__","awrap","async","iter","keys","reverse","pop","skipTempReset","prev","charAt","stop","rootRecord","rval","exception","handle","loc","caught","hasCatch","hasFinally","finallyEntry","complete","finish","thrown","delegateYield","regeneratorRuntime","accidentalStrictMode","globalThis","Function","_templateObject","_templateObject2","_get","Reflect","receiver","base","_superPropBase","desc","getOwnPropertyDescriptor","arguments","apply","_getPrototypeOf","_typeof","_defineProperty","_taggedTemplateLiteral","strings","raw","freeze","defineProperties","_createForOfIteratorHelper","allowArrayLike","it","Array","isArray","_unsupportedIterableToArray","F","_e2","f","normalCompletion","didErr","step","_e3","return","_slicedToArray","arr","_arrayWithHoles","_i","_s","_e","_arr","_n","_d","_iterableToArrayLimit","_nonIterableRest","asyncGeneratorStep","gen","_next","_throw","_asyncToGenerator","args","_toConsumableArray","_arrayLikeToArray","_arrayWithoutHoles","from","_iterableToArray","_nonIterableSpread","minLen","toString","test","len","arr2","_classCallCheck","instance","Constructor","_defineProperties","props","descriptor","_createClass","protoProps","staticProps","_inherits","subClass","superClass","_setPrototypeOf","_createSuper","Derived","hasNativeReflectConstruct","_isNativeReflectConstruct","Super","NewTarget","construct","_possibleConstructorReturn","_assertThisInitialized","ReferenceError","_wrapNativeSuper","Class","_cache","Map","indexOf","has","set","Wrapper","_construct","Parent","a","sham","Proxy","Boolean","valueOf","customElements","polyfillWrapFlushCallback","BuiltInHTMLElement","HTMLElement","wrapperForTheName","FrameLoadingStyle","submittersByForm","WeakMap","clickCaptured","element","candidate","submitter","Element","Node","parentElement","closest","form","Event","navigator","vendor","SubmitEvent","addEventListener","HTMLFormElement","FrameElement","_HTMLElement","_super","_this","loaded","delegateConstructor","connect","disconnect","loadingStyleChanged","sourceURLChanged","disabledChanged","getAttribute","removeAttribute","style","toLowerCase","lazy","eager","frameLoadingStyleFromString","hasAttribute","isLoading","ownerDocument","isPreview","_a","_b","documentElement","expandURL","locatable","URL","baseURI","getAnchor","url","anchorMatch","hash","href","match","getExtension","pathname","split","getPathComponents","getLastPathComponent","isPrefixedBy","baseURL","prefix","origin","endsWith","getPrefix","startsWith","getRequestURL","anchor","toCacheKey","FetchMethod","FetchResponse","response","ok","succeeded","statusCode","redirected","contentType","status","header","clone","text","isHTML","headers","dispatch","eventName","_ref","cancelable","detail","CustomEvent","bubbles","isConnected","dispatchEvent","nextAnimationFrame","requestAnimationFrame","parseHTMLDocument","html","DOMParser","parseFromString","unindent","_len","_key","lines","interpolate","replace","indent","map","line","join","reduce","string","uuid","_","Math","floor","random","FetchRequest","location","body","URLSearchParams","abortController","AbortController","resolveRequestPromise","defaultHeaders","isIdempotent","mergeFormDataEntries","entries","_allowRequestToBeIntercepted","_receive","_perform","searchParams","abort","_callee","fetchOptions","_context","prepareHeadersForRequest","allowRequestToBeIntercepted","requestStarted","fetch","receive","t0","requestErrored","requestFinished","_callee2","fetchResponse","_context2","defaultPrevented","requestPreventedHandlingResponse","requestSucceededWithResponse","requestFailedWithResponse","_x","toUpperCase","credentials","redirect","signal","abortSignal","referrer","_callee3","requestInterception","_this2","_context3","resume","_x2","_step","currentSearchParams","search","_iterator","_ref3","File","delete","append","FormSubmissionState","FormEnctype","AppearanceObserver","_this3","started","intersect","lastEntry","isIntersecting","elementAppearedInViewport","intersectionObserver","IntersectionObserver","observe","unobserve","StreamMessage","templateElement","innerHTML","_step2","fragment","createDocumentFragment","_iterator2","foreignElements","importNode","templateChildren","streamElements","child","tagName","concat","content","children","FormSubmission","formElement","mustRedirect","initialized","formData","buildFormData","fetchRequest","_start","post","put","patch","fetchMethodFromString","formElementAction","action","enctype","urlEncoded","stringFormData","encoding","multipart","plain","formEnctypeFromString","_ref5","_ref6","_callee4","_FormSubmissionState","requesting","_context4","perform","_FormSubmissionState2","stopping","stopped","cancel","token","cookieName","cookie","find","decodeURIComponent","getCookieValue","getMetaContent","waiting","formSubmission","formSubmissionStarted","success","clientError","serverError","formSubmissionFailedWithResponse","requestMustRedirect","responseSucceededWithoutRedirect","formSubmissionErrored","receiving","formSubmissionSucceededWithResponse","assign","formSubmissionFinished","FormData","querySelector","Snapshot","getElementForAnchor","querySelectorAll","id","snapshot","_step3","permanentElementMap","_iterator3","permanentElements","currentPermanentElement","newPermanentElement","getPermanentElementById","FormInterceptor","_this4","submitBubbled","shouldInterceptFormSubmission","preventDefault","stopImmediatePropagation","formSubmissionIntercepted","removeEventListener","View","resolveRenderPromise","resolveInterceptionPromise","_renderSnapshot","_render","scrollToElement","focusElement","scrollToPosition","x","y","scrollToAnchor","scrollIntoView","focus","_ref7","scrollRoot","scrollTo","_callee5","renderer","shouldRender","renderInterception","_this5","_context5","newSnapshot","renderPromise","prepareToRenderSnapshot","allowsImmediateRender","renderSnapshot","viewRenderedSnapshot","finishRenderingSnapshot","invalidate","_x3","viewInvalidated","markAsPreview","prepareToRender","_callee6","_context6","render","_x4","finishRendering","FrameView","_View","_super2","LinkInterceptor","_this6","clickBubbled","respondsToEventTarget","clickEvent","linkClicked","shouldInterceptLinkClick","linkClickIntercepted","willVisit","Bardo","replaceNewPermanentElementWithPlaceholder","replaceCurrentPermanentElementWithClone","replacePlaceholderWithPermanentElement","permanentElement","placeholder","createPlaceholderForPermanentElement","replaceWith","cloneNode","getPlaceholderById","placeholders","callback","bardo","enter","leave","Renderer","currentSnapshot","_this7","resolvingFunctions","createdScriptElement","cspNonce","nonce","textContent","destinationElement","sourceElement","_i2","_arr2","attributes","_ref9","copyElementAttributes","preservingPermanentElements","connectedSnapshot","firstAutofocusableElement","elementIsFocusable","getPermanentElementMapForSnapshot","_Renderer","FrameRenderer","_render2","_super3","_callee7","_this8","_context7","loadFrameElement","scrollFrameIntoView","focusFirstAutofocusableElement","activateScriptElements","destinationRange","createRange","selectNodeContents","currentElement","deleteContents","frameElement","newElement","sourceRange","extractContents","autoscroll","firstElementChild","block","defaultValue","_step4","_iterator4","newScriptElements","inertScriptElement","activatedScriptElement","createScriptElement","ProgressBar","_this9","hiding","visible","trickle","setValue","stylesheetElement","createStylesheetElement","progressElement","createProgressElement","installStylesheetElement","installProgressElement","startTrickling","_this10","fadeProgressElement","uninstallProgressElement","stopTrickling","refresh","insertBefore","firstChild","width","opacity","animationDuration","parentNode","removeChild","trickleInterval","setInterval","clearInterval","_this11","defaultCSS","className","HeadSnapshot","_Snapshot","_super4","_this12","detailsByOuterHTML","filter","elementIsNoscript","elementWithoutNonce","outerHTML","details","elementType","tracked","elementIsTracked","elements","_this13","getElementsMatchingTypeNotInSnapshot","matchedType","_this14","_ref10","_ref11","_this15","_this15$detailsByOute","findMetaElementByName","_this16","elementIsMetaElementWithName","elementIsScript","elementIsStylesheet","TimingMetric","VisitState","PageSnapshot","_Snapshot2","_super5","headSnapshot","_this17","getSetting","cacheControlValue","getMetaValue","fromDocument","_ref12","SystemStatusCode","defaultOptions","historyChanged","Visit","restorationIdentifier","options","identifier","timingMetrics","followedRedirect","scrolled","snapshotCached","_Object$assign2","snapshotHTML","isSamePage","locationWithActionIsSamePage","_render3","_requestFailedWithResponse","_requestSucceededWithResponse","adapter","view","history","getRestorationDataForIdentifier","recordTimingMetric","visitStart","visitStarted","cancelRender","canceled","visitEnd","completed","visitCompleted","followRedirect","failed","visitFailed","actionForHistory","getHistoryMethodForAction","update","hasPreloadedResponse","simulateRequest","shouldIssueRequest","startRequest","recordResponse","finishRequest","requestStart","visitRequestStarted","isSuccessful","visitRequestCompleted","visitRequestFailedWithStatusCode","requestEnd","visitRequestFinished","_this18","_this$response","responseHTML","_callee8","_context8","cacheSnapshot","renderPage","fromHTMLString","visitRendered","renderError","fail","getCachedSnapshotForLocation","getPreloadedSnapshot","hasAnchor","isPreviewable","getCachedSnapshot","_this19","_callee9","_context9","redirectedToLocation","visitProposedToLocation","_this20","_callee10","_context10","_callee11","_context11","contentTypeMismatch","_x5","_x6","_callee12","_context12","_x7","_x8","networkFailure","scrollToRestoredPosition","scrollToTop","visitScrolledToSamePageLocation","lastRenderedLocation","scrollPosition","restorationData","metric","Date","getTime","replaceState","pushState","hasCachedSnapshot","_callee13","_this21","_context13","frame","performScroll","_x9","cancelAnimationFrame","BrowserAdapter","session","_this22","progressBar","showProgressBar","show","startVisit","visit","issueRequest","changeHistory","goToSamePageAnchor","loadCachedSnapshot","showVisitProgressBarAfterDelay","loadResponse","timeoutFailure","reload","hideVisitProgressBar","showFormProgressBarAfterDelay","hideFormProgressBar","visitProgressBarTimeout","progressBarDelay","hide","formProgressBarTimeout","CacheObserver","removeStaleElements","_step5","_iterator5","remove","FormSubmitObserver","_this23","submitCaptured","willSubmitForm","formSubmitted","FrameRedirector","linkInterceptor","formInterceptor","start","shouldRedirect","findFrameElement","History","_this24","pageLoaded","onPopState","shouldHandlePopState","turbo","historyPoppedToLocationWithRestorationIdentifier","onPageLoad","_ref17","_callee14","_context14","_x10","additionalData","previousScrollRestoration","scrollRestoration","pageIsLoaded","readyState","LinkClickObserver","_this25","clickEventIsSignificant","composedPath","link","findLinkFromClickTarget","_location","getLocationForLink","willFollowLinkToLocation","followedLinkToLocation","isContentEditable","which","altKey","ctrlKey","metaKey","shiftKey","isAction","PageStage","Navigator","_formSubmissionFailedWithResponse","_formSubmissionSucceededWithResponse","allowsVisitingLocationWithAction","currentVisit","proposeVisit","getActionForFormSubmission","_callee15","visitOptions","_context15","clearSnapshotCache","_x11","_x12","_callee16","_context16","_x13","_x14","currentAnchor","isRestorationToTop","oldURL","newURL","PageObserver","_this26","stage","initial","interpretReadyState","pageIsInteractive","pageIsComplete","pageWillUnload","loading","interactive","pageBecameInteractive","ScrollObserver","_this27","onScroll","updatePosition","pageXOffset","pageYOffset","position","scrollPositionChanged","StreamObserver","_this28","sources","Set","inspectFetchResponse","fetchResponseFromEvent","fetchResponseIsStream","receiveMessageResponse","receiveMessageEvent","receiveMessageHTML","_receiveMessageResponse","source","streamSourceIsConnected","add","_callee17","_context17","_x15","receivedMessageFromStream","_Renderer2","ErrorRenderer","_render4","_super6","_callee18","_context18","replaceHeadAndBody","_document","replaceChild","newHead","_step6","_iterator6","scriptElements","replaceableElement","_Renderer3","PageRenderer","_render5","_super7","isVisitable","trackedElementsAreIdentical","mergeHead","_callee19","_context19","replaceBody","copyNewHeadStylesheetElements","copyNewHeadScriptElements","removeCurrentHeadProvisionalElements","copyNewHeadProvisionalElements","_this29","activateNewBody","assignNewBody","currentHeadSnapshot","trackedElementSignature","newHeadSnapshot","_step7","_iterator7","newHeadStylesheetElements","_step8","_iterator8","newHeadScriptElements","_step9","_iterator9","currentHeadProvisionalElements","_step10","_iterator10","newHeadProvisionalElements","adoptNode","activateNewBodyScriptElements","_step11","_iterator11","newBodyScriptElements","HTMLBodyElement","getStylesheetElementsNotInSnapshot","getScriptElementsNotInSnapshot","provisionalElements","SnapshotCache","size","snapshots","read","touch","write","index","splice","unshift","trim","_step12","_iterator12","_View2","PageView","_cacheSnapshot","_super8","_this30","snapshotCache","clear","_callee20","_location2","_context20","shouldCacheSnapshot","viewWillCacheSnapshot","fromElement","isCacheable","Session","pageObserver","cacheObserver","linkClickObserver","formSubmitObserver","scrollObserver","streamObserver","frameRedirector","drive","enabled","connectStreamSource","disconnectStreamSource","delay","pageInvalidated","updateRestorationData","elementDriveEnabled","locationIsVisitable","applicationAllowsFollowingLinkToLocation","getActionForLink","convertLinkWithMethodClickToFormSubmission","linkMethod","hidden","applicationAllowsVisitingLocation","extendURLWithDeprecatedProperties","silent","notifyApplicationAfterVisitingLocation","notifyApplicationAfterPageLoad","getTimingMetrics","notifyApplicationAfterVisitingSamePageLocation","submitForm","assumeControlOfScrollRestoration","relinquishControlOfScrollRestoration","renderStreamMessage","notifyApplicationBeforeCachingSnapshot","_ref18","notifyApplicationBeforeRender","notifyApplicationAfterRender","notifyApplicationAfterFrameLoad","notifyApplicationAfterFrameRender","notifyApplicationAfterClickingLinkToLocation","notifyApplicationBeforeVisitingLocation","newBody","timing","HashChangeEvent","container","rootLocation","deprecatedLocationPropertyDescriptors","absoluteURL","navigator$1","Turbo","registerAdapter","clearCache","setProgressBarDelay","FrameController","resolveVisitPromise","connected","hasBeenLoaded","settingSourceURL","appearanceObserver","_extractForeignFrameElement","_visit","_requestSucceededWithResponse2","_loadResponse","_loadSourceURL","reloadable","loadingStyle","loadSourceURL","_callee21","previousURL","_context21","isActive","sourceURL","currentURL","frameLoaded","_callee22","_parseHTMLDocument","_context22","extractForeignFrameElement","t1","frameRendered","t2","_x16","shouldInterceptNavigation","navigateFrame","_callee23","_context23","_x17","_x18","_callee24","_this31","_context24","_x19","getFrameElementById","_callee25","_context25","CSS","escape","activateElement","_x20","disabled","getElementById","right","connectedCallback","consumer","StreamActions","after","_this32","targetElements","templateContent","nextSibling","_this33","removeDuplicateTargetChildren","before","_this34","prepend","_this35","_this36","_this37","_HTMLElement2","StreamElement","_render6","_connectedCallback","_super9","_callee26","_context26","_callee28","_this38","_context28","_callee27","_context27","beforeRenderEvent","performAction","duplicateChildren","existingChildren","flatMap","newChildrenIds","includes","actionFunction","raise","targetElementsById","targets","targetElementsByQuery","HTMLTemplateElement","description","getConsumer","_getConsumer","setConsumer","newConsumer","_createConsumer","_yield$import","createConsumer","subscribeTo","_subscribeTo","channel","mixin","_yield$getConsumer","subscriptions","currentScript","warn","TurboCableStreamSourceElement","received","dispatchMessageEvent","subscription","unsubscribe","MessageEvent","signed_stream_name","log"],"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,EAAgBV,GAAS,IAExCU,EAAgBV,GAAW,EAE5B,IAAID,KAAYG,EACZI,OAAOC,UAAUC,eAAeC,KAAKP,EAAaH,KACpDa,EAAQb,GAAYG,EAAYH,IAKlC,IAFGc,GAAqBA,EAAoBf,GAEtCM,EAASC,QACdD,EAASU,OAATV,GAOF,I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KAE/B,KAAK,EACL,IAAK,MACH,OAAOgU,EAAS9P,UAGrB4P,EAASjT,SAnBV8iC,EA7C8B,WAAc,IAAI9kC,EAAOgC,KAAMwH,EAAOxC,UAAW,OAAO,IAAI/L,SAAQ,SAAUC,EAASC,GAAU,IAAIiO,EAAMxH,EAAGqF,MAAMjH,EAAMwJ,GAAO,SAASH,EAAMxL,GAAS,GAAmBuL,EAAKlO,EAASC,EAAQkO,EAAOC,EAAQ,OAAQzL,GAAU,SAASyL,EAAO7K,GAAO,GAAmB2K,EAAKlO,EAASC,EAAQkO,EAAOC,EAAQ,QAAS7K,GAAQ4K,OAAMxM,OAmE3W,WACE,OAAOioC,EAAmB79B,MAAMjF,KAAMgF,cAKzC,CACD7I,IAAK,uBACLN,MAAO,WACLmgC,GAAuBh8B,MACnBA,KAAKulC,cAAcvlC,KAAKulC,aAAaC,gBAE1C,CACDrpC,IAAK,uBACLN,MAAO,SAA8BtE,GACnC,IAAI0C,EAAQ,IAAIwrC,aAAa,UAAW,CACtCluC,KAAMA,IAER,OAAOyI,KAAKyQ,cAAcxW,KAE3B,CACDkC,IAAK,UACLV,IAAK,WAGH,MAAO,CACLqpC,QAHY9kC,KAAK4M,aAAa,WAI9B84B,mBAHuB1lC,KAAK4M,aAAa,0BArFiBjE,GAAY,GAAkBL,EAAYtQ,UAAW2Q,GAAiBC,GAAa,GAAkBN,EAAaM,GA6F3Kw8B,EApEwC,CAqEjC,GAAiBv6B,cAEjCH,eAAejN,OAAO,4BAA6B,IC1FnDf,QAAQipC,IAAI","file":"js/application-d3005ba669125287f075.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\t1: 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\":\"2435d24ee1d00a825d07\"}[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 = \"/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 = 2);\n","module.exports = require(\"regenerator-runtime\");\n","/**\n * Copyright (c) 2014-present, Facebook, Inc.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nvar runtime = (function (exports) {\n \"use strict\";\n\n var Op = Object.prototype;\n var hasOwn = Op.hasOwnProperty;\n var undefined; // More compressible than void 0.\n var $Symbol = typeof Symbol === \"function\" ? Symbol : {};\n var iteratorSymbol = $Symbol.iterator || \"@@iterator\";\n var asyncIteratorSymbol = $Symbol.asyncIterator || \"@@asyncIterator\";\n var toStringTagSymbol = $Symbol.toStringTag || \"@@toStringTag\";\n\n function define(obj, key, value) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n return obj[key];\n }\n try {\n // IE 8 has a broken Object.defineProperty that only works on DOM objects.\n define({}, \"\");\n } catch (err) {\n define = function(obj, key, value) {\n return obj[key] = value;\n };\n }\n\n function wrap(innerFn, outerFn, self, tryLocsList) {\n // If outerFn provided and outerFn.prototype is a Generator, then outerFn.prototype instanceof Generator.\n var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator;\n var generator = Object.create(protoGenerator.prototype);\n var context = new Context(tryLocsList || []);\n\n // The ._invoke method unifies the implementations of the .next,\n // .throw, and .return methods.\n generator._invoke = makeInvokeMethod(innerFn, self, context);\n\n return generator;\n }\n exports.wrap = wrap;\n\n // Try/catch helper to minimize deoptimizations. Returns a completion\n // record like context.tryEntries[i].completion. This interface could\n // have been (and was previously) designed to take a closure to be\n // invoked without arguments, but in all the cases we care about we\n // already have an existing method we want to call, so there's no need\n // to create a new function object. We can even get away with assuming\n // the method takes exactly one argument, since that happens to be true\n // in every case, so we don't have to touch the arguments object. The\n // only additional allocation required is the completion record, which\n // has a stable shape and so hopefully should be cheap to allocate.\n function tryCatch(fn, obj, arg) {\n try {\n return { type: \"normal\", arg: fn.call(obj, arg) };\n } catch (err) {\n return { type: \"throw\", arg: err };\n }\n }\n\n var GenStateSuspendedStart = \"suspendedStart\";\n var GenStateSuspendedYield = \"suspendedYield\";\n var GenStateExecuting = \"executing\";\n var GenStateCompleted = \"completed\";\n\n // Returning this object from the innerFn has the same effect as\n // breaking out of the dispatch switch statement.\n var ContinueSentinel = {};\n\n // Dummy constructor functions that we use as the .constructor and\n // .constructor.prototype properties for functions that return Generator\n // objects. For full spec compliance, you may wish to configure your\n // minifier not to mangle the names of these two functions.\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n\n // This is a polyfill for %IteratorPrototype% for environments that\n // don't natively support it.\n var IteratorPrototype = {};\n define(IteratorPrototype, iteratorSymbol, function () {\n return this;\n });\n\n var getProto = Object.getPrototypeOf;\n var NativeIteratorPrototype = getProto && getProto(getProto(values([])));\n if (NativeIteratorPrototype &&\n NativeIteratorPrototype !== Op &&\n hasOwn.call(NativeIteratorPrototype, iteratorSymbol)) {\n // This environment has a native %IteratorPrototype%; use it instead\n // of the polyfill.\n IteratorPrototype = NativeIteratorPrototype;\n }\n\n var Gp = GeneratorFunctionPrototype.prototype =\n Generator.prototype = Object.create(IteratorPrototype);\n GeneratorFunction.prototype = GeneratorFunctionPrototype;\n define(Gp, \"constructor\", GeneratorFunctionPrototype);\n define(GeneratorFunctionPrototype, \"constructor\", GeneratorFunction);\n GeneratorFunction.displayName = define(\n GeneratorFunctionPrototype,\n toStringTagSymbol,\n \"GeneratorFunction\"\n );\n\n // Helper for defining the .next, .throw, and .return methods of the\n // Iterator interface in terms of a single ._invoke method.\n function defineIteratorMethods(prototype) {\n [\"next\", \"throw\", \"return\"].forEach(function(method) {\n define(prototype, method, function(arg) {\n return this._invoke(method, arg);\n });\n });\n }\n\n exports.isGeneratorFunction = function(genFun) {\n var ctor = typeof genFun === \"function\" && genFun.constructor;\n return ctor\n ? ctor === GeneratorFunction ||\n // For the native GeneratorFunction constructor, the best we can\n // do is to check its .name property.\n (ctor.displayName || ctor.name) === \"GeneratorFunction\"\n : false;\n };\n\n exports.mark = function(genFun) {\n if (Object.setPrototypeOf) {\n Object.setPrototypeOf(genFun, GeneratorFunctionPrototype);\n } else {\n genFun.__proto__ = GeneratorFunctionPrototype;\n define(genFun, toStringTagSymbol, \"GeneratorFunction\");\n }\n genFun.prototype = Object.create(Gp);\n return genFun;\n };\n\n // Within the body of any async function, `await x` is transformed to\n // `yield regeneratorRuntime.awrap(x)`, so that the runtime can test\n // `hasOwn.call(value, \"__await\")` to determine if the yielded value is\n // meant to be awaited.\n exports.awrap = function(arg) {\n return { __await: arg };\n };\n\n function AsyncIterator(generator, PromiseImpl) {\n function invoke(method, arg, resolve, reject) {\n var record = tryCatch(generator[method], generator, arg);\n if (record.type === \"throw\") {\n reject(record.arg);\n } else {\n var result = record.arg;\n var value = result.value;\n if (value &&\n typeof value === \"object\" &&\n hasOwn.call(value, \"__await\")) {\n return PromiseImpl.resolve(value.__await).then(function(value) {\n invoke(\"next\", value, resolve, reject);\n }, function(err) {\n invoke(\"throw\", err, resolve, reject);\n });\n }\n\n return PromiseImpl.resolve(value).then(function(unwrapped) {\n // When a yielded Promise is resolved, its final value becomes\n // the .value of the Promise<{value,done}> result for the\n // current iteration.\n result.value = unwrapped;\n resolve(result);\n }, function(error) {\n // If a rejected Promise was yielded, throw the rejection back\n // into the async generator function so it can be handled there.\n return invoke(\"throw\", error, resolve, reject);\n });\n }\n }\n\n var previousPromise;\n\n function enqueue(method, arg) {\n function callInvokeWithMethodAndArg() {\n return new PromiseImpl(function(resolve, reject) {\n invoke(method, arg, resolve, reject);\n });\n }\n\n return previousPromise =\n // If enqueue has been called before, then we want to wait until\n // all previous Promises have been resolved before calling invoke,\n // so that results are always delivered in the correct order. If\n // enqueue has not been called before, then it is important to\n // call invoke immediately, without waiting on a callback to fire,\n // so that the async generator function has the opportunity to do\n // any necessary setup in a predictable way. This predictability\n // is why the Promise constructor synchronously invokes its\n // executor callback, and why async functions synchronously\n // execute code before the first await. Since we implement simple\n // async functions in terms of async generators, it is especially\n // important to get this right, even though it requires care.\n previousPromise ? previousPromise.then(\n callInvokeWithMethodAndArg,\n // Avoid propagating failures to Promises returned by later\n // invocations of the iterator.\n callInvokeWithMethodAndArg\n ) : callInvokeWithMethodAndArg();\n }\n\n // Define the unified helper method that is used to implement .next,\n // .throw, and .return (see defineIteratorMethods).\n this._invoke = enqueue;\n }\n\n defineIteratorMethods(AsyncIterator.prototype);\n define(AsyncIterator.prototype, asyncIteratorSymbol, function () {\n return this;\n });\n exports.AsyncIterator = AsyncIterator;\n\n // Note that simple async functions are implemented on top of\n // AsyncIterator objects; they just return a Promise for the value of\n // the final result produced by the iterator.\n exports.async = function(innerFn, outerFn, self, tryLocsList, PromiseImpl) {\n if (PromiseImpl === void 0) PromiseImpl = Promise;\n\n var iter = new AsyncIterator(\n wrap(innerFn, outerFn, self, tryLocsList),\n PromiseImpl\n );\n\n return exports.isGeneratorFunction(outerFn)\n ? iter // If outerFn is a generator, return the full iterator.\n : iter.next().then(function(result) {\n return result.done ? result.value : iter.next();\n });\n };\n\n function makeInvokeMethod(innerFn, self, context) {\n var state = GenStateSuspendedStart;\n\n return function invoke(method, arg) {\n if (state === GenStateExecuting) {\n throw new Error(\"Generator is already running\");\n }\n\n if (state === GenStateCompleted) {\n if (method === \"throw\") {\n throw arg;\n }\n\n // Be forgiving, per 25.3.3.3.3 of the spec:\n // https://people.mozilla.org/~jorendorff/es6-draft.html#sec-generatorresume\n return doneResult();\n }\n\n context.method = method;\n context.arg = arg;\n\n while (true) {\n var delegate = context.delegate;\n if (delegate) {\n var delegateResult = maybeInvokeDelegate(delegate, context);\n if (delegateResult) {\n if (delegateResult === ContinueSentinel) continue;\n return delegateResult;\n }\n }\n\n if (context.method === \"next\") {\n // Setting context._sent for legacy support of Babel's\n // function.sent implementation.\n context.sent = context._sent = context.arg;\n\n } else if (context.method === \"throw\") {\n if (state === GenStateSuspendedStart) {\n state = GenStateCompleted;\n throw context.arg;\n }\n\n context.dispatchException(context.arg);\n\n } else if (context.method === \"return\") {\n context.abrupt(\"return\", context.arg);\n }\n\n state = GenStateExecuting;\n\n var record = tryCatch(innerFn, self, context);\n if (record.type === \"normal\") {\n // If an exception is thrown from innerFn, we leave state ===\n // GenStateExecuting and loop back for another invocation.\n state = context.done\n ? GenStateCompleted\n : GenStateSuspendedYield;\n\n if (record.arg === ContinueSentinel) {\n continue;\n }\n\n return {\n value: record.arg,\n done: context.done\n };\n\n } else if (record.type === \"throw\") {\n state = GenStateCompleted;\n // Dispatch the exception by looping back around to the\n // context.dispatchException(context.arg) call above.\n context.method = \"throw\";\n context.arg = record.arg;\n }\n }\n };\n }\n\n // Call delegate.iterator[context.method](context.arg) and handle the\n // result, either by returning a { value, done } result from the\n // delegate iterator, or by modifying context.method and context.arg,\n // setting context.delegate to null, and returning the ContinueSentinel.\n function maybeInvokeDelegate(delegate, context) {\n var method = delegate.iterator[context.method];\n if (method === undefined) {\n // A .throw or .return when the delegate iterator has no .throw\n // method always terminates the yield* loop.\n context.delegate = null;\n\n if (context.method === \"throw\") {\n // Note: [\"return\"] must be used for ES3 parsing compatibility.\n if (delegate.iterator[\"return\"]) {\n // If the delegate iterator has a return method, give it a\n // chance to clean up.\n context.method = \"return\";\n context.arg = undefined;\n maybeInvokeDelegate(delegate, context);\n\n if (context.method === \"throw\") {\n // If maybeInvokeDelegate(context) changed context.method from\n // \"return\" to \"throw\", let that override the TypeError below.\n return ContinueSentinel;\n }\n }\n\n context.method = \"throw\";\n context.arg = new TypeError(\n \"The iterator does not provide a 'throw' method\");\n }\n\n return ContinueSentinel;\n }\n\n var record = tryCatch(method, delegate.iterator, context.arg);\n\n if (record.type === \"throw\") {\n context.method = \"throw\";\n context.arg = record.arg;\n context.delegate = null;\n return ContinueSentinel;\n }\n\n var info = record.arg;\n\n if (! info) {\n context.method = \"throw\";\n context.arg = new TypeError(\"iterator result is not an object\");\n context.delegate = null;\n return ContinueSentinel;\n }\n\n if (info.done) {\n // Assign the result of the finished delegate to the temporary\n // variable specified by delegate.resultName (see delegateYield).\n context[delegate.resultName] = info.value;\n\n // Resume execution at the desired location (see delegateYield).\n context.next = delegate.nextLoc;\n\n // If context.method was \"throw\" but the delegate handled the\n // exception, let the outer generator proceed normally. If\n // context.method was \"next\", forget context.arg since it has been\n // \"consumed\" by the delegate iterator. If context.method was\n // \"return\", allow the original .return call to continue in the\n // outer generator.\n if (context.method !== \"return\") {\n context.method = \"next\";\n context.arg = undefined;\n }\n\n } else {\n // Re-yield the result returned by the delegate method.\n return info;\n }\n\n // The delegate iterator is finished, so forget it and continue with\n // the outer generator.\n context.delegate = null;\n return ContinueSentinel;\n }\n\n // Define Generator.prototype.{next,throw,return} in terms of the\n // unified ._invoke helper method.\n defineIteratorMethods(Gp);\n\n define(Gp, toStringTagSymbol, \"Generator\");\n\n // A Generator should always return itself as the iterator object when the\n // @@iterator function is called on it. Some browsers' implementations of the\n // iterator prototype chain incorrectly implement this, causing the Generator\n // object to not be returned from this call. This ensures that doesn't happen.\n // See https://github.com/facebook/regenerator/issues/274 for more details.\n define(Gp, iteratorSymbol, function() {\n return this;\n });\n\n define(Gp, \"toString\", function() {\n return \"[object Generator]\";\n });\n\n function pushTryEntry(locs) {\n var entry = { tryLoc: locs[0] };\n\n if (1 in locs) {\n entry.catchLoc = locs[1];\n }\n\n if (2 in locs) {\n entry.finallyLoc = locs[2];\n entry.afterLoc = locs[3];\n }\n\n this.tryEntries.push(entry);\n }\n\n function resetTryEntry(entry) {\n var record = entry.completion || {};\n record.type = \"normal\";\n delete record.arg;\n entry.completion = record;\n }\n\n function Context(tryLocsList) {\n // The root entry object (effectively a try statement without a catch\n // or a finally block) gives us a place to store values thrown from\n // locations where there is no enclosing try statement.\n this.tryEntries = [{ tryLoc: \"root\" }];\n tryLocsList.forEach(pushTryEntry, this);\n this.reset(true);\n }\n\n exports.keys = function(object) {\n var keys = [];\n for (var key in object) {\n keys.push(key);\n }\n keys.reverse();\n\n // Rather than returning an object with a next method, we keep\n // things simple and return the next function itself.\n return function next() {\n while (keys.length) {\n var key = keys.pop();\n if (key in object) {\n next.value = key;\n next.done = false;\n return next;\n }\n }\n\n // To avoid creating an additional object, we just hang the .value\n // and .done properties off the next function object itself. This\n // also ensures that the minifier will not anonymize the function.\n next.done = true;\n return next;\n };\n };\n\n function values(iterable) {\n if (iterable) {\n var iteratorMethod = iterable[iteratorSymbol];\n if (iteratorMethod) {\n return iteratorMethod.call(iterable);\n }\n\n if (typeof iterable.next === \"function\") {\n return iterable;\n }\n\n if (!isNaN(iterable.length)) {\n var i = -1, next = function next() {\n while (++i < iterable.length) {\n if (hasOwn.call(iterable, i)) {\n next.value = iterable[i];\n next.done = false;\n return next;\n }\n }\n\n next.value = undefined;\n next.done = true;\n\n return next;\n };\n\n return next.next = next;\n }\n }\n\n // Return an iterator with no values.\n return { next: doneResult };\n }\n exports.values = values;\n\n function doneResult() {\n return { value: undefined, done: true };\n }\n\n Context.prototype = {\n constructor: Context,\n\n reset: function(skipTempReset) {\n this.prev = 0;\n this.next = 0;\n // Resetting context._sent for legacy support of Babel's\n // function.sent implementation.\n this.sent = this._sent = undefined;\n this.done = false;\n this.delegate = null;\n\n this.method = \"next\";\n this.arg = undefined;\n\n this.tryEntries.forEach(resetTryEntry);\n\n if (!skipTempReset) {\n for (var name in this) {\n // Not sure about the optimal order of these conditions:\n if (name.charAt(0) === \"t\" &&\n hasOwn.call(this, name) &&\n !isNaN(+name.slice(1))) {\n this[name] = undefined;\n }\n }\n }\n },\n\n stop: function() {\n this.done = true;\n\n var rootEntry = this.tryEntries[0];\n var rootRecord = rootEntry.completion;\n if (rootRecord.type === \"throw\") {\n throw rootRecord.arg;\n }\n\n return this.rval;\n },\n\n dispatchException: function(exception) {\n if (this.done) {\n throw exception;\n }\n\n var context = this;\n function handle(loc, caught) {\n record.type = \"throw\";\n record.arg = exception;\n context.next = loc;\n\n if (caught) {\n // If the dispatched exception was caught by a catch block,\n // then let that catch block handle the exception normally.\n context.method = \"next\";\n context.arg = undefined;\n }\n\n return !! caught;\n }\n\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n var record = entry.completion;\n\n if (entry.tryLoc === \"root\") {\n // Exception thrown outside of any try block that could handle\n // it, so set the completion value of the entire function to\n // throw the exception.\n return handle(\"end\");\n }\n\n if (entry.tryLoc <= this.prev) {\n var hasCatch = hasOwn.call(entry, \"catchLoc\");\n var hasFinally = hasOwn.call(entry, \"finallyLoc\");\n\n if (hasCatch && hasFinally) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n } else if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else if (hasCatch) {\n if (this.prev < entry.catchLoc) {\n return handle(entry.catchLoc, true);\n }\n\n } else if (hasFinally) {\n if (this.prev < entry.finallyLoc) {\n return handle(entry.finallyLoc);\n }\n\n } else {\n throw new Error(\"try statement without catch or finally\");\n }\n }\n }\n },\n\n abrupt: function(type, arg) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc <= this.prev &&\n hasOwn.call(entry, \"finallyLoc\") &&\n this.prev < entry.finallyLoc) {\n var finallyEntry = entry;\n break;\n }\n }\n\n if (finallyEntry &&\n (type === \"break\" ||\n type === \"continue\") &&\n finallyEntry.tryLoc <= arg &&\n arg <= finallyEntry.finallyLoc) {\n // Ignore the finally entry if control is not jumping to a\n // location outside the try/catch block.\n finallyEntry = null;\n }\n\n var record = finallyEntry ? finallyEntry.completion : {};\n record.type = type;\n record.arg = arg;\n\n if (finallyEntry) {\n this.method = \"next\";\n this.next = finallyEntry.finallyLoc;\n return ContinueSentinel;\n }\n\n return this.complete(record);\n },\n\n complete: function(record, afterLoc) {\n if (record.type === \"throw\") {\n throw record.arg;\n }\n\n if (record.type === \"break\" ||\n record.type === \"continue\") {\n this.next = record.arg;\n } else if (record.type === \"return\") {\n this.rval = this.arg = record.arg;\n this.method = \"return\";\n this.next = \"end\";\n } else if (record.type === \"normal\" && afterLoc) {\n this.next = afterLoc;\n }\n\n return ContinueSentinel;\n },\n\n finish: function(finallyLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.finallyLoc === finallyLoc) {\n this.complete(entry.completion, entry.afterLoc);\n resetTryEntry(entry);\n return ContinueSentinel;\n }\n }\n },\n\n \"catch\": function(tryLoc) {\n for (var i = this.tryEntries.length - 1; i >= 0; --i) {\n var entry = this.tryEntries[i];\n if (entry.tryLoc === tryLoc) {\n var record = entry.completion;\n if (record.type === \"throw\") {\n var thrown = record.arg;\n resetTryEntry(entry);\n }\n return thrown;\n }\n }\n\n // The context.catch method must only be called with a location\n // argument that corresponds to a known catch block.\n throw new Error(\"illegal catch attempt\");\n },\n\n delegateYield: function(iterable, resultName, nextLoc) {\n this.delegate = {\n iterator: values(iterable),\n resultName: resultName,\n nextLoc: nextLoc\n };\n\n if (this.method === \"next\") {\n // Deliberately forget the last sent value so that we don't\n // accidentally pass it on to the delegate.\n this.arg = undefined;\n }\n\n return ContinueSentinel;\n }\n };\n\n // Regardless of whether this script is executing as a CommonJS module\n // or not, return the runtime object so that we can declare the variable\n // regeneratorRuntime in the outer scope, which allows this module to be\n // injected easily by `bin/regenerator --include-runtime script.js`.\n return exports;\n\n}(\n // If this script is executing as a CommonJS module, use module.exports\n // as the regeneratorRuntime namespace. Otherwise create a new empty\n // object. Either way, the resulting object will be used to initialize\n // the regeneratorRuntime variable at the top of this file.\n typeof module === \"object\" ? module.exports : {}\n));\n\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n // This module should not be running in strict mode, so the above\n // assignment should always work unless something is misconfigured. Just\n // in case runtime.js accidentally runs in strict mode, in modern engines\n // we can explicitly access globalThis. In older engines we can escape\n // strict mode using a global Function call. This could conceivably fail\n // if a Content Security Policy forbids using Function, but in that case\n // the proper solution is to fix the accidental strict mode problem. If\n // you've misconfigured your bundler to force strict mode and applied a\n // CSP to forbid Function, and you're not willing to fix either of those\n // problems, please detail your unique predicament in a GitHub issue.\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","var _templateObject, _templateObject2;\n\nfunction _get() { if (typeof Reflect !== \"undefined\" && Reflect.get) { _get = Reflect.get; } else { _get = function _get(target, property, receiver) { var base = _superPropBase(target, property); if (!base) return; var desc = Object.getOwnPropertyDescriptor(base, property); if (desc.get) { return desc.get.call(arguments.length < 3 ? target : receiver); } return desc.value; }; } return _get.apply(this, arguments); }\n\nfunction _superPropBase(object, property) { while (!Object.prototype.hasOwnProperty.call(object, property)) { object = _getPrototypeOf(object); if (object === null) break; } return object; }\n\nfunction _typeof(obj) { \"@babel/helpers - typeof\"; if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj; }; } return _typeof(obj); }\n\nfunction _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }\n\nfunction _taggedTemplateLiteral(strings, raw) { if (!raw) { raw = strings.slice(0); } return Object.freeze(Object.defineProperties(strings, { raw: { value: Object.freeze(raw) } })); }\n\nfunction _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== \"undefined\" && o[Symbol.iterator] || o[\"@@iterator\"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === \"number\") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e2) { throw _e2; }, f: F }; } throw new TypeError(\"Invalid attempt to iterate non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e3) { didErr = true; err = _e3; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }\n\nfunction _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }\n\nfunction _nonIterableRest() { throw new TypeError(\"Invalid attempt to destructure non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== \"undefined\" && arr[Symbol.iterator] || arr[\"@@iterator\"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i[\"return\"] != null) _i[\"return\"](); } finally { if (_d) throw _e; } } return _arr; }\n\nfunction _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }\n\nimport _regeneratorRuntime from \"@babel/runtime/regenerator\";\n\nfunction asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }\n\nfunction _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err); } _next(undefined); }); }; }\n\nfunction _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }\n\nfunction _nonIterableSpread() { throw new TypeError(\"Invalid attempt to spread non-iterable instance.\\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.\"); }\n\nfunction _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === \"string\") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === \"Object\" && o.constructor) n = o.constructor.name; if (n === \"Map\" || n === \"Set\") return Array.from(o); if (n === \"Arguments\" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }\n\nfunction _iterableToArray(iter) { if (typeof Symbol !== \"undefined\" && iter[Symbol.iterator] != null || iter[\"@@iterator\"] != null) return Array.from(iter); }\n\nfunction _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }\n\nfunction _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }\n\nfunction _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError(\"Cannot call a class as a function\"); } }\n\nfunction _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if (\"value\" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }\n\nfunction _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }\n\nfunction _inherits(subClass, superClass) { if (typeof superClass !== \"function\" && superClass !== null) { throw new TypeError(\"Super expression must either be null or a function\"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); if (superClass) _setPrototypeOf(subClass, superClass); }\n\nfunction _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }\n\nfunction _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === \"object\" || typeof call === \"function\")) { return call; } else if (call !== void 0) { throw new TypeError(\"Derived constructors may only return object or undefined\"); } return _assertThisInitialized(self); }\n\nfunction _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\"); } return self; }\n\nfunction _wrapNativeSuper(Class) { var _cache = typeof Map === \"function\" ? new Map() : undefined; _wrapNativeSuper = function _wrapNativeSuper(Class) { if (Class === null || !_isNativeFunction(Class)) return Class; if (typeof Class !== \"function\") { throw new TypeError(\"Super expression must either be null or a function\"); } if (typeof _cache !== \"undefined\") { if (_cache.has(Class)) return _cache.get(Class); _cache.set(Class, Wrapper); } function Wrapper() { return _construct(Class, arguments, _getPrototypeOf(this).constructor); } Wrapper.prototype = Object.create(Class.prototype, { constructor: { value: Wrapper, enumerable: false, writable: true, configurable: true } }); return _setPrototypeOf(Wrapper, Class); }; return _wrapNativeSuper(Class); }\n\nfunction _construct(Parent, args, Class) { if (_isNativeReflectConstruct()) { _construct = Reflect.construct; } else { _construct = function _construct(Parent, args, Class) { var a = [null]; a.push.apply(a, args); var Constructor = Function.bind.apply(Parent, a); var instance = new Constructor(); if (Class) _setPrototypeOf(instance, Class.prototype); return instance; }; } return _construct.apply(null, arguments); }\n\nfunction _isNativeReflectConstruct() { if (typeof Reflect === \"undefined\" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === \"function\") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }\n\nfunction _isNativeFunction(fn) { return Function.toString.call(fn).indexOf(\"[native code]\") !== -1; }\n\nfunction _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }\n\nfunction _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }\n\n/*\nTurbo 7.0.0\nCopyright © 2021 Basecamp, LLC\n */\n(function () {\n if (window.Reflect === undefined || window.customElements === undefined || window.customElements.polyfillWrapFlushCallback) {\n return;\n }\n\n var BuiltInHTMLElement = HTMLElement;\n var 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\nvar submittersByForm = new WeakMap();\n\nfunction findSubmitterFromClickTarget(target) {\n var element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n var candidate = element ? element.closest(\"input, button\") : null;\n return (candidate === null || candidate === void 0 ? void 0 : candidate.type) == \"submit\" ? candidate : null;\n}\n\nfunction clickCaptured(event) {\n var submitter = findSubmitterFromClickTarget(event.target);\n\n if (submitter && submitter.form) {\n submittersByForm.set(submitter.form, submitter);\n }\n}\n\n(function () {\n if (\"submitter\" in Event.prototype) return;\n var prototype;\n\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\n addEventListener(\"click\", clickCaptured, true);\n Object.defineProperty(prototype, \"submitter\", {\n get: function get() {\n if (this.type == \"submit\" && this.target instanceof HTMLFormElement) {\n return submittersByForm.get(this.target);\n }\n }\n });\n})();\n\nvar FrameLoadingStyle;\n\n(function (FrameLoadingStyle) {\n FrameLoadingStyle[\"eager\"] = \"eager\";\n FrameLoadingStyle[\"lazy\"] = \"lazy\";\n})(FrameLoadingStyle || (FrameLoadingStyle = {}));\n\nvar FrameElement = /*#__PURE__*/function (_HTMLElement) {\n _inherits(FrameElement, _HTMLElement);\n\n var _super = _createSuper(FrameElement);\n\n function FrameElement() {\n var _this;\n\n _classCallCheck(this, FrameElement);\n\n _this = _super.call(this);\n _this.loaded = Promise.resolve();\n _this.delegate = new FrameElement.delegateConstructor(_assertThisInitialized(_this));\n return _this;\n }\n\n _createClass(FrameElement, [{\n key: \"connectedCallback\",\n value: function connectedCallback() {\n this.delegate.connect();\n }\n }, {\n key: \"disconnectedCallback\",\n value: function disconnectedCallback() {\n this.delegate.disconnect();\n }\n }, {\n key: \"reload\",\n value: function reload() {\n var src = this.src;\n this.src = null;\n this.src = src;\n }\n }, {\n key: \"attributeChangedCallback\",\n value: function 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 }, {\n key: \"src\",\n get: function get() {\n return this.getAttribute(\"src\");\n },\n set: function set(value) {\n if (value) {\n this.setAttribute(\"src\", value);\n } else {\n this.removeAttribute(\"src\");\n }\n }\n }, {\n key: \"loading\",\n get: function get() {\n return frameLoadingStyleFromString(this.getAttribute(\"loading\") || \"\");\n },\n set: function set(value) {\n if (value) {\n this.setAttribute(\"loading\", value);\n } else {\n this.removeAttribute(\"loading\");\n }\n }\n }, {\n key: \"disabled\",\n get: function get() {\n return this.hasAttribute(\"disabled\");\n },\n set: function set(value) {\n if (value) {\n this.setAttribute(\"disabled\", \"\");\n } else {\n this.removeAttribute(\"disabled\");\n }\n }\n }, {\n key: \"autoscroll\",\n get: function get() {\n return this.hasAttribute(\"autoscroll\");\n },\n set: function set(value) {\n if (value) {\n this.setAttribute(\"autoscroll\", \"\");\n } else {\n this.removeAttribute(\"autoscroll\");\n }\n }\n }, {\n key: \"complete\",\n get: function get() {\n return !this.delegate.isLoading;\n }\n }, {\n key: \"isActive\",\n get: function get() {\n return this.ownerDocument === document && !this.isPreview;\n }\n }, {\n key: \"isPreview\",\n get: function get() {\n var _a, _b;\n\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 }], [{\n key: \"observedAttributes\",\n get: function get() {\n return [\"disabled\", \"loading\", \"src\"];\n }\n }]);\n\n return FrameElement;\n}( /*#__PURE__*/_wrapNativeSuper(HTMLElement));\n\nfunction frameLoadingStyleFromString(style) {\n switch (style.toLowerCase()) {\n case \"lazy\":\n return FrameLoadingStyle.lazy;\n\n default:\n return FrameLoadingStyle.eager;\n }\n}\n\nfunction expandURL(locatable) {\n return new URL(locatable.toString(), document.baseURI);\n}\n\nfunction getAnchor(url) {\n var anchorMatch;\n\n if (url.hash) {\n return url.hash.slice(1);\n } else if (anchorMatch = url.href.match(/#(.*)$/)) {\n return anchorMatch[1];\n }\n}\n\nfunction getExtension(url) {\n return (getLastPathComponent(url).match(/\\.[^.]*$/) || [])[0] || \"\";\n}\n\nfunction isHTML(url) {\n return !!getExtension(url).match(/^(?:|\\.(?:htm|html|xhtml))$/);\n}\n\nfunction isPrefixedBy(baseURL, url) {\n var prefix = getPrefix(url);\n return baseURL.href === expandURL(prefix).href || baseURL.href.startsWith(prefix);\n}\n\nfunction getRequestURL(url) {\n var anchor = getAnchor(url);\n return anchor != null ? url.href.slice(0, -(anchor.length + 1)) : url.href;\n}\n\nfunction toCacheKey(url) {\n return getRequestURL(url);\n}\n\nfunction urlsAreEqual(left, right) {\n return expandURL(left).href == expandURL(right).href;\n}\n\nfunction getPathComponents(url) {\n return url.pathname.split(\"/\").slice(1);\n}\n\nfunction getLastPathComponent(url) {\n return getPathComponents(url).slice(-1)[0];\n}\n\nfunction getPrefix(url) {\n return addTrailingSlash(url.origin + url.pathname);\n}\n\nfunction addTrailingSlash(value) {\n return value.endsWith(\"/\") ? value : value + \"/\";\n}\n\nvar FetchResponse = /*#__PURE__*/function () {\n function FetchResponse(response) {\n _classCallCheck(this, FetchResponse);\n\n this.response = response;\n }\n\n _createClass(FetchResponse, [{\n key: \"succeeded\",\n get: function get() {\n return this.response.ok;\n }\n }, {\n key: \"failed\",\n get: function get() {\n return !this.succeeded;\n }\n }, {\n key: \"clientError\",\n get: function get() {\n return this.statusCode >= 400 && this.statusCode <= 499;\n }\n }, {\n key: \"serverError\",\n get: function get() {\n return this.statusCode >= 500 && this.statusCode <= 599;\n }\n }, {\n key: \"redirected\",\n get: function get() {\n return this.response.redirected;\n }\n }, {\n key: \"location\",\n get: function get() {\n return expandURL(this.response.url);\n }\n }, {\n key: \"isHTML\",\n get: function get() {\n return this.contentType && this.contentType.match(/^(?:text\\/([^\\s;,]+\\b)?html|application\\/xhtml\\+xml)\\b/);\n }\n }, {\n key: \"statusCode\",\n get: function get() {\n return this.response.status;\n }\n }, {\n key: \"contentType\",\n get: function get() {\n return this.header(\"Content-Type\");\n }\n }, {\n key: \"responseText\",\n get: function get() {\n return this.response.clone().text();\n }\n }, {\n key: \"responseHTML\",\n get: function get() {\n if (this.isHTML) {\n return this.response.clone().text();\n } else {\n return Promise.resolve(undefined);\n }\n }\n }, {\n key: \"header\",\n value: function header(name) {\n return this.response.headers.get(name);\n }\n }]);\n\n return FetchResponse;\n}();\n\nfunction dispatch(eventName) {\n var _ref = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {},\n target = _ref.target,\n cancelable = _ref.cancelable,\n detail = _ref.detail;\n\n var event = new CustomEvent(eventName, {\n cancelable: cancelable,\n bubbles: true,\n detail: detail\n });\n\n if (target && target.isConnected) {\n target.dispatchEvent(event);\n } else {\n document.documentElement.dispatchEvent(event);\n }\n\n return event;\n}\n\nfunction nextAnimationFrame() {\n return new Promise(function (resolve) {\n return requestAnimationFrame(function () {\n return resolve();\n });\n });\n}\n\nfunction nextEventLoopTick() {\n return new Promise(function (resolve) {\n return setTimeout(function () {\n return resolve();\n }, 0);\n });\n}\n\nfunction nextMicrotask() {\n return Promise.resolve();\n}\n\nfunction parseHTMLDocument() {\n var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n return new DOMParser().parseFromString(html, \"text/html\");\n}\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\n var lines = interpolate(strings, values).replace(/^\\n/, \"\").split(\"\\n\");\n var match = lines[0].match(/^\\s+/);\n var indent = match ? match[0].length : 0;\n return lines.map(function (line) {\n return line.slice(indent);\n }).join(\"\\n\");\n}\n\nfunction interpolate(strings, values) {\n return strings.reduce(function (result, string, i) {\n var value = values[i] == undefined ? \"\" : values[i];\n return result + string + value;\n }, \"\");\n}\n\nfunction uuid() {\n return Array.apply(null, {\n length: 36\n }).map(function (_, 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}\n\nvar FetchMethod;\n\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 = {}));\n\nfunction fetchMethodFromString(method) {\n switch (method.toLowerCase()) {\n case \"get\":\n return FetchMethod.get;\n\n case \"post\":\n return FetchMethod.post;\n\n case \"put\":\n return FetchMethod.put;\n\n case \"patch\":\n return FetchMethod.patch;\n\n case \"delete\":\n return FetchMethod.delete;\n }\n}\n\nvar FetchRequest = /*#__PURE__*/function () {\n function FetchRequest(delegate, method, location) {\n var body = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : new URLSearchParams();\n var target = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;\n\n _classCallCheck(this, FetchRequest);\n\n this.abortController = new AbortController();\n\n this.resolveRequestPromise = function (value) {};\n\n this.delegate = delegate;\n this.method = method;\n this.headers = this.defaultHeaders;\n\n if (this.isIdempotent) {\n this.url = mergeFormDataEntries(location, _toConsumableArray(body.entries()));\n } else {\n this.body = body;\n this.url = location;\n }\n\n this.target = target;\n }\n\n _createClass(FetchRequest, [{\n key: \"location\",\n get: function get() {\n return this.url;\n }\n }, {\n key: \"params\",\n get: function get() {\n return this.url.searchParams;\n }\n }, {\n key: \"entries\",\n get: function get() {\n return this.body ? Array.from(this.body.entries()) : [];\n }\n }, {\n key: \"cancel\",\n value: function cancel() {\n this.abortController.abort();\n }\n }, {\n key: \"perform\",\n value: function () {\n var _perform = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {\n var _a, _b, fetchOptions, response;\n\n return _regeneratorRuntime.wrap(function _callee$(_context) {\n while (1) {\n switch (_context.prev = _context.next) {\n case 0:\n fetchOptions = this.fetchOptions;\n (_b = (_a = this.delegate).prepareHeadersForRequest) === null || _b === void 0 ? void 0 : _b.call(_a, this.headers, this);\n _context.next = 4;\n return this.allowRequestToBeIntercepted(fetchOptions);\n\n case 4:\n _context.prev = 4;\n this.delegate.requestStarted(this);\n _context.next = 8;\n return fetch(this.url.href, fetchOptions);\n\n case 8:\n response = _context.sent;\n _context.next = 11;\n return this.receive(response);\n\n case 11:\n return _context.abrupt(\"return\", _context.sent);\n\n case 14:\n _context.prev = 14;\n _context.t0 = _context[\"catch\"](4);\n\n if (!(_context.t0.name !== 'AbortError')) {\n _context.next = 19;\n break;\n }\n\n this.delegate.requestErrored(this, _context.t0);\n throw _context.t0;\n\n case 19:\n _context.prev = 19;\n this.delegate.requestFinished(this);\n return _context.finish(19);\n\n case 22:\n case \"end\":\n return _context.stop();\n }\n }\n }, _callee, this, [[4, 14, 19, 22]]);\n }));\n\n function perform() {\n return _perform.apply(this, arguments);\n }\n\n return perform;\n }()\n }, {\n key: \"receive\",\n value: function () {\n var _receive = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(response) {\n var fetchResponse, event;\n return _regeneratorRuntime.wrap(function _callee2$(_context2) {\n while (1) {\n switch (_context2.prev = _context2.next) {\n case 0:\n fetchResponse = new FetchResponse(response);\n event = dispatch(\"turbo:before-fetch-response\", {\n cancelable: true,\n detail: {\n fetchResponse: fetchResponse\n },\n target: this.target\n });\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\n return _context2.abrupt(\"return\", fetchResponse);\n\n case 4:\n case \"end\":\n return _context2.stop();\n }\n }\n }, _callee2, this);\n }));\n\n function receive(_x) {\n return _receive.apply(this, arguments);\n }\n\n return receive;\n }()\n }, {\n key: \"fetchOptions\",\n get: function get() {\n var _a;\n\n return {\n method: FetchMethod[this.method].toUpperCase(),\n credentials: \"same-origin\",\n headers: this.headers,\n redirect: \"follow\",\n body: this.body,\n signal: this.abortSignal,\n referrer: (_a = this.delegate.referrer) === null || _a === void 0 ? void 0 : _a.href\n };\n }\n }, {\n key: \"defaultHeaders\",\n get: function get() {\n return {\n \"Accept\": \"text/html, application/xhtml+xml\"\n };\n }\n }, {\n key: \"isIdempotent\",\n get: function get() {\n return this.method == FetchMethod.get;\n }\n }, {\n key: \"abortSignal\",\n get: function get() {\n return this.abortController.signal;\n }\n }, {\n key: \"allowRequestToBeIntercepted\",\n value: function () {\n var _allowRequestToBeIntercepted = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(fetchOptions) {\n var _this2 = this;\n\n var requestInterception, event;\n return _regeneratorRuntime.wrap(function _callee3$(_context3) {\n while (1) {\n switch (_context3.prev = _context3.next) {\n case 0:\n requestInterception = new Promise(function (resolve) {\n return _this2.resolveRequestPromise = resolve;\n });\n event = dispatch(\"turbo:before-fetch-request\", {\n cancelable: true,\n detail: {\n fetchOptions: fetchOptions,\n url: this.url.href,\n resume: this.resolveRequestPromise\n },\n target: this.target\n });\n\n if (!event.defaultPrevented) {\n _context3.next = 5;\n break;\n }\n\n _context3.next = 5;\n return requestInterception;\n\n case 5:\n case \"end\":\n return _context3.stop();\n }\n }\n }, _callee3, this);\n }));\n\n function allowRequestToBeIntercepted(_x2) {\n return _allowRequestToBeIntercepted.apply(this, arguments);\n }\n\n return allowRequestToBeIntercepted;\n }()\n }]);\n\n return FetchRequest;\n}();\n\nfunction mergeFormDataEntries(url, entries) {\n var currentSearchParams = new URLSearchParams(url.search);\n\n var _iterator = _createForOfIteratorHelper(entries),\n _step;\n\n try {\n for (_iterator.s(); !(_step = _iterator.n()).done;) {\n var _ref4 = _step.value;\n\n var _ref3 = _slicedToArray(_ref4, 2);\n\n var name = _ref3[0];\n var value = _ref3[1];\n if (value instanceof File) continue;\n\n if (currentSearchParams.has(name)) {\n currentSearchParams.delete(name);\n url.searchParams.set(name, value);\n } else {\n url.searchParams.append(name, value);\n }\n }\n } catch (err) {\n _iterator.e(err);\n } finally {\n _iterator.f();\n }\n\n return url;\n}\n\nvar AppearanceObserver = /*#__PURE__*/function () {\n function AppearanceObserver(delegate, element) {\n var _this3 = this;\n\n _classCallCheck(this, AppearanceObserver);\n\n this.started = false;\n\n this.intersect = function (entries) {\n var lastEntry = entries.slice(-1)[0];\n\n if (lastEntry === null || lastEntry === void 0 ? void 0 : lastEntry.isIntersecting) {\n _this3.delegate.elementAppearedInViewport(_this3.element);\n }\n };\n\n this.delegate = delegate;\n this.element = element;\n this.intersectionObserver = new IntersectionObserver(this.intersect);\n }\n\n _createClass(AppearanceObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n this.started = true;\n this.intersectionObserver.observe(this.element);\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n this.started = false;\n this.intersectionObserver.unobserve(this.element);\n }\n }\n }]);\n\n return AppearanceObserver;\n}();\n\nvar StreamMessage = /*#__PURE__*/function () {\n function StreamMessage(html) {\n _classCallCheck(this, StreamMessage);\n\n this.templateElement = document.createElement(\"template\");\n this.templateElement.innerHTML = html;\n }\n\n _createClass(StreamMessage, [{\n key: \"fragment\",\n get: function get() {\n var fragment = document.createDocumentFragment();\n\n var _iterator2 = _createForOfIteratorHelper(this.foreignElements),\n _step2;\n\n try {\n for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {\n var element = _step2.value;\n fragment.appendChild(document.importNode(element, true));\n }\n } catch (err) {\n _iterator2.e(err);\n } finally {\n _iterator2.f();\n }\n\n return fragment;\n }\n }, {\n key: \"foreignElements\",\n get: function get() {\n return this.templateChildren.reduce(function (streamElements, child) {\n if (child.tagName.toLowerCase() == \"turbo-stream\") {\n return [].concat(_toConsumableArray(streamElements), [child]);\n } else {\n return streamElements;\n }\n }, []);\n }\n }, {\n key: \"templateChildren\",\n get: function get() {\n return Array.from(this.templateElement.content.children);\n }\n }], [{\n key: \"wrap\",\n value: function wrap(message) {\n if (typeof message == \"string\") {\n return new this(message);\n } else {\n return message;\n }\n }\n }]);\n\n return StreamMessage;\n}();\n\nStreamMessage.contentType = \"text/vnd.turbo-stream.html\";\nvar FormSubmissionState;\n\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 = {}));\n\nvar FormEnctype;\n\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 = {}));\n\nfunction formEnctypeFromString(encoding) {\n switch (encoding.toLowerCase()) {\n case FormEnctype.multipart:\n return FormEnctype.multipart;\n\n case FormEnctype.plain:\n return FormEnctype.plain;\n\n default:\n return FormEnctype.urlEncoded;\n }\n}\n\nvar FormSubmission = /*#__PURE__*/function () {\n function FormSubmission(delegate, formElement, submitter) {\n var mustRedirect = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n _classCallCheck(this, FormSubmission);\n\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.fetchRequest = new FetchRequest(this, this.method, this.location, this.body, this.formElement);\n this.mustRedirect = mustRedirect;\n }\n\n _createClass(FormSubmission, [{\n key: \"method\",\n get: function get() {\n var _a;\n\n var 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 }, {\n key: \"action\",\n get: function get() {\n var _a;\n\n var 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 }, {\n key: \"location\",\n get: function get() {\n return expandURL(this.action);\n }\n }, {\n key: \"body\",\n get: function get() {\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 }, {\n key: \"enctype\",\n get: function get() {\n var _a;\n\n return formEnctypeFromString(((_a = this.submitter) === null || _a === void 0 ? void 0 : _a.getAttribute(\"formenctype\")) || this.formElement.enctype);\n }\n }, {\n key: \"isIdempotent\",\n get: function get() {\n return this.fetchRequest.isIdempotent;\n }\n }, {\n key: \"stringFormData\",\n get: function get() {\n return _toConsumableArray(this.formData).reduce(function (entries, _ref5) {\n var _ref6 = _slicedToArray(_ref5, 2),\n name = _ref6[0],\n value = _ref6[1];\n\n return entries.concat(typeof value == \"string\" ? [[name, value]] : []);\n }, []);\n }\n }, {\n key: \"start\",\n value: function () {\n var _start = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4() {\n var _FormSubmissionState, initialized, requesting;\n\n return _regeneratorRuntime.wrap(function _callee4$(_context4) {\n while (1) {\n switch (_context4.prev = _context4.next) {\n case 0:\n _FormSubmissionState = FormSubmissionState, initialized = _FormSubmissionState.initialized, requesting = _FormSubmissionState.requesting;\n\n if (!(this.state == initialized)) {\n _context4.next = 4;\n break;\n }\n\n this.state = requesting;\n return _context4.abrupt(\"return\", this.fetchRequest.perform());\n\n case 4:\n case \"end\":\n return _context4.stop();\n }\n }\n }, _callee4, this);\n }));\n\n function start() {\n return _start.apply(this, arguments);\n }\n\n return start;\n }()\n }, {\n key: \"stop\",\n value: function stop() {\n var _FormSubmissionState2 = FormSubmissionState,\n stopping = _FormSubmissionState2.stopping,\n stopped = _FormSubmissionState2.stopped;\n\n if (this.state != stopping && this.state != stopped) {\n this.state = stopping;\n this.fetchRequest.cancel();\n return true;\n }\n }\n }, {\n key: \"prepareHeadersForRequest\",\n value: function prepareHeadersForRequest(headers, request) {\n if (!request.isIdempotent) {\n var token = getCookieValue(getMetaContent(\"csrf-param\")) || getMetaContent(\"csrf-token\");\n\n if (token) {\n headers[\"X-CSRF-Token\"] = token;\n }\n\n headers[\"Accept\"] = [StreamMessage.contentType, headers[\"Accept\"]].join(\", \");\n }\n }\n }, {\n key: \"requestStarted\",\n value: function requestStarted(request) {\n this.state = FormSubmissionState.waiting;\n dispatch(\"turbo:submit-start\", {\n target: this.formElement,\n detail: {\n formSubmission: this\n }\n });\n this.delegate.formSubmissionStarted(this);\n }\n }, {\n key: \"requestPreventedHandlingResponse\",\n value: function requestPreventedHandlingResponse(request, response) {\n this.result = {\n success: response.succeeded,\n fetchResponse: response\n };\n }\n }, {\n key: \"requestSucceededWithResponse\",\n value: function requestSucceededWithResponse(request, response) {\n if (response.clientError || response.serverError) {\n this.delegate.formSubmissionFailedWithResponse(this, response);\n } else if (this.requestMustRedirect(request) && responseSucceededWithoutRedirect(response)) {\n var 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 }, {\n key: \"requestFailedWithResponse\",\n value: function requestFailedWithResponse(request, response) {\n this.result = {\n success: false,\n fetchResponse: response\n };\n this.delegate.formSubmissionFailedWithResponse(this, response);\n }\n }, {\n key: \"requestErrored\",\n value: function requestErrored(request, error) {\n this.result = {\n success: false,\n error: error\n };\n this.delegate.formSubmissionErrored(this, error);\n }\n }, {\n key: \"requestFinished\",\n value: function requestFinished(request) {\n this.state = FormSubmissionState.stopped;\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 }, {\n key: \"requestMustRedirect\",\n value: function requestMustRedirect(request) {\n return !request.isIdempotent && this.mustRedirect;\n }\n }]);\n\n return FormSubmission;\n}();\n\nfunction buildFormData(formElement, submitter) {\n var formData = new FormData(formElement);\n var name = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"name\");\n var value = submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"value\");\n\n if (name && value != null && formData.get(name) != value) {\n formData.append(name, value);\n }\n\n return formData;\n}\n\nfunction getCookieValue(cookieName) {\n if (cookieName != null) {\n var cookies = document.cookie ? document.cookie.split(\"; \") : [];\n var cookie = cookies.find(function (cookie) {\n return cookie.startsWith(cookieName);\n });\n\n if (cookie) {\n var value = cookie.split(\"=\").slice(1).join(\"=\");\n return value ? decodeURIComponent(value) : undefined;\n }\n }\n}\n\nfunction getMetaContent(name) {\n var element = document.querySelector(\"meta[name=\\\"\".concat(name, \"\\\"]\"));\n return element && element.content;\n}\n\nfunction responseSucceededWithoutRedirect(response) {\n return response.statusCode == 200 && !response.redirected;\n}\n\nvar Snapshot = /*#__PURE__*/function () {\n function Snapshot(element) {\n _classCallCheck(this, Snapshot);\n\n this.element = element;\n }\n\n _createClass(Snapshot, [{\n key: \"children\",\n get: function get() {\n return _toConsumableArray(this.element.children);\n }\n }, {\n key: \"hasAnchor\",\n value: function hasAnchor(anchor) {\n return this.getElementForAnchor(anchor) != null;\n }\n }, {\n key: \"getElementForAnchor\",\n value: function getElementForAnchor(anchor) {\n return anchor ? this.element.querySelector(\"[id='\".concat(anchor, \"'], a[name='\").concat(anchor, \"']\")) : null;\n }\n }, {\n key: \"isConnected\",\n get: function get() {\n return this.element.isConnected;\n }\n }, {\n key: \"firstAutofocusableElement\",\n get: function get() {\n return this.element.querySelector(\"[autofocus]\");\n }\n }, {\n key: \"permanentElements\",\n get: function get() {\n return _toConsumableArray(this.element.querySelectorAll(\"[id][data-turbo-permanent]\"));\n }\n }, {\n key: \"getPermanentElementById\",\n value: function getPermanentElementById(id) {\n return this.element.querySelector(\"#\".concat(id, \"[data-turbo-permanent]\"));\n }\n }, {\n key: \"getPermanentElementMapForSnapshot\",\n value: function getPermanentElementMapForSnapshot(snapshot) {\n var permanentElementMap = {};\n\n var _iterator3 = _createForOfIteratorHelper(this.permanentElements),\n _step3;\n\n try {\n for (_iterator3.s(); !(_step3 = _iterator3.n()).done;) {\n var currentPermanentElement = _step3.value;\n var id = currentPermanentElement.id;\n var newPermanentElement = snapshot.getPermanentElementById(id);\n\n if (newPermanentElement) {\n permanentElementMap[id] = [currentPermanentElement, newPermanentElement];\n }\n }\n } catch (err) {\n _iterator3.e(err);\n } finally {\n _iterator3.f();\n }\n\n return permanentElementMap;\n }\n }]);\n\n return Snapshot;\n}();\n\nvar FormInterceptor = /*#__PURE__*/function () {\n function FormInterceptor(delegate, element) {\n var _this4 = this;\n\n _classCallCheck(this, FormInterceptor);\n\n this.submitBubbled = function (event) {\n var form = event.target;\n\n if (form instanceof HTMLFormElement && form.closest(\"turbo-frame, html\") == _this4.element) {\n var submitter = event.submitter || undefined;\n\n if (_this4.delegate.shouldInterceptFormSubmission(form, submitter)) {\n event.preventDefault();\n event.stopImmediatePropagation();\n\n _this4.delegate.formSubmissionIntercepted(form, submitter);\n }\n }\n };\n\n this.delegate = delegate;\n this.element = element;\n }\n\n _createClass(FormInterceptor, [{\n key: \"start\",\n value: function start() {\n this.element.addEventListener(\"submit\", this.submitBubbled);\n }\n }, {\n key: \"stop\",\n value: function stop() {\n this.element.removeEventListener(\"submit\", this.submitBubbled);\n }\n }]);\n\n return FormInterceptor;\n}();\n\nvar View = /*#__PURE__*/function () {\n function View(delegate, element) {\n _classCallCheck(this, View);\n\n this.resolveRenderPromise = function (value) {};\n\n this.resolveInterceptionPromise = function (value) {};\n\n this.delegate = delegate;\n this.element = element;\n }\n\n _createClass(View, [{\n key: \"scrollToAnchor\",\n value: function scrollToAnchor(anchor) {\n var element = this.snapshot.getElementForAnchor(anchor);\n\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 }, {\n key: \"scrollToAnchorFromLocation\",\n value: function scrollToAnchorFromLocation(location) {\n this.scrollToAnchor(getAnchor(location));\n }\n }, {\n key: \"scrollToElement\",\n value: function scrollToElement(element) {\n element.scrollIntoView();\n }\n }, {\n key: \"focusElement\",\n value: function 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 }, {\n key: \"scrollToPosition\",\n value: function scrollToPosition(_ref7) {\n var x = _ref7.x,\n y = _ref7.y;\n this.scrollRoot.scrollTo(x, y);\n }\n }, {\n key: \"scrollToTop\",\n value: function scrollToTop() {\n this.scrollToPosition({\n x: 0,\n y: 0\n });\n }\n }, {\n key: \"scrollRoot\",\n get: function get() {\n return window;\n }\n }, {\n key: \"render\",\n value: function () {\n var _render = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(renderer) {\n var _this5 = this;\n\n var isPreview, shouldRender, snapshot, renderInterception, immediateRender;\n return _regeneratorRuntime.wrap(function _callee5$(_context5) {\n while (1) {\n switch (_context5.prev = _context5.next) {\n case 0:\n isPreview = renderer.isPreview, shouldRender = renderer.shouldRender, snapshot = renderer.newSnapshot;\n\n if (!shouldRender) {\n _context5.next = 22;\n break;\n }\n\n _context5.prev = 2;\n this.renderPromise = new Promise(function (resolve) {\n return _this5.resolveRenderPromise = resolve;\n });\n this.renderer = renderer;\n this.prepareToRenderSnapshot(renderer);\n renderInterception = new Promise(function (resolve) {\n return _this5.resolveInterceptionPromise = resolve;\n });\n immediateRender = this.delegate.allowsImmediateRender(snapshot, this.resolveInterceptionPromise);\n\n if (immediateRender) {\n _context5.next = 11;\n break;\n }\n\n _context5.next = 11;\n return renderInterception;\n\n case 11:\n _context5.next = 13;\n return this.renderSnapshot(renderer);\n\n case 13:\n this.delegate.viewRenderedSnapshot(snapshot, isPreview);\n this.finishRenderingSnapshot(renderer);\n\n case 15:\n _context5.prev = 15;\n delete this.renderer;\n this.resolveRenderPromise(undefined);\n delete this.renderPromise;\n return _context5.finish(15);\n\n case 20:\n _context5.next = 23;\n break;\n\n case 22:\n this.invalidate();\n\n case 23:\n case \"end\":\n return _context5.stop();\n }\n }\n }, _callee5, this, [[2,, 15, 20]]);\n }));\n\n function render(_x3) {\n return _render.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"invalidate\",\n value: function invalidate() {\n this.delegate.viewInvalidated();\n }\n }, {\n key: \"prepareToRenderSnapshot\",\n value: function prepareToRenderSnapshot(renderer) {\n this.markAsPreview(renderer.isPreview);\n renderer.prepareToRender();\n }\n }, {\n key: \"markAsPreview\",\n value: function markAsPreview(isPreview) {\n if (isPreview) {\n this.element.setAttribute(\"data-turbo-preview\", \"\");\n } else {\n this.element.removeAttribute(\"data-turbo-preview\");\n }\n }\n }, {\n key: \"renderSnapshot\",\n value: function () {\n var _renderSnapshot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee6(renderer) {\n return _regeneratorRuntime.wrap(function _callee6$(_context6) {\n while (1) {\n switch (_context6.prev = _context6.next) {\n case 0:\n _context6.next = 2;\n return renderer.render();\n\n case 2:\n case \"end\":\n return _context6.stop();\n }\n }\n }, _callee6);\n }));\n\n function renderSnapshot(_x4) {\n return _renderSnapshot.apply(this, arguments);\n }\n\n return renderSnapshot;\n }()\n }, {\n key: \"finishRenderingSnapshot\",\n value: function finishRenderingSnapshot(renderer) {\n renderer.finishRendering();\n }\n }]);\n\n return View;\n}();\n\nvar FrameView = /*#__PURE__*/function (_View) {\n _inherits(FrameView, _View);\n\n var _super2 = _createSuper(FrameView);\n\n function FrameView() {\n _classCallCheck(this, FrameView);\n\n return _super2.apply(this, arguments);\n }\n\n _createClass(FrameView, [{\n key: \"invalidate\",\n value: function invalidate() {\n this.element.innerHTML = \"\";\n }\n }, {\n key: \"snapshot\",\n get: function get() {\n return new Snapshot(this.element);\n }\n }]);\n\n return FrameView;\n}(View);\n\nvar LinkInterceptor = /*#__PURE__*/function () {\n function LinkInterceptor(delegate, element) {\n var _this6 = this;\n\n _classCallCheck(this, LinkInterceptor);\n\n this.clickBubbled = function (event) {\n if (_this6.respondsToEventTarget(event.target)) {\n _this6.clickEvent = event;\n } else {\n delete _this6.clickEvent;\n }\n };\n\n this.linkClicked = function (event) {\n if (_this6.clickEvent && _this6.respondsToEventTarget(event.target) && event.target instanceof Element) {\n if (_this6.delegate.shouldInterceptLinkClick(event.target, event.detail.url)) {\n _this6.clickEvent.preventDefault();\n\n event.preventDefault();\n\n _this6.delegate.linkClickIntercepted(event.target, event.detail.url);\n }\n }\n\n delete _this6.clickEvent;\n };\n\n this.willVisit = function () {\n delete _this6.clickEvent;\n };\n\n this.delegate = delegate;\n this.element = element;\n }\n\n _createClass(LinkInterceptor, [{\n key: \"start\",\n value: function 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 }, {\n key: \"stop\",\n value: function 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 }, {\n key: \"respondsToEventTarget\",\n value: function respondsToEventTarget(target) {\n var element = target instanceof Element ? target : target instanceof Node ? target.parentElement : null;\n return element && element.closest(\"turbo-frame, html\") == this.element;\n }\n }]);\n\n return LinkInterceptor;\n}();\n\nvar Bardo = /*#__PURE__*/function () {\n function Bardo(permanentElementMap) {\n _classCallCheck(this, Bardo);\n\n this.permanentElementMap = permanentElementMap;\n }\n\n _createClass(Bardo, [{\n key: \"enter\",\n value: function enter() {\n for (var id in this.permanentElementMap) {\n var _this$permanentElemen = _slicedToArray(this.permanentElementMap[id], 2),\n newPermanentElement = _this$permanentElemen[1];\n\n this.replaceNewPermanentElementWithPlaceholder(newPermanentElement);\n }\n }\n }, {\n key: \"leave\",\n value: function leave() {\n for (var id in this.permanentElementMap) {\n var _this$permanentElemen2 = _slicedToArray(this.permanentElementMap[id], 1),\n currentPermanentElement = _this$permanentElemen2[0];\n\n this.replaceCurrentPermanentElementWithClone(currentPermanentElement);\n this.replacePlaceholderWithPermanentElement(currentPermanentElement);\n }\n }\n }, {\n key: \"replaceNewPermanentElementWithPlaceholder\",\n value: function replaceNewPermanentElementWithPlaceholder(permanentElement) {\n var placeholder = createPlaceholderForPermanentElement(permanentElement);\n permanentElement.replaceWith(placeholder);\n }\n }, {\n key: \"replaceCurrentPermanentElementWithClone\",\n value: function replaceCurrentPermanentElementWithClone(permanentElement) {\n var clone = permanentElement.cloneNode(true);\n permanentElement.replaceWith(clone);\n }\n }, {\n key: \"replacePlaceholderWithPermanentElement\",\n value: function replacePlaceholderWithPermanentElement(permanentElement) {\n var placeholder = this.getPlaceholderById(permanentElement.id);\n placeholder === null || placeholder === void 0 ? void 0 : placeholder.replaceWith(permanentElement);\n }\n }, {\n key: \"getPlaceholderById\",\n value: function getPlaceholderById(id) {\n return this.placeholders.find(function (element) {\n return element.content == id;\n });\n }\n }, {\n key: \"placeholders\",\n get: function get() {\n return _toConsumableArray(document.querySelectorAll(\"meta[name=turbo-permanent-placeholder][content]\"));\n }\n }], [{\n key: \"preservingPermanentElements\",\n value: function preservingPermanentElements(permanentElementMap, callback) {\n var bardo = new this(permanentElementMap);\n bardo.enter();\n callback();\n bardo.leave();\n }\n }]);\n\n return Bardo;\n}();\n\nfunction createPlaceholderForPermanentElement(permanentElement) {\n var element = document.createElement(\"meta\");\n element.setAttribute(\"name\", \"turbo-permanent-placeholder\");\n element.setAttribute(\"content\", permanentElement.id);\n return element;\n}\n\nvar Renderer = /*#__PURE__*/function () {\n function Renderer(currentSnapshot, newSnapshot, isPreview) {\n var _this7 = this;\n\n _classCallCheck(this, Renderer);\n\n this.currentSnapshot = currentSnapshot;\n this.newSnapshot = newSnapshot;\n this.isPreview = isPreview;\n this.promise = new Promise(function (resolve, reject) {\n return _this7.resolvingFunctions = {\n resolve: resolve,\n reject: reject\n };\n });\n }\n\n _createClass(Renderer, [{\n key: \"shouldRender\",\n get: function get() {\n return true;\n }\n }, {\n key: \"prepareToRender\",\n value: function prepareToRender() {\n return;\n }\n }, {\n key: \"finishRendering\",\n value: function finishRendering() {\n if (this.resolvingFunctions) {\n this.resolvingFunctions.resolve();\n delete this.resolvingFunctions;\n }\n }\n }, {\n key: \"createScriptElement\",\n value: function createScriptElement(element) {\n if (element.getAttribute(\"data-turbo-eval\") == \"false\") {\n return element;\n } else {\n var createdScriptElement = document.createElement(\"script\");\n\n if (this.cspNonce) {\n createdScriptElement.nonce = this.cspNonce;\n }\n\n createdScriptElement.textContent = element.textContent;\n createdScriptElement.async = false;\n copyElementAttributes(createdScriptElement, element);\n return createdScriptElement;\n }\n }\n }, {\n key: \"preservingPermanentElements\",\n value: function preservingPermanentElements(callback) {\n Bardo.preservingPermanentElements(this.permanentElementMap, callback);\n }\n }, {\n key: \"focusFirstAutofocusableElement\",\n value: function focusFirstAutofocusableElement() {\n var element = this.connectedSnapshot.firstAutofocusableElement;\n\n if (elementIsFocusable(element)) {\n element.focus();\n }\n }\n }, {\n key: \"connectedSnapshot\",\n get: function get() {\n return this.newSnapshot.isConnected ? this.newSnapshot : this.currentSnapshot;\n }\n }, {\n key: \"currentElement\",\n get: function get() {\n return this.currentSnapshot.element;\n }\n }, {\n key: \"newElement\",\n get: function get() {\n return this.newSnapshot.element;\n }\n }, {\n key: \"permanentElementMap\",\n get: function get() {\n return this.currentSnapshot.getPermanentElementMapForSnapshot(this.newSnapshot);\n }\n }, {\n key: \"cspNonce\",\n get: function get() {\n var _a;\n\n return (_a = document.head.querySelector('meta[name=\"csp-nonce\"]')) === null || _a === void 0 ? void 0 : _a.getAttribute(\"content\");\n }\n }]);\n\n return Renderer;\n}();\n\nfunction copyElementAttributes(destinationElement, sourceElement) {\n for (var _i2 = 0, _arr2 = _toConsumableArray(sourceElement.attributes); _i2 < _arr2.length; _i2++) {\n var _ref9 = _arr2[_i2];\n var name = _ref9.name;\n var value = _ref9.value;\n destinationElement.setAttribute(name, value);\n }\n}\n\nfunction elementIsFocusable(element) {\n return element && typeof element.focus == \"function\";\n}\n\nvar FrameRenderer = /*#__PURE__*/function (_Renderer) {\n _inherits(FrameRenderer, _Renderer);\n\n var _super3 = _createSuper(FrameRenderer);\n\n function FrameRenderer() {\n _classCallCheck(this, FrameRenderer);\n\n return _super3.apply(this, arguments);\n }\n\n _createClass(FrameRenderer, [{\n key: \"shouldRender\",\n get: function get() {\n return true;\n }\n }, {\n key: \"render\",\n value: function () {\n var _render2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee7() {\n var _this8 = this;\n\n return _regeneratorRuntime.wrap(function _callee7$(_context7) {\n while (1) {\n switch (_context7.prev = _context7.next) {\n case 0:\n _context7.next = 2;\n return nextAnimationFrame();\n\n case 2:\n this.preservingPermanentElements(function () {\n _this8.loadFrameElement();\n });\n this.scrollFrameIntoView();\n _context7.next = 6;\n return nextAnimationFrame();\n\n case 6:\n this.focusFirstAutofocusableElement();\n _context7.next = 9;\n return nextAnimationFrame();\n\n case 9:\n this.activateScriptElements();\n\n case 10:\n case \"end\":\n return _context7.stop();\n }\n }\n }, _callee7, this);\n }));\n\n function render() {\n return _render2.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"loadFrameElement\",\n value: function loadFrameElement() {\n var _a;\n\n var destinationRange = document.createRange();\n destinationRange.selectNodeContents(this.currentElement);\n destinationRange.deleteContents();\n var frameElement = this.newElement;\n var sourceRange = (_a = frameElement.ownerDocument) === null || _a === void 0 ? void 0 : _a.createRange();\n\n if (sourceRange) {\n sourceRange.selectNodeContents(frameElement);\n this.currentElement.appendChild(sourceRange.extractContents());\n }\n }\n }, {\n key: \"scrollFrameIntoView\",\n value: function scrollFrameIntoView() {\n if (this.currentElement.autoscroll || this.newElement.autoscroll) {\n var element = this.currentElement.firstElementChild;\n var block = readScrollLogicalPosition(this.currentElement.getAttribute(\"data-autoscroll-block\"), \"end\");\n\n if (element) {\n element.scrollIntoView({\n block: block\n });\n return true;\n }\n }\n\n return false;\n }\n }, {\n key: \"activateScriptElements\",\n value: function activateScriptElements() {\n var _iterator4 = _createForOfIteratorHelper(this.newScriptElements),\n _step4;\n\n try {\n for (_iterator4.s(); !(_step4 = _iterator4.n()).done;) {\n var inertScriptElement = _step4.value;\n var activatedScriptElement = this.createScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n } catch (err) {\n _iterator4.e(err);\n } finally {\n _iterator4.f();\n }\n }\n }, {\n key: \"newScriptElements\",\n get: function get() {\n return this.currentElement.querySelectorAll(\"script\");\n }\n }]);\n\n return FrameRenderer;\n}(Renderer);\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}\n\nvar ProgressBar = /*#__PURE__*/function () {\n function ProgressBar() {\n var _this9 = this;\n\n _classCallCheck(this, ProgressBar);\n\n this.hiding = false;\n this.value = 0;\n this.visible = false;\n\n this.trickle = function () {\n _this9.setValue(_this9.value + Math.random() / 100);\n };\n\n this.stylesheetElement = this.createStylesheetElement();\n this.progressElement = this.createProgressElement();\n this.installStylesheetElement();\n this.setValue(0);\n }\n\n _createClass(ProgressBar, [{\n key: \"show\",\n value: function show() {\n if (!this.visible) {\n this.visible = true;\n this.installProgressElement();\n this.startTrickling();\n }\n }\n }, {\n key: \"hide\",\n value: function hide() {\n var _this10 = this;\n\n if (this.visible && !this.hiding) {\n this.hiding = true;\n this.fadeProgressElement(function () {\n _this10.uninstallProgressElement();\n\n _this10.stopTrickling();\n\n _this10.visible = false;\n _this10.hiding = false;\n });\n }\n }\n }, {\n key: \"setValue\",\n value: function setValue(value) {\n this.value = value;\n this.refresh();\n }\n }, {\n key: \"installStylesheetElement\",\n value: function installStylesheetElement() {\n document.head.insertBefore(this.stylesheetElement, document.head.firstChild);\n }\n }, {\n key: \"installProgressElement\",\n value: function 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 }, {\n key: \"fadeProgressElement\",\n value: function fadeProgressElement(callback) {\n this.progressElement.style.opacity = \"0\";\n setTimeout(callback, ProgressBar.animationDuration * 1.5);\n }\n }, {\n key: \"uninstallProgressElement\",\n value: function uninstallProgressElement() {\n if (this.progressElement.parentNode) {\n document.documentElement.removeChild(this.progressElement);\n }\n }\n }, {\n key: \"startTrickling\",\n value: function startTrickling() {\n if (!this.trickleInterval) {\n this.trickleInterval = window.setInterval(this.trickle, ProgressBar.animationDuration);\n }\n }\n }, {\n key: \"stopTrickling\",\n value: function stopTrickling() {\n window.clearInterval(this.trickleInterval);\n delete this.trickleInterval;\n }\n }, {\n key: \"refresh\",\n value: function refresh() {\n var _this11 = this;\n\n requestAnimationFrame(function () {\n _this11.progressElement.style.width = \"\".concat(10 + _this11.value * 90, \"%\");\n });\n }\n }, {\n key: \"createStylesheetElement\",\n value: function createStylesheetElement() {\n var element = document.createElement(\"style\");\n element.type = \"text/css\";\n element.textContent = ProgressBar.defaultCSS;\n return element;\n }\n }, {\n key: \"createProgressElement\",\n value: function createProgressElement() {\n var element = document.createElement(\"div\");\n element.className = \"turbo-progress-bar\";\n return element;\n }\n }], [{\n key: \"defaultCSS\",\n get: function get() {\n return unindent(_templateObject || (_templateObject = _taggedTemplateLiteral([\"\\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 \", \"ms ease-out,\\n opacity \", \"ms \", \"ms ease-in;\\n transform: translate3d(0, 0, 0);\\n }\\n \"])), ProgressBar.animationDuration, ProgressBar.animationDuration / 2, ProgressBar.animationDuration / 2);\n }\n }]);\n\n return ProgressBar;\n}();\n\nProgressBar.animationDuration = 300;\n\nvar HeadSnapshot = /*#__PURE__*/function (_Snapshot) {\n _inherits(HeadSnapshot, _Snapshot);\n\n var _super4 = _createSuper(HeadSnapshot);\n\n function HeadSnapshot() {\n var _this12;\n\n _classCallCheck(this, HeadSnapshot);\n\n _this12 = _super4.apply(this, arguments);\n _this12.detailsByOuterHTML = _this12.children.filter(function (element) {\n return !elementIsNoscript(element);\n }).map(function (element) {\n return elementWithoutNonce(element);\n }).reduce(function (result, element) {\n var outerHTML = element.outerHTML;\n var details = outerHTML in result ? result[outerHTML] : {\n type: elementType(element),\n tracked: elementIsTracked(element),\n elements: []\n };\n return Object.assign(Object.assign({}, result), _defineProperty({}, outerHTML, Object.assign(Object.assign({}, details), {\n elements: [].concat(_toConsumableArray(details.elements), [element])\n })));\n }, {});\n return _this12;\n }\n\n _createClass(HeadSnapshot, [{\n key: \"trackedElementSignature\",\n get: function get() {\n var _this13 = this;\n\n return Object.keys(this.detailsByOuterHTML).filter(function (outerHTML) {\n return _this13.detailsByOuterHTML[outerHTML].tracked;\n }).join(\"\");\n }\n }, {\n key: \"getScriptElementsNotInSnapshot\",\n value: function getScriptElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"script\", snapshot);\n }\n }, {\n key: \"getStylesheetElementsNotInSnapshot\",\n value: function getStylesheetElementsNotInSnapshot(snapshot) {\n return this.getElementsMatchingTypeNotInSnapshot(\"stylesheet\", snapshot);\n }\n }, {\n key: \"getElementsMatchingTypeNotInSnapshot\",\n value: function getElementsMatchingTypeNotInSnapshot(matchedType, snapshot) {\n var _this14 = this;\n\n return Object.keys(this.detailsByOuterHTML).filter(function (outerHTML) {\n return !(outerHTML in snapshot.detailsByOuterHTML);\n }).map(function (outerHTML) {\n return _this14.detailsByOuterHTML[outerHTML];\n }).filter(function (_ref10) {\n var type = _ref10.type;\n return type == matchedType;\n }).map(function (_ref11) {\n var _ref11$elements = _slicedToArray(_ref11.elements, 1),\n element = _ref11$elements[0];\n\n return element;\n });\n }\n }, {\n key: \"provisionalElements\",\n get: function get() {\n var _this15 = this;\n\n return Object.keys(this.detailsByOuterHTML).reduce(function (result, outerHTML) {\n var _this15$detailsByOute = _this15.detailsByOuterHTML[outerHTML],\n type = _this15$detailsByOute.type,\n tracked = _this15$detailsByOute.tracked,\n elements = _this15$detailsByOute.elements;\n\n if (type == null && !tracked) {\n return [].concat(_toConsumableArray(result), _toConsumableArray(elements));\n } else if (elements.length > 1) {\n return [].concat(_toConsumableArray(result), _toConsumableArray(elements.slice(1)));\n } else {\n return result;\n }\n }, []);\n }\n }, {\n key: \"getMetaValue\",\n value: function getMetaValue(name) {\n var element = this.findMetaElementByName(name);\n return element ? element.getAttribute(\"content\") : null;\n }\n }, {\n key: \"findMetaElementByName\",\n value: function findMetaElementByName(name) {\n var _this16 = this;\n\n return Object.keys(this.detailsByOuterHTML).reduce(function (result, outerHTML) {\n var _this16$detailsByOute = _slicedToArray(_this16.detailsByOuterHTML[outerHTML].elements, 1),\n element = _this16$detailsByOute[0];\n\n return elementIsMetaElementWithName(element, name) ? element : result;\n }, undefined);\n }\n }]);\n\n return HeadSnapshot;\n}(Snapshot);\n\nfunction elementType(element) {\n if (elementIsScript(element)) {\n return \"script\";\n } else if (elementIsStylesheet(element)) {\n return \"stylesheet\";\n }\n}\n\nfunction elementIsTracked(element) {\n return element.getAttribute(\"data-turbo-track\") == \"reload\";\n}\n\nfunction elementIsScript(element) {\n var tagName = element.tagName.toLowerCase();\n return tagName == \"script\";\n}\n\nfunction elementIsNoscript(element) {\n var tagName = element.tagName.toLowerCase();\n return tagName == \"noscript\";\n}\n\nfunction elementIsStylesheet(element) {\n var tagName = element.tagName.toLowerCase();\n return tagName == \"style\" || tagName == \"link\" && element.getAttribute(\"rel\") == \"stylesheet\";\n}\n\nfunction elementIsMetaElementWithName(element, name) {\n var tagName = element.tagName.toLowerCase();\n return tagName == \"meta\" && element.getAttribute(\"name\") == name;\n}\n\nfunction elementWithoutNonce(element) {\n if (element.hasAttribute(\"nonce\")) {\n element.setAttribute(\"nonce\", \"\");\n }\n\n return element;\n}\n\nvar PageSnapshot = /*#__PURE__*/function (_Snapshot2) {\n _inherits(PageSnapshot, _Snapshot2);\n\n var _super5 = _createSuper(PageSnapshot);\n\n function PageSnapshot(element, headSnapshot) {\n var _this17;\n\n _classCallCheck(this, PageSnapshot);\n\n _this17 = _super5.call(this, element);\n _this17.headSnapshot = headSnapshot;\n return _this17;\n }\n\n _createClass(PageSnapshot, [{\n key: \"clone\",\n value: function clone() {\n return new PageSnapshot(this.element.cloneNode(true), this.headSnapshot);\n }\n }, {\n key: \"headElement\",\n get: function get() {\n return this.headSnapshot.element;\n }\n }, {\n key: \"rootLocation\",\n get: function get() {\n var _a;\n\n var root = (_a = this.getSetting(\"root\")) !== null && _a !== void 0 ? _a : \"/\";\n return expandURL(root);\n }\n }, {\n key: \"cacheControlValue\",\n get: function get() {\n return this.getSetting(\"cache-control\");\n }\n }, {\n key: \"isPreviewable\",\n get: function get() {\n return this.cacheControlValue != \"no-preview\";\n }\n }, {\n key: \"isCacheable\",\n get: function get() {\n return this.cacheControlValue != \"no-cache\";\n }\n }, {\n key: \"isVisitable\",\n get: function get() {\n return this.getSetting(\"visit-control\") != \"reload\";\n }\n }, {\n key: \"getSetting\",\n value: function getSetting(name) {\n return this.headSnapshot.getMetaValue(\"turbo-\".concat(name));\n }\n }], [{\n key: \"fromHTMLString\",\n value: function fromHTMLString() {\n var html = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"\";\n return this.fromDocument(parseHTMLDocument(html));\n }\n }, {\n key: \"fromElement\",\n value: function fromElement(element) {\n return this.fromDocument(element.ownerDocument);\n }\n }, {\n key: \"fromDocument\",\n value: function fromDocument(_ref12) {\n var head = _ref12.head,\n body = _ref12.body;\n return new this(body, new HeadSnapshot(head));\n }\n }]);\n\n return PageSnapshot;\n}(Snapshot);\n\nvar TimingMetric;\n\n(function (TimingMetric) {\n TimingMetric[\"visitStart\"] = \"visitStart\";\n TimingMetric[\"requestStart\"] = \"requestStart\";\n TimingMetric[\"requestEnd\"] = \"requestEnd\";\n TimingMetric[\"visitEnd\"] = \"visitEnd\";\n})(TimingMetric || (TimingMetric = {}));\n\nvar VisitState;\n\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 = {}));\n\nvar defaultOptions = {\n action: \"advance\",\n historyChanged: false\n};\nvar SystemStatusCode;\n\n(function (SystemStatusCode) {\n SystemStatusCode[SystemStatusCode[\"networkFailure\"] = 0] = \"networkFailure\";\n SystemStatusCode[SystemStatusCode[\"timeoutFailure\"] = -1] = \"timeoutFailure\";\n SystemStatusCode[SystemStatusCode[\"contentTypeMismatch\"] = -2] = \"contentTypeMismatch\";\n})(SystemStatusCode || (SystemStatusCode = {}));\n\nvar Visit = /*#__PURE__*/function () {\n function Visit(delegate, location, restorationIdentifier) {\n var options = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};\n\n _classCallCheck(this, Visit);\n\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\n var _Object$assign2 = Object.assign(Object.assign({}, defaultOptions), options),\n action = _Object$assign2.action,\n historyChanged = _Object$assign2.historyChanged,\n referrer = _Object$assign2.referrer,\n snapshotHTML = _Object$assign2.snapshotHTML,\n response = _Object$assign2.response;\n\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 }\n\n _createClass(Visit, [{\n key: \"adapter\",\n get: function get() {\n return this.delegate.adapter;\n }\n }, {\n key: \"view\",\n get: function get() {\n return this.delegate.view;\n }\n }, {\n key: \"history\",\n get: function get() {\n return this.delegate.history;\n }\n }, {\n key: \"restorationData\",\n get: function get() {\n return this.history.getRestorationDataForIdentifier(this.restorationIdentifier);\n }\n }, {\n key: \"silent\",\n get: function get() {\n return this.isSamePage;\n }\n }, {\n key: \"start\",\n value: function 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 }, {\n key: \"cancel\",\n value: function cancel() {\n if (this.state == VisitState.started) {\n if (this.request) {\n this.request.cancel();\n }\n\n this.cancelRender();\n this.state = VisitState.canceled;\n }\n }\n }, {\n key: \"complete\",\n value: function 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 }, {\n key: \"fail\",\n value: function fail() {\n if (this.state == VisitState.started) {\n this.state = VisitState.failed;\n this.adapter.visitFailed(this);\n }\n }\n }, {\n key: \"changeHistory\",\n value: function changeHistory() {\n var _a;\n\n if (!this.historyChanged) {\n var actionForHistory = this.location.href === ((_a = this.referrer) === null || _a === void 0 ? void 0 : _a.href) ? \"replace\" : this.action;\n var method = this.getHistoryMethodForAction(actionForHistory);\n this.history.update(method, this.location, this.restorationIdentifier);\n this.historyChanged = true;\n }\n }\n }, {\n key: \"issueRequest\",\n value: function 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 }, {\n key: \"simulateRequest\",\n value: function simulateRequest() {\n if (this.response) {\n this.startRequest();\n this.recordResponse();\n this.finishRequest();\n }\n }\n }, {\n key: \"startRequest\",\n value: function startRequest() {\n this.recordTimingMetric(TimingMetric.requestStart);\n this.adapter.visitRequestStarted(this);\n }\n }, {\n key: \"recordResponse\",\n value: function recordResponse() {\n var response = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.response;\n this.response = response;\n\n if (response) {\n var statusCode = response.statusCode;\n\n if (isSuccessful(statusCode)) {\n this.adapter.visitRequestCompleted(this);\n } else {\n this.adapter.visitRequestFailedWithStatusCode(this, statusCode);\n }\n }\n }\n }, {\n key: \"finishRequest\",\n value: function finishRequest() {\n this.recordTimingMetric(TimingMetric.requestEnd);\n this.adapter.visitRequestFinished(this);\n }\n }, {\n key: \"loadResponse\",\n value: function loadResponse() {\n var _this18 = this;\n\n if (this.response) {\n var _this$response = this.response,\n statusCode = _this$response.statusCode,\n responseHTML = _this$response.responseHTML;\n this.render( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee8() {\n return _regeneratorRuntime.wrap(function _callee8$(_context8) {\n while (1) {\n switch (_context8.prev = _context8.next) {\n case 0:\n _this18.cacheSnapshot();\n\n if (!_this18.view.renderPromise) {\n _context8.next = 4;\n break;\n }\n\n _context8.next = 4;\n return _this18.view.renderPromise;\n\n case 4:\n if (!(isSuccessful(statusCode) && responseHTML != null)) {\n _context8.next = 11;\n break;\n }\n\n _context8.next = 7;\n return _this18.view.renderPage(PageSnapshot.fromHTMLString(responseHTML));\n\n case 7:\n _this18.adapter.visitRendered(_this18);\n\n _this18.complete();\n\n _context8.next = 15;\n break;\n\n case 11:\n _context8.next = 13;\n return _this18.view.renderError(PageSnapshot.fromHTMLString(responseHTML));\n\n case 13:\n _this18.adapter.visitRendered(_this18);\n\n _this18.fail();\n\n case 15:\n case \"end\":\n return _context8.stop();\n }\n }\n }, _callee8);\n })));\n }\n }\n }, {\n key: \"getCachedSnapshot\",\n value: function getCachedSnapshot() {\n var snapshot = this.view.getCachedSnapshotForLocation(this.location) || this.getPreloadedSnapshot();\n\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 }, {\n key: \"getPreloadedSnapshot\",\n value: function getPreloadedSnapshot() {\n if (this.snapshotHTML) {\n return PageSnapshot.fromHTMLString(this.snapshotHTML);\n }\n }\n }, {\n key: \"hasCachedSnapshot\",\n value: function hasCachedSnapshot() {\n return this.getCachedSnapshot() != null;\n }\n }, {\n key: \"loadCachedSnapshot\",\n value: function loadCachedSnapshot() {\n var _this19 = this;\n\n var snapshot = this.getCachedSnapshot();\n\n if (snapshot) {\n var isPreview = this.shouldIssueRequest();\n this.render( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee9() {\n return _regeneratorRuntime.wrap(function _callee9$(_context9) {\n while (1) {\n switch (_context9.prev = _context9.next) {\n case 0:\n _this19.cacheSnapshot();\n\n if (!_this19.isSamePage) {\n _context9.next = 5;\n break;\n }\n\n _this19.adapter.visitRendered(_this19);\n\n _context9.next = 12;\n break;\n\n case 5:\n if (!_this19.view.renderPromise) {\n _context9.next = 8;\n break;\n }\n\n _context9.next = 8;\n return _this19.view.renderPromise;\n\n case 8:\n _context9.next = 10;\n return _this19.view.renderPage(snapshot, isPreview);\n\n case 10:\n _this19.adapter.visitRendered(_this19);\n\n if (!isPreview) {\n _this19.complete();\n }\n\n case 12:\n case \"end\":\n return _context9.stop();\n }\n }\n }, _callee9);\n })));\n }\n }\n }, {\n key: \"followRedirect\",\n value: function followRedirect() {\n if (this.redirectedToLocation && !this.followedRedirect) {\n this.adapter.visitProposedToLocation(this.redirectedToLocation, {\n action: 'replace',\n response: this.response\n });\n this.followedRedirect = true;\n }\n }\n }, {\n key: \"goToSamePageAnchor\",\n value: function goToSamePageAnchor() {\n var _this20 = this;\n\n if (this.isSamePage) {\n this.render( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee10() {\n return _regeneratorRuntime.wrap(function _callee10$(_context10) {\n while (1) {\n switch (_context10.prev = _context10.next) {\n case 0:\n _this20.cacheSnapshot();\n\n _this20.adapter.visitRendered(_this20);\n\n case 2:\n case \"end\":\n return _context10.stop();\n }\n }\n }, _callee10);\n })));\n }\n }\n }, {\n key: \"requestStarted\",\n value: function requestStarted() {\n this.startRequest();\n }\n }, {\n key: \"requestPreventedHandlingResponse\",\n value: function requestPreventedHandlingResponse(request, response) {}\n }, {\n key: \"requestSucceededWithResponse\",\n value: function () {\n var _requestSucceededWithResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee11(request, response) {\n var responseHTML;\n return _regeneratorRuntime.wrap(function _callee11$(_context11) {\n while (1) {\n switch (_context11.prev = _context11.next) {\n case 0:\n _context11.next = 2;\n return response.responseHTML;\n\n case 2:\n responseHTML = _context11.sent;\n\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch\n });\n } else {\n this.redirectedToLocation = response.redirected ? response.location : undefined;\n this.recordResponse({\n statusCode: response.statusCode,\n responseHTML: responseHTML\n });\n }\n\n case 4:\n case \"end\":\n return _context11.stop();\n }\n }\n }, _callee11, this);\n }));\n\n function requestSucceededWithResponse(_x5, _x6) {\n return _requestSucceededWithResponse.apply(this, arguments);\n }\n\n return requestSucceededWithResponse;\n }()\n }, {\n key: \"requestFailedWithResponse\",\n value: function () {\n var _requestFailedWithResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee12(request, response) {\n var responseHTML;\n return _regeneratorRuntime.wrap(function _callee12$(_context12) {\n while (1) {\n switch (_context12.prev = _context12.next) {\n case 0:\n _context12.next = 2;\n return response.responseHTML;\n\n case 2:\n responseHTML = _context12.sent;\n\n if (responseHTML == undefined) {\n this.recordResponse({\n statusCode: SystemStatusCode.contentTypeMismatch\n });\n } else {\n this.recordResponse({\n statusCode: response.statusCode,\n responseHTML: responseHTML\n });\n }\n\n case 4:\n case \"end\":\n return _context12.stop();\n }\n }\n }, _callee12, this);\n }));\n\n function requestFailedWithResponse(_x7, _x8) {\n return _requestFailedWithResponse.apply(this, arguments);\n }\n\n return requestFailedWithResponse;\n }()\n }, {\n key: \"requestErrored\",\n value: function requestErrored(request, error) {\n this.recordResponse({\n statusCode: SystemStatusCode.networkFailure\n });\n }\n }, {\n key: \"requestFinished\",\n value: function requestFinished() {\n this.finishRequest();\n }\n }, {\n key: \"performScroll\",\n value: function 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\n if (this.isSamePage) {\n this.delegate.visitScrolledToSamePageLocation(this.view.lastRenderedLocation, this.location);\n }\n\n this.scrolled = true;\n }\n }\n }, {\n key: \"scrollToRestoredPosition\",\n value: function scrollToRestoredPosition() {\n var scrollPosition = this.restorationData.scrollPosition;\n\n if (scrollPosition) {\n this.view.scrollToPosition(scrollPosition);\n return true;\n }\n }\n }, {\n key: \"scrollToAnchor\",\n value: function scrollToAnchor() {\n var anchor = getAnchor(this.location);\n\n if (anchor != null) {\n this.view.scrollToAnchor(anchor);\n return true;\n }\n }\n }, {\n key: \"recordTimingMetric\",\n value: function recordTimingMetric(metric) {\n this.timingMetrics[metric] = new Date().getTime();\n }\n }, {\n key: \"getTimingMetrics\",\n value: function getTimingMetrics() {\n return Object.assign({}, this.timingMetrics);\n }\n }, {\n key: \"getHistoryMethodForAction\",\n value: function getHistoryMethodForAction(action) {\n switch (action) {\n case \"replace\":\n return history.replaceState;\n\n case \"advance\":\n case \"restore\":\n return history.pushState;\n }\n }\n }, {\n key: \"hasPreloadedResponse\",\n value: function hasPreloadedResponse() {\n return _typeof(this.response) == \"object\";\n }\n }, {\n key: \"shouldIssueRequest\",\n value: function shouldIssueRequest() {\n if (this.isSamePage) {\n return false;\n } else if (this.action == \"restore\") {\n return !this.hasCachedSnapshot();\n } else {\n return true;\n }\n }\n }, {\n key: \"cacheSnapshot\",\n value: function cacheSnapshot() {\n if (!this.snapshotCached) {\n this.view.cacheSnapshot();\n this.snapshotCached = true;\n }\n }\n }, {\n key: \"render\",\n value: function () {\n var _render3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee13(callback) {\n var _this21 = this;\n\n return _regeneratorRuntime.wrap(function _callee13$(_context13) {\n while (1) {\n switch (_context13.prev = _context13.next) {\n case 0:\n this.cancelRender();\n _context13.next = 3;\n return new Promise(function (resolve) {\n _this21.frame = requestAnimationFrame(function () {\n return resolve();\n });\n });\n\n case 3:\n _context13.next = 5;\n return callback();\n\n case 5:\n delete this.frame;\n this.performScroll();\n\n case 7:\n case \"end\":\n return _context13.stop();\n }\n }\n }, _callee13, this);\n }));\n\n function render(_x9) {\n return _render3.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"cancelRender\",\n value: function cancelRender() {\n if (this.frame) {\n cancelAnimationFrame(this.frame);\n delete this.frame;\n }\n }\n }]);\n\n return Visit;\n}();\n\nfunction isSuccessful(statusCode) {\n return statusCode >= 200 && statusCode < 300;\n}\n\nvar BrowserAdapter = /*#__PURE__*/function () {\n function BrowserAdapter(session) {\n var _this22 = this;\n\n _classCallCheck(this, BrowserAdapter);\n\n this.progressBar = new ProgressBar();\n\n this.showProgressBar = function () {\n _this22.progressBar.show();\n };\n\n this.session = session;\n }\n\n _createClass(BrowserAdapter, [{\n key: \"visitProposedToLocation\",\n value: function visitProposedToLocation(location, options) {\n this.navigator.startVisit(location, uuid(), options);\n }\n }, {\n key: \"visitStarted\",\n value: function visitStarted(visit) {\n visit.issueRequest();\n visit.changeHistory();\n visit.goToSamePageAnchor();\n visit.loadCachedSnapshot();\n }\n }, {\n key: \"visitRequestStarted\",\n value: function visitRequestStarted(visit) {\n this.progressBar.setValue(0);\n\n if (visit.hasCachedSnapshot() || visit.action != \"restore\") {\n this.showVisitProgressBarAfterDelay();\n } else {\n this.showProgressBar();\n }\n }\n }, {\n key: \"visitRequestCompleted\",\n value: function visitRequestCompleted(visit) {\n visit.loadResponse();\n }\n }, {\n key: \"visitRequestFailedWithStatusCode\",\n value: function visitRequestFailedWithStatusCode(visit, statusCode) {\n switch (statusCode) {\n case SystemStatusCode.networkFailure:\n case SystemStatusCode.timeoutFailure:\n case SystemStatusCode.contentTypeMismatch:\n return this.reload();\n\n default:\n return visit.loadResponse();\n }\n }\n }, {\n key: \"visitRequestFinished\",\n value: function visitRequestFinished(visit) {\n this.progressBar.setValue(1);\n this.hideVisitProgressBar();\n }\n }, {\n key: \"visitCompleted\",\n value: function visitCompleted(visit) {}\n }, {\n key: \"pageInvalidated\",\n value: function pageInvalidated() {\n this.reload();\n }\n }, {\n key: \"visitFailed\",\n value: function visitFailed(visit) {}\n }, {\n key: \"visitRendered\",\n value: function visitRendered(visit) {}\n }, {\n key: \"formSubmissionStarted\",\n value: function formSubmissionStarted(formSubmission) {\n this.progressBar.setValue(0);\n this.showFormProgressBarAfterDelay();\n }\n }, {\n key: \"formSubmissionFinished\",\n value: function formSubmissionFinished(formSubmission) {\n this.progressBar.setValue(1);\n this.hideFormProgressBar();\n }\n }, {\n key: \"showVisitProgressBarAfterDelay\",\n value: function showVisitProgressBarAfterDelay() {\n this.visitProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n }, {\n key: \"hideVisitProgressBar\",\n value: function hideVisitProgressBar() {\n this.progressBar.hide();\n\n if (this.visitProgressBarTimeout != null) {\n window.clearTimeout(this.visitProgressBarTimeout);\n delete this.visitProgressBarTimeout;\n }\n }\n }, {\n key: \"showFormProgressBarAfterDelay\",\n value: function showFormProgressBarAfterDelay() {\n if (this.formProgressBarTimeout == null) {\n this.formProgressBarTimeout = window.setTimeout(this.showProgressBar, this.session.progressBarDelay);\n }\n }\n }, {\n key: \"hideFormProgressBar\",\n value: function hideFormProgressBar() {\n this.progressBar.hide();\n\n if (this.formProgressBarTimeout != null) {\n window.clearTimeout(this.formProgressBarTimeout);\n delete this.formProgressBarTimeout;\n }\n }\n }, {\n key: \"reload\",\n value: function reload() {\n window.location.reload();\n }\n }, {\n key: \"navigator\",\n get: function get() {\n return this.session.navigator;\n }\n }]);\n\n return BrowserAdapter;\n}();\n\nvar CacheObserver = /*#__PURE__*/function () {\n function CacheObserver() {\n _classCallCheck(this, CacheObserver);\n\n this.started = false;\n }\n\n _createClass(CacheObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-cache\", this.removeStaleElements, false);\n }\n }\n }, {\n key: \"removeStaleElements\",\n value: function removeStaleElements() {\n var staleElements = _toConsumableArray(document.querySelectorAll('[data-turbo-cache=\"false\"]'));\n\n var _iterator5 = _createForOfIteratorHelper(staleElements),\n _step5;\n\n try {\n for (_iterator5.s(); !(_step5 = _iterator5.n()).done;) {\n var element = _step5.value;\n element.remove();\n }\n } catch (err) {\n _iterator5.e(err);\n } finally {\n _iterator5.f();\n }\n }\n }]);\n\n return CacheObserver;\n}();\n\nvar FormSubmitObserver = /*#__PURE__*/function () {\n function FormSubmitObserver(delegate) {\n var _this23 = this;\n\n _classCallCheck(this, FormSubmitObserver);\n\n this.started = false;\n\n this.submitCaptured = function () {\n removeEventListener(\"submit\", _this23.submitBubbled, false);\n addEventListener(\"submit\", _this23.submitBubbled, false);\n };\n\n this.submitBubbled = function (event) {\n if (!event.defaultPrevented) {\n var form = event.target instanceof HTMLFormElement ? event.target : undefined;\n var submitter = event.submitter || undefined;\n\n if (form) {\n var method = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"formmethod\")) || form.method;\n\n if (method != \"dialog\" && _this23.delegate.willSubmitForm(form, submitter)) {\n event.preventDefault();\n\n _this23.delegate.formSubmitted(form, submitter);\n }\n }\n }\n };\n\n this.delegate = delegate;\n }\n\n _createClass(FormSubmitObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n addEventListener(\"submit\", this.submitCaptured, true);\n this.started = true;\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n removeEventListener(\"submit\", this.submitCaptured, true);\n this.started = false;\n }\n }\n }]);\n\n return FormSubmitObserver;\n}();\n\nvar FrameRedirector = /*#__PURE__*/function () {\n function FrameRedirector(element) {\n _classCallCheck(this, FrameRedirector);\n\n this.element = element;\n this.linkInterceptor = new LinkInterceptor(this, element);\n this.formInterceptor = new FormInterceptor(this, element);\n }\n\n _createClass(FrameRedirector, [{\n key: \"start\",\n value: function start() {\n this.linkInterceptor.start();\n this.formInterceptor.start();\n }\n }, {\n key: \"stop\",\n value: function stop() {\n this.linkInterceptor.stop();\n this.formInterceptor.stop();\n }\n }, {\n key: \"shouldInterceptLinkClick\",\n value: function shouldInterceptLinkClick(element, url) {\n return this.shouldRedirect(element);\n }\n }, {\n key: \"linkClickIntercepted\",\n value: function linkClickIntercepted(element, url) {\n var frame = this.findFrameElement(element);\n\n if (frame) {\n frame.setAttribute(\"reloadable\", \"\");\n frame.src = url;\n }\n }\n }, {\n key: \"shouldInterceptFormSubmission\",\n value: function shouldInterceptFormSubmission(element, submitter) {\n return this.shouldRedirect(element, submitter);\n }\n }, {\n key: \"formSubmissionIntercepted\",\n value: function formSubmissionIntercepted(element, submitter) {\n var frame = this.findFrameElement(element, submitter);\n\n if (frame) {\n frame.removeAttribute(\"reloadable\");\n frame.delegate.formSubmissionIntercepted(element, submitter);\n }\n }\n }, {\n key: \"shouldRedirect\",\n value: function shouldRedirect(element, submitter) {\n var frame = this.findFrameElement(element, submitter);\n return frame ? frame != element.closest(\"turbo-frame\") : false;\n }\n }, {\n key: \"findFrameElement\",\n value: function findFrameElement(element, submitter) {\n var id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\");\n\n if (id && id != \"_top\") {\n var frame = this.element.querySelector(\"#\".concat(id, \":not([disabled])\"));\n\n if (frame instanceof FrameElement) {\n return frame;\n }\n }\n }\n }]);\n\n return FrameRedirector;\n}();\n\nvar History = /*#__PURE__*/function () {\n function History(delegate) {\n var _this24 = this;\n\n _classCallCheck(this, History);\n\n this.restorationIdentifier = uuid();\n this.restorationData = {};\n this.started = false;\n this.pageLoaded = false;\n\n this.onPopState = function (event) {\n if (_this24.shouldHandlePopState()) {\n var _ref16 = event.state || {},\n turbo = _ref16.turbo;\n\n if (turbo) {\n _this24.location = new URL(window.location.href);\n var restorationIdentifier = turbo.restorationIdentifier;\n _this24.restorationIdentifier = restorationIdentifier;\n\n _this24.delegate.historyPoppedToLocationWithRestorationIdentifier(_this24.location, restorationIdentifier);\n }\n }\n };\n\n this.onPageLoad = /*#__PURE__*/function () {\n var _ref17 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee14(event) {\n return _regeneratorRuntime.wrap(function _callee14$(_context14) {\n while (1) {\n switch (_context14.prev = _context14.next) {\n case 0:\n _context14.next = 2;\n return nextMicrotask();\n\n case 2:\n _this24.pageLoaded = true;\n\n case 3:\n case \"end\":\n return _context14.stop();\n }\n }\n }, _callee14);\n }));\n\n return function (_x10) {\n return _ref17.apply(this, arguments);\n };\n }();\n\n this.delegate = delegate;\n }\n\n _createClass(History, [{\n key: \"start\",\n value: function 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 }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n removeEventListener(\"popstate\", this.onPopState, false);\n removeEventListener(\"load\", this.onPageLoad, false);\n this.started = false;\n }\n }\n }, {\n key: \"push\",\n value: function push(location, restorationIdentifier) {\n this.update(history.pushState, location, restorationIdentifier);\n }\n }, {\n key: \"replace\",\n value: function replace(location, restorationIdentifier) {\n this.update(history.replaceState, location, restorationIdentifier);\n }\n }, {\n key: \"update\",\n value: function update(method, location) {\n var restorationIdentifier = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : uuid();\n var state = {\n turbo: {\n restorationIdentifier: restorationIdentifier\n }\n };\n method.call(history, state, \"\", location.href);\n this.location = location;\n this.restorationIdentifier = restorationIdentifier;\n }\n }, {\n key: \"getRestorationDataForIdentifier\",\n value: function getRestorationDataForIdentifier(restorationIdentifier) {\n return this.restorationData[restorationIdentifier] || {};\n }\n }, {\n key: \"updateRestorationData\",\n value: function updateRestorationData(additionalData) {\n var restorationIdentifier = this.restorationIdentifier;\n var restorationData = this.restorationData[restorationIdentifier];\n this.restorationData[restorationIdentifier] = Object.assign(Object.assign({}, restorationData), additionalData);\n }\n }, {\n key: \"assumeControlOfScrollRestoration\",\n value: function assumeControlOfScrollRestoration() {\n var _a;\n\n if (!this.previousScrollRestoration) {\n this.previousScrollRestoration = (_a = history.scrollRestoration) !== null && _a !== void 0 ? _a : \"auto\";\n history.scrollRestoration = \"manual\";\n }\n }\n }, {\n key: \"relinquishControlOfScrollRestoration\",\n value: function relinquishControlOfScrollRestoration() {\n if (this.previousScrollRestoration) {\n history.scrollRestoration = this.previousScrollRestoration;\n delete this.previousScrollRestoration;\n }\n }\n }, {\n key: \"shouldHandlePopState\",\n value: function shouldHandlePopState() {\n return this.pageIsLoaded();\n }\n }, {\n key: \"pageIsLoaded\",\n value: function pageIsLoaded() {\n return this.pageLoaded || document.readyState == \"complete\";\n }\n }]);\n\n return History;\n}();\n\nvar LinkClickObserver = /*#__PURE__*/function () {\n function LinkClickObserver(delegate) {\n var _this25 = this;\n\n _classCallCheck(this, LinkClickObserver);\n\n this.started = false;\n\n this.clickCaptured = function () {\n removeEventListener(\"click\", _this25.clickBubbled, false);\n addEventListener(\"click\", _this25.clickBubbled, false);\n };\n\n this.clickBubbled = function (event) {\n if (_this25.clickEventIsSignificant(event)) {\n var target = event.composedPath && event.composedPath()[0] || event.target;\n\n var link = _this25.findLinkFromClickTarget(target);\n\n if (link) {\n var _location = _this25.getLocationForLink(link);\n\n if (_this25.delegate.willFollowLinkToLocation(link, _location)) {\n event.preventDefault();\n\n _this25.delegate.followedLinkToLocation(link, _location);\n }\n }\n }\n };\n\n this.delegate = delegate;\n }\n\n _createClass(LinkClickObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n addEventListener(\"click\", this.clickCaptured, true);\n this.started = true;\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n removeEventListener(\"click\", this.clickCaptured, true);\n this.started = false;\n }\n }\n }, {\n key: \"clickEventIsSignificant\",\n value: function clickEventIsSignificant(event) {\n return !(event.target && event.target.isContentEditable || event.defaultPrevented || event.which > 1 || event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);\n }\n }, {\n key: \"findLinkFromClickTarget\",\n value: function findLinkFromClickTarget(target) {\n if (target instanceof Element) {\n return target.closest(\"a[href]:not([target^=_]):not([download])\");\n }\n }\n }, {\n key: \"getLocationForLink\",\n value: function getLocationForLink(link) {\n return expandURL(link.getAttribute(\"href\") || \"\");\n }\n }]);\n\n return LinkClickObserver;\n}();\n\nfunction isAction(action) {\n return action == \"advance\" || action == \"replace\" || action == \"restore\";\n}\n\nvar Navigator = /*#__PURE__*/function () {\n function Navigator(delegate) {\n _classCallCheck(this, Navigator);\n\n this.delegate = delegate;\n }\n\n _createClass(Navigator, [{\n key: \"proposeVisit\",\n value: function proposeVisit(location) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n if (this.delegate.allowsVisitingLocationWithAction(location, options.action)) {\n this.delegate.visitProposedToLocation(location, options);\n }\n }\n }, {\n key: \"startVisit\",\n value: function startVisit(locatable, restorationIdentifier) {\n var 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 }, {\n key: \"submitForm\",\n value: function submitForm(form, submitter) {\n this.stop();\n this.formSubmission = new FormSubmission(this, form, submitter, true);\n\n if (this.formSubmission.isIdempotent) {\n this.proposeVisit(this.formSubmission.fetchRequest.url, {\n action: this.getActionForFormSubmission(this.formSubmission)\n });\n } else {\n this.formSubmission.start();\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.formSubmission) {\n this.formSubmission.stop();\n delete this.formSubmission;\n }\n\n if (this.currentVisit) {\n this.currentVisit.cancel();\n delete this.currentVisit;\n }\n }\n }, {\n key: \"adapter\",\n get: function get() {\n return this.delegate.adapter;\n }\n }, {\n key: \"view\",\n get: function get() {\n return this.delegate.view;\n }\n }, {\n key: \"history\",\n get: function get() {\n return this.delegate.history;\n }\n }, {\n key: \"formSubmissionStarted\",\n value: function formSubmissionStarted(formSubmission) {\n if (typeof this.adapter.formSubmissionStarted === 'function') {\n this.adapter.formSubmissionStarted(formSubmission);\n }\n }\n }, {\n key: \"formSubmissionSucceededWithResponse\",\n value: function () {\n var _formSubmissionSucceededWithResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee15(formSubmission, fetchResponse) {\n var responseHTML, statusCode, visitOptions;\n return _regeneratorRuntime.wrap(function _callee15$(_context15) {\n while (1) {\n switch (_context15.prev = _context15.next) {\n case 0:\n if (!(formSubmission == this.formSubmission)) {\n _context15.next = 5;\n break;\n }\n\n _context15.next = 3;\n return fetchResponse.responseHTML;\n\n case 3:\n responseHTML = _context15.sent;\n\n if (responseHTML) {\n if (formSubmission.method != FetchMethod.get) {\n this.view.clearSnapshotCache();\n }\n\n statusCode = fetchResponse.statusCode;\n visitOptions = {\n response: {\n statusCode: statusCode,\n responseHTML: responseHTML\n }\n };\n this.proposeVisit(fetchResponse.location, visitOptions);\n }\n\n case 5:\n case \"end\":\n return _context15.stop();\n }\n }\n }, _callee15, this);\n }));\n\n function formSubmissionSucceededWithResponse(_x11, _x12) {\n return _formSubmissionSucceededWithResponse.apply(this, arguments);\n }\n\n return formSubmissionSucceededWithResponse;\n }()\n }, {\n key: \"formSubmissionFailedWithResponse\",\n value: function () {\n var _formSubmissionFailedWithResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee16(formSubmission, fetchResponse) {\n var responseHTML, snapshot;\n return _regeneratorRuntime.wrap(function _callee16$(_context16) {\n while (1) {\n switch (_context16.prev = _context16.next) {\n case 0:\n _context16.next = 2;\n return fetchResponse.responseHTML;\n\n case 2:\n responseHTML = _context16.sent;\n\n if (!responseHTML) {\n _context16.next = 14;\n break;\n }\n\n snapshot = PageSnapshot.fromHTMLString(responseHTML);\n\n if (!fetchResponse.serverError) {\n _context16.next = 10;\n break;\n }\n\n _context16.next = 8;\n return this.view.renderError(snapshot);\n\n case 8:\n _context16.next = 12;\n break;\n\n case 10:\n _context16.next = 12;\n return this.view.renderPage(snapshot);\n\n case 12:\n this.view.scrollToTop();\n this.view.clearSnapshotCache();\n\n case 14:\n case \"end\":\n return _context16.stop();\n }\n }\n }, _callee16, this);\n }));\n\n function formSubmissionFailedWithResponse(_x13, _x14) {\n return _formSubmissionFailedWithResponse.apply(this, arguments);\n }\n\n return formSubmissionFailedWithResponse;\n }()\n }, {\n key: \"formSubmissionErrored\",\n value: function formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n }, {\n key: \"formSubmissionFinished\",\n value: function formSubmissionFinished(formSubmission) {\n if (typeof this.adapter.formSubmissionFinished === 'function') {\n this.adapter.formSubmissionFinished(formSubmission);\n }\n }\n }, {\n key: \"visitStarted\",\n value: function visitStarted(visit) {\n this.delegate.visitStarted(visit);\n }\n }, {\n key: \"visitCompleted\",\n value: function visitCompleted(visit) {\n this.delegate.visitCompleted(visit);\n }\n }, {\n key: \"locationWithActionIsSamePage\",\n value: function locationWithActionIsSamePage(location, action) {\n var anchor = getAnchor(location);\n var currentAnchor = getAnchor(this.view.lastRenderedLocation);\n var isRestorationToTop = action === 'restore' && typeof anchor === 'undefined';\n return action !== \"replace\" && getRequestURL(location) === getRequestURL(this.view.lastRenderedLocation) && (isRestorationToTop || anchor != null && anchor !== currentAnchor);\n }\n }, {\n key: \"visitScrolledToSamePageLocation\",\n value: function visitScrolledToSamePageLocation(oldURL, newURL) {\n this.delegate.visitScrolledToSamePageLocation(oldURL, newURL);\n }\n }, {\n key: \"location\",\n get: function get() {\n return this.history.location;\n }\n }, {\n key: \"restorationIdentifier\",\n get: function get() {\n return this.history.restorationIdentifier;\n }\n }, {\n key: \"getActionForFormSubmission\",\n value: function getActionForFormSubmission(formSubmission) {\n var formElement = formSubmission.formElement,\n submitter = formSubmission.submitter;\n var action = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-action\")) || formElement.getAttribute(\"data-turbo-action\");\n return isAction(action) ? action : \"advance\";\n }\n }]);\n\n return Navigator;\n}();\n\nvar PageStage;\n\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 = {}));\n\nvar PageObserver = /*#__PURE__*/function () {\n function PageObserver(delegate) {\n var _this26 = this;\n\n _classCallCheck(this, PageObserver);\n\n this.stage = PageStage.initial;\n this.started = false;\n\n this.interpretReadyState = function () {\n var readyState = _this26.readyState;\n\n if (readyState == \"interactive\") {\n _this26.pageIsInteractive();\n } else if (readyState == \"complete\") {\n _this26.pageIsComplete();\n }\n };\n\n this.pageWillUnload = function () {\n _this26.delegate.pageWillUnload();\n };\n\n this.delegate = delegate;\n }\n\n _createClass(PageObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n if (this.stage == PageStage.initial) {\n this.stage = PageStage.loading;\n }\n\n document.addEventListener(\"readystatechange\", this.interpretReadyState, false);\n addEventListener(\"pagehide\", this.pageWillUnload, false);\n this.started = true;\n }\n }\n }, {\n key: \"stop\",\n value: function 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 }, {\n key: \"pageIsInteractive\",\n value: function pageIsInteractive() {\n if (this.stage == PageStage.loading) {\n this.stage = PageStage.interactive;\n this.delegate.pageBecameInteractive();\n }\n }\n }, {\n key: \"pageIsComplete\",\n value: function pageIsComplete() {\n this.pageIsInteractive();\n\n if (this.stage == PageStage.interactive) {\n this.stage = PageStage.complete;\n this.delegate.pageLoaded();\n }\n }\n }, {\n key: \"readyState\",\n get: function get() {\n return document.readyState;\n }\n }]);\n\n return PageObserver;\n}();\n\nvar ScrollObserver = /*#__PURE__*/function () {\n function ScrollObserver(delegate) {\n var _this27 = this;\n\n _classCallCheck(this, ScrollObserver);\n\n this.started = false;\n\n this.onScroll = function () {\n _this27.updatePosition({\n x: window.pageXOffset,\n y: window.pageYOffset\n });\n };\n\n this.delegate = delegate;\n }\n\n _createClass(ScrollObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n addEventListener(\"scroll\", this.onScroll, false);\n this.onScroll();\n this.started = true;\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n removeEventListener(\"scroll\", this.onScroll, false);\n this.started = false;\n }\n }\n }, {\n key: \"updatePosition\",\n value: function updatePosition(position) {\n this.delegate.scrollPositionChanged(position);\n }\n }]);\n\n return ScrollObserver;\n}();\n\nvar StreamObserver = /*#__PURE__*/function () {\n function StreamObserver(delegate) {\n var _this28 = this;\n\n _classCallCheck(this, StreamObserver);\n\n this.sources = new Set();\n this.started = false;\n\n this.inspectFetchResponse = function (event) {\n var response = fetchResponseFromEvent(event);\n\n if (response && fetchResponseIsStream(response)) {\n event.preventDefault();\n\n _this28.receiveMessageResponse(response);\n }\n };\n\n this.receiveMessageEvent = function (event) {\n if (_this28.started && typeof event.data == \"string\") {\n _this28.receiveMessageHTML(event.data);\n }\n };\n\n this.delegate = delegate;\n }\n\n _createClass(StreamObserver, [{\n key: \"start\",\n value: function start() {\n if (!this.started) {\n this.started = true;\n addEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n }, {\n key: \"stop\",\n value: function stop() {\n if (this.started) {\n this.started = false;\n removeEventListener(\"turbo:before-fetch-response\", this.inspectFetchResponse, false);\n }\n }\n }, {\n key: \"connectStreamSource\",\n value: function connectStreamSource(source) {\n if (!this.streamSourceIsConnected(source)) {\n this.sources.add(source);\n source.addEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n }, {\n key: \"disconnectStreamSource\",\n value: function disconnectStreamSource(source) {\n if (this.streamSourceIsConnected(source)) {\n this.sources.delete(source);\n source.removeEventListener(\"message\", this.receiveMessageEvent, false);\n }\n }\n }, {\n key: \"streamSourceIsConnected\",\n value: function streamSourceIsConnected(source) {\n return this.sources.has(source);\n }\n }, {\n key: \"receiveMessageResponse\",\n value: function () {\n var _receiveMessageResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee17(response) {\n var html;\n return _regeneratorRuntime.wrap(function _callee17$(_context17) {\n while (1) {\n switch (_context17.prev = _context17.next) {\n case 0:\n _context17.next = 2;\n return response.responseHTML;\n\n case 2:\n html = _context17.sent;\n\n if (html) {\n this.receiveMessageHTML(html);\n }\n\n case 4:\n case \"end\":\n return _context17.stop();\n }\n }\n }, _callee17, this);\n }));\n\n function receiveMessageResponse(_x15) {\n return _receiveMessageResponse.apply(this, arguments);\n }\n\n return receiveMessageResponse;\n }()\n }, {\n key: \"receiveMessageHTML\",\n value: function receiveMessageHTML(html) {\n this.delegate.receivedMessageFromStream(new StreamMessage(html));\n }\n }]);\n\n return StreamObserver;\n}();\n\nfunction fetchResponseFromEvent(event) {\n var _a;\n\n var fetchResponse = (_a = event.detail) === null || _a === void 0 ? void 0 : _a.fetchResponse;\n\n if (fetchResponse instanceof FetchResponse) {\n return fetchResponse;\n }\n}\n\nfunction fetchResponseIsStream(response) {\n var _a;\n\n var contentType = (_a = response.contentType) !== null && _a !== void 0 ? _a : \"\";\n return contentType.startsWith(StreamMessage.contentType);\n}\n\nvar ErrorRenderer = /*#__PURE__*/function (_Renderer2) {\n _inherits(ErrorRenderer, _Renderer2);\n\n var _super6 = _createSuper(ErrorRenderer);\n\n function ErrorRenderer() {\n _classCallCheck(this, ErrorRenderer);\n\n return _super6.apply(this, arguments);\n }\n\n _createClass(ErrorRenderer, [{\n key: \"render\",\n value: function () {\n var _render4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee18() {\n return _regeneratorRuntime.wrap(function _callee18$(_context18) {\n while (1) {\n switch (_context18.prev = _context18.next) {\n case 0:\n this.replaceHeadAndBody();\n this.activateScriptElements();\n\n case 2:\n case \"end\":\n return _context18.stop();\n }\n }\n }, _callee18, this);\n }));\n\n function render() {\n return _render4.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"replaceHeadAndBody\",\n value: function replaceHeadAndBody() {\n var _document = document,\n documentElement = _document.documentElement,\n head = _document.head,\n body = _document.body;\n documentElement.replaceChild(this.newHead, head);\n documentElement.replaceChild(this.newElement, body);\n }\n }, {\n key: \"activateScriptElements\",\n value: function activateScriptElements() {\n var _iterator6 = _createForOfIteratorHelper(this.scriptElements),\n _step6;\n\n try {\n for (_iterator6.s(); !(_step6 = _iterator6.n()).done;) {\n var replaceableElement = _step6.value;\n var parentNode = replaceableElement.parentNode;\n\n if (parentNode) {\n var element = this.createScriptElement(replaceableElement);\n parentNode.replaceChild(element, replaceableElement);\n }\n }\n } catch (err) {\n _iterator6.e(err);\n } finally {\n _iterator6.f();\n }\n }\n }, {\n key: \"newHead\",\n get: function get() {\n return this.newSnapshot.headSnapshot.element;\n }\n }, {\n key: \"scriptElements\",\n get: function get() {\n return _toConsumableArray(document.documentElement.querySelectorAll(\"script\"));\n }\n }]);\n\n return ErrorRenderer;\n}(Renderer);\n\nvar PageRenderer = /*#__PURE__*/function (_Renderer3) {\n _inherits(PageRenderer, _Renderer3);\n\n var _super7 = _createSuper(PageRenderer);\n\n function PageRenderer() {\n _classCallCheck(this, PageRenderer);\n\n return _super7.apply(this, arguments);\n }\n\n _createClass(PageRenderer, [{\n key: \"shouldRender\",\n get: function get() {\n return this.newSnapshot.isVisitable && this.trackedElementsAreIdentical;\n }\n }, {\n key: \"prepareToRender\",\n value: function prepareToRender() {\n this.mergeHead();\n }\n }, {\n key: \"render\",\n value: function () {\n var _render5 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee19() {\n return _regeneratorRuntime.wrap(function _callee19$(_context19) {\n while (1) {\n switch (_context19.prev = _context19.next) {\n case 0:\n this.replaceBody();\n\n case 1:\n case \"end\":\n return _context19.stop();\n }\n }\n }, _callee19, this);\n }));\n\n function render() {\n return _render5.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"finishRendering\",\n value: function finishRendering() {\n _get(_getPrototypeOf(PageRenderer.prototype), \"finishRendering\", this).call(this);\n\n if (!this.isPreview) {\n this.focusFirstAutofocusableElement();\n }\n }\n }, {\n key: \"currentHeadSnapshot\",\n get: function get() {\n return this.currentSnapshot.headSnapshot;\n }\n }, {\n key: \"newHeadSnapshot\",\n get: function get() {\n return this.newSnapshot.headSnapshot;\n }\n }, {\n key: \"newElement\",\n get: function get() {\n return this.newSnapshot.element;\n }\n }, {\n key: \"mergeHead\",\n value: function mergeHead() {\n this.copyNewHeadStylesheetElements();\n this.copyNewHeadScriptElements();\n this.removeCurrentHeadProvisionalElements();\n this.copyNewHeadProvisionalElements();\n }\n }, {\n key: \"replaceBody\",\n value: function replaceBody() {\n var _this29 = this;\n\n this.preservingPermanentElements(function () {\n _this29.activateNewBody();\n\n _this29.assignNewBody();\n });\n }\n }, {\n key: \"trackedElementsAreIdentical\",\n get: function get() {\n return this.currentHeadSnapshot.trackedElementSignature == this.newHeadSnapshot.trackedElementSignature;\n }\n }, {\n key: \"copyNewHeadStylesheetElements\",\n value: function copyNewHeadStylesheetElements() {\n var _iterator7 = _createForOfIteratorHelper(this.newHeadStylesheetElements),\n _step7;\n\n try {\n for (_iterator7.s(); !(_step7 = _iterator7.n()).done;) {\n var element = _step7.value;\n document.head.appendChild(element);\n }\n } catch (err) {\n _iterator7.e(err);\n } finally {\n _iterator7.f();\n }\n }\n }, {\n key: \"copyNewHeadScriptElements\",\n value: function copyNewHeadScriptElements() {\n var _iterator8 = _createForOfIteratorHelper(this.newHeadScriptElements),\n _step8;\n\n try {\n for (_iterator8.s(); !(_step8 = _iterator8.n()).done;) {\n var element = _step8.value;\n document.head.appendChild(this.createScriptElement(element));\n }\n } catch (err) {\n _iterator8.e(err);\n } finally {\n _iterator8.f();\n }\n }\n }, {\n key: \"removeCurrentHeadProvisionalElements\",\n value: function removeCurrentHeadProvisionalElements() {\n var _iterator9 = _createForOfIteratorHelper(this.currentHeadProvisionalElements),\n _step9;\n\n try {\n for (_iterator9.s(); !(_step9 = _iterator9.n()).done;) {\n var element = _step9.value;\n document.head.removeChild(element);\n }\n } catch (err) {\n _iterator9.e(err);\n } finally {\n _iterator9.f();\n }\n }\n }, {\n key: \"copyNewHeadProvisionalElements\",\n value: function copyNewHeadProvisionalElements() {\n var _iterator10 = _createForOfIteratorHelper(this.newHeadProvisionalElements),\n _step10;\n\n try {\n for (_iterator10.s(); !(_step10 = _iterator10.n()).done;) {\n var element = _step10.value;\n document.head.appendChild(element);\n }\n } catch (err) {\n _iterator10.e(err);\n } finally {\n _iterator10.f();\n }\n }\n }, {\n key: \"activateNewBody\",\n value: function activateNewBody() {\n document.adoptNode(this.newElement);\n this.activateNewBodyScriptElements();\n }\n }, {\n key: \"activateNewBodyScriptElements\",\n value: function activateNewBodyScriptElements() {\n var _iterator11 = _createForOfIteratorHelper(this.newBodyScriptElements),\n _step11;\n\n try {\n for (_iterator11.s(); !(_step11 = _iterator11.n()).done;) {\n var inertScriptElement = _step11.value;\n var activatedScriptElement = this.createScriptElement(inertScriptElement);\n inertScriptElement.replaceWith(activatedScriptElement);\n }\n } catch (err) {\n _iterator11.e(err);\n } finally {\n _iterator11.f();\n }\n }\n }, {\n key: \"assignNewBody\",\n value: function 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 }, {\n key: \"newHeadStylesheetElements\",\n get: function get() {\n return this.newHeadSnapshot.getStylesheetElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n }, {\n key: \"newHeadScriptElements\",\n get: function get() {\n return this.newHeadSnapshot.getScriptElementsNotInSnapshot(this.currentHeadSnapshot);\n }\n }, {\n key: \"currentHeadProvisionalElements\",\n get: function get() {\n return this.currentHeadSnapshot.provisionalElements;\n }\n }, {\n key: \"newHeadProvisionalElements\",\n get: function get() {\n return this.newHeadSnapshot.provisionalElements;\n }\n }, {\n key: \"newBodyScriptElements\",\n get: function get() {\n return this.newElement.querySelectorAll(\"script\");\n }\n }]);\n\n return PageRenderer;\n}(Renderer);\n\nvar SnapshotCache = /*#__PURE__*/function () {\n function SnapshotCache(size) {\n _classCallCheck(this, SnapshotCache);\n\n this.keys = [];\n this.snapshots = {};\n this.size = size;\n }\n\n _createClass(SnapshotCache, [{\n key: \"has\",\n value: function has(location) {\n return toCacheKey(location) in this.snapshots;\n }\n }, {\n key: \"get\",\n value: function get(location) {\n if (this.has(location)) {\n var snapshot = this.read(location);\n this.touch(location);\n return snapshot;\n }\n }\n }, {\n key: \"put\",\n value: function put(location, snapshot) {\n this.write(location, snapshot);\n this.touch(location);\n return snapshot;\n }\n }, {\n key: \"clear\",\n value: function clear() {\n this.snapshots = {};\n }\n }, {\n key: \"read\",\n value: function read(location) {\n return this.snapshots[toCacheKey(location)];\n }\n }, {\n key: \"write\",\n value: function write(location, snapshot) {\n this.snapshots[toCacheKey(location)] = snapshot;\n }\n }, {\n key: \"touch\",\n value: function touch(location) {\n var key = toCacheKey(location);\n var index = this.keys.indexOf(key);\n if (index > -1) this.keys.splice(index, 1);\n this.keys.unshift(key);\n this.trim();\n }\n }, {\n key: \"trim\",\n value: function trim() {\n var _iterator12 = _createForOfIteratorHelper(this.keys.splice(this.size)),\n _step12;\n\n try {\n for (_iterator12.s(); !(_step12 = _iterator12.n()).done;) {\n var key = _step12.value;\n delete this.snapshots[key];\n }\n } catch (err) {\n _iterator12.e(err);\n } finally {\n _iterator12.f();\n }\n }\n }]);\n\n return SnapshotCache;\n}();\n\nvar PageView = /*#__PURE__*/function (_View2) {\n _inherits(PageView, _View2);\n\n var _super8 = _createSuper(PageView);\n\n function PageView() {\n var _this30;\n\n _classCallCheck(this, PageView);\n\n _this30 = _super8.apply(this, arguments);\n _this30.snapshotCache = new SnapshotCache(10);\n _this30.lastRenderedLocation = new URL(location.href);\n return _this30;\n }\n\n _createClass(PageView, [{\n key: \"renderPage\",\n value: function renderPage(snapshot) {\n var isPreview = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;\n var renderer = new PageRenderer(this.snapshot, snapshot, isPreview);\n return this.render(renderer);\n }\n }, {\n key: \"renderError\",\n value: function renderError(snapshot) {\n var renderer = new ErrorRenderer(this.snapshot, snapshot, false);\n return this.render(renderer);\n }\n }, {\n key: \"clearSnapshotCache\",\n value: function clearSnapshotCache() {\n this.snapshotCache.clear();\n }\n }, {\n key: \"cacheSnapshot\",\n value: function () {\n var _cacheSnapshot = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee20() {\n var snapshot, _location2;\n\n return _regeneratorRuntime.wrap(function _callee20$(_context20) {\n while (1) {\n switch (_context20.prev = _context20.next) {\n case 0:\n if (!this.shouldCacheSnapshot) {\n _context20.next = 6;\n break;\n }\n\n this.delegate.viewWillCacheSnapshot();\n snapshot = this.snapshot, _location2 = this.lastRenderedLocation;\n _context20.next = 5;\n return nextEventLoopTick();\n\n case 5:\n this.snapshotCache.put(_location2, snapshot.clone());\n\n case 6:\n case \"end\":\n return _context20.stop();\n }\n }\n }, _callee20, this);\n }));\n\n function cacheSnapshot() {\n return _cacheSnapshot.apply(this, arguments);\n }\n\n return cacheSnapshot;\n }()\n }, {\n key: \"getCachedSnapshotForLocation\",\n value: function getCachedSnapshotForLocation(location) {\n return this.snapshotCache.get(location);\n }\n }, {\n key: \"snapshot\",\n get: function get() {\n return PageSnapshot.fromElement(this.element);\n }\n }, {\n key: \"shouldCacheSnapshot\",\n get: function get() {\n return this.snapshot.isCacheable;\n }\n }]);\n\n return PageView;\n}(View);\n\nvar Session = /*#__PURE__*/function () {\n function Session() {\n _classCallCheck(this, Session);\n\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\n _createClass(Session, [{\n key: \"start\",\n value: function 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 }, {\n key: \"disable\",\n value: function disable() {\n this.enabled = false;\n }\n }, {\n key: \"stop\",\n value: function 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 }, {\n key: \"registerAdapter\",\n value: function registerAdapter(adapter) {\n this.adapter = adapter;\n }\n }, {\n key: \"visit\",\n value: function visit(location) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n this.navigator.proposeVisit(expandURL(location), options);\n }\n }, {\n key: \"connectStreamSource\",\n value: function connectStreamSource(source) {\n this.streamObserver.connectStreamSource(source);\n }\n }, {\n key: \"disconnectStreamSource\",\n value: function disconnectStreamSource(source) {\n this.streamObserver.disconnectStreamSource(source);\n }\n }, {\n key: \"renderStreamMessage\",\n value: function renderStreamMessage(message) {\n document.documentElement.appendChild(StreamMessage.wrap(message).fragment);\n }\n }, {\n key: \"clearCache\",\n value: function clearCache() {\n this.view.clearSnapshotCache();\n }\n }, {\n key: \"setProgressBarDelay\",\n value: function setProgressBarDelay(delay) {\n this.progressBarDelay = delay;\n }\n }, {\n key: \"location\",\n get: function get() {\n return this.history.location;\n }\n }, {\n key: \"restorationIdentifier\",\n get: function get() {\n return this.history.restorationIdentifier;\n }\n }, {\n key: \"historyPoppedToLocationWithRestorationIdentifier\",\n value: function 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 }, {\n key: \"scrollPositionChanged\",\n value: function scrollPositionChanged(position) {\n this.history.updateRestorationData({\n scrollPosition: position\n });\n }\n }, {\n key: \"willFollowLinkToLocation\",\n value: function willFollowLinkToLocation(link, location) {\n return this.elementDriveEnabled(link) && this.locationIsVisitable(location) && this.applicationAllowsFollowingLinkToLocation(link, location);\n }\n }, {\n key: \"followedLinkToLocation\",\n value: function followedLinkToLocation(link, location) {\n var action = this.getActionForLink(link);\n this.convertLinkWithMethodClickToFormSubmission(link) || this.visit(location.href, {\n action: action\n });\n }\n }, {\n key: \"convertLinkWithMethodClickToFormSubmission\",\n value: function convertLinkWithMethodClickToFormSubmission(link) {\n var _a;\n\n var linkMethod = link.getAttribute(\"data-turbo-method\");\n\n if (linkMethod) {\n var form = document.createElement(\"form\");\n form.method = linkMethod;\n form.action = link.getAttribute(\"href\") || \"undefined\";\n form.hidden = true;\n (_a = link.parentNode) === null || _a === void 0 ? void 0 : _a.insertBefore(form, link);\n return dispatch(\"submit\", {\n cancelable: true,\n target: form\n });\n } else {\n return false;\n }\n }\n }, {\n key: \"allowsVisitingLocationWithAction\",\n value: function allowsVisitingLocationWithAction(location, action) {\n return this.locationWithActionIsSamePage(location, action) || this.applicationAllowsVisitingLocation(location);\n }\n }, {\n key: \"visitProposedToLocation\",\n value: function visitProposedToLocation(location, options) {\n extendURLWithDeprecatedProperties(location);\n this.adapter.visitProposedToLocation(location, options);\n }\n }, {\n key: \"visitStarted\",\n value: function visitStarted(visit) {\n extendURLWithDeprecatedProperties(visit.location);\n\n if (!visit.silent) {\n this.notifyApplicationAfterVisitingLocation(visit.location, visit.action);\n }\n }\n }, {\n key: \"visitCompleted\",\n value: function visitCompleted(visit) {\n this.notifyApplicationAfterPageLoad(visit.getTimingMetrics());\n }\n }, {\n key: \"locationWithActionIsSamePage\",\n value: function locationWithActionIsSamePage(location, action) {\n return this.navigator.locationWithActionIsSamePage(location, action);\n }\n }, {\n key: \"visitScrolledToSamePageLocation\",\n value: function visitScrolledToSamePageLocation(oldURL, newURL) {\n this.notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL);\n }\n }, {\n key: \"willSubmitForm\",\n value: function willSubmitForm(form, submitter) {\n return this.elementDriveEnabled(form) && (!submitter || this.elementDriveEnabled(submitter));\n }\n }, {\n key: \"formSubmitted\",\n value: function formSubmitted(form, submitter) {\n this.navigator.submitForm(form, submitter);\n }\n }, {\n key: \"pageBecameInteractive\",\n value: function pageBecameInteractive() {\n this.view.lastRenderedLocation = this.location;\n this.notifyApplicationAfterPageLoad();\n }\n }, {\n key: \"pageLoaded\",\n value: function pageLoaded() {\n this.history.assumeControlOfScrollRestoration();\n }\n }, {\n key: \"pageWillUnload\",\n value: function pageWillUnload() {\n this.history.relinquishControlOfScrollRestoration();\n }\n }, {\n key: \"receivedMessageFromStream\",\n value: function receivedMessageFromStream(message) {\n this.renderStreamMessage(message);\n }\n }, {\n key: \"viewWillCacheSnapshot\",\n value: function viewWillCacheSnapshot() {\n var _a;\n\n if (!((_a = this.navigator.currentVisit) === null || _a === void 0 ? void 0 : _a.silent)) {\n this.notifyApplicationBeforeCachingSnapshot();\n }\n }\n }, {\n key: \"allowsImmediateRender\",\n value: function allowsImmediateRender(_ref18, resume) {\n var element = _ref18.element;\n var event = this.notifyApplicationBeforeRender(element, resume);\n return !event.defaultPrevented;\n }\n }, {\n key: \"viewRenderedSnapshot\",\n value: function viewRenderedSnapshot(snapshot, isPreview) {\n this.view.lastRenderedLocation = this.history.location;\n this.notifyApplicationAfterRender();\n }\n }, {\n key: \"viewInvalidated\",\n value: function viewInvalidated() {\n this.adapter.pageInvalidated();\n }\n }, {\n key: \"frameLoaded\",\n value: function frameLoaded(frame) {\n this.notifyApplicationAfterFrameLoad(frame);\n }\n }, {\n key: \"frameRendered\",\n value: function frameRendered(fetchResponse, frame) {\n this.notifyApplicationAfterFrameRender(fetchResponse, frame);\n }\n }, {\n key: \"applicationAllowsFollowingLinkToLocation\",\n value: function applicationAllowsFollowingLinkToLocation(link, location) {\n var event = this.notifyApplicationAfterClickingLinkToLocation(link, location);\n return !event.defaultPrevented;\n }\n }, {\n key: \"applicationAllowsVisitingLocation\",\n value: function applicationAllowsVisitingLocation(location) {\n var event = this.notifyApplicationBeforeVisitingLocation(location);\n return !event.defaultPrevented;\n }\n }, {\n key: \"notifyApplicationAfterClickingLinkToLocation\",\n value: function notifyApplicationAfterClickingLinkToLocation(link, location) {\n return dispatch(\"turbo:click\", {\n target: link,\n detail: {\n url: location.href\n },\n cancelable: true\n });\n }\n }, {\n key: \"notifyApplicationBeforeVisitingLocation\",\n value: function notifyApplicationBeforeVisitingLocation(location) {\n return dispatch(\"turbo:before-visit\", {\n detail: {\n url: location.href\n },\n cancelable: true\n });\n }\n }, {\n key: \"notifyApplicationAfterVisitingLocation\",\n value: function notifyApplicationAfterVisitingLocation(location, action) {\n return dispatch(\"turbo:visit\", {\n detail: {\n url: location.href,\n action: action\n }\n });\n }\n }, {\n key: \"notifyApplicationBeforeCachingSnapshot\",\n value: function notifyApplicationBeforeCachingSnapshot() {\n return dispatch(\"turbo:before-cache\");\n }\n }, {\n key: \"notifyApplicationBeforeRender\",\n value: function notifyApplicationBeforeRender(newBody, resume) {\n return dispatch(\"turbo:before-render\", {\n detail: {\n newBody: newBody,\n resume: resume\n },\n cancelable: true\n });\n }\n }, {\n key: \"notifyApplicationAfterRender\",\n value: function notifyApplicationAfterRender() {\n return dispatch(\"turbo:render\");\n }\n }, {\n key: \"notifyApplicationAfterPageLoad\",\n value: function notifyApplicationAfterPageLoad() {\n var timing = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};\n return dispatch(\"turbo:load\", {\n detail: {\n url: this.location.href,\n timing: timing\n }\n });\n }\n }, {\n key: \"notifyApplicationAfterVisitingSamePageLocation\",\n value: function notifyApplicationAfterVisitingSamePageLocation(oldURL, newURL) {\n dispatchEvent(new HashChangeEvent(\"hashchange\", {\n oldURL: oldURL.toString(),\n newURL: newURL.toString()\n }));\n }\n }, {\n key: \"notifyApplicationAfterFrameLoad\",\n value: function notifyApplicationAfterFrameLoad(frame) {\n return dispatch(\"turbo:frame-load\", {\n target: frame\n });\n }\n }, {\n key: \"notifyApplicationAfterFrameRender\",\n value: function notifyApplicationAfterFrameRender(fetchResponse, frame) {\n return dispatch(\"turbo:frame-render\", {\n detail: {\n fetchResponse: fetchResponse\n },\n target: frame,\n cancelable: true\n });\n }\n }, {\n key: \"elementDriveEnabled\",\n value: function elementDriveEnabled(element) {\n var container = element === null || element === void 0 ? void 0 : element.closest(\"[data-turbo]\");\n\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 }, {\n key: \"getActionForLink\",\n value: function getActionForLink(link) {\n var action = link.getAttribute(\"data-turbo-action\");\n return isAction(action) ? action : \"advance\";\n }\n }, {\n key: \"locationIsVisitable\",\n value: function locationIsVisitable(location) {\n return isPrefixedBy(location, this.snapshot.rootLocation) && isHTML(location);\n }\n }, {\n key: \"snapshot\",\n get: function get() {\n return this.view.snapshot;\n }\n }]);\n\n return Session;\n}();\n\nfunction extendURLWithDeprecatedProperties(url) {\n Object.defineProperties(url, deprecatedLocationPropertyDescriptors);\n}\n\nvar deprecatedLocationPropertyDescriptors = {\n absoluteURL: {\n get: function get() {\n return this.toString();\n }\n }\n};\nvar session = new Session();\nvar navigator$1 = session.navigator;\n\nfunction start() {\n session.start();\n}\n\nfunction registerAdapter(adapter) {\n session.registerAdapter(adapter);\n}\n\nfunction visit(location, options) {\n session.visit(location, options);\n}\n\nfunction connectStreamSource(source) {\n session.connectStreamSource(source);\n}\n\nfunction disconnectStreamSource(source) {\n session.disconnectStreamSource(source);\n}\n\nfunction renderStreamMessage(message) {\n session.renderStreamMessage(message);\n}\n\nfunction clearCache() {\n session.clearCache();\n}\n\nfunction setProgressBarDelay(delay) {\n session.setProgressBarDelay(delay);\n}\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});\n\nvar FrameController = /*#__PURE__*/function () {\n function FrameController(element) {\n _classCallCheck(this, FrameController);\n\n this.resolveVisitPromise = function () {};\n\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\n _createClass(FrameController, [{\n key: \"connect\",\n value: function connect() {\n if (!this.connected) {\n this.connected = true;\n this.reloadable = false;\n\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n }\n\n this.linkInterceptor.start();\n this.formInterceptor.start();\n this.sourceURLChanged();\n }\n }\n }, {\n key: \"disconnect\",\n value: function disconnect() {\n if (this.connected) {\n this.connected = false;\n this.appearanceObserver.stop();\n this.linkInterceptor.stop();\n this.formInterceptor.stop();\n }\n }\n }, {\n key: \"disabledChanged\",\n value: function disabledChanged() {\n if (this.loadingStyle == FrameLoadingStyle.eager) {\n this.loadSourceURL();\n }\n }\n }, {\n key: \"sourceURLChanged\",\n value: function sourceURLChanged() {\n if (this.loadingStyle == FrameLoadingStyle.eager || this.hasBeenLoaded) {\n this.loadSourceURL();\n }\n }\n }, {\n key: \"loadingStyleChanged\",\n value: function loadingStyleChanged() {\n if (this.loadingStyle == FrameLoadingStyle.lazy) {\n this.appearanceObserver.start();\n } else {\n this.appearanceObserver.stop();\n this.loadSourceURL();\n }\n }\n }, {\n key: \"loadSourceURL\",\n value: function () {\n var _loadSourceURL = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee21() {\n var previousURL;\n return _regeneratorRuntime.wrap(function _callee21$(_context21) {\n while (1) {\n switch (_context21.prev = _context21.next) {\n case 0:\n if (!(!this.settingSourceURL && this.enabled && this.isActive && (this.reloadable || this.sourceURL != this.currentURL))) {\n _context21.next = 17;\n break;\n }\n\n previousURL = this.currentURL;\n this.currentURL = this.sourceURL;\n\n if (!this.sourceURL) {\n _context21.next = 17;\n break;\n }\n\n _context21.prev = 4;\n this.element.loaded = this.visit(this.sourceURL);\n this.appearanceObserver.stop();\n _context21.next = 9;\n return this.element.loaded;\n\n case 9:\n this.hasBeenLoaded = true;\n session.frameLoaded(this.element);\n _context21.next = 17;\n break;\n\n case 13:\n _context21.prev = 13;\n _context21.t0 = _context21[\"catch\"](4);\n this.currentURL = previousURL;\n throw _context21.t0;\n\n case 17:\n case \"end\":\n return _context21.stop();\n }\n }\n }, _callee21, this, [[4, 13]]);\n }));\n\n function loadSourceURL() {\n return _loadSourceURL.apply(this, arguments);\n }\n\n return loadSourceURL;\n }()\n }, {\n key: \"loadResponse\",\n value: function () {\n var _loadResponse = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee22(fetchResponse) {\n var html, _parseHTMLDocument, body, snapshot, renderer;\n\n return _regeneratorRuntime.wrap(function _callee22$(_context22) {\n while (1) {\n switch (_context22.prev = _context22.next) {\n case 0:\n if (fetchResponse.redirected) {\n this.sourceURL = fetchResponse.response.url;\n }\n\n _context22.prev = 1;\n _context22.next = 4;\n return fetchResponse.responseHTML;\n\n case 4:\n html = _context22.sent;\n\n if (!html) {\n _context22.next = 19;\n break;\n }\n\n _parseHTMLDocument = parseHTMLDocument(html), body = _parseHTMLDocument.body;\n _context22.t0 = Snapshot;\n _context22.next = 10;\n return this.extractForeignFrameElement(body);\n\n case 10:\n _context22.t1 = _context22.sent;\n snapshot = new _context22.t0(_context22.t1);\n renderer = new FrameRenderer(this.view.snapshot, snapshot, false);\n\n if (!this.view.renderPromise) {\n _context22.next = 16;\n break;\n }\n\n _context22.next = 16;\n return this.view.renderPromise;\n\n case 16:\n _context22.next = 18;\n return this.view.render(renderer);\n\n case 18:\n session.frameRendered(fetchResponse, this.element);\n\n case 19:\n _context22.next = 25;\n break;\n\n case 21:\n _context22.prev = 21;\n _context22.t2 = _context22[\"catch\"](1);\n console.error(_context22.t2);\n this.view.invalidate();\n\n case 25:\n case \"end\":\n return _context22.stop();\n }\n }\n }, _callee22, this, [[1, 21]]);\n }));\n\n function loadResponse(_x16) {\n return _loadResponse.apply(this, arguments);\n }\n\n return loadResponse;\n }()\n }, {\n key: \"elementAppearedInViewport\",\n value: function elementAppearedInViewport(element) {\n this.loadSourceURL();\n }\n }, {\n key: \"shouldInterceptLinkClick\",\n value: function shouldInterceptLinkClick(element, url) {\n if (element.hasAttribute(\"data-turbo-method\")) {\n return false;\n } else {\n return this.shouldInterceptNavigation(element);\n }\n }\n }, {\n key: \"linkClickIntercepted\",\n value: function linkClickIntercepted(element, url) {\n this.reloadable = true;\n this.navigateFrame(element, url);\n }\n }, {\n key: \"shouldInterceptFormSubmission\",\n value: function shouldInterceptFormSubmission(element, submitter) {\n return this.shouldInterceptNavigation(element, submitter);\n }\n }, {\n key: \"formSubmissionIntercepted\",\n value: function formSubmissionIntercepted(element, submitter) {\n if (this.formSubmission) {\n this.formSubmission.stop();\n }\n\n this.reloadable = false;\n this.formSubmission = new FormSubmission(this, element, submitter);\n\n if (this.formSubmission.fetchRequest.isIdempotent) {\n this.navigateFrame(element, this.formSubmission.fetchRequest.url.href, submitter);\n } else {\n var fetchRequest = this.formSubmission.fetchRequest;\n this.prepareHeadersForRequest(fetchRequest.headers, fetchRequest);\n this.formSubmission.start();\n }\n }\n }, {\n key: \"prepareHeadersForRequest\",\n value: function prepareHeadersForRequest(headers, request) {\n headers[\"Turbo-Frame\"] = this.id;\n }\n }, {\n key: \"requestStarted\",\n value: function requestStarted(request) {\n this.element.setAttribute(\"busy\", \"\");\n }\n }, {\n key: \"requestPreventedHandlingResponse\",\n value: function requestPreventedHandlingResponse(request, response) {\n this.resolveVisitPromise();\n }\n }, {\n key: \"requestSucceededWithResponse\",\n value: function () {\n var _requestSucceededWithResponse2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee23(request, response) {\n return _regeneratorRuntime.wrap(function _callee23$(_context23) {\n while (1) {\n switch (_context23.prev = _context23.next) {\n case 0:\n _context23.next = 2;\n return this.loadResponse(response);\n\n case 2:\n this.resolveVisitPromise();\n\n case 3:\n case \"end\":\n return _context23.stop();\n }\n }\n }, _callee23, this);\n }));\n\n function requestSucceededWithResponse(_x17, _x18) {\n return _requestSucceededWithResponse2.apply(this, arguments);\n }\n\n return requestSucceededWithResponse;\n }()\n }, {\n key: \"requestFailedWithResponse\",\n value: function requestFailedWithResponse(request, response) {\n console.error(response);\n this.resolveVisitPromise();\n }\n }, {\n key: \"requestErrored\",\n value: function requestErrored(request, error) {\n console.error(error);\n this.resolveVisitPromise();\n }\n }, {\n key: \"requestFinished\",\n value: function requestFinished(request) {\n this.element.removeAttribute(\"busy\");\n }\n }, {\n key: \"formSubmissionStarted\",\n value: function formSubmissionStarted(formSubmission) {\n var frame = this.findFrameElement(formSubmission.formElement);\n frame.setAttribute(\"busy\", \"\");\n }\n }, {\n key: \"formSubmissionSucceededWithResponse\",\n value: function formSubmissionSucceededWithResponse(formSubmission, response) {\n var frame = this.findFrameElement(formSubmission.formElement, formSubmission.submitter);\n frame.delegate.loadResponse(response);\n }\n }, {\n key: \"formSubmissionFailedWithResponse\",\n value: function formSubmissionFailedWithResponse(formSubmission, fetchResponse) {\n this.element.delegate.loadResponse(fetchResponse);\n }\n }, {\n key: \"formSubmissionErrored\",\n value: function formSubmissionErrored(formSubmission, error) {\n console.error(error);\n }\n }, {\n key: \"formSubmissionFinished\",\n value: function formSubmissionFinished(formSubmission) {\n var frame = this.findFrameElement(formSubmission.formElement);\n frame.removeAttribute(\"busy\");\n }\n }, {\n key: \"allowsImmediateRender\",\n value: function allowsImmediateRender(snapshot, resume) {\n return true;\n }\n }, {\n key: \"viewRenderedSnapshot\",\n value: function viewRenderedSnapshot(snapshot, isPreview) {}\n }, {\n key: \"viewInvalidated\",\n value: function viewInvalidated() {}\n }, {\n key: \"visit\",\n value: function () {\n var _visit = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee24(url) {\n var _this31 = this;\n\n var request;\n return _regeneratorRuntime.wrap(function _callee24$(_context24) {\n while (1) {\n switch (_context24.prev = _context24.next) {\n case 0:\n request = new FetchRequest(this, FetchMethod.get, expandURL(url), undefined, this.element);\n return _context24.abrupt(\"return\", new Promise(function (resolve) {\n _this31.resolveVisitPromise = function () {\n _this31.resolveVisitPromise = function () {};\n\n resolve();\n };\n\n request.perform();\n }));\n\n case 2:\n case \"end\":\n return _context24.stop();\n }\n }\n }, _callee24, this);\n }));\n\n function visit(_x19) {\n return _visit.apply(this, arguments);\n }\n\n return visit;\n }()\n }, {\n key: \"navigateFrame\",\n value: function navigateFrame(element, url, submitter) {\n var frame = this.findFrameElement(element, submitter);\n frame.setAttribute(\"reloadable\", \"\");\n frame.src = url;\n }\n }, {\n key: \"findFrameElement\",\n value: function findFrameElement(element, submitter) {\n var _a;\n\n var id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\") || this.element.getAttribute(\"target\");\n return (_a = getFrameElementById(id)) !== null && _a !== void 0 ? _a : this.element;\n }\n }, {\n key: \"extractForeignFrameElement\",\n value: function () {\n var _extractForeignFrameElement = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee25(container) {\n var element, id;\n return _regeneratorRuntime.wrap(function _callee25$(_context25) {\n while (1) {\n switch (_context25.prev = _context25.next) {\n case 0:\n id = CSS.escape(this.id);\n _context25.prev = 1;\n\n if (!(element = activateElement(container.querySelector(\"turbo-frame#\".concat(id)), this.currentURL))) {\n _context25.next = 4;\n break;\n }\n\n return _context25.abrupt(\"return\", element);\n\n case 4:\n if (!(element = activateElement(container.querySelector(\"turbo-frame[src][recurse~=\".concat(id, \"]\")), this.currentURL))) {\n _context25.next = 10;\n break;\n }\n\n _context25.next = 7;\n return element.loaded;\n\n case 7:\n _context25.next = 9;\n return this.extractForeignFrameElement(element);\n\n case 9:\n return _context25.abrupt(\"return\", _context25.sent);\n\n case 10:\n console.error(\"Response has no matching element\"));\n _context25.next = 16;\n break;\n\n case 13:\n _context25.prev = 13;\n _context25.t0 = _context25[\"catch\"](1);\n console.error(_context25.t0);\n\n case 16:\n return _context25.abrupt(\"return\", new FrameElement());\n\n case 17:\n case \"end\":\n return _context25.stop();\n }\n }\n }, _callee25, this, [[1, 13]]);\n }));\n\n function extractForeignFrameElement(_x20) {\n return _extractForeignFrameElement.apply(this, arguments);\n }\n\n return extractForeignFrameElement;\n }()\n }, {\n key: \"shouldInterceptNavigation\",\n value: function shouldInterceptNavigation(element, submitter) {\n var id = (submitter === null || submitter === void 0 ? void 0 : submitter.getAttribute(\"data-turbo-frame\")) || element.getAttribute(\"data-turbo-frame\") || this.element.getAttribute(\"target\");\n\n if (!this.enabled || id == \"_top\") {\n return false;\n }\n\n if (id) {\n var frameElement = getFrameElementById(id);\n\n if (frameElement) {\n return !frameElement.disabled;\n }\n }\n\n if (!session.elementDriveEnabled(element)) {\n return false;\n }\n\n if (submitter && !session.elementDriveEnabled(submitter)) {\n return false;\n }\n\n return true;\n }\n }, {\n key: \"id\",\n get: function get() {\n return this.element.id;\n }\n }, {\n key: \"enabled\",\n get: function get() {\n return !this.element.disabled;\n }\n }, {\n key: \"sourceURL\",\n get: function get() {\n if (this.element.src) {\n return this.element.src;\n }\n },\n set: function set(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 }, {\n key: \"reloadable\",\n get: function get() {\n var frame = this.findFrameElement(this.element);\n return frame.hasAttribute(\"reloadable\");\n },\n set: function set(value) {\n var frame = this.findFrameElement(this.element);\n\n if (value) {\n frame.setAttribute(\"reloadable\", \"\");\n } else {\n frame.removeAttribute(\"reloadable\");\n }\n }\n }, {\n key: \"loadingStyle\",\n get: function get() {\n return this.element.loading;\n }\n }, {\n key: \"isLoading\",\n get: function get() {\n return this.formSubmission !== undefined || this.resolveVisitPromise() !== undefined;\n }\n }, {\n key: \"isActive\",\n get: function get() {\n return this.element.isActive && this.connected;\n }\n }]);\n\n return FrameController;\n}();\n\nfunction getFrameElementById(id) {\n if (id != null) {\n var element = document.getElementById(id);\n\n if (element instanceof FrameElement) {\n return element;\n }\n }\n}\n\nfunction activateElement(element, currentURL) {\n if (element) {\n var src = element.getAttribute(\"src\");\n\n if (src != null && currentURL != null && urlsAreEqual(src, currentURL)) {\n throw new Error(\"Matching element has a source URL which references itself\"));\n }\n\n if (element.ownerDocument !== document) {\n element = document.importNode(element, true);\n }\n\n if (element instanceof FrameElement) {\n element.connectedCallback();\n return element;\n }\n }\n}\n\nvar StreamActions = {\n after: function after() {\n var _this32 = this;\n\n this.targetElements.forEach(function (e) {\n var _a;\n\n return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(_this32.templateContent, e.nextSibling);\n });\n },\n append: function append() {\n var _this33 = this;\n\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach(function (e) {\n return e.append(_this33.templateContent);\n });\n },\n before: function before() {\n var _this34 = this;\n\n this.targetElements.forEach(function (e) {\n var _a;\n\n return (_a = e.parentElement) === null || _a === void 0 ? void 0 : _a.insertBefore(_this34.templateContent, e);\n });\n },\n prepend: function prepend() {\n var _this35 = this;\n\n this.removeDuplicateTargetChildren();\n this.targetElements.forEach(function (e) {\n return e.prepend(_this35.templateContent);\n });\n },\n remove: function remove() {\n this.targetElements.forEach(function (e) {\n return e.remove();\n });\n },\n replace: function replace() {\n var _this36 = this;\n\n this.targetElements.forEach(function (e) {\n return e.replaceWith(_this36.templateContent);\n });\n },\n update: function update() {\n var _this37 = this;\n\n this.targetElements.forEach(function (e) {\n e.innerHTML = \"\";\n e.append(_this37.templateContent);\n });\n }\n};\n\nvar StreamElement = /*#__PURE__*/function (_HTMLElement2) {\n _inherits(StreamElement, _HTMLElement2);\n\n var _super9 = _createSuper(StreamElement);\n\n function StreamElement() {\n _classCallCheck(this, StreamElement);\n\n return _super9.apply(this, arguments);\n }\n\n _createClass(StreamElement, [{\n key: \"connectedCallback\",\n value: function () {\n var _connectedCallback = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee26() {\n return _regeneratorRuntime.wrap(function _callee26$(_context26) {\n while (1) {\n switch (_context26.prev = _context26.next) {\n case 0:\n _context26.prev = 0;\n _context26.next = 3;\n return this.render();\n\n case 3:\n _context26.next = 8;\n break;\n\n case 5:\n _context26.prev = 5;\n _context26.t0 = _context26[\"catch\"](0);\n console.error(_context26.t0);\n\n case 8:\n _context26.prev = 8;\n this.disconnect();\n return _context26.finish(8);\n\n case 11:\n case \"end\":\n return _context26.stop();\n }\n }\n }, _callee26, this, [[0, 5, 8, 11]]);\n }));\n\n function connectedCallback() {\n return _connectedCallback.apply(this, arguments);\n }\n\n return connectedCallback;\n }()\n }, {\n key: \"render\",\n value: function () {\n var _render6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {\n var _this38 = this;\n\n var _a;\n\n return _regeneratorRuntime.wrap(function _callee28$(_context28) {\n while (1) {\n switch (_context28.prev = _context28.next) {\n case 0:\n return _context28.abrupt(\"return\", (_a = this.renderPromise) !== null && _a !== void 0 ? _a : this.renderPromise = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee27() {\n return _regeneratorRuntime.wrap(function _callee27$(_context27) {\n while (1) {\n switch (_context27.prev = _context27.next) {\n case 0:\n if (!_this38.dispatchEvent(_this38.beforeRenderEvent)) {\n _context27.next = 4;\n break;\n }\n\n _context27.next = 3;\n return nextAnimationFrame();\n\n case 3:\n _this38.performAction();\n\n case 4:\n case \"end\":\n return _context27.stop();\n }\n }\n }, _callee27);\n }))());\n\n case 1:\n case \"end\":\n return _context28.stop();\n }\n }\n }, _callee28, this);\n }));\n\n function render() {\n return _render6.apply(this, arguments);\n }\n\n return render;\n }()\n }, {\n key: \"disconnect\",\n value: function disconnect() {\n try {\n this.remove();\n } catch (_a) {}\n }\n }, {\n key: \"removeDuplicateTargetChildren\",\n value: function removeDuplicateTargetChildren() {\n this.duplicateChildren.forEach(function (c) {\n return c.remove();\n });\n }\n }, {\n key: \"duplicateChildren\",\n get: function get() {\n var _a;\n\n var existingChildren = this.targetElements.flatMap(function (e) {\n return _toConsumableArray(e.children);\n }).filter(function (c) {\n return !!c.id;\n });\n\n var newChildrenIds = _toConsumableArray((_a = this.templateContent) === null || _a === void 0 ? void 0 : _a.children).filter(function (c) {\n return !!c.id;\n }).map(function (c) {\n return c.id;\n });\n\n return existingChildren.filter(function (c) {\n return newChildrenIds.includes(c.id);\n });\n }\n }, {\n key: \"performAction\",\n get: function get() {\n if (this.action) {\n var actionFunction = StreamActions[this.action];\n\n if (actionFunction) {\n return actionFunction;\n }\n\n this.raise(\"unknown action\");\n }\n\n this.raise(\"action attribute is missing\");\n }\n }, {\n key: \"targetElements\",\n get: function get() {\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 }, {\n key: \"templateContent\",\n get: function get() {\n return this.templateElement.content.cloneNode(true);\n }\n }, {\n key: \"templateElement\",\n get: function get() {\n if (this.firstElementChild instanceof HTMLTemplateElement) {\n return this.firstElementChild;\n }\n\n this.raise(\"first child element must be a