@torpor/view 1.2.6 → 1.3.1

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 (38) hide show
  1. package/dist/{Effect-DazmAdyC.d.mts → Effect-99HYQdzZ.d.mts} +50 -33
  2. package/dist/Effect-99HYQdzZ.d.mts.map +1 -0
  3. package/dist/{Effect-Dewn7MLc.d.cts → Effect-Bf8fz_zC.d.cts} +50 -33
  4. package/dist/Effect-Bf8fz_zC.d.cts.map +1 -0
  5. package/dist/compile.cjs +1510 -122
  6. package/dist/compile.d.cts +268 -1
  7. package/dist/compile.d.cts.map +1 -1
  8. package/dist/compile.d.mts +268 -1
  9. package/dist/compile.d.mts.map +1 -1
  10. package/dist/compile.mjs +1507 -123
  11. package/dist/compile.mjs.map +1 -1
  12. package/dist/dev.d.cts +1 -1
  13. package/dist/dev.d.mts +1 -1
  14. package/dist/{fromWebSocket-DrN-IduP.cjs → fromWebSocket-Cdoghvmh.cjs} +15 -0
  15. package/dist/{fromWebSocket-CFGoMkV2.mjs → fromWebSocket-ERhd9KZR.mjs} +11 -2
  16. package/dist/fromWebSocket-ERhd9KZR.mjs.map +1 -0
  17. package/dist/index.cjs +266 -105
  18. package/dist/index.d.cts +54 -12
  19. package/dist/index.d.cts.map +1 -1
  20. package/dist/index.d.mts +54 -12
  21. package/dist/index.d.mts.map +1 -1
  22. package/dist/index.mjs +266 -105
  23. package/dist/index.mjs.map +1 -1
  24. package/dist/runtime.iife.js +1 -0
  25. package/dist/slotAutoClose-BbKfzpkz.cjs +177 -0
  26. package/dist/slotAutoClose-CgDkf8fM.mjs +156 -0
  27. package/dist/slotAutoClose-CgDkf8fM.mjs.map +1 -0
  28. package/dist/ssr.cjs +29 -1
  29. package/dist/ssr.d.cts +32 -1
  30. package/dist/ssr.d.cts.map +1 -1
  31. package/dist/ssr.d.mts +32 -1
  32. package/dist/ssr.d.mts.map +1 -1
  33. package/dist/ssr.mjs +25 -2
  34. package/dist/ssr.mjs.map +1 -1
  35. package/package.json +8 -5
  36. package/dist/Effect-DazmAdyC.d.mts.map +0 -1
  37. package/dist/Effect-Dewn7MLc.d.cts.map +0 -1
  38. package/dist/fromWebSocket-CFGoMkV2.mjs.map +0 -1
