@krate/runtime 0.5.0-beta.1 → 0.5.0-beta.3

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.
Files changed (134) hide show
  1. package/dist/actions.js +2 -1
  2. package/dist/assets-static.d.ts +5 -0
  3. package/dist/assets-static.js +31 -0
  4. package/dist/boundary.d.ts +12 -0
  5. package/dist/boundary.js +53 -13
  6. package/dist/cache-adapter.d.ts +113 -0
  7. package/dist/cache-adapter.js +217 -0
  8. package/dist/cache-adapter.test.d.ts +1 -0
  9. package/dist/cache-adapter.test.js +244 -0
  10. package/dist/cache-redis.d.ts +27 -0
  11. package/dist/cache-redis.js +110 -0
  12. package/dist/cache-scope.d.ts +25 -9
  13. package/dist/cache-scope.js +60 -12
  14. package/dist/cache.d.ts +1 -0
  15. package/dist/cache.js +3 -3
  16. package/dist/class-component.js +6 -0
  17. package/dist/class-component.test.js +53 -2
  18. package/dist/dev-overlay.js +10 -10
  19. package/dist/dom.d.ts +8 -0
  20. package/dist/dom.js +28 -0
  21. package/dist/effect-errors.test.d.ts +1 -0
  22. package/dist/effect-errors.test.js +163 -0
  23. package/dist/effects.d.ts +8 -0
  24. package/dist/effects.js +13 -0
  25. package/dist/error-overlay.js +4 -4
  26. package/dist/handler-html.d.ts +63 -0
  27. package/dist/handler-html.js +285 -0
  28. package/dist/handler-html.test.d.ts +1 -0
  29. package/dist/handler-html.test.js +256 -0
  30. package/dist/handler-routing.d.ts +83 -0
  31. package/dist/handler-routing.js +579 -0
  32. package/dist/handler-routing.test.d.ts +1 -0
  33. package/dist/handler-routing.test.js +99 -0
  34. package/dist/handler-segments.d.ts +43 -0
  35. package/dist/handler-segments.js +115 -0
  36. package/dist/handler-segments.test.d.ts +1 -0
  37. package/dist/handler-segments.test.js +217 -0
  38. package/dist/head-tags.d.ts +51 -0
  39. package/dist/head-tags.js +329 -0
  40. package/dist/head-tags.test.d.ts +1 -0
  41. package/dist/head-tags.test.js +131 -0
  42. package/dist/highlight-bind.d.ts +42 -0
  43. package/dist/highlight-bind.js +176 -0
  44. package/dist/highlight-bind.test.d.ts +1 -0
  45. package/dist/highlight-bind.test.js +124 -0
  46. package/dist/highlight.d.ts +93 -0
  47. package/dist/highlight.js +426 -0
  48. package/dist/highlight.test.d.ts +1 -0
  49. package/dist/highlight.test.js +56 -0
  50. package/dist/hints.d.ts +19 -0
  51. package/dist/hints.js +97 -0
  52. package/dist/index.d.ts +3 -0
  53. package/dist/index.js +2 -0
  54. package/dist/jsx-types.d.ts +11 -0
  55. package/dist/krate-core.js +1 -1
  56. package/dist/krate-dev.js +10 -10
  57. package/dist/krate-f-actions.js +1 -1
  58. package/dist/krate-f-classes.js +5 -5
  59. package/dist/krate-f-highlight.js +2 -0
  60. package/dist/krate-f-list.js +1 -1
  61. package/dist/krate-f-navigation.js +2 -0
  62. package/dist/krate-f-router.js +1 -1
  63. package/dist/krate-features.json +254 -0
  64. package/dist/krate-hydrate-lite.js +5 -5
  65. package/dist/krate-hydrate.js +5 -5
  66. package/dist/krate-runtime.js +5 -5
  67. package/dist/list.js +4 -2
  68. package/dist/metadata-routes.d.ts +75 -0
  69. package/dist/metadata-routes.js +76 -0
  70. package/dist/metadata.d.ts +222 -0
  71. package/dist/metadata.js +452 -0
  72. package/dist/metadata.test.d.ts +1 -0
  73. package/dist/metadata.test.js +167 -0
  74. package/dist/navigation-server.d.ts +27 -0
  75. package/dist/navigation-server.js +90 -0
  76. package/dist/navigation.d.ts +37 -0
  77. package/dist/navigation.js +195 -0
  78. package/dist/navigation.test.d.ts +1 -0
  79. package/dist/navigation.test.js +130 -0
  80. package/dist/node-server.d.ts +22 -0
  81. package/dist/node-server.js +436 -0
  82. package/dist/node-server.test.d.ts +1 -0
  83. package/dist/node-server.test.js +492 -0
  84. package/dist/og-files.d.ts +2 -0
  85. package/dist/og-files.js +19 -0
  86. package/dist/og.d.ts +56 -0
  87. package/dist/og.js +156 -0
  88. package/dist/react.d.ts +47 -0
  89. package/dist/react.js +59 -1
  90. package/dist/react19.test.d.ts +1 -0
  91. package/dist/react19.test.js +176 -0
  92. package/dist/request-context.d.ts +23 -0
  93. package/dist/request-context.js +45 -0
  94. package/dist/resp.d.ts +55 -0
  95. package/dist/resp.js +239 -0
  96. package/dist/router-layout.test.js +70 -0
  97. package/dist/router-nav.test.js +27 -0
  98. package/dist/router.js +59 -4
  99. package/dist/segmented-lru.d.ts +19 -0
  100. package/dist/segmented-lru.js +87 -0
  101. package/dist/server-async.test.js +23 -1
  102. package/dist/server-handler.d.ts +165 -0
  103. package/dist/server-handler.js +1832 -0
  104. package/dist/server-handler.test.d.ts +1 -0
  105. package/dist/server-handler.test.js +535 -0
  106. package/dist/server-highlight.test.d.ts +1 -0
  107. package/dist/server-highlight.test.js +32 -0
  108. package/dist/server-renderer.js +146 -788
  109. package/dist/server-renderer.test.d.ts +1 -0
  110. package/dist/server-renderer.test.js +266 -0
  111. package/dist/server.d.ts +12 -1
  112. package/dist/server.js +42 -6
  113. package/dist/sha256.d.ts +1 -0
  114. package/dist/sha256.js +66 -0
  115. package/dist/sha256.test.d.ts +1 -0
  116. package/dist/sha256.test.js +13 -0
  117. package/dist/shared-isr.d.ts +31 -0
  118. package/dist/shared-isr.js +142 -0
  119. package/dist/signal.js +63 -8
  120. package/dist/ssr-core-behavior.test.d.ts +1 -0
  121. package/dist/ssr-core-behavior.test.js +620 -0
  122. package/dist/ssr-core.d.ts +175 -0
  123. package/dist/ssr-core.js +940 -0
  124. package/dist/ssr-core.test.d.ts +1 -0
  125. package/dist/ssr-core.test.js +324 -0
  126. package/dist/static-memory.d.ts +3 -0
  127. package/dist/static-memory.js +47 -0
  128. package/dist/static-memory.test.d.ts +1 -0
  129. package/dist/static-memory.test.js +26 -0
  130. package/dist/test-redis.d.ts +12 -0
  131. package/dist/test-redis.js +131 -0
  132. package/dist/use-id.d.ts +8 -0
  133. package/dist/use-id.js +40 -0
  134. package/package.json +29 -1
