unpoly-rails 3.14.2 → 3.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +317 -0
- data/README.md +61 -40
- data/assets/unpoly/unpoly-bootstrap3.css.map +1 -0
- data/assets/unpoly/unpoly-bootstrap3.js.map +1 -0
- data/assets/unpoly/unpoly-bootstrap3.min.css.map +1 -0
- data/assets/unpoly/unpoly-bootstrap3.min.js.map +1 -0
- data/assets/unpoly/unpoly-bootstrap4.css.map +1 -0
- data/assets/unpoly/unpoly-bootstrap4.js.map +1 -0
- data/assets/unpoly/unpoly-bootstrap4.min.css.map +1 -0
- data/assets/unpoly/unpoly-bootstrap4.min.js.map +1 -0
- data/assets/unpoly/unpoly-bootstrap5.css.map +1 -0
- data/assets/unpoly/unpoly-bootstrap5.js.map +1 -0
- data/assets/unpoly/unpoly-bootstrap5.min.css.map +1 -0
- data/assets/unpoly/unpoly-bootstrap5.min.js.map +1 -0
- data/assets/unpoly/unpoly-migrate.js +228 -149
- data/assets/unpoly/unpoly-migrate.js.map +1 -0
- data/assets/unpoly/unpoly-migrate.min.js +1 -1
- data/assets/unpoly/unpoly-migrate.min.js.map +1 -0
- data/assets/unpoly/unpoly.css.map +1 -0
- data/assets/unpoly/unpoly.es6.js +666 -430
- data/assets/unpoly/unpoly.es6.js.map +1 -0
- data/assets/unpoly/unpoly.es6.min.js +1 -1
- data/assets/unpoly/unpoly.es6.min.js.map +1 -0
- data/assets/unpoly/unpoly.js +2167 -1990
- data/assets/unpoly/unpoly.js.map +1 -0
- data/assets/unpoly/unpoly.min.css.map +1 -0
- data/assets/unpoly/unpoly.min.js +1 -1
- data/assets/unpoly/unpoly.min.js.map +1 -0
- data/lib/unpoly/rails/change/cache.rb +4 -4
- data/lib/unpoly/rails/change/layer.rb +3 -0
- data/lib/unpoly/rails/change.rb +35 -8
- data/lib/unpoly/rails/controller.rb +3 -2
- data/lib/unpoly/rails/engine.rb +7 -0
- data/lib/unpoly/rails/request_echo_headers.rb +10 -3
- data/lib/unpoly/rails/util.rb +38 -0
- data/lib/unpoly/rails/version.rb +1 -1
- metadata +31 -8
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(()=>{var t={4518(){},3278(){},7339(){},4598(){},7412(){},2208(){},889(){up.browser={submitForm:function(t){t.submit()},canPushState:function(){return"GET"===up.protocol.initialRequestMethod()},canJQuery:function(){return!!window.jQuery},assertConfirmed:function(t){if(t.confirm&&!window.confirm(t.confirm))throw new up.Aborted("User canceled action");return!0},popCookie:function(t){var e;let n=null===(e=document.cookie.match(new RegExp(t+"=(\\w+)")))||void 0===e?void 0:e[1];if(n)return document.cookie=t+"=;Max-Age=0;Path=/",n}}},8504(){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.u()}raiseStack(){1===++this.i&&this.l()}onAnchoredElementInserted(t){return this.t.add(t),this.h(t,"right"),()=>this.t.delete(t)}p(){return this.i>0}l(){this.m=up.viewport.rootScrollbarWidth(),this.o(t.setStyleTemp(t.root,{"--up-scrollbar-width":this.m+"px"})),this.h(document.body,"padding-right");for(let t of this.t)this.h(t,"right")}u(){this.o.clean()}h(e,n){if(!this.p())return;let i=t.style(e,n);this.o(t.setStyleTemp(e,{["--up-original-"+n]:i}),t.addClassTemp(e,"up-scrollbar-away"))}}},8195(){const t=up.util,e=up.element;up.Change.Addition=class Addition extends up.Change{constructor(t){super(t),this.v=t.acceptLayer,this._=t.dismissLayer,this.O=t.eventPlans||[],this.k=t.response}handleLayerChangeRequests(t,e){this.layer.isOverlay()&&(this.S(),this.layer.assertAlive(),this.layer.tryAcceptForLocation(e,this.k),this.layer.assertAlive(),this.layer.tryAcceptForElements(t,this.k),this.layer.assertAlive(),this.j(),this.layer.assertAlive(),this.layer.tryDismissForLocation(e,this.k),this.layer.assertAlive(),this.layer.tryDismissForElements(t,this.k),this.layer.assertAlive()),this.layer.asCurrent(()=>{for(let t of this.O)up.emit(Object.assign(Object.assign({},t),{response:this.k})),this.layer.assertAlive()})}S(){t.isDefined(this.v)&&this.layer.accept(this.v,{response:this.k})}j(){t.isDefined(this._)&&this.layer.dismiss(this._,{response:this.k})}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)}executeSteps({steps:t,responseDoc:e,noneOptions:n}){return new up.Change.UpdateSteps({steps:t,noneOptions:n}).execute(e)}}},6347(){up.Change=class Change{constructor(t){this.options=t}execute(){throw new up.NotImplemented}deriveFailOptions(){return up.RenderOptions.deriveFailOptions(this.options)}}},2113(){const t=up.util;up.Change.CloseLayer=class CloseLayer extends up.Change{constructor(t){var e,n;super(t),this.P=t.verb,this.layer=up.layer.get(t),this.R=t.origin,this.L=t.value,this.A=null===(e=t.preventable)||void 0===e||e,this.k=t.response,this.D=null===(n=t.history)||void 0===n||n}execute(){if(this.layer.assertAlive(),up.browser.assertConfirmed(this.options),this.$().defaultPrevented&&this.A)throw new up.Aborted("Close event was prevented");this.M(),up.fragment.abort({reason:"Layer is closing",layer:this.layer}),this.layer.state="closing";const{parent:t}=this.layer;this.layer.peel(),this.H(t),this.layer.teardownHandlers(),this.layer.destroyElements(this.options),this.layer.stack.remove(this.layer),this.D&&t.restoreHistory(),this.layer.state="closed",this.N(t)}$(){let e=this.layer.emit(this.B(`up:layer:${this.P}`),{callback:this.layer.callback(`on${t.upperCaseFirst(this.P)}`),log:[`Will ${this.P} ${this.layer} with value %o`,this.L]});return this.L=e.value,e}M(){let t=this.B(`up:layer:${this.P}ing`);this.layer.emit(t,{log:!1})}N(e){const n=`${this.P}ed`,i=t.upperCaseFirst(n);return this.layer.emit(this.B(`up:layer:${n}`),{baseLayer:e,callback:this.layer.callback(`on${i}`),ensureBubbles:!0,log:[`${i} ${this.layer} with value %o`,this.L]})}B(t){return up.event.build(t,{layer:this.layer,value:this.L,origin:this.R,response:this.k})}H(t){var e;let n=this.layer.hasFocus();if(this.layer.overlayFocus.teardown(),null===(e=t.overlayFocus)||void 0===e||e.moveToFront(),n){let e=this.layer.origin||t.element;up.focus(e,{preventScroll:!0})}}}},864(){up.Change.DestroyFragment=class DestroyFragment extends up.Change{constructor(t){super(t),this.I=up.layer.get(t)||up.layer.current,this.q=this.options.element,this.U=this.options.animation,this.V=this.options.log}execute(){this.K=this.q.parentNode,up.fragment.markAsDestroying(this.q),up.animate(this.q,this.U,Object.assign(Object.assign({},this.options),{onFinished:()=>{var t,e;this.X(),this.W(),null===(e=(t=this.options).onFinished)||void 0===e||e.call(t)}}))}X(){this.I.asCurrent(()=>{up.fragment.abort(this.q),up.script.clean(this.q,{layer:this.I}),this.q.remove()})}W(){up.fragment.emitDestroyed(this.q,{parent:this.K,log:this.V})}}},5249(){var t;const e=up.util;up.Change.FromContent=(t=class FromContent extends up.Change{constructor(t){super(t),this.R=t.origin,this.G=t.preflight,this.J=up.layer.getAll(t)}Y(){let t=[];return this.Z(),this.tt(),this.et(t,this.J,this.options.target),this.et(t,this.J,this.options.fallback),t}nt(t){return"new"===t||t.isAlive()}Z(){this.J=e.filter(this.J,this.nt)}et(t,e,n){for(let i of e)for(let e of this.it(n,i)){const n=Object.assign(Object.assign({},this.options),{target:e,layer:i,defaultPlacement:this.rt()}),r="new"===i?new up.Change.OpenLayer(n):new up.Change.UpdateLayer(n);t.push(r)}}it(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.options.mode,origin:this.R})}execute(){return this.options.preload?Promise.resolve():this.st(this.ot.bind(this))||this.ut()}ot(t){return up.fragment.mutate(()=>t.execute(this.ct(),this.lt.bind(this,t)))}ht(t){return!(t instanceof up.CannotMatch)}lt(t){let e=this.Y()[0];t!==e&&up.puts("up.render()",'Could not match primary target "%s". Updating a fallback target "%s".',e.target,t.target);let{assets:n}=this.ct();n&&up.script.assertAssetsOK(n,t.options),this.options.handleAbort(this.getPreflightProps())}ct(){var t,n;if(this.G)return;const i=e.pick(this.options,["target","content","fragment","document","html","cspInfo","origin","data"]);return null===(n=(t=up.migrate).handleResponseDocOptions)||void 0===n||n.call(t,i),"content"===this.rt()&&(i.target=this.ft(i.target)),new up.ResponseDoc(i)}tt(){var t;if(this.G)return;let e=this.ct();this.options.fragment&&((t=this.options).target||(t.target=e.rootSelector())),this.options.title=up.history.refineOption(this.options.title,e.title),this.options.metaTags=up.history.refineOption(this.options.metaTags,e.metaTags),this.options.lang=up.history.refineOption(this.options.lang,e.lang)}rt(){if(!this.options.document&&!this.options.fragment)return"content"}ft(t){let e=this.J[0]||up.layer.root;return this.it(t||":main",e)[0]}getPreflightProps(t={}){return this.st(t=>t.getPreflightProps())||t.optional||this.dt()}dt(){this.gt("Could not find target in current page")}ut(){this.gt("Could not find common target in current page and response")}gt(t){if(this.Y().length){const n=e.uniq(e.map(this.Y(),"target")),i=up.layer.optionToString(this.options.layer);throw new up.CannotMatch([t+" (tried selectors %o in %s)",n,i])}if(0!==this.J.length)throw this.options.didForceFailOptions?new up.CannotMatch("No target selector given for failed responses (https://unpoly.com/failed-responses)"):new up.CannotMatch("No target selector given");this.vt()}vt(){throw new up.CannotMatch("Could not find a layer to render in. You may have passed an unmatchable layer reference, or a detached element.")}st(t){for(let e of this.Y())try{return t(e)}catch(t){if(this.ht(t))throw t}}},e.memoizeMethod(t.prototype,{Y:!0,ct:!0,getPreflightProps:!0}),t)},9797(){var t,e=this&&this.bt||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.k=t.response,this.yt=this.k.request}execute(){var t;if(up.fragment.config.skipResponse(this.wt())?this._t():(this.yt.assertEmitted("up:fragment:loaded",Object.assign(Object.assign({},this.wt()),{callback:this.options.onLoaded,log:["Loaded fragment from %s",this.k.description],skip:()=>this._t()})),this.Ot()),null!==(t=n.evalOption(this.options.fail,this.k))&&void 0!==t?t:!this.k.ok)throw this.kt(this.deriveFailOptions());return this.kt(this.options)}Ot(){if(!up.fragment.config.renderableResponse(this.k))throw new up.CannotParse(['Cannot render response with content-type "%s" (configure with up.fragment.config.renderableResponse)',this.k.contentType])}_t(){up.puts("up.render()","Skipping "+this.k.description),this.options.target=":none",this.options.failTarget=":none"}kt(t){return t.didForceFailOptions&&up.puts("up.render()","Rendering failed response using fail-prefixed options (https://unpoly.com/failed-responses)"),this.St(t),t.meta=this.Et(),t.verifyFinished=e=>this.jt(e,t),new up.Change.FromContent(t).execute()}jt(t,n){return e(this,void 0,void 0,function*(){if(!up.fragment.shouldRevalidate(this.yt,this.k,n))return;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),{feedback:n.feedback,preferOldElements:t.fragments,layer:t.layer,onFinished:null,expiredResponse:this.k,preview:this.Ct(n),abort:!1,cache:!1,background:!0}));if(!e.none)return e}})}Ct({preview:t,revalidatePreview:e}){return!0===e?t:e}wt(){const{expiredResponse:t}=this.options;return{request:this.yt,response:this.k,renderOptions:this.options,revalidating:!!t,expiredResponse:t}}Et(){var t,e;let n={revalidating:!!this.options.expiredResponse,ok:this.k.ok};return null===(e=(t=up.migrate).processHelloMeta)||void 0===e||e.call(t,n,this.k),n}St(t){var e,i;const r=this.k.url;let s=r,o=this.yt.hash;o&&(t.hash=o,s+=o),"GET"===this.k.method?t.source=up.history.refineOption(t.source,r):(t.source=up.history.refineOption(t.source,"keep"),t.history=!!t.location);let u=this.k.openLayer;u&&(up.script.adoptRenderOptionsFromHeader(u,this.k.cspInfo),Object.assign(t,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},up.Layer.Overlay.UNSET_VISUALS),{target:void 0}),up.fragment.config.navigateOptions),u),{layer:"new"}))),t.location=up.history.refineOption(t.location,s),t.title=up.history.refineOption(t.title,this.k.title),t.eventPlans=this.k.eventPlans;let a=this.k.target;a&&(t.target=a),t.acceptLayer=this.k.acceptLayer,t.dismissLayer=this.k.dismissLayer,t.document=this.k.text,this.k.none&&(t.target=":none"),t.context=n.merge(t.context,this.k.context),t.cspInfo=this.k.cspInfo,null!==(e=t.time)&&void 0!==e||(t.time=this.k.lastModified),null!==(i=t.etag)&&void 0!==i||(t.etag=this.k.etag)}},n.memoizeMethod(t.prototype,{wt:!0}),t)},1589(){var t,e=this&&this.bt||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(){return e(this,void 0,void 0,function*(){var t,e;let i=this.xt();if(i)return up.puts("up.render()",i),up.network.loadPage(this.options),n.unresolvablePromise();let r=this.Ft(),s=this.request=up.request(r);return null===(e=(t=this.options).onRequestKnown)||void 0===e||e.call(t,s),this.options.preload?s:(this.options.handleAbort(Object.assign({request:s},r)),s.runPreviews(this.options),yield n.always(s,t=>this.Tt(t)))})}xt(){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}Ft(){const t=this.Pt(this.options),e=this.Pt(this.deriveFailOptions(),{optional:!0});return Object.assign(Object.assign(Object.assign({},this.options),t),n.withRenamedKeys(e,up.fragment.failKey))}getPreflightProps(){return this.Ft()}Pt(t,e){return new up.Change.FromContent(Object.assign(Object.assign({},t),{preflight:!0})).getPreflightProps(e)}Tt(t){return t instanceof up.Response?this.Rt(t):this.Lt(t)}Rt(t){return new up.Change.FromResponse(Object.assign(Object.assign({},this.options),{response:t})).execute()}Lt(t){if(t instanceof up.Offline){let e=["Cannot load fragment from %s: %s",t.request.description,t.reason];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:e})}throw t}},n.memoizeMethod(t.prototype,{Ft:!0}),t)},5845(){var t=this&&this.bt||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.R=t.origin,this.At=t.baseLayer}getPreflightProps(){return{mode:this.options.mode,context:this.Dt().context,origin:this.options.origin,target:this.target,bindLayer:this.At,layer:"new",bindFragments:e.compact([up.fragment.get(":main",{layer:this.At})]),fragments:[]}}execute(t,n){this.$t(t),n(),this.Mt();let i=e.memoize(()=>this.Ht(t)),r=this.layer.on("up:layer:accepting up:layer:dismissing",i);try{let e=[this.Nt(t),...i()];return new up.RenderResult({layer:this.layer,target:this.target,renderOptions:this.options,partialResults:e})}finally{r()}}$t(t){if(":none"===this.target?this.Bt=document.createElement("up-none"):this.Bt=t.select(this.target),!this.Bt||!this.At.isAlive())throw new up.CannotMatch}Mt(){up.puts("up.render()",`Opening element "${this.target}" in new overlay`),this.It(),this.layer=this.Dt(),this.At.peel({history:!this.layer.history,intent:this.options.peel}),this.At.saveHistory(),up.layer.stack.push(this.layer),this.layer.createElements(),this.layer.setupHandlers()}Nt(t){this.handleLayerChangeRequests([this.Bt],this.qt()),t.commitElement(this.Bt),this.layer.setContent(this.Bt),t.finalizeElement(this.Bt),this.Ut(),this.setReloadAttrs({newElement:this.Bt,source:this.options.source});let e=this.zt();this.H(),this.Vt(),this.layer.state="opened",this.Kt(),this.layer.assertAlive();let n=this.layer.startOpenAnimation();return{fragments:[this.Bt],finished:Promise.all([e,n]),verifyFinished:()=>this.layer.assertAlive()}}Ht(t){let e=this.Xt().other;return this.executeSteps({steps:e,responseDoc:t})}zt(){return t(this,void 0,void 0,function*(){yield up.hello(this.layer.element,Object.assign(Object.assign({},this.options),{layer:this.layer,dataRoot:this.Bt}))})}Dt(){return up.layer.build(this.options,t=>this.options=up.RenderOptions.finalize(t))}Ut(){var t;"auto"===this.layer.history&&(this.layer.history=up.fragment.hasAutoHistory([this.Bt],this.layer)),(t=this.layer).history&&(t.history=this.At.history),this.layer.updateHistory(this.Wt())}H(){var t;null===(t=this.At.overlayFocus)||void 0===t||t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.Bt,layer:this.layer,autoMeans:["autofocus","layer"],inputDevice:this.options.inputDevice}).process(this.options.focus)}Vt(){var t;const e=Object.assign(Object.assign({},this.options),{fragment:this.Bt,layer:this.layer,autoMeans:["hash","layer"]});new up.FragmentScrolling(e).process(null!==(t=this.options.scrollMap)&&void 0!==t?t:this.options.scroll)}It(){up.event.assertEmitted("up:layer:open",{origin:this.R,baseLayer:this.At,layerOptions:this.options,log:"Opening new overlay"})}Kt(){this.layer.emit("up:layer:opened",{origin:this.R,callback:this.layer.callback("onOpened"),log:`Opened new ${this.layer}`})}Xt(){return up.radio.hungrySteps(this.Gt())}Gt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.layer.history})}Wt(){return up.history.options(this.options)}qt(){return this.Gt().location}}},5224(){var t;const e=up.util;up.Change.UpdateLayer=(t=class UpdateLayer extends up.Change.Addition{constructor(t){super(t=up.RenderOptions.finalize(t)),this.layer=t.layer,this.target=t.target,this.Jt=t.context,this.Qt=up.fragment.parseTargetSteps(this.target,this.options)}getPreflightProps(){this.Yt();let t=this.Zt();return{layer:this.layer,bindLayer:this.layer,mode:this.layer.mode,context:e.merge(this.layer.context,this.Jt),origin:this.options.origin,target:this.te(),fragments:t,bindFragments:t}}te(){this.Yt();let t=this.Qt.filter(t=>{var e;return!t.maybe||(null===(e=t.oldElement)||void 0===e?void 0:e.isConnected)});return e.map(t,"selector").join(", ")||":none"}Zt(){return this.Yt(),e.map(this.Qt,"oldElement")}execute(t,n){this.$t(t),n();let i=e.memoize(()=>this.Ht(t)),r=this.layer.on("up:layer:accepting up:layer:dismissing",i);try{let e=[...this.ee(t),...i()];return new up.RenderResult({target:this.target,layer:this.layer,renderOptions:this.options,partialResults:e})}finally{r()}}ee(t){this.Qt.length&&up.puts("up.render()",`Updating "${this.te()}" in ${this.layer}`),this.ne(),this.options.saveScroll&&up.viewport.saveScroll({layer:this.layer}),this.options.saveFocus&&up.viewport.saveFocus({layer:this.layer});let{peel:n}=this.options;return n&&this.layer.peel({history:!this.ie(),intent:n}),!1!==this.options.abort&&up.fragment.abort(this.Zt(),{reason:"Fragment is being replaced",jid:this.options.jid}),Object.assign(this.layer.context,this.Jt),this.handleLayerChangeRequests(e.map(this.Qt,"newElement"),this.qt()),this.layer.updateHistory(this.Wt()),this.executeSteps({steps:this.Qt,noneOptions:this.options,responseDoc:t})}Ht(t){let e=this.Xt().other;return this.executeSteps({steps:e,responseDoc:t})}Yt(){this.re(),this.se()}$t(t){this.re(),this.oe(),this.se(),this.ue(t)}oe(){this.Qt.push(...this.Xt().current)}re(){this.Qt=this.Qt.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})}ue(t){this.Qt=t.selectSteps(this.Qt)}se(){this.Qt=up.fragment.compressNestedSteps(this.Qt)}Xt(){return up.radio.hungrySteps(this.Gt())}ne(){let t=up.FocusCapsule.preserve(this.layer),e=up.viewport.getScrollTops({layer:this.layer});this.Qt.forEach((n,i)=>{n.focusCapsule=t,n.oldScrollTops=e,n.scrollMap&&(n.scroll=!1),i>0&&(n.focus=!1,n.scrollMap=void 0,"keep"!==n.scroll&&(n.scroll=!1),n.data=void 0)})}ie(){return e.evalAutoOption(this.options.history,this.ae.bind(this))}ae(){const t=e.map(this.Qt,"oldElement");return up.fragment.hasAutoHistory(t,this.layer)}qt(){return this.Wt().location}Gt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.ie()})}Wt(){return this.ie()?up.history.options(this.options):{}}},e.memoizeMethod(t.prototype,{Yt:!0,re:!0,ie:!0,Xt:!0}),t)},302(){const t=up.util,e=up.element;up.Change.UpdateSteps=class UpdateSteps extends up.Change.Addition{constructor(e){super(e),this.Qt=t.copy(t.assert(e.steps)),this.ce=e.noneOptions||{}}execute(t){return this.responseDoc=t,this.Qt=t.selectSteps(this.Qt),this.Qt=t.commitSteps(this.Qt),[...this.le(),this.he()]}le(){return this.Qt.length?this.Qt.toReversed().map(t=>this.pe(t)).toReversed():this.fe()}he(){return{verifyFinished:()=>{for(let t of this.Qt)t.layer.assertAlive()}}}pe(t){switch(t.placement){case"swap":{let e=up.fragment.keepPlan(t);return e?this.de(t,e):this.me(t)}case"content":return this.ge(t);case"before":case"after":return this.ve(t);default:up.fail("Unknown placement: %o",t.placement)}}fe(){return this.H(null,this.ce),this.Vt(null,this.ce),[{}]}de(t,e){if(e)return up.fragment.emitKept(e),this.H(t.oldElement,t),this.Vt(t.oldElement,t),{}}me(t){var e;const n=null!==(e=t.parentElement)&&void 0!==e?e:t.oldElement.parentNode;let i;up.fragment.markAsDestroying(t.oldElement),this.be(t);let r=up.motion.morph(t.oldElement,t.newElement,t.transition,Object.assign(Object.assign({},t),{afterInsert:()=>{this.ye(t),i=this.we(t.newElement,t),this._e(t),this.H(t.newElement,t),this.Vt(t.newElement,t)},beforeRemove:()=>{up.script.clean(t.oldElement,{layer:t.layer})},afterRemove:()=>{var e;up.fragment.emitDestroyed(t.oldElement,{parent:n,log:!1}),null===(e=t.afterRemove)||void 0===e||e.call(t)}}));return{fragments:[t.newElement],finished:Promise.all([r,i])}}ge(t){let n=[...t.newElement.children],i=e.wrapChildren(t.oldElement),r=e.wrapChildren(t.newElement);return{fragments:n,finished:this.me(Object.assign(Object.assign({},t),{placement:"swap",parentElement:t.oldElement.parentNode,oldElement:i,newElement:r,focus:!1,afterRemove:()=>{e.unwrap(r),this.H(t.oldElement,t)}})).finished}}ve(t){let n=[...t.newElement.children],i=e.wrapChildren(t.newElement),r="before"===t.placement?"afterbegin":"beforeend";t.oldElement.insertAdjacentElement(r,i);let s=this.we(i,t);this.Vt(i,t);let o=up.animate(i,t.animation,Object.assign(Object.assign({},t),{onFinished:()=>{e.unwrap(i);const n=e.leadingElement(t.oldElement.childNodes)||t.oldElement;this.H(n,t)}}));return{fragments:n,finished:Promise.all([s,o])}}we(t,e){return this.responseDoc.finalizeElement(t),this.setReloadAttrs(e),up.hello(t,e)}be(e){const n=[];if(e.keep)for(let i of e.oldElement.querySelectorAll("[up-keep]")){let r=up.fragment.keepPlan(Object.assign(Object.assign({},e),{oldElement:i,descendantsOnly:!0}));if(r){const e=i.cloneNode(!0);i.insertAdjacentElement("beforebegin",e),i.classList.add("up-keeping"),up.script.block(r.newElement);let s=up.viewport.subtree(r.oldElement);r.revivers=t.map(s,function(t){let e=up.viewport.copyCursorProps(t);return()=>up.viewport.copyCursorProps(e,t)}),this.Oe()?r.newElement.replaceWith(i):document.body.append(i),n.push(r)}}e.descendantKeepPlans=n}ye(t){for(let e of t.descendantKeepPlans){e.newElement.replaceWith(e.oldElement);for(let t of e.revivers)t()}}_e(t){for(let e of t.descendantKeepPlans)e.oldElement.classList.remove("up-keeping"),up.fragment.emitKept(e)}Oe(){return t.some(this.Qt,t=>t.oldElement.matches("body"))}H(t,e){new up.FragmentFocus(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoFocus})).process(e.focus)}Vt(t,e){var n;new up.FragmentScrolling(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoScroll})).process(null!==(n=e.scrollMap)&&void 0!==n?n:e.scroll)}}},3526(){const t=up.util,e=up.element;up.Config=class Config{constructor(t=()=>({})){this.ke=t,this.reset(),document.addEventListener("up:framework:reset",()=>this.reset())}reset(){Object.assign(this,this.ke())}matches(t,e,n){return null==t?void 0:t.matches(this.selector(e,n))}matchesFn(t){return(e,n)=>this.matches(e,t,n)}selector(n,i=""){let r=this[n],s=this["no"+t.upperCaseFirst(n)];return e.unionSelector(r,s,i)}selectorFn(t){return e=>this.selector(t,e)}selectorFns(t){return[this.selectorFn(t),this.matchesFn(t)]}}},8379(){const t=up.util,e=/'nonce-([^']+)'/g;function n(n){let i=n.matchAll(e);return t.map(i,"1")}up.CSPInfo=class CSPInfo{constructor(t="",e=[]){this.declaration=t,this.nonces=e}isStrictDynamic(){return this.declaration.includes("'strict-dynamic'")}isUnsafeEval(){return this.declaration.includes("'unsafe-eval'")}static fromHeader(t){var e;let i={};if(t){let r=t.split(/\s*;\s*/);for(let t of r){let r=null===(e=t.match(/^(script|default)-src\s/))||void 0===e?void 0:e[1];r&&(i[r]=[t,n(t)])}}let r=i.script||i.default;return r?new this(...r):this.none()}static none(){return new this}}},1739(){const t=up.util;up.DestructorPass=class DestructorPass{constructor(t,e){this.Se=t,this.Ee=e}run(){for(let e of this.je()){let n=t.pluckKey(e,"upDestructors");null==n||n.clean(e)}}je(){const t=Object.assign(Object.assign({},this.Ee),{destroying:!0});return up.fragment.subtree(this.Se,".up-can-clean",t)}}},611(){const t=up.util,e=up.element;up.EventEmitter=class EventEmitter extends up.Record{keys(){return["target","event","baseLayer","callback","log","ensureBubbles"]}emit(){return this.Ce(),this.baseLayer?this.baseLayer.asCurrent(()=>this.xe()):this.xe(),this.event}xe(){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`)}Ce(){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)}}},5229(){const t=up.util;up.EventListener=class EventListener extends up.Record{keys(){return["element","eventType","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}constructor(t){var e;super(t),this.Fe=this.constructor.Te(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.Fe]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),e[this.Fe]=this,this.element.addEventListener(...this.Pe())}Pe(){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.Fe],this.element.removeEventListener(...this.Pe())}nativeCallback(e){if(up.framework.beforeBoot&&!this.beforeBoot)return;let n=e.target;if(this.selector){let e=t.evalOption(this.selector);n=n.closest(e)}if((!this.guard||this.guard(e))&&n){const t=[e,n],i=this.callback.length;if(1!==i&&2!==i){const e=up.script.data(n);t.push(e)}if("click"===this.eventType&&n.disabled)return;const r=this.callback.bind(n,...t);this.baseLayer?this.baseLayer.asCurrent(r):r()}}static fromElement(t){let e=t.element.upEventListeners;if(e)return e[this.Te(t)]}static Te(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[]}}},3441(){const t=up.util;up.EventListenerGroup=class EventListenerGroup extends up.Record{keys(){return["elements","eventTypes","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}bind(){const e=t.cleaner();return this.Re(function(t){const n=new up.EventListener(t);return n.bind(),e(n.unbind.bind(n))}),e.clean}Re(t){for(let e of this.elements)for(let n of this.eventTypes)t(this.Le(e,n))}Le(t,e){return Object.assign(Object.assign({},this.attributes()),{element:t,eventType:e})}unbind(){this.Re(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))}}},621(){var t=this&&this.bt||function(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,u)}a((i=i.apply(t,e||[])).next())})};const e=up.util;up.FieldWatcher=class FieldWatcher{constructor(t,e,n){var i;this.Ee=e,this.Ae=t,this.De=n,this.$e=e.batch,this.Me=null!==(i=e.logPrefix)&&void 0!==i?i:"up.watch()",this.He=e.includeDisabled,this.Ne()}start(){return this.Be=null,this.Ie=this.qe(),this.Ue=null,this.ze=!1,e.sequence(this.Ve(),this.Ke(),this.Xe(),()=>this.We())}Ne(){const t=t=>up.fail(t,this.Me,this.Ae);this.De||t("No callback provided for %s (%o)"),this.Ae.matches("input[type=radio]")&&t("Use %s with the container of a radio group, not with an individual radio button (%o)"),up.form.isField(this.Ae)&&!this.Ae.name&&t("%s can only watch fields with a name (%o)")}Ve(){return up.form.isField(this.Ae)?this.Ge(this.Ae):up.form.trackFields(this.Ae,t=>this.Ge(t))}Ke(){return up.on("up:fragment:aborted",{guard:({target:t})=>t.contains(this.Je)},()=>this.We())}Xe(){return up.on("reset",{guard:({target:t})=>t===this.Je},t=>this.Qe(t))}get Je(){return up.form.getRegion(this.Ae)}Ye(t){let n=e.copy(this.Ee);return up.form.watchOptions(t,n,{defaults:{event:"input"}})}Ge(t){let e=this.Ye(t),n=e.event;return up.on(t,n,t=>this.Ze(t,e))}We(){this.Be=null}tn(t,n){this.Be=t,this.en=n;let i=n.delay||0;clearTimeout(this.Ue),this.Ue=e.timer(i,()=>{this.Ue=null,this.nn()})}rn(t){return!e.isEqual(t,this.Ie)&&!e.isEqual(this.Be,t)}nn(){return t(this,void 0,void 0,function*(){if(!this.Be)return;if(this.ze)return;if(this.Ue)return;if(!up.fragment.isAlive(this.Je))return;let t=e.omit(this.en,["event","delay"]);const n=this.sn(this.Ie,this.Be);this.Ie=this.Be,this.Be=null,this.ze=!0,this.en=null;const i=[];if(this.$e)i.push(this.un(n,t));else for(let e in n){const r=n[e];i.push(this.un(r,e,t))}if(e.some(i,e.isPromise)){let t=Promise.allSettled(i);yield t}this.ze=!1,this.nn()})}un(...t){return up.error.guard(this.De,...t)}sn(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}qe(){return up.Params.fromContainer(this.Ae,{includeDisabled:this.He}).toObject()}Ze(t,e={}){const n=this.qe();this.rn(n)&&(up.log.putsEvent(t),this.tn(n,e))}Qe(t){e.task(()=>this.Ze(t))}}},7275(){const t=up.util;up.FIFOCache=class FIFOCache{constructor({capacity:e=10,normalizeKey:n=t.identity}={}){this.an=new Map,this.cn=e,this.ln=n}get(t){return t=this.ln(t),this.an.get(t)}set(t,e){if(this.an.size===this.cn){let t=this.an.keys().next().value;this.an.delete(t)}t=this.ln(t),this.an.set(t,e)}clear(){this.an.clear()}}},1438(){up.FocusCapsule=class FocusCapsule{constructor(t,e){this.q=t,this.hn=e,this.pn=up.viewport.copyCursorProps(this.q)}wasLost(){return document.activeElement!==this.q&&!this.fn}autoVoid(){up.on("focusin",{once:!0},()=>this.fn=!0)}restore(t,e){if(!this.wasLost())return!1;let n=up.fragment.get(this.hn,{layer:t});return n?(up.viewport.copyCursorProps(this.pn,n),up.focus(n,e),!0):void 0}static preserve(t){let e=up.viewport.focusedElementWithin(t.element);if(!e)return;let n=up.fragment.tryToTarget(e);return n?new this(e,n):void 0}}},1499(){var t=this&&this.bt||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.dn||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.mn=t,this.gn=[],this.vn=null,this.bn=!1,this.yn()}start(){return up.form.trackFields(this.mn,{guard:t=>this.wn(t)},t=>this._n(t))}wn(t){return t.closest("[up-validate]:not([up-validate=false])")}_n(t){let e=up.form.validateOptions(t).event;return up.on(t,e,e=>{t.closest(".up-keeping")||(up.log.putsEvent(e),up.error.muteUncriticalRejection(this.validate({origin:t})))})}yn(){up.fragment.onAborted(this.mn,t=>this.On(t))}On(t){let e,n=new up.Aborted(t.reason);for(;e=this.gn.shift();)e.deferred.reject(n)}validate(t={}){var e;let n=this.kn(t);return this.gn.push(...n),this.Sn(),null===(e=n[0])||void 0===e?void 0:e.deferred}kn(t){let e=this.En(t)||this.jn(t)||this.Cn(t.origin),i=n.newDeferred();for(let r of e){let e=up.form.validateOptions(r.origin,t);r.batch=n.pluckKey(e,"batch"),r.renderOptions=e,r.destination=`${e.method} ${e.url}`,r.target=up.fragment.resolveOrigin(r.target,r),r.deferred=i}return e}jn(t){var{origin:n}=t,i=e(t,["origin"]);if(up.form.isField(n))return this.xn(n)||this.Fn(n,i)}Fn(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}En({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)}))}}Cn(t){return up.puts("up.validate()","Validating element %o",t),[{element:t,target:up.fragment.toTarget(t),origin:t}]}xn(t){let e=t.closest("[up-validate]");if(e){let n=i.booleanOrStringAttr(e,"up-validate");return this.En({target:n,origin:t})}}Sn(){let t=this.gn.map(t=>t.renderOptions.delay),e=Math.min(...t)||0;clearTimeout(this.vn),this.vn=n.timer(e,()=>{this.vn=null,this.Tn()})}Tn(){up.error.muteUncriticalRejection(this.Pn())}Pn(){return t(this,void 0,void 0,function*(){if(!this.gn.length)return;if(this.bn)return;if(this.vn)return;let t=this.Rn(),e=this.Ln(t);this.bn=!0;try{let n=up.render(e);for(let e of t)e.deferred.resolve(n);yield n}finally{this.bn=!1,this.Tn()}})}Rn(){let t=[],e=0;for(;e<this.gn.length;){let n=this.gn[e];0===t.length||this.An(t[0],n)?(t.push(n),this.gn.splice(e,1)):e++}return t}An(t,e){return t.destination===e.destination&&t.batch&&e.batch}Ln(t){var e;let i=n.map(t,"origin"),r=n.flatMap(i,up.form.fields),s=n.uniq(n.map(r,"name")),o=n.map(t,"renderOptions"),u=up.form.destinationOptions(this.mn),a=n.mergeDefined(u,...o);return a.target=n.map(t,"target").join(", "),a.origin=this.mn,null!==(e=a.focus)&&void 0!==e||(a.focus="keep"),a.failOptions=!1,a.defaultMaybe=!0,a.params=up.Params.merge(u.params,...n.map(o,"params")),a.headers=n.merge(u.headers,...n.map(o,"headers")),this.Dn(a.headers,s),a.feedback=n.some(o,"feedback"),a.data=void 0,a.dataMap=n.mapObject(t,({target:t,element:e,renderOptions:{data:n,keepData:i}})=>[t,i?up.data(e):n]),a.preview=void 0,a.previewMap=n.mapObject(t,({target:t,renderOptions:{preview:e}})=>[t,e]),a.placeholder=void 0,a.placeholderMap=n.mapObject(t,({target:t,renderOptions:{placeholder:e}})=>[t,e]),a.disable=t.map(t=>up.fragment.resolveOrigin(t.renderOptions.disable,t)),a.guardEvent=up.event.build("up:form:validate",{fields:r,log:"Validating form",params:a.params,form:this.mn}),a}Dn(t,e){let n=up.protocol.headerize("validate"),i=e.join(" ");(!i||i.length>up.protocol.config.maxHeaderSize)&&(i=":unknown"),t[n]=i}}},5887(){const t=up.util,e=/^([^ >+(]+) (.+)$/;up.FragmentFinder=class FragmentFinder{constructor(t){var e;this.Ee=t,this.R=t.origin,this.$n=t.selector,this.Mn=t.document||window.document,this.Hn=null!==(e=t.match)&&void 0!==e?e:up.fragment.config.match,this.Nn=t.preferOldElements}find(){return this.Bn()||this.In()||this.qn()}Bn(){if(this.Nn)return this.Nn.find(t=>this.Mn.contains(t)&&up.fragment.matches(t,this.$n))}In(){var t;if("region"===this.Hn&&!up.fragment.containsMainPseudo(this.$n)&&(null===(t=this.R)||void 0===t?void 0:t.isConnected))return this.Un()||this.zn()}Un(){return up.fragment.closest(this.R,this.$n,this.Ee)}zn(){let n=up.fragment.splitTarget(this.$n);return t.findResult(n,t=>{let n=t.match(e);if(n){let t=up.fragment.closest(this.R,n[1],this.Ee);if(t)return up.fragment.getFirstDescendant(t,n[2])}})}qn(){return up.fragment.getFirstDescendant(this.Mn,this.$n,this.Ee)}}},7919(){const t=up.util,e=up.element,n={preventScroll:!0};up.FragmentFocus=class FragmentFocus extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","focusVisible","focusCapsule","inputDevice"])}processPrimitive(e){switch(e){case"keep":return this.Vn();case"restore":return this.Kn();case"target":case!0:return this.Xn(this.fragment);case"layer":return this.Xn(this.layer.getFocusElement());case"main":return this.Wn(":main");case"hash":return this.Gn();case"autofocus":return this.Jn();default:if(t.isString(e))return this.Wn(e)}}processElement(t){return this.Xn(t)}resolveCondition(t){return"lost"===t?this.Qn():super.resolveCondition(t)}Wn(t){let e=this.findSelector(t);return this.Xn(e)}Vn(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.restore(this.layer,n)}Kn(){return up.viewport.restoreFocus({layer:this.layer})}Jn(){let t=this.fragment&&e.subtreeFirst(this.fragment,"[autofocus]");if(t)return this.Xn(t)}Xn(t){if(t)return up.focus(t,Object.assign(Object.assign({force:!0},n),{inputDevice:this.inputDevice,focusVisible:this.focusVisible})),!0}Gn(){let t=up.viewport.firstHashTarget(this.hash,{layer:this.layer});if(t)return this.Xn(t)}Qn(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.wasLost()}}},3728(){const t=up.element,e=up.util;up.FragmentPolling=class FragmentPolling{static forFragment(t){return t.upPolling||(t.upPolling=new this(t))}constructor(t){this.Ee=up.radio.pollOptions(t),this.Se=t,up.destructor(t,this.Yn.bind(this)),this.Zn="stopped",this.ti=null,this.ei=e.uid(),this.ni=!1,this.ii()}onPollAttributeObserved(){this.ri()}si({newLayer:t,jid:e}){e===this.ei||t||this.oi()}ui(){"stop"!==this.ti&&this.ri()}Yn(){this.oi()}ri(t){if(Object.assign(this.Ee,t),"stopped"===this.Zn){if(!up.fragment.isTargetable(this.Se))return void up.warn("[up-poll]","Cannot poll untargetable fragment %o",this.Se);this.Zn="started",this.ai(),this.ci()}}oi(){"started"===this.Zn&&(this.li(),this.Zn="stopped")}forceStart(t){Object.assign(this.Ee,t),this.ti="start",this.ri()}forceStop(){this.ti="stop",this.oi()}ai(){this.hi||(this.hi=!0,up.destructor(this.Se,up.on("visibilitychange up:layer:opened up:layer:dismissed up:layer:accepted",this.pi.bind(this))),up.fragment.onAborted(this.Se,this.si.bind(this)),up.fragment.onKept(this.Se,this.ui.bind(this)))}pi(){this.fi()?this.ci():this.li()}fi(){return!document.hidden&&("any"===this.Ee.ifLayer||this.di())}li(){clearTimeout(this.mi),this.mi=null}ci(){this.mi||this.ni||"stopped"===this.Zn||(this.li(),this.mi=setTimeout(this.gi.bind(this),this.bi()))}gi(){this.mi=null,this.yi()}yi(){if("stopped"!==this.Zn)return up.fragment.isAlive(this.Se)?void(this.fi()?this.wi():up.puts("[up-poll]","Will not poll hidden fragment")):(this.oi(),void up.puts("[up-poll]","Stopped polling a detached fragment"))}_i(){var e,n;return null!==(n=null!==(e=this.Ee.interval)&&void 0!==e?e:t.numberAttr(this.Se,"up-interval"))&&void 0!==n?n:up.radio.config.pollInterval}bi(){return Math.max(this._i()-this.Oi(),0)}Oi(){return new Date-this.ki}di(){var t,e;return this.layer||(this.layer=up.layer.get(this.Se)),null===(e=null===(t=this.layer)||void 0===t?void 0:t.isFront)||void 0===e?void 0:e.call(t)}wi(){this.li(),this.ni=!0;let t=up.event.build("up:fragment:poll",{log:["Polling fragment",this.Se]}),e=Object.assign(Object.assign({},this.Ee),{guardEvent:t,jid:this.ei});up.reload(this.Se,e).then(this.Si.bind(this),this.Ei.bind(this))}Si({fragment:t}){this.ni=!1,this.ii(),t?this.ji(t):this.ci()}ji(t){"start"===this.ti&&up.fragment.matches(this.Se,t)&&this.constructor.forFragment(t).forceStart(this.Ee)}Ei(t){this.ni=!1,this.ii(),this.ci(),up.error.throwCritical(t)}ii(){this.ki=new Date}}},2459(){const t=up.util;up.FragmentProcessor=class FragmentProcessor extends up.Record{keys(){return["fragment","autoMeans","origin","layer"]}process(t){let e=this.preprocessOnce(t);return this.tryProcess(e)}preprocessOnce(e){return t.getComplexTokens(e)}tryProcess(e){if(t.isArray(e))return this.processArray(e);if(t.isOptions(e))return this.processSelectorMap(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.tryProcess(t[1])}return this.processPrimitive(e)}processSelectorMap(t){return Object.keys(t).filter(e=>{let n=this.findSelector(e);if(n){let i=new this.constructor(Object.assign(Object.assign({},this.attributes()),{fragment:n})),r=t[e];return i.process(r)}})}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)}}},9844(){const t=up.util;up.FragmentScrolling=class FragmentScrolling extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","mode","revealTop","revealMax","revealSnap","scrollBehavior","oldScrollTops"])}processPrimitive(e){switch(e){case"top":return this.Ci(0);case"bottom":return this.Ci(-0);case"layer":return this.xi();case"main":return this.Fi(":main");case"keep":return this.Ti();case"restore":return this.Pi();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.Ri(this.fragment);default:if(t.isNumber(e))return this.Ci(e);if(t.isString(e))return this.Fi(e)}}processElement(t){return this.Ri(t)}Ri(t){if(t)return up.reveal(t,this.attributes()),!0}Fi(t){let e=this.findSelector(t);return this.Ri(e)}xi(){return this.Ri(this.layer.getBoxElement())}Ci(t){return up.viewport.scrollTo(t,Object.assign(Object.assign({},this.attributes()),{around:this.fragment}))}Ti(){if(this.oldScrollTops)return this.Pi({scrollTops:this.oldScrollTops})}Pi(t){return up.viewport.restoreScroll(Object.assign(Object.assign(Object.assign({},this.attributes()),{around:this.fragment}),t))}}},4281(){var t=this&&this.bt||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.HelloFragment=class HelloFragment{constructor(t,e,n,{layer:i,data:r,dataRoot:s,dataMap:o,meta:u,insertedEvent:a}){var c,l,h;i||(i=up.layer.get(t)||up.layer.current),this.Ae=t,this.Li=e,this.Ai=n,this.I=i,this.Di=r,this.$i=s||t,this.Mi=o,this.Hi=[],this.Ni=null==a||a,u||(u={}),null!==(c=u.layer)&&void 0!==c||(u.layer=i),null!==(l=u.ok)&&void 0!==l||(u.ok=!0),null!==(h=u.revalidating)&&void 0!==h||(u.revalidating=!1),this.Bi=u}run(){return t(this,void 0,void 0,function*(){return up.puts("up.hello()","Compiling fragment %o",this.Ae),this.Ii(),this.qi(this.Li),this.Ui(),this.qi(this.Ai),this.zi(),yield Promise.all(this.Hi),this.Ae})}Ui(){up.emit(this.Ae,"up:compilers:before",{log:!1})}zi(){this.Ni&&up.fragment.emitInserted(this.Ae,this.Bi)}Ii(){if(this.Di&&(this.$i.upCompileData=this.Di),this.Mi)for(let t in this.Mi)for(let e of this.Vi(t))e.upCompileData=this.Mi[t]}qi(t){this.I.asCurrent(()=>{for(let e of t)this.Ki(e)})}Ki(t){var e,n;const i=this.Xi(t);if(i.length){if(t.isDefault||up.puts("up.hello()",'Compiling %d× "%s" on %s',i.length,t.selector,this.I),t.batch)this.Wi(t,i);else for(let e of i)this.Gi(t,e);null===(n=(e=up.migrate).postCompile)||void 0===n||n.call(e,i,t)}}Gi(t,e){const n=[e];if(1!==t.length){const t=up.script.data(e);n.push(t,this.Bi)}this.Ji(t,e,n,t=>up.destructor(e,t))}Wi(t,n){const i=[n];if(1!==t.length){const t=e.map(n,up.script.data);i.push(t,this.Bi)}this.Ji(t,n,i,()=>this.Qi(t))}Ji(n,i,r,s){return t(this,void 0,void 0,function*(){let t=up.error.guard(()=>n.apply(i,r));if(e.isPromise(t)){let e=up.error.guardPromise(t);this.Hi.push(e),t=yield e}t&&s(t)})}Qi(t){let e=new up.Error(["Batch compiler (%s) cannot return a destructor",t.selector]);reportError(e)}Vi(t){return up.fragment.subtree(this.Ae,e.evalOption(t),{layer:this.I})}Xi(t){let n=this.Vi(t.selector);return t.rerun||(n=e.filter(n,e=>{let n=e.upAppliedCompilers||(e.upAppliedCompilers=new Set);if(!n.has(t))return n.add(t),!0})),n}}},7687(){const t=up.element,e=up.util;up.Layer=class Layer extends up.Record{keys(){return["element","stack","history","mode","context","lastScrollTops","lastFocusCapsules"]}defaults(){return{context:{},lastScrollTops:up.viewport.newStateCache(),lastFocusCapsules:up.viewport.newStateCache()}}constructor(t={}){super(t),e.assert(this.mode)}setupHandlers(){up.link.convertClicks(this),this.Yi=up.on("up:location:changed",t=>this.Zi(t))}teardownHandlers(){var t;null===(t=this.Yi)||void 0===t||t.call(this)}mainTargets(){return up.layer.mainTargets(this.mode)}sync(){}accept(){throw new up.NotImplemented}dismiss(){throw new up.NotImplemented}peel(t){this.stack.peel(this,t)}evalOption(t){return e.evalOption(t,this)}isCurrent(){return this.stack.isCurrent(this)}isFront(){return this.stack.isFront(this)}isRoot(){return this.stack.isRoot(this)}isOverlay(){return this.stack.isOverlay(this)}isAlive(){throw new up.NotImplemented}assertAlive(){if(!this.isAlive())throw new up.Aborted("Layer is no longer alive")}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()}saveHistory(){e.assert(this.isFront()),this.showsLiveHistory()&&(this.rr=this.title,this.sr=this.metaTags,this.ur=this.location,this.ar=this.lang)}restoreHistory(){this.showsLiveHistory()&&(this.ur&&up.history.push(this.ur),this.rr&&(document.title=this.rr),this.sr&&up.history.updateMetaTags(this.sr),e.isString(this.ar)&&up.history.updateLang(this.ar))}asCurrent(t){return this.stack.asCurrent(this,t)}updateHistory(t){var n,i;e.isString(t.location)&&this.cr(t.location,{push:!0}),up.history.config.updateMetaTags&&e.isList(t.metaTags)&&(null===(i=null===(n=up.migrate)||void 0===n?void 0:n.warnOfHungryMetaTags)||void 0===i||i.call(n,t.metaTags),this.lr(t.metaTags)),e.isString(t.title)&&this.hr(t.title),e.isString(t.lang)&&this.pr(t.lang)}showsLiveHistory(){return this.history&&this.isFront()}Zi({location:t}){this.showsLiveHistory()&&this.cr(t,{push:!1})}get title(){return this.showsLiveHistory()?document.title:this.rr}hr(t){this.rr=t,this.showsLiveHistory()&&(document.title=t)}get metaTags(){return this.showsLiveHistory()?up.history.findMetaTags():this.sr}lr(t){this.sr=t,this.showsLiveHistory()&&up.history.updateMetaTags(t)}get lang(){return this.showsLiveHistory()?up.history.getLang():this.ar}pr(t){this.ar=t,this.showsLiveHistory()&&up.history.updateLang(t)}get location(){return this.showsLiveHistory()?up.history.location:this.ur}cr(t,{push:e}){let n=this.ur,i=up.history.location;this.ur=t,t!==i&&this.showsLiveHistory()&&e&&up.history.push(t),t!==n&&"opening"!==this.state&&this.emit("up:layer:location:changed",{location:t,previousLocation:n,log:!1})}selector(t){return this.constructor.selector(t)}static selector(t){throw new up.NotImplemented}toString(){throw new up.NotImplemented}affix(...e){return t.affix(this.getFirstSwappableElement(),...e)}[e.isEqual.key](t){return this.constructor===t.constructor&&this.element===t.element}hasFocus(){let t=document.activeElement;return t!==document.body&&this.element.contains(t)}reset(){Object.assign(this,this.defaults())}}},3383(){var t;up.Layer.Cover=((t=class Cover extends up.Layer.OverlayWithViewport{}).mode="cover",t)},8268(){var t;up.Layer.Drawer=((t=class Drawer extends up.Layer.OverlayWithViewport{}).mode="drawer",t)},2009(){var t;up.Layer.Modal=((t=class Modal extends up.Layer.OverlayWithViewport{}).mode="modal",t)},7304(){var t;const e=up.element,n=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","acceptFragment","dismissFragment"]}constructor(t){super(t),this.state="opening",!0===this.dismissible?this.dismissible=["button","key","outside"]:!1===this.dismissible?this.dismissible=[]:this.dismissible=n.getSimpleTokens(this.dismissible),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.dr());const e=n.compactObject(n.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}),e.affix(this.dismissElement,'span[aria-hidden="true"]',{text:this.dismissLabel})}affixPart(t,n,i={}){return e.affix(t,this.selector(n),i)}static selector(t){return n.compact(["up",this.mode,t]).join("-")}dr(){const{parent:t}=this;return this.mode===t.mode?1+t.dr():0}setupHandlers(){var t,e;super.setupHandlers(),this.overlayFocus=new up.OverlayFocus(this),this.mr("button")&&this.createDismissElement(this.getBoxElement()),this.mr("outside")&&(this.viewportElement?up.on(this.viewportElement,"up:click",t=>{t.target===this.viewportElement&&this.gr(t,!0)}):this.vr=this.parent.on("up:click",(t,e)=>{if(!up.layer.isWithinForeignOverlay(e)){const n=this.origin&&this.origin.contains(e);this.gr(t,n)}})),this.mr("key")&&(this.br=up.event.onEscape(t=>this.onEscapePressed(t))),this.registerAttrCloser("up-accept",(t,e)=>{this.accept(t,e)}),this.registerAttrCloser("up-dismiss",(t,e)=>{this.dismiss(t,e)}),null===(e=(t=up.migrate).registerLayerCloser)||void 0===e||e.call(t,this),this.yr(this.acceptEvent,this.accept),this.yr(this.dismissEvent,this.dismiss),this.on("up:click","label[for]",(t,e)=>this.wr(t,e))}wr(t,n){let i=n.getAttribute("for"),r=up.form.fieldSelector(e.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()}}gr(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.mr("key")&&(up.event.halt(t,{log:!0}),up.error.muteUncriticalSync(()=>this.dismiss(":key")))}}registerAttrCloser(t,e){this._r(t,e),this.Or(t,e)}_r(t,n){this.on("up:click",`[${t}]:not(form)`,(i,r)=>{up.event.halt(i,{log:!0});const s=e.jsonAttr(r,t);this.kr(r,s,n)})}Or(t,e){this.on("submit",`[${t}]`,(t,n)=>{up.event.halt(t,{log:!0});const i=up.Params.fromForm(n);this.kr(n,i,e)})}kr(t,e,n){const i={origin:t},r=new up.OptionsParser(t,i);r.booleanOrString("animation"),r.string("easing"),r.number("duration"),r.string("confirm"),up.error.muteUncriticalSync(()=>n(e,i))}yr(t,e){if(t)return this.on(t,t=>{t.preventDefault(),up.error.muteUncriticalSync(()=>e.call(this,t,{response:t.response}))})}tryAcceptForElements(t,e){this.Sr(this.acceptFragment,this.accept,t,e)}tryDismissForElements(t,e){this.Sr(this.dismissFragment,this.dismiss,t,e)}Sr(t,i,r,s){let o=n.findResult(r,n=>e.subtreeFirst(n,t));if(o){const t=up.data(o);up.error.muteUncriticalSync(()=>i.call(this,t,{response:s}))}}tryAcceptForLocation(t,e){this.Er(t,this.acceptLocation,this.accept,e)}tryDismissForLocation(t,e){this.Er(t,this.dismissLocation,this.dismiss,e)}Er(t,e,n,i){let r=t&&(null==e?void 0:e.recognize(t));if(r){const e=Object.assign(Object.assign({},r),{location:t});up.error.muteUncriticalSync(()=>n.call(this,e,{response:i}))}}teardownHandlers(){var t,e;super.teardownHandlers(),null===(t=this.vr)||void 0===t||t.call(this),null===(e=this.br)||void 0===e||e.call(this)}destroyElements(t){const e=this.closeAnimationProps(t);up.destroy(this.element,Object.assign(Object.assign(Object.assign({},t),e),{onFinished:()=>{var e;this.onElementsRemoved(),null===(e=t.onFinished)||void 0===e||e.call(t)},log:!1}))}onElementsRemoved(){}jr(t,e){return!up.motion.isNone(t)&&(e=this.backdrop&&e,(n,i)=>{const r=up.animate(this.getBoxElement(),t,i),s=up.animate(this.backdropElement,e,i);return Promise.all([r,s])})}startOpenAnimation(t={}){const e=this.openAnimationProps(t);return up.animate(this.element,e.animation,Object.assign(Object.assign({},e),{onFinished:()=>{var e;this.wasEverVisible=!0,null===(e=t.onFinished)||void 0===e||e.call(t)}}))}openAnimationProps(t={}){var e;let n=null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.openAnimation);return{animation:this.jr(n,"fade-in"),easing:t.easing||this.openEasing,duration:t.duration||this.openDuration}}closeAnimationProps(t={}){var e,n;let i=this.wasEverVisible&&(null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.closeAnimation));return{animation:this.jr(i,"fade-out"),easing:t.easing||this.closeEasing,duration:null!==(n=t.duration)&&void 0!==n?n:this.closeDuration}}isAlive(){return["opening","opened"].includes(this.state)}accept(t=null,e={}){return this.Cr("accept",t,e)}dismiss(t=null,e={}){return this.Cr("dismiss",t,e)}mr(t){return n.contains(this.dismissible,t)}Cr(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","dismissible","dismissLabel","dismissARIALabel","openAnimation","closeAnimation","openDuration","closeDuration","openEasing","closeEasing","trapFocus"],t.UNSET_VISUALS=n.spanObject(t.VISUAL_KEYS,void 0),t)},9454(){up.Layer.OverlayWithTether=class OverlayWithTether extends up.Layer.Overlay{createElements(){this.origin||up.fail("Missing { origin } option"),this.Fr=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.Fr.parent),this.createContentElement(this.element)}onContentSet(){this.Fr.start(this.element)}onElementsRemoved(){this.Fr.stop()}sync(){this.isAlive()&&(up.fragment.isAlive(this.element)&&this.Fr.isAlive()?this.Fr.sync():this.dismiss(":detached",{animation:!1,preventable:!1}))}}},2084(){up.Layer.OverlayWithViewport=class OverlayWithViewport extends up.Layer.Overlay{static getParentElement(){return document.body}createElements(){up.viewport.bodyShifter.raiseStack(),this.createElement(this.constructor.getParentElement()),this.backdrop&&this.createBackdropElement(this.element),this.createViewportElement(this.element),this.createBoxElement(this.viewportElement),this.createContentElement(this.boxElement)}onElementsRemoved(){up.viewport.bodyShifter.lowerStack()}sync(){this.isAlive()&&!this.element.isConnected&&this.constructor.getParentElement().appendChild(this.element)}}},4526(){var t;up.Layer.Popup=((t=class Popup extends up.Layer.OverlayWithTether{}).mode="popup",t)},3126(){var t;const e=up.element;up.Layer.Root=((t=class Root extends up.Layer{get element(){return e.root}constructor(t){super(t),this.setupHandlers()}getFirstSwappableElement(){return document.body}static selector(){return"html"}setupHandlers(){this.element.upHandlersApplied||(this.element.upHandlersApplied=!0,super.setupHandlers())}sync(){this.setupHandlers()}isAlive(){return!0}accept(){this.Tr()}dismiss(){this.Tr()}Tr(){up.fail("Cannot close the root layer")}toString(){return"root layer"}}).mode="root",t)},6088(){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.Ee=n,this.Pr=e.getSimpleTokens(n.layer)}all(){let t=e.flatMap(this.Pr,t=>this.Rr(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()}Lr(t){return t=n.get(t),e.find(this.i.reversed(),e=>e.contains(t))}Ar(t){return this.i.at(t)}Rr(t){if(t instanceof up.Layer)return t;if(e.isNumber(t))return this.Ar(t);if(/^\d+$/.test(t))return this.Ar(Number(t));if(e.isElementLike(t))return this.Lr(t);switch(t){case"any":return[this.Dr(),...this.i.reversed()];case"current":return this.Dr();case"closest":return this.i.selfAndAncestorsOf(this.Dr());case"parent":return this.Dr().parent;case"ancestor":case"ancestors":return this.Dr().ancestors;case"child":return this.Dr().child;case"descendant":case"descendants":return this.Dr().descendants;case"subtree":return this.Dr().subtree;case"new":return"new";case"root":return this.i.root;case"overlay":case"overlays":return this.i.overlays.toReversed();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.Ee;return e||(t?this.Lr(t):void 0)}Dr(){let{baseLayer:t}=this.Ee;if(e.isString(t)){const e=Object.assign(Object.assign({},this.Ee),{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,{Dr:!0,$r:!0}),t)},9156(){const t=up.util;up.LayerStack=class LayerStack{constructor(){this.Mr=[],this.layers=[this.Hr()]}Hr(){return up.layer.build({mode:"root",stack:this})}remove(e){t.remove(this.layers,e)}peel(t,e={}){var n;const i=t.descendants.toReversed(),r=Object.assign(Object.assign({},e),{preventable:!1}),s="accept"===e.intent?"accept":"dismiss",o=null!==(n=e.value)&&void 0!==n?n:":peel";for(let t of i)t[s](o,r)}reset(){this.peel(this.root,{animation:!1}),this.Mr=[],this.root.reset()}parentOf(t){return this.layers[t.index-1]}childOf(t){return this.layers[t.index+1]}ancestorsOf(t){return this.layers.slice(0,t.index).toReversed()}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.Mr.push(t),e()}finally{this.Mr.pop()}}reversed(){return this.layers.toReversed()}dismissOverlays(t=null,e={}){e.dismissible=!1;for(let n of this.overlays.toReversed())n.dismiss(t,e)}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.Mr)||this.front}get front(){return t.last(this.layers)}}},6607(){const t=up.util;up.LinkCurrentURLs=class LinkCurrentURLs{constructor(e){if(this.Nr=up.link.isSafe(e),this.Nr){const n=e.getAttribute("href");n&&"#"!==n&&(this.Br=t.matchableURL(n));const i=e.getAttribute("up-href");i&&(this.Ir=t.matchableURL(i));const r=e.getAttribute("up-alias");r&&(this.qr=new up.URLPattern(r))}}isCurrent(t){var e,n;return!(!t||this.Br!==t&&this.Ir!==t&&!(null===(n=null===(e=this.qr)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1)))}isAnyCurrent(t){return t.some(t=>{var e,n;return this.Br===t||this.Ir===t||(null===(n=null===(e=this.qr)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1))})}}},9391(){const t=up.util,e=up.element;up.LinkFollowIntent=class LinkFollowIntent{constructor(t,e){this.Ur=t,this.De=e,this.zr=null,this.Vr("mouseenter mousedown touchstart",t=>this.Kr(t)),this.Vr("mouseleave",()=>this.Xr()),up.fragment.onAborted(this.Ur,()=>this.Xr())}Vr(t,e){up.on(this.Ur,t,{passive:!0},e)}Kr(e){if(up.link.shouldFollowEvent(e,this.Ur))if(this.Xr(),"mouseenter"===e.type){let n=this.Wr();this.Gr=t.timer(n,()=>this.un(e))}else this.un(e)}Xr(){var t;clearTimeout(this.Gr),(null===(t=this.zr)||void 0===t?void 0:t.background)&&this.zr.abort(),this.zr=null}Wr(){var t;return null!==(t=e.numberAttr(this.Ur,"up-preload-delay"))&&void 0!==t?t:up.link.config.preloadDelay}un(t){up.log.putsEvent(t),up.fragment.isAlive(this.Ur)&&this.De({onRequestKnown:t=>this.zr=t})}}},6705(){let t="up.log.enabled",e=!1;try{e=!!(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem(t))}catch(t){}up.LogConfig=class LogConfig extends up.Config{constructor(){super(()=>({banner:!0,format:!0}))}get enabled(){return e}set enabled(n){e=n;try{null===sessionStorage||void 0===sessionStorage||sessionStorage.setItem(t,n?"1":"")}catch(t){}}}},2049(){const t=up.util;up.MotionController=class MotionController{constructor(t){this.finishEvent=`up:${t}:finish`,this.Jr()}startFunction(e,n){const i=this.Qr>0;if(!i)for(let t of e)this.finish(t);this.Qr++;try{return this.Yr.push(e),up.error.muteUncriticalRejection(n({nested:i})).finally(()=>t.remove(this.Yr,e))}finally{this.Qr--}}finish(e=document.body){for(let n of this.Zr(e)){t.remove(this.Yr,n);for(let t of n)this.ts(t)}}Zr(e){return this.Yr.filter(n=>t.some(n,t=>e.contains(t)))}ts(t){return up.emit(t,this.finishEvent,{log:!1})}Jr(){this.Qr=0,this.Yr=[]}reset(){this.finish(),this.Jr()}}},567(){const t=up.element;up.NonceableCallback=class NonceableCallback{constructor(t,e){this.script=t,this.nonce=e}static fromString(t){let e=t.match(/^(nonce-(\S+)\s)?(.*)$/);return new this(e[3],e[2])}unsafeEval(t){return this.nonce?this.es(t):this.ns(t)}toString(){return`nonce-${this.nonce} ${this.script}`}ns({argNames:t,argValues:e,thisContext:n}){return new Function(...t,this.script).apply(n,e)}es(e){let n,i=`\n try {\n up.noncedEval.value = (function(${e.argNames.join()}) {\n ${this.script}\n }).apply(up.noncedEval.thisContext, up.noncedEval.argValues)\n } catch (error) {\n up.noncedEval.error = error\n }\n `;try{if(up.noncedEval=Object.assign({},e),n=t.affix(document.body,"script",{nonce:this.nonce,text:i}),up.noncedEval.error)throw up.noncedEval.error;return up.noncedEval.value}finally{up.noncedEval=void 0,null==n||n.remove()}}}},7080(){const t=up.util,e=up.element;up.OptionsParser=class OptionsParser{constructor(t,e,n={}){var i;this.Ee=e,this.q=t,this.rs=n.fail,this.ss=n.closest,this.us=n.attrPrefix||"up-",this.cs=null!==(i=n.defaults)&&void 0!==i?i:{}}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)}booleanOrNumberOrString(t,n){this.parse(e.booleanOrNumberOrStringAttr,t,n)}json(t,n){this.parse(e.jsonAttr,t,n)}renderCallback(t,e={}){this.parse((e,n)=>up.RenderOptions.callbackAttr(e,n,t),t,e)}parse(e,n,i={}){var r,s;const o=t.wrapList(null!==(r=i.attr)&&void 0!==r?r:this.ls(n));let u,a=this.Ee[n];for(let t of o)null!=a||(a=this.hs(e,this.q,t));if(!1!==this.cs&&(null!=a||(a=null!==(s=i.default)&&void 0!==s?s:this.cs[n])),t.isDefined(a)){let t=i.normalize;t&&(a=t(a)),this.Ee[n]=a}if(this.rs&&(u=up.fragment.failKey(n))){const n=t.compact(t.map(o,t=>this.ps(t)));this.parse(e,u,Object.assign(Object.assign({},i),{attr:n}))}}include(t,e){let n=t(this.q,this.Ee,Object.assign({defaults:this.cs},e));Object.assign(this.Ee,n)}hs(t,n,i){return this.ss?e.closestAttr(n,i,t):t(n,i)}ps(t){return this.fs(t,this.us+"on-")||this.fs(t,this.us)}fs(t,e){if(t.startsWith(e))return`${e}fail-${t.substring(e.length)}`}ls(e){return`${this.us}${t.camelToKebabCase(e)}`}}},5637(){const t=up.element;up.OverlayFocus=class OverlayFocus{constructor(t){this.I=t,this.Xn=this.I.getFocusElement(),this.ds=this.I.trapFocus}moveToFront(){this.gs||(this.gs=!0,this.vs=t.setAttrsTemp(this.Xn,{tabindex:"0",role:"dialog","aria-modal":this.ds.toString()}),this.ds&&(this.bs=up.on("focusin",t=>this.ys(t)),this.ws=t.affix(this.Xn,"beforebegin","up-focus-trap[tabindex=0]"),this._s=t.affix(this.Xn,"afterend","up-focus-trap[tabindex=0]")))}moveToBack(){this.teardown()}teardown(){this.gs&&(this.gs=!1,this.vs(),this.ds&&(this.bs(),this.ws.remove(),this._s.remove()))}ys(t){const{target:e}=t;this.Os||up.layer.isWithinForeignOverlay(e)||(this.Os=!0,e===this.ws?this.ks():e!==this._s&&this.I.contains(e)||this.Ss(),this.Os=!1)}Ss(t){up.focus(this.Xn,t)}ks(){this.Es(this.I.getBoxElement())||this.Ss()}Es(t){for(let e of[...t.children].toReversed())if(up.viewport.tryFocus(e)||this.Es(e))return!0}}},4718(){const t=up.util,e=up.element;up.Params=class Params{constructor(t,e={}){this.Ee=e,this.clear(),this.addAll(t)}clear(){this.entries=[]}[t.copy.key](){return new up.Params(this,this.Ee)}toObject(){const e={};for(let n of this.entries){const{name:i,value:r}=n;t.isBasicObjectProperty(i)||(this.js(i)?(e[i]||(e[i]=[]),e[i].push(r)):e[i]=r)}return e}toArray(){return this.entries}toFormData(){const t=new FormData;for(let e of this.entries)t.append(e.name,e.value);return t.entries||(t.originalArray=this.entries),t}toQuery(){return this.withoutBinaryEntries().entries.map(this.Cs).join("&")}Cs(e){const{value:n}=e;let i=encodeURIComponent(e.name);return t.isGiven(n)&&(i+="=",i+=encodeURIComponent(n)),i}xs({value:t}){return t instanceof Blob}hasBinaryEntries(){return t.some(this.entries,this.xs)}withoutBinaryEntries(){let e=t.reject(this.entries,this.xs);return new this.constructor(e,this.Ee)}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.Fs(e):t.isFormData(e)?this.Ts(e):t.isObject(e)?this.Ps(e):up.fail("Unsupported params type: %o",e))}keys(){return t.map(this.entries,"name")}values(){return t.map(this.entries,"value")}Ps(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)}}Fs(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)}}Ts(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.Rs(e))}Rs(t){return e=>e.name===t}get(t){return this.js(t)?this.getAll(t):this.getFirst(t)}getFirst(e){const n=t.find(this.entries,this.Rs(e));return null==n?void 0:n.value}getAll(e){const n=t.filter(this.entries,this.Rs(e));return t.map(n,"value")}js(e){return t.evalOption(up.form.config.arrayParam,e)}[t.isBlank.key](){return 0===this.entries.length}static fromForm(t,e){return this.fromContainer(t,e)}static fromContainer(t,e){let n=up.form.fields(t);return this.fromFields(n,e)}static fromFields(e,n){const i=new this(null,n);for(let n of t.wrapList(e))i.addField(n);return i}addField(t){let n=(t=e.get(t)).name;if(n&&this.Ls(t)){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)}}}Ls(t){return!t.disabled||this.Ee.includeDisabled}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.entries,e.entries)}static fromURL(e){const n=new this;let i=t.parseURL(e).search;return i&&(i=i.replace(/^\?/,""),n.addAll(i)),n}static stripURL(e){return t.normalizeURL(e,{search:!1})}static merge(e,...n){let i=t.copy(e);for(let e of n){let n=t.wrapValue(this,e);for(let t of n.keys())i.delete(t);i.addAll(n)}return i}}},8354(){const t=up.util,e=up.element;up.Preview=class Preview{constructor({fragment:t,request:e,renderOptions:n,cleaner:i}){this.fragment=t,this.request=e,this.renderOptions=n,this.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.As(t,"val","val");this.undo(e.setAttrsTemp(n,i))}addClass(...t){let[n,i]=this.As(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.As(t,"val","val");this.undo(e.removeClassTemp(n,i))}setStyle(...t){let[n,i]=this.As(t,"val","val");this.undo(e.setStyleTemp(n,i))}disable(...t){let[e]=this.As(t,"val");this.undo(up.form.disableTemp(e))}insert(...e){let[n,i="beforeend",r]=this.As(e,"val",t.isAdjacentPosition,"val");this.undo(up.fragment.insertTemp(n,i,r))}show(...t){let[n]=this.As(t,"val");this.undo(e.showTemp(n))}hide(...t){let[n]=this.As(t,"val");this.undo(e.hideTemp(n))}hideContent(...t){let[n]=this.As(t,"val"),i=e.wrapChildren(n);e.hide(i),this.undo(()=>e.unwrap(i))}showPlaceholder(...t){let[e,n]=this.As(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.As(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}As(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]}}},2077(){const t=up.element;up.ProgressBar=class ProgressBar{constructor(){this.Ds=0,this.q=t.affix(document.body,"up-progress-bar"),this.q.style.transition="width 300ms ease-out",this.$s(0),t.paint(this.q),this.Ms=31,this.Hs()}Hs(){let t;t=this.Ms<80?Math.random()<.15?7+5*Math.random():1.5+.5*Math.random():.13*(100-this.Ms)*Math.random(),this.$s(this.Ms+t),this.Ds++;const e=300+40*this.Ds;this.timeout=setTimeout(this.Hs.bind(this),e)}$s(t){this.Ms=t,this.q.style.width=`${t}vw`}destroy(){clearTimeout(this.timeout),this.q.remove()}conclude(){clearTimeout(this.timeout),this.$s(100),setTimeout(this.destroy.bind(this),300)}}},8065(){const t=up.util;up.Record=class Record{keys(){throw"Return an array of keys"}defaults(t){return{}}constructor(e){Object.assign(this,t.mergeDefined(this.defaults(e),this.attributes(e)))}attributes(e=this){return t.pick(e,this.keys())}[t.copy.key](){return t.variant(this)}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.attributes(),e.attributes())}}},3394(){up.Rect=class Rect extends up.Record{keys(){return["left","top","width","height"]}get bottom(){return this.top+this.height}get right(){return this.left+this.width}grow(t){this.left-=t,this.top-=t,this.width+=2*t,this.height+=2*t}static fromElement(t){return new this(t.getBoundingClientRect())}static fromElementAsFixed(t){let e=t.cloneNode(!0);t.after(e),e.style.position="fixed";let n=this.fromElement(e);return e.remove(),n}}},8183(){const t=up.util;up.Registry=class Registry{constructor(e,n=t.identity){this.Di={},this.Ns=n,this.Bs=e,this.put=this.put.bind(this),document.addEventListener("up:framework:reset",()=>this.reset())}put(t,e){(e=this.Ns(e)).isDefault=up.framework.evaling,this.Di[t]=e}get(t){return this.Di[t]||up.fail("Unknown %s %o",this.Bs,t)}reset(){this.Di=t.pickBy(this.Di,"isDefault")}}},4572(){var t,e=this&&this.bt||function(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,u)}a((i=i.apply(t,e||[])).next())})};const n=up.util;up.RenderJob=(t=class RenderJob{constructor(t){this.renderOptions=t}execute(){return this.Is=this.qs(),this}qs(){return e(this,void 0,void 0,function*(){try{this.Us(),this.renderOptions=up.RenderOptions.preprocess(this.renderOptions),up.browser.assertConfirmed(this.renderOptions),up.RenderOptions.assertContentGiven(this.renderOptions);let t=yield this.zs().execute();return this.Vs(t),t}catch(t){throw this.Vs(t)||this.Ks(t),t}})}Vs(t){if(t instanceof up.RenderResult){let{onRendered:e,onFinished:i}=t.renderOptions;t.none||up.error.guard(()=>null==e?void 0:e(t));let r=function(t){up.error.guard(()=>null==i?void 0:i(t))};return this.finished.then(r,n.noop),!0}}Ks(t){let e=t instanceof up.Aborted?"Rendering was aborted":"Error while rendering";up.puts("up.render()",`${e}: ${t.name}: ${t.message}`),up.error.guard(()=>{var e,n;return null===(n=(e=this.renderOptions).onError)||void 0===n?void 0:n.call(e,t)})}get finished(){return this.Xs()}Xs(){return e(this,void 0,void 0,function*(){try{let t=yield this.Is;return yield t.finished}catch(t){throw t instanceof up.RenderResult?yield t.finished:t}})}zs(){let t=n.memoize(t=>this.Ws(t)),e=Object.assign(Object.assign({},this.renderOptions),{handleAbort:t});return e.url?new up.Change.FromURL(e):e.response?new up.Change.FromResponse(e):new up.Change.FromContent(e)}Us(){let t=n.pluckKey(this.renderOptions,"guardEvent");if(t&&(t.renderOptions=this.renderOptions,up.emit(t,{target:this.renderOptions.origin}).defaultPrevented))throw new up.Aborted(`Rendering was prevented by ${t.type} listener`)}Ws({bindFragments:t,bindLayer:e,origin:i,layer:r,request:s}){let{abort:o}=this.renderOptions;if(!o)return;let u={except:s,logOnce:["up.render()","Change with { abort } option will abort other requests"],newLayer:"new"===r,origin:i,jid:this.renderOptions.jid};"target"===o?up.fragment.abort(t,Object.assign({},u)):"layer"===o?up.fragment.abort(Object.assign(Object.assign({},u),{layer:e})):"all"===o||!0===o?up.fragment.abort(Object.assign(Object.assign({},u),{layer:"any"})):n.isFunction(o)?o(u):up.fragment.abort(o,Object.assign(Object.assign({},u),{layer:e}))}},n.delegatePromise(t.prototype,function(){return this.Is}),n.memoizeMethod(t.prototype,{Xs:!0,zs:!0}),t)},541(){const t=up.util;up.RenderOptions=function(){const e=["url","method","origin","headers","params","cache","fallback","abort","abortable","handleAbort","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"],r={argNames:["result"]},s={argNames:["error"]},o={expandObject:["layer","value","response"]},u={onLoaded:{},onRendered:r,onFinished:r,onOffline:s,onError:s,onOpened:{expandObject:["layer"]},onDismissed:o,onAccepted:o};function a(t){var e;return null!==(e=u[t])&&void 0!==e?e:up.fail(`Unknown callback { ${t} }`)}return{preprocess:function(e){var n,r;null===(r=(n=up.migrate).preprocessRenderOptions)||void 0===r||r.call(n,e),up.layer.normalizeOptions(e),function(e){t.renameKey(e,"useData","data"),t.renameKey(e,"useHungry","hungry"),t.renameKey(e,"useKeep","keep")}(e);const s=t.merge(up.fragment.config.renderOptions,function(t){if(t.navigate)return up.fragment.config.navigateOptions}(e));return t.merge(t.omit(s,i),{defaults:s},{inputDevice:up.event.inputDevice},e,function({url:e}){if(e)return{url:t.normalizeURL(e)}}(e),function({origin:t,originLayer:e}){if(t&&!e)return{originLayer:up.layer.get(t)}}(e))},finalize:function(e,n){return t.merge(e.defaults,n,e)},assertContentGiven:function(e){t.some(n,n=>t.isGiven(e[n]))||(e.defaultToEmptyContent?e.content="":up.fail("up.render() needs either { "+n.join(", ")+" } option"))},deriveFailOptions:function(n){let i={didFail:!0},r=function(t){const e={};for(let n in t){const i=t[n];let r=up.fragment.successKey(n);r&&(e[r]=i)}return e}(n);return n.failOptions?Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n.defaults),t.pick(n,e)),r),{didForceFailOptions:!0}),i):Object.assign(Object.assign(Object.assign({},n),r),i)},parseCallback:function(t,e){return up.script.parseCallback(e,a(t))},callbackAttr:function(t,e,n){return up.script.callbackAttr(t,e,a(n))},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}}}()},7718(){var t=this&&this.bt||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.RenderResult=class RenderResult{constructor({layer:t,target:e,renderOptions:n={},partialResults:i=[]}={}){this.layer=t,this.target=e,this.renderOptions=n,this.fragments=this.Gs(i,"fragments").flat(),this.finished=this.Js(i)}Gs(t,n,i){return e.compact([...e.map(t,n),i])}Js(e){return t(this,void 0,void 0,function*(){let t=this.Gs(e,"finished"),n=this.Gs(e,"verifyFinished",this.renderOptions.verifyFinished);yield Promise.all(t);let i=this;for(let t of n)i=(yield t(i))||i;return i})}get none(){return!this.fragments.length}get fragment(){return this.fragments[0]}get ok(){return!this.renderOptions.didFail}}},6351(){var t;const e=up.util;up.Request=(t=class Request extends up.Record{keys(){return["method","url","hash","params","target","failTarget","headers","timeout","background","cache","expireCache","evictCache","layer","mode","context","failLayer","failMode","failContext","origin","originLayer","originMode","builtAt","wrapMethod","contentType","payload","onLoading","fail","abortable","lateDelay","previews"]}defaults(){let t=up.network.config;return{state:"new",abortable:!0,headers:{},timeout:t.timeout,builtAt:new Date,previews:[],wrapMethod:t.wrapMethod}}constructor(t){var n,i,r;if(super(t),this.params=new up.Params(this.params),this.Ns(),(this.target||this.layer||this.origin)&&!t.basic){const t={origin:this.origin};this.layer=up.layer.get(this.layer,t),this.context||(this.context=this.layer.context||{}),this.mode||(this.mode=this.layer.mode),this.failLayer=up.layer.get(this.failLayer,t),this.failContext||(this.failContext=(null===(n=this.failLayer)||void 0===n?void 0:n.context)||{}),this.failMode||(this.failMode=null===(i=this.failLayer)||void 0===i?void 0:i.mode),this.originLayer||(this.originLayer=up.layer.get(this.origin)||up.layer.current),this.originMode||(this.originMode=null===(r=this.originLayer)||void 0===r?void 0:r.mode)}this.bindLayer=t.bindLayer||this.layer,this.Qs=t.fragments,this.Ys=t.bindFragments,this.Zs=e.newDeferred(),this.eo()}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.no)&&void 0!==t?t:this.no=new XMLHttpRequest}get fragments(){return this.Qs||(this.Qs=this.io())}io(){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.Ys||this.fragments}get fragment(){var t;return null===(t=this.fragments)||void 0===t?void 0:t[0]}Ns(){this.method=e.normalizeMethod(this.method),this.ro(),this.so(),this.url=e.normalizeURL(this.url)}oo(){e.task(()=>{this.layer=void 0,this.failLayer=void 0,this.bindLayer=void 0,this.origin=void 0,this.originLayer=void 0,this.Qs=void 0,this.Ys=void 0})}ro(){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]}so(){!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.oo())}load(){var t;if("new"===this.state)return this.uo()?(this.state="loading",this.Ns(),null===(t=this.onLoading)||void 0===t||t.call(this),this.expired=!1,new up.Request.XHRRenderer(this).buildAndSend({onload:()=>this.ao(),onerror:()=>this.co(),ontimeout:()=>this.lo(),onabort:()=>this.ho()}),!0):void this.abort({reason:"Prevented by event listener"})}runPreviews(t){this.ended||this.fromCache||(this.po=up.status.runPreviews(this,t))}uo(){return!this.emit("up:request:load",{log:["Loading %s",this.description]}).defaultPrevented}loadPage(){up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()}ao(){const t=this.fo(),e="Loaded "+t.description;this.emit("up:request:loaded",{request:t.request,response:t,log:e}),this.respondWith(t)}co(){this.do("Network error")}lo(){this.do("Timeout")}ho(){this.mo()}abort({reason:t}={}){this.mo(t)&&this.no&&this.no.abort()}mo(t="Unknown reason"){if(this.ended)return;let e=["Aborted request to %s: %s",this.description,t];return this.state="aborted",this.vo(new up.Aborted(e)),this.emit("up:request:aborted",{log:e}),!0}do(t="Unknown reason"){if(this.ended)return;let e=["Cannot load request from %s: %s",this.description,t];this.state="offline",this.emit("up:request:offline",{log:e}),this.vo(new up.Offline(e,{reason:t,request:this}))}respondWith(t){this.response=t,this.ended||(this.state="loaded",t.ok?this.bo(t):this.vo(t))}bo(t){this.yo(),this.Zs.resolve(t)}vo(t){this.yo(),this.Zs.reject(t)}yo(){var t;null===(t=this.po)||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)}fo(){const t={method:this.method,url:this.url,request:this,xhr:this.xhr,text:this.xhr.responseText,status:this.xhr.status,title:up.protocol.titleFromXHR(this.xhr),target:up.protocol.targetFromXHR(this.xhr),openLayer:up.protocol.openLayerFromXHR(this.xhr),acceptLayer:up.protocol.acceptLayerFromXHR(this.xhr),dismissLayer:up.protocol.dismissLayerFromXHR(this.xhr),eventPlans:up.protocol.eventPlansFromXHR(this.xhr),context:up.protocol.contextFromXHR(this.xhr),expireCache:up.protocol.expireCacheFromXHR(this.xhr),evictCache:up.protocol.evictCacheFromXHR(this.xhr),fail:this.fail};let n=up.protocol.methodFromXHR(this.xhr),i=up.protocol.locationFromXHR(this.xhr);return i&&(e.matchURLs(this.url,i)||n||(n="GET"),t.url=i),n&&(t.method=n),new up.Response(t)}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]}eo(){for(let t of["target","failTarget","mode","failMode","context","failContext","originMode"])this.wo(t);let t,e;(t=this.csrfHeader())&&(e=this.csrfToken())&&this._o(t,e),this._o(up.protocol.headerize("version"),up.version)}wo(t){this._o(up.protocol.headerize(t),this[t])}_o(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.wo("target"),this.Qs=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.Zs}),t)},7294(){var t=this&&this.bt||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.Oo={},this.ko=[]}get(t){t=this.So(t);let e=this.Eo(t),n=e.matchBest(t);if(n){if(this.jo(n))return n;this.Co(t,e)}}put(e){return t(this,void 0,void 0,function*(){e=this.So(e);let t=this.Eo(e),{response:n}=e;n&&t.updateVary(n);let i=t.requests.filter(n=>t.satisfies(e,n));for(let t of i)this.Co(t);e.cacheRoute=t,t.put(e),this.ko.push(e),this.xo()})}track(n,i){return t(this,arguments,void 0,function*(t,n,i={}){var r;let s;n.trackedRequest=t,n.state="tracking",s=t.ended&&t.response?t.response:yield e.always(t),s instanceof up.Response?i.force||t.cacheRoute.satisfies(t,n)?(n.fromCache=!0,s=e.variant(s,{request:n}),n.respondWith(s),e.delegate(n,["expired","state"],()=>t)):(delete n.trackedRequest,n.state="new",null===(r=i.onIncompatible)||void 0===r||r.call(i,n)):(n.state=t.state,n.vo(s))})}willHaveSameResponse(t,e){return t===e||t===e.trackedRequest}evict(t=!0,e){this.Fo(t,e,t=>this.Co(t))}expire(t=!0,e){this.Fo(t,e,t=>t.expired=!0)}reindex(t){this.Co(t),delete t.cacheRoute,this.put(t)}Co(t){var n;e.remove(this.ko,t),null===(n=t.cacheRoute)||void 0===n||n.delete(t)}Eo(t){var e,n;return t.cacheRoute||(e=this.Oo)[n=t.description]||(e[n]=new Route)}jo(t){return t.age<up.network.config.cacheEvictAge}get currentSize(){return this.ko.length}get cn(){return up.network.config.cacheSize}xo(){for(let t=0;t<this.currentSize-this.cn;t++)this.Co(this.ko[0])}Fo(t=!0,n,i){let r=up.Request.tester(t,n),s=e.filter(this.ko,r);e.each(s,i)}So(t){return e.wrapValue(up.Request,t)}}},1588(){const t=up.util,e=up.element,n=["GET","POST"];up.Request.FormRenderer=class FormRenderer{constructor(t){this.yt=t}buildAndSubmit(){this.params=this.yt.params.withoutBinaryEntries();let i=this.yt.url,{method:r}=this.yt;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.mn=e.affix(document.body,"form.up-request-loader",{method:r,action:i});let o,u,a=this.yt.contentType;a&&this.mn.setAttribute("enctype",a),(o=this.yt.csrfParam())&&(u=this.yt.csrfToken())&&this.params.add(o,u),t.each(this.params.toArray(),this.To.bind(this)),up.browser.submitForm(this.mn)}To(t){e.affix(this.mn,"input[type=hidden]",t)}}},4823(){const t=up.util;up.Request.Queue=class Queue{constructor(){this.reset()}reset(){this.Po=[],this.Ro=[],this.Lo=!1}get allRequests(){return this.Ro.concat(this.Po)}asap(e){e.runQueuedCallbacks(),t.always(e,()=>this.Tt(e)),this.Ao(e),this.Do(e),queueMicrotask(()=>this.$o())}promoteToForeground(t){t.background&&(t.background=!1,this.Ao(t))}Ao(e){if(!e.isTimed())return;let n=Math.max(e.effectiveLateTime-e.age);t.timer(n,()=>this.Mo())}Ho(){return t.evalOption(up.network.config.concurrency)}No(){const t=this.Ho();return-1===t||this.Ro.length<t}get size(){return this.allRequests.length}isBusy(){return this.size>0}Do(t){this.Po.push(t)}Bo(){let e=t.find(this.Po,t=>!t.background);return e||(e=this.Po[0]),t.remove(this.Po,e)}Io(t){t.load()&&this.Ro.push(t)}Tt(e){t.remove(this.Ro,e)||t.remove(this.Po,e),queueMicrotask(()=>this.$o()),t.task(()=>this.qo())}$o(){let t;if(this.No()&&(t=this.Bo()))return this.Io(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.Ro,this.Po]){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)}}Mo(){!this.Lo&&this.Uo()&&(this.Lo=!0,up.emit("up:network:late",{log:"Server is slow to respond"}))}qo(){this.Lo&&!this.zo.length&&(this.Lo=!1,up.emit("up:network:recover",{log:"Slow requests were loaded"}))}get zo(){return this.allRequests.filter(t=>t.isTimed())}Uo(){return t.some(this.zo,t=>t.age>=t.effectiveLateTime-1)}}},6374(){var t;const e="multipart/form-data",n=up.util;up.Request.XHRRenderer=(t=class XHRRenderer{constructor(t){this.yt=t}buildAndSend(t){const e=this.yt.xhr;this.Vo=n.copy(this.yt.params),this.yt.timeout&&(e.timeout=this.yt.timeout),e.open(this.Ko(),this.yt.url);let i=this.Xo();i&&e.setRequestHeader("Content-Type",i);for(let t in this.yt.headers){let n=this.yt.headers[t];e.setRequestHeader(t,n)}Object.assign(e,t),e.send(this.Wo())}Ko(){let t=this.yt.method;return this.yt.wrapMethod&&!this.yt.will302RedirectWithGET()&&(t=up.protocol.wrapMethod(t,this.Vo)),t}Xo(){return this.Go(),this.Jo}Wo(){return this.Go(),this.Qo}Go(){this.Qo=this.yt.payload,this.Jo=this.yt.contentType,!this.Qo&&this.yt.allowsPayload()&&(this.Jo||(this.Jo=this.Vo.hasBinaryEntries()?e:"application/x-www-form-urlencoded"),this.Jo===e?(this.Jo=null,this.Qo=this.Vo.toFormData()):this.Qo=this.Vo.toQuery().replace(/%20/g,"+"))}},n.memoizeMethod(t.prototype,{Go:!0,Ko:!0}),t)},8072(){const t=up.util,e=/^(text\/html|application\/xhtml\+xml) *(;|$)/i;up.Response=class Response extends up.Record{keys(){return["method","url","text","status","request","xhr","target","title","openLayer","acceptLayer","dismissLayer","eventPlans","context","expireCache","evictCache","headers","loadedAt","fail"]}defaults(){return{headers:{},loadedAt:new Date}}get ok(){var e;return!t.evalOption(null!==(e=this.fail)&&void 0!==e?e:up.network.config.fail,this)}get none(){return!this.text}header(t){var e;return this.headers[t]||(null===(e=this.xhr)||void 0===e?void 0:e.getResponseHeader(t))}get varyHeaderNames(){let e=this.header("Vary");return t.getSimpleTokens(e,{separator:","})}get contentType(){return this.header("Content-Type")}isHTML(){return e.test(this.contentType)}get cspInfo(){let t=this.header("Content-Security-Policy")||this.header("Content-Security-Policy-Report-Only");return up.CSPInfo.fromHeader(t)}get lastModified(){let t=this.header("Last-Modified");if(t)return new Date(t)}get etag(){return this.header("ETag")}get json(){return this.parsedJSON||(this.parsedJSON=JSON.parse(this.text))}get age(){return new Date-this.loadedAt}get expired(){return this.age>up.network.config.cacheExpireAge||this.request.expired}get description(){return`HTTP ${this.status} response to ${this.request.description}`}get redirect(){return this.url!==this.request.url||this.method!==this.request.method}get redirectRequest(){if(!this.redirect)return;let e=t.variant(this.request,{method:this.method,url:this.url,cacheRoute:null});return up.cache.track(this.request,e,{force:!0}),e}}},6858(){var t;const e=up.util,n=up.element;up.ResponseDoc=(t=class ResponseDoc{constructor({document:t,fragment:e,content:n,target:i,origin:r,data:s,cspInfo:o,match:u}){if(t?this.Yo(t,r,s):e?this.Zo(e,r,s):this.tu(n||"",r,i,s),this.eu=o,up.script.warnOfUnsafeCSP(o),r){let t=up.fragment.tryToTarget(r);t&&(this.nu=this.select(t))}this.Hn=u}Yo(t,i,r){if(t instanceof Document)this.Mn=t,this.iu=!0;else if(e.isString(t)){this.iu=n.isFullDocumentHTML(t);let e=t=>[n.createBrokenDocumentFromHTML(t)],s=up.fragment.provideNodes(t,{origin:i,data:r,htmlParser:e});s[0]instanceof Document?this.Mn=s[0]:this.Mn=this.ru(s)}else this.Mn=this.ru(t)}Zo(t,e,i){let r=n.extractSingular(up.fragment.provideNodes(t,{origin:e,data:i}));this.Mn=this.ru(r)}tu(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.Mn=this.ru(a)}ru(t){t=e.wrapList(t);let n=document.createElement("up-document");return n.append(...t),n}rootSelector(){return up.fragment.toTarget(this.Mn.children[0])}get title(){return this.su(this.ou)}uu(){if(this.iu)return this.Mn.head}su(t){let e=this.uu();return e&&t(e)}get metaTags(){return this.su(up.history.findMetaTags)}get assets(){return this.su(t=>{let i=up.script.findAssets(t);return e.map(i,t=>(t=n.revivedClone(t),up.script.adoptDetachedHeadAsset(t,this.eu),t))})}get lang(){if(this.iu)return up.history.getLang(this.Mn)}ou(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.nu,document:this.Mn,match:this.Hn}).find()}selectSteps(t){return t.filter(t=>this.au(t)||this.cu(t))}commitSteps(t){return t.filter(t=>this.commitElement(t.newElement))}au(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)}cu(t){if(!t.maybe)throw new up.CannotMatch}commitElement(t){if(this.Mn.contains(t))return up.script.adoptNewFragment(t,this.eu),t.remove(),!0}finalizeElement(t){if(this.Mn instanceof Document)for(let e of n.subtree(t,":is(noscript, script, audio, video):not(.up-keeping, .up-keeping *)")){let t=n.revivedClone(e);e.replaceWith(t)}}},e.memoizeMethod(t.prototype,{uu:!0}),t)},9918(){const t=up.element,e=up.util;up.RevealMotion=class RevealMotion{constructor(e,n={}){var i,r,s,o,u,a,c,l,h,p;this.q=e,this.lu=t.get(n.viewport)||up.viewport.get(this.q),this.hu=up.layer.get(this.lu),this.pu=null!==(r=null!==(i=n.scrollBehavior)&&void 0!==i?i:n.behavior)&&void 0!==r?r:"instant";const f=up.viewport.config;this.fu=null!==(o=null!==(s=n.snap)&&void 0!==s?s:n.revealSnap)&&void 0!==o?o:f.revealSnap,this.du=null!==(a=null!==(u=n.padding)&&void 0!==u?u:n.revealPadding)&&void 0!==a?a:f.revealPadding,this.mu=null!==(l=null!==(c=n.top)&&void 0!==c?c:n.revealTop)&&void 0!==l?l:f.revealTop,this.gu=null!==(p=null!==(h=n.max)&&void 0!==h?h:n.revealMax)&&void 0!==p?p:f.revealMax,this.vu=f.selector("fixedTopSelectors"),this.bu=f.selector("fixedBottomSelectors")}start(){const t=this.yu(this.lu),n=up.Rect.fromElement(this.q);if(this.gu){const t=e.evalOption(this.gu,this.q);n.height=Math.min(n.height,t)}n.grow(this.du),this.wu(t),t.height<0&&up.fail("Viewport has no visible area");const i=this.lu.scrollTop;let r=i;this.mu||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.fu)&&r<this.fu&&n.top<.5*t.height&&(r=0),r!==i&&this.lu.scrollTo({top:r,behavior:this.pu})}yu(){return up.viewport.isRoot(this.lu)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.lu)}_u(n){let i=up.fragment.all(n,{layer:this.hu});return i=e.filter(i,t.isVisible),e.map(i,e=>"sticky"===t.style(e,"position")?up.Rect.fromElementAsFixed(e):up.Rect.fromElement(e))}wu(t){for(let e of this._u(this.vu)){let n=e.bottom-t.top;n>0&&(t.top+=n,t.height-=n)}for(let e of this._u(this.bu)){let n=t.bottom-e.top;n>0&&(t.height-=n)}}}},6941(){const t=up.element,e=up.util;up.ScriptGate=class ScriptGate{constructor(t=up.CSPInfo.none()){let e=up.script.cspNonce();this.Ou=new EvalCallbackPolicy(e,t),this.ku=new BodyScriptElementPolicy(e,t),this.Su=new DetachedAssetPolicy(e,t)}warnOfUnsafeCSP(){up.script.config.cspWarnings&&(this.Ou.warnOfUnsafeCSP(),this.ku.warnOfUnsafeCSP())}evalCallback(t,e){if(!this.Ou.passesItem(t.nonce))throw new up.Blocked("Blocked callback: "+t.script);try{return t.unsafeEval(e)}catch(t){throw t instanceof EvalError?new up.Blocked(t.message):t}}adoptNewFragment(t){this.Eu(t),this.ju(t)}adoptDetachedHeadAsset(t){if(!up.script.isScript(t))return;let e=new ScriptElementItem(t);this.Su.processItem(e)}adoptRenderOptionsFromHeader(t){let n=this.Ou;for(let i of Object.keys(t)){let r=t[i];if(/^on[A-Z]/.test(i)&&e.isString(r)){let e=new ObjectPropertyItem(t,i);n.processItem(e),t[i]=up.RenderOptions.parseCallback(i,t[i])}}}Eu(t){const e=this.ku;for(let n of up.script.findScripts(t)){let t=new ScriptElementItem(n);e.processItem(t)}}ju(e){const n=this.Ou;for(let i of up.script.config.nonceableAttributes){let r=t.subtree(e,t.attrSelector(i));for(let t of r){let e=new AttributeItem(t,i,n);n.processItem(e)}}}};class Policy{constructor(t,e){this.pageNonce=t,this.cspInfo=e,this.Cu=new Set(e.nonces),t&&this.Cu.add(t)}isValidNonce(t){return this.Cu.has(t)}tryRewriteNonce(t,e=t.readNonce()){this.pageNonce&&this.isValidNonce(e)&&t.writeNonce(this.pageNonce)}warnOfUnsafeCSP(){throw new up.NotImplemented}processItem(t){let e=t.readNonce();this.passesItem(e)?this.tryRewriteNonce(t,e):(this.log(...t.logBlockedDescriptor()),t.block())}passesItem(t){throw new up.NotImplemented}}class DetachedAssetPolicy extends Policy{constructor(...t){super(...t)}passesItem(t){return!0}}class ConfigurablePolicy extends Policy{constructor(t,e,n){super(e,n),this.xu=t;let i=up.script.config[t];"auto"===i&&(i=this.resolveAuto()),"nonce"!==i||this.pageNonce||(this.warn('Enforcing nonces requires a <meta name="csp-nonce">.'),i="block"),this.policyString=i}resolveAuto(){throw new up.NotImplemented}passesItem(t){switch(this.policyString){case"pass":return!0;case"block":return!1;case"nonce":return this.isValidNonce(t);default:up.fail("Unknown policy: %s = %o",this.configExpression(),this.policyString)}}log(...t){up.puts(this.configExpression(),...t)}warn(...t){up.warn(this.configExpression(),...t)}configExpression(){return"up.script.config."+this.xu}}class EvalCallbackPolicy extends ConfigurablePolicy{constructor(...t){super("evalCallbackPolicy",...t)}resolveAuto(){return this.pageNonce?"nonce":"pass"}warnOfUnsafeCSP(){"pass"===this.policyString&&this.cspInfo.isUnsafeEval()&&this.warn(`An 'unsafe-eval' CSP allows arbitrary [up-on...] callbacks. Consider setting ${this.configExpression()} = 'nonce'.`)}}class BodyScriptElementPolicy extends ConfigurablePolicy{constructor(...t){super("scriptElementPolicy",...t)}resolveAuto(){return this.cspInfo.isStrictDynamic()?"nonce":"pass"}warnOfUnsafeCSP(){"pass"===this.policyString&&this.cspInfo.isStrictDynamic()&&this.warn(`A 'strict-dynamic' CSP allows arbitrary <script> elements in new fragments. Consider setting ${this.configExpression()} = 'nonce'.`)}}class StringCallbackItem{readNonce(){return this.Fu().nonce}writeNonce(t){let e=this.Fu();e.nonce=t,this.writeCallbackString(e.toString())}Fu(){return this.Tu||(this.Tu=up.NonceableCallback.fromString(this.readCallbackString()))}logBlockedDescriptor(){throw new up.NotImplemented}block(){this.writeCallbackString("/* blocked */")}readCallbackString(){throw new up.NotImplemented}writeCallbackString(t){throw new up.NotImplemented}}class AttributeItem extends StringCallbackItem{constructor(t,e){super(),this.q=t,this.Pu=e}logBlockedDescriptor(){return["Blocked callback attribute: %s",t.attrSelector(this.Pu,this.readCallbackString())]}readCallbackString(){return this.q.getAttribute(this.Pu)}writeCallbackString(t){this.q.setAttribute(this.Pu,t)}}class ObjectPropertyItem extends StringCallbackItem{constructor(t,e){super(),this.Ru=t,this.Fe=e}logBlockedDescriptor(){return["Blocked string callback: { %s: %o }",this.Fe,this.readCallbackString()]}readCallbackString(){return this.Ru[this.Fe]}writeCallbackString(t){this.Ru[this.Fe]=t}}class ScriptElementItem{constructor(t){this.q=t}readNonce(){return this.q.nonce}writeNonce(t){this.q.setAttribute("nonce",t)}logBlockedDescriptor(){return["Blocked <script> element: %o",this.q]}block(){up.script.block(this.q)}}},6689(){const t=up.util,e=up.element;up.Selector=class Selector{constructor(e,n,i={}){var r;this.Lu=[];let s,o=n&&!document.contains(n);if(o||i.destroying||this.Lu.push(up.fragment.isNotDestroying),this.Au=o||"any"===i.layer||1===up.layer.count,this.Au)s=up.layer.root;else{if(null!==(r=i.layer)&&void 0!==r||(i.layer=t.presence(n,t.isElement)),this.J=up.layer.getAll(i),!this.J.length)throw new up.CannotMatch(["Unknown layer: %o",i.layer]);this.Lu.push(e=>t.some(this.J,t=>t.contains(e))),s=this.J[0]}this.Du=up.fragment.expandTargets(e,Object.assign(Object.assign({},i),{layer:s})),this.$u=this.Du.join()||"match-none"}matches(t){return e.elementLikeMatches(t,this.$u)&&this.Mu(t)}closest(t){return this.Hu(t.closest(this.$u))}descendants(t=document){return this.Nu(t.querySelectorAll(this.$u))}firstDescendant(n){return this.Au?(n||(n=document),this.Bu(t=>n.querySelectorAll(t))):t.findResult(this.J,t=>this.Bu(n=>e.subtree(t.element,n)))}subtree(t){return this.Nu(e.subtree(t,this.$u))}Bu(e){return t.findResult(this.Du,t=>this.Nu(e(t))[0])}Mu(e){return e&&t.every(this.Lu,t=>t(e))}Hu(e){return t.presence(e,this.Mu.bind(this))}Nu(e){return t.filter(e,this.Mu.bind(this))}}},4742(){const t=up.util;up.SelectorTracker=class SelectorTracker{constructor(e,n,i){this.$n=e,this.Iu=i,this.I=n.layer||"any",this.qu=n.filter||t.identity,this.Uu=new Map,this.zu=!1}start(){return this.Vu(),t.sequence(this.Ku(),()=>this.Xu())}Ku(){return up.on("up:fragment:inserted up:fragment:destroyed",()=>this.Wu())}Wu(){this.zu||(this.zu=!0,up.fragment.afterMutate(()=>this.Vu()))}Vu(){this.zu=!1;let e=new Map(this.Uu);this.Uu.clear();for(let n of this.Gu){let i=e.get(n);e.delete(n);let r=i||this.Iu(n)||t.noop;this.Uu.set(n,r)}this.Ju(e)}get Gu(){let t=up.fragment.all(this.$n,{layer:this.I});return this.qu(t)}Xu(){this.Ju(this.Uu)}Ju(t){for(let[e,n]of t)n(e)}}},5691(){const t=up.util,e=up.element,n=[{attr:"up-hide-for",toggle(t,n){e.toggle(t,!n)}},{attr:"up-show-for",toggle(t,n){e.toggle(t,n)}},{attr:"up-disable-for",toggle(t,e){up.form.setDisabled(t,e)}},{attr:"up-enable-for",toggle(t,e){up.form.setDisabled(t,!e)}}];up.Switcher=class Switcher{constructor(t){this.Ae=t,this.Qu=t.getAttribute("up-switch")||up.fail("No switch target given for %o",t),this.Yu=t.getAttribute("up-switch-region")}start(){return this.Zu(),t.sequence(this.ta(),this.ea())}ta(){var t,e;let n=()=>this.na();return(null===(e=(t=up.migrate).watchForSwitch)||void 0===e?void 0:e.call(t,this.Ae,n))||up.watch(this.Ae,{logPrefix:"[up-switch]",includeDisabled:!0},n)}ea(){return up.fragment.trackSelector(this.Qu,{filter:e=>{let n=this.ia;return t.filter(e,t=>null==n?void 0:n.contains(t))}},t=>this.ra(t))}na(){this.Zu()}Zu(){const t=this.sa();for(let e of this.oa())this.ra(e,t)}ra(e,n=this.sa()){let i=e.upSwitchValues;t.isEqual(i,n)||(e.upSwitchValues=n,this.ua(e,n))}ua(e,i){for(let{attr:r,toggle:s}of n){let n=e.getAttribute(r);if(n){let r=this.aa(n);s(e,t.intersect(i,r).length>0)}}let r=["Switching %o",e];up.emit(e,"up:form:switch",{field:this.Ae,fieldTokens:i,log:r})}oa(){let t=this.ia;return t?up.fragment.subtree(t,this.Qu):[]}get ia(){return this.Yu?up.fragment.get(this.Yu,{origin:this.Ae}):up.form.getRegion(this.Ae)}aa(e){return t.getSimpleTokens(e,{json:!0})}sa(){var e;let n=up.Params.fromContainer(this.Ae,{includeDisabled:!0}).values(),i=[...n],r=t.some(n,t.isPresent);i.push(r?":present":":blank");let s=up.form.fields(this.Ae);if(null===(e=s[0])||void 0===e?void 0:e.matches("[type=radio], [type=checkbox]")){let e=t.some(s,"checked");i.push(e?":checked":":unchecked")}return i}}},6140(){const t=up.util,e=up.element;up.Tether=class Tether{constructor(t){var n,i;null===(i=(n=up.migrate).handleTetherOptions)||void 0===i||i.call(n,t),this.ca=t.anchor,this.la=t.align,this.ha=t.position,this.pa="top"===this.ha||"bottom"===this.ha?"horizontal":"vertical",this.lu=up.viewport.get(this.ca),this.parent=this.lu===e.root?document.body:this.lu,this.fa=!this.lu.contains(this.ca.offsetParent)}start(t){this.q=t,this.q.style.position="absolute",this.da(0,0),this.sync(),this.ma("on")}stop(){this.ma("off")}ma(t){let e=this.Wu.bind(this);up[t](window,"resize",e),this.fa&&up[t](this.lu,"scroll",e)}Wu(){return clearTimeout(this.syncTimer),this.syncTimer=t.task(this.sync.bind(this))}isAlive(){return up.fragment.isAlive(this.parent)&&up.fragment.isAlive(this.ca)}sync(){const n=this.q.getBoundingClientRect(),i=e.styleNumber(this.q,"margin-top"),r=e.styleNumber(this.q,"margin-right"),s=e.styleNumber(this.q,"margin-bottom"),o=e.styleNumber(this.q,"margin-left"),u=this.ca.getBoundingClientRect();let a,c;switch(this.pa){case"horizontal":switch(this.ha){case"top":c=u.top-s-n.height;break;case"bottom":c=u.top+u.height+i}switch(this.la){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.la){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.ha){case"left":a=u.left-r-n.width;break;case"right":a=u.left+u.width+o}}t.isDefined(a)||t.isDefined(c)?this.$s(a,c):up.fail("Invalid tether constraints: %o",this.ga())}ga(){return{position:this.ha,align:this.la}}$s(t,e){const n=this.q.getBoundingClientRect();this.da(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)}da(t,n){this.offsetLeft=t,this.offsetTop=n,e.setStyle(this.q,{left:t,top:n},"px")}}},3530(){const t=up.util;up.URLPattern=class URLPattern{constructor(e){this.va=[];const n=[],i=[];for(let r of t.getSimpleTokens(e))"-"===r[0]?i.push(r.substring(1)):n.push(r);this.ba=this.ya(n,!0),this.wa=this.ya(i,!1)}ya(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.va.push({name:i,cast:Number}),"(\\d+)"):(n&&this.va.push({name:i,cast:String}),"([^/?#]+)")),new RegExp("^(?:"+i+")$")}test(e,n=!0){return n&&(e=t.matchableURL(e)),this.ba.test(e)&&!this._a(e)}recognize(e,n=!0){n&&(e=t.matchableURL(e));let i=this.ba.exec(e);if(i&&!this._a(e)){const t={};return this.va.forEach((e,n)=>{let r=i[n+1];if(r)return t[e.name]=e.cast(r)}),t}}_a(t){var e;return null===(e=this.wa)||void 0===e?void 0:e.test(t)}}},7781(t,e,n){n(4518),up.element=function(){const t=up.util;function e(t,e){const i=t.querySelectorAll(e);return n(t,e)?[t,...i]:i}function n(e,n){return t.isElement(e)&&e.matches(n)}function i(...e){const n=e.pop();return t.isElement(n)?n:t.isString(n)?function(...e){let[n=document,i]=t.args(e,"val","val");return n.querySelector(i)}(...e,n):t.isList(n)?(n.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",n),n[0]):n}function r(...e){return t.flatMap(e,s)}function s(e){return t.isString(e)?document.querySelectorAll(e):t.wrapList(e)}function o(e,n){return n===A(e)?t.noop:(u(e,n),()=>u(e,!n))}function u(t,e){e?(t.removeAttribute("hidden"),"none"===t.style.display&&(t.style.display="")):t.setAttribute("hidden","")}function a(e,n){for(let i in n){const r=n[i];t.isGiven(r)?e.setAttribute(i,r):e.removeAttribute(i)}}function c(t,e){t.parentNode.insertBefore(e,t)}function l(e,n={}){let i,r,s,{includePath:o}=p(e);for(let t of o){let{tagName:e}=t;e&&"*"!==e||(e="div"),r=document.createElement(e),i||(i=r),h(r,t),null==s||s.appendChild(r),s=r}for(let e in n){let r=n[e];"class"===e?C(i,t.wrapList(r)):"style"===e?L(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 h(t,{id:e,classNames:n,attributes:i}){e&&(t.id=e);for(let[e,n]of Object.entries(i))t.setAttribute(e,n);C(t,n)}function p(e){let n;const{masked:i,restore:r}=t.expressionOutline(e),s=i.replace(/:not\([^)]*\)/,function(t){return n=r(t),""});let o=r(s);return{includePath:s.split(/[ >]+/).map(function(n){let i={tagName:null,classNames:[],id:null,attributes:{}};return(n=(n=(n=(n=n.replace(/^[\w-*]+/,function(t){return i.tagName=t,""})).replace(/#([\w-]+)/,function(t,e){return i.id=e,""})).replace(/\.([\w-]+)/g,function(t,e){return i.classNames.push(e),""})).replace(/\[[^\]]*]/g,function(e){e=r(e);let[n,s,o,u,a]=e.match(/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/);return u||(u='"'),i.attributes[s]=a?t.parseString(u+a+u):"",""}))&&up.fail("Cannot parse selector: "+e),i}),includeRaw:o,excludeRaw:n}}const f=["HTML","BODY","HEAD","TITLE"],d=up.mockable(t=>t.matches(f.join()));function m(e,n){return t.isGiven(n)?`[${e}="${n=n.replace(/"/g,'\\"')}"]`:`[${e}]`}function g(t){return v(b(t))}function v(e){return function(e){if(1===e.length&&t.isElementLike(e[0]))return e[0]}(e)||up.fail("Expected a single element, but got %d nodes",e.length)}function b(t){t=t.trim();const e=document.createRange();return e.setStart(document.body,0),e.createContextualFragment(t).childNodes}function y(e,n,i){t.isMissing(e.getAttribute(n))&&e.setAttribute(n,i)}function w(e){const n=document.createElement("up-wrapper");return n.append(...t.wrapList(e)),n}function _(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 O(t,e){return _(t,e,k)}let k=t.identity;function S(t,e){switch(t){case"false":return!1;case"true":case"":case e:return!0}}function E(e){return t.parseNumber(e)}function j(e){if(null==e?void 0:e.trim())return t.parseRelaxedJSON(e)}function C(t,e){for(let n of e)t.classList.add(n)}function x(e,n,i){return e.classList.contains(n)===i?t.noop:(e.classList.toggle(n,i),()=>e.classList.toggle(n,!i))}function F(t,e){return R(window.getComputedStyle(t),e)}function T(e,n){const i=F(e,n);if(t.isPresent(i))return parseFloat(i)}function P(t,e){const{style:n}=t;return R(n,e)}function R(e,n){return up.migrate.loaded&&(n=up.migrate.fixGetStyleProps(n)),t.isString(n)?e.getPropertyValue(n):t.mapObject(n,t=>[t,e.getPropertyValue(t)])}function L(e,n,i=""){if(up.migrate.loaded&&(n=up.migrate.fixSetStyleProps(n,i)),t.isString(n))e.setAttribute("style",n);else{const{style:t}=e;for(let e in n){let r=n[e];t.setProperty(e,r+i)}}}function A(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function D(t){return/^up-/.test(t)}function $(e,n){return t.mapObject(n,t=>[t,e.getAttribute(t)])}const M=/^\s*(<!--[^-]*.*?-->\s*)*<([a-z-!]+)\b/i;function H(t){var e;return null===(e=M.exec(t))||void 0===e?void 0:e[2].toUpperCase()}return{subtree:e,subtreeFirst:function(t,e){return n(t,e)?t:t.querySelector(e)},contains:function(t,e){const n=i(e);return Node.prototype.contains.call(t,n)},closestAttr:function(t,e,n=O){let i=t.closest("["+e+"]");if(i)return n(i,e)},ancestor:function(t,e){var n;return null===(n=t.parentNode)||void 0===n?void 0:n.closest(e)},around:function(t,n){return r(t.closest(n),e(t,n))},get:i,list:r,toggle:function(t,e=!A(t)){u(t,e)},hide:function(t){u(t,!1)},hideTemp:function(t){return o(t,!1)},show:function(t){u(t,!0)},showTemp:function(t){return o(t,!0)},metaContent:function(t){var e;const n="meta"+m("name",t);return null===(e=document.head.querySelector(n))||void 0===e?void 0:e.content},insertBefore:c,createFromSelector:l,setAttrs:a,setAttrsTemp:function(t,e){let n=Object.keys(e),i=$(t,n);return a(t,e),()=>a(t,i)},affix:function(...e){let[n,i="beforeend",r,s]=t.args(e,"val",t.isAdjacentPosition,"val","options");const o=l(r,s);return n.insertAdjacentElement(i,o),o},idSelector:function(t){return t.match(/^[a-z][a-z0-9\-_]*$/i)?`#${t}`:m("id",t)},classSelector:function(t){return`.${t=t.replace(/[^\w-]/g,"\\$&")}`},isSingleton:d,attrSelector:m,tagName:function(t){return t.tagName.toLowerCase()},createBrokenDocumentFromHTML:function(t){const e=H(t);return["TR","TD","TH","THEAD","TBODY"].includes(e)&&(t=`<table>${t}</table>`),(new DOMParser).parseFromString(t,"text/html")},revivedClone:function(t){let e=g(t.outerHTML);return"nonce"in t&&(e.nonce=t.nonce),e},createNodesFromHTML:b,createFromHTML:g,extractSingular:v,get root(){return document.documentElement},paint:function(t){t.offsetHeight},fixedToAbsolute:function(t){const e=t.getBoundingClientRect();t.style.position="absolute";const n=t.offsetParent.getBoundingClientRect();L(t,{left:e.left-T(t,"margin-left")-n.left+"px",top:e.top-T(t,"margin-top")-n.top+"px",right:"",bottom:""})},setMissingAttrs:function(t,e){for(let n in e)y(t,n,e[n])},setMissingAttr:y,unwrap:function(t){!function(){const e=document.activeElement;try{return function(){let e=[...t.childNodes];for(let n of e)c(t,n);t.remove()}()}finally{e&&e!==document.activeElement&&e.focus({preventScroll:!0})}}()},wrapChildren:function(t){const e=w(t.childNodes);return t.append(e),e},wrapIfRequired:function(e){return 1===e.length&&t.isElement(e[0])?e[0]:w(e)},attr:O,booleanAttr:function(t,e){return _(t,e,S)},numberAttr:function(t,e){return _(t,e,E)},jsonAttr:function(t,e){return _(t,e,j)},parseAttr:_,booleanOrStringAttr:function(t,e){return _(t,e,S,k)},booleanOrNumberAttr:function(t,e){return _(t,e,S,E)},booleanOrNumberOrStringAttr:function(t,e){return _(t,e,S,E,k)},setStyleTemp:function(t,e){const n=P(t,Object.keys(e));return L(t,e),()=>L(t,n)},style:F,styleNumber:T,inlineStyle:P,setStyle:L,isVisible:A,upAttrs:function(t){let e=t.getAttributeNames().filter(D);return $(t,e)},upClasses:function(e){return t.filter(e.classList.values(),D)},setAttrPresence:function(t,e,n,i){return i?t.setAttribute(e,n):t.removeAttribute(e)},addClasses:C,addClassTemp:function(t,e){return x(t,e,!0)},removeClassTemp:function(t,e){return x(t,e,!1)},parseSelector:p,isEmpty:function(t){return!t.children.length>0&&!t.innerText.trim()},crossOriginSelector:function(t){return`[${t}*="//"]:not([${t}*="//${location.host}/"])`},isIntersectingWindow:function(t,{margin:e=0}={}){const n=up.Rect.fromElement(t);return n.grow(e),n.bottom>0&&n.top<window.innerHeight&&n.right>0&&n.left<window.innerWidth},unionSelector:function(e,n,i){let r=`:is(${e.join()})`;return t.isPresent(n)&&(r+=`:not(${n.join()})`),i&&(r+=`:is(${i})`),r},elementLikeMatches:n,documentPosition:function(t){let e=t.nextElementSibling;return e?[e,"beforebegin"]:[t.parentElement,"beforeend"]},isFullDocumentHTML:function(t){let e=H(t);return"HTML"===e||"!DOCTYPE"===e},leadingElement:function(e){for(let n of e){if(t.isElement(n))return n;if(t.isTextNode(n)&&n.textContent.trim())return}},removeAttrsFromHTML:function(t,e){let n=new RegExp(`\\s+(${e.join("|")})="[^"]*"`,"g");return t.replace(/<[^<]+>/g,t=>t.replace(n,""))}}}()},6939(){up.error=function(){function t(t){if("object"!=typeof(e=t)||!("AbortError"===e.name||e instanceof up.RenderResult||e instanceof up.Response))throw t;var e}function e(t,...e){try{return t(...e)}catch(t){reportError(t)}}return{fail:function(...t){throw new up.Error(t)},throwCritical:t,muteUncriticalRejection:function(e){return e.catch(t)},muteUncriticalSync:function(e){try{return e()}catch(e){t(e)}},guard:e,guardPromise:function(t){return t.catch(reportError)},guardFn:function(t){if(t)return(...n)=>e(()=>t(...n))}}}(),up.fail=up.error.fail},8386(){up.Aborted=class Aborted extends up.Error{constructor(t){super(t,{name:"AbortError"})}}},7181(){up.Blocked=class Blocked extends up.Error{}},4244(){up.CannotMatch=class CannotMatch extends up.Error{}},1410(){up.CannotParse=class CannotParse extends up.Error{}},1268(){up.CannotTarget=class CannotTarget extends up.Error{}},2487(){up.Error=class Error extends window.Error{constructor(t,e={}){Array.isArray(t)&&(t=up.util.sprintf(...t)),super(t);let n="up."+this.constructor.name;Object.assign(this,{name:n},e)}}},9483(){up.NotImplemented=class NotImplemented extends up.Error{}},4138(){up.Offline=class Offline extends up.Error{}},9441(){up.event=function(){const t=up.util,e=up.element;function n(...t){return i(t).bind()}function i(t,e){return up.EventListenerGroup.fromBindArgs(t,e)}function r(t){return up.EventEmitter.fromEmitArgs(t)}function s(...e){const n=t.extractOptions(e),i=e[0]||n.type||up.fail("Missing event type"),r=new Event(i,{bubbles:!0,cancelable:!0});return Object.assign(r,t.omit(n,["type","target"])),r}const o=["metaKey","shiftKey","ctrlKey","altKey"];function u(e){return e.button>0||t.some(o,t=>e[t])}function a(e,n,i=[]){const r=s(n,t.pick(e,i));return r.originalEvent=e,["stopPropagation","stopImmediatePropagation","preventDefault"].forEach(function(t){const n=r[t];return r[t]=function(){return e[t](),n.call(r)}}),e.defaultPrevented&&r.preventDefault(),r}n("up:click","[up-emit]",function(t,n){if(u(t))return;const i=e.attr(n,"up-emit"),r=e.jsonAttr(n,"up-emit-props"),s=a(t,i);Object.assign(s,r),up.emit(n,s)});let c=["unknown"];function l(t){c.push(t),setTimeout(()=>c.pop())}return n("keydown keyup",{capture:!0},()=>l("key")),n("pointerdown pointerup",{capture:!0},()=>l("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,onClosest:function(t,e,n){let i=up.on(e,{guard:e=>e.target.contains(t)},n);return up.destructor(t,i),i},off:function(...t){return i(t).unbind()},build:s,emit:function(...t){return r(t).emit()},assertEmitted:function(...t){return r(t).assertEmitted()},onEscape:function(t){return n("keydown",function(e){if("Escape"===e.key)return t(e)})},halt:function(t,e={}){e.log&&up.log.putsEvent(t),t.stopImmediatePropagation(),t.preventDefault()},isModified:u,isSyntheticClick:function(e){return t.isMissing(e.clientX)},fork:a,keyModifiers:o,get inputDevice(){return t.last(c)}}}(),up.on=up.event.on,up.off=up.event.off,up.emit=up.event.emit},1915(){up.form=function(){const t=up.util,e=up.element,n=new up.Config(()=>({groupSelectors:["[up-form-group]","fieldset","label","form"],fieldSelectors:["select","input:not([type=submit], [type=image], [type=button])","button[type]:not([type=submit], [type=button])","textarea"],submitSelectors:["form:is([up-submit], [up-target], [up-layer], [up-transition])"],noSubmitSelectors:["[up-submit=false]","[target]",e.crossOriginSelector("action")],submitButtonSelectors:["input[type=submit]","input[type=image]","button[type=submit]","button:not([type])"],genericButtonSelectors:["input[type=button]","button[type=button]"],validateBatch:!0,watchInputEvents:["input","change"],watchInputDelay:0,watchChangeEvents:["change"],watchableEvents:["input","change"],arrayParam:t=>t.endsWith("[]")}));function i(n,i){n=e.get(n);let r=e.subtree(n,i());if(n.matches("form[id]")){const s=i(e.attrSelector("form",n.getAttribute("id"))),o=up.fragment.all(s,{layer:n});r=t.uniq([...r,...o])}return r}const[r,s]=n.selectorFns("fieldSelectors");function o(t){return i(t,r)}function u(t){return[...o(t),...l(t),...(e=t,i(e,h))];var e}const[a,c]=n.selectorFns("submitButtonSelectors");function l(t){return i(t,a)}const h=n.selectorFn("genericButtonSelectors"),p=up.mockable((t,e)=>up.render(f(t,e)));function f(e,n,i){e=S(e=up.fragment.get(e)),n=t.options(n);let r=new up.OptionsParser(e,n,i);return r.include(v),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),Object.assign(n,b(n.submitButton)),n}function d(e,n,i={}){var r,s,o;n=t.options(n),null!==(r=i.closest)&&void 0!==r||(i.closest=!0),null!==(s=i.attrPrefix)&&void 0!==s||(i.attrPrefix="up-watch-");let u=new up.OptionsParser(e,n,i);u.include(up.status.statusOptions,i),u.string("event"),u.number("delay");let a=up.form.config;return"input"===n.event?(n.event=t.evalOption(a.watchInputEvents,e),null!==(o=n.delay)&&void 0!==o||(n.delay=a.watchInputDelay)):"change"===n.event&&(n.event=t.evalOption(a.watchChangeEvents,e)),n.origin||(n.origin=e),n}function m(t){if(t.disabled)return;let e;return document.activeElement===t?(e=O(t),t.disabled=!0,up.focus(e,{force:!0,preventScroll:!0})):t.disabled=!0,()=>{t.disabled=!1}}function g(e,n){let i=()=>j(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=>g(t,n)):[]}function v(n,i,r){var s;i=t.options(i),n=S(n);const o=new up.OptionsParser(n,i,r);o.string("contentType",{attr:"enctype"}),o.json("headers");const u=[up.Params.fromForm(n),e.jsonAttr(n,"up-params")],a=[e.jsonAttr(n,"up-headers")],c=null!==(s=i.submitButton)&&void 0!==s?s:i.submitButton=l(n)[0];return c&&(u.push(up.Params.fromFields(c),e.jsonAttr(c,"up-params")),a.push(e.jsonAttr(c,"up-headers")),i.method||(i.method=c.getAttribute("formmethod")),i.url||(i.url=c.getAttribute("formaction"))),i.params=up.Params.merge(...u,i.params),i.headers=t.merge(...a,i.headers),o.string("url",{attr:"action",default:up.fragment.source(n)}),o.string("method",{attr:["up-method","data-method","method"],default:"GET",normalize:t.normalizeMethod}),"GET"===i.method&&(i.url=up.Params.stripURL(i.url)),i}function b(e){if(!e)return{};let n=up.link.followOptions(e,{},{defaults:!1});return t.omit(n,["method","url","guardEvent","origin","params","headers"])}function y(...e){let[n,i,r]=t.args(e,"val","options","callback");var s;return n=up.element.get(n),r||(s=n,r=up.script.callbackAttr(s,"up-watch",{argNames:["value","name","options"]})||up.fail("No callback given for up.watch()")),new up.FieldWatcher(n,i,r).start()}function w(t,e={}){return y(t,Object.assign(Object.assign({logPrefix:"up.autosubmit()"},e),{batch:!0}),(e,n)=>p(t,n))}function _(){var t,e;return(null===(e=(t=up.migrate).migratedFormGroupSelectors)||void 0===e?void 0:e.call(t))||n.groupSelectors}function O(t){return k(t).element}function k(e){return t.findResult(_(),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 S(t){return function(t){if(t instanceof HTMLFormElement)return t}(t)||function(t){return t.closest("form")}(t)||function(t){let n=t.getAttribute("form");if(n){let i="form"+e.idSelector(n);return up.fragment.get(i,{layer:t})}}(t)}function E(t){return t.upFormValidator||(t.upFormValidator=function(t){const e=new up.FormValidator(t),n=e.start();return up.destructor(t,n),e}(t))}function j(t){return function(t){var e;if(t)return S(t)||(null===(e=up.layer.get(t))||void 0===e?void 0:e.element)}(t)||up.layer.current.element}const C=up.mockable(function(...e){let[n,{guard:i},s]=t.args(e,"val","options","callback");return up.fragment.trackSelector(r(),{filter:function(e){let r=j(n);return t.filter(e,function(t){return(n===r||n.contains(t))&&j(t)===r&&(!i||i(t))})}},s)});return up.on("submit",n.selectorFn("submitSelectors"),function(e,n){const i=t.presence(e.submitter,c);"false"!==(null==i?void 0:i.getAttribute("up-submit"))&&(e.defaultPrevented||(up.event.halt(e,{log:!0}),up.error.muteUncriticalRejection(p(n,{submitButton:i}))))}),up.compiler("[up-switch]",t=>new up.Switcher(t).start()),up.attribute("up-watch",t=>y(t)),up.compiler("[up-validate]",{rerun:!0},function(t){let e=S(t);e&&E(e)}),up.attribute("up-autosubmit",t=>w(t,{logPrefix:"[up-autosubmit]"})),{config:n,submit:p,submitOptions:f,destinationOptions:v,submitButtonOverrides:b,watchOptions:d,validateOptions:function(e,i,r={}){i=t.options(i);let s=new up.OptionsParser(e,i,Object.assign(Object.assign({},r),{closest:!0,attrPrefix:"up-validate-"}));return s.string("url"),s.string("method",{normalize:t.normalizeMethod}),s.boolean("batch",{default:n.validateBatch}),s.json("params"),s.json("headers"),s.include(d,{defaults:{event:"change"}}),i},isSubmittable:function(t){return t=up.fragment.get(t),n.matches(t,"submitSelectors")},watch:y,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 E(S(n.origin)).validate(n)},autosubmit:w,fieldSelector:r,fields:o,trackFields:C,isField:s,submitButtons:l,focusedField:function(){return t.presence(document.activeElement,s)},disableTemp:function(e){let n=u(e);return t.sequence(t.map(n,m))},setDisabled:function(t,e){for(let n of u(t))n.disabled=e},getDisablePreviewFn:function(t,e){return function(n){let i=g(t,e);for(let t of i)n.disable(t)}},group:O,groupSolution:k,groupSelectors:_,get:S,getRegion:j}}(),up.submit=up.form.submit,up.watch=up.form.watch,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate},6973(t,e,n){n(3278);const i=up.util,r=up.element;up.fragment=function(){function t(t){let e=r.tagName(t);if(e.startsWith("up-"))return e}const e=["[up-id]","[id]","html","head","body"],n=new up.Config(()=>({badTargetClasses:[/^up-/],strongTargetDerivers:e,targetDerivers:[...e,"main","[up-main]",t,"link[rel][type]","link[rel=preload][href]","link[rel=preconnect][href]","link[rel=prefetch][href]","link[rel]","meta[property]","*[name]","form[action]","a[href]","[class]","[up-flashes]","form"],verifyDerivedTarget:!0,renderOptions:{hungry:!0,keep:!0,saveScroll:!0,saveFocus:!0,focusVisible:"auto",abort:"target",failOptions:!0,feedback:!0},navigateOptions:{cache:"auto",revalidate:"auto",fallback:!0,focus:"auto",scroll:"auto",history:"auto",peel:"dismiss"},reloadOptions:{target:":main",scroll:"keep",focus:"keep"},match:"region",autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","keep","target-if-lost"],autoScroll:["hash","layer-if-main"],autoRevalidate:t=>t.expired,skipResponse:s,renderableResponse:t=>t.isHTML(),normalizeKeepHTML:d}));function s({response:t,expiredResponse:e}){return!t.text||t.text===(null==e?void 0:e.text)}function o(t,e={}){return t=b(t,e),r.closestAttr(t,"up-source")}function u(t){return i.normalizeURL(t,{hash:!1})}function a(t){let e=r.closestAttr(t,"up-time");if(e&&"false"!==e)return/^\d+$/.test(e)&&(e=1e3*Number(e)),new Date(e)}function c(t){let e=r.closestAttr(t,"up-etag");if(e&&"false"!==e)return e}i.delegate(n,["mainTargets"],()=>up.layer.config.any);const l=up.mockable((...t)=>{let e=k(t);return new up.RenderJob(e).execute()}),h=up.mockable((...t)=>{const e=k(t);return l(Object.assign(Object.assign({},e),{navigate:!0}))});function p({oldElement:t,newElement:e,newData:n,renderOptions:i}){const r=["Keeping fragment %o",t],s=up.script.callbackAttr(t,"up-on-keep",{expandObject:["newFragment","newData"]});return up.emit(t,"up:fragment:keep",{log:r,callback:s,newFragment:e,newData:n,renderOptions:i})}function f(t,e=m(t)){var r;return null!==(r=t.upKeepIdentity)&&void 0!==r?r:t.upKeepIdentity=i.copy(function(t,e){return"same-html"===e?n.normalizeKeepHTML(t.outerHTML):"same-data"!==e||up.data(t)}(t,e))}function d(t){return(t=r.removeAttrsFromHTML(t,["up-etag","up-source","up-time","nonce",...up.script.config.nonceableAttributes])).replace(/^[ \t]+/gm,"")}function m(t){return r.booleanOrStringAttr(t,"up-keep")}function g(t){return!t.closest(".up-destroying")}function v(t){return t.isConnected&&g(t)}function b(...t){let[e,n,s]=w(t);return i.isElementLike(n)?r.get(n):e?y(e,n,s):new up.FragmentFinder(Object.assign({selector:n},i.pick(s,["layer","match","origin","destroying"]))).find()}function y(...t){let[e,n,i]=w(t);return new up.Selector(n,e,i).firstDescendant(e)}function w(t){return i.args(t,"val","val","options")}function _(...t){let[e,n,r]=w(t);return i.isElement(n)?[n]:i.isList(n)?n:new up.Selector(n,e,r).descendants(e)}function O(t,e,n={}){return new up.Selector(e,t,n).subtree(t)}function k(t){const e=i.parseArgIntoOptions(t,"target");return i.isElement(e.target)&&(e.origin||(e.origin=e.target)),e}up.macro("[up-keep]",t=>f(t));const S=/^(onFail|on|fail)?(.+)$/;function E(t,e){return i.presence(t,i.isString)||j(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 j(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 C(t))c+=r.classSelector(e);else c+=r.attrSelector(e,n)}return i&&(c+=i),c}(t,e)}catch(t){if(t instanceof up.CannotParse)return e;throw t}}(t,s);if(o&&function(t,e,i={}){var r;let s=null!==(r=i.verify)&&void 0!==r?r:n.verifyDerivedTarget;return!v(e)||!s||up.fragment.get(t,Object.assign({layer:e},i))===e}(o,t,e))return o})}function C(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 x=/:main\b/,F=/:layer\b/,T=/:origin\b/;function P(t){return x.test(t)}function R(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"),P(s)){let n=L(e),i=up.layer.mainTargets(n).map(t=>s.replace(x,t));t.unshift(...i)}else if(F.test(s)){if("new"===n||"opening"===n.state)continue;let i=E(n.getFirstSwappableElement(),e);t.unshift(s.replace(F,i))}else i.isElementLike(s)?r.push(E(s,e)):i.isString(s)&&r.push(D(s,e))}return i.uniq(r)}function L({layer:t,mode:e}){return"new"===t?e||up.fail('Must pass a { mode } option together with { layer: "new" }'):t.mode}function A(t,{origin:e}={}){return t.replace(T,function(n){if(e)return E(e);up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',n,t)})}function D(t,e){return i.isString(t)?(up.migrate.resolveOrigin||A)(t,e):t}function $(t){return i.getComplexTokens(t)}function M(t,e,n={}){if(t=r.get(t),i.isElement(e)){let n=j(e);return n&&t.matches(n)}return new up.Selector(e,t,n).matches(t)}const H=/^([\w-]+|\*)?(#|\.|[:[][a-z-]{3,})/;function N(t,{origin:e,originLayer:n,data:s,htmlParser:o=r.createNodesFromHTML}={}){if(i.isString(t)&&H.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=B(t,s,{htmlParser:o})),i.wrapList(t)}function B(t,e={},{origin:n,htmlParser:i}={}){var s;let o=b(t,{origin:n})||up.fail("Template not found: %o",t),u=null!==(s=up.emit(o,"up:template:clone",{data:e,nodes:null,log:["Using template %o",t]}).nodes)&&void 0!==s?s:function(t,e=r.createNodesFromHTML){return e(t.innerHTML)}(o,i);for(let t of u)t.upTemplateData=e;return u}let I=0,q=i.cleaner("fifo");function U(t){try{return I++,t()}finally{0===--I&&q.clean()}}return up.on("up:framework:boot",function(){const{documentElement:t}=document;if(up.hello(t),t.setAttribute("up-source",u(location.href)),!up.browser.canPushState())return up.warn("Cannot push history changes. Next render pass with history will load a full page.")}),{config:n,reload:function(...t){var e,s;const u=Object.assign(Object.assign({},n.reloadOptions),k(t));u.target||(u.target=":main");const h=b(u.target,u);return u.url||(u.url=o(h)),u.headers=i.merge(u.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}(h)),(u.keepData||r.booleanAttr(h,"up-keep-data"))&&(u.data=up.data(h)),null===(s=(e=up.migrate).postprocessReloadOptions)||void 0===s||s.call(e,u),l(u)},destroy:function(...t){var e,n;const i=k(t),r=b(i.target,i);return r&&new up.Change.DestroyFragment(Object.assign(Object.assign({},i),{element:r})).execute(),null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.destroy()")},render:l,navigate:h,get:b,getFirstDescendant:y,all:_,subtree:O,contains:function(t,e){return i.isElement(e)?r.contains(t,e)&&up.layer.get(t).contains(e):O(t,e).length>0},closest:function(t,e,n){return new up.Selector(e,t,n).closest(t)},source:o,normalizeSource:u,visit:function(t,e){return h(Object.assign(Object.assign({},e),{url:t}))},markAsDestroying:function(t){t.classList.add("up-destroying"),t.setAttribute("inert","")},emitInserted:function(t,e){if(t.upInserted)return;t.upInserted=!0;const n=["Inserted fragment %o",t];return U(()=>up.emit(t,"up:fragment:inserted",Object.assign(Object.assign({},e),{log:n})))},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 U(()=>up.emit(r,"up:fragment:destroyed",{fragment:t,parent:r,log:i}))},emitKeep:p,emitKept:function({oldElement:t,newElement:e,newData:n}){return up.emit(t,"up:fragment:kept",{log:!1,newFragment:e,newData:n})},keepPlan:function(t){if(!1===t.keep)return;const{oldElement:e,newElement:n}=t;let s,o=m(e);if(!o)return;let u=up.fragment.tryToTarget(e);u||up.warn("[up-keep]","Cannot keep untargetable %o",e);const a={layer:t.layer};if(s=t.descendantsOnly?up.fragment.get(n,u,a):r.subtreeFirst(n,u,a),!s)return;if(!1===m(s))return;let c=f(e,o),l=f(s,o);if(!i.isEqual(c,l))return;const h={oldElement:e,newElement:s,newData:up.script.data(s),renderOptions:t};return p(h).defaultPrevented?void 0:h},defaultNormalizeKeepHTML:d,successKey:function(t){let e=S.exec(t);if(e){let[t,n,r]=e;switch(n){case"onFail":return"on"+i.upperCaseFirst(r);case"fail":return i.lowerCaseFirst(r)}}},failKey:function(t){let e=S.exec(t);if(e){let[t,n,r]=e;switch(n){case"on":return"onFail"+i.upperCaseFirst(r);case void 0:return"fail"+i.upperCaseFirst(r)}}},expandTargets:R,resolveOrigin:D,toTarget:E,tryToTarget:j,isTargetable:function(t,e){return!!j(t,e)},matches:M,matchSelectorMap:function(t,e,{layer:n=t}={}){let r=[];if(e&&t)for(let[s,o]of Object.entries(e))i.isDefined(o)&&M(t,s,{layer:n})&&r.push(o);return r},hasAutoHistory:function(t,e){let i=R(n.autoHistoryTargets,{layer:e}).join();for(let e of t)if(r.subtree(e,i).length)return!0;return up.puts("up.render()","Will not auto-update history because fragment doesn't contain a selector from up.fragment.config.autoHistoryTargets"),!1},time:a,etag:c,shouldRevalidate:function(t,e,r={}){return t.fromCache&&i.evalAutoOption(r.revalidate,n.autoRevalidate,e)},abort:function(...t){let e,n,r=k(t),{reason:s,newLayer:o,jid:u}=r;if(r.target)n=_(r.target,r),e=t=>t.isBoundToSubtrees(n),s||(s="Aborting requests within fragment");else{let t=up.layer.getAll(r);n=i.map(t,"element"),e=e=>e.isBoundToLayers(t),s||(s="Aborting requests within "+t.join(", "))}up.network.abort(t=>t.abortable&&e(t),Object.assign(Object.assign({},r),{reason:s}));for(let t of n)up.emit(t,"up:fragment:aborted",{reason:s,newLayer:o,jid:u,log:s})},onAborted:function(t,e){return up.event.onClosest(t,"up:fragment:aborted",e)},onKept:function(t,e){return up.event.onClosest(t,"up:fragment:kept",e)},onFirstIntersect:function(t,e,{margin:n=0}={}){if(r.isIntersectingWindow(t,{margin:n}))return void e();let i=new IntersectionObserver(function(t){for(let n of t)if(n.isIntersecting)return s(),void e()},{rootMargin:`${n}px`}),s=()=>i.disconnect();i.observe(t),up.destructor(t,s)},splitTarget:$,parseTargetSteps:function(t,e={}){var n;let i=e.defaultPlacement||"swap",r=null!==(n=e.defaultMaybe)&&void 0!==n&&n,s=[],o=$(t);for(let t of o){if(":none"===t)continue;let n=i,o=r;t=t.replace(/::?(before|after|content)\b/,(t,e)=>(n=e,"")),t=t.replace(/:maybe\b/,()=>(o=!0,""));const u=Object.assign(Object.assign({},e),{selector:t,placement:n,maybe:o,originalRenderOptions:e});s.push(u)}return s},isAlive:v,isNotDestroying:g,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:P,insertTemp:function(...t){let[e,n="beforeend",s]=i.args(t,"val",i.isAdjacentPosition,"val"),o=N(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:N,cloneTemplate:B,trackSelector:function(...t){let e=i.args(t,"val","options","callback");return new up.SelectorTracker(...e).start()},mutate:U,afterMutate:function(t){0===I?t():q(t)}}}(),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)},5313(){up.framework=function(){let t="evaling";function e({mode:e="manual"}={}){if("configuring"!==t)return void console.error("Unpoly has already booted");let i=n();i?console.error("Unpoly cannot boot: %s",i):(t="booting",up.emit("up:framework:boot",{mode:e,log:!1}),t="booted",up.emit("up:framework:booted",{mode:e,log:!1}))}function n(){for(let t of["Promise","DOMParser","FormData","reportError"])if(!window[t])return`Browser doesn't support the ${t} API`;if("BackCompat"===document.compatMode)return"Browser is in quirks mode (missing DOCTYPE?)";for(let t of[":is(*)",":has(*)"])if(!CSS.supports(`selector(${t})`))return`Browser doesn't support the ${t} selector`}return{onEvaled:function(){var n;up.emit("up:framework:evaled",{log:!1}),(null===(n=document.currentScript)||void 0===n?void 0:n.async)||document.querySelector("[up-boot=manual]:is(html, script)")||"complete"===document.readyState?console.debug("Call up.boot() after you have configured Unpoly"):document.addEventListener("DOMContentLoaded",()=>e({mode:"auto"})),t="configuring"},boot:e,startExtension:function(){if("configuring"!==t)throw new Error("Unpoly extensions must be loaded before booting");t="evaling"},stopExtension:function(){t="configuring"},reset:function(){up.emit("up:framework:reset",{log:!1})},get evaling(){return"evaling"===t},get booted(){return"booted"===t},get beforeBoot(){return"booting"!==t&&"booted"!==t},isSupported:function(){return!n()}}}(),up.boot=up.framework.boot},6101(){up.history=function(){const t=up.util,e=up.element,n=new up.Config(()=>({enabled:!0,updateMetaTags:!0,restoreTargets:["body"],metaTagSelectors:["meta","link[rel=alternate]","link[rel=canonical]","link[rel=icon]","[up-meta]",'script[type="application/ld+json"]'],noMetaTagSelectors:["meta[http-equiv]","[up-meta=false]","meta[name=csp-nonce]"]}));let i,r,s,o=new up.FIFOCache({capacity:100,normalizeKey:h});function u(){return t.normalizeURL(location.href)}function a(t,e){try{s=t,e()}finally{s=void 0}}function c(t){var e,n;let{reason:o,alreadyHandled:a,pauseTracking:c}=s||t;if(c)return;let l=u();if(v()?g(l):m(l)&&b(),r!==l){i=r,r=l,"detect"===o&&(o=h(l)===h(i)?"hash":"pop");let t=!a&&m(l),s=up.event.build("up:location:changed",{reason:o,location:l,previousLocation:i,alreadyHandled:a,willHandle:t,log:`New location is ${l}`});null===(n=(e=up.migrate).prepareLocationChangedEvent)||void 0===n||n.call(e,s),o&&(up.emit(s),y(s))}}function l(t){return(null==t?void 0:t.split(/(?=#)/))||[]}function h(t){return l(t)[0]}function p(e,n){return t.matchURLs(e,location.href,Object.assign({hash:!0},n))}function f(t,e){p(t)||d("pushState",t,e)}function d(t,e,i){g(e),n.enabled&&a(i,function(){history[t](null,{up:!0},e)})}function m(t){return!!o.get(t)}function g(e=u()){e=t.normalizeURL(e),o.set(e,!0)}function v(){var t;return null===(t=history.state)||void 0===t?void 0:t.up}function b(){let{state:e}=history;v()||(t.isBlank(e)||t.isObject(e))&&a({pauseTracking:!0},function(){history.replaceState(Object.assign(Object.assign({},e),{up:!0}),"")})}function y(t){t.alreadyHandled||(t.willHandle?"pop"===t.reason?(up.viewport.saveFocus({location:t.previousLocation}),up.viewport.saveScroll({location:t.previousLocation}),function(t){up.error.muteUncriticalRejection(up.render({guardEvent:up.event.build("up:location:restore",{location:t,log:`Restoring location ${t}`}),url:t,target:n.restoreTargets,fail:!1,history:!0,location:t,peel:!0,layer:"root",cache:"auto",revalidate:"auto",saveScroll:!1,scroll:["restore","auto"],saveFocus:!1,focus:["restore","auto"]}))}(t.location)):"hash"===t.reason&&up.viewport.revealHash(location.hash,{strong:!0}):up.puts("up.history","Ignoring history entry owned by foreign script"))}function w(t=document.head){return t.querySelectorAll(n.selector("metaTagSelectors"))}return up.on("up:framework:boot",function({mode:t}){c({reason:null,alreadyHandled:!0}),function(){const t=history.pushState;history.pushState=function(...e){t.apply(this,e),c({reason:"push",alreadyHandled:!0})};const e=history.replaceState;history.replaceState=function(...t){e.apply(this,t),c({reason:"replace",alreadyHandled:!0})}}(),"GET"===up.protocol.initialRequestMethod()&&(b(),g()),"auto"===t&&up.viewport.revealHash(location.hash,{strong:!0,focus:!0})}),up.on(window,"hashchange, popstate",()=>{c({reason:"detect",alreadyHandled:!1})}),up.on("up:click",'a[href*="#"]',function(e,n){var i;if(e.defaultPrevented)return;if(up.event.isModified(e))return;let[r,s]=l(up.layer.current.location),[o,u]=l(t.normalizeURL(n)),a=n.getAttribute("href");if(r!==o&&!a.startsWith("#"))return;let c=null!==(i=n.getAttribute("up-scroll-behavior"))&&void 0!==i?i:"auto",h=up.layer.get(n),p=up.viewport.revealHashFn(u,{layer:h,behavior:c,focus:!0});p&&(up.event.halt(e),up.log.putsEvent(e),u!==s&&h.showsLiveHistory()&&f(r+u,{reason:"hash",alreadyHandled:!0}),p())}),up.macro("[up-back]",function(t){i&&(e.setMissingAttrs(t,{"up-href":i,"up-scroll":"restore"}),t.removeAttribute("up-back"),up.link.makeFollowable(t))}),up.on("up:framework:reset",function(){i=void 0,r=void 0,s=void 0,o.clear(),c({reason:null,alreadyHandled:!0}),g()}),{config:n,push:f,replace:function(t,e){d("replaceState",t,e)},get location(){return u()},get previousLocation(){return i},isLocation:p,findMetaTags:w,updateMetaTags:function(t){let e=w();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)},refineOption:function(e,n){return!1===e||t.isString(e)?e:n},options:function(e){return t.pick(e,["location","title","metaTags","lang"])}}}()},1420(t,e,n){var i=this&&this.bt||function(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,u)}a((i=i.apply(t,e||[])).next())})};n(7339);const r=up.util;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",dismissible:!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",dismissible:"outside key",trapFocus:!1},foreignOverlaySelectors:["dialog"]};for(let n of t)e[n.mode].Class=n;return e});let n=null,s=[];function o(t){return"root"===t?[e.root,e.any]:[e[t],e.overlay,e.any]}function u(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(),s=r.filter(s,"isDefault")});const a={config:e,mainTargets:function(t){return r.flatMap(o(t),"mainTargets")},open:u,build:function(t,i){var s;const{mode:u}=t,{Class:a}=e[u],c=o(u).toReversed();let l=up.migrate.handleLayerConfig;return l&&c.forEach(l),null!==(s=t.openAnimation)&&void 0!==s||(t.openAnimation=r.pluckKey(t,"animation")),t=r.mergeDefined(...c,{mode:u,stack:n},t),i&&(t=i(t)),new a(t)},ask:function(t){return new Promise(function(e,n){u(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)},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(a,["get","getAll","root","overlays","current","front","sync","count","dismissOverlays"],()=>n),r.delegate(a,["accept","dismiss","isRoot","isOverlay","isFront","on","off","emit","parent","history","location","mode","context","element","contains","size","affix"],()=>n.current),a}()},181(t,e,n){n(4598),up.link=function(){const t=up.util,e=up.element;let n=null,i=null,r=null;const s="[up-content], [up-fragment], [up-document]",o=`${s}, [up-target], [up-layer], [up-transition], [up-preload]`,u=new up.Config(()=>({followSelectors:["[up-follow]",`a:is(${o})`],noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="javascript:"]','a[href^="mailto:"]','a[href^="tel:"]',`a[href^="#"]:not(${s})`,e.crossOriginSelector("href"),e.crossOriginSelector("up-href")],instantSelectors:["[up-instant]"],noInstantSelectors:["[up-instant=false]","[onclick]"],preloadSelectors:["[up-preload]"],noPreloadSelectors:["[up-preload=false]"],clickableSelectors:["[up-clickable]","[up-follow]","[up-emit]","[up-accept]","[up-dismiss]",`a:is(${o})`],noClickableSelectors:["[up-clickable=false]","a[href], button"],preloadDelay:90})),a=up.mockable(function(t,e,n){return up.render(l(t,e,n))});function c(e,n,i){n=t.options(n);const r=new up.OptionsParser(e,n,Object.assign(Object.assign({},i),{fail:!1}));return n.url=function(t,e={}){const n=e.url||t.getAttribute("up-href")||t.getAttribute("href");if("#"!==n)return n}(e,n),n.method=p(e,n),r.json("headers"),r.json("params"),r.booleanOrString("cache"),r.booleanOrString("expireCache"),r.booleanOrString("evictCache"),r.booleanOrString("revalidate"),r.booleanOrString("abort"),r.boolean("abortable"),r.boolean("background"),r.string("contentType"),r.booleanOrNumber("lateDelay"),r.number("timeout"),r.booleanOrString("fail"),n}function l(e,n,i){var r;e=up.fragment.get(e),n=t.options(n);const s=new up.OptionsParser(e,n,Object.assign({fail:!0},i));return s.include(c),n.origin||(n.origin=e),s.boolean("navigate",{default:!0}),s.string("confirm",{attr:["up-confirm","data-confirm"]}),s.string("target"),s.booleanOrString("fallback"),s.string("match"),s.string("document"),s.string("fragment"),s.string("content"),s.boolean("keep",{attr:"up-use-keep"}),s.boolean("hungry",{attr:"up-use-hungry"}),s.json("data",{attr:"up-use-data"}),s.json("dataMap",{attr:"up-use-data-map"}),s.renderCallback("onLoaded"),s.renderCallback("onRendered"),s.renderCallback("onFinished"),s.renderCallback("onOffline"),s.renderCallback("onError"),s.booleanOrString("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("dismissible"),s.renderCallback("onOpened"),s.renderCallback("onAccepted"),s.renderCallback("onDismissed"),s.string("acceptEvent"),s.string("dismissEvent"),s.string("acceptFragment"),s.string("dismissFragment"),s.string("acceptLocation"),s.string("dismissLocation"),s.booleanOrString("closeAnimation"),s.string("closeEasing"),s.number("closeDuration"),s.include(up.status.statusOptions),s.booleanOrString("focus"),s.booleanOrString("focusVisible"),s.boolean("saveScroll"),s.boolean("saveFocus"),s.booleanOrNumberOrString("scroll"),s.json("scrollMap"),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 h(t,e){let n=function(t){if(!b(t))return"Will not preload an unsafe link"}(t=up.fragment.get(t));if(n)return Promise.reject(new up.Error(n));const i=up.event.build("up:link:preload",{log:["Preloading link %o",t]});return a(t,Object.assign(Object.assign(Object.assign(Object.assign({abort:!1,abortable:!1,background:!0,cache:!0},e),up.RenderOptions.NO_INPUT_INTERFERENCE),up.RenderOptions.NO_PREVIEWS),{guardEvent:i,preload:!0}))}function p(e,n={}){return t.normalizeMethod(n.method||e.getAttribute("up-method")||e.getAttribute("data-method"))}function f(t){return t=up.fragment.get(t),u.matches(t,"followSelectors")}function d(t){f(t)||t.setAttribute("up-follow","")}function m(t,e){if(t.defaultPrevented)return!1;const n=`a, [up-follow], ${up.form.fieldSelector()}`,i=t.target.closest(n);return!i||i===e}function g(t){const e=t.closest(u.selector("instantSelectors"));return e&&(n=e,!(u.matches(n,"noInstantSelectors")||u.matches(n,"noFollowSelectors")));var n}function v(t){let e=["clientX","clientY","button",...up.event.keyModifiers];const n=up.event.fork(t,"up:click",e);up.emit(t.target,n,{log:!1})}function b(t){const e=p(t);return up.network.isSafeMethod(e)}function y(t,n,i){switch(t){case"insert":i();break;case"reveal":{let t=e.numberAttr(n,"up-intersect-margin");up.fragment.onFirstIntersect(n,i,{margin:t});break}case"hover":new up.LinkFollowIntent(n,i)}}function w(t,e){let n=up.event.build("up:deferred:load",{log:["Loading deferred %o",t]}),i=Object.assign({navigate:!1,guardEvent:n},e);return a(t,i,{defaults:{target:":origin",cache:"auto",revalidate:"auto",feedback:!0}})}return up.macro(u.selectorFn("clickableSelectors"),function(t){let n=t.matches("a, [up-follow]")?"link":"button";e.setMissingAttrs(t,{tabindex:"0",role:n,"up-clickable":""}),t.addEventListener("keydown",function(e){if("Enter"===e.key||"button"===t.role&&"Space"===e.key)return v(e)})}),up.attribute("up-defer",{defaultValue:"insert"},function(t,e){y(e,t,e=>up.error.muteUncriticalRejection(w(t,e)))}),up.on("up:click",u.selectorFn("followSelectors"),function(t,e){m(t,e)&&(up.event.halt(t,{log:!0}),up.focus(e,{preventScroll:!0}),up.error.muteUncriticalRejection(a(e)))}),up.attribute("up-expand",{defaultValue:"a, [up-href]",macro:!0},function(t,n){let i=e.get(t,n);i&&(e.setMissingAttrs(t,Object.assign({"up-href":e.attr(i,"href")},e.upAttrs(i))),i.upExpandedPair=t.upExpandedPair=[t,i],e.addClasses(t,e.upClasses(i)),d(t))}),up.compiler(u.selectorFn("preloadSelectors"),function(n){if(!function(t){return!up.browser.canPushState()||!f(t)||!function(t){const e=c(t);if(e.url)return null==e.cache&&(e.cache="auto"),e.basic=!0,new up.Request(e).willCache()}(t)}(n)){let i=t=>up.error.muteUncriticalRejection(h(n,t)),r=e.booleanOrStringAttr(n,"up-preload");(!0===r||t.isUndefined(r))&&(r="hover"),y(r,n,i)}}),up.on("up:framework:reset",function(){n=null,i=null,r=null}),{follow:a,followOptions:l,requestOptions:c,preload:h,makeFollowable:d,isSafe:b,isFollowable:f,shouldFollowEvent:m,convertClicks:function(t){t.on("click",function(e,n){up.event.isModified(e)||(g(n)&&r===n?up.event.halt(e):("key"===up.event.inputDevice||up.event.isSyntheticClick(e)||t.wasHitByMouseEvent(e)&&(!i||i===e.target))&&v(e),i=null,r=null)}),t.on("touchstart",{passive:!0},function(t,e){n=e}),t.on("mousedown",function(t,e){up.event.isModified(t)||(i=e,g(e)&&!function(t){let e=t.target;return n===e&&e.closest("[href]")}(t)&&(r=e,v(t)),n=null)})},config:u,loadDeferred:w}}(),up.follow=up.link.follow,up.deferred={load:up.link.loadDeferred}},367(){up.log=function(){const t=up.util,e=new up.LogConfig;function n(t,e,n,...r){i(t,e,"",n,...r)}function i(n,i,r,s,...o){s&&(e.format?console[n](`%c${i}%c ${s}`,"color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block;"+r,"",...o):console[n](`[${i}] ${t.sprintf(s,...o)}`))}let r;return up.on("up:framework:boot",function(){if(!e.banner)return;const t=` __ _____ ___ ___ / /_ __\n/ // / _ \\/ _ \\/ _ \\/ / // / ${up.version}\n\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n`;let n="";up.migrate.loaded||(n+="Load unpoly-migrate.js to polyfill deprecated APIs.\n\n"),e.enabled?n+="Call `up.log.disable()` to disable logging for this session.":n+="Call `up.log.enable()` to enable logging for this session.";const i="color: #777777";e.format?console.log("%c"+t+"%c"+n,"font-family: monospace;"+i,i):console.log(t+n)}),{puts:function(...t){e.enabled&&n("log",...t)},putsEvent:function(t){if(e.enabled&&r!==t){r=t;let e=t.originalEvent||t,n="#5566cc";i("log",e.type,`color: white; border-color: ${n}; background-color: ${n}`,"Interaction on %o",e.target)}},error:(...t)=>n("error",...t),warn:(...t)=>n("warn",...t),config:e,enable:function(){e.enabled=!0},disable:function(){e.enabled=!1}}}(),up.puts=up.log.puts,up.warn=up.log.warn},6559(){up.migrate={config:{}}},9363(){up.mockable=function(t){if(window.jasmine){let e=t.name,n={[e]:t},i=function(){return n[e].apply(this,arguments)};return i.mock=()=>spyOn(n,e),i}return t}},2679(){var t=this&&this.bt||function(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,u)}a((i=i.apply(t,e||[])).next())})};up.motion=function(){const e=up.util,n=up.element,i=new up.MotionController("motion"),r=new up.Config(()=>({duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches}));let s=new up.Registry("animation",p),o=new up.Registry("transition",l);function u(t){return!n.isSingleton(t)}function a({duration:t,easing:e}){return{duration:r.enabled?null!=t?t:r.duration:0,easing:null!=e?e:r.easing}}function c(i,r,s){return t(this,arguments,void 0,function*(t,i,{duration:r,easing:s,finishedFrame:o}){let u,a=e.withRenamedKeys(i,e.kebabToCamelCase),c=t.animate([a],{duration:r,easing:s,fill:"forwards"}),l=()=>{c.finish(),n.setStyle(t,null!=o?o:i),c.cancel(),u()};u=up.on(t,"up:motion:finish",l),yield c.finished,l()})}function l(t){return d(t)?void 0:e.isFunction(t)?t:e.isArray(t)?h(...t):e.isString(t)&&t.includes("/")?h(...t.split("/")):o.get(t)}function h(t,n){if(!d(t)&&!d(n)){const i=p(t)||e.asyncNoop,r=p(n)||e.asyncNoop;return(t,e,n)=>Promise.all([i(t,n),r(e,n)])}}function p(t){return d(t)?void 0:e.isFunction(t)?t:e.isOptions(t)?(e,n)=>c(e,t,n):s.get(t)}const f=up.mockable(function(t,e){t.replaceWith(e)});function d(t){return!t||"none"===t}function m(t,n,i){s.put(t,function(t,r){return t.style.opacity=e.evalOption(n,t),c(t,{opacity:i},r)})}function g(t,e){return{transform:`translate(${t}px, ${e}px)`}}function v(t){return n.setStyle(t,{transform:"translate(0, 0)"}),t.getBoundingClientRect()}function b(t,e){const i=`move-to-${t}`,r=`move-from-${t}`;s.put(i,function(t,n){const i=v(t);return c(t,e(i),n)}),s.put(r,function(t,i){const r=v(t),s=e(r);return n.setStyle(t,s),c(t,{transform:"translate(0, 0)"},Object.assign(Object.assign({},i),{finishedFrame:{transform:""}}))})}return up.on("up:framework:boot",function(){r.enabled||up.puts("up.motion","Animations are disabled")}),m("fade-in",0,1),m("fade-out",function(t){return n.style(t,"opacity")},0),b("top",function(t){return g(0,-(t.top+t.height))}),b("bottom",function(t){return g(0,up.viewport.rootHeight()-t.top)}),b("left",function(t){return g(-(t.left+t.width),0)}),b("right",function(t){return g(up.viewport.rootWidth()-t.left,0)}),o.put("cross-fade",["fade-out","fade-in"]),o.put("move-left",["move-to-left","move-from-right"]),o.put("move-right",["move-to-right","move-from-left"]),o.put("move-up",["move-to-top","move-from-bottom"]),o.put("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:reset",function(){i.reset()}),{morph:function(e,r,s){return t(this,arguments,void 0,function*(e,r,s,{duration:o,easing:c,afterInsert:h,beforeRemove:p,afterRemove:d}={}){e=up.fragment.get(e),r=up.fragment.get(r);const m=up.error.guardFn(l(s)),g=a({duration:o,easing:c});yield i.startFunction([r,e],function(i){return t(this,arguments,void 0,function*({nested:t}){if(m&&u(e))if(t)yield m(e,r,g);else{const t=up.viewport.get(e),i=t.scrollTop,s=up.viewport.absolutize(e,{afterMeasure:()=>n.insertBefore(e,r)});null==h||h();const o=t.scrollTop;s.moveBounds(0,o-i),yield m(e,r,g),null==p||p(),s.bounds.remove(),null==d||d()}else null==p||p(),f(e,r),null==h||h(),null==d||d()})})})},animate:function(e,n){return t(this,arguments,void 0,function*(e,n,{duration:r,easing:s,onFinished:o}={}){e=up.fragment.get(e);const c=up.error.guardFn(p(n)),l=a({duration:r,easing:s});yield i.startFunction([e],function(){return t(this,void 0,void 0,function*(){if(c&&u(e))try{yield c(e,l)}finally{null==o||o()}else null==o||o()})})})},finish:function(t){var e,n;return t=up.fragment.get(t),i.finish(t),null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.motion.finish()")},transition:o.put,animation:s.put,config:r,isNone:d,swapElementsDirectly:f,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},9399(t,e,n){n(7412);const i=up.util;up.network=function(){const t=new up.Config(()=>({concurrency:6,wrapMethod:!0,cacheSize:70,cacheExpireAge:15e3,cacheEvictAge:54e5,lateDelay:400,fail:t=>(t.status<200||t.status>299)&&304!==t.status,autoCache:t=>t.isSafe(),expireCache:t=>!t.isSafe(),evictCache:!1,progressBar:!0,timeout:9e4})),e=new up.Request.Queue,n=new up.Request.Cache;let r=null;function s(r){var o,u,a,c;n.expire(null!==(u=null!==(o=r.expireCache)&&void 0!==o?o:i.evalOption(t.expireCache,r))&&void 0!==u&&u),n.evict(null!==(c=null!==(a=r.evictCache)&&void 0!==a?a:i.evalOption(t.evictCache,r))&&void 0!==c&&c),function(t){let i;if(t.willCache()&&(i=n.get(t)))return up.puts("up.request()","Re-using previous request to %s",t.description),t.background||e.promoteToForeground(i),i.mergeIfUnsent(t),n.track(i,t,{onIncompatible:s}),!0}(r)||function(t){(function(t){t.willCache()&&(n.put(t),t.onLoading=()=>n.reindex(t)),i.always(t,function(e){var i,r;n.expire(null!==(i=e.expireCache)&&void 0!==i&&i,{except:t}),n.evict(null!==(r=e.evictCache)&&void 0!==r&&r,{except:t});let s=e instanceof up.Response,o=!s,u=s&&e.ok,a=s&&!e.ok,c=s&&e.none,l=s&&e.redirectRequest;a?n.evict(t.url):o||c?n.evict(t):u&&(n.get(t)&&n.put(t),l&&(l.willCache()||n.get(l))&&n.put(l))})})(t),e.asap(t)}(r)}function o(...t){var n,i;null===(i=(n=up.migrate).preprocessAbortArgs)||void 0===i||i.call(n,t),e.abort(...t)}return up.on("up:network:late",function(){i.evalOption(t.progressBar)&&(r=new up.ProgressBar)}),up.on("up:network:recover",function(){null==r||r.conclude()}),up.on("up:framework:reset",function(){o(),e.reset(),n.reset(),null==r||r.destroy(),r=null}),{request:function(...t){const e=function(t){var e,n;let r=i.parseArgIntoOptions(t,"url");return null===(n=(e=up.migrate).handleRequestOptions)||void 0===n||n.call(e,r),r}(t),n=new up.Request(e);return s(n),n},cache:n,isBusy:function(){return e.isBusy()},isSafeMethod:function(t){return i.contains(["GET","OPTIONS","HEAD"],i.normalizeMethod(t))},config:t,abort:o,queue:e,loadPage:function(t){new up.Request(t).loadPage()}}}(),up.request=up.network.request,up.cache=up.network.cache},9013(){up.protocol=function(){const t=up.util,e=up.element,n=function(t){return"X-Up"+t.replace(/(^.|[A-Z])/g,t=>"-"+t.toUpperCase())},i=function(e,i,r=t.identity){let s=e.getResponseHeader(n(i));if(s)return r(s)};function r(t){return"false"!==t&&t}const s=t.memoize(function(){return t.normalizeMethod(up.browser.popCookie("_up_method"))}),o=new up.Config(()=>({methodParam:"_method",csrfParam:()=>e.metaContent("csrf-param"),csrfToken:()=>e.metaContent("csrf-token"),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)},openLayerFromXHR:function(e){return i(e,"openLayer",t.parseRelaxedJSON)},acceptLayerFromXHR:function(e){return i(e,"acceptLayer",t.parseRelaxedJSON)},contextFromXHR:function(e){return i(e,"context",t.parseRelaxedJSON)},dismissLayerFromXHR:function(e){return i(e,"dismissLayer",t.parseRelaxedJSON)},eventPlansFromXHR:function(e){return i(e,"events",t.parseRelaxedJSON)},expireCacheFromXHR:function(t){var e,n;return i(t,"expireCache")||(null===(n=(e=up.migrate).clearCacheFromXHR)||void 0===n?void 0:n.call(e,t))},evictCacheFromXHR:function(t){return i(t,"evictCache",r)},csrfHeader:function(){return t.evalOption(o.csrfHeader)},csrfParam:function(){return t.evalOption(o.csrfParam)},csrfToken:function(){return t.evalOption(o.csrfToken)},initialRequestMethod:s,headerize:n,wrapMethod:function(t,e){return e.add(o.methodParam,t),"POST"}}}()},3194(){up.radio=function(){const t=up.element,e=new up.Config(()=>({hungrySelectors:["[up-hungry]"],noHungrySelectors:["[up-hungry=false]"],pollInterval:3e4}));return up.attribute("up-poll",function(t){up.FragmentPolling.forFragment(t).onPollAttributeObserved()}),up.macro("[up-flashes]",function(e){t.setMissingAttrs(e,{"up-hungry":"","up-if-layer":"subtree","up-keep":"",role:"alert"}),e.addEventListener("up:fragment:keep",function(e){t.isEmpty(e.newFragment)||e.preventDefault()})}),{config:e,hungrySteps:function(n){let{hungry:i,origin:r,layer:s,meta:o}=n,u={current:[],other:[]};if(!i)return u;let a=e.selector("hungrySelectors");const c=[s,...s.ancestors,...s.descendants];for(let e of c){let i=up.fragment.all(e.element,a,{layer:e});for(let a of i){let i=up.fragment.tryToTarget(a,{origin:r});if(!i){up.warn("[up-hungry]","Ignoring untargetable fragment %o",a);continue}let c=t.attr(a,"up-if-layer"),l=c?up.layer.getAll(c,{baseLayer:e}):[e],h=up.motion.motionOptions(a),p=up.event.build("up:fragment:hungry",{log:!1}),f=up.script.callbackAttr(a,"up-on-hungry",{expandObject:["newFragment","renderOptions"]}),d=Object.assign(Object.assign({selector:i,oldElement:a,layer:e,origin:r},h),{placement:"swap",keep:!0,maybe:!0,meta:o,selectEvent:p,selectCallback:f,originalRenderOptions:n});l.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}}}()},4372(){!function(){function t(t,e,n){if(t.hasAttribute(e)){let i=t.getAttribute(e);up.element.setMissingAttr(t,n,i),t.removeAttribute(e)}}function e(e,n){up.macro(`:is([data-confirm], [data-method]):is(${e})`,function(e){var i;(window.Rails||(null===(i=window.jQuery)||void 0===i?void 0:i.rails))&&n(e)&&(t(e,"data-confirm","up-confirm"),t(e,"data-method","up-method"))})}e("a[href], [up-href]",t=>up.link.isFollowable(t)),e("form, input[type=submit], button[type=submit], button:not([type])",t=>up.form.isSubmittable(up.form.get(t)))}()},3106(){up.script=function(){const t=up.util,e=up.element,n=new up.Config(()=>({cspNonce:()=>e.metaContent("csp-nonce"),cspWarnings:!0,scriptElementPolicy:"auto",evalCallbackPolicy:"auto",assetSelectors:["link[rel=stylesheet]","script[src]","[up-asset]"],noAssetSelectors:["[up-asset=false]"],nonceableAttributes:["up-watch","up-on-keep","up-on-hungry","up-on-opened","up-on-accepted","up-on-dismissed","up-on-loaded","up-on-rendered","up-on-finished","up-on-error","up-on-offline"],scriptSelectors:["script:not([type])",'script[type="text/javascript"]','script[type="module"]','script[type="importmap"]'],noScriptSelectors:['script[type="application/ld+json"]']})),i={"[up-back]":-100,"[up-clickable]":-200,"[up-drawer]":-200,"[up-modal]":-200,"[up-cover]":-200,"[up-popup]":-200,"[up-tooltip]":-200,"[up-dash]":-200,"[up-flashes]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400,"[up-keep]":9999999999};let r=[],s=[];function o(e,n={}){let o=function(e,n){let[i,r,s]=u(e);return r=t.options(r,{selector:i,isDefault:up.framework.evaling,priority:0,batch:!1,rerun:!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],macros:[],insertedEvent:!1});else up.puts("up.compiler()","Compiler with priority (%s) was registered after booting Unpoly. Compiler will run for future fragments only.",e.selector);return e}function c(t,e={}){var n,i;t=up.fragment.get(t,e);let o=null!==(n=e.macros)&&void 0!==n?n:s,u=null!==(i=e.compilers)&&void 0!==i?i:r;return new up.HelloFragment(t,o,u,e).run()}function l(t=document.head){return t.querySelectorAll(n.selector("assetSelectors"))}function h(e){return t.map(e,p).join()}function p(t){return e.removeAttrsFromHTML(t.outerHTML,["nonce"])}function f(t,i=""){let r=n.selector("scriptSelectors",i);return e.subtree(t,r)}function d(e,{argNames:n=["event"],expandObject:i=!1}={}){return function(...r){if(i){let e=r[0];n=[...n,...i],r=[e,...Object.values(t.pick(e,i))]}const s=up.NonceableCallback.fromString(e),o={thisContext:this,argNames:n,argValues:r};return(new up.ScriptGate).evalCallback(s,o)}}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);if(r.length)if(n.isConnected)(n.upDestructors||(n.upDestructors=function(n){let i=t.cleaner();return i(e.addClassTemp(n,"up-can-clean")),i}(n))).guard(r);else{up.puts("up.destructor()","Immediately calling destructor for detached element (%o)",n);for(let t of r)up.error.guard(t,n)}},hello:c,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:l,assertAssetsOK:function(t,e){let{response:n}=e,i=l();h(i)!==h(t)&&up.event.assertEmitted("up:assets:changed",{oldAssets:i,newAssets:t,renderOptions:e,response:n})},block:function(t){for(let e of f(t))e.type="up-blocked-script"},adoptNewFragment:function(t,e){new up.ScriptGate(e).adoptNewFragment(t)},adoptRenderOptionsFromHeader:function(t,e){new up.ScriptGate(e).adoptRenderOptionsFromHeader(t)},adoptDetachedHeadAsset:function(t,e){new up.ScriptGate(e).adoptDetachedHeadAsset(t)},parseCallback:d,cspNonce:function(){return t.evalOption(n.cspNonce)},warnOfUnsafeCSP:function(t){new up.ScriptGate(t).warnOfUnsafeCSP()},callbackAttr:function(t,n,i){return e.parseAttr(t,n,e=>d(e,i).bind(t))},isScript:function(t){return n.matches(t,"scriptSelectors")},findScripts:f}}(),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},2771(){up.status=function(){const t=up.util,e=up.element,n=new up.Config(()=>({currentClasses:["up-current"],activeClasses:["up-active"],loadingClasses:["up-loading"],revalidatingClasses:["up-revalidating"],navSelectors:["[up-nav]","nav"],noNavSelectors:["[up-nav=false]"]}));let i=new up.Registry("preview");function r(t){return t.upCurrentURLs||(t.upCurrentURLs=new up.LinkCurrentURLs(t))}function s(i,s,{newLinks:o,anyLocationChanged:a}){let c=!a&&i.upNavLocations||function(n){let i=e.attr(n,"up-layer")||"origin",r=up.layer.getAll(i,{origin:n});return t.compact(r.map(u))}(i);if(o||!t.isEqual(i.upNavLocations,c)){for(let t of s){const i=r(t).isAnyCurrent(c);for(let e of n.currentClasses)t.classList.toggle(e,i);e.setAttrPresence(t,"aria-current","page",i)}i.upNavLocations=c}}function o(t,i){const r=n.selector("navSelectors"),o=e.around(t,r);for(let t of o)s(t,e.subtree(t,"a, [up-href]"),i)}function u(e){return t.matchableURL(e.location)}function a(t){return t.upExpandedPair||[t]}function c(t){if(t)return function(e){e.showPlaceholder(t)}}function l(e){return t.isFunction(e)?[e]:t.isString(e)?(n=e,t.map(t.parseScalarJSONPairs(n),([t,e])=>{let n=i.get(t);return function(i,r){return up.puts("[up-preview]","Showing preview %o",t),n(i,e||r)}})):t.isArray(e)?e.flatMap(l):[];var n}return up.on("up:compilers:before",(t,e)=>{o(e,{newLinks:!0,anyLocationChanged:!1})}),up.on("up:layer:location:changed up:layer:opened up:layer:dismissed up:layer:accepted",()=>{o(document.body,{newLinks:!1,anyLocationChanged:!0})}),{config:n,preview:i.put,resolvePreviewFns:l,runPreviews:function(e,i){let{bindLayer:r}=e,s=up.FocusCapsule.preserve(r),o=r.asCurrent(()=>function(e,i){let{fragment:r,fragments:s,origin:o}=e,u=t.cleaner(),h=t=>new up.Preview({fragment:t,request:e,renderOptions:i,cleaner:u}),p=h(r);p.run(l(i.preview)),p.run(c(i.placeholder)),p.run(function(e,i){if(e)return function(e){const{renderOptions:r}=e;r.expiredResponse?e.addClassBatch(i,n.revalidatingClasses):(e.addClassBatch(function({origin:e,activeElements:n}){return n||(n=t.wrapList(e)),t.flatMap(n,a)}(r),n.activeClasses),e.addClassBatch(i,n.loadingClasses))}}(i.feedback,s)),p.run(up.form.getDisablePreviewFn(i.disable,o));for(let t of s){let e=h(t);e.run(up.fragment.matchSelectorMap(t,i.previewMap)),e.run(up.fragment.matchSelectorMap(t,i.placeholderMap).flatMap(c))}return u.clean}(e,i));return null==s||s.autoVoid(),()=>{r.asCurrent(o),null==s||s.restore(r,{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},3889(){up.util=function(){function t(){}function e(t,e){let n={};return function(...i){if(e&&(n=this[e]||(this[e]={})),n.value)return n.value[0];if(n.error)throw n.error;try{return(n.value=[t.apply(this,i)])[0]}catch(t){throw n.error=t}}}function n(t,e){e=A(e,{host:"cross-domain"});const n=u(t);let i="";"cross-domain"===e.host&&(e.host=o(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 i(t,e){if(t)return n(t,Object.assign({hash:!1,trailingSlash:!1},e))}const r=location.protocol,s=location.hostname;function o(t){if(_(t)&&-1===t.indexOf("//"))return!1;const e=u(t);return s!==e.hostname||r!==e.protocol}function u(t){if(t.pathname)return t;let e=document.createElement("a");return e.href=t,e}function a(t){return _(t)?e=>e[t]:t}function c(t,e){if(0===t.length)return[];e=a(e);let n=[],i=0;for(let r of t)n.push(e(r,i++));return n}function l(t,e){return Object.fromEntries(t.map(e))}function h(t,e){let n=0;for(let i of t)e(i,n++)}function p(t){return null===t}function f(t){return!!t}function d(t){return void 0===t}const m=ot(d);function g(t){return d(t)||p(t)}const v=ot(g);function b(t){return!!g(t)||(S(t)&&t[b.key]?t[b.key]():_(t)||F(t)?0===t.length:!!k(t)&&0===Object.keys(t).length)}b.key="up.util.isBlank";const y=ot(b);function w(t){return"function"==typeof t}function _(t){return"string"==typeof t||t instanceof String}function O(t){return"number"==typeof t||t instanceof Number}function k(t){return"object"==typeof t&&!p(t)&&(d(t.constructor)||t.constructor===Object)}function S(t){const e=typeof t;return"object"===e&&!p(t)||"function"===e}function E(t){return t instanceof Element}function j(t){return t instanceof RegExp}function C(t){return up.browser.canJQuery()&&t instanceof jQuery}const{isArray:x}=Array;function F(t){return x(t)||function(t){return t instanceof NodeList}(t)||function(t){return"[object Arguments]"===Object.prototype.toString.call(t)}(t)||C(t)||function(t){return t instanceof HTMLCollection}(t)}function T(t){return F(t)?t:g(t)?[]:[t]}function P(t){return S(t)&&t[P.key]?t=t[P.key]():F(t)?t=R(t):k(t)&&(t=Object.assign({},t)),t}function R(t){return Array.prototype.slice.call(t)}function L(...t){return Object.assign({},...t)}function A(t,e){return e?L(e,t):t?P(t):{}}function D(t,e){e=a(e);let n=0;for(let i of t){const t=e(i,n++);if(t)return t}}function $(t,e){e=a(e);let n=!0,i=0;for(let r of t)if(!e(r,i++)){n=!1;break}return n}function M(t,e){e=a(e);const n=[];return h(t,function(t,i){if(e(t,i))return n.push(t)}),n}function H(t){return t[t.length-1]}function N(t,e){return(t.indexOf||Array.prototype.indexOf).call(t,e)>=0}function B(t,e){const n={};for(let i of e)i in t&&(n[i]=t[i]);return n}function I(t,e){e=a(e);const n={};for(let i in t)e(t[i],i)&&(n[i]=t[i]);return n}function q(t,...e){return w(t)?t(...e):t}P.key="up.util.copy",Date.prototype[P.key]=function(){return new Date(+this)};const U={"&":"&","<":"<",">":">",'"':""","'":"'"};function z(t,e){const n=t[e];return delete t[e],n}function V(t,e){if(e(H(t)))return t.pop()}function K(t){return V(t,w)}function X(t){return V(t,k)||{}}function W(t){return t}function G(t,...e){return c(t=at(t),t=>t(...e))}function J(t){const e=[];for(let n of t)F(n)?e.push(...n):e.push(n);return e}function Q(t,e){return t===e||((null==t?void 0:t.valueOf)&&(t=t.valueOf()),(null==e?void 0:e.valueOf)&&(e=e.valueOf()),t===e||typeof t==typeof e&&(F(t)&&F(e)?Y(t,e):S(t)&&t[Q.key]?t[Q.key](e):!(!k(t)||!k(e))&&function(t,e){const n=Object.keys(t);return Y(n,Object.keys(e))&&$(n,n=>Q(t[n],e[n]))}(t,e)))}function Y(t,e){return t.length===e.length&&$(t,(t,n)=>Q(t,e[n]))}function Z(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(W)}function tt(t){let{masked:e,restore:n}=pt(t);return{maskedTokens:Z(e,","),restore:n}}Q.key="up.util.isEqual";let et=0;function nt(t,e,n){for(let i of e)Object.defineProperty(t,i,{get(){const t=n.call(this);let e=t[i];return w(e)&&(e=e.bind(t)),e},set(t){n.call(this)[i]=t}})}function it(t,e="%o"){let n;if("%c"===e)return"";if("%s"===e&&v(t)&&(t=t.toString()),_(t))n=t.trim().replace(/[\n\r\t ]+/g," "),"%o"===e&&(n=JSON.stringify(n));else if(d(t))n="undefined";else if(O(t)||w(t))n=t.toString();else if(x(t))n=`[${c(t,it).join(", ")}]`;else if(C(t))n=`$(${c(t,it).join(", ")})`;else if(E(t))n=t.cloneNode().outerHTML.match(st)[0];else if(j(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)}…${H(n)}`),n}const rt=/%[oOdisfc]/g,st=/<("[^"]*"|[^">])*>/;function ot(t){return function(...e){return!t(...e)}}function ut(t,...e){let n=[];for(;e.length;){let i=e.pop();if("options"===i)n.unshift(X(t));else if("callback"===i)n.unshift(K(t));else if("val"===i)n.unshift(t.pop());else if(w(i)){let e=i(H(t))?t.pop():void 0;n.unshift(e)}}return n}function at(...t){return t.flat(2).filter(w)}function ct(t,e,{keepDelimiters:n=!1}={}){let i=0,r=/§\d+/g,s={},o=[],u=(e,r)=>{let u=!1;t=t.replaceAll(e,function(t){u=!0;let e,r,o="§"+i++;if(n){let n=t[0],i=t.slice(-1);r=t.slice(1,-1),e=n+o+i}else r=t,e=o;return s[o]=r,e}),u&&o.unshift({allowRestoreTransform:r})};u(r,!1);for(let t of e)u(t,!0);return{masked:t,restore:(t,e=W)=>{for(let{allowRestoreTransform:n}of o){let i=n?e:W;t=t.replace(r,t=>i(mt(s[t],_)))}return t}}}const lt=/'(?:\\\\|\\'|[^'])*'|"(?:\\\\|\\"|[^"])*"/g,ht=/{(?:[^{}]|{[^{}]*})*}|\((?:[^\(\)]|\([^\(\)]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\]/g;function pt(t){return ct(t,[lt,ht],{keepDelimiters:!0})}function ft(t){return'"'===t[0]?t:(mt("'"===t[0]),'"'+(t=t.slice(1,-1)).replace(/(\\\\)|(\\')|(\\")|(")/g,function(t,e,n,i){return e||n&&"'"||'\\"'})+'"')}function dt(t){let{masked:e,restore:n}=ct(t,[lt]);return e=e.replace(/([a-z_$][\w$]*:)/gi,t=>'"'+t.slice(0,-1)+'":'),e=e.replace(/,\s*([}\]])/g,"$1"),e=n(e,ft),JSON.parse(e)}function mt(t,e=f){if(e(t))return t;throw"assert failed"}return{parseURL:u,normalizeURL:n,matchableURL:i,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,n){return i(t,n)===i(e,n)},normalizeMethod:function(t){return t?t.toUpperCase():"GET"},methodAllowsPayload:function(t){return"GET"!==t&&"HEAD"!==t},copy:P,merge:L,mergeDefined:function(...t){const e={};for(let n of t)if(n)for(let t in n){const i=n[t];m(i)&&(e[t]=i)}return e},options:A,parseArgIntoOptions:function(t,e){let[n,i]=ut(t,"val","options");return m(n)&&(i[e]=n),i},each:h,map:c,flatMap:function(t,e){return J(c(t,e))},mapObject:l,spanObject:function(t,e){return l(t,t=>[t,e])},findResult:D,some:function(t,e){return!!D(t,e)},every:$,find:function(t,e){let n;e=a(e);for(let i of t)if(e(i)){n=i;break}return n},filter:M,reject:function(t,e){return M(t,e=ot(a(e)))},intersect:function(t,e){return M(t,t=>N(e,t))},compact:function(t){return M(t,v)},compactObject:function(t){return I(t,v)},uniq:function(t){return t.length<2?t:Array.from(new Set(t))},uniqBy:function(t,e){if(t.length<2)return t;e=a(e);const n=new Set;return M(t,function(t,i){const r=e(t,i);return!n.has(r)&&(n.add(r),!0)})},last:H,isNull:p,isDefined:m,isUndefined:d,isGiven:v,isMissing:g,isPresent:y,isBlank:b,presence:function(t,e=y){if(e(t))return t},isObject:S,isFunction:w,isString:_,isBoolean:function(t){return"boolean"==typeof t||t instanceof Boolean},isNumber:O,isElement:E,isTextNode:function(t){return t instanceof Text},isJQuery:C,isElementLike:function(t){var e;return!(!t||!(t.addEventListener||C(t)&&(null===(e=t[0])||void 0===e?void 0:e.addEventListener)))},isPromise:function(t){return S(t)&&w(t.then)},isOptions:k,isArray:x,isFormData:function(t){return t instanceof FormData},isList:F,isRegExp:j,isAdjacentPosition:function(t){return/^(before|after)/.test(t)},timer:function(t,e){return setTimeout(e,t)},contains:N,containsAll:function(t,e){return $(e,e=>N(t,e))},objectContains:function(t,e){return Q(e,B(t,Object.keys(e)))},toArray:function(t){return x(t)?t:R(t)},pick:B,pickBy:I,omit:function(t,e){return I(t,(t,n)=>!N(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:e,pluckKey:z,renameKey:function(t,e,n){e in t&&(t[n]=z(t,e))},extractOptions:X,extractCallback:K,noop:t,asyncNoop:function(){return Promise.resolve()},identity:W,escapeHTML:function(t){return t.replace(/[&<>"']/g,t=>U[t])},escapeRegExp:function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},sequence:function(...t){return(...e)=>G(t,e)},callAll:G,evalOption:q,evalAutoOption:function(t,e,...n){return"auto"===(t=q(t,...n))&&(t=q(e,...n)),t},flatten:J,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=W){return t.then(e,e)},isBasicObjectProperty:function(t){return Object.prototype.hasOwnProperty(t)},isCrossOrigin:o,task:function(t){setTimeout(t)},fastTask:function(t){const e=new MessageChannel;e.port1.onmessage=()=>t(),e.port2.postMessage(0)},isEqual:Q,getSimpleTokens:function(t,{json:e=!1,separator:n=/[,\s]/}={}){return _(t)?e&&/^\[.*]$/.test(t)?dt(t):Z(t,n):T(t)},getComplexTokens:function(t){if(_(t)){let{maskedTokens:e,restore:n}=tt(t);return e.map(t=>n(t))}return T(t)},wrapList:T,wrapValue:function(t,...e){return e[0]instanceof t?e[0]:new t(...e)},uid:function(){return et++},upperCaseFirst:function(t){return t[0].toUpperCase()+t.slice(1)},lowerCaseFirst:function(t){return t[0].toLowerCase()+t.slice(1)},delegate:nt,delegatePromise:function(t,e){return nt(t,["then","catch","finally"],e)},camelToKebabCase:function(t){return t.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())},kebabToCamelCase:function(t){return t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase())},sprintf:function(t,...e){return t.replace(rt,t=>it(e.shift(),t))},withRenamedKeys:function(t,e){const n={};for(let i in t){let r=e(i);v(r)&&(n[r]=t[i])}return n},memoizeMethod:function(t,n){for(let i in n){let n=e(Object.getOwnPropertyDescriptor(t,i).value,`__${i}MemoizeCache`);t[i]=n}},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(t="lifo"){let e=[],n=function(t,n){t=at(t).map(n),e.push(...at(t))},i=function(...t){n(t,W)};return i.guard=function(...t){n(t,up.error.guardFn)},i.clean=function(...n){"lifo"===t&&e.reverse(),e.forEach(t=>t(...n)),e=[]},i},scanFunctions:at,args:ut,parseRelaxedJSON:dt,parseScalarJSONPairs:function(t){let{maskedTokens:e,restore:n}=tt(t);return e.map(t=>{let[e,i,r]=t.match(/([^{]+)({[^}]*})?/);return[n(i.trim()),r&&dt(n(r))]})},maskPattern:ct,expressionOutline:pt,parseString:function(t){return JSON.parse(ft(t))},assert:mt,parseNumber:function(t){return O(t)?t:_(t)&&/^-?\.?\d[\d._]*$/.test(t)?parseFloat(t.replaceAll("_","")):void 0}}}()},235(t,e,n){n(2208),up.viewport=function(){const t=up.util,e=up.element,n=up.fragment,i=new up.Config(()=>({viewportSelectors:["[up-viewport]","[up-fixed]"],fixedTopSelectors:["[up-fixed~=top]"],fixedBottomSelectors:["[up-fixed~=bottom]"],anchoredRightSelectors:["[up-anchored~=right]","[up-fixed~=top]","[up-fixed~=bottom]","[up-fixed~=right]"],revealSnap:200,revealPadding:0,revealTop:!1,revealMax:()=>.5*window.innerHeight,autoFocusVisible:({element:t,inputDevice:e})=>"key"===e||up.form.isField(t)})),r=new up.BodyShifter;up.compiler(i.selectorFn("anchoredRightSelectors"),function(t){return r.onAnchoredElementInserted(t)});const s=up.mockable(function(e,i){var r,s;return i=t.options(i),e=n.get(e,i),(i.layer=up.layer.get(e))||up.fail("Cannot reveal a detached element"),i.peel&&i.layer.peel(),new up.RevealMotion(e,i).start(),i.focus&&a(e,{force:!0,preventScroll:!0}),(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,e){return o(t,e),t===document.activeElement}function c(e,{strong:n,layer:i,origin:r,behavior:o="instant",focus:u=!1}={}){if(!e)return;let a=_(e,{layer:i,origin:r});return a?()=>{let e=()=>s(a,{top:!0,behavior:o,focus:u});return n&&t.fastTask(e),e()}:"#top"===e?()=>y(0,{behavior:o}):void 0}function l(){return[d().tagName,...i.viewportSelectors].join()}function h(t,e={}){return n.get(t,e).closest(l())}function p(t,i={}){return t=n.get(t,i),e.around(t,l())}function f(t={}){return n.all(l(),t)}function d(){return document.scrollingElement}function m(){return e.root.clientWidth}function g(t){return up.fragment.tryToTarget(t)}function v(t){let e={};for(let n of t){let t=g(n);t?e[t]=n.scrollTop:up.warn("up.viewport.saveScroll()","Cannot save scroll positions for untargetable viewport %o",n)}return e}function b(e){const[n,i]=t.args(e,"val","options");let r;return i.layer=up.layer.get(i),r=n?[h(n,i)]:i.around?p(i.around,i):f(i),[r,i]}function y(t,...e){const[n,i]=b(e);return w(n,{},t,i.behavior),!0}function w(t,e,n,i="instant"){for(let r of t){let t=e[g(r)]||n;(t<0||Object.is(t,-0))&&(t+=r.scrollHeight-r.clientHeight),r.scrollTo({top:t,behavior:i})}}function _(t,i={}){var r;if(t=null==(r=t)?void 0:r.replace(/^#/,"")){const r=[e.idSelector(t),"a"+e.attrSelector("name",t)].join();return n.get(r,i)}}up.on("focusin",function({relatedTarget:t}){u(t)});const O=["selectionStart","selectionEnd","scrollLeft","scrollTop"];return{reveal:s,revealHash:function(...t){var e;return null===(e=c(...t))||void 0===e?void 0:e()},revealHashFn:c,firstHashTarget:_,config:i,get:h,subtree:function(t,i={}){return t=n.get(t,i),e.subtree(t,l())},around:p,getScrollTops:function(...t){return v(f(...t))},get root(){return d()},rootWidth:m,rootHeight:function(){return e.root.clientHeight},isRoot:function(t){return t===d()},rootScrollbarWidth:function(){return window.innerWidth-m()},saveScroll:function(...t){const[e,n]=b(t),i=n.location||n.layer.location;if(i){const t=v(e);n.layer.lastScrollTops.set(i,t)}},restoreScroll:function(...t){var e;const[n,i]=b(t),r=null!==(e=i.scrollTops)&&void 0!==e?e:i.layer.lastScrollTops.get(i.layer.location);return!!r&&(w(n,r,0),up.puts("up.viewport.restoreScroll()","Restored scroll positions to %o",r),!0)},scrollTo:y,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:a,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 O)try{e[n]=t[n]}catch(t){}return e},bodyShifter:r}}(),up.focus=up.viewport.focus,up.reveal=up.viewport.reveal},7115(){window.up={version:"3.14.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(7115),n(9363),n(3889),n(6939),n(6559),n(889),n(7781),n(2487),n(9483),n(8386),n(7181),n(4244),n(1410),n(1268),n(4138),n(8065),n(3526),n(6705),n(8183),n(7080),n(7275),n(3394),n(8504),n(6347),n(8195),n(4572),n(864),n(5845),n(5224),n(302),n(2113),n(1589),n(9797),n(5249),n(8379),n(4281),n(1739),n(611),n(5229),n(3441),n(4742),n(621),n(5691),n(1499),n(1438),n(2459),n(5887),n(7919),n(3728),n(9844),n(7687),n(7304),n(9454),n(2084),n(3126),n(2009),n(4526),n(8268),n(3383),n(6088),n(9156),n(6607),n(9391),n(2049),n(567),n(5637),n(4718),n(8354),n(2077),n(541),n(7718),n(6351),n(7294),n(4823),n(1588),n(6374),n(8072),n(6858),n(9918),n(6941),n(6689),n(6140),n(3530),n(5313),n(9441),n(9013),n(367),n(3106),n(6101),n(6973),n(235),n(2679),n(9399),n(1420),n(181),n(1915),n(2771),n(3194),n(4372),up.framework.onEvaled()})();
|
|
1
|
+
(()=>{var t={4518(){},3278(){},7339(){},4598(){},7412(){},2208(){},889(){up.browser={submitForm:function(t){t.submit()},canPushState:function(){return"GET"===up.protocol.initialRequestMethod()},canJQuery:function(){return!!window.jQuery},assertConfirmed:function(t){if(t.confirm&&!window.confirm(t.confirm))throw new up.Aborted("User canceled action");return!0},popCookie:function(t){var e;let n=null===(e=document.cookie.match(new RegExp(t+"=(\\w+)")))||void 0===e?void 0:e[1];if(n)return document.cookie=t+"=;Max-Age=0;Path=/",n}}},8504(){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.u()}raiseStack(){1===++this.i&&this.l()}onAnchoredElementInserted(t){return this.t.add(t),this.h(t,"right"),()=>this.t.delete(t)}p(){return this.i>0}l(){this.m=up.viewport.rootScrollbarWidth(),this.o(t.setStyleTemp(t.root,{"--up-scrollbar-width":this.m+"px"})),this.h(document.body,"padding-right");for(let t of this.t)this.h(t,"right")}u(){this.o.clean()}h(e,n){if(!this.p())return;let i=t.style(e,n);this.o(t.setStyleTemp(e,{["--up-original-"+n]:i}),t.addClassTemp(e,"up-scrollbar-away"))}}},8195(){const t=up.util,e=up.element;up.Change.Addition=class Addition extends up.Change{constructor(t){super(t),this.v=t.acceptLayer,this._=t.dismissLayer,this.O=t.eventPlans||[],this.k=t.response}handleLayerChangeRequests(t,e){this.layer.isOverlay()&&(this.S(),this.layer.assertAlive(),this.layer.tryAcceptForLocation(e,this.k),this.layer.assertAlive(),this.layer.tryAcceptForElements(t,this.k),this.layer.assertAlive(),this.j(),this.layer.assertAlive(),this.layer.tryDismissForLocation(e,this.k),this.layer.assertAlive(),this.layer.tryDismissForElements(t,this.k),this.layer.assertAlive()),this.layer.asCurrent(()=>{for(let t of this.O)up.emit(Object.assign(Object.assign({},t),{response:this.k})),this.layer.assertAlive()})}S(){t.isDefined(this.v)&&this.layer.accept(this.v,{response:this.k})}j(){t.isDefined(this._)&&this.layer.dismiss(this._,{response:this.k})}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)}executeSteps({steps:t,responseDoc:e,noneOptions:n}){return new up.Change.UpdateSteps({steps:t,noneOptions:n}).execute(e)}}},6347(){up.Change=class Change{constructor(t){this.options=t}execute(){throw new up.NotImplemented}deriveFailOptions(){return up.RenderOptions.deriveFailOptions(this.options)}}},2113(){const t=up.util;up.Change.CloseLayer=class CloseLayer extends up.Change{constructor(t){var e,n;super(t),this.P=t.verb,this.layer=up.layer.get(t),this.R=t.origin,this.L=t.value,this.A=null===(e=t.preventable)||void 0===e||e,this.k=t.response,this.D=null===(n=t.history)||void 0===n||n}execute(){if(this.layer.assertAlive(),up.browser.assertConfirmed(this.options),this.$().defaultPrevented&&this.A)throw new up.Aborted("Close event was prevented");this.M(),up.fragment.abort({reason:"Layer is closing",layer:this.layer}),this.layer.state="closing";const{parent:t}=this.layer;this.layer.peel(),this.H(t),this.layer.teardownHandlers(),this.layer.destroyElements(this.options),this.layer.stack.remove(this.layer),this.D&&t.restoreHistory(),this.layer.state="closed",this.N(t),this.B(t)}B(e){let n=this.layer[`on${t.upperCaseFirst(this.P)}edReload`];n&&e.isAlive()&&up.error.guard(()=>up.error.muteUncriticalRejection(up.reload(n,{layer:e,origin:this.layer.origin})))}$(){let e=this.layer.emit(this.I(`up:layer:${this.P}`),{callback:this.layer.callback(`on${t.upperCaseFirst(this.P)}`),log:[`Will ${this.P} ${this.layer} with value %o`,this.L]});return this.L=e.value,e}M(){let t=this.I(`up:layer:${this.P}ing`);this.layer.emit(t,{log:!1})}N(e){const n=`${this.P}ed`,i=t.upperCaseFirst(n);return this.layer.emit(this.I(`up:layer:${n}`),{baseLayer:e,callback:this.layer.callback(`on${i}`),ensureBubbles:!0,log:[`${i} ${this.layer} with value %o`,this.L]})}I(t){return up.event.build(t,{layer:this.layer,value:this.L,origin:this.R,response:this.k})}H(t){var e;let n=this.layer.hasFocus();if(this.layer.overlayFocus.teardown(),null===(e=t.overlayFocus)||void 0===e||e.moveToFront(),n){let e=this.layer.origin||t.getFocusElement();up.focus(e,{preventScroll:!0})}}}},864(){up.Change.DestroyFragment=class DestroyFragment extends up.Change{constructor(t){super(t),this.q=up.layer.get(t)||up.layer.current,this.U=this.options.element,this.V=this.options.animation,this.K=this.options.log}execute(){this.X=this.U.parentNode,up.fragment.markAsDestroying(this.U),up.animate(this.U,this.V,up.RenderOptions.chainCallbacks(this.options,{onFinished:()=>{this.W(),this.G()}}))}W(){this.q.asCurrent(()=>{up.fragment.abort(this.U),up.script.clean(this.U,{layer:this.q}),this.U.remove()})}G(){up.fragment.emitDestroyed(this.U,{parent:this.X,log:this.K})}}},5249(){var t;const e=up.util;up.Change.FromContent=(t=class FromContent extends up.Change{constructor(t){super(t),this.R=t.origin,this.J=t.preflight,this.Y=up.layer.getAll(t)}Z(){let t=[];return this.tt(),this.et(),this.nt(t,this.Y,this.options.target),this.nt(t,this.Y,this.options.fallback),t}it(t){return"new"===t||t.isAlive()}tt(){this.Y=e.filter(this.Y,this.it)}nt(t,e,n){for(let i of e)for(let e of this.rt(n,i)){const n=Object.assign(Object.assign({},this.options),{target:e,layer:i,defaultPlacement:this.st()}),r="new"===i?new up.Change.OpenLayer(n):new up.Change.UpdateLayer(n);t.push(r)}}rt(t,e){return up.fragment.expandTargets(t,{layer:e,mode:this.options.mode,origin:this.R})}execute(){return this.options.preload?Promise.resolve():this.ot(this.ut.bind(this))||this.lt()}ut(t){return up.fragment.mutate(()=>t.execute(this.ct(),this.ht.bind(this,t)))}ft(t){return!(t instanceof up.CannotMatch)||this.dt}ht(t){let e=this.Z()[0];t!==e&&up.puts("up.render()",'Could not match primary target "%s". Updating a fallback target "%s".',e.target,t.target);let{assets:n}=this.ct();n&&up.script.assertAssetsOK(n,t.options),this.options.handleAbort(this.getPreflightProps()),this.dt=!0}ct(){var t,n;if(this.J)return;const i=e.pick(this.options,["target","content","fragment","document","html","cspInfo","origin","data"]);return null===(n=(t=up.migrate).handleResponseDocOptions)||void 0===n||n.call(t,i),"content"===this.st()&&(i.target=this.gt(i.target)),new up.ResponseDoc(i)}et(){var t;if(this.J)return;let e=this.ct();this.options.fragment&&((t=this.options).target||(t.target=e.rootSelector())),this.options.title=up.history.refineOption(this.options.title,e.title),this.options.metaTags=up.history.refineOption(this.options.metaTags,e.metaTags),this.options.lang=up.history.refineOption(this.options.lang,e.lang)}st(){if(!this.options.document&&!this.options.fragment)return"content"}gt(t){let e=this.Y[0]||up.layer.root;return this.rt(t||":main",e)[0]}getPreflightProps(t={}){return this.ot(t=>t.getPreflightProps())||t.optional||this.vt()}vt(){this.bt("Could not find target in current page")}lt(){this.bt("Could not find common target in current page and response")}bt(t){if(this.Z().length){const n=e.uniq(e.map(this.Z(),"target")),i=up.layer.optionToString(this.options.layer);throw new up.CannotMatch([t+" (tried selectors %o in %s)",n,i])}if(0!==this.Y.length)throw this.options.didForceFailOptions?new up.CannotMatch("No target selector given for error responses (https://unpoly.com/learn/error-responses)"):new up.CannotMatch("No target selector given");this.yt()}yt(){throw new up.CannotMatch("Could not find a layer to render in. You may have passed an unmatchable layer reference, or a detached element.")}ot(t){for(let e of this.Z())try{return t(e)}catch(t){if(this.ft(t))throw t}}},e.memoizeMethod(t.prototype,{Z:!0,ct:!0,getPreflightProps:!0}),t)},9797(){var t,e=this&&this.wt||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.k=t.response,this._t=this.k.request}execute(){var t;if(up.fragment.config.skipResponse(this.Ot())?this.kt():(this._t.assertEmitted("up:fragment:loaded",Object.assign(Object.assign({},this.Ot()),{callback:this.options.onLoaded,log:["Loaded fragment from %s",this.k],skip:()=>this.kt()})),this.St()),null!==(t=n.evalOption(this.options.fail,this.k))&&void 0!==t?t:!this.k.ok)throw this.Et(this.deriveFailOptions());return this.Et(this.options)}St(){if(!up.fragment.config.renderableResponse(this.k))throw new up.CannotParse(['Cannot render response with content-type "%s" (configure with up.fragment.config.renderableResponse)',this.k.contentType])}kt(){up.puts("up.render()","Skipping %s",this.k),this.options.target=":none",this.options.failTarget=":none"}Et(t){return t.didForceFailOptions&&up.puts("up.render()","Rendering error response using fail-prefixed options (https://unpoly.com/learn/error-responses)"),this.jt(t),t.meta=this.Ct(),t.verifyFinished=e=>this.xt(e,t),new up.Change.FromContent(t).execute()}xt(t,n){return e(this,void 0,void 0,function*(){if(!up.fragment.shouldRevalidate(this._t,this.k,n))return;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),{feedback:n.feedback,preferOldElements:t.fragments,layer:t.layer,onFinished:null,expiredResponse:this.k,preview:this.Ft(n),abort:!1,cache:!1,background:!0}));if(!e.none)return e}})}Ft({preview:t,revalidatePreview:e}){return!0===e?t:e}Ot(){const{expiredResponse:t}=this.options;return{request:this._t,response:this.k,renderOptions:this.options,revalidating:!!t,expiredResponse:t}}Ct(){var t,e;let n={revalidating:!!this.options.expiredResponse,ok:this.k.ok};return null===(e=(t=up.migrate).processHelloMeta)||void 0===e||e.call(t,n,this.k),n}jt(t){var e,i;const r=this.k.url;let s=n.parseURL(r).hash,o=s||this._t.hash,u=s?r:r+(o||"");o&&(t.hash=o),"GET"===this.k.method?t.source=up.history.refineOption(t.source,r):(t.source=up.history.refineOption(t.source,"keep"),t.history=!!t.location);let a=this.k.openLayer;a&&(up.script.adoptRenderOptionsFromHeader(a,this.k.cspInfo),Object.assign(t,Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},up.Layer.Overlay.UNSET_VISUALS),{target:void 0}),up.fragment.config.navigateOptions),a),{layer:"new"}))),t.location=up.history.refineOption(t.location,u),t.title=up.history.refineOption(t.title,this.k.title),t.eventPlans=this.k.eventPlans;let l=this.k.target;l&&(t.target=l),t.acceptLayer=this.k.acceptLayer,t.dismissLayer=this.k.dismissLayer,t.document=this.k.text,this.k.none&&(t.target=":none"),t.context=n.merge(t.context,this.k.context),t.cspInfo=this.k.cspInfo,null!==(e=t.time)&&void 0!==e||(t.time=this.k.lastModified),null!==(i=t.etag)&&void 0!==i||(t.etag=this.k.etag)}},n.memoizeMethod(t.prototype,{Ot:!0}),t)},1589(){var t,e=this&&this.wt||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(){return e(this,void 0,void 0,function*(){var t,e;let i=this.Tt();if(i)return up.puts("up.render()",i),up.network.loadPage(this.options),n.unresolvablePromise();let r=this.Pt(),s=this.request=up.request(r);return null===(e=(t=this.options).onRequestKnown)||void 0===e||e.call(t,s),this.options.preload?s:(this.options.handleAbort(Object.assign({request:s},r)),s.runPreviews(this.options),yield n.always(s,t=>this.Rt(t)))})}Tt(){return n.isCrossOrigin(this.options.url)?"Loading cross-origin content in new page":this.options.history&&!up.browser.canPushState()&&up.history.isEnabled("location")?"Loading content in new page to restore history support":void 0}Pt(){const t=this.Lt(this.options),e=this.Lt(this.deriveFailOptions(),{optional:!0});return Object.assign(Object.assign(Object.assign({},this.options),t),n.withRenamedKeys(e,up.fragment.failKey))}getPreflightProps(){return this.Pt()}Lt(t,e){return new up.Change.FromContent(Object.assign(Object.assign({},t),{preflight:!0})).getPreflightProps(e)}Rt(t){return t instanceof up.Response?this.At(t):this.Dt(t)}At(t){return new up.Change.FromResponse(Object.assign(Object.assign({},this.options),{response:t})).execute()}Dt(t){if(t instanceof up.Offline){let e=["Cannot load fragment from %s: %s",t.request,t.reason];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:e})}throw t}},n.memoizeMethod(t.prototype,{Pt:!0}),t)},5845(){var t=this&&this.wt||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.R=t.origin,this.$t=t.baseLayer}getPreflightProps(){return{mode:this.options.mode,context:this.Mt().context,origin:this.options.origin,target:this.target,bindLayer:this.$t,layer:"new",bindFragments:e.compact([up.fragment.get(":main",{layer:this.$t})]),fragments:[]}}execute(t,n){this.Ht(t),n(),this.Nt();let i=e.memoize(()=>this.Bt(t)),r=this.layer.on("up:layer:accepting up:layer:dismissing",i);try{let e=[this.It(t),...i()];return new up.RenderResult({layer:this.layer,target:this.target,renderOptions:this.options,partialResults:e})}finally{r()}}Ht(t){if(":none"===this.target?this.qt=document.createElement("up-none"):this.qt=t.select(this.target),!this.qt||!this.$t.isAlive())throw new up.CannotMatch}Nt(){up.puts("up.render()",`Opening element "${this.target}" in new overlay`),this.Ut(),this.layer=this.Mt(),this.$t.peel({history:!this.layer.history,intent:this.options.peel}),this.$t.saveHistory(),up.layer.stack.push(this.layer),this.layer.createElements(),this.layer.setupHandlers()}It(t){this.handleLayerChangeRequests([this.qt],this.zt()),t.commitElement(this.qt),this.layer.setContent(this.qt),t.finalizeElement(this.qt),this.Vt(),this.setReloadAttrs({newElement:this.qt,source:this.options.source});let e=this.Kt();this.H(),this.Xt(),this.layer.state="opened",this.Wt(),this.layer.assertAlive();let n=this.layer.startOpenAnimation();return{fragments:[this.qt],finished:Promise.all([e,n]),verifyFinished:()=>this.layer.assertAlive()}}Bt(t){let e=this.Gt().other;return this.executeSteps({steps:e,responseDoc:t})}Kt(){return t(this,void 0,void 0,function*(){yield up.hello(this.layer.element,Object.assign(Object.assign({},this.options),{layer:this.layer,dataRoot:this.qt}))})}Mt(){return up.layer.build(this.options,t=>this.options=up.RenderOptions.finalize(t))}Vt(){var t;"auto"===this.layer.history&&(this.layer.history=up.fragment.hasAutoHistory([this.qt],this.layer)),(t=this.layer).history&&(t.history=this.$t.history),this.layer.updateHistory(this.Jt())}H(){var t;null===(t=this.$t.overlayFocus)||void 0===t||t.moveToBack(),this.layer.overlayFocus.moveToFront(),new up.FragmentFocus({fragment:this.qt,layer:this.layer,autoMeans:["autofocus","layer"],inputDevice:this.options.inputDevice,focusVisible:this.options.focusVisible}).process(this.options.focus)}Xt(){var t;const e=Object.assign(Object.assign({},this.options),{fragment:this.qt,layer:this.layer,autoMeans:["hash","layer"]});new up.FragmentScrolling(e).process(null!==(t=this.options.scrollMap)&&void 0!==t?t:this.options.scroll)}Ut(){up.event.assertEmitted("up:layer:open",{origin:this.R,baseLayer:this.$t,layerOptions:this.options,log:"Opening new overlay"})}Wt(){this.layer.emit("up:layer:opened",{origin:this.R,callback:this.layer.callback("onOpened"),log:`Opened new ${this.layer}`})}Gt(){return up.radio.hungrySteps(this.Qt())}Qt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.layer.history})}Jt(){return up.history.options(this.options)}zt(){return this.Qt().location}}},5224(){var t;const e=up.util;up.Change.UpdateLayer=(t=class UpdateLayer extends up.Change.Addition{constructor(t){super(t=up.RenderOptions.finalize(t)),this.layer=t.layer,this.target=t.target,this.Yt=t.context,this.Zt=up.fragment.parseTargetSteps(this.target,this.options)}getPreflightProps(){this.te();let t=this.ee();return{layer:this.layer,bindLayer:this.layer,mode:this.layer.mode,context:e.merge(this.layer.context,this.Yt),origin:this.options.origin,target:this.ne(),fragments:t,bindFragments:t}}ne(){this.te();let t=this.Zt.filter(t=>{var e;return!t.maybe||(null===(e=t.oldElement)||void 0===e?void 0:e.isConnected)});return e.map(t,"selector").join(", ")||":none"}ee(){return this.te(),e.map(this.Zt,"oldElement")}execute(t,n){this.Ht(t),n();let i=e.memoize(()=>this.Bt(t)),r=this.layer.on("up:layer:accepting up:layer:dismissing",i);try{let e=[...this.ie(t),...i()];return new up.RenderResult({target:this.target,layer:this.layer,renderOptions:this.options,partialResults:e})}finally{r()}}ie(t){this.Zt.length&&up.puts("up.render()",`Updating "${this.ne()}" in ${this.layer}`),this.re(),this.options.saveScroll&&up.viewport.saveScroll({layer:this.layer}),this.options.saveFocus&&up.viewport.saveFocus({layer:this.layer});let{peel:n}=this.options;return n&&this.layer.peel({history:!this.se(),intent:n}),!1!==this.options.abort&&up.fragment.abort(this.ee(),{reason:"Fragment is being replaced",jid:this.options.jid}),Object.assign(this.layer.context,this.Yt),this.handleLayerChangeRequests(e.map(this.Zt,"newElement"),this.zt()),this.layer.updateHistory(this.Jt()),this.executeSteps({steps:this.Zt,noneOptions:this.options,responseDoc:t})}Bt(t){let e=this.Gt().other;return this.executeSteps({steps:e,responseDoc:t})}te(){this.oe(),this.ue()}Ht(t){this.oe(),this.ae(),this.ue(),this.le(t)}ae(){this.Zt.push(...this.Gt().current)}oe(){this.Zt=this.Zt.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(t){this.Zt=t.selectSteps(this.Zt)}ue(){this.Zt=up.fragment.compressNestedSteps(this.Zt)}Gt(){return up.radio.hungrySteps(this.Qt())}re(){let t=up.FocusCapsule.preserve(this.layer),e=up.viewport.getScrollTops({layer:this.layer});this.Zt.forEach((n,i)=>{n.focusCapsule=t,n.oldScrollTops=e,n.scrollMap&&(n.scroll=!1),i>0&&(n.focus=!1,n.scrollMap=void 0,"keep"!==n.scroll&&(n.scroll=!1),n.data=void 0)})}se(){return e.evalAutoOption(this.options.history,this.ce.bind(this))}ce(){const t=e.map(this.Zt,"oldElement");return up.fragment.hasAutoHistory(t,this.layer)}zt(){return this.Jt().location}Qt(){return Object.assign(Object.assign({},this.options),{layer:this.layer,history:this.se()})}Jt(){return this.se()?up.history.options(this.options):{}}},e.memoizeMethod(t.prototype,{te:!0,oe:!0,se:!0,Gt:!0}),t)},302(){var t=this&&this.wt||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.Zt=e.copy(e.assert(t.steps)),this.he=t.noneOptions||{}}execute(t){return this.responseDoc=t,this.Zt=t.selectSteps(this.Zt),this.Zt=t.commitSteps(this.Zt),[this.pe(),this.fe()]}pe(){if(this.Zt.length){let t=this.Zt.map(t=>this.de(t));return{fragments:e.flatMap(t,"fragments"),finished:this.me(t)}}return this.ge()}me(e){return t(this,void 0,void 0,function*(){let t=e.map(t=>t.welcome());this.Zt.forEach((t,n)=>{this.H(e[n].focusElement,t),this.Xt(e[n].scrollElement,t)});let n=e.map(t=>{var e;return null===(e=t.startMotion)||void 0===e?void 0:e.call(t)});yield Promise.all([...t,...n])})}fe(){return{verifyFinished:()=>{for(let t of this.Zt)t.layer.assertAlive()}}}de(t){switch(t.placement){case"swap":{let e=up.fragment.keepPlan(t);return e?this.ve(t,e):this.be(t)}case"content":return this.ye(t);case"before":case"after":return this.we(t);default:up.fail("Unknown placement: %o",t.placement)}}ge(){return this.H(null,this.he),this.Xt(null,this.he),{}}ve(t,e){return{fragments:[],focusElement:t.oldElement,scrollElement:t.oldElement,welcome:()=>up.fragment.emitKept(e)}}be(t){var e;const n=null!==(e=t.parentElement)&&void 0!==e?e:t.oldElement.parentNode;up.fragment.markAsDestroying(t.oldElement),this._e(t);let i=up.motion.swap(t.oldElement,t.newElement,t.transition,Object.assign(Object.assign({},t),{beforeRemove:()=>{up.script.clean(t.oldElement,{layer:t.layer})},afterRemove:()=>{var e;up.fragment.emitDestroyed(t.oldElement,{parent:n,log:!1}),null===(e=t.afterRemove)||void 0===e||e.call(t)}}));return this.Oe(t),{fragments:[t.newElement],focusElement:t.newElement,scrollElement:t.newElement,welcome:()=>{let e=this.ke(t.newElement,t);return this.Se(t),e},startMotion:i}}ye(t){let e=[...t.newElement.children],i=n.wrapChildren(t.oldElement),r=n.wrapChildren(t.newElement),s=this.be(Object.assign(Object.assign({},t),{placement:"swap",parentElement:t.oldElement.parentNode,oldElement:i,newElement:r,afterRemove:()=>n.unwrap(r)}));return Object.assign(Object.assign({},s),{fragments:e,focusElement:t.oldElement})}we(t){let e=[...t.newElement.children],i=n.wrapChildren(t.newElement),r="before"===t.placement?"afterbegin":"beforeend";return t.oldElement.insertAdjacentElement(r,i),{fragments:e,focusElement:n.leadingElement(i.childNodes)||t.oldElement,scrollElement:i,welcome:()=>this.ke(i,t),startMotion:()=>up.animate(i,t.animation,Object.assign(Object.assign({},t),{onFinished:()=>n.unwrap(i)}))}}ke(t,e){return this.responseDoc.finalizeElement(t),this.setReloadAttrs(e),up.hello(t,e)}_e(t){const n=[];if(t.keep)for(let i of t.oldElement.querySelectorAll("[up-keep]")){let r=up.fragment.keepPlan(Object.assign(Object.assign({},t),{oldElement:i,descendantsOnly:!0}));if(r){const t=i.cloneNode(!0);i.insertAdjacentElement("beforebegin",t),i.classList.add("up-keeping"),up.script.block(r.newElement);let s=up.viewport.subtree(r.oldElement);r.revivers=e.map(s,function(t){let e=up.viewport.copyCursorProps(t);return()=>up.viewport.copyCursorProps(e,t)}),this.Ee()?r.newElement.replaceWith(i):document.body.append(i),n.push(r)}}t.descendantKeepPlans=n}Oe(t){for(let e of t.descendantKeepPlans){e.newElement.replaceWith(e.oldElement);for(let t of e.revivers)t()}}Se(t){for(let e of t.descendantKeepPlans)e.oldElement.classList.remove("up-keeping"),up.fragment.emitKept(e)}Ee(){return e.some(this.Zt,t=>t.oldElement.matches("body"))}H(t,e){new up.FragmentFocus(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoFocus})).process(e.focus)}Xt(t,e){var n;new up.FragmentScrolling(Object.assign(Object.assign({},e),{fragment:t,autoMeans:up.fragment.config.autoScroll})).process(null!==(n=e.scrollMap)&&void 0!==n?n:e.scroll)}}},3526(){const t=up.util,e=up.element;up.Config=class Config{constructor(e,n=()=>({})){this.je=e,this.Ce=n,this.xe=[],this.reset(),this.xe.push(...Object.keys(this)),document.addEventListener("up:framework:reset",()=>this.reset()),document.addEventListener("up:framework:boot",()=>t.task(()=>this.logUnknownKeys()))}logUnknownKeys(){for(let t of Object.keys(this))this.xe.includes(t)||up.log.error(this.je,"Ignoring unknown setting %s. Fix its name or remove it.",t)}reset(){Object.assign(this,this.Ce())}matches(t,e,n){return null==t?void 0:t.matches(this.selector(e,n))}matchesFn(t){return(e,n)=>this.matches(e,t,n)}selector(n,i=""){let r=this[n],s=this["no"+t.upperCaseFirst(n)];return e.unionSelector(r,s,i)}selectorFn(t){return e=>this.selector(t,e)}selectorFns(t){return[this.selectorFn(t),this.matchesFn(t)]}}},8379(){const t=up.util,e=/'nonce-([^']+)'/g;function n(n){let i=n.matchAll(e);return t.map(i,"1")}up.CSPInfo=class CSPInfo{constructor(t="",e=[]){this.declaration=t,this.nonces=e}isStrictDynamic(){return this.declaration.includes("'strict-dynamic'")}isUnsafeEval(){return this.declaration.includes("'unsafe-eval'")}static fromHeader(t){var e;let i={};if(t){let r=t.split(/\s*;\s*/);for(let t of r){let r=null===(e=t.match(/^(script|default)-src\s/))||void 0===e?void 0:e[1];r&&(i[r]=[t,n(t)])}}let r=i.script||i.default;return r?new this(...r):this.none()}static none(){return new this}}},1739(){const t=up.util;up.DestructorPass=class DestructorPass{constructor(t,e){this.Fe=t,this.Te=e}run(){for(let e of this.Pe()){let n=t.pluckKey(e,"upDestructors");null==n||n.clean(e)}}Pe(){const t=Object.assign(Object.assign({},this.Te),{destroying:!0});return up.fragment.subtree(this.Fe,".up-can-clean",t)}}},611(){const t=up.util,e=up.element;up.EventEmitter=class EventEmitter extends up.Record{keys(){return["target","event","baseLayer","callback","log","ensureBubbles"]}emit(){return this.Re(),this.baseLayer?this.baseLayer.asCurrent(()=>this.Le()):this.Le(),this.event}Le(){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`)}Re(){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)}}},5229(){const t=up.util;up.EventListener=class EventListener extends up.Record{keys(){return["element","eventType","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}constructor(t){var e;super(t),this.Ae=this.constructor.De(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.Ae]&&up.fail("up.on(): The %o callback %o cannot be registered more than once",this.eventType,this.callback),e[this.Ae]=this,this.element.addEventListener(...this.$e())}$e(){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.Ae],this.element.removeEventListener(...this.$e())}nativeCallback(e){if(up.framework.beforeBoot&&!this.beforeBoot)return;let n=e.target;if(this.selector){let e=t.evalOption(this.selector);n=n.closest(e)}if((!this.guard||this.guard(e))&&n){const t=[e,n],i=this.callback.length;if(1!==i&&2!==i){const e=up.script.data(n);t.push(e)}if("click"===this.eventType&&up.form.readFieldDisabled(n))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.De(t)]}static De(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[]}}},3441(){const t=up.util;up.EventListenerGroup=class EventListenerGroup extends up.Record{keys(){return["elements","eventTypes","selector","callback","guard","baseLayer","passive","once","capture","beforeBoot"]}bind(){const e=t.cleaner();return this.Me(function(t){const n=new up.EventListener(t);return n.bind(),e(n.unbind.bind(n))}),e.clean}Me(t){for(let e of this.elements)for(let n of this.eventTypes)t(this.He(e,n))}He(t,e){return Object.assign(Object.assign({},this.attributes()),{element:t,eventType:e})}unbind(){this.Me(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))}}},621(){var t=this&&this.wt||function(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,u)}a((i=i.apply(t,e||[])).next())})};const e=up.util;up.FieldWatcher=class FieldWatcher{constructor(t,e,n){var i;this.Te=e,this.Ne=t,this.Be=n,this.Ie=e.batch,this.qe=null!==(i=e.logPrefix)&&void 0!==i?i:"up.watch()",this.Ue=e.includeDisabled,this.ze()}start(){return this.Ve=null,this.Ke=this.Xe(),this.We=null,this.Ge=!1,e.sequence(this.Je(),this.Qe(),this.Ye(),()=>this.Ze())}ze(){const t=t=>up.fail(t,this.qe,this.Ne);this.Be||t("No callback provided for %s (%o)"),this.Ne.matches("input[type=radio]")&&t("Use %s with the container of a radio group, not with an individual radio button (%o)"),up.form.isField(this.Ne)&&!up.form.readFieldName(this.Ne)&&t("%s can only watch fields with a name (%o)")}Je(){return up.form.isField(this.Ne)?this.tn(this.Ne):up.form.trackFields(this.Ne,t=>this.tn(t))}Qe(){return up.on("up:fragment:aborted",{guard:({target:t})=>t.contains(this.en)},()=>this.Ze())}Ye(){return up.on("reset",{guard:({target:t})=>t===this.en},t=>this.nn(t))}get en(){return up.form.getRegion(this.Ne)}rn(t){let n=e.copy(this.Te);return up.form.watchOptions(t,n,{defaults:{event:"input"}})}tn(t){let e=this.rn(t),n=e.event;return up.on(t,n,t=>this.sn(t,e))}Ze(){this.Ve=null}un(t,n){this.Ve=t,this.an=n;let i=n.delay||0;clearTimeout(this.We),this.We=e.timer(i,()=>{this.We=null,this.ln()})}cn(t){return!e.isEqual(t,this.Ke)&&!e.isEqual(this.Ve,t)}ln(){return t(this,void 0,void 0,function*(){if(!this.Ve)return;if(this.Ge)return;if(this.We)return;if(!up.fragment.isAlive(this.en))return;let t=e.omit(this.an,["event","delay"]);const n=this.hn(this.Ke,this.Ve);this.Ke=this.Ve,this.Ve=null,this.Ge=!0,this.an=null;const i=[];if(this.Ie)i.push(this.pn(n,t));else for(let e in n){const r=n[e];i.push(this.pn(r,e,t))}if(e.some(i,e.isPromise)){let t=Promise.allSettled(i);yield t}this.Ge=!1,this.ln()})}pn(...t){return up.error.guard(this.Be,...t)}hn(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}Xe(){return up.Params.fromContainer(this.Ne,{includeDisabled:this.Ue}).toObject()}sn(t,e={}){const n=this.Xe();this.cn(n)&&(up.log.putsEvent(t),this.un(n,e))}nn(t){e.task(()=>this.sn(t))}}},7275(){const t=up.util;up.FIFOCache=class FIFOCache{constructor({capacity:e=10,normalizeKey:n=t.identity}={}){this.fn=new Map,this.dn=e,this.mn=n}get(t){return t=this.mn(t),this.fn.get(t)}set(t,e){if(this.fn.size===this.dn){let t=this.fn.keys().next().value;this.fn.delete(t)}t=this.mn(t),this.fn.set(t,e)}clear(){this.fn.clear()}}},1438(){up.FocusCapsule=class FocusCapsule{constructor(t,e){this.U=t,this.gn=e,this.vn=up.viewport.copyCursorProps(this.U)}wasLost(){return document.activeElement!==this.U&&!this.bn}autoVoid(){up.on("focusin",{once:!0},()=>this.bn=!0)}restore(t,e){if(!this.wasLost())return!1;let n=this.gn&&up.fragment.get(this.gn,{layer:t});return n?(up.viewport.copyCursorProps(this.vn,n),up.focus(n,e),!0):void 0}static preserve(t){let e=up.viewport.focusedElementWithin(t.element);if(e)return new this(e,up.fragment.tryToTarget(e))}}},1499(){var t=this&&this.wt||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.yn||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.wn=t,this._n=[],this.On=null,this.kn=!1,this.Sn()}start(){return up.form.trackFields(this.wn,{guard:t=>this.En(t)},t=>this.jn(t))}En(t){return t.closest("[up-validate]:not([up-validate=false])")}jn(t){let e=up.form.validateOptions(t).event;return up.on(t,e,e=>{t.closest(".up-keeping")||(up.log.putsEvent(e),up.error.muteUncriticalRejection(this.validate({origin:t})))})}Sn(){up.fragment.onAborted(this.wn,t=>this.Cn(t))}Cn(t){let e,n=new up.Aborted(t.reason);for(;e=this._n.shift();)e.deferred.reject(n)}validate(t={}){var e;let n=this.xn(t);return this._n.push(...n),this.Fn(),null===(e=n[0])||void 0===e?void 0:e.deferred}xn(t){let e=this.Tn(t)||this.Pn(t)||this.Rn(t.origin),i=n.newDeferred();for(let r of e){let e=up.form.validateOptions(r.origin,t);r.batch=n.pluckKey(e,"batch"),r.renderOptions=e,r.destination=`${e.method} ${e.url}`,r.target=up.fragment.resolveOrigin(r.target,r),r.deferred=i}return e}Pn(t){var{origin:n}=t,i=e(t,["origin"]);if(up.form.isField(n))return this.Ln(n)||this.An(n,i)}An(t,{formGroup:e=!0}){if(!e)return;let n=up.form.groupSolution(t,{targetable:!0});return n?(up.puts("up.validate()","Validating form group of field %o",t),[n]):void 0}Tn({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)}))}}Rn(t){return up.puts("up.validate()","Validating element %o",t),[{element:t,target:up.fragment.toTarget(t),origin:t}]}Ln(t){let e=t.closest("[up-validate]");if(e){let n=i.booleanOrStringAttr(e,"up-validate");return this.Tn({target:n,origin:t})}}Fn(){let t=this._n.map(t=>t.renderOptions.delay),e=Math.min(...t)||0;clearTimeout(this.On),this.On=n.timer(e,()=>{this.On=null,this.Dn()})}Dn(){up.error.muteUncriticalRejection(this.$n())}$n(){return t(this,void 0,void 0,function*(){if(!this._n.length)return;if(this.kn)return;if(this.On)return;let t=this.Mn(),e=this.Hn(t);this.kn=!0;try{let n=up.render(e);for(let e of t)e.deferred.resolve(n);yield n}finally{this.kn=!1,this.Dn()}})}Mn(){let t=[],e=0;for(;e<this._n.length;){let n=this._n[e];0===t.length||this.Nn(t[0],n)?(t.push(n),this._n.splice(e,1)):e++}return t}Nn(t,e){return t.destination===e.destination&&t.batch&&e.batch}Hn(t){var e;let i=n.map(t,"origin"),r=n.flatMap(i,up.form.fields),s=n.uniq(n.filter(n.map(r,up.form.readFieldName),n.isPresent)),o=n.map(t,"renderOptions"),u=up.form.destinationOptions(this.wn,{submitButton:!1}),a=n.mergeDefined(u,...o);a.target=n.map(t,"target").join(", "),a.origin=this.wn,null!==(e=a.focus)&&void 0!==e||(a.focus="keep"),a.failOptions=!1,a.defaultMaybe=!0,a.params=up.Params.merge(u.params,...n.map(o,"params")),a.headers=n.merge(u.headers,...n.map(o,"headers")),this.Bn(a.headers,s);let l=n.compact(n.map(o,"feedback"));return l.length&&(a.feedback=l.includes(!0)),a.data=void 0,a.dataMap=n.mapObject(t,({target:t,element:e,renderOptions:{data:n,keepData:i}})=>[t,i?up.data(e):n]),a.preview=void 0,a.previewMap=n.mapObject(t,({target:t,renderOptions:{preview:e}})=>[t,e]),a.placeholder=void 0,a.placeholderMap=n.mapObject(t,({target:t,renderOptions:{placeholder:e}})=>[t,e]),a.disable=t.map(t=>up.fragment.resolveOrigin(t.renderOptions.disable,t)),a.guardEvent=up.event.build("up:form:validate",{fields:r,log:"Validating form",params:a.params,form:this.wn}),a}Bn(t,e){let n=up.protocol.headerize("validate"),i=e.join(" ");(!i||i.length>up.protocol.config.maxHeaderSize)&&(i=":unknown"),t[n]=i}}},5887(){const t=up.util,e=/^([^ >+(]+) (.+)$/;up.FragmentFinder=class FragmentFinder{constructor(t){var e;this.Te=t,this.R=t.origin,this.In=t.selector,this.qn=t.document||window.document,this.Un=null!==(e=t.match)&&void 0!==e?e:up.fragment.config.match,this.zn=t.preferOldElements}find(){return this.Vn()||this.Kn()||this.Xn()}Vn(){if(this.zn)return this.zn.find(t=>this.qn.contains(t)&&up.fragment.matches(t,this.In))}Kn(){var t;if("region"===this.Un&&!up.fragment.containsMainPseudo(this.In)&&(null===(t=this.R)||void 0===t?void 0:t.isConnected))return this.Wn()||this.Gn()}Wn(){return up.fragment.closest(this.R,this.In,this.Te)}Gn(){let n=up.fragment.splitTarget(this.In);return t.findResult(n,t=>{let n=t.match(e);if(n){let t=up.fragment.closest(this.R,n[1],this.Te);if(t)return up.fragment.getFirstDescendant(t,n[2],this.Te)}})}Xn(){return up.fragment.getFirstDescendant(this.qn,this.In,this.Te)}}},7919(){const t=up.util,e=up.element,n={preventScroll:!0};up.FragmentFocus=class FragmentFocus extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","focusVisible","focusCapsule","inputDevice"])}processPrimitive(e){switch(e){case"keep":return this.Jn();case"restore":return this.Qn();case"target":case!0:return this.Yn(this.fragment);case"layer":return this.Yn(this.layer.getFocusElement());case"main":return this.Zn(":main");case"hash":return this.ti();case"autofocus":return this.ei();default:if(t.isString(e))return this.Zn(e)}}processElement(t){return this.Yn(t)}resolveCondition(t){return"lost"===t?this.ni():super.resolveCondition(t)}Zn(t){let e=this.findSelector(t);return this.Yn(e)}Jn(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.restore(this.layer,n)}Qn(){return up.viewport.restoreFocus({layer:this.layer})}ei(){let t=this.fragment&&e.subtreeFirst(this.fragment,"[autofocus]");if(t)return this.Yn(t)}Yn(t){if(t)return up.focus(t,Object.assign(Object.assign({force:!0},n),{inputDevice:this.inputDevice,focusVisible:this.focusVisible})),!0}ti(){let t=up.viewport.firstHashTarget(this.hash,{layer:this.layer});if(t)return this.Yn(t)}ni(){var t;return null===(t=this.focusCapsule)||void 0===t?void 0:t.wasLost()}}},3728(){const t=up.element,e=up.util;up.FragmentPolling=class FragmentPolling{static forFragment(t){return t.upPolling||(t.upPolling=new this(t))}constructor(t){this.Te=up.radio.pollOptions(t),this.Fe=t,up.destructor(t,this.ii.bind(this)),this.ri="stopped",this.si=null,this.oi=e.uid(),this.ui=!1,this.ai()}onPollAttributeObserved(){this.li()}ci({newLayer:t,jid:e}){e===this.oi||t||this.hi()}pi(){"stop"!==this.si&&this.li()}ii(){this.hi()}li(t){if(Object.assign(this.Te,t),"stopped"===this.ri){if(!up.fragment.isTargetable(this.Fe))return void up.warn("[up-poll]","Cannot poll untargetable fragment %o",this.Fe);this.ri="started",this.fi(),this.di()}}hi(){"started"===this.ri&&(this.mi(),this.ri="stopped")}forceStart(t){Object.assign(this.Te,t),this.si="start",this.li()}forceStop(){this.si="stop",this.hi()}fi(){this.gi||(this.gi=!0,up.destructor(this.Fe,up.on("visibilitychange up:layer:opened up:layer:dismissed up:layer:accepted",this.bi.bind(this))),up.fragment.onAborted(this.Fe,this.ci.bind(this)),up.fragment.onKept(this.Fe,this.pi.bind(this)))}bi(){this.yi()?this.di():this.mi()}yi(){return!document.hidden&&("any"===this.Te.ifLayer||this.wi())}mi(){clearTimeout(this._i),this._i=null}di(){this._i||this.ui||"stopped"===this.ri||(this.mi(),this._i=setTimeout(this.Oi.bind(this),this.ki()))}Oi(){this._i=null,this.Si()}Si(){if("stopped"!==this.ri)return up.fragment.isAlive(this.Fe)?void(this.yi()?this.Ei():up.puts("[up-poll]","Will not poll hidden fragment")):(this.hi(),void up.puts("[up-poll]","Stopped polling a detached fragment"))}ji(){var e,n;return null!==(n=null!==(e=this.Te.interval)&&void 0!==e?e:t.numberAttr(this.Fe,"up-interval"))&&void 0!==n?n:up.radio.config.pollInterval}ki(){return Math.max(this.ji()-this.Ci(),0)}Ci(){return new Date-this.xi}wi(){var t,e;return this.layer||(this.layer=up.layer.get(this.Fe)),null===(e=null===(t=this.layer)||void 0===t?void 0:t.isFront)||void 0===e?void 0:e.call(t)}Ei(){this.mi(),this.ui=!0;let t=up.event.build("up:fragment:poll",{log:["Polling fragment",this.Fe]}),e=Object.assign(Object.assign({},this.Te),{guardEvent:t,jid:this.oi});up.reload(this.Fe,e).then(this.Fi.bind(this),this.Ti.bind(this))}Fi({fragment:t}){this.ui=!1,this.ai(),t?this.Pi(t):this.di()}Pi(t){"start"===this.si&&up.fragment.matches(this.Fe,t)&&this.constructor.forFragment(t).forceStart(this.Te)}Ti(t){this.ui=!1,this.ai(),this.di(),up.error.throwCritical(t)}ai(){this.xi=new Date}}},2459(){const t=up.util;up.FragmentProcessor=class FragmentProcessor extends up.Record{keys(){return["fragment","autoMeans","origin","layer"]}process(t){let e=this.preprocessOnce(t);return this.tryProcess(e)}preprocessOnce(e){return t.getComplexTokens(e)}tryProcess(e){if(t.isArray(e))return this.processArray(e);if(t.isOptions(e))return this.processSelectorMap(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.tryProcess(t[1])}return this.processPrimitive(e)}processSelectorMap(t){return Object.keys(t).filter(e=>{let n=this.findSelector(e);if(n){let i=new this.constructor(Object.assign(Object.assign({},this.attributes()),{fragment:n})),r=t[e];return i.process(r)}})}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)}}},9844(){const t=up.util;up.FragmentScrolling=class FragmentScrolling extends up.FragmentProcessor{keys(){return super.keys().concat(["hash","mode","revealTop","revealMax","revealSnap","revealPadding","behavior","oldScrollTops"])}constructor(t){super(Object.assign(Object.assign({},t),{behavior:t.scrollBehavior}))}processPrimitive(e){switch(e){case"top":return this.Ri(0);case"bottom":return this.Ri(-0);case"layer":return this.Li();case"main":return this.Ai(":main");case"keep":return this.Di();case"restore":return this.$i();case"hash":return this.hash&&up.viewport.revealHash(this.hash,this.attributes());case"target":case"reveal":case!0:return this.Mi(this.fragment);default:if(t.isNumber(e))return this.Ri(e);if(t.isString(e))return this.Ai(e)}}processElement(t){return this.Mi(t)}Mi(t){if(t)return up.reveal(t,this.attributes()),!0}Ai(t){let e=this.findSelector(t);return this.Mi(e)}Li(){return this.Mi(this.layer.getBoxElement())}Ri(t){return up.viewport.scrollTo(t,Object.assign(Object.assign({},this.attributes()),{around:this.fragment}))}Di(){if(this.oldScrollTops)return this.$i({scrollTops:this.oldScrollTops})}$i(t){return up.viewport.restoreScroll(Object.assign(Object.assign(Object.assign({},this.attributes()),{around:this.fragment}),t))}}},4281(){var t=this&&this.wt||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.HelloFragment=class HelloFragment{constructor(t,e,n,{layer:i,data:r,dataRoot:s,dataMap:o,meta:u,insertedEvent:a}){var l,c,h;i||(i=up.layer.get(t)||up.layer.current),this.Ne=t,this.Hi=e,this.Ni=n,this.q=i,this.Bi=r,this.Ii=s||t,this.qi=o,this.Ui=[],this.zi=null==a||a,u||(u={}),null!==(l=u.layer)&&void 0!==l||(u.layer=i),null!==(c=u.ok)&&void 0!==c||(u.ok=!0),null!==(h=u.revalidating)&&void 0!==h||(u.revalidating=!1),this.Vi=u}run(){return t(this,void 0,void 0,function*(){return up.puts("up.hello()","Compiling fragment %o",this.Ne),this.Ki(),this.Xi(this.Hi),this.Wi(),this.Xi(this.Ni),n.trackDefinitions(this.Ne),this.Gi(),yield Promise.all(this.Ui),this.Ne})}Wi(){up.emit(this.Ne,"up:compilers:before",{log:!1})}Gi(){this.zi&&up.fragment.emitInserted(this.Ne,this.Vi)}Ki(){if(this.Bi&&(this.Ii.upCompileData=this.Bi),this.qi)for(let t in this.qi)for(let e of this.Ji(t))e.upCompileData=this.qi[t]}Xi(t){this.q.asCurrent(()=>{for(let e of t)this.Qi(e)})}Qi(t){var e,n;const i=this.Yi(t);if(i.length){if(t.isDefault||up.puts("up.hello()",'Compiling %d× "%s" on %s',i.length,t.selector,this.q),t.batch)this.Zi(t,i);else for(let e of i)this.tr(t,e);null===(n=(e=up.migrate).postCompile)||void 0===n||n.call(e,i,t)}}tr(t,e){const n=[e];if(1!==t.length){const t=up.script.data(e);n.push(t,this.Vi)}this.er(t,e,n,t=>up.destructor(e,t))}Zi(t,n){const i=[n];if(1!==t.length){const t=e.map(n,up.script.data);i.push(t,this.Vi)}this.er(t,n,i,()=>this.nr(t))}er(n,i,r,s){return t(this,void 0,void 0,function*(){let t=up.error.guard(()=>n.apply(i,r));if(e.isPromise(t)){let e=up.error.guardPromise(t);this.Ui.push(e),t=yield e}t&&s(t)})}nr(t){let e=new up.Error(["Batch compiler (%s) cannot return a destructor",t.selector]);reportError(e)}Ji(t){return up.fragment.subtree(this.Ne,e.evalOption(t),{layer:this.q})}Yi(t){let n=this.Ji(t.selector);return t.rerun||(n=e.filter(n,e=>{let n=e.upAppliedCompilers||(e.upAppliedCompilers=new Set);if(!n.has(t))return n.add(t),!0})),n}}},7687(){const t=up.element,e=up.util;up.Layer=class Layer extends up.Record{keys(){return["element","stack","history","mode","context","lastScrollTops","lastFocusCapsules"]}defaults(){return{context:{},lastScrollTops:up.viewport.newStateCache(),lastFocusCapsules:up.viewport.newStateCache(),ir:void 0,rr:void 0,sr:void 0,ur:void 0}}constructor(t={}){super(t),e.assert(this.mode)}setupHandlers(){up.link.convertClicks(this),this.ar=up.on("up:location:changed",t=>this.lr(t))}teardownHandlers(){var t;null===(t=this.ar)||void 0===t||t.call(this)}mainTargets(){return up.layer.mainTargets(this.mode)}sync(){}accept(){throw new up.NotImplemented}dismiss(){throw new up.NotImplemented}peel(t){this.stack.peel(this,t)}evalOption(t){return e.evalOption(t,this)}isCurrent(){return this.stack.isCurrent(this)}isFront(){return this.stack.isFront(this)}isRoot(){return this.stack.isRoot(this)}isOverlay(){return this.stack.isOverlay(this)}isAlive(){throw new up.NotImplemented}assertAlive(){if(!this.isAlive())throw new up.Aborted("Layer is no longer alive")}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.cr)&&void 0!==t?t:this.cr=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 up.layer.closestLayerElement(t)===this.element}on(...t){return this.hr(t).bind()}off(...t){return this.hr(t).unbind()}hr(t){return up.EventListenerGroup.fromBindArgs(t,{guard:t=>this.pr(t),elements:[this.element],baseLayer:this})}pr(t){return this.contains(t.target)}wasHitByMouseEvent({clientX:t,clientY:e}){const n=document.elementFromPoint(t,e);return!n||this.contains(n)}dr(t){return up.EventEmitter.fromEmitArgs(t,{layer:this})}emit(...t){return this.dr(t).emit()}saveHistory(){e.assert(this.isFront()),this.showsLiveHistory("title")&&(this.ir=document.title),this.showsLiveHistory("metaTags")&&(this.rr=up.history.findMetaTags()),this.showsLiveHistory("location")&&(this.sr=up.history.location),this.showsLiveHistory("lang")&&(this.ur=up.history.getLang())}restoreHistory(){this.sr&&this.showsLiveHistory("location")&&up.history.push(this.sr),this.ir&&this.showsLiveHistory("title")&&(document.title=this.ir),this.rr&&this.showsLiveHistory("metaTags")&&up.history.updateMetaTags(this.rr),e.isString(this.ur)&&this.showsLiveHistory("lang")&&up.history.updateLang(this.ur)}asCurrent(t){return this.stack.asCurrent(this,t)}updateHistory(t){var n,i;e.isString(t.location)&&this.updateLocation(t.location,{push:!0}),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.mr(t.metaTags)),e.isString(t.title)&&this.updateTitle(t.title),e.isString(t.lang)&&this.gr(t.lang)}showsLiveHistory(t){return this.history&&this.isFront()&&up.history.isEnabled(t)}vr(t,e,n){return this.showsLiveHistory(t)||this.isRoot()&&void 0===e?n():e}lr({location:t}){this.showsLiveHistory("location")&&this.updateLocation(t,{push:!1})}get title(){return this.vr("title",this.ir,()=>document.title)}updateTitle(t){this.ir=t,this.showsLiveHistory("title")&&(document.title=t)}get metaTags(){return this.vr("metaTags",this.rr,up.history.findMetaTags)}mr(t){this.rr=t,this.showsLiveHistory("metaTags")&&up.history.updateMetaTags(t)}get lang(){return this.vr("lang",this.ur,up.history.getLang)}gr(t){this.ur=t,this.showsLiveHistory("lang")&&up.history.updateLang(t)}get location(){return this.vr("location",this.sr,()=>up.history.location)}updateLocation(t,{push:e}){let n=this.sr,i=up.history.location;this.sr=t,t!==i&&this.showsLiveHistory("location")&&e&&up.history.push(t),t!==n&&"opening"!==this.state&&this.emit("up:layer:location:changed",{location:t,previousLocation:n,log:!1})}selector(t){return this.constructor.selector(t)}static selector(t){throw new up.NotImplemented}toString(){throw new up.NotImplemented}affix(...e){return t.affix(this.getFirstSwappableElement(),...e)}[e.isEqual.key](t){return this.constructor===t.constructor&&this.element===t.element}hasFocus(){let t=document.activeElement;return t!==document.body&&this.element.contains(t)}reset(){Object.assign(this,this.defaults())}}},3383(){var t;up.Layer.Cover=((t=class Cover extends up.Layer.OverlayWithViewport{get[Symbol.toStringTag](){return"up.Layer.Cover"}}).mode="cover",t)},8268(){var t;up.Layer.Drawer=((t=class Drawer extends up.Layer.OverlayWithViewport{get[Symbol.toStringTag](){return"up.Layer.Drawer"}}).mode="drawer",t)},2009(){var t;up.Layer.Modal=((t=class Modal extends up.Layer.OverlayWithViewport{get[Symbol.toStringTag](){return"up.Layer.Modal"}}).mode="modal",t)},7304(){var t;const e=up.element,n=up.util;up.Layer.Overlay=((t=class Overlay extends up.Layer{keys(){return[...super.keys(),...this.constructor.VISUAL_KEYS,"onOpened","onAccept","onAccepted","onDismiss","onDismissed","onAcceptedReload","onDismissedReload","acceptEvent","dismissEvent","acceptLocation","dismissLocation","acceptFragment","dismissFragment"]}constructor(t){super(t),this.state="opening",!0===this.dismissible?this.dismissible=["button","key","outside"]:!1===this.dismissible?this.dismissible=[]:this.dismissible=n.getSimpleTokens(this.dismissible),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.br());const e=n.compactObject(n.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}),e.affix(this.dismissElement,'span[aria-hidden="true"]',{text:this.dismissLabel})}affixPart(t,n,i={}){return e.affix(t,this.selector(n),i)}static selector(t){return n.compact(["up",this.mode,t]).join("-")}br(){const{parent:t}=this;return this.mode===t.mode?1+t.br():0}setupHandlers(){var t,e;super.setupHandlers(),this.overlayFocus=new up.OverlayFocus(this),this.yr("button")&&this.createDismissElement(this.getBoxElement()),this.yr("outside")&&(this.viewportElement?up.on(this.viewportElement,"up:click",t=>{t.target===this.viewportElement&&this.wr(t,!0)}):this._r=this.parent.on("up:click",(t,e)=>{if(!up.layer.isWithinForeignOverlay(e)){const n=this.origin&&this.origin.contains(e);this.wr(t,n)}})),this.yr("key")&&(this.Or=up.event.onEscape(t=>this.onEscapePressed(t))),this.registerAttrCloser("up-accept",(t,e)=>{this.accept(t,e)}),this.registerAttrCloser("up-dismiss",(t,e)=>{this.dismiss(t,e)}),null===(e=(t=up.migrate).registerLayerCloser)||void 0===e||e.call(t,this),this.kr(this.acceptEvent,this.accept),this.kr(this.dismissEvent,this.dismiss),this.on("up:click","label[for]",(t,e)=>this.Sr(t,e))}Sr(t,n){let i=n.getAttribute("for"),r=up.form.fieldSelector(e.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()}}wr(t,e){var n;up.log.putsEvent(t),e&&up.event.halt(t),(null===(n=t.originalEvent)||void 0===n?void 0:n.detail)>1||up.error.muteUncriticalSync(()=>this.dismiss(":outside",{origin:t.target}))}onEscapePressed(t){if(!t.defaultPrevented&&this.isFront()){let e=up.form.focusedField();e?e.blur():this.yr("key")&&(up.event.halt(t,{log:!0}),up.error.muteUncriticalSync(()=>this.dismiss(":key")))}}registerAttrCloser(t,e){this.Er(t,e),this.jr(t,e)}Er(t,n){this.on("up:click",`[${t}]:not(form)`,(i,r)=>{up.event.halt(i,{log:!0});const s=e.jsonAttr(r,t);this.Cr(r,s,n)})}jr(t,e){this.on("submit",`[${t}]`,(t,n)=>{var i;up.event.halt(t,{log:!0});const r=up.Params.fromForm(t.target,{submitButton:null!==(i=t.submitter)&&void 0!==i&&i});this.Cr(n,r,e)})}Cr(t,e,n){const i={origin:t},r=new up.OptionsParser(t,i);r.booleanOrString("animation"),r.string("easing"),r.number("duration"),r.string("confirm"),up.error.muteUncriticalSync(()=>n(e,i))}kr(t,e){if(t)return this.on(t,t=>{t.preventDefault(),up.error.muteUncriticalSync(()=>e.call(this,t,{response:t.response}))})}tryAcceptForElements(t,e){this.Fr(this.acceptFragment,this.accept,t,e)}tryDismissForElements(t,e){this.Fr(this.dismissFragment,this.dismiss,t,e)}Fr(t,i,r,s){let o=n.findResult(r,n=>e.subtreeFirst(n,t));if(o){const t=up.data(o);up.error.muteUncriticalSync(()=>i.call(this,t,{response:s}))}}tryAcceptForLocation(t,e){this.Tr(t,this.acceptLocation,this.accept,e)}tryDismissForLocation(t,e){this.Tr(t,this.dismissLocation,this.dismiss,e)}Tr(t,e,n,i){let r=t&&(null==e?void 0:e.recognize(t));if(r){const e=Object.assign(Object.assign({},r),{location:t});up.error.muteUncriticalSync(()=>n.call(this,e,{response:i}))}}teardownHandlers(){var t,e;super.teardownHandlers(),null===(t=this._r)||void 0===t||t.call(this),null===(e=this.Or)||void 0===e||e.call(this)}destroyElements(t){const e=this.closeAnimationProps(t);up.destroy(this.element,Object.assign(Object.assign(Object.assign({},t),e),{onFinished:()=>{var e;this.onElementsRemoved(),null===(e=t.onFinished)||void 0===e||e.call(t)},log:!1}))}onElementsRemoved(){}Pr(t,e){return!up.motion.isNone(t)&&(e=this.backdrop&&e,(n,i)=>{const r=up.animate(this.getBoxElement(),t,i),s=up.animate(this.backdropElement,e,i);return Promise.all([r,s])})}startOpenAnimation(t={}){const e=this.openAnimationProps(t);return up.animate(this.element,e.animation,Object.assign(Object.assign({},e),{onFinished:()=>{var e;this.wasEverVisible=!0,null===(e=t.onFinished)||void 0===e||e.call(t)}}))}openAnimationProps(t={}){var e;let n=null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.openAnimation);return{animation:this.Pr(n,"fade-in"),easing:t.easing||this.openEasing,duration:t.duration||this.openDuration}}closeAnimationProps(t={}){var e,n;let i=this.wasEverVisible&&(null!==(e=t.animation)&&void 0!==e?e:this.evalOption(this.closeAnimation));return{animation:this.Pr(i,"fade-out"),easing:t.easing||this.closeEasing,duration:null!==(n=t.duration)&&void 0!==n?n:this.closeDuration}}isAlive(){return["opening","opened"].includes(this.state)}accept(t=null,e={}){return this.Rr("accept",t,e)}dismiss(t=null,e={}){return this.Rr("dismiss",t,e)}yr(t){return n.contains(this.dismissible,t)}Rr(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","dismissible","dismissLabel","dismissARIALabel","openAnimation","closeAnimation","openDuration","closeDuration","openEasing","closeEasing","trapFocus"],t.UNSET_VISUALS=n.spanObject(t.VISUAL_KEYS,void 0),t)},9454(){up.Layer.OverlayWithTether=class OverlayWithTether extends up.Layer.Overlay{createElements(){this.origin||up.fail("Missing { origin } option"),this.Lr=new up.Tether({anchor:this.origin,align:this.align,position:this.position}),this.createElement(this.Lr.parent),this.createContentElement(this.element)}onContentSet(){this.Lr.start(this.element)}onElementsRemoved(){this.Lr.stop()}sync(){this.isAlive()&&(up.fragment.isAlive(this.element)&&this.Lr.isAlive()?this.Lr.sync():this.dismiss(":detached",{animation:!1,preventable:!1}))}}},2084(){up.Layer.OverlayWithViewport=class OverlayWithViewport extends up.Layer.Overlay{static getParentElement(){return document.body}createElements(){up.viewport.bodyShifter.raiseStack(),this.createElement(this.constructor.getParentElement()),this.backdrop&&this.createBackdropElement(this.element),this.createViewportElement(this.element),this.createBoxElement(this.viewportElement),this.createContentElement(this.boxElement)}onElementsRemoved(){up.viewport.bodyShifter.lowerStack()}sync(){this.isAlive()&&!this.element.isConnected&&this.constructor.getParentElement().appendChild(this.element)}}},4526(){var t;up.Layer.Popup=((t=class Popup extends up.Layer.OverlayWithTether{get[Symbol.toStringTag](){return"up.Layer.Popup"}}).mode="popup",t)},3126(){var t;const e=up.element;up.Layer.Root=((t=class Root extends up.Layer{get element(){return e.root}constructor(t){super(t),this.setupHandlers()}getFirstSwappableElement(){return document.body}static selector(){return"html"}setupHandlers(){this.element.upHandlersApplied||(this.element.upHandlersApplied=!0,super.setupHandlers())}sync(){this.setupHandlers()}isAlive(){return!0}accept(){this.Ar()}dismiss(){this.Ar()}Ar(){up.fail("Cannot close the root layer")}get[Symbol.toStringTag](){return"up.Layer.Root"}toString(){return"root layer"}}).mode="root",t)},6088(){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.Te=n,this.Dr=e.getSimpleTokens(n.layer)}all(){let t=e.flatMap(this.Dr,t=>this.$r(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()}Mr(t){return t=n.get(t),this.i.layers.findLast(e=>e.contains(t))}Hr(t){return this.i.at(t)}$r(t){if(t instanceof up.Layer)return t;if(e.isNumber(t))return this.Hr(t);if(/^\d+$/.test(t))return this.Hr(Number(t));if(e.isElementLike(t))return this.Mr(t);switch(t){case"any":return[this.Nr(),...this.i.reversed()];case"current":return this.Nr();case"closest":return this.i.selfAndAncestorsOf(this.Nr());case"parent":return this.Nr().parent;case"ancestor":case"ancestors":return this.Nr().ancestors;case"child":return this.Nr().child;case"descendant":case"descendants":return this.Nr().descendants;case"subtree":return this.Nr().subtree;case"new":return"new";case"root":return this.i.root;case"overlay":case"overlays":return this.i.overlays.toReversed();case"front":return this.i.front;case"origin":return this.Br();default:return up.fail("Unknown { layer } option: %o",t)}}Br(){let{origin:t,originLayer:e}=this.Te;return e||(t?this.Mr(t):void 0)}Nr(){let{baseLayer:t}=this.Te;if(e.isString(t)){const e=Object.assign(Object.assign({},this.Te),{baseLayer:this.i.current,normalizeLayerOptions:!1,layer:t});return this.constructor.all(this.i,e)[0]}return t||this.Br()||this.i.current}},e.memoizeMethod(t.prototype,{Nr:!0,Br:!0}),t)},9156(){const t=up.util;up.LayerStack=class LayerStack{constructor(){this.Ir=[],this.layers=[this.qr()],this.Ur=[]}qr(){return up.layer.build({mode:"root",stack:this})}remove(e){t.remove(this.layers,e),this.Ur.push(e)}peel(t,e={}){var n;const i=t.descendants.toReversed(),r=Object.assign(Object.assign({},e),{preventable:!1}),s="accept"===e.intent?"accept":"dismiss",o=null!==(n=e.value)&&void 0!==n?n:":peel";for(let t of i)t[s](o,r)}reset(){this.peel(this.root,{animation:!1}),this.Ir=[],this.root.reset()}parentOf(t){return this.layers[t.index-1]}childOf(t){return this.layers[t.index+1]}ancestorsOf(t){return this.layers.slice(0,t.index).toReversed()}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.Ir.push(t),e()}finally{this.Ir.pop()}}reversed(){return this.layers.toReversed()}dismissOverlays(t=null,e={}){e.dismissible=!1;for(let n of this.overlays.toReversed())n.dismiss(t,e)}at(t){return this.layers[t]}indexOf(t){return this.layers.indexOf(t)}get count(){return this.layers.length}get attachedCount(){return this.Ur.length&&(this.Ur=this.Ur.filter(t=>t.element.isConnected)),this.layers.length+this.Ur.length}get root(){return this.layers[0]}get overlays(){return this.root.descendants}get current(){return t.last(this.Ir)||this.front}get front(){return t.last(this.layers)}}},6607(){const t=up.util;up.LinkCurrentURLs=class LinkCurrentURLs{constructor(e){if(this.zr=up.link.isSafe(e),this.zr){const n=e.getAttribute("href");n&&"#"!==n&&(this.Vr=t.matchableURL(n));const i=e.getAttribute("up-href");i&&(this.Kr=t.matchableURL(i));const r=e.getAttribute("up-alias");r&&(this.Xr=new up.URLPattern(r))}}isCurrent(t){var e,n;return!(!t||this.Vr!==t&&this.Kr!==t&&!(null===(n=null===(e=this.Xr)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1)))}isAnyCurrent(t){return t.some(t=>{var e,n;return this.Vr===t||this.Kr===t||(null===(n=null===(e=this.Xr)||void 0===e?void 0:e.test)||void 0===n?void 0:n.call(e,t,!1))})}}},9391(){const t=up.util,e=up.element;up.LinkFollowIntent=class LinkFollowIntent{constructor(t,e){this.Wr=t,this.Be=e,this.Gr=null,this.Jr("mouseenter mousedown touchstart",t=>this.Qr(t)),this.Jr("mouseleave",()=>this.Yr()),up.fragment.onAborted(this.Wr,()=>this.Yr())}Jr(t,e){up.on(this.Wr,t,{passive:!0},e)}Qr(e){if(up.link.shouldHandleClick(e,this.Wr)&&!this.Gr)if(this.Yr(),"mouseenter"===e.type){let n=this.Zr();this.ts=t.timer(n,()=>this.pn(e))}else this.pn(e)}Yr(){var t;clearTimeout(this.ts),(null===(t=this.Gr)||void 0===t?void 0:t.background)&&this.Gr.abort(),this.Gr=null}Zr(){var t;return null!==(t=e.numberAttr(this.Wr,"up-preload-delay"))&&void 0!==t?t:up.link.config.preloadDelay}pn(t){up.log.putsEvent(t),up.fragment.isAlive(this.Wr)&&this.Be({onRequestKnown:t=>this.Gr=t})}}},6705(){let t="up.log.enabled",e=!1;try{e=!!(null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem(t))}catch(t){}up.LogConfig=class LogConfig extends up.Config{constructor(){super("up.log.config",()=>({banner:!0,format:!navigator.webdriver}))}get enabled(){return e}set enabled(n){e=n;try{null===sessionStorage||void 0===sessionStorage||sessionStorage.setItem(t,n?"1":"")}catch(t){}}}},2049(){const t=up.util;up.MotionController=class MotionController{constructor(t){this.finishEvent=`up:${t}:finish`,this.es()}get nested(){return this.ns>0}startFunction(e,n){this.ns++;try{return this.rs.push(e),up.error.muteUncriticalRejection(n()).finally(()=>t.remove(this.rs,e))}finally{this.ns--}}finish(e=document.body){for(let n of this.ss(e)){t.remove(this.rs,n);for(let t of n)this.us(t)}}ss(e){return this.rs.filter(n=>t.some(n,t=>e.contains(t)))}us(t){return up.emit(t,this.finishEvent,{log:!1})}es(){this.ns=0,this.rs=[]}reset(){this.finish(),this.es()}}},567(){const t=up.element;up.NonceableCallback=class NonceableCallback{constructor(t,e){this.script=t,this.nonce=e}static fromCallbackString(t){let e=t.match(/^(nonce-(\S+)\s)?(.*)$/);return new this(e[3],e[2])}unsafeEval(t){return this.nonce?this.ls(t):this.cs(t)}toCallbackString(){return`nonce-${this.nonce} ${this.script}`}cs({argNames:t,argValues:e,thisContext:n}){return new Function(...t,this.script).apply(n,e)}ls(e){let n,i=`\n try {\n up.noncedEval.value = (function(${e.argNames.join()}) {\n ${this.script}\n }).apply(up.noncedEval.thisContext, up.noncedEval.argValues)\n } catch (error) {\n up.noncedEval.error = error\n }\n `;try{if(up.noncedEval=Object.assign({},e),n=t.affix(document.body,"script",{nonce:this.nonce,text:i}),up.noncedEval.error)throw up.noncedEval.error;return up.noncedEval.value}finally{up.noncedEval=void 0,null==n||n.remove()}}}},7080(){const t=up.util,e=up.element;up.OptionsParser=class OptionsParser{constructor(t,e,n={}){var i;this.Te=e,this.U=t,this.hs=n.fail,this.ps=n.closest,this.fs=n.attrPrefix||"up-",this.ds=null!==(i=n.defaults)&&void 0!==i?i:{}}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)}booleanOrNumberOrString(t,n){this.parse(e.booleanOrNumberOrStringAttr,t,n)}json(t,n){this.parse(e.jsonAttr,t,n)}renderCallback(t,e={}){this.parse((e,n)=>up.RenderOptions.callbackAttr(e,n,t),t,e)}parse(e,n,i={}){var r,s;const o=t.wrapList(null!==(r=i.attr)&&void 0!==r?r:this.gs(n));let u,a=this.Te[n];for(let t of o)null!=a||(a=this.vs(e,this.U,t));if(!1!==this.ds&&(null!=a||(a=null!==(s=i.default)&&void 0!==s?s:this.ds[n])),t.isDefined(a)){let t=i.normalize;t&&(a=t(a)),this.Te[n]=a}if(this.hs&&(u=up.fragment.failKey(n))){const n=t.compact(t.map(o,t=>this.bs(t)));this.parse(e,u,Object.assign(Object.assign({},i),{attr:n}))}}include(t,e){let n=t(this.U,this.Te,Object.assign({defaults:this.ds},e));Object.assign(this.Te,n)}vs(t,n,i){return this.ps?e.closestAttr(n,i,t):t(n,i)}bs(t){return this.ys(t,this.fs+"on-")||this.ys(t,this.fs)}ys(t,e){if(t.startsWith(e))return`${e}fail-${t.substring(e.length)}`}gs(e){return`${this.fs}${t.camelToKebabCase(e)}`}}},5637(){const t=up.element;up.OverlayFocus=class OverlayFocus{constructor(t){this.q=t,this.Yn=this.q.getFocusElement(),this.ws=this.q.trapFocus}moveToFront(){this._s||(this._s=!0,this.Os=t.setAttrsTemp(this.Yn,{tabindex:"0",role:"dialog","aria-modal":this.ws.toString()}),this.ws&&(this.ks=up.on("focusin",t=>this.Ss(t)),this.Es=t.affix(this.Yn,"beforebegin","up-focus-trap[tabindex=0]"),this.js=t.affix(this.Yn,"afterend","up-focus-trap[tabindex=0]")))}moveToBack(){this.teardown()}teardown(){this._s&&(this._s=!1,this.Os(),this.ws&&(this.ks(),this.Es.remove(),this.js.remove()))}Ss(t){const{target:e}=t;this.Cs||up.layer.isWithinForeignOverlay(e)||(this.Cs=!0,e===this.Es?this.xs():e!==this.js&&this.q.contains(e)||this.Fs(),this.Cs=!1)}Fs(t){up.focus(this.Yn,t)}xs(){this.Ts(this.q.getBoxElement())||this.Fs()}Ts(t){for(let e of[...t.children].toReversed())if(up.viewport.tryFocus(e)||this.Ts(e))return!0}}},4718(){const t=up.util,e=up.element;up.Params=class Params{constructor(t){this.clear(),this.addAll(t)}clear(){this.entries=[]}[t.copy.key](){return new up.Params(this)}toObject(){const e={};for(let n of this.entries){const{name:i,value:r}=n;t.isBasicObjectProperty(i)||(this.Ps(i)?(e[i]||(e[i]=[]),e[i].push(r)):e[i]=r)}return e}toArray(){return this.entries}toFormData(){const t=new FormData;for(let e of this.entries)t.append(e.name,e.value);return t.entries||(t.originalArray=this.entries),t}toQuery(){return this.withoutBinaryEntries().entries.map(this.Rs).join("&")}get[Symbol.toStringTag](){return"up.Params"}toString(){return this.toQuery()}Rs(e){const{value:n}=e;let i=encodeURIComponent(e.name);return t.isGiven(n)&&(i+="=",i+=encodeURIComponent(n)),i}Ls({value:t}){return t instanceof Blob}hasBinaryEntries(){return t.some(this.entries,this.Ls)}withoutBinaryEntries(){let e=t.reject(this.entries,this.Ls);return new this.constructor(e)}toURL(e){let n=[e,this.toQuery()];n=t.filter(n,t.isPresent);const i=t.contains(e,"?")?"&":"?";return n.join(i)}add(t,e){this.entries.push({name:t,value:e})}addAll(e){t.isMissing(e)||(e instanceof this.constructor?this.entries.push(...e.entries):t.isArray(e)?this.entries.push(...e):t.isString(e)?this.As(e):t.isFormData(e)?this.Ds(e):t.isObject(e)?this.$s(e):up.fail("Unsupported params type: %o",e))}keys(){return t.map(this.entries,"name")}values(){return t.map(this.entries,"value")}$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)}}As(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)}}Ds(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.Ms(e))}Ms(t){return e=>e.name===t}get(t){return this.Ps(t)?this.getAll(t):this.getFirst(t)}getFirst(e){const n=t.find(this.entries,this.Ms(e));return null==n?void 0:n.value}getAll(e){const n=t.filter(this.entries,this.Ms(e));return t.map(n,"value")}Ps(e){return t.evalOption(up.form.config.arrayParam,e)}[t.isBlank.key](){return 0===this.entries.length}static fromForm(t,n={}){var i;t=e.get(t);let r=up.form.prepareParamsReadTemp(t);try{let r=e.get(null!==(i=n.submitButton)&&void 0!==i?i:up.form.defaultSubmitButton(t))||void 0,s=new this(new FormData(t,r)),o=new Set(t.elements);for(let e of up.form.fields(t))o.has(e)||e.closest("fieldset:disabled")||s.addField(e);return s}finally{r()}}static fromContainer(t,e){return this.fromFields(up.form.fields(t),e)}static fromFields(e,{includeDisabled:n}={}){const i=new this;for(let r of t.wrapList(e))i.addField(r,{includeDisabled:n});return i}addField(n,{includeDisabled:i}={}){n=e.get(n);let r=up.form.readFieldName(n);if(!r||up.form.readFieldDisabled(n)&&!i&&!n.upPreviewDisabled)return;let{tagName:s,type:o}=n,u=[];if("SELECT"===s)u=t.map(n.selectedOptions,"value");else if("checkbox"===o||"radio"===o)n.checked&&(u=[up.form.readFieldValue(n)]);else if("file"===o)u=n.files;else{let e=up.form.readFieldValue(n);t.isDefined(e)&&(u=[e])}for(let t of u)this.add(r,t)}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.entries,e.entries)}static fromURL(e){const n=new this;let i=t.parseURL(e).search;return i&&(i=i.replace(/^\?/,""),n.addAll(i)),n}static stripURL(e){return t.normalizeURL(e,{search:!1})}static merge(e,...n){let i=t.copy(e);for(let e of n){let n=t.wrapValue(this,e);for(let t of n.keys())i.delete(t);i.addAll(n)}return i}}},8354(){const t=up.util,e=up.element;up.Preview=class Preview{constructor({fragment:t,request:e,renderOptions:n,cleaner:i}){this.fragment=t,this.request=e,this.renderOptions=n,this.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.Hs(t,"val","val");this.undo(e.setAttrsTemp(n,i))}addClass(...t){let[n,i]=this.Hs(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.Hs(t,"val","val");this.undo(e.removeClassTemp(n,i))}setStyle(...t){let[n,i]=this.Hs(t,"val","val");this.undo(e.setStyleTemp(n,i))}disable(...t){let[e]=this.Hs(t,"val");this.undo(up.form.disableTemp(e,{preview:!0}))}insert(...e){let[n,i="beforeend",r]=this.Hs(e,"val",t.isAdjacentPosition,"val");this.undo(up.fragment.insertTemp(n,i,r))}show(...t){let[n]=this.Hs(t,"val");this.undo(e.showTemp(n))}hide(...t){let[n]=this.Hs(t,"val");this.undo(e.hideTemp(n))}hideContent(...t){let[n]=this.Hs(t,"val"),i=e.wrapChildren(n);e.hide(i),this.undo(()=>e.unwrap(i))}showPlaceholder(...t){let[e,n]=this.Hs(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.Hs(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}Hs(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]}}},2077(){const t=up.element;up.ProgressBar=class ProgressBar{constructor(){this.Ns=0,this.U=t.affix(document.body,"up-progress-bar"),this.U.style.transition="width 300ms ease-out",this.Bs(0),t.paint(this.U),this.Is=31,this.qs()}qs(){let t;t=this.Is<80?Math.random()<.15?7+5*Math.random():1.5+.5*Math.random():.13*(100-this.Is)*Math.random(),this.Bs(this.Is+t),this.Ns++;const e=300+40*this.Ns;this.timeout=setTimeout(this.qs.bind(this),e)}Bs(t){this.Is=t,this.U.style.width=`${t}vw`}destroy(){clearTimeout(this.timeout),this.U.remove()}conclude(){clearTimeout(this.timeout),this.Bs(100),setTimeout(this.destroy.bind(this),300)}}},8065(){const t=up.util;up.Record=class Record{keys(){throw"Return an array of keys"}defaults(t){return{}}constructor(e){Object.assign(this,t.mergeDefined(this.defaults(e),this.attributes(e)))}attributes(e=this){return t.pick(e,this.keys())}[t.copy.key](){return t.variant(this)}[t.isEqual.key](e){return this.constructor===e.constructor&&t.isEqual(this.attributes(),e.attributes())}}},3394(){up.Rect=class Rect extends up.Record{keys(){return["left","top","width","height"]}get bottom(){return this.top+this.height}get right(){return this.left+this.width}grow(t){this.left-=t,this.top-=t,this.width+=2*t,this.height+=2*t}static fromElement(t){return new this(t.getBoundingClientRect())}static fromElementAsFixed(t){let e=t.cloneNode(!0);t.after(e),e.style.position="fixed";let n=this.fromElement(e);return e.remove(),n}}},8183(){const t=up.util;up.Registry=class Registry{constructor(e,n=t.identity){this.Bi={},this.Us=n,this.zs=e,this.put=this.put.bind(this),document.addEventListener("up:framework:reset",()=>this.reset())}put(t,e){(e=this.Us(e)).isDefault=up.framework.evaling,this.Bi[t]=e}get(t){return this.Bi[t]||up.fail("Unknown %s %o",this.zs,t)}reset(){this.Bi=t.pickBy(this.Bi,"isDefault")}}},4572(){var t,e=this&&this.wt||function(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,u)}a((i=i.apply(t,e||[])).next())})};const n=up.util;up.RenderJob=(t=class RenderJob{constructor(t){this.renderOptions=t}execute(){return this.Vs=this.Ks(),this}Ks(){return e(this,void 0,void 0,function*(){try{this.Xs(),this.renderOptions=up.RenderOptions.preprocess(this.renderOptions),up.browser.assertConfirmed(this.renderOptions),up.RenderOptions.assertContentGiven(this.renderOptions);let t=yield this.Ws().execute();return this.Gs(t),t}catch(t){throw this.Gs(t)||this.Js(t),t}})}Gs(t){if(t instanceof up.RenderResult){let{onRendered:e,onFinished:n}=t.renderOptions;t.none||up.error.guard(()=>null==e?void 0:e(t));let i=function(t){up.error.guard(()=>null==n?void 0:n(t))};return this.finished.then(i,e=>!t.ok&&e instanceof up.RenderResult&&i(e)),!0}}Js(t){let e=t instanceof up.Aborted?"Rendering was aborted":"Error while rendering";up.puts("up.render()",`${e}: ${t.name}: ${t.message}`),up.error.guard(()=>{var e,n;return null===(n=(e=this.renderOptions).onError)||void 0===n?void 0:n.call(e,t)})}get finished(){return this.Qs()}Qs(){return e(this,void 0,void 0,function*(){try{let t=yield this.Vs;return yield t.finished}catch(t){throw t instanceof up.RenderResult?yield t.finished:t}})}Ws(){let t=n.memoize(t=>this.Ys(t)),e=Object.assign(Object.assign({},this.renderOptions),{handleAbort:t});return e.url?new up.Change.FromURL(e):e.response?new up.Change.FromResponse(e):new up.Change.FromContent(e)}Xs(){let t=n.pluckKey(this.renderOptions,"guardEvent");if(t&&(t.renderOptions=this.renderOptions,up.emit(t,{target:this.renderOptions.origin}).defaultPrevented))throw new up.Aborted(`Rendering was prevented by ${t.type} listener`)}Ys({bindFragments:t,bindLayer:e,origin:i,layer:r,request:s}){let{abort:o}=this.renderOptions;if(!o)return;let u={except:s,logOnce:["up.render()","Change with { abort } option will abort other requests"],newLayer:"new"===r,origin:i,jid:this.renderOptions.jid};"target"===o?up.fragment.abort(t,Object.assign({},u)):"layer"===o?up.fragment.abort(Object.assign(Object.assign({},u),{layer:e})):"all"===o||!0===o?up.fragment.abort(Object.assign(Object.assign({},u),{layer:"any"})):n.isFunction(o)?o(u):up.fragment.abort(o,Object.assign(Object.assign({},u),{layer:e}))}},n.delegatePromise(t.prototype,function(){return this.Vs}),n.memoizeMethod(t.prototype,{Qs:!0,Ws:!0}),t)},541(){const t=up.util;up.RenderOptions=function(){const e=["url","method","origin","headers","params","cache","fallback","abort","abortable","handleAbort","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"],r={},s={argNames:["result"]},o={expandObject:["layer","value","response"]},u={onLoaded:r,onRendered:s,onFinished:s,onOffline:r,onError:{argNames:["error"]},onOpened:{expandObject:["layer"]},onAccept:o,onAccepted:o,onDismiss:o,onDismissed:o};function a(t){var e;return null!==(e=u[t])&&void 0!==e?e:up.fail(`Unknown callback { ${t} }`)}return{preprocess:function(e){var n,r;null===(r=(n=up.migrate).preprocessRenderOptions)||void 0===r||r.call(n,e),up.layer.normalizeOptions(e),function(e){t.renameKey(e,"useData","data"),t.renameKey(e,"useHungry","hungry"),t.renameKey(e,"useKeep","keep")}(e);const s=t.merge(up.fragment.config.renderOptions,function(t){if(t.navigate)return up.fragment.config.navigateOptions}(e));return t.merge(t.omit(s,i),{defaults:s},{inputDevice:up.event.inputDevice},e,function({url:e}){if(e)return{url:t.normalizeURL(e)}}(e),function({origin:t,originLayer:e}){if(t&&!e)return{originLayer:up.layer.get(t)}}(e))},finalize:function(e,n){return t.merge(e.defaults,n,e)},assertContentGiven:function(e){t.some(n,n=>t.isGiven(e[n]))||(e.defaultToEmptyContent?e.content="":up.fail("up.render() needs either { "+n.join(", ")+" } option"))},deriveFailOptions:function(n){let i={didFail:!0},r=function(t){const e={};for(let n in t){const i=t[n];let r=up.fragment.successKey(n);r&&(e[r]=i)}return e}(n);return n.failOptions?Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({},n.defaults),t.pick(n,e)),r),{didForceFailOptions:!0}),i):Object.assign(Object.assign(Object.assign({},n),r),i)},parseCallback:function(t,e){return up.script.parseCallback(e,a(t))},callbackAttr:function(t,e,n){return up.script.callbackAttr(t,e,a(n))},chainCallbacks:function(e,n){let i=Object.assign({},e);for(let r in n)i[r]=t.sequence(n[r],e[r]);return 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:"keep",focus:"keep",confirm:!1}}}()},7718(){var t=this&&this.wt||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.RenderResult=class RenderResult{constructor({layer:t,target:e,renderOptions:n={},partialResults:i=[]}={}){this.layer=t,this.target=e,this.renderOptions=n,this.fragments=this.Zs(i,"fragments").flat(),this.finished=this.eo(i)}Zs(t,n,i){return e.compact([...e.map(t,n),i])}eo(e){return t(this,void 0,void 0,function*(){let t=this.Zs(e,"finished"),n=this.Zs(e,"verifyFinished",this.renderOptions.verifyFinished);yield Promise.all(t);let i=this;for(let t of n)i=(yield t(i))||i;return i})}get none(){return!this.fragments.length}get fragment(){return this.fragments[0]}get ok(){return!this.renderOptions.didFail}}},6351(){var t;const e=up.util;up.Request=(t=class Request extends up.Record{keys(){return["method","url","hash","params","target","failTarget","headers","timeout","background","cache","expireCache","evictCache","layer","mode","context","failLayer","failMode","failContext","origin","originLayer","originMode","builtAt","wrapMethod","contentType","payload","onLoading","onSettle","fail","abortable","lateDelay","previews"]}defaults(){let t=up.network.config;return{state:"new",abortable:!0,expired:!1,headers:{},timeout:t.timeout,builtAt:new Date,previews:[],wrapMethod:t.wrapMethod}}constructor(t){var n,i,r;if(super(t),this.params=new up.Params(this.params),this.Us(),(this.target||this.layer||this.origin)&&!t.basic){const t={origin:this.origin};this.layer=up.layer.get(this.layer,t),this.context||(this.context=this.layer.context||{}),this.mode||(this.mode=this.layer.mode),this.failLayer=up.layer.get(this.failLayer,t),this.failContext||(this.failContext=(null===(n=this.failLayer)||void 0===n?void 0:n.context)||{}),this.failMode||(this.failMode=null===(i=this.failLayer)||void 0===i?void 0:i.mode),this.originLayer||(this.originLayer=up.layer.get(this.origin)||up.layer.current),this.originMode||(this.originMode=null===(r=this.originLayer)||void 0===r?void 0:r.mode)}this.bindLayer=t.bindLayer||this.layer,this.no=t.fragments,this.io=t.bindFragments,this.ro=e.newDeferred(),this.so()}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.oo)&&void 0!==t?t:this.oo=new XMLHttpRequest}get fragments(){return this.no||(this.no=this.uo())}uo(){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.io||this.fragments}get fragment(){var t;return null===(t=this.fragments)||void 0===t?void 0:t[0]}Us(){this.method=e.normalizeMethod(this.method),this.ao(),this.lo(),this.url=e.normalizeURL(this.url)}co(){e.task(()=>{this.layer=void 0,this.failLayer=void 0,this.bindLayer=void 0,this.origin=void 0,this.originLayer=void 0,this.no=void 0,this.io=void 0})}ao(){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]}lo(){!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 up.network.config.cacheEnabled&&e.evalAutoOption(this.cache,up.network.config.autoCache,this)}runQueuedCallbacks(){e.always(this,()=>this.co())}load(){var t;if("new"===this.state)return this.ho()?(this.state="loading",this.Us(),null===(t=this.onLoading)||void 0===t||t.call(this),this.expired=!1,new up.Request.XHRRenderer(this).buildAndSend({onload:()=>this.po(),onerror:()=>this.fo(),ontimeout:()=>this.do(),onabort:()=>this.mo()}),!0):void this.abort({reason:"Prevented by event listener"})}runPreviews(t){this.ended||this.fromCache||(this.vo=up.status.runPreviews(this,t))}ho(){return!this.emit("up:request:load",{log:["Loading %s",this]}).defaultPrevented}loadPage(){up.network.abort(),new up.Request.FormRenderer(this).buildAndSubmit()}po(){const t=this.bo(),e=["Loaded %s",t];this.emit("up:request:loaded",{request:t.request,response:t,log:e}),this.respondWith(t)}fo(){this.yo("Network error")}do(){this.yo("Timeout")}mo(){this.wo()}abort({reason:t}={}){this.wo(t)&&this.oo&&this.oo.abort()}wo(t="Unknown reason"){if(this.ended)return;let e=["Aborted request to %s: %s",this,t];return this.state="aborted",this._o(new up.Aborted(e)),this.emit("up:request:aborted",{log:e}),!0}yo(t="Unknown reason"){if(this.ended)return;let e=["Cannot load request from %s: %s",this,t];this.state="offline",this.emit("up:request:offline",{log:e}),this._o(new up.Offline(e,{reason:t,request:this}))}respondWith(t){this.response=t,this.ended||(this.state="loaded",t.ok?this.Oo(t):this._o(t))}Oo(t){this.ro.resolve(t),this.ko(t)}_o(t){this.ro.reject(t),this.ko(t)}ko(t){var e,n;null===(e=this.vo)||void 0===e||e.call(this),null===(n=this.onSettle)||void 0===n||n.call(this,t)}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)}bo(){const t={method:this.method,url:this.url,request:this,xhr:this.xhr,text:this.xhr.responseText,status:this.xhr.status,title:up.protocol.titleFromXHR(this.xhr),target:up.protocol.targetFromXHR(this.xhr),openLayer:up.protocol.openLayerFromXHR(this.xhr),acceptLayer:up.protocol.acceptLayerFromXHR(this.xhr),dismissLayer:up.protocol.dismissLayerFromXHR(this.xhr),eventPlans:up.protocol.eventPlansFromXHR(this.xhr),context:up.protocol.contextFromXHR(this.xhr),expireCache:up.protocol.expireCacheFromXHR(this.xhr),evictCache:up.protocol.evictCacheFromXHR(this.xhr),fail:this.fail};let n=up.protocol.methodFromXHR(this.xhr),i=up.protocol.locationFromXHR(this.xhr);return i&&(e.matchURLs(this.url,i)||n||(n="GET"),t.url=i),n&&(t.method=n),new up.Response(t)}dr(t){return up.EventEmitter.fromEmitArgs(t,{layer:this.bindLayer,request:this,origin:this.origin})}emit(...t){return this.dr(t).emit()}assertEmitted(...t){this.dr(t).assertEmitted()}get[Symbol.toStringTag](){return"up.Request"}toString(){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]}so(){for(let t of["target","failTarget","mode","failMode","context","failContext","originMode"])this.So(t);let t,e;(t=this.csrfHeader())&&(e=this.csrfToken())&&this.Eo(t,e),this.Eo(up.protocol.headerize("version"),up.version)}So(t){this.Eo(up.protocol.headerize(t),this[t])}Eo(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.no=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.ro}),t)},7294(){var t=this&&this.wt||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.jo={},this.Co=[]}get(t){t=this.xo(t);let e=this.Fo(t),n=e.matchBest(t);if(n){if(this.To(n))return n;this.Po(t,e)}}put(e){return t(this,void 0,void 0,function*(){e=this.xo(e);let t=this.Fo(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.Co.push(e),this.Ro()})}track(n,i){return t(this,arguments,void 0,function*(t,n,i={}){var r;let s;if(n.trackedRequest=t,n.state="tracking",t.ended&&t.response)s=t.response;else if(s=yield e.always(t),n.ended)return;s instanceof up.Response?i.force||t.cacheRoute.satisfies(t,n)?(n.fromCache=!0,s=e.variant(s,{request:n}),n.respondWith(s),e.delegate(n,["expired","state"],()=>t)):(delete n.trackedRequest,n.state="new",null===(r=i.onIncompatible)||void 0===r||r.call(i,n)):(n.state=t.state,n._o(s))})}willHaveSameResponse(t,e){return t===e||t===e.trackedRequest}evict(t=!0,e){this.Lo(t,e,t=>this.Po(t))}expire(t=!0,e){this.Lo(t,e,t=>t.expired=!0)}reindex(t){this.Po(t),delete t.cacheRoute,this.put(t)}Po(t){var n;e.remove(this.Co,t),null===(n=t.cacheRoute)||void 0===n||n.delete(t)}Fo(t){var e,n;return t.cacheRoute||(e=this.jo)[n=t.method+" "+t.url]||(e[n]=new Route)}To(t){return t.age<up.network.config.cacheEvictAge}get currentSize(){return this.Co.length}get dn(){return up.network.config.cacheSize}Ro(){for(let t=0;t<this.currentSize-this.dn;t++)this.Po(this.Co[0])}Lo(t=!0,n,i){let r=up.Request.tester(t,n),s=e.filter(this.Co,r);e.each(s,i)}xo(t){return e.wrapValue(up.Request,t)}}},1588(){const t=up.util,e=up.element,n=["GET","POST"];up.Request.FormRenderer=class FormRenderer{constructor(t){this._t=t}buildAndSubmit(){this.params=this._t.params.withoutBinaryEntries();let i=this._t.url,{method:r}=this._t;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.wn=e.affix(document.body,"form.up-request-loader",{method:r,action:i});let o,u,a=this._t.contentType;a&&this.wn.setAttribute("enctype",a),(o=this._t.csrfParam())&&(u=this._t.csrfToken())&&this.params.add(o,u),t.each(this.params.toArray(),this.Ao.bind(this)),up.browser.submitForm(this.wn)}Ao(t){e.affix(this.wn,"input[type=hidden]",t)}}},4823(){const t=up.util;up.Request.Queue=class Queue{constructor(){this.reset()}reset(){this.Do=[],this.$o=[],this.Mo=[],this.Ho=!1}track(e){this.Mo.push(e),t.always(e,()=>{t.remove(this.Mo,e)})}get allRequests(){return this.$o.concat(this.Do)}asap(e){e.runQueuedCallbacks(),t.always(e,()=>this.Rt(e)),this.No(e),this.Bo(e),queueMicrotask(()=>this.Io())}promoteToForeground(t){t.background&&(t.background=!1,this.No(t))}No(e){if(!e.isTimed())return;let n=Math.max(e.effectiveLateTime-e.age);t.timer(n,()=>this.qo())}Uo(){return t.evalOption(up.network.config.concurrency)}zo(){const t=this.Uo();return-1===t||this.$o.length<t}get size(){return this.allRequests.length}isBusy(){return this.size>0}Bo(t){this.Do.push(t)}Vo(){let e=t.find(this.Do,t=>!t.background);return e||(e=this.Do[0]),t.remove(this.Do,e)}Ko(t){t.load()&&this.$o.push(t)}Rt(e){t.remove(this.$o,e)||t.remove(this.Do,e),queueMicrotask(()=>this.Io()),t.task(()=>this.Xo())}Io(){let t;if(this.zo()&&(t=this.Vo()))return this.Ko(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.$o,this.Do,this.Mo]){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)}}qo(){!this.Ho&&this.Wo()&&(this.Ho=!0,up.emit("up:network:late",{log:"Server is slow to respond"}))}Xo(){this.Ho&&!this.Go.length&&(this.Ho=!1,up.emit("up:network:recover",{log:"Slow requests were loaded"}))}get Go(){return this.allRequests.filter(t=>t.isTimed())}Wo(){return t.some(this.Go,t=>t.age>=t.effectiveLateTime-1)}}},6374(){var t;const e="multipart/form-data",n=up.util;up.Request.XHRRenderer=(t=class XHRRenderer{constructor(t){this._t=t}buildAndSend(t){const e=this._t.xhr;this.Jo=n.copy(this._t.params),this._t.timeout&&(e.timeout=this._t.timeout),e.open(this.Qo(),this._t.url);let i=this.Yo();i&&e.setRequestHeader("Content-Type",i);for(let t in this._t.headers){let n=this._t.headers[t];e.setRequestHeader(t,n)}Object.assign(e,t),e.send(this.Zo())}Qo(){let t=this._t.method;return this._t.wrapMethod&&!this._t.will302RedirectWithGET()&&(t=up.protocol.wrapMethod(t,this.Jo)),t}Yo(){return this.tu(),this.eu}Zo(){return this.tu(),this.nu}tu(){this.nu=this._t.payload,this.eu=this._t.contentType,!this.nu&&this._t.allowsPayload()&&(this.eu||(this.eu=this.Jo.hasBinaryEntries()?e:"application/x-www-form-urlencoded"),this.eu===e?(this.eu=null,this.nu=this.Jo.toFormData()):this.nu=this.Jo.toQuery().replace(/%20/g,"+"))}},n.memoizeMethod(t.prototype,{tu:!0,Qo:!0}),t)},8072(){const t=up.util,e=/^(text\/html|application\/xhtml\+xml) *(;|$)/i;up.Response=class Response extends up.Record{keys(){return["method","url","text","status","request","xhr","target","title","openLayer","acceptLayer","dismissLayer","eventPlans","context","expireCache","evictCache","headers","loadedAt","fail"]}defaults(){return{headers:{},loadedAt:new Date}}get ok(){var e;return!t.evalOption(null!==(e=this.fail)&&void 0!==e?e:up.network.config.fail,this)}get none(){return!this.text}header(t){var e;return this.headers[t]||(null===(e=this.xhr)||void 0===e?void 0:e.getResponseHeader(t))}get varyHeaderNames(){let e=this.header("Vary");return t.getSimpleTokens(e,{separator:","})}get contentType(){return this.header("Content-Type")}isHTML(){return e.test(this.contentType)}get cspInfo(){let t=this.header("Content-Security-Policy")||this.header("Content-Security-Policy-Report-Only");return up.CSPInfo.fromHeader(t)}get lastModified(){let t=this.header("Last-Modified");if(t)return new Date(t)}get etag(){return this.header("ETag")}get json(){return this.parsedJSON||(this.parsedJSON=JSON.parse(this.text))}get age(){return new Date-this.loadedAt}get expired(){return this.age>up.network.config.cacheExpireAge||this.request.expired}get[Symbol.toStringTag](){return"up.Response"}toString(){return`HTTP ${this.status} response to ${this.request}`}get redirect(){return this.url!==this.request.url||this.method!==this.request.method}get redirectRequest(){if(!this.redirect)return;let e=t.variant(this.request,{method:this.method,url:this.url,cacheRoute:null,onSettle:null});return up.cache.track(this.request,e,{force:!0}),e}}},6858(){var t;const e=up.util,n=up.element;up.ResponseDoc=(t=class ResponseDoc{constructor({document:t,fragment:e,content:n,target:i,origin:r,data:s,cspInfo:o,match:u}){if(t?this.iu(t,r,s):e?this.ru(e,r,s):this.su(n||"",r,i,s),this.ou=o,up.script.warnOfUnsafeCSP(o),r){let t=up.fragment.tryToTarget(r);t&&(this.uu=this.select(t))}this.Un=u}iu(t,i,r){if(t instanceof Document)this.qn=t,this.au=!0;else if(e.isString(t)){this.au=n.isFullDocumentHTML(t);let e=t=>[n.createBrokenDocumentFromHTML(t)],s=up.fragment.provideNodes(t,{origin:i,data:r,htmlParser:e});s[0]instanceof Document?this.qn=s[0]:this.qn=this.lu(s)}else this.qn=this.lu(t)}ru(t,e,i){let r=n.extractSingular(up.fragment.provideNodes(t,{origin:e,data:i}));this.qn=this.lu(r)}su(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.qn=this.lu(a)}lu(t){t=e.wrapList(t);let n=document.createElement("up-document");return n.append(...t),n}rootSelector(){return up.fragment.toTarget(this.qn.children[0])}get title(){return this.cu(this.hu)}getHead(){if(this.au)return this.qn.head}cu(t){let e=this.getHead();return e&&t(e)}get metaTags(){return this.cu(up.history.findMetaTags)}get assets(){return this.cu(t=>{let i=up.script.findAssets(t);return e.map(i,t=>(t=n.revivedClone(t),up.script.adoptDetachedHeadAsset(t,this.ou),t))})}get lang(){if(this.au)return up.history.getLang(this.qn)}hu(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.uu,document:this.qn,match:this.Un}).find()}selectSteps(t){return t.filter(t=>this.pu(t)||this.fu(t))}commitSteps(t){return t.filter(t=>this.commitElement(t.newElement))}pu(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)}fu(t){if(!t.maybe)throw new up.CannotMatch}commitElement(t){if(this.qn.contains(t))return up.script.adoptNewFragment(t,this.ou),t.remove(),!0}finalizeElement(t){if(this.qn instanceof Document)for(let e of n.subtree(t,":is(noscript, script, audio, video):not(.up-keeping, .up-keeping *)")){let t=n.revivedClone(e);e.replaceWith(t)}}},e.memoizeMethod(t.prototype,{getHead:!0}),t)},9918(){const t=up.element,e=up.util;up.RevealMotion=class RevealMotion{constructor(e,n={}){var i,r,s,o,u,a,l,c,h;this.U=e,this.du=t.get(n.viewport)||up.viewport.get(this.U),this.mu=up.layer.get(this.du),this.gu=null!==(i=n.behavior)&&void 0!==i?i:"instant";const p=up.viewport.config;this.vu=null!==(s=null!==(r=n.snap)&&void 0!==r?r:n.revealSnap)&&void 0!==s?s:p.revealSnap,this.bu=null!==(u=null!==(o=n.padding)&&void 0!==o?o:n.revealPadding)&&void 0!==u?u:p.revealPadding,this.yu=null!==(l=null!==(a=n.top)&&void 0!==a?a:n.revealTop)&&void 0!==l?l:p.revealTop,this.wu=null!==(h=null!==(c=n.max)&&void 0!==c?c:n.revealMax)&&void 0!==h?h:p.revealMax,this._u=p.selector("fixedTopSelectors"),this.Ou=p.selector("fixedBottomSelectors")}start(){const t=this.ku(this.du),n=up.Rect.fromElement(this.U);if(this.wu){const t=e.evalOption(this.wu,this.U);n.height=Math.min(n.height,t)}n.grow(this.bu),this.Su(t),t.height<0&&up.fail("Viewport has no visible area");const i=this.du.scrollTop;let r=i;this.yu||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.vu)&&r<this.vu&&n.top<.5*t.height&&(r=0),r!==i&&this.du.scrollTo({top:r,behavior:this.gu})}ku(){return up.viewport.isRoot(this.du)?new up.Rect({left:0,top:0,width:up.viewport.rootWidth(),height:up.viewport.rootHeight()}):up.Rect.fromElement(this.du)}Eu(n){let i=up.fragment.all(n,{layer:this.mu});return i=e.filter(i,t.isVisible),e.map(i,e=>"sticky"===t.style(e,"position")?up.Rect.fromElementAsFixed(e):up.Rect.fromElement(e))}Su(t){for(let e of this.Eu(this._u)){let n=e.bottom-t.top;n>0&&(t.top+=n,t.height-=n)}for(let e of this.Eu(this.Ou)){let n=t.bottom-e.top;n>0&&(t.height-=n)}}}},6941(){const t=up.element,e=up.util,n=["onAcceptedReload","onDismissedReload"];up.ScriptGate=class ScriptGate{constructor(t=up.CSPInfo.none()){let e=up.script.cspNonce();this.ju=new EvalCallbackPolicy(e,t),this.Cu=new BodyScriptElementPolicy(e,t),this.xu=new DetachedAssetPolicy(e,t)}warnOfUnsafeCSP(){up.script.config.cspWarnings&&(this.ju.warnOfUnsafeCSP(),this.Cu.warnOfUnsafeCSP())}evalCallback(t,e){if(!this.ju.passesItem(t.nonce))throw new up.Blocked("Blocked callback: "+t.script);try{return t.unsafeEval(e)}catch(t){throw t instanceof EvalError?new up.Blocked(t.message):t}}adoptNewFragment(t){this.Fu(t),this.Tu(t)}adoptDetachedHeadAsset(t){if(!up.script.isScript(t))return;let e=new ScriptElementItem(t);this.xu.processItem(e)}adoptRenderOptionsFromHeader(t){let i=this.ju;for(let r of Object.keys(t)){let s=t[r];if(/^on[A-Z]/.test(r)&&!n.includes(r)&&e.isString(s)){let e=new ObjectPropertyItem(t,r);i.processItem(e),t[r]=up.RenderOptions.parseCallback(r,t[r])}}}Fu(t){const e=this.Cu;for(let n of up.script.findScripts(t)){let t=new ScriptElementItem(n);e.processItem(t)}}Tu(e){const n=this.ju;for(let i of up.script.config.nonceableAttributes){let r=t.subtree(e,t.attrSelector(i));for(let t of r){let e=new AttributeItem(t,i,n);n.processItem(e)}}}};class Policy{constructor(t,e){this.pageNonce=t,this.cspInfo=e,this.Pu=new Set(e.nonces),t&&this.Pu.add(t)}isValidNonce(t){return this.Pu.has(t)}tryRewriteNonce(t,e=t.readNonce()){this.pageNonce&&this.isValidNonce(e)&&t.writeNonce(this.pageNonce)}warnOfUnsafeCSP(){throw new up.NotImplemented}processItem(t){let e=t.readNonce();this.passesItem(e)?this.tryRewriteNonce(t,e):(this.log(...t.logBlockedDescriptor()),t.block())}passesItem(t){throw new up.NotImplemented}}class DetachedAssetPolicy extends Policy{constructor(...t){super(...t)}passesItem(t){return!0}}class ConfigurablePolicy extends Policy{constructor(t,e,n){super(e,n),this.Ru=t;let i=up.script.config[t];"auto"===i&&(i=this.resolveAuto()),"nonce"!==i||this.pageNonce||(this.warn('Enforcing nonces requires a <meta name="csp-nonce">.'),i="block"),this.policyString=i}resolveAuto(){throw new up.NotImplemented}passesItem(t){switch(this.policyString){case"pass":return!0;case"block":return!1;case"nonce":return this.isValidNonce(t);default:up.fail("Unknown policy: %s = %o",this.configExpression(),this.policyString)}}log(...t){up.puts(this.configExpression(),...t)}warn(...t){up.warn(this.configExpression(),...t)}configExpression(){return"up.script.config."+this.Ru}}class EvalCallbackPolicy extends ConfigurablePolicy{constructor(...t){super("evalCallbackPolicy",...t)}resolveAuto(){return this.pageNonce?"nonce":"pass"}warnOfUnsafeCSP(){"pass"===this.policyString&&this.cspInfo.isUnsafeEval()&&this.warn(`An 'unsafe-eval' CSP allows arbitrary [up-on...] callbacks. Consider setting ${this.configExpression()} = 'nonce'.`)}}class BodyScriptElementPolicy extends ConfigurablePolicy{constructor(...t){super("scriptElementPolicy",...t)}resolveAuto(){return this.cspInfo.isStrictDynamic()?"nonce":"pass"}warnOfUnsafeCSP(){"pass"===this.policyString&&this.cspInfo.isStrictDynamic()&&this.warn(`A 'strict-dynamic' CSP allows arbitrary <script> elements in new fragments. Consider setting ${this.configExpression()} = 'nonce'.`)}}class StringCallbackItem{readNonce(){return this.Lu().nonce}writeNonce(t){let e=this.Lu();e.nonce=t,this.writeCallbackString(e.toCallbackString())}Lu(){return this.Au||(this.Au=up.NonceableCallback.fromCallbackString(this.readCallbackString()))}logBlockedDescriptor(){throw new up.NotImplemented}block(){this.writeCallbackString("/* blocked */")}readCallbackString(){throw new up.NotImplemented}writeCallbackString(t){throw new up.NotImplemented}}class AttributeItem extends StringCallbackItem{constructor(t,e){super(),this.U=t,this.Du=e}logBlockedDescriptor(){return["Blocked callback attribute: %s",t.attrSelector(this.Du,this.readCallbackString())]}readCallbackString(){return this.U.getAttribute(this.Du)}writeCallbackString(t){this.U.setAttribute(this.Du,t)}}class ObjectPropertyItem extends StringCallbackItem{constructor(t,e){super(),this.$u=t,this.Ae=e}logBlockedDescriptor(){return["Blocked string callback: { %s: %o }",this.Ae,this.readCallbackString()]}readCallbackString(){return this.$u[this.Ae]}writeCallbackString(t){this.$u[this.Ae]=t}}class ScriptElementItem{constructor(t){this.U=t}readNonce(){return this.U.nonce}writeNonce(t){this.U.setAttribute("nonce",t)}logBlockedDescriptor(){return["Blocked <script> element: %o",this.U]}block(){up.script.block(this.U)}}},6689(){const t=up.util,e=up.element;up.Selector=class Selector{constructor(e,n,i={}){var r,s;let o=n&&!document.contains(n);this.Mu=o||i.destroying?[]:[up.fragment.isNotDestroying],null!==(r=i.layer)&&void 0!==r||(i.layer=t.presence(n,t.isElement));let u,a=o||"any"===i.layer||1===up.layer.attachedCount,l="new"!==i.layer&&!a&&up.layer.getAll(i);if("new"===i.layer)u="new";else if(a)u=up.layer.root;else if(l.length)this.Y=l,this.Mu.push(e=>t.some(l,t=>t.contains(e))),u=l[0];else{if(!(t.isElementLike(i.layer)||"origin"===i.layer&&i.origin))throw new up.CannotMatch(["Unknown layer: %o",i.layer]);this.Hu=[]}null!==(s=this.Hu)&&void 0!==s||(this.Hu=up.fragment.expandTargets(e,Object.assign(Object.assign({},i),{layer:u}))),this.Nu=this.Hu.join()||"match-none"}matches(t){return e.elementLikeMatches(t,this.Nu)&&this.Bu(t)}closest(t){return this.Iu(t.closest(this.Nu))}descendants(t=document){return this.qu(t.querySelectorAll(this.Nu))}firstDescendant(n){return t.isElement(n)?this.Uu(t=>n.querySelectorAll(t)):this.Y?t.findResult(this.Y,t=>this.Uu(n=>e.subtree(t.element,n))):this.Uu(t=>(n||document).querySelectorAll(t))}subtree(t){return this.qu(e.subtree(t,this.Nu))}Uu(e){return t.findResult(this.Hu,t=>this.qu(e(t))[0])}Bu(e){return e&&t.every(this.Mu,t=>t(e))}Iu(e){return t.presence(e,this.Bu.bind(this))}qu(e){return t.filter(e,this.Bu.bind(this))}}},4742(){const t=up.util;up.SelectorTracker=class SelectorTracker{constructor(t,e){this.zu=t,this.Vu=e,this.Ku=new Map,this.Xu=!1}start(){return this.sync(),t.sequence(this.Wu(),()=>this.Gu())}Wu(){return up.on("up:fragment:inserted up:fragment:destroyed up:element:defined",()=>this.Ju())}Ju(){this.Xu||(this.Xu=!0,up.fragment.afterMutate(()=>this.sync()))}sync(){this.Xu=!1;let e=new Map(this.Ku);this.Ku.clear();for(let n of this.zu()){let i=e.get(n);e.delete(n);let r=i||this.Vu(n)||t.noop;this.Ku.set(n,r)}this.Qu(e)}Gu(){this.Qu(this.Ku)}Qu(t){for(let[e,n]of t)n(e)}}},5691(){const t=up.util,e=up.element,n=[{attr:"up-hide-for",toggle(t,n){e.toggle(t,!n)}},{attr:"up-show-for",toggle(t,n){e.toggle(t,n)}},{attr:"up-disable-for",toggle(t,e){up.form.setDisabled(t,e)}},{attr:"up-enable-for",toggle(t,e){up.form.setDisabled(t,!e)}}];up.Switcher=class Switcher{constructor(t){this.Ne=t,this.Yu=t.getAttribute("up-switch")||up.fail("No switch target given for %o",t),this.Zu=t.getAttribute("up-switch-region")}start(){return this.ta(),t.sequence(this.ea(),this.na())}ea(){var t,e;let n=()=>this.ia();return(null===(e=(t=up.migrate).watchForSwitch)||void 0===e?void 0:e.call(t,this.Ne,n))||up.watch(this.Ne,{logPrefix:"[up-switch]",includeDisabled:!0,delay:0},n)}na(){return up.fragment.trackSelector(()=>this.ra(),t=>this.sa(t))}ia(){this.ta()}ta(){const t=this.oa();for(let e of this.ra())this.sa(e,t)}sa(e,n=this.oa()){let i=e.upSwitchValues;t.isEqual(i,n)||(e.upSwitchValues=n,this.switchSwitcheeNow(e,n))}switchSwitcheeNow(e,i){for(let{attr:r,toggle:s}of n){let n=e.getAttribute(r);if(n){let r=this.ua(n);s(e,t.intersect(i,r).length>0)}}let r=["Switching %o",e];up.emit(e,"up:form:switch",{field:this.Ne,fieldTokens:i,log:r})}ra(){let t=this.aa;return t?up.fragment.subtree(t,this.Yu):[]}get aa(){return this.Zu?up.fragment.get(this.Zu,{origin:this.Ne}):up.form.getRegion(this.Ne)}ua(e){return t.getSimpleTokens(e,{json:!0})}oa(){var e;let n=up.Params.fromContainer(this.Ne,{includeDisabled:!0}).values(),i=[...n],r=t.some(n,t.isPresent);i.push(r?":present":":blank");let s=up.form.fields(this.Ne);if(null===(e=s[0])||void 0===e?void 0:e.matches("[type=radio], [type=checkbox]")){let e=t.some(s,"checked");i.push(e?":checked":":unchecked")}return i}}},6140(){const t=up.util,e=up.element;up.Tether=class Tether{constructor(t){this.la=t.anchor,this.ca=t.align,this.ha=t.position,this.pa="top"===this.ha||"bottom"===this.ha?"horizontal":"vertical",this.du=up.viewport.get(this.la),this.parent=this.du===e.root?document.body:this.du,this.fa=!this.du.contains(this.la.offsetParent)}start(t){this.U=t,this.U.style.position="absolute",this.da(0,0),this.sync(),this.ma("on")}stop(){this.ma("off")}ma(t){let e=this.Ju.bind(this);up[t](window,"resize",e),this.fa&&up[t](this.du,"scroll",e)}Ju(){return clearTimeout(this.syncTimer),this.syncTimer=t.task(this.sync.bind(this))}isAlive(){return up.fragment.isAlive(this.parent)&&up.fragment.isAlive(this.la)}sync(){const n=this.U.getBoundingClientRect(),i=e.styleNumber(this.U,"margin-top"),r=e.styleNumber(this.U,"margin-right"),s=e.styleNumber(this.U,"margin-bottom"),o=e.styleNumber(this.U,"margin-left"),u=this.la.getBoundingClientRect();let a,l;switch(this.pa){case"horizontal":switch(this.ha){case"top":l=u.top-s-n.height;break;case"bottom":l=u.top+u.height+i}switch(this.ca){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.ca){case"top":l=u.top+i;break;case"center":l=u.top+.5*(u.height-n.height);break;case"bottom":l=u.top+u.height-n.height-s}switch(this.ha){case"left":a=u.left-r-n.width;break;case"right":a=u.left+u.width+o}}t.isDefined(a)||t.isDefined(l)?this.Bs(a,l):up.fail("Invalid tether constraints: %o",this.ga())}ga(){return{position:this.ha,align:this.ca}}Bs(t,e){const n=this.U.getBoundingClientRect();this.da(t-n.left+this.offsetLeft,e-n.top+this.offsetTop)}da(t,n){this.offsetLeft=t,this.offsetTop=n,e.setStyle(this.U,{left:t,top:n},"px")}}},3530(){const t=up.util;up.URLPattern=class URLPattern{constructor(e){this.va=[];const n=[],i=[];for(let r of t.getSimpleTokens(e))"-"===r[0]?i.push(r.substring(1)):n.push(r);this.ba=this.ya(n,!0),this.wa=this.ya(i,!1)}ya(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.va.push({name:i,cast:Number}),"(\\d+)"):(n&&this.va.push({name:i,cast:String}),"([^/?#]+)")),new RegExp("^(?:"+i+")$")}test(e,n=!0){return n&&(e=t.matchableURL(e)),this.ba.test(e)&&!this._a(e)}recognize(e,n=!0){n&&(e=t.matchableURL(e));let i=this.ba.exec(e);if(i&&!this._a(e)){const t={};return this.va.forEach((e,n)=>{let r=i[n+1];if(r)return t[e.name]=e.cast(r)}),t}}_a(t){var e;return null===(e=this.wa)||void 0===e?void 0:e.test(t)}}},7781(t,e,n){n(4518),up.element=function(){const t=up.util;function e(t,e){const i=t.querySelectorAll(e);return n(t,e)?[t,...i]:i}function n(e,n){return t.isElement(e)&&e.matches(n)}function i(...e){const n=e.pop();return t.isElement(n)?n:t.isString(n)?function(...e){let[n=document,i]=t.args(e,"val","val");return n.querySelector(i)}(...e,n):t.isList(n)?(n.length>1&&up.fail("up.element.get(): Cannot cast multiple elements (%o) to a single element",n),n[0]):n}function r(...e){return t.flatMap(e,s)}function s(e){return t.isString(e)?document.querySelectorAll(e):t.wrapList(e)}function o(e,n){return n===A(e)?t.noop:(u(e,n),()=>u(e,!n))}function u(t,e){e?(t.removeAttribute("hidden"),"none"===t.style.display&&(t.style.display="")):t.setAttribute("hidden","")}function a(e,n){for(let i in n){const r=n[i];t.isGiven(r)?e.setAttribute(i,r):e.removeAttribute(i)}}function l(t,e){t.parentNode.insertBefore(e,t)}function c(e,n={}){let i,r,s,{includePath:o}=p(e);for(let t of o){let{tagName:e}=t;e&&"*"!==e||(e="div"),r=document.createElement(e),i||(i=r),h(r,t),null==s||s.appendChild(r),s=r}for(let e in n){let r=n[e];"class"===e?C(i,t.wrapList(r)):"style"===e?L(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 h(t,{id:e,classNames:n,attributes:i}){e&&(t.id=e);for(let[e,n]of Object.entries(i))t.setAttribute(e,n);C(t,n)}function p(e){let n;const{masked:i,restore:r}=t.expressionOutline(e),s=i.replace(/:not\([^)]*\)/,function(t){return n=r(t),""});let o=r(s);return{includePath:s.split(/[ >]+/).map(function(n){let i={tagName:null,classNames:[],id:null,attributes:{}};return(n=(n=(n=(n=n.replace(/^[\w-*]+/,function(t){return i.tagName=t,""})).replace(/#([\w-]+)/,function(t,e){return i.id=e,""})).replace(/\.([\w-]+)/g,function(t,e){return i.classNames.push(e),""})).replace(/\[[^\]]*]/g,function(e){e=r(e);let[n,s,o,u,a]=e.match(/\[([\w-]+)(?:([~|^$*]?=)(["'])?([^\3\]]*?)\3)?]/);return u||(u='"'),i.attributes[s]=a?t.parseString(u+a+u):"",""}))&&up.fail("Cannot parse selector: "+e),i}),includeRaw:o,excludeRaw:n}}const f=["HTML","BODY","HEAD","TITLE"],d=up.mockable(t=>t.matches(f.join()));function m(e,n){return t.isGiven(n)?`[${e}="${n=n.replace(/"/g,'\\"')}"]`:`[${e}]`}function g(t){return v(b(t))}function v(e){return function(e){if(1===e.length&&t.isElementLike(e[0]))return e[0]}(e)||up.fail("Expected a single element, but got %d nodes",e.length)}function b(t){t=t.trim();const e=document.createRange();return e.setStart(document.body,0),e.createContextualFragment(t).childNodes}function y(e,n,i){t.isGiven(i)&&t.isMissing(e.getAttribute(n))&&e.setAttribute(n,i)}function w(e){const n=document.createElement("up-wrapper");return n.append(...t.wrapList(e)),n}function _(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 O(t,e){return _(t,e,k)}let k=t.identity;function S(t,e){switch(t){case"false":return!1;case"true":case"":case e:return!0}}function E(e){return t.parseNumber(e)}function j(e){if(null==e?void 0:e.trim())return t.parseRelaxedJSON(e)}function C(t,e){for(let n of e)t.classList.add(n)}function x(e,n,i){return e.classList.contains(n)===i?t.noop:(e.classList.toggle(n,i),()=>e.classList.toggle(n,!i))}function F(t,e){return R(window.getComputedStyle(t),e)}function T(e,n){const i=F(e,n);if(t.isPresent(i))return parseFloat(i)}function P(t,e){const{style:n}=t;return R(n,e)}function R(e,n){return up.migrate.loaded&&(n=up.migrate.fixGetStyleProps(n)),t.isString(n)?e.getPropertyValue(n):t.mapObject(n,t=>[t,e.getPropertyValue(t)])}function L(e,n,i=""){if(up.migrate.loaded&&(n=up.migrate.fixSetStyleProps(n,i)),t.isString(n))e.setAttribute("style",n);else{const{style:t}=e;for(let e in n){let r=n[e];t.setProperty(e,r+i)}}}function A(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)}function D(t){return/^up-/.test(t)}function $(e,n){return t.mapObject(n,t=>[t,e.getAttribute(t)])}const M=/^\s*(<!--[^-]*.*?-->\s*)*<([a-z-!]+)\b/i;function H(t){var e;return null===(e=M.exec(t))||void 0===e?void 0:e[2].toUpperCase()}const N=new Set;return{subtree:e,subtreeFirst:function(t,e){return n(t,e)?t:t.querySelector(e)},contains:function(t,e){const n=i(e);return Node.prototype.contains.call(t,n)},closestAttr:function(t,e,n=O){let i=t.closest("["+e+"]");if(i)return n(i,e)},ancestor:function(t,e){var n;return null===(n=t.parentNode)||void 0===n?void 0:n.closest(e)},around:function(t,n){return r(t.closest(n),e(t,n))},get:i,list:r,toggle:function(t,e=!A(t)){u(t,e)},hide:function(t){u(t,!1)},hideTemp:function(t){return o(t,!1)},show:function(t){u(t,!0)},showTemp:function(t){return o(t,!0)},metaContent:function(t){var e;const n="meta"+m("name",t);return null===(e=document.head.querySelector(n))||void 0===e?void 0:e.content},insertBefore:l,createFromSelector:c,setAttrs:a,setAttrsTemp:function(t,e){let n=Object.keys(e),i=$(t,n);return a(t,e),()=>a(t,i)},affix:function(...e){let[n,i="beforeend",r,s]=t.args(e,"val",t.isAdjacentPosition,"val","options");const o=c(r,s);return n.insertAdjacentElement(i,o),o},idSelector:function(t){return t.match(/^[a-z][a-z0-9\-_]*$/i)?`#${t}`:m("id",t)},classSelector:function(t){return`.${t=t.replace(/[^\w-]/g,"\\$&")}`},isSingleton:d,attrSelector:m,createBrokenDocumentFromHTML:function(t){const e=H(t);return["TR","TD","TH","THEAD","TBODY"].includes(e)&&(t=`<table>${t}</table>`),(new DOMParser).parseFromString(t,"text/html")},revivedClone:function(t){let e=g(t.outerHTML);return"nonce"in t&&(e.nonce=t.nonce),e},createNodesFromHTML:b,createFromHTML:g,extractSingular:v,get root(){return document.documentElement},paint:function(t){t.offsetHeight},fixedToAbsolute:function(t){const e=t.getBoundingClientRect();t.style.position="absolute";const n=t.offsetParent.getBoundingClientRect();L(t,{left:e.left-T(t,"margin-left")-n.left+"px",top:e.top-T(t,"margin-top")-n.top+"px",right:"",bottom:""})},setMissingAttrs:function(t,e){for(let n in e)y(t,n,e[n])},setMissingAttr:y,unwrap:function(t){!function(){const e=document.activeElement,n=up.viewport.copyCursorProps(e);try{return function(){let e=[...t.childNodes];for(let n of e)l(t,n);t.remove()}()}finally{e&&e!==document.activeElement&&(up.viewport.copyCursorProps(n,e),e.focus({preventScroll:!0}))}}()},wrapChildren:function(t){const e=w(t.childNodes);return t.append(e),e},wrapIfRequired:function(e){return 1===e.length&&t.isElement(e[0])?e[0]:w(e)},attr:O,booleanAttr:function(t,e){return _(t,e,S)},numberAttr:function(t,e){return _(t,e,E)},jsonAttr:function(t,e){return _(t,e,j)},parseAttr:_,booleanOrStringAttr:function(t,e){return _(t,e,S,k)},booleanOrNumberAttr:function(t,e){return _(t,e,S,E)},booleanOrNumberOrStringAttr:function(t,e){return _(t,e,S,E,k)},setStyleTemp:function(t,e){const n=P(t,Object.keys(e));return L(t,e),()=>L(t,n)},style:F,styleNumber:T,inlineStyle:P,setStyle:L,isVisible:A,upAttrs:function(t){let e=t.getAttributeNames().filter(D);return $(t,e)},upClasses:function(e){return t.filter(e.classList.values(),D)},setAttrPresence:function(t,e,n,i){return i?t.setAttribute(e,n):t.removeAttribute(e)},addClasses:C,addClassTemp:function(t,e){return x(t,e,!0)},removeClassTemp:function(t,e){return x(t,e,!1)},parseSelector:p,isEmpty:function(t){return!t.children.length>0&&!t.innerText.trim()},crossOriginSelector:function(t){return`[${t}*="//"]:not([${t}*="//${location.host}/"])`},isIntersectingWindow:function(t,{margin:e=0}={}){const n=up.Rect.fromElement(t);return n.grow(e),n.bottom>0&&n.top<window.innerHeight&&n.right>0&&n.left<window.innerWidth},unionSelector:function(e,n,i){let r=`:is(${e.join()})`;return t.isPresent(n)&&(r+=`:not(${n.join()})`),i&&(r+=`:is(${i})`),r},elementLikeMatches:n,documentPosition:function(t){let e=t.nextElementSibling;return e?[e,"beforebegin"]:[t.parentElement,"beforeend"]},isFullDocumentHTML:function(t){let e=H(t);return"HTML"===e||"!DOCTYPE"===e},leadingElement:function(e){for(let n of e){if(t.isElement(n))return n;if(t.isTextNode(n)&&n.textContent.trim())return}},removeAttrsFromHTML:function(t,e){let n=new RegExp(`\\s+(${e.join("|")})="[^"]*"`,"g");return t.replace(/<[^<]+>/g,t=>t.replace(n,""))},trackDefinitions:function(t){for(let{localName:n}of e(t,":not(:defined)"))N.has(n)||(N.add(n),customElements.whenDefined(n).then(()=>up.emit("up:element:defined",{localName:n,log:!1})))}}}()},6939(){up.error=function(){function t(t){if("object"!=typeof(e=t)||!("AbortError"===e.name||e instanceof up.RenderResult||e instanceof up.Response))throw t;var e}function e(t,...e){try{return t(...e)}catch(t){reportError(t)}}return{fail:function(...t){throw new up.Error(t)},throwCritical:t,muteUncriticalRejection:function(e){return e.catch(t)},muteUncriticalSync:function(e){try{return e()}catch(e){t(e)}},guard:e,guardPromise:function(t){return t.catch(reportError)},guardFn:function(t){if(t)return(...n)=>e(()=>t(...n))}}}(),up.fail=up.error.fail},8386(){up.Aborted=class Aborted extends up.Error{constructor(t){super(t,{name:"AbortError"})}get[Symbol.toStringTag](){return"up.Aborted"}}},7181(){up.Blocked=class Blocked extends up.Error{get[Symbol.toStringTag](){return"up.Blocked"}}},4244(){up.CannotMatch=class CannotMatch extends up.Error{get[Symbol.toStringTag](){return"up.CannotMatch"}}},1410(){up.CannotParse=class CannotParse extends up.Error{get[Symbol.toStringTag](){return"up.CannotParse"}}},1268(){up.CannotTarget=class CannotTarget extends up.Error{get[Symbol.toStringTag](){return"up.CannotTarget"}}},2487(){up.Error=class Error extends window.Error{constructor(t,e={}){Array.isArray(t)&&(t=up.util.sprintf(...t)),super(t),Object.assign(this,{name:this[Symbol.toStringTag]},e)}get[Symbol.toStringTag](){return"up.Error"}}},9483(){up.NotImplemented=class NotImplemented extends up.Error{get[Symbol.toStringTag](){return"up.NotImplemented"}}},4138(){up.Offline=class Offline extends up.Error{get[Symbol.toStringTag](){return"up.Offline"}}},9441(){up.event=function(){const t=up.util,e=up.element;function n(...t){return i(t).bind()}function i(t,e){return up.EventListenerGroup.fromBindArgs(t,e)}function r(t){return up.EventEmitter.fromEmitArgs(t)}function s(...e){const n=t.extractOptions(e),i=e[0]||n.type||up.fail("Missing event type"),r=new Event(i,{bubbles:!0,cancelable:!0});return Object.assign(r,t.omit(n,["type","target"])),r}const o=["metaKey","shiftKey","ctrlKey","altKey"];function u(e){return e.button>0||t.some(o,t=>e[t])}function a(e,n,i=[]){const r=s(n,t.pick(e,i));return r.originalEvent=e,["stopPropagation","stopImmediatePropagation","preventDefault"].forEach(function(t){const n=r[t];return r[t]=function(){return e[t](),n.call(r)}}),e.defaultPrevented&&r.preventDefault(),r}n("up:click","[up-emit]",function(t,n){if(u(t))return;const i=e.attr(n,"up-emit"),r=e.jsonAttr(n,"up-emit-props"),s=a(t,i);Object.assign(s,r),up.emit(n,s)});let l=["unknown"];function c(t){l.push(t),setTimeout(()=>l.pop())}return n("keydown keyup",{capture:!0},()=>c("key")),n("pointerdown pointerup",{capture:!0},()=>c("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,onClosest:function(...e){let[n,i,{layer:r},s]=t.args(e,"val","val","options","callback");r&&(r=up.layer.get(r,{origin:n}));let o=up.on(i,{guard:t=>t.target.contains(n)&&(!r||r.contains(t.target))},s);return up.destructor(n,o),o},off:function(...t){return i(t).unbind()},build:s,emit:function(...t){return r(t).emit()},assertEmitted:function(...t){return r(t).assertEmitted()},onEscape:function(t){return n("keydown",function(e){if("Escape"===e.key)return t(e)})},halt:function(t,e={}){e.log&&up.log.putsEvent(t),t.stopImmediatePropagation(),t.preventDefault()},isModified:u,isSyntheticClick:function(t){return!t.isTrusted},fork:a,keyModifiers:o,get inputDevice(){return t.last(l)}}}(),up.on=up.event.on,up.off=up.event.off,up.emit=up.event.emit},1915(){up.form=function(){const t=up.util,e=up.element,n=new up.Config("up.form.config",()=>({groupSelectors:["[up-form-group]","fieldset","label","form"],fieldSelectors:["select","input:not([type=submit], [type=image], [type=button], [type=reset])","textarea",":is(:enabled, :disabled):not(input, select, textarea, button, fieldset, optgroup, option, a, area, link)"],noFieldSelectors:[],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])"],anyButtonSelectors:["button","input:is([type=submit], [type=image], [type=button], [type=reset])"],validateBatch:!0,watchInputEvents:["input","change"],watchInputDelay:0,watchChangeEvents:["change"],watchableEvents:["input","change"],arrayParam:t=>t.endsWith("[]")}));function i(n,i){n=e.get(n);let r=up.fragment.subtree(n,i());if(n.matches("form")&&(r=r.filter(t=>!t.hasAttribute("form")||C(t)===n)),n.matches("form[id]")){const s=i(e.attrSelector("form",n.getAttribute("id"))),o=up.fragment.all(s,{layer:n});r=t.uniq([...r,...o])}return r}const[r,s]=n.selectorFns("fieldSelectors");function o(t){return i(t,r)}function u(t){return"disabled"in t?t.disabled:t.hasAttribute("disabled")}function a(t,e){return"disabled"in t?(t.disabled=e,()=>{t.disabled=!e}):(t.toggleAttribute("disabled",e),()=>t.toggleAttribute("disabled",!e))}function l(t){return f(t)[0]}function c(t){return[...o(t),...(e=t,i(e,d))];var e}const[h,p]=n.selectorFns("submitButtonSelectors");function f(t){return i(t,h)}const[d,m]=n.selectorFns("anyButtonSelectors"),g=up.mockable((t,e)=>up.render(v(t,e)));function v(e,n,i){e=C(e=up.fragment.get(e)),n=t.options(n);let r=new up.OptionsParser(e,n,i);return r.include(w),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),Object.assign(n,_(n.submitButton)),n}function b(e,n,i={}){var r,s,o;n=t.options(n),null!==(r=i.closest)&&void 0!==r||(i.closest=!0),null!==(s=i.attrPrefix)&&void 0!==s||(i.attrPrefix="up-watch-");let u=new up.OptionsParser(e,n,i);u.include(up.status.statusOptions,i),u.string("event"),u.number("delay");let a=up.form.config;return"input"===n.event?(n.event=t.evalOption(a.watchInputEvents,e),null!==(o=n.delay)&&void 0!==o||(n.delay=a.watchInputDelay)):"change"===n.event&&(n.event=t.evalOption(a.watchChangeEvents,e)),n.origin||(n.origin=e),n}function y(e,n){let i=()=>F(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=>y(t,n)):[]}function w(n,i,r){var s;i=t.options(i),n=C(n);const o=new up.OptionsParser(n,i,r);o.string("contentType",{attr:"enctype"}),o.json("headers");const u=null!==(s=i.submitButton)&&void 0!==s?s:i.submitButton=l(n),a=[up.Params.fromForm(n,i),e.jsonAttr(n,"up-params")],c=[e.jsonAttr(n,"up-headers")];return u&&(a.push(e.jsonAttr(u,"up-params")),c.push(e.jsonAttr(u,"up-headers")),i.method||(i.method=u.getAttribute("formmethod")),i.url||(i.url=u.getAttribute("formaction"))),i.params=up.Params.merge(...a,i.params),i.headers=t.merge(...c,i.headers),o.string("url",{attr:"action",default:up.fragment.source(n)}),o.string("method",{attr:["up-method","data-method","method"],default:"GET",normalize:t.normalizeMethod}),"GET"===i.method&&(i.url=up.Params.stripURL(i.url)),i}function _(e){if(!e)return{};let n=up.link.followOptions(e,{},{defaults:!1});return t.omit(n,["method","url","guardEvent","origin","params","headers"])}function O(...e){let[n,i,r]=t.args(e,"val","options","callback");var s;return n=up.element.get(n),r||(s=n,r=up.script.callbackAttr(s,"up-watch",{argNames:["value","name","options"]})||up.fail("No callback given for up.watch()")),new up.FieldWatcher(n,i,r).start()}function k(t,e={}){return O(t,Object.assign(Object.assign({logPrefix:"up.autosubmit()"},e),{batch:!0}),(e,n)=>g(t,n))}function S(){var t,e;return(null===(e=(t=up.migrate).migratedFormGroupSelectors)||void 0===e?void 0:e.call(t))||n.groupSelectors}function E(t,{targetable:e=!1}={}){var n;return null===(n=j(t,{targetable:e}))||void 0===n?void 0:n.element}function j(e,{targetable:n}){return t.findResult(S(),function(t){let i=e.closest(t);if(i){let r=up.fragment.tryToTarget(i,{strong:!0}),s=up.fragment.tryToTarget(e),o=r||s&&i!==e&&`${t}:has(${s})`;if(o||!n)return{target:o,element:i,origin:e}}})}function C(t){return function(t){if(t instanceof HTMLFormElement)return t}(t)||function(t){let n=t.getAttribute("form");if(n){let i="form"+e.idSelector(n);return up.fragment.get(i,{layer:t})}}(t)||function(t){if(!t.hasAttribute("form"))return t.closest("form")}(t)}function x(t){return t.upFormValidator||(t.upFormValidator=function(t){const e=new up.FormValidator(t),n=e.start();return up.destructor(t,n),e}(t))}function F(t){return function(t){if(t)return C(t)||up.layer.closestLayerElement(t)}(t)||up.layer.current.element}const T=up.mockable(function(...e){let[n,{guard:i},r]=t.args(e,"val","options","callback");return up.fragment.trackSelector(function(){if(!n.isConnected)return[];let e=F(n);return t.filter(o(n),function(t){return F(t)===e&&(!i||i(t))})},r)});return up.on("submit",n.selectorFn("submitSelectors"),function(e,n){const i=t.presence(e.submitter,p);if("false"!==(null==i?void 0:i.getAttribute("up-submit"))&&!e.defaultPrevented){up.event.halt(e,{log:!0});for(let t of[e.submitter,document.activeElement])t&&t.form===n&&C(t)!==n&&up.fail('Prevented %o from submitting a form in another layer ([form="%s"])',t,t.getAttribute("form"));up.error.muteUncriticalRejection(g(n,{submitButton:i}))}}),up.compiler("[up-switch]",t=>new up.Switcher(t).start()),up.attribute("up-watch",t=>O(t)),up.compiler("[up-validate]",{rerun:!0},function(t){let e=C(t);e&&x(e)}),up.attribute("up-autosubmit",function(t){let e=up.fragment.closest(t.parentElement,"[up-autosubmit]:not([up-autosubmit=false])");if(!e||C(e)!==C(t))return k(t,{logPrefix:"[up-autosubmit]"})}),{config:n,submit:g,submitOptions:v,destinationOptions:w,submitButtonOverrides:_,watchOptions:b,validateOptions:function(e,i,r={}){i=t.options(i);let s=new up.OptionsParser(e,i,Object.assign(Object.assign({},r),{closest:!0,attrPrefix:"up-validate-"}));return s.string("url"),s.string("method",{normalize:t.normalizeMethod}),s.boolean("batch",{default:n.validateBatch}),s.json("params"),s.json("headers"),s.include(b,{defaults:{event:"change"}}),i},isSubmittable:function(t){return t=up.fragment.get(t),n.matches(t,"submitSelectors")},watch:O,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 x(C(n.origin)).validate(n)},autosubmit:k,fieldSelector:r,anyButtonSelector:d,fields:o,trackFields:T,isField:s,submitButtons:f,defaultSubmitButton:l,readFieldName:function(t){var e;return null!==(e=t.name)&&void 0!==e?e:t.getAttribute("name")},readFieldValue:function(t){return t.value},readFieldDisabled:u,writeFieldDisabled:a,focusedField:function(){return t.presence(document.activeElement,s)},disableTemp:function(e,{preview:n}={}){let i=c(e);return t.sequence(t.map(i,e=>function(e,n){if(u(e))return;let i;document.activeElement===e&&(i=E(e,{targetable:!1}));let r=a(e,!0);return i&&up.focus(i,{force:!0,preventScroll:!0}),n&&(e.upPreviewDisabled=!0,r=t.sequence(r,()=>delete e.upPreviewDisabled)),r}(e,n)))},prepareParamsReadTemp:function(n){let i=t.cleaner(),r=new Set(c(n));for(let t of r)t.upPreviewDisabled&&u(t)&&i(a(t,!1));let o=n.getAttribute("id");if(o)for(let r of document.querySelectorAll("form"+e.idSelector(o)))r!==n&&i(e.setAttrsTemp(r,{id:"up-isolated-"+t.uid()}));let l=t.filter(n.elements,t=>(s(t)||m(t))&&!r.has(t));for(let n of l)i(e.setAttrsTemp(n,{form:"up-isolated-"+t.uid()}));return i.clean},setDisabled:function(t,e){for(let n of c(t))a(n,e)},getDisablePreviewFn:function(t,e){return function(n){let i=y(t,e);for(let t of i)n.disable(t)}},group:E,groupSolution:j,groupSelectors:S,get:C,getRegion:F}}(),up.submit=up.form.submit,up.watch=up.form.watch,up.autosubmit=up.form.autosubmit,up.validate=up.form.validate},6973(t,e,n){n(3278);const i=up.util,r=up.element;up.fragment=function(){function t(t){let e=t.localName;if(e.startsWith("up-"))return e}const e=["[up-id]","[id]","html","head","body"],n=new up.Config("up.fragment.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,focusVisible:"auto",abort:"target",failOptions:!0,feedback:!0},navigateOptions:{cache:"auto",revalidate:"auto",fallback:!0,focus:"auto",scroll:"auto",history:"auto",peel:"dismiss"},reloadOptions:{target:":main",scroll:"keep",focus:"keep"},match:"region",autoHistoryTargets:[":main"],autoFocus:["hash","autofocus","main-if-main","keep","target-if-lost"],autoScroll:["hash","layer-if-main"],autoRevalidate:t=>t.expired,skipResponse:s,renderableResponse:t=>t.isHTML(),normalizeKeepHTML:d}));function s({response:t,expiredResponse:e}){return!t.text||t.text===(null==e?void 0:e.text)}function o(t,e={}){return t=b(t,e),r.closestAttr(t,"up-source")}function u(t){return i.normalizeURL(t,{hash:!1})}function a(t){let e=r.closestAttr(t,"up-time");if(e&&"false"!==e)return/^\d+$/.test(e)&&(e=1e3*Number(e)),new Date(e)}function l(t){let e=r.closestAttr(t,"up-etag");if(e&&"false"!==e)return e}i.delegate(n,["mainTargets"],()=>up.layer.config.any);const c=up.mockable((...t)=>{let e=k(t);return new up.RenderJob(e).execute()}),h=up.mockable((...t)=>{const e=k(t);return c(Object.assign(Object.assign({},e),{navigate:!0}))});function p({oldElement:t,newElement:e,newData:n,renderOptions:i}){const r=["Keeping fragment %o",t],s=up.script.callbackAttr(t,"up-on-keep",{expandObject:["newFragment","newData"]});return up.emit(t,"up:fragment:keep",{log:r,callback:s,newFragment:e,newData:n,renderOptions:i})}function f(t,e=m(t)){var r;return null!==(r=t.upKeepIdentity)&&void 0!==r?r:t.upKeepIdentity=i.copy(function(t,e){return"same-html"===e?n.normalizeKeepHTML(t.outerHTML):"same-data"!==e||up.data(t)}(t,e))}function d(t){return(t=r.removeAttrsFromHTML(t,["up-etag","up-source","up-time","nonce",...up.script.config.nonceableAttributes])).replace(/^[ \t]+/gm,"")}function m(t){return r.booleanOrStringAttr(t,"up-keep")}function g(t){return!t.closest(".up-destroying")}function v(t){return t.isConnected&&g(t)}function b(...t){let[e,n,s]=w(t);return i.isElementLike(n)?r.get(n):e?y(e,n,s):new up.FragmentFinder(Object.assign({selector:n},i.pick(s,["layer","match","origin","destroying"]))).find()}function y(...t){let[e,n,i]=w(t);return new up.Selector(n,e,i).firstDescendant(e)}function w(t){return i.args(t,"val","val","options")}function _(...t){let[e,n,r]=w(t);return i.isElement(n)?[n]:i.isList(n)?n:new up.Selector(n,e,r).descendants(e)}function O(t,e,n={}){return new up.Selector(e,t,n).subtree(t)}function k(t){const e=i.parseArgIntoOptions(t,"target");return i.isElement(e.target)&&(e.origin||(e.origin=e.target)),e}up.macro("[up-keep]",t=>f(t));const S=/^(onFail|on|fail)?(.+)$/;function E(t,e){return i.presence(t,i.isString)||j(t,e)||function(t){throw new up.CannotTarget(function(t){return`Cannot derive good target selector from a <${t.localName}> element without identifying attributes. Try setting an [id] or configure up.fragment.config.targetDerivers.`}(t))}(t)}function j(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],l="";"*"===s?l+=t.localName:s&&(l+=s);for(let t of u)l+=r.classSelector(t);o&&(l+=r.idSelector(o));for(let e in a){let n=a[e]||t.getAttribute(e);if("id"===e)l+=r.idSelector(n);else if("class"===e)for(let e of C(t))l+=r.classSelector(e);else l+=r.attrSelector(e,n)}return i&&(l+=i),l}(t,e)}catch(t){if(t instanceof up.CannotParse)return e;throw t}}(t,s);if(o&&function(t,e,i={}){var r;let s=null!==(r=i.verify)&&void 0!==r?r:n.verifyDerivedTarget;return!v(e)||!s||up.fragment.get(t,Object.assign({layer:e},i))===e}(o,t,e))return o})}function C(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 x=/:main\b/,F=/:layer\b/,T=/:origin\b/;function P(t){return x.test(t)}function R(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"),P(s)){let n=L(e),i=up.layer.mainTargets(n).map(t=>s.replace(x,t));t.unshift(...i)}else if(F.test(s)){if("new"===n||"opening"===n.state)continue;let i=E(n.getFirstSwappableElement(),e);t.unshift(s.replace(F,i))}else i.isElementLike(s)?r.push(E(s,e)):i.isString(s)&&r.push(D(s,e))}return i.uniq(r)}function L({layer:t,mode:e}){return"new"===t?e||up.fail('Must pass a { mode } option together with { layer: "new" }'):t.mode}function A(t,{origin:e}={}){return t.replace(T,function(n){if(e)return E(e);up.fail('Missing { origin } element to resolve "%s" reference (found in %s)',n,t)})}function D(t,e){return i.isString(t)?(up.migrate.resolveOrigin||A)(t,e):t}function $(t){return i.getComplexTokens(t)}function M(t,e,n={}){if(t=r.get(t),i.isElement(e)){let n=j(e);return n&&t.matches(n)}return new up.Selector(e,t,n).matches(t)}const H=/^([\w-]+|\*)?(#|\.|[:[][a-z-]{3,})/;function N(t,{origin:e,originLayer:n,data:s,htmlParser:o=r.createNodesFromHTML}={}){if(i.isString(t)&&H.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=B(t,s,{htmlParser:o})),i.wrapList(t)}function B(t,e={},{origin:n,htmlParser:i}={}){var s;let o=b(t,{origin:n,layer:"closest"})||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}let I=0,q=i.cleaner("fifo");function U(t){try{return I++,t()}finally{0===--I&&q.clean()}}return up.on("up:framework:boot",function(){const{documentElement:t}=document;if(up.hello(t),t.setAttribute("up-source",u(location.href)),!up.browser.canPushState()&&up.history.isEnabled("location"))return up.warn("Cannot push history changes. Next render pass with history will load a full page.")}),{config:n,reload:function(...t){var e,s;const u=Object.assign(Object.assign({},n.reloadOptions),k(t));u.target||(u.target=":main");const h=b(u.target,u);return u.url||(u.url=o(h)),u.headers=i.merge(u.headers,function(t){let e={},n=a(t);n&&(e["If-Modified-Since"]=n.toUTCString());let i=l(t);return i&&(e["If-None-Match"]=i),e}(h)),(u.keepData||r.booleanAttr(h,"up-keep-data"))&&(u.data=up.data(h)),null===(s=(e=up.migrate).postprocessReloadOptions)||void 0===s||s.call(e,u),c(u)},destroy:function(...t){var e,n;const i=k(t),r=b(i.target,i);return r&&new up.Change.DestroyFragment(Object.assign(Object.assign({},i),{element:r})).execute(),null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.destroy()")},render:c,navigate:h,get:b,getFirstDescendant:y,all:_,subtree:O,contains:function(t,e){var n;return i.isElement(e)?r.contains(t,e)&&(null===(n=up.layer.get(t))||void 0===n?void 0:n.contains(e)):O(t,e).length>0},closest:function(t,e,n){return new up.Selector(e,t,n).closest(t)},source:o,normalizeSource:u,visit:function(t,e){return h(Object.assign(Object.assign({},e),{url:t}))},markAsDestroying:function(t){t.classList.add("up-destroying"),t.setAttribute("inert","")},emitInserted:function(t,e){if(t.upInserted)return;t.upInserted=!0;const n=["Inserted fragment %o",t];return U(()=>up.emit(t,"up:fragment:inserted",Object.assign(Object.assign({},e),{log:n})))},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 U(()=>up.emit(r,"up:fragment:destroyed",{fragment:t,parent:r,log:i}))},emitKeep:p,emitKept:function({oldElement:t,newElement:e,newData:n}){return up.emit(t,"up:fragment:kept",{log:!1,newFragment:e,newData:n})},keepPlan:function(t){if(!1===t.keep)return;const{oldElement:e,newElement:n}=t;let s,o=m(e);if(!o)return;let u=up.fragment.tryToTarget(e);u||up.warn("[up-keep]","Cannot keep untargetable %o",e);const a={layer:t.layer};if(s=t.descendantsOnly?up.fragment.get(n,u,a):r.subtreeFirst(n,u,a),!s)return;if(!1===m(s))return;let l=f(e,o),c=f(s,o);if(!i.isEqual(l,c))return;const h={oldElement:e,newElement:s,newData:up.script.data(s),renderOptions:t};return p(h).defaultPrevented?void 0:h},defaultNormalizeKeepHTML:d,successKey:function(t){let e=S.exec(t);if(e){let[t,n,r]=e;switch(n){case"onFail":return"on"+i.upperCaseFirst(r);case"fail":return i.lowerCaseFirst(r)}}},failKey:function(t){let e=S.exec(t);if(e){let[t,n,r]=e;switch(n){case"on":return"onFail"+i.upperCaseFirst(r);case void 0:return"fail"+i.upperCaseFirst(r)}}},expandTargets:R,resolveOrigin:D,toTarget:E,tryToTarget:j,isTargetable:function(t,e){return!!j(t,e)},matches:M,matchSelectorMap:function(t,e,{layer:n=t}={}){let r=[];if(e&&t)for(let[s,o]of Object.entries(e))i.isDefined(o)&&M(t,s,{layer:n})&&r.push(o);return r},hasAutoHistory:function(t,e){let i=R(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:l,shouldRevalidate:function(t,e,r={}){return t.fromCache&&i.evalAutoOption(r.revalidate,n.autoRevalidate,e)},abort:function(...t){let e,n,r=k(t),{reason:s,newLayer:o,jid:u}=r;if(r.target)n=_(r.target,r),e=t=>t.isBoundToSubtrees(n),s||(s="Aborting requests within fragment");else{let t=up.layer.getAll(r);n=i.map(t,"element"),e=e=>e.isBoundToLayers(t),s||(s="Aborting requests within "+t.join(", "))}up.network.abort(t=>t.abortable&&e(t),Object.assign(Object.assign({},r),{reason:s}));for(let t of n)up.emit(t,"up:fragment:aborted",{reason:s,newLayer:o,jid:u,log:s})},onAborted:function(t,e){return up.event.onClosest(t,"up:fragment:aborted",{layer:"origin"},e)},onKept:function(t,e){return up.event.onClosest(t,"up:fragment:kept",{layer:"origin"},e)},onFirstIntersect:function(t,e,{margin:n=0}={}){if(r.isIntersectingWindow(t,{margin:n}))return void e();let i=new IntersectionObserver(function(t){for(let n of t)if(n.isIntersecting)return s(),void e()},{rootMargin:`${n}px`}),s=()=>i.disconnect();i.observe(t),up.destructor(t,s)},splitTarget:$,parseTargetSteps:function(t,e={}){var n;let i=e.defaultPlacement||"swap",r=null!==(n=e.defaultMaybe)&&void 0!==n&&n,s=[],o=$(t);for(let t of o){if(":none"===t)continue;let n=i,o=r;t=t.replace(/::?(before|after|content)\b/,(t,e)=>(n=e,"")),t=t.replace(/:maybe\b/,()=>(o=!0,""));const u=Object.assign(Object.assign({},e),{selector:t,placement:n,maybe:o,originalRenderOptions:e});s.push(u)}return s},isAlive:v,isNotDestroying:g,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:P,insertTemp:function(...t){let[e,n="beforeend",s]=i.args(t,"val",i.isAdjacentPosition,"val"),o=N(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:N,cloneTemplate:B,trackSelector:function(t,e){return new up.SelectorTracker(t,e).start()},mutate:U,afterMutate:function(t){0===I?t():q(t)}}}(),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)},5313(){up.framework=function(){let t="evaling";function e({mode:e="manual"}={}){if("configuring"!==t)return void console.error("Unpoly has already booted");let i=n();i?console.error("Unpoly cannot boot: %s",i):(t="booting",up.emit("up:framework:boot",{mode:e,log:!1}),t="booted",document.documentElement.classList.add("up-booted"),up.emit("up:framework:booted",{mode:e,log:!1}))}function n(){for(let t of["Promise","DOMParser","FormData","reportError"])if(!window[t])return`Browser doesn't support the ${t} API`;if("BackCompat"===document.compatMode)return"Browser is in quirks mode (missing DOCTYPE?)";for(let t of[":is(*)",":has(*)"])if(!CSS.supports(`selector(${t})`))return`Browser doesn't support the ${t} selector`}return{onEvaled:function(){var n;up.emit("up:framework:evaled",{log:!1}),(null===(n=document.currentScript)||void 0===n?void 0:n.async)||document.querySelector("[up-boot=manual]:is(html, script)")||"complete"===document.readyState?console.debug("Call up.boot() after you have configured Unpoly"):document.addEventListener("DOMContentLoaded",()=>e({mode:"auto"})),t="configuring"},boot:e,startExtension:function(){if("configuring"!==t)throw new Error("Unpoly extensions must be loaded before booting");t="evaling"},stopExtension:function(){t="configuring"},reset:function(){up.emit("up:framework:reset",{log:!1})},get evaling(){return"evaling"===t},get booted(){return"booted"===t},get beforeBoot(){return"booting"!==t&&"booted"!==t},isSupported:function(){return!n()}}}(),up.boot=up.framework.boot},6101(){up.history=function(){const t=up.util,e=up.element,n=new up.Config("up.history.config",()=>({enabled:!0,restoreTargets:["body"],metaTagSelectors:["meta","link[rel=alternate]","link[rel=canonical]","link[rel=icon]","[up-meta]",'script[type="application/ld+json"]'],noMetaTagSelectors:["meta[http-equiv]","[up-meta=false]","meta[name=csp-nonce]"]}));let i,r,s,o=new up.FIFOCache({capacity:100,normalizeKey:p});function u(e){let{enabled:i}=n;return t.isArray(i)?i.includes(e):!!i}function a(){return t.normalizeURL(location.href)}function l(t,e){try{s=t,e()}finally{s=void 0}}function c(t){var e,n;let{reason:o,alreadyHandled:u,pauseTracking:l}=s||t;if(l)return;let c=a();if(b()?v(c):g(c)&&y(),r!==c){i=r,r=c,"detect"===o&&(o=p(c)===p(i)?"hash":"pop");let t=!u&&g(c),s=up.event.build("up:location:changed",{reason:o,location:c,previousLocation:i,alreadyHandled:u,willHandle:t,log:`New location is ${c}`});null===(n=(e=up.migrate).prepareLocationChangedEvent)||void 0===n||n.call(e,s),o&&(up.emit(s),w(s))}}function h(t){return(null==t?void 0:t.split(/(?=#)/))||[]}function p(t){return h(t)[0]}function f(e,n){return t.matchURLs(e,location.href,Object.assign({hash:!0},n))}function d(t,e){f(t)||m("pushState",t,e)}function m(t,e,n){u("location")&&(v(e),l(n,function(){history[t](null,{up:!0},e)}))}function g(t){return!!o.get(t)}function v(e=a()){e=t.normalizeURL(e),o.set(e,!0)}function b(){var t;return null===(t=history.state)||void 0===t?void 0:t.up}function y(){let{state:e}=history;b()||(t.isBlank(e)||t.isObject(e))&&l({pauseTracking:!0},function(){history.replaceState(Object.assign(Object.assign({},e),{up:!0}),"")})}function w(t){t.alreadyHandled||(t.willHandle?"pop"===t.reason?(up.viewport.saveFocus({location:t.previousLocation}),up.viewport.saveScroll({location:t.previousLocation}),function(t){up.error.muteUncriticalRejection(up.render({guardEvent:up.event.build("up:location:restore",{location:t,log:`Restoring location ${t}`}),url:t,target:n.restoreTargets,fail:!1,history:!0,location:t,peel:!0,layer:"root",cache:"auto",revalidate:"auto",saveScroll:!1,scroll:["restore","auto"],saveFocus:!1,focus:["restore","auto"]}))}(t.location)):"hash"===t.reason&&up.viewport.revealHash(location.hash,{strong:!0}):up.puts("up.history","Ignoring history entry owned by foreign script"))}function _(t=document.head){return t.querySelectorAll(n.selector("metaTagSelectors"))}return up.on("up:framework:boot",function({mode:t}){c({reason:null,alreadyHandled:!0}),function(){const t=history.pushState;history.pushState=function(...e){t.apply(this,e),c({reason:"push",alreadyHandled:!0})};const e=history.replaceState;history.replaceState=function(...t){e.apply(this,t),c({reason:"replace",alreadyHandled:!0})}}(),"GET"===up.protocol.initialRequestMethod()&&(y(),v()),"auto"===t&&up.viewport.revealHash(location.hash,{strong:!0,focus:!0})}),up.on(window,"hashchange, popstate",()=>{c({reason:"detect",alreadyHandled:!1})}),up.on("up:click",'a[href*="#"]',function(e,n){var i;if(e.defaultPrevented)return;if(up.event.isModified(e))return;let[r,s]=h(up.layer.current.location),[o,u]=h(t.normalizeURL(n)),a=n.getAttribute("href");if(r!==o&&!a.startsWith("#"))return;let l=null!==(i=n.getAttribute("up-scroll-behavior"))&&void 0!==i?i:"auto",c=up.layer.get(n),p=up.viewport.revealHashFn(u,{layer:c,behavior:l,focus:!0});p&&(up.event.halt(e),up.log.putsEvent(e),u!==s&&c.showsLiveHistory("location")&&d(r+u,{reason:"hash",alreadyHandled:!0}),p())}),up.macro("[up-back]",function(t){i&&(e.setMissingAttrs(t,{"up-href":i,"up-scroll":"restore"}),t.removeAttribute("up-back"),up.link.makeFollowable(t))}),up.on("up:framework:reset",function(){i=void 0,r=void 0,s=void 0,o.clear(),c({reason:null,alreadyHandled:!0}),v()}),{config:n,isEnabled:u,push:d,replace:function(t,e){m("replaceState",t,e)},get location(){return a()},get previousLocation(){return i},isLocation:f,findMetaTags:_,updateMetaTags:function(t){let e=_();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)},refineOption:function(e,n){return!1===e||t.isString(e)||t.isList(e)?e:n},options:function(e){return t.pick(e,["location","title","metaTags","lang"])}}}()},1420(t,e,n){var i=this&&this.wt||function(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,u)}a((i=i.apply(t,e||[])).next())})};n(7339);const r=up.util;up.layer=function(){const t=[up.Layer.Root,up.Layer.Modal,up.Layer.Popup,up.Layer.Drawer,up.Layer.Cover],e=new up.Config("up.layer.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",dismissible:!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",dismissible:"outside key",trapFocus:!1},foreignOverlaySelectors:["dialog"]};for(let n of t)e[n.mode].Class=n;return e});let n=null,s=[];function o(t){return"root"===t?[e.root,e.any]:[e[t],e.overlay,e.any]}function u(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})}const a=r.map(t,t=>t.selector()).join();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(),s=r.filter(s,"isDefault")});const l={config:e,mainTargets:function(t){return r.flatMap(o(t),"mainTargets")},open:u,build:function(t,i){var s,u,a;const{mode:l}=t,{Class:c}=e[l],h=o(l).toReversed();let p=up.migrate.handleLayerConfig;return p&&h.forEach(p),null!==(s=t.openAnimation)&&void 0!==s||(t.openAnimation=r.pluckKey(t,"animation")),null!==(u=t.openDuration)&&void 0!==u||(t.openDuration=r.pluckKey(t,"duration")),null!==(a=t.openEasing)&&void 0!==a||(t.openEasing=r.pluckKey(t,"easing")),t=r.mergeDefined(...h,{mode:l,stack:n},t),i&&(t=i(t)),new c(t)},ask:function(t){return new Promise(function(e,n){u(up.RenderOptions.chainCallbacks(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)},closestLayerElement:function(t){return t.closest(a)},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(l,["get","getAll","root","overlays","current","front","sync","count","attachedCount","dismissOverlays"],()=>n),r.delegate(l,["accept","dismiss","isRoot","isOverlay","isFront","on","off","emit","parent","history","location","mode","context","element","contains","size","affix"],()=>n.current),l}()},181(t,e,n){n(4598),up.link=function(){const t=up.util,e=up.element;let n=null,i=null,r=null;const s="[up-content], [up-fragment], [up-document]",o=`${s}, [up-target], [up-layer], [up-transition], [up-preload]`,u=new up.Config("up.link.config",()=>({followSelectors:["[up-follow]",`a:is(${o})`],noFollowSelectors:["[up-follow=false]","a[download]","a[target]",'a[href^="javascript:"]','a[href^="mailto:"]','a[href^="tel:"]',`a[href^="#"]:not(${s})`,e.crossOriginSelector("href"),e.crossOriginSelector("up-href")],instantSelectors:["[up-instant]"],noInstantSelectors:["[up-instant=false]","[onclick]"],preloadSelectors:["[up-preload]"],noPreloadSelectors:["[up-preload=false]"],clickableSelectors:["[up-clickable]","[up-follow]","[up-emit]","[up-accept]","[up-dismiss]",`a:is(${o})`],noClickableSelectors:["[up-clickable=false]","a[href], button"],preloadDelay:90})),a=up.mockable(function(t,e,n){return up.render(c(t,e,n))});function l(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=f(e,n),r.json("headers"),r.json("params"),r.booleanOrString("cache"),r.booleanOrString("expireCache"),r.booleanOrString("evictCache"),r.booleanOrString("revalidate"),r.booleanOrString("abort"),r.boolean("abortable"),r.boolean("background"),r.string("contentType"),r.booleanOrNumber("lateDelay"),r.number("timeout"),r.booleanOrString("fail"),n}function c(e,n,i){var r;e=p(up.fragment.get(e)),n=t.options(n);const s=new up.OptionsParser(e,n,Object.assign({fail:!0},i));return s.include(l),n.origin||(n.origin=e),s.boolean("navigate",{default:!0}),s.string("confirm",{attr:["up-confirm","data-confirm"]}),s.string("target"),s.booleanOrString("fallback"),s.string("match"),s.string("document"),s.string("fragment"),s.string("content"),s.boolean("keep",{attr:"up-use-keep"}),s.boolean("hungry",{attr:"up-use-hungry"}),s.json("data",{attr:"up-use-data"}),s.json("dataMap",{attr:"up-use-data-map"}),s.renderCallback("onLoaded"),s.renderCallback("onRendered"),s.renderCallback("onFinished"),s.renderCallback("onOffline"),s.renderCallback("onError"),s.booleanOrString("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("dismissible"),s.renderCallback("onOpened"),s.renderCallback("onAccept"),s.renderCallback("onAccepted"),s.renderCallback("onDismiss"),s.renderCallback("onDismissed"),s.string("onAcceptedReload"),s.string("onDismissedReload"),s.string("acceptEvent"),s.string("dismissEvent"),s.string("acceptFragment"),s.string("dismissFragment"),s.string("acceptLocation"),s.string("dismissLocation"),s.booleanOrString("closeAnimation"),s.string("closeEasing"),s.number("closeDuration"),s.include(up.status.statusOptions),s.booleanOrString("focus"),s.booleanOrString("focusVisible"),s.boolean("saveScroll"),s.boolean("saveFocus"),s.booleanOrNumberOrString("scroll"),s.json("scrollMap"),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 h(t,e){let n=function(t){if(!w(t))return"Will not preload an unsafe link"}(t=p(up.fragment.get(t)));if(n)return Promise.reject(new up.Error(n));if(!up.network.config.cacheEnabled)return Promise.resolve();const i=up.event.build("up:link:preload",{log:["Preloading link %o",t]});return a(t,Object.assign(Object.assign(Object.assign(Object.assign({abort:!1,abortable:!1,background:!0,cache:!0},e),up.RenderOptions.NO_INPUT_INTERFERENCE),up.RenderOptions.NO_PREVIEWS),{guardEvent:i,preload:!0}))}function p(t){var e;let n=null===(e=t.upExpandedPair)||void 0===e?void 0:e[1];return t.contains(n)?n:t}function f(e,n={}){return t.normalizeMethod(n.method||e.getAttribute("up-method")||e.getAttribute("data-method"))}function d(t){return t=up.fragment.get(t),u.matches(t,"followSelectors")}function m(t){d(t)||t.setAttribute("up-follow","")}function g(t,e){return!t.defaultPrevented&&v(t.target,e)}function v(t,e){const n=t.closest("[up-expand]");if((null==n?void 0:n.upExpandedPair)&&n!==e&&e.contains(n))return!1;const i=`a, [up-follow], ${e.matches("a")?up.form.fieldSelector():[up.form.fieldSelector(),up.form.anyButtonSelector(),"label","summary"].join()}`,r=t.closest(i);return!r||r===e||!e.contains(r)}function b(t){const e=t.closest(u.selector("instantSelectors"));return e&&(n=e,!(u.matches(n,"noInstantSelectors")||u.matches(n,"noFollowSelectors")))&&v(t,e);var n}function y(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 w(t){const e=f(t);return up.network.isSafeMethod(e)}function _(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 O(t,e){let n=up.event.build("up:deferred:load",{log:["Loading deferred %o",t]}),i=Object.assign({navigate:!1,guardEvent:n},e);return a(t,i,{defaults:{target:":origin",failTarget:":none",cache:"auto",revalidate:"auto",feedback:!0}})}return up.macro(u.selectorFn("clickableSelectors"),function(t){let n=t.matches("a, [up-follow]")?"link":"button";e.setMissingAttrs(t,{tabindex:"0",role:n,"up-clickable":""}),t.addEventListener("keydown",function(e){if("Enter"===e.key||"button"===t.role&&" "===e.key)return y(e)})}),up.attribute("up-defer",{defaultValue:"insert"},function(t,e){_(e,t,e=>up.error.muteUncriticalRejection(O(t,e)))}),up.on("up:click",u.selectorFn("followSelectors"),function(t,e){g(t,e)&&(up.event.halt(t,{log:!0}),up.focus(e,{preventScroll:!0}),up.error.muteUncriticalRejection(a(e)))}),up.attribute("up-expand",{defaultValue:"a, [up-href]",macro:!0},function(t,n){let i=e.get(t,n);i&&(i.upExpandedPair=t.upExpandedPair=[t,i],e.addClasses(t,e.upClasses(i)),e.setMissingAttr(t,"up-href",e.attr(i,"up-href")||e.attr(i,"href")),d(i)&&(e.setMissingAttrs(t,e.upAttrs(i)),m(t)))}),up.on("up:click","[up-expand]",function(t,e){var n;let i=null===(n=e.upExpandedPair)||void 0===n?void 0:n[1];i&&!d(e)&&!i.contains(t.target)&&g(t,e)&&(up.event.halt(t),i.click())}),up.compiler(u.selectorFn("preloadSelectors"),function(n){if(!function(t){return!up.browser.canPushState()&&up.history.isEnabled("location")||!d(t)||!function(t){const e=l(t);if(e.url)return null==e.cache&&(e.cache="auto"),e.basic=!0,new up.Request(e).willCache()}(t)}(p(n))){let i=t=>up.error.muteUncriticalRejection(h(n,t)),r=e.booleanOrStringAttr(n,"up-preload");(!0===r||t.isUndefined(r))&&(r="hover"),_(r,n,i)}}),up.on("up:framework:reset",function(){n=null,i=null,r=null}),{follow:a,followOptions:c,requestOptions:l,preload:h,makeFollowable:m,isSafe:w,isFollowable:d,shouldHandleClick:g,convertClicks:function(t){t.on("click",function(e,n){up.event.isModified(e)||(b(n)&&r===n?up.event.halt(e):("key"===up.event.inputDevice||up.event.isSyntheticClick(e)||t.wasHitByMouseEvent(e)&&(!i||i===e.target))&&y(e),i=null,r=null)}),t.on("touchstart",{passive:!0},function(t,e){n=e}),t.on("mousedown",function(t,e){up.event.isModified(t)||(i=e,t.defaultPrevented||!b(e)||function(t){let e=t.target;return n===e&&e.closest("[href]")}(t)||(r=e,y(t)),n=null)})},config:u,loadDeferred:O}}(),up.follow=up.link.follow,up.deferred={load:up.link.loadDeferred}},367(){up.log=function(){const t=up.util,e=new up.LogConfig;function n(t,e,n,...r){i(t,e,"",n,...r)}function i(n,i,r,s,...o){s&&(e.format?console[n](`%c${i}%c ${s}`,"color: #666666; padding: 1px 3px; border: 1px solid #bbbbbb; border-radius: 2px; font-size: 90%; display: inline-block;"+r,"",...o):console[n](`[${i}] ${t.sprintf(s,...o)}`))}let r;return up.on("up:framework:boot",function(){if(!e.banner)return;const t=` __ _____ ___ ___ / /_ __\n/ // / _ \\/ _ \\/ _ \\/ / // / ${up.version}\n\\___/_//_/ .__/\\___/_/\\_. / \n / / / /\n\n`;let n="";up.migrate.loaded||(n+="Load unpoly-migrate.js to polyfill deprecated APIs.\n\n"),e.enabled?n+="Call `up.log.disable()` to disable logging for this session.":n+="Call `up.log.enable()` to enable logging for this session.";const i="color: #777777";e.format?console.log("%c"+t+"%c"+n,"font-family: monospace;"+i,i):console.log(t+n)}),{puts:function(...t){e.enabled&&n("log",...t)},putsEvent:function(t){if(e.enabled&&r!==t){r=t;let e=t.originalEvent||t,n="#5566cc";i("log",e.type,`color: white; border-color: ${n}; background-color: ${n}`,"Interaction on %o",e.target)}},error:(...t)=>n("error",...t),warn:(...t)=>n("warn",...t),config:e,enable:function(){e.enabled=!0},disable:function(){e.enabled=!1}}}(),up.puts=up.log.puts,up.warn=up.log.warn},6559(){up.migrate={config:{}}},9363(){up.mockable=function(t){if(window.jasmine){let e=t.name,n={[e]:t},i=function(){return n[e].apply(this,arguments)};return i.mock=()=>spyOn(n,e),i}return t}},2679(){var t=this&&this.wt||function(t,e,n,i){return new(n||(n=Promise))(function(r,s){function o(t){try{a(i.next(t))}catch(t){s(t)}}function u(t){try{a(i.throw(t))}catch(t){s(t)}}function a(t){var e;t.done?r(t.value):(e=t.value,e instanceof n?e:new n(function(t){t(e)})).then(o,u)}a((i=i.apply(t,e||[])).next())})};up.motion=function(){const e=up.util,n=up.element,i=new up.MotionController("motion"),r=new up.Config("up.motion.config",()=>({duration:175,easing:"ease",enabled:!matchMedia("(prefers-reduced-motion: reduce)").matches}));let s=new up.Registry("animation",f),o=new up.Registry("transition",h);function u(t){return!n.isSingleton(t)}function a({duration:t,easing:e}){return{duration:r.enabled?null!=t?t:r.duration:0,easing:null!=e?e:r.easing}}function l(i,r,s){return t(this,arguments,void 0,function*(t,i,{duration:r,easing:s,finishedFrame:o}){let u=()=>n.setStyle(t,null!=o?o:i);if(!r)return u();let a,l=e.withRenamedKeys(i,e.kebabToCamelCase),c=t.animate([l],{duration:r,easing:s,fill:"forwards"}),h=()=>{c.finish(),u(),c.cancel(),a()};a=up.on(t,"up:motion:finish",h),yield c.finished,h()})}function c(e,r,s,{duration:o,easing:l,beforeRemove:c,afterRemove:p}={}){const f=up.error.guardFn(h(s)),m=a({duration:o,easing:l}),g=[r,e],{nested:v}=i;let b;if(v||g.forEach(t=>i.finish(t)),f&&u(e))if(v)b=()=>f(e,r,m);else{const i=up.viewport.get(e),s=i.scrollTop,o=up.viewport.absolutize(e,{afterMeasure:()=>n.insertBefore(e,r)});b=()=>t(this,void 0,void 0,function*(){o.moveBounds(0,i.scrollTop-s),yield f(e,r,m),null==c||c(),o.bounds.remove(),null==p||p()})}else null==c||c(),d(e,r),b=p;return()=>i.startFunction(g,()=>t(this,void 0,void 0,function*(){return null==b?void 0:b()}))}function h(t){return m(t)?void 0:e.isFunction(t)?t:e.isArray(t)?p(...t):e.isString(t)&&t.includes("/")?p(...t.split("/")):o.get(t)}function p(t,n){if(!m(t)||!m(n)){const i=f(t)||e.asyncNoop,r=f(n)||e.asyncNoop;return(t,e,n)=>Promise.all([i(t,n),r(e,n)])}}function f(t){return m(t)?void 0:e.isFunction(t)?t:e.isOptions(t)?(e,n)=>l(e,t,n):s.get(t)}const d=up.mockable(function(t,e){t.replaceWith(e)});function m(t){return!t||"none"===t||e.isOptions(t)&&e.isBlank(t)}function g(t,n,i){s.put(t,function(t,r){return t.style.opacity=e.evalOption(n,t),l(t,{opacity:i},r)})}function v(t,e){return{transform:`translate(${t}px, ${e}px)`}}function b(t){return n.setStyle(t,{transform:"translate(0, 0)"}),t.getBoundingClientRect()}function y(t,e){const i=`move-to-${t}`,r=`move-from-${t}`;s.put(i,function(t,n){const i=b(t);return l(t,e(i),n)}),s.put(r,function(t,i){const r=b(t),s=e(r);return n.setStyle(t,s),l(t,{transform:"translate(0, 0)"},Object.assign(Object.assign({},i),{finishedFrame:{transform:""}}))})}return up.on("up:framework:boot",function(){r.enabled||up.puts("up.motion","Animations are disabled")}),g("fade-in",0,1),g("fade-out",function(t){return n.style(t,"opacity")},0),y("top",function(t){return v(0,-(t.top+t.height))}),y("bottom",function(t){return v(0,up.viewport.rootHeight()-t.top)}),y("left",function(t){return v(-(t.left+t.width),0)}),y("right",function(t){return v(up.viewport.rootWidth()-t.left,0)}),o.put("cross-fade",["fade-out","fade-in"]),o.put("move-left",["move-to-left","move-from-right"]),o.put("move-right",["move-to-right","move-from-left"]),o.put("move-up",["move-to-top","move-from-bottom"]),o.put("move-down",["move-to-bottom","move-from-top"]),up.on("up:framework:reset",function(){i.reset()}),{morph:function(e,n,i,r){return t(this,void 0,void 0,function*(){e=up.fragment.get(e),n=up.fragment.get(n),yield c(e,n,i,r)()})},swap:c,animate:function(e,n){return t(this,arguments,void 0,function*(e,n,{duration:r,easing:s,onFinished:o}={}){e=up.fragment.get(e),i.nested||i.finish(e);const l=up.error.guardFn(f(n)),c=a({duration:r,easing:s});yield i.startFunction([e],function(){return t(this,void 0,void 0,function*(){if(l&&u(e))try{yield l(e,c)}finally{null==o||o()}else null==o||o()})})})},finish:function(t){var e,n;return t=up.fragment.get(t),i.finish(t),null===(n=(e=up.migrate).formerlyAsync)||void 0===n?void 0:n.call(e,"up.motion.finish()")},transition:o.put,animation:s.put,config:r,isNone:m,swapElementsDirectly:d,motionOptions:function(t,n,i){n=e.options(n);let r=new up.OptionsParser(t,n,i);return r.booleanOrString("animation"),r.booleanOrString("transition"),r.string("easing"),r.number("duration"),n}}}(),up.transition=up.motion.transition,up.animation=up.motion.animation,up.morph=up.motion.morph,up.animate=up.motion.animate},9399(t,e,n){n(7412);const i=up.util;up.network=function(){const t=new up.Config("up.network.config",()=>({concurrency:6,wrapMethod:!0,cacheEnabled:!0,cacheSize:70,cacheExpireAge:15e3,cacheEvictAge:54e5,lateDelay:400,fail:t=>(t.status<200||t.status>299)&&304!==t.status,autoCache:t=>t.isSafe(),expireCache:t=>!t.isSafe(),evictCache:!1,progressBar:!0,timeout:9e4})),e=new up.Request.Queue,n=new up.Request.Cache;let r=null;function s(r){var o,u,a,l;n.expire(null!==(u=null!==(o=r.expireCache)&&void 0!==o?o:i.evalOption(t.expireCache,r))&&void 0!==u&&u),n.evict(null!==(l=null!==(a=r.evictCache)&&void 0!==a?a:i.evalOption(t.evictCache,r))&&void 0!==l&&l),function(t){let i;if(t.willCache()&&(i=n.get(t)))return up.puts("up.request()","Re-using previous request to %s",t),t.background||e.promoteToForeground(i),i.mergeIfUnsent(t),n.track(i,t,{onIncompatible:s}),t.ended||e.track(t),!0}(r)||function(t){(function(t){t.willCache()&&(n.put(t),t.onLoading=()=>n.reindex(t)),t.onSettle=function(e){var i,r;n.expire(null!==(i=e.expireCache)&&void 0!==i&&i,{except:t}),n.evict(null!==(r=e.evictCache)&&void 0!==r&&r,{except:t});let s=e instanceof up.Response,o=!s,u=s&&e.ok,a=s&&!e.ok,l=s&&e.none,c=s&&e.redirectRequest;a?n.evict(t.url):o||l?n.evict(t):u&&(n.get(t)&&n.put(t),c&&(c.willCache()||n.get(c))&&n.put(c))}})(t),e.asap(t)}(r)}function o(...t){var n,i;null===(i=(n=up.migrate).preprocessAbortArgs)||void 0===i||i.call(n,t),e.abort(...t)}return up.on("up:network:late",function(){i.evalOption(t.progressBar)&&(r=new up.ProgressBar)}),up.on("up:network:recover",function(){null==r||r.conclude()}),up.on("up:framework:reset",function(){o(),e.reset(),n.reset(),null==r||r.destroy(),r=null}),{request:function(...t){const e=function(t){var e,n;let r=i.parseArgIntoOptions(t,"url");return null===(n=(e=up.migrate).handleRequestOptions)||void 0===n||n.call(e,r),r}(t),n=new up.Request(e);return s(n),n},cache:n,isBusy:function(){return e.isBusy()},isSafeMethod:function(t){return i.contains(["GET","OPTIONS","HEAD"],i.normalizeMethod(t))},config:t,abort:o,queue:e,loadPage:function(t){new up.Request(t).loadPage()}}}(),up.request=up.network.request,up.cache=up.network.cache},9013(){up.protocol=function(){const t=up.util,e=up.element,n=function(t){return"X-Up"+t.replace(/(^.|[A-Z])/g,t=>"-"+t.toUpperCase())},i=function(e,i,r=t.identity){let s=e.getResponseHeader(n(i));if(s)return r(s)};function r(t){return"false"!==t&&t}const s=t.memoize(function(){return t.normalizeMethod(up.browser.popCookie("_up_method"))}),o=new up.Config("up.protocol.config",()=>({methodParam:"_method",csrfParam:()=>e.metaContent("csrf-param"),csrfToken:()=>e.metaContent("csrf-token"),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)},openLayerFromXHR:function(e){return i(e,"openLayer",t.parseRelaxedJSON)},acceptLayerFromXHR:function(e){return i(e,"acceptLayer",t.parseRelaxedJSON)},contextFromXHR:function(e){return i(e,"context",t.parseRelaxedJSON)},dismissLayerFromXHR:function(e){return i(e,"dismissLayer",t.parseRelaxedJSON)},eventPlansFromXHR:function(e){return i(e,"events",t.parseRelaxedJSON)},expireCacheFromXHR:function(t){var e,n,s;return null!==(e=i(t,"expireCache",r))&&void 0!==e?e:null===(s=(n=up.migrate).clearCacheFromXHR)||void 0===s?void 0:s.call(n,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)},initialRequestMethod:s,headerize:n,wrapMethod:function(t,e){return e.add(o.methodParam,t),"POST"}}}()},3194(){up.radio=function(){const t=up.element,e=new up.Config("up.radio.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 l=[s,...s.ancestors,...s.descendants];for(let e of l){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 l=t.attr(a,"up-if-layer"),c=l?up.layer.getAll(l,{baseLayer:e}):[e],h=up.motion.motionOptions(a),p=up.event.build("up:fragment:hungry",{log:!1}),f=up.script.callbackAttr(a,"up-on-hungry",{expandObject:["newFragment","renderOptions"]}),d=Object.assign(Object.assign({selector:i,oldElement:a,layer:e,origin:r},h),{placement:"swap",keep:!0,maybe:!0,meta:o,selectEvent:p,selectCallback:f,originalRenderOptions:n});c.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={}){var i;const r=new up.OptionsParser(t,n,{defaults:{background:!0}});return r.number("interval",{default:e.pollInterval}),r.string("ifLayer",{default:"front"}),r.include(up.link.requestOptions),r.include(up.status.statusOptions),null!==(i=n.failTarget)&&void 0!==i||(n.failTarget=":none"),n}}}()},4372(){!function(){function t(t,e,n){if(t.hasAttribute(e)){let i=t.getAttribute(e);up.element.setMissingAttr(t,n,i),t.removeAttribute(e)}}function e(e,n){up.macro(`:is([data-confirm], [data-method]):is(${e})`,function(e){var i;(window.Rails||(null===(i=window.jQuery)||void 0===i?void 0:i.rails))&&n(e)&&(t(e,"data-confirm","up-confirm"),t(e,"data-method","up-method"))})}e("a[href], [up-href]",t=>up.link.isFollowable(t)),e("form, input[type=submit], button[type=submit], button:not([type])",t=>up.form.isSubmittable(up.form.get(t)))}()},3106(){up.script=function(){const t=up.util,e=up.element,n=new up.Config("up.script.config",()=>({cspNonce:()=>e.metaContent("csp-nonce"),cspWarnings:!0,scriptElementPolicy:"auto",evalCallbackPolicy:"auto",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-accept","up-on-accepted","up-on-dismiss","up-on-dismissed","up-on-loaded","up-on-rendered","up-on-finished","up-on-error","up-on-offline"],scriptSelectors:["script:not([type])",'script[type="text/javascript"]','script[type="module"]','script[type="importmap"]'],noScriptSelectors:['script[type="application/ld+json"]']})),i={"[up-back]":-100,"[up-clickable]":-200,"[up-drawer]":-200,"[up-modal]":-200,"[up-cover]":-200,"[up-popup]":-200,"[up-tooltip]":-200,"[up-dash]":-200,"[up-flashes]":-200,"[up-expand]":-300,"[data-method]":-400,"[data-confirm]":-400,"[up-keep]":9999999999};let r=[],s=[];function o(e,n={}){let o=function(e,n){let[i,r,s]=u(e);return r=t.options(r,{selector:i,isDefault:up.framework.evaling,priority:0,batch:!1,rerun:!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)l(t.element,{layer:t,compilers:[e],macros:[],insertedEvent:!1});else up.puts("up.compiler()","Compiler with priority (%s) was registered after booting Unpoly. Compiler will run for future fragments only.",e.selector);return e}function l(t,e={}){var n,i;t=up.fragment.get(t,e);let o=null!==(n=e.macros)&&void 0!==n?n:s,u=null!==(i=e.compilers)&&void 0!==i?i:r;return new up.HelloFragment(t,o,u,e).run()}function c(t=document.head){return t.querySelectorAll(n.selector("assetSelectors"))}function h(e){return t.map(e,p).join()}function p(t){return e.removeAttrsFromHTML(t.outerHTML,["nonce"])}function f(t,i=""){let r=n.selector("scriptSelectors",i);return e.subtree(t,r)}function d(e,{argNames:n=["event"],expandObject:i=!1}={}){return function(...r){let s=n;if(i){let e=r[0];s=[...n,...i],r=[e,...Object.values(t.pick(e,i))]}const o=up.NonceableCallback.fromCallbackString(e),u={thisContext:this,argNames:s,argValues:r};return(new up.ScriptGate).evalCallback(o,u)}}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:l}=r;o([a,r,n=>{let r=e.booleanOrStringAttr(n,i);if(!1!==r)return t.isDefined(l)&&!0===r&&(r=l),s(n,r)}])},destructor:function(n,i){let r=t.scanFunctions(i);if(r.length)if(n.isConnected)(n.upDestructors||(n.upDestructors=function(n){let i=t.cleaner();return i(e.addClassTemp(n,"up-can-clean")),i}(n))).guard(r);else{up.puts("up.destructor()","Immediately calling destructor for detached element (%o)",n);for(let t of r)up.error.guard(t,n)}},hello:l,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:c,assertAssetsOK:function(t,e){let{response:n}=e,i=c();h(i)!==h(t)&&up.event.assertEmitted("up:assets:changed",{oldAssets:i,newAssets:t,renderOptions:e,response:n})},block:function(t){for(let e of f(t))e.type="up-blocked-script"},adoptNewFragment:function(t,e){new up.ScriptGate(e).adoptNewFragment(t)},adoptRenderOptionsFromHeader:function(t,e){new up.ScriptGate(e).adoptRenderOptionsFromHeader(t)},adoptDetachedHeadAsset:function(t,e){new up.ScriptGate(e).adoptDetachedHeadAsset(t)},parseCallback:d,cspNonce:function(){return t.evalOption(n.cspNonce)},warnOfUnsafeCSP:function(t){new up.ScriptGate(t).warnOfUnsafeCSP()},callbackAttr:function(t,n,i){return e.parseAttr(t,n,e=>d(e,i).bind(t))},isScript:function(t){return n.matches(t,"scriptSelectors")},findScripts:f}}(),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},2771(){up.status=function(){const t=up.util,e=up.element,n=new up.Config("up.status.config",()=>({currentClasses:["up-current"],activeClasses:["up-active"],loadingClasses:["up-loading"],revalidatingClasses:["up-revalidating"],navSelectors:["[up-nav]","nav"],noNavSelectors:["[up-nav=false]"]}));let i=new up.Registry("preview");function r(t){return t.upCurrentURLs||(t.upCurrentURLs=new up.LinkCurrentURLs(t))}function s(i,s,{newLinks:o,anyLocationChanged:a}){let l=!a&&i.upNavLocations||function(n){let i=e.attr(n,"up-layer")||"origin",r=up.layer.getAll(i,{origin:n});return t.compact(r.map(u))}(i);if(o||!t.isEqual(i.upNavLocations,l)){for(let t of s){const i=r(t).isAnyCurrent(l);for(let e of n.currentClasses)t.classList.toggle(e,i);e.setAttrPresence(t,"aria-current","page",i)}i.upNavLocations=l}}function o(t,i){const r=n.selector("navSelectors"),o=e.around(t,r);for(let t of o)s(t,e.subtree(t,"a, [up-href]"),i)}function u(e){return t.matchableURL(e.location)}function a(t){return t.upExpandedPair||[t]}function l(t){if(t)return function(e){e.showPlaceholder(t)}}function c(e){return t.isFunction(e)?[e]:t.isString(e)?(n=e,t.map(t.parseScalarJSONPairs(n),([t,e])=>{let n=i.get(t);return function(i,r){return up.puts("[up-preview]","Showing preview %o",t),n(i,e||r)}})):t.isArray(e)?e.flatMap(c):[];var n}return up.on("up:compilers:before",(t,e)=>{o(e,{newLinks:!0,anyLocationChanged:!1})}),up.on("up:layer:location:changed up:layer:opened up:layer:dismissed up:layer:accepted",()=>{o(document.body,{newLinks:!1,anyLocationChanged:!0})}),{config:n,preview:i.put,resolvePreviewFns:c,runPreviews:function(e,i){let{bindLayer:r}=e,s=up.FocusCapsule.preserve(r),o=r.asCurrent(()=>function(e,i){let{fragment:r,fragments:s,origin:o}=e,u=t.cleaner(),h=t=>new up.Preview({fragment:t,request:e,renderOptions:i,cleaner:u}),p=h(r);p.run(c(i.preview)),p.run(l(i.placeholder)),p.run(function(e,i){if(e)return function(e){const{renderOptions:r}=e;r.expiredResponse?e.addClassBatch(i,n.revalidatingClasses):(e.addClassBatch(function({origin:e,activeElements:n}){return n||(n=t.wrapList(e)),t.flatMap(n,a)}(r),n.activeClasses),e.addClassBatch(i,n.loadingClasses))}}(i.feedback,s)),p.run(up.form.getDisablePreviewFn(i.disable,o));for(let t of s){let e=h(t);e.run(up.fragment.matchSelectorMap(t,i.previewMap)),e.run(up.fragment.matchSelectorMap(t,i.placeholderMap).flatMap(l))}return u.clean}(e,i));return null==s||s.autoVoid(),()=>{r.asCurrent(o),null==s||s.restore(r,{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},3889(){up.util=function(){function t(){}function e(t,e){let n={};return function(...i){if(e&&(n=this[e]||(this[e]={})),n.value)return n.value[0];if(n.error)throw n.error;try{return(n.value=[t.apply(this,i)])[0]}catch(t){throw n.error=t}}}function n(t,e){e=A(e,{host:"cross-domain"});const n=a(t);let i="";"cross-domain"===e.host&&(e.host=u(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 i(t,e){if(t)return n(t,Object.assign({hash:!1,trailingSlash:!1},e))}const r=location.protocol,s=location.hostname,o=location.origin;function u(t){if(O(t)&&-1===t.indexOf("//"))return!1;const e=a(t);return s!==e.hostname||r!==e.protocol}function a(t){if(t.pathname)return t;let e=document.createElement("a");return e.href=t,e}function l(t){return O(t)?e=>e[t]:t}function c(t,e){if(0===t.length)return[];e=l(e);let n=[],i=0;for(let r of t)n.push(e(r,i++));return n}function h(t,e){return Object.fromEntries(t.map(e))}function p(t,e){let n=0;for(let i of t)e(i,n++)}function f(t){return null===t}function d(t){return!!t}function m(t){return void 0===t}const g=ot(m);function v(t){return m(t)||f(t)}const b=ot(v);function y(t){return!!v(t)||(E(t)&&t[y.key]?t[y.key]():O(t)||F(t)?0===t.length:!!S(t)&&0===Object.keys(t).length)}y.key="up.util.isBlank";const w=ot(y);function _(t){return"function"==typeof t}function O(t){return"string"==typeof t||t instanceof String}function k(t){return"number"==typeof t||t instanceof Number}function S(t){return"object"==typeof t&&!f(t)&&(m(t.constructor)||t.constructor===Object)}function E(t){const e=typeof t;return"object"===e&&!f(t)||"function"===e}function j(t){return t instanceof Element}function C(t){return up.browser.canJQuery()&&t instanceof jQuery}const{isArray:x}=Array;function F(t){return x(t)||function(t){return t instanceof NodeList}(t)||function(t){return"[object Arguments]"===Object.prototype.toString.call(t)}(t)||C(t)||function(t){return t instanceof HTMLCollection}(t)}function T(t){return F(t)?t:v(t)?[]:[t]}function P(t){return E(t)&&t[P.key]?t=t[P.key]():F(t)?t=R(t):S(t)&&(t=Object.assign({},t)),t}function R(t){return Array.prototype.slice.call(t)}function L(...t){return Object.assign({},...t)}function A(t,e){return e?L(e,t):t?P(t):{}}function D(t,e){e=l(e);let n=0;for(let i of t){const t=e(i,n++);if(t)return t}}function $(t,e){e=l(e);let n=!0,i=0;for(let r of t)if(!e(r,i++)){n=!1;break}return n}function M(t,e){e=l(e);const n=[];return p(t,function(t,i){if(e(t,i))return n.push(t)}),n}function H(t){return t[t.length-1]}function N(t,e){return(t.indexOf||Array.prototype.indexOf).call(t,e)>=0}function B(t,e){const n={};for(let i of e)i in t&&(n[i]=t[i]);return n}function I(t,e){e=l(e);const n={};for(let i in t)e(t[i],i)&&(n[i]=t[i]);return n}function q(t,...e){return _(t)?t(...e):t}P.key="up.util.copy",Date.prototype[P.key]=function(){return new Date(+this)};const U={"&":"&","<":"<",">":">",'"':""","'":"'"};function z(t,e){const n=t[e];return delete t[e],n}function V(t,e){if(e(H(t)))return t.pop()}function K(t){return V(t,_)}function X(t){return V(t,S)||{}}function W(t){return t}function G(t,...e){return c(t=at(t),t=>t(...e))}function J(t){const e=[];for(let n of t)F(n)?e.push(...n):e.push(n);return e}function Q(t,e){return t===e||((null==t?void 0:t.valueOf)&&(t=t.valueOf()),(null==e?void 0:e.valueOf)&&(e=e.valueOf()),t===e||typeof t==typeof e&&(F(t)&&F(e)?Y(t,e):E(t)&&t[Q.key]?t[Q.key](e):!(!S(t)||!S(e))&&function(t,e){const n=Object.keys(t);return Y(n,Object.keys(e))&&$(n,n=>Q(t[n],e[n]))}(t,e)))}function Y(t,e){return t.length===e.length&&$(t,(t,n)=>Q(t,e[n]))}function Z(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(W)}function tt(t){let{masked:e,restore:n}=pt(t);return{maskedTokens:Z(e,","),restore:n}}Q.key="up.util.isEqual";let et=0;function nt(t,e,n){for(let i of e)Object.defineProperty(t,i,{get(){const t=n.call(this);let e=t[i];return _(e)&&(e=e.bind(t)),e},set(t){n.call(this)[i]=t}})}function it(t,e="%o",n=new Set){var i;let r;if("%c"===e)return"";"%s"===e&&b(t)&&(t=t.toString());let s=t=>it(t,"%o",n);if(O(t))r=t.trim().replace(/[\n\r\t ]+/g," "),"%o"===e&&(r=JSON.stringify(r));else if(_(t))r=t.toString();else if(C(t))r=`$(${c(t,s).join(", ")})`;else if(j(t))r=t.cloneNode().outerHTML.match(st)[0];else if(t instanceof Error)r=`${t.name}(${t.message})`;else if(E(t)){let e=t[Symbol.toStringTag]||(null===(i=t.constructor)||void 0===i?void 0:i.name);if(n.has(t))r="(circular)";else if(x(t)||S(t)){if(n.add(t),x(t))r=`[${c(t,s).join(", ")}]`;else{let e=Object.entries(t).map(([t,e])=>`${t}: ${s(e)}`);r=e.length?`{ ${e.join(", ")} }`:"{}"}n.delete(t)}else r=t.toString!==Object.prototype.toString?`${e}(${t.toString()})`:`${e} {…}`}else r=String(t);return r.length>200&&(r=`${r.substr(0,200)}…${H(r)}`),r}const rt=/%[oOdisfc]/g,st=/<("[^"]*"|[^">])*>/;function ot(t){return function(...e){return!t(...e)}}function ut(t,...e){let n=[];for(;e.length;){let i=e.pop();if("options"===i)n.unshift(X(t));else if("callback"===i)n.unshift(K(t));else if("val"===i)n.unshift(t.pop());else if(_(i)){let e=i(H(t))?t.pop():void 0;n.unshift(e)}}return n}function at(...t){return t.flat(2).filter(_)}function lt(t,e,{keepDelimiters:n=!1}={}){let i=0,r=/§\d+/g,s={},o=[],u=(e,r)=>{let u=!1;t=t.replaceAll(e,function(t){u=!0;let e,r,o="§"+i++;if(n){let n=t[0],i=t.slice(-1);r=t.slice(1,-1),e=n+o+i}else r=t,e=o;return s[o]=r,e}),u&&o.unshift({allowRestoreTransform:r})};u(r,!1);for(let t of e)u(t,!0);return{masked:t,restore:(t,e=W)=>{for(let{allowRestoreTransform:n}of o){let i=n?e:W;t=t.replace(r,t=>i(mt(s[t],O)))}return t}}}const ct=/'(?:\\\\|\\'|[^'])*'|"(?:\\\\|\\"|[^"])*"/g,ht=/{(?:[^{}]|{[^{}]*})*}|\((?:[^\(\)]|\([^\(\)]*\))*\)|\[(?:[^\[\]]|\[[^\[\]]*\])*\]/g;function pt(t){return lt(t,[ct,ht],{keepDelimiters:!0})}function ft(t){return'"'===t[0]?t:(mt("'"===t[0]),'"'+(t=t.slice(1,-1)).replace(/(\\\\)|(\\')|(\\")|(")/g,function(t,e,n,i){return e||n&&"'"||'\\"'})+'"')}function dt(t){let{masked:e,restore:n}=lt(t,[ct]);return e=e.replace(/([a-z_$][\w$]*:)/gi,t=>'"'+t.slice(0,-1)+'":'),e=e.replace(/,\s*([}\]])/g,"$1"),e=n(e,ft),JSON.parse(e)}function mt(t,e=d){if(e(t))return t;throw"assert failed"}return{parseURL:a,normalizeURL:n,matchableURL:i,matchableURLPatternAtom:function(t){return t.startsWith(o+"/")&&(t=t.slice(o.length)),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,n){return i(t,n)===i(e,n)},normalizeMethod:function(t){return t?t.toUpperCase():"GET"},methodAllowsPayload:function(t){return"GET"!==t&&"HEAD"!==t},copy:P,merge:L,mergeDefined:function(...t){const e={};for(let n of t)if(n)for(let t in n){const i=n[t];g(i)&&(e[t]=i)}return e},options:A,parseArgIntoOptions:function(t,e){let[n,i]=ut(t,"val","options");return g(n)&&(i[e]=n),i},each:p,map:c,flatMap:function(t,e){return J(c(t,e))},mapObject:h,spanObject:function(t,e){return h(t,t=>[t,e])},findResult:D,some:function(t,e){return!!D(t,e)},every:$,find:function(t,e){let n;e=l(e);for(let i of t)if(e(i)){n=i;break}return n},filter:M,reject:function(t,e){return M(t,e=ot(l(e)))},intersect:function(t,e){return M(t,t=>N(e,t))},compact:function(t){return M(t,b)},compactObject:function(t){return I(t,b)},uniq:function(t){return t.length<2?t:Array.from(new Set(t))},uniqBy:function(t,e){if(t.length<2)return t;e=l(e);const n=new Set;return M(t,function(t,i){const r=e(t,i);return!n.has(r)&&(n.add(r),!0)})},last:H,isNull:f,isDefined:g,isUndefined:m,isGiven:b,isMissing:v,isPresent:w,isBlank:y,presence:function(t,e=w){if(e(t))return t},isObject:E,isFunction:_,isString:O,isBoolean:function(t){return"boolean"==typeof t||t instanceof Boolean},isNumber:k,isElement:j,isTextNode:function(t){return t instanceof Text},isJQuery:C,isElementLike:function(t){var e;return!(!t||!(t.addEventListener||C(t)&&(null===(e=t[0])||void 0===e?void 0:e.addEventListener)))},isPromise:function(t){return E(t)&&_(t.then)},isOptions:S,isArray:x,isFormData:function(t){return t instanceof FormData},isList:F,isRegExp:function(t){return t instanceof RegExp},isAdjacentPosition:function(t){return/^(before|after)/.test(t)},timer:function(t,e){return setTimeout(e,t)},contains:N,containsAll:function(t,e){return $(e,e=>N(t,e))},objectContains:function(t,e){return Q(e,B(t,Object.keys(e)))},toArray:function(t){return x(t)?t:R(t)},pick:B,pickBy:I,omit:function(t,e){return I(t,(t,n)=>!N(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:e,pluckKey:z,renameKey:function(t,e,n){e in t&&(t[n]=z(t,e))},extractOptions:X,extractCallback:K,noop:t,asyncNoop:function(){return Promise.resolve()},identity:W,escapeHTML:function(t){return t.replace(/[&<>"']/g,t=>U[t])},escapeRegExp:function(t){return t.replace(/[\\^$*+?.()|[\]{}]/g,"\\$&")},sequence:function(...t){return(...e)=>G(t,...e)},callAll:G,evalOption:q,evalAutoOption:function(t,e,...n){return"auto"===(t=q(t,...n))&&(t=q(e,...n)),t},flatten:J,newDeferred:function(){let{promise:t,resolve:e,reject:n}=Promise.withResolvers();return Object.assign(t,{resolve:e,reject:n})},always:function(t,e=W){return t.then(e,e)},isBasicObjectProperty:function(t){return Object.hasOwn(Object.prototype,t)},isCrossOrigin:u,task:function(t){setTimeout(t)},fastTask:function(t){const e=new MessageChannel;e.port1.onmessage=()=>t(),e.port2.postMessage(0)},isEqual:Q,getSimpleTokens:function(t,{json:e=!1,separator:n=/[,\s]/}={}){return O(t)?e&&/^\[.*]$/.test(t)?dt(t):Z(t,n):T(t)},getComplexTokens:function(t){if(O(t)){let{maskedTokens:e,restore:n}=tt(t);return e.map(t=>n(t))}return T(t)},wrapList:T,wrapValue:function(t,...e){return e[0]instanceof t?e[0]:new t(...e)},uid:function(){return et++},upperCaseFirst:function(t){return t[0].toUpperCase()+t.slice(1)},lowerCaseFirst:function(t){return t[0].toLowerCase()+t.slice(1)},delegate:nt,delegatePromise:function(t,e){return nt(t,["then","catch","finally"],e)},camelToKebabCase:function(t){return t.replace(/[A-Z]/g,t=>"-"+t.toLowerCase())},kebabToCamelCase:function(t){return t.replace(/-([a-z])/g,(t,e)=>e.toUpperCase())},sprintf:function(t,...e){return t.replace(rt,t=>it(e.shift(),t))},withRenamedKeys:function(t,e){const n={};for(let i in t){let r=e(i);b(r)&&(n[r]=t[i])}return n},memoizeMethod:function(t,n){for(let i in n){let n=e(Object.getOwnPropertyDescriptor(t,i).value,`__${i}MemoizeCache`);t[i]=n}},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(t="lifo"){let e=[],n=function(t,n){t=at(t).map(n),e.push(...at(t))},i=function(...t){n(t,W)};return i.guard=function(...t){n(t,up.error.guardFn)},i.clean=function(...n){"lifo"===t&&e.reverse(),e.forEach(t=>t(...n)),e=[]},i},scanFunctions:at,args:ut,parseRelaxedJSON:dt,parseScalarJSONPairs:function(t){let{maskedTokens:e,restore:n}=tt(t);return e.map(t=>{let[e,i,r]=t.match(/([^{]+)({[^}]*})?/);return[n(i.trim()),r&&dt(n(r))]})},maskPattern:lt,expressionOutline:pt,parseString:function(t){return JSON.parse(ft(t))},assert:mt,parseNumber:function(t){return k(t)?t:O(t)&&/^-?\.?\d[\d._]*$/.test(t)?parseFloat(t.replaceAll("_","")):void 0}}}()},235(t,e,n){n(2208),up.viewport=function(){const t=up.util,e=up.element,n=up.fragment,i=new up.Config("up.viewport.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"),new up.RevealMotion(e,i).start(),i.focus&&a(e,{force:!0,preventScroll:!0}),(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,e){return o(t,e),t===document.activeElement}function l(e,{strong:n,layer:i,origin:r,behavior:o="instant",focus:u=!1}={}){if(!e)return;let a=_(e,{layer:i,origin:r});return a?()=>{let e=()=>s(a,{top:!0,behavior:o,focus:u});return n&&t.fastTask(e),e()}:"#top"===e?()=>y(0,{behavior:o}):void 0}function c(){return[d().tagName,...i.viewportSelectors].join()}function h(t,e={}){return n.get(t,e).closest(c())}function p(t,i={}){return t=n.get(t,i),e.around(t,c())}function f(t={}){return n.all(c(),t)}function d(){return document.scrollingElement}function m(){return e.root.clientWidth}function g(t){return up.fragment.tryToTarget(t)}function v(t){let e={};for(let n of t){let t=g(n);t?e[t]=n.scrollTop:up.warn("up.viewport.saveScroll()","Cannot save scroll positions for untargetable viewport %o",n)}return e}function b(e){const[n,i]=t.args(e,"val","options");let r;return i.layer=up.layer.get(i),r=n?[h(n,i)]:i.around?p(i.around,i):f(i),[r,i]}function y(t,...e){const[n,i]=b(e);return w(n,{},t,i.behavior),!0}function w(t,e,n,i="instant"){for(let r of t){let t=e[g(r)]||n;(t<0||Object.is(t,-0))&&(t+=r.scrollHeight-r.clientHeight),r.scrollTo({top:t,behavior:i})}}function _(t,i={}){var r;if(t=null==(r=t)?void 0:r.replace(/^#/,"")){const r=[e.idSelector(t),"a"+e.attrSelector("name",t)].join();return n.get(r,i)}}up.on("focusin",function({relatedTarget:t}){u(t)});const O=["selectionStart","selectionEnd","scrollLeft","scrollTop"];return{reveal:s,revealHash:function(...t){var e;return null===(e=l(...t))||void 0===e?void 0:e()},revealHashFn:l,firstHashTarget:_,config:i,get:h,subtree:function(t,i={}){return t=n.get(t,i),e.subtree(t,c())},around:p,getScrollTops:function(...t){return v(f(...t))},get root(){return d()},rootWidth:m,rootHeight:function(){return e.root.clientHeight},isRoot:function(t){return t===d()},rootScrollbarWidth:function(){return window.innerWidth-m()},saveScroll:function(...t){const[e,n]=b(t),i=n.location||n.layer.location;if(i){const t=v(e);n.layer.lastScrollTops.set(i,t)}},restoreScroll:function(...t){var e;const[n,i]=b(t),r=i.location||i.layer.location,s=null!==(e=i.scrollTops)&&void 0!==e?e:i.layer.lastScrollTops.get(r);return!!s&&(w(n,s,0),up.puts("up.viewport.restoreScroll()","Restored scroll positions to %o",s),!0)},scrollTo:y,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=e.lastFocusCapsules.get(n);return!(!i||!i.restore(e)||(up.puts("up.viewport.restoreFocus()",'Restored focus to "%s"',i.gn),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 l=e.createFromSelector("up-bounds");e.insertBefore(n,l),l.appendChild(n);const c=function(t,n){return a.left+=t,a.top+=n,e.setStyle(l,a,"px")};c(0,0);const p=n.getBoundingClientRect();return c(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:l,moveBounds:c}},focus:o,tryFocus:a,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 O)try{e[n]=t[n]}catch(t){}return e},bodyShifter:r}}(),up.focus=up.viewport.focus,up.reveal=up.viewport.reveal},7115(){window.up={version:"3.15.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(7115),n(9363),n(3889),n(6939),n(6559),n(889),n(7781),n(2487),n(9483),n(8386),n(7181),n(4244),n(1410),n(1268),n(4138),n(8065),n(3526),n(6705),n(8183),n(7080),n(7275),n(3394),n(8504),n(6347),n(8195),n(4572),n(864),n(5845),n(5224),n(302),n(2113),n(1589),n(9797),n(5249),n(8379),n(4281),n(1739),n(611),n(5229),n(3441),n(4742),n(621),n(5691),n(1499),n(1438),n(2459),n(5887),n(7919),n(3728),n(9844),n(7687),n(7304),n(9454),n(2084),n(3126),n(2009),n(4526),n(8268),n(3383),n(6088),n(9156),n(6607),n(9391),n(2049),n(567),n(5637),n(4718),n(8354),n(2077),n(541),n(7718),n(6351),n(7294),n(4823),n(1588),n(6374),n(8072),n(6858),n(9918),n(6941),n(6689),n(6140),n(3530),n(5313),n(9441),n(9013),n(367),n(3106),n(6101),n(6973),n(235),n(2679),n(9399),n(1420),n(181),n(1915),n(2771),n(3194),n(4372),up.framework.onEvaled()})();
|
|
2
2
|
//# sourceMappingURL=unpoly.es6.min.js.map
|