@@ -0,0 +1 @@
1
+ var TorporView=(function(e){Object.defineProperty(e,Symbol.toStringTag,{value:`Module`});let t=Symbol.for(`torp.Context`),n=globalThis[t]??={activeTarget:null,previousEffect:null,extent:0,batch:0,batchOperation:0,registerComputed:null,effectsToRun:[],firstSignalToUpdate:null,lastSignalToUpdate:null,activeRegion:null,previousRegion:null,rootRegion:null,awaitBoundary:null,suspendPeek:!1,suspendPeekHit:!1,refreshSignals:null,refreshInitialized:null,mountEffects:[],stashedEvents:[],stashedAnimations:[],hydrationNode:null,serverValues:null};function r(e,t,r){n.stashedAnimations.push({region:n.activeRegion,el:e,in:t,out:r})}function i(e,t,r){r!=null&&n.stashedEvents.push({el:e,type:t,listener:r})}function a(e){return e.nodeType===3}let o=/^\^(?:\d+)?$/;function s(e){return o.test(e)}function c(e){if(!e.startsWith(`^`)||e.length===1)return;let t=Number(e.slice(1));return Number.isNaN(t)?void 0:t}function l(e){return e.nodeType===8}function u(e){if(e!==null&&l(e)&&s(e.data)){let t=e;e=e.nextSibling,t.remove()}return n.hydrationNode=e,e}function d(e,t=!1){if(n.hydrationNode!==null){if(t&&a(e))return e;let r=u(e.nextSibling);for(;!t&&r!==null&&a(r)&&r.textContent?.trim()===``;)r=u(r.nextSibling);return!t&&r!==null&&r.nodeName===`TBODY`&&r.firstChild&&a(e)&&(r=r.firstChild,n.hydrationNode=r),r}return e.nextSibling}let f=Symbol.for(`t_dev_context`),p=()=>{},m=globalThis[f]??={enabled:!1,depth:0,index:-1,boundaries:[],format:()=>``,getDetails:()=>``,unmark:p,mark:p,onWatch:p,onRun:p,onRegionPushed:p,onRegionPopped:p,onRegionCleared:p,signalSet:p,effectRun:p};function h(e,t){if(m.enabled&&!e)throw Error(t)}function g(e){let t=null;for(let n=e.firstSource;n!==null;n=n.nextSource)e.didError||!n.active?(t===null?e.firstSource=n.nextSource:t.nextSource=n.nextSource,n.previousTarget===null?n.source.firstTarget===n&&(n.source.firstTarget=n.nextTarget):n.previousTarget.nextTarget=n.nextTarget):(n.recalc=!1,t=n)}function _(e){for(let t=e.firstSource;t!==null;t=t.nextSource)t.active=!1}function v(e){let t=n.activeTarget;if(t!==null){for(let n=t.firstSource;n!==null;n=n.nextSource)if(n.source===e){n.active=!0;return}let n=e.firstTarget,r={source:e,target:t,previousTarget:null,nextTarget:n,nextSource:t.firstSource,active:!0,recalc:!1};n!==null&&(n.previousTarget=r),e.firstTarget=r,t.firstSource=r}}function y(e){let t=n.activeTarget;e.running=!0,e.didError=!1,e.didSuspend=!1;try{n.activeTarget=e,e.value=e.run()}catch(t){throw e.didError=!0,e.value=t,t}finally{n.activeTarget=t,e.running=!1}return v(e),e.value}function ee(e){let t=te(e),n=!1;if(t){_(e);let t=e.value;y(e),n=e.value!==t,g(e)}if(e.recalc=!1,!n)for(let t=e.firstTarget;t!==null;t=t.nextTarget)t.active=!0,t.recalc=!1;return n}function te(e){let t=!1;for(let n=e.firstSource;n!==null;n=n.nextSource)if(n.recalc){if(n.source.type===0)return!0;if(n.source.recalc)t=!0;else return!0}if(t){for(let t=e.firstSource;t!==null;t=t.nextSource)if(t.recalc&&t.source.type===1&&t.source.recalc){let r=n.activeTarget;n.activeTarget=e;let i=ee(t.source);if(n.activeTarget=r,i)return!0}}return!1}function ne(e){let t=e;for(let r=0;r<e.extent&&t!==null;r++){if(typeof t.cleanup==`function`){let e=n.activeTarget;n.activeTarget=null;try{t.cleanup()}catch(e){throw t.didError=!0,g(t),e}finally{t.cleanup=void 0,n.activeTarget=e}}t=t.nextEffect}}function re(e){te(e)&&(ne(e),_(e),S(e),g(e))}function ie(e,t){let n=e.region??null;for(;n!==null;){let r=n.errorBoundary;if(r!==void 0&&r.effect!==null){let n=r.effect,i=[];for(let e=n.firstSource;e!==null;e=e.nextSource)i.push(e.source);for(let t of e.errorSources??[])i.includes(t)||i.push(t);return r.error=t,r.hasError=!0,r.heldSignals=i,ne(n),_(n),S(n),g(n),!0}let i=n.depth,a=n.previousRegion;for(;a!==null&&a.depth>=i;)a=a.previousRegion;n=a}return!1}function ae(e){let t=e.suspendSources;if(!t||t.size===0)return;let r=n.activeTarget;n.activeTarget=e;for(let e of t)v(e);n.activeTarget=r}function oe(){let e=null,t=n.effectsToRun;for(let r=0;r<t.length;r++){let i=t[r];n.batchOperation++,i.queued=!1;try{re(i)}catch(t){let n=!1;try{n=ie(i,t)}catch(t){e===null&&(e={error:t})}n||(ae(i),e===null&&(e={error:t}))}}for(let e of t)e.queued=!1;n.effectsToRun=[];let r=n.firstSignalToUpdate;for(n.firstSignalToUpdate=null,n.lastSignalToUpdate=null;r!==null;){let e=r.nextSignalToUpdate;r.nextSignalToUpdate=null,r=e}if(e!==null)throw e.error}function b(){if(h(n.batch>0,`batchEnd called without a matching batchStart`),n.batch>1)n.batch--;else try{oe()}finally{n.batch=0,n.batchOperation=0,n.previousEffect=null}}function x(){n.batch++}function S(e){m.effectRun(e);let t=n.activeTarget,r=n.extent;e.didError=!1,e.errorSources=null,e.didSuspend=!1,e.suspendSources=null,x();try{n.previousEffect!==null&&(n.previousEffect.nextEffect=e),n.activeTarget=e,n.previousEffect=e,n.extent=1,e.cleanup=e.run(),e.extent=n.extent}catch(t){e.didError=!0;let n=null;for(let t=e.firstSource;t!==null;t=t.nextSource)(n??=[]).push(t.source);throw e.errorSources=n,g(e),t}finally{n.activeTarget=t,n.extent+=r-1,b()}}function C(e,t,r){let i={type:2,run:e,cleanup:void 0,firstSource:null,nextEffect:null,extent:0,queued:!1,didError:!1,didSuspend:!1,region:null,errorSources:null,name:t,isMountEffect:r?.isMountEffect,forVarMask:r?.forVarMask},a=n.activeRegion;return a!==null&&(a.effects.push(i),i.region=a),m.onRun(i),S(i),i}function se(e){let t=n.activeTarget;n.activeTarget=null;let r=e();return n.activeTarget=t,r}function ce(){if(n.mountEffects.length===0)return;let e=n.activeRegion;for(let e of n.mountEffects)n.activeRegion=e.region,C(()=>le(e.fn),void 0,{isMountEffect:!0});n.activeRegion=e,n.mountEffects.length=0}function le(e){if(!m.enabled)return se(e);let t=e(),r=n.activeTarget;return r!==null&&r.type===2&&r.firstSource!==null&&(console.warn(`[torpor] A $onmount/onmount callback read reactive state, but mount callbacks run only once and will not re-run. Wrap the reactive part in $run(), e.g. $onmount(() => { $run(() => ...); });`),_(r),g(r)),t}function w(e){return/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)(?:[a-z%]+)?$/i.test(e.trim())?Number.parseFloat(e):null}function T(e){return w(e)===0}function E(e){return w(e)===1}function D(e,t,n){return e.length===t&&e.every(n)}function ue(e,t){switch(e){case`matrix`:{let e=t.map(w);return e.length===6&&e[0]===1&&e[1]===0&&e[2]===0&&e[3]===1&&e[4]===0&&e[5]===0}case`matrix3d`:{let e=t.map(w),n=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return e.length===16&&e.every((e,t)=>e===n[t])}case`translate`:return t.length>=1&&t.length<=2&&t.every(T);case`translatex`:case`translatey`:case`translatez`:return D(t,1,T);case`translate3d`:return D(t,3,T);case`scale`:return t.length>=1&&t.length<=2&&t.every(E);case`scalex`:case`scaley`:case`scalez`:return D(t,1,E);case`scale3d`:return D(t,3,E);case`rotate`:case`rotatex`:case`rotatey`:case`rotatez`:case`skewx`:case`skewy`:return D(t,1,T);case`rotate3d`:return t.length===4&&T(t[3]);case`skew`:return t.length>=1&&t.length<=2&&t.every(T);default:return!1}}function O(e){let t=e.trim().toLowerCase();if(t===``||t===`none`)return!0;let n=t;for(;n.length>0;){let e=/^([a-z0-9]+)\(([^()]*)\)/.exec(n);if(!e)return!1;let t=e[2].split(`,`).map(e=>e.trim());if(!ue(e[1],t))return!1;n=n.slice(e[0].length).trim()}return!0}function de(e){if(e===null)return null;if(Array.isArray(e)){let t=e.length-1;for(;t>=0&&e[t]==null;)t--;if(t<0)return e;let n=e[t];if(typeof n.transform!=`string`||!O(n.transform))return e;let r=e.slice();return r[t]={...n,transform:`none`},r}let t=e.transform;if(Array.isArray(t)){let n=t[t.length-1];if(typeof n!=`string`||!O(n))return e;let r=t.slice();return r[r.length-1]=`none`,{...e,transform:r}}return typeof t==`string`&&O(t)?{...e,transform:`none`}:e}async function fe(e,t,r,i){let a=Object.assign({direction:t?`normal`:`reverse`,duration:300,easing:`ease-in-out`,fill:`forwards`},i),o=a.fill===`forwards`||a.fill===`both`,s=t===!0&&o?de(r):r,c=e.animate(s,a);setTimeout(()=>{c.timeline=e.ownerDocument.timeline},1);let l=n.activeRegion;l.animations??=/* @__PURE__ */ new Set,l.animations.add(c),await c.finished}let pe=/* @__PURE__ */ new Set(/* @__PURE__ */ `auxclick.beforeinput.change.click.compositionend.compositionstart.compositionupdate.contextmenu.dblclick.drag.dragend.dragenter.dragleave.dragover.dragstart.drop.focusin.focusout.input.keydown.keypress.keyup.mousedown.mousemove.mouseout.mouseover.mouseup.pointerdown.pointermove.pointerout.pointerover.pointerup.reset.submit.touchend.touchmove.touchstart.wheel`.split(`.`));function me(e){return pe.has(e)}let he=`torp.$$`,ge=Symbol.for(`torp.delegated.registered`);function _e(e){let t=e.target,n=e.currentTarget,r=he+e.type;for(;t!=null&&t!==n;){let n=t[r];if(n!==void 0){Object.defineProperty(e,"currentTarget",{configurable:!0,value:t,writable:!1});try{n.call(t,e)}finally{delete e.currentTarget}return}t=t.parentNode}}function ve(e){if(typeof document>`u`)return;let t=document[ge];t||(t=/* @__PURE__ */ new Set,document[ge]=t),!t.has(e)&&(t.add(e),document.addEventListener(e,_e))}function ye(e,t,n){let r=he+t;n==null?e[r]=void 0:(ve(t),e[r]=n)}let k=`torp.$directListeners`;function be(e,t,n){let r=e[k];r||(r=[],e[k]=r),r.push({type:t,listener:n})}function xe(e,t){for(let n of pe){let r=he+n,i=e[r];i!==void 0&&(t[r]=i)}let n=e[k];if(n){t[k]=n;for(let{type:e,listener:r}of n)t.addEventListener(e,r)}}function Se(e){return e.nodeType===11}function Ce(e,t,r){if(!Se(e)){if(r===null&&ce(),n.stashedEvents.length>0){for(let e of n.stashedEvents)me(e.type)?ye(e.el,e.type,e.listener):(e.el.addEventListener(e.type,e.listener),be(e.el,e.type,e.listener));n.stashedEvents.length=0}for(let e of n.stashedAnimations)n.activeRegion=e.region,C(function(){if(e.in!==void 0&&fe(e.el,!0,e.in.keyframes,e.in.options),e.out!==void 0)return()=>{fe(e.el,!1,e.out.keyframes,e.out.options)}});n.stashedAnimations.length=0,n.activeRegion=t}}function we(e,t,r){let i=n.activeRegion,a=n.hydrationNode;i.startNode=e,i.endNode=e,t=r?.parentNode??t,a===null&&t.insertBefore(e,r),Ce(t,i,a),a!==null&&d(e)}function Te(e,t,r,i,a){let o=n.activeRegion,s=n.hydrationNode;s===null?(o.startNode=e.firstChild,o.endNode=e.lastChild):(a!==void 0&&a.parentNode!==null&&(o.startNode=a),o.endNode=i??s),t=r?.parentNode??t,s===null&&t.insertBefore(e,r),Ce(t,o,s),s!==null&&i!==void 0&&d(i)}function Ee(e,t,n){if(t!==void 0){for(let[r,i]of Object.entries(t))if(!n.includes(r)){if(r.startsWith(`on`)){let t=r.substring(2);me(t)?ye(e,t,i):e.addEventListener(t,i)}else C(function(){e.setAttribute(r,i)})}}}let A=Symbol.for(`torp.ProxyData`),j=Symbol.for(`torp.ProxyKeys`);function M(e){return e!=null&&e[A]!==void 0?e[A].target??e:e}function De(e,t){if(typeof e==`string`)return t!==void 0&&(e+=` `+t),e;{let n=[];return N(``,e,n),t!==void 0&&n.push(t),n.join(` `)}}function N(e,t,n){if(t){if(t=M(t),Array.isArray(t))for(let e of t)N(e,e,n);else if(typeof t==`object`)for(let e in t)N(e,t[e],n);else n.push(e)}}let Oe=/[A-Z]+(?![a-z])|[A-Z]/g;function ke(e){if(typeof e==`string`)return e;{let t=[];return Ae(e,t),t.join(`; `)}}function Ae(e,t){if(e){if(Array.isArray(e))for(let n of e)Ae(n,t);else if(typeof e==`object`)for(let[n,r]of Object.entries(e)){if(r==null)continue;let e=n.replace(Oe,(e,t)=>(t>0?`-`:``)+e.toLowerCase());t.push(`${e}: ${r}`)}else t.push(String(e))}}function P(e){m.onRegionCleared(e);let t=e.animations===null?void 0:Array.from(e.animations),n=e.nextRegion;for(;n!==null&&n.depth>e.depth;){n.animations!==null&&(t??=[],t.push(...n.animations));let e=n.nextRegion;Me(n),n.depth=-2,n=e}e.nextRegion=n,e.previousRegion!==null&&(e.previousRegion.nextRegion=e.nextRegion),e.nextRegion!==null&&(e.nextRegion.previousRegion=e.previousRegion),t===void 0?je(e):(t.forEach(e=>{e.reverse(),e.play()}),Promise.all(t.map(e=>e.finished)).then(()=>je(e)))}function je(e){if(e.startNode!==null&&e.endNode!==null){let t=e.endNode.nextSibling,n=e.startNode,r=e.startNode.parentNode===null,i=!1;if(r){let t=e.previousRegion;for(;t!==null&&t.depth>e.depth;)t=t.previousRegion;t!==null&&t.endNode!==null&&t.endNode.parentNode!==null&&(n=t.endNode,i=!0)}let a=e.endNode;for(;a!==null&&a!==n;){let e=a.previousSibling;if(a.remove(),e===null)break;a=e}!i&&a===e.startNode&&a.remove();let o=i?n:t;if(o!==null){let t=e.previousRegion,n=e.depth;for(;t!==null&&t.depth<n;)t.startNode!==null&&t.startNode.parentNode===null&&(t.startNode=o),n=t.depth,t=t.previousRegion}}Me(e)}function Me(e){e.generation=-1,e.startNode=null,e.endNode=null,e.previousRegion=null,e.nextRegion=null,e.animations=null,e.errorBoundary=void 0;for(let t of e.effects){typeof t.cleanup==`function`&&(t.cleanup(),t.cleanup=void 0);let e=t.firstSource;for(t.firstSource=null;e!==null;){let t=e.nextSource,n=e.previousTarget,r=e.nextTarget;n===null?e.source.firstTarget===e&&(e.source.firstTarget=r):n.nextTarget=r,r!==null&&(r.previousTarget=n),e.previousTarget=null,e.nextTarget=null,e.nextSource=null,e=t}}e.effects.length=0}function F(e){return{startNode:null,endNode:null,previousRegion:null,nextRegion:null,depth:-1,animations:null,name:e,effects:[]}}function I(e){n.activeRegion=e,m.onRegionPopped()}function L(e,t=!1){let r=n.activeRegion;if(t){let t=n.previousRegion;e.previousRegion=t;let i=t.nextRegion;t.nextRegion=e,e.nextRegion=i,i!==null&&(i.previousRegion=e),e.depth=r.depth+1}return n.activeRegion=e,n.previousRegion=e,m.onRegionPushed(e,t),r}let R=/* @__PURE__ */ new WeakMap;function Ne(e,t){R.set(e,t)}function Pe(e,t,n,r,i,a){let o=F(m.enabled?`Layout slot`:void 0),s=L(o,!0),c=R.get(n);return c!==void 0&&(o.depth=c,R.delete(n)),e(n,r,i,a,{_:t}),I(s),o}function Fe(e){n.previousRegion=e.previousRegion;let t=e.startNode?.parentNode;t&&Ne(t,e.depth),P(e)}function Ie(e){return e==null?``:typeof e==`string`?e:String(M(e))}let Le=/* @__PURE__ */ new WeakMap;function Re(e,t){Le.set(e,t)}function ze(e){return Le.get(e)}function Be(e,t,n,r,i){if(t[n]===void 0){if(i===!0){let i=e.createElementNS(`http://www.w3.org/2000/svg`,`template`);i.innerHTML=r;let a=new DocumentFragment;a.append(...i.childNodes),t[n]=a}else{let i=e.createElement(`template`);i.innerHTML=r,t[n]=i.content}}return t[n].cloneNode(!0)}function Ve(e,t,n,r,i){if(t[n]===void 0){if(i===!0){let i=e.createElementNS(`http://www.w3.org/2000/svg`,`template`);i.innerHTML=r,t[n]=i.firstElementChild}else{let i=e.createElement(`template`);i.innerHTML=r,t[n]=i.content.firstElementChild}}return t[n].cloneNode(!0)}function He(e){return e.constructor?.name===`AsyncFunction`}let z=/* @__PURE__ */ new Map;function Ue(e,t){z.set(e,t)}function We(e){return z.get(e)}function B(e){z.delete(e)}function Ge(e){let t=[];for(let n of z)n[0]!==e&&e.contains(n[0])&&t.push(n);return t}function Ke(e,t,r,i){if(He(t))throw Error(`The component was compiled for SSR (it renders to an HTML string) and cannot be hydrated in the browser. Import the client build instead, e.g. with the '?client' import query`);let a=n.rootRegion===null?null:{activeRegion:n.activeRegion,hydrationNode:n.hydrationNode,previousRegion:n.previousRegion,rootRegion:n.rootRegion};n.hydrationNode=e.firstChild;let o=F(m.enabled?`Root`:void 0);n.rootRegion=o,n.previousRegion=o,L(o),t(e,null,r,void 0,i),n.hydrationNode=null,ce(),a===null||(n.hydrationNode=a.hydrationNode,n.rootRegion=a.rootRegion,n.previousRegion=a.previousRegion,n.activeRegion=a.activeRegion),Ue(e,o)}function qe(e,t,r,i){if(He(t))throw Error(`The component was compiled for SSR (it renders to an HTML string) and cannot be mounted in the browser. Import the client build instead, e.g. with the '?client' import query`);if(e.childElementCount>0)throw Error(`The parent node must have no child elements`);for(;e.firstChild!==null;)e.firstChild.remove();let a=n.rootRegion===null?null:{activeRegion:n.activeRegion,previousRegion:n.previousRegion,rootRegion:n.rootRegion},o=F(m.enabled?`Root`:void 0);n.rootRegion=o,n.previousRegion=o,L(o),t(e,null,r,void 0,i),a!==null&&(n.rootRegion=a.rootRegion,n.previousRegion=a.previousRegion,n.activeRegion=a.activeRegion),Ue(e,o)}function Je(e){let t=We(e);for(let[t,n]of Ge(e))P(n),B(t);for(t!==void 0&&t!==n.rootRegion?(P(t),B(e)):(n.rootRegion!==null&&(P(n.rootRegion),n.rootRegion=null,n.previousRegion=null,n.activeRegion=null),t!==void 0&&B(e));e.firstChild!==null;)e.firstChild.remove()}function Ye(e,t,n){return{startNode:null,endNode:null,previousRegion:null,nextRegion:null,depth:-1,animations:null,name:n,data:e,key:t,effects:[]}}let V=/* @__PURE__ */ new WeakMap;function Xe(e,t){V.set(e,t)}function Ze(e){let t=V.get(e);return t!==void 0&&V.delete(e),t}function Qe(e){if(n.hydrationNode!==null&&l(e)&&e.data===`[`){let t=e.parentNode,r,i=e.nextSibling;for(;i!==null&&a(i)&&(i.textContent??``).trim()===``;)i=i.nextSibling;i!==null&&l(i)&&s(i.data)&&(r=c(i.data));let o=d(e);for(e.remove();o!==null&&l(o)&&s(o.data);){r===void 0&&(r=c(o.data));let e=o.nextSibling;o.remove(),o=e,n.hydrationNode=o}let u=o,f=1;for(;o!==null;){if(l(o)){if(o.data===`[`)f+=1;else if(o.data===`]`&&(--f,f===0)){let e=o.nextSibling;o.remove(),n.hydrationNode===o&&(n.hydrationNode=e);let t=u===o?null:u,i=n.activeRegion;return i.startNode===null&&(i.startNode=t??e),Re(e,t),r!==void 0&&Xe(e,r),e}}if(o.firstChild)o=o.firstChild;else if(o.nextSibling)o=o.nextSibling;else{let e=o.parentNode;for(;e!==null&&e.nextSibling===null&&e!==t;)e=e.parentNode;o=e===null||e===t?null:e.nextSibling}}if(o===null)throw Error(`End hydration comment not found`)}return e}function $e(e){let t=e.firstChild;return n.hydrationNode!==null&&(t===null&&(t=e.appendChild(e.ownerDocument.createTextNode(``))),n.hydrationNode=t),t}function et(){let e=n.hydrationNode;for(;e!==null&&tt(e);){let t=e.nextSibling;l(e)&&s(e.data)&&e.remove(),e=t,n.hydrationNode=e}for(;e!==null&&e.nodeName===`TBODY`&&e.firstChild!==null;)e=e.firstChild,n.hydrationNode=e;let t=n.activeRegion,r=e!==null&&l(e)&&e.data===`[`;return t.startNode===null&&!r&&(t.startNode=e),e}function tt(e){return a(e)&&(e.textContent??``).trim()===``?!0:l(e)?s(e.data)||e.data===``:!1}function nt(e){return n.hydrationNode===null?e:et()}function rt(e,t=!1){if(n.hydrationNode!==null){let e=n.hydrationNode;if(t&&!a(e)&&e.previousSibling!==null&&a(e.previousSibling)&&(e=e.previousSibling,n.hydrationNode=e),!t)return et();let r=n.activeRegion,i=e!==null&&l(e)&&e.data===`[`;return r.startNode===null&&!i&&(r.startNode=e),e}return e.firstChild}function it(e,t,r=0){let i=e;if(n.hydrationNode!==null){if(r===0)for(let e=0;e<t;e++)i=u(i.nextSibling);else for(let e=0;e<t;e++)i=d(i,!!(r&1<<e))}else for(let e=0;e<t;e++)i=i.nextSibling;return i}function at(e,t){ot(e,t);let n=e.nextRegion;for(;n!==null&&n.depth>e.depth;)ot(n,t),n=n.nextRegion}function ot(e,t){for(let n of e.effects)n.isMountEffect||(n.forVarMask===void 0||(n.forVarMask&t)!==0)&&(ne(n),_(n),S(n),g(n))}function st(e){n.hydrationNode=e}function H(e,t){if(t===null)return;let n=e.nextRegion;for(;n!==null&&n.depth>e.depth&&n.startNode===null;)n=n.nextRegion;if(n===null||n.depth<=e.depth||n.startNode===t)return;let r=n.startNode,i=e.previousRegion,a=e.depth;for(;i!==null&&i.depth<a;)i.startNode===t&&(i.startNode=r),a=i.depth,i=i.previousRegion}function ct(e,t,r,i){let a=!0;if(n.hydrationNode!==null&&t!==null){e.ssrBranchAnchor=t;let n=Ze(t);n!==void 0&&(e.ssrBranchIndex=n)}let o=e.generation=(e.generation??0)+1;C(function(){if(e.generation!==o)return;e.depth===-2&&(e.recreate=!0);let i=L(e,a);a=!1,r(t),I(i),H(e,t),t!==null&&(n.hydrationNode!==null||e.ssrBranchRecreated===!0)&&(e.ssrBranchRecreated=void 0,n.hydrationNode=t)},i)}function U(e,t,r,i){let a=e.recreate;a&&(e.recreate=!1);let o=e.ssrBranchAnchor;if(o!==void 0){e.ssrBranchAnchor=void 0;let t=e.ssrBranchIndex;e.ssrBranchIndex=void 0;let i=n.hydrationNode;i!==null&&(t!==void 0&&t!==r||t===void 0&&i===o)&&(e.ssrBranchRecreated=!0,ut(e,i,o))}let s=e.hasRenderedBranch!==!0;return e.hasRenderedBranch=!0,t===r?a?(e.nextRegion!==null&&e.nextRegion.depth>e.depth&&P(e.nextRegion),lt(e,i)):null:(!s&&e.nextRegion!==null&&e.nextRegion.depth>e.depth&&P(e.nextRegion),lt(e,i))}function lt(e,t){return n.previousRegion=e,L(F(m.enabled?t:void 0),!0)}function ut(e,t,r){let i=e.previousRegion,a=e.depth;for(;i!==null&&i.depth<a;)i.startNode===t&&(i.startNode=r),a=i.depth,i=i.previousRegion;n.hydrationNode=null;let o=t;for(;o!==null&&o!==r;){let e=o.nextSibling;o.remove(),o=e}}let dt=/* @__PURE__ */ new WeakMap;function ft(e,t){let n;for(let r=0;r<t.length;r++){let i=t[r].key;if(i==null)continue;if(n===void 0&&(n=/* @__PURE__ */ new Set),!n.has(i)){n.add(i);continue}let a=dt.get(e);a===void 0&&(a=/* @__PURE__ */ new Set,dt.set(e,a)),a.has(i)||(a.add(i),console.warn(`[torpor] Duplicate @key value ${pt(i)} in a keyed @for list. Keys must be unique, or updates and removals will affect the wrong rows.`))}}function pt(e){try{let t=JSON.stringify(e);return t===void 0?String(e):t}catch{return String(e)}}function W(e){let t=e.firstTarget;if(t===null)return;let r=t,i;outer:for(;;){r.active=!1,r.recalc=!0;let e=r.target;if(e.type===2)e.queued||(e.queued=!0,n.effectsToRun.push(e));else if(!e.recalc&&(e.recalc=!0,e.firstTarget!==null)){i=e,i.rollback=r,r=e.firstTarget;continue}for(;r.nextTarget===null&&i!==void 0;){let e=i.rollback;if(e===null)break;if(r=e,r.source.type!==1){i=void 0;continue outer}i=r.source}if(r.nextTarget===null)break;r=r.nextTarget}}function G(e,t){let r=e.signals.get(t);if(r!==void 0&&r.firstTarget!==null){x();try{h(n.firstSignalToUpdate===null==(n.lastSignalToUpdate===null),`Signal update chain head/tail out of sync`),n.lastSignalToUpdate===null?(n.firstSignalToUpdate=r,n.lastSignalToUpdate=r):r.nextSignalToUpdate===null&&(n.lastSignalToUpdate.nextSignalToUpdate=r,n.lastSignalToUpdate=r),W(r)}finally{b()}}}var mt=class extends Error{constructor(){super(`Suspended async value`),this.name=`AwaitSuspend`}};let K=/* @__PURE__ */ new WeakMap;function q(e){if(typeof e!=`object`||!e)return e;if(e[A]!==void 0)return K.get(e)??e;if(e.then!==void 0||e.nodeType!==void 0)return e;let t=K.get(e);if(t!==void 0)return t;let n=Ot(e);return K.set(e,n),n}function J(e,t){let n=e.signals.get(t);n===void 0&&(n={type:0,firstTarget:null,nextSignalToUpdate:null},e.signals.set(t,n)),v(n)}function ht(e){if(v(e),n.suspendPeek)e.suspendQuiet||(n.suspendPeekHit=!0);else{if(n.activeTarget!==null&&(n.activeTarget.didSuspend=!0,n.activeTarget.type===2)){let t=n.activeTarget;(t.suspendSources??=/* @__PURE__ */ new Set).add(e)}if(n.awaitBoundary!==null){n.awaitBoundary.suspended=!0,n.awaitBoundary.pending.add(e);let t=n.awaitBoundary.effect;if(t!==null&&t!==n.activeTarget){let r=n.activeTarget;n.activeTarget=t,v(e),n.activeTarget=r}if(e.settle===void 0||!e.settle.ok)throw new mt}return e.settle!==void 0&&e.settle.ok?e.settle.value:void 0}}function gt(e,t,r){let i=e[A];if(t===A)return i;if((i.isDate||i.isMap||i.isSet)&&!Object.prototype.hasOwnProperty.call(e,t))return yt(i,e,t,r);let a=i.signals.get(t);if(a===void 0){let a=Object.getOwnPropertyDescriptor(e,t);if(a!==void 0){if(a.writable){if(i.shallow!==!0){let n=e[t],r=q(n);r!==n&&(e[t]=r)}J(i,t)}else if(a.get){let a=n.registerComputed;try{n.registerComputed=e=>{i.signals.set(t,e)};let a=Reflect.get(e,t,r),o=i.signals.get(t);return n.refreshSignals!==null&&o!==void 0&&o.type===1&&o.isAsync&&(n.refreshSignals.push(o),n.refreshInitialized?.add(o)),o!==void 0&&o.type===1&&o.didSuspend?ht(o):a}finally{n.registerComputed=a}}}else if(i.isArray){if(_t[t]!==void 0)return _t[t](i,e,t)}else J(i,t)}else if(a.type===0){if(i.shallow!==!0){let n=e[t];if(typeof n==`object`&&n){let r=Object.getOwnPropertyDescriptor(e,t);if(r!==void 0&&r.writable){let r=q(n);r!==n&&(e[t]=r)}}}J(i,t)}else if(a.type===1){if(n.refreshSignals!==null&&a.isAsync)return n.refreshSignals.push(a),a.value;if(a.running)throw Error(`Cycle detected`);if(a.recalc&&ee(a),a.didError)throw v(a),a.value;return a.didSuspend?ht(a):(v(a),a.value)}return e[t]}let _t={[Symbol.iterator]:function(e,t,r){return J(e,`length`),n.activeTarget=null,function(){let n=0;return{next(){if(n>=t.length)return{value:void 0,done:!0};let r=t[n];if(e.shallow!==!0){let e=q(r);e!==r&&(r=e,t[n]=r)}return J(e,String(n)),n++,{value:r,done:!1}},[Symbol.iterator](){return this}}}},pop:X,push:X,reverse:X,shift:X,sort:X,splice:X,unshift:X,slice:Y,concat:Y,filter:Y,map:Y,toReversed:Y,toSorted:Y,toSpliced:Y,indexOf:Y,lastIndexOf:Y,includes:Y,find:Y,findIndex:Y,some:Y,every:Y,join:Y,forEach:Y,reduce:Y,reduceRight:Y,flat:Y,flatMap:Y,at:Y};function Y(e,t,n){return function(...r){return J(e,`length`),t[n].apply(t,r)}}function X(e,t,n){return function(...r){let i=t[n].apply(t,r);return G(e,`length`),n!==`sort`&&n!==`reverse`&&G(e,j),i}}let Z=Symbol(`torp.collection`),vt=`#time`;function yt(e,t,n,r){if(e.isDate)return bt(e,t,n);let i=(e.isMap?xt:Ct)[n];return i===void 0?t[n]:i(e,t,n,r)}function Q(e){let t=typeof e;return t===`string`||t===`number`||t===`symbol`?e:Z}function $(e,t){t!==Z&&G(e,t),G(e,Z)}function bt(e,t,n){if(typeof n==`symbol`)return n===Symbol.toPrimitive?function(n){let r=t[Symbol.toPrimitive](n);return J(e,vt),r}:t[n];if(typeof n!=`string`)return t[n];let r=t[n];return typeof r==`function`?n.startsWith(`set`)?function(...n){let i=t.getTime(),a=r.apply(t,n);return t.getTime()!==i&&G(e,vt),a}:n.startsWith(`get`)||n.startsWith(`to`)||n===`valueOf`?function(...n){let i=r.apply(t,n);return J(e,vt),i}:r:r}let xt={size:function(e,t){return J(e,Z),t.size},get:function(e,t){return function(n){n=M(n),J(e,Q(n));let r=t.get(n);if(e.shallow!==!0){let e=q(r);return e!==r&&t.set(n,e),e}return r}},has:function(e,t){return function(n){return n=M(n),J(e,Q(n)),t.has(n)}},set:function(e,t,n,r){return function(n,i){if(n=M(n),t.has(n)&&M(t.get(n))===M(i))return r??t;let a=t.set(n,i);return $(e,Q(n)),r??a}},delete:function(e,t){return function(n){n=M(n);let r=t.delete(n);return $(e,Q(n)),r}},clear:function(e,t){return function(){let n=t.clear();x();try{for(let t of e.signals.keys())G(e,t)}finally{b()}return n}},keys:function(e,t){return function(){return J(e,Z),[...t.keys()][Symbol.iterator]()}},values:function(e,t){return function(){J(e,Z);let n=[...t.values()];return e.shallow!==!0&&(n=n.map(q)),n[Symbol.iterator]()}},entries:St,[Symbol.iterator]:St,forEach:function(e,t,n,r){return function(n,i){J(e,Z);let a=e.shallow!==!0;t.forEach((e,o)=>{n.call(i,a?q(e):e,o,r??t)})}}};function St(e,t){return function(){J(e,Z);let n=e.shallow!==!0;return[...t.entries()].map(e=>[e[0],n?q(e[1]):e[1]])[Symbol.iterator]()}}let Ct={size:function(e,t){return J(e,Z),t.size},has:function(e,t){return function(n){return n=M(n),J(e,Q(n)),t.has(n)}},add:function(e,t,n,r){return function(n){if(n=M(n),t.has(n))return r??t;let i=t.add(n);return $(e,Q(n)),r??i}},delete:function(e,t){return function(n){n=M(n);let r=t.delete(n);return $(e,Q(n)),r}},clear:function(e,t){return function(){let n=t.clear();x();try{for(let t of e.signals.keys())G(e,t)}finally{b()}return n}},keys:wt,values:wt,[Symbol.iterator]:wt,entries:Tt,forEach:function(e,t,n,r){return function(n,i){J(e,Z);let a=e.shallow!==!0;t.forEach(e=>{let o=a?q(e):e;n.call(i,o,o,r??t)})}}};function wt(e,t){return function(){J(e,Z);let n=[...t.values()];return e.shallow!==!0&&(n=n.map(q)),n[Symbol.iterator]()}}function Tt(e,t){return function(){J(e,Z);let n=e.shallow!==!0;return[...t.values()].map(e=>{let t=n?q(e):e;return[t,t]})[Symbol.iterator]()}}function Et(e,t,r,i){let a=e[t];if(r!==a){if(n.batchOperation>100)throw Error(`Cycle detected`);let a=e[A];m.signalSet(a,t),a.shallow!==!0&&(r=q(r));let o=!Object.prototype.hasOwnProperty.call(e,t);Reflect.set(e,t,r,i),G(a,t),o&&G(a,j),a.isArray&&typeof t!=`symbol`&&!isNaN(+t)&&G(a,`length`)}return!0}let Dt={get:gt,set:Et,ownKeys:e=>{let t=e[A];return t!==void 0&&J(t,j),Reflect.ownKeys(e)},deleteProperty:(e,t)=>{let n=Reflect.deleteProperty(e,t),r=e[A];return n&&r!==void 0&&(G(r,t),G(r,j)),n}};function Ot(e,t){if(e==null||e[A]!==void 0)return e;let n={target:e,isArray:Array.isArray(e),isDate:e instanceof Date,isMap:e instanceof Map,isSet:e instanceof Set,shallow:t?.shallow===!0,signals:/* @__PURE__ */ new Map};Object.defineProperty(e,A,{value:n,writable:!0,enumerable:!1,configurable:!0});let r=new Proxy(e,Dt);return m.onWatch(n),r}function kt(e){let t=e.slice(),n=[0],r,i,a,o,s,c=e.length;for(r=0;r<c;r++){let c=e[r];if(c!==0){if(i=n[n.length-1],e[i]<c){t[r]=i,n.push(r);continue}for(a=0,o=n.length-1;a<o;)s=a+o>>1,e[n[s]]<c?a=s+1:o=s;c<e[n[a]]&&(a>0&&(t[r]=n[a-1]),n[a]=r)}}for(a=n.length,o=n[a-1];a-->0;)n[a]=o,o=t[o];return n}function At(e,t,n){e=n?.parentNode??e;let r=t.endNode??t.startNode,i=t.startNode;for(;i!==null;){let t=i.nextSibling;if(e.insertBefore(i,n),i===r)break;i=t}}let jt={shallow:!0};function Mt(e,t,r,i,a,o){let s=Ye(e.data,e.key),c=n.activeRegion;s.depth=t.depth+1,n.activeRegion=s,o!==!0&&(s.data=Ot(s.data,jt));let l=n.hydrationNode!==null&&n.hydrationNode===i,u=n.hydrationNode;return l&&(n.hydrationNode=null),a(s,r),l&&(n.hydrationNode=u),n.activeRegion=c,s}function Nt(e,t,r,i,a,o,s,c){let l=Array.from({length:a.length}),u;if(i.length>0){let e=i[i.length-1];for(u=e.nextRegion;u!==null&&u.depth>e.depth;)u=u.nextRegion}else u=e.nextRegion;let d=0,f=i.length-1,p=0,m=a.length-1,h=!1;for(;d<=f&&p<=m;)if(i[d].key===a[p].key){let e=i[d];e.data!==a[p].data&&s(e,a[p]),l[p]=e,d++,p++}else if(i[f].key===a[m].key){let e=i[f];e.data!==a[m].data&&s(e,a[m]),l[m]=e,f--,m--}else if(i[d].key===a[m].key){let e=i[d];At(t,e,i[f].endNode?.nextSibling??r),h=!0,e.data!==a[m].data&&s(e,a[m]),l[m]=e,d++,m--}else if(i[f].key===a[p].key){let e=i[f];At(t,e,i[d].startNode),h=!0,e.data!==a[p].data&&s(e,a[p]),l[p]=e,f--,p++}else break;if(d>f&&p<=m){let t=m+1<a.length?l[m+1].startNode:r;for(let n=p;n<=m;n++)l[n]=Mt(a[n],e,t,r,o,c);h=!0}else if(p>m)for(let e=d;e<=f;e++)P(i[e]);else{let n=/* @__PURE__ */ new Map;for(let e=p;e<=m;e++)n.set(a[e].key,e);let u=!1;for(let e=d;e<=f;e++)if(n.has(i[e].key)){u=!0;break}if(u){let u=m-p+1,g=Array.from({length:u}).fill(0);for(let e=d;e<=f;e++){let t=i[e],r=n.get(t.key);r===void 0?P(t):(g[r-p]=e+1,t.data!==a[r].data&&s(t,a[r]),l[r]=t)}let _=kt(g),v=_.length-1;for(let n=u-1;n>=0;n--){let i=p+n,s=i+1<a.length?l[i+1].startNode:r;g[n]===0?(l[i]=Mt(a[i],e,s,r,o,c),h=!0):v<0||n!==_[v]?(At(t,l[i],s),h=!0):v--}}else{let t=i[f]?.endNode?.nextSibling??r;for(let e=f;e>=d;e--)P(i[e]);for(let n=p;n<=m;n++)l[n]=Mt(a[n],e,t,r,o,c),t=l[n].endNode.nextSibling;h=!0}}if(!h&&l.length>0){let e=l[l.length-1],t=e.nextRegion;for(;t!==null&&t.depth>e.depth;)e=t,t=t.nextRegion;return n.previousRegion=e,l}if(l.length>0){let t=e;for(let e=0;e<l.length;e++){let n=l[e];n.previousRegion=t,t.nextRegion=n;let r=n,i=n.nextRegion;for(;i!==null&&i.depth>n.depth;)r=i,i=i.nextRegion;t=r}t.nextRegion=u,u!==null&&(u.previousRegion=t),e.nextRegion=l[0],n.previousRegion=t}else e.nextRegion=u,u!==null&&(u.previousRegion=e),n.previousRegion=e;return l}function Pt(e,t,r,i,a,o,s){let c=!0,l=[];C(function(){if(e.depth===-2)return;let u=L(e,c);c=!1;let d=i();m.enabled&&ft(e,d),n.activeTarget=null,l=Nt(e,t,r,l,d,a,o,s),I(u)})}function Ft(e,t,r,i,a){let o={suspended:!1,pending:/* @__PURE__ */ new Set,effect:null},s=-1,c=!0,u=!1,d=null,f=null;if(n.hydrationNode!==null&&t!==null){let e=t.nextSibling;if(e!==null&&l(e)&&e.data.startsWith(`t-await:`)){try{f=JSON.parse(e.data.substring(8))}catch{f=null}e.remove()}}let p=e.generation=(e.generation??0)+1;C(function(){if(e.generation!==p)return;d=n.activeTarget,o.effect=d;let a=L(e,c);c=!1;let l=(n,r)=>{let i=U(e,s,n,n===0?`await_content`:`await_with`);if(i!==null){try{r(t)}finally{I(i)}s=n}},m=()=>{let t=n.awaitBoundary;n.awaitBoundary=o,o.suspended=!1;let a=n.hydrationNode,c=n.serverValues;f!==null&&a!==null?n.serverValues={values:f,index:0}:a!==null&&(n.hydrationNode=null);let d=!1;try{l(0,r)}catch(e){if(!(e instanceof mt))throw e;d=!0,s=0}finally{n.hydrationNode=a,n.serverValues=c,n.awaitBoundary=t}if(o.suspended&&i!==null)l(1,i);else if(o.suspended&&d){let t=U(e,s,1,`await_with`);t!==null&&I(t),s=1}else o.suspended||(u=!0)};if(d===null)m();else{let t=!1;for(let e of o.pending)e.didSuspend?(t=!0,v(e)):o.pending.delete(e);let n=+!!t;if(n!==s){if(n===0)m();else if(!u){if(i!==null)l(1,i);else{let t=U(e,s,1,`await_with`);t!==null&&I(t),s=1}}}}I(a),H(e,t)},a)}function It(){return n.hydrationNode}function Lt(e,t,r,i,a){let o={error:void 0,hasError:!1,effect:null,heldSignals:null};i!==null&&(e.errorBoundary=o);let s=-1,c=!0,l=e.generation=(e.generation??0)+1;C(function(){if(e.generation!==l)return;let a=n.activeTarget;o.effect=a;let u=L(e,c);c=!1;let d=(n,r)=>{let i=U(e,s,n,n===0?`try`:`catch`);i!==null&&(r(t),I(i),s=n)},f=()=>{if(o.heldSignals!==null&&a!==null)for(let e of o.heldSignals)v(e)},p=o.hasError,m=o.error;if(o.hasError=!1,p&&i!==null)s=-1,d(1,e=>i(e,m)),f();else if(s!==0){let t=It();try{d(0,r),o.heldSignals=null}catch(n){if(L(e),st(t),i!==null)s=-1,d(1,e=>i(e,n)),f();else throw n}}I(u),H(e,t),n.hydrationNode!==null&&t!==null&&(n.hydrationNode=t)},a)}function Rt(e,t){if(t){let e=document.head.querySelector(t);if(e)return e}let n=document.createElement(e);return document.head.appendChild(n),n}function zt(e,t,n){n===!1||n==null?(e.removeAttribute(t),t===`value`&&Bt(e,``)):t===`value`&&Bt(e,String(n))||e.setAttribute(t,n)}function Bt(e,t){return e.tagName===`INPUT`||e.tagName===`SELECT`||e.tagName===`TEXTAREA`?(e.value=t,!0):!1}function Vt(e,t){if(n.hydrationNode!==null)return e;let r=e.ownerDocument.createElement(t);for(let t of e.attributes)r.setAttributeNS(null,t.name,t.value);return xe(e,r),r.replaceChildren(...e.childNodes.values()),e.replaceWith(r),r}function Ht(e,t){return n=>{let r=typeof e==`function`?e():e;if(!r)throw Error(`fromElement: element not found. When passing a &ref variable, wrap it in a getter: fromElement(() => buttonEl, "click")`);let i=n;return r.addEventListener(t,i),()=>{r.removeEventListener(t,i)}}}function Ut(e){return t=>{let n=new EventSource(typeof e==`function`?e():e);return n.onmessage=t,()=>{n.close()}}}function Wt(e){return t=>{let n=new WebSocket(typeof e==`function`?e():e);return n.onmessage=t,()=>{n.close()}}}function Gt(e){if(n.batch>0)return e();x();try{return e()}finally{b()}}function Kt(e,t){if(n.registerComputed===null)throw Error(`$async must be used in a getter`);let r={type:1,isAsync:!0,value:null,run:null,firstSource:null,firstTarget:null,recalc:!1,running:!1,didError:!1,didSuspend:!1,generation:0,settle:void 0,suspendQuiet:!1,rollback:null},i=n.serverValues,a=i!==null&&i.index<i.values.length?i.values[i.index]:void 0,o=!0;return r.run=()=>{let t=e(o?a:void 0);if(o=!1,t!=null&&typeof t.then==`function`){let e=++r.generation;r.didSuspend=!0,r.suspendQuiet=r.settle!==void 0&&!r.recalc,t.then(t=>{r.generation===e&&(h(r.didSuspend,`$async: resolved while not suspended (settle bookkeeping is broken)`),r.value=t,r.didSuspend=!1,r.settle={ok:!0,value:t},x(),W(r),b())},t=>{r.generation===e&&(h(r.didSuspend,`$async: rejected while not suspended (settle bookkeeping is broken)`),r.value=t,r.didError=!0,r.didSuspend=!1,r.settle={ok:!1,error:t},x(),W(r),b())})}return t},n.registerComputed(r),y(r),i!==null&&i.index<i.values.length&&(r.generation++,r.didSuspend=!1,r.didError=!1,r.value=i.values[i.index++],r.settle={ok:!0,value:r.value}),r.value}function qt(e,t,...n){if(t!==void 0)for(let r of n.flat()){if(!(r in e))throw Error(`$bind: the key "${r}" does not exist on the state object. $bind syncs same-named keys, so the state object must declare it (e.g. in the initial $watch).`);C(()=>{let n=t[r];n!==void 0&&(e[r]=n)},`bind:forward:${r}`);let n=!0;C(()=>{let i=e[r];n||(t[r]=i),n=!1},`bind:backward:${r}`)}}function Jt(e){if(n.registerComputed===null)throw Error(`$cache must be used in a getter`);let t={type:1,isAsync:!1,value:null,run:e,firstSource:null,firstTarget:null,recalc:!1,running:!1,didError:!1,didSuspend:!1,generation:0,settle:void 0,suspendQuiet:!1,rollback:null};if(n.registerComputed(t),y(t),t.value!==null&&t.value!==void 0&&typeof t.value.then==`function`)throw Error(`$cache returned a Promise — use $async for async getters`);return t.value}function Yt(e){n.mountEffects.push({region:n.activeRegion,fn:e})}function Xt(e){let t=n.suspendPeek;n.suspendPeek=!0,n.suspendPeekHit=!1;try{return e(),n.suspendPeekHit}finally{n.suspendPeek=t}}function Zt(e,t){let r=t?.silent===!0,i=n.refreshSignals,a=n.suspendPeek,o=n.refreshInitialized;n.refreshSignals=[],n.suspendPeek=!0,n.refreshInitialized=/* @__PURE__ */ new Set;let s,c;try{e(),s=new Set(n.refreshSignals??[]),c=n.refreshInitialized}finally{n.refreshSignals=i,n.suspendPeek=a,n.refreshInitialized=o}for(let e of s){if(c.has(e))continue;e.recalc=!r,_(e);let t=n.activeTarget;n.activeTarget=null;try{y(e)}finally{n.activeTarget=t}e.recalc=!1,g(e),r||(x(),W(e),b())}}function Qt(e,t,r){n.mountEffects.push({region:n.activeRegion,fn:()=>{let n;C(()=>{let i=e(e=>{r?.debounce?(clearTimeout(n),n=setTimeout(()=>t(e),r.debounce)):t(e)});return()=>{i?.(),clearTimeout(n)}})}})}return e.$async=Kt,e.$batch=Gt,e.$bind=qt,e.$cache=Jt,e.$onmount=Yt,e.$peek=se,e.$pending=Xt,e.$refresh=Zt,e.$run=C,e.$stream=Qt,e.$unwrap=M,e.$watch=Ot,e.clearLayoutSlot=Fe,e.fillLayoutSlot=Pe,e.fromElement=Ht,e.fromServer=Ut,e.fromWebSocket=Wt,e.hydrate=Ke,e.mount=qe,e.t_add_element=we,e.t_add_fragment=Te,e.t_anchor=Qe,e.t_animate=r,e.t_apply_props=Ee,e.t_attribute=zt,e.t_child=$e,e.t_class=De,e.t_dynamic=Vt,e.t_event=i,e.t_first_inside=ze,e.t_fmt=Ie,e.t_fragment=Be,e.t_fragment_el=Ve,e.t_head_element=Rt,e.t_list_item=Ye,e.t_next=d,e.t_pop_region=I,e.t_push_region=L,e.t_region=F,e.t_rerun_region_effects=at,e.t_restore_hydration=st,e.t_root=rt,e.t_root_el=nt,e.t_run_await=Ft,e.t_run_branch=U,e.t_run_control=ct,e.t_run_list=Pt,e.t_run_try=Lt,e.t_save_hydration=It,e.t_skip=it,e.t_style=ke,e.unmount=Je,e})({});
@@ -0,0 +1,177 @@
1
+ //#region src/compile/utils/slotAutoClose.ts
2
+ /**
3
+ * HTML auto-close analysis for slot regions.
4
+ *
5
+ * When a host wraps each slot region in an element that the HTML parser
6
+ * auto-closes (`<li><slot/></li>`, `<p><slot/></p>`, table parts, …) and the
7
+ * consumer's fill starts with a tag that implies the wrapper's end
8
+ * (`<li>` fill inside `<li><slot/></li>`), the parser re-nests the markup:
9
+ * the slot region's markers end up as siblings of the fill content instead
10
+ * of wrapping it, and hydration can't adopt the region.
11
+ *
12
+ * These helpers let the server builds (JS and restricted) detect the shape —
13
+ * at compile time for static fallbacks, at render time for fill content —
14
+ * and fail with an actionable message instead of shipping broken HTML.
15
+ */
16
+ /**
17
+ * The start tags on the left imply the end of the open ancestor tags in the
18
+ * value list, per the HTML "in body" and "in table" insertion modes. E.g.
19
+ * a `<div>` start tag closes an open `<p>`; a `<li>` start tag closes an
20
+ * open `<li>`.
21
+ */
22
+ const CLOSES = {
23
+ li: ["li"],
24
+ dt: [
25
+ "dt",
26
+ "dd",
27
+ "p"
28
+ ],
29
+ dd: [
30
+ "dt",
31
+ "dd",
32
+ "p"
33
+ ],
34
+ p: ["p"],
35
+ address: ["p"],
36
+ article: ["p"],
37
+ aside: ["p"],
38
+ blockquote: ["p"],
39
+ center: ["p"],
40
+ details: ["p"],
41
+ dialog: ["p"],
42
+ dir: ["p"],
43
+ div: ["p"],
44
+ dl: ["p"],
45
+ fieldset: ["p"],
46
+ figcaption: ["p"],
47
+ figure: ["p"],
48
+ footer: ["p"],
49
+ header: ["p"],
50
+ hgroup: ["p"],
51
+ main: ["p"],
52
+ menu: ["p"],
53
+ nav: ["p"],
54
+ ol: ["p"],
55
+ section: ["p"],
56
+ summary: ["p"],
57
+ ul: ["p"],
58
+ h1: ["p"],
59
+ h2: ["p"],
60
+ h3: ["p"],
61
+ h4: ["p"],
62
+ h5: ["p"],
63
+ h6: ["p"],
64
+ pre: ["p"],
65
+ listing: ["p"],
66
+ form: ["p"],
67
+ plaintext: ["p"],
68
+ table: ["p"],
69
+ hr: ["p"],
70
+ xmp: ["p"],
71
+ option: ["option"],
72
+ optgroup: ["option", "optgroup"],
73
+ td: ["td", "th"],
74
+ th: ["td", "th"],
75
+ tr: [
76
+ "tr",
77
+ "td",
78
+ "th"
79
+ ],
80
+ caption: [
81
+ "caption",
82
+ "tr",
83
+ "td",
84
+ "th",
85
+ "tbody",
86
+ "thead",
87
+ "tfoot",
88
+ "colgroup"
89
+ ],
90
+ colgroup: [
91
+ "colgroup",
92
+ "caption",
93
+ "tr",
94
+ "td",
95
+ "th",
96
+ "tbody",
97
+ "thead",
98
+ "tfoot"
99
+ ],
100
+ tbody: [
101
+ "tbody",
102
+ "thead",
103
+ "tfoot",
104
+ "tr",
105
+ "td",
106
+ "th",
107
+ "caption",
108
+ "colgroup"
109
+ ],
110
+ thead: [
111
+ "tbody",
112
+ "thead",
113
+ "tfoot",
114
+ "tr",
115
+ "td",
116
+ "th",
117
+ "caption",
118
+ "colgroup"
119
+ ],
120
+ tfoot: [
121
+ "tbody",
122
+ "thead",
123
+ "tfoot",
124
+ "tr",
125
+ "td",
126
+ "th",
127
+ "caption",
128
+ "colgroup"
129
+ ]
130
+ };
131
+ /** Tags that some start tag can auto-close (the union of the CLOSES values). */
132
+ const AUTO_CLOSEABLE = new Set(Object.values(CLOSES).flat());
133
+ /** The first start tag in an HTML fragment, lowercased (undefined if none). */
134
+ function firstElementTag(html) {
135
+ return /^<([a-zA-Z][a-zA-Z0-9-]*)/.exec(html)?.[1]?.toLowerCase();
136
+ }
137
+ /**
138
+ * Whether a fragment whose first element is `firstTag` would auto-close any
139
+ * of the open `ancestor` tags (most recent ancestor last, like a stack).
140
+ */
141
+ function closesAncestor(firstTag, ancestors) {
142
+ const closed = CLOSES[firstTag.toLowerCase()];
143
+ if (closed === void 0) return false;
144
+ return ancestors.some((ancestor) => closed.includes(ancestor));
145
+ }
146
+ /**
147
+ * The message for a detected re-nesting, naming the offending fill tag, the
148
+ * wrapper it closes, and the fix.
149
+ */
150
+ function autoCloseMessage(firstTag, ancestor) {
151
+ return `Slot content was re-nested by the HTML parser: the fill starts with <${firstTag}>, which auto-closes the enclosing <${ancestor}> around the slot (e.g. <li><slot/></li> with an <li> fill). Wrap the slot in a different element (e.g. <div>), or start the fill with a tag that nests there.`;
152
+ }
153
+ //#endregion
154
+ Object.defineProperty(exports, "AUTO_CLOSEABLE", {
155
+ enumerable: true,
156
+ get: function() {
157
+ return AUTO_CLOSEABLE;
158
+ }
159
+ });
160
+ Object.defineProperty(exports, "autoCloseMessage", {
161
+ enumerable: true,
162
+ get: function() {
163
+ return autoCloseMessage;
164
+ }
165
+ });
166
+ Object.defineProperty(exports, "closesAncestor", {
167
+ enumerable: true,
168
+ get: function() {
169
+ return closesAncestor;
170
+ }
171
+ });
172
+ Object.defineProperty(exports, "firstElementTag", {
173
+ enumerable: true,
174
+ get: function() {
175
+ return firstElementTag;
176
+ }
177
+ });
@@ -0,0 +1,156 @@
1
+ //#region src/compile/utils/slotAutoClose.ts
2
+ /**
3
+ * HTML auto-close analysis for slot regions.
4
+ *
5
+ * When a host wraps each slot region in an element that the HTML parser
6
+ * auto-closes (`<li><slot/></li>`, `<p><slot/></p>`, table parts, …) and the
7
+ * consumer's fill starts with a tag that implies the wrapper's end
8
+ * (`<li>` fill inside `<li><slot/></li>`), the parser re-nests the markup:
9
+ * the slot region's markers end up as siblings of the fill content instead
10
+ * of wrapping it, and hydration can't adopt the region.
11
+ *
12
+ * These helpers let the server builds (JS and restricted) detect the shape —
13
+ * at compile time for static fallbacks, at render time for fill content —
14
+ * and fail with an actionable message instead of shipping broken HTML.
15
+ */
16
+ /**
17
+ * The start tags on the left imply the end of the open ancestor tags in the
18
+ * value list, per the HTML "in body" and "in table" insertion modes. E.g.
19
+ * a `<div>` start tag closes an open `<p>`; a `<li>` start tag closes an
20
+ * open `<li>`.
21
+ */
22
+ const CLOSES = {
23
+ li: ["li"],
24
+ dt: [
25
+ "dt",
26
+ "dd",
27
+ "p"
28
+ ],
29
+ dd: [
30
+ "dt",
31
+ "dd",
32
+ "p"
33
+ ],
34
+ p: ["p"],
35
+ address: ["p"],
36
+ article: ["p"],
37
+ aside: ["p"],
38
+ blockquote: ["p"],
39
+ center: ["p"],
40
+ details: ["p"],
41
+ dialog: ["p"],
42
+ dir: ["p"],
43
+ div: ["p"],
44
+ dl: ["p"],
45
+ fieldset: ["p"],
46
+ figcaption: ["p"],
47
+ figure: ["p"],
48
+ footer: ["p"],
49
+ header: ["p"],
50
+ hgroup: ["p"],
51
+ main: ["p"],
52
+ menu: ["p"],
53
+ nav: ["p"],
54
+ ol: ["p"],
55
+ section: ["p"],
56
+ summary: ["p"],
57
+ ul: ["p"],
58
+ h1: ["p"],
59
+ h2: ["p"],
60
+ h3: ["p"],
61
+ h4: ["p"],
62
+ h5: ["p"],
63
+ h6: ["p"],
64
+ pre: ["p"],
65
+ listing: ["p"],
66
+ form: ["p"],
67
+ plaintext: ["p"],
68
+ table: ["p"],
69
+ hr: ["p"],
70
+ xmp: ["p"],
71
+ option: ["option"],
72
+ optgroup: ["option", "optgroup"],
73
+ td: ["td", "th"],
74
+ th: ["td", "th"],
75
+ tr: [
76
+ "tr",
77
+ "td",
78
+ "th"
79
+ ],
80
+ caption: [
81
+ "caption",
82
+ "tr",
83
+ "td",
84
+ "th",
85
+ "tbody",
86
+ "thead",
87
+ "tfoot",
88
+ "colgroup"
89
+ ],
90
+ colgroup: [
91
+ "colgroup",
92
+ "caption",
93
+ "tr",
94
+ "td",
95
+ "th",
96
+ "tbody",
97
+ "thead",
98
+ "tfoot"
99
+ ],
100
+ tbody: [
101
+ "tbody",
102
+ "thead",
103
+ "tfoot",
104
+ "tr",
105
+ "td",
106
+ "th",
107
+ "caption",
108
+ "colgroup"
109
+ ],
110
+ thead: [
111
+ "tbody",
112
+ "thead",
113
+ "tfoot",
114
+ "tr",
115
+ "td",
116
+ "th",
117
+ "caption",
118
+ "colgroup"
119
+ ],
120
+ tfoot: [
121
+ "tbody",
122
+ "thead",
123
+ "tfoot",
124
+ "tr",
125
+ "td",
126
+ "th",
127
+ "caption",
128
+ "colgroup"
129
+ ]
130
+ };
131
+ /** Tags that some start tag can auto-close (the union of the CLOSES values). */
132
+ const AUTO_CLOSEABLE = new Set(Object.values(CLOSES).flat());
133
+ /** The first start tag in an HTML fragment, lowercased (undefined if none). */
134
+ function firstElementTag(html) {
135
+ return /^<([a-zA-Z][a-zA-Z0-9-]*)/.exec(html)?.[1]?.toLowerCase();
136
+ }
137
+ /**
138
+ * Whether a fragment whose first element is `firstTag` would auto-close any
139
+ * of the open `ancestor` tags (most recent ancestor last, like a stack).
140
+ */
141
+ function closesAncestor(firstTag, ancestors) {
142
+ const closed = CLOSES[firstTag.toLowerCase()];
143
+ if (closed === void 0) return false;
144
+ return ancestors.some((ancestor) => closed.includes(ancestor));
145
+ }
146
+ /**
147
+ * The message for a detected re-nesting, naming the offending fill tag, the
148
+ * wrapper it closes, and the fix.
149
+ */
150
+ function autoCloseMessage(firstTag, ancestor) {
151
+ return `Slot content was re-nested by the HTML parser: the fill starts with <${firstTag}>, which auto-closes the enclosing <${ancestor}> around the slot (e.g. <li><slot/></li> with an <li> fill). Wrap the slot in a different element (e.g. <div>), or start the fill with a tag that nests there.`;
152
+ }
153
+ //#endregion
154
+ export { firstElementTag as i, autoCloseMessage as n, closesAncestor as r, AUTO_CLOSEABLE as t };
155
+
156
+ //# sourceMappingURL=slotAutoClose-CgDkf8fM.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"slotAutoClose-CgDkf8fM.mjs","names":[],"sources":["../src/compile/utils/slotAutoClose.ts"],"sourcesContent":["/**\n * HTML auto-close analysis for slot regions.\n *\n * When a host wraps each slot region in an element that the HTML parser\n * auto-closes (`<li><slot/></li>`, `<p><slot/></p>`, table parts, …) and the\n * consumer's fill starts with a tag that implies the wrapper's end\n * (`<li>` fill inside `<li><slot/></li>`), the parser re-nests the markup:\n * the slot region's markers end up as siblings of the fill content instead\n * of wrapping it, and hydration can't adopt the region.\n *\n * These helpers let the server builds (JS and restricted) detect the shape —\n * at compile time for static fallbacks, at render time for fill content —\n * and fail with an actionable message instead of shipping broken HTML.\n */\n\n/**\n * The start tags on the left imply the end of the open ancestor tags in the\n * value list, per the HTML \"in body\" and \"in table\" insertion modes. E.g.\n * a `<div>` start tag closes an open `<p>`; a `<li>` start tag closes an\n * open `<li>`.\n */\nconst CLOSES: Record<string, string[]> = {\n\tli: [\"li\"],\n\tdt: [\"dt\", \"dd\", \"p\"],\n\tdd: [\"dt\", \"dd\", \"p\"],\n\tp: [\"p\"],\n\taddress: [\"p\"],\n\tarticle: [\"p\"],\n\taside: [\"p\"],\n\tblockquote: [\"p\"],\n\tcenter: [\"p\"],\n\tdetails: [\"p\"],\n\tdialog: [\"p\"],\n\tdir: [\"p\"],\n\tdiv: [\"p\"],\n\tdl: [\"p\"],\n\tfieldset: [\"p\"],\n\tfigcaption: [\"p\"],\n\tfigure: [\"p\"],\n\tfooter: [\"p\"],\n\theader: [\"p\"],\n\thgroup: [\"p\"],\n\tmain: [\"p\"],\n\tmenu: [\"p\"],\n\tnav: [\"p\"],\n\tol: [\"p\"],\n\tsection: [\"p\"],\n\tsummary: [\"p\"],\n\tul: [\"p\"],\n\th1: [\"p\"],\n\th2: [\"p\"],\n\th3: [\"p\"],\n\th4: [\"p\"],\n\th5: [\"p\"],\n\th6: [\"p\"],\n\tpre: [\"p\"],\n\tlisting: [\"p\"],\n\tform: [\"p\"],\n\tplaintext: [\"p\"],\n\ttable: [\"p\"],\n\thr: [\"p\"],\n\txmp: [\"p\"],\n\toption: [\"option\"],\n\toptgroup: [\"option\", \"optgroup\"],\n\ttd: [\"td\", \"th\"],\n\tth: [\"td\", \"th\"],\n\ttr: [\"tr\", \"td\", \"th\"],\n\tcaption: [\"caption\", \"tr\", \"td\", \"th\", \"tbody\", \"thead\", \"tfoot\", \"colgroup\"],\n\tcolgroup: [\"colgroup\", \"caption\", \"tr\", \"td\", \"th\", \"tbody\", \"thead\", \"tfoot\"],\n\ttbody: [\"tbody\", \"thead\", \"tfoot\", \"tr\", \"td\", \"th\", \"caption\", \"colgroup\"],\n\tthead: [\"tbody\", \"thead\", \"tfoot\", \"tr\", \"td\", \"th\", \"caption\", \"colgroup\"],\n\ttfoot: [\"tbody\", \"thead\", \"tfoot\", \"tr\", \"td\", \"th\", \"caption\", \"colgroup\"],\n};\n\n/** Tags that some start tag can auto-close (the union of the CLOSES values). */\nexport const AUTO_CLOSEABLE: ReadonlySet<string> = new Set(Object.values(CLOSES).flat());\n\n/** The first start tag in an HTML fragment, lowercased (undefined if none). */\nexport function firstElementTag(html: string): string | undefined {\n\tconst match = /^<([a-zA-Z][a-zA-Z0-9-]*)/.exec(html);\n\treturn match?.[1]?.toLowerCase();\n}\n\n/**\n * Whether a fragment whose first element is `firstTag` would auto-close any\n * of the open `ancestor` tags (most recent ancestor last, like a stack).\n */\nexport function closesAncestor(firstTag: string, ancestors: string[]): boolean {\n\tconst closed = CLOSES[firstTag.toLowerCase()];\n\tif (closed === undefined) return false;\n\treturn ancestors.some((ancestor) => closed.includes(ancestor));\n}\n\n/**\n * The message for a detected re-nesting, naming the offending fill tag, the\n * wrapper it closes, and the fix.\n */\nexport function autoCloseMessage(firstTag: string, ancestor: string): string {\n\treturn (\n\t\t`Slot content was re-nested by the HTML parser: the fill starts with <${firstTag}>, ` +\n\t\t`which auto-closes the enclosing <${ancestor}> around the slot ` +\n\t\t`(e.g. <li><slot/></li> with an <li> fill). Wrap the slot in a different ` +\n\t\t`element (e.g. <div>), or start the fill with a tag that nests there.`\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAqBA,MAAM,SAAmC;CACxC,IAAI,CAAC,IAAI;CACT,IAAI;EAAC;EAAM;EAAM;CAAG;CACpB,IAAI;EAAC;EAAM;EAAM;CAAG;CACpB,GAAG,CAAC,GAAG;CACP,SAAS,CAAC,GAAG;CACb,SAAS,CAAC,GAAG;CACb,OAAO,CAAC,GAAG;CACX,YAAY,CAAC,GAAG;CAChB,QAAQ,CAAC,GAAG;CACZ,SAAS,CAAC,GAAG;CACb,QAAQ,CAAC,GAAG;CACZ,KAAK,CAAC,GAAG;CACT,KAAK,CAAC,GAAG;CACT,IAAI,CAAC,GAAG;CACR,UAAU,CAAC,GAAG;CACd,YAAY,CAAC,GAAG;CAChB,QAAQ,CAAC,GAAG;CACZ,QAAQ,CAAC,GAAG;CACZ,QAAQ,CAAC,GAAG;CACZ,QAAQ,CAAC,GAAG;CACZ,MAAM,CAAC,GAAG;CACV,MAAM,CAAC,GAAG;CACV,KAAK,CAAC,GAAG;CACT,IAAI,CAAC,GAAG;CACR,SAAS,CAAC,GAAG;CACb,SAAS,CAAC,GAAG;CACb,IAAI,CAAC,GAAG;CACR,IAAI,CAAC,GAAG;CACR,IAAI,CAAC,GAAG;CACR,IAAI,CAAC,GAAG;CACR,IAAI,CAAC,GAAG;CACR,IAAI,CAAC,GAAG;CACR,IAAI,CAAC,GAAG;CACR,KAAK,CAAC,GAAG;CACT,SAAS,CAAC,GAAG;CACb,MAAM,CAAC,GAAG;CACV,WAAW,CAAC,GAAG;CACf,OAAO,CAAC,GAAG;CACX,IAAI,CAAC,GAAG;CACR,KAAK,CAAC,GAAG;CACT,QAAQ,CAAC,QAAQ;CACjB,UAAU,CAAC,UAAU,UAAU;CAC/B,IAAI,CAAC,MAAM,IAAI;CACf,IAAI,CAAC,MAAM,IAAI;CACf,IAAI;EAAC;EAAM;EAAM;CAAI;CACrB,SAAS;EAAC;EAAW;EAAM;EAAM;EAAM;EAAS;EAAS;EAAS;CAAU;CAC5E,UAAU;EAAC;EAAY;EAAW;EAAM;EAAM;EAAM;EAAS;EAAS;CAAO;CAC7E,OAAO;EAAC;EAAS;EAAS;EAAS;EAAM;EAAM;EAAM;EAAW;CAAU;CAC1E,OAAO;EAAC;EAAS;EAAS;EAAS;EAAM;EAAM;EAAM;EAAW;CAAU;CAC1E,OAAO;EAAC;EAAS;EAAS;EAAS;EAAM;EAAM;EAAM;EAAW;CAAU;AAC3E;;AAGA,MAAa,iBAAsC,IAAI,IAAI,OAAO,OAAO,MAAM,CAAC,CAAC,KAAK,CAAC;;AAGvF,SAAgB,gBAAgB,MAAkC;CAEjE,OADc,4BAA4B,KAAK,IACpC,CAAC,GAAG,EAAE,EAAE,YAAY;AAChC;;;;;AAMA,SAAgB,eAAe,UAAkB,WAA8B;CAC9E,MAAM,SAAS,OAAO,SAAS,YAAY;CAC3C,IAAI,WAAW,KAAA,GAAW,OAAO;CACjC,OAAO,UAAU,MAAM,aAAa,OAAO,SAAS,QAAQ,CAAC;AAC9D;;;;;AAMA,SAAgB,iBAAiB,UAAkB,UAA0B;CAC5E,OACC,wEAAwE,SAAS,sCAC7C,SAAS;AAI/C"}
package/dist/ssr.cjs CHANGED
@@ -1,5 +1,6 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
- const require_fromWebSocket = require("./fromWebSocket-DrN-IduP.cjs");
2
+ const require_fromWebSocket = require("./fromWebSocket-Cdoghvmh.cjs");
3
+ const require_slotAutoClose = require("./slotAutoClose-BbKfzpkz.cjs");
3
4
  //#region src/render/formatAttributeText.ts