@@ -1,8 +1,8 @@
1
- var __krate_exports=(()=>{var T=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var ge=Object.prototype.hasOwnProperty;var xe=(t,e)=>{for(var n in e)T(t,n,{get:e[n],enumerable:!0})},ve=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Oe(e))!ge.call(t,o)&&o!==n&&T(t,o,{get:()=>e[o],enumerable:!(r=ke(e,o))||r.enumerable});return t};var Se=t=>ve(T({},"__esModule",{value:!0}),t);var Le={};xe(Le,{__krateClass:()=>me,__krateClassError:()=>Be,__krateCondPost:()=>Ie,__krateCondPre:()=>Pe,__krateOnError:()=>Ue,__krateOwn:()=>je,__krateOwner:()=>De,componentStack:()=>ce,createOwner:()=>be,getOwner:()=>I,handleError:()=>k,inCommitPhaseError:()=>K,mountClassElement:()=>He,mountOwner:()=>Q,onOwnerCleanup:()=>U,remountChildren:()=>_,runWithOwner:()=>b,setBoundary:()=>z,unmountChildren:()=>V,unmountOwner:()=>F});var G=window.createEffect;var H=window.createSignal;var Z=window.krateGetOwner;var $=window.krateOnSettle;var ee=window.krateRenderPhase,B=window.krateRequestFlush;var te=window.krateSetOwner;var ne=window.onCleanup;var re=window.setOwnerHooks,h=window.untrack;var oe=window.krateForgetOwner;var se=window.krateOnHookError,ie=window.krateOnLayoutCommit;var O=null,ye=0,g=new Map,R=new Map,E=new Map,L=!1,D=0,P=[];function ae(t,e,n,r,o,s,c){let a={id:t,name:e,parent:n,creator:r,children:[],order:ye++,state:"dormant",boundary:null,blocked:!1,inError:!1,cond:o,branch:s,setup:c,data:{},cleanups:[]};return n&&n.children.push(a),a}function I(){return O}function be(t,e=O){let n=ae("",t,e||null,e||null,"","",null);return n.state=e&&e.state!=="mounted"?"dormant":"mounted",e||pe(),n}function b(t,e){if(!t)return e();let n=t;if(n.state!=="mounted")return;let r=O;O=n;try{return h(e)}catch(o){k(o,n);return}finally{O=r}}function U(t,e){let n=t;if(n.state!=="mounted"){Re(e,n);return}n.cleanups.push(e)}function z(t,e){t.boundary=e}function ce(t){let e="";for(let n=t;n;n=n.parent)e+=`
2
- at `+n.name;return e}function k(t,e=O){if(!e)throw t;let n={componentStack:ce(e)};for(let r=e.parent;r;r=r.parent){if(r.state!=="mounted"||!r.boundary)continue;let o=!1;try{o=r.boundary(t,n,e)}catch(s){k(s,r);return}if(o)return}Ce(t,n,e)}function Ce(t,e,n){let r=globalThis;try{let o=String(t?.stack||t?.message||t);Array.isArray(r.__krateErrs)&&r.__krateErrs.push(o)}catch{}typeof console<"u"&&(console.error(t),console.error("The above error occurred in the <"+n.name+"> component:"+e.componentStack+`
1
+ var __krate_exports=(()=>{var T=Object.defineProperty;var ke=Object.getOwnPropertyDescriptor;var Oe=Object.getOwnPropertyNames;var xe=Object.prototype.hasOwnProperty;var ge=(t,e)=>{for(var n in e)T(t,n,{get:e[n],enumerable:!0})},ve=(t,e,n,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let o of Oe(e))!xe.call(t,o)&&o!==n&&T(t,o,{get:()=>e[o],enumerable:!(r=ke(e,o))||r.enumerable});return t};var Se=t=>ve(T({},"__esModule",{value:!0}),t);var ze={};ge(ze,{__krateClass:()=>me,__krateClassError:()=>Ne,__krateCondPost:()=>Fe,__krateCondPre:()=>Ue,__krateOnError:()=>_e,__krateOwn:()=>Pe,__krateOwner:()=>Ie,componentStack:()=>de,createOwner:()=>be,getOwner:()=>I,handleError:()=>O,inCommitPhaseError:()=>V,krateScopeFailed:()=>je,mountClassElement:()=>Le,mountOwner:()=>z,onOwnerCleanup:()=>U,remountChildren:()=>_,runWithOwner:()=>j,setBoundary:()=>N,unmountChildren:()=>Q,unmountOwner:()=>F});var G=window.createEffect;var H=window.createSignal;var Y=window.krateCurrentScope;var Z=window.krateGetOwner;var $=window.krateOnDispose,ee=window.krateOnSettle;var te=window.krateRenderPhase,B=window.krateRequestFlush;var ne=window.krateScopeOfId,re=window.krateSetOwner;var oe=window.setOwnerHooks,h=window.untrack;var se=window.krateForgetOwner;var ie=window.krateOnHookError,ae=window.krateOnLayoutCommit;var x=null,ye=0,m=new Map,S=new Map,b=new Map,P=0,v=[];function ce(t,e,n,r,o,s,c){let a={id:t,name:e,parent:n,creator:r,children:[],order:ye++,state:"dormant",boundary:null,blocked:!1,inError:!1,cond:o,branch:s,setup:c,data:{},scope:Y(),cleanups:[]};return n&&n.children.push(a),a}function I(){return x}function be(t,e=x){let n=ce("",t,e||null,e||null,"","",null);return n.state=e&&e.state!=="mounted"?"dormant":"mounted",n}function j(t,e){if(!t)return e();let n=t;if(n.state!=="mounted")return;let r=x;x=n;try{return h(e)}catch(o){O(o,n);return}finally{x=r}}function U(t,e){let n=t;if(n.state!=="mounted"){Ee(e,n);return}n.cleanups.push(e)}function N(t,e){t.boundary=e}function de(t){let e="";for(let n=t;n;n=n.parent)e+=`
2
+ at `+n.name;return e}function O(t,e=x){if(!e)throw t;let n={componentStack:de(e)};for(let r=e.parent;r;r=r.parent){if(r.state!=="mounted"||!r.boundary)continue;let o=!1;try{o=r.boundary(t,n,e)}catch(s){O(s,r);return}if(o)return}Ce(t,n,e)}function Ce(t,e,n){let r=globalThis;try{let o=String(t?.stack||t?.message||t);Array.isArray(r.__krateErrs)&&r.__krateErrs.push(o)}catch{}typeof console<"u"&&(console.error(t),console.error("The above error occurred in the <"+n.name+"> component:"+e.componentStack+`
3
3
 
4
- Add an error boundary (a class component with static getDerivedStateFromError) to recover from it.`)),n.blocked=!0,F(n)}function Re(t,e){try{t()}catch(n){e&&e.parent?k(n,e):de(n)}}function de(t){typeof console<"u"&&console.error(t)}function F(t){x(t,"dormant")}function Q(t){let e=t;e.state==="dormant"&&(e.blocked=!1,S(e)&&y(e))}function V(t){for(let e of t.children)x(e,"dormant")}function _(t){if(t.state==="mounted")for(let e of t.children.slice())e.blocked=!1,e.state==="dormant"&&S(e)&&y(e)}function x(t,e){if(t.state==="mounted"){t.state=e;let n=[];for(let r of t.cleanups.splice(0))try{r()}catch(o){n.push(o)}if(t.id)try{oe(t.id)}catch(r){n.push(r)}for(let r of t.children)x(r,e);for(let r of n)t.parent?k(r,t):de(r);return}if(e==="disposed"&&t.state!=="disposed"){t.state="disposed";for(let n of t.children)x(n,e)}}function le(t){if(!t.cond)return!0;let e=R.get(t.cond);return e===void 0||e===t.branch}function S(t){return t.blocked||!le(t)?!1:!t.parent||t.parent.state==="mounted"}function y(t){if(t.state!=="dormant")return;t.state="mounted",D++;let e=Z();try{t.setup&&b(t,t.setup)}finally{te(e),D--}if(t.state==="mounted")for(let n of t.children.slice())n.state==="dormant"&&S(n)&&y(n);if(D===0&&P.length>0){let n=P.splice(0).sort((r,o)=>r.order-o.order);for(let r of n)r.state==="dormant"&&S(r)&&y(r)}}function pe(){L||(L=!0,ne(Ee))}function Ee(){let t=[];for(let e of g.values())e.parent||t.push(e);for(let e of t)x(e,"disposed");g.clear(),R.clear(),E.clear(),P.length=0,L=!1}function je(t,e,n){let r=e||{},o=g.get(t);o&&x(o,"disposed");let s=r.p&&g.get(r.p)||null,c=r.k&&g.get(r.k)||null,a=ae(t,r.n||t,s,c,r.c||"",r.b||"",n);if(g.set(t,a),pe(),a.cond){let p=E.get(a.cond);p||(p=[],E.set(a.cond,p)),p.push(a)}s&&s.inError&&le(a)&&(a.blocked=!0),S(a)&&y(a)}function De(t){return g.get(t)||null}function Pe(t,e){let n=R.get(t);if(n===void 0||n===(e?"c":"a"))return;let o=E.get(t);if(o)for(let s of o)s.branch===n&&s.state==="mounted"&&x(s,"dormant")}function Ie(t,e){let n=e?"c":"a",r=R.get(t);if(R.set(t,n),r===n)return;let o=E.get(t);if(o)for(let s of o)s.branch!==n||s.state!=="dormant"||!S(s)||(D>0?P.push(s):y(s))}function Ue(t,e){return!O||e&&e.isConnected===!1?!1:(k(t,O),!0)}se((t,e)=>{let n=e?g.get(e):void 0;if(!n)return!1;if(n.state==="mounted"){N++;try{k(t,n)}finally{N--}}return!0});var N=0;function K(){return N>0}re({current:()=>O,run:(t,e)=>{b(t,e)},cleanup:(t,e)=>U(t,e),error:(t,e)=>{let n=t;return n.state==="mounted"&&k(e,n),!0}});var ue=window.krateSetRef;var Fe=0,fe=Symbol.for("krate.class.rawProps"),X=class{constructor(e,n,r,o){this.seq=Fe++;this.rawGetters=[];this.queue=[];this.forced=!1;this.parentRender=!1;this.mounted=!1;this.disposed=!1;this.catching=!1;this.detachRef=null;this.errorCommitPending=!1;this.spec=o||{},this.owner=I(),this.raw=e&&typeof e=="object"?e:{},this.getState=n,this.setStateSignal=r;let c=this.raw[fe];if(!c){c=[];for(let i of Object.keys(this.raw)){let u=Object.getOwnPropertyDescriptor(this.raw,i);if(u&&u.get){let m=u.get,q=this.raw;c.push([i,()=>m.call(q)])}}try{Object.defineProperty(this.raw,fe,{value:c,enumerable:!1,configurable:!0})}catch{}}this.rawGetters.push(...c),this.props=this.readProps(),this.key=this.readKey(),this.state=h(n)||{},this.context=this.readContext();let[a,p]=H(this.props);this.setRendered=p,this.gateProps(a);let d=this,f={get props(){return d.props},get state(){return d.state},set state(i){d.state=i},get context(){return d.context},setState(i,u){d.enqueue({partial:i,callback:u})},forceUpdate(i){d.forced=!0,d.enqueue({partial:null,callback:i})}};if(this.inst=f,this.owner&&(this.owner.data.classController=this,U(this.owner,()=>this.unmount()),(this.spec.getDerivedStateFromError||this.spec.componentDidCatch)&&z(this.owner,(i,u)=>this.catchError(i,u))),this.spec.setContext&&this.spec.setContext(this.context),this.rawGetters.length>0||this.spec.context){let i=!0;G(()=>{for(let[,u]of this.rawGetters)u();if(this.trackContext(),i){i=!1;return}this.disposed||(v.add(this),we())})}C(this,()=>{let i=this.spec.expose?h(this.spec.expose):null;if(i)for(let m of Object.keys(i))m in this.inst||(this.inst[m]=i[m]);this.mounted=!0,this.spec.componentDidMount&&this.spec.componentDidMount.call(this.inst);let u=h(()=>this.raw.ref);u&&(this.detachRef=ue(u,this.inst))});let w=this.spec.buildError;if(w&&this.spec.componentDidCatch){let i=new Error(w.message||"Error");w.name&&(i.name=w.name),this.owner&&(this.owner.inError=!0),C(this,()=>{this.spec.componentDidCatch.call(this.inst,i,{componentStack:`
5
- at `+(this.spec.name||"Component")+" (build)"})})}else w&&this.owner&&(this.owner.inError=!0)}readProps(){let e={};h(()=>{for(let r of Object.keys(this.raw)){if(r.startsWith("__krate")||r==="ref"||r==="key")continue;let o=this.rawGetters.find(s=>s[0]===r);e[r]=o?o[1]():this.raw[r]}});let n=this.spec.defaultProps;if(n)for(let r of Object.keys(n))e[r]===void 0&&(e[r]=n[r]);return e}readContext(){return h(()=>this.trackContext())}trackContext(){let e=this.spec.context;if(!e)return;let n=e();if(typeof n=="function"){for(let r of Object.keys(this.raw))if(r.startsWith("__krate_ctx_")&&this.raw[r]===n)return n()}return n}gateProps(e){let n=new Set;for(let[o]of this.rawGetters)n.add(o);let r=this.spec.defaultProps;if(r)for(let o of Object.keys(r))this.raw[o]===void 0&&n.add(o);for(let o of n)if(!(o.startsWith("__krate")||o==="ref"||o==="key"))try{Object.defineProperty(this.raw,o,{get:()=>e()[o],enumerable:!0,configurable:!0})}catch{}}enqueue(e){this.disposed||(this.queue.push(e),v.add(this),we())}markParentRender(){this.disposed||!this.mounted||(this.parentRender=!0,v.add(this))}performUpdate(){if(!(this.disposed||this.owner&&this.owner.state!=="mounted"))if(this.owner)b(this.owner,()=>this.update());else try{this.update()}catch(e){console.error(e)}}readKey(){let e=this.rawGetters.find(n=>n[0]==="__krate_key");return h(()=>e?e[1]():this.raw.__krate_key)}update(){let e=this.spec,n=this.inst;if(!Object.is(this.readKey(),this.key)&&this.owner){let l=this.owner;F(l),l.inError=!1,Q(l),_(l);return}let r=this.readProps(),o=this.readContext(),s=!J(r,this.props)||o!==this.context,c=this.queue;this.queue=[];let a=this.forced;this.forced=!1;let p=this.parentRender;if(this.parentRender=!1,c.length===0&&!a&&!s&&!p)return;let d=!e.getDerivedStateFromProps&&!e.getSnapshotBeforeUpdate;d&&(s||p)&&e.componentWillReceiveProps&&(e.componentWillReceiveProps.call(n,r,o),c.push(...this.queue),this.queue=[]);let f=this.props,w=this.state,i=w,u=[];for(let l of c){let M=typeof l.partial=="function"?l.partial.call(n,i,r):l.partial;M!=null&&typeof M=="object"&&(i={...i,...M}),typeof l.callback=="function"&&u.push(l.callback)}if(e.getDerivedStateFromProps){let l=e.getDerivedStateFromProps(r,i);l!=null&&(i={...i,...l})}let m=!0;if(a||(e.shouldComponentUpdate?m=!!e.shouldComponentUpdate.call(n,r,i,o):e.pure&&(m=!J(f,r)||!J(w,i))),m&&d&&e.componentWillUpdate&&e.componentWillUpdate.call(n,r,i,o),this.props=r,this.state=i,this.context=o,!m){for(let l of u)C(this,()=>l.call(n));return}let q=e.getSnapshotBeforeUpdate?e.getSnapshotBeforeUpdate.call(n,f,w):void 0;this.setRendered(r),e.setContext&&e.setContext(o),this.setStateSignal(a&&i===w?{...i}:i),a&&i===w&&(this.state=h(this.getState)),this.owner&&this.owner.inError&&!this.errorCommitPending&&this.owner&&(this.owner.inError=!1,j.add(this.owner)),C(this,()=>{e.componentDidUpdate&&e.componentDidUpdate.call(n,f,w,q)});for(let l of u)C(this,()=>l.call(n));this.cascade()}cascade(){let e=this.owner;if(!e)return;let n=o=>{for(let s=o?o.creator:null;s;s=s.creator){if(s===e)return!0;if(s.data.classController)return!1}return!1},r=o=>{for(let s of o.children){if(s.state!=="mounted")continue;let c=s.data.classController;c&&n(s)&&c.markParentRender(),r(s)}};r(e)}catchError(e,n){let r=this.spec,o=this.owner;if(this.disposed||!o||o.state!=="mounted")return!1;if(this.catching)return!0;this.catching=!0;try{typeof console<"u"&&(console.error(e),console.error("The above error occurred in the <"+(n.componentStack.match(/at (\S+)/)?.[1]||"Unknown")+"> component:"+n.componentStack+`
4
+ Add an error boundary (a class component with static getDerivedStateFromError) to recover from it.`)),n.blocked=!0,F(n)}function Ee(t,e){try{t()}catch(n){e&&e.parent?O(n,e):le(n)}}function le(t){typeof console<"u"&&console.error(t)}function F(t){g(t,"dormant")}function je(t){for(let e of m.values())if(e.scope===t&&e.inError)return!0;return!1}function z(t){let e=t;e.state==="dormant"&&(e.blocked=!1,C(e)&&E(e))}function Q(t){for(let e of t.children)g(e,"dormant")}function _(t){if(t.state==="mounted")for(let e of t.children.slice())e.blocked=!1,e.state==="dormant"&&C(e)&&E(e)}function g(t,e){if(t.state==="mounted"){t.state=e;let n=[];for(let r of t.cleanups.splice(0))try{r()}catch(o){n.push(o)}if(t.id)try{se(t.id)}catch(r){n.push(r)}for(let r of t.children)g(r,e);for(let r of n)t.parent?O(r,t):le(r);return}if(e==="disposed"&&t.state!=="disposed"){t.state="disposed";for(let n of t.children)g(n,e)}}function pe(t){if(!t.cond)return!0;let e=S.get(t.cond);return e===void 0||e===t.branch}function C(t){return t.blocked||!pe(t)?!1:!t.parent||t.parent.state==="mounted"}function E(t){if(t.state!=="dormant")return;t.state="mounted",P++;let e=Z();try{t.setup&&j(t,t.setup)}finally{re(e),P--}if(t.state==="mounted")for(let n of t.children.slice())n.state==="dormant"&&C(n)&&E(n);if(P===0&&v.length>0){let n=v.splice(0).sort((r,o)=>r.order-o.order);for(let r of n)r.state==="dormant"&&C(r)&&E(r)}}$(t=>{t===null?Re():De(t)});function Re(){let t=[];for(let e of m.values())e.parent||t.push(e);for(let e of t)g(e,"disposed");m.clear(),S.clear(),b.clear(),v.length=0}function De(t){let e=[];for(let n of m.values())t(n.scope)&&e.push(n);for(let n of e)n.state!=="disposed"&&g(n,"disposed");for(let n of e){m.delete(n.id);let r=n.parent;if(r&&!t(r.scope)){let o=r.children.indexOf(n);o>=0&&r.children.splice(o,1)}}for(let n of Array.from(S.keys()))t(ne(n))&&(S.delete(n),b.delete(n));for(let n=v.length-1;n>=0;n--)v[n].state==="disposed"&&v.splice(n,1)}function Pe(t,e,n){let r=e||{},o=m.get(t);o&&g(o,"disposed");let s=r.p&&m.get(r.p)||null,c=r.k&&m.get(r.k)||null,a=ce(t,r.n||t,s,c,r.c||"",r.b||"",n);if(m.set(t,a),a.cond){let p=b.get(a.cond);p||(p=[],b.set(a.cond,p)),p.push(a)}s&&s.inError&&pe(a)&&(a.blocked=!0),C(a)&&E(a)}function Ie(t){return m.get(t)||null}function Ue(t,e){let n=S.get(t);if(n===void 0||n===(e?"c":"a"))return;let o=b.get(t);if(o)for(let s of o)s.branch===n&&s.state==="mounted"&&g(s,"dormant")}function Fe(t,e){let n=e?"c":"a",r=S.get(t);if(S.set(t,n),r===n)return;let o=b.get(t);if(o)for(let s of o)s.branch!==n||s.state!=="dormant"||!C(s)||(P>0?v.push(s):E(s))}function _e(t,e){return!x||e&&e.isConnected===!1?!1:(O(t,x),!0)}ie((t,e)=>{let n=e?m.get(e):void 0;if(!n)return!1;if(n.state==="mounted"){L++;try{O(t,n)}finally{L--}}return!0});var L=0;function V(){return L>0}oe({current:()=>x,run:(t,e)=>{j(t,e)},cleanup:(t,e)=>U(t,e),error:(t,e)=>{let n=t;return n.state==="mounted"&&O(e,n),!0}});var ue=window.krateSetRef;var Ae=0,fe=Symbol.for("krate.class.rawProps"),J=class{constructor(e,n,r,o){this.seq=Ae++;this.rawGetters=[];this.queue=[];this.forced=!1;this.parentRender=!1;this.mounted=!1;this.disposed=!1;this.catching=!1;this.detachRef=null;this.errorCommitPending=!1;this.spec=o||{},this.owner=I(),this.raw=e&&typeof e=="object"?e:{},this.getState=n,this.setStateSignal=r;let c=this.raw[fe];if(!c){c=[];for(let i of Object.keys(this.raw)){let u=Object.getOwnPropertyDescriptor(this.raw,i);if(u&&u.get){let k=u.get,q=this.raw;c.push([i,()=>k.call(q)])}}try{Object.defineProperty(this.raw,fe,{value:c,enumerable:!1,configurable:!0})}catch{}}this.rawGetters.push(...c),this.props=this.readProps(),this.key=this.readKey(),this.state=h(n)||{},this.context=this.readContext();let[a,p]=H(this.props);this.setRendered=p,this.gateProps(a);let d=this,f={get props(){return d.props},get state(){return d.state},set state(i){d.state=i},get context(){return d.context},setState(i,u){d.enqueue({partial:i,callback:u})},forceUpdate(i){d.forced=!0,d.enqueue({partial:null,callback:i})}};if(this.inst=f,this.owner&&(this.owner.data.classController=this,U(this.owner,()=>this.unmount()),(this.spec.getDerivedStateFromError||this.spec.componentDidCatch)&&N(this.owner,(i,u)=>this.catchError(i,u))),this.spec.setContext&&this.spec.setContext(this.context),this.rawGetters.length>0||this.spec.context){let i=!0;G(()=>{for(let[,u]of this.rawGetters)u();if(this.trackContext(),i){i=!1;return}this.disposed||(y.add(this),we())})}R(this,()=>{let i=this.spec.expose?h(this.spec.expose):null;if(i)for(let k of Object.keys(i))k in this.inst||(this.inst[k]=i[k]);this.mounted=!0,this.spec.componentDidMount&&this.spec.componentDidMount.call(this.inst);let u=h(()=>this.raw.ref);u&&(this.detachRef=ue(u,this.inst))});let w=this.spec.buildError;if(w&&this.spec.componentDidCatch){let i=new Error(w.message||"Error");w.name&&(i.name=w.name),this.owner&&(this.owner.inError=!0),R(this,()=>{this.spec.componentDidCatch.call(this.inst,i,{componentStack:`
5
+ at `+(this.spec.name||"Component")+" (build)"})})}else w&&this.owner&&(this.owner.inError=!0)}readProps(){let e={};h(()=>{for(let r of Object.keys(this.raw)){if(r.startsWith("__krate")||r==="ref"||r==="key")continue;let o=this.rawGetters.find(s=>s[0]===r);e[r]=o?o[1]():this.raw[r]}});let n=this.spec.defaultProps;if(n)for(let r of Object.keys(n))e[r]===void 0&&(e[r]=n[r]);return e}readContext(){return h(()=>this.trackContext())}trackContext(){let e=this.spec.context;if(!e)return;let n=e();if(typeof n=="function"){for(let r of Object.keys(this.raw))if(r.startsWith("__krate_ctx_")&&this.raw[r]===n)return n()}return n}gateProps(e){let n=new Set;for(let[o]of this.rawGetters)n.add(o);let r=this.spec.defaultProps;if(r)for(let o of Object.keys(r))this.raw[o]===void 0&&n.add(o);for(let o of n)if(!(o.startsWith("__krate")||o==="ref"||o==="key"))try{Object.defineProperty(this.raw,o,{get:()=>e()[o],enumerable:!0,configurable:!0})}catch{}}enqueue(e){this.disposed||(this.queue.push(e),y.add(this),we())}markParentRender(){this.disposed||!this.mounted||(this.parentRender=!0,y.add(this))}performUpdate(){if(!(this.disposed||this.owner&&this.owner.state!=="mounted"))if(this.owner)j(this.owner,()=>this.update());else try{this.update()}catch(e){console.error(e)}}readKey(){let e=this.rawGetters.find(n=>n[0]==="__krate_key");return h(()=>e?e[1]():this.raw.__krate_key)}update(){let e=this.spec,n=this.inst;if(!Object.is(this.readKey(),this.key)&&this.owner){let l=this.owner;F(l),l.inError=!1,z(l),_(l);return}let r=this.readProps(),o=this.readContext(),s=!K(r,this.props)||o!==this.context,c=this.queue;this.queue=[];let a=this.forced;this.forced=!1;let p=this.parentRender;if(this.parentRender=!1,c.length===0&&!a&&!s&&!p)return;let d=!e.getDerivedStateFromProps&&!e.getSnapshotBeforeUpdate;d&&(s||p)&&e.componentWillReceiveProps&&(e.componentWillReceiveProps.call(n,r,o),c.push(...this.queue),this.queue=[]);let f=this.props,w=this.state,i=w,u=[];for(let l of c){let M=typeof l.partial=="function"?l.partial.call(n,i,r):l.partial;M!=null&&typeof M=="object"&&(i={...i,...M}),typeof l.callback=="function"&&u.push(l.callback)}if(e.getDerivedStateFromProps){let l=e.getDerivedStateFromProps(r,i);l!=null&&(i={...i,...l})}let k=!0;if(a||(e.shouldComponentUpdate?k=!!e.shouldComponentUpdate.call(n,r,i,o):e.pure&&(k=!K(f,r)||!K(w,i))),k&&d&&e.componentWillUpdate&&e.componentWillUpdate.call(n,r,i,o),this.props=r,this.state=i,this.context=o,!k){for(let l of u)R(this,()=>l.call(n));return}let q=e.getSnapshotBeforeUpdate?e.getSnapshotBeforeUpdate.call(n,f,w):void 0;this.setRendered(r),e.setContext&&e.setContext(o),this.setStateSignal(a&&i===w?{...i}:i),a&&i===w&&(this.state=h(this.getState)),this.owner&&this.owner.inError&&!this.errorCommitPending&&this.owner&&(this.owner.inError=!1,D.add(this.owner)),R(this,()=>{e.componentDidUpdate&&e.componentDidUpdate.call(n,f,w,q)});for(let l of u)R(this,()=>l.call(n));this.cascade()}cascade(){let e=this.owner;if(!e)return;let n=o=>{for(let s=o?o.creator:null;s;s=s.creator){if(s===e)return!0;if(s.data.classController)return!1}return!1},r=o=>{for(let s of o.children){if(s.state!=="mounted")continue;let c=s.data.classController;c&&n(s)&&c.markParentRender(),r(s)}};r(e)}catchError(e,n){let r=this.spec,o=this.owner;if(this.disposed||!o||o.state!=="mounted")return!1;if(this.catching)return!0;if(o.inError)return!1;this.catching=!0;try{typeof console<"u"&&(console.error(e),console.error("The above error occurred in the <"+(n.componentStack.match(/at (\S+)/)?.[1]||"Unknown")+"> component:"+n.componentStack+`
6
6
 
7
- React will try to recreate this component tree from scratch using the error boundary you provided, `+(r.name||"Component")+".")),o.inError=!0;let s=o.children.filter(f=>f.state==="mounted");V(o);for(let f of s)f.blocked=!0;let c=this.state;if(r.getDerivedStateFromError){this.mounted&&!Y&&!K()&&r.getDerivedStateFromError(e);let f=r.getDerivedStateFromError(e);f!=null&&(c={...c,...f})}else typeof console<"u"&&console.error((r.name||"Component")+": Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.");let a=this.props,p=this.state,d=this.mounted;this.state=c,this.errorCommitPending=!0,this.setStateSignal(c),C(this,()=>{this.errorCommitPending=!1,d&&c!==p&&r.componentDidUpdate&&r.componentDidUpdate.call(this.inst,a,p,void 0),r.componentDidCatch&&r.componentDidCatch.call(this.inst,e,n)})}finally{this.catching=!1}return!0}unmount(){if(this.disposed)return;this.disposed=!0,v.delete(this);let e=this.detachRef;this.detachRef=null,e&&e(),this.mounted&&this.spec.componentWillUnmount&&this.spec.componentWillUnmount.call(this.inst),this.mounted=!1}runLifecycle(e){if(!this.disposed)if(this.owner)b(this.owner,e);else try{e()}catch(n){console.error(n)}}};function J(t,e){if(t===e)return!0;if(!t||!e)return!1;let n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(e,o)||!Object.is(t[o],e[o]))return!1;return!0}var v=new Set,j=new Set,A=[],_e=0,W=!1;function we(){B()}function C(t,e){A.push({c:t,fn:e,n:_e++}),W||(W=!0,B())}function Ae(t,e){return t.owner&&e.owner?t.owner.order-e.owner.order:t.seq-e.seq}function he(t,e){for(let n=e.parent;n;n=n.parent)if(n===t)return!0;return!1}function We(t,e){let n=t.c.owner,r=e.c.owner;return n&&r&&n!==r?he(n,r)?1:he(r,n)?-1:n.order-r.order:n===r?t.n-e.n:t.c.seq-e.c.seq||t.n-e.n}function qe(){for(let t=0;v.size>0&&t<1e3;t++){let e=Array.from(v).sort(Ae);v.clear(),ee(()=>{for(let n of e)n.performUpdate()})}}var Y=!1;function Me(){W=!1,Y=!0;try{Te()}finally{Y=!1}}function Te(){if(j.size>0){let t=Array.from(j).sort((e,n)=>e.order-n.order);j.clear();for(let e of t)_(e)}if(A.length>0){let t=A.splice(0).sort(We);for(let e of t)e.c.runLifecycle(e.fn)}}$(qe);ie(()=>{(W||A.length>0||j.size>0)&&Me()});function me(t,e,n,r){return new X(t,e,n,r).inst}var Ge=["shouldComponentUpdate","getSnapshotBeforeUpdate","componentDidMount","componentDidUpdate","componentWillUnmount","componentDidCatch","componentWillReceiveProps","componentWillUpdate"];function He(t,e,n){let r=new t(e),[o,s]=H(r.state||{}),c={name:t.displayName||t.name,pure:!!t.prototype.isPureReactComponent,defaultProps:t.defaultProps||null,getDerivedStateFromProps:t.getDerivedStateFromProps,getDerivedStateFromError:t.getDerivedStateFromError};for(let d of Ge){let f=r[d]??r["UNSAFE_"+d];typeof f=="function"&&(c[d]=(...w)=>f.apply(r,w))}let a=me(e,o,s,c);Object.defineProperty(r,"props",{get:()=>a.props,configurable:!0}),Object.defineProperty(r,"state",{get:()=>a.state,set:d=>{a.state=d},configurable:!0}),r.setState=a.setState,r.forceUpdate=a.forceUpdate;let p=document.createElement("div");return p.style.display="contents",G(()=>{o();let d=h(()=>n(r.render()));p.replaceChildren(d)}),p}function Be(t){k(t,I())}return Se(Le);})();
7
+ React will try to recreate this component tree from scratch using the error boundary you provided, `+(r.name||"Component")+".")),o.inError=!0;let s=o.children.filter(f=>f.state==="mounted");Q(o);for(let f of s)f.blocked=!0;let c=this.state;if(r.getDerivedStateFromError){this.mounted&&!X&&!V()&&r.getDerivedStateFromError(e);let f=r.getDerivedStateFromError(e);f!=null&&(c={...c,...f})}else typeof console<"u"&&console.error((r.name||"Component")+": Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.");let a=this.props,p=this.state,d=this.mounted;this.state=c,this.errorCommitPending=!0,this.setStateSignal(c),R(this,()=>{this.errorCommitPending=!1,d&&c!==p&&r.componentDidUpdate&&r.componentDidUpdate.call(this.inst,a,p,void 0),r.componentDidCatch&&r.componentDidCatch.call(this.inst,e,n)})}finally{this.catching=!1}return!0}unmount(){if(this.disposed)return;this.disposed=!0,y.delete(this);let e=this.detachRef;this.detachRef=null,e&&e(),this.mounted&&this.spec.componentWillUnmount&&this.spec.componentWillUnmount.call(this.inst),this.mounted=!1}runLifecycle(e){if(!this.disposed)if(this.owner)j(this.owner,e);else try{e()}catch(n){console.error(n)}}};function K(t,e){if(t===e)return!0;if(!t||!e)return!1;let n=Object.keys(t),r=Object.keys(e);if(n.length!==r.length)return!1;for(let o of n)if(!Object.prototype.hasOwnProperty.call(e,o)||!Object.is(t[o],e[o]))return!1;return!0}var y=new Set,D=new Set,A=[],We=0,W=!1;function we(){B()}function R(t,e){A.push({c:t,fn:e,n:We++}),W||(W=!0,B())}function qe(t,e){return t.owner&&e.owner?t.owner.order-e.owner.order:t.seq-e.seq}function he(t,e){for(let n=e.parent;n;n=n.parent)if(n===t)return!0;return!1}function Me(t,e){let n=t.c.owner,r=e.c.owner;return n&&r&&n!==r?he(n,r)?1:he(r,n)?-1:n.order-r.order:n===r?t.n-e.n:t.c.seq-e.c.seq||t.n-e.n}function Te(){for(let t=0;y.size>0&&t<1e3;t++){let e=Array.from(y).sort(qe);y.clear(),te(()=>{for(let n of e)n.performUpdate()})}}var X=!1;function Ge(){W=!1,X=!0;try{He()}finally{X=!1}}function He(){if(D.size>0){let t=Array.from(D).sort((e,n)=>e.order-n.order);D.clear();for(let e of t)_(e)}if(A.length>0){let t=A.splice(0).sort(Me);for(let e of t)e.c.runLifecycle(e.fn)}}ee(Te);ae(()=>{(W||A.length>0||D.size>0)&&Ge()});function me(t,e,n,r){return new J(t,e,n,r).inst}var Be=["shouldComponentUpdate","getSnapshotBeforeUpdate","componentDidMount","componentDidUpdate","componentWillUnmount","componentDidCatch","componentWillReceiveProps","componentWillUpdate"];function Le(t,e,n){let r=new t(e),[o,s]=H(r.state||{}),c={name:t.displayName||t.name,pure:!!t.prototype.isPureReactComponent,defaultProps:t.defaultProps||null,getDerivedStateFromProps:t.getDerivedStateFromProps,getDerivedStateFromError:t.getDerivedStateFromError};for(let d of Be){let f=r[d]??r["UNSAFE_"+d];typeof f=="function"&&(c[d]=(...w)=>f.apply(r,w))}let a=me(e,o,s,c);Object.defineProperty(r,"props",{get:()=>a.props,configurable:!0}),Object.defineProperty(r,"state",{get:()=>a.state,set:d=>{a.state=d},configurable:!0}),r.setState=a.setState,r.forceUpdate=a.forceUpdate;let p=document.createElement("div");return p.style.display="contents",G(()=>{o();let d=h(()=>n(r.render()));p.replaceChildren(d)}),p}function Ne(t){O(t,I())}return Se(ze);})();
8
8
  for (const k in __krate_exports) { window[k] = __krate_exports[k]; }
