fix: inline content branch calls (#2948)

* perf: inline content branch calls

---------

Co-authored-by: Dylan Piercey <dpiercey@ebay.com>
This commit is contained in:
Ryan Turnquist 2025-11-11 12:40:00 -08:00 committed by GitHub
parent 181f80269d
commit 4a9d9dd563
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
186 changed files with 840 additions and 1138 deletions

View File

@ -0,0 +1,5 @@
---
"@marko/runtime-tags": patch
---
perf: inline content branch calls

View File

@ -7,8 +7,8 @@
{
"name": "*",
"total": {
"min": 19686,
"brotli": 7559
"min": 19684,
"brotli": 7547
}
},
{
@ -44,16 +44,16 @@
{
"name": "comments",
"user": {
"min": 757,
"brotli": 416
"min": 743,
"brotli": 417
},
"runtime": {
"min": 7097,
"brotli": 3095
"min": 7114,
"brotli": 3108
},
"total": {
"min": 7854,
"brotli": 3511
"min": 7857,
"brotli": 3525
}
},
{

View File

@ -1,4 +1,4 @@
// size: 757 (min) 416 (brotli)
// size: 743 (min) 417 (brotli)
const $if_content__setup = ($scope) => {
($scope.a,
$if_content__comment_comments._($scope),
@ -10,7 +10,6 @@ const $if_content__setup = ($scope) => {
$if_content__id = _if_closure(4, 0, ($scope) =>
$input_path($scope.a, $scope._.l),
),
$if_content = _content_branch("<ul></ul>", "/ b&", $if_content__setup),
$for_content__id = _const(11, ($scope) => {
(_attr($scope.a, "id", $scope.l), $if_content__id($scope));
}),
@ -33,7 +32,7 @@ const $if_content__setup = ($scope) => {
($for_content__input_path._($scope), $for_content__open($scope, !0));
},
$for_content__comment_text = _const(7, ($scope) => _text($scope.b, $scope.h)),
$for_content__if = _if(4, $if_content),
$for_content__if = _if(4, "<ul></ul>", "/ b&", $if_content__setup),
$for_content__comment_comments = _const(8, ($scope) => {
($for_content__if($scope, $scope.i ? 0 : 1),
$if_content__comment_comments($scope));
@ -48,12 +47,10 @@ const $if_content__setup = ($scope) => {
}),
$for = _for_of(
0,
_content_branch(
"<li><span> </span><button> </button><!></li>",
" E l D l%l",
$for_content__setup,
$for_content__$params,
),
"<li><span> </span><button> </button><!></li>",
" E l D l%l",
$for_content__setup,
$for_content__$params,
),
$input_comments = _const(3, ($scope) => $for($scope, [$scope.d])),
$input_path = _const(4, $for_content__input_path);

View File

@ -1,4 +1,4 @@
// size: 19686 (min) 7559 (brotli)
// size: 19684 (min) 7547 (brotli)
var empty = [],
rest = Symbol();
function attrTag(attrs) {
@ -909,9 +909,6 @@ function _content_closures(renderer, closureFns) {
);
};
}
function _content_branch(template, walks, setup, params) {
return _content("", template, walks, setup, params)();
}
var cloneCache = {};
function _attr(element, name, value) {
setAttribute(element, name, normalizeAttrValue(value));
@ -1160,9 +1157,10 @@ function toInsertNode(startNode, endNode) {
}
return parent;
}
function _await(nodeAccessor, renderer) {
function _await(nodeAccessor, template, walks, setup, params) {
let promiseAccessor = "L" + (nodeAccessor = decodeAccessor(nodeAccessor)),
branchAccessor = "A" + nodeAccessor;
branchAccessor = "A" + nodeAccessor,
renderer = _content("", template, walks, setup)();
return (
enableBranches(),
(scope, promise) => {
@ -1226,7 +1224,7 @@ function _await(nodeAccessor, renderer) {
referenceNode,
),
referenceNode.remove()),
renderer.a?.(awaitBranch, [data]),
params?.(awaitBranch, [data]),
tryWithPlaceholder &&
(placeholderShown.add(pendingEffects),
!--tryWithPlaceholder.O))
@ -1260,14 +1258,15 @@ function _await(nodeAccessor, renderer) {
}
);
}
function _try(nodeAccessor, content) {
let branchAccessor = "A" + (nodeAccessor = decodeAccessor(nodeAccessor));
function _try(nodeAccessor, template, walks, setup) {
let branchAccessor = "A" + (nodeAccessor = decodeAccessor(nodeAccessor)),
renderer = _content("", template, walks, setup)();
return (scope, input) => {
scope[branchAccessor] ||
setConditionalRenderer(
scope,
nodeAccessor,
content,
renderer,
createAndSetupBranch,
);
let branch = scope[branchAccessor];
@ -1297,8 +1296,14 @@ function renderCatch(scope, error) {
tryWithCatch.E.a?.(owner["A" + tryWithCatch.C], [error]));
}
}
function _if(nodeAccessor, ...branches) {
let branchAccessor = "D" + (nodeAccessor = decodeAccessor(nodeAccessor));
function _if(nodeAccessor, ...branchesArgs) {
let branchAccessor = "D" + (nodeAccessor = decodeAccessor(nodeAccessor)),
branches = [],
i = 0;
for (; i < branchesArgs.length; )
branches.push(
_content("", branchesArgs[i++], branchesArgs[i++], branchesArgs[i++])(),
);
return (
enableBranches(),
(scope, newBranch) => {
@ -1429,203 +1434,201 @@ function setConditionalRenderer(
(insertBranchBefore(newBranch, parentNode, referenceNode),
referenceNode.remove());
}
function _for_of(nodeAccessor, renderer) {
return loop(nodeAccessor, renderer, ([all, by = bySecondArg], cb) => {
var _for_of = loop(([all, by = bySecondArg], cb) => {
forOf(
all,
"string" == typeof by
? (item, i) => cb(item[by], [item, i])
: (item, i) => cb(by(item, i), [item, i]),
);
});
}
function _for_in(nodeAccessor, renderer) {
return loop(nodeAccessor, renderer, ([obj, by = byFirstArg], cb) =>
}),
_for_in = loop(([obj, by = byFirstArg], cb) =>
forIn(obj, (key, value) => cb(by(key, value), [key, value])),
);
}
function _for_to(nodeAccessor, renderer) {
return loop(nodeAccessor, renderer, ([to, from, step, by = byFirstArg], cb) =>
),
_for_to = loop(([to, from, step, by = byFirstArg], cb) =>
forTo(to, from, step, (v) => cb(by(v), [v])),
),
_for_until = loop(([until, from, step, by = byFirstArg], cb) =>
forUntil(until, from, step, (v) => cb(by(v), [v])),
);
}
function _for_until(nodeAccessor, renderer) {
return loop(
nodeAccessor,
renderer,
([until, from, step, by = byFirstArg], cb) =>
forUntil(until, from, step, (v) => cb(by(v), [v])),
);
}
function loop(nodeAccessor, renderer, forEach) {
nodeAccessor = decodeAccessor(nodeAccessor);
let params = renderer.a,
scopesAccessor = "A" + nodeAccessor,
scopesByKeyAccessor = "A" + scopesAccessor;
return (
enableBranches(),
(scope, value) => {
let referenceNode = scope[nodeAccessor],
oldScopes = toArray(scope[scopesAccessor]),
oldScopesByKey =
scope[scopesByKeyAccessor] ||
oldScopes.reduce(
(map, scope2, i) => map.set(scope2.M ?? i, scope2),
new Map(),
),
newScopes = (scope[scopesAccessor] = []),
newScopesByKey = (scope[scopesByKeyAccessor] = new Map()),
parentNode =
referenceNode.nodeType > 1
? referenceNode.parentNode || oldScopes[0]?.S.parentNode
: referenceNode;
forEach(value, (key, args) => {
let branch =
oldScopesByKey.get(key) ||
createAndSetupBranch(scope.$, renderer, scope, parentNode);
(params?.(branch, args),
newScopesByKey.set(key, branch),
newScopes.push(branch));
});
let afterReference = null;
(referenceNode !== parentNode &&
(oldScopes.length
? ((afterReference = oldScopes[oldScopes.length - 1].K.nextSibling),
newScopes.length ||
parentNode.insertBefore(referenceNode, afterReference))
: newScopes.length &&
((afterReference = referenceNode.nextSibling),
referenceNode.remove())),
(function (parent, oldBranches, newBranches, afterReference) {
let i,
j,
k,
nextSibling,
oldBranch,
newBranch,
oldStart = 0,
newStart = 0,
oldEnd = oldBranches.length - 1,
newEnd = newBranches.length - 1,
oldStartBranch = oldBranches[oldStart],
newStartBranch = newBranches[newStart],
oldEndBranch = oldBranches[oldEnd],
newEndBranch = newBranches[newEnd];
outer: {
for (; oldStartBranch === newStartBranch; ) {
if (
(++oldStart, ++newStart, oldStart > oldEnd || newStart > newEnd)
)
break outer;
((oldStartBranch = oldBranches[oldStart]),
(newStartBranch = newBranches[newStart]));
}
for (; oldEndBranch === newEndBranch; ) {
if ((--oldEnd, --newEnd, oldStart > oldEnd || newStart > newEnd))
break outer;
((oldEndBranch = oldBranches[oldEnd]),
(newEndBranch = newBranches[newEnd]));
}
}
if (oldStart > oldEnd) {
if (newStart <= newEnd) {
((k = newEnd + 1),
(nextSibling =
k < newBranches.length ? newBranches[k].S : afterReference));
do {
insertBranchBefore(
newBranches[newStart++],
parent,
nextSibling,
);
} while (newStart <= newEnd);
}
} else if (newStart > newEnd)
do {
removeAndDestroyBranch(oldBranches[oldStart++]);
} while (oldStart <= oldEnd);
else {
let oldLength = oldEnd - oldStart + 1,
newLength = newEnd - newStart + 1,
aNullable = oldBranches,
sources = new Array(newLength);
for (i = 0; i < newLength; ++i) sources[i] = -1;
let pos = 0,
synced = 0,
keyIndex = new Map();
for (j = newStart; j <= newEnd; ++j)
keyIndex.set(newBranches[j], j);
for (i = oldStart; i <= oldEnd && synced < newLength; ++i)
((oldBranch = oldBranches[i]),
(j = keyIndex.get(oldBranch)),
void 0 !== j &&
((pos = pos > j ? 2147483647 : j),
++synced,
(newBranch = newBranches[j]),
(sources[j - newStart] = i),
(aNullable[i] = null)));
if (oldLength === oldBranches.length && 0 === synced) {
for (; newStart < newLength; ++newStart)
insertBranchBefore(
newBranches[newStart],
parent,
afterReference,
);
for (; oldStart < oldLength; ++oldStart)
removeAndDestroyBranch(oldBranches[oldStart]);
} else {
for (i = oldLength - synced; i > 0; )
((oldBranch = aNullable[oldStart++]),
null !== oldBranch &&
(removeAndDestroyBranch(oldBranch), i--));
if (2147483647 === pos) {
let seq = (function (a) {
let u,
v,
p = a.slice(),
result = [0];
for (let i = 0, il = a.length; i < il; ++i) {
if (-1 === a[i]) continue;
let j = result[result.length - 1];
if (a[j] < a[i]) ((p[i] = j), result.push(i));
else {
for (u = 0, v = result.length - 1; u < v; ) {
let c = ((u + v) / 2) | 0;
a[result[c]] < a[i] ? (u = c + 1) : (v = c);
}
a[i] < a[result[u]] &&
(u > 0 && (p[i] = result[u - 1]), (result[u] = i));
}
}
for (u = result.length, v = result[u - 1]; u-- > 0; )
((result[u] = v), (v = p[v]));
return result;
})(sources);
for (
j = seq.length - 1, k = newBranches.length, i = newLength - 1;
i >= 0;
--i
function loop(forEach) {
return (nodeAccessor, template, walks, setup, params) => {
let scopesAccessor = "A" + (nodeAccessor = decodeAccessor(nodeAccessor)),
scopesByKeyAccessor = "A" + scopesAccessor,
renderer = _content("", template, walks, setup)();
return (
enableBranches(),
(scope, value) => {
let referenceNode = scope[nodeAccessor],
oldScopes = toArray(scope[scopesAccessor]),
oldScopesByKey =
scope[scopesByKeyAccessor] ||
oldScopes.reduce(
(map, scope2, i) => map.set(scope2.M ?? i, scope2),
new Map(),
),
newScopes = (scope[scopesAccessor] = []),
newScopesByKey = (scope[scopesByKeyAccessor] = new Map()),
parentNode =
referenceNode.nodeType > 1
? referenceNode.parentNode || oldScopes[0]?.S.parentNode
: referenceNode;
forEach(value, (key, args) => {
let branch =
oldScopesByKey.get(key) ||
createAndSetupBranch(scope.$, renderer, scope, parentNode);
(params?.(branch, args),
newScopesByKey.set(key, branch),
newScopes.push(branch));
});
let afterReference = null;
(referenceNode !== parentNode &&
(oldScopes.length
? ((afterReference = oldScopes[oldScopes.length - 1].K.nextSibling),
newScopes.length ||
parentNode.insertBefore(referenceNode, afterReference))
: newScopes.length &&
((afterReference = referenceNode.nextSibling),
referenceNode.remove())),
(function (parent, oldBranches, newBranches, afterReference) {
let i,
j,
k,
nextSibling,
oldBranch,
newBranch,
oldStart = 0,
newStart = 0,
oldEnd = oldBranches.length - 1,
newEnd = newBranches.length - 1,
oldStartBranch = oldBranches[oldStart],
newStartBranch = newBranches[newStart],
oldEndBranch = oldBranches[oldEnd],
newEndBranch = newBranches[newEnd];
outer: {
for (; oldStartBranch === newStartBranch; ) {
if (
(++oldStart,
++newStart,
oldStart > oldEnd || newStart > newEnd)
)
-1 === sources[i] || j < 0 || i !== seq[j]
? ((pos = i + newStart),
break outer;
((oldStartBranch = oldBranches[oldStart]),
(newStartBranch = newBranches[newStart]));
}
for (; oldEndBranch === newEndBranch; ) {
if (
(--oldEnd, --newEnd, oldStart > oldEnd || newStart > newEnd)
)
break outer;
((oldEndBranch = oldBranches[oldEnd]),
(newEndBranch = newBranches[newEnd]));
}
}
if (oldStart > oldEnd) {
if (newStart <= newEnd) {
((k = newEnd + 1),
(nextSibling =
k < newBranches.length
? newBranches[k].S
: afterReference));
do {
insertBranchBefore(
newBranches[newStart++],
parent,
nextSibling,
);
} while (newStart <= newEnd);
}
} else if (newStart > newEnd)
do {
removeAndDestroyBranch(oldBranches[oldStart++]);
} while (oldStart <= oldEnd);
else {
let oldLength = oldEnd - oldStart + 1,
newLength = newEnd - newStart + 1,
aNullable = oldBranches,
sources = new Array(newLength);
for (i = 0; i < newLength; ++i) sources[i] = -1;
let pos = 0,
synced = 0,
keyIndex = new Map();
for (j = newStart; j <= newEnd; ++j)
keyIndex.set(newBranches[j], j);
for (i = oldStart; i <= oldEnd && synced < newLength; ++i)
((oldBranch = oldBranches[i]),
(j = keyIndex.get(oldBranch)),
void 0 !== j &&
((pos = pos > j ? 2147483647 : j),
++synced,
(newBranch = newBranches[j]),
(sources[j - newStart] = i),
(aNullable[i] = null)));
if (oldLength === oldBranches.length && 0 === synced) {
for (; newStart < newLength; ++newStart)
insertBranchBefore(
newBranches[newStart],
parent,
afterReference,
);
for (; oldStart < oldLength; ++oldStart)
removeAndDestroyBranch(oldBranches[oldStart]);
} else {
for (i = oldLength - synced; i > 0; )
((oldBranch = aNullable[oldStart++]),
null !== oldBranch &&
(removeAndDestroyBranch(oldBranch), i--));
if (2147483647 === pos) {
let seq = (function (a) {
let u,
v,
p = a.slice(),
result = [0];
for (let i = 0, il = a.length; i < il; ++i) {
if (-1 === a[i]) continue;
let j = result[result.length - 1];
if (a[j] < a[i]) ((p[i] = j), result.push(i));
else {
for (u = 0, v = result.length - 1; u < v; ) {
let c = ((u + v) / 2) | 0;
a[result[c]] < a[i] ? (u = c + 1) : (v = c);
}
a[i] < a[result[u]] &&
(u > 0 && (p[i] = result[u - 1]), (result[u] = i));
}
}
for (u = result.length, v = result[u - 1]; u-- > 0; )
((result[u] = v), (v = p[v]));
return result;
})(sources);
for (
j = seq.length - 1,
k = newBranches.length,
i = newLength - 1;
i >= 0;
--i
)
-1 === sources[i] || j < 0 || i !== seq[j]
? ((pos = i + newStart),
(newBranch = newBranches[pos++]),
(nextSibling =
pos < k ? newBranches[pos].S : afterReference),
insertBranchBefore(newBranch, parent, nextSibling))
: --j;
} else if (synced !== newLength)
for (k = newBranches.length, i = newLength - 1; i >= 0; --i)
-1 === sources[i] &&
((pos = i + newStart),
(newBranch = newBranches[pos++]),
(nextSibling =
pos < k ? newBranches[pos].S : afterReference),
insertBranchBefore(newBranch, parent, nextSibling))
: --j;
} else if (synced !== newLength)
for (k = newBranches.length, i = newLength - 1; i >= 0; --i)
-1 === sources[i] &&
((pos = i + newStart),
(newBranch = newBranches[pos++]),
(nextSibling =
pos < k ? newBranches[pos].S : afterReference),
insertBranchBefore(newBranch, parent, nextSibling));
insertBranchBefore(newBranch, parent, nextSibling));
}
}
}
})(parentNode, oldScopes, newScopes, afterReference));
}
);
})(parentNode, oldScopes, newScopes, afterReference));
}
);
};
}
function createBranchWithTagNameOrRenderer(
$global,
@ -1834,7 +1837,7 @@ var classIdToBranch = new Map(),
)
: value,
createRenderer(params, clone) {
let renderer = _content_branch(0, 0, 0, params);
let renderer = _content("", 0, 0, 0, params)();
return (
(renderer.f = (branch) => {
let cloned = clone();

View File

@ -1 +1 @@
{"vars":{"props":{"$empty":"e","$rest":"t","$attrTag":"n","$attrTags":"r","$attrTagIterator":"o","$_assert_hoist":"l","$forIn":"i","$forOf":"u","$forTo":"f","$forUntil":"a","$stringifyClassObject":"c","$stringifyStyleObject":"s","$toDelimitedString":"d","$isEventHandler":"h","$getEventHandlerName":"g","$normalizeDynamicRenderer":"p","$defaultDelegator":"v","$_on":"b","$createDelegator":"m","$handleDelegated":"y","$stripSpacesAndPunctuation":"k","$nextScopeId":"C","$createScope":"_","$skipScope":"w","$findBranchWithKey":"N","$destroyBranch":"A","$destroyNestedBranches":"S","$removeAndDestroyBranch":"x","$insertBranchBefore":"M","$tempDetachBranch":"j","$walker":"I","$walk":"$","$walkInternal":"E","$branchesEnabled":"T","$isResuming":"L","$registeredValues":"R","$enableBranches":"q","$init":"B","$_resume":"O","$_var_resume":"D","$_el":"V","$_attr_input_checked":"F","$_attr_input_checked_script":"U","$_attr_input_checkedValue":"W","$_attr_input_checkedValue_script":"G","$_attr_input_value":"P","$_attr_input_value_script":"z","$_attr_select_value":"H","$_attr_select_value_script":"J","$setSelectOptions":"K","$_attr_details_or_dialog_open":"X","$_attr_details_or_dialog_open_script":"Z","$inputType":"Q","$setValueAndUpdateSelection":"Y","$setCheckboxValue":"ee","$controllableDelegate":"te","$syncControllable":"ne","$handleChange":"re","$handleFormReset":"oe","$hasValueChanged":"le","$hasCheckboxChanged":"ie","$hasSelectChanged":"ue","$hasFormElementChanged":"fe","$normalizeStrProp":"ae","$normalizeBoolProp":"ce","$toValueProp":"se","$isScheduled":"de","$channel":"he","$parsers":"ge","$parseHTML":"pe","$schedule":"ve","$flushAndWaitFrame":"be","$triggerMacroTask":"me","$_let":"ye","$_const":"ke","$_or":"Ce","$_for_closure":"_e","$_if_closure":"we","$subscribeToScopeSet":"Ne","$_closure":"Ae","$_closure_get":"Se","$closure":"xe","$_child_setup":"Me","$_var":"je","$_return":"Ie","$_return_change":"$e","$_var_change":"Ee","$tagIdsByGlobal":"Te","$_id":"Le","$_script":"Re","$_el_read":"qe","$traverseAllHoisted":"Be","$_hoist":"Oe","$createBranch":"De","$createAndSetupBranch":"Ve","$setupBranch":"Fe","$_content":"Ue","$_content_resume":"We","$_content_closures":"Ge","$_content_branch":"Pe","$cloneCache":"ze","$_attr":"He","$setAttribute":"Je","$_attr_class":"Ke","$_attr_class_items":"Xe","$_attr_class_item":"Ze","$_attr_style":"Qe","$_attr_style_items":"Ye","$_attr_style_item":"et","$_text":"tt","$_text_content":"nt","$_attrs":"rt","$_attrs_content":"ot","$hasAttrAlias":"lt","$_attrs_partial":"it","$_attrs_partial_content":"ut","$attrsInternal":"ft","$_attr_content":"at","$_attrs_script":"ct","$_html":"st","$normalizeAttrValue":"dt","$normalizeString":"ht","$_lifecycle":"gt","$removeChildNodes":"pt","$insertChildNodes":"vt","$toInsertNode":"bt","$_await":"mt","$_try":"yt","$renderCatch":"kt","$_if":"Ct","$_dynamic_tag":"_t","$setConditionalRenderer":"wt","$_for_of":"Nt","$_for_in":"At","$_for_to":"St","$_for_until":"xt","$loop":"Mt","$createBranchWithTagNameOrRenderer":"jt","$bySecondArg":"It","$byFirstArg":"$t","$rendering":"Et","$pendingRenders":"Tt","$pendingRendersLookup":"Lt","$caughtError":"Rt","$placeholderShown":"qt","$pendingEffects":"Bt","$pendingScopes":"Ot","$scopeKeyOffset":"Dt","$queueRender":"Vt","$queueEffect":"Ft","$run":"Ut","$prepareEffects":"Wt","$runEffects":"Gt","$runRenders":"Pt","$runRender":"zt","$_enable_catch":"Ht","$$signalReset":"Jt","$$signal":"Kt","$abort":"Xt","$classIdToBranch":"Zt","$compat":"Qt","$_template":"Yt","$mount":"en","$$clickCount__script":"tn","$$clickCount":"nn","$$setup":"an","$$if_content__setup":"ss","$$if_content__comment_comments":"as","$$if_content__id":"ts","$$if_content":"ns","$$for_content__id":"ls","$$for_content__input_path__OR__i":"os","$$for_content__input_path":"cs","$$for_content__i":"is","$$for_content__open__script":"us","$$for_content__open":"ms","$$for_content__setup":"bs","$$for_content__comment_text":"es","$$for_content__if":"ps","$$for_content__comment_comments":"_s","$$for_content__$params":"ds","$$for_content__comment":"fs","$$for":"hs","$$input_comments":"rs","$$input_path":"js","$_call":"rn","$_resume_dynamic_tag":"on","$dynamicTagScript":"ln","$decodeAccessor":"un","$toArray":"fn","$push":"cn"}}}
{"vars":{"props":{"$empty":"e","$rest":"t","$attrTag":"n","$attrTags":"r","$attrTagIterator":"o","$_assert_hoist":"l","$forIn":"i","$forOf":"u","$forTo":"f","$forUntil":"a","$stringifyClassObject":"c","$stringifyStyleObject":"s","$toDelimitedString":"d","$isEventHandler":"h","$getEventHandlerName":"g","$normalizeDynamicRenderer":"p","$defaultDelegator":"v","$_on":"b","$createDelegator":"m","$handleDelegated":"y","$stripSpacesAndPunctuation":"k","$nextScopeId":"C","$createScope":"_","$skipScope":"w","$findBranchWithKey":"N","$destroyBranch":"A","$destroyNestedBranches":"S","$removeAndDestroyBranch":"x","$insertBranchBefore":"M","$tempDetachBranch":"j","$walker":"I","$walk":"$","$walkInternal":"E","$branchesEnabled":"T","$isResuming":"L","$registeredValues":"R","$enableBranches":"q","$init":"B","$_resume":"O","$_var_resume":"D","$_el":"V","$_attr_input_checked":"F","$_attr_input_checked_script":"U","$_attr_input_checkedValue":"W","$_attr_input_checkedValue_script":"G","$_attr_input_value":"P","$_attr_input_value_script":"z","$_attr_select_value":"H","$_attr_select_value_script":"J","$setSelectOptions":"K","$_attr_details_or_dialog_open":"X","$_attr_details_or_dialog_open_script":"Z","$inputType":"Q","$setValueAndUpdateSelection":"Y","$setCheckboxValue":"ee","$controllableDelegate":"te","$syncControllable":"ne","$handleChange":"re","$handleFormReset":"oe","$hasValueChanged":"le","$hasCheckboxChanged":"ie","$hasSelectChanged":"ue","$hasFormElementChanged":"fe","$normalizeStrProp":"ae","$normalizeBoolProp":"ce","$toValueProp":"se","$isScheduled":"de","$channel":"he","$parsers":"ge","$parseHTML":"pe","$schedule":"ve","$flushAndWaitFrame":"be","$triggerMacroTask":"me","$_let":"ye","$_const":"ke","$_or":"Ce","$_for_closure":"_e","$_if_closure":"we","$subscribeToScopeSet":"Ne","$_closure":"Ae","$_closure_get":"Se","$closure":"xe","$_child_setup":"Me","$_var":"je","$_return":"Ie","$_return_change":"$e","$_var_change":"Ee","$tagIdsByGlobal":"Te","$_id":"Le","$_script":"Re","$_el_read":"qe","$traverseAllHoisted":"Be","$_hoist":"Oe","$createBranch":"De","$createAndSetupBranch":"Ve","$setupBranch":"Fe","$_content":"Ue","$_content_resume":"We","$_content_closures":"Ge","$_content_branch":"Pe","$cloneCache":"ze","$_attr":"He","$setAttribute":"Je","$_attr_class":"Ke","$_attr_class_items":"Xe","$_attr_class_item":"Ze","$_attr_style":"Qe","$_attr_style_items":"Ye","$_attr_style_item":"et","$_text":"tt","$_text_content":"nt","$_attrs":"rt","$_attrs_content":"ot","$hasAttrAlias":"lt","$_attrs_partial":"it","$_attrs_partial_content":"ut","$attrsInternal":"ft","$_attr_content":"at","$_attrs_script":"ct","$_html":"st","$normalizeAttrValue":"dt","$normalizeString":"ht","$_lifecycle":"gt","$removeChildNodes":"pt","$insertChildNodes":"vt","$toInsertNode":"bt","$_await":"mt","$_try":"yt","$renderCatch":"kt","$_if":"Ct","$_dynamic_tag":"_t","$setConditionalRenderer":"wt","$_for_of":"Nt","$_for_in":"At","$_for_to":"St","$_for_until":"xt","$loop":"Mt","$createBranchWithTagNameOrRenderer":"jt","$bySecondArg":"It","$byFirstArg":"$t","$rendering":"Et","$pendingRenders":"Tt","$pendingRendersLookup":"Lt","$caughtError":"Rt","$placeholderShown":"qt","$pendingEffects":"Bt","$pendingScopes":"Ot","$scopeKeyOffset":"Dt","$queueRender":"Vt","$queueEffect":"Ft","$run":"Ut","$prepareEffects":"Wt","$runEffects":"Gt","$runRenders":"Pt","$runRender":"zt","$_enable_catch":"Ht","$$signalReset":"Jt","$$signal":"Kt","$abort":"Xt","$classIdToBranch":"Zt","$compat":"Qt","$_template":"Yt","$mount":"en","$$clickCount__script":"tn","$$clickCount":"nn","$$setup":"an","$$if_content__setup":"ss","$$if_content__comment_comments":"as","$$if_content__id":"ts","$$if_content":"ns","$$for_content__id":"ls","$$for_content__input_path__OR__i":"os","$$for_content__input_path":"cs","$$for_content__i":"is","$$for_content__open__script":"us","$$for_content__open":"ms","$$for_content__setup":"bs","$$for_content__comment_text":"es","$$for_content__if":"ps","$$for_content__comment_comments":"_s","$$for_content__$params":"ds","$$for_content__comment":"fs","$$for":"hs","$$input_comments":"rs","$$input_path":"js","$_call":"rn","$_resume_dynamic_tag":"on","$dynamicTagScript":"ln","$decodeAccessor":"un","$toArray":"fn","$push":"cn","$forEach":"sn"}}}

View File

@ -1,14 +1,9 @@
// size: 161 (min) 134 (brotli)
// size: 138 (min) 110 (brotli)
const $if_content__setup = _._script("a0", ($scope) =>
_._on($scope.a, "click", function () {
$hide($scope._, !0);
}),
),
$if_content = _._content_branch(
"<button></button>",
" b",
$if_content__setup,
),
$if = _._if(0, $if_content),
$if = _._if(0, "<button></button>", " b", $if_content__setup),
$hide = _._let(1, ($scope) => $if($scope, $scope.b ? 1 : 0));
init();

View File

@ -5,8 +5,7 @@ const $if_content__setup__script = _._script("__tests__/template.marko_1", $scop
$hide($scope._, true);
}));
const $if_content__setup = $if_content__setup__script;
const $if_content = /* @__PURE__ */_._content_branch("<button></button>", /* get, over(1) */" b", $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/0", $if_content);
const $if = /* @__PURE__ */_._if("#text/0", "<button></button>", /* get, over(1) */" b", $if_content__setup);
const $hide = /* @__PURE__ */_._let("hide/1", $scope => $if($scope, !$scope.hide ? 0 : 1));
export function $setup($scope) {
$hide($scope, undefined);

View File

@ -9,14 +9,12 @@ const $await_content__setup = $scope => {
$await_content__input_level($scope);
};
const $await_content__input_level = /* @__PURE__ */_._closure_get("input_level", $scope => $input_level($scope["#childScope/0"], $scope._._._.input_level - 1), $scope => $scope._._._);
const $await_content = /* @__PURE__ */_._content_branch(`<!>${$template}<!>`, /* over(1), beginChild, $walks, endChild, over(1) */`b/${$walks}&b`, $await_content__setup);
const $try_content__await = /* @__PURE__ */_._await("#text/0", $await_content);
const $try_content__await = /* @__PURE__ */_._await("#text/0", `<!>${$template}<!>`, /* over(1), beginChild, $walks, endChild, over(1) */`b/${$walks}&b`, $await_content__setup);
const $try_content__setup = $scope => {
$try_content__await($scope, new Promise(setImmediate));
};
const $try_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $if_content__input_level = /* @__PURE__ */_._if_closure("#text/0", 0, $scope => _._attr($scope["#div/0"], "data-level", $scope._.input_level));
const $if_content__try = /* @__PURE__ */_._try("#text/1", $try_content);
const $if_content__try = /* @__PURE__ */_._try("#text/1", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $if_content__setup = $scope => {
$if_content__input_level._($scope);
$if_content__try($scope, {
@ -25,8 +23,7 @@ const $if_content__setup = $scope => {
})
});
};
const $if_content = /* @__PURE__ */_._content_branch("<div><!></div>", /* get, next(1), replace, out(1) */" D%l", $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/0", $if_content);
const $if = /* @__PURE__ */_._if("#text/0", "<div><!></div>", /* get, next(1), replace, out(1) */" D%l", $if_content__setup);
const $input_level__closure = /* @__PURE__ */_._closure($await_content__input_level);
export const $input_level = /* @__PURE__ */_._const("input_level", $scope => {
$if($scope, $scope.input_level ? 0 : 1);

View File

@ -1,4 +1,4 @@
// size: 835 (min) 246 (brotli)
// size: 720 (min) 223 (brotli)
const multiply = (multiplier, n) => resolveAfter(multiplier * n, n),
$await_content5__result = _._const(2, ($scope) =>
_._text($scope.a, $scope.c),
@ -6,38 +6,33 @@ const multiply = (multiplier, n) => resolveAfter(multiplier * n, n),
$await_content5__$params = _._const(1, ($scope) =>
$await_content5__result($scope, $scope.b[0]),
),
$await_content5 = _._content_branch(" ", " b", 0, $await_content5__$params),
$await_content4__result = _._const(2, ($scope) =>
_._text($scope.a, $scope.c),
),
$await_content4__$params = _._const(1, ($scope) =>
$await_content4__result($scope, $scope.b[0]),
),
$await_content4 = _._content_branch(" ", " b", 0, $await_content4__$params),
$await_content3__result = _._const(2, ($scope) =>
_._text($scope.a, $scope.c),
),
$await_content3__$params = _._const(1, ($scope) =>
$await_content3__result($scope, $scope.b[0]),
),
$await_content3 = _._content_branch(" ", " b", 0, $await_content3__$params),
$await_content2__result = _._const(2, ($scope) =>
_._text($scope.a, $scope.c),
),
$await_content2__$params = _._const(1, ($scope) =>
$await_content2__result($scope, $scope.b[0]),
),
$await_content2 = _._content_branch(" ", " b", 0, $await_content2__$params),
$await_content__result = _._const(2, ($scope) => _._text($scope.a, $scope.c)),
$await_content__$params = _._const(1, ($scope) =>
$await_content__result($scope, $scope.b[0]),
),
$await_content = _._content_branch(" ", " b", 0, $await_content__$params),
$await = _._await(2, $await_content),
$await2 = _._await(4, $await_content2),
$await3 = _._await(6, $await_content3),
$await4 = _._await(8, $await_content4),
$await5 = _._await(10, $await_content5),
$await = _._await(2, " ", " b", 0, $await_content__$params),
$await2 = _._await(4, " ", " b", 0, $await_content2__$params),
$await3 = _._await(6, " ", " b", 0, $await_content3__$params),
$await4 = _._await(8, " ", " b", 0, $await_content4__$params),
$await5 = _._await(10, " ", " b", 0, $await_content5__$params),
$n__script = _._script("a0", ($scope) =>
_._on($scope.a, "click", function () {
$n($scope, $scope.l + 1);

View File

@ -5,24 +5,19 @@ const multiply = (multiplier, n) => resolveAfter(multiplier * n, n);
import * as _ from "@marko/runtime-tags/debug/dom";
const $await_content5__result = /* @__PURE__ */_._const("result", $scope => _._text($scope["#text/0"], $scope.result));
const $await_content5__$params = /* @__PURE__ */_._const("$params6", $scope => $await_content5__result($scope, $scope.$params6[0]));
const $await_content5 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content5__$params);
const $await_content4__result = /* @__PURE__ */_._const("result", $scope => _._text($scope["#text/0"], $scope.result));
const $await_content4__$params = /* @__PURE__ */_._const("$params5", $scope => $await_content4__result($scope, $scope.$params5[0]));
const $await_content4 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content4__$params);
const $await_content3__result = /* @__PURE__ */_._const("result", $scope => _._text($scope["#text/0"], $scope.result));
const $await_content3__$params = /* @__PURE__ */_._const("$params4", $scope => $await_content3__result($scope, $scope.$params4[0]));
const $await_content3 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content3__$params);
const $await_content2__result = /* @__PURE__ */_._const("result", $scope => _._text($scope["#text/0"], $scope.result));
const $await_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $await_content2__result($scope, $scope.$params3[0]));
const $await_content2 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content2__$params);
const $await_content__result = /* @__PURE__ */_._const("result", $scope => _._text($scope["#text/0"], $scope.result));
const $await_content__$params = /* @__PURE__ */_._const("$params2", $scope => $await_content__result($scope, $scope.$params2[0]));
const $await_content = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content__$params);
const $await = /* @__PURE__ */_._await("#text/2", $await_content);
const $await2 = /* @__PURE__ */_._await("#text/4", $await_content2);
const $await3 = /* @__PURE__ */_._await("#text/6", $await_content3);
const $await4 = /* @__PURE__ */_._await("#text/8", $await_content4);
const $await5 = /* @__PURE__ */_._await("#text/10", $await_content5);
const $await = /* @__PURE__ */_._await("#text/2", " ", /* get, over(1) */" b", 0, $await_content__$params);
const $await2 = /* @__PURE__ */_._await("#text/4", " ", /* get, over(1) */" b", 0, $await_content2__$params);
const $await3 = /* @__PURE__ */_._await("#text/6", " ", /* get, over(1) */" b", 0, $await_content3__$params);
const $await4 = /* @__PURE__ */_._await("#text/8", " ", /* get, over(1) */" b", 0, $await_content4__$params);
const $await5 = /* @__PURE__ */_._await("#text/10", " ", /* get, over(1) */" b", 0, $await_content5__$params);
const $n__script = _._script("__tests__/template.marko_0_n", $scope => _._on($scope["#button/0"], "click", function () {
$n($scope, $scope.n + 1);
}));

View File

@ -1,5 +1,7 @@
{
"vars": {
"props": {}
"props": {
"$_": "t"
}
}
}

View File

@ -4,40 +4,34 @@ import { resolveAfter } from "../../utils/resolve";
import * as _ from "@marko/runtime-tags/debug/dom";
const $await_content6__result = /* @__PURE__ */_._const("result6", $scope => _._text($scope["#text/0"], $scope.result6));
const $await_content6__$params = /* @__PURE__ */_._const("$params7", $scope => $await_content6__result($scope, $scope.$params7[0]));
const $await_content6 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content6__$params);
const $await_content5__result = /* @__PURE__ */_._const("result5", $scope => _._text($scope["#text/0"], $scope.result5));
const $await_content5__await = /* @__PURE__ */_._await("#text/1", $await_content6);
const $await_content5__await = /* @__PURE__ */_._await("#text/1", " ", /* get, over(1) */" b", 0, $await_content6__$params);
const $await_content5__setup = $scope => {
$await_content5__await($scope, resolveAfter("j", 1));
};
const $await_content5__$params = /* @__PURE__ */_._const("$params6", $scope => $await_content5__result($scope, $scope.$params6[0]));
const $await_content5 = /* @__PURE__ */_._content_branch("<!><!>k", /* replace, over(1), replace, over(2) */"%b%c", $await_content5__setup, $await_content5__$params);
const $await_content4__result = /* @__PURE__ */_._const("result4", $scope => _._text($scope["#text/0"], $scope.result4));
const $await_content4__await = /* @__PURE__ */_._await("#text/1", $await_content5);
const $await_content4__await = /* @__PURE__ */_._await("#text/1", "<!><!>k", /* replace, over(1), replace, over(2) */"%b%c", $await_content5__setup, $await_content5__$params);
const $await_content4__setup = $scope => {
$await_content4__await($scope, resolveAfter("i", 1));
};
const $await_content4__$params = /* @__PURE__ */_._const("$params5", $scope => $await_content4__result($scope, $scope.$params5[0]));
const $await_content4 = /* @__PURE__ */_._content_branch("<!><!>l", /* replace, over(1), replace, over(2) */"%b%c", $await_content4__setup, $await_content4__$params);
const $await_content3__result = /* @__PURE__ */_._const("result3", $scope => _._text($scope["#text/0"], $scope.result3));
const $await_content3__$params = /* @__PURE__ */_._const("$params4", $scope => $await_content3__result($scope, $scope.$params4[0]));
const $await_content3 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content3__$params);
const $await_content2__result = /* @__PURE__ */_._const("result2", $scope => _._text($scope["#text/0"], $scope.result2));
const $await_content2__await = /* @__PURE__ */_._await("#text/1", $await_content3);
const $await_content2__await = /* @__PURE__ */_._await("#text/1", " ", /* get, over(1) */" b", 0, $await_content3__$params);
const $await_content2__setup = $scope => {
$await_content2__await($scope, resolveAfter("d", 1));
};
const $await_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $await_content2__result($scope, $scope.$params3[0]));
const $await_content2 = /* @__PURE__ */_._content_branch("<!><!>e", /* replace, over(1), replace, over(2) */"%b%c", $await_content2__setup, $await_content2__$params);
const $await_content__result = /* @__PURE__ */_._const("result1", $scope => _._text($scope["#text/0"], $scope.result1));
const $await_content__await = /* @__PURE__ */_._await("#text/1", $await_content2);
const $await_content__await = /* @__PURE__ */_._await("#text/1", "<!><!>e", /* replace, over(1), replace, over(2) */"%b%c", $await_content2__setup, $await_content2__$params);
const $await_content__setup = $scope => {
$await_content__await($scope, resolveAfter("c", 1));
};
const $await_content__$params = /* @__PURE__ */_._const("$params2", $scope => $await_content__result($scope, $scope.$params2[0]));
const $await_content = /* @__PURE__ */_._content_branch("<!><!>f", /* replace, over(1), replace, over(2) */"%b%c", $await_content__setup, $await_content__$params);
const $await = /* @__PURE__ */_._await("#text/0", $await_content);
const $await2 = /* @__PURE__ */_._await("#text/1", $await_content4);
const $await = /* @__PURE__ */_._await("#text/0", "<!><!>f", /* replace, over(1), replace, over(2) */"%b%c", $await_content__setup, $await_content__$params);
const $await2 = /* @__PURE__ */_._await("#text/1", "<!><!>l", /* replace, over(1), replace, over(2) */"%b%c", $await_content4__setup, $await_content4__$params);
export function $setup($scope) {
$await($scope, resolveAfter("b", 1));
$await2($scope, resolveAfter("h", 1));

View File

@ -11,34 +11,28 @@ const $await_content3__setup__script = _._script("__tests__/template.marko_9", $
}));
const $await_content3__setup = $await_content3__setup__script;
const $await_content3__$params = /* @__PURE__ */_._const("$params4", $scope => $await_content3__v($scope, $scope.$params4[0]));
const $await_content3 = /* @__PURE__ */_._content_branch("<div>Resolved C: <!></div><button>Before</button>", /* next(1), over(1), replace, out(1), get, over(1) */"Db%l b", $await_content3__setup, $await_content3__$params);
const $catch_content3 = _._content_resume("__tests__/template.marko_8_content", "Rejected C", /* over(1) */"b");
const $try_content3__await = /* @__PURE__ */_._await("#text/0", $await_content3);
const $try_content3__await = /* @__PURE__ */_._await("#text/0", "<div>Resolved C: <!></div><button>Before</button>", /* next(1), over(1), replace, out(1), get, over(1) */"Db%l b", $await_content3__setup, $await_content3__$params);
const $try_content3__setup = $scope => {
$try_content3__await($scope, resolveAfter("C Value", 2));
};
const $try_content3 = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content3__setup);
const $await_content2__v = /* @__PURE__ */_._const("v", $scope => _._text($scope["#text/0"], $scope.v));
const $await_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $await_content2__v($scope, $scope.$params3[0]));
const $await_content2 = /* @__PURE__ */_._content_branch("<div>Resolved B: <!></div>", /* next(1), over(1), replace, out(1) */"Db%l", 0, $await_content2__$params);
const $catch_content2 = _._content_resume("__tests__/template.marko_5_content", "Rejected B", /* over(1) */"b");
const $try_content2__await = /* @__PURE__ */_._await("#text/0", $await_content2);
const $try_content2__await = /* @__PURE__ */_._await("#text/0", "<div>Resolved B: <!></div>", /* next(1), over(1), replace, out(1) */"Db%l", 0, $await_content2__$params);
const $try_content2__setup = $scope => {
$try_content2__await($scope, rejectAfter(new Error("rejected b"), 1));
};
const $try_content2 = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content2__setup);
const $await_content__v = /* @__PURE__ */_._const("v", $scope => _._text($scope["#text/0"], $scope.v));
const $await_content__$params = /* @__PURE__ */_._const("$params2", $scope => $await_content__v($scope, $scope.$params2[0]));
const $await_content = /* @__PURE__ */_._content_branch("<div>Resolved A: <!></div>", /* next(1), over(1), replace, out(1) */"Db%l", 0, $await_content__$params);
const $catch_content = _._content_resume("__tests__/template.marko_2_content", "Rejected A", /* over(1) */"b");
const $try_content__await = /* @__PURE__ */_._await("#text/0", $await_content);
const $try_content__await = /* @__PURE__ */_._await("#text/0", "<div>Resolved A: <!></div>", /* next(1), over(1), replace, out(1) */"Db%l", 0, $await_content__$params);
const $try_content__setup = $scope => {
$try_content__await($scope, resolveAfter("A Value", 2));
};
const $try_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $try = /* @__PURE__ */_._try("#text/0", $try_content);
const $try2 = /* @__PURE__ */_._try("#text/1", $try_content2);
const $try3 = /* @__PURE__ */_._try("#text/2", $try_content3);
const $try = /* @__PURE__ */_._try("#text/0", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $try2 = /* @__PURE__ */_._try("#text/1", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content2__setup);
const $try3 = /* @__PURE__ */_._try("#text/2", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content3__setup);
export function $setup($scope) {
$try($scope, {
catch: _.attrTag({

View File

@ -6,24 +6,20 @@ _._enable_catch();
_._enable_catch();
const $await_content2__v = /* @__PURE__ */_._const("v", $scope => _._text($scope["#text/0"], $scope.v));
const $await_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $await_content2__v($scope, $scope.$params3[0]));
const $await_content2 = /* @__PURE__ */_._content_branch("<div>Resolved B: <!></div>", /* next(1), over(1), replace, out(1) */"Db%l", 0, $await_content2__$params);
const $catch_content2 = _._content_resume("__tests__/template.marko_5_content", "Rejected B", /* over(1) */"b");
const $try_content2__await = /* @__PURE__ */_._await("#text/0", $await_content2);
const $try_content2__await = /* @__PURE__ */_._await("#text/0", "<div>Resolved B: <!></div>", /* next(1), over(1), replace, out(1) */"Db%l", 0, $await_content2__$params);
const $try_content2__setup = $scope => {
$try_content2__await($scope, rejectAfter(new Error("rejected b"), 1));
};
const $try_content2 = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content2__setup);
const $await_content__v = /* @__PURE__ */_._const("v", $scope => _._text($scope["#text/0"], $scope.v));
const $await_content__$params = /* @__PURE__ */_._const("$params2", $scope => $await_content__v($scope, $scope.$params2[0]));
const $await_content = /* @__PURE__ */_._content_branch("<div>Resolved A: <!></div>", /* next(1), over(1), replace, out(1) */"Db%l", 0, $await_content__$params);
const $catch_content = _._content_resume("__tests__/template.marko_2_content", "Rejected A", /* over(1) */"b");
const $try_content__await = /* @__PURE__ */_._await("#text/0", $await_content);
const $try_content__await = /* @__PURE__ */_._await("#text/0", "<div>Resolved A: <!></div>", /* next(1), over(1), replace, out(1) */"Db%l", 0, $await_content__$params);
const $try_content__setup = $scope => {
$try_content__await($scope, resolveAfter("A Value", 2));
};
const $try_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $try = /* @__PURE__ */_._try("#text/0", $try_content);
const $try2 = /* @__PURE__ */_._try("#text/1", $try_content2);
const $try = /* @__PURE__ */_._try("#text/0", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $try2 = /* @__PURE__ */_._try("#text/1", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content2__setup);
export function $setup($scope) {
$try($scope, {
catch: _.attrTag({

View File

@ -8,15 +8,13 @@ _._enable_catch();
_._enable_catch();
const $await_content4__value = /* @__PURE__ */_._const("value", $scope => _._attr_class($scope["#div/0"], $scope.value));
const $await_content4__$params = /* @__PURE__ */_._const("$params5", $scope => $await_content4__value($scope, $scope.$params5[0]));
const $await_content4 = /* @__PURE__ */_._content_branch("<div level=4></div>", /* get, over(1) */" b", 0, $await_content4__$params);
const $placeholder_content4 = _._content_resume("__tests__/template.marko_11_content", "LOADING B2", /* over(1) */"b");
const $placeholder_content3 = _._content_resume("__tests__/template.marko_10_content", "LOADING B1", /* over(1) */"b");
const $try_content4__await = /* @__PURE__ */_._await("#text/0", $await_content4);
const $try_content4__await = /* @__PURE__ */_._await("#text/0", "<div level=4></div>", /* get, over(1) */" b", 0, $await_content4__$params);
const $try_content4__promiseB = /* @__PURE__ */_._closure_get("promiseB", $scope => $try_content4__await($scope, $scope._._._.promiseB), $scope => $scope._._._);
const $try_content4__setup = $try_content4__promiseB;
const $try_content4 = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content4__setup);
const $await_content3__value = /* @__PURE__ */_._const("value", $scope => _._attr_class($scope["#div/0"], $scope.value));
const $await_content3__try = /* @__PURE__ */_._try("#text/1", $try_content4);
const $await_content3__try = /* @__PURE__ */_._try("#text/1", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content4__setup);
const $await_content3__setup = $scope => {
$await_content3__try($scope, {
placeholder: _.attrTag({
@ -25,14 +23,12 @@ const $await_content3__setup = $scope => {
});
};
const $await_content3__$params = /* @__PURE__ */_._const("$params4", $scope => $await_content3__value($scope, $scope.$params4[0]));
const $await_content3 = /* @__PURE__ */_._content_branch("<div level=3><!></div>", /* get, next(1), replace, out(1) */" D%l", $await_content3__setup, $await_content3__$params);
const $try_content3__await = /* @__PURE__ */_._await("#text/0", $await_content3);
const $try_content3__await = /* @__PURE__ */_._await("#text/0", "<div level=3><!></div>", /* get, next(1), replace, out(1) */" D%l", $await_content3__setup, $await_content3__$params);
const $try_content3__promiseB = /* @__PURE__ */_._closure_get("promiseB", $scope => $try_content3__await($scope, $scope._.promiseB));
const $try_content3__setup = $try_content3__promiseB;
const $try_content3 = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content3__setup);
const $await_content2__value = /* @__PURE__ */_._const("value", $scope => _._attr_class($scope["#div/0"], $scope.value));
const $await_content2__promiseB = /* @__PURE__ */_._const("promiseB");
const $await_content2__try = /* @__PURE__ */_._try("#text/1", $try_content3);
const $await_content2__try = /* @__PURE__ */_._try("#text/1", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content3__setup);
const $await_content2__setup = $scope => {
$await_content2__promiseB($scope, resolveAfter("b", 2));
$await_content2__try($scope, {
@ -42,15 +38,13 @@ const $await_content2__setup = $scope => {
});
};
const $await_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $await_content2__value($scope, $scope.$params3[0]));
const $await_content2 = /* @__PURE__ */_._content_branch("<div level=2><!></div>", /* get, next(1), replace, out(1) */" D%l", $await_content2__setup, $await_content2__$params);
const $placeholder_content2 = _._content_resume("__tests__/template.marko_5_content", "LOADING A2", /* over(1) */"b");
const $placeholder_content = _._content_resume("__tests__/template.marko_4_content", "LOADING A1", /* over(1) */"b");
const $try_content2__await = /* @__PURE__ */_._await("#text/0", $await_content2);
const $try_content2__await = /* @__PURE__ */_._await("#text/0", "<div level=2><!></div>", /* get, next(1), replace, out(1) */" D%l", $await_content2__setup, $await_content2__$params);
const $try_content2__promiseA = /* @__PURE__ */_._closure_get("promiseA", $scope => $try_content2__await($scope, $scope._._._.promiseA), $scope => $scope._._._);
const $try_content2__setup = $try_content2__promiseA;
const $try_content2 = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content2__setup);
const $await_content__value = /* @__PURE__ */_._const("value", $scope => _._attr_class($scope["#div/0"], $scope.value));
const $await_content__try = /* @__PURE__ */_._try("#text/1", $try_content2);
const $await_content__try = /* @__PURE__ */_._try("#text/1", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content2__setup);
const $await_content__setup = $scope => {
$await_content__try($scope, {
placeholder: _.attrTag({
@ -59,13 +53,11 @@ const $await_content__setup = $scope => {
});
};
const $await_content__$params = /* @__PURE__ */_._const("$params2", $scope => $await_content__value($scope, $scope.$params2[0]));
const $await_content = /* @__PURE__ */_._content_branch("<div level=1><!></div>", /* get, next(1), replace, out(1) */" D%l", $await_content__setup, $await_content__$params);
const $try_content__await = /* @__PURE__ */_._await("#text/0", $await_content);
const $try_content__await = /* @__PURE__ */_._await("#text/0", "<div level=1><!></div>", /* get, next(1), replace, out(1) */" D%l", $await_content__setup, $await_content__$params);
const $try_content__promiseA = /* @__PURE__ */_._closure_get("promiseA", $scope => $try_content__await($scope, $scope._.promiseA));
const $try_content__setup = $try_content__promiseA;
const $try_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $promiseA = /* @__PURE__ */_._const("promiseA");
const $try = /* @__PURE__ */_._try("#text/0", $try_content);
const $try = /* @__PURE__ */_._try("#text/0", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content__setup);
export function $setup($scope) {
$promiseA($scope, resolveAfter("a", 1));
$try($scope, {

View File

@ -1,5 +1,7 @@
{
"vars": {
"props": {}
"props": {
"$_": "t"
}
}
}

View File

@ -4,12 +4,10 @@ import { resolveAfter } from "../../utils/resolve";
import * as _ from "@marko/runtime-tags/debug/dom";
const $await_content2__value = /* @__PURE__ */_._const("value", $scope => _._text($scope["#text/0"], $scope.value));
const $await_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $await_content2__value($scope, $scope.$params3[0]));
const $await_content2 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content2__$params);
const $await_content__value = /* @__PURE__ */_._const("value", $scope => _._text($scope["#text/0"], $scope.value));
const $await_content__$params = /* @__PURE__ */_._const("$params2", $scope => $await_content__value($scope, $scope.$params2[0]));
const $await_content = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content__$params);
const $await = /* @__PURE__ */_._await("#text/0", $await_content);
const $await2 = /* @__PURE__ */_._await("#text/1", $await_content2);
const $await = /* @__PURE__ */_._await("#text/0", " ", /* get, over(1) */" b", 0, $await_content__$params);
const $await2 = /* @__PURE__ */_._await("#text/1", " ", /* get, over(1) */" b", 0, $await_content2__$params);
export function $setup($scope) {
$await($scope, resolveAfter("b", 1));
$await2($scope, resolveAfter("d", 2));

View File

@ -1,5 +1,7 @@
{
"vars": {
"props": {}
"props": {
"$_": "t"
}
}
}

View File

@ -4,12 +4,10 @@ import { resolveAfter } from "../../utils/resolve";
import * as _ from "@marko/runtime-tags/debug/dom";
const $await_content2__value = /* @__PURE__ */_._const("value", $scope => _._text($scope["#text/0"], $scope.value));
const $await_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $await_content2__value($scope, $scope.$params3[0]));
const $await_content2 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content2__$params);
const $await_content__value = /* @__PURE__ */_._const("value", $scope => _._text($scope["#text/0"], $scope.value));
const $await_content__$params = /* @__PURE__ */_._const("$params2", $scope => $await_content__value($scope, $scope.$params2[0]));
const $await_content = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content__$params);
const $await = /* @__PURE__ */_._await("#text/0", $await_content);
const $await2 = /* @__PURE__ */_._await("#text/1", $await_content2);
const $await = /* @__PURE__ */_._await("#text/0", " ", /* get, over(1) */" b", 0, $await_content__$params);
const $await2 = /* @__PURE__ */_._await("#text/1", " ", /* get, over(1) */" b", 0, $await_content2__$params);
export function $setup($scope) {
$await($scope, resolveAfter("b", 2));
$await2($scope, resolveAfter("d", 1));

View File

@ -1,14 +1,13 @@
// size: 333 (min) 198 (brotli)
// size: 310 (min) 199 (brotli)
_._enable_catch();
const $await_content__value = _._const(2, ($scope) =>
_._text($scope.a, $scope.c),
),
$await_content__$params = _._const(1, ($scope) =>
$await_content__value($scope, $scope.b[0]),
),
$await_content = _._content_branch(" ", " b", 0, $await_content__$params);
);
_._content_resume("a0", "LOADING...", "b");
const $try_content__await = _._await(0, $await_content),
const $try_content__await = _._await(0, " ", " b", 0, $await_content__$params),
$try_content__clickCount = _._closure_get(2, ($scope) =>
$try_content__await($scope, resolveAfter($scope._.c, 1)),
),

View File

@ -5,12 +5,10 @@ import * as _ from "@marko/runtime-tags/debug/dom";
_._enable_catch();
const $await_content__value = /* @__PURE__ */_._const("value", $scope => _._text($scope["#text/0"], $scope.value));
const $await_content__$params = /* @__PURE__ */_._const("$params2", $scope => $await_content__value($scope, $scope.$params2[0]));
const $await_content = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content__$params);
const $placeholder_content = _._content_resume("__tests__/template.marko_2_content", "LOADING...", /* over(1) */"b");
const $try_content__await = /* @__PURE__ */_._await("#text/0", $await_content);
const $try_content__await = /* @__PURE__ */_._await("#text/0", " ", /* get, over(1) */" b", 0, $await_content__$params);
const $try_content__clickCount = /* @__PURE__ */_._closure_get("clickCount", $scope => $try_content__await($scope, resolveAfter($scope._.clickCount, 1)));
const $try_content__setup = $try_content__clickCount;
const $try_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $clickCount__closure = /* @__PURE__ */_._closure($try_content__clickCount);
const $clickCount__script = _._script("__tests__/template.marko_0_clickCount", $scope => _._on($scope["#button/0"], "click", function () {
$clickCount($scope, $scope.clickCount + 1);
@ -19,7 +17,7 @@ const $clickCount = /* @__PURE__ */_._let("clickCount/2", $scope => {
$clickCount__closure($scope);
$clickCount__script($scope);
});
const $try = /* @__PURE__ */_._try("#text/1", $try_content);
const $try = /* @__PURE__ */_._try("#text/1", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $try_content__setup);
export function $setup($scope) {
$clickCount($scope, 0);
$try($scope, {

View File

@ -6,8 +6,7 @@ const $for_content__dynamicTag = /* @__PURE__ */_._dynamic_tag("#text/0");
const $for_content__item_content = /* @__PURE__ */_._const("item_content", $scope => $for_content__dynamicTag($scope, $scope.item_content));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__item($scope, $scope.$params2[0]));
const $for_content__item = /* @__PURE__ */_._const("item", $scope => $for_content__item_content($scope, $scope.item?.content));
const $for_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", 0, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#text/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/0", "<!><!><!>", /* over(1), replace, over(2) */"b%c", 0, $for_content__$params);
export const $input_item = /* @__PURE__ */_._const("input_item", $scope => $for($scope, [$scope.input_item]));
const $dynamicTag = /* @__PURE__ */_._dynamic_tag("#text/1");
export const $input_other = /* @__PURE__ */_._const("input_other", $scope => $dynamicTag($scope, $scope.input_other));

View File

@ -13,7 +13,6 @@ const $for_content3__row = /* @__PURE__ */_._const("row", $scope => {
const $for_content3__dynamicTag = /* @__PURE__ */_._dynamic_tag("#text/1");
const $for_content3__row_content = /* @__PURE__ */_._const("row_content", $scope => $for_content3__dynamicTag($scope, $scope.row_content));
const $for_content3__$params = /* @__PURE__ */_._const("$params4", $scope => $for_content3__row($scope, $scope.$params4[0]));
const $for_content3 = /* @__PURE__ */_._content_branch("<div class=row><!></div>", /* get, next(1), replace, out(1) */" D%l", 0, $for_content3__$params);
const $for_content2__col__script = _._script("__tests__/tags/hello/index.marko_2_col", $scope => _._attrs_script($scope, "#div/0"));
const $for_content2__col = /* @__PURE__ */_._const("col", $scope => {
_._attrs_partial_content($scope, "#div/0", $scope.col, {
@ -22,10 +21,9 @@ const $for_content2__col = /* @__PURE__ */_._const("col", $scope => {
$for_content2__col_row($scope, $scope.col?.row);
$for_content2__col__script($scope);
});
const $for_content2__for = /* @__PURE__ */_._for_of("#text/1", $for_content3);
const $for_content2__for = /* @__PURE__ */_._for_of("#text/1", "<div class=row><!></div>", /* get, next(1), replace, out(1) */" D%l", 0, $for_content3__$params);
const $for_content2__col_row = /* @__PURE__ */_._const("col_row", $scope => $for_content2__for($scope, [$scope.col_row]));
const $for_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $for_content2__col($scope, $scope.$params3[0]));
const $for_content2 = /* @__PURE__ */_._content_branch("<div class=col></div><!><!>", /* get, over(1), replace, over(2) */" b%c", 0, $for_content2__$params);
const $for_content__item__script = _._script("__tests__/tags/hello/index.marko_1_item", $scope => _._attrs_script($scope, "#div/0"));
const $for_content__item = /* @__PURE__ */_._const("item", $scope => {
_._attrs_partial($scope, "#div/0", $scope.item, {
@ -37,10 +35,9 @@ const $for_content__item = /* @__PURE__ */_._const("item", $scope => {
const $for_content__dynamicTag = /* @__PURE__ */_._dynamic_tag("#text/1");
const $for_content__item_content = /* @__PURE__ */_._const("item_content", $scope => $for_content__dynamicTag($scope, $scope.item_content));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__item($scope, $scope.$params2[0]));
const $for_content = /* @__PURE__ */_._content_branch("<div class=item><!></div>", /* get, next(1), replace, out(1) */" D%l", 0, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#text/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/0", "<div class=item><!></div>", /* get, next(1), replace, out(1) */" D%l", 0, $for_content__$params);
export const $input_list_item = /* @__PURE__ */_._const("input_list_item", $scope => $for($scope, [$scope.input_list_item]));
const $for2 = /* @__PURE__ */_._for_of("#text/1", $for_content2);
const $for2 = /* @__PURE__ */_._for_of("#text/1", "<div class=col></div><!><!>", /* get, over(1), replace, over(2) */" b%c", 0, $for_content2__$params);
export const $input_col = /* @__PURE__ */_._const("input_col", $scope => $for2($scope, [$scope.input_col]));
export const $input = /* @__PURE__ */_._const("input", $scope => {
$input_list($scope, $scope.input.list);

View File

@ -6,8 +6,7 @@ const $for_content__dynamicTag = /* @__PURE__ */_._dynamic_tag("#text/0");
const $for_content__item_content = /* @__PURE__ */_._const("item_content", $scope => $for_content__dynamicTag($scope, $scope.item_content));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__item($scope, $scope.$params2[0]));
const $for_content__item = /* @__PURE__ */_._const("item", $scope => $for_content__item_content($scope, $scope.item?.content));
const $for_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", 0, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#text/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/0", "<!><!><!>", /* over(1), replace, over(2) */"b%c", 0, $for_content__$params);
export const $input_item = /* @__PURE__ */_._const("input_item", $scope => $for($scope, [$scope.input_item]));
export const $input = /* @__PURE__ */_._const("input", $scope => $input_item($scope, $scope.input.item));
export default /* @__PURE__ */_._template("__tests__/tags/list/index.marko", $template, $walks, $setup, $input);

View File

@ -6,8 +6,7 @@ const $for_content__dynamicTag = /* @__PURE__ */_._dynamic_tag("#text/0");
const $for_content__item_content = /* @__PURE__ */_._const("item_content", $scope => $for_content__dynamicTag($scope, $scope.item_content));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__item($scope, $scope.$params2[0]));
const $for_content__item = /* @__PURE__ */_._const("item", $scope => $for_content__item_content($scope, $scope.item?.content));
const $for_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", 0, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#text/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/0", "<!><!><!>", /* over(1), replace, over(2) */"b%c", 0, $for_content__$params);
export const $input_item = /* @__PURE__ */_._const("input_item", $scope => $for($scope, [$scope.input_item]));
export const $input = /* @__PURE__ */_._const("input", $scope => $input_item($scope, $scope.input.item));
export default /* @__PURE__ */_._template("__tests__/tags/list/index.marko", $template, $walks, $setup, $input);

View File

@ -6,8 +6,7 @@ const $for_content__dynamicTag = /* @__PURE__ */_._dynamic_tag("#text/0");
const $for_content__item_content = /* @__PURE__ */_._const("item_content", $scope => $for_content__dynamicTag($scope, $scope.item_content));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__item($scope, $scope.$params2[0]));
const $for_content__item = /* @__PURE__ */_._const("item", $scope => $for_content__item_content($scope, $scope.item?.content));
const $for_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", 0, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#text/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/0", "<!><!><!>", /* over(1), replace, over(2) */"b%c", 0, $for_content__$params);
export const $input_item = /* @__PURE__ */_._const("input_item", $scope => $for($scope, [$scope.input_item]));
export const $input = /* @__PURE__ */_._const("input", $scope => $input_item($scope, $scope.input.item));
export default /* @__PURE__ */_._template("__tests__/tags/list/index.marko", $template, $walks, $setup, $input);

View File

@ -9,9 +9,8 @@ const $if_content__setup = $scope => {
$if_content__input_test_class._($scope);
$if_content__input_test_content._($scope);
};
const $if_content = /* @__PURE__ */_._content_branch("<div id=test><!></div>", /* get, next(1), replace, out(1) */" D%l", $if_content__setup);
export const $input_class = /* @__PURE__ */_._const("input_class", $scope => _._attr_class($scope["#div/0"], $scope.input_class));
const $if = /* @__PURE__ */_._if("#text/1", $if_content);
const $if = /* @__PURE__ */_._if("#text/1", "<div id=test><!></div>", /* get, next(1), replace, out(1) */" D%l", $if_content__setup);
export const $input_test = /* @__PURE__ */_._const("input_test", $scope => {
$input_test_class($scope, $scope.input_test?.class);
$input_test_content($scope, $scope.input_test?.content);

View File

@ -9,9 +9,8 @@ const $if_content__setup = $scope => {
$if_content__input_test_style._($scope);
$if_content__input_test_content._($scope);
};
const $if_content = /* @__PURE__ */_._content_branch("<div id=test><!></div>", /* get, next(1), replace, out(1) */" D%l", $if_content__setup);
export const $input_style = /* @__PURE__ */_._const("input_style", $scope => _._attr_style($scope["#div/0"], $scope.input_style));
const $if = /* @__PURE__ */_._if("#text/1", $if_content);
const $if = /* @__PURE__ */_._if("#text/1", "<div id=test><!></div>", /* get, next(1), replace, out(1) */" D%l", $if_content__setup);
export const $input_test = /* @__PURE__ */_._const("input_test", $scope => {
$input_test_style($scope, $scope.input_test?.style);
$input_test_content($scope, $scope.input_test?.content);

View File

@ -6,17 +6,14 @@ const $await_content3__value = /* @__PURE__ */_._const("value", $scope => _._tex
const $await_content3__count = /* @__PURE__ */_._closure_get("count", $scope => _._text($scope["#text/1"], $scope._.count));
const $await_content3__setup = $await_content3__count;
const $await_content3__$params = /* @__PURE__ */_._const("$params4", $scope => $await_content3__value($scope, $scope.$params4[0]));
const $await_content3 = /* @__PURE__ */_._content_branch("Got: <!> <!>", /* over(1), replace, over(2), replace, over(1) */"b%c%b", $await_content3__setup, $await_content3__$params);
const $await_content2__value = /* @__PURE__ */_._const("value", $scope => _._text($scope["#text/0"], $scope.value));
const $await_content2__count = /* @__PURE__ */_._closure_get("count", $scope => _._text($scope["#text/1"], $scope._.count));
const $await_content2__setup = $await_content2__count;
const $await_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $await_content2__value($scope, $scope.$params3[0]));
const $await_content2 = /* @__PURE__ */_._content_branch("Got: <!> <!>", /* over(1), replace, over(2), replace, over(1) */"b%c%b", $await_content2__setup, $await_content2__$params);
const $await_content__value = /* @__PURE__ */_._const("value", $scope => _._text($scope["#text/0"], $scope.value));
const $await_content__count = /* @__PURE__ */_._closure_get("count", $scope => _._text($scope["#text/1"], $scope._.count));
const $await_content__setup = $await_content__count;
const $await_content__$params = /* @__PURE__ */_._const("$params2", $scope => $await_content__value($scope, $scope.$params2[0]));
const $await_content = /* @__PURE__ */_._content_branch("Got: <!> <!>", /* over(1), replace, over(2), replace, over(1) */"b%c%b", $await_content__setup, $await_content__$params);
const $count__closure = /* @__PURE__ */_._closure($await_content__count, $await_content2__count, $await_content3__count);
const $count__script = _._script("__tests__/template.marko_0_count", $scope => _._on($scope["#button/3"], "click", function () {
$count($scope, $scope.count + 1);
@ -25,9 +22,9 @@ const $count = /* @__PURE__ */_._let("count/4", $scope => {
$count__closure($scope);
$count__script($scope);
});
const $await = /* @__PURE__ */_._await("#text/0", $await_content);
const $await2 = /* @__PURE__ */_._await("#text/1", $await_content2);
const $await3 = /* @__PURE__ */_._await("#text/2", $await_content3);
const $await = /* @__PURE__ */_._await("#text/0", "Got: <!> <!>", /* over(1), replace, over(2), replace, over(1) */"b%c%b", $await_content__setup, $await_content__$params);
const $await2 = /* @__PURE__ */_._await("#text/1", "Got: <!> <!>", /* over(1), replace, over(2), replace, over(1) */"b%c%b", $await_content2__setup, $await_content2__$params);
const $await3 = /* @__PURE__ */_._await("#text/2", "Got: <!> <!>", /* over(1), replace, over(2), replace, over(1) */"b%c%b", $await_content3__setup, $await_content3__$params);
export function $setup($scope) {
$count($scope, 0);
$await($scope, Promise.resolve("a"));

View File

@ -1,14 +1,9 @@
// size: 305 (min) 191 (brotli)
// size: 282 (min) 175 (brotli)
const $if_content__count = _._if_closure(2, 0, ($scope) =>
_._text($scope.a, $scope._.e),
),
$if_content__setup = $if_content__count,
$if_content = _._content_branch(
"The count is <!>",
"b%b",
$if_content__setup,
),
$if = _._if(2, $if_content),
$if = _._if(2, "The count is <!>", "b%b", $if_content__setup),
$show__script = _._script("a0", ($scope) =>
_._on($scope.b, "click", function () {
$show($scope, !$scope.d);

View File

@ -3,8 +3,7 @@ export const $walks = /* get, over(1), get, over(1), replace, over(2) */" b b%c"
import * as _ from "@marko/runtime-tags/debug/dom";
const $if_content__count = /* @__PURE__ */_._if_closure("#text/2", 0, $scope => _._text($scope["#text/0"], $scope._.count));
const $if_content__setup = $if_content__count;
const $if_content = /* @__PURE__ */_._content_branch("The count is <!>", /* over(1), replace, over(1) */"b%b", $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/2", $if_content);
const $if = /* @__PURE__ */_._if("#text/2", "The count is <!>", /* over(1), replace, over(1) */"b%b", $if_content__setup);
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/1"], "click", function () {
$show($scope, !$scope.show);
}));

View File

@ -1,10 +1,9 @@
// size: 303 (min) 182 (brotli)
// size: 280 (min) 172 (brotli)
const $if_content__count = _._if_closure(2, 0, ($scope) =>
_._text($scope.a, $scope._.e),
),
$if_content__setup = $if_content__count,
$if_content = _._content_branch("<span> </span>", "D l", $if_content__setup),
$if = _._if(2, $if_content),
$if = _._if(2, "<span> </span>", "D l", $if_content__setup),
$show__script = _._script("a0", ($scope) =>
_._on($scope.b, "click", function () {
$show($scope, !$scope.d);

View File

@ -3,8 +3,7 @@ export const $walks = /* get, over(1), get, over(1), replace, over(2) */" b b%c"
import * as _ from "@marko/runtime-tags/debug/dom";
const $if_content__count = /* @__PURE__ */_._if_closure("#text/2", 0, $scope => _._text($scope["#text/0"], $scope._.count));
const $if_content__setup = $if_content__count;
const $if_content = /* @__PURE__ */_._content_branch("<span> </span>", /* next(1), get, out(1) */"D l", $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/2", $if_content);
const $if = /* @__PURE__ */_._if("#text/2", "<span> </span>", /* next(1), get, out(1) */"D l", $if_content__setup);
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/1"], "click", function () {
$show($scope, !$scope.show);
}));

View File

@ -8,10 +8,9 @@ const $if_content__setup = $scope => {
$if_content__a._($scope);
$if_content__b._($scope);
};
const $if_content = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", $if_content__setup);
const $a = /* @__PURE__ */_._let("a/1");
const $b = /* @__PURE__ */_._let("b/2");
const $if = /* @__PURE__ */_._if("#text/0", $if_content);
const $if = /* @__PURE__ */_._if("#text/0", " ", /* get, over(1) */" b", $if_content__setup);
export function $setup($scope) {
$a($scope, 0);
$b($scope, 0);

View File

@ -1,12 +1,11 @@
// size: 244 (min) 173 (brotli)
// size: 221 (min) 164 (brotli)
const $if_content__message_text = _._if_closure(1, 0, ($scope) =>
_._text($scope.a, $scope._.d),
),
$if_content__setup = $if_content__message_text,
$if_content = _._content_branch(" ", " b", $if_content__setup),
$message = _._let(2, ($scope) => $message_text($scope, $scope.c?.text)),
$message_text = _._const(3, $if_content__message_text),
$if = _._if(1, $if_content),
$if = _._if(1, " ", " b", $if_content__setup),
$show = _._let(4, ($scope) => $if($scope, $scope.e ? 0 : 1));
(_._script("a0", ($scope) =>
_._on($scope.a, "click", function () {

View File

@ -3,10 +3,9 @@ export const $walks = /* get, over(1), replace, over(2) */" b%c";
import * as _ from "@marko/runtime-tags/debug/dom";
const $if_content__message_text = /* @__PURE__ */_._if_closure("#text/1", 0, $scope => _._text($scope["#text/0"], $scope._.message_text));
const $if_content__setup = $if_content__message_text;
const $if_content = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", $if_content__setup);
const $message = /* @__PURE__ */_._let("message/2", $scope => $message_text($scope, $scope.message?.text));
const $message_text = /* @__PURE__ */_._const("message_text", $if_content__message_text);
const $if = /* @__PURE__ */_._if("#text/1", $if_content);
const $if = /* @__PURE__ */_._if("#text/1", " ", /* get, over(1) */" b", $if_content__setup);
const $show = /* @__PURE__ */_._let("show/4", $scope => $if($scope, $scope.show ? 0 : 1));
const $setup__script = _._script("__tests__/template.marko_0", $scope => _._on($scope["#button/0"], "click", function () {
$message($scope, null);

View File

@ -9,7 +9,6 @@ const $if_content__setup = $scope => {
};
const $if_content__comment_comments = /* @__PURE__ */_._if_closure("#text/4", 0, $scope => $input_comments($scope["#childScope/0"], $scope._.comment_comments));
const $if_content__id = /* @__PURE__ */_._if_closure("#text/4", 0, $scope => $input_path($scope["#childScope/0"], $scope._.id));
const $if_content = /* @__PURE__ */_._content_branch($template, /* beginChild, $walks, endChild */`/${$walks}&`, $if_content__setup);
const $for_content__id = /* @__PURE__ */_._const("id", $scope => {
_._attr($scope["#li/0"], "id", $scope.id);
$if_content__id($scope);
@ -30,7 +29,7 @@ const $for_content__setup = $scope => {
$for_content__open($scope, true);
};
const $for_content__comment_text = /* @__PURE__ */_._const("comment_text", $scope => _._text($scope["#text/1"], $scope.comment_text));
const $for_content__if = /* @__PURE__ */_._if("#text/4", $if_content);
const $for_content__if = /* @__PURE__ */_._if("#text/4", $template, /* beginChild, $walks, endChild */`/${$walks}&`, $if_content__setup);
const $for_content__comment_comments = /* @__PURE__ */_._const("comment_comments", $scope => {
$for_content__if($scope, $scope.comment_comments ? 0 : 1);
$if_content__comment_comments($scope);
@ -43,8 +42,7 @@ const $for_content__comment = /* @__PURE__ */_._const("comment", $scope => {
$for_content__comment_text($scope, $scope.comment?.text);
$for_content__comment_comments($scope, $scope.comment?.comments);
});
const $for_content = /* @__PURE__ */_._content_branch("<li><span> </span><button> </button><!></li>", /* get, next(2), get, out(1), get, next(1), get, out(1), replace, out(1) */" E l D l%l", $for_content__setup, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#ul/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#ul/0", "<li><span> </span><button> </button><!></li>", /* get, next(2), get, out(1), get, next(1), get, out(1), replace, out(1) */" E l D l%l", $for_content__setup, $for_content__$params);
export const $input_comments = /* @__PURE__ */_._const("input_comments", $scope => $for($scope, [$scope.input_comments]));
export const $input_path = /* @__PURE__ */_._const("input_path", $for_content__input_path);
export const $input = /* @__PURE__ */_._const("input", $scope => {

View File

@ -1,4 +1,4 @@
// size: 494 (min) 271 (brotli)
// size: 448 (min) 259 (brotli)
const $name = _._const(3, ($scope) => _._text($scope.a, $scope.d)),
$for_content2__setup = ($scope) => {
($scope.a, $for_content2__outer._($scope));
@ -11,13 +11,13 @@ const $name = _._const(3, ($scope) => _._text($scope.a, $scope.d)),
$for_content2__$params = _._const(1, ($scope) =>
$for_content2__inner($scope, $scope.b[0]),
),
$for_content2 = _._content_branch(
$for_content__for = _._for_of(
0,
"<div> </div>",
"/D l&",
$for_content2__setup,
$for_content2__$params,
),
$for_content__for = _._for_of(0, $for_content2),
$for_content__items = _._for_closure(1, ($scope) =>
$for_content__for($scope, [$scope._.c]),
),
@ -26,13 +26,13 @@ const $name = _._const(3, ($scope) => _._text($scope.a, $scope.d)),
$for_content__outer($scope, $scope.b[0]),
),
$for_content__outer = _._const(2, $for_content2__outer),
$for_content = _._content_branch(
$for = _._for_of(
1,
"<!><!><!>",
"b%c",
$for_content__setup,
$for_content__$params,
),
$for = _._for_of(1, $for_content),
$items__script = _._script("b0", ($scope) =>
_._on($scope.a, "click", function () {
$items($scope, [...$scope.c, $scope.c?.length]);

View File

@ -10,14 +10,12 @@ const $for_content2__outer__OR__inner = /* @__PURE__ */_._or(3, $scope => _child
const $for_content2__outer = /* @__PURE__ */_._for_closure("#text/0", $for_content2__outer__OR__inner);
const $for_content2__inner = /* @__PURE__ */_._const("inner", $for_content2__outer__OR__inner);
const $for_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $for_content2__inner($scope, $scope.$params3[0]));
const $for_content2 = /* @__PURE__ */_._content_branch(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $for_content2__setup, $for_content2__$params);
const $for_content__for = /* @__PURE__ */_._for_of("#text/0", $for_content2);
const $for_content__for = /* @__PURE__ */_._for_of("#text/0", _child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $for_content2__setup, $for_content2__$params);
const $for_content__items = /* @__PURE__ */_._for_closure("#text/1", $scope => $for_content__for($scope, [$scope._.items]));
const $for_content__setup = $for_content__items;
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__outer($scope, $scope.$params2[0]));
const $for_content__outer = /* @__PURE__ */_._const("outer", $for_content2__outer);
const $for_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $for_content__setup, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#text/1", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/1", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $for_content__setup, $for_content__$params);
const $items__script = _._script("__tests__/template.marko_0_items", $scope => _._on($scope["#button/0"], "click", function () {
$items($scope, [...$scope.items, $scope.items?.length]);
}));

View File

@ -16,9 +16,8 @@ const $for_content__num = /* @__PURE__ */_._const("num", $scope => {
const $for_content__selected = /* @__PURE__ */_._for_closure("#text/0", $for_content__selected__OR__num);
const $for_content__setup = $for_content__selected;
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__num($scope, $scope.$params2[0]));
const $for_content = /* @__PURE__ */_._content_branch("<button> </button>", /* get, next(1), get, out(1) */" D l", $for_content__setup, $for_content__$params);
const $selected = /* @__PURE__ */_._let("selected/1", $for_content__selected);
const $for = /* @__PURE__ */_._for_of("#text/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/0", "<button> </button>", /* get, next(1), get, out(1) */" D l", $for_content__setup, $for_content__$params);
export function $setup($scope) {
$selected($scope, 0);
$for($scope, [[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12]]);

View File

@ -1,13 +1,8 @@
// size: 365 (min) 224 (brotli)
// size: 319 (min) 207 (brotli)
const $else_content__clickCount = _._if_closure(0, 1, ($scope) =>
_._text($scope.a, $scope._.b),
),
$else_content__setup = $else_content__clickCount,
$else_content = _._content_branch(
"<span>The button was clicked <!> times.</span>",
"Db%l",
$else_content__setup,
),
$if_content__clickCount__script = _._script("a0", ($scope) =>
_._on($scope.a, "click", function () {
$clickCount($scope._, $scope._.b + 1);
@ -17,12 +12,15 @@ const $else_content__clickCount = _._if_closure(0, 1, ($scope) =>
(_._text($scope.b, $scope._.b), $if_content__clickCount__script($scope));
}),
$if_content__setup = $if_content__clickCount,
$if_content = _._content_branch(
$if = _._if(
0,
"<button> </button>",
" D l",
$if_content__setup,
"<span>The button was clicked <!> times.</span>",
"Db%l",
$else_content__setup,
),
$if = _._if(0, $if_content, $else_content),
$clickCount = _._let(1, ($scope) => {
($if($scope, $scope.b < 3 ? 0 : 1),
$if_content__clickCount($scope),

View File

@ -3,7 +3,6 @@ export const $walks = /* next(1), replace, out(1) */"D%l";
import * as _ from "@marko/runtime-tags/debug/dom";
const $else_content__clickCount = /* @__PURE__ */_._if_closure("#text/0", 1, $scope => _._text($scope["#text/0"], $scope._.clickCount));
const $else_content__setup = $else_content__clickCount;
const $else_content = /* @__PURE__ */_._content_branch("<span>The button was clicked <!> times.</span>", /* next(1), over(1), replace, out(1) */"Db%l", $else_content__setup);
const $if_content__clickCount__script = _._script("__tests__/template.marko_1_clickCount", $scope => _._on($scope["#button/0"], "click", function () {
$clickCount($scope._, $scope._.clickCount + 1);
}));
@ -12,8 +11,7 @@ const $if_content__clickCount = /* @__PURE__ */_._if_closure("#text/0", 0, $scop
$if_content__clickCount__script($scope);
});
const $if_content__setup = $if_content__clickCount;
const $if_content = /* @__PURE__ */_._content_branch("<button> </button>", /* get, next(1), get, out(1) */" D l", $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/0", $if_content, $else_content);
const $if = /* @__PURE__ */_._if("#text/0", "<button> </button>", /* get, next(1), get, out(1) */" D l", $if_content__setup, "<span>The button was clicked <!> times.</span>", /* next(1), over(1), replace, out(1) */"Db%l", $else_content__setup);
const $clickCount = /* @__PURE__ */_._let("clickCount/1", $scope => {
$if($scope, $scope.clickCount < 3 ? 0 : 1);
$if_content__clickCount($scope);

View File

@ -1,9 +1,8 @@
// size: 351 (min) 206 (brotli)
// size: 328 (min) 209 (brotli)
const $for_content__item = _._const(2, ($scope) => _._text($scope.a, $scope.c)),
$for_content__$params = _._const(1, ($scope) =>
$for_content__item($scope, $scope.b[0]),
),
$for_content = _._content_branch(" ", " b", 0, $for_content__$params),
$id__OR__items__script = _._script("a0", ($scope) =>
_._on($scope.b, "click", function () {
const nextId = $scope.d + 1;
@ -12,7 +11,7 @@ const $for_content__item = _._const(2, ($scope) => _._text($scope.a, $scope.c)),
),
$id__OR__items = _._or(5, $id__OR__items__script),
$id = _._let(3, $id__OR__items),
$for = _._for_of(0, $for_content),
$for = _._for_of(0, " ", " b", 0, $for_content__$params),
$items__script = _._script("a1", ($scope) =>
_._on($scope.c, "click", function () {
$items($scope, $scope.e.slice(0, -1));

View File

@ -3,7 +3,6 @@ export const $walks = /* next(1), replace, over(1), get, over(1), get, out(1) */
import * as _ from "@marko/runtime-tags/debug/dom";
const $for_content__item = /* @__PURE__ */_._const("item", $scope => _._text($scope["#text/0"], $scope.item));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__item($scope, $scope.$params2[0]));
const $for_content = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $for_content__$params);
const $id__OR__items__script = _._script("__tests__/template.marko_0_id_items", $scope => _._on($scope["#button/1"], "click", function () {
// TODO: nested writes ([...items, id++]) don't work
const nextId = $scope.id + 1;
@ -12,7 +11,7 @@ const $id__OR__items__script = _._script("__tests__/template.marko_0_id_items",
}));
const $id__OR__items = /* @__PURE__ */_._or(5, $id__OR__items__script);
const $id = /* @__PURE__ */_._let("id/3", $id__OR__items);
const $for = /* @__PURE__ */_._for_of("#text/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/0", " ", /* get, over(1) */" b", 0, $for_content__$params);
const $items__script = _._script("__tests__/template.marko_0_items", $scope => _._on($scope["#button/2"], "click", function () {
$items($scope, $scope.items.slice(0, -1));
}));

View File

@ -1,14 +1,8 @@
// size: 382 (min) 224 (brotli)
// size: 359 (min) 216 (brotli)
const $for_content__x = _._const(2, ($scope) => _._text($scope.a, $scope.c)),
$for_content__$params = _._const(1, ($scope) =>
$for_content__x($scope, $scope.b[0]),
),
$for_content = _._content_branch(
"<li> </li>",
"D l",
0,
$for_content__$params,
),
$open__script = _._script("a0", ($scope) =>
_._on($scope.b, "click", function () {
$open($scope, !$scope.d);
@ -17,7 +11,7 @@ const $for_content__x = _._const(2, ($scope) => _._text($scope.a, $scope.c)),
$open = _._let(3, ($scope) => {
(_._attr($scope.a, "hidden", !$scope.d), $open__script($scope));
}),
$for = _._for_of(0, $for_content),
$for = _._for_of(0, "<li> </li>", "D l", 0, $for_content__$params),
$list__script = _._script("a1", ($scope) =>
_._on($scope.c, "click", function () {
$list($scope, [].concat($scope.e).reverse());

View File

@ -3,7 +3,6 @@ export const $walks = /* get, over(1), get, over(1), get, over(1) */" b b b";
import * as _ from "@marko/runtime-tags/debug/dom";
const $for_content__x = /* @__PURE__ */_._const("x", $scope => _._text($scope["#text/0"], $scope.x));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__x($scope, $scope.$params2[0]));
const $for_content = /* @__PURE__ */_._content_branch("<li> </li>", /* next(1), get, out(1) */"D l", 0, $for_content__$params);
const $open__script = _._script("__tests__/template.marko_0_open", $scope => _._on($scope["#button/1"], "click", function () {
$open($scope, !$scope.open);
}));
@ -11,7 +10,7 @@ const $open = /* @__PURE__ */_._let("open/3", $scope => {
_._attr($scope["#ul/0"], "hidden", !$scope.open);
$open__script($scope);
});
const $for = /* @__PURE__ */_._for_of("#ul/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#ul/0", "<li> </li>", /* next(1), get, out(1) */"D l", 0, $for_content__$params);
const $list__script = _._script("__tests__/template.marko_0_list", $scope => _._on($scope["#button/2"], "click", function () {
$list($scope, [].concat($scope.list).reverse());
}));

View File

@ -1,6 +1,5 @@
// size: 154 (min) 121 (brotli)
const $if_content = _._content_branch("Hello!", "b"),
$if = _._if(0, $if_content),
// size: 131 (min) 120 (brotli)
const $if = _._if(0, "Hello!", "b"),
$show__script = _._script("a0", ($scope) =>
_._on($scope.b, "click", function () {
$show($scope, !$scope.c);

View File

@ -1,8 +1,7 @@
export const $template = "<div><!><button>Toggle</button></div>";
export const $walks = /* next(1), replace, over(1), get, out(1) */"D%b l";
import * as _ from "@marko/runtime-tags/debug/dom";
const $if_content = /* @__PURE__ */_._content_branch("Hello!", /* over(1) */"b");
const $if = /* @__PURE__ */_._if("#text/0", $if_content);
const $if = /* @__PURE__ */_._if("#text/0", "Hello!", /* over(1) */"b");
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/1"], "click", function () {
$show($scope, !$scope.show);
}));

View File

@ -1,10 +1,9 @@
// size: 238 (min) 166 (brotli)
// size: 215 (min) 157 (brotli)
const $if_content__message = _._if_closure(1, 0, ($scope) =>
_._text($scope.a, $scope._.d),
),
$if_content__setup = $if_content__message,
$if_content = _._content_branch("<span> </span>", "D l", $if_content__setup),
$if = _._if(1, $if_content),
$if = _._if(1, "<span> </span>", "D l", $if_content__setup),
$show__script = _._script("a0", ($scope) =>
_._on($scope.a, "click", function () {
($message($scope, "bye"), $show($scope, !$scope.c));

View File

@ -3,8 +3,7 @@ export const $walks = /* get, over(1), replace, over(2) */" b%c";
import * as _ from "@marko/runtime-tags/debug/dom";
const $if_content__message = /* @__PURE__ */_._if_closure("#text/1", 0, $scope => _._text($scope["#text/0"], $scope._.message));
const $if_content__setup = $if_content__message;
const $if_content = /* @__PURE__ */_._content_branch("<span> </span>", /* next(1), get, out(1) */"D l", $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/1", $if_content);
const $if = /* @__PURE__ */_._if("#text/1", "<span> </span>", /* next(1), get, out(1) */"D l", $if_content__setup);
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/0"], "click", function () {
$message($scope, "bye");
$show($scope, !$scope.show);

View File

@ -5,21 +5,18 @@ import * as _ from "@marko/runtime-tags/debug/dom";
_._enable_catch();
const $await_content2__data = /* @__PURE__ */_._const("data", $scope => _._text($scope["#text/0"], $scope.data));
const $await_content2__$params = /* @__PURE__ */_._const("$params4", $scope => $await_content2__data($scope, $scope.$params4[0]));
const $await_content2 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content2__$params);
const $await_content__data = /* @__PURE__ */_._const("data", $scope => _._text($scope["#text/0"], $scope.data));
const $await_content__$params = /* @__PURE__ */_._const("$params3", $scope => $await_content__data($scope, $scope.$params3[0]));
const $await_content = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content__$params);
const $catch_content__error_message = /* @__PURE__ */_._const("error_message", $scope => _._text($scope["#text/0"], $scope.error_message));
const $catch_content__$params = /* @__PURE__ */_._const("$params2", $scope => $catch_content__error($scope, $scope.$params2[0]));
const $catch_content__error = /* @__PURE__ */_._const("error", $scope => $catch_content__error_message($scope, $scope.error?.message));
const $catch_content = _._content_resume("__tests__/template.marko_2_content", " ", /* get, over(1) */" b", 0, $catch_content__$params);
const $try_content__await = /* @__PURE__ */_._await("#text/0", $await_content);
const $try_content__await = /* @__PURE__ */_._await("#text/0", " ", /* get, over(1) */" b", 0, $await_content__$params);
const $try_content__setup = $scope => {
$try_content__await($scope, rejectAfter(new Error("ERROR!"), 2));
};
const $try_content = /* @__PURE__ */_._content_branch("b<!>c", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $try = /* @__PURE__ */_._try("#text/0", $try_content);
const $await = /* @__PURE__ */_._await("#text/1", $await_content2);
const $try = /* @__PURE__ */_._try("#text/0", "b<!>c", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $await = /* @__PURE__ */_._await("#text/1", " ", /* get, over(1) */" b", 0, $await_content2__$params);
export function $setup($scope) {
$try($scope, {
catch: _.attrTag({

View File

@ -5,18 +5,15 @@ import * as _ from "@marko/runtime-tags/debug/dom";
_._enable_catch();
const $await_content2__data = /* @__PURE__ */_._const("data", $scope => _._text($scope["#text/0"], $scope.data));
const $await_content2__$params = /* @__PURE__ */_._const("$params4", $scope => $await_content2__data($scope, $scope.$params4[0]));
const $await_content2 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content2__$params);
const $await_content__data = /* @__PURE__ */_._const("data", $scope => _._text($scope["#text/0"], $scope.data));
const $await_content__$params = /* @__PURE__ */_._const("$params3", $scope => $await_content__data($scope, $scope.$params3[0]));
const $await_content = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $await_content__$params);
const $catch_content = _._content_resume("__tests__/template.marko_2_content", "ERROR!", /* over(1) */"b");
const $try_content__await = /* @__PURE__ */_._await("#text/0", $await_content);
const $try_content__await = /* @__PURE__ */_._await("#text/0", " ", /* get, over(1) */" b", 0, $await_content__$params);
const $try_content__setup = $scope => {
$try_content__await($scope, resolveAfter("c", 2));
};
const $try_content = /* @__PURE__ */_._content_branch("b<!>d", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $try = /* @__PURE__ */_._try("#text/0", $try_content);
const $await = /* @__PURE__ */_._await("#text/1", $await_content2);
const $try = /* @__PURE__ */_._try("#text/0", "b<!>d", /* over(1), replace, over(2) */"b%c", $try_content__setup);
const $await = /* @__PURE__ */_._await("#text/1", " ", /* get, over(1) */" b", 0, $await_content2__$params);
export function $setup($scope) {
$try($scope, {
catch: _.attrTag({

View File

@ -3,8 +3,7 @@ export const $walks = /* over(1), replace, over(2) */"b%c";
import * as _ from "@marko/runtime-tags/debug/dom";
_._enable_catch();
const $catch_content = _._content_resume("__tests__/template.marko_2_content", "ERROR!", /* over(1) */"b");
const $try_content = /* @__PURE__ */_._content_branch("b", /* over(1) */"b");
const $try = /* @__PURE__ */_._try("#text/0", $try_content);
const $try = /* @__PURE__ */_._try("#text/0", "b", /* over(1) */"b");
export function $setup($scope) {
$try($scope, {
catch: _.attrTag({

View File

@ -11,8 +11,7 @@ const $try_content__setup = $scope => {
throw new Error("ERROR!");
})());
};
const $try_content = /* @__PURE__ */_._content_branch("b<!>", /* over(1), replace, over(1) */"b%b", $try_content__setup);
const $try = /* @__PURE__ */_._try("#text/0", $try_content);
const $try = /* @__PURE__ */_._try("#text/0", "b<!>", /* over(1), replace, over(1) */"b%b", $try_content__setup);
export function $setup($scope) {
$try($scope, {
catch: _.attrTag({

View File

@ -7,9 +7,8 @@ const $if_content__setup = $scope => {
};
import * as _ from "@marko/runtime-tags/debug/dom";
const $if_content__setter = /* @__PURE__ */_._if_closure("#text/0", 0, $scope => _child_input_valueChange($scope["#childScope/0"], $valueChange($scope)));
const $if_content = /* @__PURE__ */_._content_branch(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $if_content__setup);
const $setter2 = /* @__PURE__ */_._const("setter");
const $if = /* @__PURE__ */_._if("#text/0", $if_content);
const $if = /* @__PURE__ */_._if("#text/0", _child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $if_content__setup);
export function $setup($scope) {
/* value */0;
$setter2($scope, $setter($scope));

View File

@ -1,4 +1,4 @@
// size: 641 (min) 343 (brotli)
// size: 618 (min) 345 (brotli)
const $name__OR__write__script = _._script("a0", ($scope) => {
($scope.g(`mounted ${$scope.f}`),
(_.$signal($scope, 0).onabort = () => {
@ -25,13 +25,13 @@ const $name__OR__write__script = _._script("a0", ($scope) => {
$for_content__$params = _._const(1, ($scope) =>
$for_content__item($scope, $scope.b[0]),
),
$for_content = _._content_branch(
$for = _._for_of(
2,
"<div> </div><span> </span><p> </p>",
"/D lD lD l&",
$for_content__setup,
$for_content__$params,
),
$for = _._for_of(2, $for_content),
$items__script = _._script("b1", ($scope) =>
_._on($scope.a, "click", function () {
$items($scope, $scope.d?.length ? $scope.d.slice(0, -1) : [1, 2, 3]);

View File

@ -9,8 +9,7 @@ const $for_content__setup = $scope => {
const $for_content__write = /* @__PURE__ */_._for_closure("#text/2", $scope => _child_input_write($scope["#childScope/0"], $scope._.write));
const $for_content__item = /* @__PURE__ */_._const("item", $scope => _child_input_name($scope["#childScope/0"], $scope.item));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__item($scope, $scope.$params2[0]));
const $for_content = /* @__PURE__ */_._content_branch(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $for_content__setup, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#text/2", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/2", _child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $for_content__setup, $for_content__$params);
const $items__script = _._script("__tests__/template.marko_0_items", $scope => _._on($scope["#button/0"], "click", function () {
$items($scope, $scope.items?.length ? $scope.items.slice(0, -1) : [1, 2, 3]);
}));

View File

@ -1,4 +1,4 @@
// size: 1184 (min) 474 (brotli)
// size: 1115 (min) 453 (brotli)
const $template = "<div><!> a</div><span><!> a</span><p><!> a</p>",
$name__OR__write__script = _._script("a0", ($scope) => {
($scope.g(`${$scope.f} mounted`),
@ -24,11 +24,6 @@ const $template = "<div><!> a</div><span><!> a</span><p><!> a</p>",
($scope) => $write$1($scope.a, $scope._._._.i),
($scope) => $scope._._._,
),
$if_content3 = _._content_branch(
$template,
"/D%lD%lD%l&",
$if_content3__setup,
),
$if_content2__setup = ($scope) => {
($scope.a,
$name($scope.a, "Middle"),
@ -40,17 +35,12 @@ const $template = "<div><!> a</div><span><!> a</span><p><!> a</p>",
($scope) => $write$1($scope.a, $scope._._.i),
($scope) => $scope._._,
),
$if_content2__if = _._if(1, $if_content3),
$if_content2__if = _._if(1, $template, "/D%lD%lD%l&", $if_content3__setup),
$if_content2__showInner = _._closure_get(
7,
($scope) => $if_content2__if($scope, $scope._._.h ? 0 : 1),
($scope) => $scope._._,
),
$if_content2 = _._content_branch(
`<div>${$template}<!></div>`,
"D/D%lD%lD%l&%l",
$if_content2__setup,
),
$if_content__setup = ($scope) => {
($scope.a,
$name($scope.a, "Outer"),
@ -60,16 +50,21 @@ const $template = "<div><!> a</div><span><!> a</span><p><!> a</p>",
$if_content__write = _._if_closure(4, 0, ($scope) =>
$write$1($scope.a, $scope._.i),
),
$if_content__if = _._if(1, $if_content2),
$if_content__if = _._if(
1,
`<div>${$template}<!></div>`,
"D/D%lD%lD%l&%l",
$if_content2__setup,
),
$if_content__showMiddle = _._if_closure(4, 0, ($scope) =>
$if_content__if($scope, $scope._.g ? 0 : 1),
),
$if_content = _._content_branch(
$if = _._if(
4,
`<div>${$template}<!></div>`,
"D/D%lD%lD%l&%l",
$if_content__setup,
),
$if = _._if(4, $if_content),
$showOuter__script = _._script("b1", ($scope) =>
_._on($scope.a, "click", function () {
$showOuter($scope, !$scope.f);

View File

@ -8,7 +8,6 @@ const $if_content3__setup = $scope => {
$if_content3__write($scope);
};
const $if_content3__write = /* @__PURE__ */_._closure_get("write", $scope => _child_input_write($scope["#childScope/0"], $scope._._._.write), $scope => $scope._._._);
const $if_content3 = /* @__PURE__ */_._content_branch(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $if_content3__setup);
const $if_content2__setup = $scope => {
_child($scope["#childScope/0"]);
_child_input_name($scope["#childScope/0"], "Middle");
@ -16,9 +15,8 @@ const $if_content2__setup = $scope => {
$if_content2__write($scope);
};
const $if_content2__write = /* @__PURE__ */_._closure_get("write", $scope => _child_input_write($scope["#childScope/0"], $scope._._.write), $scope => $scope._._);
const $if_content2__if = /* @__PURE__ */_._if("#text/1", $if_content3);
const $if_content2__if = /* @__PURE__ */_._if("#text/1", _child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $if_content3__setup);
const $if_content2__showInner = /* @__PURE__ */_._closure_get("showInner", $scope => $if_content2__if($scope, $scope._._.showInner ? 0 : 1), $scope => $scope._._);
const $if_content2 = /* @__PURE__ */_._content_branch(`<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace, out(1) */`D/${_child_walks}&%l`, $if_content2__setup);
const $if_content__setup = $scope => {
_child($scope["#childScope/0"]);
_child_input_name($scope["#childScope/0"], "Outer");
@ -26,10 +24,9 @@ const $if_content__setup = $scope => {
$if_content__write._($scope);
};
const $if_content__write = /* @__PURE__ */_._if_closure("#text/4", 0, $scope => _child_input_write($scope["#childScope/0"], $scope._.write));
const $if_content__if = /* @__PURE__ */_._if("#text/1", $if_content2);
const $if_content__if = /* @__PURE__ */_._if("#text/1", `<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace, out(1) */`D/${_child_walks}&%l`, $if_content2__setup);
const $if_content__showMiddle = /* @__PURE__ */_._if_closure("#text/4", 0, $scope => $if_content__if($scope, $scope._.showMiddle ? 0 : 1));
const $if_content = /* @__PURE__ */_._content_branch(`<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace, out(1) */`D/${_child_walks}&%l`, $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/4", $if_content);
const $if = /* @__PURE__ */_._if("#text/4", `<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace, out(1) */`D/${_child_walks}&%l`, $if_content__setup);
const $showOuter__script = _._script("__tests__/template.marko_0_showOuter", $scope => _._on($scope["#button/0"], "click", function () {
$showOuter($scope, !$scope.showOuter);
}));

View File

@ -1,4 +1,4 @@
// size: 328 (min) 203 (brotli)
// size: 305 (min) 194 (brotli)
const $if_content__setup__script = _._script("a0", ($scope) => {
(($scope._.b.innerHTML += "\nmounted"),
(_.$signal($scope, 0).onabort = () => {
@ -8,12 +8,7 @@ const $if_content__setup__script = _._script("a0", ($scope) => {
$if_content__setup = ($scope) => {
(_.$signalReset($scope, 0), $if_content__setup__script($scope));
},
$if_content = _._content_branch(
"<div>a</div><span>b</span><p>c</p>",
"d",
$if_content__setup,
),
$if = _._if(2, $if_content),
$if = _._if(2, "<div>a</div><span>b</span><p>c</p>", "d", $if_content__setup),
$show__script = _._script("a1", ($scope) =>
_._on($scope.a, "click", function () {
$show($scope, !$scope.d);

View File

@ -11,8 +11,7 @@ const $if_content__setup = $scope => {
_.$signalReset($scope, 0);
$if_content__setup__script($scope);
};
const $if_content = /* @__PURE__ */_._content_branch("<div>a</div><span>b</span><p>c</p>", /* over(3) */"d", $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/2", $if_content);
const $if = /* @__PURE__ */_._if("#text/2", "<div>a</div><span>b</span><p>c</p>", /* over(3) */"d", $if_content__setup);
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/0"], "click", function () {
$show($scope, !$scope.show);
}));

View File

@ -1,4 +1,4 @@
// size: 427 (min) 250 (brotli)
// size: 404 (min) 241 (brotli)
const $input__script = _._script("a0", ($scope) => {
($scope.b.write("mounted"),
(_.$signal($scope, 0).onabort = () => {
@ -11,12 +11,12 @@ const $input__script = _._script("a0", ($scope) => {
$if_content__setup = ($scope) => {
($scope.a, $input($scope.a, { write: $write($scope) }));
},
$if_content = _._content_branch(
$if = _._if(
2,
"<div>a</div><span>b</span><p>c</p>",
"/d&",
$if_content__setup,
),
$if = _._if(2, $if_content),
$show__script = _._script("b1", ($scope) =>
_._on($scope.a, "click", function () {
$show($scope, !$scope.d);

View File

@ -8,8 +8,7 @@ const $if_content__setup = $scope => {
write: $write($scope)
});
};
const $if_content = /* @__PURE__ */_._content_branch(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/2", $if_content);
const $if = /* @__PURE__ */_._if("#text/2", _child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $if_content__setup);
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/0"], "click", function () {
$show($scope, !$scope.show);
}));

View File

@ -1,4 +1,4 @@
// size: 886 (min) 412 (brotli)
// size: 840 (min) 399 (brotli)
const $name__OR__write__script = _._script(
"a0",
($scope) =>
@ -37,12 +37,6 @@ const $name__OR__write__script = _._script(
$for_content2__$params = _._const(1, ($scope) =>
$for_content2__middleItem($scope, $scope.b[0]),
),
$for_content2 = _._content_branch(
"<div><div> </div></div>",
"D/D l&l",
$for_content2__setup,
$for_content2__$params,
),
$for_content__setup = ($scope) => {
($scope.a, $for_content__items._($scope), $for_content__write._($scope));
},
@ -52,20 +46,26 @@ const $name__OR__write__script = _._script(
$for_content__outerItem = _._const(3, ($scope) => {
($name($scope.a, `${$scope.d}`), $for_content2__outerItem($scope));
}),
$for_content__for = _._for_of(1, $for_content2),
$for_content__for = _._for_of(
1,
"<div><div> </div></div>",
"D/D l&l",
$for_content2__setup,
$for_content2__$params,
),
$for_content__items = _._for_closure(2, ($scope) =>
$for_content__for($scope, [$scope._.d]),
),
$for_content__$params = _._const(2, ($scope) =>
$for_content__outerItem($scope, $scope.c[0]),
),
$for_content = _._content_branch(
$for = _._for_of(
2,
"<div><div> </div><!></div>",
"D/D l&%l",
$for_content__setup,
$for_content__$params,
),
$for = _._for_of(2, $for_content),
$items__script = _._script("b1", ($scope) =>
_._on($scope.a, "click", function () {
$items($scope, $scope.d?.length ? $scope.d.slice(0, -1) : [1, 2, 3]);

View File

@ -12,7 +12,6 @@ const $for_content2__outerItem__OR__middleItem = /* @__PURE__ */_._or(3, $scope
const $for_content2__outerItem = /* @__PURE__ */_._for_closure("#text/1", $for_content2__outerItem__OR__middleItem);
const $for_content2__middleItem = /* @__PURE__ */_._const("middleItem", $for_content2__outerItem__OR__middleItem);
const $for_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $for_content2__middleItem($scope, $scope.$params3[0]));
const $for_content2 = /* @__PURE__ */_._content_branch(`<div>${_child_template}</div>`, /* next(1), beginChild, _child_walks, endChild, out(1) */`D/${_child_walks}&l`, $for_content2__setup, $for_content2__$params);
const $for_content__setup = $scope => {
_child($scope["#childScope/0"]);
$for_content__items._($scope);
@ -23,11 +22,10 @@ const $for_content__outerItem = /* @__PURE__ */_._const("outerItem", $scope => {
_child_input_name($scope["#childScope/0"], `${$scope.outerItem}`);
$for_content2__outerItem($scope);
});
const $for_content__for = /* @__PURE__ */_._for_of("#text/1", $for_content2);
const $for_content__for = /* @__PURE__ */_._for_of("#text/1", `<div>${_child_template}</div>`, /* next(1), beginChild, _child_walks, endChild, out(1) */`D/${_child_walks}&l`, $for_content2__setup, $for_content2__$params);
const $for_content__items = /* @__PURE__ */_._for_closure("#text/2", $scope => $for_content__for($scope, [$scope._.items]));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__outerItem($scope, $scope.$params2[0]));
const $for_content = /* @__PURE__ */_._content_branch(`<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace, out(1) */`D/${_child_walks}&%l`, $for_content__setup, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#text/2", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/2", `<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace, out(1) */`D/${_child_walks}&%l`, $for_content__setup, $for_content__$params);
const $items__script = _._script("__tests__/template.marko_0_items", $scope => _._on($scope["#button/0"], "click", function () {
$items($scope, $scope.items?.length ? $scope.items.slice(0, -1) : [1, 2, 3]);
}));

View File

@ -1,4 +1,4 @@
// size: 579 (min) 316 (brotli)
// size: 556 (min) 310 (brotli)
const $name__OR__write__script = _._script("a0", ($scope) => {
($scope.e(`mounted ${$scope.d}`),
(_.$signal($scope, 0).onabort = () => {
@ -22,13 +22,13 @@ const $name__OR__write__script = _._script("a0", ($scope) => {
$for_content__$params = _._const(1, ($scope) =>
$for_content__item($scope, $scope.b[0]),
),
$for_content = _._content_branch(
$for = _._for_of(
2,
"<div> </div>",
"/D l&",
$for_content__setup,
$for_content__$params,
),
$for = _._for_of(2, $for_content),
$items__script = _._script("b1", ($scope) =>
_._on($scope.a, "click", function () {
$items($scope, $scope.d?.length ? $scope.d.slice(0, -1) : [1, 2, 3]);

View File

@ -9,8 +9,7 @@ const $for_content__setup = $scope => {
const $for_content__write = /* @__PURE__ */_._for_closure("#text/2", $scope => _child_input_write($scope["#childScope/0"], $scope._.write));
const $for_content__item = /* @__PURE__ */_._const("item", $scope => _child_input_name($scope["#childScope/0"], $scope.item));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__item($scope, $scope.$params2[0]));
const $for_content = /* @__PURE__ */_._content_branch(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $for_content__setup, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#text/2", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/2", _child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $for_content__setup, $for_content__$params);
const $items__script = _._script("__tests__/template.marko_0_items", $scope => _._on($scope["#button/0"], "click", function () {
$items($scope, $scope.items?.length ? $scope.items.slice(0, -1) : [1, 2, 3]);
}));

View File

@ -1,4 +1,4 @@
// size: 1098 (min) 446 (brotli)
// size: 1029 (min) 425 (brotli)
const $name__OR__write__script = _._script("a0", ($scope) => {
($scope.e(`${$scope.d} mounted`),
(_.$signal($scope, 0).onabort = () => {
@ -20,7 +20,6 @@ const $name__OR__write__script = _._script("a0", ($scope) => {
($scope) => $write$1($scope.a, $scope._._._.i),
($scope) => $scope._._._,
),
$if_content3 = _._content_branch("<p> </p>", "/D l&", $if_content3__setup),
$if_content2__setup = ($scope) => {
($scope.a,
$name($scope.a, "Middle"),
@ -32,17 +31,12 @@ const $name__OR__write__script = _._script("a0", ($scope) => {
($scope) => $write$1($scope.a, $scope._._.i),
($scope) => $scope._._,
),
$if_content2__if = _._if(1, $if_content3),
$if_content2__if = _._if(1, "<p> </p>", "/D l&", $if_content3__setup),
$if_content2__showInner = _._closure_get(
7,
($scope) => $if_content2__if($scope, $scope._._.h ? 0 : 1),
($scope) => $scope._._,
),
$if_content2 = _._content_branch(
"<div><p> </p><!></div>",
"D/D l&%l",
$if_content2__setup,
),
$if_content__setup = ($scope) => {
($scope.a,
$name($scope.a, "Outer"),
@ -52,16 +46,16 @@ const $name__OR__write__script = _._script("a0", ($scope) => {
$if_content__write = _._if_closure(4, 0, ($scope) =>
$write$1($scope.a, $scope._.i),
),
$if_content__if = _._if(1, $if_content2),
$if_content__if = _._if(
1,
"<div><p> </p><!></div>",
"D/D l&%l",
$if_content2__setup,
),
$if_content__showMiddle = _._if_closure(4, 0, ($scope) =>
$if_content__if($scope, $scope._.g ? 0 : 1),
),
$if_content = _._content_branch(
"<div><p> </p><!></div>",
"D/D l&%l",
$if_content__setup,
),
$if = _._if(4, $if_content),
$if = _._if(4, "<div><p> </p><!></div>", "D/D l&%l", $if_content__setup),
$showOuter__script = _._script("b1", ($scope) =>
_._on($scope.a, "click", function () {
$showOuter($scope, !$scope.f);

View File

@ -8,7 +8,6 @@ const $if_content3__setup = $scope => {
$if_content3__write($scope);
};
const $if_content3__write = /* @__PURE__ */_._closure_get("write", $scope => _child_input_write($scope["#childScope/0"], $scope._._._.write), $scope => $scope._._._);
const $if_content3 = /* @__PURE__ */_._content_branch(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $if_content3__setup);
const $if_content2__setup = $scope => {
_child($scope["#childScope/0"]);
_child_input_name($scope["#childScope/0"], "Middle");
@ -16,9 +15,8 @@ const $if_content2__setup = $scope => {
$if_content2__write($scope);
};
const $if_content2__write = /* @__PURE__ */_._closure_get("write", $scope => _child_input_write($scope["#childScope/0"], $scope._._.write), $scope => $scope._._);
const $if_content2__if = /* @__PURE__ */_._if("#text/1", $if_content3);
const $if_content2__if = /* @__PURE__ */_._if("#text/1", _child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $if_content3__setup);
const $if_content2__showInner = /* @__PURE__ */_._closure_get("showInner", $scope => $if_content2__if($scope, $scope._._.showInner ? 0 : 1), $scope => $scope._._);
const $if_content2 = /* @__PURE__ */_._content_branch(`<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace, out(1) */`D/${_child_walks}&%l`, $if_content2__setup);
const $if_content__setup = $scope => {
_child($scope["#childScope/0"]);
_child_input_name($scope["#childScope/0"], "Outer");
@ -26,10 +24,9 @@ const $if_content__setup = $scope => {
$if_content__write._($scope);
};
const $if_content__write = /* @__PURE__ */_._if_closure("#text/4", 0, $scope => _child_input_write($scope["#childScope/0"], $scope._.write));
const $if_content__if = /* @__PURE__ */_._if("#text/1", $if_content2);
const $if_content__if = /* @__PURE__ */_._if("#text/1", `<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace, out(1) */`D/${_child_walks}&%l`, $if_content2__setup);
const $if_content__showMiddle = /* @__PURE__ */_._if_closure("#text/4", 0, $scope => $if_content__if($scope, $scope._.showMiddle ? 0 : 1));
const $if_content = /* @__PURE__ */_._content_branch(`<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace, out(1) */`D/${_child_walks}&%l`, $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/4", $if_content);
const $if = /* @__PURE__ */_._if("#text/4", `<div>${_child_template}<!></div>`, /* next(1), beginChild, _child_walks, endChild, replace, out(1) */`D/${_child_walks}&%l`, $if_content__setup);
const $showOuter__script = _._script("__tests__/template.marko_0_showOuter", $scope => _._on($scope["#button/0"], "click", function () {
$showOuter($scope, !$scope.showOuter);
}));

View File

@ -1,4 +1,4 @@
// size: 310 (min) 195 (brotli)
// size: 287 (min) 181 (brotli)
const $if_content__setup__script = _._script("a0", ($scope) => {
(($scope._.b.innerHTML += "\nmounted"),
(_.$signal($scope, 0).onabort = () => {
@ -8,8 +8,7 @@ const $if_content__setup__script = _._script("a0", ($scope) => {
$if_content__setup = ($scope) => {
(_.$signalReset($scope, 0), $if_content__setup__script($scope));
},
$if_content = _._content_branch("<div>child</div>", "b", $if_content__setup),
$if = _._if(2, $if_content),
$if = _._if(2, "<div>child</div>", "b", $if_content__setup),
$show__script = _._script("a1", ($scope) =>
_._on($scope.a, "click", function () {
$show($scope, !$scope.d);

View File

@ -11,8 +11,7 @@ const $if_content__setup = $scope => {
_.$signalReset($scope, 0);
$if_content__setup__script($scope);
};
const $if_content = /* @__PURE__ */_._content_branch("<div>child</div>", /* over(1) */"b", $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/2", $if_content);
const $if = /* @__PURE__ */_._if("#text/2", "<div>child</div>", /* over(1) */"b", $if_content__setup);
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/0"], "click", function () {
$show($scope, !$scope.show);
}));

View File

@ -1,4 +1,4 @@
// size: 409 (min) 244 (brotli)
// size: 386 (min) 236 (brotli)
const $input__script = _._script("a0", ($scope) => {
($scope.b.write("mounted"),
(_.$signal($scope, 0).onabort = () => {
@ -11,12 +11,7 @@ const $input__script = _._script("a0", ($scope) => {
$if_content__setup = ($scope) => {
($scope.a, $input($scope.a, { write: $write($scope) }));
},
$if_content = _._content_branch(
"<div>child</div>",
"/b&",
$if_content__setup,
),
$if = _._if(2, $if_content),
$if = _._if(2, "<div>child</div>", "/b&", $if_content__setup),
$show__script = _._script("b1", ($scope) =>
_._on($scope.a, "click", function () {
$show($scope, !$scope.d);

View File

@ -8,8 +8,7 @@ const $if_content__setup = $scope => {
write: $write($scope)
});
};
const $if_content = /* @__PURE__ */_._content_branch(_child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/2", $if_content);
const $if = /* @__PURE__ */_._if("#text/2", _child_template, /* beginChild, _child_walks, endChild */`/${_child_walks}&`, $if_content__setup);
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/0"], "click", function () {
$show($scope, !$scope.show);
}));

View File

@ -5,9 +5,8 @@ const $if_content__run__script = _._script("__tests__/template.marko_1_run", $sc
const $if_content__run = /* @__PURE__ */_._const("run", $if_content__run__script);
const $if_content__text = /* @__PURE__ */_._if_closure("#text/0", 0, $scope => $if_content__run($scope, $run($scope)));
const $if_content__setup = $if_content__text;
const $if_content = /* @__PURE__ */_._content_branch("<div></div>", /* get, over(1) */" b", $if_content__setup);
const $text2 = /* @__PURE__ */_._const("text");
const $if = /* @__PURE__ */_._if("#text/0", $if_content);
const $if = /* @__PURE__ */_._if("#text/0", "<div></div>", /* get, over(1) */" b", $if_content__setup);
export function $setup($scope) {
$text2($scope, $text);
$if($scope, 1 ? 0 : 1);

View File

@ -1,9 +1,8 @@
// size: 272 (min) 183 (brotli)
// size: 249 (min) 176 (brotli)
const $if_content__setup = _._if_closure(0, 0, ($scope) =>
_._text($scope.a, $scope._.h()),
),
$if_content = _._content_branch("<span> </span>", "D l", $if_content__setup),
$if = _._if(0, $if_content),
$if = _._if(0, "<span> </span>", "D l", $if_content__setup),
$x__script = _._script("a1", ($scope) =>
_._on($scope.b, "click", function () {
$x($scope, $scope.g + 1);

View File

@ -3,8 +3,7 @@ export const $walks = /* get, over(1), get, next(1), get, out(1) */" b D l";
import * as _ from "@marko/runtime-tags/debug/dom";
const $if_content__getMessage = /* @__PURE__ */_._if_closure("#div/0", 0, $scope => _._text($scope["#text/0"], $scope._.getMessage()));
const $if_content__setup = $if_content__getMessage;
const $if_content = /* @__PURE__ */_._content_branch("<span> </span>", /* next(1), get, out(1) */"D l", $if_content__setup);
const $if = /* @__PURE__ */_._if("#div/0", $if_content);
const $if = /* @__PURE__ */_._if("#div/0", "<span> </span>", /* next(1), get, out(1) */"D l", $if_content__setup);
const $x__script = _._script("__tests__/template.marko_0_x", $scope => _._on($scope["#button/1"], "click", function () {
$x($scope, $scope.x + 1);
}));

View File

@ -1,6 +1,5 @@
// size: 168 (min) 147 (brotli)
const $if_content = _._content_branch("<tr><td>Hi</td></tr>", "b"),
$if = _._if(0, $if_content),
// size: 145 (min) 124 (brotli)
const $if = _._if(0, "<tr><td>Hi</td></tr>", "b"),
$show__script = _._script("a0", ($scope) =>
_._on($scope.b, "click", function () {
$show($scope, !$scope.c);

View File

@ -1,8 +1,7 @@
export const $template = "<table><tbody></tbody></table><button>Toggle</button>";
export const $walks = /* next(1), get, out(1), get, over(1) */"D l b";
import * as _ from "@marko/runtime-tags/debug/dom";
const $if_content = /* @__PURE__ */_._content_branch("<tr><td>Hi</td></tr>", /* over(1) */"b");
const $if = /* @__PURE__ */_._if("#tbody/0", $if_content);
const $if = /* @__PURE__ */_._if("#tbody/0", "<tr><td>Hi</td></tr>", /* over(1) */"b");
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/1"], "click", function () {
$show($scope, !$scope.show);
}));

View File

@ -1,4 +1,4 @@
// size: 670 (min) 285 (brotli)
// size: 647 (min) 280 (brotli)
const $if_content__checkedValue__OR__checkedValueChange = _._or(1, ($scope) =>
_._attr_input_checkedValue($scope, "a", $scope._.g, $scope._.h, "b"),
),
@ -20,12 +20,7 @@ const $if_content__checkedValue__OR__checkedValueChange = _._or(1, ($scope) =>
$if_content__$checkedValueChange._($scope),
$if_content__setup__script($scope));
},
$if_content = _._content_branch(
"<input type=radio>",
" b",
$if_content__setup,
),
$if = _._if(1, $if_content),
$if = _._if(1, "<input type=radio>", " b", $if_content__setup),
$show__script = _._script("a2", ($scope) =>
_._on($scope.e, "click", function () {
$show($scope, !$scope.f);

View File

@ -10,8 +10,7 @@ const $if_content__setup = $scope => {
$if_content__$checkedValueChange._($scope);
$if_content__setup__script($scope);
};
const $if_content = /* @__PURE__ */_._content_branch("<input type=radio>", /* get, over(1) */" b", $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/1", $if_content);
const $if = /* @__PURE__ */_._if("#text/1", "<input type=radio>", /* get, over(1) */" b", $if_content__setup);
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/4"], "click", function () {
$show($scope, !$scope.show);
}));

View File

@ -1,17 +1,11 @@
// size: 631 (min) 310 (brotli)
// size: 608 (min) 298 (brotli)
const $for_content__opt = _._const(3, ($scope) => {
(_._attr($scope.a, "value", $scope.d), _._text($scope.b, $scope.d));
}),
$for_content__$params = _._const(2, ($scope) =>
$for_content__opt($scope, $scope.c[0]),
),
$for_content = _._content_branch(
"<option> </option>",
" D l",
0,
$for_content__$params,
),
$for = _._for_of(0, $for_content),
$for = _._for_of(0, "<option> </option>", " D l", 0, $for_content__$params),
$options__script = _._script("a1", ($scope) => {
(_._on($scope.c, "click", function () {
$options($scope, $scope.e.slice(1));

View File

@ -6,8 +6,7 @@ const $for_content__opt = /* @__PURE__ */_._const("opt", $scope => {
_._text($scope["#text/1"], $scope.opt);
});
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__opt($scope, $scope.$params2[0]));
const $for_content = /* @__PURE__ */_._content_branch("<option> </option>", /* get, next(1), get, out(1) */" D l", 0, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#select/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#select/0", "<option> </option>", /* get, next(1), get, out(1) */" D l", 0, $for_content__$params);
const $options__script = _._script("__tests__/template.marko_0_options", $scope => {
_._on($scope["#button/2"], "click", function () {
$options($scope, $scope.options.slice(1));

View File

@ -4,8 +4,7 @@ export const $setup = () => {};
import * as _ from "@marko/runtime-tags/debug/dom";
const $for_content__n = /* @__PURE__ */_._const("n", $scope => _._text($scope["#text/0"], $scope.n));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__n($scope, $scope.$params2[0]));
const $for_content = /* @__PURE__ */_._content_branch("<!>, ", /* replace, over(2) */"%c", 0, $for_content__$params);
const $for = /* @__PURE__ */_._for_to("#div/0", $for_content);
const $for = /* @__PURE__ */_._for_to("#div/0", "<!>, ", /* replace, over(2) */"%c", 0, $for_content__$params);
const $input_from__OR__input_to__OR__input_step = /* @__PURE__ */_._or(6, $scope => $for($scope, [$scope.input_to, $scope.input_from, $scope.input_step]), 2);
export const $input_from = /* @__PURE__ */_._const("input_from", $input_from__OR__input_to__OR__input_step);
export const $input_to = /* @__PURE__ */_._const("input_to", $input_from__OR__input_to__OR__input_step);

View File

@ -4,16 +4,14 @@ export const $setup = () => {};
import * as _ from "@marko/runtime-tags/debug/dom";
const $for_content2__key = /* @__PURE__ */_._const("key", $scope => _._text($scope["#text/0"], $scope.key));
const $for_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $for_content2__key($scope, $scope.$params3[0]));
const $for_content2 = /* @__PURE__ */_._content_branch("<p> </p>", /* next(1), get, out(1) */"D l", 0, $for_content2__$params);
const $for_content__key = /* @__PURE__ */_._const("key", $scope => _._text($scope["#text/0"], $scope.key));
const $for_content__text = /* @__PURE__ */_._const("text", $scope => _._text($scope["#text/1"], $scope.text));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => {
$for_content__key($scope, $scope.$params2[0]);
$for_content__text($scope, $scope.$params2[1]);
});
const $for_content = /* @__PURE__ */_._content_branch("<p><!>: <!></p>", /* next(1), replace, over(2), replace, out(1) */"D%c%l", 0, $for_content__$params);
const $for = /* @__PURE__ */_._for_in("#text/0", $for_content);
const $for2 = /* @__PURE__ */_._for_in("#text/1", $for_content2);
const $for = /* @__PURE__ */_._for_in("#text/0", "<p><!>: <!></p>", /* next(1), replace, over(2), replace, out(1) */"D%c%l", 0, $for_content__$params);
const $for2 = /* @__PURE__ */_._for_in("#text/1", "<p> </p>", /* next(1), get, out(1) */"D l", 0, $for_content2__$params);
export const $input_children = /* @__PURE__ */_._const("input_children", $scope => {
$for($scope, [$scope.input_children]);
$for2($scope, [$scope.input_children]);

View File

@ -1,17 +1,12 @@
// size: 295 (min) 197 (brotli)
// size: 272 (min) 188 (brotli)
const $if_content__setup = ($scope) => {
$MyTag_content__setup._($scope.a, $scope._);
},
$if_content = _._content_branch(
"<!><div> </div><!>",
"b/D l&b",
$if_content__setup,
),
$MyTag_content__x = _._closure_get(4, ($scope) =>
_._text($scope.a, $scope._.e),
),
$MyTag_content__setup = _._child_setup($MyTag_content__x),
$if = _._if(1, $if_content),
$if = _._if(1, "<!><div> </div><!>", "b/D l&b", $if_content__setup),
$x__closure = _._closure($MyTag_content__x),
$x__script = _._script("a0", ($scope) =>
_._on($scope.c, "click", function () {

View File

@ -6,10 +6,9 @@ import * as _ from "@marko/runtime-tags/debug/dom";
const $if_content__setup = $scope => {
$MyTag_content__setup._($scope["#childScope/0"], $scope._);
};
const $if_content = /* @__PURE__ */_._content_branch(`<!>${$MyTag_content__template}<!>`, /* over(1), beginChild, $MyTag_content__walks, endChild, over(1) */`b/${$MyTag_content__walks}&b`, $if_content__setup);
const $MyTag_content__x = /* @__PURE__ */_._closure_get("x", $scope => _._text($scope["#text/0"], $scope._.x));
const $MyTag_content__setup = /* @__PURE__ */_._child_setup($MyTag_content__x);
const $if = /* @__PURE__ */_._if("#text/1", $if_content);
const $if = /* @__PURE__ */_._if("#text/1", `<!>${$MyTag_content__template}<!>`, /* over(1), beginChild, $MyTag_content__walks, endChild, over(1) */`b/${$MyTag_content__walks}&b`, $if_content__setup);
const $x__closure = /* @__PURE__ */_._closure($MyTag_content__x);
const $x__script = _._script("__tests__/template.marko_0_x", $scope => _._on($scope["#button/2"], "click", function () {
$x($scope, $scope.x + 1);

View File

@ -1,4 +1,4 @@
// size: 304 (min) 217 (brotli)
// size: 281 (min) 204 (brotli)
const $MyTag_content__value = _._const(3, ($scope) =>
_._text($scope.a, $scope.d),
),
@ -6,12 +6,7 @@ const $MyTag_content__value = _._const(3, ($scope) =>
$MyTag_content__value($scope.a, $scope._.e),
),
$if_content__setup = $if_content__x,
$if_content = _._content_branch(
"<!><div>Hello <!></div><!>",
"b/Db%l&b",
$if_content__setup,
),
$if = _._if(0, $if_content),
$if = _._if(0, "<!><div>Hello <!></div><!>", "b/Db%l&b", $if_content__setup),
$show = _._let(3, ($scope) => $if($scope, $scope.d ? 0 : 1)),
$x__script = _._script("a0", ($scope) =>
_._on($scope.b, "click", function () {

View File

@ -8,8 +8,7 @@ const $MyTag_content__$params = /* @__PURE__ */_._const("$params2", $scope => $M
const $MyTag_content__$temp = /* @__PURE__ */_._const("$temp", $scope => $MyTag_content__value($scope, $scope.$temp.value));
const $if_content__x = /* @__PURE__ */_._if_closure("#text/0", 0, $scope => $MyTag_content__value($scope["#childScope/0"], $scope._.x));
const $if_content__setup = $if_content__x;
const $if_content = /* @__PURE__ */_._content_branch(`<!>${$MyTag_content__template}<!>`, /* over(1), beginChild, $MyTag_content__walks, endChild, over(1) */`b/${$MyTag_content__walks}&b`, $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/0", $if_content);
const $if = /* @__PURE__ */_._if("#text/0", `<!>${$MyTag_content__template}<!>`, /* over(1), beginChild, $MyTag_content__walks, endChild, over(1) */`b/${$MyTag_content__walks}&b`, $if_content__setup);
const $show = /* @__PURE__ */_._let("show/3", $scope => $if($scope, $scope.show ? 0 : 1));
const $x__script = _._script("__tests__/template.marko_0_x", $scope => _._on($scope["#button/1"], "click", function () {
$x($scope, $scope.x + 1);

View File

@ -1,4 +1,4 @@
// size: 484 (min) 261 (brotli)
// size: 461 (min) 254 (brotli)
const $list$1 = _._let(3, ($scope) =>
_._return($scope, {
list: $scope.d,
@ -20,12 +20,6 @@ function $_return($scope) {
const $for_content__item = _._const(2, ($scope) => _._text($scope.a, $scope.c)),
$for_content__$params = _._const(1, ($scope) =>
$for_content__item($scope, $scope.b[0]),
),
$for_content = _._content_branch(
"<li> </li>",
"D l",
0,
$for_content__$params,
);
_._var_resume(
"b0",
@ -33,7 +27,7 @@ _._var_resume(
($list($scope, $scope.e.list), $clear($scope, $scope.e.clear));
}),
);
const $for = _._for_of(3, $for_content),
const $for = _._for_of(3, "<li> </li>", "D l", 0, $for_content__$params),
$list = _._const(5, ($scope) => $for($scope, [$scope.f])),
$clear__script = _._script("b1", ($scope) =>
_._on($scope.c, "click", $scope.g),

View File

@ -4,12 +4,11 @@ import * as _ from "@marko/runtime-tags/debug/dom";
import { $setup as _store, $input_value as _store_input_value, $template as _store_template, $walks as _store_walks } from "./tags/store.marko";
const $for_content__item = /* @__PURE__ */_._const("item", $scope => _._text($scope["#text/0"], $scope.item));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__item($scope, $scope.$params2[0]));
const $for_content = /* @__PURE__ */_._content_branch("<li> </li>", /* next(1), get, out(1) */"D l", 0, $for_content__$params);
const $store = _._var_resume("__tests__/template.marko_0_store/var", /* @__PURE__ */_._const("store", $scope => {
$list($scope, $scope.store.list);
$clear($scope, $scope.store.clear);
}));
const $for = /* @__PURE__ */_._for_of("#ul/3", $for_content);
const $for = /* @__PURE__ */_._for_of("#ul/3", "<li> </li>", /* next(1), get, out(1) */"D l", 0, $for_content__$params);
const $list = /* @__PURE__ */_._const("list", $scope => $for($scope, [$scope.list]));
const $clear__script = _._script("__tests__/template.marko_0_clear", $scope => _._on($scope["#button/2"], "click", $scope.clear));
const $clear = /* @__PURE__ */_._const("clear", $clear__script);

View File

@ -1,18 +1,12 @@
// size: 303 (min) 175 (brotli)
// size: 257 (min) 175 (brotli)
const $if_content2__setup = ($scope) => {
_._text($scope.a, $scope.$.x);
},
$if_content2 = _._content_branch(
"<span class=hidden> </span>",
"D l",
$if_content2__setup,
),
$if_content__setup = ($scope) => {
_._text($scope.a, $scope.$.x);
},
$if_content = _._content_branch("<span> </span>", "D l", $if_content__setup),
$if = _._if(0, $if_content),
$if2 = _._if(1, $if_content2),
$if = _._if(0, "<span> </span>", "D l", $if_content__setup),
$if2 = _._if(1, "<span class=hidden> </span>", "D l", $if_content2__setup),
$show__script = _._script("a0", ($scope) =>
_._on($scope.c, "click", function () {
$show($scope, !$scope.d);

View File

@ -4,13 +4,11 @@ import * as _ from "@marko/runtime-tags/debug/dom";
const $if_content2__setup = $scope => {
_._text($scope["#text/0"], $scope.$global.x);
};
const $if_content2 = /* @__PURE__ */_._content_branch("<span class=hidden> </span>", /* next(1), get, out(1) */"D l", $if_content2__setup);
const $if_content__setup = $scope => {
_._text($scope["#text/0"], $scope.$global.x);
};
const $if_content = /* @__PURE__ */_._content_branch("<span> </span>", /* next(1), get, out(1) */"D l", $if_content__setup);
const $if = /* @__PURE__ */_._if("#text/0", $if_content);
const $if2 = /* @__PURE__ */_._if("#text/1", $if_content2);
const $if = /* @__PURE__ */_._if("#text/0", "<span> </span>", /* next(1), get, out(1) */"D l", $if_content__setup);
const $if2 = /* @__PURE__ */_._if("#text/1", "<span class=hidden> </span>", /* next(1), get, out(1) */"D l", $if_content2__setup);
const $show__script = _._script("__tests__/template.marko_0_show", $scope => _._on($scope["#button/2"], "click", function () {
$show($scope, !$scope.show);
}));

View File

@ -9,19 +9,17 @@ const $if_content2__setup = $scope => {
$if_content2__bar($scope);
$if_content2__foo._($scope);
};
const $if_content2 = /* @__PURE__ */_._content_branch("<div> </div>", /* next(1), get, out(1) */"D l", $if_content2__setup);
const $if_content__foo = /* @__PURE__ */_._const("foo");
const $if_content__setup = $scope => {
$if_content__input_b._($scope);
$if_content__foo($scope, "foo");
};
const $if_content__if = /* @__PURE__ */_._if("#text/0", $if_content2);
const $if_content__if = /* @__PURE__ */_._if("#text/0", "<div> </div>", /* next(1), get, out(1) */"D l", $if_content2__setup);
const $if_content__input_b = /* @__PURE__ */_._if_closure("#text/0", 0, $scope => $if_content__if($scope, $scope._.input_b ? 0 : 1));
const $if_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $if_content__setup);
const $bar2__closure = /* @__PURE__ */_._closure($if_content2__bar);
const $bar2 = /* @__PURE__ */_._const("bar", $bar2__closure);
export const $input_c = /* @__PURE__ */_._const("input_c", $scope => $bar2($scope, $bar($scope)));
const $if = /* @__PURE__ */_._if("#text/0", $if_content);
const $if = /* @__PURE__ */_._if("#text/0", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $if_content__setup);
export const $input_a = /* @__PURE__ */_._const("input_a", $scope => $if($scope, $scope.input_a ? 0 : 1));
export const $input = /* @__PURE__ */_._const("input", $scope => {
$input_c($scope, $scope.input.c);

View File

@ -10,12 +10,10 @@ const $if_content2__setup = $scope => {
};
const $if_content2__b = /* @__PURE__ */_._closure_get("b", $scope => _._text($scope["#text/1"], $scope._._.b), $scope => $scope._._);
const $if_content2__c = /* @__PURE__ */_._closure_get("c", $scope => _._text($scope["#text/2"], $scope._._.c), $scope => $scope._._);
const $if_content2 = /* @__PURE__ */_._content_branch("<!> <!> <!>", /* replace, over(2), replace, over(2), replace, over(1) */"%c%c%b", $if_content2__setup);
const $if_content__if = /* @__PURE__ */_._if("#text/0", $if_content2);
const $if_content__if = /* @__PURE__ */_._if("#text/0", "<!> <!> <!>", /* replace, over(2), replace, over(2), replace, over(1) */"%c%c%b", $if_content2__setup);
const $if_content__setup = $scope => {
$if_content__if($scope, Math.random() ? 0 : 1);
};
const $if_content = /* @__PURE__ */_._content_branch("<!><!><!>", /* over(1), replace, over(2) */"b%c", $if_content__setup);
const $customtag_content__setup = $scope => {
_._text($scope["#text/0"], a);
$customtag_content__b($scope);
@ -27,7 +25,7 @@ const $customtag_content = /* @__PURE__ */_._content("__tests__/template.marko_1
const $b = /* @__PURE__ */_._const("b");
const $c__closure = /* @__PURE__ */_._closure($customtag_content__c, $if_content2__c);
const $c = /* @__PURE__ */_._let("c/4", $c__closure);
const $if = /* @__PURE__ */_._if("#div/2", $if_content);
const $if = /* @__PURE__ */_._if("#div/2", "<!><!><!>", /* over(1), replace, over(2) */"b%c", $if_content__setup);
const $setup__script = _._script("__tests__/template.marko_0", $scope => _._on($scope["#button/0"], "click", function () {
$c($scope, 4);
}));

View File

@ -2,8 +2,7 @@ export const $template = "a<!>b";
export const $walks = /* over(1), replace, over(2) */"b%c";
import { rejectAfter } from "../../utils/resolve";
import * as _ from "@marko/runtime-tags/debug/dom";
const $await_content = /* @__PURE__ */_._content_branch("failed", /* over(1) */"b");
const $await = /* @__PURE__ */_._await("#text/0", $await_content);
const $await = /* @__PURE__ */_._await("#text/0", "failed", /* over(1) */"b");
export function $setup($scope) {
$await($scope, rejectAfter(new Error("ERROR!"), 1));
}

View File

@ -1,4 +1,4 @@
// size: 939 (min) 281 (brotli)
// size: 824 (min) 250 (brotli)
const $for_content5__text = _._const(3, ($scope) =>
_._text($scope.a, $scope.d),
),
@ -8,7 +8,6 @@ const $for_content5__text = _._const(3, ($scope) =>
$for_content5__$temp = _._const(2, ($scope) =>
$for_content5__text($scope, $scope.c.text),
),
$for_content5 = _._content_branch(" ", " b", 0, $for_content5__$params),
$for_content4__text = _._const(3, ($scope) => _._text($scope.a, $scope.d)),
$for_content4__$params = _._const(1, ($scope) =>
$for_content4__$temp($scope, $scope.b?.[0]),
@ -16,7 +15,6 @@ const $for_content5__text = _._const(3, ($scope) =>
$for_content4__$temp = _._const(2, ($scope) =>
$for_content4__text($scope, $scope.c.text),
),
$for_content4 = _._content_branch(" ", " b", 0, $for_content4__$params),
$for_content3__text = _._const(3, ($scope) => _._text($scope.a, $scope.d)),
$for_content3__$params = _._const(1, ($scope) =>
$for_content3__$temp($scope, $scope.b?.[0]),
@ -24,7 +22,6 @@ const $for_content5__text = _._const(3, ($scope) =>
$for_content3__$temp = _._const(2, ($scope) =>
$for_content3__text($scope, $scope.c.text),
),
$for_content3 = _._content_branch(" ", " b", 0, $for_content3__$params),
$for_content2__text = _._const(3, ($scope) => _._text($scope.a, $scope.d)),
$for_content2__$params = _._const(1, ($scope) =>
$for_content2__$temp($scope, $scope.b?.[0]),
@ -32,7 +29,6 @@ const $for_content5__text = _._const(3, ($scope) =>
$for_content2__$temp = _._const(2, ($scope) =>
$for_content2__text($scope, $scope.c.text),
),
$for_content2 = _._content_branch(" ", " b", 0, $for_content2__$params),
$for_content__text = _._const(3, ($scope) => _._text($scope.a, $scope.d)),
$for_content__$params = _._const(1, ($scope) =>
$for_content__$temp($scope, $scope.b?.[0]),
@ -40,12 +36,11 @@ const $for_content5__text = _._const(3, ($scope) =>
$for_content__$temp = _._const(2, ($scope) =>
$for_content__text($scope, $scope.c.text),
),
$for_content = _._content_branch(" ", " b", 0, $for_content__$params),
$for = _._for_of(0, $for_content),
$for2 = _._for_of(1, $for_content2),
$for3 = _._for_of(2, $for_content3),
$for4 = _._for_of(3, $for_content4),
$for5 = _._for_of(4, $for_content5),
$for = _._for_of(0, " ", " b", 0, $for_content__$params),
$for2 = _._for_of(1, " ", " b", 0, $for_content2__$params),
$for3 = _._for_of(2, " ", " b", 0, $for_content3__$params),
$for4 = _._for_of(3, " ", " b", 0, $for_content4__$params),
$for5 = _._for_of(4, " ", " b", 0, $for_content5__$params),
$items__script = _._script("a0", ($scope) =>
_._on($scope.f, "click", function () {
$items($scope, [...$scope.g.slice(1), $scope.g?.[0]]);

View File

@ -13,28 +13,23 @@ import * as _ from "@marko/runtime-tags/debug/dom";
const $for_content5__text = /* @__PURE__ */_._const("text", $scope => _._text($scope["#text/0"], $scope.text));
const $for_content5__$params = /* @__PURE__ */_._const("$params6", $scope => $for_content5__$temp($scope, $scope.$params6?.[0]));
const $for_content5__$temp = /* @__PURE__ */_._const("$temp5", $scope => $for_content5__text($scope, $scope.$temp5.text));
const $for_content5 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $for_content5__$params);
const $for_content4__text = /* @__PURE__ */_._const("text", $scope => _._text($scope["#text/0"], $scope.text));
const $for_content4__$params = /* @__PURE__ */_._const("$params5", $scope => $for_content4__$temp($scope, $scope.$params5?.[0]));
const $for_content4__$temp = /* @__PURE__ */_._const("$temp4", $scope => $for_content4__text($scope, $scope.$temp4.text));
const $for_content4 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $for_content4__$params);
const $for_content3__text = /* @__PURE__ */_._const("text", $scope => _._text($scope["#text/0"], $scope.text));
const $for_content3__$params = /* @__PURE__ */_._const("$params4", $scope => $for_content3__$temp($scope, $scope.$params4?.[0]));
const $for_content3__$temp = /* @__PURE__ */_._const("$temp3", $scope => $for_content3__text($scope, $scope.$temp3.text));
const $for_content3 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $for_content3__$params);
const $for_content2__text = /* @__PURE__ */_._const("text", $scope => _._text($scope["#text/0"], $scope.text));
const $for_content2__$params = /* @__PURE__ */_._const("$params3", $scope => $for_content2__$temp($scope, $scope.$params3?.[0]));
const $for_content2__$temp = /* @__PURE__ */_._const("$temp2", $scope => $for_content2__text($scope, $scope.$temp2.text));
const $for_content2 = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $for_content2__$params);
const $for_content__text = /* @__PURE__ */_._const("text", $scope => _._text($scope["#text/0"], $scope.text));
const $for_content__$params = /* @__PURE__ */_._const("$params2", $scope => $for_content__$temp($scope, $scope.$params2?.[0]));
const $for_content__$temp = /* @__PURE__ */_._const("$temp", $scope => $for_content__text($scope, $scope.$temp.text));
const $for_content = /* @__PURE__ */_._content_branch(" ", /* get, over(1) */" b", 0, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#div/0", $for_content);
const $for2 = /* @__PURE__ */_._for_of("#div/1", $for_content2);
const $for3 = /* @__PURE__ */_._for_of("#div/2", $for_content3);
const $for4 = /* @__PURE__ */_._for_of("#div/3", $for_content4);
const $for5 = /* @__PURE__ */_._for_of("#div/4", $for_content5);
const $for = /* @__PURE__ */_._for_of("#div/0", " ", /* get, over(1) */" b", 0, $for_content__$params);
const $for2 = /* @__PURE__ */_._for_of("#div/1", " ", /* get, over(1) */" b", 0, $for_content2__$params);
const $for3 = /* @__PURE__ */_._for_of("#div/2", " ", /* get, over(1) */" b", 0, $for_content3__$params);
const $for4 = /* @__PURE__ */_._for_of("#div/3", " ", /* get, over(1) */" b", 0, $for_content4__$params);
const $for5 = /* @__PURE__ */_._for_of("#div/4", " ", /* get, over(1) */" b", 0, $for_content5__$params);
const $items__script = _._script("__tests__/template.marko_0_items", $scope => _._on($scope["#button/5"], "click", function () {
$items($scope, [...$scope.items.slice(1), $scope.items?.[0]]);
}));

View File

@ -1,4 +1,4 @@
// size: 442 (min) 237 (brotli)
// size: 419 (min) 228 (brotli)
const $for_content__name = _._const(4, ($scope) => _._text($scope.a, $scope.e)),
$for_content__description = _._const(5, ($scope) =>
_._text($scope.b, $scope.f),
@ -10,13 +10,7 @@ const $for_content__name = _._const(4, ($scope) => _._text($scope.a, $scope.e)),
($for_content__name($scope, $scope.d.name),
$for_content__description($scope, $scope.d.description));
}),
$for_content = _._content_branch(
"<div><!>: <!></div>",
"D%c%l",
0,
$for_content__$params,
),
$for = _._for_of(0, $for_content),
$for = _._for_of(0, "<div><!>: <!></div>", "D%c%l", 0, $for_content__$params),
$items__script = _._script("a0", ($scope) => {
(_._on($scope.b, "click", function () {
$items($scope, [

View File

@ -8,8 +8,7 @@ const $for_content__$temp = /* @__PURE__ */_._const("$temp", $scope => {
$for_content__name($scope, $scope.$temp.name);
$for_content__description($scope, $scope.$temp.description);
});
const $for_content = /* @__PURE__ */_._content_branch("<div><!>: <!></div>", /* next(1), replace, over(2), replace, out(1) */"D%c%l", 0, $for_content__$params);
const $for = /* @__PURE__ */_._for_of("#text/0", $for_content);
const $for = /* @__PURE__ */_._for_of("#text/0", "<div><!>: <!></div>", /* next(1), replace, over(2), replace, out(1) */"D%c%l", 0, $for_content__$params);
const $items__script = _._script("__tests__/template.marko_0_items", $scope => {
_._on($scope["#button/1"], "click", function () {
$items($scope, [...$scope.items, {

View File

@ -1,4 +1,4 @@
// size: 273 (min) 189 (brotli)
// size: 250 (min) 177 (brotli)
const $for_content__num__script = _._script("a0", ($scope) =>
_._on($scope.a, "click", function () {
$num($scope._, $scope._.b + 1);
@ -10,13 +10,13 @@ const $for_content__num__script = _._script("a0", ($scope) =>
$for_content__$params = _._const(2, ($scope) =>
$for_content__i($scope, $scope.c[0]),
),
$for_content = _._content_branch(
$for = _._for_to(
0,
"<button> </button>",
" D l",
$for_content__setup,
$for_content__$params,
),
$for = _._for_to(0, $for_content),
$num = _._let(1, ($scope) => {
($for($scope, [$scope.b, 0, 1]), $for_content__num($scope));
});

Some files were not shown because too many files have changed in this diff Show More