4
5
  function formatAttributeText(value) {
5
6
  return (value ?? "").toString().replaceAll("\"", "&quot;");
@@ -48,6 +49,28 @@ function buildServerStyles(value) {
48
49
  return styles === "" ? "" : `style="${styles}"`;
49
50
  }
50
51
  //#endregion
52
+ //#region src/ssr/slotGuard.ts
53
+ /**
54
+ * Server counterpart for generated slot regions whose wrapper the HTML
55
+ * parser can auto-close (e.g. a `<slot>` inside `<li>`). Checks the rendered
56
+ * fill content and throws when the parser would re-nest the region, so
57
+ * broken shapes fail loudly at SSR instead of shipping markup hydration
58
+ * can't adopt. Exported as `t_slot_guard` from `@torpor/view/ssr`.
59
+ *
60
+ * @param closeTags The slot's enclosing tags that some start tag can
61
+ * auto-close (nearest last).
62
+ * @param content The rendered fill content.
63
+ * @param slotName The slot name, for the error message.
64
+ */
65
+ function slotGuard(closeTags, content, slotName) {
66
+ const firstTag = require_slotAutoClose.firstElementTag(content);
67
+ if (firstTag !== void 0 && require_slotAutoClose.closesAncestor(firstTag, closeTags)) {
68
+ const ancestor = closeTags.slice().reverse().find((ancestor) => require_slotAutoClose.closesAncestor(firstTag, [ancestor]));
69
+ throw new Error(`Slot "${slotName}": ${require_slotAutoClose.autoCloseMessage(firstTag, ancestor ?? closeTags[0])}`);
70
+ }
71
+ return content;
72
+ }
73
+ //#endregion
51
74
  //#region src/ssr/$serverWatch.ts
52
75
  let currentSite = null;
53
76
  /** The watched getter currently being read, or null outside a `$watch` get. */
@@ -510,8 +533,12 @@ exports.$run = $serverRun;
510
533
  exports.$stream = $serverStream;
511
534
  exports.$unwrap = $serverUnwrap;
512
535
  exports.$watch = $serverWatch;
536
+ exports.AUTO_CLOSEABLE = require_slotAutoClose.AUTO_CLOSEABLE;
537
+ exports.autoCloseMessage = require_slotAutoClose.autoCloseMessage;
513
538
  exports.clearLayoutSlot = clearLayoutSlot;
539
+ exports.closesAncestor = require_slotAutoClose.closesAncestor;
514
540
  exports.fillLayoutSlot = fillLayoutSlot;
541
+ exports.firstElementTag = require_slotAutoClose.firstElementTag;
515
542
  exports.fromElement = require_fromWebSocket.fromElement;
516
543
  exports.fromServer = require_fromWebSocket.fromServer;
517
544
  exports.fromWebSocket = require_fromWebSocket.fromWebSocket;
@@ -551,5 +578,6 @@ exports.t_run_try = t_run_try;
551
578
  exports.t_save_hydration = t_save_hydration;
552
579
  exports.t_server_flush = serverFlush;
553
580
  exports.t_skip = t_skip;
581
+ exports.t_slot_guard = slotGuard;
554
582
  exports.t_style = buildServerStyles;
555
583
  exports.unmount = unmount;
package/dist/ssr.d.cts CHANGED
@@ -33,6 +33,37 @@ declare function buildServerClasses(value: ClassValue, styleHash?: string): stri
33
33
  */
34
34
  declare function buildServerStyles(value: StyleValue): string;
35
35
  //#endregion
36
+ //#region src/ssr/slotGuard.d.ts
37
+ /**
38
+ * Server counterpart for generated slot regions whose wrapper the HTML
39
+ * parser can auto-close (e.g. a `<slot>` inside `<li>`). Checks the rendered
40
+ * fill content and throws when the parser would re-nest the region, so
41
+ * broken shapes fail loudly at SSR instead of shipping markup hydration
42
+ * can't adopt. Exported as `t_slot_guard` from `@torpor/view/ssr`.
43
+ *
44
+ * @param closeTags The slot's enclosing tags that some start tag can
45
+ * auto-close (nearest last).
46
+ * @param content The rendered fill content.
47
+ * @param slotName The slot name, for the error message.
48
+ */
49
+ declare function slotGuard(closeTags: string[], content: string, slotName: string): string;
50
+ //#endregion
51
+ //#region src/compile/utils/slotAutoClose.d.ts
52
+ /** Tags that some start tag can auto-close (the union of the CLOSES values). */
53
+ export declare const AUTO_CLOSEABLE: ReadonlySet<string>;
54
+ /** The first start tag in an HTML fragment, lowercased (undefined if none). */
55
+ export declare function firstElementTag(html: string): string | undefined;
56
+ /**
57
+ * Whether a fragment whose first element is `firstTag` would auto-close any
58
+ * of the open `ancestor` tags (most recent ancestor last, like a stack).
59
+ */
60
+ export declare function closesAncestor(firstTag: string, ancestors: string[]): boolean;
61
+ /**
62
+ * The message for a detected re-nesting, naming the offending fill tag, the
63
+ * wrapper it closes, and the fix.
64
+ */
65
+ export declare function autoCloseMessage(firstTag: string, ancestor: string): string;
66
+ //#endregion
36
67
  //#region src/ssr/$serverAsync.d.ts
37
68
  /**
38
69
  * Server counterpart of the client-side `$async` getter primitive.
@@ -272,5 +303,5 @@ export declare const t_run_try: Unavailable;
272
303
  export declare const t_save_hydration: Unavailable;
273
304
  export declare const t_skip: Unavailable;
274
305
  //#endregion
275
- export { $serverAsync as $async, $serverBatch as $batch, $serverBind as $bind, $serverCache as $cache, $serverOnmount as $onmount, $serverPeek as $peek, $serverPending as $pending, $serverRefresh as $refresh, $serverRun as $run, $serverStream as $stream, $serverUnwrap as $unwrap, $serverWatch as $watch, type AsyncOptions, type ServerComponent, type ServerSlotRender, type StreamSource, fromElement, fromServer, fromWebSocket, formatAttributeText as t_attr, runServerAwait as t_await_server, buildServerClasses as t_class, formatServerText as t_fmt, serverFlush as t_server_flush, buildServerStyles as t_style };
306
+ export { $serverAsync as $async, $serverBatch as $batch, $serverBind as $bind, $serverCache as $cache, $serverOnmount as $onmount, $serverPeek as $peek, $serverPending as $pending, $serverRefresh as $refresh, $serverRun as $run, $serverStream as $stream, $serverUnwrap as $unwrap, $serverWatch as $watch, type AsyncOptions, type ServerComponent, type ServerSlotRender, type StreamSource, fromElement, fromServer, fromWebSocket, formatAttributeText as t_attr, runServerAwait as t_await_server, buildServerClasses as t_class, formatServerText as t_fmt, serverFlush as t_server_flush, slotGuard as t_slot_guard, buildServerStyles as t_style };
276
307
  //# sourceMappingURL=ssr.d.cts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr.d.cts","names":[],"sources":["../src/render/formatAttributeText.ts","../src/ssr/formatText.ts","../src/ssr/buildClasses.ts","../src/ssr/buildStyles.ts","../src/ssr/$serverAsync.ts","../src/ssr/$serverBatch.ts","../src/ssr/$serverBind.ts","../src/ssr/$serverCache.ts","../src/ssr/$serverOnmount.ts","../src/ssr/$serverPeek.ts","../src/ssr/$serverPending.ts","../src/ssr/$serverRefresh.ts","../src/ssr/$serverRun.ts","../src/ssr/$serverStream.ts","../src/ssr/$serverUnwrap.ts","../src/ssr/$serverWatch.ts","../src/ssr/runServerAwait.ts","../src/ssr/serverSentinels.ts","../src/types/ServerSlotRender.ts","../src/types/ServerComponent.ts","../src/ssr/unavailable.ts"],"mappings":";;;iBAAwB,oBAAoB;;;;;;;;;;iBCepB,iBAAiB;;;;;;;;;;iBCLjB,mBAAmB,OAAO,YAAY;;;;;;;;;;iBCAtC,kBAAkB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCqCzB,aAAa,GACpC,KAAK,cAAc,MAAM,QAAQ,IACjC,UAAU,eACR;;;iBClDqB,aAAa,GAAG,UAAU,IAAI;;;;;;;;;iBCM9B,YACvB,QAAQ,OAAO,mBACf,QAAQ,OAAO,kCACZ;;;iBCToB,aAAa,GAAG,UAAU,IAAI;;;iBCE9B,eAAe,WAAW;;;iBCF1B,YAAY,GAAG,UAAU,IAAI;;;;;;;;iBCK7B,eAAe;;;;;;;;iBCAf,eAAe;;;iBCHf,WAAW,WAAW;;;;;;;;iBCKtB,cAAc,GACrC,SAAS,aAAa,IACtB,WAAW,OAAO,YAClB;EAAa;;;;iBCVU,cAAc,UAAU,OAAO,mBAAmB,QAAQ,IAAI;;;;;;;;;;;;;;iBC8B9D,aAAa,UAAU,OAAO,mBAAmB,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCmB7D,eACvB,YACA,qBAAqB;EAAU;EAAc;IAC7C,mBAAmB;EAAU;EAAc;;EACvC;EAAc;IAAiB;EAAU;EAAc;;;;;UC9C3C;EAChB;EACA;;;;;;;;;;;;;;;;iBAiBqB,YAAY,cAAc,QAAQ,cAAc,QAAQ;;;;;;;KCtBzE,oBACJ,QAAQ,OAAO,mBACf,WAAW,OAAO,sBACd;;;;;;;;;;KCEA,mBACJ,SAAS,OAAO,mBAChB,WAAW,OAAO,mBAClB,SAAS,eAAe,sBACpB;EAAU;EAAc;;;;;;;;;;;;;;;KCFxB,kBAAkB;qBAQV,OAAO;qBACP,SAAS;qBACT,SAAS;qBACT,gBAAgB;qBAChB,iBAAiB;qBAEjB,eAAe;qBACf,gBAAgB;qBAChB,UAAU;qBACV,WAAW;qBACX,eAAe;qBACf,aAAa;qBACb,SAAS;qBACT,WAAW;qBACX,SAAS;qBACT,gBAAgB;qBAChB,YAAY;qBACZ,eAAe;qBACf,gBAAgB;qBAChB,aAAa;qBACb,QAAQ;qBACR,cAAc;qBACd,eAAe;qBACf,UAAU;qBACV,wBAAwB;qBACxB,qBAAqB;qBACrB,QAAQ;qBACR,WAAW;qBACX,aAAa;qBACb,cAAc;qBACd,eAAe;qBACf,YAAY;qBACZ,WAAW;qBACX,kBAAkB;qBAClB,QAAQ"}
1
+ {"version":3,"file":"ssr.d.cts","names":[],"sources":["../src/render/formatAttributeText.ts","../src/ssr/formatText.ts","../src/ssr/buildClasses.ts","../src/ssr/buildStyles.ts","../src/ssr/slotGuard.ts","../src/compile/utils/slotAutoClose.ts","../src/ssr/$serverAsync.ts","../src/ssr/$serverBatch.ts","../src/ssr/$serverBind.ts","../src/ssr/$serverCache.ts","../src/ssr/$serverOnmount.ts","../src/ssr/$serverPeek.ts","../src/ssr/$serverPending.ts","../src/ssr/$serverRefresh.ts","../src/ssr/$serverRun.ts","../src/ssr/$serverStream.ts","../src/ssr/$serverUnwrap.ts","../src/ssr/$serverWatch.ts","../src/ssr/runServerAwait.ts","../src/ssr/serverSentinels.ts","../src/types/ServerSlotRender.ts","../src/types/ServerComponent.ts","../src/ssr/unavailable.ts"],"mappings":";;;iBAAwB,oBAAoB;;;;;;;;;;iBCepB,iBAAiB;;;;;;;;;;iBCLjB,mBAAmB,OAAO,YAAY;;;;;;;;;;iBCAtC,kBAAkB,OAAO;;;;;;;;;;;;;;;iBCIzB,UAAU,qBAAqB,iBAAiB;;;;qBC6D3D,gBAAgB;;wBAGb,gBAAgB;;;;;wBAShB,eAAe,kBAAkB;;;;;wBAUjC,iBAAiB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBClD3B,aAAa,GACpC,KAAK,cAAc,MAAM,QAAQ,IACjC,UAAU,eACR;;;iBClDqB,aAAa,GAAG,UAAU,IAAI;;;;;;;;;iBCM9B,YACvB,QAAQ,OAAO,mBACf,QAAQ,OAAO,kCACZ;;;iBCToB,aAAa,GAAG,UAAU,IAAI;;;iBCE9B,eAAe,WAAW;;;iBCF1B,YAAY,GAAG,UAAU,IAAI;;;;;;;;iBCK7B,eAAe;;;;;;;;iBCAf,eAAe;;;iBCHf,WAAW,WAAW;;;;;;;;iBCKtB,cAAc,GACrC,SAAS,aAAa,IACtB,WAAW,OAAO,YAClB;EAAa;;;;iBCVU,cAAc,UAAU,OAAO,mBAAmB,QAAQ,IAAI;;;;;;;;;;;;;;iBC8B9D,aAAa,UAAU,OAAO,mBAAmB,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCmB7D,eACvB,YACA,qBAAqB;EAAU;EAAc;IAC7C,mBAAmB;EAAU;EAAc;;EACvC;EAAc;IAAiB;EAAU;EAAc;;;;;UC9C3C;EAChB;EACA;;;;;;;;;;;;;;;;iBAiBqB,YAAY,cAAc,QAAQ,cAAc,QAAQ;;;;;;;KCtBzE,oBACJ,QAAQ,OAAO,mBACf,WAAW,OAAO,sBACd;;;;;;;;;;KCEA,mBACJ,SAAS,OAAO,mBAChB,WAAW,OAAO,mBAClB,SAAS,eAAe,sBACpB;EAAU;EAAc;;;;;;;;;;;;;;;KCFxB,kBAAkB;qBAQV,OAAO;qBACP,SAAS;qBACT,SAAS;qBACT,gBAAgB;qBAChB,iBAAiB;qBAEjB,eAAe;qBACf,gBAAgB;qBAChB,UAAU;qBACV,WAAW;qBACX,eAAe;qBACf,aAAa;qBACb,SAAS;qBACT,WAAW;qBACX,SAAS;qBACT,gBAAgB;qBAChB,YAAY;qBACZ,eAAe;qBACf,gBAAgB;qBAChB,aAAa;qBACb,QAAQ;qBACR,cAAc;qBACd,eAAe;qBACf,UAAU;qBACV,wBAAwB;qBACxB,qBAAqB;qBACrB,QAAQ;qBACR,WAAW;qBACX,aAAa;qBACb,cAAc;qBACd,eAAe;qBACf,YAAY;qBACZ,WAAW;qBACX,kBAAkB;qBAClB,QAAQ"}
package/dist/ssr.d.mts CHANGED
@@ -33,6 +33,37 @@ declare function buildServerClasses(value: ClassValue, styleHash?: string): stri
33
33
  */
34
34
  declare function buildServerStyles(value: StyleValue): string;
35
35
  //#endregion
36
+ //#region src/ssr/slotGuard.d.ts
37
+ /**
38
+ * Server counterpart for generated slot regions whose wrapper the HTML
39
+ * parser can auto-close (e.g. a `<slot>` inside `<li>`). Checks the rendered
40
+ * fill content and throws when the parser would re-nest the region, so
41
+ * broken shapes fail loudly at SSR instead of shipping markup hydration
42
+ * can't adopt. Exported as `t_slot_guard` from `@torpor/view/ssr`.
43
+ *
44
+ * @param closeTags The slot's enclosing tags that some start tag can
45
+ * auto-close (nearest last).
46
+ * @param content The rendered fill content.
47
+ * @param slotName The slot name, for the error message.
48
+ */
49
+ declare function slotGuard(closeTags: string[], content: string, slotName: string): string;
50
+ //#endregion
51
+ //#region src/compile/utils/slotAutoClose.d.ts
52
+ /** Tags that some start tag can auto-close (the union of the CLOSES values). */
53
+ export declare const AUTO_CLOSEABLE: ReadonlySet<string>;
54
+ /** The first start tag in an HTML fragment, lowercased (undefined if none). */
55
+ export declare function firstElementTag(html: string): string | undefined;
56
+ /**
57
+ * Whether a fragment whose first element is `firstTag` would auto-close any
58
+ * of the open `ancestor` tags (most recent ancestor last, like a stack).
59
+ */
60
+ export declare function closesAncestor(firstTag: string, ancestors: string[]): boolean;
61
+ /**
62
+ * The message for a detected re-nesting, naming the offending fill tag, the
63
+ * wrapper it closes, and the fix.
64
+ */
65
+ export declare function autoCloseMessage(firstTag: string, ancestor: string): string;
66
+ //#endregion
36
67
  //#region src/ssr/$serverAsync.d.ts
37
68
  /**
38
69
  * Server counterpart of the client-side `$async` getter primitive.
@@ -272,5 +303,5 @@ export declare const t_run_try: Unavailable;
272
303
  export declare const t_save_hydration: Unavailable;
273
304
  export declare const t_skip: Unavailable;
274
305
  //#endregion
275
- export { $serverAsync as $async, $serverBatch as $batch, $serverBind as $bind, $serverCache as $cache, $serverOnmount as $onmount, $serverPeek as $peek, $serverPending as $pending, $serverRefresh as $refresh, $serverRun as $run, $serverStream as $stream, $serverUnwrap as $unwrap, $serverWatch as $watch, type AsyncOptions, type ServerComponent, type ServerSlotRender, type StreamSource, fromElement, fromServer, fromWebSocket, formatAttributeText as t_attr, runServerAwait as t_await_server, buildServerClasses as t_class, formatServerText as t_fmt, serverFlush as t_server_flush, buildServerStyles as t_style };
306
+ export { $serverAsync as $async, $serverBatch as $batch, $serverBind as $bind, $serverCache as $cache, $serverOnmount as $onmount, $serverPeek as $peek, $serverPending as $pending, $serverRefresh as $refresh, $serverRun as $run, $serverStream as $stream, $serverUnwrap as $unwrap, $serverWatch as $watch, type AsyncOptions, type ServerComponent, type ServerSlotRender, type StreamSource, fromElement, fromServer, fromWebSocket, formatAttributeText as t_attr, runServerAwait as t_await_server, buildServerClasses as t_class, formatServerText as t_fmt, serverFlush as t_server_flush, slotGuard as t_slot_guard, buildServerStyles as t_style };
276
307
  //# sourceMappingURL=ssr.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ssr.d.mts","names":[],"sources":["../src/render/formatAttributeText.ts","../src/ssr/formatText.ts","../src/ssr/buildClasses.ts","../src/ssr/buildStyles.ts","../src/ssr/$serverAsync.ts","../src/ssr/$serverBatch.ts","../src/ssr/$serverBind.ts","../src/ssr/$serverCache.ts","../src/ssr/$serverOnmount.ts","../src/ssr/$serverPeek.ts","../src/ssr/$serverPending.ts","../src/ssr/$serverRefresh.ts","../src/ssr/$serverRun.ts","../src/ssr/$serverStream.ts","../src/ssr/$serverUnwrap.ts","../src/ssr/$serverWatch.ts","../src/ssr/runServerAwait.ts","../src/ssr/serverSentinels.ts","../src/types/ServerSlotRender.ts","../src/types/ServerComponent.ts","../src/ssr/unavailable.ts"],"mappings":";;;iBAAwB,oBAAoB;;;;;;;;;;iBCepB,iBAAiB;;;;;;;;;;iBCLjB,mBAAmB,OAAO,YAAY;;;;;;;;;;iBCAtC,kBAAkB,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCqCzB,aAAa,GACpC,KAAK,cAAc,MAAM,QAAQ,IACjC,UAAU,eACR;;;iBClDqB,aAAa,GAAG,UAAU,IAAI;;;;;;;;;iBCM9B,YACvB,QAAQ,OAAO,mBACf,QAAQ,OAAO,kCACZ;;;iBCToB,aAAa,GAAG,UAAU,IAAI;;;iBCE9B,eAAe,WAAW;;;iBCF1B,YAAY,GAAG,UAAU,IAAI;;;;;;;;iBCK7B,eAAe;;;;;;;;iBCAf,eAAe;;;iBCHf,WAAW,WAAW;;;;;;;;iBCKtB,cAAc,GACrC,SAAS,aAAa,IACtB,WAAW,OAAO,YAClB;EAAa;;;;iBCVU,cAAc,UAAU,OAAO,mBAAmB,QAAQ,IAAI;;;;;;;;;;;;;;iBC8B9D,aAAa,UAAU,OAAO,mBAAmB,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCmB7D,eACvB,YACA,qBAAqB;EAAU;EAAc;IAC7C,mBAAmB;EAAU;EAAc;;EACvC;EAAc;IAAiB;EAAU;EAAc;;;;;UC9C3C;EAChB;EACA;;;;;;;;;;;;;;;;iBAiBqB,YAAY,cAAc,QAAQ,cAAc,QAAQ;;;;;;;KCtBzE,oBACJ,QAAQ,OAAO,mBACf,WAAW,OAAO,sBACd;;;;;;;;;;KCEA,mBACJ,SAAS,OAAO,mBAChB,WAAW,OAAO,mBAClB,SAAS,eAAe,sBACpB;EAAU;EAAc;;;;;;;;;;;;;;;KCFxB,kBAAkB;qBAQV,OAAO;qBACP,SAAS;qBACT,SAAS;qBACT,gBAAgB;qBAChB,iBAAiB;qBAEjB,eAAe;qBACf,gBAAgB;qBAChB,UAAU;qBACV,WAAW;qBACX,eAAe;qBACf,aAAa;qBACb,SAAS;qBACT,WAAW;qBACX,SAAS;qBACT,gBAAgB;qBAChB,YAAY;qBACZ,eAAe;qBACf,gBAAgB;qBAChB,aAAa;qBACb,QAAQ;qBACR,cAAc;qBACd,eAAe;qBACf,UAAU;qBACV,wBAAwB;qBACxB,qBAAqB;qBACrB,QAAQ;qBACR,WAAW;qBACX,aAAa;qBACb,cAAc;qBACd,eAAe;qBACf,YAAY;qBACZ,WAAW;qBACX,kBAAkB;qBAClB,QAAQ"}
1
+ {"version":3,"file":"ssr.d.mts","names":[],"sources":["../src/render/formatAttributeText.ts","../src/ssr/formatText.ts","../src/ssr/buildClasses.ts","../src/ssr/buildStyles.ts","../src/ssr/slotGuard.ts","../src/compile/utils/slotAutoClose.ts","../src/ssr/$serverAsync.ts","../src/ssr/$serverBatch.ts","../src/ssr/$serverBind.ts","../src/ssr/$serverCache.ts","../src/ssr/$serverOnmount.ts","../src/ssr/$serverPeek.ts","../src/ssr/$serverPending.ts","../src/ssr/$serverRefresh.ts","../src/ssr/$serverRun.ts","../src/ssr/$serverStream.ts","../src/ssr/$serverUnwrap.ts","../src/ssr/$serverWatch.ts","../src/ssr/runServerAwait.ts","../src/ssr/serverSentinels.ts","../src/types/ServerSlotRender.ts","../src/types/ServerComponent.ts","../src/ssr/unavailable.ts"],"mappings":";;;iBAAwB,oBAAoB;;;;;;;;;;iBCepB,iBAAiB;;;;;;;;;;iBCLjB,mBAAmB,OAAO,YAAY;;;;;;;;;;iBCAtC,kBAAkB,OAAO;;;;;;;;;;;;;;;iBCIzB,UAAU,qBAAqB,iBAAiB;;;;qBC6D3D,gBAAgB;;wBAGb,gBAAgB;;;;;wBAShB,eAAe,kBAAkB;;;;;wBAUjC,iBAAiB,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBClD3B,aAAa,GACpC,KAAK,cAAc,MAAM,QAAQ,IACjC,UAAU,eACR;;;iBClDqB,aAAa,GAAG,UAAU,IAAI;;;;;;;;;iBCM9B,YACvB,QAAQ,OAAO,mBACf,QAAQ,OAAO,kCACZ;;;iBCToB,aAAa,GAAG,UAAU,IAAI;;;iBCE9B,eAAe,WAAW;;;iBCF1B,YAAY,GAAG,UAAU,IAAI;;;;;;;;iBCK7B,eAAe;;;;;;;;iBCAf,eAAe;;;iBCHf,WAAW,WAAW;;;;;;;;iBCKtB,cAAc,GACrC,SAAS,aAAa,IACtB,WAAW,OAAO,YAClB;EAAa;;;;iBCVU,cAAc,UAAU,OAAO,mBAAmB,QAAQ,IAAI;;;;;;;;;;;;;;iBC8B9D,aAAa,UAAU,OAAO,mBAAmB,QAAQ,IAAI;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBCmB7D,eACvB,YACA,qBAAqB;EAAU;EAAc;IAC7C,mBAAmB;EAAU;EAAc;;EACvC;EAAc;IAAiB;EAAU;EAAc;;;;;UC9C3C;EAChB;EACA;;;;;;;;;;;;;;;;iBAiBqB,YAAY,cAAc,QAAQ,cAAc,QAAQ;;;;;;;KCtBzE,oBACJ,QAAQ,OAAO,mBACf,WAAW,OAAO,sBACd;;;;;;;;;;KCEA,mBACJ,SAAS,OAAO,mBAChB,WAAW,OAAO,mBAClB,SAAS,eAAe,sBACpB;EAAU;EAAc;;;;;;;;;;;;;;;KCFxB,kBAAkB;qBAQV,OAAO;qBACP,SAAS;qBACT,SAAS;qBACT,gBAAgB;qBAChB,iBAAiB;qBAEjB,eAAe;qBACf,gBAAgB;qBAChB,UAAU;qBACV,WAAW;qBACX,eAAe;qBACf,aAAa;qBACb,SAAS;qBACT,WAAW;qBACX,SAAS;qBACT,gBAAgB;qBAChB,YAAY;qBACZ,eAAe;qBACf,gBAAgB;qBAChB,aAAa;qBACb,QAAQ;qBACR,cAAc;qBACd,eAAe;qBACf,UAAU;qBACV,wBAAwB;qBACxB,qBAAqB;qBACrB,QAAQ;qBACR,WAAW;qBACX,aAAa;qBACb,cAAc;qBACd,eAAe;qBACf,YAAY;qBACZ,WAAW;qBACX,kBAAkB;qBAClB,QAAQ"}