@stacksjs/stx 0.2.53 → 0.2.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app-shell.js +1 -1
- package/dist/auth.js +2 -2
- package/dist/build-mode-detector.js +1 -1
- package/dist/build-views.js +1 -1
- package/dist/build.js +1 -1
- package/dist/cli.js +2 -2
- package/dist/component-processing.js +1 -1
- package/dist/component-renderer.js +1 -1
- package/dist/components.js +1 -1
- package/dist/conditionals.js +1 -1
- package/dist/dev-server/index.js +1 -1
- package/dist/dev-server/serve-app.js +1 -1
- package/dist/dev-server/serve-file.js +1 -1
- package/dist/dev-server/serve-markdown.js +1 -1
- package/dist/dev-server/serve-multi.js +1 -1
- package/dist/dev-server.js +1 -1
- package/dist/docs.js +1 -1
- package/dist/dynamic-components.js +1 -1
- package/dist/expressions.js +1 -1
- package/dist/forms.js +1 -1
- package/dist/i18n.js +1 -1
- package/dist/includes.js +1 -1
- package/dist/index.js +1 -1
- package/dist/interactive.js +1 -1
- package/dist/lazy-loader.js +1 -1
- package/dist/loops.js +1 -1
- package/dist/misc-directives.js +1 -1
- package/dist/plugin.js +1 -1
- package/dist/process.js +1 -1
- package/dist/production-builder.js +1 -1
- package/dist/production-server.js +1 -1
- package/dist/pwa/index.js +1 -1
- package/dist/pwa/offline.js +1 -1
- package/dist/pwa.js +1 -1
- package/dist/reactive.js +1 -1
- package/dist/render.js +1 -1
- package/dist/routes.js +1 -1
- package/dist/safe-evaluator.js +1 -1
- package/dist/seo.js +1 -1
- package/dist/serve.js +1 -1
- package/dist/site-builder/build.js +1 -1
- package/dist/site-builder/index.js +1 -1
- package/dist/slots.js +1 -1
- package/dist/ssg.js +1 -1
- package/dist/ssr.js +1 -1
- package/dist/story/cli.js +1 -1
- package/dist/story/commands/dev.js +1 -1
- package/dist/story/commands/index.js +1 -1
- package/dist/story/index.js +1 -1
- package/dist/story/renderer.js +1 -1
- package/dist/story/server.js +1 -1
- package/dist/story/visual-testing.js +1 -1
- package/dist/streaming.js +1 -1
- package/dist/template-compiler.js +1 -1
- package/dist/template-hydrator.js +1 -1
- package/dist/testing.js +1 -1
- package/dist/utils.js +1 -1
- package/dist/variable-extractor.js +1 -1
- package/dist/web-components.js +1 -1
- package/package.json +7 -7
package/dist/app-shell.js
CHANGED
|
@@ -272,7 +272,7 @@ ${K}${H}
|
|
|
272
272
|
'use strict';
|
|
273
273
|
${X}${Y}
|
|
274
274
|
${K}
|
|
275
|
-
})()</script>`}var vO,fO,gO,mO,iO;var g7=D(()=>{j0();vO=["state","derived","effect","batch","untrack","peek","isSignal","isDerived","onMount","onDestroy","useRef","navigate","goBack","goForward","useRoute","setRouteParams","useSearchParams","useQuery","useMutation","useEventListener","useMeta","useDebounce","useDebouncedValue","useThrottle","useInterval","useTimeout","useToggle","useCounter","useClickOutside","useFocus","useAsync","useColorMode","useDark","ref","reactive","computed","watch","watchEffect","watchMultiple","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","defineProps","withDefaults","defineEmits","defineExpose","provide","inject","nextTick","getCurrentInstance","onErrorCaptured","useSlots","useAttrs","createStore","defineStore","useStore","action","createSelector","h","Fragment"],fO=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],gO=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process","Modal","Intl"]);mO={left:0,middle:1,right:2};iO=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"])});function aO($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function tO($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(rO.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&LG.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function eO($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!LG.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function x6($){let Z=$.trim(),Y=aO(Z);tO(Y,Z),eO(Z);for(let X of OG)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!HG.allowBracketNotation&&oO.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function $L($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||OG.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=tZ(X);else Z[Y]=X}return Z}function tZ($,Z=0){if(Z>=HG.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>tZ(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=tZ(J,Z+1);else Y[X]=J}return Y}function Q0($,Z){try{let Y=$L(Z),X=Object.keys(Y),J=Object.values(Y);return U0($,X)(...J)}catch{return}}function B0($){try{return x6($),!0}catch{return!1}}function k0($,Z){try{let Y=Q0($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function U0($,Z){let Y=x6($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let W=Z[K];if(!X.test(W))continue;if(ZL.has(W))continue;J.push(K),Q.push(W)}let G=Function(...Q,`
|
|
275
|
+
})()</script>`}var vO,fO,gO,mO,iO;var g7=D(()=>{j0();vO=["state","derived","effect","batch","untrack","peek","isSignal","isDerived","onMount","onDestroy","useRef","navigate","goBack","goForward","useRoute","setRouteParams","useSearchParams","useQuery","useMutation","useEventListener","useMeta","useDebounce","useDebouncedValue","useThrottle","useInterval","useTimeout","useToggle","useCounter","useClickOutside","useFocus","useAsync","useColorMode","useDark","ref","reactive","computed","watch","watchEffect","watchMultiple","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","defineProps","withDefaults","defineEmits","defineExpose","provide","inject","nextTick","getCurrentInstance","onErrorCaptured","useSlots","useAttrs","createStore","defineStore","useStore","action","createSelector","h","Fragment"],fO=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],gO=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process","Modal","Intl"]);mO={left:0,middle:1,right:2};iO=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"])});function aO($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function tO($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(rO.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&LG.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function eO($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!LG.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function x6($){let Z=$.trim(),Y=aO(Z);tO(Y,Z),eO(Z);for(let X of OG)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!HG.allowBracketNotation&&oO.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function $L($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||OG.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=tZ(X);else Z[Y]=X}return Z}function tZ($,Z=0){if(Z>=HG.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>tZ(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=tZ(J,Z+1);else Y[X]=J}return Y}function Q0($,Z){try{let Y=$L(Z),X=Object.keys(Y),J=Object.values(Y);return U0($,X)(...J)}catch{return}}function B0($){try{return x6($),!0}catch{return!1}}function k0($,Z){try{let Y=Q0($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function U0($,Z){let Y=x6($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let W=Z[K];if(!X.test(W))continue;if(ZL.has(W))continue;J.push(K),Q.push(W)}let G=Function(...Q,`
|
|
276
276
|
'use strict';
|
|
277
277
|
try {
|
|
278
278
|
return ${Y};
|
package/dist/auth.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var{defineProperty:B,getOwnPropertyNames:N,getOwnPropertyDescriptor:_}=Object,T=Object.prototype.hasOwnProperty;function A(J){return this[J]}var E=(J)=>{var q=(G??=new WeakMap).get(J),Q;if(q)return q;if(q=B({},"__esModule",{value:!0}),J&&typeof J==="object"||typeof J==="function"){for(var W of N(J))if(!T.call(q,W))B(q,W,{get:A.bind(J,W),enumerable:!(Q=_(J,W))||Q.enumerable})}return G.set(J,q),q},G;var v=(J)=>J;function g(J,q){this[J]=v.bind(null,q)}var f=(J,q)=>{for(var Q in q)B(J,Q,{get:q[Q],enumerable:!0,configurable:!0,set:g.bind(q,Q)})};var z=(J,q)=>()=>(J&&(q=J(J=0)),q);var l=import.meta.require;function c(J){Y={...Y,...J}}function a(){Y={...O}}function p(){return{...Y}}function h(J){let q="",Q=null,W=!1;for(let Z=0;Z<J.length;Z++){let $=J[Z];if(W){W=!1;continue}if($==="\\"&&Q){W=!0;continue}if(Q){if(Q==="`"&&$==="$"&&Z+1<J.length&&J[Z+1]==="{"){let w=1;Z+=2;while(Z<J.length&&w>0){if(J[Z]==="{")w++;else if(J[Z]==="}")w--;if(w>0)q+=J[Z],Z++}continue}if($===Q)Q=null;continue}if($==='"'||$==="'"||$==="`"){Q=$;continue}q+=$}return q}function S(J,q){let Q=/[$A-Z_a-z][$\w]*/g,W;while((W=Q.exec(J))!==null){let Z=W[0],$=J[W.index-1];if(j.has(Z))throw Error(`Potentially unsafe expression (identifier ${Z}): ${q}`);if($==="."&&D.has(Z))throw Error(`Potentially unsafe expression (property ${Z}): ${q}`)}}function m(J){let q=/\[\s*(['"])(.*?)\1\s*\]/g,Q;while((Q=q.exec(J))!==null){let W=Q[2];if(!D.has(W))continue;let Z=J.slice(0,Q.index).match(/\S(?=\s*$)/)?.[0],$=J.slice(Q.index+Q[0].length).match(/^\s*(\S)/)?.[1];if(!((Z==="{"||Z===",")&&$===":"))throw Error(`Potentially unsafe expression (bracket key ${Q[2]}): ${J}`)}}function L(J){let q=J.trim(),Q=h(q);S(Q,q),m(q);for(let W of P)if(W.test(Q))throw Error(`Potentially unsafe expression (matched /${W.source}/): ${q}`);if(!Y.allowBracketNotation&&b.test(q))throw Error(`Bracket notation with strings not allowed: ${q}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return q}function k(J){let q={};q.Math=Math,q.JSON=JSON,q.Date=Date,q.String=String,q.Number=Number,q.Boolean=Boolean,q.Array=Array,q.parseInt=Number.parseInt,q.parseFloat=Number.parseFloat,q.isNaN=Number.isNaN,q.isFinite=Number.isFinite,q.encodeURIComponent=encodeURIComponent,q.decodeURIComponent=decodeURIComponent;for(let[Q,W]of Object.entries(J)){if(Q.startsWith("__")||P.some((Z)=>Z.test(Q)))continue;if(W&&typeof W==="object"&&!Array.isArray(W))q[Q]=F(W);else q[Q]=W}return q}function F(J,q=0){if(q>=Y.maxSanitizeDepth)return"[Object too deep]";if(J===null||typeof J!=="object")return J;if(Array.isArray(J))return J.map((W)=>F(W,q+1));if(J instanceof Date||J instanceof RegExp||J instanceof Map||J instanceof Set||J instanceof Error)return J;let Q={};for(let[W,Z]of Object.entries(J)){if(W.startsWith("__")||W==="constructor"||W==="prototype")continue;if(Z&&typeof Z==="object")Q[W]=F(Z,q+1);else Q[W]=Z}return Q}function V(J,q){try{let Q=k(q),W=Object.keys(Q),Z=Object.values(Q);return U(J,W)(...Z)}catch{return}}function K(J){try{return L(J),!0}catch{return!1}}function x(J){try{return L(J),null}catch(q){return q instanceof Error?q.message:String(q)}}function r(J,q){try{let Q=V(J,q);return Boolean(Q)}catch{return!1}}function o(J,q){try{let Q=V(J,q);if(Array.isArray(Q))return Q;if(Q&&typeof Q==="object"&&"length"in Q){let W=Q.length;if(typeof W==="number"&&Number.isFinite(W)&&W>=0&&Number.isInteger(W))return Array.from(Q)}return[]}catch{return[]}}function
|
|
2
|
+
var{defineProperty:B,getOwnPropertyNames:N,getOwnPropertyDescriptor:_}=Object,T=Object.prototype.hasOwnProperty;function A(J){return this[J]}var E=(J)=>{var q=(G??=new WeakMap).get(J),Q;if(q)return q;if(q=B({},"__esModule",{value:!0}),J&&typeof J==="object"||typeof J==="function"){for(var W of N(J))if(!T.call(q,W))B(q,W,{get:A.bind(J,W),enumerable:!(Q=_(J,W))||Q.enumerable})}return G.set(J,q),q},G;var v=(J)=>J;function g(J,q){this[J]=v.bind(null,q)}var f=(J,q)=>{for(var Q in q)B(J,Q,{get:q[Q],enumerable:!0,configurable:!0,set:g.bind(q,Q)})};var z=(J,q)=>()=>(J&&(q=J(J=0)),q);var l=import.meta.require;function c(J){Y={...Y,...J}}function a(){Y={...O}}function p(){return{...Y}}function h(J){let q="",Q=null,W=!1;for(let Z=0;Z<J.length;Z++){let $=J[Z];if(W){W=!1;continue}if($==="\\"&&Q){W=!0;continue}if(Q){if(Q==="`"&&$==="$"&&Z+1<J.length&&J[Z+1]==="{"){let w=1;Z+=2;while(Z<J.length&&w>0){if(J[Z]==="{")w++;else if(J[Z]==="}")w--;if(w>0)q+=J[Z],Z++}continue}if($===Q)Q=null;continue}if($==='"'||$==="'"||$==="`"){Q=$;continue}q+=$}return q}function S(J,q){let Q=/[$A-Z_a-z][$\w]*/g,W;while((W=Q.exec(J))!==null){let Z=W[0],$=J[W.index-1];if(j.has(Z))throw Error(`Potentially unsafe expression (matched /\\b${Z}\\b/; identifier ${Z}): ${q}`);if($==="."&&D.has(Z))throw Error(`Potentially unsafe expression (matched /.${Z}/; property ${Z}): ${q}`)}}function m(J){let q=/\[\s*(['"])(.*?)\1\s*\]/g,Q;while((Q=q.exec(J))!==null){let W=Q[2];if(!D.has(W))continue;let Z=J.slice(0,Q.index).match(/\S(?=\s*$)/)?.[0],$=J.slice(Q.index+Q[0].length).match(/^\s*(\S)/)?.[1];if(!((Z==="{"||Z===",")&&$===":"))throw Error(`Potentially unsafe expression (bracket key ${Q[2]}): ${J}`)}}function L(J){let q=J.trim(),Q=h(q);S(Q,q),m(q);for(let W of P)if(W.test(Q))throw Error(`Potentially unsafe expression (matched /${W.source}/): ${q}`);if(!Y.allowBracketNotation&&b.test(q))throw Error(`Bracket notation with strings not allowed: ${q}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return q}function k(J){let q={};q.Math=Math,q.JSON=JSON,q.Date=Date,q.String=String,q.Number=Number,q.Boolean=Boolean,q.Array=Array,q.parseInt=Number.parseInt,q.parseFloat=Number.parseFloat,q.isNaN=Number.isNaN,q.isFinite=Number.isFinite,q.encodeURIComponent=encodeURIComponent,q.decodeURIComponent=decodeURIComponent;for(let[Q,W]of Object.entries(J)){if(Q.startsWith("__")||P.some((Z)=>Z.test(Q)))continue;if(W&&typeof W==="object"&&!Array.isArray(W))q[Q]=F(W);else q[Q]=W}return q}function F(J,q=0){if(q>=Y.maxSanitizeDepth)return"[Object too deep]";if(J===null||typeof J!=="object")return J;if(Array.isArray(J))return J.map((W)=>F(W,q+1));if(J instanceof Date||J instanceof RegExp||J instanceof Map||J instanceof Set||J instanceof Error)return J;let Q={};for(let[W,Z]of Object.entries(J)){if(W.startsWith("__")||W==="constructor"||W==="prototype")continue;if(Z&&typeof Z==="object")Q[W]=F(Z,q+1);else Q[W]=Z}return Q}function V(J,q){try{let Q=k(q),W=Object.keys(Q),Z=Object.values(Q);return U(J,W)(...Z)}catch{return}}function K(J){try{return L(J),!0}catch{return!1}}function x(J){try{return L(J),null}catch(q){return q instanceof Error?q.message:String(q)}}function r(J,q){try{let Q=V(J,q);return Boolean(Q)}catch{return!1}}function o(J,q){try{let Q=V(J,q);if(Array.isArray(Q))return Q;if(Q&&typeof Q==="object"&&"length"in Q){let W=Q.length;if(typeof W==="number"&&Number.isFinite(W)&&W>=0&&Number.isInteger(W))return Array.from(Q)}return[]}catch{return[]}}function n(J,q){try{let Q=V(J,q);if(Q&&typeof Q==="object"&&!Array.isArray(Q))return Q;return{}}catch{return{}}}function U(J,q){let Q=L(J),W=/^[A-Za-z_$][\w$]*$/,Z=[],$=[];for(let H=0;H<q.length;H++){let X=q[H];if(!W.test(X))continue;if(C.has(X))continue;Z.push(H),$.push(X)}let w=Function(...$,`
|
|
3
3
|
'use strict';
|
|
4
4
|
try {
|
|
5
5
|
return ${Q};
|
|
@@ -10,7 +10,7 @@ catch (e) {
|
|
|
10
10
|
}
|
|
11
11
|
throw e;
|
|
12
12
|
}
|
|
13
|
-
`);if($.length===q.length)return w;return(...H)=>{let X=Array(Z.length);for(let M=0;M<Z.length;M++)X[M]=H[Z[M]];return w(...X)}}function
|
|
13
|
+
`);if($.length===q.length)return w;return(...H)=>{let X=Array(Z.length);for(let M=0;M<Z.length;M++)X[M]=H[Z[M]];return w(...X)}}function i(J,q){try{if(typeof J!=="string")return;if(J.length>I)throw Error(`safeEvaluateCode: input exceeds ${I} chars`);for(let w of P)if(w.test(J))throw Error("Potentially unsafe code detected");let Q=k(q),W=Object.keys(Q),Z=Object.values(Q);return Function(...W,`
|
|
14
14
|
'use strict';
|
|
15
15
|
${J}
|
|
16
16
|
`)(...Z)}catch{return}}function y(J){let q=J.trim(),Q=[/\beval\s*\(/i,/\bFunction\s*\(/i,/\bimport\s*\(/i,/\brequire\s*\(/i,/\bprocess\b/i,/\b__proto__\b/i,/\bconstructor\s*[.(]/i,/\bglobalThis\b/i,/\bwindow\b/i,/\bdocument\b/i,/\bfetch\s*\(/i,/\bBun\b/i,/\bDeno\b/i,/\bconsole\b/i,/\bthis\b/i,/\bReflect\b/i,/\bProxy\b/i,/\bprototype\b/i,/\.(bind|call|apply)\s*\(/i];for(let W of Q)if(W.test(q))return!1;return!0}function s(J,q,Q,W,Z=1000){if(!y(q))throw Error(`Unsafe expression in @${J}: ${q}`);let $=Q.replace(/`/g,"\\`").replace(/\$\{/g,"\\${").replace(/\{\{([^}]+)\}\}/g,(w,H)=>{return`\${${H}}`});if(J==="for")return Function(...W,`
|
|
@@ -612,7 +612,7 @@ ${q}`},hasEndTag:!1,description:"Coordinates multiple animations together as a g
|
|
|
612
612
|
`}),$}import b3 from"process";function m0($="STX_PUBLIC_"){let Z={},Y={};for(let[X,J]of Object.entries(b3.env)){if(!X.startsWith($)||J===void 0)continue;Z[`import.meta.env.${X}`]=JSON.stringify(J),Y[X]=J}return Z["import.meta.env"]=JSON.stringify(Y),Z}function IB($="STX_PUBLIC_"){let Z={};for(let[Y,X]of Object.entries(b3.env))if(Y.startsWith($)&&X!==void 0)Z[Y]=X;return Z}var g1=()=>{};var E9={};c(E9,{hasUserImports:()=>PJ,bundleClientScript:()=>xJ});import L0 from"path";import n0 from"fs";function PJ($){let Z=/^\s*import\s+(?!type\s)/gm;if(!$.match(Z))return!1;let X=/^\s*import\s+(?!type\s).*?\s+from\s+['"]([^'"]+)['"]/gm,J;while((J=X.exec($))!==null){let G=J[1];if(!S3.some((q)=>q.test(G)))return console.log("[stx:bundler] detected user import:",G),!0}let Q=/^\s*import\s+['"]([^'"]+)['"]/gm;while((J=Q.exec($))!==null){let G=J[1];if(!S3.some((q)=>q.test(G)))return console.log("[stx:bundler] detected side-effect import:",G),!0}return!1}function vJ($,Z,Y){let X=(J,Q)=>{let G=J===Y?Z:L0.dirname(J),K=L0.resolve(G,Q),q=[K,`${K}.ts`,`${K}.tsx`,`${K}.js`,`${K}.mjs`,`${K}.jsx`,L0.join(K,"index.ts"),L0.join(K,"index.tsx"),L0.join(K,"index.js"),L0.join(K,"index.mjs")];for(let z of q)try{if(n0.existsSync(z)&&n0.statSync(z,{throwIfNoEntry:!1})?.isFile())return z}catch{}return K};return{name:"stx-client-bundle",setup(J){J.onResolve({filter:/^(stx|@stacksjs\/stx|@stacksjs\/browser)$/},(Q)=>({path:Q.path,external:!0})),J.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(Q)=>({path:Q.path,external:!0})),J.onResolve({filter:/^\.\.?\//},(Q)=>{return{path:X(Q.importer,Q.path)}}),J.onResolve({filter:/^@\//},(Q)=>{let G=L0.resolve($,Q.path.slice(2)),K=[G,`${G}.ts`,`${G}.js`,L0.join(G,"index.ts"),L0.join(G,"index.js")];for(let q of K)if(n0.existsSync(q)&&n0.statSync(q,{throwIfNoEntry:!1})?.isFile())return console.log("[stx:bundler] resolved @/ import:",Q.path,"\u2192",q),{path:q};return console.warn("[stx:bundler] could not resolve @/ import:",Q.path),{path:G}})}}}async function xJ($,Z,Y={}){let X=Y.projectRoot||process.cwd(),J=Y.minify??!1,Q=Y.cacheDir||L0.join(X,".stx","bundle-cache"),G=new Bun.CryptoHasher("md5");G.update($+Z);let K=G.digest("hex").slice(0,12),q=L0.join(Q,`${K}.js`),z=Bun.file(q);if(await z.exists())return console.log("[stx:bundler] cache hit:",K),await z.text();let W=L0.join(X,".stx","bundle-tmp"),_=L0.join(W,`${K}.ts`),U=L0.join(W,"out",K);n0.mkdirSync(W,{recursive:!0}),n0.mkdirSync(U,{recursive:!0});let B=L0.dirname(Z),j=[],O=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,L=/^(export\s+)?(?:async\s+)?function\s+(\w+)/gm,F;while((F=O.exec($))!==null){if(F[1])continue;if(F[2])F[2].split(",").forEach((V)=>{let A=V.split(":")[0].trim();if(A)j.push(A)});else if(F[3])j.push(F[3])}while((F=L.exec($))!==null){if(F[1])continue;j.push(F[2])}let H=j.length>0?`
|
|
613
613
|
export { ${j.join(", ")} }`:"";await Bun.write(_,$+H),console.log("[stx:bundler] bundling:",K,"from:",L0.basename(Z));try{let V=await Bun.build({entrypoints:[_],outdir:U,target:"browser",format:"esm",minify:J,plugins:[vJ(X,B,_)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...m0()},root:X});if(!V.success){let w=V.logs.filter((N)=>N.level==="error").map((N)=>N.message).join(", ");return console.warn("[stx:bundler] build failed:",w),$}let A="";for(let w of V.outputs){A=await w.text();break}return A=A.replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),console.log("[stx:bundler] bundled:",K,"output:",A.length,"bytes"),n0.mkdirSync(Q,{recursive:!0}),await Bun.write(q,A),A}catch(V){let A=V instanceof Error?V.message:String(V),w=V?.errors,N=Array.isArray(w)&&w.length>0?`
|
|
614
614
|
${w.map((R)=>`- ${R?.message??R}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${A}${N}`),$}finally{try{n0.rmSync(_,{force:!0}),n0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var S3;var k9=S(()=>{g1();S3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function SB($){h1={...h1,...$}}function yB(){h1={...C3}}function CB(){return{...h1}}function hJ($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function dJ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(fJ.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&P3.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function mJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!P3.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function W5($){let Z=$.trim(),Y=hJ(Z);dJ(Y,Z),mJ(Z);for(let X of S9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!h1.allowBracketNotation&&gJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function v3($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||S9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=b9(X);else Z[Y]=X}return Z}function b9($,Z=0){if(Z>=h1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>b9(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=b9(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=v3(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return W5($),!0}catch{return!1}}function PB($){try{return W5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function vB($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function xB($,Z){try{let Y=n($,Z);if(Array.isArray(Y))return Y;if(Y&&typeof Y==="object"&&"length"in Y){let X=Y.length;if(typeof X==="number"&&Number.isFinite(X)&&X>=0&&Number.isInteger(X))return Array.from(Y)}return[]}catch{return[]}}function W0($,Z){try{let Y=n($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function t($,Z){let Y=W5($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(uJ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
615
|
+
`)}`:"";return console.warn(`[stx:bundler] error: ${A}${N}`),$}finally{try{n0.rmSync(_,{force:!0}),n0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var S3;var k9=S(()=>{g1();S3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function SB($){h1={...h1,...$}}function yB(){h1={...C3}}function CB(){return{...h1}}function hJ($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function dJ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(fJ.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&P3.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function mJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!P3.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function W5($){let Z=$.trim(),Y=hJ(Z);dJ(Y,Z),mJ(Z);for(let X of S9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!h1.allowBracketNotation&&gJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function v3($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||S9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=b9(X);else Z[Y]=X}return Z}function b9($,Z=0){if(Z>=h1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>b9(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=b9(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=v3(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return W5($),!0}catch{return!1}}function PB($){try{return W5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function vB($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function xB($,Z){try{let Y=n($,Z);if(Array.isArray(Y))return Y;if(Y&&typeof Y==="object"&&"length"in Y){let X=Y.length;if(typeof X==="number"&&Number.isFinite(X)&&X>=0&&Number.isInteger(X))return Array.from(Y)}return[]}catch{return[]}}function W0($,Z){try{let Y=n($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function t($,Z){let Y=W5($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(uJ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
616
616
|
'use strict';
|
|
617
617
|
try {
|
|
618
618
|
return ${Y};
|
package/dist/build-views.js
CHANGED
|
@@ -612,7 +612,7 @@ ${q}`},hasEndTag:!1,description:"Coordinates multiple animations together as a g
|
|
|
612
612
|
`}),$}import C3 from"process";function m0($="STX_PUBLIC_"){let Z={},Y={};for(let[X,J]of Object.entries(C3.env)){if(!X.startsWith($)||J===void 0)continue;Z[`import.meta.env.${X}`]=JSON.stringify(J),Y[X]=J}return Z["import.meta.env"]=JSON.stringify(Y),Z}function kB($="STX_PUBLIC_"){let Z={};for(let[Y,X]of Object.entries(C3.env))if(Y.startsWith($)&&X!==void 0)Z[Y]=X;return Z}var g1=()=>{};var b9={};c(b9,{hasUserImports:()=>xJ,bundleClientScript:()=>gJ});import L0 from"path";import n0 from"fs";function xJ($){let Z=/^\s*import\s+(?!type\s)/gm;if(!$.match(Z))return!1;let X=/^\s*import\s+(?!type\s).*?\s+from\s+['"]([^'"]+)['"]/gm,J;while((J=X.exec($))!==null){let G=J[1];if(!v3.some((q)=>q.test(G)))return console.log("[stx:bundler] detected user import:",G),!0}let Q=/^\s*import\s+['"]([^'"]+)['"]/gm;while((J=Q.exec($))!==null){let G=J[1];if(!v3.some((q)=>q.test(G)))return console.log("[stx:bundler] detected side-effect import:",G),!0}return!1}function fJ($,Z,Y){let X=(J,Q)=>{let G=J===Y?Z:L0.dirname(J),K=L0.resolve(G,Q),q=[K,`${K}.ts`,`${K}.tsx`,`${K}.js`,`${K}.mjs`,`${K}.jsx`,L0.join(K,"index.ts"),L0.join(K,"index.tsx"),L0.join(K,"index.js"),L0.join(K,"index.mjs")];for(let z of q)try{if(n0.existsSync(z)&&n0.statSync(z,{throwIfNoEntry:!1})?.isFile())return z}catch{}return K};return{name:"stx-client-bundle",setup(J){J.onResolve({filter:/^(stx|@stacksjs\/stx|@stacksjs\/browser)$/},(Q)=>({path:Q.path,external:!0})),J.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(Q)=>({path:Q.path,external:!0})),J.onResolve({filter:/^\.\.?\//},(Q)=>{return{path:X(Q.importer,Q.path)}}),J.onResolve({filter:/^@\//},(Q)=>{let G=L0.resolve($,Q.path.slice(2)),K=[G,`${G}.ts`,`${G}.js`,L0.join(G,"index.ts"),L0.join(G,"index.js")];for(let q of K)if(n0.existsSync(q)&&n0.statSync(q,{throwIfNoEntry:!1})?.isFile())return console.log("[stx:bundler] resolved @/ import:",Q.path,"\u2192",q),{path:q};return console.warn("[stx:bundler] could not resolve @/ import:",Q.path),{path:G}})}}}async function gJ($,Z,Y={}){let X=Y.projectRoot||process.cwd(),J=Y.minify??!1,Q=Y.cacheDir||L0.join(X,".stx","bundle-cache"),G=new Bun.CryptoHasher("md5");G.update($+Z);let K=G.digest("hex").slice(0,12),q=L0.join(Q,`${K}.js`),z=Bun.file(q);if(await z.exists())return console.log("[stx:bundler] cache hit:",K),await z.text();let _=L0.join(X,".stx","bundle-tmp"),W=L0.join(_,`${K}.ts`),U=L0.join(_,"out",K);n0.mkdirSync(_,{recursive:!0}),n0.mkdirSync(U,{recursive:!0});let B=L0.dirname(Z),j=[],O=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,L=/^(export\s+)?(?:async\s+)?function\s+(\w+)/gm,F;while((F=O.exec($))!==null){if(F[1])continue;if(F[2])F[2].split(",").forEach((V)=>{let R=V.split(":")[0].trim();if(R)j.push(R)});else if(F[3])j.push(F[3])}while((F=L.exec($))!==null){if(F[1])continue;j.push(F[2])}let H=j.length>0?`
|
|
613
613
|
export { ${j.join(", ")} }`:"";await Bun.write(W,$+H),console.log("[stx:bundler] bundling:",K,"from:",L0.basename(Z));try{let V=await Bun.build({entrypoints:[W],outdir:U,target:"browser",format:"esm",minify:J,plugins:[fJ(X,B,W)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...m0()},root:X});if(!V.success){let w=V.logs.filter((A)=>A.level==="error").map((A)=>A.message).join(", ");return console.warn("[stx:bundler] build failed:",w),$}let R="";for(let w of V.outputs){R=await w.text();break}return R=R.replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),console.log("[stx:bundler] bundled:",K,"output:",R.length,"bytes"),n0.mkdirSync(Q,{recursive:!0}),await Bun.write(q,R),R}catch(V){let R=V instanceof Error?V.message:String(V),w=V?.errors,A=Array.isArray(w)&&w.length>0?`
|
|
614
614
|
${w.map((N)=>`- ${N?.message??N}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${R}${A}`),$}finally{try{n0.rmSync(W,{force:!0}),n0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var v3;var y9=b(()=>{g1();v3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function CB($){h1={...h1,...$}}function vB(){h1={...f3}}function xB(){return{...h1}}function mJ($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function uJ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(hJ.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&g3.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function pJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!g3.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function U5($){let Z=$.trim(),Y=mJ(Z);uJ(Y,Z),pJ(Z);for(let X of C9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!h1.allowBracketNotation&&dJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function h3($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||C9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=P9(X);else Z[Y]=X}return Z}function P9($,Z=0){if(Z>=h1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>P9(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=P9(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=h3(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return U5($),!0}catch{return!1}}function fB($){try{return U5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function gB($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function hB($,Z){try{let Y=n($,Z);if(Array.isArray(Y))return Y;if(Y&&typeof Y==="object"&&"length"in Y){let X=Y.length;if(typeof X==="number"&&Number.isFinite(X)&&X>=0&&Number.isInteger(X))return Array.from(Y)}return[]}catch{return[]}}function _0($,Z){try{let Y=n($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function t($,Z){let Y=U5($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(lJ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
615
|
+
`)}`:"";return console.warn(`[stx:bundler] error: ${R}${A}`),$}finally{try{n0.rmSync(W,{force:!0}),n0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var v3;var y9=b(()=>{g1();v3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function CB($){h1={...h1,...$}}function vB(){h1={...f3}}function xB(){return{...h1}}function mJ($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function uJ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(hJ.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&g3.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function pJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!g3.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function U5($){let Z=$.trim(),Y=mJ(Z);uJ(Y,Z),pJ(Z);for(let X of C9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!h1.allowBracketNotation&&dJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function h3($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||C9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=P9(X);else Z[Y]=X}return Z}function P9($,Z=0){if(Z>=h1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>P9(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=P9(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=h3(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return U5($),!0}catch{return!1}}function fB($){try{return U5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function gB($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function hB($,Z){try{let Y=n($,Z);if(Array.isArray(Y))return Y;if(Y&&typeof Y==="object"&&"length"in Y){let X=Y.length;if(typeof X==="number"&&Number.isFinite(X)&&X>=0&&Number.isInteger(X))return Array.from(Y)}return[]}catch{return[]}}function _0($,Z){try{let Y=n($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function t($,Z){let Y=U5($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(lJ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
616
616
|
'use strict';
|
|
617
617
|
try {
|
|
618
618
|
return ${Y};
|
package/dist/build.js
CHANGED
|
@@ -699,7 +699,7 @@ ${K}${H}
|
|
|
699
699
|
'use strict';
|
|
700
700
|
${Y}${J}
|
|
701
701
|
${K}
|
|
702
|
-
})()</script>`}var BJ,jJ,HJ,VJ,RJ;var Z9=S(()=>{F0();BJ=["state","derived","effect","batch","untrack","peek","isSignal","isDerived","onMount","onDestroy","useRef","navigate","goBack","goForward","useRoute","setRouteParams","useSearchParams","useQuery","useMutation","useEventListener","useMeta","useDebounce","useDebouncedValue","useThrottle","useInterval","useTimeout","useToggle","useCounter","useClickOutside","useFocus","useAsync","useColorMode","useDark","ref","reactive","computed","watch","watchEffect","watchMultiple","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","defineProps","withDefaults","defineEmits","defineExpose","provide","inject","nextTick","getCurrentInstance","onErrorCaptured","useSlots","useAttrs","createStore","defineStore","useStore","action","createSelector","h","Fragment"],jJ=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],HJ=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process","Modal","Intl"]);VJ={left:0,middle:1,right:2};RJ=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"])});function DJ($){let Z="",J=null,Y=!1;for(let Q=0;Q<$.length;Q++){let X=$[Q];if(Y){Y=!1;continue}if(X==="\\"&&J){Y=!0;continue}if(J){if(J==="`"&&X==="$"&&Q+1<$.length&&$[Q+1]==="{"){let G=1;Q+=2;while(Q<$.length&&G>0){if($[Q]==="{")G++;else if($[Q]==="}")G--;if(G>0)Z+=$[Q],Q++}continue}if(X===J)J=null;continue}if(X==='"'||X==="'"||X==="`"){J=X;continue}Z+=X}return Z}function kJ($,Z){let J=/[$A-Z_a-z][$\w]*/g,Y;while((Y=J.exec($))!==null){let Q=Y[0],X=$[Y.index-1];if(IJ.has(Q))throw Error(`Potentially unsafe expression (identifier ${Q}): ${Z}`);if(X==="."&&c7.has(Q))throw Error(`Potentially unsafe expression (property ${Q}): ${Z}`)}}function bJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,J;while((J=Z.exec($))!==null){let Y=J[2];if(!c7.has(Y))continue;let Q=$.slice(0,J.index).match(/\S(?=\s*$)/)?.[0],X=$.slice(J.index+J[0].length).match(/^\s*(\S)/)?.[1];if(!((Q==="{"||Q===",")&&X===":"))throw Error(`Potentially unsafe expression (bracket key ${J[2]}): ${$}`)}}function k5($){let Z=$.trim(),J=DJ(Z);kJ(J,Z),bJ(Z);for(let Y of l7)if(Y.test(J))throw Error(`Potentially unsafe expression (matched /${Y.source}/): ${Z}`);if(!p7.allowBracketNotation&&EJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function SJ($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[J,Y]of Object.entries($)){if(J.startsWith("__")||l7.some((Q)=>Q.test(J)))continue;if(Y&&typeof Y==="object"&&!Array.isArray(Y))Z[J]=Y9(Y);else Z[J]=Y}return Z}function Y9($,Z=0){if(Z>=p7.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((Y)=>Y9(Y,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let J={};for(let[Y,Q]of Object.entries($)){if(Y.startsWith("__")||Y==="constructor"||Y==="prototype")continue;if(Q&&typeof Q==="object")J[Y]=Y9(Q,Z+1);else J[Y]=Q}return J}function n($,Z){try{let J=SJ(Z),Y=Object.keys(J),Q=Object.values(J);return $0($,Y)(...Q)}catch{return}}function e($){try{return k5($),!0}catch{return!1}}function B0($,Z){try{let J=n($,Z);if(J&&typeof J==="object"&&!Array.isArray(J))return J;return{}}catch{return{}}}function $0($,Z){let J=k5($),Y=/^[A-Za-z_$][\w$]*$/,Q=[],X=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!Y.test(q))continue;if(yJ.has(q))continue;Q.push(K),X.push(q)}let G=Function(...X,`
|
|
702
|
+
})()</script>`}var BJ,jJ,HJ,VJ,RJ;var Z9=S(()=>{F0();BJ=["state","derived","effect","batch","untrack","peek","isSignal","isDerived","onMount","onDestroy","useRef","navigate","goBack","goForward","useRoute","setRouteParams","useSearchParams","useQuery","useMutation","useEventListener","useMeta","useDebounce","useDebouncedValue","useThrottle","useInterval","useTimeout","useToggle","useCounter","useClickOutside","useFocus","useAsync","useColorMode","useDark","ref","reactive","computed","watch","watchEffect","watchMultiple","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","defineProps","withDefaults","defineEmits","defineExpose","provide","inject","nextTick","getCurrentInstance","onErrorCaptured","useSlots","useAttrs","createStore","defineStore","useStore","action","createSelector","h","Fragment"],jJ=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],HJ=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process","Modal","Intl"]);VJ={left:0,middle:1,right:2};RJ=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"])});function DJ($){let Z="",J=null,Y=!1;for(let Q=0;Q<$.length;Q++){let X=$[Q];if(Y){Y=!1;continue}if(X==="\\"&&J){Y=!0;continue}if(J){if(J==="`"&&X==="$"&&Q+1<$.length&&$[Q+1]==="{"){let G=1;Q+=2;while(Q<$.length&&G>0){if($[Q]==="{")G++;else if($[Q]==="}")G--;if(G>0)Z+=$[Q],Q++}continue}if(X===J)J=null;continue}if(X==='"'||X==="'"||X==="`"){J=X;continue}Z+=X}return Z}function kJ($,Z){let J=/[$A-Z_a-z][$\w]*/g,Y;while((Y=J.exec($))!==null){let Q=Y[0],X=$[Y.index-1];if(IJ.has(Q))throw Error(`Potentially unsafe expression (matched /\\b${Q}\\b/; identifier ${Q}): ${Z}`);if(X==="."&&c7.has(Q))throw Error(`Potentially unsafe expression (matched /.${Q}/; property ${Q}): ${Z}`)}}function bJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,J;while((J=Z.exec($))!==null){let Y=J[2];if(!c7.has(Y))continue;let Q=$.slice(0,J.index).match(/\S(?=\s*$)/)?.[0],X=$.slice(J.index+J[0].length).match(/^\s*(\S)/)?.[1];if(!((Q==="{"||Q===",")&&X===":"))throw Error(`Potentially unsafe expression (bracket key ${J[2]}): ${$}`)}}function k5($){let Z=$.trim(),J=DJ(Z);kJ(J,Z),bJ(Z);for(let Y of l7)if(Y.test(J))throw Error(`Potentially unsafe expression (matched /${Y.source}/): ${Z}`);if(!p7.allowBracketNotation&&EJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function SJ($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[J,Y]of Object.entries($)){if(J.startsWith("__")||l7.some((Q)=>Q.test(J)))continue;if(Y&&typeof Y==="object"&&!Array.isArray(Y))Z[J]=Y9(Y);else Z[J]=Y}return Z}function Y9($,Z=0){if(Z>=p7.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((Y)=>Y9(Y,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let J={};for(let[Y,Q]of Object.entries($)){if(Y.startsWith("__")||Y==="constructor"||Y==="prototype")continue;if(Q&&typeof Q==="object")J[Y]=Y9(Q,Z+1);else J[Y]=Q}return J}function n($,Z){try{let J=SJ(Z),Y=Object.keys(J),Q=Object.values(J);return $0($,Y)(...Q)}catch{return}}function e($){try{return k5($),!0}catch{return!1}}function B0($,Z){try{let J=n($,Z);if(J&&typeof J==="object"&&!Array.isArray(J))return J;return{}}catch{return{}}}function $0($,Z){let J=k5($),Y=/^[A-Za-z_$][\w$]*$/,Q=[],X=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!Y.test(q))continue;if(yJ.has(q))continue;Q.push(K),X.push(q)}let G=Function(...X,`
|
|
703
703
|
'use strict';
|
|
704
704
|
try {
|
|
705
705
|
return ${J};
|
package/dist/cli.js
CHANGED
|
@@ -870,7 +870,7 @@ ${K}${H}
|
|
|
870
870
|
'use strict';
|
|
871
871
|
${X}${Y}
|
|
872
872
|
${K}
|
|
873
|
-
})()</script>`}var eF,$A,ZA,QA,_A;var G5=D(()=>{H0();eF=["state","derived","effect","batch","untrack","peek","isSignal","isDerived","onMount","onDestroy","useRef","navigate","goBack","goForward","useRoute","setRouteParams","useSearchParams","useQuery","useMutation","useEventListener","useMeta","useDebounce","useDebouncedValue","useThrottle","useInterval","useTimeout","useToggle","useCounter","useClickOutside","useFocus","useAsync","useColorMode","useDark","ref","reactive","computed","watch","watchEffect","watchMultiple","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","defineProps","withDefaults","defineEmits","defineExpose","provide","inject","nextTick","getCurrentInstance","onErrorCaptured","useSlots","useAttrs","createStore","defineStore","useStore","action","createSelector","h","Fragment"],$A=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],ZA=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process","Modal","Intl"]);QA={left:0,middle:1,right:2};_A=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"])});function jA($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function HA($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(zA.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&eK.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function OA($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!eK.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function b8($){let Z=$.trim(),Y=jA(Z);HA(Y,Z),OA(Z);for(let X of tK)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!oK.allowBracketNotation&&qA.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function LA($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||tK.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=sY(X);else Z[Y]=X}return Z}function sY($,Z=0){if(Z>=oK.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>sY(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=sY(J,Z+1);else Y[X]=J}return Y}function U0($,Z){try{let Y=LA(Z),X=Object.keys(Y),J=Object.values(Y);return L0($,X)(...J)}catch{return}}function O0($){try{return b8($),!0}catch{return!1}}function x0($,Z){try{let Y=U0($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function L0($,Z){let Y=b8($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let W=Z[K];if(!X.test(W))continue;if(VA.has(W))continue;J.push(K),Q.push(W)}let G=Function(...Q,`
|
|
873
|
+
})()</script>`}var eF,$A,ZA,QA,_A;var G5=D(()=>{H0();eF=["state","derived","effect","batch","untrack","peek","isSignal","isDerived","onMount","onDestroy","useRef","navigate","goBack","goForward","useRoute","setRouteParams","useSearchParams","useQuery","useMutation","useEventListener","useMeta","useDebounce","useDebouncedValue","useThrottle","useInterval","useTimeout","useToggle","useCounter","useClickOutside","useFocus","useAsync","useColorMode","useDark","ref","reactive","computed","watch","watchEffect","watchMultiple","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","defineProps","withDefaults","defineEmits","defineExpose","provide","inject","nextTick","getCurrentInstance","onErrorCaptured","useSlots","useAttrs","createStore","defineStore","useStore","action","createSelector","h","Fragment"],$A=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],ZA=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process","Modal","Intl"]);QA={left:0,middle:1,right:2};_A=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"])});function jA($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function HA($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(zA.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&eK.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function OA($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!eK.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function b8($){let Z=$.trim(),Y=jA(Z);HA(Y,Z),OA(Z);for(let X of tK)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!oK.allowBracketNotation&&qA.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function LA($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||tK.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=sY(X);else Z[Y]=X}return Z}function sY($,Z=0){if(Z>=oK.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>sY(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=sY(J,Z+1);else Y[X]=J}return Y}function U0($,Z){try{let Y=LA(Z),X=Object.keys(Y),J=Object.values(Y);return L0($,X)(...J)}catch{return}}function O0($){try{return b8($),!0}catch{return!1}}function x0($,Z){try{let Y=U0($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function L0($,Z){let Y=b8($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let W=Z[K];if(!X.test(W))continue;if(VA.has(W))continue;J.push(K),Q.push(W)}let G=Function(...Q,`
|
|
874
874
|
'use strict';
|
|
875
875
|
try {
|
|
876
876
|
return ${Y};
|
|
@@ -18236,7 +18236,7 @@ else {
|
|
|
18236
18236
|
`)}function HF($,Z){let Y=" ".repeat(Z),X=[];for(let[K,W]of Object.entries($.props))if(W.type==="literal"){let _=typeof W.value==="string"?`"${W.value}"`:String(W.value);X.push(`${K}: ${_}`)}let J=X.length>0?`{ ${X.join(", ")} }`:"{}",Q=$.children.map((K)=>K.type==="text"?`"${K.props.text?.type==="literal"?K.props.text.value:""}"`:HF(K,Z+1)),G=Q.length>0?`,
|
|
18237
18237
|
${Y} [${Q.join(`,
|
|
18238
18238
|
${Y} `)}]`:"";return`Craft.create("${$.zigType}", ${J}${G})`}function Jy($,Z,Y){if(Z.target==="universal"){let X=[];X.push("// Universal entry point"),X.push("");for(let[J,Q]of Y)X.push(`// --- ${J.toUpperCase()} ---`),X.push(`#if ${J.toUpperCase()}`),X.push(Q),X.push("#endif"),X.push("");return X.join(`
|
|
18239
|
-
`)}return Y.get(Z.target)||TK($,Z)}function Qy($,Z,Y){let X=[];function J(Q){X.push({name:Q.zigType,hash:LF(JSON.stringify(Q.props)),props:Object.keys(Q.props),events:Array.from(Q.events.keys()),slots:[],isNative:Q.zigType.startsWith("craft.")});for(let G of Q.children)J(G)}return J(Z),{version:"1.0.0",components:X,entry:$.id,assets:[],styles:$.styles}}function Gy($,Z){return JSON.stringify({version:3,file:"output.zig",sources:["input.stx"],mappings:""})}function OF(){return`id_${++Ky}`}function LF($){let Z=0;for(let Y=0;Y<$.length;Y++){let X=$.charCodeAt(Y);Z=(Z<<5)-Z+X,Z=Z&Z}return Math.abs(Z).toString(36)}function Wy($){return $.charAt(0).toUpperCase()+$.slice(1)}function _y($){let Z=[],Y=/<script[^>]*>([\s\S]*?)<\/script>/gi,X;while((X=Y.exec($))!==null)Z.push(X[1]);return Z}function Uy($){let Z=[],Y=/<style[^>]*>([\s\S]*?)<\/style>/gi,X;while((X=Y.exec($))!==null)Z.push(X[1]);return Z}function IK($){let Z=$.type==="component"?1:0;if($.children)for(let Y of $.children)Z+=IK(Y);return Z}function DK($){let Z=$.zigType.startsWith("craft.")?1:0;for(let Y of $.children)Z+=DK(Y);return Z}function VF($){return{start:async()=>{console.log("[craft-compiler] Hot reload server started")},stop:async()=>{console.log("[craft-compiler] Hot reload server stopped")},notifyChange:(Z)=>{console.log(`[craft-compiler] File changed: ${Z}`)}}}var kK,Ky=0,By,zy;var AF=D(()=>{kK=new Map([["craft-button",{name:"Button",zigType:"craft.Button",props:[{name:"variant",type:"string",required:!1,default:"primary"},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onclick",type:"callback",required:!1}],children:"single"}],["craft-text-input",{name:"TextInput",zigType:"craft.TextInput",props:[{name:"value",type:"string",required:!1,default:""},{name:"placeholder",type:"string",required:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-textarea",{name:"TextArea",zigType:"craft.TextArea",props:[{name:"value",type:"string",required:!1,default:""},{name:"placeholder",type:"string",required:!1},{name:"rows",type:"number",required:!1,default:3},{name:"disabled",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-checkbox",{name:"Checkbox",zigType:"craft.Checkbox",props:[{name:"checked",type:"boolean",required:!1,default:!1},{name:"label",type:"string",required:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-select",{name:"Select",zigType:"craft.Select",props:[{name:"value",type:"string",required:!1},{name:"options",type:"array",required:!0},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-slider",{name:"Slider",zigType:"craft.Slider",props:[{name:"value",type:"number",required:!1,default:0},{name:"min",type:"number",required:!1,default:0},{name:"max",type:"number",required:!1,default:100},{name:"step",type:"number",required:!1,default:1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-toggle",{name:"Toggle",zigType:"craft.Toggle",props:[{name:"checked",type:"boolean",required:!1,default:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-modal",{name:"Modal",zigType:"craft.Modal",props:[{name:"open",type:"boolean",required:!1,default:!1},{name:"title",type:"string",required:!1},{name:"closable",type:"boolean",required:!1,default:!0},{name:"onclose",type:"callback",required:!1}],children:"multiple"}],["craft-alert",{name:"Alert",zigType:"craft.Alert",props:[{name:"variant",type:"string",required:!1,default:"info"},{name:"title",type:"string",required:!1},{name:"dismissible",type:"boolean",required:!1,default:!1}],children:"single"}],["craft-progress",{name:"ProgressBar",zigType:"craft.ProgressBar",props:[{name:"value",type:"number",required:!1,default:0},{name:"max",type:"number",required:!1,default:100},{name:"indeterminate",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-spinner",{name:"Spinner",zigType:"craft.Spinner",props:[{name:"size",type:"number",required:!1,default:24}],children:"none"}],["craft-avatar",{name:"Avatar",zigType:"craft.Avatar",props:[{name:"src",type:"string",required:!1},{name:"alt",type:"string",required:!1},{name:"size",type:"number",required:!1,default:40}],children:"none"}],["craft-badge",{name:"Badge",zigType:"craft.Badge",props:[{name:"variant",type:"string",required:!1,default:"default"}],children:"single"}],["craft-card",{name:"Card",zigType:"craft.Card",props:[{name:"padding",type:"number",required:!1,default:16}],children:"multiple"}],["craft-accordion",{name:"Accordion",zigType:"craft.Accordion",props:[{name:"title",type:"string",required:!0},{name:"open",type:"boolean",required:!1,default:!1}],children:"multiple"}],["craft-tabs",{name:"TabView",zigType:"craft.TabView",props:[{name:"activeTab",type:"number",required:!1,default:0},{name:"ontabchange",type:"callback",required:!1}],children:"multiple"}],["craft-tooltip",{name:"Tooltip",zigType:"craft.Tooltip",props:[{name:"content",type:"string",required:!0},{name:"position",type:"string",required:!1,default:"top"}],children:"single"}],["craft-date-picker",{name:"DatePicker",zigType:"craft.DatePicker",props:[{name:"value",type:"string",required:!1},{name:"min",type:"string",required:!1},{name:"max",type:"string",required:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-time-picker",{name:"TimePicker",zigType:"craft.TimePicker",props:[{name:"value",type:"string",required:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-color-picker",{name:"ColorPicker",zigType:"craft.ColorPicker",props:[{name:"value",type:"color",required:!1,default:"#000000"},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-data-table",{name:"DataTable",zigType:"craft.DataTable",props:[{name:"data",type:"array",required:!0},{name:"columns",type:"array",required:!0},{name:"sortable",type:"boolean",required:!1,default:!1},{name:"paginated",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-virtual-list",{name:"VirtualList",zigType:"craft.VirtualList",props:[{name:"items",type:"array",required:!0},{name:"itemHeight",type:"number",required:!1,default:48},{name:"renderItem",type:"callback",required:!0}],children:"none"}],["craft-tree-view",{name:"TreeView",zigType:"craft.TreeView",props:[{name:"data",type:"object",required:!0},{name:"expandable",type:"boolean",required:!1,default:!0}],children:"none"}]]);By={compileToNative:UF,createHotReloadServer:VF,NATIVE_COMPONENTS:kK},zy=By});import{spawn as RF}from"child_process";import k0 from"fs";import qy from"os";import t from"path";import x from"process";import{CLI as jy}from"@stacksjs/clapp";var Y6="0.2.53";P6();JK();OQ();wQ();N4();FQ();var __dirname="/home/runner/work/stx/stx/packages/stx/bin",j0=new jy("stx");function NF($){let Z=typeof $==="string"?Number.parseInt($,10):$;if(Number.isNaN(Z))return{isValid:!1,error:"Port must be a valid number",suggestion:"Try using a number between 1024 and 65535"};if(Z<1024||Z>65535)return{isValid:!1,error:"Port must be between 1024 and 65535",suggestion:"Try using a port between 1024 and 65535"};return{isValid:!0}}function wF($){try{if(!k0.existsSync($)){let Y=t.dirname($),X=t.basename($);if(k0.existsSync(Y)){let Q=k0.readdirSync(Y).filter((K)=>K.toLowerCase().includes(X.toLowerCase().substring(0,3))||K.endsWith(".stx")||K.endsWith(".md")),G=Q.length>0?`File not found. Similar files in ${Y}: ${Q.slice(0,3).join(", ")}`:`File not found. Directory ${Y} exists but doesn't contain the specified file.`;return{isValid:!1,error:`File does not exist: ${$}`,suggestion:G}}return{isValid:!1,error:`File does not exist: ${$}`,suggestion:"Check the file path and try again"}}if(k0.statSync($).isDirectory())return{isValid:!1,error:`Expected file but got directory: ${$}`,suggestion:"Specify a .stx or .md file path"};return{isValid:!0}}catch(Z){return{isValid:!1,error:`Cannot access file: ${$}`,suggestion:"Check file permissions and path"}}}function SK($){let Z=typeof $==="string"?Number.parseInt($,10):$;if(Number.isNaN(Z))return{isValid:!1,error:"Timeout must be a valid number",suggestion:"Specify timeout in milliseconds (e.g., 5000 for 5 seconds)"};if(Z<100)return{isValid:!1,error:"Timeout too short (minimum 100ms)",suggestion:"Use a timeout of at least 100ms"};if(Z>300000)return{isValid:!1,error:"Timeout too long (maximum 5 minutes)",suggestion:"Use a timeout of less than 300000ms (5 minutes)"};return{isValid:!0}}var J5=($)=>$.includes("*")||$.includes("?")||$.includes("{")||$.includes("["),Hy=($)=>$.endsWith(".stx")||$.endsWith(".md");function X5($,Z=1){if(console.error(`\u274C ${$.error}`),$.suggestion)console.error(`\uD83D\uDCA1 suggestion: ${$.suggestion}`);x.exit(Z)}async function Oy($,Z){try{let Y=["test"],X=[];if($&&$.length>0)for(let W of $)if(J5(W))try{let _=await Array.fromAsync(new Bun.Glob(W).scan({onlyFiles:!0,absolute:!0}));if(_.length===0)console.warn(`Warning: No files found matching pattern: ${W}`);else if(X.push(..._),Z.verbose)console.log(`Found ${_.length} file(s) matching pattern: ${W}`)}catch(_){return console.error(`Error expanding glob pattern ${W}:`,_),!1}else X.push(W);if(X.length===0)return console.error("Error: No test files found matching the provided patterns."),!1;if(Y.push(...X),Z.filter)Y.push("--pattern",Z.filter);if(Z.timeout)Y.push("--timeout",Z.timeout.toString());if(Z.reporter&&Z.reporter!=="default")if(Z.reporter==="junit"){let W=t.join(qy.tmpdir(),`stx-test-report-${Date.now()}.xml`);Y.push("--reporter",Z.reporter),Y.push("--reporter-outfile",W)}else console.warn(`Warning: Reporter '${Z.reporter}' is not supported. Using default reporter.`);if(Z.coverage)Y.push("--coverage");if(Z.watch)Y.push("--watch");Y.push("--preload",t.join(__dirname,"../../../test-utils/happy-dom.ts"));let J={...x.env,STX_TEST_MODE:"true",STX_TEST_UI:Z.ui?"true":"false",STX_TEST_VERBOSE:Z.verbose?"true":"false"},Q="bun";if(Z.verbose)console.log(`Running: ${Q} ${Y.join(" ")}`);let G=performance.now(),K=RF(Q,Y,{stdio:"inherit",shell:!1,env:J});return new Promise((W)=>{K.on("close",(_)=>{let B=((performance.now()-G)/1000).toFixed(2);if(_===0)W(!0);else W(!1)}),x.on("SIGINT",()=>{console.log(`
|
|
18239
|
+
`)}return Y.get(Z.target)||TK($,Z)}function Qy($,Z,Y){let X=[];function J(Q){X.push({name:Q.zigType,hash:LF(JSON.stringify(Q.props)),props:Object.keys(Q.props),events:Array.from(Q.events.keys()),slots:[],isNative:Q.zigType.startsWith("craft.")});for(let G of Q.children)J(G)}return J(Z),{version:"1.0.0",components:X,entry:$.id,assets:[],styles:$.styles}}function Gy($,Z){return JSON.stringify({version:3,file:"output.zig",sources:["input.stx"],mappings:""})}function OF(){return`id_${++Ky}`}function LF($){let Z=0;for(let Y=0;Y<$.length;Y++){let X=$.charCodeAt(Y);Z=(Z<<5)-Z+X,Z=Z&Z}return Math.abs(Z).toString(36)}function Wy($){return $.charAt(0).toUpperCase()+$.slice(1)}function _y($){let Z=[],Y=/<script[^>]*>([\s\S]*?)<\/script>/gi,X;while((X=Y.exec($))!==null)Z.push(X[1]);return Z}function Uy($){let Z=[],Y=/<style[^>]*>([\s\S]*?)<\/style>/gi,X;while((X=Y.exec($))!==null)Z.push(X[1]);return Z}function IK($){let Z=$.type==="component"?1:0;if($.children)for(let Y of $.children)Z+=IK(Y);return Z}function DK($){let Z=$.zigType.startsWith("craft.")?1:0;for(let Y of $.children)Z+=DK(Y);return Z}function VF($){return{start:async()=>{console.log("[craft-compiler] Hot reload server started")},stop:async()=>{console.log("[craft-compiler] Hot reload server stopped")},notifyChange:(Z)=>{console.log(`[craft-compiler] File changed: ${Z}`)}}}var kK,Ky=0,By,zy;var AF=D(()=>{kK=new Map([["craft-button",{name:"Button",zigType:"craft.Button",props:[{name:"variant",type:"string",required:!1,default:"primary"},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onclick",type:"callback",required:!1}],children:"single"}],["craft-text-input",{name:"TextInput",zigType:"craft.TextInput",props:[{name:"value",type:"string",required:!1,default:""},{name:"placeholder",type:"string",required:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-textarea",{name:"TextArea",zigType:"craft.TextArea",props:[{name:"value",type:"string",required:!1,default:""},{name:"placeholder",type:"string",required:!1},{name:"rows",type:"number",required:!1,default:3},{name:"disabled",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-checkbox",{name:"Checkbox",zigType:"craft.Checkbox",props:[{name:"checked",type:"boolean",required:!1,default:!1},{name:"label",type:"string",required:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-select",{name:"Select",zigType:"craft.Select",props:[{name:"value",type:"string",required:!1},{name:"options",type:"array",required:!0},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-slider",{name:"Slider",zigType:"craft.Slider",props:[{name:"value",type:"number",required:!1,default:0},{name:"min",type:"number",required:!1,default:0},{name:"max",type:"number",required:!1,default:100},{name:"step",type:"number",required:!1,default:1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-toggle",{name:"Toggle",zigType:"craft.Toggle",props:[{name:"checked",type:"boolean",required:!1,default:!1},{name:"disabled",type:"boolean",required:!1,default:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-modal",{name:"Modal",zigType:"craft.Modal",props:[{name:"open",type:"boolean",required:!1,default:!1},{name:"title",type:"string",required:!1},{name:"closable",type:"boolean",required:!1,default:!0},{name:"onclose",type:"callback",required:!1}],children:"multiple"}],["craft-alert",{name:"Alert",zigType:"craft.Alert",props:[{name:"variant",type:"string",required:!1,default:"info"},{name:"title",type:"string",required:!1},{name:"dismissible",type:"boolean",required:!1,default:!1}],children:"single"}],["craft-progress",{name:"ProgressBar",zigType:"craft.ProgressBar",props:[{name:"value",type:"number",required:!1,default:0},{name:"max",type:"number",required:!1,default:100},{name:"indeterminate",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-spinner",{name:"Spinner",zigType:"craft.Spinner",props:[{name:"size",type:"number",required:!1,default:24}],children:"none"}],["craft-avatar",{name:"Avatar",zigType:"craft.Avatar",props:[{name:"src",type:"string",required:!1},{name:"alt",type:"string",required:!1},{name:"size",type:"number",required:!1,default:40}],children:"none"}],["craft-badge",{name:"Badge",zigType:"craft.Badge",props:[{name:"variant",type:"string",required:!1,default:"default"}],children:"single"}],["craft-card",{name:"Card",zigType:"craft.Card",props:[{name:"padding",type:"number",required:!1,default:16}],children:"multiple"}],["craft-accordion",{name:"Accordion",zigType:"craft.Accordion",props:[{name:"title",type:"string",required:!0},{name:"open",type:"boolean",required:!1,default:!1}],children:"multiple"}],["craft-tabs",{name:"TabView",zigType:"craft.TabView",props:[{name:"activeTab",type:"number",required:!1,default:0},{name:"ontabchange",type:"callback",required:!1}],children:"multiple"}],["craft-tooltip",{name:"Tooltip",zigType:"craft.Tooltip",props:[{name:"content",type:"string",required:!0},{name:"position",type:"string",required:!1,default:"top"}],children:"single"}],["craft-date-picker",{name:"DatePicker",zigType:"craft.DatePicker",props:[{name:"value",type:"string",required:!1},{name:"min",type:"string",required:!1},{name:"max",type:"string",required:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-time-picker",{name:"TimePicker",zigType:"craft.TimePicker",props:[{name:"value",type:"string",required:!1},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-color-picker",{name:"ColorPicker",zigType:"craft.ColorPicker",props:[{name:"value",type:"color",required:!1,default:"#000000"},{name:"onchange",type:"callback",required:!1}],children:"none"}],["craft-data-table",{name:"DataTable",zigType:"craft.DataTable",props:[{name:"data",type:"array",required:!0},{name:"columns",type:"array",required:!0},{name:"sortable",type:"boolean",required:!1,default:!1},{name:"paginated",type:"boolean",required:!1,default:!1}],children:"none"}],["craft-virtual-list",{name:"VirtualList",zigType:"craft.VirtualList",props:[{name:"items",type:"array",required:!0},{name:"itemHeight",type:"number",required:!1,default:48},{name:"renderItem",type:"callback",required:!0}],children:"none"}],["craft-tree-view",{name:"TreeView",zigType:"craft.TreeView",props:[{name:"data",type:"object",required:!0},{name:"expandable",type:"boolean",required:!1,default:!0}],children:"none"}]]);By={compileToNative:UF,createHotReloadServer:VF,NATIVE_COMPONENTS:kK},zy=By});import{spawn as RF}from"child_process";import k0 from"fs";import qy from"os";import t from"path";import x from"process";import{CLI as jy}from"@stacksjs/clapp";var Y6="0.2.54";P6();JK();OQ();wQ();N4();FQ();var __dirname="/home/runner/work/stx/stx/packages/stx/bin",j0=new jy("stx");function NF($){let Z=typeof $==="string"?Number.parseInt($,10):$;if(Number.isNaN(Z))return{isValid:!1,error:"Port must be a valid number",suggestion:"Try using a number between 1024 and 65535"};if(Z<1024||Z>65535)return{isValid:!1,error:"Port must be between 1024 and 65535",suggestion:"Try using a port between 1024 and 65535"};return{isValid:!0}}function wF($){try{if(!k0.existsSync($)){let Y=t.dirname($),X=t.basename($);if(k0.existsSync(Y)){let Q=k0.readdirSync(Y).filter((K)=>K.toLowerCase().includes(X.toLowerCase().substring(0,3))||K.endsWith(".stx")||K.endsWith(".md")),G=Q.length>0?`File not found. Similar files in ${Y}: ${Q.slice(0,3).join(", ")}`:`File not found. Directory ${Y} exists but doesn't contain the specified file.`;return{isValid:!1,error:`File does not exist: ${$}`,suggestion:G}}return{isValid:!1,error:`File does not exist: ${$}`,suggestion:"Check the file path and try again"}}if(k0.statSync($).isDirectory())return{isValid:!1,error:`Expected file but got directory: ${$}`,suggestion:"Specify a .stx or .md file path"};return{isValid:!0}}catch(Z){return{isValid:!1,error:`Cannot access file: ${$}`,suggestion:"Check file permissions and path"}}}function SK($){let Z=typeof $==="string"?Number.parseInt($,10):$;if(Number.isNaN(Z))return{isValid:!1,error:"Timeout must be a valid number",suggestion:"Specify timeout in milliseconds (e.g., 5000 for 5 seconds)"};if(Z<100)return{isValid:!1,error:"Timeout too short (minimum 100ms)",suggestion:"Use a timeout of at least 100ms"};if(Z>300000)return{isValid:!1,error:"Timeout too long (maximum 5 minutes)",suggestion:"Use a timeout of less than 300000ms (5 minutes)"};return{isValid:!0}}var J5=($)=>$.includes("*")||$.includes("?")||$.includes("{")||$.includes("["),Hy=($)=>$.endsWith(".stx")||$.endsWith(".md");function X5($,Z=1){if(console.error(`\u274C ${$.error}`),$.suggestion)console.error(`\uD83D\uDCA1 suggestion: ${$.suggestion}`);x.exit(Z)}async function Oy($,Z){try{let Y=["test"],X=[];if($&&$.length>0)for(let W of $)if(J5(W))try{let _=await Array.fromAsync(new Bun.Glob(W).scan({onlyFiles:!0,absolute:!0}));if(_.length===0)console.warn(`Warning: No files found matching pattern: ${W}`);else if(X.push(..._),Z.verbose)console.log(`Found ${_.length} file(s) matching pattern: ${W}`)}catch(_){return console.error(`Error expanding glob pattern ${W}:`,_),!1}else X.push(W);if(X.length===0)return console.error("Error: No test files found matching the provided patterns."),!1;if(Y.push(...X),Z.filter)Y.push("--pattern",Z.filter);if(Z.timeout)Y.push("--timeout",Z.timeout.toString());if(Z.reporter&&Z.reporter!=="default")if(Z.reporter==="junit"){let W=t.join(qy.tmpdir(),`stx-test-report-${Date.now()}.xml`);Y.push("--reporter",Z.reporter),Y.push("--reporter-outfile",W)}else console.warn(`Warning: Reporter '${Z.reporter}' is not supported. Using default reporter.`);if(Z.coverage)Y.push("--coverage");if(Z.watch)Y.push("--watch");Y.push("--preload",t.join(__dirname,"../../../test-utils/happy-dom.ts"));let J={...x.env,STX_TEST_MODE:"true",STX_TEST_UI:Z.ui?"true":"false",STX_TEST_VERBOSE:Z.verbose?"true":"false"},Q="bun";if(Z.verbose)console.log(`Running: ${Q} ${Y.join(" ")}`);let G=performance.now(),K=RF(Q,Y,{stdio:"inherit",shell:!1,env:J});return new Promise((W)=>{K.on("close",(_)=>{let B=((performance.now()-G)/1000).toFixed(2);if(_===0)W(!0);else W(!1)}),x.on("SIGINT",()=>{console.log(`
|
|
18240
18240
|
Test run interrupted`),K.kill("SIGINT"),x.exit(1)})})}catch(Y){return console.error("Error running tests:",Y instanceof Error?Y.message:String(Y)),!1}}var Ly=x.argv.length>=3&&(Hy(x.argv[2])&&k0.existsSync(x.argv[2])||J5(x.argv[2]));if(Ly){let $=x.argv[2],Z={port:3000,watch:!0,cache:!0,markdown:{syntaxHighlighting:{enabled:!0,serverSide:!0,defaultTheme:"github-dark",highlightUnknownLanguages:!0}}};for(let Y=3;Y<x.argv.length;Y++){let X=x.argv[Y];if(X==="--port"&&Y+1<x.argv.length){let J=NF(x.argv[++Y]);if(!J.isValid)X5(J);Z.port=Number.parseInt(x.argv[Y],10)}else if(X==="--no-watch")Z.watch=!1;else if(X==="--highlight-theme"&&Y+1<x.argv.length){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.defaultTheme=x.argv[++Y]}else if(X==="--no-highlight"){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.enabled=!1}else if(X==="--no-highlight-unknown"){if(!Z.markdown)Z.markdown={};if(!Z.markdown.syntaxHighlighting)Z.markdown.syntaxHighlighting={};Z.markdown.syntaxHighlighting.highlightUnknownLanguages=!1}else if(X==="--no-cache")Z.cache=!1;else if(X==="--native")Z.native=!0}if(J5($))try{let Y=await Array.fromAsync(new Bun.Glob($).scan({onlyFiles:!0,absolute:!0})),X=$.endsWith(".stx")?Y.filter((K)=>K.endsWith(".stx")):$.endsWith(".md")?Y.filter((K)=>K.endsWith(".md")):Y.filter((K)=>K.endsWith(".stx")||K.endsWith(".md")),J=$.split("*")[0].replace(/\/$/,"")||".",Q=t.resolve(J);try{let K=new Bun.Glob("**/*.stx"),_=(await Array.fromAsync(K.scan({cwd:Q,onlyFiles:!0,absolute:!0}))).filter((U)=>/\[.+\]/.test(t.basename(U)));for(let U of _)if(!X.includes(U))X.push(U)}catch{}if(X.length===0)console.error(`Error: No STX or Markdown files found matching pattern: ${$}`),x.exit(1);if(!await Y8(X,Z))x.exit(1)}catch(Y){console.error("Failed to process files:",Y),x.exit(1)}else Z8($,Z).catch((Y)=>{console.error("Failed to start dev server:",Y),x.exit(1)})}else{let $=function(X,J){let Q=[];for(let G=0;G<=J.length;G++)Q[G]=[G];for(let G=0;G<=X.length;G++)Q[0][G]=G;for(let G=1;G<=J.length;G++)for(let K=1;K<=X.length;K++)if(J.charAt(G-1)===X.charAt(K-1))Q[G][K]=Q[G-1][K-1];else Q[G][K]=Math.min(Q[G-1][K-1]+1,Q[G][K-1]+1,Q[G-1][K]+1);return Q[J.length][X.length]};j0.command("docs","Generate documentation for components, templates, and directives").option("--output <dir>","Output directory for documentation",{default:"docs"}).option("--format <format>","Documentation format (markdown, html, json)",{default:"markdown"}).option("--components-dir <dir>","Components directory",{default:"components"}).option("--templates-dir <dir>","Templates directory",{default:"."}).option("--no-components","Disable components documentation").option("--no-templates","Disable templates documentation").option("--no-directives","Disable directives documentation").option("--extra-content <content>","Extra content to include in documentation").example("stx docs --output docs --format html").action(async(X)=>{try{if(await HQ(X))console.log("Documentation generated successfully."),x.exit(0);else console.error("Documentation generation failed."),x.exit(1)}catch(J){console.error("Error generating documentation:",J),x.exit(1)}}),j0.command("iconify <command>","Generate Iconify icon packages").option("--output <dir>","Output directory for generated packages",{default:"packages"}).option("--icons <icons>","Comma-separated list of specific icons to generate").example("stx iconify list").example("stx iconify generate mdi").example("stx iconify generate lucide --icons home,settings,user").action(async(X,J)=>{try{let{fetchCollections:Q,generatePackage:G}=await import("@stacksjs/iconify-generator");if(X==="list"){console.log(`
|
|
18241
18241
|
\uD83D\uDCDA Fetching available icon collections...
|
|
18242
18242
|
`);let K=await Q(),W=Object.entries(K).sort((_,U)=>U[1].total-_[1].total);console.log(`Available collections:
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var rZ=Object.defineProperty;var aZ=($)=>$;function tZ($,Z){this[$]=aZ.bind(null,Z)}var $0=($,Z)=>{for(var Y in Z)rZ($,Y,{get:Z[Y],enumerable:!0,configurable:!0,set:tZ.bind(Z,Y)})};var b=($,Z)=>()=>($&&(Z=$($=0)),Z);var Z0=import.meta.require;function YY($){let Z="",Y=null,X=!1;for(let Q=0;Q<$.length;Q++){let J=$[Q];if(X){X=!1;continue}if(J==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&J==="$"&&Q+1<$.length&&$[Q+1]==="{"){let G=1;Q+=2;while(Q<$.length&&G>0){if($[Q]==="{")G++;else if($[Q]==="}")G--;if(G>0)Z+=$[Q],Q++}continue}if(J===Y)Y=null;continue}if(J==='"'||J==="'"||J==="`"){Y=J;continue}Z+=J}return Z}function XY($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let Q=X[0],J=$[X.index-1];if($Y.has(Q))throw Error(`Potentially unsafe expression (identifier ${Q}): ${Z}`);if(J==="."&&Q7.has(Q))throw Error(`Potentially unsafe expression (property ${Q}): ${Z}`)}}function JY($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!Q7.has(X))continue;let Q=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],J=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((Q==="{"||Q===",")&&J===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function B5($){let Z=$.trim(),Y=YY(Z);XY(Y,Z),JY(Z);for(let X of J7)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!X7.allowBracketNotation&&ZY.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function QY($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||J7.some((Q)=>Q.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=k$(X);else Z[Y]=X}return Z}function k$($,Z=0){if(Z>=X7.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>k$(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,Q]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(Q&&typeof Q==="object")Y[X]=k$(Q,Z+1);else Y[X]=Q}return Y}function i($,Z){try{let Y=QY(Z),X=Object.keys(Y),Q=Object.values(Y);return a($,X)(...Q)}catch{return}}function r($){try{return B5($),!0}catch{return!1}}function q0($,Z){try{let Y=i($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function a($,Z){let Y=B5($),X=/^[A-Za-z_$][\w$]*$/,Q=[],J=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(GY.has(q))continue;Q.push(K),J.push(q)}let G=Function(...J,`
|
|
2
|
+
var rZ=Object.defineProperty;var aZ=($)=>$;function tZ($,Z){this[$]=aZ.bind(null,Z)}var $0=($,Z)=>{for(var Y in Z)rZ($,Y,{get:Z[Y],enumerable:!0,configurable:!0,set:tZ.bind(Z,Y)})};var b=($,Z)=>()=>($&&(Z=$($=0)),Z);var Z0=import.meta.require;function YY($){let Z="",Y=null,X=!1;for(let Q=0;Q<$.length;Q++){let J=$[Q];if(X){X=!1;continue}if(J==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&J==="$"&&Q+1<$.length&&$[Q+1]==="{"){let G=1;Q+=2;while(Q<$.length&&G>0){if($[Q]==="{")G++;else if($[Q]==="}")G--;if(G>0)Z+=$[Q],Q++}continue}if(J===Y)Y=null;continue}if(J==='"'||J==="'"||J==="`"){Y=J;continue}Z+=J}return Z}function XY($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let Q=X[0],J=$[X.index-1];if($Y.has(Q))throw Error(`Potentially unsafe expression (matched /\\b${Q}\\b/; identifier ${Q}): ${Z}`);if(J==="."&&Q7.has(Q))throw Error(`Potentially unsafe expression (matched /.${Q}/; property ${Q}): ${Z}`)}}function JY($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!Q7.has(X))continue;let Q=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],J=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((Q==="{"||Q===",")&&J===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function B5($){let Z=$.trim(),Y=YY(Z);XY(Y,Z),JY(Z);for(let X of J7)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!X7.allowBracketNotation&&ZY.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function QY($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||J7.some((Q)=>Q.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=k$(X);else Z[Y]=X}return Z}function k$($,Z=0){if(Z>=X7.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>k$(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,Q]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(Q&&typeof Q==="object")Y[X]=k$(Q,Z+1);else Y[X]=Q}return Y}function i($,Z){try{let Y=QY(Z),X=Object.keys(Y),Q=Object.values(Y);return a($,X)(...Q)}catch{return}}function r($){try{return B5($),!0}catch{return!1}}function q0($,Z){try{let Y=i($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function a($,Z){let Y=B5($),X=/^[A-Za-z_$][\w$]*$/,Q=[],J=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(GY.has(q))continue;Q.push(K),J.push(q)}let G=Function(...J,`
|
|
3
3
|
'use strict';
|
|
4
4
|
try {
|
|
5
5
|
return ${Y};
|
|
@@ -61,7 +61,7 @@ ${K}${O}
|
|
|
61
61
|
'use strict';
|
|
62
62
|
${X}${Y}
|
|
63
63
|
${K}
|
|
64
|
-
})()</script>`}var YY,XY,JY,qY,UY;var S$=b(()=>{H0();YY=["state","derived","effect","batch","untrack","peek","isSignal","isDerived","onMount","onDestroy","useRef","navigate","goBack","goForward","useRoute","setRouteParams","useSearchParams","useQuery","useMutation","useEventListener","useMeta","useDebounce","useDebouncedValue","useThrottle","useInterval","useTimeout","useToggle","useCounter","useClickOutside","useFocus","useAsync","useColorMode","useDark","ref","reactive","computed","watch","watchEffect","watchMultiple","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","defineProps","withDefaults","defineEmits","defineExpose","provide","inject","nextTick","getCurrentInstance","onErrorCaptured","useSlots","useAttrs","createStore","defineStore","useStore","action","createSelector","h","Fragment"],XY=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],JY=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process","Modal","Intl"]);qY={left:0,middle:1,right:2};UY=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"])});function LY($){let Z="",Y=null,X=!1;for(let Q=0;Q<$.length;Q++){let J=$[Q];if(X){X=!1;continue}if(J==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&J==="$"&&Q+1<$.length&&$[Q+1]==="{"){let G=1;Q+=2;while(Q<$.length&&G>0){if($[Q]==="{")G++;else if($[Q]==="}")G--;if(G>0)Z+=$[Q],Q++}continue}if(J===Y)Y=null;continue}if(J==='"'||J==="'"||J==="`"){Y=J;continue}Z+=J}return Z}function FY($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let Q=X[0],J=$[X.index-1];if(OY.has(Q))throw Error(`Potentially unsafe expression (identifier ${Q}): ${Z}`);if(J==="."&&J7.has(Q))throw Error(`Potentially unsafe expression (property ${Q}): ${Z}`)}}function VY($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!J7.has(X))continue;let Q=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],J=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((Q==="{"||Q===",")&&J===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function B5($){let Z=$.trim(),Y=LY(Z);FY(Y,Z),VY(Z);for(let X of X7)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!Y7.allowBracketNotation&&HY.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function wY($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||X7.some((Q)=>Q.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=b$(X);else Z[Y]=X}return Z}function b$($,Z=0){if(Z>=Y7.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>b$(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,Q]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(Q&&typeof Q==="object")Y[X]=b$(Q,Z+1);else Y[X]=Q}return Y}function i($,Z){try{let Y=wY(Z),X=Object.keys(Y),Q=Object.values(Y);return $0($,X)(...Q)}catch{return}}function e($){try{return B5($),!0}catch{return!1}}function W0($,Z){try{let Y=i($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function $0($,Z){let Y=B5($),X=/^[A-Za-z_$][\w$]*$/,Q=[],J=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(RY.has(q))continue;Q.push(K),J.push(q)}let G=Function(...J,`
|
|
64
|
+
})()</script>`}var YY,XY,JY,qY,UY;var S$=b(()=>{H0();YY=["state","derived","effect","batch","untrack","peek","isSignal","isDerived","onMount","onDestroy","useRef","navigate","goBack","goForward","useRoute","setRouteParams","useSearchParams","useQuery","useMutation","useEventListener","useMeta","useDebounce","useDebouncedValue","useThrottle","useInterval","useTimeout","useToggle","useCounter","useClickOutside","useFocus","useAsync","useColorMode","useDark","ref","reactive","computed","watch","watchEffect","watchMultiple","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","defineProps","withDefaults","defineEmits","defineExpose","provide","inject","nextTick","getCurrentInstance","onErrorCaptured","useSlots","useAttrs","createStore","defineStore","useStore","action","createSelector","h","Fragment"],XY=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],JY=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process","Modal","Intl"]);qY={left:0,middle:1,right:2};UY=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"])});function LY($){let Z="",Y=null,X=!1;for(let Q=0;Q<$.length;Q++){let J=$[Q];if(X){X=!1;continue}if(J==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&J==="$"&&Q+1<$.length&&$[Q+1]==="{"){let G=1;Q+=2;while(Q<$.length&&G>0){if($[Q]==="{")G++;else if($[Q]==="}")G--;if(G>0)Z+=$[Q],Q++}continue}if(J===Y)Y=null;continue}if(J==='"'||J==="'"||J==="`"){Y=J;continue}Z+=J}return Z}function FY($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let Q=X[0],J=$[X.index-1];if(OY.has(Q))throw Error(`Potentially unsafe expression (matched /\\b${Q}\\b/; identifier ${Q}): ${Z}`);if(J==="."&&J7.has(Q))throw Error(`Potentially unsafe expression (matched /.${Q}/; property ${Q}): ${Z}`)}}function VY($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!J7.has(X))continue;let Q=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],J=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((Q==="{"||Q===",")&&J===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function B5($){let Z=$.trim(),Y=LY(Z);FY(Y,Z),VY(Z);for(let X of X7)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!Y7.allowBracketNotation&&HY.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function wY($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||X7.some((Q)=>Q.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=b$(X);else Z[Y]=X}return Z}function b$($,Z=0){if(Z>=Y7.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>b$(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,Q]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(Q&&typeof Q==="object")Y[X]=b$(Q,Z+1);else Y[X]=Q}return Y}function i($,Z){try{let Y=wY(Z),X=Object.keys(Y),Q=Object.values(Y);return $0($,X)(...Q)}catch{return}}function e($){try{return B5($),!0}catch{return!1}}function W0($,Z){try{let Y=i($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function $0($,Z){let Y=B5($),X=/^[A-Za-z_$][\w$]*$/,Q=[],J=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(RY.has(q))continue;Q.push(K),J.push(q)}let G=Function(...J,`
|
|
65
65
|
'use strict';
|
|
66
66
|
try {
|
|
67
67
|
return ${Y};
|
package/dist/components.js
CHANGED
|
@@ -612,7 +612,7 @@ ${q}`},hasEndTag:!1,description:"Coordinates multiple animations together as a g
|
|
|
612
612
|
`}),$}import k3 from"process";function u0($="STX_PUBLIC_"){let Z={},Y={};for(let[X,J]of Object.entries(k3.env)){if(!X.startsWith($)||J===void 0)continue;Z[`import.meta.env.${X}`]=JSON.stringify(J),Y[X]=J}return Z["import.meta.env"]=JSON.stringify(Y),Z}function MB($="STX_PUBLIC_"){let Z={};for(let[Y,X]of Object.entries(k3.env))if(Y.startsWith($)&&X!==void 0)Z[Y]=X;return Z}var f1=()=>{};var D9={};c(D9,{hasUserImports:()=>yJ,bundleClientScript:()=>PJ});import F0 from"path";import s0 from"fs";function yJ($){let Z=/^\s*import\s+(?!type\s)/gm;if(!$.match(Z))return!1;let X=/^\s*import\s+(?!type\s).*?\s+from\s+['"]([^'"]+)['"]/gm,J;while((J=X.exec($))!==null){let G=J[1];if(!S3.some((q)=>q.test(G)))return console.log("[stx:bundler] detected user import:",G),!0}let Q=/^\s*import\s+['"]([^'"]+)['"]/gm;while((J=Q.exec($))!==null){let G=J[1];if(!S3.some((q)=>q.test(G)))return console.log("[stx:bundler] detected side-effect import:",G),!0}return!1}function CJ($,Z,Y){let X=(J,Q)=>{let G=J===Y?Z:F0.dirname(J),K=F0.resolve(G,Q),q=[K,`${K}.ts`,`${K}.tsx`,`${K}.js`,`${K}.mjs`,`${K}.jsx`,F0.join(K,"index.ts"),F0.join(K,"index.tsx"),F0.join(K,"index.js"),F0.join(K,"index.mjs")];for(let z of q)try{if(s0.existsSync(z)&&s0.statSync(z,{throwIfNoEntry:!1})?.isFile())return z}catch{}return K};return{name:"stx-client-bundle",setup(J){J.onResolve({filter:/^(stx|@stacksjs\/stx|@stacksjs\/browser)$/},(Q)=>({path:Q.path,external:!0})),J.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(Q)=>({path:Q.path,external:!0})),J.onResolve({filter:/^\.\.?\//},(Q)=>{return{path:X(Q.importer,Q.path)}}),J.onResolve({filter:/^@\//},(Q)=>{let G=F0.resolve($,Q.path.slice(2)),K=[G,`${G}.ts`,`${G}.js`,F0.join(G,"index.ts"),F0.join(G,"index.js")];for(let q of K)if(s0.existsSync(q)&&s0.statSync(q,{throwIfNoEntry:!1})?.isFile())return console.log("[stx:bundler] resolved @/ import:",Q.path,"\u2192",q),{path:q};return console.warn("[stx:bundler] could not resolve @/ import:",Q.path),{path:G}})}}}async function PJ($,Z,Y={}){let X=Y.projectRoot||process.cwd(),J=Y.minify??!1,Q=Y.cacheDir||F0.join(X,".stx","bundle-cache"),G=new Bun.CryptoHasher("md5");G.update($+Z);let K=G.digest("hex").slice(0,12),q=F0.join(Q,`${K}.js`),z=Bun.file(q);if(await z.exists())return console.log("[stx:bundler] cache hit:",K),await z.text();let _=F0.join(X,".stx","bundle-tmp"),W=F0.join(_,`${K}.ts`),U=F0.join(_,"out",K);s0.mkdirSync(_,{recursive:!0}),s0.mkdirSync(U,{recursive:!0});let B=F0.dirname(Z),j=[],O=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,L=/^(export\s+)?(?:async\s+)?function\s+(\w+)/gm,F;while((F=O.exec($))!==null){if(F[1])continue;if(F[2])F[2].split(",").forEach((V)=>{let R=V.split(":")[0].trim();if(R)j.push(R)});else if(F[3])j.push(F[3])}while((F=L.exec($))!==null){if(F[1])continue;j.push(F[2])}let H=j.length>0?`
|
|
613
613
|
export { ${j.join(", ")} }`:"";await Bun.write(W,$+H),console.log("[stx:bundler] bundling:",K,"from:",F0.basename(Z));try{let V=await Bun.build({entrypoints:[W],outdir:U,target:"browser",format:"esm",minify:J,plugins:[CJ(X,B,W)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...u0()},root:X});if(!V.success){let w=V.logs.filter((A)=>A.level==="error").map((A)=>A.message).join(", ");return console.warn("[stx:bundler] build failed:",w),$}let R="";for(let w of V.outputs){R=await w.text();break}return R=R.replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),console.log("[stx:bundler] bundled:",K,"output:",R.length,"bytes"),s0.mkdirSync(Q,{recursive:!0}),await Bun.write(q,R),R}catch(V){let R=V instanceof Error?V.message:String(V),w=V?.errors,A=Array.isArray(w)&&w.length>0?`
|
|
614
614
|
${w.map((N)=>`- ${N?.message??N}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${R}${A}`),$}finally{try{s0.rmSync(W,{force:!0}),s0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var S3;var E9=b(()=>{f1();S3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function SB($){g1={...g1,...$}}function bB(){g1={...y3}}function yB(){return{...g1}}function fJ($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function gJ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(vJ.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&C3.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function hJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!C3.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function z5($){let Z=$.trim(),Y=fJ(Z);gJ(Y,Z),hJ(Z);for(let X of S9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!g1.allowBracketNotation&&xJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function P3($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||S9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=k9(X);else Z[Y]=X}return Z}function k9($,Z=0){if(Z>=g1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>k9(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=k9(J,Z+1);else Y[X]=J}return Y}function o($,Z){try{let Y=P3(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return z5($),!0}catch{return!1}}function CB($){try{return z5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function PB($,Z){try{let Y=o($,Z);return Boolean(Y)}catch{return!1}}function vB($,Z){try{let Y=o($,Z);if(Array.isArray(Y))return Y;if(Y&&typeof Y==="object"&&"length"in Y){let X=Y.length;if(typeof X==="number"&&Number.isFinite(X)&&X>=0&&Number.isInteger(X))return Array.from(Y)}return[]}catch{return[]}}function G0($,Z){try{let Y=o($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function t($,Z){let Y=z5($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(dJ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
615
|
+
`)}`:"";return console.warn(`[stx:bundler] error: ${R}${A}`),$}finally{try{s0.rmSync(W,{force:!0}),s0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var S3;var E9=b(()=>{f1();S3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function SB($){g1={...g1,...$}}function bB(){g1={...y3}}function yB(){return{...g1}}function fJ($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function gJ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(vJ.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&C3.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function hJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!C3.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function z5($){let Z=$.trim(),Y=fJ(Z);gJ(Y,Z),hJ(Z);for(let X of S9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!g1.allowBracketNotation&&xJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function P3($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||S9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=k9(X);else Z[Y]=X}return Z}function k9($,Z=0){if(Z>=g1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>k9(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=k9(J,Z+1);else Y[X]=J}return Y}function o($,Z){try{let Y=P3(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return z5($),!0}catch{return!1}}function CB($){try{return z5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function PB($,Z){try{let Y=o($,Z);return Boolean(Y)}catch{return!1}}function vB($,Z){try{let Y=o($,Z);if(Array.isArray(Y))return Y;if(Y&&typeof Y==="object"&&"length"in Y){let X=Y.length;if(typeof X==="number"&&Number.isFinite(X)&&X>=0&&Number.isInteger(X))return Array.from(Y)}return[]}catch{return[]}}function G0($,Z){try{let Y=o($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function t($,Z){let Y=z5($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(dJ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
616
616
|
'use strict';
|
|
617
617
|
try {
|
|
618
618
|
return ${Y};
|
package/dist/conditionals.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var{defineProperty:QW,getOwnPropertyNames:nW,getOwnPropertyDescriptor:rW}=Object,tW=Object.prototype.hasOwnProperty;function eW(W){return this[W]}var aJ=(W)=>{var $=(wW??=new WeakMap).get(W),J;if($)return $;if($=QW({},"__esModule",{value:!0}),W&&typeof W==="object"||typeof W==="function"){for(var Z of nW(W))if(!tW.call($,Z))QW($,Z,{get:eW.bind(W,Z),enumerable:!(J=rW(W,Z))||J.enumerable})}return wW.set(W,$),$},wW;var WJ=(W)=>W;function JJ(W,$){this[W]=WJ.bind(null,$)}var sJ=(W,$)=>{for(var J in $)QW(W,J,{get:$[J],enumerable:!0,configurable:!0,set:JJ.bind($,J)})};var E=(W,$)=>()=>(W&&($=W(W=0)),$);var a=import.meta.require;function rJ(W){p={...p,...W}}function tJ(){p={...IW}}function eJ(){return{...p}}function QJ(W){let $="",J=null,Z=!1;for(let Q=0;Q<W.length;Q++){let Y=W[Q];if(Z){Z=!1;continue}if(Y==="\\"&&J){Z=!0;continue}if(J){if(J==="`"&&Y==="$"&&Q+1<W.length&&W[Q+1]==="{"){let U=1;Q+=2;while(Q<W.length&&U>0){if(W[Q]==="{")U++;else if(W[Q]==="}")U--;if(U>0)$+=W[Q],Q++}continue}if(Y===J)J=null;continue}if(Y==='"'||Y==="'"||Y==="`"){J=Y;continue}$+=Y}return $}function XJ(W,$){let J=/[$A-Z_a-z][$\w]*/g,Z;while((Z=J.exec(W))!==null){let Q=Z[0],Y=W[Z.index-1];if(ZJ.has(Q))throw Error(`Potentially unsafe expression (identifier ${Q}): ${$}`);if(Y==="."&&NW.has(Q))throw Error(`Potentially unsafe expression (property ${Q}): ${$}`)}}function YJ(W){let $=/\[\s*(['"])(.*?)\1\s*\]/g,J;while((J=$.exec(W))!==null){let Z=J[2];if(!NW.has(Z))continue;let Q=W.slice(0,J.index).match(/\S(?=\s*$)/)?.[0],Y=W.slice(J.index+J[0].length).match(/^\s*(\S)/)?.[1];if(!((Q==="{"||Q===",")&&Y===":"))throw Error(`Potentially unsafe expression (bracket key ${J[2]}): ${W}`)}}function UW(W){let $=W.trim(),J=QJ($);XJ(J,$),YJ($);for(let Z of YW)if(Z.test(J))throw Error(`Potentially unsafe expression (matched /${Z.source}/): ${$}`);if(!p.allowBracketNotation&&$J.test($))throw Error(`Bracket notation with strings not allowed: ${$}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return $}function MW(W){let $={};$.Math=Math,$.JSON=JSON,$.Date=Date,$.String=String,$.Number=Number,$.Boolean=Boolean,$.Array=Array,$.parseInt=Number.parseInt,$.parseFloat=Number.parseFloat,$.isNaN=Number.isNaN,$.isFinite=Number.isFinite,$.encodeURIComponent=encodeURIComponent,$.decodeURIComponent=decodeURIComponent;for(let[J,Z]of Object.entries(W)){if(J.startsWith("__")||YW.some((Q)=>Q.test(J)))continue;if(Z&&typeof Z==="object"&&!Array.isArray(Z))$[J]=XW(Z);else $[J]=Z}return $}function XW(W,$=0){if($>=p.maxSanitizeDepth)return"[Object too deep]";if(W===null||typeof W!=="object")return W;if(Array.isArray(W))return W.map((Z)=>XW(Z,$+1));if(W instanceof Date||W instanceof RegExp||W instanceof Map||W instanceof Set||W instanceof Error)return W;let J={};for(let[Z,Q]of Object.entries(W)){if(Z.startsWith("__")||Z==="constructor"||Z==="prototype")continue;if(Q&&typeof Q==="object")J[Z]=XW(Q,$+1);else J[Z]=Q}return J}function P(W,$){try{let J=MW($),Z=Object.keys(J),Q=Object.values(J);return d(W,Z)(...Q)}catch{return}}function c(W){try{return UW(W),!0}catch{return!1}}function WZ(W){try{return UW(W),null}catch($){return $ instanceof Error?$.message:String($)}}function JZ(W,$){try{let J=P(W,$);return Boolean(J)}catch{return!1}}function ZZ(W,$){try{let J=P(W,$);if(Array.isArray(J))return J;if(J&&typeof J==="object"&&"length"in J){let Z=J.length;if(typeof Z==="number"&&Number.isFinite(Z)&&Z>=0&&Number.isInteger(Z))return Array.from(J)}return[]}catch{return[]}}function $Z(W,$){try{let J=P(W,$);if(J&&typeof J==="object"&&!Array.isArray(J))return J;return{}}catch{return{}}}function d(W,$){let J=UW(W),Z=/^[A-Za-z_$][\w$]*$/,Q=[],Y=[];for(let X=0;X<$.length;X++){let F=$[X];if(!Z.test(F))continue;if(UJ.has(F))continue;Q.push(X),Y.push(F)}let U=Function(...Y,`
|
|
2
|
+
var{defineProperty:QW,getOwnPropertyNames:nW,getOwnPropertyDescriptor:rW}=Object,tW=Object.prototype.hasOwnProperty;function eW(W){return this[W]}var aJ=(W)=>{var $=(wW??=new WeakMap).get(W),J;if($)return $;if($=QW({},"__esModule",{value:!0}),W&&typeof W==="object"||typeof W==="function"){for(var Z of nW(W))if(!tW.call($,Z))QW($,Z,{get:eW.bind(W,Z),enumerable:!(J=rW(W,Z))||J.enumerable})}return wW.set(W,$),$},wW;var WJ=(W)=>W;function JJ(W,$){this[W]=WJ.bind(null,$)}var sJ=(W,$)=>{for(var J in $)QW(W,J,{get:$[J],enumerable:!0,configurable:!0,set:JJ.bind($,J)})};var E=(W,$)=>()=>(W&&($=W(W=0)),$);var a=import.meta.require;function rJ(W){p={...p,...W}}function tJ(){p={...IW}}function eJ(){return{...p}}function QJ(W){let $="",J=null,Z=!1;for(let Q=0;Q<W.length;Q++){let Y=W[Q];if(Z){Z=!1;continue}if(Y==="\\"&&J){Z=!0;continue}if(J){if(J==="`"&&Y==="$"&&Q+1<W.length&&W[Q+1]==="{"){let U=1;Q+=2;while(Q<W.length&&U>0){if(W[Q]==="{")U++;else if(W[Q]==="}")U--;if(U>0)$+=W[Q],Q++}continue}if(Y===J)J=null;continue}if(Y==='"'||Y==="'"||Y==="`"){J=Y;continue}$+=Y}return $}function XJ(W,$){let J=/[$A-Z_a-z][$\w]*/g,Z;while((Z=J.exec(W))!==null){let Q=Z[0],Y=W[Z.index-1];if(ZJ.has(Q))throw Error(`Potentially unsafe expression (matched /\\b${Q}\\b/; identifier ${Q}): ${$}`);if(Y==="."&&NW.has(Q))throw Error(`Potentially unsafe expression (matched /.${Q}/; property ${Q}): ${$}`)}}function YJ(W){let $=/\[\s*(['"])(.*?)\1\s*\]/g,J;while((J=$.exec(W))!==null){let Z=J[2];if(!NW.has(Z))continue;let Q=W.slice(0,J.index).match(/\S(?=\s*$)/)?.[0],Y=W.slice(J.index+J[0].length).match(/^\s*(\S)/)?.[1];if(!((Q==="{"||Q===",")&&Y===":"))throw Error(`Potentially unsafe expression (bracket key ${J[2]}): ${W}`)}}function UW(W){let $=W.trim(),J=QJ($);XJ(J,$),YJ($);for(let Z of YW)if(Z.test(J))throw Error(`Potentially unsafe expression (matched /${Z.source}/): ${$}`);if(!p.allowBracketNotation&&$J.test($))throw Error(`Bracket notation with strings not allowed: ${$}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return $}function MW(W){let $={};$.Math=Math,$.JSON=JSON,$.Date=Date,$.String=String,$.Number=Number,$.Boolean=Boolean,$.Array=Array,$.parseInt=Number.parseInt,$.parseFloat=Number.parseFloat,$.isNaN=Number.isNaN,$.isFinite=Number.isFinite,$.encodeURIComponent=encodeURIComponent,$.decodeURIComponent=decodeURIComponent;for(let[J,Z]of Object.entries(W)){if(J.startsWith("__")||YW.some((Q)=>Q.test(J)))continue;if(Z&&typeof Z==="object"&&!Array.isArray(Z))$[J]=XW(Z);else $[J]=Z}return $}function XW(W,$=0){if($>=p.maxSanitizeDepth)return"[Object too deep]";if(W===null||typeof W!=="object")return W;if(Array.isArray(W))return W.map((Z)=>XW(Z,$+1));if(W instanceof Date||W instanceof RegExp||W instanceof Map||W instanceof Set||W instanceof Error)return W;let J={};for(let[Z,Q]of Object.entries(W)){if(Z.startsWith("__")||Z==="constructor"||Z==="prototype")continue;if(Q&&typeof Q==="object")J[Z]=XW(Q,$+1);else J[Z]=Q}return J}function P(W,$){try{let J=MW($),Z=Object.keys(J),Q=Object.values(J);return d(W,Z)(...Q)}catch{return}}function c(W){try{return UW(W),!0}catch{return!1}}function WZ(W){try{return UW(W),null}catch($){return $ instanceof Error?$.message:String($)}}function JZ(W,$){try{let J=P(W,$);return Boolean(J)}catch{return!1}}function ZZ(W,$){try{let J=P(W,$);if(Array.isArray(J))return J;if(J&&typeof J==="object"&&"length"in J){let Z=J.length;if(typeof Z==="number"&&Number.isFinite(Z)&&Z>=0&&Number.isInteger(Z))return Array.from(J)}return[]}catch{return[]}}function $Z(W,$){try{let J=P(W,$);if(J&&typeof J==="object"&&!Array.isArray(J))return J;return{}}catch{return{}}}function d(W,$){let J=UW(W),Z=/^[A-Za-z_$][\w$]*$/,Q=[],Y=[];for(let X=0;X<$.length;X++){let F=$[X];if(!Z.test(F))continue;if(UJ.has(F))continue;Q.push(X),Y.push(F)}let U=Function(...Y,`
|
|
3
3
|
'use strict';
|
|
4
4
|
try {
|
|
5
5
|
return ${J};
|
package/dist/dev-server/index.js
CHANGED
|
@@ -612,7 +612,7 @@ ${q}`},hasEndTag:!1,description:"Coordinates multiple animations together as a g
|
|
|
612
612
|
`}),$}import y3 from"process";function m0($="STX_PUBLIC_"){let Z={},Y={};for(let[X,J]of Object.entries(y3.env)){if(!X.startsWith($)||J===void 0)continue;Z[`import.meta.env.${X}`]=JSON.stringify(J),Y[X]=J}return Z["import.meta.env"]=JSON.stringify(Y),Z}function dB($="STX_PUBLIC_"){let Z={};for(let[Y,X]of Object.entries(y3.env))if(Y.startsWith($)&&X!==void 0)Z[Y]=X;return Z}var f1=()=>{};var E9={};i(E9,{hasUserImports:()=>hJ,bundleClientScript:()=>mJ});import L0 from"path";import n0 from"fs";function hJ($){let Z=/^\s*import\s+(?!type\s)/gm;if(!$.match(Z))return!1;let X=/^\s*import\s+(?!type\s).*?\s+from\s+['"]([^'"]+)['"]/gm,J;while((J=X.exec($))!==null){let G=J[1];if(!C3.some((q)=>q.test(G)))return console.log("[stx:bundler] detected user import:",G),!0}let Q=/^\s*import\s+['"]([^'"]+)['"]/gm;while((J=Q.exec($))!==null){let G=J[1];if(!C3.some((q)=>q.test(G)))return console.log("[stx:bundler] detected side-effect import:",G),!0}return!1}function dJ($,Z,Y){let X=(J,Q)=>{let G=J===Y?Z:L0.dirname(J),K=L0.resolve(G,Q),q=[K,`${K}.ts`,`${K}.tsx`,`${K}.js`,`${K}.mjs`,`${K}.jsx`,L0.join(K,"index.ts"),L0.join(K,"index.tsx"),L0.join(K,"index.js"),L0.join(K,"index.mjs")];for(let z of q)try{if(n0.existsSync(z)&&n0.statSync(z,{throwIfNoEntry:!1})?.isFile())return z}catch{}return K};return{name:"stx-client-bundle",setup(J){J.onResolve({filter:/^(stx|@stacksjs\/stx|@stacksjs\/browser)$/},(Q)=>({path:Q.path,external:!0})),J.onResolve({filter:/^(@stores|@composables|stx\/stores)$/},(Q)=>({path:Q.path,external:!0})),J.onResolve({filter:/^\.\.?\//},(Q)=>{return{path:X(Q.importer,Q.path)}}),J.onResolve({filter:/^@\//},(Q)=>{let G=L0.resolve($,Q.path.slice(2)),K=[G,`${G}.ts`,`${G}.js`,L0.join(G,"index.ts"),L0.join(G,"index.js")];for(let q of K)if(n0.existsSync(q)&&n0.statSync(q,{throwIfNoEntry:!1})?.isFile())return console.log("[stx:bundler] resolved @/ import:",Q.path,"\u2192",q),{path:q};return console.warn("[stx:bundler] could not resolve @/ import:",Q.path),{path:G}})}}}async function mJ($,Z,Y={}){let X=Y.projectRoot||process.cwd(),J=Y.minify??!1,Q=Y.cacheDir||L0.join(X,".stx","bundle-cache"),G=new Bun.CryptoHasher("md5");G.update($+Z);let K=G.digest("hex").slice(0,12),q=L0.join(Q,`${K}.js`),z=Bun.file(q);if(await z.exists())return console.log("[stx:bundler] cache hit:",K),await z.text();let _=L0.join(X,".stx","bundle-tmp"),W=L0.join(_,`${K}.ts`),U=L0.join(_,"out",K);n0.mkdirSync(_,{recursive:!0}),n0.mkdirSync(U,{recursive:!0});let B=L0.dirname(Z),j=[],O=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,L=/^(export\s+)?(?:async\s+)?function\s+(\w+)/gm,F;while((F=O.exec($))!==null){if(F[1])continue;if(F[2])F[2].split(",").forEach((V)=>{let R=V.split(":")[0].trim();if(R)j.push(R)});else if(F[3])j.push(F[3])}while((F=L.exec($))!==null){if(F[1])continue;j.push(F[2])}let H=j.length>0?`
|
|
613
613
|
export { ${j.join(", ")} }`:"";await Bun.write(W,$+H),console.log("[stx:bundler] bundling:",K,"from:",L0.basename(Z));try{let V=await Bun.build({entrypoints:[W],outdir:U,target:"browser",format:"esm",minify:J,plugins:[dJ(X,B,W)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...m0()},root:X});if(!V.success){let w=V.logs.filter((A)=>A.level==="error").map((A)=>A.message).join(", ");return console.warn("[stx:bundler] build failed:",w),$}let R="";for(let w of V.outputs){R=await w.text();break}return R=R.replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),console.log("[stx:bundler] bundled:",K,"output:",R.length,"bytes"),n0.mkdirSync(Q,{recursive:!0}),await Bun.write(q,R),R}catch(V){let R=V instanceof Error?V.message:String(V),w=V?.errors,A=Array.isArray(w)&&w.length>0?`
|
|
614
614
|
${w.map((N)=>`- ${N?.message??N}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${R}${A}`),$}finally{try{n0.rmSync(W,{force:!0}),n0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var C3;var k9=b(()=>{f1();C3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function cB($){g1={...g1,...$}}function iB(){g1={...v3}}function nB(){return{...g1}}function lJ($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function cJ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(uJ.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&x3.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function iJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!x3.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function z5($){let Z=$.trim(),Y=lJ(Z);cJ(Y,Z),iJ(Z);for(let X of b9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!g1.allowBracketNotation&&pJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function f3($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||b9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=S9(X);else Z[Y]=X}return Z}function S9($,Z=0){if(Z>=g1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>S9(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=S9(J,Z+1);else Y[X]=J}return Y}function o($,Z){try{let Y=f3(Z),X=Object.keys(Y),J=Object.values(Y);return e($,X)(...J)}catch{return}}function t($){try{return z5($),!0}catch{return!1}}function oB($){try{return z5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function sB($,Z){try{let Y=o($,Z);return Boolean(Y)}catch{return!1}}function rB($,Z){try{let Y=o($,Z);if(Array.isArray(Y))return Y;if(Y&&typeof Y==="object"&&"length"in Y){let X=Y.length;if(typeof X==="number"&&Number.isFinite(X)&&X>=0&&Number.isInteger(X))return Array.from(Y)}return[]}catch{return[]}}function _0($,Z){try{let Y=o($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function e($,Z){let Y=z5($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(nJ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
615
|
+
`)}`:"";return console.warn(`[stx:bundler] error: ${R}${A}`),$}finally{try{n0.rmSync(W,{force:!0}),n0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var C3;var k9=b(()=>{f1();C3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function cB($){g1={...g1,...$}}function iB(){g1={...v3}}function nB(){return{...g1}}function lJ($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function cJ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(uJ.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&x3.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function iJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!x3.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function z5($){let Z=$.trim(),Y=lJ(Z);cJ(Y,Z),iJ(Z);for(let X of b9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!g1.allowBracketNotation&&pJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function f3($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||b9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=S9(X);else Z[Y]=X}return Z}function S9($,Z=0){if(Z>=g1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>S9(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=S9(J,Z+1);else Y[X]=J}return Y}function o($,Z){try{let Y=f3(Z),X=Object.keys(Y),J=Object.values(Y);return e($,X)(...J)}catch{return}}function t($){try{return z5($),!0}catch{return!1}}function oB($){try{return z5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function sB($,Z){try{let Y=o($,Z);return Boolean(Y)}catch{return!1}}function rB($,Z){try{let Y=o($,Z);if(Array.isArray(Y))return Y;if(Y&&typeof Y==="object"&&"length"in Y){let X=Y.length;if(typeof X==="number"&&Number.isFinite(X)&&X>=0&&Number.isInteger(X))return Array.from(Y)}return[]}catch{return[]}}function _0($,Z){try{let Y=o($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function e($,Z){let Y=z5($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!X.test(q))continue;if(nJ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
616
616
|
'use strict';
|
|
617
617
|
try {
|
|
618
618
|
return ${Y};
|
|
@@ -272,7 +272,7 @@ ${K}${H}
|
|
|
272
272
|
'use strict';
|
|
273
273
|
${X}${Y}
|
|
274
274
|
${K}
|
|
275
|
-
})()</script>`}var vO,fO,gO,mO,iO;var g7=D(()=>{j0();vO=["state","derived","effect","batch","untrack","peek","isSignal","isDerived","onMount","onDestroy","useRef","navigate","goBack","goForward","useRoute","setRouteParams","useSearchParams","useQuery","useMutation","useEventListener","useMeta","useDebounce","useDebouncedValue","useThrottle","useInterval","useTimeout","useToggle","useCounter","useClickOutside","useFocus","useAsync","useColorMode","useDark","ref","reactive","computed","watch","watchEffect","watchMultiple","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","defineProps","withDefaults","defineEmits","defineExpose","provide","inject","nextTick","getCurrentInstance","onErrorCaptured","useSlots","useAttrs","createStore","defineStore","useStore","action","createSelector","h","Fragment"],fO=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],gO=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process","Modal","Intl"]);mO={left:0,middle:1,right:2};iO=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"])});function aO($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function tO($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(rO.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&LG.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function eO($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!LG.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function x6($){let Z=$.trim(),Y=aO(Z);tO(Y,Z),eO(Z);for(let X of OG)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!HG.allowBracketNotation&&oO.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function $L($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||OG.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=tZ(X);else Z[Y]=X}return Z}function tZ($,Z=0){if(Z>=HG.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>tZ(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=tZ(J,Z+1);else Y[X]=J}return Y}function Q0($,Z){try{let Y=$L(Z),X=Object.keys(Y),J=Object.values(Y);return U0($,X)(...J)}catch{return}}function B0($){try{return x6($),!0}catch{return!1}}function k0($,Z){try{let Y=Q0($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function U0($,Z){let Y=x6($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let W=Z[K];if(!X.test(W))continue;if(ZL.has(W))continue;J.push(K),Q.push(W)}let G=Function(...Q,`
|
|
275
|
+
})()</script>`}var vO,fO,gO,mO,iO;var g7=D(()=>{j0();vO=["state","derived","effect","batch","untrack","peek","isSignal","isDerived","onMount","onDestroy","useRef","navigate","goBack","goForward","useRoute","setRouteParams","useSearchParams","useQuery","useMutation","useEventListener","useMeta","useDebounce","useDebouncedValue","useThrottle","useInterval","useTimeout","useToggle","useCounter","useClickOutside","useFocus","useAsync","useColorMode","useDark","ref","reactive","computed","watch","watchEffect","watchMultiple","onBeforeMount","onMounted","onBeforeUpdate","onUpdated","onBeforeUnmount","onUnmounted","defineProps","withDefaults","defineEmits","defineExpose","provide","inject","nextTick","getCurrentInstance","onErrorCaptured","useSlots","useAttrs","createStore","defineStore","useStore","action","createSelector","h","Fragment"],fO=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],gO=new Set(["Promise","Object","Array","Map","Set","Date","Error","JSON","Math","Number","String","RegExp","Symbol","WeakMap","WeakSet","Proxy","Reflect","Intl","URL","URLSearchParams","FormData","Headers","Request","Response","AbortController","EventTarget","Element","Document","Node","Window","Console","Storage","Navigator","Blob","File","FileReader","HTMLElement","SVGElement","Event","CustomEvent","DOMParser","XMLSerializer","WebSocket","Worker","SharedWorker","IntersectionObserver","MutationObserver","ResizeObserver","PerformanceObserver","Notification","Bun","Buffer","Process","Modal","Intl"]);mO={left:0,middle:1,right:2};iO=new Set(["if","else","true","false","null","undefined","typeof","instanceof","in","of","new","this","return","void","delete","throw","switch","case","break","continue","for","while","do","try","catch","finally","const","let","var","function","class","import","export","default","async","await","yield","with","debugger","console","window","document","Math","JSON","Date","Array","Object","String","Number","Boolean","Symbol","Map","Set","Promise","Error","parseInt","parseFloat","isNaN","isFinite","encodeURIComponent","decodeURIComponent","setTimeout","setInterval","clearTimeout","clearInterval","fetch","alert","confirm","prompt","event"])});function aO($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function tO($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(rO.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&LG.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function eO($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!LG.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function x6($){let Z=$.trim(),Y=aO(Z);tO(Y,Z),eO(Z);for(let X of OG)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!HG.allowBracketNotation&&oO.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function $L($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||OG.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=tZ(X);else Z[Y]=X}return Z}function tZ($,Z=0){if(Z>=HG.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>tZ(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=tZ(J,Z+1);else Y[X]=J}return Y}function Q0($,Z){try{let Y=$L(Z),X=Object.keys(Y),J=Object.values(Y);return U0($,X)(...J)}catch{return}}function B0($){try{return x6($),!0}catch{return!1}}function k0($,Z){try{let Y=Q0($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function U0($,Z){let Y=x6($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let W=Z[K];if(!X.test(W))continue;if(ZL.has(W))continue;J.push(K),Q.push(W)}let G=Function(...Q,`
|
|
276
276
|
'use strict';
|
|
277
277
|
try {
|
|
278
278
|
return ${Y};
|
|
@@ -192,7 +192,7 @@ else {
|
|
|
192
192
|
};
|
|
193
193
|
})();
|
|
194
194
|
</script>
|
|
195
|
-
`}function T1($,Z,Y={}){let X=dQ(Z,Y),J=$.lastIndexOf("</body>");if(J!==-1)return $.slice(0,J)+X+$.slice(J);if($.includes("</html>"))return $.replace("</html>",`${X}</html>`);return $+X}function b7($){let Z=$.toLowerCase();return Z.endsWith(".css")||Z.endsWith(".scss")||Z.endsWith(".sass")||Z.endsWith(".less")}function C7($){let Z=$.toLowerCase();return[".stx",".html",".htm",".md",".js",".ts",".jsx",".tsx",".json"].some((X)=>Z.endsWith(X))}function y7($){return[/^\./,/node_modules/,/\.stx\/output/,/\.stx\/cache/,/~$/,/\.swp$/,/\.swo$/].some((Y)=>Y.test($))}function P7($){if(!q5)q5=new IZ($);return q5}function j5(){if(q5)q5.stop(),q5=null}var q5=null;function rH($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function oH($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(nH.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&pQ.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function aH($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!pQ.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function M6($){let Z=$.trim(),Y=rH(Z);oH(Y,Z),aH(Z);for(let X of mQ)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!uQ.allowBracketNotation&&sH.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function tH($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||mQ.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=DZ(X);else Z[Y]=X}return Z}function DZ($,Z=0){if(Z>=uQ.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>DZ(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=DZ(J,Z+1);else Y[X]=J}return Y}function Q0($,Z){try{let Y=tH(Z),X=Object.keys(Y),J=Object.values(Y);return U0($,X)(...J)}catch{return}}function B0($){try{return M6($),!0}catch{return!1}}function k0($,Z){try{let Y=Q0($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function U0($,Z){let Y=M6($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let W=Z[K];if(!X.test(W))continue;if(eH.has(W))continue;J.push(K),Q.push(W)}let G=Function(...Q,`
|
|
195
|
+
`}function T1($,Z,Y={}){let X=dQ(Z,Y),J=$.lastIndexOf("</body>");if(J!==-1)return $.slice(0,J)+X+$.slice(J);if($.includes("</html>"))return $.replace("</html>",`${X}</html>`);return $+X}function b7($){let Z=$.toLowerCase();return Z.endsWith(".css")||Z.endsWith(".scss")||Z.endsWith(".sass")||Z.endsWith(".less")}function C7($){let Z=$.toLowerCase();return[".stx",".html",".htm",".md",".js",".ts",".jsx",".tsx",".json"].some((X)=>Z.endsWith(X))}function y7($){return[/^\./,/node_modules/,/\.stx\/output/,/\.stx\/cache/,/~$/,/\.swp$/,/\.swo$/].some((Y)=>Y.test($))}function P7($){if(!q5)q5=new IZ($);return q5}function j5(){if(q5)q5.stop(),q5=null}var q5=null;function rH($){let Z="",Y=null,X=!1;for(let J=0;J<$.length;J++){let Q=$[J];if(X){X=!1;continue}if(Q==="\\"&&Y){X=!0;continue}if(Y){if(Y==="`"&&Q==="$"&&J+1<$.length&&$[J+1]==="{"){let G=1;J+=2;while(J<$.length&&G>0){if($[J]==="{")G++;else if($[J]==="}")G--;if(G>0)Z+=$[J],J++}continue}if(Q===Y)Y=null;continue}if(Q==='"'||Q==="'"||Q==="`"){Y=Q;continue}Z+=Q}return Z}function oH($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(nH.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&pQ.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function aH($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!pQ.has(X))continue;let J=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],Q=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((J==="{"||J===",")&&Q===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function M6($){let Z=$.trim(),Y=rH(Z);oH(Y,Z),aH(Z);for(let X of mQ)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!uQ.allowBracketNotation&&sH.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function tH($){let Z={};Z.Math=Math,Z.JSON=JSON,Z.Date=Date,Z.String=String,Z.Number=Number,Z.Boolean=Boolean,Z.Array=Array,Z.parseInt=Number.parseInt,Z.parseFloat=Number.parseFloat,Z.isNaN=Number.isNaN,Z.isFinite=Number.isFinite,Z.encodeURIComponent=encodeURIComponent,Z.decodeURIComponent=decodeURIComponent;for(let[Y,X]of Object.entries($)){if(Y.startsWith("__")||mQ.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=DZ(X);else Z[Y]=X}return Z}function DZ($,Z=0){if(Z>=uQ.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>DZ(X,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[X,J]of Object.entries($)){if(X.startsWith("__")||X==="constructor"||X==="prototype")continue;if(J&&typeof J==="object")Y[X]=DZ(J,Z+1);else Y[X]=J}return Y}function Q0($,Z){try{let Y=tH(Z),X=Object.keys(Y),J=Object.values(Y);return U0($,X)(...J)}catch{return}}function B0($){try{return M6($),!0}catch{return!1}}function k0($,Z){try{let Y=Q0($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function U0($,Z){let Y=M6($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let W=Z[K];if(!X.test(W))continue;if(eH.has(W))continue;J.push(K),Q.push(W)}let G=Function(...Q,`
|
|
196
196
|
'use strict';
|
|
197
197
|
try {
|
|
198
198
|
return ${Y};
|