@@ -0,0 +1,2 @@
1
+ var __krate_exports=(()=>{var h=Object.defineProperty;var y=Object.getOwnPropertyDescriptor;var H=Object.getOwnPropertyNames;var L=Object.prototype.hasOwnProperty;var A=(t,e)=>{for(var i in e)h(t,i,{get:e[i],enumerable:!0})},O=(t,e,i,n)=>{if(e&&typeof e=="object"||typeof e=="function")for(let r of H(e))!L.call(t,r)&&r!==i&&h(t,r,{get:()=>e[r],enumerable:!(n=y(e,r))||n.enumerable});return t};var R=t=>O(h({},"__esModule",{value:!0}),t);var K={};A(K,{krateHighlight:()=>P,krateHighlightInit:()=>x});var b=new Map;function k(t){let e=b.get(t);if(e===void 0){let i=typeof window<"u"&&window.__KRATE_HL?window.__KRATE_HL[t]:void 0,n=window.__KRATE_HL_LOAD||(r=>import(r));e=i?n(i).then(r=>r,()=>null):Promise.resolve(null),b.set(t,e)}return e}function P(t,e,i){return k(e).then(n=>n?n.highlight(n.trimSpace(t),e,i):null)}var N=new WeakSet;function M(t){for(let e=t.firstChild;e;e=e.nextSibling)if(e.nodeType===8&&e.data.startsWith("k:")){let i="/"+e.data;for(let n=e.nextSibling;n;n=n.nextSibling)if(n.nodeType===8&&n.data===i)return[e,n]}return null}function w(t){if(N.has(t))return;N.add(t);let e=t.getAttribute("data-krate-hl")||"";if(!e)return;let i=null,n,r=0,c=!1,f=()=>{let o=M(t);return o?{start:o[0],end:o[1]}:{start:null,end:null}},a=o=>o.start?o.start.nextSibling:t.firstChild,S=o=>{let l="";for(let s=a(o);s&&s!==o.end;s=s.nextSibling)l+=s.textContent||"";return l},m=f(),p=a(m);p&&p.nodeType===1&&(i=S(m));let v=o=>{let l=f(),s=document.createElement("template");s.innerHTML=o,c=!0;for(let d=a(l);d&&d!==l.end;){let u=d.nextSibling;d.parentNode&&d.parentNode.removeChild(d),d=u}(l.end&&l.end.parentNode?l.end.parentNode:t).insertBefore(s.content,l.end),c=!1,g.takeRecords()},E=(o,l)=>{let s=++r;n!==void 0&&clearTimeout(n),n=setTimeout(()=>{n=void 0,k(e).then(d=>{if(!d||s!==r||!t.isConnected)return;let u=d.highlight(d.trimSpace(o),e);u!==null&&s===r&&v(u)})},l)},C=()=>{if(c)return;if(!t.isConnected){g.disconnect();return}let o=f(),l=a(o);if(!l||l.nodeType!==3)return;for(let u=l.nextSibling;u&&u!==o.end;){let T=u.nextSibling;u.parentNode&&u.parentNode.removeChild(u),u=T}let s=l.textContent||"";if(s===i)return;let d=i===null;i=s,E(s,d?0:120)},g=new MutationObserver(C);g.observe(t,{childList:!0,characterData:!0,subtree:!0}),C()}var _=!1;function D(){_||typeof MutationObserver>"u"||(_=!0,new MutationObserver(t=>{for(let e of t)for(let i=0;i<e.addedNodes.length;i++){let n=e.addedNodes[i];if(n.nodeType!==1)continue;let r=n;r.matches("code[data-krate-hl]")?w(r):r.querySelector("code[data-krate-hl]")&&x(r)}}).observe(document.documentElement,{childList:!0,subtree:!0}))}function x(t){let i=(t||document).querySelectorAll("code[data-krate-hl]");for(let n=0;n<i.length;n++)w(i[n]);t||D()}return R(K);})();
2
+ for (const k in __krate_exports) { window[k] = __krate_exports[k]; }
@@ -1,2 +1,2 @@
1
- var __krate_exports=(()=>{var C=Object.defineProperty;var q=Object.getOwnPropertyDescriptor;var $=Object.getOwnPropertyNames;var z=Object.prototype.hasOwnProperty;var J=(e,t)=>{for(var r in t)C(e,r,{get:t[r],enumerable:!0})},Q=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of $(t))!z.call(e,i)&&i!==r&&C(e,i,{get:()=>t[i],enumerable:!(o=q(t,i))||o.enumerable});return e};var X=e=>Q(C({},"__esModule",{value:!0}),e);var we={};J(we,{krateBindList:()=>ce,krateList:()=>de,longestIncreasingSubsequence:()=>W});var A=window.createEffect;var D=window.createRoot,R=window.createSignal;var I=window.onCleanup;var E=window.untrack;var L=window.krateUnmount,V=window.krateWithOwner;var M=window.adoptValue,T=window.appendChild;var m=window.disposeNode;var K=window.insertAt;var _=window.removeRest,v=window.trackEffect,S=window.withDOM,H=window.withVNodes;function Y(e,t,r){if(!e)return String(r);let o=e(t,r);return o==null?String(r):"$"+String(o)}function Z(e){try{return decodeURIComponent(e)}catch{return e}}function ee(e){let t=e.map(r=>r.charAt(0)==="$"?r.slice(1):r);console.error("Encountered two children with the same key, `"+t.join("`, `")+"`. Keys should be unique so that components maintain their identity across updates. Krate keeps the first occurrence on its existing row and renders each duplicate as its own row.")}function te(){return[document.createComment(""),document.createComment("")]}function B(e,t,r,o,i){D(a=>{v(t.start,a);let{value:s,owner:c}=V(()=>{if(!e.accessor)return e.render(r,o);let[w,l]=R(r),[k,f]=R(o);return t.setItem=l,t.setIndex=f,e.render(w,k)});I(()=>L(c)),i(s)})}function G(e,t,r,o){let[i,a]=te(),s={key:t,item:r,index:o,start:i,end:a,setItem:null,setIndex:null,live:!0},c=document.createDocumentFragment();return c.appendChild(i),S(()=>B(e,s,r,o,w=>T(c,w))),c.appendChild(a),c.__row=s,c}function ne(e,t,r,o){t.item=r,t.index=o,t.live=!0;let i=t.start.parentNode;try{H(()=>B(e,t,r,o,a=>{let s={parent:i,next:t.start.nextSibling};S(()=>M(a,s)),_(s,t.end)}))}catch(a){console.error(a),P(t.start,t.end,!1),m(t.start);let s=G(e,t.key,r,o),c=s.__row;i.insertBefore(s,t.start),i.removeChild(t.start),i.removeChild(t.end),Object.assign(t,c)}}function P(e,t,r){let o=e.parentNode;if(!o)return;let i=e.nextSibling;for(;i&&i!==t;){let a=i.nextSibling;m(i),o.removeChild(i),i=a}r&&(m(e),o.removeChild(e),t.parentNode===o&&o.removeChild(t))}function U(e){P(e.start,e.end,!0)}function oe(e,t){let r=t.parentNode;if(e.end.nextSibling===t)return;let o=e.start;for(;o;){let i=o===e.end?null:o.nextSibling;r.insertBefore(o,t),o=i}}function W(e){let t=e.length,r=new Int32Array(t),o=[];for(let s=0;s<t;s++){let c=e[s];if(c<0)continue;let w=0,l=o.length;for(;w<l;){let k=w+l>>1;e[o[k]]<c?w=k+1:l=k}r[s]=w>0?o[w-1]:-1,o[w]=s}let i=new Array(o.length),a=o.length?o[o.length-1]:-1;for(let s=o.length-1;s>=0;s--)i[s]=a,a=r[a];return i}function re(e){return e==null?[]:Array.isArray(e)?e:typeof e[Symbol.iterator]=="function"?Array.from(e):[]}function se(e){if(typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body||!e||!e.contains(t))return null;let r=null;try{let o=t;typeof o.selectionStart=="number"&&(r=[o.selectionStart,o.selectionEnd,o.selectionDirection])}catch{r=null}return()=>{if(!(document.activeElement===t||!t.isConnected)&&(t.focus({preventScroll:!0}),r))try{t.setSelectionRange(r[0],r[1],r[2]||void 0)}catch{}}}function ie(e,t){let{end:r,keyFn:o}=e,i=r.parentNode,a=e.rows,s=t.length,c=new Array(s),w=new Map,l=null;for(let n=0;n<s;n++){let d=Y(o,t[n],n),p=w.get(d);p!==void 0?((l||(l=[])).push(d),w.set(d,p+1),d=d+"\0"+p):w.set(d,1),c[n]=d}l&&ee(l);let k=new Map;for(let n=0;n<a.length;n++)k.set(a[n].key,n);for(let n=0;n<s&&n<a.length;n++){let d=a[n];!d.live&&!w.has(d.key)&&!k.has(c[n])&&(k.delete(d.key),d.key=c[n],k.set(d.key,n))}let f=se(i),u=new Array(s),h=new Int32Array(s).fill(-1),F=new Uint8Array(a.length);for(let n=0;n<s;n++){let d=k.get(c[n]);if(d===void 0)continue;let p=a[d],j=t[n];p.live&&!e.accessor&&(p.item!==j||e.usesIndex&&p.index!==n)||(F[d]=1,h[n]=d,u[n]=p)}for(let n=0;n<a.length;n++)F[n]||U(a[n]);for(let n=0;n<s;n++){let d=u[n];if(!d)continue;let p=t[n];if(!d.live){ne(e,d,p,n);continue}d.item!==p&&(d.item=p,d.setItem&&d.setItem(()=>p)),d.index!==n&&(d.index=n,d.setIndex&&d.setIndex(n))}let g=new Array(s),x=null;for(let n=0;n<s;n++){if(u[n]){x=null;continue}let d=G(e,c[n],t[n],n);u[n]=d.__row,x?(x.appendChild(d),g[n-1]=null):x=d,g[n]=x}let N=new Uint8Array(s);for(let n of W(h))N[n]=1;let y=r;for(let n=s-1;n>=0;n--){let d=u[n],p=g[n];p?i.insertBefore(p,y):h[n]>=0&&!N[n]&&oe(d,y),y=d.start}e.rows=u,f&&f()}function ae(e){let{start:t,end:r}=e,o=t.parentNode,i=(t.nodeValue||"").slice(2),a="k:"+i+":",s=[],c=t.nextSibling;for(;c&&c!==r;){let l=c.nodeType===8&&c.nodeValue||"";if(i&&l.indexOf(a)===0){let f="/"+l,u=c.nextSibling;for(;u&&u!==r&&!(u.nodeType===8&&u.nodeValue===f);)u=u.nextSibling;if(u&&u!==r){s.push({key:Z(l.slice(a.length)),item:void 0,index:s.length,start:c,end:u,setItem:null,setIndex:null,live:!1}),c=u.nextSibling;continue}}let k=c.nextSibling;m(c),o.removeChild(c),c=k}let w=new Set;e.rows=s.filter(l=>w.has(l.key)?(U(l),!1):(w.add(l.key),!0))}function b(e,t,r){let o=!0,i=A(()=>{let a=re(t());E(()=>{o&&(o=!1,r&&ae(e)),ie(e,a)})});v(e.start,i)}function O(e,t,r,o,i){return{start:e,end:t,rows:[],keyFn:r,render:o,accessor:i===1,usesIndex:o.length>1}}function ce(e,t,r,o,i){let a="/"+(e.nodeValue||""),s=e.nextSibling;for(;s&&!(s.nodeType===8&&s.nodeValue===a);)s=s.nextSibling;s||(s=document.createComment(a),e.parentNode.insertBefore(s,e.nextSibling)),b(O(e,s,r,o,i),t,!0)}function de(e,t,r,o){return{__ka:1,mount(){let i=document.createDocumentFragment(),a=document.createComment(""),s=document.createComment("");return i.appendChild(a),i.appendChild(s),b(O(a,s,t,r,o),e,!1),i},adopt(i){let a=i.next;for(;a&&a.nodeType===8&&(a.nodeValue||"").indexOf("/k:")===0;)a=a.nextSibling;if(a&&a.nodeType===8&&(a.nodeValue||"").indexOf("k:")===0){let s="/"+a.nodeValue,c=a.nextSibling;for(;c&&!(c.nodeType===8&&c.nodeValue===s);)c=c.nextSibling;if(c){i.next=c.nextSibling,S(()=>b(O(a,c,t,r,o),e,!0));return}}K(i,S(()=>this.mount()))}}}return X(we);})();
1
+ var __krate_exports=(()=>{var C=Object.defineProperty;var $=Object.getOwnPropertyDescriptor;var z=Object.getOwnPropertyNames;var J=Object.prototype.hasOwnProperty;var Q=(e,t)=>{for(var r in t)C(e,r,{get:t[r],enumerable:!0})},X=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of z(t))!J.call(e,i)&&i!==r&&C(e,i,{get:()=>t[i],enumerable:!(o=$(t,i))||o.enumerable});return e};var Y=e=>X(C({},"__esModule",{value:!0}),e);var le={};Q(le,{krateBindList:()=>de,krateList:()=>we,longestIncreasingSubsequence:()=>j});var N=window.createEffect;var A=window.createRoot,R=window.createSignal;var E=window.onCleanup;var D=window.untrack;var L=window.krateUnmount,V=window.krateWithOwner;var _=window.adoptValue,M=window.appendChild;var m=window.disposeNode;var T=window.insertAt;var K=window.removeRest,v=window.trackEffect,S=window.withDOM,H=window.withVNodes;var B=window.krateWithIdScope;function Z(e,t,r){if(!e)return String(r);let o=e(t,r);return o==null?String(r):"$"+String(o)}function ee(e){try{return decodeURIComponent(e)}catch{return e}}function te(e){let t=e.map(r=>r.charAt(0)==="$"?r.slice(1):r);console.error("Encountered two children with the same key, `"+t.join("`, `")+"`. Keys should be unique so that components maintain their identity across updates. Krate keeps the first occurrence on its existing row and renders each duplicate as its own row.")}function ne(){return[document.createComment(""),document.createComment("")]}function P(e,t,r,o,i){A(a=>{v(t.start,a);let s=(e.start.nodeValue||"").slice(2),{value:c,owner:l}=V(()=>B(s?s+":"+t.key:"",()=>{if(!e.accessor)return e.render(r,o);let[u,k]=R(r),[f,w]=R(o);return t.setItem=k,t.setIndex=w,e.render(u,f)}));E(()=>L(l)),i(c)})}function G(e,t,r,o){let[i,a]=ne(),s={key:t,item:r,index:o,start:i,end:a,setItem:null,setIndex:null,live:!0},c=document.createDocumentFragment();return c.appendChild(i),S(()=>P(e,s,r,o,l=>M(c,l))),c.appendChild(a),c.__row=s,c}function oe(e,t,r,o){t.item=r,t.index=o,t.live=!0;let i=t.start.parentNode;try{H(()=>P(e,t,r,o,a=>{let s={parent:i,next:t.start.nextSibling};S(()=>_(a,s)),K(s,t.end)}))}catch(a){console.error(a),U(t.start,t.end,!1),m(t.start);let s=G(e,t.key,r,o),c=s.__row;i.insertBefore(s,t.start),i.removeChild(t.start),i.removeChild(t.end),Object.assign(t,c)}}function U(e,t,r){let o=e.parentNode;if(!o)return;let i=e.nextSibling;for(;i&&i!==t;){let a=i.nextSibling;m(i),o.removeChild(i),i=a}r&&(m(e),o.removeChild(e),t.parentNode===o&&o.removeChild(t))}function W(e){U(e.start,e.end,!0)}function re(e,t){let r=t.parentNode;if(e.end.nextSibling===t)return;let o=e.start;for(;o;){let i=o===e.end?null:o.nextSibling;r.insertBefore(o,t),o=i}}function j(e){let t=e.length,r=new Int32Array(t),o=[];for(let s=0;s<t;s++){let c=e[s];if(c<0)continue;let l=0,u=o.length;for(;l<u;){let k=l+u>>1;e[o[k]]<c?l=k+1:u=k}r[s]=l>0?o[l-1]:-1,o[l]=s}let i=new Array(o.length),a=o.length?o[o.length-1]:-1;for(let s=o.length-1;s>=0;s--)i[s]=a,a=r[a];return i}function se(e){return e==null?[]:Array.isArray(e)?e:typeof e[Symbol.iterator]=="function"?Array.from(e):[]}function ie(e){if(typeof document>"u")return null;let t=document.activeElement;if(!t||t===document.body||!e||!e.contains(t))return null;let r=null;try{let o=t;typeof o.selectionStart=="number"&&(r=[o.selectionStart,o.selectionEnd,o.selectionDirection])}catch{r=null}return()=>{if(!(document.activeElement===t||!t.isConnected)&&(t.focus({preventScroll:!0}),r))try{t.setSelectionRange(r[0],r[1],r[2]||void 0)}catch{}}}function ae(e,t){let{end:r,keyFn:o}=e,i=r.parentNode,a=e.rows,s=t.length,c=new Array(s),l=new Map,u=null;for(let n=0;n<s;n++){let d=Z(o,t[n],n),p=l.get(d);p!==void 0?((u||(u=[])).push(d),l.set(d,p+1),d=d+"\0"+p):l.set(d,1),c[n]=d}u&&te(u);let k=new Map;for(let n=0;n<a.length;n++)k.set(a[n].key,n);for(let n=0;n<s&&n<a.length;n++){let d=a[n];!d.live&&!l.has(d.key)&&!k.has(c[n])&&(k.delete(d.key),d.key=c[n],k.set(d.key,n))}let f=ie(i),w=new Array(s),h=new Int32Array(s).fill(-1),F=new Uint8Array(a.length);for(let n=0;n<s;n++){let d=k.get(c[n]);if(d===void 0)continue;let p=a[d],q=t[n];p.live&&!e.accessor&&(p.item!==q||e.usesIndex&&p.index!==n)||(F[d]=1,h[n]=d,w[n]=p)}for(let n=0;n<a.length;n++)F[n]||W(a[n]);for(let n=0;n<s;n++){let d=w[n];if(!d)continue;let p=t[n];if(!d.live){oe(e,d,p,n);continue}d.item!==p&&(d.item=p,d.setItem&&d.setItem(()=>p)),d.index!==n&&(d.index=n,d.setIndex&&d.setIndex(n))}let g=new Array(s),x=null;for(let n=0;n<s;n++){if(w[n]){x=null;continue}let d=G(e,c[n],t[n],n);w[n]=d.__row,x?(x.appendChild(d),g[n-1]=null):x=d,g[n]=x}let I=new Uint8Array(s);for(let n of j(h))I[n]=1;let y=r;for(let n=s-1;n>=0;n--){let d=w[n],p=g[n];p?i.insertBefore(p,y):h[n]>=0&&!I[n]&&re(d,y),y=d.start}e.rows=w,f&&f()}function ce(e){let{start:t,end:r}=e,o=t.parentNode,i=(t.nodeValue||"").slice(2),a="k:"+i+":",s=[],c=t.nextSibling;for(;c&&c!==r;){let u=c.nodeType===8&&c.nodeValue||"";if(i&&u.indexOf(a)===0){let f="/"+u,w=c.nextSibling;for(;w&&w!==r&&!(w.nodeType===8&&w.nodeValue===f);)w=w.nextSibling;if(w&&w!==r){s.push({key:ee(u.slice(a.length)),item:void 0,index:s.length,start:c,end:w,setItem:null,setIndex:null,live:!1}),c=w.nextSibling;continue}}let k=c.nextSibling;m(c),o.removeChild(c),c=k}let l=new Set;e.rows=s.filter(u=>l.has(u.key)?(W(u),!1):(l.add(u.key),!0))}function b(e,t,r){let o=!0,i=N(()=>{let a=se(t());D(()=>{o&&(o=!1,r&&ce(e)),ae(e,a)})});v(e.start,i)}function O(e,t,r,o,i){return{start:e,end:t,rows:[],keyFn:r,render:o,accessor:i===1,usesIndex:o.length>1}}function de(e,t,r,o,i){let a="/"+(e.nodeValue||""),s=e.nextSibling;for(;s&&!(s.nodeType===8&&s.nodeValue===a);)s=s.nextSibling;s||(s=document.createComment(a),e.parentNode.insertBefore(s,e.nextSibling)),b(O(e,s,r,o,i),t,!0)}function we(e,t,r,o){return{__ka:1,mount(){let i=document.createDocumentFragment(),a=document.createComment(""),s=document.createComment("");return i.appendChild(a),i.appendChild(s),b(O(a,s,t,r,o),e,!1),i},adopt(i){let a=i.next;for(;a&&a.nodeType===8&&(a.nodeValue||"").indexOf("/k:")===0;)a=a.nextSibling;if(a&&a.nodeType===8&&(a.nodeValue||"").indexOf("k:")===0){let s="/"+a.nodeValue,c=a.nextSibling;for(;c&&!(c.nodeType===8&&c.nodeValue===s);)c=c.nextSibling;if(c){i.next=c.nextSibling,S(()=>b(O(a,c,t,r,o),e,!0));return}}T(i,S(()=>this.mount()))}}}return Y(le);})();
2
2
  for (const k in __krate_exports) { window[k] = __krate_exports[k]; }
