@qwik.dev/core 2.0.0-alpha.1 → 2.0.0-alpha.3
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/bindings/qwik.darwin-arm64.node +0 -0
- package/bindings/qwik.darwin-x64.node +0 -0
- package/bindings/qwik.linux-x64-gnu.node +0 -0
- package/bindings/qwik.wasm.cjs +259 -272
- package/bindings/qwik.wasm.mjs +259 -272
- package/bindings/qwik.win32-x64-msvc.node +0 -0
- package/bindings/qwik_wasm_bg.wasm +0 -0
- package/dist/build/package.json +1 -1
- package/dist/cli.cjs +1384 -761
- package/dist/core-internal.d.ts +14 -4
- package/dist/core.cjs +121 -106
- package/dist/core.cjs.map +1 -1
- package/dist/core.min.mjs +1 -1
- package/dist/core.mjs +121 -106
- package/dist/core.mjs.map +1 -1
- package/dist/core.prod.cjs +80 -63
- package/dist/core.prod.mjs +82 -65
- package/dist/insights/index.qwik.cjs +1 -1
- package/dist/insights/index.qwik.mjs +1 -1
- package/dist/loader/index.cjs +2 -2
- package/dist/loader/index.mjs +2 -2
- package/dist/loader/package.json +1 -1
- package/dist/optimizer.cjs +94 -80
- package/dist/optimizer.mjs +96 -82
- package/dist/prefetch/package.json +1 -1
- package/dist/qwikloader.debug.js +1 -0
- package/dist/qwikloader.js +2 -2
- package/dist/server.cjs +125 -96
- package/dist/server.mjs +125 -96
- package/dist/starters/features/auth/package.json +3 -1
- package/dist/starters/features/drizzle/package.json +2 -1
- package/dist/starters/features/postcss/package.json +3 -0
- package/dist/starters/features/prisma/package.json +2 -1
- package/dist/starters/features/tailwind/package.json +3 -0
- package/dist/starters/features/turso/package.json +4 -1
- package/dist/testing/index.cjs +121 -92
- package/dist/testing/index.mjs +121 -92
- package/dist/testing/package.json +1 -1
- package/package.json +6 -4
package/dist/optimizer.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
|
-
* @qwik.dev/core/optimizer 2.0.0-alpha.
|
|
3
|
+
* @qwik.dev/core/optimizer 2.0.0-alpha.3-dev+418fd6d
|
|
4
4
|
* Copyright QwikDev. All Rights Reserved.
|
|
5
5
|
* Use of this source code is governed by an MIT-style license that can be
|
|
6
6
|
* found in the LICENSE file at https://github.com/QwikDev/qwik/blob/main/LICENSE
|
|
@@ -1260,7 +1260,7 @@ function createPath(opts = {}) {
|
|
|
1260
1260
|
var QWIK_BINDING_MAP = {};
|
|
1261
1261
|
|
|
1262
1262
|
var versions = {
|
|
1263
|
-
qwik: "2.0.0-alpha.
|
|
1263
|
+
qwik: "2.0.0-alpha.3-dev+418fd6d"
|
|
1264
1264
|
};
|
|
1265
1265
|
|
|
1266
1266
|
async function getSystem() {
|
|
@@ -2570,9 +2570,9 @@ function createRollupError2(id, diagnostic) {
|
|
|
2570
2570
|
return err;
|
|
2571
2571
|
}
|
|
2572
2572
|
|
|
2573
|
-
var QWIK_LOADER_DEFAULT_MINIFIED = '(()=>{var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,
|
|
2573
|
+
var QWIK_LOADER_DEFAULT_MINIFIED = '(()=>{var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,r=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,s=(e,s)=>{for(var a in s||(s={}))n.call(s,a)&&r(e,a,s[a]);if(t)for(var a of t(s))o.call(s,a)&&r(e,a,s[a]);return e};((e,t)=>{const n="__q_context__",o=window,r=new Set,a=new Set([e]),i="replace",c="forEach",l="target",f="getAttribute",p="isConnected",b="qvisible",u="_qwikjson_",h=(e,t)=>Array.from(e.querySelectorAll(t)),y=e=>{const t=[];return a.forEach((n=>t.push(...h(n,e)))),t},d=e=>{S(e),h(e,"[q\\\\:shadowroot]").forEach((e=>{const t=e.shadowRoot;t&&d(t)}))},q=e=>e&&"function"==typeof e.then,m=(e,t,n=t.type)=>{y("[on"+e+"\\\\:"+n+"]")[c]((o=>g(o,e,t,n)))},w=t=>{if(void 0===t[u]){let n=(t===e.documentElement?e.body:t).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n[f]("type")){t[u]=JSON.parse(n.textContent[i](/\\\\x3C(\\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},v=(e,t)=>new CustomEvent(e,{detail:t}),g=async(t,o,r,a=r.type)=>{const c="on"+o+":"+a;t.hasAttribute("preventdefault:"+a)&&r.preventDefault(),t.hasAttribute("stoppropagation:"+a)&&r.stopPropagation();const l=t._qc_,b=l&&l.li.filter((e=>e[0]===c));if(b&&b.length>0){for(const e of b){const n=e[1].getFn([t,r],(()=>t[p]))(r,t),o=r.cancelBubble;q(n)&&await n,o&&r.stopPropagation()}return}const u=t.qDispatchEvent;if(u)return u(r,o);const h=t[f](c);if(h){const o=t.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])"),a=o[f]("q:base"),c=o[f]("q:version")||"unknown",l=o[f]("q:manifest-hash")||"dev",b=new URL(a,e.baseURI);for(const f of h.split("\\n")){const u=new URL(f,b),h=u.href,y=u.hash[i](/^#?([^?[|]*).*$/,"$1")||"default",d=performance.now();let m,v,g;const A=f.startsWith("#"),_={qBase:a,qManifest:l,qVersion:c,href:h,symbol:y,element:t,reqTime:d};if(A){const t=o.getAttribute("q:instance");m=(e["qFuncs_"+t]||[])[Number.parseInt(y)],m||(v="sync",g=Error("sync handler error for symbol: "+y))}else{const e=u.href.split("#")[0];try{const t=import(e);w(o),m=(await t)[y],m||(v="no-symbol",g=Error(`${y} not in ${e}`))}catch(e){v||(v="async"),g=e}}if(!m){E("qerror",s({importError:v,error:g},_)),console.error(g);break}const k=e[n];if(t[p]){const o=async(a=0)=>{try{e[n]=[t,r,u],A||E("qsymbol",s({},_));const o=m(r,t);q(o)&&await o}catch(e){q(e)&&a<100?e.then((()=>o(a++))):E("qerror",s({error:e},_))}finally{e[n]=k}};o()}}}},E=(t,n)=>{e.dispatchEvent(v(t,n))},A=e=>e[i](/([A-Z])/g,(e=>"-"+e.toLowerCase())),_=async e=>{let t=A(e.type),n=e[l];for(m("-document",e,t);n&&n[f];){const o=g(n,"",e,t);let r=e.cancelBubble;q(o)&&await o,r=r||e.cancelBubble||n.hasAttribute("stoppropagation:"+e.type),n=e.bubbles&&!0!==r?n.parentElement:null}},k=e=>{m("-window",e,A(e.type))},C=()=>{var n;const s=e.readyState;if(!t&&("interactive"==s||"complete"==s)&&(a.forEach(d),t=1,E("qinit"),(null!=(n=o.requestIdleCallback)?n:o.setTimeout).bind(o)((()=>E("qidle"))),r.has(b))){const e=y("[on\\\\:"+b+"]"),t=new IntersectionObserver((e=>{for(const n of e)n.isIntersecting&&(t.unobserve(n[l]),g(n[l],"",v(b,n)))}));e[c]((e=>t.observe(e)))}},O=(e,t,n,o=!1)=>e.addEventListener(t,n,{capture:o,passive:!1}),S=(...e)=>{for(const t of e)"string"==typeof t?r.has(t)||(a.forEach((e=>O(e,t,_,!0))),O(o,t,k,!0),r.add(t)):a.has(t)||(r.forEach((e=>O(t,e,_,!0))),a.add(t))};if(!(n in e)){e[n]=0;const t=o.qwikevents;Array.isArray(t)&&S(...t),o.qwikevents={events:r,roots:a,push:S},O(e,"readystatechange",C),C()}})(document)})()';
|
|
2574
2574
|
|
|
2575
|
-
var QWIK_LOADER_DEFAULT_DEBUG = '(() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropSymbols = Object.getOwnPropertySymbols;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __propIsEnum = Object.prototype.propertyIsEnumerable;\n var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {\n enumerable: !0,\n configurable: !0,\n writable: !0,\n value: value\n }) : obj[key] = value;\n var __spreadValues = (a, b) => {\n for (var prop in b || (b = {})) {\n __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);\n }\n if (__getOwnPropSymbols) {\n for (var prop of __getOwnPropSymbols(b)) {\n __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);\n }\n }\n return a;\n };\n ((doc, hasInitialized) => {\n const Q_CONTEXT = "__q_context__";\n const win = window;\n const events = new Set;\n const roots = new Set([ doc ]);\n const nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\n const querySelectorAll = query => {\n const elements = [];\n roots.forEach((root => elements.push(...nativeQuerySelectorAll(root, query))));\n return elements;\n };\n const findShadowRoots = fragment => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n }));\n };\n const isPromise = promise => promise && "function" == typeof promise.then;\n const broadcast = (infix, ev, type = ev.type) => {\n querySelectorAll("[on" + infix + "\\\\:" + type + "]").forEach((el => dispatch(el, infix, ev, type)));\n };\n const resolveContainer = containerEl => {\n if (void 0 === containerEl._qwikjson_) {\n let script = (containerEl === doc.documentElement ? doc.body : containerEl).lastElementChild;\n while (script) {\n if ("SCRIPT" === script.tagName && "qwik/json" === script.getAttribute("type")) {\n containerEl._qwikjson_ = JSON.parse(script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1"));\n break;\n }\n script = script.previousElementSibling;\n }\n }\n };\n const createEvent = (eventName, detail) => new CustomEvent(eventName, {\n detail: detail\n });\n const dispatch = async (element, scope, ev, eventName = ev.type) => {\n const attrName = "on" + scope + ":" + eventName;\n element.hasAttribute("preventdefault:" + eventName) && ev.preventDefault();\n const ctx = element._qc_;\n const relevantListeners = ctx && ctx.li.filter((li => li[0] === attrName));\n if (relevantListeners && relevantListeners.length > 0) {\n for (const listener of relevantListeners) {\n const results = listener[1].getFn([ element, ev ], (() => element.isConnected))(ev, element);\n const cancelBubble = ev.cancelBubble;\n isPromise(results) && await results;\n cancelBubble && ev.stopPropagation();\n }\n return;\n }\n const qDispatchEvent = element.qDispatchEvent;\n if (qDispatchEvent) {\n return qDispatchEvent(ev, scope);\n }\n const attrValue = element.getAttribute(attrName);\n if (attrValue) {\n const container = element.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");\n const qBase = container.getAttribute("q:base");\n const qVersion = container.getAttribute("q:version") || "unknown";\n const qManifest = container.getAttribute("q:manifest-hash") || "dev";\n const base = new URL(qBase, doc.baseURI);\n for (const qrl of attrValue.split("\\n")) {\n const url = new URL(qrl, base);\n const href = url.href;\n const symbol = url.hash.replace(/^#?([^?[|]*).*$/, "$1") || "default";\n const reqTime = performance.now();\n let handler;\n let importError;\n let error;\n const isSync = qrl.startsWith("#");\n const eventData = {\n qBase: qBase,\n qManifest: qManifest,\n qVersion: qVersion,\n href: href,\n symbol: symbol,\n element: element,\n reqTime: reqTime\n };\n if (isSync) {\n const hash = container.getAttribute("q:instance");\n handler = (doc["qFuncs_" + hash] || [])[Number.parseInt(symbol)];\n if (!handler) {\n importError = "sync";\n error = new Error("sync handler error for symbol: " + symbol);\n }\n } else {\n const uri = url.href.split("#")[0];\n try {\n const module = import(\n uri);\n resolveContainer(container);\n handler = (await module)[symbol];\n if (!handler) {\n importError = "no-symbol";\n error = new Error(`${symbol} not in ${uri}`);\n }\n } catch (err) {\n importError || (importError = "async");\n error = err;\n }\n }\n if (!handler) {\n emitEvent("qerror", __spreadValues({\n importError: importError,\n error: error\n }, eventData));\n console.error(error);\n break;\n }\n const previousCtx = doc[Q_CONTEXT];\n if (element.isConnected) {\n const handleEvent = async (retryCount = 0) => {\n try {\n doc[Q_CONTEXT] = [ element, ev, url ];\n isSync || emitEvent("qsymbol", __spreadValues({}, eventData));\n const results = handler(ev, element);\n isPromise(results) && await results;\n } catch (error2) {\n isPromise(error2) && retryCount < 100 ? error2.then((() => handleEvent(retryCount++))) : emitEvent("qerror", __spreadValues({\n error: error2\n }, eventData));\n } finally {\n doc[Q_CONTEXT] = previousCtx;\n }\n };\n handleEvent();\n }\n }\n }\n };\n const emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n };\n const camelToKebab = str => str.replace(/([A-Z])/g, (a => "-" + a.toLowerCase()));\n const processDocumentEvent = async ev => {\n let type = camelToKebab(ev.type);\n let element = ev.target;\n broadcast("-document", ev, type);\n while (element && element.getAttribute) {\n const results = dispatch(element, "", ev, type);\n let cancelBubble = ev.cancelBubble;\n isPromise(results) && await results;\n cancelBubble = cancelBubble || ev.cancelBubble || element.hasAttribute("stoppropagation:" + ev.type);\n element = ev.bubbles && !0 !== cancelBubble ? element.parentElement : null;\n }\n };\n const processWindowEvent = ev => {\n broadcast("-window", ev, camelToKebab(ev.type));\n };\n const processReadyStateChange = () => {\n var _a;\n const readyState = doc.readyState;\n if (!hasInitialized && ("interactive" == readyState || "complete" == readyState)) {\n roots.forEach(findShadowRoots);\n hasInitialized = 1;\n emitEvent("qinit");\n (null != (_a = win.requestIdleCallback) ? _a : win.setTimeout).bind(win)((() => emitEvent("qidle")));\n if (events.has("qvisible")) {\n const results = querySelectorAll("[on\\\\:qvisible]");\n const observer = new IntersectionObserver((entries => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(entry.target, "", createEvent("qvisible", entry));\n }\n }\n }));\n results.forEach((el => observer.observe(el)));\n }\n }\n };\n const addEventListener = (el, eventName, handler, capture = !1) => el.addEventListener(eventName, handler, {\n capture: capture,\n passive: !1\n });\n const processEventOrNode = (...eventNames) => {\n for (const eventNameOrNode of eventNames) {\n if ("string" == typeof eventNameOrNode) {\n if (!events.has(eventNameOrNode)) {\n roots.forEach((root => addEventListener(root, eventNameOrNode, processDocumentEvent, !0)));\n addEventListener(win, eventNameOrNode, processWindowEvent, !0);\n events.add(eventNameOrNode);\n }\n } else if (!roots.has(eventNameOrNode)) {\n events.forEach((eventName => addEventListener(eventNameOrNode, eventName, processDocumentEvent, !0)));\n roots.add(eventNameOrNode);\n }\n }\n };\n if (!(Q_CONTEXT in doc)) {\n doc[Q_CONTEXT] = 0;\n const qwikevents = win.qwikevents;\n Array.isArray(qwikevents) && processEventOrNode(...qwikevents);\n win.qwikevents = {\n events: events,\n roots: roots,\n push: processEventOrNode\n };\n addEventListener(doc, "readystatechange", processReadyStateChange);\n processReadyStateChange();\n }\n })(document);\n})()';
|
|
2575
|
+
var QWIK_LOADER_DEFAULT_DEBUG = '(() => {\n var __defProp = Object.defineProperty;\n var __getOwnPropSymbols = Object.getOwnPropertySymbols;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __propIsEnum = Object.prototype.propertyIsEnumerable;\n var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, {\n enumerable: !0,\n configurable: !0,\n writable: !0,\n value: value\n }) : obj[key] = value;\n var __spreadValues = (a, b) => {\n for (var prop in b || (b = {})) {\n __hasOwnProp.call(b, prop) && __defNormalProp(a, prop, b[prop]);\n }\n if (__getOwnPropSymbols) {\n for (var prop of __getOwnPropSymbols(b)) {\n __propIsEnum.call(b, prop) && __defNormalProp(a, prop, b[prop]);\n }\n }\n return a;\n };\n ((doc, hasInitialized) => {\n const Q_CONTEXT = "__q_context__";\n const win = window;\n const events = new Set;\n const roots = new Set([ doc ]);\n const nativeQuerySelectorAll = (root, selector) => Array.from(root.querySelectorAll(selector));\n const querySelectorAll = query => {\n const elements = [];\n roots.forEach((root => elements.push(...nativeQuerySelectorAll(root, query))));\n return elements;\n };\n const findShadowRoots = fragment => {\n processEventOrNode(fragment);\n nativeQuerySelectorAll(fragment, "[q\\\\:shadowroot]").forEach((parent => {\n const shadowRoot = parent.shadowRoot;\n shadowRoot && findShadowRoots(shadowRoot);\n }));\n };\n const isPromise = promise => promise && "function" == typeof promise.then;\n const broadcast = (infix, ev, type = ev.type) => {\n querySelectorAll("[on" + infix + "\\\\:" + type + "]").forEach((el => dispatch(el, infix, ev, type)));\n };\n const resolveContainer = containerEl => {\n if (void 0 === containerEl._qwikjson_) {\n let script = (containerEl === doc.documentElement ? doc.body : containerEl).lastElementChild;\n while (script) {\n if ("SCRIPT" === script.tagName && "qwik/json" === script.getAttribute("type")) {\n containerEl._qwikjson_ = JSON.parse(script.textContent.replace(/\\\\x3C(\\/?script)/gi, "<$1"));\n break;\n }\n script = script.previousElementSibling;\n }\n }\n };\n const createEvent = (eventName, detail) => new CustomEvent(eventName, {\n detail: detail\n });\n const dispatch = async (element, scope, ev, eventName = ev.type) => {\n const attrName = "on" + scope + ":" + eventName;\n element.hasAttribute("preventdefault:" + eventName) && ev.preventDefault();\n element.hasAttribute("stoppropagation:" + eventName) && ev.stopPropagation();\n const ctx = element._qc_;\n const relevantListeners = ctx && ctx.li.filter((li => li[0] === attrName));\n if (relevantListeners && relevantListeners.length > 0) {\n for (const listener of relevantListeners) {\n const results = listener[1].getFn([ element, ev ], (() => element.isConnected))(ev, element);\n const cancelBubble = ev.cancelBubble;\n isPromise(results) && await results;\n cancelBubble && ev.stopPropagation();\n }\n return;\n }\n const qDispatchEvent = element.qDispatchEvent;\n if (qDispatchEvent) {\n return qDispatchEvent(ev, scope);\n }\n const attrValue = element.getAttribute(attrName);\n if (attrValue) {\n const container = element.closest("[q\\\\:container]:not([q\\\\:container=html]):not([q\\\\:container=text])");\n const qBase = container.getAttribute("q:base");\n const qVersion = container.getAttribute("q:version") || "unknown";\n const qManifest = container.getAttribute("q:manifest-hash") || "dev";\n const base = new URL(qBase, doc.baseURI);\n for (const qrl of attrValue.split("\\n")) {\n const url = new URL(qrl, base);\n const href = url.href;\n const symbol = url.hash.replace(/^#?([^?[|]*).*$/, "$1") || "default";\n const reqTime = performance.now();\n let handler;\n let importError;\n let error;\n const isSync = qrl.startsWith("#");\n const eventData = {\n qBase: qBase,\n qManifest: qManifest,\n qVersion: qVersion,\n href: href,\n symbol: symbol,\n element: element,\n reqTime: reqTime\n };\n if (isSync) {\n const hash = container.getAttribute("q:instance");\n handler = (doc["qFuncs_" + hash] || [])[Number.parseInt(symbol)];\n if (!handler) {\n importError = "sync";\n error = new Error("sync handler error for symbol: " + symbol);\n }\n } else {\n const uri = url.href.split("#")[0];\n try {\n const module = import(\n uri);\n resolveContainer(container);\n handler = (await module)[symbol];\n if (!handler) {\n importError = "no-symbol";\n error = new Error(`${symbol} not in ${uri}`);\n }\n } catch (err) {\n importError || (importError = "async");\n error = err;\n }\n }\n if (!handler) {\n emitEvent("qerror", __spreadValues({\n importError: importError,\n error: error\n }, eventData));\n console.error(error);\n break;\n }\n const previousCtx = doc[Q_CONTEXT];\n if (element.isConnected) {\n const handleEvent = async (retryCount = 0) => {\n try {\n doc[Q_CONTEXT] = [ element, ev, url ];\n isSync || emitEvent("qsymbol", __spreadValues({}, eventData));\n const results = handler(ev, element);\n isPromise(results) && await results;\n } catch (error2) {\n isPromise(error2) && retryCount < 100 ? error2.then((() => handleEvent(retryCount++))) : emitEvent("qerror", __spreadValues({\n error: error2\n }, eventData));\n } finally {\n doc[Q_CONTEXT] = previousCtx;\n }\n };\n handleEvent();\n }\n }\n }\n };\n const emitEvent = (eventName, detail) => {\n doc.dispatchEvent(createEvent(eventName, detail));\n };\n const camelToKebab = str => str.replace(/([A-Z])/g, (a => "-" + a.toLowerCase()));\n const processDocumentEvent = async ev => {\n let type = camelToKebab(ev.type);\n let element = ev.target;\n broadcast("-document", ev, type);\n while (element && element.getAttribute) {\n const results = dispatch(element, "", ev, type);\n let cancelBubble = ev.cancelBubble;\n isPromise(results) && await results;\n cancelBubble = cancelBubble || ev.cancelBubble || element.hasAttribute("stoppropagation:" + ev.type);\n element = ev.bubbles && !0 !== cancelBubble ? element.parentElement : null;\n }\n };\n const processWindowEvent = ev => {\n broadcast("-window", ev, camelToKebab(ev.type));\n };\n const processReadyStateChange = () => {\n var _a;\n const readyState = doc.readyState;\n if (!hasInitialized && ("interactive" == readyState || "complete" == readyState)) {\n roots.forEach(findShadowRoots);\n hasInitialized = 1;\n emitEvent("qinit");\n (null != (_a = win.requestIdleCallback) ? _a : win.setTimeout).bind(win)((() => emitEvent("qidle")));\n if (events.has("qvisible")) {\n const results = querySelectorAll("[on\\\\:qvisible]");\n const observer = new IntersectionObserver((entries => {\n for (const entry of entries) {\n if (entry.isIntersecting) {\n observer.unobserve(entry.target);\n dispatch(entry.target, "", createEvent("qvisible", entry));\n }\n }\n }));\n results.forEach((el => observer.observe(el)));\n }\n }\n };\n const addEventListener = (el, eventName, handler, capture = !1) => el.addEventListener(eventName, handler, {\n capture: capture,\n passive: !1\n });\n const processEventOrNode = (...eventNames) => {\n for (const eventNameOrNode of eventNames) {\n if ("string" == typeof eventNameOrNode) {\n if (!events.has(eventNameOrNode)) {\n roots.forEach((root => addEventListener(root, eventNameOrNode, processDocumentEvent, !0)));\n addEventListener(win, eventNameOrNode, processWindowEvent, !0);\n events.add(eventNameOrNode);\n }\n } else if (!roots.has(eventNameOrNode)) {\n events.forEach((eventName => addEventListener(eventNameOrNode, eventName, processDocumentEvent, !0)));\n roots.add(eventNameOrNode);\n }\n }\n };\n if (!(Q_CONTEXT in doc)) {\n doc[Q_CONTEXT] = 0;\n const qwikevents = win.qwikevents;\n Array.isArray(qwikevents) && processEventOrNode(...qwikevents);\n win.qwikevents = {\n events: events,\n roots: roots,\n push: processEventOrNode\n };\n addEventListener(doc, "readystatechange", processReadyStateChange);\n processReadyStateChange();\n }\n })(document);\n})()';
|
|
2576
2576
|
|
|
2577
2577
|
var import_bmp = __toESM(require_bmp(), 1);
|
|
2578
2578
|
|
|
@@ -3279,7 +3279,7 @@ function setLocale(locale) {
|
|
|
3279
3279
|
}
|
|
3280
3280
|
|
|
3281
3281
|
var versions3 = {
|
|
3282
|
-
qwik: "2.0.0-alpha.
|
|
3282
|
+
qwik: "2.0.0-alpha.3-dev+418fd6d",
|
|
3283
3283
|
qwikDom: globalThis.QWIK_DOM_VERSION
|
|
3284
3284
|
};
|
|
3285
3285
|
|
|
@@ -3446,10 +3446,10 @@ function clearEffects(subscriber, value) {
|
|
|
3446
3446
|
return subscriptionRemoved;
|
|
3447
3447
|
}
|
|
3448
3448
|
|
|
3449
|
-
var DEBUG = false;
|
|
3450
|
-
|
|
3451
3449
|
var NEEDS_COMPUTATION = Symbol("invalid");
|
|
3452
3450
|
|
|
3451
|
+
var DEBUG = false;
|
|
3452
|
+
|
|
3453
3453
|
var log = (...args) => console.log("SIGNAL", ...args.map(qwikDebugToString));
|
|
3454
3454
|
|
|
3455
3455
|
var throwIfQRLNotResolved = qrl2 => {
|
|
@@ -3829,6 +3829,13 @@ var StoreHandler = class {
|
|
|
3829
3829
|
if (prop === STORE_TARGET) {
|
|
3830
3830
|
return true;
|
|
3831
3831
|
}
|
|
3832
|
+
if ("string" === typeof prop) {
|
|
3833
|
+
const ctx = tryGetInvokeContext();
|
|
3834
|
+
if (ctx) {
|
|
3835
|
+
const effectSubscriber = ctx.$effectSubscriber$;
|
|
3836
|
+
effectSubscriber && addEffect(target, Array.isArray(target) ? STORE_ARRAY_PROP : prop, this, effectSubscriber);
|
|
3837
|
+
}
|
|
3838
|
+
}
|
|
3832
3839
|
return Object.prototype.hasOwnProperty.call(target, prop);
|
|
3833
3840
|
}
|
|
3834
3841
|
ownKeys(target) {
|
|
@@ -4574,34 +4581,35 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
|
|
|
4574
4581
|
return peekNextSibling();
|
|
4575
4582
|
}
|
|
4576
4583
|
function descendContentToProject(children, host) {
|
|
4577
|
-
Array.isArray(children)
|
|
4578
|
-
|
|
4579
|
-
|
|
4580
|
-
|
|
4581
|
-
|
|
4582
|
-
|
|
4583
|
-
|
|
4584
|
-
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
projections.push(createProjectionJSXNode(slotName));
|
|
4588
|
-
}
|
|
4584
|
+
const projectionChildren = Array.isArray(children) ? children : [ children ];
|
|
4585
|
+
const createProjectionJSXNode = slotName => new JSXNodeImpl(Projection, EMPTY_OBJ, null, [], 0, slotName);
|
|
4586
|
+
const projections = [];
|
|
4587
|
+
if (host) {
|
|
4588
|
+
for (let i = vnode_getPropStartIndex(host); i < host.length; i += 2) {
|
|
4589
|
+
const prop = host[i];
|
|
4590
|
+
if (isSlotProp(prop)) {
|
|
4591
|
+
const slotName = prop;
|
|
4592
|
+
projections.push(slotName);
|
|
4593
|
+
projections.push(createProjectionJSXNode(slotName));
|
|
4589
4594
|
}
|
|
4590
4595
|
}
|
|
4591
|
-
for (let i = 0; i < children.length; i++) {
|
|
4592
|
-
const child = children[i];
|
|
4593
|
-
const slotName = String(isJSXNode(child) && directGetPropsProxyProp(child, QSlot) || QDefaultSlot);
|
|
4594
|
-
const idx = mapApp_findIndx(projections, slotName, 0);
|
|
4595
|
-
let jsxBucket;
|
|
4596
|
-
idx >= 0 ? jsxBucket = projections[idx + 1] : projections.splice(~idx, 0, slotName, jsxBucket = createProjectionJSXNode(slotName));
|
|
4597
|
-
const removeProjection = false === child;
|
|
4598
|
-
removeProjection || jsxBucket.children.push(child);
|
|
4599
|
-
}
|
|
4600
|
-
for (let i = projections.length - 2; i >= 0; i -= 2) {
|
|
4601
|
-
projections.splice(i, 1);
|
|
4602
|
-
}
|
|
4603
|
-
descend(projections, true);
|
|
4604
4596
|
}
|
|
4597
|
+
if (0 === projections.length && null == children) {
|
|
4598
|
+
return;
|
|
4599
|
+
}
|
|
4600
|
+
for (let i = 0; i < projectionChildren.length; i++) {
|
|
4601
|
+
const child = projectionChildren[i];
|
|
4602
|
+
const slotName = String(isJSXNode(child) && directGetPropsProxyProp(child, QSlot) || QDefaultSlot);
|
|
4603
|
+
const idx = mapApp_findIndx(projections, slotName, 0);
|
|
4604
|
+
let jsxBucket;
|
|
4605
|
+
idx >= 0 ? jsxBucket = projections[idx + 1] : projections.splice(~idx, 0, slotName, jsxBucket = createProjectionJSXNode(slotName));
|
|
4606
|
+
const removeProjection = false === child;
|
|
4607
|
+
removeProjection || jsxBucket.children.push(child);
|
|
4608
|
+
}
|
|
4609
|
+
for (let i = projections.length - 2; i >= 0; i -= 2) {
|
|
4610
|
+
projections.splice(i, 1);
|
|
4611
|
+
}
|
|
4612
|
+
descend(projections, true);
|
|
4605
4613
|
}
|
|
4606
4614
|
function expectProjection() {
|
|
4607
4615
|
const jsxNode2 = jsxValue;
|
|
@@ -4967,7 +4975,7 @@ var vnode_diff = (container, jsxNode, vStartNode, scopedStyleIdPrefix) => {
|
|
|
4967
4975
|
container.$scheduler$(7, host, componentQRL, jsxProps);
|
|
4968
4976
|
}
|
|
4969
4977
|
}
|
|
4970
|
-
|
|
4978
|
+
descendContentToProject(jsxNode2.children, host);
|
|
4971
4979
|
} else {
|
|
4972
4980
|
const lookupKey = jsxNode2.key;
|
|
4973
4981
|
const vNodeLookupKey = getKey(host);
|
|
@@ -5244,7 +5252,13 @@ var createScheduler = (container, scheduleDrain, journalFlush) => {
|
|
|
5244
5252
|
|
|
5245
5253
|
case 7:
|
|
5246
5254
|
case 6:
|
|
5247
|
-
returnValue = safeCall((() => executeComponent(container, host, host, chore.$target$, chore.$payload$)), (jsx3 =>
|
|
5255
|
+
returnValue = safeCall((() => executeComponent(container, host, host, chore.$target$, chore.$payload$)), (jsx3 => {
|
|
5256
|
+
if (7 === chore.$type$) {
|
|
5257
|
+
const styleScopedId = container.getHostProp(host, QScopedStyle);
|
|
5258
|
+
return vnode_diff(container, jsx3, host, addComponentStylePrefix(styleScopedId));
|
|
5259
|
+
}
|
|
5260
|
+
return jsx3;
|
|
5261
|
+
}), (err => container.handleError(err, host)));
|
|
5248
5262
|
break;
|
|
5249
5263
|
|
|
5250
5264
|
case 2:
|
|
@@ -5328,7 +5342,7 @@ function choreComparator(a, b, shouldThrowOnHostMismatch) {
|
|
|
5328
5342
|
const bHost = b.$host$;
|
|
5329
5343
|
if (aHost !== bHost && null !== aHost && null !== bHost) {
|
|
5330
5344
|
if (!vnode_isVNode(aHost) || !vnode_isVNode(bHost)) {
|
|
5331
|
-
const errorMessage =
|
|
5345
|
+
const errorMessage = `SERVER: during HTML streaming, re-running tasks on a different host is not allowed.\n You are attempting to change a state that has already been streamed to the client.\n This can lead to inconsistencies between Server-Side Rendering (SSR) and Client-Side Rendering (CSR).\n Problematic Node: ${aHost.toString()}`;
|
|
5332
5346
|
shouldThrowOnHostMismatch && throwErrorAndStop(errorMessage);
|
|
5333
5347
|
logWarn(errorMessage);
|
|
5334
5348
|
return null;
|
|
@@ -5415,7 +5429,7 @@ function debugTrace(action, arg, currentChore, queue) {
|
|
|
5415
5429
|
console.log(lines.join("\n ") + "\n");
|
|
5416
5430
|
}
|
|
5417
5431
|
|
|
5418
|
-
var version = "2.0.0-alpha.
|
|
5432
|
+
var version = "2.0.0-alpha.3-dev+418fd6d";
|
|
5419
5433
|
|
|
5420
5434
|
var _SharedContainer = class {
|
|
5421
5435
|
constructor(scheduleDrain, journalFlush, serverData, locale) {
|
|
@@ -5439,8 +5453,8 @@ var _SharedContainer = class {
|
|
|
5439
5453
|
trackSignalValue(signal, subscriber, property, data) {
|
|
5440
5454
|
return trackSignal((() => signal.value), subscriber, property, this, data);
|
|
5441
5455
|
}
|
|
5442
|
-
serializationCtxFactory(NodeConstructor, symbolToChunkResolver, writer, prepVNodeData) {
|
|
5443
|
-
return createSerializationContext(NodeConstructor, symbolToChunkResolver, this.getHostProp.bind(this), this.setHostProp.bind(this), this.$storeProxyMap$, writer, prepVNodeData);
|
|
5456
|
+
serializationCtxFactory(NodeConstructor, DomRefConstructor, symbolToChunkResolver, writer, prepVNodeData) {
|
|
5457
|
+
return createSerializationContext(NodeConstructor, DomRefConstructor, symbolToChunkResolver, this.getHostProp.bind(this), this.setHostProp.bind(this), this.$storeProxyMap$, writer, prepVNodeData);
|
|
5444
5458
|
}
|
|
5445
5459
|
};
|
|
5446
5460
|
|
|
@@ -5810,10 +5824,6 @@ var DomContainer = class extends _SharedContainer {
|
|
|
5810
5824
|
parseQRL(qrl2) {
|
|
5811
5825
|
return inflateQRL(this, parseQRL(qrl2));
|
|
5812
5826
|
}
|
|
5813
|
-
processJsx(host, jsx2) {
|
|
5814
|
-
const styleScopedId = this.getHostProp(host, QScopedStyle);
|
|
5815
|
-
return vnode_diff(this, jsx2, host, addComponentStylePrefix(styleScopedId));
|
|
5816
|
-
}
|
|
5817
5827
|
handleError(err, host) {
|
|
5818
5828
|
if (qDev) {
|
|
5819
5829
|
if ("undefined" !== typeof document) {
|
|
@@ -7642,7 +7652,11 @@ var inflate = (container, target, typeId, data) => {
|
|
|
7642
7652
|
const valType = data[i2 + 2];
|
|
7643
7653
|
const valData = data[i2 + 3];
|
|
7644
7654
|
0 === valType || valType >= 12 ? Object.defineProperty(target, key, {
|
|
7645
|
-
get
|
|
7655
|
+
get() {
|
|
7656
|
+
const value = deserializeData(container, valType, valData);
|
|
7657
|
+
target[key] = value;
|
|
7658
|
+
return value;
|
|
7659
|
+
},
|
|
7646
7660
|
set(value) {
|
|
7647
7661
|
Object.defineProperty(target, key, {
|
|
7648
7662
|
value: value,
|
|
@@ -7988,13 +8002,9 @@ function inflateQRL(container, qrl2) {
|
|
|
7988
8002
|
return qrl2;
|
|
7989
8003
|
}
|
|
7990
8004
|
|
|
7991
|
-
var
|
|
7992
|
-
constructor(id) {
|
|
7993
|
-
this.id = id;
|
|
7994
|
-
}
|
|
7995
|
-
};
|
|
8005
|
+
var isDomRef = obj => false;
|
|
7996
8006
|
|
|
7997
|
-
var createSerializationContext = (NodeConstructor, symbolToChunkResolver, getProp, setProp, storeProxyMap, writer, prepVNodeData) => {
|
|
8007
|
+
var createSerializationContext = (NodeConstructor, DomRefConstructor, symbolToChunkResolver, getProp, setProp, storeProxyMap, writer, prepVNodeData) => {
|
|
7998
8008
|
if (!writer) {
|
|
7999
8009
|
const buffer = [];
|
|
8000
8010
|
writer = {
|
|
@@ -8018,11 +8028,13 @@ var createSerializationContext = (NodeConstructor, symbolToChunkResolver, getPro
|
|
|
8018
8028
|
return id;
|
|
8019
8029
|
};
|
|
8020
8030
|
const isSsrNode = NodeConstructor ? obj => obj instanceof NodeConstructor : () => false;
|
|
8031
|
+
isDomRef = DomRefConstructor ? obj => obj instanceof DomRefConstructor : () => false;
|
|
8021
8032
|
return {
|
|
8022
8033
|
$serialize$() {
|
|
8023
8034
|
serialize(this);
|
|
8024
8035
|
},
|
|
8025
8036
|
$isSsrNode$: isSsrNode,
|
|
8037
|
+
$isDomRef$: isDomRef,
|
|
8026
8038
|
$symbolToChunkResolver$: symbolToChunkResolver,
|
|
8027
8039
|
$wasSeen$: $wasSeen$,
|
|
8028
8040
|
$roots$: roots,
|
|
@@ -8112,6 +8124,8 @@ var createSerializationContext = (NodeConstructor, symbolToChunkResolver, getPro
|
|
|
8112
8124
|
discoveredValues.push(obj.$el$, obj.$qrl$, obj.$state$, obj.$effectDependencies$);
|
|
8113
8125
|
} else if (isSsrNode(obj)) {
|
|
8114
8126
|
discoveredValues.push(obj.vnodeData);
|
|
8127
|
+
} else if (isDomRef(obj)) {
|
|
8128
|
+
discoveredValues.push(obj.$ssrNode$.id);
|
|
8115
8129
|
} else if (isJSXNode(obj)) {
|
|
8116
8130
|
discoveredValues.push(obj.type, obj.props, obj.constProps, obj.children);
|
|
8117
8131
|
} else if (Array.isArray(obj)) {
|
|
@@ -8166,7 +8180,7 @@ var createSerializationContext = (NodeConstructor, symbolToChunkResolver, getPro
|
|
|
8166
8180
|
var promiseResults = new WeakMap;
|
|
8167
8181
|
|
|
8168
8182
|
function serialize(serializationContext) {
|
|
8169
|
-
const {$writer$: $writer$, $isSsrNode$: $isSsrNode$, $setProp$: $setProp$, $storeProxyMap$: $storeProxyMap$} = serializationContext;
|
|
8183
|
+
const {$writer$: $writer$, $isSsrNode$: $isSsrNode$, $isDomRef$: $isDomRef$, $setProp$: $setProp$, $storeProxyMap$: $storeProxyMap$} = serializationContext;
|
|
8170
8184
|
let depth = -1;
|
|
8171
8185
|
let writeType = false;
|
|
8172
8186
|
const output = (type, value) => {
|
|
@@ -8297,14 +8311,11 @@ function serialize(serializationContext) {
|
|
|
8297
8311
|
}
|
|
8298
8312
|
output(13, out);
|
|
8299
8313
|
}
|
|
8300
|
-
} else if (value
|
|
8301
|
-
|
|
8314
|
+
} else if ($isDomRef$(value)) {
|
|
8315
|
+
value.$ssrNode$.vnodeData[0] |= 8;
|
|
8316
|
+
output(9, value.$ssrNode$.id);
|
|
8302
8317
|
} else if (value instanceof Signal) {
|
|
8303
|
-
|
|
8304
|
-
if ($isSsrNode$(v)) {
|
|
8305
|
-
serializationContext.$addRoot$(v);
|
|
8306
|
-
v = new DomVRef(v.id);
|
|
8307
|
-
}
|
|
8318
|
+
const v = value instanceof ComputedSignal && (value.$invalid$ || fastSkipSerialize(value.$untrackedValue$)) ? NEEDS_COMPUTATION : value.$untrackedValue$;
|
|
8308
8319
|
if (value instanceof WrappedSignal) {
|
|
8309
8320
|
output(23, [ ...serializeWrappingFn(serializationContext, value), value.$effectDependencies$, v, ...value.$effects$ || [] ]);
|
|
8310
8321
|
} else if (value instanceof ComputedSignal) {
|
|
@@ -8525,6 +8536,9 @@ var canSerialize = value => {
|
|
|
8525
8536
|
if (value instanceof Uint8Array) {
|
|
8526
8537
|
return true;
|
|
8527
8538
|
}
|
|
8539
|
+
if (isDomRef?.(value)) {
|
|
8540
|
+
return true;
|
|
8541
|
+
}
|
|
8528
8542
|
} else if ("function" === typeof value && (isQrl2(value) || isQwikComponent(value))) {
|
|
8529
8543
|
return true;
|
|
8530
8544
|
}
|
|
@@ -8632,14 +8646,36 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef, refSym
|
|
|
8632
8646
|
}
|
|
8633
8647
|
let _containerEl;
|
|
8634
8648
|
const qrl2 = async function(...args) {
|
|
8635
|
-
const
|
|
8636
|
-
const result = await
|
|
8649
|
+
const boundedFn = bindFnToContext.call(this, tryGetInvokeContext());
|
|
8650
|
+
const result = await boundedFn(...args);
|
|
8637
8651
|
return result;
|
|
8638
8652
|
};
|
|
8639
8653
|
const setContainer = el => {
|
|
8640
8654
|
_containerEl || (_containerEl = el);
|
|
8641
8655
|
return _containerEl;
|
|
8642
8656
|
};
|
|
8657
|
+
function bindFnToContext(currentCtx, beforeFn) {
|
|
8658
|
+
return (...args) => maybeThen(resolveLazy(), (fn => {
|
|
8659
|
+
if (!isFunction(fn)) {
|
|
8660
|
+
throw qError(QError_qrlIsNotFunction);
|
|
8661
|
+
}
|
|
8662
|
+
if (beforeFn && false === beforeFn()) {
|
|
8663
|
+
return;
|
|
8664
|
+
}
|
|
8665
|
+
const context = createOrReuseInvocationContext(currentCtx);
|
|
8666
|
+
const prevQrl = context.$qrl$;
|
|
8667
|
+
const prevEvent = context.$event$;
|
|
8668
|
+
context.$qrl$ = qrl2;
|
|
8669
|
+
context.$event$ || (context.$event$ = this);
|
|
8670
|
+
try {
|
|
8671
|
+
return invoke.call(this, context, fn, ...args);
|
|
8672
|
+
} finally {
|
|
8673
|
+
context.$qrl$ = prevQrl;
|
|
8674
|
+
context.$event$ = prevEvent;
|
|
8675
|
+
}
|
|
8676
|
+
}));
|
|
8677
|
+
}
|
|
8678
|
+
const resolveLazy = containerEl => null !== symbolRef ? symbolRef : resolve(containerEl);
|
|
8643
8679
|
const wrapFn = fn => {
|
|
8644
8680
|
if ("function" !== typeof fn || !capture?.length && !captureRef?.length) {
|
|
8645
8681
|
return fn;
|
|
@@ -8682,28 +8718,6 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef, refSym
|
|
|
8682
8718
|
}));
|
|
8683
8719
|
return symbolRef;
|
|
8684
8720
|
};
|
|
8685
|
-
const resolveLazy = containerEl => null !== symbolRef ? symbolRef : resolve(containerEl);
|
|
8686
|
-
function invokeFn(currentCtx, beforeFn) {
|
|
8687
|
-
return (...args) => maybeThen(resolveLazy(), (f => {
|
|
8688
|
-
if (!isFunction(f)) {
|
|
8689
|
-
throw qError(QError_qrlIsNotFunction);
|
|
8690
|
-
}
|
|
8691
|
-
if (beforeFn && false === beforeFn()) {
|
|
8692
|
-
return;
|
|
8693
|
-
}
|
|
8694
|
-
const context = createOrReuseInvocationContext(currentCtx);
|
|
8695
|
-
const prevQrl = context.$qrl$;
|
|
8696
|
-
const prevEvent = context.$event$;
|
|
8697
|
-
context.$qrl$ = qrl2;
|
|
8698
|
-
context.$event$ || (context.$event$ = this);
|
|
8699
|
-
try {
|
|
8700
|
-
return invoke.call(this, context, f, ...args);
|
|
8701
|
-
} finally {
|
|
8702
|
-
context.$qrl$ = prevQrl;
|
|
8703
|
-
context.$event$ = prevEvent;
|
|
8704
|
-
}
|
|
8705
|
-
}));
|
|
8706
|
-
}
|
|
8707
8721
|
const createOrReuseInvocationContext = invoke2 => null == invoke2 ? newInvokeContext() : isArray(invoke2) ? newInvokeContextFromTuple(invoke2) : invoke2;
|
|
8708
8722
|
const resolvedSymbol = refSymbol ?? symbol;
|
|
8709
8723
|
const hash = getSymbolHash(resolvedSymbol);
|
|
@@ -8718,7 +8732,7 @@ var createQRL = (chunk, symbol, symbolRef, symbolFn, capture, captureRef, refSym
|
|
|
8718
8732
|
$symbol$: symbol,
|
|
8719
8733
|
$refSymbol$: refSymbol,
|
|
8720
8734
|
$hash$: hash,
|
|
8721
|
-
getFn:
|
|
8735
|
+
getFn: bindFnToContext,
|
|
8722
8736
|
$capture$: capture,
|
|
8723
8737
|
$captureRef$: captureRef,
|
|
8724
8738
|
dev: null,
|
package/dist/qwikloader.debug.js
CHANGED
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
const dispatch = async (element, scope, ev, eventName = ev.type) => {
|
|
61
61
|
const attrName = "on" + scope + ":" + eventName;
|
|
62
62
|
element.hasAttribute("preventdefault:" + eventName) && ev.preventDefault();
|
|
63
|
+
element.hasAttribute("stoppropagation:" + eventName) && ev.stopPropagation();
|
|
63
64
|
const ctx = element._qc_;
|
|
64
65
|
const relevantListeners = ctx && ctx.li.filter((li => li[0] === attrName));
|
|
65
66
|
if (relevantListeners && relevantListeners.length > 0) {
|
package/dist/qwikloader.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,
|
|
1
|
+
(()=>{var e=Object.defineProperty,t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,o=Object.prototype.propertyIsEnumerable,r=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o,s=(e,s)=>{for(var a in s||(s={}))n.call(s,a)&&r(e,a,s[a]);if(t)for(var a of t(s))o.call(s,a)&&r(e,a,s[a]);return e};((e,t)=>{const n="__q_context__",o=window,r=new Set,a=new Set([e]),i="replace",c="forEach",l="target",f="getAttribute",p="isConnected",b="qvisible",u="_qwikjson_",h=(e,t)=>Array.from(e.querySelectorAll(t)),y=e=>{const t=[];return a.forEach((n=>t.push(...h(n,e)))),t},d=e=>{S(e),h(e,"[q\\:shadowroot]").forEach((e=>{const t=e.shadowRoot;t&&d(t)}))},q=e=>e&&"function"==typeof e.then,m=(e,t,n=t.type)=>{y("[on"+e+"\\:"+n+"]")[c]((o=>g(o,e,t,n)))},w=t=>{if(void 0===t[u]){let n=(t===e.documentElement?e.body:t).lastElementChild;for(;n;){if("SCRIPT"===n.tagName&&"qwik/json"===n[f]("type")){t[u]=JSON.parse(n.textContent[i](/\\x3C(\/?script)/gi,"<$1"));break}n=n.previousElementSibling}}},v=(e,t)=>new CustomEvent(e,{detail:t}),g=async(t,o,r,a=r.type)=>{const c="on"+o+":"+a;t.hasAttribute("preventdefault:"+a)&&r.preventDefault(),t.hasAttribute("stoppropagation:"+a)&&r.stopPropagation();const l=t._qc_,b=l&&l.li.filter((e=>e[0]===c));if(b&&b.length>0){for(const e of b){const n=e[1].getFn([t,r],(()=>t[p]))(r,t),o=r.cancelBubble;q(n)&&await n,o&&r.stopPropagation()}return}const u=t.qDispatchEvent;if(u)return u(r,o);const h=t[f](c);if(h){const o=t.closest("[q\\:container]:not([q\\:container=html]):not([q\\:container=text])"),a=o[f]("q:base"),c=o[f]("q:version")||"unknown",l=o[f]("q:manifest-hash")||"dev",b=new URL(a,e.baseURI);for(const f of h.split("\n")){const u=new URL(f,b),h=u.href,y=u.hash[i](/^#?([^?[|]*).*$/,"$1")||"default",d=performance.now();let m,v,g;const A=f.startsWith("#"),_={qBase:a,qManifest:l,qVersion:c,href:h,symbol:y,element:t,reqTime:d};if(A){const t=o.getAttribute("q:instance");m=(e["qFuncs_"+t]||[])[Number.parseInt(y)],m||(v="sync",g=Error("sync handler error for symbol: "+y))}else{const e=u.href.split("#")[0];try{const t=import(
|
|
2
2
|
/* @vite-ignore */
|
|
3
|
-
e);w(
|
|
3
|
+
e);w(o),m=(await t)[y],m||(v="no-symbol",g=Error(`${y} not in ${e}`))}catch(e){v||(v="async"),g=e}}if(!m){E("qerror",s({importError:v,error:g},_)),console.error(g);break}const k=e[n];if(t[p]){const o=async(a=0)=>{try{e[n]=[t,r,u],A||E("qsymbol",s({},_));const o=m(r,t);q(o)&&await o}catch(e){q(e)&&a<100?e.then((()=>o(a++))):E("qerror",s({error:e},_))}finally{e[n]=k}};o()}}}},E=(t,n)=>{e.dispatchEvent(v(t,n))},A=e=>e[i](/([A-Z])/g,(e=>"-"+e.toLowerCase())),_=async e=>{let t=A(e.type),n=e[l];for(m("-document",e,t);n&&n[f];){const o=g(n,"",e,t);let r=e.cancelBubble;q(o)&&await o,r=r||e.cancelBubble||n.hasAttribute("stoppropagation:"+e.type),n=e.bubbles&&!0!==r?n.parentElement:null}},k=e=>{m("-window",e,A(e.type))},C=()=>{var n;const s=e.readyState;if(!t&&("interactive"==s||"complete"==s)&&(a.forEach(d),t=1,E("qinit"),(null!=(n=o.requestIdleCallback)?n:o.setTimeout).bind(o)((()=>E("qidle"))),r.has(b))){const e=y("[on\\:"+b+"]"),t=new IntersectionObserver((e=>{for(const n of e)n.isIntersecting&&(t.unobserve(n[l]),g(n[l],"",v(b,n)))}));e[c]((e=>t.observe(e)))}},O=(e,t,n,o=!1)=>e.addEventListener(t,n,{capture:o,passive:!1}),S=(...e)=>{for(const t of e)"string"==typeof t?r.has(t)||(a.forEach((e=>O(e,t,_,!0))),O(o,t,k,!0),r.add(t)):a.has(t)||(r.forEach((e=>O(t,e,_,!0))),a.add(t))};if(!(n in e)){e[n]=0;const t=o.qwikevents;Array.isArray(t)&&S(...t),o.qwikevents={events:r,roots:a,push:S},O(e,"readystatechange",C),C()}})(document)})();
|