@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
|
@@ -4818,7 +4818,7 @@ ${K}${H}
|
|
|
4818
4818
|
'use strict';
|
|
4819
4819
|
${X}${Y}
|
|
4820
4820
|
${K}
|
|
4821
|
-
})()</script>`}var hY,dY,mY,cY,sY;var e$=S(()=>{O0();hY=["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"],dY=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],mY=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"]);cY={left:0,middle:1,right:2};sY=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 $X($){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 ZX($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let Q=X[0],J=$[X.index-1];if(tY.has(Q))throw Error(`Potentially unsafe expression (identifier ${Q}): ${Z}`);if(J==="."&&g7.has(Q))throw Error(`Potentially unsafe expression (property ${Q}): ${Z}`)}}function YX($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!g7.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 I5($){let Z=$.trim(),Y=$X(Z);ZX(Y,Z),YX(Z);for(let X of f7)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!x7.allowBracketNotation&&eY.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function XX($){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("__")||f7.some((Q)=>Q.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=$9(X);else Z[Y]=X}return Z}function $9($,Z=0){if(Z>=x7.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>$9(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]=$9(Q,Z+1);else Y[X]=Q}return Y}function i($,Z){try{let Y=XX(Z),X=Object.keys(Y),Q=Object.values(Y);return $0($,X)(...Q)}catch{return}}function e($){try{return I5($),!0}catch{return!1}}function U0($,Z){try{let Y=i($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function $0($,Z){let Y=I5($),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(JX.has(q))continue;Q.push(K),J.push(q)}let G=Function(...J,`
|
|
4821
|
+
})()</script>`}var hY,dY,mY,cY,sY;var e$=S(()=>{O0();hY=["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"],dY=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],mY=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"]);cY={left:0,middle:1,right:2};sY=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 $X($){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 ZX($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let Q=X[0],J=$[X.index-1];if(tY.has(Q))throw Error(`Potentially unsafe expression (matched /\\b${Q}\\b/; identifier ${Q}): ${Z}`);if(J==="."&&g7.has(Q))throw Error(`Potentially unsafe expression (matched /.${Q}/; property ${Q}): ${Z}`)}}function YX($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!g7.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 I5($){let Z=$.trim(),Y=$X(Z);ZX(Y,Z),YX(Z);for(let X of f7)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!x7.allowBracketNotation&&eY.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function XX($){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("__")||f7.some((Q)=>Q.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=$9(X);else Z[Y]=X}return Z}function $9($,Z=0){if(Z>=x7.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>$9(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]=$9(Q,Z+1);else Y[X]=Q}return Y}function i($,Z){try{let Y=XX(Z),X=Object.keys(Y),Q=Object.values(Y);return $0($,X)(...Q)}catch{return}}function e($){try{return I5($),!0}catch{return!1}}function U0($,Z){try{let Y=i($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function $0($,Z){let Y=I5($),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(JX.has(q))continue;Q.push(K),J.push(q)}let G=Function(...J,`
|
|
4822
4822
|
'use strict';
|
|
4823
4823
|
try {
|
|
4824
4824
|
return ${Y};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var T4=Object.defineProperty;var I4=($)=>$;function M4($,Z){this[$]=I4.bind(null,Z)}var W1=($,Z)=>{for(var Y in Z)T4($,Y,{get:Z[Y],enumerable:!0,configurable:!0,set:M4.bind(Z,Y)})};var V=($,Z)=>()=>($&&(Z=$($=0)),Z);var C=import.meta.require;import P5 from"fs";import D4 from"path";function v5($){let Z=D4.join($,"manifest.json");if(!P5.existsSync(Z))return null;try{let Y=P5.readFileSync(Z,"utf-8"),J=JSON.parse(Y);if(J.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${J.version}`),null;return J}catch(Y){return console.warn("[stx] Failed to load manifest:",Y),null}}var x5=()=>{};function $0($,Z,Y,J=0){let X=0,G=J,Q=null,K=0,q=!1;while(G<$.length){let U=$[G];if(Q&&q){q=!1,G++;continue}if(Q&&U==="\\"){q=!0,G++;continue}if(q=!1,(U==='"'||U==="'"||U==="`")&&!Q){Q=U,G++;continue}if(U===Q&&Q!=="`"){Q=null,G++;continue}if(Q==="`"&&U==="$"&&$[G+1]==="{"){K++,G+=2;continue}if(K>0&&U==="}"){K--,G++;continue}if(U==="`"&&Q==="`"&&K===0){Q=null,G++;continue}if(Q){G++;continue}if(U===Z)X++;else if(U===Y){if(X--,X===0)return G}G++}return-1}function _1(){return z1}function B1($){z1=E4(z1,$)}function E4($,Z){return{title:Z.title??$.title,titleTemplate:Z.titleTemplate??$.titleTemplate,base:Z.base??$.base,meta:[...$.meta||[],...Z.meta||[]],link:[...$.link||[],...Z.link||[]],script:[...$.script||[],...Z.script||[]],style:[...$.style||[],...Z.style||[]],htmlAttrs:{...$.htmlAttrs,...Z.htmlAttrs},bodyAttrs:{...$.bodyAttrs,...Z.bodyAttrs}}}function f5($){let Z=[];if($.description)Z.push({name:"description",content:$.description});if($.keywords){let q=Array.isArray($.keywords)?$.keywords.join(", "):$.keywords;Z.push({name:"keywords",content:q})}if($.author)Z.push({name:"author",content:$.author});if($.robots)Z.push({name:"robots",content:$.robots});let Y=$.ogTitle??$.title,J=$.ogDescription??$.description;if(Y)Z.push({property:"og:title",content:Y});if(J)Z.push({property:"og:description",content:J});if($.ogImage)Z.push({property:"og:image",content:$.ogImage});if($.ogUrl)Z.push({property:"og:url",content:$.ogUrl});if($.ogType)Z.push({property:"og:type",content:$.ogType});if($.ogSiteName)Z.push({property:"og:site_name",content:$.ogSiteName});if($.ogLocale)Z.push({property:"og:locale",content:$.ogLocale});let X=$.twitterTitle??$.title,G=$.twitterDescription??$.description,Q=$.twitterImage??$.ogImage;if($.twitterCard)Z.push({name:"twitter:card",content:$.twitterCard});if(X)Z.push({name:"twitter:title",content:X});if(G)Z.push({name:"twitter:description",content:G});if(Q)Z.push({name:"twitter:image",content:Q});if($.twitterSite)Z.push({name:"twitter:site",content:$.twitterSite});if($.twitterCreator)Z.push({name:"twitter:creator",content:$.twitterCreator});if($.articleAuthor)Z.push({property:"article:author",content:$.articleAuthor});if($.articlePublishedTime)Z.push({property:"article:published_time",content:$.articlePublishedTime});if($.articleModifiedTime)Z.push({property:"article:modified_time",content:$.articleModifiedTime});if($.articleSection)Z.push({property:"article:section",content:$.articleSection});if($.articleTags)for(let q of $.articleTags)Z.push({property:"article:tag",content:q});let K=[];if($.canonical)K.push({rel:"canonical",href:$.canonical});B1({title:$.title,titleTemplate:$.titleTemplate,meta:Z,link:K})}var z1;var j1=V(()=>{z1={}});import k4 from"process";function b0($="STX_PUBLIC_"){let Z={},Y={};for(let[J,X]of Object.entries(k4.env)){if(!J.startsWith($)||X===void 0)continue;Z[`import.meta.env.${J}`]=JSON.stringify(X),Y[J]=X}return Z["import.meta.env"]=JSON.stringify(Y),Z}var S0=()=>{};function C4($){let Z="",Y=null,J=!1;for(let X=0;X<$.length;X++){let G=$[X];if(J){J=!1;continue}if(G==="\\"&&Y){J=!0;continue}if(Y){if(Y==="`"&&G==="$"&&X+1<$.length&&$[X+1]==="{"){let Q=1;X+=2;while(X<$.length&&Q>0){if($[X]==="{")Q++;else if($[X]==="}")Q--;if(Q>0)Z+=$[X],X++}continue}if(G===Y)Y=null;continue}if(G==='"'||G==="'"||G==="`"){Y=G;continue}Z+=G}return Z}function P4($,Z){let Y=/[$A-Z_a-z][$\w]*/g,J;while((J=Y.exec($))!==null){let X=J[0],G=$[J.index-1];if(S4.has(X))throw Error(`Potentially unsafe expression (identifier ${X}): ${Z}`);if(G==="."&&d5.has(X))throw Error(`Potentially unsafe expression (property ${X}): ${Z}`)}}function v4($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let J=Y[2];if(!d5.has(J))continue;let X=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],G=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((X==="{"||X===",")&&G===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function O1($){let Z=$.trim(),Y=C4(Z);P4(Y,Z),v4(Z);for(let J of h5)if(J.test(Y))throw Error(`Potentially unsafe expression (matched /${J.source}/): ${Z}`);if(!g5.allowBracketNotation&&y4.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function x4($){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,J]of Object.entries($)){if(Y.startsWith("__")||h5.some((X)=>X.test(Y)))continue;if(J&&typeof J==="object"&&!Array.isArray(J))Z[Y]=H1(J);else Z[Y]=J}return Z}function H1($,Z=0){if(Z>=g5.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((J)=>H1(J,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[J,X]of Object.entries($)){if(J.startsWith("__")||J==="constructor"||J==="prototype")continue;if(X&&typeof X==="object")Y[J]=H1(X,Z+1);else Y[J]=X}return Y}function h($,Z){try{let Y=x4(Z),J=Object.keys(Y),X=Object.values(Y);return Y0($,J)(...X)}catch{return}}function Z0($){try{return O1($),!0}catch{return!1}}function Y0($,Z){let Y=O1($),J=/^[A-Za-z_$][\w$]*$/,X=[],G=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!J.test(q))continue;if(f4.has(q))continue;X.push(K),G.push(q)}let Q=Function(...G,`
|
|
2
|
+
var T4=Object.defineProperty;var I4=($)=>$;function M4($,Z){this[$]=I4.bind(null,Z)}var W1=($,Z)=>{for(var Y in Z)T4($,Y,{get:Z[Y],enumerable:!0,configurable:!0,set:M4.bind(Z,Y)})};var V=($,Z)=>()=>($&&(Z=$($=0)),Z);var C=import.meta.require;import P5 from"fs";import D4 from"path";function v5($){let Z=D4.join($,"manifest.json");if(!P5.existsSync(Z))return null;try{let Y=P5.readFileSync(Z,"utf-8"),J=JSON.parse(Y);if(J.version!==1)return console.warn(`[stx] Manifest version mismatch: expected 1, got ${J.version}`),null;return J}catch(Y){return console.warn("[stx] Failed to load manifest:",Y),null}}var x5=()=>{};function $0($,Z,Y,J=0){let X=0,G=J,Q=null,K=0,q=!1;while(G<$.length){let U=$[G];if(Q&&q){q=!1,G++;continue}if(Q&&U==="\\"){q=!0,G++;continue}if(q=!1,(U==='"'||U==="'"||U==="`")&&!Q){Q=U,G++;continue}if(U===Q&&Q!=="`"){Q=null,G++;continue}if(Q==="`"&&U==="$"&&$[G+1]==="{"){K++,G+=2;continue}if(K>0&&U==="}"){K--,G++;continue}if(U==="`"&&Q==="`"&&K===0){Q=null,G++;continue}if(Q){G++;continue}if(U===Z)X++;else if(U===Y){if(X--,X===0)return G}G++}return-1}function _1(){return z1}function B1($){z1=E4(z1,$)}function E4($,Z){return{title:Z.title??$.title,titleTemplate:Z.titleTemplate??$.titleTemplate,base:Z.base??$.base,meta:[...$.meta||[],...Z.meta||[]],link:[...$.link||[],...Z.link||[]],script:[...$.script||[],...Z.script||[]],style:[...$.style||[],...Z.style||[]],htmlAttrs:{...$.htmlAttrs,...Z.htmlAttrs},bodyAttrs:{...$.bodyAttrs,...Z.bodyAttrs}}}function f5($){let Z=[];if($.description)Z.push({name:"description",content:$.description});if($.keywords){let q=Array.isArray($.keywords)?$.keywords.join(", "):$.keywords;Z.push({name:"keywords",content:q})}if($.author)Z.push({name:"author",content:$.author});if($.robots)Z.push({name:"robots",content:$.robots});let Y=$.ogTitle??$.title,J=$.ogDescription??$.description;if(Y)Z.push({property:"og:title",content:Y});if(J)Z.push({property:"og:description",content:J});if($.ogImage)Z.push({property:"og:image",content:$.ogImage});if($.ogUrl)Z.push({property:"og:url",content:$.ogUrl});if($.ogType)Z.push({property:"og:type",content:$.ogType});if($.ogSiteName)Z.push({property:"og:site_name",content:$.ogSiteName});if($.ogLocale)Z.push({property:"og:locale",content:$.ogLocale});let X=$.twitterTitle??$.title,G=$.twitterDescription??$.description,Q=$.twitterImage??$.ogImage;if($.twitterCard)Z.push({name:"twitter:card",content:$.twitterCard});if(X)Z.push({name:"twitter:title",content:X});if(G)Z.push({name:"twitter:description",content:G});if(Q)Z.push({name:"twitter:image",content:Q});if($.twitterSite)Z.push({name:"twitter:site",content:$.twitterSite});if($.twitterCreator)Z.push({name:"twitter:creator",content:$.twitterCreator});if($.articleAuthor)Z.push({property:"article:author",content:$.articleAuthor});if($.articlePublishedTime)Z.push({property:"article:published_time",content:$.articlePublishedTime});if($.articleModifiedTime)Z.push({property:"article:modified_time",content:$.articleModifiedTime});if($.articleSection)Z.push({property:"article:section",content:$.articleSection});if($.articleTags)for(let q of $.articleTags)Z.push({property:"article:tag",content:q});let K=[];if($.canonical)K.push({rel:"canonical",href:$.canonical});B1({title:$.title,titleTemplate:$.titleTemplate,meta:Z,link:K})}var z1;var j1=V(()=>{z1={}});import k4 from"process";function b0($="STX_PUBLIC_"){let Z={},Y={};for(let[J,X]of Object.entries(k4.env)){if(!J.startsWith($)||X===void 0)continue;Z[`import.meta.env.${J}`]=JSON.stringify(X),Y[J]=X}return Z["import.meta.env"]=JSON.stringify(Y),Z}var S0=()=>{};function C4($){let Z="",Y=null,J=!1;for(let X=0;X<$.length;X++){let G=$[X];if(J){J=!1;continue}if(G==="\\"&&Y){J=!0;continue}if(Y){if(Y==="`"&&G==="$"&&X+1<$.length&&$[X+1]==="{"){let Q=1;X+=2;while(X<$.length&&Q>0){if($[X]==="{")Q++;else if($[X]==="}")Q--;if(Q>0)Z+=$[X],X++}continue}if(G===Y)Y=null;continue}if(G==='"'||G==="'"||G==="`"){Y=G;continue}Z+=G}return Z}function P4($,Z){let Y=/[$A-Z_a-z][$\w]*/g,J;while((J=Y.exec($))!==null){let X=J[0],G=$[J.index-1];if(S4.has(X))throw Error(`Potentially unsafe expression (matched /\\b${X}\\b/; identifier ${X}): ${Z}`);if(G==="."&&d5.has(X))throw Error(`Potentially unsafe expression (matched /.${X}/; property ${X}): ${Z}`)}}function v4($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let J=Y[2];if(!d5.has(J))continue;let X=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],G=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((X==="{"||X===",")&&G===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function O1($){let Z=$.trim(),Y=C4(Z);P4(Y,Z),v4(Z);for(let J of h5)if(J.test(Y))throw Error(`Potentially unsafe expression (matched /${J.source}/): ${Z}`);if(!g5.allowBracketNotation&&y4.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function x4($){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,J]of Object.entries($)){if(Y.startsWith("__")||h5.some((X)=>X.test(Y)))continue;if(J&&typeof J==="object"&&!Array.isArray(J))Z[Y]=H1(J);else Z[Y]=J}return Z}function H1($,Z=0){if(Z>=g5.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((J)=>H1(J,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[J,X]of Object.entries($)){if(J.startsWith("__")||J==="constructor"||J==="prototype")continue;if(X&&typeof X==="object")Y[J]=H1(X,Z+1);else Y[J]=X}return Y}function h($,Z){try{let Y=x4(Z),J=Object.keys(Y),X=Object.values(Y);return Y0($,J)(...X)}catch{return}}function Z0($){try{return O1($),!0}catch{return!1}}function Y0($,Z){let Y=O1($),J=/^[A-Za-z_$][\w$]*$/,X=[],G=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!J.test(q))continue;if(f4.has(q))continue;X.push(K),G.push(q)}let Q=Function(...G,`
|
|
3
3
|
'use strict';
|
|
4
4
|
try {
|
|
5
5
|
return ${Y};
|
package/dist/pwa/index.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 cB($="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 h1=()=>{};var v9={};c(v9,{hasUserImports:()=>sJ,bundleClientScript:()=>aJ});import L0 from"path";import n0 from"fs";function sJ($){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(!i3.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(!i3.some((q)=>q.test(G)))return console.log("[stx:bundler] detected side-effect import:",G),!0}return!1}function rJ($,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 W of q)try{if(n0.existsSync(W)&&n0.statSync(W,{throwIfNoEntry:!1})?.isFile())return W}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 aJ($,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`),W=Bun.file(q);if(await W.exists())return console.log("[stx:bundler] cache hit:",K),await W.text();let U=L0.join(X,".stx","bundle-tmp"),_=L0.join(U,`${K}.ts`),z=L0.join(U,"out",K);n0.mkdirSync(U,{recursive:!0}),n0.mkdirSync(z,{recursive:!0});let B=L0.dirname(Z),j=[],O=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,H=/^(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 N=V.split(":")[0].trim();if(N)j.push(N)});else if(F[3])j.push(F[3])}while((F=H.exec($))!==null){if(F[1])continue;j.push(F[2])}let L=j.length>0?`
|
|
613
613
|
export { ${j.join(", ")} }`:"";await Bun.write(_,$+L),console.log("[stx:bundler] bundling:",K,"from:",L0.basename(Z));try{let V=await Bun.build({entrypoints:[_],outdir:z,target:"browser",format:"esm",minify:J,plugins:[rJ(X,B,_)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...m0()},root:X});if(!V.success){let R=V.logs.filter((w)=>w.level==="error").map((w)=>w.message).join(", ");return console.warn("[stx:bundler] build failed:",R),$}let N="";for(let R of V.outputs){N=await R.text();break}return N=N.replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),console.log("[stx:bundler] bundled:",K,"output:",N.length,"bytes"),n0.mkdirSync(Q,{recursive:!0}),await Bun.write(q,N),N}catch(V){let N=V instanceof Error?V.message:String(V),R=V?.errors,w=Array.isArray(R)&&R.length>0?`
|
|
614
614
|
${R.map((A)=>`- ${A?.message??A}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${N}${w}`),$}finally{try{n0.rmSync(_,{force:!0}),n0.rmSync(z,{recursive:!0,force:!0})}catch{}}}var i3;var x9=b(()=>{h1();i3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function rB($){d1={...d1,...$}}function aB(){d1={...o3}}function tB(){return{...d1}}function $Q($){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 ZQ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(tJ.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&s3.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function YQ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!s3.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=$Q(Z);ZQ(Y,Z),YQ(Z);for(let X of g9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!d1.allowBracketNotation&&eJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function r3($){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("__")||g9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=f9(X);else Z[Y]=X}return Z}function f9($,Z=0){if(Z>=d1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>f9(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]=f9(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=r3(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 eB($){try{return z5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function $j($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function Zj($,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 U0($,Z){try{let Y=n($,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(XQ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
615
|
+
`)}`:"";return console.warn(`[stx:bundler] error: ${N}${w}`),$}finally{try{n0.rmSync(_,{force:!0}),n0.rmSync(z,{recursive:!0,force:!0})}catch{}}}var i3;var x9=b(()=>{h1();i3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function rB($){d1={...d1,...$}}function aB(){d1={...o3}}function tB(){return{...d1}}function $Q($){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 ZQ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(tJ.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&s3.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function YQ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!s3.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=$Q(Z);ZQ(Y,Z),YQ(Z);for(let X of g9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!d1.allowBracketNotation&&eJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function r3($){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("__")||g9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=f9(X);else Z[Y]=X}return Z}function f9($,Z=0){if(Z>=d1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>f9(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]=f9(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=r3(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 eB($){try{return z5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function $j($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function Zj($,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 U0($,Z){try{let Y=n($,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(XQ.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/pwa/offline.js
CHANGED
|
@@ -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 TB($="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 f1=()=>{};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(!y3.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(!y3.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 _=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:[vJ(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 y3;var k9=b(()=>{f1();y3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function kB($){g1={...g1,...$}}function SB(){g1={...P3}}function bB(){return{...g1}}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==="."&&v3.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(!v3.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=hJ(Z);dJ(Y,Z),mJ(Z);for(let X of b9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!g1.allowBracketNotation&&gJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function x3($){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 n($,Z){try{let Y=x3(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 yB($){try{return z5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function CB($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function PB($,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=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(uJ.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 y3;var k9=b(()=>{f1();y3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function kB($){g1={...g1,...$}}function SB(){g1={...P3}}function bB(){return{...g1}}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==="."&&v3.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(!v3.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=hJ(Z);dJ(Y,Z),mJ(Z);for(let X of b9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!g1.allowBracketNotation&&gJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function x3($){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 n($,Z){try{let Y=x3(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 yB($){try{return z5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function CB($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function PB($,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=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(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/pwa.js
CHANGED
|
@@ -1890,7 +1890,7 @@ ${K}${O}
|
|
|
1890
1890
|
'use strict';
|
|
1891
1891
|
${X}${Y}
|
|
1892
1892
|
${K}
|
|
1893
|
-
})()</script>`}var AX,wX,TX,DX,yX;var Z9=b(()=>{H0();AX=["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"],wX=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],TX=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"]);DX={left:0,middle:1,right:2};yX=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 fX($){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 gX($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let Q=X[0],J=$[X.index-1];if(vX.has(Q))throw Error(`Potentially unsafe expression (identifier ${Q}): ${Z}`);if(J==="."&&K3.has(Q))throw Error(`Potentially unsafe expression (property ${Q}): ${Z}`)}}function hX($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!K3.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 M5($){let Z=$.trim(),Y=fX(Z);gX(Y,Z),hX(Z);for(let X of G3)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!Q3.allowBracketNotation&&xX.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function dX($){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("__")||G3.some((Q)=>Q.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=Y9(X);else Z[Y]=X}return Z}function Y9($,Z=0){if(Z>=Q3.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>Y9(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]=Y9(Q,Z+1);else Y[X]=Q}return Y}function i($,Z){try{let Y=dX(Z),X=Object.keys(Y),Q=Object.values(Y);return $0($,X)(...Q)}catch{return}}function e($){try{return M5($),!0}catch{return!1}}function _0($,Z){try{let Y=i($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function $0($,Z){let Y=M5($),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(mX.has(q))continue;Q.push(K),J.push(q)}let G=Function(...J,`
|
|
1893
|
+
})()</script>`}var AX,wX,TX,DX,yX;var Z9=b(()=>{H0();AX=["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"],wX=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],TX=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"]);DX={left:0,middle:1,right:2};yX=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 fX($){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 gX($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let Q=X[0],J=$[X.index-1];if(vX.has(Q))throw Error(`Potentially unsafe expression (matched /\\b${Q}\\b/; identifier ${Q}): ${Z}`);if(J==="."&&K3.has(Q))throw Error(`Potentially unsafe expression (matched /.${Q}/; property ${Q}): ${Z}`)}}function hX($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!K3.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 M5($){let Z=$.trim(),Y=fX(Z);gX(Y,Z),hX(Z);for(let X of G3)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!Q3.allowBracketNotation&&xX.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function dX($){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("__")||G3.some((Q)=>Q.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=Y9(X);else Z[Y]=X}return Z}function Y9($,Z=0){if(Z>=Q3.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>Y9(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]=Y9(Q,Z+1);else Y[X]=Q}return Y}function i($,Z){try{let Y=dX(Z),X=Object.keys(Y),Q=Object.values(Y);return $0($,X)(...Q)}catch{return}}function e($){try{return M5($),!0}catch{return!1}}function _0($,Z){try{let Y=i($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function $0($,Z){let Y=M5($),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(mX.has(q))continue;Q.push(K),J.push(q)}let G=Function(...J,`
|
|
1894
1894
|
'use strict';
|
|
1895
1895
|
try {
|
|
1896
1896
|
return ${Y};
|
package/dist/reactive.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var u9=Object.defineProperty;var l9=($)=>$;function p9($,Z){this[$]=l9.bind(null,Z)}var s0=($,Z)=>{for(var Y in Z)u9($,Y,{get:Z[Y],enumerable:!0,configurable:!0,set:p9.bind(Z,Y)})};var O=($,Z)=>()=>($&&(Z=$($=0)),Z);var S=import.meta.require;function o9($){let Z="",Y=null,J=!1;for(let X=0;X<$.length;X++){let G=$[X];if(J){J=!1;continue}if(G==="\\"&&Y){J=!0;continue}if(Y){if(Y==="`"&&G==="$"&&X+1<$.length&&$[X+1]==="{"){let Q=1;X+=2;while(X<$.length&&Q>0){if($[X]==="{")Q++;else if($[X]==="}")Q--;if(Q>0)Z+=$[X],X++}continue}if(G===Y)Y=null;continue}if(G==='"'||G==="'"||G==="`"){Y=G;continue}Z+=G}return Z}function s9($,Z){let Y=/[$A-Z_a-z][$\w]*/g,J;while((J=Y.exec($))!==null){let X=J[0],G=$[J.index-1];if(i9.has(X))throw Error(`Potentially unsafe expression (identifier ${X}): ${Z}`);if(G==="."&&W5.has(X))throw Error(`Potentially unsafe expression (property ${X}): ${Z}`)}}function r9($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let J=Y[2];if(!W5.has(J))continue;let X=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],G=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((X==="{"||X===",")&&G===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function a0($){let Z=$.trim(),Y=o9(Z);s9(Y,Z),r9(Z);for(let J of U5)if(J.test(Y))throw Error(`Potentially unsafe expression (matched /${J.source}/): ${Z}`);if(!_5.allowBracketNotation&&n9.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function a9($){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,J]of Object.entries($)){if(Y.startsWith("__")||U5.some((X)=>X.test(Y)))continue;if(J&&typeof J==="object"&&!Array.isArray(J))Z[Y]=r0(J);else Z[Y]=J}return Z}function r0($,Z=0){if(Z>=_5.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((J)=>r0(J,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[J,X]of Object.entries($)){if(J.startsWith("__")||J==="constructor"||J==="prototype")continue;if(X&&typeof X==="object")Y[J]=r0(X,Z+1);else Y[J]=X}return Y}function c($,Z){try{let Y=a9(Z),J=Object.keys(Y),X=Object.values(Y);return o($,J)(...X)}catch{return}}function n($){try{return a0($),!0}catch{return!1}}function o($,Z){let Y=a0($),J=/^[A-Za-z_$][\w$]*$/,X=[],G=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!J.test(q))continue;if(t9.has(q))continue;X.push(K),G.push(q)}let Q=Function(...G,`
|
|
2
|
+
var u9=Object.defineProperty;var l9=($)=>$;function p9($,Z){this[$]=l9.bind(null,Z)}var s0=($,Z)=>{for(var Y in Z)u9($,Y,{get:Z[Y],enumerable:!0,configurable:!0,set:p9.bind(Z,Y)})};var O=($,Z)=>()=>($&&(Z=$($=0)),Z);var S=import.meta.require;function o9($){let Z="",Y=null,J=!1;for(let X=0;X<$.length;X++){let G=$[X];if(J){J=!1;continue}if(G==="\\"&&Y){J=!0;continue}if(Y){if(Y==="`"&&G==="$"&&X+1<$.length&&$[X+1]==="{"){let Q=1;X+=2;while(X<$.length&&Q>0){if($[X]==="{")Q++;else if($[X]==="}")Q--;if(Q>0)Z+=$[X],X++}continue}if(G===Y)Y=null;continue}if(G==='"'||G==="'"||G==="`"){Y=G;continue}Z+=G}return Z}function s9($,Z){let Y=/[$A-Z_a-z][$\w]*/g,J;while((J=Y.exec($))!==null){let X=J[0],G=$[J.index-1];if(i9.has(X))throw Error(`Potentially unsafe expression (matched /\\b${X}\\b/; identifier ${X}): ${Z}`);if(G==="."&&W5.has(X))throw Error(`Potentially unsafe expression (matched /.${X}/; property ${X}): ${Z}`)}}function r9($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let J=Y[2];if(!W5.has(J))continue;let X=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],G=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((X==="{"||X===",")&&G===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function a0($){let Z=$.trim(),Y=o9(Z);s9(Y,Z),r9(Z);for(let J of U5)if(J.test(Y))throw Error(`Potentially unsafe expression (matched /${J.source}/): ${Z}`);if(!_5.allowBracketNotation&&n9.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function a9($){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,J]of Object.entries($)){if(Y.startsWith("__")||U5.some((X)=>X.test(Y)))continue;if(J&&typeof J==="object"&&!Array.isArray(J))Z[Y]=r0(J);else Z[Y]=J}return Z}function r0($,Z=0){if(Z>=_5.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((J)=>r0(J,Z+1));if($ instanceof Date||$ instanceof RegExp||$ instanceof Map||$ instanceof Set||$ instanceof Error)return $;let Y={};for(let[J,X]of Object.entries($)){if(J.startsWith("__")||J==="constructor"||J==="prototype")continue;if(X&&typeof X==="object")Y[J]=r0(X,Z+1);else Y[J]=X}return Y}function c($,Z){try{let Y=a9(Z),J=Object.keys(Y),X=Object.values(Y);return o($,J)(...X)}catch{return}}function n($){try{return a0($),!0}catch{return!1}}function o($,Z){let Y=a0($),J=/^[A-Za-z_$][\w$]*$/,X=[],G=[];for(let K=0;K<Z.length;K++){let q=Z[K];if(!J.test(q))continue;if(t9.has(q))continue;X.push(K),G.push(q)}let Q=Function(...G,`
|
|
3
3
|
'use strict';
|
|
4
4
|
try {
|
|
5
5
|
return ${Y};
|
package/dist/render.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 DB($="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 f1=()=>{};var y9={};c(y9,{hasUserImports:()=>CJ,bundleClientScript:()=>xJ});import L0 from"path";import n0 from"fs";function CJ($){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 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 _=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=[],H=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,O=/^(export\s+)?(?:async\s+)?function\s+(\w+)/gm,F;while((F=H.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=O.exec($))!==null){if(F[1])continue;j.push(F[2])}let L=j.length>0?`
|
|
613
613
|
export { ${j.join(", ")} }`:"";await Bun.write(W,$+L),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:[vJ(X,B,W)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...m0()},root:X});if(!V.success){let w=V.logs.filter((R)=>R.level==="error").map((R)=>R.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,R=Array.isArray(w)&&w.length>0?`
|
|
614
614
|
${w.map((N)=>`- ${N?.message??N}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${A}${R}`),$}finally{try{n0.rmSync(W,{force:!0}),n0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var v3;var P9=S(()=>{f1();v3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function yB($){g1={...g1,...$}}function PB(){g1={...f3}}function CB(){return{...g1}}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==="."&&g3.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(!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=hJ(Z);dJ(Y,Z),mJ(Z);for(let X of v9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!g1.allowBracketNotation&&gJ.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("__")||v9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=C9(X);else Z[Y]=X}return Z}function C9($,Z=0){if(Z>=g1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>C9(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]=C9(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 vB($){try{return U5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function xB($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function fB($,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(uJ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
615
|
+
`)}`:"";return console.warn(`[stx:bundler] error: ${A}${R}`),$}finally{try{n0.rmSync(W,{force:!0}),n0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var v3;var P9=S(()=>{f1();v3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function yB($){g1={...g1,...$}}function PB(){g1={...f3}}function CB(){return{...g1}}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==="."&&g3.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(!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=hJ(Z);dJ(Y,Z),mJ(Z);for(let X of v9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!g1.allowBracketNotation&&gJ.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("__")||v9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=C9(X);else Z[Y]=X}return Z}function C9($,Z=0){if(Z>=g1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>C9(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]=C9(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 vB($){try{return U5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function xB($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function fB($,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(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/routes.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var{defineProperty:M,getOwnPropertyNames:R,getOwnPropertyDescriptor:_}=Object,T=Object.prototype.hasOwnProperty;function N(q){return this[q]}var f=(q)=>{var Q=(U??=new WeakMap).get(q),W;if(Q)return Q;if(Q=M({},"__esModule",{value:!0}),q&&typeof q==="object"||typeof q==="function"){for(var Z of R(q))if(!T.call(Q,Z))M(Q,Z,{get:N.bind(q,Z),enumerable:!(W=_(q,Z))||W.enumerable})}return U.set(q,Q),Q},U;var A=(q)=>q;function g(q,Q){this[q]=A.bind(null,Q)}var d=(q,Q)=>{for(var W in Q)M(q,W,{get:Q[W],enumerable:!0,configurable:!0,set:g.bind(Q,W)})};var G=(q,Q)=>()=>(q&&(Q=q(q=0)),Q);var l=import.meta.require;function x(q){V={...V,...q}}function p(){V={...I}}function a(){return{...V}}function j(q){let Q="",W=null,Z=!1;for(let $=0;$<q.length;$++){let w=q[$];if(Z){Z=!1;continue}if(w==="\\"&&W){Z=!0;continue}if(W){if(W==="`"&&w==="$"&&$+1<q.length&&q[$+1]==="{"){let H=1;$+=2;while($<q.length&&H>0){if(q[$]==="{")H++;else if(q[$]==="}")H--;if(H>0)Q+=q[$],$++}continue}if(w===W)W=null;continue}if(w==='"'||w==="'"||w==="`"){W=w;continue}Q+=w}return Q}function S(q,Q){let W=/[$A-Z_a-z][$\w]*/g,Z;while((Z=W.exec(q))!==null){let $=Z[0],w=q[Z.index-1];if(v.has($))throw Error(`Potentially unsafe expression (identifier ${$}): ${Q}`);if(w==="."&&O.has($))throw Error(`Potentially unsafe expression (property ${$}): ${Q}`)}}function b(q){let Q=/\[\s*(['"])(.*?)\1\s*\]/g,W;while((W=Q.exec(q))!==null){let Z=W[2];if(!O.has(Z))continue;let $=q.slice(0,W.index).match(/\S(?=\s*$)/)?.[0],w=q.slice(W.index+W[0].length).match(/^\s*(\S)/)?.[1];if(!(($==="{"||$===",")&&w===":"))throw Error(`Potentially unsafe expression (bracket key ${W[2]}): ${q}`)}}function L(q){let Q=q.trim(),W=j(Q);S(W,Q),b(Q);for(let Z of B)if(Z.test(W))throw Error(`Potentially unsafe expression (matched /${Z.source}/): ${Q}`);if(!V.allowBracketNotation&&h.test(Q))throw Error(`Bracket notation with strings not allowed: ${Q}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Q}function D(q){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[W,Z]of Object.entries(q)){if(W.startsWith("__")||B.some(($)=>$.test(W)))continue;if(Z&&typeof Z==="object"&&!Array.isArray(Z))Q[W]=F(Z);else Q[W]=Z}return Q}function F(q,Q=0){if(Q>=V.maxSanitizeDepth)return"[Object too deep]";if(q===null||typeof q!=="object")return q;if(Array.isArray(q))return q.map((Z)=>F(Z,Q+1));if(q instanceof Date||q instanceof RegExp||q instanceof Map||q instanceof Set||q instanceof Error)return q;let W={};for(let[Z,$]of Object.entries(q)){if(Z.startsWith("__")||Z==="constructor"||Z==="prototype")continue;if($&&typeof $==="object")W[Z]=F($,Q+1);else W[Z]=$}return W}function P(q,Q){try{let W=D(Q),Z=Object.keys(W),$=Object.values(W);return y(q,Z)(...$)}catch{return}}function r(q){try{return L(q),!0}catch{return!1}}function n(q){try{return L(q),null}catch(Q){return Q instanceof Error?Q.message:String(Q)}}function
|
|
2
|
+
var{defineProperty:M,getOwnPropertyNames:R,getOwnPropertyDescriptor:_}=Object,T=Object.prototype.hasOwnProperty;function N(q){return this[q]}var f=(q)=>{var Q=(U??=new WeakMap).get(q),W;if(Q)return Q;if(Q=M({},"__esModule",{value:!0}),q&&typeof q==="object"||typeof q==="function"){for(var Z of R(q))if(!T.call(Q,Z))M(Q,Z,{get:N.bind(q,Z),enumerable:!(W=_(q,Z))||W.enumerable})}return U.set(q,Q),Q},U;var A=(q)=>q;function g(q,Q){this[q]=A.bind(null,Q)}var d=(q,Q)=>{for(var W in Q)M(q,W,{get:Q[W],enumerable:!0,configurable:!0,set:g.bind(Q,W)})};var G=(q,Q)=>()=>(q&&(Q=q(q=0)),Q);var l=import.meta.require;function x(q){V={...V,...q}}function p(){V={...I}}function a(){return{...V}}function j(q){let Q="",W=null,Z=!1;for(let $=0;$<q.length;$++){let w=q[$];if(Z){Z=!1;continue}if(w==="\\"&&W){Z=!0;continue}if(W){if(W==="`"&&w==="$"&&$+1<q.length&&q[$+1]==="{"){let H=1;$+=2;while($<q.length&&H>0){if(q[$]==="{")H++;else if(q[$]==="}")H--;if(H>0)Q+=q[$],$++}continue}if(w===W)W=null;continue}if(w==='"'||w==="'"||w==="`"){W=w;continue}Q+=w}return Q}function S(q,Q){let W=/[$A-Z_a-z][$\w]*/g,Z;while((Z=W.exec(q))!==null){let $=Z[0],w=q[Z.index-1];if(v.has($))throw Error(`Potentially unsafe expression (matched /\\b${$}\\b/; identifier ${$}): ${Q}`);if(w==="."&&O.has($))throw Error(`Potentially unsafe expression (matched /.${$}/; property ${$}): ${Q}`)}}function b(q){let Q=/\[\s*(['"])(.*?)\1\s*\]/g,W;while((W=Q.exec(q))!==null){let Z=W[2];if(!O.has(Z))continue;let $=q.slice(0,W.index).match(/\S(?=\s*$)/)?.[0],w=q.slice(W.index+W[0].length).match(/^\s*(\S)/)?.[1];if(!(($==="{"||$===",")&&w===":"))throw Error(`Potentially unsafe expression (bracket key ${W[2]}): ${q}`)}}function L(q){let Q=q.trim(),W=j(Q);S(W,Q),b(Q);for(let Z of B)if(Z.test(W))throw Error(`Potentially unsafe expression (matched /${Z.source}/): ${Q}`);if(!V.allowBracketNotation&&h.test(Q))throw Error(`Bracket notation with strings not allowed: ${Q}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Q}function D(q){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[W,Z]of Object.entries(q)){if(W.startsWith("__")||B.some(($)=>$.test(W)))continue;if(Z&&typeof Z==="object"&&!Array.isArray(Z))Q[W]=F(Z);else Q[W]=Z}return Q}function F(q,Q=0){if(Q>=V.maxSanitizeDepth)return"[Object too deep]";if(q===null||typeof q!=="object")return q;if(Array.isArray(q))return q.map((Z)=>F(Z,Q+1));if(q instanceof Date||q instanceof RegExp||q instanceof Map||q instanceof Set||q instanceof Error)return q;let W={};for(let[Z,$]of Object.entries(q)){if(Z.startsWith("__")||Z==="constructor"||Z==="prototype")continue;if($&&typeof $==="object")W[Z]=F($,Q+1);else W[Z]=$}return W}function P(q,Q){try{let W=D(Q),Z=Object.keys(W),$=Object.values(W);return y(q,Z)(...$)}catch{return}}function r(q){try{return L(q),!0}catch{return!1}}function n(q){try{return L(q),null}catch(Q){return Q instanceof Error?Q.message:String(Q)}}function o(q,Q){try{let W=P(q,Q);return Boolean(W)}catch{return!1}}function i(q,Q){try{let W=P(q,Q);if(Array.isArray(W))return W;if(W&&typeof W==="object"&&"length"in W){let Z=W.length;if(typeof Z==="number"&&Number.isFinite(Z)&&Z>=0&&Number.isInteger(Z))return Array.from(W)}return[]}catch{return[]}}function k(q,Q){try{let W=P(q,Q);if(W&&typeof W==="object"&&!Array.isArray(W))return W;return{}}catch{return{}}}function y(q,Q){let W=L(q),Z=/^[A-Za-z_$][\w$]*$/,$=[],w=[];for(let X=0;X<Q.length;X++){let Y=Q[X];if(!Z.test(Y))continue;if(C.has(Y))continue;$.push(X),w.push(Y)}let H=Function(...w,`
|
|
3
3
|
'use strict';
|
|
4
4
|
try {
|
|
5
5
|
return ${W};
|
package/dist/safe-evaluator.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var{defineProperty:M,getOwnPropertyNames:D,getOwnPropertyDescriptor:k}=Object,K=Object.prototype.hasOwnProperty;function R(q){return this[q]}var y=(q)=>{var J=(U??=new WeakMap).get(q),Q;if(J)return J;if(J=M({},"__esModule",{value:!0}),q&&typeof q==="object"||typeof q==="function"){for(var W of D(q))if(!K.call(J,W))M(J,W,{get:R.bind(q,W),enumerable:!(Q=k(q,W))||Q.enumerable})}return U.set(q,J),J},U;var N=(q)=>q;function _(q,J){this[q]=N.bind(null,J)}var u=(q,J)=>{for(var Q in J)M(q,Q,{get:J[Q],enumerable:!0,configurable:!0,set:_.bind(J,Q)})};var T=(q,J)=>()=>(q&&(J=q(q=0)),J);var E=import.meta.require;function l(q){Y={...Y,...q}}function d(){Y={...z}}function c(){return{...Y}}function g(q){let J="",Q=null,W=!1;for(let Z=0;Z<q.length;Z++){let $=q[Z];if(W){W=!1;continue}if($==="\\"&&Q){W=!0;continue}if(Q){if(Q==="`"&&$==="$"&&Z+1<q.length&&q[Z+1]==="{"){let w=1;Z+=2;while(Z<q.length&&w>0){if(q[Z]==="{")w++;else if(q[Z]==="}")w--;if(w>0)J+=q[Z],Z++}continue}if($===Q)Q=null;continue}if($==='"'||$==="'"||$==="`"){Q=$;continue}J+=$}return J}function h(q,J){let Q=/[$A-Z_a-z][$\w]*/g,W;while((W=Q.exec(q))!==null){let Z=W[0],$=q[W.index-1];if(v.has(Z))throw Error(`Potentially unsafe expression (identifier ${Z}): ${J}`);if($==="."&&I.has(Z))throw Error(`Potentially unsafe expression (property ${Z}): ${J}`)}}function j(q){let J=/\[\s*(['"])(.*?)\1\s*\]/g,Q;while((Q=J.exec(q))!==null){let W=Q[2];if(!I.has(W))continue;let Z=q.slice(0,Q.index).match(/\S(?=\s*$)/)?.[0],$=q.slice(Q.index+Q[0].length).match(/^\s*(\S)/)?.[1];if(!((Z==="{"||Z===",")&&$===":"))throw Error(`Potentially unsafe expression (bracket key ${Q[2]}): ${q}`)}}function P(q){let J=q.trim(),Q=g(J);h(Q,J),j(J);for(let W of B)if(W.test(Q))throw Error(`Potentially unsafe expression (matched /${W.source}/): ${J}`);if(!Y.allowBracketNotation&&A.test(J))throw Error(`Bracket notation with strings not allowed: ${J}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return J}function O(q){let J={};J.Math=Math,J.JSON=JSON,J.Date=Date,J.String=String,J.Number=Number,J.Boolean=Boolean,J.Array=Array,J.parseInt=Number.parseInt,J.parseFloat=Number.parseFloat,J.isNaN=Number.isNaN,J.isFinite=Number.isFinite,J.encodeURIComponent=encodeURIComponent,J.decodeURIComponent=decodeURIComponent;for(let[Q,W]of Object.entries(q)){if(Q.startsWith("__")||B.some((Z)=>Z.test(Q)))continue;if(W&&typeof W==="object"&&!Array.isArray(W))J[Q]=F(W);else J[Q]=W}return J}function F(q,J=0){if(J>=Y.maxSanitizeDepth)return"[Object too deep]";if(q===null||typeof q!=="object")return q;if(Array.isArray(q))return q.map((W)=>F(W,J+1));if(q instanceof Date||q instanceof RegExp||q instanceof Map||q instanceof Set||q instanceof Error)return q;let Q={};for(let[W,Z]of Object.entries(q)){if(W.startsWith("__")||W==="constructor"||W==="prototype")continue;if(Z&&typeof Z==="object")Q[W]=F(Z,J+1);else Q[W]=Z}return Q}function L(q,J){try{let Q=O(J),W=Object.keys(Q),Z=Object.values(Q);return b(q,W)(...Z)}catch{return}}function a(q){try{return P(q),!0}catch{return!1}}function x(q){try{return P(q),null}catch(J){return J instanceof Error?J.message:String(J)}}function p(q,J){try{let Q=L(q,J);return Boolean(Q)}catch{return!1}}function r(q,J){try{let Q=L(q,J);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 o(q,J){try{let Q=L(q,J);if(Q&&typeof Q==="object"&&!Array.isArray(Q))return Q;return{}}catch{return{}}}function b(q,J){let Q=P(q),W=/^[A-Za-z_$][\w$]*$/,Z=[],$=[];for(let H=0;H<J.length;H++){let X=J[H];if(!W.test(X))continue;if(m.has(X))continue;Z.push(H),$.push(X)}let w=Function(...$,`
|
|
2
|
+
var{defineProperty:M,getOwnPropertyNames:D,getOwnPropertyDescriptor:k}=Object,K=Object.prototype.hasOwnProperty;function R(q){return this[q]}var y=(q)=>{var J=(U??=new WeakMap).get(q),Q;if(J)return J;if(J=M({},"__esModule",{value:!0}),q&&typeof q==="object"||typeof q==="function"){for(var W of D(q))if(!K.call(J,W))M(J,W,{get:R.bind(q,W),enumerable:!(Q=k(q,W))||Q.enumerable})}return U.set(q,J),J},U;var N=(q)=>q;function _(q,J){this[q]=N.bind(null,J)}var u=(q,J)=>{for(var Q in J)M(q,Q,{get:J[Q],enumerable:!0,configurable:!0,set:_.bind(J,Q)})};var T=(q,J)=>()=>(q&&(J=q(q=0)),J);var E=import.meta.require;function l(q){Y={...Y,...q}}function d(){Y={...z}}function c(){return{...Y}}function g(q){let J="",Q=null,W=!1;for(let Z=0;Z<q.length;Z++){let $=q[Z];if(W){W=!1;continue}if($==="\\"&&Q){W=!0;continue}if(Q){if(Q==="`"&&$==="$"&&Z+1<q.length&&q[Z+1]==="{"){let w=1;Z+=2;while(Z<q.length&&w>0){if(q[Z]==="{")w++;else if(q[Z]==="}")w--;if(w>0)J+=q[Z],Z++}continue}if($===Q)Q=null;continue}if($==='"'||$==="'"||$==="`"){Q=$;continue}J+=$}return J}function h(q,J){let Q=/[$A-Z_a-z][$\w]*/g,W;while((W=Q.exec(q))!==null){let Z=W[0],$=q[W.index-1];if(v.has(Z))throw Error(`Potentially unsafe expression (matched /\\b${Z}\\b/; identifier ${Z}): ${J}`);if($==="."&&I.has(Z))throw Error(`Potentially unsafe expression (matched /.${Z}/; property ${Z}): ${J}`)}}function j(q){let J=/\[\s*(['"])(.*?)\1\s*\]/g,Q;while((Q=J.exec(q))!==null){let W=Q[2];if(!I.has(W))continue;let Z=q.slice(0,Q.index).match(/\S(?=\s*$)/)?.[0],$=q.slice(Q.index+Q[0].length).match(/^\s*(\S)/)?.[1];if(!((Z==="{"||Z===",")&&$===":"))throw Error(`Potentially unsafe expression (bracket key ${Q[2]}): ${q}`)}}function P(q){let J=q.trim(),Q=g(J);h(Q,J),j(J);for(let W of B)if(W.test(Q))throw Error(`Potentially unsafe expression (matched /${W.source}/): ${J}`);if(!Y.allowBracketNotation&&A.test(J))throw Error(`Bracket notation with strings not allowed: ${J}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return J}function O(q){let J={};J.Math=Math,J.JSON=JSON,J.Date=Date,J.String=String,J.Number=Number,J.Boolean=Boolean,J.Array=Array,J.parseInt=Number.parseInt,J.parseFloat=Number.parseFloat,J.isNaN=Number.isNaN,J.isFinite=Number.isFinite,J.encodeURIComponent=encodeURIComponent,J.decodeURIComponent=decodeURIComponent;for(let[Q,W]of Object.entries(q)){if(Q.startsWith("__")||B.some((Z)=>Z.test(Q)))continue;if(W&&typeof W==="object"&&!Array.isArray(W))J[Q]=F(W);else J[Q]=W}return J}function F(q,J=0){if(J>=Y.maxSanitizeDepth)return"[Object too deep]";if(q===null||typeof q!=="object")return q;if(Array.isArray(q))return q.map((W)=>F(W,J+1));if(q instanceof Date||q instanceof RegExp||q instanceof Map||q instanceof Set||q instanceof Error)return q;let Q={};for(let[W,Z]of Object.entries(q)){if(W.startsWith("__")||W==="constructor"||W==="prototype")continue;if(Z&&typeof Z==="object")Q[W]=F(Z,J+1);else Q[W]=Z}return Q}function L(q,J){try{let Q=O(J),W=Object.keys(Q),Z=Object.values(Q);return b(q,W)(...Z)}catch{return}}function a(q){try{return P(q),!0}catch{return!1}}function x(q){try{return P(q),null}catch(J){return J instanceof Error?J.message:String(J)}}function p(q,J){try{let Q=L(q,J);return Boolean(Q)}catch{return!1}}function r(q,J){try{let Q=L(q,J);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 o(q,J){try{let Q=L(q,J);if(Q&&typeof Q==="object"&&!Array.isArray(Q))return Q;return{}}catch{return{}}}function b(q,J){let Q=P(q),W=/^[A-Za-z_$][\w$]*$/,Z=[],$=[];for(let H=0;H<J.length;H++){let X=J[H];if(!W.test(X))continue;if(m.has(X))continue;Z.push(H),$.push(X)}let w=Function(...$,`
|
|
3
3
|
'use strict';
|
|
4
4
|
try {
|
|
5
5
|
return ${Q};
|
package/dist/seo.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var{defineProperty:f,getOwnPropertyNames:NJ,getOwnPropertyDescriptor:RJ}=Object,KJ=Object.prototype.hasOwnProperty;function AJ(J){return this[J]}var FQ=(J)=>{var Q=(i??=new WeakMap).get(J),W;if(Q)return Q;if(Q=f({},"__esModule",{value:!0}),J&&typeof J==="object"||typeof J==="function"){for(var Z of NJ(J))if(!KJ.call(Q,Z))f(Q,Z,{get:AJ.bind(J,Z),enumerable:!(W=RJ(J,Z))||W.enumerable})}return i.set(J,Q),Q},i;var kJ=(J)=>J;function DJ(J,Q){this[J]=kJ.bind(null,Q)}var GQ=(J,Q)=>{for(var W in Q)f(J,W,{get:Q[W],enumerable:!0,configurable:!0,set:DJ.bind(Q,W)})};var j=(J,Q)=>()=>(J&&(Q=J(J=0)),Q);var b=import.meta.require;function BQ(J){H={...H,...J}}function UQ(){H={...o}}function IQ(){return{...H}}function zJ(J){let Q="",W=null,Z=!1;for(let $=0;$<J.length;$++){let q=J[$];if(Z){Z=!1;continue}if(q==="\\"&&W){Z=!0;continue}if(W){if(W==="`"&&q==="$"&&$+1<J.length&&J[$+1]==="{"){let F=1;$+=2;while($<J.length&&F>0){if(J[$]==="{")F++;else if(J[$]==="}")F--;if(F>0)Q+=J[$],$++}continue}if(q===W)W=null;continue}if(q==='"'||q==="'"||q==="`"){W=q;continue}Q+=q}return Q}function LJ(J,Q){let W=/[$A-Z_a-z][$\w]*/g,Z;while((Z=W.exec(J))!==null){let $=Z[0],q=J[Z.index-1];if(jJ.has($))throw Error(`Potentially unsafe expression (identifier ${$}): ${Q}`);if(q==="."&&a.has($))throw Error(`Potentially unsafe expression (property ${$}): ${Q}`)}}function HJ(J){let Q=/\[\s*(['"])(.*?)\1\s*\]/g,W;while((W=Q.exec(J))!==null){let Z=W[2];if(!a.has(Z))continue;let $=J.slice(0,W.index).match(/\S(?=\s*$)/)?.[0],q=J.slice(W.index+W[0].length).match(/^\s*(\S)/)?.[1];if(!(($==="{"||$===",")&&q===":"))throw Error(`Potentially unsafe expression (bracket key ${W[2]}): ${J}`)}}function d(J){let Q=J.trim(),W=zJ(Q);LJ(W,Q),HJ(Q);for(let Z of u)if(Z.test(W))throw Error(`Potentially unsafe expression (matched /${Z.source}/): ${Q}`);if(!H.allowBracketNotation&&wJ.test(Q))throw Error(`Bracket notation with strings not allowed: ${Q}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Q}function t(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[W,Z]of Object.entries(J)){if(W.startsWith("__")||u.some(($)=>$.test(W)))continue;if(Z&&typeof Z==="object"&&!Array.isArray(Z))Q[W]=x(Z);else Q[W]=Z}return Q}function x(J,Q=0){if(Q>=H.maxSanitizeDepth)return"[Object too deep]";if(J===null||typeof J!=="object")return J;if(Array.isArray(J))return J.map((Z)=>x(Z,Q+1));if(J instanceof Date||J instanceof RegExp||J instanceof Map||J instanceof Set||J instanceof Error)return J;let W={};for(let[Z,$]of Object.entries(J)){if(Z.startsWith("__")||Z==="constructor"||Z==="prototype")continue;if($&&typeof $==="object")W[Z]=x($,Q+1);else W[Z]=$}return W}function m(J,Q){try{let W=t(Q),Z=Object.keys(W),$=Object.values(W);return bJ(J,Z)(...$)}catch{return}}function OQ(J){try{return d(J),!0}catch{return!1}}function _Q(J){try{return d(J),null}catch(Q){return Q instanceof Error?Q.message:String(Q)}}function MQ(J,Q){try{let W=m(J,Q);return Boolean(W)}catch{return!1}}function NQ(J,Q){try{let W=m(J,Q);if(Array.isArray(W))return W;if(W&&typeof W==="object"&&"length"in W){let Z=W.length;if(typeof Z==="number"&&Number.isFinite(Z)&&Z>=0&&Number.isInteger(Z))return Array.from(W)}return[]}catch{return[]}}function E(J,Q){try{let W=m(J,Q);if(W&&typeof W==="object"&&!Array.isArray(W))return W;return{}}catch{return{}}}function bJ(J,Q){let W=d(J),Z=/^[A-Za-z_$][\w$]*$/,$=[],q=[];for(let V=0;V<Q.length;V++){let G=Q[V];if(!Z.test(G))continue;if(TJ.has(G))continue;$.push(V),q.push(G)}let F=Function(...q,`
|
|
2
|
+
var{defineProperty:f,getOwnPropertyNames:NJ,getOwnPropertyDescriptor:RJ}=Object,KJ=Object.prototype.hasOwnProperty;function AJ(J){return this[J]}var FQ=(J)=>{var Q=(i??=new WeakMap).get(J),W;if(Q)return Q;if(Q=f({},"__esModule",{value:!0}),J&&typeof J==="object"||typeof J==="function"){for(var Z of NJ(J))if(!KJ.call(Q,Z))f(Q,Z,{get:AJ.bind(J,Z),enumerable:!(W=RJ(J,Z))||W.enumerable})}return i.set(J,Q),Q},i;var kJ=(J)=>J;function DJ(J,Q){this[J]=kJ.bind(null,Q)}var GQ=(J,Q)=>{for(var W in Q)f(J,W,{get:Q[W],enumerable:!0,configurable:!0,set:DJ.bind(Q,W)})};var j=(J,Q)=>()=>(J&&(Q=J(J=0)),Q);var b=import.meta.require;function BQ(J){H={...H,...J}}function UQ(){H={...o}}function IQ(){return{...H}}function zJ(J){let Q="",W=null,Z=!1;for(let $=0;$<J.length;$++){let q=J[$];if(Z){Z=!1;continue}if(q==="\\"&&W){Z=!0;continue}if(W){if(W==="`"&&q==="$"&&$+1<J.length&&J[$+1]==="{"){let F=1;$+=2;while($<J.length&&F>0){if(J[$]==="{")F++;else if(J[$]==="}")F--;if(F>0)Q+=J[$],$++}continue}if(q===W)W=null;continue}if(q==='"'||q==="'"||q==="`"){W=q;continue}Q+=q}return Q}function LJ(J,Q){let W=/[$A-Z_a-z][$\w]*/g,Z;while((Z=W.exec(J))!==null){let $=Z[0],q=J[Z.index-1];if(jJ.has($))throw Error(`Potentially unsafe expression (matched /\\b${$}\\b/; identifier ${$}): ${Q}`);if(q==="."&&a.has($))throw Error(`Potentially unsafe expression (matched /.${$}/; property ${$}): ${Q}`)}}function HJ(J){let Q=/\[\s*(['"])(.*?)\1\s*\]/g,W;while((W=Q.exec(J))!==null){let Z=W[2];if(!a.has(Z))continue;let $=J.slice(0,W.index).match(/\S(?=\s*$)/)?.[0],q=J.slice(W.index+W[0].length).match(/^\s*(\S)/)?.[1];if(!(($==="{"||$===",")&&q===":"))throw Error(`Potentially unsafe expression (bracket key ${W[2]}): ${J}`)}}function d(J){let Q=J.trim(),W=zJ(Q);LJ(W,Q),HJ(Q);for(let Z of u)if(Z.test(W))throw Error(`Potentially unsafe expression (matched /${Z.source}/): ${Q}`);if(!H.allowBracketNotation&&wJ.test(Q))throw Error(`Bracket notation with strings not allowed: ${Q}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Q}function t(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[W,Z]of Object.entries(J)){if(W.startsWith("__")||u.some(($)=>$.test(W)))continue;if(Z&&typeof Z==="object"&&!Array.isArray(Z))Q[W]=x(Z);else Q[W]=Z}return Q}function x(J,Q=0){if(Q>=H.maxSanitizeDepth)return"[Object too deep]";if(J===null||typeof J!=="object")return J;if(Array.isArray(J))return J.map((Z)=>x(Z,Q+1));if(J instanceof Date||J instanceof RegExp||J instanceof Map||J instanceof Set||J instanceof Error)return J;let W={};for(let[Z,$]of Object.entries(J)){if(Z.startsWith("__")||Z==="constructor"||Z==="prototype")continue;if($&&typeof $==="object")W[Z]=x($,Q+1);else W[Z]=$}return W}function m(J,Q){try{let W=t(Q),Z=Object.keys(W),$=Object.values(W);return bJ(J,Z)(...$)}catch{return}}function OQ(J){try{return d(J),!0}catch{return!1}}function _Q(J){try{return d(J),null}catch(Q){return Q instanceof Error?Q.message:String(Q)}}function MQ(J,Q){try{let W=m(J,Q);return Boolean(W)}catch{return!1}}function NQ(J,Q){try{let W=m(J,Q);if(Array.isArray(W))return W;if(W&&typeof W==="object"&&"length"in W){let Z=W.length;if(typeof Z==="number"&&Number.isFinite(Z)&&Z>=0&&Number.isInteger(Z))return Array.from(W)}return[]}catch{return[]}}function E(J,Q){try{let W=m(J,Q);if(W&&typeof W==="object"&&!Array.isArray(W))return W;return{}}catch{return{}}}function bJ(J,Q){let W=d(J),Z=/^[A-Za-z_$][\w$]*$/,$=[],q=[];for(let V=0;V<Q.length;V++){let G=Q[V];if(!Z.test(G))continue;if(TJ.has(G))continue;$.push(V),q.push(G)}let F=Function(...q,`
|
|
3
3
|
'use strict';
|
|
4
4
|
try {
|
|
5
5
|
return ${W};
|
package/dist/serve.js
CHANGED
|
@@ -612,7 +612,7 @@ ${q}`},hasEndTag:!1,description:"Coordinates multiple animations together as a g
|
|
|
612
612
|
`}),$}import x3 from"process";function m0($="STX_PUBLIC_"){let Z={},Y={};for(let[X,J]of Object.entries(x3.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(x3.env))if(Y.startsWith($)&&X!==void 0)Z[Y]=X;return Z}var h1=()=>{};var b9={};i(b9,{hasUserImports:()=>PJ,bundleClientScript:()=>xJ});import w0 from"path";import o0 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(!f3.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(!f3.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:w0.dirname(J),K=w0.resolve(G,Q),q=[K,`${K}.ts`,`${K}.tsx`,`${K}.js`,`${K}.mjs`,`${K}.jsx`,w0.join(K,"index.ts"),w0.join(K,"index.tsx"),w0.join(K,"index.js"),w0.join(K,"index.mjs")];for(let z of q)try{if(o0.existsSync(z)&&o0.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=w0.resolve($,Q.path.slice(2)),K=[G,`${G}.ts`,`${G}.js`,w0.join(G,"index.ts"),w0.join(G,"index.js")];for(let q of K)if(o0.existsSync(q)&&o0.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||w0.join(X,".stx","bundle-cache"),G=new Bun.CryptoHasher("md5");G.update($+Z);let K=G.digest("hex").slice(0,12),q=w0.join(Q,`${K}.js`),z=Bun.file(q);if(await z.exists())return console.log("[stx:bundler] cache hit:",K),await z.text();let _=w0.join(X,".stx","bundle-tmp"),W=w0.join(_,`${K}.ts`),U=w0.join(_,"out",K);o0.mkdirSync(_,{recursive:!0}),o0.mkdirSync(U,{recursive:!0});let B=w0.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(W,$+H),console.log("[stx:bundler] bundling:",K,"from:",w0.basename(Z));try{let V=await Bun.build({entrypoints:[W],outdir:U,target:"browser",format:"esm",minify:J,plugins:[vJ(X,B,W)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...m0()},root:X});if(!V.success){let w=V.logs.filter((R)=>R.level==="error").map((R)=>R.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"),o0.mkdirSync(Q,{recursive:!0}),await Bun.write(q,A),A}catch(V){let A=V instanceof Error?V.message:String(V),w=V?.errors,R=Array.isArray(w)&&w.length>0?`
|
|
614
614
|
${w.map((N)=>`- ${N?.message??N}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${A}${R}`),$}finally{try{o0.rmSync(W,{force:!0}),o0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var f3;var y9=b(()=>{h1();f3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function bB($){d1={...d1,...$}}function yB(){d1={...h3}}function CB(){return{...d1}}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==="."&&d3.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(!d3.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 P9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!d1.allowBracketNotation&&gJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function m3($){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("__")||P9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=C9(X);else Z[Y]=X}return Z}function C9($,Z=0){if(Z>=d1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>C9(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]=C9(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=m3(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 U0($,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}${R}`),$}finally{try{o0.rmSync(W,{force:!0}),o0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var f3;var y9=b(()=>{h1();f3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function bB($){d1={...d1,...$}}function yB(){d1={...h3}}function CB(){return{...d1}}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==="."&&d3.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(!d3.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 P9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!d1.allowBracketNotation&&gJ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function m3($){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("__")||P9.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=C9(X);else Z[Y]=X}return Z}function C9($,Z=0){if(Z>=d1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>C9(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]=C9(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=m3(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 U0($,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};
|
|
@@ -612,7 +612,7 @@ ${q}`},hasEndTag:!1,description:"Coordinates multiple animations together as a g
|
|
|
612
612
|
`}),$}import d6 from"process";function u0($="STX_PUBLIC_"){let Z={},Y={};for(let[X,J]of Object.entries(d6.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 Mj($="STX_PUBLIC_"){let Z={};for(let[Y,X]of Object.entries(d6.env))if(Y.startsWith($)&&X!==void 0)Z[Y]=X;return Z}var h1=()=>{};var v4={};l(v4,{hasUserImports:()=>ZQ,bundleClientScript:()=>XQ});import L0 from"path";import s0 from"fs";function ZQ($){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(!m6.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(!m6.some((q)=>q.test(G)))return console.log("[stx:bundler] detected side-effect import:",G),!0}return!1}function YQ($,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(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=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(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 XQ($,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);s0.mkdirSync(W,{recursive:!0}),s0.mkdirSync(U,{recursive:!0});let B=L0.dirname(Z),j=[],O=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,H=/^(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 N=V.split(":")[0].trim();if(N)j.push(N)});else if(F[3])j.push(F[3])}while((F=H.exec($))!==null){if(F[1])continue;j.push(F[2])}let L=j.length>0?`
|
|
613
613
|
export { ${j.join(", ")} }`:"";await Bun.write(_,$+L),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:[YQ(X,B,_)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...u0()},root:X});if(!V.success){let w=V.logs.filter((R)=>R.level==="error").map((R)=>R.message).join(", ");return console.warn("[stx:bundler] build failed:",w),$}let N="";for(let w of V.outputs){N=await w.text();break}return N=N.replace(/^\s*export\s*\{[^}]*\}\s*;?\s*$/gm,"").replace(/^\s*export\s+default\s+.*$/gm,"").trim(),console.log("[stx:bundler] bundled:",K,"output:",N.length,"bytes"),s0.mkdirSync(Q,{recursive:!0}),await Bun.write(q,N),N}catch(V){let N=V instanceof Error?V.message:String(V),w=V?.errors,R=Array.isArray(w)&&w.length>0?`
|
|
614
614
|
${w.map((A)=>`- ${A?.message??A}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${N}${R}`),$}finally{try{s0.rmSync(_,{force:!0}),s0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var m6;var x4=b(()=>{h1();m6=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function Sj($){d1={...d1,...$}}function bj(){d1={...p6}}function yj(){return{...d1}}function GQ($){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 KQ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(JQ.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&c6.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function qQ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!c6.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 B5($){let Z=$.trim(),Y=GQ(Z);KQ(Y,Z),qQ(Z);for(let X of g4)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!d1.allowBracketNotation&&QQ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function l6($){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("__")||g4.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=f4(X);else Z[Y]=X}return Z}function f4($,Z=0){if(Z>=d1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>f4(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]=f4(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=l6(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return B5($),!0}catch{return!1}}function Cj($){try{return B5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function Pj($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function vj($,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=B5($),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(zQ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
615
|
+
`)}`:"";return console.warn(`[stx:bundler] error: ${N}${R}`),$}finally{try{s0.rmSync(_,{force:!0}),s0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var m6;var x4=b(()=>{h1();m6=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function Sj($){d1={...d1,...$}}function bj(){d1={...p6}}function yj(){return{...d1}}function GQ($){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 KQ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(JQ.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&c6.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function qQ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!c6.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 B5($){let Z=$.trim(),Y=GQ(Z);KQ(Y,Z),qQ(Z);for(let X of g4)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!d1.allowBracketNotation&&QQ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function l6($){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("__")||g4.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=f4(X);else Z[Y]=X}return Z}function f4($,Z=0){if(Z>=d1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>f4(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]=f4(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=l6(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return B5($),!0}catch{return!1}}function Cj($){try{return B5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function Pj($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function vj($,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=B5($),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(zQ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
616
616
|
'use strict';
|
|
617
617
|
try {
|
|
618
618
|
return ${Y};
|
|
@@ -612,7 +612,7 @@ ${q}`},hasEndTag:!1,description:"Coordinates multiple animations together as a g
|
|
|
612
612
|
`}),$}import r6 from"process";function u0($="STX_PUBLIC_"){let Z={},Y={};for(let[X,J]of Object.entries(r6.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 kj($="STX_PUBLIC_"){let Z={};for(let[Y,X]of Object.entries(r6.env))if(Y.startsWith($)&&X!==void 0)Z[Y]=X;return Z}var d1=()=>{};var v4={};l(v4,{hasUserImports:()=>XQ,bundleClientScript:()=>QQ});import L0 from"path";import s0 from"fs";function XQ($){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(!a6.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(!a6.some((q)=>q.test(G)))return console.log("[stx:bundler] detected side-effect import:",G),!0}return!1}function JQ($,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(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=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(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 QQ($,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);s0.mkdirSync(W,{recursive:!0}),s0.mkdirSync(U,{recursive:!0});let B=L0.dirname(Z),j=[],O=/^(export\s+)?(?:const|let|var)\s+(?:\{([^}]+)\}|(\w+))/gm,H=/^(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=H.exec($))!==null){if(F[1])continue;j.push(F[2])}let L=j.length>0?`
|
|
613
613
|
export { ${j.join(", ")} }`:"";await Bun.write(_,$+L),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:[JQ(X,B,_)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...u0()},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 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,N=Array.isArray(w)&&w.length>0?`
|
|
614
614
|
${w.map((A)=>`- ${A?.message??A}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${R}${N}`),$}finally{try{s0.rmSync(_,{force:!0}),s0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var a6;var x4=b(()=>{d1();a6=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function Pj($){m1={...m1,...$}}function vj(){m1={...e6}}function xj(){return{...m1}}function qQ($){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 zQ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(GQ.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&$8.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function WQ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!$8.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 B5($){let Z=$.trim(),Y=qQ(Z);zQ(Y,Z),WQ(Z);for(let X of g4)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!m1.allowBracketNotation&&KQ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function Z8($){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("__")||g4.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=f4(X);else Z[Y]=X}return Z}function f4($,Z=0){if(Z>=m1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>f4(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]=f4(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=Z8(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return B5($),!0}catch{return!1}}function fj($){try{return B5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function gj($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function hj($,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=B5($),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(_Q.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
615
|
+
`)}`:"";return console.warn(`[stx:bundler] error: ${R}${N}`),$}finally{try{s0.rmSync(_,{force:!0}),s0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var a6;var x4=b(()=>{d1();a6=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function Pj($){m1={...m1,...$}}function vj(){m1={...e6}}function xj(){return{...m1}}function qQ($){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 zQ($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(GQ.has(J))throw Error(`Potentially unsafe expression (matched /\\b${J}\\b/; identifier ${J}): ${Z}`);if(Q==="."&&$8.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function WQ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let X=Y[2];if(!$8.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 B5($){let Z=$.trim(),Y=qQ(Z);zQ(Y,Z),WQ(Z);for(let X of g4)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!m1.allowBracketNotation&&KQ.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function Z8($){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("__")||g4.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=f4(X);else Z[Y]=X}return Z}function f4($,Z=0){if(Z>=m1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>f4(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]=f4(J,Z+1);else Y[X]=J}return Y}function n($,Z){try{let Y=Z8(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return B5($),!0}catch{return!1}}function fj($){try{return B5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function gj($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function hj($,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=B5($),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(_Q.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/slots.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// @bun
|
|
2
|
-
var y9=Object.defineProperty;var C9=($)=>$;function P9($,Z){this[$]=C9.bind(null,Z)}var n0=($,Z)=>{for(var Y in Z)y9($,Y,{get:Z[Y],enumerable:!0,configurable:!0,set:P9.bind(Z,Y)})};var O=($,Z)=>()=>($&&(Z=$($=0)),Z);var y=import.meta.require;function d9($){let Z="",Y=null,J=!1;for(let X=0;X<$.length;X++){let G=$[X];if(J){J=!1;continue}if(G==="\\"&&Y){J=!0;continue}if(Y){if(Y==="`"&&G==="$"&&X+1<$.length&&$[X+1]==="{"){let Q=1;X+=2;while(X<$.length&&Q>0){if($[X]==="{")Q++;else if($[X]==="}")Q--;if(Q>0)Z+=$[X],X++}continue}if(G===Y)Y=null;continue}if(G==='"'||G==="'"||G==="`"){Y=G;continue}Z+=G}return Z}function m9($,Z){let Y=/[$A-Z_a-z][$\w]*/g,J;while((J=Y.exec($))!==null){let X=J[0],G=$[J.index-1];if(g9.has(X))throw Error(`Potentially unsafe expression (identifier ${X}): ${Z}`);if(G==="."&&Q5.has(X))throw Error(`Potentially unsafe expression (property ${X}): ${Z}`)}}function u9($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let J=Y[2];if(!Q5.has(J))continue;let X=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],G=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((X==="{"||X===",")&&G===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function o0($){let Z=$.trim(),Y=d9(Z);m9(Y,Z),u9(Z);for(let J of f9)if(J.test(Y))throw Error(`Potentially unsafe expression (matched /${J.source}/): ${Z}`);if(!x9.allowBracketNotation&&h9.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function c($){try{return o0($),!0}catch{return!1}}function n($,Z){let Y=o0($),J=/^[A-Za-z_$][\w$]*$/,X=[],G=[];for(let q=0;q<Z.length;q++){let K=Z[q];if(!J.test(K))continue;if(l9.has(K))continue;X.push(q),G.push(K)}let Q=Function(...G,`
|
|
2
|
+
var y9=Object.defineProperty;var C9=($)=>$;function P9($,Z){this[$]=C9.bind(null,Z)}var n0=($,Z)=>{for(var Y in Z)y9($,Y,{get:Z[Y],enumerable:!0,configurable:!0,set:P9.bind(Z,Y)})};var O=($,Z)=>()=>($&&(Z=$($=0)),Z);var y=import.meta.require;function d9($){let Z="",Y=null,J=!1;for(let X=0;X<$.length;X++){let G=$[X];if(J){J=!1;continue}if(G==="\\"&&Y){J=!0;continue}if(Y){if(Y==="`"&&G==="$"&&X+1<$.length&&$[X+1]==="{"){let Q=1;X+=2;while(X<$.length&&Q>0){if($[X]==="{")Q++;else if($[X]==="}")Q--;if(Q>0)Z+=$[X],X++}continue}if(G===Y)Y=null;continue}if(G==='"'||G==="'"||G==="`"){Y=G;continue}Z+=G}return Z}function m9($,Z){let Y=/[$A-Z_a-z][$\w]*/g,J;while((J=Y.exec($))!==null){let X=J[0],G=$[J.index-1];if(g9.has(X))throw Error(`Potentially unsafe expression (matched /\\b${X}\\b/; identifier ${X}): ${Z}`);if(G==="."&&Q5.has(X))throw Error(`Potentially unsafe expression (matched /.${X}/; property ${X}): ${Z}`)}}function u9($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,Y;while((Y=Z.exec($))!==null){let J=Y[2];if(!Q5.has(J))continue;let X=$.slice(0,Y.index).match(/\S(?=\s*$)/)?.[0],G=$.slice(Y.index+Y[0].length).match(/^\s*(\S)/)?.[1];if(!((X==="{"||X===",")&&G===":"))throw Error(`Potentially unsafe expression (bracket key ${Y[2]}): ${$}`)}}function o0($){let Z=$.trim(),Y=d9(Z);m9(Y,Z),u9(Z);for(let J of f9)if(J.test(Y))throw Error(`Potentially unsafe expression (matched /${J.source}/): ${Z}`);if(!x9.allowBracketNotation&&h9.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function c($){try{return o0($),!0}catch{return!1}}function n($,Z){let Y=o0($),J=/^[A-Za-z_$][\w$]*$/,X=[],G=[];for(let q=0;q<Z.length;q++){let K=Z[q];if(!J.test(K))continue;if(l9.has(K))continue;X.push(q),G.push(K)}let Q=Function(...G,`
|
|
3
3
|
'use strict';
|
|
4
4
|
try {
|
|
5
5
|
return ${Y};
|
package/dist/ssg.js
CHANGED
|
@@ -699,7 +699,7 @@ ${K}${O}
|
|
|
699
699
|
'use strict';
|
|
700
700
|
${Y}${J}
|
|
701
701
|
${K}
|
|
702
|
-
})()</script>`}var gY,hY,dY,lY,oY;var n$=b(()=>{F0();gY=["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"],hY=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],dY=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"]);lY={left:0,middle:1,right:2};oY=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 eY($){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 $J($,Z){let J=/[$A-Z_a-z][$\w]*/g,Y;while((Y=J.exec($))!==null){let Q=Y[0],X=$[Y.index-1];if(aY.has(Q))throw Error(`Potentially unsafe expression (identifier ${Q}): ${Z}`);if(X==="."&&f7.has(Q))throw Error(`Potentially unsafe expression (property ${Q}): ${Z}`)}}function ZJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,J;while((J=Z.exec($))!==null){let Y=J[2];if(!f7.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 R5($){let Z=$.trim(),J=eY(Z);$J(J,Z),ZJ(Z);for(let Y of x7)if(Y.test(J))throw Error(`Potentially unsafe expression (matched /${Y.source}/): ${Z}`);if(!v7.allowBracketNotation&&tY.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function YJ($){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("__")||x7.some((Q)=>Q.test(J)))continue;if(Y&&typeof Y==="object"&&!Array.isArray(Y))Z[J]=o$(Y);else Z[J]=Y}return Z}function o$($,Z=0){if(Z>=v7.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((Y)=>o$(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]=o$(Q,Z+1);else J[Y]=Q}return J}function i($,Z){try{let J=YJ(Z),Y=Object.keys(J),Q=Object.values(J);return $0($,Y)(...Q)}catch{return}}function e($){try{return R5($),!0}catch{return!1}}function B0($,Z){try{let J=i($,Z);if(J&&typeof J==="object"&&!Array.isArray(J))return J;return{}}catch{return{}}}function $0($,Z){let J=R5($),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(JJ.has(q))continue;Q.push(K),X.push(q)}let G=Function(...X,`
|
|
702
|
+
})()</script>`}var gY,hY,dY,lY,oY;var n$=b(()=>{F0();gY=["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"],hY=["browserQuery","BrowserQueryBuilder","BrowserQueryError","browserAuth","configureBrowser","getBrowserConfig","createBrowserDb","createBrowserModel","isBrowser"],dY=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"]);lY={left:0,middle:1,right:2};oY=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 eY($){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 $J($,Z){let J=/[$A-Z_a-z][$\w]*/g,Y;while((Y=J.exec($))!==null){let Q=Y[0],X=$[Y.index-1];if(aY.has(Q))throw Error(`Potentially unsafe expression (matched /\\b${Q}\\b/; identifier ${Q}): ${Z}`);if(X==="."&&f7.has(Q))throw Error(`Potentially unsafe expression (matched /.${Q}/; property ${Q}): ${Z}`)}}function ZJ($){let Z=/\[\s*(['"])(.*?)\1\s*\]/g,J;while((J=Z.exec($))!==null){let Y=J[2];if(!f7.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 R5($){let Z=$.trim(),J=eY(Z);$J(J,Z),ZJ(Z);for(let Y of x7)if(Y.test(J))throw Error(`Potentially unsafe expression (matched /${Y.source}/): ${Z}`);if(!v7.allowBracketNotation&&tY.test(Z))throw Error(`Bracket notation with strings not allowed: ${Z}. Enable with configureSafeEvaluator({ allowBracketNotation: true })`);return Z}function YJ($){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("__")||x7.some((Q)=>Q.test(J)))continue;if(Y&&typeof Y==="object"&&!Array.isArray(Y))Z[J]=o$(Y);else Z[J]=Y}return Z}function o$($,Z=0){if(Z>=v7.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((Y)=>o$(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]=o$(Q,Z+1);else J[Y]=Q}return J}function i($,Z){try{let J=YJ(Z),Y=Object.keys(J),Q=Object.values(J);return $0($,Y)(...Q)}catch{return}}function e($){try{return R5($),!0}catch{return!1}}function B0($,Z){try{let J=i($,Z);if(J&&typeof J==="object"&&!Array.isArray(J))return J;return{}}catch{return{}}}function $0($,Z){let J=R5($),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(JJ.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/ssr.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 yB($="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 k9={};c(k9,{hasUserImports:()=>xJ,bundleClientScript:()=>gJ});import F0 from"path";import o0 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(!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 fJ($,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(o0.existsSync(z)&&o0.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(o0.existsSync(q)&&o0.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||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);o0.mkdirSync(_,{recursive:!0}),o0.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 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(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:[fJ(X,B,W)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...m0()},root:X});if(!V.success){let w=V.logs.filter((R)=>R.level==="error").map((R)=>R.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"),o0.mkdirSync(Q,{recursive:!0}),await Bun.write(q,A),A}catch(V){let A=V instanceof Error?V.message:String(V),w=V?.errors,R=Array.isArray(w)&&w.length>0?`
|
|
614
614
|
${w.map((N)=>`- ${N?.message??N}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${A}${R}`),$}finally{try{o0.rmSync(W,{force:!0}),o0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var C3;var b9=S(()=>{f1();C3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function fB($){g1={...g1,...$}}function gB(){g1={...v3}}function hB(){return{...g1}}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==="."&&x3.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function lJ($){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 _5($){let Z=$.trim(),Y=mJ(Z);uJ(Y,Z),lJ(Z);for(let X of y9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!g1.allowBracketNotation&&dJ.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("__")||y9.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 n($,Z){try{let Y=f3(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return _5($),!0}catch{return!1}}function dB($){try{return _5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function mB($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function uB($,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=_5($),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(pJ.has(q))continue;J.push(K),Q.push(q)}let G=Function(...Q,`
|
|
615
|
+
`)}`:"";return console.warn(`[stx:bundler] error: ${A}${R}`),$}finally{try{o0.rmSync(W,{force:!0}),o0.rmSync(U,{recursive:!0,force:!0})}catch{}}}var C3;var b9=S(()=>{f1();C3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function fB($){g1={...g1,...$}}function gB(){g1={...v3}}function hB(){return{...g1}}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==="."&&x3.has(J))throw Error(`Potentially unsafe expression (matched /.${J}/; property ${J}): ${Z}`)}}function lJ($){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 _5($){let Z=$.trim(),Y=mJ(Z);uJ(Y,Z),lJ(Z);for(let X of y9)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!g1.allowBracketNotation&&dJ.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("__")||y9.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 n($,Z){try{let Y=f3(Z),X=Object.keys(Y),J=Object.values(Y);return t($,X)(...J)}catch{return}}function a($){try{return _5($),!0}catch{return!1}}function dB($){try{return _5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function mB($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function uB($,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=_5($),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(pJ.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/story/cli.js
CHANGED
|
@@ -612,7 +612,7 @@ ${z}`},hasEndTag:!1,description:"Coordinates multiple animations together as a g
|
|
|
612
612
|
`}),$}import y3 from"process";function c0($="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 JH($="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 i1=()=>{};var U4={};d(U4,{hasUserImports:()=>NG,bundleClientScript:()=>MG});import A0 from"path";import a0 from"fs";function NG($){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((z)=>z.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((z)=>z.test(G)))return console.log("[stx:bundler] detected side-effect import:",G),!0}return!1}function TG($,Z,Y){let X=(J,Q)=>{let G=J===Y?Z:A0.dirname(J),K=A0.resolve(G,Q),z=[K,`${K}.ts`,`${K}.tsx`,`${K}.js`,`${K}.mjs`,`${K}.jsx`,A0.join(K,"index.ts"),A0.join(K,"index.tsx"),A0.join(K,"index.js"),A0.join(K,"index.mjs")];for(let W of z)try{if(a0.existsSync(W)&&a0.statSync(W,{throwIfNoEntry:!1})?.isFile())return W}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=A0.resolve($,Q.path.slice(2)),K=[G,`${G}.ts`,`${G}.js`,A0.join(G,"index.ts"),A0.join(G,"index.js")];for(let z of K)if(a0.existsSync(z)&&a0.statSync(z,{throwIfNoEntry:!1})?.isFile())return console.log("[stx:bundler] resolved @/ import:",Q.path,"\u2192",z),{path:z};return console.warn("[stx:bundler] could not resolve @/ import:",Q.path),{path:G}})}}}async function MG($,Z,Y={}){let X=Y.projectRoot||process.cwd(),J=Y.minify??!1,Q=Y.cacheDir||A0.join(X,".stx","bundle-cache"),G=new Bun.CryptoHasher("md5");G.update($+Z);let K=G.digest("hex").slice(0,12),z=A0.join(Q,`${K}.js`),W=Bun.file(z);if(await W.exists())return console.log("[stx:bundler] cache hit:",K),await W.text();let _=A0.join(X,".stx","bundle-tmp"),U=A0.join(_,`${K}.ts`),q=A0.join(_,"out",K);a0.mkdirSync(_,{recursive:!0}),a0.mkdirSync(q,{recursive:!0});let B=A0.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(U,$+H),console.log("[stx:bundler] bundling:",K,"from:",A0.basename(Z));try{let V=await Bun.build({entrypoints:[U],outdir:q,target:"browser",format:"esm",minify:J,plugins:[TG(X,B,U)],define:{"process.env.NODE_ENV":J?'"production"':'"development"',...c0()},root:X});if(!V.success){let A=V.logs.filter((w)=>w.level==="error").map((w)=>w.message).join(", ");return console.warn("[stx:bundler] build failed:",A),$}let R="";for(let A of V.outputs){R=await A.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"),a0.mkdirSync(Q,{recursive:!0}),await Bun.write(z,R),R}catch(V){let R=V instanceof Error?V.message:String(V),A=V?.errors,w=Array.isArray(A)&&A.length>0?`
|
|
614
614
|
${A.map((N)=>`- ${N?.message??N}`).join(`
|
|
615
|
-
`)}`:"";return console.warn(`[stx:bundler] error: ${R}${w}`),$}finally{try{a0.rmSync(U,{force:!0}),a0.rmSync(q,{recursive:!0,force:!0})}catch{}}}var v3;var q4=b(()=>{i1();v3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function WH($){n1={...n1,...$}}function _H(){n1={...f3}}function UH(){return{...n1}}function IG($){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 kG($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(DG.has(J))throw Error(`Potentially unsafe expression (identifier ${J}): ${Z}`);if(Q==="."&&g3.has(J))throw Error(`Potentially unsafe expression (property ${J}): ${Z}`)}}function SG($){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 I5($){let Z=$.trim(),Y=IG(Z);kG(Y,Z),SG(Z);for(let X of j4)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!n1.allowBracketNotation&&EG.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("__")||j4.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=B4(X);else Z[Y]=X}return Z}function B4($,Z=0){if(Z>=n1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>B4(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]=B4(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 I5($),!0}catch{return!1}}function qH($){try{return I5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function BH($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function jH($,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 q0($,Z){try{let Y=n($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function t($,Z){let Y=I5($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let z=Z[K];if(!X.test(z))continue;if(bG.has(z))continue;J.push(K),Q.push(z)}let G=Function(...Q,`
|
|
615
|
+
`)}`:"";return console.warn(`[stx:bundler] error: ${R}${w}`),$}finally{try{a0.rmSync(U,{force:!0}),a0.rmSync(q,{recursive:!0,force:!0})}catch{}}}var v3;var q4=b(()=>{i1();v3=[/^stx$/,/^@stacksjs\/stx$/,/^@stacksjs\/browser$/,/^@stores$/,/^stx\/stores$/,/^@composables$/]});function WH($){n1={...n1,...$}}function _H(){n1={...f3}}function UH(){return{...n1}}function IG($){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 kG($,Z){let Y=/[$A-Z_a-z][$\w]*/g,X;while((X=Y.exec($))!==null){let J=X[0],Q=$[X.index-1];if(DG.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 SG($){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 I5($){let Z=$.trim(),Y=IG(Z);kG(Y,Z),SG(Z);for(let X of j4)if(X.test(Y))throw Error(`Potentially unsafe expression (matched /${X.source}/): ${Z}`);if(!n1.allowBracketNotation&&EG.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("__")||j4.some((J)=>J.test(Y)))continue;if(X&&typeof X==="object"&&!Array.isArray(X))Z[Y]=B4(X);else Z[Y]=X}return Z}function B4($,Z=0){if(Z>=n1.maxSanitizeDepth)return"[Object too deep]";if($===null||typeof $!=="object")return $;if(Array.isArray($))return $.map((X)=>B4(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]=B4(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 I5($),!0}catch{return!1}}function qH($){try{return I5($),null}catch(Z){return Z instanceof Error?Z.message:String(Z)}}function BH($,Z){try{let Y=n($,Z);return Boolean(Y)}catch{return!1}}function jH($,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 q0($,Z){try{let Y=n($,Z);if(Y&&typeof Y==="object"&&!Array.isArray(Y))return Y;return{}}catch{return{}}}function t($,Z){let Y=I5($),X=/^[A-Za-z_$][\w$]*$/,J=[],Q=[];for(let K=0;K<Z.length;K++){let z=Z[K];if(!X.test(z))continue;if(bG.has(z))continue;J.push(K),Q.push(z)}let G=Function(...Q,`
|
|
616
616
|
'use strict';
|
|
617
617
|
try {
|
|
618
618
|
return ${Y};
|