@@ -0,0 +1,2 @@
1
+ var __krate_exports=(()=>{var w=Object.defineProperty;var L=Object.getOwnPropertyDescriptor;var q=Object.getOwnPropertyNames;var B=Object.prototype.hasOwnProperty;var H=(e,t)=>{for(var n in t)w(e,n,{get:t[n],enumerable:!0})},U=(e,t,n,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of q(t))!B.call(e,r)&&r!==n&&w(e,r,{get:()=>t[r],enumerable:!(o=L(t,r))||o.enumerable});return e};var G=e=>U(w({},"__esModule",{value:!0}),e);var ne={};H(ne,{forbidden:()=>b,krateResetNavigation:()=>K,notFound:()=>y,permanentRedirect:()=>te,redirect:()=>I,unauthorized:()=>C,useParams:()=>z,usePathname:()=>W,useRouter:()=>Q,useSearchParams:()=>j,useSelectedLayoutSegment:()=>ee,useSelectedLayoutSegments:()=>Z});var v=window.createSignal;var c=window.krateDerived;var X=Symbol.for("krate.request.store");function i(){let e=globalThis[X];return e&&typeof e.getStore=="function"?e.getStore():void 0}function y(){let e=new Error("NEXT_NOT_FOUND");throw e.__krateNotFound=!0,e.digest="NEXT_NOT_FOUND",e}function T(e){let t=new Error(e===403?"NEXT_FORBIDDEN":"NEXT_UNAUTHORIZED");throw t.__krateHTTPStatus=e,t.digest="NEXT_HTTP_ERROR_FALLBACK;"+e,t}function b(){return T(403)}function C(){return T(401)}function S(){let e=i();if(!e)return{path:"/",route:"",params:{}};let t=e.url.split("?")[0]||"/",n=e.params||{},o=[];for(let r of t.split("/").filter(Boolean)){let s=/^\[(\[)?(\.\.\.)?([^\]]+)\]?\]$/.exec(r);if(!s){o.push(r);continue}let u=n[s[3]];u!==void 0&&u!==""&&o.push(...u.split("/").filter(Boolean))}return{path:"/"+o.join("/"),route:t,params:n}}function m(e){try{return decodeURIComponent(e)}catch{return e}}function _(){return S().path}function A(){let e=i(),t=new URLSearchParams;for(let[n,o]of Object.entries(e&&e.searchParams||{}))t.append(n,String(o));return t}function E(){let{route:e,params:t}=S(),n={};for(let o of e.split("/").filter(Boolean)){let r=/^\[(\[)?(\.\.\.)?([^\]]+)\]?\]$/.exec(o);if(!r)continue;let s=t[r[3]];s===void 0||s===""||(n[r[3]]=r[2]?s.split("/").filter(Boolean).map(m):m(s))}return n}function d(e){return()=>{throw new Error(`useRouter().${e}() can only be called in the browser; use redirect() while rendering`)}}function N(){return{push:d("push"),replace:d("replace"),back:d("back"),forward:d("forward"),refresh:d("refresh"),prefetch:()=>{}}}function k(e,t){return S().path.split("/").filter(Boolean).map(m).slice(typeof t=="number"?t:0)}function P(e,t){let n=k(e,t);return n.length>0?n[0]:null}var O=window.getNavigationState,F=window.subscribeNavigation,a=window.krateRouter;function M(){let e=globalThis.__KRATE_ROUTE__;if(typeof e=="string")return e;if(typeof document>"u")return"";let t=document.getElementById("__krate_page");if(!t)return"";try{let n=JSON.parse(t.textContent||"{}");return typeof n.r=="string"?n.r:""}catch{return""}}function V(e){return e.length>1&&e.endsWith("/")?e.replace(/\/+$/,"")||"/":e}function D(){if(typeof location>"u")return{pathname:"/",search:"",route:""};let{pathname:e,search:t}=O();return{pathname:V(e),search:t,route:M()}}var g=null;function f(){if(g)return g;let[e,t]=v(D());if(g=e,typeof window<"u"){let n=()=>{let o=D(),r=e();(o.pathname!==r.pathname||o.search!==r.search||o.route!==r.route)&&t(o)};F(n),window.addEventListener("krate:navigate-end",n)}return e}function K(){g=null}function p(e,t){let n=e;return n.toString=t,n.toJSON=()=>e(),e}function W(){if(i())return _();let e=f(),t=c(()=>e().pathname);return p(t,()=>t())}function j(){if(i())return A();let e=f(),t=c(()=>new URLSearchParams(e().search));return p(t,()=>e().search)}function l(e){try{return decodeURIComponent(e)}catch{return e}}function $(e,t){let n={};if(!e)return n;let o=e.split("/").filter(Boolean),r=t.split("/").filter(Boolean);for(let s=0;s<o.length;s++){let u=o[s],h=/^\[(\[)?(\.\.\.)?([^\]]+)\]?\]$/.exec(u);if(!h)continue;let x=h[3];if(h[2]){let R=r.slice(s).map(l);return R.length>0&&(n[x]=R),n}s<r.length&&(n[x]=l(r[s]))}return n}function z(){if(i())return E();let e=f(),t=c(()=>{let n=e();return $(n.route,n.pathname)});return p(t,()=>JSON.stringify(t()))}var Y={push:(e,t)=>{a.push(e,t)},replace:(e,t)=>{a.replace(e,t)},back:()=>a.back(),forward:()=>a.forward(),refresh:()=>{a.refresh()},prefetch:e=>{a.prefetch(e)}};function Q(){return i()?N():Y}function Z(e,t){if(i())return k(e,t);let n=f(),o=typeof t=="number"?t:0,r=c(()=>n().pathname.split("/").filter(Boolean).map(l).slice(o));return p(r,()=>r().join("/"))}function ee(e,t){if(i())return P(e,t);let n=f(),o=typeof t=="number"?t:0,r=c(()=>{let s=n().pathname.split("/").filter(Boolean).map(l);return s.length>o?s[o]:null});return p(r,()=>String(r()))}function I(e){typeof location<"u"&&a.push(e);let t=new Error("Server action redirect to "+e);throw t.__krateRedirect=e,t}function te(e){return I(e)}return G(ne);})();
2
+ for (const k in __krate_exports) { window[k] = __krate_exports[k]; }
@@ -1,2 +1,2 @@
1
- var __krate_exports=(()=>{var ce=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var lt=Object.prototype.hasOwnProperty;var ut=(e,t)=>{for(var n in t)ce(e,n,{get:t[n],enumerable:!0})},ft=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ct(t))!lt.call(e,o)&&o!==n&&ce(e,o,{get:()=>t[o],enumerable:!(r=at(t,o))||r.enumerable});return e};var dt=e=>ft(ce({},"__esModule",{value:!0}),e);var zt={};ut(zt,{compareRouteSpecificity:()=>Je,destroyRouter:()=>Jt,getHistoryState:()=>bt,getNavigationState:()=>He,initRouter:()=>it,invalidatePrefetchCache:()=>ye,krateRouter:()=>$t,matchRoutePattern:()=>Ve,navigate:()=>jt,pageAssetURLs:()=>Ne,reinitRouter:()=>Vt,subscribeNavigation:()=>De});var pe=/\/chunks\/runtime\.[^/]+\.js$/;function te(){return globalThis.__KRATE_CFG__||{}}function me(){let e=te().basePath||"";return!e||e==="/"?"":"/"+e.replace(/^\/+|\/+$/g,"")}function U(e){let t=me();if(t&&(e===t||e.startsWith(t+"/"))){let n=e.slice(t.length);return n===""?"/":n}return e}function fe(e){return e.length>1&&e.endsWith("/")?e.slice(0,-1):e}function K(e){if(te().dev)try{console.warn("[krate router] "+e)}catch{}}function _e(e,t){if(/^(https?:)?\/\//.test(e)||e.startsWith("/"))return new URL(e,t).href;let n=t;if(!n.endsWith("/")){let r=n.lastIndexOf("/");n=r>0?n.slice(0,r+1):"/"}return new URL(e,n).href}function Ne(e,t,n){let r=new DOMParser().parseFromString(e,"text/html"),o=[],i=new Set,s=c=>{if(!c)return;let a;try{a=_e(c,t)}catch{return}i.has(a)||n.has(a)||pe.test(a)||(i.add(a),o.push(a))};return r.querySelectorAll("script[src]").forEach(c=>s(c.getAttribute("src"))),r.querySelectorAll('link[rel="modulepreload"][href], link[rel="preload"][as="script"][href]').forEach(c=>s(c.getAttribute("href"))),o}var R=!1,T=0,E,Le=0,m="",A="",G="idle",B=new Set,S=new Map,O=new Map,ht=30,pt=3e4,L=new Map,mt=50,le=new Set,gt=128,X=new Map,F=new Map,N=null,W=[],yt="_krate/i",vt=150,kt=200;function de(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}function M(){return Le++,Date.now().toString(36)+"-"+Le.toString(36)}function ne(e){try{let t=new URL(e,location.href);return t.hash="",t.href}catch{return e}}function P(e){let t=new URL(e,location.href);return fe(t.pathname)+t.search}function $(e,t=!1){let n=globalThis.__krateHardNavigate;if(typeof n=="function"){n(e,t);return}t?location.replace(e):location.assign(e)}function j(e,t){return{__krate:e,state:t===void 0?null:t}}function Q(e){if(e&&typeof e=="object"&&typeof e.__krate=="string")return e.__krate}function bt(){if(typeof history>"u")return null;let e=history.state;return Q(e)!==void 0?e.state:e}function Me(){let e=new URL(location.href);return{url:e.href,pathname:U(e.pathname),search:e.search,hash:e.hash,status:G}}function He(){return typeof location>"u"?{url:"",pathname:"/",search:"",hash:"",status:"idle"}:Me()}function re(){if(B.size===0)return;let e=Me();for(let t of Array.from(B))try{t(e)}catch(n){console.error(n)}}function H(e){G!==e&&(G=e,re())}function De(e){return B.add(e),()=>{B.delete(e)}}function k(e,t,n=!1){try{let r=new CustomEvent(e,{detail:t,cancelable:n});return window.dispatchEvent(r),!r.defaultPrevented}catch{return!0}}function ge(e){try{let t=globalThis.__krate_onNavigation;typeof t=="function"&&t(e)}catch{}}function J(e){if(e){if(L.delete(e),L.size>=mt){let t=L.keys().next().value;t!==void 0&&L.delete(t)}L.set(e,window.scrollY||0)}}function Ue(){let e=te().prefetchTTL;return typeof e=="number"&&e>=0?e:pt}function wt(e,t){for(S.delete(e);S.size>=ht;){let n=S.keys().next().value;if(n===void 0)break;S.delete(n)}S.set(e,t)}function Et(e){let t=S.get(e);if(t&&(S.delete(e),!(de()-t.at>Ue())))return t}function ye(e){if(e===void 0){S.clear();return}S.delete(ne(e))}function ve(e){return/text\/html|application\/xhtml\+xml/i.test(e)}function V(e){return/^\s*(<!doctype html|<html|<head|<body)/i.test(e)}function St(e){if(le.has(e)||le.size>=gt)return;le.add(e);let t=document.createElement("link");t.rel="prefetch",t.as="script",t.href=e,document.head.appendChild(t)}function ke(e){let t=ne(e),n=S.get(t);if(n&&de()-n.at<=Ue())return Promise.resolve();let r=O.get(t);if(r)return r;let o=fetch(t,{headers:{Accept:"text/html"},credentials:"same-origin"}).then(async i=>{if(!i.ok)return;let s=i.headers.get("content-type")||"",c=i.url||t;if(new URL(c,location.href).origin!==location.origin)return;let a=await i.text();if(!(ve(s)||s===""&&V(a)))return;wt(t,{html:a,url:c,status:i.status,at:de()});let u=new Set;document.querySelectorAll("script[src]").forEach(l=>u.add(l.src));for(let l of Ne(a,c,u))St(l)}).catch(()=>{}).finally(()=>{O.delete(t)});return O.set(t,o),o}function be(e){if(e.hasAttribute("data-krate-external")||e.hasAttribute("download"))return!1;let t=e.getAttribute("href");if(!t||t.startsWith("javascript:"))return!1;let n;try{n=new URL(t,location.href)}catch{return!1}if(n.origin!==location.origin)return!1;let r=e.getAttribute("target");return!(r&&r!=="_self")}function we(e){let t=e.getAttribute("data-prefetch");return e.hasAttribute("data-prefetch")&&t!=="false"&&t!=="0"}function At(e){let t=window.requestIdleCallback;typeof t=="function"?t(e,{timeout:1e3}):setTimeout(e,50)}function Z(e){let t=e.target;if(!t||typeof t.closest!="function")return;let n=t.closest("a[data-prefetch]");if(!n||!we(n)||!be(n))return;let r=n.getAttribute("href");if(!r)return;let o=new URL(r,location.href).href;if(P(o)===A)return;let i=F.get(n);i&&clearTimeout(i);let s=setTimeout(()=>{F.delete(n),ke(o)},kt);F.set(n,s)}function Ie(){N&&document.querySelectorAll("a[data-prefetch]").forEach(e=>{we(e)&&N.observe(e)})}function Lt(){document.addEventListener("mouseover",Z),document.addEventListener("focusin",Z),typeof IntersectionObserver<"u"&&(N=new IntersectionObserver(e=>{for(let t of e){if(!t.isIntersecting)continue;let n=t.target,r=n.getAttribute("href");if(r&&be(n)&&we(n)){let o=new URL(r,location.href).href;P(o)!==A&&At(()=>{ke(o)})}N.unobserve(t.target)}},{rootMargin:"200px"}),Ie())}function Tt(){let e=typeof HTMLScriptElement<"u"?HTMLScriptElement.supports:void 0;if(!(typeof e!="function"||!e("speculationrules"))&&!document.querySelector('meta[http-equiv="Content-Security-Policy" i]'))try{let t=document.createElement("script");t.type="speculationrules",t.textContent=JSON.stringify({prefetch:[{where:{and:[{href_matches:"/*"},{not:{href_matches:"/__krate/*"}},{not:{href_matches:"/api/*"}}]},eagerness:"moderate"}]}),document.head.appendChild(t)}catch{}}function Ke(){if(typeof window<"u"&&window.matchMedia)try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{}return!1}function Oe(){return te().viewTransitions===!1||Ke()?!1:typeof document.startViewTransition=="function"}function b(e){return e.getElementById("root")||e.body}function Rt(){let e=document.querySelector("template[data-krate-loading]");if(e&&e.content&&W.length===0){let t=e.content.cloneNode(!0);W=Array.from(t.childNodes),document.body.appendChild(t)}if(!Oe()&&!Ke()){let t=b(document);t.style.transition=`opacity ${vt}ms ease`,t.style.opacity="0"}}function Fe(){for(let t of W)t.parentNode&&t.parentNode.removeChild(t);W=[];let e=b(document);e.style.opacity==="0"&&(e.style.opacity="")}function Be(e){e.querySelectorAll("[data-view-transition]").forEach(t=>{let n=t.getAttribute("data-view-transition");n&&(t.style.viewTransitionName=n)})}var Pt=3e3;function xt(e,t){let n=[];e.querySelectorAll('link[rel="stylesheet"]').forEach(u=>{let l=u.getAttribute("href");if(!l)return;let h=new URL(l,t).href;n.includes(h)||n.push(h)});let r=new Map,o=[];document.querySelectorAll('link[rel="stylesheet"]').forEach(u=>{let l=u;l.href&&(n.includes(l.href)&&!r.has(l.href)?r.set(l.href,l):o.push(l))});let i=[],s=[],c=null;n.forEach((u,l)=>{let h=r.get(u)||null;if(!h){let p=document.createElement("link");if(p.rel="stylesheet",p.href=u,s.push(new Promise(y=>{let f=()=>{p.removeEventListener("load",f),p.removeEventListener("error",f),y()};p.addEventListener("load",f),p.addEventListener("error",f)})),i.push({link:p,media:p.getAttribute("media")}),p.media="not all",c)c.after(p);else{let y=n.slice(l+1).map(f=>r.get(f)).find(f=>!!f);y?y.before(p):document.head.appendChild(p)}h=p}c=h});let a=Promise.resolve();if(s.length>0){let u,l=new Promise(h=>{u=setTimeout(h,Pt)});a=Promise.race([Promise.all(s).then(()=>{}),l]).then(()=>clearTimeout(u))}return{ready:a,commit(){for(let{link:u,media:l}of i)l===null?u.removeAttribute("media"):u.setAttribute("media",l);o.forEach(u=>u.remove())},abort(){i.forEach(({link:u})=>u.remove())}}}var Te='meta[name="description"], meta[name="robots"], meta[property^="og:"], meta[name^="twitter:"], link[rel="canonical"], script[type="application/ld+json"]';function Ct(e){document.head.querySelectorAll(Te).forEach(t=>t.remove()),e.head.querySelectorAll(Te).forEach(t=>{document.head.appendChild(document.importNode(t,!0))})}function We(e,t){let n=new Set;document.querySelectorAll("script[src]:not([data-krate-spa])").forEach(i=>n.add(i.src));let r=[],o=new Set;return e.querySelectorAll("script[src]").forEach(i=>{let s=i.getAttribute("src");if(!s)return;let c=(i.getAttribute("type")||"").toLowerCase();if(c&&c!=="module"&&c!=="text/javascript"&&c!=="application/javascript")return;let a=_e(s,t);!n.has(a)&&!o.has(a)&&(o.add(a),r.push({src:a,module:c==="module"}))}),r}function $e(e){return new Promise(t=>{let n=document.createElement("script");n.src=e.src,e.module&&(n.type="module"),pe.test(e.src)||n.setAttribute("data-krate-spa",""),n.onload=()=>t(!0),n.onerror=()=>t(!1),document.body.appendChild(n)})}function _t(e){if(!e||e==="#")return null;let t=e.slice(1);try{t=decodeURIComponent(t)}catch{}return document.getElementById(t)||document.getElementsByName(t)[0]||null}function Ee(e){let t=_t(e);if(!t)return!1;try{t.scrollIntoView({block:"start"})}catch{}return!0}function Nt(e,t){if(t.kind==="pop"){let r=t.restoreKey?L.get(t.restoreKey):void 0;if(r!==void 0){window.scrollTo(0,r);return}}let n=new URL(e,location.href).hash;Ee(n)||t.scroll&&t.kind!=="refresh"&&window.scrollTo(0,0)}var Y=null;function Mt(){let e=document.activeElement;if(e&&e!==document.body&&e.isConnected&&e!==Y)return;let t=b(document);t.hasAttribute("tabindex")||(t.setAttribute("tabindex","-1"),Y=t,t.addEventListener("blur",()=>{Y===t&&(t.removeAttribute("tabindex"),Y=null)},{once:!0}));try{t.focus({preventScroll:!0})}catch{}}var Re="__krate-route-announcer";function Ht(){let e=document.getElementById(Re);e||(e=document.createElement("div"),e.id=Re,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),e.setAttribute("role","status"),e.setAttribute("style","position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0"),document.body.appendChild(e));let t=b(document).querySelector("h1"),n=document.title||(t&&t.textContent?t.textContent.trim():"")||U(location.pathname);e.textContent=n}function oe(){let e=fe(U(location.pathname));document.querySelectorAll("a[data-krate-link]").forEach(t=>{let n=t.getAttribute("href"),r="";try{r=n?fe(U(new URL(n,location.href).pathname)):""}catch{r=""}let o="";r&&r===e?o="exact":r&&r!=="/"&&e.startsWith(r+"/")&&(o="segment"),o==="exact"?t.setAttribute("aria-current","page"):t.removeAttribute("aria-current"),o?t.setAttribute("data-krate-active",o):t.removeAttribute("data-krate-active")})}function Pe(e){let t=me()+e;return X.has(t)?Promise.resolve(X.get(t)??null):fetch(t,{headers:{Accept:"text/html"},credentials:"same-origin"}).then(async n=>{let r=n.ok?await n.text():null,o=r&&V(r)?r:null;return X.set(t,o),o}).catch(()=>null)}async function Dt(e,t){let n=ne(e.url);if(!e.bypassCache){let h=O.get(n);if(h&&await h,t.aborted)return{ok:!1,aborted:!0};let p=Et(n);if(p)return{ok:!0,doc:{html:p.html,url:p.url,status:p.status}}}let r;try{r=await fetch(n,{headers:{Accept:"text/html"},credentials:"same-origin",signal:t,cache:e.bypassCache?"no-cache":"default"})}catch(h){return h?.name==="AbortError"||t.aborted?{ok:!1,aborted:!0}:k("krate:navigate-error",{url:e.url,status:0,error:h},!0)?{ok:!1,hard:e.url}:{ok:!1,aborted:!0}}let o=r.url||n;if(new URL(o,location.href).origin!==location.origin)return{ok:!1,hard:o};let i=r.headers.get("content-type")||"",s="";try{s=await r.text()}catch(h){if(h?.name==="AbortError"||t.aborted)return{ok:!1,aborted:!0};s=""}if(t.aborted)return{ok:!1,aborted:!0};let c=ve(i)||i===""&&V(s),a=new URL(e.url,location.href).hash,u=a&&!new URL(o).hash?o+a:o;if(r.ok)return c?{ok:!0,doc:{html:s,url:u,status:r.status}}:{ok:!1,hard:u};if(k("krate:navigate-error",{url:e.url,status:r.status}),c&&V(s))return{ok:!0,doc:{html:s,url:u,status:r.status}};let l=null;return r.status===404||r.status===410?l=await Pe("/404.html"):r.status>=500&&(l=await Pe("/500.html")),t.aborted?{ok:!1,aborted:!0}:l?{ok:!0,doc:{html:l,url:u,status:r.status}}:{ok:!1,hard:u}}async function ie(e){let t=location.href;if(e.kind!=="pop"){if(!k("krate:navigate-start",{url:e.url,from:t,kind:e.kind},!0))return}else k("krate:navigate-start",{url:e.url,from:t,kind:e.kind});let n=++T;E&&E.abort();let r=new AbortController;E=r,H("loading"),!e.bypassCache&&S.has(ne(e.url))||Rt();let i;try{i=await Dt(e,r.signal)}finally{E===r&&(E=void 0)}if(n===T){if(!i.ok){Fe(),H("idle"),"hard"in i&&$(i.hard,e.kind==="replace"||e.kind==="refresh");return}await Ut(i.doc,e,n)}}async function Ut(e,t,n){let r=new DOMParser().parseFromString(e.html,"text/html"),o=e.url,i=b(r),s=b(document);t.kind==="push"&&J(m);let c=je(r),a=Ot(C,c,location.href,o,r),u=xt(r,o);if(await u.ready,n!==T){u.abort();return}if(await It(()=>{let y=r.querySelector("title");y&&(document.title=y.textContent||"");let f=globalThis;if(a.keep.length>0&&typeof f.krateDisposeExcept=="function"?f.krateDisposeExcept(a.keep):typeof f.disposeAll=="function"&&f.disposeAll(),a.region){let{live:v,next:d}=a.region;q(v[0],v[1]);let w=D(d[0],d[1]).map(g=>document.importNode(g,!0));for(let g of w)v[1].parentNode.insertBefore(g,v[1]);for(let g of a.slots){q(g.live[0],g.live[1]);for(let I of D(g.next[0],g.next[1]))g.live[1].parentNode.insertBefore(document.importNode(I,!0),g.live[1])}Kt(s,i)}else{let v=Array.from(i.childNodes).map(d=>document.importNode(d,!0));s.replaceChildren(...v)}C=a.chain,z.clear(),u.commit(),Ct(r),Be(document)}),n!==T)return;Fe(),t.kind==="push"?(m=M(),history.pushState(j(m,t.state),"",o)):t.kind==="replace"?(L.delete(m),m=M(),history.replaceState(j(m,t.state),"",o)):t.kind==="refresh"?o!==location.href&&history.replaceState(history.state,"",o):t.restoreKey&&(m=t.restoreKey),A=P(location.href),_=A,Ye(r),Nt(o,t),t.kind!=="pop"&&t.kind!=="refresh"&&Mt(),t.kind!=="refresh"&&Ht(),oe(),k("krate:navigate",{url:location.href,status:e.status}),ge(location.href),H("idle"),document.querySelectorAll("script[data-krate-spa]").forEach(y=>y.remove());let h=We(r,o);Ce(a.skip);let p=await Promise.all(h.map($e));if(Ce([]),n===T){if(p.some(y=>!y)){k("krate:navigate-error",{url:location.href,status:e.status,error:"script-load"}),$(location.href,!0);return}ee(),k("krate:navigate-end",{url:location.href,status:e.status})}}function It(e){if(!Oe())return e(),Promise.resolve();let t=!1,n=()=>{t||(t=!0,e())};try{let r=document.startViewTransition(n);r&&r.finished&&typeof r.finished.catch=="function"&&r.finished.catch(()=>{});let o=r&&r.updateCallbackDone;if(o&&typeof o.then=="function")return o.then(()=>n(),()=>n())}catch{}return n(),Promise.resolve()}var C=[];function je(e){let t=e.getElementById("__krate_route");if(!t)return[];try{let n=JSON.parse(t.textContent||"{}");return Array.isArray(n.chain)?n.chain:[]}catch{return K("unreadable #__krate_route route info; layouts will be remounted"),[]}}function xe(e,t){let n=U(new URL(e,location.href).pathname).split("/").filter(Boolean);return(t<0?n:n.slice(0,t)).join("/")}function x(e,t,n="kl:"){let o=(e.ownerDocument||e).createTreeWalker(e,128),i=n+t,s="/"+n+t;for(;o.nextNode();){let c=o.currentNode;if(c.nodeValue===i){for(let a=c.nextSibling;a;a=a.nextSibling)if(a.nodeType===8&&a.nodeValue===s)return[c,a];return null}}return null}function D(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function q(e,t){let n=globalThis.disposeNode;for(let r of D(e,t))r.parentNode.removeChild(r),typeof n=="function"&&n(r)}function Kt(e,t){let n=":scope > template[data-krate-loading]";e.querySelectorAll(n).forEach(r=>r.remove()),t.querySelectorAll(n).forEach(r=>e.appendChild(document.importNode(r,!0)))}function Ce(e){let t=globalThis.krateKeepScopes;typeof t=="function"&&t(e)}function Ot(e,t,n,r,o){let i={keep:[],skip:[],region:null,slots:[],chain:t},s=0;for(;s<e.length&&s<t.length;){let f=e[s],v=t[s];if(f.id!==v.id||f.k!=="layout"||v.k!=="layout"||xe(n,f.d)!==xe(r,v.d))break;if(!f.p||!v.p){K(`layout ${v.f||v.id} is remounted on this navigation: ${v.why||f.why||"not persistable"}`);break}s++}if(s===0)return i;if(typeof globalThis.krateDisposeExcept!="function")return K("the runtime has no krateDisposeExcept; layouts are remounted"),i;let c=t[s-1].id,a=x(b(document),c),u=x(b(o),c);if(!a||!u)return K(`layout ${t[s-1].f||c} boundary markers are missing; the whole page is swapped`),i;let l=e.slice(0,s).map(f=>f.id),h=l.slice(),p=[],y=t.slice();for(let f=0;f<s;f++){let v=e[f].s||[],d=[];for(let w of t[f].s||[]){let g=v.find(st=>st.key===w.key),I=x(b(document),w.key,"ks:"),ae=x(b(o),w.key,"ks:");if(g&&I&&(w.src!=="page"||!ae)){l.push(g.scope),h.push(g.scope,w.scope),d.push({...w,scope:g.scope,src:g.src});continue}if(I&&ae){p.push({live:I,next:ae}),d.push(w);continue}return K(`slot @${w.n} markers are missing; the whole page is swapped`),i}y[f]={...t[f],s:d}}return{keep:l,skip:h,region:{live:a,next:u},slots:p,chain:y}}var z=new Map,_="";function he(e){let t=e.replace(/^\/+|\/+$/g,"");return t?t.split("/").map(n=>n.startsWith("[[...")&&n.endsWith("]]")?{kind:3,text:n.slice(5,-2)}:n.startsWith("[...")&&n.endsWith("]")?{kind:2,text:n.slice(4,-1)}:n.startsWith("[")&&n.endsWith("]")?{kind:1,text:n.slice(1,-1)}:{kind:0,text:n}):[]}function Ve(e,t){let n=he(t),r=e.replace(/^\/+|\/+$/g,""),o=r?r.split("/"):[],i={};for(let s=0;s<n.length;s++){let c=n[s];if(c.kind>=2){if(s!==n.length-1)return null;let a=o.slice(s);return c.kind===2&&a.length===0||a.some(u=>u==="")?null:(i[c.text]=a.map(ue).join("/"),i)}if(s>=o.length)return null;if(c.kind===1){if(!o[s])return null;i[c.text]=ue(o[s])}else if(ue(o[s])!==c.text)return null}return o.length===n.length?i:null}function ue(e){try{return decodeURIComponent(e)}catch{return e}}function Je(e,t){let n=he(e),r=he(t);for(let o=0;o<n.length&&o<r.length;o++){if(n[o].kind!==r[o].kind)return n[o].kind-r[o].kind;if(n[o].kind===0&&n[o].text!==r[o].text)return n[o].text<r[o].text?-1:1}return n.length!==r.length?r.length-n.length:e<t?-1:e>t?1:0}function Se(e){let t=U(new URL(e,location.href).pathname).replace(/^\/+|\/+$/g,""),n=null;for(let r of C)for(let o of r.s||[])for(let i of o.i||[])Ve(t,i)&&(!n||Je(i,n.pattern)<0)&&(n={hit:{entry:r,slot:o,path:t},pattern:i});return n&&!x(b(document),n.hit.slot.key,"ks:")?null:n?n.hit:null}function ze(e,t){C=C.map(n=>n.s&&n.s.some(r=>r.key===e)?{...n,s:n.s.map(r=>r.key===e?t:r)}:n)}function Ye(e){for(let t of Array.from(e.querySelectorAll("script:not([src])"))){let n=/window\.__KRATE_PARAMS__\s*=\s*(\{[\s\S]*?\})\s*;?\s*$/.exec(t.textContent||"");if(n){try{globalThis.__KRATE_PARAMS__=JSON.parse(n[1])}catch{}return}}delete globalThis.__KRATE_PARAMS__}function Xe(e){let t=globalThis.krateDisposeScopes;typeof t=="function"&&t(e)}async function Ae(e,t){let n=location.href;if(e.kind!=="pop"&&!k("krate:navigate-start",{url:e.url,from:n,kind:e.kind,intercept:t.slot.n},!0))return;let r=++T;E&&E.abort();let o=new AbortController;E=o,H("loading");let i=location.origin+me()+"/"+yt+"/"+t.slot.key+(t.path?"/"+t.path:""),s="",c=!1;try{let d=await fetch(i,{headers:{Accept:"text/html"},credentials:"same-origin",signal:o.signal,cache:e.bypassCache?"no-cache":"default"});s=await d.text(),c=d.ok&&(ve(d.headers.get("content-type")||"")||V(s)),c||k("krate:navigate-error",{url:e.url,status:d.status,intercept:t.slot.n})}catch(d){if(d?.name==="AbortError"||o.signal.aborted)return;k("krate:navigate-error",{url:e.url,status:0,error:d,intercept:t.slot.n})}finally{E===o&&(E=void 0)}if(r!==T)return;let a=c?new DOMParser().parseFromString(s,"text/html"):null,u=a?x(b(a),t.slot.key,"ks:"):null,l=x(b(document),t.slot.key,"ks:"),h=null;try{let d=a&&a.getElementById("__krate_route");h=d&&JSON.parse(d.textContent||"{}").frag||null}catch{h=null}if(!a||!u||!l||!h||h.key!==t.slot.key||!h.scope){try{console.warn(`[krate router] intercepting route for ${e.url} (slot @${t.slot.n}) could not be loaded; navigating to the page`)}catch{}return H("idle"),ie({...e})}if(e.kind==="push"&&J(m),t.slot.src!=="intercept"){z.set(m,{key:t.slot.key,nodes:D(l[0],l[1]),slot:t.slot,path:_});for(let d of D(l[0],l[1]))d.parentNode.removeChild(d)}else Xe([t.slot.scope]),q(l[0],l[1]);for(let d of D(u[0],u[1]))l[1].parentNode.insertBefore(document.importNode(d,!0),l[1]);let p=new Set;document.querySelectorAll('link[rel="stylesheet"]').forEach(d=>p.add(d.href)),a.querySelectorAll('link[rel="stylesheet"][href]').forEach(d=>{let w=new URL(d.getAttribute("href"),i).href;if(p.has(w))return;let g=document.createElement("link");g.rel="stylesheet",g.href=w,document.head.appendChild(g)}),ze(t.slot.key,{...t.slot,scope:h.scope,src:"intercept"});let y={__krate:"",state:e.state===void 0?null:e.state,__kint:{key:t.slot.key,base:_}};e.kind==="push"?(m=M(),y.__krate=m,history.pushState(y,"",e.url)):e.kind==="replace"?(m=M(),y.__krate=m,history.replaceState(y,"",e.url)):e.kind==="pop"&&e.restoreKey&&(m=e.restoreKey),A=P(location.href),Ye(a),oe(),k("krate:navigate",{url:location.href,status:200,intercept:t.slot.n}),ge(location.href),H("idle");let f=We(a,i),v=await Promise.all(f.map($e));if(r===T){if(v.some(d=>!d)){k("krate:navigate-error",{url:location.href,status:200,error:"script-load",intercept:t.slot.n}),$(location.href,!0);return}ee(),k("krate:navigate-end",{url:location.href,status:200,intercept:t.slot.n})}}function Ft(e,t){let n=x(b(document),e.key,"ks:"),r=C.flatMap(i=>i.s||[]).find(i=>i.key===e.key);if(!n||!r||r.src!=="intercept")return!1;Xe([r.scope]),q(n[0],n[1]);for(let i of e.nodes)n[1].parentNode.insertBefore(i,n[1]);ze(e.key,e.slot),z.delete(t),m=t,A=P(location.href);let o=L.get(t);return o!==void 0&&window.scrollTo(0,o),oe(),k("krate:navigate",{url:location.href,status:200}),ge(location.href),re(),!0}function Bt(e){return P(e)===A}function Wt(e,t){J(m),(e!==location.href||t.state!==void 0)&&(t.kind==="replace"?history.replaceState(j(m||M(),t.state),"",e):(m=M(),history.pushState(j(m,t.state),"",e)));let n=new URL(e).hash;!Ee(n)&&t.scroll&&!n&&window.scrollTo(0,0),re()}function se(e){let t;try{t=new URL(e.url,location.href)}catch{return $(e.url),Promise.resolve()}if(t.origin!==location.origin)return $(t.href,e.kind==="replace"),Promise.resolve();if(e.url=t.href,(e.kind==="push"||e.kind==="replace")&&Bt(t.href)&&(t.hash||t.href===location.href))return Wt(t.href,e),Promise.resolve();if(e.kind==="push"||e.kind==="replace"){let n=Se(t.href);if(n)return Ae(e,n)}return ie(e)}function Ge(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target;if(!t||typeof t.closest!="function")return;let n=t.closest("a[data-krate-link]");if(!n||!be(n))return;let r=n.getAttribute("href");r&&(e.preventDefault(),se({url:new URL(r,location.href).href,kind:n.hasAttribute("data-krate-replace")?"replace":"push",scroll:n.getAttribute("data-krate-scroll")!=="false"}))}function Qe(e){if(e.defaultPrevented)return;let t=e.target;if(!t||t.tagName!=="FORM"||t.hasAttribute("data-krate-reload"))return;let n=e.submitter||null;if((n&&n.getAttribute("formmethod")||t.getAttribute("method")||"get").toLowerCase()!=="get")return;let o=n&&n.getAttribute("formtarget")||t.getAttribute("target");if(o&&o!=="_self")return;let i=n&&n.getAttribute("formaction")||t.getAttribute("action")||"",s;try{s=new URL(i||location.href,location.href)}catch{return}if(s.origin!==location.origin||s.protocol.indexOf("http")!==0)return;let c;try{c=n?new FormData(t,n):new FormData(t)}catch{c=new FormData(t),n&&n.name&&c.append(n.name,n.value)}let a=new URLSearchParams;for(let[u,l]of c.entries()){if(typeof l!="string")return;a.append(u,l)}e.preventDefault(),s.search=a.toString(),s.hash="",se({url:s.href,kind:"push",scroll:!0})}function Ze(e){J(m);let t=Q(e.state),n=location.href;if(P(n)===A){m=t||m;let i=t?L.get(t):void 0;i!==void 0?window.scrollTo(0,i):Ee(location.hash),re();return}let r=t?z.get(t):void 0;if(r&&t&&r.path===P(n)&&r.path===_&&Ft(r,t))return;let o=e.state&&typeof e.state=="object"?e.state.__kint:null;if(o&&o.base===_){let i=Se(n);if(i&&i.slot.key===o.key){Ae({url:n,kind:"pop",scroll:!1,restoreKey:t},i);return}}ie({url:n,kind:"pop",scroll:!0,restoreKey:t})}function qe(){ye(),nt()}function et(){J(m);try{history.scrollRestoration="auto"}catch{}}function tt(){try{history.scrollRestoration="manual"}catch{}}function ee(){Ie(),oe(),Be(document),document.querySelectorAll("script[src]").forEach(e=>{pe.test(e.src)||e.setAttribute("data-krate-spa","")})}function nt(){if(!R||typeof location>"u")return typeof location<"u"&&location.reload(),Promise.resolve();if(A!==_){let e=Se(location.href);if(e&&e.slot.src==="intercept")return Ae({url:location.href,kind:"refresh",scroll:!1,bypassCache:!0},e)}return ie({url:location.href,kind:"refresh",scroll:!1,bypassCache:!0})}function rt(e,t={}){return R?se({url:e,kind:"push",scroll:t.scroll!==!1,state:t.state}):(typeof location<"u"&&location.assign(e),Promise.resolve())}function ot(e,t={}){return R?se({url:e,kind:"replace",scroll:t.scroll!==!1,state:t.state}):(typeof location<"u"&&location.replace(e),Promise.resolve())}var $t={push:rt,replace:ot,back(){typeof history<"u"&&history.back()},forward(){typeof history<"u"&&history.forward()},refresh:nt,prefetch(e){if(!R||typeof location>"u")return Promise.resolve();let t;try{t=new URL(e,location.href)}catch{return Promise.resolve()}return t.origin!==location.origin?Promise.resolve():ke(t.href)},subscribe:De,getState:He,invalidate:ye};function jt(e,t={}){return R?(t.replace?ot(e,t):rt(e,t),!1):(typeof location<"u"&&(t.replace?location.replace(e):location.assign(e)),!0)}function it(){if(!(typeof document>"u")){if(R){ee();return}if(R=!0,A=P(location.href),C=je(document),_=A,m=Q(history.state)||M(),Q(history.state)===void 0)try{history.replaceState(j(m,history.state),"",location.href)}catch{}try{history.scrollRestoration="manual"}catch{}document.addEventListener("click",Ge),document.addEventListener("submit",Qe),window.addEventListener("popstate",Ze),window.addEventListener("krate:revalidate",qe),window.addEventListener("pagehide",et),window.addEventListener("pageshow",tt),Lt(),Tt(),ee()}}function Vt(){it()}function Jt(){if(R){R=!1,document.removeEventListener("click",Ge),document.removeEventListener("submit",Qe),window.removeEventListener("popstate",Ze),window.removeEventListener("krate:revalidate",qe),window.removeEventListener("pagehide",et),window.removeEventListener("pageshow",tt),document.removeEventListener("mouseover",Z),document.removeEventListener("focusin",Z);for(let e of F.values())clearTimeout(e);F=new Map,N&&(N.disconnect(),N=null),E&&E.abort(),E=void 0,T++,S.clear(),O.clear(),L.clear(),X.clear(),B.clear(),G="idle",W=[],C=[],z.clear(),_=""}}return dt(zt);})();
1
+ var __krate_exports=(()=>{var ce=Object.defineProperty;var at=Object.getOwnPropertyDescriptor;var ct=Object.getOwnPropertyNames;var lt=Object.prototype.hasOwnProperty;var ut=(e,t)=>{for(var n in t)ce(e,n,{get:t[n],enumerable:!0})},ft=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of ct(t))!lt.call(e,o)&&o!==n&&ce(e,o,{get:()=>t[o],enumerable:!(r=at(t,o))||r.enumerable});return e};var dt=e=>ft(ce({},"__esModule",{value:!0}),e);var Xt={};ut(Xt,{compareRouteSpecificity:()=>Ve,destroyRouter:()=>Yt,getHistoryState:()=>bt,getNavigationState:()=>He,initRouter:()=>it,invalidatePrefetchCache:()=>ye,krateRouter:()=>Jt,matchRoutePattern:()=>Je,navigate:()=>Vt,pageAssetURLs:()=>Ne,reinitRouter:()=>zt,subscribeNavigation:()=>De});var pe=/\/chunks\/runtime\.[^/]+\.js$/;function te(){return globalThis.__KRATE_CFG__||{}}function me(){let e=te().basePath||"";return!e||e==="/"?"":"/"+e.replace(/^\/+|\/+$/g,"")}function U(e){let t=me();if(t&&(e===t||e.startsWith(t+"/"))){let n=e.slice(t.length);return n===""?"/":n}return e}function fe(e){return e.length>1&&e.endsWith("/")?e.slice(0,-1):e}function K(e){if(te().dev)try{console.warn("[krate router] "+e)}catch{}}function Ce(e,t){if(/^(https?:)?\/\//.test(e)||e.startsWith("/"))return new URL(e,t).href;let n=t;if(!n.endsWith("/")){let r=n.lastIndexOf("/");n=r>0?n.slice(0,r+1):"/"}return new URL(e,n).href}function Ne(e,t,n){let r=new DOMParser().parseFromString(e,"text/html"),o=[],i=new Set,s=c=>{if(!c)return;let a;try{a=Ce(c,t)}catch{return}i.has(a)||n.has(a)||pe.test(a)||(i.add(a),o.push(a))};return r.querySelectorAll("script[src]").forEach(c=>s(c.getAttribute("src"))),r.querySelectorAll('link[rel="modulepreload"][href], link[rel="preload"][as="script"][href]').forEach(c=>s(c.getAttribute("href"))),o}var R=!1,T=0,E,Ae=0,m="",L="",G="idle",F=new Set,S=new Map,O=new Map,ht=30,pt=3e4,A=new Map,mt=50,le=new Set,gt=128,X=new Map,B=new Map,N=null,W=[],yt="_krate/i",vt=150,kt=200;function de(){return typeof performance<"u"&&performance.now?performance.now():Date.now()}function M(){return Ae++,Date.now().toString(36)+"-"+Ae.toString(36)}function ne(e){try{let t=new URL(e,location.href);return t.hash="",t.href}catch{return e}}function _(e){let t=new URL(e,location.href);return fe(t.pathname)+t.search}function $(e,t=!1){let n=globalThis.__krateHardNavigate;if(typeof n=="function"){n(e,t);return}t?location.replace(e):location.assign(e)}function j(e,t){return{__krate:e,state:t===void 0?null:t}}function Q(e){if(e&&typeof e=="object"&&typeof e.__krate=="string")return e.__krate}function bt(){if(typeof history>"u")return null;let e=history.state;return Q(e)!==void 0?e.state:e}function Me(){let e=new URL(location.href);return{url:e.href,pathname:U(e.pathname),search:e.search,hash:e.hash,status:G}}function He(){return typeof location>"u"?{url:"",pathname:"/",search:"",hash:"",status:"idle"}:Me()}function re(){if(F.size===0)return;let e=Me();for(let t of Array.from(F))try{t(e)}catch(n){console.error(n)}}function H(e){G!==e&&(G=e,re())}function De(e){return F.add(e),()=>{F.delete(e)}}function k(e,t,n=!1){try{let r=new CustomEvent(e,{detail:t,cancelable:n});return window.dispatchEvent(r),!r.defaultPrevented}catch{return!0}}function ge(e){try{let t=globalThis.__krate_onNavigation;typeof t=="function"&&t(e)}catch{}}function V(e){if(e){if(A.delete(e),A.size>=mt){let t=A.keys().next().value;t!==void 0&&A.delete(t)}A.set(e,window.scrollY||0)}}function Ue(){let e=te().prefetchTTL;return typeof e=="number"&&e>=0?e:pt}function wt(e,t){for(S.delete(e);S.size>=ht;){let n=S.keys().next().value;if(n===void 0)break;S.delete(n)}S.set(e,t)}function Et(e){let t=S.get(e);if(t&&(S.delete(e),!(de()-t.at>Ue())))return t}function ye(e){if(e===void 0){S.clear();return}S.delete(ne(e))}function ve(e){return/text\/html|application\/xhtml\+xml/i.test(e)}function J(e){return/^\s*(<!doctype html|<html|<head|<body)/i.test(e)}function St(e){if(le.has(e)||le.size>=gt)return;le.add(e);let t=document.createElement("link");t.rel="prefetch",t.as="script",t.href=e,document.head.appendChild(t)}function ke(e){let t=ne(e),n=S.get(t);if(n&&de()-n.at<=Ue())return Promise.resolve();let r=O.get(t);if(r)return r;let o=fetch(t,{headers:{Accept:"text/html"},credentials:"same-origin"}).then(async i=>{if(!i.ok)return;let s=i.headers.get("content-type")||"",c=i.url||t;if(new URL(c,location.href).origin!==location.origin)return;let a=await i.text();if(!(ve(s)||s===""&&J(a)))return;wt(t,{html:a,url:c,status:i.status,at:de()});let u=new Set;document.querySelectorAll("script[src]").forEach(l=>u.add(l.src));for(let l of Ne(a,c,u))St(l)}).catch(()=>{}).finally(()=>{O.delete(t)});return O.set(t,o),o}function be(e){if(e.hasAttribute("data-krate-external")||e.hasAttribute("download"))return!1;let t=e.getAttribute("href");if(!t||t.startsWith("javascript:"))return!1;let n;try{n=new URL(t,location.href)}catch{return!1}if(n.origin!==location.origin)return!1;let r=e.getAttribute("target");return!(r&&r!=="_self")}function we(e){let t=e.getAttribute("data-prefetch");return e.hasAttribute("data-prefetch")&&t!=="false"&&t!=="0"}function Lt(e){let t=window.requestIdleCallback;typeof t=="function"?t(e,{timeout:1e3}):setTimeout(e,50)}function Z(e){let t=e.target;if(!t||typeof t.closest!="function")return;let n=t.closest("a[data-prefetch]");if(!n||!we(n)||!be(n))return;let r=n.getAttribute("href");if(!r)return;let o=new URL(r,location.href).href;if(_(o)===L)return;let i=B.get(n);i&&clearTimeout(i);let s=setTimeout(()=>{B.delete(n),ke(o)},kt);B.set(n,s)}function Ie(){N&&document.querySelectorAll("a[data-prefetch]").forEach(e=>{we(e)&&N.observe(e)})}function At(){document.addEventListener("mouseover",Z),document.addEventListener("focusin",Z),typeof IntersectionObserver<"u"&&(N=new IntersectionObserver(e=>{for(let t of e){if(!t.isIntersecting)continue;let n=t.target,r=n.getAttribute("href");if(r&&be(n)&&we(n)){let o=new URL(r,location.href).href;_(o)!==L&&Lt(()=>{ke(o)})}N.unobserve(t.target)}},{rootMargin:"200px"}),Ie())}function Tt(){let e=typeof HTMLScriptElement<"u"?HTMLScriptElement.supports:void 0;if(!(typeof e!="function"||!e("speculationrules"))&&!document.querySelector('meta[http-equiv="Content-Security-Policy" i]'))try{let t=document.createElement("script");t.type="speculationrules",t.textContent=JSON.stringify({prefetch:[{where:{and:[{href_matches:"/*"},{not:{href_matches:"/__krate/*"}},{not:{href_matches:"/api/*"}}]},eagerness:"moderate"}]}),document.head.appendChild(t)}catch{}}function Ke(){if(typeof window<"u"&&window.matchMedia)try{return window.matchMedia("(prefers-reduced-motion: reduce)").matches}catch{}return!1}function Oe(){return te().viewTransitions===!1||Ke()?!1:typeof document.startViewTransition=="function"}function b(e){return e.getElementById("root")||e.body}function Rt(){let e=document.querySelector("template[data-krate-loading]");if(e&&e.content&&W.length===0){let t=e.content.cloneNode(!0);W=Array.from(t.childNodes),document.body.appendChild(t)}if(!Oe()&&!Ke()){let t=b(document);t.style.transition=`opacity ${vt}ms ease`,t.style.opacity="0"}}function Be(){for(let t of W)t.parentNode&&t.parentNode.removeChild(t);W=[];let e=b(document);e.style.opacity==="0"&&(e.style.opacity="")}function Fe(e){e.querySelectorAll("[data-view-transition]").forEach(t=>{let n=t.getAttribute("data-view-transition");n&&(t.style.viewTransitionName=n);let r=t.getAttribute("data-view-transition-class");r&&t.style.setProperty("view-transition-class",r)})}var _t=3e3;function xt(e,t){let n=[];e.querySelectorAll('link[rel="stylesheet"]').forEach(u=>{let l=u.getAttribute("href");if(!l)return;let p=new URL(l,t).href;n.includes(p)||n.push(p)});let r=new Map,o=[];document.querySelectorAll('link[rel="stylesheet"]').forEach(u=>{let l=u;l.href&&(n.includes(l.href)&&!r.has(l.href)?r.set(l.href,l):o.push(l))});let i=[],s=[],c=null;n.forEach((u,l)=>{let p=r.get(u)||null;if(!p){let h=document.createElement("link");if(h.rel="stylesheet",h.href=u,s.push(new Promise(g=>{let f=()=>{h.removeEventListener("load",f),h.removeEventListener("error",f),g()};h.addEventListener("load",f),h.addEventListener("error",f)})),i.push({link:h,media:h.getAttribute("media")}),h.media="not all",c)c.after(h);else{let g=n.slice(l+1).map(f=>r.get(f)).find(f=>!!f);g?g.before(h):document.head.appendChild(h)}p=h}c=p});let a=Promise.resolve();if(s.length>0){let u,l=new Promise(p=>{u=setTimeout(p,_t)});a=Promise.race([Promise.all(s).then(()=>{}),l]).then(()=>clearTimeout(u))}return{ready:a,commit(){for(let{link:u,media:l}of i)l===null?u.removeAttribute("media"):u.setAttribute("media",l);o.forEach(u=>u.remove())},abort(){i.forEach(({link:u})=>u.remove())}}}var Te='meta[name="description"], meta[name="robots"], meta[property^="og:"], meta[name^="twitter:"], link[rel="canonical"], script[type="application/ld+json"]';function Pt(e){document.head.querySelectorAll(Te).forEach(t=>t.remove()),e.head.querySelectorAll(Te).forEach(t=>{document.head.appendChild(document.importNode(t,!0))})}function We(e,t){let n=new Set;document.querySelectorAll("script[src]:not([data-krate-spa])").forEach(i=>n.add(i.src));let r=[],o=new Set;return e.querySelectorAll("script[src]").forEach(i=>{let s=i.getAttribute("src");if(!s)return;let c=(i.getAttribute("type")||"").toLowerCase();if(c&&c!=="module"&&c!=="text/javascript"&&c!=="application/javascript")return;let a=Ce(s,t);!n.has(a)&&!o.has(a)&&(o.add(a),r.push({src:a,module:c==="module"}))}),r}function $e(e){return new Promise(t=>{let n=document.createElement("script");n.src=e.src,e.module&&(n.type="module"),pe.test(e.src)||n.setAttribute("data-krate-spa",""),n.onload=()=>t(!0),n.onerror=()=>t(!1),document.body.appendChild(n)})}function Ct(e){if(!e||e==="#")return null;let t=e.slice(1);try{t=decodeURIComponent(t)}catch{}return document.getElementById(t)||document.getElementsByName(t)[0]||null}function Ee(e){let t=Ct(e);if(!t)return!1;try{t.scrollIntoView({block:"start"})}catch{}return!0}function Nt(e,t){if(t.kind==="pop"){let r=t.restoreKey?A.get(t.restoreKey):void 0;if(r!==void 0){window.scrollTo(0,r);return}}let n=new URL(e,location.href).hash;Ee(n)||t.scroll&&t.kind!=="refresh"&&window.scrollTo(0,0)}var Y=null;function Mt(){let e=document.activeElement;if(e&&e!==document.body&&e.isConnected&&e!==Y)return;let t=b(document);t.hasAttribute("tabindex")||(t.setAttribute("tabindex","-1"),Y=t,t.addEventListener("blur",()=>{Y===t&&(t.removeAttribute("tabindex"),Y=null)},{once:!0}));try{t.focus({preventScroll:!0})}catch{}}var Re="__krate-route-announcer";function Ht(){let e=document.getElementById(Re);e||(e=document.createElement("div"),e.id=Re,e.setAttribute("aria-live","assertive"),e.setAttribute("aria-atomic","true"),e.setAttribute("role","status"),e.setAttribute("style","position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0"),document.body.appendChild(e));let t=b(document).querySelector("h1"),n=document.title||(t&&t.textContent?t.textContent.trim():"")||U(location.pathname);e.textContent=n}function oe(){let e=fe(U(location.pathname));document.querySelectorAll("a[data-krate-link]").forEach(t=>{let n=t.getAttribute("href"),r="";try{r=n?fe(U(new URL(n,location.href).pathname)):""}catch{r=""}let o="";r&&r===e?o="exact":r&&r!=="/"&&e.startsWith(r+"/")&&(o="segment"),o==="exact"?t.setAttribute("aria-current","page"):t.removeAttribute("aria-current"),o?t.setAttribute("data-krate-active",o):t.removeAttribute("data-krate-active")})}function _e(e){let t=me()+e;return X.has(t)?Promise.resolve(X.get(t)??null):fetch(t,{headers:{Accept:"text/html"},credentials:"same-origin"}).then(async n=>{let r=n.ok?await n.text():null,o=r&&J(r)?r:null;return X.set(t,o),o}).catch(()=>null)}async function Dt(e,t){let n=ne(e.url);if(!e.bypassCache){let p=O.get(n);if(p&&await p,t.aborted)return{ok:!1,aborted:!0};let h=Et(n);if(h){let g=new URL(e.url,location.href).hash,f=g&&!new URL(h.url,location.href).hash?h.url+g:h.url;return{ok:!0,doc:{html:h.html,url:f,status:h.status}}}}let r;try{r=await fetch(n,{headers:{Accept:"text/html"},credentials:"same-origin",signal:t,cache:e.bypassCache?"no-cache":"default"})}catch(p){return p?.name==="AbortError"||t.aborted?{ok:!1,aborted:!0}:k("krate:navigate-error",{url:e.url,status:0,error:p},!0)?{ok:!1,hard:e.url}:{ok:!1,aborted:!0}}let o=r.url||n;if(new URL(o,location.href).origin!==location.origin)return{ok:!1,hard:o};let i=r.headers.get("content-type")||"",s="";try{s=await r.text()}catch(p){if(p?.name==="AbortError"||t.aborted)return{ok:!1,aborted:!0};s=""}if(t.aborted)return{ok:!1,aborted:!0};let c=ve(i)||i===""&&J(s),a=new URL(e.url,location.href).hash,u=a&&!new URL(o).hash?o+a:o;if(r.ok)return c?{ok:!0,doc:{html:s,url:u,status:r.status}}:{ok:!1,hard:u};if(k("krate:navigate-error",{url:e.url,status:r.status}),c&&J(s))return{ok:!0,doc:{html:s,url:u,status:r.status}};let l=null;return r.status===404||r.status===410?l=await _e("/404.html"):r.status>=500&&(l=await _e("/500.html")),t.aborted?{ok:!1,aborted:!0}:l?{ok:!0,doc:{html:l,url:u,status:r.status}}:{ok:!1,hard:u}}async function ie(e){let t=location.href;if(e.kind!=="pop"){if(!k("krate:navigate-start",{url:e.url,from:t,kind:e.kind},!0))return}else k("krate:navigate-start",{url:e.url,from:t,kind:e.kind});let n=++T;E&&E.abort();let r=new AbortController;E=r,H("loading"),!e.bypassCache&&S.has(ne(e.url))||Rt();let i;try{i=await Dt(e,r.signal)}finally{E===r&&(E=void 0)}if(n===T){if(!i.ok){Be(),H("idle"),"hard"in i&&$(i.hard,e.kind==="replace"||e.kind==="refresh");return}await Ut(i.doc,e,n)}}async function Ut(e,t,n){let r=new DOMParser().parseFromString(e.html,"text/html"),o=e.url,i=b(r),s=b(document);t.kind==="push"&&V(m);let c=je(r),a=Bt(P,c,location.href,o,r),u=xt(r,o);if(await u.ready,n!==T){u.abort();return}if(await It(()=>{let g=r.querySelector("title");g&&(document.title=g.textContent||"");let f=globalThis;if(a.keep.length>0&&typeof f.krateDisposeExcept=="function"?f.krateDisposeExcept(a.keep):typeof f.disposeAll=="function"&&f.disposeAll(),a.region){let{live:v,next:d}=a.region;q(v[0],v[1]);let w=D(d[0],d[1]).map(y=>document.importNode(y,!0));for(let y of w)v[1].parentNode.insertBefore(y,v[1]);for(let y of a.slots){q(y.live[0],y.live[1]);for(let I of D(y.next[0],y.next[1]))y.live[1].parentNode.insertBefore(document.importNode(I,!0),y.live[1])}Kt(s,i)}else{let v=Array.from(i.childNodes).map(d=>document.importNode(d,!0));s.replaceChildren(...v)}P=a.chain,z.clear(),u.commit(),Pt(r),Fe(document)}),n!==T)return;Be(),t.kind==="push"?(m=M(),history.pushState(j(m,t.state),"",o)):t.kind==="replace"?(A.delete(m),m=M(),history.replaceState(j(m,t.state),"",o)):t.kind==="refresh"?o!==location.href&&history.replaceState(history.state,"",o):t.restoreKey&&(m=t.restoreKey),L=_(location.href),C=L,Ye(r),Ft(r),Nt(o,t),t.kind!=="pop"&&t.kind!=="refresh"&&Mt(),t.kind!=="refresh"&&Ht(),oe(),k("krate:navigate",{url:location.href,status:e.status}),ge(location.href),H("idle"),document.querySelectorAll("script[data-krate-spa]").forEach(g=>g.remove());let p=We(r,o);Pe(a.skip);let h=await Promise.all(p.map($e));if(Pe([]),n===T){if(h.some(g=>!g)){k("krate:navigate-error",{url:location.href,status:e.status,error:"script-load"}),$(location.href,!0);return}ee(),k("krate:navigate-end",{url:location.href,status:e.status})}}function It(e){if(!Oe())return e(),Promise.resolve();let t=!1,n=()=>{t||(t=!0,e())};try{let r=document.startViewTransition(n);r&&r.finished&&typeof r.finished.catch=="function"&&r.finished.catch(()=>{});let o=r&&r.updateCallbackDone;if(o&&typeof o.then=="function")return o.then(()=>n(),()=>n())}catch{}return n(),Promise.resolve()}var P=[];function je(e){let t=e.getElementById("__krate_route");if(!t)return[];try{let n=JSON.parse(t.textContent||"{}");return Array.isArray(n.chain)?n.chain:[]}catch{return K("unreadable #__krate_route route info; layouts will be remounted"),[]}}function xe(e,t){let n=U(new URL(e,location.href).pathname).split("/").filter(Boolean);return(t<0?n:n.slice(0,t)).join("/")}function x(e,t,n="kl:"){let o=(e.ownerDocument||e).createTreeWalker(e,128),i=n+t,s="/"+n+t;for(;o.nextNode();){let c=o.currentNode;if(c.nodeValue===i){for(let a=c.nextSibling;a;a=a.nextSibling)if(a.nodeType===8&&a.nodeValue===s)return[c,a];return null}}return null}function D(e,t){let n=[];for(let r=e.nextSibling;r&&r!==t;r=r.nextSibling)n.push(r);return n}function q(e,t){let n=globalThis.disposeNode;for(let r of D(e,t))r.parentNode.removeChild(r),typeof n=="function"&&n(r)}function Kt(e,t){let n=":scope > template[data-krate-loading]";e.querySelectorAll(n).forEach(r=>r.remove()),t.querySelectorAll(n).forEach(r=>e.appendChild(document.importNode(r,!0)))}function Pe(e){let t=globalThis.krateKeepScopes;typeof t=="function"&&t(e)}function Ot(e){let t=globalThis.krateScopeFailed;return typeof t=="function"&&!!t(e)}function Bt(e,t,n,r,o){let i={keep:[],skip:[],region:null,slots:[],chain:t},s=0;for(;s<e.length&&s<t.length;){let f=e[s],v=t[s];if(f.id!==v.id||f.k!==v.k||f.k!=="layout"&&f.k!=="error"||xe(n,f.d)!==xe(r,v.d)||f.k==="error"&&Ot(f.id))break;if(!f.p||!v.p){K(`layout ${v.f||v.id} is remounted on this navigation: ${v.why||f.why||"not persistable"}`);break}s++}if(s===0)return i;if(typeof globalThis.krateDisposeExcept!="function")return K("the runtime has no krateDisposeExcept; layouts are remounted"),i;let c=t[s-1].id,a=x(b(document),c),u=x(b(o),c);if(!a||!u)return K(`layout ${t[s-1].f||c} boundary markers are missing; the whole page is swapped`),i;let l=e.slice(0,s).map(f=>f.id),p=l.slice(),h=[],g=t.slice();for(let f=0;f<s;f++){let v=e[f].s||[],d=[];for(let w of t[f].s||[]){let y=v.find(st=>st.key===w.key),I=x(b(document),w.key,"ks:"),ae=x(b(o),w.key,"ks:");if(y&&I&&(w.src!=="page"||!ae)){l.push(y.scope),p.push(y.scope,w.scope),d.push({...w,scope:y.scope,src:y.src});continue}if(I&&ae){h.push({live:I,next:ae}),d.push(w);continue}return K(`slot @${w.n} markers are missing; the whole page is swapped`),i}g[f]={...t[f],s:d}}return{keep:l,skip:p,region:{live:a,next:u},slots:h,chain:g}}var z=new Map,C="";function he(e){let t=e.replace(/^\/+|\/+$/g,"");return t?t.split("/").map(n=>n.startsWith("[[...")&&n.endsWith("]]")?{kind:3,text:n.slice(5,-2)}:n.startsWith("[...")&&n.endsWith("]")?{kind:2,text:n.slice(4,-1)}:n.startsWith("[")&&n.endsWith("]")?{kind:1,text:n.slice(1,-1)}:{kind:0,text:n}):[]}function Je(e,t){let n=he(t),r=e.replace(/^\/+|\/+$/g,""),o=r?r.split("/"):[],i={};for(let s=0;s<n.length;s++){let c=n[s];if(c.kind>=2){if(s!==n.length-1)return null;let a=o.slice(s);return c.kind===2&&a.length===0||a.some(u=>u==="")?null:(i[c.text]=a.map(ue).join("/"),i)}if(s>=o.length)return null;if(c.kind===1){if(!o[s])return null;i[c.text]=ue(o[s])}else if(ue(o[s])!==c.text)return null}return o.length===n.length?i:null}function ue(e){try{return decodeURIComponent(e)}catch{return e}}function Ve(e,t){let n=he(e),r=he(t);for(let o=0;o<n.length&&o<r.length;o++){if(n[o].kind!==r[o].kind)return n[o].kind-r[o].kind;if(n[o].kind===0&&n[o].text!==r[o].text)return n[o].text<r[o].text?-1:1}return n.length!==r.length?r.length-n.length:e<t?-1:e>t?1:0}function Se(e){let t=U(new URL(e,location.href).pathname).replace(/^\/+|\/+$/g,""),n=null;for(let r of P)for(let o of r.s||[])for(let i of o.i||[])Je(t,i)&&(!n||Ve(i,n.pattern)<0)&&(n={hit:{entry:r,slot:o,path:t},pattern:i});return n&&!x(b(document),n.hit.slot.key,"ks:")?null:n?n.hit:null}function ze(e,t){P=P.map(n=>n.s&&n.s.some(r=>r.key===e)?{...n,s:n.s.map(r=>r.key===e?t:r)}:n)}function Ye(e){let t="",n=e.getElementById("__krate_page");if(n)try{let r=JSON.parse(n.textContent||"{}");typeof r.r=="string"&&(t=r.r)}catch{}globalThis.__KRATE_ROUTE__=t;for(let r of Array.from(e.querySelectorAll("script:not([src])"))){let o=/window\.__KRATE_PARAMS__\s*=\s*(\{[\s\S]*?\})\s*;?\s*$/.exec(r.textContent||"");if(o){try{globalThis.__KRATE_PARAMS__=JSON.parse(o[1])}catch{}return}}delete globalThis.__KRATE_PARAMS__}function Ft(e){let t=e.getElementById("__krate_error"),n=document.getElementById("__krate_error");if(!t){n&&n.remove();return}let r=document.importNode(t,!0);n?n.replaceWith(r):document.head.appendChild(r)}function Xe(e){let t=globalThis.krateDisposeScopes;typeof t=="function"&&t(e)}async function Le(e,t){let n=location.href;if(e.kind!=="pop"&&!k("krate:navigate-start",{url:e.url,from:n,kind:e.kind,intercept:t.slot.n},!0))return;let r=++T;E&&E.abort();let o=new AbortController;E=o,H("loading");let i=location.origin+me()+"/"+yt+"/"+t.slot.key+(t.path?"/"+t.path:""),s="",c=!1;try{let d=await fetch(i,{headers:{Accept:"text/html"},credentials:"same-origin",signal:o.signal,cache:e.bypassCache?"no-cache":"default"});s=await d.text(),c=d.ok&&(ve(d.headers.get("content-type")||"")||J(s)),c||k("krate:navigate-error",{url:e.url,status:d.status,intercept:t.slot.n})}catch(d){if(d?.name==="AbortError"||o.signal.aborted)return;k("krate:navigate-error",{url:e.url,status:0,error:d,intercept:t.slot.n})}finally{E===o&&(E=void 0)}if(r!==T)return;let a=c?new DOMParser().parseFromString(s,"text/html"):null,u=a?x(b(a),t.slot.key,"ks:"):null,l=x(b(document),t.slot.key,"ks:"),p=null;try{let d=a&&a.getElementById("__krate_route");p=d&&JSON.parse(d.textContent||"{}").frag||null}catch{p=null}if(!a||!u||!l||!p||p.key!==t.slot.key||!p.scope){try{console.warn(`[krate router] intercepting route for ${e.url} (slot @${t.slot.n}) could not be loaded; navigating to the page`)}catch{}return H("idle"),ie({...e})}if(e.kind==="push"&&V(m),t.slot.src!=="intercept"){z.set(m,{key:t.slot.key,nodes:D(l[0],l[1]),slot:t.slot,path:C});for(let d of D(l[0],l[1]))d.parentNode.removeChild(d)}else Xe([t.slot.scope]),q(l[0],l[1]);for(let d of D(u[0],u[1]))l[1].parentNode.insertBefore(document.importNode(d,!0),l[1]);let h=new Set;document.querySelectorAll('link[rel="stylesheet"]').forEach(d=>h.add(d.href)),a.querySelectorAll('link[rel="stylesheet"][href]').forEach(d=>{let w=new URL(d.getAttribute("href"),i).href;if(h.has(w))return;let y=document.createElement("link");y.rel="stylesheet",y.href=w,document.head.appendChild(y)}),ze(t.slot.key,{...t.slot,scope:p.scope,src:"intercept"});let g={__krate:"",state:e.state===void 0?null:e.state,__kint:{key:t.slot.key,base:C}};e.kind==="push"?(m=M(),g.__krate=m,history.pushState(g,"",e.url)):e.kind==="replace"?(m=M(),g.__krate=m,history.replaceState(g,"",e.url)):e.kind==="pop"&&e.restoreKey&&(m=e.restoreKey),L=_(location.href),Ye(a),oe(),k("krate:navigate",{url:location.href,status:200,intercept:t.slot.n}),ge(location.href),H("idle");let f=We(a,i),v=await Promise.all(f.map($e));if(r===T){if(v.some(d=>!d)){k("krate:navigate-error",{url:location.href,status:200,error:"script-load",intercept:t.slot.n}),$(location.href,!0);return}ee(),k("krate:navigate-end",{url:location.href,status:200,intercept:t.slot.n})}}function Wt(e,t){let n=x(b(document),e.key,"ks:"),r=P.flatMap(i=>i.s||[]).find(i=>i.key===e.key);if(!n||!r||r.src!=="intercept")return!1;Xe([r.scope]),q(n[0],n[1]);for(let i of e.nodes)n[1].parentNode.insertBefore(i,n[1]);ze(e.key,e.slot),z.delete(t),m=t,L=_(location.href);let o=A.get(t);return o!==void 0&&window.scrollTo(0,o),oe(),k("krate:navigate",{url:location.href,status:200}),ge(location.href),re(),!0}function $t(e){return _(e)===L}function jt(e,t){V(m),(e!==location.href||t.state!==void 0)&&(t.kind==="replace"?history.replaceState(j(m||M(),t.state),"",e):(m=M(),history.pushState(j(m,t.state),"",e)));let n=new URL(e).hash;!Ee(n)&&t.scroll&&!n&&window.scrollTo(0,0),re()}function se(e){let t;try{t=new URL(e.url,location.href)}catch{return $(e.url),Promise.resolve()}if(t.origin!==location.origin)return $(t.href,e.kind==="replace"),Promise.resolve();if(e.url=t.href,(e.kind==="push"||e.kind==="replace")&&$t(t.href)&&(t.hash||t.href===location.href))return jt(t.href,e),Promise.resolve();if(e.kind==="push"||e.kind==="replace"){let n=Se(t.href);if(n)return Le(e,n)}return ie(e)}function Ge(e){if(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)return;let t=e.target;if(!t||typeof t.closest!="function")return;let n=t.closest("a[data-krate-link]");if(!n||!be(n))return;let r=n.getAttribute("href");r&&(e.preventDefault(),se({url:new URL(r,location.href).href,kind:n.hasAttribute("data-krate-replace")?"replace":"push",scroll:n.getAttribute("data-krate-scroll")!=="false"}))}function Qe(e){if(e.defaultPrevented)return;let t=e.target;if(!t||t.tagName!=="FORM"||t.hasAttribute("data-krate-reload"))return;let n=e.submitter||null;if((n&&n.getAttribute("formmethod")||t.getAttribute("method")||"get").toLowerCase()!=="get")return;let o=n&&n.getAttribute("formtarget")||t.getAttribute("target");if(o&&o!=="_self")return;let i=n&&n.getAttribute("formaction")||t.getAttribute("action")||"",s;try{s=new URL(i||location.href,location.href)}catch{return}if(s.origin!==location.origin||s.protocol.indexOf("http")!==0)return;let c;try{c=n?new FormData(t,n):new FormData(t)}catch{c=new FormData(t),n&&n.name&&c.append(n.name,n.value)}let a=new URLSearchParams;for(let[u,l]of c.entries()){if(typeof l!="string")return;a.append(u,l)}e.preventDefault(),s.search=a.toString(),s.hash="",se({url:s.href,kind:"push",scroll:!0})}function Ze(e){V(m);let t=Q(e.state),n=location.href;if(_(n)===L){m=t||m;let i=t?A.get(t):void 0;i!==void 0?window.scrollTo(0,i):Ee(location.hash),re();return}let r=t?z.get(t):void 0;if(r&&t&&r.path===_(n)&&r.path===C&&Wt(r,t))return;let o=e.state&&typeof e.state=="object"?e.state.__kint:null;if(o&&o.base===C){let i=Se(n);if(i&&i.slot.key===o.key){Le({url:n,kind:"pop",scroll:!1,restoreKey:t},i);return}}ie({url:n,kind:"pop",scroll:!0,restoreKey:t})}function qe(){ye(),nt()}function et(){V(m);try{history.scrollRestoration="auto"}catch{}}function tt(){try{history.scrollRestoration="manual"}catch{}}function ee(){Ie(),oe(),Fe(document),document.querySelectorAll("script[src]").forEach(e=>{pe.test(e.src)||e.setAttribute("data-krate-spa","")})}function nt(){if(!R||typeof location>"u")return typeof location<"u"&&location.reload(),Promise.resolve();if(L!==C){let e=Se(location.href);if(e&&e.slot.src==="intercept")return Le({url:location.href,kind:"refresh",scroll:!1,bypassCache:!0},e)}return ie({url:location.href,kind:"refresh",scroll:!1,bypassCache:!0})}function rt(e,t={}){return R?se({url:e,kind:"push",scroll:t.scroll!==!1,state:t.state}):(typeof location<"u"&&location.assign(e),Promise.resolve())}function ot(e,t={}){return R?se({url:e,kind:"replace",scroll:t.scroll!==!1,state:t.state}):(typeof location<"u"&&location.replace(e),Promise.resolve())}var Jt={push:rt,replace:ot,back(){typeof history<"u"&&history.back()},forward(){typeof history<"u"&&history.forward()},refresh:nt,prefetch(e){if(!R||typeof location>"u")return Promise.resolve();let t;try{t=new URL(e,location.href)}catch{return Promise.resolve()}return t.origin!==location.origin?Promise.resolve():ke(t.href)},subscribe:De,getState:He,invalidate:ye};function Vt(e,t={}){return R?(t.replace?ot(e,t):rt(e,t),!1):(typeof location<"u"&&(t.replace?location.replace(e):location.assign(e)),!0)}function it(){if(!(typeof document>"u")){if(R){ee();return}if(R=!0,L=_(location.href),P=je(document),C=L,m=Q(history.state)||M(),Q(history.state)===void 0)try{history.replaceState(j(m,history.state),"",location.href)}catch{}try{history.scrollRestoration="manual"}catch{}document.addEventListener("click",Ge),document.addEventListener("submit",Qe),window.addEventListener("popstate",Ze),window.addEventListener("krate:revalidate",qe),window.addEventListener("pagehide",et),window.addEventListener("pageshow",tt),At(),Tt(),ee()}}function zt(){it()}function Yt(){if(R){R=!1,document.removeEventListener("click",Ge),document.removeEventListener("submit",Qe),window.removeEventListener("popstate",Ze),window.removeEventListener("krate:revalidate",qe),window.removeEventListener("pagehide",et),window.removeEventListener("pageshow",tt),document.removeEventListener("mouseover",Z),document.removeEventListener("focusin",Z);for(let e of B.values())clearTimeout(e);B=new Map,N&&(N.disconnect(),N=null),E&&E.abort(),E=void 0,T++,S.clear(),O.clear(),A.clear(),X.clear(),F.clear(),G="idle",W=[],P=[],z.clear(),C=""}}return dt(Xt);})();
2
2
  for (const k in __krate_exports) { window[k] = __krate_exports[k]; }
@@ -5,6 +5,7 @@
5
5
  "exports": [
6
6
  "BLOCKED_URL",
7
7
  "KRATE_CONTEXT",
8
+ "__krate_useId",
8
9
  "adoptValue",
9
10
  "afterFlush",
10
11
  "appendChild",
@@ -21,6 +22,7 @@
21
22
  "createContext",
22
23
  "createEffect",
23
24
  "createEffectDeps",
25
+ "createEffectEvent",
24
26
  "createMemo",
25
27
  "createMemoDeps",
26
28
  "createReducer",
@@ -51,6 +53,7 @@
51
53
  "krateContextRows",
52
54
  "krateControl",
53
55
  "krateCurrentScope",
56
+ "krateCustomProp",
54
57
  "krateDepsOf",
55
58
  "krateDerived",
56
59
  "krateDisposeExcept",
@@ -63,6 +66,12 @@
63
66
  "krateFlushSync",
64
67
  "krateForgetOwner",
65
68
  "krateGetOwner",
69
+ "krateHintPreconnect",
70
+ "krateHintPrefetchDNS",
71
+ "krateHintPreinit",
72
+ "krateHintPreinitModule",
73
+ "krateHintPreload",
74
+ "krateHintPreloadModule",
66
75
  "krateHook",
67
76
  "krateHookState",
68
77
  "krateIsDiscrete",
@@ -81,6 +90,7 @@
81
90
  "krateOnUnmount",
82
91
  "krateOwner",
83
92
  "krateOwnerId",
93
+ "krateParam",
84
94
  "kratePendingFlush",
85
95
  "kratePortalFind",
86
96
  "kratePortalMount",
@@ -113,6 +123,7 @@
113
123
  "krateTrackNode",
114
124
  "krateTransitionWrites",
115
125
  "krateUnmount",
126
+ "krateWithIdScope",
116
127
  "krateWithOwner",
117
128
  "mount",
118
129
  "onCleanup",
@@ -134,6 +145,224 @@
134
145
  "writePersisted"
135
146
  ]
136
147
  },
148
+ "full": [
149
+ "ACTION_ARGS_FIELD",
150
+ "BLOCKED_URL",
151
+ "KRATE_CONTEXT",
152
+ "ServerActionError",
153
+ "Slot",
154
+ "__krateAction",
155
+ "__krateActionState",
156
+ "__krateAssignRef",
157
+ "__krateBeginAction",
158
+ "__krateBindFormAction",
159
+ "__krateClass",
160
+ "__krateClassError",
161
+ "__krateCondPost",
162
+ "__krateCondPre",
163
+ "__krateFormStatusMount",
164
+ "__krateOnError",
165
+ "__krateOptimistic",
166
+ "__krateOwn",
167
+ "__krateOwner",
168
+ "__krate_useId",
169
+ "adoptValue",
170
+ "afterFlush",
171
+ "appendChild",
172
+ "callServerAction",
173
+ "clearBetween",
174
+ "clearNodes",
175
+ "clearPersisted",
176
+ "cloneElement",
177
+ "clsx",
178
+ "cn",
179
+ "compareRouteSpecificity",
180
+ "componentStack",
181
+ "createCSSChoice",
182
+ "createCSSFlags",
183
+ "createCSSGroup",
184
+ "createCSSRange",
185
+ "createCSSStack",
186
+ "createCSSToggle",
187
+ "createCallbackDeps",
188
+ "createContext",
189
+ "createEffect",
190
+ "createEffectDeps",
191
+ "createEffectEvent",
192
+ "createMemo",
193
+ "createMemoDeps",
194
+ "createOwner",
195
+ "createReducer",
196
+ "createResource",
197
+ "createRoot",
198
+ "createScope",
199
+ "createScopeFlags",
200
+ "createSignal",
201
+ "cva",
202
+ "destroyRouter",
203
+ "disposeAll",
204
+ "disposeNode",
205
+ "flushPassive",
206
+ "forbidden",
207
+ "forwardRef",
208
+ "getFormStatus",
209
+ "getHistoryState",
210
+ "getNavigationState",
211
+ "getOwner",
212
+ "h",
213
+ "handleError",
214
+ "hydrate",
215
+ "inCommitPhaseError",
216
+ "initRouter",
217
+ "insert",
218
+ "insertAt",
219
+ "installActionForms",
220
+ "invalidatePrefetchCache",
221
+ "isActionPending",
222
+ "isDerivedGetter",
223
+ "isServerAction",
224
+ "isSignalGetter",
225
+ "krateApplyStyle",
226
+ "krateAttachRef",
227
+ "krateBindList",
228
+ "krateBindRef",
229
+ "krateCommitSnapshot",
230
+ "krateCommitting",
231
+ "krateCondActivity",
232
+ "krateCondDetached",
233
+ "krateCondReset",
234
+ "krateCondSwap",
235
+ "krateContextRows",
236
+ "krateControl",
237
+ "krateCurrentScope",
238
+ "krateCustomProp",
239
+ "krateDepsOf",
240
+ "krateDerived",
241
+ "krateDisposeExcept",
242
+ "krateDisposeOwner",
243
+ "krateDisposeScopes",
244
+ "krateEnterScope",
245
+ "krateEpoch",
246
+ "krateEventName",
247
+ "krateEventRoot",
248
+ "krateFlushSync",
249
+ "krateForgetOwner",
250
+ "krateGetOwner",
251
+ "krateHighlight",
252
+ "krateHighlightInit",
253
+ "krateHintPreconnect",
254
+ "krateHintPrefetchDNS",
255
+ "krateHintPreinit",
256
+ "krateHintPreinitModule",
257
+ "krateHintPreload",
258
+ "krateHintPreloadModule",
259
+ "krateHook",
260
+ "krateHookState",
261
+ "krateIsDiscrete",
262
+ "krateKeepScopes",
263
+ "krateLeaveScope",
264
+ "krateList",
265
+ "krateMount",
266
+ "krateMountFields",
267
+ "krateMountPortals",
268
+ "krateOn",
269
+ "krateOnAfterFlush",
270
+ "krateOnBeforeFlush",
271
+ "krateOnDispose",
272
+ "krateOnHookError",
273
+ "krateOnLayoutCommit",
274
+ "krateOnSettle",
275
+ "krateOnUnmount",
276
+ "krateOwner",
277
+ "krateOwnerId",
278
+ "krateParam",
279
+ "kratePendingFlush",
280
+ "kratePortalFind",
281
+ "kratePortalMount",
282
+ "kratePortalReset",
283
+ "kratePortalScan",
284
+ "kratePortalTarget",
285
+ "kratePortalUnmount",
286
+ "kratePortalsEnter",
287
+ "kratePortalsIn",
288
+ "kratePortalsLeave",
289
+ "kratePruneSnapshots",
290
+ "krateReadAt",
291
+ "krateRefsEnter",
292
+ "krateRefsFlush",
293
+ "krateRefsHold",
294
+ "krateRefsLeave",
295
+ "krateRenderPhase",
296
+ "krateRequestFlush",
297
+ "krateResetNavigation",
298
+ "krateRouter",
299
+ "krateRunEvent",
300
+ "krateSanitizeAttr",
301
+ "krateScopeFailed",
302
+ "krateScopeOfId",
303
+ "krateSetControl",
304
+ "krateSetOwner",
305
+ "krateSetRef",
306
+ "krateSlotReplaced",
307
+ "krateSpread",
308
+ "krateSynthetic",
309
+ "krateTagOwner",
310
+ "krateTakeSyncLane",
311
+ "krateTrackNode",
312
+ "krateTransitionWrites",
313
+ "krateUnmount",
314
+ "krateWithIdScope",
315
+ "krateWithOwner",
316
+ "longestIncreasingSubsequence",
317
+ "matchRoutePattern",
318
+ "mount",
319
+ "mountClassElement",
320
+ "mountOwner",
321
+ "navigate",
322
+ "notFound",
323
+ "onCleanup",
324
+ "onMount",
325
+ "onOwnerCleanup",
326
+ "pageAssetURLs",
327
+ "permanentRedirect",
328
+ "readDurableState",
329
+ "readPersisted",
330
+ "redirect",
331
+ "reinitRouter",
332
+ "remountChildren",
333
+ "removeRest",
334
+ "reportActionError",
335
+ "requestFormReset",
336
+ "resetContexts",
337
+ "resolvePersist",
338
+ "runActionTransition",
339
+ "runAfterFlush",
340
+ "runWithOwner",
341
+ "sameValue",
342
+ "setActionTransitionRunner",
343
+ "setBoundary",
344
+ "setOwnerHooks",
345
+ "submitFormAction",
346
+ "subscribeNavigation",
347
+ "subscribePersist",
348
+ "takeFlash",
349
+ "trackEffect",
350
+ "twMerge",
351
+ "unauthorized",
352
+ "unmountChildren",
353
+ "unmountOwner",
354
+ "untrack",
355
+ "useParams",
356
+ "usePathname",
357
+ "useRef",
358
+ "useRouter",
359
+ "useSearchParams",
360
+ "useSelectedLayoutSegment",
361
+ "useSelectedLayoutSegments",
362
+ "withDOM",
363
+ "withVNodes",
364
+ "writePersisted"
365
+ ],
137
366
  "features": {
138
367
  "router": {
139
368
  "file": "krate-f-router.js",
@@ -166,6 +395,23 @@
166
395
  "subscribeNavigation"
167
396
  ]
168
397
  },
398
+ "navigation": {
399
+ "file": "krate-f-navigation.js",
400
+ "exports": [
401
+ "forbidden",
402
+ "krateResetNavigation",
403
+ "notFound",
404
+ "permanentRedirect",
405
+ "redirect",
406
+ "unauthorized",
407
+ "useParams",
408
+ "usePathname",
409
+ "useRouter",
410
+ "useSearchParams",
411
+ "useSelectedLayoutSegment",
412
+ "useSelectedLayoutSegments"
413
+ ]
414
+ },
169
415
  "helpers": {
170
416
  "file": "krate-f-helpers.js",
171
417
  "exports": [
@@ -225,6 +471,7 @@
225
471
  "getOwner",
226
472
  "handleError",
227
473
  "inCommitPhaseError",
474
+ "krateScopeFailed",
228
475
  "mountClassElement",
229
476
  "mountOwner",
230
477
  "onOwnerCleanup",
@@ -234,6 +481,13 @@
234
481
  "unmountChildren",
235
482
  "unmountOwner"
236
483
  ]
484
+ },
485
+ "highlight": {
486
+ "file": "krate-f-highlight.js",
487
+ "exports": [
488
+ "krateHighlight",
489
+ "krateHighlightInit"
490
+ ]
237
491
  }
238
492
  }
239
493
  }