unpoly-rails 3.11.0.rc12 → 3.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/assets/unpoly/unpoly.es6.js +1 -1
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.js +1 -1
- data/assets/unpoly/unpoly.min.js +1 -1
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +4 -4
@@ -1 +1 @@
|
|
1
|
-
(()=>{var t={181:(t,e,n)=>{n(4598),up.link=function(){const t=up.util,e=up.element;let n=null,i=null,r=null;const s="[up-content], [up-fragment], [up-document]",o=`${s}, [up-target], [up-layer], [up-transition], [up-preload]`,u=new up.Config((()=>({followSelectors:["[up-follow]",`a:is(${o})`],noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="javascript:"]','a[href^="mailto:"]','a[href^="tel:"]',`a[href^="#"]:not(${s})`,e.crossOriginSelector("href"),e.crossOriginSelector("up-href")],instantSelectors:["[up-instant]"],noInstantSelectors:["[up-instant=false]","[onclick]"],preloadSelectors:["[up-preload]"],noPreloadSelectors:["[up-preload=false]"],clickableSelectors:["[up-clickable]","[up-follow]","[up-emit]","[up-accept]","[up-dismiss]",`a:is(${o})`],noClickableSelectors:["[up-clickable=false]","a[href], button"],preloadDelay:90}))),a=up.mockable((function(t,e,n){return up.render(h(t,e,n))}));function c(e,n,i){n=t.options(n);const r=new up.OptionsParser(e,n,Object.assign(Object.assign({},i),{fail:!1}));return n.url=function(t,e={}){const n=e.url||t.getAttribute("up-href")||t.getAttribute("href");if("#"!==n)return n}(e,n),n.method=p(e,n),r.json("headers"),r.json("params"),r.booleanOrString("cache"),r.booleanOrString("expireCache"),r.booleanOrString("evictCache"),r.booleanOrString("revalidate"),r.booleanOrString("abort"),r.boolean("abortable"),r.boolean("background"),r.string("contentType"),r.booleanOrNumber("lateDelay"),r.number("timeout"),r.booleanOrString("fail"),n}function h(e,n,i){var r;e=up.fragment.get(e),n=t.options(n);const s=new up.OptionsParser(e,n,Object.assign({fail:!0},i));return s.include(c),n.origin||(n.origin=e),s.boolean("navigate",{default:!0}),s.string("confirm",{attr:["up-confirm","data-confirm"]}),s.string("target"),s.booleanOrString("fallback"),s.string("match"),s.string("document"),s.string("fragment"),s.string("content"),s.boolean("keep",{attr:"up-use-keep"}),s.boolean("hungry",{attr:"up-use-hungry"}),s.json("data",{attr:"up-use-data"}),s.callback("onLoaded"),s.callback("onRendered",{mainKey:"result"}),s.callback("onFinished",{mainKey:"result"}),s.callback("onOffline",{mainKey:"error"}),s.callback("onError",{mainKey:"error"}),s.boolean("peel"),s.string("layer"),s.string("baseLayer"),s.json("context"),s.string("mode"),s.string("align"),s.string("position"),s.string("class"),s.string("size"),s.booleanOrString("dismissable"),s.parse(up.layer.openCallbackAttr,"onOpened"),s.parse(up.layer.closeCallbackAttr,"onAccepted"),s.parse(up.layer.closeCallbackAttr,"onDismissed"),s.string("acceptEvent"),s.string("dismissEvent"),s.string("acceptLocation"),s.string("dismissLocation"),s.booleanOrString("closeAnimation"),s.string("closeEasing"),s.number("closeDuration"),s.include(up.status.statusOptions),s.booleanOrString("focus"),s.booleanOrString("focusVisible"),s.boolean("saveScroll"),s.boolean("saveFocus"),s.booleanOrString("scroll"),s.boolean("revealTop"),s.number("revealMax"),s.number("revealPadding"),s.number("revealSnap"),s.string("scrollBehavior"),s.booleanOrString("history"),s.booleanOrString("location"),s.booleanOrString("title"),s.boolean("metaTags"),s.booleanOrString("lang"),s.include(up.motion.motionOptions),null!==(r=n.guardEvent)&&void 0!==r||(n.guardEvent=up.event.build("up:link:follow",{log:["Following link %o",e]})),n}function l(t,e){let n=function(t){if(!b(t))return"Will not preload an unsafe link"}(t=up.fragment.get(t));if(n)return Promise.reject(new up.Error(n));const i=up.event.build("up:link:preload",{log:["Preloading link %o",t]});return a(t,Object.assign(Object.assign(Object.assign(Object.assign({abort:!1,abortable:!1,background:!0,cache:!0},e),up.RenderOptions.NO_INPUT_INTERFERENCE),up.RenderOptions.NO_PREVIEWS),{guardEvent:i,preload:!0}))}function p(e,n={}){return t.normalizeMethod(n.method||e.getAttribute("up-method")||e.getAttribute("data-method"))}function f(t){return t=up.fragment.get(t),u.matches(t,"followSelectors")}function d(t){f(t)||t.setAttribute("up-follow","")}function m(t,e){if(t.defaultPrevented)return!1;const n=`a, [up-follow], ${up.form.fieldSelector()}`,i=t.target.closest(n);return!i||i===e}function g(t){const e=t.closest(u.selector("instantSelectors"));return e&&(n=e,!(u.matches(n,"noInstantSelectors")||u.matches(n,"noFollowSelectors")));var n}function v(t){let e=["clientX","clientY","button",...up.event.keyModifiers];const n=up.event.fork(t,"up:click",e);up.emit(t.target,n,{log:!1})}function b(t){const e=p(t);return up.network.isSafeMethod(e)}function y(t,n,i){switch(t){case"insert":i();break;case"reveal":{let t=e.numberAttr(n,"up-intersect-margin");up.fragment.onFirstIntersect(n,i,{margin:t});break}case"hover":new up.LinkFollowIntent(n,i)}}function w(t,e){let n=up.event.build("up:deferred:load",{log:["Loading deferred %o",t]}),i=Object.assign({navigate:!1,guardEvent:n},e);return a(t,i,{defaults:{target:":origin",cache:"auto",revalidate:"auto",feedback:!0}})}return up.macro(u.selectorFn("clickableSelectors"),(function(t){let n=t.matches("a, [up-follow]")?"link":"button";e.setMissingAttrs(t,{tabindex:"0",role:n,"up-clickable":""}),t.addEventListener("keydown",(function(e){if("Enter"===e.key||"button"===t.role&&"Space"===e.key)return v(e)}))})),up.attribute("up-defer",{defaultValue:"insert"},(function(t,e){y(e,t,(e=>up.error.muteUncriticalRejection(w(t,e))))})),up.on("up:click",u.selectorFn("followSelectors"),(function(t,e){m(t,e)&&(up.event.halt(t,{log:!0}),up.focus(e,{preventScroll:!0}),up.error.muteUncriticalRejection(a(e)))})),up.attribute("up-expand",{defaultValue:"a, [up-href]",macro:!0},(function(t,n){let i=e.get(t,n);i&&(e.setMissingAttrs(t,Object.assign({"up-href":e.attr(i,"href")},e.upAttrs(i))),e.addClasses(t,e.upClasses(i)),d(t))})),up.compiler(u.selectorFn("preloadSelectors"),(function(n){if(!function(t){return!up.browser.canPushState()||!f(t)||!function(t){const e=c(t);if(e.url)return null==e.cache&&(e.cache="auto"),e.basic=!0,new up.Request(e).willCache()}(t)}(n)){let i=t=>up.error.muteUncriticalRejection(l(n,t)),r=e.booleanOrStringAttr(n,"up-preload");(!0===r||t.isUndefined(r))&&(r="hover"),y(r,n,i)}})),up.on("up:framework:reset",(function(){n=null,i=null,r=null})),{follow:a,followOptions:h,requestOptions:c,preload:l,makeFollowable:d,isSafe:b,isFollowable:f,shouldFollowEvent:m,convertClicks:function(t){t.on("click",(function(e,n){up.event.isModified(e)||(g(n)&&r===n?up.event.halt(e):("key"===up.event.inputDevice||up.event.isSyntheticClick(e)||t.wasHitByMouseEvent(e)&&(!i||i===e.target))&&v(e),i=null,r=null)})),t.on("touchstart",{passive:!0},(function(t,e){n=e})),t.on("mousedown",(function(t,e){up.event.isModified(t)||(i=e,g(e)&&!function(t){let e=t.target;return n===e&&e.closest("[href]")}(t)&&(r=e,v(t)),n=null)}))},config:u,loadDeferred:w}}(),up.follow=up.link.follow,up.deferred={load:up.link.loadDeferred}},235:(t,e,n)=>{n(2208),up.viewport=function(){const t=up.util,e=up.element,n=up.fragment,i=new up.Config((()=>({viewportSelectors:["[up-viewport]","[up-fixed]"],fixedTopSelectors:["[up-fixed~=top]"],fixedBottomSelectors:["[up-fixed~=bottom]"],anchoredRightSelectors:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:200,revealPadding:0,revealTop:!1,revealMax:()=>.5*window.innerHeight,autoFocusVisible:({element:t,inputDevice:e})=>"key"===e||up.form.isField(t)}))),r=new up.BodyShifter;up.compiler(i.selectorFn("anchoredRightSelectors"),(function(t){return r.onAnchoredElementInserted(t)}));const s=up.mockable((function(e,i){var r,s;return i=t.options(i),e=n.get(e,i),(i.layer=up.layer.get(e))||up.fail("Cannot reveal a detached element"),i.peel&&i.layer.peel(),new up.RevealMotion(e,i).start(),(null===(s=(r=up.migrate).formerlyAsync)||void 0===s?void 0:s.call(r,"up.reveal()"))||!0}));function o(e,{preventScroll:n,force:r,inputDevice:o,focusVisible:a}={}){if(r&&(e.hasAttribute("tabindex")||-1!==e.tabIndex||e.setAttribute("tabindex","-1")),null!=o||(o=up.event.inputDevice),null!=a||(a="auto"),a=t.evalAutoOption(a,i.autoFocusVisible,{element:e,inputDevice:o}),e.focus({preventScroll:!0,focusVisible:a}),u(e),e.classList.add(a?"up-focus-visible":"up-focus-hidden"),!n)return s(e)}function u(t){null==t||t.classList.remove("up-focus-hidden","up-focus-visible")}function a(e,{strong:n,layer:i,origin:r,behavior:o="instant"}={}){if(!e)return;let u=b(e,{layer:i,origin:r});return u?()=>{let e=()=>s(u,{top:!0,behavior:o});return n&&t.task(e),e()}:"#top"===e?()=>g(0,{behavior:o}):void 0}function c(){return[p().tagName,...i.viewportSelectors].join()}function h(t,e={}){return n.get(t,e).closest(c())}function l(t,i={}){return t=n.get(t,i),e.around(t,c())}function p(){return document.scrollingElement}function f(){return e.root.clientWidth}function d(t){return up.fragment.tryToTarget(t)}function m(e){const[i,r]=t.args(e,"val","options");let s;return r.layer=up.layer.get(r),s=i?[h(i,r)]:r.around?l(r.around,r):function(t={}){return n.all(c(),t)}(r),[s,r]}function g(t,...e){const[n,i]=m(e);return v(n,{},t,i.behavior),!0}function v(t,e,n,i="instant"){for(let r of t){const t=e[d(r)]||n;r.scrollTo({top:t,behavior:i})}}function b(t,i={}){var r;if(t=null==(r=t)?void 0:r.replace(/^#/,"")){const r=[e.idSelector(t),"a"+e.attrSelector("name",t)].join();return n.get(r,i)}}up.on("focusin",(function({relatedTarget:t}){u(t)}));const y=["selectionStart","selectionEnd","scrollLeft","scrollTop"];return{reveal:s,revealHash:function(...t){var e;return null===(e=a(...t))||void 0===e?void 0:e()},revealHashFn:a,firstHashTarget:b,config:i,get:h,subtree:function(t,i={}){return t=n.get(t,i),e.subtree(t,c())},around:l,get root(){return p()},rootWidth:f,rootHeight:function(){return e.root.clientHeight},isRoot:function(t){return t===p()},rootScrollbarWidth:function(){return window.innerWidth-f()},saveScroll:function(...t){const[e,n]=m(t),i=n.location||n.layer.location;if(i){const t=function(t){let e={};for(let n of t){let t=d(n);t?e[t]=n.scrollTop:up.warn("up.viewport.saveScroll()","Cannot save scroll positions for untargetable viewport %o",n)}return e}(e);n.layer.lastScrollTops.set(i,t)}},restoreScroll:function(...t){const[e,n]=m(t),{location:i}=n.layer,r=n.layer.lastScrollTops.get(i);return!!r&&(v(e,r,0),up.puts("up.viewport.restoreScroll()","Restored scroll positions to %o",r),!0)},scrollTo:g,saveFocus:function(t={}){const e=up.layer.get(t),n=t.location||e.location;if(n){const t=up.FocusCapsule.preserve(e);e.lastFocusCapsules.set(n,t)}},restoreFocus:function(t={}){const e=up.layer.get(t),n=t.location||e.location,i=t.layer.lastFocusCapsules.get(n);return!(!i||!i.restore(e)||(up.puts("up.viewport.restoreFocus()",'Restored focus to "%s"',i.target),0))},absolutize:function(n,r={}){var s;const o=h(n).getBoundingClientRect(),u=n.getBoundingClientRect(),a=new up.Rect({left:u.left-o.left,top:u.top-o.top,width:u.width,height:u.height});null===(s=r.afterMeasure)||void 0===s||s.call(r),e.setStyle(n,{position:"static"===n.style.position?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"});const c=e.createFromSelector("up-bounds");e.insertBefore(n,c),c.appendChild(n);const l=function(t,n){return a.left+=t,a.top+=n,e.setStyle(c,a,"px")};l(0,0);const p=n.getBoundingClientRect();return l(u.left-p.left,u.top-p.top),t.each(function(t=document){const e=["[up-fixed]"].concat(i.fixedTopSelectors).concat(i.fixedBottomSelectors);return t.querySelectorAll(e.join())}(n),e.fixedToAbsolute),{bounds:c,moveBounds:l}},focus:o,tryFocus:function(t,e){return o(t,e),t===document.activeElement},newStateCache:function(){return new up.FIFOCache({capacity:30,normalizeKey:t.matchableURL})},focusedElementWithin:function(t){const e=document.activeElement;if(up.fragment.contains(t,e))return e},copyCursorProps:function(t,e={}){for(let n of y)try{e[n]=t[n]}catch(t){}return e},bodyShifter:r}}(),up.focus=up.viewport.focus,up.reveal=up.viewport.reveal},302:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const e=up.util,n=up.element;up.Change.UpdateSteps=class UpdateSteps extends up.Change.Addition{constructor(t){super(t),this.i=e.copy(e.assert(t.steps)),this.o=e.assert(t.passRenderOptions),this.u=t.noneOptions||{}}execute(t){if(this.responseDoc=t,this.i=t.selectSteps(this.i),this.i=t.commitSteps(this.i),this.renderResult=new up.RenderResult({layer:this.o.layer,target:up.fragment.targetForSteps(this.i),renderOptions:this.o}),this.i.length){this.i.reverse();const t=this.i.map((t=>this.h(t)));this.renderResult.finished=this.l(t)}else this.p(null,this.u),this.m(null,this.u);return this.renderResult}l(e){return t(this,void 0,void 0,(function*(){yield Promise.all(e);for(let t of this.i)this.abortWhenLayerClosed(t.layer);return this.renderResult}))}v(t){let e=t.matches("up-wrapper")?t.children:[t];this.renderResult.fragments.unshift(...e)}h(t){switch(t.placement){case"swap":if(up.fragment.keepPlan(t))return this.p(t.oldElement,t),this.m(t.oldElement,t),Promise.resolve();{this._(t);const e=t.oldElement.parentNode,i=Object.assign(Object.assign({},t),{beforeStart(){up.fragment.markAsDestroying(t.oldElement)},afterInsert:()=>{this.O(t),this.k(t.newElement,t),this.S(t)},beforeDetach:()=>{up.script.clean(t.oldElement,{layer:t.layer})},afterDetach(){n.cleanJQuery(),up.fragment.emitDestroyed(t.oldElement,{parent:e,log:!1})},scrollNew:()=>{this.p(t.newElement,t),this.m(t.newElement,t)}});return up.morph(t.oldElement,t.newElement,t.transition,i)}case"content":{let e=n.wrapChildren(t.oldElement),i=n.wrapChildren(t.newElement),r=Object.assign(Object.assign({},t),{placement:"swap",oldElement:e,newElement:i,focus:!1});return this.h(r).then((()=>{n.unwrap(i),this.p(t.oldElement,t)}))}case"before":case"after":{let e=n.wrapChildren(t.newElement),i="before"===t.placement?"afterbegin":"beforeend";return t.oldElement.insertAdjacentElement(i,e),this.k(e,t),this.p(e,t),this.m(e,t),up.animate(e,t.animation,t).then((()=>n.unwrap(e)))}default:up.fail("Unknown placement: %o",t.placement)}}k(t,e){this.responseDoc.finalizeElement(t),this.setReloadAttrs(e),up.hello(t,e),this.v(t)}_(t){const n=[];if(t.keep)for(let i of t.oldElement.querySelectorAll("[up-keep]")){let r=up.fragment.keepPlan(Object.assign(Object.assign({},t),{oldElement:i,descendantsOnly:!0}));if(r){const t=i.cloneNode(!0);i.insertAdjacentElement("beforebegin",t),i.classList.add("up-keeping"),up.script.disableSubtree(r.newElement);let s=up.viewport.subtree(r.oldElement);r.revivers=e.map(s,(function(t){let e=up.viewport.copyCursorProps(t);return()=>up.viewport.copyCursorProps(e,t)})),this.j()?r.newElement.replaceWith(i):document.body.append(i),n.push(r)}}t.descendantKeepPlans=n}O(t){for(let e of t.descendantKeepPlans){e.newElement.replaceWith(e.oldElement);for(let t of e.revivers)t()}}S(t){for(let e of t.descendantKeepPlans)e.oldElement.classList.remove("up-keeping")}j(){return e.some(this.i,(t=>t.oldElement.matches("body")))}p(t,e){return new up.FragmentFocus(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoFocus})).process(e.focus)}m(t,e){return new up.FragmentScrolling(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoScroll})).process(e.scroll)}}},367:()=>{up.log=function(){const t=up.util,e=new up.LogConfig;function n(t,e,n,...r){i(t,e,"",n,...r)}function i(n,i,r,s,...o){s&&(e.format?console[n](`%c${i}%c ${s}`,"color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block;"+r,"",...o):console[n](`[${i}] ${t.sprintf(s,...o)}`))}let r;return up.on("up:framework:boot",(function(){if(!e.banner)return;const t=` __ _____ ___ ___ / /_ __\n/ // / _ \\/ _ \\/ _ \\/ / // / ${up.version}\n\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n`;let n="";up.migrate.loaded||(n+="Load unpoly-migrate.js to polyfill deprecated APIs.\n\n"),e.enabled?n+="Call `up.log.disable()` to disable logging for this session.":n+="Call `up.log.enable()` to enable logging for this session.";const i="color: #777777";e.format?console.log("%c"+t+"%c"+n,"font-family: monospace;"+i,i):console.log(t+n)})),{puts:function(...t){e.enabled&&n("log",...t)},putsEvent:function(t){if(e.enabled&&r!==t){r=t;let e=t.originalEvent||t,n="#5566cc";i("log",e.type,`color: white; border-color: ${n}; background-color: ${n}`,"Interaction on %o",e.target)}},error:(...t)=>n("error",...t),warn:(...t)=>n("warn",...t),config:e,enable:function(){e.enabled=!0},disable:function(){e.enabled=!1}}}(),up.puts=up.log.puts,up.warn=up.log.warn},541:()=>{const t=up.util;up.RenderOptions=function(){const e=["url","method","origin","headers","params","cache","fallback","abort","abortable","confirm","feedback","disable","placeholder","preview","origin","originLayer","baseLayer","navigate","fail","onError"].concat(["keep","hungry","history","source","saveScroll"]),n=["url","response","content","fragment","document"],i=["history","focus","scroll"];return{preprocess:function(e){var n,r;null===(r=(n=up.migrate).preprocessRenderOptions)||void 0===r||r.call(n,e),up.layer.normalizeOptions(e),function(e){t.renameKey(e,"useData","data"),t.renameKey(e,"useHungry","hungry"),t.renameKey(e,"useKeep","keep")}(e);const s=t.merge(up.fragment.config.renderOptions,function(t){if(t.navigate)return up.fragment.config.navigateOptions}(e));return t.merge(t.omit(s,i),{defaults:s},{inputDevice:up.event.inputDevice},e,function({url:e}){if(e)return{url:t.normalizeURL(e)}}(e),function({origin:t,originLayer:e}){if(t&&!e)return{originLayer:up.layer.get(t)}}(e))},finalize:function(e,n){return t.merge(e.defaults,n,e)},assertContentGiven:function(e){t.some(n,(n=>t.isGiven(e[n])))||(e.defaultToEmptyContent?e.content="":up.fail("up.render() needs either { "+n.join(", ")+" } option"))},deriveFailOptions:function(n){let i={didFail:!0},r=function(t){const e={};for(let n in t){const i=t[n];let r=up.fragment.successKey(n);r&&(e[r]=i)}return e}(n);return n.failOptions?Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n.defaults),t.pick(n,e)),r),{didForceFailOptions:!0}),i):Object.assign(Object.assign(Object.assign({},n),r),i)},NO_PREVIEWS:{preview:!1,disable:!1,placeholder:!1,feedback:!1},NO_MOTION:{transition:!1,animation:!1,openAnimation:!1,closeAnimation:!1},NO_INPUT_INTERFERENCE:{scroll:!1,focus:"keep",confirm:!1}}}()},567:()=>{const t=up.element;up.NonceableCallback=class NonceableCallback{constructor(t,e){this.script=t,this.nonce=e}static fromString(t){let e=t.match(/^(nonce-([^\s]+)\s)?(.*)$/);return new this(e[3],e[2])}toFunction(...t){let e=this.script;if(this.nonce){let n=this;return function(...i){return n.C(e,this,t,i)}}return new Function(...t,e)}toString(){return`nonce-${this.nonce} ${this.script}`}C(e,n,i,r){let s,o=`\n try {\n up.noncedEval.value = (function(${i.join()}) {\n ${e}\n }).apply(up.noncedEval.thisArg, up.noncedEval.args)\n } catch (error) {\n up.noncedEval.error = error\n }\n `;try{if(up.noncedEval={args:r,thisArg:n},s=t.affix(document.body,"script",{nonce:this.nonce,text:o}),up.noncedEval.error)throw up.noncedEval.error;return up.noncedEval.value}finally{up.noncedEval=void 0,s&&s.remove()}}}},611:()=>{const t=up.util,e=up.element;up.EventEmitter=class EventEmitter extends up.Record{keys(){return["target","event","baseLayer","callback","log","ensureBubbles"]}emit(){return this.F(),this.baseLayer?this.baseLayer.asCurrent((()=>this.T())):this.T(),this.event}T(){this.target.dispatchEvent(this.event),this.ensureBubbles&&!this.target.isConnected&&document.dispatchEvent(this.event),up.error.guard((()=>{var t;return null===(t=this.callback)||void 0===t?void 0:t.call(this,this.event)}))}assertEmitted(){const t=this.emit();if(t.defaultPrevented)throw new up.Aborted(`Event ${t.type} was prevented`)}F(){if(!up.log.config.enabled)return;let e,n=this.log;t.isArray(n)?[n,...e]=n:e=[];const{type:i}=this.event;t.isString(n)?up.puts(i,n,...e):!1!==n&&up.puts(i,`Event ${i}`)}static fromEmitArgs(n,i={}){var r,s;let o,u=t.extractOptions(n);return u=t.merge(i,u),t.isElementLike(n[0])?u.target=e.get(n.shift()):n[0]instanceof up.Layer&&(u.layer=n.shift()),t.isGiven(u.layer)&&(o=up.layer.get(u.layer),u.target||(u.target=o.element),u.baseLayer||(u.baseLayer=o)),u.baseLayer&&(u.baseLayer=up.layer.get(u.baseLayer)),t.isString(u.target)?u.target=up.fragment.get(u.target,{layer:u.layer}):u.target||(u.target=document),(null===(r=n[0])||void 0===r?void 0:r.preventDefault)?(u.event=n[0],null!==(s=u.log)&&void 0!==s||(u.log=n[0].log)):t.isString(n[0])?u.event=up.event.build(n[0],u):u.event=up.event.build(u),new this(u)}}},621:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const e=up.util;up.FieldWatcher=class FieldWatcher{constructor(t,e,n){var i;this.R=e,this.L=t,this.P=n,this.A=e.batch,this.D=null!==(i=e.logPrefix)&&void 0!==i?i:"up.watch()",this.$()}start(){return this.M=null,this.H=this.N(),this.B=null,this.q=!1,e.sequence(up.form.trackFields(this.L,(t=>this.I(t))),this.U(),this.V(),(()=>this.K()))}$(){const t=t=>up.fail(t,this.D,this.L);this.P||t("No callback provided for %s (%o)"),this.L.matches("input[type=radio]")&&t("Use %s with the container of a radio group, not with an individual radio button (%o)"),up.form.isField(this.L)&&!this.L.name&&t("%s can only watch fields with a name (%o)")}U(){return up.on("up:fragment:aborted",{guard:({target:t})=>t.contains(this.X)},(()=>this.K()))}V(){return up.on("reset",{guard:({target:t})=>t===this.X},(t=>this.W(t)))}get X(){return up.form.getRegion(this.L)}G(t){let n=e.copy(this.R);return up.form.watchOptions(t,n,{defaults:{event:"input"}})}I(t){let e=this.G(t),n=e.event;return up.on(t,n,(t=>this.J(t,e)))}K(){this.M=null}Y(t,n){this.M=t,this.Z=n;let i=n.delay||0;clearTimeout(this.B),this.B=e.timer(i,(()=>{this.B=null,this.tt()}))}et(t){return!e.isEqual(t,this.H)&&!e.isEqual(this.M,t)}tt(){return t(this,void 0,void 0,(function*(){if(!this.M)return;if(this.q)return;if(this.B)return;if(!up.fragment.isAlive(this.X))return;let t=e.omit(this.Z,["event","delay"]);const n=this.nt(this.H,this.M);this.H=this.M,this.M=null,this.q=!0,this.Z=null;const i=[];if(this.A)i.push(this.it(n,t));else for(let e in n){const r=n[e];i.push(this.it(r,e,t))}if(e.some(i,e.isPromise)){let t=Promise.allSettled(i);yield t}this.q=!1,this.tt()}))}it(...t){return up.error.guard(this.P,...t)}nt(t,n){const i={};let r=Object.keys(t);r=r.concat(Object.keys(n)),r=e.uniq(r);for(let s of r){const r=t[s],o=n[s];e.isEqual(r,o)||(i[s]=o)}return i}N(){return up.Params.fromContainer(this.L).toObject()}J(t,e={}){const n=this.N();this.et(n)&&(up.log.putsEvent(t),this.Y(n,e))}W(t){e.task((()=>this.J(t)))}}},864:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};up.Change.DestroyFragment=class DestroyFragment extends up.Change{constructor(t){super(t),this.rt=up.layer.get(t)||up.layer.current,this.st=this.options.element,this.ot=this.options.animation,this.ut=this.options.log,this.ct=this.options.onFinished}execute(){this.ht=this.st.parentNode,up.fragment.markAsDestroying(this.st),up.motion.willAnimate(this.st,this.ot,this.options)?this.lt():this.ft()}lt(){var e;return t(this,void 0,void 0,(function*(){this.dt(),yield this.gt(),this.vt(),null===(e=this.ct)||void 0===e||e.call(this)}))}ft(){var t;this.vt(),this.dt(),null===(t=this.ct)||void 0===t||t.call(this)}gt(){return up.motion.animate(this.st,this.ot,this.options)}vt(){this.rt.asCurrent((()=>{up.fragment.abort(this.st),up.script.clean(this.st,{layer:this.rt}),up.element.cleanJQuery(this.st),this.st.remove()}))}dt(){up.fragment.emitDestroyed(this.st,{parent:this.ht,log:this.ut})}}},889:()=>{up.browser={submitForm:function(t){t.submit()},canPushState:function(){return"GET"===up.protocol.initialRequestMethod()},canJQuery:function(){return!!window.jQuery},assertConfirmed:function(t){if(t.confirm&&!window.confirm(t.confirm))throw new up.Aborted("User canceled action");return!0},popCookie:function(t){var e;let n=null===(e=document.cookie.match(new RegExp(t+"=(\\w+)")))||void 0===e?void 0:e[1];if(n)return document.cookie=t+"=;Max-Age=0;Path=/",n}}},1268:()=>{up.CannotTarget=class CannotTarget extends up.Error{}},1410:()=>{up.CannotParse=class CannotParse extends up.Error{}},1420:function(t,e,n){var i=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};n(7339);const r=up.util,s=up.element;up.layer=function(){const t=[up.Layer.Root,up.Layer.Modal,up.Layer.Popup,up.Layer.Drawer,up.Layer.Cover],e=new up.Config((function(){const e={mode:"modal",any:{mainTargets:["[up-main='']","main",":layer"]},root:{mainTargets:["[up-main~=root]"],history:!0},overlay:{mainTargets:["[up-main~=overlay]"],openAnimation:"fade-in",closeAnimation:"fade-out",dismissLabel:"×",dismissARIALabel:"Dismiss dialog",dismissable:!0,history:"auto",trapFocus:!0},cover:{mainTargets:["[up-main~=cover]"]},drawer:{mainTargets:["[up-main~=drawer]"],backdrop:!0,position:"left",size:"medium",openAnimation(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}}},modal:{mainTargets:["[up-main~=modal]"],backdrop:!0,size:"medium"},popup:{mainTargets:["[up-main~=popup]"],position:"bottom",size:"medium",align:"left",dismissable:"outside key",trapFocus:!1},foreignOverlaySelectors:["dialog"]};for(let n of t)e[n.mode].Class=n;return e}));let n=null,o=[];function u(t){return"root"===t?[e.root,e.any]:[e[t],e.overlay,e.any]}function a(t){return i(this,void 0,void 0,(function*(){return t=r.options(t,{layer:"new",defaultToEmptyContent:!0,navigate:!0}),(yield up.render(t)).layer}))}up.on("up:fragment:destroyed",(function(){n.sync()})),up.on("up:framework:evaled",(function(){n=new up.LayerStack})),up.on("up:framework:reset",(function(){n.reset(),o=r.filter(o,"isDefault")}));const c={config:e,mainTargets:function(t){return r.flatMap(u(t),"mainTargets")},open:a,build:function(t,i){var s;const{mode:o}=t,{Class:a}=e[o],c=r.reverse(u(o));let h=up.migrate.handleLayerConfig;return h&&c.forEach(h),null!==(s=t.openAnimation)&&void 0!==s||(t.openAnimation=r.pluckKey(t,"animation")),t=r.mergeDefined(...c,{mode:o,stack:n},t),i&&(t=i(t)),new a(t)},ask:function(t){return new Promise((function(e,n){a(t=Object.assign(Object.assign({},t),{onAccepted:t=>e(t.value),onDismissed:t=>n(t.value)}))}))},normalizeOptions:function(t){var i;!function(t){var i,s;if(!(t.layer instanceof up.Layer))if(null===(s=(i=up.migrate).handleLayerOptions)||void 0===s||s.call(i,t),r.isGiven(t.layer)){let n=String(t.layer).match(/^(new|shatter|swap)( (\w+))?/);if(n){t.layer="new";const i=n[1],r=n[3];t.mode||(t.mode=r||e.mode),"swap"===i?up.layer.isOverlay()&&(t.baseLayer="parent"):"shatter"===i&&(t.baseLayer="root")}}else r.isElementLike(t.target)?t.layer=n.get(t.target,{normalizeLayerOptions:!1}):t.origin?t.layer="origin":t.layer="current"}(t),null!==(i=t.context)&&void 0!==i||(t.context={}),function(t){t.baseLayer instanceof up.Layer||(t.baseLayer=n.get("current",Object.assign(Object.assign({},t),{normalizeLayerOptions:!1})))}(t)},openCallbackAttr:function(t,e){return s.callbackAttr(t,e,{exposedKeys:["layer"]})},closeCallbackAttr:function(t,e){return s.callbackAttr(t,e,{exposedKeys:["layer","value","response"]})},anySelector:function(){return r.map(t,(t=>t.selector())).join()},optionToString:function(t){return r.isString(t)?`layer "${t}"`:t.toString()},get stack(){return n.layers},isWithinForeignOverlay:function(t){let n=e.selector("foreignOverlaySelectors");return!(!n||!t.closest(n))}};return r.delegate(c,["get","getAll","root","overlays","current","front","sync","count","dismissOverlays"],(()=>n)),r.delegate(c,["accept","dismiss","isRoot","isOverlay","isFront","on","off","emit","parent","history","location","mode","context","element","contains","size","affix"],(()=>n.current)),c}()},1438:()=>{up.FocusCapsule=class FocusCapsule{constructor(t,e){this.st=t,this.bt=e,this.yt=up.viewport.copyCursorProps(this.st)}wasLost(){return document.activeElement!==this.st&&!this.wt}autoVoid(){up.on("focusin",{once:!0},(()=>this.wt=!0))}restore(t,e){if(!this.wasLost())return!1;let n=up.fragment.get(this.bt,{layer:t});return n?(up.viewport.copyCursorProps(this.yt,n),up.focus(n,e),!0):void 0}static preserve(t){let e=up.viewport.focusedElementWithin(t.element);if(!e)return;let n=up.fragment.tryToTarget(e);return n?new this(e,n):void 0}}},1499:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))},e=this&&this._t||function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n};const n=up.util,i=up.element;up.FormValidator=class FormValidator{constructor(t){this.Ot=t,this.kt=[],this.St=null,this.Et=!1,this.xt()}start(){return up.form.trackFields(this.Ot,{guard:t=>this.jt(t)},(t=>this.Ct(t)))}jt(t){return t.closest("[up-validate]:not([up-validate=false])")}Ct(t){let e=up.form.validateOptions(t).event;return up.on(t,e,(e=>{up.log.putsEvent(e),up.error.muteUncriticalRejection(this.validate({origin:t}))}))}xt(){up.fragment.onAborted(this.Ot,(t=>this.Ft(t)))}Ft(t){let e,n=new up.Aborted(t.reason);for(;e=this.kt.shift();)e.deferred.reject(n)}validate(t={}){var e;let n=this.Tt(t);return this.kt.push(...n),this.Rt(),null===(e=n[0])||void 0===e?void 0:e.deferred}Tt(t){let e=this.Lt(t)||this.Pt(t)||this.At(t.origin),i=n.newDeferred();for(let r of e){let e=up.form.validateOptions(r.origin,t);r.batch=n.pluckKey(e,"batch"),r.renderOptions=e,r.destination=`${e.method} ${e.url}`,r.target=up.fragment.resolveOrigin(r.target,r),r.deferred=i}return e}Pt(t){var{origin:n}=t,i=e(t,["origin"]);if(up.form.isField(n))return this.Dt(n)||this.$t(n,i)}$t(t,{formGroup:e=!0}){if(!e)return;let n=up.form.groupSolution(t);return n?(up.puts("up.validate()","Validating form group of field %o",t),[n]):void 0}Lt({target:t,origin:e}){if(n.isString(t)){up.puts("up.validate()",'Validating target "%s"',t);let i=up.fragment.splitTarget(t);return n.compact(i.map((function(t){let n=up.fragment.get(t,{origin:e});if(n)return{element:n,target:t,origin:e};up.fail('Validation target "%s" does not match an element',t)})))}}At(t){return up.puts("up.validate()","Validating element %o",t),[{element:t,target:up.fragment.toTarget(t),origin:t}]}Dt(t){let e=t.closest("[up-validate]");if(e){let n=i.booleanOrStringAttr(e,"up-validate");return this.Lt({target:n,origin:t})}}Rt(){let t=this.kt.map((t=>t.renderOptions.delay)),e=Math.min(...t)||0;clearTimeout(this.St),this.St=n.timer(e,(()=>{this.St=null,this.Mt()}))}Mt(){up.error.muteUncriticalRejection(this.Ht())}Ht(){return t(this,void 0,void 0,(function*(){if(!this.kt.length)return;if(this.Et)return;if(this.St)return;let t=this.Nt(),e=this.Bt(t);this.Et=!0;try{let n=up.render(e);for(let e of t)e.deferred.resolve(n);yield n}finally{this.Et=!1,this.Mt()}}))}Nt(){let t=[],e=0;for(;e<this.kt.length;){let n=this.kt[e];0===t.length||this.qt(t[0],n)?(t.push(n),this.kt.splice(e,1)):e++}return t}qt(t,e){return t.destination===e.destination&&t.batch&&e.batch}Bt(t){var e;let i=n.map(t,"origin"),r=n.flatMap(i,up.form.fields),s=n.uniq(n.map(r,"name")),o=n.map(t,"renderOptions"),u=up.form.destinationOptions(this.Ot),a=n.mergeDefined(u,...o);return a.target=n.map(t,"target").join(", "),a.origin=this.Ot,null!==(e=a.focus)&&void 0!==e||(a.focus="keep"),a.failOptions=!1,a.defaultMaybe=!0,a.params=up.Params.merge(u.params,...n.map(o,"params")),a.headers=n.merge(u.headers,...n.map(o,"headers")),this.It(a.headers,s),a.feedback=n.some(o,"feedback"),a.data=void 0,a.dataMap=n.mapObject(t,(({target:t,element:e,renderOptions:{data:n,keepData:i}})=>[t,i?up.data(e):n])),a.preview=void 0,a.previewMap=n.mapObject(t,(({target:t,renderOptions:{preview:e}})=>[t,e])),a.placeholder=void 0,a.placeholderMap=n.mapObject(t,(({target:t,renderOptions:{placeholder:e}})=>[t,e])),a.disable=t.map((t=>up.fragment.resolveOrigin(t.renderOptions.disable,t))),a.guardEvent=up.event.build("up:form:validate",{fields:r,log:"Validating form",params:a.params,form:this.Ot}),a}It(t,e){let n=up.protocol.headerize("validate"),i=e.join(" ");(!i||i.length>up.protocol.config.maxHeaderSize)&&(i=":unknown"),t[n]=i}}},1588:()=>{const t=up.util,e=up.element,n=["GET","POST"];up.Request.FormRenderer=class FormRenderer{constructor(t){this.zt=t}buildAndSubmit(){this.params=this.zt.params.withoutBinaryEntries();let i=this.zt.url,{method:r}=this.zt;const s=up.Params.fromURL(i);this.params.addAll(s),i=up.Params.stripURL(i),t.contains(n,r)||(r=up.protocol.wrapMethod(r,this.params)),this.Ot=e.affix(document.body,"form.up-request-loader",{method:r,action:i});let o,u,a=this.zt.contentType;a&&this.Ot.setAttribute("enctype",a),(o=this.zt.csrfParam())&&(u=this.zt.csrfToken())&&this.params.add(o,u),t.each(this.params.toArray(),this.Ut.bind(this)),up.browser.submitForm(this.Ot)}Ut(t){e.affix(this.Ot,"input[type=hidden]",t)}}},1589:function(){var t,e=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const n=up.util;up.Change.FromURL=(t=class FromURL extends up.Change{execute(){var t,i,r,s;return e(this,void 0,void 0,(function*(){let e=this.Vt();if(e)return up.puts("up.render()",e),up.network.loadPage(this.options),n.unresolvablePromise();let o=this.request=up.request(this.Kt());return null===(i=(t=this.options).onRequestKnown)||void 0===i||i.call(t,o),this.options.preload?o:(null===(s=(r=this.options).handleAbort)||void 0===s||s.call(r,o),o.runPreviews(this.options),yield n.always(o,(t=>this.Xt(t))))}))}Vt(){return n.isCrossOrigin(this.options.url)?"Loading cross-origin content in new page":this.options.history&&!up.browser.canPushState()?"Loading content in new page to restore history support":void 0}Kt(){const t=this.Wt(this.options),e=this.Wt(this.deriveFailOptions(),{optional:!0});return Object.assign(Object.assign(Object.assign({},this.options),t),n.withRenamedKeys(e,up.fragment.failKey))}getPreflightProps(){return this.Kt()}Wt(t,e){return new up.Change.FromContent(Object.assign(Object.assign({},t),{preflight:!0})).getPreflightProps(e)}Xt(t){return t instanceof up.Response?this.Gt(t):this.Jt(t)}Gt(t){return new up.Change.FromResponse(Object.assign(Object.assign({},this.options),{response:t})).execute()}Jt(t){throw t instanceof up.Offline&&this.request.emit("up:fragment:offline",{callback:this.options.onOffline,renderOptions:this.options,retry:t=>up.render(Object.assign(Object.assign({},this.options),t)),log:["Cannot load fragment from %s: %s",this.request.description,t.reason]}),t}},n.memoizeMethod(t.prototype,{Kt:!0}),t)},1739:()=>{const t=up.util;up.DestructorPass=class DestructorPass{constructor(t,e){this.Qt=t,this.R=e}run(){for(let e of this.Yt()){let n=t.pluckKey(e,"upDestructors");null==n||n.clean(e)}}Yt(){const t=Object.assign(Object.assign({},this.R),{destroying:!0});return up.fragment.subtree(this.Qt,".up-can-clean",t)}}},1915:()=>{up.form=function(){const t=up.util,e=up.element,n=new up.Config((()=>({groupSelectors:["[up-form-group]","fieldset","label","form"],fieldSelectors:["select","input:not([type=submit], [type=image], [type=button])","button[type]:not([type=submit], [type=button])","textarea"],submitSelectors:["form:is([up-submit], [up-target], [up-layer], [up-transition])"],noSubmitSelectors:["[up-submit=false]","[target]",e.crossOriginSelector("action")],submitButtonSelectors:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],genericButtonSelectors:["input[type=button]","button[type=button]"],validateBatch:!0,watchInputEvents:["input","change"],watchInputDelay:0,watchChangeEvents:["change"],watchableEvents:["input","change"],arrayParam:t=>t.endsWith("[]")})));function i(t=""){return n.fieldSelectors.map((e=>e+t)).join()}function r(t){return t.matches(i())}function s(n){n=e.get(n);let r=e.subtree(n,i());if(n.matches("form[id]")){const s=i(e.attrSelector("form",n.getAttribute("id"))),o=up.fragment.all(s,{layer:n});r=t.uniq([...r,...o])}return r}function o(t){return[...s(t),...u(t),...(i=t,e.subtree(i,n.selector("genericButtonSelectors")))];var i}function u(t){return e.subtree(t,c())}function a(t){return null==t?void 0:t.matches(c())}function c(){return n.selector("submitButtonSelectors")}const h=up.mockable(((t,e)=>up.render(l(t,e))));function l(e,n,i){e=_(e),n=t.options(n);let r=new up.OptionsParser(e,n,i);return r.include(m),r.string("failTarget",{default:up.fragment.tryToTarget(e)}),n.guardEvent||(n.guardEvent=up.event.build("up:form:submit",{submitButton:n.submitButton,log:"Submitting form",params:n.params,form:e})),n.origin||(n.origin=up.viewport.focusedElementWithin(e)||n.submitButton||e),n.activeElements=t.uniq([n.origin,n.submitButton,e].filter(t.isElement)),r.include(up.link.followOptions),n}function p(e,n,i={}){var r,s,o;n=t.options(n),null!==(r=i.closest)&&void 0!==r||(i.closest=!0),null!==(s=i.attrPrefix)&&void 0!==s||(i.attrPrefix="up-watch-");let u=new up.OptionsParser(e,n,i);u.include(up.status.statusOptions,i),u.string("event"),u.number("delay");let a=up.form.config;return"input"===n.event?(n.event=t.evalOption(a.watchInputEvents,e),null!==(o=n.delay)&&void 0!==o||(n.delay=a.watchInputDelay)):"change"===n.event&&(n.event=t.evalOption(a.watchChangeEvents,e)),n.origin||(n.origin=e),n}function f(t){if(t.disabled)return;let e;return document.activeElement===t?(e=y(t),t.disabled=!0,up.focus(e,{force:!0,preventScroll:!0})):t.disabled=!0,()=>{t.disabled=!1}}function d(e,n){let i=()=>k(n);return!0===e?[i()]:t.isElement(e)?[e]:t.isString(e)?up.fragment.subtree(i(),e,{origin:n}):t.isArray(e)?t.flatMap(e,(t=>d(t,n))):[]}function m(e,n,i){var r;n=t.options(n),e=_(e);const s=new up.OptionsParser(e,n,i);s.string("contentType",{attr:"enctype"}),s.json("headers");const o=up.Params.fromForm(e),a=null!==(r=n.submitButton)&&void 0!==r?r:n.submitButton=u(e)[0];return a&&(o.addField(a),n.method||(n.method=a.getAttribute("formmethod")),n.url||(n.url=a.getAttribute("formaction"))),n.params=up.Params.merge(o,n.params),s.string("url",{attr:"action",default:up.fragment.source(e)}),s.string("method",{attr:["up-method","data-method","method"],default:"GET",normalize:t.normalizeMethod}),"GET"===n.method&&(n.url=up.Params.stripURL(n.url)),n}function g(...e){let[n,i,r]=t.args(e,"val","options","callback");return n=up.element.get(n),r||(r=function(t){let e=t.getAttribute("up-watch");if(e)return up.NonceableCallback.fromString(e).toFunction("value","name","options").bind(t)}(n)||up.fail("No callback given for up.watch()")),new up.FieldWatcher(n,i,r).start()}function v(t,e={}){return g(t,Object.assign(Object.assign({logPrefix:"up.autosubmit()"},e),{batch:!0}),((e,n)=>h(t,n)))}function b(){var t,e;return(null===(e=(t=up.migrate).migratedFormGroupSelectors)||void 0===e?void 0:e.call(t))||n.groupSelectors}function y(t){return w(t).element}function w(e){return t.findResult(b(),(function(t){let n=e.closest(t);if(n){let i=up.fragment.tryToTarget(n,{strong:!0}),r=up.fragment.tryToTarget(e),s=i||r&&n!==e&&`${t}:has(${r})`;if(s)return{target:s,element:n,origin:e}}}))}function _(t,e={}){const n=up.fragment.get(t,e);return n.form||n.closest("form")}function O(t){return t.upFormValidator||(t.upFormValidator=function(t){const e=new up.FormValidator(t),n=e.start();return up.destructor(t,n),e}(t))}function k(t,e){return t?_(t,e)||up.layer.get(t).element:up.layer.current.element}return up.on("submit",n.selectorFn("submitSelectors"),(function(e,n){if(e.defaultPrevented)return;const i=t.presence(e.submitter,a);up.event.halt(e,{log:!0}),up.error.muteUncriticalRejection(h(n,{submitButton:i}))})),up.compiler("form",(function(t){O(t)})),up.compiler("[up-switch]",(t=>new up.Switcher(t).start())),up.attribute("up-watch",(t=>g(t))),up.attribute("up-autosubmit",(t=>v(t,{logPrefix:"[up-autosubmit]"}))),{config:n,submit:h,submitOptions:l,destinationOptions:m,watchOptions:p,validateOptions:function(e,i,r={}){i=t.options(i);let s=new up.OptionsParser(e,i,Object.assign(Object.assign({},r),{closest:!0,attrPrefix:"up-validate-"}));return s.string("url"),s.string("method",{normalize:t.normalizeMethod}),s.boolean("batch",{default:n.validateBatch}),s.json("params"),s.json("headers"),s.include(p,{defaults:{event:"change"}}),i},isSubmittable:function(t){return t=up.fragment.get(t),n.matches(t,"submitSelectors")},watch:g,validate:function(...e){let n=function(e,...n){const i=t.extractOptions(n);return i.origin?i.target||(i.target=up.fragment.toTarget(e)):i.origin||(i.origin=up.fragment.get(e)),i}(...e);return O(_(n.origin)).validate(n)},autosubmit:v,fieldSelector:i,fields:s,trackFields:function(...e){let[n,{guard:r},s]=t.args(e,"val","options","callback");return up.fragment.trackSelector(i(),{filter:function(e){let i=k(n);return t.filter(e,(function(t){return(n===i||n.contains(t))&&k(t)===i&&(!r||r(t))}))},live:!0},s)},isField:r,submitButtons:u,focusedField:function(){return t.presence(document.activeElement,r)},disableTemp:function(e){let n=o(e);return t.sequence(t.map(n,f))},setDisabled:function(t,e){for(let n of o(t))n.disabled=e},getDisablePreviewFn:function(t,e){return function(n){let i=d(t,e);for(let t of i)n.disable(t)}},group:y,groupSolution:w,groupSelectors:b,get:_,getRegion:k}}(),up.submit=up.form.submit,up.watch=up.form.watch,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate},2009:()=>{var t;up.Layer.Modal=((t=class Modal extends up.Layer.OverlayWithViewport{}).mode="modal",t)},2049:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const e=up.util,n=up.element;up.MotionController=class MotionController{constructor(t){this.Zt=`up-${t}`,this.te=`.${this.Zt}`,this.finishEvent=`up:${t}:finish`,this.finishCount=0,this.ee=0}startFunction(t,e,i={}){var r;t=n.list(t);const s=()=>up.error.muteUncriticalRejection(e());if(i.trackMotion=null!==(r=i.trackMotion)&&void 0!==r?r:up.motion.isEnabled(),!1===i.trackMotion)return s();{i.trackMotion=!1,this.finish(t),this.ne(t);let e=this.ie(t,s);return e=e.then((()=>this.re(t))),e}}finish(t){var e,n;if(this.finishCount++,0!==this.ee&&up.motion.isEnabled()){t=this.se(t);for(let e of t)this.oe(e);return null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.motion.finish()")}}se(t){return t?e.flatMap(t,(t=>n.list(t.closest(this.te),t.querySelectorAll(this.te)))):document.querySelectorAll(this.te)}isActive(t){return t.classList.contains(this.Zt)}oe(t){this.ue(t)}ue(t,e={}){return e=Object.assign({target:t,log:!1},e),up.emit(this.finishEvent,e)}ne(t){this.ee++,this.ae(t,!0)}re(t){this.ee--,this.ae(t,!1)}ae(t,e){for(let n of t)n.classList.toggle(this.Zt,e)}ie(t,e){if(t.length<2)return e();const n=up.on(t,this.finishEvent,(e=>{if(!e.forwarded)for(let n of t)n!==e.target&&this.isActive(n)&&this.ue(n,{forwarded:!0})}));return e().then(n)}reset(){return t(this,void 0,void 0,(function*(){yield this.finish(),this.finishCount=0,this.ee=0}))}}},2077:()=>{const t=up.element;up.ProgressBar=class ProgressBar{constructor(){this.ce=0,this.st=t.affix(document.body,"up-progress-bar"),this.st.style.transition="width 300ms ease-out",this.he(0),t.paint(this.st),this.le=31,this.pe()}pe(){let t;t=this.le<80?Math.random()<.15?7+5*Math.random():1.5+.5*Math.random():.13*(100-this.le)*Math.random(),this.he(this.le+t),this.ce++;const e=300+40*this.ce;this.timeout=setTimeout(this.pe.bind(this),e)}he(t){this.le=t,this.st.style.width=`${t}vw`}destroy(){clearTimeout(this.timeout),this.st.remove()}conclude(){clearTimeout(this.timeout),this.he(100),setTimeout(this.destroy.bind(this),300)}}},2084:()=>{up.Layer.OverlayWithViewport=class OverlayWithViewport extends up.Layer.Overlay{static getParentElement(){return document.body}createElements(){up.viewport.bodyShifter.raiseStack(),this.createElement(this.constructor.getParentElement()),this.backdrop&&this.createBackdropElement(this.element),this.createViewportElement(this.element),this.createBoxElement(this.viewportElement),this.createContentElement(this.boxElement)}onElementsRemoved(){up.viewport.bodyShifter.lowerStack()}sync(){this.isDetached()&&this.isOpen()&&this.constructor.getParentElement().appendChild(this.element)}}},2113:()=>{const t=up.util;up.Change.CloseLayer=class CloseLayer extends up.Change{constructor(t){var e,n;super(t),this.fe=t.verb,this.rt=up.layer.get(t),this.de=t.origin,this.me=t.value,this.ge=null===(e=t.preventable)||void 0===e||e,this.ve=t.response,this.be=null===(n=t.history)||void 0===n||n}execute(){if(!this.rt.isOpen())return;if(up.browser.assertConfirmed(this.options),this.ye().defaultPrevented&&this.ge)throw new up.Aborted("Close event was prevented");this.we(),up.fragment.abort({reason:"Layer is closing",layer:this.rt});const{parent:t}=this.rt;this.rt.peel(),this.rt.stack.remove(this.rt),this.be&&t.restoreHistory(),this.p(t),this.rt.teardownHandlers(),this.rt.destroyElements(this.options),this._e(t)}ye(){let e=this.rt.emit(this.Oe(`up:layer:${this.fe}`),{callback:this.rt.callback(`on${t.upperCaseFirst(this.fe)}`),log:[`Will ${this.fe} ${this.rt} with value %o`,this.me]});return this.me=e.value,e}we(){let t=this.Oe(`up:layer:${this.fe}ing`);this.rt.emit(t,{log:!1})}_e(e){const n=`${this.fe}ed`,i=t.upperCaseFirst(n);return this.rt.emit(this.Oe(`up:layer:${n}`),{baseLayer:e,callback:this.rt.callback(`on${i}`),ensureBubbles:!0,log:[`${i} ${this.rt} with value %o`,this.me]})}Oe(t){return up.event.build(t,{layer:this.rt,value:this.me,origin:this.de,response:this.ve})}p(t){var e;let n=this.rt.hasFocus();if(this.rt.overlayFocus.teardown(),null===(e=t.overlayFocus)||void 0===e||e.moveToFront(),n){let e=this.rt.origin||t.element;up.focus(e,{preventScroll:!0})}}}},2175:()=>{const t=up.util,e=up.element;up.CSSTransition=class CSSTransition{constructor(t,e,n){this.st=t,this.ke=e,this.Se=Object.keys(this.ke),this.Ee=n.finishEvent,this.xe=n.duration,this.je=n.easing,this.Ce=!1}start(){return 0===this.Se.length?(this.Ce=!0,Promise.resolve()):(this.Fe=t.newDeferred(),this.Te(),this.Re=new Date,this.Le(),this.Pe(),this.Ae(),this.De(),this.Fe)}Pe(){this.Ee&&(this.$e=up.on(this.st,this.Ee,this.Me.bind(this)))}Me(t){t.stopPropagation(),this.l()}Le(){this.He=t.timer(this.xe+100,(()=>this.l()))}Ne(){clearTimeout(this.He)}Ae(){this.Be=up.on(this.st,"transitionend",this.qe.bind(this))}qe(e){if(e.target!==this.st)return;if(new Date-this.Re<=.25*this.xe)return;const n=e.propertyName;t.contains(this.Se,n)&&this.l()}l(){var t,n;this.Ce||(this.Ce=!0,this.Ne(),null===(t=this.$e)||void 0===t||t.call(this),null===(n=this.Be)||void 0===n||n.call(this),e.concludeCSSTransition(this.st),this.Ie(),this.Fe.resolve())}Te(){const t=e.style(this.st,["transition-property","transition-duration","transition-delay","transition-timing-function"]);if(e.hasCSSTransition(t)){if("all"!==t["transition-property"]){const n=t["transition-property"].split(/\s*,\s*/),i=e.style(this.st,n);this.ze=e.setStyleTemp(this.st,i)}this.Ue=e.concludeCSSTransition(this.st)}}Ie(){var t,e;null===(t=this.ze)||void 0===t||t.call(this),null===(e=this.Ue)||void 0===e||e.call(this)}De(){e.setStyle(this.st,{"transition-property":this.Se.join(),"transition-duration":`${this.xe}ms`,"transition-timing-function":this.je}),e.setStyle(this.st,this.ke)}}},2208:()=>{},2459:()=>{const t=up.util;up.FragmentProcessor=class FragmentProcessor extends up.Record{keys(){return["fragment","autoMeans","origin","layer"]}process(t){let e=this.preprocess(t);return this.tryProcess(e)}preprocess(e){return t.getComplexTokens(e)}tryProcess(e){if(t.isArray(e))return this.processArray(e);if(t.isFunction(e)){let t=up.error.guard(e,this.fragment,this.attributes());return this.tryProcess(t)}if(t.isElement(e))return this.processElement(e);if(t.isString(e)){if("auto"===e)return this.tryProcess(this.autoMeans);let t=e.match(/^(.+?)-if-(.+?)$/);if(t)return this.resolveCondition(t[2])&&this.process(t[1])}return this.processPrimitive(e)}processArray(e){return t.find(e,(t=>this.tryProcess(t)))}resolveCondition(t){if("main"===t)return this.fragment&&up.fragment.contains(this.fragment,":main")}findSelector(t){const e={layer:this.layer,origin:this.origin};let n=this.fragment&&up.fragment.get(this.fragment,t,e)||up.fragment.get(t,e);if(n)return n;up.warn("up.render()",'Could not find an element matching "%s"',t)}}},2487:()=>{up.Error=class Error extends window.Error{constructor(t,e={}){Array.isArray(t)&&(t=up.util.sprintf(...t)),super(t);let n="up."+this.constructor.name;Object.assign(this,{name:n},e)}}},2679:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};up.motion=function(){const e=up.util,n=up.element,i=new up.MotionController("motion"),r=new up.Config((()=>({duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches})));let s=new up.Registry("animation",f),o=new up.Registry("transition",l);function u(){return r.enabled}function a(t,e,i){return h(i),u()&&!m(e)&&i.duration>0&&!n.isSingleton(t)}function c(t,e,n){return up.migrate.loaded&&(e=up.migrate.fixSetStyleProps(e)),n=Object.assign(Object.assign({},n),{finishEvent:i.finishEvent}),new up.CSSTransition(t,e,n).start()}function h(t){var e,n;null!==(e=t.easing)&&void 0!==e||(t.easing=r.easing),null!==(n=t.duration)&&void 0!==n||(t.duration=r.duration)}function l(t){return m(t)?void 0:e.isFunction(t)?t:e.isArray(t)?p(...t):e.isString(t)&&t.includes("/")?p(...t.split("/")):o.get(t)}function p(t,n){if(!m(t)&&!m(n)){const i=f(t)||e.asyncNoop,r=f(n)||e.asyncNoop;return(t,e,n)=>Promise.all([i(t,n),r(e,n)])}}function f(t){return m(t)?void 0:e.isFunction(t)?t:e.isOptions(t)?(e,n)=>c(e,t,n):s.get(t)}const d=up.mockable((function(t,e){t.replaceWith(e)}));function m(t){return!t||"none"===t}function g(t,e,n){s.put(t,(function(t,i){return t.style.opacity=e,c(t,{opacity:n},i)}))}function v(t,e){return{transform:`translate(${t}px, ${e}px)`}}function b(t){return n.setStyle(t,{transform:""}),t.getBoundingClientRect()}function y(t,e){const i=`move-to-${t}`,r=`move-from-${t}`;s.put(i,(function(t,n){const i=b(t);return c(t,e(i),n)})),s.put(r,(function(t,i){const r=b(t),s=e(r);return n.setStyle(t,s),c(t,{transform:""},i)}))}return up.on("up:framework:boot",(function(){u()||up.puts("up.motion","Animations are disabled")})),g("fade-in",0,1),g("fade-out",1,0),y("top",(function(t){return v(0,-(t.top+t.height))})),y("bottom",(function(t){return v(0,up.viewport.rootHeight()-t.top)})),y("left",(function(t){return v(-(t.left+t.width),0)})),y("right",(function(t){return v(up.viewport.rootWidth()-t.left,0)})),o.put("cross-fade",["fade-out","fade-in"]),o.put("move-left",["move-to-left","move-from-right"]),o.put("move-right",["move-to-right","move-from-left"]),o.put("move-up",["move-to-top","move-from-bottom"]),o.put("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:reset",(function(){i.reset()})),{morph:function(r,s,o,u){h(u=e.options(u)),r=up.fragment.get(r),s=up.fragment.get(s);let c=l(o);const p=a(r,c,u);c=up.error.guardFn(c);const f=e.pluckKey(u,"beforeStart")||e.noop,m=e.pluckKey(u,"afterInsert")||e.noop,g=e.pluckKey(u,"beforeDetach")||e.noop,v=e.pluckKey(u,"afterDetach")||e.noop,b=e.pluckKey(u,"scrollNew")||e.noop;if(f(),p){if(i.isActive(r)&&!1===u.trackMotion)return c(r,s,u);up.puts("up.morph()","Morphing %o to %o with transition %O over %d ms",r,s,o,u.duration);const e=up.viewport.get(r),a=e.scrollTop,h=up.viewport.absolutize(r,{afterMeasure(){n.insertBefore(r,s),m()}}),l=function(){return t(this,void 0,void 0,(function*(){b();const t=e.scrollTop;h.moveBounds(0,t-a),yield c(r,s,u),g(),h.bounds.remove(),v()}))};return i.startFunction([r,s],l,u)}return g(),d(r,s),m(),v(),b(),Promise.resolve()},animate:function(t,r,s){t=up.fragment.get(t),s=e.options(s);let o=f(r);const u=a(t,r,s);if(o=up.error.guardFn(o),u){const e=()=>o(t,s);return i.startFunction(t,e,s)}return function(t,i){return e.isOptions(i)&&n.setStyle(t,i),Promise.resolve()}(t,r)},finish:function(t){return i.finish(t)},finishCount:()=>i.finishCount,transition:o.put,animation:s.put,config:r,isEnabled:u,isNone:m,willAnimate:a,swapElementsDirectly:d,motionOptions:function(t,n,i){n=e.options(n);let r=new up.OptionsParser(t,n,i);return r.booleanOrString("animation"),r.booleanOrString("transition"),r.string("easing"),r.number("duration"),n}}}(),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate},2771:()=>{up.status=function(){const t=up.util,e=up.element,n=new up.Config((()=>({currentClasses:["up-current"],activeClasses:["up-active"],loadingClasses:["up-loading"],navSelectors:["[up-nav]","nav"],noNavSelectors:["[up-nav=false]"]})));let i=new up.Registry("preview");const r="a, [up-href]";function s(t){return t.upCurrentURLs||(t.upCurrentURLs=new up.LinkCurrentURLs(t))}function o(i,r,{newLinks:o,anyLocationChanged:u}){let c=!u&&i.upNavLocations||function(n){let i=e.attr(n,"up-layer")||"origin",r=up.layer.getAll(i,{origin:n});return t.compact(r.map(a))}(i);if(o||!t.isEqual(i.upNavLocations,c)){for(let t of r){const i=s(t).isAnyCurrent(c);for(let e of n.currentClasses)t.classList.toggle(e,i);e.setAttrPresence(t,"aria-current","page",i)}i.upNavLocations=c}}function u(t,i){const s=n.selector("navSelectors"),u=e.around(t,s);for(let t of u)o(t,e.subtree(t,r),i)}function a(e){return t.matchableURL(e.location)}function c(t){return e.ancestor(t,r)||t}function h(t){if(t)return function(e){e.showPlaceholder(t)}}function l(e){return t.isFunction(e)?[e]:t.isString(e)?(n=e,t.map(t.parseScalarJSONPairs(n),(([t,e])=>{let n=i.get(t);return function(i,r){return up.puts("[up-preview]","Showing preview %o",t),n(i,e||r)}}))):t.isArray(e)?e.flatMap(l):[];var n}return up.on("up:fragment:compile",((t,e)=>{u(e,{newLinks:!0,anyLocationChanged:!1})})),up.on("up:layer:location:changed up:layer:opened up:layer:dismissed up:layer:accepted",(()=>{u(document.body,{newLinks:!1,anyLocationChanged:!0})})),{config:n,preview:i.put,resolvePreviewFns:l,runPreviews:function(i,r){let{bindLayer:s}=i,o=up.FocusCapsule.preserve(s),u=s.asCurrent((()=>function(i,r){let{fragment:s,fragments:o,origin:u}=i,a=t.cleaner(),p=t=>new up.Preview({fragment:t,request:i,renderOptions:r,cleaner:a}),f=p(s);f.run(l(r.preview)),f.run(h(r.placeholder)),f.run(function(e,i){if(e)return function(e){e.addClassBatch(function({origin:e,activeElements:n}){return n||(n=t.wrapList(e)),n.map(c)}(e.renderOptions),n.activeClasses),e.addClassBatch(i,n.loadingClasses)}}(r.feedback,o)),f.run(up.form.getDisablePreviewFn(r.disable,u));for(let t of o){let n=p(t);n.run(e.matchSelectorMap(r.previewMap,t)),n.run(e.matchSelectorMap(r.placeholderMap,t).flatMap(h))}return a.clean}(i,r)));return null==o||o.autoVoid(),()=>{s.asCurrent(u),null==o||o.restore(s,{preventScroll:!0})}},statusOptions:function(e,n,i){n=t.options(n);const r=new up.OptionsParser(e,n,i);return r.booleanOrString("disable"),r.boolean("feedback"),r.string("preview"),r.booleanOrString("revalidatePreview"),r.string("placeholder"),n}}}(),up.preview=up.status.preview},3106:()=>{up.script=function(){const t=up.util,e=up.element,n=new up.Config((()=>({assetSelectors:["link[rel=stylesheet]","script[src]","[up-asset]"],noAssetSelectors:["[up-asset=false]"],nonceableAttributes:["up-watch","up-on-keep","up-on-hungry","up-on-opened","up-on-accepted","up-on-dismissed","up-on-loaded","up-on-rendered","up-on-finished","up-on-error","up-on-offline"],scriptSelectors:["script:not([type])",'script[type="text/javascript"]','script[type="module"]','script[type="importmap"]'],noScriptSelectors:['script[type="application/ld+json"]']}))),i={"[up-back]":-100,"[up-clickable]":-200,"[up-drawer]":-200,"[up-modal]":-200,"[up-cover]":-200,"[up-popup]":-200,"[up-tooltip]":-200,"[up-dash]":-200,"[up-flashes]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400,"[up-keep]":9999999999};let r=[],s=[];function o(e,n={}){let o=function(e,n){let[i,r,s]=u(e);return r=t.options(r,{selector:i,isDefault:up.framework.evaling,priority:0,batch:!1}),Object.assign(s,r,n)}(e,n);o.macro?(up.framework.evaling&&(o.priority||(o.priority=function(e){e=t.evalOption(e);for(let t in i)if(e.indexOf(t)>=0)return i[t];up.fail("Unregistered priority for system macro %o",e)}(o.selector))),a(s,o)):a(r,o)}const u=function(e){return t.args(e,"val","options","callback")};function a(t,e){let n,i=0;for(;(n=t[i])&&n.priority>=e.priority;)i+=1;if(t.splice(i,0,e),up.framework.booted)if(0===e.priority)for(let t of up.layer.stack)c(t.element,{layer:t,compilers:[e]});else up.puts("up.compiler()","Compiler %s was registered after booting Unpoly. Compiler will run for future fragments only.",e.selector);return e}function c(t,e){up.emit(t,"up:fragment:compile",{log:!1});let n=e.compilers||s.concat(r);new up.CompilerPass(t,n,e).run()}function h(t=document.head){return t.querySelectorAll(n.selector("assetSelectors"))}function l(t,i=""){let r=n.selector("scriptSelectors")+i;return e.subtree(t,r)}return up.on("up:framework:reset",(function(){r=t.filter(r,"isDefault"),s=t.filter(s,"isDefault")})),{config:n,compiler:function(...t){o(t)},macro:function(...t){o(t,{macro:!0})},attrCompiler:function(...n){let[i,r,s]=u(n),a=`[${i}]`,{defaultValue:c}=r;o([a,r,n=>{let r=e.booleanOrStringAttr(n,i);if(!1!==r)return t.isDefined(c)&&!0===r&&(r=c),s(n,r)}])},destructor:function(n,i){let r=t.scanFunctions(i);r.length&&(n.upDestructors||(n.upDestructors=function(n){let i=t.cleaner();return i(e.addClassTemp(n,"up-can-clean")),i}(n))).guard(r)},hello:function(t,e={}){return t=up.fragment.get(t,e),up.puts("up.hello()","Compiling fragment %o",t),c(t,e),up.fragment.emitInserted(t),t},clean:function(t,e={}){new up.DestructorPass(t,e).run()},data:function(n){return(n=up.fragment.get(n)).upData||(n.upData=function(n){var i;let r=null!==(i=e.jsonAttr(n,"up-data"))&&void 0!==i?i:{};return t.isOptions(r)?Object.assign(Object.assign(Object.assign(Object.assign({},n.upTemplateData),n.dataset),r),n.upCompileData):r}(n))},findAssets:h,assertAssetsOK:function(e,n){let i=h();t.map(i,"outerHTML").join()!==t.map(e,"outerHTML").join()&&up.event.assertEmitted("up:assets:changed",{oldAssets:i,newAssets:e,renderOptions:n})},disableSubtree:function(t,e=()=>!0){for(let n of l(t))e(n)&&(n.type="up-disabled-script")},adoptNoncesInSubtree:function(t,i){let r=up.protocol.cspNonce();if((null==i?void 0:i.length)&&r){for(let e of l(t,"[nonce]"))i.includes(e.nonce)&&(e.nonce=r);for(let s of n.nonceableAttributes){let n=e.subtree(t,`[${s}^="nonce-"]`);for(let t of n){let e=t.getAttribute(s),n=up.NonceableCallback.fromString(e);i.includes(n.nonce)&&(n.nonce=r,t.setAttribute(s,n.toString()))}}}},isScript:function(t){return n.matches(t,"scriptSelectors")}}}(),up.compiler=up.script.compiler,up.destructor=up.script.destructor,up.macro=up.script.macro,up.data=up.script.data,up.hello=up.script.hello,up.attribute=up.script.attrCompiler},3126:()=>{var t;const e=up.element;up.Layer.Root=((t=class Root extends up.Layer{get element(){return e.root}constructor(t){super(t),this.setupHandlers()}getFirstSwappableElement(){return document.body}static selector(){return"html"}setupHandlers(){this.element.upHandlersApplied||(this.element.upHandlersApplied=!0,super.setupHandlers())}sync(){this.setupHandlers()}accept(){this.Ve()}dismiss(){this.Ve()}Ve(){up.fail("Cannot close the root layer")}toString(){return"root layer"}}).mode="root",t)},3194:()=>{up.radio=function(){const t=up.element,e=new up.Config((()=>({hungrySelectors:["[up-hungry]"],noHungrySelectors:["[up-hungry=false]"],pollInterval:3e4})));return up.attribute("up-poll",(function(t){up.FragmentPolling.forFragment(t).onPollAttributeObserved()})),up.macro("[up-flashes]",(function(e){t.setMissingAttrs(e,{"up-hungry":"","up-if-layer":"subtree","up-keep":"",role:"alert"}),e.addEventListener("up:fragment:keep",(function(e){t.isEmpty(e.newFragment)||e.preventDefault()}))})),{config:e,hungrySteps:function(n){let{hungry:i,origin:r,layer:s,meta:o}=n,u={current:[],other:[]};if(!i)return u;let a=e.selector("hungrySelectors");const c=[s,...s.ancestors,...s.descendants];for(let e of c){let i=up.fragment.all(e.element,a,{layer:e});for(let a of i){let i=up.fragment.tryToTarget(a,{origin:r});if(!i){up.warn("[up-hungry]","Ignoring untargetable fragment %o",a);continue}let c=t.attr(a,"up-if-layer"),h=c?up.layer.getAll(c,{baseLayer:e}):[e],l=up.motion.motionOptions(a),p=up.event.build("up:fragment:hungry",{log:!1}),f=t.callbackAttr(a,"up-on-hungry",{exposedKeys:["newFragment","renderOptions"]}),d=Object.assign(Object.assign({selector:i,oldElement:a,layer:e,origin:r},l),{placement:"swap",keep:!0,maybe:!0,meta:o,selectEvent:p,selectCallback:f,originalRenderOptions:n});h.includes(s)&&(s===e?u.current:u.other).push(d)}}return u.other=up.fragment.compressNestedSteps(u.other),u},startPolling:function(t,e={}){up.FragmentPolling.forFragment(t).forceStart(e)},stopPolling:function(t){up.FragmentPolling.forFragment(t).forceStop()},pollOptions:function(t,n={}){const i=new up.OptionsParser(t,n,{defaults:{background:!0}});return i.number("interval",{default:e.pollInterval}),i.string("ifLayer",{default:"front"}),i.include(up.link.requestOptions),i.include(up.status.statusOptions),n}}}()},3278:()=>{},3383:()=>{var t;up.Layer.Cover=((t=class Cover extends up.Layer.OverlayWithViewport{}).mode="cover",t)},3394:()=>{up.Rect=class Rect extends up.Record{keys(){return["left","top","width","height"]}get bottom(){return this.top+this.height}get right(){return this.left+this.width}grow(t){this.left-=t,this.top-=t,this.width+=2*t,this.height+=2*t}static fromElement(t){return new this(t.getBoundingClientRect())}}},3441:()=>{const t=up.util;up.EventListenerGroup=class EventListenerGroup extends up.Record{keys(){return["elements","eventTypes","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}bind(){const e=t.cleaner();return this.Ke((function(t){const n=new up.EventListener(t);return n.bind(),e(n.unbind.bind(n))})),e.clean}Ke(t){for(let e of this.elements)for(let n of this.eventTypes)t(this.Xe(e,n))}Xe(t,e){return Object.assign(Object.assign({},this.attributes()),{element:t,eventType:e})}unbind(){this.Ke((function(t){let e=up.EventListener.fromElement(t);e&&e.unbind()}))}static fromBindArgs(e,n){const i=(e=t.copy(e)).pop();let r;r=e[0].addEventListener?[e.shift()]:t.isJQuery(e[0])||t.isList(e[0])&&e[0][0].addEventListener?e.shift():[document];let s=t.getSimpleTokens(e.shift()),o=up.migrate.fixEventTypes;o&&(s=o(s));const u=t.extractOptions(e),a=e[0];return new this(Object.assign(Object.assign({elements:r,eventTypes:s,selector:a,callback:i},u),n))}}},3526:()=>{const t=up.util,e=up.element;up.Config=class Config{constructor(t=()=>({})){this.We=t,this.reset(),document.addEventListener("up:framework:reset",(()=>this.reset()))}reset(){Object.assign(this,this.We())}matches(t,e){return t.matches(this.selector(e))}selector(n){let i=this[n],r=this["no"+t.upperCaseFirst(n)];return e.unionSelector(i,r)}selectorFn(t){return()=>this.selector(t)}}},3530:()=>{const t=up.util;up.URLPattern=class URLPattern{constructor(e){this.Ge=[];const n=[],i=[];for(let r of t.getSimpleTokens(e))"-"===r[0]?i.push(r.substring(1)):n.push(r);this.Je=this.Qe(n,!0),this.Ye=this.Qe(i,!1)}Qe(e,n){if(!e.length)return;let i=(e=(e=t.flatMap(e,t.matchableURLPatternAtom)).map(t.escapeRegExp)).join("|");return i=i.replace(/\\\*/g,".*?"),i=i.replace(/(:|\\\$)([a-z][\w-]*)/gi,((t,e,i)=>"\\$"===e?(n&&this.Ge.push({name:i,cast:Number}),"(\\d+)"):(n&&this.Ge.push({name:i,cast:String}),"([^/?#]+)"))),new RegExp("^(?:"+i+")$")}test(e,n=!0){return n&&(e=t.matchableURL(e)),this.Je.test(e)&&!this.Ze(e)}recognize(e,n=!0){n&&(e=t.matchableURL(e));let i=this.Je.exec(e);if(i&&!this.Ze(e)){const t={};return this.Ge.forEach(((e,n)=>{let r=i[n+1];if(r)return t[e.name]=e.cast(r)})),t}}Ze(t){var e;return null===(e=this.Ye)||void 0===e?void 0:e.test(t)}}},3728:()=>{const t=up.element;up.FragmentPolling=class FragmentPolling{constructor(t){this.R=up.radio.pollOptions(t),this.Qt=t,up.destructor(t,this.tn.bind(this)),up.fragment.onAborted(t,this.en.bind(this)),this.nn="initialized",this.rn=!0,this.sn=!1,this.un()}static forFragment(t){return t.upPolling||(t.upPolling=new this(t))}onPollAttributeObserved(){this.an()}tn(){this.cn()}an(t){if(Object.assign(this.R,t),"started"!==this.nn){if(!up.fragment.isTargetable(this.Qt))return void up.warn("[up-poll]","Cannot poll untargetable fragment %o",this.Qt);this.nn="started",this.hn(),this.ln()}}cn(){var t;"started"===this.nn&&(this.pn(),this.nn="stopped",null===(t=this.fn)||void 0===t||t.call(this))}forceStart(t){Object.assign(this.R,t),this.forceStarted=!0,this.an()}forceStop(){this.cn(),this.forceStarted=!1}hn(){this.fn||(this.fn=up.on("visibilitychange up:layer:opened up:layer:dismissed up:layer:accepted",this.dn.bind(this)))}dn(){this.mn()&&this.ln()}mn(){return!document.hidden&&("any"===this.R.ifLayer||this.gn())}pn(){clearTimeout(this.vn),this.vn=null}ln(){this.vn||this.sn||(this.pn(),this.vn=setTimeout(this.bn.bind(this),this.yn()))}bn(){this.vn=null,this.wn()}wn(){if("started"===this.nn)return up.fragment.isAlive(this.Qt)?void(this.mn()?this._n():up.puts("[up-poll]","Will not poll hidden fragment")):(this.cn(),void up.puts("[up-poll]","Stopped polling a detached fragment"))}On(){var e,n;return null!==(n=null!==(e=this.R.interval)&&void 0!==e?e:t.numberAttr(this.Qt,"up-interval"))&&void 0!==n?n:up.radio.config.pollInterval}yn(){return Math.max(this.On()-this.kn(),0)}kn(){return new Date-this.Sn}gn(){var t,e;return this.layer||(this.layer=up.layer.get(this.Qt)),null===(e=null===(t=this.layer)||void 0===t?void 0:t.isFront)||void 0===e?void 0:e.call(t)}_n(){this.pn();let t=this.rn;try{this.rn=!1,this.sn=!0,up.reload(this.Qt,this.En()).then(this.xn.bind(this),this.jn.bind(this))}finally{this.rn=t}}En(){let t=up.event.build("up:fragment:poll",{log:["Polling fragment",this.Qt]});return Object.assign(Object.assign({},this.R),{guardEvent:t})}en({newLayer:t}){this.rn&&!t&&this.cn()}xn({fragment:t}){this.sn=!1,this.un(),t?this.Cn(t):this.ln()}Cn(t){this.cn(),this.forceStarted&&up.fragment.matches(this.Qt,t)&&this.constructor.forFragment(t).forceStart(this.R)}jn(t){this.sn=!1,this.un(),this.ln(),up.error.throwCritical(t)}un(){this.Sn=new Date}}},3889:()=>{up.util=function(){function t(){}function e(t,e){e=P(e,{host:"cross-domain"});const n=o(t);let i="";"cross-domain"===e.host&&(e.host=s(n)),e.host&&(i+=n.protocol+"//"+n.host);let{pathname:r}=n;return!1===e.trailingSlash&&"/"!==r&&(r=r.replace(/\/$/,"")),i+=r,!1!==e.search&&(i+=n.search),!1!==e.hash&&(i+=n.hash),i}function n(t,n){if(t)return e(t,Object.assign({hash:!1,trailingSlash:!1},n))}const i=location.protocol,r=location.hostname;function s(t){if(w(t)&&-1===t.indexOf("//"))return!1;const e=o(t);return r!==e.hostname||i!==e.protocol}function o(t){if(t.pathname)return t;let e=document.createElement("a");return e.href=t,e}function u(t){return w(t)?e=>e[t]:t}function a(t,e){if(0===t.length)return[];e=u(e);let n=[],i=0;for(let r of t)n.push(e(r,i++));return n}function c(t,e){return Object.fromEntries(t.map(e))}function h(t,e){let n=0;for(let i of t)e(i,n++)}function l(t){return null===t}function p(t){return!!t}function f(t){return void 0===t}const d=it(f);function m(t){return f(t)||l(t)}const g=it(m);function v(t){return!!m(t)||(k(t)&&t[v.key]?t[v.key]():w(t)||C(t)?0===t.length:!!O(t)&&0===Object.keys(t).length)}v.key="up.util.isBlank";const b=it(v);function y(t){return"function"==typeof t}function w(t){return"string"==typeof t||t instanceof String}function _(t){return"number"==typeof t||t instanceof Number}function O(t){return"object"==typeof t&&!l(t)&&(f(t.constructor)||t.constructor===Object)}function k(t){const e=typeof t;return"object"===e&&!l(t)||"function"===e}function S(t){return t instanceof Element}function E(t){return t instanceof RegExp}function x(t){return up.browser.canJQuery()&&t instanceof jQuery}const{isArray:j}=Array;function C(t){return j(t)||function(t){return t instanceof NodeList}(t)||function(t){return"[object Arguments]"===Object.prototype.toString.call(t)}(t)||x(t)||function(t){return t instanceof HTMLCollection}(t)}function F(t){return C(t)?t:m(t)?[]:[t]}function T(t){return k(t)&&t[T.key]?t=t[T.key]():C(t)?t=R(t):O(t)&&(t=Object.assign({},t)),t}function R(t){return Array.prototype.slice.call(t)}function L(...t){return Object.assign({},...t)}function P(t,e){return e?L(e,t):t?T(t):{}}function A(t,e){e=u(e);let n=0;for(let i of t){const t=e(i,n++);if(t)return t}}function D(t,e){e=u(e);let n=!0,i=0;for(let r of t)if(!e(r,i++)){n=!1;break}return n}function $(t,e){e=u(e);const n=[];return h(t,(function(t,i){if(e(t,i))return n.push(t)})),n}function M(t){return t[t.length-1]}function H(t,e){return(t.indexOf||Array.prototype.indexOf).call(t,e)>=0}function N(t,e){const n={};for(let i of e)i in t&&(n[i]=t[i]);return n}function B(t,e){e=u(e);const n={};for(let i in t)e(t[i],i)&&(n[i]=t[i]);return n}function q(t,...e){return y(t)?t(...e):t}T.key="up.util.copy",Date.prototype[T.key]=function(){return new Date(+this)};const I={"&":"&","<":"<",">":">",'"':""","'":"'"};function z(t,e){const n=t[e];return delete t[e],n}function U(t,e){if(e(M(t)))return t.pop()}function V(t){return U(t,y)}function K(t){return U(t,O)||{}}function X(t){return t}function W(t){const e=[];for(let n of t)C(n)?e.push(...n):e.push(n);return e}function G(t,e){return t===e||((null==t?void 0:t.valueOf)&&(t=t.valueOf()),(null==e?void 0:e.valueOf)&&(e=e.valueOf()),t===e||typeof t==typeof e&&(C(t)&&C(e)?J(t,e):k(t)&&t[G.key]?t[G.key](e):!(!O(t)||!O(e))&&function(t,e){const n=Object.keys(t);return J(n,Object.keys(e))&&D(n,(n=>G(t[n],e[n])))}(t,e)))}function J(t,e){return t.length===e.length&&D(t,((t,n)=>G(t,e[n])))}function Q(t,e){var n,i;return((null===(i=(n=up.migrate).splitAtOr)||void 0===i?void 0:i.call(n,t))||t.split(e)).map((t=>t.trim())).filter(X)}function Y(t){let{masked:e,restore:n}=lt(t);return{maskedTokens:Q(e,","),restore:n}}G.key="up.util.isEqual";let Z=0;function tt(t,e,n){for(let i of e)Object.defineProperty(t,i,{get(){const t=n.call(this);let e=t[i];return y(e)&&(e=e.bind(t)),e},set(t){n.call(this)[i]=t}})}function et(t,e="%o"){let n;if("%c"===e)return"";if("%s"===e&&g(t)&&(t=t.toString()),w(t))n=t.trim().replace(/[\n\r\t ]+/g," "),"%o"===e&&(n=JSON.stringify(n));else if(f(t))n="undefined";else if(_(t)||y(t))n=t.toString();else if(j(t))n=`[${a(t,et).join(", ")}]`;else if(x(t))n=`$(${a(t,et).join(", ")})`;else if(S(t)){n=`<${t.tagName.toLowerCase()}`;for(let e of["id","up-id","name","class"]){let i=t.getAttribute(e);i&&(n+=` ${e}="${i}"`)}n+=">"}else if(E(t)||t instanceof Error)n=t.toString();else try{n=JSON.stringify(t)}catch(t){if("TypeError"!==t.name)throw t;n="(circular structure)"}return n.length>200&&(n=`${n.substr(0,200)}…${M(n)}`),n}const nt=/%[oOdisfc]/g;function it(t){return function(...e){return!t(...e)}}function rt(t){if(t.error)throw t.error;return t.value}function st(t,e,n){try{return{value:t.apply(e,n)}}catch(t){return{error:t}}}function ot(t,...e){let n=[];for(;e.length;){let i=e.pop();if("options"===i)n.unshift(K(t));else if("callback"===i)n.unshift(V(t));else if("val"===i)n.unshift(t.pop());else if(y(i)){let e=i(M(t))?t.pop():void 0;n.unshift(e)}}return n}function ut(...t){return t.flat().filter(y)}function at(t,e,{keepDelimiters:n=!1}={}){let i=0,r=/§\d+/g,s={},o=[],u=(e,r)=>{let u=!1;t=t.replaceAll(e,(function(t){u=!0;let e,r,o="§"+i++;if(n){let n=t[0],i=t.slice(-1);r=t.slice(1,-1),e=n+o+i}else r=t,e=o;return s[o]=r,e})),u&&o.unshift({allowRestoreTransform:r})};u(r,!1);for(let t of e)u(t,!0);return{masked:t,restore:(t,e=X)=>{for(let{allowRestoreTransform:n}of o){let i=n?e:X;t=t.replace(r,(t=>i(dt(s[t],w))))}return t}}}const ct=/'(?:\\\\|\\'|[^'])*'|"(?:\\\\|\\"|[^"])*"/g,ht=/{(?:[^{}]|{[^{}]*})*}|\((?:[^\(\)]|\([^\(\)]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\]/g;function lt(t){return at(t,[ct,ht],{keepDelimiters:!0})}function pt(t){return'"'===t[0]?t:(dt("'"===t[0]),'"'+(t=t.slice(1,-1)).replace(/(\\\\)|(\\')|(\\")|(")/g,(function(t,e,n,i){return e||n&&"'"||'\\"'}))+'"')}function ft(t){let{masked:e,restore:n}=at(t,[ct]);return e=e.replace(/([a-z_$][\w$]*:)/gi,(t=>'"'+t.slice(0,-1)+'":')),e=e.replace(/,\s*([}\]])/g,"$1"),e=n(e,pt),JSON.parse(e)}function dt(t,e=p){if(e(t))return t;throw"assert failed"}return{parseURL:o,normalizeURL:e,matchableURL:n,matchableURLPatternAtom:function(t){return t.endsWith("/")?[t,t.slice(0,-1)]:t.includes("/?")?[t,t.replace("/?","?")]:t.endsWith("/*")?[t,t.slice(0,-2),t.slice(0,-2)+"?*"]:t},matchURLs:function(t,e,i){return n(t,i)===n(e,i)},normalizeMethod:function(t){return t?t.toUpperCase():"GET"},methodAllowsPayload:function(t){return"GET"!==t&&"HEAD"!==t},copy:T,merge:L,mergeDefined:function(...t){const e={};for(let n of t)if(n)for(let t in n){const i=n[t];d(i)&&(e[t]=i)}return e},options:P,parseArgIntoOptions:function(t,e){let[n,i]=ot(t,"val","options");return d(n)&&(i[e]=n),i},each:h,map:a,flatMap:function(t,e){return W(a(t,e))},mapObject:c,spanObject:function(t,e){return c(t,(t=>[t,e]))},findResult:A,some:function(t,e){return!!A(t,e)},every:D,find:function(t,e){let n;e=u(e);for(let i of t)if(e(i)){n=i;break}return n},filter:$,reject:function(t,e){return $(t,e=it(u(e)))},intersect:function(t,e){return $(t,(t=>H(e,t)))},compact:function(t){return $(t,g)},compactObject:function(t){return B(t,g)},uniq:function(t){return t.length<2?t:Array.from(new Set(t))},uniqBy:function(t,e){if(t.length<2)return t;e=u(e);const n=new Set;return $(t,(function(t,i){const r=e(t,i);return!n.has(r)&&(n.add(r),!0)}))},last:M,isNull:l,isDefined:d,isUndefined:f,isGiven:g,isMissing:m,isPresent:b,isBlank:v,presence:function(t,e=b){if(e(t))return t},isObject:k,isFunction:y,isString:w,isBoolean:function(t){return"boolean"==typeof t||t instanceof Boolean},isNumber:_,isElement:S,isTextNode:function(t){return t instanceof Text},isJQuery:x,isElementLike:function(t){var e;return!(!t||!(t.addEventListener||x(t)&&(null===(e=t[0])||void 0===e?void 0:e.addEventListener)))},isPromise:function(t){return k(t)&&y(t.then)},isOptions:O,isArray:j,isFormData:function(t){return t instanceof FormData},isList:C,isRegExp:E,isAdjacentPosition:function(t){return/^(before|after)/.test(t)},timer:function(t,e){return setTimeout(e,t)},contains:H,containsAll:function(t,e){return D(e,(e=>H(t,e)))},objectContains:function(t,e){return G(e,N(t,Object.keys(e)))},toArray:function(t){return j(t)?t:R(t)},pick:N,pickBy:B,omit:function(t,e){return B(t,((t,n)=>!H(e,n)))},unresolvablePromise:function(){return new Promise(t)},remove:function(t,e){const n=t.indexOf(e);if(n>=0)return t.splice(n,1),e},memoize:function(t){let e,n;return function(...i){return n?e:(n=!0,e=t.apply(this,i))}},pluckKey:z,renameKey:function(t,e,n){e in t&&(t[n]=z(t,e))},extractOptions:K,extractCallback:V,noop:t,asyncNoop:function(){return Promise.resolve()},identity:X,escapeHTML:function(t){return t.replace(/[&<>"']/g,(t=>I[t]))},escapeRegExp:function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},sequence:function(...t){let e=ut(...t);return(...t)=>a(e,(e=>e(...t)))},evalOption:q,evalAutoOption:function(t,e,...n){return"auto"===(t=q(t,...n))&&(t=q(e,...n)),t},flatten:W,newDeferred:function(){let t,e;const n=new Promise((function(n,i){t=n,e=i}));return n.resolve=t,n.reject=e,n},always:function(t,e=X){return t.then(e,e)},isBasicObjectProperty:function(t){return Object.prototype.hasOwnProperty(t)},isCrossOrigin:s,task:function(t){const e=new MessageChannel;e.port1.onmessage=()=>t(),e.port2.postMessage(0)},isEqual:G,getSimpleTokens:function(t,{json:e=!1,separator:n=/[,\s]/}={}){return w(t)?e&&/^\[.*]$/.test(t)?ft(t):Q(t,n):F(t)},getComplexTokens:function(t){if(w(t)){let{maskedTokens:e,restore:n}=Y(t);return e.map((t=>n(t)))}return F(t)},wrapList:F,wrapValue:function(t,...e){return e[0]instanceof t?e[0]:new t(...e)},uid:function(){return Z++},upperCaseFirst:function(t){return t[0].toUpperCase()+t.slice(1)},lowerCaseFirst:function(t){return t[0].toLowerCase()+t.slice(1)},delegate:tt,delegatePromise:function(t,e){return tt(t,["then","catch","finally"],e)},reverse:function(t){return T(t).reverse()},camelToKebabCase:function(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))},sprintf:function(t,...e){return t.replace(nt,(t=>et(e.shift(),t)))},withRenamedKeys:function(t,e){const n={};for(let i in t){let r=e(i);g(r)&&(n[r]=t[i])}return n},memoizeMethod:function(t,e){for(let n in e){let e=Object.getOwnPropertyDescriptor(t,n).value,i=function(...t){var i;let r=this[i=`__${n}MemoizeCache`]||(this[i]={}),s=JSON.stringify(t);return r[s]||(r[s]=st(e,this,t)),rt(r[s])};t[n]=i}},safeStringifyJSON:function(t){return JSON.stringify(t).replace(/[^\x00-\x7F]/g,(t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0")))},variant:function(t,e={}){let n=Object.create(t);return Object.assign(n,e),n},cleaner:function(){let t=[],e=function(e,n){e=ut(...e).map(n),t.push(...ut(...e))},n=function(...t){e(t,X)};return n.guard=function(...t){e(t,up.error.guardFn)},n.clean=function(...e){let{length:n}=t;for(let i=n-1;i>=0;i--)t[i](...e);t=[]},n},scanFunctions:ut,args:ot,parseRelaxedJSON:ft,parseScalarJSONPairs:function(t){let{maskedTokens:e,restore:n}=Y(t);return e.map((t=>{let[e,i,r]=t.match(/([^{]+)({[^}]*})?/);return[n(i.trim()),r&&ft(n(r))]}))},maskPattern:at,expressionOutline:lt,parseString:function(t){return JSON.parse(pt(t))},assert:dt}}()},4138:()=>{up.Offline=class Offline extends up.Error{}},4244:()=>{up.CannotMatch=class CannotMatch extends up.Error{}},4372:()=>{!function(){const t=up.element;for(let e of["method","confirm"]){const n=`up-${e}`,i=`data-${e}`;up.macro(`a[${i}]`,(function(e){var r;(window.Rails||(null===(r=window.jQuery)||void 0===r?void 0:r.rails))&&up.link.isFollowable(e)&&(t.setMissingAttr(e,n,e.getAttribute(i)),e.removeAttribute(i))}))}}()},4518:()=>{},4526:()=>{var t;up.Layer.Popup=((t=class Popup extends up.Layer.OverlayWithTether{}).mode="popup",t)},4572:function(){var t,e=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const n=up.util;up.RenderJob=(t=class RenderJob{constructor(t){this.renderOptions=t}execute(){return this.Fn=this.Tn(),this}Tn(){return e(this,void 0,void 0,(function*(){try{this.Rn(),this.renderOptions=up.RenderOptions.preprocess(this.renderOptions),up.browser.assertConfirmed(this.renderOptions),up.RenderOptions.assertContentGiven(this.renderOptions);let t=yield this.Ln().execute();return this.Pn(t),t}catch(t){throw this.Pn(t)||this.An(t),t}}))}Pn(t){if(t instanceof up.RenderResult){let{onRendered:e,onFinished:i}=t.renderOptions;t.none||up.error.guard((()=>null==e?void 0:e(t)));let r=function(t){up.error.guard((()=>null==i?void 0:i(t)))};return this.finished.then(r,n.noop),!0}}An(t){let e=t instanceof up.Aborted?"Rendering was aborted":"Error while rendering";up.puts("up.render()",`${e}: ${t.name}: ${t.message}`),up.error.guard((()=>{var e,n;return null===(n=(e=this.renderOptions).onError)||void 0===n?void 0:n.call(e,t)}))}get finished(){return this.Dn()}Dn(){return e(this,void 0,void 0,(function*(){try{let t=yield this.Fn;return yield t.finished}catch(t){throw t instanceof up.RenderResult?yield t.finished:t}}))}Ln(){let t=n.memoize((t=>this.$n(t))),e=Object.assign(Object.assign({},this.renderOptions),{handleAbort:t});return e.url?new up.Change.FromURL(e):e.response?new up.Change.FromResponse(e):new up.Change.FromContent(e)}Rn(){let t=n.pluckKey(this.renderOptions,"guardEvent");if(t&&(t.renderOptions=this.renderOptions,up.emit(t,{target:this.renderOptions.origin}).defaultPrevented))throw new up.Aborted(`Rendering was prevented by ${t.type} listener`)}$n(t){let{abort:e}=this.renderOptions;if(!e||!up.network.isBusy())return;let{bindFragments:i,bindLayer:r,origin:s,layer:o}=this.Ln().getPreflightProps(),u={except:t,logOnce:["up.render()","Change with { abort } option will abort other requests"],newLayer:"new"===o,origin:s};"target"===e?up.fragment.abort(i,Object.assign({},u)):"layer"===e?up.fragment.abort(Object.assign(Object.assign({},u),{layer:r})):"all"===e||!0===e?up.fragment.abort(Object.assign(Object.assign({},u),{layer:"any"})):n.isFunction(e)?e(u):up.fragment.abort(e,Object.assign(Object.assign({},u),{layer:r}))}},n.delegatePromise(t.prototype,(function(){return this.Fn})),n.memoizeMethod(t.prototype,{Dn:!0,Ln:!0}),t)},4598:()=>{},4718:()=>{const t=up.util,e=up.element;up.Params=class Params{constructor(t){this.clear(),this.addAll(t)}clear(){this.entries=[]}[t.copy.key](){return new up.Params(this)}toObject(){const e={};for(let n of this.entries){const{name:i,value:r}=n;t.isBasicObjectProperty(i)||(this.Mn(i)?(e[i]||(e[i]=[]),e[i].push(r)):e[i]=r)}return e}toArray(){return this.entries}toFormData(){const t=new FormData;for(let e of this.entries)t.append(e.name,e.value);return t.entries||(t.originalArray=this.entries),t}toQuery(){return this.withoutBinaryEntries().entries.map(this.Hn).join("&")}Hn(e){const{value:n}=e;let i=encodeURIComponent(e.name);return t.isGiven(n)&&(i+="=",i+=encodeURIComponent(n)),i}Nn({value:t}){return t instanceof Blob}hasBinaryEntries(){return t.some(this.entries,this.Nn)}withoutBinaryEntries(){let e=t.reject(this.entries,this.Nn);return new this.constructor(e)}toURL(e){let n=[e,this.toQuery()];n=t.filter(n,t.isPresent);const i=t.contains(e,"?")?"&":"?";return n.join(i)}add(t,e){this.entries.push({name:t,value:e})}addAll(e){t.isMissing(e)||(e instanceof this.constructor?this.entries.push(...e.entries):t.isArray(e)?this.entries.push(...e):t.isString(e)?this.Bn(e):t.isFormData(e)?this.qn(e):t.isObject(e)?this.In(e):up.fail("Unsupported params type: %o",e))}keys(){return t.map(this.entries,"name")}values(){return t.map(this.entries,"value")}In(e){for(let n in e){const i=e[n],r=t.isArray(i)?i:[i];for(let t of r)this.add(n,t)}}Bn(e){for(let n of e.split("&"))if(n){let[e,i]=n.split("=");e=decodeURIComponent(e),i=t.isGiven(i)?decodeURIComponent(i):null,this.add(e,i)}}qn(t){for(let e of t.entries())this.add(...e)}set(t,e){this.delete(t),this.add(t,e)}delete(e){this.entries=t.reject(this.entries,this.zn(e))}zn(t){return e=>e.name===t}get(t){return this.Mn(t)?this.getAll(t):this.getFirst(t)}getFirst(e){const n=t.find(this.entries,this.zn(e));return null==n?void 0:n.value}getAll(e){const n=t.filter(this.entries,this.zn(e));return t.map(n,"value")}Mn(e){return t.evalOption(up.form.config.arrayParam,e)}[t.isBlank.key](){return 0===this.entries.length}static fromForm(t){return this.fromContainer(t)}static fromContainer(t){let e=up.form.fields(t);return this.fromFields(e)}static fromFields(e){const n=new this;for(let i of t.wrapList(e))n.addField(i);return n}addField(t){let n=(t=e.get(t)).name;if(n&&!t.disabled){const{tagName:e}=t,{type:i}=t;if("SELECT"===e)for(let e of t.querySelectorAll("option"))e.selected&&this.add(n,e.value);else if("checkbox"===i||"radio"===i)t.checked&&this.add(n,t.value);else{if("file"!==i)return this.add(n,t.value);for(let e of t.files)this.add(n,e)}}}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.entries,e.entries)}static fromURL(e){const n=new this;let i=t.parseURL(e).search;return i&&(i=i.replace(/^\?/,""),n.addAll(i)),n}static stripURL(e){return t.normalizeURL(e,{search:!1})}static merge(e,...n){let i=t.copy(e);for(let e of n){let n=t.wrapValue(this,e);for(let t of n.keys())i.delete(t);i.addAll(n)}return i}}},4742:()=>{const t=up.util;up.SelectorTracker=class SelectorTracker{constructor(e,n,i){var r;this.te=e,this.Un=i,this.rt=n.layer||"any",this.Vn=n.filter||t.identity,this.Kn=null===(r=n.live)||void 0===r||r,this.Xn=new Map}start(){return this.Wn(),t.sequence(this.Gn(),(()=>this.Jn()))}Gn(){if(this.Kn)return up.on("up:fragment:inserted up:fragment:destroyed",(()=>this.Wn()))}Wn(){let e=new Map(this.Xn);this.Xn.clear();for(let n of this.Qn){let i=e.get(n);e.delete(n);let r=i||this.Un(n)||t.noop;this.Xn.set(n,r)}this.Yn(e)}get Qn(){let t=up.fragment.all(this.te,{layer:this.rt});return this.Vn(t)}Jn(){this.Yn(this.Xn)}Yn(t){for(let[e,n]of t)n(e)}}},4823:()=>{const t=up.util;up.Request.Queue=class Queue{constructor(){this.reset()}reset(){this.Zn=[],this.ti=[],this.ei=!1}get allRequests(){return this.ti.concat(this.Zn)}asap(e){e.runQueuedCallbacks(),t.always(e,(()=>this.Xt(e))),this.ni(e),this.ii(e),queueMicrotask((()=>this.ri()))}promoteToForeground(t){t.background&&(t.background=!1,this.ni(t))}ni(e){if(!e.isTimed())return;let n=Math.max(e.effectiveLateTime-e.age);t.timer(n,(()=>this.si()))}oi(){return t.evalOption(up.network.config.concurrency)}ui(){const t=this.oi();return-1===t||this.ti.length<t}isBusy(){return this.ti.length>0||this.Zn.length>0}ii(t){this.Zn.push(t)}ai(){let e=t.find(this.Zn,(t=>!t.background));return e||(e=this.Zn[0]),t.remove(this.Zn,e)}ci(t){t.load()&&this.ti.push(t)}Xt(e){t.remove(this.ti,e)||t.remove(this.Zn,e),queueMicrotask((()=>this.ri())),t.task((()=>this.hi()))}ri(){let t;if(this.ui()&&(t=this.ai()))return this.ci(t)}abort(...e){let[n=!0,{except:i,reason:r,logOnce:s}]=t.args(e,"val","options"),o=up.Request.tester(n,{except:i});for(let e of[this.ti,this.Zn]){const n=t.filter(e,o);for(let i of n)s&&(up.puts(...s),s=null),i.abort({reason:r}),t.remove(e,i)}}si(){!this.ei&&this.li()&&(this.ei=!0,up.emit("up:network:late",{log:"Server is slow to respond"}))}hi(){this.ei&&!this.pi.length&&(this.ei=!1,up.emit("up:network:recover",{log:"Slow requests were loaded"}))}get pi(){return this.allRequests.filter((t=>t.isTimed()))}li(){return t.some(this.pi,(t=>t.age>=t.effectiveLateTime-1))}}},5224:()=>{var t;const e=up.util;up.Change.UpdateLayer=(t=class UpdateLayer extends up.Change.Addition{constructor(t){super(t=up.RenderOptions.finalize(t)),this.layer=t.layer,this.target=t.target,this.fi=t.context,this.i=up.fragment.parseTargetSteps(this.target,this.options)}getPreflightProps(){this.di();let t=this.mi();return{layer:this.layer,bindLayer:this.layer,mode:this.layer.mode,context:e.merge(this.layer.context,this.fi),origin:this.options.origin,target:this.gi(),fragments:t,bindFragments:t}}gi(){return this.di(),up.fragment.targetForSteps(this.i)}mi(){return this.di(),e.map(this.i,"oldElement")}execute(t,e){this.responseDoc=t,this.bi(),e();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.yi.bind(this));try{return this.wi(),this.yi(),up.RenderResult.both(this._i,this.Oi)}finally{n()}}wi(){this.i.length&&up.puts("up.render()",`Updating "${this.gi()}" in ${this.layer}`),this.ki(),this.options.saveScroll&&up.viewport.saveScroll({layer:this.layer}),this.options.saveFocus&&up.viewport.saveFocus({layer:this.layer}),this.options.peel&&this.layer.peel({history:!this.Si()}),!1!==this.options.abort&&up.fragment.abort(this.mi(),{reason:"Fragment is being replaced"}),Object.assign(this.layer.context,this.fi),this.Si()&&this.layer.updateHistory(this.options),this.handleLayerChangeRequests(),this._i=this.executeSteps({steps:this.i,responseDoc:this.responseDoc,noneOptions:this.options})}yi(){if(this.Oi)return;let t=this.Ei().other;this.Oi=this.executeSteps({steps:t,responseDoc:this.responseDoc})}di(){this.xi(),this.ji()}bi(){this.xi(),this.Ci(),this.ji(),this.Fi()}Ci(){this.i.push(...this.Ei().current)}xi(){this.i=this.i.filter((t=>{const n=new up.FragmentFinder(e.pick(t,["selector","origin","layer","match","preferOldElements"]));if(t.oldElement||(t.oldElement=n.find()),t.oldElement)return!0;if(!t.maybe)throw new up.CannotMatch}))}Fi(){this.i=this.responseDoc.selectSteps(this.i)}ji(){this.i=up.fragment.compressNestedSteps(this.i)}Ei(){return up.radio.hungrySteps(this.Ti())}ki(){let t=up.FocusCapsule.preserve(this.layer);this.i.forEach(((e,n)=>{e.focusCapsule=t,n>0&&(e.scroll=!1,e.focus=!1)}))}Si(){return e.evalAutoOption(this.options.history,this.Ri.bind(this))}Ri(){const t=e.map(this.i,"oldElement");return up.fragment.hasAutoHistory(t,this.layer)}Ti(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.Si()})}},e.memoizeMethod(t.prototype,{di:!0,xi:!0,Si:!0,Ei:!0}),t)},5229:()=>{const t=up.util;up.EventListener=class EventListener extends up.Record{keys(){return["element","eventType","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}constructor(t){var e;super(t),this.Li=this.constructor.Pi(t),this.isDefault=up.framework.evaling,null!==(e=this.beforeBoot)&&void 0!==e||(this.beforeBoot=0===this.eventType.indexOf("up:framework:")),this.nativeCallback=this.nativeCallback.bind(this)}bind(){var t;const e=(t=this.element).upEventListeners||(t.upEventListeners={});e[this.Li]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),e[this.Li]=this,this.element.addEventListener(...this.Ai())}Ai(){let e=t.compactObject(t.pick(this,["once","passive","capture"]));return[this.eventType,this.nativeCallback,e]}unbind(){let t=this.element.upEventListeners;t&&delete t[this.Li],this.element.removeEventListener(...this.Ai())}nativeCallback(e){if(up.framework.beforeBoot&&!this.beforeBoot)return;let n=e.target;if(this.selector){let e=t.evalOption(this.selector);n=n.closest(e)}if((!this.guard||this.guard(e))&&n){const t=[e,n],i=this.callback.length;if(1!==i&&2!==i){const e=up.script.data(n);t.push(e)}if("click"===this.eventType&&n.disabled)return;const r=this.callback.bind(n,...t);this.baseLayer?this.baseLayer.asCurrent(r):r()}}static fromElement(t){let e=t.element.upEventListeners;if(e)return e[this.Pi(t)]}static Pi(e){var n;return(n=e.callback).upUid||(n.upUid=t.uid()),[e.eventType,e.selector,e.callback.upUid].join("|")}static allNonDefault(e){let n=e.upEventListeners;if(n){const e=Object.values(n);return t.reject(e,"isDefault")}return[]}}},5249:()=>{var t;const e=up.util;up.Change.FromContent=(t=class FromContent extends up.Change{constructor(t){super(t),this.de=t.origin,this.Di=t.preflight,this.$i=up.layer.getAll(t)}Mi(){let t=[];return this.Hi(),this.Ni(),this.Bi(t,this.$i,this.options.target),this.Bi(t,this.$i,this.options.fallback),t}qi(t){return"new"===t||t.isOpen()}Hi(){this.$i=e.filter(this.$i,this.qi)}Bi(t,e,n){for(let i of e)for(let e of this.Ii(n,i)){const n=Object.assign(Object.assign({},this.options),{target:e,layer:i,defaultPlacement:this.zi()}),r="new"===i?new up.Change.OpenLayer(n):new up.Change.UpdateLayer(n);t.push(r)}}Ii(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.options.mode,origin:this.de})}execute(){return this.options.preload?Promise.resolve():this.Ui(this.Vi.bind(this))||this.Ki()}Vi(t){return t.execute(this.Xi(),this.Wi.bind(this,t))}Gi(t){return!(t instanceof up.CannotMatch)}Wi(t){var e,n;let i=this.Mi()[0];t!==i&&up.puts("up.render()",'Could not match primary target "%s". Updating a fallback target "%s".',i.target,t.target);let{assets:r}=this.Xi();r&&up.script.assertAssetsOK(r,t.options),null===(n=(e=this.options).handleAbort)||void 0===n||n.call(e,null)}Xi(){var t,n;if(this.Di)return;const i=e.pick(this.options,["target","content","fragment","document","html","cspInfo","origin","data"]);return null===(n=(t=up.migrate).handleResponseDocOptions)||void 0===n||n.call(t,i),"content"===this.zi()&&(i.target=this.Ji(i.target)),new up.ResponseDoc(i)}Ni(){var t;if(this.Di)return;let e=this.Xi();this.options.fragment&&((t=this.options).target||(t.target=e.rootSelector())),this.options.title=this.improveHistoryValue(this.options.title,e.title),this.options.metaTags=this.improveHistoryValue(this.options.metaTags,e.metaTags),this.options.lang=this.improveHistoryValue(this.options.lang,e.lang)}zi(){if(!this.options.document&&!this.options.fragment)return"content"}Ji(t){let e=this.$i[0]||up.layer.root;return this.Ii(t||":main",e)[0]}getPreflightProps(t={}){return this.Ui((t=>t.getPreflightProps()))||t.optional||this.Qi()}Qi(){this.Yi("Could not find target in current page")}Ki(){this.Yi("Could not find common target in current page and response")}Yi(t){if(this.Mi().length){const n=e.uniq(e.map(this.Mi(),"target")),i=up.layer.optionToString(this.options.layer);throw new up.CannotMatch([t+" (tried selectors %o in %s)",n,i])}if(0!==this.$i.length)throw this.options.didForceFailOptions?new up.CannotMatch("No target selector given for failed responses (https://unpoly.com/failed-responses)"):new up.CannotMatch("No target selector given");this.Zi()}Zi(){throw new up.CannotMatch("Could not find a layer to render in. You may have passed an unmatchable layer reference, or a detached element.")}Ui(t){for(let e of this.Mi())try{return t(e)}catch(t){if(this.Gi(t))throw t}}},e.memoizeMethod(t.prototype,{Mi:!0,Xi:!0,getPreflightProps:!0}),t)},5313:()=>{up.framework=function(){let t="evaling";function e({mode:e="manual"}={}){if("configuring"!==t)return void console.error("Unpoly has already booted");let i=n();i?console.error("Unpoly cannot boot: %s",i):(t="booting",up.emit("up:framework:boot",{mode:e,log:!1}),t="booted",up.emit("up:framework:booted",{mode:e,log:!1}))}function n(){for(let t of["Promise","DOMParser","FormData","reportError"])if(!window[t])return`Browser doesn't support the ${t} API`;if("BackCompat"===document.compatMode)return"Browser is in quirks mode (missing DOCTYPE?)";for(let t of[":is(*)",":has(*)"])if(!CSS.supports(`selector(${t})`))return`Browser doesn't support the ${t} selector`}return{onEvaled:function(){up.emit("up:framework:evaled",{log:!1}),function(){let t=document.currentScript;return!!(null==t?void 0:t.async)||"manual"===(null==t?void 0:t.getAttribute("up-boot"))||"complete"===document.readyState||void 0}()?console.debug("Call up.boot() after you have configured Unpoly"):document.addEventListener("DOMContentLoaded",(()=>e({mode:"auto"}))),t="configuring"},boot:e,startExtension:function(){if("configuring"!==t)throw new Error("Unpoly extensions must be loaded before booting");t="evaling"},stopExtension:function(){t="configuring"},reset:function(){up.emit("up:framework:reset",{log:!1})},get evaling(){return"evaling"===t},get booted(){return"booted"===t},get beforeBoot(){return"booting"!==t&&"booted"!==t},isSupported:function(){return!n()}}}(),up.boot=up.framework.boot},5637:()=>{const t=up.element,e=up.util;up.OverlayFocus=class OverlayFocus{constructor(t){this.rt=t,this.tr=this.rt.getFocusElement(),this.er=this.rt.trapFocus}moveToFront(){this.nr||(this.nr=!0,this.ir=t.setAttrsTemp(this.tr,{tabindex:"0",role:"dialog","aria-modal":this.er.toString()}),this.er&&(this.rr=up.on("focusin",(t=>this.sr(t))),this.ur=t.affix(this.tr,"beforebegin","up-focus-trap[tabindex=0]"),this.ar=t.affix(this.tr,"afterend","up-focus-trap[tabindex=0]")))}moveToBack(){this.teardown()}teardown(){this.nr&&(this.nr=!1,this.ir(),this.er&&(this.rr(),this.ur.remove(),this.ar.remove()))}sr(t){const{target:e}=t;this.cr||up.layer.isWithinForeignOverlay(e)||(this.cr=!0,e===this.ur?this.hr():e!==this.ar&&this.rt.contains(e)||this.lr(),this.cr=!1)}lr(t){up.focus(this.tr,t)}hr(){this.pr(this.rt.getBoxElement())||this.lr()}pr(t){for(let n of e.reverse(t.children))if(up.viewport.tryFocus(n)||this.pr(n))return!0}}},5691:()=>{const t=up.util,e=up.element,n=[{attr:"up-hide-for",toggle(t,n){e.toggle(t,!n)}},{attr:"up-show-for",toggle(t,n){e.toggle(t,n)}},{attr:"up-disable-for",toggle(t,e){up.form.setDisabled(t,e)}},{attr:"up-enable-for",toggle(t,e){up.form.setDisabled(t,!e)}}];up.Switcher=class Switcher{constructor(t){this.L=t,this.dr=t.getAttribute("up-switch")||up.fail("No switch target given for %o",t),this.mr=t.getAttribute("up-switch-region")}start(){return this.gr(),t.sequence(this.vr(),this.br())}vr(){var t,e;let n=()=>this.yr();return(null===(e=(t=up.migrate).watchForSwitch)||void 0===e?void 0:e.call(t,this.L,n))||up.watch(this.L,{logPrefix:"[up-switch]"},n)}br(){return up.fragment.trackSelector(this.dr,{filter:e=>{let n=this.wr;return t.filter(e,(t=>null==n?void 0:n.contains(t)))}},(t=>this._r(t)))}yr(){this.gr()}gr(){const t=this.Or();for(let e of this.kr())this._r(e,t)}_r(e,n=this.Or()){let i=e.upSwitchValues;t.isEqual(i,n)||(e.upSwitchValues=n,this.Sr(e,n))}Sr(e,i){for(let{attr:r,toggle:s}of n){let n=e.getAttribute(r);if(n){let r=this.Er(n);s(e,t.intersect(i,r).length>0)}}let r=["Switching %o",e];up.emit(e,"up:form:switch",{field:this.L,fieldTokens:i,log:r})}kr(){let t=this.wr;return t?up.fragment.subtree(t,this.dr):[]}get wr(){return this.mr?up.fragment.get(this.mr,{origin:this.L}):up.form.getRegion(this.L)}Er(e){return t.getSimpleTokens(e,{json:!0})}Or(){var e;let n=up.Params.fromContainer(this.L).values(),i=[...n],r=t.some(n,t.isPresent);i.push(r?":present":":blank");let s=up.form.fields(this.L);if(null===(e=s[0])||void 0===e?void 0:e.matches("[type=radio], [type=checkbox]")){let e=t.some(s,"checked");i.push(e?":checked":":unchecked")}return i}}},5845:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};let e=up.util;up.Change.OpenLayer=class OpenLayer extends up.Change.Addition{constructor(t){super(t),this.target=t.target,this.de=t.origin,this.jr=t.baseLayer}getPreflightProps(){return{mode:this.options.mode,context:this.Cr().context,origin:this.options.origin,target:this.target,bindLayer:this.jr,layer:"new",bindFragments:e.compact([up.fragment.get(":main",{layer:this.jr})]),fragments:[]}}execute(t,e){this.responseDoc=t,this.bi(),e(),this.Fr();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.yi.bind(this));try{return this.Tr(),this.yi(),up.RenderResult.both(this.Rr,this.Oi)}finally{n()}}bi(){if(":none"===this.target?this.Lr=document.createElement("up-none"):this.Lr=this.responseDoc.select(this.target),!this.Lr||this.jr.isClosed())throw new up.CannotMatch}Fr(){up.puts("up.render()",`Opening element "${this.target}" in new overlay`),this.Pr(),this.layer=this.Cr(),this.jr.peel({history:!this.layer.history}),this.jr.saveHistory(),up.layer.stack.push(this.layer),this.layer.createElements(),this.layer.setupHandlers()}Tr(){this.Ar(),this.handleLayerChangeRequests(),this.responseDoc.commitElement(this.Lr),this.layer.setContent(this.Lr),this.responseDoc.finalizeElement(this.Lr),this.setReloadAttrs({newElement:this.Lr,source:this.options.source}),up.hello(this.layer.element,Object.assign(Object.assign({},this.options),{layer:this.layer,dataRoot:this.Lr})),this.Rr=new up.RenderResult({layer:this.layer,fragments:[this.Lr],target:this.target,renderOptions:this.options}),this.m(),this.Rr.finished=this.l(),this.layer.opening=!1,this.Dr(),this.abortWhenLayerClosed()}yi(){if(this.Oi)return;let t=this.Ei().other;this.Oi=this.executeSteps({steps:t,responseDoc:this.responseDoc})}l(){return t(this,void 0,void 0,(function*(){return yield this.layer.startOpenAnimation(),this.abortWhenLayerClosed(),this.p(),this.Rr}))}Cr(){const t=Object.assign(Object.assign({},this.options),{opening:!0});return up.layer.build(t,(t=>this.options=up.RenderOptions.finalize(t)))}Ar(){var t;"auto"===this.layer.history&&(this.layer.history=up.fragment.hasAutoHistory([this.Lr],this.layer)),(t=this.layer).history&&(t.history=this.jr.history),this.layer.updateHistory(this.options)}p(){var t;null===(t=this.jr.overlayFocus)||void 0===t||t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.Lr,layer:this.layer,autoMeans:["autofocus","layer"],inputDevice:this.options.inputDevice}).process(this.options.focus)}m(){const t=Object.assign(Object.assign({},this.options),{fragment:this.Lr,layer:this.layer,autoMeans:["hash","layer"]});new up.FragmentScrolling(t).process(this.options.scroll)}Pr(){up.event.assertEmitted("up:layer:open",{origin:this.de,baseLayer:this.jr,layerOptions:this.options,log:"Opening new overlay"})}Dr(){this.layer.emit("up:layer:opened",{origin:this.de,callback:this.layer.callback("onOpened"),log:`Opened new ${this.layer}`})}Ei(){return up.radio.hungrySteps(this.Ti())}Ti(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.layer.history})}}},5887:()=>{const t=up.util,e=/^([^ >+(]+) (.+)$/;up.FragmentFinder=class FragmentFinder{constructor(t){var e;this.R=t,this.de=t.origin,this.te=t.selector,this.$r=t.document||window.document,this.Mr=null!==(e=t.match)&&void 0!==e?e:up.fragment.config.match,this.Hr=t.preferOldElements}find(){return this.Nr()||this.Br()||this.qr()}Nr(){if(this.Hr)return this.Hr.find((t=>this.$r.contains(t)&&up.fragment.matches(t,this.te)))}Br(){var t;if("region"===this.Mr&&!up.fragment.containsMainPseudo(this.te)&&(null===(t=this.de)||void 0===t?void 0:t.isConnected))return this.Ir()||this.zr()}Ir(){return up.fragment.closest(this.de,this.te,this.R)}zr(){let n=up.fragment.splitTarget(this.te);return t.findResult(n,(t=>{let n=t.match(e);if(n){let t=up.fragment.closest(this.de,n[1],this.R);if(t)return up.fragment.getFirstDescendant(t,n[2])}}))}qr(){return up.fragment.getFirstDescendant(this.$r,this.te,this.R)}}},6088:()=>{var t;const e=up.util,n=up.element;up.LayerLookup=(t=class LayerLookup{constructor(t,n){this.Ur=t,!1!==n.normalizeLayerOptions&&up.layer.normalizeOptions(n),this.R=n,this.Vr=e.getSimpleTokens(n.layer)}all(){let t=e.flatMap(this.Vr,(t=>this.Kr(t)));return t=e.compact(t),t=e.uniq(t),t}static all(t,...n){const i=e.parseArgIntoOptions(n,"layer"),{layer:r}=i;return r instanceof up.Layer?[r]:new this(t,i).all()}Xr(t){return t=n.get(t),e.find(this.Ur.reversed(),(e=>e.contains(t)))}Wr(t){return this.Ur.at(t)}Kr(t){if(t instanceof up.Layer)return t;if(e.isNumber(t))return this.Wr(t);if(/^\d+$/.test(t))return this.Wr(Number(t));if(e.isElementLike(t))return this.Xr(t);switch(t){case"any":return[this.Gr(),...this.Ur.reversed()];case"current":return this.Gr();case"closest":return this.Ur.selfAndAncestorsOf(this.Gr());case"parent":return this.Gr().parent;case"ancestor":case"ancestors":return this.Gr().ancestors;case"child":return this.Gr().child;case"descendant":case"descendants":return this.Gr().descendants;case"subtree":return this.Gr().subtree;case"new":return"new";case"root":return this.Ur.root;case"overlay":case"overlays":return e.reverse(this.Ur.overlays);case"front":return this.Ur.front;case"origin":return this.Jr();default:return up.fail("Unknown { layer } option: %o",t)}}Jr(){let{origin:t,originLayer:e}=this.R;return e||(t?this.Xr(t):void 0)}Gr(){let{baseLayer:t}=this.R;if(e.isString(t)){const e=Object.assign(Object.assign({},this.R),{baseLayer:this.Ur.current,normalizeLayerOptions:!1,layer:t});return this.constructor.all(this.Ur,e)[0]}return t||this.Jr()||this.Ur.current}},e.memoizeMethod(t.prototype,{Gr:!0,Jr:!0}),t)},6101:()=>{up.history=function(){const t=up.util,e=up.element,n=new up.Config((()=>({enabled:!0,updateMetaTags:!0,restoreTargets:["body"],metaTagSelectors:["meta","link[rel=alternate]","link[rel=canonical]","link[rel=icon]","[up-meta]",'script[type="application/ld+json"]'],noMetaTagSelectors:["meta[http-equiv]","[up-meta=false]","meta[name=csp-nonce]"]})));let i,r,s,o=new up.FIFOCache({capacity:100,normalizeKey:h});function u(){return t.normalizeURL(location.href)}function a(t){var e,n;let{reason:a,alreadyHandled:c}=s||t,l=u();if(r!==l){i=r,r=l,"detect"===a&&(a=h(l)===h(i)?"hash":"pop");let t=!c&&function(t){return!!o.get(t)}(l),s=up.event.build("up:location:changed",{reason:a,location:l,previousLocation:i,alreadyHandled:c,willHandle:t,log:`New location is ${l}`});null===(n=(e=up.migrate).prepareLocationChangedEvent)||void 0===n||n.call(e,s),a&&(up.emit(s),m(s))}}function c(t){return(null==t?void 0:t.split(/(?=#)/))||[]}function h(t){return c(t)[0]}function l(e,n){return t.matchURLs(e,location.href,Object.assign({hash:!0},n))}function p(t,e){l(t)||f("pushState",t,e)}function f(t,e,i){d(e),n.enabled&&(s=i,history[t](null,"",e),s=void 0)}function d(e=u()){e=t.normalizeURL(e),o.set(e,!0)}function m(t){t.alreadyHandled||(t.willHandle?"pop"===t.reason?(up.viewport.saveFocus({location:t.previousLocation}),up.viewport.saveScroll({location:t.previousLocation}),function(t){up.error.muteUncriticalRejection(up.render({guardEvent:up.event.build("up:location:restore",{location:t,log:`Restoring location ${t}`}),url:t,target:n.restoreTargets,fail:!1,history:!0,location:t,peel:!0,layer:"root",cache:"auto",revalidate:"auto",saveScroll:!1,scroll:["restore","auto"],saveFocus:!1,focus:["restore","auto"]}))}(t.location)):"hash"===t.reason&&up.viewport.revealHash(location.hash,{strong:!0}):up.puts("up.history","Ignoring history entry owned by foreign script"))}function g(t=document.head){return t.querySelectorAll(n.selector("metaTagSelectors"))}return up.on("up:framework:boot",(function({mode:t}){a({reason:null,alreadyHandled:!0}),function(){const t=history.pushState;history.pushState=function(...e){t.apply(this,e),a({reason:"push",alreadyHandled:!0})};const e=history.replaceState;history.replaceState=function(...t){e.apply(this,t),a({reason:"replace",alreadyHandled:!0})}}(),"GET"===up.protocol.initialRequestMethod()&&d(),"auto"===t&&up.viewport.revealHash(location.hash,{strong:!0})})),up.on(window,"hashchange, popstate",(()=>{a({reason:"detect",alreadyHandled:!1})})),up.on("up:click",'a[href*="#"]',(function(e,n){var i;if(e.defaultPrevented)return;if(up.event.isModified(e))return;let[r,s]=c(up.layer.current.location),[o,u]=c(t.normalizeURL(n)),a=n.getAttribute("href");if(r!==o&&!a.startsWith("#"))return;let h=null!==(i=n.getAttribute("up-scroll-behavior"))&&void 0!==i?i:"auto",l=up.layer.get(n),f=up.viewport.revealHashFn(u,{layer:l,behavior:h});f&&(up.event.halt(e),up.log.putsEvent(e),u!==s&&l.showsLiveHistory()&&p(r+u,{reason:"hash",alreadyHandled:!0}),f())})),up.macro("[up-back]",(function(t){i&&(e.setMissingAttrs(t,{"up-href":i,"up-scroll":"restore"}),t.removeAttribute("up-back"),up.link.makeFollowable(t))})),up.on("up:framework:reset",(function(){i=void 0,r=void 0,s=void 0,o.clear(),a({reason:null,alreadyHandled:!0}),d()})),{config:n,push:p,replace:function(t,e){f("replaceState",t,e)},get location(){return u()},get previousLocation(){return i},isLocation:l,findMetaTags:g,updateMetaTags:function(t){let e=g();for(let t of e)t.remove();for(let e of t)document.head.append(e)},getLang:function(t=document){let{documentElement:e}=t;if(e.matches("html"))return t.documentElement.lang},updateLang:function(t){e.setAttrPresence(e.root,"lang",t,!!t)}}}()},6140:()=>{const t=up.util,e=up.element;up.Tether=class Tether{constructor(t){var n,i;null===(i=(n=up.migrate).handleTetherOptions)||void 0===i||i.call(n,t),this.Qr=t.anchor,this.Yr=t.align,this.Zr=t.position,this.ts="top"===this.Zr||"bottom"===this.Zr?"horizontal":"vertical",this.es=up.viewport.get(this.Qr),this.parent=this.es===e.root?document.body:this.es,this.ns=!this.es.contains(this.Qr.offsetParent)}start(t){this.st=t,this.st.style.position="absolute",this.rs(0,0),this.sync(),this.ss("on")}stop(){this.ss("off")}ss(t){let e=this.us.bind(this);up[t](window,"resize",e),this.ns&&up[t](this.es,"scroll",e)}us(){return clearTimeout(this.syncTimer),this.syncTimer=t.task(this.sync.bind(this))}isDetached(){return!this.parent.isConnected||!this.Qr.isConnected}sync(){const n=this.st.getBoundingClientRect(),i=e.styleNumber(this.st,"margin-top"),r=e.styleNumber(this.st,"margin-right"),s=e.styleNumber(this.st,"margin-bottom"),o=e.styleNumber(this.st,"margin-left"),u=this.Qr.getBoundingClientRect();let a,c;switch(this.ts){case"horizontal":switch(this.Zr){case"top":c=u.top-s-n.height;break;case"bottom":c=u.top+u.height+i}switch(this.Yr){case"left":a=u.left+o;break;case"center":a=u.left+.5*(u.width-n.width);break;case"right":a=u.left+u.width-n.width-r}break;case"vertical":switch(this.Yr){case"top":c=u.top+i;break;case"center":c=u.top+.5*(u.height-n.height);break;case"bottom":c=u.top+u.height-n.height-s}switch(this.Zr){case"left":a=u.left-r-n.width;break;case"right":a=u.left+u.width+o}}t.isDefined(a)||t.isDefined(c)?this.he(a,c):up.fail("Invalid tether constraints: %o",this.cs())}cs(){return{position:this.Zr,align:this.Yr}}he(t,e){const n=this.st.getBoundingClientRect();this.rs(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)}rs(t,n){this.offsetLeft=t,this.offsetTop=n,e.setStyle(this.st,{left:t,top:n},"px")}}},6347:()=>{const t=up.util;up.Change=class Change{constructor(t){this.options=t}execute(){throw new up.NotImplemented}improveHistoryValue(e,n){return!1===e||t.isString(e)?e:n}deriveFailOptions(){return up.RenderOptions.deriveFailOptions(this.options)}}},6351:()=>{var t;const e=up.util;up.Request=(t=class Request extends up.Record{keys(){return["method","url","hash","params","target","failTarget","headers","timeout","background","cache","expireCache","evictCache","layer","mode","context","failLayer","failMode","failContext","origin","originLayer","originMode","builtAt","wrapMethod","contentType","payload","onLoading","fail","abortable","lateDelay","previews"]}defaults(){let t=up.network.config;return{state:"new",abortable:!0,headers:{},timeout:t.timeout,builtAt:new Date,previews:[],wrapMethod:t.wrapMethod}}constructor(t){var n,i,r;if(super(t),this.params=new up.Params(this.params),this.hs(),(this.target||this.layer||this.origin)&&!t.basic){const t={origin:this.origin};this.layer=up.layer.get(this.layer,t),this.context||(this.context=this.layer.context||{}),this.mode||(this.mode=this.layer.mode),this.failLayer=up.layer.get(this.failLayer,t),this.failContext||(this.failContext=(null===(n=this.failLayer)||void 0===n?void 0:n.context)||{}),this.failMode||(this.failMode=null===(i=this.failLayer)||void 0===i?void 0:i.mode),this.originLayer||(this.originLayer=up.layer.get(this.origin)||up.layer.current),this.originMode||(this.originMode=null===(r=this.originLayer)||void 0===r?void 0:r.mode)}this.bindLayer=t.bindLayer||this.layer,this.ls=t.fragments,this.ps=t.bindFragments,this.Fe=e.newDeferred(),this.fs()}get effectiveLateTime(){var t;return!this.background&&(null!==(t=this.lateDelay)&&void 0!==t?t:e.evalOption(up.network.config.lateDelay,this))}isTimed(){return e.isNumber(this.effectiveLateTime)}get xhr(){var t;return null!==(t=this.ds)&&void 0!==t?t:this.ds=new XMLHttpRequest}get fragments(){return this.ls||(this.ls=this.gs())}gs(){let t=up.fragment.parseTargetSteps(this.target),n={origin:this.origin,layer:this.layer},i=e.map(t,(t=>up.fragment.get(t.selector,n)));return e.compact(i)}get bindFragments(){return this.ps||this.fragments}get fragment(){var t;return null===(t=this.fragments)||void 0===t?void 0:t[0]}hs(){this.method=e.normalizeMethod(this.method),this.vs(),this.bs(),this.url=e.normalizeURL(this.url)}ys(){e.task((()=>{this.layer=void 0,this.failLayer=void 0,this.bindLayer=void 0,this.origin=void 0,this.originLayer=void 0,this.ls=void 0,this.ps=void 0}))}vs(){var t;let e=null===(t=this.url)||void 0===t?void 0:t.match(/^([^#]*)(#.+)$/);if(e)return this.url=e[1],this.hash=e[2]}bs(){!this.url||this.allowsPayload()||e.isBlank(this.params)||(this.url=this.params.toURL(this.url),this.params.clear())}isSafe(){return up.network.isSafeMethod(this.method)}allowsPayload(){return e.methodAllowsPayload(this.method)}will302RedirectWithGET(){return this.isSafe()||"POST"===this.method}willCache(){return e.evalAutoOption(this.cache,up.network.config.autoCache,this)}runQueuedCallbacks(){e.always(this,(()=>this.ys()))}load(){var t;if("new"===this.state)return this.ws()?(this.state="loading",this.hs(),null===(t=this.onLoading)||void 0===t||t.call(this),this.expired=!1,new up.Request.XHRRenderer(this).buildAndSend({onload:()=>this._s(),onerror:()=>this.Os(),ontimeout:()=>this.ks(),onabort:()=>this.Ss()}),!0):void this.abort({reason:"Prevented by event listener"})}runPreviews(t){this.ended||this.fromCache||(this.Es=up.status.runPreviews(this,t))}ws(){return!this.emit("up:request:load",{log:["Loading %s",this.description]}).defaultPrevented}loadPage(){up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()}_s(){const t=this.xs(),e="Loaded "+t.description;this.emit("up:request:loaded",{request:t.request,response:t,log:e}),this.respondWith(t)}Os(){this.js("Network error")}ks(){this.js("Timeout")}Ss(){this.Cs()}abort({reason:t}={}){this.Cs(t)&&this.ds&&this.ds.abort()}Cs(t){if(this.ended)return;let e="Aborted request to "+this.description+(t?": "+t:"");return this.state="aborted",this.Fs(new up.Aborted(e)),this.emit("up:request:aborted",{log:e}),!0}js(t){if(this.ended)return;let e="Cannot load request to "+this.description+(t?": "+t:"");this.state="offline",this.emit("up:request:offline",{log:e}),this.Fs(new up.Offline(e))}respondWith(t){this.response=t,this.ended||(this.state="loaded",t.ok?this.Ts(t):this.Fs(t))}Ts(t){this.Rs(),this.Fe.resolve(t)}Fs(t){this.Rs(),this.Fe.reject(t)}Rs(){var t;null===(t=this.Es)||void 0===t||t.call(this)}get ended(){return"new"!==this.state&&"loading"!==this.state&&"tracking"!==this.state}csrfHeader(){return up.protocol.csrfHeader()}csrfParam(){return up.protocol.csrfParam()}csrfToken(){if(!this.isSafe()&&!this.isCrossOrigin())return up.protocol.csrfToken()}isCrossOrigin(){return e.isCrossOrigin(this.url)}xs(){const t={method:this.method,url:this.url,request:this,xhr:this.xhr,text:this.xhr.responseText,status:this.xhr.status,title:up.protocol.titleFromXHR(this.xhr),target:up.protocol.targetFromXHR(this.xhr),openLayer:up.protocol.openLayerFromXHR(this.xhr),acceptLayer:up.protocol.acceptLayerFromXHR(this.xhr),dismissLayer:up.protocol.dismissLayerFromXHR(this.xhr),eventPlans:up.protocol.eventPlansFromXHR(this.xhr),context:up.protocol.contextFromXHR(this.xhr),expireCache:up.protocol.expireCacheFromXHR(this.xhr),evictCache:up.protocol.evictCacheFromXHR(this.xhr),fail:this.fail};let n=up.protocol.methodFromXHR(this.xhr),i=up.protocol.locationFromXHR(this.xhr);return i&&(e.matchURLs(this.url,i)||n||(n="GET"),t.url=i),n&&(t.method=n),new up.Response(t)}Ls(t){return up.EventEmitter.fromEmitArgs(t,{layer:this.bindLayer,request:this,origin:this.origin})}emit(...t){return this.Ls(t).emit()}assertEmitted(...t){this.Ls(t).assertEmitted()}get description(){return this.method+" "+this.url}isBoundToSubtrees(t){return t=e.wrapList(t),e.some(this.bindFragments,(function(n){return e.some(t,(t=>t.contains(n)))}))}isBoundToLayers(t){return e.contains(t,this.bindLayer)}get age(){return new Date-this.builtAt}header(t){return this.headers[t]}fs(){for(let t of["target","failTarget","mode","failMode","context","failContext","originMode"])this.Ps(t);let t,e;(t=this.csrfHeader())&&(e=this.csrfToken())&&this.As(t,e),this.As(up.protocol.headerize("version"),up.version)}Ps(t){this.As(up.protocol.headerize(t),this[t])}As(t,n){e.isMissing(n)||((e.isOptions(n)||e.isArray(n))&&(n=e.safeStringifyJSON(n)),this.headers[t]=n)}mergeIfUnsent(t){if("new"!==this.state)return;if(!this.target||!t.target)return;let n=up.fragment.splitTarget(this.target+","+t.target);this.target=e.uniq(n).join(", "),this.Ps("target"),this.ls=e.uniq([...this.fragments,...t.fragments])}static tester(t,{except:n}={}){let i;if(e.isFunction(t))i=t;else if(t instanceof this)i=e=>t===e;else if(e.isString(t)){let e=new up.URLPattern(t);i=t=>e.test(t.url)}else i=e=>t;return n?t=>!up.cache.willHaveSameResponse(t,n)&&i(t):i}},e.delegatePromise(t.prototype,(function(){return this.Fe})),t)},6374:()=>{var t;const e="multipart/form-data",n=up.util;up.Request.XHRRenderer=(t=class XHRRenderer{constructor(t){this.zt=t}buildAndSend(t){const e=this.zt.xhr;this.Ds=n.copy(this.zt.params),this.zt.timeout&&(e.timeout=this.zt.timeout),e.open(this.$s(),this.zt.url);let i=this.Ms();i&&e.setRequestHeader("Content-Type",i);for(let t in this.zt.headers){let n=this.zt.headers[t];e.setRequestHeader(t,n)}Object.assign(e,t),e.send(this.Hs())}$s(){let t=this.zt.method;return this.zt.wrapMethod&&!this.zt.will302RedirectWithGET()&&(t=up.protocol.wrapMethod(t,this.Ds)),t}Ms(){return this.Ns(),this.Bs}Hs(){return this.Ns(),this.qs}Ns(){this.qs=this.zt.payload,this.Bs=this.zt.contentType,!this.qs&&this.zt.allowsPayload()&&(this.Bs||(this.Bs=this.Ds.hasBinaryEntries()?e:"application/x-www-form-urlencoded"),this.Bs===e?(this.Bs=null,this.qs=this.Ds.toFormData()):this.qs=this.Ds.toQuery().replace(/%20/g,"+"))}},n.memoizeMethod(t.prototype,{Ns:!0,$s:!0}),t)},6559:()=>{up.migrate={config:{}}},6607:()=>{const t=up.util;up.LinkCurrentURLs=class LinkCurrentURLs{constructor(e){if(this.Is=up.link.isSafe(e),this.Is){const n=e.getAttribute("href");n&&"#"!==n&&(this.zs=t.matchableURL(n));const i=e.getAttribute("up-href");i&&(this.Us=t.matchableURL(i));const r=e.getAttribute("up-alias");r&&(this.Vs=new up.URLPattern(r))}}isCurrent(t){var e,n;return!(!t||this.zs!==t&&this.Us!==t&&!(null===(n=null===(e=this.Vs)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1)))}isAnyCurrent(t){return t.some((t=>{var e,n;return this.zs===t||this.Us===t||(null===(n=null===(e=this.Vs)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1))}))}}},6689:()=>{const t=up.util,e=up.element;up.Selector=class Selector{constructor(e,n,i={}){var r;this.Ks=[];let s,o=n&&!document.contains(n);if(o||i.destroying||this.Ks.push(up.fragment.isNotDestroying),this.Xs=o||"any"===i.layer||1===up.layer.count,this.Xs)s=up.layer.root;else{if(null!==(r=i.layer)&&void 0!==r||(i.layer=t.presence(n,t.isElement)),this.$i=up.layer.getAll(i),!this.$i.length)throw new up.CannotMatch(["Unknown layer: %o",i.layer]);this.Ks.push((e=>t.some(this.$i,(t=>t.contains(e))))),s=this.$i[0]}this.Ws=up.fragment.expandTargets(e,Object.assign(Object.assign({},i),{layer:s})),this.Gs=this.Ws.join()||"match-none"}matches(t){return e.elementLikeMatches(t,this.Gs)&&this.Js(t)}closest(t){return this.Qs(t.closest(this.Gs))}descendants(t=document){return this.Ys(t.querySelectorAll(this.Gs))}firstDescendant(n){return this.Xs?(n||(n=document),this.Zs((t=>n.querySelectorAll(t)))):t.findResult(this.$i,(t=>this.Zs((n=>e.subtree(t.element,n)))))}subtree(t){return this.Ys(e.subtree(t,this.Gs))}Zs(e){return t.findResult(this.Ws,(t=>this.Ys(e(t))[0]))}Js(e){return e&&t.every(this.Ks,(t=>t(e)))}Qs(e){return t.presence(e,this.Js.bind(this))}Ys(e){return t.filter(e,this.Js.bind(this))}}},6705:()=>{let t="up.log.enabled",e=!1;try{e=!!(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem(t))}catch(t){}up.LogConfig=class LogConfig extends up.Config{constructor(){super((()=>({banner:!0,format:!0})))}get enabled(){return e}set enabled(n){e=n;try{null===sessionStorage||void 0===sessionStorage||sessionStorage.setItem(t,n?"1":"")}catch(t){}}}},6805:()=>{const t=up.util;up.CompilerPass=class CompilerPass{constructor(t,e,{layer:n,data:i,dataRoot:r,dataMap:s,meta:o}){n||(n=up.layer.get(t)||up.layer.current),this.L=t,this.eo=e,this.rt=n,this.no=i,this.io=r||t,this.ro=s,o||(o={}),o.layer=n,this.so=o}run(){this.rt.asCurrent((()=>{this.setCompileData();for(let t of this.eo)this.oo(t)}))}setCompileData(){if(this.no&&(this.io.upCompileData=this.no),this.ro)for(let t in this.ro)for(let e of this.uo(t))e.upCompileData=this.ro[t]}oo(t){var e,n;const i=this.ao(t);if(i.length){if(t.isDefault||up.puts("up.hello()",'Compiling %d× "%s" on %s',i.length,t.selector,this.rt),t.batch)this.co(t,i);else for(let e of i)this.ho(t,e);return null===(n=(e=up.migrate).postCompile)||void 0===n?void 0:n.call(e,i,t)}}ho(t,e){const n=[e];if(1!==t.length){const t=up.script.data(e);n.push(t,this.so)}const i=this.lo(t,e,n);up.destructor(e,i)}co(e,n){const i=[n];if(1!==e.length){const e=t.map(n,up.script.data);i.push(e,this.so)}this.lo(e,n,i)&&up.fail("Compilers with { batch: true } cannot return destructors")}lo(t,e,n){return up.error.guard((()=>t.apply(e,n)))}uo(e){return up.fragment.subtree(this.L,t.evalOption(e),{layer:this.rt})}ao(e){let n=this.uo(e.selector);return t.filter(n,(t=>{let n=t.upAppliedCompilers||(t.upAppliedCompilers=new Set);if(!n.has(e))return n.add(e),!0}))}}},6858:()=>{var t;const e=up.util,n=up.element,i=/^\s*(<!--[^-]*.*?-->\s*)*<(html|!DOCTYPE)\b/i;up.ResponseDoc=(t=class ResponseDoc{constructor({document:t,fragment:e,content:n,target:i,origin:r,data:s,cspInfo:o,match:u}){if(t?this.po(t,r,s):e?this.fo(e,r,s):this.do(n||"",r,i,s),this.mo=o||{},r){let t=up.fragment.tryToTarget(r);t&&(this.vo=this.select(t))}this.Mr=u}po(t,r,s){if(t instanceof Document)this.$r=t,this.bo=!0;else if(e.isString(t)){this.bo=i.test(t);let e=t=>[n.createBrokenDocumentFromHTML(t)],o=up.fragment.provideNodes(t,{origin:r,data:s,htmlParser:e});o[0]instanceof Document?this.$r=o[0]:this.$r=this.yo(o)}else this.$r=this.yo(t)}fo(t,e,i){let r=n.extractSingular(up.fragment.provideNodes(t,{origin:e,data:i}));this.$r=this.yo(r)}do(t,i,r,s){r||up.fail("must pass a { target } when passing { content }");let o=e.map(up.fragment.parseTargetSteps(r),"selector").join(),u=up.fragment.provideNodes(t,{origin:i,data:s}),a=n.createFromSelector(o,{content:u});this.$r=this.yo(a)}yo(t){t=e.wrapList(t);let n=document.createElement("up-document");return n.append(...t),n}rootSelector(){return up.fragment.toTarget(this.$r.children[0])}get title(){return this.wo(this._o)}Oo(){if(this.bo)return this.$r.head}wo(t){let e=this.Oo();return e&&t(e)}get metaTags(){return this.wo(up.history.findMetaTags)}get assets(){return this.wo((t=>{let n=up.script.findAssets(t);return e.map(n,(t=>(this.ko(t),this.So(t))))}))}get lang(){if(this.bo)return up.history.getLang(this.$r)}_o(t){var e;return null===(e=t.querySelector("title"))||void 0===e?void 0:e.textContent}select(t){return new up.FragmentFinder({selector:t,origin:this.vo,document:this.$r,match:this.Mr}).find()}selectSteps(t){return t.filter((t=>this.Eo(t)||this.xo(t)))}commitSteps(t){return t.filter((t=>this.commitElement(t.newElement)))}Eo(t){if(t.newElement)return!0;let e=this.select(t.selector);if(!e)return;let{selectEvent:n}=t;return n&&(n.newFragment=e,n.renderOptions=t.originalRenderOptions,up.emit(t.oldElement,n,{callback:t.selectCallback}),n.defaultPrevented)?void 0:(t.newElement=e,!0)}xo(t){if(!t.maybe)throw new up.CannotMatch}jo(t){let e=up.protocol.cspNonce();up.script.disableSubtree(t,(t=>!this.Co(t,e)))}Co(t,n){var i;let r=up.fragment.config.runScripts;return!0===r&&(null===(i=this.mo.declaration)||void 0===i?void 0:i.includes("'strict-dynamic'"))?n&&n===t.nonce:e.evalOption(r,t)}So(t){return n.revivedClone(t)}Fo(t){if(this.$r instanceof Document)for(let e of n.subtree(t,":is(noscript, script, audio, video):not(.up-keeping, .up-keeping *)")){let t=this.So(e);e.replaceWith(t)}}ko(t){up.script.adoptNoncesInSubtree(t,this.mo.nonces)}commitElement(t){if(this.$r.contains(t))return this.ko(t),this.jo(t),t.remove(),!0}finalizeElement(t){this.Fo(t)}},e.memoizeMethod(t.prototype,{Oo:!0}),t)},6939:()=>{up.error=function(){function t(t){if("object"!=typeof(e=t)||!("AbortError"===e.name||e instanceof up.RenderResult||e instanceof up.Response))throw t;var e}function e(t,...e){try{return t(...e)}catch(t){reportError(t)}}return{fail:function(...t){throw new up.Error(t)},throwCritical:t,muteUncriticalRejection:function(e){return e.catch(t)},muteUncriticalSync:function(e){try{return e()}catch(e){t(e)}},guard:e,guardFn:function(t){return(...n)=>e((()=>t(...n)))}}}(),up.fail=up.error.fail},6973:(t,e,n)=>{n(3278);const i=up.util,r=up.element;up.fragment=function(){function t(t){let e=r.tagName(t);if(e.startsWith("up-"))return e}const e=["[up-id]","[id]","html","head","body"],n=new up.Config((()=>({badTargetClasses:[/^up-/],strongTargetDerivers:e,targetDerivers:[...e,"main","[up-main]",t,"link[rel][type]","link[rel=preload][href]","link[rel=preconnect][href]","link[rel=prefetch][href]","link[rel]","meta[property]","*[name]","form[action]","a[href]","[class]","[up-flashes]","form"],verifyDerivedTarget:!0,renderOptions:{hungry:!0,keep:!0,saveScroll:!0,saveFocus:!0,focus:"keep",focusVisible:"auto",abort:"target",failOptions:!0,feedback:!0},navigateOptions:{cache:"auto",revalidate:"auto",fallback:!0,focus:"auto",scroll:"auto",history:"auto",peel:!0},match:"region",runScripts:!1,autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","keep","target-if-lost"],autoScroll:["hash","layer-if-main"],autoRevalidate:t=>t.expired,skipResponse:s,normalizeKeepHTML:d})));function s({response:t,expiredResponse:e}){return!t.text||t.text===(null==e?void 0:e.text)}function o(t,e={}){return t=b(t,e),r.closestAttr(t,"up-source")}function u(t){return i.normalizeURL(t,{hash:!1})}function a(t){let e=r.closestAttr(t,"up-time");if(e&&"false"!==e)return/^\d+$/.test(e)&&(e=1e3*Number(e)),new Date(e)}function c(t){let e=r.closestAttr(t,"up-etag");if(e&&"false"!==e)return e}i.delegate(n,["mainTargets"],(()=>up.layer.config.any));const h=up.mockable(((...t)=>{let e=k(t);return new up.RenderJob(e).execute()})),l=up.mockable(((...t)=>{const e=k(t);return h(Object.assign(Object.assign({},e),{navigate:!0}))}));function p(t){let{oldElement:e,newElement:n,newData:i,renderOptions:s}=t;const o=["Keeping fragment %o",e],u=r.callbackAttr(t.oldElement,"up-on-keep",{exposedKeys:["newFragment","newData"]}),a=up.event.build("up:fragment:keep",{newFragment:n,newData:i,renderOptions:s});return up.emit(e,a,{log:o,callback:u})}function f(t,e=m(t)){var r;return null!==(r=t.upKeepIdentity)&&void 0!==r?r:t.upKeepIdentity=i.copy(function(t,e){return"same-html"===e?n.normalizeKeepHTML(t.outerHTML):"same-data"!==e||up.data(t)}(t,e))}function d(t){let e=["up-etag","up-source","up-time","nonce",...up.script.config.nonceableAttributes],n=new RegExp(`\\s+(${e.join("|")})="[^"]*"`,"g");return(t=t.replace(/<[^<]+>/g,(t=>t.replace(n,"")))).replace(/^[ \t]+/gm,"")}function m(t){return r.booleanOrStringAttr(t,"up-keep")}function g(t){return!t.closest(".up-destroying")}function v(t){return t.isConnected&&g(t)}function b(...t){let[e,n,s]=w(t);return i.isElementLike(n)?r.get(n):e?y(e,n,s):new up.FragmentFinder({selector:n,origin:s.origin,layer:s.layer,match:s.match}).find()}function y(...t){let[e,n,i]=w(t);return new up.Selector(n,e,i).firstDescendant(e)}function w(t){return i.args(t,"val","val","options")}function _(...t){let[e,n,r]=w(t);return i.isElement(n)?[n]:i.isList(n)?n:new up.Selector(n,e,r).descendants(e)}function O(t,e,n={}){return new up.Selector(e,t,n).subtree(t)}function k(t){const e=i.parseArgIntoOptions(t,"target");return i.isElement(e.target)&&(e.origin||(e.origin=e.target)),e}up.macro("[up-keep]",(t=>f(t)));const S=/^(onFail|on|fail)?(.+)$/;function E(t,e){return i.presence(t,i.isString)||x(t,e)||function(t){throw new up.CannotTarget(function(t){return`Cannot derive good target selector from a <${r.tagName(t)}> element without identifying attributes. Try setting an [id] or configure up.fragment.config.targetDerivers.`}(t))}(t)}function x(t,e={}){let s=e.strong?n.strongTargetDerivers:n.targetDerivers;return i.findResult(s,(function(s){let o=function(t,e){if(i.isFunction(e))return e(t);if(t.matches(e))try{return function(t,e){let{includePath:n,excludeRaw:i}=r.parseSelector(e);if(1!==n.length)throw new up.CannotParse(e);let{tagName:s,id:o,classNames:u,attributes:a}=n[0],c="";"*"===s?c+=r.tagName(t):s&&(c+=s);for(let t of u)c+=r.classSelector(t);o&&(c+=r.idSelector(o));for(let e in a){let n=a[e]||t.getAttribute(e);if("id"===e)c+=r.idSelector(n);else if("class"===e)for(let e of j(t))c+=r.classSelector(e);else c+=r.attrSelector(e,n)}return i&&(c+=i),c}(t,e)}catch(t){if(t instanceof up.CannotParse)return e;throw t}}(t,s);if(o&&function(t,e,i={}){var r;let s=null!==(r=i.verify)&&void 0!==r?r:n.verifyDerivedTarget;return!v(e)||!s||up.fragment.get(t,Object.assign({layer:e},i))===e}(o,t,e))return o}))}function j(t){return i.filter(t.classList,(t=>!i.some(n.badTargetClasses,(e=>{return n=e,r=t,i.isRegExp(n)?n.test(r):n===r;var n,r}))))}const C=/:main\b/,F=/:layer\b/,T=/:origin\b/;function R(t){return C.test(t)}function L(t,e={}){const{layer:n}=e;"new"===n||n instanceof up.Layer||up.fail("Must pass an up.Layer as { layer } option, but got %o",n),t=i.copy(i.wrapList(t));const r=[];for(;t.length;){let s=t.shift();if(!0===s&&(s=":main"),R(s)){let n=P(e),i=up.layer.mainTargets(n).map((t=>s.replace(C,t)));t.unshift(...i)}else if(F.test(s)){if("new"===n||n.opening)continue;let i=E(n.getFirstSwappableElement(),e);t.unshift(s.replace(F,i))}else i.isElementLike(s)?r.push(E(s,e)):i.isString(s)&&r.push(D(s,e))}return i.uniq(r)}function P({layer:t,mode:e}){return"new"===t?e||up.fail('Must pass a { mode } option together with { layer: "new" }'):t.mode}function A(t,{origin:e}={}){return t.replace(T,(function(n){if(e)return E(e);up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',n,t)}))}function D(t,e){return i.isString(t)?(up.migrate.resolveOrigin||A)(t,e):t}function $(t){return i.getComplexTokens(t)}const M=/^([\w-]+|\*)?(#|\.|[:[][a-z-]{3,})/;function H(t,{origin:e,originLayer:n,data:s,htmlParser:o=r.createNodesFromHTML}={}){if(i.isString(t)&&M.test(t)){let[r,o]=i.parseScalarJSONPairs(t)[0];s=Object.assign(Object.assign({},s),o),t=up.fragment.get(r,{layer:"closest",origin:e,originLayer:n})||up.fail('Cannot find template "%s"',t)}return i.isString(t)&&(t=o(t)),function(t){return i.isElement(t)&&t.matches("template, script[type]")&&!up.script.isScript(t)}(t)&&(t=N(t,s,{htmlParser:o})),i.wrapList(t)}function N(t,e={},{origin:n,htmlParser:i}={}){var s;let o=b(t,{origin:n})||up.fail("Template not found: %o",t),u=null!==(s=up.emit(o,"up:template:clone",{data:e,nodes:null,log:["Using template %o",t]}).nodes)&&void 0!==s?s:function(t,e=r.createNodesFromHTML){return e(t.innerHTML)}(o,i);for(let t of u)t.upTemplateData=e;return u}return up.on("up:framework:boot",(function(){const{documentElement:t}=document;if(up.hello(t),t.setAttribute("up-source",u(location.href)),!up.browser.canPushState())return up.warn("Cannot push history changes. Next render pass with history will load a full page.")})),{config:n,reload:function(...t){var e,n;const s=k(t);s.target||(s.target=":main");const u=b(s.target,s);return s.url||(s.url=o(u)),s.headers=i.merge(s.headers,function(t){let e={},n=a(t);n&&(e["If-Modified-Since"]=n.toUTCString());let i=c(t);return i&&(e["If-None-Match"]=i),e}(u)),(s.keepData||r.booleanAttr(u,"up-keep-data"))&&(s.data=up.data(u)),null===(n=(e=up.migrate).postprocessReloadOptions)||void 0===n||n.call(e,s),h(s)},destroy:function(...t){var e,n;const i=k(t);return(i.element=b(i.target,i))&&new up.Change.DestroyFragment(i).execute(),null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.destroy()")},render:h,navigate:l,get:b,getFirstDescendant:y,all:_,subtree:O,contains:function(t,e){return i.isElement(e)?r.contains(t,e)&&up.layer.get(t).contains(e):O(t,e).length>0},closest:function(t,e,n){return new up.Selector(e,t,n).closest(t)},source:o,normalizeSource:u,visit:function(t,e){return l(Object.assign(Object.assign({},e),{url:t}))},markAsDestroying:function(t){t.classList.add("up-destroying"),t.setAttribute("inert","")},emitInserted:function(t){if(!t.upInserted)return t.upInserted=!0,up.emit(t,"up:fragment:inserted",{log:["Inserted fragment %o",t]})},emitDestroyed:function(t,e){var n;const i=null!==(n=e.log)&&void 0!==n?n:["Destroyed fragment %o",t],r=e.parent||document;return up.emit(r,"up:fragment:destroyed",{fragment:t,parent:r,log:i})},emitKeep:p,keepPlan:function(t){if(!1===t.keep)return;const{oldElement:e,newElement:n}=t;let s,o=m(e);if(!o)return;let u=up.fragment.toTarget(e);const a={layer:t.layer};if(s=t.descendantsOnly?up.fragment.get(n,u,a):r.subtreeFirst(n,u,a),!s)return;if(!1===m(s))return;let c=f(e,o),h=f(s,o);if(!i.isEqual(c,h))return;const l={oldElement:e,newElement:s,newData:up.script.data(s),renderOptions:t};return p(l).defaultPrevented?void 0:l},defaultNormalizeKeepHTML:d,successKey:function(t){let e=S.exec(t);if(e){let[t,n,r]=e;switch(n){case"onFail":return"on"+i.upperCaseFirst(r);case"fail":return i.lowerCaseFirst(r)}}},failKey:function(t){let e=S.exec(t);if(e){let[t,n,r]=e;switch(n){case"on":return"onFail"+i.upperCaseFirst(r);case void 0:return"fail"+i.upperCaseFirst(r)}}},expandTargets:L,resolveOrigin:D,toTarget:E,tryToTarget:x,isTargetable:function(t,e){return!!x(t,e)},matches:function(t,e,n={}){if(t=r.get(t),i.isElement(e)){let n=x(e);return n&&t.matches(n)}return new up.Selector(e,t,n).matches(t)},hasAutoHistory:function(t,e){let i=L(n.autoHistoryTargets,{layer:e}).join();for(let e of t)if(r.subtree(e,i).length)return!0;return up.puts("up.render()","Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets"),!1},time:a,etag:c,shouldRevalidate:function(t,e,r={}){return t.fromCache&&i.evalAutoOption(r.revalidate,n.autoRevalidate,e)},abort:function(...t){let e,n,r=k(t),{reason:s,newLayer:o}=r;if(r.target)n=_(r.target,r),e=t=>t.isBoundToSubtrees(n),s||(s="Aborting requests within fragment");else{let t=up.layer.getAll(r);n=i.map(t,"element"),e=e=>e.isBoundToLayers(t),s||(s="Aborting requests within "+t.join(", "))}up.network.abort((t=>t.abortable&&e(t)),Object.assign(Object.assign({},r),{reason:s}));for(let t of n)up.emit(t,"up:fragment:aborted",{reason:s,newLayer:o,log:!1})},onAborted:function(t,e){let n=up.on("up:fragment:aborted",{guard:e=>e.target.contains(t)},e);return up.destructor(t,n),n},onFirstIntersect:function(t,e,{margin:n=0}={}){if(r.isIntersectingWindow(t,{margin:n}))return void e();let i=new IntersectionObserver((function(t){for(let n of t)if(n.isIntersecting)return s(),void e()}),{rootMargin:`${n}px`}),s=()=>i.disconnect();i.observe(t),up.destructor(t,s)},splitTarget:$,parseTargetSteps:function(t,e={}){var n;let i=e.defaultPlacement||"swap",r=null!==(n=e.defaultMaybe)&&void 0!==n&&n,s=[],o=$(t);for(let t of o){if(":none"===t)continue;let n=i,o=r;t=t.replace(/\b::?(before|after|content)\b/,((t,e)=>(n=e,""))),t=t.replace(/\b:maybe\b/,(()=>(o=!0,"")));const u=Object.assign(Object.assign({},e),{selector:t,placement:n,maybe:o,originalRenderOptions:e});s.push(u)}return s},isAlive:v,isNotDestroying:g,targetForSteps:function(t){let e=t.filter((t=>{var e;return!t.maybe||(null===(e=t.oldElement)||void 0===e?void 0:e.isConnected)}));return i.map(e,"selector").join(", ")||":none"},compressNestedSteps:function(t){if(t.length<2)return t;let e=i.uniqBy(t,"oldElement");return e=i.reject(e,(t=>function(t,e){return i.some(t,(function(t){return t!==e&&("swap"===t.placement||"content"===t.placement)&&t.oldElement.contains(e.oldElement)}))}(e,t))),e},containsMainPseudo:R,insertTemp:function(...t){let[e,n="beforeend",s]=i.args(t,"val",i.isAdjacentPosition,"val"),o=H(s,{origin:e}),u=r.wrapIfRequired(o),a=document.contains(u)&&r.documentPosition(u);return e.insertAdjacentElement(n,u),a?()=>{a[0].insertAdjacentElement(a[1],u)}:(up.hello(u),()=>up.destroy(u))},provideNodes:H,cloneTemplate:N,trackSelector:function(...t){let e=i.args(t,"val","options","callback");return new up.SelectorTracker(...e).start()}}}(),up.reload=up.fragment.reload,up.destroy=up.fragment.destroy,up.render=up.fragment.render,up.navigate=up.fragment.navigate,up.visit=up.fragment.visit,up.template={clone:up.fragment.cloneTemplate},i.delegate(up,["context"],(()=>up.layer.current))},7080:()=>{const t=up.util,e=up.element;up.OptionsParser=class OptionsParser{constructor(t,e,n={}){this.R=e,this.st=t,this.To=n.fail,this.Ro=n.closest,this.Lo=n.attrPrefix||"up-",this.Po=n.defaults||{}}string(t,n){this.parse(e.attr,t,n)}boolean(t,n){this.parse(e.booleanAttr,t,n)}number(t,n){this.parse(e.numberAttr,t,n)}booleanOrString(t,n){this.parse(e.booleanOrStringAttr,t,n)}booleanOrNumber(t,n){this.parse(e.booleanOrNumberAttr,t,n)}json(t,n){this.parse(e.jsonAttr,t,n)}callback(t,n={}){this.parse(((t,i)=>e.callbackAttr(t,i,n)),t,n)}parse(e,n,i={}){var r,s;const o=t.wrapList(null!==(r=i.attr)&&void 0!==r?r:this.Ao(n));let u,a=this.R[n];for(let t of o)null!=a||(a=this.Do(e,this.st,t));if(null!=a||(a=null!==(s=i.default)&&void 0!==s?s:this.Po[n]),t.isDefined(a)){let t=i.normalize;t&&(a=t(a)),this.R[n]=a}if(this.To&&(u=up.fragment.failKey(n))){const n=t.compact(t.map(o,(t=>this.$o(t))));this.parse(e,u,Object.assign(Object.assign({},i),{attr:n}))}}include(t,e){let n=t(this.st,this.R,Object.assign({defaults:this.Po},e));Object.assign(this.R,n)}Do(t,n,i){return this.Ro?e.closestAttr(n,i,t):t(n,i)}$o(t){return this.Mo(t,this.Lo+"on-")||this.Mo(t,this.Lo)}Mo(t,e){if(t.startsWith(e))return`${e}fail-${t.substring(e.length)}`}Ao(e){return`${this.Lo}${t.camelToKebabCase(e)}`}}},7115:()=>{window.up={version:"3.11.0-rc12"}},7275:()=>{const t=up.util;up.FIFOCache=class FIFOCache{constructor({capacity:e=10,normalizeKey:n=t.identity}={}){this.Ho=new Map,this.No=e,this.Bo=n}get(t){return t=this.Bo(t),this.Ho.get(t)}set(t,e){if(this.Ho.size===this.No){let t=this.Ho.keys().next().value;this.Ho.delete(t)}t=this.Bo(t),this.Ho.set(t,e)}clear(){this.Ho.clear()}}},7294:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const e=up.util;class Route{constructor(){this.varyHeaders=new Set,this.requests=[]}matchBest(t){let n=this.requests.filter((e=>this.satisfies(e,t)));return e.last(n)}delete(t){e.remove(this.requests,t)}put(t){this.requests.push(t)}updateVary(t){for(let e of t.varyHeaderNames)this.varyHeaders.add(e)}satisfies(t,n){return t===n||e.every(this.varyHeaders,(i=>{let r=t.header(i),s=n.header(i);if("X-Up-Target"===i||"X-Up-Fail-Target"===i){if(!r)return!0;if(!s)return!1;let t=up.fragment.splitTarget(r),n=up.fragment.splitTarget(s);return e.containsAll(t,n)}return r===s}))}}up.Request.Cache=class Cache{constructor(){this.reset()}reset(){this.qo={},this.Io=[]}get(t){t=this.zo(t);let e=this.Uo(t),n=e.matchBest(t);if(n){if(this.Vo(n))return n;this.Ko(t,e)}}put(e){return t(this,void 0,void 0,(function*(){e=this.zo(e);let t=this.Uo(e),{response:n}=e;n&&t.updateVary(n);let i=t.requests.filter((n=>t.satisfies(e,n)));for(let t of i)this.Ko(t);e.cacheRoute=t,t.put(e),this.Io.push(e),this.Xo()}))}track(n,i,r={}){var s;return t(this,void 0,void 0,(function*(){let t;i.trackedRequest=n,i.state="tracking",t=n.ended&&n.response?n.response:yield e.always(n),t instanceof up.Response?r.force||n.cacheRoute.satisfies(n,i)?(i.fromCache=!0,t=e.variant(t,{request:i}),i.respondWith(t),e.delegate(i,["expired","state"],(()=>n))):(delete i.trackedRequest,i.state="new",null===(s=r.onIncompatible)||void 0===s||s.call(r,i)):(i.state=n.state,i.Fs(t))}))}willHaveSameResponse(t,e){return t===e||t===e.trackedRequest}evict(t=!0,e){this.Wo(t,e,(t=>this.Ko(t)))}expire(t=!0,e){this.Wo(t,e,(t=>t.expired=!0))}reindex(t){this.Ko(t),delete t.cacheRoute,this.put(t)}Ko(t){var n;e.remove(this.Io,t),null===(n=t.cacheRoute)||void 0===n||n.delete(t)}Uo(t){var e,n;return t.cacheRoute||(e=this.qo)[n=t.description]||(e[n]=new Route)}Vo(t){return t.age<up.network.config.cacheEvictAge}get currentSize(){return this.Io.length}get No(){return up.network.config.cacheSize}Xo(){for(let t=0;t<this.currentSize-this.No;t++)this.Ko(this.Io[0])}Wo(t=!0,n,i){let r=up.Request.tester(t,n),s=e.filter(this.Io,r);e.each(s,i)}zo(t){return e.wrapValue(up.Request,t)}}},7304:function(){var t,e=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const n=up.element,i=up.util;up.Layer.Overlay=((t=class Overlay extends up.Layer{keys(){return[...super.keys(),...this.constructor.VISUAL_KEYS,"onOpened","onAccept","onAccepted","onDismiss","onDismissed","acceptEvent","dismissEvent","acceptLocation","dismissLocation","opening"]}constructor(t){super(t),!0===this.dismissable?this.dismissable=["button","key","outside"]:!1===this.dismissable?this.dismissable=[]:this.dismissable=i.getSimpleTokens(this.dismissable),this.acceptLocation&&(this.acceptLocation=new up.URLPattern(this.acceptLocation)),this.dismissLocation&&(this.dismissLocation=new up.URLPattern(this.dismissLocation))}callback(t){let e=this[t];if(e)return e.bind(this)}createElement(t){this.nesting||(this.nesting=this.Go());const e=i.compactObject(i.pick(this,["align","position","size","class","nesting"]));this.element=this.affixPart(t,null,e)}createBackdropElement(t){this.backdropElement=this.affixPart(t,"backdrop")}createViewportElement(t){this.viewportElement=this.affixPart(t,"viewport",{"up-viewport":""})}createBoxElement(t){this.boxElement=this.affixPart(t,"box")}createContentElement(t){this.contentElement=this.affixPart(t,"content")}setContent(t){this.contentElement.append(t),this.onContentSet()}onContentSet(){}createDismissElement(t){return this.dismissElement=this.affixPart(t,"dismiss",{"up-dismiss":'":button"',"aria-label":this.dismissARIALabel}),n.affix(this.dismissElement,'span[aria-hidden="true"]',{text:this.dismissLabel})}affixPart(t,e,i={}){return n.affix(t,this.selector(e),i)}static selector(t){return i.compact(["up",this.mode,t]).join("-")}Go(){const{parent:t}=this;return this.mode===t.mode?1+t.Go():0}setupHandlers(){var t,e;super.setupHandlers(),this.overlayFocus=new up.OverlayFocus(this),this.Jo("button")&&this.createDismissElement(this.getBoxElement()),this.Jo("outside")&&(this.viewportElement?up.on(this.viewportElement,"up:click",(t=>{t.target===this.viewportElement&&this.Qo(t,!0)})):this.Yo=this.parent.on("up:click",((t,e)=>{if(!up.layer.isWithinForeignOverlay(e)){const n=this.origin&&this.origin.contains(e);this.Qo(t,n)}}))),this.Jo("key")&&(this.Zo=up.event.onEscape((t=>this.onEscapePressed(t)))),this.registerAttrCloser("up-accept",((t,e)=>{this.accept(t,e)})),this.registerAttrCloser("up-dismiss",((t,e)=>{this.dismiss(t,e)})),null===(e=(t=up.migrate).registerLayerCloser)||void 0===e||e.call(t,this),this.tu(this.acceptEvent,this.accept),this.tu(this.dismissEvent,this.dismiss),this.on("up:click","label[for]",((t,e)=>this.eu(t,e)))}eu(t,e){let i=e.getAttribute("for"),r=up.form.fieldSelector(n.idSelector(i)),s=up.fragment.all(r,{layer:"any"}),o=up.fragment.all(r,{layer:this});if(s.length>1&&o[0]!==s[0]){t.preventDefault();const e=o[0];e.focus(),e.matches("input[type=checkbox], input[type=radio]")&&e.click()}}Qo(t,e){up.log.putsEvent(t),e&&up.event.halt(t),up.error.muteUncriticalSync((()=>this.dismiss(":outside",{origin:t.target})))}onEscapePressed(t){if(this.isFront()){let e=up.form.focusedField();e?e.blur():this.Jo("key")&&(up.event.halt(t,{log:!0}),up.error.muteUncriticalSync((()=>this.dismiss(":key"))))}}registerAttrCloser(t,e){this.nu(t,e),this.iu(t,e)}nu(t,e){this.on("up:click",`[${t}]:not(form)`,((i,r)=>{up.event.halt(i,{log:!0});const s=n.jsonAttr(r,t);this.ru(r,s,e)}))}iu(t,e){this.on("submit",`[${t}]`,((t,n)=>{up.event.halt(t,{log:!0});const i=up.Params.fromForm(n);this.ru(n,i,e)}))}ru(t,e,n){const i={origin:t},r=new up.OptionsParser(t,i);r.booleanOrString("animation"),r.string("easing"),r.number("duration"),r.string("confirm"),up.error.muteUncriticalSync((()=>n(e,i)))}tu(t,e){if(t)return this.on(t,(t=>{t.preventDefault(),up.error.muteUncriticalSync((()=>e.call(this,t,{response:t.response})))}))}tryAcceptForLocation(t){this.su(this.acceptLocation,this.accept,t)}tryDismissForLocation(t){this.su(this.dismissLocation,this.dismiss,t)}su(t,e,n){let i,r;if(t&&(i=this.location)&&(r=t.recognize(i))){const t=Object.assign(Object.assign({},r),{location:i});up.error.muteUncriticalSync((()=>e.call(this,t,n)))}}teardownHandlers(){var t,e;super.teardownHandlers(),null===(t=this.Yo)||void 0===t||t.call(this),null===(e=this.Zo)||void 0===e||e.call(this),this.overlayFocus.teardown()}destroyElements(t){const e=Object.assign(Object.assign({},t),{animation:()=>this.startCloseAnimation(t),onFinished:()=>{var e;this.onElementsRemoved(),null===(e=t.onFinished)||void 0===e||e.call(t)},log:!1});up.destroy(this.element,e)}onElementsRemoved(){}ou(t={}){const e=up.animate(this.getBoxElement(),t.boxAnimation,t);let n;return this.backdrop&&!up.motion.isNone(t.boxAnimation)&&(n=up.animate(this.backdropElement,t.backdropAnimation,t)),Promise.all([e,n])}startOpenAnimation(t={}){var n;return e(this,void 0,void 0,(function*(){let e=null!==(n=t.animation)&&void 0!==n?n:this.evalOption(this.openAnimation);yield this.ou({boxAnimation:e,backdropAnimation:"fade-in",easing:t.easing||this.openEasing,duration:t.duration||this.openDuration}),this.wasEverVisible=!0}))}startCloseAnimation(t={}){var e;let n=this.wasEverVisible&&(null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.closeAnimation));return this.ou({boxAnimation:n,backdropAnimation:"fade-out",easing:t.easing||this.closeEasing,duration:t.duration||this.closeDuration})}accept(t=null,e={}){return this.uu("accept",t,e)}dismiss(t=null,e={}){return this.uu("dismiss",t,e)}Jo(t){return i.contains(this.dismissable,t)}uu(t,e,n){return n=Object.assign(Object.assign({},n),{verb:t,value:e,layer:this}),new up.Change.CloseLayer(n).execute()}getFirstSwappableElement(){return this.getContentElement().children[0]}toString(){return`${this.mode} overlay`}}).VISUAL_KEYS=["mode","position","align","size","origin","class","backdrop","dismissable","dismissLabel","dismissARIALabel","openAnimation","closeAnimation","openDuration","closeDuration","openEasing","closeEasing","trapFocus"],t.UNSET_VISUALS=i.spanObject(t.VISUAL_KEYS,void 0),t)},7339:()=>{},7412:()=>{},7687:()=>{const t=up.element,e=up.util;up.Layer=class Layer extends up.Record{keys(){return["element","stack","history","mode","context","lastScrollTops","lastFocusCapsules"]}defaults(){return{context:{},lastScrollTops:up.viewport.newStateCache(),lastFocusCapsules:up.viewport.newStateCache()}}constructor(t={}){super(t),e.assert(this.mode)}setupHandlers(){up.link.convertClicks(this),this.au=up.on("up:location:changed",(t=>this.cu(t)))}teardownHandlers(){var t;null===(t=this.au)||void 0===t||t.call(this)}mainTargets(){return up.layer.mainTargets(this.mode)}sync(){}accept(){throw new up.NotImplemented}dismiss(){throw new up.NotImplemented}peel(t){this.stack.peel(this,t)}evalOption(t){return e.evalOption(t,this)}isCurrent(){return this.stack.isCurrent(this)}isFront(){return this.stack.isFront(this)}isRoot(){return this.stack.isRoot(this)}isOverlay(){return this.stack.isOverlay(this)}isOpen(){return this.stack.isOpen(this)}isClosed(){return this.stack.isClosed(this)}get parent(){return this.stack.parentOf(this)}get child(){return this.stack.childOf(this)}get ancestors(){return this.stack.ancestorsOf(this)}get descendants(){return this.stack.descendantsOf(this)}get subtree(){return[this,...this.descendants]}get index(){var t;return null!==(t=this.hu)&&void 0!==t?t:this.hu=this.stack.indexOf(this)}getContentElement(){return this.contentElement||this.element}getBoxElement(){return this.boxElement||this.element}getFocusElement(){return this.getBoxElement()}getFirstSwappableElement(){throw new up.NotImplemented}contains(t){return t.closest(up.layer.anySelector())===this.element}on(...t){return this.lu(t).bind()}off(...t){return this.lu(t).unbind()}lu(t){return up.EventListenerGroup.fromBindArgs(t,{guard:t=>this.pu(t),elements:[this.element],baseLayer:this})}pu(t){return this.contains(t.target)}wasHitByMouseEvent({clientX:t,clientY:e}){const n=document.elementFromPoint(t,e);return!n||this.contains(n)}Ls(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})}emit(...t){return this.Ls(t).emit()}isDetached(){return!this.element.isConnected}saveHistory(){e.assert(this.isFront()),this.showsLiveHistory()&&(this.fu=this.title,this.du=this.metaTags,this.mu=this.location,this.gu=this.lang)}restoreHistory(){this.showsLiveHistory()&&(this.mu&&up.history.push(this.mu),this.fu&&(document.title=this.fu),this.du&&up.history.updateMetaTags(this.du),e.isString(this.gu)&&up.history.updateLang(this.gu))}asCurrent(t){return this.stack.asCurrent(this,t)}updateHistory(t){var n,i;e.isString(t.location)&&this.vu(t.location,{push:!0}),up.history.config.updateMetaTags&&e.isList(t.metaTags)&&(null===(i=null===(n=up.migrate)||void 0===n?void 0:n.warnOfHungryMetaTags)||void 0===i||i.call(n,t.metaTags),this.bu(t.metaTags)),e.isString(t.title)&&this.yu(t.title),e.isString(t.lang)&&this.wu(t.lang)}showsLiveHistory(){return this.history&&this.isFront()}cu({location:t}){this.showsLiveHistory()&&this.vu(t,{push:!1})}get title(){return this.showsLiveHistory()?document.title:this.fu}yu(t){this.fu=t,this.showsLiveHistory()&&(document.title=t)}get metaTags(){return this.showsLiveHistory()?up.history.findMetaTags():this.du}bu(t){this.du=t,this.showsLiveHistory()&&up.history.updateMetaTags(t)}get lang(){return this.showsLiveHistory()?up.history.getLang():this.gu}wu(t){this.gu=t,this.showsLiveHistory()&&up.history.updateLang(t)}get location(){return this.showsLiveHistory()?up.history.location:this.mu}vu(t,{push:e}){let n=this.mu,i=up.history.location;this.mu=t,t!==i&&this.showsLiveHistory()&&e&&up.history.push(t),t===n||this.opening||this.emit("up:layer:location:changed",{location:t,previousLocation:n,log:!1})}selector(t){return this.constructor.selector(t)}static selector(t){throw new up.NotImplemented}toString(){throw new up.NotImplemented}affix(...e){return t.affix(this.getFirstSwappableElement(),...e)}[e.isEqual.key](t){return this.constructor===t.constructor&&this.element===t.element}hasFocus(){let t=document.activeElement;return t!==document.body&&this.element.contains(t)}reset(){Object.assign(this,this.defaults())}}},7718:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};up.RenderResult=class RenderResult extends up.Record{keys(){return["fragments","layer","target","renderOptions","finished"]}defaults(){return{fragments:[],finished:Promise.resolve()}}get none(){return!this.fragments.length}get fragment(){return this.fragments[0]}get ok(){return!this.renderOptions.didFail}static both(t,e,n=!0){return e?new this(Object.assign(Object.assign({},t),{fragments:t.fragments.concat(e.fragments),finished:n&&this.mergeFinished(t,e)})):t}static mergeFinished(e,n){return t(this,void 0,void 0,(function*(){return this.both(yield e.finished,yield n.finished,!1)}))}}},7781:(t,e,n)=>{n(4518),up.element=function(){const t=up.util;function e(t,e){const i=t.querySelectorAll(e);return n(t,e)?[t,...i]:i}function n(e,n){return t.isElement(e)&&e.matches(n)}function i(...e){const n=e.pop();return t.isElement(n)?n:t.isString(n)?function(...e){let[n=document,i]=t.args(e,"val","val");return n.querySelector(i)}(...e,n):t.isList(n)?(n.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",n),n[0]):n}function r(...e){return t.flatMap(e,s)}function s(e){return t.isString(e)?document.querySelectorAll(e):t.wrapList(e)}function o(e,n){return n===$(e)?t.noop:(u(e,n),()=>u(e,!n))}function u(t,e){e?(t.removeAttribute("hidden"),"none"===t.style.display&&(t.style.display="")):t.setAttribute("hidden","")}function a(e,n){for(let i in n){const r=n[i];t.isGiven(r)?e.setAttribute(i,r):e.removeAttribute(i)}}function c(t,e){t.parentNode.insertBefore(e,t)}function h(e,n={}){let i,r,s,{includePath:o}=p(e);for(let t of o){let{tagName:e}=t;e&&"*"!==e||(e="div"),r=document.createElement(e),i||(i=r),l(r,t),null==s||s.appendChild(r),s=r}for(let e in n){let r=n[e];"class"===e?C(i,t.wrapList(r)):"style"===e?A(i,r):"text"===e?i.textContent=r:"content"===e?t.isString(r)?i.innerHTML=r:i.append(...t.wrapList(r)):i.setAttribute(e,r)}return i}function l(t,{id:e,classNames:n,attributes:i}){e&&(t.id=e);for(let[e,n]of Object.entries(i))t.setAttribute(e,n);C(t,n)}function p(e){let n;const{masked:i,restore:r}=t.expressionOutline(e),s=i.replace(/:not\([^)]*\)/,(function(t){return n=r(t),""}));let o=r(s);return{includePath:s.split(/[ >]+/).map((function(n){let i={tagName:null,classNames:[],id:null,attributes:{}};return(n=(n=(n=(n=n.replace(/^[\w-*]+/,(function(t){return i.tagName=t,""}))).replace(/#([\w-]+)/,(function(t,e){return i.id=e,""}))).replace(/\.([\w-]+)/g,(function(t,e){return i.classNames.push(e),""}))).replace(/\[[^\]]*]/g,(function(e){e=r(e);let[n,s,o,u,a]=e.match(/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/);return u||(u='"'),i.attributes[s]=a?t.parseString(u+a+u):"",""})))&&up.fail("Cannot parse selector: "+e),i})),includeRaw:o,excludeRaw:n}}const f=["HTML","BODY","HEAD","TITLE"],d=up.mockable((t=>t.matches(f.join())));function m(e,n){return t.isGiven(n)?`[${e}="${n=n.replace(/"/g,'\\"')}"]`:`[${e}]`}function g(t){return v(b(t))}function v(e){if(1===e.length&&t.isElementLike(e[0]))return e[0];up.fail("Expected a single element, but got %d elements",e.length)}function b(t){t=t.trim();const e=document.createRange();return e.setStart(document.body,0),e.createContextualFragment(t).childNodes}function y(t){t.offsetHeight}function w(e,n,i){t.isMissing(e.getAttribute(n))&&e.setAttribute(n,i)}function _(e){const n=document.createElement("up-wrapper");return n.append(...t.wrapList(e)),n}function O(e,n,...i){var r;if(!(null===(r=e.hasAttribute)||void 0===r?void 0:r.call(e,n)))return;let s=e.getAttribute(n);for(let r of i){let i=r(s,n,e);if(t.isDefined(i))return i}}function k(t,e){return O(t,e,S)}let S=t.identity;function E(t,e){switch(t){case"false":return!1;case"true":case"":case e:return!0}}function x(t){if((t=t.replaceAll("_","")).match(/^-?[\d.]+$/))return parseFloat(t)}function j(e){if(null==e?void 0:e.trim())return t.parseRelaxedJSON(e)}function C(t,e){for(let n of e)t.classList.add(n)}function F(e,n,i){return e.classList.contains(n)===i?t.noop:(e.classList.toggle(n,i),()=>e.classList.toggle(n,!i))}function T(t,e){return P(window.getComputedStyle(t),e)}function R(e,n){const i=T(e,n);if(t.isPresent(i))return parseFloat(i)}function L(t,e){const{style:n}=t;return P(n,e)}function P(e,n){return up.migrate.loaded&&(n=up.migrate.fixGetStyleProps(n)),t.isString(n)?e.getPropertyValue(n):t.mapObject(n,(t=>[t,e.getPropertyValue(t)]))}function A(e,n,i=""){if(up.migrate.loaded&&(n=up.migrate.fixSetStyleProps(n,i)),t.isString(n))e.setAttribute("style",n);else{const{style:t}=e;for(let e in n){let r=n[e];t.setProperty(e,r+i)}}}function D(t,e){const n=L(t,Object.keys(e));return A(t,e),()=>A(t,n)}function $(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function M(t){return/^up-/.test(t)}function H(e,n){return t.mapObject(n,(t=>[t,e.getAttribute(t)]))}return{subtree:e,subtreeFirst:function(t,e){return n(t,e)?t:t.querySelector(e)},contains:function(t,e){const n=i(e);return Node.prototype.contains.call(t,n)},closestAttr:function(t,e,n=k){let i=t.closest("["+e+"]");if(i)return n(i,e)},ancestor:function(t,e){var n;return null===(n=t.parentNode)||void 0===n?void 0:n.closest(e)},around:function(t,n){return r(t.closest(n),e(t,n))},get:i,list:r,toggle:function(t,e=!$(t)){u(t,e)},hide:function(t){u(t,!1)},hideTemp:function(t){return o(t,!1)},show:function(t){u(t,!0)},showTemp:function(t){return o(t,!0)},metaContent:function(t){var e;const n="meta"+m("name",t);return null===(e=document.head.querySelector(n))||void 0===e?void 0:e.getAttribute("content")},insertBefore:c,createFromSelector:h,setAttrs:a,setAttrsTemp:function(t,e){let n=Object.keys(e),i=H(t,n);return a(t,e),()=>a(t,i)},affix:function(...e){let[n,i="beforeend",r,s]=t.args(e,"val",t.isAdjacentPosition,"val","options");const o=h(r,s);return n.insertAdjacentElement(i,o),o},idSelector:function(t){return t.match(/^[a-z][a-z0-9\-_]*$/i)?`#${t}`:m("id",t)},classSelector:function(t){return`.${t=t.replace(/[^\w-]/g,"\\$&")}`},isSingleton:d,attrSelector:m,tagName:function(t){return t.tagName.toLowerCase()},createBrokenDocumentFromHTML:function(t){return(new DOMParser).parseFromString(t,"text/html")},revivedClone:function(t){let e=g(t.outerHTML);return"nonce"in t&&(e.nonce=t.nonce),e},createNodesFromHTML:b,createFromHTML:g,extractSingular:v,get root(){return document.documentElement},paint:y,concludeCSSTransition:function(t){const e=D(t,{transition:"none"});return y(t),e},hasCSSTransition:function(t){const e=t["transition-property"],n=t["transition-duration"];return!("none"===e||"all"===e&&0===n)},fixedToAbsolute:function(t){const e=t.getBoundingClientRect();t.style.position="absolute";const n=t.offsetParent.getBoundingClientRect();A(t,{left:e.left-R(t,"margin-left")-n.left+"px",top:e.top-R(t,"margin-top")-n.top+"px",right:"",bottom:""})},setMissingAttrs:function(t,e){for(let n in e)w(t,n,e[n])},setMissingAttr:w,unwrap:function(t){!function(){const e=document.activeElement;try{return function(){let e=[...t.childNodes];for(let n of e)c(t,n);t.remove()}()}finally{e&&e!==document.activeElement&&e.focus({preventScroll:!0})}}()},wrapChildren:function(t){const e=_(t.childNodes);return t.append(e),e},wrapIfRequired:function(e){return 1===e.length&&t.isElement(e[0])?e[0]:_(e)},attr:k,booleanAttr:function(t,e){return O(t,e,E)},numberAttr:function(t,e){return O(t,e,x)},jsonAttr:function(t,e){return O(t,e,j)},callbackAttr:function(e,n,i){return O(e,n,(n=>function(e,n,{exposedKeys:i=[],mainKey:r="event"}={}){const s=up.NonceableCallback.fromString(e).toFunction(r,...i);return function(e){const r=Object.values(t.pick(e,i));return s.call(n,e,...r)}}(n,e,i)))},booleanOrStringAttr:function(t,e){return O(t,e,E,S)},booleanOrNumberAttr:function(t,e){return O(t,e,E,x)},setStyleTemp:D,style:T,styleNumber:R,inlineStyle:L,setStyle:A,isVisible:$,upAttrs:function(t){let e=t.getAttributeNames().filter(M);return H(t,e)},upClasses:function(e){return t.filter(e.classList.values(),M)},setAttrPresence:function(t,e,n,i){return i?t.setAttribute(e,n):t.removeAttribute(e)},addClasses:C,addClassTemp:function(t,e){return F(t,e,!0)},removeClassTemp:function(t,e){return F(t,e,!1)},cleanJQuery:function(t){up.browser.canJQuery()&&jQuery(t).remove()},parseSelector:p,isEmpty:function(t){return!t.children.length>0&&!t.innerText.trim()},crossOriginSelector:function(t){return`[${t}*="//"]:not([${t}*="//${location.host}/"])`},isIntersectingWindow:function(t,{margin:e=0}={}){const n=up.Rect.fromElement(t);return n.grow(e),n.bottom>0&&n.top<window.innerHeight&&n.right>0&&n.left<window.innerWidth},unionSelector:function(e,n){let i=`:is(${e.join()})`;return t.isPresent(n)&&(i+=`:not(${n.join()})`),i},matchSelectorMap:function(e,n){let i=[];if(e)for(let[r,s]of Object.entries(e))t.isDefined(s)&&n.matches(r)&&i.push(s);return i},elementLikeMatches:n,documentPosition:function(t){let e=t.nextElementSibling;return e?[e,"beforebegin"]:[t.parentElement,"beforeend"]}}}()},7919:()=>{const t=up.util,e=up.element,n={preventScroll:!0};up.FragmentFocus=class FragmentFocus extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","focusVisible","focusCapsule","inputDevice"])}processPrimitive(e){switch(e){case"keep":return this._u();case"restore":return this.Ou();case"target":case!0:return this.tr(this.fragment);case"layer":return this.tr(this.layer.getFocusElement());case"main":return this.ku(":main");case"hash":return this.Su();case"autofocus":return this.Eu();default:if(t.isString(e))return this.ku(e)}}processElement(t){return this.tr(t)}resolveCondition(t){return"lost"===t?this.xu():super.resolveCondition(t)}ku(t){let e=this.findSelector(t);return this.tr(e)}_u(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.restore(this.layer,n)}Ou(){return up.viewport.restoreFocus({layer:this.layer})}Eu(){let t=this.fragment&&e.subtreeFirst(this.fragment,"[autofocus]");if(t)return this.tr(t)}tr(t){if(t)return up.focus(t,Object.assign(Object.assign({force:!0},n),{inputDevice:this.inputDevice,focusVisible:this.focusVisible})),!0}Su(){let t=up.viewport.firstHashTarget(this.hash,{layer:this.layer});if(t)return this.tr(t)}xu(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.wasLost()}}},8065:()=>{const t=up.util;up.Record=class Record{keys(){throw"Return an array of keys"}defaults(t){return{}}constructor(e){Object.assign(this,t.mergeDefined(this.defaults(e),this.attributes(e)))}attributes(e=this){return t.pick(e,this.keys())}[t.copy.key](){return t.variant(this)}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.attributes(),e.attributes())}}},8072:()=>{const t=up.util;up.Response=class Response extends up.Record{keys(){return["method","url","text","status","request","xhr","target","title","openLayer","acceptLayer","dismissLayer","eventPlans","context","expireCache","evictCache","headers","loadedAt","fail"]}defaults(){return{headers:{},loadedAt:new Date}}get ok(){var e;return!t.evalOption(null!==(e=this.fail)&&void 0!==e?e:up.network.config.fail,this)}get none(){return!this.text}header(t){var e;return this.headers[t]||(null===(e=this.xhr)||void 0===e?void 0:e.getResponseHeader(t))}get varyHeaderNames(){let e=this.header("Vary");return t.getSimpleTokens(e,{separator:","})}get contentType(){return this.header("Content-Type")}get cspInfo(){let t=this.header("Content-Security-Policy")||this.header("Content-Security-Policy-Report-Only");return up.protocol.cspInfoFromHeader(t)}get lastModified(){let t=this.header("Last-Modified");if(t)return new Date(t)}get etag(){return this.header("ETag")}get json(){return this.parsedJSON||(this.parsedJSON=JSON.parse(this.text))}get age(){return new Date-this.loadedAt}get expired(){return this.age>up.network.config.cacheExpireAge||this.request.expired}get description(){return`HTTP ${this.status} response to ${this.request.description}`}get redirect(){return this.url!==this.request.url||this.method!==this.request.method}get redirectRequest(){if(!this.redirect)return;let e=t.variant(this.request,{method:this.method,url:this.url,cacheRoute:null});return up.cache.track(this.request,e,{force:!0}),e}}},8183:()=>{const t=up.util;up.Registry=class Registry{constructor(e,n=t.identity){this.no={},this.hs=n,this.ju=e,this.put=this.put.bind(this),document.addEventListener("up:framework:reset",(()=>this.reset()))}put(t,e){(e=this.hs(e)).isDefault=up.framework.evaling,this.no[t]=e}get(t){return this.no[t]||up.fail("Unknown %s %o",this.ju,t)}reset(){this.no=t.pickBy(this.no,"isDefault")}}},8195:()=>{const t=up.util,e=up.element;up.Change.Addition=class Addition extends up.Change{constructor(t){super(t),this.Cu=t.acceptLayer,this.Fu=t.dismissLayer,this.Tu=t.eventPlans||[],this.ve=t.response}handleLayerChangeRequests(){this.layer.isOverlay()&&(this.Ru(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(this.Lu()),this.abortWhenLayerClosed(),this.Pu(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(this.Lu()),this.abortWhenLayerClosed()),this.layer.asCurrent((()=>{for(let t of this.Tu)up.emit(Object.assign(Object.assign({},t),this.Lu())),this.abortWhenLayerClosed()}))}Ru(){t.isDefined(this.Cu)&&this.layer.isOverlay()&&this.layer.accept(this.Cu,this.Lu())}Pu(){t.isDefined(this.Fu)&&this.layer.isOverlay()&&this.layer.dismiss(this.Fu,this.Lu())}abortWhenLayerClosed(t=this.layer){if(t.isClosed())throw new up.Aborted("Layer was closed")}Au({oldElement:t,newElement:n,source:i}){"keep"===i&&(i=t&&up.fragment.source(t)),i&&e.setMissingAttr(n,"up-source",up.fragment.normalizeSource(i))}Du({newElement:t,time:n}){e.setMissingAttr(t,"up-time",!!n&&n.toUTCString())}$u({newElement:t,etag:n}){e.setMissingAttr(t,"up-etag",n||!1)}setReloadAttrs(t){this.Au(t),this.Du(t),this.$u(t)}Lu(){return{response:this.ve}}executeSteps({steps:t,responseDoc:e,noneOptions:n,passRenderOptions:i=this.options}){return new up.Change.UpdateSteps({steps:t,noneOptions:n,passRenderOptions:i}).execute(e)}}},8268:()=>{var t;up.Layer.Drawer=((t=class Drawer extends up.Layer.OverlayWithViewport{}).mode="drawer",t)},8354:()=>{const t=up.util,e=up.element;up.Preview=class Preview{constructor({fragment:t,request:e,renderOptions:n,cleaner:i}){this.fragment=t,this.request=e,this.renderOptions=n,this.Mu=i}undo(...t){this.ended?reportError(new up.Error("Preview used after end of request")):this.Mu.guard(...t)}get origin(){return this.request.origin}get params(){return this.request.params}get layer(){return this.request.layer}get ended(){return this.request.ended}get expiredResponse(){return this.renderOptions.expiredResponse}get revalidating(){return!!this.expiredResponse}run(t,e={}){for(let n of up.status.resolvePreviewFns(t))this.undo(up.error.guard(n,this,e))}revert(){this.Mu.clean()}setAttrs(...t){let[n,i]=this.Hu(t,"val","val");this.undo(e.setAttrsTemp(n,i))}addClass(...t){let[n,i]=this.Hu(t,"val","val");this.undo(e.addClassTemp(n,i))}addClassBatch(t,e){for(let n of t)for(let t of e)this.addClass(n,t)}removeClass(...t){let[n,i]=this.Hu(t,"val","val");this.undo(e.removeClassTemp(n,i))}setStyle(...t){let[n,i]=this.Hu(t,"val","val");this.undo(e.setStyleTemp(n,i))}disable(...t){let[e]=this.Hu(t,"val");this.undo(up.form.disableTemp(e))}insert(...e){let[n,i="beforeend",r]=this.Hu(e,"val",t.isAdjacentPosition,"val");this.undo(up.fragment.insertTemp(n,i,r))}show(...t){let[n]=this.Hu(t,"val");this.undo(e.showTemp(n))}hide(...t){let[n]=this.Hu(t,"val");this.undo(e.hideTemp(n))}hideContent(...t){let[n]=this.Hu(t,"val"),i=e.wrapChildren(n);e.hide(i),this.undo((()=>e.unwrap(i)))}showPlaceholder(...t){let[e,n]=this.Hu(t,"val","val"),i=up.fragment.provideNodes(n,{origin:this.origin});up.puts("[up-placeholder]","Showing placeholder %o",n),e?this.swapContent(e,i):"new"===this.layer&&(this.openLayer(i,{closeAnimation:!1}),this.renderOptions.openAnimation=!1)}swapContent(...t){let[e,n]=this.Hu(t,"val","val");this.hideContent(e),this.insert(e,n)}openLayer(e,n={}){let i=":undo-preview";up.layer.open(Object.assign(Object.assign(Object.assign({},t.pick(this.renderOptions,[...up.Layer.Overlay.VISUAL_KEYS,"target"])),n),{content:e,abort:!1,onDismiss:({value:t})=>{t!==i&&this.request.abort({reason:"Preview overlay dismissed"})}}));let r=up.layer.front;return this.undo((()=>r.dismiss(i,{preventable:!1}))),r}Hu(e,...n){let[i,...r]=t.args(e,...n);return i=up.fragment.get(i,{layer:this.layer,origin:this.origin})||this.fragment,[i,...r]}}},8386:()=>{up.Aborted=class Aborted extends up.Error{constructor(t){super(t,{name:"AbortError"})}}},8504:()=>{const t=up.element,e=up.util;up.BodyShifter=class BodyShifter{constructor(){this.Nu=new Set,this.Ur=0,this.Mu=e.cleaner()}lowerStack(){0==--this.Ur&&this.Mu.clean()}raiseStack(){1==++this.Ur&&this.Bu()}onAnchoredElementInserted(t){return this.Nu.add(t),this.qu(t,"right"),()=>this.Nu.delete(t)}Iu(){return this.zu&&this.Ur>0}Bu(){this.zu=up.viewport.rootScrollbarWidth(),this.Mu(t.setStyleTemp(t.root,{"--up-scrollbar-width":this.zu+"px"})),this.qu(document.body,"padding-right");for(let t of this.Nu)this.qu(t,"right")}qu(e,n){if(!this.Iu())return;let i=t.style(e,n);this.Mu(t.setStyleTemp(e,{["--up-original-"+n]:i}),t.addClassTemp(e,"up-scrollbar-away"))}}},9013:()=>{up.protocol=function(){const t=up.util,e=up.element,n=function(t){return"X-Up"+t.replace(/(^.|[A-Z])/g,(t=>"-"+t.toUpperCase()))},i=function(e,i,r=t.identity){let s=e.getResponseHeader(n(i));if(s)return r(s)};function r(t){return"false"!==t&&t}const s=t.memoize((function(){return t.normalizeMethod(up.browser.popCookie("_up_method"))})),o=new up.Config((()=>({methodParam:"_method",csrfParam:()=>e.metaContent("csrf-param"),csrfToken:()=>e.metaContent("csrf-token"),cspNonce:()=>e.metaContent("csp-nonce"),csrfHeader:"X-CSRF-Token",maxHeaderSize:2048}))),u=/'nonce-([^']+)'/g;function a(e){let n=e.matchAll(u);return t.map(n,"1")}return{config:o,locationFromXHR:function(e){let n=i(e,"location")||e.responseURL;if(n)return t.normalizeURL(n)},titleFromXHR:function(e){var n,r,s;return null!==(s=null===(r=(n=up.migrate).titleFromXHR)||void 0===r?void 0:r.call(n,e))&&void 0!==s?s:i(e,"title",t.parseRelaxedJSON)},targetFromXHR:function(t){return i(t,"target")},methodFromXHR:function(e){return i(e,"method",t.normalizeMethod)},openLayerFromXHR:function(e){return i(e,"openLayer",t.parseRelaxedJSON)},acceptLayerFromXHR:function(e){return i(e,"acceptLayer",t.parseRelaxedJSON)},contextFromXHR:function(e){return i(e,"context",t.parseRelaxedJSON)},dismissLayerFromXHR:function(e){return i(e,"dismissLayer",t.parseRelaxedJSON)},eventPlansFromXHR:function(e){return i(e,"events",t.parseRelaxedJSON)},expireCacheFromXHR:function(t){var e,n;return i(t,"expireCache")||(null===(n=(e=up.migrate).clearCacheFromXHR)||void 0===n?void 0:n.call(e,t))},evictCacheFromXHR:function(t){return i(t,"evictCache",r)},csrfHeader:function(){return t.evalOption(o.csrfHeader)},csrfParam:function(){return t.evalOption(o.csrfParam)},csrfToken:function(){return t.evalOption(o.csrfToken)},cspNonce:function(){return t.evalOption(o.cspNonce)},initialRequestMethod:s,headerize:n,wrapMethod:function(t,e){return e.add(o.methodParam,t),"POST"},cspInfoFromHeader:function(t){var e;let n={};if(t){let i=t.split(/\s*;\s*/);for(let t of i){let i=null===(e=t.match(/^(script|default)-src:/))||void 0===e?void 0:e[1];i&&(n[i]={declaration:t,nonces:a(t)})}}return n.script||n.default||{}}}}()},9156:()=>{const t=up.util;up.LayerStack=class LayerStack{constructor(){this.Uu=[],this.layers=[this.Vu()]}Vu(){return up.layer.build({mode:"root",stack:this})}remove(e){t.remove(this.layers,e)}peel(e,n){const i=t.reverse(e.descendants),r=Object.assign(Object.assign({},n),{preventable:!1});for(let t of i)t.dismiss(":peel",r)}reset(){this.peel(this.root,{animation:!1}),this.Uu=[],this.root.reset()}isOpen(e){return t.contains(this.layers,e)}isClosed(t){return!this.isOpen(t)}parentOf(t){return this.layers[t.index-1]}childOf(t){return this.layers[t.index+1]}ancestorsOf(e){return t.reverse(this.layers.slice(0,e.index))}selfAndAncestorsOf(t){return[t,...t.ancestors]}descendantsOf(t){return this.layers.slice(t.index+1)}isRoot(t){return this.root===t}isOverlay(t){return this.root!==t}isCurrent(t){return this.current===t}isFront(t){return this.front===t}get(...t){return this.getAll(...t)[0]}getAll(...t){return up.LayerLookup.all(this,...t)}sync(){for(let t of this.layers)t.sync()}asCurrent(t,e){try{return this.Uu.push(t),e()}finally{this.Uu.pop()}}reversed(){return t.reverse(this.layers)}dismissOverlays(e=null,n={}){n.dismissable=!1;for(let i of t.reverse(this.overlays))i.dismiss(e,n)}at(t){return this.layers[t]}indexOf(t){return this.layers.indexOf(t)}get count(){return this.layers.length}get root(){return this.layers[0]}get overlays(){return this.root.descendants}get current(){return t.last(this.Uu)||this.front}get front(){return t.last(this.layers)}}},9363:()=>{up.mockable=function(t){if(window.jasmine){let e=t.name,n={[e]:t},i=function(){return n[e].apply(this,arguments)};return i.mock=()=>spyOn(n,e),i}return t}},9391:()=>{const t=up.util,e=up.element;up.LinkFollowIntent=class LinkFollowIntent{constructor(t,e){this.Ku=t,this.P=e,this.Xu=null,this.Wu("mouseenter mousedown touchstart",(t=>this.Gu(t))),this.Wu("mouseleave",(()=>this.Ju())),up.fragment.onAborted(this.Ku,(()=>this.Ju()))}Wu(t,e){up.on(this.Ku,t,{passive:!0},e)}Gu(e){if(up.link.shouldFollowEvent(e,this.Ku))if(this.Ju(),"mouseenter"===e.type){let n=this.Qu();this.Yu=t.timer(n,(()=>this.it(e)))}else this.it(e)}Ju(){var t;clearTimeout(this.Yu),(null===(t=this.Xu)||void 0===t?void 0:t.background)&&this.Xu.abort(),this.Xu=null}Qu(){var t;return null!==(t=e.numberAttr(this.Ku,"up-preload-delay"))&&void 0!==t?t:up.link.config.preloadDelay}it(t){up.log.putsEvent(t),up.fragment.isAlive(this.Ku)&&this.P({onRequestKnown:t=>this.Xu=t})}}},9399:(t,e,n)=>{n(7412);const i=up.util;up.network=function(){const t=new up.Config((()=>({concurrency:6,wrapMethod:!0,cacheSize:70,cacheExpireAge:15e3,cacheEvictAge:54e5,lateDelay:400,fail:t=>(t.status<200||t.status>299)&&304!==t.status,autoCache:t=>t.isSafe(),expireCache:t=>!t.isSafe(),evictCache:!1,progressBar:!0,timeout:9e4}))),e=new up.Request.Queue,n=new up.Request.Cache;let r=null;function s(r){var o,u,a,c;n.expire(null!==(u=null!==(o=r.expireCache)&&void 0!==o?o:i.evalOption(t.expireCache,r))&&void 0!==u&&u),n.evict(null!==(c=null!==(a=r.evictCache)&&void 0!==a?a:i.evalOption(t.evictCache,r))&&void 0!==c&&c),function(t){let i;if(t.willCache()&&(i=n.get(t)))return up.puts("up.request()","Re-using previous request to %s",t.description),t.background||e.promoteToForeground(i),i.mergeIfUnsent(t),n.track(i,t,{onIncompatible:s}),!0}(r)||function(t){(function(t){t.willCache()&&(n.put(t),t.onLoading=()=>n.reindex(t)),i.always(t,(function(e){var i,r;n.expire(null!==(i=e.expireCache)&&void 0!==i&&i,{except:t}),n.evict(null!==(r=e.evictCache)&&void 0!==r&&r,{except:t});let s=e instanceof up.Response,o=!s,u=s&&e.ok,a=s&&!e.ok,c=s&&e.none,h=s&&e.redirectRequest;a?n.evict(t.url):o||c?n.evict(t):u&&(n.get(t)&&n.put(t),h&&(h.willCache()||n.get(h))&&n.put(h))}))})(t),e.asap(t)}(r)}function o(...t){var n,i;null===(i=(n=up.migrate).preprocessAbortArgs)||void 0===i||i.call(n,t),e.abort(...t)}return up.on("up:network:late",(function(){i.evalOption(t.progressBar)&&(r=new up.ProgressBar)})),up.on("up:network:recover",(function(){null==r||r.conclude()})),up.on("up:framework:reset",(function(){o(),e.reset(),n.reset(),null==r||r.destroy(),r=null})),{request:function(...t){const e=function(t){var e,n;let r=i.parseArgIntoOptions(t,"url");return null===(n=(e=up.migrate).handleRequestOptions)||void 0===n||n.call(e,r),r}(t),n=new up.Request(e);return s(n),n},cache:n,isBusy:function(){return e.isBusy()},isSafeMethod:function(t){return i.contains(["GET","OPTIONS","HEAD"],i.normalizeMethod(t))},config:t,abort:o,queue:e,loadPage:function(t){new up.Request(t).loadPage()}}}(),up.request=up.network.request,up.cache=up.network.cache},9441:()=>{up.event=function(){const t=up.util,e=up.element;function n(...t){return i(t).bind()}function i(t,e){return up.EventListenerGroup.fromBindArgs(t,e)}function r(t){return up.EventEmitter.fromEmitArgs(t)}function s(...e){const n=t.extractOptions(e),i=e[0]||n.type||up.fail("Missing event type"),r=new Event(i,{bubbles:!0,cancelable:!0});return Object.assign(r,t.omit(n,["type","target"])),r}const o=["metaKey","shiftKey","ctrlKey","altKey"];function u(e){return e.button>0||t.some(o,(t=>e[t]))}function a(e,n,i=[]){const r=s(n,t.pick(e,i));return r.originalEvent=e,["stopPropagation","stopImmediatePropagation","preventDefault"].forEach((function(t){const n=r[t];return r[t]=function(){return e[t](),n.call(r)}})),e.defaultPrevented&&r.preventDefault(),r}n("up:click","[up-emit]",(function(t,n){if(u(t))return;const i=e.attr(n,"up-emit"),r=e.jsonAttr(n,"up-emit-props"),s=a(t,i);Object.assign(s,r),up.emit(n,s)}));let c=["unknown"];function h(t){c.push(t),setTimeout((()=>c.pop()))}return n("keydown keyup",{capture:!0},(()=>h("key"))),n("pointerdown pointerup",{capture:!0},(()=>h("pointer"))),n("up:framework:reset",(function(){for(let t of[window,document,e.root,document.body])for(let e of up.EventListener.allNonDefault(t))e.unbind()})),{on:n,off:function(...t){return i(t).unbind()},build:s,emit:function(...t){return r(t).emit()},assertEmitted:function(...t){return r(t).assertEmitted()},onEscape:function(t){return n("keydown",(function(e){if("Escape"===e.key)return t(e)}))},halt:function(t,e={}){e.log&&up.log.putsEvent(t),t.stopImmediatePropagation(),t.preventDefault()},isModified:u,isSyntheticClick:function(e){return t.isMissing(e.clientX)},fork:a,keyModifiers:o,get inputDevice(){return t.last(c)}}}(),up.on=up.event.on,up.off=up.event.off,up.emit=up.event.emit},9454:()=>{up.Layer.OverlayWithTether=class OverlayWithTether extends up.Layer.Overlay{createElements(){this.origin||up.fail("Missing { origin } option"),this.Zu=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.Zu.parent),this.createContentElement(this.element)}onContentSet(){this.Zu.start(this.element)}onElementsRemoved(){this.Zu.stop()}sync(){this.isOpen()&&(this.isDetached()||this.Zu.isDetached()?this.dismiss(":detached",{animation:!1,preventable:!1}):this.Zu.sync())}}},9483:()=>{up.NotImplemented=class NotImplemented extends up.Error{}},9797:function(){var t,e=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const n=up.util;up.Change.FromResponse=(t=class FromResponse extends up.Change{constructor(t){super(t),this.ve=t.response,this.zt=this.ve.request}execute(){var t;if(up.fragment.config.skipResponse(this.ta())?this.ea():this.zt.assertEmitted("up:fragment:loaded",Object.assign(Object.assign({},this.ta()),{callback:this.options.onLoaded,log:["Loaded fragment from %s",this.ve.description],skip:()=>this.ea()})),null!==(t=n.evalOption(this.options.fail,this.ve))&&void 0!==t?t:!this.ve.ok)throw this.na(this.deriveFailOptions());return this.na(this.options)}ea(){up.puts("up.render()","Skipping "+this.ve.description),this.options.target=":none",this.options.failTarget=":none"}na(t){t.didForceFailOptions&&up.puts("up.render()","Rendering failed response using fail-prefixed options (https://unpoly.com/failed-responses)"),this.ia(t),t.meta=this.ra();let e=new up.Change.FromContent(t).execute();return e.finished=this.finish(e,t),e}finish(t,n){return e(this,void 0,void 0,(function*(){return t=yield t.finished,up.fragment.shouldRevalidate(this.zt,this.ve,n)&&(t=yield this.sa(t,n)),t}))}sa(t,n){return e(this,void 0,void 0,(function*(){let e=n.target,i=t.target;if(/:(before|after)/.test(e))up.warn("up.render()","Cannot revalidate cache when prepending/appending (target %s)",e);else{up.puts("up.render()",'Revalidating cached response for target "%s"',i);let e=yield up.reload(i,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),up.RenderOptions.NO_MOTION),up.RenderOptions.NO_INPUT_INTERFERENCE),up.RenderOptions.NO_PREVIEWS),{preferOldElements:t.fragments,layer:t.layer,onFinished:null,expiredResponse:this.ve,preview:this.oa(n),abort:!1,cache:!1,background:!0}));e.none||(t=e)}return t}))}oa({preview:t,revalidatePreview:e}){return!0===e?t:e}ta(){const{expiredResponse:t}=this.options;return{request:this.zt,response:this.ve,renderOptions:this.options,revalidating:!!t,expiredResponse:t}}ra(){var t,e;let n={revalidating:!!this.options.expiredResponse};return null===(e=(t=up.migrate).processCompilerPassMeta)||void 0===e||e.call(t,n,this.ve),n}ia(t){var e,i;const r=this.ve.url;let s=r,o=this.zt.hash;o&&(t.hash=o,s+=o),"GET"===this.ve.method?t.source=this.improveHistoryValue(t.source,r):(t.source=this.improveHistoryValue(t.source,"keep"),t.history=!!t.location);let u=this.ve.openLayer;u&&(Object.assign(t,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},up.Layer.Overlay.UNSET_VISUALS),{target:void 0}),up.fragment.config.navigateOptions),u),{layer:"new"})),Object.assign(t,u)),t.location=this.improveHistoryValue(t.location,s),t.title=this.improveHistoryValue(t.title,this.ve.title),t.eventPlans=this.ve.eventPlans;let a=this.ve.target;a&&(t.target=a),t.acceptLayer=this.ve.acceptLayer,t.dismissLayer=this.ve.dismissLayer,t.document=this.ve.text,this.ve.none&&(t.target=":none"),t.context=n.merge(t.context,this.ve.context),t.cspInfo=this.ve.cspInfo,null!==(e=t.time)&&void 0!==e||(t.time=this.ve.lastModified),null!==(i=t.etag)&&void 0!==i||(t.etag=this.ve.etag)}},n.memoizeMethod(t.prototype,{ta:!0}),t)},9844:()=>{const t=up.util;up.FragmentScrolling=class FragmentScrolling extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","mode","revealTop","revealMax","revealSnap","scrollBehavior"])}processPrimitive(e){switch(e){case"top":return this.ua(0);case"bottom":return this.ua(99999999);case"layer":return this.aa();case"main":return this.ca(":main");case"restore":return this.ha();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.la(this.fragment);default:if(t.isString(e))return this.ca(e)}}processElement(t){return this.la(t)}la(t){if(t)return up.reveal(t,this.attributes()),!0}ca(t){let e=this.findSelector(t);return this.la(e)}aa(){return this.la(this.layer.getBoxElement())}ua(t){return up.viewport.scrollTo(t,Object.assign(Object.assign({},this.attributes()),{around:this.fragment}))}ha(){return up.viewport.restoreScroll(Object.assign(Object.assign({},this.attributes()),{around:this.fragment}))}}},9918:()=>{const t=up.element,e=up.util;up.RevealMotion=class RevealMotion{constructor(e,n={}){var i,r,s,o,u,a,c,h,l,p;this.st=e,this.es=t.get(n.viewport)||up.viewport.get(this.st),this.pa=up.layer.get(this.es),this.fa=null!==(r=null!==(i=n.scrollBehavior)&&void 0!==i?i:n.behavior)&&void 0!==r?r:"instant";const f=up.viewport.config;this.da=null!==(o=null!==(s=n.snap)&&void 0!==s?s:n.revealSnap)&&void 0!==o?o:f.revealSnap,this.ma=null!==(a=null!==(u=n.padding)&&void 0!==u?u:n.revealPadding)&&void 0!==a?a:f.revealPadding,this.ga=null!==(h=null!==(c=n.top)&&void 0!==c?c:n.revealTop)&&void 0!==h?h:f.revealTop,this.va=null!==(p=null!==(l=n.max)&&void 0!==l?l:n.revealMax)&&void 0!==p?p:f.revealMax,this.ba=f.selector("fixedTopSelectors"),this.ya=f.selector("fixedBottomSelectors")}start(){const t=this.wa(this.es),n=up.Rect.fromElement(this.st);if(this.va){const t=e.evalOption(this.va,this.st);n.height=Math.min(n.height,t)}n.grow(this.ma),this._a(t),t.height<0&&up.fail("Viewport has no visible area");const i=this.es.scrollTop;let r=i;this.ga||n.height>t.height?r+=n.top-t.top:n.top<t.top?r-=t.top-n.top:n.bottom>t.bottom&&(r+=n.bottom-t.bottom),e.isNumber(this.da)&&r<this.da&&n.top<.5*t.height&&(r=0),r!==i&&this.es.scrollTo({top:r,behavior:this.fa})}wa(){return up.viewport.isRoot(this.es)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.es)}Oa(n){let i=up.fragment.all(n,{layer:this.pa});return e.filter(i,t.isVisible)}_a(t){for(let e of this.Oa(this.ba)){let n=up.Rect.fromElement(e).bottom-t.top;n>0&&(t.top+=n,t.height-=n)}for(let e of this.Oa(this.ya)){let n=up.Rect.fromElement(e),i=t.bottom-n.top;i>0&&(t.height-=i)}}}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={exports:{}};return t[i].call(s.exports,s,s.exports,n),s.exports}n(7115),n(9363),n(3889),n(6939),n(6559),n(889),n(7781),n(2487),n(9483),n(8386),n(4244),n(1410),n(1268),n(4138),n(8065),n(3526),n(6705),n(8183),n(7080),n(7275),n(3394),n(8504),n(6347),n(8195),n(4572),n(864),n(5845),n(5224),n(302),n(2113),n(1589),n(9797),n(5249),n(6805),n(2175),n(1739),n(611),n(5229),n(3441),n(4742),n(621),n(5691),n(1499),n(1438),n(2459),n(5887),n(7919),n(3728),n(9844),n(7687),n(7304),n(9454),n(2084),n(3126),n(2009),n(4526),n(8268),n(3383),n(6088),n(9156),n(6607),n(9391),n(2049),n(567),n(5637),n(4718),n(8354),n(2077),n(541),n(7718),n(6351),n(7294),n(4823),n(1588),n(6374),n(8072),n(6858),n(9918),n(6689),n(6140),n(3530),n(5313),n(9441),n(9013),n(367),n(3106),n(6101),n(6973),n(235),n(2679),n(9399),n(1420),n(181),n(1915),n(2771),n(3194),n(4372),up.framework.onEvaled()})();
|
1
|
+
(()=>{var t={181:(t,e,n)=>{n(4598),up.link=function(){const t=up.util,e=up.element;let n=null,i=null,r=null;const s="[up-content], [up-fragment], [up-document]",o=`${s}, [up-target], [up-layer], [up-transition], [up-preload]`,u=new up.Config((()=>({followSelectors:["[up-follow]",`a:is(${o})`],noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="javascript:"]','a[href^="mailto:"]','a[href^="tel:"]',`a[href^="#"]:not(${s})`,e.crossOriginSelector("href"),e.crossOriginSelector("up-href")],instantSelectors:["[up-instant]"],noInstantSelectors:["[up-instant=false]","[onclick]"],preloadSelectors:["[up-preload]"],noPreloadSelectors:["[up-preload=false]"],clickableSelectors:["[up-clickable]","[up-follow]","[up-emit]","[up-accept]","[up-dismiss]",`a:is(${o})`],noClickableSelectors:["[up-clickable=false]","a[href], button"],preloadDelay:90}))),a=up.mockable((function(t,e,n){return up.render(h(t,e,n))}));function c(e,n,i){n=t.options(n);const r=new up.OptionsParser(e,n,Object.assign(Object.assign({},i),{fail:!1}));return n.url=function(t,e={}){const n=e.url||t.getAttribute("up-href")||t.getAttribute("href");if("#"!==n)return n}(e,n),n.method=p(e,n),r.json("headers"),r.json("params"),r.booleanOrString("cache"),r.booleanOrString("expireCache"),r.booleanOrString("evictCache"),r.booleanOrString("revalidate"),r.booleanOrString("abort"),r.boolean("abortable"),r.boolean("background"),r.string("contentType"),r.booleanOrNumber("lateDelay"),r.number("timeout"),r.booleanOrString("fail"),n}function h(e,n,i){var r;e=up.fragment.get(e),n=t.options(n);const s=new up.OptionsParser(e,n,Object.assign({fail:!0},i));return s.include(c),n.origin||(n.origin=e),s.boolean("navigate",{default:!0}),s.string("confirm",{attr:["up-confirm","data-confirm"]}),s.string("target"),s.booleanOrString("fallback"),s.string("match"),s.string("document"),s.string("fragment"),s.string("content"),s.boolean("keep",{attr:"up-use-keep"}),s.boolean("hungry",{attr:"up-use-hungry"}),s.json("data",{attr:"up-use-data"}),s.callback("onLoaded"),s.callback("onRendered",{mainKey:"result"}),s.callback("onFinished",{mainKey:"result"}),s.callback("onOffline",{mainKey:"error"}),s.callback("onError",{mainKey:"error"}),s.boolean("peel"),s.string("layer"),s.string("baseLayer"),s.json("context"),s.string("mode"),s.string("align"),s.string("position"),s.string("class"),s.string("size"),s.booleanOrString("dismissable"),s.parse(up.layer.openCallbackAttr,"onOpened"),s.parse(up.layer.closeCallbackAttr,"onAccepted"),s.parse(up.layer.closeCallbackAttr,"onDismissed"),s.string("acceptEvent"),s.string("dismissEvent"),s.string("acceptLocation"),s.string("dismissLocation"),s.booleanOrString("closeAnimation"),s.string("closeEasing"),s.number("closeDuration"),s.include(up.status.statusOptions),s.booleanOrString("focus"),s.booleanOrString("focusVisible"),s.boolean("saveScroll"),s.boolean("saveFocus"),s.booleanOrString("scroll"),s.boolean("revealTop"),s.number("revealMax"),s.number("revealPadding"),s.number("revealSnap"),s.string("scrollBehavior"),s.booleanOrString("history"),s.booleanOrString("location"),s.booleanOrString("title"),s.boolean("metaTags"),s.booleanOrString("lang"),s.include(up.motion.motionOptions),null!==(r=n.guardEvent)&&void 0!==r||(n.guardEvent=up.event.build("up:link:follow",{log:["Following link %o",e]})),n}function l(t,e){let n=function(t){if(!b(t))return"Will not preload an unsafe link"}(t=up.fragment.get(t));if(n)return Promise.reject(new up.Error(n));const i=up.event.build("up:link:preload",{log:["Preloading link %o",t]});return a(t,Object.assign(Object.assign(Object.assign(Object.assign({abort:!1,abortable:!1,background:!0,cache:!0},e),up.RenderOptions.NO_INPUT_INTERFERENCE),up.RenderOptions.NO_PREVIEWS),{guardEvent:i,preload:!0}))}function p(e,n={}){return t.normalizeMethod(n.method||e.getAttribute("up-method")||e.getAttribute("data-method"))}function f(t){return t=up.fragment.get(t),u.matches(t,"followSelectors")}function d(t){f(t)||t.setAttribute("up-follow","")}function m(t,e){if(t.defaultPrevented)return!1;const n=`a, [up-follow], ${up.form.fieldSelector()}`,i=t.target.closest(n);return!i||i===e}function g(t){const e=t.closest(u.selector("instantSelectors"));return e&&(n=e,!(u.matches(n,"noInstantSelectors")||u.matches(n,"noFollowSelectors")));var n}function v(t){let e=["clientX","clientY","button",...up.event.keyModifiers];const n=up.event.fork(t,"up:click",e);up.emit(t.target,n,{log:!1})}function b(t){const e=p(t);return up.network.isSafeMethod(e)}function y(t,n,i){switch(t){case"insert":i();break;case"reveal":{let t=e.numberAttr(n,"up-intersect-margin");up.fragment.onFirstIntersect(n,i,{margin:t});break}case"hover":new up.LinkFollowIntent(n,i)}}function w(t,e){let n=up.event.build("up:deferred:load",{log:["Loading deferred %o",t]}),i=Object.assign({navigate:!1,guardEvent:n},e);return a(t,i,{defaults:{target:":origin",cache:"auto",revalidate:"auto",feedback:!0}})}return up.macro(u.selectorFn("clickableSelectors"),(function(t){let n=t.matches("a, [up-follow]")?"link":"button";e.setMissingAttrs(t,{tabindex:"0",role:n,"up-clickable":""}),t.addEventListener("keydown",(function(e){if("Enter"===e.key||"button"===t.role&&"Space"===e.key)return v(e)}))})),up.attribute("up-defer",{defaultValue:"insert"},(function(t,e){y(e,t,(e=>up.error.muteUncriticalRejection(w(t,e))))})),up.on("up:click",u.selectorFn("followSelectors"),(function(t,e){m(t,e)&&(up.event.halt(t,{log:!0}),up.focus(e,{preventScroll:!0}),up.error.muteUncriticalRejection(a(e)))})),up.attribute("up-expand",{defaultValue:"a, [up-href]",macro:!0},(function(t,n){let i=e.get(t,n);i&&(e.setMissingAttrs(t,Object.assign({"up-href":e.attr(i,"href")},e.upAttrs(i))),e.addClasses(t,e.upClasses(i)),d(t))})),up.compiler(u.selectorFn("preloadSelectors"),(function(n){if(!function(t){return!up.browser.canPushState()||!f(t)||!function(t){const e=c(t);if(e.url)return null==e.cache&&(e.cache="auto"),e.basic=!0,new up.Request(e).willCache()}(t)}(n)){let i=t=>up.error.muteUncriticalRejection(l(n,t)),r=e.booleanOrStringAttr(n,"up-preload");(!0===r||t.isUndefined(r))&&(r="hover"),y(r,n,i)}})),up.on("up:framework:reset",(function(){n=null,i=null,r=null})),{follow:a,followOptions:h,requestOptions:c,preload:l,makeFollowable:d,isSafe:b,isFollowable:f,shouldFollowEvent:m,convertClicks:function(t){t.on("click",(function(e,n){up.event.isModified(e)||(g(n)&&r===n?up.event.halt(e):("key"===up.event.inputDevice||up.event.isSyntheticClick(e)||t.wasHitByMouseEvent(e)&&(!i||i===e.target))&&v(e),i=null,r=null)})),t.on("touchstart",{passive:!0},(function(t,e){n=e})),t.on("mousedown",(function(t,e){up.event.isModified(t)||(i=e,g(e)&&!function(t){let e=t.target;return n===e&&e.closest("[href]")}(t)&&(r=e,v(t)),n=null)}))},config:u,loadDeferred:w}}(),up.follow=up.link.follow,up.deferred={load:up.link.loadDeferred}},235:(t,e,n)=>{n(2208),up.viewport=function(){const t=up.util,e=up.element,n=up.fragment,i=new up.Config((()=>({viewportSelectors:["[up-viewport]","[up-fixed]"],fixedTopSelectors:["[up-fixed~=top]"],fixedBottomSelectors:["[up-fixed~=bottom]"],anchoredRightSelectors:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:200,revealPadding:0,revealTop:!1,revealMax:()=>.5*window.innerHeight,autoFocusVisible:({element:t,inputDevice:e})=>"key"===e||up.form.isField(t)}))),r=new up.BodyShifter;up.compiler(i.selectorFn("anchoredRightSelectors"),(function(t){return r.onAnchoredElementInserted(t)}));const s=up.mockable((function(e,i){var r,s;return i=t.options(i),e=n.get(e,i),(i.layer=up.layer.get(e))||up.fail("Cannot reveal a detached element"),i.peel&&i.layer.peel(),new up.RevealMotion(e,i).start(),(null===(s=(r=up.migrate).formerlyAsync)||void 0===s?void 0:s.call(r,"up.reveal()"))||!0}));function o(e,{preventScroll:n,force:r,inputDevice:o,focusVisible:a}={}){if(r&&(e.hasAttribute("tabindex")||-1!==e.tabIndex||e.setAttribute("tabindex","-1")),null!=o||(o=up.event.inputDevice),null!=a||(a="auto"),a=t.evalAutoOption(a,i.autoFocusVisible,{element:e,inputDevice:o}),e.focus({preventScroll:!0,focusVisible:a}),u(e),e.classList.add(a?"up-focus-visible":"up-focus-hidden"),!n)return s(e)}function u(t){null==t||t.classList.remove("up-focus-hidden","up-focus-visible")}function a(e,{strong:n,layer:i,origin:r,behavior:o="instant"}={}){if(!e)return;let u=b(e,{layer:i,origin:r});return u?()=>{let e=()=>s(u,{top:!0,behavior:o});return n&&t.task(e),e()}:"#top"===e?()=>g(0,{behavior:o}):void 0}function c(){return[p().tagName,...i.viewportSelectors].join()}function h(t,e={}){return n.get(t,e).closest(c())}function l(t,i={}){return t=n.get(t,i),e.around(t,c())}function p(){return document.scrollingElement}function f(){return e.root.clientWidth}function d(t){return up.fragment.tryToTarget(t)}function m(e){const[i,r]=t.args(e,"val","options");let s;return r.layer=up.layer.get(r),s=i?[h(i,r)]:r.around?l(r.around,r):function(t={}){return n.all(c(),t)}(r),[s,r]}function g(t,...e){const[n,i]=m(e);return v(n,{},t,i.behavior),!0}function v(t,e,n,i="instant"){for(let r of t){const t=e[d(r)]||n;r.scrollTo({top:t,behavior:i})}}function b(t,i={}){var r;if(t=null==(r=t)?void 0:r.replace(/^#/,"")){const r=[e.idSelector(t),"a"+e.attrSelector("name",t)].join();return n.get(r,i)}}up.on("focusin",(function({relatedTarget:t}){u(t)}));const y=["selectionStart","selectionEnd","scrollLeft","scrollTop"];return{reveal:s,revealHash:function(...t){var e;return null===(e=a(...t))||void 0===e?void 0:e()},revealHashFn:a,firstHashTarget:b,config:i,get:h,subtree:function(t,i={}){return t=n.get(t,i),e.subtree(t,c())},around:l,get root(){return p()},rootWidth:f,rootHeight:function(){return e.root.clientHeight},isRoot:function(t){return t===p()},rootScrollbarWidth:function(){return window.innerWidth-f()},saveScroll:function(...t){const[e,n]=m(t),i=n.location||n.layer.location;if(i){const t=function(t){let e={};for(let n of t){let t=d(n);t?e[t]=n.scrollTop:up.warn("up.viewport.saveScroll()","Cannot save scroll positions for untargetable viewport %o",n)}return e}(e);n.layer.lastScrollTops.set(i,t)}},restoreScroll:function(...t){const[e,n]=m(t),{location:i}=n.layer,r=n.layer.lastScrollTops.get(i);return!!r&&(v(e,r,0),up.puts("up.viewport.restoreScroll()","Restored scroll positions to %o",r),!0)},scrollTo:g,saveFocus:function(t={}){const e=up.layer.get(t),n=t.location||e.location;if(n){const t=up.FocusCapsule.preserve(e);e.lastFocusCapsules.set(n,t)}},restoreFocus:function(t={}){const e=up.layer.get(t),n=t.location||e.location,i=t.layer.lastFocusCapsules.get(n);return!(!i||!i.restore(e)||(up.puts("up.viewport.restoreFocus()",'Restored focus to "%s"',i.target),0))},absolutize:function(n,r={}){var s;const o=h(n).getBoundingClientRect(),u=n.getBoundingClientRect(),a=new up.Rect({left:u.left-o.left,top:u.top-o.top,width:u.width,height:u.height});null===(s=r.afterMeasure)||void 0===s||s.call(r),e.setStyle(n,{position:"static"===n.style.position?"static":"relative",top:"auto",right:"auto",bottom:"auto",left:"auto",width:"100%",height:"100%"});const c=e.createFromSelector("up-bounds");e.insertBefore(n,c),c.appendChild(n);const l=function(t,n){return a.left+=t,a.top+=n,e.setStyle(c,a,"px")};l(0,0);const p=n.getBoundingClientRect();return l(u.left-p.left,u.top-p.top),t.each(function(t=document){const e=["[up-fixed]"].concat(i.fixedTopSelectors).concat(i.fixedBottomSelectors);return t.querySelectorAll(e.join())}(n),e.fixedToAbsolute),{bounds:c,moveBounds:l}},focus:o,tryFocus:function(t,e){return o(t,e),t===document.activeElement},newStateCache:function(){return new up.FIFOCache({capacity:30,normalizeKey:t.matchableURL})},focusedElementWithin:function(t){const e=document.activeElement;if(up.fragment.contains(t,e))return e},copyCursorProps:function(t,e={}){for(let n of y)try{e[n]=t[n]}catch(t){}return e},bodyShifter:r}}(),up.focus=up.viewport.focus,up.reveal=up.viewport.reveal},302:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const e=up.util,n=up.element;up.Change.UpdateSteps=class UpdateSteps extends up.Change.Addition{constructor(t){super(t),this.i=e.copy(e.assert(t.steps)),this.o=e.assert(t.passRenderOptions),this.u=t.noneOptions||{}}execute(t){if(this.responseDoc=t,this.i=t.selectSteps(this.i),this.i=t.commitSteps(this.i),this.renderResult=new up.RenderResult({layer:this.o.layer,target:up.fragment.targetForSteps(this.i),renderOptions:this.o}),this.i.length){this.i.reverse();const t=this.i.map((t=>this.h(t)));this.renderResult.finished=this.l(t)}else this.p(null,this.u),this.m(null,this.u);return this.renderResult}l(e){return t(this,void 0,void 0,(function*(){yield Promise.all(e);for(let t of this.i)this.abortWhenLayerClosed(t.layer);return this.renderResult}))}v(t){let e=t.matches("up-wrapper")?t.children:[t];this.renderResult.fragments.unshift(...e)}h(t){switch(t.placement){case"swap":if(up.fragment.keepPlan(t))return this.p(t.oldElement,t),this.m(t.oldElement,t),Promise.resolve();{this._(t);const e=t.oldElement.parentNode,i=Object.assign(Object.assign({},t),{beforeStart(){up.fragment.markAsDestroying(t.oldElement)},afterInsert:()=>{this.O(t),this.k(t.newElement,t),this.S(t)},beforeDetach:()=>{up.script.clean(t.oldElement,{layer:t.layer})},afterDetach(){n.cleanJQuery(),up.fragment.emitDestroyed(t.oldElement,{parent:e,log:!1})},scrollNew:()=>{this.p(t.newElement,t),this.m(t.newElement,t)}});return up.morph(t.oldElement,t.newElement,t.transition,i)}case"content":{let e=n.wrapChildren(t.oldElement),i=n.wrapChildren(t.newElement),r=Object.assign(Object.assign({},t),{placement:"swap",oldElement:e,newElement:i,focus:!1});return this.h(r).then((()=>{n.unwrap(i),this.p(t.oldElement,t)}))}case"before":case"after":{let e=n.wrapChildren(t.newElement),i="before"===t.placement?"afterbegin":"beforeend";return t.oldElement.insertAdjacentElement(i,e),this.k(e,t),this.p(e,t),this.m(e,t),up.animate(e,t.animation,t).then((()=>n.unwrap(e)))}default:up.fail("Unknown placement: %o",t.placement)}}k(t,e){this.responseDoc.finalizeElement(t),this.setReloadAttrs(e),up.hello(t,e),this.v(t)}_(t){const n=[];if(t.keep)for(let i of t.oldElement.querySelectorAll("[up-keep]")){let r=up.fragment.keepPlan(Object.assign(Object.assign({},t),{oldElement:i,descendantsOnly:!0}));if(r){const t=i.cloneNode(!0);i.insertAdjacentElement("beforebegin",t),i.classList.add("up-keeping"),up.script.disableSubtree(r.newElement);let s=up.viewport.subtree(r.oldElement);r.revivers=e.map(s,(function(t){let e=up.viewport.copyCursorProps(t);return()=>up.viewport.copyCursorProps(e,t)})),this.j()?r.newElement.replaceWith(i):document.body.append(i),n.push(r)}}t.descendantKeepPlans=n}O(t){for(let e of t.descendantKeepPlans){e.newElement.replaceWith(e.oldElement);for(let t of e.revivers)t()}}S(t){for(let e of t.descendantKeepPlans)e.oldElement.classList.remove("up-keeping")}j(){return e.some(this.i,(t=>t.oldElement.matches("body")))}p(t,e){return new up.FragmentFocus(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoFocus})).process(e.focus)}m(t,e){return new up.FragmentScrolling(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoScroll})).process(e.scroll)}}},367:()=>{up.log=function(){const t=up.util,e=new up.LogConfig;function n(t,e,n,...r){i(t,e,"",n,...r)}function i(n,i,r,s,...o){s&&(e.format?console[n](`%c${i}%c ${s}`,"color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block;"+r,"",...o):console[n](`[${i}] ${t.sprintf(s,...o)}`))}let r;return up.on("up:framework:boot",(function(){if(!e.banner)return;const t=` __ _____ ___ ___ / /_ __\n/ // / _ \\/ _ \\/ _ \\/ / // / ${up.version}\n\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n`;let n="";up.migrate.loaded||(n+="Load unpoly-migrate.js to polyfill deprecated APIs.\n\n"),e.enabled?n+="Call `up.log.disable()` to disable logging for this session.":n+="Call `up.log.enable()` to enable logging for this session.";const i="color: #777777";e.format?console.log("%c"+t+"%c"+n,"font-family: monospace;"+i,i):console.log(t+n)})),{puts:function(...t){e.enabled&&n("log",...t)},putsEvent:function(t){if(e.enabled&&r!==t){r=t;let e=t.originalEvent||t,n="#5566cc";i("log",e.type,`color: white; border-color: ${n}; background-color: ${n}`,"Interaction on %o",e.target)}},error:(...t)=>n("error",...t),warn:(...t)=>n("warn",...t),config:e,enable:function(){e.enabled=!0},disable:function(){e.enabled=!1}}}(),up.puts=up.log.puts,up.warn=up.log.warn},541:()=>{const t=up.util;up.RenderOptions=function(){const e=["url","method","origin","headers","params","cache","fallback","abort","abortable","confirm","feedback","disable","placeholder","preview","origin","originLayer","baseLayer","navigate","fail","onError"].concat(["keep","hungry","history","source","saveScroll"]),n=["url","response","content","fragment","document"],i=["history","focus","scroll"];return{preprocess:function(e){var n,r;null===(r=(n=up.migrate).preprocessRenderOptions)||void 0===r||r.call(n,e),up.layer.normalizeOptions(e),function(e){t.renameKey(e,"useData","data"),t.renameKey(e,"useHungry","hungry"),t.renameKey(e,"useKeep","keep")}(e);const s=t.merge(up.fragment.config.renderOptions,function(t){if(t.navigate)return up.fragment.config.navigateOptions}(e));return t.merge(t.omit(s,i),{defaults:s},{inputDevice:up.event.inputDevice},e,function({url:e}){if(e)return{url:t.normalizeURL(e)}}(e),function({origin:t,originLayer:e}){if(t&&!e)return{originLayer:up.layer.get(t)}}(e))},finalize:function(e,n){return t.merge(e.defaults,n,e)},assertContentGiven:function(e){t.some(n,(n=>t.isGiven(e[n])))||(e.defaultToEmptyContent?e.content="":up.fail("up.render() needs either { "+n.join(", ")+" } option"))},deriveFailOptions:function(n){let i={didFail:!0},r=function(t){const e={};for(let n in t){const i=t[n];let r=up.fragment.successKey(n);r&&(e[r]=i)}return e}(n);return n.failOptions?Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n.defaults),t.pick(n,e)),r),{didForceFailOptions:!0}),i):Object.assign(Object.assign(Object.assign({},n),r),i)},NO_PREVIEWS:{preview:!1,disable:!1,placeholder:!1,feedback:!1},NO_MOTION:{transition:!1,animation:!1,openAnimation:!1,closeAnimation:!1},NO_INPUT_INTERFERENCE:{scroll:!1,focus:"keep",confirm:!1}}}()},567:()=>{const t=up.element;up.NonceableCallback=class NonceableCallback{constructor(t,e){this.script=t,this.nonce=e}static fromString(t){let e=t.match(/^(nonce-([^\s]+)\s)?(.*)$/);return new this(e[3],e[2])}toFunction(...t){let e=this.script;if(this.nonce){let n=this;return function(...i){return n.C(e,this,t,i)}}return new Function(...t,e)}toString(){return`nonce-${this.nonce} ${this.script}`}C(e,n,i,r){let s,o=`\n try {\n up.noncedEval.value = (function(${i.join()}) {\n ${e}\n }).apply(up.noncedEval.thisArg, up.noncedEval.args)\n } catch (error) {\n up.noncedEval.error = error\n }\n `;try{if(up.noncedEval={args:r,thisArg:n},s=t.affix(document.body,"script",{nonce:this.nonce,text:o}),up.noncedEval.error)throw up.noncedEval.error;return up.noncedEval.value}finally{up.noncedEval=void 0,s&&s.remove()}}}},611:()=>{const t=up.util,e=up.element;up.EventEmitter=class EventEmitter extends up.Record{keys(){return["target","event","baseLayer","callback","log","ensureBubbles"]}emit(){return this.F(),this.baseLayer?this.baseLayer.asCurrent((()=>this.T())):this.T(),this.event}T(){this.target.dispatchEvent(this.event),this.ensureBubbles&&!this.target.isConnected&&document.dispatchEvent(this.event),up.error.guard((()=>{var t;return null===(t=this.callback)||void 0===t?void 0:t.call(this,this.event)}))}assertEmitted(){const t=this.emit();if(t.defaultPrevented)throw new up.Aborted(`Event ${t.type} was prevented`)}F(){if(!up.log.config.enabled)return;let e,n=this.log;t.isArray(n)?[n,...e]=n:e=[];const{type:i}=this.event;t.isString(n)?up.puts(i,n,...e):!1!==n&&up.puts(i,`Event ${i}`)}static fromEmitArgs(n,i={}){var r,s;let o,u=t.extractOptions(n);return u=t.merge(i,u),t.isElementLike(n[0])?u.target=e.get(n.shift()):n[0]instanceof up.Layer&&(u.layer=n.shift()),t.isGiven(u.layer)&&(o=up.layer.get(u.layer),u.target||(u.target=o.element),u.baseLayer||(u.baseLayer=o)),u.baseLayer&&(u.baseLayer=up.layer.get(u.baseLayer)),t.isString(u.target)?u.target=up.fragment.get(u.target,{layer:u.layer}):u.target||(u.target=document),(null===(r=n[0])||void 0===r?void 0:r.preventDefault)?(u.event=n[0],null!==(s=u.log)&&void 0!==s||(u.log=n[0].log)):t.isString(n[0])?u.event=up.event.build(n[0],u):u.event=up.event.build(u),new this(u)}}},621:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const e=up.util;up.FieldWatcher=class FieldWatcher{constructor(t,e,n){var i;this.R=e,this.L=t,this.P=n,this.A=e.batch,this.D=null!==(i=e.logPrefix)&&void 0!==i?i:"up.watch()",this.$()}start(){return this.M=null,this.H=this.N(),this.B=null,this.q=!1,e.sequence(up.form.trackFields(this.L,(t=>this.I(t))),this.U(),this.V(),(()=>this.K()))}$(){const t=t=>up.fail(t,this.D,this.L);this.P||t("No callback provided for %s (%o)"),this.L.matches("input[type=radio]")&&t("Use %s with the container of a radio group, not with an individual radio button (%o)"),up.form.isField(this.L)&&!this.L.name&&t("%s can only watch fields with a name (%o)")}U(){return up.on("up:fragment:aborted",{guard:({target:t})=>t.contains(this.X)},(()=>this.K()))}V(){return up.on("reset",{guard:({target:t})=>t===this.X},(t=>this.W(t)))}get X(){return up.form.getRegion(this.L)}G(t){let n=e.copy(this.R);return up.form.watchOptions(t,n,{defaults:{event:"input"}})}I(t){let e=this.G(t),n=e.event;return up.on(t,n,(t=>this.J(t,e)))}K(){this.M=null}Y(t,n){this.M=t,this.Z=n;let i=n.delay||0;clearTimeout(this.B),this.B=e.timer(i,(()=>{this.B=null,this.tt()}))}et(t){return!e.isEqual(t,this.H)&&!e.isEqual(this.M,t)}tt(){return t(this,void 0,void 0,(function*(){if(!this.M)return;if(this.q)return;if(this.B)return;if(!up.fragment.isAlive(this.X))return;let t=e.omit(this.Z,["event","delay"]);const n=this.nt(this.H,this.M);this.H=this.M,this.M=null,this.q=!0,this.Z=null;const i=[];if(this.A)i.push(this.it(n,t));else for(let e in n){const r=n[e];i.push(this.it(r,e,t))}if(e.some(i,e.isPromise)){let t=Promise.allSettled(i);yield t}this.q=!1,this.tt()}))}it(...t){return up.error.guard(this.P,...t)}nt(t,n){const i={};let r=Object.keys(t);r=r.concat(Object.keys(n)),r=e.uniq(r);for(let s of r){const r=t[s],o=n[s];e.isEqual(r,o)||(i[s]=o)}return i}N(){return up.Params.fromContainer(this.L).toObject()}J(t,e={}){const n=this.N();this.et(n)&&(up.log.putsEvent(t),this.Y(n,e))}W(t){e.task((()=>this.J(t)))}}},864:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};up.Change.DestroyFragment=class DestroyFragment extends up.Change{constructor(t){super(t),this.rt=up.layer.get(t)||up.layer.current,this.st=this.options.element,this.ot=this.options.animation,this.ut=this.options.log,this.ct=this.options.onFinished}execute(){this.ht=this.st.parentNode,up.fragment.markAsDestroying(this.st),up.motion.willAnimate(this.st,this.ot,this.options)?this.lt():this.ft()}lt(){var e;return t(this,void 0,void 0,(function*(){this.dt(),yield this.gt(),this.vt(),null===(e=this.ct)||void 0===e||e.call(this)}))}ft(){var t;this.vt(),this.dt(),null===(t=this.ct)||void 0===t||t.call(this)}gt(){return up.motion.animate(this.st,this.ot,this.options)}vt(){this.rt.asCurrent((()=>{up.fragment.abort(this.st),up.script.clean(this.st,{layer:this.rt}),up.element.cleanJQuery(this.st),this.st.remove()}))}dt(){up.fragment.emitDestroyed(this.st,{parent:this.ht,log:this.ut})}}},889:()=>{up.browser={submitForm:function(t){t.submit()},canPushState:function(){return"GET"===up.protocol.initialRequestMethod()},canJQuery:function(){return!!window.jQuery},assertConfirmed:function(t){if(t.confirm&&!window.confirm(t.confirm))throw new up.Aborted("User canceled action");return!0},popCookie:function(t){var e;let n=null===(e=document.cookie.match(new RegExp(t+"=(\\w+)")))||void 0===e?void 0:e[1];if(n)return document.cookie=t+"=;Max-Age=0;Path=/",n}}},1268:()=>{up.CannotTarget=class CannotTarget extends up.Error{}},1410:()=>{up.CannotParse=class CannotParse extends up.Error{}},1420:function(t,e,n){var i=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};n(7339);const r=up.util,s=up.element;up.layer=function(){const t=[up.Layer.Root,up.Layer.Modal,up.Layer.Popup,up.Layer.Drawer,up.Layer.Cover],e=new up.Config((function(){const e={mode:"modal",any:{mainTargets:["[up-main='']","main",":layer"]},root:{mainTargets:["[up-main~=root]"],history:!0},overlay:{mainTargets:["[up-main~=overlay]"],openAnimation:"fade-in",closeAnimation:"fade-out",dismissLabel:"×",dismissARIALabel:"Dismiss dialog",dismissable:!0,history:"auto",trapFocus:!0},cover:{mainTargets:["[up-main~=cover]"]},drawer:{mainTargets:["[up-main~=drawer]"],backdrop:!0,position:"left",size:"medium",openAnimation(t){switch(t.position){case"left":return"move-from-left";case"right":return"move-from-right"}},closeAnimation(t){switch(t.position){case"left":return"move-to-left";case"right":return"move-to-right"}}},modal:{mainTargets:["[up-main~=modal]"],backdrop:!0,size:"medium"},popup:{mainTargets:["[up-main~=popup]"],position:"bottom",size:"medium",align:"left",dismissable:"outside key",trapFocus:!1},foreignOverlaySelectors:["dialog"]};for(let n of t)e[n.mode].Class=n;return e}));let n=null,o=[];function u(t){return"root"===t?[e.root,e.any]:[e[t],e.overlay,e.any]}function a(t){return i(this,void 0,void 0,(function*(){return t=r.options(t,{layer:"new",defaultToEmptyContent:!0,navigate:!0}),(yield up.render(t)).layer}))}up.on("up:fragment:destroyed",(function(){n.sync()})),up.on("up:framework:evaled",(function(){n=new up.LayerStack})),up.on("up:framework:reset",(function(){n.reset(),o=r.filter(o,"isDefault")}));const c={config:e,mainTargets:function(t){return r.flatMap(u(t),"mainTargets")},open:a,build:function(t,i){var s;const{mode:o}=t,{Class:a}=e[o],c=r.reverse(u(o));let h=up.migrate.handleLayerConfig;return h&&c.forEach(h),null!==(s=t.openAnimation)&&void 0!==s||(t.openAnimation=r.pluckKey(t,"animation")),t=r.mergeDefined(...c,{mode:o,stack:n},t),i&&(t=i(t)),new a(t)},ask:function(t){return new Promise((function(e,n){a(t=Object.assign(Object.assign({},t),{onAccepted:t=>e(t.value),onDismissed:t=>n(t.value)}))}))},normalizeOptions:function(t){var i;!function(t){var i,s;if(!(t.layer instanceof up.Layer))if(null===(s=(i=up.migrate).handleLayerOptions)||void 0===s||s.call(i,t),r.isGiven(t.layer)){let n=String(t.layer).match(/^(new|shatter|swap)( (\w+))?/);if(n){t.layer="new";const i=n[1],r=n[3];t.mode||(t.mode=r||e.mode),"swap"===i?up.layer.isOverlay()&&(t.baseLayer="parent"):"shatter"===i&&(t.baseLayer="root")}}else r.isElementLike(t.target)?t.layer=n.get(t.target,{normalizeLayerOptions:!1}):t.origin?t.layer="origin":t.layer="current"}(t),null!==(i=t.context)&&void 0!==i||(t.context={}),function(t){t.baseLayer instanceof up.Layer||(t.baseLayer=n.get("current",Object.assign(Object.assign({},t),{normalizeLayerOptions:!1})))}(t)},openCallbackAttr:function(t,e){return s.callbackAttr(t,e,{exposedKeys:["layer"]})},closeCallbackAttr:function(t,e){return s.callbackAttr(t,e,{exposedKeys:["layer","value","response"]})},anySelector:function(){return r.map(t,(t=>t.selector())).join()},optionToString:function(t){return r.isString(t)?`layer "${t}"`:t.toString()},get stack(){return n.layers},isWithinForeignOverlay:function(t){let n=e.selector("foreignOverlaySelectors");return!(!n||!t.closest(n))}};return r.delegate(c,["get","getAll","root","overlays","current","front","sync","count","dismissOverlays"],(()=>n)),r.delegate(c,["accept","dismiss","isRoot","isOverlay","isFront","on","off","emit","parent","history","location","mode","context","element","contains","size","affix"],(()=>n.current)),c}()},1438:()=>{up.FocusCapsule=class FocusCapsule{constructor(t,e){this.st=t,this.bt=e,this.yt=up.viewport.copyCursorProps(this.st)}wasLost(){return document.activeElement!==this.st&&!this.wt}autoVoid(){up.on("focusin",{once:!0},(()=>this.wt=!0))}restore(t,e){if(!this.wasLost())return!1;let n=up.fragment.get(this.bt,{layer:t});return n?(up.viewport.copyCursorProps(this.yt,n),up.focus(n,e),!0):void 0}static preserve(t){let e=up.viewport.focusedElementWithin(t.element);if(!e)return;let n=up.fragment.tryToTarget(e);return n?new this(e,n):void 0}}},1499:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))},e=this&&this._t||function(t,e){var n={};for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&e.indexOf(i)<0&&(n[i]=t[i]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols){var r=0;for(i=Object.getOwnPropertySymbols(t);r<i.length;r++)e.indexOf(i[r])<0&&Object.prototype.propertyIsEnumerable.call(t,i[r])&&(n[i[r]]=t[i[r]])}return n};const n=up.util,i=up.element;up.FormValidator=class FormValidator{constructor(t){this.Ot=t,this.kt=[],this.St=null,this.Et=!1,this.xt()}start(){return up.form.trackFields(this.Ot,{guard:t=>this.jt(t)},(t=>this.Ct(t)))}jt(t){return t.closest("[up-validate]:not([up-validate=false])")}Ct(t){let e=up.form.validateOptions(t).event;return up.on(t,e,(e=>{up.log.putsEvent(e),up.error.muteUncriticalRejection(this.validate({origin:t}))}))}xt(){up.fragment.onAborted(this.Ot,(t=>this.Ft(t)))}Ft(t){let e,n=new up.Aborted(t.reason);for(;e=this.kt.shift();)e.deferred.reject(n)}validate(t={}){var e;let n=this.Tt(t);return this.kt.push(...n),this.Rt(),null===(e=n[0])||void 0===e?void 0:e.deferred}Tt(t){let e=this.Lt(t)||this.Pt(t)||this.At(t.origin),i=n.newDeferred();for(let r of e){let e=up.form.validateOptions(r.origin,t);r.batch=n.pluckKey(e,"batch"),r.renderOptions=e,r.destination=`${e.method} ${e.url}`,r.target=up.fragment.resolveOrigin(r.target,r),r.deferred=i}return e}Pt(t){var{origin:n}=t,i=e(t,["origin"]);if(up.form.isField(n))return this.Dt(n)||this.$t(n,i)}$t(t,{formGroup:e=!0}){if(!e)return;let n=up.form.groupSolution(t);return n?(up.puts("up.validate()","Validating form group of field %o",t),[n]):void 0}Lt({target:t,origin:e}){if(n.isString(t)){up.puts("up.validate()",'Validating target "%s"',t);let i=up.fragment.splitTarget(t);return n.compact(i.map((function(t){let n=up.fragment.get(t,{origin:e});if(n)return{element:n,target:t,origin:e};up.fail('Validation target "%s" does not match an element',t)})))}}At(t){return up.puts("up.validate()","Validating element %o",t),[{element:t,target:up.fragment.toTarget(t),origin:t}]}Dt(t){let e=t.closest("[up-validate]");if(e){let n=i.booleanOrStringAttr(e,"up-validate");return this.Lt({target:n,origin:t})}}Rt(){let t=this.kt.map((t=>t.renderOptions.delay)),e=Math.min(...t)||0;clearTimeout(this.St),this.St=n.timer(e,(()=>{this.St=null,this.Mt()}))}Mt(){up.error.muteUncriticalRejection(this.Ht())}Ht(){return t(this,void 0,void 0,(function*(){if(!this.kt.length)return;if(this.Et)return;if(this.St)return;let t=this.Nt(),e=this.Bt(t);this.Et=!0;try{let n=up.render(e);for(let e of t)e.deferred.resolve(n);yield n}finally{this.Et=!1,this.Mt()}}))}Nt(){let t=[],e=0;for(;e<this.kt.length;){let n=this.kt[e];0===t.length||this.qt(t[0],n)?(t.push(n),this.kt.splice(e,1)):e++}return t}qt(t,e){return t.destination===e.destination&&t.batch&&e.batch}Bt(t){var e;let i=n.map(t,"origin"),r=n.flatMap(i,up.form.fields),s=n.uniq(n.map(r,"name")),o=n.map(t,"renderOptions"),u=up.form.destinationOptions(this.Ot),a=n.mergeDefined(u,...o);return a.target=n.map(t,"target").join(", "),a.origin=this.Ot,null!==(e=a.focus)&&void 0!==e||(a.focus="keep"),a.failOptions=!1,a.defaultMaybe=!0,a.params=up.Params.merge(u.params,...n.map(o,"params")),a.headers=n.merge(u.headers,...n.map(o,"headers")),this.It(a.headers,s),a.feedback=n.some(o,"feedback"),a.data=void 0,a.dataMap=n.mapObject(t,(({target:t,element:e,renderOptions:{data:n,keepData:i}})=>[t,i?up.data(e):n])),a.preview=void 0,a.previewMap=n.mapObject(t,(({target:t,renderOptions:{preview:e}})=>[t,e])),a.placeholder=void 0,a.placeholderMap=n.mapObject(t,(({target:t,renderOptions:{placeholder:e}})=>[t,e])),a.disable=t.map((t=>up.fragment.resolveOrigin(t.renderOptions.disable,t))),a.guardEvent=up.event.build("up:form:validate",{fields:r,log:"Validating form",params:a.params,form:this.Ot}),a}It(t,e){let n=up.protocol.headerize("validate"),i=e.join(" ");(!i||i.length>up.protocol.config.maxHeaderSize)&&(i=":unknown"),t[n]=i}}},1588:()=>{const t=up.util,e=up.element,n=["GET","POST"];up.Request.FormRenderer=class FormRenderer{constructor(t){this.zt=t}buildAndSubmit(){this.params=this.zt.params.withoutBinaryEntries();let i=this.zt.url,{method:r}=this.zt;const s=up.Params.fromURL(i);this.params.addAll(s),i=up.Params.stripURL(i),t.contains(n,r)||(r=up.protocol.wrapMethod(r,this.params)),this.Ot=e.affix(document.body,"form.up-request-loader",{method:r,action:i});let o,u,a=this.zt.contentType;a&&this.Ot.setAttribute("enctype",a),(o=this.zt.csrfParam())&&(u=this.zt.csrfToken())&&this.params.add(o,u),t.each(this.params.toArray(),this.Ut.bind(this)),up.browser.submitForm(this.Ot)}Ut(t){e.affix(this.Ot,"input[type=hidden]",t)}}},1589:function(){var t,e=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const n=up.util;up.Change.FromURL=(t=class FromURL extends up.Change{execute(){var t,i,r,s;return e(this,void 0,void 0,(function*(){let e=this.Vt();if(e)return up.puts("up.render()",e),up.network.loadPage(this.options),n.unresolvablePromise();let o=this.request=up.request(this.Kt());return null===(i=(t=this.options).onRequestKnown)||void 0===i||i.call(t,o),this.options.preload?o:(null===(s=(r=this.options).handleAbort)||void 0===s||s.call(r,o),o.runPreviews(this.options),yield n.always(o,(t=>this.Xt(t))))}))}Vt(){return n.isCrossOrigin(this.options.url)?"Loading cross-origin content in new page":this.options.history&&!up.browser.canPushState()?"Loading content in new page to restore history support":void 0}Kt(){const t=this.Wt(this.options),e=this.Wt(this.deriveFailOptions(),{optional:!0});return Object.assign(Object.assign(Object.assign({},this.options),t),n.withRenamedKeys(e,up.fragment.failKey))}getPreflightProps(){return this.Kt()}Wt(t,e){return new up.Change.FromContent(Object.assign(Object.assign({},t),{preflight:!0})).getPreflightProps(e)}Xt(t){return t instanceof up.Response?this.Gt(t):this.Jt(t)}Gt(t){return new up.Change.FromResponse(Object.assign(Object.assign({},this.options),{response:t})).execute()}Jt(t){throw t instanceof up.Offline&&this.request.emit("up:fragment:offline",{callback:this.options.onOffline,renderOptions:this.options,retry:t=>up.render(Object.assign(Object.assign({},this.options),t)),log:["Cannot load fragment from %s: %s",this.request.description,t.reason]}),t}},n.memoizeMethod(t.prototype,{Kt:!0}),t)},1739:()=>{const t=up.util;up.DestructorPass=class DestructorPass{constructor(t,e){this.Qt=t,this.R=e}run(){for(let e of this.Yt()){let n=t.pluckKey(e,"upDestructors");null==n||n.clean(e)}}Yt(){const t=Object.assign(Object.assign({},this.R),{destroying:!0});return up.fragment.subtree(this.Qt,".up-can-clean",t)}}},1915:()=>{up.form=function(){const t=up.util,e=up.element,n=new up.Config((()=>({groupSelectors:["[up-form-group]","fieldset","label","form"],fieldSelectors:["select","input:not([type=submit], [type=image], [type=button])","button[type]:not([type=submit], [type=button])","textarea"],submitSelectors:["form:is([up-submit], [up-target], [up-layer], [up-transition])"],noSubmitSelectors:["[up-submit=false]","[target]",e.crossOriginSelector("action")],submitButtonSelectors:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],genericButtonSelectors:["input[type=button]","button[type=button]"],validateBatch:!0,watchInputEvents:["input","change"],watchInputDelay:0,watchChangeEvents:["change"],watchableEvents:["input","change"],arrayParam:t=>t.endsWith("[]")})));function i(t=""){return n.fieldSelectors.map((e=>e+t)).join()}function r(t){return t.matches(i())}function s(n){n=e.get(n);let r=e.subtree(n,i());if(n.matches("form[id]")){const s=i(e.attrSelector("form",n.getAttribute("id"))),o=up.fragment.all(s,{layer:n});r=t.uniq([...r,...o])}return r}function o(t){return[...s(t),...u(t),...(i=t,e.subtree(i,n.selector("genericButtonSelectors")))];var i}function u(t){return e.subtree(t,c())}function a(t){return null==t?void 0:t.matches(c())}function c(){return n.selector("submitButtonSelectors")}const h=up.mockable(((t,e)=>up.render(l(t,e))));function l(e,n,i){e=_(e),n=t.options(n);let r=new up.OptionsParser(e,n,i);return r.include(m),r.string("failTarget",{default:up.fragment.tryToTarget(e)}),n.guardEvent||(n.guardEvent=up.event.build("up:form:submit",{submitButton:n.submitButton,log:"Submitting form",params:n.params,form:e})),n.origin||(n.origin=up.viewport.focusedElementWithin(e)||n.submitButton||e),n.activeElements=t.uniq([n.origin,n.submitButton,e].filter(t.isElement)),r.include(up.link.followOptions),n}function p(e,n,i={}){var r,s,o;n=t.options(n),null!==(r=i.closest)&&void 0!==r||(i.closest=!0),null!==(s=i.attrPrefix)&&void 0!==s||(i.attrPrefix="up-watch-");let u=new up.OptionsParser(e,n,i);u.include(up.status.statusOptions,i),u.string("event"),u.number("delay");let a=up.form.config;return"input"===n.event?(n.event=t.evalOption(a.watchInputEvents,e),null!==(o=n.delay)&&void 0!==o||(n.delay=a.watchInputDelay)):"change"===n.event&&(n.event=t.evalOption(a.watchChangeEvents,e)),n.origin||(n.origin=e),n}function f(t){if(t.disabled)return;let e;return document.activeElement===t?(e=y(t),t.disabled=!0,up.focus(e,{force:!0,preventScroll:!0})):t.disabled=!0,()=>{t.disabled=!1}}function d(e,n){let i=()=>k(n);return!0===e?[i()]:t.isElement(e)?[e]:t.isString(e)?up.fragment.subtree(i(),e,{origin:n}):t.isArray(e)?t.flatMap(e,(t=>d(t,n))):[]}function m(e,n,i){var r;n=t.options(n),e=_(e);const s=new up.OptionsParser(e,n,i);s.string("contentType",{attr:"enctype"}),s.json("headers");const o=up.Params.fromForm(e),a=null!==(r=n.submitButton)&&void 0!==r?r:n.submitButton=u(e)[0];return a&&(o.addField(a),n.method||(n.method=a.getAttribute("formmethod")),n.url||(n.url=a.getAttribute("formaction"))),n.params=up.Params.merge(o,n.params),s.string("url",{attr:"action",default:up.fragment.source(e)}),s.string("method",{attr:["up-method","data-method","method"],default:"GET",normalize:t.normalizeMethod}),"GET"===n.method&&(n.url=up.Params.stripURL(n.url)),n}function g(...e){let[n,i,r]=t.args(e,"val","options","callback");return n=up.element.get(n),r||(r=function(t){let e=t.getAttribute("up-watch");if(e)return up.NonceableCallback.fromString(e).toFunction("value","name","options").bind(t)}(n)||up.fail("No callback given for up.watch()")),new up.FieldWatcher(n,i,r).start()}function v(t,e={}){return g(t,Object.assign(Object.assign({logPrefix:"up.autosubmit()"},e),{batch:!0}),((e,n)=>h(t,n)))}function b(){var t,e;return(null===(e=(t=up.migrate).migratedFormGroupSelectors)||void 0===e?void 0:e.call(t))||n.groupSelectors}function y(t){return w(t).element}function w(e){return t.findResult(b(),(function(t){let n=e.closest(t);if(n){let i=up.fragment.tryToTarget(n,{strong:!0}),r=up.fragment.tryToTarget(e),s=i||r&&n!==e&&`${t}:has(${r})`;if(s)return{target:s,element:n,origin:e}}}))}function _(t,e={}){const n=up.fragment.get(t,e);return n.form||n.closest("form")}function O(t){return t.upFormValidator||(t.upFormValidator=function(t){const e=new up.FormValidator(t),n=e.start();return up.destructor(t,n),e}(t))}function k(t,e){return t?_(t,e)||up.layer.get(t).element:up.layer.current.element}return up.on("submit",n.selectorFn("submitSelectors"),(function(e,n){if(e.defaultPrevented)return;const i=t.presence(e.submitter,a);up.event.halt(e,{log:!0}),up.error.muteUncriticalRejection(h(n,{submitButton:i}))})),up.compiler("form",(function(t){O(t)})),up.compiler("[up-switch]",(t=>new up.Switcher(t).start())),up.attribute("up-watch",(t=>g(t))),up.attribute("up-autosubmit",(t=>v(t,{logPrefix:"[up-autosubmit]"}))),{config:n,submit:h,submitOptions:l,destinationOptions:m,watchOptions:p,validateOptions:function(e,i,r={}){i=t.options(i);let s=new up.OptionsParser(e,i,Object.assign(Object.assign({},r),{closest:!0,attrPrefix:"up-validate-"}));return s.string("url"),s.string("method",{normalize:t.normalizeMethod}),s.boolean("batch",{default:n.validateBatch}),s.json("params"),s.json("headers"),s.include(p,{defaults:{event:"change"}}),i},isSubmittable:function(t){return t=up.fragment.get(t),n.matches(t,"submitSelectors")},watch:g,validate:function(...e){let n=function(e,...n){const i=t.extractOptions(n);return i.origin?i.target||(i.target=up.fragment.toTarget(e)):i.origin||(i.origin=up.fragment.get(e)),i}(...e);return O(_(n.origin)).validate(n)},autosubmit:v,fieldSelector:i,fields:s,trackFields:function(...e){let[n,{guard:r},s]=t.args(e,"val","options","callback");return up.fragment.trackSelector(i(),{filter:function(e){let i=k(n);return t.filter(e,(function(t){return(n===i||n.contains(t))&&k(t)===i&&(!r||r(t))}))},live:!0},s)},isField:r,submitButtons:u,focusedField:function(){return t.presence(document.activeElement,r)},disableTemp:function(e){let n=o(e);return t.sequence(t.map(n,f))},setDisabled:function(t,e){for(let n of o(t))n.disabled=e},getDisablePreviewFn:function(t,e){return function(n){let i=d(t,e);for(let t of i)n.disable(t)}},group:y,groupSolution:w,groupSelectors:b,get:_,getRegion:k}}(),up.submit=up.form.submit,up.watch=up.form.watch,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate},2009:()=>{var t;up.Layer.Modal=((t=class Modal extends up.Layer.OverlayWithViewport{}).mode="modal",t)},2049:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const e=up.util,n=up.element;up.MotionController=class MotionController{constructor(t){this.Zt=`up-${t}`,this.te=`.${this.Zt}`,this.finishEvent=`up:${t}:finish`,this.finishCount=0,this.ee=0}startFunction(t,e,i={}){var r;t=n.list(t);const s=()=>up.error.muteUncriticalRejection(e());if(i.trackMotion=null!==(r=i.trackMotion)&&void 0!==r?r:up.motion.isEnabled(),!1===i.trackMotion)return s();{i.trackMotion=!1,this.finish(t),this.ne(t);let e=this.ie(t,s);return e=e.then((()=>this.re(t))),e}}finish(t){var e,n;if(this.finishCount++,0!==this.ee&&up.motion.isEnabled()){t=this.se(t);for(let e of t)this.oe(e);return null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.motion.finish()")}}se(t){return t?e.flatMap(t,(t=>n.list(t.closest(this.te),t.querySelectorAll(this.te)))):document.querySelectorAll(this.te)}isActive(t){return t.classList.contains(this.Zt)}oe(t){this.ue(t)}ue(t,e={}){return e=Object.assign({target:t,log:!1},e),up.emit(this.finishEvent,e)}ne(t){this.ee++,this.ae(t,!0)}re(t){this.ee--,this.ae(t,!1)}ae(t,e){for(let n of t)n.classList.toggle(this.Zt,e)}ie(t,e){if(t.length<2)return e();const n=up.on(t,this.finishEvent,(e=>{if(!e.forwarded)for(let n of t)n!==e.target&&this.isActive(n)&&this.ue(n,{forwarded:!0})}));return e().then(n)}reset(){return t(this,void 0,void 0,(function*(){yield this.finish(),this.finishCount=0,this.ee=0}))}}},2077:()=>{const t=up.element;up.ProgressBar=class ProgressBar{constructor(){this.ce=0,this.st=t.affix(document.body,"up-progress-bar"),this.st.style.transition="width 300ms ease-out",this.he(0),t.paint(this.st),this.le=31,this.pe()}pe(){let t;t=this.le<80?Math.random()<.15?7+5*Math.random():1.5+.5*Math.random():.13*(100-this.le)*Math.random(),this.he(this.le+t),this.ce++;const e=300+40*this.ce;this.timeout=setTimeout(this.pe.bind(this),e)}he(t){this.le=t,this.st.style.width=`${t}vw`}destroy(){clearTimeout(this.timeout),this.st.remove()}conclude(){clearTimeout(this.timeout),this.he(100),setTimeout(this.destroy.bind(this),300)}}},2084:()=>{up.Layer.OverlayWithViewport=class OverlayWithViewport extends up.Layer.Overlay{static getParentElement(){return document.body}createElements(){up.viewport.bodyShifter.raiseStack(),this.createElement(this.constructor.getParentElement()),this.backdrop&&this.createBackdropElement(this.element),this.createViewportElement(this.element),this.createBoxElement(this.viewportElement),this.createContentElement(this.boxElement)}onElementsRemoved(){up.viewport.bodyShifter.lowerStack()}sync(){this.isDetached()&&this.isOpen()&&this.constructor.getParentElement().appendChild(this.element)}}},2113:()=>{const t=up.util;up.Change.CloseLayer=class CloseLayer extends up.Change{constructor(t){var e,n;super(t),this.fe=t.verb,this.rt=up.layer.get(t),this.de=t.origin,this.me=t.value,this.ge=null===(e=t.preventable)||void 0===e||e,this.ve=t.response,this.be=null===(n=t.history)||void 0===n||n}execute(){if(!this.rt.isOpen())return;if(up.browser.assertConfirmed(this.options),this.ye().defaultPrevented&&this.ge)throw new up.Aborted("Close event was prevented");this.we(),up.fragment.abort({reason:"Layer is closing",layer:this.rt});const{parent:t}=this.rt;this.rt.peel(),this.rt.stack.remove(this.rt),this.be&&t.restoreHistory(),this.p(t),this.rt.teardownHandlers(),this.rt.destroyElements(this.options),this._e(t)}ye(){let e=this.rt.emit(this.Oe(`up:layer:${this.fe}`),{callback:this.rt.callback(`on${t.upperCaseFirst(this.fe)}`),log:[`Will ${this.fe} ${this.rt} with value %o`,this.me]});return this.me=e.value,e}we(){let t=this.Oe(`up:layer:${this.fe}ing`);this.rt.emit(t,{log:!1})}_e(e){const n=`${this.fe}ed`,i=t.upperCaseFirst(n);return this.rt.emit(this.Oe(`up:layer:${n}`),{baseLayer:e,callback:this.rt.callback(`on${i}`),ensureBubbles:!0,log:[`${i} ${this.rt} with value %o`,this.me]})}Oe(t){return up.event.build(t,{layer:this.rt,value:this.me,origin:this.de,response:this.ve})}p(t){var e;let n=this.rt.hasFocus();if(this.rt.overlayFocus.teardown(),null===(e=t.overlayFocus)||void 0===e||e.moveToFront(),n){let e=this.rt.origin||t.element;up.focus(e,{preventScroll:!0})}}}},2175:()=>{const t=up.util,e=up.element;up.CSSTransition=class CSSTransition{constructor(t,e,n){this.st=t,this.ke=e,this.Se=Object.keys(this.ke),this.Ee=n.finishEvent,this.xe=n.duration,this.je=n.easing,this.Ce=!1}start(){return 0===this.Se.length?(this.Ce=!0,Promise.resolve()):(this.Fe=t.newDeferred(),this.Te(),this.Re=new Date,this.Le(),this.Pe(),this.Ae(),this.De(),this.Fe)}Pe(){this.Ee&&(this.$e=up.on(this.st,this.Ee,this.Me.bind(this)))}Me(t){t.stopPropagation(),this.l()}Le(){this.He=t.timer(this.xe+100,(()=>this.l()))}Ne(){clearTimeout(this.He)}Ae(){this.Be=up.on(this.st,"transitionend",this.qe.bind(this))}qe(e){if(e.target!==this.st)return;if(new Date-this.Re<=.25*this.xe)return;const n=e.propertyName;t.contains(this.Se,n)&&this.l()}l(){var t,n;this.Ce||(this.Ce=!0,this.Ne(),null===(t=this.$e)||void 0===t||t.call(this),null===(n=this.Be)||void 0===n||n.call(this),e.concludeCSSTransition(this.st),this.Ie(),this.Fe.resolve())}Te(){const t=e.style(this.st,["transition-property","transition-duration","transition-delay","transition-timing-function"]);if(e.hasCSSTransition(t)){if("all"!==t["transition-property"]){const n=t["transition-property"].split(/\s*,\s*/),i=e.style(this.st,n);this.ze=e.setStyleTemp(this.st,i)}this.Ue=e.concludeCSSTransition(this.st)}}Ie(){var t,e;null===(t=this.ze)||void 0===t||t.call(this),null===(e=this.Ue)||void 0===e||e.call(this)}De(){e.setStyle(this.st,{"transition-property":this.Se.join(),"transition-duration":`${this.xe}ms`,"transition-timing-function":this.je}),e.setStyle(this.st,this.ke)}}},2208:()=>{},2459:()=>{const t=up.util;up.FragmentProcessor=class FragmentProcessor extends up.Record{keys(){return["fragment","autoMeans","origin","layer"]}process(t){let e=this.preprocess(t);return this.tryProcess(e)}preprocess(e){return t.getComplexTokens(e)}tryProcess(e){if(t.isArray(e))return this.processArray(e);if(t.isFunction(e)){let t=up.error.guard(e,this.fragment,this.attributes());return this.tryProcess(t)}if(t.isElement(e))return this.processElement(e);if(t.isString(e)){if("auto"===e)return this.tryProcess(this.autoMeans);let t=e.match(/^(.+?)-if-(.+?)$/);if(t)return this.resolveCondition(t[2])&&this.process(t[1])}return this.processPrimitive(e)}processArray(e){return t.find(e,(t=>this.tryProcess(t)))}resolveCondition(t){if("main"===t)return this.fragment&&up.fragment.contains(this.fragment,":main")}findSelector(t){const e={layer:this.layer,origin:this.origin};let n=this.fragment&&up.fragment.get(this.fragment,t,e)||up.fragment.get(t,e);if(n)return n;up.warn("up.render()",'Could not find an element matching "%s"',t)}}},2487:()=>{up.Error=class Error extends window.Error{constructor(t,e={}){Array.isArray(t)&&(t=up.util.sprintf(...t)),super(t);let n="up."+this.constructor.name;Object.assign(this,{name:n},e)}}},2679:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};up.motion=function(){const e=up.util,n=up.element,i=new up.MotionController("motion"),r=new up.Config((()=>({duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches})));let s=new up.Registry("animation",f),o=new up.Registry("transition",l);function u(){return r.enabled}function a(t,e,i){return h(i),u()&&!m(e)&&i.duration>0&&!n.isSingleton(t)}function c(t,e,n){return up.migrate.loaded&&(e=up.migrate.fixSetStyleProps(e)),n=Object.assign(Object.assign({},n),{finishEvent:i.finishEvent}),new up.CSSTransition(t,e,n).start()}function h(t){var e,n;null!==(e=t.easing)&&void 0!==e||(t.easing=r.easing),null!==(n=t.duration)&&void 0!==n||(t.duration=r.duration)}function l(t){return m(t)?void 0:e.isFunction(t)?t:e.isArray(t)?p(...t):e.isString(t)&&t.includes("/")?p(...t.split("/")):o.get(t)}function p(t,n){if(!m(t)&&!m(n)){const i=f(t)||e.asyncNoop,r=f(n)||e.asyncNoop;return(t,e,n)=>Promise.all([i(t,n),r(e,n)])}}function f(t){return m(t)?void 0:e.isFunction(t)?t:e.isOptions(t)?(e,n)=>c(e,t,n):s.get(t)}const d=up.mockable((function(t,e){t.replaceWith(e)}));function m(t){return!t||"none"===t}function g(t,e,n){s.put(t,(function(t,i){return t.style.opacity=e,c(t,{opacity:n},i)}))}function v(t,e){return{transform:`translate(${t}px, ${e}px)`}}function b(t){return n.setStyle(t,{transform:""}),t.getBoundingClientRect()}function y(t,e){const i=`move-to-${t}`,r=`move-from-${t}`;s.put(i,(function(t,n){const i=b(t);return c(t,e(i),n)})),s.put(r,(function(t,i){const r=b(t),s=e(r);return n.setStyle(t,s),c(t,{transform:""},i)}))}return up.on("up:framework:boot",(function(){u()||up.puts("up.motion","Animations are disabled")})),g("fade-in",0,1),g("fade-out",1,0),y("top",(function(t){return v(0,-(t.top+t.height))})),y("bottom",(function(t){return v(0,up.viewport.rootHeight()-t.top)})),y("left",(function(t){return v(-(t.left+t.width),0)})),y("right",(function(t){return v(up.viewport.rootWidth()-t.left,0)})),o.put("cross-fade",["fade-out","fade-in"]),o.put("move-left",["move-to-left","move-from-right"]),o.put("move-right",["move-to-right","move-from-left"]),o.put("move-up",["move-to-top","move-from-bottom"]),o.put("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:reset",(function(){i.reset()})),{morph:function(r,s,o,u){h(u=e.options(u)),r=up.fragment.get(r),s=up.fragment.get(s);let c=l(o);const p=a(r,c,u);c=up.error.guardFn(c);const f=e.pluckKey(u,"beforeStart")||e.noop,m=e.pluckKey(u,"afterInsert")||e.noop,g=e.pluckKey(u,"beforeDetach")||e.noop,v=e.pluckKey(u,"afterDetach")||e.noop,b=e.pluckKey(u,"scrollNew")||e.noop;if(f(),p){if(i.isActive(r)&&!1===u.trackMotion)return c(r,s,u);up.puts("up.morph()","Morphing %o to %o with transition %O over %d ms",r,s,o,u.duration);const e=up.viewport.get(r),a=e.scrollTop,h=up.viewport.absolutize(r,{afterMeasure(){n.insertBefore(r,s),m()}}),l=function(){return t(this,void 0,void 0,(function*(){b();const t=e.scrollTop;h.moveBounds(0,t-a),yield c(r,s,u),g(),h.bounds.remove(),v()}))};return i.startFunction([r,s],l,u)}return g(),d(r,s),m(),v(),b(),Promise.resolve()},animate:function(t,r,s){t=up.fragment.get(t),s=e.options(s);let o=f(r);const u=a(t,r,s);if(o=up.error.guardFn(o),u){const e=()=>o(t,s);return i.startFunction(t,e,s)}return function(t,i){return e.isOptions(i)&&n.setStyle(t,i),Promise.resolve()}(t,r)},finish:function(t){return i.finish(t)},finishCount:()=>i.finishCount,transition:o.put,animation:s.put,config:r,isEnabled:u,isNone:m,willAnimate:a,swapElementsDirectly:d,motionOptions:function(t,n,i){n=e.options(n);let r=new up.OptionsParser(t,n,i);return r.booleanOrString("animation"),r.booleanOrString("transition"),r.string("easing"),r.number("duration"),n}}}(),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate},2771:()=>{up.status=function(){const t=up.util,e=up.element,n=new up.Config((()=>({currentClasses:["up-current"],activeClasses:["up-active"],loadingClasses:["up-loading"],navSelectors:["[up-nav]","nav"],noNavSelectors:["[up-nav=false]"]})));let i=new up.Registry("preview");const r="a, [up-href]";function s(t){return t.upCurrentURLs||(t.upCurrentURLs=new up.LinkCurrentURLs(t))}function o(i,r,{newLinks:o,anyLocationChanged:u}){let c=!u&&i.upNavLocations||function(n){let i=e.attr(n,"up-layer")||"origin",r=up.layer.getAll(i,{origin:n});return t.compact(r.map(a))}(i);if(o||!t.isEqual(i.upNavLocations,c)){for(let t of r){const i=s(t).isAnyCurrent(c);for(let e of n.currentClasses)t.classList.toggle(e,i);e.setAttrPresence(t,"aria-current","page",i)}i.upNavLocations=c}}function u(t,i){const s=n.selector("navSelectors"),u=e.around(t,s);for(let t of u)o(t,e.subtree(t,r),i)}function a(e){return t.matchableURL(e.location)}function c(t){return e.ancestor(t,r)||t}function h(t){if(t)return function(e){e.showPlaceholder(t)}}function l(e){return t.isFunction(e)?[e]:t.isString(e)?(n=e,t.map(t.parseScalarJSONPairs(n),(([t,e])=>{let n=i.get(t);return function(i,r){return up.puts("[up-preview]","Showing preview %o",t),n(i,e||r)}}))):t.isArray(e)?e.flatMap(l):[];var n}return up.on("up:fragment:compile",((t,e)=>{u(e,{newLinks:!0,anyLocationChanged:!1})})),up.on("up:layer:location:changed up:layer:opened up:layer:dismissed up:layer:accepted",(()=>{u(document.body,{newLinks:!1,anyLocationChanged:!0})})),{config:n,preview:i.put,resolvePreviewFns:l,runPreviews:function(i,r){let{bindLayer:s}=i,o=up.FocusCapsule.preserve(s),u=s.asCurrent((()=>function(i,r){let{fragment:s,fragments:o,origin:u}=i,a=t.cleaner(),p=t=>new up.Preview({fragment:t,request:i,renderOptions:r,cleaner:a}),f=p(s);f.run(l(r.preview)),f.run(h(r.placeholder)),f.run(function(e,i){if(e)return function(e){e.addClassBatch(function({origin:e,activeElements:n}){return n||(n=t.wrapList(e)),n.map(c)}(e.renderOptions),n.activeClasses),e.addClassBatch(i,n.loadingClasses)}}(r.feedback,o)),f.run(up.form.getDisablePreviewFn(r.disable,u));for(let t of o){let n=p(t);n.run(e.matchSelectorMap(r.previewMap,t)),n.run(e.matchSelectorMap(r.placeholderMap,t).flatMap(h))}return a.clean}(i,r)));return null==o||o.autoVoid(),()=>{s.asCurrent(u),null==o||o.restore(s,{preventScroll:!0})}},statusOptions:function(e,n,i){n=t.options(n);const r=new up.OptionsParser(e,n,i);return r.booleanOrString("disable"),r.boolean("feedback"),r.string("preview"),r.booleanOrString("revalidatePreview"),r.string("placeholder"),n}}}(),up.preview=up.status.preview},3106:()=>{up.script=function(){const t=up.util,e=up.element,n=new up.Config((()=>({assetSelectors:["link[rel=stylesheet]","script[src]","[up-asset]"],noAssetSelectors:["[up-asset=false]"],nonceableAttributes:["up-watch","up-on-keep","up-on-hungry","up-on-opened","up-on-accepted","up-on-dismissed","up-on-loaded","up-on-rendered","up-on-finished","up-on-error","up-on-offline"],scriptSelectors:["script:not([type])",'script[type="text/javascript"]','script[type="module"]','script[type="importmap"]'],noScriptSelectors:['script[type="application/ld+json"]']}))),i={"[up-back]":-100,"[up-clickable]":-200,"[up-drawer]":-200,"[up-modal]":-200,"[up-cover]":-200,"[up-popup]":-200,"[up-tooltip]":-200,"[up-dash]":-200,"[up-flashes]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400,"[up-keep]":9999999999};let r=[],s=[];function o(e,n={}){let o=function(e,n){let[i,r,s]=u(e);return r=t.options(r,{selector:i,isDefault:up.framework.evaling,priority:0,batch:!1}),Object.assign(s,r,n)}(e,n);o.macro?(up.framework.evaling&&(o.priority||(o.priority=function(e){e=t.evalOption(e);for(let t in i)if(e.indexOf(t)>=0)return i[t];up.fail("Unregistered priority for system macro %o",e)}(o.selector))),a(s,o)):a(r,o)}const u=function(e){return t.args(e,"val","options","callback")};function a(t,e){let n,i=0;for(;(n=t[i])&&n.priority>=e.priority;)i+=1;if(t.splice(i,0,e),up.framework.booted)if(0===e.priority)for(let t of up.layer.stack)c(t.element,{layer:t,compilers:[e]});else up.puts("up.compiler()","Compiler %s was registered after booting Unpoly. Compiler will run for future fragments only.",e.selector);return e}function c(t,e){up.emit(t,"up:fragment:compile",{log:!1});let n=e.compilers||s.concat(r);new up.CompilerPass(t,n,e).run()}function h(t=document.head){return t.querySelectorAll(n.selector("assetSelectors"))}function l(t,i=""){let r=n.selector("scriptSelectors")+i;return e.subtree(t,r)}return up.on("up:framework:reset",(function(){r=t.filter(r,"isDefault"),s=t.filter(s,"isDefault")})),{config:n,compiler:function(...t){o(t)},macro:function(...t){o(t,{macro:!0})},attrCompiler:function(...n){let[i,r,s]=u(n),a=`[${i}]`,{defaultValue:c}=r;o([a,r,n=>{let r=e.booleanOrStringAttr(n,i);if(!1!==r)return t.isDefined(c)&&!0===r&&(r=c),s(n,r)}])},destructor:function(n,i){let r=t.scanFunctions(i);r.length&&(n.upDestructors||(n.upDestructors=function(n){let i=t.cleaner();return i(e.addClassTemp(n,"up-can-clean")),i}(n))).guard(r)},hello:function(t,e={}){return t=up.fragment.get(t,e),up.puts("up.hello()","Compiling fragment %o",t),c(t,e),up.fragment.emitInserted(t),t},clean:function(t,e={}){new up.DestructorPass(t,e).run()},data:function(n){return(n=up.fragment.get(n)).upData||(n.upData=function(n){var i;let r=null!==(i=e.jsonAttr(n,"up-data"))&&void 0!==i?i:{};return t.isOptions(r)?Object.assign(Object.assign(Object.assign(Object.assign({},n.upTemplateData),n.dataset),r),n.upCompileData):r}(n))},findAssets:h,assertAssetsOK:function(e,n){let i=h();t.map(i,"outerHTML").join()!==t.map(e,"outerHTML").join()&&up.event.assertEmitted("up:assets:changed",{oldAssets:i,newAssets:e,renderOptions:n})},disableSubtree:function(t,e=()=>!0){for(let n of l(t))e(n)&&(n.type="up-disabled-script")},adoptNoncesInSubtree:function(t,i){let r=up.protocol.cspNonce();if((null==i?void 0:i.length)&&r){for(let e of l(t,"[nonce]"))i.includes(e.nonce)&&(e.nonce=r);for(let s of n.nonceableAttributes){let n=e.subtree(t,`[${s}^="nonce-"]`);for(let t of n){let e=t.getAttribute(s),n=up.NonceableCallback.fromString(e);i.includes(n.nonce)&&(n.nonce=r,t.setAttribute(s,n.toString()))}}}},isScript:function(t){return n.matches(t,"scriptSelectors")}}}(),up.compiler=up.script.compiler,up.destructor=up.script.destructor,up.macro=up.script.macro,up.data=up.script.data,up.hello=up.script.hello,up.attribute=up.script.attrCompiler},3126:()=>{var t;const e=up.element;up.Layer.Root=((t=class Root extends up.Layer{get element(){return e.root}constructor(t){super(t),this.setupHandlers()}getFirstSwappableElement(){return document.body}static selector(){return"html"}setupHandlers(){this.element.upHandlersApplied||(this.element.upHandlersApplied=!0,super.setupHandlers())}sync(){this.setupHandlers()}accept(){this.Ve()}dismiss(){this.Ve()}Ve(){up.fail("Cannot close the root layer")}toString(){return"root layer"}}).mode="root",t)},3194:()=>{up.radio=function(){const t=up.element,e=new up.Config((()=>({hungrySelectors:["[up-hungry]"],noHungrySelectors:["[up-hungry=false]"],pollInterval:3e4})));return up.attribute("up-poll",(function(t){up.FragmentPolling.forFragment(t).onPollAttributeObserved()})),up.macro("[up-flashes]",(function(e){t.setMissingAttrs(e,{"up-hungry":"","up-if-layer":"subtree","up-keep":"",role:"alert"}),e.addEventListener("up:fragment:keep",(function(e){t.isEmpty(e.newFragment)||e.preventDefault()}))})),{config:e,hungrySteps:function(n){let{hungry:i,origin:r,layer:s,meta:o}=n,u={current:[],other:[]};if(!i)return u;let a=e.selector("hungrySelectors");const c=[s,...s.ancestors,...s.descendants];for(let e of c){let i=up.fragment.all(e.element,a,{layer:e});for(let a of i){let i=up.fragment.tryToTarget(a,{origin:r});if(!i){up.warn("[up-hungry]","Ignoring untargetable fragment %o",a);continue}let c=t.attr(a,"up-if-layer"),h=c?up.layer.getAll(c,{baseLayer:e}):[e],l=up.motion.motionOptions(a),p=up.event.build("up:fragment:hungry",{log:!1}),f=t.callbackAttr(a,"up-on-hungry",{exposedKeys:["newFragment","renderOptions"]}),d=Object.assign(Object.assign({selector:i,oldElement:a,layer:e,origin:r},l),{placement:"swap",keep:!0,maybe:!0,meta:o,selectEvent:p,selectCallback:f,originalRenderOptions:n});h.includes(s)&&(s===e?u.current:u.other).push(d)}}return u.other=up.fragment.compressNestedSteps(u.other),u},startPolling:function(t,e={}){up.FragmentPolling.forFragment(t).forceStart(e)},stopPolling:function(t){up.FragmentPolling.forFragment(t).forceStop()},pollOptions:function(t,n={}){const i=new up.OptionsParser(t,n,{defaults:{background:!0}});return i.number("interval",{default:e.pollInterval}),i.string("ifLayer",{default:"front"}),i.include(up.link.requestOptions),i.include(up.status.statusOptions),n}}}()},3278:()=>{},3383:()=>{var t;up.Layer.Cover=((t=class Cover extends up.Layer.OverlayWithViewport{}).mode="cover",t)},3394:()=>{up.Rect=class Rect extends up.Record{keys(){return["left","top","width","height"]}get bottom(){return this.top+this.height}get right(){return this.left+this.width}grow(t){this.left-=t,this.top-=t,this.width+=2*t,this.height+=2*t}static fromElement(t){return new this(t.getBoundingClientRect())}}},3441:()=>{const t=up.util;up.EventListenerGroup=class EventListenerGroup extends up.Record{keys(){return["elements","eventTypes","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}bind(){const e=t.cleaner();return this.Ke((function(t){const n=new up.EventListener(t);return n.bind(),e(n.unbind.bind(n))})),e.clean}Ke(t){for(let e of this.elements)for(let n of this.eventTypes)t(this.Xe(e,n))}Xe(t,e){return Object.assign(Object.assign({},this.attributes()),{element:t,eventType:e})}unbind(){this.Ke((function(t){let e=up.EventListener.fromElement(t);e&&e.unbind()}))}static fromBindArgs(e,n){const i=(e=t.copy(e)).pop();let r;r=e[0].addEventListener?[e.shift()]:t.isJQuery(e[0])||t.isList(e[0])&&e[0][0].addEventListener?e.shift():[document];let s=t.getSimpleTokens(e.shift()),o=up.migrate.fixEventTypes;o&&(s=o(s));const u=t.extractOptions(e),a=e[0];return new this(Object.assign(Object.assign({elements:r,eventTypes:s,selector:a,callback:i},u),n))}}},3526:()=>{const t=up.util,e=up.element;up.Config=class Config{constructor(t=()=>({})){this.We=t,this.reset(),document.addEventListener("up:framework:reset",(()=>this.reset()))}reset(){Object.assign(this,this.We())}matches(t,e){return t.matches(this.selector(e))}selector(n){let i=this[n],r=this["no"+t.upperCaseFirst(n)];return e.unionSelector(i,r)}selectorFn(t){return()=>this.selector(t)}}},3530:()=>{const t=up.util;up.URLPattern=class URLPattern{constructor(e){this.Ge=[];const n=[],i=[];for(let r of t.getSimpleTokens(e))"-"===r[0]?i.push(r.substring(1)):n.push(r);this.Je=this.Qe(n,!0),this.Ye=this.Qe(i,!1)}Qe(e,n){if(!e.length)return;let i=(e=(e=t.flatMap(e,t.matchableURLPatternAtom)).map(t.escapeRegExp)).join("|");return i=i.replace(/\\\*/g,".*?"),i=i.replace(/(:|\\\$)([a-z][\w-]*)/gi,((t,e,i)=>"\\$"===e?(n&&this.Ge.push({name:i,cast:Number}),"(\\d+)"):(n&&this.Ge.push({name:i,cast:String}),"([^/?#]+)"))),new RegExp("^(?:"+i+")$")}test(e,n=!0){return n&&(e=t.matchableURL(e)),this.Je.test(e)&&!this.Ze(e)}recognize(e,n=!0){n&&(e=t.matchableURL(e));let i=this.Je.exec(e);if(i&&!this.Ze(e)){const t={};return this.Ge.forEach(((e,n)=>{let r=i[n+1];if(r)return t[e.name]=e.cast(r)})),t}}Ze(t){var e;return null===(e=this.Ye)||void 0===e?void 0:e.test(t)}}},3728:()=>{const t=up.element;up.FragmentPolling=class FragmentPolling{constructor(t){this.R=up.radio.pollOptions(t),this.Qt=t,up.destructor(t,this.tn.bind(this)),up.fragment.onAborted(t,this.en.bind(this)),this.nn="initialized",this.rn=!0,this.sn=!1,this.un()}static forFragment(t){return t.upPolling||(t.upPolling=new this(t))}onPollAttributeObserved(){this.an()}tn(){this.cn()}an(t){if(Object.assign(this.R,t),"started"!==this.nn){if(!up.fragment.isTargetable(this.Qt))return void up.warn("[up-poll]","Cannot poll untargetable fragment %o",this.Qt);this.nn="started",this.hn(),this.ln()}}cn(){var t;"started"===this.nn&&(this.pn(),this.nn="stopped",null===(t=this.fn)||void 0===t||t.call(this))}forceStart(t){Object.assign(this.R,t),this.forceStarted=!0,this.an()}forceStop(){this.cn(),this.forceStarted=!1}hn(){this.fn||(this.fn=up.on("visibilitychange up:layer:opened up:layer:dismissed up:layer:accepted",this.dn.bind(this)))}dn(){this.mn()&&this.ln()}mn(){return!document.hidden&&("any"===this.R.ifLayer||this.gn())}pn(){clearTimeout(this.vn),this.vn=null}ln(){this.vn||this.sn||(this.pn(),this.vn=setTimeout(this.bn.bind(this),this.yn()))}bn(){this.vn=null,this.wn()}wn(){if("started"===this.nn)return up.fragment.isAlive(this.Qt)?void(this.mn()?this._n():up.puts("[up-poll]","Will not poll hidden fragment")):(this.cn(),void up.puts("[up-poll]","Stopped polling a detached fragment"))}On(){var e,n;return null!==(n=null!==(e=this.R.interval)&&void 0!==e?e:t.numberAttr(this.Qt,"up-interval"))&&void 0!==n?n:up.radio.config.pollInterval}yn(){return Math.max(this.On()-this.kn(),0)}kn(){return new Date-this.Sn}gn(){var t,e;return this.layer||(this.layer=up.layer.get(this.Qt)),null===(e=null===(t=this.layer)||void 0===t?void 0:t.isFront)||void 0===e?void 0:e.call(t)}_n(){this.pn();let t=this.rn;try{this.rn=!1,this.sn=!0,up.reload(this.Qt,this.En()).then(this.xn.bind(this),this.jn.bind(this))}finally{this.rn=t}}En(){let t=up.event.build("up:fragment:poll",{log:["Polling fragment",this.Qt]});return Object.assign(Object.assign({},this.R),{guardEvent:t})}en({newLayer:t}){this.rn&&!t&&this.cn()}xn({fragment:t}){this.sn=!1,this.un(),t?this.Cn(t):this.ln()}Cn(t){this.cn(),this.forceStarted&&up.fragment.matches(this.Qt,t)&&this.constructor.forFragment(t).forceStart(this.R)}jn(t){this.sn=!1,this.un(),this.ln(),up.error.throwCritical(t)}un(){this.Sn=new Date}}},3889:()=>{up.util=function(){function t(){}function e(t,e){e=P(e,{host:"cross-domain"});const n=o(t);let i="";"cross-domain"===e.host&&(e.host=s(n)),e.host&&(i+=n.protocol+"//"+n.host);let{pathname:r}=n;return!1===e.trailingSlash&&"/"!==r&&(r=r.replace(/\/$/,"")),i+=r,!1!==e.search&&(i+=n.search),!1!==e.hash&&(i+=n.hash),i}function n(t,n){if(t)return e(t,Object.assign({hash:!1,trailingSlash:!1},n))}const i=location.protocol,r=location.hostname;function s(t){if(w(t)&&-1===t.indexOf("//"))return!1;const e=o(t);return r!==e.hostname||i!==e.protocol}function o(t){if(t.pathname)return t;let e=document.createElement("a");return e.href=t,e}function u(t){return w(t)?e=>e[t]:t}function a(t,e){if(0===t.length)return[];e=u(e);let n=[],i=0;for(let r of t)n.push(e(r,i++));return n}function c(t,e){return Object.fromEntries(t.map(e))}function h(t,e){let n=0;for(let i of t)e(i,n++)}function l(t){return null===t}function p(t){return!!t}function f(t){return void 0===t}const d=it(f);function m(t){return f(t)||l(t)}const g=it(m);function v(t){return!!m(t)||(k(t)&&t[v.key]?t[v.key]():w(t)||C(t)?0===t.length:!!O(t)&&0===Object.keys(t).length)}v.key="up.util.isBlank";const b=it(v);function y(t){return"function"==typeof t}function w(t){return"string"==typeof t||t instanceof String}function _(t){return"number"==typeof t||t instanceof Number}function O(t){return"object"==typeof t&&!l(t)&&(f(t.constructor)||t.constructor===Object)}function k(t){const e=typeof t;return"object"===e&&!l(t)||"function"===e}function S(t){return t instanceof Element}function E(t){return t instanceof RegExp}function x(t){return up.browser.canJQuery()&&t instanceof jQuery}const{isArray:j}=Array;function C(t){return j(t)||function(t){return t instanceof NodeList}(t)||function(t){return"[object Arguments]"===Object.prototype.toString.call(t)}(t)||x(t)||function(t){return t instanceof HTMLCollection}(t)}function F(t){return C(t)?t:m(t)?[]:[t]}function T(t){return k(t)&&t[T.key]?t=t[T.key]():C(t)?t=R(t):O(t)&&(t=Object.assign({},t)),t}function R(t){return Array.prototype.slice.call(t)}function L(...t){return Object.assign({},...t)}function P(t,e){return e?L(e,t):t?T(t):{}}function A(t,e){e=u(e);let n=0;for(let i of t){const t=e(i,n++);if(t)return t}}function D(t,e){e=u(e);let n=!0,i=0;for(let r of t)if(!e(r,i++)){n=!1;break}return n}function $(t,e){e=u(e);const n=[];return h(t,(function(t,i){if(e(t,i))return n.push(t)})),n}function M(t){return t[t.length-1]}function H(t,e){return(t.indexOf||Array.prototype.indexOf).call(t,e)>=0}function N(t,e){const n={};for(let i of e)i in t&&(n[i]=t[i]);return n}function B(t,e){e=u(e);const n={};for(let i in t)e(t[i],i)&&(n[i]=t[i]);return n}function q(t,...e){return y(t)?t(...e):t}T.key="up.util.copy",Date.prototype[T.key]=function(){return new Date(+this)};const I={"&":"&","<":"<",">":">",'"':""","'":"'"};function z(t,e){const n=t[e];return delete t[e],n}function U(t,e){if(e(M(t)))return t.pop()}function V(t){return U(t,y)}function K(t){return U(t,O)||{}}function X(t){return t}function W(t){const e=[];for(let n of t)C(n)?e.push(...n):e.push(n);return e}function G(t,e){return t===e||((null==t?void 0:t.valueOf)&&(t=t.valueOf()),(null==e?void 0:e.valueOf)&&(e=e.valueOf()),t===e||typeof t==typeof e&&(C(t)&&C(e)?J(t,e):k(t)&&t[G.key]?t[G.key](e):!(!O(t)||!O(e))&&function(t,e){const n=Object.keys(t);return J(n,Object.keys(e))&&D(n,(n=>G(t[n],e[n])))}(t,e)))}function J(t,e){return t.length===e.length&&D(t,((t,n)=>G(t,e[n])))}function Q(t,e){var n,i;return((null===(i=(n=up.migrate).splitAtOr)||void 0===i?void 0:i.call(n,t))||t.split(e)).map((t=>t.trim())).filter(X)}function Y(t){let{masked:e,restore:n}=lt(t);return{maskedTokens:Q(e,","),restore:n}}G.key="up.util.isEqual";let Z=0;function tt(t,e,n){for(let i of e)Object.defineProperty(t,i,{get(){const t=n.call(this);let e=t[i];return y(e)&&(e=e.bind(t)),e},set(t){n.call(this)[i]=t}})}function et(t,e="%o"){let n;if("%c"===e)return"";if("%s"===e&&g(t)&&(t=t.toString()),w(t))n=t.trim().replace(/[\n\r\t ]+/g," "),"%o"===e&&(n=JSON.stringify(n));else if(f(t))n="undefined";else if(_(t)||y(t))n=t.toString();else if(j(t))n=`[${a(t,et).join(", ")}]`;else if(x(t))n=`$(${a(t,et).join(", ")})`;else if(S(t)){n=`<${t.tagName.toLowerCase()}`;for(let e of["id","up-id","name","class"]){let i=t.getAttribute(e);i&&(n+=` ${e}="${i}"`)}n+=">"}else if(E(t)||t instanceof Error)n=t.toString();else try{n=JSON.stringify(t)}catch(t){if("TypeError"!==t.name)throw t;n="(circular structure)"}return n.length>200&&(n=`${n.substr(0,200)}…${M(n)}`),n}const nt=/%[oOdisfc]/g;function it(t){return function(...e){return!t(...e)}}function rt(t){if(t.error)throw t.error;return t.value}function st(t,e,n){try{return{value:t.apply(e,n)}}catch(t){return{error:t}}}function ot(t,...e){let n=[];for(;e.length;){let i=e.pop();if("options"===i)n.unshift(K(t));else if("callback"===i)n.unshift(V(t));else if("val"===i)n.unshift(t.pop());else if(y(i)){let e=i(M(t))?t.pop():void 0;n.unshift(e)}}return n}function ut(...t){return t.flat().filter(y)}function at(t,e,{keepDelimiters:n=!1}={}){let i=0,r=/§\d+/g,s={},o=[],u=(e,r)=>{let u=!1;t=t.replaceAll(e,(function(t){u=!0;let e,r,o="§"+i++;if(n){let n=t[0],i=t.slice(-1);r=t.slice(1,-1),e=n+o+i}else r=t,e=o;return s[o]=r,e})),u&&o.unshift({allowRestoreTransform:r})};u(r,!1);for(let t of e)u(t,!0);return{masked:t,restore:(t,e=X)=>{for(let{allowRestoreTransform:n}of o){let i=n?e:X;t=t.replace(r,(t=>i(dt(s[t],w))))}return t}}}const ct=/'(?:\\\\|\\'|[^'])*'|"(?:\\\\|\\"|[^"])*"/g,ht=/{(?:[^{}]|{[^{}]*})*}|\((?:[^\(\)]|\([^\(\)]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\]/g;function lt(t){return at(t,[ct,ht],{keepDelimiters:!0})}function pt(t){return'"'===t[0]?t:(dt("'"===t[0]),'"'+(t=t.slice(1,-1)).replace(/(\\\\)|(\\')|(\\")|(")/g,(function(t,e,n,i){return e||n&&"'"||'\\"'}))+'"')}function ft(t){let{masked:e,restore:n}=at(t,[ct]);return e=e.replace(/([a-z_$][\w$]*:)/gi,(t=>'"'+t.slice(0,-1)+'":')),e=e.replace(/,\s*([}\]])/g,"$1"),e=n(e,pt),JSON.parse(e)}function dt(t,e=p){if(e(t))return t;throw"assert failed"}return{parseURL:o,normalizeURL:e,matchableURL:n,matchableURLPatternAtom:function(t){return t.endsWith("/")?[t,t.slice(0,-1)]:t.includes("/?")?[t,t.replace("/?","?")]:t.endsWith("/*")?[t,t.slice(0,-2),t.slice(0,-2)+"?*"]:t},matchURLs:function(t,e,i){return n(t,i)===n(e,i)},normalizeMethod:function(t){return t?t.toUpperCase():"GET"},methodAllowsPayload:function(t){return"GET"!==t&&"HEAD"!==t},copy:T,merge:L,mergeDefined:function(...t){const e={};for(let n of t)if(n)for(let t in n){const i=n[t];d(i)&&(e[t]=i)}return e},options:P,parseArgIntoOptions:function(t,e){let[n,i]=ot(t,"val","options");return d(n)&&(i[e]=n),i},each:h,map:a,flatMap:function(t,e){return W(a(t,e))},mapObject:c,spanObject:function(t,e){return c(t,(t=>[t,e]))},findResult:A,some:function(t,e){return!!A(t,e)},every:D,find:function(t,e){let n;e=u(e);for(let i of t)if(e(i)){n=i;break}return n},filter:$,reject:function(t,e){return $(t,e=it(u(e)))},intersect:function(t,e){return $(t,(t=>H(e,t)))},compact:function(t){return $(t,g)},compactObject:function(t){return B(t,g)},uniq:function(t){return t.length<2?t:Array.from(new Set(t))},uniqBy:function(t,e){if(t.length<2)return t;e=u(e);const n=new Set;return $(t,(function(t,i){const r=e(t,i);return!n.has(r)&&(n.add(r),!0)}))},last:M,isNull:l,isDefined:d,isUndefined:f,isGiven:g,isMissing:m,isPresent:b,isBlank:v,presence:function(t,e=b){if(e(t))return t},isObject:k,isFunction:y,isString:w,isBoolean:function(t){return"boolean"==typeof t||t instanceof Boolean},isNumber:_,isElement:S,isTextNode:function(t){return t instanceof Text},isJQuery:x,isElementLike:function(t){var e;return!(!t||!(t.addEventListener||x(t)&&(null===(e=t[0])||void 0===e?void 0:e.addEventListener)))},isPromise:function(t){return k(t)&&y(t.then)},isOptions:O,isArray:j,isFormData:function(t){return t instanceof FormData},isList:C,isRegExp:E,isAdjacentPosition:function(t){return/^(before|after)/.test(t)},timer:function(t,e){return setTimeout(e,t)},contains:H,containsAll:function(t,e){return D(e,(e=>H(t,e)))},objectContains:function(t,e){return G(e,N(t,Object.keys(e)))},toArray:function(t){return j(t)?t:R(t)},pick:N,pickBy:B,omit:function(t,e){return B(t,((t,n)=>!H(e,n)))},unresolvablePromise:function(){return new Promise(t)},remove:function(t,e){const n=t.indexOf(e);if(n>=0)return t.splice(n,1),e},memoize:function(t){let e,n;return function(...i){return n?e:(n=!0,e=t.apply(this,i))}},pluckKey:z,renameKey:function(t,e,n){e in t&&(t[n]=z(t,e))},extractOptions:K,extractCallback:V,noop:t,asyncNoop:function(){return Promise.resolve()},identity:X,escapeHTML:function(t){return t.replace(/[&<>"']/g,(t=>I[t]))},escapeRegExp:function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},sequence:function(...t){let e=ut(...t);return(...t)=>a(e,(e=>e(...t)))},evalOption:q,evalAutoOption:function(t,e,...n){return"auto"===(t=q(t,...n))&&(t=q(e,...n)),t},flatten:W,newDeferred:function(){let t,e;const n=new Promise((function(n,i){t=n,e=i}));return n.resolve=t,n.reject=e,n},always:function(t,e=X){return t.then(e,e)},isBasicObjectProperty:function(t){return Object.prototype.hasOwnProperty(t)},isCrossOrigin:s,task:function(t){const e=new MessageChannel;e.port1.onmessage=()=>t(),e.port2.postMessage(0)},isEqual:G,getSimpleTokens:function(t,{json:e=!1,separator:n=/[,\s]/}={}){return w(t)?e&&/^\[.*]$/.test(t)?ft(t):Q(t,n):F(t)},getComplexTokens:function(t){if(w(t)){let{maskedTokens:e,restore:n}=Y(t);return e.map((t=>n(t)))}return F(t)},wrapList:F,wrapValue:function(t,...e){return e[0]instanceof t?e[0]:new t(...e)},uid:function(){return Z++},upperCaseFirst:function(t){return t[0].toUpperCase()+t.slice(1)},lowerCaseFirst:function(t){return t[0].toLowerCase()+t.slice(1)},delegate:tt,delegatePromise:function(t,e){return tt(t,["then","catch","finally"],e)},reverse:function(t){return T(t).reverse()},camelToKebabCase:function(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))},sprintf:function(t,...e){return t.replace(nt,(t=>et(e.shift(),t)))},withRenamedKeys:function(t,e){const n={};for(let i in t){let r=e(i);g(r)&&(n[r]=t[i])}return n},memoizeMethod:function(t,e){for(let n in e){let e=Object.getOwnPropertyDescriptor(t,n).value,i=function(...t){var i;let r=this[i=`__${n}MemoizeCache`]||(this[i]={}),s=JSON.stringify(t);return r[s]||(r[s]=st(e,this,t)),rt(r[s])};t[n]=i}},safeStringifyJSON:function(t){return JSON.stringify(t).replace(/[^\x00-\x7F]/g,(t=>"\\u"+t.charCodeAt(0).toString(16).padStart(4,"0")))},variant:function(t,e={}){let n=Object.create(t);return Object.assign(n,e),n},cleaner:function(){let t=[],e=function(e,n){e=ut(...e).map(n),t.push(...ut(...e))},n=function(...t){e(t,X)};return n.guard=function(...t){e(t,up.error.guardFn)},n.clean=function(...e){let{length:n}=t;for(let i=n-1;i>=0;i--)t[i](...e);t=[]},n},scanFunctions:ut,args:ot,parseRelaxedJSON:ft,parseScalarJSONPairs:function(t){let{maskedTokens:e,restore:n}=Y(t);return e.map((t=>{let[e,i,r]=t.match(/([^{]+)({[^}]*})?/);return[n(i.trim()),r&&ft(n(r))]}))},maskPattern:at,expressionOutline:lt,parseString:function(t){return JSON.parse(pt(t))},assert:dt}}()},4138:()=>{up.Offline=class Offline extends up.Error{}},4244:()=>{up.CannotMatch=class CannotMatch extends up.Error{}},4372:()=>{!function(){const t=up.element;for(let e of["method","confirm"]){const n=`up-${e}`,i=`data-${e}`;up.macro(`a[${i}]`,(function(e){var r;(window.Rails||(null===(r=window.jQuery)||void 0===r?void 0:r.rails))&&up.link.isFollowable(e)&&(t.setMissingAttr(e,n,e.getAttribute(i)),e.removeAttribute(i))}))}}()},4518:()=>{},4526:()=>{var t;up.Layer.Popup=((t=class Popup extends up.Layer.OverlayWithTether{}).mode="popup",t)},4572:function(){var t,e=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const n=up.util;up.RenderJob=(t=class RenderJob{constructor(t){this.renderOptions=t}execute(){return this.Fn=this.Tn(),this}Tn(){return e(this,void 0,void 0,(function*(){try{this.Rn(),this.renderOptions=up.RenderOptions.preprocess(this.renderOptions),up.browser.assertConfirmed(this.renderOptions),up.RenderOptions.assertContentGiven(this.renderOptions);let t=yield this.Ln().execute();return this.Pn(t),t}catch(t){throw this.Pn(t)||this.An(t),t}}))}Pn(t){if(t instanceof up.RenderResult){let{onRendered:e,onFinished:i}=t.renderOptions;t.none||up.error.guard((()=>null==e?void 0:e(t)));let r=function(t){up.error.guard((()=>null==i?void 0:i(t)))};return this.finished.then(r,n.noop),!0}}An(t){let e=t instanceof up.Aborted?"Rendering was aborted":"Error while rendering";up.puts("up.render()",`${e}: ${t.name}: ${t.message}`),up.error.guard((()=>{var e,n;return null===(n=(e=this.renderOptions).onError)||void 0===n?void 0:n.call(e,t)}))}get finished(){return this.Dn()}Dn(){return e(this,void 0,void 0,(function*(){try{let t=yield this.Fn;return yield t.finished}catch(t){throw t instanceof up.RenderResult?yield t.finished:t}}))}Ln(){let t=n.memoize((t=>this.$n(t))),e=Object.assign(Object.assign({},this.renderOptions),{handleAbort:t});return e.url?new up.Change.FromURL(e):e.response?new up.Change.FromResponse(e):new up.Change.FromContent(e)}Rn(){let t=n.pluckKey(this.renderOptions,"guardEvent");if(t&&(t.renderOptions=this.renderOptions,up.emit(t,{target:this.renderOptions.origin}).defaultPrevented))throw new up.Aborted(`Rendering was prevented by ${t.type} listener`)}$n(t){let{abort:e}=this.renderOptions;if(!e||!up.network.isBusy())return;let{bindFragments:i,bindLayer:r,origin:s,layer:o}=this.Ln().getPreflightProps(),u={except:t,logOnce:["up.render()","Change with { abort } option will abort other requests"],newLayer:"new"===o,origin:s};"target"===e?up.fragment.abort(i,Object.assign({},u)):"layer"===e?up.fragment.abort(Object.assign(Object.assign({},u),{layer:r})):"all"===e||!0===e?up.fragment.abort(Object.assign(Object.assign({},u),{layer:"any"})):n.isFunction(e)?e(u):up.fragment.abort(e,Object.assign(Object.assign({},u),{layer:r}))}},n.delegatePromise(t.prototype,(function(){return this.Fn})),n.memoizeMethod(t.prototype,{Dn:!0,Ln:!0}),t)},4598:()=>{},4718:()=>{const t=up.util,e=up.element;up.Params=class Params{constructor(t){this.clear(),this.addAll(t)}clear(){this.entries=[]}[t.copy.key](){return new up.Params(this)}toObject(){const e={};for(let n of this.entries){const{name:i,value:r}=n;t.isBasicObjectProperty(i)||(this.Mn(i)?(e[i]||(e[i]=[]),e[i].push(r)):e[i]=r)}return e}toArray(){return this.entries}toFormData(){const t=new FormData;for(let e of this.entries)t.append(e.name,e.value);return t.entries||(t.originalArray=this.entries),t}toQuery(){return this.withoutBinaryEntries().entries.map(this.Hn).join("&")}Hn(e){const{value:n}=e;let i=encodeURIComponent(e.name);return t.isGiven(n)&&(i+="=",i+=encodeURIComponent(n)),i}Nn({value:t}){return t instanceof Blob}hasBinaryEntries(){return t.some(this.entries,this.Nn)}withoutBinaryEntries(){let e=t.reject(this.entries,this.Nn);return new this.constructor(e)}toURL(e){let n=[e,this.toQuery()];n=t.filter(n,t.isPresent);const i=t.contains(e,"?")?"&":"?";return n.join(i)}add(t,e){this.entries.push({name:t,value:e})}addAll(e){t.isMissing(e)||(e instanceof this.constructor?this.entries.push(...e.entries):t.isArray(e)?this.entries.push(...e):t.isString(e)?this.Bn(e):t.isFormData(e)?this.qn(e):t.isObject(e)?this.In(e):up.fail("Unsupported params type: %o",e))}keys(){return t.map(this.entries,"name")}values(){return t.map(this.entries,"value")}In(e){for(let n in e){const i=e[n],r=t.isArray(i)?i:[i];for(let t of r)this.add(n,t)}}Bn(e){for(let n of e.split("&"))if(n){let[e,i]=n.split("=");e=decodeURIComponent(e),i=t.isGiven(i)?decodeURIComponent(i):null,this.add(e,i)}}qn(t){for(let e of t.entries())this.add(...e)}set(t,e){this.delete(t),this.add(t,e)}delete(e){this.entries=t.reject(this.entries,this.zn(e))}zn(t){return e=>e.name===t}get(t){return this.Mn(t)?this.getAll(t):this.getFirst(t)}getFirst(e){const n=t.find(this.entries,this.zn(e));return null==n?void 0:n.value}getAll(e){const n=t.filter(this.entries,this.zn(e));return t.map(n,"value")}Mn(e){return t.evalOption(up.form.config.arrayParam,e)}[t.isBlank.key](){return 0===this.entries.length}static fromForm(t){return this.fromContainer(t)}static fromContainer(t){let e=up.form.fields(t);return this.fromFields(e)}static fromFields(e){const n=new this;for(let i of t.wrapList(e))n.addField(i);return n}addField(t){let n=(t=e.get(t)).name;if(n&&!t.disabled){const{tagName:e}=t,{type:i}=t;if("SELECT"===e)for(let e of t.querySelectorAll("option"))e.selected&&this.add(n,e.value);else if("checkbox"===i||"radio"===i)t.checked&&this.add(n,t.value);else{if("file"!==i)return this.add(n,t.value);for(let e of t.files)this.add(n,e)}}}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.entries,e.entries)}static fromURL(e){const n=new this;let i=t.parseURL(e).search;return i&&(i=i.replace(/^\?/,""),n.addAll(i)),n}static stripURL(e){return t.normalizeURL(e,{search:!1})}static merge(e,...n){let i=t.copy(e);for(let e of n){let n=t.wrapValue(this,e);for(let t of n.keys())i.delete(t);i.addAll(n)}return i}}},4742:()=>{const t=up.util;up.SelectorTracker=class SelectorTracker{constructor(e,n,i){var r;this.te=e,this.Un=i,this.rt=n.layer||"any",this.Vn=n.filter||t.identity,this.Kn=null===(r=n.live)||void 0===r||r,this.Xn=new Map}start(){return this.Wn(),t.sequence(this.Gn(),(()=>this.Jn()))}Gn(){if(this.Kn)return up.on("up:fragment:inserted up:fragment:destroyed",(()=>this.Wn()))}Wn(){let e=new Map(this.Xn);this.Xn.clear();for(let n of this.Qn){let i=e.get(n);e.delete(n);let r=i||this.Un(n)||t.noop;this.Xn.set(n,r)}this.Yn(e)}get Qn(){let t=up.fragment.all(this.te,{layer:this.rt});return this.Vn(t)}Jn(){this.Yn(this.Xn)}Yn(t){for(let[e,n]of t)n(e)}}},4823:()=>{const t=up.util;up.Request.Queue=class Queue{constructor(){this.reset()}reset(){this.Zn=[],this.ti=[],this.ei=!1}get allRequests(){return this.ti.concat(this.Zn)}asap(e){e.runQueuedCallbacks(),t.always(e,(()=>this.Xt(e))),this.ni(e),this.ii(e),queueMicrotask((()=>this.ri()))}promoteToForeground(t){t.background&&(t.background=!1,this.ni(t))}ni(e){if(!e.isTimed())return;let n=Math.max(e.effectiveLateTime-e.age);t.timer(n,(()=>this.si()))}oi(){return t.evalOption(up.network.config.concurrency)}ui(){const t=this.oi();return-1===t||this.ti.length<t}isBusy(){return this.ti.length>0||this.Zn.length>0}ii(t){this.Zn.push(t)}ai(){let e=t.find(this.Zn,(t=>!t.background));return e||(e=this.Zn[0]),t.remove(this.Zn,e)}ci(t){t.load()&&this.ti.push(t)}Xt(e){t.remove(this.ti,e)||t.remove(this.Zn,e),queueMicrotask((()=>this.ri())),t.task((()=>this.hi()))}ri(){let t;if(this.ui()&&(t=this.ai()))return this.ci(t)}abort(...e){let[n=!0,{except:i,reason:r,logOnce:s}]=t.args(e,"val","options"),o=up.Request.tester(n,{except:i});for(let e of[this.ti,this.Zn]){const n=t.filter(e,o);for(let i of n)s&&(up.puts(...s),s=null),i.abort({reason:r}),t.remove(e,i)}}si(){!this.ei&&this.li()&&(this.ei=!0,up.emit("up:network:late",{log:"Server is slow to respond"}))}hi(){this.ei&&!this.pi.length&&(this.ei=!1,up.emit("up:network:recover",{log:"Slow requests were loaded"}))}get pi(){return this.allRequests.filter((t=>t.isTimed()))}li(){return t.some(this.pi,(t=>t.age>=t.effectiveLateTime-1))}}},5224:()=>{var t;const e=up.util;up.Change.UpdateLayer=(t=class UpdateLayer extends up.Change.Addition{constructor(t){super(t=up.RenderOptions.finalize(t)),this.layer=t.layer,this.target=t.target,this.fi=t.context,this.i=up.fragment.parseTargetSteps(this.target,this.options)}getPreflightProps(){this.di();let t=this.mi();return{layer:this.layer,bindLayer:this.layer,mode:this.layer.mode,context:e.merge(this.layer.context,this.fi),origin:this.options.origin,target:this.gi(),fragments:t,bindFragments:t}}gi(){return this.di(),up.fragment.targetForSteps(this.i)}mi(){return this.di(),e.map(this.i,"oldElement")}execute(t,e){this.responseDoc=t,this.bi(),e();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.yi.bind(this));try{return this.wi(),this.yi(),up.RenderResult.both(this._i,this.Oi)}finally{n()}}wi(){this.i.length&&up.puts("up.render()",`Updating "${this.gi()}" in ${this.layer}`),this.ki(),this.options.saveScroll&&up.viewport.saveScroll({layer:this.layer}),this.options.saveFocus&&up.viewport.saveFocus({layer:this.layer}),this.options.peel&&this.layer.peel({history:!this.Si()}),!1!==this.options.abort&&up.fragment.abort(this.mi(),{reason:"Fragment is being replaced"}),Object.assign(this.layer.context,this.fi),this.Si()&&this.layer.updateHistory(this.options),this.handleLayerChangeRequests(),this._i=this.executeSteps({steps:this.i,responseDoc:this.responseDoc,noneOptions:this.options})}yi(){if(this.Oi)return;let t=this.Ei().other;this.Oi=this.executeSteps({steps:t,responseDoc:this.responseDoc})}di(){this.xi(),this.ji()}bi(){this.xi(),this.Ci(),this.ji(),this.Fi()}Ci(){this.i.push(...this.Ei().current)}xi(){this.i=this.i.filter((t=>{const n=new up.FragmentFinder(e.pick(t,["selector","origin","layer","match","preferOldElements"]));if(t.oldElement||(t.oldElement=n.find()),t.oldElement)return!0;if(!t.maybe)throw new up.CannotMatch}))}Fi(){this.i=this.responseDoc.selectSteps(this.i)}ji(){this.i=up.fragment.compressNestedSteps(this.i)}Ei(){return up.radio.hungrySteps(this.Ti())}ki(){let t=up.FocusCapsule.preserve(this.layer);this.i.forEach(((e,n)=>{e.focusCapsule=t,n>0&&(e.scroll=!1,e.focus=!1)}))}Si(){return e.evalAutoOption(this.options.history,this.Ri.bind(this))}Ri(){const t=e.map(this.i,"oldElement");return up.fragment.hasAutoHistory(t,this.layer)}Ti(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.Si()})}},e.memoizeMethod(t.prototype,{di:!0,xi:!0,Si:!0,Ei:!0}),t)},5229:()=>{const t=up.util;up.EventListener=class EventListener extends up.Record{keys(){return["element","eventType","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}constructor(t){var e;super(t),this.Li=this.constructor.Pi(t),this.isDefault=up.framework.evaling,null!==(e=this.beforeBoot)&&void 0!==e||(this.beforeBoot=0===this.eventType.indexOf("up:framework:")),this.nativeCallback=this.nativeCallback.bind(this)}bind(){var t;const e=(t=this.element).upEventListeners||(t.upEventListeners={});e[this.Li]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),e[this.Li]=this,this.element.addEventListener(...this.Ai())}Ai(){let e=t.compactObject(t.pick(this,["once","passive","capture"]));return[this.eventType,this.nativeCallback,e]}unbind(){let t=this.element.upEventListeners;t&&delete t[this.Li],this.element.removeEventListener(...this.Ai())}nativeCallback(e){if(up.framework.beforeBoot&&!this.beforeBoot)return;let n=e.target;if(this.selector){let e=t.evalOption(this.selector);n=n.closest(e)}if((!this.guard||this.guard(e))&&n){const t=[e,n],i=this.callback.length;if(1!==i&&2!==i){const e=up.script.data(n);t.push(e)}if("click"===this.eventType&&n.disabled)return;const r=this.callback.bind(n,...t);this.baseLayer?this.baseLayer.asCurrent(r):r()}}static fromElement(t){let e=t.element.upEventListeners;if(e)return e[this.Pi(t)]}static Pi(e){var n;return(n=e.callback).upUid||(n.upUid=t.uid()),[e.eventType,e.selector,e.callback.upUid].join("|")}static allNonDefault(e){let n=e.upEventListeners;if(n){const e=Object.values(n);return t.reject(e,"isDefault")}return[]}}},5249:()=>{var t;const e=up.util;up.Change.FromContent=(t=class FromContent extends up.Change{constructor(t){super(t),this.de=t.origin,this.Di=t.preflight,this.$i=up.layer.getAll(t)}Mi(){let t=[];return this.Hi(),this.Ni(),this.Bi(t,this.$i,this.options.target),this.Bi(t,this.$i,this.options.fallback),t}qi(t){return"new"===t||t.isOpen()}Hi(){this.$i=e.filter(this.$i,this.qi)}Bi(t,e,n){for(let i of e)for(let e of this.Ii(n,i)){const n=Object.assign(Object.assign({},this.options),{target:e,layer:i,defaultPlacement:this.zi()}),r="new"===i?new up.Change.OpenLayer(n):new up.Change.UpdateLayer(n);t.push(r)}}Ii(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.options.mode,origin:this.de})}execute(){return this.options.preload?Promise.resolve():this.Ui(this.Vi.bind(this))||this.Ki()}Vi(t){return t.execute(this.Xi(),this.Wi.bind(this,t))}Gi(t){return!(t instanceof up.CannotMatch)}Wi(t){var e,n;let i=this.Mi()[0];t!==i&&up.puts("up.render()",'Could not match primary target "%s". Updating a fallback target "%s".',i.target,t.target);let{assets:r}=this.Xi();r&&up.script.assertAssetsOK(r,t.options),null===(n=(e=this.options).handleAbort)||void 0===n||n.call(e,null)}Xi(){var t,n;if(this.Di)return;const i=e.pick(this.options,["target","content","fragment","document","html","cspInfo","origin","data"]);return null===(n=(t=up.migrate).handleResponseDocOptions)||void 0===n||n.call(t,i),"content"===this.zi()&&(i.target=this.Ji(i.target)),new up.ResponseDoc(i)}Ni(){var t;if(this.Di)return;let e=this.Xi();this.options.fragment&&((t=this.options).target||(t.target=e.rootSelector())),this.options.title=this.improveHistoryValue(this.options.title,e.title),this.options.metaTags=this.improveHistoryValue(this.options.metaTags,e.metaTags),this.options.lang=this.improveHistoryValue(this.options.lang,e.lang)}zi(){if(!this.options.document&&!this.options.fragment)return"content"}Ji(t){let e=this.$i[0]||up.layer.root;return this.Ii(t||":main",e)[0]}getPreflightProps(t={}){return this.Ui((t=>t.getPreflightProps()))||t.optional||this.Qi()}Qi(){this.Yi("Could not find target in current page")}Ki(){this.Yi("Could not find common target in current page and response")}Yi(t){if(this.Mi().length){const n=e.uniq(e.map(this.Mi(),"target")),i=up.layer.optionToString(this.options.layer);throw new up.CannotMatch([t+" (tried selectors %o in %s)",n,i])}if(0!==this.$i.length)throw this.options.didForceFailOptions?new up.CannotMatch("No target selector given for failed responses (https://unpoly.com/failed-responses)"):new up.CannotMatch("No target selector given");this.Zi()}Zi(){throw new up.CannotMatch("Could not find a layer to render in. You may have passed an unmatchable layer reference, or a detached element.")}Ui(t){for(let e of this.Mi())try{return t(e)}catch(t){if(this.Gi(t))throw t}}},e.memoizeMethod(t.prototype,{Mi:!0,Xi:!0,getPreflightProps:!0}),t)},5313:()=>{up.framework=function(){let t="evaling";function e({mode:e="manual"}={}){if("configuring"!==t)return void console.error("Unpoly has already booted");let i=n();i?console.error("Unpoly cannot boot: %s",i):(t="booting",up.emit("up:framework:boot",{mode:e,log:!1}),t="booted",up.emit("up:framework:booted",{mode:e,log:!1}))}function n(){for(let t of["Promise","DOMParser","FormData","reportError"])if(!window[t])return`Browser doesn't support the ${t} API`;if("BackCompat"===document.compatMode)return"Browser is in quirks mode (missing DOCTYPE?)";for(let t of[":is(*)",":has(*)"])if(!CSS.supports(`selector(${t})`))return`Browser doesn't support the ${t} selector`}return{onEvaled:function(){up.emit("up:framework:evaled",{log:!1}),function(){let t=document.currentScript;return!!(null==t?void 0:t.async)||"manual"===(null==t?void 0:t.getAttribute("up-boot"))||"complete"===document.readyState||void 0}()?console.debug("Call up.boot() after you have configured Unpoly"):document.addEventListener("DOMContentLoaded",(()=>e({mode:"auto"}))),t="configuring"},boot:e,startExtension:function(){if("configuring"!==t)throw new Error("Unpoly extensions must be loaded before booting");t="evaling"},stopExtension:function(){t="configuring"},reset:function(){up.emit("up:framework:reset",{log:!1})},get evaling(){return"evaling"===t},get booted(){return"booted"===t},get beforeBoot(){return"booting"!==t&&"booted"!==t},isSupported:function(){return!n()}}}(),up.boot=up.framework.boot},5637:()=>{const t=up.element,e=up.util;up.OverlayFocus=class OverlayFocus{constructor(t){this.rt=t,this.tr=this.rt.getFocusElement(),this.er=this.rt.trapFocus}moveToFront(){this.nr||(this.nr=!0,this.ir=t.setAttrsTemp(this.tr,{tabindex:"0",role:"dialog","aria-modal":this.er.toString()}),this.er&&(this.rr=up.on("focusin",(t=>this.sr(t))),this.ur=t.affix(this.tr,"beforebegin","up-focus-trap[tabindex=0]"),this.ar=t.affix(this.tr,"afterend","up-focus-trap[tabindex=0]")))}moveToBack(){this.teardown()}teardown(){this.nr&&(this.nr=!1,this.ir(),this.er&&(this.rr(),this.ur.remove(),this.ar.remove()))}sr(t){const{target:e}=t;this.cr||up.layer.isWithinForeignOverlay(e)||(this.cr=!0,e===this.ur?this.hr():e!==this.ar&&this.rt.contains(e)||this.lr(),this.cr=!1)}lr(t){up.focus(this.tr,t)}hr(){this.pr(this.rt.getBoxElement())||this.lr()}pr(t){for(let n of e.reverse(t.children))if(up.viewport.tryFocus(n)||this.pr(n))return!0}}},5691:()=>{const t=up.util,e=up.element,n=[{attr:"up-hide-for",toggle(t,n){e.toggle(t,!n)}},{attr:"up-show-for",toggle(t,n){e.toggle(t,n)}},{attr:"up-disable-for",toggle(t,e){up.form.setDisabled(t,e)}},{attr:"up-enable-for",toggle(t,e){up.form.setDisabled(t,!e)}}];up.Switcher=class Switcher{constructor(t){this.L=t,this.dr=t.getAttribute("up-switch")||up.fail("No switch target given for %o",t),this.mr=t.getAttribute("up-switch-region")}start(){return this.gr(),t.sequence(this.vr(),this.br())}vr(){var t,e;let n=()=>this.yr();return(null===(e=(t=up.migrate).watchForSwitch)||void 0===e?void 0:e.call(t,this.L,n))||up.watch(this.L,{logPrefix:"[up-switch]"},n)}br(){return up.fragment.trackSelector(this.dr,{filter:e=>{let n=this.wr;return t.filter(e,(t=>null==n?void 0:n.contains(t)))}},(t=>this._r(t)))}yr(){this.gr()}gr(){const t=this.Or();for(let e of this.kr())this._r(e,t)}_r(e,n=this.Or()){let i=e.upSwitchValues;t.isEqual(i,n)||(e.upSwitchValues=n,this.Sr(e,n))}Sr(e,i){for(let{attr:r,toggle:s}of n){let n=e.getAttribute(r);if(n){let r=this.Er(n);s(e,t.intersect(i,r).length>0)}}let r=["Switching %o",e];up.emit(e,"up:form:switch",{field:this.L,fieldTokens:i,log:r})}kr(){let t=this.wr;return t?up.fragment.subtree(t,this.dr):[]}get wr(){return this.mr?up.fragment.get(this.mr,{origin:this.L}):up.form.getRegion(this.L)}Er(e){return t.getSimpleTokens(e,{json:!0})}Or(){var e;let n=up.Params.fromContainer(this.L).values(),i=[...n],r=t.some(n,t.isPresent);i.push(r?":present":":blank");let s=up.form.fields(this.L);if(null===(e=s[0])||void 0===e?void 0:e.matches("[type=radio], [type=checkbox]")){let e=t.some(s,"checked");i.push(e?":checked":":unchecked")}return i}}},5845:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};let e=up.util;up.Change.OpenLayer=class OpenLayer extends up.Change.Addition{constructor(t){super(t),this.target=t.target,this.de=t.origin,this.jr=t.baseLayer}getPreflightProps(){return{mode:this.options.mode,context:this.Cr().context,origin:this.options.origin,target:this.target,bindLayer:this.jr,layer:"new",bindFragments:e.compact([up.fragment.get(":main",{layer:this.jr})]),fragments:[]}}execute(t,e){this.responseDoc=t,this.bi(),e(),this.Fr();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.yi.bind(this));try{return this.Tr(),this.yi(),up.RenderResult.both(this.Rr,this.Oi)}finally{n()}}bi(){if(":none"===this.target?this.Lr=document.createElement("up-none"):this.Lr=this.responseDoc.select(this.target),!this.Lr||this.jr.isClosed())throw new up.CannotMatch}Fr(){up.puts("up.render()",`Opening element "${this.target}" in new overlay`),this.Pr(),this.layer=this.Cr(),this.jr.peel({history:!this.layer.history}),this.jr.saveHistory(),up.layer.stack.push(this.layer),this.layer.createElements(),this.layer.setupHandlers()}Tr(){this.Ar(),this.handleLayerChangeRequests(),this.responseDoc.commitElement(this.Lr),this.layer.setContent(this.Lr),this.responseDoc.finalizeElement(this.Lr),this.setReloadAttrs({newElement:this.Lr,source:this.options.source}),up.hello(this.layer.element,Object.assign(Object.assign({},this.options),{layer:this.layer,dataRoot:this.Lr})),this.Rr=new up.RenderResult({layer:this.layer,fragments:[this.Lr],target:this.target,renderOptions:this.options}),this.m(),this.Rr.finished=this.l(),this.layer.opening=!1,this.Dr(),this.abortWhenLayerClosed()}yi(){if(this.Oi)return;let t=this.Ei().other;this.Oi=this.executeSteps({steps:t,responseDoc:this.responseDoc})}l(){return t(this,void 0,void 0,(function*(){return yield this.layer.startOpenAnimation(),this.abortWhenLayerClosed(),this.p(),this.Rr}))}Cr(){const t=Object.assign(Object.assign({},this.options),{opening:!0});return up.layer.build(t,(t=>this.options=up.RenderOptions.finalize(t)))}Ar(){var t;"auto"===this.layer.history&&(this.layer.history=up.fragment.hasAutoHistory([this.Lr],this.layer)),(t=this.layer).history&&(t.history=this.jr.history),this.layer.updateHistory(this.options)}p(){var t;null===(t=this.jr.overlayFocus)||void 0===t||t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.Lr,layer:this.layer,autoMeans:["autofocus","layer"],inputDevice:this.options.inputDevice}).process(this.options.focus)}m(){const t=Object.assign(Object.assign({},this.options),{fragment:this.Lr,layer:this.layer,autoMeans:["hash","layer"]});new up.FragmentScrolling(t).process(this.options.scroll)}Pr(){up.event.assertEmitted("up:layer:open",{origin:this.de,baseLayer:this.jr,layerOptions:this.options,log:"Opening new overlay"})}Dr(){this.layer.emit("up:layer:opened",{origin:this.de,callback:this.layer.callback("onOpened"),log:`Opened new ${this.layer}`})}Ei(){return up.radio.hungrySteps(this.Ti())}Ti(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.layer.history})}}},5887:()=>{const t=up.util,e=/^([^ >+(]+) (.+)$/;up.FragmentFinder=class FragmentFinder{constructor(t){var e;this.R=t,this.de=t.origin,this.te=t.selector,this.$r=t.document||window.document,this.Mr=null!==(e=t.match)&&void 0!==e?e:up.fragment.config.match,this.Hr=t.preferOldElements}find(){return this.Nr()||this.Br()||this.qr()}Nr(){if(this.Hr)return this.Hr.find((t=>this.$r.contains(t)&&up.fragment.matches(t,this.te)))}Br(){var t;if("region"===this.Mr&&!up.fragment.containsMainPseudo(this.te)&&(null===(t=this.de)||void 0===t?void 0:t.isConnected))return this.Ir()||this.zr()}Ir(){return up.fragment.closest(this.de,this.te,this.R)}zr(){let n=up.fragment.splitTarget(this.te);return t.findResult(n,(t=>{let n=t.match(e);if(n){let t=up.fragment.closest(this.de,n[1],this.R);if(t)return up.fragment.getFirstDescendant(t,n[2])}}))}qr(){return up.fragment.getFirstDescendant(this.$r,this.te,this.R)}}},6088:()=>{var t;const e=up.util,n=up.element;up.LayerLookup=(t=class LayerLookup{constructor(t,n){this.Ur=t,!1!==n.normalizeLayerOptions&&up.layer.normalizeOptions(n),this.R=n,this.Vr=e.getSimpleTokens(n.layer)}all(){let t=e.flatMap(this.Vr,(t=>this.Kr(t)));return t=e.compact(t),t=e.uniq(t),t}static all(t,...n){const i=e.parseArgIntoOptions(n,"layer"),{layer:r}=i;return r instanceof up.Layer?[r]:new this(t,i).all()}Xr(t){return t=n.get(t),e.find(this.Ur.reversed(),(e=>e.contains(t)))}Wr(t){return this.Ur.at(t)}Kr(t){if(t instanceof up.Layer)return t;if(e.isNumber(t))return this.Wr(t);if(/^\d+$/.test(t))return this.Wr(Number(t));if(e.isElementLike(t))return this.Xr(t);switch(t){case"any":return[this.Gr(),...this.Ur.reversed()];case"current":return this.Gr();case"closest":return this.Ur.selfAndAncestorsOf(this.Gr());case"parent":return this.Gr().parent;case"ancestor":case"ancestors":return this.Gr().ancestors;case"child":return this.Gr().child;case"descendant":case"descendants":return this.Gr().descendants;case"subtree":return this.Gr().subtree;case"new":return"new";case"root":return this.Ur.root;case"overlay":case"overlays":return e.reverse(this.Ur.overlays);case"front":return this.Ur.front;case"origin":return this.Jr();default:return up.fail("Unknown { layer } option: %o",t)}}Jr(){let{origin:t,originLayer:e}=this.R;return e||(t?this.Xr(t):void 0)}Gr(){let{baseLayer:t}=this.R;if(e.isString(t)){const e=Object.assign(Object.assign({},this.R),{baseLayer:this.Ur.current,normalizeLayerOptions:!1,layer:t});return this.constructor.all(this.Ur,e)[0]}return t||this.Jr()||this.Ur.current}},e.memoizeMethod(t.prototype,{Gr:!0,Jr:!0}),t)},6101:()=>{up.history=function(){const t=up.util,e=up.element,n=new up.Config((()=>({enabled:!0,updateMetaTags:!0,restoreTargets:["body"],metaTagSelectors:["meta","link[rel=alternate]","link[rel=canonical]","link[rel=icon]","[up-meta]",'script[type="application/ld+json"]'],noMetaTagSelectors:["meta[http-equiv]","[up-meta=false]","meta[name=csp-nonce]"]})));let i,r,s,o=new up.FIFOCache({capacity:100,normalizeKey:h});function u(){return t.normalizeURL(location.href)}function a(t){var e,n;let{reason:a,alreadyHandled:c}=s||t,l=u();if(r!==l){i=r,r=l,"detect"===a&&(a=h(l)===h(i)?"hash":"pop");let t=!c&&function(t){return!!o.get(t)}(l),s=up.event.build("up:location:changed",{reason:a,location:l,previousLocation:i,alreadyHandled:c,willHandle:t,log:`New location is ${l}`});null===(n=(e=up.migrate).prepareLocationChangedEvent)||void 0===n||n.call(e,s),a&&(up.emit(s),m(s))}}function c(t){return(null==t?void 0:t.split(/(?=#)/))||[]}function h(t){return c(t)[0]}function l(e,n){return t.matchURLs(e,location.href,Object.assign({hash:!0},n))}function p(t,e){l(t)||f("pushState",t,e)}function f(t,e,i){d(e),n.enabled&&(s=i,history[t](null,"",e),s=void 0)}function d(e=u()){e=t.normalizeURL(e),o.set(e,!0)}function m(t){t.alreadyHandled||(t.willHandle?"pop"===t.reason?(up.viewport.saveFocus({location:t.previousLocation}),up.viewport.saveScroll({location:t.previousLocation}),function(t){up.error.muteUncriticalRejection(up.render({guardEvent:up.event.build("up:location:restore",{location:t,log:`Restoring location ${t}`}),url:t,target:n.restoreTargets,fail:!1,history:!0,location:t,peel:!0,layer:"root",cache:"auto",revalidate:"auto",saveScroll:!1,scroll:["restore","auto"],saveFocus:!1,focus:["restore","auto"]}))}(t.location)):"hash"===t.reason&&up.viewport.revealHash(location.hash,{strong:!0}):up.puts("up.history","Ignoring history entry owned by foreign script"))}function g(t=document.head){return t.querySelectorAll(n.selector("metaTagSelectors"))}return up.on("up:framework:boot",(function({mode:t}){a({reason:null,alreadyHandled:!0}),function(){const t=history.pushState;history.pushState=function(...e){t.apply(this,e),a({reason:"push",alreadyHandled:!0})};const e=history.replaceState;history.replaceState=function(...t){e.apply(this,t),a({reason:"replace",alreadyHandled:!0})}}(),"GET"===up.protocol.initialRequestMethod()&&d(),"auto"===t&&up.viewport.revealHash(location.hash,{strong:!0})})),up.on(window,"hashchange, popstate",(()=>{a({reason:"detect",alreadyHandled:!1})})),up.on("up:click",'a[href*="#"]',(function(e,n){var i;if(e.defaultPrevented)return;if(up.event.isModified(e))return;let[r,s]=c(up.layer.current.location),[o,u]=c(t.normalizeURL(n)),a=n.getAttribute("href");if(r!==o&&!a.startsWith("#"))return;let h=null!==(i=n.getAttribute("up-scroll-behavior"))&&void 0!==i?i:"auto",l=up.layer.get(n),f=up.viewport.revealHashFn(u,{layer:l,behavior:h});f&&(up.event.halt(e),up.log.putsEvent(e),u!==s&&l.showsLiveHistory()&&p(r+u,{reason:"hash",alreadyHandled:!0}),f())})),up.macro("[up-back]",(function(t){i&&(e.setMissingAttrs(t,{"up-href":i,"up-scroll":"restore"}),t.removeAttribute("up-back"),up.link.makeFollowable(t))})),up.on("up:framework:reset",(function(){i=void 0,r=void 0,s=void 0,o.clear(),a({reason:null,alreadyHandled:!0}),d()})),{config:n,push:p,replace:function(t,e){f("replaceState",t,e)},get location(){return u()},get previousLocation(){return i},isLocation:l,findMetaTags:g,updateMetaTags:function(t){let e=g();for(let t of e)t.remove();for(let e of t)document.head.append(e)},getLang:function(t=document){let{documentElement:e}=t;if(e.matches("html"))return t.documentElement.lang},updateLang:function(t){e.setAttrPresence(e.root,"lang",t,!!t)}}}()},6140:()=>{const t=up.util,e=up.element;up.Tether=class Tether{constructor(t){var n,i;null===(i=(n=up.migrate).handleTetherOptions)||void 0===i||i.call(n,t),this.Qr=t.anchor,this.Yr=t.align,this.Zr=t.position,this.ts="top"===this.Zr||"bottom"===this.Zr?"horizontal":"vertical",this.es=up.viewport.get(this.Qr),this.parent=this.es===e.root?document.body:this.es,this.ns=!this.es.contains(this.Qr.offsetParent)}start(t){this.st=t,this.st.style.position="absolute",this.rs(0,0),this.sync(),this.ss("on")}stop(){this.ss("off")}ss(t){let e=this.us.bind(this);up[t](window,"resize",e),this.ns&&up[t](this.es,"scroll",e)}us(){return clearTimeout(this.syncTimer),this.syncTimer=t.task(this.sync.bind(this))}isDetached(){return!this.parent.isConnected||!this.Qr.isConnected}sync(){const n=this.st.getBoundingClientRect(),i=e.styleNumber(this.st,"margin-top"),r=e.styleNumber(this.st,"margin-right"),s=e.styleNumber(this.st,"margin-bottom"),o=e.styleNumber(this.st,"margin-left"),u=this.Qr.getBoundingClientRect();let a,c;switch(this.ts){case"horizontal":switch(this.Zr){case"top":c=u.top-s-n.height;break;case"bottom":c=u.top+u.height+i}switch(this.Yr){case"left":a=u.left+o;break;case"center":a=u.left+.5*(u.width-n.width);break;case"right":a=u.left+u.width-n.width-r}break;case"vertical":switch(this.Yr){case"top":c=u.top+i;break;case"center":c=u.top+.5*(u.height-n.height);break;case"bottom":c=u.top+u.height-n.height-s}switch(this.Zr){case"left":a=u.left-r-n.width;break;case"right":a=u.left+u.width+o}}t.isDefined(a)||t.isDefined(c)?this.he(a,c):up.fail("Invalid tether constraints: %o",this.cs())}cs(){return{position:this.Zr,align:this.Yr}}he(t,e){const n=this.st.getBoundingClientRect();this.rs(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)}rs(t,n){this.offsetLeft=t,this.offsetTop=n,e.setStyle(this.st,{left:t,top:n},"px")}}},6347:()=>{const t=up.util;up.Change=class Change{constructor(t){this.options=t}execute(){throw new up.NotImplemented}improveHistoryValue(e,n){return!1===e||t.isString(e)?e:n}deriveFailOptions(){return up.RenderOptions.deriveFailOptions(this.options)}}},6351:()=>{var t;const e=up.util;up.Request=(t=class Request extends up.Record{keys(){return["method","url","hash","params","target","failTarget","headers","timeout","background","cache","expireCache","evictCache","layer","mode","context","failLayer","failMode","failContext","origin","originLayer","originMode","builtAt","wrapMethod","contentType","payload","onLoading","fail","abortable","lateDelay","previews"]}defaults(){let t=up.network.config;return{state:"new",abortable:!0,headers:{},timeout:t.timeout,builtAt:new Date,previews:[],wrapMethod:t.wrapMethod}}constructor(t){var n,i,r;if(super(t),this.params=new up.Params(this.params),this.hs(),(this.target||this.layer||this.origin)&&!t.basic){const t={origin:this.origin};this.layer=up.layer.get(this.layer,t),this.context||(this.context=this.layer.context||{}),this.mode||(this.mode=this.layer.mode),this.failLayer=up.layer.get(this.failLayer,t),this.failContext||(this.failContext=(null===(n=this.failLayer)||void 0===n?void 0:n.context)||{}),this.failMode||(this.failMode=null===(i=this.failLayer)||void 0===i?void 0:i.mode),this.originLayer||(this.originLayer=up.layer.get(this.origin)||up.layer.current),this.originMode||(this.originMode=null===(r=this.originLayer)||void 0===r?void 0:r.mode)}this.bindLayer=t.bindLayer||this.layer,this.ls=t.fragments,this.ps=t.bindFragments,this.Fe=e.newDeferred(),this.fs()}get effectiveLateTime(){var t;return!this.background&&(null!==(t=this.lateDelay)&&void 0!==t?t:e.evalOption(up.network.config.lateDelay,this))}isTimed(){return e.isNumber(this.effectiveLateTime)}get xhr(){var t;return null!==(t=this.ds)&&void 0!==t?t:this.ds=new XMLHttpRequest}get fragments(){return this.ls||(this.ls=this.gs())}gs(){let t=up.fragment.parseTargetSteps(this.target),n={origin:this.origin,layer:this.layer},i=e.map(t,(t=>up.fragment.get(t.selector,n)));return e.compact(i)}get bindFragments(){return this.ps||this.fragments}get fragment(){var t;return null===(t=this.fragments)||void 0===t?void 0:t[0]}hs(){this.method=e.normalizeMethod(this.method),this.vs(),this.bs(),this.url=e.normalizeURL(this.url)}ys(){e.task((()=>{this.layer=void 0,this.failLayer=void 0,this.bindLayer=void 0,this.origin=void 0,this.originLayer=void 0,this.ls=void 0,this.ps=void 0}))}vs(){var t;let e=null===(t=this.url)||void 0===t?void 0:t.match(/^([^#]*)(#.+)$/);if(e)return this.url=e[1],this.hash=e[2]}bs(){!this.url||this.allowsPayload()||e.isBlank(this.params)||(this.url=this.params.toURL(this.url),this.params.clear())}isSafe(){return up.network.isSafeMethod(this.method)}allowsPayload(){return e.methodAllowsPayload(this.method)}will302RedirectWithGET(){return this.isSafe()||"POST"===this.method}willCache(){return e.evalAutoOption(this.cache,up.network.config.autoCache,this)}runQueuedCallbacks(){e.always(this,(()=>this.ys()))}load(){var t;if("new"===this.state)return this.ws()?(this.state="loading",this.hs(),null===(t=this.onLoading)||void 0===t||t.call(this),this.expired=!1,new up.Request.XHRRenderer(this).buildAndSend({onload:()=>this._s(),onerror:()=>this.Os(),ontimeout:()=>this.ks(),onabort:()=>this.Ss()}),!0):void this.abort({reason:"Prevented by event listener"})}runPreviews(t){this.ended||this.fromCache||(this.Es=up.status.runPreviews(this,t))}ws(){return!this.emit("up:request:load",{log:["Loading %s",this.description]}).defaultPrevented}loadPage(){up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()}_s(){const t=this.xs(),e="Loaded "+t.description;this.emit("up:request:loaded",{request:t.request,response:t,log:e}),this.respondWith(t)}Os(){this.js("Network error")}ks(){this.js("Timeout")}Ss(){this.Cs()}abort({reason:t}={}){this.Cs(t)&&this.ds&&this.ds.abort()}Cs(t){if(this.ended)return;let e="Aborted request to "+this.description+(t?": "+t:"");return this.state="aborted",this.Fs(new up.Aborted(e)),this.emit("up:request:aborted",{log:e}),!0}js(t){if(this.ended)return;let e="Cannot load request to "+this.description+(t?": "+t:"");this.state="offline",this.emit("up:request:offline",{log:e}),this.Fs(new up.Offline(e))}respondWith(t){this.response=t,this.ended||(this.state="loaded",t.ok?this.Ts(t):this.Fs(t))}Ts(t){this.Rs(),this.Fe.resolve(t)}Fs(t){this.Rs(),this.Fe.reject(t)}Rs(){var t;null===(t=this.Es)||void 0===t||t.call(this)}get ended(){return"new"!==this.state&&"loading"!==this.state&&"tracking"!==this.state}csrfHeader(){return up.protocol.csrfHeader()}csrfParam(){return up.protocol.csrfParam()}csrfToken(){if(!this.isSafe()&&!this.isCrossOrigin())return up.protocol.csrfToken()}isCrossOrigin(){return e.isCrossOrigin(this.url)}xs(){const t={method:this.method,url:this.url,request:this,xhr:this.xhr,text:this.xhr.responseText,status:this.xhr.status,title:up.protocol.titleFromXHR(this.xhr),target:up.protocol.targetFromXHR(this.xhr),openLayer:up.protocol.openLayerFromXHR(this.xhr),acceptLayer:up.protocol.acceptLayerFromXHR(this.xhr),dismissLayer:up.protocol.dismissLayerFromXHR(this.xhr),eventPlans:up.protocol.eventPlansFromXHR(this.xhr),context:up.protocol.contextFromXHR(this.xhr),expireCache:up.protocol.expireCacheFromXHR(this.xhr),evictCache:up.protocol.evictCacheFromXHR(this.xhr),fail:this.fail};let n=up.protocol.methodFromXHR(this.xhr),i=up.protocol.locationFromXHR(this.xhr);return i&&(e.matchURLs(this.url,i)||n||(n="GET"),t.url=i),n&&(t.method=n),new up.Response(t)}Ls(t){return up.EventEmitter.fromEmitArgs(t,{layer:this.bindLayer,request:this,origin:this.origin})}emit(...t){return this.Ls(t).emit()}assertEmitted(...t){this.Ls(t).assertEmitted()}get description(){return this.method+" "+this.url}isBoundToSubtrees(t){return t=e.wrapList(t),e.some(this.bindFragments,(function(n){return e.some(t,(t=>t.contains(n)))}))}isBoundToLayers(t){return e.contains(t,this.bindLayer)}get age(){return new Date-this.builtAt}header(t){return this.headers[t]}fs(){for(let t of["target","failTarget","mode","failMode","context","failContext","originMode"])this.Ps(t);let t,e;(t=this.csrfHeader())&&(e=this.csrfToken())&&this.As(t,e),this.As(up.protocol.headerize("version"),up.version)}Ps(t){this.As(up.protocol.headerize(t),this[t])}As(t,n){e.isMissing(n)||((e.isOptions(n)||e.isArray(n))&&(n=e.safeStringifyJSON(n)),this.headers[t]=n)}mergeIfUnsent(t){if("new"!==this.state)return;if(!this.target||!t.target)return;let n=up.fragment.splitTarget(this.target+","+t.target);this.target=e.uniq(n).join(", "),this.Ps("target"),this.ls=e.uniq([...this.fragments,...t.fragments])}static tester(t,{except:n}={}){let i;if(e.isFunction(t))i=t;else if(t instanceof this)i=e=>t===e;else if(e.isString(t)){let e=new up.URLPattern(t);i=t=>e.test(t.url)}else i=e=>t;return n?t=>!up.cache.willHaveSameResponse(t,n)&&i(t):i}},e.delegatePromise(t.prototype,(function(){return this.Fe})),t)},6374:()=>{var t;const e="multipart/form-data",n=up.util;up.Request.XHRRenderer=(t=class XHRRenderer{constructor(t){this.zt=t}buildAndSend(t){const e=this.zt.xhr;this.Ds=n.copy(this.zt.params),this.zt.timeout&&(e.timeout=this.zt.timeout),e.open(this.$s(),this.zt.url);let i=this.Ms();i&&e.setRequestHeader("Content-Type",i);for(let t in this.zt.headers){let n=this.zt.headers[t];e.setRequestHeader(t,n)}Object.assign(e,t),e.send(this.Hs())}$s(){let t=this.zt.method;return this.zt.wrapMethod&&!this.zt.will302RedirectWithGET()&&(t=up.protocol.wrapMethod(t,this.Ds)),t}Ms(){return this.Ns(),this.Bs}Hs(){return this.Ns(),this.qs}Ns(){this.qs=this.zt.payload,this.Bs=this.zt.contentType,!this.qs&&this.zt.allowsPayload()&&(this.Bs||(this.Bs=this.Ds.hasBinaryEntries()?e:"application/x-www-form-urlencoded"),this.Bs===e?(this.Bs=null,this.qs=this.Ds.toFormData()):this.qs=this.Ds.toQuery().replace(/%20/g,"+"))}},n.memoizeMethod(t.prototype,{Ns:!0,$s:!0}),t)},6559:()=>{up.migrate={config:{}}},6607:()=>{const t=up.util;up.LinkCurrentURLs=class LinkCurrentURLs{constructor(e){if(this.Is=up.link.isSafe(e),this.Is){const n=e.getAttribute("href");n&&"#"!==n&&(this.zs=t.matchableURL(n));const i=e.getAttribute("up-href");i&&(this.Us=t.matchableURL(i));const r=e.getAttribute("up-alias");r&&(this.Vs=new up.URLPattern(r))}}isCurrent(t){var e,n;return!(!t||this.zs!==t&&this.Us!==t&&!(null===(n=null===(e=this.Vs)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1)))}isAnyCurrent(t){return t.some((t=>{var e,n;return this.zs===t||this.Us===t||(null===(n=null===(e=this.Vs)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1))}))}}},6689:()=>{const t=up.util,e=up.element;up.Selector=class Selector{constructor(e,n,i={}){var r;this.Ks=[];let s,o=n&&!document.contains(n);if(o||i.destroying||this.Ks.push(up.fragment.isNotDestroying),this.Xs=o||"any"===i.layer||1===up.layer.count,this.Xs)s=up.layer.root;else{if(null!==(r=i.layer)&&void 0!==r||(i.layer=t.presence(n,t.isElement)),this.$i=up.layer.getAll(i),!this.$i.length)throw new up.CannotMatch(["Unknown layer: %o",i.layer]);this.Ks.push((e=>t.some(this.$i,(t=>t.contains(e))))),s=this.$i[0]}this.Ws=up.fragment.expandTargets(e,Object.assign(Object.assign({},i),{layer:s})),this.Gs=this.Ws.join()||"match-none"}matches(t){return e.elementLikeMatches(t,this.Gs)&&this.Js(t)}closest(t){return this.Qs(t.closest(this.Gs))}descendants(t=document){return this.Ys(t.querySelectorAll(this.Gs))}firstDescendant(n){return this.Xs?(n||(n=document),this.Zs((t=>n.querySelectorAll(t)))):t.findResult(this.$i,(t=>this.Zs((n=>e.subtree(t.element,n)))))}subtree(t){return this.Ys(e.subtree(t,this.Gs))}Zs(e){return t.findResult(this.Ws,(t=>this.Ys(e(t))[0]))}Js(e){return e&&t.every(this.Ks,(t=>t(e)))}Qs(e){return t.presence(e,this.Js.bind(this))}Ys(e){return t.filter(e,this.Js.bind(this))}}},6705:()=>{let t="up.log.enabled",e=!1;try{e=!!(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem(t))}catch(t){}up.LogConfig=class LogConfig extends up.Config{constructor(){super((()=>({banner:!0,format:!0})))}get enabled(){return e}set enabled(n){e=n;try{null===sessionStorage||void 0===sessionStorage||sessionStorage.setItem(t,n?"1":"")}catch(t){}}}},6805:()=>{const t=up.util;up.CompilerPass=class CompilerPass{constructor(t,e,{layer:n,data:i,dataRoot:r,dataMap:s,meta:o}){n||(n=up.layer.get(t)||up.layer.current),this.L=t,this.eo=e,this.rt=n,this.no=i,this.io=r||t,this.ro=s,o||(o={}),o.layer=n,this.so=o}run(){this.rt.asCurrent((()=>{this.setCompileData();for(let t of this.eo)this.oo(t)}))}setCompileData(){if(this.no&&(this.io.upCompileData=this.no),this.ro)for(let t in this.ro)for(let e of this.uo(t))e.upCompileData=this.ro[t]}oo(t){var e,n;const i=this.ao(t);if(i.length){if(t.isDefault||up.puts("up.hello()",'Compiling %d× "%s" on %s',i.length,t.selector,this.rt),t.batch)this.co(t,i);else for(let e of i)this.ho(t,e);return null===(n=(e=up.migrate).postCompile)||void 0===n?void 0:n.call(e,i,t)}}ho(t,e){const n=[e];if(1!==t.length){const t=up.script.data(e);n.push(t,this.so)}const i=this.lo(t,e,n);up.destructor(e,i)}co(e,n){const i=[n];if(1!==e.length){const e=t.map(n,up.script.data);i.push(e,this.so)}this.lo(e,n,i)&&up.fail("Compilers with { batch: true } cannot return destructors")}lo(t,e,n){return up.error.guard((()=>t.apply(e,n)))}uo(e){return up.fragment.subtree(this.L,t.evalOption(e),{layer:this.rt})}ao(e){let n=this.uo(e.selector);return t.filter(n,(t=>{let n=t.upAppliedCompilers||(t.upAppliedCompilers=new Set);if(!n.has(e))return n.add(e),!0}))}}},6858:()=>{var t;const e=up.util,n=up.element,i=/^\s*(<!--[^-]*.*?-->\s*)*<(html|!DOCTYPE)\b/i;up.ResponseDoc=(t=class ResponseDoc{constructor({document:t,fragment:e,content:n,target:i,origin:r,data:s,cspInfo:o,match:u}){if(t?this.po(t,r,s):e?this.fo(e,r,s):this.do(n||"",r,i,s),this.mo=o||{},r){let t=up.fragment.tryToTarget(r);t&&(this.vo=this.select(t))}this.Mr=u}po(t,r,s){if(t instanceof Document)this.$r=t,this.bo=!0;else if(e.isString(t)){this.bo=i.test(t);let e=t=>[n.createBrokenDocumentFromHTML(t)],o=up.fragment.provideNodes(t,{origin:r,data:s,htmlParser:e});o[0]instanceof Document?this.$r=o[0]:this.$r=this.yo(o)}else this.$r=this.yo(t)}fo(t,e,i){let r=n.extractSingular(up.fragment.provideNodes(t,{origin:e,data:i}));this.$r=this.yo(r)}do(t,i,r,s){r||up.fail("must pass a { target } when passing { content }");let o=e.map(up.fragment.parseTargetSteps(r),"selector").join(),u=up.fragment.provideNodes(t,{origin:i,data:s}),a=n.createFromSelector(o,{content:u});this.$r=this.yo(a)}yo(t){t=e.wrapList(t);let n=document.createElement("up-document");return n.append(...t),n}rootSelector(){return up.fragment.toTarget(this.$r.children[0])}get title(){return this.wo(this._o)}Oo(){if(this.bo)return this.$r.head}wo(t){let e=this.Oo();return e&&t(e)}get metaTags(){return this.wo(up.history.findMetaTags)}get assets(){return this.wo((t=>{let n=up.script.findAssets(t);return e.map(n,(t=>(this.ko(t),this.So(t))))}))}get lang(){if(this.bo)return up.history.getLang(this.$r)}_o(t){var e;return null===(e=t.querySelector("title"))||void 0===e?void 0:e.textContent}select(t){return new up.FragmentFinder({selector:t,origin:this.vo,document:this.$r,match:this.Mr}).find()}selectSteps(t){return t.filter((t=>this.Eo(t)||this.xo(t)))}commitSteps(t){return t.filter((t=>this.commitElement(t.newElement)))}Eo(t){if(t.newElement)return!0;let e=this.select(t.selector);if(!e)return;let{selectEvent:n}=t;return n&&(n.newFragment=e,n.renderOptions=t.originalRenderOptions,up.emit(t.oldElement,n,{callback:t.selectCallback}),n.defaultPrevented)?void 0:(t.newElement=e,!0)}xo(t){if(!t.maybe)throw new up.CannotMatch}jo(t){let e=up.protocol.cspNonce();up.script.disableSubtree(t,(t=>!this.Co(t,e)))}Co(t,n){var i;let r=up.fragment.config.runScripts;return!0===r&&(null===(i=this.mo.declaration)||void 0===i?void 0:i.includes("'strict-dynamic'"))?n&&n===t.nonce:e.evalOption(r,t)}So(t){return n.revivedClone(t)}Fo(t){if(this.$r instanceof Document)for(let e of n.subtree(t,":is(noscript, script, audio, video):not(.up-keeping, .up-keeping *)")){let t=this.So(e);e.replaceWith(t)}}ko(t){up.script.adoptNoncesInSubtree(t,this.mo.nonces)}commitElement(t){if(this.$r.contains(t))return this.ko(t),this.jo(t),t.remove(),!0}finalizeElement(t){this.Fo(t)}},e.memoizeMethod(t.prototype,{Oo:!0}),t)},6939:()=>{up.error=function(){function t(t){if("object"!=typeof(e=t)||!("AbortError"===e.name||e instanceof up.RenderResult||e instanceof up.Response))throw t;var e}function e(t,...e){try{return t(...e)}catch(t){reportError(t)}}return{fail:function(...t){throw new up.Error(t)},throwCritical:t,muteUncriticalRejection:function(e){return e.catch(t)},muteUncriticalSync:function(e){try{return e()}catch(e){t(e)}},guard:e,guardFn:function(t){return(...n)=>e((()=>t(...n)))}}}(),up.fail=up.error.fail},6973:(t,e,n)=>{n(3278);const i=up.util,r=up.element;up.fragment=function(){function t(t){let e=r.tagName(t);if(e.startsWith("up-"))return e}const e=["[up-id]","[id]","html","head","body"],n=new up.Config((()=>({badTargetClasses:[/^up-/],strongTargetDerivers:e,targetDerivers:[...e,"main","[up-main]",t,"link[rel][type]","link[rel=preload][href]","link[rel=preconnect][href]","link[rel=prefetch][href]","link[rel]","meta[property]","*[name]","form[action]","a[href]","[class]","[up-flashes]","form"],verifyDerivedTarget:!0,renderOptions:{hungry:!0,keep:!0,saveScroll:!0,saveFocus:!0,focus:"keep",focusVisible:"auto",abort:"target",failOptions:!0,feedback:!0},navigateOptions:{cache:"auto",revalidate:"auto",fallback:!0,focus:"auto",scroll:"auto",history:"auto",peel:!0},match:"region",runScripts:!1,autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","keep","target-if-lost"],autoScroll:["hash","layer-if-main"],autoRevalidate:t=>t.expired,skipResponse:s,normalizeKeepHTML:d})));function s({response:t,expiredResponse:e}){return!t.text||t.text===(null==e?void 0:e.text)}function o(t,e={}){return t=b(t,e),r.closestAttr(t,"up-source")}function u(t){return i.normalizeURL(t,{hash:!1})}function a(t){let e=r.closestAttr(t,"up-time");if(e&&"false"!==e)return/^\d+$/.test(e)&&(e=1e3*Number(e)),new Date(e)}function c(t){let e=r.closestAttr(t,"up-etag");if(e&&"false"!==e)return e}i.delegate(n,["mainTargets"],(()=>up.layer.config.any));const h=up.mockable(((...t)=>{let e=k(t);return new up.RenderJob(e).execute()})),l=up.mockable(((...t)=>{const e=k(t);return h(Object.assign(Object.assign({},e),{navigate:!0}))}));function p(t){let{oldElement:e,newElement:n,newData:i,renderOptions:s}=t;const o=["Keeping fragment %o",e],u=r.callbackAttr(t.oldElement,"up-on-keep",{exposedKeys:["newFragment","newData"]}),a=up.event.build("up:fragment:keep",{newFragment:n,newData:i,renderOptions:s});return up.emit(e,a,{log:o,callback:u})}function f(t,e=m(t)){var r;return null!==(r=t.upKeepIdentity)&&void 0!==r?r:t.upKeepIdentity=i.copy(function(t,e){return"same-html"===e?n.normalizeKeepHTML(t.outerHTML):"same-data"!==e||up.data(t)}(t,e))}function d(t){let e=["up-etag","up-source","up-time","nonce",...up.script.config.nonceableAttributes],n=new RegExp(`\\s+(${e.join("|")})="[^"]*"`,"g");return(t=t.replace(/<[^<]+>/g,(t=>t.replace(n,"")))).replace(/^[ \t]+/gm,"")}function m(t){return r.booleanOrStringAttr(t,"up-keep")}function g(t){return!t.closest(".up-destroying")}function v(t){return t.isConnected&&g(t)}function b(...t){let[e,n,s]=w(t);return i.isElementLike(n)?r.get(n):e?y(e,n,s):new up.FragmentFinder({selector:n,origin:s.origin,layer:s.layer,match:s.match}).find()}function y(...t){let[e,n,i]=w(t);return new up.Selector(n,e,i).firstDescendant(e)}function w(t){return i.args(t,"val","val","options")}function _(...t){let[e,n,r]=w(t);return i.isElement(n)?[n]:i.isList(n)?n:new up.Selector(n,e,r).descendants(e)}function O(t,e,n={}){return new up.Selector(e,t,n).subtree(t)}function k(t){const e=i.parseArgIntoOptions(t,"target");return i.isElement(e.target)&&(e.origin||(e.origin=e.target)),e}up.macro("[up-keep]",(t=>f(t)));const S=/^(onFail|on|fail)?(.+)$/;function E(t,e){return i.presence(t,i.isString)||x(t,e)||function(t){throw new up.CannotTarget(function(t){return`Cannot derive good target selector from a <${r.tagName(t)}> element without identifying attributes. Try setting an [id] or configure up.fragment.config.targetDerivers.`}(t))}(t)}function x(t,e={}){let s=e.strong?n.strongTargetDerivers:n.targetDerivers;return i.findResult(s,(function(s){let o=function(t,e){if(i.isFunction(e))return e(t);if(t.matches(e))try{return function(t,e){let{includePath:n,excludeRaw:i}=r.parseSelector(e);if(1!==n.length)throw new up.CannotParse(e);let{tagName:s,id:o,classNames:u,attributes:a}=n[0],c="";"*"===s?c+=r.tagName(t):s&&(c+=s);for(let t of u)c+=r.classSelector(t);o&&(c+=r.idSelector(o));for(let e in a){let n=a[e]||t.getAttribute(e);if("id"===e)c+=r.idSelector(n);else if("class"===e)for(let e of j(t))c+=r.classSelector(e);else c+=r.attrSelector(e,n)}return i&&(c+=i),c}(t,e)}catch(t){if(t instanceof up.CannotParse)return e;throw t}}(t,s);if(o&&function(t,e,i={}){var r;let s=null!==(r=i.verify)&&void 0!==r?r:n.verifyDerivedTarget;return!v(e)||!s||up.fragment.get(t,Object.assign({layer:e},i))===e}(o,t,e))return o}))}function j(t){return i.filter(t.classList,(t=>!i.some(n.badTargetClasses,(e=>{return n=e,r=t,i.isRegExp(n)?n.test(r):n===r;var n,r}))))}const C=/:main\b/,F=/:layer\b/,T=/:origin\b/;function R(t){return C.test(t)}function L(t,e={}){const{layer:n}=e;"new"===n||n instanceof up.Layer||up.fail("Must pass an up.Layer as { layer } option, but got %o",n),t=i.copy(i.wrapList(t));const r=[];for(;t.length;){let s=t.shift();if(!0===s&&(s=":main"),R(s)){let n=P(e),i=up.layer.mainTargets(n).map((t=>s.replace(C,t)));t.unshift(...i)}else if(F.test(s)){if("new"===n||n.opening)continue;let i=E(n.getFirstSwappableElement(),e);t.unshift(s.replace(F,i))}else i.isElementLike(s)?r.push(E(s,e)):i.isString(s)&&r.push(D(s,e))}return i.uniq(r)}function P({layer:t,mode:e}){return"new"===t?e||up.fail('Must pass a { mode } option together with { layer: "new" }'):t.mode}function A(t,{origin:e}={}){return t.replace(T,(function(n){if(e)return E(e);up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',n,t)}))}function D(t,e){return i.isString(t)?(up.migrate.resolveOrigin||A)(t,e):t}function $(t){return i.getComplexTokens(t)}const M=/^([\w-]+|\*)?(#|\.|[:[][a-z-]{3,})/;function H(t,{origin:e,originLayer:n,data:s,htmlParser:o=r.createNodesFromHTML}={}){if(i.isString(t)&&M.test(t)){let[r,o]=i.parseScalarJSONPairs(t)[0];s=Object.assign(Object.assign({},s),o),t=up.fragment.get(r,{layer:"closest",origin:e,originLayer:n})||up.fail('Cannot find template "%s"',t)}return i.isString(t)&&(t=o(t)),function(t){return i.isElement(t)&&t.matches("template, script[type]")&&!up.script.isScript(t)}(t)&&(t=N(t,s,{htmlParser:o})),i.wrapList(t)}function N(t,e={},{origin:n,htmlParser:i}={}){var s;let o=b(t,{origin:n})||up.fail("Template not found: %o",t),u=null!==(s=up.emit(o,"up:template:clone",{data:e,nodes:null,log:["Using template %o",t]}).nodes)&&void 0!==s?s:function(t,e=r.createNodesFromHTML){return e(t.innerHTML)}(o,i);for(let t of u)t.upTemplateData=e;return u}return up.on("up:framework:boot",(function(){const{documentElement:t}=document;if(up.hello(t),t.setAttribute("up-source",u(location.href)),!up.browser.canPushState())return up.warn("Cannot push history changes. Next render pass with history will load a full page.")})),{config:n,reload:function(...t){var e,n;const s=k(t);s.target||(s.target=":main");const u=b(s.target,s);return s.url||(s.url=o(u)),s.headers=i.merge(s.headers,function(t){let e={},n=a(t);n&&(e["If-Modified-Since"]=n.toUTCString());let i=c(t);return i&&(e["If-None-Match"]=i),e}(u)),(s.keepData||r.booleanAttr(u,"up-keep-data"))&&(s.data=up.data(u)),null===(n=(e=up.migrate).postprocessReloadOptions)||void 0===n||n.call(e,s),h(s)},destroy:function(...t){var e,n;const i=k(t);return(i.element=b(i.target,i))&&new up.Change.DestroyFragment(i).execute(),null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.destroy()")},render:h,navigate:l,get:b,getFirstDescendant:y,all:_,subtree:O,contains:function(t,e){return i.isElement(e)?r.contains(t,e)&&up.layer.get(t).contains(e):O(t,e).length>0},closest:function(t,e,n){return new up.Selector(e,t,n).closest(t)},source:o,normalizeSource:u,visit:function(t,e){return l(Object.assign(Object.assign({},e),{url:t}))},markAsDestroying:function(t){t.classList.add("up-destroying"),t.setAttribute("inert","")},emitInserted:function(t){if(!t.upInserted)return t.upInserted=!0,up.emit(t,"up:fragment:inserted",{log:["Inserted fragment %o",t]})},emitDestroyed:function(t,e){var n;const i=null!==(n=e.log)&&void 0!==n?n:["Destroyed fragment %o",t],r=e.parent||document;return up.emit(r,"up:fragment:destroyed",{fragment:t,parent:r,log:i})},emitKeep:p,keepPlan:function(t){if(!1===t.keep)return;const{oldElement:e,newElement:n}=t;let s,o=m(e);if(!o)return;let u=up.fragment.toTarget(e);const a={layer:t.layer};if(s=t.descendantsOnly?up.fragment.get(n,u,a):r.subtreeFirst(n,u,a),!s)return;if(!1===m(s))return;let c=f(e,o),h=f(s,o);if(!i.isEqual(c,h))return;const l={oldElement:e,newElement:s,newData:up.script.data(s),renderOptions:t};return p(l).defaultPrevented?void 0:l},defaultNormalizeKeepHTML:d,successKey:function(t){let e=S.exec(t);if(e){let[t,n,r]=e;switch(n){case"onFail":return"on"+i.upperCaseFirst(r);case"fail":return i.lowerCaseFirst(r)}}},failKey:function(t){let e=S.exec(t);if(e){let[t,n,r]=e;switch(n){case"on":return"onFail"+i.upperCaseFirst(r);case void 0:return"fail"+i.upperCaseFirst(r)}}},expandTargets:L,resolveOrigin:D,toTarget:E,tryToTarget:x,isTargetable:function(t,e){return!!x(t,e)},matches:function(t,e,n={}){if(t=r.get(t),i.isElement(e)){let n=x(e);return n&&t.matches(n)}return new up.Selector(e,t,n).matches(t)},hasAutoHistory:function(t,e){let i=L(n.autoHistoryTargets,{layer:e}).join();for(let e of t)if(r.subtree(e,i).length)return!0;return up.puts("up.render()","Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets"),!1},time:a,etag:c,shouldRevalidate:function(t,e,r={}){return t.fromCache&&i.evalAutoOption(r.revalidate,n.autoRevalidate,e)},abort:function(...t){let e,n,r=k(t),{reason:s,newLayer:o}=r;if(r.target)n=_(r.target,r),e=t=>t.isBoundToSubtrees(n),s||(s="Aborting requests within fragment");else{let t=up.layer.getAll(r);n=i.map(t,"element"),e=e=>e.isBoundToLayers(t),s||(s="Aborting requests within "+t.join(", "))}up.network.abort((t=>t.abortable&&e(t)),Object.assign(Object.assign({},r),{reason:s}));for(let t of n)up.emit(t,"up:fragment:aborted",{reason:s,newLayer:o,log:!1})},onAborted:function(t,e){let n=up.on("up:fragment:aborted",{guard:e=>e.target.contains(t)},e);return up.destructor(t,n),n},onFirstIntersect:function(t,e,{margin:n=0}={}){if(r.isIntersectingWindow(t,{margin:n}))return void e();let i=new IntersectionObserver((function(t){for(let n of t)if(n.isIntersecting)return s(),void e()}),{rootMargin:`${n}px`}),s=()=>i.disconnect();i.observe(t),up.destructor(t,s)},splitTarget:$,parseTargetSteps:function(t,e={}){var n;let i=e.defaultPlacement||"swap",r=null!==(n=e.defaultMaybe)&&void 0!==n&&n,s=[],o=$(t);for(let t of o){if(":none"===t)continue;let n=i,o=r;t=t.replace(/\b::?(before|after|content)\b/,((t,e)=>(n=e,""))),t=t.replace(/\b:maybe\b/,(()=>(o=!0,"")));const u=Object.assign(Object.assign({},e),{selector:t,placement:n,maybe:o,originalRenderOptions:e});s.push(u)}return s},isAlive:v,isNotDestroying:g,targetForSteps:function(t){let e=t.filter((t=>{var e;return!t.maybe||(null===(e=t.oldElement)||void 0===e?void 0:e.isConnected)}));return i.map(e,"selector").join(", ")||":none"},compressNestedSteps:function(t){if(t.length<2)return t;let e=i.uniqBy(t,"oldElement");return e=i.reject(e,(t=>function(t,e){return i.some(t,(function(t){return t!==e&&("swap"===t.placement||"content"===t.placement)&&t.oldElement.contains(e.oldElement)}))}(e,t))),e},containsMainPseudo:R,insertTemp:function(...t){let[e,n="beforeend",s]=i.args(t,"val",i.isAdjacentPosition,"val"),o=H(s,{origin:e}),u=r.wrapIfRequired(o),a=document.contains(u)&&r.documentPosition(u);return e.insertAdjacentElement(n,u),a?()=>{a[0].insertAdjacentElement(a[1],u)}:(up.hello(u),()=>up.destroy(u))},provideNodes:H,cloneTemplate:N,trackSelector:function(...t){let e=i.args(t,"val","options","callback");return new up.SelectorTracker(...e).start()}}}(),up.reload=up.fragment.reload,up.destroy=up.fragment.destroy,up.render=up.fragment.render,up.navigate=up.fragment.navigate,up.visit=up.fragment.visit,up.template={clone:up.fragment.cloneTemplate},i.delegate(up,["context"],(()=>up.layer.current))},7080:()=>{const t=up.util,e=up.element;up.OptionsParser=class OptionsParser{constructor(t,e,n={}){this.R=e,this.st=t,this.To=n.fail,this.Ro=n.closest,this.Lo=n.attrPrefix||"up-",this.Po=n.defaults||{}}string(t,n){this.parse(e.attr,t,n)}boolean(t,n){this.parse(e.booleanAttr,t,n)}number(t,n){this.parse(e.numberAttr,t,n)}booleanOrString(t,n){this.parse(e.booleanOrStringAttr,t,n)}booleanOrNumber(t,n){this.parse(e.booleanOrNumberAttr,t,n)}json(t,n){this.parse(e.jsonAttr,t,n)}callback(t,n={}){this.parse(((t,i)=>e.callbackAttr(t,i,n)),t,n)}parse(e,n,i={}){var r,s;const o=t.wrapList(null!==(r=i.attr)&&void 0!==r?r:this.Ao(n));let u,a=this.R[n];for(let t of o)null!=a||(a=this.Do(e,this.st,t));if(null!=a||(a=null!==(s=i.default)&&void 0!==s?s:this.Po[n]),t.isDefined(a)){let t=i.normalize;t&&(a=t(a)),this.R[n]=a}if(this.To&&(u=up.fragment.failKey(n))){const n=t.compact(t.map(o,(t=>this.$o(t))));this.parse(e,u,Object.assign(Object.assign({},i),{attr:n}))}}include(t,e){let n=t(this.st,this.R,Object.assign({defaults:this.Po},e));Object.assign(this.R,n)}Do(t,n,i){return this.Ro?e.closestAttr(n,i,t):t(n,i)}$o(t){return this.Mo(t,this.Lo+"on-")||this.Mo(t,this.Lo)}Mo(t,e){if(t.startsWith(e))return`${e}fail-${t.substring(e.length)}`}Ao(e){return`${this.Lo}${t.camelToKebabCase(e)}`}}},7115:()=>{window.up={version:"3.11.0"}},7275:()=>{const t=up.util;up.FIFOCache=class FIFOCache{constructor({capacity:e=10,normalizeKey:n=t.identity}={}){this.Ho=new Map,this.No=e,this.Bo=n}get(t){return t=this.Bo(t),this.Ho.get(t)}set(t,e){if(this.Ho.size===this.No){let t=this.Ho.keys().next().value;this.Ho.delete(t)}t=this.Bo(t),this.Ho.set(t,e)}clear(){this.Ho.clear()}}},7294:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const e=up.util;class Route{constructor(){this.varyHeaders=new Set,this.requests=[]}matchBest(t){let n=this.requests.filter((e=>this.satisfies(e,t)));return e.last(n)}delete(t){e.remove(this.requests,t)}put(t){this.requests.push(t)}updateVary(t){for(let e of t.varyHeaderNames)this.varyHeaders.add(e)}satisfies(t,n){return t===n||e.every(this.varyHeaders,(i=>{let r=t.header(i),s=n.header(i);if("X-Up-Target"===i||"X-Up-Fail-Target"===i){if(!r)return!0;if(!s)return!1;let t=up.fragment.splitTarget(r),n=up.fragment.splitTarget(s);return e.containsAll(t,n)}return r===s}))}}up.Request.Cache=class Cache{constructor(){this.reset()}reset(){this.qo={},this.Io=[]}get(t){t=this.zo(t);let e=this.Uo(t),n=e.matchBest(t);if(n){if(this.Vo(n))return n;this.Ko(t,e)}}put(e){return t(this,void 0,void 0,(function*(){e=this.zo(e);let t=this.Uo(e),{response:n}=e;n&&t.updateVary(n);let i=t.requests.filter((n=>t.satisfies(e,n)));for(let t of i)this.Ko(t);e.cacheRoute=t,t.put(e),this.Io.push(e),this.Xo()}))}track(n,i,r={}){var s;return t(this,void 0,void 0,(function*(){let t;i.trackedRequest=n,i.state="tracking",t=n.ended&&n.response?n.response:yield e.always(n),t instanceof up.Response?r.force||n.cacheRoute.satisfies(n,i)?(i.fromCache=!0,t=e.variant(t,{request:i}),i.respondWith(t),e.delegate(i,["expired","state"],(()=>n))):(delete i.trackedRequest,i.state="new",null===(s=r.onIncompatible)||void 0===s||s.call(r,i)):(i.state=n.state,i.Fs(t))}))}willHaveSameResponse(t,e){return t===e||t===e.trackedRequest}evict(t=!0,e){this.Wo(t,e,(t=>this.Ko(t)))}expire(t=!0,e){this.Wo(t,e,(t=>t.expired=!0))}reindex(t){this.Ko(t),delete t.cacheRoute,this.put(t)}Ko(t){var n;e.remove(this.Io,t),null===(n=t.cacheRoute)||void 0===n||n.delete(t)}Uo(t){var e,n;return t.cacheRoute||(e=this.qo)[n=t.description]||(e[n]=new Route)}Vo(t){return t.age<up.network.config.cacheEvictAge}get currentSize(){return this.Io.length}get No(){return up.network.config.cacheSize}Xo(){for(let t=0;t<this.currentSize-this.No;t++)this.Ko(this.Io[0])}Wo(t=!0,n,i){let r=up.Request.tester(t,n),s=e.filter(this.Io,r);e.each(s,i)}zo(t){return e.wrapValue(up.Request,t)}}},7304:function(){var t,e=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const n=up.element,i=up.util;up.Layer.Overlay=((t=class Overlay extends up.Layer{keys(){return[...super.keys(),...this.constructor.VISUAL_KEYS,"onOpened","onAccept","onAccepted","onDismiss","onDismissed","acceptEvent","dismissEvent","acceptLocation","dismissLocation","opening"]}constructor(t){super(t),!0===this.dismissable?this.dismissable=["button","key","outside"]:!1===this.dismissable?this.dismissable=[]:this.dismissable=i.getSimpleTokens(this.dismissable),this.acceptLocation&&(this.acceptLocation=new up.URLPattern(this.acceptLocation)),this.dismissLocation&&(this.dismissLocation=new up.URLPattern(this.dismissLocation))}callback(t){let e=this[t];if(e)return e.bind(this)}createElement(t){this.nesting||(this.nesting=this.Go());const e=i.compactObject(i.pick(this,["align","position","size","class","nesting"]));this.element=this.affixPart(t,null,e)}createBackdropElement(t){this.backdropElement=this.affixPart(t,"backdrop")}createViewportElement(t){this.viewportElement=this.affixPart(t,"viewport",{"up-viewport":""})}createBoxElement(t){this.boxElement=this.affixPart(t,"box")}createContentElement(t){this.contentElement=this.affixPart(t,"content")}setContent(t){this.contentElement.append(t),this.onContentSet()}onContentSet(){}createDismissElement(t){return this.dismissElement=this.affixPart(t,"dismiss",{"up-dismiss":'":button"',"aria-label":this.dismissARIALabel}),n.affix(this.dismissElement,'span[aria-hidden="true"]',{text:this.dismissLabel})}affixPart(t,e,i={}){return n.affix(t,this.selector(e),i)}static selector(t){return i.compact(["up",this.mode,t]).join("-")}Go(){const{parent:t}=this;return this.mode===t.mode?1+t.Go():0}setupHandlers(){var t,e;super.setupHandlers(),this.overlayFocus=new up.OverlayFocus(this),this.Jo("button")&&this.createDismissElement(this.getBoxElement()),this.Jo("outside")&&(this.viewportElement?up.on(this.viewportElement,"up:click",(t=>{t.target===this.viewportElement&&this.Qo(t,!0)})):this.Yo=this.parent.on("up:click",((t,e)=>{if(!up.layer.isWithinForeignOverlay(e)){const n=this.origin&&this.origin.contains(e);this.Qo(t,n)}}))),this.Jo("key")&&(this.Zo=up.event.onEscape((t=>this.onEscapePressed(t)))),this.registerAttrCloser("up-accept",((t,e)=>{this.accept(t,e)})),this.registerAttrCloser("up-dismiss",((t,e)=>{this.dismiss(t,e)})),null===(e=(t=up.migrate).registerLayerCloser)||void 0===e||e.call(t,this),this.tu(this.acceptEvent,this.accept),this.tu(this.dismissEvent,this.dismiss),this.on("up:click","label[for]",((t,e)=>this.eu(t,e)))}eu(t,e){let i=e.getAttribute("for"),r=up.form.fieldSelector(n.idSelector(i)),s=up.fragment.all(r,{layer:"any"}),o=up.fragment.all(r,{layer:this});if(s.length>1&&o[0]!==s[0]){t.preventDefault();const e=o[0];e.focus(),e.matches("input[type=checkbox], input[type=radio]")&&e.click()}}Qo(t,e){up.log.putsEvent(t),e&&up.event.halt(t),up.error.muteUncriticalSync((()=>this.dismiss(":outside",{origin:t.target})))}onEscapePressed(t){if(this.isFront()){let e=up.form.focusedField();e?e.blur():this.Jo("key")&&(up.event.halt(t,{log:!0}),up.error.muteUncriticalSync((()=>this.dismiss(":key"))))}}registerAttrCloser(t,e){this.nu(t,e),this.iu(t,e)}nu(t,e){this.on("up:click",`[${t}]:not(form)`,((i,r)=>{up.event.halt(i,{log:!0});const s=n.jsonAttr(r,t);this.ru(r,s,e)}))}iu(t,e){this.on("submit",`[${t}]`,((t,n)=>{up.event.halt(t,{log:!0});const i=up.Params.fromForm(n);this.ru(n,i,e)}))}ru(t,e,n){const i={origin:t},r=new up.OptionsParser(t,i);r.booleanOrString("animation"),r.string("easing"),r.number("duration"),r.string("confirm"),up.error.muteUncriticalSync((()=>n(e,i)))}tu(t,e){if(t)return this.on(t,(t=>{t.preventDefault(),up.error.muteUncriticalSync((()=>e.call(this,t,{response:t.response})))}))}tryAcceptForLocation(t){this.su(this.acceptLocation,this.accept,t)}tryDismissForLocation(t){this.su(this.dismissLocation,this.dismiss,t)}su(t,e,n){let i,r;if(t&&(i=this.location)&&(r=t.recognize(i))){const t=Object.assign(Object.assign({},r),{location:i});up.error.muteUncriticalSync((()=>e.call(this,t,n)))}}teardownHandlers(){var t,e;super.teardownHandlers(),null===(t=this.Yo)||void 0===t||t.call(this),null===(e=this.Zo)||void 0===e||e.call(this),this.overlayFocus.teardown()}destroyElements(t){const e=Object.assign(Object.assign({},t),{animation:()=>this.startCloseAnimation(t),onFinished:()=>{var e;this.onElementsRemoved(),null===(e=t.onFinished)||void 0===e||e.call(t)},log:!1});up.destroy(this.element,e)}onElementsRemoved(){}ou(t={}){const e=up.animate(this.getBoxElement(),t.boxAnimation,t);let n;return this.backdrop&&!up.motion.isNone(t.boxAnimation)&&(n=up.animate(this.backdropElement,t.backdropAnimation,t)),Promise.all([e,n])}startOpenAnimation(t={}){var n;return e(this,void 0,void 0,(function*(){let e=null!==(n=t.animation)&&void 0!==n?n:this.evalOption(this.openAnimation);yield this.ou({boxAnimation:e,backdropAnimation:"fade-in",easing:t.easing||this.openEasing,duration:t.duration||this.openDuration}),this.wasEverVisible=!0}))}startCloseAnimation(t={}){var e;let n=this.wasEverVisible&&(null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.closeAnimation));return this.ou({boxAnimation:n,backdropAnimation:"fade-out",easing:t.easing||this.closeEasing,duration:t.duration||this.closeDuration})}accept(t=null,e={}){return this.uu("accept",t,e)}dismiss(t=null,e={}){return this.uu("dismiss",t,e)}Jo(t){return i.contains(this.dismissable,t)}uu(t,e,n){return n=Object.assign(Object.assign({},n),{verb:t,value:e,layer:this}),new up.Change.CloseLayer(n).execute()}getFirstSwappableElement(){return this.getContentElement().children[0]}toString(){return`${this.mode} overlay`}}).VISUAL_KEYS=["mode","position","align","size","origin","class","backdrop","dismissable","dismissLabel","dismissARIALabel","openAnimation","closeAnimation","openDuration","closeDuration","openEasing","closeEasing","trapFocus"],t.UNSET_VISUALS=i.spanObject(t.VISUAL_KEYS,void 0),t)},7339:()=>{},7412:()=>{},7687:()=>{const t=up.element,e=up.util;up.Layer=class Layer extends up.Record{keys(){return["element","stack","history","mode","context","lastScrollTops","lastFocusCapsules"]}defaults(){return{context:{},lastScrollTops:up.viewport.newStateCache(),lastFocusCapsules:up.viewport.newStateCache()}}constructor(t={}){super(t),e.assert(this.mode)}setupHandlers(){up.link.convertClicks(this),this.au=up.on("up:location:changed",(t=>this.cu(t)))}teardownHandlers(){var t;null===(t=this.au)||void 0===t||t.call(this)}mainTargets(){return up.layer.mainTargets(this.mode)}sync(){}accept(){throw new up.NotImplemented}dismiss(){throw new up.NotImplemented}peel(t){this.stack.peel(this,t)}evalOption(t){return e.evalOption(t,this)}isCurrent(){return this.stack.isCurrent(this)}isFront(){return this.stack.isFront(this)}isRoot(){return this.stack.isRoot(this)}isOverlay(){return this.stack.isOverlay(this)}isOpen(){return this.stack.isOpen(this)}isClosed(){return this.stack.isClosed(this)}get parent(){return this.stack.parentOf(this)}get child(){return this.stack.childOf(this)}get ancestors(){return this.stack.ancestorsOf(this)}get descendants(){return this.stack.descendantsOf(this)}get subtree(){return[this,...this.descendants]}get index(){var t;return null!==(t=this.hu)&&void 0!==t?t:this.hu=this.stack.indexOf(this)}getContentElement(){return this.contentElement||this.element}getBoxElement(){return this.boxElement||this.element}getFocusElement(){return this.getBoxElement()}getFirstSwappableElement(){throw new up.NotImplemented}contains(t){return t.closest(up.layer.anySelector())===this.element}on(...t){return this.lu(t).bind()}off(...t){return this.lu(t).unbind()}lu(t){return up.EventListenerGroup.fromBindArgs(t,{guard:t=>this.pu(t),elements:[this.element],baseLayer:this})}pu(t){return this.contains(t.target)}wasHitByMouseEvent({clientX:t,clientY:e}){const n=document.elementFromPoint(t,e);return!n||this.contains(n)}Ls(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})}emit(...t){return this.Ls(t).emit()}isDetached(){return!this.element.isConnected}saveHistory(){e.assert(this.isFront()),this.showsLiveHistory()&&(this.fu=this.title,this.du=this.metaTags,this.mu=this.location,this.gu=this.lang)}restoreHistory(){this.showsLiveHistory()&&(this.mu&&up.history.push(this.mu),this.fu&&(document.title=this.fu),this.du&&up.history.updateMetaTags(this.du),e.isString(this.gu)&&up.history.updateLang(this.gu))}asCurrent(t){return this.stack.asCurrent(this,t)}updateHistory(t){var n,i;e.isString(t.location)&&this.vu(t.location,{push:!0}),up.history.config.updateMetaTags&&e.isList(t.metaTags)&&(null===(i=null===(n=up.migrate)||void 0===n?void 0:n.warnOfHungryMetaTags)||void 0===i||i.call(n,t.metaTags),this.bu(t.metaTags)),e.isString(t.title)&&this.yu(t.title),e.isString(t.lang)&&this.wu(t.lang)}showsLiveHistory(){return this.history&&this.isFront()}cu({location:t}){this.showsLiveHistory()&&this.vu(t,{push:!1})}get title(){return this.showsLiveHistory()?document.title:this.fu}yu(t){this.fu=t,this.showsLiveHistory()&&(document.title=t)}get metaTags(){return this.showsLiveHistory()?up.history.findMetaTags():this.du}bu(t){this.du=t,this.showsLiveHistory()&&up.history.updateMetaTags(t)}get lang(){return this.showsLiveHistory()?up.history.getLang():this.gu}wu(t){this.gu=t,this.showsLiveHistory()&&up.history.updateLang(t)}get location(){return this.showsLiveHistory()?up.history.location:this.mu}vu(t,{push:e}){let n=this.mu,i=up.history.location;this.mu=t,t!==i&&this.showsLiveHistory()&&e&&up.history.push(t),t===n||this.opening||this.emit("up:layer:location:changed",{location:t,previousLocation:n,log:!1})}selector(t){return this.constructor.selector(t)}static selector(t){throw new up.NotImplemented}toString(){throw new up.NotImplemented}affix(...e){return t.affix(this.getFirstSwappableElement(),...e)}[e.isEqual.key](t){return this.constructor===t.constructor&&this.element===t.element}hasFocus(){let t=document.activeElement;return t!==document.body&&this.element.contains(t)}reset(){Object.assign(this,this.defaults())}}},7718:function(){var t=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};up.RenderResult=class RenderResult extends up.Record{keys(){return["fragments","layer","target","renderOptions","finished"]}defaults(){return{fragments:[],finished:Promise.resolve()}}get none(){return!this.fragments.length}get fragment(){return this.fragments[0]}get ok(){return!this.renderOptions.didFail}static both(t,e,n=!0){return e?new this(Object.assign(Object.assign({},t),{fragments:t.fragments.concat(e.fragments),finished:n&&this.mergeFinished(t,e)})):t}static mergeFinished(e,n){return t(this,void 0,void 0,(function*(){return this.both(yield e.finished,yield n.finished,!1)}))}}},7781:(t,e,n)=>{n(4518),up.element=function(){const t=up.util;function e(t,e){const i=t.querySelectorAll(e);return n(t,e)?[t,...i]:i}function n(e,n){return t.isElement(e)&&e.matches(n)}function i(...e){const n=e.pop();return t.isElement(n)?n:t.isString(n)?function(...e){let[n=document,i]=t.args(e,"val","val");return n.querySelector(i)}(...e,n):t.isList(n)?(n.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",n),n[0]):n}function r(...e){return t.flatMap(e,s)}function s(e){return t.isString(e)?document.querySelectorAll(e):t.wrapList(e)}function o(e,n){return n===$(e)?t.noop:(u(e,n),()=>u(e,!n))}function u(t,e){e?(t.removeAttribute("hidden"),"none"===t.style.display&&(t.style.display="")):t.setAttribute("hidden","")}function a(e,n){for(let i in n){const r=n[i];t.isGiven(r)?e.setAttribute(i,r):e.removeAttribute(i)}}function c(t,e){t.parentNode.insertBefore(e,t)}function h(e,n={}){let i,r,s,{includePath:o}=p(e);for(let t of o){let{tagName:e}=t;e&&"*"!==e||(e="div"),r=document.createElement(e),i||(i=r),l(r,t),null==s||s.appendChild(r),s=r}for(let e in n){let r=n[e];"class"===e?C(i,t.wrapList(r)):"style"===e?A(i,r):"text"===e?i.textContent=r:"content"===e?t.isString(r)?i.innerHTML=r:i.append(...t.wrapList(r)):i.setAttribute(e,r)}return i}function l(t,{id:e,classNames:n,attributes:i}){e&&(t.id=e);for(let[e,n]of Object.entries(i))t.setAttribute(e,n);C(t,n)}function p(e){let n;const{masked:i,restore:r}=t.expressionOutline(e),s=i.replace(/:not\([^)]*\)/,(function(t){return n=r(t),""}));let o=r(s);return{includePath:s.split(/[ >]+/).map((function(n){let i={tagName:null,classNames:[],id:null,attributes:{}};return(n=(n=(n=(n=n.replace(/^[\w-*]+/,(function(t){return i.tagName=t,""}))).replace(/#([\w-]+)/,(function(t,e){return i.id=e,""}))).replace(/\.([\w-]+)/g,(function(t,e){return i.classNames.push(e),""}))).replace(/\[[^\]]*]/g,(function(e){e=r(e);let[n,s,o,u,a]=e.match(/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/);return u||(u='"'),i.attributes[s]=a?t.parseString(u+a+u):"",""})))&&up.fail("Cannot parse selector: "+e),i})),includeRaw:o,excludeRaw:n}}const f=["HTML","BODY","HEAD","TITLE"],d=up.mockable((t=>t.matches(f.join())));function m(e,n){return t.isGiven(n)?`[${e}="${n=n.replace(/"/g,'\\"')}"]`:`[${e}]`}function g(t){return v(b(t))}function v(e){if(1===e.length&&t.isElementLike(e[0]))return e[0];up.fail("Expected a single element, but got %d elements",e.length)}function b(t){t=t.trim();const e=document.createRange();return e.setStart(document.body,0),e.createContextualFragment(t).childNodes}function y(t){t.offsetHeight}function w(e,n,i){t.isMissing(e.getAttribute(n))&&e.setAttribute(n,i)}function _(e){const n=document.createElement("up-wrapper");return n.append(...t.wrapList(e)),n}function O(e,n,...i){var r;if(!(null===(r=e.hasAttribute)||void 0===r?void 0:r.call(e,n)))return;let s=e.getAttribute(n);for(let r of i){let i=r(s,n,e);if(t.isDefined(i))return i}}function k(t,e){return O(t,e,S)}let S=t.identity;function E(t,e){switch(t){case"false":return!1;case"true":case"":case e:return!0}}function x(t){if((t=t.replaceAll("_","")).match(/^-?[\d.]+$/))return parseFloat(t)}function j(e){if(null==e?void 0:e.trim())return t.parseRelaxedJSON(e)}function C(t,e){for(let n of e)t.classList.add(n)}function F(e,n,i){return e.classList.contains(n)===i?t.noop:(e.classList.toggle(n,i),()=>e.classList.toggle(n,!i))}function T(t,e){return P(window.getComputedStyle(t),e)}function R(e,n){const i=T(e,n);if(t.isPresent(i))return parseFloat(i)}function L(t,e){const{style:n}=t;return P(n,e)}function P(e,n){return up.migrate.loaded&&(n=up.migrate.fixGetStyleProps(n)),t.isString(n)?e.getPropertyValue(n):t.mapObject(n,(t=>[t,e.getPropertyValue(t)]))}function A(e,n,i=""){if(up.migrate.loaded&&(n=up.migrate.fixSetStyleProps(n,i)),t.isString(n))e.setAttribute("style",n);else{const{style:t}=e;for(let e in n){let r=n[e];t.setProperty(e,r+i)}}}function D(t,e){const n=L(t,Object.keys(e));return A(t,e),()=>A(t,n)}function $(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function M(t){return/^up-/.test(t)}function H(e,n){return t.mapObject(n,(t=>[t,e.getAttribute(t)]))}return{subtree:e,subtreeFirst:function(t,e){return n(t,e)?t:t.querySelector(e)},contains:function(t,e){const n=i(e);return Node.prototype.contains.call(t,n)},closestAttr:function(t,e,n=k){let i=t.closest("["+e+"]");if(i)return n(i,e)},ancestor:function(t,e){var n;return null===(n=t.parentNode)||void 0===n?void 0:n.closest(e)},around:function(t,n){return r(t.closest(n),e(t,n))},get:i,list:r,toggle:function(t,e=!$(t)){u(t,e)},hide:function(t){u(t,!1)},hideTemp:function(t){return o(t,!1)},show:function(t){u(t,!0)},showTemp:function(t){return o(t,!0)},metaContent:function(t){var e;const n="meta"+m("name",t);return null===(e=document.head.querySelector(n))||void 0===e?void 0:e.getAttribute("content")},insertBefore:c,createFromSelector:h,setAttrs:a,setAttrsTemp:function(t,e){let n=Object.keys(e),i=H(t,n);return a(t,e),()=>a(t,i)},affix:function(...e){let[n,i="beforeend",r,s]=t.args(e,"val",t.isAdjacentPosition,"val","options");const o=h(r,s);return n.insertAdjacentElement(i,o),o},idSelector:function(t){return t.match(/^[a-z][a-z0-9\-_]*$/i)?`#${t}`:m("id",t)},classSelector:function(t){return`.${t=t.replace(/[^\w-]/g,"\\$&")}`},isSingleton:d,attrSelector:m,tagName:function(t){return t.tagName.toLowerCase()},createBrokenDocumentFromHTML:function(t){return(new DOMParser).parseFromString(t,"text/html")},revivedClone:function(t){let e=g(t.outerHTML);return"nonce"in t&&(e.nonce=t.nonce),e},createNodesFromHTML:b,createFromHTML:g,extractSingular:v,get root(){return document.documentElement},paint:y,concludeCSSTransition:function(t){const e=D(t,{transition:"none"});return y(t),e},hasCSSTransition:function(t){const e=t["transition-property"],n=t["transition-duration"];return!("none"===e||"all"===e&&0===n)},fixedToAbsolute:function(t){const e=t.getBoundingClientRect();t.style.position="absolute";const n=t.offsetParent.getBoundingClientRect();A(t,{left:e.left-R(t,"margin-left")-n.left+"px",top:e.top-R(t,"margin-top")-n.top+"px",right:"",bottom:""})},setMissingAttrs:function(t,e){for(let n in e)w(t,n,e[n])},setMissingAttr:w,unwrap:function(t){!function(){const e=document.activeElement;try{return function(){let e=[...t.childNodes];for(let n of e)c(t,n);t.remove()}()}finally{e&&e!==document.activeElement&&e.focus({preventScroll:!0})}}()},wrapChildren:function(t){const e=_(t.childNodes);return t.append(e),e},wrapIfRequired:function(e){return 1===e.length&&t.isElement(e[0])?e[0]:_(e)},attr:k,booleanAttr:function(t,e){return O(t,e,E)},numberAttr:function(t,e){return O(t,e,x)},jsonAttr:function(t,e){return O(t,e,j)},callbackAttr:function(e,n,i){return O(e,n,(n=>function(e,n,{exposedKeys:i=[],mainKey:r="event"}={}){const s=up.NonceableCallback.fromString(e).toFunction(r,...i);return function(e){const r=Object.values(t.pick(e,i));return s.call(n,e,...r)}}(n,e,i)))},booleanOrStringAttr:function(t,e){return O(t,e,E,S)},booleanOrNumberAttr:function(t,e){return O(t,e,E,x)},setStyleTemp:D,style:T,styleNumber:R,inlineStyle:L,setStyle:A,isVisible:$,upAttrs:function(t){let e=t.getAttributeNames().filter(M);return H(t,e)},upClasses:function(e){return t.filter(e.classList.values(),M)},setAttrPresence:function(t,e,n,i){return i?t.setAttribute(e,n):t.removeAttribute(e)},addClasses:C,addClassTemp:function(t,e){return F(t,e,!0)},removeClassTemp:function(t,e){return F(t,e,!1)},cleanJQuery:function(t){up.browser.canJQuery()&&jQuery(t).remove()},parseSelector:p,isEmpty:function(t){return!t.children.length>0&&!t.innerText.trim()},crossOriginSelector:function(t){return`[${t}*="//"]:not([${t}*="//${location.host}/"])`},isIntersectingWindow:function(t,{margin:e=0}={}){const n=up.Rect.fromElement(t);return n.grow(e),n.bottom>0&&n.top<window.innerHeight&&n.right>0&&n.left<window.innerWidth},unionSelector:function(e,n){let i=`:is(${e.join()})`;return t.isPresent(n)&&(i+=`:not(${n.join()})`),i},matchSelectorMap:function(e,n){let i=[];if(e)for(let[r,s]of Object.entries(e))t.isDefined(s)&&n.matches(r)&&i.push(s);return i},elementLikeMatches:n,documentPosition:function(t){let e=t.nextElementSibling;return e?[e,"beforebegin"]:[t.parentElement,"beforeend"]}}}()},7919:()=>{const t=up.util,e=up.element,n={preventScroll:!0};up.FragmentFocus=class FragmentFocus extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","focusVisible","focusCapsule","inputDevice"])}processPrimitive(e){switch(e){case"keep":return this._u();case"restore":return this.Ou();case"target":case!0:return this.tr(this.fragment);case"layer":return this.tr(this.layer.getFocusElement());case"main":return this.ku(":main");case"hash":return this.Su();case"autofocus":return this.Eu();default:if(t.isString(e))return this.ku(e)}}processElement(t){return this.tr(t)}resolveCondition(t){return"lost"===t?this.xu():super.resolveCondition(t)}ku(t){let e=this.findSelector(t);return this.tr(e)}_u(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.restore(this.layer,n)}Ou(){return up.viewport.restoreFocus({layer:this.layer})}Eu(){let t=this.fragment&&e.subtreeFirst(this.fragment,"[autofocus]");if(t)return this.tr(t)}tr(t){if(t)return up.focus(t,Object.assign(Object.assign({force:!0},n),{inputDevice:this.inputDevice,focusVisible:this.focusVisible})),!0}Su(){let t=up.viewport.firstHashTarget(this.hash,{layer:this.layer});if(t)return this.tr(t)}xu(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.wasLost()}}},8065:()=>{const t=up.util;up.Record=class Record{keys(){throw"Return an array of keys"}defaults(t){return{}}constructor(e){Object.assign(this,t.mergeDefined(this.defaults(e),this.attributes(e)))}attributes(e=this){return t.pick(e,this.keys())}[t.copy.key](){return t.variant(this)}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.attributes(),e.attributes())}}},8072:()=>{const t=up.util;up.Response=class Response extends up.Record{keys(){return["method","url","text","status","request","xhr","target","title","openLayer","acceptLayer","dismissLayer","eventPlans","context","expireCache","evictCache","headers","loadedAt","fail"]}defaults(){return{headers:{},loadedAt:new Date}}get ok(){var e;return!t.evalOption(null!==(e=this.fail)&&void 0!==e?e:up.network.config.fail,this)}get none(){return!this.text}header(t){var e;return this.headers[t]||(null===(e=this.xhr)||void 0===e?void 0:e.getResponseHeader(t))}get varyHeaderNames(){let e=this.header("Vary");return t.getSimpleTokens(e,{separator:","})}get contentType(){return this.header("Content-Type")}get cspInfo(){let t=this.header("Content-Security-Policy")||this.header("Content-Security-Policy-Report-Only");return up.protocol.cspInfoFromHeader(t)}get lastModified(){let t=this.header("Last-Modified");if(t)return new Date(t)}get etag(){return this.header("ETag")}get json(){return this.parsedJSON||(this.parsedJSON=JSON.parse(this.text))}get age(){return new Date-this.loadedAt}get expired(){return this.age>up.network.config.cacheExpireAge||this.request.expired}get description(){return`HTTP ${this.status} response to ${this.request.description}`}get redirect(){return this.url!==this.request.url||this.method!==this.request.method}get redirectRequest(){if(!this.redirect)return;let e=t.variant(this.request,{method:this.method,url:this.url,cacheRoute:null});return up.cache.track(this.request,e,{force:!0}),e}}},8183:()=>{const t=up.util;up.Registry=class Registry{constructor(e,n=t.identity){this.no={},this.hs=n,this.ju=e,this.put=this.put.bind(this),document.addEventListener("up:framework:reset",(()=>this.reset()))}put(t,e){(e=this.hs(e)).isDefault=up.framework.evaling,this.no[t]=e}get(t){return this.no[t]||up.fail("Unknown %s %o",this.ju,t)}reset(){this.no=t.pickBy(this.no,"isDefault")}}},8195:()=>{const t=up.util,e=up.element;up.Change.Addition=class Addition extends up.Change{constructor(t){super(t),this.Cu=t.acceptLayer,this.Fu=t.dismissLayer,this.Tu=t.eventPlans||[],this.ve=t.response}handleLayerChangeRequests(){this.layer.isOverlay()&&(this.Ru(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(this.Lu()),this.abortWhenLayerClosed(),this.Pu(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(this.Lu()),this.abortWhenLayerClosed()),this.layer.asCurrent((()=>{for(let t of this.Tu)up.emit(Object.assign(Object.assign({},t),this.Lu())),this.abortWhenLayerClosed()}))}Ru(){t.isDefined(this.Cu)&&this.layer.isOverlay()&&this.layer.accept(this.Cu,this.Lu())}Pu(){t.isDefined(this.Fu)&&this.layer.isOverlay()&&this.layer.dismiss(this.Fu,this.Lu())}abortWhenLayerClosed(t=this.layer){if(t.isClosed())throw new up.Aborted("Layer was closed")}Au({oldElement:t,newElement:n,source:i}){"keep"===i&&(i=t&&up.fragment.source(t)),i&&e.setMissingAttr(n,"up-source",up.fragment.normalizeSource(i))}Du({newElement:t,time:n}){e.setMissingAttr(t,"up-time",!!n&&n.toUTCString())}$u({newElement:t,etag:n}){e.setMissingAttr(t,"up-etag",n||!1)}setReloadAttrs(t){this.Au(t),this.Du(t),this.$u(t)}Lu(){return{response:this.ve}}executeSteps({steps:t,responseDoc:e,noneOptions:n,passRenderOptions:i=this.options}){return new up.Change.UpdateSteps({steps:t,noneOptions:n,passRenderOptions:i}).execute(e)}}},8268:()=>{var t;up.Layer.Drawer=((t=class Drawer extends up.Layer.OverlayWithViewport{}).mode="drawer",t)},8354:()=>{const t=up.util,e=up.element;up.Preview=class Preview{constructor({fragment:t,request:e,renderOptions:n,cleaner:i}){this.fragment=t,this.request=e,this.renderOptions=n,this.Mu=i}undo(...t){this.ended?reportError(new up.Error("Preview used after end of request")):this.Mu.guard(...t)}get origin(){return this.request.origin}get params(){return this.request.params}get layer(){return this.request.layer}get ended(){return this.request.ended}get expiredResponse(){return this.renderOptions.expiredResponse}get revalidating(){return!!this.expiredResponse}run(t,e={}){for(let n of up.status.resolvePreviewFns(t))this.undo(up.error.guard(n,this,e))}revert(){this.Mu.clean()}setAttrs(...t){let[n,i]=this.Hu(t,"val","val");this.undo(e.setAttrsTemp(n,i))}addClass(...t){let[n,i]=this.Hu(t,"val","val");this.undo(e.addClassTemp(n,i))}addClassBatch(t,e){for(let n of t)for(let t of e)this.addClass(n,t)}removeClass(...t){let[n,i]=this.Hu(t,"val","val");this.undo(e.removeClassTemp(n,i))}setStyle(...t){let[n,i]=this.Hu(t,"val","val");this.undo(e.setStyleTemp(n,i))}disable(...t){let[e]=this.Hu(t,"val");this.undo(up.form.disableTemp(e))}insert(...e){let[n,i="beforeend",r]=this.Hu(e,"val",t.isAdjacentPosition,"val");this.undo(up.fragment.insertTemp(n,i,r))}show(...t){let[n]=this.Hu(t,"val");this.undo(e.showTemp(n))}hide(...t){let[n]=this.Hu(t,"val");this.undo(e.hideTemp(n))}hideContent(...t){let[n]=this.Hu(t,"val"),i=e.wrapChildren(n);e.hide(i),this.undo((()=>e.unwrap(i)))}showPlaceholder(...t){let[e,n]=this.Hu(t,"val","val"),i=up.fragment.provideNodes(n,{origin:this.origin});up.puts("[up-placeholder]","Showing placeholder %o",n),e?this.swapContent(e,i):"new"===this.layer&&(this.openLayer(i,{closeAnimation:!1}),this.renderOptions.openAnimation=!1)}swapContent(...t){let[e,n]=this.Hu(t,"val","val");this.hideContent(e),this.insert(e,n)}openLayer(e,n={}){let i=":undo-preview";up.layer.open(Object.assign(Object.assign(Object.assign({},t.pick(this.renderOptions,[...up.Layer.Overlay.VISUAL_KEYS,"target"])),n),{content:e,abort:!1,onDismiss:({value:t})=>{t!==i&&this.request.abort({reason:"Preview overlay dismissed"})}}));let r=up.layer.front;return this.undo((()=>r.dismiss(i,{preventable:!1}))),r}Hu(e,...n){let[i,...r]=t.args(e,...n);return i=up.fragment.get(i,{layer:this.layer,origin:this.origin})||this.fragment,[i,...r]}}},8386:()=>{up.Aborted=class Aborted extends up.Error{constructor(t){super(t,{name:"AbortError"})}}},8504:()=>{const t=up.element,e=up.util;up.BodyShifter=class BodyShifter{constructor(){this.Nu=new Set,this.Ur=0,this.Mu=e.cleaner()}lowerStack(){0==--this.Ur&&this.Mu.clean()}raiseStack(){1==++this.Ur&&this.Bu()}onAnchoredElementInserted(t){return this.Nu.add(t),this.qu(t,"right"),()=>this.Nu.delete(t)}Iu(){return this.zu&&this.Ur>0}Bu(){this.zu=up.viewport.rootScrollbarWidth(),this.Mu(t.setStyleTemp(t.root,{"--up-scrollbar-width":this.zu+"px"})),this.qu(document.body,"padding-right");for(let t of this.Nu)this.qu(t,"right")}qu(e,n){if(!this.Iu())return;let i=t.style(e,n);this.Mu(t.setStyleTemp(e,{["--up-original-"+n]:i}),t.addClassTemp(e,"up-scrollbar-away"))}}},9013:()=>{up.protocol=function(){const t=up.util,e=up.element,n=function(t){return"X-Up"+t.replace(/(^.|[A-Z])/g,(t=>"-"+t.toUpperCase()))},i=function(e,i,r=t.identity){let s=e.getResponseHeader(n(i));if(s)return r(s)};function r(t){return"false"!==t&&t}const s=t.memoize((function(){return t.normalizeMethod(up.browser.popCookie("_up_method"))})),o=new up.Config((()=>({methodParam:"_method",csrfParam:()=>e.metaContent("csrf-param"),csrfToken:()=>e.metaContent("csrf-token"),cspNonce:()=>e.metaContent("csp-nonce"),csrfHeader:"X-CSRF-Token",maxHeaderSize:2048}))),u=/'nonce-([^']+)'/g;function a(e){let n=e.matchAll(u);return t.map(n,"1")}return{config:o,locationFromXHR:function(e){let n=i(e,"location")||e.responseURL;if(n)return t.normalizeURL(n)},titleFromXHR:function(e){var n,r,s;return null!==(s=null===(r=(n=up.migrate).titleFromXHR)||void 0===r?void 0:r.call(n,e))&&void 0!==s?s:i(e,"title",t.parseRelaxedJSON)},targetFromXHR:function(t){return i(t,"target")},methodFromXHR:function(e){return i(e,"method",t.normalizeMethod)},openLayerFromXHR:function(e){return i(e,"openLayer",t.parseRelaxedJSON)},acceptLayerFromXHR:function(e){return i(e,"acceptLayer",t.parseRelaxedJSON)},contextFromXHR:function(e){return i(e,"context",t.parseRelaxedJSON)},dismissLayerFromXHR:function(e){return i(e,"dismissLayer",t.parseRelaxedJSON)},eventPlansFromXHR:function(e){return i(e,"events",t.parseRelaxedJSON)},expireCacheFromXHR:function(t){var e,n;return i(t,"expireCache")||(null===(n=(e=up.migrate).clearCacheFromXHR)||void 0===n?void 0:n.call(e,t))},evictCacheFromXHR:function(t){return i(t,"evictCache",r)},csrfHeader:function(){return t.evalOption(o.csrfHeader)},csrfParam:function(){return t.evalOption(o.csrfParam)},csrfToken:function(){return t.evalOption(o.csrfToken)},cspNonce:function(){return t.evalOption(o.cspNonce)},initialRequestMethod:s,headerize:n,wrapMethod:function(t,e){return e.add(o.methodParam,t),"POST"},cspInfoFromHeader:function(t){var e;let n={};if(t){let i=t.split(/\s*;\s*/);for(let t of i){let i=null===(e=t.match(/^(script|default)-src:/))||void 0===e?void 0:e[1];i&&(n[i]={declaration:t,nonces:a(t)})}}return n.script||n.default||{}}}}()},9156:()=>{const t=up.util;up.LayerStack=class LayerStack{constructor(){this.Uu=[],this.layers=[this.Vu()]}Vu(){return up.layer.build({mode:"root",stack:this})}remove(e){t.remove(this.layers,e)}peel(e,n){const i=t.reverse(e.descendants),r=Object.assign(Object.assign({},n),{preventable:!1});for(let t of i)t.dismiss(":peel",r)}reset(){this.peel(this.root,{animation:!1}),this.Uu=[],this.root.reset()}isOpen(e){return t.contains(this.layers,e)}isClosed(t){return!this.isOpen(t)}parentOf(t){return this.layers[t.index-1]}childOf(t){return this.layers[t.index+1]}ancestorsOf(e){return t.reverse(this.layers.slice(0,e.index))}selfAndAncestorsOf(t){return[t,...t.ancestors]}descendantsOf(t){return this.layers.slice(t.index+1)}isRoot(t){return this.root===t}isOverlay(t){return this.root!==t}isCurrent(t){return this.current===t}isFront(t){return this.front===t}get(...t){return this.getAll(...t)[0]}getAll(...t){return up.LayerLookup.all(this,...t)}sync(){for(let t of this.layers)t.sync()}asCurrent(t,e){try{return this.Uu.push(t),e()}finally{this.Uu.pop()}}reversed(){return t.reverse(this.layers)}dismissOverlays(e=null,n={}){n.dismissable=!1;for(let i of t.reverse(this.overlays))i.dismiss(e,n)}at(t){return this.layers[t]}indexOf(t){return this.layers.indexOf(t)}get count(){return this.layers.length}get root(){return this.layers[0]}get overlays(){return this.root.descendants}get current(){return t.last(this.Uu)||this.front}get front(){return t.last(this.layers)}}},9363:()=>{up.mockable=function(t){if(window.jasmine){let e=t.name,n={[e]:t},i=function(){return n[e].apply(this,arguments)};return i.mock=()=>spyOn(n,e),i}return t}},9391:()=>{const t=up.util,e=up.element;up.LinkFollowIntent=class LinkFollowIntent{constructor(t,e){this.Ku=t,this.P=e,this.Xu=null,this.Wu("mouseenter mousedown touchstart",(t=>this.Gu(t))),this.Wu("mouseleave",(()=>this.Ju())),up.fragment.onAborted(this.Ku,(()=>this.Ju()))}Wu(t,e){up.on(this.Ku,t,{passive:!0},e)}Gu(e){if(up.link.shouldFollowEvent(e,this.Ku))if(this.Ju(),"mouseenter"===e.type){let n=this.Qu();this.Yu=t.timer(n,(()=>this.it(e)))}else this.it(e)}Ju(){var t;clearTimeout(this.Yu),(null===(t=this.Xu)||void 0===t?void 0:t.background)&&this.Xu.abort(),this.Xu=null}Qu(){var t;return null!==(t=e.numberAttr(this.Ku,"up-preload-delay"))&&void 0!==t?t:up.link.config.preloadDelay}it(t){up.log.putsEvent(t),up.fragment.isAlive(this.Ku)&&this.P({onRequestKnown:t=>this.Xu=t})}}},9399:(t,e,n)=>{n(7412);const i=up.util;up.network=function(){const t=new up.Config((()=>({concurrency:6,wrapMethod:!0,cacheSize:70,cacheExpireAge:15e3,cacheEvictAge:54e5,lateDelay:400,fail:t=>(t.status<200||t.status>299)&&304!==t.status,autoCache:t=>t.isSafe(),expireCache:t=>!t.isSafe(),evictCache:!1,progressBar:!0,timeout:9e4}))),e=new up.Request.Queue,n=new up.Request.Cache;let r=null;function s(r){var o,u,a,c;n.expire(null!==(u=null!==(o=r.expireCache)&&void 0!==o?o:i.evalOption(t.expireCache,r))&&void 0!==u&&u),n.evict(null!==(c=null!==(a=r.evictCache)&&void 0!==a?a:i.evalOption(t.evictCache,r))&&void 0!==c&&c),function(t){let i;if(t.willCache()&&(i=n.get(t)))return up.puts("up.request()","Re-using previous request to %s",t.description),t.background||e.promoteToForeground(i),i.mergeIfUnsent(t),n.track(i,t,{onIncompatible:s}),!0}(r)||function(t){(function(t){t.willCache()&&(n.put(t),t.onLoading=()=>n.reindex(t)),i.always(t,(function(e){var i,r;n.expire(null!==(i=e.expireCache)&&void 0!==i&&i,{except:t}),n.evict(null!==(r=e.evictCache)&&void 0!==r&&r,{except:t});let s=e instanceof up.Response,o=!s,u=s&&e.ok,a=s&&!e.ok,c=s&&e.none,h=s&&e.redirectRequest;a?n.evict(t.url):o||c?n.evict(t):u&&(n.get(t)&&n.put(t),h&&(h.willCache()||n.get(h))&&n.put(h))}))})(t),e.asap(t)}(r)}function o(...t){var n,i;null===(i=(n=up.migrate).preprocessAbortArgs)||void 0===i||i.call(n,t),e.abort(...t)}return up.on("up:network:late",(function(){i.evalOption(t.progressBar)&&(r=new up.ProgressBar)})),up.on("up:network:recover",(function(){null==r||r.conclude()})),up.on("up:framework:reset",(function(){o(),e.reset(),n.reset(),null==r||r.destroy(),r=null})),{request:function(...t){const e=function(t){var e,n;let r=i.parseArgIntoOptions(t,"url");return null===(n=(e=up.migrate).handleRequestOptions)||void 0===n||n.call(e,r),r}(t),n=new up.Request(e);return s(n),n},cache:n,isBusy:function(){return e.isBusy()},isSafeMethod:function(t){return i.contains(["GET","OPTIONS","HEAD"],i.normalizeMethod(t))},config:t,abort:o,queue:e,loadPage:function(t){new up.Request(t).loadPage()}}}(),up.request=up.network.request,up.cache=up.network.cache},9441:()=>{up.event=function(){const t=up.util,e=up.element;function n(...t){return i(t).bind()}function i(t,e){return up.EventListenerGroup.fromBindArgs(t,e)}function r(t){return up.EventEmitter.fromEmitArgs(t)}function s(...e){const n=t.extractOptions(e),i=e[0]||n.type||up.fail("Missing event type"),r=new Event(i,{bubbles:!0,cancelable:!0});return Object.assign(r,t.omit(n,["type","target"])),r}const o=["metaKey","shiftKey","ctrlKey","altKey"];function u(e){return e.button>0||t.some(o,(t=>e[t]))}function a(e,n,i=[]){const r=s(n,t.pick(e,i));return r.originalEvent=e,["stopPropagation","stopImmediatePropagation","preventDefault"].forEach((function(t){const n=r[t];return r[t]=function(){return e[t](),n.call(r)}})),e.defaultPrevented&&r.preventDefault(),r}n("up:click","[up-emit]",(function(t,n){if(u(t))return;const i=e.attr(n,"up-emit"),r=e.jsonAttr(n,"up-emit-props"),s=a(t,i);Object.assign(s,r),up.emit(n,s)}));let c=["unknown"];function h(t){c.push(t),setTimeout((()=>c.pop()))}return n("keydown keyup",{capture:!0},(()=>h("key"))),n("pointerdown pointerup",{capture:!0},(()=>h("pointer"))),n("up:framework:reset",(function(){for(let t of[window,document,e.root,document.body])for(let e of up.EventListener.allNonDefault(t))e.unbind()})),{on:n,off:function(...t){return i(t).unbind()},build:s,emit:function(...t){return r(t).emit()},assertEmitted:function(...t){return r(t).assertEmitted()},onEscape:function(t){return n("keydown",(function(e){if("Escape"===e.key)return t(e)}))},halt:function(t,e={}){e.log&&up.log.putsEvent(t),t.stopImmediatePropagation(),t.preventDefault()},isModified:u,isSyntheticClick:function(e){return t.isMissing(e.clientX)},fork:a,keyModifiers:o,get inputDevice(){return t.last(c)}}}(),up.on=up.event.on,up.off=up.event.off,up.emit=up.event.emit},9454:()=>{up.Layer.OverlayWithTether=class OverlayWithTether extends up.Layer.Overlay{createElements(){this.origin||up.fail("Missing { origin } option"),this.Zu=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.Zu.parent),this.createContentElement(this.element)}onContentSet(){this.Zu.start(this.element)}onElementsRemoved(){this.Zu.stop()}sync(){this.isOpen()&&(this.isDetached()||this.Zu.isDetached()?this.dismiss(":detached",{animation:!1,preventable:!1}):this.Zu.sync())}}},9483:()=>{up.NotImplemented=class NotImplemented extends up.Error{}},9797:function(){var t,e=this&&this.t||function(t,e,n,i){return new(n||(n=Promise))((function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n((function(t){t(e)}))).then(o,u)}a((i=i.apply(t,e||[])).next())}))};const n=up.util;up.Change.FromResponse=(t=class FromResponse extends up.Change{constructor(t){super(t),this.ve=t.response,this.zt=this.ve.request}execute(){var t;if(up.fragment.config.skipResponse(this.ta())?this.ea():this.zt.assertEmitted("up:fragment:loaded",Object.assign(Object.assign({},this.ta()),{callback:this.options.onLoaded,log:["Loaded fragment from %s",this.ve.description],skip:()=>this.ea()})),null!==(t=n.evalOption(this.options.fail,this.ve))&&void 0!==t?t:!this.ve.ok)throw this.na(this.deriveFailOptions());return this.na(this.options)}ea(){up.puts("up.render()","Skipping "+this.ve.description),this.options.target=":none",this.options.failTarget=":none"}na(t){t.didForceFailOptions&&up.puts("up.render()","Rendering failed response using fail-prefixed options (https://unpoly.com/failed-responses)"),this.ia(t),t.meta=this.ra();let e=new up.Change.FromContent(t).execute();return e.finished=this.finish(e,t),e}finish(t,n){return e(this,void 0,void 0,(function*(){return t=yield t.finished,up.fragment.shouldRevalidate(this.zt,this.ve,n)&&(t=yield this.sa(t,n)),t}))}sa(t,n){return e(this,void 0,void 0,(function*(){let e=n.target,i=t.target;if(/:(before|after)/.test(e))up.warn("up.render()","Cannot revalidate cache when prepending/appending (target %s)",e);else{up.puts("up.render()",'Revalidating cached response for target "%s"',i);let e=yield up.reload(i,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n),up.RenderOptions.NO_MOTION),up.RenderOptions.NO_INPUT_INTERFERENCE),up.RenderOptions.NO_PREVIEWS),{preferOldElements:t.fragments,layer:t.layer,onFinished:null,expiredResponse:this.ve,preview:this.oa(n),abort:!1,cache:!1,background:!0}));e.none||(t=e)}return t}))}oa({preview:t,revalidatePreview:e}){return!0===e?t:e}ta(){const{expiredResponse:t}=this.options;return{request:this.zt,response:this.ve,renderOptions:this.options,revalidating:!!t,expiredResponse:t}}ra(){var t,e;let n={revalidating:!!this.options.expiredResponse};return null===(e=(t=up.migrate).processCompilerPassMeta)||void 0===e||e.call(t,n,this.ve),n}ia(t){var e,i;const r=this.ve.url;let s=r,o=this.zt.hash;o&&(t.hash=o,s+=o),"GET"===this.ve.method?t.source=this.improveHistoryValue(t.source,r):(t.source=this.improveHistoryValue(t.source,"keep"),t.history=!!t.location);let u=this.ve.openLayer;u&&(Object.assign(t,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},up.Layer.Overlay.UNSET_VISUALS),{target:void 0}),up.fragment.config.navigateOptions),u),{layer:"new"})),Object.assign(t,u)),t.location=this.improveHistoryValue(t.location,s),t.title=this.improveHistoryValue(t.title,this.ve.title),t.eventPlans=this.ve.eventPlans;let a=this.ve.target;a&&(t.target=a),t.acceptLayer=this.ve.acceptLayer,t.dismissLayer=this.ve.dismissLayer,t.document=this.ve.text,this.ve.none&&(t.target=":none"),t.context=n.merge(t.context,this.ve.context),t.cspInfo=this.ve.cspInfo,null!==(e=t.time)&&void 0!==e||(t.time=this.ve.lastModified),null!==(i=t.etag)&&void 0!==i||(t.etag=this.ve.etag)}},n.memoizeMethod(t.prototype,{ta:!0}),t)},9844:()=>{const t=up.util;up.FragmentScrolling=class FragmentScrolling extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","mode","revealTop","revealMax","revealSnap","scrollBehavior"])}processPrimitive(e){switch(e){case"top":return this.ua(0);case"bottom":return this.ua(99999999);case"layer":return this.aa();case"main":return this.ca(":main");case"restore":return this.ha();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.la(this.fragment);default:if(t.isString(e))return this.ca(e)}}processElement(t){return this.la(t)}la(t){if(t)return up.reveal(t,this.attributes()),!0}ca(t){let e=this.findSelector(t);return this.la(e)}aa(){return this.la(this.layer.getBoxElement())}ua(t){return up.viewport.scrollTo(t,Object.assign(Object.assign({},this.attributes()),{around:this.fragment}))}ha(){return up.viewport.restoreScroll(Object.assign(Object.assign({},this.attributes()),{around:this.fragment}))}}},9918:()=>{const t=up.element,e=up.util;up.RevealMotion=class RevealMotion{constructor(e,n={}){var i,r,s,o,u,a,c,h,l,p;this.st=e,this.es=t.get(n.viewport)||up.viewport.get(this.st),this.pa=up.layer.get(this.es),this.fa=null!==(r=null!==(i=n.scrollBehavior)&&void 0!==i?i:n.behavior)&&void 0!==r?r:"instant";const f=up.viewport.config;this.da=null!==(o=null!==(s=n.snap)&&void 0!==s?s:n.revealSnap)&&void 0!==o?o:f.revealSnap,this.ma=null!==(a=null!==(u=n.padding)&&void 0!==u?u:n.revealPadding)&&void 0!==a?a:f.revealPadding,this.ga=null!==(h=null!==(c=n.top)&&void 0!==c?c:n.revealTop)&&void 0!==h?h:f.revealTop,this.va=null!==(p=null!==(l=n.max)&&void 0!==l?l:n.revealMax)&&void 0!==p?p:f.revealMax,this.ba=f.selector("fixedTopSelectors"),this.ya=f.selector("fixedBottomSelectors")}start(){const t=this.wa(this.es),n=up.Rect.fromElement(this.st);if(this.va){const t=e.evalOption(this.va,this.st);n.height=Math.min(n.height,t)}n.grow(this.ma),this._a(t),t.height<0&&up.fail("Viewport has no visible area");const i=this.es.scrollTop;let r=i;this.ga||n.height>t.height?r+=n.top-t.top:n.top<t.top?r-=t.top-n.top:n.bottom>t.bottom&&(r+=n.bottom-t.bottom),e.isNumber(this.da)&&r<this.da&&n.top<.5*t.height&&(r=0),r!==i&&this.es.scrollTo({top:r,behavior:this.fa})}wa(){return up.viewport.isRoot(this.es)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.es)}Oa(n){let i=up.fragment.all(n,{layer:this.pa});return e.filter(i,t.isVisible)}_a(t){for(let e of this.Oa(this.ba)){let n=up.Rect.fromElement(e).bottom-t.top;n>0&&(t.top+=n,t.height-=n)}for(let e of this.Oa(this.ya)){let n=up.Rect.fromElement(e),i=t.bottom-n.top;i>0&&(t.height-=i)}}}}},e={};function n(i){var r=e[i];if(void 0!==r)return r.exports;var s=e[i]={exports:{}};return t[i].call(s.exports,s,s.exports,n),s.exports}n(7115),n(9363),n(3889),n(6939),n(6559),n(889),n(7781),n(2487),n(9483),n(8386),n(4244),n(1410),n(1268),n(4138),n(8065),n(3526),n(6705),n(8183),n(7080),n(7275),n(3394),n(8504),n(6347),n(8195),n(4572),n(864),n(5845),n(5224),n(302),n(2113),n(1589),n(9797),n(5249),n(6805),n(2175),n(1739),n(611),n(5229),n(3441),n(4742),n(621),n(5691),n(1499),n(1438),n(2459),n(5887),n(7919),n(3728),n(9844),n(7687),n(7304),n(9454),n(2084),n(3126),n(2009),n(4526),n(8268),n(3383),n(6088),n(9156),n(6607),n(9391),n(2049),n(567),n(5637),n(4718),n(8354),n(2077),n(541),n(7718),n(6351),n(7294),n(4823),n(1588),n(6374),n(8072),n(6858),n(9918),n(6689),n(6140),n(3530),n(5313),n(9441),n(9013),n(367),n(3106),n(6101),n(6973),n(235),n(2679),n(9399),n(1420),n(181),n(1915),n(2771),n(3194),n(4372),up.framework.onEvaled()})();
|