ember-source 4.1.0-alpha.6 → 4.1.0
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/CHANGELOG.md +80 -63
- package/blueprints/acceptance-test/qunit-files/tests/acceptance/__name__-test.js +1 -1
- package/blueprints/acceptance-test/qunit-rfc-232-files/tests/acceptance/__name__-test.js +1 -1
- package/blueprints/component-test/qunit-files/__root__/__testType__/__path__/__test__.js +3 -3
- package/blueprints/helper-test/index.js +4 -22
- package/blueprints/helper-test/mocha-0.12-files/__root__/__testType__/__collection__/__name__-test.js +1 -13
- package/blueprints/helper-test/mocha-files/__root__/__testType__/__collection__/__name__-test.js +0 -13
- package/blueprints/helper-test/mocha-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -12
- package/blueprints/helper-test/qunit-files/__root__/__testType__/__collection__/__name__-test.js +2 -13
- package/blueprints/helper-test/qunit-rfc-232-files/__root__/__testType__/__collection__/__name__-test.js +2 -14
- package/build-metadata.json +3 -3
- package/dist/dependencies/@glimmer/manager.js +19 -98
- package/dist/dependencies/@glimmer/opcode-compiler.js +9 -146
- package/dist/dependencies/@glimmer/runtime.js +1 -55
- package/dist/dependencies/@glimmer/validator.js +19 -51
- package/dist/ember-template-compiler.js +368 -693
- package/dist/ember-template-compiler.map +1 -1
- package/dist/ember-testing.js +1 -1
- package/dist/ember-testing.map +1 -1
- package/dist/ember.debug.js +3261 -6351
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/environment/index.js +0 -15
- package/dist/packages/@ember/-internals/glimmer/index.js +4815 -6763
- package/dist/packages/@ember/-internals/metal/index.js +57 -103
- package/dist/packages/@ember/-internals/routing/lib/location/api.js +10 -1
- package/dist/packages/@ember/-internals/routing/lib/location/none_location.js +7 -2
- package/dist/packages/@ember/-internals/routing/lib/services/router.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/services/routing.js +1 -1
- package/dist/packages/@ember/-internals/routing/lib/system/route.js +3 -42
- package/dist/packages/@ember/-internals/routing/lib/system/router.js +36 -46
- package/dist/packages/@ember/-internals/runtime/lib/mixins/array.js +2 -173
- package/dist/packages/@ember/-internals/runtime/lib/mixins/target_action_support.js +3 -43
- package/dist/packages/@ember/-internals/runtime/lib/system/array_proxy.js +8 -15
- package/dist/packages/@ember/-internals/utils/index.js +0 -3
- package/dist/packages/@ember/-internals/views/index.js +0 -1
- package/dist/packages/@ember/-internals/views/lib/mixins/view_support.js +4 -4
- package/dist/packages/@ember/application/lib/application.js +7 -8
- package/dist/packages/@ember/canary-features/index.js +4 -6
- package/dist/packages/@ember/component/index.js +1 -1
- package/dist/packages/@ember/deprecated-features/index.js +0 -1
- package/dist/packages/@ember/destroyable/index.js +15 -4
- package/dist/packages/@ember/engine/index.js +1 -2
- package/dist/packages/@ember/routing/index.js +1 -1
- package/dist/packages/@glimmer/tracking/index.js +203 -1
- package/dist/packages/ember/index.js +9 -61
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +430 -1382
- package/lib/browsers.js +50 -0
- package/lib/index.js +7 -29
- package/package.json +19 -22
- package/dist/packages/@ember/-internals/views/lib/mixins/text_support.js +0 -345
- package/dist/packages/@ember/component/checkbox.js +0 -17
- package/dist/packages/@ember/component/text-area.js +0 -17
- package/dist/packages/@ember/component/text-field.js +0 -17
- package/dist/packages/@ember/routing/link-component.js +0 -17
|
@@ -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 4.1.0
|
|
9
|
+
* @version 4.1.0
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
/* eslint-disable no-var */
|
|
@@ -319,21 +319,6 @@ define("@ember/-internals/environment/index", ["exports"], function (_exports) {
|
|
|
319
319
|
@private
|
|
320
320
|
*/
|
|
321
321
|
_RERENDER_LOOP_LIMIT: 1000,
|
|
322
|
-
|
|
323
|
-
/**
|
|
324
|
-
Allows disabling the implicit this property fallback deprecation. This could be useful
|
|
325
|
-
as a way to control the volume of deprecations that are issued by temporarily disabling
|
|
326
|
-
the implicit this fallback deprecations, which would allow the other deprecations to be more easily
|
|
327
|
-
identified in the console).
|
|
328
|
-
NOTE: The fallback behavior **will be removed** in Ember 4.0.0, disabling **_IS NOT_**
|
|
329
|
-
a viable strategy for handling this deprecation.
|
|
330
|
-
@property _DISABLE_PROPERTY_FALLBACK_DEPRECATION
|
|
331
|
-
@for EmberENV
|
|
332
|
-
@type boolean
|
|
333
|
-
@default false
|
|
334
|
-
@private
|
|
335
|
-
*/
|
|
336
|
-
_DISABLE_PROPERTY_FALLBACK_DEPRECATION: false,
|
|
337
322
|
EMBER_LOAD_HOOKS: {},
|
|
338
323
|
FEATURES: {}
|
|
339
324
|
};
|
|
@@ -507,9 +492,6 @@ define("@ember/-internals/utils/index", ["exports", "@glimmer/util", "@ember/deb
|
|
|
507
492
|
*/
|
|
508
493
|
|
|
509
494
|
/**
|
|
510
|
-
Previously we used `Ember.$.uuid`, however `$.uuid` has been removed from
|
|
511
|
-
jQuery master. We'll just bootstrap our own uuid now.
|
|
512
|
-
|
|
513
495
|
@private
|
|
514
496
|
@return {Number} the uuid
|
|
515
497
|
*/
|
|
@@ -1302,7 +1284,7 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
1302
1284
|
value: true
|
|
1303
1285
|
});
|
|
1304
1286
|
_exports.isEnabled = isEnabled;
|
|
1305
|
-
_exports.EMBER_CACHED = _exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = _exports.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = _exports.EMBER_STRICT_MODE = _exports.
|
|
1287
|
+
_exports.EMBER_CACHED = _exports.EMBER_ROUTING_ROUTER_SERVICE_REFRESH = _exports.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = _exports.EMBER_STRICT_MODE = _exports.EMBER_GLIMMER_INVOKE_HELPER = _exports.EMBER_GLIMMER_HELPER_MANAGER = _exports.EMBER_NAMED_BLOCKS = _exports.EMBER_IMPROVED_INSTRUMENTATION = _exports.EMBER_LIBRARIES_ISREGISTERED = _exports.FEATURES = _exports.DEFAULT_FEATURES = void 0;
|
|
1306
1288
|
|
|
1307
1289
|
/**
|
|
1308
1290
|
Set `EmberENV.FEATURES` in your application's `config/environment.js` file
|
|
@@ -1315,16 +1297,15 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
1315
1297
|
@public
|
|
1316
1298
|
*/
|
|
1317
1299
|
var DEFAULT_FEATURES = {
|
|
1318
|
-
EMBER_LIBRARIES_ISREGISTERED:
|
|
1319
|
-
EMBER_IMPROVED_INSTRUMENTATION:
|
|
1300
|
+
EMBER_LIBRARIES_ISREGISTERED: false,
|
|
1301
|
+
EMBER_IMPROVED_INSTRUMENTATION: false,
|
|
1320
1302
|
EMBER_NAMED_BLOCKS: true,
|
|
1321
1303
|
EMBER_GLIMMER_HELPER_MANAGER: true,
|
|
1322
1304
|
EMBER_GLIMMER_INVOKE_HELPER: true,
|
|
1323
|
-
EMBER_MODERNIZED_BUILT_IN_COMPONENTS: true,
|
|
1324
1305
|
EMBER_STRICT_MODE: true,
|
|
1325
1306
|
EMBER_DYNAMIC_HELPERS_AND_MODIFIERS: true,
|
|
1326
|
-
EMBER_ROUTING_ROUTER_SERVICE_REFRESH:
|
|
1327
|
-
EMBER_CACHED:
|
|
1307
|
+
EMBER_ROUTING_ROUTER_SERVICE_REFRESH: true,
|
|
1308
|
+
EMBER_CACHED: true
|
|
1328
1309
|
};
|
|
1329
1310
|
/**
|
|
1330
1311
|
The hash of enabled Canary features. Add to this, any canary features
|
|
@@ -1386,8 +1367,6 @@ define("@ember/canary-features/index", ["exports", "@ember/-internals/environmen
|
|
|
1386
1367
|
_exports.EMBER_GLIMMER_HELPER_MANAGER = EMBER_GLIMMER_HELPER_MANAGER;
|
|
1387
1368
|
var EMBER_GLIMMER_INVOKE_HELPER = featureValue(FEATURES.EMBER_GLIMMER_INVOKE_HELPER);
|
|
1388
1369
|
_exports.EMBER_GLIMMER_INVOKE_HELPER = EMBER_GLIMMER_INVOKE_HELPER;
|
|
1389
|
-
var EMBER_MODERNIZED_BUILT_IN_COMPONENTS = featureValue(FEATURES.EMBER_MODERNIZED_BUILT_IN_COMPONENTS);
|
|
1390
|
-
_exports.EMBER_MODERNIZED_BUILT_IN_COMPONENTS = EMBER_MODERNIZED_BUILT_IN_COMPONENTS;
|
|
1391
1370
|
var EMBER_STRICT_MODE = featureValue(FEATURES.EMBER_STRICT_MODE);
|
|
1392
1371
|
_exports.EMBER_STRICT_MODE = EMBER_STRICT_MODE;
|
|
1393
1372
|
var EMBER_DYNAMIC_HELPERS_AND_MODIFIERS = featureValue(FEATURES.EMBER_DYNAMIC_HELPERS_AND_MODIFIERS);
|
|
@@ -2140,13 +2119,11 @@ define("@ember/deprecated-features/index", ["exports"], function (_exports) {
|
|
|
2140
2119
|
Object.defineProperty(_exports, "__esModule", {
|
|
2141
2120
|
value: true
|
|
2142
2121
|
});
|
|
2143
|
-
_exports.ASSIGN =
|
|
2122
|
+
_exports.ASSIGN = void 0;
|
|
2144
2123
|
|
|
2145
2124
|
/* eslint-disable no-implicit-coercion */
|
|
2146
2125
|
// These versions should be the version that the deprecation was _introduced_,
|
|
2147
2126
|
// not the version that the feature will be removed.
|
|
2148
|
-
var ROUTER_EVENTS = !!'4.0.0';
|
|
2149
|
-
_exports.ROUTER_EVENTS = ROUTER_EVENTS;
|
|
2150
2127
|
var ASSIGN = !!'4.0.0-beta.1';
|
|
2151
2128
|
_exports.ASSIGN = ASSIGN;
|
|
2152
2129
|
});
|
|
@@ -2295,8 +2272,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2295
2272
|
|
|
2296
2273
|
class Yield extends (0, _syntax.node)('Yield').fields() {}
|
|
2297
2274
|
|
|
2298
|
-
class Partial extends (0, _syntax.node)('Partial').fields() {}
|
|
2299
|
-
|
|
2300
2275
|
class Debugger extends (0, _syntax.node)('Debugger').fields() {}
|
|
2301
2276
|
|
|
2302
2277
|
class CallExpression extends (0, _syntax.node)('CallExpression').fields() {}
|
|
@@ -2543,25 +2518,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2543
2518
|
|
|
2544
2519
|
}
|
|
2545
2520
|
|
|
2546
|
-
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
2547
|
-
if (!privateMap.has(receiver)) {
|
|
2548
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
2549
|
-
}
|
|
2550
|
-
|
|
2551
|
-
privateMap.set(receiver, value);
|
|
2552
|
-
return value;
|
|
2553
|
-
};
|
|
2554
|
-
|
|
2555
|
-
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
2556
|
-
if (!privateMap.has(receiver)) {
|
|
2557
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
2558
|
-
}
|
|
2559
|
-
|
|
2560
|
-
return privateMap.get(receiver);
|
|
2561
|
-
};
|
|
2562
|
-
|
|
2563
|
-
var _keywords, _type;
|
|
2564
|
-
|
|
2565
2521
|
class KeywordImpl {
|
|
2566
2522
|
constructor(keyword, type, delegate) {
|
|
2567
2523
|
this.keyword = keyword;
|
|
@@ -2650,21 +2606,18 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2650
2606
|
|
|
2651
2607
|
class Keywords {
|
|
2652
2608
|
constructor(type) {
|
|
2653
|
-
_keywords
|
|
2654
|
-
|
|
2655
|
-
_type.set(this, void 0);
|
|
2656
|
-
|
|
2657
|
-
__classPrivateFieldSet(this, _type, type);
|
|
2609
|
+
this._keywords = [];
|
|
2610
|
+
this._type = type;
|
|
2658
2611
|
}
|
|
2659
2612
|
|
|
2660
2613
|
kw(name, delegate) {
|
|
2661
|
-
|
|
2614
|
+
this._keywords.push(keyword(name, this._type, delegate));
|
|
2662
2615
|
|
|
2663
2616
|
return this;
|
|
2664
2617
|
}
|
|
2665
2618
|
|
|
2666
2619
|
translate(node$$1, state) {
|
|
2667
|
-
for (var _keyword of
|
|
2620
|
+
for (var _keyword of this._keywords) {
|
|
2668
2621
|
var result = _keyword.translate(node$$1, state);
|
|
2669
2622
|
|
|
2670
2623
|
if (result !== null) {
|
|
@@ -2678,9 +2631,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2678
2631
|
var {
|
|
2679
2632
|
name
|
|
2680
2633
|
} = path.ref;
|
|
2681
|
-
|
|
2682
|
-
var usedType = __classPrivateFieldGet(this, _type);
|
|
2683
|
-
|
|
2634
|
+
var usedType = this._type;
|
|
2684
2635
|
var validTypes = _syntax.KEYWORDS_TYPES[name];
|
|
2685
2636
|
|
|
2686
2637
|
if (validTypes.indexOf(usedType) === -1) {
|
|
@@ -2693,7 +2644,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
2693
2644
|
|
|
2694
2645
|
}
|
|
2695
2646
|
|
|
2696
|
-
_keywords = new WeakMap(), _type = new WeakMap();
|
|
2697
2647
|
var typesToReadableName = {
|
|
2698
2648
|
Append: 'an append statement',
|
|
2699
2649
|
Block: 'a block statement',
|
|
@@ -3383,55 +3333,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
3383
3333
|
}));
|
|
3384
3334
|
}
|
|
3385
3335
|
|
|
3386
|
-
}).kw('partial', {
|
|
3387
|
-
assert(node$$1, state) {
|
|
3388
|
-
if (state.isStrict) {
|
|
3389
|
-
return Err((0, _syntax.generateSyntaxError)('{{partial}} is not allowed in strict mode templates', node$$1.loc));
|
|
3390
|
-
}
|
|
3391
|
-
|
|
3392
|
-
var {
|
|
3393
|
-
args: {
|
|
3394
|
-
positional,
|
|
3395
|
-
named
|
|
3396
|
-
}
|
|
3397
|
-
} = node$$1;
|
|
3398
|
-
var {
|
|
3399
|
-
trusting
|
|
3400
|
-
} = node$$1;
|
|
3401
|
-
|
|
3402
|
-
if (positional.isEmpty()) {
|
|
3403
|
-
return Err((0, _syntax.generateSyntaxError)("Partial found with no arguments. You must specify a template name", node$$1.loc));
|
|
3404
|
-
} else if (positional.size !== 1) {
|
|
3405
|
-
return Err((0, _syntax.generateSyntaxError)("Partial found with " + positional.exprs.length + " arguments. You must specify a template name", node$$1.loc));
|
|
3406
|
-
}
|
|
3407
|
-
|
|
3408
|
-
if (named.isEmpty()) {
|
|
3409
|
-
if (trusting) {
|
|
3410
|
-
return Err((0, _syntax.generateSyntaxError)("{{{partial ...}}} is not supported, please use {{partial ...}} instead", node$$1.loc));
|
|
3411
|
-
}
|
|
3412
|
-
|
|
3413
|
-
return Ok(positional.nth(0));
|
|
3414
|
-
} else {
|
|
3415
|
-
return Err((0, _syntax.generateSyntaxError)("Partial does not take any named argument", node$$1.loc));
|
|
3416
|
-
}
|
|
3417
|
-
},
|
|
3418
|
-
|
|
3419
|
-
translate({
|
|
3420
|
-
node: node$$1,
|
|
3421
|
-
state
|
|
3422
|
-
}, expr) {
|
|
3423
|
-
state.scope.setHasEval();
|
|
3424
|
-
var visited = expr === undefined ? Ok(new _syntax.ASTv2.LiteralExpression({
|
|
3425
|
-
loc: _syntax.SourceSpan.synthetic('undefined'),
|
|
3426
|
-
value: undefined
|
|
3427
|
-
})) : VISIT_EXPRS.visit(expr, state);
|
|
3428
|
-
return visited.mapOk(target => new Partial({
|
|
3429
|
-
loc: node$$1.loc,
|
|
3430
|
-
scope: state.scope,
|
|
3431
|
-
target
|
|
3432
|
-
}));
|
|
3433
|
-
}
|
|
3434
|
-
|
|
3435
3336
|
}).kw('debugger', {
|
|
3436
3337
|
assert(node$$1) {
|
|
3437
3338
|
var {
|
|
@@ -4276,66 +4177,37 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4276
4177
|
}
|
|
4277
4178
|
|
|
4278
4179
|
var VISIT_STMTS = new NormalizationStatements();
|
|
4279
|
-
|
|
4280
|
-
var __classPrivateFieldSet$1 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
4281
|
-
if (!privateMap.has(receiver)) {
|
|
4282
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
4283
|
-
}
|
|
4284
|
-
|
|
4285
|
-
privateMap.set(receiver, value);
|
|
4286
|
-
return value;
|
|
4287
|
-
};
|
|
4288
|
-
|
|
4289
|
-
var __classPrivateFieldGet$1 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
4290
|
-
if (!privateMap.has(receiver)) {
|
|
4291
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
4292
|
-
}
|
|
4293
|
-
|
|
4294
|
-
return privateMap.get(receiver);
|
|
4295
|
-
};
|
|
4296
|
-
|
|
4297
|
-
var _currentScope, _cursorCount;
|
|
4298
4180
|
/**
|
|
4299
4181
|
* This is the mutable state for this compiler pass.
|
|
4300
4182
|
*/
|
|
4301
4183
|
|
|
4302
|
-
|
|
4303
4184
|
class NormalizationState {
|
|
4304
4185
|
constructor(block, isStrict) {
|
|
4305
4186
|
this.isStrict = isStrict;
|
|
4306
|
-
|
|
4307
|
-
_currentScope
|
|
4308
|
-
|
|
4309
|
-
_cursorCount.set(this, 0);
|
|
4310
|
-
|
|
4311
|
-
__classPrivateFieldSet$1(this, _currentScope, block);
|
|
4187
|
+
this._cursorCount = 0;
|
|
4188
|
+
this._currentScope = block;
|
|
4312
4189
|
}
|
|
4313
4190
|
|
|
4314
4191
|
generateUniqueCursor() {
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
return "%cursor:" + (__classPrivateFieldSet$1(this, _cursorCount, (_a = +__classPrivateFieldGet$1(this, _cursorCount)) + 1), _a) + "%";
|
|
4192
|
+
return "%cursor:" + this._cursorCount++ + "%";
|
|
4318
4193
|
}
|
|
4319
4194
|
|
|
4320
4195
|
get scope() {
|
|
4321
|
-
return
|
|
4196
|
+
return this._currentScope;
|
|
4322
4197
|
}
|
|
4323
4198
|
|
|
4324
4199
|
visitBlock(block) {
|
|
4325
|
-
var oldBlock =
|
|
4326
|
-
|
|
4327
|
-
__classPrivateFieldSet$1(this, _currentScope, block.scope);
|
|
4200
|
+
var oldBlock = this._currentScope;
|
|
4201
|
+
this._currentScope = block.scope;
|
|
4328
4202
|
|
|
4329
4203
|
try {
|
|
4330
4204
|
return VISIT_STMTS.visitList(block.body, this);
|
|
4331
4205
|
} finally {
|
|
4332
|
-
|
|
4206
|
+
this._currentScope = oldBlock;
|
|
4333
4207
|
}
|
|
4334
4208
|
}
|
|
4335
4209
|
|
|
4336
4210
|
}
|
|
4337
|
-
|
|
4338
|
-
_currentScope = new WeakMap(), _cursorCount = new WeakMap();
|
|
4339
4211
|
/**
|
|
4340
4212
|
* Normalize the AST from @glimmer/syntax into the HIR. The HIR has special
|
|
4341
4213
|
* instructions for keywords like `{{yield}}`, `(has-block)` and
|
|
@@ -4375,6 +4247,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4375
4247
|
* ```
|
|
4376
4248
|
*/
|
|
4377
4249
|
|
|
4250
|
+
|
|
4378
4251
|
function normalize$1(source, root, isStrict) {
|
|
4379
4252
|
// create a new context for the normalization pass
|
|
4380
4253
|
var state = new NormalizationState(root.table, isStrict);
|
|
@@ -4475,11 +4348,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4475
4348
|
:
|
|
4476
4349
|
return ['yield', opcode[1], this.formatParams(opcode[2])];
|
|
4477
4350
|
|
|
4478
|
-
case 19
|
|
4479
|
-
/* Partial */
|
|
4480
|
-
:
|
|
4481
|
-
return ['partial', this.formatOpcode(opcode[1]), opcode[2]];
|
|
4482
|
-
|
|
4483
4351
|
case 20
|
|
4484
4352
|
/* DynamicArg */
|
|
4485
4353
|
:
|
|
@@ -4555,11 +4423,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
4555
4423
|
:
|
|
4556
4424
|
return ['get-strict-free', this.upvars[opcode[1]], opcode[2]];
|
|
4557
4425
|
|
|
4558
|
-
case 33
|
|
4559
|
-
/* GetFreeAsFallback */
|
|
4560
|
-
:
|
|
4561
|
-
return ['GetFreeAsFallback', this.upvars[opcode[1]], opcode[2]];
|
|
4562
|
-
|
|
4563
4426
|
case 34
|
|
4564
4427
|
/* GetFreeAsComponentOrHelperHeadOrThisFallback */
|
|
4565
4428
|
:
|
|
@@ -5018,9 +4881,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
5018
4881
|
/* Debugger */
|
|
5019
4882
|
, stmt.scope.getEvalInfo()];
|
|
5020
4883
|
|
|
5021
|
-
case 'Partial':
|
|
5022
|
-
return this.Partial(stmt);
|
|
5023
|
-
|
|
5024
4884
|
case 'AppendComment':
|
|
5025
4885
|
return this.AppendComment(stmt);
|
|
5026
4886
|
|
|
@@ -5068,15 +4928,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
5068
4928
|
}
|
|
5069
4929
|
}
|
|
5070
4930
|
|
|
5071
|
-
Partial({
|
|
5072
|
-
target,
|
|
5073
|
-
scope
|
|
5074
|
-
}) {
|
|
5075
|
-
return [19
|
|
5076
|
-
/* Partial */
|
|
5077
|
-
, EXPR.expr(target), scope.getEvalInfo()];
|
|
5078
|
-
}
|
|
5079
|
-
|
|
5080
4931
|
Yield({
|
|
5081
4932
|
to,
|
|
5082
4933
|
positional
|
|
@@ -6550,7 +6401,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6550
6401
|
|
|
6551
6402
|
case 'each':
|
|
6552
6403
|
var keyExpr = normalized.hash ? normalized.hash['key'] : null;
|
|
6553
|
-
var key = keyExpr ? buildExpression(keyExpr, '
|
|
6404
|
+
var key = keyExpr ? buildExpression(keyExpr, 'Strict', symbols) : null;
|
|
6554
6405
|
return [42
|
|
6555
6406
|
/* Each */
|
|
6556
6407
|
, params[0], key, block, inverse];
|
|
@@ -6742,7 +6593,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6742
6593
|
{
|
|
6743
6594
|
var builtParams = buildParams(expr.params, symbols);
|
|
6744
6595
|
var builtHash = buildHash(expr.hash, symbols);
|
|
6745
|
-
var builtExpr = buildCallHead(expr.head, context === '
|
|
6596
|
+
var builtExpr = buildCallHead(expr.head, context === 'Strict' ? 'SubExpression' : varContext(context, false), symbols);
|
|
6746
6597
|
return [28
|
|
6747
6598
|
/* Call */
|
|
6748
6599
|
, builtExpr, builtParams, builtHash];
|
|
@@ -6758,8 +6609,8 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6758
6609
|
kind: VariableKind.Block,
|
|
6759
6610
|
name: expr.name,
|
|
6760
6611
|
mode: 'loose'
|
|
6761
|
-
},
|
|
6762
|
-
/*
|
|
6612
|
+
}, 0
|
|
6613
|
+
/* Strict */
|
|
6763
6614
|
, symbols)];
|
|
6764
6615
|
}
|
|
6765
6616
|
|
|
@@ -6773,8 +6624,8 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6773
6624
|
kind: VariableKind.Block,
|
|
6774
6625
|
name: expr.name,
|
|
6775
6626
|
mode: 'loose'
|
|
6776
|
-
},
|
|
6777
|
-
/*
|
|
6627
|
+
}, 0
|
|
6628
|
+
/* Strict */
|
|
6778
6629
|
, symbols)];
|
|
6779
6630
|
}
|
|
6780
6631
|
|
|
@@ -6807,8 +6658,8 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6807
6658
|
}
|
|
6808
6659
|
|
|
6809
6660
|
function buildGetPath(head, symbols) {
|
|
6810
|
-
return buildVar(head.path.head,
|
|
6811
|
-
/*
|
|
6661
|
+
return buildVar(head.path.head, 0
|
|
6662
|
+
/* Strict */
|
|
6812
6663
|
, symbols, head.path.tail);
|
|
6813
6664
|
}
|
|
6814
6665
|
|
|
@@ -6852,10 +6703,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6852
6703
|
op = 37
|
|
6853
6704
|
/* GetFreeAsHelperHead */
|
|
6854
6705
|
;
|
|
6855
|
-
} else if (context === 'Generic') {
|
|
6856
|
-
op = 33
|
|
6857
|
-
/* GetFreeAsFallback */
|
|
6858
|
-
;
|
|
6859
6706
|
} else {
|
|
6860
6707
|
op = expressionContextOp(context);
|
|
6861
6708
|
}
|
|
@@ -6926,13 +6773,6 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6926
6773
|
/* GetFreeAsHelperHeadOrThisFallback */
|
|
6927
6774
|
;
|
|
6928
6775
|
|
|
6929
|
-
case 4
|
|
6930
|
-
/* LooseFreeVariable */
|
|
6931
|
-
:
|
|
6932
|
-
return 33
|
|
6933
|
-
/* GetFreeAsFallback */
|
|
6934
|
-
;
|
|
6935
|
-
|
|
6936
6776
|
case 5
|
|
6937
6777
|
/* ResolveAsCallHead */
|
|
6938
6778
|
:
|
|
@@ -6961,7 +6801,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6961
6801
|
|
|
6962
6802
|
function buildParams(exprs, symbols) {
|
|
6963
6803
|
if (exprs === null || !(0, _util.isPresent)(exprs)) return null;
|
|
6964
|
-
return exprs.map(e => buildExpression(e, '
|
|
6804
|
+
return exprs.map(e => buildExpression(e, 'Strict', symbols));
|
|
6965
6805
|
}
|
|
6966
6806
|
|
|
6967
6807
|
function buildConcat(exprs, symbols) {
|
|
@@ -6973,7 +6813,7 @@ define("@glimmer/compiler", ["exports", "@glimmer/syntax", "@glimmer/util"], fun
|
|
|
6973
6813
|
var out = [[], []];
|
|
6974
6814
|
Object.keys(exprs).forEach(key => {
|
|
6975
6815
|
out[0].push(key);
|
|
6976
|
-
out[1].push(buildExpression(exprs[key], '
|
|
6816
|
+
out[1].push(buildExpression(exprs[key], 'Strict', symbols));
|
|
6977
6817
|
});
|
|
6978
6818
|
return out;
|
|
6979
6819
|
}
|
|
@@ -7086,27 +6926,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7086
6926
|
}
|
|
7087
6927
|
|
|
7088
6928
|
}
|
|
7089
|
-
|
|
7090
|
-
_exports.SourceSlice = SourceSlice;
|
|
7091
|
-
|
|
7092
|
-
var __classPrivateFieldSet = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
7093
|
-
if (!privateMap.has(receiver)) {
|
|
7094
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
7095
|
-
}
|
|
7096
|
-
|
|
7097
|
-
privateMap.set(receiver, value);
|
|
7098
|
-
return value;
|
|
7099
|
-
};
|
|
7100
|
-
|
|
7101
|
-
var __classPrivateFieldGet = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
7102
|
-
if (!privateMap.has(receiver)) {
|
|
7103
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
7104
|
-
}
|
|
7105
|
-
|
|
7106
|
-
return privateMap.get(receiver);
|
|
7107
|
-
};
|
|
7108
|
-
|
|
7109
|
-
var _whens, _map, _whens_1;
|
|
7110
6929
|
/**
|
|
7111
6930
|
* This file implements the DSL used by span and offset in places where they need to exhaustively
|
|
7112
6931
|
* consider all combinations of states (Handlebars offsets, character offsets and invisible/broken
|
|
@@ -7117,18 +6936,17 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7117
6936
|
*/
|
|
7118
6937
|
|
|
7119
6938
|
|
|
6939
|
+
_exports.SourceSlice = SourceSlice;
|
|
7120
6940
|
var MatchAny = 'MATCH_ANY';
|
|
7121
6941
|
var IsInvisible = 'IS_INVISIBLE';
|
|
7122
6942
|
|
|
7123
6943
|
class WhenList {
|
|
7124
6944
|
constructor(whens) {
|
|
7125
|
-
_whens
|
|
7126
|
-
|
|
7127
|
-
__classPrivateFieldSet(this, _whens, whens);
|
|
6945
|
+
this._whens = whens;
|
|
7128
6946
|
}
|
|
7129
6947
|
|
|
7130
6948
|
first(kind) {
|
|
7131
|
-
for (var when of
|
|
6949
|
+
for (var when of this._whens) {
|
|
7132
6950
|
var value = when.match(kind);
|
|
7133
6951
|
|
|
7134
6952
|
if ((0, _util.isPresent)(value)) {
|
|
@@ -7141,15 +6959,13 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7141
6959
|
|
|
7142
6960
|
}
|
|
7143
6961
|
|
|
7144
|
-
_whens = new WeakMap();
|
|
7145
|
-
|
|
7146
6962
|
class When {
|
|
7147
6963
|
constructor() {
|
|
7148
|
-
_map
|
|
6964
|
+
this._map = new Map();
|
|
7149
6965
|
}
|
|
7150
6966
|
|
|
7151
6967
|
get(pattern, or) {
|
|
7152
|
-
var value =
|
|
6968
|
+
var value = this._map.get(pattern);
|
|
7153
6969
|
|
|
7154
6970
|
if (value) {
|
|
7155
6971
|
return value;
|
|
@@ -7157,22 +6973,22 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7157
6973
|
|
|
7158
6974
|
value = or();
|
|
7159
6975
|
|
|
7160
|
-
|
|
6976
|
+
this._map.set(pattern, value);
|
|
7161
6977
|
|
|
7162
6978
|
return value;
|
|
7163
6979
|
}
|
|
7164
6980
|
|
|
7165
6981
|
add(pattern, out) {
|
|
7166
|
-
|
|
6982
|
+
this._map.set(pattern, out);
|
|
7167
6983
|
}
|
|
7168
6984
|
|
|
7169
6985
|
match(kind) {
|
|
7170
6986
|
var pattern = patternFor(kind);
|
|
7171
6987
|
var out = [];
|
|
7172
6988
|
|
|
7173
|
-
var exact =
|
|
6989
|
+
var exact = this._map.get(pattern);
|
|
7174
6990
|
|
|
7175
|
-
var fallback =
|
|
6991
|
+
var fallback = this._map.get(MatchAny);
|
|
7176
6992
|
|
|
7177
6993
|
if (exact) {
|
|
7178
6994
|
out.push(exact);
|
|
@@ -7187,15 +7003,13 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7187
7003
|
|
|
7188
7004
|
}
|
|
7189
7005
|
|
|
7190
|
-
_map = new WeakMap();
|
|
7191
|
-
|
|
7192
7006
|
function match(callback) {
|
|
7193
7007
|
return callback(new Matcher()).check();
|
|
7194
7008
|
}
|
|
7195
7009
|
|
|
7196
7010
|
class Matcher {
|
|
7197
7011
|
constructor() {
|
|
7198
|
-
|
|
7012
|
+
this._whens = new When();
|
|
7199
7013
|
}
|
|
7200
7014
|
/**
|
|
7201
7015
|
* You didn't exhaustively match all possibilities.
|
|
@@ -7207,7 +7021,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7207
7021
|
}
|
|
7208
7022
|
|
|
7209
7023
|
matchFor(left, right) {
|
|
7210
|
-
var nesteds =
|
|
7024
|
+
var nesteds = this._whens.match(left);
|
|
7211
7025
|
|
|
7212
7026
|
var callback = new WhenList(nesteds).first(right);
|
|
7213
7027
|
return callback;
|
|
@@ -7215,15 +7029,13 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7215
7029
|
|
|
7216
7030
|
when(left, right, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
7217
7031
|
callback) {
|
|
7218
|
-
|
|
7032
|
+
this._whens.get(left, () => new When()).add(right, callback);
|
|
7219
7033
|
|
|
7220
7034
|
return this;
|
|
7221
7035
|
}
|
|
7222
7036
|
|
|
7223
7037
|
}
|
|
7224
7038
|
|
|
7225
|
-
_whens_1 = new WeakMap();
|
|
7226
|
-
|
|
7227
7039
|
function patternFor(kind) {
|
|
7228
7040
|
switch (kind) {
|
|
7229
7041
|
case "Broken"
|
|
@@ -7240,26 +7052,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7240
7052
|
default:
|
|
7241
7053
|
return kind;
|
|
7242
7054
|
}
|
|
7243
|
-
}
|
|
7244
|
-
|
|
7245
|
-
var __classPrivateFieldGet$1 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
7246
|
-
if (!privateMap.has(receiver)) {
|
|
7247
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
7248
|
-
}
|
|
7249
|
-
|
|
7250
|
-
return privateMap.get(receiver);
|
|
7251
|
-
};
|
|
7252
|
-
|
|
7253
|
-
var __classPrivateFieldSet$1 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
7254
|
-
if (!privateMap.has(receiver)) {
|
|
7255
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
7256
|
-
}
|
|
7257
|
-
|
|
7258
|
-
privateMap.set(receiver, value);
|
|
7259
|
-
return value;
|
|
7260
|
-
};
|
|
7261
|
-
|
|
7262
|
-
var _locPos, _charPos; // eslint-disable-next-line import/no-extraneous-dependencies
|
|
7055
|
+
} // eslint-disable-next-line import/no-extraneous-dependencies
|
|
7263
7056
|
|
|
7264
7057
|
/**
|
|
7265
7058
|
* Used to indicate that an attempt to convert a `SourcePosition` to a character offset failed. It
|
|
@@ -7394,7 +7187,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7394
7187
|
;
|
|
7395
7188
|
/** Computed from char offset */
|
|
7396
7189
|
|
|
7397
|
-
_locPos
|
|
7190
|
+
this._locPos = null;
|
|
7398
7191
|
}
|
|
7399
7192
|
/**
|
|
7400
7193
|
* This is already a `CharPosition`.
|
|
@@ -7441,15 +7234,15 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7441
7234
|
|
|
7442
7235
|
|
|
7443
7236
|
toHbsPos() {
|
|
7444
|
-
var locPos =
|
|
7237
|
+
var locPos = this._locPos;
|
|
7445
7238
|
|
|
7446
7239
|
if (locPos === null) {
|
|
7447
7240
|
var hbsPos = this.source.hbsPosFor(this.charPos);
|
|
7448
7241
|
|
|
7449
7242
|
if (hbsPos === null) {
|
|
7450
|
-
|
|
7243
|
+
this._locPos = locPos = BROKEN;
|
|
7451
7244
|
} else {
|
|
7452
|
-
|
|
7245
|
+
this._locPos = locPos = new HbsPosition(this.source, hbsPos, this.charPos);
|
|
7453
7246
|
}
|
|
7454
7247
|
}
|
|
7455
7248
|
|
|
@@ -7458,8 +7251,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7458
7251
|
|
|
7459
7252
|
}
|
|
7460
7253
|
|
|
7461
|
-
_locPos = new WeakMap();
|
|
7462
|
-
|
|
7463
7254
|
class HbsPosition {
|
|
7464
7255
|
constructor(source, hbsPos, charPos = null) {
|
|
7465
7256
|
this.source = source;
|
|
@@ -7467,10 +7258,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7467
7258
|
this.kind = "HbsPosition"
|
|
7468
7259
|
/* HbsPosition */
|
|
7469
7260
|
;
|
|
7470
|
-
|
|
7471
|
-
_charPos.set(this, void 0);
|
|
7472
|
-
|
|
7473
|
-
__classPrivateFieldSet$1(this, _charPos, charPos === null ? null : new CharPosition(source, charPos));
|
|
7261
|
+
this._charPos = charPos === null ? null : new CharPosition(source, charPos);
|
|
7474
7262
|
}
|
|
7475
7263
|
/**
|
|
7476
7264
|
* Lazily compute the character offset from the {@see SourcePosition}. Once an `HbsPosition` has
|
|
@@ -7483,15 +7271,15 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7483
7271
|
|
|
7484
7272
|
|
|
7485
7273
|
toCharPos() {
|
|
7486
|
-
var charPos =
|
|
7274
|
+
var charPos = this._charPos;
|
|
7487
7275
|
|
|
7488
7276
|
if (charPos === null) {
|
|
7489
7277
|
var charPosNumber = this.source.charPosFor(this.hbsPos);
|
|
7490
7278
|
|
|
7491
7279
|
if (charPosNumber === null) {
|
|
7492
|
-
|
|
7280
|
+
this._charPos = charPos = BROKEN;
|
|
7493
7281
|
} else {
|
|
7494
|
-
|
|
7282
|
+
this._charPos = charPos = new CharPosition(this.source, charPosNumber);
|
|
7495
7283
|
}
|
|
7496
7284
|
}
|
|
7497
7285
|
|
|
@@ -7525,8 +7313,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7525
7313
|
|
|
7526
7314
|
}
|
|
7527
7315
|
|
|
7528
|
-
_charPos = new WeakMap();
|
|
7529
|
-
|
|
7530
7316
|
class InvisiblePosition {
|
|
7531
7317
|
constructor(kind, // whatever was provided, possibly broken
|
|
7532
7318
|
pos) {
|
|
@@ -7606,26 +7392,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7606
7392
|
var _a;
|
|
7607
7393
|
|
|
7608
7394
|
return ((_a = left.toCharPos()) === null || _a === void 0 ? void 0 : _a.offset) === right;
|
|
7609
|
-
}).when(MatchAny, MatchAny, () => false));
|
|
7610
|
-
|
|
7611
|
-
var __classPrivateFieldGet$2 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
7612
|
-
if (!privateMap.has(receiver)) {
|
|
7613
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
7614
|
-
}
|
|
7615
|
-
|
|
7616
|
-
return privateMap.get(receiver);
|
|
7617
|
-
};
|
|
7618
|
-
|
|
7619
|
-
var __classPrivateFieldSet$2 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
7620
|
-
if (!privateMap.has(receiver)) {
|
|
7621
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
7622
|
-
}
|
|
7623
|
-
|
|
7624
|
-
privateMap.set(receiver, value);
|
|
7625
|
-
return value;
|
|
7626
|
-
};
|
|
7627
|
-
|
|
7628
|
-
var _locPosSpan, _charPosSpan, _providedHbsLoc; // eslint-disable-next-line import/no-extraneous-dependencies
|
|
7395
|
+
}).when(MatchAny, MatchAny, () => false)); // eslint-disable-next-line import/no-extraneous-dependencies
|
|
7629
7396
|
|
|
7630
7397
|
/**
|
|
7631
7398
|
* A `SourceSpan` object represents a span of characters inside of a template source.
|
|
@@ -7662,7 +7429,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7662
7429
|
* The goal is to avoid creating any problems for use-cases like AST Explorer.
|
|
7663
7430
|
*/
|
|
7664
7431
|
|
|
7665
|
-
|
|
7666
7432
|
class SourceSpan {
|
|
7667
7433
|
constructor(data) {
|
|
7668
7434
|
this.data = data;
|
|
@@ -7918,8 +7684,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7918
7684
|
this.kind = "CharPosition"
|
|
7919
7685
|
/* CharPosition */
|
|
7920
7686
|
;
|
|
7921
|
-
|
|
7922
|
-
_locPosSpan.set(this, null);
|
|
7687
|
+
this._locPosSpan = null;
|
|
7923
7688
|
}
|
|
7924
7689
|
|
|
7925
7690
|
wrap() {
|
|
@@ -7945,19 +7710,19 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7945
7710
|
locDidUpdate() {}
|
|
7946
7711
|
|
|
7947
7712
|
toHbsSpan() {
|
|
7948
|
-
var locPosSpan =
|
|
7713
|
+
var locPosSpan = this._locPosSpan;
|
|
7949
7714
|
|
|
7950
7715
|
if (locPosSpan === null) {
|
|
7951
7716
|
var start = this.charPositions.start.toHbsPos();
|
|
7952
7717
|
var end = this.charPositions.end.toHbsPos();
|
|
7953
7718
|
|
|
7954
7719
|
if (start === null || end === null) {
|
|
7955
|
-
locPosSpan =
|
|
7720
|
+
locPosSpan = this._locPosSpan = BROKEN;
|
|
7956
7721
|
} else {
|
|
7957
|
-
locPosSpan =
|
|
7722
|
+
locPosSpan = this._locPosSpan = new HbsSpan(this.source, {
|
|
7958
7723
|
start,
|
|
7959
7724
|
end
|
|
7960
|
-
})
|
|
7725
|
+
});
|
|
7961
7726
|
}
|
|
7962
7727
|
}
|
|
7963
7728
|
|
|
@@ -7987,8 +7752,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7987
7752
|
|
|
7988
7753
|
}
|
|
7989
7754
|
|
|
7990
|
-
_locPosSpan = new WeakMap();
|
|
7991
|
-
|
|
7992
7755
|
class HbsSpan {
|
|
7993
7756
|
constructor(source, hbsPositions, providedHbsLoc = null) {
|
|
7994
7757
|
this.source = source;
|
|
@@ -7996,13 +7759,8 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
7996
7759
|
this.kind = "HbsPosition"
|
|
7997
7760
|
/* HbsPosition */
|
|
7998
7761
|
;
|
|
7999
|
-
|
|
8000
|
-
|
|
8001
|
-
|
|
8002
|
-
|
|
8003
|
-
_providedHbsLoc.set(this, void 0);
|
|
8004
|
-
|
|
8005
|
-
__classPrivateFieldSet$2(this, _providedHbsLoc, providedHbsLoc);
|
|
7762
|
+
this._charPosSpan = null;
|
|
7763
|
+
this._providedHbsLoc = providedHbsLoc;
|
|
8006
7764
|
}
|
|
8007
7765
|
|
|
8008
7766
|
serialize() {
|
|
@@ -8017,17 +7775,16 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8017
7775
|
}
|
|
8018
7776
|
|
|
8019
7777
|
updateProvided(pos, edge) {
|
|
8020
|
-
if (
|
|
8021
|
-
|
|
7778
|
+
if (this._providedHbsLoc) {
|
|
7779
|
+
this._providedHbsLoc[edge] = pos;
|
|
8022
7780
|
} // invalidate computed character offsets
|
|
8023
7781
|
|
|
8024
7782
|
|
|
8025
|
-
|
|
8026
|
-
|
|
8027
|
-
__classPrivateFieldSet$2(this, _providedHbsLoc, {
|
|
7783
|
+
this._charPosSpan = null;
|
|
7784
|
+
this._providedHbsLoc = {
|
|
8028
7785
|
start: pos,
|
|
8029
7786
|
end: pos
|
|
8030
|
-
}
|
|
7787
|
+
};
|
|
8031
7788
|
}
|
|
8032
7789
|
|
|
8033
7790
|
locDidUpdate({
|
|
@@ -8074,19 +7831,19 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8074
7831
|
}
|
|
8075
7832
|
|
|
8076
7833
|
toCharPosSpan() {
|
|
8077
|
-
var charPosSpan =
|
|
7834
|
+
var charPosSpan = this._charPosSpan;
|
|
8078
7835
|
|
|
8079
7836
|
if (charPosSpan === null) {
|
|
8080
7837
|
var start = this.hbsPositions.start.toCharPos();
|
|
8081
7838
|
var end = this.hbsPositions.end.toCharPos();
|
|
8082
7839
|
|
|
8083
7840
|
if (start && end) {
|
|
8084
|
-
charPosSpan =
|
|
7841
|
+
charPosSpan = this._charPosSpan = new CharPositionSpan(this.source, {
|
|
8085
7842
|
start,
|
|
8086
7843
|
end
|
|
8087
|
-
})
|
|
7844
|
+
});
|
|
8088
7845
|
} else {
|
|
8089
|
-
charPosSpan =
|
|
7846
|
+
charPosSpan = this._charPosSpan = BROKEN;
|
|
8090
7847
|
return null;
|
|
8091
7848
|
}
|
|
8092
7849
|
}
|
|
@@ -8096,8 +7853,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8096
7853
|
|
|
8097
7854
|
}
|
|
8098
7855
|
|
|
8099
|
-
_charPosSpan = new WeakMap(), _providedHbsLoc = new WeakMap();
|
|
8100
|
-
|
|
8101
7856
|
class InvisibleSpan {
|
|
8102
7857
|
constructor(kind, // whatever was provided, possibly broken
|
|
8103
7858
|
loc, // if the span represents a synthetic string
|
|
@@ -8324,7 +8079,9 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8324
8079
|
this.loc = loc;
|
|
8325
8080
|
this.type = 'PathExpression';
|
|
8326
8081
|
this.this = false;
|
|
8327
|
-
this.data = false;
|
|
8082
|
+
this.data = false; // Cache for the head value.
|
|
8083
|
+
|
|
8084
|
+
this._head = undefined;
|
|
8328
8085
|
var parts = tail.slice();
|
|
8329
8086
|
|
|
8330
8087
|
if (head.type === 'ThisHead') {
|
|
@@ -8340,6 +8097,10 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8340
8097
|
}
|
|
8341
8098
|
|
|
8342
8099
|
get head() {
|
|
8100
|
+
if (this._head) {
|
|
8101
|
+
return this._head;
|
|
8102
|
+
}
|
|
8103
|
+
|
|
8343
8104
|
var firstPart;
|
|
8344
8105
|
|
|
8345
8106
|
if (this.this) {
|
|
@@ -8353,7 +8114,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8353
8114
|
var firstPartLoc = this.loc.collapse('start').sliceStartChars({
|
|
8354
8115
|
chars: firstPart.length
|
|
8355
8116
|
}).loc;
|
|
8356
|
-
return publicBuilder.head(firstPart, firstPartLoc);
|
|
8117
|
+
return this._head = publicBuilder.head(firstPart, firstPartLoc);
|
|
8357
8118
|
}
|
|
8358
8119
|
|
|
8359
8120
|
get tail() {
|
|
@@ -8989,8 +8750,8 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
8989
8750
|
|
|
8990
8751
|
resolution() {
|
|
8991
8752
|
if (this.ambiguity.namespaces.length === 0) {
|
|
8992
|
-
return
|
|
8993
|
-
/*
|
|
8753
|
+
return 31
|
|
8754
|
+
/* GetStrictFree */
|
|
8994
8755
|
;
|
|
8995
8756
|
} else if (this.ambiguity.namespaces.length === 1) {
|
|
8996
8757
|
if (this.ambiguity.fallback) {
|
|
@@ -9112,8 +8873,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9112
8873
|
return class {
|
|
9113
8874
|
constructor(fields) {
|
|
9114
8875
|
this.type = type;
|
|
9115
|
-
this
|
|
9116
|
-
copy(fields, this);
|
|
8876
|
+
(0, _util.assign)(this, fields);
|
|
9117
8877
|
}
|
|
9118
8878
|
|
|
9119
8879
|
};
|
|
@@ -9125,8 +8885,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9125
8885
|
fields() {
|
|
9126
8886
|
return class {
|
|
9127
8887
|
constructor(fields) {
|
|
9128
|
-
this
|
|
9129
|
-
copy(fields, this);
|
|
8888
|
+
(0, _util.assign)(this, fields);
|
|
9130
8889
|
}
|
|
9131
8890
|
|
|
9132
8891
|
};
|
|
@@ -9135,16 +8894,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9135
8894
|
};
|
|
9136
8895
|
}
|
|
9137
8896
|
}
|
|
9138
|
-
|
|
9139
|
-
function keys(object) {
|
|
9140
|
-
return Object.keys(object);
|
|
9141
|
-
}
|
|
9142
|
-
|
|
9143
|
-
function copy(object1, object2) {
|
|
9144
|
-
for (var key of keys(object1)) {
|
|
9145
|
-
object2[key] = object1[key];
|
|
9146
|
-
}
|
|
9147
|
-
}
|
|
9148
8897
|
/**
|
|
9149
8898
|
* Corresponds to syntaxes with positional and named arguments:
|
|
9150
8899
|
*
|
|
@@ -9304,30 +9053,9 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9304
9053
|
|
|
9305
9054
|
class ElementModifier extends node('ElementModifier').fields() {}
|
|
9306
9055
|
|
|
9307
|
-
var __classPrivateFieldSet$3 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
9308
|
-
if (!privateMap.has(receiver)) {
|
|
9309
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
9310
|
-
}
|
|
9311
|
-
|
|
9312
|
-
privateMap.set(receiver, value);
|
|
9313
|
-
return value;
|
|
9314
|
-
};
|
|
9315
|
-
|
|
9316
|
-
var __classPrivateFieldGet$3 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
9317
|
-
if (!privateMap.has(receiver)) {
|
|
9318
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
9319
|
-
}
|
|
9320
|
-
|
|
9321
|
-
return privateMap.get(receiver);
|
|
9322
|
-
};
|
|
9323
|
-
|
|
9324
|
-
var _span;
|
|
9325
|
-
|
|
9326
9056
|
class SpanList {
|
|
9327
9057
|
constructor(span = []) {
|
|
9328
|
-
_span
|
|
9329
|
-
|
|
9330
|
-
__classPrivateFieldSet$3(this, _span, span);
|
|
9058
|
+
this._span = span;
|
|
9331
9059
|
}
|
|
9332
9060
|
|
|
9333
9061
|
static range(span, fallback = SourceSpan.NON_EXISTENT) {
|
|
@@ -9335,17 +9063,15 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9335
9063
|
}
|
|
9336
9064
|
|
|
9337
9065
|
add(offset) {
|
|
9338
|
-
|
|
9066
|
+
this._span.push(offset);
|
|
9339
9067
|
}
|
|
9340
9068
|
|
|
9341
9069
|
getRangeOffset(fallback) {
|
|
9342
|
-
if (
|
|
9070
|
+
if (this._span.length === 0) {
|
|
9343
9071
|
return fallback;
|
|
9344
9072
|
} else {
|
|
9345
|
-
var first =
|
|
9346
|
-
|
|
9347
|
-
var last = __classPrivateFieldGet$3(this, _span)[__classPrivateFieldGet$3(this, _span).length - 1];
|
|
9348
|
-
|
|
9073
|
+
var first = this._span[0];
|
|
9074
|
+
var last = this._span[this._span.length - 1];
|
|
9349
9075
|
return first.extend(last);
|
|
9350
9076
|
}
|
|
9351
9077
|
}
|
|
@@ -9353,7 +9079,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
9353
9079
|
}
|
|
9354
9080
|
|
|
9355
9081
|
_exports.SpanList = SpanList;
|
|
9356
|
-
_span = new WeakMap();
|
|
9357
9082
|
|
|
9358
9083
|
function loc(span) {
|
|
9359
9084
|
if (Array.isArray(span)) {
|
|
@@ -10345,160 +10070,11 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
10345
10070
|
return new TraversalError('Replacing and removing in key handlers is not yet supported.', node, null, key);
|
|
10346
10071
|
}
|
|
10347
10072
|
|
|
10348
|
-
function getLocalName(node) {
|
|
10349
|
-
switch (node.type) {
|
|
10350
|
-
case 'ElementNode':
|
|
10351
|
-
// unfortunately the ElementNode stores `tag` as a string
|
|
10352
|
-
// if that changes in glimmer-vm this will need to be updated
|
|
10353
|
-
return node.tag.split('.')[0];
|
|
10354
|
-
|
|
10355
|
-
case 'SubExpression':
|
|
10356
|
-
case 'MustacheStatement':
|
|
10357
|
-
case 'BlockStatement':
|
|
10358
|
-
return getLocalName(node.path);
|
|
10359
|
-
|
|
10360
|
-
case 'UndefinedLiteral':
|
|
10361
|
-
case 'NullLiteral':
|
|
10362
|
-
case 'BooleanLiteral':
|
|
10363
|
-
case 'StringLiteral':
|
|
10364
|
-
case 'NumberLiteral':
|
|
10365
|
-
case 'TextNode':
|
|
10366
|
-
case 'Template':
|
|
10367
|
-
case 'Block':
|
|
10368
|
-
case 'CommentStatement':
|
|
10369
|
-
case 'MustacheCommentStatement':
|
|
10370
|
-
case 'PartialStatement':
|
|
10371
|
-
case 'ElementModifierStatement':
|
|
10372
|
-
case 'AttrNode':
|
|
10373
|
-
case 'ConcatStatement':
|
|
10374
|
-
case 'Program':
|
|
10375
|
-
case 'Hash':
|
|
10376
|
-
case 'HashPair':
|
|
10377
|
-
return undefined;
|
|
10378
|
-
|
|
10379
|
-
case 'PathExpression':
|
|
10380
|
-
default:
|
|
10381
|
-
return node.parts.length ? node.parts[0] : undefined;
|
|
10382
|
-
}
|
|
10383
|
-
}
|
|
10384
|
-
|
|
10385
|
-
function getLocals(node) {
|
|
10386
|
-
switch (node.type) {
|
|
10387
|
-
case 'ElementNode':
|
|
10388
|
-
case 'Program':
|
|
10389
|
-
case 'Block':
|
|
10390
|
-
case 'Template':
|
|
10391
|
-
return node.blockParams;
|
|
10392
|
-
|
|
10393
|
-
case 'BlockStatement':
|
|
10394
|
-
return node.program.blockParams;
|
|
10395
|
-
|
|
10396
|
-
default:
|
|
10397
|
-
return undefined;
|
|
10398
|
-
}
|
|
10399
|
-
}
|
|
10400
|
-
|
|
10401
|
-
class TransformScope {
|
|
10402
|
-
constructor(locals) {
|
|
10403
|
-
this.locals = locals;
|
|
10404
|
-
this.hasPartial = false;
|
|
10405
|
-
this.usedLocals = {};
|
|
10406
|
-
|
|
10407
|
-
for (var local of locals) {
|
|
10408
|
-
this.usedLocals[local] = false;
|
|
10409
|
-
}
|
|
10410
|
-
}
|
|
10411
|
-
|
|
10412
|
-
child(node) {
|
|
10413
|
-
var locals = getLocals(node);
|
|
10414
|
-
return locals ? new ChildTransformScope(locals, this) : this;
|
|
10415
|
-
}
|
|
10416
|
-
|
|
10417
|
-
usePartial() {
|
|
10418
|
-
this.hasPartial = true;
|
|
10419
|
-
}
|
|
10420
|
-
|
|
10421
|
-
}
|
|
10422
|
-
|
|
10423
|
-
class RootTransformScope extends TransformScope {
|
|
10424
|
-
constructor(node) {
|
|
10425
|
-
var _a;
|
|
10426
|
-
|
|
10427
|
-
var locals = (_a = getLocals(node)) !== null && _a !== void 0 ? _a : [];
|
|
10428
|
-
super(locals);
|
|
10429
|
-
}
|
|
10430
|
-
|
|
10431
|
-
useLocal(node) {
|
|
10432
|
-
var name = getLocalName(node);
|
|
10433
|
-
|
|
10434
|
-
if (name && name in this.usedLocals) {
|
|
10435
|
-
this.usedLocals[name] = true;
|
|
10436
|
-
}
|
|
10437
|
-
}
|
|
10438
|
-
|
|
10439
|
-
isLocal(name) {
|
|
10440
|
-
return this.locals.indexOf(name) !== -1;
|
|
10441
|
-
}
|
|
10442
|
-
|
|
10443
|
-
currentUnusedLocals() {
|
|
10444
|
-
if (!this.hasPartial && this.locals.length > 0) {
|
|
10445
|
-
return this.locals.filter(local => !this.usedLocals[local]);
|
|
10446
|
-
}
|
|
10447
|
-
|
|
10448
|
-
return false;
|
|
10449
|
-
}
|
|
10450
|
-
|
|
10451
|
-
}
|
|
10452
|
-
|
|
10453
|
-
class ChildTransformScope extends TransformScope {
|
|
10454
|
-
constructor(locals, parent) {
|
|
10455
|
-
super(locals);
|
|
10456
|
-
this.parent = parent;
|
|
10457
|
-
}
|
|
10458
|
-
|
|
10459
|
-
useLocal(node) {
|
|
10460
|
-
var name = getLocalName(node);
|
|
10461
|
-
|
|
10462
|
-
if (name && name in this.usedLocals) {
|
|
10463
|
-
this.usedLocals[name] = true;
|
|
10464
|
-
} else {
|
|
10465
|
-
this.parent.useLocal(node);
|
|
10466
|
-
}
|
|
10467
|
-
}
|
|
10468
|
-
|
|
10469
|
-
isLocal(name) {
|
|
10470
|
-
return this.locals.indexOf(name) !== -1 || this.parent.isLocal(name);
|
|
10471
|
-
}
|
|
10472
|
-
|
|
10473
|
-
currentUnusedLocals() {
|
|
10474
|
-
if (!this.hasPartial && this.locals.length > 0) {
|
|
10475
|
-
// We only care about the last local, because if it is used then it implies
|
|
10476
|
-
// usage of the others (specifically when in a child block, |foo bar|)
|
|
10477
|
-
if (!this.usedLocals[this.locals[this.locals.length - 1]]) {
|
|
10478
|
-
return [this.locals[this.locals.length - 1]];
|
|
10479
|
-
}
|
|
10480
|
-
}
|
|
10481
|
-
|
|
10482
|
-
return false;
|
|
10483
|
-
}
|
|
10484
|
-
|
|
10485
|
-
}
|
|
10486
|
-
|
|
10487
10073
|
class WalkerPath {
|
|
10488
10074
|
constructor(node, parent = null, parentKey = null) {
|
|
10489
10075
|
this.node = node;
|
|
10490
10076
|
this.parent = parent;
|
|
10491
10077
|
this.parentKey = parentKey;
|
|
10492
|
-
this.scope = parent ? parent.scope.child(node) : new RootTransformScope(node); // Consume in scope values
|
|
10493
|
-
|
|
10494
|
-
if (node.type === 'PathExpression') {
|
|
10495
|
-
this.scope.useLocal(node);
|
|
10496
|
-
}
|
|
10497
|
-
|
|
10498
|
-
if (node.type === 'ElementNode') {
|
|
10499
|
-
this.scope.useLocal(node);
|
|
10500
|
-
node.children.forEach(node => this.scope.useLocal(node));
|
|
10501
|
-
}
|
|
10502
10078
|
}
|
|
10503
10079
|
|
|
10504
10080
|
get parentNode() {
|
|
@@ -10618,10 +10194,10 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
10618
10194
|
}
|
|
10619
10195
|
|
|
10620
10196
|
if (result === undefined) {
|
|
10621
|
-
var
|
|
10197
|
+
var keys = visitorKeys[node.type];
|
|
10622
10198
|
|
|
10623
|
-
for (var i = 0; i <
|
|
10624
|
-
var key =
|
|
10199
|
+
for (var i = 0; i < keys.length; i++) {
|
|
10200
|
+
var key = keys[i]; // we know if it has child keys we can widen to a ParentNode
|
|
10625
10201
|
|
|
10626
10202
|
visitKey(visitor, handler, path, key);
|
|
10627
10203
|
}
|
|
@@ -12251,25 +11827,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
12251
11827
|
return program;
|
|
12252
11828
|
}
|
|
12253
11829
|
|
|
12254
|
-
var __classPrivateFieldSet$4 = undefined && undefined.__classPrivateFieldSet || function (receiver, privateMap, value) {
|
|
12255
|
-
if (!privateMap.has(receiver)) {
|
|
12256
|
-
throw new TypeError("attempted to set private field on non-instance");
|
|
12257
|
-
}
|
|
12258
|
-
|
|
12259
|
-
privateMap.set(receiver, value);
|
|
12260
|
-
return value;
|
|
12261
|
-
};
|
|
12262
|
-
|
|
12263
|
-
var __classPrivateFieldGet$4 = undefined && undefined.__classPrivateFieldGet || function (receiver, privateMap) {
|
|
12264
|
-
if (!privateMap.has(receiver)) {
|
|
12265
|
-
throw new TypeError("attempted to get private field on non-instance");
|
|
12266
|
-
}
|
|
12267
|
-
|
|
12268
|
-
return privateMap.get(receiver);
|
|
12269
|
-
};
|
|
12270
|
-
|
|
12271
|
-
var _hasEval;
|
|
12272
|
-
|
|
12273
11830
|
class SymbolTable {
|
|
12274
11831
|
static top(locals, customizeComponentName) {
|
|
12275
11832
|
return new ProgramSymbolTable(locals, customizeComponentName);
|
|
@@ -12295,8 +11852,7 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
12295
11852
|
this.named = (0, _util.dict)();
|
|
12296
11853
|
this.blocks = (0, _util.dict)();
|
|
12297
11854
|
this.usedTemplateLocals = [];
|
|
12298
|
-
|
|
12299
|
-
_hasEval.set(this, false);
|
|
11855
|
+
this._hasEval = false;
|
|
12300
11856
|
}
|
|
12301
11857
|
|
|
12302
11858
|
getUsedTemplateLocals() {
|
|
@@ -12304,11 +11860,11 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
12304
11860
|
}
|
|
12305
11861
|
|
|
12306
11862
|
setHasEval() {
|
|
12307
|
-
|
|
11863
|
+
this._hasEval = true;
|
|
12308
11864
|
}
|
|
12309
11865
|
|
|
12310
11866
|
get hasEval() {
|
|
12311
|
-
return
|
|
11867
|
+
return this._hasEval;
|
|
12312
11868
|
}
|
|
12313
11869
|
|
|
12314
11870
|
has(name) {
|
|
@@ -12388,7 +11944,6 @@ define("@glimmer/syntax", ["exports", "@glimmer/util", "simple-html-tokenizer",
|
|
|
12388
11944
|
}
|
|
12389
11945
|
|
|
12390
11946
|
_exports.ProgramSymbolTable = ProgramSymbolTable;
|
|
12391
|
-
_hasEval = new WeakMap();
|
|
12392
11947
|
|
|
12393
11948
|
class BlockSymbolTable extends SymbolTable {
|
|
12394
11949
|
constructor(parent, symbols, slots) {
|
|
@@ -18003,7 +17558,7 @@ define("ember-template-compiler/lib/plugins/assert-splattribute-expression", ["e
|
|
|
18003
17558
|
return '`...attributes` can only be used in the element position e.g. `<div ...attributes />`. It cannot be used as a path.';
|
|
18004
17559
|
}
|
|
18005
17560
|
});
|
|
18006
|
-
define("ember-template-compiler/lib/plugins/index", ["exports", "ember-template-compiler/lib/plugins/assert-against-attrs", "ember-template-compiler/lib/plugins/assert-against-dynamic-helpers-modifiers", "ember-template-compiler/lib/plugins/assert-against-named-blocks", "ember-template-compiler/lib/plugins/assert-against-named-outlets", "ember-template-compiler/lib/plugins/assert-input-helper-without-block", "ember-template-compiler/lib/plugins/assert-reserved-named-arguments", "ember-template-compiler/lib/plugins/assert-splattribute-expression", "ember-template-compiler/lib/plugins/transform-action-syntax", "ember-template-compiler/lib/plugins/transform-each-in-into-each", "ember-template-compiler/lib/plugins/transform-each-track-array", "ember-template-compiler/lib/plugins/transform-in-element", "ember-template-compiler/lib/plugins/transform-
|
|
17561
|
+
define("ember-template-compiler/lib/plugins/index", ["exports", "ember-template-compiler/lib/plugins/assert-against-attrs", "ember-template-compiler/lib/plugins/assert-against-dynamic-helpers-modifiers", "ember-template-compiler/lib/plugins/assert-against-named-blocks", "ember-template-compiler/lib/plugins/assert-against-named-outlets", "ember-template-compiler/lib/plugins/assert-input-helper-without-block", "ember-template-compiler/lib/plugins/assert-reserved-named-arguments", "ember-template-compiler/lib/plugins/assert-splattribute-expression", "ember-template-compiler/lib/plugins/transform-action-syntax", "ember-template-compiler/lib/plugins/transform-each-in-into-each", "ember-template-compiler/lib/plugins/transform-each-track-array", "ember-template-compiler/lib/plugins/transform-in-element", "ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings", "ember-template-compiler/lib/plugins/transform-resolutions", "ember-template-compiler/lib/plugins/transform-wrap-mount-and-outlet"], function (_exports, _assertAgainstAttrs, _assertAgainstDynamicHelpersModifiers, _assertAgainstNamedBlocks, _assertAgainstNamedOutlets, _assertInputHelperWithoutBlock, _assertReservedNamedArguments, _assertSplattributeExpression, _transformActionSyntax, _transformEachInIntoEach, _transformEachTrackArray, _transformInElement, _transformQuotedBindingsIntoJustBindings, _transformResolutions, _transformWrapMountAndOutlet) {
|
|
18007
17562
|
"use strict";
|
|
18008
17563
|
|
|
18009
17564
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -18011,7 +17566,7 @@ define("ember-template-compiler/lib/plugins/index", ["exports", "ember-template-
|
|
|
18011
17566
|
});
|
|
18012
17567
|
_exports.STRICT_MODE_TRANSFORMS = _exports.RESOLUTION_MODE_TRANSFORMS = void 0;
|
|
18013
17568
|
// order of plugins is important
|
|
18014
|
-
var RESOLUTION_MODE_TRANSFORMS = Object.freeze([_transformQuotedBindingsIntoJustBindings.default, _assertReservedNamedArguments.default, _transformActionSyntax.default, _assertAgainstAttrs.default, _transformEachInIntoEach.default,
|
|
17569
|
+
var RESOLUTION_MODE_TRANSFORMS = Object.freeze([_transformQuotedBindingsIntoJustBindings.default, _assertReservedNamedArguments.default, _transformActionSyntax.default, _assertAgainstAttrs.default, _transformEachInIntoEach.default, _assertInputHelperWithoutBlock.default, _transformInElement.default, _assertSplattributeExpression.default, _transformEachTrackArray.default, _assertAgainstNamedOutlets.default, _transformWrapMountAndOutlet.default, !true
|
|
18015
17570
|
/* EMBER_NAMED_BLOCKS */
|
|
18016
17571
|
? _assertAgainstNamedBlocks.default : null, true
|
|
18017
17572
|
/* EMBER_DYNAMIC_HELPERS_AND_MODIFIERS */
|
|
@@ -18268,160 +17823,6 @@ define("ember-template-compiler/lib/plugins/transform-in-element", ["exports", "
|
|
|
18268
17823
|
};
|
|
18269
17824
|
}
|
|
18270
17825
|
});
|
|
18271
|
-
define("ember-template-compiler/lib/plugins/transform-link-to", ["exports", "@ember/debug", "ember-template-compiler/lib/system/calculate-location-display", "ember-template-compiler/lib/plugins/utils"], function (_exports, _debug, _calculateLocationDisplay, _utils) {
|
|
18272
|
-
"use strict";
|
|
18273
|
-
|
|
18274
|
-
Object.defineProperty(_exports, "__esModule", {
|
|
18275
|
-
value: true
|
|
18276
|
-
});
|
|
18277
|
-
_exports.default = transformLinkTo;
|
|
18278
|
-
|
|
18279
|
-
function isInlineLinkTo(node) {
|
|
18280
|
-
return (0, _utils.isPath)(node.path) && node.path.original === 'link-to';
|
|
18281
|
-
}
|
|
18282
|
-
|
|
18283
|
-
function isBlockLinkTo(node) {
|
|
18284
|
-
return (0, _utils.isPath)(node.path) && node.path.original === 'link-to';
|
|
18285
|
-
}
|
|
18286
|
-
|
|
18287
|
-
function isQueryParams(node) {
|
|
18288
|
-
return (0, _utils.isSubExpression)(node) && (0, _utils.isPath)(node.path) && node.path.original === 'query-params';
|
|
18289
|
-
}
|
|
18290
|
-
|
|
18291
|
-
function transformInlineLinkToIntoBlockForm(env, node) {
|
|
18292
|
-
var {
|
|
18293
|
-
builders: b
|
|
18294
|
-
} = env.syntax;
|
|
18295
|
-
return b.block('link-to', node.params.slice(1), node.hash, b.blockItself([buildStatement(b, node.params[0], node.escaped, node.loc)], undefined, false, node.loc), null, node.loc);
|
|
18296
|
-
}
|
|
18297
|
-
|
|
18298
|
-
function transformPositionalLinkToIntoNamedArguments(env, node, hasBlock = true) {
|
|
18299
|
-
var _a, _b;
|
|
18300
|
-
|
|
18301
|
-
var {
|
|
18302
|
-
builders: b
|
|
18303
|
-
} = env.syntax;
|
|
18304
|
-
var moduleName = (_a = env.meta) === null || _a === void 0 ? void 0 : _a.moduleName;
|
|
18305
|
-
var {
|
|
18306
|
-
params,
|
|
18307
|
-
hash: {
|
|
18308
|
-
pairs
|
|
18309
|
-
}
|
|
18310
|
-
} = node;
|
|
18311
|
-
var keys = pairs.map(pair => pair.key);
|
|
18312
|
-
|
|
18313
|
-
if (params.length === 0) {
|
|
18314
|
-
(true && !(keys.indexOf('params') !== -1 || keys.indexOf('route') !== -1 || keys.indexOf('model') !== -1 || keys.indexOf('models') !== -1 || keys.indexOf('query') !== -1) && (0, _debug.assert)("You must provide one or more parameters to the `{{link-to}}` component. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('params') !== -1 || keys.indexOf('route') !== -1 || keys.indexOf('model') !== -1 || keys.indexOf('models') !== -1 || keys.indexOf('query') !== -1));
|
|
18315
|
-
return node;
|
|
18316
|
-
} else {
|
|
18317
|
-
(true && !(keys.indexOf('params') === -1) && (0, _debug.assert)("You cannot pass positional parameters and the `params` argument to the `{{link-to}}` component at the same time. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('params') === -1));
|
|
18318
|
-
(true && !(keys.indexOf('route') === -1) && (0, _debug.assert)("You cannot pass positional parameters and the `route` argument to the `{{link-to}}` component at the same time. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('route') === -1));
|
|
18319
|
-
(true && !(keys.indexOf('model') === -1) && (0, _debug.assert)("You cannot pass positional parameters and the `model` argument to the `{{link-to}}` component at the same time. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('model') === -1));
|
|
18320
|
-
(true && !(keys.indexOf('models') === -1) && (0, _debug.assert)("You cannot pass positional parameters and the `models` argument to the `{{link-to}}` component at the same time. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('models') === -1));
|
|
18321
|
-
(true && !(keys.indexOf('query') === -1) && (0, _debug.assert)("You cannot pass positional parameters and the `query` argument to the `{{link-to}}` component at the same time. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), keys.indexOf('query') === -1));
|
|
18322
|
-
}
|
|
18323
|
-
|
|
18324
|
-
(true && !(params.length > 0) && (0, _debug.assert)("You must provide one or more parameters to the `{{link-to}}` component. " + (0, _calculateLocationDisplay.default)(moduleName, node.loc), params.length > 0));
|
|
18325
|
-
var equivalentNamedArgs = [];
|
|
18326
|
-
var hasQueryParams = false; // 1. The last argument is possibly the `query` object.
|
|
18327
|
-
|
|
18328
|
-
var query = params[params.length - 1];
|
|
18329
|
-
|
|
18330
|
-
if (query && isQueryParams(query)) {
|
|
18331
|
-
params.pop();
|
|
18332
|
-
(true && !(query.params.length === 0) && (0, _debug.assert)("The `(query-params ...)` helper does not take positional arguments. " + (0, _calculateLocationDisplay.default)(moduleName, query.loc), query.params.length === 0));
|
|
18333
|
-
pairs.push(b.pair('query', b.sexpr(b.path('-hash', query.path.loc), [], query.hash, query.loc), query.loc));
|
|
18334
|
-
hasQueryParams = true;
|
|
18335
|
-
} // 2. If there is a `route`, it is now at index 0.
|
|
18336
|
-
|
|
18337
|
-
|
|
18338
|
-
var route = params.shift();
|
|
18339
|
-
|
|
18340
|
-
if (route) {
|
|
18341
|
-
pairs.push(b.pair('route', route, route.loc));
|
|
18342
|
-
equivalentNamedArgs.push('`@route`');
|
|
18343
|
-
} // 3. Any remaining indices (if any) are `models`.
|
|
18344
|
-
|
|
18345
|
-
|
|
18346
|
-
if (params.length === 1) {
|
|
18347
|
-
pairs.push(b.pair('model', params[0], params[0].loc));
|
|
18348
|
-
equivalentNamedArgs.push('`@model`');
|
|
18349
|
-
} else if (params.length > 1) {
|
|
18350
|
-
pairs.push(b.pair('models', b.sexpr(b.path('array', node.loc), params, undefined, node.loc), node.loc));
|
|
18351
|
-
equivalentNamedArgs.push('`@models`');
|
|
18352
|
-
}
|
|
18353
|
-
|
|
18354
|
-
if (hasQueryParams) {
|
|
18355
|
-
equivalentNamedArgs.push('`@query`');
|
|
18356
|
-
}
|
|
18357
|
-
|
|
18358
|
-
if (equivalentNamedArgs.length > 0) {
|
|
18359
|
-
var message = 'Invoking the `<LinkTo>` component with positional arguments is deprecated.';
|
|
18360
|
-
message += "Please use the equivalent named arguments (" + equivalentNamedArgs.join(', ') + ")";
|
|
18361
|
-
|
|
18362
|
-
if (hasQueryParams) {
|
|
18363
|
-
message += ' along with the `hash` helper';
|
|
18364
|
-
}
|
|
18365
|
-
|
|
18366
|
-
if (!hasBlock) {
|
|
18367
|
-
message += " and pass a block for the link's content.";
|
|
18368
|
-
}
|
|
18369
|
-
|
|
18370
|
-
message += '.';
|
|
18371
|
-
|
|
18372
|
-
if ((_b = node.loc) === null || _b === void 0 ? void 0 : _b.source) {
|
|
18373
|
-
message += " " + (0, _calculateLocationDisplay.default)(moduleName, node.loc);
|
|
18374
|
-
}
|
|
18375
|
-
|
|
18376
|
-
(true && !(false) && (0, _debug.deprecate)(message, false, {
|
|
18377
|
-
id: 'ember-glimmer.link-to.positional-arguments',
|
|
18378
|
-
until: '4.0.0',
|
|
18379
|
-
for: 'ember-source',
|
|
18380
|
-
url: 'https://deprecations.emberjs.com/v3.x#toc_ember-glimmer-link-to-positional-arguments',
|
|
18381
|
-
since: {
|
|
18382
|
-
enabled: '3.26.0-beta.1'
|
|
18383
|
-
}
|
|
18384
|
-
}));
|
|
18385
|
-
}
|
|
18386
|
-
|
|
18387
|
-
return b.block(node.path, null, b.hash(pairs, node.hash.loc), node.program, node.inverse, node.loc);
|
|
18388
|
-
}
|
|
18389
|
-
|
|
18390
|
-
function buildStatement(b, content, escaped, loc) {
|
|
18391
|
-
switch (content.type) {
|
|
18392
|
-
case 'PathExpression':
|
|
18393
|
-
return b.mustache(content, undefined, undefined, !escaped, loc);
|
|
18394
|
-
|
|
18395
|
-
case 'SubExpression':
|
|
18396
|
-
return b.mustache(content.path, content.params, content.hash, !escaped, loc);
|
|
18397
|
-
// The default case handles literals.
|
|
18398
|
-
|
|
18399
|
-
default:
|
|
18400
|
-
return b.text("" + content.value, loc);
|
|
18401
|
-
}
|
|
18402
|
-
}
|
|
18403
|
-
|
|
18404
|
-
function transformLinkTo(env) {
|
|
18405
|
-
return {
|
|
18406
|
-
name: 'transform-link-to',
|
|
18407
|
-
visitor: {
|
|
18408
|
-
MustacheStatement(node) {
|
|
18409
|
-
if (isInlineLinkTo(node)) {
|
|
18410
|
-
var block = transformInlineLinkToIntoBlockForm(env, node);
|
|
18411
|
-
return transformPositionalLinkToIntoNamedArguments(env, block, false);
|
|
18412
|
-
}
|
|
18413
|
-
},
|
|
18414
|
-
|
|
18415
|
-
BlockStatement(node) {
|
|
18416
|
-
if (isBlockLinkTo(node)) {
|
|
18417
|
-
return transformPositionalLinkToIntoNamedArguments(env, node);
|
|
18418
|
-
}
|
|
18419
|
-
}
|
|
18420
|
-
|
|
18421
|
-
}
|
|
18422
|
-
};
|
|
18423
|
-
}
|
|
18424
|
-
});
|
|
18425
17826
|
define("ember-template-compiler/lib/plugins/transform-quoted-bindings-into-just-bindings", ["exports"], function (_exports) {
|
|
18426
17827
|
"use strict";
|
|
18427
17828
|
|
|
@@ -19067,7 +18468,7 @@ define("ember/version", ["exports"], function (_exports) {
|
|
|
19067
18468
|
value: true
|
|
19068
18469
|
});
|
|
19069
18470
|
_exports.default = void 0;
|
|
19070
|
-
var _default = "4.1.0
|
|
18471
|
+
var _default = "4.1.0";
|
|
19071
18472
|
_exports.default = _default;
|
|
19072
18473
|
});
|
|
19073
18474
|
define("simple-html-tokenizer", ["exports"], function (_exports) {
|
|
@@ -21358,6 +20759,237 @@ define("simple-html-tokenizer", ["exports"], function (_exports) {
|
|
|
21358
20759
|
/* commentStart */
|
|
21359
20760
|
);
|
|
21360
20761
|
this.delegate.beginComment();
|
|
20762
|
+
} else {
|
|
20763
|
+
var maybeDoctype = char.toUpperCase() + this.input.substring(this.index, this.index + 6).toUpperCase();
|
|
20764
|
+
|
|
20765
|
+
if (maybeDoctype === 'DOCTYPE') {
|
|
20766
|
+
this.consume();
|
|
20767
|
+
this.consume();
|
|
20768
|
+
this.consume();
|
|
20769
|
+
this.consume();
|
|
20770
|
+
this.consume();
|
|
20771
|
+
this.consume();
|
|
20772
|
+
this.transitionTo("doctype"
|
|
20773
|
+
/* doctype */
|
|
20774
|
+
);
|
|
20775
|
+
if (this.delegate.beginDoctype) this.delegate.beginDoctype();
|
|
20776
|
+
}
|
|
20777
|
+
}
|
|
20778
|
+
},
|
|
20779
|
+
doctype: function () {
|
|
20780
|
+
var char = this.consume();
|
|
20781
|
+
|
|
20782
|
+
if (isSpace(char)) {
|
|
20783
|
+
this.transitionTo("beforeDoctypeName"
|
|
20784
|
+
/* beforeDoctypeName */
|
|
20785
|
+
);
|
|
20786
|
+
}
|
|
20787
|
+
},
|
|
20788
|
+
beforeDoctypeName: function () {
|
|
20789
|
+
var char = this.consume();
|
|
20790
|
+
|
|
20791
|
+
if (isSpace(char)) {
|
|
20792
|
+
return;
|
|
20793
|
+
} else {
|
|
20794
|
+
this.transitionTo("doctypeName"
|
|
20795
|
+
/* doctypeName */
|
|
20796
|
+
);
|
|
20797
|
+
if (this.delegate.appendToDoctypeName) this.delegate.appendToDoctypeName(char.toLowerCase());
|
|
20798
|
+
}
|
|
20799
|
+
},
|
|
20800
|
+
doctypeName: function () {
|
|
20801
|
+
var char = this.consume();
|
|
20802
|
+
|
|
20803
|
+
if (isSpace(char)) {
|
|
20804
|
+
this.transitionTo("afterDoctypeName"
|
|
20805
|
+
/* afterDoctypeName */
|
|
20806
|
+
);
|
|
20807
|
+
} else if (char === '>') {
|
|
20808
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20809
|
+
this.transitionTo("beforeData"
|
|
20810
|
+
/* beforeData */
|
|
20811
|
+
);
|
|
20812
|
+
} else {
|
|
20813
|
+
if (this.delegate.appendToDoctypeName) this.delegate.appendToDoctypeName(char.toLowerCase());
|
|
20814
|
+
}
|
|
20815
|
+
},
|
|
20816
|
+
afterDoctypeName: function () {
|
|
20817
|
+
var char = this.consume();
|
|
20818
|
+
|
|
20819
|
+
if (isSpace(char)) {
|
|
20820
|
+
return;
|
|
20821
|
+
} else if (char === '>') {
|
|
20822
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20823
|
+
this.transitionTo("beforeData"
|
|
20824
|
+
/* beforeData */
|
|
20825
|
+
);
|
|
20826
|
+
} else {
|
|
20827
|
+
var nextSixChars = char.toUpperCase() + this.input.substring(this.index, this.index + 5).toUpperCase();
|
|
20828
|
+
var isPublic = nextSixChars.toUpperCase() === 'PUBLIC';
|
|
20829
|
+
var isSystem = nextSixChars.toUpperCase() === 'SYSTEM';
|
|
20830
|
+
|
|
20831
|
+
if (isPublic || isSystem) {
|
|
20832
|
+
this.consume();
|
|
20833
|
+
this.consume();
|
|
20834
|
+
this.consume();
|
|
20835
|
+
this.consume();
|
|
20836
|
+
this.consume();
|
|
20837
|
+
this.consume();
|
|
20838
|
+
}
|
|
20839
|
+
|
|
20840
|
+
if (isPublic) {
|
|
20841
|
+
this.transitionTo("afterDoctypePublicKeyword"
|
|
20842
|
+
/* afterDoctypePublicKeyword */
|
|
20843
|
+
);
|
|
20844
|
+
} else if (isSystem) {
|
|
20845
|
+
this.transitionTo("afterDoctypeSystemKeyword"
|
|
20846
|
+
/* afterDoctypeSystemKeyword */
|
|
20847
|
+
);
|
|
20848
|
+
}
|
|
20849
|
+
}
|
|
20850
|
+
},
|
|
20851
|
+
afterDoctypePublicKeyword: function () {
|
|
20852
|
+
var char = this.peek();
|
|
20853
|
+
|
|
20854
|
+
if (isSpace(char)) {
|
|
20855
|
+
this.transitionTo("beforeDoctypePublicIdentifier"
|
|
20856
|
+
/* beforeDoctypePublicIdentifier */
|
|
20857
|
+
);
|
|
20858
|
+
this.consume();
|
|
20859
|
+
} else if (char === '"') {
|
|
20860
|
+
this.transitionTo("doctypePublicIdentifierDoubleQuoted"
|
|
20861
|
+
/* doctypePublicIdentifierDoubleQuoted */
|
|
20862
|
+
);
|
|
20863
|
+
this.consume();
|
|
20864
|
+
} else if (char === "'") {
|
|
20865
|
+
this.transitionTo("doctypePublicIdentifierSingleQuoted"
|
|
20866
|
+
/* doctypePublicIdentifierSingleQuoted */
|
|
20867
|
+
);
|
|
20868
|
+
this.consume();
|
|
20869
|
+
} else if (char === '>') {
|
|
20870
|
+
this.consume();
|
|
20871
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20872
|
+
this.transitionTo("beforeData"
|
|
20873
|
+
/* beforeData */
|
|
20874
|
+
);
|
|
20875
|
+
}
|
|
20876
|
+
},
|
|
20877
|
+
doctypePublicIdentifierDoubleQuoted: function () {
|
|
20878
|
+
var char = this.consume();
|
|
20879
|
+
|
|
20880
|
+
if (char === '"') {
|
|
20881
|
+
this.transitionTo("afterDoctypePublicIdentifier"
|
|
20882
|
+
/* afterDoctypePublicIdentifier */
|
|
20883
|
+
);
|
|
20884
|
+
} else if (char === '>') {
|
|
20885
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20886
|
+
this.transitionTo("beforeData"
|
|
20887
|
+
/* beforeData */
|
|
20888
|
+
);
|
|
20889
|
+
} else {
|
|
20890
|
+
if (this.delegate.appendToDoctypePublicIdentifier) this.delegate.appendToDoctypePublicIdentifier(char);
|
|
20891
|
+
}
|
|
20892
|
+
},
|
|
20893
|
+
doctypePublicIdentifierSingleQuoted: function () {
|
|
20894
|
+
var char = this.consume();
|
|
20895
|
+
|
|
20896
|
+
if (char === "'") {
|
|
20897
|
+
this.transitionTo("afterDoctypePublicIdentifier"
|
|
20898
|
+
/* afterDoctypePublicIdentifier */
|
|
20899
|
+
);
|
|
20900
|
+
} else if (char === '>') {
|
|
20901
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20902
|
+
this.transitionTo("beforeData"
|
|
20903
|
+
/* beforeData */
|
|
20904
|
+
);
|
|
20905
|
+
} else {
|
|
20906
|
+
if (this.delegate.appendToDoctypePublicIdentifier) this.delegate.appendToDoctypePublicIdentifier(char);
|
|
20907
|
+
}
|
|
20908
|
+
},
|
|
20909
|
+
afterDoctypePublicIdentifier: function () {
|
|
20910
|
+
var char = this.consume();
|
|
20911
|
+
|
|
20912
|
+
if (isSpace(char)) {
|
|
20913
|
+
this.transitionTo("betweenDoctypePublicAndSystemIdentifiers"
|
|
20914
|
+
/* betweenDoctypePublicAndSystemIdentifiers */
|
|
20915
|
+
);
|
|
20916
|
+
} else if (char === '>') {
|
|
20917
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20918
|
+
this.transitionTo("beforeData"
|
|
20919
|
+
/* beforeData */
|
|
20920
|
+
);
|
|
20921
|
+
} else if (char === '"') {
|
|
20922
|
+
this.transitionTo("doctypeSystemIdentifierDoubleQuoted"
|
|
20923
|
+
/* doctypeSystemIdentifierDoubleQuoted */
|
|
20924
|
+
);
|
|
20925
|
+
} else if (char === "'") {
|
|
20926
|
+
this.transitionTo("doctypeSystemIdentifierSingleQuoted"
|
|
20927
|
+
/* doctypeSystemIdentifierSingleQuoted */
|
|
20928
|
+
);
|
|
20929
|
+
}
|
|
20930
|
+
},
|
|
20931
|
+
betweenDoctypePublicAndSystemIdentifiers: function () {
|
|
20932
|
+
var char = this.consume();
|
|
20933
|
+
|
|
20934
|
+
if (isSpace(char)) {
|
|
20935
|
+
return;
|
|
20936
|
+
} else if (char === '>') {
|
|
20937
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20938
|
+
this.transitionTo("beforeData"
|
|
20939
|
+
/* beforeData */
|
|
20940
|
+
);
|
|
20941
|
+
} else if (char === '"') {
|
|
20942
|
+
this.transitionTo("doctypeSystemIdentifierDoubleQuoted"
|
|
20943
|
+
/* doctypeSystemIdentifierDoubleQuoted */
|
|
20944
|
+
);
|
|
20945
|
+
} else if (char === "'") {
|
|
20946
|
+
this.transitionTo("doctypeSystemIdentifierSingleQuoted"
|
|
20947
|
+
/* doctypeSystemIdentifierSingleQuoted */
|
|
20948
|
+
);
|
|
20949
|
+
}
|
|
20950
|
+
},
|
|
20951
|
+
doctypeSystemIdentifierDoubleQuoted: function () {
|
|
20952
|
+
var char = this.consume();
|
|
20953
|
+
|
|
20954
|
+
if (char === '"') {
|
|
20955
|
+
this.transitionTo("afterDoctypeSystemIdentifier"
|
|
20956
|
+
/* afterDoctypeSystemIdentifier */
|
|
20957
|
+
);
|
|
20958
|
+
} else if (char === '>') {
|
|
20959
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20960
|
+
this.transitionTo("beforeData"
|
|
20961
|
+
/* beforeData */
|
|
20962
|
+
);
|
|
20963
|
+
} else {
|
|
20964
|
+
if (this.delegate.appendToDoctypeSystemIdentifier) this.delegate.appendToDoctypeSystemIdentifier(char);
|
|
20965
|
+
}
|
|
20966
|
+
},
|
|
20967
|
+
doctypeSystemIdentifierSingleQuoted: function () {
|
|
20968
|
+
var char = this.consume();
|
|
20969
|
+
|
|
20970
|
+
if (char === "'") {
|
|
20971
|
+
this.transitionTo("afterDoctypeSystemIdentifier"
|
|
20972
|
+
/* afterDoctypeSystemIdentifier */
|
|
20973
|
+
);
|
|
20974
|
+
} else if (char === '>') {
|
|
20975
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20976
|
+
this.transitionTo("beforeData"
|
|
20977
|
+
/* beforeData */
|
|
20978
|
+
);
|
|
20979
|
+
} else {
|
|
20980
|
+
if (this.delegate.appendToDoctypeSystemIdentifier) this.delegate.appendToDoctypeSystemIdentifier(char);
|
|
20981
|
+
}
|
|
20982
|
+
},
|
|
20983
|
+
afterDoctypeSystemIdentifier: function () {
|
|
20984
|
+
var char = this.consume();
|
|
20985
|
+
|
|
20986
|
+
if (isSpace(char)) {
|
|
20987
|
+
return;
|
|
20988
|
+
} else if (char === '>') {
|
|
20989
|
+
if (this.delegate.endDoctype) this.delegate.endDoctype();
|
|
20990
|
+
this.transitionTo("beforeData"
|
|
20991
|
+
/* beforeData */
|
|
20992
|
+
);
|
|
21361
20993
|
}
|
|
21362
20994
|
},
|
|
21363
20995
|
commentStart: function () {
|
|
@@ -21935,6 +21567,49 @@ define("simple-html-tokenizer", ["exports"], function (_exports) {
|
|
|
21935
21567
|
}; // Data
|
|
21936
21568
|
|
|
21937
21569
|
|
|
21570
|
+
Tokenizer.prototype.beginDoctype = function () {
|
|
21571
|
+
this.push({
|
|
21572
|
+
type: "Doctype"
|
|
21573
|
+
/* Doctype */
|
|
21574
|
+
,
|
|
21575
|
+
name: ''
|
|
21576
|
+
});
|
|
21577
|
+
};
|
|
21578
|
+
|
|
21579
|
+
Tokenizer.prototype.appendToDoctypeName = function (char) {
|
|
21580
|
+
this.current("Doctype"
|
|
21581
|
+
/* Doctype */
|
|
21582
|
+
).name += char;
|
|
21583
|
+
};
|
|
21584
|
+
|
|
21585
|
+
Tokenizer.prototype.appendToDoctypePublicIdentifier = function (char) {
|
|
21586
|
+
var doctype = this.current("Doctype"
|
|
21587
|
+
/* Doctype */
|
|
21588
|
+
);
|
|
21589
|
+
|
|
21590
|
+
if (doctype.publicIdentifier === undefined) {
|
|
21591
|
+
doctype.publicIdentifier = char;
|
|
21592
|
+
} else {
|
|
21593
|
+
doctype.publicIdentifier += char;
|
|
21594
|
+
}
|
|
21595
|
+
};
|
|
21596
|
+
|
|
21597
|
+
Tokenizer.prototype.appendToDoctypeSystemIdentifier = function (char) {
|
|
21598
|
+
var doctype = this.current("Doctype"
|
|
21599
|
+
/* Doctype */
|
|
21600
|
+
);
|
|
21601
|
+
|
|
21602
|
+
if (doctype.systemIdentifier === undefined) {
|
|
21603
|
+
doctype.systemIdentifier = char;
|
|
21604
|
+
} else {
|
|
21605
|
+
doctype.systemIdentifier += char;
|
|
21606
|
+
}
|
|
21607
|
+
};
|
|
21608
|
+
|
|
21609
|
+
Tokenizer.prototype.endDoctype = function () {
|
|
21610
|
+
this.addLocInfo();
|
|
21611
|
+
};
|
|
21612
|
+
|
|
21938
21613
|
Tokenizer.prototype.beginData = function () {
|
|
21939
21614
|
this.push({
|
|
21940
21615
|
type: "Chars"
|