ember-source 5.0.0-alpha.7 → 5.0.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build-metadata.json +3 -3
- package/dist/dependencies/@glimmer/destroyable.js +2 -2
- package/dist/dependencies/@glimmer/env.js +1 -1
- package/dist/dependencies/@glimmer/global-context.js +1 -1
- package/dist/dependencies/@glimmer/low-level.js +1 -1
- package/dist/dependencies/@glimmer/manager.js +5 -13
- package/dist/dependencies/@glimmer/node.js +1 -1
- package/dist/dependencies/@glimmer/opcode-compiler.js +38 -38
- package/dist/dependencies/@glimmer/program.js +9 -9
- package/dist/dependencies/@glimmer/reference.js +4 -4
- package/dist/dependencies/@glimmer/runtime.js +41 -41
- package/dist/dependencies/@glimmer/util.js +3 -3
- package/dist/dependencies/@glimmer/validator.js +1 -1
- package/dist/dependencies/@glimmer/vm.js +1 -1
- package/dist/dependencies/@glimmer/wire-format.js +1 -1
- package/dist/dependencies/router_js.js +3 -4
- package/dist/dependencies/rsvp.js +23 -25
- package/dist/ember-template-compiler.js +343 -398
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +4 -4
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +423 -649
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/browser-environment/index.js +1 -1
- package/dist/packages/@ember/-internals/container/index.js +6 -12
- package/dist/packages/@ember/-internals/environment/index.js +1 -1
- package/dist/packages/@ember/-internals/glimmer/index.js +115 -208
- package/dist/packages/@ember/-internals/metal/index.js +106 -226
- package/dist/packages/@ember/-internals/utils/index.js +1 -12
- package/dist/packages/@ember/-internals/views/lib/system/event_dispatcher.js +10 -9
- package/dist/packages/@ember/-internals/views/lib/views/core_view.js +1 -2
- package/dist/packages/@ember/-internals/views/lib/views/states.js +12 -7
- package/dist/packages/@ember/application/index.js +11 -11
- package/dist/packages/@ember/application/instance.js +3 -2
- package/dist/packages/@ember/application/lib/lazy_load.js +2 -4
- package/dist/packages/@ember/array/index.js +3 -6
- package/dist/packages/@ember/debug/lib/deprecate.js +3 -3
- package/dist/packages/@ember/engine/index.js +3 -2
- package/dist/packages/@ember/engine/instance.js +1 -2
- package/dist/packages/@ember/object/index.js +1 -1
- package/dist/packages/@ember/routing/hash-location.js +1 -2
- package/dist/packages/@ember/routing/history-location.js +3 -5
- package/dist/packages/@ember/routing/lib/utils.js +4 -1
- package/dist/packages/@ember/routing/route.js +20 -6
- package/dist/packages/ember/index.js +4 -3
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +4 -4
- package/lib/browsers.js +49 -24
- package/package.json +7 -9
- package/types/preview/@ember/routing/history-location.d.ts +2 -2
- package/CHANGELOG.md +0 -3828
- package/dist/packages/@ember/-internals/runtime/.gitignore +0 -1
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Portions Copyright 2008-2011 Apple Inc. All rights reserved.
|
|
7
7
|
* @license Licensed under MIT license
|
|
8
8
|
* See https://raw.github.com/emberjs/ember.js/master/LICENSE
|
|
9
|
-
* @version 5.0.0-
|
|
9
|
+
* @version 5.0.0-beta.3
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/* eslint-disable no-var */
|
|
@@ -951,17 +951,6 @@ define("@ember/-internals/utils/index", ["exports", "@glimmer/util", "@ember/deb
|
|
|
951
951
|
}
|
|
952
952
|
};
|
|
953
953
|
}
|
|
954
|
-
|
|
955
|
-
/*
|
|
956
|
-
This package will be eagerly parsed and should have no dependencies on external
|
|
957
|
-
packages.
|
|
958
|
-
|
|
959
|
-
It is intended to be used to share utility methods that will be needed
|
|
960
|
-
by every Ember application (and is **not** a dumping ground of useful utilities).
|
|
961
|
-
|
|
962
|
-
Utility methods that are needed in < 80% of cases should be placed
|
|
963
|
-
elsewhere (so they can be lazily evaluated / parsed).
|
|
964
|
-
*/
|
|
965
954
|
});
|
|
966
955
|
define("@ember/canary-features/index", ["exports", "@ember/-internals/environment"], function (_exports, _environment) {
|
|
967
956
|
"use strict";
|
|
@@ -2011,13 +2000,13 @@ define("@ember/debug/lib/deprecate", ["exports", "@ember/-internals/environment"
|
|
|
2011
2000
|
};
|
|
2012
2001
|
var formatMessage = function formatMessage(_message, options) {
|
|
2013
2002
|
var message = _message;
|
|
2014
|
-
if (options
|
|
2003
|
+
if (options != null && options.id) {
|
|
2015
2004
|
message = message + (" [deprecation id: " + options.id + "]");
|
|
2016
2005
|
}
|
|
2017
|
-
if (options
|
|
2006
|
+
if (options != null && options.until) {
|
|
2018
2007
|
message = message + (" This will be removed in " + options.for + " " + options.until + ".");
|
|
2019
2008
|
}
|
|
2020
|
-
if (options
|
|
2009
|
+
if (options != null && options.url) {
|
|
2021
2010
|
message += " See " + options.url + " for more details.";
|
|
2022
2011
|
}
|
|
2023
2012
|
return message;
|
|
@@ -2659,11 +2648,11 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2659
2648
|
}
|
|
2660
2649
|
this.types = nodes;
|
|
2661
2650
|
}
|
|
2662
|
-
match(node
|
|
2663
|
-
if (!this.types.has(node
|
|
2651
|
+
match(node) {
|
|
2652
|
+
if (!this.types.has(node.type)) {
|
|
2664
2653
|
return false;
|
|
2665
2654
|
}
|
|
2666
|
-
var path = getCalleeExpression(node
|
|
2655
|
+
var path = getCalleeExpression(node);
|
|
2667
2656
|
if (path !== null && path.type === 'Path' && path.ref.type === 'Free') {
|
|
2668
2657
|
if (path.tail.length > 0) {
|
|
2669
2658
|
if (path.ref.resolution.serialize() === 'Loose') {
|
|
@@ -2677,15 +2666,15 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2677
2666
|
return false;
|
|
2678
2667
|
}
|
|
2679
2668
|
}
|
|
2680
|
-
translate(node
|
|
2681
|
-
if (this.match(node
|
|
2682
|
-
var path = getCalleeExpression(node
|
|
2669
|
+
translate(node, state) {
|
|
2670
|
+
if (this.match(node)) {
|
|
2671
|
+
var path = getCalleeExpression(node);
|
|
2683
2672
|
if (path !== null && path.type === 'Path' && path.tail.length > 0) {
|
|
2684
|
-
return Err((0, _syntax.generateSyntaxError)("The `" + this.keyword + "` keyword was used incorrectly. It was used as `" + path.loc.asString() + "`, but it cannot be used with additional path segments. \n\nError caused by", node
|
|
2673
|
+
return Err((0, _syntax.generateSyntaxError)("The `" + this.keyword + "` keyword was used incorrectly. It was used as `" + path.loc.asString() + "`, but it cannot be used with additional path segments. \n\nError caused by", node.loc));
|
|
2685
2674
|
}
|
|
2686
|
-
var param = this.delegate.assert(node
|
|
2675
|
+
var param = this.delegate.assert(node, state);
|
|
2687
2676
|
return param.andThen(param => this.delegate.translate({
|
|
2688
|
-
node
|
|
2677
|
+
node,
|
|
2689
2678
|
state
|
|
2690
2679
|
}, param));
|
|
2691
2680
|
} else {
|
|
@@ -2702,18 +2691,18 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2702
2691
|
function keyword(keyword, type, delegate) {
|
|
2703
2692
|
return new KeywordImpl(keyword, type, delegate);
|
|
2704
2693
|
}
|
|
2705
|
-
function getCalleeExpression(node
|
|
2706
|
-
switch (node
|
|
2694
|
+
function getCalleeExpression(node) {
|
|
2695
|
+
switch (node.type) {
|
|
2707
2696
|
// This covers the inside of attributes and expressions, as well as the callee
|
|
2708
2697
|
// of call nodes
|
|
2709
2698
|
case 'Path':
|
|
2710
|
-
return node
|
|
2699
|
+
return node;
|
|
2711
2700
|
case 'AppendContent':
|
|
2712
|
-
return getCalleeExpression(node
|
|
2701
|
+
return getCalleeExpression(node.value);
|
|
2713
2702
|
case 'Call':
|
|
2714
2703
|
case 'InvokeBlock':
|
|
2715
2704
|
case 'ElementModifier':
|
|
2716
|
-
return node
|
|
2705
|
+
return node.callee;
|
|
2717
2706
|
default:
|
|
2718
2707
|
return null;
|
|
2719
2708
|
}
|
|
@@ -2727,14 +2716,14 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2727
2716
|
this._keywords.push(keyword(name, this._type, delegate));
|
|
2728
2717
|
return this;
|
|
2729
2718
|
}
|
|
2730
|
-
translate(node
|
|
2719
|
+
translate(node, state) {
|
|
2731
2720
|
for (var _keyword of this._keywords) {
|
|
2732
|
-
var result = _keyword.translate(node
|
|
2721
|
+
var result = _keyword.translate(node, state);
|
|
2733
2722
|
if (result !== null) {
|
|
2734
2723
|
return result;
|
|
2735
2724
|
}
|
|
2736
2725
|
}
|
|
2737
|
-
var path = getCalleeExpression(node
|
|
2726
|
+
var path = getCalleeExpression(node);
|
|
2738
2727
|
if (path && path.type === 'Path' && path.ref.type === 'Free' && (0, _syntax.isKeyword)(path.ref.name)) {
|
|
2739
2728
|
var {
|
|
2740
2729
|
name
|
|
@@ -2742,7 +2731,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2742
2731
|
var usedType = this._type;
|
|
2743
2732
|
var validTypes = _syntax.KEYWORDS_TYPES[name];
|
|
2744
2733
|
if (validTypes.indexOf(usedType) === -1) {
|
|
2745
|
-
return Err((0, _syntax.generateSyntaxError)("The `" + name + "` keyword was used incorrectly. It was used as " + typesToReadableName[usedType] + ", but its valid usages are:\n\n" + generateTypesMessage(name, validTypes) + "\n\nError caused by", node
|
|
2734
|
+
return Err((0, _syntax.generateSyntaxError)("The `" + name + "` keyword was used incorrectly. It was used as " + typesToReadableName[usedType] + ", but its valid usages are:\n\n" + generateTypesMessage(name, validTypes) + "\n\nError caused by", node.loc));
|
|
2746
2735
|
}
|
|
2747
2736
|
}
|
|
2748
2737
|
return null;
|
|
@@ -2855,14 +2844,14 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2855
2844
|
function keywords(type) {
|
|
2856
2845
|
return new Keywords(type);
|
|
2857
2846
|
}
|
|
2858
|
-
function hasPath(node
|
|
2859
|
-
return node
|
|
2847
|
+
function hasPath(node) {
|
|
2848
|
+
return node.callee.type === 'Path';
|
|
2860
2849
|
}
|
|
2861
|
-
function isHelperInvocation(node
|
|
2862
|
-
if (!hasPath(node
|
|
2850
|
+
function isHelperInvocation(node) {
|
|
2851
|
+
if (!hasPath(node)) {
|
|
2863
2852
|
return false;
|
|
2864
2853
|
}
|
|
2865
|
-
return !node
|
|
2854
|
+
return !node.args.isEmpty();
|
|
2866
2855
|
}
|
|
2867
2856
|
function isSimplePath(path) {
|
|
2868
2857
|
if (path.type === 'Path') {
|
|
@@ -2920,22 +2909,22 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2920
2909
|
}
|
|
2921
2910
|
}
|
|
2922
2911
|
class NormalizeExpressions {
|
|
2923
|
-
visit(node
|
|
2924
|
-
switch (node
|
|
2912
|
+
visit(node, state) {
|
|
2913
|
+
switch (node.type) {
|
|
2925
2914
|
case 'Literal':
|
|
2926
|
-
return Ok(this.Literal(node
|
|
2915
|
+
return Ok(this.Literal(node));
|
|
2927
2916
|
case 'Interpolate':
|
|
2928
|
-
return this.Interpolate(node
|
|
2917
|
+
return this.Interpolate(node, state);
|
|
2929
2918
|
case 'Path':
|
|
2930
|
-
return this.PathExpression(node
|
|
2919
|
+
return this.PathExpression(node);
|
|
2931
2920
|
case 'Call':
|
|
2932
|
-
var translated = CALL_KEYWORDS.translate(node
|
|
2921
|
+
var translated = CALL_KEYWORDS.translate(node, state);
|
|
2933
2922
|
if (translated !== null) {
|
|
2934
2923
|
return translated;
|
|
2935
2924
|
}
|
|
2936
|
-
return this.CallExpression(node
|
|
2925
|
+
return this.CallExpression(node, state);
|
|
2937
2926
|
case 'DeprecatedCall':
|
|
2938
|
-
return this.DeprecaedCallExpression(node
|
|
2927
|
+
return this.DeprecaedCallExpression(node, state);
|
|
2939
2928
|
}
|
|
2940
2929
|
}
|
|
2941
2930
|
visitList(nodes, state) {
|
|
@@ -3062,23 +3051,23 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3062
3051
|
/* Modifier */]: 'modifier'
|
|
3063
3052
|
};
|
|
3064
3053
|
function assertCurryKeyword(curriedType) {
|
|
3065
|
-
return (node
|
|
3054
|
+
return (node, state) => {
|
|
3066
3055
|
var readableType = CurriedTypeToReadableType[curriedType];
|
|
3067
3056
|
var stringsAllowed = curriedType === 0
|
|
3068
3057
|
/* Component */;
|
|
3069
3058
|
|
|
3070
3059
|
var {
|
|
3071
3060
|
args
|
|
3072
|
-
} = node
|
|
3061
|
+
} = node;
|
|
3073
3062
|
var definition = args.nth(0);
|
|
3074
3063
|
if (definition === null) {
|
|
3075
3064
|
return Err((0, _syntax.generateSyntaxError)("(" + readableType + ") requires a " + readableType + " definition or identifier as its first positional parameter, did not receive any parameters.", args.loc));
|
|
3076
3065
|
}
|
|
3077
3066
|
if (definition.type === 'Literal') {
|
|
3078
3067
|
if (stringsAllowed && state.isStrict) {
|
|
3079
|
-
return Err((0, _syntax.generateSyntaxError)("(" + readableType + ") cannot resolve string values in strict mode templates", node
|
|
3068
|
+
return Err((0, _syntax.generateSyntaxError)("(" + readableType + ") cannot resolve string values in strict mode templates", node.loc));
|
|
3080
3069
|
} else if (!stringsAllowed) {
|
|
3081
|
-
return Err((0, _syntax.generateSyntaxError)("(" + readableType + ") cannot resolve string values, you must pass a " + readableType + " definition directly", node
|
|
3070
|
+
return Err((0, _syntax.generateSyntaxError)("(" + readableType + ") cannot resolve string values, you must pass a " + readableType + " definition directly", node.loc));
|
|
3082
3071
|
}
|
|
3083
3072
|
}
|
|
3084
3073
|
args = new _syntax.ASTv2.Args({
|
|
@@ -3098,7 +3087,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3098
3087
|
function translateCurryKeyword(curriedType) {
|
|
3099
3088
|
return (_ref7, _ref8) => {
|
|
3100
3089
|
var {
|
|
3101
|
-
node
|
|
3090
|
+
node,
|
|
3102
3091
|
state
|
|
3103
3092
|
} = _ref7;
|
|
3104
3093
|
var {
|
|
@@ -3110,7 +3099,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3110
3099
|
return Result.all(definitionResult, argsResult).mapOk(_ref9 => {
|
|
3111
3100
|
var [definition, args] = _ref9;
|
|
3112
3101
|
return new Curry({
|
|
3113
|
-
loc: node
|
|
3102
|
+
loc: node.loc,
|
|
3114
3103
|
curriedType,
|
|
3115
3104
|
definition,
|
|
3116
3105
|
args
|
|
@@ -3124,30 +3113,30 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3124
3113
|
translate: translateCurryKeyword(curriedType)
|
|
3125
3114
|
};
|
|
3126
3115
|
}
|
|
3127
|
-
function assertGetDynamicVarKeyword(node
|
|
3128
|
-
var call = node
|
|
3116
|
+
function assertGetDynamicVarKeyword(node) {
|
|
3117
|
+
var call = node.type === 'AppendContent' ? node.value : node;
|
|
3129
3118
|
var named = call.type === 'Call' ? call.args.named : null;
|
|
3130
3119
|
var positionals = call.type === 'Call' ? call.args.positional : null;
|
|
3131
3120
|
if (named && !named.isEmpty()) {
|
|
3132
|
-
return Err((0, _syntax.generateSyntaxError)("(-get-dynamic-vars) does not take any named arguments", node
|
|
3121
|
+
return Err((0, _syntax.generateSyntaxError)("(-get-dynamic-vars) does not take any named arguments", node.loc));
|
|
3133
3122
|
}
|
|
3134
3123
|
var varName = positionals === null || positionals === void 0 ? void 0 : positionals.nth(0);
|
|
3135
3124
|
if (!varName) {
|
|
3136
|
-
return Err((0, _syntax.generateSyntaxError)("(-get-dynamic-vars) requires a var name to get", node
|
|
3125
|
+
return Err((0, _syntax.generateSyntaxError)("(-get-dynamic-vars) requires a var name to get", node.loc));
|
|
3137
3126
|
}
|
|
3138
3127
|
if (positionals && positionals.size > 1) {
|
|
3139
|
-
return Err((0, _syntax.generateSyntaxError)("(-get-dynamic-vars) only receives one positional arg", node
|
|
3128
|
+
return Err((0, _syntax.generateSyntaxError)("(-get-dynamic-vars) only receives one positional arg", node.loc));
|
|
3140
3129
|
}
|
|
3141
3130
|
return Ok(varName);
|
|
3142
3131
|
}
|
|
3143
3132
|
function translateGetDynamicVarKeyword(_ref10, name) {
|
|
3144
3133
|
var {
|
|
3145
|
-
node
|
|
3134
|
+
node,
|
|
3146
3135
|
state
|
|
3147
3136
|
} = _ref10;
|
|
3148
3137
|
return VISIT_EXPRS.visit(name, state).mapOk(name => new GetDynamicVar({
|
|
3149
3138
|
name,
|
|
3150
|
-
loc: node
|
|
3139
|
+
loc: node.loc
|
|
3151
3140
|
}));
|
|
3152
3141
|
}
|
|
3153
3142
|
var getDynamicVarKeyword = {
|
|
@@ -3155,8 +3144,8 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3155
3144
|
translate: translateGetDynamicVarKeyword
|
|
3156
3145
|
};
|
|
3157
3146
|
function assertHasBlockKeyword(type) {
|
|
3158
|
-
return node
|
|
3159
|
-
var call = node
|
|
3147
|
+
return node => {
|
|
3148
|
+
var call = node.type === 'AppendContent' ? node.value : node;
|
|
3160
3149
|
var named = call.type === 'Call' ? call.args.named : null;
|
|
3161
3150
|
var positionals = call.type === 'Call' ? call.args.positional : null;
|
|
3162
3151
|
if (named && !named.isEmpty()) {
|
|
@@ -3179,17 +3168,17 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3179
3168
|
function translateHasBlockKeyword(type) {
|
|
3180
3169
|
return (_ref11, target) => {
|
|
3181
3170
|
var {
|
|
3182
|
-
node
|
|
3171
|
+
node,
|
|
3183
3172
|
state: {
|
|
3184
3173
|
scope
|
|
3185
3174
|
}
|
|
3186
3175
|
} = _ref11;
|
|
3187
3176
|
var block = type === 'has-block' ? new HasBlock({
|
|
3188
|
-
loc: node
|
|
3177
|
+
loc: node.loc,
|
|
3189
3178
|
target,
|
|
3190
3179
|
symbol: scope.allocateBlock(target.chars)
|
|
3191
3180
|
}) : new HasBlockParams({
|
|
3192
|
-
loc: node
|
|
3181
|
+
loc: node.loc,
|
|
3193
3182
|
target,
|
|
3194
3183
|
symbol: scope.allocateBlock(target.chars)
|
|
3195
3184
|
});
|
|
@@ -3206,9 +3195,9 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3206
3195
|
return originalNode => {
|
|
3207
3196
|
var _a;
|
|
3208
3197
|
var inverted = type === 'unless';
|
|
3209
|
-
var node
|
|
3210
|
-
var named = node
|
|
3211
|
-
var positional = node
|
|
3198
|
+
var node = originalNode.type === 'AppendContent' ? originalNode.value : originalNode;
|
|
3199
|
+
var named = node.type === 'Call' ? node.args.named : null;
|
|
3200
|
+
var positional = node.type === 'Call' ? node.args.positional : null;
|
|
3212
3201
|
if (named && !named.isEmpty()) {
|
|
3213
3202
|
return Err((0, _syntax.generateSyntaxError)("(" + type + ") cannot receive named parameters, received " + named.entries.map(e => e.name.chars).join(', '), originalNode.loc));
|
|
3214
3203
|
}
|
|
@@ -3235,7 +3224,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3235
3224
|
var inverted = type === 'unless';
|
|
3236
3225
|
return (_ref12, _ref13) => {
|
|
3237
3226
|
var {
|
|
3238
|
-
node
|
|
3227
|
+
node,
|
|
3239
3228
|
state
|
|
3240
3229
|
} = _ref12;
|
|
3241
3230
|
var {
|
|
@@ -3251,11 +3240,11 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3251
3240
|
if (inverted) {
|
|
3252
3241
|
condition = new Not({
|
|
3253
3242
|
value: condition,
|
|
3254
|
-
loc: node
|
|
3243
|
+
loc: node.loc
|
|
3255
3244
|
});
|
|
3256
3245
|
}
|
|
3257
3246
|
return new IfInline({
|
|
3258
|
-
loc: node
|
|
3247
|
+
loc: node.loc,
|
|
3259
3248
|
condition,
|
|
3260
3249
|
truthy,
|
|
3261
3250
|
falsy
|
|
@@ -3269,26 +3258,26 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3269
3258
|
translate: translateIfUnlessInlineKeyword(type)
|
|
3270
3259
|
};
|
|
3271
3260
|
}
|
|
3272
|
-
function assertLogKeyword(node
|
|
3261
|
+
function assertLogKeyword(node) {
|
|
3273
3262
|
var {
|
|
3274
3263
|
args: {
|
|
3275
3264
|
named,
|
|
3276
3265
|
positional
|
|
3277
3266
|
}
|
|
3278
|
-
} = node
|
|
3267
|
+
} = node;
|
|
3279
3268
|
if (named && !named.isEmpty()) {
|
|
3280
|
-
return Err((0, _syntax.generateSyntaxError)("(log) does not take any named arguments", node
|
|
3269
|
+
return Err((0, _syntax.generateSyntaxError)("(log) does not take any named arguments", node.loc));
|
|
3281
3270
|
}
|
|
3282
3271
|
return Ok(positional);
|
|
3283
3272
|
}
|
|
3284
3273
|
function translateLogKeyword(_ref15, positional) {
|
|
3285
3274
|
var {
|
|
3286
|
-
node
|
|
3275
|
+
node,
|
|
3287
3276
|
state
|
|
3288
3277
|
} = _ref15;
|
|
3289
3278
|
return VISIT_EXPRS.Positional(positional, state).mapOk(positional => new Log({
|
|
3290
3279
|
positional,
|
|
3291
|
-
loc: node
|
|
3280
|
+
loc: node.loc
|
|
3292
3281
|
}));
|
|
3293
3282
|
}
|
|
3294
3283
|
var logKeyword = {
|
|
@@ -3309,25 +3298,25 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3309
3298
|
assert,
|
|
3310
3299
|
translate(_ref17, value) {
|
|
3311
3300
|
var {
|
|
3312
|
-
node
|
|
3301
|
+
node,
|
|
3313
3302
|
state
|
|
3314
3303
|
} = _ref17;
|
|
3315
3304
|
var result = translate({
|
|
3316
|
-
node
|
|
3305
|
+
node,
|
|
3317
3306
|
state
|
|
3318
3307
|
}, value);
|
|
3319
3308
|
return result.mapOk(text => new AppendTextNode({
|
|
3320
3309
|
text,
|
|
3321
|
-
loc: node
|
|
3310
|
+
loc: node.loc
|
|
3322
3311
|
}));
|
|
3323
3312
|
}
|
|
3324
3313
|
};
|
|
3325
3314
|
}
|
|
3326
3315
|
var APPEND_KEYWORDS = keywords('Append').kw('has-block', toAppend(hasBlockKeyword('has-block'))).kw('has-block-params', toAppend(hasBlockKeyword('has-block-params'))).kw('-get-dynamic-var', toAppend(getDynamicVarKeyword)).kw('log', toAppend(logKeyword)).kw('if', toAppend(ifUnlessInlineKeyword('if'))).kw('unless', toAppend(ifUnlessInlineKeyword('unless'))).kw('yield', {
|
|
3327
|
-
assert(node
|
|
3316
|
+
assert(node) {
|
|
3328
3317
|
var {
|
|
3329
3318
|
args
|
|
3330
|
-
} = node
|
|
3319
|
+
} = node;
|
|
3331
3320
|
if (args.named.isEmpty()) {
|
|
3332
3321
|
return Ok({
|
|
3333
3322
|
target: _syntax.SourceSpan.synthetic('default').toSlice(),
|
|
@@ -3350,7 +3339,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3350
3339
|
},
|
|
3351
3340
|
translate(_ref18, _ref19) {
|
|
3352
3341
|
var {
|
|
3353
|
-
node
|
|
3342
|
+
node,
|
|
3354
3343
|
state
|
|
3355
3344
|
} = _ref18;
|
|
3356
3345
|
var {
|
|
@@ -3358,17 +3347,17 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3358
3347
|
positional
|
|
3359
3348
|
} = _ref19;
|
|
3360
3349
|
return VISIT_EXPRS.Positional(positional, state).mapOk(positional => new Yield({
|
|
3361
|
-
loc: node
|
|
3350
|
+
loc: node.loc,
|
|
3362
3351
|
target,
|
|
3363
3352
|
to: state.scope.allocateBlock(target.chars),
|
|
3364
3353
|
positional
|
|
3365
3354
|
}));
|
|
3366
3355
|
}
|
|
3367
3356
|
}).kw('debugger', {
|
|
3368
|
-
assert(node
|
|
3357
|
+
assert(node) {
|
|
3369
3358
|
var {
|
|
3370
3359
|
args
|
|
3371
|
-
} = node
|
|
3360
|
+
} = node;
|
|
3372
3361
|
var {
|
|
3373
3362
|
positional
|
|
3374
3363
|
} = args;
|
|
@@ -3376,22 +3365,22 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3376
3365
|
return Ok(undefined);
|
|
3377
3366
|
} else {
|
|
3378
3367
|
if (positional.isEmpty()) {
|
|
3379
|
-
return Err((0, _syntax.generateSyntaxError)("debugger does not take any named arguments", node
|
|
3368
|
+
return Err((0, _syntax.generateSyntaxError)("debugger does not take any named arguments", node.loc));
|
|
3380
3369
|
} else {
|
|
3381
|
-
return Err((0, _syntax.generateSyntaxError)("debugger does not take any positional arguments", node
|
|
3370
|
+
return Err((0, _syntax.generateSyntaxError)("debugger does not take any positional arguments", node.loc));
|
|
3382
3371
|
}
|
|
3383
3372
|
}
|
|
3384
3373
|
},
|
|
3385
3374
|
translate(_ref20) {
|
|
3386
3375
|
var {
|
|
3387
|
-
node
|
|
3376
|
+
node,
|
|
3388
3377
|
state: {
|
|
3389
3378
|
scope
|
|
3390
3379
|
}
|
|
3391
3380
|
} = _ref20;
|
|
3392
3381
|
scope.setHasEval();
|
|
3393
3382
|
return Ok(new Debugger({
|
|
3394
|
-
loc: node
|
|
3383
|
+
loc: node.loc,
|
|
3395
3384
|
scope
|
|
3396
3385
|
}));
|
|
3397
3386
|
}
|
|
@@ -3401,7 +3390,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3401
3390
|
|
|
3402
3391
|
translate(_ref21, _ref22) {
|
|
3403
3392
|
var {
|
|
3404
|
-
node
|
|
3393
|
+
node,
|
|
3405
3394
|
state
|
|
3406
3395
|
} = _ref21;
|
|
3407
3396
|
var {
|
|
@@ -3413,7 +3402,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3413
3402
|
return Result.all(definitionResult, argsResult).mapOk(_ref23 => {
|
|
3414
3403
|
var [definition, args] = _ref23;
|
|
3415
3404
|
return new InvokeComponent({
|
|
3416
|
-
loc: node
|
|
3405
|
+
loc: node.loc,
|
|
3417
3406
|
definition,
|
|
3418
3407
|
args,
|
|
3419
3408
|
blocks: null
|
|
@@ -3426,7 +3415,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3426
3415
|
|
|
3427
3416
|
translate(_ref24, _ref25) {
|
|
3428
3417
|
var {
|
|
3429
|
-
node
|
|
3418
|
+
node,
|
|
3430
3419
|
state
|
|
3431
3420
|
} = _ref24;
|
|
3432
3421
|
var {
|
|
@@ -3440,20 +3429,20 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3440
3429
|
var text = new CallExpression({
|
|
3441
3430
|
callee: definition,
|
|
3442
3431
|
args,
|
|
3443
|
-
loc: node
|
|
3432
|
+
loc: node.loc
|
|
3444
3433
|
});
|
|
3445
3434
|
return new AppendTextNode({
|
|
3446
|
-
loc: node
|
|
3435
|
+
loc: node.loc,
|
|
3447
3436
|
text
|
|
3448
3437
|
});
|
|
3449
3438
|
});
|
|
3450
3439
|
}
|
|
3451
3440
|
});
|
|
3452
3441
|
var BLOCK_KEYWORDS = keywords('Block').kw('in-element', {
|
|
3453
|
-
assert(node
|
|
3442
|
+
assert(node) {
|
|
3454
3443
|
var {
|
|
3455
3444
|
args
|
|
3456
|
-
} = node
|
|
3445
|
+
} = node;
|
|
3457
3446
|
var guid = args.get('guid');
|
|
3458
3447
|
if (guid) {
|
|
3459
3448
|
return Err((0, _syntax.generateSyntaxError)("Cannot pass `guid` to `{{#in-element}}`", guid.loc));
|
|
@@ -3471,14 +3460,14 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3471
3460
|
},
|
|
3472
3461
|
translate(_ref27, _ref28) {
|
|
3473
3462
|
var {
|
|
3474
|
-
node
|
|
3463
|
+
node,
|
|
3475
3464
|
state
|
|
3476
3465
|
} = _ref27;
|
|
3477
3466
|
var {
|
|
3478
3467
|
insertBefore,
|
|
3479
3468
|
destination
|
|
3480
3469
|
} = _ref28;
|
|
3481
|
-
var named = node
|
|
3470
|
+
var named = node.blocks.get('default');
|
|
3482
3471
|
var body = VISIT_STMTS.NamedBlock(named, state);
|
|
3483
3472
|
var destinationResult = VISIT_EXPRS.visit(destination, state);
|
|
3484
3473
|
return Result.all(body, destinationResult).andThen(_ref29 => {
|
|
@@ -3494,7 +3483,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3494
3483
|
body,
|
|
3495
3484
|
destination,
|
|
3496
3485
|
insertBefore: new Missing({
|
|
3497
|
-
loc: node
|
|
3486
|
+
loc: node.callee.loc.collapse('end')
|
|
3498
3487
|
})
|
|
3499
3488
|
});
|
|
3500
3489
|
}
|
|
@@ -3505,7 +3494,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3505
3494
|
insertBefore
|
|
3506
3495
|
} = _ref30;
|
|
3507
3496
|
return new InElement({
|
|
3508
|
-
loc: node
|
|
3497
|
+
loc: node.loc,
|
|
3509
3498
|
block: body,
|
|
3510
3499
|
insertBefore,
|
|
3511
3500
|
guid: state.generateUniqueCursor(),
|
|
@@ -3514,19 +3503,19 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3514
3503
|
});
|
|
3515
3504
|
}
|
|
3516
3505
|
}).kw('if', {
|
|
3517
|
-
assert(node
|
|
3506
|
+
assert(node) {
|
|
3518
3507
|
var {
|
|
3519
3508
|
args
|
|
3520
|
-
} = node
|
|
3509
|
+
} = node;
|
|
3521
3510
|
if (!args.named.isEmpty()) {
|
|
3522
|
-
return Err((0, _syntax.generateSyntaxError)("{{#if}} cannot receive named parameters, received " + args.named.entries.map(e => e.name.chars).join(', '), node
|
|
3511
|
+
return Err((0, _syntax.generateSyntaxError)("{{#if}} cannot receive named parameters, received " + args.named.entries.map(e => e.name.chars).join(', '), node.loc));
|
|
3523
3512
|
}
|
|
3524
3513
|
if (args.positional.size > 1) {
|
|
3525
|
-
return Err((0, _syntax.generateSyntaxError)("{{#if}} can only receive one positional parameter in block form, the conditional value. Received " + args.positional.size + " parameters", node
|
|
3514
|
+
return Err((0, _syntax.generateSyntaxError)("{{#if}} can only receive one positional parameter in block form, the conditional value. Received " + args.positional.size + " parameters", node.loc));
|
|
3526
3515
|
}
|
|
3527
3516
|
var condition = args.nth(0);
|
|
3528
3517
|
if (condition === null) {
|
|
3529
|
-
return Err((0, _syntax.generateSyntaxError)("{{#if}} requires a condition as its first positional parameter, did not receive any parameters", node
|
|
3518
|
+
return Err((0, _syntax.generateSyntaxError)("{{#if}} requires a condition as its first positional parameter, did not receive any parameters", node.loc));
|
|
3530
3519
|
}
|
|
3531
3520
|
return Ok({
|
|
3532
3521
|
condition
|
|
@@ -3534,21 +3523,21 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3534
3523
|
},
|
|
3535
3524
|
translate(_ref31, _ref32) {
|
|
3536
3525
|
var {
|
|
3537
|
-
node
|
|
3526
|
+
node,
|
|
3538
3527
|
state
|
|
3539
3528
|
} = _ref31;
|
|
3540
3529
|
var {
|
|
3541
3530
|
condition
|
|
3542
3531
|
} = _ref32;
|
|
3543
|
-
var block = node
|
|
3544
|
-
var inverse = node
|
|
3532
|
+
var block = node.blocks.get('default');
|
|
3533
|
+
var inverse = node.blocks.get('else');
|
|
3545
3534
|
var conditionResult = VISIT_EXPRS.visit(condition, state);
|
|
3546
3535
|
var blockResult = VISIT_STMTS.NamedBlock(block, state);
|
|
3547
3536
|
var inverseResult = inverse ? VISIT_STMTS.NamedBlock(inverse, state) : Ok(null);
|
|
3548
3537
|
return Result.all(conditionResult, blockResult, inverseResult).mapOk(_ref33 => {
|
|
3549
3538
|
var [condition, block, inverse] = _ref33;
|
|
3550
3539
|
return new If({
|
|
3551
|
-
loc: node
|
|
3540
|
+
loc: node.loc,
|
|
3552
3541
|
condition,
|
|
3553
3542
|
block,
|
|
3554
3543
|
inverse
|
|
@@ -3556,19 +3545,19 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3556
3545
|
});
|
|
3557
3546
|
}
|
|
3558
3547
|
}).kw('unless', {
|
|
3559
|
-
assert(node
|
|
3548
|
+
assert(node) {
|
|
3560
3549
|
var {
|
|
3561
3550
|
args
|
|
3562
|
-
} = node
|
|
3551
|
+
} = node;
|
|
3563
3552
|
if (!args.named.isEmpty()) {
|
|
3564
|
-
return Err((0, _syntax.generateSyntaxError)("{{#unless}} cannot receive named parameters, received " + args.named.entries.map(e => e.name.chars).join(', '), node
|
|
3553
|
+
return Err((0, _syntax.generateSyntaxError)("{{#unless}} cannot receive named parameters, received " + args.named.entries.map(e => e.name.chars).join(', '), node.loc));
|
|
3565
3554
|
}
|
|
3566
3555
|
if (args.positional.size > 1) {
|
|
3567
|
-
return Err((0, _syntax.generateSyntaxError)("{{#unless}} can only receive one positional parameter in block form, the conditional value. Received " + args.positional.size + " parameters", node
|
|
3556
|
+
return Err((0, _syntax.generateSyntaxError)("{{#unless}} can only receive one positional parameter in block form, the conditional value. Received " + args.positional.size + " parameters", node.loc));
|
|
3568
3557
|
}
|
|
3569
3558
|
var condition = args.nth(0);
|
|
3570
3559
|
if (condition === null) {
|
|
3571
|
-
return Err((0, _syntax.generateSyntaxError)("{{#unless}} requires a condition as its first positional parameter, did not receive any parameters", node
|
|
3560
|
+
return Err((0, _syntax.generateSyntaxError)("{{#unless}} requires a condition as its first positional parameter, did not receive any parameters", node.loc));
|
|
3572
3561
|
}
|
|
3573
3562
|
return Ok({
|
|
3574
3563
|
condition
|
|
@@ -3576,24 +3565,24 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3576
3565
|
},
|
|
3577
3566
|
translate(_ref34, _ref35) {
|
|
3578
3567
|
var {
|
|
3579
|
-
node
|
|
3568
|
+
node,
|
|
3580
3569
|
state
|
|
3581
3570
|
} = _ref34;
|
|
3582
3571
|
var {
|
|
3583
3572
|
condition
|
|
3584
3573
|
} = _ref35;
|
|
3585
|
-
var block = node
|
|
3586
|
-
var inverse = node
|
|
3574
|
+
var block = node.blocks.get('default');
|
|
3575
|
+
var inverse = node.blocks.get('else');
|
|
3587
3576
|
var conditionResult = VISIT_EXPRS.visit(condition, state);
|
|
3588
3577
|
var blockResult = VISIT_STMTS.NamedBlock(block, state);
|
|
3589
3578
|
var inverseResult = inverse ? VISIT_STMTS.NamedBlock(inverse, state) : Ok(null);
|
|
3590
3579
|
return Result.all(conditionResult, blockResult, inverseResult).mapOk(_ref36 => {
|
|
3591
3580
|
var [condition, block, inverse] = _ref36;
|
|
3592
3581
|
return new If({
|
|
3593
|
-
loc: node
|
|
3582
|
+
loc: node.loc,
|
|
3594
3583
|
condition: new Not({
|
|
3595
3584
|
value: condition,
|
|
3596
|
-
loc: node
|
|
3585
|
+
loc: node.loc
|
|
3597
3586
|
}),
|
|
3598
3587
|
block,
|
|
3599
3588
|
inverse
|
|
@@ -3601,10 +3590,10 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3601
3590
|
});
|
|
3602
3591
|
}
|
|
3603
3592
|
}).kw('each', {
|
|
3604
|
-
assert(node
|
|
3593
|
+
assert(node) {
|
|
3605
3594
|
var {
|
|
3606
3595
|
args
|
|
3607
|
-
} = node
|
|
3596
|
+
} = node;
|
|
3608
3597
|
if (!args.named.entries.every(e => e.name.chars === 'key')) {
|
|
3609
3598
|
return Err((0, _syntax.generateSyntaxError)("{{#each}} can only receive the 'key' named parameter, received " + args.named.entries.filter(e => e.name.chars !== 'key').map(e => e.name.chars).join(', '), args.named.loc));
|
|
3610
3599
|
}
|
|
@@ -3623,15 +3612,15 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3623
3612
|
},
|
|
3624
3613
|
translate(_ref37, _ref38) {
|
|
3625
3614
|
var {
|
|
3626
|
-
node
|
|
3615
|
+
node,
|
|
3627
3616
|
state
|
|
3628
3617
|
} = _ref37;
|
|
3629
3618
|
var {
|
|
3630
3619
|
value,
|
|
3631
3620
|
key
|
|
3632
3621
|
} = _ref38;
|
|
3633
|
-
var block = node
|
|
3634
|
-
var inverse = node
|
|
3622
|
+
var block = node.blocks.get('default');
|
|
3623
|
+
var inverse = node.blocks.get('else');
|
|
3635
3624
|
var valueResult = VISIT_EXPRS.visit(value, state);
|
|
3636
3625
|
var keyResult = key ? VISIT_EXPRS.visit(key, state) : Ok(null);
|
|
3637
3626
|
var blockResult = VISIT_STMTS.NamedBlock(block, state);
|
|
@@ -3639,7 +3628,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3639
3628
|
return Result.all(valueResult, keyResult, blockResult, inverseResult).mapOk(_ref39 => {
|
|
3640
3629
|
var [value, key, block, inverse] = _ref39;
|
|
3641
3630
|
return new Each({
|
|
3642
|
-
loc: node
|
|
3631
|
+
loc: node.loc,
|
|
3643
3632
|
value,
|
|
3644
3633
|
key,
|
|
3645
3634
|
block,
|
|
@@ -3648,10 +3637,10 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3648
3637
|
});
|
|
3649
3638
|
}
|
|
3650
3639
|
}).kw('with', {
|
|
3651
|
-
assert(node
|
|
3640
|
+
assert(node) {
|
|
3652
3641
|
var {
|
|
3653
3642
|
args
|
|
3654
|
-
} = node
|
|
3643
|
+
} = node;
|
|
3655
3644
|
if (!args.named.isEmpty()) {
|
|
3656
3645
|
return Err((0, _syntax.generateSyntaxError)("{{#with}} cannot receive named parameters, received " + args.named.entries.map(e => e.name.chars).join(', '), args.named.loc));
|
|
3657
3646
|
}
|
|
@@ -3668,21 +3657,21 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3668
3657
|
},
|
|
3669
3658
|
translate(_ref40, _ref41) {
|
|
3670
3659
|
var {
|
|
3671
|
-
node
|
|
3660
|
+
node,
|
|
3672
3661
|
state
|
|
3673
3662
|
} = _ref40;
|
|
3674
3663
|
var {
|
|
3675
3664
|
value
|
|
3676
3665
|
} = _ref41;
|
|
3677
|
-
var block = node
|
|
3678
|
-
var inverse = node
|
|
3666
|
+
var block = node.blocks.get('default');
|
|
3667
|
+
var inverse = node.blocks.get('else');
|
|
3679
3668
|
var valueResult = VISIT_EXPRS.visit(value, state);
|
|
3680
3669
|
var blockResult = VISIT_STMTS.NamedBlock(block, state);
|
|
3681
3670
|
var inverseResult = inverse ? VISIT_STMTS.NamedBlock(inverse, state) : Ok(null);
|
|
3682
3671
|
return Result.all(valueResult, blockResult, inverseResult).mapOk(_ref42 => {
|
|
3683
3672
|
var [value, block, inverse] = _ref42;
|
|
3684
3673
|
return new With({
|
|
3685
|
-
loc: node
|
|
3674
|
+
loc: node.loc,
|
|
3686
3675
|
value,
|
|
3687
3676
|
block,
|
|
3688
3677
|
inverse
|
|
@@ -3690,17 +3679,17 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3690
3679
|
});
|
|
3691
3680
|
}
|
|
3692
3681
|
}).kw('let', {
|
|
3693
|
-
assert(node
|
|
3682
|
+
assert(node) {
|
|
3694
3683
|
var {
|
|
3695
3684
|
args
|
|
3696
|
-
} = node
|
|
3685
|
+
} = node;
|
|
3697
3686
|
if (!args.named.isEmpty()) {
|
|
3698
3687
|
return Err((0, _syntax.generateSyntaxError)("{{#let}} cannot receive named parameters, received " + args.named.entries.map(e => e.name.chars).join(', '), args.named.loc));
|
|
3699
3688
|
}
|
|
3700
3689
|
if (args.positional.size === 0) {
|
|
3701
3690
|
return Err((0, _syntax.generateSyntaxError)("{{#let}} requires at least one value as its first positional parameter, did not receive any parameters", args.positional.loc));
|
|
3702
3691
|
}
|
|
3703
|
-
if (node
|
|
3692
|
+
if (node.blocks.get('else')) {
|
|
3704
3693
|
return Err((0, _syntax.generateSyntaxError)("{{#let}} cannot receive an {{else}} block", args.positional.loc));
|
|
3705
3694
|
}
|
|
3706
3695
|
return Ok({
|
|
@@ -3709,45 +3698,45 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3709
3698
|
},
|
|
3710
3699
|
translate(_ref43, _ref44) {
|
|
3711
3700
|
var {
|
|
3712
|
-
node
|
|
3701
|
+
node,
|
|
3713
3702
|
state
|
|
3714
3703
|
} = _ref43;
|
|
3715
3704
|
var {
|
|
3716
3705
|
positional
|
|
3717
3706
|
} = _ref44;
|
|
3718
|
-
var block = node
|
|
3707
|
+
var block = node.blocks.get('default');
|
|
3719
3708
|
var positionalResult = VISIT_EXPRS.Positional(positional, state);
|
|
3720
3709
|
var blockResult = VISIT_STMTS.NamedBlock(block, state);
|
|
3721
3710
|
return Result.all(positionalResult, blockResult).mapOk(_ref45 => {
|
|
3722
3711
|
var [positional, block] = _ref45;
|
|
3723
3712
|
return new Let({
|
|
3724
|
-
loc: node
|
|
3713
|
+
loc: node.loc,
|
|
3725
3714
|
positional,
|
|
3726
3715
|
block
|
|
3727
3716
|
});
|
|
3728
3717
|
});
|
|
3729
3718
|
}
|
|
3730
3719
|
}).kw('-with-dynamic-vars', {
|
|
3731
|
-
assert(node
|
|
3720
|
+
assert(node) {
|
|
3732
3721
|
return Ok({
|
|
3733
|
-
named: node
|
|
3722
|
+
named: node.args.named
|
|
3734
3723
|
});
|
|
3735
3724
|
},
|
|
3736
3725
|
translate(_ref46, _ref47) {
|
|
3737
3726
|
var {
|
|
3738
|
-
node
|
|
3727
|
+
node,
|
|
3739
3728
|
state
|
|
3740
3729
|
} = _ref46;
|
|
3741
3730
|
var {
|
|
3742
3731
|
named
|
|
3743
3732
|
} = _ref47;
|
|
3744
|
-
var block = node
|
|
3733
|
+
var block = node.blocks.get('default');
|
|
3745
3734
|
var namedResult = VISIT_EXPRS.NamedArguments(named, state);
|
|
3746
3735
|
var blockResult = VISIT_STMTS.NamedBlock(block, state);
|
|
3747
3736
|
return Result.all(namedResult, blockResult).mapOk(_ref48 => {
|
|
3748
3737
|
var [named, block] = _ref48;
|
|
3749
3738
|
return new WithDynamicVars({
|
|
3750
|
-
loc: node
|
|
3739
|
+
loc: node.loc,
|
|
3751
3740
|
named,
|
|
3752
3741
|
block
|
|
3753
3742
|
});
|
|
@@ -3759,7 +3748,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3759
3748
|
|
|
3760
3749
|
translate(_ref49, _ref50) {
|
|
3761
3750
|
var {
|
|
3762
|
-
node
|
|
3751
|
+
node,
|
|
3763
3752
|
state
|
|
3764
3753
|
} = _ref49;
|
|
3765
3754
|
var {
|
|
@@ -3768,11 +3757,11 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3768
3757
|
} = _ref50;
|
|
3769
3758
|
var definitionResult = VISIT_EXPRS.visit(definition, state);
|
|
3770
3759
|
var argsResult = VISIT_EXPRS.Args(args, state);
|
|
3771
|
-
var blocksResult = VISIT_STMTS.NamedBlocks(node
|
|
3760
|
+
var blocksResult = VISIT_STMTS.NamedBlocks(node.blocks, state);
|
|
3772
3761
|
return Result.all(definitionResult, argsResult, blocksResult).mapOk(_ref51 => {
|
|
3773
3762
|
var [definition, args, blocks] = _ref51;
|
|
3774
3763
|
return new InvokeComponent({
|
|
3775
|
-
loc: node
|
|
3764
|
+
loc: node.loc,
|
|
3776
3765
|
definition,
|
|
3777
3766
|
args,
|
|
3778
3767
|
blocks
|
|
@@ -4068,35 +4057,35 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4068
4057
|
visitList(nodes, state) {
|
|
4069
4058
|
return new ResultArray(nodes.map(e => VISIT_STMTS.visit(e, state))).toOptionalList().mapOk(list => list.filter(s => s !== null));
|
|
4070
4059
|
}
|
|
4071
|
-
visit(node
|
|
4072
|
-
switch (node
|
|
4060
|
+
visit(node, state) {
|
|
4061
|
+
switch (node.type) {
|
|
4073
4062
|
case 'GlimmerComment':
|
|
4074
4063
|
return Ok(null);
|
|
4075
4064
|
case 'AppendContent':
|
|
4076
|
-
return this.AppendContent(node
|
|
4065
|
+
return this.AppendContent(node, state);
|
|
4077
4066
|
case 'HtmlText':
|
|
4078
|
-
return Ok(this.TextNode(node
|
|
4067
|
+
return Ok(this.TextNode(node));
|
|
4079
4068
|
case 'HtmlComment':
|
|
4080
|
-
return Ok(this.HtmlComment(node
|
|
4069
|
+
return Ok(this.HtmlComment(node));
|
|
4081
4070
|
case 'InvokeBlock':
|
|
4082
|
-
return this.InvokeBlock(node
|
|
4071
|
+
return this.InvokeBlock(node, state);
|
|
4083
4072
|
case 'InvokeComponent':
|
|
4084
|
-
return this.Component(node
|
|
4073
|
+
return this.Component(node, state);
|
|
4085
4074
|
case 'SimpleElement':
|
|
4086
|
-
return this.SimpleElement(node
|
|
4075
|
+
return this.SimpleElement(node, state);
|
|
4087
4076
|
}
|
|
4088
4077
|
}
|
|
4089
|
-
InvokeBlock(node
|
|
4090
|
-
var translated = BLOCK_KEYWORDS.translate(node
|
|
4078
|
+
InvokeBlock(node, state) {
|
|
4079
|
+
var translated = BLOCK_KEYWORDS.translate(node, state);
|
|
4091
4080
|
if (translated !== null) {
|
|
4092
4081
|
return translated;
|
|
4093
4082
|
}
|
|
4094
|
-
var head = VISIT_EXPRS.visit(node
|
|
4095
|
-
var args = VISIT_EXPRS.Args(node
|
|
4083
|
+
var head = VISIT_EXPRS.visit(node.callee, state);
|
|
4084
|
+
var args = VISIT_EXPRS.Args(node.args, state);
|
|
4096
4085
|
return Result.all(head, args).andThen(_ref59 => {
|
|
4097
4086
|
var [head, args] = _ref59;
|
|
4098
|
-
return this.NamedBlocks(node
|
|
4099
|
-
loc: node
|
|
4087
|
+
return this.NamedBlocks(node.blocks, state).mapOk(blocks => new InvokeBlock({
|
|
4088
|
+
loc: node.loc,
|
|
4100
4089
|
head,
|
|
4101
4090
|
args,
|
|
4102
4091
|
blocks
|
|
@@ -4231,7 +4220,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4231
4220
|
* ```
|
|
4232
4221
|
*/
|
|
4233
4222
|
|
|
4234
|
-
function normalize
|
|
4223
|
+
function normalize(source, root, isStrict) {
|
|
4235
4224
|
// create a new context for the normalization pass
|
|
4236
4225
|
var state = new NormalizationState(root.table, isStrict);
|
|
4237
4226
|
var body = VISIT_STMTS.visitList(root.body, state);
|
|
@@ -4619,15 +4608,15 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4619
4608
|
var list = pairs.toArray();
|
|
4620
4609
|
if ((0, _util.isPresent)(list)) {
|
|
4621
4610
|
var names = [];
|
|
4622
|
-
var
|
|
4611
|
+
var _values = [];
|
|
4623
4612
|
for (var pair of list) {
|
|
4624
4613
|
var [name, value] = EXPR.NamedArgument(pair);
|
|
4625
4614
|
names.push(name);
|
|
4626
|
-
|
|
4615
|
+
_values.push(value);
|
|
4627
4616
|
}
|
|
4628
4617
|
(0, _util.assertPresent)(names);
|
|
4629
|
-
(0, _util.assertPresent)(
|
|
4630
|
-
return [names,
|
|
4618
|
+
(0, _util.assertPresent)(_values);
|
|
4619
|
+
return [names, _values];
|
|
4631
4620
|
} else {
|
|
4632
4621
|
return null;
|
|
4633
4622
|
}
|
|
@@ -5013,7 +5002,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
5013
5002
|
var _a, _b;
|
|
5014
5003
|
var source = new _syntax.Source(string, (_a = options.meta) === null || _a === void 0 ? void 0 : _a.moduleName);
|
|
5015
5004
|
var [ast, locals] = (0, _syntax.normalize)(source, options);
|
|
5016
|
-
var block = normalize
|
|
5005
|
+
var block = normalize(source, ast, (_b = options.strictMode) !== null && _b !== void 0 ? _b : false).mapOk(pass2In => {
|
|
5017
5006
|
return visit(pass2In);
|
|
5018
5007
|
});
|
|
5019
5008
|
if (block.isOk) {
|
|
@@ -5429,9 +5418,9 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
5429
5418
|
blockParams
|
|
5430
5419
|
};
|
|
5431
5420
|
}
|
|
5432
|
-
function entries(dict
|
|
5433
|
-
Object.keys(dict
|
|
5434
|
-
var value = dict
|
|
5421
|
+
function entries(dict, callback) {
|
|
5422
|
+
Object.keys(dict).forEach(key => {
|
|
5423
|
+
var value = dict[key];
|
|
5435
5424
|
callback(key, value);
|
|
5436
5425
|
});
|
|
5437
5426
|
}
|
|
@@ -6020,8 +6009,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6020
6009
|
|
|
6021
6010
|
if (Array.isArray(block)) {
|
|
6022
6011
|
block.forEach(s => out.push(...buildStatement(s, symbols)));
|
|
6023
|
-
} else if (block === null) {
|
|
6024
|
-
} else {
|
|
6012
|
+
} else if (block === null) ;else {
|
|
6025
6013
|
throw (0, _util.assertNever)(block);
|
|
6026
6014
|
}
|
|
6027
6015
|
out.push([13
|
|
@@ -6038,7 +6026,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6038
6026
|
function buildElementParams(attrs, symbols) {
|
|
6039
6027
|
var params = [];
|
|
6040
6028
|
var keys = [];
|
|
6041
|
-
var values
|
|
6029
|
+
var values = [];
|
|
6042
6030
|
Object.keys(attrs).forEach(key => {
|
|
6043
6031
|
var value = attrs[key];
|
|
6044
6032
|
if (value === "Splat"
|
|
@@ -6047,7 +6035,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6047
6035
|
/* AttrSplat */, symbols.block('&attrs')]);
|
|
6048
6036
|
} else if (key[0] === '@') {
|
|
6049
6037
|
keys.push(key);
|
|
6050
|
-
values
|
|
6038
|
+
values.push(buildExpression(value, 'Strict', symbols));
|
|
6051
6039
|
} else {
|
|
6052
6040
|
params.push(...buildAttributeValue(key, value,
|
|
6053
6041
|
// TODO: extract namespace from key
|
|
@@ -6056,7 +6044,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6056
6044
|
});
|
|
6057
6045
|
return {
|
|
6058
6046
|
params,
|
|
6059
|
-
args: (0, _util.isPresent)(keys) && (0, _util.isPresent)(values
|
|
6047
|
+
args: (0, _util.isPresent)(keys) && (0, _util.isPresent)(values) ? [keys, values] : null
|
|
6060
6048
|
};
|
|
6061
6049
|
}
|
|
6062
6050
|
function extractNamespace(name) {
|
|
@@ -6317,17 +6305,17 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6317
6305
|
}
|
|
6318
6306
|
function buildBlocks(blocks, blockParams, parent) {
|
|
6319
6307
|
var keys = [];
|
|
6320
|
-
var values
|
|
6308
|
+
var values = [];
|
|
6321
6309
|
Object.keys(blocks).forEach(name => {
|
|
6322
6310
|
keys.push(name);
|
|
6323
6311
|
if (name === 'default') {
|
|
6324
6312
|
var symbols = parent.child(blockParams || []);
|
|
6325
|
-
values
|
|
6313
|
+
values.push(buildBlock(blocks[name], symbols, symbols.paramSymbols));
|
|
6326
6314
|
} else {
|
|
6327
|
-
values
|
|
6315
|
+
values.push(buildBlock(blocks[name], parent, []));
|
|
6328
6316
|
}
|
|
6329
6317
|
});
|
|
6330
|
-
return [keys, values
|
|
6318
|
+
return [keys, values];
|
|
6331
6319
|
}
|
|
6332
6320
|
function buildBlock(block, symbols, locals) {
|
|
6333
6321
|
if (locals === void 0) {
|
|
@@ -6348,7 +6336,7 @@ define("@glimmer/env", ["exports"], function (_exports) {
|
|
|
6348
6336
|
var CI = false;
|
|
6349
6337
|
_exports.CI = CI;
|
|
6350
6338
|
});
|
|
6351
|
-
define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer"
|
|
6339
|
+
define("@glimmer/syntax", ["exports", "@glimmer/util", "@handlebars/parser", "simple-html-tokenizer"], function (_exports, _util, _parser, _simpleHtmlTokenizer) {
|
|
6352
6340
|
"use strict";
|
|
6353
6341
|
|
|
6354
6342
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -7853,7 +7841,9 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7853
7841
|
return buildLiteral(type, value, loc);
|
|
7854
7842
|
};
|
|
7855
7843
|
}
|
|
7856
|
-
var api = /*#__PURE__*/Object.freeze({
|
|
7844
|
+
var api = /*#__PURE__*/Object.freeze({
|
|
7845
|
+
__proto__: null
|
|
7846
|
+
});
|
|
7857
7847
|
|
|
7858
7848
|
/**
|
|
7859
7849
|
* A free variable is resolved according to a resolution rule:
|
|
@@ -7869,7 +7859,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7869
7859
|
* 1. in a strict mode template
|
|
7870
7860
|
* 2. in an unambiguous invocation with dot paths
|
|
7871
7861
|
*/
|
|
7872
|
-
_exports.
|
|
7862
|
+
_exports.ASTv1 = _exports.AST = api;
|
|
7873
7863
|
class StrictResolution {
|
|
7874
7864
|
constructor() {
|
|
7875
7865
|
this.isAngleBracket = false;
|
|
@@ -8398,14 +8388,14 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8398
8388
|
* Returns true if an input {@see ExpressionNode} is a literal.
|
|
8399
8389
|
*/
|
|
8400
8390
|
|
|
8401
|
-
function isLiteral(node
|
|
8402
|
-
if (node
|
|
8391
|
+
function isLiteral(node, kind) {
|
|
8392
|
+
if (node.type === 'Literal') {
|
|
8403
8393
|
if (kind === undefined) {
|
|
8404
8394
|
return true;
|
|
8405
8395
|
} else if (kind === 'null') {
|
|
8406
|
-
return node
|
|
8396
|
+
return node.value === null;
|
|
8407
8397
|
} else {
|
|
8408
|
-
return typeof node
|
|
8398
|
+
return typeof node.value === kind;
|
|
8409
8399
|
}
|
|
8410
8400
|
} else {
|
|
8411
8401
|
return false;
|
|
@@ -8525,6 +8515,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8525
8515
|
}
|
|
8526
8516
|
}
|
|
8527
8517
|
var api$1 = /*#__PURE__*/Object.freeze({
|
|
8518
|
+
__proto__: null,
|
|
8528
8519
|
StrictResolution: StrictResolution,
|
|
8529
8520
|
STRICT_RESOLUTION: STRICT_RESOLUTION,
|
|
8530
8521
|
LooseModeResolution: LooseModeResolution,
|
|
@@ -9378,7 +9369,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9378
9369
|
}
|
|
9379
9370
|
}
|
|
9380
9371
|
}
|
|
9381
|
-
_exports.
|
|
9372
|
+
_exports.Walker = _exports.Path = Walker;
|
|
9382
9373
|
var visitors = {
|
|
9383
9374
|
Program(walker, node, callback) {
|
|
9384
9375
|
for (var i = 0; i < node.body.length; i++) {
|
|
@@ -10781,9 +10772,9 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
10781
10772
|
return slot === -1 ? this.parent.get(name) : [this.slots[slot], false];
|
|
10782
10773
|
}
|
|
10783
10774
|
getLocalsMap() {
|
|
10784
|
-
var dict
|
|
10785
|
-
this.symbols.forEach(symbol => dict
|
|
10786
|
-
return dict
|
|
10775
|
+
var dict = this.parent.getLocalsMap();
|
|
10776
|
+
this.symbols.forEach(symbol => dict[symbol] = this.get(symbol)[0]);
|
|
10777
|
+
return dict;
|
|
10787
10778
|
}
|
|
10788
10779
|
getEvalInfo() {
|
|
10789
10780
|
var locals = this.getLocalsMap();
|
|
@@ -10818,56 +10809,56 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
10818
10809
|
};
|
|
10819
10810
|
class Builder {
|
|
10820
10811
|
// TEMPLATE //
|
|
10821
|
-
template(symbols, body, loc
|
|
10812
|
+
template(symbols, body, loc) {
|
|
10822
10813
|
return new Template({
|
|
10823
10814
|
table: symbols,
|
|
10824
10815
|
body,
|
|
10825
|
-
loc
|
|
10816
|
+
loc
|
|
10826
10817
|
});
|
|
10827
10818
|
} // INTERNAL (these nodes cannot be reached when doing general-purpose visiting) //
|
|
10828
10819
|
|
|
10829
|
-
block(symbols, body, loc
|
|
10820
|
+
block(symbols, body, loc) {
|
|
10830
10821
|
return new Block({
|
|
10831
10822
|
scope: symbols,
|
|
10832
10823
|
body,
|
|
10833
|
-
loc
|
|
10824
|
+
loc
|
|
10834
10825
|
});
|
|
10835
10826
|
}
|
|
10836
|
-
namedBlock(name, block, loc
|
|
10827
|
+
namedBlock(name, block, loc) {
|
|
10837
10828
|
return new NamedBlock({
|
|
10838
10829
|
name,
|
|
10839
10830
|
block,
|
|
10840
10831
|
attrs: [],
|
|
10841
10832
|
componentArgs: [],
|
|
10842
10833
|
modifiers: [],
|
|
10843
|
-
loc
|
|
10834
|
+
loc
|
|
10844
10835
|
});
|
|
10845
10836
|
}
|
|
10846
|
-
simpleNamedBlock(name, block, loc
|
|
10837
|
+
simpleNamedBlock(name, block, loc) {
|
|
10847
10838
|
return new BuildElement({
|
|
10848
10839
|
selfClosing: false,
|
|
10849
10840
|
attrs: [],
|
|
10850
10841
|
componentArgs: [],
|
|
10851
10842
|
modifiers: [],
|
|
10852
10843
|
comments: []
|
|
10853
|
-
}).named(name, block, loc
|
|
10844
|
+
}).named(name, block, loc);
|
|
10854
10845
|
}
|
|
10855
|
-
slice(chars, loc
|
|
10846
|
+
slice(chars, loc) {
|
|
10856
10847
|
return new SourceSlice({
|
|
10857
|
-
loc
|
|
10848
|
+
loc,
|
|
10858
10849
|
chars
|
|
10859
10850
|
});
|
|
10860
10851
|
}
|
|
10861
|
-
args(positional, named, loc
|
|
10852
|
+
args(positional, named, loc) {
|
|
10862
10853
|
return new Args({
|
|
10863
|
-
loc
|
|
10854
|
+
loc,
|
|
10864
10855
|
positional,
|
|
10865
10856
|
named
|
|
10866
10857
|
});
|
|
10867
10858
|
}
|
|
10868
|
-
positional(exprs, loc
|
|
10859
|
+
positional(exprs, loc) {
|
|
10869
10860
|
return new PositionalArguments({
|
|
10870
|
-
loc
|
|
10861
|
+
loc,
|
|
10871
10862
|
exprs
|
|
10872
10863
|
});
|
|
10873
10864
|
}
|
|
@@ -10877,32 +10868,32 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
10877
10868
|
value
|
|
10878
10869
|
});
|
|
10879
10870
|
}
|
|
10880
|
-
named(entries, loc
|
|
10871
|
+
named(entries, loc) {
|
|
10881
10872
|
return new NamedArguments({
|
|
10882
|
-
loc
|
|
10873
|
+
loc,
|
|
10883
10874
|
entries
|
|
10884
10875
|
});
|
|
10885
10876
|
}
|
|
10886
|
-
attr(_ref28, loc
|
|
10877
|
+
attr(_ref28, loc) {
|
|
10887
10878
|
var {
|
|
10888
10879
|
name,
|
|
10889
10880
|
value,
|
|
10890
10881
|
trusting
|
|
10891
10882
|
} = _ref28;
|
|
10892
10883
|
return new HtmlAttr({
|
|
10893
|
-
loc
|
|
10884
|
+
loc,
|
|
10894
10885
|
name,
|
|
10895
10886
|
value,
|
|
10896
10887
|
trusting
|
|
10897
10888
|
});
|
|
10898
10889
|
}
|
|
10899
|
-
splatAttr(symbol, loc
|
|
10890
|
+
splatAttr(symbol, loc) {
|
|
10900
10891
|
return new SplatAttr({
|
|
10901
10892
|
symbol,
|
|
10902
|
-
loc
|
|
10893
|
+
loc
|
|
10903
10894
|
});
|
|
10904
10895
|
}
|
|
10905
|
-
arg(_ref29, loc
|
|
10896
|
+
arg(_ref29, loc) {
|
|
10906
10897
|
var {
|
|
10907
10898
|
name,
|
|
10908
10899
|
value,
|
|
@@ -10912,27 +10903,27 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
10912
10903
|
name,
|
|
10913
10904
|
value,
|
|
10914
10905
|
trusting,
|
|
10915
|
-
loc
|
|
10906
|
+
loc
|
|
10916
10907
|
});
|
|
10917
10908
|
} // EXPRESSIONS //
|
|
10918
10909
|
|
|
10919
|
-
path(head, tail, loc
|
|
10910
|
+
path(head, tail, loc) {
|
|
10920
10911
|
return new PathExpression({
|
|
10921
|
-
loc
|
|
10912
|
+
loc,
|
|
10922
10913
|
ref: head,
|
|
10923
10914
|
tail
|
|
10924
10915
|
});
|
|
10925
10916
|
}
|
|
10926
|
-
self(loc
|
|
10917
|
+
self(loc) {
|
|
10927
10918
|
return new ThisReference({
|
|
10928
|
-
loc
|
|
10919
|
+
loc
|
|
10929
10920
|
});
|
|
10930
10921
|
}
|
|
10931
|
-
at(name, symbol, loc
|
|
10922
|
+
at(name, symbol, loc) {
|
|
10932
10923
|
return new ArgReference({
|
|
10933
|
-
loc
|
|
10924
|
+
loc,
|
|
10934
10925
|
name: new SourceSlice({
|
|
10935
|
-
loc
|
|
10926
|
+
loc,
|
|
10936
10927
|
chars: name
|
|
10937
10928
|
}),
|
|
10938
10929
|
symbol
|
|
@@ -10943,52 +10934,52 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
10943
10934
|
name,
|
|
10944
10935
|
context,
|
|
10945
10936
|
symbol,
|
|
10946
|
-
loc
|
|
10937
|
+
loc
|
|
10947
10938
|
} = _ref30;
|
|
10948
10939
|
return new FreeVarReference({
|
|
10949
10940
|
name,
|
|
10950
10941
|
resolution: context,
|
|
10951
10942
|
symbol,
|
|
10952
|
-
loc
|
|
10943
|
+
loc
|
|
10953
10944
|
});
|
|
10954
10945
|
}
|
|
10955
|
-
localVar(name, symbol, isTemplateLocal, loc
|
|
10946
|
+
localVar(name, symbol, isTemplateLocal, loc) {
|
|
10956
10947
|
return new LocalVarReference({
|
|
10957
|
-
loc
|
|
10948
|
+
loc,
|
|
10958
10949
|
name,
|
|
10959
10950
|
isTemplateLocal,
|
|
10960
10951
|
symbol
|
|
10961
10952
|
});
|
|
10962
10953
|
}
|
|
10963
|
-
sexp(parts, loc
|
|
10954
|
+
sexp(parts, loc) {
|
|
10964
10955
|
return new CallExpression({
|
|
10965
|
-
loc
|
|
10956
|
+
loc,
|
|
10966
10957
|
callee: parts.callee,
|
|
10967
10958
|
args: parts.args
|
|
10968
10959
|
});
|
|
10969
10960
|
}
|
|
10970
|
-
deprecatedCall(arg, callee, loc
|
|
10961
|
+
deprecatedCall(arg, callee, loc) {
|
|
10971
10962
|
return new DeprecatedCallExpression({
|
|
10972
|
-
loc
|
|
10963
|
+
loc,
|
|
10973
10964
|
arg,
|
|
10974
10965
|
callee
|
|
10975
10966
|
});
|
|
10976
10967
|
}
|
|
10977
|
-
interpolate(parts, loc
|
|
10968
|
+
interpolate(parts, loc) {
|
|
10978
10969
|
(0, _util.assertPresent)(parts);
|
|
10979
10970
|
return new InterpolateExpression({
|
|
10980
|
-
loc
|
|
10971
|
+
loc,
|
|
10981
10972
|
parts
|
|
10982
10973
|
});
|
|
10983
10974
|
}
|
|
10984
|
-
literal(value, loc
|
|
10975
|
+
literal(value, loc) {
|
|
10985
10976
|
return new LiteralExpression({
|
|
10986
|
-
loc
|
|
10977
|
+
loc,
|
|
10987
10978
|
value
|
|
10988
10979
|
});
|
|
10989
10980
|
} // STATEMENTS //
|
|
10990
10981
|
|
|
10991
|
-
append(_ref31, loc
|
|
10982
|
+
append(_ref31, loc) {
|
|
10992
10983
|
var {
|
|
10993
10984
|
table,
|
|
10994
10985
|
trusting,
|
|
@@ -10998,27 +10989,27 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
10998
10989
|
table,
|
|
10999
10990
|
trusting,
|
|
11000
10991
|
value,
|
|
11001
|
-
loc
|
|
10992
|
+
loc
|
|
11002
10993
|
});
|
|
11003
10994
|
}
|
|
11004
|
-
modifier(_ref32, loc
|
|
10995
|
+
modifier(_ref32, loc) {
|
|
11005
10996
|
var {
|
|
11006
10997
|
callee,
|
|
11007
10998
|
args
|
|
11008
10999
|
} = _ref32;
|
|
11009
11000
|
return new ElementModifier({
|
|
11010
|
-
loc
|
|
11001
|
+
loc,
|
|
11011
11002
|
callee,
|
|
11012
11003
|
args
|
|
11013
11004
|
});
|
|
11014
11005
|
}
|
|
11015
|
-
namedBlocks(blocks, loc
|
|
11006
|
+
namedBlocks(blocks, loc) {
|
|
11016
11007
|
return new NamedBlocks({
|
|
11017
|
-
loc
|
|
11008
|
+
loc,
|
|
11018
11009
|
blocks
|
|
11019
11010
|
});
|
|
11020
11011
|
}
|
|
11021
|
-
blockStatement(_a, loc
|
|
11012
|
+
blockStatement(_a, loc) {
|
|
11022
11013
|
var {
|
|
11023
11014
|
symbols,
|
|
11024
11015
|
program,
|
|
@@ -11032,7 +11023,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11032
11023
|
blocks.push(this.namedBlock(SourceSlice.synthetic('else'), inverse, inverse.loc));
|
|
11033
11024
|
}
|
|
11034
11025
|
return new InvokeBlock({
|
|
11035
|
-
loc
|
|
11026
|
+
loc,
|
|
11036
11027
|
blocks: this.namedBlocks(blocks, blocksLoc),
|
|
11037
11028
|
callee: call.callee,
|
|
11038
11029
|
args: call.args
|
|
@@ -11047,80 +11038,80 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11047
11038
|
this.base = base;
|
|
11048
11039
|
this.builder = new Builder();
|
|
11049
11040
|
}
|
|
11050
|
-
simple(tag, body, loc
|
|
11041
|
+
simple(tag, body, loc) {
|
|
11051
11042
|
return new SimpleElement((0, _util.assign)({
|
|
11052
11043
|
tag,
|
|
11053
11044
|
body,
|
|
11054
11045
|
componentArgs: [],
|
|
11055
|
-
loc
|
|
11046
|
+
loc
|
|
11056
11047
|
}, this.base));
|
|
11057
11048
|
}
|
|
11058
|
-
named(name, block, loc
|
|
11049
|
+
named(name, block, loc) {
|
|
11059
11050
|
return new NamedBlock((0, _util.assign)({
|
|
11060
11051
|
name,
|
|
11061
11052
|
block,
|
|
11062
11053
|
componentArgs: [],
|
|
11063
|
-
loc
|
|
11054
|
+
loc
|
|
11064
11055
|
}, this.base));
|
|
11065
11056
|
}
|
|
11066
|
-
selfClosingComponent(callee, loc
|
|
11057
|
+
selfClosingComponent(callee, loc) {
|
|
11067
11058
|
return new InvokeComponent((0, _util.assign)({
|
|
11068
|
-
loc
|
|
11059
|
+
loc,
|
|
11069
11060
|
callee,
|
|
11070
11061
|
// point the empty named blocks at the `/` self-closing tag
|
|
11071
11062
|
blocks: new NamedBlocks({
|
|
11072
11063
|
blocks: [],
|
|
11073
|
-
loc: loc
|
|
11064
|
+
loc: loc.sliceEndChars({
|
|
11074
11065
|
skipEnd: 1,
|
|
11075
11066
|
chars: 1
|
|
11076
11067
|
})
|
|
11077
11068
|
})
|
|
11078
11069
|
}, this.base));
|
|
11079
11070
|
}
|
|
11080
|
-
componentWithDefaultBlock(callee, children, symbols, loc
|
|
11081
|
-
var block = this.builder.block(symbols, children, loc
|
|
11082
|
-
var namedBlock = this.builder.namedBlock(SourceSlice.synthetic('default'), block, loc
|
|
11071
|
+
componentWithDefaultBlock(callee, children, symbols, loc) {
|
|
11072
|
+
var block = this.builder.block(symbols, children, loc);
|
|
11073
|
+
var namedBlock = this.builder.namedBlock(SourceSlice.synthetic('default'), block, loc); // BUILDER.simpleNamedBlock('default', children, symbols, loc);
|
|
11083
11074
|
|
|
11084
11075
|
return new InvokeComponent((0, _util.assign)({
|
|
11085
|
-
loc
|
|
11076
|
+
loc,
|
|
11086
11077
|
callee,
|
|
11087
11078
|
blocks: this.builder.namedBlocks([namedBlock], namedBlock.loc)
|
|
11088
11079
|
}, this.base));
|
|
11089
11080
|
}
|
|
11090
|
-
componentWithNamedBlocks(callee, blocks, loc
|
|
11081
|
+
componentWithNamedBlocks(callee, blocks, loc) {
|
|
11091
11082
|
return new InvokeComponent((0, _util.assign)({
|
|
11092
|
-
loc
|
|
11083
|
+
loc,
|
|
11093
11084
|
callee,
|
|
11094
11085
|
blocks: this.builder.namedBlocks(blocks, SpanList.range(blocks))
|
|
11095
11086
|
}, this.base));
|
|
11096
11087
|
}
|
|
11097
11088
|
}
|
|
11098
|
-
function SexpSyntaxContext(node
|
|
11099
|
-
if (isSimpleCallee(node
|
|
11089
|
+
function SexpSyntaxContext(node) {
|
|
11090
|
+
if (isSimpleCallee(node)) {
|
|
11100
11091
|
return LooseModeResolution.namespaced("Helper"
|
|
11101
11092
|
/* Helper */);
|
|
11102
11093
|
} else {
|
|
11103
11094
|
return null;
|
|
11104
11095
|
}
|
|
11105
11096
|
}
|
|
11106
|
-
function ModifierSyntaxContext(node
|
|
11107
|
-
if (isSimpleCallee(node
|
|
11097
|
+
function ModifierSyntaxContext(node) {
|
|
11098
|
+
if (isSimpleCallee(node)) {
|
|
11108
11099
|
return LooseModeResolution.namespaced("Modifier"
|
|
11109
11100
|
/* Modifier */);
|
|
11110
11101
|
} else {
|
|
11111
11102
|
return null;
|
|
11112
11103
|
}
|
|
11113
11104
|
}
|
|
11114
|
-
function BlockSyntaxContext(node
|
|
11115
|
-
if (isSimpleCallee(node
|
|
11105
|
+
function BlockSyntaxContext(node) {
|
|
11106
|
+
if (isSimpleCallee(node)) {
|
|
11116
11107
|
return LooseModeResolution.namespaced("Component"
|
|
11117
11108
|
/* Component */);
|
|
11118
11109
|
} else {
|
|
11119
11110
|
return LooseModeResolution.fallback();
|
|
11120
11111
|
}
|
|
11121
11112
|
}
|
|
11122
|
-
function ComponentSyntaxContext(node
|
|
11123
|
-
if (isSimplePath(node
|
|
11113
|
+
function ComponentSyntaxContext(node) {
|
|
11114
|
+
if (isSimplePath(node)) {
|
|
11124
11115
|
return LooseModeResolution.namespaced("Component"
|
|
11125
11116
|
/* Component */, true);
|
|
11126
11117
|
} else {
|
|
@@ -11132,9 +11123,9 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11132
11123
|
* curlies). In strict mode, this also corresponds to arg curlies.
|
|
11133
11124
|
*/
|
|
11134
11125
|
|
|
11135
|
-
function AttrValueSyntaxContext(node
|
|
11136
|
-
var isSimple = isSimpleCallee(node
|
|
11137
|
-
var isInvoke = isInvokeNode(node
|
|
11126
|
+
function AttrValueSyntaxContext(node) {
|
|
11127
|
+
var isSimple = isSimpleCallee(node);
|
|
11128
|
+
var isInvoke = isInvokeNode(node);
|
|
11138
11129
|
if (isSimple) {
|
|
11139
11130
|
return isInvoke ? LooseModeResolution.namespaced("Helper"
|
|
11140
11131
|
/* Helper */) : LooseModeResolution.attr();
|
|
@@ -11147,10 +11138,10 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11147
11138
|
* curlies). In strict mode, this also corresponds to arg curlies.
|
|
11148
11139
|
*/
|
|
11149
11140
|
|
|
11150
|
-
function AppendSyntaxContext(node
|
|
11151
|
-
var isSimple = isSimpleCallee(node
|
|
11152
|
-
var isInvoke = isInvokeNode(node
|
|
11153
|
-
var trusting = node
|
|
11141
|
+
function AppendSyntaxContext(node) {
|
|
11142
|
+
var isSimple = isSimpleCallee(node);
|
|
11143
|
+
var isInvoke = isInvokeNode(node);
|
|
11144
|
+
var trusting = node.trusting;
|
|
11154
11145
|
if (isSimple) {
|
|
11155
11146
|
return trusting ? LooseModeResolution.trustingAppend({
|
|
11156
11147
|
invoke: isInvoke
|
|
@@ -11188,13 +11179,13 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11188
11179
|
* ```
|
|
11189
11180
|
*/
|
|
11190
11181
|
|
|
11191
|
-
function isSimpleCallee(node
|
|
11192
|
-
var path = node
|
|
11182
|
+
function isSimpleCallee(node) {
|
|
11183
|
+
var path = node.path;
|
|
11193
11184
|
return isSimplePath(path);
|
|
11194
11185
|
}
|
|
11195
|
-
function isSimplePath(node
|
|
11196
|
-
if (node
|
|
11197
|
-
return node
|
|
11186
|
+
function isSimplePath(node) {
|
|
11187
|
+
if (node.type === 'PathExpression' && node.head.type === 'VarHead') {
|
|
11188
|
+
return node.tail.length === 0;
|
|
11198
11189
|
} else {
|
|
11199
11190
|
return false;
|
|
11200
11191
|
}
|
|
@@ -11203,8 +11194,8 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11203
11194
|
* The call expression has at least one argument.
|
|
11204
11195
|
*/
|
|
11205
11196
|
|
|
11206
|
-
function isInvokeNode(node
|
|
11207
|
-
return node
|
|
11197
|
+
function isInvokeNode(node) {
|
|
11198
|
+
return node.params.length > 0 || node.hash.pairs.length > 0;
|
|
11208
11199
|
}
|
|
11209
11200
|
function normalize(source, options) {
|
|
11210
11201
|
if (options === void 0) {
|
|
@@ -11221,7 +11212,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11221
11212
|
options.customizeComponentName) !== null && _a !== void 0 ? _a : name => name);
|
|
11222
11213
|
var block = new BlockContext(source, normalizeOptions, top);
|
|
11223
11214
|
var normalizer = new StatementNormalizer(block);
|
|
11224
|
-
var astV2 = new TemplateChildren(block.loc(ast.loc), ast.body.map(b
|
|
11215
|
+
var astV2 = new TemplateChildren(block.loc(ast.loc), ast.body.map(b => normalizer.normalize(b)), block).assertTemplate(top);
|
|
11225
11216
|
var locals = top.getUsedTemplateLocals();
|
|
11226
11217
|
return [astV2, locals];
|
|
11227
11218
|
}
|
|
@@ -11247,22 +11238,22 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11247
11238
|
get strict() {
|
|
11248
11239
|
return this.options.strictMode || false;
|
|
11249
11240
|
}
|
|
11250
|
-
loc(loc
|
|
11251
|
-
return this.source.spanFor(loc
|
|
11241
|
+
loc(loc) {
|
|
11242
|
+
return this.source.spanFor(loc);
|
|
11252
11243
|
}
|
|
11253
|
-
resolutionFor(node
|
|
11244
|
+
resolutionFor(node, resolution) {
|
|
11254
11245
|
if (this.strict) {
|
|
11255
11246
|
return {
|
|
11256
11247
|
resolution: STRICT_RESOLUTION
|
|
11257
11248
|
};
|
|
11258
11249
|
}
|
|
11259
|
-
if (this.isFreeVar(node
|
|
11260
|
-
var r = resolution(node
|
|
11250
|
+
if (this.isFreeVar(node)) {
|
|
11251
|
+
var r = resolution(node);
|
|
11261
11252
|
if (r === null) {
|
|
11262
11253
|
return {
|
|
11263
11254
|
resolution: 'error',
|
|
11264
|
-
path: printPath(node
|
|
11265
|
-
head: printHead(node
|
|
11255
|
+
path: printPath(node),
|
|
11256
|
+
head: printHead(node)
|
|
11266
11257
|
};
|
|
11267
11258
|
}
|
|
11268
11259
|
return {
|
|
@@ -11435,55 +11426,55 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11435
11426
|
constructor(block) {
|
|
11436
11427
|
this.block = block;
|
|
11437
11428
|
}
|
|
11438
|
-
normalize(node
|
|
11439
|
-
switch (node
|
|
11429
|
+
normalize(node) {
|
|
11430
|
+
switch (node.type) {
|
|
11440
11431
|
case 'PartialStatement':
|
|
11441
11432
|
throw new Error("Handlebars partial syntax ({{> ...}}) is not allowed in Glimmer");
|
|
11442
11433
|
case 'BlockStatement':
|
|
11443
|
-
return this.BlockStatement(node
|
|
11434
|
+
return this.BlockStatement(node);
|
|
11444
11435
|
case 'ElementNode':
|
|
11445
|
-
return new ElementNormalizer(this.block).ElementNode(node
|
|
11436
|
+
return new ElementNormalizer(this.block).ElementNode(node);
|
|
11446
11437
|
case 'MustacheStatement':
|
|
11447
|
-
return this.MustacheStatement(node
|
|
11438
|
+
return this.MustacheStatement(node);
|
|
11448
11439
|
// These are the same in ASTv2
|
|
11449
11440
|
|
|
11450
11441
|
case 'MustacheCommentStatement':
|
|
11451
|
-
return this.MustacheCommentStatement(node
|
|
11442
|
+
return this.MustacheCommentStatement(node);
|
|
11452
11443
|
case 'CommentStatement':
|
|
11453
11444
|
{
|
|
11454
|
-
var
|
|
11445
|
+
var _loc3 = this.block.loc(node.loc);
|
|
11455
11446
|
return new HtmlComment({
|
|
11456
|
-
loc:
|
|
11457
|
-
text:
|
|
11447
|
+
loc: _loc3,
|
|
11448
|
+
text: _loc3.slice({
|
|
11458
11449
|
skipStart: 4,
|
|
11459
11450
|
skipEnd: 3
|
|
11460
|
-
}).toSlice(node
|
|
11451
|
+
}).toSlice(node.value)
|
|
11461
11452
|
});
|
|
11462
11453
|
}
|
|
11463
11454
|
case 'TextNode':
|
|
11464
11455
|
return new HtmlText({
|
|
11465
|
-
loc: this.block.loc(node
|
|
11466
|
-
chars: node
|
|
11456
|
+
loc: this.block.loc(node.loc),
|
|
11457
|
+
chars: node.chars
|
|
11467
11458
|
});
|
|
11468
11459
|
}
|
|
11469
11460
|
}
|
|
11470
|
-
MustacheCommentStatement(node
|
|
11471
|
-
var loc
|
|
11461
|
+
MustacheCommentStatement(node) {
|
|
11462
|
+
var loc = this.block.loc(node.loc);
|
|
11472
11463
|
var textLoc;
|
|
11473
|
-
if (loc
|
|
11474
|
-
textLoc = loc
|
|
11464
|
+
if (loc.asString().slice(0, 5) === '{{!--') {
|
|
11465
|
+
textLoc = loc.slice({
|
|
11475
11466
|
skipStart: 5,
|
|
11476
11467
|
skipEnd: 4
|
|
11477
11468
|
});
|
|
11478
11469
|
} else {
|
|
11479
|
-
textLoc = loc
|
|
11470
|
+
textLoc = loc.slice({
|
|
11480
11471
|
skipStart: 3,
|
|
11481
11472
|
skipEnd: 2
|
|
11482
11473
|
});
|
|
11483
11474
|
}
|
|
11484
11475
|
return new GlimmerComment({
|
|
11485
|
-
loc
|
|
11486
|
-
text: textLoc.toSlice(node
|
|
11476
|
+
loc,
|
|
11477
|
+
text: textLoc.toSlice(node.value)
|
|
11487
11478
|
});
|
|
11488
11479
|
}
|
|
11489
11480
|
/**
|
|
@@ -11494,19 +11485,19 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11494
11485
|
var {
|
|
11495
11486
|
escaped
|
|
11496
11487
|
} = mustache;
|
|
11497
|
-
var loc
|
|
11488
|
+
var loc = this.block.loc(mustache.loc); // Normalize the call parts in AppendSyntaxContext
|
|
11498
11489
|
|
|
11499
11490
|
var callParts = this.expr.callParts({
|
|
11500
11491
|
path: mustache.path,
|
|
11501
11492
|
params: mustache.params,
|
|
11502
11493
|
hash: mustache.hash
|
|
11503
11494
|
}, AppendSyntaxContext(mustache));
|
|
11504
|
-
var value = callParts.args.isEmpty() ? callParts.callee : this.block.builder.sexp(callParts, loc
|
|
11495
|
+
var value = callParts.args.isEmpty() ? callParts.callee : this.block.builder.sexp(callParts, loc);
|
|
11505
11496
|
return this.block.builder.append({
|
|
11506
11497
|
table: this.block.table,
|
|
11507
11498
|
trusting: !escaped,
|
|
11508
11499
|
value
|
|
11509
|
-
}, loc
|
|
11500
|
+
}, loc);
|
|
11510
11501
|
}
|
|
11511
11502
|
/**
|
|
11512
11503
|
* Normalizes a ASTv1.BlockStatement to an ASTv2.BlockStatement
|
|
@@ -11517,27 +11508,27 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11517
11508
|
program,
|
|
11518
11509
|
inverse
|
|
11519
11510
|
} = block;
|
|
11520
|
-
var loc
|
|
11511
|
+
var loc = this.block.loc(block.loc);
|
|
11521
11512
|
var resolution = this.block.resolutionFor(block, BlockSyntaxContext);
|
|
11522
11513
|
if (resolution.resolution === 'error') {
|
|
11523
|
-
throw generateSyntaxError("You attempted to invoke a path (`{{#" + resolution.path + "}}`) but " + resolution.head + " was not in scope", loc
|
|
11514
|
+
throw generateSyntaxError("You attempted to invoke a path (`{{#" + resolution.path + "}}`) but " + resolution.head + " was not in scope", loc);
|
|
11524
11515
|
}
|
|
11525
11516
|
var callParts = this.expr.callParts(block, resolution.resolution);
|
|
11526
11517
|
return this.block.builder.blockStatement((0, _util.assign)({
|
|
11527
11518
|
symbols: this.block.table,
|
|
11528
11519
|
program: this.Block(program),
|
|
11529
11520
|
inverse: inverse ? this.Block(inverse) : null
|
|
11530
|
-
}, callParts), loc
|
|
11521
|
+
}, callParts), loc);
|
|
11531
11522
|
}
|
|
11532
11523
|
Block(_ref33) {
|
|
11533
11524
|
var {
|
|
11534
11525
|
body,
|
|
11535
|
-
loc
|
|
11526
|
+
loc,
|
|
11536
11527
|
blockParams
|
|
11537
11528
|
} = _ref33;
|
|
11538
11529
|
var child = this.block.child(blockParams);
|
|
11539
11530
|
var normalizer = new StatementNormalizer(child);
|
|
11540
|
-
return new BlockChildren(this.block.loc(loc
|
|
11531
|
+
return new BlockChildren(this.block.loc(loc), body.map(b => normalizer.normalize(b)), this.block).assertBlock(child.table);
|
|
11541
11532
|
}
|
|
11542
11533
|
get expr() {
|
|
11543
11534
|
return new ExpressionNormalizer(this.block);
|
|
@@ -11568,7 +11559,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11568
11559
|
selfClosing,
|
|
11569
11560
|
comments
|
|
11570
11561
|
} = element;
|
|
11571
|
-
var loc
|
|
11562
|
+
var loc = this.ctx.loc(element.loc);
|
|
11572
11563
|
var [tagHead, ...rest] = tag.split('.'); // the head, attributes and modifiers are in the current scope
|
|
11573
11564
|
|
|
11574
11565
|
var path = this.classifyTag(tagHead, rest, element.loc);
|
|
@@ -11586,7 +11577,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11586
11577
|
modifiers,
|
|
11587
11578
|
comments: comments.map(c => new StatementNormalizer(this.ctx).MustacheCommentStatement(c))
|
|
11588
11579
|
});
|
|
11589
|
-
var children = new ElementChildren(el, loc
|
|
11580
|
+
var children = new ElementChildren(el, loc, childNodes, this.ctx);
|
|
11590
11581
|
var offsets = this.ctx.loc(element.loc);
|
|
11591
11582
|
var tagOffsets = offsets.sliceStartChars({
|
|
11592
11583
|
chars: tag.length,
|
|
@@ -11602,10 +11593,10 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11602
11593
|
}
|
|
11603
11594
|
}
|
|
11604
11595
|
if (element.selfClosing) {
|
|
11605
|
-
return el.selfClosingComponent(path, loc
|
|
11596
|
+
return el.selfClosingComponent(path, loc);
|
|
11606
11597
|
} else {
|
|
11607
11598
|
var blocks = children.assertComponent(tag, child.table, element.blockParams.length > 0);
|
|
11608
|
-
return el.componentWithNamedBlocks(path, blocks, loc
|
|
11599
|
+
return el.componentWithNamedBlocks(path, blocks, loc);
|
|
11609
11600
|
}
|
|
11610
11601
|
}
|
|
11611
11602
|
modifier(m) {
|
|
@@ -11755,12 +11746,12 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11755
11746
|
* 6. Otherwise, return `'ElementHead'`
|
|
11756
11747
|
*/
|
|
11757
11748
|
|
|
11758
|
-
classifyTag(variable, tail, loc
|
|
11749
|
+
classifyTag(variable, tail, loc) {
|
|
11759
11750
|
var uppercase = isUpperCase(variable);
|
|
11760
11751
|
var inScope = variable[0] === '@' || variable === 'this' || this.ctx.hasBinding(variable);
|
|
11761
11752
|
if (this.ctx.strict && !inScope) {
|
|
11762
11753
|
if (uppercase) {
|
|
11763
|
-
throw generateSyntaxError("Attempted to invoke a component that was not in scope in a strict mode template, `<" + variable + ">`. If you wanted to create an element with that name, convert it to lowercase - `<" + variable.toLowerCase() + ">`", loc
|
|
11754
|
+
throw generateSyntaxError("Attempted to invoke a component that was not in scope in a strict mode template, `<" + variable + ">`. If you wanted to create an element with that name, convert it to lowercase - `<" + variable.toLowerCase() + ">`", loc);
|
|
11764
11755
|
} // In strict mode, values are always elements unless they are in scope
|
|
11765
11756
|
|
|
11766
11757
|
return 'ElementHead';
|
|
@@ -11769,7 +11760,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11769
11760
|
// expression normalizer.
|
|
11770
11761
|
|
|
11771
11762
|
var isComponent = inScope || uppercase;
|
|
11772
|
-
var variableLoc = loc
|
|
11763
|
+
var variableLoc = loc.sliceStartChars({
|
|
11773
11764
|
skipStart: 1,
|
|
11774
11765
|
chars: variable.length
|
|
11775
11766
|
});
|
|
@@ -11784,14 +11775,14 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11784
11775
|
});
|
|
11785
11776
|
var resolution = this.ctx.resolutionFor(path, ComponentSyntaxContext);
|
|
11786
11777
|
if (resolution.resolution === 'error') {
|
|
11787
|
-
throw generateSyntaxError("You attempted to invoke a path (`<" + resolution.path + ">`) but " + resolution.head + " was not in scope", loc
|
|
11778
|
+
throw generateSyntaxError("You attempted to invoke a path (`<" + resolution.path + ">`) but " + resolution.head + " was not in scope", loc);
|
|
11788
11779
|
}
|
|
11789
11780
|
return new ExpressionNormalizer(this.ctx).normalize(path, resolution.resolution);
|
|
11790
11781
|
} // If the tag name wasn't a valid component but contained a `.`, it's
|
|
11791
11782
|
// a syntax error.
|
|
11792
11783
|
|
|
11793
11784
|
if (tail.length > 0) {
|
|
11794
|
-
throw generateSyntaxError("You used " + variable + "." + tail.join('.') + " as a tag name, but " + variable + " is not in scope", loc
|
|
11785
|
+
throw generateSyntaxError("You used " + variable + "." + tail.join('.') + " as a tag name, but " + variable + " is not in scope", loc);
|
|
11795
11786
|
}
|
|
11796
11787
|
return 'ElementHead';
|
|
11797
11788
|
}
|
|
@@ -11800,8 +11791,8 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11800
11791
|
}
|
|
11801
11792
|
}
|
|
11802
11793
|
class Children {
|
|
11803
|
-
constructor(loc
|
|
11804
|
-
this.loc = loc
|
|
11794
|
+
constructor(loc, children, block) {
|
|
11795
|
+
this.loc = loc;
|
|
11805
11796
|
this.children = children;
|
|
11806
11797
|
this.block = block;
|
|
11807
11798
|
this.namedBlocks = children.filter(c => c instanceof NamedBlock);
|
|
@@ -11839,8 +11830,8 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11839
11830
|
}
|
|
11840
11831
|
}
|
|
11841
11832
|
class ElementChildren extends Children {
|
|
11842
|
-
constructor(el, loc
|
|
11843
|
-
super(loc
|
|
11833
|
+
constructor(el, loc, children, block) {
|
|
11834
|
+
super(loc, children, block);
|
|
11844
11835
|
this.el = el;
|
|
11845
11836
|
}
|
|
11846
11837
|
assertNamedBlock(name, table) {
|
|
@@ -11864,7 +11855,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11864
11855
|
throw generateSyntaxError("Unexpected block params in <" + name + ">: simple elements cannot have block params", this.loc);
|
|
11865
11856
|
}
|
|
11866
11857
|
if ((0, _util.isPresent)(this.namedBlocks)) {
|
|
11867
|
-
var names = this.namedBlocks.map(b
|
|
11858
|
+
var names = this.namedBlocks.map(b => b.name);
|
|
11868
11859
|
if (names.length === 1) {
|
|
11869
11860
|
throw generateSyntaxError("Unexpected named block <:foo> inside <" + name.chars + "> HTML element", this.loc);
|
|
11870
11861
|
} else {
|
|
@@ -11899,30 +11890,30 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
11899
11890
|
}
|
|
11900
11891
|
}
|
|
11901
11892
|
}
|
|
11902
|
-
function printPath(node
|
|
11903
|
-
if (node
|
|
11904
|
-
return printPath(node
|
|
11893
|
+
function printPath(node) {
|
|
11894
|
+
if (node.type !== 'PathExpression' && node.path.type === 'PathExpression') {
|
|
11895
|
+
return printPath(node.path);
|
|
11905
11896
|
} else {
|
|
11906
11897
|
return new Printer({
|
|
11907
11898
|
entityEncoding: 'raw'
|
|
11908
|
-
}).print(node
|
|
11899
|
+
}).print(node);
|
|
11909
11900
|
}
|
|
11910
11901
|
}
|
|
11911
|
-
function printHead(node
|
|
11912
|
-
if (node
|
|
11913
|
-
switch (node
|
|
11902
|
+
function printHead(node) {
|
|
11903
|
+
if (node.type === 'PathExpression') {
|
|
11904
|
+
switch (node.head.type) {
|
|
11914
11905
|
case 'AtHead':
|
|
11915
11906
|
case 'VarHead':
|
|
11916
|
-
return node
|
|
11907
|
+
return node.head.name;
|
|
11917
11908
|
case 'ThisHead':
|
|
11918
11909
|
return 'this';
|
|
11919
11910
|
}
|
|
11920
|
-
} else if (node
|
|
11921
|
-
return printHead(node
|
|
11911
|
+
} else if (node.path.type === 'PathExpression') {
|
|
11912
|
+
return printHead(node.path);
|
|
11922
11913
|
} else {
|
|
11923
11914
|
return new Printer({
|
|
11924
11915
|
entityEncoding: 'raw'
|
|
11925
|
-
}).print(node
|
|
11916
|
+
}).print(node);
|
|
11926
11917
|
}
|
|
11927
11918
|
}
|
|
11928
11919
|
function isKeyword(word) {
|
|
@@ -12073,7 +12064,7 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
12073
12064
|
value: true
|
|
12074
12065
|
});
|
|
12075
12066
|
_exports._WeakSet = _exports.Stack = _exports.SERIALIZATION_FIRST_NODE_STRING = _exports.LOGGER = _exports.LOCAL_LOGGER = _exports.HAS_NATIVE_SYMBOL = _exports.HAS_NATIVE_PROXY = _exports.EMPTY_STRING_ARRAY = _exports.EMPTY_NUMBER_ARRAY = _exports.EMPTY_ARRAY = void 0;
|
|
12076
|
-
_exports.assert = debugAssert
|
|
12067
|
+
_exports.assert = debugAssert;
|
|
12077
12068
|
_exports.assertNever = assertNever;
|
|
12078
12069
|
_exports.assertPresent = assertPresent;
|
|
12079
12070
|
_exports.beginTestSteps = _exports.assign = void 0;
|
|
@@ -12088,7 +12079,7 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
12088
12079
|
_exports.decodeImmediate = decodeImmediate;
|
|
12089
12080
|
_exports.decodeNegative = decodeNegative;
|
|
12090
12081
|
_exports.decodePositive = decodePositive;
|
|
12091
|
-
_exports.deprecate = deprecate
|
|
12082
|
+
_exports.deprecate = deprecate;
|
|
12092
12083
|
_exports.dict = dict;
|
|
12093
12084
|
_exports.emptyArray = emptyArray;
|
|
12094
12085
|
_exports.encodeHandle = encodeHandle;
|
|
@@ -12145,7 +12136,7 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
12145
12136
|
|
|
12146
12137
|
// import Logger from './logger';
|
|
12147
12138
|
|
|
12148
|
-
function debugAssert
|
|
12139
|
+
function debugAssert(test, msg) {
|
|
12149
12140
|
// if (!alreadyWarned) {
|
|
12150
12141
|
// alreadyWarned = true;
|
|
12151
12142
|
// Logger.warn("Don't leave debug assertions on in public builds");
|
|
@@ -12154,7 +12145,7 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
12154
12145
|
throw new Error(msg || 'assertion failure');
|
|
12155
12146
|
}
|
|
12156
12147
|
}
|
|
12157
|
-
function deprecate
|
|
12148
|
+
function deprecate(desc) {
|
|
12158
12149
|
LOCAL_LOGGER.warn("DEPRECATION: " + desc);
|
|
12159
12150
|
}
|
|
12160
12151
|
function dict() {
|
|
@@ -13287,7 +13278,6 @@ define("@handlebars/parser/index", ["exports"], function (_exports) {
|
|
|
13287
13278
|
switch (yystate) {
|
|
13288
13279
|
case 1:
|
|
13289
13280
|
return $$[$0 - 1];
|
|
13290
|
-
break;
|
|
13291
13281
|
case 2:
|
|
13292
13282
|
this.$ = yy.prepareProgram($$[$0]);
|
|
13293
13283
|
break;
|
|
@@ -14105,7 +14095,7 @@ define("@handlebars/parser/index", ["exports"], function (_exports) {
|
|
|
14105
14095
|
} else {
|
|
14106
14096
|
this.parseError = Object.getPrototypeOf(this).parseError;
|
|
14107
14097
|
}
|
|
14108
|
-
|
|
14098
|
+
var lex = function () {
|
|
14109
14099
|
var token;
|
|
14110
14100
|
token = lexer.lex() || EOF;
|
|
14111
14101
|
if (typeof token !== 'number') {
|
|
@@ -14114,7 +14104,6 @@ define("@handlebars/parser/index", ["exports"], function (_exports) {
|
|
|
14114
14104
|
return token;
|
|
14115
14105
|
};
|
|
14116
14106
|
var symbol,
|
|
14117
|
-
preErrorSymbol,
|
|
14118
14107
|
state,
|
|
14119
14108
|
action,
|
|
14120
14109
|
r,
|
|
@@ -14164,14 +14153,11 @@ define("@handlebars/parser/index", ["exports"], function (_exports) {
|
|
|
14164
14153
|
lstack.push(lexer.yylloc);
|
|
14165
14154
|
stack.push(action[1]);
|
|
14166
14155
|
symbol = null;
|
|
14167
|
-
|
|
14156
|
+
{
|
|
14168
14157
|
yyleng = lexer.yyleng;
|
|
14169
14158
|
yytext = lexer.yytext;
|
|
14170
14159
|
yylineno = lexer.yylineno;
|
|
14171
14160
|
yyloc = lexer.yylloc;
|
|
14172
|
-
} else {
|
|
14173
|
-
symbol = preErrorSymbol;
|
|
14174
|
-
preErrorSymbol = null;
|
|
14175
14161
|
}
|
|
14176
14162
|
break;
|
|
14177
14163
|
case 2:
|
|
@@ -14514,15 +14500,12 @@ define("@handlebars/parser/index", ["exports"], function (_exports) {
|
|
|
14514
14500
|
break;
|
|
14515
14501
|
case 1:
|
|
14516
14502
|
return 15;
|
|
14517
|
-
break;
|
|
14518
14503
|
case 2:
|
|
14519
14504
|
this.popState();
|
|
14520
14505
|
return 15;
|
|
14521
|
-
break;
|
|
14522
14506
|
case 3:
|
|
14523
14507
|
this.begin('raw');
|
|
14524
14508
|
return 15;
|
|
14525
|
-
break;
|
|
14526
14509
|
case 4:
|
|
14527
14510
|
this.popState();
|
|
14528
14511
|
// Should be using `this.topState()` below, but it currently
|
|
@@ -14534,60 +14517,43 @@ define("@handlebars/parser/index", ["exports"], function (_exports) {
|
|
|
14534
14517
|
strip(5, 9);
|
|
14535
14518
|
return 18;
|
|
14536
14519
|
}
|
|
14537
|
-
break;
|
|
14538
14520
|
case 5:
|
|
14539
14521
|
return 15;
|
|
14540
|
-
break;
|
|
14541
14522
|
case 6:
|
|
14542
14523
|
this.popState();
|
|
14543
14524
|
return 14;
|
|
14544
|
-
break;
|
|
14545
14525
|
case 7:
|
|
14546
14526
|
return 64;
|
|
14547
|
-
break;
|
|
14548
14527
|
case 8:
|
|
14549
14528
|
return 67;
|
|
14550
|
-
break;
|
|
14551
14529
|
case 9:
|
|
14552
14530
|
return 19;
|
|
14553
|
-
break;
|
|
14554
14531
|
case 10:
|
|
14555
14532
|
this.popState();
|
|
14556
14533
|
this.begin('raw');
|
|
14557
14534
|
return 23;
|
|
14558
|
-
break;
|
|
14559
14535
|
case 11:
|
|
14560
14536
|
return 56;
|
|
14561
|
-
break;
|
|
14562
14537
|
case 12:
|
|
14563
14538
|
return 60;
|
|
14564
|
-
break;
|
|
14565
14539
|
case 13:
|
|
14566
14540
|
return 29;
|
|
14567
|
-
break;
|
|
14568
14541
|
case 14:
|
|
14569
14542
|
return 47;
|
|
14570
|
-
break;
|
|
14571
14543
|
case 15:
|
|
14572
14544
|
this.popState();
|
|
14573
14545
|
return 44;
|
|
14574
|
-
break;
|
|
14575
14546
|
case 16:
|
|
14576
14547
|
this.popState();
|
|
14577
14548
|
return 44;
|
|
14578
|
-
break;
|
|
14579
14549
|
case 17:
|
|
14580
14550
|
return 34;
|
|
14581
|
-
break;
|
|
14582
14551
|
case 18:
|
|
14583
14552
|
return 39;
|
|
14584
|
-
break;
|
|
14585
14553
|
case 19:
|
|
14586
14554
|
return 52;
|
|
14587
|
-
break;
|
|
14588
14555
|
case 20:
|
|
14589
14556
|
return 48;
|
|
14590
|
-
break;
|
|
14591
14557
|
case 21:
|
|
14592
14558
|
this.unput(yy_.yytext);
|
|
14593
14559
|
this.popState();
|
|
@@ -14596,78 +14562,56 @@ define("@handlebars/parser/index", ["exports"], function (_exports) {
|
|
|
14596
14562
|
case 22:
|
|
14597
14563
|
this.popState();
|
|
14598
14564
|
return 14;
|
|
14599
|
-
break;
|
|
14600
14565
|
case 23:
|
|
14601
14566
|
return 48;
|
|
14602
|
-
break;
|
|
14603
14567
|
case 24:
|
|
14604
14568
|
return 72;
|
|
14605
|
-
break;
|
|
14606
14569
|
case 25:
|
|
14607
14570
|
return 71;
|
|
14608
|
-
break;
|
|
14609
14571
|
case 26:
|
|
14610
14572
|
return 71;
|
|
14611
|
-
break;
|
|
14612
14573
|
case 27:
|
|
14613
14574
|
return 86;
|
|
14614
|
-
break;
|
|
14615
14575
|
case 28:
|
|
14616
14576
|
// ignore whitespace
|
|
14617
14577
|
break;
|
|
14618
14578
|
case 29:
|
|
14619
14579
|
this.popState();
|
|
14620
14580
|
return 55;
|
|
14621
|
-
break;
|
|
14622
14581
|
case 30:
|
|
14623
14582
|
this.popState();
|
|
14624
14583
|
return 33;
|
|
14625
|
-
break;
|
|
14626
14584
|
case 31:
|
|
14627
14585
|
yy_.yytext = strip(1, 2).replace(/\\"/g, '"');
|
|
14628
14586
|
return 79;
|
|
14629
|
-
break;
|
|
14630
14587
|
case 32:
|
|
14631
14588
|
yy_.yytext = strip(1, 2).replace(/\\'/g, "'");
|
|
14632
14589
|
return 79;
|
|
14633
|
-
break;
|
|
14634
14590
|
case 33:
|
|
14635
14591
|
return 84;
|
|
14636
|
-
break;
|
|
14637
14592
|
case 34:
|
|
14638
14593
|
return 81;
|
|
14639
|
-
break;
|
|
14640
14594
|
case 35:
|
|
14641
14595
|
return 81;
|
|
14642
|
-
break;
|
|
14643
14596
|
case 36:
|
|
14644
14597
|
return 82;
|
|
14645
|
-
break;
|
|
14646
14598
|
case 37:
|
|
14647
14599
|
return 83;
|
|
14648
|
-
break;
|
|
14649
14600
|
case 38:
|
|
14650
14601
|
return 80;
|
|
14651
|
-
break;
|
|
14652
14602
|
case 39:
|
|
14653
14603
|
return 74;
|
|
14654
|
-
break;
|
|
14655
14604
|
case 40:
|
|
14656
14605
|
return 76;
|
|
14657
|
-
break;
|
|
14658
14606
|
case 41:
|
|
14659
14607
|
return 71;
|
|
14660
|
-
break;
|
|
14661
14608
|
case 42:
|
|
14662
14609
|
yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, '$1');
|
|
14663
14610
|
return 71;
|
|
14664
|
-
break;
|
|
14665
14611
|
case 43:
|
|
14666
14612
|
return 'INVALID';
|
|
14667
|
-
break;
|
|
14668
14613
|
case 44:
|
|
14669
14614
|
return 5;
|
|
14670
|
-
break;
|
|
14671
14615
|
}
|
|
14672
14616
|
},
|
|
14673
14617
|
rules: [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/],
|
|
@@ -15025,6 +14969,7 @@ define("@handlebars/parser/index", ["exports"], function (_exports) {
|
|
|
15025
14969
|
};
|
|
15026
14970
|
}
|
|
15027
14971
|
var Helpers = /*#__PURE__*/Object.freeze({
|
|
14972
|
+
__proto__: null,
|
|
15028
14973
|
SourceLocation: SourceLocation,
|
|
15029
14974
|
id: id,
|
|
15030
14975
|
stripFlags: stripFlags,
|
|
@@ -15365,11 +15310,11 @@ define("ember-template-compiler/lib/plugins/assert-against-attrs", ["exports", "
|
|
|
15365
15310
|
@class AssertAgainstAttrs
|
|
15366
15311
|
*/
|
|
15367
15312
|
function assertAgainstAttrs(env) {
|
|
15368
|
-
var
|
|
15313
|
+
var _env$meta;
|
|
15369
15314
|
var {
|
|
15370
15315
|
builders: b
|
|
15371
15316
|
} = env.syntax;
|
|
15372
|
-
var moduleName = (
|
|
15317
|
+
var moduleName = (_env$meta = env.meta) == null ? void 0 : _env$meta.moduleName;
|
|
15373
15318
|
var stack = [[]];
|
|
15374
15319
|
function updateBlockParamsStack(blockParams) {
|
|
15375
15320
|
var parent = stack[stack.length - 1];
|
|
@@ -15436,8 +15381,8 @@ define("ember-template-compiler/lib/plugins/assert-against-named-outlets", ["exp
|
|
|
15436
15381
|
@class AssertAgainstNamedOutlets
|
|
15437
15382
|
*/
|
|
15438
15383
|
function assertAgainstNamedOutlets(env) {
|
|
15439
|
-
var
|
|
15440
|
-
var moduleName = (
|
|
15384
|
+
var _env$meta;
|
|
15385
|
+
var moduleName = (_env$meta = env.meta) == null ? void 0 : _env$meta.moduleName;
|
|
15441
15386
|
return {
|
|
15442
15387
|
name: 'assert-against-named-outlets',
|
|
15443
15388
|
visitor: {
|
|
@@ -15459,8 +15404,8 @@ define("ember-template-compiler/lib/plugins/assert-input-helper-without-block",
|
|
|
15459
15404
|
});
|
|
15460
15405
|
_exports.default = errorOnInputWithContent;
|
|
15461
15406
|
function errorOnInputWithContent(env) {
|
|
15462
|
-
var
|
|
15463
|
-
var moduleName = (
|
|
15407
|
+
var _env$meta;
|
|
15408
|
+
var moduleName = (_env$meta = env.meta) == null ? void 0 : _env$meta.moduleName;
|
|
15464
15409
|
return {
|
|
15465
15410
|
name: 'assert-input-helper-without-block',
|
|
15466
15411
|
visitor: {
|
|
@@ -15485,8 +15430,8 @@ define("ember-template-compiler/lib/plugins/assert-reserved-named-arguments", ["
|
|
|
15485
15430
|
});
|
|
15486
15431
|
_exports.default = assertReservedNamedArguments;
|
|
15487
15432
|
function assertReservedNamedArguments(env) {
|
|
15488
|
-
var
|
|
15489
|
-
var moduleName = (
|
|
15433
|
+
var _env$meta;
|
|
15434
|
+
var moduleName = (_env$meta = env.meta) == null ? void 0 : _env$meta.moduleName;
|
|
15490
15435
|
return {
|
|
15491
15436
|
name: 'assert-reserved-named-arguments',
|
|
15492
15437
|
visitor: {
|
|
@@ -15540,8 +15485,8 @@ define("ember-template-compiler/lib/plugins/assert-splattribute-expression", ["e
|
|
|
15540
15485
|
});
|
|
15541
15486
|
_exports.default = assertSplattributeExpressions;
|
|
15542
15487
|
function assertSplattributeExpressions(env) {
|
|
15543
|
-
var
|
|
15544
|
-
var moduleName = (
|
|
15488
|
+
var _env$meta;
|
|
15489
|
+
var moduleName = (_env$meta = env.meta) == null ? void 0 : _env$meta.moduleName;
|
|
15545
15490
|
return {
|
|
15546
15491
|
name: 'assert-splattribute-expressions',
|
|
15547
15492
|
visitor: {
|
|
@@ -15903,11 +15848,11 @@ define("ember-template-compiler/lib/plugins/transform-resolutions", ["exports",
|
|
|
15903
15848
|
*/
|
|
15904
15849
|
var TARGETS = Object.freeze(['helper', 'modifier']);
|
|
15905
15850
|
function transformResolutions(env) {
|
|
15906
|
-
var
|
|
15851
|
+
var _env$meta;
|
|
15907
15852
|
var {
|
|
15908
15853
|
builders: b
|
|
15909
15854
|
} = env.syntax;
|
|
15910
|
-
var moduleName = (
|
|
15855
|
+
var moduleName = (_env$meta = env.meta) == null ? void 0 : _env$meta.moduleName;
|
|
15911
15856
|
var {
|
|
15912
15857
|
hasLocal,
|
|
15913
15858
|
node: tracker
|
|
@@ -16193,7 +16138,7 @@ define("ember-template-compiler/lib/system/compile-options", ["exports", "@ember
|
|
|
16193
16138
|
}, _options, {
|
|
16194
16139
|
moduleName,
|
|
16195
16140
|
customizeComponentName(tagname) {
|
|
16196
|
-
(true && !(!malformedComponentLookup(tagname)) && (0, _debug.assert)("You tried to invoke a component named <" + tagname + " /> in \"" + (moduleName
|
|
16141
|
+
(true && !(!malformedComponentLookup(tagname)) && (0, _debug.assert)("You tried to invoke a component named <" + tagname + " /> in \"" + (moduleName != null ? moduleName : '[NO MODULE]') + "\", but that is not a valid name for a component. Did you mean to use the \"::\" syntax for nested components?", !malformedComponentLookup(tagname)));
|
|
16197
16142
|
return _dasherizeComponentName.default.get(tagname);
|
|
16198
16143
|
}
|
|
16199
16144
|
});
|
|
@@ -16363,7 +16308,7 @@ define("ember/version", ["exports"], function (_exports) {
|
|
|
16363
16308
|
value: true
|
|
16364
16309
|
});
|
|
16365
16310
|
_exports.default = void 0;
|
|
16366
|
-
var _default = "5.0.0-
|
|
16311
|
+
var _default = "5.0.0-beta.3";
|
|
16367
16312
|
_exports.default = _default;
|
|
16368
16313
|
});
|
|
16369
16314
|
define("simple-html-tokenizer", ["exports"], function (_exports) {
|