@spikonado/sprocket 0.3.8-dev.e9139ed797138acbe2da3ccc3d98a49aa44a7fcc → 0.3.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spikonado/sprocket",
3
- "version": "0.3.8-dev.e9139ed797138acbe2da3ccc3d98a49aa44a7fcc",
3
+ "version": "0.3.8",
4
4
  "description": "Agentic platform for streamlining hardware and software development",
5
5
  "license": "FSL-1.1-ALv2",
6
6
  "type": "module",
@@ -30,10 +30,10 @@
30
30
  "access": "public"
31
31
  },
32
32
  "optionalDependencies": {
33
- "@spikonado/sprocket-linux-x64-gnu": "0.3.8-dev.e9139ed797138acbe2da3ccc3d98a49aa44a7fcc",
34
- "@spikonado/sprocket-linux-arm64-gnu": "0.3.8-dev.e9139ed797138acbe2da3ccc3d98a49aa44a7fcc",
35
- "@spikonado/sprocket-darwin-x64": "0.3.8-dev.e9139ed797138acbe2da3ccc3d98a49aa44a7fcc",
36
- "@spikonado/sprocket-darwin-arm64": "0.3.8-dev.e9139ed797138acbe2da3ccc3d98a49aa44a7fcc",
37
- "@spikonado/sprocket-win32-x64-msvc": "0.3.8-dev.e9139ed797138acbe2da3ccc3d98a49aa44a7fcc"
33
+ "@spikonado/sprocket-linux-x64-gnu": "0.3.8",
34
+ "@spikonado/sprocket-linux-arm64-gnu": "0.3.8",
35
+ "@spikonado/sprocket-darwin-x64": "0.3.8",
36
+ "@spikonado/sprocket-darwin-arm64": "0.3.8",
37
+ "@spikonado/sprocket-win32-x64-msvc": "0.3.8"
38
38
  }
39
39
  }
@@ -1 +1 @@
1
- import"./BvmBrUGQ.js";import{i as e}from"./DRAZWJyQ.js";var t={get data(){return e.data},get error(){return e.error},get form(){return e.form},get params(){return e.params},get route(){return e.route},get state(){return e.state},get status(){return e.status},get url(){return e.url}};export{t};
1
+ import"./BvmBrUGQ.js";import{i as e}from"./DvSrLZhO.js";var t={get data(){return e.data},get error(){return e.error},get form(){return e.form},get params(){return e.params},get route(){return e.route},get state(){return e.state},get status(){return e.status},get url(){return e.url}};export{t};
@@ -0,0 +1 @@
1
+ import{B as e,R as t,n,rt as r,t as i,tt as a,ut as o,z as s}from"./BvmBrUGQ.js";import"./iGtbSQf_.js";var c=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function ee(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,"searchParams",{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var te=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),te(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ne(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var re=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ie=/^\/\((?:[^)]+)\)$/;function ae(e){let t=[];return{pattern:e===`/`||ie.test(e)?/^\/$/:RegExp(`^${se(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return le(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return le(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=re.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return le(e)}).join(``)}).join(``)}/?$`),params:t}}function oe(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function se(e){return e.slice(1).split(`/`).filter(oe)}function ce(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function le(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}var ue=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function de(e,t){let n=se(e),r=e!=`/`&&e.endsWith(`/`);return`/`+n.map(n=>n.replace(ue,(n,r,i,a)=>{let o=t[a];if(!o){if(r||i&&o!==void 0)return``;throw Error(`Missing parameter '${a}' in route ${e}`)}if(o.startsWith(`/`)||o.endsWith(`/`))throw Error(`Parameter '${a}' in route ${e} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return o})).filter(Boolean).join(`/`)+(r?`/`:``)}function fe({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ae(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ce(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function pe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function me(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_6n7dkj?.base??``,he=globalThis.__sveltekit_6n7dkj?.assets??x??``,ge=``;function _e(...e){if(!e[0].startsWith(`/`))throw Error(`Cannot use \`resolve(...)\` with a non-absolute pathname or route ID (got "${e[0]}"). \`resolve\` is only for internal pathnames and route IDs; external URLs should be used directly.`);return x+ge+de(e[0],e[1])}var ve=`1789749104709`,ye=`sveltekit:snapshot`,be=`sveltekit:scroll`,xe=`sveltekit:states`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Se=location.origin;function Ce(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var we={...w,"":w.hover};function Te(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ee(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=Te(e)}}function De(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||D(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===Se&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function Oe(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=Te(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:we[r??`off`],preload_data:we[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function ke(e){let t=o(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function a(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:a}}var Ae={v:h};function je(){let{set:e,subscribe:t}=o(!1),n;async function r(){clearTimeout(n);try{let t=await fetch(`${he}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==ve;return r&&(e(!0),Ae.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:r}}function D(e,t,n){return e.origin!==Se||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Me(e){}var Ne=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Ne],[...new Set([...Ne])];function Pe(e){return e.filter(e=>e!=null)}function O(e,t){return e+`/`+t}function Fe(e){return e instanceof c||e instanceof u?e.status:500}function Ie(e){return e instanceof u?e.text:`Internal Error`}var k,A,Le,Re=n.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(n.toString()),ze=`a:`;Re?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ze)},A={current:null},Le={current:!1}):(k=new class{#e=r({});get data(){return t(this.#e)}set data(e){a(this.#e,e)}#t=r(null);get form(){return t(this.#t)}set form(e){a(this.#t,e)}#n=r(null);get error(){return t(this.#n)}set error(e){a(this.#n,e)}#r=r({});get params(){return t(this.#r)}set params(e){a(this.#r,e)}#i=r({id:null});get route(){return t(this.#i)}set route(e){a(this.#i,e)}#a=r({});get state(){return t(this.#a)}set state(e){a(this.#a,e)}#o=r(-1);get status(){return t(this.#o)}set status(e){a(this.#o,e)}#s=r(new URL(ze));get url(){return t(this.#s)}set url(e){a(this.#s,e)}},A=new class{#e=r(null);get current(){return t(this.#e)}set current(e){a(this.#e,e)}},Le=new class{#e=r(!1);get current(){return t(this.#e)}set current(e){a(this.#e,e)}},Ae.v=()=>Le.current=!0);function Be(e){Object.assign(k,e)}var Ve={spanContext(){return He},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},He={traceId:``,spanId:``,traceFlags:0},{onMount:Ue,tick:We}=i,Ge=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),j=null,M=pe(`sveltekit:scroll`)??{},N=pe(`sveltekit:snapshot`)??{},P={url:ke({}),page:ke({}),navigating:o(null),updated:je()};function Ke(e){M[e]=T()}function qe(e,t){let n=e+1;for(;M[n];)delete M[n],n+=1;for(n=t+1;N[n];)delete N[n],n+=1}function F(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function Je(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}var Ye,Xe,I,L,Ze,R,Qe={},$e={},z=[],B=[],V=null;function H(){V?.fork?.then(e=>e?.discard()),V=null,Q={element:void 0,href:void 0}}var et=new Map,tt=new Set,nt=new Set,U=new Set,W={branch:[],error:null,url:null,nav:null},rt=!1,it=!1,at=!0,G=!1,K=!1,ot=!1,st=!1,ct,q,J,Y,lt=new Set,ut=new Map,dt=new Map;async function ft(e,t,n){if(globalThis.__sveltekit_6n7dkj.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_6n7dkj.data;for(let t in e)Qe[t]=e[t];for(let e in n)Qe[e]=n[e];for(let e in r)Qe[e]=r[e];for(let e in t)$e[e]=t[e]}document.URL!==location.href&&(location.href=location.href),R=e,await e.hooks.init?.(),Ye=fe(e),L=document.documentElement,Ze=t,Xe=e.nodes[0],I=e.nodes[1],Xe(),I(),q=history.state?.[S],J=history.state?.[C],q||(q=J=Date.now(),history.replaceState({...history.state,[S]:q,[C]:J},``));let r=M[q];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Bt(Ze,n)):(await Z({type:`enter`,url:Ce(R.hash?Kt(new URL(location.href)):location.href),replace_state:!0}),i()),zt()}function pt(){z.length=0,st=!1}function mt(e){B.some(e=>e?.snapshot)&&(N[e]=B.map(e=>e?.snapshot?.capture()))}function ht(e){N[e]?.forEach((e,t)=>{B[t]?.snapshot?.restore(e)})}function gt(){Ke(q),me(be,M),mt(J),me(ye,N)}async function _t(t,n,r,i){let a,o;n.invalidateAll&&H(),await Z({type:`goto`,url:Ce(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){st=!0,a=new Set;for(let[e,t]of ut)for(let[n,r]of t)r.resource?.reset(),a.add(O(e,n));o=new Set;for(let[e,t]of dt)for(let n of t.keys())o.add(O(e,n))}n.invalidate&&n.invalidate.forEach(Rt)}}),n.invalidateAll&&e().then(e).then(()=>{for(let[e,t]of ut)for(let[n,{resource:r}]of t)a?.has(O(e,n))&&r.start();for(let[e,t]of dt)for(let[n,{resource:r}]of t)o?.has(O(e,n))&&r.reconnect()})}async function vt(e){if(e.id!==V?.id){H();let t={};lt.add(t),V={id:e.id,token:t,promise:Ot({...e,preload:t}).then(e=>(lt.delete(t),e.type===`loaded`&&e.state.error&&H(),e)),fork:null}}return V.promise}async function yt(e){let t=(await X(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function bt(e,t,n){let r={params:W.params,route:{id:W.route?.id??null},url:new URL(location.href)};if(W={...e.state,nav:r},Be(e.props.page),ct=new R.root({target:t,props:{...e.props,stores:P,components:B},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:M[q]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};U.forEach(t=>t(e))}ht(J),it=!0}async function xt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Pe(n).map(e=>e.node.component),page:Gt(k)}};s!==void 0&&(l.props.form=s);let u={},f=!k,p=0;for(let e=0;e<Math.max(n.length,W.branch.length);e+=1){let t=n[e],r=W.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!W.url||e.href!==W.url.href||W.error!==a||s!==void 0&&s!==k.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:k.data}),l}async function St({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:Ve,current:Ve},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:ee(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},R.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=Ct(t,r,n);return s&&e(i.href),a},setHeaders:h,depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function Ct(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:it?ne(r,i.href,t):y(r,t)}}function wt(e,t,n,r,i,a){if(st)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==W.params[e])return!0;for(let e of i.dependencies)if(z.some(t=>t(new URL(e))))return!0;return!1}function Tt(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Et(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function Dt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Gt(k),constructors:[]}}}async function Ot({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(V?.id===e)return lt.delete(V.token),V.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=W.url?e!==Nt(W.url):!1,p=W.route?i.id!==W.route.id:!1,m=Et(W.url,n),ee=!1,g=d.map(async(e,t)=>{if(!e)return;let a=W.branch[t];return e[1]===a?.loader&&!wt(ee,p,f,m,a.universal?.uses,r)?a:(ee=!0,St({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:Tt(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(h);let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(a&&lt.has(a))return Dt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Fe(t),u;if(t instanceof c)u=t.body;else{if(await P.updated.check())return await Je(),await F(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await kt(e,_,o);return d?xt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Ft(n,{id:i.id},u,s)}else _.push(void 0);return xt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function kt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function At({status:e,error:t,url:n,route:r}){let i={};try{return xt({url:n,params:i,branch:[await St({loader:Xe,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:Tt(null)}),{node:await I(),loader:I,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof l){await _t(new URL(t.location,location.href),{},0);return}let a=await R.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function jt(e){let t=e.href;if(et.has(t))return et.get(t);let n;try{let r=(async()=>{let t=await R.hooks.reroute({url:new URL(e),fetch:async(t,n)=>Ct(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);R.hash?n.hash=t:n.pathname=t,t=n}return t})();et.set(t,r),n=await r}catch{et.delete(t);return}return n}async function X(e,t){if(e&&!D(e,x,R.hash)){let n=await jt(e);if(!n)return;let r=Mt(n);for(let n of Ye){let i=n.exec(r);if(i)return{id:Nt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Mt(e){return f(R.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function Nt(e){return(R.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Pt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Wt(W,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return G||tt.forEach(e=>e(c)),o?null:s}async function Z({type:t,url:n,popped:r,keepfocus:i,noscroll:a,replace_state:o,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let ee=Y;Y=d;let g=await X(n,!1),_=t===`enter`?Wt(W,g,n,t):Pt({url:n,type:t,delta:r?.delta,intent:g,scroll:r?.scroll,event:m});if(!_){p(),Y===d&&(Y=ee);return}let te=q,v=J;f(),G=!0,it&&_.navigation.type!==`enter`&&P.navigating.set(A.current=_.navigation);let y=g&&await Ot(g);if(!y){if(D(n,x,R.hash))return await F(n,o);y=await Ft(n,{id:null},await $(new u(404,`Not Found`,`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404,o)}if(n=g?.url||n,Y!==d){_.reject(Error(`navigation aborted`));return}if(!y)return;if(y.type===`redirect`){if(l<20){await Z({type:t,url:new URL(y.location,n),popped:r,keepfocus:i,noscroll:a,replace_state:o,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}if(y=await At({status:500,error:await $(Error(`Redirect loop`),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}}),!y)return}else if(y.props.page.status>=400&&await P.updated.check())return await Je(),await F(n,o);if(pt(),Ke(te),mt(v),y.props.page.url.pathname!==n.pathname&&(n.pathname=y.props.page.url.pathname),c=r?r.state:c,!r){let e=+!o,t={[S]:q+=e,[C]:J+=e,[xe]:c};(o?history.replaceState:history.pushState).call(history,t,``,n),o||qe(q,J)}let ne=g&&V?.id===g.id?V.fork:null;V?.fork&&!ne?H():(V=null,Q={element:void 0,href:void 0}),y.props.page.state=c;let b;if(it){let e=(await Promise.all(Array.from(nt,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{U.delete(e)})}e.push(t),e.forEach(e=>{U.add(e)})}let t=_.navigation.to;W={...y.state,nav:{params:t.params,route:t.route,url:t.url}},y.props.page&&(y.props.page.url=n),!i&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let r=ne&&await ne;r?b=r.commit():(j=null,ct.$set(y.props),j&&Object.assign(y.props.page,j),Be(y.props.page),b=s?.()),ot=!0}else await bt(y,Ze,!1);let{activeElement:re}=document;if(await b,await e(),await e(),Y!==d){_.reject(Error(`navigation aborted`));return}y.props.page&&j&&Object.assign(y.props.page,j);let ie=null;if(at){let e=r?r.scroll:a?T():null;e?scrollTo(e.x,e.y):(ie=n.hash&&document.getElementById(qt(n)))?ie.scrollIntoView():scrollTo(0,0)}let ae=document.activeElement!==re&&document.activeElement!==document.body;!i&&!ae&&Ut(n,!ie),at=!0,G=!1,_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=T()),U.forEach(e=>e(_.navigation)),t===`popstate`&&ht(J),P.navigating.set(A.current=null)}async function Ft(e,t,n,r,i){return e.origin===Se&&e.pathname===location.pathname&&!rt?await At({status:r,error:n,url:e,route:t}):await F(e,i)}var Q={element:void 0,href:void 0};function It(){let e,t;L.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,w.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],w.tap)}L.addEventListener(`mousedown`,n),L.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(yt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=Ee(e,L),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=De(r,x,R.hash);if(o||s)return;let c=Oe(r),l=a&&Nt(W.url)===Nt(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=w.tap;let e=await X(a,!1);if(!e)return;vt(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,yt(a))}}function a(){r.disconnect();for(let e of L.querySelectorAll(`a`)){let{url:t,external:n,download:i}=De(e,x,R.hash);if(n||i)continue;let a=Oe(e);a.reload||(a.preload_code===w.viewport&&r.observe(e),a.preload_code===w.eager&&yt(t))}}U.add(a),a()}function $(e,t){if(e instanceof c)return e.body;let n=Fe(e),r=Ie(e);return R.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Lt(e,t={}){return e=new URL(Ce(e)),e.origin===Se?_t(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Rt(e){if(typeof e==`function`)z.push(e);else{let{href:t}=new URL(e,location.href);z.push(e=>e.href===t)}}function zt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(gt(),!G){let e=Wt(W,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};tt.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&gt()}),navigator.connection?.saveData||It(),L.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=Ee(t.composedPath()[0],L);if(!n)return;let{url:r,external:i,target:a,download:o}=De(n,x,R.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=Oe(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(R.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Pt({url:r,type:`link`,event:t})?G=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=W.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(K=!0,Ke(q),e(r),!s.replace_state)return;K=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),L.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(D(r,x,!1))return;let i=e.target,a=Oe(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Ht){if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(Y={},n===q)return;let r=M[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=W.url?m(location)===m(W.url):!1;if(o===J&&(ot||s)){i!==k.state&&(k.state=i),e(a),M[q]=T(),r&&scrollTo(r.x,r.y),q=n;return}let c=n-q;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{q=n,J=o},block:()=>{history.go(-c)},nav_token:Y,event:t})}else K||(e(new URL(location.href)),R.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{K&&(K=!1,history.replaceState({...history.state,[S]:++q,[C]:J},``,location.href))});for(let e of document.querySelectorAll(`link`))Ge.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&P.navigating.set(A.current=null)});function e(e){W.url=k.url=e,P.page.set(Gt(k)),P.page.notify()}}async function Bt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){rt=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await X(u,!1)||{}),d=Ye.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Vt(r.uses)),St({loader:R.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:Tt(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await xt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l)return await F(new URL(t.location,location.href));f=await At({status:Fe(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await bt(f,e,p))}function Vt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Ht=!1;function Ut(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=qt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Ht=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Ht=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Wt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Gt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Kt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function qt(e){let t;if(R.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Me as a,k as i,ft as n,_e as o,A as r,Lt as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DOQ4pqDO.js","../chunks/BvmBrUGQ.js","../chunks/xihTtKlq.js","../chunks/B_0TmK76.js","../chunks/iGtbSQf_.js","../chunks/Dq0ey8RK.js","../assets/0.DhTAbCoa.css","../nodes/1.CQSwuoO3.js","../chunks/DiWSu9BA.js","../chunks/DRAZWJyQ.js","../nodes/2.C4WcqF4A.js","../chunks/qZTzdLCS.js","../assets/2.Dxz0Zeak.css","../nodes/3.ImBQB5TE.js"])))=>i.map(i=>d[i]);
2
- import{A as e,B as t,D as n,G as r,K as i,M as a,O as o,P as s,Q as c,R as l,W as u,X as d,Y as f,c as p,ft as m,i as h,it as g,j as _,n as v,pt as y,r as b,rt as x,tt as S,x as C,yt as w}from"../chunks/BvmBrUGQ.js";import"../chunks/xihTtKlq.js";var T=`modulepreload`,E=function(e,t){return new URL(e,t).href},D={},O=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=E(t,n),t=s(t),t in D)return;D[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:T,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},k={},A=a(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),j=a(`<!> <!>`,1);function M(a,b){y(b,!0);let T=h(b,`components`,23,()=>[]),E=h(b,`data_0`,3,null),D=h(b,`data_1`,3,null);i(()=>b.stores.page.set(b.page)),r(()=>{b.stores,b.page,b.constructors,T(),b.form,E(),D(),b.stores.page.notify()});let O=x(!1),k=x(!1),M=x(null);v(()=>{let e=b.stores.page.subscribe(()=>{l(O)&&(S(k,!0),t().then(()=>{S(M,document.title||`untitled page`,!0)}))});return S(O,!0),e});let N=g(()=>b.constructors[1]);var P=j(),F=d(P),I=t=>{let n=g(()=>b.constructors[0]);var r=_(),i=d(r);C(i,()=>l(n),(t,n)=>{p(n(t,{get data(){return E()},get form(){return b.form},get params(){return b.page.params},children:(t,n)=>{var r=_(),i=d(r);C(i,()=>l(N),(e,t)=>{p(t(e,{get data(){return D()},get form(){return b.form},get params(){return b.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),e(t,r)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),e(t,r)},L=t=>{let n=g(()=>b.constructors[0]);var r=_(),i=d(r);C(i,()=>l(n),(e,t)=>{p(t(e,{get data(){return E()},get form(){return b.form},get params(){return b.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),e(t,r)};n(F,e=>{b.constructors[1]?e(I):e(L,-1)});var R=c(F,2),z=t=>{var r=A(),i=f(r),a=t=>{var n=s();u(()=>o(n,l(M))),e(t,n)};n(i,e=>{l(k)&&e(a)}),w(r),e(t,r)};n(R,e=>{l(O)&&e(z)}),e(a,P),m()}var N=b(M),P=[()=>O(()=>import(`../nodes/0.DOQ4pqDO.js`),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),()=>O(()=>import(`../nodes/1.CQSwuoO3.js`),__vite__mapDeps([7,1,2,8,9,4]),import.meta.url),()=>O(()=>import(`../nodes/2.C4WcqF4A.js`),__vite__mapDeps([10,1,2,3,4,5,8,9,11,12]),import.meta.url),()=>O(()=>import(`../nodes/3.ImBQB5TE.js`),__vite__mapDeps([13,1,9,4,2,3,11]),import.meta.url)],F=[],I={"/":[2],"/callback":[3]},L={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},R=Object.fromEntries(Object.entries(L.transport).map(([e,t])=>[e,t.decode])),z=Object.fromEntries(Object.entries(L.transport).map(([e,t])=>[e,t.encode])),B=!1,V=(e,t)=>R[e](t),H=()=>O(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{V as decode,R as decoders,I as dictionary,z as encoders,H as get_error_template,B as hash,L as hooks,k as matchers,P as nodes,N as root,F as server_loads};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["../nodes/0.DOQ4pqDO.js","../chunks/BvmBrUGQ.js","../chunks/xihTtKlq.js","../chunks/B_0TmK76.js","../chunks/iGtbSQf_.js","../chunks/Dq0ey8RK.js","../assets/0.DhTAbCoa.css","../nodes/1.H42GTsIR.js","../chunks/CDCDXZ4W.js","../chunks/DvSrLZhO.js","../nodes/2.CqaChJCi.js","../chunks/qZTzdLCS.js","../assets/2.Dxz0Zeak.css","../nodes/3.cOfENrMd.js"])))=>i.map(i=>d[i]);
2
+ import{A as e,B as t,D as n,G as r,K as i,M as a,O as o,P as s,Q as c,R as l,W as u,X as d,Y as f,c as p,ft as m,i as h,it as g,j as _,n as v,pt as y,r as b,rt as x,tt as S,x as C,yt as w}from"../chunks/BvmBrUGQ.js";import"../chunks/xihTtKlq.js";var T=`modulepreload`,E=function(e,t){return new URL(e,t).href},D={},O=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=E(t,n),t=s(t),t in D)return;D[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:T,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},k={},A=a(`<div id="svelte-announcer" aria-live="assertive" aria-atomic="true" style="position: absolute; left: 0; top: 0; clip: rect(0 0 0 0); clip-path: inset(50%); overflow: hidden; white-space: nowrap; width: 1px; height: 1px"><!></div>`),j=a(`<!> <!>`,1);function M(a,b){y(b,!0);let T=h(b,`components`,23,()=>[]),E=h(b,`data_0`,3,null),D=h(b,`data_1`,3,null);i(()=>b.stores.page.set(b.page)),r(()=>{b.stores,b.page,b.constructors,T(),b.form,E(),D(),b.stores.page.notify()});let O=x(!1),k=x(!1),M=x(null);v(()=>{let e=b.stores.page.subscribe(()=>{l(O)&&(S(k,!0),t().then(()=>{S(M,document.title||`untitled page`,!0)}))});return S(O,!0),e});let N=g(()=>b.constructors[1]);var P=j(),F=d(P),I=t=>{let n=g(()=>b.constructors[0]);var r=_(),i=d(r);C(i,()=>l(n),(t,n)=>{p(n(t,{get data(){return E()},get form(){return b.form},get params(){return b.page.params},children:(t,n)=>{var r=_(),i=d(r);C(i,()=>l(N),(e,t)=>{p(t(e,{get data(){return D()},get form(){return b.form},get params(){return b.page.params}}),e=>T()[1]=e,()=>T()?.[1])}),e(t,r)},$$slots:{default:!0}}),e=>T()[0]=e,()=>T()?.[0])}),e(t,r)},L=t=>{let n=g(()=>b.constructors[0]);var r=_(),i=d(r);C(i,()=>l(n),(e,t)=>{p(t(e,{get data(){return E()},get form(){return b.form},get params(){return b.page.params}}),e=>T()[0]=e,()=>T()?.[0])}),e(t,r)};n(F,e=>{b.constructors[1]?e(I):e(L,-1)});var R=c(F,2),z=t=>{var r=A(),i=f(r),a=t=>{var n=s();u(()=>o(n,l(M))),e(t,n)};n(i,e=>{l(k)&&e(a)}),w(r),e(t,r)};n(R,e=>{l(O)&&e(z)}),e(a,P),m()}var N=b(M),P=[()=>O(()=>import(`../nodes/0.DOQ4pqDO.js`),__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url),()=>O(()=>import(`../nodes/1.H42GTsIR.js`),__vite__mapDeps([7,1,2,8,9,4]),import.meta.url),()=>O(()=>import(`../nodes/2.CqaChJCi.js`),__vite__mapDeps([10,1,2,3,4,5,8,9,11,12]),import.meta.url),()=>O(()=>import(`../nodes/3.cOfENrMd.js`),__vite__mapDeps([13,1,9,4,2,3,11]),import.meta.url)],F=[],I={"/":[2],"/callback":[3]},L={handleError:(({error:e})=>{console.error(e)}),reroute:(()=>{}),transport:{}},R=Object.fromEntries(Object.entries(L.transport).map(([e,t])=>[e,t.decode])),z=Object.fromEntries(Object.entries(L.transport).map(([e,t])=>[e,t.encode])),B=!1,V=(e,t)=>R[e](t),H=()=>O(()=>import(`../chunks/Bjy-W4x2.js`).then(e=>e.default),[],import.meta.url);export{V as decode,R as decoders,I as dictionary,z as encoders,H as get_error_template,B as hash,L as hooks,k as matchers,P as nodes,N as root,F as server_loads};
@@ -0,0 +1 @@
1
+ import{a as e,n as t}from"../chunks/DvSrLZhO.js";export{e as load_css,t as start};
@@ -1 +1 @@
1
- import{A as e,M as t,O as n,Q as r,W as i,X as a,Z as o,ft as s,pt as c}from"../chunks/BvmBrUGQ.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/DiWSu9BA.js";var u=t(`<h1> </h1> <p> </p>`,1);function d(t,d){c(d,!0);var f=u(),p=a(f),m=o(p,!0),h=r(p,2),g=o(h,!0);i(()=>{n(m,l.status),n(g,l.error?.message)}),e(t,f),s()}export{d as component};
1
+ import{A as e,M as t,O as n,Q as r,W as i,X as a,Z as o,ft as s,pt as c}from"../chunks/BvmBrUGQ.js";import"../chunks/xihTtKlq.js";import{t as l}from"../chunks/CDCDXZ4W.js";var u=t(`<h1> </h1> <p> </p>`,1);function d(t,d){c(d,!0);var f=u(),p=a(f),m=o(p,!0),h=r(p,2),g=o(h,!0);i(()=>{n(m,l.status),n(g,l.error?.message)}),e(t,f),s()}export{d as component};
@@ -1,4 +1,4 @@
1
- import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,St as b,T as x,U as S,V as C,W as w,X as T,Y as E,Z as D,_ as O,_t as k,a as A,at as j,b as M,bt as N,c as ee,d as te,dt as ne,et as P,f as F,ft as I,g as L,h as re,i as R,it as z,j as B,k as ie,l as ae,m as oe,n as se,nt as ce,o as V,ot as H,p as le,pt as U,q as ue,rt as W,s as de,st as fe,tt as G,u as pe,vt as me,w as he,x as ge,xt as _e,y as ve,yt as K}from"../chunks/BvmBrUGQ.js";import"../chunks/xihTtKlq.js";import{C as ye,D as q,E as be,O as xe,S as Se,T as J,_ as Ce,b as we,c as Te,d as Ee,f as De,g as Oe,h as ke,i as Ae,j as je,k as Me,m as Ne,n as Pe,o as Fe,p as Ie,r as Le,t as Re,v as ze,w as Be,y as Ve}from"../chunks/B_0TmK76.js";import{a as He,c as Ue,d as We,f as Ge,i as Ke,l as qe,o as Je,r as Ye,s as Xe,u as Y}from"../chunks/Dq0ey8RK.js";import{t as Ze}from"../chunks/DiWSu9BA.js";import{a as X,i as Qe,n as $e,r as et,t as tt}from"../chunks/qZTzdLCS.js";var nt=Object.defineProperty,rt=(e,t,n)=>t in e?nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t,n)=>rt(e,typeof t==`symbol`?t:t+``,n),it=`https://docs.convex.dev/error#undefined-validator`;function at(e,t){let n=t===void 0?``:` for field "${t}"`;throw Error(`A validator is undefined${n} in ${e}. This is often caused by circular imports. See ${it} for details.`)}var ot=class{constructor({isOptional:e}){Z(this,`type`),Z(this,`fieldPaths`),Z(this,`isOptional`),Z(this,`isConvexValidator`),this.isOptional=e,this.isConvexValidator=!0}},st=class e extends ot{constructor({isOptional:e,tableName:t}){if(super({isOptional:e}),Z(this,`tableName`),Z(this,`kind`,`id`),typeof t!=`string`)throw Error(`v.id(tableName) requires a string`);this.tableName=t}get json(){return{type:`id`,tableName:this.tableName}}asOptional(){return new e({isOptional:`optional`,tableName:this.tableName})}},ct=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`float64`)}get json(){return{type:`number`}}asOptional(){return new e({isOptional:`optional`})}},lt=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`int64`)}get json(){return{type:`bigint`}}asOptional(){return new e({isOptional:`optional`})}},ut=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`commitTs`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},dt=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`boolean`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},ft=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`bytes`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},pt=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`string`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},mt=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`null`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},ht=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`any`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},gt=class e extends ot{constructor({isOptional:e,fields:t}){super({isOptional:e}),Z(this,`fields`),Z(this,`kind`,`object`),globalThis.Object.entries(t).forEach(([e,t])=>{if(t===void 0&&at(`v.object()`,e),!t.isConvexValidator)throw Error(`v.object() entries must be validators`)}),this.fields=t}get json(){return{type:this.kind,value:globalThis.Object.fromEntries(globalThis.Object.entries(this.fields).map(([e,t])=>[e,{fieldType:t.json,optional:t.isOptional===`optional`}]))}}asOptional(){return new e({isOptional:`optional`,fields:this.fields})}omit(...t){let n={...this.fields};for(let e of t)delete n[e];return new e({isOptional:this.isOptional,fields:n})}pick(...t){let n={};for(let e of t)n[e]=this.fields[e];return new e({isOptional:this.isOptional,fields:n})}partial(){let t={};for(let[e,n]of globalThis.Object.entries(this.fields))t[e]=n.asOptional();return new e({isOptional:this.isOptional,fields:t})}extend(t){return new e({isOptional:this.isOptional,fields:{...this.fields,...t}})}},_t=class e extends ot{constructor({isOptional:e,value:t}){if(super({isOptional:e}),Z(this,`value`),Z(this,`kind`,`literal`),typeof t!=`string`&&typeof t!=`boolean`&&typeof t!=`number`&&typeof t!=`bigint`)throw Error(`v.literal(value) must be a string, number, or boolean`);this.value=t}get json(){return{type:this.kind,value:Ge(this.value)}}asOptional(){return new e({isOptional:`optional`,value:this.value})}},vt=class e extends ot{constructor({isOptional:e,element:t}){super({isOptional:e}),Z(this,`element`),Z(this,`kind`,`array`),t===void 0&&at(`v.array()`),this.element=t}get json(){return{type:this.kind,value:this.element.json}}asOptional(){return new e({isOptional:`optional`,element:this.element})}},yt=class e extends ot{constructor({isOptional:e,key:t,value:n}){if(super({isOptional:e}),Z(this,`key`),Z(this,`value`),Z(this,`kind`,`record`),t===void 0&&at(`v.record()`,`key`),n===void 0&&at(`v.record()`,`value`),t.isOptional===`optional`)throw Error(`Record validator cannot have optional keys`);if(n.isOptional===`optional`)throw Error(`Record validator cannot have optional values`);if(!t.isConvexValidator||!n.isConvexValidator)throw Error(`Key and value of v.record() but be validators`);this.key=t,this.value=n}get json(){return{type:this.kind,keys:this.key.json,values:{fieldType:this.value.json,optional:!1}}}asOptional(){return new e({isOptional:`optional`,key:this.key,value:this.value})}},bt=class e extends ot{constructor({isOptional:e,members:t}){super({isOptional:e}),Z(this,`members`),Z(this,`kind`,`union`),t.forEach((e,t)=>{if(e===void 0&&at(`v.union()`,`member at index ${t}`),!e.isConvexValidator)throw Error(`All members of v.union() must be validators`)}),this.members=t}get json(){return{type:this.kind,value:this.members.map(e=>e.json)}}asOptional(){return new e({isOptional:`optional`,members:this.members})}},Q={id:e=>new st({isOptional:`required`,tableName:e}),null:()=>new mt({isOptional:`required`}),number:()=>new ct({isOptional:`required`}),float64:()=>new ct({isOptional:`required`}),bigint:()=>new lt({isOptional:`required`}),int64:()=>new lt({isOptional:`required`}),commitTs:()=>new ut({isOptional:`required`}),boolean:()=>new dt({isOptional:`required`}),string:()=>new pt({isOptional:`required`}),bytes:()=>new ft({isOptional:`required`}),literal:e=>new _t({isOptional:`required`,value:e}),array:e=>new vt({isOptional:`required`,element:e}),object:e=>new gt({isOptional:`required`,fields:e}),record:(e,t)=>new yt({isOptional:`required`,key:e,value:t}),union:(...e)=>new bt({isOptional:`required`,members:e}),any:()=>new ht({isOptional:`required`}),optional:e=>e.asOptional(),nullable:e=>Q.union(e,Q.null())},xt=class{state;config;listeners=new Set;pendingLoadMoreNumItems=null;constructor(e){this.config=e;let t=e.initialData!==void 0;this.state={results:t?e.initialData.page:[],status:t?e.initialData.isDone?`Exhausted`:`CanLoadMore`:`LoadingFirstPage`,isLoading:!t,error:void 0,loadMore:()=>!1,resetKey:0,argsKey:null,initialArgsKey:null,haveArgsEverChanged:!1}}getSnapshot(){return{results:this.state.results,status:this.state.status,isLoading:this.state.isLoading,error:this.state.error,loadMore:e=>this.loadMore(e),resetKey:this.state.resetKey}}loadMore(e){return this.state.status===`CanLoadMore`?this.state.loadMore(e)?!0:(this.pendingLoadMoreNumItems=e,this.state={...this.state,status:`LoadingMore`,isLoading:this.computeIsLoading(`LoadingMore`)},this.notify(),!0):!1}flushPendingLoadMore(){if(this.pendingLoadMoreNumItems!==null){if(this.state.status===`Exhausted`){this.pendingLoadMoreNumItems=null;return}this.state.status===`CanLoadMore`&&this.state.loadMore(this.pendingLoadMoreNumItems)&&(this.pendingLoadMoreNumItems=null,this.state={...this.state,status:`LoadingMore`,isLoading:this.computeIsLoading(`LoadingMore`)})}}getResetKey(){return this.state.resetKey}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}notify(){this.listeners.forEach(e=>e())}onArgsChange(e){return this.state.initialArgsKey===null&&e!==null&&(this.state.initialArgsKey=e),this.state.argsKey===e?{changed:!1,needsResubscribe:!1}:(this.state.argsKey=e,this.pendingLoadMoreNumItems=null,!this.state.haveArgsEverChanged&&this.state.initialArgsKey!==e&&(this.state.haveArgsEverChanged=!0),e===null?(this.state={...this.state,results:[],status:`LoadingFirstPage`,isLoading:!1,error:void 0,loadMore:()=>!1},this.notify(),{changed:!0,needsResubscribe:!1}):(this.state=!(this.config.keepPreviousData&&this.state.results.length>0)&&!this.isUsingInitialData()?{...this.state,results:[],status:`LoadingFirstPage`,isLoading:!0,error:void 0}:{...this.state,isLoading:!0,error:void 0},this.notify(),{changed:!0,needsResubscribe:!0}))}onUpdate(e){if(this.config.keepPreviousData&&this.state.results.length>0&&e.results.length===0&&e.status===`LoadingFirstPage`){this.state={...this.state,status:e.status,isLoading:!0,error:void 0,loadMore:e.loadMore},this.notify();return}if(this.isUsingInitialData()&&e.results.length===0&&e.status===`LoadingFirstPage`){this.state={...this.state,loadMore:e.loadMore,isLoading:!1},this.notify();return}this.state={...this.state,results:e.results,status:e.status,isLoading:this.computeIsLoading(e.status),error:void 0,loadMore:e.loadMore},this.flushPendingLoadMore(),this.notify()}onError(e){return this.isInvalidCursorError(e)?(console.warn(`PaginatedQueryStateMachine: InvalidCursor detected, resetting:`,e.message),this.pendingLoadMoreNumItems=null,this.state={...this.state,results:[],status:`LoadingFirstPage`,isLoading:!0,error:void 0,resetKey:this.state.resetKey+1},this.notify(),!0):(this.state={...this.state,error:e,isLoading:!1},this.notify(),!1)}reset(){this.pendingLoadMoreNumItems=null,this.state={...this.state,results:[],status:`LoadingFirstPage`,isLoading:!0,error:void 0,resetKey:this.state.resetKey+1},this.notify()}isUsingInitialData(){return this.config.initialData!==void 0&&!this.state.haveArgsEverChanged}getConfig(){return this.config}updateConfig(e){this.config={...this.config,...e}}computeIsLoading(e){return this.isUsingInitialData()?!1:e===`LoadingFirstPage`||e===`LoadingMore`}isInvalidCursorError(e){if(e.message.includes(`InvalidCursor`))return!0;if(`data`in e){let{data:t}=e;if(typeof t==`object`&&t&&`isConvexSystemError`in t&&`paginationError`in t&&t.isConvexSystemError===!0&&t.paginationError===`InvalidCursor`)return!0}return!1}};function St(e){return e===null?null:JSON.stringify(Ge(e))}function Ct(t,n={},r){let i=He();if(typeof t==`string`)throw Error(`Query must be a functionReference object, not a string`);let a=wt(r),o=new xt({initialNumItems:a.initialNumItems,initialData:a.initialData,keepPreviousData:a.keepPreviousData}),c=e({...o.getSnapshot()});return s(()=>o.subscribe(()=>{let e=o.getSnapshot();c.results=e.results,c.status=e.status,c.isLoading=e.isLoading,c.error=e.error,c.loadMore=e.loadMore,c.resetKey=e.resetKey})),s(()=>{c.resetKey;let e=qe(n),a=wt(r);o.updateConfig({initialNumItems:a.initialNumItems,keepPreviousData:a.keepPreviousData});let s=e===Y?null:St(e);if(o.onArgsChange(s),!Ue(i)||e===Y)return;let l=!1,u=i.onPaginatedUpdate_experimental(t,e,{initialNumItems:a.initialNumItems},()=>{l=!0;let e=u.getCurrentValue?.();e&&o.onUpdate({results:e.results,status:e.status,loadMore:t=>e.loadMore(t)})},e=>{l=!0,o.onError(e)});if(!l){let e=u.getCurrentValue?.();e&&o.onUpdate({results:e.results,status:e.status,loadMore:t=>e.loadMore(t)})}return()=>{u.unsubscribe()}}),{get results(){return c.results},get status(){return c.status},get isLoading(){return c.isLoading},get error(){return c.error},loadMore(e){return c.loadMore(e)}}}function wt(e){typeof e==`function`&&(e=e());let t=k(e);if(typeof t.initialNumItems!=`number`||t.initialNumItems<0)throw Error(`\`options.initialNumItems\` must be a positive number. Received \`${t.initialNumItems}\`.`);return t}var Tt=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Et=[`difference`,`intersection`,`symmetricDifference`,`union`],Dt=!1,Ot=class e extends Set{#e=new Map;#t=W(0);#n=W(0);#r=c||-1;constructor(e){if(super(),e){for(var t of e)super.add(t);this.#n.v=super.size}Dt||this.#a()}#i(e){return c===this.#r?W(e):ce(e)}#a(){Dt=!0;var t=e.prototype,n=Set.prototype;for(let e of Tt)t[e]=function(...t){return v(this.#t),n[e].apply(this,t)};for(let r of Et)t[r]=function(...t){v(this.#t);var i=n[r].apply(this,t);return new e(i)}}has(e){var t=super.has(e),n=this.#e,r=n.get(e);if(r===void 0){if(!t)return v(this.#t),!1;r=this.#i(!0),n.set(e,r)}return v(r),t}add(e){return super.has(e)||(super.add(e),G(this.#n,super.size),P(this.#t)),this}delete(e){var t=super.delete(e),n=this.#e,r=n.get(e);return r!==void 0&&(n.delete(e),G(r,!1)),t&&(G(this.#n,super.size),P(this.#t)),t}clear(){if(super.size!==0){super.clear();var e=this.#e;for(var t of e.values())G(t,!1);e.clear(),G(this.#n,0),P(this.#t)}}keys(){return this.values()}values(){return v(this.#t),super.values()}entries(){return v(this.#t),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return v(this.#n)}},kt=class extends Map{#e=new Map;#t=W(0);#n=W(0);#r=c||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return c===this.#r?W(e):ce(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else return v(this.#t),!1}return v(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else{v(this.#t);return}}return v(n),super.get(e)}getOrInsert(e,t){return super.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return super.has(e)||this.set(e,t(e)),this.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),G(this.#n,super.size),P(o);else if(i!==t){P(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&P(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),G(n,-1)),r&&(G(this.#n,super.size),P(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;G(this.#n,0);for(var t of e.values())G(t,-1);P(this.#t),e.clear()}}#a(){v(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)v(n)}keys(){return v(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return v(this.#n),super.size}},At=ie(e=>{let t=setInterval(e,1e3);return()=>clearInterval(t)});function jt(){return At(),Date.now()}function Mt(e,t){if(!(e===void 0||e<=0||t===void 0||!Number.isFinite(e)||!Number.isFinite(t)))return Math.max(0,Math.floor((t-e)/1e3))}var Nt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Pt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim();function Ft(e){return e!=null}function It(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Nt.width,a=e.size??e.height??Nt.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Pt(...c):Pt(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Nt[`stroke-width`])*Number(e.size??e.width??Nt.width)/Number(t.size??t.width??Nt.width):t.strokeWidth??Nt[`stroke-width`];return[`svg`,{...Object.entries(Nt).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Ft(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Ft(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Ft(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var Lt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Rt=Symbol(`lucide-context`),zt=()=>ne(Rt),Bt=new Set([`$$slots`,`$$events`,`$$legacy`,`color`,`size`,`width`,`height`,`strokeWidth`,`absoluteStrokeWidth`,`nonScalingStroke`,`iconNode`,`icon`,`class`,`children`]),Vt=m(`<svg><!><!></svg>`);function $(e,n){U(n,!0);let r=zt()??{},i=R(n,`color`,19,()=>r.color??`currentColor`),a=R(n,`size`,19,()=>r.size??24),o=R(n,`width`,19,a),s=R(n,`height`,19,a),c=R(n,`strokeWidth`,19,()=>r.strokeWidth??2),l=R(n,`absoluteStrokeWidth`,19,()=>r.absoluteStrokeWidth??!1),u=R(n,`nonScalingStroke`,19,()=>r.nonScalingStroke??!1),d=R(n,`iconNode`,19,()=>[]),f=R(n,`icon`,19,()=>({node:d(),aliases:[],size:24})),p=A(n,Bt),m=z(()=>!!n.children||Lt(p)),h=z(()=>It(f(),{color:i(),width:o(),height:s(),strokeWidth:c(),absoluteStrokeWidth:l(),nonScalingStroke:u(),className:Pt(`lucide-icon`,r.class),hasA11yProp:v(m),attributes:p})),g=z(()=>b(v(h),3)),S=z(()=>v(g)[1]),C=z(()=>N(v(g)[2],()=>[],!0)),w=z(()=>({...v(S),class:[...v(S).class.split(` `),n.class]}));var D=Vt();pe(D,()=>({...v(w)}));var O=E(D);he(O,17,()=>v(C),x,(e,n)=>{var r=z(()=>b(v(n),2));let i=()=>v(r)[0],a=()=>v(r)[1];var o=B(),s=T(o);M(s,i,!0,(e,t)=>{pe(e,()=>({...a()}))}),t(e,o)});var k=_(O);y(k,()=>n.children??_e),K(D),t(e,D),I()}var Ht=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ut(e,t){let n=A(t,Ht),r={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Wt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gt(e,t){let n=A(t,Wt),r={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Kt=new Set([`$$slots`,`$$events`,`$$legacy`]);function qt(e,t){let n=A(t,Kt),r={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Jt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Yt(e,t){let n=A(t,Jt),r={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Xt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zt(e,t){let n=A(t,Xt),r={name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Qt=new Set([`$$slots`,`$$events`,`$$legacy`]);function $t(e,t){let n=A(t,Qt),r={name:`chart-no-axes-column`,size:24,node:[[`path`,{d:`M5 21v-6`}],[`path`,{d:`M12 21V3`}],[`path`,{d:`M19 21V9`}]],aliases:[`bar-chart-2`]};$(e,V(()=>n,{get icon(){return r}}))}var en=new Set([`$$slots`,`$$events`,`$$legacy`]);function tn(e,t){let n=A(t,en),r={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var nn=new Set([`$$slots`,`$$events`,`$$legacy`]);function rn(e,t){let n=A(t,nn),r={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var an=new Set([`$$slots`,`$$events`,`$$legacy`]);function on(e,t){let n=A(t,an),r={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var sn=new Set([`$$slots`,`$$events`,`$$legacy`]);function cn(e,t){let n=A(t,sn),r={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]],aliases:[`alert-circle`]};$(e,V(()=>n,{get icon(){return r}}))}var ln=new Set([`$$slots`,`$$events`,`$$legacy`]);function un(e,t){let n=A(t,ln),r={name:`circle-dollar-sign`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`}],[`path`,{d:`M12 18V6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var dn=new Set([`$$slots`,`$$events`,`$$legacy`]);function fn(e,t){let n=A(t,dn),r={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]],aliases:[`help-circle`,`circle-help`]};$(e,V(()=>n,{get icon(){return r}}))}var pn=new Set([`$$slots`,`$$events`,`$$legacy`]);function mn(e,t){let n=A(t,pn),r={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]],aliases:[`code-2`]};$(e,V(()=>n,{get icon(){return r}}))}var hn=new Set([`$$slots`,`$$events`,`$$legacy`]);function gn(e,t){let n=A(t,hn),r={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]]};$(e,V(()=>n,{get icon(){return r}}))}var _n=new Set([`$$slots`,`$$events`,`$$legacy`]);function vn(e,t){let n=A(t,_n),r={name:`credit-card`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`}],[`path`,{d:`M6 14h2`}]]};$(e,V(()=>n,{get icon(){return r}}))}var yn=new Set([`$$slots`,`$$events`,`$$legacy`]);function bn(e,t){let n=A(t,yn),r={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var xn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sn(e,t){let n=A(t,xn),r={name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`}],[`path`,{d:`m15 9 6-6`}],[`path`,{d:`M21 16v5h-5`}],[`path`,{d:`M21 8V3h-5`}],[`path`,{d:`M3 16v5h5`}],[`path`,{d:`m3 21 6-6`}],[`path`,{d:`M3 8V3h5`}],[`path`,{d:`M9 9 3 3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Cn=new Set([`$$slots`,`$$events`,`$$legacy`]);function wn(e,t){let n=A(t,Cn),r={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Tn=new Set([`$$slots`,`$$events`,`$$legacy`]);function En(e,t){let n=A(t,Tn),r={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Dn=new Set([`$$slots`,`$$events`,`$$legacy`]);function On(e,t){let n=A(t,Dn),r={name:`file-code`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 12.5 8 15l2 2.5`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var kn=new Set([`$$slots`,`$$events`,`$$legacy`]);function An(e,t){let n=A(t,kn),r={name:`file-diff`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M9 10h6`}],[`path`,{d:`M12 13V7`}],[`path`,{d:`M9 17h6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var jn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mn(e,t){let n=A(t,jn),r={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Nn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pn(e,t){let n=A(t,Nn),r={name:`folder-plus`,size:24,node:[[`path`,{d:`M12 10v6`}],[`path`,{d:`M9 13h6`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Fn=new Set([`$$slots`,`$$events`,`$$legacy`]);function In(e,t){let n=A(t,Fn),r={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Ln=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rn(e,t){let n=A(t,Ln),r={name:`fullscreen`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}],[`rect`,{width:`10`,height:`8`,x:`7`,y:`8`,rx:`1`}]]};$(e,V(()=>n,{get icon(){return r}}))}var zn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bn(e,t){let n=A(t,zn),r={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`}],[`path`,{d:`M2 12h20`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Vn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hn(e,t){let n=A(t,Vn),r={name:`hourglass`,size:24,node:[[`path`,{d:`M5 22h14`}],[`path`,{d:`M5 2h14`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Un=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wn(e,t){let n=A(t,Un),r={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`}],[`path`,{d:`M13 12h8`}],[`path`,{d:`M13 19h8`}],[`path`,{d:`m3 17 2 2 4-4`}],[`path`,{d:`m3 7 2 2 4-4`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Gn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kn(e,t){let n=A(t,Gn),r={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]],aliases:[`loader-2`]};$(e,V(()=>n,{get icon(){return r}}))}var qn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jn(e,t){let n=A(t,qn),r={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Yn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xn(e,t){let n=A(t,Yn),r={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Zn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qn(e,t){let n=A(t,Zn),r={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]]};$(e,V(()=>n,{get icon(){return r}}))}var $n=new Set([`$$slots`,`$$events`,`$$legacy`]);function er(e,t){let n=A(t,$n),r={name:`notebook-pen`,size:24,node:[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`}],[`path`,{d:`M2 6h4`}],[`path`,{d:`M2 10h4`}],[`path`,{d:`M2 14h4`}],[`path`,{d:`M2 18h4`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var tr=new Set([`$$slots`,`$$events`,`$$legacy`]);function nr(e,t){let n=A(t,tr),r={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]],aliases:[`sidebar`]};$(e,V(()=>n,{get icon(){return r}}))}var rr=new Set([`$$slots`,`$$events`,`$$legacy`]);function ir(e,t){let n=A(t,rr),r={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]]};$(e,V(()=>n,{get icon(){return r}}))}var ar=new Set([`$$slots`,`$$events`,`$$legacy`]);function or(e,t){let n=A(t,ar),r={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`}]]};$(e,V(()=>n,{get icon(){return r}}))}var sr=new Set([`$$slots`,`$$events`,`$$legacy`]);function cr(e,t){let n=A(t,sr),r={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var lr=new Set([`$$slots`,`$$events`,`$$legacy`]);function ur(e,t){let n=A(t,lr),r={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var dr=new Set([`$$slots`,`$$events`,`$$legacy`]);function fr(e,t){let n=A(t,dr),r={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`}]]};$(e,V(()=>n,{get icon(){return r}}))}var pr=new Set([`$$slots`,`$$events`,`$$legacy`]);function mr(e,t){let n=A(t,pr),r={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`}],[`path`,{d:`M15 8h-5`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var hr=new Set([`$$slots`,`$$events`,`$$legacy`]);function gr(e,t){let n=A(t,hr),r={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]]};$(e,V(()=>n,{get icon(){return r}}))}var _r=new Set([`$$slots`,`$$events`,`$$legacy`]);function vr(e,t){let n=A(t,_r),r={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var yr=new Set([`$$slots`,`$$events`,`$$legacy`]);function br(e,t){let n=A(t,yr),r={name:`shrink`,size:24,node:[[`path`,{d:`m15 15 6 6m-6-6v4.8m0-4.8h4.8`}],[`path`,{d:`M9 19.8V15m0 0H4.2M9 15l-6 6`}],[`path`,{d:`M15 4.2V9m0 0h4.8M15 9l6-6`}],[`path`,{d:`M9 4.2V9m0 0H4.2M9 9 3 3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var xr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sr(e,t){let n=A(t,xr),r={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`}]],aliases:[`pen-box`,`edit`,`pen-square`]};$(e,V(()=>n,{get icon(){return r}}))}var Cr=new Set([`$$slots`,`$$events`,`$$legacy`]);function wr(e,t){let n=A(t,Cr),r={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`}],[`path`,{d:`M11 13h4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}]],aliases:[`terminal-square`]};$(e,V(()=>n,{get icon(){return r}}))}var Tr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Er(e,t){let n=A(t,Tr),r={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Dr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Or(e,t){let n=A(t,Dr),r={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]]};$(e,V(()=>n,{get icon(){return r}}))}var kr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ar(e,t){let n=A(t,kr),r={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var jr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mr(e,t){let n=A(t,jr),r={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`}]],aliases:[`user-2`]};$(e,V(()=>n,{get icon(){return r}}))}var Nr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pr(e,t){let n=A(t,Nr),r={name:`wallet`,size:24,node:[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Fr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ir(e,t){let n=A(t,Fr),r={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Lr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rr(e,t){let n=A(t,Lr),r={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]]};$(e,V(()=>n,{get icon(){return r}}))}var zr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Br(e,t){let n=A(t,zr),r={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Vr=p(`<a><!></a>`),Hr=p(`<button><!></button>`);function Ur(e,n){U(n,!0);let r=R(n,`type`,3,`button`),a=R(n,`variant`,3,`default`),o=R(n,`className`,3,``),s=R(n,`disabled`,3,!1),c=z(()=>a()===`outline`?`border-border bg-surface/80 text-foreground hover:bg-hover-fill`:`bg-primary text-primary-foreground hover:opacity-90`),u=z(()=>X(`focus-visible:ring-ring/50 inline-flex h-10 items-center justify-center gap-2 rounded-full border border-transparent px-5 py-2 text-sm font-medium transition-opacity focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,v(c),o()));var d=B(),f=T(d),p=e=>{var r=Vr(),i=E(r);y(i,()=>n.children??_e),K(r),w(()=>{F(r,`href`,n.href),L(r,1,O(v(u)))}),l(`click`,r,function(...e){n.onclick?.apply(this,e)}),t(e,r)},m=e=>{var i=Hr(),a=E(i);y(a,()=>n.children??_e),K(i),w(()=>{F(i,`type`,r()),i.disabled=s(),L(i,1,O(v(u)))}),l(`click`,i,function(...e){n.onclick?.apply(this,e)}),t(e,i)};i(f,e=>{n.href&&!s()?e(p):e(m,-1)}),t(e,d),I()}o([`click`]);var Wr=p(`<!> <!>`,1),Gr=p(`<p class="text-destructive text-center text-sm" role="alert"> </p>`),Kr=p(`<div class="text-muted-foreground flex items-center justify-center gap-2 text-sm" aria-live="polite" aria-busy="true"><!> <span> </span></div>`),qr=p(`<div><!></div>`);function Jr(e,n){U(n,!0);let r=R(n,`overlayOpen`,3,!1),a=R(n,`retryLabel`,3,`Retry`),o=z(()=>n.authState.isAuthenticated&&(n.authState.isLoading||!n.authState.connectionFailed)),s=z(()=>!n.authState.isAuthenticated&&n.authState.isLoading),c=z(()=>n.authState.isConfigured?v(o)?`Confirming your session`:n.authState.connectionFailed?`Couldn’t connect your account`:v(s)?`Preparing sign-in`:`Sign in to continue`:`Sign-in unavailable`),l=z(()=>n.authState.isConfigured?v(o)?`Verifying your secure connection before opening your projects.`:n.authState.connectionFailed?`Your session could not be confirmed. Retry when the connection is available.`:v(s)?`Getting account sign-in ready. This usually takes a moment.`:`Sign in to sync your coding threads, streaming responses, and projects.`:`Account sign-in is not configured on this deployment, so account actions are disabled.`),u=z(()=>n.authState.isAuthenticated?`Almost there`:`One moment`),d=z(()=>!!(n.authState.isConfigured&&n.authState.error&&!r()));var f=qr(),p=E(f);tt(p,{get title(){return v(c)},get description(){return v(l)},actions:e=>{var r=Wr(),o=T(r),s=e=>{Ur(e,{get onclick(){return n.onRetry},get disabled(){return n.authState.isLoading},children:(e,n)=>{me();var r=g();w(()=>h(r,a())),t(e,r)},$$slots:{default:!0}})};i(o,e=>{n.authState.connectionFailed&&n.authState.isConfigured&&e(s)});var c=_(o,2),l=e=>{Ur(e,{variant:`outline`,get onclick(){return n.onSignOut},children:(e,n)=>{me();var r=g(`Sign Out`);t(e,r)},$$slots:{default:!0}})},u=e=>{var r=Wr(),i=T(r);Ur(i,{get onclick(){return n.onSignIn},get disabled(){return n.authState.isLoading},children:(e,n)=>{me();var r=g(`Sign In`);t(e,r)},$$slots:{default:!0}}),Ur(_(i,2),{variant:`outline`,get onclick(){return n.onSignUp},get disabled(){return n.authState.isLoading},children:(e,n)=>{me();var r=g(`Create Account`);t(e,r)},$$slots:{default:!0}}),t(e,r)};i(c,e=>{n.authState.isAuthenticated?e(l):n.authState.isConfigured&&!n.authState.connectionFailed&&e(u,1)}),t(e,r)},children:(e,r)=>{var a=Wr(),o=T(a),s=e=>{var r=Gr(),i=D(r,!0);w(()=>h(i,n.authState.error)),t(e,r)};i(o,e=>{v(d)&&e(s)});var c=_(o,2),l=e=>{var n=Kr(),r=E(n);Kn(r,{class:`size-3.5 animate-spin`,"aria-hidden":`true`});var i=_(r,2),a=D(i,!0);K(n),w(()=>h(a,v(u))),t(e,n)};i(c,e=>{n.authState.isLoading&&e(l)}),t(e,a)},$$slots:{actions:!0,default:!0}}),K(f),w(()=>{f.inert=r(),F(f,`aria-hidden`,r()?!0:void 0)}),t(e,f),I()}var Yr=p(`<div class="text-muted-foreground mb-4 flex justify-center" aria-hidden="true"><!></div>`),Xr=p(`<p class="text-muted-foreground mt-6 max-h-24 overflow-y-auto font-mono text-[11px] leading-5 break-all select-all"> </p>`),Zr=p(`<p class="text-destructive mt-4 text-sm" role="alert"> </p>`),Qr=p(`<p class="mt-4 text-sm text-amber-700" role="alert"> </p>`),$r=p(`<!> Open browser`,1),ei=p(`<!> Copied`,1),ti=p(`<!> Copy link`,1),ni=p(`<!> <!>`,1),ri=p(`<span class="text-muted-foreground border-border inline-flex h-10 items-center justify-center gap-2 rounded-full border px-4 text-sm">Preparing link…</span>`),ii=p(`<div class="app-entry-shell fixed inset-0 z-50 flex items-center justify-center px-6" role="presentation"><div class="border-border/70 bg-surface relative z-10 w-full max-w-md rounded-2xl border p-8 text-center shadow-[0_18px_50px_-28px_oklch(0.2_0.02_260/0.45)] outline-none" role="dialog" aria-modal="true" aria-labelledby="browser-signin-title" aria-describedby="browser-signin-desc" tabindex="-1"><!> <h2 id="browser-signin-title" class="font-brand text-foreground text-[1.35rem] font-semibold tracking-tight"> </h2> <p id="browser-signin-desc" class="text-muted-foreground mt-3 text-sm leading-[1.55]"> </p> <!> <!> <!> <div class="mt-6 flex flex-wrap items-center justify-center gap-3"><!></div> <div class="mt-6"><button type="button" class="text-muted-foreground hover:text-foreground decoration-foreground/30 hover:decoration-foreground text-[13px] underline underline-offset-4 transition-colors">Cancel</button></div></div></div>`);function ai(e,r){U(r,!0);let a=R(r,`error`,3,null),o=W(!1),c=W(null),u=W(null),d=null;s(()=>{if(!r.open){G(o,!1),G(c,null);return}let e=document.activeElement instanceof HTMLElement?document.activeElement:null,t=!1;n().then(()=>{t||v(u)?.focus()});function i(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),r.onCancel();return}if(e.key!==`Tab`||!v(u))return;let t=Array.from(v(u).querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`hidden`)&&e.offsetParent!==null);if(t.length===0){e.preventDefault(),v(u).focus();return}let n=t[0],i=t[t.length-1],a=document.activeElement;e.shiftKey&&(a===v(u)||a===n||!v(u).contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===v(u)||a===i||!v(u).contains(a))&&(e.preventDefault(),n.focus())}return window.addEventListener(`keydown`,i,!0),()=>{t=!0,window.removeEventListener(`keydown`,i,!0),d!==null&&(window.clearTimeout(d),d=null),e?.isConnected&&e.focus()}});async function f(){if(r.signInUrl)try{await navigator.clipboard.writeText(r.signInUrl),G(o,!0),G(c,null),d!==null&&window.clearTimeout(d),d=window.setTimeout(()=>{G(o,!1),d=null},2e3)}catch{G(o,!1),G(c,`Could not copy the sign-in link. Select it above and copy manually.`)}}function p(){if(!r.signInUrl)return;let e=window.open(r.signInUrl,`_blank`);if(e){try{e.opener=null}catch{}r.onClearOpenError?.()}}let m=z(()=>r.signInUrl?a()?{title:`Open the sign-in link`,description:`Your browser didn’t open automatically. Continue with the options below.`}:{title:`Finish signing in`,description:`We opened your browser to complete sign-in. Waiting for you to finish there.`}:{title:`Preparing sign-in`,description:`Preparing a secure sign-in link. This usually takes a moment.`});var g=B(),y=T(g),b=e=>{var n=ii(),s=E(n),d=E(s),g=e=>{var n=Yr();Kn(E(n),{class:`size-5 animate-spin`}),K(n),t(e,n)};i(d,e=>{r.signInUrl||e(g)});var y=_(d,2),b=D(y,!0),x=_(y,2),S=D(x,!0),C=_(x,2),O=e=>{var n=Xr(),i=D(n,!0);w(()=>{F(n,`title`,r.signInUrl),h(i,r.signInUrl)}),t(e,n)};i(C,e=>{r.signInUrl&&e(O)});var k=_(C,2),A=e=>{var n=Zr(),r=D(n,!0);w(()=>h(r,a())),t(e,n)};i(k,e=>{a()&&e(A)});var j=_(k,2),M=e=>{var n=Qr(),r=D(n,!0);w(()=>h(r,v(c))),t(e,n)};i(j,e=>{v(c)&&e(M)});var N=_(j,2),te=E(N),ne=e=>{var n=ni(),r=T(n);Ur(r,{onclick:p,children:(e,n)=>{var r=$r();wn(T(r),{class:`size-4`,"aria-hidden":`true`}),me(),t(e,r)},$$slots:{default:!0}}),Ur(_(r,2),{variant:`outline`,onclick:()=>void f(),children:(e,n)=>{var r=B(),a=T(r),s=e=>{var n=ei();tn(T(n),{class:`size-4`,"aria-hidden":`true`}),me(),t(e,n)},c=e=>{var n=ti();gn(T(n),{class:`size-4`,"aria-hidden":`true`}),me(),t(e,n)};i(a,e=>{v(o)?e(s):e(c,-1)}),t(e,r)},$$slots:{default:!0}}),t(e,n)},P=e=>{var n=ri();t(e,n)};i(te,e=>{r.signInUrl?e(ne):e(P,-1)}),K(N);var I=_(N,2),L=D(I);K(s),ee(s,e=>G(u,e),()=>v(u)),K(n),w(()=>{h(b,v(m).title),h(S,v(m).description)}),l(`click`,n,e=>{e.target===e.currentTarget&&r.onCancel()}),l(`click`,L,function(...e){r.onCancel?.apply(this,e)}),t(e,n)};i(y,e=>{r.open&&e(b)}),t(e,g),I()}o([`click`]);function oi(){let e=W(null),t=W(!1),n=null;function r(){n&&=(clearTimeout(n),null)}function i(i,a,o=!1){let s=i.currentTarget;if(!(s instanceof HTMLElement))return;let c=s.getBoundingClientRect();r(),G(t,o,!0),G(e,{top:c.top-8,left:c.left+c.width/2,label:a},!0),o&&(n=setTimeout(()=>{G(t,!1),n=null,G(e,null)},2500))}function a(n=!1){(!v(t)||n)&&(r(),G(t,!1),G(e,null))}return s(()=>r),{get lockTooltip(){return v(e)},showLockTooltip:i,hideLockTooltip:a}}function si(e){function t(t){let n=t.target;n instanceof Node&&(e.getRoot()?.contains(n)||e.onOutside())}function n(t){t.key===`Escape`&&e.onEscape()}return document.addEventListener(`pointerdown`,t),document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`pointerdown`,t),document.removeEventListener(`keydown`,n)}}var ci=p(`<div class="text-tooltip-foreground bg-tooltip ring-border pointer-events-none fixed z-100 -translate-x-1/2 -translate-y-full rounded-md px-2.5 py-1.5 text-[12px] leading-4 whitespace-nowrap shadow-lg ring-1" role="tooltip"> </div>`);function li(e,n){U(n,!0);var r=B(),a=T(r),o=e=>{var r=ci(),i=D(r,!0);w(()=>{re(r,`top: ${n.tooltip.top}px; left: ${n.tooltip.left}px;`),h(i,n.tooltip.label)}),t(e,r)};i(a,e=>{n.tooltip&&e(o)}),t(e,r),I()}var ui=p(`<label class="text-muted-foreground flex h-10 items-center gap-2 border-b border-[var(--hairline)] px-2"><!> <span class="sr-only"> </span> <input class="text-foreground placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none"/></label>`),di=p(`<p class="text-muted-foreground px-3 pt-1 pb-2 text-[11px] font-medium"> </p>`),fi=p(`<span><!></span>`),pi=p(`<span class="text-muted-foreground shrink-0" aria-hidden="true"><!></span>`),mi=p(`<button type="button"><!> <span> </span> <!></button>`),hi=p(`<p class="text-muted-foreground px-3 py-5 text-center text-sm">No matches found</p>`),gi=p(`<div class="bg-popover/96 absolute bottom-[calc(100%+0.75rem)] left-0 z-50 min-w-[19rem] rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl" role="dialog"><!> <div><!> <!></div></div>`),_i=p(`<div><button type="button" aria-haspopup="dialog"><!> <span class="truncate"> </span> <!></button> <!></div> <!>`,1);function vi(e,n){U(n,!0);let r=R(n,`value`,15,``),a=R(n,`disabled`,3,!1),o=R(n,`className`,3,``),c=R(n,`triggerClassName`,3,``),u=R(n,`searchable`,3,!1),d=W(!1),p=W(``),m=W(null),g=W(null),b=W(null),x=oi(),S=z(()=>{let e=n.options.find(e=>e.id===r());return e&&!e.locked?e:n.options.find(e=>!e.locked)??e??n.options[0]??null}),C=z(()=>u()&&v(p).trim()?n.options.filter(e=>e.label.toLocaleLowerCase().includes(v(p).trim().toLocaleLowerCase())):n.options),k=z(()=>v(C).filter(e=>!e.locked));function A(){a()||(G(d,!v(d)),v(d)&&u()?queueMicrotask(()=>v(b)?.focus()):G(p,``))}function j(e,t){let i=n.options.find(t=>t.id===e);if(i){if(i.locked){t&&i.lockTooltip&&x.showLockTooltip(t,i.lockTooltip,!0);return}e!==r()&&(r(e),n.onValueChange?.(e)),G(d,!1),G(p,``),x.hideLockTooltip(!0),v(g)?.focus()}}function M(e){e.key===`Enter`&&v(k).length!==0&&(e.preventDefault(),j(v(k)[0].id))}s(()=>{if(!v(d)){G(p,``),x.hideLockTooltip();return}return si({getRoot:()=>v(m),onOutside:()=>{G(d,!1)},onEscape:()=>{G(d,!1),v(g)?.focus()}})}),s(()=>{a()&&G(d,!1)});var N=_i(),ne=T(N),P=E(ne),re=E(P),ie=e=>{var r=B(),i=T(r);y(i,()=>n.optionIcon,()=>v(S)),t(e,r)};i(re,e=>{n.optionIcon&&v(S)&&e(ie)});var oe=_(re,2),se=D(oe,!0),ce=_(oe,2);{let e=z(()=>X(`text-muted-foreground size-3 shrink-0 transition-transform`,v(d)&&`rotate-180`));rn(ce,{get class(){return v(e)}})}K(P),ee(P,e=>G(g,e),()=>v(g));var V=_(P,2),H=e=>{var a=gi(),o=E(a),s=e=>{var r=ui(),i=E(r);gr(i,{class:`size-4 shrink-0`});var a=_(i,2),o=D(a),s=_(a,2);te(s),ee(s,e=>G(b,e),()=>v(b)),K(r),w((e,t)=>{h(o,`Search ${e??``}`),F(s,`placeholder`,t)},[()=>n.menuTitle.toLocaleLowerCase(),()=>`Search ${n.menuTitle.toLocaleLowerCase()}…`]),l(`keydown`,s,M),ae(s,()=>v(p),e=>G(p,e)),t(e,r)},c=e=>{var r=di(),i=D(r,!0);w(()=>h(i,n.menuTitle)),t(e,r)};i(o,e=>{u()?e(s):e(c,-1)});var d=_(o,2),m=E(d);he(m,17,()=>v(C),e=>e.id,(e,a)=>{let o=z(()=>!!v(a).locked);var s=mi(),c=E(s),u=e=>{var r=fi(),i=E(r);y(i,()=>n.optionIcon,()=>v(a)),K(r),w(e=>L(r,1,e),[()=>O(X(`flex size-7 shrink-0 items-center justify-center`,(v(o),`text-muted-foreground`)))]),t(e,r)};i(c,e=>{n.optionIcon&&e(u)});var d=_(c,2),p=D(d,!0),m=_(d,2),g=e=>{var n=pi();Jn(E(n),{class:`size-3.5`}),K(n),t(e,n)},b=e=>{{let t=z(()=>X(`text-accent-strong size-4 shrink-0 transition-opacity`,v(a).id===r()?`opacity-100`:`opacity-0`));tn(e,{get class(){return v(t)}})}};i(m,e=>{v(o)?e(g):e(b,-1)}),K(s),w((e,t)=>{L(s,1,e),F(s,`aria-pressed`,!v(o)&&v(a).id===r()),F(s,`aria-disabled`,v(o)),F(s,`aria-label`,v(o)&&v(a).lockTooltip?`${v(a).label}. ${v(a).lockTooltip}`:void 0),L(d,1,t),h(p,v(a).label)},[()=>O(X(`focus-visible:ring-ring/60 flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left outline-none focus-visible:ring-2`,v(o)?`cursor-not-allowed opacity-45`:`hover:bg-hover-fill`,!v(o)&&v(a).id===r()&&`bg-hover-fill`)),()=>O(X(`min-w-0 flex-1 truncate text-sm font-medium`,v(o)?`text-muted-foreground`:`text-foreground`))]),f(`mouseenter`,s,e=>{v(o)&&v(a).lockTooltip&&x.showLockTooltip(e,v(a).lockTooltip)}),f(`mouseleave`,s,()=>x.hideLockTooltip()),f(`focus`,s,e=>{v(o)&&v(a).lockTooltip&&x.showLockTooltip(e,v(a).lockTooltip)}),f(`blur`,s,()=>x.hideLockTooltip()),l(`click`,s,e=>{j(v(a).id,e)}),t(e,s)});var g=_(m,2),S=e=>{var n=hi();t(e,n)};i(g,e=>{v(C).length===0&&e(S)}),K(d),K(a),w(e=>{F(a,`aria-label`,n.menuTitle),L(d,1,e)},[()=>O(X(`space-y-0.5`,u()&&`pt-1.5`))]),t(e,a)};i(V,e=>{v(d)&&e(H)}),K(ne),ee(ne,e=>G(m,e),()=>v(m)),li(_(ne,2),{get tooltip(){return x.lockTooltip}}),w((e,t)=>{L(ne,1,e),L(P,1,t),F(P,`aria-expanded`,v(d)),F(P,`aria-label`,n.ariaLabel),P.disabled=a(),h(se,v(S)?.triggerLabel??v(S)?.label??r())},[()=>O(X(`relative`,o())),()=>O(X(`focus-visible:ring-ring/60 text-muted-foreground hover:bg-hover-fill inline-flex h-8 shrink-0 items-center gap-2 rounded-lg border border-transparent bg-transparent px-2 text-sm font-medium transition outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50`,!n.optionIcon&&`gap-1`,c()))]),l(`click`,P,A),t(e,N),I()}o([`click`,`keydown`]);var yi=m(`<title> </title>`),bi=m(`<svg viewBox="146.694 227.042 267.198 264.812" xmlns="http://www.w3.org/2000/svg" role="img" fill="none"><!><path d="M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z" fill="currentColor"></path></svg>`);function xi(e,n){U(n,!0);let r=R(n,`className`,3,``),a=R(n,`title`,3,`OpenAI`);var o=bi(),s=E(o),c=e=>{var n=yi(),r=D(n,!0);w(()=>h(r,a())),t(e,n)};i(s,e=>{a()&&e(c)}),me(),K(o),w(e=>{L(o,0,e),F(o,`aria-hidden`,!a()||void 0)},[()=>O(X(`size-4`,r()))]),t(e,o),I()}var Si=m(`<svg viewBox="0 0 24 24" role="img" aria-label="Anthropic" fill="currentColor"><path d="M17.304 3.541h-3.672l6.696 16.918H24Zm-10.608 0L0 20.459h3.744l1.37-3.553h7.005l1.369 3.553h3.744L10.536 3.541Zm-.371 10.223 2.291-5.945 2.292 5.945Z"></path></svg>`),Ci=m(`<svg viewBox="0 0 24 24" role="img" aria-label="xAI" fill="currentColor"><path d="M6.469 8.776 16.512 23h-4.464L2.005 8.776H6.47Zm-.004 7.9 2.233 3.164L6.467 23H2l4.465-6.324ZM22 2.582V23h-3.659V7.764L22 2.582ZM22 1l-9.952 14.095-2.233-3.163L17.533 1H22Z"></path></svg>`),wi=m(`<svg viewBox="0 0 24 24" role="img" aria-label="Z.AI" fill="currentColor"><path d="M12.606 1.806l-1.677 2.388c-0.258 0.374-0.697 0.606-1.161 0.606h-9.162V1.794C0.594 1.806 12.606 1.806 12.606 1.806zM24 1.806L9.6 22.206 0 22.206 14.4 1.806zM11.394 22.206l1.69-2.4c0.258-0.374 0.697-0.606 1.161-0.606h9.149v3.006H11.394z"></path></svg>`),Ti=m(`<svg viewBox="0 0 24 24" role="img" aria-label="DeepSeek" fill="currentColor"><path d="M23.748 4.651c-.254-.124-.364.113-.512.233-.051.04-.094.09-.137.137-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.155-.708-.311-.955-.65-.172-.24-.219-.509-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.094.172.187.129.323-.082.28-.18.553-.266.833-.055.179-.137.218-.328.14a5.5 5.5 0 0 1-1.737-1.179c-.857-.828-1.631-1.743-2.597-2.46a12 12 0 0 0-.689-.47c-.985-.957.13-1.743.387-1.836.27-.098.094-.433-.778-.428-.872.003-1.67.295-2.687.685a3 3 0 0 1-.465.136 9.6 9.6 0 0 0-2.883-.101c-1.885.21-3.39 1.1-4.497 2.622C.082 8.776-.231 10.854.152 13.02c.403 2.284 1.568 4.175 3.36 5.653 1.857 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.132-.284 4.994-1.86.47.234.962.328 1.78.398.629.058 1.235-.031 1.705-.129.735-.155.684-.836.418-.961-2.155-1.004-1.682-.595-2.112-.926 1.095-1.295 2.768-3.598 3.284-6.733.05-.346.115-.834.108-1.114-.004-.171.035-.238.23-.257a4.2 4.2 0 0 0 1.545-.475c1.397-.763 1.96-2.016 2.093-3.517.02-.23-.004-.467-.247-.588M11.58 18.168c-2.088-1.642-3.101-2.183-3.52-2.16-.39.024-.32.472-.234.763.09.288.207.487.371.74.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.168-1.361-.801-2.5-1.86-3.301-3.306-.775-1.393-1.225-2.888-1.299-4.482-.02-.385.094-.522.477-.592a4.7 4.7 0 0 1 1.53-.038c2.131.311 3.946 1.264 5.467 2.774.868.86 1.525 1.887 2.202 2.89.72 1.066 1.494 2.082 2.48 2.915.348.291.626.513.892.677-.802.09-2.14.109-3.055-.615zm1.001-6.44a.306.306 0 0 1 .415-.287.3.3 0 0 1 .113.074.3.3 0 0 1 .086.214c0 .17-.136.307-.308.307a.303.303 0 0 1-.306-.307m3.11 1.596c-.2.081-.4.151-.591.16a1.25 1.25 0 0 1-.798-.254c-.274-.23-.47-.358-.551-.758a1.7 1.7 0 0 1 .015-.588c.07-.327-.007-.537-.238-.727-.188-.156-.426-.199-.689-.199a.6.6 0 0 1-.254-.078.253.253 0 0 1-.114-.358 1 1 0 0 1 .192-.21c.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.392.451.462.576.685.915.176.264.336.536.446.848.066.194-.02.353-.25.45"></path></svg>`),Ei=m(`<svg viewBox="0 0 465 465" role="img" aria-label="Moonshot AI" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M418.766 93.78C388.626 53.17 345.086 22.07 292.446 7.97C239.806 -6.13 186.536 -0.97 140.136 19.13L418.766 93.78ZM40.7758 100.85C61.3758 70.84 88.5858 46.43 119.776 29.15L325.036 84.15C311.566 91.92 297.136 105.31 285.966 120.03L454.736 165.25C459.526 181.08 462.646 197.49 463.956 214.24L40.7758 100.85ZM456.686 292.45C454.306 301.35 451.436 309.99 448.116 318.34L2.44584 198.93C3.74584 190.03 5.58584 181.12 7.96584 172.22C13.5658 151.31 21.8458 131.84 32.3458 114.08L250.436 172.52C241.706 185 233.756 198.56 226.756 213.07L460.516 275.71C459.446 281.3 458.166 286.88 456.676 292.47L456.686 292.45ZM13.4858 310.23C2.67584 279.96 -1.93416 247.22 0.745843 213.95L206.426 269.06C204.946 273.74 203.556 278.48 202.266 283.29C199.646 293.08 197.506 302.85 195.846 312.55L417.946 372.06C407.606 385.79 395.826 398.23 382.896 409.21L13.4858 310.23ZM172.206 456.69C102.096 437.9 48.1158 388.98 20.4758 327.59L187.846 372.44C187.576 388.05 188.546 403.26 190.676 417.85L312.286 450.43C268.876 466.39 220.286 469.57 172.206 456.69Z"></path></svg>`),Di=m(`<svg viewBox="0 0 24 24" role="img" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="9"></circle><path d="M12 8v4l2.5 1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`);function Oi(e,n){U(n,!0);let r=R(n,`className`,3,``);var a=B(),o=T(a),s=e=>{{let t=z(()=>X(`size-4 text-foreground`,r()));xi(e,{get className(){return v(t)}})}},c=e=>{var n=Si();w(e=>L(n,0,e),[()=>O(X(`size-4 text-[#D97757]`,r()))]),t(e,n)},l=e=>{var n=Ci();w(e=>L(n,0,e),[()=>O(X(`text-foreground size-4`,r()))]),t(e,n)},u=e=>{var n=wi();w(e=>L(n,0,e),[()=>O(X(`text-foreground size-4`,r()))]),t(e,n)},d=e=>{var n=Ti();w(e=>L(n,0,e),[()=>O(X(`size-4 text-[#4D6BFE]`,r()))]),t(e,n)},f=e=>{var n=Ei();w(e=>L(n,0,e),[()=>O(X(`text-foreground size-4`,r()))]),t(e,n)},p=e=>{var i=Di();w(e=>{L(i,0,e),F(i,`aria-label`,n.provider||`Unknown provider`)},[()=>O(X(`text-muted-foreground size-4`,r()))]),t(e,i)};i(o,e=>{n.provider===`openai`?e(s):n.provider===`anthropic`?e(c,1):n.provider===`xai`?e(l,2):n.provider===`zai`?e(u,3):n.provider===`deepseek`?e(d,4):n.provider===`kimi`?e(f,5):e(p,-1)}),t(e,a),I()}var ki=[`none`,`low`,`medium`,`high`,`xhigh`,`max`],Ai=`gpt-5.6-sol`,ji=`high`,Mi=`/api`,Ni=`Model catalog is unavailable.`;function Pi(e,t){return e.models.find(e=>e.id===t)}function Fi(e,t,n){return(e.tierAllowedModels[t]??[]).includes(n)}function Ii(e,t,n){return Fi(e,t,n)?n:e.tierAllowedModels[t]?.[0]??e.defaultModelId}function Li(e,t,n){return n.supportsFastMode?e.tierAllowsFastMode[t]?`available`:`locked`:`unsupported`}function Ri(e){return e.reasoningEfforts.length!==1||e.reasoningEfforts[0]!==`none`}function zi(e,t){let n=[],r=[];for(let i of e.models){let a={id:i.id,label:i.label,provider:i.provider};Fi(e,t,i.id)?n.push(a):r.push({...a,locked:!0,lockTooltip:e.modelLockUpgradeMessage})}return[...n,...r]}function Bi(e){switch(e){case`none`:return`None`;case`low`:return`Low`;case`medium`:return`Medium`;case`high`:return`High`;case`xhigh`:return`Extra High`;case`max`:return`Max`;default:return e}}var Vi=q({id:je().min(1),label:je().min(1),provider:je().min(1),supportsImages:Be(),contextWindowTokens:J(),autoCompactTokenLimit:J(),reasoningEfforts:ye(je()).min(1),defaultReasoningEffort:je().min(1),serviceTiers:ye(je()).min(1),usagePolicy:be(`unlimited`).optional()}),Hi=Me({sprocket:Me({protocolVersion:J(),catalogVersion:je().min(1),defaultModelId:je().min(1),defaultReasoningEffort:je().min(1),defaultServiceTier:je().min(1),models:ye(Vi).min(1),tierAllowedModels:Me({free:ye(je()),pro:ye(je()),max:ye(je()),admin:ye(je())}),tierAllowedServiceTiers:Me({free:ye(je()),pro:ye(je()),max:ye(je()),admin:ye(je())}),modelLockUpgradeMessage:je().min(1),serviceTierLockUpgradeMessage:je().min(1)})});function Ui(e){let t=e.sprocket;if(t.protocolVersion!==1)throw Error(`${Ni} Unsupported protocol version ${t.protocolVersion}.`);return{protocolVersion:t.protocolVersion,catalogVersion:t.catalogVersion,defaultModelId:t.defaultModelId,defaultReasoningEffort:t.defaultReasoningEffort,models:t.models.map(e=>({id:e.id,label:e.label,provider:e.provider,supportsImages:e.supportsImages,contextWindowTokens:e.contextWindowTokens,autoHandoffTokenLimit:e.autoCompactTokenLimit,reasoningEfforts:e.reasoningEfforts,defaultReasoningEffort:e.defaultReasoningEffort,supportsFastMode:e.serviceTiers.includes(`fast`),usagePolicy:e.usagePolicy})),tierAllowedModels:t.tierAllowedModels,tierAllowsFastMode:{free:t.tierAllowedServiceTiers.free.includes(`fast`),pro:t.tierAllowedServiceTiers.pro.includes(`fast`),max:t.tierAllowedServiceTiers.max.includes(`fast`),admin:t.tierAllowedServiceTiers.admin.includes(`fast`)},modelLockUpgradeMessage:t.modelLockUpgradeMessage,fastModeLockUpgradeMessage:t.serviceTierLockUpgradeMessage}}async function Wi(e){let t=e.replace(/\/+$/,``);if(!t)throw Error(Ni);let n=await fetch(`${t}${Mi}/v1/models`,{headers:{accept:`application/json`}});if(!n.ok)throw Error(Ni);let r=Hi.safeParse(await n.json());if(!r.success)throw Error(Ni);return Ui(r.data)}var Gi=p(`<span class="text-muted-foreground ml-auto text-xs">Default</span>`),Ki=p(`<button type="button" class="focus-visible:ring-ring/60 text-foreground hover:bg-hover-fill flex w-full items-center gap-3 rounded-xl px-3 py-2 text-left text-sm outline-none focus-visible:ring-2"><!> <span> </span> <!></button>`),qi=p(`<p class="text-muted-foreground px-3 pt-1 pb-1.5 text-[11px] font-medium">Reasoning</p> <div class="space-y-0.5"></div>`,1),Ji=p(`<div class="mx-2 my-2 h-px bg-[var(--hairline)]"></div>`),Yi=p(`<span class="text-muted-foreground shrink-0" aria-hidden="true"><!></span>`),Xi=p(`<span class="size-3.5 shrink-0" aria-hidden="true"></span>`),Zi=p(`<!> <p class="text-muted-foreground px-3 pb-1.5 text-[11px] font-medium">Speed</p> <div class="space-y-0.5"><button type="button" role="switch"><!> <!> <span>Fast</span> <span aria-hidden="true"><span></span></span></button></div>`,1),Qi=p(`<div class="bg-popover/96 absolute bottom-[calc(100%+0.75rem)] left-0 z-50 min-w-[15rem] rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl" role="dialog"><!> <!></div>`),$i=p(`<div><button type="button" class="focus-visible:ring-ring/60 text-muted-foreground hover:bg-hover-fill inline-flex h-9 shrink-0 items-center gap-1 rounded-lg px-2 text-[15px] transition outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50" aria-haspopup="dialog"><span> </span> <!></button> <!></div>`),ea=p(`<!> <!>`,1);function ta(n,r){U(r,!0);let a=R(r,`reasoningEffort`,31,()=>e(ji)),o=R(r,`fastMode`,15,!1),c=R(r,`disabled`,3,!1),u=R(r,`className`,3,``),d=W(!1),p=W(null),m=W(null),g=oi(),y=z(()=>Ri(r.model)),b=z(()=>r.fastModeAccess===`available`||r.fastModeAccess===`locked`),x=z(()=>v(y)?`${Bi(a())}${o()&&r.model.supportsFastMode?` · Fast`:``}`:o()?`Fast`:`Speed`),S=z(()=>v(y)&&v(b)?`Select reasoning effort and Fast mode`:v(y)?`Select reasoning effort`:`Select Fast mode`),C=z(()=>v(y)&&v(b)?`Reasoning and Fast mode`:v(y)?`Reasoning`:`Fast mode`);function k(e){a(e)}function A(e){if(r.fastModeAccess===`locked`){r.fastModeLockTooltip&&g.showLockTooltip(e,r.fastModeLockTooltip,!0);return}r.fastModeAccess===`available`&&o(!o())}s(()=>{r.model.reasoningEfforts.includes(a())||a(r.model.defaultReasoningEffort),(r.fastModeAccess===`unsupported`||r.fastModeAccess===`locked`)&&o(!1)}),s(()=>{if(!v(d)){g.hideLockTooltip();return}return si({getRoot:()=>v(p),onOutside:()=>{G(d,!1)},onEscape:()=>{G(d,!1),v(m)?.focus()}})}),s(()=>{(c()||!v(y)&&!v(b))&&G(d,!1)});var j=ea(),M=T(j),N=e=>{var n=$i(),s=E(n),j=E(s),M=D(j,!0),N=_(j,2);{let e=z(()=>X(`text-muted-foreground size-3 shrink-0 transition-transform`,v(d)&&`rotate-180`));rn(N,{get class(){return v(e)}})}K(s),ee(s,e=>G(m,e),()=>v(m));var te=_(s,2),ne=e=>{var n=Qi(),s=E(n),c=e=>{var n=qi(),o=_(T(n),2);he(o,20,()=>r.model.reasoningEfforts,e=>e,(e,n)=>{var o=Ki(),s=E(o);{let e=z(()=>X(`size-4 shrink-0 transition-opacity`,n===a()?`opacity-100`:`opacity-0`));tn(s,{get class(){return v(e)}})}var c=_(s,2),u=D(c,!0),d=_(c,2),f=e=>{var n=Gi();t(e,n)};i(d,e=>{n===r.model.defaultReasoningEffort&&e(f)}),K(o),w(e=>{F(o,`aria-pressed`,n===a()),h(u,e)},[()=>Bi(n)]),l(`click`,o,()=>k(n)),t(e,o)}),K(o),t(e,n)};i(s,e=>{v(y)&&e(c)});var u=_(s,2),d=e=>{let n=z(()=>r.fastModeAccess===`locked`);var a=Zi(),s=T(a),c=e=>{var n=Ji();t(e,n)};i(s,e=>{v(y)&&e(c)});var u=_(s,4),d=E(u),p=E(d),m=e=>{var n=Yi();Jn(E(n),{class:`size-3.5`}),K(n),t(e,n)},h=e=>{var n=Xi();t(e,n)};i(p,e=>{v(n)?e(m):e(h,-1)});var b=_(p,2);Br(b,{class:`size-3.5 shrink-0 text-amber-400`});var x=_(b,2),S=_(x,2),C=D(S);K(d),K(u),w((e,t,i,a)=>{L(d,1,e),F(d,`aria-checked`,!v(n)&&o()),F(d,`aria-disabled`,v(n)),F(d,`aria-label`,v(n)&&r.fastModeLockTooltip?`Fast mode. ${r.fastModeLockTooltip}`:void 0),L(x,1,t),L(S,1,i),L(C,1,a)},[()=>O(X(`focus-visible:ring-ring/60 flex w-full items-center gap-3 rounded-xl px-3 py-2 text-left text-sm outline-none focus-visible:ring-2`,v(n)?`cursor-not-allowed opacity-45`:`text-foreground hover:bg-hover-fill`)),()=>O(X(v(n)&&`text-muted-foreground`)),()=>O(X(`relative ml-auto inline-flex h-5 w-9 shrink-0 items-center rounded-full transition`,o()&&!v(n)?`bg-foreground`:`bg-hover-fill-strong`)),()=>O(X(`bg-background inline-block size-3.5 rounded-full transition`,o()&&!v(n)?`translate-x-[18px]`:`translate-x-[3px]`))]),f(`mouseenter`,d,e=>{v(n)&&r.fastModeLockTooltip&&g.showLockTooltip(e,r.fastModeLockTooltip)}),f(`mouseleave`,d,()=>g.hideLockTooltip()),f(`focus`,d,e=>{v(n)&&r.fastModeLockTooltip&&g.showLockTooltip(e,r.fastModeLockTooltip)}),f(`blur`,d,()=>g.hideLockTooltip()),l(`click`,d,A),t(e,a)};i(u,e=>{v(b)&&e(d)}),K(n),w(()=>F(n,`aria-label`,v(C))),t(e,n)};i(te,e=>{v(d)&&e(ne)}),K(n),ee(n,e=>G(p,e),()=>v(p)),w(e=>{L(n,1,e),F(s,`aria-expanded`,v(d)),F(s,`aria-label`,v(S)),s.disabled=c(),h(M,v(x))},[()=>O(X(`relative`,u()))]),l(`click`,s,()=>{G(d,!v(d))}),t(e,n)};i(M,e=>{(v(y)||v(b))&&e(N)}),li(_(M,2),{get tooltip(){return g.lockTooltip}}),t(n,j),I()}o([`click`]);var na=`agent_decide`;function ra(e){return!!e.selectedOptionId?.trim()||!!e.text.trim()}var ia=p(`<li><button type="button"> </button></li>`),aa=p(`<div class="mb-3" role="group" aria-label="Agent question"><p class="text-foreground text-[14px] leading-6 font-medium"> </p> <ul class="mt-2 flex flex-col gap-1.5" aria-label="Answer options"></ul></div>`);function oa(e,n){U(n,!0);var r=aa(),i=E(r),a=D(i,!0),o=_(i,2);he(o,21,()=>n.options,e=>e.id,(e,r)=>{let i=z(()=>v(r).id===na),a=z(()=>n.selectedOptionId===v(r).id);var o=ia(),s=E(o),c=D(s,!0);K(o),w(()=>{L(s,1,`w-full rounded-lg border px-3 py-2 text-left text-[13px] leading-5 transition ${v(a)?`border-foreground/40 bg-hover-fill-strong text-foreground`:v(i)?`border-border/70 text-muted-foreground/80 hover:text-muted-foreground hover:bg-hover-fill`:`border-border text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`),F(s,`aria-pressed`,v(a)),h(c,v(r).label)}),l(`click`,s,()=>n.onToggleOption(v(r).id)),t(e,o)}),K(o),K(r),w(()=>h(a,n.question)),t(e,r),I()}o([`click`]);function sa(e,t){let n=e??[],r=t??[];return n.length===r.length&&n.every((e,t)=>e===r[t])}var ca=new Set([`image/jpeg`,`image/png`,`image/gif`,`image/webp`]);function la(e){return ca.has(e.toLowerCase())}function ua(e){let t=e.trim();return t.length>0?t:`application/octet-stream`}function da(e){let t=e.name.trim();return t.length>0?t:`Attached file`}function fa(e){return e<1024?`${e} B`:e<1048576?`${Math.max(1,Math.round(e/1024))} KiB`:`${(e/1048576).toFixed(1).replace(/\.0$/,``)} MiB`}function pa(e){e?.startsWith(`blob:`)&&URL.revokeObjectURL(e)}function ma(e){return!e.url&&la(e.mediaType)}function ha(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,n.rel=`noopener`,document.body.append(n),n.click(),n.remove()}var ga=p(`<img/>`),_a=p(`<!> <span class="min-w-0 text-[12px] leading-4"><span class="text-foreground block truncate"> </span> <span class="text-muted-foreground block"> </span></span>`,1),va=p(`<span role="status"><span class="border-border border-t-foreground/80 size-3.5 animate-spin rounded-full border-2"></span></span>`),ya=p(`<span class="text-destructive absolute inset-x-0 bottom-0 bg-rose-950/80 px-1 py-0.5 text-center text-[9px] leading-3" role="alert">Failed</span>`),ba=p(`<li><!> <!> <button type="button" class="bg-foreground/70 text-background hover:bg-foreground/90 absolute top-1 right-1 flex size-4.5 cursor-pointer items-center justify-center rounded-full transition disabled:cursor-not-allowed disabled:opacity-40"><!></button></li>`),xa=p(`<ul class="mb-3 flex max-h-36 flex-wrap items-center gap-2 overflow-y-auto" aria-label="Attached files"></ul>`);function Sa(e,n){U(n,!0);var r=xa();he(r,21,()=>n.attachments,e=>e.localId,(e,r)=>{let a=z(()=>la(v(r).mediaType)&&!!v(r).previewUrl);var o=ba(),s=E(o),c=e=>{var n=ga();w(()=>{F(n,`src`,v(r).previewUrl),F(n,`alt`,v(r).name),L(n,1,`size-full object-cover ${v(r).status===`uploading`?`opacity-50`:``}`)}),t(e,n)},u=e=>{var n=_a(),i=T(n);Mn(i,{class:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`});var a=_(i,2),o=E(a),s=D(o,!0),c=_(o,2),l=D(c,!0);K(a),w(e=>{h(s,v(r).name),h(l,e)},[()=>fa(v(r).size)]),t(e,n)};i(s,e=>{v(a)?e(c):e(u,-1)});var d=_(s,2),f=e=>{var n=va();w(()=>{L(n,1,`absolute inset-0 flex items-center justify-center ${v(a)?``:`bg-background/60`}`),F(n,`aria-label`,`Uploading ${v(r).name??``}`)}),t(e,n)},p=e=>{var n=ya();t(e,n)};i(d,e=>{v(r).status===`uploading`?e(f):v(r).status===`error`&&e(p,1)});var m=_(d,2);Rr(E(m),{class:`size-3`,"aria-hidden":`true`}),K(m),K(o),w(e=>{L(o,1,O(v(a)?`group relative size-14 overflow-hidden rounded-xl border ${v(r).status===`error`?`border-rose-500/60`:`border-border`}`:`group relative flex h-14 max-w-56 items-center gap-2 overflow-hidden rounded-xl border pr-7 pl-2 ${v(r).status===`error`?`border-rose-500/60`:`border-border`}`)),F(o,`title`,e),F(m,`aria-label`,`Remove ${v(r).name??``}`),m.disabled=n.disabled},[()=>v(r).error??`${v(r).name} · ${fa(v(r).size)}`]),l(`click`,m,()=>n.onRemove(v(r).localId)),t(e,o)}),K(r),t(e,r),I()}o([`click`]);var Ca=p(`<p class="text-muted-foreground px-3 py-2 text-sm">Loading skills…</p>`),wa=p(`<div class="flex items-center justify-between gap-3 px-3 py-2"><p class="text-muted-foreground text-sm">Couldn’t load skills</p> <button type="button" class="text-muted-foreground hover:text-foreground text-sm underline-offset-2 hover:underline">Retry</button></div>`),Ta=p(`<p class="text-muted-foreground px-3 py-2 text-sm">No matching skills</p>`),Ea=p(`<button type="button" role="option"><span class="text-sm font-medium"> </span> <span class="text-muted-foreground line-clamp-2 text-[12px]"> </span></button>`),Da=p(`<div class="border-border bg-popover absolute inset-x-0 bottom-full z-30 mb-2 max-h-56 overflow-y-auto rounded-xl border py-1 shadow-2xl" id="composer-skills-listbox" aria-label="Available skills"><!></div>`);function Oa(n,r){U(r,!0);let a=e([]);s(()=>{r.skills.length>0&&a[r.highlightedIndex]?.scrollIntoView({block:`nearest`})});var o=Da(),c=E(o),u=e=>{var n=Ca();t(e,n)},d=e=>{var n=wa(),i=_(E(n),2);K(n),l(`click`,i,function(...e){r.onRetry?.apply(this,e)}),t(e,n)},p=e=>{var n=Ta();t(e,n)},m=e=>{var n=B(),i=T(n);he(i,19,()=>r.skills,e=>e.name,(e,n,i)=>{var o=Ea(),s=E(o),c=D(s),u=_(s,2),d=D(u,!0);K(o),ee(o,(e,t)=>a[t]=e,e=>a?.[e],()=>[v(i)]),w(()=>{F(o,`id`,`composer-skill-option-${v(i)??``}`),L(o,1,`flex w-full flex-col gap-0.5 px-3 py-2 text-left transition ${r.highlightedIndex===v(i)?`text-foreground bg-hover-fill-strong`:`text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`),F(o,`aria-selected`,r.highlightedIndex===v(i)),h(c,`$${v(n).name??``}`),h(d,v(n).description)}),f(`pointerenter`,o,()=>r.onHighlight(v(i))),l(`click`,o,()=>r.onSelect(v(n))),t(e,o)}),t(e,n)};i(c,e=>{r.loadState===`loading`?e(u):r.loadState===`error`?e(d,1):r.skills.length===0?e(p,2):e(m,-1)}),K(o),w(()=>F(o,`role`,r.loadState===`ready`&&r.skills.length>0?`listbox`:`status`)),t(n,o),I()}o([`click`]);function ka(e){return e.key===`Enter`&&!e.shiftKey&&!e.isComposing}var Aa=/(^|\s)\$([a-z0-9-]*)$/i;function ja(e,t){if(t<0||t>e.length)return null;let n=e.slice(0,t).match(Aa);return!n||n.index===void 0?null:{query:n[2].toLowerCase(),tokenStart:n.index+n[1].length}}function Ma(e,t){return ja(e,t)?.query??null}function Na(e,t){let n=t.toLowerCase(),r=[],i=[];for(let t of e){let e=t.name.toLowerCase();e.startsWith(n)?r.push(t):n.length>0&&e.includes(n)&&i.push(t)}return r.sort((e,t)=>e.name.localeCompare(t.name)),i.sort((e,t)=>e.name.localeCompare(t.name)),[...r,...i]}function Pa(e,t,n){let r=ja(e,t);if(!r)return null;let i=t;for(;i<e.length&&/[a-z0-9-]/i.test(e[i]??``);)i+=1;e[i]===` `&&(i+=1);let a=`$${n} `;return{text:`${e.slice(0,r.tokenStart)}${a}${e.slice(i)}`,caret:r.tokenStart+a.length}}function Fa(e){let t=Math.floor(e/60),n=e%60;return t===0?`${n}s`:`${t}m ${n}s`}function Ia(e){let t=Math.max(0,e),n=Math.ceil(t/36e5);if(n>=24){let e=Math.floor(n/24),t=n%24;return t>0?`${e}d ${t}h`:`${e}d`}return t>=36e5?`${n}h`:`${Math.max(1,Math.ceil(t/6e4))}m`}function La(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=t%60;return n>0?r>0?`${n}d ${r}h`:`${n}d`:r>0?i>0?`${r}h ${i}m`:`${r}h`:i>0?`${i}m ${a}s`:`${a}s`}var Ra=p(`<div class="text-muted-foreground mb-3 flex items-center gap-2 px-4 text-[11px]"><span class="inline-flex items-center gap-0.75"><span class="bg-foreground/28 size-1 animate-pulse rounded-full"></span> <span class="bg-foreground/28 size-1 animate-pulse rounded-full [animation-delay:200ms]"></span> <span class="bg-foreground/28 size-1 animate-pulse rounded-full [animation-delay:400ms]"></span></span> <span> </span></div>`),za=p(`<div class="text-muted-foreground mb-3 flex items-center gap-2 px-4 text-[11px]" role="status" aria-live="polite"><span class="bg-foreground/28 size-1.5 animate-pulse rounded-full"></span> <span> </span></div>`),Ba=p(`<div class="mx-auto mb-3 w-full max-w-[48rem] px-4"><button type="button" class="border-border bg-surface/80 text-foreground hover:bg-hover-fill rounded-full border px-3 py-1.5 text-[13px] font-medium transition">Continue working</button></div>`),Va=p(`<div class="mb-3 flex items-start gap-2.5 rounded-xl border border-amber-500/25 bg-amber-500/10 px-3.5 py-3" role="alert"><!> <div class="min-w-0"><p class="text-[13px] leading-5 font-medium text-amber-800 dark:text-amber-200">You're out of usage</p> <p class="text-[12.5px] leading-5 text-amber-800/90 dark:text-amber-200/90"> </p></div></div>`),Ha=p(`<div class="bg-hover-fill-strong mx-1 hidden h-4 w-px shrink-0 sm:block"></div>`),Ua=p(`<!> <!>`,1),Wa=p(`<button type="button" class="flex h-10 w-10 cursor-pointer items-center justify-center rounded-full bg-rose-500/90 text-white transition-all duration-150 hover:scale-105 hover:bg-rose-500 disabled:pointer-events-none disabled:opacity-60 disabled:hover:scale-100" aria-label="Stop generation" title="Stop"><!></button>`),Ga=p(`<button type="button" class="bg-primary/90 text-primary-foreground hover:bg-primary flex h-10 w-10 items-center justify-center rounded-full transition-all duration-150 hover:scale-105 enabled:cursor-pointer disabled:pointer-events-none disabled:opacity-30 disabled:hover:scale-100"><!></button>`),Ka=p(`<div class="bg-tooltip text-tooltip-foreground ring-border pointer-events-none fixed z-100 -translate-x-1/2 -translate-y-full rounded-md px-2.5 py-1.5 text-[12px] leading-4 whitespace-nowrap shadow-lg ring-1" role="tooltip"></div>`),qa=p(`<footer class="shrink-0 px-6 py-4"><div class="mx-auto max-w-336"><!> <!> <div><div><div class="relative flex min-h-33 flex-col px-4 pt-4 pb-2.5"><!> <!> <!> <div class="relative min-h-0 flex-1"><!> <textarea rows="1" class="text-foreground placeholder:text-muted-foreground field-sizing-content max-h-40 min-h-17 w-full resize-none overflow-y-auto border-0 bg-transparent px-0 py-0 text-[14px] leading-6 outline-none" role="combobox" aria-autocomplete="list" aria-haspopup="listbox" autocomplete="off"></textarea></div> <div class="flex min-w-0 flex-nowrap items-center justify-between gap-3 overflow-visible px-0 pt-2.5 pb-0"><div class="-m-1 flex min-w-0 flex-1 items-center gap-1 overflow-visible p-1"><input type="file" class="hidden" multiple=""/> <button type="button" class="text-muted-foreground enabled:hover:text-foreground flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition enabled:cursor-pointer disabled:opacity-40"><!></button> <div class="bg-hover-fill-strong mx-1 hidden h-4 w-px shrink-0 sm:block"></div> <!> <!></div> <div class="flex shrink-0 flex-nowrap items-center justify-end gap-2.5"><!> <!></div></div></div></div></div></div></footer> <!>`,1);function Ja(n,r){U(r,!0);let a=R(r,`prompt`,15,``),o=R(r,`selectedModel`,31,()=>e(Ai)),c=R(r,`selectedReasoningEffort`,31,()=>e(ji)),u=R(r,`fastMode`,15,!1),d=R(r,`pendingQuestion`,3,null),p=R(r,`showContinueWorking`,3,!1),m=R(r,`selectedQuestionOptionId`,15,null),g=R(r,`projectSkills`,3,null),y=Ke(),b=Xe(we.usage.getMyUsage,()=>y.isAuthenticated&&!y.isLoading?{}:`skip`),x=z(()=>b.data?.tier),S=z(()=>!!b.error),C=z(()=>r.modelCatalog?zi(r.modelCatalog,v(x)??`free`):[]),k=z(()=>r.modelCatalog?Pi(r.modelCatalog,o()):void 0),A=z(()=>{if(r.modelCatalog&&v(k)){if(!v(k).supportsFastMode)return`unsupported`;if(v(x))return Li(r.modelCatalog,v(x),v(k))}}),M=z(()=>v(k)!==void 0&&(v(S)||v(x)!==void 0&&r.modelCatalog!==void 0&&Fi(r.modelCatalog,v(x),o()))),N=W(null),te=W(null),ne=W(null),P=W(e([])),B=W(`idle`),ie=W(!1),oe=W(0),se=W(0),ce=0,V,H=z(()=>d()!=null),le=z(()=>r.isRunning&&!v(H)||r.isSubmitting),ue=W(e(Date.now()));s(()=>{let e=setInterval(()=>{G(ue,Date.now(),!0)},1e3);return()=>{clearInterval(e)}});let de=z(()=>v(k)?.usagePolicy===`unlimited`),fe=z(()=>b.data?.exhausted===!0&&(b.data.resetsAt===null||b.data.resetsAt>v(ue))&&!v(de)),pe=z(()=>r.modelCatalog?v(C).find(e=>!e.locked&&Pi(r.modelCatalog,e.id)?.usagePolicy===`unlimited`)?.label??null:null),me=z(()=>{if(!v(fe)||b.data===void 0)return null;let e=v(pe)===null?`Upgrade your subscription to keep going.`:`Switch to ${v(pe)} or upgrade your subscription to keep going.`;return b.data.resetsAt===null?e:`Your limit resets in ${La(b.data.resetsAt-v(ue))}. ${e}`}),he=z(()=>!!a().trim()||r.attachments.length>0),ge=z(()=>ra({selectedOptionId:m(),text:a()})),ve=z(()=>v(H)?v(ge):v(he)),ye=z(()=>r.attachments.some(e=>e.status!==`ready`)),q=z(()=>!v(le)&&!v(H)),be=W(null);s(()=>{let e=d()?.questionId??null;e!==v(be)&&(G(be,e,!0),m(null),a().trim()&&a(``))});let xe=!!globalThis.CSS?.supports(`field-sizing`,`content`),Se=z(()=>Ma(a(),v(se))),J=z(()=>v(Se)!==null&&!v(ie)&&!v(H)),Ce=z(()=>v(Se)===null?[]:Na(v(P),v(Se))),Te=z(()=>v(J)&&v(Ce).length>0?`composer-skill-option-${v(oe)}`:void 0);function Ee(){G(se,v(N)?.selectionStart??a().length,!0)}function De(){G(P,[],!0),G(B,`idle`),G(ie,!1),G(oe,0),ce+=1}async function Oe(e=!1){if(v(B)===`loading`||(v(B)===`ready`||v(B)===`error`)&&!e)return;if(!g()?.load){G(P,[],!0),G(B,`ready`);return}let t=++ce;G(B,`loading`);try{let e=await g().load();if(t!==ce)return;G(P,e,!0),G(B,`ready`)}catch{if(t!==ce)return;G(P,[],!0),G(B,`error`)}}function ke(e){let t=Pa(a(),v(se),e.name);t&&(a(t.text),G(se,t.caret,!0),G(ie,!0),queueMicrotask(()=>{v(N)&&(v(N).focus(),v(N).setSelectionRange(t.caret,t.caret),Pe())}))}function Ae(e){let t=e.currentTarget;if(!(t instanceof HTMLInputElement))return;let n=Array.from(t.files??[]);t.value=``,n.length>0&&r.onAttachFiles(n)}function je(e){let t=Array.from(e.clipboardData?.files??[]);t.length===0||r.isRunning||r.isSubmitting||v(H)||(e.clipboardData?.getData(`text/plain`)||e.preventDefault(),r.onAttachFiles(t))}function Me(e){let t=e.currentTarget;if(!(t instanceof HTMLButtonElement)||t.disabled)return;let n=t.getBoundingClientRect();G(ne,{top:n.top-8,left:n.left+n.width/2},!0)}function Ne(){G(ne,null)}function Pe(){if(!v(N)||xe)return;let e=v(N);e.style.height=`68px`;let t=Math.min(Math.max(e.scrollHeight,68),160);e.style.height=`${t}px`,e.style.overflowY=e.scrollHeight>t?`auto`:`hidden`}function Fe(e){if(v(J)){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),v(Ce).length===0)return;let t=e.key===`ArrowDown`?1:-1;G(oe,(v(oe)+t+v(Ce).length)%v(Ce).length);return}if(e.key===`Escape`){e.preventDefault(),G(ie,!0);return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){e.preventDefault();let t=v(Ce)[v(oe)];t&&ke(t);return}}!r.canSend||!v(H)&&!v(M)||!v(H)&&v(fe)||r.isSubmitting||v(le)||!v(ve)||!v(H)&&v(ye)||ka(e)&&(e.preventDefault(),r.onSubmit())}function Ie(e){m(m()===e?null:e)}function Le(e){if(!r.modelCatalog)return;o(e);let t=Pi(r.modelCatalog,e);t&&c(t.defaultReasoningEffort),r.onModelChange?.(e)}s(()=>{r.modelCatalog&&(!o()||!Pi(r.modelCatalog,o()))&&(o(r.modelCatalog.defaultModelId),c(r.modelCatalog.defaultReasoningEffort),u(!1))}),s(()=>{if(!r.modelCatalog||!v(x))return;let e=Ii(r.modelCatalog,v(x),o());e!==o()&&(o(e),c(Pi(r.modelCatalog,e)?.defaultReasoningEffort??r.modelCatalog.defaultReasoningEffort));let t=Pi(r.modelCatalog,e);t&&Li(r.modelCatalog,v(x),t)!==`available`&&u(!1)}),s(()=>{a(),Pe()}),s(()=>{let e=g()?.workspacePath??null;if(V!==e&&(V=e,De()),v(Se)===null){G(ie,!1);return}v(ie)||Oe()}),s(()=>{v(Ce),G(oe,0)});var Re=qa(),ze=T(Re),Be=E(ze),Ve=E(Be),He=e=>{var n=Ra(),i=_(E(n),2),a=D(i);K(n),w(()=>h(a,`Working for ${r.elapsedLabel??``}`)),t(e,n)},Ue=e=>{var n=za(),i=_(E(n),2),a=D(i,!0);K(n),w(()=>h(a,r.isStarting?`Starting agent…`:`Sending request…`)),t(e,n)};i(Ve,e=>{r.elapsedLabel?e(He):r.isSubmitting&&e(Ue,1)});var We=_(Ve,2),Ge=e=>{var n=Ba(),i=D(n);w(()=>i.disabled=r.isSubmitting),l(`click`,i,function(...e){r.onContinueWorking?.apply(this,e)}),t(e,n)};i(We,e=>{p()&&r.onContinueWorking&&e(Ge)});var qe=_(We,2);L(qe,1,O(`composer-shell mx-auto w-full max-w-[48rem] rounded-[28px] p-px transition-colors duration-200`));var Je=E(qe);L(Je,1,O(`composer-inner rounded-[27px] border border-[var(--hairline)] transition-colors duration-200`));var Ye=E(Je),Y=E(Ye),Ze=e=>{var n=Va(),r=E(n);cn(r,{class:`mt-0.5 size-4 shrink-0 text-amber-800 dark:text-amber-200`,"aria-hidden":`true`});var i=_(r,2),a=_(E(i),2),o=D(a,!0);K(i),K(n),w(()=>h(o,v(me))),t(e,n)};i(Y,e=>{v(me)&&e(Ze)});var X=_(Y,2),Qe=e=>{oa(e,{get question(){return d().question},get options(){return d().options},get selectedOptionId(){return m()},onToggleOption:Ie})};i(X,e=>{d()&&e(Qe)});var $e=_(X,2),et=e=>{Sa(e,{get attachments(){return r.attachments},get disabled(){return v(le)},get onRemove(){return r.onRemoveAttachment}})};i($e,e=>{r.attachments.length>0&&!v(H)&&e(et)});var tt=_($e,2),nt=E(tt),rt=e=>{Oa(e,{get loadState(){return v(B)},get skills(){return v(Ce)},get highlightedIndex(){return v(oe)},onRetry:()=>void Oe(!0),onHighlight:e=>{G(oe,e,!0)},onSelect:ke})};i(nt,e=>{v(J)&&e(rt)});var Z=_(nt,2);j(Z),ee(Z,e=>G(N,e),()=>v(N)),K(tt);var it=_(tt,2),at=E(it),ot=E(at);ee(ot,e=>G(te,e),()=>v(te));var st=_(ot,2);F(st,`aria-label`,`Attach files`),or(E(st),{class:`size-4`,"aria-hidden":`true`}),K(st);var ct=_(st,4);{let e=(e,t=_e)=>{Oi(e,{get provider(){return t().provider},className:`size-4 shrink-0`})},t=z(()=>v(le)||v(H)||r.modelCatalog===void 0);vi(ct,{get value(){return o()},get options(){return v(C)},ariaLabel:`Select model`,menuTitle:`Model`,get disabled(){return v(t)},searchable:!0,onValueChange:Le,className:`z-20 shrink-0`,triggerClassName:`h-9 border-0 bg-transparent px-2 text-[15px] text-foreground shadow-none hover:bg-transparent focus-visible:ring-0`,optionIcon:e,$$slots:{optionIcon:!0}})}var lt=_(ct,2),ut=e=>{var n=Ua(),a=T(n),o=e=>{var n=Ha();t(e,n)},s=z(()=>Ri(v(k))||v(A)===`available`||v(A)===`locked`);i(a,e=>{v(s)&&e(o)});var l=_(a,2);{let e=z(()=>r.modelCatalog?.fastModeLockUpgradeMessage),t=z(()=>v(le)||v(H));ta(l,{get model(){return v(k)},get fastModeAccess(){return v(A)},get fastModeLockTooltip(){return v(e)},get disabled(){return v(t)},className:`z-20 shrink-0`,get reasoningEffort(){return c()},set reasoningEffort(e){c(e)},get fastMode(){return u()},set fastMode(e){u(e)}})}t(e,n)};i(lt,e=>{v(k)&&e(ut)}),K(at);var dt=_(at,2),ft=E(dt),pt=e=>{var n=Wa();Er(E(n),{class:`size-3.5 fill-current`}),K(n),l(`click`,n,function(...e){r.onCancel?.apply(this,e)}),t(e,n)};i(ft,e=>{r.isRunning&&e(pt)});var mt=_(ft,2),ht=e=>{var n=Ga();Gt(E(n),{class:`size-4`}),K(n),w(()=>{n.disabled=!r.canSend||!v(H)&&!v(M)||!v(H)&&v(fe)||r.isSubmitting||!v(ve)||!v(H)&&v(ye),F(n,`aria-label`,v(H)?`Submit answer`:`Send message`)}),l(`click`,n,function(...e){r.onSubmit?.apply(this,e)}),t(e,n)};i(mt,e=>{(v(H)||!r.isRunning)&&e(ht)}),K(dt),K(it),K(Ye),K(Je),K(qe),K(Be),K(ze);var gt=_(ze,2),_t=e=>{var n=Ka();n.textContent=`Attach files`,w(()=>re(n,`top: ${v(ne).top}px; left: ${v(ne).left}px;`)),t(e,n)};i(gt,e=>{v(ne)&&e(_t)}),w(()=>{F(Z,`placeholder`,v(H)?`Add detail, or type a custom answer`:`Ask anything, @tag files/directories, or use $ to show available skills`),Z.disabled=r.isSubmitting,F(Z,`aria-expanded`,v(J)),F(Z,`aria-controls`,v(J)?`composer-skills-listbox`:void 0),F(Z,`aria-activedescendant`,v(Te)),st.disabled=!v(q)}),l(`keydown`,Z,Fe),f(`paste`,Z,je),f(`focus`,Z,Ee),l(`input`,Z,()=>{Ee(),Pe()}),l(`keyup`,Z,Ee),l(`click`,Z,Ee),f(`select`,Z,Ee),ae(Z,a),l(`change`,ot,Ae),f(`mouseenter`,st,Me),f(`mouseleave`,st,Ne),f(`focus`,st,Me),f(`blur`,st,Ne),l(`click`,st,()=>{Ne(),v(te)?.click()}),t(n,Re),I()}o([`click`,`keydown`,`input`,`keyup`,`change`]);var Ya=p(`<small> </small>`),Xa=p(`<button type="button" role="menuitemradio"><span class="create-thread-project-option-label"><span> </span> <!></span> <!></button>`),Za=p(`<span id="create-thread-project-menu" class="create-thread-project-menu" role="menu" aria-label="Projects"><span class="create-thread-project-options"></span> <span class="create-thread-project-menu-footer"><button type="button" role="menuitem"><!> <span>Add project</span></button></span></span>`),Qa=p(`<h1>What should we build in <span class="create-thread-project-phrase"><span class="create-thread-project-control"><button type="button" class="create-thread-project-trigger" aria-haspopup="menu"><span> </span> <!></button> <!></span><span aria-hidden="true">?</span></span></h1>`),$a=p(`<h1>What should we work on?</h1> <p class="text-muted-foreground mt-3 text-sm">Add a project to start your first thread.</p> <button type="button" class="mt-5 rounded-lg border border-[var(--hairline)] px-4 py-2 text-sm">Add project</button>`,1),eo=p(`<div class="create-thread-heading"><!></div>`);function to(n,r){U(r,!0);let a=z(()=>r.projects.find(e=>e.workspacePath===r.workspacePath)),o=z(()=>v(a)?.displayName??`Choose a project`),c=z(()=>r.projects.findIndex(e=>e.workspacePath===r.workspacePath)),u=W(!1),d=W(0),p=W(null),m=W(null),g=e([]);function y(e){return r.projects.some(t=>t.workspacePath!==e.workspacePath&&t.displayName===e.displayName)}function b(e){return y(e)?`${e.displayName}, ${e.workspacePath}`:e.displayName}function x(e){let t=r.projects.length+1;G(d,(e+t)%t),queueMicrotask(()=>g[v(d)]?.focus())}function S(e=v(c)>=0?v(c):0){G(u,!0),x(e)}function C(e){G(u,!1),e&&queueMicrotask(()=>v(m)?.focus())}function O(e){C(!0),e.workspacePath!==r.workspacePath&&r.onProject(e.workspacePath)}function k(){C(!1),r.onAddProject()}function A(e){let t=r.projects[e];if(t){O(t);return}k()}function j(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),S(e.key===`ArrowUp`?r.projects.length:void 0))}function M(e,t){switch(e.key){case`ArrowDown`:e.preventDefault(),x(t+1);break;case`ArrowUp`:e.preventDefault(),x(t-1);break;case`Home`:e.preventDefault(),x(0);break;case`End`:e.preventDefault(),x(r.projects.length);break;case`Enter`:case` `:e.preventDefault(),A(t);break;case`Tab`:G(u,!1)}}s(()=>{if(v(u))return si({getRoot:()=>v(p),onOutside:()=>C(!1),onEscape:()=>C(!0)})}),s(()=>{r.projects.length===0&&G(u,!1)});var N=eo(),te=E(N),ne=e=>{var n=Qa(),a=_(E(n)),s=E(a),c=E(s),p=E(c),x=D(p,!0),T=_(p,2);{let e=z(()=>v(u)?`is-open`:``);rn(T,{get class(){return v(e)},"aria-hidden":`true`})}K(c),ee(c,e=>G(m,e),()=>v(m));var A=_(c,2),N=e=>{var n=Za(),a=E(n);he(a,23,()=>r.projects,e=>e.workspacePath,(e,n,a)=>{var o=Xa();let s;var c=E(o),u=E(c),p=D(u,!0),m=_(u,2),x=e=>{var r=Ya(),i=D(r,!0);w(()=>{F(r,`title`,v(n).workspacePath),h(i,v(n).workspacePath)}),t(e,r)},S=z(()=>y(v(n)));i(m,e=>{v(S)&&e(x)}),K(c),tn(_(c,2),{"aria-hidden":`true`}),K(o),ee(o,(e,t)=>g[t]=e,e=>g?.[e],()=>[v(a)]),w(e=>{F(o,`aria-checked`,v(n).workspacePath===r.workspacePath),F(o,`aria-label`,e),s=L(o,1,``,null,s,{active:v(d)===v(a),selected:v(n).workspacePath===r.workspacePath}),h(p,v(n).displayName)},[()=>b(v(n))]),f(`pointerenter`,o,()=>{G(d,v(a),!0)}),l(`keydown`,o,e=>M(e,v(a))),l(`click`,o,()=>O(v(n))),t(e,o)}),K(a);var o=_(a,2),s=E(o);let c;Pn(E(s),{"aria-hidden":`true`}),me(2),K(s),ee(s,e=>g[r.projects.length]=e,()=>g?.[r.projects.length]),K(o),K(n),w(()=>c=L(s,1,``,null,c,{active:v(d)===r.projects.length})),f(`pointerenter`,s,()=>{G(d,r.projects.length,!0)}),l(`keydown`,s,e=>M(e,r.projects.length)),l(`click`,s,k),t(e,n)};i(A,e=>{v(u)&&e(N)}),K(s),me(),K(a),K(n),w(()=>{F(c,`aria-label`,`Select project. Current project: ${v(o)}`),F(c,`aria-expanded`,v(u)),F(c,`aria-controls`,v(u)?`create-thread-project-menu`:void 0),h(x,v(o))}),l(`click`,c,()=>{v(u)?C(!1):S()}),l(`keydown`,c,j),t(e,n)},P=e=>{var n=$a(),i=_(T(n),4);l(`click`,i,function(...e){r.onAddProject?.apply(this,e)}),t(e,n)};i(te,e=>{r.projects.length?e(ne):e(P,-1)}),K(N),ee(N,e=>G(p,e),()=>v(p)),t(n,N),I()}o([`click`,`keydown`]),Q.union(Q.literal(`unsettled`),Q.literal(`settled`));var no=[`unsettled`,`settled`];function ro(e){return e.archivedAt===void 0?`unsettled`:`settled`}var io=Me({method:Se([`desktop`,`package`]),status:Se([`unavailable`,`idle`,`checking`,`available`,`downloading`,`downloaded`,`installing`,`installed`,`error`]),currentVersion:je(),version:je().nullable(),progress:xe().nullable().optional(),error:je().nullable(),message:je().nullable().optional()});function ao(e){switch(e.status){case`available`:return`Update available`;case`downloading`:return e.progress==null?`Downloading update…`:`Downloading… ${e.progress}%`;case`downloaded`:return`Restart to update`;case`installing`:return`Installing update…`;case`installed`:return`Update installed`;case`error`:return e.version?`Retry update`:null;default:return null}}async function oo(e){let t=Ve();if(!t)return null;let n=await fetch(`${t}/api/update${e?`/install`:``}`,{method:e?`POST`:`GET`,credentials:`include`,headers:{"content-type":`application/json`},signal:AbortSignal.timeout(3e4)});if(!n.ok){let e=Me({error:je()}).safeParse(await n.json().catch(()=>null));throw Error(e.success?e.data.error:`Update request failed (${n.status}). Try again.`)}return io.parse(await n.json())}var so=p(`<div class="text-muted-foreground px-2 pb-2 text-xs"><p> </p> <p class="mt-1">On Windows, a locked executable may require stopping Sprocket and running <code>sprocket update</code> instead.</p> <div class="mt-2 flex gap-3"><button type="button" class="text-foreground underline">Install update</button> <button type="button" class="underline">Cancel</button></div></div>`),co=p(`<p class="text-muted-foreground px-2 pb-2 text-xs">Wait for active agents to finish, then stop Sprocket in your terminal and launch it again.</p>`),lo=p(`<p class="text-destructive px-2 pb-2 text-xs break-words" role="alert"> </p>`),uo=p(`<div class="mb-1" aria-live="polite"><button type="button" class="text-foreground hover:bg-hover-fill flex min-h-9 w-full min-w-0 items-center gap-2.5 rounded-lg px-2 py-1.5 text-left text-[13px] font-medium tracking-[-0.02em] transition disabled:cursor-default disabled:opacity-70"><!> <span> </span></button> <!> <!> <!></div>`);function fo(e,n){U(n,!0);let r=W(null),a=W(null),o=W(!1),s=W(!1),c=0,u=z(()=>v(r)?ao(v(r)):null),d=z(()=>v(o)||v(r)?.status===`downloading`||v(r)?.status===`installing`);function f(e){G(r,e,!0),e&&[`downloading`,`downloaded`,`installing`,`installed`].includes(e.status)&&G(a,null)}se(()=>{let e=!1,t=!1,n=!1,r=window.sprocketDesktopBridge?.updates,i=r?.onState(e=>{c+=1,f(e)});async function a(){if(t||e||v(o)||n)return;t=!0;let i=c;try{let t=r?await r.getState():await oo(!1);!e&&c===i&&(f(t),n=t===null||t.status===`unavailable`)}catch{}finally{t=!1}}a();let s=setInterval(()=>void a(),5e3);return()=>{e=!0,clearInterval(s),i?.()}});async function p(){if(!v(r)||v(d))return;if(v(r).method===`package`&&!v(s)){G(s,!0);return}G(s,!1);let e=++c;G(o,!0),G(a,null);try{let t=window.sprocketDesktopBridge?.updates;if(v(r).method===`desktop`&&t){let n=await(v(r).status===`downloaded`?t.install():t.download());c===e&&f(n)}else v(r).method===`package`&&f(await oo(!0))}catch(e){G(a,e instanceof Error?e.message:String(e),!0)}finally{G(o,!1)}}var m=B(),g=T(m),y=e=>{var n=uo(),o=E(n),c=E(o),f=e=>{Kn(e,{class:`size-4 shrink-0 animate-spin`,"aria-hidden":`true`})},m=e=>{cr(e,{class:`size-4 shrink-0`,"aria-hidden":`true`})},g=e=>{bn(e,{class:`size-4 shrink-0`,"aria-hidden":`true`})};i(c,e=>{v(d)?e(f):v(r).status===`downloaded`?e(m,1):e(g,-1)});var y=_(c,2),b=D(y,!0);K(o);var x=_(o,2),S=e=>{var n=so(),i=E(n),a=D(i),o=_(i,4),c=E(o),u=_(c,2);K(o),K(n),w(()=>h(a,`Install ${v(r).version??``} using your package manager? Restart Sprocket from your terminal
1
+ import{$ as e,A as t,B as n,C as r,D as i,E as a,F as o,G as s,H as c,I as l,J as u,K as d,L as f,M as p,N as m,O as h,P as g,Q as _,R as v,S as y,St as b,T as x,U as S,V as C,W as w,X as T,Y as E,Z as D,_ as O,_t as k,a as A,at as j,b as M,bt as N,c as ee,d as te,dt as ne,et as P,f as F,ft as I,g as L,h as re,i as R,it as z,j as B,k as ie,l as ae,m as oe,n as se,nt as ce,o as V,ot as H,p as le,pt as U,q as ue,rt as W,s as de,st as fe,tt as G,u as pe,vt as me,w as he,x as ge,xt as _e,y as ve,yt as K}from"../chunks/BvmBrUGQ.js";import"../chunks/xihTtKlq.js";import{C as ye,D as q,E as be,O as xe,S as Se,T as J,_ as Ce,b as we,c as Te,d as Ee,f as De,g as Oe,h as ke,i as Ae,j as je,k as Me,m as Ne,n as Pe,o as Fe,p as Ie,r as Le,t as Re,v as ze,w as Be,y as Ve}from"../chunks/B_0TmK76.js";import{a as He,c as Ue,d as We,f as Ge,i as Ke,l as qe,o as Je,r as Ye,s as Xe,u as Y}from"../chunks/Dq0ey8RK.js";import{t as Ze}from"../chunks/CDCDXZ4W.js";import{a as X,i as Qe,n as $e,r as et,t as tt}from"../chunks/qZTzdLCS.js";var nt=Object.defineProperty,rt=(e,t,n)=>t in e?nt(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Z=(e,t,n)=>rt(e,typeof t==`symbol`?t:t+``,n),it=`https://docs.convex.dev/error#undefined-validator`;function at(e,t){let n=t===void 0?``:` for field "${t}"`;throw Error(`A validator is undefined${n} in ${e}. This is often caused by circular imports. See ${it} for details.`)}var ot=class{constructor({isOptional:e}){Z(this,`type`),Z(this,`fieldPaths`),Z(this,`isOptional`),Z(this,`isConvexValidator`),this.isOptional=e,this.isConvexValidator=!0}},st=class e extends ot{constructor({isOptional:e,tableName:t}){if(super({isOptional:e}),Z(this,`tableName`),Z(this,`kind`,`id`),typeof t!=`string`)throw Error(`v.id(tableName) requires a string`);this.tableName=t}get json(){return{type:`id`,tableName:this.tableName}}asOptional(){return new e({isOptional:`optional`,tableName:this.tableName})}},ct=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`float64`)}get json(){return{type:`number`}}asOptional(){return new e({isOptional:`optional`})}},lt=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`int64`)}get json(){return{type:`bigint`}}asOptional(){return new e({isOptional:`optional`})}},ut=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`commitTs`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},dt=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`boolean`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},ft=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`bytes`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},pt=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`string`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},mt=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`null`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},ht=class e extends ot{constructor(){super(...arguments),Z(this,`kind`,`any`)}get json(){return{type:this.kind}}asOptional(){return new e({isOptional:`optional`})}},gt=class e extends ot{constructor({isOptional:e,fields:t}){super({isOptional:e}),Z(this,`fields`),Z(this,`kind`,`object`),globalThis.Object.entries(t).forEach(([e,t])=>{if(t===void 0&&at(`v.object()`,e),!t.isConvexValidator)throw Error(`v.object() entries must be validators`)}),this.fields=t}get json(){return{type:this.kind,value:globalThis.Object.fromEntries(globalThis.Object.entries(this.fields).map(([e,t])=>[e,{fieldType:t.json,optional:t.isOptional===`optional`}]))}}asOptional(){return new e({isOptional:`optional`,fields:this.fields})}omit(...t){let n={...this.fields};for(let e of t)delete n[e];return new e({isOptional:this.isOptional,fields:n})}pick(...t){let n={};for(let e of t)n[e]=this.fields[e];return new e({isOptional:this.isOptional,fields:n})}partial(){let t={};for(let[e,n]of globalThis.Object.entries(this.fields))t[e]=n.asOptional();return new e({isOptional:this.isOptional,fields:t})}extend(t){return new e({isOptional:this.isOptional,fields:{...this.fields,...t}})}},_t=class e extends ot{constructor({isOptional:e,value:t}){if(super({isOptional:e}),Z(this,`value`),Z(this,`kind`,`literal`),typeof t!=`string`&&typeof t!=`boolean`&&typeof t!=`number`&&typeof t!=`bigint`)throw Error(`v.literal(value) must be a string, number, or boolean`);this.value=t}get json(){return{type:this.kind,value:Ge(this.value)}}asOptional(){return new e({isOptional:`optional`,value:this.value})}},vt=class e extends ot{constructor({isOptional:e,element:t}){super({isOptional:e}),Z(this,`element`),Z(this,`kind`,`array`),t===void 0&&at(`v.array()`),this.element=t}get json(){return{type:this.kind,value:this.element.json}}asOptional(){return new e({isOptional:`optional`,element:this.element})}},yt=class e extends ot{constructor({isOptional:e,key:t,value:n}){if(super({isOptional:e}),Z(this,`key`),Z(this,`value`),Z(this,`kind`,`record`),t===void 0&&at(`v.record()`,`key`),n===void 0&&at(`v.record()`,`value`),t.isOptional===`optional`)throw Error(`Record validator cannot have optional keys`);if(n.isOptional===`optional`)throw Error(`Record validator cannot have optional values`);if(!t.isConvexValidator||!n.isConvexValidator)throw Error(`Key and value of v.record() but be validators`);this.key=t,this.value=n}get json(){return{type:this.kind,keys:this.key.json,values:{fieldType:this.value.json,optional:!1}}}asOptional(){return new e({isOptional:`optional`,key:this.key,value:this.value})}},bt=class e extends ot{constructor({isOptional:e,members:t}){super({isOptional:e}),Z(this,`members`),Z(this,`kind`,`union`),t.forEach((e,t)=>{if(e===void 0&&at(`v.union()`,`member at index ${t}`),!e.isConvexValidator)throw Error(`All members of v.union() must be validators`)}),this.members=t}get json(){return{type:this.kind,value:this.members.map(e=>e.json)}}asOptional(){return new e({isOptional:`optional`,members:this.members})}},Q={id:e=>new st({isOptional:`required`,tableName:e}),null:()=>new mt({isOptional:`required`}),number:()=>new ct({isOptional:`required`}),float64:()=>new ct({isOptional:`required`}),bigint:()=>new lt({isOptional:`required`}),int64:()=>new lt({isOptional:`required`}),commitTs:()=>new ut({isOptional:`required`}),boolean:()=>new dt({isOptional:`required`}),string:()=>new pt({isOptional:`required`}),bytes:()=>new ft({isOptional:`required`}),literal:e=>new _t({isOptional:`required`,value:e}),array:e=>new vt({isOptional:`required`,element:e}),object:e=>new gt({isOptional:`required`,fields:e}),record:(e,t)=>new yt({isOptional:`required`,key:e,value:t}),union:(...e)=>new bt({isOptional:`required`,members:e}),any:()=>new ht({isOptional:`required`}),optional:e=>e.asOptional(),nullable:e=>Q.union(e,Q.null())},xt=class{state;config;listeners=new Set;pendingLoadMoreNumItems=null;constructor(e){this.config=e;let t=e.initialData!==void 0;this.state={results:t?e.initialData.page:[],status:t?e.initialData.isDone?`Exhausted`:`CanLoadMore`:`LoadingFirstPage`,isLoading:!t,error:void 0,loadMore:()=>!1,resetKey:0,argsKey:null,initialArgsKey:null,haveArgsEverChanged:!1}}getSnapshot(){return{results:this.state.results,status:this.state.status,isLoading:this.state.isLoading,error:this.state.error,loadMore:e=>this.loadMore(e),resetKey:this.state.resetKey}}loadMore(e){return this.state.status===`CanLoadMore`?this.state.loadMore(e)?!0:(this.pendingLoadMoreNumItems=e,this.state={...this.state,status:`LoadingMore`,isLoading:this.computeIsLoading(`LoadingMore`)},this.notify(),!0):!1}flushPendingLoadMore(){if(this.pendingLoadMoreNumItems!==null){if(this.state.status===`Exhausted`){this.pendingLoadMoreNumItems=null;return}this.state.status===`CanLoadMore`&&this.state.loadMore(this.pendingLoadMoreNumItems)&&(this.pendingLoadMoreNumItems=null,this.state={...this.state,status:`LoadingMore`,isLoading:this.computeIsLoading(`LoadingMore`)})}}getResetKey(){return this.state.resetKey}subscribe(e){return this.listeners.add(e),()=>this.listeners.delete(e)}notify(){this.listeners.forEach(e=>e())}onArgsChange(e){return this.state.initialArgsKey===null&&e!==null&&(this.state.initialArgsKey=e),this.state.argsKey===e?{changed:!1,needsResubscribe:!1}:(this.state.argsKey=e,this.pendingLoadMoreNumItems=null,!this.state.haveArgsEverChanged&&this.state.initialArgsKey!==e&&(this.state.haveArgsEverChanged=!0),e===null?(this.state={...this.state,results:[],status:`LoadingFirstPage`,isLoading:!1,error:void 0,loadMore:()=>!1},this.notify(),{changed:!0,needsResubscribe:!1}):(this.state=!(this.config.keepPreviousData&&this.state.results.length>0)&&!this.isUsingInitialData()?{...this.state,results:[],status:`LoadingFirstPage`,isLoading:!0,error:void 0}:{...this.state,isLoading:!0,error:void 0},this.notify(),{changed:!0,needsResubscribe:!0}))}onUpdate(e){if(this.config.keepPreviousData&&this.state.results.length>0&&e.results.length===0&&e.status===`LoadingFirstPage`){this.state={...this.state,status:e.status,isLoading:!0,error:void 0,loadMore:e.loadMore},this.notify();return}if(this.isUsingInitialData()&&e.results.length===0&&e.status===`LoadingFirstPage`){this.state={...this.state,loadMore:e.loadMore,isLoading:!1},this.notify();return}this.state={...this.state,results:e.results,status:e.status,isLoading:this.computeIsLoading(e.status),error:void 0,loadMore:e.loadMore},this.flushPendingLoadMore(),this.notify()}onError(e){return this.isInvalidCursorError(e)?(console.warn(`PaginatedQueryStateMachine: InvalidCursor detected, resetting:`,e.message),this.pendingLoadMoreNumItems=null,this.state={...this.state,results:[],status:`LoadingFirstPage`,isLoading:!0,error:void 0,resetKey:this.state.resetKey+1},this.notify(),!0):(this.state={...this.state,error:e,isLoading:!1},this.notify(),!1)}reset(){this.pendingLoadMoreNumItems=null,this.state={...this.state,results:[],status:`LoadingFirstPage`,isLoading:!0,error:void 0,resetKey:this.state.resetKey+1},this.notify()}isUsingInitialData(){return this.config.initialData!==void 0&&!this.state.haveArgsEverChanged}getConfig(){return this.config}updateConfig(e){this.config={...this.config,...e}}computeIsLoading(e){return this.isUsingInitialData()?!1:e===`LoadingFirstPage`||e===`LoadingMore`}isInvalidCursorError(e){if(e.message.includes(`InvalidCursor`))return!0;if(`data`in e){let{data:t}=e;if(typeof t==`object`&&t&&`isConvexSystemError`in t&&`paginationError`in t&&t.isConvexSystemError===!0&&t.paginationError===`InvalidCursor`)return!0}return!1}};function St(e){return e===null?null:JSON.stringify(Ge(e))}function Ct(t,n={},r){let i=He();if(typeof t==`string`)throw Error(`Query must be a functionReference object, not a string`);let a=wt(r),o=new xt({initialNumItems:a.initialNumItems,initialData:a.initialData,keepPreviousData:a.keepPreviousData}),c=e({...o.getSnapshot()});return s(()=>o.subscribe(()=>{let e=o.getSnapshot();c.results=e.results,c.status=e.status,c.isLoading=e.isLoading,c.error=e.error,c.loadMore=e.loadMore,c.resetKey=e.resetKey})),s(()=>{c.resetKey;let e=qe(n),a=wt(r);o.updateConfig({initialNumItems:a.initialNumItems,keepPreviousData:a.keepPreviousData});let s=e===Y?null:St(e);if(o.onArgsChange(s),!Ue(i)||e===Y)return;let l=!1,u=i.onPaginatedUpdate_experimental(t,e,{initialNumItems:a.initialNumItems},()=>{l=!0;let e=u.getCurrentValue?.();e&&o.onUpdate({results:e.results,status:e.status,loadMore:t=>e.loadMore(t)})},e=>{l=!0,o.onError(e)});if(!l){let e=u.getCurrentValue?.();e&&o.onUpdate({results:e.results,status:e.status,loadMore:t=>e.loadMore(t)})}return()=>{u.unsubscribe()}}),{get results(){return c.results},get status(){return c.status},get isLoading(){return c.isLoading},get error(){return c.error},loadMore(e){return c.loadMore(e)}}}function wt(e){typeof e==`function`&&(e=e());let t=k(e);if(typeof t.initialNumItems!=`number`||t.initialNumItems<0)throw Error(`\`options.initialNumItems\` must be a positive number. Received \`${t.initialNumItems}\`.`);return t}var Tt=[`forEach`,`isDisjointFrom`,`isSubsetOf`,`isSupersetOf`],Et=[`difference`,`intersection`,`symmetricDifference`,`union`],Dt=!1,Ot=class e extends Set{#e=new Map;#t=W(0);#n=W(0);#r=c||-1;constructor(e){if(super(),e){for(var t of e)super.add(t);this.#n.v=super.size}Dt||this.#a()}#i(e){return c===this.#r?W(e):ce(e)}#a(){Dt=!0;var t=e.prototype,n=Set.prototype;for(let e of Tt)t[e]=function(...t){return v(this.#t),n[e].apply(this,t)};for(let r of Et)t[r]=function(...t){v(this.#t);var i=n[r].apply(this,t);return new e(i)}}has(e){var t=super.has(e),n=this.#e,r=n.get(e);if(r===void 0){if(!t)return v(this.#t),!1;r=this.#i(!0),n.set(e,r)}return v(r),t}add(e){return super.has(e)||(super.add(e),G(this.#n,super.size),P(this.#t)),this}delete(e){var t=super.delete(e),n=this.#e,r=n.get(e);return r!==void 0&&(n.delete(e),G(r,!1)),t&&(G(this.#n,super.size),P(this.#t)),t}clear(){if(super.size!==0){super.clear();var e=this.#e;for(var t of e.values())G(t,!1);e.clear(),G(this.#n,0),P(this.#t)}}keys(){return this.values()}values(){return v(this.#t),super.values()}entries(){return v(this.#t),super.entries()}[Symbol.iterator](){return this.keys()}get size(){return v(this.#n)}},kt=class extends Map{#e=new Map;#t=W(0);#n=W(0);#r=c||-1;constructor(e){if(super(),e){for(var[t,n]of e)super.set(t,n);this.#n.v=super.size}}#i(e){return c===this.#r?W(e):ce(e)}has(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else return v(this.#t),!1}return v(n),!0}forEach(e,t){this.#a(),super.forEach(e,t)}get(e){var t=this.#e,n=t.get(e);if(n===void 0){if(super.has(e))n=this.#i(0),t.set(e,n);else{v(this.#t);return}}return v(n),super.get(e)}getOrInsert(e,t){return super.has(e)||this.set(e,t),this.get(e)}getOrInsertComputed(e,t){return super.has(e)||this.set(e,t(e)),this.get(e)}set(e,t){var n=this.#e,r=n.get(e),i=super.get(e),a=super.set(e,t),o=this.#t;if(r===void 0)r=this.#i(0),n.set(e,r),G(this.#n,super.size),P(o);else if(i!==t){P(r);var s=o.reactions===null?null:new Set(o.reactions);(s===null||!r.reactions?.every(e=>s.has(e)))&&P(o)}return a}delete(e){var t=this.#e,n=t.get(e),r=super.delete(e);return n!==void 0&&(t.delete(e),G(n,-1)),r&&(G(this.#n,super.size),P(this.#t)),r}clear(){if(super.size!==0){super.clear();var e=this.#e;G(this.#n,0);for(var t of e.values())G(t,-1);P(this.#t),e.clear()}}#a(){v(this.#t);var e=this.#e;if(this.#n.v!==e.size){for(var t of super.keys())if(!e.has(t)){var n=this.#i(0);e.set(t,n)}}for([,n]of this.#e)v(n)}keys(){return v(this.#t),super.keys()}values(){return this.#a(),super.values()}entries(){return this.#a(),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return v(this.#n),super.size}},At=ie(e=>{let t=setInterval(e,1e3);return()=>clearInterval(t)});function jt(){return At(),Date.now()}function Mt(e,t){if(!(e===void 0||e<=0||t===void 0||!Number.isFinite(e)||!Number.isFinite(t)))return Math.max(0,Math.floor((t-e)/1e3))}var Nt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`},Pt=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim();function Ft(e){return e!=null}function It(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Nt.width,a=e.size??e.height??Nt.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Pt(...c):Pt(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Nt[`stroke-width`])*Number(e.size??e.width??Nt.width)/Number(t.size??t.width??Nt.width):t.strokeWidth??Nt[`stroke-width`];return[`svg`,{...Object.entries(Nt).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Ft(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Ft(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Ft(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}var Lt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Rt=Symbol(`lucide-context`),zt=()=>ne(Rt),Bt=new Set([`$$slots`,`$$events`,`$$legacy`,`color`,`size`,`width`,`height`,`strokeWidth`,`absoluteStrokeWidth`,`nonScalingStroke`,`iconNode`,`icon`,`class`,`children`]),Vt=m(`<svg><!><!></svg>`);function $(e,n){U(n,!0);let r=zt()??{},i=R(n,`color`,19,()=>r.color??`currentColor`),a=R(n,`size`,19,()=>r.size??24),o=R(n,`width`,19,a),s=R(n,`height`,19,a),c=R(n,`strokeWidth`,19,()=>r.strokeWidth??2),l=R(n,`absoluteStrokeWidth`,19,()=>r.absoluteStrokeWidth??!1),u=R(n,`nonScalingStroke`,19,()=>r.nonScalingStroke??!1),d=R(n,`iconNode`,19,()=>[]),f=R(n,`icon`,19,()=>({node:d(),aliases:[],size:24})),p=A(n,Bt),m=z(()=>!!n.children||Lt(p)),h=z(()=>It(f(),{color:i(),width:o(),height:s(),strokeWidth:c(),absoluteStrokeWidth:l(),nonScalingStroke:u(),className:Pt(`lucide-icon`,r.class),hasA11yProp:v(m),attributes:p})),g=z(()=>b(v(h),3)),S=z(()=>v(g)[1]),C=z(()=>N(v(g)[2],()=>[],!0)),w=z(()=>({...v(S),class:[...v(S).class.split(` `),n.class]}));var D=Vt();pe(D,()=>({...v(w)}));var O=E(D);he(O,17,()=>v(C),x,(e,n)=>{var r=z(()=>b(v(n),2));let i=()=>v(r)[0],a=()=>v(r)[1];var o=B(),s=T(o);M(s,i,!0,(e,t)=>{pe(e,()=>({...a()}))}),t(e,o)});var k=_(O);y(k,()=>n.children??_e),K(D),t(e,D),I()}var Ht=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ut(e,t){let n=A(t,Ht),r={name:`arrow-left`,size:24,node:[[`path`,{d:`m12 19-7-7 7-7`}],[`path`,{d:`M19 12H5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Wt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Gt(e,t){let n=A(t,Wt),r={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`}],[`path`,{d:`M12 19V5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Kt=new Set([`$$slots`,`$$events`,`$$legacy`]);function qt(e,t){let n=A(t,Kt),r={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Jt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Yt(e,t){let n=A(t,Jt),r={name:`brain`,size:24,node:[[`path`,{d:`M12 18V5`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Xt=new Set([`$$slots`,`$$events`,`$$legacy`]);function Zt(e,t){let n=A(t,Xt),r={name:`camera`,size:24,node:[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`}],[`circle`,{cx:`12`,cy:`13`,r:`3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Qt=new Set([`$$slots`,`$$events`,`$$legacy`]);function $t(e,t){let n=A(t,Qt),r={name:`chart-no-axes-column`,size:24,node:[[`path`,{d:`M5 21v-6`}],[`path`,{d:`M12 21V3`}],[`path`,{d:`M19 21V9`}]],aliases:[`bar-chart-2`]};$(e,V(()=>n,{get icon(){return r}}))}var en=new Set([`$$slots`,`$$events`,`$$legacy`]);function tn(e,t){let n=A(t,en),r={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var nn=new Set([`$$slots`,`$$events`,`$$legacy`]);function rn(e,t){let n=A(t,nn),r={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var an=new Set([`$$slots`,`$$events`,`$$legacy`]);function on(e,t){let n=A(t,an),r={name:`chevron-right`,size:24,node:[[`path`,{d:`m9 18 6-6-6-6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var sn=new Set([`$$slots`,`$$events`,`$$legacy`]);function cn(e,t){let n=A(t,sn),r={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`}]],aliases:[`alert-circle`]};$(e,V(()=>n,{get icon(){return r}}))}var ln=new Set([`$$slots`,`$$events`,`$$legacy`]);function un(e,t){let n=A(t,ln),r={name:`circle-dollar-sign`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8`}],[`path`,{d:`M12 18V6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var dn=new Set([`$$slots`,`$$events`,`$$legacy`]);function fn(e,t){let n=A(t,dn),r={name:`circle-question-mark`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`}],[`path`,{d:`M12 17h.01`}]],aliases:[`help-circle`,`circle-help`]};$(e,V(()=>n,{get icon(){return r}}))}var pn=new Set([`$$slots`,`$$events`,`$$legacy`]);function mn(e,t){let n=A(t,pn),r={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`}],[`path`,{d:`m6 8-4 4 4 4`}],[`path`,{d:`m14.5 4-5 16`}]],aliases:[`code-2`]};$(e,V(()=>n,{get icon(){return r}}))}var hn=new Set([`$$slots`,`$$events`,`$$legacy`]);function gn(e,t){let n=A(t,hn),r={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`}]]};$(e,V(()=>n,{get icon(){return r}}))}var _n=new Set([`$$slots`,`$$events`,`$$legacy`]);function vn(e,t){let n=A(t,_n),r={name:`credit-card`,size:24,node:[[`rect`,{width:`20`,height:`14`,x:`2`,y:`5`,rx:`2`}],[`line`,{x1:`2`,x2:`22`,y1:`10`,y2:`10`}],[`path`,{d:`M6 14h2`}]]};$(e,V(()=>n,{get icon(){return r}}))}var yn=new Set([`$$slots`,`$$events`,`$$legacy`]);function bn(e,t){let n=A(t,yn),r={name:`download`,size:24,node:[[`path`,{d:`M12 15V3`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`}],[`path`,{d:`m7 10 5 5 5-5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var xn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sn(e,t){let n=A(t,xn),r={name:`expand`,size:24,node:[[`path`,{d:`m15 15 6 6`}],[`path`,{d:`m15 9 6-6`}],[`path`,{d:`M21 16v5h-5`}],[`path`,{d:`M21 8V3h-5`}],[`path`,{d:`M3 16v5h5`}],[`path`,{d:`m3 21 6-6`}],[`path`,{d:`M3 8V3h5`}],[`path`,{d:`M9 9 3 3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Cn=new Set([`$$slots`,`$$events`,`$$legacy`]);function wn(e,t){let n=A(t,Cn),r={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`}],[`path`,{d:`M10 14 21 3`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Tn=new Set([`$$slots`,`$$events`,`$$legacy`]);function En(e,t){let n=A(t,Tn),r={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Dn=new Set([`$$slots`,`$$events`,`$$legacy`]);function On(e,t){let n=A(t,Dn),r={name:`file-code`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 12.5 8 15l2 2.5`}],[`path`,{d:`m14 12.5 2 2.5-2 2.5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var kn=new Set([`$$slots`,`$$events`,`$$legacy`]);function An(e,t){let n=A(t,kn),r={name:`file-diff`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M9 10h6`}],[`path`,{d:`M12 13V7`}],[`path`,{d:`M9 17h6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var jn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mn(e,t){let n=A(t,jn),r={name:`file-text`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`}],[`path`,{d:`M10 9H8`}],[`path`,{d:`M16 13H8`}],[`path`,{d:`M16 17H8`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Nn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pn(e,t){let n=A(t,Nn),r={name:`folder-plus`,size:24,node:[[`path`,{d:`M12 10v6`}],[`path`,{d:`M9 13h6`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Fn=new Set([`$$slots`,`$$events`,`$$legacy`]);function In(e,t){let n=A(t,Fn),r={name:`folder`,size:24,node:[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Ln=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rn(e,t){let n=A(t,Ln),r={name:`fullscreen`,size:24,node:[[`path`,{d:`M3 7V5a2 2 0 0 1 2-2h2`}],[`path`,{d:`M17 3h2a2 2 0 0 1 2 2v2`}],[`path`,{d:`M21 17v2a2 2 0 0 1-2 2h-2`}],[`path`,{d:`M7 21H5a2 2 0 0 1-2-2v-2`}],[`rect`,{width:`10`,height:`8`,x:`7`,y:`8`,rx:`1`}]]};$(e,V(()=>n,{get icon(){return r}}))}var zn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Bn(e,t){let n=A(t,zn),r={name:`globe`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`}],[`path`,{d:`M2 12h20`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Vn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Hn(e,t){let n=A(t,Vn),r={name:`hourglass`,size:24,node:[[`path`,{d:`M5 22h14`}],[`path`,{d:`M5 2h14`}],[`path`,{d:`M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22`}],[`path`,{d:`M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Un=new Set([`$$slots`,`$$events`,`$$legacy`]);function Wn(e,t){let n=A(t,Un),r={name:`list-checks`,size:24,node:[[`path`,{d:`M13 5h8`}],[`path`,{d:`M13 12h8`}],[`path`,{d:`M13 19h8`}],[`path`,{d:`m3 17 2 2 4-4`}],[`path`,{d:`m3 7 2 2 4-4`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Gn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Kn(e,t){let n=A(t,Gn),r={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`}]],aliases:[`loader-2`]};$(e,V(()=>n,{get icon(){return r}}))}var qn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Jn(e,t){let n=A(t,qn),r={name:`lock`,size:24,node:[[`rect`,{width:`18`,height:`11`,x:`3`,y:`11`,rx:`2`,ry:`2`}],[`path`,{d:`M7 11V7a5 5 0 0 1 10 0v4`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Yn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Xn(e,t){let n=A(t,Yn),r={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`}],[`path`,{d:`M21 12H9`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Zn=new Set([`$$slots`,`$$events`,`$$legacy`]);function Qn(e,t){let n=A(t,Zn),r={name:`moon`,size:24,node:[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`}]]};$(e,V(()=>n,{get icon(){return r}}))}var $n=new Set([`$$slots`,`$$events`,`$$legacy`]);function er(e,t){let n=A(t,$n),r={name:`notebook-pen`,size:24,node:[[`path`,{d:`M13.4 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-7.4`}],[`path`,{d:`M2 6h4`}],[`path`,{d:`M2 10h4`}],[`path`,{d:`M2 14h4`}],[`path`,{d:`M2 18h4`}],[`path`,{d:`M21.378 5.626a1 1 0 1 0-3.004-3.004l-5.01 5.012a2 2 0 0 0-.506.854l-.837 2.87a.5.5 0 0 0 .62.62l2.87-.837a2 2 0 0 0 .854-.506z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var tr=new Set([`$$slots`,`$$events`,`$$legacy`]);function nr(e,t){let n=A(t,tr),r={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M9 3v18`}]],aliases:[`sidebar`]};$(e,V(()=>n,{get icon(){return r}}))}var rr=new Set([`$$slots`,`$$events`,`$$legacy`]);function ir(e,t){let n=A(t,rr),r={name:`panel-right`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}],[`path`,{d:`M15 3v18`}]]};$(e,V(()=>n,{get icon(){return r}}))}var ar=new Set([`$$slots`,`$$events`,`$$legacy`]);function or(e,t){let n=A(t,ar),r={name:`paperclip`,size:24,node:[[`path`,{d:`m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551`}]]};$(e,V(()=>n,{get icon(){return r}}))}var sr=new Set([`$$slots`,`$$events`,`$$legacy`]);function cr(e,t){let n=A(t,sr),r={name:`refresh-cw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8`}],[`path`,{d:`M21 3v5h-5`}],[`path`,{d:`M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16`}],[`path`,{d:`M8 16H3v5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var lr=new Set([`$$slots`,`$$events`,`$$legacy`]);function ur(e,t){let n=A(t,lr),r={name:`rotate-ccw`,size:24,node:[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`}],[`path`,{d:`M3 3v5h5`}]]};$(e,V(()=>n,{get icon(){return r}}))}var dr=new Set([`$$slots`,`$$events`,`$$legacy`]);function fr(e,t){let n=A(t,dr),r={name:`save`,size:24,node:[[`path`,{d:`M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z`}],[`path`,{d:`M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7`}],[`path`,{d:`M7 3v4a1 1 0 0 0 1 1h7`}]]};$(e,V(()=>n,{get icon(){return r}}))}var pr=new Set([`$$slots`,`$$events`,`$$legacy`]);function mr(e,t){let n=A(t,pr),r={name:`scroll-text`,size:24,node:[[`path`,{d:`M15 12h-5`}],[`path`,{d:`M15 8h-5`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var hr=new Set([`$$slots`,`$$events`,`$$legacy`]);function gr(e,t){let n=A(t,hr),r={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`}],[`circle`,{cx:`11`,cy:`11`,r:`8`}]]};$(e,V(()=>n,{get icon(){return r}}))}var _r=new Set([`$$slots`,`$$events`,`$$legacy`]);function vr(e,t){let n=A(t,_r),r={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`}],[`circle`,{cx:`12`,cy:`12`,r:`3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var yr=new Set([`$$slots`,`$$events`,`$$legacy`]);function br(e,t){let n=A(t,yr),r={name:`shrink`,size:24,node:[[`path`,{d:`m15 15 6 6m-6-6v4.8m0-4.8h4.8`}],[`path`,{d:`M9 19.8V15m0 0H4.2M9 15l-6 6`}],[`path`,{d:`M15 4.2V9m0 0h4.8M15 9l6-6`}],[`path`,{d:`M9 4.2V9m0 0H4.2M9 9 3 3`}]]};$(e,V(()=>n,{get icon(){return r}}))}var xr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Sr(e,t){let n=A(t,xr),r={name:`square-pen`,size:24,node:[[`path`,{d:`M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7`}],[`path`,{d:`M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z`}]],aliases:[`pen-box`,`edit`,`pen-square`]};$(e,V(()=>n,{get icon(){return r}}))}var Cr=new Set([`$$slots`,`$$events`,`$$legacy`]);function wr(e,t){let n=A(t,Cr),r={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`}],[`path`,{d:`M11 13h4`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`}]],aliases:[`terminal-square`]};$(e,V(()=>n,{get icon(){return r}}))}var Tr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Er(e,t){let n=A(t,Tr),r={name:`square`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Dr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Or(e,t){let n=A(t,Dr),r={name:`sun`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`4`}],[`path`,{d:`M12 2v2`}],[`path`,{d:`M12 20v2`}],[`path`,{d:`m4.93 4.93 1.41 1.41`}],[`path`,{d:`m17.66 17.66 1.41 1.41`}],[`path`,{d:`M2 12h2`}],[`path`,{d:`M20 12h2`}],[`path`,{d:`m6.34 17.66-1.41 1.41`}],[`path`,{d:`m19.07 4.93-1.41 1.41`}]]};$(e,V(()=>n,{get icon(){return r}}))}var kr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ar(e,t){let n=A(t,kr),r={name:`terminal`,size:24,node:[[`path`,{d:`M12 19h8`}],[`path`,{d:`m4 17 6-6-6-6`}]]};$(e,V(()=>n,{get icon(){return r}}))}var jr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Mr(e,t){let n=A(t,jr),r={name:`user-round`,size:24,node:[[`circle`,{cx:`12`,cy:`8`,r:`5`}],[`path`,{d:`M20 21a8 8 0 0 0-16 0`}]],aliases:[`user-2`]};$(e,V(()=>n,{get icon(){return r}}))}var Nr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Pr(e,t){let n=A(t,Nr),r={name:`wallet`,size:24,node:[[`path`,{d:`M19 7V4a1 1 0 0 0-1-1H5a2 2 0 0 0 0 4h15a1 1 0 0 1 1 1v4h-3a2 2 0 0 0 0 4h3a1 1 0 0 0 1-1v-2a1 1 0 0 0-1-1`}],[`path`,{d:`M3 5v14a2 2 0 0 0 2 2h15a1 1 0 0 0 1-1v-4`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Fr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Ir(e,t){let n=A(t,Fr),r={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Lr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Rr(e,t){let n=A(t,Lr),r={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`}],[`path`,{d:`m6 6 12 12`}]]};$(e,V(()=>n,{get icon(){return r}}))}var zr=new Set([`$$slots`,`$$events`,`$$legacy`]);function Br(e,t){let n=A(t,zr),r={name:`zap`,size:24,node:[[`path`,{d:`M15.914 4a1.5 1.5 0 00-2.474-1.561l-9 9A1.5 1.5 0 005.5 14h4.002a.5.5 0 01.471.666L8.086 20a1.5 1.5 0 002.475 1.56l9-9A1.5 1.5 0 0018.5 10h-3.997a.5.5 0 01-.472-.667z`}]]};$(e,V(()=>n,{get icon(){return r}}))}var Vr=p(`<a><!></a>`),Hr=p(`<button><!></button>`);function Ur(e,n){U(n,!0);let r=R(n,`type`,3,`button`),a=R(n,`variant`,3,`default`),o=R(n,`className`,3,``),s=R(n,`disabled`,3,!1),c=z(()=>a()===`outline`?`border-border bg-surface/80 text-foreground hover:bg-hover-fill`:`bg-primary text-primary-foreground hover:opacity-90`),u=z(()=>X(`focus-visible:ring-ring/50 inline-flex h-10 items-center justify-center gap-2 rounded-full border border-transparent px-5 py-2 text-sm font-medium transition-opacity focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50`,v(c),o()));var d=B(),f=T(d),p=e=>{var r=Vr(),i=E(r);y(i,()=>n.children??_e),K(r),w(()=>{F(r,`href`,n.href),L(r,1,O(v(u)))}),l(`click`,r,function(...e){n.onclick?.apply(this,e)}),t(e,r)},m=e=>{var i=Hr(),a=E(i);y(a,()=>n.children??_e),K(i),w(()=>{F(i,`type`,r()),i.disabled=s(),L(i,1,O(v(u)))}),l(`click`,i,function(...e){n.onclick?.apply(this,e)}),t(e,i)};i(f,e=>{n.href&&!s()?e(p):e(m,-1)}),t(e,d),I()}o([`click`]);var Wr=p(`<!> <!>`,1),Gr=p(`<p class="text-destructive text-center text-sm" role="alert"> </p>`),Kr=p(`<div class="text-muted-foreground flex items-center justify-center gap-2 text-sm" aria-live="polite" aria-busy="true"><!> <span> </span></div>`),qr=p(`<div><!></div>`);function Jr(e,n){U(n,!0);let r=R(n,`overlayOpen`,3,!1),a=R(n,`retryLabel`,3,`Retry`),o=z(()=>n.authState.isAuthenticated&&(n.authState.isLoading||!n.authState.connectionFailed)),s=z(()=>!n.authState.isAuthenticated&&n.authState.isLoading),c=z(()=>n.authState.isConfigured?v(o)?`Confirming your session`:n.authState.connectionFailed?`Couldn’t connect your account`:v(s)?`Preparing sign-in`:`Sign in to continue`:`Sign-in unavailable`),l=z(()=>n.authState.isConfigured?v(o)?`Verifying your secure connection before opening your projects.`:n.authState.connectionFailed?`Your session could not be confirmed. Retry when the connection is available.`:v(s)?`Getting account sign-in ready. This usually takes a moment.`:`Sign in to sync your coding threads, streaming responses, and projects.`:`Account sign-in is not configured on this deployment, so account actions are disabled.`),u=z(()=>n.authState.isAuthenticated?`Almost there`:`One moment`),d=z(()=>!!(n.authState.isConfigured&&n.authState.error&&!r()));var f=qr(),p=E(f);tt(p,{get title(){return v(c)},get description(){return v(l)},actions:e=>{var r=Wr(),o=T(r),s=e=>{Ur(e,{get onclick(){return n.onRetry},get disabled(){return n.authState.isLoading},children:(e,n)=>{me();var r=g();w(()=>h(r,a())),t(e,r)},$$slots:{default:!0}})};i(o,e=>{n.authState.connectionFailed&&n.authState.isConfigured&&e(s)});var c=_(o,2),l=e=>{Ur(e,{variant:`outline`,get onclick(){return n.onSignOut},children:(e,n)=>{me();var r=g(`Sign Out`);t(e,r)},$$slots:{default:!0}})},u=e=>{var r=Wr(),i=T(r);Ur(i,{get onclick(){return n.onSignIn},get disabled(){return n.authState.isLoading},children:(e,n)=>{me();var r=g(`Sign In`);t(e,r)},$$slots:{default:!0}}),Ur(_(i,2),{variant:`outline`,get onclick(){return n.onSignUp},get disabled(){return n.authState.isLoading},children:(e,n)=>{me();var r=g(`Create Account`);t(e,r)},$$slots:{default:!0}}),t(e,r)};i(c,e=>{n.authState.isAuthenticated?e(l):n.authState.isConfigured&&!n.authState.connectionFailed&&e(u,1)}),t(e,r)},children:(e,r)=>{var a=Wr(),o=T(a),s=e=>{var r=Gr(),i=D(r,!0);w(()=>h(i,n.authState.error)),t(e,r)};i(o,e=>{v(d)&&e(s)});var c=_(o,2),l=e=>{var n=Kr(),r=E(n);Kn(r,{class:`size-3.5 animate-spin`,"aria-hidden":`true`});var i=_(r,2),a=D(i,!0);K(n),w(()=>h(a,v(u))),t(e,n)};i(c,e=>{n.authState.isLoading&&e(l)}),t(e,a)},$$slots:{actions:!0,default:!0}}),K(f),w(()=>{f.inert=r(),F(f,`aria-hidden`,r()?!0:void 0)}),t(e,f),I()}var Yr=p(`<div class="text-muted-foreground mb-4 flex justify-center" aria-hidden="true"><!></div>`),Xr=p(`<p class="text-muted-foreground mt-6 max-h-24 overflow-y-auto font-mono text-[11px] leading-5 break-all select-all"> </p>`),Zr=p(`<p class="text-destructive mt-4 text-sm" role="alert"> </p>`),Qr=p(`<p class="mt-4 text-sm text-amber-700" role="alert"> </p>`),$r=p(`<!> Open browser`,1),ei=p(`<!> Copied`,1),ti=p(`<!> Copy link`,1),ni=p(`<!> <!>`,1),ri=p(`<span class="text-muted-foreground border-border inline-flex h-10 items-center justify-center gap-2 rounded-full border px-4 text-sm">Preparing link…</span>`),ii=p(`<div class="app-entry-shell fixed inset-0 z-50 flex items-center justify-center px-6" role="presentation"><div class="border-border/70 bg-surface relative z-10 w-full max-w-md rounded-2xl border p-8 text-center shadow-[0_18px_50px_-28px_oklch(0.2_0.02_260/0.45)] outline-none" role="dialog" aria-modal="true" aria-labelledby="browser-signin-title" aria-describedby="browser-signin-desc" tabindex="-1"><!> <h2 id="browser-signin-title" class="font-brand text-foreground text-[1.35rem] font-semibold tracking-tight"> </h2> <p id="browser-signin-desc" class="text-muted-foreground mt-3 text-sm leading-[1.55]"> </p> <!> <!> <!> <div class="mt-6 flex flex-wrap items-center justify-center gap-3"><!></div> <div class="mt-6"><button type="button" class="text-muted-foreground hover:text-foreground decoration-foreground/30 hover:decoration-foreground text-[13px] underline underline-offset-4 transition-colors">Cancel</button></div></div></div>`);function ai(e,r){U(r,!0);let a=R(r,`error`,3,null),o=W(!1),c=W(null),u=W(null),d=null;s(()=>{if(!r.open){G(o,!1),G(c,null);return}let e=document.activeElement instanceof HTMLElement?document.activeElement:null,t=!1;n().then(()=>{t||v(u)?.focus()});function i(e){if(e.key===`Escape`){e.preventDefault(),e.stopPropagation(),r.onCancel();return}if(e.key!==`Tab`||!v(u))return;let t=Array.from(v(u).querySelectorAll(`a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])`)).filter(e=>!e.hasAttribute(`hidden`)&&e.offsetParent!==null);if(t.length===0){e.preventDefault(),v(u).focus();return}let n=t[0],i=t[t.length-1],a=document.activeElement;e.shiftKey&&(a===v(u)||a===n||!v(u).contains(a))?(e.preventDefault(),i.focus()):!e.shiftKey&&(a===v(u)||a===i||!v(u).contains(a))&&(e.preventDefault(),n.focus())}return window.addEventListener(`keydown`,i,!0),()=>{t=!0,window.removeEventListener(`keydown`,i,!0),d!==null&&(window.clearTimeout(d),d=null),e?.isConnected&&e.focus()}});async function f(){if(r.signInUrl)try{await navigator.clipboard.writeText(r.signInUrl),G(o,!0),G(c,null),d!==null&&window.clearTimeout(d),d=window.setTimeout(()=>{G(o,!1),d=null},2e3)}catch{G(o,!1),G(c,`Could not copy the sign-in link. Select it above and copy manually.`)}}function p(){if(!r.signInUrl)return;let e=window.open(r.signInUrl,`_blank`);if(e){try{e.opener=null}catch{}r.onClearOpenError?.()}}let m=z(()=>r.signInUrl?a()?{title:`Open the sign-in link`,description:`Your browser didn’t open automatically. Continue with the options below.`}:{title:`Finish signing in`,description:`We opened your browser to complete sign-in. Waiting for you to finish there.`}:{title:`Preparing sign-in`,description:`Preparing a secure sign-in link. This usually takes a moment.`});var g=B(),y=T(g),b=e=>{var n=ii(),s=E(n),d=E(s),g=e=>{var n=Yr();Kn(E(n),{class:`size-5 animate-spin`}),K(n),t(e,n)};i(d,e=>{r.signInUrl||e(g)});var y=_(d,2),b=D(y,!0),x=_(y,2),S=D(x,!0),C=_(x,2),O=e=>{var n=Xr(),i=D(n,!0);w(()=>{F(n,`title`,r.signInUrl),h(i,r.signInUrl)}),t(e,n)};i(C,e=>{r.signInUrl&&e(O)});var k=_(C,2),A=e=>{var n=Zr(),r=D(n,!0);w(()=>h(r,a())),t(e,n)};i(k,e=>{a()&&e(A)});var j=_(k,2),M=e=>{var n=Qr(),r=D(n,!0);w(()=>h(r,v(c))),t(e,n)};i(j,e=>{v(c)&&e(M)});var N=_(j,2),te=E(N),ne=e=>{var n=ni(),r=T(n);Ur(r,{onclick:p,children:(e,n)=>{var r=$r();wn(T(r),{class:`size-4`,"aria-hidden":`true`}),me(),t(e,r)},$$slots:{default:!0}}),Ur(_(r,2),{variant:`outline`,onclick:()=>void f(),children:(e,n)=>{var r=B(),a=T(r),s=e=>{var n=ei();tn(T(n),{class:`size-4`,"aria-hidden":`true`}),me(),t(e,n)},c=e=>{var n=ti();gn(T(n),{class:`size-4`,"aria-hidden":`true`}),me(),t(e,n)};i(a,e=>{v(o)?e(s):e(c,-1)}),t(e,r)},$$slots:{default:!0}}),t(e,n)},P=e=>{var n=ri();t(e,n)};i(te,e=>{r.signInUrl?e(ne):e(P,-1)}),K(N);var I=_(N,2),L=D(I);K(s),ee(s,e=>G(u,e),()=>v(u)),K(n),w(()=>{h(b,v(m).title),h(S,v(m).description)}),l(`click`,n,e=>{e.target===e.currentTarget&&r.onCancel()}),l(`click`,L,function(...e){r.onCancel?.apply(this,e)}),t(e,n)};i(y,e=>{r.open&&e(b)}),t(e,g),I()}o([`click`]);function oi(){let e=W(null),t=W(!1),n=null;function r(){n&&=(clearTimeout(n),null)}function i(i,a,o=!1){let s=i.currentTarget;if(!(s instanceof HTMLElement))return;let c=s.getBoundingClientRect();r(),G(t,o,!0),G(e,{top:c.top-8,left:c.left+c.width/2,label:a},!0),o&&(n=setTimeout(()=>{G(t,!1),n=null,G(e,null)},2500))}function a(n=!1){(!v(t)||n)&&(r(),G(t,!1),G(e,null))}return s(()=>r),{get lockTooltip(){return v(e)},showLockTooltip:i,hideLockTooltip:a}}function si(e){function t(t){let n=t.target;n instanceof Node&&(e.getRoot()?.contains(n)||e.onOutside())}function n(t){t.key===`Escape`&&e.onEscape()}return document.addEventListener(`pointerdown`,t),document.addEventListener(`keydown`,n),()=>{document.removeEventListener(`pointerdown`,t),document.removeEventListener(`keydown`,n)}}var ci=p(`<div class="text-tooltip-foreground bg-tooltip ring-border pointer-events-none fixed z-100 -translate-x-1/2 -translate-y-full rounded-md px-2.5 py-1.5 text-[12px] leading-4 whitespace-nowrap shadow-lg ring-1" role="tooltip"> </div>`);function li(e,n){U(n,!0);var r=B(),a=T(r),o=e=>{var r=ci(),i=D(r,!0);w(()=>{re(r,`top: ${n.tooltip.top}px; left: ${n.tooltip.left}px;`),h(i,n.tooltip.label)}),t(e,r)};i(a,e=>{n.tooltip&&e(o)}),t(e,r),I()}var ui=p(`<label class="text-muted-foreground flex h-10 items-center gap-2 border-b border-[var(--hairline)] px-2"><!> <span class="sr-only"> </span> <input class="text-foreground placeholder:text-muted-foreground min-w-0 flex-1 bg-transparent text-sm outline-none"/></label>`),di=p(`<p class="text-muted-foreground px-3 pt-1 pb-2 text-[11px] font-medium"> </p>`),fi=p(`<span><!></span>`),pi=p(`<span class="text-muted-foreground shrink-0" aria-hidden="true"><!></span>`),mi=p(`<button type="button"><!> <span> </span> <!></button>`),hi=p(`<p class="text-muted-foreground px-3 py-5 text-center text-sm">No matches found</p>`),gi=p(`<div class="bg-popover/96 absolute bottom-[calc(100%+0.75rem)] left-0 z-50 min-w-[19rem] rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl" role="dialog"><!> <div><!> <!></div></div>`),_i=p(`<div><button type="button" aria-haspopup="dialog"><!> <span class="truncate"> </span> <!></button> <!></div> <!>`,1);function vi(e,n){U(n,!0);let r=R(n,`value`,15,``),a=R(n,`disabled`,3,!1),o=R(n,`className`,3,``),c=R(n,`triggerClassName`,3,``),u=R(n,`searchable`,3,!1),d=W(!1),p=W(``),m=W(null),g=W(null),b=W(null),x=oi(),S=z(()=>{let e=n.options.find(e=>e.id===r());return e&&!e.locked?e:n.options.find(e=>!e.locked)??e??n.options[0]??null}),C=z(()=>u()&&v(p).trim()?n.options.filter(e=>e.label.toLocaleLowerCase().includes(v(p).trim().toLocaleLowerCase())):n.options),k=z(()=>v(C).filter(e=>!e.locked));function A(){a()||(G(d,!v(d)),v(d)&&u()?queueMicrotask(()=>v(b)?.focus()):G(p,``))}function j(e,t){let i=n.options.find(t=>t.id===e);if(i){if(i.locked){t&&i.lockTooltip&&x.showLockTooltip(t,i.lockTooltip,!0);return}e!==r()&&(r(e),n.onValueChange?.(e)),G(d,!1),G(p,``),x.hideLockTooltip(!0),v(g)?.focus()}}function M(e){e.key===`Enter`&&v(k).length!==0&&(e.preventDefault(),j(v(k)[0].id))}s(()=>{if(!v(d)){G(p,``),x.hideLockTooltip();return}return si({getRoot:()=>v(m),onOutside:()=>{G(d,!1)},onEscape:()=>{G(d,!1),v(g)?.focus()}})}),s(()=>{a()&&G(d,!1)});var N=_i(),ne=T(N),P=E(ne),re=E(P),ie=e=>{var r=B(),i=T(r);y(i,()=>n.optionIcon,()=>v(S)),t(e,r)};i(re,e=>{n.optionIcon&&v(S)&&e(ie)});var oe=_(re,2),se=D(oe,!0),ce=_(oe,2);{let e=z(()=>X(`text-muted-foreground size-3 shrink-0 transition-transform`,v(d)&&`rotate-180`));rn(ce,{get class(){return v(e)}})}K(P),ee(P,e=>G(g,e),()=>v(g));var V=_(P,2),H=e=>{var a=gi(),o=E(a),s=e=>{var r=ui(),i=E(r);gr(i,{class:`size-4 shrink-0`});var a=_(i,2),o=D(a),s=_(a,2);te(s),ee(s,e=>G(b,e),()=>v(b)),K(r),w((e,t)=>{h(o,`Search ${e??``}`),F(s,`placeholder`,t)},[()=>n.menuTitle.toLocaleLowerCase(),()=>`Search ${n.menuTitle.toLocaleLowerCase()}…`]),l(`keydown`,s,M),ae(s,()=>v(p),e=>G(p,e)),t(e,r)},c=e=>{var r=di(),i=D(r,!0);w(()=>h(i,n.menuTitle)),t(e,r)};i(o,e=>{u()?e(s):e(c,-1)});var d=_(o,2),m=E(d);he(m,17,()=>v(C),e=>e.id,(e,a)=>{let o=z(()=>!!v(a).locked);var s=mi(),c=E(s),u=e=>{var r=fi(),i=E(r);y(i,()=>n.optionIcon,()=>v(a)),K(r),w(e=>L(r,1,e),[()=>O(X(`flex size-7 shrink-0 items-center justify-center`,(v(o),`text-muted-foreground`)))]),t(e,r)};i(c,e=>{n.optionIcon&&e(u)});var d=_(c,2),p=D(d,!0),m=_(d,2),g=e=>{var n=pi();Jn(E(n),{class:`size-3.5`}),K(n),t(e,n)},b=e=>{{let t=z(()=>X(`text-accent-strong size-4 shrink-0 transition-opacity`,v(a).id===r()?`opacity-100`:`opacity-0`));tn(e,{get class(){return v(t)}})}};i(m,e=>{v(o)?e(g):e(b,-1)}),K(s),w((e,t)=>{L(s,1,e),F(s,`aria-pressed`,!v(o)&&v(a).id===r()),F(s,`aria-disabled`,v(o)),F(s,`aria-label`,v(o)&&v(a).lockTooltip?`${v(a).label}. ${v(a).lockTooltip}`:void 0),L(d,1,t),h(p,v(a).label)},[()=>O(X(`focus-visible:ring-ring/60 flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left outline-none focus-visible:ring-2`,v(o)?`cursor-not-allowed opacity-45`:`hover:bg-hover-fill`,!v(o)&&v(a).id===r()&&`bg-hover-fill`)),()=>O(X(`min-w-0 flex-1 truncate text-sm font-medium`,v(o)?`text-muted-foreground`:`text-foreground`))]),f(`mouseenter`,s,e=>{v(o)&&v(a).lockTooltip&&x.showLockTooltip(e,v(a).lockTooltip)}),f(`mouseleave`,s,()=>x.hideLockTooltip()),f(`focus`,s,e=>{v(o)&&v(a).lockTooltip&&x.showLockTooltip(e,v(a).lockTooltip)}),f(`blur`,s,()=>x.hideLockTooltip()),l(`click`,s,e=>{j(v(a).id,e)}),t(e,s)});var g=_(m,2),S=e=>{var n=hi();t(e,n)};i(g,e=>{v(C).length===0&&e(S)}),K(d),K(a),w(e=>{F(a,`aria-label`,n.menuTitle),L(d,1,e)},[()=>O(X(`space-y-0.5`,u()&&`pt-1.5`))]),t(e,a)};i(V,e=>{v(d)&&e(H)}),K(ne),ee(ne,e=>G(m,e),()=>v(m)),li(_(ne,2),{get tooltip(){return x.lockTooltip}}),w((e,t)=>{L(ne,1,e),L(P,1,t),F(P,`aria-expanded`,v(d)),F(P,`aria-label`,n.ariaLabel),P.disabled=a(),h(se,v(S)?.triggerLabel??v(S)?.label??r())},[()=>O(X(`relative`,o())),()=>O(X(`focus-visible:ring-ring/60 text-muted-foreground hover:bg-hover-fill inline-flex h-8 shrink-0 items-center gap-2 rounded-lg border border-transparent bg-transparent px-2 text-sm font-medium transition outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50`,!n.optionIcon&&`gap-1`,c()))]),l(`click`,P,A),t(e,N),I()}o([`click`,`keydown`]);var yi=m(`<title> </title>`),bi=m(`<svg viewBox="146.694 227.042 267.198 264.812" xmlns="http://www.w3.org/2000/svg" role="img" fill="none"><!><path d="M249.176 323.434V298.276C249.176 296.158 249.971 294.569 251.825 293.509L302.406 264.381C309.29 260.409 317.5 258.555 325.973 258.555C357.75 258.555 377.877 283.185 377.877 309.399C377.877 311.253 377.877 313.371 377.611 315.49L325.178 284.771C322.001 282.919 318.822 282.919 315.645 284.771L249.176 323.434ZM367.283 421.415V361.301C367.283 357.592 365.694 354.945 362.516 353.092L296.048 314.43L317.763 301.982C319.617 300.925 321.206 300.925 323.058 301.982L373.639 331.112C388.205 339.586 398.003 357.592 398.003 375.069C398.003 395.195 386.087 413.733 367.283 421.412V421.415ZM233.553 368.452L211.838 355.742C209.986 354.684 209.19 353.095 209.19 350.975V292.718C209.19 264.383 230.905 242.932 260.301 242.932C271.423 242.932 281.748 246.641 290.49 253.26L238.321 283.449C235.146 285.303 233.555 287.951 233.555 291.659V368.455L233.553 368.452ZM280.292 395.462L249.176 377.985V340.913L280.292 323.436L311.407 340.913V377.985L280.292 395.462ZM300.286 475.968C289.163 475.968 278.837 472.259 270.097 465.64L322.264 435.449C325.441 433.597 327.03 430.949 327.03 427.239V350.445L349.011 363.155C350.865 364.213 351.66 365.802 351.66 367.922V426.179C351.66 454.514 329.679 475.965 300.286 475.965V475.968ZM237.525 416.915L186.944 387.785C172.378 379.31 162.582 361.305 162.582 343.827C162.582 323.436 174.763 305.164 193.563 297.485V357.861C193.563 361.571 195.154 364.217 198.33 366.071L264.535 404.467L242.82 416.915C240.967 417.972 239.377 417.972 237.525 416.915ZM234.614 460.343C204.689 460.343 182.71 437.833 182.71 410.028C182.71 407.91 182.976 405.792 183.238 403.672L235.405 433.863C238.582 435.715 241.763 435.715 244.938 433.863L311.407 395.466V420.622C311.407 422.742 310.612 424.331 308.758 425.389L258.179 454.519C251.293 458.491 243.083 460.343 234.611 460.343H234.614ZM300.286 491.854C332.329 491.854 359.073 469.082 365.167 438.892C394.825 431.211 413.892 403.406 413.892 375.073C413.892 356.535 405.948 338.529 391.648 325.552C392.972 319.991 393.766 314.43 393.766 308.87C393.766 271.003 363.048 242.666 327.562 242.666C320.413 242.666 313.528 243.723 306.644 246.109C294.725 234.457 278.307 227.042 260.301 227.042C228.258 227.042 201.513 249.815 195.42 280.004C165.761 287.685 146.694 315.49 146.694 343.824C146.694 362.362 154.638 380.368 168.938 393.344C167.613 398.906 166.819 404.467 166.819 410.027C166.819 447.894 197.538 476.231 233.024 476.231C240.172 476.231 247.058 475.173 253.943 472.788C265.859 484.441 282.278 491.854 300.286 491.854Z" fill="currentColor"></path></svg>`);function xi(e,n){U(n,!0);let r=R(n,`className`,3,``),a=R(n,`title`,3,`OpenAI`);var o=bi(),s=E(o),c=e=>{var n=yi(),r=D(n,!0);w(()=>h(r,a())),t(e,n)};i(s,e=>{a()&&e(c)}),me(),K(o),w(e=>{L(o,0,e),F(o,`aria-hidden`,!a()||void 0)},[()=>O(X(`size-4`,r()))]),t(e,o),I()}var Si=m(`<svg viewBox="0 0 24 24" role="img" aria-label="Anthropic" fill="currentColor"><path d="M17.304 3.541h-3.672l6.696 16.918H24Zm-10.608 0L0 20.459h3.744l1.37-3.553h7.005l1.369 3.553h3.744L10.536 3.541Zm-.371 10.223 2.291-5.945 2.292 5.945Z"></path></svg>`),Ci=m(`<svg viewBox="0 0 24 24" role="img" aria-label="xAI" fill="currentColor"><path d="M6.469 8.776 16.512 23h-4.464L2.005 8.776H6.47Zm-.004 7.9 2.233 3.164L6.467 23H2l4.465-6.324ZM22 2.582V23h-3.659V7.764L22 2.582ZM22 1l-9.952 14.095-2.233-3.163L17.533 1H22Z"></path></svg>`),wi=m(`<svg viewBox="0 0 24 24" role="img" aria-label="Z.AI" fill="currentColor"><path d="M12.606 1.806l-1.677 2.388c-0.258 0.374-0.697 0.606-1.161 0.606h-9.162V1.794C0.594 1.806 12.606 1.806 12.606 1.806zM24 1.806L9.6 22.206 0 22.206 14.4 1.806zM11.394 22.206l1.69-2.4c0.258-0.374 0.697-0.606 1.161-0.606h9.149v3.006H11.394z"></path></svg>`),Ti=m(`<svg viewBox="0 0 24 24" role="img" aria-label="DeepSeek" fill="currentColor"><path d="M23.748 4.651c-.254-.124-.364.113-.512.233-.051.04-.094.09-.137.137-.372.397-.806.657-1.373.626-.829-.046-1.537.214-2.163.848-.133-.782-.575-1.248-1.247-1.548-.352-.155-.708-.311-.955-.65-.172-.24-.219-.509-.305-.774-.055-.16-.11-.323-.293-.35-.2-.031-.278.136-.356.276-.313.572-.434 1.202-.422 1.84.027 1.436.633 2.58 1.838 3.393.137.094.172.187.129.323-.082.28-.18.553-.266.833-.055.179-.137.218-.328.14a5.5 5.5 0 0 1-1.737-1.179c-.857-.828-1.631-1.743-2.597-2.46a12 12 0 0 0-.689-.47c-.985-.957.13-1.743.387-1.836.27-.098.094-.433-.778-.428-.872.003-1.67.295-2.687.685a3 3 0 0 1-.465.136 9.6 9.6 0 0 0-2.883-.101c-1.885.21-3.39 1.1-4.497 2.622C.082 8.776-.231 10.854.152 13.02c.403 2.284 1.568 4.175 3.36 5.653 1.857 1.533 3.997 2.284 6.438 2.14 1.482-.085 3.132-.284 4.994-1.86.47.234.962.328 1.78.398.629.058 1.235-.031 1.705-.129.735-.155.684-.836.418-.961-2.155-1.004-1.682-.595-2.112-.926 1.095-1.295 2.768-3.598 3.284-6.733.05-.346.115-.834.108-1.114-.004-.171.035-.238.23-.257a4.2 4.2 0 0 0 1.545-.475c1.397-.763 1.96-2.016 2.093-3.517.02-.23-.004-.467-.247-.588M11.58 18.168c-2.088-1.642-3.101-2.183-3.52-2.16-.39.024-.32.472-.234.763.09.288.207.487.371.74.114.167.192.416-.113.603-.673.416-1.842-.14-1.897-.168-1.361-.801-2.5-1.86-3.301-3.306-.775-1.393-1.225-2.888-1.299-4.482-.02-.385.094-.522.477-.592a4.7 4.7 0 0 1 1.53-.038c2.131.311 3.946 1.264 5.467 2.774.868.86 1.525 1.887 2.202 2.89.72 1.066 1.494 2.082 2.48 2.915.348.291.626.513.892.677-.802.09-2.14.109-3.055-.615zm1.001-6.44a.306.306 0 0 1 .415-.287.3.3 0 0 1 .113.074.3.3 0 0 1 .086.214c0 .17-.136.307-.308.307a.303.303 0 0 1-.306-.307m3.11 1.596c-.2.081-.4.151-.591.16a1.25 1.25 0 0 1-.798-.254c-.274-.23-.47-.358-.551-.758a1.7 1.7 0 0 1 .015-.588c.07-.327-.007-.537-.238-.727-.188-.156-.426-.199-.689-.199a.6.6 0 0 1-.254-.078.253.253 0 0 1-.114-.358 1 1 0 0 1 .192-.21c.356-.202.767-.136 1.146.016.352.144.618.408 1.001.782.392.451.462.576.685.915.176.264.336.536.446.848.066.194-.02.353-.25.45"></path></svg>`),Ei=m(`<svg viewBox="0 0 465 465" role="img" aria-label="Moonshot AI" fill="currentColor"><path fill-rule="evenodd" clip-rule="evenodd" d="M418.766 93.78C388.626 53.17 345.086 22.07 292.446 7.97C239.806 -6.13 186.536 -0.97 140.136 19.13L418.766 93.78ZM40.7758 100.85C61.3758 70.84 88.5858 46.43 119.776 29.15L325.036 84.15C311.566 91.92 297.136 105.31 285.966 120.03L454.736 165.25C459.526 181.08 462.646 197.49 463.956 214.24L40.7758 100.85ZM456.686 292.45C454.306 301.35 451.436 309.99 448.116 318.34L2.44584 198.93C3.74584 190.03 5.58584 181.12 7.96584 172.22C13.5658 151.31 21.8458 131.84 32.3458 114.08L250.436 172.52C241.706 185 233.756 198.56 226.756 213.07L460.516 275.71C459.446 281.3 458.166 286.88 456.676 292.47L456.686 292.45ZM13.4858 310.23C2.67584 279.96 -1.93416 247.22 0.745843 213.95L206.426 269.06C204.946 273.74 203.556 278.48 202.266 283.29C199.646 293.08 197.506 302.85 195.846 312.55L417.946 372.06C407.606 385.79 395.826 398.23 382.896 409.21L13.4858 310.23ZM172.206 456.69C102.096 437.9 48.1158 388.98 20.4758 327.59L187.846 372.44C187.576 388.05 188.546 403.26 190.676 417.85L312.286 450.43C268.876 466.39 220.286 469.57 172.206 456.69Z"></path></svg>`),Di=m(`<svg viewBox="0 0 24 24" role="img" fill="none" stroke="currentColor" stroke-width="1.5"><circle cx="12" cy="12" r="9"></circle><path d="M12 8v4l2.5 1.5" stroke-linecap="round" stroke-linejoin="round"></path></svg>`);function Oi(e,n){U(n,!0);let r=R(n,`className`,3,``);var a=B(),o=T(a),s=e=>{{let t=z(()=>X(`size-4 text-foreground`,r()));xi(e,{get className(){return v(t)}})}},c=e=>{var n=Si();w(e=>L(n,0,e),[()=>O(X(`size-4 text-[#D97757]`,r()))]),t(e,n)},l=e=>{var n=Ci();w(e=>L(n,0,e),[()=>O(X(`text-foreground size-4`,r()))]),t(e,n)},u=e=>{var n=wi();w(e=>L(n,0,e),[()=>O(X(`text-foreground size-4`,r()))]),t(e,n)},d=e=>{var n=Ti();w(e=>L(n,0,e),[()=>O(X(`size-4 text-[#4D6BFE]`,r()))]),t(e,n)},f=e=>{var n=Ei();w(e=>L(n,0,e),[()=>O(X(`text-foreground size-4`,r()))]),t(e,n)},p=e=>{var i=Di();w(e=>{L(i,0,e),F(i,`aria-label`,n.provider||`Unknown provider`)},[()=>O(X(`text-muted-foreground size-4`,r()))]),t(e,i)};i(o,e=>{n.provider===`openai`?e(s):n.provider===`anthropic`?e(c,1):n.provider===`xai`?e(l,2):n.provider===`zai`?e(u,3):n.provider===`deepseek`?e(d,4):n.provider===`kimi`?e(f,5):e(p,-1)}),t(e,a),I()}var ki=[`none`,`low`,`medium`,`high`,`xhigh`,`max`],Ai=`gpt-5.6-sol`,ji=`high`,Mi=`/api`,Ni=`Model catalog is unavailable.`;function Pi(e,t){return e.models.find(e=>e.id===t)}function Fi(e,t,n){return(e.tierAllowedModels[t]??[]).includes(n)}function Ii(e,t,n){return Fi(e,t,n)?n:e.tierAllowedModels[t]?.[0]??e.defaultModelId}function Li(e,t,n){return n.supportsFastMode?e.tierAllowsFastMode[t]?`available`:`locked`:`unsupported`}function Ri(e){return e.reasoningEfforts.length!==1||e.reasoningEfforts[0]!==`none`}function zi(e,t){let n=[],r=[];for(let i of e.models){let a={id:i.id,label:i.label,provider:i.provider};Fi(e,t,i.id)?n.push(a):r.push({...a,locked:!0,lockTooltip:e.modelLockUpgradeMessage})}return[...n,...r]}function Bi(e){switch(e){case`none`:return`None`;case`low`:return`Low`;case`medium`:return`Medium`;case`high`:return`High`;case`xhigh`:return`Extra High`;case`max`:return`Max`;default:return e}}var Vi=q({id:je().min(1),label:je().min(1),provider:je().min(1),supportsImages:Be(),contextWindowTokens:J(),autoCompactTokenLimit:J(),reasoningEfforts:ye(je()).min(1),defaultReasoningEffort:je().min(1),serviceTiers:ye(je()).min(1),usagePolicy:be(`unlimited`).optional()}),Hi=Me({sprocket:Me({protocolVersion:J(),catalogVersion:je().min(1),defaultModelId:je().min(1),defaultReasoningEffort:je().min(1),defaultServiceTier:je().min(1),models:ye(Vi).min(1),tierAllowedModels:Me({free:ye(je()),pro:ye(je()),max:ye(je()),admin:ye(je())}),tierAllowedServiceTiers:Me({free:ye(je()),pro:ye(je()),max:ye(je()),admin:ye(je())}),modelLockUpgradeMessage:je().min(1),serviceTierLockUpgradeMessage:je().min(1)})});function Ui(e){let t=e.sprocket;if(t.protocolVersion!==1)throw Error(`${Ni} Unsupported protocol version ${t.protocolVersion}.`);return{protocolVersion:t.protocolVersion,catalogVersion:t.catalogVersion,defaultModelId:t.defaultModelId,defaultReasoningEffort:t.defaultReasoningEffort,models:t.models.map(e=>({id:e.id,label:e.label,provider:e.provider,supportsImages:e.supportsImages,contextWindowTokens:e.contextWindowTokens,autoHandoffTokenLimit:e.autoCompactTokenLimit,reasoningEfforts:e.reasoningEfforts,defaultReasoningEffort:e.defaultReasoningEffort,supportsFastMode:e.serviceTiers.includes(`fast`),usagePolicy:e.usagePolicy})),tierAllowedModels:t.tierAllowedModels,tierAllowsFastMode:{free:t.tierAllowedServiceTiers.free.includes(`fast`),pro:t.tierAllowedServiceTiers.pro.includes(`fast`),max:t.tierAllowedServiceTiers.max.includes(`fast`),admin:t.tierAllowedServiceTiers.admin.includes(`fast`)},modelLockUpgradeMessage:t.modelLockUpgradeMessage,fastModeLockUpgradeMessage:t.serviceTierLockUpgradeMessage}}async function Wi(e){let t=e.replace(/\/+$/,``);if(!t)throw Error(Ni);let n=await fetch(`${t}${Mi}/v1/models`,{headers:{accept:`application/json`}});if(!n.ok)throw Error(Ni);let r=Hi.safeParse(await n.json());if(!r.success)throw Error(Ni);return Ui(r.data)}var Gi=p(`<span class="text-muted-foreground ml-auto text-xs">Default</span>`),Ki=p(`<button type="button" class="focus-visible:ring-ring/60 text-foreground hover:bg-hover-fill flex w-full items-center gap-3 rounded-xl px-3 py-2 text-left text-sm outline-none focus-visible:ring-2"><!> <span> </span> <!></button>`),qi=p(`<p class="text-muted-foreground px-3 pt-1 pb-1.5 text-[11px] font-medium">Reasoning</p> <div class="space-y-0.5"></div>`,1),Ji=p(`<div class="mx-2 my-2 h-px bg-[var(--hairline)]"></div>`),Yi=p(`<span class="text-muted-foreground shrink-0" aria-hidden="true"><!></span>`),Xi=p(`<span class="size-3.5 shrink-0" aria-hidden="true"></span>`),Zi=p(`<!> <p class="text-muted-foreground px-3 pb-1.5 text-[11px] font-medium">Speed</p> <div class="space-y-0.5"><button type="button" role="switch"><!> <!> <span>Fast</span> <span aria-hidden="true"><span></span></span></button></div>`,1),Qi=p(`<div class="bg-popover/96 absolute bottom-[calc(100%+0.75rem)] left-0 z-50 min-w-[15rem] rounded-[18px] border border-[var(--hairline)] p-2 shadow-[var(--composer-shadow)] backdrop-blur-xl" role="dialog"><!> <!></div>`),$i=p(`<div><button type="button" class="focus-visible:ring-ring/60 text-muted-foreground hover:bg-hover-fill inline-flex h-9 shrink-0 items-center gap-1 rounded-lg px-2 text-[15px] transition outline-none focus-visible:ring-2 disabled:pointer-events-none disabled:opacity-50" aria-haspopup="dialog"><span> </span> <!></button> <!></div>`),ea=p(`<!> <!>`,1);function ta(n,r){U(r,!0);let a=R(r,`reasoningEffort`,31,()=>e(ji)),o=R(r,`fastMode`,15,!1),c=R(r,`disabled`,3,!1),u=R(r,`className`,3,``),d=W(!1),p=W(null),m=W(null),g=oi(),y=z(()=>Ri(r.model)),b=z(()=>r.fastModeAccess===`available`||r.fastModeAccess===`locked`),x=z(()=>v(y)?`${Bi(a())}${o()&&r.model.supportsFastMode?` · Fast`:``}`:o()?`Fast`:`Speed`),S=z(()=>v(y)&&v(b)?`Select reasoning effort and Fast mode`:v(y)?`Select reasoning effort`:`Select Fast mode`),C=z(()=>v(y)&&v(b)?`Reasoning and Fast mode`:v(y)?`Reasoning`:`Fast mode`);function k(e){a(e)}function A(e){if(r.fastModeAccess===`locked`){r.fastModeLockTooltip&&g.showLockTooltip(e,r.fastModeLockTooltip,!0);return}r.fastModeAccess===`available`&&o(!o())}s(()=>{r.model.reasoningEfforts.includes(a())||a(r.model.defaultReasoningEffort),(r.fastModeAccess===`unsupported`||r.fastModeAccess===`locked`)&&o(!1)}),s(()=>{if(!v(d)){g.hideLockTooltip();return}return si({getRoot:()=>v(p),onOutside:()=>{G(d,!1)},onEscape:()=>{G(d,!1),v(m)?.focus()}})}),s(()=>{(c()||!v(y)&&!v(b))&&G(d,!1)});var j=ea(),M=T(j),N=e=>{var n=$i(),s=E(n),j=E(s),M=D(j,!0),N=_(j,2);{let e=z(()=>X(`text-muted-foreground size-3 shrink-0 transition-transform`,v(d)&&`rotate-180`));rn(N,{get class(){return v(e)}})}K(s),ee(s,e=>G(m,e),()=>v(m));var te=_(s,2),ne=e=>{var n=Qi(),s=E(n),c=e=>{var n=qi(),o=_(T(n),2);he(o,20,()=>r.model.reasoningEfforts,e=>e,(e,n)=>{var o=Ki(),s=E(o);{let e=z(()=>X(`size-4 shrink-0 transition-opacity`,n===a()?`opacity-100`:`opacity-0`));tn(s,{get class(){return v(e)}})}var c=_(s,2),u=D(c,!0),d=_(c,2),f=e=>{var n=Gi();t(e,n)};i(d,e=>{n===r.model.defaultReasoningEffort&&e(f)}),K(o),w(e=>{F(o,`aria-pressed`,n===a()),h(u,e)},[()=>Bi(n)]),l(`click`,o,()=>k(n)),t(e,o)}),K(o),t(e,n)};i(s,e=>{v(y)&&e(c)});var u=_(s,2),d=e=>{let n=z(()=>r.fastModeAccess===`locked`);var a=Zi(),s=T(a),c=e=>{var n=Ji();t(e,n)};i(s,e=>{v(y)&&e(c)});var u=_(s,4),d=E(u),p=E(d),m=e=>{var n=Yi();Jn(E(n),{class:`size-3.5`}),K(n),t(e,n)},h=e=>{var n=Xi();t(e,n)};i(p,e=>{v(n)?e(m):e(h,-1)});var b=_(p,2);Br(b,{class:`size-3.5 shrink-0 text-amber-400`});var x=_(b,2),S=_(x,2),C=D(S);K(d),K(u),w((e,t,i,a)=>{L(d,1,e),F(d,`aria-checked`,!v(n)&&o()),F(d,`aria-disabled`,v(n)),F(d,`aria-label`,v(n)&&r.fastModeLockTooltip?`Fast mode. ${r.fastModeLockTooltip}`:void 0),L(x,1,t),L(S,1,i),L(C,1,a)},[()=>O(X(`focus-visible:ring-ring/60 flex w-full items-center gap-3 rounded-xl px-3 py-2 text-left text-sm outline-none focus-visible:ring-2`,v(n)?`cursor-not-allowed opacity-45`:`text-foreground hover:bg-hover-fill`)),()=>O(X(v(n)&&`text-muted-foreground`)),()=>O(X(`relative ml-auto inline-flex h-5 w-9 shrink-0 items-center rounded-full transition`,o()&&!v(n)?`bg-foreground`:`bg-hover-fill-strong`)),()=>O(X(`bg-background inline-block size-3.5 rounded-full transition`,o()&&!v(n)?`translate-x-[18px]`:`translate-x-[3px]`))]),f(`mouseenter`,d,e=>{v(n)&&r.fastModeLockTooltip&&g.showLockTooltip(e,r.fastModeLockTooltip)}),f(`mouseleave`,d,()=>g.hideLockTooltip()),f(`focus`,d,e=>{v(n)&&r.fastModeLockTooltip&&g.showLockTooltip(e,r.fastModeLockTooltip)}),f(`blur`,d,()=>g.hideLockTooltip()),l(`click`,d,A),t(e,a)};i(u,e=>{v(b)&&e(d)}),K(n),w(()=>F(n,`aria-label`,v(C))),t(e,n)};i(te,e=>{v(d)&&e(ne)}),K(n),ee(n,e=>G(p,e),()=>v(p)),w(e=>{L(n,1,e),F(s,`aria-expanded`,v(d)),F(s,`aria-label`,v(S)),s.disabled=c(),h(M,v(x))},[()=>O(X(`relative`,u()))]),l(`click`,s,()=>{G(d,!v(d))}),t(e,n)};i(M,e=>{(v(y)||v(b))&&e(N)}),li(_(M,2),{get tooltip(){return g.lockTooltip}}),t(n,j),I()}o([`click`]);var na=`agent_decide`;function ra(e){return!!e.selectedOptionId?.trim()||!!e.text.trim()}var ia=p(`<li><button type="button"> </button></li>`),aa=p(`<div class="mb-3" role="group" aria-label="Agent question"><p class="text-foreground text-[14px] leading-6 font-medium"> </p> <ul class="mt-2 flex flex-col gap-1.5" aria-label="Answer options"></ul></div>`);function oa(e,n){U(n,!0);var r=aa(),i=E(r),a=D(i,!0),o=_(i,2);he(o,21,()=>n.options,e=>e.id,(e,r)=>{let i=z(()=>v(r).id===na),a=z(()=>n.selectedOptionId===v(r).id);var o=ia(),s=E(o),c=D(s,!0);K(o),w(()=>{L(s,1,`w-full rounded-lg border px-3 py-2 text-left text-[13px] leading-5 transition ${v(a)?`border-foreground/40 bg-hover-fill-strong text-foreground`:v(i)?`border-border/70 text-muted-foreground/80 hover:text-muted-foreground hover:bg-hover-fill`:`border-border text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`),F(s,`aria-pressed`,v(a)),h(c,v(r).label)}),l(`click`,s,()=>n.onToggleOption(v(r).id)),t(e,o)}),K(o),K(r),w(()=>h(a,n.question)),t(e,r),I()}o([`click`]);function sa(e,t){let n=e??[],r=t??[];return n.length===r.length&&n.every((e,t)=>e===r[t])}var ca=new Set([`image/jpeg`,`image/png`,`image/gif`,`image/webp`]);function la(e){return ca.has(e.toLowerCase())}function ua(e){let t=e.trim();return t.length>0?t:`application/octet-stream`}function da(e){let t=e.name.trim();return t.length>0?t:`Attached file`}function fa(e){return e<1024?`${e} B`:e<1048576?`${Math.max(1,Math.round(e/1024))} KiB`:`${(e/1048576).toFixed(1).replace(/\.0$/,``)} MiB`}function pa(e){e?.startsWith(`blob:`)&&URL.revokeObjectURL(e)}function ma(e){return!e.url&&la(e.mediaType)}function ha(e,t){let n=document.createElement(`a`);n.href=e,n.download=t,n.rel=`noopener`,document.body.append(n),n.click(),n.remove()}var ga=p(`<img/>`),_a=p(`<!> <span class="min-w-0 text-[12px] leading-4"><span class="text-foreground block truncate"> </span> <span class="text-muted-foreground block"> </span></span>`,1),va=p(`<span role="status"><span class="border-border border-t-foreground/80 size-3.5 animate-spin rounded-full border-2"></span></span>`),ya=p(`<span class="text-destructive absolute inset-x-0 bottom-0 bg-rose-950/80 px-1 py-0.5 text-center text-[9px] leading-3" role="alert">Failed</span>`),ba=p(`<li><!> <!> <button type="button" class="bg-foreground/70 text-background hover:bg-foreground/90 absolute top-1 right-1 flex size-4.5 cursor-pointer items-center justify-center rounded-full transition disabled:cursor-not-allowed disabled:opacity-40"><!></button></li>`),xa=p(`<ul class="mb-3 flex max-h-36 flex-wrap items-center gap-2 overflow-y-auto" aria-label="Attached files"></ul>`);function Sa(e,n){U(n,!0);var r=xa();he(r,21,()=>n.attachments,e=>e.localId,(e,r)=>{let a=z(()=>la(v(r).mediaType)&&!!v(r).previewUrl);var o=ba(),s=E(o),c=e=>{var n=ga();w(()=>{F(n,`src`,v(r).previewUrl),F(n,`alt`,v(r).name),L(n,1,`size-full object-cover ${v(r).status===`uploading`?`opacity-50`:``}`)}),t(e,n)},u=e=>{var n=_a(),i=T(n);Mn(i,{class:`text-muted-foreground size-4 shrink-0`,"aria-hidden":`true`});var a=_(i,2),o=E(a),s=D(o,!0),c=_(o,2),l=D(c,!0);K(a),w(e=>{h(s,v(r).name),h(l,e)},[()=>fa(v(r).size)]),t(e,n)};i(s,e=>{v(a)?e(c):e(u,-1)});var d=_(s,2),f=e=>{var n=va();w(()=>{L(n,1,`absolute inset-0 flex items-center justify-center ${v(a)?``:`bg-background/60`}`),F(n,`aria-label`,`Uploading ${v(r).name??``}`)}),t(e,n)},p=e=>{var n=ya();t(e,n)};i(d,e=>{v(r).status===`uploading`?e(f):v(r).status===`error`&&e(p,1)});var m=_(d,2);Rr(E(m),{class:`size-3`,"aria-hidden":`true`}),K(m),K(o),w(e=>{L(o,1,O(v(a)?`group relative size-14 overflow-hidden rounded-xl border ${v(r).status===`error`?`border-rose-500/60`:`border-border`}`:`group relative flex h-14 max-w-56 items-center gap-2 overflow-hidden rounded-xl border pr-7 pl-2 ${v(r).status===`error`?`border-rose-500/60`:`border-border`}`)),F(o,`title`,e),F(m,`aria-label`,`Remove ${v(r).name??``}`),m.disabled=n.disabled},[()=>v(r).error??`${v(r).name} · ${fa(v(r).size)}`]),l(`click`,m,()=>n.onRemove(v(r).localId)),t(e,o)}),K(r),t(e,r),I()}o([`click`]);var Ca=p(`<p class="text-muted-foreground px-3 py-2 text-sm">Loading skills…</p>`),wa=p(`<div class="flex items-center justify-between gap-3 px-3 py-2"><p class="text-muted-foreground text-sm">Couldn’t load skills</p> <button type="button" class="text-muted-foreground hover:text-foreground text-sm underline-offset-2 hover:underline">Retry</button></div>`),Ta=p(`<p class="text-muted-foreground px-3 py-2 text-sm">No matching skills</p>`),Ea=p(`<button type="button" role="option"><span class="text-sm font-medium"> </span> <span class="text-muted-foreground line-clamp-2 text-[12px]"> </span></button>`),Da=p(`<div class="border-border bg-popover absolute inset-x-0 bottom-full z-30 mb-2 max-h-56 overflow-y-auto rounded-xl border py-1 shadow-2xl" id="composer-skills-listbox" aria-label="Available skills"><!></div>`);function Oa(n,r){U(r,!0);let a=e([]);s(()=>{r.skills.length>0&&a[r.highlightedIndex]?.scrollIntoView({block:`nearest`})});var o=Da(),c=E(o),u=e=>{var n=Ca();t(e,n)},d=e=>{var n=wa(),i=_(E(n),2);K(n),l(`click`,i,function(...e){r.onRetry?.apply(this,e)}),t(e,n)},p=e=>{var n=Ta();t(e,n)},m=e=>{var n=B(),i=T(n);he(i,19,()=>r.skills,e=>e.name,(e,n,i)=>{var o=Ea(),s=E(o),c=D(s),u=_(s,2),d=D(u,!0);K(o),ee(o,(e,t)=>a[t]=e,e=>a?.[e],()=>[v(i)]),w(()=>{F(o,`id`,`composer-skill-option-${v(i)??``}`),L(o,1,`flex w-full flex-col gap-0.5 px-3 py-2 text-left transition ${r.highlightedIndex===v(i)?`text-foreground bg-hover-fill-strong`:`text-muted-foreground hover:text-foreground hover:bg-hover-fill`}`),F(o,`aria-selected`,r.highlightedIndex===v(i)),h(c,`$${v(n).name??``}`),h(d,v(n).description)}),f(`pointerenter`,o,()=>r.onHighlight(v(i))),l(`click`,o,()=>r.onSelect(v(n))),t(e,o)}),t(e,n)};i(c,e=>{r.loadState===`loading`?e(u):r.loadState===`error`?e(d,1):r.skills.length===0?e(p,2):e(m,-1)}),K(o),w(()=>F(o,`role`,r.loadState===`ready`&&r.skills.length>0?`listbox`:`status`)),t(n,o),I()}o([`click`]);function ka(e){return e.key===`Enter`&&!e.shiftKey&&!e.isComposing}var Aa=/(^|\s)\$([a-z0-9-]*)$/i;function ja(e,t){if(t<0||t>e.length)return null;let n=e.slice(0,t).match(Aa);return!n||n.index===void 0?null:{query:n[2].toLowerCase(),tokenStart:n.index+n[1].length}}function Ma(e,t){return ja(e,t)?.query??null}function Na(e,t){let n=t.toLowerCase(),r=[],i=[];for(let t of e){let e=t.name.toLowerCase();e.startsWith(n)?r.push(t):n.length>0&&e.includes(n)&&i.push(t)}return r.sort((e,t)=>e.name.localeCompare(t.name)),i.sort((e,t)=>e.name.localeCompare(t.name)),[...r,...i]}function Pa(e,t,n){let r=ja(e,t);if(!r)return null;let i=t;for(;i<e.length&&/[a-z0-9-]/i.test(e[i]??``);)i+=1;e[i]===` `&&(i+=1);let a=`$${n} `;return{text:`${e.slice(0,r.tokenStart)}${a}${e.slice(i)}`,caret:r.tokenStart+a.length}}function Fa(e){let t=Math.floor(e/60),n=e%60;return t===0?`${n}s`:`${t}m ${n}s`}function Ia(e){let t=Math.max(0,e),n=Math.ceil(t/36e5);if(n>=24){let e=Math.floor(n/24),t=n%24;return t>0?`${e}d ${t}h`:`${e}d`}return t>=36e5?`${n}h`:`${Math.max(1,Math.ceil(t/6e4))}m`}function La(e){let t=Math.max(0,Math.floor(e/1e3)),n=Math.floor(t/86400),r=Math.floor(t%86400/3600),i=Math.floor(t%3600/60),a=t%60;return n>0?r>0?`${n}d ${r}h`:`${n}d`:r>0?i>0?`${r}h ${i}m`:`${r}h`:i>0?`${i}m ${a}s`:`${a}s`}var Ra=p(`<div class="text-muted-foreground mb-3 flex items-center gap-2 px-4 text-[11px]"><span class="inline-flex items-center gap-0.75"><span class="bg-foreground/28 size-1 animate-pulse rounded-full"></span> <span class="bg-foreground/28 size-1 animate-pulse rounded-full [animation-delay:200ms]"></span> <span class="bg-foreground/28 size-1 animate-pulse rounded-full [animation-delay:400ms]"></span></span> <span> </span></div>`),za=p(`<div class="text-muted-foreground mb-3 flex items-center gap-2 px-4 text-[11px]" role="status" aria-live="polite"><span class="bg-foreground/28 size-1.5 animate-pulse rounded-full"></span> <span> </span></div>`),Ba=p(`<div class="mx-auto mb-3 w-full max-w-[48rem] px-4"><button type="button" class="border-border bg-surface/80 text-foreground hover:bg-hover-fill rounded-full border px-3 py-1.5 text-[13px] font-medium transition">Continue working</button></div>`),Va=p(`<div class="mb-3 flex items-start gap-2.5 rounded-xl border border-amber-500/25 bg-amber-500/10 px-3.5 py-3" role="alert"><!> <div class="min-w-0"><p class="text-[13px] leading-5 font-medium text-amber-800 dark:text-amber-200">You're out of usage</p> <p class="text-[12.5px] leading-5 text-amber-800/90 dark:text-amber-200/90"> </p></div></div>`),Ha=p(`<div class="bg-hover-fill-strong mx-1 hidden h-4 w-px shrink-0 sm:block"></div>`),Ua=p(`<!> <!>`,1),Wa=p(`<button type="button" class="flex h-10 w-10 cursor-pointer items-center justify-center rounded-full bg-rose-500/90 text-white transition-all duration-150 hover:scale-105 hover:bg-rose-500 disabled:pointer-events-none disabled:opacity-60 disabled:hover:scale-100" aria-label="Stop generation" title="Stop"><!></button>`),Ga=p(`<button type="button" class="bg-primary/90 text-primary-foreground hover:bg-primary flex h-10 w-10 items-center justify-center rounded-full transition-all duration-150 hover:scale-105 enabled:cursor-pointer disabled:pointer-events-none disabled:opacity-30 disabled:hover:scale-100"><!></button>`),Ka=p(`<div class="bg-tooltip text-tooltip-foreground ring-border pointer-events-none fixed z-100 -translate-x-1/2 -translate-y-full rounded-md px-2.5 py-1.5 text-[12px] leading-4 whitespace-nowrap shadow-lg ring-1" role="tooltip"></div>`),qa=p(`<footer class="shrink-0 px-6 py-4"><div class="mx-auto max-w-336"><!> <!> <div><div><div class="relative flex min-h-33 flex-col px-4 pt-4 pb-2.5"><!> <!> <!> <div class="relative min-h-0 flex-1"><!> <textarea rows="1" class="text-foreground placeholder:text-muted-foreground field-sizing-content max-h-40 min-h-17 w-full resize-none overflow-y-auto border-0 bg-transparent px-0 py-0 text-[14px] leading-6 outline-none" role="combobox" aria-autocomplete="list" aria-haspopup="listbox" autocomplete="off"></textarea></div> <div class="flex min-w-0 flex-nowrap items-center justify-between gap-3 overflow-visible px-0 pt-2.5 pb-0"><div class="-m-1 flex min-w-0 flex-1 items-center gap-1 overflow-visible p-1"><input type="file" class="hidden" multiple=""/> <button type="button" class="text-muted-foreground enabled:hover:text-foreground flex h-9 w-9 shrink-0 items-center justify-center rounded-lg transition enabled:cursor-pointer disabled:opacity-40"><!></button> <div class="bg-hover-fill-strong mx-1 hidden h-4 w-px shrink-0 sm:block"></div> <!> <!></div> <div class="flex shrink-0 flex-nowrap items-center justify-end gap-2.5"><!> <!></div></div></div></div></div></div></footer> <!>`,1);function Ja(n,r){U(r,!0);let a=R(r,`prompt`,15,``),o=R(r,`selectedModel`,31,()=>e(Ai)),c=R(r,`selectedReasoningEffort`,31,()=>e(ji)),u=R(r,`fastMode`,15,!1),d=R(r,`pendingQuestion`,3,null),p=R(r,`showContinueWorking`,3,!1),m=R(r,`selectedQuestionOptionId`,15,null),g=R(r,`projectSkills`,3,null),y=Ke(),b=Xe(we.usage.getMyUsage,()=>y.isAuthenticated&&!y.isLoading?{}:`skip`),x=z(()=>b.data?.tier),S=z(()=>!!b.error),C=z(()=>r.modelCatalog?zi(r.modelCatalog,v(x)??`free`):[]),k=z(()=>r.modelCatalog?Pi(r.modelCatalog,o()):void 0),A=z(()=>{if(r.modelCatalog&&v(k)){if(!v(k).supportsFastMode)return`unsupported`;if(v(x))return Li(r.modelCatalog,v(x),v(k))}}),M=z(()=>v(k)!==void 0&&(v(S)||v(x)!==void 0&&r.modelCatalog!==void 0&&Fi(r.modelCatalog,v(x),o()))),N=W(null),te=W(null),ne=W(null),P=W(e([])),B=W(`idle`),ie=W(!1),oe=W(0),se=W(0),ce=0,V,H=z(()=>d()!=null),le=z(()=>r.isRunning&&!v(H)||r.isSubmitting),ue=W(e(Date.now()));s(()=>{let e=setInterval(()=>{G(ue,Date.now(),!0)},1e3);return()=>{clearInterval(e)}});let de=z(()=>v(k)?.usagePolicy===`unlimited`),fe=z(()=>b.data?.exhausted===!0&&(b.data.resetsAt===null||b.data.resetsAt>v(ue))&&!v(de)),pe=z(()=>r.modelCatalog?v(C).find(e=>!e.locked&&Pi(r.modelCatalog,e.id)?.usagePolicy===`unlimited`)?.label??null:null),me=z(()=>{if(!v(fe)||b.data===void 0)return null;let e=v(pe)===null?`Upgrade your subscription to keep going.`:`Switch to ${v(pe)} or upgrade your subscription to keep going.`;return b.data.resetsAt===null?e:`Your limit resets in ${La(b.data.resetsAt-v(ue))}. ${e}`}),he=z(()=>!!a().trim()||r.attachments.length>0),ge=z(()=>ra({selectedOptionId:m(),text:a()})),ve=z(()=>v(H)?v(ge):v(he)),ye=z(()=>r.attachments.some(e=>e.status!==`ready`)),q=z(()=>!v(le)&&!v(H)),be=W(null);s(()=>{let e=d()?.questionId??null;e!==v(be)&&(G(be,e,!0),m(null),a().trim()&&a(``))});let xe=!!globalThis.CSS?.supports(`field-sizing`,`content`),Se=z(()=>Ma(a(),v(se))),J=z(()=>v(Se)!==null&&!v(ie)&&!v(H)),Ce=z(()=>v(Se)===null?[]:Na(v(P),v(Se))),Te=z(()=>v(J)&&v(Ce).length>0?`composer-skill-option-${v(oe)}`:void 0);function Ee(){G(se,v(N)?.selectionStart??a().length,!0)}function De(){G(P,[],!0),G(B,`idle`),G(ie,!1),G(oe,0),ce+=1}async function Oe(e=!1){if(v(B)===`loading`||(v(B)===`ready`||v(B)===`error`)&&!e)return;if(!g()?.load){G(P,[],!0),G(B,`ready`);return}let t=++ce;G(B,`loading`);try{let e=await g().load();if(t!==ce)return;G(P,e,!0),G(B,`ready`)}catch{if(t!==ce)return;G(P,[],!0),G(B,`error`)}}function ke(e){let t=Pa(a(),v(se),e.name);t&&(a(t.text),G(se,t.caret,!0),G(ie,!0),queueMicrotask(()=>{v(N)&&(v(N).focus(),v(N).setSelectionRange(t.caret,t.caret),Pe())}))}function Ae(e){let t=e.currentTarget;if(!(t instanceof HTMLInputElement))return;let n=Array.from(t.files??[]);t.value=``,n.length>0&&r.onAttachFiles(n)}function je(e){let t=Array.from(e.clipboardData?.files??[]);t.length===0||r.isRunning||r.isSubmitting||v(H)||(e.clipboardData?.getData(`text/plain`)||e.preventDefault(),r.onAttachFiles(t))}function Me(e){let t=e.currentTarget;if(!(t instanceof HTMLButtonElement)||t.disabled)return;let n=t.getBoundingClientRect();G(ne,{top:n.top-8,left:n.left+n.width/2},!0)}function Ne(){G(ne,null)}function Pe(){if(!v(N)||xe)return;let e=v(N);e.style.height=`68px`;let t=Math.min(Math.max(e.scrollHeight,68),160);e.style.height=`${t}px`,e.style.overflowY=e.scrollHeight>t?`auto`:`hidden`}function Fe(e){if(v(J)){if(e.key===`ArrowDown`||e.key===`ArrowUp`){if(e.preventDefault(),v(Ce).length===0)return;let t=e.key===`ArrowDown`?1:-1;G(oe,(v(oe)+t+v(Ce).length)%v(Ce).length);return}if(e.key===`Escape`){e.preventDefault(),G(ie,!0);return}if((e.key===`Enter`||e.key===`Tab`)&&!e.shiftKey){e.preventDefault();let t=v(Ce)[v(oe)];t&&ke(t);return}}!r.canSend||!v(H)&&!v(M)||!v(H)&&v(fe)||r.isSubmitting||v(le)||!v(ve)||!v(H)&&v(ye)||ka(e)&&(e.preventDefault(),r.onSubmit())}function Ie(e){m(m()===e?null:e)}function Le(e){if(!r.modelCatalog)return;o(e);let t=Pi(r.modelCatalog,e);t&&c(t.defaultReasoningEffort),r.onModelChange?.(e)}s(()=>{r.modelCatalog&&(!o()||!Pi(r.modelCatalog,o()))&&(o(r.modelCatalog.defaultModelId),c(r.modelCatalog.defaultReasoningEffort),u(!1))}),s(()=>{if(!r.modelCatalog||!v(x))return;let e=Ii(r.modelCatalog,v(x),o());e!==o()&&(o(e),c(Pi(r.modelCatalog,e)?.defaultReasoningEffort??r.modelCatalog.defaultReasoningEffort));let t=Pi(r.modelCatalog,e);t&&Li(r.modelCatalog,v(x),t)!==`available`&&u(!1)}),s(()=>{a(),Pe()}),s(()=>{let e=g()?.workspacePath??null;if(V!==e&&(V=e,De()),v(Se)===null){G(ie,!1);return}v(ie)||Oe()}),s(()=>{v(Ce),G(oe,0)});var Re=qa(),ze=T(Re),Be=E(ze),Ve=E(Be),He=e=>{var n=Ra(),i=_(E(n),2),a=D(i);K(n),w(()=>h(a,`Working for ${r.elapsedLabel??``}`)),t(e,n)},Ue=e=>{var n=za(),i=_(E(n),2),a=D(i,!0);K(n),w(()=>h(a,r.isStarting?`Starting agent…`:`Sending request…`)),t(e,n)};i(Ve,e=>{r.elapsedLabel?e(He):r.isSubmitting&&e(Ue,1)});var We=_(Ve,2),Ge=e=>{var n=Ba(),i=D(n);w(()=>i.disabled=r.isSubmitting),l(`click`,i,function(...e){r.onContinueWorking?.apply(this,e)}),t(e,n)};i(We,e=>{p()&&r.onContinueWorking&&e(Ge)});var qe=_(We,2);L(qe,1,O(`composer-shell mx-auto w-full max-w-[48rem] rounded-[28px] p-px transition-colors duration-200`));var Je=E(qe);L(Je,1,O(`composer-inner rounded-[27px] border border-[var(--hairline)] transition-colors duration-200`));var Ye=E(Je),Y=E(Ye),Ze=e=>{var n=Va(),r=E(n);cn(r,{class:`mt-0.5 size-4 shrink-0 text-amber-800 dark:text-amber-200`,"aria-hidden":`true`});var i=_(r,2),a=_(E(i),2),o=D(a,!0);K(i),K(n),w(()=>h(o,v(me))),t(e,n)};i(Y,e=>{v(me)&&e(Ze)});var X=_(Y,2),Qe=e=>{oa(e,{get question(){return d().question},get options(){return d().options},get selectedOptionId(){return m()},onToggleOption:Ie})};i(X,e=>{d()&&e(Qe)});var $e=_(X,2),et=e=>{Sa(e,{get attachments(){return r.attachments},get disabled(){return v(le)},get onRemove(){return r.onRemoveAttachment}})};i($e,e=>{r.attachments.length>0&&!v(H)&&e(et)});var tt=_($e,2),nt=E(tt),rt=e=>{Oa(e,{get loadState(){return v(B)},get skills(){return v(Ce)},get highlightedIndex(){return v(oe)},onRetry:()=>void Oe(!0),onHighlight:e=>{G(oe,e,!0)},onSelect:ke})};i(nt,e=>{v(J)&&e(rt)});var Z=_(nt,2);j(Z),ee(Z,e=>G(N,e),()=>v(N)),K(tt);var it=_(tt,2),at=E(it),ot=E(at);ee(ot,e=>G(te,e),()=>v(te));var st=_(ot,2);F(st,`aria-label`,`Attach files`),or(E(st),{class:`size-4`,"aria-hidden":`true`}),K(st);var ct=_(st,4);{let e=(e,t=_e)=>{Oi(e,{get provider(){return t().provider},className:`size-4 shrink-0`})},t=z(()=>v(le)||v(H)||r.modelCatalog===void 0);vi(ct,{get value(){return o()},get options(){return v(C)},ariaLabel:`Select model`,menuTitle:`Model`,get disabled(){return v(t)},searchable:!0,onValueChange:Le,className:`z-20 shrink-0`,triggerClassName:`h-9 border-0 bg-transparent px-2 text-[15px] text-foreground shadow-none hover:bg-transparent focus-visible:ring-0`,optionIcon:e,$$slots:{optionIcon:!0}})}var lt=_(ct,2),ut=e=>{var n=Ua(),a=T(n),o=e=>{var n=Ha();t(e,n)},s=z(()=>Ri(v(k))||v(A)===`available`||v(A)===`locked`);i(a,e=>{v(s)&&e(o)});var l=_(a,2);{let e=z(()=>r.modelCatalog?.fastModeLockUpgradeMessage),t=z(()=>v(le)||v(H));ta(l,{get model(){return v(k)},get fastModeAccess(){return v(A)},get fastModeLockTooltip(){return v(e)},get disabled(){return v(t)},className:`z-20 shrink-0`,get reasoningEffort(){return c()},set reasoningEffort(e){c(e)},get fastMode(){return u()},set fastMode(e){u(e)}})}t(e,n)};i(lt,e=>{v(k)&&e(ut)}),K(at);var dt=_(at,2),ft=E(dt),pt=e=>{var n=Wa();Er(E(n),{class:`size-3.5 fill-current`}),K(n),l(`click`,n,function(...e){r.onCancel?.apply(this,e)}),t(e,n)};i(ft,e=>{r.isRunning&&e(pt)});var mt=_(ft,2),ht=e=>{var n=Ga();Gt(E(n),{class:`size-4`}),K(n),w(()=>{n.disabled=!r.canSend||!v(H)&&!v(M)||!v(H)&&v(fe)||r.isSubmitting||!v(ve)||!v(H)&&v(ye),F(n,`aria-label`,v(H)?`Submit answer`:`Send message`)}),l(`click`,n,function(...e){r.onSubmit?.apply(this,e)}),t(e,n)};i(mt,e=>{(v(H)||!r.isRunning)&&e(ht)}),K(dt),K(it),K(Ye),K(Je),K(qe),K(Be),K(ze);var gt=_(ze,2),_t=e=>{var n=Ka();n.textContent=`Attach files`,w(()=>re(n,`top: ${v(ne).top}px; left: ${v(ne).left}px;`)),t(e,n)};i(gt,e=>{v(ne)&&e(_t)}),w(()=>{F(Z,`placeholder`,v(H)?`Add detail, or type a custom answer`:`Ask anything, @tag files/directories, or use $ to show available skills`),Z.disabled=r.isSubmitting,F(Z,`aria-expanded`,v(J)),F(Z,`aria-controls`,v(J)?`composer-skills-listbox`:void 0),F(Z,`aria-activedescendant`,v(Te)),st.disabled=!v(q)}),l(`keydown`,Z,Fe),f(`paste`,Z,je),f(`focus`,Z,Ee),l(`input`,Z,()=>{Ee(),Pe()}),l(`keyup`,Z,Ee),l(`click`,Z,Ee),f(`select`,Z,Ee),ae(Z,a),l(`change`,ot,Ae),f(`mouseenter`,st,Me),f(`mouseleave`,st,Ne),f(`focus`,st,Me),f(`blur`,st,Ne),l(`click`,st,()=>{Ne(),v(te)?.click()}),t(n,Re),I()}o([`click`,`keydown`,`input`,`keyup`,`change`]);var Ya=p(`<small> </small>`),Xa=p(`<button type="button" role="menuitemradio"><span class="create-thread-project-option-label"><span> </span> <!></span> <!></button>`),Za=p(`<span id="create-thread-project-menu" class="create-thread-project-menu" role="menu" aria-label="Projects"><span class="create-thread-project-options"></span> <span class="create-thread-project-menu-footer"><button type="button" role="menuitem"><!> <span>Add project</span></button></span></span>`),Qa=p(`<h1>What should we build in <span class="create-thread-project-phrase"><span class="create-thread-project-control"><button type="button" class="create-thread-project-trigger" aria-haspopup="menu"><span> </span> <!></button> <!></span><span aria-hidden="true">?</span></span></h1>`),$a=p(`<h1>What should we work on?</h1> <p class="text-muted-foreground mt-3 text-sm">Add a project to start your first thread.</p> <button type="button" class="mt-5 rounded-lg border border-[var(--hairline)] px-4 py-2 text-sm">Add project</button>`,1),eo=p(`<div class="create-thread-heading"><!></div>`);function to(n,r){U(r,!0);let a=z(()=>r.projects.find(e=>e.workspacePath===r.workspacePath)),o=z(()=>v(a)?.displayName??`Choose a project`),c=z(()=>r.projects.findIndex(e=>e.workspacePath===r.workspacePath)),u=W(!1),d=W(0),p=W(null),m=W(null),g=e([]);function y(e){return r.projects.some(t=>t.workspacePath!==e.workspacePath&&t.displayName===e.displayName)}function b(e){return y(e)?`${e.displayName}, ${e.workspacePath}`:e.displayName}function x(e){let t=r.projects.length+1;G(d,(e+t)%t),queueMicrotask(()=>g[v(d)]?.focus())}function S(e=v(c)>=0?v(c):0){G(u,!0),x(e)}function C(e){G(u,!1),e&&queueMicrotask(()=>v(m)?.focus())}function O(e){C(!0),e.workspacePath!==r.workspacePath&&r.onProject(e.workspacePath)}function k(){C(!1),r.onAddProject()}function A(e){let t=r.projects[e];if(t){O(t);return}k()}function j(e){(e.key===`ArrowDown`||e.key===`ArrowUp`)&&(e.preventDefault(),S(e.key===`ArrowUp`?r.projects.length:void 0))}function M(e,t){switch(e.key){case`ArrowDown`:e.preventDefault(),x(t+1);break;case`ArrowUp`:e.preventDefault(),x(t-1);break;case`Home`:e.preventDefault(),x(0);break;case`End`:e.preventDefault(),x(r.projects.length);break;case`Enter`:case` `:e.preventDefault(),A(t);break;case`Tab`:G(u,!1)}}s(()=>{if(v(u))return si({getRoot:()=>v(p),onOutside:()=>C(!1),onEscape:()=>C(!0)})}),s(()=>{r.projects.length===0&&G(u,!1)});var N=eo(),te=E(N),ne=e=>{var n=Qa(),a=_(E(n)),s=E(a),c=E(s),p=E(c),x=D(p,!0),T=_(p,2);{let e=z(()=>v(u)?`is-open`:``);rn(T,{get class(){return v(e)},"aria-hidden":`true`})}K(c),ee(c,e=>G(m,e),()=>v(m));var A=_(c,2),N=e=>{var n=Za(),a=E(n);he(a,23,()=>r.projects,e=>e.workspacePath,(e,n,a)=>{var o=Xa();let s;var c=E(o),u=E(c),p=D(u,!0),m=_(u,2),x=e=>{var r=Ya(),i=D(r,!0);w(()=>{F(r,`title`,v(n).workspacePath),h(i,v(n).workspacePath)}),t(e,r)},S=z(()=>y(v(n)));i(m,e=>{v(S)&&e(x)}),K(c),tn(_(c,2),{"aria-hidden":`true`}),K(o),ee(o,(e,t)=>g[t]=e,e=>g?.[e],()=>[v(a)]),w(e=>{F(o,`aria-checked`,v(n).workspacePath===r.workspacePath),F(o,`aria-label`,e),s=L(o,1,``,null,s,{active:v(d)===v(a),selected:v(n).workspacePath===r.workspacePath}),h(p,v(n).displayName)},[()=>b(v(n))]),f(`pointerenter`,o,()=>{G(d,v(a),!0)}),l(`keydown`,o,e=>M(e,v(a))),l(`click`,o,()=>O(v(n))),t(e,o)}),K(a);var o=_(a,2),s=E(o);let c;Pn(E(s),{"aria-hidden":`true`}),me(2),K(s),ee(s,e=>g[r.projects.length]=e,()=>g?.[r.projects.length]),K(o),K(n),w(()=>c=L(s,1,``,null,c,{active:v(d)===r.projects.length})),f(`pointerenter`,s,()=>{G(d,r.projects.length,!0)}),l(`keydown`,s,e=>M(e,r.projects.length)),l(`click`,s,k),t(e,n)};i(A,e=>{v(u)&&e(N)}),K(s),me(),K(a),K(n),w(()=>{F(c,`aria-label`,`Select project. Current project: ${v(o)}`),F(c,`aria-expanded`,v(u)),F(c,`aria-controls`,v(u)?`create-thread-project-menu`:void 0),h(x,v(o))}),l(`click`,c,()=>{v(u)?C(!1):S()}),l(`keydown`,c,j),t(e,n)},P=e=>{var n=$a(),i=_(T(n),4);l(`click`,i,function(...e){r.onAddProject?.apply(this,e)}),t(e,n)};i(te,e=>{r.projects.length?e(ne):e(P,-1)}),K(N),ee(N,e=>G(p,e),()=>v(p)),t(n,N),I()}o([`click`,`keydown`]),Q.union(Q.literal(`unsettled`),Q.literal(`settled`));var no=[`unsettled`,`settled`];function ro(e){return e.archivedAt===void 0?`unsettled`:`settled`}var io=Me({method:Se([`desktop`,`package`]),status:Se([`unavailable`,`idle`,`checking`,`available`,`downloading`,`downloaded`,`installing`,`installed`,`error`]),currentVersion:je(),version:je().nullable(),progress:xe().nullable().optional(),error:je().nullable(),message:je().nullable().optional()});function ao(e){switch(e.status){case`available`:return`Update available`;case`downloading`:return e.progress==null?`Downloading update…`:`Downloading… ${e.progress}%`;case`downloaded`:return`Restart to update`;case`installing`:return`Installing update…`;case`installed`:return`Update installed`;case`error`:return e.version?`Retry update`:null;default:return null}}async function oo(e){let t=Ve();if(!t)return null;let n=await fetch(`${t}/api/update${e?`/install`:``}`,{method:e?`POST`:`GET`,credentials:`include`,headers:{"content-type":`application/json`},signal:AbortSignal.timeout(3e4)});if(!n.ok){let e=Me({error:je()}).safeParse(await n.json().catch(()=>null));throw Error(e.success?e.data.error:`Update request failed (${n.status}). Try again.`)}return io.parse(await n.json())}var so=p(`<div class="text-muted-foreground px-2 pb-2 text-xs"><p> </p> <p class="mt-1">On Windows, a locked executable may require stopping Sprocket and running <code>sprocket update</code> instead.</p> <div class="mt-2 flex gap-3"><button type="button" class="text-foreground underline">Install update</button> <button type="button" class="underline">Cancel</button></div></div>`),co=p(`<p class="text-muted-foreground px-2 pb-2 text-xs">Wait for active agents to finish, then stop Sprocket in your terminal and launch it again.</p>`),lo=p(`<p class="text-destructive px-2 pb-2 text-xs break-words" role="alert"> </p>`),uo=p(`<div class="mb-1" aria-live="polite"><button type="button" class="text-foreground hover:bg-hover-fill flex min-h-9 w-full min-w-0 items-center gap-2.5 rounded-lg px-2 py-1.5 text-left text-[13px] font-medium tracking-[-0.02em] transition disabled:cursor-default disabled:opacity-70"><!> <span> </span></button> <!> <!> <!></div>`);function fo(e,n){U(n,!0);let r=W(null),a=W(null),o=W(!1),s=W(!1),c=0,u=z(()=>v(r)?ao(v(r)):null),d=z(()=>v(o)||v(r)?.status===`downloading`||v(r)?.status===`installing`);function f(e){G(r,e,!0),e&&[`downloading`,`downloaded`,`installing`,`installed`].includes(e.status)&&G(a,null)}se(()=>{let e=!1,t=!1,n=!1,r=window.sprocketDesktopBridge?.updates,i=r?.onState(e=>{c+=1,f(e)});async function a(){if(t||e||v(o)||n)return;t=!0;let i=c;try{let t=r?await r.getState():await oo(!1);!e&&c===i&&(f(t),n=t===null||t.status===`unavailable`)}catch{}finally{t=!1}}a();let s=setInterval(()=>void a(),5e3);return()=>{e=!0,clearInterval(s),i?.()}});async function p(){if(!v(r)||v(d))return;if(v(r).method===`package`&&!v(s)){G(s,!0);return}G(s,!1);let e=++c;G(o,!0),G(a,null);try{let t=window.sprocketDesktopBridge?.updates;if(v(r).method===`desktop`&&t){let n=await(v(r).status===`downloaded`?t.install():t.download());c===e&&f(n)}else v(r).method===`package`&&f(await oo(!0))}catch(e){G(a,e instanceof Error?e.message:String(e),!0)}finally{G(o,!1)}}var m=B(),g=T(m),y=e=>{var n=uo(),o=E(n),c=E(o),f=e=>{Kn(e,{class:`size-4 shrink-0 animate-spin`,"aria-hidden":`true`})},m=e=>{cr(e,{class:`size-4 shrink-0`,"aria-hidden":`true`})},g=e=>{bn(e,{class:`size-4 shrink-0`,"aria-hidden":`true`})};i(c,e=>{v(d)?e(f):v(r).status===`downloaded`?e(m,1):e(g,-1)});var y=_(c,2),b=D(y,!0);K(o);var x=_(o,2),S=e=>{var n=so(),i=E(n),a=D(i),o=_(i,4),c=E(o),u=_(c,2);K(o),K(n),w(()=>h(a,`Install ${v(r).version??``} using your package manager? Restart Sprocket from your terminal
2
2
  afterward to use the new version.`)),l(`click`,c,()=>void p()),l(`click`,u,()=>G(s,!1)),t(e,n)};i(x,e=>{v(s)&&e(S)});var C=_(x,2),T=e=>{var n=co();t(e,n)};i(C,e=>{v(r).status===`installed`&&e(T)});var O=_(C,2),k=e=>{var n=lo(),i=D(n,!0);w(()=>h(i,v(a)||v(r).error)),t(e,n)};i(O,e=>{(v(a)||v(r).error)&&e(k)}),K(n),w(()=>{o.disabled=v(d)||v(r).status===`installed`,F(o,`title`,v(r).version?`Sprocket ${v(r).version}`:void 0),F(o,`aria-busy`,v(d)),h(b,v(u))}),l(`click`,o,()=>void p()),t(e,n)};i(g,e=>{v(u)&&v(r)&&e(y)}),t(e,m),I()}o([`click`]);var po=p(`<span role="alert"> </span>`),mo=p(`<span>Loading...</span>`),ho=p(`<button type="button">Show more</button>`),go=p(`<div class="inbox-load-more" aria-live="polite"><!></div>`);function _o(e,n){U(n,!0);var r=go(),a=E(r),o=e=>{var r=po(),i=D(r,!0);w(()=>h(i,n.section.error)),t(e,r)},s=e=>{var n=mo();t(e,n)},c=e=>{var r=ho();l(`click`,r,function(...e){n.section.loadMore?.apply(this,e)}),t(e,r)};i(a,e=>{n.section.error?e(o):n.section.loading?e(s,1):n.section.canLoadMore&&e(c,2)}),K(r),t(e,r),I()}o([`click`]);var vo=p(`<button type="button" class="text-muted-foreground hover:text-foreground hover:bg-hover-fill inline-flex size-7 shrink-0 items-center justify-center rounded-md transition"><!></button>`);function yo(e,n){U(n,!0);var r=vo(),a=E(r),o=e=>{Or(e,{class:`size-3.5`,"aria-hidden":`true`})},s=e=>{Qn(e,{class:`size-3.5`,"aria-hidden":`true`})};i(a,e=>{n.theme===`dark`?e(o):e(s,-1)}),K(r),w(()=>{F(r,`aria-label`,n.theme===`dark`?`Switch to light mode`:`Switch to dark mode`),F(r,`title`,n.theme===`dark`?`Light mode`:`Dark mode`)}),l(`click`,r,()=>n.onThemeChange(n.theme===`dark`?`light`:`dark`)),t(e,r),I()}o([`click`]);var bo=p(`<button type="button"> </button>`),xo=p(`<button class="inbox-section-heading" type="button" aria-controls="inbox-settled-threads"><span>Settled Threads</span> <!></button>`),So=p(`<!> <span class="truncate"> </span>`,1),Co=p(`<span class="truncate">Unknown model</span>`),wo=p(`<form class="inbox-row-main"><span class="inbox-row-meta"><span class="truncate"> </span> <span class="inbox-row-age shrink-0"> </span></span> <input class="inbox-row-rename-input" aria-label="Rename thread" maxlength="300"/> <span class="inbox-row-model"><!></span></form>`),To=p(`<span> </span>`),Eo=p(`<button class="inbox-row-main" type="button"><span class="inbox-row-meta"><span class="truncate"> </span> <span class="inbox-row-age shrink-0"> </span></span> <span class="inbox-row-title truncate"> </span> <span class="inbox-row-model"><!> <!></span></button>`),Do=p(`<button class="inbox-icon inbox-row-state-action" type="button" data-tooltip="Settle"><!></button>`),Oo=p(`<button class="inbox-icon inbox-row-state-action" type="button" data-tooltip="Unsettle"><!></button>`),ko=p(`<div class="inbox-row-actions"><!></div>`),Ao=p(`<div role="group"><!> <!></div>`),jo=p(`<!> <!>`,1),Mo=p(`<section><!> <div><!></div></section>`),No=p(`<div class="inbox-notice" role="status"><span> </span> <button type="button" aria-label="Dismiss notification"><!></button></div>`),Po=p(`<button type="button" role="menuitem"><!>Settle</button>`),Fo=p(`<button type="button" role="menuitem"><!>Unsettle</button>`),Io=p(`<button class="fixed inset-0 z-[200] cursor-default" type="button" aria-label="Close thread actions"></button> <div class="inbox-context-menu" role="menu" tabindex="-1"><!> <button type="button" role="menuitem"><!>Rename</button> <button type="button" role="menuitem"><!>Copy thread ID</button></div>`,1),Lo=p(`<aside class="inbox-sidebar" aria-label="Thread inbox"><header class="flex items-center gap-2 px-4 pt-4 pb-3"><!> <!></header> <div class="px-3 pb-3"><button class="inbox-menu-item" type="button"><!>New thread</button> <div class="inbox-project-controls"><details><summary class="inbox-filter"><span class="truncate"> </span> <!></summary> <div class="inbox-project-menu"><label class="inbox-project-search"><!> <input aria-label="Search projects" placeholder="Search projects"/></label> <div class="inbox-project-list"><button type="button">All projects</button> <!></div></div></details> <button class="inbox-icon inbox-add-project-button" type="button" aria-label="Create or add project"><!></button></div></div> <div class="inbox-scroll"></div> <!> <footer class="inbox-footer"><button class="inbox-menu-item" type="button"><!>Settings</button> <!></footer></aside> <!>`,1);function Ro(r,a){U(a,!0);let o=`sprocket.inbox.settled-open`,c=R(a,`settledOpen`,15,!1),d={unsettled:`Unsettled`,settled:`Settled Threads`},p=W(null),m=W(null),g=null,y=W(null),b=W(!1),x=W(null),S=W(``),C=W(null),O=W(e(Date.now())),k=W(!1),A=W(``),j=z(()=>a.sections.flatMap(e=>e.rows)),M=z(()=>a.projects.filter(e=>e.displayName.toLocaleLowerCase().includes(v(A).trim().toLocaleLowerCase()))),N=z(()=>a.sections.filter(e=>e.rows.length||e.loading||e.error||e.canLoadMore||e.state===`settled`&&!c())),ne=z(()=>a.selectedProjects.length===0?`All projects`:a.selectedProjects.length===1?a.projects.find(e=>e.repositoryKey===a.selectedProjects[0])?.displayName??`All projects`:`${a.selectedProjects.length} projects`);se(()=>{try{let e=localStorage.getItem(o);e!==null&&c(e===`true`)}catch{}let e=setInterval(()=>{G(O,Date.now(),!0)},3e4);return()=>clearInterval(e)}),s(()=>{v(x)&&v(C)&&(v(C).focus(),v(C).select())});function P(e){return a.projects.find(t=>t.repositoryKey===e.repositoryKey)?.displayName??e.repositoryKey}function B(e){return a.models.find(t=>t.id===e.selectedModel)}function ie(e){a.onFilter(e),G(k,!1),G(A,``)}function oe(){G(k,!1),G(A,``),a.onAddProject()}function ce(){c(!c());try{localStorage.setItem(o,String(c()))}catch{}}function V(e){let t=Math.max(0,Math.floor((v(O)-e)/6e4));return t<1?`now`:t<60?`${t}m`:t<1440?`${Math.floor(t/60)}h`:`${Math.floor(t/1440)}d`}function H(e){return e.status===`queued`?`Starting`:e.status===`running`?`Working`:e.status===`failed`?`Failed`:null}function le(e){a.onSelect(e)}function ue(e){G(m,null),G(x,e,!0),G(S,e.title??``,!0)}function fe(){G(x,null),G(S,``)}async function pe(){if(!v(x))return;let e=v(x),t=v(S).trim();if(!t||t===(e.title??``)){fe();return}fe();try{await a.onRename(e,t)}catch(e){G(y,e instanceof Error?e.message:`Could not rename thread.`,!0)}}function ge(e,t){return ro(e)!==t&&(t!==`settled`||e.status!==`running`)}async function _e(e,t){if(a.mutationsEnabled&&!v(b)){if(q(),G(b,!0),G(y,null),!ge(e,t)){G(b,!1);return}try{await a.onChange(e,t)}catch(e){G(y,e instanceof Error?e.message:`Could not update thread.`,!0)}finally{G(b,!1)}}}function ve(e){return a.mutationsEnabled&&!v(b)&&v(p)!==null&&ge(v(p),e)}function ye(e,t){e.preventDefault(),v(p)&&ve(t)&&_e(v(p),t),G(p,null)}function q(){let e=g;G(m,null),g=null,e?.focus()}function be(e,t){e.preventDefault(),g=e.currentTarget instanceof HTMLElement?e.currentTarget:null;let r=g?.getBoundingClientRect(),i=e instanceof MouseEvent?e.clientX:0,a=e instanceof MouseEvent?e.clientY:0;G(m,{thread:t,x:Math.min(i||r?.left||8,window.innerWidth-230),y:Math.min(a||r?.bottom||8,window.innerHeight-260)},!0),n().then(()=>document.querySelector(`.inbox-context-menu button:not(:disabled)`)?.focus())}function xe(e){if(e.key===`Tab`||e.key===`Escape`){e.preventDefault(),q();return}if(![`ArrowUp`,`ArrowDown`,`Home`,`End`].includes(e.key)||(e.preventDefault(),!(e.currentTarget instanceof HTMLElement)))return;let t=[...e.currentTarget.querySelectorAll(`button:not(:disabled)`)],n=t.findIndex(e=>e===document.activeElement);t[e.key===`Home`?0:e.key===`End`?t.length-1:(n+(e.key===`ArrowUp`?-1:1)+t.length)%t.length]?.focus()}function Se(e){if(!e.defaultPrevented){if(e.key===`Escape`){v(m)&&q();return}if(e.altKey&&e.key.toLowerCase()===`n`&&(e.preventDefault(),a.onNew()),!(e.target instanceof Element&&e.target.closest(`input, textarea, [contenteditable="true"], dialog`))&&e.altKey&&[`ArrowUp`,`ArrowDown`].includes(e.key)){let t=v(j).findIndex(e=>e._id===a.currentThreadId),n=v(j)[t+(e.key===`ArrowDown`?1:-1)];n&&(e.preventDefault(),a.onSelect(n))}}}var J=Lo();f(`keydown`,u,Se);var Ce=T(J),we=E(Ce),Te=E(we);Qe(Te,{size:`sm`,class:`mr-auto`}),yo(_(Te,2),{get theme(){return a.theme},get onThemeChange(){return a.onThemeChange}}),K(we);var Ee=_(we,2),De=E(Ee);Sr(E(De),{size:15}),me(),K(De);var Oe=_(De,2),ke=E(Oe),Ae=E(ke),je=E(Ae),Me=D(je,!0);rn(_(je,2),{size:14}),K(Ae);var Ne=_(Ae,2),Pe=E(Ne),Fe=E(Pe);gr(Fe,{size:14});var Ie=_(Fe,2);te(Ie),K(Pe);var Le=_(Pe,2),Re=E(Le);let ze;var Be=_(Re,2);he(Be,17,()=>v(M),e=>e.repositoryKey,(e,n)=>{var r=bo();let i;var o=D(r,!0);w(()=>{i=L(r,1,`inbox-project-option`,null,i,{"inbox-project-selected":a.selectedProjects.length===1&&a.selectedProjects[0]===v(n).repositoryKey}),F(r,`aria-pressed`,a.selectedProjects.length===1&&a.selectedProjects[0]===v(n).repositoryKey),h(o,v(n).displayName)}),l(`click`,r,()=>ie([v(n).repositoryKey])),t(e,r)}),K(Le),K(Ne),K(ke);var Ve=_(ke,2);Pn(E(Ve),{size:17}),K(Ve),K(Oe),K(Ee);var He=_(Ee,2);he(He,21,()=>v(N),e=>e.state,(e,n)=>{var r=Mo(),o=E(r),s=e=>{var n=xo(),r=_(E(n),2);{let e=z(()=>c()?`inbox-section-chevron-open`:void 0);rn(r,{get class(){return v(e)},size:14})}K(n),w(()=>F(n,`aria-expanded`,c())),l(`click`,n,ce),t(e,n)};i(o,e=>{v(n).state===`settled`&&e(s)});var u=_(o,2),m=E(u),g=e=>{var r=jo(),o=T(r);he(o,17,()=>v(n).rows,e=>e._id,(e,r)=>{let o=z(()=>H(v(r))),s=z(()=>B(v(r))),c=z(()=>v(x)?._id===v(r)._id);var u=Ao();let d;var m=E(u),g=e=>{var n=wo(),a=E(n),o=E(a),c=D(o,!0),u=_(o,2),d=D(u,!0);K(a);var p=_(a,2);te(p),ee(p,e=>G(C,e),()=>v(C));var m=_(p,2),g=E(m),y=e=>{var n=So(),r=T(n);Oi(r,{get provider(){return v(s).provider},className:`size-3.5 shrink-0`});var i=_(r,2),a=D(i,!0);w(()=>h(a,v(s).label)),t(e,n)},b=e=>{var n=Co();t(e,n)};i(g,e=>{v(s)?e(y):e(b,-1)}),K(m),K(n),w((e,t)=>{h(c,e),h(d,t)},[()=>P(v(r)),()=>V(v(r).lastMessageAt)]),f(`submit`,n,e=>{e.preventDefault(),pe()}),l(`keydown`,p,e=>{e.key===`Escape`&&(e.preventDefault(),fe())}),f(`blur`,p,()=>void pe()),ae(p,()=>v(S),e=>G(S,e)),t(e,n)},y=e=>{var n=Eo(),c=E(n),u=E(c),d=D(u,!0),f=_(u,2),p=D(f,!0);K(c);var m=_(c,2),g=D(m,!0),y=_(m,2),x=E(y),S=e=>{var n=So(),r=T(n);Oi(r,{get provider(){return v(s).provider},className:`size-3.5 shrink-0`});var i=_(r,2),a=D(i,!0);w(()=>h(a,v(s).label)),t(e,n)},C=e=>{var n=Co();t(e,n)};i(x,e=>{v(s)?e(S):e(C,-1)});var O=_(x,2),k=e=>{var n=To();let i;var a=D(n,!0);w(()=>{i=L(n,1,`inbox-status`,null,i,{"inbox-working":v(r).status===`queued`||v(r).status===`running`,"inbox-attention":v(r).status===`failed`}),h(a,v(o))}),t(e,n)};i(O,e=>{v(o)&&e(k)}),K(y),K(n),w((e,t,i)=>{F(n,`title`,e),F(n,`aria-current`,v(r)._id===a.currentThreadId?`page`:void 0),h(d,t),h(p,i),h(g,v(r).title??`New thread`)},[()=>`${v(r).title??`New thread`}\n${P(v(r))}\n${new Date(v(r).lastMessageAt).toLocaleString()}`,()=>P(v(r)),()=>V(v(r).lastMessageAt)]),l(`click`,n,()=>le(v(r))),l(`dblclick`,n,()=>{a.mutationsEnabled&&!v(b)&&ue(v(r))}),t(e,n)};i(m,e=>{v(c)?e(g):e(y,-1)});var O=_(m,2),k=e=>{var o=ko(),s=E(o),c=e=>{var n=Do();tn(E(n),{size:14}),K(n),w(e=>{n.disabled=e,F(n,`aria-label`,`Settle ${v(r).title??`thread`}`)},[()=>!a.mutationsEnabled||v(b)||!ge(v(r),`settled`)]),l(`click`,n,()=>void _e(v(r),`settled`)),t(e,n)},u=e=>{var n=Oo();ur(E(n),{size:14}),K(n),w(()=>{n.disabled=!a.mutationsEnabled||v(b),F(n,`aria-label`,`Unsettle ${v(r).title??`thread`}`)}),l(`click`,n,()=>void _e(v(r),`unsettled`)),t(e,n)};i(s,e=>{v(n).state===`unsettled`?e(c):e(u,-1)}),K(o),t(e,o)};i(O,e=>{v(c)||e(k)}),K(u),w(()=>{d=L(u,1,`inbox-row`,null,d,{"inbox-row-selected":v(r)._id===a.currentThreadId}),F(u,`draggable`,a.mutationsEnabled&&!v(b)&&!v(c)),F(u,`aria-label`,v(r).title??`New thread`)}),f(`dragstart`,u,e=>{G(p,v(r),!0),e.dataTransfer?.setData(`text/plain`,v(r)._id)}),f(`dragend`,u,()=>G(p,null)),l(`contextmenu`,u,e=>be(e,v(r))),t(e,u)}),_o(_(o,2),{get section(){return v(n)}}),t(e,r)};i(m,e=>{(v(n).state!==`settled`||c())&&e(g)}),K(u),K(r),w(()=>{F(r,`id`,`inbox-${v(n).state}`),F(r,`aria-label`,d[v(n).state]),F(u,`id`,v(n).state===`settled`?`inbox-settled-threads`:void 0)}),f(`dragover`,r,e=>{ve(v(n).state)&&e.preventDefault()}),f(`drop`,r,e=>ye(e,v(n).state)),t(e,r)}),K(He);var Ue=_(He,2),We=e=>{var n=No(),r=E(n),i=D(r,!0),a=_(r,2);Rr(E(a),{size:13}),K(a),K(n),w(()=>h(i,v(y))),l(`click`,a,()=>G(y,null)),t(e,n)};i(Ue,e=>{v(y)&&e(We)});var Ge=_(Ue,2),Ke=E(Ge);vr(E(Ke),{size:15}),me(),K(Ke),fo(_(Ke,2),{}),K(Ge),K(Ce);var qe=_(Ce,2),Je=e=>{let n=z(()=>v(m).thread);var r=Io(),o=T(r),s=_(o,2);let c;var u=E(s),d=e=>{var r=Po();tn(E(r),{size:14}),me(),K(r),w(e=>r.disabled=e,[()=>!a.mutationsEnabled||v(b)||!ge(v(n),`settled`)]),l(`click`,r,()=>void _e(v(n),`settled`)),t(e,r)},f=z(()=>ro(v(n))===`unsettled`),p=e=>{var r=Fo();ur(E(r),{size:14}),me(),K(r),w(()=>r.disabled=!a.mutationsEnabled||v(b)),l(`click`,r,()=>void _e(v(n),`unsettled`)),t(e,r)};i(u,e=>{v(f)?e(d):e(p,-1)});var h=_(u,2);Sr(E(h),{size:14}),me(),K(h);var g=_(h,2);gn(E(g),{size:14}),me(),K(g),K(s),w((e,t)=>{c=re(s,``,c,{left:e,top:t}),h.disabled=!a.mutationsEnabled},[()=>`${Math.max(8,v(m).x)}px`,()=>`${Math.max(8,v(m).y)}px`]),l(`click`,o,q),l(`keydown`,s,xe),l(`click`,h,()=>ue(v(n))),l(`click`,g,()=>{navigator.clipboard.writeText(v(n)._id).catch(()=>{G(y,`Could not copy thread ID.`)}),G(m,null)}),t(e,r)};i(qe,e=>{v(m)&&e(Je)}),w(()=>{h(Me,v(ne)),ze=L(Re,1,`inbox-project-option`,null,ze,{"inbox-project-selected":a.selectedProjects.length===0}),F(Re,`aria-pressed`,a.selectedProjects.length===0)}),l(`click`,De,function(...e){a.onNew?.apply(this,e)}),ae(Ie,()=>v(A),e=>G(A,e)),l(`click`,Re,()=>ie([])),de(`open`,`toggle`,ke,e=>G(k,e),()=>v(k)),l(`click`,Ve,oe),l(`click`,Ke,function(...e){a.onSettings?.apply(this,e)}),t(r,J),I()}o([`click`,`contextmenu`,`keydown`,`dblclick`]);var zo=[`free`,`pro`,`max`,`admin`],Bo={free:`Free`,pro:`Pro`,max:`Max`,admin:`Admin`},Vo={modelUsage:{weekly:5e3,monthly:15e3}};Vo.modelUsage.weekly*5,Vo.modelUsage.monthly*5;var Ho=1e3;170*Ho,500*Ho;var Uo=p(`<p class="text-foreground text-[15px]"> </p>`),Wo=p(`<button type="button" class="text-muted-foreground hover:text-foreground block text-left text-sm transition"><span> </span></button>`),Go=p(`<div class="mt-3 space-y-1"><!> <!></div>`),Ko=p(`<p class="text-muted-foreground mt-3 text-sm">You’re signed in to Sprocket.</p>`),qo=p(`<p class="text-foreground mt-3 text-[15px]"> </p>`),Jo=p(`<p class="text-muted-foreground mt-3 text-sm">Couldn’t load your subscription right now.</p>`),Yo=p(`<div class="bg-hover-fill mt-3.5 h-4 w-16 animate-pulse rounded" aria-hidden="true"></div>`),Xo=p(`<!> Sign Out`,1),Zo=p(`<section class="flex h-full min-h-0 flex-col overflow-hidden"><header class="flex h-12 shrink-0 items-center px-6"><h1 class="text-foreground text-[1rem] font-medium tracking-[-0.03em]">Account</h1></header> <div class="min-h-0 flex-1 overflow-y-auto px-6 py-8"><div class="max-w-xl space-y-10"><div><p class="text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase">Profile</p> <!></div> <div><p class="text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase">Spikonado Subscription Tier</p> <!></div> <div><!></div></div></div></section>`);function Qo(e,n){U(n,!0);let r=W(!1),a=Ke(),o=Xe(we.billing.getMySubscription,()=>a.isAuthenticated&&!a.isLoading?{}:`skip`),s=z(()=>[n.user?.firstName,n.user?.lastName].filter(Boolean).join(` `).trim()||null);var c=Zo(),u=_(E(c),2),d=E(u),f=E(d),p=_(E(f),2),m=e=>{var a=Go(),o=E(a),c=e=>{var n=Uo(),r=D(n,!0);w(()=>h(r,v(s))),t(e,n)};i(o,e=>{v(s)&&e(c)});var u=_(o,2),d=e=>{var i=Wo(),a=E(i),o=D(a,!0);K(i),w(()=>{F(i,`aria-pressed`,v(r)),F(i,`aria-label`,v(r)?`Hide email address`:`Show email address`),L(a,1,O(v(r)?void 0:`blur-[5px] select-none`)),h(o,n.user.email)}),l(`click`,i,()=>{G(r,!v(r))}),t(e,i)};i(u,e=>{n.user?.email&&e(d)}),K(a),t(e,a)},g=e=>{var n=Ko();t(e,n)};i(p,e=>{v(s)||n.user?.email?e(m):e(g,-1)}),K(f);var y=_(f,2),b=_(E(y),2),x=e=>{var n=qo(),r=D(n,!0);w(()=>h(r,Bo[o.data.tier])),t(e,n)},S=e=>{var n=Jo();t(e,n)},C=e=>{var n=Yo();t(e,n)};i(b,e=>{o.data?e(x):o.error?e(S,1):e(C,-1)}),K(y);var k=_(y,2);Ur(E(k),{variant:`outline`,get onclick(){return n.onSignOut},children:(e,n)=>{var r=Xo();Xn(T(r),{class:`mr-2 size-4`,"aria-hidden":`true`}),me(),t(e,r)},$$slots:{default:!0}}),K(k),K(d),K(u),K(c),t(e,c),I()}o([`click`]);var $o=`Uncaught ConvexError: `,es=`Uncaught Error: `;function ts(e,t){if(!e.startsWith(t))return null;let n=e.slice(t.length),r=n.indexOf(`
3
3
  `),i=r===-1?n:n.slice(0,r),a=i.indexOf(`(`);return(a===-1?i:i.slice(0,a)).trim()||null}function ns(e){if(e instanceof We){let t=e.data.trim();if(t)return t}let t=e.message.trim();return t?ts(t,$o)??ts(t,es)??t:null}var rs=p(`<p class="text-destructive text-sm" role="alert">Couldn't load your browser settings right now.</p>`),is=p(`<p class="text-destructive text-sm" role="alert"> </p>`),as=p(`<p class="text-muted-foreground text-sm leading-6">This reset closes your current browser sessions, signs future sessions out, and starts
4
4
  fresh.</p> <div class="mt-4 flex flex-wrap items-center gap-3"><!> <!></div>`,1),os=p(`<section class="flex h-full min-h-0 flex-col overflow-hidden"><header class="flex h-12 shrink-0 items-center px-6"><h1 class="text-foreground text-[1rem] font-medium tracking-[-0.03em]">Agent's Browser</h1></header> <div class="min-h-0 flex-1 overflow-y-auto px-6 py-8"><div class="max-w-xl space-y-8"><div class="flex items-center justify-between gap-4"><p class="text-foreground text-[15px]">Save cookies and login state</p> <button type="button" role="switch" aria-label="Save cookies and login state"><span aria-hidden="true"></span></button></div> <!> <!> <div><!></div></div></div></section>`);function ss(e,n){U(n,!0);let r=Ke(),a=Xe(we.browserProfiles.getMine,()=>r.isAuthenticated&&!r.isLoading?{}:`skip`),o=Je(we.browserProfiles.setSaving),s=Je(we.browserProfiles.reset),c=W(!1),u=W(!1),d=W(null),f=z(()=>a.data!==void 0),p=z(()=>a.data?.savingEnabled??!0),m=z(()=>!v(f)||v(c));function y(e,t){return e instanceof Error&&ns(e)||t}async function b(){if(!v(m)){G(c,!0),G(d,null);try{await o({enabled:!v(p)})}catch(e){G(d,y(e,`Couldn’t update browser saving.`),!0)}finally{G(c,!1)}}}async function x(){if(!v(m)){G(c,!0),G(d,null);try{await s({}),G(u,!1)}catch(e){G(d,y(e,`Couldn’t reset browser profile.`),!0)}finally{G(c,!1)}}}var S=os(),C=_(E(S),2),O=E(C),k=E(O),A=_(E(k),2),j=D(A);K(k);var M=_(k,2),N=e=>{var n=rs();t(e,n)};i(M,e=>{a.error&&e(N)});var ee=_(M,2),te=e=>{var n=is(),r=D(n,!0);w(()=>h(r,v(d))),t(e,n)};i(ee,e=>{v(d)&&e(te)});var ne=_(ee,2),P=E(ne),re=e=>{var n=as(),r=_(T(n),2),i=E(r);Ur(i,{onclick:()=>void x(),get disabled(){return v(m)},children:(e,n)=>{me();var r=g();w(()=>h(r,v(c)?`Resetting…`:`Confirm reset`)),t(e,r)},$$slots:{default:!0}}),Ur(_(i,2),{variant:`outline`,get disabled(){return v(c)},onclick:()=>{G(u,!1)},children:(e,n)=>{me();var r=g(`Cancel`);t(e,r)},$$slots:{default:!0}}),K(r),t(e,n)},R=e=>{Ur(e,{variant:`outline`,get disabled(){return v(m)},onclick:()=>{G(u,!0),G(d,null)},children:(e,n)=>{me();var r=g(`Reset browser profile`);t(e,r)},$$slots:{default:!0}})};i(P,e=>{v(u)?e(re):e(R,-1)}),K(ne),K(O),K(C),K(S),w(()=>{F(A,`aria-checked`,v(p)),F(A,`aria-busy`,!v(f)||v(c)),A.disabled=v(m),L(A,1,`focus-visible:ring-ring/50 relative inline-flex h-5 w-9 shrink-0 items-center rounded-full transition focus-visible:ring-2 focus-visible:outline-none disabled:pointer-events-none disabled:opacity-50 ${v(p)?`bg-foreground`:`bg-hover-fill-strong`}`),L(j,1,`bg-background inline-block size-3.5 rounded-full transition ${v(p)?`translate-x-[18px]`:`translate-x-[3px]`}`)}),l(`click`,A,()=>void b()),t(e,S),I()}o([`click`]);var cs=p(`<div class="max-w-md"><p class="text-foreground text-sm"> </p> <p class="text-muted-foreground mt-0.5 text-xs leading-5">Opens Prava in a new tab so you can confirm with your passkey.</p> <a target="_blank" rel="noopener noreferrer" class="border-border bg-surface/80 text-foreground hover:bg-hover-fill mt-3 inline-flex h-9 items-center rounded-full border px-4 text-xs font-medium transition">Approve mandate</a></div>`);function ls(e,n){U(n,!0);var r=cs(),i=E(r),a=D(i),o=_(i,4);K(r),w(()=>{h(a,`Approve spending${n.approval.label?` · ${n.approval.label}`:``}`),F(o,`href`,n.approval.approvalUrl)}),t(e,r),I()}var us=p(`<p class="text-destructive text-sm"> </p>`),ds=p(`<div class="mt-4"><!></div>`),fs=p(`<p class="text-destructive mt-3 text-sm"> </p>`),ps=p(`<div class="space-y-2"><div class="bg-hover-fill h-3.5 w-40 rounded"></div> <div class="bg-hover-fill h-3 w-56 rounded"></div></div>`),ms=p(`<div class="mt-4 animate-pulse space-y-4" aria-hidden="true"></div>`),hs=p(`<p class="text-muted-foreground mt-3 text-sm leading-6">No mandates yet.</p>`),gs=p(`<button type="button"> </button>`),_s=p(`<div class="mt-1.5 flex flex-wrap items-center gap-x-3 gap-y-1"></div>`),vs=p(`<li class="py-2"><div class="flex items-baseline justify-between gap-3"><p class="text-foreground truncate text-[14px]"> </p> <p class="text-muted-foreground shrink-0 text-[12px] capitalize"> </p></div> <p class="text-muted-foreground mt-0.5 text-[12px]"> <!> <!> <!></p> <!></li>`),ys=p(`<ul class="mt-3 space-y-1"></ul>`),bs=p(`<section class="flex h-full min-h-0 flex-col overflow-hidden"><header class="flex h-12 shrink-0 items-center px-6"><h1 class="text-foreground text-[1rem] font-medium tracking-[-0.03em]">Payments</h1></header> <div class="min-h-0 flex-1 overflow-y-auto px-6 py-8"><div class="max-w-xl space-y-10"><div><p class="text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase">Set up a spending mandate</p> <p class="text-muted-foreground mt-2 text-sm leading-6">Create a Prava mandate, then approve it in a new tab with your passkey.</p> <form class="mt-4 space-y-3"><div class="grid gap-3 sm:grid-cols-2"><label class="block space-y-1.5"><span>Merchant name</span> <input placeholder="Example Shop"/></label> <label class="block space-y-1.5"><span>Merchant URL</span> <input placeholder="https://example.com"/></label> <label class="block space-y-1.5"><span>Country code</span> <input placeholder="US"/></label> <label class="block space-y-1.5"><span>Amount cap</span> <input placeholder="120.00" required=""/></label> <label class="block space-y-1.5"><span>Currency</span> <input placeholder="USD" required=""/></label> <label class="block space-y-1.5"><span>Frequency</span> <select><option>One time</option><option>Weekly</option><option>Monthly</option><option>Yearly</option></select></label> <label class="block space-y-1.5 sm:col-span-2"><span>Scope</span> <select><option>Listed merchant</option><option>Any merchant</option></select></label> <label class="block space-y-1.5 sm:col-span-2"><span>Description</span> <input placeholder="Agent shopping budget" required=""/></label></div> <!> <!></form> <!></div> <div><p class="text-muted-foreground font-mono text-[11px] tracking-[0.18em] uppercase">Your mandates</p> <!> <!></div></div></div></section>`);function xs(n,r){U(r,!0);let a=Ke(),o=Ye(we.payments.listMyMandates),c=Ye(we.payments.setupMyMandate),u=Ye(we.payments.setMyMandateLifecycle);function d(e,t){return ns(e)||t}function p(e,t){return e instanceof Error?d(e,t):t}let m=`border-border bg-hover-fill text-foreground placeholder:text-muted-foreground focus:border-ring h-9 w-full rounded-lg border px-3 text-[13px] outline-none`,y=`text-muted-foreground text-[12px]`,b=W(``),x=W(``),S=W(`US`),C=W(``),T=W(`USD`),k=W(`monthly`),A=W(`listed`),j=W(``),M=W(!1),N=W(null),ee=W(null),ne=W(e([])),P=W(!1),F=W(null),re=W(null),R=W(null),B={pause:{idle:`Pause`,busy:`Pausing…`},resume:{idle:`Resume`,busy:`Resuming…`},cancel:{idle:`Cancel`,busy:`Cancelling…`}};s(()=>{v(A)===`any`&&v(k)!==`one_time`&&G(k,`one_time`)}),s(()=>{a.isAuthenticated&&!a.isLoading&&ie()}),s(()=>{if(!v(ee)||!a.isAuthenticated)return;let e=()=>{document.visibilityState&&document.visibilityState!==`visible`||ie()};return window.addEventListener(`focus`,e),document.addEventListener(`visibilitychange`,e),()=>{window.removeEventListener(`focus`,e),document.removeEventListener(`visibilitychange`,e)}});async function ie(){G(P,!0),G(F,null);try{let e=await o({});G(ne,e.mandates,!0);let t=v(ee)?.mandateId;t&&v(ne).some(e=>e.mandateId===t&&(e.status===`active`||e.status===`paused`))&&G(ee,null)}catch(e){G(F,p(e,`Couldn’t load mandates.`),!0)}finally{G(P,!1)}}async function se(e){e.preventDefault(),G(M,!0),G(N,null),G(ee,null);let t=v(A)===`listed`;try{let e=await c({merchantName:t&&v(b).trim()||void 0,merchantUrl:t&&v(x).trim()||void 0,countryCode:t&&v(S).trim()||void 0,amountCap:v(C).trim(),currency:v(T).trim(),frequency:v(k),scope:v(A),description:v(j).trim()});G(ee,{mandateId:e.mandateId,approvalUrl:e.approvalUrl,label:v(j).trim()},!0),await ie()}catch(e){G(N,p(e,`Couldn’t set up mandate.`),!0)}finally{G(M,!1)}}async function ce(e,t){if(e.mandateId&&v(re)===null){G(re,e.pravaMandateId,!0),G(R,t,!0),G(F,null);try{await u({mandateId:e.mandateId,action:t}),await ie()}catch(e){G(F,p(e,`Couldn’t ${t} mandate.`),!0)}finally{G(re,null),G(R,null)}}}var V=bs(),H=_(E(V),2),ue=E(H),de=E(ue),fe=_(E(de),4),pe=E(fe),ge=E(pe),_e=E(ge);L(_e,1,O(y));var ve=_(_e,2);te(ve),L(ve,1,O(m)),K(ge);var ye=_(ge,2),q=E(ye);L(q,1,O(y));var be=_(q,2);te(be),L(be,1,O(m)),K(ye);var xe=_(ye,2),Se=E(xe);L(Se,1,O(y));var J=_(Se,2);te(J),L(J,1,O(m)),K(xe);var Ce=_(xe,2),Te=E(Ce);L(Te,1,O(y));var Ee=_(Te,2);te(Ee),L(Ee,1,O(m)),K(Ce);var De=_(Ce,2),Oe=E(De);L(Oe,1,O(y));var ke=_(Oe,2);te(ke),L(ke,1,O(m)),K(De);var Ae=_(De,2),je=E(Ae);L(je,1,O(y));var Me=_(je,2);L(Me,1,O(m));var Ne=E(Me);Ne.value=Ne.__value=`one_time`;var Pe=_(Ne);Pe.value=Pe.__value=`weekly`;var Fe=_(Pe);Fe.value=Fe.__value=`monthly`;var Ie=_(Fe);Ie.value=Ie.__value=`yearly`,K(Me),oe(Me),K(Ae);var Le=_(Ae,2),Re=E(Le);L(Re,1,O(y));var ze=_(Re,2);L(ze,1,O(m));var Be=E(ze);Be.value=Be.__value=`listed`;var Ve=_(Be);Ve.value=Ve.__value=`any`,K(ze),oe(ze),K(Le);var He=_(Le,2),Ue=E(He);L(Ue,1,O(y));var We=_(Ue,2);te(We),L(We,1,O(m)),K(He),K(pe);var Ge=_(pe,2),qe=e=>{var n=us(),r=D(n,!0);w(()=>h(r,v(N))),t(e,n)};i(Ge,e=>{v(N)&&e(qe)}),Ur(_(Ge,2),{type:`submit`,variant:`outline`,get disabled(){return v(M)},children:(e,n)=>{me();var r=g();w(()=>h(r,v(M)?`Setting up…`:`Set up mandate`)),t(e,r)},$$slots:{default:!0}}),K(fe);var Je=_(fe,2),Xe=e=>{var n=ds();ls(E(n),{get approval(){return v(ee)}}),K(n),t(e,n)};i(Je,e=>{v(ee)&&e(Xe)}),K(de);var Y=_(de,2),Ze=_(E(Y),2),X=e=>{var n=fs(),r=D(n,!0);w(()=>h(r,v(F))),t(e,n)};i(Ze,e=>{v(F)&&e(X)});var Qe=_(Ze,2),$e=e=>{var n=ms();he(n,20,()=>[0,1],e=>e,(e,n)=>{var r=ps();t(e,r)}),K(n),t(e,n)},et=e=>{var n=hs();t(e,n)},tt=e=>{var n=ys();he(n,21,()=>v(ne),e=>e.pravaMandateId,(e,n)=>{let r=z(()=>v(re)===v(n).pravaMandateId),a=z(()=>v(r)?v(R):null),o=z(()=>!!v(n).mandateId&&v(n).status===`active`),s=z(()=>!!v(n).mandateId&&v(n).status===`paused`);var c=vs(),u=E(c),d=E(u),f=D(d,!0),p=_(d,2),m=D(p,!0);K(u);var y=_(u,2),b=E(y),x=_(b),S=e=>{var r=g();w(()=>h(r,`· ${v(n).remaining??``} remaining`)),t(e,r)};i(x,e=>{v(n).remaining!==void 0&&e(S)});var C=_(x,2),T=e=>{var r=g();w(()=>h(r,`· until ${v(n).validUntil??``}`)),t(e,r)};i(C,e=>{v(n).validUntil&&e(T)});var k=_(C,2),A=e=>{var r=g();w(()=>h(r,`· renews ${v(n).renewsAt??``}`)),t(e,r)};i(k,e=>{v(n).renewsAt&&e(A)}),K(y);var j=_(y,2),M=e=>{let r=z(()=>[v(o)?`pause`:`resume`,`cancel`]);var i=_s();he(i,20,()=>v(r),e=>e,(e,r)=>{var i=gs();L(i,1,O(`text-muted-foreground hover:text-foreground text-[12px] transition disabled:pointer-events-none disabled:opacity-40`));var o=D(i,!0);w(()=>{i.disabled=v(re)!==null,h(o,v(a)===r?B[r].busy:B[r].idle)}),l(`click`,i,()=>void ce(v(n),r)),t(e,i)}),K(i),t(e,i)};i(j,e=>{(v(o)||v(s))&&e(M)}),K(c),w(e=>{h(f,e),h(m,v(n).status),h(b,`${v(n).approvedAmount??``}
@@ -1 +1 @@
1
- import{G as e,U as t,ft as n,ot as r,pt as i,q as a,st as o,y as s}from"../chunks/BvmBrUGQ.js";import{o as c,t as l}from"../chunks/DRAZWJyQ.js";import"../chunks/xihTtKlq.js";import{n as u}from"../chunks/B_0TmK76.js";import{t as d}from"../chunks/qZTzdLCS.js";function f(f,p){i(p,!0);let m=()=>o(u,`$authState`,h),[h,g]=r();e(()=>{m().isReady&&l(c(`/`),{replaceState:!0})}),s(`1yczfzs`,e=>{t(()=>{a.title=`Signing In`})}),d(f,{title:`Completing sign-in`,description:`Sprocket is finishing authentication and will return to your projects automatically.`}),n(),g()}export{f as component};
1
+ import{G as e,U as t,ft as n,ot as r,pt as i,q as a,st as o,y as s}from"../chunks/BvmBrUGQ.js";import{o as c,t as l}from"../chunks/DvSrLZhO.js";import"../chunks/xihTtKlq.js";import{n as u}from"../chunks/B_0TmK76.js";import{t as d}from"../chunks/qZTzdLCS.js";function f(f,p){i(p,!0);let m=()=>o(u,`$authState`,h),[h,g]=r();e(()=>{m().isReady&&l(c(`/`),{replaceState:!0})}),s(`1yczfzs`,e=>{t(()=>{a.title=`Signing In`})}),d(f,{title:`Completing sign-in`,description:`Sprocket is finishing authentication and will return to your projects automatically.`}),n(),g()}export{f as component};
@@ -1 +1 @@
1
- {"version":"1789748971278"}
1
+ {"version":"1789749104709"}
package/web/callback.html CHANGED
@@ -13,16 +13,16 @@
13
13
  document.documentElement.style.colorScheme = 'light';
14
14
  })();
15
15
  </script>
16
- <link href="./_app/immutable/entry/start.kuY7ubK1.js" rel="modulepreload">
17
- <link href="./_app/immutable/chunks/DRAZWJyQ.js" rel="modulepreload">
16
+ <link href="./_app/immutable/entry/start.Cs39dtv1.js" rel="modulepreload">
17
+ <link href="./_app/immutable/chunks/DvSrLZhO.js" rel="modulepreload">
18
18
  <link href="./_app/immutable/chunks/BvmBrUGQ.js" rel="modulepreload">
19
19
  <link href="./_app/immutable/chunks/iGtbSQf_.js" rel="modulepreload">
20
- <link href="./_app/immutable/entry/app.BtiH359X.js" rel="modulepreload">
20
+ <link href="./_app/immutable/entry/app.yCm1GdOR.js" rel="modulepreload">
21
21
  <link href="./_app/immutable/chunks/xihTtKlq.js" rel="modulepreload">
22
22
  <link href="./_app/immutable/nodes/0.DOQ4pqDO.js" rel="modulepreload">
23
23
  <link href="./_app/immutable/chunks/B_0TmK76.js" rel="modulepreload">
24
24
  <link href="./_app/immutable/chunks/Dq0ey8RK.js" rel="modulepreload">
25
- <link href="./_app/immutable/nodes/3.ImBQB5TE.js" rel="modulepreload">
25
+ <link href="./_app/immutable/nodes/3.cOfENrMd.js" rel="modulepreload">
26
26
  <link href="./_app/immutable/chunks/qZTzdLCS.js" rel="modulepreload">
27
27
 
28
28
  <link href="./_app/immutable/assets/0.DhTAbCoa.css" rel="stylesheet">
@@ -31,15 +31,15 @@
31
31
  <div style="display: contents">
32
32
  <script>
33
33
  {
34
- __sveltekit_1c2yh6j = {
34
+ __sveltekit_6n7dkj = {
35
35
  base: new URL(".", location).pathname.slice(0, -1)
36
36
  };
37
37
 
38
38
  const element = document.currentScript.parentElement;
39
39
 
40
40
  Promise.all([
41
- import("./_app/immutable/entry/start.kuY7ubK1.js"),
42
- import("./_app/immutable/entry/app.BtiH359X.js")
41
+ import("./_app/immutable/entry/start.Cs39dtv1.js"),
42
+ import("./_app/immutable/entry/app.yCm1GdOR.js")
43
43
  ]).then(([kit, app]) => {
44
44
  kit.start(app, element);
45
45
  });
package/web/index.html CHANGED
@@ -13,11 +13,11 @@
13
13
  document.documentElement.style.colorScheme = 'light';
14
14
  })();
15
15
  </script>
16
- <link href="/_app/immutable/entry/start.kuY7ubK1.js" rel="modulepreload">
17
- <link href="/_app/immutable/chunks/DRAZWJyQ.js" rel="modulepreload">
16
+ <link href="/_app/immutable/entry/start.Cs39dtv1.js" rel="modulepreload">
17
+ <link href="/_app/immutable/chunks/DvSrLZhO.js" rel="modulepreload">
18
18
  <link href="/_app/immutable/chunks/BvmBrUGQ.js" rel="modulepreload">
19
19
  <link href="/_app/immutable/chunks/iGtbSQf_.js" rel="modulepreload">
20
- <link href="/_app/immutable/entry/app.BtiH359X.js" rel="modulepreload">
20
+ <link href="/_app/immutable/entry/app.yCm1GdOR.js" rel="modulepreload">
21
21
  <link href="/_app/immutable/chunks/xihTtKlq.js" rel="modulepreload">
22
22
  <link href="/_app/immutable/nodes/0.DOQ4pqDO.js" rel="modulepreload">
23
23
  <link href="/_app/immutable/chunks/B_0TmK76.js" rel="modulepreload">
@@ -29,15 +29,15 @@
29
29
  <div style="display: contents">
30
30
  <script>
31
31
  {
32
- __sveltekit_1c2yh6j = {
32
+ __sveltekit_6n7dkj = {
33
33
  base: ""
34
34
  };
35
35
 
36
36
  const element = document.currentScript.parentElement;
37
37
 
38
38
  Promise.all([
39
- import("/_app/immutable/entry/start.kuY7ubK1.js"),
40
- import("/_app/immutable/entry/app.BtiH359X.js")
39
+ import("/_app/immutable/entry/start.Cs39dtv1.js"),
40
+ import("/_app/immutable/entry/app.yCm1GdOR.js")
41
41
  ]).then(([kit, app]) => {
42
42
  kit.start(app, element);
43
43
  });
@@ -1 +0,0 @@
1
- import{B as e,R as t,n,rt as r,t as i,tt as a,ut as o,z as s}from"./BvmBrUGQ.js";import"./iGtbSQf_.js";var c=class{constructor(e,t){this.status=e,this.body=typeof t==`string`?{message:t}:t||{message:`Error: ${e}`}}toString(){return JSON.stringify(this.body)}},l=class{constructor(e,t){try{new Headers({location:t})}catch{throw Error(`Invalid redirect location ${JSON.stringify(t)}: this string contains characters that cannot be used in HTTP headers`)}this.status=e,this.location=t}},u=class extends Error{constructor(e,t,n){super(n),this.status=e,this.text=t}};new URL(`sveltekit-internal://`);function d(e,t){return e===`/`||t===`ignore`?e:t===`never`?e.endsWith(`/`)?e.slice(0,-1):e:t===`always`&&!e.endsWith(`/`)?e+`/`:e}function f(e){return e.split(`%25`).map(decodeURI).join(`%25`)}function p(e){for(let t in e)e[t]=decodeURIComponent(e[t]);return e}function m({href:e}){return e.split(`#`)[0]}function ee(e,t,n,r=!1){let i=new URL(e);Object.defineProperty(i,"searchParams",{value:new Proxy(i.searchParams,{get(e,r){if(r===`get`||r===`getAll`||r===`has`)return(t,...i)=>(n(t),e[r](t,...i));t();let i=Reflect.get(e,r);return typeof i==`function`?i.bind(e):i}}),enumerable:!0,configurable:!0});let a=[`href`,`pathname`,`search`,`toString`,`toJSON`];r&&a.push(`hash`);for(let n of a)Object.defineProperty(i,n,{get(){return t(),e[n]},enumerable:!0,configurable:!0});return i}function h(){}function g(...e){let t=5381;for(let n of e)if(typeof n==`string`){let e=n.length;for(;e;)t=t*33^n.charCodeAt(--e)}else if(ArrayBuffer.isView(n)){let e=new Uint8Array(n.buffer,n.byteOffset,n.byteLength),r=e.length;for(;r;)t=t*33^e[--r]}else throw TypeError(`value must be a string or TypedArray`);return(t>>>0).toString(36)}new TextEncoder;function _(e){let t=atob(e),n=new Uint8Array(t.length);for(let e=0;e<t.length;e++)n[e]=t.charCodeAt(e);return n}var te=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:t?.method||`GET`)!==`GET`&&v.delete(b(e)),te(e,t));var v=new Map;function y(e,t){let n=b(e,t),r=document.querySelector(n);if(r?.textContent){r.remove();let{body:e,...t}=JSON.parse(r.textContent);r.getAttribute(`data-b64`)!==null&&(e=_(e));let i=r.getAttribute(`data-ttl`);return i&&v.set(n,{body:e,init:t,ttl:1e3*Number(i)}),Promise.resolve(new Response(e,t))}return window.fetch(e,t)}function ne(e,t,n){if(v.size>0){let t=b(e,n),r=v.get(t);if(r){if(performance.now()<r.ttl&&[`default`,`force-cache`,`only-if-cached`,void 0].includes(n?.cache))return new Response(r.body,r.init);v.delete(t)}}return window.fetch(t,n)}function b(e,t){let n=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t?.headers||t?.body){let e=[];t.headers&&e.push([...new Headers(t.headers)].join(`,`)),t.body&&(typeof t.body==`string`||ArrayBuffer.isView(t.body))&&e.push(t.body),n+=`[data-hash="${g(...e)}"]`}return n}var re=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/,ie=/^\/\((?:[^)]+)\)$/;function ae(e){let t=[];return{pattern:e===`/`||ie.test(e)?/^\/$/:RegExp(`^${se(e).map(e=>{let n=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(e);if(n)return t.push({name:n[1],matcher:n[2],optional:!1,rest:!0,chained:!0}),`(?:/([^]*))?`;let r=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(e);if(r)return t.push({name:r[1],matcher:r[2],optional:!0,rest:!1,chained:!0}),`(?:/([^/]+))?`;if(!e)return;let i=e.split(/\[(.+?)\](?!\])/);return`/`+i.map((e,n)=>{if(n%2){if(e.startsWith(`x+`))return le(String.fromCharCode(parseInt(e.slice(2),16)));if(e.startsWith(`u+`))return le(String.fromCharCode(...e.slice(2).split(`-`).map(e=>parseInt(e,16))));let[,r,a,o,s]=re.exec(e);return t.push({name:o,matcher:s,optional:!!r,rest:!!a,chained:a?n===1&&i[0]===``:!1}),a?`([^]*?)`:r?`([^/]*)?`:`([^/]+?)`}return le(e)}).join(``)}).join(``)}/?$`),params:t}}function oe(e){return e!==``&&!/^\([^)]+\)$/.test(e)}function se(e){return e.slice(1).split(`/`).filter(oe)}function ce(e,t,n){let r={},i=e.slice(1),a=i.filter(e=>e!==void 0),o=0;for(let e=0;e<t.length;e+=1){let s=t[e],c=i[e-o];if(s.chained&&s.rest&&o&&(c=i.slice(e-o,e+1).filter(e=>e).join(`/`),o=0),c===void 0){if(s.rest)c=``;else continue}if(!s.matcher||n[s.matcher](c)){r[s.name]=c;let n=t[e+1],l=i[e+1];n&&!n.rest&&n.optional&&l&&s.chained&&(o=0),!n&&!l&&Object.keys(r).length===a.length&&(o=0);continue}if(s.optional&&s.chained){o++;continue}return}if(!o)return r}function le(e){return e.normalize().replace(/[[\]]/g,`\\$&`).replace(/%/g,`%25`).replace(/\//g,`%2[Ff]`).replace(/\?/g,`%3[Ff]`).replace(/#/g,`%23`).replace(/[.*+?^${}()|\\]/g,`\\$&`)}var ue=/\[(\[)?(\.\.\.)?(\w+?)(?:=(\w+))?\]\]?/g;function de(e,t){let n=se(e),r=e!=`/`&&e.endsWith(`/`);return`/`+n.map(n=>n.replace(ue,(n,r,i,a)=>{let o=t[a];if(!o){if(r||i&&o!==void 0)return``;throw Error(`Missing parameter '${a}' in route ${e}`)}if(o.startsWith(`/`)||o.endsWith(`/`))throw Error(`Parameter '${a}' in route ${e} cannot start or end with a slash -- this would cause an invalid route like foo//bar`);return o})).filter(Boolean).join(`/`)+(r?`/`:``)}function fe({nodes:e,server_loads:t,dictionary:n,matchers:r}){let i=new Set(t);return Object.entries(n).map(([t,[n,i,s]])=>{let{pattern:c,params:l}=ae(t),u={id:t,exec:e=>{let t=c.exec(e);if(t)return ce(t,l,r)},errors:[1,...s||[]].map(t=>e[t]),layouts:[0,...i||[]].map(o),leaf:a(n)};return u.errors.length=u.layouts.length=Math.max(u.errors.length,u.layouts.length),u});function a(t){let n=t<0;return n&&(t=~t),[n,e[t]]}function o(t){return t===void 0?t:[i.has(t),e[t]]}}function pe(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function me(e,t,n=JSON.stringify){let r=n(t);try{sessionStorage[e]=r}catch{}}var x=globalThis.__sveltekit_1c2yh6j?.base??``,he=globalThis.__sveltekit_1c2yh6j?.assets??x??``,ge=``;function _e(...e){if(!e[0].startsWith(`/`))throw Error(`Cannot use \`resolve(...)\` with a non-absolute pathname or route ID (got "${e[0]}"). \`resolve\` is only for internal pathnames and route IDs; external URLs should be used directly.`);return x+ge+de(e[0],e[1])}var ve=`1789748971278`,ye=`sveltekit:snapshot`,be=`sveltekit:scroll`,xe=`sveltekit:states`,S=`sveltekit:history`,C=`sveltekit:navigation`,w={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},Se=location.origin;function Ce(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){let e=document.getElementsByTagName(`base`);t=e.length?e[0].href:document.URL}return new URL(e,t)}function T(){return{x:pageXOffset,y:pageYOffset}}function E(e,t){return e.getAttribute(`data-sveltekit-${t}`)}var we={...w,"":w.hover};function Te(e){let t=e.assignedSlot??e.parentNode;return t?.nodeType===11&&(t=t.host),t}function Ee(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()===`A`&&e.hasAttribute(`href`))return e;e=Te(e)}}function De(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){let e=location.hash.split(`#`)[1]||`/`;r.hash=`#${e}${r.hash}`}}catch{}let i=e instanceof SVGAElement?e.target.baseVal:e.target,a=!r||!!i||D(r,t,n)||(e.getAttribute(`rel`)||``).split(/\s+/).includes(`external`),o=r?.origin===Se&&e.hasAttribute(`download`);return{url:r,external:a,target:i,download:o}}function Oe(e){let t=null,n=null,r=null,i=null,a=null,o=null,s=e;for(;s&&s!==document.documentElement;)r===null&&(r=E(s,`preload-code`)),i===null&&(i=E(s,`preload-data`)),t===null&&(t=E(s,`keepfocus`)),n===null&&(n=E(s,`noscroll`)),a===null&&(a=E(s,`reload`)),o===null&&(o=E(s,`replacestate`)),s=Te(s);function c(e){switch(e){case``:case`true`:return!0;case`off`:case`false`:return!1;default:return}}return{preload_code:we[r??`off`],preload_data:we[i??`off`],keepfocus:c(t),noscroll:c(n),reload:c(a),replace_state:c(o)}}function ke(e){let t=o(e),n=!0;function r(){n=!0,t.update(e=>e)}function i(e){n=!1,t.set(e)}function a(e){let r;return t.subscribe(t=>{(r===void 0||n&&t!==r)&&e(r=t)})}return{notify:r,set:i,subscribe:a}}var Ae={v:h};function je(){let{set:e,subscribe:t}=o(!1),n;async function r(){clearTimeout(n);try{let t=await fetch(`${he}/_app/version.json`,{headers:{pragma:`no-cache`,"cache-control":`no-cache`}});if(!t.ok)return!1;let r=(await t.json()).version!==ve;return r&&(e(!0),Ae.v(),clearTimeout(n)),r}catch{return!1}}return{subscribe:t,check:r}}function D(e,t,n){return e.origin!==Se||!e.pathname.startsWith(t)?!0:n?e.pathname!==location.pathname:!1}function Me(e){}var Ne=new Set([`load`,`prerender`,`csr`,`ssr`,`trailingSlash`,`config`]);[...Ne],[...new Set([...Ne])];function Pe(e){return e.filter(e=>e!=null)}function O(e,t){return e+`/`+t}function Fe(e){return e instanceof c||e instanceof u?e.status:500}function Ie(e){return e instanceof u?e.text:`Internal Error`}var k,A,Le,Re=n.toString().includes(`$$`)||/function \w+\(\) \{\}/.test(n.toString()),ze=`a:`;Re?(k={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL(ze)},A={current:null},Le={current:!1}):(k=new class{#e=r({});get data(){return t(this.#e)}set data(e){a(this.#e,e)}#t=r(null);get form(){return t(this.#t)}set form(e){a(this.#t,e)}#n=r(null);get error(){return t(this.#n)}set error(e){a(this.#n,e)}#r=r({});get params(){return t(this.#r)}set params(e){a(this.#r,e)}#i=r({id:null});get route(){return t(this.#i)}set route(e){a(this.#i,e)}#a=r({});get state(){return t(this.#a)}set state(e){a(this.#a,e)}#o=r(-1);get status(){return t(this.#o)}set status(e){a(this.#o,e)}#s=r(new URL(ze));get url(){return t(this.#s)}set url(e){a(this.#s,e)}},A=new class{#e=r(null);get current(){return t(this.#e)}set current(e){a(this.#e,e)}},Le=new class{#e=r(!1);get current(){return t(this.#e)}set current(e){a(this.#e,e)}},Ae.v=()=>Le.current=!0);function Be(e){Object.assign(k,e)}var Ve={spanContext(){return He},setAttribute(){return this},setAttributes(){return this},addEvent(){return this},setStatus(){return this},updateName(){return this},end(){return this},isRecording(){return!1},recordException(){return this},addLink(){return this},addLinks(){return this}},He={traceId:``,spanId:``,traceFlags:0},{onMount:Ue,tick:We}=i,Ge=new Set([`icon`,`shortcut icon`,`apple-touch-icon`]),j=null,M=pe(`sveltekit:scroll`)??{},N=pe(`sveltekit:snapshot`)??{},P={url:ke({}),page:ke({}),navigating:o(null),updated:je()};function Ke(e){M[e]=T()}function qe(e,t){let n=e+1;for(;M[n];)delete M[n],n+=1;for(n=t+1;N[n];)delete N[n],n+=1}function F(e,t=!1){return t?location.replace(e.href):location.href=e.href,new Promise(h)}async function Je(){if(`serviceWorker`in navigator){let e=await navigator.serviceWorker.getRegistration(x||`/`);e&&await e.update()}}var Ye,Xe,I,L,Ze,R,Qe={},$e={},z=[],B=[],V=null;function H(){V?.fork?.then(e=>e?.discard()),V=null,Q={element:void 0,href:void 0}}var et=new Map,tt=new Set,nt=new Set,U=new Set,W={branch:[],error:null,url:null,nav:null},rt=!1,it=!1,at=!0,G=!1,K=!1,ot=!1,st=!1,ct,q,J,Y,lt=new Set,ut=new Map,dt=new Map;async function ft(e,t,n){if(globalThis.__sveltekit_1c2yh6j.data){let{q:e={},p:t={},l:n={},f:r={}}=globalThis.__sveltekit_1c2yh6j.data;for(let t in e)Qe[t]=e[t];for(let e in n)Qe[e]=n[e];for(let e in r)Qe[e]=r[e];for(let e in t)$e[e]=t[e]}document.URL!==location.href&&(location.href=location.href),R=e,await e.hooks.init?.(),Ye=fe(e),L=document.documentElement,Ze=t,Xe=e.nodes[0],I=e.nodes[1],Xe(),I(),q=history.state?.[S],J=history.state?.[C],q||(q=J=Date.now(),history.replaceState({...history.state,[S]:q,[C]:J},``));let r=M[q];function i(){r&&(history.scrollRestoration=`manual`,scrollTo(r.x,r.y))}n?(i(),await Bt(Ze,n)):(await Z({type:`enter`,url:Ce(R.hash?Kt(new URL(location.href)):location.href),replace_state:!0}),i()),zt()}function pt(){z.length=0,st=!1}function mt(e){B.some(e=>e?.snapshot)&&(N[e]=B.map(e=>e?.snapshot?.capture()))}function ht(e){N[e]?.forEach((e,t)=>{B[t]?.snapshot?.restore(e)})}function gt(){Ke(q),me(be,M),mt(J),me(ye,N)}async function _t(t,n,r,i){let a,o;n.invalidateAll&&H(),await Z({type:`goto`,url:Ce(t),keepfocus:n.keepFocus,noscroll:n.noScroll,replace_state:n.replaceState,state:n.state,redirect_count:r,nav_token:i,accept:()=>{if(n.invalidateAll){st=!0,a=new Set;for(let[e,t]of ut)for(let[n,r]of t)r.resource?.reset(),a.add(O(e,n));o=new Set;for(let[e,t]of dt)for(let n of t.keys())o.add(O(e,n))}n.invalidate&&n.invalidate.forEach(Rt)}}),n.invalidateAll&&e().then(e).then(()=>{for(let[e,t]of ut)for(let[n,{resource:r}]of t)a?.has(O(e,n))&&r.start();for(let[e,t]of dt)for(let[n,{resource:r}]of t)o?.has(O(e,n))&&r.reconnect()})}async function vt(e){if(e.id!==V?.id){H();let t={};lt.add(t),V={id:e.id,token:t,promise:Ot({...e,preload:t}).then(e=>(lt.delete(t),e.type===`loaded`&&e.state.error&&H(),e)),fork:null}}return V.promise}async function yt(e){let t=(await X(e,!1))?.route;t&&await Promise.all([...t.layouts,t.leaf].filter(Boolean).map(e=>e[1]()))}async function bt(e,t,n){let r={params:W.params,route:{id:W.route?.id??null},url:new URL(location.href)};if(W={...e.state,nav:r},Be(e.props.page),ct=new R.root({target:t,props:{...e.props,stores:P,components:B},hydrate:n,sync:!1,transformError:void 0}),await Promise.resolve(),n){let e={from:null,to:{...r,scroll:M[q]??T()},willUnload:!1,type:`enter`,complete:Promise.resolve()};U.forEach(t=>t(e))}ht(J),it=!0}async function xt({url:e,params:t,branch:n,errors:r,status:i,error:a,route:o,form:s}){let c=`never`;if(x&&(e.pathname===x||e.pathname===x+`/`))c=`always`;else for(let e of n)e?.slash!==void 0&&(c=e.slash);e.pathname=d(e.pathname,c),e.search=e.search;let l={type:`loaded`,state:{url:e,params:t,branch:n,error:a,route:o},props:{constructors:Pe(n).map(e=>e.node.component),page:Gt(k)}};s!==void 0&&(l.props.form=s);let u={},f=!k,p=0;for(let e=0;e<Math.max(n.length,W.branch.length);e+=1){let t=n[e],r=W.branch[e];t?.data!==r?.data&&(f=!0),t&&(u={...u,...t.data},f&&(l.props[`data_${p}`]=u),p+=1)}return(!W.url||e.href!==W.url.href||W.error!==a||s!==void 0&&s!==k.form||f)&&(l.props.page={error:a,params:t,route:{id:o?.id??null},state:{},status:i,url:new URL(e),form:s??null,data:f?u:k.data}),l}async function St({loader:e,parent:t,url:n,params:r,route:i,server_data_node:a}){let o=null,s=!0,c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if(l.universal?.load){function e(...e){for(let t of e){let{href:e}=new URL(t,n);c.dependencies.add(e)}}let u={tracing:{enabled:!1,root:Ve,current:Ve},route:new Proxy(i,{get:(e,t)=>(s&&(c.route=!0),e[t])}),params:new Proxy(r,{get:(e,t)=>(s&&c.params.add(t),e[t])}),data:a?.data??null,url:ee(n,()=>{s&&(c.url=!0)},e=>{s&&c.search_params.add(e)},R.hash),async fetch(t,r){t instanceof Request&&(r={body:t.method===`GET`||t.method===`HEAD`?void 0:await t.blob(),cache:t.cache,credentials:t.credentials,headers:[...t.headers].length>0?t?.headers:void 0,integrity:t.integrity,keepalive:t.keepalive,method:t.method,mode:t.mode,redirect:t.redirect,referrer:t.referrer,referrerPolicy:t.referrerPolicy,signal:t.signal,...r});let{resolved:i,promise:a}=Ct(t,r,n);return s&&e(i.href),a},setHeaders:h,depends:e,parent(){return s&&(c.parent=!0),t()},untrack(e){s=!1;try{return e()}finally{s=!0}}};o=await l.universal.load.call(null,u)??null}return{node:l,loader:e,server:a,universal:l.universal?.load?{type:`data`,data:o,uses:c}:null,data:o??a?.data??null,slash:l.universal?.trailingSlash??a?.slash}}function Ct(e,t,n){let r=e instanceof Request?e.url:e,i=new URL(r,n);return i.origin===n.origin&&(r=i.href.slice(n.origin.length)),{resolved:i,promise:it?ne(r,i.href,t):y(r,t)}}function wt(e,t,n,r,i,a){if(st)return!0;if(!i)return!1;if(i.parent&&e||i.route&&t||i.url&&n)return!0;for(let e of i.search_params)if(r.has(e))return!0;for(let e of i.params)if(a[e]!==W.params[e])return!0;for(let e of i.dependencies)if(z.some(t=>t(new URL(e))))return!0;return!1}function Tt(e,t){return e?.type===`data`?e:e?.type===`skip`?t??null:null}function Et(e,t){if(!e)return new Set(t.searchParams.keys());let n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(let r of n){let i=e.searchParams.getAll(r),a=t.searchParams.getAll(r);i.every(e=>a.includes(e))&&a.every(e=>i.includes(e))&&n.delete(r)}return n}function Dt({error:e,url:t,route:n,params:r}){return{type:`loaded`,state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Gt(k),constructors:[]}}}async function Ot({id:e,invalidating:t,url:n,params:r,route:i,preload:a}){if(V?.id===e)return lt.delete(V.token),V.promise;let{errors:o,layouts:s,leaf:u}=i,d=[...s,u];o.forEach(e=>e?.().catch(h)),d.forEach(e=>e?.[1]().catch(h));let f=W.url?e!==Nt(W.url):!1,p=W.route?i.id!==W.route.id:!1,m=Et(W.url,n),ee=!1,g=d.map(async(e,t)=>{if(!e)return;let a=W.branch[t];return e[1]===a?.loader&&!wt(ee,p,f,m,a.universal?.uses,r)?a:(ee=!0,St({loader:e[1],url:n,params:r,route:i,parent:async()=>{let e={};for(let n=0;n<t;n+=1)Object.assign(e,(await g[n])?.data);return e},server_data_node:Tt(e[0]?{type:`skip`}:null,e[0]?a?.server:void 0)}))});for(let e of g)e.catch(h);let _=[];for(let e=0;e<d.length;e+=1)if(d[e])try{_.push(await g[e])}catch(t){if(t instanceof l)return{type:`redirect`,location:t.location};if(a&&lt.has(a))return Dt({error:await $(t,{params:r,url:n,route:{id:i.id}}),url:n,params:r,route:i});let s=Fe(t),u;if(t instanceof c)u=t.body;else{if(await P.updated.check())return await Je(),await F(n);u=await $(t,{params:r,url:n,route:{id:i.id}})}let d=await kt(e,_,o);return d?xt({url:n,params:r,branch:_.slice(0,d.idx).concat(d.node),errors:o,status:s,error:u,route:i}):await Ft(n,{id:i.id},u,s)}else _.push(void 0);return xt({url:n,params:r,branch:_,errors:o,status:200,error:null,route:i,form:t?void 0:null})}async function kt(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)--r;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function At({status:e,error:t,url:n,route:r}){let i={};try{return xt({url:n,params:i,branch:[await St({loader:Xe,url:n,params:i,route:r,parent:()=>Promise.resolve({}),server_data_node:Tt(null)}),{node:await I(),loader:I,universal:null,server:null,data:null}],status:e,error:t,errors:[],route:null})}catch(t){if(t instanceof l){await _t(new URL(t.location,location.href),{},0);return}let a=await R.get_error_template(),o=await $(t,{url:n,params:i,route:r}),s=a({status:e,message:String(o?.message??``).replace(/&/g,`&amp;`).replace(/</g,`&lt;`).replace(/>/g,`&gt;`)}),c=new DOMParser().parseFromString(s,`text/html`);throw document.documentElement.replaceChild(document.adoptNode(c.head),document.head),document.documentElement.replaceChild(document.adoptNode(c.body),document.body),t}}async function jt(e){let t=e.href;if(et.has(t))return et.get(t);let n;try{let r=(async()=>{let t=await R.hooks.reroute({url:new URL(e),fetch:async(t,n)=>Ct(t,n,e).promise})??e;if(typeof t==`string`){let n=new URL(e);R.hash?n.hash=t:n.pathname=t,t=n}return t})();et.set(t,r),n=await r}catch{et.delete(t);return}return n}async function X(e,t){if(e&&!D(e,x,R.hash)){let n=await jt(e);if(!n)return;let r=Mt(n);for(let n of Ye){let i=n.exec(r);if(i)return{id:Nt(e),invalidating:t,route:n,params:p(i),url:e}}}}function Mt(e){return f(R.hash?e.hash.replace(/^#/,``).replace(/[?#].+/,``):e.pathname.slice(x.length))||`/`}function Nt(e){return(R.hash?e.hash.replace(/^#/,``):e.pathname)+e.search}function Pt({url:e,type:t,intent:n,delta:r,event:i,scroll:a}){let o=!1,s=Wt(W,n,e,t,a??null);r!==void 0&&(s.navigation.delta=r),i!==void 0&&(s.navigation.event=i);let c={...s.navigation,cancel:()=>{o=!0,s.reject(Error(`navigation cancelled`))}};return G||tt.forEach(e=>e(c)),o?null:s}async function Z({type:t,url:n,popped:r,keepfocus:i,noscroll:a,replace_state:o,state:c={},redirect_count:l=0,nav_token:d={},accept:f=h,block:p=h,event:m}){let ee=Y;Y=d;let g=await X(n,!1),_=t===`enter`?Wt(W,g,n,t):Pt({url:n,type:t,delta:r?.delta,intent:g,scroll:r?.scroll,event:m});if(!_){p(),Y===d&&(Y=ee);return}let te=q,v=J;f(),G=!0,it&&_.navigation.type!==`enter`&&P.navigating.set(A.current=_.navigation);let y=g&&await Ot(g);if(!y){if(D(n,x,R.hash))return await F(n,o);y=await Ft(n,{id:null},await $(new u(404,`Not Found`,`Not found: ${n.pathname}`),{url:n,params:{},route:{id:null}}),404,o)}if(n=g?.url||n,Y!==d){_.reject(Error(`navigation aborted`));return}if(!y)return;if(y.type===`redirect`){if(l<20){await Z({type:t,url:new URL(y.location,n),popped:r,keepfocus:i,noscroll:a,replace_state:o,state:c,redirect_count:l+1,nav_token:d}),_.fulfil(void 0);return}if(y=await At({status:500,error:await $(Error(`Redirect loop`),{url:n,params:{},route:{id:null}}),url:n,route:{id:null}}),!y)return}else if(y.props.page.status>=400&&await P.updated.check())return await Je(),await F(n,o);if(pt(),Ke(te),mt(v),y.props.page.url.pathname!==n.pathname&&(n.pathname=y.props.page.url.pathname),c=r?r.state:c,!r){let e=+!o,t={[S]:q+=e,[C]:J+=e,[xe]:c};(o?history.replaceState:history.pushState).call(history,t,``,n),o||qe(q,J)}let ne=g&&V?.id===g.id?V.fork:null;V?.fork&&!ne?H():(V=null,Q={element:void 0,href:void 0}),y.props.page.state=c;let b;if(it){let e=(await Promise.all(Array.from(nt,e=>e(_.navigation)))).filter(e=>typeof e==`function`);if(e.length>0){function t(){e.forEach(e=>{U.delete(e)})}e.push(t),e.forEach(e=>{U.add(e)})}let t=_.navigation.to;W={...y.state,nav:{params:t.params,route:t.route,url:t.url}},y.props.page&&(y.props.page.url=n),!i&&document.activeElement instanceof HTMLElement&&document.activeElement!==document.body&&document.activeElement.blur();let r=ne&&await ne;r?b=r.commit():(j=null,ct.$set(y.props),j&&Object.assign(y.props.page,j),Be(y.props.page),b=s?.()),ot=!0}else await bt(y,Ze,!1);let{activeElement:re}=document;if(await b,await e(),await e(),Y!==d){_.reject(Error(`navigation aborted`));return}y.props.page&&j&&Object.assign(y.props.page,j);let ie=null;if(at){let e=r?r.scroll:a?T():null;e?scrollTo(e.x,e.y):(ie=n.hash&&document.getElementById(qt(n)))?ie.scrollIntoView():scrollTo(0,0)}let ae=document.activeElement!==re&&document.activeElement!==document.body;!i&&!ae&&Ut(n,!ie),at=!0,G=!1,_.fulfil(void 0),_.navigation.to&&(_.navigation.to.scroll=T()),U.forEach(e=>e(_.navigation)),t===`popstate`&&ht(J),P.navigating.set(A.current=null)}async function Ft(e,t,n,r,i){return e.origin===Se&&e.pathname===location.pathname&&!rt?await At({status:r,error:n,url:e,route:t}):await F(e,i)}var Q={element:void 0,href:void 0};function It(){let e,t;L.addEventListener(`mousemove`,t=>{let n=t.target;clearTimeout(e),e=setTimeout(()=>{i(n,w.hover)},20)});function n(e){e.defaultPrevented||i(e.composedPath()[0],w.tap)}L.addEventListener(`mousedown`,n),L.addEventListener(`touchstart`,n,{passive:!0});let r=new IntersectionObserver(e=>{for(let t of e)t.isIntersecting&&(yt(new URL(t.target.href)),r.unobserve(t.target))},{threshold:0});async function i(e,n){let r=Ee(e,L),i=r===Q.element&&r?.href===Q.href&&n>=t;if(!r||i)return;let{url:a,external:o,download:s}=De(r,x,R.hash);if(o||s)return;let c=Oe(r),l=a&&Nt(W.url)===Nt(a);if(!(c.reload||l)){if(n<=c.preload_data){Q={element:r,href:r.href},t=w.tap;let e=await X(a,!1);if(!e)return;vt(e)}else n<=c.preload_code&&(Q={element:r,href:r.href},t=n,yt(a))}}function a(){r.disconnect();for(let e of L.querySelectorAll(`a`)){let{url:t,external:n,download:i}=De(e,x,R.hash);if(n||i)continue;let a=Oe(e);a.reload||(a.preload_code===w.viewport&&r.observe(e),a.preload_code===w.eager&&yt(t))}}U.add(a),a()}function $(e,t){if(e instanceof c)return e.body;let n=Fe(e),r=Ie(e);return R.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function Lt(e,t={}){return e=new URL(Ce(e)),e.origin===Se?_t(e,t,0):Promise.reject(Error(`goto: invalid URL`))}function Rt(e){if(typeof e==`function`)z.push(e);else{let{href:t}=new URL(e,location.href);z.push(e=>e.href===t)}}function zt(){history.scrollRestoration=`manual`,addEventListener(`beforeunload`,e=>{let t=!1;if(gt(),!G){let e=Wt(W,void 0,null,`leave`),n={...e.navigation,cancel:()=>{t=!0,e.reject(Error(`navigation cancelled`))}};tt.forEach(e=>e(n))}t?(e.preventDefault(),e.returnValue=``):history.scrollRestoration=`auto`}),addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&gt()}),navigator.connection?.saveData||It(),L.addEventListener(`click`,async t=>{if(t.button||t.which!==1||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey||t.defaultPrevented)return;let n=Ee(t.composedPath()[0],L);if(!n)return;let{url:r,external:i,target:a,download:o}=De(n,x,R.hash);if(!r)return;if(a===`_parent`||a===`_top`){if(window.parent!==window)return}else if(a&&a!==`_self`)return;let s=Oe(n);if(!(n instanceof SVGAElement)&&r.protocol!==location.protocol&&r.protocol!==`https:`&&r.protocol!==`http:`||o)return;let[c,l]=(R.hash?r.hash.replace(/^#/,``):r.href).split(`#`),u=c===m(location);if(i||s.reload&&(!u||!l)){Pt({url:r,type:`link`,event:t})?G=!0:t.preventDefault();return}if(l!==void 0&&u){let[,i]=W.url.href.split(`#`);if(i===l){if(t.preventDefault(),l===``||l===`top`&&n.ownerDocument.getElementById(`top`)===null)scrollTo({top:0});else{let e=n.ownerDocument.getElementById(decodeURIComponent(l));e&&(e.scrollIntoView(),e.focus())}return}if(K=!0,Ke(q),e(r),!s.replace_state)return;K=!1}t.preventDefault(),await new Promise(e=>{requestAnimationFrame(()=>{setTimeout(e,0)}),setTimeout(e,100)}),await Z({type:`link`,url:r,keepfocus:s.keepfocus,noscroll:s.noscroll,replace_state:s.replace_state??r.href===location.href,event:t})}),L.addEventListener(`submit`,e=>{if(e.defaultPrevented)return;let t=HTMLFormElement.prototype.cloneNode.call(e.target),n=e.submitter;if((n?.formTarget||t.target)===`_blank`||(n?.formMethod||t.method)!==`get`)return;let r=new URL(n?.hasAttribute(`formaction`)&&n?.formAction||t.action);if(D(r,x,!1))return;let i=e.target,a=Oe(i);if(a.reload)return;e.preventDefault(),e.stopPropagation();let o=new FormData(i,n);r.search=new URLSearchParams(o).toString(),Z({type:`form`,url:r,keepfocus:a.keepfocus,noscroll:a.noscroll,replace_state:a.replace_state??r.href===location.href,event:e})}),addEventListener(`popstate`,async t=>{if(!Ht){if(t.state?.[`sveltekit:history`]){let n=t.state[S];if(Y={},n===q)return;let r=M[n],i=t.state[`sveltekit:states`]??{},a=new URL(t.state[`sveltekit:pageurl`]??location.href),o=t.state[C],s=W.url?m(location)===m(W.url):!1;if(o===J&&(ot||s)){i!==k.state&&(k.state=i),e(a),M[q]=T(),r&&scrollTo(r.x,r.y),q=n;return}let c=n-q;await Z({type:`popstate`,url:a,popped:{state:i,scroll:r,delta:c},accept:()=>{q=n,J=o},block:()=>{history.go(-c)},nav_token:Y,event:t})}else K||(e(new URL(location.href)),R.hash&&location.reload())}}),addEventListener(`hashchange`,()=>{K&&(K=!1,history.replaceState({...history.state,[S]:++q,[C]:J},``,location.href))});for(let e of document.querySelectorAll(`link`))Ge.has(e.rel)&&(e.href=e.href);addEventListener(`pageshow`,e=>{e.persisted&&P.navigating.set(A.current=null)});function e(e){W.url=k.url=e,P.page.set(Gt(k)),P.page.notify()}}async function Bt(e,{status:t=200,error:n,node_ids:r,params:i,route:a,server_route:o,data:s,form:c}){rt=!0;let u=new URL(location.href),d;({params:i={},route:a={id:null}}=await X(u,!1)||{}),d=Ye.find(({id:e})=>e===a.id);let f,p=!0;try{let e=r.map(async(t,n)=>{let r=s[n];return r?.uses&&(r.uses=Vt(r.uses)),St({loader:R.nodes[t],url:u,params:i,route:a,parent:async()=>{let t={};for(let r=0;r<n;r+=1)Object.assign(t,(await e[r]).data);return t},server_data_node:Tt(r)})}),o=await Promise.all(e);if(d){let e=d.layouts;for(let t=0;t<e.length;t++)e[t]||o.splice(t,0,void 0)}f=await xt({url:u,params:i,branch:o,status:t,error:n,errors:d?.errors,form:c,route:d??null})}catch(t){if(t instanceof l)return await F(new URL(t.location,location.href));f=await At({status:Fe(t),error:await $(t,{url:u,params:i,route:a}),url:u,route:a}),e.textContent=``,p=!1}f&&(f.props.page&&(f.props.page.state={}),await bt(f,e,p))}function Vt(e){return{dependencies:new Set(e?.dependencies??[]),params:new Set(e?.params??[]),parent:!!e?.parent,route:!!e?.route,url:!!e?.url,search_params:new Set(e?.search_params??[])}}var Ht=!1;function Ut(e,t=!0){let n=document.querySelector(`[autofocus]`);if(n)n.focus();else{let n=qt(e);if(n&&document.getElementById(n)){let{x:r,y:i}=T();setTimeout(()=>{let a=history.state;Ht=!0,location.replace(new URL(`#${n}`,location.href)),history.replaceState(a,``,e),t&&scrollTo(r,i),Ht=!1})}else{let e=document.body,t=e.getAttribute(`tabindex`);e.tabIndex=-1,e.focus({preventScroll:!0,focusVisible:!1}),t===null?e.removeAttribute(`tabindex`):e.setAttribute(`tabindex`,t)}let r=getSelection();if(r&&r.type!==`None`){let e=[];for(let t=0;t<r.rangeCount;t+=1)e.push(r.getRangeAt(t));setTimeout(()=>{if(r.rangeCount===e.length){for(let t=0;t<r.rangeCount;t+=1){let n=e[t],i=r.getRangeAt(t);if(n.commonAncestorContainer!==i.commonAncestorContainer||n.startContainer!==i.startContainer||n.endContainer!==i.endContainer||n.startOffset!==i.startOffset||n.endOffset!==i.endOffset)return}r.removeAllRanges()}})}}}function Wt(e,t,n,r,i=null){let a,o,s=new Promise((e,t)=>{a=e,o=t});return s.catch(h),{navigation:{from:{params:e.params,route:{id:e.route?.id??null},url:e.url,scroll:T()},to:n&&{params:t?.params??null,route:{id:t?.route?.id??null},url:n,scroll:i},willUnload:!t,type:r,complete:s},fulfil:a,reject:o}}function Gt(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Kt(e){let t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}function qt(e){let t;if(R.hash){let[,,n]=e.hash.split(`#`,3);t=n??``}else t=e.hash.slice(1);return decodeURIComponent(t)}export{Me as a,k as i,ft as n,_e as o,A as r,Lt as t};
@@ -1 +0,0 @@
1
- import{a as e,n as t}from"../chunks/DRAZWJyQ.js";export{e as load_css,t as start};