@reddb-io/ui 0.3.1 → 0.3.2
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.
- package/build/_app/immutable/assets/0.BWZTMKZW.css +1 -0
- package/build/_app/immutable/chunks/{8zg2gJwV.js → B-yl15ta.js} +1 -1
- package/build/_app/immutable/chunks/{CJFJ501n.js → Bgb6fHGb.js} +1 -1
- package/build/_app/immutable/chunks/C-kqMbRi.js +1 -0
- package/build/_app/immutable/chunks/{CLBx21Hz.js → C3SGj6Qd.js} +2 -2
- package/build/_app/immutable/chunks/{DV9PDoM3.js → C7kf23SQ.js} +1 -1
- package/build/_app/immutable/chunks/CHvQYbpl.js +1 -0
- package/build/_app/immutable/chunks/CO7K4bD2.js +1164 -0
- package/build/_app/immutable/chunks/CP65IkJc.js +1 -0
- package/build/_app/immutable/chunks/CxnvJShw.js +404 -0
- package/build/_app/immutable/chunks/D02PB2u7.js +1 -0
- package/build/_app/immutable/chunks/{Bq4DTWK2.js → DN7v3Tar.js} +1 -1
- package/build/_app/immutable/entry/{app.BDog2y0J.js → app.BeX4Tmu5.js} +2 -2
- package/build/_app/immutable/entry/start.D7y1MZex.js +1 -0
- package/build/_app/immutable/nodes/0.C0e5KQVb.js +2 -0
- package/build/_app/immutable/nodes/1.ceiVuZbB.js +1 -0
- package/build/_app/immutable/nodes/{10.D_FCLs0Z.js → 10.DeFqKRR2.js} +2 -2
- package/build/_app/immutable/nodes/{12.DPE6v6Zf.js → 12.CzMvqoYS.js} +2 -2
- package/build/_app/immutable/nodes/{15.CcJlZGxa.js → 15.CRDBqbiH.js} +1 -1
- package/build/_app/version.json +1 -1
- package/build/index.html +13 -13
- package/dist/embed/{AnalyticsView-D8z1Nsed.js → AnalyticsView-SKyGxeAx.js} +849 -849
- package/dist/embed/{AnalyticsView-D8z1Nsed.js.map → AnalyticsView-SKyGxeAx.js.map} +1 -1
- package/dist/embed/{RedUiEmbedRoot-CtqTd_FG.js → RedUiEmbedRoot-BzVzGAFK.js} +13945 -13287
- package/dist/embed/RedUiEmbedRoot-BzVzGAFK.js.map +1 -0
- package/dist/embed/event-BvRbkLjD.js +46 -0
- package/dist/embed/event-BvRbkLjD.js.map +1 -0
- package/dist/embed/index-BVxMkfHe.js +8 -0
- package/dist/embed/index-BVxMkfHe.js.map +1 -0
- package/dist/embed/index-BY6fc1oQ.js +856 -0
- package/dist/embed/index-BY6fc1oQ.js.map +1 -0
- package/dist/embed/{index-client-BeiP-va5.js → index-client-BHUUkI8H.js} +121 -120
- package/dist/embed/{index-client-BeiP-va5.js.map → index-client-BHUUkI8H.js.map} +1 -1
- package/dist/embed/index.js +1 -1
- package/dist/embed/{sigma.esm-qqKBpvin.js → sigma.esm-BawyGZ3s.js} +2 -2
- package/dist/embed/{sigma.esm-qqKBpvin.js.map → sigma.esm-BawyGZ3s.js.map} +1 -1
- package/dist/embed/window-ZR8_mM8o.js +1889 -0
- package/dist/embed/window-ZR8_mM8o.js.map +1 -0
- package/package.json +5 -3
- package/src/lib/ConnectDropdown.svelte +60 -3
- package/src/lib/DevConsole.svelte +155 -0
- package/src/lib/ErrorBoundary.fixture.svelte +11 -0
- package/src/lib/ErrorBoundary.fixtures.svelte.ts +5 -0
- package/src/lib/ErrorBoundary.svelte +78 -0
- package/src/lib/ErrorBoundaryCrashChild.fixture.svelte +9 -0
- package/src/lib/LoadingOverlay.svelte +109 -0
- package/src/lib/StatusBar.svelte +19 -1
- package/src/lib/Workspace.svelte +118 -2
- package/src/lib/connections.svelte.ts +95 -1
- package/src/lib/embed/RedUiEmbedRoot.svelte +13 -8
- package/src/lib/embed/index.ts +34 -1
- package/src/lib/index.ts +7 -0
- package/src/lib/loading.svelte.ts +142 -0
- package/src/lib/reddb/client.ts +133 -15
- package/src/lib/reddb/desktop-error.ts +89 -0
- package/src/lib/reddb/dev-console.ts +186 -0
- package/src/lib/reddb/index.ts +2 -0
- package/src/lib/reddb/local-url-provider.ts +4 -8
- package/src/lib/reddb/tauri-encrypted-store.ts +4 -9
- package/src/lib/tabs.svelte.ts +5 -0
- package/src/lib/workspace-session.ts +81 -0
- package/build/_app/immutable/assets/0.DgbuWrJy.css +0 -1
- package/build/_app/immutable/chunks/85-Fh5Zp.js +0 -404
- package/build/_app/immutable/chunks/CnD4hwxC.js +0 -1106
- package/build/_app/immutable/chunks/DQCYUNtS.js +0 -1
- package/build/_app/immutable/entry/start.D1J45dq5.js +0 -1
- package/build/_app/immutable/nodes/0.BTrC4th2.js +0 -1
- package/build/_app/immutable/nodes/1.Ds1Tbjsm.js +0 -1
- package/dist/embed/RedUiEmbedRoot-CtqTd_FG.js.map +0 -1
- package/dist/embed/index-w1Qo_uW0.js +0 -677
- package/dist/embed/index-w1Qo_uW0.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var ee=t=>{throw TypeError(t)};var De=(t,e,n)=>e.has(t)||ee("Cannot "+n);var y=(t,e,n)=>(De(t,e,"read from private field"),n?n.call(t):e.get(t)),A=(t,e,n)=>e.has(t)?ee("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n);import{bR as qt,bz as T,at as I,bm as P,bH as _t,bt as Ve}from"./CGFL56WJ.js";import{a as ne}from"./Btd6PFkC.js";class zt{constructor(e,n){this.status=e,typeof n=="string"?this.body={message:n}:n?this.body=n:this.body={message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}}class Bt{constructor(e,n){try{new Headers({location:n})}catch{throw new Error(`Invalid redirect location ${JSON.stringify(n)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=n}}class Kt extends Error{constructor(e,n,r){super(r),this.status=e,this.text=n}}new URL("sveltekit-internal://");function qe(t,e){return t==="/"||e==="ignore"?t:e==="never"?t.endsWith("/")?t.slice(0,-1):t:e==="always"&&!t.endsWith("/")?t+"/":t}function ze(t){return t.split("%25").map(decodeURI).join("%25")}function Be(t){for(const e in t)t[e]=decodeURIComponent(t[e]);return t}function Pt({href:t}){return t.split("#")[0]}function C(){}function Ke(...t){let e=5381;for(const n of t)if(typeof n=="string"){let r=n.length;for(;r;)e=e*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)e=e*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(e>>>0).toString(36)}new TextEncoder;function Me(t){const e=atob(t),n=new Uint8Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r);return n}const He=window.fetch;window.fetch=(t,e)=>((t instanceof Request?t.method:(e==null?void 0:e.method)||"GET")!=="GET"&&Y.delete(Mt(t)),He(t,e));const Y=new Map;function Fe(t,e){const n=Mt(t,e),r=document.querySelector(n);if(r!=null&&r.textContent){r.remove();let{body:a,...o}=JSON.parse(r.textContent);const s=r.getAttribute("data-ttl");return s&&Y.set(n,{body:a,init:o,ttl:1e3*Number(s)}),r.getAttribute("data-b64")!==null&&(a=Me(a)),Promise.resolve(new Response(a,o))}return window.fetch(t,e)}function Ge(t,e,n){if(Y.size>0){const r=Mt(t,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(e,n)}function Mt(t,e){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(t instanceof Request?t.url:t)}]`;if(e!=null&&e.headers||e!=null&&e.body){const a=[];e.headers&&a.push([...new Headers(e.headers)].join(",")),e.body&&(typeof e.body=="string"||ArrayBuffer.isView(e.body))&&a.push(e.body),r+=`[data-hash="${Ke(...a)}"]`}return r}const We=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,Je=/^\/\((?:[^)]+)\)$/;function Ye(t){const e=[];return{pattern:t==="/"||Je.test(t)?/^\/$/:new RegExp(`^${Qe(t).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return e.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/([^]*))?";const o=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(o)return e.push({name:o[1],matcher:o[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const s=r.split(/\[(.+?)\](?!\])/);return"/"+s.map((l,c)=>{if(c%2){if(l.startsWith("x+"))return jt(String.fromCharCode(parseInt(l.slice(2),16)));if(l.startsWith("u+"))return jt(String.fromCharCode(...l.slice(2).split("-").map(m=>parseInt(m,16))));const u=We.exec(l),[,h,_,p,f]=u;return e.push({name:p,matcher:f,optional:!!h,rest:!!_,chained:_?c===1&&s[0]==="":!1}),_?"([^]*?)":h?"([^/]*)?":"([^/]+?)"}return jt(l)}).join("")}).join("")}/?$`),params:e}}function Xe(t){return t!==""&&!/^\([^)]+\)$/.test(t)}function Qe(t){return t.slice(1).split("/").filter(Xe)}function Ze(t,e,n){const r={},a=t.slice(1),o=a.filter(i=>i!==void 0);let s=0;for(let i=0;i<e.length;i+=1){const l=e[i];let c=a[i-s];if(l.chained&&l.rest&&s&&(c=a.slice(i-s,i+1).filter(u=>u).join("/"),s=0),c===void 0)if(l.rest)c="";else continue;if(!l.matcher||n[l.matcher](c)){r[l.name]=c;const u=e[i+1],h=a[i+1];u&&!u.rest&&u.optional&&h&&l.chained&&(s=0),!u&&!h&&Object.keys(r).length===o.length&&(s=0);continue}if(l.optional&&l.chained){s++;continue}return}if(!s)return r}function jt(t){return t.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function tn({nodes:t,server_loads:e,dictionary:n,matchers:r}){const a=new Set(e);return Object.entries(n).map(([i,[l,c,u]])=>{const{pattern:h,params:_}=Ye(i),p={id:i,exec:f=>{const m=h.exec(f);if(m)return Ze(m,_,r)},errors:[1,...u||[]].map(f=>t[f]),layouts:[0,...c||[]].map(s),leaf:o(l)};return p.errors.length=p.layouts.length=Math.max(p.errors.length,p.layouts.length),p});function o(i){const l=i<0;return l&&(i=~i),[l,t[i]]}function s(i){return i===void 0?i:[a.has(i),t[i]]}}function me(t,e=JSON.parse){try{return e(sessionStorage[t])}catch{}}function re(t,e,n=JSON.stringify){const r=n(e);try{sessionStorage[t]=r}catch{}}var ue;const U=((ue=globalThis.__sveltekit_1gzcgjc)==null?void 0:ue.base)??"";var de;const en=((de=globalThis.__sveltekit_1gzcgjc)==null?void 0:de.assets)??U??"",nn="1782508132518",_e="sveltekit:snapshot",we="sveltekit:scroll",ve="sveltekit:states",rn="sveltekit:pageurl",M="sveltekit:history",Q="sveltekit:navigation",q={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Lt=location.origin;function Ht(t){if(t instanceof URL)return t;let e=document.baseURI;if(!e){const n=document.getElementsByTagName("base");e=n.length?n[0].href:document.URL}return new URL(t,e)}function z(){return{x:pageXOffset,y:pageYOffset}}function K(t,e){return t.getAttribute(`data-sveltekit-${e}`)}const ae={...q,"":q.hover};function ye(t){let e=t.assignedSlot??t.parentNode;return(e==null?void 0:e.nodeType)===11&&(e=e.host),e}function be(t,e){for(;t&&t!==e;){if(t.nodeName.toUpperCase()==="A"&&t.hasAttribute("href"))return t;t=ye(t)}}function Ct(t,e,n){let r;try{if(r=new URL(t instanceof SVGAElement?t.href.baseVal:t.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const i=location.hash.split("#")[1]||"/";r.hash=`#${i}${r.hash}`}}catch{}const a=t instanceof SVGAElement?t.target.baseVal:t.target,o=!r||!!a||Ut(r,e,n)||(t.getAttribute("rel")||"").split(/\s+/).includes("external"),s=(r==null?void 0:r.origin)===Lt&&t.hasAttribute("download");return{url:r,external:o,target:a,download:s}}function wt(t){let e=null,n=null,r=null,a=null,o=null,s=null,i=t;for(;i&&i!==document.documentElement;)r===null&&(r=K(i,"preload-code")),a===null&&(a=K(i,"preload-data")),e===null&&(e=K(i,"keepfocus")),n===null&&(n=K(i,"noscroll")),o===null&&(o=K(i,"reload")),s===null&&(s=K(i,"replacestate")),i=ye(i);function l(c){switch(c){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:ae[r??"off"],preload_data:ae[a??"off"],keepfocus:l(e),noscroll:l(n),reload:l(o),replace_state:l(s)}}function oe(t){const e=qt(t);let n=!0;function r(){n=!0,e.update(s=>s)}function a(s){n=!1,e.set(s)}function o(s){let i;return e.subscribe(l=>{(i===void 0||n&&l!==i)&&s(i=l)})}return{notify:r,set:a,subscribe:o}}const ke={v:C};function an(){const{set:t,subscribe:e}=qt(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${en}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const s=(await a.json()).version!==nn;return s&&(t(!0),ke.v(),clearTimeout(n)),s}catch{return!1}}return{subscribe:e,check:r}}function Ut(t,e,n){return t.origin!==Lt||!t.pathname.startsWith(e)?!0:n?t.pathname!==location.pathname:!1}function Pn(t){}const Ee=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Ee];const on=new Set([...Ee]);[...on];function sn(t){return t.filter(e=>e!=null)}function gt(t,e){return t+"/"+e}function Ft(t){return t instanceof zt||t instanceof Kt?t.status:500}function ln(t){return t instanceof Kt?t.text:"Internal Error"}let x,Z,Ot;const cn=ne.toString().includes("$$")||/function \w+\(\) \{\}/.test(ne.toString()),se="a:";var at,ot,st,it,lt,ct,ft,ut,he,dt,pe,ht,ge;cn?(x={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(se)},Z={current:null},Ot={current:!1}):(x=new(he=class{constructor(){A(this,at,T({}));A(this,ot,T(null));A(this,st,T(null));A(this,it,T({}));A(this,lt,T({id:null}));A(this,ct,T({}));A(this,ft,T(-1));A(this,ut,T(new URL(se)))}get data(){return I(y(this,at))}set data(e){P(y(this,at),e)}get form(){return I(y(this,ot))}set form(e){P(y(this,ot),e)}get error(){return I(y(this,st))}set error(e){P(y(this,st),e)}get params(){return I(y(this,it))}set params(e){P(y(this,it),e)}get route(){return I(y(this,lt))}set route(e){P(y(this,lt),e)}get state(){return I(y(this,ct))}set state(e){P(y(this,ct),e)}get status(){return I(y(this,ft))}set status(e){P(y(this,ft),e)}get url(){return I(y(this,ut))}set url(e){P(y(this,ut),e)}},at=new WeakMap,ot=new WeakMap,st=new WeakMap,it=new WeakMap,lt=new WeakMap,ct=new WeakMap,ft=new WeakMap,ut=new WeakMap,he),Z=new(pe=class{constructor(){A(this,dt,T(null))}get current(){return I(y(this,dt))}set current(e){P(y(this,dt),e)}},dt=new WeakMap,pe),Ot=new(ge=class{constructor(){A(this,ht,T(!1))}get current(){return I(y(this,ht))}set current(e){P(y(this,ht),e)}},ht=new WeakMap,ge),ke.v=()=>Ot.current=!0);function Se(t){Object.assign(x,t)}const fn=new Set(["icon","shortcut icon","apple-touch-icon"]);let W=null;const D=me(we)??{},tt=me(_e)??{},N={url:oe({}),page:oe({}),navigating:qt(null),updated:an()};function Gt(t){D[t]=z()}function un(t,e){let n=t+1;for(;D[n];)delete D[n],n+=1;for(n=e+1;tt[n];)delete tt[n],n+=1}function et(t,e=!1){return e?location.replace(t.href):location.href=t.href,new Promise(C)}async function Re(){if("serviceWorker"in navigator){const t=await navigator.serviceWorker.getRegistration(U||"/");t&&await t.update()}}let Wt,Nt,vt,j,Dt,E;const yt=[],bt=[];let v=null;function kt(){var t;(t=v==null?void 0:v.fork)==null||t.then(e=>e==null?void 0:e.discard()),v=null}const mt=new Map,xe=new Set,dn=new Set,X=new Set;let w={branch:[],error:null,url:null},Le=!1,Et=!1,ie=!0,nt=!1,J=!1,Ue=!1,Jt=!1,Ae,k,L,$;const St=new Set,le=new Map,ce=new Map;async function Cn(t,e,n){var o,s,i,l;globalThis.__sveltekit_1gzcgjc&&(globalThis.__sveltekit_1gzcgjc.query,globalThis.__sveltekit_1gzcgjc.prerender),document.URL!==location.href&&(location.href=location.href),E=t,await((s=(o=t.hooks).init)==null?void 0:s.call(o)),Wt=tn(t),j=document.documentElement,Dt=e,Nt=t.nodes[0],vt=t.nodes[1],Nt(),vt(),k=(i=history.state)==null?void 0:i[M],L=(l=history.state)==null?void 0:l[Q],k||(k=L=Date.now(),history.replaceState({...history.state,[M]:k,[Q]:L},""));const r=D[k];function a(){r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y))}n?(a(),await Rn(Dt,n)):(await H({type:"enter",url:Ht(E.hash?Un(new URL(location.href)):location.href),replace_state:!0}),a()),Sn()}function hn(){yt.length=0,Jt=!1}function Te(t){bt.some(e=>e==null?void 0:e.snapshot)&&(tt[t]=bt.map(e=>{var n;return(n=e==null?void 0:e.snapshot)==null?void 0:n.capture()}))}function Ie(t){var e;(e=tt[t])==null||e.forEach((n,r)=>{var a,o;(o=(a=bt[r])==null?void 0:a.snapshot)==null||o.restore(n)})}function fe(){Gt(k),re(we,D),Te(L),re(_e,tt)}async function Pe(t,e,n,r){let a,o;e.invalidateAll&&kt(),await H({type:"goto",url:Ht(t),keepfocus:e.keepFocus,noscroll:e.noScroll,replace_state:e.replaceState,state:e.state,redirect_count:n,nav_token:r,accept:()=>{if(e.invalidateAll){Jt=!0,a=new Set;for(const[s,i]of le)for(const l of i.keys())a.add(gt(s,l));o=new Set;for(const[s,i]of ce)for(const l of i.keys())o.add(gt(s,l))}e.invalidate&&e.invalidate.forEach(En)}}),e.invalidateAll&&_t().then(_t).then(()=>{for(const[s,i]of le)for(const[l,{resource:c}]of i)a!=null&&a.has(gt(s,l))&&c.refresh();for(const[s,i]of ce)for(const[l,{resource:c}]of i)o!=null&&o.has(gt(s,l))&&c.reconnect()})}async function pn(t){if(t.id!==(v==null?void 0:v.id)){kt();const e={};St.add(e),v={id:t.id,token:e,promise:Oe({...t,preload:e}).then(n=>(St.delete(e),n.type==="loaded"&&n.state.error&&kt(),n)),fork:null}}return v.promise}async function $t(t){var n;const e=(n=await At(t,!1))==null?void 0:n.route;e&&await Promise.all([...e.layouts,e.leaf].filter(Boolean).map(r=>r[1]()))}async function je(t,e,n){var a;const r={params:w.params,route:{id:((a=w.route)==null?void 0:a.id)??null},url:new URL(location.href)};if(w={...t.state,nav:r},Se(t.props.page),Ae=new E.root({target:e,props:{...t.props,stores:N,components:bt},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),Ie(L),n){const o={from:null,to:{...r,scroll:D[k]??z()},willUnload:!1,type:"enter",complete:Promise.resolve()};X.forEach(s=>s(o))}Et=!0}async function Rt({url:t,params:e,branch:n,errors:r,status:a,error:o,route:s,form:i}){let l="never";if(U&&(t.pathname===U||t.pathname===U+"/"))l="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(l=f.slash);t.pathname=qe(t.pathname,l),t.search=t.search;const c={type:"loaded",state:{url:t,params:e,branch:n,error:o,route:s},props:{constructors:sn(n).map(f=>f.node.component),page:te(x)}};i!==void 0&&(c.props.form=i);let u={},h=!x,_=0;for(let f=0;f<Math.max(n.length,w.branch.length);f+=1){const m=n[f],d=w.branch[f];(m==null?void 0:m.data)!==(d==null?void 0:d.data)&&(h=!0),m&&(u={...u,...m.data},h&&(c.props[`data_${_}`]=u),_+=1)}return(!w.url||t.href!==w.url.href||w.error!==o||i!==void 0&&i!==x.form||h)&&(c.props.page={error:o,params:e,route:{id:(s==null?void 0:s.id)??null},state:{},status:a,url:new URL(t),form:i??null,data:h?u:x.data}),c}async function Yt({loader:t,parent:e,url:n,params:r,route:a,server_data_node:o}){var c,u;let s=null;const i={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await t();return{node:l,loader:t,server:o,universal:(c=l.universal)!=null&&c.load?{type:"data",data:s,uses:i}:null,data:s??(o==null?void 0:o.data)??null,slash:((u=l.universal)==null?void 0:u.trailingSlash)??(o==null?void 0:o.slash)}}function gn(t,e,n){let r=t instanceof Request?t.url:t;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const o=Et?Ge(r,a.href,e):Fe(r,e);return{resolved:a,promise:o}}function mn(t,e,n,r,a,o){if(Jt)return!0;if(!a)return!1;if(a.parent&&t||a.route&&e||a.url&&n)return!0;for(const s of a.search_params)if(r.has(s))return!0;for(const s of a.params)if(o[s]!==w.params[s])return!0;for(const s of a.dependencies)if(yt.some(i=>i(new URL(s))))return!0;return!1}function Xt(t,e){return(t==null?void 0:t.type)==="data"?t:(t==null?void 0:t.type)==="skip"?e??null:null}function _n(t,e){if(!t)return new Set(e.searchParams.keys());const n=new Set([...t.searchParams.keys(),...e.searchParams.keys()]);for(const r of n){const a=t.searchParams.getAll(r),o=e.searchParams.getAll(r);a.every(s=>o.includes(s))&&o.every(s=>a.includes(s))&&n.delete(r)}return n}function wn({error:t,url:e,route:n,params:r}){return{type:"loaded",state:{error:t,url:e,route:n,params:r,branch:[]},props:{page:te(x),constructors:[]}}}async function Oe({id:t,invalidating:e,url:n,params:r,route:a,preload:o}){if((v==null?void 0:v.id)===t)return St.delete(v.token),v.promise;const{errors:s,layouts:i,leaf:l}=a,c=[...i,l];s.forEach(d=>d==null?void 0:d().catch(C)),c.forEach(d=>d==null?void 0:d[1]().catch(C));const u=w.url?t!==xt(w.url):!1,h=w.route?a.id!==w.route.id:!1,_=_n(w.url,n);let p=!1;const f=c.map(async(d,g)=>{var O;if(!d)return;const b=w.branch[g];return d[1]===(b==null?void 0:b.loader)&&!mn(p,h,u,_,(O=b.universal)==null?void 0:O.uses,r)?b:(p=!0,Yt({loader:d[1],url:n,params:r,route:a,parent:async()=>{var pt;const V={};for(let B=0;B<g;B+=1)Object.assign(V,(pt=await f[B])==null?void 0:pt.data);return V},server_data_node:Xt(d[0]?{type:"skip"}:null,d[0]?b==null?void 0:b.server:void 0)}))});for(const d of f)d.catch(C);const m=[];for(let d=0;d<c.length;d+=1)if(c[d])try{m.push(await f[d])}catch(g){if(g instanceof Bt)return{type:"redirect",location:g.location};if(St.has(o))return wn({error:await rt(g,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=Ft(g),R;if(g instanceof zt)R=g.body;else{if(await N.updated.check())return await Re(),await et(n);R=await rt(g,{params:r,url:n,route:{id:a.id}})}const O=await vn(d,m,s);return O?Rt({url:n,params:r,branch:m.slice(0,O.idx).concat(O.node),errors:s,status:b,error:R,route:a}):await Ce(n,{id:a.id},R,b)}else m.push(void 0);return Rt({url:n,params:r,branch:m,errors:s,status:200,error:null,route:a,form:e?void 0:null})}async function vn(t,e,n){for(;t--;)if(n[t]){let r=t;for(;!e[r];)r-=1;try{return{idx:r+1,node:{node:await n[t](),loader:n[t],data:{},server:null,universal:null}}}catch{continue}}}async function Qt({status:t,error:e,url:n,route:r}){const a={};let o=null;try{const s=await Yt({loader:Nt,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:Xt(o)}),i={node:await vt(),loader:vt,universal:null,server:null,data:null};return Rt({url:n,params:a,branch:[s,i],status:t,error:e,errors:[],route:null})}catch(s){if(s instanceof Bt)return Pe(new URL(s.location,location.href),{},0);throw s}}async function yn(t){const e=t.href;if(mt.has(e))return mt.get(e);let n;try{const r=(async()=>{let a=await E.hooks.reroute({url:new URL(t),fetch:async(o,s)=>gn(o,s,t).promise})??t;if(typeof a=="string"){const o=new URL(t);E.hash?o.hash=a:o.pathname=a,a=o}return a})();mt.set(e,r),n=await r}catch{mt.delete(e);return}return n}async function At(t,e){if(t&&!Ut(t,U,E.hash)){const n=await yn(t);if(!n)return;const r=bn(n);for(const a of Wt){const o=a.exec(r);if(o)return{id:xt(t),invalidating:e,route:a,params:Be(o),url:t}}}}function bn(t){return ze(E.hash?t.hash.replace(/^#/,"").replace(/[?#].+/,""):t.pathname.slice(U.length))||"/"}function xt(t){return(E.hash?t.hash.replace(/^#/,""):t.pathname)+t.search}function $e({url:t,type:e,intent:n,delta:r,event:a,scroll:o}){let s=!1;const i=Zt(w,n,t,e,o??null);r!==void 0&&(i.navigation.delta=r),a!==void 0&&(i.navigation.event=a);const l={...i.navigation,cancel:()=>{s=!0,i.reject(new Error("navigation cancelled"))}};return nt||xe.forEach(c=>c(l)),s?null:i}async function H({type:t,url:e,popped:n,keepfocus:r,noscroll:a,replace_state:o,state:s={},redirect_count:i=0,nav_token:l={},accept:c=C,block:u=C,event:h}){var B;const _=$;$=l;const p=await At(e,!1),f=t==="enter"?Zt(w,p,e,t):$e({url:e,type:t,delta:n==null?void 0:n.delta,intent:p,scroll:n==null?void 0:n.scroll,event:h});if(!f){u(),$===l&&($=_);return}const m=k,d=L;c(),nt=!0,Et&&f.navigation.type!=="enter"&&N.navigating.set(Z.current=f.navigation);let g=p&&await Oe(p);if(!g){if(Ut(e,U,E.hash))return await et(e,o);g=await Ce(e,{id:null},await rt(new Kt(404,"Not Found",`Not found: ${e.pathname}`),{url:e,params:{},route:{id:null}}),404,o)}if(e=(p==null?void 0:p.url)||e,$!==l)return f.reject(new Error("navigation aborted")),!1;if(g.type==="redirect"){if(i<20){await H({type:t,url:new URL(g.location,e),popped:n,keepfocus:r,noscroll:a,replace_state:o,state:s,redirect_count:i+1,nav_token:l}),f.fulfil(void 0);return}g=await Qt({status:500,error:await rt(new Error("Redirect loop"),{url:e,params:{},route:{id:null}}),url:e,route:{id:null}})}else g.props.page.status>=400&&await N.updated.check()&&(await Re(),await et(e,o));if(hn(),Gt(m),Te(d),g.props.page.url.pathname!==e.pathname&&(e.pathname=g.props.page.url.pathname),s=n?n.state:s,!n){const S=o?0:1,F={[M]:k+=S,[Q]:L+=S,[ve]:s};(o?history.replaceState:history.pushState).call(history,F,"",e),o||un(k,L)}const b=p&&(v==null?void 0:v.id)===p.id?v.fork:null;v!=null&&v.fork&&!b&&kt(),v=null,g.props.page.state=s;let R;if(Et){const S=(await Promise.all(Array.from(dn,G=>G(f.navigation)))).filter(G=>typeof G=="function");if(S.length>0){let G=function(){S.forEach(It=>{X.delete(It)})};S.push(G),S.forEach(It=>{X.add(It)})}const F=f.navigation.to;w={...g.state,nav:{params:F.params,route:F.route,url:F.url}},g.props.page&&(g.props.page.url=e);const Tt=b&&await b;Tt?R=Tt.commit():(W=null,Ae.$set(g.props),W&&Object.assign(g.props.page,W),Se(g.props.page),R=(B=Ve)==null?void 0:B()),Ue=!0}else await je(g,Dt,!1);const{activeElement:O}=document;if(await R,await _t(),await _t(),$!==l)return f.reject(new Error("navigation aborted")),!1;g.props.page&&W&&Object.assign(g.props.page,W);let V=null;if(ie){const S=n?n.scroll:a?z():null;S?scrollTo(S.x,S.y):(V=e.hash&&document.getElementById(Ne(e)))?V.scrollIntoView():scrollTo(0,0)}const pt=document.activeElement!==O&&document.activeElement!==document.body;!r&&!pt&&Ln(e,!V),ie=!0,nt=!1,t==="popstate"&&Ie(L),f.fulfil(void 0),f.navigation.to&&(f.navigation.to.scroll=z()),X.forEach(S=>S(f.navigation)),N.navigating.set(Z.current=null)}async function Ce(t,e,n,r,a){return t.origin===Lt&&t.pathname===location.pathname&&!Le?await Qt({status:r,error:n,url:t,route:e}):await et(t,a)}function kn(){let t,e={element:void 0,href:void 0},n;j.addEventListener("mousemove",i=>{const l=i.target;clearTimeout(t),t=setTimeout(()=>{o(l,q.hover)},20)});function r(i){i.defaultPrevented||o(i.composedPath()[0],q.tap)}j.addEventListener("mousedown",r),j.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(i=>{for(const l of i)l.isIntersecting&&($t(new URL(l.target.href)),a.unobserve(l.target))},{threshold:0});async function o(i,l){const c=be(i,j),u=c===e.element&&(c==null?void 0:c.href)===e.href&&l>=n;if(!c||u)return;const{url:h,external:_,download:p}=Ct(c,U,E.hash);if(_||p)return;const f=wt(c),m=h&&xt(w.url)===xt(h);if(!(f.reload||m))if(l<=f.preload_data){e={element:c,href:c.href},n=q.tap;const d=await At(h,!1);if(!d)return;pn(d)}else l<=f.preload_code&&(e={element:c,href:c.href},n=l,$t(h))}function s(){a.disconnect();for(const i of j.querySelectorAll("a")){const{url:l,external:c,download:u}=Ct(i,U,E.hash);if(c||u)continue;const h=wt(i);h.reload||(h.preload_code===q.viewport&&a.observe(i),h.preload_code===q.eager&&$t(l))}}X.add(s),s()}function rt(t,e){if(t instanceof zt)return t.body;const n=Ft(t),r=ln(t);return E.hooks.handleError({error:t,event:e,status:n,message:r})??{message:r}}function Nn(t,e={}){return t=new URL(Ht(t)),t.origin!==Lt?Promise.reject(new Error("goto: invalid URL")):Pe(t,e,0)}function En(t){if(typeof t=="function")yt.push(t);else{const{href:e}=new URL(t,location.href);yt.push(n=>n.href===e)}}function Sn(){var e,n;history.scrollRestoration="manual",addEventListener("beforeunload",r=>{let a=!1;if(fe(),!nt){const o=Zt(w,void 0,null,"leave"),s={...o.navigation,cancel:()=>{a=!0,o.reject(new Error("navigation cancelled"))}};xe.forEach(i=>i(s))}a?(r.preventDefault(),r.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&fe()}),!((e=navigator.connection)!=null&&e.saveData)&&!/2g/.test((n=navigator.connection)==null?void 0:n.effectiveType)&&kn(),j.addEventListener("click",async r=>{if(r.button||r.which!==1||r.metaKey||r.ctrlKey||r.shiftKey||r.altKey||r.defaultPrevented)return;const a=be(r.composedPath()[0],j);if(!a)return;const{url:o,external:s,target:i,download:l}=Ct(a,U,E.hash);if(!o)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=wt(a);if(!(a instanceof SVGAElement)&&o.protocol!==location.protocol&&!(o.protocol==="https:"||o.protocol==="http:")||l)return;const[h,_]=(E.hash?o.hash.replace(/^#/,""):o.href).split("#"),p=h===Pt(location);if(s||c.reload&&(!p||!_)){$e({url:o,type:"link",event:r})?nt=!0:r.preventDefault();return}if(_!==void 0&&p){const[,f]=w.url.href.split("#");if(f===_){if(r.preventDefault(),_===""||_==="top"&&a.ownerDocument.getElementById("top")===null)scrollTo({top:0});else{const m=a.ownerDocument.getElementById(decodeURIComponent(_));m&&(m.scrollIntoView(),m.focus())}return}if(J=!0,Gt(k),t(o),!c.replace_state)return;J=!1}r.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await H({type:"link",url:o,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??o.href===location.href,event:r})}),j.addEventListener("submit",r=>{if(r.defaultPrevented)return;const a=HTMLFormElement.prototype.cloneNode.call(r.target),o=r.submitter;if(((o==null?void 0:o.formTarget)||a.target)==="_blank"||((o==null?void 0:o.formMethod)||a.method)!=="get")return;const l=new URL((o==null?void 0:o.hasAttribute("formaction"))&&(o==null?void 0:o.formAction)||a.action);if(Ut(l,U,!1))return;const c=r.target,u=wt(c);if(u.reload)return;r.preventDefault(),r.stopPropagation();const h=new FormData(c,o);l.search=new URLSearchParams(h).toString(),H({type:"form",url:l,keepfocus:u.keepfocus,noscroll:u.noscroll,replace_state:u.replace_state??l.href===location.href,event:r})}),addEventListener("popstate",async r=>{var a;if(!Vt){if((a=r.state)!=null&&a[M]){const o=r.state[M];if($={},o===k)return;const s=D[o],i=r.state[ve]??{},l=new URL(r.state[rn]??location.href),c=r.state[Q],u=w.url?Pt(location)===Pt(w.url):!1;if(c===L&&(Ue||u)){i!==x.state&&(x.state=i),t(l),D[k]=z(),s&&scrollTo(s.x,s.y),k=o;return}const _=o-k;await H({type:"popstate",url:l,popped:{state:i,scroll:s,delta:_},accept:()=>{k=o,L=c},block:()=>{history.go(-_)},nav_token:$,event:r})}else if(!J){const o=new URL(location.href);t(o),E.hash&&location.reload()}}}),addEventListener("hashchange",()=>{J&&(J=!1,history.replaceState({...history.state,[M]:++k,[Q]:L},"",location.href))});for(const r of document.querySelectorAll("link"))fn.has(r.rel)&&(r.href=r.href);addEventListener("pageshow",r=>{r.persisted&&N.navigating.set(Z.current=null)});function t(r){w.url=x.url=r,N.page.set(te(x)),N.page.notify()}}async function Rn(t,{status:e=200,error:n,node_ids:r,params:a,route:o,server_route:s,data:i,form:l}){Le=!0;const c=new URL(location.href);let u;({params:a={},route:o={id:null}}=await At(c,!1)||{}),u=Wt.find(({id:p})=>p===o.id);let h,_=!0;try{const p=r.map(async(m,d)=>{const g=i[d];return g!=null&&g.uses&&(g.uses=xn(g.uses)),Yt({loader:E.nodes[m],url:c,params:a,route:o,parent:async()=>{const b={};for(let R=0;R<d;R+=1)Object.assign(b,(await p[R]).data);return b},server_data_node:Xt(g)})}),f=await Promise.all(p);if(u){const m=u.layouts;for(let d=0;d<m.length;d++)m[d]||f.splice(d,0,void 0)}h=await Rt({url:c,params:a,branch:f,status:e,error:n,errors:u==null?void 0:u.errors,form:l,route:u??null})}catch(p){if(p instanceof Bt){await et(new URL(p.location,location.href));return}h=await Qt({status:Ft(p),error:await rt(p,{url:c,params:a,route:o}),url:c,route:o}),t.textContent="",_=!1}finally{}h.props.page&&(h.props.page.state={}),await je(h,t,_)}function xn(t){return{dependencies:new Set((t==null?void 0:t.dependencies)??[]),params:new Set((t==null?void 0:t.params)??[]),parent:!!(t!=null&&t.parent),route:!!(t!=null&&t.route),url:!!(t!=null&&t.url),search_params:new Set((t==null?void 0:t.search_params)??[])}}let Vt=!1;function Ln(t,e=!0){const n=document.querySelector("[autofocus]");if(n)n.focus();else{const r=Ne(t);if(r&&document.getElementById(r)){const{x:o,y:s}=z();setTimeout(()=>{const i=history.state;Vt=!0,location.replace(new URL(`#${r}`,location.href)),history.replaceState(i,"",t),e&&scrollTo(o,s),Vt=!1})}else{const o=document.body,s=o.getAttribute("tabindex");o.tabIndex=-1,o.focus({preventScroll:!0,focusVisible:!1}),s!==null?o.setAttribute("tabindex",s):o.removeAttribute("tabindex")}const a=getSelection();if(a&&a.type!=="None"){const o=[];for(let s=0;s<a.rangeCount;s+=1)o.push(a.getRangeAt(s));setTimeout(()=>{if(a.rangeCount===o.length){for(let s=0;s<a.rangeCount;s+=1){const i=o[s],l=a.getRangeAt(s);if(i.commonAncestorContainer!==l.commonAncestorContainer||i.startContainer!==l.startContainer||i.endContainer!==l.endContainer||i.startOffset!==l.startOffset||i.endOffset!==l.endOffset)return}a.removeAllRanges()}})}}}function Zt(t,e,n,r,a=null){var c,u;let o,s;const i=new Promise((h,_)=>{o=h,s=_});return i.catch(C),{navigation:{from:{params:t.params,route:{id:((c=t.route)==null?void 0:c.id)??null},url:t.url,scroll:z()},to:n&&{params:(e==null?void 0:e.params)??null,route:{id:((u=e==null?void 0:e.route)==null?void 0:u.id)??null},url:n,scroll:a},willUnload:!e,type:r,complete:i},fulfil:o,reject:s}}function te(t){return{data:t.data,error:t.error,form:t.form,params:t.params,route:t.route,state:t.state,status:t.status,url:t.url}}function Un(t){const e=new URL(t);return e.hash=decodeURIComponent(t.hash),e}function Ne(t){let e;if(E.hash){const[,,n]=t.hash.split("#",3);e=n??""}else e=t.hash.slice(1);return decodeURIComponent(e)}export{N as a,U as b,Nn as g,Pn as l,x as p,Cn as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{l as o,s as r}from"../chunks/DQCYUNtS.js";export{o as load_css,r as start};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunks/Bzak7iHL.js";import{at as e,bN as i,b9 as k,aq as c,b6 as v}from"../chunks/CGFL56WJ.js";import{d as f,a as m}from"../chunks/Bq4DTWK2.js";import{y as w}from"../chunks/85-Fh5Zp.js";import{i as K}from"../chunks/DCJ0QyYH.js";import{g as S,b as n}from"../chunks/DQCYUNtS.js";import{p as l}from"../chunks/8zg2gJwV.js";import{t as g,p as M,W as T}from"../chunks/CnD4hwxC.js";const j=!1,C=!1,O="never",N=Object.freeze(Object.defineProperty({__proto__:null,prerender:j,ssr:C,trailingSlash:O},Symbol.toStringTag,{value:"Module"}));function P(t){return t instanceof MouseEvent?t.defaultPrevented||t.button!==0||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey:!1}function R(){const t=i(()=>M(l.url.pathname.slice(n.length)||"/"));return{get view(){return e(t).view},get collection(){return e(t).collection},get subpage(){return e(t).subpage},get path(){return l.url.pathname},href:r=>n+g(r),go:(r,a,s)=>{P(a)||(a==null||a.preventDefault(),S(n+g(r),{replaceState:s??!1}))}}}function A(t,r){k(r,!0);const a=R(),s=i(()=>l.url.pathname.slice(n.length)||"/"),d=i(()=>e(s)==="/graph"||e(s)==="/shadow-dom-spike"||e(s)==="/redwire-ws-spike");var p=f(),h=c(p);{var b=o=>{var u=f(),y=c(u);w(y,()=>r.children),m(o,u)},_=o=>{T(o,{get router(){return a}})};K(h,o=>{e(d)?o(b):o(_,-1)})}m(t,p),v()}export{A as component,N as universal};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"../chunks/Bzak7iHL.js";import{b9 as b,aq as u,bw as v,bG as c,b6 as g,a6 as s,bg as o}from"../chunks/CGFL56WJ.js";import{a as l,j as _,t as p}from"../chunks/Bq4DTWK2.js";import{p as m}from"../chunks/8zg2gJwV.js";var x=_("<h1> </h1> <p> </p>",1);function E(i,f){b(f,!0);var t=x(),r=u(t),h=s(r,!0);o(r);var a=v(r,2),n=s(a,!0);o(a),c(()=>{var e;p(h,m.status),p(n,(e=m.error)==null?void 0:e.message)}),l(i,t),g()}export{E as component};
|