unpoly-rails 3.10.0 → 3.10.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1 +1 @@
1
- (()=>{var t={5941:()=>{},7433:()=>{},7921:()=>{},7298:()=>{},2903:()=>{},573:()=>{},2811:()=>{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}}},6346:()=>{const t=up.element,e=up.util;up.BodyShifter=class BodyShifter{constructor(){this.t=new Set,this.i=0,this.o=e.cleaner()}lowerStack(){0==--this.i&&this.o.clean()}raiseStack(){1==++this.i&&this.u()}onAnchoredElementInserted(t){return this.t.add(t),this.h(t,"right"),()=>this.t.delete(t)}l(){return this.p&&this.i>0}u(){this.p=up.viewport.rootScrollbarWidth(),this.o(t.setStyleTemp(t.root,{"--up-scrollbar-width":this.p+"px"})),this.h(document.body,"padding-right");for(let t of this.t)this.h(t,"right")}h(e,n){if(!this.l())return;let i=t.style(e,n);this.o(t.setStyleTemp(e,{["--up-original-"+n]:i}),t.addClassTemp(e,"up-scrollbar-away"))}}},7948:()=>{const t=up.util,e=up.element;up.Change.Addition=class Addition extends up.Change{constructor(t){super(t),this.m=t.acceptLayer,this.v=t.dismissLayer,this._=t.eventPlans||[],this.O=t.response}handleLayerChangeRequests(){this.layer.isOverlay()&&(this.k(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(this.S()),this.abortWhenLayerClosed(),this.j(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(this.S()),this.abortWhenLayerClosed()),this.layer.asCurrent((()=>{for(let t of this._)up.emit(Object.assign(Object.assign({},t),this.S())),this.abortWhenLayerClosed()}))}k(){t.isDefined(this.m)&&this.layer.isOverlay()&&this.layer.accept(this.m,this.S())}j(){t.isDefined(this.v)&&this.layer.isOverlay()&&this.layer.dismiss(this.v,this.S())}abortWhenLayerClosed(t=this.layer){if(t.isClosed())throw new up.Aborted("Layer was closed")}C({oldElement:t,newElement:n,source:i}){"keep"===i&&(i=t&&up.fragment.source(t)),i&&e.setMissingAttr(n,"up-source",up.fragment.normalizeSource(i))}F({newElement:t,time:n}){e.setMissingAttr(t,"up-time",!!n&&n.toUTCString())}T({newElement:t,etag:n}){e.setMissingAttr(t,"up-etag",n||!1)}setReloadAttrs(t){this.C(t),this.F(t),this.T(t)}S(){return{response:this.O}}executeSteps(t,e,n){return new up.Change.UpdateSteps({steps:t,noneOptions:n}).execute(e)}}},3030:()=>{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)}}},7422:()=>{const t=up.util;up.Change.CloseLayer=class CloseLayer extends up.Change{constructor(t){var e,n;super(t),this.P=t.verb,this.R=up.layer.get(t),this.L=t.origin,this.A=t.value,this.$=null===(e=t.preventable)||void 0===e||e,this.O=t.response,this.D=null===(n=t.history)||void 0===n||n}execute(){if(!this.R.isOpen())return Promise.resolve();if(up.browser.assertConfirmed(this.options),this.M().defaultPrevented&&this.$)throw new up.Aborted("Close event was prevented");this.N(),up.fragment.abort({reason:"Layer is closing",layer:this.R});const{parent:t}=this.R;this.R.peel(),this.R.stack.remove(this.R),this.D&&t.restoreHistory(),this.H(t),this.R.teardownHandlers(),this.R.destroyElements(this.options),this.q(t)}M(){let e=this.R.emit(this.B(`up:layer:${this.P}`),{callback:this.R.callback(`on${t.upperCaseFirst(this.P)}`),log:[`Will ${this.P} ${this.R} with value %o`,this.A]});return this.A=e.value,e}N(){let t=this.B(`up:layer:${this.P}ing`);this.R.emit(t,{log:!1})}q(e){const n=`${this.P}ed`,i=t.upperCaseFirst(n);return this.R.emit(this.B(`up:layer:${n}`),{baseLayer:e,callback:this.R.callback(`on${i}`),ensureBubbles:!0,log:[`${i} ${this.R} with value %o`,this.A]})}B(t){return up.event.build(t,{layer:this.R,value:this.A,origin:this.L,response:this.O})}H(t){var e;this.R.overlayFocus.teardown(),null===(e=t.overlayFocus)||void 0===e||e.moveToFront();let n=this.R.origin||t.element;up.focus(n,{preventScroll:!0})}}},8228:function(){var t=this&&this.U||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.R=up.layer.get(t)||up.layer.current,this.I=this.options.element,this.K=this.options.animation,this.V=this.options.log,this.X=this.options.onFinished}execute(){this.W=this.I.parentNode,up.fragment.markAsDestroying(this.I),up.motion.willAnimate(this.I,this.K,this.options)?this.G():this.J()}G(){var e;return t(this,void 0,void 0,(function*(){this.Y(),yield this.Z(),this.tt(),null===(e=this.X)||void 0===e||e.call(this)}))}J(){var t;this.tt(),this.Y(),null===(t=this.X)||void 0===t||t.call(this)}Z(){return up.motion.animate(this.I,this.K,this.options)}tt(){this.R.asCurrent((()=>{up.fragment.abort(this.I),up.script.clean(this.I,{layer:this.R}),up.element.cleanJQuery(this.I),this.I.remove()}))}Y(){up.fragment.emitDestroyed(this.I,{parent:this.W,log:this.V})}}},9005:()=>{var t;const e=up.util;up.Change.FromContent=(t=class FromContent extends up.Change{constructor(t){super(t),this.L=t.origin,this.et=t.preflight,this.nt=up.layer.getAll(t)}it(){let t=[];return this.rt(),this.st(),this.ot(t,this.nt,this.options.target),this.ot(t,this.nt,this.options.fallback),t}ut(t){return"new"===t||t.isOpen()}rt(){this.nt=e.filter(this.nt,this.ut)}ot(t,e,n){for(let i of e)for(let e of this.ct(n,i)){const n=Object.assign(Object.assign({},this.options),{target:e,layer:i,defaultPlacement:this.ht()}),r="new"===i?new up.Change.OpenLayer(n):new up.Change.UpdateLayer(n);t.push(r)}}ct(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.options.mode,origin:this.L})}execute(){return this.options.preload?Promise.resolve():this.lt(this.ft.bind(this))||this.dt()}ft(t){let e=t.execute(this.gt(),this.vt.bind(this,t));return e.options=this.options,e}bt(t){return!(t instanceof up.CannotMatch)}vt(t){var e,n;let i=this.it()[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.gt();r&&up.script.assertAssetsOK(r,t.options),null===(n=(e=this.options).handleAbort)||void 0===n||n.call(e,null)}gt(){var t,n;if(this.et)return;const i=e.pick(this.options,["target","content","fragment","document","html","cspNonces","origin","data"]);return null===(n=(t=up.migrate).handleResponseDocOptions)||void 0===n||n.call(t,i),"content"===this.ht()&&(i.target=this.yt(i.target)),new up.ResponseDoc(i)}st(){var t;if(this.et)return;let e=this.gt();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)}ht(){if(!this.options.document&&!this.options.fragment)return"content"}yt(t){let e=this.nt[0]||up.layer.root;return this.ct(t||":main",e)[0]}getPreflightProps(t={}){return this.lt((t=>t.getPreflightProps()))||t.optional||this.wt()}wt(){this._t("Could not find target in current page")}dt(){this._t("Could not find common target in current page and response")}_t(t){if(this.it().length){const n=e.uniq(e.map(this.it(),"target")),i=up.layer.optionToString(this.options.layer);throw new up.CannotMatch([t+" (tried selectors %o in %s)",n,i])}if(0!==this.nt.length)throw this.options.failPrefixForced?new up.CannotMatch("No target selector given for failed responses (https://unpoly.com/failed-responses)"):new up.CannotMatch("No target selector given");this.Ot()}Ot(){throw new up.CannotMatch("Could not find a layer to render in. You may have passed an unmatchable layer reference, or a detached element.")}lt(t){for(let e of this.it())try{return t(e)}catch(t){if(this.bt(t))throw t}}},e.memoizeMethod(t.prototype,{it:!0,gt:!0,getPreflightProps:!0}),t)},278:function(){var t,e=this&&this.U||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.O=t.response,this.kt=this.O.request}execute(){var t;if(up.fragment.config.skipResponse(this.St())?this.xt():this.kt.assertEmitted("up:fragment:loaded",Object.assign(Object.assign({},this.St()),{callback:this.options.onLoaded,log:["Loaded fragment from %s",this.O.description],skip:()=>this.xt()})),null!==(t=n.evalOption(this.options.fail,this.O))&&void 0!==t?t:!this.O.ok)throw this.Et(this.deriveFailOptions());return this.Et(this.options)}xt(){up.puts("up.render()","Skipping "+this.O.description),this.options.target=":none",this.options.failTarget=":none"}Et(t){t.failPrefixForced&&up.puts("up.render()","Rendering failed response using fail-prefixed options (https://unpoly.com/failed-responses)"),this.jt(t),t.meta=this.Ct();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.kt,this.O,n)&&(t=yield this.Ft(t,n)),t}))}Ft(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.O,preview:this.Tt(n),abort:!1,cache:!1,background:!0}));e.none||(t=e)}return t}))}Tt({preview:t,revalidatePreview:e}){return!0===e?t:e}St(){const{expiredResponse:t}=this.options;return{request:this.kt,response:this.O,renderOptions:this.options,revalidating:!!t,expiredResponse:t}}Ct(){var t,e;let n={revalidating:!!this.options.expiredResponse};return null===(e=(t=up.migrate).processCompilerPassMeta)||void 0===e||e.call(t,n,this.O),n}jt(t){var e,i;const r=this.O.url;let s=r,o=this.kt.hash;o&&(t.hash=o,s+=o),"GET"===this.O.method?t.source=this.improveHistoryValue(t.source,r):(t.source=this.improveHistoryValue(t.source,"keep"),t.history=!!t.location),t.location=this.improveHistoryValue(t.location,s),t.title=this.improveHistoryValue(t.title,this.O.title),t.eventPlans=this.O.eventPlans;let u=this.O.target;u&&(t.target=u),t.acceptLayer=this.O.acceptLayer,t.dismissLayer=this.O.dismissLayer,t.document=this.O.text,this.O.none&&(t.target=":none"),t.context=n.merge(t.context,this.O.context),t.cspNonces=this.O.cspNonces,null!==(e=t.time)&&void 0!==e||(t.time=this.O.lastModified),null!==(i=t.etag)&&void 0!==i||(t.etag=this.O.etag)}},n.memoizeMethod(t.prototype,{St:!0}),t)},2200:function(){var t,e=this&&this.U||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.Pt();if(e)return up.puts("up.render()",e),up.network.loadPage(this.options),n.unresolvablePromise();let o=this.request=up.request(this.Rt());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.Lt(t))))}))}Pt(){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}Rt(){const t=this.At(this.options),e=this.At(this.deriveFailOptions(),{optional:!0});return Object.assign(Object.assign(Object.assign({},this.options),t),n.withRenamedKeys(e,up.fragment.failKey))}getPreflightProps(){return this.Rt()}At(t,e){return new up.Change.FromContent(Object.assign(Object.assign({},t),{preflight:!0})).getPreflightProps(e)}Lt(t){return t instanceof up.Response?this.$t(t):this.Dt(t)}$t(t){return new up.Change.FromResponse(Object.assign(Object.assign({},this.options),{response:t})).execute()}Dt(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,{Rt:!0}),t)},7050:function(){var t=this&&this.U||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.L=t.origin,this.Mt=t.baseLayer}getPreflightProps(){return{mode:this.options.mode,context:this.Nt().context,origin:this.options.origin,target:this.target,bindLayer:this.Mt,layer:"new",bindFragments:e.compact([up.fragment.get(":main",{layer:this.Mt})]),fragments:[]}}execute(t,e){this.responseDoc=t,this.Ht(),e(),this.qt();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.Bt.bind(this));try{return this.Ut(),this.Bt(),up.RenderResult.both(this.It,this.zt)}finally{n()}}Ht(){if(":none"===this.target?this.Kt=document.createElement("up-none"):this.Kt=this.responseDoc.select(this.target),!this.Kt||this.Mt.isClosed())throw new up.CannotMatch}qt(){up.puts("up.render()",`Opening element "${this.target}" in new overlay`),this.Vt(),this.layer=this.Nt(),this.Mt.peel({history:!this.layer.history}),up.layer.stack.push(this.layer),this.layer.createElements(),this.layer.setupHandlers()}Ut(){this.Xt(),this.handleLayerChangeRequests(),this.responseDoc.commitElement(this.Kt),this.layer.setContent(this.Kt),this.setReloadAttrs({newElement:this.Kt,source:this.options.source}),this.responseDoc.finalizeElement(this.Kt),this.It=new up.RenderResult({layer:this.layer,fragments:[this.Kt],target:this.target}),up.hello(this.layer.element,Object.assign(Object.assign({},this.options),{layer:this.layer,dataRoot:this.Kt})),this.Wt(),this.It.finished=this.Gt(),this.layer.opening=!1,this.Jt(),this.abortWhenLayerClosed()}Bt(){if(this.zt)return;let t=this.Qt().other;this.zt=this.executeSteps(t,this.responseDoc)}Gt(){return t(this,void 0,void 0,(function*(){return yield this.layer.startOpenAnimation(),this.abortWhenLayerClosed(),this.H(),this.It}))}Nt(){const t=Object.assign(Object.assign({},this.options),{opening:!0});return up.layer.build(t,(t=>this.options=up.RenderOptions.finalize(t)))}Xt(){var t;"auto"===this.layer.history&&(this.layer.history=up.fragment.hasAutoHistory([this.Kt],this.layer));let{parent:e}=this.layer;(t=this.layer).history&&(t.history=e.history),e.saveHistory(),this.layer.updateHistory(this.options)}H(){var t;null===(t=this.Mt.overlayFocus)||void 0===t||t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.Kt,layer:this.layer,autoMeans:["autofocus","layer"],inputDevice:this.options.inputDevice}).process(this.options.focus)}Wt(){const t=Object.assign(Object.assign({},this.options),{fragment:this.Kt,layer:this.layer,autoMeans:["hash","layer"]});new up.FragmentScrolling(t).process(this.options.scroll)}Vt(){up.event.assertEmitted("up:layer:open",{origin:this.L,baseLayer:this.Mt,layerOptions:this.options,log:"Opening new overlay"})}Jt(){this.layer.emit("up:layer:opened",{origin:this.L,callback:this.layer.callback("onOpened"),log:`Opened new ${this.layer}`})}Qt(){return up.radio.hungrySteps(this.Yt())}Yt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.layer.history})}}},9441:()=>{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.Zt=t.context,this.te=up.fragment.parseTargetSteps(this.target,this.options)}getPreflightProps(){this.ee();let t=this.ne();return{layer:this.layer,bindLayer:this.layer,mode:this.layer.mode,context:e.merge(this.layer.context,this.Zt),origin:this.options.origin,target:this.ie(),fragments:t,bindFragments:t}}ie(){return this.ee(),up.fragment.targetForSteps(this.te)}ne(){return this.ee(),e.map(this.te,"oldElement")}execute(t,e){this.responseDoc=t,this.Ht(),e();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.Bt.bind(this));try{return this.re(),this.Bt(),up.RenderResult.both(this.se,this.zt)}finally{n()}}re(){this.te.length&&up.puts("up.render()",`Updating "${this.ie()}" in ${this.layer}`),this.oe(),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.ue()}),!1!==this.options.abort&&up.fragment.abort(this.ne(),{reason:"Fragment is being replaced"}),Object.assign(this.layer.context,this.Zt),this.ue()&&this.layer.updateHistory(this.options),this.handleLayerChangeRequests(),this.se=this.executeSteps(this.te,this.responseDoc,this.options)}Bt(){if(this.zt)return;let t=this.Qt().other;this.zt=this.executeSteps(t,this.responseDoc)}ee(){this.ae(),this.ce()}Ht(){this.ae(),this.he(),this.ce(),this.le()}he(){this.te.push(...this.Qt().current)}ae(){this.te=this.te.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}))}le(){this.te=this.responseDoc.selectSteps(this.te)}ce(){this.te=up.fragment.compressNestedSteps(this.te)}Qt(){return up.radio.hungrySteps(this.Yt())}oe(){let t=up.FocusCapsule.preserve(this.layer);this.te.forEach(((e,n)=>{e.focusCapsule=t,n>0&&(e.scroll=!1,e.focus=!1)}))}ue(){return e.evalAutoOption(this.options.history,this.pe.bind(this))}pe(){const t=e.map(this.te,"oldElement");return up.fragment.hasAutoHistory(t,this.layer)}Yt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.ue()})}},e.memoizeMethod(t.prototype,{ee:!0,ae:!0,ue:!0,Qt:!0}),t)},9489:function(){var t=this&&this.U||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.fe=t.noneOptions||{},this.te=e.copy(t.steps)}execute(t){var e;if(this.responseDoc=t,this.te=t.selectSteps(this.te),this.te=t.commitSteps(this.te),!this.te.length)return this.de();this.renderResult=new up.RenderResult({layer:null===(e=this.te[0])||void 0===e?void 0:e.layer,target:up.fragment.targetForSteps(this.te)}),this.te.reverse();const n=this.te.map((t=>this.me(t)));return this.renderResult.finished=this.Gt(n),this.renderResult}de(){return this.H(null,this.fe),this.Wt(null,this.fe),up.RenderResult.buildNone()}Gt(e){return t(this,void 0,void 0,(function*(){yield Promise.all(e);for(let t of this.te)this.abortWhenLayerClosed(t.layer);return this.renderResult}))}ge(t){let e=t.matches("up-wrapper")?t.children:[t];this.renderResult.fragments.unshift(...e)}me(t){switch(this.setReloadAttrs(t),t.placement){case"swap":if(this.ve(t))return this.H(t.oldElement,t),this.Wt(t.oldElement,t),Promise.resolve();{this.be(t);const e=t.oldElement.parentNode,i=Object.assign(Object.assign({},t),{beforeStart(){up.fragment.markAsDestroying(t.oldElement)},afterInsert:()=>{this.ye(t),this.responseDoc.finalizeElement(t.newElement),this.we(t),up.hello(t.newElement,t),this.ge(t.newElement)},beforeDetach:()=>{up.script.clean(t.oldElement,{layer:t.layer})},afterDetach(){n.cleanJQuery(),up.fragment.emitDestroyed(t.oldElement,{parent:e,log:!1})},scrollNew:()=>{this.H(t.newElement,t),this.Wt(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.me(r).then((()=>{n.unwrap(i),this.H(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.responseDoc.finalizeElement(e),up.hello(e,t),this.ge(e),this.H(e,t),this.Wt(e,t),up.animate(e,t.transition,t).then((()=>n.unwrap(e)))}default:up.fail("Unknown placement: %o",t.placement)}}ve(t){if(!t.keep)return;const{oldElement:e,newElement:i}=t;let r;if(!n.booleanAttr(e,"up-keep"))return;let s=up.fragment.toTarget(e);const o={layer:t.layer};if(r=t.descendantsOnly?up.fragment.get(i,s,o):n.subtreeFirst(i,s,o),r&&!1!==n.booleanAttr(r,"up-keep")){const n={oldElement:e,newElement:r,newData:up.script.data(r),renderOptions:t};if(!up.fragment.emitKeep(n).defaultPrevented)return n}}be(t){const e=[];if(t.keep)for(let n of t.oldElement.querySelectorAll("[up-keep]")){let i=this.ve(Object.assign(Object.assign({},t),{oldElement:n,descendantsOnly:!0}));if(i){const t=n.cloneNode(!0);n.insertAdjacentElement("beforebegin",t),n.classList.add("up-keeping"),up.script.disableSubtree(i.newElement);let r=up.viewport.subtree(i.oldElement);i.revivers=r.map((function(t){let e=up.viewport.copyCursorProps(t);return()=>up.viewport.copyCursorProps(e,t)})),this._e(document.body)?i.newElement.replaceWith(n):document.body.append(n),e.push(i)}}t.keepPlans=e}ye(t){for(let e of t.keepPlans){e.newElement.replaceWith(e.oldElement);for(let t of e.revivers)t()}}we(t){for(let e of t.keepPlans)e.oldElement.classList.remove("up-keeping")}_e(t){return e.some(this.te,(e=>e.oldElement.contains(t)))}H(t,e){return new up.FragmentFocus(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoFocus})).process(e.focus)}Wt(t,e){return new up.FragmentScrolling(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoScroll})).process(e.scroll)}}},1569:()=>{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.Oe=t,this.ke=e,this.R=n,this.Se=i,this.xe=r||t,this.Ee=s,o||(o={}),o.layer=n,this.je=o}run(){this.R.asCurrent((()=>{this.setCompileData();for(let t of this.ke)this.Ce(t)}))}setCompileData(){if(this.Se&&(this.xe.upCompileData=this.Se),this.Ee)for(let t in this.Ee)for(let e of this.Fe(t))e.upCompileData=this.Ee[t]}Ce(t){var e,n;const i=this.Te(t);if(i.length){if(t.isDefault||up.puts("up.hello()",'Compiling %d× "%s" on %s',i.length,t.selector,this.R),t.batch)this.Pe(t,i);else for(let e of i)this.Re(t,e);return null===(n=(e=up.migrate).postCompile)||void 0===n?void 0:n.call(e,i,t)}}Re(t,e){const n=[e];if(1!==t.length){const t=up.script.data(e);n.push(t,this.je)}const i=this.Le(t,e,n);up.destructor(e,i)}Pe(e,n){const i=[n];if(1!==e.length){const e=t.map(n,up.script.data);i.push(e,this.je)}this.Le(e,n,i)&&up.fail("Compilers with { batch: true } cannot return destructors")}Le(t,e,n){return up.error.guard((()=>t.apply(e,n)))}Fe(e){return up.fragment.subtree(this.Oe,t.evalOption(e),{layer:this.R})}Te(e){let n=this.Fe(e.selector);return t.filter(n,(t=>{let n=t.upAppliedCompilers||(t.upAppliedCompilers=new Set);if(!n.has(e))return n.add(e),!0}))}}},3742:()=>{const t=up.util,e=up.element;up.Config=class Config{constructor(t=(()=>({}))){this.Ae=t,this.reset(),document.addEventListener("up:framework:reset",(()=>this.reset()))}reset(){Object.assign(this,this.Ae())}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)}}},2737:()=>{const t=up.util,e=up.element;up.CSSTransition=class CSSTransition{constructor(t,e,n){this.I=t,this.$e=e,this.De=Object.keys(this.$e),this.Me=n.finishEvent,this.Ne=n.duration,this.He=n.easing,this.qe=!1}start(){return 0===this.De.length?(this.qe=!0,Promise.resolve()):(this.Be=t.newDeferred(),this.Ue(),this.Ie=new Date,this.ze(),this.Ke(),this.Ve(),this.Xe(),this.Be)}Ke(){this.Me&&(this.We=up.on(this.I,this.Me,this.Ge.bind(this)))}Ge(t){t.stopPropagation(),this.Gt()}ze(){this.Je=t.timer(this.Ne+100,(()=>this.Gt()))}Qe(){clearTimeout(this.Je)}Ve(){this.Ye=up.on(this.I,"transitionend",this.Ze.bind(this))}Ze(e){if(e.target!==this.I)return;if(new Date-this.Ie<=.25*this.Ne)return;const n=e.propertyName;t.contains(this.De,n)&&this.Gt()}Gt(){var t,n;this.qe||(this.qe=!0,this.Qe(),null===(t=this.We)||void 0===t||t.call(this),null===(n=this.Ye)||void 0===n||n.call(this),e.concludeCSSTransition(this.I),this.tn(),this.Be.resolve())}Ue(){const t=e.style(this.I,["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.I,n);this.en=e.setStyleTemp(this.I,i)}this.nn=e.concludeCSSTransition(this.I)}}tn(){var t,e;null===(t=this.en)||void 0===t||t.call(this),null===(e=this.nn)||void 0===e||e.call(this)}Xe(){e.setStyle(this.I,{"transition-property":this.De.join(),"transition-duration":`${this.Ne}ms`,"transition-timing-function":this.He}),e.setStyle(this.I,this.$e)}}},3635:()=>{const t=up.util;up.DestructorPass=class DestructorPass{constructor(t,e){this.rn=t,this.sn=e}run(){for(let e of this.un()){let n=t.pluckKey(e,"upDestructors");null==n||n.clean(e)}}un(){const t=Object.assign(Object.assign({},this.sn),{destroying:!0});return up.fragment.subtree(this.rn,".up-can-clean",t)}}},1906:()=>{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.an(),this.baseLayer?this.baseLayer.asCurrent((()=>this.cn())):this.cn(),this.event}cn(){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`)}an(){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)}}},4158:()=>{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.hn=this.constructor.ln(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.hn]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),e[this.hn]=this,this.element.addEventListener(...this.pn())}pn(){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.hn],this.element.removeEventListener(...this.pn())}nativeCallback(e){if(up.framework.beforeBoot&&!this.beforeBoot)return;let n=e.target;if(this.selector&&(n=n.closest(t.evalOption(this.selector))),(!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.ln(t)]}static ln(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[]}}},3139:()=>{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.fn((function(t){const n=new up.EventListener(t);return n.bind(),e(n.unbind.bind(n))})),e.clean}fn(t){for(let e of this.elements)for(let n of this.eventTypes)t(this.dn(e,n))}dn(t,e){return Object.assign(Object.assign({},this.attributes()),{element:t,eventType:e})}unbind(){this.fn((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))}}},2214:function(){var t=this&&this.U||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){this.sn=e,this.Oe=t,this.mn=up.form.getScope(t),this.gn=n,this.vn=e.batch}start(){this.bn=null,this.yn=this.wn(),this._n=null,this.On=!1,this.o=e.cleaner(),this.kn(this.Oe),this.Oe.addEventListener("up:fragment:inserted",(({target:t})=>{t!==this.Oe&&this.kn(t)})),this.o(up.fragment.onAborted(this.mn,(()=>this.Sn()))),this.o(up.on(this.mn,"reset",(()=>this.xn())))}stop(){this.Sn(),this.o.clean()}En(t){let n=e.copy(this.sn);return up.form.watchOptions(t,n,{defaults:{event:"input"}})}kn(t){for(let e of up.form.fields(t))this.jn(e)}jn(t){let e=this.En(t);this.o(up.on(t,e.event,(()=>this.Cn(e))))}Sn(){this.bn=null}Fn(t,n){this.bn=t,this.Tn=n;let i=n.delay||0;clearTimeout(this._n),this._n=e.timer(i,(()=>{this._n=null,this.Pn()}))}Rn(t){return!e.isEqual(t,this.yn)&&!e.isEqual(this.bn,t)}Pn(){return t(this,void 0,void 0,(function*(){if(!this.bn)return;if(this.On)return;if(this._n)return;if(!this.mn.isConnected)return;let t=e.omit(this.Tn,["event","delay"]);const n=this.Ln(this.yn,this.bn);this.yn=this.bn,this.bn=null,this.On=!0,this.Tn=null;const i=[];if(this.vn)i.push(this.An(n,t));else for(let e in n){const r=n[e];i.push(this.An(r,e,t))}if(e.some(i,e.isPromise)){let t=Promise.allSettled(i);yield t}this.On=!1,this.Pn()}))}An(...t){return up.error.guard(this.gn,...t)}Ln(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}wn(){return up.Params.fromContainer(this.Oe).toObject()}Cn(t={}){const e=this.wn();this.Rn(e)&&this.Fn(e,t)}xn(){e.task((()=>this.Cn()))}}},5949:()=>{const t=up.util;up.FIFOCache=class FIFOCache{constructor({capacity:e=10,normalizeKey:n=t.identity}={}){this.$n=new Map,this.Dn=e,this.Mn=n}get(t){return t=this.Mn(t),this.$n.get(t)}set(t,e){if(this.$n.size===this.Dn){let t=this.$n.keys().next().value;this.$n.delete(t)}t=this.Mn(t),this.$n.set(t,e)}clear(){this.$n.clear()}}},665:()=>{up.FocusCapsule=class FocusCapsule{constructor(t,e,n){this.I=t,this.Nn=e,this.Hn=n}wasLost(){return document.activeElement!==this.I}restore(t,e){let n=up.fragment.get(this.Nn,{layer:t});if(n)return up.viewport.copyCursorProps(this.Hn,n),up.focus(n,e),!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,up.viewport.copyCursorProps(e)):void 0}}},5240:function(){var t=this&&this.U||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.qn||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.Bn=t,this.Un=[],this.In=null,this.zn=!1,this.Kn(),this.Vn()}Vn(){up.fragment.onAborted(this.Bn,(t=>this.Xn(t)))}Xn(t){this.Un.length&&(this.Un=[],this.Wn.reject(new up.Aborted(t.reason)),this.Kn())}Kn(){this.Wn=n.newDeferred()}watchContainer(t){let{event:e}=this.Gn(t);up.on(t,e,{guard:()=>up.fragment.isAlive(t)},(()=>up.error.muteUncriticalRejection(this.validate({origin:t}))))}validate(t={}){let e=this.Jn(t);return this.Un.push(...e),this.Qn(),this.Wn}Jn(t){let e=this.Yn(t)||this.Zn(t)||this.ti(t.origin);for(let n of e)n.renderOptions=this.Gn(n.origin,t),n.target=up.fragment.resolveOrigin(n.target,n);return e}Zn(t){var{origin:n}=t,i=e(t,["origin"]);if(up.form.isField(n))return this.ei(n)||this.ni(n,i)}ni(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}Yn({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)})))}}ti(t){return up.puts("up.validate()","Validating element %o",t),[{element:t,target:up.fragment.toTarget(t),origin:t}]}ei(t){let e=t.closest("[up-validate]");if(e){let n=i.booleanOrStringAttr(e,"up-validate");return this.Yn({target:n,origin:t})}}Gn(t,e){return up.form.watchOptions(t,e,{defaults:{event:"change"}})}Qn(){let t=this.Un.map((t=>t.renderOptions.delay)),e=Math.min(...t)||0;clearTimeout(this.In),this.In=n.timer(e,(()=>{this.In=null,this.ii()}))}ii(){up.error.muteUncriticalRejection(this.ri())}ri(){return t(this,void 0,void 0,(function*(){if(!this.Un.length)return;if(this.zn)return;if(this.In)return;let t=this.si(this.Un);this.Un=[],this.zn=!0;let e=this.Wn;this.Kn();try{e.resolve(up.render(t)),yield e}finally{this.zn=!1,this.ii()}}))}si(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=n.mergeDefined(...o,up.form.destinationOptions(this.Bn));return u.target=n.map(t,"target").join(", "),u.origin=this.Bn,null!==(e=u.focus)&&void 0!==e||(u.focus="keep"),u.failOptions=!1,u.defaultMaybe=!0,u.params=up.Params.merge(u.params,...n.map(o,"params")),u.headers=n.merge(u.headers,...n.map(o,"headers")),this.oi(u.headers,s),u.feedback=n.some(o,"feedback"),u.data=void 0,u.dataMap=n.mapObject(t,(({target:t,element:e,renderOptions:{data:n,keepData:i}})=>[t,i?up.data(e):n])),u.preview=void 0,u.previewMap=n.mapObject(t,(({target:t,renderOptions:{preview:e}})=>[t,e])),u.placeholder=void 0,u.placeholderMap=n.mapObject(t,(({target:t,renderOptions:{placeholder:e}})=>[t,e])),u.disable=t.map((t=>up.fragment.resolveOrigin(t.renderOptions.disable,t))),u.guardEvent=up.event.build("up:form:validate",{fields:r,log:"Validating form",params:u.params,form:this.Bn}),u}oi(t,e){let n=up.protocol.headerize("validate"),i=e.join(" ");(!i||i.length>up.protocol.config.maxHeaderSize)&&(i=":unknown"),t[n]=i}static forElement(t){let e=up.form.get(t);return e.upFormValidator||(e.upFormValidator=new this(e))}}},2587:()=>{const t=up.util,e=/^([^ >+(]+) (.+)$/;up.FragmentFinder=class FragmentFinder{constructor(t){var e;this.sn=t,this.L=t.origin,this.ui=t.selector,this.ai=t.document||window.document,this.ci=null!==(e=t.match)&&void 0!==e?e:up.fragment.config.match,this.hi=t.preferOldElements}find(){return this.li()||this.pi()||this.fi()}li(){if(this.hi)return this.hi.find((t=>this.ai.contains(t)&&up.fragment.matches(t,this.ui)))}pi(){var t;if("region"===this.ci&&!up.fragment.containsMainPseudo(this.ui)&&(null===(t=this.L)||void 0===t?void 0:t.isConnected))return this.di()||this.mi()}di(){return up.fragment.closest(this.L,this.ui,this.sn)}mi(){let n=up.fragment.splitTarget(this.ui);return t.findResult(n,(t=>{let n=t.match(e);if(n){let t=up.fragment.closest(this.L,n[1],this.sn);if(t)return up.fragment.getFirstDescendant(t,n[2])}}))}fi(){return up.fragment.getFirstDescendant(this.ai,this.ui,this.sn)}}},7031:()=>{const t=up.util,e=up.element,n={preventScroll:!0};up.FragmentFocus=class FragmentFocus extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","focusCapsule","inputDevice"])}processPrimitive(e){switch(e){case"keep":return this.gi();case"restore":return this.vi();case"target":case!0:return this.bi(this.fragment);case"layer":return this.bi(this.layer.getFocusElement());case"main":return this.yi(":main");case"hash":return this.wi();case"autofocus":return this._i();default:if(t.isString(e))return this.yi(e)}}processElement(t){return this.bi(t)}resolveCondition(t){return"lost"===t?this.Oi():super.resolveCondition(t)}yi(t){let e=this.findSelector(t);return this.bi(e)}gi(){var t;if(this.Oi())return null===(t=this.focusCapsule)||void 0===t?void 0:t.restore(this.layer,n)}vi(){return up.viewport.restoreFocus({layer:this.layer})}_i(){let t=this.fragment&&e.subtreeFirst(this.fragment,"[autofocus]");if(t)return this.bi(t)}bi(t){if(t)return up.focus(t,Object.assign(Object.assign({force:!0},n),{inputDevice:this.inputDevice})),!0}wi(){let t=up.viewport.firstHashTarget(this.hash,{layer:this.layer});if(t)return this.bi(t)}Oi(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.wasLost()}}},8057:()=>{const t=up.element;up.FragmentPolling=class FragmentPolling{constructor(t){this.sn=up.radio.pollOptions(t),this.rn=t,up.destructor(t,this.ki.bind(this)),up.fragment.onAborted(t,this.Si.bind(this)),this.xi="initialized",this.Ei=!0,this.ji=!1,this.Ci()}static forFragment(t){return t.upPolling||(t.upPolling=new this(t))}onPollAttributeObserved(){this.Fi()}ki(){this.Ti()}Fi(t){if(Object.assign(this.sn,t),"started"!==this.xi){if(!up.fragment.isTargetable(this.rn))return void up.warn("[up-poll]","Cannot poll untargetable fragment %o",this.rn);this.xi="started",this.Pi(),this.Ri()}}Ti(){var t;"started"===this.xi&&(this.Li(),this.xi="stopped",null===(t=this.unbindEvents)||void 0===t||t.call(this))}forceStart(t){Object.assign(this.sn,t),this.forceStarted=!0,this.Fi()}forceStop(){this.Ti(),this.forceStarted=!1}Pi(){this.unbindEvents||(this.unbindEvents=up.on("visibilitychange up:layer:opened up:layer:dismissed up:layer:accepted",this.Ai.bind(this)))}Ai(){this.$i()&&this.Ri()}$i(){return!document.hidden&&("any"===this.sn.ifLayer||this.Di())}Li(){clearTimeout(this.Mi),this.Mi=null}Ri(){this.Mi||this.ji||(this.Li(),this.Mi=setTimeout(this.Ni.bind(this),this.Hi()))}Ni(){this.Mi=null,this.qi()}qi(){"started"===this.xi&&(this.$i()?this.Bi():up.puts("[up-poll]","Will not poll hidden fragment"))}Ui(){var e,n;return null!==(n=null!==(e=this.sn.interval)&&void 0!==e?e:t.numberAttr(this.rn,"up-interval"))&&void 0!==n?n:up.radio.config.pollInterval}Hi(){return Math.max(this.Ui()-this.Ii(),0)}Ii(){return new Date-this.zi}Di(){var t,e;return this.layer||(this.layer=up.layer.get(this.rn)),null===(e=null===(t=this.layer)||void 0===t?void 0:t.isFront)||void 0===e?void 0:e.call(t)}Bi(){this.Li();let t=this.Ei;try{this.Ei=!1,this.ji=!0,up.reload(this.rn,this.Ki()).then(this.Vi.bind(this),this.Xi.bind(this))}finally{this.Ei=t}}Ki(){let t=up.event.build("up:fragment:poll",{log:["Polling fragment",this.rn]});return Object.assign(Object.assign({},this.sn),{guardEvent:t})}Si({newLayer:t}){this.Ei&&!t&&this.Ti()}Vi({fragment:t}){this.ji=!1,this.Ci(),t?this.Wi(t):this.Ri()}Wi(t){this.Ti(),this.forceStarted&&up.fragment.matches(this.rn,t)&&this.constructor.forFragment(t).forceStart(this.sn)}Xi(t){this.ji=!1,this.Ci(),this.Ri(),up.error.throwCritical(t)}Ci(){this.zi=new Date}}},2828:()=>{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)}}},4850:()=>{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"reset":return this.Gi();case"layer":return this.Ji();case"main":return this.Qi(":main");case"restore":return this.Yi();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.Zi(this.fragment);default:if(t.isString(e))return this.Qi(e)}}processElement(t){return this.Zi(t)}Zi(t){if(t)return up.reveal(t,this.attributes()),!0}Qi(t){let e=this.findSelector(t);return this.Zi(e)}Ji(){return this.Zi(this.layer.getBoxElement())}Gi(){return up.viewport.resetScroll(Object.assign(Object.assign({},this.attributes()),{around:this.fragment})),!0}Yi(){return up.viewport.restoreScroll(Object.assign(Object.assign({},this.attributes()),{around:this.fragment}))}}},7956:()=>{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={}){if(super(t),!this.mode)throw"missing { mode } option"}setupHandlers(){up.link.convertClicks(this)}teardownHandlers(){}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.tr)&&void 0!==t?t:this.tr=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.er(t).bind()}off(...t){return this.er(t).unbind()}er(t){return up.EventListenerGroup.fromBindArgs(t,{guard:t=>this.nr(t),elements:[this.element],baseLayer:this})}nr(t){return this.contains(t.target)}wasHitByMouseEvent({clientX:t,clientY:e}){const n=document.elementFromPoint(t,e);return!n||this.contains(n)}ir(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})}emit(...t){return this.ir(t).emit()}isDetached(){return!this.element.isConnected}saveHistory(){this.history&&(this.savedTitle=document.title,this.savedMetaTags=up.history.findMetaTags(),this.savedLocation=up.history.location,this.savedLang=up.history.getLang())}restoreHistory(){this.showsLiveHistory()&&(this.savedLocation&&up.history.push(this.savedLocation),this.savedTitle&&(document.title=this.savedTitle),this.savedMetaTags&&up.history.updateMetaTags(this.savedMetaTags),e.isString(this.savedLang)&&up.history.updateLang(this.savedLang))}asCurrent(t){return this.stack.asCurrent(this,t)}updateHistory(t){var n,i;e.isString(t.location)&&(this.location=t.location),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.metaTags=t.metaTags),e.isString(t.title)&&(this.title=t.title),e.isString(t.lang)&&(this.lang=t.lang)}showsLiveHistory(){return this.history&&this.isFront()}get title(){return this.showsLiveHistory()?document.title:this.savedTitle}set title(t){this.savedTitle=t,this.showsLiveHistory()&&(document.title=t)}get metaTags(){return this.showsLiveHistory()?up.history.findMetaTags():this.savedMetaTags}set metaTags(t){this.savedMetaTags=t,this.showsLiveHistory()&&up.history.updateMetaTags(t)}get lang(){return this.showsLiveHistory()?up.history.getLang():this.savedLang}set lang(t){this.savedLang=t,this.showsLiveHistory()&&up.history.updateLang(t)}get location(){return this.showsLiveHistory()?up.history.location:this.savedLocation}set location(t){(this.location!==(t=e.normalizeURL(t))||this.opening)&&(this.savedLocation=t,this.showsLiveHistory()&&up.history.push(t),this.opening||this.emit("up:layer:location:changed",{location:t}))}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())}}},7101:()=>{var t;up.Layer.Cover=((t=class Cover extends up.Layer.OverlayWithViewport{}).mode="cover",t)},5580:()=>{var t;up.Layer.Drawer=((t=class Drawer extends up.Layer.OverlayWithViewport{}).mode="drawer",t)},86:()=>{var t;up.Layer.Modal=((t=class Modal extends up.Layer.OverlayWithViewport{}).mode="modal",t)},7403:function(){var t,e=this&&this.U||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.rr());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("-")}rr(){const{parent:t}=this;return this.mode===t.mode?1+t.rr():0}setupHandlers(){var t,e;super.setupHandlers(),this.overlayFocus=new up.OverlayFocus(this),this.sr("button")&&this.createDismissElement(this.getBoxElement()),this.sr("outside")&&(this.viewportElement?up.on(this.viewportElement,"up:click",(t=>{t.target===this.viewportElement&&this.ur(t,!0)})):this.unbindParentClicked=this.parent.on("up:click",((t,e)=>{if(!up.layer.isWithinForeignOverlay(e)){const n=this.origin&&this.origin.contains(e);this.ur(t,n)}}))),this.sr("key")&&(this.unbindEscapePressed=up.event.onEscape((t=>this.onEscapePressed(t)))),this.registerClickCloser("up-accept",((t,e)=>{this.accept(t,e)})),this.registerClickCloser("up-dismiss",((t,e)=>{this.dismiss(t,e)})),null===(e=(t=up.migrate).registerLayerCloser)||void 0===e||e.call(t,this),this.ar(this.acceptEvent,this.accept),this.ar(this.dismissEvent,this.dismiss),this.on("up:click","label[for]",((t,e)=>this.cr(t,e)))}cr(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()}}ur(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.sr("key")&&(up.event.halt(t,{log:!0}),up.error.muteUncriticalSync((()=>this.dismiss(":key"))))}}registerClickCloser(t,e){let i=`[${t}]`;this.on("up:click",i,(function(r){up.event.halt(r,{log:!0});const s=r.target.closest(i),o=n.jsonAttr(s,t),u={origin:s},a=new up.OptionsParser(s,u);a.booleanOrString("animation"),a.string("easing"),a.number("duration"),a.string("confirm"),up.error.muteUncriticalSync((()=>e(o,u)))}))}ar(t,e){if(t)return this.on(t,(t=>{t.preventDefault(),up.error.muteUncriticalSync((()=>e.call(this,t,{response:t.response})))}))}tryAcceptForLocation(t){this.hr(this.acceptLocation,this.accept,t)}tryDismissForLocation(t){this.hr(this.dismissLocation,this.dismiss,t)}hr(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.unbindParentClicked)||void 0===t||t.call(this),null===(e=this.unbindEscapePressed)||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(){}lr(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.lr({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.lr({boxAnimation:n,backdropAnimation:"fade-out",easing:t.easing||this.closeEasing,duration:t.duration||this.closeDuration})}accept(t=null,e={}){return this.pr("accept",t,e)}dismiss(t=null,e={}){return this.pr("dismiss",t,e)}sr(t){return i.contains(this.dismissable,t)}pr(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)},6412:()=>{up.Layer.OverlayWithTether=class OverlayWithTether extends up.Layer.Overlay{createElements(){this.origin||up.fail("Missing { origin } option"),this.dr=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.dr.parent),this.createContentElement(this.element)}onContentSet(){this.dr.start(this.element)}onElementsRemoved(){this.dr.stop()}sync(){this.isOpen()&&(this.isDetached()||this.dr.isDetached()?this.dismiss(":detached",{animation:!1,preventable:!1}):this.dr.sync())}}},7965:()=>{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)}}},4552:()=>{var t;up.Layer.Popup=((t=class Popup extends up.Layer.OverlayWithTether{}).mode="popup",t)},7771:()=>{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.mr()}dismiss(){this.mr()}mr(){up.fail("Cannot close the root layer")}toString(){return"root layer"}}).mode="root",t)},6066:()=>{var t;const e=up.util,n=up.element;up.LayerLookup=(t=class LayerLookup{constructor(t,n){this.i=t,!1!==n.normalizeLayerOptions&&up.layer.normalizeOptions(n),this.sn=n,this.gr=e.getSimpleTokens(n.layer)}all(){let t=e.flatMap(this.gr,(t=>this.vr(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()}br(t){return t=n.get(t),e.find(this.i.reversed(),(e=>e.contains(t)))}yr(t){return this.i.at(t)}vr(t){if(t instanceof up.Layer)return t;if(e.isNumber(t))return this.yr(t);if(/^\d+$/.test(t))return this.yr(Number(t));if(e.isElementLike(t))return this.br(t);switch(t){case"any":return[this.wr(),...this.i.reversed()];case"current":return this.wr();case"closest":return this.i.selfAndAncestorsOf(this.wr());case"parent":return this.wr().parent;case"ancestor":case"ancestors":return this.wr().ancestors;case"child":return this.wr().child;case"descendant":case"descendants":return this.wr().descendants;case"subtree":return this.wr().subtree;case"new":return"new";case"root":return this.i.root;case"overlay":case"overlays":return e.reverse(this.i.overlays);case"front":return this.i.front;case"origin":return this._r();default:return up.fail("Unknown { layer } option: %o",t)}}_r(){let{origin:t,originLayer:e}=this.sn;return e||(t?this.br(t):void 0)}wr(){let{baseLayer:t}=this.sn;if(e.isString(t)){const e=Object.assign(Object.assign({},this.sn),{baseLayer:this.i.current,normalizeLayerOptions:!1,layer:t});return this.constructor.all(this.i,e)[0]}return t||this._r()||this.i.current}},e.memoizeMethod(t.prototype,{wr:!0,_r:!0}),t)},6387:()=>{const t=up.util;up.LayerStack=class LayerStack{constructor(){this.Or=[],this.layers=[this.kr()]}kr(){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.Or=[],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.Or.push(t),e()}finally{this.Or.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.Or)||this.front}get front(){return t.last(this.layers)}}},3698:()=>{const t=up.util;up.LinkCurrentURLs=class LinkCurrentURLs{constructor(e){if(this.Sr=up.link.isSafe(e),this.Sr){const n=e.getAttribute("href");n&&"#"!==n&&(this.Er=t.matchableURL(n));const i=e.getAttribute("up-href");i&&(this.jr=t.matchableURL(i));const r=e.getAttribute("up-alias");r&&(this.Cr=new up.URLPattern(r))}}isCurrent(t){var e,n;return!(!t||this.Er!==t&&this.jr!==t&&!(null===(n=null===(e=this.Cr)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1)))}}},2460:()=>{const t=up.util,e=up.element;up.LinkFollowIntent=class LinkFollowIntent{constructor(t,e){this.Fr=t,this.gn=e,this.Tr=null,this.Pr("mouseenter mousedown touchstart",(t=>this.Rr(t))),this.Pr("mouseleave",(()=>this.Lr())),up.fragment.onAborted(this.Fr,(()=>this.Lr()))}Pr(t,e){up.on(this.Fr,t,{passive:!0},e)}Rr(e){if(up.link.shouldFollowEvent(e,this.Fr))if(this.Lr(),"mouseenter"===e.type){let n=this.Ar();this.$r=t.timer(n,(()=>this.An(e)))}else this.An(e)}Lr(){var t;clearTimeout(this.$r),(null===(t=this.Tr)||void 0===t?void 0:t.background)&&this.Tr.abort(),this.Tr=null}Ar(){var t;return null!==(t=e.numberAttr(this.Fr,"up-preload-delay"))&&void 0!==t?t:up.link.config.preloadDelay}An(t){up.log.putsEvent(t),this.gn({onRequestKnown:t=>this.Tr=t})}}},1653:()=>{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){}}}},7792:function(){var t=this&&this.U||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.Dr=`up-${t}`,this.ui=`.${this.Dr}`,this.finishEvent=`up:${t}:finish`,this.finishCount=0,this.Mr=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.Nr(t);let e=this.Hr(t,s);return e=e.then((()=>this.qr(t))),e}}finish(t){var e,n;if(this.finishCount++,0!==this.Mr&&up.motion.isEnabled()){t=this.Br(t);for(let e of t)this.Ur(e);return null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.motion.finish()")}}Br(t){return t?e.flatMap(t,(t=>n.list(t.closest(this.ui),t.querySelectorAll(this.ui)))):document.querySelectorAll(this.ui)}isActive(t){return t.classList.contains(this.Dr)}Ur(t){this.Ir(t)}Ir(t,e={}){return e=Object.assign({target:t,log:!1},e),up.emit(this.finishEvent,e)}Nr(t){this.Mr++,this.zr(t,!0)}qr(t){this.Mr--,this.zr(t,!1)}zr(t,e){for(let n of t)n.classList.toggle(this.Dr,e)}Hr(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.Ir(n,{forwarded:!0})}));return e().then(n)}reset(){return t(this,void 0,void 0,(function*(){yield this.finish(),this.finishCount=0,this.Mr=0}))}}},4308:()=>{const t=up.util,e=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.Kr(e,this,t,i)}}return new Function(...t,e)}toString(){return`nonce-${this.nonce} ${this.script}`}Kr(t,n,i,r){let s,o=`\n try {\n up.noncedEval.value = (function(${i.join()}) {\n ${t}\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=e.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()}}Vr(e){return this.nonce&&t.contains(e,this.nonce)}static adoptNonces(n,i){if(!(null==i?void 0:i.length))return;const r=t.memoize(up.protocol.cspNonce);t.each(up.script.config.nonceableAttributes,(s=>{let o=e.subtree(n,`[${s}^="nonce-"]`);t.each(o,(t=>{let e=t.getAttribute(s),n=this.fromString(e),o=(t,...n)=>up.log.warn("up.render()",`Cannot use callback [${s}="${e}"]: ${t}`,...n);if(!n.Vr(i))return o("Callback's CSP nonce (%o) does not match response header (%o)",n.nonce,i);let u=r();if(!u)return o("Current page's CSP nonce is unknown");n.nonce=u,t.setAttribute(s,n.toString())}))}))}}},1104:()=>{const t=up.util,e=up.element;up.OptionsParser=class OptionsParser{constructor(t,e,n={}){this.sn=e,this.I=t,this.Xr=n,this.Wr=n.fail,this.Gr=n.closest,this.Jr=n.attrPrefix||"up-",this.Qr=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.Yr(n));let u=this.sn[n];for(let t of o)null!=u||(u=this.Zr(e,this.I,t));null!=u||(u=null!==(s=i.default)&&void 0!==s?s:this.Qr[n]);let a,c=i.normalize;if(c&&(u=c(u)),t.isDefined(u)&&(this.sn[n]=u),this.Wr&&(a=up.fragment.failKey(n))){const n=t.compact(t.map(o,(t=>this.ts(t))));this.parse(e,a,Object.assign(Object.assign({},i),{attr:n}))}}include(t){let e=t(this.I,this.sn,this.Xr);Object.assign(this.sn,e)}Zr(t,n,i){return this.Gr?e.closestAttr(n,i,t):t(n,i)}ts(t){return this.es(t,this.Jr+"on-")||this.es(t,this.Jr)}es(t,e){if(t.startsWith(e))return`${e}fail-${t.substring(e.length)}`}Yr(e){return`${this.Jr}${t.camelToKebabCase(e)}`}}},8665:()=>{const t=up.element,e=up.util;up.OverlayFocus=class OverlayFocus{constructor(t){this.R=t,this.bi=this.R.getFocusElement(),this.ns=this.R.trapFocus}moveToFront(){this.rs||(this.rs=!0,this.ss=t.setAttrsTemp(this.bi,{tabindex:"0",role:"dialog","aria-modal":this.ns.toString()}),this.ns&&(this.os=up.on("focusin",(t=>this.us(t))),this.cs=t.affix(this.bi,"beforebegin","up-focus-trap[tabindex=0]"),this.hs=t.affix(this.bi,"afterend","up-focus-trap[tabindex=0]")))}moveToBack(){this.teardown()}teardown(){this.rs&&(this.rs=!1,this.ss(),this.ns&&(this.os(),this.cs.remove(),this.hs.remove()))}us(t){const{target:e}=t;this.ls||up.layer.isWithinForeignOverlay(e)||(this.ls=!0,e===this.cs?this.ps():e!==this.hs&&this.R.contains(e)||this.fs(),this.ls=!1)}fs(t){up.focus(this.bi,t)}ps(){this.ds(this.R.getBoxElement())||this.fs()}ds(t){for(let n of e.reverse(t.children))if(up.viewport.tryFocus(n)||this.ds(n))return!0}}},3645:()=>{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.gs(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(){let e=t.map(this.entries,this.vs.bind(this));return e=t.compact(e),e.join("&")}vs(e){const{value:n}=e;if(this.bs(n))return;let i=encodeURIComponent(e.name);return t.isGiven(n)&&(i+="=",i+=encodeURIComponent(n)),i}bs(t){return t instanceof Blob}hasBinaryValues(){const e=t.map(this.entries,"value");return t.some(e,this.bs)}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.ys(e):t.isFormData(e)?this.ws(e):t.isObject(e)?this._s(e):up.fail("Unsupport params type: %o",e))}_s(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)}}ys(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)}}ws(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.Os(e))}Os(t){return e=>e.name===t}get(t){return this.gs(t)?this.getAll(t):this.getFirst(t)}getFirst(e){const n=t.find(this.entries,this.Os(e));return null==n?void 0:n.value}getAll(e){if(this.gs(e))return this.getAll(e);{const n=t.map(this.entries,this.Os(e));return t.map(n,"value")}}gs(t){return t.endsWith("[]")}[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(...t){return t.reduce((function(t,e){return t.addAll(e),t}),new up.Params)}}},8397:()=>{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.o=i}undo(...t){this.ended?reportError(new up.Error("Preview used after end of request")):this.o.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.o.clean()}setAttrs(...t){let[n,i]=this.ks(t,"val","val");this.undo(e.setAttrsTemp(n,i))}addClass(...t){let[n,i]=this.ks(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.ks(t,"val","val");this.undo(e.removeClassTemp(n,i))}setStyle(...t){let[n,i]=this.ks(t,"val","val");this.undo(e.setStyleTemp(n,i))}disable(...t){let[e]=this.ks(t,"val");this.undo(up.form.disable(e))}insert(...e){let[n,i="beforeend",r]=this.ks(e,"val",t.isAdjacentPosition,"val");this.undo(up.fragment.insertTemp(n,i,r))}show(...t){let[n]=this.ks(t,"val");this.undo(e.showTemp(n))}hide(...t){let[n]=this.ks(t,"val");this.undo(e.hideTemp(n))}hideContent(...t){let[n]=this.ks(t,"val"),i=e.wrapChildren(n);e.hide(i),this.undo((()=>e.unwrap(i)))}showPlaceholder(...t){let[e,n]=this.ks(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.ks(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}ks(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]}}},7782:()=>{const t=up.element;up.ProgressBar=class ProgressBar{constructor(){this.Ss=0,this.I=t.affix(document.body,"up-progress-bar"),this.I.style.transition="width 300ms ease-out",this.xs(0),t.paint(this.I),this.Es=31,this.js()}js(){let t;t=this.Es<80?Math.random()<.15?7+5*Math.random():1.5+.5*Math.random():.13*(100-this.Es)*Math.random(),this.xs(this.Es+t),this.Ss++;const e=300+40*this.Ss;this.timeout=setTimeout(this.js.bind(this),e)}xs(t){this.Es=t,this.I.style.width=`${t}vw`}destroy(){clearTimeout(this.timeout),this.I.remove()}conclude(){clearTimeout(this.timeout),this.xs(100),setTimeout(this.destroy.bind(this),300)}}},2406:()=>{const t=up.util;up.Record=class Record{keys(){throw"Return an array of keys"}defaults(t){return{}}constructor(t){Object.assign(this,this.defaults(t),this.attributes(t))}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())}}},1279:()=>{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())}}},2714:function(){var t,e=this&&this.U||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.options=t}execute(){return this.Cs=this.Fs(),this}Fs(){return e(this,void 0,void 0,(function*(){try{this.Ts(),this.options=up.RenderOptions.preprocess(this.options),up.browser.assertConfirmed(this.options),up.RenderOptions.assertContentGiven(this.options);let t=yield this.Ps().execute();return this.Rs(t),t}catch(t){throw this.Rs(t)||this.Ls(t),t}}))}Rs(t){if(t instanceof up.RenderResult){let{onRendered:e,onFinished:i}=t.options;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}}Ls(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.options).onError)||void 0===n?void 0:n.call(e,t)}))}get finished(){return this.As()}As(){return e(this,void 0,void 0,(function*(){try{let t=yield this.Cs;return yield t.finished}catch(t){throw t instanceof up.RenderResult?yield t.finished:t}}))}Ps(){let t=n.memoize((t=>this.$s(t))),e=Object.assign(Object.assign({},this.options),{handleAbort:t});return e.url?new up.Change.FromURL(e):e.response?new up.Change.FromResponse(e):new up.Change.FromContent(e)}Ts(){let t=n.pluckKey(this.options,"guardEvent");if(t&&(t.renderOptions=this.options,up.emit(t,{target:this.options.origin}).defaultPrevented))throw new up.Aborted(`Rendering was prevented by ${t.type} listener`)}$s(t){let{abort:e}=this.options;if(!e||!up.network.isBusy())return;let{bindFragments:i,bindLayer:r,origin:s,layer:o}=this.Ps().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,"_rendered"),n.memoizeMethod(t.prototype,{As:!0,Ps:!0}),t)},2705:()=>{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=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({},n.defaults),t.pick(n,e)),i),{failPrefixForced:!0}):Object.assign(Object.assign({},n),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}}}()},606:function(){var t=this&&this.U||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","options","finished"]}defaults(){return{fragments:[]}}get none(){return!this.fragments.length}get fragment(){return this.fragments[0]}static both(t,e,n=!0){return e?new this({target:t.target,layer:t.layer,options:t.options,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)}))}static buildNone(){return new this({target:":none",finished:Promise.resolve()})}}},5437:()=>{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","builtAt","wrapMethod","contentType","payload","onLoading","fail","abortable","lateDelay","previews"]}defaults(){return{state:"new",abortable:!0,headers:{},timeout:up.network.config.timeout,builtAt:new Date,previews:[]}}constructor(t){var n,i;if(super(t),this.params=new up.Params(this.params),null==this.wrapMethod&&(this.wrapMethod=up.network.config.wrapMethod),this.Ds(),(this.target||this.layer||this.origin)&&!t.basic){const t={origin:this.origin};this.layer=up.layer.get(this.layer,t),this.failLayer=up.layer.get(this.failLayer,t),this.context||(this.context=this.layer.context||{}),this.failContext||(this.failContext=(null===(n=this.failLayer)||void 0===n?void 0:n.context)||{}),this.mode||(this.mode=this.layer.mode),this.failMode||(this.failMode=null===(i=this.failLayer)||void 0===i?void 0:i.mode)}this.bindLayer=t.bindLayer||this.layer,this.Ms=t.fragments,this.Ns=t.bindFragments,this.Be=e.newDeferred(),this.Hs()}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.qs)&&void 0!==t?t:this.qs=new XMLHttpRequest}get fragments(){return this.Ms||(this.Ms=this.Bs())}Bs(){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.Ns||this.fragments}get fragment(){var t;return null===(t=this.fragments)||void 0===t?void 0:t[0]}Ds(){this.method=e.normalizeMethod(this.method),this.Us(),this.Is(),this.url=e.normalizeURL(this.url)}zs(){e.task((()=>{this.layer=void 0,this.failLayer=void 0,this.Ks=void 0,this.origin=void 0,this.Ms=void 0,this.Ns=void 0}))}Us(){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]}Is(){!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.zs()))}load(){var t;if("new"===this.state)return this.Vs()?(this.state="loading",this.Ds(),null===(t=this.onLoading)||void 0===t||t.call(this),this.expired=!1,new up.Request.XHRRenderer(this).buildAndSend({onload:()=>this.Xs(),onerror:()=>this.Ws(),ontimeout:()=>this.Gs(),onabort:()=>this.Js()}),!0):void this.abort({reason:"Prevented by event listener"})}runPreviews(t){this.ended||this.fromCache||(this.Qs=up.status.runPreviews(this,t))}Vs(){return!this.emit("up:request:load",{log:["Loading %s",this.description]}).defaultPrevented}loadPage(){up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()}Xs(){const t=this.Ys(),e="Loaded "+t.description;this.emit("up:request:loaded",{request:t.request,response:t,log:e}),this.respondWith(t)}Ws(){this.Zs("Network error")}Gs(){this.Zs("Timeout")}Js(){this.eo()}abort({reason:t}={}){this.eo(t)&&this.qs&&this.qs.abort()}eo(t){if(this.ended)return;let e="Aborted request to "+this.description+(t?": "+t:"");return this.state="aborted",this.no(new up.Aborted(e)),this.emit("up:request:aborted",{log:e}),!0}Zs(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.no(new up.Offline(e))}respondWith(t){this.response=t,this.ended||(this.state="loaded",t.ok?this.io(t):this.no(t))}io(t){this.ro(),this.Be.resolve(t)}no(t){this.ro(),this.Be.reject(t)}ro(){var t;null===(t=this.Qs)||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)}Ys(){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),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)}ir(t){return up.EventEmitter.fromEmitArgs(t,{layer:this.bindLayer,request:this,origin:this.origin})}emit(...t){return this.ir(t).emit()}assertEmitted(...t){this.ir(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]}Hs(){for(let t of["target","failTarget","mode","failMode","context","failContext"])this.so(t);let t,e;(t=this.csrfHeader())&&(e=this.csrfToken())&&this.oo(t,e),this.oo(up.protocol.headerize("version"),up.version)}so(t){this.oo(up.protocol.headerize(t),this[t])}oo(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.so("target"),this.Ms=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,"_deferred"),t)},7974:function(){var t=this&&this.U||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.uo={},this.ao=[]}get(t){t=this.co(t);let e=this.ho(t),n=e.matchBest(t);if(n){if(this.lo(n))return n;this.po(t,e)}}put(e){return t(this,void 0,void 0,(function*(){e=this.co(e);let t=this.ho(e),{response:n}=e;n&&t.updateVary(n);let i=t.requests.filter((n=>t.satisfies(e,n)));for(let t of i)this.po(t);e.cacheRoute=t,t.put(e),this.ao.push(e),this.fo()}))}alias(t,e){if(t=this.get(t))return e=this.co(e),this.track(t,e,{force:!0}),this.put(e),e}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.no(t))}))}willHaveSameResponse(t,e){return t===e||t===e.trackedRequest}evict(t=!0,e){this.do(t,e,(t=>this.po(t)))}expire(t=!0,e){this.do(t,e,(t=>t.expired=!0))}reindex(t){this.po(t),delete t.cacheRoute,this.put(t)}po(t){var n;e.remove(this.ao,t),null===(n=t.cacheRoute)||void 0===n||n.delete(t)}ho(t){var e,n;return t.cacheRoute||(e=this.uo)[n=t.description]||(e[n]=new Route)}lo(t){return t.age<up.network.config.cacheEvictAge}get mo(){return this.ao.length}get Dn(){return up.network.config.cacheSize}fo(){for(let t=0;t<this.mo-this.Dn;t++)this.po(this.ao[0])}do(t=!0,n,i){let r=up.Request.tester(t,n),s=e.filter(this.ao,r);e.each(s,i)}co(t){return e.wrapValue(up.Request,t)}}},5221:()=>{const t=up.util,e=up.element,n=["GET","POST"];up.Request.FormRenderer=class FormRenderer{constructor(t){this.kt=t}buildAndSubmit(){this.params=t.copy(this.kt.params);let i=this.kt.url,{method:r}=this.kt;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.Bn=e.affix(document.body,"form.up-request-loader",{method:r,action:i});let o,u,a=this.kt.contentType;a&&this.Bn.setAttribute("enctype",a),(o=this.kt.csrfParam())&&(u=this.kt.csrfToken())&&this.params.add(o,u),t.each(this.params.toArray(),this.vo.bind(this)),up.browser.submitForm(this.Bn)}vo(t){e.affix(this.Bn,"input[type=hidden]",t)}}},6413:()=>{const t=up.util;up.Request.Queue=class Queue{constructor(){this.reset()}reset(){this.bo=[],this.yo=[],this.wo=!1}get allRequests(){return this.yo.concat(this.bo)}asap(e){e.runQueuedCallbacks(),t.always(e,(t=>this.Lt(e,t))),this._o(e),this.Oo(e),queueMicrotask((()=>this.ko()))}promoteToForeground(t){t.background&&(t.background=!1,this._o(t))}_o(e){if(!e.isTimed())return;let n=Math.max(e.effectiveLateTime-e.age);t.timer(n,(()=>this.So()))}xo(){return t.evalOption(up.network.config.concurrency)}Eo(){const t=this.xo();return-1===t||this.yo.length<t}isBusy(){return this.yo.length>0||this.bo.length>0}Oo(t){this.bo.push(t)}jo(){let e=t.find(this.bo,(t=>!t.background));return e||(e=this.bo[0]),t.remove(this.bo,e)}Co(t){t.load()&&this.yo.push(t)}Lt(e,n){t.remove(this.yo,e)||t.remove(this.bo,e),n instanceof up.Response&&n.ok&&up.network.registerAliasForRedirect(e,n),queueMicrotask((()=>this.ko())),t.task((()=>this.Fo()))}ko(){let t;if(this.Eo()&&(t=this.jo()))return this.Co(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.yo,this.bo]){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)}}So(){!this.wo&&this.To()&&(this.wo=!0,up.emit("up:network:late",{log:"Server is slow to respond"}))}Fo(){this.wo&&!this.Po.length&&(this.wo=!1,up.emit("up:network:recover",{log:"Slow requests were loaded"}))}get Po(){return this.allRequests.filter((t=>t.isTimed()))}To(){return t.some(this.Po,(t=>t.age>=t.effectiveLateTime-1))}}},2298:()=>{var t;const e="multipart/form-data",n=up.util;up.Request.XHRRenderer=(t=class XHRRenderer{constructor(t){this.kt=t}buildAndSend(t){const e=this.kt.xhr;this.Ro=n.copy(this.kt.params),this.kt.timeout&&(e.timeout=this.kt.timeout),e.open(this.Lo(),this.kt.url);let i=this.Ao();i&&e.setRequestHeader("Content-Type",i);for(let t in this.kt.headers){let n=this.kt.headers[t];e.setRequestHeader(t,n)}Object.assign(e,t),e.send(this.$o())}Lo(){let t=this.kt.method;return this.kt.wrapMethod&&!this.kt.will302RedirectWithGET()&&(t=up.protocol.wrapMethod(t,this.Ro)),t}Ao(){return this.Do(),this.Mo}$o(){return this.Do(),this.No}Do(){this.No=this.kt.payload,this.Mo=this.kt.contentType,!this.No&&this.kt.allowsPayload()&&(this.Mo||(this.Mo=this.Ro.hasBinaryValues()?e:"application/x-www-form-urlencoded"),this.Mo===e?(this.Mo=null,this.No=this.Ro.toFormData()):this.No=this.Ro.toQuery().replace(/%20/g,"+"))}},n.memoizeMethod(t.prototype,{Do:!0,Lo:!0}),t)},4517:()=>{const t=up.util;up.Response=class Response extends up.Record{keys(){return["method","url","text","status","request","xhr","target","title","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 cspNonces(){return up.protocol.cspNoncesFromHeader(this.header("Content-Security-Policy")||this.header("Content-Security-Policy-Report-Only"))}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}`}}},7241:()=>{var t;const e=up.util,n=up.element,i=/^\s*<(html|!DOCTYPE)\b/i;up.ResponseDoc=(t=class ResponseDoc{constructor({document:t,fragment:e,content:n,target:i,origin:r,data:s,cspNonces:o,match:u}){if(t?this.Ho(t,r,s):e?this.qo(e,r,s):this.Bo(n||"",r,i,s),this.Uo=o,r){let t=up.fragment.tryToTarget(r);t&&(this.Io=this.select(t))}this.ci=u}Ho(t,r,s){if(t instanceof Document)this.ai=t,this.zo=!0;else if(e.isString(t)){this.zo=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.ai=o[0]:this.ai=this.Ko(o)}else this.ai=this.Ko(t)}Vo(t){return n.createBrokenDocumentFromHTML(t)}qo(t,e,i){let r=n.extractSingular(up.fragment.provideNodes(t,{origin:e,data:i}));this.ai=this.Ko(r)}Bo(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.ai=this.Ko(a)}Ko(t){t=e.wrapList(t);let n=document.createElement("up-document");return n.append(...t),n}rootSelector(){return up.fragment.toTarget(this.ai.children[0])}get title(){return this.Xo(this.Wo)}Go(){if(this.zo)return this.ai.head}Xo(t){let e=this.Go();return e&&t(e)}get metaTags(){return this.Xo(up.history.findMetaTags)}get assets(){return this.Xo(up.script.findAssets)}get lang(){if(this.zo)return up.history.getLang(this.ai)}Wo(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.Io,document:this.ai,match:this.ci}).find()}selectSteps(t){return t.filter((t=>this.Jo(t)||this.Qo(t)))}commitSteps(t){return t.filter((t=>this.commitElement(t.newElement)))}Jo(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)}Qo(t){if(!t.maybe)throw new up.CannotMatch}commitElement(t){if(this.ai.contains(t))return up.fragment.config.runScripts||up.script.disableSubtree(t),t.remove(),!0}finalizeElement(t){if(up.NonceableCallback.adoptNonces(t,this.Uo),this.ai instanceof Document){let i=n.subtree(t,":is(noscript,script,audio,video):not(.up-keeping, .up-keeping *)");e.each(i,n.fixParserDamage)}}},e.memoizeMethod(t.prototype,{Go:!0}),t)},2723:()=>{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.I=e,this.Yo=t.get(n.viewport)||up.viewport.get(this.I),this.Zo=up.layer.get(this.Yo),this.tu=null!==(r=null!==(i=n.scrollBehavior)&&void 0!==i?i:n.behavior)&&void 0!==r?r:"instant";const f=up.viewport.config;this.eu=null!==(o=null!==(s=n.snap)&&void 0!==s?s:n.revealSnap)&&void 0!==o?o:f.revealSnap,this.nu=null!==(a=null!==(u=n.padding)&&void 0!==u?u:n.revealPadding)&&void 0!==a?a:f.revealPadding,this.iu=null!==(h=null!==(c=n.top)&&void 0!==c?c:n.revealTop)&&void 0!==h?h:f.revealTop,this.ru=null!==(p=null!==(l=n.max)&&void 0!==l?l:n.revealMax)&&void 0!==p?p:f.revealMax,this.su=f.selector("fixedTopSelectors"),this.ou=f.selector("fixedBottomSelectors")}start(){const t=this.uu(this.Yo),n=up.Rect.fromElement(this.I);if(this.ru){const t=e.evalOption(this.ru,this.I);n.height=Math.min(n.height,t)}n.grow(this.nu),this.au(t),t.height<0&&up.fail("Viewport has no visible area");const i=this.Yo.scrollTop;let r=i;this.iu||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.eu)&&r<this.eu&&n.top<.5*t.height&&(r=0),r!==i&&this.Yo.scrollTo({top:r,behavior:this.tu})}uu(){return up.viewport.isRoot(this.Yo)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.Yo)}cu(n){let i=up.fragment.all(n,{layer:this.Zo});return e.filter(i,t.isVisible)}au(t){for(let e of this.cu(this.su)){let n=up.Rect.fromElement(e).bottom-t.top;n>0&&(t.top+=n,t.height-=n)}for(let e of this.cu(this.ou)){let n=up.Rect.fromElement(e),i=t.bottom-n.top;i>0&&(t.height-=i)}}}},8720:()=>{const t=up.util,e=up.element;up.Selector=class Selector{constructor(e,n,i={}){var r;this.hu=[];let s,o=n&&!document.contains(n);if(o||i.destroying||this.hu.push(up.fragment.isNotDestroying),this.lu=o||"any"===i.layer||1===up.layer.count,this.lu)s=up.layer.root;else{if(null!==(r=i.layer)&&void 0!==r||(i.layer=t.presence(n,t.isElement)),this.nt=up.layer.getAll(i),!this.nt.length)throw new up.CannotMatch(["Unknown layer: %o",i.layer]);this.hu.push((e=>t.some(this.nt,(t=>t.contains(e))))),s=this.nt[0]}this.pu=up.fragment.expandTargets(e,Object.assign(Object.assign({},i),{layer:s})),this.fu=this.pu.join()||"match-none"}matches(t){return e.elementLikeMatches(t,this.fu)&&this.du(t)}closest(t){return this.mu(t.closest(this.fu))}descendants(t=document){return this.gu(t.querySelectorAll(this.fu))}firstDescendant(n){return this.lu?(n||(n=document),this.vu((t=>n.querySelectorAll(t)))):t.findResult(this.nt,(t=>this.vu((n=>e.subtree(t.element,n)))))}subtree(t){return this.gu(e.subtree(t,this.fu))}vu(e){return t.findResult(this.pu,(t=>this.gu(e(t))[0]))}du(e){return e&&t.every(this.hu,(t=>t(e)))}mu(e){return t.presence(e,this.du.bind(this))}gu(e){return t.filter(e,this.du.bind(this))}}},7885:()=>{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.bu=t.anchor,this.yu=t.align,this.wu=t.position,this._u="top"===this.wu||"bottom"===this.wu?"horizontal":"vertical",this.Yo=up.viewport.get(this.bu),this.parent=this.Yo===e.root?document.body:this.Yo,this.Ou=!this.Yo.contains(this.bu.offsetParent)}start(t){this.I=t,this.I.style.position="absolute",this.ku(0,0),this.sync(),this.Su("on")}stop(){this.Su("off")}Su(t){let e=this.xu.bind(this);up[t](window,"resize",e),this.Ou&&up[t](this.Yo,"scroll",e)}xu(){return clearTimeout(this.syncTimer),this.syncTimer=t.task(this.sync.bind(this))}isDetached(){return!this.parent.isConnected||!this.bu.isConnected}sync(){const n=this.I.getBoundingClientRect(),i=e.styleNumber(this.I,"margin-top"),r=e.styleNumber(this.I,"margin-right"),s=e.styleNumber(this.I,"margin-bottom"),o=e.styleNumber(this.I,"margin-left"),u=this.bu.getBoundingClientRect();let a,c;switch(this._u){case"horizontal":switch(this.wu){case"top":c=u.top-s-n.height;break;case"bottom":c=u.top+u.height+i}switch(this.yu){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.yu){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.wu){case"left":a=u.left-r-n.width;break;case"right":a=u.left+u.width+o}}t.isDefined(a)||t.isDefined(c)?this.xs(a,c):up.fail("Invalid tether constraints: %o",this.Eu())}Eu(){return{position:this.wu,align:this.yu}}xs(t,e){const n=this.I.getBoundingClientRect();this.ku(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)}ku(t,n){this.offsetLeft=t,this.offsetTop=n,e.setStyle(this.I,{left:t,top:n},"px")}}},4818:()=>{const t=up.util;up.URLPattern=class URLPattern{constructor(e){this.ju=[];const n=[],i=[];for(let r of t.getSimpleTokens(e))"-"===r[0]?i.push(r.substring(1)):n.push(r);this.Cu=this.Fu(n,!0),this.Tu=this.Fu(i,!1)}Fu(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.ju.push({name:i,cast:Number}),"(\\d+)"):(n&&this.ju.push({name:i,cast:String}),"([^/?#]+)"))),new RegExp("^(?:"+i+")$")}test(e,n=!0){return n&&(e=t.matchableURL(e)),this.Cu.test(e)&&!this.Pu(e)}recognize(e,n=!0){n&&(e=t.matchableURL(e));let i=this.Cu.exec(e);if(i&&!this.Pu(e)){const t={};return this.ju.forEach(((e,n)=>{let r=i[n+1];if(r)return t[e.name]=e.cast(r)})),t}}Pu(t){var e;return null===(e=this.Tu)||void 0===e?void 0:e.test(t)}}},9675:(t,e,n)=>{n(5941),up.element=function(){const t=up.util;function e(...e){let[n=document,i]=t.args(e,"val","val");return n.querySelector(i)}function n(t,e){const n=[];return i(t,e)&&n.push(t),n.push(...t.querySelectorAll(e)),n}function i(e,n){return t.isElement(e)&&e.matches(n)}function r(...n){const i=n.pop();return t.isElement(i)?i:t.isString(i)?e(...n,i):t.isList(i)?(i.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",i),i[0]):i}function s(...e){return t.flatMap(e,o)}function o(e){return t.isString(e)?document.querySelectorAll(e):t.wrapList(e)}function u(e,n){return n===M(e)?t.noop:(a(e,n),()=>a(e,!n))}function a(t,e){e?(t.removeAttribute("hidden"),"none"===t.style.display&&(t.style.display="")):t.setAttribute("hidden","")}function c(e,n){for(let i in n){const r=n[i];t.isGiven(r)?e.setAttribute(i,r):e.removeAttribute(i)}}function h(t,e){t.parentNode.insertBefore(e,t)}function l(e,n={}){let i,r,s,{includePath:o}=f(e);for(let t of o){let{tagName:e}=t;e&&"*"!==e||(e="div"),r=document.createElement(e),i||(i=r),p(r,t),null==s||s.appendChild(r),s=r}for(let e in n){let r=n[e];"class"===e?F(i,t.wrapList(r)):"style"===e?$(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 p(t,{id:e,classNames:n,attributes:i}){e&&(t.id=e);for(let[e,n]of Object.entries(i))t.setAttribute(e,n);F(t,n)}function f(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 d=["HTML","BODY","HEAD","TITLE"],m=up.mockable((t=>t.matches(d.join())));function g(e,n){return t.isGiven(n)?`[${e}="${n=n.replace(/"/g,'\\"')}"]`:`[${e}]`}function v(t){return b(y(t))}function b(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 y(t){t=t.trim();const e=document.createRange();return e.setStart(document.body,0),e.createContextualFragment(t).childNodes}function w(t){t.offsetHeight}function _(e,n,i){t.isMissing(e.getAttribute(n))&&e.setAttribute(n,i)}function O(e){const n=document.createElement("up-wrapper");return n.append(...t.wrapList(e)),n}function k(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 S(t,e){return k(t,e,x)}let x=t.identity;function E(t,e){switch(t){case"false":return!1;case"true":case"":case e:return!0}}function j(t){if((t=t.replaceAll("_","")).match(/^-?[\d.]+$/))return parseFloat(t)}function C(e){if(null==e?void 0:e.trim())return t.parseRelaxedJSON(e)}function F(t,e){for(let n of e)t.classList.add(n)}function T(e,n,i){return e.classList.contains(n)===i?t.noop:(e.classList.toggle(n,i),()=>e.classList.toggle(n,!i))}function P(t,e){return A(window.getComputedStyle(t),e)}function R(e,n){const i=P(e,n);if(t.isPresent(i))return parseFloat(i)}function L(t,e){const{style:n}=t;return A(n,e)}function A(e,n){return up.migrate.loaded&&(n=up.migrate.fixStyleProps(n)),t.isString(n)?e.getPropertyValue(n):t.mapObject(n,(t=>[t,e.getPropertyValue(t)]))}function $(e,n,i=""){if(up.migrate.loaded&&(n=up.migrate.fixStyleProps(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 $(t,e),()=>$(t,n)}function M(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function N(t){return/^up-/.test(t)}function H(e,n){return t.mapObject(n,(t=>[t,e.getAttribute(t)]))}return{subtree:n,subtreeFirst:function(t,e){return i(t,e)?t:t.querySelector(e)},contains:function(t,e){const n=r(e);return Node.prototype.contains.call(t,n)},closestAttr:function(t,e,n=S){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,e){return s(t.closest(e),n(t,e))},get:r,list:s,toggle:function(t,e=!M(t)){a(t,e)},hide:function(t){a(t,!1)},hideTemp:function(t){return u(t,!1)},show:function(t){a(t,!0)},showTemp:function(t){return u(t,!0)},metaContent:function(t){var n;return null===(n=e("meta"+g("name",t)))||void 0===n?void 0:n.getAttribute("content")},insertBefore:h,createFromSelector:l,setAttrs:c,setAttrsTemp:function(t,e){let n=Object.keys(e),i=H(t,n);return c(t,e),()=>c(t,i)},affix:function(...e){let[n,i="beforeend",r,s]=t.args(e,"val",t.isAdjacentPosition,"val","options");const o=l(r,s);return n.insertAdjacentElement(i,o),o},idSelector:function(t){return t.match(/^[a-z][a-z0-9\-_]*$/i)?`#${t}`:g("id",t)},classSelector:function(t){return`.${t=t.replace(/[^\w-]/g,"\\$&")}`},isSingleton:m,attrSelector:g,tagName:function(t){return t.tagName.toLowerCase()},createBrokenDocumentFromHTML:function(t){return(new DOMParser).parseFromString(t,"text/html")},fixParserDamage:function(t){let e=v(t.outerHTML);t.replaceWith(e)},createNodesFromHTML:y,createFromHTML:v,extractSingular:b,get root(){return document.documentElement},paint:w,concludeCSSTransition:function(t){const e=D(t,{transition:"none"});return w(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();$(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)_(t,n,e[n])},setMissingAttr:_,unwrap:function(t){!function(e){const n=document.activeElement;try{return function(){let e=[...t.childNodes];for(let n of e)h(t,n);t.remove()}()}finally{n&&n!==document.activeElement&&n.focus({preventScroll:!0})}}()},wrapChildren:function(t){const e=O(t.childNodes);return t.append(e),e},wrapIfRequired:function(e){return 1===e.length&&t.isElement(e[0])?e[0]:O(e)},attr:S,booleanAttr:function(t,e){return k(t,e,E)},numberAttr:function(t,e){return k(t,e,j)},jsonAttr:function(t,e){return k(t,e,C)},callbackAttr:function(e,n,i){return k(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 k(t,e,E,x)},booleanOrNumberAttr:function(t,e){return k(t,e,E,j)},setStyleTemp:D,style:P,styleNumber:R,inlineStyle:L,setStyle:$,isVisible:M,upAttrs:function(t){let e=t.getAttributeNames().filter(N);return H(t,e)},upClasses:function(e){return t.filter(e.classList.values(),N)},setAttrPresence:function(t,e,n,i){return i?t.setAttribute(e,n):t.removeAttribute(e)},addClasses:F,addClassTemp:function(t,e){return T(t,e,!0)},removeClassTemp:function(t,e){return T(t,e,!1)},cleanJQuery:function(t){up.browser.canJQuery()&&jQuery(t).remove()},parseSelector:f,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:i,documentPosition:function(t){let e=t.nextElementSibling;return e?[e,"beforebegin"]:[t.parentElement,"beforeend"]}}}()},3924:()=>{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},4366:()=>{up.Aborted=class Aborted extends up.Error{constructor(t){super(t,{name:"AbortError"})}}},8010:()=>{up.CannotMatch=class CannotMatch extends up.Error{}},4861:()=>{up.CannotParse=class CannotParse extends up.Error{}},3469:()=>{up.CannotTarget=class CannotTarget extends up.Error{}},376:()=>{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)}}},8272:()=>{up.NotImplemented=class NotImplemented extends up.Error{}},4504:()=>{up.Offline=class Offline extends up.Error{}},8670:()=>{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(t.isUndefined(e.button)||0===e.button)&&!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()},isUnmodified: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},2851:()=>{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]"],watchInputEvents:["input","change"],watchInputDelay:0,watchChangeEvents:["change"]})));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.push(...o),r=t.uniq(r)}return r}function o(t){return e.subtree(t,a())}function u(t){return null==t?void 0:t.matches(a())}function a(){return n.selector("submitButtonSelectors")}const c=up.mockable(((t,e)=>up.render(h(t,e))));function h(e,n,i){e=k(e),n=t.options(n);let r=new up.OptionsParser(e,n,i);return r.include(f),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 l(t){if(t.disabled)return;let e;return document.activeElement===t?(e=v(t),t.disabled=!0,up.focus(e,{force:!0,preventScroll:!0})):t.disabled=!0,()=>{t.disabled=!1}}function p(e,n){let i=()=>S(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=>p(t,n))):[]}function f(e,n,i){var r;n=t.options(n),e=k(e);const s=new up.OptionsParser(e,n,i);s.string("contentType",{attr:"enctype"}),s.json("headers");const u=up.Params.fromForm(e),a=null!==(r=n.submitButton)&&void 0!==r?r:n.submitButton=o(e)[0];return a&&(u.addField(a),n.method||(n.method=a.getAttribute("formmethod")),n.url||(n.url=a.getAttribute("formaction"))),u.addAll(n.params),n.params=u,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 d(...e){let[n,i,r]=t.args(e,"val","options","callback");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()"));const s=new up.FieldWatcher(n,i,r);return s.start(),()=>s.stop()}function m(t,e={}){return d(t,Object.assign(Object.assign({},e),{batch:!0}),((e,n)=>c(t,n)))}function g(){var t,e;return(null===(e=(t=up.migrate).migratedFormGroupSelectors)||void 0===e?void 0:e.call(t))||n.groupSelectors}function v(t){return b(t).element}function b(e){return t.findResult(g(),(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 y(n){let i,r;if(n.matches("input[type=checkbox]"))n.checked?(i=n.value,r=":checked"):r=":unchecked";else if(n.matches("input[type=radio]")){const t=S(n),s=n.getAttribute("name"),o=t.querySelector(`input[type=radio]${e.attrSelector("name",s)}:checked`);o?(r=":checked",i=o.value):r=":unchecked"}else i=n.value;const s=[];return t.isPresent(i)?(s.push(i),s.push(":present")):s.push(":blank"),t.isPresent(r)&&s.push(r),s}function w(t,e={}){const n=e.target||e.target||t.getAttribute("up-switch"),i=S(t);n||up.fail("No switch target given for %o",t);const r=y(t);for(let t of up.fragment.all(i,n))_(t,r)}const _=up.mockable((function(n,i){let r;i||(i=y(function(e){const n=S(e).querySelectorAll("[up-switch]");return t.find(n,(function(t){const n=t.getAttribute("up-switch");return e.matches(n)}))||up.fail("Could not find [up-switch] field for %o",e)}(n)));let s=n.getAttribute("up-hide-for");if(s)s=O(s),r=0===t.intersect(i,s).length;else{let e=n.getAttribute("up-show-for");e=e?O(e):[":present",":checked"],r=t.intersect(i,e).length>0}e.toggle(n,r),n.classList.add("up-switched")}));function O(e){return t.getSimpleTokens(e,{json:!0})}function k(t,e={}){const n=up.fragment.get(t,e);return n.form||n.closest("form")}function S(t,e){return t?k(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,u);up.event.halt(e,{log:!0}),up.error.muteUncriticalRejection(c(n,{submitButton:i}))})),up.compiler((function(){let t=n.fieldSelectors.map((t=>`${t}[up-validate], [up-validate] ${t}`));return e.unionSelector(t,["[up-validate=false]"])}),(function(t){up.FormValidator.forElement(t).watchContainer(t)})),up.compiler("[up-switch]",(t=>{w(t)})),up.on("change","[up-switch]",((t,e)=>{w(e)})),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",(t=>{_(t)})),up.attribute("up-watch",(t=>d(t))),up.attribute("up-autosubmit",(t=>m(t))),{config:n,submit:c,submitOptions:h,destinationOptions:f,watchOptions:function(e,n,i={}){var r;n=t.options(n);let s=new up.OptionsParser(e,n,Object.assign(Object.assign({},i),{closest:!0,attrPrefix:"up-watch-"}));s.include(up.status.statusOptions),s.string("event"),s.number("delay");let o=up.form.config;return"input"===n.event?(n.event=t.evalOption(o.watchInputEvents,e),null!==(r=n.delay)&&void 0!==r||(n.delay=o.watchInputDelay)):"change"===n.event&&(n.event=t.evalOption(o.watchChangeEvents,e)),n.origin||(n.origin=e),n},isSubmittable:function(t){return t=up.fragment.get(t),n.matches(t,"submitSelectors")},watch:d,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 up.FormValidator.forElement(n.origin).validate(n)},autosubmit:m,fieldSelector:i,fields:s,isField:r,submitButtons:o,focusedField:function(){return t.presence(document.activeElement,r)},switchTarget:_,disable:function(i){let r=[...s(i),...o(i),...(u=i,e.subtree(u,n.selector("genericButtonSelectors")))];var u;return t.sequence(t.map(r,l))},getDisablePreviewFn:function(t,e){return function(n){let i=p(t,e);for(let t of i)n.disable(t)}},group:v,groupSolution:b,groupSelectors:g,get:k,getScope:S}}(),up.submit=up.form.submit,up.watch=up.form.watch,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate},2667:(t,e,n)=>{n(7433);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",abort:"target",failOptions:!0,feedback:!0},navigateOptions:{cache:"auto",revalidate:"auto",fallback:!0,focus:"auto",scroll:"auto",history:"auto",peel:!0},match:"region",runScripts:!0,autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","keep","target-if-lost"],autoScroll:["hash","layer-if-main"],autoRevalidate:t=>t.expired,skipResponse:s})));function s({response:t,expiredResponse:e}){return!t.text||t.text===(null==e?void 0:e.text)}function o(t,e={}){return t=d(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=y(t);return new up.RenderJob(e).execute()})),l=up.mockable(((...t)=>{const e=y(t);return h(Object.assign(Object.assign({},e),{navigate:!0}))}));function p(t){return!t.closest(".up-destroying")}function f(t){return t.isConnected&&p(t)}function d(...t){let[e,n,s]=g(t);return i.isElementLike(n)?r.get(n):e?m(e,n,s):new up.FragmentFinder({selector:n,origin:s.origin,layer:s.layer,match:s.match}).find()}function m(...t){let[e,n,i]=g(t);return new up.Selector(n,e,i).firstDescendant(e)}function g(t){return i.args(t,"val","val","options")}function v(...t){let[e,n,r]=g(t);return i.isElement(n)?[n]:i.isList(n)?n:new up.Selector(n,e,r).descendants(e)}function b(t,e,n={}){return new up.Selector(e,t,n).subtree(t)}function y(t){const e=i.parseArgIntoOptions(t,"target");return i.isElement(e.target)&&(e.origin||(e.origin=e.target)),e}const w=/^(onFail|on|fail)?(.+)$/;function _(t,e){return i.presence(t,i.isString)||O(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 O(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 k(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!f(e)||!s||up.fragment.get(t,Object.assign({layer:e},i))===e}(o,t,e))return o}))}function k(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 S=/:main\b/,x=/:layer\b/,E=/:origin\b/;function j(t){return S.test(t)}function C(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"),j(s)){let n=F(e),i=up.layer.mainTargets(n).map((t=>s.replace(S,t)));t.unshift(...i)}else if(x.test(s)){if("new"===n||n.opening)continue;let i=_(n.getFirstSwappableElement(),e);t.unshift(s.replace(x,i))}else i.isElementLike(s)?r.push(_(s,e)):i.isString(s)&&r.push(P(s,e))}return i.uniq(r)}function F({layer:t,mode:e}){return"new"===t?e||up.fail('Must pass a { mode } option together with { layer: "new" }'):t.mode}function T(t,{origin:e}={}){return t.replace(E,(function(n){if(e)return _(e);up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',n,t)}))}function P(t,e){return i.isString(t)?(up.migrate.resolveOrigin||T)(t,e):t}function R(t){return i.getComplexTokens(t)}const L=/^([\w-]+|\*)?(#|\.|[:[][a-z-]{3,})/;function A(t,{origin:e,originLayer:n,data:s,htmlParser:o=r.createNodesFromHTML}={}){if(i.isString(t)&&L.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=$(t,s,{htmlParser:o})),i.wrapList(t)}function $(t,e={},{origin:n,htmlParser:i}={}){var s;let o=d(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(t.setAttribute("up-source",u(location.href)),up.hello(t),!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=y(t);s.target||(s.target=":main");const u=d(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=y(t);return(i.element=d(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:d,getFirstDescendant:m,all:v,subtree:b,contains:function(t,e){return i.isElement(e)?r.contains(t,e)&&up.layer.get(t).contains(e):b(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("aria-hidden","true")},emitInserted:function(t){return 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:function(t){let{oldElement:e,newElement:n,newData:i,renderOptions:s}=t;const o=["Keeping fragment %o",e],u=r.callbackAttr(e,"up-on-keep",{exposedKeys:["newFragment","newData"]});return up.emit(e,"up:fragment:keep",{newFragment:n,newData:i,renderOptions:s,log:o,callback:u})},successKey:function(t){let e=w.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=w.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:C,resolveOrigin:P,toTarget:_,tryToTarget:O,isTargetable:function(t){return!!O(t)},matches:function(t,e,n={}){if(t=r.get(t),i.isElement(e)){let n=O(e);return n&&t.matches(n)}return new up.Selector(e,t,n).matches(t)},hasAutoHistory:function(t,e){let i=C(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=y(t),{reason:s,newLayer:o}=r;if(r.target)n=v(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:R,parseTargetSteps:function(t,e={}){var n;let i=e.defaultPlacement||"swap",r=null!==(n=e.defaultMaybe)&&void 0!==n&&n,s=[],o=R(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:f,isNotDestroying:p,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:j,insertTemp:function(...t){let[e,n="beforeend",s]=i.args(t,"val",i.isAdjacentPosition,"val"),o=A(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:A,cloneTemplate:$}}(),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))},9634:()=>{up.framework=function(){let t="evaling";function e(){if("configuring"!==t)return void console.error("Unpoly has already booted");let e=n();e?console.error("Unpoly cannot boot: %s",e):(t="booting",up.emit("up:framework:boot",{log:!1}),t="booted",up.emit("up:framework:booted",{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),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},8944:()=>{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;function s(){return t.normalizeURL(location.href)}function o(){const t=s();r!==t&&(i=r,r=t)}function u(e,n){return t.matchURLs(e,location.href,Object.assign({hash:!0},n))}function a(e,n={}){h("replaceState",e=t.normalizeURL(e))&&!1!==n.event&&c({location:e,reason:"replace",log:`Replaced state for ${e}`})}function c(t){var e,n;let i=up.event.build("up:location:changed",t);null===(n=null===(e=up.migrate)||void 0===e?void 0:e.renamedProperty)||void 0===n||n.call(e,i,"url","location"),up.emit(i)}function h(t,e){if(n.enabled){const n={up:{}};return window.history[t](n,"",e),o(),!0}}function l(t){o();let e=s();c({location:e,reason:"pop",log:`Navigated to history entry ${e}`}),up.viewport.saveFocus({location:i}),up.viewport.saveScroll({location:i}),function(t){if(!(null==t?void 0:t.up))return void up.puts("popstate","Ignoring a history state not owned by Unpoly");let e=s();up.error.muteUncriticalRejection(up.render({guardEvent:up.event.build("up:location:restore",{location:e,log:`Restoring location ${e}`}),url:e,target:n.restoreTargets,fail:!1,history:!0,location:e,peel:!0,layer:"root",cache:"auto",revalidate:"auto",saveScroll:!1,scroll:["restore","auto"],saveFocus:!1,focus:["restore","auto"]}))}(t.state)}function p(){window.addEventListener("popstate",l),"GET"===up.protocol.initialRequestMethod()&&a(s(),{event:!1})}function f(t=document.head){return t.querySelectorAll(n.selector("metaTagSelectors"))}return o(),up.on("up:framework:boot",(function(){"jasmine"in window?p():setTimeout(p,100)})),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,o()})),{config:n,push:function(e){!u(e=t.normalizeURL(e))&&h("pushState",e)&&c({location:e,reason:"push",log:`Advanced to location ${e}`})},replace:a,get location(){return s()},get previousLocation(){return i},isLocation:u,findMetaTags:f,updateMetaTags:function(t){let e=f();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)}}}()},9443:function(t,e,n){var i=this&&this.U||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(7921);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}()},3849:(t,e,n)=>{n(7298),up.link=function(){const t=up.util,e=up.element;let n=null;const i="[up-content], [up-fragment], [up-document]",r=`${i}, [up-target], [up-layer], [up-transition], [up-preload]`,s=new up.Config((()=>({followSelectors:["[up-follow]",`a:is(${r})`],noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="javascript:"]','a[href^="mailto:"]','a[href^="tel:"]',`a[href^="#"]:not(${i})`,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(${r})`],noClickableSelectors:["[up-clickable=false]","a[href], button"],preloadDelay:90}))),o=up.mockable((function(t,e,n){return up.render(a(t,e,n))}));function u(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=h(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"),n}function a(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(u),n.origin||(n.origin=e),s.boolean("fail"),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("history"),s.include(up.status.statusOptions),s.booleanOrString("focus"),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 c(t,e){let n=function(t){if(!g(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 o(t,Object.assign(Object.assign(Object.assign(Object.assign({abort:!1,abortable:!1,background:!0,cache:!0},up.RenderOptions.NO_INPUT_INTERFERENCE),up.RenderOptions.NO_PREVIEWS),e),{guardEvent:i,preload:!0}))}function h(e,n={}){return t.normalizeMethod(n.method||e.getAttribute("up-method")||e.getAttribute("data-method"))}function l(t){return t=up.fragment.get(t),s.matches(t,"followSelectors")}function p(t){l(t)||t.setAttribute("up-follow","")}function f(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 d(t){const e=t.closest(s.selector("instantSelectors"));return e&&(n=e,!(s.matches(n,"noInstantSelectors")||s.matches(n,"noFollowSelectors")));var n}function m(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 g(t){const e=h(t);return up.network.isSafeMethod(e)}function v(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 b(t,e){let n=up.event.build("up:deferred:load",{log:["Loading deferred %o",t]}),i=Object.assign({navigate:!1,guardEvent:n},e);return o(t,i,{defaults:{target:":origin",cache:"auto",revalidate:"auto",feedback:!0}})}return up.macro(s.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 m(e)}))})),up.attribute("up-defer",{defaultValue:"insert"},(function(t,e){v(e,t,(e=>up.error.muteUncriticalRejection(b(t,e))))})),up.on("up:click",s.selectorFn("followSelectors"),(function(t,e){f(t,e)&&(up.event.halt(t,{log:!0}),up.focus(e,{preventScroll:!0}),up.error.muteUncriticalRejection(o(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)),p(t))})),up.compiler(s.selectorFn("preloadSelectors"),(function(n){if(!function(t){return!up.browser.canPushState()||!l(t)||!function(t){const e=u(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(c(n,t)),r=e.booleanOrStringAttr(n,"up-preload");(!0===r||t.isUndefined(r))&&(r="hover"),v(r,n,i)}})),up.on("up:framework:reset",(function(){n=null})),{follow:o,followOptions:a,requestOptions:u,preload:c,makeFollowable:p,isSafe:g,isFollowable:l,shouldFollowEvent:f,convertClicks:function(t){t.on("click",(function(e,i){if(up.event.isUnmodified(e))return d(i)&&n?up.event.halt(e):("key"===up.event.inputDevice||up.event.isSyntheticClick(e)||t.wasHitByMouseEvent(e)&&(!n||n===e.target))&&m(e),n=null})),t.on("mousedown",(function(t,e){up.event.isUnmodified(t)&&(n=t.target,d(e)&&m(t))}))},config:s,loadDeferred:b}}(),up.follow=up.link.follow,up.deferred={load:up.link.loadDeferred}},4453:()=>{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)}`))}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){let e="#5566cc";i("log",(t=t.originalEvent||t).type,`color: white; border-color: ${e}; background-color: ${e}`,"Interaction on %o",t.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},6535:()=>{up.migrate={config:{}}},8374:()=>{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}},4034:function(){var t=this&&this.U||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;let i={},r={};const s=new up.MotionController("motion"),o=new up.Config((()=>({duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches})));function u(t){return e.pickBy(t,"isDefault")}function a(){return o.enabled}function c(t,e,i){return l(i),a()&&!b(e)&&i.duration>0&&!n.isSingleton(t)}function h(t,e,n){return up.migrate.loaded&&(e=up.migrate.fixStyleProps(e)),n=Object.assign(Object.assign({},n),{finishEvent:s.finishEvent}),new up.CSSTransition(t,e,n).start()}function l(t){var e,n;null!==(e=t.easing)&&void 0!==e||(t.easing=o.easing),null!==(n=t.duration)&&void 0!==n||(t.duration=o.duration)}function p(t){if(!b(t)){if(e.isFunction(t))return t;if(e.isArray(t))return f(...t);if(e.isString(t)){let e;if(t.indexOf("/")>=0)return f(...t.split("/"));if(e=r[t])return p(e)}else up.fail("Unknown transition %o",t)}}function f(t,n){if(!b(t)&&!b(n)){const i=d(t)||e.asyncNoop,r=d(n)||e.asyncNoop;return(t,e,n)=>Promise.all([i(t,n),r(e,n)])}}function d(t){var n;if(!b(t))return e.isFunction(t)?t:e.isString(t)?i[n=t]||up.fail("Unknown animation %o",n):e.isOptions(t)?(e,n)=>h(e,t,n):void up.fail("Unknown animation %o",t)}const m=up.mockable((function(t,e){t.replaceWith(e)}));function g(t,e){const n=p(e);n.isDefault=up.framework.evaling,r[t]=n}function v(t,e){const n=d(e);n.isDefault=up.framework.evaling,i[t]=n}function b(t){return!t||"none"===t}function y(t,e,i){v(t,(function(t,r){return t.style.opacity=0,n.setStyle(t,{opacity:e}),h(t,{opacity:i},r)}))}function w(t,e){return{transform:`translate(${t}px, ${e}px)`}}function _(t){return n.setStyle(t,{transform:""}),t.getBoundingClientRect()}function O(t,e){const i=`move-from-${t}`;v(`move-to-${t}`,(function(t,n){const i=_(t);return h(t,e(i),n)})),v(i,(function(t,i){const r=_(t),s=e(r);return n.setStyle(t,s),h(t,{transform:""},i)}))}return up.on("up:framework:boot",(function(){a()||up.puts("up.motion","Animations are disabled")})),y("fade-in",0,1),y("fade-out",1,0),O("top",(function(t){return w(0,-(t.top+t.height))})),O("bottom",(function(t){return w(0,up.viewport.rootHeight()-t.top)})),O("left",(function(t){return w(-(t.left+t.width),0)})),O("right",(function(t){return w(up.viewport.rootWidth()-t.left,0)})),g("cross-fade",["fade-out","fade-in"]),g("move-left",["move-to-left","move-from-right"]),g("move-right",["move-to-right","move-from-left"]),g("move-up",["move-to-top","move-from-bottom"]),g("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:reset",(function(){s.reset(),i=u(i),r=u(r)})),{morph:function(i,r,o,u){l(u=e.options(u)),i=up.fragment.get(i),r=up.fragment.get(r);let a=p(o);const h=c(i,a,u);a=up.error.guardFn(a);const f=e.pluckKey(u,"beforeStart")||e.noop,d=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(),h){if(s.isActive(i)&&!1===u.trackMotion)return a(i,r,u);up.puts("up.morph()","Morphing %o to %o with transition %O over %d ms",i,r,o,u.duration);const e=up.viewport.get(i),c=e.scrollTop,h=up.viewport.absolutize(i,{afterMeasure(){n.insertBefore(i,r),d()}}),l=function(){return t(this,void 0,void 0,(function*(){b();const t=e.scrollTop;h.moveBounds(0,t-c),yield a(i,r,u),g(),h.bounds.remove(),v()}))};return s.startFunction([i,r],l,u)}return g(),m(i,r),d(),v(),b(),Promise.resolve()},animate:function(t,i,r){t=up.fragment.get(t),r=e.options(r);let o=d(i);const u=c(t,i,r);if(o=up.error.guardFn(o),u){const e=()=>o(t,r);return s.startFunction(t,e,r)}return function(t,i){return e.isOptions(i)&&n.setStyle(t,i),Promise.resolve()}(t,i)},finish:function(t){return s.finish(t)},finishCount:()=>s.finishCount,transition:g,animation:v,config:o,isEnabled:a,isNone:b,willAnimate:c,swapElementsDirectly:m,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},1647:(t,e,n)=>{n(2903);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,e)=>!t.isSafe(),evictCache:!1,progressBar:!0,timeout:9e4}))),e=new up.Request.Queue,n=new up.Request.Cache;let r=null;function s(r){(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(r){(function(e){e.willCache()&&(n.put(e),e.onLoading=()=>n.reindex(e)),i.always(e,(function(r){var s,o,u,a;let c=null!==(o=null!==(s=r.expireCache)&&void 0!==s?s:e.expireCache)&&void 0!==o?o:i.evalOption(t.expireCache,e,r);c&&n.expire(c,{except:e});let h=null!==(a=null!==(u=r.evictCache)&&void 0!==u?u:e.evictCache)&&void 0!==a?a:i.evalOption(t.evictCache,e,r);h&&n.evict(h,{except:e});let l=n.get(e),p=r instanceof up.Response,f=!p,d=p&&r.ok,m=p&&!r.ok,g=p&&r.none;m?n.evict(e.url):f||g?n.evict(e):d&&l&&n.put(e)}))})(r),e.asap(r)}(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,registerAliasForRedirect:function(t,e){if(t.cache&&e.url&&t.url!==e.url){const r=i.variant(t,{method:e.method,url:e.url,cacheRoute:null});n.alias(t,r)}},queue:e,loadPage:function(t){new up.Request(t).loadPage()}}}(),up.request=up.network.request,up.cache=up.network.cache},3535:()=>{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})));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)},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"},cspNoncesFromHeader:function(t){let e=[];if(t){let n=t.split(/\s*;\s*/);for(let t of n)if(0===t.indexOf("script-src")){let n,i=/'nonce-([^']+)'/g;for(;n=i.exec(t);)e.push(n[1])}}return e}}}()},9615:()=>{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}}}()},6774:()=>{!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))}))}}()},1897:()=>{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};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){t.type="up-disabled-script"}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(i){let r=n.selector("scriptSelectors");t.each(e.subtree(i,r),l)},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},7791:()=>{up.status=function(){const t=up.util,e=up.element;let n={};const i=new up.Config((()=>({currentClasses:["up-current"],activeClasses:["up-active"],loadingClasses:["up-loading"],navSelectors:["[up-nav]","nav"],noNavSelectors:["[up-nav=false]"]}))),r="a, [up-href]";function s(t){return t.upCurrentURLs||(t.upCurrentURLs=new up.LinkCurrentURLs(t))}function o(t,{layer:n}={}){n||(n=up.layer.get(t));let o=u(n);const a=i.selector("navSelectors"),c=`${a} :is(${r}), ${a}:is(${r})`,h=up.fragment.all(c,{layer:n});for(let t of h){const n=s(t).isCurrent(o);for(let e of i.currentClasses)t.classList.toggle(e,n);e.setAttrPresence(t,"aria-current","page",n)}}function u(e){return e.feedbackLocation||t.matchableURL(e.location)}function a(t){return e.ancestor(t,r)||t}function c(t){if(t)return function(e){e.showPlaceholder(t)}}function h(e){return t.isFunction(e)?[e]:t.isString(e)?(i=e,t.map(t.parseScalarJSONPairs(i),(([t,e])=>{let i=n[t]||up.fail('Unknown preview "%s"',t);return function(n,r){return up.puts("[up-preview]","Showing preview %o",t),i(n,e||r)}}))):t.isArray(e)?e.flatMap(h):[];var i}function l(t){const e=t.feedbackLocation,n=u(t.location);e&&e===n||(t.feedbackLocation=n,o(t.element,{layer:t}))}return up.on("up:location:changed",(t=>{!function(){const t=up.layer.front;t.showsLiveHistory()&&l(t)}()})),up.on("up:fragment:compile",((t,e)=>{o(e)})),up.on("up:layer:location:changed",(t=>{l(t.layer)})),up.on("up:framework:reset",(function(){up.layer.root.feedbackLocation=null,n=t.pickBy(n,"isDefault")})),{config:i,preview:function(t,e){e.isDefault=up.framework.evaling,n[t]=e},resolvePreviewFns:h,runPreviews:function(n,r){let{bindLayer:s}=n,o=up.FocusCapsule.preserve(s),u=s.asCurrent((()=>function(n,r){let{fragment:s,fragments:o,origin:u}=n,l=t.cleaner(),p=t=>new up.Preview({fragment:t,request:n,renderOptions:r,cleaner:l}),f=p(s);f.run(h(r.preview)),f.run(c(r.placeholder)),f.run(function(e,n){if(e)return function(e){e.addClassBatch(function({origin:e,activeElements:n}){return n||(n=t.wrapList(e)),n.map(a)}(e.renderOptions),i.activeClasses),e.addClassBatch(n,i.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(c))}return l.clean}(n,r)));return up.on("focusin",{once:!0},(()=>o=null)),()=>{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},7924:()=>{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(b(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 b(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){let n=0;for(let i of t)e(i,n++)}function h(t){return null===t}function l(t){return void 0===t}const p=nt(l);function f(t){return l(t)||h(t)}const d=nt(f);function m(t){return!!f(t)||(_(t)&&t[m.key]?t[m.key]():b(t)||E(t)?0===t.length:!!w(t)&&0===Object.keys(t).length)}m.key="up.util.isBlank";const g=nt(m);function v(t){return"function"==typeof t}function b(t){return"string"==typeof t||t instanceof String}function y(t){return"number"==typeof t||t instanceof Number}function w(t){return"object"==typeof t&&!h(t)&&(l(t.constructor)||t.constructor===Object)}function _(t){const e=typeof t;return"object"===e&&!h(t)||"function"===e}function O(t){return t instanceof Element}function k(t){return t instanceof RegExp}function S(t){return up.browser.canJQuery()&&t instanceof jQuery}const{isArray:x}=Array;function E(t){return x(t)||function(t){return t instanceof NodeList}(t)||function(t){return"[object Arguments]"===Object.prototype.toString.call(t)}(t)||S(t)||function(t){return t instanceof HTMLCollection}(t)}function j(t){return E(t)?t:f(t)?[]:[t]}function C(t){return _(t)&&t[C.key]?t=t[C.key]():E(t)?t=F(t):w(t)&&(t=Object.assign({},t)),t}function F(t){return Array.prototype.slice.call(t)}function T(...t){return Object.assign({},...t)}function P(t,e){return e?T(e,t):t?C(t):{}}function R(t,e){e=u(e);let n=0;for(let i of t){const t=e(i,n++);if(t)return t}}function L(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 A(t){return $(t,d)}function $(t,e){e=u(e);const n=[];return c(t,(function(t,i){if(e(t,i))return n.push(t)})),n}function D(t){return t[t.length-1]}function M(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 H(t,e){e=u(e);const n={};for(let i in t)e(t[i],i,t)&&(n[i]=t[i]);return n}function q(t,...e){return v(t)?t(...e):t}C.key="up.util.copy",Date.prototype[C.key]=function(){return new Date(+this)};const B={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"};function U(t,e){const n=t[e];return delete t[e],n}function I(t,e){if(e(D(t)))return t.pop()}function z(t){return I(t,v)}function K(t){return I(t,w)||{}}function V(t){return t}function X(t){const e=[];for(let n of t)E(n)?e.push(...n):e.push(n);return e}function W(t,e){if((null==t?void 0:t.valueOf)&&(t=t.valueOf()),(null==e?void 0:e.valueOf)&&(e=e.valueOf()),typeof t!=typeof e)return!1;if(E(t)&&E(e))return G(t,e);if(_(t)&&t[W.key])return t[W.key](e);if(w(t)&&w(e)){const n=Object.keys(t);return!!G(n,Object.keys(e))&&L(n,(n=>W(t[n],e[n])))}return t===e}function G(t,e){return t.length===e.length&&L(t,((t,n)=>W(t,e[n])))}function J(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(V)}function Q(t){let{masked:e,restore:n}=ht(t);return{maskedTokens:J(e,","),restore:n}}W.key="up.util.isEqual";let Y=0;function Z(t,e,n){for(let i of e)Object.defineProperty(t,i,{get(){const t=n.call(this);let e=t[i];return v(e)&&(e=e.bind(t)),e},set(t){n.call(this)[i]=t}})}function tt(t,e="%o"){let n;if("%c"===e)return"";if("%s"===e&&d(t)&&(t=t.toString()),b(t))n=t.trim().replace(/[\n\r\t ]+/g," "),"%o"===e&&(n=JSON.stringify(n));else if(l(t))n="undefined";else if(y(t)||v(t))n=t.toString();else if(x(t))n=`[${a(t,tt).join(", ")}]`;else if(S(t))n=`$(${a(t,tt).join(", ")})`;else if(O(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(k(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)}…${D(n)}`),n}const et=/%[oOdisfc]/g;function nt(t){return function(...e){return!t(...e)}}function it(t){if(t.error)throw t.error;return t.value}function rt(t,e,n){try{return{value:t.apply(e,n)}}catch(t){return{error:t}}}function st(t,...e){let n=[];for(;e.length;){let i=e.pop();if("options"===i)n.unshift(K(t));else if("callback"===i)n.unshift(z(t));else if("val"===i)n.unshift(t.pop());else if(v(i)){let e=i(D(t))?t.pop():void 0;n.unshift(e)}}return n}function ot(...t){return t.flat().filter(v)}function ut(t,e,{keepDelimiters:n=!1}={}){let i=0,r=/§(\d+)/g,s=[],o=0;return[r,...e].forEach((e=>{let r=!1;t=t.replaceAll(e,(function(t){r=!0;let e,o,u="§"+i++;if(n){let n=t[0],i=t.slice(-1);o=t.slice(1,-1),e=n+u+i}else o=t,e=u;return s.push(o),e})),r&&o++})),{masked:t,restore:(t,e=V)=>{for(let n=0;n<o;n++)t=t.replace(r,((t,n)=>e(s[n])));return t}}}const at=/'(?:\\\\|\\'|[^'])*'|"(?:\\\\|\\"|[^"])*"/g,ct=/{(?:[^{}]|{[^{}]*})*}|\((?:[^\(\)]|\([^\(\)]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\]/g;function ht(t){return ut(t,[at,ct],{keepDelimiters:!0})}function lt(t){return'"'===t[0]?t:'"'+(t=t.slice(1,-1)).replace(/(\\\\)|(\\')|(\\")|(")/g,(function(t,e,n,i){return e||n&&"'"||'\\"'}))+'"'}function pt(t){let{masked:e,restore:n}=ut(t,[at]);return e=e.replace(/([a-z_$][\w$]*:)/gi,(t=>'"'+t.slice(0,-1)+'":')),e=e.replace(/,\s*([}\]])/g,"$1"),e=n(e,lt),JSON.parse(e)}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:C,merge:T,mergeDefined:function(...t){const e={};for(let n of t)if(n)for(let t in n){const i=n[t];p(i)&&(e[t]=i)}return e},options:P,parseArgIntoOptions:function(t,e){let[n,i]=st(t,"val","options");return p(n)&&(i[e]=n),i},each:c,map:a,flatMap:function(t,e){return X(a(t,e))},mapObject:function(t,e){return a(t,e).reduce((function(t,e){return t[e[0]]=e[1],t}),{})},findResult:R,some:function(t,e){return!!R(t,e)},every:L,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=nt(u(e)))},intersect:function(t,e){return $(t,(t=>M(e,t)))},compact:A,compactObject:function(t){return H(t,d)},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:D,isNull:h,isDefined:p,isUndefined:l,isGiven:d,isMissing:f,isPresent:g,isBlank:m,presence:function(t,e=g){if(e(t))return t},isObject:_,isFunction:v,isString:b,isBoolean:function(t){return"boolean"==typeof t||t instanceof Boolean},isNumber:y,isElement:O,isTextNode:function(t){return t instanceof Text},isJQuery:S,isElementLike:function(t){var e;return!(!t||!(t.addEventListener||S(t)&&(null===(e=t[0])||void 0===e?void 0:e.addEventListener)))},isPromise:function(t){return _(t)&&v(t.then)},isOptions:w,isArray:x,isFormData:function(t){return t instanceof FormData},isList:E,isRegExp:k,isAdjacentPosition:function(t){return/^(before|after)/.test(t)},timer:function(t,e){return setTimeout(e,t)},contains:M,containsAll:function(t,e){return L(e,(e=>M(t,e)))},objectContains:function(t,e){return W(e,N(t,Object.keys(e)))},toArray:function(t){return x(t)?t:F(t)},pick:N,pickBy:H,omit:function(t,e){return H(t,((t,n)=>!M(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:U,renameKey:function(t,e,n){e in t&&(t[n]=U(t,e))},extractOptions:K,extractCallback:z,noop:t,asyncNoop:function(){return Promise.resolve()},identity:V,escapeHTML:function(t){return t.replace(/[&<>"']/g,(t=>B[t]))},escapeRegExp:function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},sequence:function(t){return t=A(t),(...e)=>a(t,(t=>t(...e)))},evalOption:q,evalAutoOption:function(t,e,...n){return"auto"===(t=q(t,...n))&&(t=q(e,...n)),t},flatten:X,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=V){return t.then(e,e)},isBasicObjectProperty:function(t){return Object.prototype.hasOwnProperty(t)},isCrossOrigin:s,task:function(t){return setTimeout(t)},isEqual:W,getSimpleTokens:function(t,{json:e=!1,separator:n=/[,\s]/}={}){return b(t)?e&&/^\[.*]$/.test(t)?pt(t):J(t,n):j(t)},getComplexTokens:function(t){if(b(t)){let{maskedTokens:e,restore:n}=Q(t);return e.map((t=>n(t)))}return j(t)},wrapList:j,wrapValue:function(t,...e){return e[0]instanceof t?e[0]:new t(...e)},uid:function(){return Y++},upperCaseFirst:function(t){return t[0].toUpperCase()+t.slice(1)},lowerCaseFirst:function(t){return t[0].toLowerCase()+t.slice(1)},delegate:Z,delegatePromise:function(t,e){return Z(t,["then","catch","finally"],(function(){return this[e]}))},reverse:function(t){return C(t).reverse()},camelToKebabCase:function(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))},sprintf:function(t,...e){return t.replace(et,(t=>tt(e.shift(),t)))},withRenamedKeys:function(t,e){const n={};for(let i in t){let r=e(i);d(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]=rt(e,this,t)),it(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=ot(...e).map(n),t.push(...ot(...e))},n=function(...t){e(t,V)};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:ot,args:st,parseRelaxedJSON:pt,parseScalarJSONPairs:function(t){let{maskedTokens:e,restore:n}=Q(t);return e.map((t=>{let[e,i,r]=t.match(/([^{]+)({[^}]*})?/);return[n(i.trim()),r&&pt(n(r))]}))},maskPattern:ut,expressionOutline:ht,parseString:function(t){return JSON.parse(lt(t))}}}()},4606:(t,e,n)=>{n(573),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(t=location.hash,e){let n=v(t,e);if(n)return s(n,{top:!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){for(let n of t){const t=d(n);n.scrollTop=e[t]||0}}function v(t,i={}){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)}var r}up.on("focusin",(function({relatedTarget:t}){u(t)}));const b=["selectionStart","selectionEnd","scrollLeft","scrollTop"];return document.addEventListener("DOMContentLoaded",(function(){a(),t.task(a)})),up.on(window,"hashchange",(()=>a())),up.on("up:click",'a[href^="#"]',(function(t,e){e.hash===location.hash&&(up.link.isFollowable(e)||a(e.hash)&&up.event.halt(t))})),{reveal:s,revealHash:a,firstHashTarget:v,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&&(g(e,r),up.puts("up.viewport.restoreScroll()","Restored scroll positions to %o",r),!0)},resetScroll:function(...t){const[e,n]=m(t);g(e,{})},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 b)try{e[n]=t[n]}catch(t){}return e},bodyShifter:r}}(),up.focus=up.viewport.focus,up.reveal=up.viewport.reveal},3507:()=>{window.up={version:"3.10.0"}}},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(3507),n(8374),n(7924),n(3924),n(6535),n(2811),n(9675),n(376),n(8272),n(4366),n(8010),n(4861),n(3469),n(4504),n(2406),n(3742),n(1653),n(1104),n(5949),n(1279),n(6346),n(3030),n(7948),n(2714),n(8228),n(7050),n(9441),n(9489),n(7422),n(2200),n(278),n(9005),n(1569),n(2737),n(3635),n(1906),n(4158),n(3139),n(2214),n(5240),n(665),n(2828),n(2587),n(7031),n(8057),n(4850),n(7956),n(7403),n(6412),n(7965),n(7771),n(86),n(4552),n(5580),n(7101),n(6066),n(6387),n(3698),n(2460),n(7792),n(4308),n(8665),n(3645),n(8397),n(7782),n(2705),n(606),n(5437),n(7974),n(6413),n(5221),n(2298),n(4517),n(7241),n(2723),n(8720),n(7885),n(4818),n(9634),n(8670),n(3535),n(4453),n(1897),n(8944),n(2667),n(4606),n(4034),n(1647),n(9443),n(3849),n(2851),n(7791),n(9615),n(6774),up.framework.onEvaled()})();
1
+ (()=>{var t={5941:()=>{},7433:()=>{},7921:()=>{},7298:()=>{},2903:()=>{},573:()=>{},2811:()=>{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}}},6346:()=>{const t=up.element,e=up.util;up.BodyShifter=class BodyShifter{constructor(){this.t=new Set,this.i=0,this.o=e.cleaner()}lowerStack(){0==--this.i&&this.o.clean()}raiseStack(){1==++this.i&&this.u()}onAnchoredElementInserted(t){return this.t.add(t),this.h(t,"right"),()=>this.t.delete(t)}l(){return this.p&&this.i>0}u(){this.p=up.viewport.rootScrollbarWidth(),this.o(t.setStyleTemp(t.root,{"--up-scrollbar-width":this.p+"px"})),this.h(document.body,"padding-right");for(let t of this.t)this.h(t,"right")}h(e,n){if(!this.l())return;let i=t.style(e,n);this.o(t.setStyleTemp(e,{["--up-original-"+n]:i}),t.addClassTemp(e,"up-scrollbar-away"))}}},7948:()=>{const t=up.util,e=up.element;up.Change.Addition=class Addition extends up.Change{constructor(t){super(t),this.m=t.acceptLayer,this.v=t.dismissLayer,this._=t.eventPlans||[],this.O=t.response}handleLayerChangeRequests(){this.layer.isOverlay()&&(this.k(),this.abortWhenLayerClosed(),this.layer.tryAcceptForLocation(this.S()),this.abortWhenLayerClosed(),this.j(),this.abortWhenLayerClosed(),this.layer.tryDismissForLocation(this.S()),this.abortWhenLayerClosed()),this.layer.asCurrent((()=>{for(let t of this._)up.emit(Object.assign(Object.assign({},t),this.S())),this.abortWhenLayerClosed()}))}k(){t.isDefined(this.m)&&this.layer.isOverlay()&&this.layer.accept(this.m,this.S())}j(){t.isDefined(this.v)&&this.layer.isOverlay()&&this.layer.dismiss(this.v,this.S())}abortWhenLayerClosed(t=this.layer){if(t.isClosed())throw new up.Aborted("Layer was closed")}C({oldElement:t,newElement:n,source:i}){"keep"===i&&(i=t&&up.fragment.source(t)),i&&e.setMissingAttr(n,"up-source",up.fragment.normalizeSource(i))}F({newElement:t,time:n}){e.setMissingAttr(t,"up-time",!!n&&n.toUTCString())}T({newElement:t,etag:n}){e.setMissingAttr(t,"up-etag",n||!1)}setReloadAttrs(t){this.C(t),this.F(t),this.T(t)}S(){return{response:this.O}}executeSteps(t,e,n){return new up.Change.UpdateSteps({steps:t,noneOptions:n}).execute(e)}}},3030:()=>{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)}}},7422:()=>{const t=up.util;up.Change.CloseLayer=class CloseLayer extends up.Change{constructor(t){var e,n;super(t),this.P=t.verb,this.R=up.layer.get(t),this.L=t.origin,this.A=t.value,this.$=null===(e=t.preventable)||void 0===e||e,this.O=t.response,this.D=null===(n=t.history)||void 0===n||n}execute(){if(!this.R.isOpen())return;if(up.browser.assertConfirmed(this.options),this.M().defaultPrevented&&this.$)throw new up.Aborted("Close event was prevented");this.N(),up.fragment.abort({reason:"Layer is closing",layer:this.R});const{parent:t}=this.R;this.R.peel(),this.R.stack.remove(this.R),this.D&&t.restoreHistory(),this.H(t),this.R.teardownHandlers(),this.R.destroyElements(this.options),this.q(t)}M(){let e=this.R.emit(this.B(`up:layer:${this.P}`),{callback:this.R.callback(`on${t.upperCaseFirst(this.P)}`),log:[`Will ${this.P} ${this.R} with value %o`,this.A]});return this.A=e.value,e}N(){let t=this.B(`up:layer:${this.P}ing`);this.R.emit(t,{log:!1})}q(e){const n=`${this.P}ed`,i=t.upperCaseFirst(n);return this.R.emit(this.B(`up:layer:${n}`),{baseLayer:e,callback:this.R.callback(`on${i}`),ensureBubbles:!0,log:[`${i} ${this.R} with value %o`,this.A]})}B(t){return up.event.build(t,{layer:this.R,value:this.A,origin:this.L,response:this.O})}H(t){var e;let n=this.R.hasFocus();if(this.R.overlayFocus.teardown(),null===(e=t.overlayFocus)||void 0===e||e.moveToFront(),n){let e=this.R.origin||t.element;up.focus(e,{preventScroll:!0})}}}},8228:function(){var t=this&&this.U||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.R=up.layer.get(t)||up.layer.current,this.I=this.options.element,this.V=this.options.animation,this.K=this.options.log,this.X=this.options.onFinished}execute(){this.W=this.I.parentNode,up.fragment.markAsDestroying(this.I),up.motion.willAnimate(this.I,this.V,this.options)?this.G():this.J()}G(){var e;return t(this,void 0,void 0,(function*(){this.Y(),yield this.Z(),this.tt(),null===(e=this.X)||void 0===e||e.call(this)}))}J(){var t;this.tt(),this.Y(),null===(t=this.X)||void 0===t||t.call(this)}Z(){return up.motion.animate(this.I,this.V,this.options)}tt(){this.R.asCurrent((()=>{up.fragment.abort(this.I),up.script.clean(this.I,{layer:this.R}),up.element.cleanJQuery(this.I),this.I.remove()}))}Y(){up.fragment.emitDestroyed(this.I,{parent:this.W,log:this.K})}}},9005:()=>{var t;const e=up.util;up.Change.FromContent=(t=class FromContent extends up.Change{constructor(t){super(t),this.L=t.origin,this.et=t.preflight,this.nt=up.layer.getAll(t)}it(){let t=[];return this.rt(),this.st(),this.ot(t,this.nt,this.options.target),this.ot(t,this.nt,this.options.fallback),t}ut(t){return"new"===t||t.isOpen()}rt(){this.nt=e.filter(this.nt,this.ut)}ot(t,e,n){for(let i of e)for(let e of this.ct(n,i)){const n=Object.assign(Object.assign({},this.options),{target:e,layer:i,defaultPlacement:this.ht()}),r="new"===i?new up.Change.OpenLayer(n):new up.Change.UpdateLayer(n);t.push(r)}}ct(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.options.mode,origin:this.L})}execute(){return this.options.preload?Promise.resolve():this.lt(this.ft.bind(this))||this.dt()}ft(t){let e=t.execute(this.gt(),this.vt.bind(this,t));return e.options=this.options,e}bt(t){return!(t instanceof up.CannotMatch)}vt(t){var e,n;let i=this.it()[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.gt();r&&up.script.assertAssetsOK(r,t.options),null===(n=(e=this.options).handleAbort)||void 0===n||n.call(e,null)}gt(){var t,n;if(this.et)return;const i=e.pick(this.options,["target","content","fragment","document","html","cspNonces","origin","data"]);return null===(n=(t=up.migrate).handleResponseDocOptions)||void 0===n||n.call(t,i),"content"===this.ht()&&(i.target=this.yt(i.target)),new up.ResponseDoc(i)}st(){var t;if(this.et)return;let e=this.gt();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)}ht(){if(!this.options.document&&!this.options.fragment)return"content"}yt(t){let e=this.nt[0]||up.layer.root;return this.ct(t||":main",e)[0]}getPreflightProps(t={}){return this.lt((t=>t.getPreflightProps()))||t.optional||this.wt()}wt(){this._t("Could not find target in current page")}dt(){this._t("Could not find common target in current page and response")}_t(t){if(this.it().length){const n=e.uniq(e.map(this.it(),"target")),i=up.layer.optionToString(this.options.layer);throw new up.CannotMatch([t+" (tried selectors %o in %s)",n,i])}if(0!==this.nt.length)throw this.options.failPrefixForced?new up.CannotMatch("No target selector given for failed responses (https://unpoly.com/failed-responses)"):new up.CannotMatch("No target selector given");this.Ot()}Ot(){throw new up.CannotMatch("Could not find a layer to render in. You may have passed an unmatchable layer reference, or a detached element.")}lt(t){for(let e of this.it())try{return t(e)}catch(t){if(this.bt(t))throw t}}},e.memoizeMethod(t.prototype,{it:!0,gt:!0,getPreflightProps:!0}),t)},278:function(){var t,e=this&&this.U||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.O=t.response,this.kt=this.O.request}execute(){var t;if(up.fragment.config.skipResponse(this.St())?this.xt():this.kt.assertEmitted("up:fragment:loaded",Object.assign(Object.assign({},this.St()),{callback:this.options.onLoaded,log:["Loaded fragment from %s",this.O.description],skip:()=>this.xt()})),null!==(t=n.evalOption(this.options.fail,this.O))&&void 0!==t?t:!this.O.ok)throw this.Et(this.deriveFailOptions());return this.Et(this.options)}xt(){up.puts("up.render()","Skipping "+this.O.description),this.options.target=":none",this.options.failTarget=":none"}Et(t){t.failPrefixForced&&up.puts("up.render()","Rendering failed response using fail-prefixed options (https://unpoly.com/failed-responses)"),this.jt(t),t.meta=this.Ct();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.kt,this.O,n)&&(t=yield this.Ft(t,n)),t}))}Ft(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.O,preview:this.Tt(n),abort:!1,cache:!1,background:!0}));e.none||(t=e)}return t}))}Tt({preview:t,revalidatePreview:e}){return!0===e?t:e}St(){const{expiredResponse:t}=this.options;return{request:this.kt,response:this.O,renderOptions:this.options,revalidating:!!t,expiredResponse:t}}Ct(){var t,e;let n={revalidating:!!this.options.expiredResponse};return null===(e=(t=up.migrate).processCompilerPassMeta)||void 0===e||e.call(t,n,this.O),n}jt(t){var e,i;const r=this.O.url;let s=r,o=this.kt.hash;o&&(t.hash=o,s+=o),"GET"===this.O.method?t.source=this.improveHistoryValue(t.source,r):(t.source=this.improveHistoryValue(t.source,"keep"),t.history=!!t.location),t.location=this.improveHistoryValue(t.location,s),t.title=this.improveHistoryValue(t.title,this.O.title),t.eventPlans=this.O.eventPlans;let u=this.O.target;u&&(t.target=u),t.acceptLayer=this.O.acceptLayer,t.dismissLayer=this.O.dismissLayer,t.document=this.O.text,this.O.none&&(t.target=":none"),t.context=n.merge(t.context,this.O.context),t.cspNonces=this.O.cspNonces,null!==(e=t.time)&&void 0!==e||(t.time=this.O.lastModified),null!==(i=t.etag)&&void 0!==i||(t.etag=this.O.etag)}},n.memoizeMethod(t.prototype,{St:!0}),t)},2200:function(){var t,e=this&&this.U||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.Pt();if(e)return up.puts("up.render()",e),up.network.loadPage(this.options),n.unresolvablePromise();let o=this.request=up.request(this.Rt());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.Lt(t))))}))}Pt(){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}Rt(){const t=this.At(this.options),e=this.At(this.deriveFailOptions(),{optional:!0});return Object.assign(Object.assign(Object.assign({},this.options),t),n.withRenamedKeys(e,up.fragment.failKey))}getPreflightProps(){return this.Rt()}At(t,e){return new up.Change.FromContent(Object.assign(Object.assign({},t),{preflight:!0})).getPreflightProps(e)}Lt(t){return t instanceof up.Response?this.$t(t):this.Dt(t)}$t(t){return new up.Change.FromResponse(Object.assign(Object.assign({},this.options),{response:t})).execute()}Dt(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,{Rt:!0}),t)},7050:function(){var t=this&&this.U||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.L=t.origin,this.Mt=t.baseLayer}getPreflightProps(){return{mode:this.options.mode,context:this.Nt().context,origin:this.options.origin,target:this.target,bindLayer:this.Mt,layer:"new",bindFragments:e.compact([up.fragment.get(":main",{layer:this.Mt})]),fragments:[]}}execute(t,e){this.responseDoc=t,this.Ht(),e(),this.qt();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.Bt.bind(this));try{return this.Ut(),this.Bt(),up.RenderResult.both(this.It,this.zt)}finally{n()}}Ht(){if(":none"===this.target?this.Vt=document.createElement("up-none"):this.Vt=this.responseDoc.select(this.target),!this.Vt||this.Mt.isClosed())throw new up.CannotMatch}qt(){up.puts("up.render()",`Opening element "${this.target}" in new overlay`),this.Kt(),this.layer=this.Nt(),this.Mt.peel({history:!this.layer.history}),up.layer.stack.push(this.layer),this.layer.createElements(),this.layer.setupHandlers()}Ut(){this.Xt(),this.handleLayerChangeRequests(),this.responseDoc.commitElement(this.Vt),this.layer.setContent(this.Vt),this.setReloadAttrs({newElement:this.Vt,source:this.options.source}),this.responseDoc.finalizeElement(this.Vt),this.It=new up.RenderResult({layer:this.layer,fragments:[this.Vt],target:this.target}),up.hello(this.layer.element,Object.assign(Object.assign({},this.options),{layer:this.layer,dataRoot:this.Vt})),this.Wt(),this.It.finished=this.Gt(),this.layer.opening=!1,this.Jt(),this.abortWhenLayerClosed()}Bt(){if(this.zt)return;let t=this.Qt().other;this.zt=this.executeSteps(t,this.responseDoc)}Gt(){return t(this,void 0,void 0,(function*(){return yield this.layer.startOpenAnimation(),this.abortWhenLayerClosed(),this.H(),this.It}))}Nt(){const t=Object.assign(Object.assign({},this.options),{opening:!0});return up.layer.build(t,(t=>this.options=up.RenderOptions.finalize(t)))}Xt(){var t;"auto"===this.layer.history&&(this.layer.history=up.fragment.hasAutoHistory([this.Vt],this.layer));let{parent:e}=this.layer;(t=this.layer).history&&(t.history=e.history),e.saveHistory(),this.layer.updateHistory(this.options)}H(){var t;null===(t=this.Mt.overlayFocus)||void 0===t||t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.Vt,layer:this.layer,autoMeans:["autofocus","layer"],inputDevice:this.options.inputDevice}).process(this.options.focus)}Wt(){const t=Object.assign(Object.assign({},this.options),{fragment:this.Vt,layer:this.layer,autoMeans:["hash","layer"]});new up.FragmentScrolling(t).process(this.options.scroll)}Kt(){up.event.assertEmitted("up:layer:open",{origin:this.L,baseLayer:this.Mt,layerOptions:this.options,log:"Opening new overlay"})}Jt(){this.layer.emit("up:layer:opened",{origin:this.L,callback:this.layer.callback("onOpened"),log:`Opened new ${this.layer}`})}Qt(){return up.radio.hungrySteps(this.Yt())}Yt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.layer.history})}}},9441:()=>{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.Zt=t.context,this.te=up.fragment.parseTargetSteps(this.target,this.options)}getPreflightProps(){this.ee();let t=this.ne();return{layer:this.layer,bindLayer:this.layer,mode:this.layer.mode,context:e.merge(this.layer.context,this.Zt),origin:this.options.origin,target:this.ie(),fragments:t,bindFragments:t}}ie(){return this.ee(),up.fragment.targetForSteps(this.te)}ne(){return this.ee(),e.map(this.te,"oldElement")}execute(t,e){this.responseDoc=t,this.Ht(),e();let n=this.layer.on("up:layer:accepting up:layer:dimissing",this.Bt.bind(this));try{return this.re(),this.Bt(),up.RenderResult.both(this.se,this.zt)}finally{n()}}re(){this.te.length&&up.puts("up.render()",`Updating "${this.ie()}" in ${this.layer}`),this.oe(),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.ue()}),!1!==this.options.abort&&up.fragment.abort(this.ne(),{reason:"Fragment is being replaced"}),Object.assign(this.layer.context,this.Zt),this.ue()&&this.layer.updateHistory(this.options),this.handleLayerChangeRequests(),this.se=this.executeSteps(this.te,this.responseDoc,this.options)}Bt(){if(this.zt)return;let t=this.Qt().other;this.zt=this.executeSteps(t,this.responseDoc)}ee(){this.ae(),this.ce()}Ht(){this.ae(),this.he(),this.ce(),this.le()}he(){this.te.push(...this.Qt().current)}ae(){this.te=this.te.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}))}le(){this.te=this.responseDoc.selectSteps(this.te)}ce(){this.te=up.fragment.compressNestedSteps(this.te)}Qt(){return up.radio.hungrySteps(this.Yt())}oe(){let t=up.FocusCapsule.preserve(this.layer);this.te.forEach(((e,n)=>{e.focusCapsule=t,n>0&&(e.scroll=!1,e.focus=!1)}))}ue(){return e.evalAutoOption(this.options.history,this.pe.bind(this))}pe(){const t=e.map(this.te,"oldElement");return up.fragment.hasAutoHistory(t,this.layer)}Yt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.ue()})}},e.memoizeMethod(t.prototype,{ee:!0,ae:!0,ue:!0,Qt:!0}),t)},9489:function(){var t=this&&this.U||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.fe=t.noneOptions||{},this.te=e.copy(t.steps)}execute(t){var e;if(this.responseDoc=t,this.te=t.selectSteps(this.te),this.te=t.commitSteps(this.te),!this.te.length)return this.de();this.renderResult=new up.RenderResult({layer:null===(e=this.te[0])||void 0===e?void 0:e.layer,target:up.fragment.targetForSteps(this.te)}),this.te.reverse();const n=this.te.map((t=>this.me(t)));return this.renderResult.finished=this.Gt(n),this.renderResult}de(){return this.H(null,this.fe),this.Wt(null,this.fe),up.RenderResult.buildNone()}Gt(e){return t(this,void 0,void 0,(function*(){yield Promise.all(e);for(let t of this.te)this.abortWhenLayerClosed(t.layer);return this.renderResult}))}ge(t){let e=t.matches("up-wrapper")?t.children:[t];this.renderResult.fragments.unshift(...e)}me(t){switch(this.setReloadAttrs(t),t.placement){case"swap":if(this.ve(t))return this.H(t.oldElement,t),this.Wt(t.oldElement,t),Promise.resolve();{this.be(t);const e=t.oldElement.parentNode,i=Object.assign(Object.assign({},t),{beforeStart(){up.fragment.markAsDestroying(t.oldElement)},afterInsert:()=>{this.ye(t),this.responseDoc.finalizeElement(t.newElement),this.we(t),up.hello(t.newElement,t),this.ge(t.newElement)},beforeDetach:()=>{up.script.clean(t.oldElement,{layer:t.layer})},afterDetach(){n.cleanJQuery(),up.fragment.emitDestroyed(t.oldElement,{parent:e,log:!1})},scrollNew:()=>{this.H(t.newElement,t),this.Wt(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.me(r).then((()=>{n.unwrap(i),this.H(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.responseDoc.finalizeElement(e),up.hello(e,t),this.ge(e),this.H(e,t),this.Wt(e,t),up.animate(e,t.transition,t).then((()=>n.unwrap(e)))}default:up.fail("Unknown placement: %o",t.placement)}}ve(t){if(!t.keep)return;const{oldElement:e,newElement:i}=t;let r;if(!n.booleanAttr(e,"up-keep"))return;let s=up.fragment.toTarget(e);const o={layer:t.layer};if(r=t.descendantsOnly?up.fragment.get(i,s,o):n.subtreeFirst(i,s,o),r&&!1!==n.booleanAttr(r,"up-keep")){const n={oldElement:e,newElement:r,newData:up.script.data(r),renderOptions:t};if(!up.fragment.emitKeep(n).defaultPrevented)return n}}be(t){const e=[];if(t.keep)for(let n of t.oldElement.querySelectorAll("[up-keep]")){let i=this.ve(Object.assign(Object.assign({},t),{oldElement:n,descendantsOnly:!0}));if(i){const t=n.cloneNode(!0);n.insertAdjacentElement("beforebegin",t),n.classList.add("up-keeping"),up.script.disableSubtree(i.newElement);let r=up.viewport.subtree(i.oldElement);i.revivers=r.map((function(t){let e=up.viewport.copyCursorProps(t);return()=>up.viewport.copyCursorProps(e,t)})),this._e(document.body)?i.newElement.replaceWith(n):document.body.append(n),e.push(i)}}t.keepPlans=e}ye(t){for(let e of t.keepPlans){e.newElement.replaceWith(e.oldElement);for(let t of e.revivers)t()}}we(t){for(let e of t.keepPlans)e.oldElement.classList.remove("up-keeping")}_e(t){return e.some(this.te,(e=>e.oldElement.contains(t)))}H(t,e){return new up.FragmentFocus(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoFocus})).process(e.focus)}Wt(t,e){return new up.FragmentScrolling(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoScroll})).process(e.scroll)}}},1569:()=>{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.Oe=t,this.ke=e,this.R=n,this.Se=i,this.xe=r||t,this.Ee=s,o||(o={}),o.layer=n,this.je=o}run(){this.R.asCurrent((()=>{this.setCompileData();for(let t of this.ke)this.Ce(t)}))}setCompileData(){if(this.Se&&(this.xe.upCompileData=this.Se),this.Ee)for(let t in this.Ee)for(let e of this.Fe(t))e.upCompileData=this.Ee[t]}Ce(t){var e,n;const i=this.Te(t);if(i.length){if(t.isDefault||up.puts("up.hello()",'Compiling %d× "%s" on %s',i.length,t.selector,this.R),t.batch)this.Pe(t,i);else for(let e of i)this.Re(t,e);return null===(n=(e=up.migrate).postCompile)||void 0===n?void 0:n.call(e,i,t)}}Re(t,e){const n=[e];if(1!==t.length){const t=up.script.data(e);n.push(t,this.je)}const i=this.Le(t,e,n);up.destructor(e,i)}Pe(e,n){const i=[n];if(1!==e.length){const e=t.map(n,up.script.data);i.push(e,this.je)}this.Le(e,n,i)&&up.fail("Compilers with { batch: true } cannot return destructors")}Le(t,e,n){return up.error.guard((()=>t.apply(e,n)))}Fe(e){return up.fragment.subtree(this.Oe,t.evalOption(e),{layer:this.R})}Te(e){let n=this.Fe(e.selector);return t.filter(n,(t=>{let n=t.upAppliedCompilers||(t.upAppliedCompilers=new Set);if(!n.has(e))return n.add(e),!0}))}}},3742:()=>{const t=up.util,e=up.element;up.Config=class Config{constructor(t=(()=>({}))){this.Ae=t,this.reset(),document.addEventListener("up:framework:reset",(()=>this.reset()))}reset(){Object.assign(this,this.Ae())}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)}}},2737:()=>{const t=up.util,e=up.element;up.CSSTransition=class CSSTransition{constructor(t,e,n){this.I=t,this.$e=e,this.De=Object.keys(this.$e),this.Me=n.finishEvent,this.Ne=n.duration,this.He=n.easing,this.qe=!1}start(){return 0===this.De.length?(this.qe=!0,Promise.resolve()):(this.Be=t.newDeferred(),this.Ue(),this.Ie=new Date,this.ze(),this.Ve(),this.Ke(),this.Xe(),this.Be)}Ve(){this.Me&&(this.We=up.on(this.I,this.Me,this.Ge.bind(this)))}Ge(t){t.stopPropagation(),this.Gt()}ze(){this.Je=t.timer(this.Ne+100,(()=>this.Gt()))}Qe(){clearTimeout(this.Je)}Ke(){this.Ye=up.on(this.I,"transitionend",this.Ze.bind(this))}Ze(e){if(e.target!==this.I)return;if(new Date-this.Ie<=.25*this.Ne)return;const n=e.propertyName;t.contains(this.De,n)&&this.Gt()}Gt(){var t,n;this.qe||(this.qe=!0,this.Qe(),null===(t=this.We)||void 0===t||t.call(this),null===(n=this.Ye)||void 0===n||n.call(this),e.concludeCSSTransition(this.I),this.tn(),this.Be.resolve())}Ue(){const t=e.style(this.I,["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.I,n);this.en=e.setStyleTemp(this.I,i)}this.nn=e.concludeCSSTransition(this.I)}}tn(){var t,e;null===(t=this.en)||void 0===t||t.call(this),null===(e=this.nn)||void 0===e||e.call(this)}Xe(){e.setStyle(this.I,{"transition-property":this.De.join(),"transition-duration":`${this.Ne}ms`,"transition-timing-function":this.He}),e.setStyle(this.I,this.$e)}}},3635:()=>{const t=up.util;up.DestructorPass=class DestructorPass{constructor(t,e){this.rn=t,this.sn=e}run(){for(let e of this.un()){let n=t.pluckKey(e,"upDestructors");null==n||n.clean(e)}}un(){const t=Object.assign(Object.assign({},this.sn),{destroying:!0});return up.fragment.subtree(this.rn,".up-can-clean",t)}}},1906:()=>{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.an(),this.baseLayer?this.baseLayer.asCurrent((()=>this.cn())):this.cn(),this.event}cn(){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`)}an(){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)}}},4158:()=>{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.hn=this.constructor.ln(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.hn]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),e[this.hn]=this,this.element.addEventListener(...this.pn())}pn(){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.hn],this.element.removeEventListener(...this.pn())}nativeCallback(e){if(up.framework.beforeBoot&&!this.beforeBoot)return;let n=e.target;if(this.selector&&(n=n.closest(t.evalOption(this.selector))),(!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.ln(t)]}static ln(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[]}}},3139:()=>{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.fn((function(t){const n=new up.EventListener(t);return n.bind(),e(n.unbind.bind(n))})),e.clean}fn(t){for(let e of this.elements)for(let n of this.eventTypes)t(this.dn(e,n))}dn(t,e){return Object.assign(Object.assign({},this.attributes()),{element:t,eventType:e})}unbind(){this.fn((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))}}},2214:function(){var t=this&&this.U||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){this.sn=e,this.Oe=t,this.mn=up.form.getScope(t),this.gn=n,this.vn=e.batch}start(){this.bn=null,this.yn=this.wn(),this._n=null,this.On=!1,this.o=e.cleaner(),this.kn(this.Oe),this.Oe.addEventListener("up:fragment:inserted",(({target:t})=>{t!==this.Oe&&this.kn(t)})),this.o(up.fragment.onAborted(this.mn,(()=>this.Sn()))),this.o(up.on(this.mn,"reset",(()=>this.xn())))}stop(){this.Sn(),this.o.clean()}En(t){let n=e.copy(this.sn);return up.form.watchOptions(t,n,{defaults:{event:"input"}})}kn(t){for(let e of up.form.fields(t))this.jn(e)}jn(t){let e=this.En(t);this.o(up.on(t,e.event,(()=>this.Cn(e))))}Sn(){this.bn=null}Fn(t,n){this.bn=t,this.Tn=n;let i=n.delay||0;clearTimeout(this._n),this._n=e.timer(i,(()=>{this._n=null,this.Pn()}))}Rn(t){return!e.isEqual(t,this.yn)&&!e.isEqual(this.bn,t)}Pn(){return t(this,void 0,void 0,(function*(){if(!this.bn)return;if(this.On)return;if(this._n)return;if(!this.mn.isConnected)return;let t=e.omit(this.Tn,["event","delay"]);const n=this.Ln(this.yn,this.bn);this.yn=this.bn,this.bn=null,this.On=!0,this.Tn=null;const i=[];if(this.vn)i.push(this.An(n,t));else for(let e in n){const r=n[e];i.push(this.An(r,e,t))}if(e.some(i,e.isPromise)){let t=Promise.allSettled(i);yield t}this.On=!1,this.Pn()}))}An(...t){return up.error.guard(this.gn,...t)}Ln(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}wn(){return up.Params.fromContainer(this.Oe).toObject()}Cn(t={}){const e=this.wn();this.Rn(e)&&this.Fn(e,t)}xn(){e.task((()=>this.Cn()))}}},5949:()=>{const t=up.util;up.FIFOCache=class FIFOCache{constructor({capacity:e=10,normalizeKey:n=t.identity}={}){this.$n=new Map,this.Dn=e,this.Mn=n}get(t){return t=this.Mn(t),this.$n.get(t)}set(t,e){if(this.$n.size===this.Dn){let t=this.$n.keys().next().value;this.$n.delete(t)}t=this.Mn(t),this.$n.set(t,e)}clear(){this.$n.clear()}}},665:()=>{up.FocusCapsule=class FocusCapsule{constructor(t,e){this.I=t,this.Nn=e,this.Hn=up.viewport.copyCursorProps(this.I)}wasLost(){return document.activeElement!==this.I&&!this.qn}autoVoid(){up.on("focusin",{once:!0},(()=>this.qn=!0))}restore(t,e){if(!this.wasLost())return!1;let n=up.fragment.get(this.Nn,{layer:t});return n?(up.viewport.copyCursorProps(this.Hn,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}}},5240:function(){var t=this&&this.U||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.Bn||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.Un=t,this.In=[],this.zn=null,this.Vn=!1,this.Kn(),this.Xn()}Xn(){up.fragment.onAborted(this.Un,(t=>this.Wn(t)))}Wn(t){this.In.length&&(this.In=[],this.Gn.reject(new up.Aborted(t.reason)),this.Kn())}Kn(){this.Gn=n.newDeferred()}watchContainer(t){let{event:e}=this.Jn(t);up.on(t,e,{guard:()=>up.fragment.isAlive(t)},(()=>up.error.muteUncriticalRejection(this.validate({origin:t}))))}validate(t={}){let e=this.Qn(t);return this.In.push(...e),this.Yn(),this.Gn}Qn(t){let e=this.Zn(t)||this.ti(t)||this.ei(t.origin);for(let n of e)n.renderOptions=this.Jn(n.origin,t),n.target=up.fragment.resolveOrigin(n.target,n);return e}ti(t){var{origin:n}=t,i=e(t,["origin"]);if(up.form.isField(n))return this.ni(n)||this.ii(n,i)}ii(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}Zn({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)})))}}ei(t){return up.puts("up.validate()","Validating element %o",t),[{element:t,target:up.fragment.toTarget(t),origin:t}]}ni(t){let e=t.closest("[up-validate]");if(e){let n=i.booleanOrStringAttr(e,"up-validate");return this.Zn({target:n,origin:t})}}Jn(t,e){return up.form.watchOptions(t,e,{defaults:{event:"change"}})}Yn(){let t=this.In.map((t=>t.renderOptions.delay)),e=Math.min(...t)||0;clearTimeout(this.zn),this.zn=n.timer(e,(()=>{this.zn=null,this.ri()}))}ri(){up.error.muteUncriticalRejection(this.si())}si(){return t(this,void 0,void 0,(function*(){if(!this.In.length)return;if(this.Vn)return;if(this.zn)return;let t=this.oi(this.In);this.In=[],this.Vn=!0;let e=this.Gn;this.Kn();try{e.resolve(up.render(t)),yield e}finally{this.Vn=!1,this.ri()}}))}oi(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=n.mergeDefined(...o,up.form.destinationOptions(this.Un));return u.target=n.map(t,"target").join(", "),u.origin=this.Un,null!==(e=u.focus)&&void 0!==e||(u.focus="keep"),u.failOptions=!1,u.defaultMaybe=!0,u.params=up.Params.merge(u.params,...n.map(o,"params")),u.headers=n.merge(u.headers,...n.map(o,"headers")),this.ui(u.headers,s),u.feedback=n.some(o,"feedback"),u.data=void 0,u.dataMap=n.mapObject(t,(({target:t,element:e,renderOptions:{data:n,keepData:i}})=>[t,i?up.data(e):n])),u.preview=void 0,u.previewMap=n.mapObject(t,(({target:t,renderOptions:{preview:e}})=>[t,e])),u.placeholder=void 0,u.placeholderMap=n.mapObject(t,(({target:t,renderOptions:{placeholder:e}})=>[t,e])),u.disable=t.map((t=>up.fragment.resolveOrigin(t.renderOptions.disable,t))),u.guardEvent=up.event.build("up:form:validate",{fields:r,log:"Validating form",params:u.params,form:this.Un}),u}ui(t,e){let n=up.protocol.headerize("validate"),i=e.join(" ");(!i||i.length>up.protocol.config.maxHeaderSize)&&(i=":unknown"),t[n]=i}static forElement(t){let e=up.form.get(t);return e.upFormValidator||(e.upFormValidator=new this(e))}}},2587:()=>{const t=up.util,e=/^([^ >+(]+) (.+)$/;up.FragmentFinder=class FragmentFinder{constructor(t){var e;this.sn=t,this.L=t.origin,this.ai=t.selector,this.ci=t.document||window.document,this.hi=null!==(e=t.match)&&void 0!==e?e:up.fragment.config.match,this.li=t.preferOldElements}find(){return this.pi()||this.fi()||this.di()}pi(){if(this.li)return this.li.find((t=>this.ci.contains(t)&&up.fragment.matches(t,this.ai)))}fi(){var t;if("region"===this.hi&&!up.fragment.containsMainPseudo(this.ai)&&(null===(t=this.L)||void 0===t?void 0:t.isConnected))return this.mi()||this.gi()}mi(){return up.fragment.closest(this.L,this.ai,this.sn)}gi(){let n=up.fragment.splitTarget(this.ai);return t.findResult(n,(t=>{let n=t.match(e);if(n){let t=up.fragment.closest(this.L,n[1],this.sn);if(t)return up.fragment.getFirstDescendant(t,n[2])}}))}di(){return up.fragment.getFirstDescendant(this.ci,this.ai,this.sn)}}},7031:()=>{const t=up.util,e=up.element,n={preventScroll:!0};up.FragmentFocus=class FragmentFocus extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","focusCapsule","inputDevice"])}processPrimitive(e){switch(e){case"keep":return this.vi();case"restore":return this.bi();case"target":case!0:return this.yi(this.fragment);case"layer":return this.yi(this.layer.getFocusElement());case"main":return this.wi(":main");case"hash":return this._i();case"autofocus":return this.Oi();default:if(t.isString(e))return this.wi(e)}}processElement(t){return this.yi(t)}resolveCondition(t){return"lost"===t?this.ki():super.resolveCondition(t)}wi(t){let e=this.findSelector(t);return this.yi(e)}vi(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.restore(this.layer,n)}bi(){return up.viewport.restoreFocus({layer:this.layer})}Oi(){let t=this.fragment&&e.subtreeFirst(this.fragment,"[autofocus]");if(t)return this.yi(t)}yi(t){if(t)return up.focus(t,Object.assign(Object.assign({force:!0},n),{inputDevice:this.inputDevice})),!0}_i(){let t=up.viewport.firstHashTarget(this.hash,{layer:this.layer});if(t)return this.yi(t)}ki(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.wasLost()}}},8057:()=>{const t=up.element;up.FragmentPolling=class FragmentPolling{constructor(t){this.sn=up.radio.pollOptions(t),this.rn=t,up.destructor(t,this.Si.bind(this)),up.fragment.onAborted(t,this.xi.bind(this)),this.Ei="initialized",this.ji=!0,this.Ci=!1,this.Fi()}static forFragment(t){return t.upPolling||(t.upPolling=new this(t))}onPollAttributeObserved(){this.Ti()}Si(){this.Pi()}Ti(t){if(Object.assign(this.sn,t),"started"!==this.Ei){if(!up.fragment.isTargetable(this.rn))return void up.warn("[up-poll]","Cannot poll untargetable fragment %o",this.rn);this.Ei="started",this.Ri(),this.Li()}}Pi(){var t;"started"===this.Ei&&(this.Ai(),this.Ei="stopped",null===(t=this.unbindEvents)||void 0===t||t.call(this))}forceStart(t){Object.assign(this.sn,t),this.forceStarted=!0,this.Ti()}forceStop(){this.Pi(),this.forceStarted=!1}Ri(){this.unbindEvents||(this.unbindEvents=up.on("visibilitychange up:layer:opened up:layer:dismissed up:layer:accepted",this.$i.bind(this)))}$i(){this.Di()&&this.Li()}Di(){return!document.hidden&&("any"===this.sn.ifLayer||this.Mi())}Ai(){clearTimeout(this.Ni),this.Ni=null}Li(){this.Ni||this.Ci||(this.Ai(),this.Ni=setTimeout(this.Hi.bind(this),this.qi()))}Hi(){this.Ni=null,this.Bi()}Bi(){"started"===this.Ei&&(this.Di()?this.Ui():up.puts("[up-poll]","Will not poll hidden fragment"))}Ii(){var e,n;return null!==(n=null!==(e=this.sn.interval)&&void 0!==e?e:t.numberAttr(this.rn,"up-interval"))&&void 0!==n?n:up.radio.config.pollInterval}qi(){return Math.max(this.Ii()-this.zi(),0)}zi(){return new Date-this.Vi}Mi(){var t,e;return this.layer||(this.layer=up.layer.get(this.rn)),null===(e=null===(t=this.layer)||void 0===t?void 0:t.isFront)||void 0===e?void 0:e.call(t)}Ui(){this.Ai();let t=this.ji;try{this.ji=!1,this.Ci=!0,up.reload(this.rn,this.Ki()).then(this.Xi.bind(this),this.Wi.bind(this))}finally{this.ji=t}}Ki(){let t=up.event.build("up:fragment:poll",{log:["Polling fragment",this.rn]});return Object.assign(Object.assign({},this.sn),{guardEvent:t})}xi({newLayer:t}){this.ji&&!t&&this.Pi()}Xi({fragment:t}){this.Ci=!1,this.Fi(),t?this.Gi(t):this.Li()}Gi(t){this.Pi(),this.forceStarted&&up.fragment.matches(this.rn,t)&&this.constructor.forFragment(t).forceStart(this.sn)}Wi(t){this.Ci=!1,this.Fi(),this.Li(),up.error.throwCritical(t)}Fi(){this.Vi=new Date}}},2828:()=>{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)}}},4850:()=>{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"reset":return this.Ji();case"layer":return this.Qi();case"main":return this.Yi(":main");case"restore":return this.Zi();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.tr(this.fragment);default:if(t.isString(e))return this.Yi(e)}}processElement(t){return this.tr(t)}tr(t){if(t)return up.reveal(t,this.attributes()),!0}Yi(t){let e=this.findSelector(t);return this.tr(e)}Qi(){return this.tr(this.layer.getBoxElement())}Ji(){return up.viewport.resetScroll(Object.assign(Object.assign({},this.attributes()),{around:this.fragment})),!0}Zi(){return up.viewport.restoreScroll(Object.assign(Object.assign({},this.attributes()),{around:this.fragment}))}}},7956:()=>{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={}){if(super(t),!this.mode)throw"missing { mode } option"}setupHandlers(){up.link.convertClicks(this)}teardownHandlers(){}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.er)&&void 0!==t?t:this.er=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.nr(t).bind()}off(...t){return this.nr(t).unbind()}nr(t){return up.EventListenerGroup.fromBindArgs(t,{guard:t=>this.ir(t),elements:[this.element],baseLayer:this})}ir(t){return this.contains(t.target)}wasHitByMouseEvent({clientX:t,clientY:e}){const n=document.elementFromPoint(t,e);return!n||this.contains(n)}rr(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})}emit(...t){return this.rr(t).emit()}isDetached(){return!this.element.isConnected}saveHistory(){this.history&&(this.savedTitle=document.title,this.savedMetaTags=up.history.findMetaTags(),this.savedLocation=up.history.location,this.savedLang=up.history.getLang())}restoreHistory(){this.showsLiveHistory()&&(this.savedLocation&&up.history.push(this.savedLocation),this.savedTitle&&(document.title=this.savedTitle),this.savedMetaTags&&up.history.updateMetaTags(this.savedMetaTags),e.isString(this.savedLang)&&up.history.updateLang(this.savedLang))}asCurrent(t){return this.stack.asCurrent(this,t)}updateHistory(t){var n,i;e.isString(t.location)&&(this.location=t.location),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.metaTags=t.metaTags),e.isString(t.title)&&(this.title=t.title),e.isString(t.lang)&&(this.lang=t.lang)}showsLiveHistory(){return this.history&&this.isFront()}get title(){return this.showsLiveHistory()?document.title:this.savedTitle}set title(t){this.savedTitle=t,this.showsLiveHistory()&&(document.title=t)}get metaTags(){return this.showsLiveHistory()?up.history.findMetaTags():this.savedMetaTags}set metaTags(t){this.savedMetaTags=t,this.showsLiveHistory()&&up.history.updateMetaTags(t)}get lang(){return this.showsLiveHistory()?up.history.getLang():this.savedLang}set lang(t){this.savedLang=t,this.showsLiveHistory()&&up.history.updateLang(t)}get location(){return this.showsLiveHistory()?up.history.location:this.savedLocation}set location(t){(this.location!==(t=e.normalizeURL(t))||this.opening)&&(this.savedLocation=t,this.showsLiveHistory()&&up.history.push(t),this.opening||this.emit("up:layer:location:changed",{location:t}))}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())}}},7101:()=>{var t;up.Layer.Cover=((t=class Cover extends up.Layer.OverlayWithViewport{}).mode="cover",t)},5580:()=>{var t;up.Layer.Drawer=((t=class Drawer extends up.Layer.OverlayWithViewport{}).mode="drawer",t)},86:()=>{var t;up.Layer.Modal=((t=class Modal extends up.Layer.OverlayWithViewport{}).mode="modal",t)},7403:function(){var t,e=this&&this.U||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.sr());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("-")}sr(){const{parent:t}=this;return this.mode===t.mode?1+t.sr():0}setupHandlers(){var t,e;super.setupHandlers(),this.overlayFocus=new up.OverlayFocus(this),this.ur("button")&&this.createDismissElement(this.getBoxElement()),this.ur("outside")&&(this.viewportElement?up.on(this.viewportElement,"up:click",(t=>{t.target===this.viewportElement&&this.ar(t,!0)})):this.unbindParentClicked=this.parent.on("up:click",((t,e)=>{if(!up.layer.isWithinForeignOverlay(e)){const n=this.origin&&this.origin.contains(e);this.ar(t,n)}}))),this.ur("key")&&(this.unbindEscapePressed=up.event.onEscape((t=>this.onEscapePressed(t)))),this.registerClickCloser("up-accept",((t,e)=>{this.accept(t,e)})),this.registerClickCloser("up-dismiss",((t,e)=>{this.dismiss(t,e)})),null===(e=(t=up.migrate).registerLayerCloser)||void 0===e||e.call(t,this),this.cr(this.acceptEvent,this.accept),this.cr(this.dismissEvent,this.dismiss),this.on("up:click","label[for]",((t,e)=>this.hr(t,e)))}hr(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()}}ar(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.ur("key")&&(up.event.halt(t,{log:!0}),up.error.muteUncriticalSync((()=>this.dismiss(":key"))))}}registerClickCloser(t,e){let i=`[${t}]`;this.on("up:click",i,(function(r){up.event.halt(r,{log:!0});const s=r.target.closest(i),o=n.jsonAttr(s,t),u={origin:s},a=new up.OptionsParser(s,u);a.booleanOrString("animation"),a.string("easing"),a.number("duration"),a.string("confirm"),up.error.muteUncriticalSync((()=>e(o,u)))}))}cr(t,e){if(t)return this.on(t,(t=>{t.preventDefault(),up.error.muteUncriticalSync((()=>e.call(this,t,{response:t.response})))}))}tryAcceptForLocation(t){this.lr(this.acceptLocation,this.accept,t)}tryDismissForLocation(t){this.lr(this.dismissLocation,this.dismiss,t)}lr(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.unbindParentClicked)||void 0===t||t.call(this),null===(e=this.unbindEscapePressed)||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(){}pr(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.pr({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.pr({boxAnimation:n,backdropAnimation:"fade-out",easing:t.easing||this.closeEasing,duration:t.duration||this.closeDuration})}accept(t=null,e={}){return this.dr("accept",t,e)}dismiss(t=null,e={}){return this.dr("dismiss",t,e)}ur(t){return i.contains(this.dismissable,t)}dr(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)},6412:()=>{up.Layer.OverlayWithTether=class OverlayWithTether extends up.Layer.Overlay{createElements(){this.origin||up.fail("Missing { origin } option"),this.mr=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.mr.parent),this.createContentElement(this.element)}onContentSet(){this.mr.start(this.element)}onElementsRemoved(){this.mr.stop()}sync(){this.isOpen()&&(this.isDetached()||this.mr.isDetached()?this.dismiss(":detached",{animation:!1,preventable:!1}):this.mr.sync())}}},7965:()=>{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)}}},4552:()=>{var t;up.Layer.Popup=((t=class Popup extends up.Layer.OverlayWithTether{}).mode="popup",t)},7771:()=>{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.gr()}dismiss(){this.gr()}gr(){up.fail("Cannot close the root layer")}toString(){return"root layer"}}).mode="root",t)},6066:()=>{var t;const e=up.util,n=up.element;up.LayerLookup=(t=class LayerLookup{constructor(t,n){this.i=t,!1!==n.normalizeLayerOptions&&up.layer.normalizeOptions(n),this.sn=n,this.vr=e.getSimpleTokens(n.layer)}all(){let t=e.flatMap(this.vr,(t=>this.br(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()}yr(t){return t=n.get(t),e.find(this.i.reversed(),(e=>e.contains(t)))}wr(t){return this.i.at(t)}br(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.yr(t);switch(t){case"any":return[this._r(),...this.i.reversed()];case"current":return this._r();case"closest":return this.i.selfAndAncestorsOf(this._r());case"parent":return this._r().parent;case"ancestor":case"ancestors":return this._r().ancestors;case"child":return this._r().child;case"descendant":case"descendants":return this._r().descendants;case"subtree":return this._r().subtree;case"new":return"new";case"root":return this.i.root;case"overlay":case"overlays":return e.reverse(this.i.overlays);case"front":return this.i.front;case"origin":return this.Or();default:return up.fail("Unknown { layer } option: %o",t)}}Or(){let{origin:t,originLayer:e}=this.sn;return e||(t?this.yr(t):void 0)}_r(){let{baseLayer:t}=this.sn;if(e.isString(t)){const e=Object.assign(Object.assign({},this.sn),{baseLayer:this.i.current,normalizeLayerOptions:!1,layer:t});return this.constructor.all(this.i,e)[0]}return t||this.Or()||this.i.current}},e.memoizeMethod(t.prototype,{_r:!0,Or:!0}),t)},6387:()=>{const t=up.util;up.LayerStack=class LayerStack{constructor(){this.kr=[],this.layers=[this.Sr()]}Sr(){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.kr=[],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.kr.push(t),e()}finally{this.kr.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.kr)||this.front}get front(){return t.last(this.layers)}}},3698:()=>{const t=up.util;up.LinkCurrentURLs=class LinkCurrentURLs{constructor(e){if(this.Er=up.link.isSafe(e),this.Er){const n=e.getAttribute("href");n&&"#"!==n&&(this.jr=t.matchableURL(n));const i=e.getAttribute("up-href");i&&(this.Cr=t.matchableURL(i));const r=e.getAttribute("up-alias");r&&(this.Fr=new up.URLPattern(r))}}isCurrent(t){var e,n;return!(!t||this.jr!==t&&this.Cr!==t&&!(null===(n=null===(e=this.Fr)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1)))}}},2460:()=>{const t=up.util,e=up.element;up.LinkFollowIntent=class LinkFollowIntent{constructor(t,e){this.Tr=t,this.gn=e,this.Pr=null,this.Rr("mouseenter mousedown touchstart",(t=>this.Lr(t))),this.Rr("mouseleave",(()=>this.Ar())),up.fragment.onAborted(this.Tr,(()=>this.Ar()))}Rr(t,e){up.on(this.Tr,t,{passive:!0},e)}Lr(e){if(up.link.shouldFollowEvent(e,this.Tr))if(this.Ar(),"mouseenter"===e.type){let n=this.$r();this.Dr=t.timer(n,(()=>this.An(e)))}else this.An(e)}Ar(){var t;clearTimeout(this.Dr),(null===(t=this.Pr)||void 0===t?void 0:t.background)&&this.Pr.abort(),this.Pr=null}$r(){var t;return null!==(t=e.numberAttr(this.Tr,"up-preload-delay"))&&void 0!==t?t:up.link.config.preloadDelay}An(t){up.log.putsEvent(t),this.gn({onRequestKnown:t=>this.Pr=t})}}},1653:()=>{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){}}}},7792:function(){var t=this&&this.U||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.Mr=`up-${t}`,this.ai=`.${this.Mr}`,this.finishEvent=`up:${t}:finish`,this.finishCount=0,this.Nr=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.Hr(t);let e=this.qr(t,s);return e=e.then((()=>this.Br(t))),e}}finish(t){var e,n;if(this.finishCount++,0!==this.Nr&&up.motion.isEnabled()){t=this.Ur(t);for(let e of t)this.Ir(e);return null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.motion.finish()")}}Ur(t){return t?e.flatMap(t,(t=>n.list(t.closest(this.ai),t.querySelectorAll(this.ai)))):document.querySelectorAll(this.ai)}isActive(t){return t.classList.contains(this.Mr)}Ir(t){this.zr(t)}zr(t,e={}){return e=Object.assign({target:t,log:!1},e),up.emit(this.finishEvent,e)}Hr(t){this.Nr++,this.Vr(t,!0)}Br(t){this.Nr--,this.Vr(t,!1)}Vr(t,e){for(let n of t)n.classList.toggle(this.Mr,e)}qr(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.zr(n,{forwarded:!0})}));return e().then(n)}reset(){return t(this,void 0,void 0,(function*(){yield this.finish(),this.finishCount=0,this.Nr=0}))}}},4308:()=>{const t=up.util,e=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.Kr(e,this,t,i)}}return new Function(...t,e)}toString(){return`nonce-${this.nonce} ${this.script}`}Kr(t,n,i,r){let s,o=`\n try {\n up.noncedEval.value = (function(${i.join()}) {\n ${t}\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=e.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()}}Xr(e){return this.nonce&&t.contains(e,this.nonce)}static adoptNonces(n,i){if(!(null==i?void 0:i.length))return;const r=t.memoize(up.protocol.cspNonce);t.each(up.script.config.nonceableAttributes,(s=>{let o=e.subtree(n,`[${s}^="nonce-"]`);t.each(o,(t=>{let e=t.getAttribute(s),n=this.fromString(e),o=(t,...n)=>up.log.warn("up.render()",`Cannot use callback [${s}="${e}"]: ${t}`,...n);if(!n.Xr(i))return o("Callback's CSP nonce (%o) does not match response header (%o)",n.nonce,i);let u=r();if(!u)return o("Current page's CSP nonce is unknown");n.nonce=u,t.setAttribute(s,n.toString())}))}))}}},1104:()=>{const t=up.util,e=up.element;up.OptionsParser=class OptionsParser{constructor(t,e,n={}){this.sn=e,this.I=t,this.Wr=n,this.Gr=n.fail,this.Jr=n.closest,this.Qr=n.attrPrefix||"up-",this.Yr=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.Zr(n));let u=this.sn[n];for(let t of o)null!=u||(u=this.ts(e,this.I,t));null!=u||(u=null!==(s=i.default)&&void 0!==s?s:this.Yr[n]);let a,c=i.normalize;if(c&&(u=c(u)),t.isDefined(u)&&(this.sn[n]=u),this.Gr&&(a=up.fragment.failKey(n))){const n=t.compact(t.map(o,(t=>this.es(t))));this.parse(e,a,Object.assign(Object.assign({},i),{attr:n}))}}include(t){let e=t(this.I,this.sn,this.Wr);Object.assign(this.sn,e)}ts(t,n,i){return this.Jr?e.closestAttr(n,i,t):t(n,i)}es(t){return this.ns(t,this.Qr+"on-")||this.ns(t,this.Qr)}ns(t,e){if(t.startsWith(e))return`${e}fail-${t.substring(e.length)}`}Zr(e){return`${this.Qr}${t.camelToKebabCase(e)}`}}},8665:()=>{const t=up.element,e=up.util;up.OverlayFocus=class OverlayFocus{constructor(t){this.R=t,this.yi=this.R.getFocusElement(),this.rs=this.R.trapFocus}moveToFront(){this.ss||(this.ss=!0,this.os=t.setAttrsTemp(this.yi,{tabindex:"0",role:"dialog","aria-modal":this.rs.toString()}),this.rs&&(this.us=up.on("focusin",(t=>this.cs(t))),this.hs=t.affix(this.yi,"beforebegin","up-focus-trap[tabindex=0]"),this.ls=t.affix(this.yi,"afterend","up-focus-trap[tabindex=0]")))}moveToBack(){this.teardown()}teardown(){this.ss&&(this.ss=!1,this.os(),this.rs&&(this.us(),this.hs.remove(),this.ls.remove()))}cs(t){const{target:e}=t;this.ps||up.layer.isWithinForeignOverlay(e)||(this.ps=!0,e===this.hs?this.fs():e!==this.ls&&this.R.contains(e)||this.ds(),this.ps=!1)}ds(t){up.focus(this.yi,t)}fs(){this.gs(this.R.getBoxElement())||this.ds()}gs(t){for(let n of e.reverse(t.children))if(up.viewport.tryFocus(n)||this.gs(n))return!0}}},3645:()=>{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.vs(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(){let e=t.map(this.entries,this.bs.bind(this));return e=t.compact(e),e.join("&")}bs(e){const{value:n}=e;if(this.ys(n))return;let i=encodeURIComponent(e.name);return t.isGiven(n)&&(i+="=",i+=encodeURIComponent(n)),i}ys(t){return t instanceof Blob}hasBinaryValues(){const e=t.map(this.entries,"value");return t.some(e,this.ys)}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.ws(e):t.isFormData(e)?this._s(e):t.isObject(e)?this.Os(e):up.fail("Unsupport params type: %o",e))}Os(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)}}ws(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)}}_s(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.ks(e))}ks(t){return e=>e.name===t}get(t){return this.vs(t)?this.getAll(t):this.getFirst(t)}getFirst(e){const n=t.find(this.entries,this.ks(e));return null==n?void 0:n.value}getAll(e){if(this.vs(e))return this.getAll(e);{const n=t.map(this.entries,this.ks(e));return t.map(n,"value")}}vs(t){return t.endsWith("[]")}[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(...t){return t.reduce((function(t,e){return t.addAll(e),t}),new up.Params)}}},8397:()=>{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.o=i}undo(...t){this.ended?reportError(new up.Error("Preview used after end of request")):this.o.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.o.clean()}setAttrs(...t){let[n,i]=this.Ss(t,"val","val");this.undo(e.setAttrsTemp(n,i))}addClass(...t){let[n,i]=this.Ss(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.Ss(t,"val","val");this.undo(e.removeClassTemp(n,i))}setStyle(...t){let[n,i]=this.Ss(t,"val","val");this.undo(e.setStyleTemp(n,i))}disable(...t){let[e]=this.Ss(t,"val");this.undo(up.form.disable(e))}insert(...e){let[n,i="beforeend",r]=this.Ss(e,"val",t.isAdjacentPosition,"val");this.undo(up.fragment.insertTemp(n,i,r))}show(...t){let[n]=this.Ss(t,"val");this.undo(e.showTemp(n))}hide(...t){let[n]=this.Ss(t,"val");this.undo(e.hideTemp(n))}hideContent(...t){let[n]=this.Ss(t,"val"),i=e.wrapChildren(n);e.hide(i),this.undo((()=>e.unwrap(i)))}showPlaceholder(...t){let[e,n]=this.Ss(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.Ss(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}Ss(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]}}},7782:()=>{const t=up.element;up.ProgressBar=class ProgressBar{constructor(){this.xs=0,this.I=t.affix(document.body,"up-progress-bar"),this.I.style.transition="width 300ms ease-out",this.Es(0),t.paint(this.I),this.js=31,this.Cs()}Cs(){let t;t=this.js<80?Math.random()<.15?7+5*Math.random():1.5+.5*Math.random():.13*(100-this.js)*Math.random(),this.Es(this.js+t),this.xs++;const e=300+40*this.xs;this.timeout=setTimeout(this.Cs.bind(this),e)}Es(t){this.js=t,this.I.style.width=`${t}vw`}destroy(){clearTimeout(this.timeout),this.I.remove()}conclude(){clearTimeout(this.timeout),this.Es(100),setTimeout(this.destroy.bind(this),300)}}},2406:()=>{const t=up.util;up.Record=class Record{keys(){throw"Return an array of keys"}defaults(t){return{}}constructor(t){Object.assign(this,this.defaults(t),this.attributes(t))}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())}}},1279:()=>{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())}}},2714:function(){var t,e=this&&this.U||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.options=t}execute(){return this.Fs=this.Ts(),this}Ts(){return e(this,void 0,void 0,(function*(){try{this.Ps(),this.options=up.RenderOptions.preprocess(this.options),up.browser.assertConfirmed(this.options),up.RenderOptions.assertContentGiven(this.options);let t=yield this.Rs().execute();return this.Ls(t),t}catch(t){throw this.Ls(t)||this.As(t),t}}))}Ls(t){if(t instanceof up.RenderResult){let{onRendered:e,onFinished:i}=t.options;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}}As(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.options).onError)||void 0===n?void 0:n.call(e,t)}))}get finished(){return this.$s()}$s(){return e(this,void 0,void 0,(function*(){try{let t=yield this.Fs;return yield t.finished}catch(t){throw t instanceof up.RenderResult?yield t.finished:t}}))}Rs(){let t=n.memoize((t=>this.Ds(t))),e=Object.assign(Object.assign({},this.options),{handleAbort:t});return e.url?new up.Change.FromURL(e):e.response?new up.Change.FromResponse(e):new up.Change.FromContent(e)}Ps(){let t=n.pluckKey(this.options,"guardEvent");if(t&&(t.renderOptions=this.options,up.emit(t,{target:this.options.origin}).defaultPrevented))throw new up.Aborted(`Rendering was prevented by ${t.type} listener`)}Ds(t){let{abort:e}=this.options;if(!e||!up.network.isBusy())return;let{bindFragments:i,bindLayer:r,origin:s,layer:o}=this.Rs().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.Fs})),n.memoizeMethod(t.prototype,{$s:!0,Rs:!0}),t)},2705:()=>{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=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({},n.defaults),t.pick(n,e)),i),{failPrefixForced:!0}):Object.assign(Object.assign({},n),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}}}()},606:function(){var t=this&&this.U||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","options","finished"]}defaults(){return{fragments:[]}}get none(){return!this.fragments.length}get fragment(){return this.fragments[0]}static both(t,e,n=!0){return e?new this({target:t.target,layer:t.layer,options:t.options,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)}))}static buildNone(){return new this({target:":none",finished:Promise.resolve()})}}},5437:()=>{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","builtAt","wrapMethod","contentType","payload","onLoading","fail","abortable","lateDelay","previews"]}defaults(){return{state:"new",abortable:!0,headers:{},timeout:up.network.config.timeout,builtAt:new Date,previews:[]}}constructor(t){var n,i;if(super(t),this.params=new up.Params(this.params),null==this.wrapMethod&&(this.wrapMethod=up.network.config.wrapMethod),this.Ms(),(this.target||this.layer||this.origin)&&!t.basic){const t={origin:this.origin};this.layer=up.layer.get(this.layer,t),this.failLayer=up.layer.get(this.failLayer,t),this.context||(this.context=this.layer.context||{}),this.failContext||(this.failContext=(null===(n=this.failLayer)||void 0===n?void 0:n.context)||{}),this.mode||(this.mode=this.layer.mode),this.failMode||(this.failMode=null===(i=this.failLayer)||void 0===i?void 0:i.mode)}this.bindLayer=t.bindLayer||this.layer,this.Ns=t.fragments,this.Hs=t.bindFragments,this.Be=e.newDeferred(),this.qs()}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.Bs)&&void 0!==t?t:this.Bs=new XMLHttpRequest}get fragments(){return this.Ns||(this.Ns=this.Us())}Us(){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.Hs||this.fragments}get fragment(){var t;return null===(t=this.fragments)||void 0===t?void 0:t[0]}Ms(){this.method=e.normalizeMethod(this.method),this.Is(),this.zs(),this.url=e.normalizeURL(this.url)}Vs(){e.task((()=>{this.layer=void 0,this.failLayer=void 0,this.Ks=void 0,this.origin=void 0,this.Ns=void 0,this.Hs=void 0}))}Is(){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]}zs(){!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.Vs()))}load(){var t;if("new"===this.state)return this.Xs()?(this.state="loading",this.Ms(),null===(t=this.onLoading)||void 0===t||t.call(this),this.expired=!1,new up.Request.XHRRenderer(this).buildAndSend({onload:()=>this.Ws(),onerror:()=>this.Gs(),ontimeout:()=>this.Js(),onabort:()=>this.Qs()}),!0):void this.abort({reason:"Prevented by event listener"})}runPreviews(t){this.ended||this.fromCache||(this.Ys=up.status.runPreviews(this,t))}Xs(){return!this.emit("up:request:load",{log:["Loading %s",this.description]}).defaultPrevented}loadPage(){up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()}Ws(){const t=this.Zs(),e="Loaded "+t.description;this.emit("up:request:loaded",{request:t.request,response:t,log:e}),this.respondWith(t)}Gs(){this.eo("Network error")}Js(){this.eo("Timeout")}Qs(){this.no()}abort({reason:t}={}){this.no(t)&&this.Bs&&this.Bs.abort()}no(t){if(this.ended)return;let e="Aborted request to "+this.description+(t?": "+t:"");return this.state="aborted",this.io(new up.Aborted(e)),this.emit("up:request:aborted",{log:e}),!0}eo(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.io(new up.Offline(e))}respondWith(t){this.response=t,this.ended||(this.state="loaded",t.ok?this.ro(t):this.io(t))}ro(t){this.so(),this.Be.resolve(t)}io(t){this.so(),this.Be.reject(t)}so(){var t;null===(t=this.Ys)||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)}Zs(){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),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)}rr(t){return up.EventEmitter.fromEmitArgs(t,{layer:this.bindLayer,request:this,origin:this.origin})}emit(...t){return this.rr(t).emit()}assertEmitted(...t){this.rr(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]}qs(){for(let t of["target","failTarget","mode","failMode","context","failContext"])this.oo(t);let t,e;(t=this.csrfHeader())&&(e=this.csrfToken())&&this.uo(t,e),this.uo(up.protocol.headerize("version"),up.version)}oo(t){this.uo(up.protocol.headerize(t),this[t])}uo(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.oo("target"),this.Ns=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.Be})),t)},7974:function(){var t=this&&this.U||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.ao={},this.co=[]}get(t){t=this.ho(t);let e=this.lo(t),n=e.matchBest(t);if(n){if(this.po(n))return n;this.fo(t,e)}}put(e){return t(this,void 0,void 0,(function*(){e=this.ho(e);let t=this.lo(e),{response:n}=e;n&&t.updateVary(n);let i=t.requests.filter((n=>t.satisfies(e,n)));for(let t of i)this.fo(t);e.cacheRoute=t,t.put(e),this.co.push(e),this.do()}))}alias(t,e){if(t=this.get(t))return e=this.ho(e),this.track(t,e,{force:!0}),this.put(e),e}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.io(t))}))}willHaveSameResponse(t,e){return t===e||t===e.trackedRequest}evict(t=!0,e){this.mo(t,e,(t=>this.fo(t)))}expire(t=!0,e){this.mo(t,e,(t=>t.expired=!0))}reindex(t){this.fo(t),delete t.cacheRoute,this.put(t)}fo(t){var n;e.remove(this.co,t),null===(n=t.cacheRoute)||void 0===n||n.delete(t)}lo(t){var e,n;return t.cacheRoute||(e=this.ao)[n=t.description]||(e[n]=new Route)}po(t){return t.age<up.network.config.cacheEvictAge}get currentSize(){return this.co.length}get Dn(){return up.network.config.cacheSize}do(){for(let t=0;t<this.currentSize-this.Dn;t++)this.fo(this.co[0])}mo(t=!0,n,i){let r=up.Request.tester(t,n),s=e.filter(this.co,r);e.each(s,i)}ho(t){return e.wrapValue(up.Request,t)}}},5221:()=>{const t=up.util,e=up.element,n=["GET","POST"];up.Request.FormRenderer=class FormRenderer{constructor(t){this.kt=t}buildAndSubmit(){this.params=t.copy(this.kt.params);let i=this.kt.url,{method:r}=this.kt;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.Un=e.affix(document.body,"form.up-request-loader",{method:r,action:i});let o,u,a=this.kt.contentType;a&&this.Un.setAttribute("enctype",a),(o=this.kt.csrfParam())&&(u=this.kt.csrfToken())&&this.params.add(o,u),t.each(this.params.toArray(),this.vo.bind(this)),up.browser.submitForm(this.Un)}vo(t){e.affix(this.Un,"input[type=hidden]",t)}}},6413:()=>{const t=up.util;up.Request.Queue=class Queue{constructor(){this.reset()}reset(){this.bo=[],this.yo=[],this.wo=!1}get allRequests(){return this.yo.concat(this.bo)}asap(e){e.runQueuedCallbacks(),t.always(e,(t=>this.Lt(e,t))),this._o(e),this.Oo(e),queueMicrotask((()=>this.ko()))}promoteToForeground(t){t.background&&(t.background=!1,this._o(t))}_o(e){if(!e.isTimed())return;let n=Math.max(e.effectiveLateTime-e.age);t.timer(n,(()=>this.So()))}xo(){return t.evalOption(up.network.config.concurrency)}Eo(){const t=this.xo();return-1===t||this.yo.length<t}isBusy(){return this.yo.length>0||this.bo.length>0}Oo(t){this.bo.push(t)}jo(){let e=t.find(this.bo,(t=>!t.background));return e||(e=this.bo[0]),t.remove(this.bo,e)}Co(t){t.load()&&this.yo.push(t)}Lt(e,n){t.remove(this.yo,e)||t.remove(this.bo,e),n instanceof up.Response&&n.ok&&up.network.registerAliasForRedirect(e,n),queueMicrotask((()=>this.ko())),t.task((()=>this.Fo()))}ko(){let t;if(this.Eo()&&(t=this.jo()))return this.Co(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.yo,this.bo]){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)}}So(){!this.wo&&this.To()&&(this.wo=!0,up.emit("up:network:late",{log:"Server is slow to respond"}))}Fo(){this.wo&&!this.Po.length&&(this.wo=!1,up.emit("up:network:recover",{log:"Slow requests were loaded"}))}get Po(){return this.allRequests.filter((t=>t.isTimed()))}To(){return t.some(this.Po,(t=>t.age>=t.effectiveLateTime-1))}}},2298:()=>{var t;const e="multipart/form-data",n=up.util;up.Request.XHRRenderer=(t=class XHRRenderer{constructor(t){this.kt=t}buildAndSend(t){const e=this.kt.xhr;this.Ro=n.copy(this.kt.params),this.kt.timeout&&(e.timeout=this.kt.timeout),e.open(this.Lo(),this.kt.url);let i=this.Ao();i&&e.setRequestHeader("Content-Type",i);for(let t in this.kt.headers){let n=this.kt.headers[t];e.setRequestHeader(t,n)}Object.assign(e,t),e.send(this.$o())}Lo(){let t=this.kt.method;return this.kt.wrapMethod&&!this.kt.will302RedirectWithGET()&&(t=up.protocol.wrapMethod(t,this.Ro)),t}Ao(){return this.Do(),this.Mo}$o(){return this.Do(),this.No}Do(){this.No=this.kt.payload,this.Mo=this.kt.contentType,!this.No&&this.kt.allowsPayload()&&(this.Mo||(this.Mo=this.Ro.hasBinaryValues()?e:"application/x-www-form-urlencoded"),this.Mo===e?(this.Mo=null,this.No=this.Ro.toFormData()):this.No=this.Ro.toQuery().replace(/%20/g,"+"))}},n.memoizeMethod(t.prototype,{Do:!0,Lo:!0}),t)},4517:()=>{const t=up.util;up.Response=class Response extends up.Record{keys(){return["method","url","text","status","request","xhr","target","title","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 cspNonces(){return up.protocol.cspNoncesFromHeader(this.header("Content-Security-Policy")||this.header("Content-Security-Policy-Report-Only"))}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}`}}},7241:()=>{var t;const e=up.util,n=up.element,i=/^\s*<(html|!DOCTYPE)\b/i;up.ResponseDoc=(t=class ResponseDoc{constructor({document:t,fragment:e,content:n,target:i,origin:r,data:s,cspNonces:o,match:u}){if(t?this.Ho(t,r,s):e?this.qo(e,r,s):this.Bo(n||"",r,i,s),this.Uo=o,r){let t=up.fragment.tryToTarget(r);t&&(this.Io=this.select(t))}this.hi=u}Ho(t,r,s){if(t instanceof Document)this.ci=t,this.zo=!0;else if(e.isString(t)){this.zo=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.ci=o[0]:this.ci=this.Vo(o)}else this.ci=this.Vo(t)}Ko(t){return n.createBrokenDocumentFromHTML(t)}qo(t,e,i){let r=n.extractSingular(up.fragment.provideNodes(t,{origin:e,data:i}));this.ci=this.Vo(r)}Bo(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.ci=this.Vo(a)}Vo(t){t=e.wrapList(t);let n=document.createElement("up-document");return n.append(...t),n}rootSelector(){return up.fragment.toTarget(this.ci.children[0])}get title(){return this.Xo(this.Wo)}Go(){if(this.zo)return this.ci.head}Xo(t){let e=this.Go();return e&&t(e)}get metaTags(){return this.Xo(up.history.findMetaTags)}get assets(){return this.Xo(up.script.findAssets)}get lang(){if(this.zo)return up.history.getLang(this.ci)}Wo(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.Io,document:this.ci,match:this.hi}).find()}selectSteps(t){return t.filter((t=>this.Jo(t)||this.Qo(t)))}commitSteps(t){return t.filter((t=>this.commitElement(t.newElement)))}Jo(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)}Qo(t){if(!t.maybe)throw new up.CannotMatch}commitElement(t){if(this.ci.contains(t))return up.fragment.config.runScripts||up.script.disableSubtree(t),t.remove(),!0}finalizeElement(t){if(up.NonceableCallback.adoptNonces(t,this.Uo),this.ci instanceof Document){let i=n.subtree(t,":is(noscript,script,audio,video):not(.up-keeping, .up-keeping *)");e.each(i,n.fixParserDamage)}}},e.memoizeMethod(t.prototype,{Go:!0}),t)},2723:()=>{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.I=e,this.Yo=t.get(n.viewport)||up.viewport.get(this.I),this.Zo=up.layer.get(this.Yo),this.tu=null!==(r=null!==(i=n.scrollBehavior)&&void 0!==i?i:n.behavior)&&void 0!==r?r:"instant";const f=up.viewport.config;this.eu=null!==(o=null!==(s=n.snap)&&void 0!==s?s:n.revealSnap)&&void 0!==o?o:f.revealSnap,this.nu=null!==(a=null!==(u=n.padding)&&void 0!==u?u:n.revealPadding)&&void 0!==a?a:f.revealPadding,this.iu=null!==(h=null!==(c=n.top)&&void 0!==c?c:n.revealTop)&&void 0!==h?h:f.revealTop,this.ru=null!==(p=null!==(l=n.max)&&void 0!==l?l:n.revealMax)&&void 0!==p?p:f.revealMax,this.su=f.selector("fixedTopSelectors"),this.ou=f.selector("fixedBottomSelectors")}start(){const t=this.uu(this.Yo),n=up.Rect.fromElement(this.I);if(this.ru){const t=e.evalOption(this.ru,this.I);n.height=Math.min(n.height,t)}n.grow(this.nu),this.au(t),t.height<0&&up.fail("Viewport has no visible area");const i=this.Yo.scrollTop;let r=i;this.iu||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.eu)&&r<this.eu&&n.top<.5*t.height&&(r=0),r!==i&&this.Yo.scrollTo({top:r,behavior:this.tu})}uu(){return up.viewport.isRoot(this.Yo)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.Yo)}cu(n){let i=up.fragment.all(n,{layer:this.Zo});return e.filter(i,t.isVisible)}au(t){for(let e of this.cu(this.su)){let n=up.Rect.fromElement(e).bottom-t.top;n>0&&(t.top+=n,t.height-=n)}for(let e of this.cu(this.ou)){let n=up.Rect.fromElement(e),i=t.bottom-n.top;i>0&&(t.height-=i)}}}},8720:()=>{const t=up.util,e=up.element;up.Selector=class Selector{constructor(e,n,i={}){var r;this.hu=[];let s,o=n&&!document.contains(n);if(o||i.destroying||this.hu.push(up.fragment.isNotDestroying),this.lu=o||"any"===i.layer||1===up.layer.count,this.lu)s=up.layer.root;else{if(null!==(r=i.layer)&&void 0!==r||(i.layer=t.presence(n,t.isElement)),this.nt=up.layer.getAll(i),!this.nt.length)throw new up.CannotMatch(["Unknown layer: %o",i.layer]);this.hu.push((e=>t.some(this.nt,(t=>t.contains(e))))),s=this.nt[0]}this.pu=up.fragment.expandTargets(e,Object.assign(Object.assign({},i),{layer:s})),this.fu=this.pu.join()||"match-none"}matches(t){return e.elementLikeMatches(t,this.fu)&&this.du(t)}closest(t){return this.mu(t.closest(this.fu))}descendants(t=document){return this.gu(t.querySelectorAll(this.fu))}firstDescendant(n){return this.lu?(n||(n=document),this.vu((t=>n.querySelectorAll(t)))):t.findResult(this.nt,(t=>this.vu((n=>e.subtree(t.element,n)))))}subtree(t){return this.gu(e.subtree(t,this.fu))}vu(e){return t.findResult(this.pu,(t=>this.gu(e(t))[0]))}du(e){return e&&t.every(this.hu,(t=>t(e)))}mu(e){return t.presence(e,this.du.bind(this))}gu(e){return t.filter(e,this.du.bind(this))}}},7885:()=>{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.bu=t.anchor,this.yu=t.align,this.wu=t.position,this._u="top"===this.wu||"bottom"===this.wu?"horizontal":"vertical",this.Yo=up.viewport.get(this.bu),this.parent=this.Yo===e.root?document.body:this.Yo,this.Ou=!this.Yo.contains(this.bu.offsetParent)}start(t){this.I=t,this.I.style.position="absolute",this.ku(0,0),this.sync(),this.Su("on")}stop(){this.Su("off")}Su(t){let e=this.xu.bind(this);up[t](window,"resize",e),this.Ou&&up[t](this.Yo,"scroll",e)}xu(){return clearTimeout(this.syncTimer),this.syncTimer=t.task(this.sync.bind(this))}isDetached(){return!this.parent.isConnected||!this.bu.isConnected}sync(){const n=this.I.getBoundingClientRect(),i=e.styleNumber(this.I,"margin-top"),r=e.styleNumber(this.I,"margin-right"),s=e.styleNumber(this.I,"margin-bottom"),o=e.styleNumber(this.I,"margin-left"),u=this.bu.getBoundingClientRect();let a,c;switch(this._u){case"horizontal":switch(this.wu){case"top":c=u.top-s-n.height;break;case"bottom":c=u.top+u.height+i}switch(this.yu){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.yu){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.wu){case"left":a=u.left-r-n.width;break;case"right":a=u.left+u.width+o}}t.isDefined(a)||t.isDefined(c)?this.Es(a,c):up.fail("Invalid tether constraints: %o",this.Eu())}Eu(){return{position:this.wu,align:this.yu}}Es(t,e){const n=this.I.getBoundingClientRect();this.ku(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)}ku(t,n){this.offsetLeft=t,this.offsetTop=n,e.setStyle(this.I,{left:t,top:n},"px")}}},4818:()=>{const t=up.util;up.URLPattern=class URLPattern{constructor(e){this.ju=[];const n=[],i=[];for(let r of t.getSimpleTokens(e))"-"===r[0]?i.push(r.substring(1)):n.push(r);this.Cu=this.Fu(n,!0),this.Tu=this.Fu(i,!1)}Fu(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.ju.push({name:i,cast:Number}),"(\\d+)"):(n&&this.ju.push({name:i,cast:String}),"([^/?#]+)"))),new RegExp("^(?:"+i+")$")}test(e,n=!0){return n&&(e=t.matchableURL(e)),this.Cu.test(e)&&!this.Pu(e)}recognize(e,n=!0){n&&(e=t.matchableURL(e));let i=this.Cu.exec(e);if(i&&!this.Pu(e)){const t={};return this.ju.forEach(((e,n)=>{let r=i[n+1];if(r)return t[e.name]=e.cast(r)})),t}}Pu(t){var e;return null===(e=this.Tu)||void 0===e?void 0:e.test(t)}}},9675:(t,e,n)=>{n(5941),up.element=function(){const t=up.util;function e(...e){let[n=document,i]=t.args(e,"val","val");return n.querySelector(i)}function n(t,e){const n=[];return i(t,e)&&n.push(t),n.push(...t.querySelectorAll(e)),n}function i(e,n){return t.isElement(e)&&e.matches(n)}function r(...n){const i=n.pop();return t.isElement(i)?i:t.isString(i)?e(...n,i):t.isList(i)?(i.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",i),i[0]):i}function s(...e){return t.flatMap(e,o)}function o(e){return t.isString(e)?document.querySelectorAll(e):t.wrapList(e)}function u(e,n){return n===M(e)?t.noop:(a(e,n),()=>a(e,!n))}function a(t,e){e?(t.removeAttribute("hidden"),"none"===t.style.display&&(t.style.display="")):t.setAttribute("hidden","")}function c(e,n){for(let i in n){const r=n[i];t.isGiven(r)?e.setAttribute(i,r):e.removeAttribute(i)}}function h(t,e){t.parentNode.insertBefore(e,t)}function l(e,n={}){let i,r,s,{includePath:o}=f(e);for(let t of o){let{tagName:e}=t;e&&"*"!==e||(e="div"),r=document.createElement(e),i||(i=r),p(r,t),null==s||s.appendChild(r),s=r}for(let e in n){let r=n[e];"class"===e?F(i,t.wrapList(r)):"style"===e?$(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 p(t,{id:e,classNames:n,attributes:i}){e&&(t.id=e);for(let[e,n]of Object.entries(i))t.setAttribute(e,n);F(t,n)}function f(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 d=["HTML","BODY","HEAD","TITLE"],m=up.mockable((t=>t.matches(d.join())));function g(e,n){return t.isGiven(n)?`[${e}="${n=n.replace(/"/g,'\\"')}"]`:`[${e}]`}function v(t){return b(y(t))}function b(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 y(t){t=t.trim();const e=document.createRange();return e.setStart(document.body,0),e.createContextualFragment(t).childNodes}function w(t){t.offsetHeight}function _(e,n,i){t.isMissing(e.getAttribute(n))&&e.setAttribute(n,i)}function O(e){const n=document.createElement("up-wrapper");return n.append(...t.wrapList(e)),n}function k(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 S(t,e){return k(t,e,x)}let x=t.identity;function E(t,e){switch(t){case"false":return!1;case"true":case"":case e:return!0}}function j(t){if((t=t.replaceAll("_","")).match(/^-?[\d.]+$/))return parseFloat(t)}function C(e){if(null==e?void 0:e.trim())return t.parseRelaxedJSON(e)}function F(t,e){for(let n of e)t.classList.add(n)}function T(e,n,i){return e.classList.contains(n)===i?t.noop:(e.classList.toggle(n,i),()=>e.classList.toggle(n,!i))}function P(t,e){return A(window.getComputedStyle(t),e)}function R(e,n){const i=P(e,n);if(t.isPresent(i))return parseFloat(i)}function L(t,e){const{style:n}=t;return A(n,e)}function A(e,n){return up.migrate.loaded&&(n=up.migrate.fixStyleProps(n)),t.isString(n)?e.getPropertyValue(n):t.mapObject(n,(t=>[t,e.getPropertyValue(t)]))}function $(e,n,i=""){if(up.migrate.loaded&&(n=up.migrate.fixStyleProps(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 $(t,e),()=>$(t,n)}function M(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function N(t){return/^up-/.test(t)}function H(e,n){return t.mapObject(n,(t=>[t,e.getAttribute(t)]))}return{subtree:n,subtreeFirst:function(t,e){return i(t,e)?t:t.querySelector(e)},contains:function(t,e){const n=r(e);return Node.prototype.contains.call(t,n)},closestAttr:function(t,e,n=S){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,e){return s(t.closest(e),n(t,e))},get:r,list:s,toggle:function(t,e=!M(t)){a(t,e)},hide:function(t){a(t,!1)},hideTemp:function(t){return u(t,!1)},show:function(t){a(t,!0)},showTemp:function(t){return u(t,!0)},metaContent:function(t){var n;return null===(n=e("meta"+g("name",t)))||void 0===n?void 0:n.getAttribute("content")},insertBefore:h,createFromSelector:l,setAttrs:c,setAttrsTemp:function(t,e){let n=Object.keys(e),i=H(t,n);return c(t,e),()=>c(t,i)},affix:function(...e){let[n,i="beforeend",r,s]=t.args(e,"val",t.isAdjacentPosition,"val","options");const o=l(r,s);return n.insertAdjacentElement(i,o),o},idSelector:function(t){return t.match(/^[a-z][a-z0-9\-_]*$/i)?`#${t}`:g("id",t)},classSelector:function(t){return`.${t=t.replace(/[^\w-]/g,"\\$&")}`},isSingleton:m,attrSelector:g,tagName:function(t){return t.tagName.toLowerCase()},createBrokenDocumentFromHTML:function(t){return(new DOMParser).parseFromString(t,"text/html")},fixParserDamage:function(t){let e=v(t.outerHTML);t.replaceWith(e)},createNodesFromHTML:y,createFromHTML:v,extractSingular:b,get root(){return document.documentElement},paint:w,concludeCSSTransition:function(t){const e=D(t,{transition:"none"});return w(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();$(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)_(t,n,e[n])},setMissingAttr:_,unwrap:function(t){!function(e){const n=document.activeElement;try{return function(){let e=[...t.childNodes];for(let n of e)h(t,n);t.remove()}()}finally{n&&n!==document.activeElement&&n.focus({preventScroll:!0})}}()},wrapChildren:function(t){const e=O(t.childNodes);return t.append(e),e},wrapIfRequired:function(e){return 1===e.length&&t.isElement(e[0])?e[0]:O(e)},attr:S,booleanAttr:function(t,e){return k(t,e,E)},numberAttr:function(t,e){return k(t,e,j)},jsonAttr:function(t,e){return k(t,e,C)},callbackAttr:function(e,n,i){return k(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 k(t,e,E,x)},booleanOrNumberAttr:function(t,e){return k(t,e,E,j)},setStyleTemp:D,style:P,styleNumber:R,inlineStyle:L,setStyle:$,isVisible:M,upAttrs:function(t){let e=t.getAttributeNames().filter(N);return H(t,e)},upClasses:function(e){return t.filter(e.classList.values(),N)},setAttrPresence:function(t,e,n,i){return i?t.setAttribute(e,n):t.removeAttribute(e)},addClasses:F,addClassTemp:function(t,e){return T(t,e,!0)},removeClassTemp:function(t,e){return T(t,e,!1)},cleanJQuery:function(t){up.browser.canJQuery()&&jQuery(t).remove()},parseSelector:f,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:i,documentPosition:function(t){let e=t.nextElementSibling;return e?[e,"beforebegin"]:[t.parentElement,"beforeend"]}}}()},3924:()=>{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},4366:()=>{up.Aborted=class Aborted extends up.Error{constructor(t){super(t,{name:"AbortError"})}}},8010:()=>{up.CannotMatch=class CannotMatch extends up.Error{}},4861:()=>{up.CannotParse=class CannotParse extends up.Error{}},3469:()=>{up.CannotTarget=class CannotTarget extends up.Error{}},376:()=>{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)}}},8272:()=>{up.NotImplemented=class NotImplemented extends up.Error{}},4504:()=>{up.Offline=class Offline extends up.Error{}},8670:()=>{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(t.isUndefined(e.button)||0===e.button)&&!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()},isUnmodified: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},2851:()=>{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]"],watchInputEvents:["input","change"],watchInputDelay:0,watchChangeEvents:["change"]})));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.push(...o),r=t.uniq(r)}return r}function o(t){return e.subtree(t,a())}function u(t){return null==t?void 0:t.matches(a())}function a(){return n.selector("submitButtonSelectors")}const c=up.mockable(((t,e)=>up.render(h(t,e))));function h(e,n,i){e=k(e),n=t.options(n);let r=new up.OptionsParser(e,n,i);return r.include(f),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 l(t){if(t.disabled)return;let e;return document.activeElement===t?(e=v(t),t.disabled=!0,up.focus(e,{force:!0,preventScroll:!0})):t.disabled=!0,()=>{t.disabled=!1}}function p(e,n){let i=()=>S(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=>p(t,n))):[]}function f(e,n,i){var r;n=t.options(n),e=k(e);const s=new up.OptionsParser(e,n,i);s.string("contentType",{attr:"enctype"}),s.json("headers");const u=up.Params.fromForm(e),a=null!==(r=n.submitButton)&&void 0!==r?r:n.submitButton=o(e)[0];return a&&(u.addField(a),n.method||(n.method=a.getAttribute("formmethod")),n.url||(n.url=a.getAttribute("formaction"))),u.addAll(n.params),n.params=u,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 d(...e){let[n,i,r]=t.args(e,"val","options","callback");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()"));const s=new up.FieldWatcher(n,i,r);return s.start(),()=>s.stop()}function m(t,e={}){return d(t,Object.assign(Object.assign({},e),{batch:!0}),((e,n)=>c(t,n)))}function g(){var t,e;return(null===(e=(t=up.migrate).migratedFormGroupSelectors)||void 0===e?void 0:e.call(t))||n.groupSelectors}function v(t){return b(t).element}function b(e){return t.findResult(g(),(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 y(n){let i,r;if(n.matches("input[type=checkbox]"))n.checked?(i=n.value,r=":checked"):r=":unchecked";else if(n.matches("input[type=radio]")){const t=S(n),s=n.getAttribute("name"),o=t.querySelector(`input[type=radio]${e.attrSelector("name",s)}:checked`);o?(r=":checked",i=o.value):r=":unchecked"}else i=n.value;const s=[];return t.isPresent(i)?(s.push(i),s.push(":present")):s.push(":blank"),t.isPresent(r)&&s.push(r),s}function w(t,e={}){const n=e.target||e.target||t.getAttribute("up-switch"),i=S(t);n||up.fail("No switch target given for %o",t);const r=y(t);for(let t of up.fragment.all(i,n))_(t,r)}const _=up.mockable((function(n,i){let r;i||(i=y(function(e){const n=S(e).querySelectorAll("[up-switch]");return t.find(n,(function(t){const n=t.getAttribute("up-switch");return e.matches(n)}))||up.fail("Could not find [up-switch] field for %o",e)}(n)));let s=n.getAttribute("up-hide-for");if(s)s=O(s),r=0===t.intersect(i,s).length;else{let e=n.getAttribute("up-show-for");e=e?O(e):[":present",":checked"],r=t.intersect(i,e).length>0}e.toggle(n,r),n.classList.add("up-switched")}));function O(e){return t.getSimpleTokens(e,{json:!0})}function k(t,e={}){const n=up.fragment.get(t,e);return n.form||n.closest("form")}function S(t,e){return t?k(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,u);up.event.halt(e,{log:!0}),up.error.muteUncriticalRejection(c(n,{submitButton:i}))})),up.compiler((function(){let t=n.fieldSelectors.map((t=>`${t}[up-validate], [up-validate] ${t}`));return e.unionSelector(t,["[up-validate=false]"])}),(function(t){up.FormValidator.forElement(t).watchContainer(t)})),up.compiler("[up-switch]",(t=>{w(t)})),up.on("change","[up-switch]",((t,e)=>{w(e)})),up.compiler("[up-show-for]:not(.up-switched), [up-hide-for]:not(.up-switched)",(t=>{_(t)})),up.attribute("up-watch",(t=>d(t))),up.attribute("up-autosubmit",(t=>m(t))),{config:n,submit:c,submitOptions:h,destinationOptions:f,watchOptions:function(e,n,i={}){var r;n=t.options(n);let s=new up.OptionsParser(e,n,Object.assign(Object.assign({},i),{closest:!0,attrPrefix:"up-watch-"}));s.include(up.status.statusOptions),s.string("event"),s.number("delay");let o=up.form.config;return"input"===n.event?(n.event=t.evalOption(o.watchInputEvents,e),null!==(r=n.delay)&&void 0!==r||(n.delay=o.watchInputDelay)):"change"===n.event&&(n.event=t.evalOption(o.watchChangeEvents,e)),n.origin||(n.origin=e),n},isSubmittable:function(t){return t=up.fragment.get(t),n.matches(t,"submitSelectors")},watch:d,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 up.FormValidator.forElement(n.origin).validate(n)},autosubmit:m,fieldSelector:i,fields:s,isField:r,submitButtons:o,focusedField:function(){return t.presence(document.activeElement,r)},switchTarget:_,disable:function(i){let r=[...s(i),...o(i),...(u=i,e.subtree(u,n.selector("genericButtonSelectors")))];var u;return t.sequence(t.map(r,l))},getDisablePreviewFn:function(t,e){return function(n){let i=p(t,e);for(let t of i)n.disable(t)}},group:v,groupSolution:b,groupSelectors:g,get:k,getScope:S}}(),up.submit=up.form.submit,up.watch=up.form.watch,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate},2667:(t,e,n)=>{n(7433);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",abort:"target",failOptions:!0,feedback:!0},navigateOptions:{cache:"auto",revalidate:"auto",fallback:!0,focus:"auto",scroll:"auto",history:"auto",peel:!0},match:"region",runScripts:!0,autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","keep","target-if-lost"],autoScroll:["hash","layer-if-main"],autoRevalidate:t=>t.expired,skipResponse:s})));function s({response:t,expiredResponse:e}){return!t.text||t.text===(null==e?void 0:e.text)}function o(t,e={}){return t=d(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=y(t);return new up.RenderJob(e).execute()})),l=up.mockable(((...t)=>{const e=y(t);return h(Object.assign(Object.assign({},e),{navigate:!0}))}));function p(t){return!t.closest(".up-destroying")}function f(t){return t.isConnected&&p(t)}function d(...t){let[e,n,s]=g(t);return i.isElementLike(n)?r.get(n):e?m(e,n,s):new up.FragmentFinder({selector:n,origin:s.origin,layer:s.layer,match:s.match}).find()}function m(...t){let[e,n,i]=g(t);return new up.Selector(n,e,i).firstDescendant(e)}function g(t){return i.args(t,"val","val","options")}function v(...t){let[e,n,r]=g(t);return i.isElement(n)?[n]:i.isList(n)?n:new up.Selector(n,e,r).descendants(e)}function b(t,e,n={}){return new up.Selector(e,t,n).subtree(t)}function y(t){const e=i.parseArgIntoOptions(t,"target");return i.isElement(e.target)&&(e.origin||(e.origin=e.target)),e}const w=/^(onFail|on|fail)?(.+)$/;function _(t,e){return i.presence(t,i.isString)||O(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 O(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 k(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!f(e)||!s||up.fragment.get(t,Object.assign({layer:e},i))===e}(o,t,e))return o}))}function k(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 S=/:main\b/,x=/:layer\b/,E=/:origin\b/;function j(t){return S.test(t)}function C(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"),j(s)){let n=F(e),i=up.layer.mainTargets(n).map((t=>s.replace(S,t)));t.unshift(...i)}else if(x.test(s)){if("new"===n||n.opening)continue;let i=_(n.getFirstSwappableElement(),e);t.unshift(s.replace(x,i))}else i.isElementLike(s)?r.push(_(s,e)):i.isString(s)&&r.push(P(s,e))}return i.uniq(r)}function F({layer:t,mode:e}){return"new"===t?e||up.fail('Must pass a { mode } option together with { layer: "new" }'):t.mode}function T(t,{origin:e}={}){return t.replace(E,(function(n){if(e)return _(e);up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',n,t)}))}function P(t,e){return i.isString(t)?(up.migrate.resolveOrigin||T)(t,e):t}function R(t){return i.getComplexTokens(t)}const L=/^([\w-]+|\*)?(#|\.|[:[][a-z-]{3,})/;function A(t,{origin:e,originLayer:n,data:s,htmlParser:o=r.createNodesFromHTML}={}){if(i.isString(t)&&L.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=$(t,s,{htmlParser:o})),i.wrapList(t)}function $(t,e={},{origin:n,htmlParser:i}={}){var s;let o=d(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(t.setAttribute("up-source",u(location.href)),up.hello(t),!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=y(t);s.target||(s.target=":main");const u=d(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=y(t);return(i.element=d(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:d,getFirstDescendant:m,all:v,subtree:b,contains:function(t,e){return i.isElement(e)?r.contains(t,e)&&up.layer.get(t).contains(e):b(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("aria-hidden","true")},emitInserted:function(t){return 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:function(t){let{oldElement:e,newElement:n,newData:i,renderOptions:s}=t;const o=["Keeping fragment %o",e],u=r.callbackAttr(e,"up-on-keep",{exposedKeys:["newFragment","newData"]});return up.emit(e,"up:fragment:keep",{newFragment:n,newData:i,renderOptions:s,log:o,callback:u})},successKey:function(t){let e=w.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=w.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:C,resolveOrigin:P,toTarget:_,tryToTarget:O,isTargetable:function(t){return!!O(t)},matches:function(t,e,n={}){if(t=r.get(t),i.isElement(e)){let n=O(e);return n&&t.matches(n)}return new up.Selector(e,t,n).matches(t)},hasAutoHistory:function(t,e){let i=C(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=y(t),{reason:s,newLayer:o}=r;if(r.target)n=v(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:R,parseTargetSteps:function(t,e={}){var n;let i=e.defaultPlacement||"swap",r=null!==(n=e.defaultMaybe)&&void 0!==n&&n,s=[],o=R(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:f,isNotDestroying:p,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:j,insertTemp:function(...t){let[e,n="beforeend",s]=i.args(t,"val",i.isAdjacentPosition,"val"),o=A(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:A,cloneTemplate:$}}(),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))},9634:()=>{up.framework=function(){let t="evaling";function e(){if("configuring"!==t)return void console.error("Unpoly has already booted");let e=n();e?console.error("Unpoly cannot boot: %s",e):(t="booting",up.emit("up:framework:boot",{log:!1}),t="booted",up.emit("up:framework:booted",{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),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},8944:()=>{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;function s(){return t.normalizeURL(location.href)}function o(){const t=s();r!==t&&(i=r,r=t)}function u(e,n){return t.matchURLs(e,location.href,Object.assign({hash:!0},n))}function a(e,n={}){h("replaceState",e=t.normalizeURL(e))&&!1!==n.event&&c({location:e,reason:"replace",log:`Replaced state for ${e}`})}function c(t){var e,n;let i=up.event.build("up:location:changed",t);null===(n=null===(e=up.migrate)||void 0===e?void 0:e.renamedProperty)||void 0===n||n.call(e,i,"url","location"),up.emit(i)}function h(t,e){if(n.enabled){const n={up:{}};return window.history[t](n,"",e),o(),!0}}function l(t){o();let e=s();c({location:e,reason:"pop",log:`Navigated to history entry ${e}`}),up.viewport.saveFocus({location:i}),up.viewport.saveScroll({location:i}),function(t){if(!(null==t?void 0:t.up))return void up.puts("popstate","Ignoring a history state not owned by Unpoly");let e=s();up.error.muteUncriticalRejection(up.render({guardEvent:up.event.build("up:location:restore",{location:e,log:`Restoring location ${e}`}),url:e,target:n.restoreTargets,fail:!1,history:!0,location:e,peel:!0,layer:"root",cache:"auto",revalidate:"auto",saveScroll:!1,scroll:["restore","auto"],saveFocus:!1,focus:["restore","auto"]}))}(t.state)}function p(){window.addEventListener("popstate",l),"GET"===up.protocol.initialRequestMethod()&&a(s(),{event:!1})}function f(t=document.head){return t.querySelectorAll(n.selector("metaTagSelectors"))}return o(),up.on("up:framework:boot",(function(){"jasmine"in window?p():setTimeout(p,100)})),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,o()})),{config:n,push:function(e){!u(e=t.normalizeURL(e))&&h("pushState",e)&&c({location:e,reason:"push",log:`Advanced to location ${e}`})},replace:a,get location(){return s()},get previousLocation(){return i},isLocation:u,findMetaTags:f,updateMetaTags:function(t){let e=f();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)}}}()},9443:function(t,e,n){var i=this&&this.U||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(7921);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}()},3849:(t,e,n)=>{n(7298),up.link=function(){const t=up.util,e=up.element;let n=null;const i="[up-content], [up-fragment], [up-document]",r=`${i}, [up-target], [up-layer], [up-transition], [up-preload]`,s=new up.Config((()=>({followSelectors:["[up-follow]",`a:is(${r})`],noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="javascript:"]','a[href^="mailto:"]','a[href^="tel:"]',`a[href^="#"]:not(${i})`,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(${r})`],noClickableSelectors:["[up-clickable=false]","a[href], button"],preloadDelay:90}))),o=up.mockable((function(t,e,n){return up.render(a(t,e,n))}));function u(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=h(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"),n}function a(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(u),n.origin||(n.origin=e),s.boolean("fail"),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("history"),s.include(up.status.statusOptions),s.booleanOrString("focus"),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 c(t,e){let n=function(t){if(!g(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 o(t,Object.assign(Object.assign(Object.assign(Object.assign({abort:!1,abortable:!1,background:!0,cache:!0},up.RenderOptions.NO_INPUT_INTERFERENCE),up.RenderOptions.NO_PREVIEWS),e),{guardEvent:i,preload:!0}))}function h(e,n={}){return t.normalizeMethod(n.method||e.getAttribute("up-method")||e.getAttribute("data-method"))}function l(t){return t=up.fragment.get(t),s.matches(t,"followSelectors")}function p(t){l(t)||t.setAttribute("up-follow","")}function f(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 d(t){const e=t.closest(s.selector("instantSelectors"));return e&&(n=e,!(s.matches(n,"noInstantSelectors")||s.matches(n,"noFollowSelectors")));var n}function m(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 g(t){const e=h(t);return up.network.isSafeMethod(e)}function v(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 b(t,e){let n=up.event.build("up:deferred:load",{log:["Loading deferred %o",t]}),i=Object.assign({navigate:!1,guardEvent:n},e);return o(t,i,{defaults:{target:":origin",cache:"auto",revalidate:"auto",feedback:!0}})}return up.macro(s.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 m(e)}))})),up.attribute("up-defer",{defaultValue:"insert"},(function(t,e){v(e,t,(e=>up.error.muteUncriticalRejection(b(t,e))))})),up.on("up:click",s.selectorFn("followSelectors"),(function(t,e){f(t,e)&&(up.event.halt(t,{log:!0}),up.focus(e,{preventScroll:!0}),up.error.muteUncriticalRejection(o(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)),p(t))})),up.compiler(s.selectorFn("preloadSelectors"),(function(n){if(!function(t){return!up.browser.canPushState()||!l(t)||!function(t){const e=u(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(c(n,t)),r=e.booleanOrStringAttr(n,"up-preload");(!0===r||t.isUndefined(r))&&(r="hover"),v(r,n,i)}})),up.on("up:framework:reset",(function(){n=null})),{follow:o,followOptions:a,requestOptions:u,preload:c,makeFollowable:p,isSafe:g,isFollowable:l,shouldFollowEvent:f,convertClicks:function(t){t.on("click",(function(e,i){if(up.event.isUnmodified(e))return d(i)&&n?up.event.halt(e):("key"===up.event.inputDevice||up.event.isSyntheticClick(e)||t.wasHitByMouseEvent(e)&&(!n||n===e.target))&&m(e),n=null})),t.on("mousedown",(function(t,e){up.event.isUnmodified(t)&&(n=t.target,d(e)&&m(t))}))},config:s,loadDeferred:b}}(),up.follow=up.link.follow,up.deferred={load:up.link.loadDeferred}},4453:()=>{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)}`))}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){let e="#5566cc";i("log",(t=t.originalEvent||t).type,`color: white; border-color: ${e}; background-color: ${e}`,"Interaction on %o",t.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},6535:()=>{up.migrate={config:{}}},8374:()=>{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}},4034:function(){var t=this&&this.U||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;let i={},r={};const s=new up.MotionController("motion"),o=new up.Config((()=>({duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches})));function u(t){return e.pickBy(t,"isDefault")}function a(){return o.enabled}function c(t,e,i){return l(i),a()&&!b(e)&&i.duration>0&&!n.isSingleton(t)}function h(t,e,n){return up.migrate.loaded&&(e=up.migrate.fixStyleProps(e)),n=Object.assign(Object.assign({},n),{finishEvent:s.finishEvent}),new up.CSSTransition(t,e,n).start()}function l(t){var e,n;null!==(e=t.easing)&&void 0!==e||(t.easing=o.easing),null!==(n=t.duration)&&void 0!==n||(t.duration=o.duration)}function p(t){if(!b(t)){if(e.isFunction(t))return t;if(e.isArray(t))return f(...t);if(e.isString(t)){let e;if(t.indexOf("/")>=0)return f(...t.split("/"));if(e=r[t])return p(e)}else up.fail("Unknown transition %o",t)}}function f(t,n){if(!b(t)&&!b(n)){const i=d(t)||e.asyncNoop,r=d(n)||e.asyncNoop;return(t,e,n)=>Promise.all([i(t,n),r(e,n)])}}function d(t){var n;if(!b(t))return e.isFunction(t)?t:e.isString(t)?i[n=t]||up.fail("Unknown animation %o",n):e.isOptions(t)?(e,n)=>h(e,t,n):void up.fail("Unknown animation %o",t)}const m=up.mockable((function(t,e){t.replaceWith(e)}));function g(t,e){const n=p(e);n.isDefault=up.framework.evaling,r[t]=n}function v(t,e){const n=d(e);n.isDefault=up.framework.evaling,i[t]=n}function b(t){return!t||"none"===t}function y(t,e,i){v(t,(function(t,r){return t.style.opacity=0,n.setStyle(t,{opacity:e}),h(t,{opacity:i},r)}))}function w(t,e){return{transform:`translate(${t}px, ${e}px)`}}function _(t){return n.setStyle(t,{transform:""}),t.getBoundingClientRect()}function O(t,e){const i=`move-from-${t}`;v(`move-to-${t}`,(function(t,n){const i=_(t);return h(t,e(i),n)})),v(i,(function(t,i){const r=_(t),s=e(r);return n.setStyle(t,s),h(t,{transform:""},i)}))}return up.on("up:framework:boot",(function(){a()||up.puts("up.motion","Animations are disabled")})),y("fade-in",0,1),y("fade-out",1,0),O("top",(function(t){return w(0,-(t.top+t.height))})),O("bottom",(function(t){return w(0,up.viewport.rootHeight()-t.top)})),O("left",(function(t){return w(-(t.left+t.width),0)})),O("right",(function(t){return w(up.viewport.rootWidth()-t.left,0)})),g("cross-fade",["fade-out","fade-in"]),g("move-left",["move-to-left","move-from-right"]),g("move-right",["move-to-right","move-from-left"]),g("move-up",["move-to-top","move-from-bottom"]),g("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:reset",(function(){s.reset(),i=u(i),r=u(r)})),{morph:function(i,r,o,u){l(u=e.options(u)),i=up.fragment.get(i),r=up.fragment.get(r);let a=p(o);const h=c(i,a,u);a=up.error.guardFn(a);const f=e.pluckKey(u,"beforeStart")||e.noop,d=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(),h){if(s.isActive(i)&&!1===u.trackMotion)return a(i,r,u);up.puts("up.morph()","Morphing %o to %o with transition %O over %d ms",i,r,o,u.duration);const e=up.viewport.get(i),c=e.scrollTop,h=up.viewport.absolutize(i,{afterMeasure(){n.insertBefore(i,r),d()}}),l=function(){return t(this,void 0,void 0,(function*(){b();const t=e.scrollTop;h.moveBounds(0,t-c),yield a(i,r,u),g(),h.bounds.remove(),v()}))};return s.startFunction([i,r],l,u)}return g(),m(i,r),d(),v(),b(),Promise.resolve()},animate:function(t,i,r){t=up.fragment.get(t),r=e.options(r);let o=d(i);const u=c(t,i,r);if(o=up.error.guardFn(o),u){const e=()=>o(t,r);return s.startFunction(t,e,r)}return function(t,i){return e.isOptions(i)&&n.setStyle(t,i),Promise.resolve()}(t,i)},finish:function(t){return s.finish(t)},finishCount:()=>s.finishCount,transition:g,animation:v,config:o,isEnabled:a,isNone:b,willAnimate:c,swapElementsDirectly:m,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},1647:(t,e,n)=>{n(2903);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,e)=>!t.isSafe(),evictCache:!1,progressBar:!0,timeout:9e4}))),e=new up.Request.Queue,n=new up.Request.Cache;let r=null;function s(r){(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(r){(function(e){e.willCache()&&(n.put(e),e.onLoading=()=>n.reindex(e)),i.always(e,(function(r){var s,o,u,a;let c=null!==(o=null!==(s=r.expireCache)&&void 0!==s?s:e.expireCache)&&void 0!==o?o:i.evalOption(t.expireCache,e,r);c&&n.expire(c,{except:e});let h=null!==(a=null!==(u=r.evictCache)&&void 0!==u?u:e.evictCache)&&void 0!==a?a:i.evalOption(t.evictCache,e,r);h&&n.evict(h,{except:e});let l=n.get(e),p=r instanceof up.Response,f=!p,d=p&&r.ok,m=p&&!r.ok,g=p&&r.none;m?n.evict(e.url):f||g?n.evict(e):d&&l&&n.put(e)}))})(r),e.asap(r)}(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,registerAliasForRedirect:function(t,e){if(t.cache&&e.url&&t.url!==e.url){const r=i.variant(t,{method:e.method,url:e.url,cacheRoute:null});n.alias(t,r)}},queue:e,loadPage:function(t){new up.Request(t).loadPage()}}}(),up.request=up.network.request,up.cache=up.network.cache},3535:()=>{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})));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)},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"},cspNoncesFromHeader:function(t){let e=[];if(t){let n=t.split(/\s*;\s*/);for(let t of n)if(0===t.indexOf("script-src")){let n,i=/'nonce-([^']+)'/g;for(;n=i.exec(t);)e.push(n[1])}}return e}}}()},9615:()=>{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}}}()},6774:()=>{!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))}))}}()},1897:()=>{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};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){t.type="up-disabled-script"}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(i){let r=n.selector("scriptSelectors");t.each(e.subtree(i,r),l)},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},7791:()=>{up.status=function(){const t=up.util,e=up.element;let n={};const i=new up.Config((()=>({currentClasses:["up-current"],activeClasses:["up-active"],loadingClasses:["up-loading"],navSelectors:["[up-nav]","nav"],noNavSelectors:["[up-nav=false]"]}))),r="a, [up-href]";function s(t){return t.upCurrentURLs||(t.upCurrentURLs=new up.LinkCurrentURLs(t))}function o(t,{layer:n}={}){n||(n=up.layer.get(t));let o=u(n);const a=i.selector("navSelectors"),c=`${a} :is(${r}), ${a}:is(${r})`,h=up.fragment.all(c,{layer:n});for(let t of h){const n=s(t).isCurrent(o);for(let e of i.currentClasses)t.classList.toggle(e,n);e.setAttrPresence(t,"aria-current","page",n)}}function u(e){return e.feedbackLocation||t.matchableURL(e.location)}function a(t){return e.ancestor(t,r)||t}function c(t){if(t)return function(e){e.showPlaceholder(t)}}function h(e){return t.isFunction(e)?[e]:t.isString(e)?(i=e,t.map(t.parseScalarJSONPairs(i),(([t,e])=>{let i=n[t]||up.fail('Unknown preview "%s"',t);return function(n,r){return up.puts("[up-preview]","Showing preview %o",t),i(n,e||r)}}))):t.isArray(e)?e.flatMap(h):[];var i}function l(t){const e=t.feedbackLocation,n=u(t.location);e&&e===n||(t.feedbackLocation=n,o(t.element,{layer:t}))}return up.on("up:location:changed",(t=>{!function(){const t=up.layer.front;t.showsLiveHistory()&&l(t)}()})),up.on("up:fragment:compile",((t,e)=>{o(e)})),up.on("up:layer:location:changed",(t=>{l(t.layer)})),up.on("up:framework:reset",(function(){up.layer.root.feedbackLocation=null,n=t.pickBy(n,"isDefault")})),{config:i,preview:function(t,e){e.isDefault=up.framework.evaling,n[t]=e},resolvePreviewFns:h,runPreviews:function(n,r){let{bindLayer:s}=n,o=up.FocusCapsule.preserve(s),u=s.asCurrent((()=>function(n,r){let{fragment:s,fragments:o,origin:u}=n,l=t.cleaner(),p=t=>new up.Preview({fragment:t,request:n,renderOptions:r,cleaner:l}),f=p(s);f.run(h(r.preview)),f.run(c(r.placeholder)),f.run(function(e,n){if(e)return function(e){e.addClassBatch(function({origin:e,activeElements:n}){return n||(n=t.wrapList(e)),n.map(a)}(e.renderOptions),i.activeClasses),e.addClassBatch(n,i.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(c))}return l.clean}(n,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},7924:()=>{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(b(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 b(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){let n=0;for(let i of t)e(i,n++)}function h(t){return null===t}function l(t){return void 0===t}const p=nt(l);function f(t){return l(t)||h(t)}const d=nt(f);function m(t){return!!f(t)||(_(t)&&t[m.key]?t[m.key]():b(t)||E(t)?0===t.length:!!w(t)&&0===Object.keys(t).length)}m.key="up.util.isBlank";const g=nt(m);function v(t){return"function"==typeof t}function b(t){return"string"==typeof t||t instanceof String}function y(t){return"number"==typeof t||t instanceof Number}function w(t){return"object"==typeof t&&!h(t)&&(l(t.constructor)||t.constructor===Object)}function _(t){const e=typeof t;return"object"===e&&!h(t)||"function"===e}function O(t){return t instanceof Element}function k(t){return t instanceof RegExp}function S(t){return up.browser.canJQuery()&&t instanceof jQuery}const{isArray:x}=Array;function E(t){return x(t)||function(t){return t instanceof NodeList}(t)||function(t){return"[object Arguments]"===Object.prototype.toString.call(t)}(t)||S(t)||function(t){return t instanceof HTMLCollection}(t)}function j(t){return E(t)?t:f(t)?[]:[t]}function C(t){return _(t)&&t[C.key]?t=t[C.key]():E(t)?t=F(t):w(t)&&(t=Object.assign({},t)),t}function F(t){return Array.prototype.slice.call(t)}function T(...t){return Object.assign({},...t)}function P(t,e){return e?T(e,t):t?C(t):{}}function R(t,e){e=u(e);let n=0;for(let i of t){const t=e(i,n++);if(t)return t}}function L(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 A(t){return $(t,d)}function $(t,e){e=u(e);const n=[];return c(t,(function(t,i){if(e(t,i))return n.push(t)})),n}function D(t){return t[t.length-1]}function M(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 H(t,e){e=u(e);const n={};for(let i in t)e(t[i],i,t)&&(n[i]=t[i]);return n}function q(t,...e){return v(t)?t(...e):t}C.key="up.util.copy",Date.prototype[C.key]=function(){return new Date(+this)};const B={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;"};function U(t,e){const n=t[e];return delete t[e],n}function I(t,e){if(e(D(t)))return t.pop()}function z(t){return I(t,v)}function V(t){return I(t,w)||{}}function K(t){return t}function X(t){const e=[];for(let n of t)E(n)?e.push(...n):e.push(n);return e}function W(t,e){if((null==t?void 0:t.valueOf)&&(t=t.valueOf()),(null==e?void 0:e.valueOf)&&(e=e.valueOf()),typeof t!=typeof e)return!1;if(E(t)&&E(e))return G(t,e);if(_(t)&&t[W.key])return t[W.key](e);if(w(t)&&w(e)){const n=Object.keys(t);return!!G(n,Object.keys(e))&&L(n,(n=>W(t[n],e[n])))}return t===e}function G(t,e){return t.length===e.length&&L(t,((t,n)=>W(t,e[n])))}function J(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(K)}function Q(t){let{masked:e,restore:n}=ht(t);return{maskedTokens:J(e,","),restore:n}}W.key="up.util.isEqual";let Y=0;function Z(t,e,n){for(let i of e)Object.defineProperty(t,i,{get(){const t=n.call(this);let e=t[i];return v(e)&&(e=e.bind(t)),e},set(t){n.call(this)[i]=t}})}function tt(t,e="%o"){let n;if("%c"===e)return"";if("%s"===e&&d(t)&&(t=t.toString()),b(t))n=t.trim().replace(/[\n\r\t ]+/g," "),"%o"===e&&(n=JSON.stringify(n));else if(l(t))n="undefined";else if(y(t)||v(t))n=t.toString();else if(x(t))n=`[${a(t,tt).join(", ")}]`;else if(S(t))n=`$(${a(t,tt).join(", ")})`;else if(O(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(k(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)}…${D(n)}`),n}const et=/%[oOdisfc]/g;function nt(t){return function(...e){return!t(...e)}}function it(t){if(t.error)throw t.error;return t.value}function rt(t,e,n){try{return{value:t.apply(e,n)}}catch(t){return{error:t}}}function st(t,...e){let n=[];for(;e.length;){let i=e.pop();if("options"===i)n.unshift(V(t));else if("callback"===i)n.unshift(z(t));else if("val"===i)n.unshift(t.pop());else if(v(i)){let e=i(D(t))?t.pop():void 0;n.unshift(e)}}return n}function ot(...t){return t.flat().filter(v)}function ut(t,e,{keepDelimiters:n=!1}={}){let i=0,r=/§(\d+)/g,s=[],o=0;return[r,...e].forEach((e=>{let r=!1;t=t.replaceAll(e,(function(t){r=!0;let e,o,u="§"+i++;if(n){let n=t[0],i=t.slice(-1);o=t.slice(1,-1),e=n+u+i}else o=t,e=u;return s.push(o),e})),r&&o++})),{masked:t,restore:(t,e=K)=>{for(let n=0;n<o;n++)t=t.replace(r,((t,n)=>e(s[n])));return t}}}const at=/'(?:\\\\|\\'|[^'])*'|"(?:\\\\|\\"|[^"])*"/g,ct=/{(?:[^{}]|{[^{}]*})*}|\((?:[^\(\)]|\([^\(\)]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\]/g;function ht(t){return ut(t,[at,ct],{keepDelimiters:!0})}function lt(t){return'"'===t[0]?t:'"'+(t=t.slice(1,-1)).replace(/(\\\\)|(\\')|(\\")|(")/g,(function(t,e,n,i){return e||n&&"'"||'\\"'}))+'"'}function pt(t){let{masked:e,restore:n}=ut(t,[at]);return e=e.replace(/([a-z_$][\w$]*:)/gi,(t=>'"'+t.slice(0,-1)+'":')),e=e.replace(/,\s*([}\]])/g,"$1"),e=n(e,lt),JSON.parse(e)}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:C,merge:T,mergeDefined:function(...t){const e={};for(let n of t)if(n)for(let t in n){const i=n[t];p(i)&&(e[t]=i)}return e},options:P,parseArgIntoOptions:function(t,e){let[n,i]=st(t,"val","options");return p(n)&&(i[e]=n),i},each:c,map:a,flatMap:function(t,e){return X(a(t,e))},mapObject:function(t,e){return a(t,e).reduce((function(t,e){return t[e[0]]=e[1],t}),{})},findResult:R,some:function(t,e){return!!R(t,e)},every:L,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=nt(u(e)))},intersect:function(t,e){return $(t,(t=>M(e,t)))},compact:A,compactObject:function(t){return H(t,d)},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:D,isNull:h,isDefined:p,isUndefined:l,isGiven:d,isMissing:f,isPresent:g,isBlank:m,presence:function(t,e=g){if(e(t))return t},isObject:_,isFunction:v,isString:b,isBoolean:function(t){return"boolean"==typeof t||t instanceof Boolean},isNumber:y,isElement:O,isTextNode:function(t){return t instanceof Text},isJQuery:S,isElementLike:function(t){var e;return!(!t||!(t.addEventListener||S(t)&&(null===(e=t[0])||void 0===e?void 0:e.addEventListener)))},isPromise:function(t){return _(t)&&v(t.then)},isOptions:w,isArray:x,isFormData:function(t){return t instanceof FormData},isList:E,isRegExp:k,isAdjacentPosition:function(t){return/^(before|after)/.test(t)},timer:function(t,e){return setTimeout(e,t)},contains:M,containsAll:function(t,e){return L(e,(e=>M(t,e)))},objectContains:function(t,e){return W(e,N(t,Object.keys(e)))},toArray:function(t){return x(t)?t:F(t)},pick:N,pickBy:H,omit:function(t,e){return H(t,((t,n)=>!M(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:U,renameKey:function(t,e,n){e in t&&(t[n]=U(t,e))},extractOptions:V,extractCallback:z,noop:t,asyncNoop:function(){return Promise.resolve()},identity:K,escapeHTML:function(t){return t.replace(/[&<>"']/g,(t=>B[t]))},escapeRegExp:function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},sequence:function(t){return t=A(t),(...e)=>a(t,(t=>t(...e)))},evalOption:q,evalAutoOption:function(t,e,...n){return"auto"===(t=q(t,...n))&&(t=q(e,...n)),t},flatten:X,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=K){return t.then(e,e)},isBasicObjectProperty:function(t){return Object.prototype.hasOwnProperty(t)},isCrossOrigin:s,task:function(t){return setTimeout(t)},isEqual:W,getSimpleTokens:function(t,{json:e=!1,separator:n=/[,\s]/}={}){return b(t)?e&&/^\[.*]$/.test(t)?pt(t):J(t,n):j(t)},getComplexTokens:function(t){if(b(t)){let{maskedTokens:e,restore:n}=Q(t);return e.map((t=>n(t)))}return j(t)},wrapList:j,wrapValue:function(t,...e){return e[0]instanceof t?e[0]:new t(...e)},uid:function(){return Y++},upperCaseFirst:function(t){return t[0].toUpperCase()+t.slice(1)},lowerCaseFirst:function(t){return t[0].toLowerCase()+t.slice(1)},delegate:Z,delegatePromise:function(t,e){return Z(t,["then","catch","finally"],e)},reverse:function(t){return C(t).reverse()},camelToKebabCase:function(t){return t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()))},sprintf:function(t,...e){return t.replace(et,(t=>tt(e.shift(),t)))},withRenamedKeys:function(t,e){const n={};for(let i in t){let r=e(i);d(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]=rt(e,this,t)),it(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=ot(...e).map(n),t.push(...ot(...e))},n=function(...t){e(t,K)};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:ot,args:st,parseRelaxedJSON:pt,parseScalarJSONPairs:function(t){let{maskedTokens:e,restore:n}=Q(t);return e.map((t=>{let[e,i,r]=t.match(/([^{]+)({[^}]*})?/);return[n(i.trim()),r&&pt(n(r))]}))},maskPattern:ut,expressionOutline:ht,parseString:function(t){return JSON.parse(lt(t))}}}()},4606:(t,e,n)=>{n(573),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(t=location.hash,e){let n=v(t,e);if(n)return s(n,{top:!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){for(let n of t){const t=d(n);n.scrollTop=e[t]||0}}function v(t,i={}){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)}var r}up.on("focusin",(function({relatedTarget:t}){u(t)}));const b=["selectionStart","selectionEnd","scrollLeft","scrollTop"];return document.addEventListener("DOMContentLoaded",(function(){a(),t.task(a)})),up.on(window,"hashchange",(()=>a())),up.on("up:click",'a[href^="#"]',(function(t,e){e.hash===location.hash&&(up.link.isFollowable(e)||a(e.hash)&&up.event.halt(t))})),{reveal:s,revealHash:a,firstHashTarget:v,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&&(g(e,r),up.puts("up.viewport.restoreScroll()","Restored scroll positions to %o",r),!0)},resetScroll:function(...t){const[e,n]=m(t);g(e,{})},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 b)try{e[n]=t[n]}catch(t){}return e},bodyShifter:r}}(),up.focus=up.viewport.focus,up.reveal=up.viewport.reveal},3507:()=>{window.up={version:"3.10.2"}}},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(3507),n(8374),n(7924),n(3924),n(6535),n(2811),n(9675),n(376),n(8272),n(4366),n(8010),n(4861),n(3469),n(4504),n(2406),n(3742),n(1653),n(1104),n(5949),n(1279),n(6346),n(3030),n(7948),n(2714),n(8228),n(7050),n(9441),n(9489),n(7422),n(2200),n(278),n(9005),n(1569),n(2737),n(3635),n(1906),n(4158),n(3139),n(2214),n(5240),n(665),n(2828),n(2587),n(7031),n(8057),n(4850),n(7956),n(7403),n(6412),n(7965),n(7771),n(86),n(4552),n(5580),n(7101),n(6066),n(6387),n(3698),n(2460),n(7792),n(4308),n(8665),n(3645),n(8397),n(7782),n(2705),n(606),n(5437),n(7974),n(6413),n(5221),n(2298),n(4517),n(7241),n(2723),n(8720),n(7885),n(4818),n(9634),n(8670),n(3535),n(4453),n(1897),n(8944),n(2667),n(4606),n(4034),n(1647),n(9443),n(3849),n(2851),n(7791),n(9615),n(6774),up.framework.onEvaled()})();