@tempots/ui 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Be=Object.defineProperty,Ue=(t,e,n)=>e in t?Be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,d=(t,e,n)=>Ue(t,typeof e!="symbol"?e+"":e,n);const Yt="$__signal__",Nt="$__prop__",Ft="$__computed__";var Jt;Jt=Yt;const je=class F{constructor(e,n){d(this,Jt,!0),d(this,"_value"),d(this,"_derivatives",[]),d(this,"_onValueListeners",[]),d(this,"_onDisposeListeners",[]),d(this,"get",()=>this._value),d(this,"hasListeners",()=>this._onValueListeners.length>0),d(this,"on",o=>(o(this.get()),this._onValueListeners.push(o),()=>{this._onValueListeners.splice(this._onValueListeners.indexOf(o),1)})),d(this,"_setAndNotify",(o,i)=>{const s=this.equals(this._value,o);s||(this._value=o),(i||!s)&&this._onValueListeners.forEach(r=>r(o))}),d(this,"_disposed",!1),d(this,"isDisposed",()=>this._disposed),d(this,"onDispose",o=>{this._onDisposeListeners.push(o)}),d(this,"dispose",()=>{this._disposed||(this._disposed=!0,this._onDisposeListeners.forEach(o=>o()),this._onDisposeListeners.length=0,this._derivatives.length=0)}),d(this,"map",(o,i=(s,r)=>s===r)=>{const s=new ct(()=>{try{return o(this.get())}catch(r){throw console.error("Error in Signal.map:",r),r}},i);return this.setDerivative(s),s}),d(this,"flatMap",(o,i=(s,r)=>s===r)=>{const s=new ct(()=>{try{return o(this.get()).get()}catch(r){throw console.error("Error in Signal.flatMap:",r),r}},i);return this.setDerivative(s),s}),d(this,"tap",o=>this.map(i=>(o(i),i))),d(this,"at",o=>this.map(i=>i[o])),d(this,"$",new Proxy(this,{get:(o,i)=>this.at(i)})),d(this,"filter",(o,i)=>{let s=i??this.get();const r=new ct(()=>{try{const c=this.get();return s=o(c)?c:s}catch(c){throw console.error("Error in Signal.filter:",c),c}},this.equals);return this.setDerivative(r),r}),d(this,"filterMap",(o,i,s=(r,c)=>r===c)=>{let r=i;const c=new ct(()=>{try{const l=this.get();return r=o(l)??r}catch(l){throw console.error("Error in Signal.filterMap:",l),l}},s);return this.setDerivative(c),c}),d(this,"mapAsync",(o,i,s,r=(c,l)=>c===l)=>{const c=P(i,r);let l=0;return c.onDispose(this.on(a=>{const f=++l;try{o(a).then(u=>{f===l&&c.set(u)}).catch(u=>{f===l&&(s!=null?c.set(s(u)):console.error("Unhandled promise rejection in Signal.mapAsync:",u))})}catch(u){throw console.error("Error in Signal.mapAsync:",u),u}})),c}),d(this,"mapMaybe",(o,i)=>this.map(s=>o(s)??i)),d(this,"feedProp",(o,i=!1)=>{const s=this.on(o.set);return o.onDispose(s),i?this.onDispose(o.dispose):this.onDispose(s),o}),d(this,"deriveProp",(o=!0)=>this.feedProp(P(this.get()),o)),d(this,"count",()=>{let o=0;return this.map(()=>++o)}),d(this,"setDerivative",o=>{this._derivatives.push(o),o.onDispose(()=>{this._derivatives.splice(this._derivatives.indexOf(o),1)}),o.onDispose(this.on(o.setDirty)),this.onDispose(o.dispose)}),this.equals=n,this._value=e}static ofPromise(e,n,o,i=(s,r)=>s===r){const s=new F(n,i);return e.then(r=>s._setAndNotify(r,!1)).catch(r=>{o!=null?s._setAndNotify(o(r),!1):console.error("Unhandled promise rejection in Signal.ofPromise:",r)}),s}static is(e){return e!=null&&e[Yt]===!0}static wrap(e,n=(o,i)=>o===i){return F.is(e)?e:new F(e,n)}static maybeWrap(e){return e==null?e:F.wrap(e)}static unwrap(e){return F.is(e)?e.get():e}static map(e,n){return F.is(e)?e.map(n):n(e)}get value(){return this._value}};let S=je;const qe=typeof queueMicrotask=="function"?queueMicrotask:t=>Promise.resolve().then(t);var Vt,$t;class ct extends($t=S,Vt=Ft,$t){constructor(e,n){super(void 0,n),d(this,Vt,!0),d(this,"_isDirty",!1),d(this,"setDirty",()=>{this._isDirty||this._disposed||(this._isDirty=!0,this._derivatives.forEach(o=>o.setDirty()),this.scheduleNotify())}),d(this,"_scheduleCount",0),d(this,"scheduleNotify",()=>{const o=++this._scheduleCount;qe(()=>{this._scheduleCount!==o||this._disposed!==!1||this._isDirty&&(this._isDirty=!1,this._setAndNotify(this._fn(),!1))})}),d(this,"get",()=>(this._isDirty&&(this._isDirty=!1,this._value=this._fn(),this._setAndNotify(this._value,!0)),this._value)),this._fn=e,this.setDirty()}static is(e){return e!=null&&e[Ft]===!0}get value(){return this.get()}}var Wt,Ht;class St extends(Ht=S,Wt=Nt,Ht){constructor(){super(...arguments),d(this,Wt,!0),d(this,"set",e=>{this._setAndNotify(e,!1)}),d(this,"update",e=>{this._setAndNotify(e(this.get()),!1)}),d(this,"reducer",(e,...n)=>{const o=this;return function i(s){const r=o.value;o.update(c=>e(c,s)),!o.equals(r,o.value)&&n.forEach(c=>c({previousState:r,state:o.value,action:s,dispatch:i}))}}),d(this,"iso",(e,n,o=(i,s)=>i===s)=>{const i=new St(e(this.get()),o);return i.onDispose(this.on(s=>i.set(e(s)))),i.on(s=>this._setAndNotify(n(s),!1)),i}),d(this,"atProp",e=>this.iso(n=>n[e],n=>({...this.value,[e]:n})))}static is(e){return e!=null&&e[Nt]===!0}get value(){return this.get()}set value(e){this._setAndNotify(e,!1)}}function P(t,e=(n,o)=>n===o){return new St(t,e)}function Xe(t,e=(n,o)=>n===o){return new S(t,e)}const Kt=new Set(["checked","disabled","hidden","selected"]),Gt=new Set(["rowSpan","colSpan","tabIndex","valueAsNumber"]),Qt=new Set(["valueAsDate"]),Zt=new Set(["value","textContent","innerText","innerHTML","outerHTML","className","classList"]),xt=new Map;function Q(t,e){if(xt.has(t))return xt.get(t);{const n=e(t);return xt.set(t,n),n}}function Ye(t){return(e,n)=>{n==null?e[t]=null:e[t]=!!n}}function Je(t){return(e,n)=>{n==null?e[t]=null:e[t]=Number(n)}}function Ke(t){return(e,n)=>{n==null?e[t]=null:e[t]=n}}function Ge(t){return(e,n)=>{n==null?e[t]=null:e[t]=String(n)}}function Qe(t){return(e,n)=>{n==null?e.removeAttribute(t):e.setAttribute(t,n)}}function te(t){return Kt.has(t)?Q(t,Ye):Gt.has(t)?Q(t,Je):Qt.has(t)?Q(t,Ke):Zt.has(t)?Q(t,Ge):Q(t,Qe)}function ee(t){return e=>Kt.has(t)?!!e[t]:Gt.has(t)?Number(e[t]):Qt.has(t)?e[t]:Zt.has(t)?String(e[t]):e.getAttribute(t)}function q(t){const e=t;e&&e.onblur&&(e.onblur=null),!(!t||t.ownerDocument===void 0)&&t.parentElement&&t.parentElement.removeChild(t)}function Ze(t,e,n){let o=t.target;for(;o!=null&&!(o instanceof HTMLAnchorElement);)o=o.parentElement;if(o==null)return!0;const i=o;if(t.button!==0||t.ctrlKey||t.metaKey||i.target!=="_self"&&i.target!==""||i.getAttribute("download")!=null)return!0;if(n){const{pathname:s,search:r,hash:c}=i,l=s+r+c;if(i.getAttribute("href")!==l||e&&!/\/[^/.]*$/.test(s))return!0}return!1}const tn=(t,e={checkExtension:!0,checkExternalUrl:!0})=>n=>{const{checkExtension:o,checkExternalUrl:i}=e;Ze(n,o===!0,i===!0)||t()&&n.preventDefault()},en=t=>e=>{le(e);const n=e.createText(t);return e.appendOrInsert(n),o=>{o&&q(n)}},nn=t=>e=>{le(e);const n=e.createText(t.value);e.appendOrInsert(n);const o=t.on(i=>n.data=i);return i=>{o(),i&&q(n)}},X=(...t)=>e=>{const n=t.map(o=>b(o)(e));return o=>{n.forEach(i=>i(o))}},tt=()=>()=>{},on=t=>e=>(re(e),e.element.classList.add(...t),n=>{n&&e.element.classList.remove(...t)}),sn=t=>e=>{re(e);const n=e.element;let o=[];const i=t.on(s=>{o.forEach(r=>n.classList.remove(r)),o=(s??"").split(" ").filter(r=>r.length>0),n.classList.add(...o)});return s=>{i(),s&&o.forEach(r=>n.classList.remove(r)),o.length=0}},nt=(t,e)=>{const n=te(t),o=ee(t);return i=>{se(i,t);const s=o(i.element);return n(i.element,e),r=>{r&&n(i.element,s)}}},ot=(t,e)=>{const n=te(t),o=ee(t);return i=>{se(i,t);const s=o(i.element);return e.on(r=>n(i.element,r)),r=>{r&&n(i.element,s)}}},Lt=new Proxy({},{get:(t,e)=>e==="class"?n=>S.is(n)?sn(n):on((n??"").split(" ").filter(o=>o.length>0)):n=>S.is(n)?ot(e,n):nt(e,n)});new Proxy({},{get:(t,e)=>n=>S.is(n)?ot(`data-${e}`,n):nt(`data-${e}`,n)});new Proxy({},{get:(t,e)=>n=>S.is(n)?ot(`aria-${e}`,n):nt(`aria-${e}`,n)});new Proxy({},{get:(t,e)=>n=>S.is(n)?ot(e,n):nt(e,n)});new Proxy({},{get:(t,e)=>n=>S.is(n)?ot(e,n):nt(e,n)});function b(t){return t==null?tt:Array.isArray(t)?X(...t.map(b)):typeof t=="string"?en(t):S.is(t)?nn(t):t}function ne(t,...e){return n=>{const o=n.createElement(t,void 0);n.isFirstLevel&&Y.isSSR()&&ce(o),n.appendOrInsert(o),n=n.withElement(o);const i=e.map(s=>b(s)(n));return s=>{i.forEach(r=>r(!1)),s&&q(o)}}}function oe(t,e,...n){return o=>{const i=o.createElement(t,e);o.isFirstLevel&&Y.isSSR()&&ce(i),o.appendOrInsert(i),o=o.withElement(i);const s=n.map(r=>b(r)(o));return r=>{s.forEach(c=>c(!1)),r&&q(i)}}}const ie=new Proxy({},{get:(t,e)=>(...n)=>ne(e,n.flatMap(b))});new Proxy({},{get:(t,e)=>(...n)=>ne("input",Lt.type(e),...n)});const rn="http://www.w3.org/2000/svg";new Proxy({},{get:(t,e)=>(...n)=>oe(e,rn,n.flatMap(b))});const cn="http://www.w3.org/1998/Math/MathML";new Proxy({},{get:(t,e)=>(...n)=>oe(e,cn,n.flatMap(b))});const zt="data-tempo-attr",ln="data-tempo-class",an="data-tempo-node",un="data-tempo-text";function fn(t,e){const n=t.getAttribute(e);if(n!=null){const o=t.getAttribute(zt)??"{}",i={...JSON.parse(o),name:n};t.setAttribute(zt,JSON.stringify(i))}}function se(t,e){Y.isSSR()&&t.isFirstLevel&&fn(t.element,e)}function hn(t){t.setAttribute(ln,t.className)}function re(t){Y.isSSR()&&t.isFirstLevel&&hn(t.element)}function ce(t){t.setAttribute(an,"")}function dn(t){t.setAttribute(un,t.textContent??"")}function le(t){Y.isSSR()&&t.isFirstLevel&&dn(t.element)}function ae(){const t=globalThis;return t.__tempoSSR__==null&&(t.__tempoSSR__={isSSR:!1,counter:0}),t.__tempoSSR__}function ue(t,e){const n=ae();n[t]=e}function fe(t){return ae()[t]}function pn(){return fe("isSSR")}function he(){return fe("counter")}function mn(){ue("counter",(he()??0)+1)}function gn(){ue("counter",(he()??0)-1)}const Y={useDone:t=>(mn(),b(t(gn))),isSSR:pn},wn=(t,e)=>n=>(n.element.addEventListener(t,e),o=>{o&&n.element.removeEventListener(t,e)}),de=new Proxy({},{get:(t,e)=>n=>wn(e,n)}),lt=(t,e)=>n=>{n=n.makeRef();let o,i;const s=t.map(l=>Object.keys(l)[0]);let r;const c=s.on(l=>{if(l!==r){i==null||i.dispose(),o==null||o(!0),i=t.map(f=>f[l]);const a=e[l](i);o=b(a)(n),r=l}});return l=>{c(),l&&n.reference!=null&&q(n.reference),o==null||o(!0)}},B={bool:(t,e)=>lt(t.map(n=>n?{true:!0}:{false:!0}),e),field:(t,e,n)=>lt(t.map(o=>({[o[e]]:o})),n),kind:(t,e)=>B.field(t,"kind",e),tuple:(t,e)=>{const n=t.map(([o,i])=>({[o]:i}));return lt(n,e)},type:(t,e)=>B.field(t,"type",e),value:(t,e)=>lt(t.map(n=>({[n]:!0})),e)},yn=(t,e)=>n=>{const o=Object.values(t).reduce((i,s)=>{const r=n.getProvider(s);if(r==null)throw new Error(`No provider found for mark: ${s.description}`);return i[s]=r,i},{});return b(e(o))(n)},pe=(t,e)=>yn([t],n=>b(e(n[t]))),vn=(t,e,n)=>o=>{o=o.makeRef();let i=null,s=!1;const r=P(null),c=t.on(l=>{l==null?(i==null||i(!0),i=b((n==null?void 0:n())??tt)(o),s=!1):(r.value=l,s||(i==null||i(!0),i=b(e(r))(o),s=!0))});return l=>{c(),i==null||i(l),l&&o.reference&&q(o.reference)}},it=t=>e=>n=>t(n,e),xn=(t,e,n)=>vn(t.map(o=>o?!0:null),()=>e,n!=null?()=>n:void 0),me=t=>e=>t(e.element)??(()=>{});function bn(t,e){const n=t(e);return()=>n(!0)}const ge=(t,e)=>n=>{const o=n.document.querySelector(t);if(o===null)throw new Error(`Cannot find element by selector for portal: ${t}`);return bn(b(e),n.withElement(o).withFirstLevel())};function we(t){return Symbol(t)}const An=(t,e)=>n=>b(e)(n.withProviders(t)),ye=(t,e,n)=>An({[t]:e},b(n)),Sn=(t,e)=>n=>{const o=n.element,i=o.style.getPropertyValue(t);return o.style.setProperty(t,e),s=>{s&&o.style.setProperty(t,i)}},Ln=(t,e)=>n=>{const o=n.element,i=o.style.getPropertyValue(t);return e.on(s=>o.style.setProperty(t,s)),s=>{s&&o.style.setProperty(t,i)}};new Proxy({},{get:(t,e)=>n=>S.is(n)?Ln(e,n):Sn(e,n)});const Et=we("LocationProvider");function ve(){const t=(window==null?void 0:window.location.hash)===""?void 0:(window==null?void 0:window.location.hash.substring(1))??void 0;return{pathname:(window==null?void 0:window.location.pathname)??"",search:Object.fromEntries(new URLSearchParams((window==null?void 0:window.location.search)??"").entries()),hash:t}}function xe(t,e){return t.pathname===e.pathname&&JSON.stringify(t.search)===JSON.stringify(e.search)&&t.hash===e.hash}function be(t){const e=new URL(t,(window==null?void 0:window.location.toString())??""),n=Object.fromEntries(e.searchParams.entries());return{pathname:e.pathname,search:n,hash:e.hash}}function Ae(t,e){const n=be(e);return t.set(n),t}function Se(){const t=P(ve(),xe),e=()=>{const n={...t.value,pathname:(window==null?void 0:window.location.pathname)??""};t.set(n)};return window==null||window.addEventListener("popstate",e),t.onDispose(()=>{window==null||window.removeEventListener("popstate",e)}),t.on(n=>{const i=new URLSearchParams(n.search).toString(),s=n.hash,r=`${n.pathname}${i?`?${i}`:""}${s?`#${s}`:""}`;window==null||window.history.pushState({},"",r)}),t}function En(t){const e=Se();return X(it(e.dispose),ye(Et,e,t))}function Rt(t){return pe(Et,e=>n=>{const o=P(e.value,e.equals);e.feedProp(o),o.on(e.set);const i=b(t(o))(n);return s=>{o.dispose(),i(s)}})}function Rn(t,...e){return Rt(n=>ie.a(de.click(tn(()=>(Ae(n,S.unwrap(t)),!0))),Lt.href(t),...e))}const _t=we("Appearance"),_n=t=>{const e=window.matchMedia!=null&&window.matchMedia("(prefers-color-scheme: dark)").matches,n=P(e?"dark":"light"),o=s=>{n.set(s.matches?"dark":"light")},i=window.matchMedia!=null?window.matchMedia("(prefers-color-scheme: dark)"):void 0;return i==null||i.addEventListener("change",o),X(ye(_t,n,t),it(()=>i==null?void 0:i.removeEventListener("change",o)))},On=t=>pe(_t,t);function Le(t,e){if(typeof e=="function")return Le(t,{success:e});const n=e.failure??(r=>X(it(r.on(console.error)),r.map(c=>`Error: ${c}`))),o=e.success,i=e.loading??(()=>tt),s=e.notAsked??(()=>tt);return B.type(S.wrap(t),{Success:r=>o(r.$.value),Failure:r=>n(r.$.error),Loading:r=>i(r.$.previousValue??Xe(void 0)),NotAsked:s})}const Pn=(t=10)=>e=>{const n=setTimeout(()=>{var o;(o=e.element)==null||o.focus()},t);return o=>clearTimeout(n)},Dn=(t=10)=>e=>{const n=setTimeout(()=>{var o;(o=e.element)==null||o.select()},t);return o=>{clearTimeout(n)}},Tn=t=>{const e=t.element,n=e.style.getPropertyValue(":empty");return e.style.setProperty(":empty","display:none"),o=>{o&&e.style.setProperty(":empty",n)}},kn=t=>ge("head title",Lt.innerText(t)),Cn={partial:{root:null,rootMargin:"0px",threshold:0},full:{root:null,rootMargin:"0px",threshold:1}},ut={partial:new Map,full:new Map},Z={partial:null,full:null};function Mn(t){return Z[t]==null&&(Z[t]=new IntersectionObserver(e=>{e.forEach(n=>{const o=ut[t].get(n.target);o==null||o.set(n.isIntersecting)})},Cn[t])),Z[t]}function Ee(t,e){const n=P(Y.isSSR());return X(me(o=>{const i=typeof IntersectionObserver<"u"?Mn(t):null;return ut[t].set(o,n),i==null||i.observe(o),()=>{var s;i==null||i.unobserve(o),ut[t].delete(o),ut[t].size===0&&((s=Z[t])==null||s.disconnect(),Z[t]=null)}}),it(n.dispose),b(e(n)))}const Nn=(t,e,n)=>Ee(t,o=>xn(o,e,n??tt)),ft=Math.min,V=Math.max,ht=Math.round,at=Math.floor,C=t=>({x:t,y:t}),Fn={left:"right",right:"left",bottom:"top",top:"bottom"},Vn={start:"end",end:"start"};function It(t,e,n){return V(t,ft(e,n))}function mt(t,e){return typeof t=="function"?t(e):t}function $(t){return t.split("-")[0]}function gt(t){return t.split("-")[1]}function Re(t){return t==="x"?"y":"x"}function _e(t){return t==="y"?"height":"width"}function U(t){return["top","bottom"].includes($(t))?"y":"x"}function Oe(t){return Re(U(t))}function $n(t,e,n){n===void 0&&(n=!1);const o=gt(t),i=Oe(t),s=_e(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=dt(r)),[r,dt(r)]}function Wn(t){const e=dt(t);return[At(t),e,At(e)]}function At(t){return t.replace(/start|end/g,e=>Vn[e])}function Hn(t,e,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?s:r;default:return[]}}function zn(t,e,n,o){const i=gt(t);let s=Hn($(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(At)))),s}function dt(t){return t.replace(/left|right|bottom|top/g,e=>Fn[e])}function In(t){return{top:0,right:0,bottom:0,left:0,...t}}function Bn(t){return typeof t!="number"?In(t):{top:t,right:t,bottom:t,left:t}}function pt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Bt(t,e,n){let{reference:o,floating:i}=t;const s=U(e),r=Oe(e),c=_e(r),l=$(e),a=s==="y",f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let h;switch(l){case"top":h={x:f,y:o.y-i.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-i.width,y:u};break;default:h={x:o.x,y:o.y}}switch(gt(e)){case"start":h[r]-=m*(n&&a?-1:1);break;case"end":h[r]+=m*(n&&a?-1:1);break}return h}const Un=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=Bt(a,o,l),m=o,h={},g=0;for(let w=0;w<c.length;w++){const{name:y,fn:p}=c[w],{x:v,y:x,data:L,reset:A}=await p({x:f,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:h,rects:a,platform:r,elements:{reference:t,floating:e}});f=v??f,u=x??u,h={...h,[y]:{...h[y],...L}},A&&g<=50&&(g++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(a=A.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:f,y:u}=Bt(a,m,l)),w=-1)}return{x:f,y:u,placement:m,strategy:i,middlewareData:h}};async function Pe(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:h=0}=mt(e,t),g=Bn(h),y=c[m?u==="floating"?"reference":"floating":u],p=pt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),v=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),L=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},A=pt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:x,strategy:l}):v);return{top:(p.top-A.top+g.top)/L.y,bottom:(A.bottom-p.bottom+g.bottom)/L.y,left:(p.left-A.left+g.left)/L.x,right:(A.right-p.right+g.right)/L.x}}const jn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:w=!0,...y}=mt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const p=$(i),v=U(c),x=$(c)===c,L=await(l.isRTL==null?void 0:l.isRTL(a.floating)),A=m||(x||!w?[dt(c)]:Wn(c)),H=g!=="none";!m&&H&&A.push(...zn(c,w,g,L));const ze=[c,...A],vt=await Pe(e,y),rt=[];let K=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&rt.push(vt[p]),u){const N=$n(i,r,L);rt.push(vt[N[0]],vt[N[1]])}if(K=[...K,{placement:i,overflows:rt}],!rt.every(N=>N<=0)){var Tt,kt;const N=(((Tt=s.flip)==null?void 0:Tt.index)||0)+1,Mt=ze[N];if(Mt)return{data:{index:N,overflows:K},reset:{placement:Mt}};let G=(kt=K.filter(z=>z.overflows[0]<=0).sort((z,T)=>z.overflows[1]-T.overflows[1])[0])==null?void 0:kt.placement;if(!G)switch(h){case"bestFit":{var Ct;const z=(Ct=K.filter(T=>{if(H){const k=U(T.placement);return k===v||k==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(k=>k>0).reduce((k,Ie)=>k+Ie,0)]).sort((T,k)=>T[1]-k[1])[0])==null?void 0:Ct[0];z&&(G=z);break}case"initialPlacement":G=c;break}if(i!==G)return{reset:{placement:G}}}return{}}}};async function qn(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=$(n),c=gt(n),l=U(n)==="y",a=["left","top"].includes(r)?-1:1,f=s&&l?-1:1,u=mt(e,t);let{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return c&&typeof g=="number"&&(h=c==="end"?g*-1:g),l?{x:h*f,y:m*a}:{x:m*a,y:h*f}}const Xn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=e,l=await qn(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},Yn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:y=>{let{x:p,y:v}=y;return{x:p,y:v}}},...l}=mt(t,e),a={x:n,y:o},f=await Pe(e,l),u=U($(i)),m=Re(u);let h=a[m],g=a[u];if(s){const y=m==="y"?"top":"left",p=m==="y"?"bottom":"right",v=h+f[y],x=h-f[p];h=It(v,h,x)}if(r){const y=u==="y"?"top":"left",p=u==="y"?"bottom":"right",v=g+f[y],x=g-f[p];g=It(v,g,x)}const w=c.fn({...e,[m]:h,[u]:g});return{...w,data:{x:w.x-n,y:w.y-o}}}}};function J(t){return De(t)?(t.nodeName||"").toLowerCase():"#document"}function E(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function D(t){var e;return(e=(De(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function De(t){return t instanceof Node||t instanceof E(t).Node}function _(t){return t instanceof Element||t instanceof E(t).Element}function O(t){return t instanceof HTMLElement||t instanceof E(t).HTMLElement}function Ut(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof E(t).ShadowRoot}function st(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=R(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Jn(t){return["table","td","th"].includes(J(t))}function wt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Ot(t){const e=Pt(),n=R(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Kn(t){let e=M(t);for(;O(e)&&!j(e);){if(wt(e))return null;if(Ot(e))return e;e=M(e)}return null}function Pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function j(t){return["html","body","#document"].includes(J(t))}function R(t){return E(t).getComputedStyle(t)}function yt(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function M(t){if(J(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ut(t)&&t.host||D(t);return Ut(e)?e.host:e}function Te(t){const e=M(t);return j(e)?t.ownerDocument?t.ownerDocument.body:t.body:O(e)&&st(e)?e:Te(e)}function et(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Te(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=E(i);return s?e.concat(r,r.visualViewport||[],st(i)?i:[],r.frameElement&&n?et(r.frameElement):[]):e.concat(i,et(i,[],n))}function ke(t){const e=R(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=O(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=ht(n)!==s||ht(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function Dt(t){return _(t)?t:t.contextElement}function I(t){const e=Dt(t);if(!O(e))return C(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ke(e);let r=(s?ht(n.width):n.width)/o,c=(s?ht(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Gn=C(0);function Ce(t){const e=E(t);return!Pt()||!e.visualViewport?Gn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Qn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==E(t)?!1:e}function W(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Dt(t);let r=C(1);e&&(o?_(o)&&(r=I(o)):r=I(t));const c=Qn(s,n,o)?Ce(s):C(0);let l=(i.left+c.x)/r.x,a=(i.top+c.y)/r.y,f=i.width/r.x,u=i.height/r.y;if(s){const m=E(s),h=o&&_(o)?E(o):o;let g=m,w=g.frameElement;for(;w&&o&&h!==g;){const y=I(w),p=w.getBoundingClientRect(),v=R(w),x=p.left+(w.clientLeft+parseFloat(v.paddingLeft))*y.x,L=p.top+(w.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,a*=y.y,f*=y.x,u*=y.y,l+=x,a+=L,g=E(w),w=g.frameElement}}return pt({width:f,height:u,x:l,y:a})}function Zn(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=D(o),c=e?wt(e.floating):!1;if(o===r||c&&s)return n;let l={scrollLeft:0,scrollTop:0},a=C(1);const f=C(0),u=O(o);if((u||!u&&!s)&&((J(o)!=="body"||st(r))&&(l=yt(o)),O(o))){const m=W(o);a=I(o),f.x=m.x+o.clientLeft,f.y=m.y+o.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x,y:n.y*a.y-l.scrollTop*a.y+f.y}}function to(t){return Array.from(t.getClientRects())}function Me(t){return W(D(t)).left+yt(t).scrollLeft}function eo(t){const e=D(t),n=yt(t),o=t.ownerDocument.body,i=V(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=V(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Me(t);const c=-n.scrollTop;return R(o).direction==="rtl"&&(r+=V(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:c}}function no(t,e){const n=E(t),o=D(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,c=0,l=0;if(i){s=i.width,r=i.height;const a=Pt();(!a||a&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:s,height:r,x:c,y:l}}function oo(t,e){const n=W(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=O(t)?I(t):C(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,l=i*s.x,a=o*s.y;return{width:r,height:c,x:l,y:a}}function jt(t,e,n){let o;if(e==="viewport")o=no(t,n);else if(e==="document")o=eo(D(t));else if(_(e))o=oo(e,n);else{const i=Ce(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return pt(o)}function Ne(t,e){const n=M(t);return n===e||!_(n)||j(n)?!1:R(n).position==="fixed"||Ne(n,e)}function io(t,e){const n=e.get(t);if(n)return n;let o=et(t,[],!1).filter(c=>_(c)&&J(c)!=="body"),i=null;const s=R(t).position==="fixed";let r=s?M(t):t;for(;_(r)&&!j(r);){const c=R(r),l=Ot(r);!l&&c.position==="fixed"&&(i=null),(s?!l&&!i:!l&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||st(r)&&!l&&Ne(t,r))?o=o.filter(f=>f!==r):i=c,r=M(r)}return e.set(t,o),o}function so(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?wt(e)?[]:io(e,this._c):[].concat(n),o],c=r[0],l=r.reduce((a,f)=>{const u=jt(e,f,i);return a.top=V(u.top,a.top),a.right=ft(u.right,a.right),a.bottom=ft(u.bottom,a.bottom),a.left=V(u.left,a.left),a},jt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function ro(t){const{width:e,height:n}=ke(t);return{width:e,height:n}}function co(t,e,n){const o=O(e),i=D(e),s=n==="fixed",r=W(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=C(0);if(o||!o&&!s)if((J(e)!=="body"||st(i))&&(c=yt(e)),o){const u=W(e,!0,s,e);l.x=u.x+e.clientLeft,l.y=u.y+e.clientTop}else i&&(l.x=Me(i));const a=r.left+c.scrollLeft-l.x,f=r.top+c.scrollTop-l.y;return{x:a,y:f,width:r.width,height:r.height}}function bt(t){return R(t).position==="static"}function qt(t,e){return!O(t)||R(t).position==="fixed"?null:e?e(t):t.offsetParent}function Fe(t,e){const n=E(t);if(wt(t))return n;if(!O(t)){let i=M(t);for(;i&&!j(i);){if(_(i)&&!bt(i))return i;i=M(i)}return n}let o=qt(t,e);for(;o&&Jn(o)&&bt(o);)o=qt(o,e);return o&&j(o)&&bt(o)&&!Ot(o)?n:o||Kn(t)||n}const lo=async function(t){const e=this.getOffsetParent||Fe,n=this.getDimensions,o=await n(t.floating);return{reference:co(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function ao(t){return R(t).direction==="rtl"}const uo={convertOffsetParentRelativeRectToViewportRelativeRect:Zn,getDocumentElement:D,getClippingRect:so,getOffsetParent:Fe,getElementRects:lo,getClientRects:to,getDimensions:ro,getScale:I,isElement:_,isRTL:ao};function fo(t,e){let n=null,o;const i=D(t);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function r(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:a,top:f,width:u,height:m}=t.getBoundingClientRect();if(c||e(),!u||!m)return;const h=at(f),g=at(i.clientWidth-(a+u)),w=at(i.clientHeight-(f+m)),y=at(a),v={rootMargin:-h+"px "+-g+"px "+-w+"px "+-y+"px",threshold:V(0,ft(1,l))||1};let x=!0;function L(A){const H=A[0].intersectionRatio;if(H!==l){if(!x)return r();H?r(!1,H):o=setTimeout(()=>{r(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(L,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(L,v)}n.observe(t)}return r(!0),s}function ho(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Dt(t),f=i||s?[...a?et(a):[],...et(e)]:[];f.forEach(p=>{i&&p.addEventListener("scroll",n,{passive:!0}),s&&p.addEventListener("resize",n)});const u=a&&c?fo(a,n):null;let m=-1,h=null;r&&(h=new ResizeObserver(p=>{let[v]=p;v&&v.target===a&&h&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(e)})),n()}),a&&!l&&h.observe(a),h.observe(e));let g,w=l?W(t):null;l&&y();function y(){const p=W(t);w&&(p.x!==w.x||p.y!==w.y||p.width!==w.width||p.height!==w.height)&&n(),w=p,g=requestAnimationFrame(y)}return n(),()=>{var p;f.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),u==null||u(),(p=h)==null||p.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const po=Xn,mo=Yn,Xt=jn,go=(t,e,n)=>{const o=new Map,i={platform:uo,...n},s={...i.platform,_c:o};return Un(t,e,{...i,platform:s})};function wo({content:t,open:e,placement:n,offset:{mainAxis:o,crossAxis:i}={mainAxis:0,crossAxis:0}}){return s=>{const r=s.element,c=S.wrap(e);return B.bool(c,{true:()=>ge("body",ie.div(me(l=>{const a=l;return a.style.position="absolute",ho(r,a,()=>{go(r,a,{placement:n,strategy:"absolute",middleware:[Xt(),po({mainAxis:o,crossAxis:i}),mo(),Xt()]}).then(({x:f,y:u})=>{a.style.top=`${u}px`,a.style.left=`${f}px`})})}),t())),false:()=>null})(s)}}function Ve(t,e){if(typeof e=="function")return Ve(t,{success:e});const n=e.failure??(i=>X(it(i.on(console.error)),i.map(s=>`Error: ${s}`))),o=e.success;return B.type(S.wrap(t),{Success:i=>o(i.$.value),Failure:i=>n(i.$.error)})}function yo(){return de.focus(t=>{var e;return(e=t.target)==null?void 0:e.select()})}const vo=t=>e=>{const n=e.element,o=P({width:n.clientWidth,height:n.clientHeight}),i=b(t(o))(e),s=()=>{o.set({width:n.clientWidth,height:n.clientHeight})};let r;return typeof ResizeObserver=="function"&&(r=new ResizeObserver(s),r.observe(n)),c=>{r==null||r.disconnect(),i(c)}},xo=t=>e=>{const n=P({width:(window==null?void 0:window.innerWidth)??0,height:(window==null?void 0:window.innerHeight)??0}),o=b(t(n))(e),i=()=>{n.set({width:(window==null?void 0:window.innerWidth)??0,height:(window==null?void 0:window.innerHeight)??0})};return window==null||window.addEventListener("resize",i),s=>{window==null||window.removeEventListener("resize",i),o(s)}},bo={element:vo,window:xo};function $e(t,e){const n=e.split("/").filter(i=>i!==""),o={};for(let i=0;i<t.length;i++){const s=t[i],r=n[i];if(!r&&s.type!=="catch-all")return null;if(s.type==="literal"){if(s.value!==r)return null}else if(s.type==="param")o[s.name]=r;else if(s.type==="catch-all")return{params:o,path:e}}return n.length!==t.length?null:{params:o,path:e}}function We(t){return t.split("/").map(e=>e.startsWith(":")?{type:"param",name:e.slice(1)}:e==="*"?{type:"catch-all"}:{type:"literal",value:e}).filter(e=>e.type!=="literal"||e.value!=="")}function He(t){const e=t.map(n=>{const o=We(n);return{route:n,segments:o}});return function(o){for(const{segments:i,route:s}of e){const r=$e(i,o);if(r)return{...r,route:s}}return null}}function Ao(t){const e=He(Object.keys(t));return Rt(n=>{const o=n.map(i=>{const s=e(i.pathname);if(s==null)throw console.error("No route found for",i),new Error("No route found");return{params:s.params,route:s.route,path:s.path,search:i.search,hash:i.hash}});return B.tuple(o.map(i=>[i.route,i]),t)})}exports.Anchor=Rn;exports.AsyncResultView=Le;exports.AutoFocus=Pn;exports.AutoSelect=Dn;exports.HTMLTitle=kn;exports.HiddenWhenEmpty=Tn;exports.InViewport=Ee;exports.LocationProviderMarker=Et;exports.PopOver=wo;exports.ProvideAppearance=_n;exports.ProvideLocation=En;exports.ResultView=Ve;exports.Router=Ao;exports.SelectOnFocus=yo;exports.UseAppearance=On;exports.UseLocation=Rt;exports.WhenInViewport=Nn;exports.appearanceMarker=_t;exports.equalsLocation=xe;exports.locationFromURL=be;exports.makeLocation=ve;exports.makeLocationProp=Se;exports.makeRouteMatcher=He;exports.matchesRoute=$e;exports.parseRouteSegments=We;exports.setLocationFromUrl=Ae;exports.size=bo;
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});var Be=Object.defineProperty,Ue=(t,e,n)=>e in t?Be(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,d=(t,e,n)=>Ue(t,typeof e!="symbol"?e+"":e,n);const Yt="$__signal__",Nt="$__prop__",Ft="$__computed__";var Jt;Jt=Yt;const je=class F{constructor(e,n){d(this,Jt,!0),d(this,"_value"),d(this,"_derivatives",[]),d(this,"_onValueListeners",[]),d(this,"_onDisposeListeners",[]),d(this,"get",()=>this._value),d(this,"hasListeners",()=>this._onValueListeners.length>0),d(this,"on",o=>(o(this.get()),this._onValueListeners.push(o),()=>{this._onValueListeners.splice(this._onValueListeners.indexOf(o),1)})),d(this,"_setAndNotify",(o,i)=>{const s=this.equals(this._value,o);s||(this._value=o),(i||!s)&&this._onValueListeners.forEach(r=>r(o))}),d(this,"_disposed",!1),d(this,"isDisposed",()=>this._disposed),d(this,"onDispose",o=>{this._onDisposeListeners.push(o)}),d(this,"dispose",()=>{this._disposed||(this._disposed=!0,this._onDisposeListeners.forEach(o=>o()),this._onDisposeListeners.length=0,this._derivatives.length=0)}),d(this,"map",(o,i=(s,r)=>s===r)=>{const s=new ct(()=>{try{return o(this.get())}catch(r){throw console.error("Error in Signal.map:",r),r}},i);return this.setDerivative(s),s}),d(this,"flatMap",(o,i=(s,r)=>s===r)=>{const s=new ct(()=>{try{return o(this.get()).get()}catch(r){throw console.error("Error in Signal.flatMap:",r),r}},i);return this.setDerivative(s),s}),d(this,"tap",o=>this.map(i=>(o(i),i))),d(this,"at",o=>this.map(i=>i[o])),d(this,"$",new Proxy(this,{get:(o,i)=>this.at(i)})),d(this,"filter",(o,i)=>{let s=i??this.get();const r=new ct(()=>{try{const c=this.get();return s=o(c)?c:s}catch(c){throw console.error("Error in Signal.filter:",c),c}},this.equals);return this.setDerivative(r),r}),d(this,"filterMap",(o,i,s=(r,c)=>r===c)=>{let r=i;const c=new ct(()=>{try{const l=this.get();return r=o(l)??r}catch(l){throw console.error("Error in Signal.filterMap:",l),l}},s);return this.setDerivative(c),c}),d(this,"mapAsync",(o,i,s,r=(c,l)=>c===l)=>{const c=P(i,r);let l=0;return c.onDispose(this.on(a=>{const f=++l;try{o(a).then(u=>{f===l&&c.set(u)}).catch(u=>{f===l&&(s!=null?c.set(s(u)):console.error("Unhandled promise rejection in Signal.mapAsync:",u))})}catch(u){throw console.error("Error in Signal.mapAsync:",u),u}})),c}),d(this,"mapMaybe",(o,i)=>this.map(s=>o(s)??i)),d(this,"feedProp",(o,i=!1)=>{const s=this.on(o.set);return o.onDispose(s),i?this.onDispose(o.dispose):this.onDispose(s),o}),d(this,"deriveProp",(o=!0)=>this.feedProp(P(this.get()),o)),d(this,"count",()=>{let o=0;return this.map(()=>++o)}),d(this,"setDerivative",o=>{this._derivatives.push(o),o.onDispose(()=>{this._derivatives.splice(this._derivatives.indexOf(o),1)}),o.onDispose(this.on(o.setDirty)),this.onDispose(o.dispose)}),this.equals=n,this._value=e}static ofPromise(e,n,o,i=(s,r)=>s===r){const s=new F(n,i);return e.then(r=>s._setAndNotify(r,!1)).catch(r=>{o!=null?s._setAndNotify(o(r),!1):console.error("Unhandled promise rejection in Signal.ofPromise:",r)}),s}static is(e){return e!=null&&e[Yt]===!0}static wrap(e,n=(o,i)=>o===i){return F.is(e)?e:new F(e,n)}static maybeWrap(e){return e==null?e:F.wrap(e)}static unwrap(e){return F.is(e)?e.get():e}static map(e,n){return F.is(e)?e.map(n):n(e)}get value(){return this._value}};let S=je;const qe=typeof queueMicrotask=="function"?queueMicrotask:t=>Promise.resolve().then(t);var $t,Vt;class ct extends(Vt=S,$t=Ft,Vt){constructor(e,n){super(void 0,n),d(this,$t,!0),d(this,"_isDirty",!1),d(this,"setDirty",()=>{this._isDirty||this._disposed||(this._isDirty=!0,this._derivatives.forEach(o=>o.setDirty()),this.scheduleNotify())}),d(this,"_scheduleCount",0),d(this,"scheduleNotify",()=>{const o=++this._scheduleCount;qe(()=>{this._scheduleCount!==o||this._disposed!==!1||this._isDirty&&(this._isDirty=!1,this._setAndNotify(this._fn(),!1))})}),d(this,"get",()=>(this._isDirty&&(this._isDirty=!1,this._value=this._fn(),this._setAndNotify(this._value,!0)),this._value)),this._fn=e,this.setDirty()}static is(e){return e!=null&&e[Ft]===!0}get value(){return this.get()}}var Wt,Ht;class St extends(Ht=S,Wt=Nt,Ht){constructor(){super(...arguments),d(this,Wt,!0),d(this,"set",e=>{this._setAndNotify(e,!1)}),d(this,"update",e=>{this._setAndNotify(e(this.get()),!1)}),d(this,"reducer",(e,...n)=>{const o=this;return function i(s){const r=o.value;o.update(c=>e(c,s)),!o.equals(r,o.value)&&n.forEach(c=>c({previousState:r,state:o.value,action:s,dispatch:i}))}}),d(this,"iso",(e,n,o=(i,s)=>i===s)=>{const i=new St(e(this.get()),o);return i.onDispose(this.on(s=>i.set(e(s)))),i.on(s=>this._setAndNotify(n(s),!1)),i}),d(this,"atProp",e=>this.iso(n=>n[e],n=>({...this.value,[e]:n})))}static is(e){return e!=null&&e[Nt]===!0}get value(){return this.get()}set value(e){this._setAndNotify(e,!1)}}function P(t,e=(n,o)=>n===o){return new St(t,e)}function Xe(t,e=(n,o)=>n===o){return new S(t,e)}const Kt=new Set(["checked","disabled","hidden","selected"]),Gt=new Set(["rowSpan","colSpan","tabIndex","valueAsNumber"]),Qt=new Set(["valueAsDate"]),Zt=new Set(["value","textContent","innerText","innerHTML","outerHTML","className","classList"]),xt=new Map;function Q(t,e){if(xt.has(t))return xt.get(t);{const n=e(t);return xt.set(t,n),n}}function Ye(t){return(e,n)=>{n==null?e[t]=null:e[t]=!!n}}function Je(t){return(e,n)=>{n==null?e[t]=null:e[t]=Number(n)}}function Ke(t){return(e,n)=>{n==null?e[t]=null:e[t]=n}}function Ge(t){return(e,n)=>{n==null?e[t]=null:e[t]=String(n)}}function Qe(t){return(e,n)=>{n==null?e.removeAttribute(t):e.setAttribute(t,n)}}function te(t){return Kt.has(t)?Q(t,Ye):Gt.has(t)?Q(t,Je):Qt.has(t)?Q(t,Ke):Zt.has(t)?Q(t,Ge):Q(t,Qe)}function ee(t){return e=>Kt.has(t)?!!e[t]:Gt.has(t)?Number(e[t]):Qt.has(t)?e[t]:Zt.has(t)?String(e[t]):e.getAttribute(t)}function q(t){const e=t;e&&e.onblur&&(e.onblur=null),!(!t||t.ownerDocument===void 0)&&t.parentElement&&t.parentElement.removeChild(t)}function Ze(t,e,n){let o=t.target;for(;o!=null&&!(o instanceof HTMLAnchorElement);)o=o.parentElement;if(o==null)return!0;const i=o;if(t.button!==0||t.ctrlKey||t.metaKey||i.target!=="_self"&&i.target!==""||i.getAttribute("download")!=null)return!0;if(n){const{pathname:s,search:r,hash:c}=i,l=s+r+c;if(i.getAttribute("href")!==l||e&&!/\/[^/.]*$/.test(s))return!0}return!1}const tn=(t,e={checkExtension:!0,checkExternalUrl:!0})=>n=>{const{checkExtension:o,checkExternalUrl:i}=e;Ze(n,o===!0,i===!0)||t()&&n.preventDefault()},en=t=>e=>{le(e);const n=e.createText(t);return e.appendOrInsert(n),o=>{o&&q(n)}},nn=t=>e=>{le(e);const n=e.createText(t.value);e.appendOrInsert(n);const o=t.on(i=>n.data=i);return i=>{o(),i&&q(n)}},X=(...t)=>e=>{const n=t.map(o=>b(o)(e));return o=>{n.forEach(i=>i(o))}},tt=()=>()=>{},on=t=>e=>(re(e),e.element.classList.add(...t),n=>{n&&e.element.classList.remove(...t)}),sn=t=>e=>{re(e);const n=e.element;let o=[];const i=t.on(s=>{o.forEach(r=>n.classList.remove(r)),o=(s??"").split(" ").filter(r=>r.length>0),n.classList.add(...o)});return s=>{i(),s&&o.forEach(r=>n.classList.remove(r)),o.length=0}},nt=(t,e)=>{const n=te(t),o=ee(t);return i=>{se(i,t);const s=o(i.element);return n(i.element,e),r=>{r&&n(i.element,s)}}},ot=(t,e)=>{const n=te(t),o=ee(t);return i=>{se(i,t);const s=o(i.element);return e.on(r=>n(i.element,r)),r=>{r&&n(i.element,s)}}},Lt=new Proxy({},{get:(t,e)=>e==="class"?n=>S.is(n)?sn(n):on((n??"").split(" ").filter(o=>o.length>0)):n=>S.is(n)?ot(e,n):nt(e,n)});new Proxy({},{get:(t,e)=>n=>S.is(n)?ot(`data-${e}`,n):nt(`data-${e}`,n)});new Proxy({},{get:(t,e)=>n=>S.is(n)?ot(`aria-${e}`,n):nt(`aria-${e}`,n)});new Proxy({},{get:(t,e)=>n=>S.is(n)?ot(e,n):nt(e,n)});new Proxy({},{get:(t,e)=>n=>S.is(n)?ot(e,n):nt(e,n)});function b(t){return t==null?tt:Array.isArray(t)?X(...t.map(b)):typeof t=="string"?en(t):S.is(t)?nn(t):t}function ne(t,...e){return n=>{const o=n.createElement(t,void 0);n.isFirstLevel&&Y.isSSR()&&ce(o),n.appendOrInsert(o),n=n.withElement(o);const i=e.map(s=>b(s)(n));return s=>{i.forEach(r=>r(!1)),s&&q(o)}}}function oe(t,e,...n){return o=>{const i=o.createElement(t,e);o.isFirstLevel&&Y.isSSR()&&ce(i),o.appendOrInsert(i),o=o.withElement(i);const s=n.map(r=>b(r)(o));return r=>{s.forEach(c=>c(!1)),r&&q(i)}}}const ie=new Proxy({},{get:(t,e)=>(...n)=>ne(e,n.flatMap(b))});new Proxy({},{get:(t,e)=>(...n)=>ne("input",Lt.type(e),...n)});const rn="http://www.w3.org/2000/svg";new Proxy({},{get:(t,e)=>(...n)=>oe(e,rn,n.flatMap(b))});const cn="http://www.w3.org/1998/Math/MathML";new Proxy({},{get:(t,e)=>(...n)=>oe(e,cn,n.flatMap(b))});const zt="data-tempo-attr",ln="data-tempo-class",an="data-tempo-node",un="data-tempo-text";function fn(t,e){const n=t.getAttribute(e);if(n!=null){const o=t.getAttribute(zt)??"{}",i={...JSON.parse(o),name:n};t.setAttribute(zt,JSON.stringify(i))}}function se(t,e){Y.isSSR()&&t.isFirstLevel&&fn(t.element,e)}function hn(t){t.setAttribute(ln,t.className)}function re(t){Y.isSSR()&&t.isFirstLevel&&hn(t.element)}function ce(t){t.setAttribute(an,"")}function dn(t){t.setAttribute(un,t.textContent??"")}function le(t){Y.isSSR()&&t.isFirstLevel&&dn(t.element)}function ae(){const t=globalThis;return t.__tempoSSR__==null&&(t.__tempoSSR__={isSSR:!1,counter:0}),t.__tempoSSR__}function ue(t,e){const n=ae();n[t]=e}function fe(t){return ae()[t]}function pn(){return fe("isSSR")}function he(){return fe("counter")}function mn(){ue("counter",(he()??0)+1)}function gn(){ue("counter",(he()??0)-1)}const Y={useDone:t=>(mn(),b(t(gn))),isSSR:pn},wn=(t,e)=>n=>(n.element.addEventListener(t,e),o=>{o&&n.element.removeEventListener(t,e)}),de=new Proxy({},{get:(t,e)=>n=>wn(e,n)}),lt=(t,e)=>n=>{n=n.makeRef();let o,i;const s=t.map(l=>Object.keys(l)[0]);let r;const c=s.on(l=>{if(l!==r){i==null||i.dispose(),o==null||o(!0),i=t.map(f=>f[l]);const a=e[l](i);o=b(a)(n),r=l}});return l=>{c(),l&&n.reference!=null&&q(n.reference),o==null||o(!0)}},B={bool:(t,e)=>lt(t.map(n=>n?{true:!0}:{false:!0}),e),field:(t,e,n)=>lt(t.map(o=>({[o[e]]:o})),n),kind:(t,e)=>B.field(t,"kind",e),tuple:(t,e)=>{const n=t.map(([o,i])=>({[o]:i}));return lt(n,e)},type:(t,e)=>B.field(t,"type",e),value:(t,e)=>lt(t.map(n=>({[n]:!0})),e)},yn=(t,e)=>n=>{const o=Object.values(t).reduce((i,s)=>{const r=n.getProvider(s);if(r==null)throw new Error(`No provider found for mark: ${s.description}`);return i[s]=r,i},{});return b(e(o))(n)},pe=(t,e)=>yn([t],n=>b(e(n[t]))),vn=(t,e,n)=>o=>{o=o.makeRef();let i=null,s=!1;const r=P(null),c=t.on(l=>{l==null?(i==null||i(!0),i=b((n==null?void 0:n())??tt)(o),s=!1):(r.value=l,s||(i==null||i(!0),i=b(e(r))(o),s=!0))});return l=>{c(),i==null||i(l),l&&o.reference&&q(o.reference)}},it=t=>e=>n=>t(n,e),xn=(t,e,n)=>vn(t.map(o=>o?!0:null),()=>e,n!=null?()=>n:void 0),me=t=>e=>t(e.element)??(()=>{});function bn(t,e){const n=t(e);return()=>n(!0)}const ge=(t,e)=>n=>{const o=n.document.querySelector(t);if(o===null)throw new Error(`Cannot find element by selector for portal: ${t}`);return bn(b(e),n.withElement(o).withFirstLevel())};function we(t){return Symbol(t)}const An=(t,e)=>n=>b(e)(n.withProviders(t)),ye=(t,e,n)=>An({[t]:e},b(n)),Sn=(t,e)=>n=>{const o=n.element,i=o.style.getPropertyValue(t);return o.style.setProperty(t,e),s=>{s&&o.style.setProperty(t,i)}},Ln=(t,e)=>n=>{const o=n.element,i=o.style.getPropertyValue(t);return e.on(s=>o.style.setProperty(t,s)),s=>{s&&o.style.setProperty(t,i)}};new Proxy({},{get:(t,e)=>n=>S.is(n)?Ln(e,n):Sn(e,n)});const Rt=we("LocationProvider");function ve(){const t=(window==null?void 0:window.location.hash)===""?void 0:(window==null?void 0:window.location.hash.substring(1))??void 0;return{pathname:(window==null?void 0:window.location.pathname)??"",search:Object.fromEntries(new URLSearchParams((window==null?void 0:window.location.search)??"").entries()),hash:t}}function xe(t,e){return t.pathname===e.pathname&&JSON.stringify(t.search)===JSON.stringify(e.search)&&t.hash===e.hash}function be(t){const e=new URL(t,(window==null?void 0:window.location.toString())??""),n=Object.fromEntries(e.searchParams.entries());return{pathname:e.pathname,search:n,hash:e.hash}}function Ae(t,e){const n=be(e);return t.set(n),t}function Rn(t){const n=new URLSearchParams(t.search).toString(),o=t.hash;return`${t.pathname}${n?`?${n}`:""}${o?`#${o}`:""}`}function Se(){const t=P(ve(),xe),e=()=>{const n={...t.value,pathname:(window==null?void 0:window.location.pathname)??""};t.set(n)};return window==null||window.addEventListener("popstate",e),t.onDispose(()=>{window==null||window.removeEventListener("popstate",e)}),t.on(n=>{const i=new URLSearchParams(n.search).toString(),s=n.hash,r=`${n.pathname}${i?`?${i}`:""}${s?`#${s}`:""}`;window==null||window.history.pushState({},"",r)}),t}function En(t){const e=Se();return X(it(e.dispose),ye(Rt,e,t))}function Et(t){return pe(Rt,e=>n=>{const o=P(e.value,e.equals);e.feedProp(o),o.on(e.set);const i=b(t(o))(n);return s=>{o.dispose(),i(s)}})}function _n(t,...e){return Et(n=>ie.a(de.click(tn(()=>(Ae(n,S.unwrap(t)),!0))),Lt.href(t),...e))}const _t=we("Appearance"),On=t=>{const e=window.matchMedia!=null&&window.matchMedia("(prefers-color-scheme: dark)").matches,n=P(e?"dark":"light"),o=s=>{n.set(s.matches?"dark":"light")},i=window.matchMedia!=null?window.matchMedia("(prefers-color-scheme: dark)"):void 0;return i==null||i.addEventListener("change",o),X(ye(_t,n,t),it(()=>i==null?void 0:i.removeEventListener("change",o)))},Pn=t=>pe(_t,t);function Le(t,e){if(typeof e=="function")return Le(t,{success:e});const n=e.failure??(r=>X(it(r.on(console.error)),r.map(c=>`Error: ${c}`))),o=e.success,i=e.loading??(()=>tt),s=e.notAsked??(()=>tt);return B.type(S.wrap(t),{AsyncSuccess:r=>o(r.$.value),AsyncFailure:r=>n(r.$.error),Loading:r=>i(r.$.previousValue??Xe(void 0)),NotAsked:s})}const Dn=(t=10)=>e=>{const n=setTimeout(()=>{var o;(o=e.element)==null||o.focus()},t);return o=>clearTimeout(n)},Tn=(t=10)=>e=>{const n=setTimeout(()=>{var o;(o=e.element)==null||o.select()},t);return o=>{clearTimeout(n)}},kn=t=>{const e=t.element,n=e.style.getPropertyValue(":empty");return e.style.setProperty(":empty","display:none"),o=>{o&&e.style.setProperty(":empty",n)}},Cn=t=>ge("head title",Lt.innerText(t)),Mn={partial:{root:null,rootMargin:"0px",threshold:0},full:{root:null,rootMargin:"0px",threshold:1}},ut={partial:new Map,full:new Map},Z={partial:null,full:null};function Nn(t){return Z[t]==null&&(Z[t]=new IntersectionObserver(e=>{e.forEach(n=>{const o=ut[t].get(n.target);o==null||o.set(n.isIntersecting)})},Mn[t])),Z[t]}function Re(t,e){const n=P(Y.isSSR());return X(me(o=>{const i=typeof IntersectionObserver<"u"?Nn(t):null;return ut[t].set(o,n),i==null||i.observe(o),()=>{var s;i==null||i.unobserve(o),ut[t].delete(o),ut[t].size===0&&((s=Z[t])==null||s.disconnect(),Z[t]=null)}}),it(n.dispose),b(e(n)))}const Fn=(t,e,n)=>Re(t,o=>xn(o,e,n??tt)),ft=Math.min,$=Math.max,ht=Math.round,at=Math.floor,C=t=>({x:t,y:t}),$n={left:"right",right:"left",bottom:"top",top:"bottom"},Vn={start:"end",end:"start"};function It(t,e,n){return $(t,ft(e,n))}function mt(t,e){return typeof t=="function"?t(e):t}function V(t){return t.split("-")[0]}function gt(t){return t.split("-")[1]}function Ee(t){return t==="x"?"y":"x"}function _e(t){return t==="y"?"height":"width"}function U(t){return["top","bottom"].includes(V(t))?"y":"x"}function Oe(t){return Ee(U(t))}function Wn(t,e,n){n===void 0&&(n=!1);const o=gt(t),i=Oe(t),s=_e(i);let r=i==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[s]>e.floating[s]&&(r=dt(r)),[r,dt(r)]}function Hn(t){const e=dt(t);return[At(t),e,At(e)]}function At(t){return t.replace(/start|end/g,e=>Vn[e])}function zn(t,e,n){const o=["left","right"],i=["right","left"],s=["top","bottom"],r=["bottom","top"];switch(t){case"top":case"bottom":return n?e?i:o:e?o:i;case"left":case"right":return e?s:r;default:return[]}}function In(t,e,n,o){const i=gt(t);let s=zn(V(t),n==="start",o);return i&&(s=s.map(r=>r+"-"+i),e&&(s=s.concat(s.map(At)))),s}function dt(t){return t.replace(/left|right|bottom|top/g,e=>$n[e])}function Bn(t){return{top:0,right:0,bottom:0,left:0,...t}}function Un(t){return typeof t!="number"?Bn(t):{top:t,right:t,bottom:t,left:t}}function pt(t){const{x:e,y:n,width:o,height:i}=t;return{width:o,height:i,top:n,left:e,right:e+o,bottom:n+i,x:e,y:n}}function Bt(t,e,n){let{reference:o,floating:i}=t;const s=U(e),r=Oe(e),c=_e(r),l=V(e),a=s==="y",f=o.x+o.width/2-i.width/2,u=o.y+o.height/2-i.height/2,m=o[c]/2-i[c]/2;let h;switch(l){case"top":h={x:f,y:o.y-i.height};break;case"bottom":h={x:f,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:u};break;case"left":h={x:o.x-i.width,y:u};break;default:h={x:o.x,y:o.y}}switch(gt(e)){case"start":h[r]-=m*(n&&a?-1:1);break;case"end":h[r]+=m*(n&&a?-1:1);break}return h}const jn=async(t,e,n)=>{const{placement:o="bottom",strategy:i="absolute",middleware:s=[],platform:r}=n,c=s.filter(Boolean),l=await(r.isRTL==null?void 0:r.isRTL(e));let a=await r.getElementRects({reference:t,floating:e,strategy:i}),{x:f,y:u}=Bt(a,o,l),m=o,h={},g=0;for(let w=0;w<c.length;w++){const{name:y,fn:p}=c[w],{x:v,y:x,data:L,reset:A}=await p({x:f,y:u,initialPlacement:o,placement:m,strategy:i,middlewareData:h,rects:a,platform:r,elements:{reference:t,floating:e}});f=v??f,u=x??u,h={...h,[y]:{...h[y],...L}},A&&g<=50&&(g++,typeof A=="object"&&(A.placement&&(m=A.placement),A.rects&&(a=A.rects===!0?await r.getElementRects({reference:t,floating:e,strategy:i}):A.rects),{x:f,y:u}=Bt(a,m,l)),w=-1)}return{x:f,y:u,placement:m,strategy:i,middlewareData:h}};async function Pe(t,e){var n;e===void 0&&(e={});const{x:o,y:i,platform:s,rects:r,elements:c,strategy:l}=t,{boundary:a="clippingAncestors",rootBoundary:f="viewport",elementContext:u="floating",altBoundary:m=!1,padding:h=0}=mt(e,t),g=Un(h),y=c[m?u==="floating"?"reference":"floating":u],p=pt(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:a,rootBoundary:f,strategy:l})),v=u==="floating"?{x:o,y:i,width:r.floating.width,height:r.floating.height}:r.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating)),L=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},A=pt(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:v,offsetParent:x,strategy:l}):v);return{top:(p.top-A.top+g.top)/L.y,bottom:(A.bottom-p.bottom+g.bottom)/L.y,left:(p.left-A.left+g.left)/L.x,right:(A.right-p.right+g.right)/L.x}}const qn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:i,middlewareData:s,rects:r,initialPlacement:c,platform:l,elements:a}=e,{mainAxis:f=!0,crossAxis:u=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:g="none",flipAlignment:w=!0,...y}=mt(t,e);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const p=V(i),v=U(c),x=V(c)===c,L=await(l.isRTL==null?void 0:l.isRTL(a.floating)),A=m||(x||!w?[dt(c)]:Hn(c)),H=g!=="none";!m&&H&&A.push(...In(c,w,g,L));const ze=[c,...A],vt=await Pe(e,y),rt=[];let K=((o=s.flip)==null?void 0:o.overflows)||[];if(f&&rt.push(vt[p]),u){const N=Wn(i,r,L);rt.push(vt[N[0]],vt[N[1]])}if(K=[...K,{placement:i,overflows:rt}],!rt.every(N=>N<=0)){var Tt,kt;const N=(((Tt=s.flip)==null?void 0:Tt.index)||0)+1,Mt=ze[N];if(Mt)return{data:{index:N,overflows:K},reset:{placement:Mt}};let G=(kt=K.filter(z=>z.overflows[0]<=0).sort((z,T)=>z.overflows[1]-T.overflows[1])[0])==null?void 0:kt.placement;if(!G)switch(h){case"bestFit":{var Ct;const z=(Ct=K.filter(T=>{if(H){const k=U(T.placement);return k===v||k==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(k=>k>0).reduce((k,Ie)=>k+Ie,0)]).sort((T,k)=>T[1]-k[1])[0])==null?void 0:Ct[0];z&&(G=z);break}case"initialPlacement":G=c;break}if(i!==G)return{reset:{placement:G}}}return{}}}};async function Xn(t,e){const{placement:n,platform:o,elements:i}=t,s=await(o.isRTL==null?void 0:o.isRTL(i.floating)),r=V(n),c=gt(n),l=U(n)==="y",a=["left","top"].includes(r)?-1:1,f=s&&l?-1:1,u=mt(e,t);let{mainAxis:m,crossAxis:h,alignmentAxis:g}=typeof u=="number"?{mainAxis:u,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...u};return c&&typeof g=="number"&&(h=c==="end"?g*-1:g),l?{x:h*f,y:m*a}:{x:m*a,y:h*f}}const Yn=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:i,y:s,placement:r,middlewareData:c}=e,l=await Xn(e,t);return r===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:i+l.x,y:s+l.y,data:{...l,placement:r}}}}},Jn=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:i}=e,{mainAxis:s=!0,crossAxis:r=!1,limiter:c={fn:y=>{let{x:p,y:v}=y;return{x:p,y:v}}},...l}=mt(t,e),a={x:n,y:o},f=await Pe(e,l),u=U(V(i)),m=Ee(u);let h=a[m],g=a[u];if(s){const y=m==="y"?"top":"left",p=m==="y"?"bottom":"right",v=h+f[y],x=h-f[p];h=It(v,h,x)}if(r){const y=u==="y"?"top":"left",p=u==="y"?"bottom":"right",v=g+f[y],x=g-f[p];g=It(v,g,x)}const w=c.fn({...e,[m]:h,[u]:g});return{...w,data:{x:w.x-n,y:w.y-o}}}}};function J(t){return De(t)?(t.nodeName||"").toLowerCase():"#document"}function R(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function D(t){var e;return(e=(De(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function De(t){return t instanceof Node||t instanceof R(t).Node}function _(t){return t instanceof Element||t instanceof R(t).Element}function O(t){return t instanceof HTMLElement||t instanceof R(t).HTMLElement}function Ut(t){return typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof R(t).ShadowRoot}function st(t){const{overflow:e,overflowX:n,overflowY:o,display:i}=E(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&!["inline","contents"].includes(i)}function Kn(t){return["table","td","th"].includes(J(t))}function wt(t){return[":popover-open",":modal"].some(e=>{try{return t.matches(e)}catch{return!1}})}function Ot(t){const e=Pt(),n=E(t);return n.transform!=="none"||n.perspective!=="none"||(n.containerType?n.containerType!=="normal":!1)||!e&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!e&&(n.filter?n.filter!=="none":!1)||["transform","perspective","filter"].some(o=>(n.willChange||"").includes(o))||["paint","layout","strict","content"].some(o=>(n.contain||"").includes(o))}function Gn(t){let e=M(t);for(;O(e)&&!j(e);){if(wt(e))return null;if(Ot(e))return e;e=M(e)}return null}function Pt(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function j(t){return["html","body","#document"].includes(J(t))}function E(t){return R(t).getComputedStyle(t)}function yt(t){return _(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function M(t){if(J(t)==="html")return t;const e=t.assignedSlot||t.parentNode||Ut(t)&&t.host||D(t);return Ut(e)?e.host:e}function Te(t){const e=M(t);return j(e)?t.ownerDocument?t.ownerDocument.body:t.body:O(e)&&st(e)?e:Te(e)}function et(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const i=Te(t),s=i===((o=t.ownerDocument)==null?void 0:o.body),r=R(i);return s?e.concat(r,r.visualViewport||[],st(i)?i:[],r.frameElement&&n?et(r.frameElement):[]):e.concat(i,et(i,[],n))}function ke(t){const e=E(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const i=O(t),s=i?t.offsetWidth:n,r=i?t.offsetHeight:o,c=ht(n)!==s||ht(o)!==r;return c&&(n=s,o=r),{width:n,height:o,$:c}}function Dt(t){return _(t)?t:t.contextElement}function I(t){const e=Dt(t);if(!O(e))return C(1);const n=e.getBoundingClientRect(),{width:o,height:i,$:s}=ke(e);let r=(s?ht(n.width):n.width)/o,c=(s?ht(n.height):n.height)/i;return(!r||!Number.isFinite(r))&&(r=1),(!c||!Number.isFinite(c))&&(c=1),{x:r,y:c}}const Qn=C(0);function Ce(t){const e=R(t);return!Pt()||!e.visualViewport?Qn:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function Zn(t,e,n){return e===void 0&&(e=!1),!n||e&&n!==R(t)?!1:e}function W(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const i=t.getBoundingClientRect(),s=Dt(t);let r=C(1);e&&(o?_(o)&&(r=I(o)):r=I(t));const c=Zn(s,n,o)?Ce(s):C(0);let l=(i.left+c.x)/r.x,a=(i.top+c.y)/r.y,f=i.width/r.x,u=i.height/r.y;if(s){const m=R(s),h=o&&_(o)?R(o):o;let g=m,w=g.frameElement;for(;w&&o&&h!==g;){const y=I(w),p=w.getBoundingClientRect(),v=E(w),x=p.left+(w.clientLeft+parseFloat(v.paddingLeft))*y.x,L=p.top+(w.clientTop+parseFloat(v.paddingTop))*y.y;l*=y.x,a*=y.y,f*=y.x,u*=y.y,l+=x,a+=L,g=R(w),w=g.frameElement}}return pt({width:f,height:u,x:l,y:a})}function to(t){let{elements:e,rect:n,offsetParent:o,strategy:i}=t;const s=i==="fixed",r=D(o),c=e?wt(e.floating):!1;if(o===r||c&&s)return n;let l={scrollLeft:0,scrollTop:0},a=C(1);const f=C(0),u=O(o);if((u||!u&&!s)&&((J(o)!=="body"||st(r))&&(l=yt(o)),O(o))){const m=W(o);a=I(o),f.x=m.x+o.clientLeft,f.y=m.y+o.clientTop}return{width:n.width*a.x,height:n.height*a.y,x:n.x*a.x-l.scrollLeft*a.x+f.x,y:n.y*a.y-l.scrollTop*a.y+f.y}}function eo(t){return Array.from(t.getClientRects())}function Me(t){return W(D(t)).left+yt(t).scrollLeft}function no(t){const e=D(t),n=yt(t),o=t.ownerDocument.body,i=$(e.scrollWidth,e.clientWidth,o.scrollWidth,o.clientWidth),s=$(e.scrollHeight,e.clientHeight,o.scrollHeight,o.clientHeight);let r=-n.scrollLeft+Me(t);const c=-n.scrollTop;return E(o).direction==="rtl"&&(r+=$(e.clientWidth,o.clientWidth)-i),{width:i,height:s,x:r,y:c}}function oo(t,e){const n=R(t),o=D(t),i=n.visualViewport;let s=o.clientWidth,r=o.clientHeight,c=0,l=0;if(i){s=i.width,r=i.height;const a=Pt();(!a||a&&e==="fixed")&&(c=i.offsetLeft,l=i.offsetTop)}return{width:s,height:r,x:c,y:l}}function io(t,e){const n=W(t,!0,e==="fixed"),o=n.top+t.clientTop,i=n.left+t.clientLeft,s=O(t)?I(t):C(1),r=t.clientWidth*s.x,c=t.clientHeight*s.y,l=i*s.x,a=o*s.y;return{width:r,height:c,x:l,y:a}}function jt(t,e,n){let o;if(e==="viewport")o=oo(t,n);else if(e==="document")o=no(D(t));else if(_(e))o=io(e,n);else{const i=Ce(t);o={...e,x:e.x-i.x,y:e.y-i.y}}return pt(o)}function Ne(t,e){const n=M(t);return n===e||!_(n)||j(n)?!1:E(n).position==="fixed"||Ne(n,e)}function so(t,e){const n=e.get(t);if(n)return n;let o=et(t,[],!1).filter(c=>_(c)&&J(c)!=="body"),i=null;const s=E(t).position==="fixed";let r=s?M(t):t;for(;_(r)&&!j(r);){const c=E(r),l=Ot(r);!l&&c.position==="fixed"&&(i=null),(s?!l&&!i:!l&&c.position==="static"&&!!i&&["absolute","fixed"].includes(i.position)||st(r)&&!l&&Ne(t,r))?o=o.filter(f=>f!==r):i=c,r=M(r)}return e.set(t,o),o}function ro(t){let{element:e,boundary:n,rootBoundary:o,strategy:i}=t;const r=[...n==="clippingAncestors"?wt(e)?[]:so(e,this._c):[].concat(n),o],c=r[0],l=r.reduce((a,f)=>{const u=jt(e,f,i);return a.top=$(u.top,a.top),a.right=ft(u.right,a.right),a.bottom=ft(u.bottom,a.bottom),a.left=$(u.left,a.left),a},jt(e,c,i));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function co(t){const{width:e,height:n}=ke(t);return{width:e,height:n}}function lo(t,e,n){const o=O(e),i=D(e),s=n==="fixed",r=W(t,!0,s,e);let c={scrollLeft:0,scrollTop:0};const l=C(0);if(o||!o&&!s)if((J(e)!=="body"||st(i))&&(c=yt(e)),o){const u=W(e,!0,s,e);l.x=u.x+e.clientLeft,l.y=u.y+e.clientTop}else i&&(l.x=Me(i));const a=r.left+c.scrollLeft-l.x,f=r.top+c.scrollTop-l.y;return{x:a,y:f,width:r.width,height:r.height}}function bt(t){return E(t).position==="static"}function qt(t,e){return!O(t)||E(t).position==="fixed"?null:e?e(t):t.offsetParent}function Fe(t,e){const n=R(t);if(wt(t))return n;if(!O(t)){let i=M(t);for(;i&&!j(i);){if(_(i)&&!bt(i))return i;i=M(i)}return n}let o=qt(t,e);for(;o&&Kn(o)&&bt(o);)o=qt(o,e);return o&&j(o)&&bt(o)&&!Ot(o)?n:o||Gn(t)||n}const ao=async function(t){const e=this.getOffsetParent||Fe,n=this.getDimensions,o=await n(t.floating);return{reference:lo(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function uo(t){return E(t).direction==="rtl"}const fo={convertOffsetParentRelativeRectToViewportRelativeRect:to,getDocumentElement:D,getClippingRect:ro,getOffsetParent:Fe,getElementRects:ao,getClientRects:eo,getDimensions:co,getScale:I,isElement:_,isRTL:uo};function ho(t,e){let n=null,o;const i=D(t);function s(){var c;clearTimeout(o),(c=n)==null||c.disconnect(),n=null}function r(c,l){c===void 0&&(c=!1),l===void 0&&(l=1),s();const{left:a,top:f,width:u,height:m}=t.getBoundingClientRect();if(c||e(),!u||!m)return;const h=at(f),g=at(i.clientWidth-(a+u)),w=at(i.clientHeight-(f+m)),y=at(a),v={rootMargin:-h+"px "+-g+"px "+-w+"px "+-y+"px",threshold:$(0,ft(1,l))||1};let x=!0;function L(A){const H=A[0].intersectionRatio;if(H!==l){if(!x)return r();H?r(!1,H):o=setTimeout(()=>{r(!1,1e-7)},1e3)}x=!1}try{n=new IntersectionObserver(L,{...v,root:i.ownerDocument})}catch{n=new IntersectionObserver(L,v)}n.observe(t)}return r(!0),s}function po(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:r=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,a=Dt(t),f=i||s?[...a?et(a):[],...et(e)]:[];f.forEach(p=>{i&&p.addEventListener("scroll",n,{passive:!0}),s&&p.addEventListener("resize",n)});const u=a&&c?ho(a,n):null;let m=-1,h=null;r&&(h=new ResizeObserver(p=>{let[v]=p;v&&v.target===a&&h&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(e)})),n()}),a&&!l&&h.observe(a),h.observe(e));let g,w=l?W(t):null;l&&y();function y(){const p=W(t);w&&(p.x!==w.x||p.y!==w.y||p.width!==w.width||p.height!==w.height)&&n(),w=p,g=requestAnimationFrame(y)}return n(),()=>{var p;f.forEach(v=>{i&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),u==null||u(),(p=h)==null||p.disconnect(),h=null,l&&cancelAnimationFrame(g)}}const mo=Yn,go=Jn,Xt=qn,wo=(t,e,n)=>{const o=new Map,i={platform:fo,...n},s={...i.platform,_c:o};return jn(t,e,{...i,platform:s})};function yo({content:t,open:e,placement:n,offset:{mainAxis:o,crossAxis:i}={mainAxis:0,crossAxis:0}}){return s=>{const r=s.element,c=S.wrap(e);return B.bool(c,{true:()=>ge("body",ie.div(me(l=>{const a=l;return a.style.position="absolute",po(r,a,()=>{wo(r,a,{placement:n,strategy:"absolute",middleware:[Xt(),mo({mainAxis:o,crossAxis:i}),go(),Xt()]}).then(({x:f,y:u})=>{a.style.top=`${u}px`,a.style.left=`${f}px`})})}),t())),false:()=>null})(s)}}function $e(t,e){if(typeof e=="function")return $e(t,{success:e});const n=e.failure??(i=>X(it(i.on(console.error)),i.map(s=>`Error: ${s}`))),o=e.success;return B.type(S.wrap(t),{Success:i=>o(i.$.value),Failure:i=>n(i.$.error)})}function vo(){return de.focus(t=>{var e;return(e=t.target)==null?void 0:e.select()})}const xo=t=>e=>{const n=e.element,o=P({width:n.clientWidth,height:n.clientHeight}),i=b(t(o))(e),s=()=>{o.set({width:n.clientWidth,height:n.clientHeight})};let r;return typeof ResizeObserver=="function"&&(r=new ResizeObserver(s),r.observe(n)),c=>{r==null||r.disconnect(),i(c)}},bo=t=>e=>{const n=P({width:(window==null?void 0:window.innerWidth)??0,height:(window==null?void 0:window.innerHeight)??0}),o=b(t(n))(e),i=()=>{n.set({width:(window==null?void 0:window.innerWidth)??0,height:(window==null?void 0:window.innerHeight)??0})};return window==null||window.addEventListener("resize",i),s=>{window==null||window.removeEventListener("resize",i),o(s)}},Ao={element:xo,window:bo};function Ve(t,e){const n=e.split("/").filter(i=>i!==""),o={};for(let i=0;i<t.length;i++){const s=t[i],r=n[i];if(!r&&s.type!=="catch-all")return null;if(s.type==="literal"){if(s.value!==r)return null}else if(s.type==="param")o[s.name]=r;else if(s.type==="catch-all")return{params:o,path:e}}return n.length!==t.length?null:{params:o,path:e}}function We(t){return t.split("/").map(e=>e.startsWith(":")?{type:"param",name:e.slice(1)}:e==="*"?{type:"catch-all"}:{type:"literal",value:e}).filter(e=>e.type!=="literal"||e.value!=="")}function He(t){const e=t.map(n=>{const o=We(n);return{route:n,segments:o}});return function(o){for(const{segments:i,route:s}of e){const r=Ve(i,o);if(r)return{...r,route:s}}return null}}function So(t){const e=He(Object.keys(t));return Et(n=>{const o=n.map(i=>{const s=e(i.pathname);if(s==null)throw console.error("No route found for",i),new Error("No route found");return{params:s.params,route:s.route,path:s.path,search:i.search,hash:i.hash}});return B.tuple(o.map(i=>[i.route,i]),t)})}exports.Anchor=_n;exports.AsyncResultView=Le;exports.AutoFocus=Dn;exports.AutoSelect=Tn;exports.HTMLTitle=Cn;exports.HiddenWhenEmpty=kn;exports.InViewport=Re;exports.LocationProviderMarker=Rt;exports.PopOver=yo;exports.ProvideAppearance=On;exports.ProvideLocation=En;exports.ResultView=$e;exports.Router=So;exports.SelectOnFocus=vo;exports.UseAppearance=Pn;exports.UseLocation=Et;exports.WhenInViewport=Fn;exports.appearanceMarker=_t;exports.equalsLocation=xe;exports.getFullURL=Rn;exports.locationFromURL=be;exports.makeLocation=ve;exports.makeLocationProp=Se;exports.makeRouteMatcher=He;exports.matchesRoute=Ve;exports.parseRouteSegments=We;exports.setLocationFromUrl=Ae;exports.size=Ao;
|
package/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
var Te = Object.defineProperty, ke = (t, e, n) => e in t ? Te(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n, d = (t, e, n) => ke(t, typeof e != "symbol" ? e + "" : e, n);
|
|
2
|
-
const
|
|
2
|
+
const jt = "$__signal__", Tt = "$__prop__", kt = "$__computed__";
|
|
3
3
|
var qt;
|
|
4
|
-
qt =
|
|
5
|
-
const Me = class
|
|
4
|
+
qt = jt;
|
|
5
|
+
const Me = class $ {
|
|
6
6
|
constructor(e, n) {
|
|
7
7
|
d(this, qt, !0), d(this, "_value"), d(this, "_derivatives", []), d(this, "_onValueListeners", []), d(this, "_onDisposeListeners", []), d(this, "get", () => this._value), d(this, "hasListeners", () => this._onValueListeners.length > 0), d(this, "on", (i) => (i(this.get()), this._onValueListeners.push(i), () => {
|
|
8
8
|
this._onValueListeners.splice(this._onValueListeners.indexOf(i), 1);
|
|
@@ -91,7 +91,7 @@ const Me = class F {
|
|
|
91
91
|
}), this.equals = n, this._value = e;
|
|
92
92
|
}
|
|
93
93
|
static ofPromise(e, n, i, o = (s, r) => s === r) {
|
|
94
|
-
const s = new
|
|
94
|
+
const s = new $(n, o);
|
|
95
95
|
return e.then((r) => s._setAndNotify(r, !1)).catch((r) => {
|
|
96
96
|
i != null ? s._setAndNotify(i(r), !1) : console.error(
|
|
97
97
|
"Unhandled promise rejection in Signal.ofPromise:",
|
|
@@ -100,19 +100,19 @@ const Me = class F {
|
|
|
100
100
|
}), s;
|
|
101
101
|
}
|
|
102
102
|
static is(e) {
|
|
103
|
-
return e != null && e[
|
|
103
|
+
return e != null && e[jt] === !0;
|
|
104
104
|
}
|
|
105
105
|
static wrap(e, n = (i, o) => i === o) {
|
|
106
|
-
return
|
|
106
|
+
return $.is(e) ? e : new $(e, n);
|
|
107
107
|
}
|
|
108
108
|
static maybeWrap(e) {
|
|
109
|
-
return e == null ? e :
|
|
109
|
+
return e == null ? e : $.wrap(e);
|
|
110
110
|
}
|
|
111
111
|
static unwrap(e) {
|
|
112
|
-
return
|
|
112
|
+
return $.is(e) ? e.get() : e;
|
|
113
113
|
}
|
|
114
114
|
static map(e, n) {
|
|
115
|
-
return
|
|
115
|
+
return $.is(e) ? e.map(n) : n(e);
|
|
116
116
|
}
|
|
117
117
|
get value() {
|
|
118
118
|
return this._value;
|
|
@@ -139,10 +139,10 @@ class ct extends (Nt = S, Mt = kt, Nt) {
|
|
|
139
139
|
return this.get();
|
|
140
140
|
}
|
|
141
141
|
}
|
|
142
|
-
var
|
|
143
|
-
class St extends (
|
|
142
|
+
var $t, Ft;
|
|
143
|
+
class St extends (Ft = S, $t = Tt, Ft) {
|
|
144
144
|
constructor() {
|
|
145
|
-
super(...arguments), d(this,
|
|
145
|
+
super(...arguments), d(this, $t, !0), d(this, "set", (e) => {
|
|
146
146
|
this._setAndNotify(e, !1);
|
|
147
147
|
}), d(this, "update", (e) => {
|
|
148
148
|
this._setAndNotify(e(this.get()), !1);
|
|
@@ -180,7 +180,7 @@ class St extends ($t = S, Ft = Tt, $t) {
|
|
|
180
180
|
function P(t, e = (n, i) => n === i) {
|
|
181
181
|
return new St(t, e);
|
|
182
182
|
}
|
|
183
|
-
function
|
|
183
|
+
function $e(t, e = (n, i) => n === i) {
|
|
184
184
|
return new S(t, e);
|
|
185
185
|
}
|
|
186
186
|
const Xt = /* @__PURE__ */ new Set(["checked", "disabled", "hidden", "selected"]), Yt = /* @__PURE__ */ new Set([
|
|
@@ -205,7 +205,7 @@ function Q(t, e) {
|
|
|
205
205
|
return xt.set(t, n), n;
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
|
-
function
|
|
208
|
+
function Fe(t) {
|
|
209
209
|
return (e, n) => {
|
|
210
210
|
n == null ? e[t] = null : e[t] = !!n;
|
|
211
211
|
};
|
|
@@ -231,7 +231,7 @@ function ze(t) {
|
|
|
231
231
|
};
|
|
232
232
|
}
|
|
233
233
|
function Gt(t) {
|
|
234
|
-
return Xt.has(t) ? Q(t,
|
|
234
|
+
return Xt.has(t) ? Q(t, Fe) : Yt.has(t) ? Q(t, Ve) : Jt.has(t) ? Q(t, We) : Kt.has(t) ? Q(t, He) : Q(t, ze);
|
|
235
235
|
}
|
|
236
236
|
function Qt(t) {
|
|
237
237
|
return (e) => Xt.has(t) ? !!e[t] : Yt.has(t) ? Number(e[t]) : Jt.has(t) ? e[t] : Kt.has(t) ? String(e[t]) : e.getAttribute(t);
|
|
@@ -265,13 +265,13 @@ const Ie = (t, e = {
|
|
|
265
265
|
i === !0,
|
|
266
266
|
o === !0
|
|
267
267
|
) || t() && n.preventDefault();
|
|
268
|
-
},
|
|
268
|
+
}, Ue = (t) => (e) => {
|
|
269
269
|
se(e);
|
|
270
270
|
const n = e.createText(t);
|
|
271
271
|
return e.appendOrInsert(n), (i) => {
|
|
272
272
|
i && q(n);
|
|
273
273
|
};
|
|
274
|
-
},
|
|
274
|
+
}, je = (t) => (e) => {
|
|
275
275
|
se(e);
|
|
276
276
|
const n = e.createText(t.value);
|
|
277
277
|
e.appendOrInsert(n);
|
|
@@ -315,7 +315,7 @@ const Ie = (t, e = {
|
|
|
315
315
|
r && n(o.element, s);
|
|
316
316
|
};
|
|
317
317
|
};
|
|
318
|
-
},
|
|
318
|
+
}, Lt = new Proxy(
|
|
319
319
|
{},
|
|
320
320
|
{
|
|
321
321
|
get: (t, e) => e === "class" ? (n) => S.is(n) ? Xe(n) : qe(
|
|
@@ -375,7 +375,7 @@ new Proxy(
|
|
|
375
375
|
}
|
|
376
376
|
);
|
|
377
377
|
function b(t) {
|
|
378
|
-
return t == null ? tt : Array.isArray(t) ? X(...t.map(b)) : typeof t == "string" ?
|
|
378
|
+
return t == null ? tt : Array.isArray(t) ? X(...t.map(b)) : typeof t == "string" ? Ue(t) : S.is(t) ? je(t) : t;
|
|
379
379
|
}
|
|
380
380
|
function Zt(t, ...e) {
|
|
381
381
|
return (n) => {
|
|
@@ -406,7 +406,7 @@ const ee = new Proxy(
|
|
|
406
406
|
new Proxy(
|
|
407
407
|
{},
|
|
408
408
|
{
|
|
409
|
-
get: (t, e) => (...n) => Zt("input",
|
|
409
|
+
get: (t, e) => (...n) => Zt("input", Lt.type(e), ...n)
|
|
410
410
|
}
|
|
411
411
|
);
|
|
412
412
|
const Ye = "http://www.w3.org/2000/svg";
|
|
@@ -602,6 +602,10 @@ function wn(t, e) {
|
|
|
602
602
|
const n = gn(e);
|
|
603
603
|
return t.set(n), t;
|
|
604
604
|
}
|
|
605
|
+
function ai(t) {
|
|
606
|
+
const n = new URLSearchParams(t.search).toString(), i = t.hash;
|
|
607
|
+
return `${t.pathname}${n ? `?${n}` : ""}${i ? `#${i}` : ""}`;
|
|
608
|
+
}
|
|
605
609
|
function yn() {
|
|
606
610
|
const t = P(pn(), mn), e = () => {
|
|
607
611
|
const n = {
|
|
@@ -617,7 +621,7 @@ function yn() {
|
|
|
617
621
|
window == null || window.history.pushState({}, "", r);
|
|
618
622
|
}), t;
|
|
619
623
|
}
|
|
620
|
-
function
|
|
624
|
+
function ui(t) {
|
|
621
625
|
const e = yn();
|
|
622
626
|
return X(
|
|
623
627
|
ot(e.dispose),
|
|
@@ -634,16 +638,16 @@ function we(t) {
|
|
|
634
638
|
};
|
|
635
639
|
});
|
|
636
640
|
}
|
|
637
|
-
function
|
|
641
|
+
function fi(t, ...e) {
|
|
638
642
|
return we((n) => ee.a(
|
|
639
643
|
ue.click(
|
|
640
644
|
Ie(() => (wn(n, S.unwrap(t)), !0))
|
|
641
645
|
),
|
|
642
|
-
|
|
646
|
+
Lt.href(t),
|
|
643
647
|
...e
|
|
644
648
|
));
|
|
645
649
|
}
|
|
646
|
-
const ye = pe("Appearance"),
|
|
650
|
+
const ye = pe("Appearance"), hi = (t) => {
|
|
647
651
|
const e = window.matchMedia != null && window.matchMedia("(prefers-color-scheme: dark)").matches, n = P(e ? "dark" : "light"), i = (s) => {
|
|
648
652
|
n.set(s.matches ? "dark" : "light");
|
|
649
653
|
}, o = window.matchMedia != null ? window.matchMedia("(prefers-color-scheme: dark)") : void 0;
|
|
@@ -651,7 +655,7 @@ const ye = pe("Appearance"), fi = (t) => {
|
|
|
651
655
|
me(ye, n, t),
|
|
652
656
|
ot(() => o == null ? void 0 : o.removeEventListener("change", i))
|
|
653
657
|
);
|
|
654
|
-
},
|
|
658
|
+
}, di = (t) => fe(ye, t);
|
|
655
659
|
function vn(t, e) {
|
|
656
660
|
if (typeof e == "function")
|
|
657
661
|
return vn(t, { success: e });
|
|
@@ -660,19 +664,19 @@ function vn(t, e) {
|
|
|
660
664
|
r.map((c) => `Error: ${c}`)
|
|
661
665
|
)), i = e.success, o = e.loading ?? (() => tt), s = e.notAsked ?? (() => tt);
|
|
662
666
|
return I.type(S.wrap(t), {
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
Loading: (r) => o(r.$.previousValue ??
|
|
667
|
+
AsyncSuccess: (r) => i(r.$.value),
|
|
668
|
+
AsyncFailure: (r) => n(r.$.error),
|
|
669
|
+
Loading: (r) => o(r.$.previousValue ?? $e(void 0)),
|
|
666
670
|
NotAsked: s
|
|
667
671
|
});
|
|
668
672
|
}
|
|
669
|
-
const
|
|
673
|
+
const pi = (t = 10) => (e) => {
|
|
670
674
|
const n = setTimeout(() => {
|
|
671
675
|
var i;
|
|
672
676
|
(i = e.element) == null || i.focus();
|
|
673
677
|
}, t);
|
|
674
678
|
return (i) => clearTimeout(n);
|
|
675
|
-
},
|
|
679
|
+
}, mi = (t = 10) => (e) => {
|
|
676
680
|
const n = setTimeout(() => {
|
|
677
681
|
var i;
|
|
678
682
|
(i = e.element) == null || i.select();
|
|
@@ -680,12 +684,12 @@ const di = (t = 10) => (e) => {
|
|
|
680
684
|
return (i) => {
|
|
681
685
|
clearTimeout(n);
|
|
682
686
|
};
|
|
683
|
-
},
|
|
687
|
+
}, gi = (t) => {
|
|
684
688
|
const e = t.element, n = e.style.getPropertyValue(":empty");
|
|
685
689
|
return e.style.setProperty(":empty", "display:none"), (i) => {
|
|
686
690
|
i && e.style.setProperty(":empty", n);
|
|
687
691
|
};
|
|
688
|
-
},
|
|
692
|
+
}, wi = (t) => de("head title", Lt.innerText(t)), xn = {
|
|
689
693
|
partial: {
|
|
690
694
|
root: null,
|
|
691
695
|
rootMargin: "0px",
|
|
@@ -725,7 +729,7 @@ function An(t, e) {
|
|
|
725
729
|
b(e(n))
|
|
726
730
|
);
|
|
727
731
|
}
|
|
728
|
-
const
|
|
732
|
+
const yi = (t, e, n) => An(t, (i) => an(i, e, n ?? tt)), ft = Math.min, F = Math.max, ht = Math.round, at = Math.floor, k = (t) => ({
|
|
729
733
|
x: t,
|
|
730
734
|
y: t
|
|
731
735
|
}), Sn = {
|
|
@@ -733,12 +737,12 @@ const wi = (t, e, n) => An(t, (i) => an(i, e, n ?? tt)), ft = Math.min, $ = Math
|
|
|
733
737
|
right: "left",
|
|
734
738
|
bottom: "top",
|
|
735
739
|
top: "bottom"
|
|
736
|
-
},
|
|
740
|
+
}, Ln = {
|
|
737
741
|
start: "end",
|
|
738
742
|
end: "start"
|
|
739
743
|
};
|
|
740
744
|
function Wt(t, e, n) {
|
|
741
|
-
return
|
|
745
|
+
return F(t, ft(e, n));
|
|
742
746
|
}
|
|
743
747
|
function mt(t, e) {
|
|
744
748
|
return typeof t == "function" ? t(e) : t;
|
|
@@ -755,13 +759,13 @@ function ve(t) {
|
|
|
755
759
|
function xe(t) {
|
|
756
760
|
return t === "y" ? "height" : "width";
|
|
757
761
|
}
|
|
758
|
-
function
|
|
762
|
+
function U(t) {
|
|
759
763
|
return ["top", "bottom"].includes(V(t)) ? "y" : "x";
|
|
760
764
|
}
|
|
761
765
|
function be(t) {
|
|
762
|
-
return ve(
|
|
766
|
+
return ve(U(t));
|
|
763
767
|
}
|
|
764
|
-
function
|
|
768
|
+
function En(t, e, n) {
|
|
765
769
|
n === void 0 && (n = !1);
|
|
766
770
|
const i = gt(t), o = be(t), s = xe(o);
|
|
767
771
|
let r = o === "x" ? i === (n ? "end" : "start") ? "right" : "left" : i === "start" ? "bottom" : "top";
|
|
@@ -772,7 +776,7 @@ function _n(t) {
|
|
|
772
776
|
return [At(t), e, At(e)];
|
|
773
777
|
}
|
|
774
778
|
function At(t) {
|
|
775
|
-
return t.replace(/start|end/g, (e) =>
|
|
779
|
+
return t.replace(/start|end/g, (e) => Ln[e]);
|
|
776
780
|
}
|
|
777
781
|
function Rn(t, e, n) {
|
|
778
782
|
const i = ["left", "right"], o = ["right", "left"], s = ["top", "bottom"], r = ["bottom", "top"];
|
|
@@ -835,7 +839,7 @@ function Ht(t, e, n) {
|
|
|
835
839
|
reference: i,
|
|
836
840
|
floating: o
|
|
837
841
|
} = t;
|
|
838
|
-
const s =
|
|
842
|
+
const s = U(e), r = be(e), c = xe(r), l = V(e), a = s === "y", f = i.x + i.width / 2 - o.width / 2, u = i.y + i.height / 2 - o.height / 2, m = i[c] / 2 - o[c] / 2;
|
|
839
843
|
let h;
|
|
840
844
|
switch (l) {
|
|
841
845
|
case "top":
|
|
@@ -900,7 +904,7 @@ const Cn = async (t, e, n) => {
|
|
|
900
904
|
} = c[w], {
|
|
901
905
|
x: v,
|
|
902
906
|
y: x,
|
|
903
|
-
data:
|
|
907
|
+
data: L,
|
|
904
908
|
reset: A
|
|
905
909
|
} = await p({
|
|
906
910
|
x: f,
|
|
@@ -920,7 +924,7 @@ const Cn = async (t, e, n) => {
|
|
|
920
924
|
...h,
|
|
921
925
|
[y]: {
|
|
922
926
|
...h[y],
|
|
923
|
-
...
|
|
927
|
+
...L
|
|
924
928
|
}
|
|
925
929
|
}, A && g <= 50 && (g++, typeof A == "object" && (A.placement && (m = A.placement), A.rects && (a = A.rects === !0 ? await r.getElementRects({
|
|
926
930
|
reference: t,
|
|
@@ -965,7 +969,7 @@ async function Ae(t, e) {
|
|
|
965
969
|
y: o,
|
|
966
970
|
width: r.floating.width,
|
|
967
971
|
height: r.floating.height
|
|
968
|
-
} : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)),
|
|
972
|
+
} : r.reference, x = await (s.getOffsetParent == null ? void 0 : s.getOffsetParent(c.floating)), L = await (s.isElement == null ? void 0 : s.isElement(x)) ? await (s.getScale == null ? void 0 : s.getScale(x)) || {
|
|
969
973
|
x: 1,
|
|
970
974
|
y: 1
|
|
971
975
|
} : {
|
|
@@ -978,10 +982,10 @@ async function Ae(t, e) {
|
|
|
978
982
|
strategy: l
|
|
979
983
|
}) : v);
|
|
980
984
|
return {
|
|
981
|
-
top: (p.top - A.top + g.top) /
|
|
982
|
-
bottom: (A.bottom - p.bottom + g.bottom) /
|
|
983
|
-
left: (p.left - A.left + g.left) /
|
|
984
|
-
right: (A.right - p.right + g.right) /
|
|
985
|
+
top: (p.top - A.top + g.top) / L.y,
|
|
986
|
+
bottom: (A.bottom - p.bottom + g.bottom) / L.y,
|
|
987
|
+
left: (p.left - A.left + g.left) / L.x,
|
|
988
|
+
right: (A.right - p.right + g.right) / L.x
|
|
985
989
|
};
|
|
986
990
|
}
|
|
987
991
|
const Tn = function(t) {
|
|
@@ -1008,12 +1012,12 @@ const Tn = function(t) {
|
|
|
1008
1012
|
} = mt(t, e);
|
|
1009
1013
|
if ((n = s.arrow) != null && n.alignmentOffset)
|
|
1010
1014
|
return {};
|
|
1011
|
-
const p = V(o), v =
|
|
1012
|
-
!m && H && A.push(...On(c, w, g,
|
|
1015
|
+
const p = V(o), v = U(c), x = V(c) === c, L = await (l.isRTL == null ? void 0 : l.isRTL(a.floating)), A = m || (x || !w ? [dt(c)] : _n(c)), H = g !== "none";
|
|
1016
|
+
!m && H && A.push(...On(c, w, g, L));
|
|
1013
1017
|
const De = [c, ...A], vt = await Ae(e, y), rt = [];
|
|
1014
1018
|
let K = ((i = s.flip) == null ? void 0 : i.overflows) || [];
|
|
1015
1019
|
if (f && rt.push(vt[p]), u) {
|
|
1016
|
-
const N =
|
|
1020
|
+
const N = En(o, r, L);
|
|
1017
1021
|
rt.push(vt[N[0]], vt[N[1]]);
|
|
1018
1022
|
}
|
|
1019
1023
|
if (K = [...K, {
|
|
@@ -1039,7 +1043,7 @@ const Tn = function(t) {
|
|
|
1039
1043
|
var Dt;
|
|
1040
1044
|
const z = (Dt = K.filter((C) => {
|
|
1041
1045
|
if (H) {
|
|
1042
|
-
const T =
|
|
1046
|
+
const T = U(C.placement);
|
|
1043
1047
|
return T === v || // Create a bias to the `y` side axis due to horizontal
|
|
1044
1048
|
// reading directions favoring greater width.
|
|
1045
1049
|
T === "y";
|
|
@@ -1069,7 +1073,7 @@ async function kn(t, e) {
|
|
|
1069
1073
|
placement: n,
|
|
1070
1074
|
platform: i,
|
|
1071
1075
|
elements: o
|
|
1072
|
-
} = t, s = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), r = V(n), c = gt(n), l =
|
|
1076
|
+
} = t, s = await (i.isRTL == null ? void 0 : i.isRTL(o.floating)), r = V(n), c = gt(n), l = U(n) === "y", a = ["left", "top"].includes(r) ? -1 : 1, f = s && l ? -1 : 1, u = mt(e, t);
|
|
1073
1077
|
let {
|
|
1074
1078
|
mainAxis: m,
|
|
1075
1079
|
crossAxis: h,
|
|
@@ -1142,7 +1146,7 @@ const Mn = function(t) {
|
|
|
1142
1146
|
} = mt(t, e), a = {
|
|
1143
1147
|
x: n,
|
|
1144
1148
|
y: i
|
|
1145
|
-
}, f = await Ae(e, l), u =
|
|
1149
|
+
}, f = await Ae(e, l), u = U(V(o)), m = ve(u);
|
|
1146
1150
|
let h = a[m], g = a[u];
|
|
1147
1151
|
if (s) {
|
|
1148
1152
|
const y = m === "y" ? "top" : "left", p = m === "y" ? "bottom" : "right", v = h + f[y], x = h - f[p];
|
|
@@ -1170,7 +1174,7 @@ const Mn = function(t) {
|
|
|
1170
1174
|
function J(t) {
|
|
1171
1175
|
return Se(t) ? (t.nodeName || "").toLowerCase() : "#document";
|
|
1172
1176
|
}
|
|
1173
|
-
function
|
|
1177
|
+
function E(t) {
|
|
1174
1178
|
var e;
|
|
1175
1179
|
return (t == null || (e = t.ownerDocument) == null ? void 0 : e.defaultView) || window;
|
|
1176
1180
|
}
|
|
@@ -1179,16 +1183,16 @@ function D(t) {
|
|
|
1179
1183
|
return (e = (Se(t) ? t.ownerDocument : t.document) || window.document) == null ? void 0 : e.documentElement;
|
|
1180
1184
|
}
|
|
1181
1185
|
function Se(t) {
|
|
1182
|
-
return t instanceof Node || t instanceof
|
|
1186
|
+
return t instanceof Node || t instanceof E(t).Node;
|
|
1183
1187
|
}
|
|
1184
1188
|
function R(t) {
|
|
1185
|
-
return t instanceof Element || t instanceof
|
|
1189
|
+
return t instanceof Element || t instanceof E(t).Element;
|
|
1186
1190
|
}
|
|
1187
1191
|
function O(t) {
|
|
1188
|
-
return t instanceof HTMLElement || t instanceof
|
|
1192
|
+
return t instanceof HTMLElement || t instanceof E(t).HTMLElement;
|
|
1189
1193
|
}
|
|
1190
1194
|
function zt(t) {
|
|
1191
|
-
return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof
|
|
1195
|
+
return typeof ShadowRoot > "u" ? !1 : t instanceof ShadowRoot || t instanceof E(t).ShadowRoot;
|
|
1192
1196
|
}
|
|
1193
1197
|
function st(t) {
|
|
1194
1198
|
const {
|
|
@@ -1199,7 +1203,7 @@ function st(t) {
|
|
|
1199
1203
|
} = _(t);
|
|
1200
1204
|
return /auto|scroll|overlay|hidden|clip/.test(e + i + n) && !["inline", "contents"].includes(o);
|
|
1201
1205
|
}
|
|
1202
|
-
function
|
|
1206
|
+
function $n(t) {
|
|
1203
1207
|
return ["table", "td", "th"].includes(J(t));
|
|
1204
1208
|
}
|
|
1205
1209
|
function wt(t) {
|
|
@@ -1211,16 +1215,16 @@ function wt(t) {
|
|
|
1211
1215
|
}
|
|
1212
1216
|
});
|
|
1213
1217
|
}
|
|
1214
|
-
function
|
|
1218
|
+
function Et(t) {
|
|
1215
1219
|
const e = _t(), n = _(t);
|
|
1216
1220
|
return n.transform !== "none" || n.perspective !== "none" || (n.containerType ? n.containerType !== "normal" : !1) || !e && (n.backdropFilter ? n.backdropFilter !== "none" : !1) || !e && (n.filter ? n.filter !== "none" : !1) || ["transform", "perspective", "filter"].some((i) => (n.willChange || "").includes(i)) || ["paint", "layout", "strict", "content"].some((i) => (n.contain || "").includes(i));
|
|
1217
1221
|
}
|
|
1218
|
-
function
|
|
1222
|
+
function Fn(t) {
|
|
1219
1223
|
let e = M(t);
|
|
1220
|
-
for (; O(e) && !
|
|
1224
|
+
for (; O(e) && !j(e); ) {
|
|
1221
1225
|
if (wt(e))
|
|
1222
1226
|
return null;
|
|
1223
|
-
if (
|
|
1227
|
+
if (Et(e))
|
|
1224
1228
|
return e;
|
|
1225
1229
|
e = M(e);
|
|
1226
1230
|
}
|
|
@@ -1229,11 +1233,11 @@ function $n(t) {
|
|
|
1229
1233
|
function _t() {
|
|
1230
1234
|
return typeof CSS > "u" || !CSS.supports ? !1 : CSS.supports("-webkit-backdrop-filter", "none");
|
|
1231
1235
|
}
|
|
1232
|
-
function
|
|
1236
|
+
function j(t) {
|
|
1233
1237
|
return ["html", "body", "#document"].includes(J(t));
|
|
1234
1238
|
}
|
|
1235
1239
|
function _(t) {
|
|
1236
|
-
return
|
|
1240
|
+
return E(t).getComputedStyle(t);
|
|
1237
1241
|
}
|
|
1238
1242
|
function yt(t) {
|
|
1239
1243
|
return R(t) ? {
|
|
@@ -1256,17 +1260,17 @@ function M(t) {
|
|
|
1256
1260
|
);
|
|
1257
1261
|
return zt(e) ? e.host : e;
|
|
1258
1262
|
}
|
|
1259
|
-
function
|
|
1263
|
+
function Le(t) {
|
|
1260
1264
|
const e = M(t);
|
|
1261
|
-
return
|
|
1265
|
+
return j(e) ? t.ownerDocument ? t.ownerDocument.body : t.body : O(e) && st(e) ? e : Le(e);
|
|
1262
1266
|
}
|
|
1263
1267
|
function et(t, e, n) {
|
|
1264
1268
|
var i;
|
|
1265
1269
|
e === void 0 && (e = []), n === void 0 && (n = !0);
|
|
1266
|
-
const o =
|
|
1270
|
+
const o = Le(t), s = o === ((i = t.ownerDocument) == null ? void 0 : i.body), r = E(o);
|
|
1267
1271
|
return s ? e.concat(r, r.visualViewport || [], st(o) ? o : [], r.frameElement && n ? et(r.frameElement) : []) : e.concat(o, et(o, [], n));
|
|
1268
1272
|
}
|
|
1269
|
-
function
|
|
1273
|
+
function Ee(t) {
|
|
1270
1274
|
const e = _(t);
|
|
1271
1275
|
let n = parseFloat(e.width) || 0, i = parseFloat(e.height) || 0;
|
|
1272
1276
|
const o = O(t), s = o ? t.offsetWidth : n, r = o ? t.offsetHeight : i, c = ht(n) !== s || ht(i) !== r;
|
|
@@ -1287,7 +1291,7 @@ function B(t) {
|
|
|
1287
1291
|
width: i,
|
|
1288
1292
|
height: o,
|
|
1289
1293
|
$: s
|
|
1290
|
-
} =
|
|
1294
|
+
} = Ee(e);
|
|
1291
1295
|
let r = (s ? ht(n.width) : n.width) / i, c = (s ? ht(n.height) : n.height) / o;
|
|
1292
1296
|
return (!r || !Number.isFinite(r)) && (r = 1), (!c || !Number.isFinite(c)) && (c = 1), {
|
|
1293
1297
|
x: r,
|
|
@@ -1296,14 +1300,14 @@ function B(t) {
|
|
|
1296
1300
|
}
|
|
1297
1301
|
const Vn = /* @__PURE__ */ k(0);
|
|
1298
1302
|
function _e(t) {
|
|
1299
|
-
const e =
|
|
1303
|
+
const e = E(t);
|
|
1300
1304
|
return !_t() || !e.visualViewport ? Vn : {
|
|
1301
1305
|
x: e.visualViewport.offsetLeft,
|
|
1302
1306
|
y: e.visualViewport.offsetTop
|
|
1303
1307
|
};
|
|
1304
1308
|
}
|
|
1305
1309
|
function Wn(t, e, n) {
|
|
1306
|
-
return e === void 0 && (e = !1), !n || e && n !==
|
|
1310
|
+
return e === void 0 && (e = !1), !n || e && n !== E(t) ? !1 : e;
|
|
1307
1311
|
}
|
|
1308
1312
|
function W(t, e, n, i) {
|
|
1309
1313
|
e === void 0 && (e = !1), n === void 0 && (n = !1);
|
|
@@ -1313,11 +1317,11 @@ function W(t, e, n, i) {
|
|
|
1313
1317
|
const c = Wn(s, n, i) ? _e(s) : k(0);
|
|
1314
1318
|
let l = (o.left + c.x) / r.x, a = (o.top + c.y) / r.y, f = o.width / r.x, u = o.height / r.y;
|
|
1315
1319
|
if (s) {
|
|
1316
|
-
const m =
|
|
1320
|
+
const m = E(s), h = i && R(i) ? E(i) : i;
|
|
1317
1321
|
let g = m, w = g.frameElement;
|
|
1318
1322
|
for (; w && i && h !== g; ) {
|
|
1319
|
-
const y = B(w), p = w.getBoundingClientRect(), v = _(w), x = p.left + (w.clientLeft + parseFloat(v.paddingLeft)) * y.x,
|
|
1320
|
-
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += x, a +=
|
|
1323
|
+
const y = B(w), p = w.getBoundingClientRect(), v = _(w), x = p.left + (w.clientLeft + parseFloat(v.paddingLeft)) * y.x, L = p.top + (w.clientTop + parseFloat(v.paddingTop)) * y.y;
|
|
1324
|
+
l *= y.x, a *= y.y, f *= y.x, u *= y.y, l += x, a += L, g = E(w), w = g.frameElement;
|
|
1321
1325
|
}
|
|
1322
1326
|
}
|
|
1323
1327
|
return pt({
|
|
@@ -1360,10 +1364,10 @@ function Re(t) {
|
|
|
1360
1364
|
return W(D(t)).left + yt(t).scrollLeft;
|
|
1361
1365
|
}
|
|
1362
1366
|
function Bn(t) {
|
|
1363
|
-
const e = D(t), n = yt(t), i = t.ownerDocument.body, o =
|
|
1367
|
+
const e = D(t), n = yt(t), i = t.ownerDocument.body, o = F(e.scrollWidth, e.clientWidth, i.scrollWidth, i.clientWidth), s = F(e.scrollHeight, e.clientHeight, i.scrollHeight, i.clientHeight);
|
|
1364
1368
|
let r = -n.scrollLeft + Re(t);
|
|
1365
1369
|
const c = -n.scrollTop;
|
|
1366
|
-
return _(i).direction === "rtl" && (r +=
|
|
1370
|
+
return _(i).direction === "rtl" && (r += F(e.clientWidth, i.clientWidth) - o), {
|
|
1367
1371
|
width: o,
|
|
1368
1372
|
height: s,
|
|
1369
1373
|
x: r,
|
|
@@ -1371,7 +1375,7 @@ function Bn(t) {
|
|
|
1371
1375
|
};
|
|
1372
1376
|
}
|
|
1373
1377
|
function In(t, e) {
|
|
1374
|
-
const n =
|
|
1378
|
+
const n = E(t), i = D(t), o = n.visualViewport;
|
|
1375
1379
|
let s = i.clientWidth, r = i.clientHeight, c = 0, l = 0;
|
|
1376
1380
|
if (o) {
|
|
1377
1381
|
s = o.width, r = o.height;
|
|
@@ -1385,7 +1389,7 @@ function In(t, e) {
|
|
|
1385
1389
|
y: l
|
|
1386
1390
|
};
|
|
1387
1391
|
}
|
|
1388
|
-
function
|
|
1392
|
+
function Un(t, e) {
|
|
1389
1393
|
const n = W(t, !0, e === "fixed"), i = n.top + t.clientTop, o = n.left + t.clientLeft, s = O(t) ? B(t) : k(1), r = t.clientWidth * s.x, c = t.clientHeight * s.y, l = o * s.x, a = i * s.y;
|
|
1390
1394
|
return {
|
|
1391
1395
|
width: r,
|
|
@@ -1401,7 +1405,7 @@ function Bt(t, e, n) {
|
|
|
1401
1405
|
else if (e === "document")
|
|
1402
1406
|
i = Bn(D(t));
|
|
1403
1407
|
else if (R(e))
|
|
1404
|
-
i =
|
|
1408
|
+
i = Un(e, n);
|
|
1405
1409
|
else {
|
|
1406
1410
|
const o = _e(t);
|
|
1407
1411
|
i = {
|
|
@@ -1414,17 +1418,17 @@ function Bt(t, e, n) {
|
|
|
1414
1418
|
}
|
|
1415
1419
|
function Oe(t, e) {
|
|
1416
1420
|
const n = M(t);
|
|
1417
|
-
return n === e || !R(n) ||
|
|
1421
|
+
return n === e || !R(n) || j(n) ? !1 : _(n).position === "fixed" || Oe(n, e);
|
|
1418
1422
|
}
|
|
1419
|
-
function
|
|
1423
|
+
function jn(t, e) {
|
|
1420
1424
|
const n = e.get(t);
|
|
1421
1425
|
if (n)
|
|
1422
1426
|
return n;
|
|
1423
1427
|
let i = et(t, [], !1).filter((c) => R(c) && J(c) !== "body"), o = null;
|
|
1424
1428
|
const s = _(t).position === "fixed";
|
|
1425
1429
|
let r = s ? M(t) : t;
|
|
1426
|
-
for (; R(r) && !
|
|
1427
|
-
const c = _(r), l =
|
|
1430
|
+
for (; R(r) && !j(r); ) {
|
|
1431
|
+
const c = _(r), l = Et(r);
|
|
1428
1432
|
!l && c.position === "fixed" && (o = null), (s ? !l && !o : !l && c.position === "static" && !!o && ["absolute", "fixed"].includes(o.position) || st(r) && !l && Oe(t, r)) ? i = i.filter((f) => f !== r) : o = c, r = M(r);
|
|
1429
1433
|
}
|
|
1430
1434
|
return e.set(t, i), i;
|
|
@@ -1436,9 +1440,9 @@ function qn(t) {
|
|
|
1436
1440
|
rootBoundary: i,
|
|
1437
1441
|
strategy: o
|
|
1438
1442
|
} = t;
|
|
1439
|
-
const r = [...n === "clippingAncestors" ? wt(e) ? [] :
|
|
1443
|
+
const r = [...n === "clippingAncestors" ? wt(e) ? [] : jn(e, this._c) : [].concat(n), i], c = r[0], l = r.reduce((a, f) => {
|
|
1440
1444
|
const u = Bt(e, f, o);
|
|
1441
|
-
return a.top =
|
|
1445
|
+
return a.top = F(u.top, a.top), a.right = ft(u.right, a.right), a.bottom = ft(u.bottom, a.bottom), a.left = F(u.left, a.left), a;
|
|
1442
1446
|
}, Bt(e, c, o));
|
|
1443
1447
|
return {
|
|
1444
1448
|
width: l.right - l.left,
|
|
@@ -1451,7 +1455,7 @@ function Xn(t) {
|
|
|
1451
1455
|
const {
|
|
1452
1456
|
width: e,
|
|
1453
1457
|
height: n
|
|
1454
|
-
} =
|
|
1458
|
+
} = Ee(t);
|
|
1455
1459
|
return {
|
|
1456
1460
|
width: e,
|
|
1457
1461
|
height: n
|
|
@@ -1484,12 +1488,12 @@ function It(t, e) {
|
|
|
1484
1488
|
return !O(t) || _(t).position === "fixed" ? null : e ? e(t) : t.offsetParent;
|
|
1485
1489
|
}
|
|
1486
1490
|
function Pe(t, e) {
|
|
1487
|
-
const n =
|
|
1491
|
+
const n = E(t);
|
|
1488
1492
|
if (wt(t))
|
|
1489
1493
|
return n;
|
|
1490
1494
|
if (!O(t)) {
|
|
1491
1495
|
let o = M(t);
|
|
1492
|
-
for (; o && !
|
|
1496
|
+
for (; o && !j(o); ) {
|
|
1493
1497
|
if (R(o) && !bt(o))
|
|
1494
1498
|
return o;
|
|
1495
1499
|
o = M(o);
|
|
@@ -1497,9 +1501,9 @@ function Pe(t, e) {
|
|
|
1497
1501
|
return n;
|
|
1498
1502
|
}
|
|
1499
1503
|
let i = It(t, e);
|
|
1500
|
-
for (; i &&
|
|
1504
|
+
for (; i && $n(i) && bt(i); )
|
|
1501
1505
|
i = It(i, e);
|
|
1502
|
-
return i &&
|
|
1506
|
+
return i && j(i) && bt(i) && !Et(i) ? n : i || Fn(t) || n;
|
|
1503
1507
|
}
|
|
1504
1508
|
const Jn = async function(t) {
|
|
1505
1509
|
const e = this.getOffsetParent || Pe, n = this.getDimensions, i = await n(t.floating);
|
|
@@ -1547,10 +1551,10 @@ function Qn(t, e) {
|
|
|
1547
1551
|
return;
|
|
1548
1552
|
const h = at(f), g = at(o.clientWidth - (a + u)), w = at(o.clientHeight - (f + m)), y = at(a), v = {
|
|
1549
1553
|
rootMargin: -h + "px " + -g + "px " + -w + "px " + -y + "px",
|
|
1550
|
-
threshold:
|
|
1554
|
+
threshold: F(0, ft(1, l)) || 1
|
|
1551
1555
|
};
|
|
1552
1556
|
let x = !0;
|
|
1553
|
-
function
|
|
1557
|
+
function L(A) {
|
|
1554
1558
|
const H = A[0].intersectionRatio;
|
|
1555
1559
|
if (H !== l) {
|
|
1556
1560
|
if (!x)
|
|
@@ -1562,13 +1566,13 @@ function Qn(t, e) {
|
|
|
1562
1566
|
x = !1;
|
|
1563
1567
|
}
|
|
1564
1568
|
try {
|
|
1565
|
-
n = new IntersectionObserver(
|
|
1569
|
+
n = new IntersectionObserver(L, {
|
|
1566
1570
|
...v,
|
|
1567
1571
|
// Handle <iframe>s
|
|
1568
1572
|
root: o.ownerDocument
|
|
1569
1573
|
});
|
|
1570
1574
|
} catch {
|
|
1571
|
-
n = new IntersectionObserver(
|
|
1575
|
+
n = new IntersectionObserver(L, v);
|
|
1572
1576
|
}
|
|
1573
1577
|
n.observe(t);
|
|
1574
1578
|
}
|
|
@@ -1610,7 +1614,7 @@ function Zn(t, e, n, i) {
|
|
|
1610
1614
|
}), u == null || u(), (p = h) == null || p.disconnect(), h = null, l && cancelAnimationFrame(g);
|
|
1611
1615
|
};
|
|
1612
1616
|
}
|
|
1613
|
-
const ti = Mn, ei = Nn,
|
|
1617
|
+
const ti = Mn, ei = Nn, Ut = Tn, ni = (t, e, n) => {
|
|
1614
1618
|
const i = /* @__PURE__ */ new Map(), o = {
|
|
1615
1619
|
platform: Gn,
|
|
1616
1620
|
...n
|
|
@@ -1623,7 +1627,7 @@ const ti = Mn, ei = Nn, jt = Tn, ni = (t, e, n) => {
|
|
|
1623
1627
|
platform: s
|
|
1624
1628
|
});
|
|
1625
1629
|
};
|
|
1626
|
-
function
|
|
1630
|
+
function vi({
|
|
1627
1631
|
content: t,
|
|
1628
1632
|
open: e,
|
|
1629
1633
|
placement: n,
|
|
@@ -1642,10 +1646,10 @@ function yi({
|
|
|
1642
1646
|
placement: n,
|
|
1643
1647
|
strategy: "absolute",
|
|
1644
1648
|
middleware: [
|
|
1645
|
-
|
|
1649
|
+
Ut(),
|
|
1646
1650
|
ti({ mainAxis: i, crossAxis: o }),
|
|
1647
1651
|
ei(),
|
|
1648
|
-
|
|
1652
|
+
Ut()
|
|
1649
1653
|
]
|
|
1650
1654
|
}).then(({ x: f, y: u }) => {
|
|
1651
1655
|
a.style.top = `${u}px`, a.style.left = `${f}px`;
|
|
@@ -1671,7 +1675,7 @@ function ii(t, e) {
|
|
|
1671
1675
|
Failure: (o) => n(o.$.error)
|
|
1672
1676
|
});
|
|
1673
1677
|
}
|
|
1674
|
-
function
|
|
1678
|
+
function xi() {
|
|
1675
1679
|
return ue.focus((t) => {
|
|
1676
1680
|
var e;
|
|
1677
1681
|
return (e = t.target) == null ? void 0 : e.select();
|
|
@@ -1698,7 +1702,7 @@ const oi = (t) => (e) => {
|
|
|
1698
1702
|
return window == null || window.addEventListener("resize", o), (s) => {
|
|
1699
1703
|
window == null || window.removeEventListener("resize", o), i(s);
|
|
1700
1704
|
};
|
|
1701
|
-
},
|
|
1705
|
+
}, bi = {
|
|
1702
1706
|
element: oi,
|
|
1703
1707
|
window: si
|
|
1704
1708
|
};
|
|
@@ -1735,7 +1739,7 @@ function li(t) {
|
|
|
1735
1739
|
return null;
|
|
1736
1740
|
};
|
|
1737
1741
|
}
|
|
1738
|
-
function
|
|
1742
|
+
function Ai(t) {
|
|
1739
1743
|
const e = li(Object.keys(t));
|
|
1740
1744
|
return we((n) => {
|
|
1741
1745
|
const i = n.map((o) => {
|
|
@@ -1758,25 +1762,26 @@ function bi(t) {
|
|
|
1758
1762
|
});
|
|
1759
1763
|
}
|
|
1760
1764
|
export {
|
|
1761
|
-
|
|
1765
|
+
fi as Anchor,
|
|
1762
1766
|
vn as AsyncResultView,
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
+
pi as AutoFocus,
|
|
1768
|
+
mi as AutoSelect,
|
|
1769
|
+
wi as HTMLTitle,
|
|
1770
|
+
gi as HiddenWhenEmpty,
|
|
1767
1771
|
An as InViewport,
|
|
1768
1772
|
ge as LocationProviderMarker,
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1773
|
+
vi as PopOver,
|
|
1774
|
+
hi as ProvideAppearance,
|
|
1775
|
+
ui as ProvideLocation,
|
|
1772
1776
|
ii as ResultView,
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
|
|
1777
|
+
Ai as Router,
|
|
1778
|
+
xi as SelectOnFocus,
|
|
1779
|
+
di as UseAppearance,
|
|
1776
1780
|
we as UseLocation,
|
|
1777
|
-
|
|
1781
|
+
yi as WhenInViewport,
|
|
1778
1782
|
ye as appearanceMarker,
|
|
1779
1783
|
mn as equalsLocation,
|
|
1784
|
+
ai as getFullURL,
|
|
1780
1785
|
gn as locationFromURL,
|
|
1781
1786
|
pn as makeLocation,
|
|
1782
1787
|
yn as makeLocationProp,
|
|
@@ -1784,5 +1789,5 @@ export {
|
|
|
1784
1789
|
ri as matchesRoute,
|
|
1785
1790
|
ci as parseRouteSegments,
|
|
1786
1791
|
wn as setLocationFromUrl,
|
|
1787
|
-
|
|
1792
|
+
bi as size
|
|
1788
1793
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tempots/ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.cjs",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"@floating-ui/dom": "^1.6.7"
|
|
41
41
|
},
|
|
42
42
|
"peerDependencies": {
|
|
43
|
-
"@tempots/dom": "
|
|
43
|
+
"@tempots/dom": "0.12.0",
|
|
44
44
|
"@tempots/std": "0.10.7"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { TNode, Signal, Value } from '@tempots/dom';
|
|
2
|
-
import { AsyncResult } from '@tempots/std
|
|
2
|
+
import { AsyncResult } from '@tempots/std';
|
|
3
3
|
|
|
4
4
|
export declare function AsyncResultView<T, E>(result: Value<AsyncResult<T, E>>, options: {
|
|
5
5
|
success: (value: Signal<T>) => TNode;
|
|
@@ -10,6 +10,7 @@ export declare function makeLocation(): Location;
|
|
|
10
10
|
export declare function equalsLocation(a: Location, b: Location): boolean;
|
|
11
11
|
export declare function locationFromURL(url: string): Location;
|
|
12
12
|
export declare function setLocationFromUrl(prop: Prop<Location>, url: string): Prop<Location>;
|
|
13
|
+
export declare function getFullURL(location: Location): string;
|
|
13
14
|
export declare function makeLocationProp(): Prop<Location>;
|
|
14
15
|
export declare function ProvideLocation(child: TNode): import('@tempots/dom').Renderable;
|
|
15
16
|
export declare function UseLocation(fn: (location: Prop<Location>) => TNode): import('@tempots/dom').Renderable;
|