@stacksjs/stx 0.2.229 → 0.2.231

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/dist/{chunk-2n82qm71.js → chunk-18e804vq.js} +1 -1
  2. package/dist/{chunk-evnm04mk.js → chunk-39hy7f4g.js} +2 -2
  3. package/dist/{chunk-8mt7gk35.js → chunk-3h7exkbb.js} +1 -1
  4. package/dist/{chunk-z8v3qtzk.js → chunk-4j0fwfej.js} +1 -1
  5. package/dist/{chunk-k9gdaetd.js → chunk-4xzmg2xk.js} +1 -1
  6. package/dist/{chunk-yfj7tc37.js → chunk-58at6vf3.js} +1 -1
  7. package/dist/{chunk-edydd6c9.js → chunk-5n44cxqv.js} +1 -1
  8. package/dist/{chunk-x8w319bf.js → chunk-6k9e6vfx.js} +2 -2
  9. package/dist/{chunk-b318zf0z.js → chunk-7hdjf2d8.js} +1 -1
  10. package/dist/chunk-7qx5ebq7.js +3 -0
  11. package/dist/{chunk-tswv4p1r.js → chunk-7vj34efv.js} +1 -1
  12. package/dist/{chunk-yjzznatw.js → chunk-8hdb7abn.js} +1 -1
  13. package/dist/{chunk-v6015c7x.js → chunk-8tekg302.js} +1 -1
  14. package/dist/{chunk-k8kx4npc.js → chunk-8tth46zf.js} +1 -1
  15. package/dist/{chunk-17zts4jt.js → chunk-8ybja3e1.js} +1 -1
  16. package/dist/{chunk-yj90q1bk.js → chunk-ayv6vby2.js} +1 -1
  17. package/dist/{chunk-rhdr9jp2.js → chunk-b72rxkbf.js} +1 -1
  18. package/dist/{chunk-d4tnecbv.js → chunk-d729yxzx.js} +1 -1
  19. package/dist/{chunk-z61y1yv1.js → chunk-dn8x6vf7.js} +268 -268
  20. package/dist/{chunk-0wcpp78j.js → chunk-e63m9jhd.js} +2 -2
  21. package/dist/{chunk-9vnc4a3b.js → chunk-f0yhv8yr.js} +1 -1
  22. package/dist/{chunk-n3ba1kf9.js → chunk-fk4waw6p.js} +1 -1
  23. package/dist/{chunk-6ge7t20t.js → chunk-h2fq4ksg.js} +1 -1
  24. package/dist/{chunk-pnarrxms.js → chunk-h9z3rfk8.js} +1 -1
  25. package/dist/{chunk-g29rxrje.js → chunk-ht4wqwr6.js} +1 -1
  26. package/dist/{chunk-3nnja4z6.js → chunk-hwvzkhbe.js} +1 -1
  27. package/dist/{chunk-c6y91qmt.js → chunk-jewcmcaf.js} +1 -1
  28. package/dist/{chunk-qanmpzke.js → chunk-k4ejba6b.js} +1 -1
  29. package/dist/{chunk-0aj80aj9.js → chunk-kf2w2xxb.js} +1 -1
  30. package/dist/{chunk-8qhyzqk6.js → chunk-pq6rgbbw.js} +1 -1
  31. package/dist/{chunk-mkfeqges.js → chunk-pw21r03f.js} +1 -1
  32. package/dist/{chunk-4tqmx6dd.js → chunk-q9v240z7.js} +1 -1
  33. package/dist/{chunk-ctdrjf3m.js → chunk-r1ym4dxv.js} +1 -1
  34. package/dist/{chunk-nxf2s46y.js → chunk-sc3bz0z7.js} +1 -1
  35. package/dist/{chunk-5qhjeyp4.js → chunk-smr28g8g.js} +1 -1
  36. package/dist/{chunk-vy253t51.js → chunk-t13jx2p3.js} +1 -1
  37. package/dist/{chunk-s3sa0z97.js → chunk-t7had6e0.js} +1 -1
  38. package/dist/{chunk-ywpcqmrz.js → chunk-tgcbjer0.js} +1 -1
  39. package/dist/{chunk-bxb8v1ev.js → chunk-ty6pj7b5.js} +72 -72
  40. package/dist/{chunk-rgxtc72z.js → chunk-v4rgwxs1.js} +1 -1
  41. package/dist/{chunk-ypq3brzq.js → chunk-vmx4f37f.js} +1 -1
  42. package/dist/{chunk-53wyachb.js → chunk-x7v6xqz9.js} +1 -1
  43. package/dist/{chunk-07n6dv48.js → chunk-zs9j4xyx.js} +1 -1
  44. package/dist/cli.js +7 -7
  45. package/dist/craft-entry.js +1 -1
  46. package/dist/craft.js +1 -1
  47. package/dist/misc-directives.d.ts +8 -3
  48. package/dist/misc-directives.js +71 -2
  49. package/dist/page-action.d.ts +1 -1
  50. package/dist/page-action.js +4 -1
  51. package/dist/process.js +1 -1
  52. package/dist/production-server.js +1 -1
  53. package/dist/pwa.js +1 -1
  54. package/dist/signal-processing.js +1 -1
  55. package/dist/ssg.js +2 -2
  56. package/dist/ssr.js +15 -15
  57. package/dist/types/config-types.d.ts +17 -0
  58. package/dist/utils.js +9 -2
  59. package/package.json +5 -5
  60. package/dist/chunk-87m6cyay.js +0 -3
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{gp as a,hp as b}from"./chunk-z61y1yv1.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-yjzznatw.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{b as processLoops,a as parseLoopBinding};
2
+ import{gp as a,hp as b}from"./chunk-dn8x6vf7.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-8hdb7abn.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{b as processLoops,a as parseLoopBinding};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{a as x,b as u,c as b,d as Az,e as G,f as d,h as y,i as I,j as Uz,k as v}from"./chunk-0y46fbkx.js";import{l as h,m as f,n as g}from"./chunk-q9n5swx7.js";import{ap as V}from"./chunk-z61y1yv1.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-yjzznatw.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import{Eu as F}from"./chunk-q891e1vj.js";import l from"fs";import R from"path";function m(z,J){let Z=[R.join(z.root,"stx.config.ts"),R.join(z.root,"stx.config.js"),R.join(z.root,"stx.config.mjs")],K=J.debounceMs??300,$=null,X=[];for(let B of Z)try{if(!l.existsSync(B))continue;let Y=l.watch(B,(W)=>{if(W==="change"){if($)clearTimeout($);$=setTimeout(async()=>{d("Config file changed, restarting...");try{await J.onChange()}catch(j){G(`Failed to restart: ${j}`)}},K)}});X.push(Y)}catch{}return{stop(){if($)clearTimeout($);for(let B of X)B.close()}}}import E from"fs";import i from"path";var Gz=".stx/story/analytics.json",Nz=1,c=1e4;class M{storage;storagePath;currentSession=null;dirty=!1;viewStartTimes=new Map;constructor(z){this.storagePath=i.join(z,Gz),this.storage=this.loadStorage(),this.startSession()}loadStorage(){try{let z=E.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Nz,events:[],sessions:[]}}}async save(){if(!this.dirty)return;let z=i.dirname(this.storagePath);if(await E.promises.mkdir(z,{recursive:!0}),this.storage.events.length>c)this.storage.events=this.storage.events.slice(-c);await E.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}startSession(){this.endSession(),this.currentSession={id:Hz(),startTime:Date.now(),componentViews:[]},this.storage.sessions.push(this.currentSession),this.dirty=!0}endSession(){if(this.currentSession)this.currentSession.endTime=Date.now(),this.currentSession=null}track(z){this.storage.events.push({...z,timestamp:Date.now()}),this.dirty=!0}trackView(z,J){if(this.endViewTiming(z),this.viewStartTimes.set(z,Date.now()),this.track({type:"view",componentId:z,variantId:J}),this.currentSession&&!this.currentSession.componentViews.includes(z))this.currentSession.componentViews.push(z)}endViewTiming(z){let J=this.viewStartTimes.get(z);if(J){let Z=Date.now()-J;this.track({type:"view",componentId:z,metadata:{duration:Z,endView:!0}}),this.viewStartTimes.delete(z)}}trackPropChange(z,J,Z){this.track({type:"prop_change",componentId:z,propName:J,metadata:{value:Z}})}trackVariantSwitch(z,J){this.track({type:"variant_switch",componentId:z,variantId:J})}trackSearch(z,J){this.track({type:"search",query:z,metadata:{resultCount:J}})}getComponentAnalytics(z,J){let Z=this.storage.events.filter((Q)=>Q.componentId===z),K=Z.filter((Q)=>Q.type==="view"&&!Q.metadata?.endView),$=Z.filter((Q)=>Q.type==="prop_change"),X=Z.filter((Q)=>Q.type==="variant_switch"),B={};for(let Q of $)if(Q.propName)B[Q.propName]=(B[Q.propName]||0)+1;let Y={};for(let Q of X)if(Q.variantId)Y[Q.variantId]=(Y[Q.variantId]||0)+1;let W=new Set(this.storage.sessions.filter((Q)=>Q.componentViews.includes(z)).map((Q)=>Q.id)),j=Z.filter((Q)=>Q.metadata?.duration).map((Q)=>Q.metadata.duration),U=j.length>0?j.reduce((Q,D)=>Q+D,0)/j.length:0,_=Object.entries(B).sort((Q,D)=>D[1]-Q[1]).slice(0,5).map(([Q])=>Q);return{componentId:z,componentName:J,viewCount:K.length,uniqueViews:W.size,lastViewed:K[K.length-1]?.timestamp,propChanges:B,topChangedProps:_,variantViews:Y,avgTimeSpent:U}}getMostViewedComponents(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="view"&&Z.componentId&&!Z.metadata?.endView)J.set(Z.componentId,(J.get(Z.componentId)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({componentId:Z,viewCount:K})).sort((Z,K)=>K.viewCount-Z.viewCount).slice(0,z)}getMostChangedProps(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="prop_change"&&Z.propName)J.set(Z.propName,(J.get(Z.propName)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({propName:Z,changeCount:K})).sort((Z,K)=>K.changeCount-Z.changeCount).slice(0,z)}getSearchAnalytics(){let z=this.storage.events.filter(($)=>$.type==="search"),J=new Map,Z=0;for(let $ of z){if($.query)J.set($.query,(J.get($.query)||0)+1);if($.metadata?.resultCount!==void 0)Z+=$.metadata.resultCount}let K=Array.from(J.entries()).map(([$,X])=>({query:$,count:X})).sort(($,X)=>X.count-$.count).slice(0,10);return{totalSearches:z.length,topQueries:K,avgResultCount:z.length>0?Z/z.length:0}}clear(){this.storage.events=[],this.storage.sessions=[],this.dirty=!0,this.startSession()}exportAnalytics(){return JSON.stringify({exportedAt:Date.now(),...this.storage},null,2)}}function Hz(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import P from"fs";import p from"path";var Fz=".stx/story/bookmarks.json",Vz=1;class T{storage;storagePath;dirty=!1;constructor(z){this.storagePath=p.join(z,Fz),this.storage=this.loadStorage()}loadStorage(){try{let z=P.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Vz,bookmarks:[]}}}async save(){if(!this.dirty)return;let z=p.dirname(this.storagePath);await P.promises.mkdir(z,{recursive:!0}),await P.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}addBookmark(z,J,Z,K={}){let $={id:Rz(),name:K.name||`${z}/${J}`,storyId:z,variantId:J,props:Z,created:Date.now(),notes:K.notes,color:K.color};return this.storage.bookmarks.push($),this.dirty=!0,$}getAllBookmarks(){return[...this.storage.bookmarks]}getBookmarksForStory(z){return this.storage.bookmarks.filter((J)=>J.storyId===z)}getBookmark(z){return this.storage.bookmarks.find((J)=>J.id===z)}isBookmarked(z,J){return this.storage.bookmarks.some((Z)=>Z.storyId===z&&Z.variantId===J)}updateBookmark(z,J){let Z=this.getBookmark(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deleteBookmark(z){let J=this.storage.bookmarks.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.bookmarks.splice(J,1),this.dirty=!0,!0}toggleBookmark(z,J,Z){let K=this.storage.bookmarks.find((X)=>X.storyId===z&&X.variantId===J);if(K)return this.deleteBookmark(K.id),{added:!1};return{added:!0,bookmark:this.addBookmark(z,J,Z)}}exportBookmarks(){return JSON.stringify(this.storage,null,2)}importBookmarks(z,J=!0){let Z=JSON.parse(z),K=0;for(let $ of Z.bookmarks){if(J){let X=this.storage.bookmarks.find((B)=>B.id===$.id);if(X)Object.assign(X,$);else this.storage.bookmarks.push($)}else this.storage.bookmarks.push($);K++}if(K>0)this.dirty=!0;return K}}function Rz(){return`bm-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var N=new Set;function s(){return{open(z){N.add(z),z.send(JSON.stringify({type:"connected",timestamp:Date.now()}))},close(z){N.delete(z)},message(z,J){}}}function q(z){let J=JSON.stringify({...z,timestamp:z.timestamp||Date.now()});for(let Z of N)try{Z.send(J)}catch{N.delete(Z)}}function n(z,J){q({type:"story-update",data:{storyId:z,...J}})}function a(z,J){q({type:"story-add",data:{storyId:z,...J}})}function o(z){q({type:"story-remove",data:{storyId:z}})}function r(z){return`
2
+ import{a as x,b as u,c as b,d as Az,e as G,f as d,h as y,i as I,j as Uz,k as v}from"./chunk-0y46fbkx.js";import{l as h,m as f,n as g}from"./chunk-q9n5swx7.js";import{ap as V}from"./chunk-dn8x6vf7.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-8hdb7abn.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import{Eu as F}from"./chunk-q891e1vj.js";import l from"fs";import R from"path";function m(z,J){let Z=[R.join(z.root,"stx.config.ts"),R.join(z.root,"stx.config.js"),R.join(z.root,"stx.config.mjs")],K=J.debounceMs??300,$=null,X=[];for(let B of Z)try{if(!l.existsSync(B))continue;let Y=l.watch(B,(W)=>{if(W==="change"){if($)clearTimeout($);$=setTimeout(async()=>{d("Config file changed, restarting...");try{await J.onChange()}catch(j){G(`Failed to restart: ${j}`)}},K)}});X.push(Y)}catch{}return{stop(){if($)clearTimeout($);for(let B of X)B.close()}}}import E from"fs";import i from"path";var Gz=".stx/story/analytics.json",Nz=1,c=1e4;class M{storage;storagePath;currentSession=null;dirty=!1;viewStartTimes=new Map;constructor(z){this.storagePath=i.join(z,Gz),this.storage=this.loadStorage(),this.startSession()}loadStorage(){try{let z=E.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Nz,events:[],sessions:[]}}}async save(){if(!this.dirty)return;let z=i.dirname(this.storagePath);if(await E.promises.mkdir(z,{recursive:!0}),this.storage.events.length>c)this.storage.events=this.storage.events.slice(-c);await E.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}startSession(){this.endSession(),this.currentSession={id:Hz(),startTime:Date.now(),componentViews:[]},this.storage.sessions.push(this.currentSession),this.dirty=!0}endSession(){if(this.currentSession)this.currentSession.endTime=Date.now(),this.currentSession=null}track(z){this.storage.events.push({...z,timestamp:Date.now()}),this.dirty=!0}trackView(z,J){if(this.endViewTiming(z),this.viewStartTimes.set(z,Date.now()),this.track({type:"view",componentId:z,variantId:J}),this.currentSession&&!this.currentSession.componentViews.includes(z))this.currentSession.componentViews.push(z)}endViewTiming(z){let J=this.viewStartTimes.get(z);if(J){let Z=Date.now()-J;this.track({type:"view",componentId:z,metadata:{duration:Z,endView:!0}}),this.viewStartTimes.delete(z)}}trackPropChange(z,J,Z){this.track({type:"prop_change",componentId:z,propName:J,metadata:{value:Z}})}trackVariantSwitch(z,J){this.track({type:"variant_switch",componentId:z,variantId:J})}trackSearch(z,J){this.track({type:"search",query:z,metadata:{resultCount:J}})}getComponentAnalytics(z,J){let Z=this.storage.events.filter((Q)=>Q.componentId===z),K=Z.filter((Q)=>Q.type==="view"&&!Q.metadata?.endView),$=Z.filter((Q)=>Q.type==="prop_change"),X=Z.filter((Q)=>Q.type==="variant_switch"),B={};for(let Q of $)if(Q.propName)B[Q.propName]=(B[Q.propName]||0)+1;let Y={};for(let Q of X)if(Q.variantId)Y[Q.variantId]=(Y[Q.variantId]||0)+1;let W=new Set(this.storage.sessions.filter((Q)=>Q.componentViews.includes(z)).map((Q)=>Q.id)),j=Z.filter((Q)=>Q.metadata?.duration).map((Q)=>Q.metadata.duration),U=j.length>0?j.reduce((Q,D)=>Q+D,0)/j.length:0,_=Object.entries(B).sort((Q,D)=>D[1]-Q[1]).slice(0,5).map(([Q])=>Q);return{componentId:z,componentName:J,viewCount:K.length,uniqueViews:W.size,lastViewed:K[K.length-1]?.timestamp,propChanges:B,topChangedProps:_,variantViews:Y,avgTimeSpent:U}}getMostViewedComponents(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="view"&&Z.componentId&&!Z.metadata?.endView)J.set(Z.componentId,(J.get(Z.componentId)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({componentId:Z,viewCount:K})).sort((Z,K)=>K.viewCount-Z.viewCount).slice(0,z)}getMostChangedProps(z=10){let J=new Map;for(let Z of this.storage.events)if(Z.type==="prop_change"&&Z.propName)J.set(Z.propName,(J.get(Z.propName)||0)+1);return Array.from(J.entries()).map(([Z,K])=>({propName:Z,changeCount:K})).sort((Z,K)=>K.changeCount-Z.changeCount).slice(0,z)}getSearchAnalytics(){let z=this.storage.events.filter(($)=>$.type==="search"),J=new Map,Z=0;for(let $ of z){if($.query)J.set($.query,(J.get($.query)||0)+1);if($.metadata?.resultCount!==void 0)Z+=$.metadata.resultCount}let K=Array.from(J.entries()).map(([$,X])=>({query:$,count:X})).sort(($,X)=>X.count-$.count).slice(0,10);return{totalSearches:z.length,topQueries:K,avgResultCount:z.length>0?Z/z.length:0}}clear(){this.storage.events=[],this.storage.sessions=[],this.dirty=!0,this.startSession()}exportAnalytics(){return JSON.stringify({exportedAt:Date.now(),...this.storage},null,2)}}function Hz(){return`session-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import P from"fs";import p from"path";var Fz=".stx/story/bookmarks.json",Vz=1;class T{storage;storagePath;dirty=!1;constructor(z){this.storagePath=p.join(z,Fz),this.storage=this.loadStorage()}loadStorage(){try{let z=P.readFileSync(this.storagePath,"utf-8");return JSON.parse(z)}catch{return{version:Vz,bookmarks:[]}}}async save(){if(!this.dirty)return;let z=p.dirname(this.storagePath);await P.promises.mkdir(z,{recursive:!0}),await P.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}addBookmark(z,J,Z,K={}){let $={id:Rz(),name:K.name||`${z}/${J}`,storyId:z,variantId:J,props:Z,created:Date.now(),notes:K.notes,color:K.color};return this.storage.bookmarks.push($),this.dirty=!0,$}getAllBookmarks(){return[...this.storage.bookmarks]}getBookmarksForStory(z){return this.storage.bookmarks.filter((J)=>J.storyId===z)}getBookmark(z){return this.storage.bookmarks.find((J)=>J.id===z)}isBookmarked(z,J){return this.storage.bookmarks.some((Z)=>Z.storyId===z&&Z.variantId===J)}updateBookmark(z,J){let Z=this.getBookmark(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deleteBookmark(z){let J=this.storage.bookmarks.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.bookmarks.splice(J,1),this.dirty=!0,!0}toggleBookmark(z,J,Z){let K=this.storage.bookmarks.find((X)=>X.storyId===z&&X.variantId===J);if(K)return this.deleteBookmark(K.id),{added:!1};return{added:!0,bookmark:this.addBookmark(z,J,Z)}}exportBookmarks(){return JSON.stringify(this.storage,null,2)}importBookmarks(z,J=!0){let Z=JSON.parse(z),K=0;for(let $ of Z.bookmarks){if(J){let X=this.storage.bookmarks.find((B)=>B.id===$.id);if(X)Object.assign(X,$);else this.storage.bookmarks.push($)}else this.storage.bookmarks.push($);K++}if(K>0)this.dirty=!0;return K}}function Rz(){return`bm-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}var N=new Set;function s(){return{open(z){N.add(z),z.send(JSON.stringify({type:"connected",timestamp:Date.now()}))},close(z){N.delete(z)},message(z,J){}}}function q(z){let J=JSON.stringify({...z,timestamp:z.timestamp||Date.now()});for(let Z of N)try{Z.send(J)}catch{N.delete(Z)}}function n(z,J){q({type:"story-update",data:{storyId:z,...J}})}function a(z,J){q({type:"story-add",data:{storyId:z,...J}})}function o(z){q({type:"story-remove",data:{storyId:z}})}function r(z){return`
3
3
  <script>
4
4
  (function() {
5
5
  const ws = new WebSocket('${z}');
@@ -556,7 +556,7 @@ window.__stxPerformance = {
556
556
 
557
557
  window.clearPerformanceMetrics = () => window.__stxPerformance.clear();
558
558
  </script>
559
- `}import w from"fs";import Xz from"path";var Mz=".stx/story/presets.json",C=1,Pz=10;class k{storage;storagePath;dirty=!1;constructor(z){this.storagePath=Xz.join(z,Mz),this.storage=this.loadStorage()}loadStorage(){try{let z=w.readFileSync(this.storagePath,"utf-8"),J=JSON.parse(z);if(J.version!==C)return this.migrateStorage(J);return J}catch{return{version:C,presets:[],recentIds:[]}}}migrateStorage(z){return{version:C,presets:z.presets||[],recentIds:z.recentIds||[]}}async save(){if(!this.dirty)return;let z=Xz.dirname(this.storagePath);await w.promises.mkdir(z,{recursive:!0}),await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(z,J,Z={}){let K={id:Tz(),name:z,description:Z.description,props:J,componentId:Z.componentId,created:Date.now(),usageCount:0,tags:Z.tags};return this.storage.presets.push(K),this.dirty=!0,K}getPreset(z){return this.storage.presets.find((J)=>J.id===z)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(z){return this.storage.presets.filter((J)=>!J.componentId||J.componentId===z)}getRecentPresets(){return this.storage.recentIds.map((z)=>this.getPreset(z)).filter((z)=>z!==void 0)}usePreset(z){let J=this.getPreset(z);if(!J)return;return J.lastUsed=Date.now(),J.usageCount++,this.storage.recentIds=[z,...this.storage.recentIds.filter((Z)=>Z!==z)].slice(0,Pz),this.dirty=!0,J}updatePreset(z,J){let Z=this.getPreset(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deletePreset(z){let J=this.storage.presets.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.presets.splice(J,1),this.storage.recentIds=this.storage.recentIds.filter((Z)=>Z!==z),this.dirty=!0,!0}searchPresets(z){let J=z.toLowerCase();return this.storage.presets.filter((Z)=>{if(Z.name.toLowerCase().includes(J))return!0;if(Z.description?.toLowerCase().includes(J))return!0;if(Z.tags?.some((K)=>K.toLowerCase().includes(J)))return!0;return!1})}getMostUsedPresets(z=5){return[...this.storage.presets].sort((J,Z)=>Z.usageCount-J.usageCount).slice(0,z)}exportPresets(z){let J=z?this.storage.presets.filter((Z)=>z.includes(Z.id)):this.storage.presets;return JSON.stringify({presets:J},null,2)}importPresets(z,J=!1){let Z=JSON.parse(z),K=0;for(let $ of Z.presets){let X=this.storage.presets.find((B)=>B.id===$.id);if(X&&!J)continue;if(X)Object.assign(X,$);else this.storage.presets.push($);K++}if(K>0)this.dirty=!0;return K}}function Tz(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";var Qz=new Map;async function H(z,J,Z={}){let K=performance.now(),$=[];try{let X=await S.promises.stat(J),B=Qz.get(J),Y;if(B&&B.mtime===X.mtimeMs)Y=B.content;else Y=await S.promises.readFile(J,"utf-8"),Qz.set(J,{content:Y,mtime:X.mtimeMs,analyzed:null});let{processDirectives:W}=await import("./chunk-edydd6c9.js"),j={},U=A(Y);if(U)try{await V(U,j,J)}catch(O){$.push(`Warning: Could not extract script variables: ${O instanceof Error?O.message:String(O)}`)}if(Z.props)Object.assign(j,Z.props);let Q=await W(Y,j,J,{},new Set),D=Wz(Y),L=A(Y);return Q=jz(Q),Q=Dz(Q,j),{html:Q,css:D,js:L,errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}async function qz(z){try{let J=await S.promises.readFile(z,"utf-8"),Z=A(J);if(!Z)return null;let K={};if(await V(Z,K,z),Array.isArray(K.variants))return K.variants;return null}catch{return null}}async function Bz(z,J,Z,K){let $=J.story?.variants;if(!$){let Y=await qz(J.path);if(Y)$=Y}if(!$&&Z==="default")return H(z,J.path,{props:K||{}});if(!$)return H(z,J.path,{props:K||{}});let X=$.find((Y)=>Y.id===Z);if(!X&&Z==="default")return H(z,J.path,{props:K||{}});if(!X)return{html:'<div class="stx-render-error">Variant not found</div>',css:"",js:"",errors:[`Variant '${Z}' not found`],duration:0};let B={...X.state,...K};if(X.source)return wz(z,X.source,B);return H(z,J.path,{props:B})}async function wz(z,J,Z={}){let K=performance.now(),$=[];try{let{processDirectives:X}=await import("./chunk-edydd6c9.js"),B={...Z},Y=A(J);if(Y)try{await V(Y,B,"inline-template.stx")}catch{}let j=await X(J,B,"inline-template.stx",{},new Set);return j=jz(j),j=Dz(j,B),{html:j,css:Wz(J),js:A(J),errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}function Wz(z){let J=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
559
+ `}import w from"fs";import Xz from"path";var Mz=".stx/story/presets.json",C=1,Pz=10;class k{storage;storagePath;dirty=!1;constructor(z){this.storagePath=Xz.join(z,Mz),this.storage=this.loadStorage()}loadStorage(){try{let z=w.readFileSync(this.storagePath,"utf-8"),J=JSON.parse(z);if(J.version!==C)return this.migrateStorage(J);return J}catch{return{version:C,presets:[],recentIds:[]}}}migrateStorage(z){return{version:C,presets:z.presets||[],recentIds:z.recentIds||[]}}async save(){if(!this.dirty)return;let z=Xz.dirname(this.storagePath);await w.promises.mkdir(z,{recursive:!0}),await w.promises.writeFile(this.storagePath,JSON.stringify(this.storage,null,2)),this.dirty=!1}createPreset(z,J,Z={}){let K={id:Tz(),name:z,description:Z.description,props:J,componentId:Z.componentId,created:Date.now(),usageCount:0,tags:Z.tags};return this.storage.presets.push(K),this.dirty=!0,K}getPreset(z){return this.storage.presets.find((J)=>J.id===z)}getAllPresets(){return[...this.storage.presets]}getPresetsForComponent(z){return this.storage.presets.filter((J)=>!J.componentId||J.componentId===z)}getRecentPresets(){return this.storage.recentIds.map((z)=>this.getPreset(z)).filter((z)=>z!==void 0)}usePreset(z){let J=this.getPreset(z);if(!J)return;return J.lastUsed=Date.now(),J.usageCount++,this.storage.recentIds=[z,...this.storage.recentIds.filter((Z)=>Z!==z)].slice(0,Pz),this.dirty=!0,J}updatePreset(z,J){let Z=this.getPreset(z);if(!Z)return;return Object.assign(Z,J),this.dirty=!0,Z}deletePreset(z){let J=this.storage.presets.findIndex((Z)=>Z.id===z);if(J===-1)return!1;return this.storage.presets.splice(J,1),this.storage.recentIds=this.storage.recentIds.filter((Z)=>Z!==z),this.dirty=!0,!0}searchPresets(z){let J=z.toLowerCase();return this.storage.presets.filter((Z)=>{if(Z.name.toLowerCase().includes(J))return!0;if(Z.description?.toLowerCase().includes(J))return!0;if(Z.tags?.some((K)=>K.toLowerCase().includes(J)))return!0;return!1})}getMostUsedPresets(z=5){return[...this.storage.presets].sort((J,Z)=>Z.usageCount-J.usageCount).slice(0,z)}exportPresets(z){let J=z?this.storage.presets.filter((Z)=>z.includes(Z.id)):this.storage.presets;return JSON.stringify({presets:J},null,2)}importPresets(z,J=!1){let Z=JSON.parse(z),K=0;for(let $ of Z.presets){let X=this.storage.presets.find((B)=>B.id===$.id);if(X&&!J)continue;if(X)Object.assign(X,$);else this.storage.presets.push($);K++}if(K>0)this.dirty=!0;return K}}function Tz(){return`preset-${Date.now()}-${Math.random().toString(36).slice(2,8)}`}import S from"fs";var Qz=new Map;async function H(z,J,Z={}){let K=performance.now(),$=[];try{let X=await S.promises.stat(J),B=Qz.get(J),Y;if(B&&B.mtime===X.mtimeMs)Y=B.content;else Y=await S.promises.readFile(J,"utf-8"),Qz.set(J,{content:Y,mtime:X.mtimeMs,analyzed:null});let{processDirectives:W}=await import("./chunk-5n44cxqv.js"),j={},U=A(Y);if(U)try{await V(U,j,J)}catch(O){$.push(`Warning: Could not extract script variables: ${O instanceof Error?O.message:String(O)}`)}if(Z.props)Object.assign(j,Z.props);let Q=await W(Y,j,J,{},new Set),D=Wz(Y),L=A(Y);return Q=jz(Q),Q=Dz(Q,j),{html:Q,css:D,js:L,errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}async function qz(z){try{let J=await S.promises.readFile(z,"utf-8"),Z=A(J);if(!Z)return null;let K={};if(await V(Z,K,z),Array.isArray(K.variants))return K.variants;return null}catch{return null}}async function Bz(z,J,Z,K){let $=J.story?.variants;if(!$){let Y=await qz(J.path);if(Y)$=Y}if(!$&&Z==="default")return H(z,J.path,{props:K||{}});if(!$)return H(z,J.path,{props:K||{}});let X=$.find((Y)=>Y.id===Z);if(!X&&Z==="default")return H(z,J.path,{props:K||{}});if(!X)return{html:'<div class="stx-render-error">Variant not found</div>',css:"",js:"",errors:[`Variant '${Z}' not found`],duration:0};let B={...X.state,...K};if(X.source)return wz(z,X.source,B);return H(z,J.path,{props:B})}async function wz(z,J,Z={}){let K=performance.now(),$=[];try{let{processDirectives:X}=await import("./chunk-5n44cxqv.js"),B={...Z},Y=A(J);if(Y)try{await V(Y,B,"inline-template.stx")}catch{}let j=await X(J,B,"inline-template.stx",{},new Set);return j=jz(j),j=Dz(j,B),{html:j,css:Wz(J),js:A(J),errors:$,duration:performance.now()-K}}catch(X){return $.push(X instanceof Error?X.message:String(X)),{html:`<div class="stx-render-error">${Lz($[0])}</div>`,css:"",js:"",errors:$,duration:performance.now()-K}}}function Wz(z){let J=[],Z=/<style\b[^>]*>([\s\S]*?)<\/style>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
560
560
  `)}function jz(z){return z.replace(/<!--[\s\S]*?-->/g,"").replace(/<style\b[^>]*>[\s\S]*?<\/style>/gi,"").replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/^\s*\n/gm,"").trim()}function A(z){let J=[],Z=/<script\b[^>]*>([\s\S]*?)<\/script>/gi,K=Z.exec(z);while(K!==null)J.push(K[1].trim()),K=Z.exec(z);return J.join(`
561
561
  `)}function Dz(z,J){let Z=`<script>window.__stxProps = ${JSON.stringify(J)};</script>`;return z+Z}function Lz(z){return z.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}async function Oz(z,J){let Z=await I(z);f(z,Z);let K=v(z.config,Z);g(z,K),console.log(` Found ${Z.length} story files`);let $=typeof J.host==="string"?J.host:J.host===!0?"0.0.0.0":"localhost",X=new k(z.root),B=new T(z.root),Y=new M(z.root),W=s(),j=Bun.serve({port:J.port,hostname:$,fetch:async(Q,D)=>{let O=new URL(Q.url).pathname;if(O==="/__hmr"){if(D.upgrade(Q,{data:{isHmr:!0}}))return;return new Response("WebSocket upgrade failed",{status:400})}if(O.startsWith("/api/"))return Cz(z,O,Q,{presetsManager:X,bookmarksManager:B,analyticsTracker:Y});return kz(z,O,J.port)},websocket:{open(Q){W.open(Q)},close(Q){W.close(Q)},message(Q,D){W.message(Q,D)}}}),U=`http://${$}:${J.port}`,_=Uz(z,async(Q,D)=>{console.log(` [${Q}] ${D.relativePath}`);let L=await I(z);f(z,L);let O=v(z.config,L);if(g(z,O),Q==="add")a(D.id,{fileName:D.fileName});else if(Q==="unlink")o(D.id);else n(D.id,{fileName:D.fileName})});if(J.open){let Q=U;try{let{exec:D}=await import("child_process"),L=process.platform;D(`${L==="darwin"?"open":L==="win32"?"start":"xdg-open"} ${Q}`)}catch{}}return{server:j,url:U,close:async()=>{_(),j.stop()}}}async function Cz(z,J,Z,K){let{presetsManager:$,bookmarksManager:X,analyticsTracker:B}=K;if(J==="/api/stories")return Response.json({files:z.storyFiles.map((Y)=>({id:Y.id,fileName:Y.fileName,relativePath:Y.relativePath,treePath:Y.treePath})),tree:z.tree});if(J.startsWith("/api/story/")){let Y=J.slice(11),W=z.storyFiles.find((j)=>j.id===Y);if(!W)return new Response("Story not found",{status:404});try{let j=await Bun.file(W.path).text();return Response.json({id:W.id,fileName:W.fileName,relativePath:W.relativePath,content:j})}catch{return new Response("Error reading story",{status:500})}}if(J==="/api/config")return Response.json({theme:z.config.theme,responsivePresets:z.config.responsivePresets,backgroundPresets:z.config.backgroundPresets});if(J.startsWith("/api/render/")){let Y=new URL(Z.url),W=J.slice(12).split("/"),j=W[0],U=W[1]||"default",_,Q=Y.searchParams.get("props");if(Q)try{_=JSON.parse(Q)}catch{}let D=z.storyFiles.find((L)=>L.id===j);if(!D)return new Response("Story not found",{status:404});try{let L=await Bz(z,D,U,_);return Response.json({html:L.html,css:L.css,js:L.js,errors:L.errors,duration:L.duration})}catch(L){return Response.json({html:"",css:"",js:"",errors:[L instanceof Error?L.message:String(L)],duration:0},{status:500})}}if(J==="/api/presets"&&Z.method==="GET")return Response.json({presets:$.getAllPresets()});if(J==="/api/presets"&&Z.method==="POST")try{let Y=await Z.json(),W=$.createPreset(Y.name,Y.props,{componentId:Y.componentId,description:Y.description});return await $.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J.startsWith("/api/presets/")&&!J.includes("/use")&&Z.method==="GET"){let Y=J.slice(13),W=$.getPreset(Y);if(!W)return new Response("Preset not found",{status:404});return Response.json(W)}if(J.endsWith("/use")&&Z.method==="POST"){let Y=J.slice(13,-4),W=$.usePreset(Y);if(!W)return new Response("Preset not found",{status:404});return await $.save(),Response.json(W)}if(J.startsWith("/api/presets/")&&Z.method==="DELETE"){let Y=J.slice(13);if(!$.deletePreset(Y))return new Response("Preset not found",{status:404});return await $.save(),Response.json({success:!0})}if(J==="/api/bookmarks"&&Z.method==="GET")return Response.json({bookmarks:X.getAllBookmarks()});if(J==="/api/bookmarks"&&Z.method==="POST")try{let Y=await Z.json(),W=X.addBookmark(Y.storyId,Y.variantId,Y.props,{name:Y.name,notes:Y.notes,color:Y.color});return await X.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J==="/api/bookmarks/toggle"&&Z.method==="POST")try{let Y=await Z.json(),W=X.toggleBookmark(Y.storyId,Y.variantId,Y.props);return await X.save(),Response.json(W)}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J.startsWith("/api/bookmarks/")&&J!=="/api/bookmarks/toggle"&&Z.method==="GET"){let Y=J.slice(15),W=X.getBookmark(Y);if(!W)return new Response("Bookmark not found",{status:404});return Response.json(W)}if(J.startsWith("/api/bookmarks/")&&Z.method==="DELETE"){let Y=J.slice(15);if(!X.deleteBookmark(Y))return new Response("Bookmark not found",{status:404});return await X.save(),Response.json({success:!0})}if(J==="/api/analytics/track"&&Z.method==="POST")try{let Y=await Z.json();if(Y.type==="view"&&Y.componentId)B.trackView(Y.componentId,Y.variantId);else if(Y.type==="prop_change"&&Y.componentId&&Y.propName)B.trackPropChange(Y.componentId,Y.propName,null);else if(Y.type==="variant_switch"&&Y.componentId&&Y.variantId)B.trackVariantSwitch(Y.componentId,Y.variantId);else if(Y.type==="search"&&Y.query)B.trackSearch(Y.query,0);return await B.save(),Response.json({success:!0})}catch(Y){return Response.json({error:String(Y)},{status:400})}if(J==="/api/analytics/summary"&&Z.method==="GET")return Response.json({mostViewed:B.getMostViewedComponents(10),mostChangedProps:B.getMostChangedProps(10),searchAnalytics:B.getSearchAnalytics()});if(J.startsWith("/api/analytics/component/")&&Z.method==="GET"){let Y=J.slice(25),W=z.storyFiles.find((U)=>U.id===Y),j=B.getComponentAnalytics(Y,W?.fileName||Y);return Response.json(j)}return new Response("Not found",{status:404})}function kz(z,J,Z){let K=Sz(z,Z);return new Response(K,{headers:{"Content-Type":"text/html; charset=utf-8"}})}function Sz(z,J){let{theme:Z}=z.config,K=Z.title||"STX Story",$=`ws://localhost:${J}/__hmr`,X=r($);return`<!DOCTYPE html>
562
562
  <html lang="en" class="${Z.darkClass||"dark"}">
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$ as Wk,$a as Nm,$b as eo,$c as ep,$d as eq,A as Gj,Aa as Yl,Ab as yn,Ac as Fo,Ad as Fp,Ae as Lq,B as Hj,Ba as Zl,Bb as zn,Bc as Go,Bd as Gp,Be as Mq,C as Ij,Ca as km,Cb as An,Cc as Ho,Cd as Hp,Ce as Nq,D as Jj,Da as lm,Db as Bn,Dc as Io,Dd as Ip,De as Oq,E as zk,Ea as mm,Eb as Cn,Ec as Jo,Ed as Jp,Ee as Pq,F as Ak,Fa as nm,Fb as Dn,Fc as Ko,Fd as Kp,Fe as Qq,G as Bk,Ga as om,Gb as En,Gc as Lo,Gd as Lp,Ge as Rq,H as Ck,Ha as sm,Hb as Fn,Hc as Mo,Hd as Mp,He as Sq,I as Dk,Ia as tm,Ib as Gn,Ic as No,Id as Np,Ie as Tq,J as Ek,Ja as um,Jb as Hn,Jc as Oo,Jd as Op,Je as Uq,K as Fk,Ka as vm,Kb as In,Kc as Po,Kd as Pp,Ke as Vq,L as Gk,La as wm,Lb as Jn,Lc as Qo,Ld as Qp,Le as Wq,M as Hk,Ma as xm,Mb as Kn,Mc as Ro,Md as Rp,Me as Xq,N as Ik,Na as ym,Nb as Rn,Nc as So,Nd as Sp,Ne as Yq,O as Jk,Oa as zm,Ob as Sn,Oc as To,Od as Tp,Oe as Zq,P as Kk,Pa as Am,Pb as Tn,Pc as Uo,Pd as Up,Pe as _q,Q as Lk,Qa as Bm,Qb as Un,Qc as Vo,Qd as Vp,Qe as $q,R as Mk,Ra as Cm,Rb as Vn,Rc as Wo,Rd as Wp,Re as ar,S as Nk,Sa as Dm,Sb as Wn,Sc as Xo,Sd as Xp,Se as br,T as Ok,Ta as Em,Tb as Xn,Tc as Yo,Td as Yp,Te as cr,U as Pk,Ua as Fm,Ub as Yn,Uc as Zo,Ud as Zp,Ue as dr,V as Qk,Va as Gm,Vb as Zn,Vc as _o,Vd as _p,Ve as er,W as Rk,Wa as Hm,Wb as _n,Wc as $o,Wd as $p,We as fr,X as Sk,Xa as Jm,Xb as $n,Xc as ap,Xd as aq,Y as Tk,Ya as Km,Yb as ao,Yc as bp,Yd as bq,Z as Uk,Za as Lm,Zb as bo,Zc as cp,Zd as cq,_ as Vk,_a as Mm,_b as co,_c as dp,_d as dq,aa as Xk,ab as Om,ac as fo,ad as fp,ae as fq,ba as Yk,bb as Pm,bc as go,bd as gp,be as gq,ca as Zk,cb as Qm,cc as ho,cd as hp,ce as hq,da as _k,db as Rm,dc as io,dd as ip,de as iq,ea as $k,eb as Sm,ec as jo,ed as jp,ee as jq,fa as al,fb as Tm,fc as ko,fd as kp,fe as kq,ga as bl,gb as Um,gc as lo,gd as lp,ge as lq,ha as cl,hb as Vm,hc as mo,hd as mp,he as mq,ia as dl,ib as Wm,ic as no,id as np,ie as nq,ja as el,jb as Xm,jc as oo,jd as op,je as oq,ka as fl,kb as Ym,kc as po,kd as pp,ke as pq,la as gl,lb as Zm,lc as qo,ld as qp,le as qq,ma as hl,mb as _m,mc as ro,md as rp,me as rq,na as il,nb as $m,nc as so,nd as sp,ne as sq,o as a,oa as jl,ob as cn,oc as to,od as tp,oe as zq,p as rj,pa as Nl,pb as dn,pc as uo,pd as up,pe as Aq,q as sj,qa as Ol,qb as en,qc as vo,qd as vp,qe as Bq,r as tj,ra as Pl,rb as fn,rc as wo,rd as wp,re as Cq,s as uj,sa as Ql,sb as mn,sc as xo,sd as xp,se as Dq,t as vj,ta as Rl,tb as nn,tc as yo,td as yp,te as Eq,u as wj,ua as Sl,ub as on,uc as zo,ud as zp,ue as Fq,v as xj,va as Tl,vb as pn,vc as Ao,vd as Ap,ve as Gq,w as yj,wa as Ul,wb as un,wc as Bo,wd as Bp,we as Hq,x as zj,xa as Vl,xb as vn,xc as Co,xd as Cp,xe as Iq,y as Ej,ya as Wl,yb as wn,yc as Do,yd as Dp,ye as Jq,z as Fj,za as Xl,zb as xn,zc as Eo,zd as Ep,ze as Kq}from"./chunk-bxb8v1ev.js";import{$e as Oj,Xe as Kj,Ye as Lj,Ze as Mj,_e as Nj,af as Pj,bf as Qj,cf as Rj,df as Sj,ef as Tj,ff as Uj,gf as Vj,hf as Wj,if as Xj,jf as Yj}from"./chunk-jcped0kt.js";import{kf as nk,lf as ok,mf as pk,nf as qk,of as rk,pf as sk,qf as tk,rf as uk,sf as vk,tf as wk,uf as xk,vf as yk}from"./chunk-zpvva2dh.js";import{Af as Pn,Bf as Qn,wf as Ln,xf as Mn,yf as Nn,zf as On}from"./chunk-9vnc4a3b.js";import{Cf as an,Df as bn}from"./chunk-5d4csjhx.js";import{Ef as gn}from"./chunk-k9gdaetd.js";import{Ff as Bl,Gf as Cl,Hf as Dl,If as El,Jf as Hl,Kf as Ll}from"./chunk-rgxtc72z.js";import{Lf as Fl,Of as Gl}from"./chunk-5ys0zfgp.js";import{$f as dm,Wf as _l,Xf as $l,Yf as am,Zf as bm,_f as cm,ag as em,bg as fm,cg as gm,dg as hm,eg as im,fg as jm}from"./chunk-e6tvnnnz.js";import{gg as lk,hg as mk}from"./chunk-6pzgmp1h.js";import{ig as Ml}from"./chunk-mkfeqges.js";import{jg as pm,kg as qm,lg as rm,mg as Im,ng as hn,og as jn,pg as kn,qg as ln,rg as qn,sg as rn,tg as sn,ug as tn}from"./chunk-87m6cyay.js";import{Ag as pl,Bg as ql,Cg as rl,Dg as sl,Eg as tl,Fg as ul,Gg as vl,Hg as wl,Ig as Il,Jg as Jl,Kg as Kl,vg as kl,wg as ll,xg as ml,yg as nl,zg as ol}from"./chunk-ywpcqmrz.js";import{Lg as Gi,Mg as Hi,Ng as Ii,Og as Ji,Pg as Ki,Qg as Li,Rg as Mi,Sg as Ni,Tg as Oi,Ug as Pi,Vg as Qi}from"./chunk-z6e0b8wv.js";import{Wg as gj,Yg as hj}from"./chunk-m54yzzn8.js";import{ch as Zj,dh as _j,eh as $j,fh as ak,gh as bk,hh as ck,ih as dk,kh as ek,lh as fk,mh as gk,nh as hk,oh as ik,ph as jk,sh as kk}from"./chunk-m38wyaes.js";import{th as Wg}from"./chunk-9edt3qh6.js";import{uh as bh,vh as ch,wh as dh,xh as eh,yh as fh,zh as gh}from"./chunk-c6y91qmt.js";import{Ah as vi,Bh as wi,Ch as xi,Gh as yi,Hh as zi,Ih as Ai}from"./chunk-xcac3tkq.js";import{Jh as li,Kh as mi,Lh as ni,Mh as oi,Nh as pi,Ph as qi,Qh as ri,Rh as si,Sh as ti,Th as ui}from"./chunk-jw1besrt.js";import{Uh as hg,Vh as ig,Wh as jg,Xh as kg,Yh as lg}from"./chunk-z6ev72qj.js";import{$h as og,Zh as mg,_h as ng,ai as pg,bi as qg}from"./chunk-72w4hhbq.js";import{ci as rg,di as sg,ei as tg,fi as ug,gi as vg,hi as wg,ii as xg}from"./chunk-snktca7b.js";import{ji as yg,ki as zg,li as Ag,mi as Bg,ni as Cg,oi as Dg}from"./chunk-s88yt309.js";import{Ai as Og,Bi as Pg,Ci as Qg,Di as Rg,qi as Eg,ri as Fg,si as Gg,ti as Hg,ui as Ig,vi as Jg,wi as Kg,xi as Lg,yi as Mg,zi as Ng}from"./chunk-74pjj8d0.js";import{Fi as Sg,Gi as Tg,Hi as Ug,Ii as Vg}from"./chunk-a6nnbnmb.js";import{Ni as If,Oi as Jf,Pi as Kf,Qi as Lf,Ri as Mf,Si as Nf,Ti as Of,Ui as Pf,Vi as Qf,Wi as Rf,Xi as Sf}from"./chunk-8qhyzqk6.js";import{Yi as Xf,Zi as Yf}from"./chunk-k8kx4npc.js";import{aj as Zf}from"./chunk-6ge7t20t.js";import"./chunk-efr3ejqt.js";import{ej as _f}from"./chunk-swy03mg9.js";import{fj as $f,gj as ag}from"./chunk-cq6fsp6j.js";import{hj as bg,ij as cg,jj as dg,kj as eg,lj as fg,mj as gg}from"./chunk-572ttrsj.js";import{Aj as be,nj as Qd,oj as Rd,pj as Sd,qj as Td,rj as Ud,sj as Vd,tj as Wd,uj as Xd,vj as Yd,wj as Zd,xj as _d,yj as $d,zj as ae}from"./chunk-0aj80aj9.js";import{Bj as Gf,Cj as Hf}from"./chunk-6rjc6687.js";import{Jj as sf,Kj as tf,Lj as uf,Mj as vf,Nj as wf,Oj as xf,Pj as yf,Qj as zf,Rj as Af,Sj as Bf,Tj as Cf,Uj as Df,Vj as Ef,Wj as Ff}from"./chunk-k6b7gpk2.js";import{ok as tq,pk as uq,qk as vq,rk as wq,sk as xq,tk as yq}from"./chunk-0wcpp78j.js";import{Ak as zl,Bk as Al,uk as Aj,vk as Bj,wk as Cj,xk as Dj,yk as xl,zk as yl}from"./chunk-n58aem37.js";import"./chunk-c0n802j1.js";import"./chunk-ncvd7673.js";import{$m as Hb,$n as Hc,$p as ff,$q as Kh,$r as lj,Al as ea,Am as hb,An as gc,Ao as wd,Ap as Ge,Aq as Wf,Ar as ji,Bl as fa,Bm as ib,Bn as hc,Bo as xd,Bp as He,Bq as Xg,Br as ki,Cl as ga,Cm as jb,Cn as ic,Co as yd,Cp as Ie,Cq as Yg,Cr as Bi,Dl as ha,Dm as kb,Dn as jc,Do as zd,Dp as Je,Dq as Zg,Dr as Ci,El as ia,Em as lb,En as kc,Eo as Ad,Ep as Ke,Eq as _g,Er as Di,Fm as mb,Fn as lc,Fo as Bd,Fp as Le,Fq as $g,Fr as Ei,Gn as mc,Go as Cd,Gp as Me,Gq as ah,Gr as Fi,Hl as ja,Hm as nb,Hn as nc,Ho as Dd,Hp as Ne,Hq as hh,Hr as Ri,Il as ka,Im as ob,In as oc,Io as Ed,Ip as Oe,Iq as ih,Ir as Si,Jl as la,Jm as pb,Jn as pc,Jo as Fd,Jp as Pe,Jq as jh,Jr as Ti,Kl as ma,Km as qb,Kn as qc,Ko as Gd,Kp as Qe,Kq as kh,Kr as Ui,Ll as na,Lm as rb,Ln as rc,Lo as Hd,Lp as Re,Lq as lh,Lr as Vi,Mm as sb,Mn as sc,Mo as Id,Mp as Se,Mq as mh,Mr as Wi,Nm as tb,Nn as tc,No as Jd,Np as Te,Nq as nh,Nr as Xi,Ol as qa,Om as ub,On as uc,Oo as Kd,Op as Ue,Oq as oh,Or as Yi,Pl as ra,Pm as vb,Pn as vc,Po as Ld,Pp as Ve,Pq as ph,Pr as Zi,Ql as ya,Qm as wb,Qn as wc,Qo as Md,Qp as We,Qq as qh,Qr as _i,Rl as za,Rm as xb,Rn as xc,Ro as Nd,Rp as Xe,Rq as rh,Rr as $i,Sl as Aa,Sm as yb,Sn as yc,So as Od,Sp as Ye,Sq as sh,Sr as aj,Tl as Ba,Tm as zb,Tn as zc,To as Pd,Tp as Ze,Tq as th,Tr as bj,Ul as Ca,Um as Ab,Un as Ac,Up as _e,Uq as uh,Ur as cj,Vl as Da,Vm as Bb,Vn as Bc,Vo as he,Vp as $e,Vq as vh,Vr as dj,Wl as Ea,Wm as Cb,Wn as Cc,Wp as af,Wq as wh,Wr as ej,Xl as Fa,Xm as Db,Xn as Dc,Xp as bf,Xq as xh,Xr as fj,Yl as Ga,Ym as Eb,Yn as Ec,Yp as cf,Yq as Hh,Yr as ij,Zm as Fb,Zn as Fc,Zp as df,Zq as Ih,Zr as jj,_m as Gb,_n as Gc,_p as ef,_q as Jh,_r as kj,an as Ib,ao as Ic,ap as ie,aq as gf,ar as Lh,as as mj,bm as Ha,bn as Jb,bo as Jc,bq as hf,br as Mh,bs as nj,cm as Ia,cn as Kb,co as Kc,cp as je,cq as jf,cr as Nh,cs as oj,dm as Ja,dn as Lb,do as Lc,dq as kf,dr as Oh,ds as pj,em as Ka,en as Mb,eo as Mc,ep as ke,eq as lf,er as Ph,es as qj,fm as La,fn as Nb,fo as Nc,fp as le,fq as mf,fr as Qh,gm as Ma,gn as Ob,go as Oc,gp as me,gq as nf,gr as Rh,hl as s,hn as Pb,ho as Pc,hp as ne,hq as of,hr as Sh,il as t,in as Qb,io as Qc,ip as oe,iq as pf,ir as Th,jl as u,jm as Na,jn as Rb,jo as Rc,jp as pe,jq as qf,jr as Uh,kl as v,km as Oa,kn as Sb,ko as Sc,kp as qe,kq as rf,kr as Vh,ll as w,lm as Pa,ln as Tb,lo as Tc,lp as re,lr as Wh,ml as x,mm as Qa,mn as Ub,mo as id,mp as se,mq as Tf,mr as Xh,nl as y,nm as Ra,nn as Vb,no as jd,np as te,nr as Yh,ol as z,om as Sa,on as Wb,oo as kd,op as ue,or as Zh,pl as A,pm as Ta,pn as Xb,po as ld,pp as ve,pr as _h,ql as B,qm as Ua,qn as Yb,qo as md,qp as we,qr as $h,rl as C,rm as Va,rn as Zb,ro as nd,rp as xe,rr as ai,sl as D,sm as Wa,sn as _b,so as od,sp as ye,sr as bi,tl as E,tm as Xa,tn as $b,to as pd,tp as ze,tr as ci,ul as F,um as Ya,un as ac,uo as qd,up as Ae,ur as di,vl as G,vm as Za,vn as bc,vo as rd,vp as Be,vr as ei,wl as H,wm as _a,wn as cc,wo as sd,wp as Ce,wr as fi,xl as I,xm as $a,xn as dc,xo as td,xp as De,xr as gi,yl as J,yn as ec,yo as ud,yp as Ee,yq as Uf,yr as hi,zl as da,zm as gb,zn as fc,zo as vd,zp as Fe,zq as Vf,zr as ii}from"./chunk-z61y1yv1.js";import{fs as d,gs as e,hs as f,is as g,js as h,ks as i,ls as j,ms as k,ns as l,os as m,ps as n,qs as o,rs as p,ss as q,ts as r}from"./chunk-by2p4by1.js";import{As as Eh,Bs as Fh,Cs as Gh,us as yh,vs as zh,ws as Ah,xs as Bh,ys as Ch,zs as Dh}from"./chunk-a2ppgamd.js";import{Ds as b,Es as c}from"./chunk-dmzc008f.js";import{Fs as oa,Gs as pa}from"./chunk-nstqd54d.js";import{Hs as ab,Is as bb,Ks as cb,Us as db,Vs as eb,Ws as fb}from"./chunk-yjzznatw.js";import{Xs as ce,Ys as de,Zs as ee,_s as fe,bt as ge}from"./chunk-kqjxwz6c.js";import{ct as sa,dt as ta,et as ua,ft as va,gt as wa,ht as xa}from"./chunk-t0jzk81v.js";import{it as Uc,jt as Vc,kt as Wc,lt as Xc,mt as Yc,nt as Zc,ot as _c,pt as $c,qt as ad,rt as bd,st as cd,tt as dd,ut as ed,vt as fd,wt as gd,xt as hd}from"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import{Mt as K,Nt as L,Qt as M,Vt as N,Wt as O,au as P,bu as Q,cu as R,du as S,eu as T,fu as U,gu as V,hu as W,iu as X,ju as Y,ku as Z,lu as _,mu as $,nu as aa,ou as ba,qu as ca}from"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{Uj as writeNetlifyConfig,Jl as writeManifest,xk as writeImageManifest,_n as wrapComponentForHMR,Uq as withDefaults,fj as webComponentDirectiveHandler,Qo as watermark,Sp as watchViews,Hk as watchMultiple,Ik as watchEffect,Gk as watch,ge as warmImagePlaceholders,Vk as waitForStore,Hd as waitForLocale,Mn as virtualPathFor,Ui as videoDirective,cc as validators,Yq as validated,td as validateValueEnhanced,Yg as validateTemplate,Vo as validateParams,ud as validateFormEnhanced,Hp as validateFile,pd as validateFields,od as validateField,_g as validateDirective,Oc as validateCspDirectives,nj as validateConfig,Ol as validateComponentScripts,km as validateComponentProps,Wf as validateClientScript,Vg as v,Ua as usesSignalsInScript,lh as userComponentFileExists,Bg as useVirtualList,ad as useTitle,Uk as useStoreOrThrow,ro as useStore,Ej as useStorage,bq as useSlots,Gj as useSessionStorage,Zc as useSeoMeta,Wk as useRouteParams,Yk as useRouteParamOrThrow,Xk as useRouteParam,ad as usePageTitle,Ff as useOptimistic,_k as useMiddlewareValue,Zk as useMiddlewareState,Fj as useLocalStorage,Tn as useLoadingIndicator,Xc as useHead,Sg as useForm,dq as useAttrs,Jp as uploadFiles,Ip as uploadFile,Rk as updateInstance,Df as untrack,Bh as unregisterDirective,Sk as unmountInstance,$a as unescapeHtml,Pn as typecheckStxFiles,kh as transpileTypeScript,Iq as translate,w as transitionDirective,em as toUsers,dm as toUser,zo as thumbnail,Ap as thumbHashToRGBA,Bp as thumbHashToDataURL,If as templateCache,vb as syncRecordedResponse,Xn as stxClientHelpers,Ce as structuredDataDirective,Lq as stripLocalePrefix,ul as stripDocumentWrapper,pa as stripCommentsAndLiterals,Sm as stringToStream,Cc as strictCspPreset,Yd as streamingSuspenseDirective,ae as streamToResponse,Wd as streamTemplateSimple,Qd as streamTemplate,zj as stopHmrServer,am as stopBroadcasting,va as stateDirName,wa as stateDir,sf as state,mf as startsDocument,tn as startProductionServer,gn as startInteractive,$l as startBroadcasting,D as staggerDirective,To as srcsetUrls,E as springDirective,lc as splitByPipe,ql as spaNavVaryHeaders,Nn as sourcePathFor,_o as smartBatchSign,nh as slotContentHasExpressions,Yo as signUrl,ih as shouldTranspileTypeScript,wj as shouldReloadOnChange,bp as shouldRefreshSignature,xj as shouldIgnoreFile,tg as shouldCacheComponent,Do as sharpen,$q as shape,ua as setStateDir,cl as setRouteParams,dl as setMiddlewareState,fe as setImagePlaceholder,Xp as setGlobalProvide,zb as setErrorLocale,zk as setCurrentInstance,Ii as setCachedVideoResult,xi as setCachedImageResult,ri as setCached,cr as serveStxFile,er as serveMultipleStxFiles,rj as serveMarkdownFile,Dn as serveFile,fr as serveApp,Cn as serve,bo as serializeState,Im as serializeSetCookie,Fo as sepia,_c as seoMetaToHeadConfig,x as scrollAnimateDirective,q as screenReaderDirective,Yi as scopeHTML,Xi as scopeCSS,Fe as scanForSitemapEntries,k as scanA11yTargets,l as scanA11yIssues,Jo as saturation,Wo as sanitizeParams,ec as sanitizeFilePath,fc as sanitizeExpression,gc as sanitizeDirectiveParams,dc as sanitizeDirectiveParam,hc as sanitizeComponentProps,Zb as safeExecuteAsync,Yb as safeExecute,ve as runPreProcessingMiddleware,we as runPostProcessingMiddleware,kn as runPageAction,yf as runMountCallbacks,ba as runMiddleware,Pk as runHooks,Bq as runDoctor,zf as runDestroyCallbacks,Ke as runComposers,Ko as rotate,Wg as rewriteImagesWithSiblings,wb as responseBindings,rh as resolveTemplatePath,c as resolveStxTargets,jj as resolveStxDirectories,Hq as resolveI18n,xo as resize,Ha as resetPlaceholders,Wc as resetHead,ao as resetHMRHandler,Mb as resetErrorConfig,Wq as required,La as replacePlaceholders,Qp as renderView,Ri as renderVideoComponent,za as renderVendorStyleTags,kq as renderToString,lq as renderToStream,mq as renderToDOM,zp as renderThumbhashToCanvas,yq as renderTemplateString,wq as renderTemplate,xq as renderString,Td as renderStreamingPage,dh as renderSlot,jg as renderSSRSuspense,jp as renderProtectedVideo,ip as renderProtectedImg,Xo as renderMediaUpload,vq as renderMarkdownView,zl as renderLayoutTypes,Bi as renderImgComponent,nk as renderImageComponent,cd as renderHtmlAttrs,bd as renderHead,Tp as renderEmail,ph as renderComponentWithSlot,dd as renderBodyAttrs,mo as render,Ec as relaxedCspPreset,nd as registerValidationRule,_d as registerStreamingDirectives,to as registerStoresClient,al as registerStore,De as registerSeoDirectives,V as registerMiddleware,Pa as registerFilters,Oa as registerFilter,Bb as registerErrorMessages,sd as registerEnhancedValidationRule,yh as registerDirective,Nc as registerCspDirectives,nm as registerComponentDirectives,J as registerAnimationDirectives,r as registerA11yDirectives,Dk as ref,_m as redirect,rb as recordResponseStatus,sb as recordResponseHeader,xa as rebaseOntoStateDir,tb as readResponseStatus,ub as readResponseHeaders,pj as readMarkdownFile,Jf as readFileCached,Ek as reactive,Oo as quality,gp as pruneSignatureCache,ui as pruneCache,Vp as provide,uq as protectCodeBlocks,Vq as prop,Oe as processVueTemplate,zg as processVirtualListDirectives,Dg as processVirtualGridDirectives,Qi as processVideo,qd as processValidateDirective,Od as processTranslateDirective,dg as processTransitionDirectives,gg as processTransitionAttributes,gd as processTitleDirective,jb as processTemplateBindings,$f as processTeleportDirectives,hg as processSuspenseDirectives,ye as processStructuredData,Ud as processStreamDirectives,xb as processStatusDirective,Qg as processStaticDirectives,te as processStackReplacements,se as processStackPushDirectives,eh as processSlots,sl as processShell,Me as processServerBindings,ze as processSeoDirective,$d as processSectionDirectives,Re as processScopedStyles,hb as processReactiveBindings,kp as processProtectedMedia,Jg as processPartialHydrationDirectives,Vf as processOnceDirective,ue as processMiddleware,xe as processMetaDirectives,hd as processMetaDirective,qj as processMarkdownFileDirectives,wh as processMarkdownDirectives,ne as processLoops,rg as processKeepAliveDirectives,Uf as processJsonDirective,Cg as processInfiniteListDirectives,re as processIncludes,Di as processImgComponents,pk as processImageComponents,ck as processImage,fd as processHeadDirective,jd as processForms,ld as processFormInputDirectives,Ya as processExpressions,ma as processEventDirectives,md as processErrorDirective,Pe as processDynamicComponents,Xg as processDirectives,Gh as processDirectiveAttributes,_f as processDeferDirectives,Sc as processCustomDirectives,Kc as processCspDirectives,ar as processComponentProps,Ga as processClientScript,kd as processBasicFormDirectives,mg as processAsyncDirectives,Tc as processAppearanceBootstrapDirective,A as processAnimationDirectives,f as processA11yDirectives,Dd as preloadTranslationsBackground,Cd as preloadTranslations,Sn as preloadIslandHandlers,he as preloadIconCollection,Xl as poolStrings,hj as pluginManager,de as placeholdersWarmed,cg as performLeave,bg as performEnter,Af as pendingLifecycleCounts,Ef as peek,oe as partialsCache,Si as parseVideoDirectiveOptions,vo as parseUrl,Cp as parseThumbhashString,rc as parseSwitchBlock,bh as parseSlots,ch as parseSlotElement,wc as parseScriptDeclarations,dj as parseSFCComponent,lp as parseProtectedArgs,me as parseLoopBinding,Ci as parseImgComponent,Uh as parseImageUrl,ok as parseImageComponent,hn as parseFormBody,tc as parseExpressionWithFilters,Xm as parseCookies,sm as parseContainerSelector,oc as parseConditionalBlock,uc as parseArguments,H as parseAnimationShorthand,Xq as optional,Yl as optimizeTemplate,uk as optimizeImage,vk as optimizeDirectory,Zq as oneOf,pe as onceStore,Mk as onUpdated,gb as onUpdate,Ok as onUnmounted,hl as onServer,Kk as onMounted,wf as onMount,Pg as onHydrated,$p as onErrorCaptured,xf as onDestroy,xg as onDeactivated,gl as onClient,Lk as onBeforeUpdate,Nk as onBeforeUnmount,Jk as onBeforeMount,wg as onActivated,vp as observeElement,$m as notFound,We as normalizeCriticalHeadOrder,_p as nextTick,qm as negotiateEncoding,P as navigateTo,Qk as mountInstance,z as motionDirective,Dc as moderateCspPreset,Wl as minifyHtml,Be as metaDirective,ef as metaDedupKey,wo as mergeParams,gf as mergeHtmlAttrs,Yc as mergeHeadConfigs,Hc as mergeCspDirectives,bb as mergeCrosswindConfig,M as matchRoute,xh as markdownDirectiveHandler,oj as markdownCache,b as looksLikeGlob,Kq as localizePath,Ed as loadTranslationLazy,Kd as loadTranslation,kj as loadStxConfig,_ as loadMiddlewareFromDirectory,Kl as loadManifest,rp as loadElement,bm as loadChannels,Qq as lintStxStrict,tp as lazyLoadAll,sp as lazyLoad,C as keyframeDirective,iq as jsxs,jq as jsxDEV,hq as jsx,Zm as jsonResponse,Zd as islandDirective,Jb as isTest,vl as isSpaNavigation,ol as isSpaNavRequest,$o as isSignatureValid,Bf as isSignal,ak as isSharpAvailable,Lm as isServerEnvironment,el as isServer,Hb as isProduction,d as isPresentationalRole,op as isNativeLazySupported,tq as isMarkdownPath,Ad as isLoading,Bd as isLoaded,hh as isJavaScriptScript,pp as isIntersectionObserverSupported,ik as isImageFile,bk as isImageBackendAvailable,Md as isICUFormat,Og as isHydrated,mh as isHydrateTrigger,pb as isHttpStatus,Km as isEdgeEnvironment,Rq as isDirectiveKind,Ib as isDevelopment,Cf as isDerived,vj as isCssOnlyChange,pm as isCompressible,fl as isClient,og as isAsyncComponent,jn as isActionableMethod,Go as invert,Lf as invalidateFileCacheByDir,Kf as invalidateFileCache,Xa as interpolateScriptsInTemplate,Va as interpolateScriptExpressions,Wa as interpolateScriptAttributes,Vb as inlineError,Gq as injectThemeBootstrap,Ae as injectSeoTags,Dq as injectSeo,Tf as injectRouterScript,uj as injectHotReload,fa as injectHeatmap,Ic as injectCspMetaTag,fb as injectCrosswindCSS,of as injectConfigHeadTags,Ve as injectColorModeBootScript,jf as injectCloakStyle,af as injectBuildId,Ba as injectBrowserCoreAutoImports,lb as injectAnalytics,Wp as inject,$k as initStoreRegistry,Xj as initNetlify,Un as initLoadingIndicator,qp as initLazyLoading,fn as initFile,yp as initBlurUp,Ep as initAllBlurUp,Fi as imgDirective,sk as imageDirective,rn as hydrateTemplateStream,qn as hydrateTemplate,Rn as hydrateIslands,Lg as hydrateIsland,sn as hydrateFragment,Mg as hydrateByStrategy,Ng as hydrateAll,jo as hydrate,Bn as htmlResponse,kf as hoistLeadingHeadTags,Xe as hoistColorModeBootScript,ga as heatmapDirective,ni as hashString,Sf as hashFilePath,li as hashFile,mi as hashBuffer,Ne as hasVueTemplateSyntax,le as hasVariables,oo as hasStore,Ma as hasPlaceholders,Vj as hasNetlifyConfig,X as hasMiddleware,na as hasEventDirectives,nf as hasDocumentShell,$g as hasDirectives,h as hasDOMSupport,lk as handleImageRequest,aq as handleError,qq as h,hk as groupVariantsByFormat,Eo as grayscale,un as gitHash,Ql as getUnusedDirectives,Fd as getTranslationSync,yd as getTranslationCacheStats,Gd as getTranslationAsync,Nd as getTranslation,Qj as getTotalSize,ap as getTimeUntilExpiry,Xf as getStoreScript,po as getStoreNames,no as getStore,Jj as getStorageSize,Ij as getStorageKeys,sh as getSourceLineInfo,jh as getSharedTranspiler,g as getScreenReaderOnlyStyle,Zi as getScopeAttribute,rf as getRouteParams,qa as getPublicEnvDefine,ra as getPublicEnv,Zg as getPositionInfo,Ja as getPlaceholderRegistry,ki as getPlaceholderCacheStats,Vc as getPageMeta,yc as getNonce,jk as getMimeType,Z as getMiddlewareNames,W as getMiddleware,zd as getLoadingState,Id as getLoadingLocales,ce as getImagePlaceholder,dk as getImageMetadata,io as getHydrationRuntime,bl as getHydratedStoreState,yj as getHmrServer,Uc as getHead,$n as getHMRHandler,Yh as getFormatExtension,pi as getFileMtime,gk as getFallbackVariant,Db as getErrorMessage,Ab as getErrorLocale,Lb as getErrorConfig,Gb as getErrorCodeName,Ah as getDirectives,zh as getDirective,Ak as getCurrentInstance,Gc as getCspPreset,Pc as getCspHeaderName,cb as getCrosswindServeAsset,vh as getComponentCacheStats,Hi as getCachedVideoResult,ep as getCachedSignature,Nf as getCachedSignalsRuntime,Of as getCachedRouterScript,ii as getCachedPlaceholder,wi as getCachedImageResult,qi as getCached,ti as getCacheStats,_e as getBuildId,_l as getBroadcastServer,Xh as getBestVariant,Qa as getAllFilters,Lh as generateWidthSrcset,Ag as generateVirtualListCSS,Lp as generateVideoPreview,vd as generateValidationScript,Mp as generateUploadRuntime,Rl as generateTreeShakenBundle,fg as generateTransitionRuntime,eg as generateTransitionCSS,Li as generateThumbnails,bi as generateThumbhashPlaceholder,Bm as generateTemplatesDocs,lg as generateSuspenseRuntime,kg as generateSuspenseCSS,co as generateStateScript,Vh as generateSrcsetData,Ai as generateSrcset,ek as generateSrcSet,Mi as generateSpriteSheet,Up as generateSpaShell,Wh as generateSourceTags,Rh as generateSizesFromBreakpoints,Qh as generateSizesAttribute,fk as generateSizes,Ee as generateSitemapIndex,Eq as generateSitemap,np as generateSimpleMediaPicker,hp as generateSignatureRuntime,Hf as generateSignalsRuntimeDev,Gf as generateSignalsRuntime,Fa as generateServerDataBridge,Wi as generateScopeId,ej as generateSFCWebComponent,ka as generateRuntimeScript,K as generateRouteTypes,L as generateRouteManifest,Ge as generateRobotsTxt,Fq as generateRobots,zi as generateResponsiveVariants,aj as generateReactiveWebComponentTS,$i as generateReactiveWebComponent,cj as generateReactiveRuntime,bj as generateReactiveMixin,Ki as generatePoster,hi as generatePlaceholderStyle,gi as generatePlaceholderCSS,ai as generatePlaceholder,Kg as generatePartialHydrationCSS,xc as generateNonce,Rj as generateNetlifyToml,Op as generateMinifiedMediaRuntime,Np as generateMediaRuntime,mp as generateMediaManagerEmbed,Il as generateManifest,Wn as generateLoadingIndicatorHtml,xp as generateLazyLoadRuntime,Al as generateLayoutTypes,di as generateLQIP,vg as generateKeepAliveRuntime,ug as generateKeepAliveCSS,Rg as generateIslandManifest,Kp as generateImagePreview,wk as generateImageManifest,ho as generateHydrationScript,be as generateHydrationRuntime,ko as generateHydrationCSS,Eg as generateHydrationBootstrap,tj as generateHotReloadScript,ea as generateHeatmapScript,Zn as generateHMRClientScript,Ni as generateHLSManifest,eo as generateEventBindings,Ph as generateDprSrcsetWithVariableQuality,Oh as generateDprSrcset,lf as generateDocumentShell,Gm as generateDocs,Cm as generateDirectivesDocs,Fh as generateDirectiveRuntime,He as generateDefaultRobotsTxt,Oi as generateDASHManifest,Bc as generateCspMetaTag,Ac as generateCspHeader,eb as generateCrosswindCSS,fq as generateCompositionRuntime,Am as generateComponentsDocs,Fg as generateComponentManifest,ym as generateComponentDoc,fi as generateColorPlaceholder,Ue as generateColorModeBootScript,Tk as generateClientRuntime,oi as generateCacheKey,Da as generateBrowserAutoImportDestructuring,Fp as generateBlurUpRuntime,Gp as generateBlurUpCSS,ib as generateBindingsRuntime,Mh as generateAutoWidthSrcset,Ca as generateAutoImportDestructuring,qg as generateAsyncComponentRuntime,pg as generateAsyncComponentCSS,I as generateAnimationRuntime,G as generateAnimationCSS,kb as generateAnalyticsScript,Qn as formatTypecheckDiagnostics,Kn as formatTypeErrors,cn as formatStxContent,Pj as formatSize,O as formatRoutes,dn as formatMarkdownContent,Eb as formatLocalizedError,Ld as formatICU,Nb as formatFilePath,Ub as formatError,Cq as formatDoctorReport,Dm as formatDocsAsMarkdown,Fm as formatDocsAsJson,Em as formatDocsAsHtml,No as format,Vl as foldConstants,Mo as flipVertical,Lo as flipHorizontal,Bl as fingerprint,On as findRuntimeTypeDeclarations,Aq as findPantryPackage,nc as findMatchingEndTag,jc as findMatchingDelimiter,oa as findInterpolationEnd,pc as findIfBlocks,sc as findExpressions,N as findErrorPage,qc as findDirectiveBlocks,Sl as findDeadCode,Sl as findDeadBranches,tm as findContainerRegion,zm as findComponentFiles,dr as findCommonDir,Oj as filterRequiredFiles,qh as fileExists,ie as extractVariables,Gl as extractTemplateExpressions,Vd as extractStreamBoundaries,fo as extractState,fh as extractSlotContent,ke as extractScriptFromTemplate,Fl as extractScriptBlocks,Ka as extractPlaceholders,mc as extractParenthesizedExpression,qb as extractPageResponseStatus,ca as extractLayoutMetadata,ei as extractDominantColor,vc as extractDirectiveParams,ah as extractDirectiveNames,wl as extractContainerContent,wm as extractComponentProps,Gg as extractComponentName,xm as extractComponentDescription,db as extractClassNames,Ea as extractBridgeData,Hg as extractBoundProps,kc as extractBalancedExpression,ya as extractAndStripCssImports,_i as extractAndScopeStyles,la as extractAndProcessEvents,Cj as externalizeSharedAssets,Dj as externalizeRepeatedAssets,Bj as externalizeHtml,_a as evaluateExpression,Ul as evaluateConstant,yb as evaluateAuthExpression,Ta as escapeHtmlValue,Sa as escapeHtml,_b as errorRecovery,ac as errorLogger,ag as ensureTeleportTargets,pf as ensureDocumentShell,rd as enhancedValidationRules,um as enableDevTools,Tl as eliminateDeadCode,uf as effect,Uo as dprUrls,Hm as docsCommand,yl as discoverLayoutNames,wp as disconnectObserver,vm as disableDevTools,bc as devHelpers,rl as detectShell,Jm as detectRuntime,Sj as detectProjectConfig,Zh as detectFormat,Nl as detectBuildMode,tf as derived,Wj as deploy,mj as defineStxConfig,so as defineStore,cq as defineSlots,Pq as defineSiteConfig,Tq as definePropsWithValidation,Sq as defineProps,gj as definePlugin,$c as definePageMeta,R as defineMiddleware,Tg as defineForm,Zp as defineExpose,Yp as defineEmits,Ch as defineDirective,sq as defineCustomElement,pn as defineConfig,Dh as defineClientDirective,ng as defineAsyncComponent,Pp as defaultMediaConfig,yk as defaultImageConfig,wd as defaultI18nConfig,da as defaultHeatmapConfig,id as defaultFormClasses,Na as defaultFilters,Rc as defaultCspConfig,ij as defaultConfig,br as default,ab as deepMergeThemes,Qe as dedupeScopedStyles,ci as decodeThumbhash,Mc as cspNonceDirective,Lc as cspDirective,Dp as crossfadeTransition,yo as crop,yg as createVirtualList,Ti as createVideoDirective,Vm as createVercelHandler,Hn as createTypeChecker,Pd as createTranslateFilter,Rm as createTextEncoderStream,rq as createStxApp,Qm as createStreamingResponse,Xd as createStreamRenderer,qo as createStore,U as createStorageManager,S as createServerCookieManager,Ck as createScope,ig as createSSRSuspense,qf as createRouter,$ as createRouteLocation,Fn as createRoute,Dk as createRef,Ek as createReactive,eq as createProvideContext,wn as createProject,on as createProductionBuild,Ia as createPlaceholder,Zl as createOptimizedBuild,Wm as createNetlifyHandler,Kj as createNetlifyClient,aa as createMiddlewareContext,En as createMiddleware,up as createLazyObserver,sg as createKeepAliveCache,Nm as createKVNamespace,Ig as createIslandRegistry,Ei as createImgDirective,tk as createImagePlugin,mk as createImageHandler,rk as createImageDirective,ia as createHeatmapAggregator,Nj as createFileManifest,Mm as createEnvAccessor,Xb as createEnhancedError,Pm as createEdgeHandler,Om as createEdgeCache,th as createDetailedErrorMessage,Um as createDenoHandler,Tj as createDefaultNetlifyConfig,Qc as createCspHeaders,Ym as createCookie,Fk as createComputed,Bk as createComponentInstance,Tm as createCloudflareHandler,T as createClientCookieManager,Eh as createBuiltinDirectives,rq as createApp,F as createAnimationTimeline,Bo as cover,je as convertToCommonJS,Io as contrast,Ao as contain,Wb as consoleError,Kb as configureErrorHandling,lj as config,Fk as computed,rm as compressResponse,Je as composerPattern,Ie as composer,tl as composeShellWithPage,mm as componentDirective,oh as componentClientSignalNames,Hl as compileTemplate,a as collectRepeatedFlag,Mj as collectDeployFiles,Ji as clearVideoCache,xd as clearTranslationCache,Yf as clearStoreCache,Hj as clearStorage,fp as clearSignatureCache,ji as clearPlaceholderCache,qe as clearOnceStore,zc as clearNonce,Y as clearMiddleware,ee as clearImagePlaceholders,qk as clearImageCache,Cb as clearErrorMessages,Pf as clearDevCaches,Ra as clearCustomFilters,Le as clearComposers,Zf as clearComposableCache,uh as clearComponentCache,si as clearCache,Vn as cleanupLoadingIndicator,kl as classifyScript,ll as classifyAllScripts,In as checkTemplateFile,Jn as checkTemplate,Qf as checkCache,cp as checkAuthAccess,i as checkA11yWithRegex,j as checkA11y,hm as channel,bn as captureScreenshots,an as captureScreenshot,Jd as cancelPendingLoads,Lj as calculateSha1,Nh as calculateOptimalWidths,Rf as cacheTemplate,Vi as buildWebComponents,Ln as buildVirtualSource,Rp as buildViews,uo as buildUrl,Rd as buildSuspenseResolveScript,Oq as buildStaticSite,Cl as buildRuntimeAsset,Dl as buildRouterAsset,Nq as buildLangPickerScript,Th as buildImageUrl,ff as buildHtmlAttrs,Ll as buildForProduction,om as buildComponentLibrary,dp as buildAuthParams,Ml as buildApp,Mq as buildAlternateLinks,nn as build,fm as broadcastPrivate,gm as broadcastPresence,cm as broadcast,Ho as brightness,Co as blur,Zo as batchSignUrls,vf as batch,n as autoFixA11yFile,o as autoFixA11yDirectory,m as autoFixA11y,Po as auto,e as attributeValue,El as assetTags,ja as asInvocableStatement,_q as arrayOf,Jq as applyTranslations,yi as applyTransformations,gh as applySlots,lm as applyPropDefaults,So as applyPreset,hf as applyHtmlAttrs,ed as applyHead,Za as applyFilters,pl as appendVary,Fc as apiCspPreset,y as animationGroupDirective,Pi as analyzeVideo,Pl as analyzeUsage,il as analyzeTemplate,jl as analyzeProject,Pl as analyzeDirectiveUsage,mb as analyticsDirective,zn as addStore,yn as addPage,Jc as addNonceToInlineContent,An as addLayout,xn as addComponent,ln as actionRedirectResponse,Q as abortNavigation,p as a11yDirective,Mf as __setSignalsGeneratorsForTest,$e as __setBuildIdForTest,Gi as VideoProcessorCache,Ug as Validator,s as TransitionType,u as TransitionEase,t as TransitionDirection,ic as Tokenizer,Gn as TemplateTypeChecker,en as TEMPLATE_PRESETS,Tb as StxValidationError,Pb as StxSyntaxError,Rb as StxSecurityError,Qb as StxRuntimeError,Sb as StxFileError,Ob as StxError,nq as Show,Sd as SUSPENSE_RESOLVER_RUNTIME,Aa as STX_AUTO_IMPORTS,ta as STATE_DIR_ENV_VAR,B as SPRING_PRESETS,ml as SPA_NAV_HEADER,nb as RESPONSE_STATUS_KEY,ob as RESPONSE_HEADERS_KEY,mn as ProductionBuild,pq as Portal,vn as PROJECT_TEMPLATES,Ro as PRESETS,lo as MemorySessionStore,Kh as MIME_TYPES,Hh as MEDIA_DEFAULT_WIDTHS,Jh as MEDIA_DEFAULT_FORMATS,xl as LAYOUT_TYPES_FILE,vi as ImageProcessorCache,kk as ImageProcessingError,go as HydrationRuntime,sj as HotReloadServer,ha as HeatmapAggregator,df as HTML_CLASS_MARKER,cf as HTML_ATTRS_MARKER,gq as Fragment,oq as For,nl as FRAGMENT_CACHE_CONTROL,$b as ErrorLogger,Fb as ErrorCodes,Aj as EXTERNALIZED_ASSET_DIR,Yj as DeployError,Zj as DEFAULT_WIDTHS,v as DEFAULT_TRANSITION_OPTIONS,sa as DEFAULT_STATE_DIR,$j as DEFAULT_QUALITY,_h as DEFAULT_PLACEHOLDER_OPTIONS,_j as DEFAULT_FORMATS,Ih as DEFAULT_DPR_VALUES,Yn as ComponentHMRHandler,Sh as COMMON_SIZES,Se as COLOR_MODE_BOOT_MARKER,Te as COLOR_MODE_BOOT_GLOBAL,bf as CLOAK_STYLE,jm as BroadcastServer,im as Broadcast,Ye as BUILD_ID_META,Ze as BUILD_ID_HEADER,$h as BLUR_UP_CSS,zq as $path};
2
+ import{$ as Wk,$a as Nm,$b as eo,$c as ep,$d as eq,A as Gj,Aa as Yl,Ab as yn,Ac as Fo,Ad as Fp,Ae as Lq,B as Hj,Ba as Zl,Bb as zn,Bc as Go,Bd as Gp,Be as Mq,C as Ij,Ca as km,Cb as An,Cc as Ho,Cd as Hp,Ce as Nq,D as Jj,Da as lm,Db as Bn,Dc as Io,Dd as Ip,De as Oq,E as zk,Ea as mm,Eb as Cn,Ec as Jo,Ed as Jp,Ee as Pq,F as Ak,Fa as nm,Fb as Dn,Fc as Ko,Fd as Kp,Fe as Qq,G as Bk,Ga as om,Gb as En,Gc as Lo,Gd as Lp,Ge as Rq,H as Ck,Ha as sm,Hb as Fn,Hc as Mo,Hd as Mp,He as Sq,I as Dk,Ia as tm,Ib as Gn,Ic as No,Id as Np,Ie as Tq,J as Ek,Ja as um,Jb as Hn,Jc as Oo,Jd as Op,Je as Uq,K as Fk,Ka as vm,Kb as In,Kc as Po,Kd as Pp,Ke as Vq,L as Gk,La as wm,Lb as Jn,Lc as Qo,Ld as Qp,Le as Wq,M as Hk,Ma as xm,Mb as Kn,Mc as Ro,Md as Rp,Me as Xq,N as Ik,Na as ym,Nb as Rn,Nc as So,Nd as Sp,Ne as Yq,O as Jk,Oa as zm,Ob as Sn,Oc as To,Od as Tp,Oe as Zq,P as Kk,Pa as Am,Pb as Tn,Pc as Uo,Pd as Up,Pe as _q,Q as Lk,Qa as Bm,Qb as Un,Qc as Vo,Qd as Vp,Qe as $q,R as Mk,Ra as Cm,Rb as Vn,Rc as Wo,Rd as Wp,Re as ar,S as Nk,Sa as Dm,Sb as Wn,Sc as Xo,Sd as Xp,Se as br,T as Ok,Ta as Em,Tb as Xn,Tc as Yo,Td as Yp,Te as cr,U as Pk,Ua as Fm,Ub as Yn,Uc as Zo,Ud as Zp,Ue as dr,V as Qk,Va as Gm,Vb as Zn,Vc as _o,Vd as _p,Ve as er,W as Rk,Wa as Hm,Wb as _n,Wc as $o,Wd as $p,We as fr,X as Sk,Xa as Jm,Xb as $n,Xc as ap,Xd as aq,Y as Tk,Ya as Km,Yb as ao,Yc as bp,Yd as bq,Z as Uk,Za as Lm,Zb as bo,Zc as cp,Zd as cq,_ as Vk,_a as Mm,_b as co,_c as dp,_d as dq,aa as Xk,ab as Om,ac as fo,ad as fp,ae as fq,ba as Yk,bb as Pm,bc as go,bd as gp,be as gq,ca as Zk,cb as Qm,cc as ho,cd as hp,ce as hq,da as _k,db as Rm,dc as io,dd as ip,de as iq,ea as $k,eb as Sm,ec as jo,ed as jp,ee as jq,fa as al,fb as Tm,fc as ko,fd as kp,fe as kq,ga as bl,gb as Um,gc as lo,gd as lp,ge as lq,ha as cl,hb as Vm,hc as mo,hd as mp,he as mq,ia as dl,ib as Wm,ic as no,id as np,ie as nq,ja as el,jb as Xm,jc as oo,jd as op,je as oq,ka as fl,kb as Ym,kc as po,kd as pp,ke as pq,la as gl,lb as Zm,lc as qo,ld as qp,le as qq,ma as hl,mb as _m,mc as ro,md as rp,me as rq,na as il,nb as $m,nc as so,nd as sp,ne as sq,o as a,oa as jl,ob as cn,oc as to,od as tp,oe as zq,p as rj,pa as Nl,pb as dn,pc as uo,pd as up,pe as Aq,q as sj,qa as Ol,qb as en,qc as vo,qd as vp,qe as Bq,r as tj,ra as Pl,rb as fn,rc as wo,rd as wp,re as Cq,s as uj,sa as Ql,sb as mn,sc as xo,sd as xp,se as Dq,t as vj,ta as Rl,tb as nn,tc as yo,td as yp,te as Eq,u as wj,ua as Sl,ub as on,uc as zo,ud as zp,ue as Fq,v as xj,va as Tl,vb as pn,vc as Ao,vd as Ap,ve as Gq,w as yj,wa as Ul,wb as un,wc as Bo,wd as Bp,we as Hq,x as zj,xa as Vl,xb as vn,xc as Co,xd as Cp,xe as Iq,y as Ej,ya as Wl,yb as wn,yc as Do,yd as Dp,ye as Jq,z as Fj,za as Xl,zb as xn,zc as Eo,zd as Ep,ze as Kq}from"./chunk-ty6pj7b5.js";import{$e as Oj,Xe as Kj,Ye as Lj,Ze as Mj,_e as Nj,af as Pj,bf as Qj,cf as Rj,df as Sj,ef as Tj,ff as Uj,gf as Vj,hf as Wj,if as Xj,jf as Yj}from"./chunk-jcped0kt.js";import{kf as nk,lf as ok,mf as pk,nf as qk,of as rk,pf as sk,qf as tk,rf as uk,sf as vk,tf as wk,uf as xk,vf as yk}from"./chunk-zpvva2dh.js";import{Af as Pn,Bf as Qn,wf as Ln,xf as Mn,yf as Nn,zf as On}from"./chunk-f0yhv8yr.js";import{Cf as an,Df as bn}from"./chunk-5d4csjhx.js";import{Ef as gn}from"./chunk-4xzmg2xk.js";import{Ff as Bl,Gf as Cl,Hf as Dl,If as El,Jf as Hl,Kf as Ll}from"./chunk-v4rgwxs1.js";import{Lf as Fl,Of as Gl}from"./chunk-5ys0zfgp.js";import{$f as dm,Wf as _l,Xf as $l,Yf as am,Zf as bm,_f as cm,ag as em,bg as fm,cg as gm,dg as hm,eg as im,fg as jm}from"./chunk-e6tvnnnz.js";import{gg as lk,hg as mk}from"./chunk-6pzgmp1h.js";import{ig as Ml}from"./chunk-pw21r03f.js";import{jg as pm,kg as qm,lg as rm,mg as Im,ng as hn,og as jn,pg as kn,qg as ln,rg as qn,sg as rn,tg as sn,ug as tn}from"./chunk-7qx5ebq7.js";import{Ag as pl,Bg as ql,Cg as rl,Dg as sl,Eg as tl,Fg as ul,Gg as vl,Hg as wl,Ig as Il,Jg as Jl,Kg as Kl,vg as kl,wg as ll,xg as ml,yg as nl,zg as ol}from"./chunk-tgcbjer0.js";import{Lg as Gi,Mg as Hi,Ng as Ii,Og as Ji,Pg as Ki,Qg as Li,Rg as Mi,Sg as Ni,Tg as Oi,Ug as Pi,Vg as Qi}from"./chunk-z6e0b8wv.js";import{Wg as gj,Yg as hj}from"./chunk-m54yzzn8.js";import{ch as Zj,dh as _j,eh as $j,fh as ak,gh as bk,hh as ck,ih as dk,kh as ek,lh as fk,mh as gk,nh as hk,oh as ik,ph as jk,sh as kk}from"./chunk-m38wyaes.js";import{th as Wg}from"./chunk-9edt3qh6.js";import{uh as bh,vh as ch,wh as dh,xh as eh,yh as fh,zh as gh}from"./chunk-jewcmcaf.js";import{Ah as vi,Bh as wi,Ch as xi,Gh as yi,Hh as zi,Ih as Ai}from"./chunk-xcac3tkq.js";import{Jh as li,Kh as mi,Lh as ni,Mh as oi,Nh as pi,Ph as qi,Qh as ri,Rh as si,Sh as ti,Th as ui}from"./chunk-jw1besrt.js";import{Uh as hg,Vh as ig,Wh as jg,Xh as kg,Yh as lg}from"./chunk-z6ev72qj.js";import{$h as og,Zh as mg,_h as ng,ai as pg,bi as qg}from"./chunk-72w4hhbq.js";import{ci as rg,di as sg,ei as tg,fi as ug,gi as vg,hi as wg,ii as xg}from"./chunk-snktca7b.js";import{ji as yg,ki as zg,li as Ag,mi as Bg,ni as Cg,oi as Dg}from"./chunk-s88yt309.js";import{Ai as Og,Bi as Pg,Ci as Qg,Di as Rg,qi as Eg,ri as Fg,si as Gg,ti as Hg,ui as Ig,vi as Jg,wi as Kg,xi as Lg,yi as Mg,zi as Ng}from"./chunk-74pjj8d0.js";import{Fi as Sg,Gi as Tg,Hi as Ug,Ii as Vg}from"./chunk-a6nnbnmb.js";import{Ni as If,Oi as Jf,Pi as Kf,Qi as Lf,Ri as Mf,Si as Nf,Ti as Of,Ui as Pf,Vi as Qf,Wi as Rf,Xi as Sf}from"./chunk-pq6rgbbw.js";import{Yi as Xf,Zi as Yf}from"./chunk-8tth46zf.js";import{aj as Zf}from"./chunk-h2fq4ksg.js";import"./chunk-efr3ejqt.js";import{ej as _f}from"./chunk-swy03mg9.js";import{fj as $f,gj as ag}from"./chunk-cq6fsp6j.js";import{hj as bg,ij as cg,jj as dg,kj as eg,lj as fg,mj as gg}from"./chunk-572ttrsj.js";import{Aj as be,nj as Qd,oj as Rd,pj as Sd,qj as Td,rj as Ud,sj as Vd,tj as Wd,uj as Xd,vj as Yd,wj as Zd,xj as _d,yj as $d,zj as ae}from"./chunk-kf2w2xxb.js";import{Bj as Gf,Cj as Hf}from"./chunk-6rjc6687.js";import{Jj as sf,Kj as tf,Lj as uf,Mj as vf,Nj as wf,Oj as xf,Pj as yf,Qj as zf,Rj as Af,Sj as Bf,Tj as Cf,Uj as Df,Vj as Ef,Wj as Ff}from"./chunk-k6b7gpk2.js";import{ok as tq,pk as uq,qk as vq,rk as wq,sk as xq,tk as yq}from"./chunk-e63m9jhd.js";import{Ak as zl,Bk as Al,uk as Aj,vk as Bj,wk as Cj,xk as Dj,yk as xl,zk as yl}from"./chunk-n58aem37.js";import"./chunk-c0n802j1.js";import"./chunk-ncvd7673.js";import{$m as Hb,$n as Hc,$p as ff,$q as Kh,$r as lj,Al as ea,Am as hb,An as gc,Ao as wd,Ap as Ge,Aq as Wf,Ar as ji,Bl as fa,Bm as ib,Bn as hc,Bo as xd,Bp as He,Bq as Xg,Br as ki,Cl as ga,Cm as jb,Cn as ic,Co as yd,Cp as Ie,Cq as Yg,Cr as Bi,Dl as ha,Dm as kb,Dn as jc,Do as zd,Dp as Je,Dq as Zg,Dr as Ci,El as ia,Em as lb,En as kc,Eo as Ad,Ep as Ke,Eq as _g,Er as Di,Fm as mb,Fn as lc,Fo as Bd,Fp as Le,Fq as $g,Fr as Ei,Gn as mc,Go as Cd,Gp as Me,Gq as ah,Gr as Fi,Hl as ja,Hm as nb,Hn as nc,Ho as Dd,Hp as Ne,Hq as hh,Hr as Ri,Il as ka,Im as ob,In as oc,Io as Ed,Ip as Oe,Iq as ih,Ir as Si,Jl as la,Jm as pb,Jn as pc,Jo as Fd,Jp as Pe,Jq as jh,Jr as Ti,Kl as ma,Km as qb,Kn as qc,Ko as Gd,Kp as Qe,Kq as kh,Kr as Ui,Ll as na,Lm as rb,Ln as rc,Lo as Hd,Lp as Re,Lq as lh,Lr as Vi,Mm as sb,Mn as sc,Mo as Id,Mp as Se,Mq as mh,Mr as Wi,Nm as tb,Nn as tc,No as Jd,Np as Te,Nq as nh,Nr as Xi,Ol as qa,Om as ub,On as uc,Oo as Kd,Op as Ue,Oq as oh,Or as Yi,Pl as ra,Pm as vb,Pn as vc,Po as Ld,Pp as Ve,Pq as ph,Pr as Zi,Ql as ya,Qm as wb,Qn as wc,Qo as Md,Qp as We,Qq as qh,Qr as _i,Rl as za,Rm as xb,Rn as xc,Ro as Nd,Rp as Xe,Rq as rh,Rr as $i,Sl as Aa,Sm as yb,Sn as yc,So as Od,Sp as Ye,Sq as sh,Sr as aj,Tl as Ba,Tm as zb,Tn as zc,To as Pd,Tp as Ze,Tq as th,Tr as bj,Ul as Ca,Um as Ab,Un as Ac,Up as _e,Uq as uh,Ur as cj,Vl as Da,Vm as Bb,Vn as Bc,Vo as he,Vp as $e,Vq as vh,Vr as dj,Wl as Ea,Wm as Cb,Wn as Cc,Wp as af,Wq as wh,Wr as ej,Xl as Fa,Xm as Db,Xn as Dc,Xp as bf,Xq as xh,Xr as fj,Yl as Ga,Ym as Eb,Yn as Ec,Yp as cf,Yq as Hh,Yr as ij,Zm as Fb,Zn as Fc,Zp as df,Zq as Ih,Zr as jj,_m as Gb,_n as Gc,_p as ef,_q as Jh,_r as kj,an as Ib,ao as Ic,ap as ie,aq as gf,ar as Lh,as as mj,bm as Ha,bn as Jb,bo as Jc,bq as hf,br as Mh,bs as nj,cm as Ia,cn as Kb,co as Kc,cp as je,cq as jf,cr as Nh,cs as oj,dm as Ja,dn as Lb,do as Lc,dq as kf,dr as Oh,ds as pj,em as Ka,en as Mb,eo as Mc,ep as ke,eq as lf,er as Ph,es as qj,fm as La,fn as Nb,fo as Nc,fp as le,fq as mf,fr as Qh,gm as Ma,gn as Ob,go as Oc,gp as me,gq as nf,gr as Rh,hl as s,hn as Pb,ho as Pc,hp as ne,hq as of,hr as Sh,il as t,in as Qb,io as Qc,ip as oe,iq as pf,ir as Th,jl as u,jm as Na,jn as Rb,jo as Rc,jp as pe,jq as qf,jr as Uh,kl as v,km as Oa,kn as Sb,ko as Sc,kp as qe,kq as rf,kr as Vh,ll as w,lm as Pa,ln as Tb,lo as Tc,lp as re,lr as Wh,ml as x,mm as Qa,mn as Ub,mo as id,mp as se,mq as Tf,mr as Xh,nl as y,nm as Ra,nn as Vb,no as jd,np as te,nr as Yh,ol as z,om as Sa,on as Wb,oo as kd,op as ue,or as Zh,pl as A,pm as Ta,pn as Xb,po as ld,pp as ve,pr as _h,ql as B,qm as Ua,qn as Yb,qo as md,qp as we,qr as $h,rl as C,rm as Va,rn as Zb,ro as nd,rp as xe,rr as ai,sl as D,sm as Wa,sn as _b,so as od,sp as ye,sr as bi,tl as E,tm as Xa,tn as $b,to as pd,tp as ze,tr as ci,ul as F,um as Ya,un as ac,uo as qd,up as Ae,ur as di,vl as G,vm as Za,vn as bc,vo as rd,vp as Be,vr as ei,wl as H,wm as _a,wn as cc,wo as sd,wp as Ce,wr as fi,xl as I,xm as $a,xn as dc,xo as td,xp as De,xr as gi,yl as J,yn as ec,yo as ud,yp as Ee,yq as Uf,yr as hi,zl as da,zm as gb,zn as fc,zo as vd,zp as Fe,zq as Vf,zr as ii}from"./chunk-dn8x6vf7.js";import{fs as d,gs as e,hs as f,is as g,js as h,ks as i,ls as j,ms as k,ns as l,os as m,ps as n,qs as o,rs as p,ss as q,ts as r}from"./chunk-by2p4by1.js";import{As as Eh,Bs as Fh,Cs as Gh,us as yh,vs as zh,ws as Ah,xs as Bh,ys as Ch,zs as Dh}from"./chunk-a2ppgamd.js";import{Ds as b,Es as c}from"./chunk-dmzc008f.js";import{Fs as oa,Gs as pa}from"./chunk-nstqd54d.js";import{Hs as ab,Is as bb,Ks as cb,Us as db,Vs as eb,Ws as fb}from"./chunk-8hdb7abn.js";import{Xs as ce,Ys as de,Zs as ee,_s as fe,bt as ge}from"./chunk-kqjxwz6c.js";import{ct as sa,dt as ta,et as ua,ft as va,gt as wa,ht as xa}from"./chunk-t0jzk81v.js";import{it as Uc,jt as Vc,kt as Wc,lt as Xc,mt as Yc,nt as Zc,ot as _c,pt as $c,qt as ad,rt as bd,st as cd,tt as dd,ut as ed,vt as fd,wt as gd,xt as hd}from"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import{Mt as K,Nt as L,Qt as M,Vt as N,Wt as O,au as P,bu as Q,cu as R,du as S,eu as T,fu as U,gu as V,hu as W,iu as X,ju as Y,ku as Z,lu as _,mu as $,nu as aa,ou as ba,qu as ca}from"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{Uj as writeNetlifyConfig,Jl as writeManifest,xk as writeImageManifest,_n as wrapComponentForHMR,Uq as withDefaults,fj as webComponentDirectiveHandler,Qo as watermark,Sp as watchViews,Hk as watchMultiple,Ik as watchEffect,Gk as watch,ge as warmImagePlaceholders,Vk as waitForStore,Hd as waitForLocale,Mn as virtualPathFor,Ui as videoDirective,cc as validators,Yq as validated,td as validateValueEnhanced,Yg as validateTemplate,Vo as validateParams,ud as validateFormEnhanced,Hp as validateFile,pd as validateFields,od as validateField,_g as validateDirective,Oc as validateCspDirectives,nj as validateConfig,Ol as validateComponentScripts,km as validateComponentProps,Wf as validateClientScript,Vg as v,Ua as usesSignalsInScript,lh as userComponentFileExists,Bg as useVirtualList,ad as useTitle,Uk as useStoreOrThrow,ro as useStore,Ej as useStorage,bq as useSlots,Gj as useSessionStorage,Zc as useSeoMeta,Wk as useRouteParams,Yk as useRouteParamOrThrow,Xk as useRouteParam,ad as usePageTitle,Ff as useOptimistic,_k as useMiddlewareValue,Zk as useMiddlewareState,Fj as useLocalStorage,Tn as useLoadingIndicator,Xc as useHead,Sg as useForm,dq as useAttrs,Jp as uploadFiles,Ip as uploadFile,Rk as updateInstance,Df as untrack,Bh as unregisterDirective,Sk as unmountInstance,$a as unescapeHtml,Pn as typecheckStxFiles,kh as transpileTypeScript,Iq as translate,w as transitionDirective,em as toUsers,dm as toUser,zo as thumbnail,Ap as thumbHashToRGBA,Bp as thumbHashToDataURL,If as templateCache,vb as syncRecordedResponse,Xn as stxClientHelpers,Ce as structuredDataDirective,Lq as stripLocalePrefix,ul as stripDocumentWrapper,pa as stripCommentsAndLiterals,Sm as stringToStream,Cc as strictCspPreset,Yd as streamingSuspenseDirective,ae as streamToResponse,Wd as streamTemplateSimple,Qd as streamTemplate,zj as stopHmrServer,am as stopBroadcasting,va as stateDirName,wa as stateDir,sf as state,mf as startsDocument,tn as startProductionServer,gn as startInteractive,$l as startBroadcasting,D as staggerDirective,To as srcsetUrls,E as springDirective,lc as splitByPipe,ql as spaNavVaryHeaders,Nn as sourcePathFor,_o as smartBatchSign,nh as slotContentHasExpressions,Yo as signUrl,ih as shouldTranspileTypeScript,wj as shouldReloadOnChange,bp as shouldRefreshSignature,xj as shouldIgnoreFile,tg as shouldCacheComponent,Do as sharpen,$q as shape,ua as setStateDir,cl as setRouteParams,dl as setMiddlewareState,fe as setImagePlaceholder,Xp as setGlobalProvide,zb as setErrorLocale,zk as setCurrentInstance,Ii as setCachedVideoResult,xi as setCachedImageResult,ri as setCached,cr as serveStxFile,er as serveMultipleStxFiles,rj as serveMarkdownFile,Dn as serveFile,fr as serveApp,Cn as serve,bo as serializeState,Im as serializeSetCookie,Fo as sepia,_c as seoMetaToHeadConfig,x as scrollAnimateDirective,q as screenReaderDirective,Yi as scopeHTML,Xi as scopeCSS,Fe as scanForSitemapEntries,k as scanA11yTargets,l as scanA11yIssues,Jo as saturation,Wo as sanitizeParams,ec as sanitizeFilePath,fc as sanitizeExpression,gc as sanitizeDirectiveParams,dc as sanitizeDirectiveParam,hc as sanitizeComponentProps,Zb as safeExecuteAsync,Yb as safeExecute,ve as runPreProcessingMiddleware,we as runPostProcessingMiddleware,kn as runPageAction,yf as runMountCallbacks,ba as runMiddleware,Pk as runHooks,Bq as runDoctor,zf as runDestroyCallbacks,Ke as runComposers,Ko as rotate,Wg as rewriteImagesWithSiblings,wb as responseBindings,rh as resolveTemplatePath,c as resolveStxTargets,jj as resolveStxDirectories,Hq as resolveI18n,xo as resize,Ha as resetPlaceholders,Wc as resetHead,ao as resetHMRHandler,Mb as resetErrorConfig,Wq as required,La as replacePlaceholders,Qp as renderView,Ri as renderVideoComponent,za as renderVendorStyleTags,kq as renderToString,lq as renderToStream,mq as renderToDOM,zp as renderThumbhashToCanvas,yq as renderTemplateString,wq as renderTemplate,xq as renderString,Td as renderStreamingPage,dh as renderSlot,jg as renderSSRSuspense,jp as renderProtectedVideo,ip as renderProtectedImg,Xo as renderMediaUpload,vq as renderMarkdownView,zl as renderLayoutTypes,Bi as renderImgComponent,nk as renderImageComponent,cd as renderHtmlAttrs,bd as renderHead,Tp as renderEmail,ph as renderComponentWithSlot,dd as renderBodyAttrs,mo as render,Ec as relaxedCspPreset,nd as registerValidationRule,_d as registerStreamingDirectives,to as registerStoresClient,al as registerStore,De as registerSeoDirectives,V as registerMiddleware,Pa as registerFilters,Oa as registerFilter,Bb as registerErrorMessages,sd as registerEnhancedValidationRule,yh as registerDirective,Nc as registerCspDirectives,nm as registerComponentDirectives,J as registerAnimationDirectives,r as registerA11yDirectives,Dk as ref,_m as redirect,rb as recordResponseStatus,sb as recordResponseHeader,xa as rebaseOntoStateDir,tb as readResponseStatus,ub as readResponseHeaders,pj as readMarkdownFile,Jf as readFileCached,Ek as reactive,Oo as quality,gp as pruneSignatureCache,ui as pruneCache,Vp as provide,uq as protectCodeBlocks,Vq as prop,Oe as processVueTemplate,zg as processVirtualListDirectives,Dg as processVirtualGridDirectives,Qi as processVideo,qd as processValidateDirective,Od as processTranslateDirective,dg as processTransitionDirectives,gg as processTransitionAttributes,gd as processTitleDirective,jb as processTemplateBindings,$f as processTeleportDirectives,hg as processSuspenseDirectives,ye as processStructuredData,Ud as processStreamDirectives,xb as processStatusDirective,Qg as processStaticDirectives,te as processStackReplacements,se as processStackPushDirectives,eh as processSlots,sl as processShell,Me as processServerBindings,ze as processSeoDirective,$d as processSectionDirectives,Re as processScopedStyles,hb as processReactiveBindings,kp as processProtectedMedia,Jg as processPartialHydrationDirectives,Vf as processOnceDirective,ue as processMiddleware,xe as processMetaDirectives,hd as processMetaDirective,qj as processMarkdownFileDirectives,wh as processMarkdownDirectives,ne as processLoops,rg as processKeepAliveDirectives,Uf as processJsonDirective,Cg as processInfiniteListDirectives,re as processIncludes,Di as processImgComponents,pk as processImageComponents,ck as processImage,fd as processHeadDirective,jd as processForms,ld as processFormInputDirectives,Ya as processExpressions,ma as processEventDirectives,md as processErrorDirective,Pe as processDynamicComponents,Xg as processDirectives,Gh as processDirectiveAttributes,_f as processDeferDirectives,Sc as processCustomDirectives,Kc as processCspDirectives,ar as processComponentProps,Ga as processClientScript,kd as processBasicFormDirectives,mg as processAsyncDirectives,Tc as processAppearanceBootstrapDirective,A as processAnimationDirectives,f as processA11yDirectives,Dd as preloadTranslationsBackground,Cd as preloadTranslations,Sn as preloadIslandHandlers,he as preloadIconCollection,Xl as poolStrings,hj as pluginManager,de as placeholdersWarmed,cg as performLeave,bg as performEnter,Af as pendingLifecycleCounts,Ef as peek,oe as partialsCache,Si as parseVideoDirectiveOptions,vo as parseUrl,Cp as parseThumbhashString,rc as parseSwitchBlock,bh as parseSlots,ch as parseSlotElement,wc as parseScriptDeclarations,dj as parseSFCComponent,lp as parseProtectedArgs,me as parseLoopBinding,Ci as parseImgComponent,Uh as parseImageUrl,ok as parseImageComponent,hn as parseFormBody,tc as parseExpressionWithFilters,Xm as parseCookies,sm as parseContainerSelector,oc as parseConditionalBlock,uc as parseArguments,H as parseAnimationShorthand,Xq as optional,Yl as optimizeTemplate,uk as optimizeImage,vk as optimizeDirectory,Zq as oneOf,pe as onceStore,Mk as onUpdated,gb as onUpdate,Ok as onUnmounted,hl as onServer,Kk as onMounted,wf as onMount,Pg as onHydrated,$p as onErrorCaptured,xf as onDestroy,xg as onDeactivated,gl as onClient,Lk as onBeforeUpdate,Nk as onBeforeUnmount,Jk as onBeforeMount,wg as onActivated,vp as observeElement,$m as notFound,We as normalizeCriticalHeadOrder,_p as nextTick,qm as negotiateEncoding,P as navigateTo,Qk as mountInstance,z as motionDirective,Dc as moderateCspPreset,Wl as minifyHtml,Be as metaDirective,ef as metaDedupKey,wo as mergeParams,gf as mergeHtmlAttrs,Yc as mergeHeadConfigs,Hc as mergeCspDirectives,bb as mergeCrosswindConfig,M as matchRoute,xh as markdownDirectiveHandler,oj as markdownCache,b as looksLikeGlob,Kq as localizePath,Ed as loadTranslationLazy,Kd as loadTranslation,kj as loadStxConfig,_ as loadMiddlewareFromDirectory,Kl as loadManifest,rp as loadElement,bm as loadChannels,Qq as lintStxStrict,tp as lazyLoadAll,sp as lazyLoad,C as keyframeDirective,iq as jsxs,jq as jsxDEV,hq as jsx,Zm as jsonResponse,Zd as islandDirective,Jb as isTest,vl as isSpaNavigation,ol as isSpaNavRequest,$o as isSignatureValid,Bf as isSignal,ak as isSharpAvailable,Lm as isServerEnvironment,el as isServer,Hb as isProduction,d as isPresentationalRole,op as isNativeLazySupported,tq as isMarkdownPath,Ad as isLoading,Bd as isLoaded,hh as isJavaScriptScript,pp as isIntersectionObserverSupported,ik as isImageFile,bk as isImageBackendAvailable,Md as isICUFormat,Og as isHydrated,mh as isHydrateTrigger,pb as isHttpStatus,Km as isEdgeEnvironment,Rq as isDirectiveKind,Ib as isDevelopment,Cf as isDerived,vj as isCssOnlyChange,pm as isCompressible,fl as isClient,og as isAsyncComponent,jn as isActionableMethod,Go as invert,Lf as invalidateFileCacheByDir,Kf as invalidateFileCache,Xa as interpolateScriptsInTemplate,Va as interpolateScriptExpressions,Wa as interpolateScriptAttributes,Vb as inlineError,Gq as injectThemeBootstrap,Ae as injectSeoTags,Dq as injectSeo,Tf as injectRouterScript,uj as injectHotReload,fa as injectHeatmap,Ic as injectCspMetaTag,fb as injectCrosswindCSS,of as injectConfigHeadTags,Ve as injectColorModeBootScript,jf as injectCloakStyle,af as injectBuildId,Ba as injectBrowserCoreAutoImports,lb as injectAnalytics,Wp as inject,$k as initStoreRegistry,Xj as initNetlify,Un as initLoadingIndicator,qp as initLazyLoading,fn as initFile,yp as initBlurUp,Ep as initAllBlurUp,Fi as imgDirective,sk as imageDirective,rn as hydrateTemplateStream,qn as hydrateTemplate,Rn as hydrateIslands,Lg as hydrateIsland,sn as hydrateFragment,Mg as hydrateByStrategy,Ng as hydrateAll,jo as hydrate,Bn as htmlResponse,kf as hoistLeadingHeadTags,Xe as hoistColorModeBootScript,ga as heatmapDirective,ni as hashString,Sf as hashFilePath,li as hashFile,mi as hashBuffer,Ne as hasVueTemplateSyntax,le as hasVariables,oo as hasStore,Ma as hasPlaceholders,Vj as hasNetlifyConfig,X as hasMiddleware,na as hasEventDirectives,nf as hasDocumentShell,$g as hasDirectives,h as hasDOMSupport,lk as handleImageRequest,aq as handleError,qq as h,hk as groupVariantsByFormat,Eo as grayscale,un as gitHash,Ql as getUnusedDirectives,Fd as getTranslationSync,yd as getTranslationCacheStats,Gd as getTranslationAsync,Nd as getTranslation,Qj as getTotalSize,ap as getTimeUntilExpiry,Xf as getStoreScript,po as getStoreNames,no as getStore,Jj as getStorageSize,Ij as getStorageKeys,sh as getSourceLineInfo,jh as getSharedTranspiler,g as getScreenReaderOnlyStyle,Zi as getScopeAttribute,rf as getRouteParams,qa as getPublicEnvDefine,ra as getPublicEnv,Zg as getPositionInfo,Ja as getPlaceholderRegistry,ki as getPlaceholderCacheStats,Vc as getPageMeta,yc as getNonce,jk as getMimeType,Z as getMiddlewareNames,W as getMiddleware,zd as getLoadingState,Id as getLoadingLocales,ce as getImagePlaceholder,dk as getImageMetadata,io as getHydrationRuntime,bl as getHydratedStoreState,yj as getHmrServer,Uc as getHead,$n as getHMRHandler,Yh as getFormatExtension,pi as getFileMtime,gk as getFallbackVariant,Db as getErrorMessage,Ab as getErrorLocale,Lb as getErrorConfig,Gb as getErrorCodeName,Ah as getDirectives,zh as getDirective,Ak as getCurrentInstance,Gc as getCspPreset,Pc as getCspHeaderName,cb as getCrosswindServeAsset,vh as getComponentCacheStats,Hi as getCachedVideoResult,ep as getCachedSignature,Nf as getCachedSignalsRuntime,Of as getCachedRouterScript,ii as getCachedPlaceholder,wi as getCachedImageResult,qi as getCached,ti as getCacheStats,_e as getBuildId,_l as getBroadcastServer,Xh as getBestVariant,Qa as getAllFilters,Lh as generateWidthSrcset,Ag as generateVirtualListCSS,Lp as generateVideoPreview,vd as generateValidationScript,Mp as generateUploadRuntime,Rl as generateTreeShakenBundle,fg as generateTransitionRuntime,eg as generateTransitionCSS,Li as generateThumbnails,bi as generateThumbhashPlaceholder,Bm as generateTemplatesDocs,lg as generateSuspenseRuntime,kg as generateSuspenseCSS,co as generateStateScript,Vh as generateSrcsetData,Ai as generateSrcset,ek as generateSrcSet,Mi as generateSpriteSheet,Up as generateSpaShell,Wh as generateSourceTags,Rh as generateSizesFromBreakpoints,Qh as generateSizesAttribute,fk as generateSizes,Ee as generateSitemapIndex,Eq as generateSitemap,np as generateSimpleMediaPicker,hp as generateSignatureRuntime,Hf as generateSignalsRuntimeDev,Gf as generateSignalsRuntime,Fa as generateServerDataBridge,Wi as generateScopeId,ej as generateSFCWebComponent,ka as generateRuntimeScript,K as generateRouteTypes,L as generateRouteManifest,Ge as generateRobotsTxt,Fq as generateRobots,zi as generateResponsiveVariants,aj as generateReactiveWebComponentTS,$i as generateReactiveWebComponent,cj as generateReactiveRuntime,bj as generateReactiveMixin,Ki as generatePoster,hi as generatePlaceholderStyle,gi as generatePlaceholderCSS,ai as generatePlaceholder,Kg as generatePartialHydrationCSS,xc as generateNonce,Rj as generateNetlifyToml,Op as generateMinifiedMediaRuntime,Np as generateMediaRuntime,mp as generateMediaManagerEmbed,Il as generateManifest,Wn as generateLoadingIndicatorHtml,xp as generateLazyLoadRuntime,Al as generateLayoutTypes,di as generateLQIP,vg as generateKeepAliveRuntime,ug as generateKeepAliveCSS,Rg as generateIslandManifest,Kp as generateImagePreview,wk as generateImageManifest,ho as generateHydrationScript,be as generateHydrationRuntime,ko as generateHydrationCSS,Eg as generateHydrationBootstrap,tj as generateHotReloadScript,ea as generateHeatmapScript,Zn as generateHMRClientScript,Ni as generateHLSManifest,eo as generateEventBindings,Ph as generateDprSrcsetWithVariableQuality,Oh as generateDprSrcset,lf as generateDocumentShell,Gm as generateDocs,Cm as generateDirectivesDocs,Fh as generateDirectiveRuntime,He as generateDefaultRobotsTxt,Oi as generateDASHManifest,Bc as generateCspMetaTag,Ac as generateCspHeader,eb as generateCrosswindCSS,fq as generateCompositionRuntime,Am as generateComponentsDocs,Fg as generateComponentManifest,ym as generateComponentDoc,fi as generateColorPlaceholder,Ue as generateColorModeBootScript,Tk as generateClientRuntime,oi as generateCacheKey,Da as generateBrowserAutoImportDestructuring,Fp as generateBlurUpRuntime,Gp as generateBlurUpCSS,ib as generateBindingsRuntime,Mh as generateAutoWidthSrcset,Ca as generateAutoImportDestructuring,qg as generateAsyncComponentRuntime,pg as generateAsyncComponentCSS,I as generateAnimationRuntime,G as generateAnimationCSS,kb as generateAnalyticsScript,Qn as formatTypecheckDiagnostics,Kn as formatTypeErrors,cn as formatStxContent,Pj as formatSize,O as formatRoutes,dn as formatMarkdownContent,Eb as formatLocalizedError,Ld as formatICU,Nb as formatFilePath,Ub as formatError,Cq as formatDoctorReport,Dm as formatDocsAsMarkdown,Fm as formatDocsAsJson,Em as formatDocsAsHtml,No as format,Vl as foldConstants,Mo as flipVertical,Lo as flipHorizontal,Bl as fingerprint,On as findRuntimeTypeDeclarations,Aq as findPantryPackage,nc as findMatchingEndTag,jc as findMatchingDelimiter,oa as findInterpolationEnd,pc as findIfBlocks,sc as findExpressions,N as findErrorPage,qc as findDirectiveBlocks,Sl as findDeadCode,Sl as findDeadBranches,tm as findContainerRegion,zm as findComponentFiles,dr as findCommonDir,Oj as filterRequiredFiles,qh as fileExists,ie as extractVariables,Gl as extractTemplateExpressions,Vd as extractStreamBoundaries,fo as extractState,fh as extractSlotContent,ke as extractScriptFromTemplate,Fl as extractScriptBlocks,Ka as extractPlaceholders,mc as extractParenthesizedExpression,qb as extractPageResponseStatus,ca as extractLayoutMetadata,ei as extractDominantColor,vc as extractDirectiveParams,ah as extractDirectiveNames,wl as extractContainerContent,wm as extractComponentProps,Gg as extractComponentName,xm as extractComponentDescription,db as extractClassNames,Ea as extractBridgeData,Hg as extractBoundProps,kc as extractBalancedExpression,ya as extractAndStripCssImports,_i as extractAndScopeStyles,la as extractAndProcessEvents,Cj as externalizeSharedAssets,Dj as externalizeRepeatedAssets,Bj as externalizeHtml,_a as evaluateExpression,Ul as evaluateConstant,yb as evaluateAuthExpression,Ta as escapeHtmlValue,Sa as escapeHtml,_b as errorRecovery,ac as errorLogger,ag as ensureTeleportTargets,pf as ensureDocumentShell,rd as enhancedValidationRules,um as enableDevTools,Tl as eliminateDeadCode,uf as effect,Uo as dprUrls,Hm as docsCommand,yl as discoverLayoutNames,wp as disconnectObserver,vm as disableDevTools,bc as devHelpers,rl as detectShell,Jm as detectRuntime,Sj as detectProjectConfig,Zh as detectFormat,Nl as detectBuildMode,tf as derived,Wj as deploy,mj as defineStxConfig,so as defineStore,cq as defineSlots,Pq as defineSiteConfig,Tq as definePropsWithValidation,Sq as defineProps,gj as definePlugin,$c as definePageMeta,R as defineMiddleware,Tg as defineForm,Zp as defineExpose,Yp as defineEmits,Ch as defineDirective,sq as defineCustomElement,pn as defineConfig,Dh as defineClientDirective,ng as defineAsyncComponent,Pp as defaultMediaConfig,yk as defaultImageConfig,wd as defaultI18nConfig,da as defaultHeatmapConfig,id as defaultFormClasses,Na as defaultFilters,Rc as defaultCspConfig,ij as defaultConfig,br as default,ab as deepMergeThemes,Qe as dedupeScopedStyles,ci as decodeThumbhash,Mc as cspNonceDirective,Lc as cspDirective,Dp as crossfadeTransition,yo as crop,yg as createVirtualList,Ti as createVideoDirective,Vm as createVercelHandler,Hn as createTypeChecker,Pd as createTranslateFilter,Rm as createTextEncoderStream,rq as createStxApp,Qm as createStreamingResponse,Xd as createStreamRenderer,qo as createStore,U as createStorageManager,S as createServerCookieManager,Ck as createScope,ig as createSSRSuspense,qf as createRouter,$ as createRouteLocation,Fn as createRoute,Dk as createRef,Ek as createReactive,eq as createProvideContext,wn as createProject,on as createProductionBuild,Ia as createPlaceholder,Zl as createOptimizedBuild,Wm as createNetlifyHandler,Kj as createNetlifyClient,aa as createMiddlewareContext,En as createMiddleware,up as createLazyObserver,sg as createKeepAliveCache,Nm as createKVNamespace,Ig as createIslandRegistry,Ei as createImgDirective,tk as createImagePlugin,mk as createImageHandler,rk as createImageDirective,ia as createHeatmapAggregator,Nj as createFileManifest,Mm as createEnvAccessor,Xb as createEnhancedError,Pm as createEdgeHandler,Om as createEdgeCache,th as createDetailedErrorMessage,Um as createDenoHandler,Tj as createDefaultNetlifyConfig,Qc as createCspHeaders,Ym as createCookie,Fk as createComputed,Bk as createComponentInstance,Tm as createCloudflareHandler,T as createClientCookieManager,Eh as createBuiltinDirectives,rq as createApp,F as createAnimationTimeline,Bo as cover,je as convertToCommonJS,Io as contrast,Ao as contain,Wb as consoleError,Kb as configureErrorHandling,lj as config,Fk as computed,rm as compressResponse,Je as composerPattern,Ie as composer,tl as composeShellWithPage,mm as componentDirective,oh as componentClientSignalNames,Hl as compileTemplate,a as collectRepeatedFlag,Mj as collectDeployFiles,Ji as clearVideoCache,xd as clearTranslationCache,Yf as clearStoreCache,Hj as clearStorage,fp as clearSignatureCache,ji as clearPlaceholderCache,qe as clearOnceStore,zc as clearNonce,Y as clearMiddleware,ee as clearImagePlaceholders,qk as clearImageCache,Cb as clearErrorMessages,Pf as clearDevCaches,Ra as clearCustomFilters,Le as clearComposers,Zf as clearComposableCache,uh as clearComponentCache,si as clearCache,Vn as cleanupLoadingIndicator,kl as classifyScript,ll as classifyAllScripts,In as checkTemplateFile,Jn as checkTemplate,Qf as checkCache,cp as checkAuthAccess,i as checkA11yWithRegex,j as checkA11y,hm as channel,bn as captureScreenshots,an as captureScreenshot,Jd as cancelPendingLoads,Lj as calculateSha1,Nh as calculateOptimalWidths,Rf as cacheTemplate,Vi as buildWebComponents,Ln as buildVirtualSource,Rp as buildViews,uo as buildUrl,Rd as buildSuspenseResolveScript,Oq as buildStaticSite,Cl as buildRuntimeAsset,Dl as buildRouterAsset,Nq as buildLangPickerScript,Th as buildImageUrl,ff as buildHtmlAttrs,Ll as buildForProduction,om as buildComponentLibrary,dp as buildAuthParams,Ml as buildApp,Mq as buildAlternateLinks,nn as build,fm as broadcastPrivate,gm as broadcastPresence,cm as broadcast,Ho as brightness,Co as blur,Zo as batchSignUrls,vf as batch,n as autoFixA11yFile,o as autoFixA11yDirectory,m as autoFixA11y,Po as auto,e as attributeValue,El as assetTags,ja as asInvocableStatement,_q as arrayOf,Jq as applyTranslations,yi as applyTransformations,gh as applySlots,lm as applyPropDefaults,So as applyPreset,hf as applyHtmlAttrs,ed as applyHead,Za as applyFilters,pl as appendVary,Fc as apiCspPreset,y as animationGroupDirective,Pi as analyzeVideo,Pl as analyzeUsage,il as analyzeTemplate,jl as analyzeProject,Pl as analyzeDirectiveUsage,mb as analyticsDirective,zn as addStore,yn as addPage,Jc as addNonceToInlineContent,An as addLayout,xn as addComponent,ln as actionRedirectResponse,Q as abortNavigation,p as a11yDirective,Mf as __setSignalsGeneratorsForTest,$e as __setBuildIdForTest,Gi as VideoProcessorCache,Ug as Validator,s as TransitionType,u as TransitionEase,t as TransitionDirection,ic as Tokenizer,Gn as TemplateTypeChecker,en as TEMPLATE_PRESETS,Tb as StxValidationError,Pb as StxSyntaxError,Rb as StxSecurityError,Qb as StxRuntimeError,Sb as StxFileError,Ob as StxError,nq as Show,Sd as SUSPENSE_RESOLVER_RUNTIME,Aa as STX_AUTO_IMPORTS,ta as STATE_DIR_ENV_VAR,B as SPRING_PRESETS,ml as SPA_NAV_HEADER,nb as RESPONSE_STATUS_KEY,ob as RESPONSE_HEADERS_KEY,mn as ProductionBuild,pq as Portal,vn as PROJECT_TEMPLATES,Ro as PRESETS,lo as MemorySessionStore,Kh as MIME_TYPES,Hh as MEDIA_DEFAULT_WIDTHS,Jh as MEDIA_DEFAULT_FORMATS,xl as LAYOUT_TYPES_FILE,vi as ImageProcessorCache,kk as ImageProcessingError,go as HydrationRuntime,sj as HotReloadServer,ha as HeatmapAggregator,df as HTML_CLASS_MARKER,cf as HTML_ATTRS_MARKER,gq as Fragment,oq as For,nl as FRAGMENT_CACHE_CONTROL,$b as ErrorLogger,Fb as ErrorCodes,Aj as EXTERNALIZED_ASSET_DIR,Yj as DeployError,Zj as DEFAULT_WIDTHS,v as DEFAULT_TRANSITION_OPTIONS,sa as DEFAULT_STATE_DIR,$j as DEFAULT_QUALITY,_h as DEFAULT_PLACEHOLDER_OPTIONS,_j as DEFAULT_FORMATS,Ih as DEFAULT_DPR_VALUES,Yn as ComponentHMRHandler,Sh as COMMON_SIZES,Se as COLOR_MODE_BOOT_MARKER,Te as COLOR_MODE_BOOT_GLOBAL,bf as CLOAK_STYLE,jm as BroadcastServer,im as Broadcast,Ye as BUILD_ID_META,Ze as BUILD_ID_HEADER,$h as BLUR_UP_CSS,zq as $path};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{gk as a,hk as b,ik as c,jk as d}from"./chunk-rhdr9jp2.js";import"./chunk-0wcpp78j.js";import"./chunk-z61y1yv1.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-yjzznatw.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
2
+ import{gk as a,hk as b,ik as c,jk as d}from"./chunk-b72rxkbf.js";import"./chunk-e63m9jhd.js";import"./chunk-dn8x6vf7.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-8hdb7abn.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{b as getAvailableTargets,c as getAvailableFormats,d as default,a as buildNative};
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Bq as X,um as W}from"./chunk-z61y1yv1.js";import V from"fs";import M from"path";import*as Y from"readline";var j={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},Q={help:{description:"Show available commands",usage:"help [command]",handler:async(q,z)=>{if(q[0]&&Q[q[0]]){let A=Q[q[0]];console.log(`
2
+ import{Bq as X,um as W}from"./chunk-dn8x6vf7.js";import V from"fs";import M from"path";import*as Y from"readline";var j={reset:"\x1B[0m",bold:"\x1B[1m",dim:"\x1B[2m",red:"\x1B[31m",green:"\x1B[32m",yellow:"\x1B[33m",blue:"\x1B[34m",magenta:"\x1B[35m",cyan:"\x1B[36m"},Q={help:{description:"Show available commands",usage:"help [command]",handler:async(q,z)=>{if(q[0]&&Q[q[0]]){let A=Q[q[0]];console.log(`
3
3
  ${j.bold}${q[0]}${j.reset} - ${A.description}`),console.log(` Usage: ${j.cyan}${A.usage}${j.reset}
4
4
  `)}else{console.log(`
5
5
  ${j.bold}Available Commands:${j.reset}
@@ -1,5 +1,5 @@
1
1
  // @bun
2
- import{Jq as x,Ol as Y}from"./chunk-z61y1yv1.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-yjzznatw.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";import A from"path";var C=["broadcast","calculateDistance","canNotify","clearCookies","clearFetchCache","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVisibility","useWakeLock","useWindowSize"],y=new Set(C);var Z=new Map,I=new Set,P=new Set(C);function R(){Z.clear()}function D(G){let H=new Map;for(let z of G){let K=A.basename(z);if(K.endsWith(".d.ts"))continue;let J=K.replace(/\.[jt]s$/,"");if(J==="index")continue;if(J===K)continue;let X=H.get(J);if(X&&!X.endsWith(".js"))continue;H.set(J,z)}return[...H.values()].sort()}function L(G,H){let z=H.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${z}\\b`).test(G)}function k(G){if(!G)return[];let H=G.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),z=[];for(let K of P){if(I.has(K))continue;let J=K.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${J}\\s*\\(`).test(H))z.push(K)}return z.sort()}async function _(G,H){let z=k(G);if(z.length===0)return null;let K=H??A.join(import.meta.dir,"composables"),J=`${K}\x00${z.join(",")}`,X=Z.get(J);if(X!==void 0)return X||null;let T=x({loader:"ts",target:"browser",define:Y()}),B=new Set(z),F=[],w=new Set,$=[];try{let q=new Bun.Glob("*.{ts,js}");for await(let j of q.scan({cwd:K,absolute:!0}))$.push(j)}catch{return Z.set(J,""),null}$=D($);for(let q of $){let j;try{j=await Bun.file(q).text()}catch{continue}let W=[];try{W=T.scan(j).exports.filter((Q)=>Q!=="default")}catch{continue}if(!W.some((Q)=>B.has(Q)))continue;try{j=j.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^import\s+type\s+.*$/gm,""),j=j.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),j=j.replace(/^export\s+default\s+/gm,""),j=j.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),F.push(`// ${A.basename(q).replace(/\.[jt]s$/,"")}
2
+ import{Jq as x,Ol as Y}from"./chunk-dn8x6vf7.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-8hdb7abn.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";import A from"path";var C=["broadcast","calculateDistance","canNotify","clearCookies","clearFetchCache","clearStorage","copyToClipboard","createShareableFile","defineForm","getBatteryLevel","getCookie","getCurrentPosition","getStorageKeys","getStorageSize","getVoices","hasBattery","hasCameraPermission","hasGeolocationPermission","hasMicrophonePermission","hasNotificationPermission","hasResizeObserver","hexToHsl","hexToRgb","isBroadcastChannelSupported","isCharging","isDeviceMotionSupported","isDeviceOrientationSupported","isEventSourceSupported","isEyeDropperSupported","isInFullscreen","isMutationObserverSupported","isPermissionGranted","isSpeechRecognitionSupported","isSpeechSynthesisSupported","isWakeLockSupported","isWebSocketSupported","notify","parseCookies","pickColor","prefetch","removeCookie","requestMediaPermissions","requestMotionPermission","requestNotificationPermission","requestOrientationPermission","setCookie","share","shareCurrentPage","shareFiles","shareText","shareURL","shareWithFallback","speak","stopSpeaking","toggleFullscreen","useAsyncData","useAttributeObserver","useAutoLogout","useAutoWakeLock","useBattery","useBreakpoint","useBroadcastChannel","useChannel","useChildListObserver","useClipboard","useColorHistory","useConditionalWakeLock","useCookies","useCopySelection","useDeviceMotion","useDeviceOrientation","useElementSize","useElementTextSelection","useElementVisibility","useEventSource","useEyeDropper","useFavicon","useForm","useFullscreen","useGeolocation","useGeolocationWatch","useHotkey","useIdle","useIdleState","useInfiniteScroll","useIntersectionObserver","useIntersectionObserverMultiple","useIsDesktop","useIsMobile","useIsTablet","useKeyPressed","useKeySequence","useKeyboard","useLastActive","useLazyLoad","useMeta","useMouse","useMouseInElement","useMutationObserver","useNetwork","useNotification","useOnline","useParallax","usePermission","usePermissions","usePointer","usePost","useResizeObserver","useResizeObserverMultiple","useSSE","useScroll","useSelectionPopup","useShare","useSpeechRecognition","useSpeechSynthesis","useStorage","useTextObserver","useTextSelection","useTitle","useVisibility","useWakeLock","useWindowSize"],y=new Set(C);var Z=new Map,I=new Set,P=new Set(C);function R(){Z.clear()}function D(G){let H=new Map;for(let z of G){let K=A.basename(z);if(K.endsWith(".d.ts"))continue;let J=K.replace(/\.[jt]s$/,"");if(J==="index")continue;if(J===K)continue;let X=H.get(J);if(X&&!X.endsWith(".js"))continue;H.set(J,z)}return[...H.values()].sort()}function L(G,H){let z=H.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");return new RegExp(`(?:^|[^\\w$.])(?:const|let|var|function|class)\\s+${z}\\b`).test(G)}function k(G){if(!G)return[];let H=G.replace(/<script\b[^>]*\bdata-stx-runtime\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-framework-composables\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-stores\b[^>]*>[\s\S]*?<\/script>/gi,"").replace(/<script\b[^>]*\bdata-stx-composables\b[^>]*>[\s\S]*?<\/script>/gi,""),z=[];for(let K of P){if(I.has(K))continue;let J=K.replace(/[$()*+.?[\\\]^{|}-]/g,"\\$&");if(new RegExp(`(^|[^\\w$.])${J}\\s*\\(`).test(H))z.push(K)}return z.sort()}async function _(G,H){let z=k(G);if(z.length===0)return null;let K=H??A.join(import.meta.dir,"composables"),J=`${K}\x00${z.join(",")}`,X=Z.get(J);if(X!==void 0)return X||null;let T=x({loader:"ts",target:"browser",define:Y()}),B=new Set(z),F=[],w=new Set,$=[];try{let q=new Bun.Glob("*.{ts,js}");for await(let j of q.scan({cwd:K,absolute:!0}))$.push(j)}catch{return Z.set(J,""),null}$=D($);for(let q of $){let j;try{j=await Bun.file(q).text()}catch{continue}let W=[];try{W=T.scan(j).exports.filter((Q)=>Q!=="default")}catch{continue}if(!W.some((Q)=>B.has(Q)))continue;try{j=j.replace(/^import\s+.*from\s+['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^import\s+type\s+.*$/gm,""),j=j.replace(/^export\s+\*\s+(?:as\s+\w+\s+)?from\s*['"][^'"]+['"]\s*;?\s*$/gm,""),j=j.replace(/^export\s+(?:type\s+)?\{[\s\S]*?\}\s*(?:from\s*['"][^'"]+['"]\s*)?;?\s*$/gm,""),j=j.replace(/^export\s+default\s+/gm,""),j=j.replace(/^export\s+(?=(?:declare\s+)?(?:abstract\s+)?(?:async\s+)?(?:function|class|const|let|var|type|interface|enum)\b)/gm,""),F.push(`// ${A.basename(q).replace(/\.[jt]s$/,"")}
3
3
  ${T.transformSync(j).trim()}`);for(let Q of W)w.add(Q)}catch(Q){console.warn(`[stx] framework composable ${A.basename(q)} could not be bundled:`,Q)}}let U=z.filter((q)=>!w.has(q)&&!L(G,q));if(U.length>0)console.warn(`[stx] could not bundle ${U.join(", ")} from @stacksjs/stx/composables \u2014 `+"calls to them will throw ReferenceError in the browser. Import them explicitly so the bundler inlines them, or use a runtime equivalent from window.stx.");if(F.length===0)return Z.set(J,""),null;let M=[...w].map((q)=>` try { if (!(${JSON.stringify(q)} in __s)) { __s[${JSON.stringify(q)}] = ${q}; if (!(${JSON.stringify(q)} in window)) window[${JSON.stringify(q)}] = ${q}; } } catch (e) {}`).join(`
4
4
  `),V=`<script data-stx-framework-composables>
5
5
  ;(function(){
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{Aq as d,Bq as e,mq as a,yq as b,zq as c}from"./chunk-z61y1yv1.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-yjzznatw.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{d as validateClientScript,c as processOnceDirective,b as processJsonDirective,e as processDirectives,a as injectRouterScript};
2
+ import{Aq as d,Bq as e,mq as a,yq as b,zq as c}from"./chunk-dn8x6vf7.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-8hdb7abn.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{d as validateClientScript,c as processOnceDirective,b as processJsonDirective,e as processDirectives,a as injectRouterScript};
@@ -821,7 +821,7 @@ window.stxDialog = {
821
821
  // Check if dialog is available
822
822
  isAvailable: () => typeof window.craft?.dialog !== 'undefined',
823
823
  };
824
- `}import I from"process";import{existsSync as aY}from"fs";import{dirname as iY,join as sY}from"path";import{craftBinaryNotFoundMessage as gZ,resolveCraftBinary as tY}from"craft-native";var m={};function eY(Z){m={...m,...Z}}function Z6(){return{...m}}function Y6(){m={}}function KZ(Z){if(!Z.sidebarConfig)return;let Y={...Z.sidebarConfig};if(Y.variant==="desktop")Y.material=Y.material??"sidebar",Y.backgroundEffect=Y.backgroundEffect??"shimmer",Y.allowsVibrancy=Y.allowsVibrancy??!0;return Y}function ZZ(){let Z=[I.env.CRAFT_BINARY_PATH,m.craftBinaryPath,...m.additionalSearchPaths||[],sY(iY(I.execPath),"craft")];for(let Y of Z)if(Y&&aY(Y))return Y;return tY()}var H=new Map;function jZ(Z){let Y=H.get(Z);if(!Y||Y.closed)return;Y.closed=!0;for(let $ of Y.closeListeners??[])try{$()}catch(J){console.warn(`[stx/desktop] window ${Z} close listener threw:`,J)}Y.closeListeners?.clear()}var $6=50;async function VZ(Z,Y){let $=Y.show().then(()=>({failed:!1}),(G)=>({failed:!0,error:G})),J=await Promise.race([$,new Promise((G)=>setTimeout(()=>G(null),$6))]);if(J?.failed)throw J.error;$.then(()=>jZ(Z))}function J6(){return Array.from(H.keys())}function Q6(Z){let Y=H.get(Z);if(!Y)return null;return YZ(Z,Y.app)}function G6(){for(let[Z,Y]of H)try{Y.app?.close?.()}catch($){console.warn(`Failed to close window ${Z}:`,$)}H.clear()}function YZ(Z,Y){return{id:Z,show:()=>{console.log(`[stx/desktop] Window ${Z} shown`)},hide:()=>{console.log("[stx/desktop] To hide window, use window.craft.window.hide() from inside the webview")},close:()=>{let $=H.get(Z);if($?.app)$.app.close(),jZ(Z),H.delete(Z),console.log(`[stx/desktop] Window ${Z} closed`)},onClosed:($)=>{let J=H.get(Z);if(!J||J.closed)return queueMicrotask($),()=>{};return J.closeListeners??=new Set,J.closeListeners.add($),()=>J.closeListeners?.delete($)},focus:()=>{console.log("[stx/desktop] To focus window, use window.craft.window.focus() from inside the webview")},minimize:()=>{console.log("[stx/desktop] To minimize window, use window.craft.window.minimize() from inside the webview")},maximize:()=>{console.log("[stx/desktop] To maximize window, use window.craft.window.maximize() from inside the webview")},restore:()=>{console.log("[stx/desktop] To restore window, use window.craft.window.show() from inside the webview")},setTitle:($)=>{console.log(`[stx/desktop] To set title, use window.craft.window.setTitle({ title: "${$}" }) from inside the webview`)},loadURL:($)=>{console.log(`[stx/desktop] To navigate, use window.location.href = "${$}" from inside the webview`)},reload:()=>{console.log("[stx/desktop] To reload, use window.craft.window.reload() from inside the webview")}}}function qZ(Z,Y={}){let $=["--url",Z,"--title",Y.title||"stx Desktop","--width",String(Y.width??1200),"--height",String(Y.height??800)];if(Y.darkMode)$.push("--dark");if(Y.hotReload)$.push("--hot-reload");if(Y.resizable===!1)$.push("--no-resize");if(Y.frameless)$.push("--frameless");if(Y.alwaysOnTop)$.push("--always-on-top");if(Y.titlebarHidden)$.push("--titlebar-hidden");if(Y.systemTray)$.push("--system-tray");if(Y.hideDockIcon)$.push("--hide-dock-icon");if(Y.devTools===!1)$.push("--no-devtools");if(Y.nativeSidebar)$.push("--native-sidebar");if(Y.sidebarWidth!==void 0)$.push("--sidebar-width",String(Y.sidebarWidth));let J=KZ(Y);if(J)$.push("--sidebar-config",JSON.stringify(J));return $}async function X6(Z,Y={}){let $=`craft-window-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,J=ZZ();try{let{createApp:G}=await import("craft-native"),X=G({url:Z,craftPath:J,window:{title:Y.title||"stx Desktop",width:Y.width??1200,height:Y.height??800,darkMode:Y.darkMode??!1,hotReload:Y.hotReload??!1,resizable:Y.resizable??!0,frameless:Y.frameless??!1,alwaysOnTop:Y.alwaysOnTop??!1,titlebarHidden:Y.titlebarHidden??!1,systemTray:Y.systemTray??!1,hideDockIcon:Y.hideDockIcon??!1,devTools:Y.devTools??!1,nativeSidebar:Y.nativeSidebar??!1,sidebarWidth:Y.sidebarWidth,sidebarConfig:KZ(Y)}});return H.set($,{app:X,url:Z,options:Y}),await VZ($,X),YZ($,X)}catch{try{let{spawn:G}=await import("child_process"),X=G(J,qZ(Z,Y),{stdio:"inherit"});X.on("error",(z)=>{console.error(z.code==="ENOENT"?gZ(J):`craft child error: ${z.message}`)});let O={close:()=>X.kill()};return H.set($,{app:O,url:Z,options:Y}),X.on("exit",()=>jZ($)),YZ($,O)}catch(G){return console.error("Failed to spawn craft binary:",G.message),null}}}async function z6(Z,Y={}){let $=`http://localhost:${Z}/`;if(I.env.NODE_ENV==="test"||I.env.BUN_TEST)return console.warn("\u26A0 Skipping native window in test environment"),console.log("(Skipping browser fallback in test environment)"),!1;try{let{createApp:G}=await import("craft-native");console.log("\u26A1 Opening native window via craft-native\u2026");let X=!Y.nativeSidebar,O=KZ(Y),z=G({url:$,craftPath:ZZ(),window:{title:Y.title||"stx Development",width:Y.width||1400,height:Y.height||900,resizable:!0,systemTray:X,darkMode:Y.darkMode??!0,hotReload:Y.hotReload??!0,devTools:!0,titlebarHidden:Y.titlebarHidden??!1,nativeSidebar:Y.nativeSidebar??!1,sidebarWidth:Y.sidebarWidth??260,sidebarConfig:O}}),F=`dev-window-${Z}`;return H.set(F,{app:z,url:$,options:Y}),await VZ(F,z),console.log(`\u2713 Native window opened at ${$}`),!0}catch{let G=ZZ();try{console.log(`\u26A1 Opening native window via craft binary (${G})\u2026`);let{spawn:X}=await import("child_process"),O=X(G,qZ($,{title:"stx Development",width:1400,height:900,hotReload:!0,...Y}),{stdio:"inherit"});O.on("exit",()=>I.exit(0)),O.on("error",(F)=>{console.warn(F.code==="ENOENT"?gZ(G):`craft child error: ${F.message}`)});let z=`dev-window-${Z}`;return H.set(z,{app:{close:()=>O.kill()},url:$,options:Y}),console.log(`\u2713 Native window opened at ${$}`),!0}catch(X){console.warn("\u26A0 Could not spawn craft binary:",X.message)}if(I.env.NODE_ENV==="test"||I.env.BUN_TEST)return console.log("(Skipping browser fallback in test environment)"),!1;console.log("\uD83D\uDCF1 Opening in browser instead\u2026");try{let{spawn:X}=await import("child_process"),O=I.platform;return X(O==="darwin"?"open":O==="win32"?"cmd":"xdg-open",O==="win32"?["/c","start",$]:[$],{detached:!0,stdio:"ignore"}).unref(),console.log(`\u2713 Browser opened at ${$}`),!0}catch(X){return console.error("Could not open browser:",X),console.log(`Please open manually: ${$}`),!1}}}async function F6(Z,Y={}){let{title:$="stx Desktop",width:J=1200,height:G=800,darkMode:X=!1,hotReload:O=!1,resizable:z=!0,frameless:F=!1,alwaysOnTop:R=!1}=Y;try{let{createApp:j}=await import("craft-native"),V=ZZ(),K=j({html:Z,craftPath:V,window:{title:$,width:J,height:G,darkMode:X,hotReload:O,resizable:z,frameless:F,alwaysOnTop:R}}),U=`craft-window-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;return H.set(U,{app:K,url:"html-content",options:Y}),await VZ(U,K),YZ(U,K)}catch(j){return console.error("Failed to create window with HTML:",j),null}}function O6(){try{return v.resolve("craft-native"),!0}catch{return!1}}function R6(){return`
824
+ `}import I from"process";import{existsSync as aY}from"fs";import{dirname as iY,join as sY}from"path";import{craftBinaryNotFoundMessage as gZ,resolveCraftBinary as tY}from"craft-native";var m={};function eY(Z){m={...m,...Z}}function Z6(){return{...m}}function Y6(){m={}}function KZ(Z){if(!Z.sidebarConfig)return;let Y={...Z.sidebarConfig};if(Y.variant==="desktop")Y.material=Y.material??"sidebar",Y.backgroundEffect=Y.backgroundEffect??"shimmer",Y.allowsVibrancy=Y.allowsVibrancy??!0;return Y}function ZZ(){let Z=iY(I.execPath),Y=Z.includes(".app/Contents/MacOS")?sY(Z,"craft"):void 0,$=[I.env.CRAFT_BINARY_PATH,m.craftBinaryPath,...m.additionalSearchPaths||[],Y];for(let J of $)if(J&&aY(J))return J;return tY()}var H=new Map;function jZ(Z){let Y=H.get(Z);if(!Y||Y.closed)return;Y.closed=!0;for(let $ of Y.closeListeners??[])try{$()}catch(J){console.warn(`[stx/desktop] window ${Z} close listener threw:`,J)}Y.closeListeners?.clear()}var $6=50;async function VZ(Z,Y){let $=Y.show().then(()=>({failed:!1}),(G)=>({failed:!0,error:G})),J=await Promise.race([$,new Promise((G)=>setTimeout(()=>G(null),$6))]);if(J?.failed)throw J.error;$.then(()=>jZ(Z))}function J6(){return Array.from(H.keys())}function Q6(Z){let Y=H.get(Z);if(!Y)return null;return YZ(Z,Y.app)}function G6(){for(let[Z,Y]of H)try{Y.app?.close?.()}catch($){console.warn(`Failed to close window ${Z}:`,$)}H.clear()}function YZ(Z,Y){return{id:Z,show:()=>{console.log(`[stx/desktop] Window ${Z} shown`)},hide:()=>{console.log("[stx/desktop] To hide window, use window.craft.window.hide() from inside the webview")},close:()=>{let $=H.get(Z);if($?.app)$.app.close(),jZ(Z),H.delete(Z),console.log(`[stx/desktop] Window ${Z} closed`)},onClosed:($)=>{let J=H.get(Z);if(!J||J.closed)return queueMicrotask($),()=>{};return J.closeListeners??=new Set,J.closeListeners.add($),()=>J.closeListeners?.delete($)},focus:()=>{console.log("[stx/desktop] To focus window, use window.craft.window.focus() from inside the webview")},minimize:()=>{console.log("[stx/desktop] To minimize window, use window.craft.window.minimize() from inside the webview")},maximize:()=>{console.log("[stx/desktop] To maximize window, use window.craft.window.maximize() from inside the webview")},restore:()=>{console.log("[stx/desktop] To restore window, use window.craft.window.show() from inside the webview")},setTitle:($)=>{console.log(`[stx/desktop] To set title, use window.craft.window.setTitle({ title: "${$}" }) from inside the webview`)},loadURL:($)=>{console.log(`[stx/desktop] To navigate, use window.location.href = "${$}" from inside the webview`)},reload:()=>{console.log("[stx/desktop] To reload, use window.craft.window.reload() from inside the webview")}}}function qZ(Z,Y={}){let $=["--url",Z,"--title",Y.title||"stx Desktop","--width",String(Y.width??1200),"--height",String(Y.height??800)];if(Y.darkMode)$.push("--dark");if(Y.hotReload)$.push("--hot-reload");if(Y.resizable===!1)$.push("--no-resize");if(Y.frameless)$.push("--frameless");if(Y.alwaysOnTop)$.push("--always-on-top");if(Y.titlebarHidden)$.push("--titlebar-hidden");if(Y.systemTray)$.push("--system-tray");if(Y.hideDockIcon)$.push("--hide-dock-icon");if(Y.devTools===!1)$.push("--no-devtools");if(Y.nativeSidebar)$.push("--native-sidebar");if(Y.sidebarWidth!==void 0)$.push("--sidebar-width",String(Y.sidebarWidth));let J=KZ(Y);if(J)$.push("--sidebar-config",JSON.stringify(J));return $}async function X6(Z,Y={}){let $=`craft-window-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,J=ZZ();try{let{createApp:G}=await import("craft-native"),X=G({url:Z,craftPath:J,window:{title:Y.title||"stx Desktop",width:Y.width??1200,height:Y.height??800,darkMode:Y.darkMode??!1,hotReload:Y.hotReload??!1,resizable:Y.resizable??!0,frameless:Y.frameless??!1,alwaysOnTop:Y.alwaysOnTop??!1,titlebarHidden:Y.titlebarHidden??!1,systemTray:Y.systemTray??!1,hideDockIcon:Y.hideDockIcon??!1,devTools:Y.devTools??!1,nativeSidebar:Y.nativeSidebar??!1,sidebarWidth:Y.sidebarWidth,sidebarConfig:KZ(Y)}});return H.set($,{app:X,url:Z,options:Y}),await VZ($,X),YZ($,X)}catch{try{let{spawn:G}=await import("child_process"),X=G(J,qZ(Z,Y),{stdio:"inherit"});X.on("error",(z)=>{console.error(z.code==="ENOENT"?gZ(J):`craft child error: ${z.message}`)});let O={close:()=>X.kill()};return H.set($,{app:O,url:Z,options:Y}),X.on("exit",()=>jZ($)),YZ($,O)}catch(G){return console.error("Failed to spawn craft binary:",G.message),null}}}async function z6(Z,Y={}){let $=`http://localhost:${Z}/`;if(I.env.NODE_ENV==="test"||I.env.BUN_TEST)return console.warn("\u26A0 Skipping native window in test environment"),console.log("(Skipping browser fallback in test environment)"),!1;try{let{createApp:G}=await import("craft-native");console.log("\u26A1 Opening native window via craft-native\u2026");let X=!Y.nativeSidebar,O=KZ(Y),z=G({url:$,craftPath:ZZ(),window:{title:Y.title||"stx Development",width:Y.width||1400,height:Y.height||900,resizable:!0,systemTray:X,darkMode:Y.darkMode??!0,hotReload:Y.hotReload??!0,devTools:!0,titlebarHidden:Y.titlebarHidden??!1,nativeSidebar:Y.nativeSidebar??!1,sidebarWidth:Y.sidebarWidth??260,sidebarConfig:O}}),F=`dev-window-${Z}`;return H.set(F,{app:z,url:$,options:Y}),await VZ(F,z),console.log(`\u2713 Native window opened at ${$}`),!0}catch{let G=ZZ();try{console.log(`\u26A1 Opening native window via craft binary (${G})\u2026`);let{spawn:X}=await import("child_process"),O=X(G,qZ($,{title:"stx Development",width:1400,height:900,hotReload:!0,...Y}),{stdio:"inherit"});O.on("exit",()=>I.exit(0)),O.on("error",(F)=>{console.warn(F.code==="ENOENT"?gZ(G):`craft child error: ${F.message}`)});let z=`dev-window-${Z}`;return H.set(z,{app:{close:()=>O.kill()},url:$,options:Y}),console.log(`\u2713 Native window opened at ${$}`),!0}catch(X){console.warn("\u26A0 Could not spawn craft binary:",X.message)}if(I.env.NODE_ENV==="test"||I.env.BUN_TEST)return console.log("(Skipping browser fallback in test environment)"),!1;console.log("\uD83D\uDCF1 Opening in browser instead\u2026");try{let{spawn:X}=await import("child_process"),O=I.platform;return X(O==="darwin"?"open":O==="win32"?"cmd":"xdg-open",O==="win32"?["/c","start",$]:[$],{detached:!0,stdio:"ignore"}).unref(),console.log(`\u2713 Browser opened at ${$}`),!0}catch(X){return console.error("Could not open browser:",X),console.log(`Please open manually: ${$}`),!1}}}async function F6(Z,Y={}){let{title:$="stx Desktop",width:J=1200,height:G=800,darkMode:X=!1,hotReload:O=!1,resizable:z=!0,frameless:F=!1,alwaysOnTop:R=!1}=Y;try{let{createApp:j}=await import("craft-native"),V=ZZ(),K=j({html:Z,craftPath:V,window:{title:$,width:J,height:G,darkMode:X,hotReload:O,resizable:z,frameless:F,alwaysOnTop:R}}),U=`craft-window-${Date.now()}-${Math.random().toString(36).slice(2,8)}`;return H.set(U,{app:K,url:"html-content",options:Y}),await VZ(U,K),YZ(U,K)}catch(j){return console.error("Failed to create window with HTML:",j),null}}function O6(){try{return v.resolve("craft-native"),!0}catch{return!1}}function R6(){return`
825
825
  // STX Desktop Window Bridge
826
826
  // Provides convenient wrappers around window.craft APIs
827
827
  window.stxWindow = {
@@ -892,7 +892,7 @@ NoDisplay=true`:""}
892
892
  `).replace(/<[^>]+>/g,"").replace(/&nbsp;/g," ").replace(/&amp;/g,"&").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/\n{3,}/g,`
893
893
 
894
894
  `).trim()}var Z8={async show(Z){if(!Z.title)throw Error("notification title is required");if(Q("notifications")){await window.craft.notifications.show(Z);return}if(typeof window<"u"&&"Notification"in window){let Y=window.Notification;if(Y.permission==="granted")new Y(Z.title,{body:Z.body,icon:Z.icon});else if(Y.permission==="default"){if(await Y.requestPermission()==="granted")new Y(Z.title,{body:Z.body,icon:Z.icon})}}},async schedule(Z){if(Q("notifications")){let J={...Z};if(J.triggerAt instanceof Date)J.triggerAt=J.triggerAt.toISOString();await window.craft.notifications.schedule(J);return}let Y=Y8(Z.triggerAt),$=Math.max(0,Y-Date.now());setTimeout(()=>{this.show(Z).catch(()=>{})},$)},async cancel(Z){if(Q("notifications"))await window.craft.notifications.cancel(Z)},async cancelAll(){if(Q("notifications"))await window.craft.notifications.cancelAll()},async setBadge(Z){let Y=Math.max(0,Math.round(Number.isFinite(Z)?Z:0));if(Q("notifications")){await window.craft.notifications.setBadge(Y);return}if(typeof navigator<"u"&&navigator.setAppBadge)try{await navigator.setAppBadge(Y)}catch{}},async clearBadge(){if(Q("notifications")){await window.craft.notifications.clearBadge();return}if(typeof navigator<"u"&&navigator.clearAppBadge)try{await navigator.clearAppBadge()}catch{}},async requestPermission(){if(Q("notifications"))return await window.craft.notifications.requestPermission();if(typeof window<"u"&&"Notification"in window){let Z=window.Notification;if(Z.permission==="granted")return!0;if(Z.permission==="denied")return!1;return await Z.requestPermission()==="granted"}return!1},async registerCategories(Z){if(!Array.isArray(Z)||Z.length===0)return;if(Q("notifications")){let Y=window.craft.notifications.registerCategories;if(typeof Y==="function")await Y(Z)}},onActionClicked(Z){return P("craft:notification:actionClicked",Z)},onReply(Z){return P("craft:notification:reply",Z)}};function Y8(Z){if(Z==null)return Date.now();if(Z instanceof Date)return Z.getTime();if(typeof Z==="number")return Z;let Y=Date.parse(Z);return Number.isNaN(Y)?Date.now():Y}var $8={async readFile(Z){let Y=await M("fs").readFile(Z);return Y&&Y.data||""},async readBuffer(Z){let Y=await M("fs").readFile(Z),$=Y&&Y.data||"";if(Y&&Y.base64===!0)return Q8($);return new TextEncoder().encode($)},async writeFile(Z,Y){await M("fs").writeFile(Z,Y)},async writeBuffer(Z,Y){let $=J8(Y),J=M("fs");if(typeof J.writeFileBytes==="function")await J.writeFileBytes(Z,$);else await J.writeFile(Z,$)},async copy(Z,Y){if(Z===Y)throw Error("fs.copy: source and destination must differ");await M("fs").copy(Z,Y)},async move(Z,Y){if(Z===Y)throw Error("fs.move: source and destination must differ");await M("fs").move(Z,Y)},async appendFile(Z,Y){await M("fs").appendFile(Z,Y)},async deleteFile(Z){await M("fs").deleteFile(Z)},async exists(Z){return await M("fs").exists(Z)},async stat(Z){return G8(await M("fs").stat(Z))},async readDir(Z){let Y=await M("fs").readDir(Z),$=Y&&Y.entries||[],J=Z.endsWith("/")?Z.slice(0,-1):Z;return $.map((G)=>({name:G.name,path:`${J}/${G.name}`,isDirectory:!!G.isDirectory}))},async mkdir(Z,Y){await M("fs").mkdir(Z,Y)},async rmdir(Z,Y){await M("fs").rmdir(Z,Y)},async watch(Z,Y){await M("fs").watch(Z,Y)},async unwatch(Z){await M("fs").unwatch(Z)},onChange(Z){return P("craft:fs:change",Z)},async watchTree(Z,Y,$){let J=`watch-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`,G=M("fs");await G.watch(Z,J,{recursive:!!Y.recursive});let X=Y.kinds&&Y.kinds.length>0?new Set(Y.kinds):null,O=Math.max(0,Math.floor(Y.coalesceMs??0)),z=[],F=null,R=!1,j=()=>{if(F=null,z.length===0)return;let K=z;z=[];try{$(K)}catch{}},V=P("craft:fs:change",(K)=>{if(R)return;if(K.id!==J)return;if(X&&K.kind&&!X.has(K.kind))return;if(z.push(K),O===0){j();return}if(F==null)F=setTimeout(j,O)});return{id:J,async stop(){if(R)return;if(R=!0,V(),F)clearTimeout(F),F=null;if(z.length>0)j();try{await G.unwatch(J)}catch{}}}},async homeDir(){return await M("fs").homeDir()},async tempDir(){return await M("fs").tempDir()},async appDataDir(){return await M("fs").appDataDir()}};function J8(Z){let Y="";for(let $=0;$<Z.length;$++)Y+=String.fromCharCode(Z[$]);return typeof btoa==="function"?btoa(Y):Buffer.from(Z).toString("base64")}function Q8(Z){let Y=typeof atob==="function"?atob(Z):Buffer.from(Z,"base64").toString("binary"),$=new Uint8Array(Y.length);for(let J=0;J<Y.length;J++)$[J]=Y.charCodeAt(J);return $}function G8(Z){return{isFile:!!Z.isFile,isDirectory:!!Z.isDirectory,isSymlink:!!Z.isSymlink,size:Number(Z.size)||0,modifiedAt:Z.modifiedAt!=null?Z.modifiedAt<1000000000000?Z.modifiedAt*1000:Z.modifiedAt:0}}var r=new Set,J4=!1;function X8(){if(J4)return;if(typeof window>"u"||typeof window.addEventListener!=="function")return;window.addEventListener("craft:shell:exit",(Z)=>{let Y=Z.detail;if(Y?.id)r.delete(Y.id)}),J4=!0}var z8=new Set(["javascript:","data:","file:","vbscript:"]),F8={async openExternal(Z){let Y=Z.trim().toLowerCase();for(let $ of z8)if(Y.startsWith($))throw Error(`shell.openExternal: ${$} URLs are blocked for safety`);if(Q("shell")){await window.craft.shell.openExternal(Z);return}if(typeof window<"u"&&typeof window.open==="function")window.open(Z,"_blank","noopener,noreferrer")},async openPath(Z){await M("shell").openPath(Z)},async showInFinder(Z){await M("shell").showInFinder(Z)},async spawn(Z,Y,$=[],J={}){if(X8(),!Z||typeof Z!=="string")throw Error("shell.spawn: id must be a non-empty string");if(!Y||typeof Y!=="string")throw Error("shell.spawn: command must be a non-empty string");if(!Array.isArray($))throw Error("shell.spawn: args must be an array");for(let G of $)if(typeof G!=="string")throw Error("shell.spawn: args entries must be strings");if(r.has(Z))throw Error(`shell.spawn: id "${Z}" is already in use \u2014 call kill(id) first or pick a different id`);r.add(Z);try{await M("shell").spawn(Z,Y,$,J)}catch(G){throw r.delete(Z),G}},async kill(Z){await M("shell").kill(Z),r.delete(Z)},async getEnv(Z){if(Q("shell")){let Y=await window.craft.shell.getEnv(Z);return Y==null?void 0:String(Y)}return},async setEnv(Z,Y){await M("shell").setEnv(Z,Y)},onStdout(Z){return P("craft:shell:stdout",Z)},onStderr(Z){return P("craft:shell:stderr",Z)},onExit(Z){return P("craft:shell:exit",Z)}};var O8={async register(Z,Y,$){if(!Q("shortcuts"))return;await window.craft.shortcuts.register(Z,Y,$)},async unregister(Z){if(!Q("shortcuts"))return;await window.craft.shortcuts.unregister(Z)},async unregisterAll(){if(!Q("shortcuts"))return;await window.craft.shortcuts.unregisterAll()},async enable(Z){if(!Q("shortcuts"))return;await window.craft.shortcuts.enable(Z)},async disable(Z){if(!Q("shortcuts"))return;await window.craft.shortcuts.disable(Z)},async isRegistered(Z){if(!Q("shortcuts"))return!1;return await window.craft.shortcuts.isRegistered(Z)},async list(){if(!Q("shortcuts"))return[];return await window.craft.shortcuts.list()},on(Z){return P("craft:shortcut",Z)}};var R8={get(){if(Q("theme"))try{return window.craft.theme.get()}catch{}return{appearance:K8()}},onChange(Z){if(Z(this.get()),Q("theme"))return P("craft:theme",Z);if(typeof window<"u"&&window.matchMedia){let Y=window.matchMedia("(prefers-color-scheme: dark)"),$=()=>Z({appearance:Y.matches?"dark":"light"});return Y.addEventListener("change",$),()=>Y.removeEventListener("change",$)}return()=>{}},async current(){return this.get()}};function K8(){if(typeof window>"u"||!window.matchMedia)return"light";return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}async function j8(Z,Y={}){if(!Q("dragOut"))throw Error("dragOut requires a Craft native window");let $=Array.isArray(Z)?Z:[Z];if($.length===0)throw Error("dragOut: at least one path required");await window.craft.dragOut.start($,Y)}function V8(){return Q("dragOut")}var q8={onUrl(Z){if(!Q("deepLink"))return()=>{};return P("craft:deepLink",Z)},getInitialUrl(){if(typeof window>"u")return null;if(Q("deepLink"))try{return window.craft.deepLink.getInitialUrl()}catch{return null}return window.__craftPendingDeepLink||null},consumeInitialUrl(){let Z=this.getInitialUrl();if(typeof window<"u")window.__craftPendingDeepLink=void 0;return Z},isAvailable(){return Q("deepLink")}};var P8={async isCharging(){if(Q("power"))return await window.craft.power.isCharging();let Z=await QZ();return Z?!!Z.charging:!1},async isPluggedIn(){if(Q("power"))return await window.craft.power.isPluggedIn();let Z=await QZ();return Z?!!Z.charging||Z.level>=0.999:!1},async isLowPowerMode(){if(Q("power"))return await window.craft.power.isLowPowerMode();return!1},async level(){if(Q("power")){let Y=await window.craft.power.batteryLevel();return typeof Y==="number"?Y:null}let Z=await QZ();return Z?Z.level:null},async timeRemaining(){if(Q("power")){let $=await window.craft.power.timeRemaining();return typeof $==="number"?$:null}let Z=await QZ();if(!Z)return null;let Y=Z.charging?Z.chargingTime:Z.dischargingTime;return Number.isFinite(Y)?Math.round(Y/60):null},async thermalState(){if(Q("power"))return await window.craft.power.thermalState()||"unknown";return"unknown"},async uptimeSeconds(){if(Q("power"))return await window.craft.power.uptimeSeconds();if(typeof performance<"u"&&typeof performance.now==="function")return Math.round(performance.now()/1000);return 0},async preventSleep(Z="app is busy"){if(Q("power")){await window.craft.power.preventSleep(Z);return}if(typeof navigator>"u"||!navigator.wakeLock)return;let Y=window;if(Y.__craftWebWakeLock?.release){try{await Y.__craftWebWakeLock.release()}catch{}Y.__craftWebWakeLock=null}try{let $=await navigator.wakeLock.request("screen");Y.__craftWebWakeLock=$}catch{}},async allowSleep(){if(Q("power")){await window.craft.power.allowSleep();return}let Z=window.__craftWebWakeLock;if(Z&&typeof Z.release==="function"){try{await Z.release()}catch{}window.__craftWebWakeLock=null}},onSleep(Z){return P("craft:powerSleep",Z)},onWake(Z){return P("craft:powerWake",Z)}};async function QZ(){if(typeof navigator>"u")return null;let Z=navigator;if(typeof Z.getBattery!=="function")return null;try{return await Z.getBattery()}catch{return null}}var U8={async connectionType(){if(Q("network"))return await window.craft.network.connectionType();return Q4()},async wifiSSID(){if(Q("network"))return await window.craft.network.wifiSSID()||void 0;return},async wifiSignalStrength(){if(Q("network")){let Z=await window.craft.network.wifiSignalStrength();return typeof Z==="number"?Z:void 0}return},async ipAddress(){if(Q("network"))return await window.craft.network.ipAddress();return""},async macAddress(){if(Q("network"))return await window.craft.network.macAddress();return""},async interfaces(){if(Q("network"))return await window.craft.network.interfaces();return[]},async isVPNConnected(){if(Q("network"))return await window.craft.network.isVPNConnected();return!1},async proxySettings(){if(Q("network"))return await window.craft.network.proxySettings()||{};return{}},async openPreferences(){if(Q("network"))await window.craft.network.openPreferences()},onChange(Z){if(Q("network"))return P("craft:networkChange",Z);if(typeof window>"u")return()=>{};let Y=()=>Z({type:Q4(),online:!0}),$=()=>Z({type:"none",online:!1});return window.addEventListener("online",Y),window.addEventListener("offline",$),()=>{window.removeEventListener("online",Y),window.removeEventListener("offline",$)}}};function Q4(){if(typeof navigator>"u")return"unknown";if(navigator.onLine===!1)return"none";let Z=navigator.connection;if(!Z)return"unknown";let Y=String(Z.type||Z.effectiveType||"unknown").toLowerCase();if(Y==="wifi"||Y==="cellular"||Y==="ethernet"||Y==="bluetooth"||Y==="none")return Y;return"unknown"}var L8={async checkForUpdates(){if(!Q("updater"))return;await window.craft.updater.checkForUpdates()},async checkInBackground(){if(!Q("updater"))return;await window.craft.updater.checkInBackground()},async setAutomaticChecks(Z){if(!Q("updater"))return;await window.craft.updater.setAutomaticChecks(Z)},async setCheckInterval(Z){if(!Q("updater"))return;if(!Number.isFinite(Z))throw Error("setCheckInterval: must be a finite number");let Y=Z<=0?0:Math.max(60,Math.round(Z));await window.craft.updater.setCheckInterval(Y)},async setFeedURL(Z){if(!Q("updater"))return;await window.craft.updater.setFeedURL(Z)},async getLastUpdateCheckDate(){if(!Q("updater"))return null;return await window.craft.updater.getLastUpdateCheckDate()||null},async getUpdateInfo(){if(!Q("updater"))return null;let Z=await window.craft.updater.getUpdateInfo();if(!Z||typeof Z.version!=="string"||Z.version.length===0)return null;return Z},onAvailable(Z){return P("craft:updateAvailable",Z)},onDownloaded(Z){return P("craft:updateDownloaded",Z)},async verifySignature({payload:Z,signatureB64:Y,publicKeyB64:$}){let J=G4(Z),G;try{G=await crypto.subtle.importKey("raw",GZ($),{name:"Ed25519"},!1,["verify"])}catch{return!1}try{return await crypto.subtle.verify("Ed25519",G,GZ(Y),J)}catch{return!1}},async verifyDownload({url:Z,signatureB64:Y,publicKeyB64:$,fetchInit:J}){let G;try{G=await fetch(Z,J)}catch{return{ok:!1,reason:"fetch-failed"}}if(!G.ok)return{ok:!1,reason:"http-error",status:G.status};let X=new Uint8Array(await G.arrayBuffer()),O;try{O=await crypto.subtle.importKey("raw",GZ($),{name:"Ed25519"},!1,["verify"])}catch{return{ok:!1,reason:"bad-key"}}let z=!1;try{z=await crypto.subtle.verify("Ed25519",O,GZ(Y),G4(X))}catch{z=!1}if(!z)return{ok:!1,reason:"bad-signature"};return{ok:!0,payload:X}}};function G4(Z){if(Z instanceof ArrayBuffer)return new Uint8Array(Z);let Y=new ArrayBuffer(Z.byteLength),$=new Uint8Array(Y);return $.set(Z),$}function GZ(Z){if(typeof atob==="function"){let J=atob(Z),G=new ArrayBuffer(J.length),X=new Uint8Array(G);for(let O=0;O<J.length;O++)X[O]=J.charCodeAt(O);return X}let Y=Buffer.from(Z,"base64"),$=new ArrayBuffer(Y.length);return new Uint8Array($).set(Y),new Uint8Array($)}var W8={onFocus(Z){if(Q("window"))return P("craft:window:focus",()=>Z());return DZ("focus",Z)},onBlur(Z){if(Q("window"))return P("craft:window:blur",()=>Z());return DZ("blur",Z)},onResize(Z){if(Q("window"))return P("craft:window:resize",Z);if(typeof window>"u")return()=>{};let Y=()=>Z({width:window.innerWidth,height:window.innerHeight});return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)},onMove(Z){if(Q("window"))return P("craft:window:move",Z);return()=>{}},onClose(Z){if(Q("window"))return P("craft:window:close",()=>Z());return DZ("beforeunload",Z)},onMinimize(Z){if(Q("window"))return P("craft:window:minimize",()=>Z());if(typeof document>"u")return()=>{};let Y=()=>{if(document.visibilityState==="hidden")Z()};return document.addEventListener("visibilitychange",Y),()=>document.removeEventListener("visibilitychange",Y)},onRestore(Z){if(Q("window"))return P("craft:window:restore",()=>Z());if(typeof document>"u")return()=>{};let Y=()=>{if(document.visibilityState==="visible")Z()};return document.addEventListener("visibilitychange",Y),()=>document.removeEventListener("visibilitychange",Y)}};function DZ(Z,Y){if(typeof window>"u")return()=>{};let $=()=>Y();return window.addEventListener(Z,$),()=>window.removeEventListener(Z,$)}var X4={name:"",version:"0.0.0"},D8={async hideDockIcon(){if(Q("app"))await window.craft.app.hideDockIcon()},async showDockIcon(){if(Q("app"))await window.craft.app.showDockIcon()},async quit(){if(Q("app"))await window.craft.app.quit()},async getInfo(){if(!Q("app"))return X4;let Z=await window.craft.app.getInfo();return{...X4,...Z||{}}},async notify(Z){if(!Z.title)throw Error("notify: title is required");if(Q("app"))await window.craft.app.notify(Z)},async setBadge(Z){if(Q("app"))await window.craft.app.setBadge(Z)},async bounce(Z="informational"){if(Q("app"))await window.craft.app.bounce(Z)}};var M8={async set(Z){if(Q("menu"))await window.craft.menu.set(Z)},async setDock(Z){if(Q("menu"))await window.craft.menu.setDock(Z)},async addItem(Z,Y){if(Q("menu"))await window.craft.menu.addItem(Z,Y)},async removeItem(Z){if(Q("menu"))await window.craft.menu.removeItem(Z)},async enableItem(Z){if(Q("menu"))await window.craft.menu.enableItem(Z)},async disableItem(Z){if(Q("menu"))await window.craft.menu.disableItem(Z)},async checkItem(Z){if(Q("menu"))await window.craft.menu.checkItem(Z)},async uncheckItem(Z){if(Q("menu"))await window.craft.menu.uncheckItem(Z)},async setItemLabel(Z,Y){if(Q("menu"))await window.craft.menu.setItemLabel(Z,Y)},async clearDock(){if(Q("menu"))await window.craft.menu.clearDock()},onAction(Z){return P("craft:menu:action",Z)}};var T8={accentColor:()=>x("system","accentColor",()=>""),highlightColor:()=>x("system","highlightColor",()=>""),language:()=>x("system","language",()=>{if(typeof navigator>"u")return"";return navigator.language?.split("-")[0]||""}),locale:()=>x("system","locale",()=>{if(typeof navigator>"u")return"";return navigator.language||""}),timezone:()=>x("system","timezone",()=>{try{return Intl.DateTimeFormat().resolvedOptions().timeZone||""}catch{return""}}),is24HourTime:()=>x("system","is24HourTime",()=>{try{let Z=new Intl.DateTimeFormat([],{hour:"numeric"}).resolvedOptions();return Z.hourCycle==="h23"||Z.hourCycle==="h24"}catch{return!1}}),reduceMotion:()=>x("system","reduceMotion",()=>MZ("(prefers-reduced-motion: reduce)")),reduceTransparency:()=>x("system","reduceTransparency",()=>MZ("(prefers-reduced-transparency: reduce)")),increaseContrast:()=>x("system","increaseContrast",()=>MZ("(prefers-contrast: more)")),systemVersion:()=>x("system","systemVersion",()=>""),hostname:()=>x("system","hostname",()=>""),username:()=>x("system","username",()=>""),async openPreferences(){if(Q("system"))await window.craft.system.openPreferences()}};async function x(Z,Y,$){if(Q(Z))return await window.craft[Z][Y]();return await $()}function MZ(Z){if(typeof window>"u"||!window.matchMedia)return!1;return window.matchMedia(Z).matches}var _8={async getDisplays(){if(Q("screen"))return await window.craft.screen.getDisplays();return z4()},async getPrimary(){if(Q("screen")){let Z=await window.craft.screen.getPrimary();return Z&&typeof Z.width==="number"?Z:null}return z4()[0]??null},onChange(Z){if(Q("screen"))return P("craft:screen:change",()=>Z());if(typeof window>"u")return()=>{};let Y=()=>Z();return window.addEventListener("resize",Y),()=>window.removeEventListener("resize",Y)}};function z4(){if(typeof window>"u"||!window.screen)return[];let Z=window.screen;return[{id:0,x:Z.left??0,y:Z.top??0,width:Z.width||0,height:Z.height||0,workX:Z.availLeft??0,workY:Z.availTop??0,workWidth:Z.availWidth??Z.width??0,workHeight:Z.availHeight??Z.height??0,scaleFactor:window.devicePixelRatio||1}]}var N8={async set(Z,Y,$){if(!Z)throw Error("keychain.set: service is required");if(!Y)throw Error("keychain.set: account is required");await M("keychain").set(Z,Y,$)},async get(Z,Y){if(!Z)throw Error("keychain.get: service is required");if(!Y)throw Error("keychain.get: account is required");let $=await M("keychain").get(Z,Y);return typeof $==="string"?$:null},async delete(Z,Y){if(!Z)throw Error("keychain.delete: service is required");if(!Y)throw Error("keychain.delete: account is required");await M("keychain").delete(Z,Y)},async has(Z,Y){if(!Z)throw Error("keychain.has: service is required");if(!Y)throw Error("keychain.has: account is required");return await M("keychain").has(Z,Y)}};var E8={async check(Z){if(Q("permissions"))return await window.craft.permissions.check(Z);return await F4(Z)},async request(Z){if(Q("permissions"))return await window.craft.permissions.request(Z);return await A8(Z)},async openSettings(Z){if(Q("permissions"))await window.craft.permissions.openSettings(Z)}};async function F4(Z){if(typeof navigator>"u"||!navigator.permissions?.query)return"not-supported";try{let Y=await navigator.permissions.query({name:Z});return k8(Y.state)}catch{return"not-supported"}}async function A8(Z){if(Z==="notifications"&&typeof window<"u"&&"Notification"in window){let Y=await window.Notification.requestPermission();return Y==="granted"?"granted":Y==="denied"?"denied":"undetermined"}return await F4(Z)}function k8(Z){if(Z==="granted")return"granted";if(Z==="denied")return"denied";if(Z==="prompt")return"undetermined";return"undetermined"}var H8={async print(){if(Q("printing")){await window.craft.printing.print();return}if(typeof window<"u"&&typeof window.print==="function")window.print()},async printToPDF(Z){if(!Z)throw Error("printToPDF: path is required");let Y=Z.startsWith("/"),$=/^[a-zA-Z]:[\\/]/.test(Z)||Z.startsWith("\\\\");if(!Y&&!$)throw Error("printToPDF: path must be absolute");let J=await M("printing").printToPDF(Z);return{ok:!!(J&&J.ok),path:J?.path}}};var x8={async enable(){if(!Q("autoLaunch"))return!1;return await window.craft.autoLaunch.enable()},async disable(){if(!Q("autoLaunch"))return!1;return await window.craft.autoLaunch.disable()},async isEnabled(){if(!Q("autoLaunch"))return!1;return await window.craft.autoLaunch.isEnabled()}};var C8={async addItem(Z){if(Q("touchbar"))await window.craft.touchbar.addItem(Z)},async removeItem(Z){if(Q("touchbar"))await window.craft.touchbar.removeItem(Z)},async updateItem(Z,Y){if(Q("touchbar"))await window.craft.touchbar.updateItem(Z,Y)},async setLabel(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setLabel(Z,Y)},async setIcon(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setIcon(Z,Y)},async setEnabled(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setEnabled(Z,Y)},async setSliderValue(Z,Y){if(Q("touchbar"))await window.craft.touchbar.setSliderValue(Z,Y)},async clear(){if(Q("touchbar"))await window.craft.touchbar.clear()},async show(){if(Q("touchbar"))await window.craft.touchbar.show()},async hide(){if(Q("touchbar"))await window.craft.touchbar.hide()},onAction(Z){return P("craft:touchbar:action",Z)}};var I8=/^[\da-f]*$/i;function S8(Z,Y){if(typeof Y!=="string"||!I8.test(Y)||Y.length%2!==0)throw Error(`${Z}: must be a hex string with even length, got ${JSON.stringify(Y)}`)}var w8={async isEnabled(){return Q("bluetooth")?await window.craft.bluetooth.isEnabled():!1},async powerState(){return Q("bluetooth")?await window.craft.bluetooth.powerState():"unknown"},async connectedDevices(){return Q("bluetooth")?await window.craft.bluetooth.connectedDevices():[]},async pairedDevices(){return Q("bluetooth")?await window.craft.bluetooth.pairedDevices():[]},async startDiscovery(){if(Q("bluetooth"))await window.craft.bluetooth.startDiscovery()},async stopDiscovery(){if(Q("bluetooth"))await window.craft.bluetooth.stopDiscovery()},async isDiscovering(){return Q("bluetooth")?await window.craft.bluetooth.isDiscovering():!1},async connect(Z){if(Q("bluetooth"))await window.craft.bluetooth.connect(Z)},async disconnect(Z){if(Q("bluetooth"))await window.craft.bluetooth.disconnect(Z)},async openPreferences(){if(Q("bluetooth"))await window.craft.bluetooth.openPreferences()},async discoverServices(Z){if(!Z)throw Error("bluetooth.discoverServices: deviceId is required");if(!Q("bluetooth"))return[];let Y=await window.craft.bluetooth.discoverServices(Z);return Array.isArray(Y)?Y:[]},async discoverCharacteristics(Z,Y){if(!Z||!Y)throw Error("bluetooth.discoverCharacteristics: deviceId and serviceUuid are required");if(!Q("bluetooth"))return[];let $=await window.craft.bluetooth.discoverCharacteristics(Z,Y);return Array.isArray($)?$:[]},async readCharacteristic(Z,Y,$){if(!Z||!Y||!$)throw Error("bluetooth.readCharacteristic: deviceId, serviceUuid, characteristicUuid are required");if(!Q("bluetooth"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.bluetooth.readCharacteristic(Z,Y,$)},async writeCharacteristic(Z,Y,$,J,G="with-response"){if(!Z||!Y||!$)throw Error("bluetooth.writeCharacteristic: deviceId, serviceUuid, characteristicUuid are required");if(S8("bluetooth.writeCharacteristic.valueHex",J),!Q("bluetooth"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.bluetooth.writeCharacteristic(Z,Y,$,J,G)},async setCharacteristicNotify(Z,Y,$,J){if(!Z||!Y||!$)throw Error("bluetooth.setCharacteristicNotify: deviceId, serviceUuid, characteristicUuid are required");if(!Q("bluetooth"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.bluetooth.setCharacteristicNotify(Z,Y,$,J)},onDeviceFound(Z){return P("craft:bluetooth:deviceFound",Z)},onDeviceConnected(Z){return P("craft:bluetooth:deviceConnected",Z)},onDeviceDisconnected(Z){return P("craft:bluetooth:deviceDisconnected",Z)},onCharacteristicValue(Z){return P("craft:bluetooth:characteristicValue",Z)}};var B8={async speak(Z,Y){if(!Z)throw Error("speech.speak: text is required");if(Q("speech")){await window.craft.speech.speak(Z,Y);return}if(typeof window<"u"&&window.speechSynthesis){let $=new window.SpeechSynthesisUtterance(Z);if(Y){if(Y.rate!=null)$.rate=Y.rate;if(Y.pitch!=null)$.pitch=Y.pitch;if(Y.volume!=null)$.volume=Y.volume;if(Y.voice){let G=window.speechSynthesis.getVoices().find((X)=>X.voiceURI===Y.voice||X.name===Y.voice||X.lang===Y.voice);if(G)$.voice=G}}window.speechSynthesis.speak($)}},async stop(){if(Q("speech")){await window.craft.speech.stop();return}if(typeof window<"u"&&window.speechSynthesis)window.speechSynthesis.cancel()},async pause(){if(Q("speech")){await window.craft.speech.pause();return}if(typeof window<"u"&&window.speechSynthesis)window.speechSynthesis.pause()},async resume(){if(Q("speech")){await window.craft.speech.resume();return}if(typeof window<"u"&&window.speechSynthesis)window.speechSynthesis.resume()},async isSpeaking(){if(Q("speech"))return await window.craft.speech.isSpeaking();if(typeof window<"u"&&window.speechSynthesis)return!!window.speechSynthesis.speaking;return!1},async getVoices(){if(Q("speech"))return await window.craft.speech.getVoices();if(typeof window<"u"&&window.speechSynthesis)return window.speechSynthesis.getVoices().map((Y)=>({id:Y.voiceURI||Y.name,name:Y.name,language:Y.lang||"",quality:"default"}));return[]}};var n=[],TZ=!0,_Z,NZ,o={async report(Z){if(Q("crashReporter")){await window.craft.crashReporter.report(Z);return}if(!TZ)return;let Y=Z instanceof Error?{timestamp:Date.now(),severity:"error",message:Z.message,source:"js",stack:Z.stack||"",userId:_Z,appVersion:NZ}:{timestamp:Date.now(),severity:Z.severity||"error",message:Z.message||"",source:Z.source||"js",stack:Z.stack||"",userId:_Z,appVersion:NZ};if(n.length>=64)n.shift();n.push(Y)},async flush(){if(Q("crashReporter"))return await window.craft.crashReporter.flush();return[...n]},async clear(){if(Q("crashReporter")){await window.craft.crashReporter.clear();return}n.length=0},async setEnabled(Z){if(Q("crashReporter")){await window.craft.crashReporter.setEnabled(Z);return}TZ=Z},async isEnabled(){if(Q("crashReporter"))return await window.craft.crashReporter.isEnabled();return TZ},async setUser(Z){if(Q("crashReporter")){await window.craft.crashReporter.setUser(Z);return}_Z=Z||void 0},async setAppVersion(Z){if(Q("crashReporter")){await window.craft.crashReporter.setAppVersion(Z);return}NZ=Z||void 0},attachGlobalHandlers(){if(Q("crashReporter")&&window.craft.crashReporter.attachGlobalHandlers)return window.craft.crashReporter.attachGlobalHandlers();if(typeof window>"u")return()=>{};let Z=($)=>{o.report({severity:"error",message:$.message,source:"js",stack:$.error?.stack||`${$.message}
895
- at ${$.filename}:${$.lineno}:${$.colno}`}).catch(()=>{})},Y=($)=>{let J=$.reason;o.report({severity:"error",message:J?.message||String(J),source:"js",stack:J?.stack||""}).catch(()=>{})};return window.addEventListener("error",Z),window.addEventListener("unhandledrejection",Y),()=>{window.removeEventListener("error",Z),window.removeEventListener("unhandledrejection",Y)}},forwardTo(Z){return u8(Z)}},f8="craft:crashReporter:pending",v8=/[\w.+-]+@[\w-]+\.[\w.-]+/g,y8=/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,g8=/\/(?:Users|home)\/[^\s/'"`]+/g;function R4(Z){let Y=($)=>$.replace(v8,"<email>").replace(y8,"<ip>").replace(g8,"/<home>");return{...Z,message:Y(Z.message),stack:Y(Z.stack)}}async function K4(Z,Y){let $=new TextEncoder,J=await crypto.subtle.importKey("raw",$.encode(Z),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),G=await crypto.subtle.sign("HMAC",J,$.encode(Y));return[...new Uint8Array(G)].map((X)=>X.toString(16).padStart(2,"0")).join("")}function b8(Z){if(!Z||typeof localStorage>"u")return[];try{let Y=localStorage.getItem(Z);if(!Y)return[];let $=JSON.parse(Y);return Array.isArray($)?$:[]}catch{return[]}}function O4(Z,Y){if(!Z||typeof localStorage>"u")return;try{if(Y.length===0)localStorage.removeItem(Z);else localStorage.setItem(Z,JSON.stringify(Y))}catch{}}function u8(Z){let{endpoint:Y,intervalMs:$=60000,signingSecret:J,redact:G=!0,headers:X={},maxRetries:O=5,persistKey:z}=Z,F=z===null?null:z??f8,R=b8(F),j=!1,V=null,K=null,U=typeof G==="function"?G:G===!1?(N)=>N:R4;async function L(N){let E=JSON.stringify({entries:N}),S={"Content-Type":"application/json",...X};if(J)S["X-Craft-Signature"]=await K4(J,E);let i=0,w=1000;while(!j)try{let b=await fetch(Y,{method:"POST",headers:S,body:E});if(b.ok)return;if(b.status>=400&&b.status<500)return;throw Error(`HTTP ${b.status}`)}catch(b){if(i+=1,i>O)throw R=[...N,...R],O4(F,R),b;await new Promise((W4)=>{setTimeout(W4,w)}),w=Math.min(w*2,60000)}}async function _(){if(j||K)return K??void 0;let N=await o.flush();if(N.length>0)await o.clear();if(R=[...R,...N.map((S)=>U(S))],R.length===0)return;let E=R;return R=[],O4(F,R),K=L(E).catch(()=>{}).finally(()=>{K=null}),K}if($>0)V=setInterval(()=>{_().catch(()=>{})},$);return{async flushNow(){await _()},stop(){if(j=!0,V)clearInterval(V);V=null},pending(){return[...R]}}}var m8={async isAvailable(){if(!Q("iap"))return!1;return await window.craft.iap.isAvailable()},async getProducts(Z){if(!Q("iap"))return[];let Y=Array.isArray(Z)?Z:[String(Z)];return await window.craft.iap.getProducts(Y)},async purchase(Z){if(!Q("iap"))return{queued:!1,productId:Z,reason:"IAP bridge not available"};let Y=await window.craft.iap.purchase(Z);return{queued:!!(Y&&Y.queued),productId:Y?.productId,reason:Y?.reason}},async restorePurchases(){if(!Q("iap"))return{ok:!1};let Z=await window.craft.iap.restorePurchases();return{ok:!!(Z&&Z.ok)}},async finishTransaction(Z){if(!Q("iap"))return;await window.craft.iap.finishTransaction(Z)},async getReceiptData(){if(!Q("iap"))return null;let Z=await window.craft.iap.getReceiptData();return Z?String(Z):null},onPurchased(Z){return P("craft:iap:purchased",Z)},onFailed(Z){return P("craft:iap:failed",Z)},onRestored(Z){return P("craft:iap:restored",Z)},onProductsLoaded(Z){return P("craft:iap:productsLoaded",(Y)=>Z(Y.products||[]))},onRefunded(Z){return P("craft:iap:refunded",Z)},onSubscriptionStatusChanged(Z){return P("craft:iap:subscriptionStatusChanged",Z)},async getActiveSubscriptions(){if(!Q("iap"))return[];let Z=window.craft.iap.getActiveSubscriptions;if(typeof Z!=="function")return[];let Y=await Z();return Array.isArray(Y)?Y:[]},async isEligibleForIntroOffer(Z){if(!Q("iap"))return!1;let Y=window.craft.iap.isEligibleForIntroOffer;if(typeof Y!=="function")return!1;return!!await Y(Z)}};var a={async startActivity(Z,Y){if(!Z)throw Error("handoff.startActivity: type is required");if(!Q("handoff"))return!1;let $=await window.craft.handoff.startActivity(Z,Y);return typeof $==="boolean"?$:!!($&&$.ok)},async updateActivity(Z){if(!Q("handoff"))return!1;let Y=await window.craft.handoff.updateActivity(Z);return typeof Y==="boolean"?Y:!!(Y&&Y.ok)},async stopActivity(){if(!Q("handoff"))return;await window.craft.handoff.stopActivity()},async getCurrentActivity(){if(!Q("handoff"))return null;let Z=await window.craft.handoff.getCurrentActivity();return Z&&typeof Z.type==="string"?Z:null},onIncoming(Z){return P("craft:handoff:incoming",Z)}};var h8={async start(Z,Y){return a.startActivity(Z,{title:Y?.title,webpageURL:Y?.webpageURL,userInfo:Y?.state})},async update(Z){return a.updateActivity({title:Z.title,webpageURL:Z.webpageURL,userInfo:Z.state})},async stop(){await a.stopActivity()}};var c8={async requestPermission(Z="whenInUse"){if(Q("location"))return await window.craft.location.requestPermission(Z);if(typeof navigator<"u"&&navigator.geolocation)return"undetermined";return"not-supported"},async getAuthorization(){if(Q("location"))return await window.craft.location.getAuthorization();return"unknown"},async getCurrentLocation(){if(Q("location"))return await window.craft.location.getCurrentLocation();if(typeof navigator<"u"&&navigator.geolocation)return navigator.geolocation.getCurrentPosition((Z)=>{window.dispatchEvent(new CustomEvent("craft:location:update",{detail:{latitude:Z.coords.latitude,longitude:Z.coords.longitude,altitude:Z.coords.altitude,horizontalAccuracy:Z.coords.accuracy,verticalAccuracy:Z.coords.altitudeAccuracy,speed:Z.coords.speed}}))},(Z)=>{window.dispatchEvent(new CustomEvent("craft:location:error",{detail:{message:Z.message||String(Z)}}))}),{requested:!0};return{requested:!1}},async startWatching(Z){if(Q("location"))return await window.craft.location.startWatching(Z);if(typeof navigator<"u"&&navigator.geolocation){let Y=navigator.geolocation.watchPosition(($)=>{window.dispatchEvent(new CustomEvent("craft:location:update",{detail:{latitude:$.coords.latitude,longitude:$.coords.longitude,altitude:$.coords.altitude,horizontalAccuracy:$.coords.accuracy,verticalAccuracy:$.coords.altitudeAccuracy,speed:$.coords.speed}}))});return window.__craftWebLocationWatchId=Y,!0}return!1},async stopWatching(){if(Q("location")){await window.craft.location.stopWatching();return}if(typeof navigator<"u"&&navigator.geolocation){let Z=window.__craftWebLocationWatchId;if(Z!=null)navigator.geolocation.clearWatch(Z),window.__craftWebLocationWatchId=null}},onUpdate(Z){return P("craft:location:update",Z)},onError(Z){return P("craft:location:error",Z)},onAuthChanged(Z){return P("craft:location:authChanged",Z)}};var p8={async captureScreen(){if(!Q("screenCapture"))return null;let Z=await window.craft.screenCapture.captureScreen();return Z?String(Z):null},async captureWindow(Z){if(!Q("screenCapture"))return null;if(!Number.isFinite(Z)||Z<=0)throw Error("captureWindow: id must be a positive number");let Y=await window.craft.screenCapture.captureWindow(Z);return Y?String(Y):null},async listWindows(){if(!Q("screenCapture"))return[];return await window.craft.screenCapture.listWindows()}};var V4=250,q4=60000,EZ=2000,j4={sharing:!1,signals:{systemScreenShare:!1,remoteSession:!1,conferenceSharing:!1,screenRecording:!1},sources:[]};function l8(){return{...j4,signals:{...j4.signals},sources:[]}}var XZ={async getState(){if(!Q("screenSharing"))return l8();return await window.craft.screenSharing.getState()},async watch(Z=EZ){let Y=Math.min(q4,Math.max(V4,Math.round(Z)));if(!Q("screenSharing"))return Y;let $=await window.craft.screenSharing.watch(Y);return $&&$.intervalMs||Y},async stop(){if(!Q("screenSharing"))return;await window.craft.screenSharing.unwatch()},onChange(Z){return P("craft:screenSharing:change",Z)}};async function d8(Z,Y=EZ){let $=XZ.onChange(Z);return await XZ.watch(Y),()=>{$(),XZ.stop()}}var r8={supported:!1,isFocused:null,authorization:"unsupported"};function P4(){return{ok:!1,error:"Focus control is only available in a Craft window on macOS"}}var AZ={async getStatus(){if(!Q("focus"))return{...r8};return await window.craft.focus.getStatus()},async requestAuthorization(){if(!Q("focus"))return"unsupported";return await window.craft.focus.requestAuthorization()},async setEnabled(Z,Y={}){if(!Q("focus"))return P4();if(!(Z?Y.onShortcut:Y.offShortcut))return{ok:!1,error:`focus.setEnabled: no ${Z?"onShortcut":"offShortcut"} configured`};return await window.craft.focus.setEnabled(Z,Y)},async runShortcut(Z){if(!Q("focus"))return P4();if(!Z)throw Error("focus.runShortcut: name is required");return await window.craft.focus.runShortcut(Z)},async listShortcuts(){if(!Q("focus"))return[];return await window.craft.focus.listShortcuts()},async listShortcutsResult(){if(!Q("focus"))return{canList:!1,shortcuts:[]};let Z=await window.craft.focus.listShortcutsResult();return{canList:Boolean(Z?.canList),shortcuts:Z?.shortcuts||[]}}};async function n8(...Z){if(Z.length===0)return!1;let Y=new Set(await AZ.listShortcuts());return Z.every(($)=>Y.has($))}async function o8(...Z){if(Z.length===0)return!1;let{canList:Y,shortcuts:$}=await AZ.listShortcutsResult();if(!Y)return"unknown";let J=new Set($);return Z.every((G)=>J.has(G))}var a8={async start(Z=0,Y="127.0.0.1"){if(!Q("localServer"))return{port:0,started:!1,reason:"bridge unavailable"};return await window.craft.localServer.start(Z,Y)},async stop(){if(!Q("localServer"))return;await window.craft.localServer.stop()},async respond(Z){if(!Q("localServer"))return;await window.craft.localServer.respond(Z||{status:200,body:"OK"})},onRequest(Z){return P("craft:localServer:request",Z)},async awaitOAuthCallback(Z={}){M("localServer");let{port:Y=0,host:$="127.0.0.1",timeoutMs:J=300000,successHTML:G}=Z,X=await this.start(Y,$);if(!X.started)throw Error(`localServer: start failed${X.reason?` \u2014 ${X.reason}`:""}`);return new Promise((O,z)=>{let F=setTimeout(()=>{R(),this.stop().catch(()=>{}),z(Error("localServer: OAuth callback timed out"))},J),R=this.onRequest(({url:j})=>{clearTimeout(F),R();let V=G??`<!doctype html><meta charset="utf-8"><title>Done</title>
895
+ at ${$.filename}:${$.lineno}:${$.colno}`}).catch(()=>{})},Y=($)=>{let J=$.reason;o.report({severity:"error",message:J?.message||String(J),source:"js",stack:J?.stack||""}).catch(()=>{})};return window.addEventListener("error",Z),window.addEventListener("unhandledrejection",Y),()=>{window.removeEventListener("error",Z),window.removeEventListener("unhandledrejection",Y)}},forwardTo(Z){return u8(Z)}},f8="craft:crashReporter:pending",v8=/[\w.+-]+@[\w-]+\.[\w.-]+/g,y8=/\b(?:\d{1,3}\.){3}\d{1,3}\b/g,g8=/\/(?:Users|home)\/[^\s/'"`]+/g;function R4(Z){let Y=($)=>$.replace(v8,"<email>").replace(y8,"<ip>").replace(g8,"/<home>");return{...Z,message:Y(Z.message),stack:Y(Z.stack)}}async function K4(Z,Y){let $=new TextEncoder,J=await crypto.subtle.importKey("raw",$.encode(Z),{name:"HMAC",hash:"SHA-256"},!1,["sign"]),G=await crypto.subtle.sign("HMAC",J,$.encode(Y));return[...new Uint8Array(G)].map((X)=>X.toString(16).padStart(2,"0")).join("")}function b8(Z){if(!Z||typeof localStorage>"u")return[];try{let Y=localStorage.getItem(Z);if(!Y)return[];let $=JSON.parse(Y);return Array.isArray($)?$:[]}catch{return[]}}function O4(Z,Y){if(!Z||typeof localStorage>"u")return;try{if(Y.length===0)localStorage.removeItem(Z);else localStorage.setItem(Z,JSON.stringify(Y))}catch{}}function u8(Z){let{endpoint:Y,intervalMs:$=60000,signingSecret:J,redact:G=!0,headers:X={},maxRetries:O=5,persistKey:z}=Z,F=z===null?null:z??f8,R=b8(F),j=!1,V=null,K=null,U=typeof G==="function"?G:G===!1?(N)=>N:R4;async function L(N){let E=JSON.stringify({entries:N}),S={"Content-Type":"application/json",...X};if(J)S["X-Craft-Signature"]=await K4(J,E);let i=0,w=1000;while(!j)try{let b=await fetch(Y,{method:"POST",headers:S,body:E});if(b.ok)return;if(b.status>=400&&b.status<500)return;throw Error(`HTTP ${b.status}`)}catch(b){if(i+=1,i>O)throw R=[...N,...R],O4(F,R),b;await new Promise((W4)=>{setTimeout(W4,w)}),w=Math.min(w*2,60000)}}async function _(){if(j||K)return K??void 0;let N=await o.flush();if(N.length>0)await o.clear();if(R=[...R,...N.map((S)=>U(S))],R.length===0)return;let E=R;return R=[],O4(F,R),K=L(E).catch(()=>{}).finally(()=>{K=null}),K}if($>0)V=setInterval(()=>{_().catch(()=>{})},$);return{async flushNow(){await _()},stop(){if(j=!0,V)clearInterval(V);V=null},pending(){return[...R]}}}var m8={async isAvailable(){if(!Q("iap"))return!1;return await window.craft.iap.isAvailable()},async getProducts(Z){if(!Q("iap"))return[];let Y=Array.isArray(Z)?Z:[String(Z)];return await window.craft.iap.getProducts(Y)},async purchase(Z){if(!Q("iap"))return{queued:!1,productId:Z,reason:"IAP bridge not available"};let Y=await window.craft.iap.purchase(Z);return{queued:!!(Y&&Y.queued),productId:Y?.productId,reason:Y?.reason}},async restorePurchases(){if(!Q("iap"))return{ok:!1};let Z=await window.craft.iap.restorePurchases();return{ok:!!(Z&&Z.ok)}},async finishTransaction(Z){if(!Q("iap"))return;await window.craft.iap.finishTransaction(Z)},async getReceiptData(){if(!Q("iap"))return null;let Z=await window.craft.iap.getReceiptData();return Z?String(Z):null},onPurchased(Z){return P("craft:iap:purchased",Z)},onFailed(Z){return P("craft:iap:failed",Z)},onRestored(Z){return P("craft:iap:restored",Z)},onProductsLoaded(Z){return P("craft:iap:productsLoaded",(Y)=>Z(Y.products||[]))},onRefunded(Z){return P("craft:iap:refunded",Z)},onSubscriptionStatusChanged(Z){return P("craft:iap:subscriptionStatusChanged",Z)},async getActiveSubscriptions(){if(!Q("iap"))return[];let Z=window.craft.iap.getActiveSubscriptions;if(typeof Z!=="function")return[];let Y=await Z();return Array.isArray(Y)?Y:[]},async isEligibleForIntroOffer(Z){if(!Q("iap"))return!1;let Y=window.craft.iap.isEligibleForIntroOffer;if(typeof Y!=="function")return!1;return!!await Y(Z)}};var a={async startActivity(Z,Y){if(!Z)throw Error("handoff.startActivity: type is required");if(!Q("handoff"))return!1;let $=await window.craft.handoff.startActivity(Z,Y);return typeof $==="boolean"?$:!!($&&$.ok)},async updateActivity(Z){if(!Q("handoff"))return!1;let Y=await window.craft.handoff.updateActivity(Z);return typeof Y==="boolean"?Y:!!(Y&&Y.ok)},async stopActivity(){if(!Q("handoff"))return;await window.craft.handoff.stopActivity()},async getCurrentActivity(){if(!Q("handoff"))return null;let Z=await window.craft.handoff.getCurrentActivity();return Z&&typeof Z.type==="string"?Z:null},onIncoming(Z){return P("craft:handoff:incoming",Z)}};var h8={async start(Z,Y){return a.startActivity(Z,{title:Y?.title,webpageURL:Y?.webpageURL,userInfo:Y?.state})},async update(Z){return a.updateActivity({title:Z.title,webpageURL:Z.webpageURL,userInfo:Z.state})},async stop(){await a.stopActivity()}};var c8={async requestPermission(Z="whenInUse"){if(Q("location"))return await window.craft.location.requestPermission(Z);if(typeof navigator<"u"&&navigator.geolocation)return"undetermined";return"not-supported"},async getAuthorization(){if(Q("location"))return await window.craft.location.getAuthorization();return"unknown"},async getCurrentLocation(){if(Q("location"))return await window.craft.location.getCurrentLocation();if(typeof navigator<"u"&&navigator.geolocation)return navigator.geolocation.getCurrentPosition((Z)=>{window.dispatchEvent(new CustomEvent("craft:location:update",{detail:{latitude:Z.coords.latitude,longitude:Z.coords.longitude,altitude:Z.coords.altitude,horizontalAccuracy:Z.coords.accuracy,verticalAccuracy:Z.coords.altitudeAccuracy,speed:Z.coords.speed}}))},(Z)=>{window.dispatchEvent(new CustomEvent("craft:location:error",{detail:{message:Z.message||String(Z)}}))}),{requested:!0};return{requested:!1}},async startWatching(Z){if(Q("location"))return await window.craft.location.startWatching(Z);if(typeof navigator<"u"&&navigator.geolocation){let Y=navigator.geolocation.watchPosition(($)=>{window.dispatchEvent(new CustomEvent("craft:location:update",{detail:{latitude:$.coords.latitude,longitude:$.coords.longitude,altitude:$.coords.altitude,horizontalAccuracy:$.coords.accuracy,verticalAccuracy:$.coords.altitudeAccuracy,speed:$.coords.speed}}))});return window.__craftWebLocationWatchId=Y,!0}return!1},async stopWatching(){if(Q("location")){await window.craft.location.stopWatching();return}if(typeof navigator<"u"&&navigator.geolocation){let Z=window.__craftWebLocationWatchId;if(Z!=null)navigator.geolocation.clearWatch(Z),window.__craftWebLocationWatchId=null}},onUpdate(Z){return P("craft:location:update",Z)},onError(Z){return P("craft:location:error",Z)},onAuthChanged(Z){return P("craft:location:authChanged",Z)}};var p8={async captureScreen(){if(!Q("screenCapture"))return null;let Z=await window.craft.screenCapture.captureScreen();return Z?String(Z):null},async captureWindow(Z){if(!Q("screenCapture"))return null;if(!Number.isFinite(Z)||Z<=0)throw Error("captureWindow: id must be a positive number");let Y=await window.craft.screenCapture.captureWindow(Z);return Y?String(Y):null},async listWindows(){if(!Q("screenCapture"))return[];return await window.craft.screenCapture.listWindows()}};var V4=250,q4=60000,EZ=2000,j4={sharing:!1,signals:{systemScreenShare:!1,remoteSession:!1,conferenceSharing:!1,screenRecording:!1},sources:[]};function l8(){return{...j4,signals:{...j4.signals},sources:[]}}var XZ={async getState(){if(!Q("screenSharing"))return l8();return await window.craft.screenSharing.getState()},async watch(Z=EZ){let Y=Math.min(q4,Math.max(V4,Math.round(Z)));if(!Q("screenSharing"))return Y;let $=await window.craft.screenSharing.watch(Y);return $&&$.intervalMs||Y},async stop(){if(!Q("screenSharing"))return;await window.craft.screenSharing.unwatch()},onChange(Z){return P("craft:screenSharing:change",Z)}};async function d8(Z,Y=EZ){let $=XZ.onChange(Z);return await XZ.watch(Y),()=>{$(),XZ.stop()}}var r8={supported:!1,isFocused:null,authorization:"unsupported"};function P4(){return{ok:!1,error:"Focus control is only available in a Craft window on macOS"}}var AZ={async getStatus(){if(!Q("focus"))return{...r8};return await window.craft.focus.getStatus()},async requestAuthorization(){if(!Q("focus"))return"unsupported";return await window.craft.focus.requestAuthorization()},async setEnabled(Z,Y={}){if(!Q("focus"))return P4();if(!(Z?Y.onShortcut:Y.offShortcut))return{ok:!1,error:`focus.setEnabled: no ${Z?"onShortcut":"offShortcut"} configured`};return await window.craft.focus.setEnabled(Z,Y)},async runShortcut(Z){if(!Q("focus"))return P4();if(!Z)throw Error("focus.runShortcut: name is required");return await window.craft.focus.runShortcut(Z)},async listShortcuts(){if(!Q("focus"))return[];return await window.craft.focus.listShortcuts()},async listShortcutsResult(){if(!Q("focus"))return{canList:!1,shortcuts:[]};let Y=await window.craft.focus.listShortcutsResult?.();return{canList:Boolean(Y?.canList),shortcuts:Y?.shortcuts??[]}}};async function n8(...Z){if(Z.length===0)return!1;let Y=new Set(await AZ.listShortcuts());return Z.every(($)=>Y.has($))}async function o8(...Z){if(Z.length===0)return!1;let{canList:Y,shortcuts:$}=await AZ.listShortcutsResult();if(!Y)return"unknown";let J=new Set($);return Z.every((G)=>J.has(G))}var a8={async start(Z=0,Y="127.0.0.1"){if(!Q("localServer"))return{port:0,started:!1,reason:"bridge unavailable"};return await window.craft.localServer.start(Z,Y)},async stop(){if(!Q("localServer"))return;await window.craft.localServer.stop()},async respond(Z){if(!Q("localServer"))return;await window.craft.localServer.respond(Z||{status:200,body:"OK"})},onRequest(Z){return P("craft:localServer:request",Z)},async awaitOAuthCallback(Z={}){M("localServer");let{port:Y=0,host:$="127.0.0.1",timeoutMs:J=300000,successHTML:G}=Z,X=await this.start(Y,$);if(!X.started)throw Error(`localServer: start failed${X.reason?` \u2014 ${X.reason}`:""}`);return new Promise((O,z)=>{let F=setTimeout(()=>{R(),this.stop().catch(()=>{}),z(Error("localServer: OAuth callback timed out"))},J),R=this.onRequest(({url:j})=>{clearTimeout(F),R();let V=G??`<!doctype html><meta charset="utf-8"><title>Done</title>
896
896
  <style>body{font-family:-apple-system,BlinkMacSystemFont,sans-serif;display:flex;align-items:center;justify-content:center;height:100vh;margin:0;background:#f5f5f7}</style>
897
897
  <div><h1>You can close this tab.</h1><p>Returning to the app\u2026</p></div>
898
898
  <script>setTimeout(()=>window.close(),1500)</script>`;this.respond({status:200,body:V,contentType:"text/html; charset=utf-8"}).catch(()=>{}).finally(()=>this.stop().catch(()=>{})),O({url:j,port:X.port})})})}};var i8={async isAvailable(){if(!Q("biometric"))return!1;return await window.craft.biometric.isAvailable()},async getBiometryType(){if(!Q("biometric"))return"none";return await window.craft.biometric.getBiometryType()},async evaluate(Z,Y){if(!Z)throw Error("biometric.evaluate: reason is required");if(!Q("biometric"))return{success:!1,errorCode:-1};return await window.craft.biometric.evaluate(Z,Y)}};var k=null,s8={async play(Z,Y){if(Q("audio"))return await window.craft.audio.play(Z,Y);if(typeof window>"u"||typeof Audio>"u")return!1;if(k)k.pause(),k=null;if(k=new Audio(Z),Y?.volume!=null)k.volume=Y.volume;if(Y?.loops)k.loop=!0;try{return await k.play(),!0}catch{return!1}},async playSystemSound(Z){if(Q("audio"))return await window.craft.audio.playSystemSound(Z);if(typeof window>"u"||typeof Audio>"u")return!1;try{return k=new Audio(`/System/Library/Sounds/${Z}.aiff`),await k.play(),!0}catch{return!1}},async stop(){if(Q("audio")){await window.craft.audio.stop();return}if(k)k.pause(),k.currentTime=0,k=null},async isPlaying(){if(Q("audio"))return await window.craft.audio.isPlaying();return!!(k&&!k.paused)},async startRecording(Z,Y){if(Q("audio"))return await window.craft.audio.startRecording(Z,Y);return!1},async stopRecording(){if(Q("audio"))await window.craft.audio.stopRecording()},async isRecording(){if(Q("audio"))return await window.craft.audio.isRecording();return!1}};var t8={async execute(Z){if(!Z)throw Error("appleScript.execute: source is required");if(!Q("appleScript"))return{ok:!1};return await window.craft.appleScript.execute(Z)}};var e8={async getDefault(Z){if(!Z)throw Error("fileAssociations.getDefault: uti is required");if(!Q("fileAssociations"))return null;let Y=await window.craft.fileAssociations.getDefault(Z);return Y?String(Y):null},async setDefault(Z,Y){if(!Z||!Y)throw Error("fileAssociations.setDefault: uti and bundleId are required");if(!Q("fileAssociations"))return!1;return await window.craft.fileAssociations.setDefault(Z,Y)}};var Z9={async get(Z){if(!Z)throw Error("tags.get: path is required");if(!Q("tags"))return[];return await window.craft.tags.get(Z)},async set(Z,Y){if(!Z)throw Error("tags.set: path is required");if(!Q("tags"))return!1;let $=Array.isArray(Y)?Y:[String(Y)];return await window.craft.tags.set(Z,$)},async clear(Z){if(!Z)throw Error("tags.clear: path is required");if(!Q("tags"))return!1;return await window.craft.tags.clear(Z)}};var Y9={async countPages(Z){if(!Z)throw Error("pdf.countPages: path is required");if(!Q("pdf"))return 0;return await window.craft.pdf.countPages(Z)},async extractText(Z){if(!Z)throw Error("pdf.extractText: path is required");if(!Q("pdf"))return"";return await window.craft.pdf.extractText(Z)}};var $9={async debug(Z){if(Q("log"))await window.craft.log.debug(Z);else console.debug(Z)},async info(Z){if(Q("log"))await window.craft.log.info(Z);else console.info(Z)},async warn(Z){if(Q("log"))await window.craft.log.warn(Z);else console.warn(Z)},async error(Z){if(Q("log"))await window.craft.log.error(Z);else console.error(Z)}};var J9={async browse(Z){if(!Q("bonjour"))return{started:!1,reason:"bridge unavailable"};return await window.craft.bonjour.browse(Z)},async stop(){if(Q("bonjour"))await window.craft.bonjour.stop()},onFound(Z){return P("craft:bonjour:found",Z)},onLost(Z){return P("craft:bonjour:lost",Z)}};var Q9={async index(Z){if(!Q("spotlight"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.spotlight.index(Z)},async remove(Z){if(!Q("spotlight"))return{ok:!1};return await window.craft.spotlight.remove(Z)},async removeAll(){if(!Q("spotlight"))return{ok:!1};return await window.craft.spotlight.removeAll()}};var G9={async isAvailable(){if(!Q("speechRecognition"))return!1;return await window.craft.speechRecognition.isAvailable()},async start(Z){if(!Q("speechRecognition"))return{started:!1,reason:"bridge unavailable"};return await window.craft.speechRecognition.start(Z)},async stop(){if(Q("speechRecognition"))await window.craft.speechRecognition.stop()},onPartial(Z){return P("craft:speechRecognition:partial",Z)},onFinal(Z){return P("craft:speechRecognition:final",Z)}};var X9={async recognizeText(Z){if(!Z)throw Error("vision.recognizeText: path is required");if(!Q("vision"))return[];return await window.craft.vision.recognizeText(Z)},async detectFaces(Z){if(!Z)throw Error("vision.detectFaces: path is required");if(!Q("vision"))return[];return await window.craft.vision.detectFaces(Z)},async detectBarcodes(Z){if(!Z)throw Error("vision.detectBarcodes: path is required");if(!Q("vision"))return[];return await window.craft.vision.detectBarcodes(Z)}};var z9={async listSources(){if(!Q("midi"))return[];return await window.craft.midi.listSources()},async listDestinations(){if(!Q("midi"))return[];return await window.craft.midi.listDestinations()},async send(Z,Y){if(!Q("midi"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.midi.send(Z,Y)},async subscribe(Z){if(!Q("midi"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.midi.subscribe(Z)},async unsubscribe(Z){if(!Q("midi"))return{ok:!1};return await window.craft.midi.unsubscribe(Z)},onMessage(Z){return P("craft:midi:message",Z)}};var F9={async loadModel(Z,Y){if(!Z||!Y)throw Error("coreml.loadModel: id and path are required");if(!Q("coreml"))return!1;return await window.craft.coreml.loadModel(Z,Y)},async unloadModel(Z){if(!Q("coreml"))return;await window.craft.coreml.unloadModel(Z)},async predict(Z,Y){if(!Z)throw Error("coreml.predict: id is required");if(!Q("coreml"))return null;return await window.craft.coreml.predict(Z,Y)}};var O9={async listCameras(){if(!Q("continuityCamera"))return[];return await window.craft.continuityCamera.listCameras()}};var R9={async register(Z){if(!Z)throw Error("serviceMenu.register: name is required");if(!Q("serviceMenu"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.serviceMenu.register(Z)},async unregister(Z){if(!Z)throw Error("serviceMenu.unregister: name is required");if(!Q("serviceMenu"))return;await window.craft.serviceMenu.unregister(Z)},onInvoked(Z){return P("craft:serviceMenu:invoked",Z)}};var K9={async list(){if(!Q("serial"))return[];return await window.craft.serial.list()},async open(Z,Y=9600){if(!Z)throw Error("serial.open: path is required");if(!Q("serial"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.serial.open(Z,Y)},async write(Z,Y){if(!Z)throw Error("serial.write: id is required");if(!Q("serial"))return{ok:!1,reason:"bridge unavailable"};return await window.craft.serial.write(Z,Y)},async close(Z){if(!Q("serial"))return;await window.craft.serial.close(Z)},onData(Z){return P("craft:serial:data",Z)}};var U4=[{name:"fs",support:"native"},{name:"shell",support:"native"},{name:"system",support:"all"},{name:"clipboard",support:"all"},{name:"dialog",support:"all"},{name:"window",support:"native"},{name:"tray",support:"native"},{name:"menu",support:"native"},{name:"theme",support:"all"},{name:"screen",support:"all"},{name:"network",support:"all"},{name:"power",support:"all"},{name:"battery",support:"all"},{name:"notifications",support:"all"},{name:"globalShortcuts",support:"native"},{name:"autolaunch",support:"native"},{name:"appInfo",support:"all"},{name:"localServer",support:"native"},{name:"bluetooth",support:"native"},{name:"crashReporter",support:"all"},{name:"updater",support:"native"},{name:"iap",support:"macos"},{name:"keychain",support:"native"},{name:"log",support:"all"},{name:"biometric",support:"macos"},{name:"location",support:"macos"},{name:"audio",support:"macos"},{name:"deepLink",support:"native"},{name:"handoff",support:"macos"},{name:"liveActivities",support:"macos"},{name:"touchbar",support:"macos"},{name:"dragOut",support:"macos"},{name:"appleScript",support:"macos"},{name:"fileAssociations",support:"native"},{name:"tags",support:"macos"},{name:"pdf",support:"macos"},{name:"bonjour",support:"macos"},{name:"spotlight",support:"macos"},{name:"speechRecognition",support:"macos"},{name:"vision",support:"macos"},{name:"midi",support:"macos"},{name:"coreml",support:"macos"},{name:"continuityCamera",support:"macos"},{name:"serviceMenu",support:"macos"},{name:"serial",support:"native"}];function j9(){return U4.map(({name:Z,support:Y})=>({name:Z,support:Y,available:Q(Z)}))}function L4(Z){let Y=U4.find(($)=>$.name===Z);if(!Y)return;return{...Y,available:Q(Z)}}function V9(Z){let Y=L4(Z);return!!Y&&Y.available}export{W8 as windowEvents,d8 as watchScreenSharing,X9 as vision,L8 as updater,Z4 as unregisterHotkey,d6 as unregisterAllHotkeys,gY as triggerTrayAction,C8 as touchbar,R8 as theme,Z9 as tags,T8 as system,Q9 as spotlight,G9 as speechRecognition,B8 as speech,K4 as signPayload,H4 as showWarningToast,TY as showWarningModal,nY as showWarningDialog,p as showToast,k4 as showSuccessToast,NY as showSuccessModal,cY as showSaveDialog,IZ as showQuestionModal,hY as showOpenDialog,u as showModal,l as showMessageBox,A4 as showInfoToast,CZ as showInfoModal,x4 as showErrorToast,_Y as showErrorModal,rY as showErrorDialog,dY as showConfirmDialog,pY as showColorPicker,lY as showAlertDialog,FZ as showAlert,F8 as shell,eY as setDesktopConfig,g6 as setAutoLaunch,R9 as serviceMenu,K9 as serial,XZ as screenSharing,p8 as screenCapture,_8 as screen,q6 as resolveCraftBinary,Y6 as resetDesktopConfig,M4 as requestNotificationPermission,l6 as registerHotkey,R4 as redactPII,kY as prompt,H8 as printing,E8 as permissions,Y9 as pdf,tZ as parseShortcut,j6 as packageApp,K6 as pack,z6 as openDevWindow,C4 as notify,Z8 as notifications,U8 as network,x8 as nativeAutoLaunch,z9 as midi,M8 as menu,$9 as log,c8 as location,a8 as localServer,h8 as liveActivities,N8 as keychain,O6 as isWebviewAvailable,V8 as isDragOutAvailable,W6 as isCaffeinated,V9 as isAvailable,b6 as isAutoLaunchEnabled,m8 as iap,n8 as hasFocusShortcuts,a as handoff,O8 as globalShortcuts,cZ as githubReleaseAssetUrl,hZ as githubLatestAssetUrl,R6 as getWindowBridgeScript,Q6 as getWindow,yY as getTrayInstance,uY as getTrayBridgeScript,bY as getSimulatedTrayHTML,r6 as getRegisteredHotkeys,oY as getDialogBridgeScript,Z6 as getDesktopConfig,L4 as getCapability,j9 as getCapabilities,D6 as getCaffeinateStatus,J6 as getActiveWindowIds,vY as getActiveTrayInstances,HY as getActiveModalCount,w4 as getActiveAlertCount,uZ as generateUpdateManifest,$8 as fs,i6 as formatTime,m6 as formatShortcut,M6 as formatRemainingTime,T6 as formatDuration,s6 as formatCompact,o8 as focusShortcutsReady,AZ as focus,e8 as fileAssociations,j8 as dragOut,S4 as dismissAllAlerts,I4 as dismissAlertById,a6 as delay,q8 as deepLinks,lZ as decaffeinate,F6 as createWindowWithHTML,X6 as createWindow,qY as createWebView,zY as createTreeView,e4 as createTooltip,n6 as createTimer,o4 as createTimePicker,v4 as createTextInput,c4 as createTabs,XY as createTable,yZ as createSystemTray,JY as createStepper,YY as createSplitView,g4 as createSlider,ZY as createScrollView,l4 as createRating,d4 as createRadioButton,b4 as createProgressBar,I6 as createPreferences,QY as createModalComponent,fY as createMenubar,KY as createMediaPlayer,GY as createListView,i4 as createLabel,o6 as createInterval,s4 as createImageView,P6 as createGitHubUpdater,U6 as createGitHubUpdateManifest,VY as createFileExplorer,p4 as createDropdown,n4 as createDatePicker,FY as createDataGrid,r4 as createColorPicker,RY as createCodeEditor,t4 as createChip,y4 as createCheckbox,OY as createChart,h4 as createCard,f4 as createButton,u4 as createBadge,m4 as createAvatar,a4 as createAutocomplete,$Y as createAccordion,o as crashReporter,qZ as craftWindowArguments,V6 as craftBinaryNotFoundMessage,F9 as coreml,O9 as continuityCamera,EY as confirm,G6 as closeAllWindows,xY as closeAllModals,t6 as clipboard,L6 as caffeinate,J9 as bonjour,w8 as bluetooth,i8 as biometric,P8 as battery,s8 as audio,t8 as appleScript,D8 as appInfo,AY as alert,mZ as UPDATE_MANIFEST_ASSET,mY as TRAY_MENU_STYLES,B4 as TOAST_STYLES,CY as MODAL_STYLES,V4 as MIN_WATCH_INTERVAL_MS,q4 as MAX_WATCH_INTERVAL_MS,EZ as DEFAULT_WATCH_INTERVAL_MS,UY as COMPONENT_STYLES,bZ as AutoUpdater,PY as AVAILABLE_COMPONENTS};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{ip as a,jp as b,kp as c,lp as d,mp as e,np as f}from"./chunk-z61y1yv1.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-yjzznatw.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{f as processStackReplacements,e as processStackPushDirectives,d as processIncludes,a as partialsCache,b as onceStore,c as clearOnceStore};
2
+ import{ip as a,jp as b,kp as c,lp as d,mp as e,np as f}from"./chunk-dn8x6vf7.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-8hdb7abn.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{f as processStackReplacements,e as processStackPushDirectives,d as processIncludes,a as partialsCache,b as onceStore,c as clearOnceStore};
@@ -0,0 +1,3 @@
1
+ // @bun
2
+ import{Bg as b,Kg as JJ,yg as t,zg as e}from"./chunk-tgcbjer0.js";import{Nm as u,Om as l,ap as g,fm as y,gm as P,lq as o,pm as x,wm as v}from"./chunk-dn8x6vf7.js";import{Pt as a,qu as s,uu as OJ}from"./chunk-bqdbf8k2.js";import{Eu as R}from"./chunk-q891e1vj.js";import r from"fs";import B from"path";var{serve:IJ}=globalThis.Bun;function q(J,K,Q={}){let X=`${encodeURIComponent(J)}=${encodeURIComponent(K)}`;if(Q.maxAge!==void 0)X+=`; Max-Age=${Q.maxAge}`;if(Q.expires)X+=`; Expires=${Q.expires.toUTCString()}`;if(Q.path)X+=`; Path=${Q.path}`;if(Q.domain)X+=`; Domain=${Q.domain}`;if(Q.secure)X+="; Secure";if(Q.httpOnly)X+="; HttpOnly";if(Q.sameSite)X+=`; SameSite=${Q.sameSite}`;return X}async function KJ(J){let K=J.headers.get("content-type")||"",Q={},X=(Z,$)=>{let G=Q[Z];if(G===void 0)Q[Z]=$;else if(Array.isArray(G))G.push($);else Q[Z]=[G,$]};if(K.includes("multipart/form-data")){let Z=await J.formData();for(let[$,G]of Z.entries())if(typeof G==="string")X($,G);return Q}if(K.includes("application/x-www-form-urlencoded")){for(let[Z,$]of new URLSearchParams(await J.text()).entries())X(Z,$);return Q}return Q}function f(J){if(!J)return!1;let K=J.toUpperCase();return K!=="GET"&&K!=="HEAD"}async function h(J,K={}){let Q=K.request,X=K.method??Q?.method;if(!Q||!f(X))return{ran:!1};if(typeof J.action!=="function")return{ran:!1};let Z={};try{Z=await KJ(Q)}catch{}let $=await J.action({request:Q,form:Z,params:K.params??{},query:J.query??{},cookies:K.cookies??{}});if($&&typeof $==="object"){let G=$,W=QJ(G.cookies),I=G.redirect;if(typeof I==="string"&&I)return{redirect:I,ran:!0,...W.length>0?{cookies:W}:{}};let{cookies:_,redirect:N,...U}=G;if(Object.assign(J,U),W.length>0)return{ran:!0,cookies:W}}return{ran:!0}}function QJ(J){if(!J||typeof J!=="object"||Array.isArray(J))return[];let K=[];for(let[Q,X]of Object.entries(J)){if(!Q)continue;if(typeof X==="string"){K.push(q(Q,X));continue}if(X&&typeof X==="object"){let Z=X;if(typeof Z.value!=="string")continue;K.push(q(Q,Z.value,Z))}}return K}function m(J,K=[],Q){let X=new Headers({Location:J,"Cache-Control":"no-store"});for(let Z of K)X.append("Set-Cookie",Z);for(let[Z,$]of Object.entries(Q??{}))if(Z.toLowerCase()!=="location")X.set(Z,$);return new Response(null,{status:303,headers:X})}async function wJ(J,K={}){return(await c(J,K)).html}async function d(J,K={}){let{html:Q,context:X,redirect:Z,cookies:$}=await c(J,K),G=u(X),W=l(X);if(Z)return{html:Q,redirect:Z,cookies:$,status:G,headers:W};let{extractStreamBoundaries:I}=await import("./chunk-k4ejba6b.js"),_=I(X),N=J.streamTemplates;if(N&&Object.keys(N).length>0){let{processDirectives:U}=await import("./chunk-5n44cxqv.js"),{defaultConfig:z}=await import("./chunk-vmx4f37f.js"),O=X.streamBoundaries||{},w={...z,autoShell:!1},D=Object.keys(N).map((V)=>({id:V,render:async()=>{let F=typeof O[V]==="function"?await O[V]():void 0;return U(N[V],{...X,$boundary:F},J.sourceFile,w,new Set)}})),E=new Set(D.map((V)=>V.id));_=[...(_||[]).filter((V)=>!E.has(V.id)),...D]}return{html:Q,boundaries:_&&_.length>0?_:void 0,cookies:$,status:G,headers:W}}async function c(J,K){let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...K};if(!J.hasServerScripts&&!P(J.html))return{html:J.html,context:Q};for(let $ of J.serverScriptContent)try{await g($,Q,J.sourceFile)}catch(G){console.warn(`[stx] Server script error in ${J.sourceFile}:`,G)}let X=await h(Q,{request:K.request,method:K.method,params:K.params??{},cookies:K.cookies??{}});if(X.redirect)return{html:J.html,context:Q,redirect:X.redirect,cookies:X.cookies};if(!P(J.html))return{html:J.html,context:Q,cookies:X.cookies};let Z=new Map;for(let[$,G]of Object.entries(J.placeholders))if(G.expression)try{let W=v(G.expression,Q);if(G.type==="raw")Z.set($,W!==void 0&&W!==null?String(W):"");else Z.set($,W!==void 0&&W!==null?x(String(W)):"")}catch{Z.set($,"")}return{html:y(J.html,Z),context:Q,cookies:X.cookies}}async function AJ(J,K={}){if(!J.hasServerScripts&&!P(J.fragment))return J.fragment;let Q={__filename:J.sourceFile,__dirname:J.sourceFile.replace(/[/\\][^/\\]+$/,""),...K};for(let Z of J.serverScriptContent)try{await g(Z,Q,J.sourceFile)}catch($){console.warn(`[stx] Server script error in ${J.sourceFile}:`,$)}if(!P(J.fragment))return J.fragment;let X=new Map;for(let[Z,$]of Object.entries(J.placeholders))if($.expression)try{let G=v($.expression,Q);if($.type==="raw")X.set(Z,G!==void 0&&G!==null?String(G):"");else X.set(Z,G!==void 0&&G!==null?x(String(G)):"")}catch{X.set(Z,"")}return y(J.fragment,X)}OJ();import C from"zlib";import{promisify as n}from"util";var XJ=n(C.brotliCompress),ZJ=n(C.gzip),$J=["text/","application/json","application/javascript","application/xml","application/xhtml+xml","application/rss+xml","application/atom+xml","application/manifest+json","image/svg+xml"],GJ=["text/event-stream","multipart/x-mixed-replace"],UJ=1024;function WJ(J){if(!J)return!1;let K=J.toLowerCase();if(GJ.some((Q)=>K.startsWith(Q)))return!1;return $J.some((Q)=>K.startsWith(Q))}function jJ(J){let K=new Map;for(let Q of J.split(",")){let[X,...Z]=Q.trim().split(";"),$=X.trim().toLowerCase();if(!$)continue;let G=1;for(let W of Z){let I=/^\s*q\s*=\s*([\d.]+)\s*$/i.exec(W);if(!I)continue;let _=Number.parseFloat(I[1]);if(Number.isFinite(_))G=_}K.set($,G)}return K}function YJ(J){if(!J)return null;let K=jJ(J),Q=K.get("*"),X=(Z)=>K.get(Z)??Q??0;if(X("br")>0)return"br";if(X("gzip")>0)return"gzip";return null}async function i(J,K,Q={}){if(K.headers.get("content-encoding"))return K;if(K.status===204||K.status===304||!K.body)return K;if(!WJ(K.headers.get("content-type")))return K;let X=YJ(J.headers.get("accept-encoding"));if(!X)return K;let Z;try{Z=new Uint8Array(await K.arrayBuffer())}catch{return K}let $=()=>new Response(Z,{status:K.status,statusText:K.statusText,headers:p(K.headers)});if(Z.length<(Q.threshold??UJ))return $();try{let G=X==="br"?await XJ(Z,{params:{[C.constants.BROTLI_PARAM_QUALITY]:Q.quality??5,[C.constants.BROTLI_PARAM_SIZE_HINT]:Z.length}}):await ZJ(Z);if(G.length>=Z.length)return $();let W=p(K.headers);return W.set("Content-Encoding",X),W.set("Content-Length",String(G.length)),new Response(G,{status:K.status,statusText:K.statusText,headers:W})}catch{return $()}}function p(J){let K=new Headers(J),Q=K.get("Vary");if(!Q)return K.set("Vary","Accept-Encoding"),K;if(!Q.split(",").some((Z)=>Z.trim().toLowerCase()==="accept-encoding"))K.set("Vary",`${Q}, Accept-Encoding`);return K}var _J={".js":"application/javascript",".mjs":"application/javascript",".css":"text/css",".json":"application/json",".html":"text/html",".txt":"text/plain",".xml":"application/xml",".pdf":"application/pdf",".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".avif":"image/avif",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".mp4":"video/mp4",".webm":"video/webm",".ogg":"audio/ogg",".mp3":"audio/mpeg",".wav":"audio/wav",".woff":"font/woff",".woff2":"font/woff2",".ttf":"font/ttf",".otf":"font/otf",".eot":"application/vnd.ms-fontobject"};async function mJ(J={}){let K=B.resolve(J.outputDir||".output"),Q=J.port||3000,X=JJ(K);if(!X)console.error("[stx] No build manifest found. Run `stx build` first."),process.exit(1);console.log(`[stx] Production server loading ${X.routes.length} routes...`);let Z=new Map,$=new Map,G=new Map,W=new Map;for(let U of X.routes)try{let z=B.join(K,U.compiledPath),O=JSON.parse(await Bun.file(z).text());Z.set(U.pattern,O),G.set(U.pattern,s(O.html)),W.set(U.pattern,o(O.html));let w=B.join(K,U.fragmentPath);if(await Bun.file(w).exists())$.set(U.pattern,await Bun.file(w).text())}catch(z){console.warn(`[stx] Failed to load route ${U.pattern}:`,z)}let I=new Map,_=[];for(let U of X.routes)if(U.hasParams){let{regex:z,params:O}=a(U.pattern);_.push({regex:z,route:U,paramNames:O})}else I.set(U.pattern,U);let N=IJ({port:Q,async fetch(U){return i(U,await(async()=>{let O=new URL(U.url).pathname;if(J.onRequest){let j=await J.onRequest(U);if(j)return j}if(J.apiRoutes?.[O])return J.apiRoutes[O](U);if((U.method==="GET"||U.method==="HEAD")&&O!=="/"){let j=B.resolve(K,"public"),Y;try{Y=decodeURIComponent(O)}catch{Y=O}if(!Y.includes("\x00")){let L=B.resolve(j,`.${Y}`);if(L===j||L.startsWith(`${j}${B.sep}`))try{if(r.existsSync(L)&&r.statSync(L).isFile()){let M=B.extname(L).toLowerCase(),S=_J[M]||"application/octet-stream",H=O.startsWith("/__stx/")||/\.[0-9a-f]{8}\./.test(O);return new Response(Bun.file(L),{headers:{"Content-Type":S,"Cache-Control":H?"public, max-age=31536000, immutable":"public, max-age=3600"}})}}catch{}}}let w=e(U),D=null,E={};if(D=I.get(O)||null,!D)for(let{regex:j,route:Y,paramNames:L}of _){let A=O.match(j);if(A){D=Y,L.forEach((M,S)=>{E[M]=A[S+1]});break}}if(!D){let j=I.get("/404")||null;if(j){let Y=Z.get(j.pattern);if(Y)return new Response(Y.html,{status:404,headers:{"Content-Type":"text/html"}})}return new Response("Not Found",{status:404})}if(w){let j=$.get(D.pattern);if(j){let Y=G.get(D.pattern);return new Response(j,{headers:{"Content-Type":"text/html","X-STX-Fragment":"true",...W.has(D.pattern)?{"X-STX-Runtime":W.get(D.pattern)?"true":"false"}:{},...Y?{"X-STX-Layout":Y.layout,"X-STX-Layout-Group":Y.group}:{},...b(),"Cache-Control":t}})}}let V=f(U.method),F=Z.get(D.pattern);if(!F){let j=I.get("/500")||null;if(j){let Y=Z.get(j.pattern);if(Y)return new Response(Y.html,{status:500,headers:{"Content-Type":"text/html"}})}return new Response("Internal Server Error",{status:500})}if(!V&&!F.hasServerScripts&&Object.keys(F.placeholders).length===0)return new Response(F.html,{status:F.status??200,headers:{"Content-Type":"text/html",...b(),"Cache-Control":"public, max-age=60"}});try{let{html:j,boundaries:Y,redirect:L,cookies:A,status:M,headers:S}=await d(F,{params:E,request:U,method:U.method});if(L)return m(L,A,S);if(Y&&Y.length>0){let{renderStreamingPage:T,streamToResponse:k}=await import("./chunk-k4ejba6b.js");return k(T(j,Y,{timeoutMs:30000}),{status:M??F.status??200,headers:{"Cache-Control":"no-cache",...S}})}let H=new Headers({"Content-Type":"text/html",...b(),"Cache-Control":"no-cache"});for(let T of A??[])H.append("Set-Cookie",T);for(let[T,k]of Object.entries(S??{}))H.set(T,k);return new Response(j,{status:M??F.status??200,headers:H})}catch(j){return console.error(`[stx] Hydration error for ${O}:`,j),new Response(F.html,{headers:{"Content-Type":"text/html"}})}})())}});return console.log(`[stx] Production server running at http://localhost:${Q}`),console.log(`[stx] Serving ${X.routes.length} routes (${Z.size} pre-loaded)`),{port:Q,stop:()=>N.stop()}}
3
+ export{WJ as jg,YJ as kg,i as lg,q as mg,KJ as ng,f as og,h as pg,m as qg,wJ as rg,d as sg,AJ as tg,mJ as ug};
@@ -1,2 +1,2 @@
1
1
  // @bun
2
- import{$i as b,_i as a,aj as c}from"./chunk-6ge7t20t.js";import"./chunk-efr3ejqt.js";import"./chunk-z61y1yv1.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-yjzznatw.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};
2
+ import{$i as b,_i as a,aj as c}from"./chunk-h2fq4ksg.js";import"./chunk-efr3ejqt.js";import"./chunk-dn8x6vf7.js";import"./chunk-by2p4by1.js";import"./chunk-a2ppgamd.js";import"./chunk-dmzc008f.js";import"./chunk-nstqd54d.js";import"./chunk-8hdb7abn.js";import"./chunk-kqjxwz6c.js";import"./chunk-t0jzk81v.js";import"./chunk-njc6sven.js";import"./chunk-70v7vvry.js";import"./chunk-myh6j9ab.js";import"./chunk-bqdbf8k2.js";import"./chunk-ge69r310.js";import"./chunk-q891e1vj.js";export{a as listComposableModules,b as getComposableScript,c as clearComposableCache};