@budibase/server
Version:
Budibase Web Server
4 lines • 9.02 MB
JavaScript
var Q2=Object.defineProperty;var Z2=(Eo,$o,So)=>$o in Eo?Q2(Eo,$o,{enumerable:!0,configurable:!0,writable:!0,value:So}):Eo[$o]=So;var mu=(Eo,$o,So)=>(Z2(Eo,typeof $o!="symbol"?$o+"":$o,So),So),k2=(Eo,$o,So)=>{if(!$o.has(Eo))throw TypeError("Cannot "+So)};var cu=(Eo,$o,So)=>(k2(Eo,$o,"read from private field"),So?So.call(Eo):$o.get(Eo)),hd=(Eo,$o,So)=>{if($o.has(Eo))throw TypeError("Cannot add the same private member more than once");$o instanceof WeakSet?$o.add(Eo):$o.set(Eo,So)},Id=(Eo,$o,So,Io)=>(k2(Eo,$o,"write to private field"),Io?Io.call(Eo,So):$o.set(Eo,So),So);var i_=(Eo,$o,So)=>(k2(Eo,$o,"access private method"),So);(function(){const $o=document.createElement("link").relList;if($o&&$o.supports&&$o.supports("modulepreload"))return;for(const $a of document.querySelectorAll('link[rel="modulepreload"]'))Io($a);new MutationObserver($a=>{for(const ya of $a)if(ya.type==="childList")for(const wa of ya.addedNodes)wa.tagName==="LINK"&&wa.rel==="modulepreload"&&Io(wa)}).observe(document,{childList:!0,subtree:!0});function So($a){const ya={};return $a.integrity&&(ya.integrity=$a.integrity),$a.referrerPolicy&&(ya.referrerPolicy=$a.referrerPolicy),$a.crossOrigin==="use-credentials"?ya.credentials="include":$a.crossOrigin==="anonymous"?ya.credentials="omit":ya.credentials="same-origin",ya}function Io($a){if($a.ep)return;$a.ep=!0;const ya=So($a);fetch($a.href,ya)}})();const remixicon="",spectrumGlobal="",spectrumMedium="",spectrumDarkest="",spectrumDark="",spectrumLight="",spectrumLightest="",nord="",midnight="",indexVars$E="",global$2="",suppressWarnings=Eo=>{if(!(Eo!=null&&Eo.length))return;const $o=new RegExp(Eo.map(Io=>`(${Io})`).join("|"),"gi"),So=console.warn;console.warn=(...Io)=>{const $a=Io[0];$a&&typeof $a=="string"&&$a.match($o)||So(...Io)}};function noop$6(){}const identity$7=Eo=>Eo;function assign$1(Eo,$o){for(const So in $o)Eo[So]=$o[So];return Eo}function is_promise(Eo){return!!Eo&&(typeof Eo=="object"||typeof Eo=="function")&&typeof Eo.then=="function"}function run$3(Eo){return Eo()}function blank_object(){return Object.create(null)}function run_all(Eo){Eo.forEach(run$3)}function is_function(Eo){return typeof Eo=="function"}function safe_not_equal(Eo,$o){return Eo!=Eo?$o==$o:Eo!==$o||Eo&&typeof Eo=="object"||typeof Eo=="function"}let src_url_equal_anchor;function src_url_equal(Eo,$o){return Eo===$o?!0:(src_url_equal_anchor||(src_url_equal_anchor=document.createElement("a")),src_url_equal_anchor.href=$o,Eo===src_url_equal_anchor.href)}function not_equal(Eo,$o){return Eo!=Eo?$o==$o:Eo!==$o}function is_empty(Eo){return Object.keys(Eo).length===0}function subscribe(Eo,...$o){if(Eo==null){for(const Io of $o)Io(void 0);return noop$6}const So=Eo.subscribe(...$o);return So.unsubscribe?()=>So.unsubscribe():So}function get_store_value(Eo){let $o;return subscribe(Eo,So=>$o=So)(),$o}function component_subscribe(Eo,$o,So){Eo.$$.on_destroy.push(subscribe($o,So))}function create_slot(Eo,$o,So,Io){if(Eo){const $a=get_slot_context(Eo,$o,So,Io);return Eo[0]($a)}}function get_slot_context(Eo,$o,So,Io){return Eo[1]&&Io?assign$1(So.ctx.slice(),Eo[1](Io($o))):So.ctx}function get_slot_changes(Eo,$o,So,Io){if(Eo[2]&&Io){const $a=Eo[2](Io(So));if($o.dirty===void 0)return $a;if(typeof $a=="object"){const ya=[],wa=Math.max($o.dirty.length,$a.length);for(let Sa=0;Sa<wa;Sa+=1)ya[Sa]=$o.dirty[Sa]|$a[Sa];return ya}return $o.dirty|$a}return $o.dirty}function update_slot_base(Eo,$o,So,Io,$a,ya){if($a){const wa=get_slot_context($o,So,Io,ya);Eo.p(wa,$a)}}function get_all_dirty_from_scope(Eo){if(Eo.ctx.length>32){const $o=[],So=Eo.ctx.length/32;for(let Io=0;Io<So;Io++)$o[Io]=-1;return $o}return-1}function exclude_internal_props(Eo){const $o={};for(const So in Eo)So[0]!=="$"&&($o[So]=Eo[So]);return $o}function compute_rest_props(Eo,$o){const So={};$o=new Set($o);for(const Io in Eo)!$o.has(Io)&&Io[0]!=="$"&&(So[Io]=Eo[Io]);return So}function compute_slots(Eo){const $o={};for(const So in Eo)$o[So]=!0;return $o}function null_to_empty(Eo){return Eo??""}function set_store_value(Eo,$o,So){return Eo.set(So),$o}function action_destroyer(Eo){return Eo&&is_function(Eo.destroy)?Eo.destroy:noop$6}function split_css_unit(Eo){const $o=typeof Eo=="string"&&Eo.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return $o?[parseFloat($o[1]),$o[2]||"px"]:[Eo,"px"]}const is_client=typeof window<"u";let now$2=is_client?()=>window.performance.now():()=>Date.now(),raf=is_client?Eo=>requestAnimationFrame(Eo):noop$6;const tasks=new Set;function run_tasks(Eo){tasks.forEach($o=>{$o.c(Eo)||(tasks.delete($o),$o.f())}),tasks.size!==0&&raf(run_tasks)}function loop(Eo){let $o;return tasks.size===0&&raf(run_tasks),{promise:new Promise(So=>{tasks.add($o={c:Eo,f:So})}),abort(){tasks.delete($o)}}}const globals$1=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;function append$2(Eo,$o){Eo.appendChild($o)}function get_root_for_style(Eo){if(!Eo)return document;const $o=Eo.getRootNode?Eo.getRootNode():Eo.ownerDocument;return $o&&$o.host?$o:Eo.ownerDocument}function append_empty_stylesheet(Eo){const $o=element("style");return $o.textContent="/* empty */",append_stylesheet(get_root_for_style(Eo),$o),$o.sheet}function append_stylesheet(Eo,$o){return append$2(Eo.head||Eo,$o),$o.sheet}function insert$1(Eo,$o,So){Eo.insertBefore($o,So||null)}function detach(Eo){Eo.parentNode&&Eo.parentNode.removeChild(Eo)}function destroy_each(Eo,$o){for(let So=0;So<Eo.length;So+=1)Eo[So]&&Eo[So].d($o)}function element(Eo){return document.createElement(Eo)}function svg_element(Eo){return document.createElementNS("http://www.w3.org/2000/svg",Eo)}function text$1(Eo){return document.createTextNode(Eo)}function space$2(){return text$1(" ")}function empty$4(){return text$1("")}function listen(Eo,$o,So,Io){return Eo.addEventListener($o,So,Io),()=>Eo.removeEventListener($o,So,Io)}function prevent_default(Eo){return function($o){return $o.preventDefault(),Eo.call(this,$o)}}function stop_propagation(Eo){return function($o){return $o.stopPropagation(),Eo.call(this,$o)}}function self$1(Eo){return function($o){$o.target===this&&Eo.call(this,$o)}}function attr(Eo,$o,So){So==null?Eo.removeAttribute($o):Eo.getAttribute($o)!==So&&Eo.setAttribute($o,So)}const always_set_through_set_attribute=["width","height"];function set_attributes(Eo,$o){const So=Object.getOwnPropertyDescriptors(Eo.__proto__);for(const Io in $o)$o[Io]==null?Eo.removeAttribute(Io):Io==="style"?Eo.style.cssText=$o[Io]:Io==="__value"?Eo.value=Eo[Io]=$o[Io]:So[Io]&&So[Io].set&&always_set_through_set_attribute.indexOf(Io)===-1?Eo[Io]=$o[Io]:attr(Eo,Io,$o[Io])}function xlink_attr(Eo,$o,So){Eo.setAttributeNS("http://www.w3.org/1999/xlink",$o,So)}function init_binding_group(Eo){let $o;return{p(...So){$o=So,$o.forEach(Io=>Eo.push(Io))},r(){$o.forEach(So=>Eo.splice(Eo.indexOf(So),1))}}}function to_number(Eo){return Eo===""?null:+Eo}function children$1(Eo){return Array.from(Eo.childNodes)}function set_data(Eo,$o){$o=""+$o,Eo.data!==$o&&(Eo.data=$o)}function set_input_value(Eo,$o){Eo.value=$o??""}function set_style(Eo,$o,So,Io){So==null?Eo.style.removeProperty($o):Eo.style.setProperty($o,So,Io?"important":"")}let crossorigin;function is_crossorigin(){if(crossorigin===void 0){crossorigin=!1;try{typeof window<"u"&&window.parent&&window.parent.document}catch{crossorigin=!0}}return crossorigin}function add_iframe_resize_listener(Eo,$o){getComputedStyle(Eo).position==="static"&&(Eo.style.position="relative");const Io=element("iframe");Io.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),Io.setAttribute("aria-hidden","true"),Io.tabIndex=-1;const $a=is_crossorigin();let ya;return $a?(Io.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",ya=listen(window,"message",wa=>{wa.source===Io.contentWindow&&$o()})):(Io.src="about:blank",Io.onload=()=>{ya=listen(Io.contentWindow,"resize",$o),$o()}),append$2(Eo,Io),()=>{($a||ya&&Io.contentWindow)&&ya(),detach(Io)}}function toggle_class(Eo,$o,So){Eo.classList.toggle($o,!!So)}function custom_event(Eo,$o,{bubbles:So=!1,cancelable:Io=!1}={}){return new CustomEvent(Eo,{detail:$o,bubbles:So,cancelable:Io})}class HtmlTag{constructor($o=!1){mu(this,"is_svg",!1);mu(this,"e");mu(this,"n");mu(this,"t");mu(this,"a");this.is_svg=$o,this.e=this.n=null}c($o){this.h($o)}m($o,So,Io=null){this.e||(this.is_svg?this.e=svg_element(So.nodeName):this.e=element(So.nodeType===11?"TEMPLATE":So.nodeName),this.t=So.tagName!=="TEMPLATE"?So:So.content,this.c($o)),this.i(Io)}h($o){this.e.innerHTML=$o,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i($o){for(let So=0;So<this.n.length;So+=1)insert$1(this.t,this.n[So],$o)}p($o){this.d(),this.h($o),this.i(this.a)}d(){this.n.forEach(detach)}}function construct_svelte_component(Eo,$o){return new Eo($o)}const managed_styles=new Map;let active=0;function hash$1(Eo){let $o=5381,So=Eo.length;for(;So--;)$o=($o<<5)-$o^Eo.charCodeAt(So);return $o>>>0}function create_style_information(Eo,$o){const So={stylesheet:append_empty_stylesheet($o),rules:{}};return managed_styles.set(Eo,So),So}function create_rule(Eo,$o,So,Io,$a,ya,wa,Sa=0){const Oa=16.666/Io;let Ca=`{
`;for(let Ra=0;Ra<=1;Ra+=Oa){const Da=$o+(So-$o)*ya(Ra);Ca+=Ra*100+`%{${wa(Da,1-Da)}}
`}const Pa=Ca+`100% {${wa(So,1-So)}}
}`,Ta=`__svelte_${hash$1(Pa)}_${Sa}`,Ea=get_root_for_style(Eo),{stylesheet:Aa,rules:Ia}=managed_styles.get(Ea)||create_style_information(Ea,Eo);Ia[Ta]||(Ia[Ta]=!0,Aa.insertRule(`@keyframes ${Ta} ${Pa}`,Aa.cssRules.length));const Ma=Eo.style.animation||"";return Eo.style.animation=`${Ma?`${Ma}, `:""}${Ta} ${Io}ms linear ${$a}ms 1 both`,active+=1,Ta}function delete_rule(Eo,$o){const So=(Eo.style.animation||"").split(", "),Io=So.filter($o?ya=>ya.indexOf($o)<0:ya=>ya.indexOf("__svelte")===-1),$a=So.length-Io.length;$a&&(Eo.style.animation=Io.join(", "),active-=$a,active||clear_rules())}function clear_rules(){raf(()=>{active||(managed_styles.forEach(Eo=>{const{ownerNode:$o}=Eo.stylesheet;$o&&detach($o)}),managed_styles.clear())})}function create_animation(Eo,$o,So,Io){if(!$o)return noop$6;const $a=Eo.getBoundingClientRect();if($o.left===$a.left&&$o.right===$a.right&&$o.top===$a.top&&$o.bottom===$a.bottom)return noop$6;const{delay:ya=0,duration:wa=300,easing:Sa=identity$7,start:Oa=now$2()+ya,end:Ca=Oa+wa,tick:Pa=noop$6,css:Ta}=So(Eo,{from:$o,to:$a},Io);let Ea=!0,Aa=!1,Ia;function Ma(){Ta&&(Ia=create_rule(Eo,0,1,wa,ya,Sa,Ta)),ya||(Aa=!0)}function Ra(){Ta&&delete_rule(Eo,Ia),Ea=!1}return loop(Da=>{if(!Aa&&Da>=Oa&&(Aa=!0),Aa&&Da>=Ca&&(Pa(1,0),Ra()),!Ea)return!1;if(Aa){const La=Da-Oa,Na=0+1*Sa(La/wa);Pa(Na,1-Na)}return!0}),Ma(),Pa(0,1),Ra}function fix_position(Eo){const $o=getComputedStyle(Eo);if($o.position!=="absolute"&&$o.position!=="fixed"){const{width:So,height:Io}=$o,$a=Eo.getBoundingClientRect();Eo.style.position="absolute",Eo.style.width=So,Eo.style.height=Io,add_transform(Eo,$a)}}function add_transform(Eo,$o){const So=Eo.getBoundingClientRect();if($o.left!==So.left||$o.top!==So.top){const Io=getComputedStyle(Eo),$a=Io.transform==="none"?"":Io.transform;Eo.style.transform=`${$a} translate(${$o.left-So.left}px, ${$o.top-So.top}px)`}}let current_component;function set_current_component(Eo){current_component=Eo}function get_current_component(){if(!current_component)throw new Error("Function called outside component initialization");return current_component}function onMount(Eo){get_current_component().$$.on_mount.push(Eo)}function onDestroy(Eo){get_current_component().$$.on_destroy.push(Eo)}function createEventDispatcher(){const Eo=get_current_component();return($o,So,{cancelable:Io=!1}={})=>{const $a=Eo.$$.callbacks[$o];if($a){const ya=custom_event($o,So,{cancelable:Io});return $a.slice().forEach(wa=>{wa.call(Eo,ya)}),!ya.defaultPrevented}return!0}}function setContext(Eo,$o){return get_current_component().$$.context.set(Eo,$o),$o}function getContext$1(Eo){return get_current_component().$$.context.get(Eo)}function hasContext(Eo){return get_current_component().$$.context.has(Eo)}function bubble(Eo,$o){const So=Eo.$$.callbacks[$o.type];So&&So.slice().forEach(Io=>Io.call(this,$o))}const dirty_components=[],binding_callbacks=[];let render_callbacks=[];const flush_callbacks=[],resolved_promise=Promise.resolve();let update_scheduled=!1;function schedule_update(){update_scheduled||(update_scheduled=!0,resolved_promise.then(flush))}function tick(){return schedule_update(),resolved_promise}function add_render_callback(Eo){render_callbacks.push(Eo)}function add_flush_callback(Eo){flush_callbacks.push(Eo)}const seen_callbacks=new Set;let flushidx=0;function flush(){if(flushidx!==0)return;const Eo=current_component;do{try{for(;flushidx<dirty_components.length;){const $o=dirty_components[flushidx];flushidx++,set_current_component($o),update($o.$$)}}catch($o){throw dirty_components.length=0,flushidx=0,$o}for(set_current_component(null),dirty_components.length=0,flushidx=0;binding_callbacks.length;)binding_callbacks.pop()();for(let $o=0;$o<render_callbacks.length;$o+=1){const So=render_callbacks[$o];seen_callbacks.has(So)||(seen_callbacks.add(So),So())}render_callbacks.length=0}while(dirty_components.length);for(;flush_callbacks.length;)flush_callbacks.pop()();update_scheduled=!1,seen_callbacks.clear(),set_current_component(Eo)}function update(Eo){if(Eo.fragment!==null){Eo.update(),run_all(Eo.before_update);const $o=Eo.dirty;Eo.dirty=[-1],Eo.fragment&&Eo.fragment.p(Eo.ctx,$o),Eo.after_update.forEach(add_render_callback)}}function flush_render_callbacks(Eo){const $o=[],So=[];render_callbacks.forEach(Io=>Eo.indexOf(Io)===-1?$o.push(Io):So.push(Io)),So.forEach(Io=>Io()),render_callbacks=$o}let promise;function wait$1(){return promise||(promise=Promise.resolve(),promise.then(()=>{promise=null})),promise}function dispatch$1(Eo,$o,So){Eo.dispatchEvent(custom_event(`${$o?"intro":"outro"}${So}`))}const outroing=new Set;let outros;function group_outros(){outros={r:0,c:[],p:outros}}function check_outros(){outros.r||run_all(outros.c),outros=outros.p}function transition_in(Eo,$o){Eo&&Eo.i&&(outroing.delete(Eo),Eo.i($o))}function transition_out(Eo,$o,So,Io){if(Eo&&Eo.o){if(outroing.has(Eo))return;outroing.add(Eo),outros.c.push(()=>{outroing.delete(Eo),Io&&(So&&Eo.d(1),Io())}),Eo.o($o)}else Io&&Io()}const null_transition={duration:0};function create_in_transition(Eo,$o,So){const Io={direction:"in"};let $a=$o(Eo,So,Io),ya=!1,wa,Sa,Oa=0;function Ca(){wa&&delete_rule(Eo,wa)}function Pa(){const{delay:Ea=0,duration:Aa=300,easing:Ia=identity$7,tick:Ma=noop$6,css:Ra}=$a||null_transition;Ra&&(wa=create_rule(Eo,0,1,Aa,Ea,Ia,Ra,Oa++)),Ma(0,1);const Da=now$2()+Ea,La=Da+Aa;Sa&&Sa.abort(),ya=!0,add_render_callback(()=>dispatch$1(Eo,!0,"start")),Sa=loop(Na=>{if(ya){if(Na>=La)return Ma(1,0),dispatch$1(Eo,!0,"end"),Ca(),ya=!1;if(Na>=Da){const Fa=Ia((Na-Da)/Aa);Ma(Fa,1-Fa)}}return ya})}let Ta=!1;return{start(){Ta||(Ta=!0,delete_rule(Eo),is_function($a)?($a=$a(Io),wait$1().then(Pa)):Pa())},invalidate(){Ta=!1},end(){ya&&(Ca(),ya=!1)}}}function create_out_transition(Eo,$o,So){const Io={direction:"out"};let $a=$o(Eo,So,Io),ya=!0,wa;const Sa=outros;Sa.r+=1;let Oa;function Ca(){const{delay:Pa=0,duration:Ta=300,easing:Ea=identity$7,tick:Aa=noop$6,css:Ia}=$a||null_transition;Ia&&(wa=create_rule(Eo,1,0,Ta,Pa,Ea,Ia));const Ma=now$2()+Pa,Ra=Ma+Ta;add_render_callback(()=>dispatch$1(Eo,!1,"start")),"inert"in Eo&&(Oa=Eo.inert,Eo.inert=!0),loop(Da=>{if(ya){if(Da>=Ra)return Aa(0,1),dispatch$1(Eo,!1,"end"),--Sa.r||run_all(Sa.c),!1;if(Da>=Ma){const La=Ea((Da-Ma)/Ta);Aa(1-La,La)}}return ya})}return is_function($a)?wait$1().then(()=>{$a=$a(Io),Ca()}):Ca(),{end(Pa){Pa&&"inert"in Eo&&(Eo.inert=Oa),Pa&&$a.tick&&$a.tick(1,0),ya&&(wa&&delete_rule(Eo,wa),ya=!1)}}}function create_bidirectional_transition(Eo,$o,So,Io){let ya=$o(Eo,So,{direction:"both"}),wa=Io?0:1,Sa=null,Oa=null,Ca=null,Pa;function Ta(){Ca&&delete_rule(Eo,Ca)}function Ea(Ia,Ma){const Ra=Ia.b-wa;return Ma*=Math.abs(Ra),{a:wa,b:Ia.b,d:Ra,duration:Ma,start:Ia.start,end:Ia.start+Ma,group:Ia.group}}function Aa(Ia){const{delay:Ma=0,duration:Ra=300,easing:Da=identity$7,tick:La=noop$6,css:Na}=ya||null_transition,Fa={start:now$2()+Ma,b:Ia};Ia||(Fa.group=outros,outros.r+=1),"inert"in Eo&&(Ia?Pa!==void 0&&(Eo.inert=Pa):(Pa=Eo.inert,Eo.inert=!0)),Sa||Oa?Oa=Fa:(Na&&(Ta(),Ca=create_rule(Eo,wa,Ia,Ra,Ma,Da,Na)),Ia&&La(0,1),Sa=Ea(Fa,Ra),add_render_callback(()=>dispatch$1(Eo,Ia,"start")),loop(Wa=>{if(Oa&&Wa>Oa.start&&(Sa=Ea(Oa,Ra),Oa=null,dispatch$1(Eo,Sa.b,"start"),Na&&(Ta(),Ca=create_rule(Eo,wa,Sa.b,Sa.duration,0,Da,ya.css))),Sa){if(Wa>=Sa.end)La(wa=Sa.b,1-wa),dispatch$1(Eo,Sa.b,"end"),Oa||(Sa.b?Ta():--Sa.group.r||run_all(Sa.group.c)),Sa=null;else if(Wa>=Sa.start){const za=Wa-Sa.start;wa=Sa.a+Sa.d*Da(za/Sa.duration),La(wa,1-wa)}}return!!(Sa||Oa)}))}return{run(Ia){is_function(ya)?wait$1().then(()=>{ya=ya({direction:Ia?"in":"out"}),Aa(Ia)}):Aa(Ia)},end(){Ta(),Sa=Oa=null}}}function handle_promise(Eo,$o){const So=$o.token={};function Io($a,ya,wa,Sa){if($o.token!==So)return;$o.resolved=Sa;let Oa=$o.ctx;wa!==void 0&&(Oa=Oa.slice(),Oa[wa]=Sa);const Ca=$a&&($o.current=$a)(Oa);let Pa=!1;$o.block&&($o.blocks?$o.blocks.forEach((Ta,Ea)=>{Ea!==ya&&Ta&&(group_outros(),transition_out(Ta,1,1,()=>{$o.blocks[Ea]===Ta&&($o.blocks[Ea]=null)}),check_outros())}):$o.block.d(1),Ca.c(),transition_in(Ca,1),Ca.m($o.mount(),$o.anchor),Pa=!0),$o.block=Ca,$o.blocks&&($o.blocks[ya]=Ca),Pa&&flush()}if(is_promise(Eo)){const $a=get_current_component();if(Eo.then(ya=>{set_current_component($a),Io($o.then,1,$o.value,ya),set_current_component(null)},ya=>{if(set_current_component($a),Io($o.catch,2,$o.error,ya),set_current_component(null),!$o.hasCatch)throw ya}),$o.current!==$o.pending)return Io($o.pending,0),!0}else{if($o.current!==$o.then)return Io($o.then,1,$o.value,Eo),!0;$o.resolved=Eo}}function update_await_block_branch(Eo,$o,So){const Io=$o.slice(),{resolved:$a}=Eo;Eo.current===Eo.then&&(Io[Eo.value]=$a),Eo.current===Eo.catch&&(Io[Eo.error]=$a),Eo.block.p(Io,So)}function ensure_array_like(Eo){return(Eo==null?void 0:Eo.length)!==void 0?Eo:Array.from(Eo)}function destroy_block(Eo,$o){Eo.d(1),$o.delete(Eo.key)}function outro_and_destroy_block(Eo,$o){transition_out(Eo,1,1,()=>{$o.delete(Eo.key)})}function fix_and_outro_and_destroy_block(Eo,$o){Eo.f(),outro_and_destroy_block(Eo,$o)}function update_keyed_each(Eo,$o,So,Io,$a,ya,wa,Sa,Oa,Ca,Pa,Ta){let Ea=Eo.length,Aa=ya.length,Ia=Ea;const Ma={};for(;Ia--;)Ma[Eo[Ia].key]=Ia;const Ra=[],Da=new Map,La=new Map,Na=[];for(Ia=Aa;Ia--;){const Va=Ta($a,ya,Ia),Ha=So(Va);let Ga=wa.get(Ha);Ga?Io&&Na.push(()=>Ga.p(Va,$o)):(Ga=Ca(Ha,Va),Ga.c()),Da.set(Ha,Ra[Ia]=Ga),Ha in Ma&&La.set(Ha,Math.abs(Ia-Ma[Ha]))}const Fa=new Set,Wa=new Set;function za(Va){transition_in(Va,1),Va.m(Sa,Pa),wa.set(Va.key,Va),Pa=Va.first,Aa--}for(;Ea&&Aa;){const Va=Ra[Aa-1],Ha=Eo[Ea-1],Ga=Va.key,Qa=Ha.key;Va===Ha?(Pa=Va.first,Ea--,Aa--):Da.has(Qa)?!wa.has(Ga)||Fa.has(Ga)?za(Va):Wa.has(Qa)?Ea--:La.get(Ga)>La.get(Qa)?(Wa.add(Ga),za(Va)):(Fa.add(Qa),Ea--):(Oa(Ha,wa),Ea--)}for(;Ea--;){const Va=Eo[Ea];Da.has(Va.key)||Oa(Va,wa)}for(;Aa;)za(Ra[Aa-1]);return run_all(Na),Ra}function get_spread_update(Eo,$o){const So={},Io={},$a={$$scope:1};let ya=Eo.length;for(;ya--;){const wa=Eo[ya],Sa=$o[ya];if(Sa){for(const Oa in wa)Oa in Sa||(Io[Oa]=1);for(const Oa in Sa)$a[Oa]||(So[Oa]=Sa[Oa],$a[Oa]=1);Eo[ya]=Sa}else for(const Oa in wa)$a[Oa]=1}for(const wa in Io)wa in So||(So[wa]=void 0);return So}function get_spread_object(Eo){return typeof Eo=="object"&&Eo!==null?Eo:{}}function bind$3(Eo,$o,So){const Io=Eo.$$.props[$o];Io!==void 0&&(Eo.$$.bound[Io]=So,So(Eo.$$.ctx[Io]))}function create_component(Eo){Eo&&Eo.c()}function mount_component(Eo,$o,So){const{fragment:Io,after_update:$a}=Eo.$$;Io&&Io.m($o,So),add_render_callback(()=>{const ya=Eo.$$.on_mount.map(run$3).filter(is_function);Eo.$$.on_destroy?Eo.$$.on_destroy.push(...ya):run_all(ya),Eo.$$.on_mount=[]}),$a.forEach(add_render_callback)}function destroy_component(Eo,$o){const So=Eo.$$;So.fragment!==null&&(flush_render_callbacks(So.after_update),run_all(So.on_destroy),So.fragment&&So.fragment.d($o),So.on_destroy=So.fragment=null,So.ctx=[])}function make_dirty(Eo,$o){Eo.$$.dirty[0]===-1&&(dirty_components.push(Eo),schedule_update(),Eo.$$.dirty.fill(0)),Eo.$$.dirty[$o/31|0]|=1<<$o%31}function init$3(Eo,$o,So,Io,$a,ya,wa=null,Sa=[-1]){const Oa=current_component;set_current_component(Eo);const Ca=Eo.$$={fragment:null,ctx:[],props:ya,update:noop$6,not_equal:$a,bound:blank_object(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map($o.context||(Oa?Oa.$$.context:[])),callbacks:blank_object(),dirty:Sa,skip_bound:!1,root:$o.target||Oa.$$.root};wa&&wa(Ca.root);let Pa=!1;if(Ca.ctx=So?So(Eo,$o.props||{},(Ta,Ea,...Aa)=>{const Ia=Aa.length?Aa[0]:Ea;return Ca.ctx&&$a(Ca.ctx[Ta],Ca.ctx[Ta]=Ia)&&(!Ca.skip_bound&&Ca.bound[Ta]&&Ca.bound[Ta](Ia),Pa&&make_dirty(Eo,Ta)),Ea}):[],Ca.update(),Pa=!0,run_all(Ca.before_update),Ca.fragment=Io?Io(Ca.ctx):!1,$o.target){if($o.hydrate){const Ta=children$1($o.target);Ca.fragment&&Ca.fragment.l(Ta),Ta.forEach(detach)}else Ca.fragment&&Ca.fragment.c();$o.intro&&transition_in(Eo.$$.fragment),mount_component(Eo,$o.target,$o.anchor),flush()}set_current_component(Oa)}class SvelteComponent{constructor(){mu(this,"$$");mu(this,"$$set")}$destroy(){destroy_component(this,1),this.$destroy=noop$6}$on($o,So){if(!is_function(So))return noop$6;const Io=this.$$.callbacks[$o]||(this.$$.callbacks[$o]=[]);return Io.push(So),()=>{const $a=Io.indexOf(So);$a!==-1&&Io.splice($a,1)}}$set($o){this.$$set&&!is_empty($o)&&(this.$$.skip_bound=!0,this.$$set($o),this.$$.skip_bound=!1)}}const PUBLIC_VERSION="4";typeof window<"u"&&(window.__svelte||(window.__svelte={v:new Set})).v.add(PUBLIC_VERSION);const defaultConfig$1={queryHandler:{parse:Eo=>fromEntries(new URLSearchParams(Eo)),stringify:Eo=>"?"+new URLSearchParams(Eo).toString()},urlTransform:{apply:Eo=>Eo,remove:Eo=>Eo},useHash:!1};function fromEntries(Eo){return[...Eo].reduce(($o,[So,Io])=>($o[So]=Io,$o),{})}const MATCH_PARAM=RegExp(/\:([^/()]+)/g);function handleScroll(Eo,$o){if(navigator.userAgent.includes("jsdom"))return!1;$o&&scrollAncestorsToTop(Eo),handleHash()}function handleHash(){if(navigator.userAgent.includes("jsdom"))return!1;const{hash:Eo}=window.location;if(Eo){const $o=document.getElementById(Eo.substring(1));$o&&$o.scrollIntoView()}}function scrollAncestorsToTop(Eo){Eo&&Eo.scrollTo&&Eo.dataset.routify!=="scroll-lock"&&Eo.dataset["routify-scroll"]!=="lock"&&(Eo.style["scroll-behavior"]="auto",Eo.scrollTo({top:0,behavior:"auto"}),Eo.style["scroll-behavior"]="",scrollAncestorsToTop(Eo.parentElement))}const pathToRegex=(Eo,$o)=>{const So=$o?"":"/?$";return Eo=Eo.replace(/\/_fallback?$/,"(/|$)"),Eo=Eo.replace(/\/index$/,"(/index)?"),Eo=Eo.replace(MATCH_PARAM,"([^/]+)")+So,Eo=`^${Eo}`,Eo},pathToParamKeys=Eo=>{const $o=[];let So;for(;So=MATCH_PARAM.exec(Eo);)$o.push(So[1]);return $o},pathToRank=({path:Eo})=>Eo.split("/").filter(Boolean).map($o=>$o==="_fallback"?"A":$o.startsWith(":")?"B":"C").join("");function suppressComponentWarnings(Eo,$o){suppressComponentWarnings._console=suppressComponentWarnings._console||{log:console.log,warn:console.warn};const{_console:So}=suppressComponentWarnings,Io=Eo.componentFile.name.replace(/Proxy<_?(.+)>/,"$1").replace(/^Index$/,Eo.component.shortPath.split("/").pop()).replace(/^./,ya=>ya.toUpperCase()).replace(/\:(.+)/,"U5B$1u5D"),$a=[`<${Io}> received an unexpected slot "default".`,`<${Io}> was created with unknown prop 'scoped'`,`<${Io}> was created with unknown prop 'scopedSync'`];for(const ya of["log","warn"])console[ya]=(...wa)=>{$a.includes(wa[0])||So[ya](...wa)},$o().then(()=>{console[ya]=So[ya]})}function currentLocation(){let Eo=window.location.pathname+window.location.search+window.location.hash;const{url:$o,options:So}=resolvePrefetch(Eo);return{...parseUrl($o),options:So}}function resolvePrefetch(Eo){const[$o,So]=Eo.split("__[[routify_url_options]]__"),Io=JSON.parse(decodeURIComponent(So||"")||"{}");return window.routify=window.routify||{},window.routify.prefetched=Io.prefetch,{url:$o,options:Io}}function parseUrl(Eo){defaultConfig$1.useHash&&(Eo=Eo.replace(/.*#(.+)/,"$1"));const $o=Eo.startsWith("/")?window.location.origin:void 0,So=new URL(Eo,$o),Io=So.pathname+So.search+So.hash;return{url:So,fullpath:Io}}function resolveUrl(Eo,$o,So){const Io=defaultConfig$1.useHash?"#":"";let $a;return $a=populateUrl(Eo,$o,So),$a=defaultConfig$1.urlTransform.apply($a),$a=Io+$a,$a}function populateUrl(Eo,$o,So){const Io=Object.assign({},So,$o),$a=getQueryString(Eo,$o);for(const[ya,wa]of Object.entries(Io))Eo=Eo.replace(new RegExp(`:${ya}(/|$)`),wa+"$1");return`${Eo}${$a}`}function getQueryString(Eo,$o){if(!defaultConfig$1.queryHandler)return"";const So=pathToParamKeys(Eo),Io={};return $o&&Object.entries($o).forEach(([$a,ya])=>{So.includes($a)||(Io[$a]=ya)}),defaultConfig$1.queryHandler.stringify(Io).replace(/\?$/,"")}function create_fragment$da(Eo){let $o;const So=Eo[2].default,Io=create_slot(So,Eo,Eo[1],null);return{c(){Io&&Io.c()},m($a,ya){Io&&Io.m($a,ya),$o=!0},p($a,[ya]){Io&&Io.p&&(!$o||ya&2)&&update_slot_base(Io,So,$a,$a[1],$o?get_slot_changes(So,$a[1],ya,null):get_all_dirty_from_scope($a[1]),null)},i($a){$o||(transition_in(Io,$a),$o=!0)},o($a){transition_out(Io,$a),$o=!1},d($a){Io&&Io.d($a)}}}function instance$dc(Eo,$o,So){let{$$slots:Io={},$$scope:$a}=$o,{scoped:ya={}}=$o;return Eo.$$set=wa=>{"scoped"in wa&&So(0,ya=wa.scoped),"$$scope"in wa&&So(1,$a=wa.$$scope)},[ya,$a,Io]}class Noop extends SvelteComponent{constructor($o){super(),init$3(this,$o,instance$dc,create_fragment$da,safe_not_equal,{scoped:0})}}const subscriber_queue=[];function readable(Eo,$o){return{subscribe:writable(Eo,$o).subscribe}}function writable(Eo,$o=noop$6){let So;const Io=new Set;function $a(Sa){if(safe_not_equal(Eo,Sa)&&(Eo=Sa,So)){const Oa=!subscriber_queue.length;for(const Ca of Io)Ca[1](),subscriber_queue.push(Ca,Eo);if(Oa){for(let Ca=0;Ca<subscriber_queue.length;Ca+=2)subscriber_queue[Ca][0](subscriber_queue[Ca+1]);subscriber_queue.length=0}}}function ya(Sa){$a(Sa(Eo))}function wa(Sa,Oa=noop$6){const Ca=[Sa,Oa];return Io.add(Ca),Io.size===1&&(So=$o($a,ya)||noop$6),Sa(Eo),()=>{Io.delete(Ca),Io.size===0&&So&&(So(),So=null)}}return{set:$a,update:ya,subscribe:wa}}function derived(Eo,$o,So){const Io=!Array.isArray(Eo),$a=Io?[Eo]:Eo;if(!$a.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const ya=$o.length<2;return readable(So,(wa,Sa)=>{let Oa=!1;const Ca=[];let Pa=0,Ta=noop$6;const Ea=()=>{if(Pa)return;Ta();const Ia=$o(Io?Ca[0]:Ca,wa,Sa);ya?wa(Ia):Ta=is_function(Ia)?Ia:noop$6},Aa=$a.map((Ia,Ma)=>subscribe(Ia,Ra=>{Ca[Ma]=Ra,Pa&=~(1<<Ma),Oa&&Ea()},()=>{Pa|=1<<Ma}));return Oa=!0,Ea(),function(){run_all(Aa),Ta(),Oa=!1}})}window.routify=window.routify||{};const route=writable(null),routes$1=writable([]);routes$1.subscribe(Eo=>window.routify.routes=Eo);let rootContext=writable({component:{params:{}}});const urlRoute=writable(null),prefetchPath=writable(""),isChangingPage=writable(!0);async function onPageLoaded({page:Eo,metatags:$o,afterPageLoad:So,parentNode:Io}){const $a=Eo.last!==Eo;setTimeout(()=>handleScroll(Io,$a));const{path:ya}=Eo,{options:wa}=currentLocation(),Sa=wa.prefetch;for(const Oa of So._hooks)Oa&&await Oa(Eo.api);$o.update(),dispatchEvent(new CustomEvent("app-loaded")),parent.postMessage({msg:"app-loaded",prefetched:window.routify.prefetched,path:ya,prefetchId:Sa},"*"),window.routify.appLoaded=!0,window.routify.stopAutoReady=!1}function urlToRoute(Eo,$o=!1){Eo=defaultConfig$1.urlTransform.remove(Eo);let{pathname:So,search:Io}=parseUrl(Eo).url;const $a=get_store_value(routes$1),ya=$a.find(Pa=>So===Pa.meta.name)||$a.find(Pa=>So.match(Pa.regex));if(!ya)throw new Error(`Route could not be found for "${So}".`);const wa=$o?Object.create(ya):ya,{route:Sa,redirectPath:Oa,rewritePath:Ca}=resolveRedirects(wa,$a);return Ca&&({pathname:So,search:Io}=parseUrl(resolveUrl(Ca,Sa.params)).url,Oa&&(Sa.redirectTo=resolveUrl(Oa,Sa.params||{}))),defaultConfig$1.queryHandler&&(Sa.params=Object.assign({},defaultConfig$1.queryHandler.parse(Io))),assignParamsToRouteAndLayouts(Sa,So),Sa.leftover=Eo.replace(new RegExp(Sa.regex),""),Sa}function assignParamsToRouteAndLayouts(Eo,$o){if(Eo.paramKeys){const So=layoutByPos(Eo.layouts),Io=$o.split("/").filter(Boolean);getRouteProps(Eo.path).forEach((ya,wa)=>{ya&&(Eo.params[ya]=Io[wa],So[wa]?So[wa].param={[ya]:Io[wa]}:Eo.param={[ya]:Io[wa]})})}}function resolveRedirects(Eo,$o,So,Io){const{redirect:$a,rewrite:ya}=Eo.meta;if($a||ya){So=$a?$a.path||$a:So,Io=ya?ya.path||ya:So;const wa=$a&&$a.params,Sa=ya&&ya.params,Oa=$o.find(Ca=>Ca.path.replace(/\/index$/,"")===Io);return Oa===Eo&&console.error(`${Io} is redirecting to itself`),Oa||console.error(`${Eo.path} is redirecting to non-existent path: ${Io}`),(wa||Sa)&&(Oa.params=Object.assign({},Oa.params,wa,Sa)),resolveRedirects(Oa,$o,So,Io)}return{route:Eo,redirectPath:So,rewritePath:Io}}function layoutByPos(Eo){const $o=[];return Eo.forEach(So=>{$o[So.path.split("/").filter(Boolean).length-1]=So}),$o}function getRouteProps(Eo){return Eo.split("/").filter(Boolean).map($o=>$o.match(/\:(.+)/)).map($o=>$o&&$o[1])}function get_each_context$2w(Eo,$o,So){const Io=Eo.slice();return Io[1]=$o[So],Io}function create_each_block$2w(Eo,$o){let So,Io;return{key:Eo,first:null,c(){So=element("iframe"),src_url_equal(So.src,Io=$o[1].url)||attr(So,"src",Io),attr(So,"frameborder","0"),attr(So,"title","routify prefetcher"),this.first=So},m($a,ya){insert$1($a,So,ya)},p($a,ya){$o=$a,ya&1&&!src_url_equal(So.src,Io=$o[1].url)&&attr(So,"src",Io)},d($a){$a&&detach(So)}}}function create_fragment$d9(Eo){let $o,So=[],Io=new Map,$a=ensure_array_like(Eo[0]);const ya=wa=>wa[1].options.prefetch;for(let wa=0;wa<$a.length;wa+=1){let Sa=get_each_context$2w(Eo,$a,wa),Oa=ya(Sa);Io.set(Oa,So[wa]=create_each_block$2w(Oa,Sa))}return{c(){$o=element("div");for(let wa=0;wa<So.length;wa+=1)So[wa].c();attr($o,"id","__routify_iframes"),set_style($o,"display","none")},m(wa,Sa){insert$1(wa,$o,Sa);for(let Oa=0;Oa<So.length;Oa+=1)So[Oa]&&So[Oa].m($o,null)},p(wa,[Sa]){Sa&1&&($a=ensure_array_like(wa[0]),So=update_keyed_each(So,Sa,ya,1,wa,$a,Io,$o,destroy_block,create_each_block$2w,null,get_each_context$2w))},i:noop$6,o:noop$6,d(wa){wa&&detach($o);for(let Sa=0;Sa<So.length;Sa+=1)So[Sa].d()}}}const iframeNum=2,defaults$4={validFor:60,timeout:5e3,gracePeriod:1e3},queue$1=writable([]),actives=derived(queue$1,Eo=>Eo.slice(0,iframeNum));actives.subscribe(Eo=>Eo.forEach(({options:$o})=>{setTimeout(()=>removeFromQueue($o.prefetch),$o.timeout)}));function prefetch$1(Eo,$o={}){if(prefetch$1.id=prefetch$1.id||1,Eo=Eo.href||Eo,$o={...defaults$4,...$o},$o.prefetch=prefetch$1.id++,window.routify.prefetched||navigator.userAgent.match("jsdom"))return!1;queue$1.update(So=>(So.some(Io=>Io.options.path===Eo)||So.push({url:`${Eo}__[[routify_url_options]]__${encodeURIComponent(JSON.stringify($o))}`,options:$o}),So))}function removeFromQueue(Eo){const $o=Eo.data?Eo.data.prefetchId:Eo;if(!$o)return null;const So=get_store_value(queue$1).find(Io=>Io&&Io.options.prefetch==$o);if(So){const{gracePeriod:Io}=So.options,$a=new Promise(wa=>setTimeout(wa,Io)),ya=new Promise(wa=>{window.requestIdleCallback?window.requestIdleCallback(wa):setTimeout(wa,Io+1e3)});Promise.all([$a,ya]).then(()=>{queue$1.update(wa=>wa.filter(Sa=>Sa.options.prefetch!=$o))})}}addEventListener("message",removeFromQueue,!1);function instance$db(Eo,$o,So){let Io;return component_subscribe(Eo,actives,$a=>So(0,Io=$a)),[Io]}class Prefetcher extends SvelteComponent{constructor($o){super(),init$3(this,$o,instance$db,create_fragment$d9,safe_not_equal,{})}}function getRoutifyContext(){return getContext$1("routify")||rootContext}const nodes={subscribe(Eo){const $o=[];return derived(routes$1,So=>{So.forEach($a=>{const ya=$a.layouts.map(wa=>wa.api).filter(wa=>!$o.includes(wa));$o.push($a.api,...ya)});const Io=$o.find;return $o.find=($a,...ya)=>typeof $a=="string"?$o.find(wa=>wa.meta.name===$a)||$o.find(wa=>wa.path===$a):Io.bind($o)($a,...ya),$o}).subscribe(Eo)}},components$1=nodes,page={subscribe(Eo){return derived(route,$o=>$o.api).subscribe(Eo)}},node$2={subscribe(Eo){const $o=getRoutifyContext();return derived($o,So=>So.component.api).subscribe(Eo)}},layout$1={subscribe(Eo){const $o=getRoutifyContext();return derived($o,So=>So.layout.api).subscribe(Eo)}},context={subscribe(Eo){return getRoutifyContext().subscribe(Eo)}},ready={subscribe(Eo){window.routify.stopAutoReady=!0;async function $o(){await tick(),await onPageLoaded({page:get_store_value(route),metatags,afterPageLoad})}return Eo($o),()=>{}}},afterPageLoad={_hooks:[Eo=>isChangingPage.set(!1)],subscribe:hookHandler},beforeUrlChange={_hooks:[],subscribe:hookHandler};function hookHandler(Eo){const $o=this._hooks,So=$o.length;return Eo(Io=>{$o[So]=Io}),(...Io)=>{delete $o[So],Eo(...Io)}}const params={subscribe(Eo){const $o=getRoutifyContext();return derived($o,So=>So.route.params).subscribe(Eo)}},leftover={subscribe(Eo){return derived(route,$o=>$o.leftover).subscribe(Eo)}};function isAncestor(Eo,$o,So=!0){Eo=Eo.__file||Eo,$o=$o.__file||$o;const Io=$o.parent===Eo.parent;return!Eo.isIndex||$o.shortPath===Eo.shortPath?!1:Io&&!$o.isDir?!!So:$o.shortPath.startsWith(Eo.shortPath)}const meta$1={subscribe(Eo){const $o=getRoutifyContext();return derived($o,So=>So.layout.meta).subscribe(Eo)}},url$3={subscribe(Eo){const $o=getRoutifyContext();return derived($o,So=>makeUrlHelper(So,So.route,So.routes)).subscribe(Eo)}};function makeUrlHelper(Eo,$o,So){return function($a,ya={},wa){const{component:Sa}=Eo,Oa=Object.assign({},$o.params,Sa.params);let Ca=$a&&$a.nodeType&&$a;Ca&&($a=$a.getAttribute("href")),$a=$a?Aa($a):Sa.shortPath;const Pa=So.find(Ia=>[Ia.shortPath||"/",Ia.path].includes($a));if(Pa&&Pa.meta.preload==="proximity"&&window.requestIdleCallback){const Ia=routify.appLoaded?0:1500;setTimeout(()=>{window.requestIdleCallback(()=>Pa.api.preload())},Ia)}wa&&wa.strict!==!1||($a=$a.replace(/index$/,""));let Ea=resolveUrl($a,ya,Oa);if(Ca)return Ca.href=Ea,{update(Ia){Ca.href=resolveUrl($a,Ia,Oa)}};return Ea;function Aa(Ia){if(Ia.match(/^\.\.?\//)){let[,Ma,Ra]=Ia.match(/^([\.\/]+)(.*)/),Da=Sa.path.replace(/\/$/,"");const La=Ma.match(/\.\.\//g)||[];Sa.isPage&&La.push(null),La.forEach(()=>Da=Da.replace(/\/[^\/]+\/?$/,"")),Ia=`${Da}/${Ra}`.replace(/\/$/,""),Ia=Ia||"/"}else if(!Ia.match(/^\//)){const Ma=So.find(Ra=>Ra.meta.name===Ia);Ma&&(Ia=Ma.shortPath)}return Ia}}}const goto={subscribe(Eo){const $o=getContext$1("routifyupdatepage");return derived(url$3,So=>function($a,ya,wa,Sa){const Oa=So($a,ya);wa?$o(Oa,Sa):history.pushState({},null,Oa)}).subscribe(Eo)}},redirect={subscribe(Eo){const $o=getContext$1("routifyupdatepage");return derived(url$3,So=>function($a,ya,wa,Sa){const Oa=So($a,ya);wa?$o(Oa,Sa):history.replaceState({},null,Oa)}).subscribe(Eo)}},isActive={subscribe(Eo){return derived([url$3,route],([$o,So])=>function($a="",ya={},{strict:wa}={strict:!0}){$a=$o($a,ya,{strict:wa});const Sa=$o(So.path,ya,{strict:wa}),Oa=new RegExp("^"+$a+"($|/)");return!!Sa.match(Oa)}).subscribe(Eo)}};function precache(Eo,$o){(typeof Eo=="string"?urlToRoute(Eo):Eo).component()}function prefetch(Eo,$o){prefetch$1(Eo,$o)}function getConcestor(Eo,$o){const So=Eo.__file,Io=$o.__file,$a=[...So.lineage,So],ya=[...Io.lineage,Io];let wa=$a[0],Sa=[$a[0].api,ya[0].api];return $a.forEach((Oa,Ca)=>{const Pa=ya[Ca];Pa&&Oa.parent===Pa.parent&&(wa=Oa.parent,Sa=[Oa.api,Pa.api])}),[wa.api,Sa[0],Sa[1]]}function getDirection$1(Eo,$o,So){const Io=Eo.findIndex(ya=>$o.path.startsWith(ya)),$a=Eo.findIndex(ya=>So.path.startsWith(ya));return Io-$a}function focus(Eo){focusIsSet||(focusIsSet=!0,Eo.setAttribute("tabindex","0"),Eo.focus(),setTimeout(()=>focusIsSet=!1))}let focusIsSet=!1;const _metatags={subscribe(Eo){return this._origin=this.getOrigin(),Eo(metatags)},props:{},templates:{},services:{plain:{propField:"name",valueField:"content"},twitter:{propField:"name",valueField:"content"},og:{propField:"property",valueField:"content"}},plugins:[{name:"applyTemplate",condition:()=>!0,action:(Eo,$o)=>{const So=_metatags.getLongest(_metatags.templates,Eo)||(Io=>Io);return[Eo,So($o)]}},{name:"createMeta",condition:()=>!0,action(Eo,$o){_metatags.writeMeta(Eo,$o)}},{name:"createOG",condition:Eo=>!Eo.match(":"),action(Eo,$o){_metatags.writeMeta(`og:${Eo}`,$o)}},{name:"createTitle",condition:Eo=>Eo==="title",action(Eo,$o){document.title=$o}}],getLongest(Eo,$o){const So=Eo[$o];if(So){const Io=get_store_value(route).path,wa=Object.keys(Eo[$o]).filter(Sa=>Io.includes(Sa)).sort((Sa,Oa)=>Oa.length-Sa.length)[0];return So[wa]}},writeMeta(Eo,$o){const So=document.getElementsByTagName("head")[0],Io=Eo.match(/(.+)\:/),$a=Io&&Io[1]||"plain",{propField:ya,valueField:wa}=metatags.services[$a]||metatags.services.plain,Sa=document.querySelector(`meta[${ya}='${Eo}']`);Sa&&Sa.remove();const Oa=document.createElement("meta");Oa.setAttribute(ya,Eo),Oa.setAttribute(wa,$o),Oa.setAttribute("data-origin","routify"),So.appendChild(Oa)},set(Eo,$o){typeof Eo=="string"&&_metatags.plugins.forEach(So=>{So.condition(Eo,$o)&&([Eo,$o]=So.action(Eo,$o)||[Eo,$o])})},clear(){const Eo=document.querySelector("meta");Eo&&Eo.remove()},template(Eo,$o){const So=_metatags.getOrigin;_metatags.templates[Eo]=_metatags.templates[Eo]||{},_metatags.templates[Eo][So]=$o},update(){Object.keys(_metatags.props).forEach(Eo=>{let $o=_metatags.getLongest(_metatags.props,Eo);_metatags.plugins.forEach(So=>{So.condition(Eo,$o)&&([Eo,$o]=So.action(Eo,$o)||[Eo,$o])})})},batchedUpdate(){_metatags._pendingUpdate||(_metatags._pendingUpdate=!0,setTimeout(()=>{_metatags._pendingUpdate=!1,this.update()}))},_updateQueued:!1,_origin:!1,getOrigin(){if(this._origin)return this._origin;const Eo=getRoutifyContext();return Eo&&get_store_value(Eo).path||"/"},_pendingUpdate:!1},metatags=new Proxy(_metatags,{set(Eo,$o,So,Io){const{props:$a}=Eo;return Reflect.has(Eo,$o)?Reflect.set(Eo,$o,So,Io):($a[$o]=$a[$o]||{},$a[$o][Eo.getOrigin()]=So),window.routify.appLoaded&&Eo.batchedUpdate(),!0}});function get_each_context$2v(Eo,$o,So){const Io=Eo.slice();return Io[21]=$o[So].component,Io[22]=$o[So].componentFile,Io[2]=$o[So].decorator,Io[1]=$o[So].nodes,Io}function create_if_block_1$3P(Eo){let $o=[],So=new Map,Io,$a,ya=ensure_array_like([Eo[4]]);const wa=Sa=>Sa[7];for(let Sa=0;Sa<1;Sa+=1){let Oa=get_each_context$2v(Eo,ya,Sa),Ca=wa(Oa);So.set(Ca,$o[Sa]=create_each_block$2v(Ca,Oa))}return{c(){for(let Sa=0;Sa<1;Sa+=1)$o[Sa].c();Io=empty$4()},m(Sa,Oa){for(let Ca=0;Ca<1;Ca+=1)$o[Ca]&&$o[Ca].m(Sa,Oa);insert$1(Sa,Io,Oa),$a=!0},p(Sa,Oa){Oa&33554621&&(ya=ensure_array_like([Sa[4]]),group_outros(),$o=update_keyed_each($o,Oa,wa,1,Sa,ya,So,Io.parentNode,outro_and_destroy_block,create_each_block$2v,Io,get_each_context$2v),check_outros())},i(Sa){if(!$a){for(let Oa=0;Oa<1;Oa+=1)transition_in($o[Oa]);$a=!0}},o(Sa){for(let Oa=0;Oa<1;Oa+=1)transition_out($o[Oa]);$a=!1},d(Sa){Sa&&detach(Io);for(let Oa=0;Oa<1;Oa+=1)$o[Oa].d(Sa)}}}function create_if_block_2$2l(Eo){let $o,So;return $o=new Route({props:{decorator:Eo[2],nodes:Eo[1],scoped:{...Eo[0],...Eo[25]}}}),{c(){create_component($o.$$.fragment)},m(Io,$a){mount_component($o,Io,$a),So=!0},p(Io,$a){const ya={};$a&4&&(ya.decorator=Io[2]),$a&16&&(ya.nodes=Io[1]),$a&33554433&&(ya.scoped={...Io[0],...Io[25]}),$o.$set(ya)},i(Io){So||(transition_in($o.$$.fragment,Io),So=!0)},o(Io){transition_out($o.$$.fragment,Io),So=!1},d(Io){destroy_component($o,Io)}}}function create_default_slot_1$51(Eo){let $o,So,Io=Eo[21]&&Eo[1].length&&create_if_block_2$2l(Eo);return{c(){Io&&Io.c(),$o=empty$4()},m($a,ya){Io&&Io.m($a,ya),insert$1($a,$o,ya),So=!0},p($a,ya){$a[21]&&$a[1].length?Io?(Io.p($a,ya),ya&16&&transition_in(Io,1)):(Io=create_if_block_2$2l($a),Io.c(),transition_in(Io,1),Io.m($o.parentNode,$o)):Io&&(group_outros(),transition_out(Io,1,1,()=>{Io=null}),check_outros())},i($a){So||(transition_in(Io),So=!0)},o($a){transition_out(Io),So=!1},d($a){$a&&detach($o),Io&&Io.d($a)}}}function create_default_slot$7V(Eo){let $o,So,Io;const $a=[{scoped:Eo[0]},{scopedSync:Eo[5]},Eo[3].param||{}];var ya=Eo[22];function wa(Sa,Oa){let Ca={$$slots:{default:[create_default_slot_1$51,({scoped:Pa,decorator:Ta})=>({25:Pa,2:Ta}),({scoped:Pa,decorator:Ta})=>(Pa?33554432:0)|(Ta?4:0)]},$$scope:{ctx:Sa}};for(let Pa=0;Pa<$a.length;Pa+=1)Ca=assign$1(Ca,$a[Pa]);return Oa!==void 0&&Oa&41&&(Ca=assign$1(Ca,get_spread_update($a,[Oa&1&&{scoped:Sa[0]},Oa&32&&{scopedSync:Sa[5]},Oa&8&&get_spread_object(Sa[3].param||{})]))),{props:Ca}}return ya&&($o=construct_svelte_component(ya,wa(Eo))),{c(){$o&&create_component($o.$$.fragment),So=space$2()},m(Sa,Oa){$o&&mount_component($o,Sa,Oa),insert$1(Sa,So,Oa),Io=!0},p(Sa,Oa){if(Oa&16&&ya!==(ya=Sa[22])){if($o){group_outros();const Ca=$o;transition_out(Ca.$$.fragment,1,0,()=>{destroy_component(Ca,1)}),check_outros()}ya?($o=construct_svelte_component(ya,wa(Sa,Oa)),create_component($o.$$.fragment),transition_in($o.$$.fragment,1),mount_component($o,So.parentNode,So)):$o=null}else if(ya){const Ca=Oa&41?get_spread_update($a,[Oa&1&&{scoped:Sa[0]},Oa&32&&{scopedSync:Sa[5]},Oa&8&&get_spread_object(Sa[3].param||{})]):{};Oa&100663317&&(Ca.$$scope={dirty:Oa,ctx:Sa}),$o.$set(Ca)}},i(Sa){Io||($o&&transition_in($o.$$.fragment,Sa),Io=!0)},o(Sa){$o&&transition_out($o.$$.fragment,Sa),Io=!1},d(Sa){Sa&&detach(So),$o&&destroy_component($o,Sa)}}}function create_each_block$2v(Eo,$o){let So,Io,$a,ya;var wa=$o[2];function Sa(Oa,Ca){return{props:{scoped:Oa[0],$$slots:{default:[create_default_slot$7V]},$$scope:{ctx:Oa}}}}return wa&&(Io=construct_svelte_component(wa,Sa($o))),{key:Eo,first:null,c(){So=empty$4(),Io&&create_component(Io.$$.fragment),$a=empty$4(),this.first=So},m(Oa,Ca){insert$1(Oa,So,Ca),Io&&mount_component(Io,Oa,Ca),insert$1(Oa,$a,Ca),ya=!0},p(Oa,Ca){if($o=Oa,Ca&16&&wa!==(wa=$o[2])){if(Io){group_outros();const Pa=Io;transition_out(Pa.$$.fragment,1,0,()=>{destroy_component(Pa,1)}),check_outros()}wa?(Io=construct_svelte_component(wa,Sa($o)),create_component(Io.$$.fragment),transition_in(Io.$$.fragment,1),mount_component(Io,$a.parentNode,$a)):Io=null}else if(wa){const Pa={};Ca&1&&(Pa.scoped=$o[0]),Ca&67108925&&(Pa.$$scope={dirty:Ca,ctx:$o}),Io.$set(Pa)}},i(Oa){ya||(Io&&transition_in(Io.$$.fragment,Oa),ya=!0)},o(Oa){Io&&transition_out(Io.$$.fragment,Oa),ya=!1},d(Oa){Oa&&(detach(So),detach($a)),Io&&destroy_component(Io,Oa)}}}function create_if_block$6F(Eo){let $o,So,Io;return{c(){$o=element("div"),set_style($o,"display","contents")},m($a,ya){insert$1($a,$o,ya),So||(Io=action_destroyer(Eo[10].call(null,$o)),So=!0)},d($a){$a&&detach($o),So=!1,Io()}}}function create_fragment$d8(Eo){let $o,So,Io,$a=Eo[4]&&create_if_block_1$3P(Eo),ya=!Eo[6]&&create_if_block$6F(Eo);return{c(){$a&&$a.c(),$o=space$2(),ya&&ya.c(),So=empty$4()},m(wa,Sa){$a&&$a.m(wa,Sa),insert$1(wa,$o,Sa),ya&&ya.m(wa,Sa),insert$1(wa,So,Sa),Io=!0},p(wa,[Sa]){wa[4]?$a?($a.p(wa,Sa),Sa&16&&transition_in($a,1)):($a=create_if_block_1$3P(wa),$a.c(),transition_in($a,1),$a.m($o.parentNode,$o)):$a&&(group_outros(),transition_out($a,1,1,()=>{$a=null}),check_outros()),wa[6]?ya&&(ya.d(1),ya=null):ya||(ya=create_if_block$6F(wa),ya.c(),ya.m(So.parentNode,So))},i(wa){Io||(transition_in($a),Io=!0)},o(wa){transition_out($a),Io=!1},d(wa){wa&&(detach($o),detach(So)),$a&&$a.d(wa),ya&&ya.d(wa)}}}function instance$da(Eo,$o,So){let Io,$a,ya,wa,Sa;component_subscribe(Eo,route,Ha=>So(14,ya=Ha)),component_subscribe(Eo,routes$1,Ha=>So(16,Sa=Ha));let{nodes:Oa=[]}=$o,{scoped:Ca={}}=$o,{decorator:Pa=void 0}=$o,Ta=null,Ea=null,Aa={},Ia,Ma=1;const Ra=writable(null);component_subscribe(Eo,Ra,Ha=>So(4,$a=Ha));const Da=getContext$1("routify")||rootContext;component_subscribe(Eo,Da,Ha=>So(15,wa=Ha));const La=Ha=>So(6,Ia=Ha.parentNode);setContext("routify",Ra);let Na=[];function Fa(Ha){let Ga=Ha.component();Ga instanceof Promise?Ga.then(Wa):Wa(Ga)}function Wa(Ha){So(5,Aa={...Ca});const Ga={...$a,nodes:Ea,decorator:Pa||Noop,layout:Ta.isLayout?Ta:wa.layout,component:Ta,route:ya,routes:Sa,componentFile:Ha,parentNode:Ia||wa.parentNode};Ra.set(Ga),set_store_value(Da,wa.child=Ta,wa),Ea.length===0&&za()}async function za(){await new Promise(Ga=>setTimeout(Ga));const Ha=$a.component.path===ya.path;!window.routify.stopAutoReady&&Ha&&onPageLoaded({page:$a.component,metatags,afterPageLoad,parentNode:Ia})}function Va({meta:Ha,path:Ga,param:Qa,params:Za}){return JSON.stringify({path:Ga,invalidate:Ma,param:(Ha["param-is-page"]||Ha["slug-is-page"])&&Qa,queryParams:Ha["query-params-is-page"]&&Za})}return Eo.$$set=Ha=>{"nodes"in Ha&&So(1,Oa=Ha.nodes),"scoped"in Ha&&So(0,Ca=Ha.scoped),"decorator"in Ha&&So(2,Pa=Ha.decorator)},Eo.$$.update=()=>{Eo.$$.dirty&6146&&Na!==Oa&&(So(12,Na=Oa),So(3,[Ta,...Ea]=[...Oa],Ta),So(3,Ta.api.reset=()=>So(11,Ma++,Ma),Ta)),Eo.$$.dirty&8&&Fa(Ta),Eo.$$.dirty&2064&&So(7,Io=$a&&Ma&&Va($a.component)),Eo.$$.dirty&16&&$a&&suppressComponentWarnings($a,tick)},[Ca,Oa,Pa,Ta,$a,Aa,Ia,Io,Ra,Da,La,Ma,Na]}class Route extends SvelteComponent{constructor($o){super(),init$3(this,$o,instance$da,create_fragment$d8,safe_not_equal,{nodes:1,scoped:0,decorator:2})}}function init$2(Eo,$o){let So=!1;function Io(ya,wa){const Sa=ya||currentLocation().fullpath,Oa=urlToRoute(Sa);Oa.redirectTo&&(history.replaceStateNative({},null,Oa.redirectTo),delete Oa.redirectTo);const Ta=[...(wa&&urlToRoute(currentLocation().fullpath,Eo)||Oa).layouts,Oa];So&&delete So.last,Oa.last=So,So=Oa,ya||urlRoute.set(Oa),route.set(Oa),Oa.api.preload().then(()=>{isChangingPage.set(!0),$o(Ta)})}const $a=createEventListeners(Io);return{updatePage:Io,destroy:$a}}function createEventListeners(Eo){["pushState","replaceState"].forEach($a=>{history[$a+"Native"]||(history[$a+"Native"]=history[$a]),history[$a]=async function(ya={},wa,Sa){const Oa=location.pathname+location.search+location.hash;if(Sa===Oa)return!1;const{id:Ca,path:Pa,params:Ta}=get_store_value(route);ya={id:Ca,path:Pa,params:Ta,...ya};const Ea=new Event($a.toLowerCase());if(Object.assign(Ea,{state:ya,title:wa,url:Sa}),await runHooksBeforeUrlChange(Ea,Sa))return history[$a+"Native"].apply(this,[ya,wa,Sa]),dispatchEvent(Ea)}});let $o=!1;const So={click:handleClick$1,pushstate:()=>Eo(),replacestate:()=>Eo(),popstate:async $a=>{$o?$o=!1:await runHooksBeforeUrlChange($a,currentLocation().fullpath)?Eo():($o=!0,$a.preventDefault(),history.go(1))}};return Object.entries(So).forEach($a=>addEventListener(...$a)),()=>{Object.entries(So).forEach($a=>removeEventListener(...$a))}}function handleClick$1(Eo){const $o=Eo.target.closest("a")||Eo.composedPath().find(ya=>ya.tagName==="A"),So=$o&&$o.href;if(Eo.ctrlKey||Eo.metaKey||Eo.altKey||Eo.shiftKey||Eo.button||Eo.defaultPrevented||!So||$o.target||$o.host!==location.host)return;const Io=new URL(So),$a=Io.pathname+Io.search+Io.hash;Eo.preventDefault(),history.pushState({},"",$a)}async function runHooksBeforeUrlChange(Eo,$o){const So=urlToRoute($o).api;for(const Io of beforeUrlChange._hooks.filter(Boolean))if(!await Io(Eo,So,{url:$o}))return!1;return!0}function create_if_block$6E(Eo){let $o,So;return $o=new Route({props:{nodes:Eo[0]}}),{c(){create_component($o.$$.fragment)},m(Io,$a){mount_component($o,Io,$a),So=!0},p(Io,$a){const ya={};$a&1&&(ya.nodes=Io[0]),$o.$set(ya)},i(Io){So||(transition_in($o.$$.fragment,Io),So=!0)},o(Io){transition_out($o.$$.fragment,Io),So=!1},d(Io){destroy_component($o,Io)}}}function create_fragment$d7(Eo){let $o,So,Io,$a=Eo[0]&&Eo[1]!==null&&create_if_block$6E(Eo);return So=new Prefetcher({}),{c(){$a&&$a.c(),$o=space$2(),create_component(So.$$.fragment)},m(ya,wa){$a&&$a.m(ya,wa),insert$1(ya,$o,wa),mount_component(So,ya,wa),Io=!0},p(ya,[wa]){ya[0]&&ya[1]!==null?$a?($a.p(ya,wa),wa&3&&transition_in($a,1)):($a=create_if_block$6E(ya),$a.c(),transition_in($a,1),$a.m($o.parentNode,$o)):$a&&(group_outros(),transition_out($a,1,1,()=>{$a=null}),check_outros())},i(ya){Io||(transition_in($a),transition_in(So.$$.fragment,ya),Io=!0)},o(ya){transition_out($a),transition_out(So.$$.fragment,ya),Io=!1},d(ya){ya&&detach($o),$a&&$a.d(ya),destroy_component(So,ya)}}}function instance$d9(Eo,$o,So){let Io;component_subscribe(Eo,route,Aa=>So(1,Io=Aa));let{routes:$a}=$o,{config:ya={}}=$o,wa,Sa;window.routify=window.routify||{},window.routify.inBrowser=!window.navigator.userAgent.match("jsdom"),Object.assign(defaultConfig$1,ya),setContext("routifyupdatepage",(...Aa)=>Sa&&Sa.updatePage(...Aa));const Ca=Aa=>So(0,wa=Aa),Pa=()=>{Sa&&(Sa.destroy(),Sa=null)};let Ta=null;const Ea=()=>{clearTimeout(Ta),Ta=setTimeout(()=>{Pa(),Sa=init$2($a,Ca),routes$1.set($a),Sa.updatePage()})};return onDestroy(Pa),Eo.$$set=Aa=>{"routes"in Aa&&So(2,$a=Aa.routes),"config"in Aa&&So(3,ya=Aa.config)},Eo.$$.update=()=>{Eo.$$.dirty&4&&$a&&Ea()},[wa,Io,$a,ya]}let Router$1=class extends SvelteComponent{constructor($o){super(),init$3(this,$o,instance$d9,create_fragment$d7,safe_not_equal,{routes:2,config:3})}};function createNodeMiddleware(Eo){const $o=async function(Io){return await nodeMiddleware(Eo,{file:Io.tree,state:{treePayload:Io},scope:{}})};return $o.sync=function(Io){return nodeMiddlewareSync(Eo,{file:Io.tree,state:{treePayload:Io},scope:{}})},$o}async function nodeMiddleware(Eo,$o){const So=await Eo($o);if(So===!1)return!1;const Io=So||$o.file;if(Io.children){const $a=await Promise.all(Io.children.map(async ya=>nodeMiddleware(Eo,{state:$o.state,scope:clone$5($o.scope||{}),parent:$o.file,file:await ya})));Io.children=$a.filter(Boolean)}return Io}function nodeMiddlewareSync(Eo,$o){const So=Eo($o);if(So===!1)return!1;const Io=So||$o.file;if(Io.children){const $a=Io.children.map(ya=>nodeMiddlewareSync(Eo,{state:$o.state,scope:clone$5($o.scope||{}),parent:$o.file,file:ya}));Io.children=$a.filter(Boolean)}return Io}function clone$5(Eo){return JSON.parse(JSON.stringify(Eo))}const setRegex=createNodeMiddleware(({file:Eo})=>{(Eo.isPage||Eo.isFallback)&&(Eo.regex=pathToRegex(Eo.path,Eo.isFallback))}),setParamKeys=createNodeMiddleware(({file:Eo})=>{Eo.paramKeys=pathToParamKeys(Eo.path)}),setShortPath=createNodeMiddleware(({file:Eo})=>{Eo.isFallback||Eo.isIndex?Eo.short