ember-source 5.7.0-alpha.2 → 5.7.0-alpha.4
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/debug.js +8 -25
- package/dist/dependencies/@glimmer/destroyable.js +2 -4
- package/dist/dependencies/@glimmer/encoder.js +1 -4
- package/dist/dependencies/@glimmer/manager.js +36 -47
- package/dist/dependencies/@glimmer/node.js +1 -2
- package/dist/dependencies/@glimmer/opcode-compiler.js +124 -188
- package/dist/dependencies/@glimmer/program.js +5 -7
- package/dist/dependencies/@glimmer/reference.js +2 -4
- package/dist/dependencies/@glimmer/runtime.js +355 -544
- package/dist/dependencies/@glimmer/util.js +9 -32
- package/dist/dependencies/@glimmer/validator.js +9 -15
- package/dist/ember-template-compiler.js +399 -336
- 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 +552 -873
- package/dist/ember.debug.map +1 -1
- package/dist/header/license.js +1 -1
- package/dist/packages/@ember/-internals/glimmer/index.js +2 -0
- package/dist/packages/ember/version.js +1 -1
- package/docs/data.json +1 -1
- package/package.json +18 -18
package/dist/ember.debug.js
CHANGED
|
@@ -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.7.0-alpha.
|
|
9
|
+
* @version 5.7.0-alpha.4
|
|
10
10
|
*/
|
|
11
11
|
/* eslint-disable no-var */
|
|
12
12
|
/* globals global globalThis self */
|
|
@@ -2491,6 +2491,8 @@ define("@ember/-internals/glimmer/index", ["exports", "@glimmer/opcode-compiler"
|
|
|
2491
2491
|
function installAttributeBinding(component, rootRef, parsed, operations) {
|
|
2492
2492
|
let [prop, attribute, isSimple] = parsed;
|
|
2493
2493
|
if (attribute === 'id') {
|
|
2494
|
+
// SAFETY: `get` could not infer the type of `prop` and just gave us `unknown`.
|
|
2495
|
+
// we may want to throw an error in the future if the value isn't string or null/undefined.
|
|
2494
2496
|
let elementId = (0, _metal.get)(component, prop);
|
|
2495
2497
|
if (elementId === undefined || elementId === null) {
|
|
2496
2498
|
elementId = component.elementId;
|
|
@@ -26274,19 +26276,12 @@ define("@glimmer/debug", ["exports", "@glimmer/util", "@glimmer/vm"], function (
|
|
|
26274
26276
|
_exports.wrap = wrap;
|
|
26275
26277
|
/* This file is generated by build/debug.js */
|
|
26276
26278
|
|
|
26277
|
-
function fillNulls(count) {
|
|
26278
|
-
let arr = new Array(count);
|
|
26279
|
-
for (let i = 0; i < count; i++) {
|
|
26280
|
-
arr[i] = null;
|
|
26281
|
-
}
|
|
26282
|
-
return arr;
|
|
26283
|
-
}
|
|
26284
26279
|
function opcodeMetadata(op, isMachine) {
|
|
26285
26280
|
let value = isMachine ? MACHINE_METADATA[op] : METADATA[op];
|
|
26286
26281
|
return value || null;
|
|
26287
26282
|
}
|
|
26288
|
-
const METADATA =
|
|
26289
|
-
const MACHINE_METADATA =
|
|
26283
|
+
const METADATA = new Array(_vm.Op.Size).fill(null);
|
|
26284
|
+
const MACHINE_METADATA = new Array(_vm.Op.Size).fill(null);
|
|
26290
26285
|
MACHINE_METADATA[_vm.MachineOp.PushFrame] = {
|
|
26291
26286
|
name: 'PushFrame',
|
|
26292
26287
|
mnemonic: 'pushf',
|
|
@@ -27486,11 +27481,8 @@ define("@glimmer/debug", ["exports", "@glimmer/util", "@glimmer/vm"], function (
|
|
|
27486
27481
|
predicate
|
|
27487
27482
|
};
|
|
27488
27483
|
}
|
|
27489
|
-
function strip(strings) {
|
|
27484
|
+
function strip(strings, ...args) {
|
|
27490
27485
|
let out = '';
|
|
27491
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
27492
|
-
args[_key - 1] = arguments[_key];
|
|
27493
|
-
}
|
|
27494
27486
|
for (let i = 0; i < strings.length; i++) {
|
|
27495
27487
|
let string = strings[i];
|
|
27496
27488
|
let dynamic = args[i] !== undefined ? String(args[i]) : '';
|
|
@@ -27499,8 +27491,7 @@ define("@glimmer/debug", ["exports", "@glimmer/util", "@glimmer/vm"], function (
|
|
|
27499
27491
|
|
|
27500
27492
|
// eslint-disable-next-line regexp/no-super-linear-backtracking
|
|
27501
27493
|
out = /^\s*?\n?([\s\S]*?)\s*$/u.exec(out)[1];
|
|
27502
|
-
let min =
|
|
27503
|
-
|
|
27494
|
+
let min = Number.MAX_SAFE_INTEGER;
|
|
27504
27495
|
for (let line of out.split('\n')) {
|
|
27505
27496
|
let leading = /^\s*/u.exec(line)[0].length;
|
|
27506
27497
|
min = Math.min(min, leading);
|
|
@@ -27645,14 +27636,10 @@ define("@glimmer/debug", ["exports", "@glimmer/util", "@glimmer/vm"], function (
|
|
|
27645
27636
|
validate(obj) {
|
|
27646
27637
|
if (typeof obj !== 'object') return false;
|
|
27647
27638
|
if (obj === null || obj === undefined) return false;
|
|
27648
|
-
return Object.entries(this.checkers).every(
|
|
27649
|
-
let [k, checker] = _ref;
|
|
27650
|
-
return k in obj ? checker.validate(obj[k]) : false;
|
|
27651
|
-
});
|
|
27639
|
+
return Object.entries(this.checkers).every(([k, checker]) => k in obj ? checker.validate(obj[k]) : false);
|
|
27652
27640
|
}
|
|
27653
27641
|
expected() {
|
|
27654
|
-
let pairs = Object.entries(this.checkers).map(
|
|
27655
|
-
let [k, checker] = _ref2;
|
|
27642
|
+
let pairs = Object.entries(this.checkers).map(([k, checker]) => {
|
|
27656
27643
|
return `${k}: ${checker.expected()}`;
|
|
27657
27644
|
});
|
|
27658
27645
|
return `{ ${pairs.join(',')} }`;
|
|
@@ -27740,8 +27727,7 @@ define("@glimmer/debug", ["exports", "@glimmer/util", "@glimmer/vm"], function (
|
|
|
27740
27727
|
function defaultMessage(value, expected) {
|
|
27741
27728
|
return `Got ${value}, expected:\n${expected}`;
|
|
27742
27729
|
}
|
|
27743
|
-
function check(value, checker) {
|
|
27744
|
-
let message = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : defaultMessage;
|
|
27730
|
+
function check(value, checker, message = defaultMessage) {
|
|
27745
27731
|
if (typeof checker === 'function') {
|
|
27746
27732
|
checker(value);
|
|
27747
27733
|
return value;
|
|
@@ -27774,8 +27760,7 @@ define("@glimmer/debug", ["exports", "@glimmer/util", "@glimmer/vm"], function (
|
|
|
27774
27760
|
function CheckOr(left, right) {
|
|
27775
27761
|
return new OrChecker(left, right);
|
|
27776
27762
|
}
|
|
27777
|
-
function CheckValue(value) {
|
|
27778
|
-
let desc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(value);
|
|
27763
|
+
function CheckValue(value, desc = String(value)) {
|
|
27779
27764
|
return new ExactValueChecker(value, desc);
|
|
27780
27765
|
}
|
|
27781
27766
|
const CheckBlockSymbolTable = _exports.CheckBlockSymbolTable = CheckInterface({
|
|
@@ -27882,8 +27867,7 @@ define("@glimmer/destroyable", ["exports", "@glimmer/global-context", "@glimmer/
|
|
|
27882
27867
|
childMeta.parents = push(childMeta.parents, parent);
|
|
27883
27868
|
return child;
|
|
27884
27869
|
}
|
|
27885
|
-
function registerDestructor(destroyable, destructor) {
|
|
27886
|
-
let eager = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
27870
|
+
function registerDestructor(destroyable, destructor, eager = false) {
|
|
27887
27871
|
if (true /* DEBUG */ && isDestroying(destroyable)) {
|
|
27888
27872
|
throw new Error('Attempted to register a destructor with an object that is already destroying or destroyed');
|
|
27889
27873
|
}
|
|
@@ -27892,8 +27876,7 @@ define("@glimmer/destroyable", ["exports", "@glimmer/global-context", "@glimmer/
|
|
|
27892
27876
|
meta[destructorsKey] = push(meta[destructorsKey], destructor);
|
|
27893
27877
|
return destructor;
|
|
27894
27878
|
}
|
|
27895
|
-
function unregisterDestructor(destroyable, destructor) {
|
|
27896
|
-
let eager = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : false;
|
|
27879
|
+
function unregisterDestructor(destroyable, destructor, eager = false) {
|
|
27897
27880
|
if (true /* DEBUG */ && isDestroying(destroyable)) {
|
|
27898
27881
|
throw new Error('Attempted to unregister a destructor with an object that is already destroying or destroyed');
|
|
27899
27882
|
}
|
|
@@ -27996,10 +27979,7 @@ define("@glimmer/encoder", ["exports", "@glimmer/vm"], function (_exports, _vm)
|
|
|
27996
27979
|
this.size = 0;
|
|
27997
27980
|
this.buffer = buffer;
|
|
27998
27981
|
}
|
|
27999
|
-
encode(type, machine) {
|
|
28000
|
-
for (var _len = arguments.length, args = new Array(_len > 2 ? _len - 2 : 0), _key = 2; _key < _len; _key++) {
|
|
28001
|
-
args[_key - 2] = arguments[_key];
|
|
28002
|
-
}
|
|
27982
|
+
encode(type, machine, ...args) {
|
|
28003
27983
|
if (type > _vm.TYPE_SIZE) {
|
|
28004
27984
|
throw new Error(`Opcode type over 8-bits. Got ${type}.`);
|
|
28005
27985
|
}
|
|
@@ -28403,8 +28383,7 @@ define("@glimmer/manager", ["exports", "@glimmer/util", "@glimmer/destroyable",
|
|
|
28403
28383
|
(0, _debug.check)(capabilities, _debug.CheckNumber);
|
|
28404
28384
|
return !!(capabilities & capability);
|
|
28405
28385
|
}
|
|
28406
|
-
function helperCapabilities(managerAPI) {
|
|
28407
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
28386
|
+
function helperCapabilities(managerAPI, options = {}) {
|
|
28408
28387
|
if (true /* DEBUG */ && managerAPI !== '3.23') {
|
|
28409
28388
|
throw new Error('Invalid helper manager compatibility specified');
|
|
28410
28389
|
}
|
|
@@ -28505,11 +28484,10 @@ define("@glimmer/manager", ["exports", "@glimmer/util", "@glimmer/destroyable",
|
|
|
28505
28484
|
args
|
|
28506
28485
|
};
|
|
28507
28486
|
}
|
|
28508
|
-
getValue(
|
|
28509
|
-
|
|
28510
|
-
|
|
28511
|
-
|
|
28512
|
-
} = _ref;
|
|
28487
|
+
getValue({
|
|
28488
|
+
fn,
|
|
28489
|
+
args
|
|
28490
|
+
}) {
|
|
28513
28491
|
if (Object.keys(args.named).length > 0) {
|
|
28514
28492
|
let argsForFn = [...args.positional, args.named];
|
|
28515
28493
|
return fn(...argsForFn);
|
|
@@ -28642,8 +28620,7 @@ define("@glimmer/manager", ["exports", "@glimmer/util", "@glimmer/destroyable",
|
|
|
28642
28620
|
willDestroy: false,
|
|
28643
28621
|
hasSubOwner: false
|
|
28644
28622
|
};
|
|
28645
|
-
function componentCapabilities(managerAPI) {
|
|
28646
|
-
let options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
28623
|
+
function componentCapabilities(managerAPI, options = {}) {
|
|
28647
28624
|
if (true /* DEBUG */ && managerAPI !== '3.13') {
|
|
28648
28625
|
throw new Error('Invalid component manager compatibility specified');
|
|
28649
28626
|
}
|
|
@@ -28736,31 +28713,28 @@ define("@glimmer/manager", ["exports", "@glimmer/util", "@glimmer/destroyable",
|
|
|
28736
28713
|
delegate.updateComponent(component, args);
|
|
28737
28714
|
}
|
|
28738
28715
|
}
|
|
28739
|
-
didCreate(
|
|
28740
|
-
|
|
28741
|
-
|
|
28742
|
-
|
|
28743
|
-
} = _ref;
|
|
28716
|
+
didCreate({
|
|
28717
|
+
component,
|
|
28718
|
+
delegate
|
|
28719
|
+
}) {
|
|
28744
28720
|
if (hasAsyncLifeCycleCallbacks(delegate)) {
|
|
28745
28721
|
delegate.didCreateComponent(component);
|
|
28746
28722
|
}
|
|
28747
28723
|
}
|
|
28748
|
-
didUpdate(
|
|
28749
|
-
|
|
28750
|
-
|
|
28751
|
-
|
|
28752
|
-
} = _ref2;
|
|
28724
|
+
didUpdate({
|
|
28725
|
+
component,
|
|
28726
|
+
delegate
|
|
28727
|
+
}) {
|
|
28753
28728
|
if (hasAsyncUpdateHook(delegate)) {
|
|
28754
28729
|
delegate.didUpdateComponent(component);
|
|
28755
28730
|
}
|
|
28756
28731
|
}
|
|
28757
28732
|
didRenderLayout() {}
|
|
28758
28733
|
didUpdateLayout() {}
|
|
28759
|
-
getSelf(
|
|
28760
|
-
|
|
28761
|
-
|
|
28762
|
-
|
|
28763
|
-
} = _ref3;
|
|
28734
|
+
getSelf({
|
|
28735
|
+
component,
|
|
28736
|
+
delegate
|
|
28737
|
+
}) {
|
|
28764
28738
|
return (0, _reference.createConstRef)(delegate.getContext(component), 'this');
|
|
28765
28739
|
}
|
|
28766
28740
|
getDestroyable(bucket) {
|
|
@@ -28792,8 +28766,7 @@ define("@glimmer/manager", ["exports", "@glimmer/util", "@glimmer/destroyable",
|
|
|
28792
28766
|
this.args = args;
|
|
28793
28767
|
}
|
|
28794
28768
|
}
|
|
28795
|
-
function modifierCapabilities(managerAPI) {
|
|
28796
|
-
let optionalFeatures = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
28769
|
+
function modifierCapabilities(managerAPI, optionalFeatures = {}) {
|
|
28797
28770
|
if (true /* DEBUG */ && managerAPI !== '3.22') {
|
|
28798
28771
|
throw new Error('Invalid modifier manager compatibility specified');
|
|
28799
28772
|
}
|
|
@@ -28867,25 +28840,22 @@ define("@glimmer/manager", ["exports", "@glimmer/util", "@glimmer/destroyable",
|
|
|
28867
28840
|
(0, _destroyable.registerDestructor)(state, () => delegate.destroyModifier(instance, args));
|
|
28868
28841
|
return state;
|
|
28869
28842
|
}
|
|
28870
|
-
getDebugName(
|
|
28871
|
-
|
|
28872
|
-
|
|
28873
|
-
} = _ref;
|
|
28843
|
+
getDebugName({
|
|
28844
|
+
debugName
|
|
28845
|
+
}) {
|
|
28874
28846
|
return debugName;
|
|
28875
28847
|
}
|
|
28876
|
-
getTag(
|
|
28877
|
-
|
|
28878
|
-
|
|
28879
|
-
} = _ref2;
|
|
28848
|
+
getTag({
|
|
28849
|
+
tag
|
|
28850
|
+
}) {
|
|
28880
28851
|
return tag;
|
|
28881
28852
|
}
|
|
28882
|
-
install(
|
|
28883
|
-
|
|
28884
|
-
|
|
28885
|
-
|
|
28886
|
-
|
|
28887
|
-
|
|
28888
|
-
} = _ref3;
|
|
28853
|
+
install({
|
|
28854
|
+
element,
|
|
28855
|
+
args,
|
|
28856
|
+
modifier,
|
|
28857
|
+
delegate
|
|
28858
|
+
}) {
|
|
28889
28859
|
let {
|
|
28890
28860
|
capabilities
|
|
28891
28861
|
} = delegate;
|
|
@@ -28895,12 +28865,11 @@ define("@glimmer/manager", ["exports", "@glimmer/util", "@glimmer/destroyable",
|
|
|
28895
28865
|
delegate.installModifier(modifier, (0, _util.castToBrowser)(element, 'ELEMENT'), args);
|
|
28896
28866
|
}
|
|
28897
28867
|
}
|
|
28898
|
-
update(
|
|
28899
|
-
|
|
28900
|
-
|
|
28901
|
-
|
|
28902
|
-
|
|
28903
|
-
} = _ref4;
|
|
28868
|
+
update({
|
|
28869
|
+
args,
|
|
28870
|
+
modifier,
|
|
28871
|
+
delegate
|
|
28872
|
+
}) {
|
|
28904
28873
|
let {
|
|
28905
28874
|
capabilities
|
|
28906
28875
|
} = delegate;
|
|
@@ -29081,8 +29050,7 @@ define("@glimmer/node", ["exports", "@glimmer/runtime", "@simple-dom/document"],
|
|
|
29081
29050
|
}
|
|
29082
29051
|
return super.openElement(tag);
|
|
29083
29052
|
}
|
|
29084
|
-
pushRemoteElement(element, cursorId) {
|
|
29085
|
-
let insertBefore = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : null;
|
|
29053
|
+
pushRemoteElement(element, cursorId, insertBefore = null) {
|
|
29086
29054
|
let {
|
|
29087
29055
|
dom
|
|
29088
29056
|
} = this;
|
|
@@ -29151,8 +29119,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29151
29119
|
* <Foo></Foo>
|
|
29152
29120
|
* <Foo @arg={{true}} />
|
|
29153
29121
|
*/
|
|
29154
|
-
function resolveComponent(resolver, constants, meta,
|
|
29155
|
-
let [, expr, then] = _ref;
|
|
29122
|
+
function resolveComponent(resolver, constants, meta, [, expr, then]) {
|
|
29156
29123
|
(0, _util.assert)(isGetFreeComponent(expr), 'Attempted to resolve a component with incorrect opcode');
|
|
29157
29124
|
let type = expr[0];
|
|
29158
29125
|
if (true /* DEBUG */ && expr[0] === _wireFormat.SexpOpcodes.GetStrictKeyword) {
|
|
@@ -29183,8 +29150,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29183
29150
|
* (helper)
|
|
29184
29151
|
* (helper arg)
|
|
29185
29152
|
*/
|
|
29186
|
-
function resolveHelper(resolver, constants, meta,
|
|
29187
|
-
let [, expr, then] = _ref2;
|
|
29153
|
+
function resolveHelper(resolver, constants, meta, [, expr, then]) {
|
|
29188
29154
|
(0, _util.assert)(isGetFreeHelper(expr), 'Attempted to resolve a helper with incorrect opcode');
|
|
29189
29155
|
let type = expr[0];
|
|
29190
29156
|
if (type === _wireFormat.SexpOpcodes.GetLexicalSymbol) {
|
|
@@ -29214,8 +29180,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29214
29180
|
* <div {{modifier arg}}/>
|
|
29215
29181
|
* <Foo {{modifier}}/>
|
|
29216
29182
|
*/
|
|
29217
|
-
function resolveModifier(resolver, constants, meta,
|
|
29218
|
-
let [, expr, then] = _ref3;
|
|
29183
|
+
function resolveModifier(resolver, constants, meta, [, expr, then]) {
|
|
29219
29184
|
(0, _util.assert)(isGetFreeModifier(expr), 'Attempted to resolve a modifier with incorrect opcode');
|
|
29220
29185
|
let type = expr[0];
|
|
29221
29186
|
if (type === _wireFormat.SexpOpcodes.GetLexicalSymbol) {
|
|
@@ -29251,11 +29216,10 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29251
29216
|
/**
|
|
29252
29217
|
* {{component-or-helper arg}}
|
|
29253
29218
|
*/
|
|
29254
|
-
function resolveComponentOrHelper(resolver, constants, meta,
|
|
29255
|
-
|
|
29256
|
-
|
|
29257
|
-
|
|
29258
|
-
}] = _ref4;
|
|
29219
|
+
function resolveComponentOrHelper(resolver, constants, meta, [, expr, {
|
|
29220
|
+
ifComponent,
|
|
29221
|
+
ifHelper
|
|
29222
|
+
}]) {
|
|
29259
29223
|
(0, _util.assert)(isGetFreeComponentOrHelper(expr), 'Attempted to resolve a component or helper with incorrect opcode');
|
|
29260
29224
|
let type = expr[0];
|
|
29261
29225
|
if (type === _wireFormat.SexpOpcodes.GetLexicalSymbol) {
|
|
@@ -29298,10 +29262,9 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29298
29262
|
/**
|
|
29299
29263
|
* <Foo @arg={{helper}}>
|
|
29300
29264
|
*/
|
|
29301
|
-
function resolveOptionalHelper(resolver, constants, meta,
|
|
29302
|
-
|
|
29303
|
-
|
|
29304
|
-
}] = _ref5;
|
|
29265
|
+
function resolveOptionalHelper(resolver, constants, meta, [, expr, {
|
|
29266
|
+
ifHelper
|
|
29267
|
+
}]) {
|
|
29305
29268
|
(0, _util.assert)(isGetFreeOptionalHelper(expr) || isGetFreeDeprecatedHelper(expr), 'Attempted to resolve a helper with incorrect opcode');
|
|
29306
29269
|
let {
|
|
29307
29270
|
upvars,
|
|
@@ -29317,12 +29280,11 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29317
29280
|
/**
|
|
29318
29281
|
* {{maybeHelperOrComponent}}
|
|
29319
29282
|
*/
|
|
29320
|
-
function resolveOptionalComponentOrHelper(resolver, constants, meta,
|
|
29321
|
-
|
|
29322
|
-
|
|
29323
|
-
|
|
29324
|
-
|
|
29325
|
-
}] = _ref6;
|
|
29283
|
+
function resolveOptionalComponentOrHelper(resolver, constants, meta, [, expr, {
|
|
29284
|
+
ifComponent,
|
|
29285
|
+
ifHelper,
|
|
29286
|
+
ifValue
|
|
29287
|
+
}]) {
|
|
29326
29288
|
(0, _util.assert)(isGetFreeOptionalComponentOrHelper(expr), 'Attempted to resolve an optional component or helper with incorrect opcode');
|
|
29327
29289
|
let type = expr[0];
|
|
29328
29290
|
if (type === _wireFormat.SexpOpcodes.GetLexicalSymbol) {
|
|
@@ -29564,7 +29526,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29564
29526
|
return handle;
|
|
29565
29527
|
}
|
|
29566
29528
|
}
|
|
29567
|
-
push(constants, type) {
|
|
29529
|
+
push(constants, type, ...args) {
|
|
29568
29530
|
let {
|
|
29569
29531
|
heap
|
|
29570
29532
|
} = this;
|
|
@@ -29572,10 +29534,10 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29572
29534
|
throw new Error(`Opcode type over 8-bits. Got ${type}.`);
|
|
29573
29535
|
}
|
|
29574
29536
|
let machine = (0, _vm.isMachineOp)(type) ? _vm.MACHINE_MASK : 0;
|
|
29575
|
-
let first = type | machine |
|
|
29537
|
+
let first = type | machine | args.length << _vm.ARG_SHIFT;
|
|
29576
29538
|
heap.pushRaw(first);
|
|
29577
|
-
for (let i = 0; i <
|
|
29578
|
-
let op =
|
|
29539
|
+
for (let i = 0; i < args.length; i++) {
|
|
29540
|
+
let op = args[i];
|
|
29579
29541
|
heap.pushRaw(this.operand(constants, op));
|
|
29580
29542
|
}
|
|
29581
29543
|
}
|
|
@@ -29799,15 +29761,13 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29799
29761
|
}
|
|
29800
29762
|
}
|
|
29801
29763
|
const EXPRESSIONS = new Compilers();
|
|
29802
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Concat, (op,
|
|
29803
|
-
let [, parts] = _ref;
|
|
29764
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Concat, (op, [, parts]) => {
|
|
29804
29765
|
for (let part of parts) {
|
|
29805
29766
|
expr(op, part);
|
|
29806
29767
|
}
|
|
29807
29768
|
op(_vm.Op.Concat, parts.length);
|
|
29808
29769
|
});
|
|
29809
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Call, (op,
|
|
29810
|
-
let [, expression, positional, named] = _ref2;
|
|
29770
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Call, (op, [, expression, positional, named]) => {
|
|
29811
29771
|
if (isGetFreeHelper(expression)) {
|
|
29812
29772
|
op(HighLevelResolutionOpcodes.Helper, expression, handle => {
|
|
29813
29773
|
Call(op, handle, positional, named);
|
|
@@ -29817,24 +29777,20 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29817
29777
|
CallDynamic(op, positional, named);
|
|
29818
29778
|
}
|
|
29819
29779
|
});
|
|
29820
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Curry, (op,
|
|
29821
|
-
let [, expr, type, positional, named] = _ref3;
|
|
29780
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Curry, (op, [, expr, type, positional, named]) => {
|
|
29822
29781
|
Curry(op, type, expr, positional, named);
|
|
29823
29782
|
});
|
|
29824
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.GetSymbol, (op,
|
|
29825
|
-
let [, sym, path] = _ref4;
|
|
29783
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.GetSymbol, (op, [, sym, path]) => {
|
|
29826
29784
|
op(_vm.Op.GetVariable, sym);
|
|
29827
29785
|
withPath(op, path);
|
|
29828
29786
|
});
|
|
29829
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.GetLexicalSymbol, (op,
|
|
29830
|
-
let [, sym, path] = _ref5;
|
|
29787
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.GetLexicalSymbol, (op, [, sym, path]) => {
|
|
29831
29788
|
op(HighLevelResolutionOpcodes.TemplateLocal, sym, handle => {
|
|
29832
29789
|
op(_vm.Op.ConstantReference, handle);
|
|
29833
29790
|
withPath(op, path);
|
|
29834
29791
|
});
|
|
29835
29792
|
});
|
|
29836
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.GetStrictKeyword, (op,
|
|
29837
|
-
let [, sym, _path] = _ref6;
|
|
29793
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.GetStrictKeyword, (op, [, sym, _path]) => {
|
|
29838
29794
|
op(HighLevelResolutionOpcodes.Free, sym, _handle => {
|
|
29839
29795
|
// TODO: Implement in strict mode
|
|
29840
29796
|
});
|
|
@@ -29880,38 +29836,32 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
29880
29836
|
}
|
|
29881
29837
|
}
|
|
29882
29838
|
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Undefined, op => PushPrimitiveReference(op, undefined));
|
|
29883
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.HasBlock, (op,
|
|
29884
|
-
let [, block] = _ref7;
|
|
29839
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.HasBlock, (op, [, block]) => {
|
|
29885
29840
|
expr(op, block);
|
|
29886
29841
|
op(_vm.Op.HasBlock);
|
|
29887
29842
|
});
|
|
29888
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.HasBlockParams, (op,
|
|
29889
|
-
let [, block] = _ref8;
|
|
29843
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.HasBlockParams, (op, [, block]) => {
|
|
29890
29844
|
expr(op, block);
|
|
29891
29845
|
op(_vm.Op.SpreadBlock);
|
|
29892
29846
|
op(_vm.Op.CompileBlock);
|
|
29893
29847
|
op(_vm.Op.HasBlockParams);
|
|
29894
29848
|
});
|
|
29895
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.IfInline, (op,
|
|
29896
|
-
let [, condition, truthy, falsy] = _ref9;
|
|
29849
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.IfInline, (op, [, condition, truthy, falsy]) => {
|
|
29897
29850
|
// Push in reverse order
|
|
29898
29851
|
expr(op, falsy);
|
|
29899
29852
|
expr(op, truthy);
|
|
29900
29853
|
expr(op, condition);
|
|
29901
29854
|
op(_vm.Op.IfInline);
|
|
29902
29855
|
});
|
|
29903
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Not, (op,
|
|
29904
|
-
let [, value] = _ref10;
|
|
29856
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Not, (op, [, value]) => {
|
|
29905
29857
|
expr(op, value);
|
|
29906
29858
|
op(_vm.Op.Not);
|
|
29907
29859
|
});
|
|
29908
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.GetDynamicVar, (op,
|
|
29909
|
-
let [, expression] = _ref11;
|
|
29860
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.GetDynamicVar, (op, [, expression]) => {
|
|
29910
29861
|
expr(op, expression);
|
|
29911
29862
|
op(_vm.Op.GetDynamicVar);
|
|
29912
29863
|
});
|
|
29913
|
-
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Log, (op,
|
|
29914
|
-
let [, positional] = _ref12;
|
|
29864
|
+
EXPRESSIONS.add(_wireFormat.SexpOpcodes.Log, (op, [, positional]) => {
|
|
29915
29865
|
op(_vm.MachineOp.PushFrame);
|
|
29916
29866
|
SimpleArgs(op, positional, null, false);
|
|
29917
29867
|
op(_vm.Op.Log);
|
|
@@ -30355,15 +30305,14 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30355
30305
|
op(HighLevelBuilderOpcodes.Label, 'ELSE');
|
|
30356
30306
|
});
|
|
30357
30307
|
}
|
|
30358
|
-
function InvokeStaticComponent(op,
|
|
30359
|
-
|
|
30360
|
-
|
|
30361
|
-
|
|
30362
|
-
|
|
30363
|
-
|
|
30364
|
-
|
|
30365
|
-
|
|
30366
|
-
} = _ref;
|
|
30308
|
+
function InvokeStaticComponent(op, {
|
|
30309
|
+
capabilities,
|
|
30310
|
+
layout,
|
|
30311
|
+
elementBlock,
|
|
30312
|
+
positional,
|
|
30313
|
+
named,
|
|
30314
|
+
blocks
|
|
30315
|
+
}) {
|
|
30367
30316
|
let {
|
|
30368
30317
|
symbolTable
|
|
30369
30318
|
} = layout;
|
|
@@ -30526,16 +30475,15 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30526
30475
|
op(_vm.Op.CommitComponentTransaction);
|
|
30527
30476
|
op(_vm.Op.Load, _vm.$s0);
|
|
30528
30477
|
}
|
|
30529
|
-
function InvokeNonStaticComponent(op,
|
|
30530
|
-
|
|
30531
|
-
|
|
30532
|
-
|
|
30533
|
-
|
|
30534
|
-
|
|
30535
|
-
|
|
30536
|
-
|
|
30537
|
-
|
|
30538
|
-
} = _ref2;
|
|
30478
|
+
function InvokeNonStaticComponent(op, {
|
|
30479
|
+
capabilities,
|
|
30480
|
+
elementBlock,
|
|
30481
|
+
positional,
|
|
30482
|
+
named,
|
|
30483
|
+
atNames,
|
|
30484
|
+
blocks: namedBlocks,
|
|
30485
|
+
layout
|
|
30486
|
+
}) {
|
|
30539
30487
|
let bindableBlocks = !!namedBlocks;
|
|
30540
30488
|
let bindableAtNames = capabilities === true || (0, _manager.hasCapability)(capabilities, _vm.InternalComponentCapabilities.prepareArgs) || !!(named && named[0].length !== 0);
|
|
30541
30489
|
let blocks = namedBlocks.with('attrs', elementBlock);
|
|
@@ -30580,8 +30528,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30580
30528
|
op(_vm.Op.Load, _vm.$s1);
|
|
30581
30529
|
op(HighLevelBuilderOpcodes.StopLabels);
|
|
30582
30530
|
}
|
|
30583
|
-
function invokePreparedComponent(op, hasBlock, bindableBlocks, bindableAtNames) {
|
|
30584
|
-
let populateLayout = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : null;
|
|
30531
|
+
function invokePreparedComponent(op, hasBlock, bindableBlocks, bindableAtNames, populateLayout = null) {
|
|
30585
30532
|
op(_vm.Op.BeginComponentTransaction, _vm.$s0);
|
|
30586
30533
|
op(_vm.Op.PushDynamicScope);
|
|
30587
30534
|
op(_vm.Op.CreateComponent, hasBlock | 0, _vm.$s0);
|
|
@@ -30709,10 +30656,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30709
30656
|
resolver
|
|
30710
30657
|
} = program;
|
|
30711
30658
|
let encoder = new EncoderImpl(heap, STDLIB_META);
|
|
30712
|
-
function pushOp() {
|
|
30713
|
-
for (var _len = arguments.length, op = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
30714
|
-
op[_key] = arguments[_key];
|
|
30715
|
-
}
|
|
30659
|
+
function pushOp(...op) {
|
|
30716
30660
|
encodeOp(encoder, constants, resolver, STDLIB_META, op);
|
|
30717
30661
|
}
|
|
30718
30662
|
builder(pushOp);
|
|
@@ -30725,14 +30669,13 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30725
30669
|
}
|
|
30726
30670
|
}
|
|
30727
30671
|
class CompileTimeCompilationContextImpl {
|
|
30728
|
-
constructor(
|
|
30672
|
+
constructor({
|
|
30673
|
+
constants,
|
|
30674
|
+
heap
|
|
30675
|
+
}, resolver, createOp) {
|
|
30729
30676
|
this.constants = void 0;
|
|
30730
30677
|
this.heap = void 0;
|
|
30731
30678
|
this.stdlib = void 0;
|
|
30732
|
-
let {
|
|
30733
|
-
constants,
|
|
30734
|
-
heap
|
|
30735
|
-
} = _ref;
|
|
30736
30679
|
this.resolver = resolver;
|
|
30737
30680
|
this.createOp = createOp;
|
|
30738
30681
|
this.constants = constants;
|
|
@@ -30764,8 +30707,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30764
30707
|
STATEMENTS.add(_wireFormat.SexpOpcodes.Comment, (op, sexp) => op(_vm.Op.Comment, sexp[1]));
|
|
30765
30708
|
STATEMENTS.add(_wireFormat.SexpOpcodes.CloseElement, op => op(_vm.Op.CloseElement));
|
|
30766
30709
|
STATEMENTS.add(_wireFormat.SexpOpcodes.FlushElement, op => op(_vm.Op.FlushElement));
|
|
30767
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.Modifier, (op,
|
|
30768
|
-
let [, expression, positional, named] = _ref;
|
|
30710
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.Modifier, (op, [, expression, positional, named]) => {
|
|
30769
30711
|
if (isGetFreeModifier(expression)) {
|
|
30770
30712
|
op(HighLevelResolutionOpcodes.Modifier, expression, handle => {
|
|
30771
30713
|
op(_vm.MachineOp.PushFrame);
|
|
@@ -30782,45 +30724,36 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30782
30724
|
op(_vm.MachineOp.PopFrame);
|
|
30783
30725
|
}
|
|
30784
30726
|
});
|
|
30785
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.StaticAttr, (op,
|
|
30786
|
-
let [, name, value, namespace] = _ref2;
|
|
30727
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.StaticAttr, (op, [, name, value, namespace]) => {
|
|
30787
30728
|
op(_vm.Op.StaticAttr, inflateAttrName(name), value, namespace ?? null);
|
|
30788
30729
|
});
|
|
30789
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.StaticComponentAttr, (op,
|
|
30790
|
-
let [, name, value, namespace] = _ref3;
|
|
30730
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.StaticComponentAttr, (op, [, name, value, namespace]) => {
|
|
30791
30731
|
op(_vm.Op.StaticComponentAttr, inflateAttrName(name), value, namespace ?? null);
|
|
30792
30732
|
});
|
|
30793
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.DynamicAttr, (op,
|
|
30794
|
-
let [, name, value, namespace] = _ref4;
|
|
30733
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.DynamicAttr, (op, [, name, value, namespace]) => {
|
|
30795
30734
|
expr(op, value);
|
|
30796
30735
|
op(_vm.Op.DynamicAttr, inflateAttrName(name), false, namespace ?? null);
|
|
30797
30736
|
});
|
|
30798
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.TrustingDynamicAttr, (op,
|
|
30799
|
-
let [, name, value, namespace] = _ref5;
|
|
30737
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.TrustingDynamicAttr, (op, [, name, value, namespace]) => {
|
|
30800
30738
|
expr(op, value);
|
|
30801
30739
|
op(_vm.Op.DynamicAttr, inflateAttrName(name), true, namespace ?? null);
|
|
30802
30740
|
});
|
|
30803
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.ComponentAttr, (op,
|
|
30804
|
-
let [, name, value, namespace] = _ref6;
|
|
30741
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.ComponentAttr, (op, [, name, value, namespace]) => {
|
|
30805
30742
|
expr(op, value);
|
|
30806
30743
|
op(_vm.Op.ComponentAttr, inflateAttrName(name), false, namespace ?? null);
|
|
30807
30744
|
});
|
|
30808
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.TrustingComponentAttr, (op,
|
|
30809
|
-
let [, name, value, namespace] = _ref7;
|
|
30745
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.TrustingComponentAttr, (op, [, name, value, namespace]) => {
|
|
30810
30746
|
expr(op, value);
|
|
30811
30747
|
op(_vm.Op.ComponentAttr, inflateAttrName(name), true, namespace ?? null);
|
|
30812
30748
|
});
|
|
30813
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.OpenElement, (op,
|
|
30814
|
-
let [, tag] = _ref8;
|
|
30749
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.OpenElement, (op, [, tag]) => {
|
|
30815
30750
|
op(_vm.Op.OpenElement, inflateTagName(tag));
|
|
30816
30751
|
});
|
|
30817
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.OpenElementWithSplat, (op,
|
|
30818
|
-
let [, tag] = _ref9;
|
|
30752
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.OpenElementWithSplat, (op, [, tag]) => {
|
|
30819
30753
|
op(_vm.Op.PutComponentOperations);
|
|
30820
30754
|
op(_vm.Op.OpenElement, inflateTagName(tag));
|
|
30821
30755
|
});
|
|
30822
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.Component, (op,
|
|
30823
|
-
let [, expr, elementBlock, named, blocks] = _ref10;
|
|
30756
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.Component, (op, [, expr, elementBlock, named, blocks]) => {
|
|
30824
30757
|
if (isGetFreeComponent(expr)) {
|
|
30825
30758
|
op(HighLevelResolutionOpcodes.Component, expr, component => {
|
|
30826
30759
|
InvokeComponent(op, component, elementBlock, null, named, blocks);
|
|
@@ -30831,20 +30764,10 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30831
30764
|
InvokeDynamicComponent(op, expr, elementBlock, null, named, blocks, true, true);
|
|
30832
30765
|
}
|
|
30833
30766
|
});
|
|
30834
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.Yield, (op,
|
|
30835
|
-
|
|
30836
|
-
|
|
30837
|
-
|
|
30838
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.AttrSplat, (op, _ref12) => {
|
|
30839
|
-
let [, to] = _ref12;
|
|
30840
|
-
return YieldBlock(op, to, null);
|
|
30841
|
-
});
|
|
30842
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.Debugger, (op, _ref13) => {
|
|
30843
|
-
let [, debugInfo] = _ref13;
|
|
30844
|
-
return op(_vm.Op.Debugger, debugSymbolsOperand(), debugInfo);
|
|
30845
|
-
});
|
|
30846
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.Append, (op, _ref14) => {
|
|
30847
|
-
let [, value] = _ref14;
|
|
30767
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.Yield, (op, [, to, params]) => YieldBlock(op, to, params));
|
|
30768
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.AttrSplat, (op, [, to]) => YieldBlock(op, to, null));
|
|
30769
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.Debugger, (op, [, debugInfo]) => op(_vm.Op.Debugger, debugSymbolsOperand(), debugInfo));
|
|
30770
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.Append, (op, [, value]) => {
|
|
30848
30771
|
// Special case for static values
|
|
30849
30772
|
if (!Array.isArray(value)) {
|
|
30850
30773
|
op(_vm.Op.Text, value === null || value === undefined ? '' : String(value));
|
|
@@ -30911,8 +30834,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30911
30834
|
op(_vm.MachineOp.PopFrame);
|
|
30912
30835
|
}
|
|
30913
30836
|
});
|
|
30914
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.TrustingAppend, (op,
|
|
30915
|
-
let [, value] = _ref15;
|
|
30837
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.TrustingAppend, (op, [, value]) => {
|
|
30916
30838
|
if (!Array.isArray(value)) {
|
|
30917
30839
|
op(_vm.Op.Text, value === null || value === undefined ? '' : String(value));
|
|
30918
30840
|
} else {
|
|
@@ -30922,8 +30844,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30922
30844
|
op(_vm.MachineOp.PopFrame);
|
|
30923
30845
|
}
|
|
30924
30846
|
});
|
|
30925
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.Block, (op,
|
|
30926
|
-
let [, expr, positional, named, blocks] = _ref16;
|
|
30847
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.Block, (op, [, expr, positional, named, blocks]) => {
|
|
30927
30848
|
if (isGetFreeComponent(expr)) {
|
|
30928
30849
|
op(HighLevelResolutionOpcodes.Component, expr, component => {
|
|
30929
30850
|
InvokeComponent(op, component, null, positional, hashToArgs(named), blocks);
|
|
@@ -30932,8 +30853,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30932
30853
|
InvokeDynamicComponent(op, expr, null, positional, named, blocks, false, false);
|
|
30933
30854
|
}
|
|
30934
30855
|
});
|
|
30935
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.InElement, (op,
|
|
30936
|
-
let [, block, guid, destination, insertBefore] = _ref17;
|
|
30856
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.InElement, (op, [, block, guid, destination, insertBefore]) => {
|
|
30937
30857
|
ReplayableIf(op, () => {
|
|
30938
30858
|
expr(op, guid);
|
|
30939
30859
|
if (insertBefore === undefined) {
|
|
@@ -30950,51 +30870,44 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
30950
30870
|
op(_vm.Op.PopRemoteElement);
|
|
30951
30871
|
});
|
|
30952
30872
|
});
|
|
30953
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.If, (op,
|
|
30954
|
-
|
|
30955
|
-
|
|
30956
|
-
|
|
30957
|
-
|
|
30958
|
-
|
|
30959
|
-
|
|
30960
|
-
|
|
30961
|
-
|
|
30873
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.If, (op, [, condition, block, inverse]) => ReplayableIf(op, () => {
|
|
30874
|
+
expr(op, condition);
|
|
30875
|
+
op(_vm.Op.ToBoolean);
|
|
30876
|
+
return 1;
|
|
30877
|
+
}, () => {
|
|
30878
|
+
InvokeStaticBlock(op, block);
|
|
30879
|
+
}, inverse ? () => {
|
|
30880
|
+
InvokeStaticBlock(op, inverse);
|
|
30881
|
+
} : undefined));
|
|
30882
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.Each, (op, [, value, key, block, inverse]) => Replayable(op, () => {
|
|
30883
|
+
if (key) {
|
|
30884
|
+
expr(op, key);
|
|
30885
|
+
} else {
|
|
30886
|
+
PushPrimitiveReference(op, null);
|
|
30887
|
+
}
|
|
30888
|
+
expr(op, value);
|
|
30889
|
+
return 2;
|
|
30890
|
+
}, () => {
|
|
30891
|
+
op(_vm.Op.EnterList, labelOperand('BODY'), labelOperand('ELSE'));
|
|
30892
|
+
op(_vm.MachineOp.PushFrame);
|
|
30893
|
+
op(_vm.Op.Dup, _vm.$fp, 1);
|
|
30894
|
+
op(_vm.MachineOp.ReturnTo, labelOperand('ITER'));
|
|
30895
|
+
op(HighLevelBuilderOpcodes.Label, 'ITER');
|
|
30896
|
+
op(_vm.Op.Iterate, labelOperand('BREAK'));
|
|
30897
|
+
op(HighLevelBuilderOpcodes.Label, 'BODY');
|
|
30898
|
+
InvokeStaticBlockWithStack(op, block, 2);
|
|
30899
|
+
op(_vm.Op.Pop, 2);
|
|
30900
|
+
op(_vm.MachineOp.Jump, labelOperand('FINALLY'));
|
|
30901
|
+
op(HighLevelBuilderOpcodes.Label, 'BREAK');
|
|
30902
|
+
op(_vm.MachineOp.PopFrame);
|
|
30903
|
+
op(_vm.Op.ExitList);
|
|
30904
|
+
op(_vm.MachineOp.Jump, labelOperand('FINALLY'));
|
|
30905
|
+
op(HighLevelBuilderOpcodes.Label, 'ELSE');
|
|
30906
|
+
if (inverse) {
|
|
30962
30907
|
InvokeStaticBlock(op, inverse);
|
|
30963
|
-
}
|
|
30964
|
-
});
|
|
30965
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.
|
|
30966
|
-
let [, value, key, block, inverse] = _ref19;
|
|
30967
|
-
return Replayable(op, () => {
|
|
30968
|
-
if (key) {
|
|
30969
|
-
expr(op, key);
|
|
30970
|
-
} else {
|
|
30971
|
-
PushPrimitiveReference(op, null);
|
|
30972
|
-
}
|
|
30973
|
-
expr(op, value);
|
|
30974
|
-
return 2;
|
|
30975
|
-
}, () => {
|
|
30976
|
-
op(_vm.Op.EnterList, labelOperand('BODY'), labelOperand('ELSE'));
|
|
30977
|
-
op(_vm.MachineOp.PushFrame);
|
|
30978
|
-
op(_vm.Op.Dup, _vm.$fp, 1);
|
|
30979
|
-
op(_vm.MachineOp.ReturnTo, labelOperand('ITER'));
|
|
30980
|
-
op(HighLevelBuilderOpcodes.Label, 'ITER');
|
|
30981
|
-
op(_vm.Op.Iterate, labelOperand('BREAK'));
|
|
30982
|
-
op(HighLevelBuilderOpcodes.Label, 'BODY');
|
|
30983
|
-
InvokeStaticBlockWithStack(op, block, 2);
|
|
30984
|
-
op(_vm.Op.Pop, 2);
|
|
30985
|
-
op(_vm.MachineOp.Jump, labelOperand('FINALLY'));
|
|
30986
|
-
op(HighLevelBuilderOpcodes.Label, 'BREAK');
|
|
30987
|
-
op(_vm.MachineOp.PopFrame);
|
|
30988
|
-
op(_vm.Op.ExitList);
|
|
30989
|
-
op(_vm.MachineOp.Jump, labelOperand('FINALLY'));
|
|
30990
|
-
op(HighLevelBuilderOpcodes.Label, 'ELSE');
|
|
30991
|
-
if (inverse) {
|
|
30992
|
-
InvokeStaticBlock(op, inverse);
|
|
30993
|
-
}
|
|
30994
|
-
});
|
|
30995
|
-
});
|
|
30996
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.With, (op, _ref20) => {
|
|
30997
|
-
let [, value, block, inverse] = _ref20;
|
|
30908
|
+
}
|
|
30909
|
+
}));
|
|
30910
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.With, (op, [, value, block, inverse]) => {
|
|
30998
30911
|
ReplayableIf(op, () => {
|
|
30999
30912
|
expr(op, value);
|
|
31000
30913
|
op(_vm.Op.Dup, _vm.$sp, 0);
|
|
@@ -31008,13 +30921,11 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
31008
30921
|
}
|
|
31009
30922
|
});
|
|
31010
30923
|
});
|
|
31011
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.Let, (op,
|
|
31012
|
-
let [, positional, block] = _ref21;
|
|
30924
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.Let, (op, [, positional, block]) => {
|
|
31013
30925
|
let count = CompilePositional(op, positional);
|
|
31014
30926
|
InvokeStaticBlockWithStack(op, block, count);
|
|
31015
30927
|
});
|
|
31016
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.WithDynamicVars, (op,
|
|
31017
|
-
let [, named, block] = _ref22;
|
|
30928
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.WithDynamicVars, (op, [, named, block]) => {
|
|
31018
30929
|
if (named) {
|
|
31019
30930
|
let [names, expressions] = named;
|
|
31020
30931
|
CompilePositional(op, expressions);
|
|
@@ -31025,8 +30936,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
31025
30936
|
InvokeStaticBlock(op, block);
|
|
31026
30937
|
}
|
|
31027
30938
|
});
|
|
31028
|
-
STATEMENTS.add(_wireFormat.SexpOpcodes.InvokeComponent, (op,
|
|
31029
|
-
let [, expr, positional, named, blocks] = _ref23;
|
|
30939
|
+
STATEMENTS.add(_wireFormat.SexpOpcodes.InvokeComponent, (op, [, expr, positional, named, blocks]) => {
|
|
31030
30940
|
if (isGetFreeComponent(expr)) {
|
|
31031
30941
|
op(HighLevelResolutionOpcodes.Component, expr, component => {
|
|
31032
30942
|
InvokeComponent(op, component, null, positional, hashToArgs(named), blocks);
|
|
@@ -31044,9 +30954,10 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
31044
30954
|
class CompilableTemplateImpl {
|
|
31045
30955
|
constructor(statements, meta,
|
|
31046
30956
|
// Part of CompilableTemplate
|
|
31047
|
-
symbolTable
|
|
30957
|
+
symbolTable,
|
|
30958
|
+
// Used for debugging
|
|
30959
|
+
moduleName = 'plain block') {
|
|
31048
30960
|
this.compiled = null;
|
|
31049
|
-
let moduleName = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : 'plain block';
|
|
31050
30961
|
this.statements = statements;
|
|
31051
30962
|
this.meta = meta;
|
|
31052
30963
|
this.symbolTable = symbolTable;
|
|
@@ -31086,10 +30997,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
31086
30997
|
resolver
|
|
31087
30998
|
}
|
|
31088
30999
|
} = context;
|
|
31089
|
-
function pushOp() {
|
|
31090
|
-
for (var _len = arguments.length, op = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31091
|
-
op[_key] = arguments[_key];
|
|
31092
|
-
}
|
|
31000
|
+
function pushOp(...op) {
|
|
31093
31001
|
encodeOp(encoder, constants, resolver, meta, op);
|
|
31094
31002
|
}
|
|
31095
31003
|
for (const statement of statements) {
|
|
@@ -31169,10 +31077,7 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
31169
31077
|
resolver
|
|
31170
31078
|
}
|
|
31171
31079
|
} = context;
|
|
31172
|
-
function pushOp() {
|
|
31173
|
-
for (var _len = arguments.length, op = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
31174
|
-
op[_key] = arguments[_key];
|
|
31175
|
-
}
|
|
31080
|
+
function pushOp(...op) {
|
|
31176
31081
|
encodeOp(encoder, constants, resolver, m, op);
|
|
31177
31082
|
}
|
|
31178
31083
|
WrappedComponent(pushOp, this.layout, this.attrsBlockNumber);
|
|
@@ -31198,14 +31103,13 @@ define("@glimmer/opcode-compiler", ["exports", "@glimmer/util", "@glimmer/debug"
|
|
|
31198
31103
|
* that handles lazy parsing the template and to create per env singletons
|
|
31199
31104
|
* of the template.
|
|
31200
31105
|
*/
|
|
31201
|
-
function templateFactory(
|
|
31202
|
-
|
|
31203
|
-
|
|
31204
|
-
|
|
31205
|
-
|
|
31206
|
-
|
|
31207
|
-
|
|
31208
|
-
} = _ref;
|
|
31106
|
+
function templateFactory({
|
|
31107
|
+
id: templateId,
|
|
31108
|
+
moduleName,
|
|
31109
|
+
block,
|
|
31110
|
+
scope,
|
|
31111
|
+
isStrictMode
|
|
31112
|
+
}) {
|
|
31209
31113
|
// TODO(template-refactors): This should be removed in the near future, as it
|
|
31210
31114
|
// appears that id is unused. It is currently kept for backwards compat reasons.
|
|
31211
31115
|
let id = templateId || `client-${clientId++}`;
|
|
@@ -31405,8 +31309,9 @@ define("@glimmer/program", ["exports", "@glimmer/manager", "@glimmer/opcode-comp
|
|
|
31405
31309
|
this.modifierDefinitionCache = new WeakMap();
|
|
31406
31310
|
this.componentDefinitionCache = new WeakMap();
|
|
31407
31311
|
}
|
|
31408
|
-
helper(definitionState
|
|
31409
|
-
|
|
31312
|
+
helper(definitionState,
|
|
31313
|
+
// TODO: Add a way to expose resolved name for debugging
|
|
31314
|
+
_resolvedName = null, isOptional) {
|
|
31410
31315
|
let handle = this.helperDefinitionCache.get(definitionState);
|
|
31411
31316
|
if (handle === undefined) {
|
|
31412
31317
|
let managerOrHelper = (0, _manager.getInternalHelperManager)(definitionState, isOptional);
|
|
@@ -31422,9 +31327,7 @@ define("@glimmer/program", ["exports", "@glimmer/manager", "@glimmer/opcode-comp
|
|
|
31422
31327
|
}
|
|
31423
31328
|
return handle;
|
|
31424
31329
|
}
|
|
31425
|
-
modifier(definitionState) {
|
|
31426
|
-
let resolvedName = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
31427
|
-
let isOptional = arguments.length > 2 ? arguments[2] : undefined;
|
|
31330
|
+
modifier(definitionState, resolvedName = null, isOptional) {
|
|
31428
31331
|
let handle = this.modifierDefinitionCache.get(definitionState);
|
|
31429
31332
|
if (handle === undefined) {
|
|
31430
31333
|
let manager = (0, _manager.getInternalModifierManager)(definitionState, isOptional);
|
|
@@ -31713,8 +31616,7 @@ define("@glimmer/program", ["exports", "@glimmer/manager", "@glimmer/opcode-comp
|
|
|
31713
31616
|
}
|
|
31714
31617
|
this.offset = this.offset - compactedSize;
|
|
31715
31618
|
}
|
|
31716
|
-
capture() {
|
|
31717
|
-
let offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this.offset;
|
|
31619
|
+
capture(offset = this.offset) {
|
|
31718
31620
|
// Only called in eager mode
|
|
31719
31621
|
let buffer = slice(this.heap, 0, offset).buffer;
|
|
31720
31622
|
return {
|
|
@@ -31835,9 +31737,7 @@ define("@glimmer/reference", ["exports", "@glimmer/global-context", "@glimmer/ut
|
|
|
31835
31737
|
}
|
|
31836
31738
|
return ref;
|
|
31837
31739
|
}
|
|
31838
|
-
function createComputeRef(compute) {
|
|
31839
|
-
let update = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
31840
|
-
let debugLabel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'unknown';
|
|
31740
|
+
function createComputeRef(compute, update = null, debugLabel = 'unknown') {
|
|
31841
31741
|
const ref = new ReferenceImpl(COMPUTE);
|
|
31842
31742
|
ref.compute = compute;
|
|
31843
31743
|
ref.update = update;
|
|
@@ -32150,7 +32050,7 @@ define("@glimmer/reference", ["exports", "@glimmer/global-context", "@glimmer/ut
|
|
|
32150
32050
|
}
|
|
32151
32051
|
}
|
|
32152
32052
|
});
|
|
32153
|
-
define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "@glimmer/util", "@glimmer/vm", "@glimmer/destroyable", "@glimmer/global-context", "@glimmer/
|
|
32053
|
+
define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "@glimmer/util", "@glimmer/vm", "@glimmer/destroyable", "@glimmer/global-context", "@glimmer/manager", "@glimmer/validator", "@glimmer/program", "@glimmer/owner"], function (_exports, _debug, _reference, _util, _vm2, _destroyable, _globalContext, _manager, _validator, _program, _owner2) {
|
|
32154
32054
|
"use strict";
|
|
32155
32055
|
|
|
32156
32056
|
Object.defineProperty(_exports, "__esModule", {
|
|
@@ -32226,24 +32126,14 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
32226
32126
|
}
|
|
32227
32127
|
_exports.DynamicScopeImpl = DynamicScopeImpl;
|
|
32228
32128
|
class PartialScopeImpl {
|
|
32229
|
-
static root(self) {
|
|
32230
|
-
let
|
|
32231
|
-
let owner = arguments.length > 2 ? arguments[2] : undefined;
|
|
32232
|
-
let refs = new Array(size + 1);
|
|
32233
|
-
for (let i = 0; i <= size; i++) {
|
|
32234
|
-
refs[i] = _reference.UNDEFINED_REFERENCE;
|
|
32235
|
-
}
|
|
32129
|
+
static root(self, size = 0, owner) {
|
|
32130
|
+
let refs = new Array(size + 1).fill(_reference.UNDEFINED_REFERENCE);
|
|
32236
32131
|
return new PartialScopeImpl(refs, owner, null, null, null).init({
|
|
32237
32132
|
self
|
|
32238
32133
|
});
|
|
32239
32134
|
}
|
|
32240
|
-
static sized() {
|
|
32241
|
-
let
|
|
32242
|
-
let owner = arguments.length > 1 ? arguments[1] : undefined;
|
|
32243
|
-
let refs = new Array(size + 1);
|
|
32244
|
-
for (let i = 0; i <= size; i++) {
|
|
32245
|
-
refs[i] = _reference.UNDEFINED_REFERENCE;
|
|
32246
|
-
}
|
|
32135
|
+
static sized(size = 0, owner) {
|
|
32136
|
+
let refs = new Array(size + 1).fill(_reference.UNDEFINED_REFERENCE);
|
|
32247
32137
|
return new PartialScopeImpl(refs, owner, null, null, null);
|
|
32248
32138
|
}
|
|
32249
32139
|
constructor(
|
|
@@ -32259,10 +32149,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
32259
32149
|
this.evalScope = evalScope;
|
|
32260
32150
|
this.partialMap = partialMap;
|
|
32261
32151
|
}
|
|
32262
|
-
init(
|
|
32263
|
-
|
|
32264
|
-
|
|
32265
|
-
} = _ref;
|
|
32152
|
+
init({
|
|
32153
|
+
self
|
|
32154
|
+
}) {
|
|
32266
32155
|
this.slots[0] = self;
|
|
32267
32156
|
return this;
|
|
32268
32157
|
}
|
|
@@ -32358,21 +32247,6 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
32358
32247
|
}
|
|
32359
32248
|
}
|
|
32360
32249
|
_exports.ConcreteBounds = ConcreteBounds;
|
|
32361
|
-
class SingleNodeBounds {
|
|
32362
|
-
constructor(parentNode, node) {
|
|
32363
|
-
this.parentNode = parentNode;
|
|
32364
|
-
this.node = node;
|
|
32365
|
-
}
|
|
32366
|
-
parentElement() {
|
|
32367
|
-
return this.parentNode;
|
|
32368
|
-
}
|
|
32369
|
-
firstNode() {
|
|
32370
|
-
return this.node;
|
|
32371
|
-
}
|
|
32372
|
-
lastNode() {
|
|
32373
|
-
return this.node;
|
|
32374
|
-
}
|
|
32375
|
-
}
|
|
32376
32250
|
function move(bounds, reference) {
|
|
32377
32251
|
let parent = bounds.parentElement();
|
|
32378
32252
|
let first = bounds.firstNode();
|
|
@@ -32526,46 +32400,49 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
32526
32400
|
function requiresSanitization(tagName, attribute) {
|
|
32527
32401
|
return checkURI(tagName, attribute) || checkDataURI(tagName, attribute);
|
|
32528
32402
|
}
|
|
32529
|
-
|
|
32530
|
-
|
|
32531
|
-
|
|
32532
|
-
|
|
32533
|
-
|
|
32534
|
-
|
|
32535
|
-
|
|
32536
|
-
|
|
32537
|
-
|
|
32538
|
-
|
|
32539
|
-
|
|
32540
|
-
|
|
32541
|
-
|
|
32542
|
-
|
|
32543
|
-
|
|
32544
|
-
|
|
32545
|
-
|
|
32546
|
-
|
|
32547
|
-
|
|
32548
|
-
|
|
32549
|
-
|
|
32550
|
-
|
|
32551
|
-
|
|
32552
|
-
|
|
32553
|
-
|
|
32554
|
-
|
|
32555
|
-
|
|
32556
|
-
|
|
32557
|
-
|
|
32558
|
-
|
|
32559
|
-
|
|
32560
|
-
|
|
32561
|
-
|
|
32562
|
-
|
|
32563
|
-
|
|
32564
|
-
|
|
32565
|
-
|
|
32566
|
-
|
|
32567
|
-
|
|
32568
|
-
|
|
32403
|
+
function findProtocolForURL() {
|
|
32404
|
+
if (typeof URL === 'object' && URL !== null &&
|
|
32405
|
+
// this is super annoying, TS thinks that URL **must** be a function so `URL.parse` check
|
|
32406
|
+
// thinks it is `never` without this `as unknown as any`
|
|
32407
|
+
typeof URL.parse === 'function') {
|
|
32408
|
+
// In Ember-land the `fastboot` package sets the `URL` global to `require('url')`
|
|
32409
|
+
// ultimately, this should be changed (so that we can either rely on the natural `URL` global
|
|
32410
|
+
// that exists) but for now we have to detect the specific `FastBoot` case first
|
|
32411
|
+
//
|
|
32412
|
+
// a future version of `fastboot` will detect if this legacy URL setup is required (by
|
|
32413
|
+
// inspecting Ember version) and if new enough, it will avoid shadowing the `URL` global
|
|
32414
|
+
// constructor with `require('url')`.
|
|
32415
|
+
let nodeURL = URL;
|
|
32416
|
+
return url => {
|
|
32417
|
+
let protocol = null;
|
|
32418
|
+
if (typeof url === 'string') {
|
|
32419
|
+
protocol = nodeURL.parse(url).protocol;
|
|
32420
|
+
}
|
|
32421
|
+
return protocol === null ? ':' : protocol;
|
|
32422
|
+
};
|
|
32423
|
+
} else if (typeof URL === 'function') {
|
|
32424
|
+
return _url => {
|
|
32425
|
+
try {
|
|
32426
|
+
let url = new URL(_url);
|
|
32427
|
+
return url.protocol;
|
|
32428
|
+
} catch (error) {
|
|
32429
|
+
// any non-fully qualified url string will trigger an error (because there is no
|
|
32430
|
+
// baseURI that we can provide; in that case we **know** that the protocol is
|
|
32431
|
+
// "safe" because it isn't specifically one of the `badProtocols` listed above
|
|
32432
|
+
// (and those protocols can never be the default baseURI)
|
|
32433
|
+
return ':';
|
|
32434
|
+
}
|
|
32435
|
+
};
|
|
32436
|
+
} else {
|
|
32437
|
+
throw new Error(`@glimmer/runtime needs a valid "globalThis.URL"`);
|
|
32438
|
+
}
|
|
32439
|
+
}
|
|
32440
|
+
let _protocolForUrlImplementation;
|
|
32441
|
+
function protocolForUrl(url) {
|
|
32442
|
+
if (!_protocolForUrlImplementation) {
|
|
32443
|
+
_protocolForUrlImplementation = findProtocolForURL();
|
|
32444
|
+
}
|
|
32445
|
+
return _protocolForUrlImplementation(url);
|
|
32569
32446
|
}
|
|
32570
32447
|
function sanitizeAttributeValue(element, attribute, value) {
|
|
32571
32448
|
let tagName = null;
|
|
@@ -32592,8 +32469,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
32592
32469
|
}
|
|
32593
32470
|
return str;
|
|
32594
32471
|
}
|
|
32595
|
-
function dynamicAttribute(element, attr, namespace) {
|
|
32596
|
-
let isTrusting = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;
|
|
32472
|
+
function dynamicAttribute(element, attr, namespace, isTrusting = false) {
|
|
32597
32473
|
const {
|
|
32598
32474
|
tagName,
|
|
32599
32475
|
namespaceURI
|
|
@@ -32876,8 +32752,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
32876
32752
|
pushBlockList(list) {
|
|
32877
32753
|
return this.pushLiveBlock(new LiveBlockList(this.element, list));
|
|
32878
32754
|
}
|
|
32879
|
-
pushLiveBlock(block) {
|
|
32880
|
-
let isRemote = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
32755
|
+
pushLiveBlock(block, isRemote = false) {
|
|
32881
32756
|
let current = this.blockStack.current;
|
|
32882
32757
|
if (current !== null) {
|
|
32883
32758
|
if (!isRemote) {
|
|
@@ -32940,8 +32815,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
32940
32815
|
this.popBlock();
|
|
32941
32816
|
this.popElement();
|
|
32942
32817
|
}
|
|
32943
|
-
pushElement(element) {
|
|
32944
|
-
let nextSibling = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
32818
|
+
pushElement(element, nextSibling = null) {
|
|
32945
32819
|
this[CURSOR_STACK].push(new CursorImpl(element, nextSibling));
|
|
32946
32820
|
}
|
|
32947
32821
|
pushModifiers(modifiers) {
|
|
@@ -32989,7 +32863,8 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
32989
32863
|
this.dom.insertBefore(this.element, fragment, this.nextSibling);
|
|
32990
32864
|
return ret;
|
|
32991
32865
|
} else {
|
|
32992
|
-
|
|
32866
|
+
const comment = this.__appendComment('');
|
|
32867
|
+
return new ConcreteBounds(this.element, comment, comment);
|
|
32993
32868
|
}
|
|
32994
32869
|
}
|
|
32995
32870
|
__appendHTML(html) {
|
|
@@ -33010,7 +32885,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33010
32885
|
}
|
|
33011
32886
|
appendDynamicNode(value) {
|
|
33012
32887
|
let node = this.__appendNode(value);
|
|
33013
|
-
let bounds = new
|
|
32888
|
+
let bounds = new ConcreteBounds(this.element, node, node);
|
|
33014
32889
|
this.didAppendBounds(bounds);
|
|
33015
32890
|
}
|
|
33016
32891
|
trustedContent(value) {
|
|
@@ -33180,10 +33055,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33180
33055
|
}
|
|
33181
33056
|
class AppendOpcodes {
|
|
33182
33057
|
constructor() {
|
|
33183
|
-
this.evaluateOpcode =
|
|
33058
|
+
this.evaluateOpcode = new Array(_vm2.Op.Size).fill(null);
|
|
33184
33059
|
}
|
|
33185
|
-
add(name, evaluate) {
|
|
33186
|
-
let kind = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'syscall';
|
|
33060
|
+
add(name, evaluate, kind = 'syscall') {
|
|
33187
33061
|
this.evaluateOpcode[name] = {
|
|
33188
33062
|
syscall: kind !== 'machine',
|
|
33189
33063
|
evaluate
|
|
@@ -33232,13 +33106,12 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33232
33106
|
}
|
|
33233
33107
|
class CurriedValue {
|
|
33234
33108
|
/** @internal */
|
|
33235
|
-
constructor(type, inner, owner, args) {
|
|
33109
|
+
constructor(type, inner, owner, args, resolved = false) {
|
|
33236
33110
|
this[TYPE] = void 0;
|
|
33237
33111
|
this[INNER] = void 0;
|
|
33238
33112
|
this[OWNER] = void 0;
|
|
33239
33113
|
this[ARGS] = void 0;
|
|
33240
33114
|
this[RESOLVED] = void 0;
|
|
33241
|
-
let resolved = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
33242
33115
|
CURRIED_VALUES.add(this);
|
|
33243
33116
|
this[TYPE] = type;
|
|
33244
33117
|
this[INNER] = inner;
|
|
@@ -33292,8 +33165,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33292
33165
|
named
|
|
33293
33166
|
};
|
|
33294
33167
|
}
|
|
33295
|
-
function curry(type, spec, owner, args) {
|
|
33296
|
-
let resolved = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
33168
|
+
function curry(type, spec, owner, args, resolved = false) {
|
|
33297
33169
|
return new CurriedValue(type, spec, owner, args, resolved);
|
|
33298
33170
|
}
|
|
33299
33171
|
function createCurryRef(type, inner, owner, args, resolver, isStrict) {
|
|
@@ -33357,22 +33229,19 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33357
33229
|
APPEND_OPCODES.add(_vm2.Op.PopScope, vm => vm.popScope());
|
|
33358
33230
|
APPEND_OPCODES.add(_vm2.Op.PushDynamicScope, vm => vm.pushDynamicScope());
|
|
33359
33231
|
APPEND_OPCODES.add(_vm2.Op.PopDynamicScope, vm => vm.popDynamicScope());
|
|
33360
|
-
APPEND_OPCODES.add(_vm2.Op.Constant, (vm,
|
|
33361
|
-
|
|
33362
|
-
|
|
33363
|
-
} = _ref;
|
|
33232
|
+
APPEND_OPCODES.add(_vm2.Op.Constant, (vm, {
|
|
33233
|
+
op1: other
|
|
33234
|
+
}) => {
|
|
33364
33235
|
vm.stack.push(vm[CONSTANTS].getValue((0, _util.decodeHandle)(other)));
|
|
33365
33236
|
});
|
|
33366
|
-
APPEND_OPCODES.add(_vm2.Op.ConstantReference, (vm,
|
|
33367
|
-
|
|
33368
|
-
|
|
33369
|
-
} = _ref2;
|
|
33237
|
+
APPEND_OPCODES.add(_vm2.Op.ConstantReference, (vm, {
|
|
33238
|
+
op1: other
|
|
33239
|
+
}) => {
|
|
33370
33240
|
vm.stack.push((0, _reference.createConstRef)(vm[CONSTANTS].getValue((0, _util.decodeHandle)(other)), false));
|
|
33371
33241
|
});
|
|
33372
|
-
APPEND_OPCODES.add(_vm2.Op.Primitive, (vm,
|
|
33373
|
-
|
|
33374
|
-
|
|
33375
|
-
} = _ref3;
|
|
33242
|
+
APPEND_OPCODES.add(_vm2.Op.Primitive, (vm, {
|
|
33243
|
+
op1: primitive
|
|
33244
|
+
}) => {
|
|
33376
33245
|
let stack = vm.stack;
|
|
33377
33246
|
if ((0, _util.isHandle)(primitive)) {
|
|
33378
33247
|
// it is a handle which does not already exist on the stack
|
|
@@ -33400,52 +33269,45 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33400
33269
|
}
|
|
33401
33270
|
stack.push(ref);
|
|
33402
33271
|
});
|
|
33403
|
-
APPEND_OPCODES.add(_vm2.Op.Dup, (vm,
|
|
33404
|
-
|
|
33405
|
-
|
|
33406
|
-
|
|
33407
|
-
} = _ref4;
|
|
33272
|
+
APPEND_OPCODES.add(_vm2.Op.Dup, (vm, {
|
|
33273
|
+
op1: register,
|
|
33274
|
+
op2: offset
|
|
33275
|
+
}) => {
|
|
33408
33276
|
let position = (0, _debug.check)(vm.fetchValue(register), _debug.CheckNumber) - offset;
|
|
33409
33277
|
vm.stack.dup(position);
|
|
33410
33278
|
});
|
|
33411
|
-
APPEND_OPCODES.add(_vm2.Op.Pop, (vm,
|
|
33412
|
-
|
|
33413
|
-
|
|
33414
|
-
} = _ref5;
|
|
33279
|
+
APPEND_OPCODES.add(_vm2.Op.Pop, (vm, {
|
|
33280
|
+
op1: count
|
|
33281
|
+
}) => {
|
|
33415
33282
|
vm.stack.pop(count);
|
|
33416
33283
|
});
|
|
33417
|
-
APPEND_OPCODES.add(_vm2.Op.Load, (vm,
|
|
33418
|
-
|
|
33419
|
-
|
|
33420
|
-
} = _ref6;
|
|
33284
|
+
APPEND_OPCODES.add(_vm2.Op.Load, (vm, {
|
|
33285
|
+
op1: register
|
|
33286
|
+
}) => {
|
|
33421
33287
|
vm.load(register);
|
|
33422
33288
|
});
|
|
33423
|
-
APPEND_OPCODES.add(_vm2.Op.Fetch, (vm,
|
|
33424
|
-
|
|
33425
|
-
|
|
33426
|
-
} = _ref7;
|
|
33289
|
+
APPEND_OPCODES.add(_vm2.Op.Fetch, (vm, {
|
|
33290
|
+
op1: register
|
|
33291
|
+
}) => {
|
|
33427
33292
|
vm.fetch(register);
|
|
33428
33293
|
});
|
|
33429
|
-
APPEND_OPCODES.add(_vm2.Op.BindDynamicScope, (vm,
|
|
33430
|
-
|
|
33431
|
-
|
|
33432
|
-
} = _ref8;
|
|
33294
|
+
APPEND_OPCODES.add(_vm2.Op.BindDynamicScope, (vm, {
|
|
33295
|
+
op1: _names
|
|
33296
|
+
}) => {
|
|
33433
33297
|
let names = vm[CONSTANTS].getArray(_names);
|
|
33434
33298
|
vm.bindDynamicScope(names);
|
|
33435
33299
|
});
|
|
33436
|
-
APPEND_OPCODES.add(_vm2.Op.Enter, (vm,
|
|
33437
|
-
|
|
33438
|
-
|
|
33439
|
-
} = _ref9;
|
|
33300
|
+
APPEND_OPCODES.add(_vm2.Op.Enter, (vm, {
|
|
33301
|
+
op1: args
|
|
33302
|
+
}) => {
|
|
33440
33303
|
vm.enter(args);
|
|
33441
33304
|
});
|
|
33442
33305
|
APPEND_OPCODES.add(_vm2.Op.Exit, vm => {
|
|
33443
33306
|
vm.exit();
|
|
33444
33307
|
});
|
|
33445
|
-
APPEND_OPCODES.add(_vm2.Op.PushSymbolTable, (vm,
|
|
33446
|
-
|
|
33447
|
-
|
|
33448
|
-
} = _ref10;
|
|
33308
|
+
APPEND_OPCODES.add(_vm2.Op.PushSymbolTable, (vm, {
|
|
33309
|
+
op1: _table
|
|
33310
|
+
}) => {
|
|
33449
33311
|
let stack = vm.stack;
|
|
33450
33312
|
stack.push(vm[CONSTANTS].getValue(_table));
|
|
33451
33313
|
});
|
|
@@ -33494,10 +33356,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33494
33356
|
vm.pushScope(invokingScope);
|
|
33495
33357
|
vm.call(handle);
|
|
33496
33358
|
});
|
|
33497
|
-
APPEND_OPCODES.add(_vm2.Op.JumpIf, (vm,
|
|
33498
|
-
|
|
33499
|
-
|
|
33500
|
-
} = _ref11;
|
|
33359
|
+
APPEND_OPCODES.add(_vm2.Op.JumpIf, (vm, {
|
|
33360
|
+
op1: target
|
|
33361
|
+
}) => {
|
|
33501
33362
|
let reference = (0, _debug.check)(vm.stack.pop(), CheckReference);
|
|
33502
33363
|
let value = Boolean((0, _reference.valueForRef)(reference));
|
|
33503
33364
|
if ((0, _reference.isConstRef)(reference)) {
|
|
@@ -33511,10 +33372,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33511
33372
|
vm.updateWith(new Assert(reference));
|
|
33512
33373
|
}
|
|
33513
33374
|
});
|
|
33514
|
-
APPEND_OPCODES.add(_vm2.Op.JumpUnless, (vm,
|
|
33515
|
-
|
|
33516
|
-
|
|
33517
|
-
} = _ref12;
|
|
33375
|
+
APPEND_OPCODES.add(_vm2.Op.JumpUnless, (vm, {
|
|
33376
|
+
op1: target
|
|
33377
|
+
}) => {
|
|
33518
33378
|
let reference = (0, _debug.check)(vm.stack.pop(), CheckReference);
|
|
33519
33379
|
let value = Boolean((0, _reference.valueForRef)(reference));
|
|
33520
33380
|
if ((0, _reference.isConstRef)(reference)) {
|
|
@@ -33528,11 +33388,10 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33528
33388
|
vm.updateWith(new Assert(reference));
|
|
33529
33389
|
}
|
|
33530
33390
|
});
|
|
33531
|
-
APPEND_OPCODES.add(_vm2.Op.JumpEq, (vm,
|
|
33532
|
-
|
|
33533
|
-
|
|
33534
|
-
|
|
33535
|
-
} = _ref13;
|
|
33391
|
+
APPEND_OPCODES.add(_vm2.Op.JumpEq, (vm, {
|
|
33392
|
+
op1: target,
|
|
33393
|
+
op2: comparison
|
|
33394
|
+
}) => {
|
|
33536
33395
|
let other = (0, _debug.check)(vm.stack.peek(), _debug.CheckNumber);
|
|
33537
33396
|
if (other === comparison) {
|
|
33538
33397
|
vm.goto(target);
|
|
@@ -33631,22 +33490,19 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33631
33490
|
this.target.didModify(tag);
|
|
33632
33491
|
}
|
|
33633
33492
|
}
|
|
33634
|
-
APPEND_OPCODES.add(_vm2.Op.Text, (vm,
|
|
33635
|
-
|
|
33636
|
-
|
|
33637
|
-
} = _ref;
|
|
33493
|
+
APPEND_OPCODES.add(_vm2.Op.Text, (vm, {
|
|
33494
|
+
op1: text
|
|
33495
|
+
}) => {
|
|
33638
33496
|
vm.elements().appendText(vm[CONSTANTS].getValue(text));
|
|
33639
33497
|
});
|
|
33640
|
-
APPEND_OPCODES.add(_vm2.Op.Comment, (vm,
|
|
33641
|
-
|
|
33642
|
-
|
|
33643
|
-
} = _ref2;
|
|
33498
|
+
APPEND_OPCODES.add(_vm2.Op.Comment, (vm, {
|
|
33499
|
+
op1: text
|
|
33500
|
+
}) => {
|
|
33644
33501
|
vm.elements().appendComment(vm[CONSTANTS].getValue(text));
|
|
33645
33502
|
});
|
|
33646
|
-
APPEND_OPCODES.add(_vm2.Op.OpenElement, (vm,
|
|
33647
|
-
|
|
33648
|
-
|
|
33649
|
-
} = _ref3;
|
|
33503
|
+
APPEND_OPCODES.add(_vm2.Op.OpenElement, (vm, {
|
|
33504
|
+
op1: tag
|
|
33505
|
+
}) => {
|
|
33650
33506
|
vm.elements().openElement(vm[CONSTANTS].getValue(tag));
|
|
33651
33507
|
});
|
|
33652
33508
|
APPEND_OPCODES.add(_vm2.Op.OpenDynamicElement, vm => {
|
|
@@ -33683,24 +33539,19 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33683
33539
|
});
|
|
33684
33540
|
APPEND_OPCODES.add(_vm2.Op.CloseElement, vm => {
|
|
33685
33541
|
let modifiers = vm.elements().closeElement();
|
|
33686
|
-
if (modifiers) {
|
|
33542
|
+
if (modifiers !== null) {
|
|
33687
33543
|
modifiers.forEach(modifier => {
|
|
33688
33544
|
vm.env.scheduleInstallModifier(modifier);
|
|
33689
|
-
|
|
33690
|
-
|
|
33691
|
-
state
|
|
33692
|
-
} = modifier;
|
|
33693
|
-
let d = manager.getDestroyable(state);
|
|
33694
|
-
if (d) {
|
|
33545
|
+
const d = modifier.manager.getDestroyable(modifier.state);
|
|
33546
|
+
if (d !== null) {
|
|
33695
33547
|
vm.associateDestroyable(d);
|
|
33696
33548
|
}
|
|
33697
33549
|
});
|
|
33698
33550
|
}
|
|
33699
33551
|
});
|
|
33700
|
-
APPEND_OPCODES.add(_vm2.Op.Modifier, (vm,
|
|
33701
|
-
|
|
33702
|
-
|
|
33703
|
-
} = _ref4;
|
|
33552
|
+
APPEND_OPCODES.add(_vm2.Op.Modifier, (vm, {
|
|
33553
|
+
op1: handle
|
|
33554
|
+
}) => {
|
|
33704
33555
|
if (vm.env.isInteractive === false) {
|
|
33705
33556
|
return;
|
|
33706
33557
|
}
|
|
@@ -33732,8 +33583,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33732
33583
|
return;
|
|
33733
33584
|
}
|
|
33734
33585
|
let {
|
|
33735
|
-
stack
|
|
33736
|
-
[CONSTANTS]: constants
|
|
33586
|
+
stack
|
|
33737
33587
|
} = vm;
|
|
33738
33588
|
let ref = (0, _debug.check)(stack.pop(), CheckReference);
|
|
33739
33589
|
let args = (0, _debug.check)(stack.pop(), CheckArguments).capture();
|
|
@@ -33767,14 +33617,19 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33767
33617
|
hostDefinition = value;
|
|
33768
33618
|
owner = initialOwner;
|
|
33769
33619
|
}
|
|
33770
|
-
let
|
|
33771
|
-
if (
|
|
33772
|
-
|
|
33620
|
+
let manager = (0, _manager.getInternalModifierManager)(hostDefinition, true);
|
|
33621
|
+
if (manager === null) {
|
|
33622
|
+
if (true /* DEBUG */) {
|
|
33623
|
+
throw new Error(`Expected a dynamic modifier definition, but received an object or function that did not have a modifier manager associated with it. The dynamic invocation was \`{{${ref.debugLabel}}}\`, and the incorrect definition is the value at the path \`${ref.debugLabel}\`, which was: ${(0, _util.debugToString)(hostDefinition)}`);
|
|
33624
|
+
} else {
|
|
33625
|
+
throw new Error('BUG: modifier manager expected');
|
|
33626
|
+
}
|
|
33773
33627
|
}
|
|
33774
|
-
let definition =
|
|
33775
|
-
|
|
33776
|
-
manager
|
|
33777
|
-
|
|
33628
|
+
let definition = {
|
|
33629
|
+
resolvedName: null,
|
|
33630
|
+
manager,
|
|
33631
|
+
state: hostDefinition
|
|
33632
|
+
};
|
|
33778
33633
|
let state = manager.create(owner, (0, _util.expect)(constructing, 'BUG: ElementModifier could not find the element it applies to'), definition.state, args);
|
|
33779
33634
|
return {
|
|
33780
33635
|
manager,
|
|
@@ -33865,23 +33720,21 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33865
33720
|
}
|
|
33866
33721
|
}
|
|
33867
33722
|
}
|
|
33868
|
-
APPEND_OPCODES.add(_vm2.Op.StaticAttr, (vm,
|
|
33869
|
-
|
|
33870
|
-
|
|
33871
|
-
|
|
33872
|
-
|
|
33873
|
-
} = _ref5;
|
|
33723
|
+
APPEND_OPCODES.add(_vm2.Op.StaticAttr, (vm, {
|
|
33724
|
+
op1: _name,
|
|
33725
|
+
op2: _value,
|
|
33726
|
+
op3: _namespace
|
|
33727
|
+
}) => {
|
|
33874
33728
|
let name = vm[CONSTANTS].getValue(_name);
|
|
33875
33729
|
let value = vm[CONSTANTS].getValue(_value);
|
|
33876
33730
|
let namespace = _namespace ? vm[CONSTANTS].getValue(_namespace) : null;
|
|
33877
33731
|
vm.elements().setStaticAttribute(name, value, namespace);
|
|
33878
33732
|
});
|
|
33879
|
-
APPEND_OPCODES.add(_vm2.Op.DynamicAttr, (vm,
|
|
33880
|
-
|
|
33881
|
-
|
|
33882
|
-
|
|
33883
|
-
|
|
33884
|
-
} = _ref6;
|
|
33733
|
+
APPEND_OPCODES.add(_vm2.Op.DynamicAttr, (vm, {
|
|
33734
|
+
op1: _name,
|
|
33735
|
+
op2: _trusting,
|
|
33736
|
+
op3: _namespace
|
|
33737
|
+
}) => {
|
|
33885
33738
|
let name = vm[CONSTANTS].getValue(_name);
|
|
33886
33739
|
let trusting = vm[CONSTANTS].getValue(_trusting);
|
|
33887
33740
|
let reference = (0, _debug.check)(vm.stack.pop(), CheckReference);
|
|
@@ -33921,10 +33774,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33921
33774
|
* component type's ComponentDefinition.
|
|
33922
33775
|
*/
|
|
33923
33776
|
|
|
33924
|
-
APPEND_OPCODES.add(_vm2.Op.PushComponentDefinition, (vm,
|
|
33925
|
-
|
|
33926
|
-
|
|
33927
|
-
} = _ref;
|
|
33777
|
+
APPEND_OPCODES.add(_vm2.Op.PushComponentDefinition, (vm, {
|
|
33778
|
+
op1: handle
|
|
33779
|
+
}) => {
|
|
33928
33780
|
let definition = vm[CONSTANTS].getValue(handle);
|
|
33929
33781
|
(0, _util.assert)(!!definition, `Missing component for ${handle}`);
|
|
33930
33782
|
let {
|
|
@@ -33942,10 +33794,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
33942
33794
|
};
|
|
33943
33795
|
vm.stack.push(instance);
|
|
33944
33796
|
});
|
|
33945
|
-
APPEND_OPCODES.add(_vm2.Op.ResolveDynamicComponent, (vm,
|
|
33946
|
-
|
|
33947
|
-
|
|
33948
|
-
} = _ref2;
|
|
33797
|
+
APPEND_OPCODES.add(_vm2.Op.ResolveDynamicComponent, (vm, {
|
|
33798
|
+
op1: _isStrict
|
|
33799
|
+
}) => {
|
|
33949
33800
|
let stack = vm.stack;
|
|
33950
33801
|
let component = (0, _debug.check)((0, _reference.valueForRef)((0, _debug.check)(stack.pop(), CheckReference)), (0, _debug.CheckOr)(_debug.CheckString, CheckCurriedComponentDefinition));
|
|
33951
33802
|
let constants = vm[CONSTANTS];
|
|
@@ -34007,12 +33858,11 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34007
33858
|
table: null
|
|
34008
33859
|
});
|
|
34009
33860
|
});
|
|
34010
|
-
APPEND_OPCODES.add(_vm2.Op.PushArgs, (vm,
|
|
34011
|
-
|
|
34012
|
-
|
|
34013
|
-
|
|
34014
|
-
|
|
34015
|
-
} = _ref3;
|
|
33861
|
+
APPEND_OPCODES.add(_vm2.Op.PushArgs, (vm, {
|
|
33862
|
+
op1: _names,
|
|
33863
|
+
op2: _blockNames,
|
|
33864
|
+
op3: flags
|
|
33865
|
+
}) => {
|
|
34016
33866
|
let stack = vm.stack;
|
|
34017
33867
|
let names = vm[CONSTANTS].getArray(_names);
|
|
34018
33868
|
let positionalCount = flags >> 4;
|
|
@@ -34033,10 +33883,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34033
33883
|
let capturedArgs = args.capture();
|
|
34034
33884
|
stack.push(capturedArgs);
|
|
34035
33885
|
});
|
|
34036
|
-
APPEND_OPCODES.add(_vm2.Op.PrepareArgs, (vm,
|
|
34037
|
-
|
|
34038
|
-
|
|
34039
|
-
} = _ref4;
|
|
33886
|
+
APPEND_OPCODES.add(_vm2.Op.PrepareArgs, (vm, {
|
|
33887
|
+
op1: _state
|
|
33888
|
+
}) => {
|
|
34040
33889
|
let stack = vm.stack;
|
|
34041
33890
|
let instance = vm.fetchValue(_state);
|
|
34042
33891
|
let args = (0, _debug.check)(stack.pop(), (0, _debug.CheckInstanceof)(VMArgumentsImpl));
|
|
@@ -34115,11 +33964,10 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34115
33964
|
}
|
|
34116
33965
|
stack.push(args);
|
|
34117
33966
|
});
|
|
34118
|
-
APPEND_OPCODES.add(_vm2.Op.CreateComponent, (vm,
|
|
34119
|
-
|
|
34120
|
-
|
|
34121
|
-
|
|
34122
|
-
} = _ref5;
|
|
33967
|
+
APPEND_OPCODES.add(_vm2.Op.CreateComponent, (vm, {
|
|
33968
|
+
op1: flags,
|
|
33969
|
+
op2: _state
|
|
33970
|
+
}) => {
|
|
34123
33971
|
let instance = (0, _debug.check)(vm.fetchValue(_state), CheckComponentInstance);
|
|
34124
33972
|
let {
|
|
34125
33973
|
definition,
|
|
@@ -34154,10 +34002,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34154
34002
|
vm.updateWith(new UpdateComponentOpcode(state, manager, dynamicScope));
|
|
34155
34003
|
}
|
|
34156
34004
|
});
|
|
34157
|
-
APPEND_OPCODES.add(_vm2.Op.RegisterComponentDestructor, (vm,
|
|
34158
|
-
|
|
34159
|
-
|
|
34160
|
-
} = _ref6;
|
|
34005
|
+
APPEND_OPCODES.add(_vm2.Op.RegisterComponentDestructor, (vm, {
|
|
34006
|
+
op1: _state
|
|
34007
|
+
}) => {
|
|
34161
34008
|
let {
|
|
34162
34009
|
manager,
|
|
34163
34010
|
state,
|
|
@@ -34169,10 +34016,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34169
34016
|
}
|
|
34170
34017
|
if (d) vm.associateDestroyable(d);
|
|
34171
34018
|
});
|
|
34172
|
-
APPEND_OPCODES.add(_vm2.Op.BeginComponentTransaction, (vm,
|
|
34173
|
-
|
|
34174
|
-
|
|
34175
|
-
} = _ref7;
|
|
34019
|
+
APPEND_OPCODES.add(_vm2.Op.BeginComponentTransaction, (vm, {
|
|
34020
|
+
op1: _state
|
|
34021
|
+
}) => {
|
|
34176
34022
|
let name;
|
|
34177
34023
|
if (true /* DEBUG */) {
|
|
34178
34024
|
let {
|
|
@@ -34187,24 +34033,22 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34187
34033
|
APPEND_OPCODES.add(_vm2.Op.PutComponentOperations, vm => {
|
|
34188
34034
|
vm.loadValue(_vm2.$t0, new ComponentElementOperations());
|
|
34189
34035
|
});
|
|
34190
|
-
APPEND_OPCODES.add(_vm2.Op.ComponentAttr, (vm,
|
|
34191
|
-
|
|
34192
|
-
|
|
34193
|
-
|
|
34194
|
-
|
|
34195
|
-
} = _ref8;
|
|
34036
|
+
APPEND_OPCODES.add(_vm2.Op.ComponentAttr, (vm, {
|
|
34037
|
+
op1: _name,
|
|
34038
|
+
op2: _trusting,
|
|
34039
|
+
op3: _namespace
|
|
34040
|
+
}) => {
|
|
34196
34041
|
let name = vm[CONSTANTS].getValue(_name);
|
|
34197
34042
|
let trusting = vm[CONSTANTS].getValue(_trusting);
|
|
34198
34043
|
let reference = (0, _debug.check)(vm.stack.pop(), CheckReference);
|
|
34199
34044
|
let namespace = _namespace ? vm[CONSTANTS].getValue(_namespace) : null;
|
|
34200
34045
|
(0, _debug.check)(vm.fetchValue(_vm2.$t0), (0, _debug.CheckInstanceof)(ComponentElementOperations)).setAttribute(name, reference, trusting, namespace);
|
|
34201
34046
|
});
|
|
34202
|
-
APPEND_OPCODES.add(_vm2.Op.StaticComponentAttr, (vm,
|
|
34203
|
-
|
|
34204
|
-
|
|
34205
|
-
|
|
34206
|
-
|
|
34207
|
-
} = _ref9;
|
|
34047
|
+
APPEND_OPCODES.add(_vm2.Op.StaticComponentAttr, (vm, {
|
|
34048
|
+
op1: _name,
|
|
34049
|
+
op2: _value,
|
|
34050
|
+
op3: _namespace
|
|
34051
|
+
}) => {
|
|
34208
34052
|
let name = vm[CONSTANTS].getValue(_name);
|
|
34209
34053
|
let value = vm[CONSTANTS].getValue(_value);
|
|
34210
34054
|
let namespace = _namespace ? vm[CONSTANTS].getValue(_namespace) : null;
|
|
@@ -34274,15 +34118,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34274
34118
|
return createClassListRef(classes);
|
|
34275
34119
|
}
|
|
34276
34120
|
function allStringClasses(classes) {
|
|
34277
|
-
|
|
34278
|
-
if (typeof classes[i] !== 'string') {
|
|
34279
|
-
return false;
|
|
34280
|
-
}
|
|
34281
|
-
}
|
|
34282
|
-
return true;
|
|
34121
|
+
return classes.every(c => typeof c === 'string');
|
|
34283
34122
|
}
|
|
34284
|
-
function setDeferredAttr(vm, name, value, namespace) {
|
|
34285
|
-
let trusting = arguments.length > 4 && arguments[4] !== undefined ? arguments[4] : false;
|
|
34123
|
+
function setDeferredAttr(vm, name, value, namespace, trusting = false) {
|
|
34286
34124
|
if (typeof value === 'string') {
|
|
34287
34125
|
vm.elements().setStaticAttribute(name, value, namespace);
|
|
34288
34126
|
} else {
|
|
@@ -34292,10 +34130,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34292
34130
|
}
|
|
34293
34131
|
}
|
|
34294
34132
|
}
|
|
34295
|
-
APPEND_OPCODES.add(_vm2.Op.DidCreateElement, (vm,
|
|
34296
|
-
|
|
34297
|
-
|
|
34298
|
-
} = _ref10;
|
|
34133
|
+
APPEND_OPCODES.add(_vm2.Op.DidCreateElement, (vm, {
|
|
34134
|
+
op1: _state
|
|
34135
|
+
}) => {
|
|
34299
34136
|
let {
|
|
34300
34137
|
definition,
|
|
34301
34138
|
state
|
|
@@ -34306,11 +34143,10 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34306
34143
|
let operations = (0, _debug.check)(vm.fetchValue(_vm2.$t0), (0, _debug.CheckInstanceof)(ComponentElementOperations));
|
|
34307
34144
|
manager.didCreateElement(state, (0, _util.expect)(vm.elements().constructing, `Expected a constructing element in DidCreateOpcode`), operations);
|
|
34308
34145
|
});
|
|
34309
|
-
APPEND_OPCODES.add(_vm2.Op.GetComponentSelf, (vm,
|
|
34310
|
-
|
|
34311
|
-
|
|
34312
|
-
|
|
34313
|
-
} = _ref11;
|
|
34146
|
+
APPEND_OPCODES.add(_vm2.Op.GetComponentSelf, (vm, {
|
|
34147
|
+
op1: _state,
|
|
34148
|
+
op2: _names
|
|
34149
|
+
}) => {
|
|
34314
34150
|
let instance = (0, _debug.check)(vm.fetchValue(_state), CheckComponentInstance);
|
|
34315
34151
|
let {
|
|
34316
34152
|
definition,
|
|
@@ -34380,10 +34216,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34380
34216
|
}
|
|
34381
34217
|
vm.stack.push(selfRef);
|
|
34382
34218
|
});
|
|
34383
|
-
APPEND_OPCODES.add(_vm2.Op.GetComponentTagName, (vm,
|
|
34384
|
-
|
|
34385
|
-
|
|
34386
|
-
} = _ref12;
|
|
34219
|
+
APPEND_OPCODES.add(_vm2.Op.GetComponentTagName, (vm, {
|
|
34220
|
+
op1: _state
|
|
34221
|
+
}) => {
|
|
34387
34222
|
let {
|
|
34388
34223
|
definition,
|
|
34389
34224
|
state
|
|
@@ -34398,10 +34233,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34398
34233
|
});
|
|
34399
34234
|
|
|
34400
34235
|
// Dynamic Invocation Only
|
|
34401
|
-
APPEND_OPCODES.add(_vm2.Op.GetComponentLayout, (vm,
|
|
34402
|
-
|
|
34403
|
-
|
|
34404
|
-
} = _ref13;
|
|
34236
|
+
APPEND_OPCODES.add(_vm2.Op.GetComponentLayout, (vm, {
|
|
34237
|
+
op1: _state
|
|
34238
|
+
}) => {
|
|
34405
34239
|
let instance = (0, _debug.check)(vm.fetchValue(_state), CheckComponentInstance);
|
|
34406
34240
|
let {
|
|
34407
34241
|
manager,
|
|
@@ -34431,10 +34265,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34431
34265
|
stack.push(compilable.symbolTable);
|
|
34432
34266
|
stack.push(handle);
|
|
34433
34267
|
});
|
|
34434
|
-
APPEND_OPCODES.add(_vm2.Op.Main, (vm,
|
|
34435
|
-
|
|
34436
|
-
|
|
34437
|
-
} = _ref14;
|
|
34268
|
+
APPEND_OPCODES.add(_vm2.Op.Main, (vm, {
|
|
34269
|
+
op1: register
|
|
34270
|
+
}) => {
|
|
34438
34271
|
let definition = (0, _debug.check)(vm.stack.pop(), CheckComponentDefinition);
|
|
34439
34272
|
let invocation = (0, _debug.check)(vm.stack.pop(), CheckInvocation);
|
|
34440
34273
|
let {
|
|
@@ -34452,10 +34285,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34452
34285
|
};
|
|
34453
34286
|
vm.loadValue(register, state);
|
|
34454
34287
|
});
|
|
34455
|
-
APPEND_OPCODES.add(_vm2.Op.PopulateLayout, (vm,
|
|
34456
|
-
|
|
34457
|
-
|
|
34458
|
-
} = _ref15;
|
|
34288
|
+
APPEND_OPCODES.add(_vm2.Op.PopulateLayout, (vm, {
|
|
34289
|
+
op1: _state
|
|
34290
|
+
}) => {
|
|
34459
34291
|
let {
|
|
34460
34292
|
stack
|
|
34461
34293
|
} = vm;
|
|
@@ -34467,10 +34299,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34467
34299
|
state.handle = handle;
|
|
34468
34300
|
state.table = table;
|
|
34469
34301
|
});
|
|
34470
|
-
APPEND_OPCODES.add(_vm2.Op.VirtualRootScope, (vm,
|
|
34471
|
-
|
|
34472
|
-
|
|
34473
|
-
} = _ref16;
|
|
34302
|
+
APPEND_OPCODES.add(_vm2.Op.VirtualRootScope, (vm, {
|
|
34303
|
+
op1: _state
|
|
34304
|
+
}) => {
|
|
34474
34305
|
let {
|
|
34475
34306
|
table,
|
|
34476
34307
|
manager,
|
|
@@ -34497,20 +34328,18 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34497
34328
|
}
|
|
34498
34329
|
vm.pushRootScope(table.symbols.length + 1, owner);
|
|
34499
34330
|
});
|
|
34500
|
-
APPEND_OPCODES.add(_vm2.Op.SetupForEval, (vm,
|
|
34501
|
-
|
|
34502
|
-
|
|
34503
|
-
} = _ref17;
|
|
34331
|
+
APPEND_OPCODES.add(_vm2.Op.SetupForEval, (vm, {
|
|
34332
|
+
op1: _state
|
|
34333
|
+
}) => {
|
|
34504
34334
|
let state = (0, _debug.check)(vm.fetchValue(_state), CheckFinishedComponentInstance);
|
|
34505
34335
|
if (state.table.hasEval) {
|
|
34506
34336
|
let lookup = state.lookup = (0, _util.dict)();
|
|
34507
34337
|
vm.scope().bindEvalScope(lookup);
|
|
34508
34338
|
}
|
|
34509
34339
|
});
|
|
34510
|
-
APPEND_OPCODES.add(_vm2.Op.SetNamedVariables, (vm,
|
|
34511
|
-
|
|
34512
|
-
|
|
34513
|
-
} = _ref18;
|
|
34340
|
+
APPEND_OPCODES.add(_vm2.Op.SetNamedVariables, (vm, {
|
|
34341
|
+
op1: _state
|
|
34342
|
+
}) => {
|
|
34514
34343
|
let state = (0, _debug.check)(vm.fetchValue(_state), CheckFinishedComponentInstance);
|
|
34515
34344
|
let scope = vm.scope();
|
|
34516
34345
|
let args = (0, _debug.check)(vm.stack.peek(), CheckArguments);
|
|
@@ -34529,10 +34358,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34529
34358
|
if (symbol !== -1) vm.scope().bindBlock(symbol + 1, block);
|
|
34530
34359
|
if (state.lookup) state.lookup[symbolName] = block;
|
|
34531
34360
|
}
|
|
34532
|
-
APPEND_OPCODES.add(_vm2.Op.SetBlocks, (vm,
|
|
34533
|
-
|
|
34534
|
-
|
|
34535
|
-
} = _ref19;
|
|
34361
|
+
APPEND_OPCODES.add(_vm2.Op.SetBlocks, (vm, {
|
|
34362
|
+
op1: _state
|
|
34363
|
+
}) => {
|
|
34536
34364
|
let state = (0, _debug.check)(vm.fetchValue(_state), CheckFinishedComponentInstance);
|
|
34537
34365
|
let {
|
|
34538
34366
|
blocks
|
|
@@ -34543,17 +34371,15 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34543
34371
|
});
|
|
34544
34372
|
|
|
34545
34373
|
// Dynamic Invocation Only
|
|
34546
|
-
APPEND_OPCODES.add(_vm2.Op.InvokeComponentLayout, (vm,
|
|
34547
|
-
|
|
34548
|
-
|
|
34549
|
-
} = _ref20;
|
|
34374
|
+
APPEND_OPCODES.add(_vm2.Op.InvokeComponentLayout, (vm, {
|
|
34375
|
+
op1: _state
|
|
34376
|
+
}) => {
|
|
34550
34377
|
let state = (0, _debug.check)(vm.fetchValue(_state), CheckFinishedComponentInstance);
|
|
34551
34378
|
vm.call(state.handle);
|
|
34552
34379
|
});
|
|
34553
|
-
APPEND_OPCODES.add(_vm2.Op.DidRenderLayout, (vm,
|
|
34554
|
-
|
|
34555
|
-
|
|
34556
|
-
} = _ref21;
|
|
34380
|
+
APPEND_OPCODES.add(_vm2.Op.DidRenderLayout, (vm, {
|
|
34381
|
+
op1: _state
|
|
34382
|
+
}) => {
|
|
34557
34383
|
let instance = (0, _debug.check)(vm.fetchValue(_state), CheckComponentInstance);
|
|
34558
34384
|
let {
|
|
34559
34385
|
manager,
|
|
@@ -34925,8 +34751,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
34925
34751
|
has(name) {
|
|
34926
34752
|
return this.names.indexOf(name) !== -1;
|
|
34927
34753
|
}
|
|
34928
|
-
get(name) {
|
|
34929
|
-
let atNames = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
34754
|
+
get(name, atNames = false) {
|
|
34930
34755
|
let {
|
|
34931
34756
|
base,
|
|
34932
34757
|
stack
|
|
@@ -35118,11 +34943,11 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35118
34943
|
const EMPTY_ARGS = _exports.EMPTY_ARGS = createCapturedArgs(EMPTY_NAMED, EMPTY_POSITIONAL);
|
|
35119
34944
|
function createConcatRef(partsRefs) {
|
|
35120
34945
|
return (0, _reference.createComputeRef)(() => {
|
|
35121
|
-
|
|
35122
|
-
for (const
|
|
35123
|
-
|
|
34946
|
+
const parts = [];
|
|
34947
|
+
for (const ref of partsRefs) {
|
|
34948
|
+
const value = (0, _reference.valueForRef)(ref);
|
|
35124
34949
|
if (value !== null && value !== undefined) {
|
|
35125
|
-
parts
|
|
34950
|
+
parts.push(castToString(value));
|
|
35126
34951
|
}
|
|
35127
34952
|
}
|
|
35128
34953
|
if (parts.length > 0) {
|
|
@@ -35132,16 +34957,17 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35132
34957
|
});
|
|
35133
34958
|
}
|
|
35134
34959
|
function castToString(value) {
|
|
35135
|
-
if (typeof value
|
|
34960
|
+
if (typeof value === 'string') {
|
|
34961
|
+
return value;
|
|
34962
|
+
} else if (typeof value.toString !== 'function') {
|
|
35136
34963
|
return '';
|
|
35137
34964
|
}
|
|
35138
34965
|
return String(value);
|
|
35139
34966
|
}
|
|
35140
|
-
APPEND_OPCODES.add(_vm2.Op.Curry, (vm,
|
|
35141
|
-
|
|
35142
|
-
|
|
35143
|
-
|
|
35144
|
-
} = _ref;
|
|
34967
|
+
APPEND_OPCODES.add(_vm2.Op.Curry, (vm, {
|
|
34968
|
+
op1: type,
|
|
34969
|
+
op2: _isStrict
|
|
34970
|
+
}) => {
|
|
35145
34971
|
let stack = vm.stack;
|
|
35146
34972
|
let definition = (0, _debug.check)(stack.pop(), CheckReference);
|
|
35147
34973
|
let capturedArgs = (0, _debug.check)(stack.pop(), CheckCapturedArguments);
|
|
@@ -35172,7 +34998,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35172
34998
|
positional,
|
|
35173
34999
|
named
|
|
35174
35000
|
} = resolveCurriedValue(definition);
|
|
35175
|
-
let helper = resolveHelper(
|
|
35001
|
+
let helper = resolveHelper(resolvedDef, ref);
|
|
35176
35002
|
if (named !== undefined) {
|
|
35177
35003
|
args.named = (0, _util.assign)({}, ...named, args.named);
|
|
35178
35004
|
}
|
|
@@ -35182,7 +35008,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35182
35008
|
helperRef = helper(args, owner);
|
|
35183
35009
|
(0, _destroyable.associateDestroyableChild)(helperInstanceRef, helperRef);
|
|
35184
35010
|
} else if ((0, _util.isObject)(definition)) {
|
|
35185
|
-
let helper = resolveHelper(
|
|
35011
|
+
let helper = resolveHelper(definition, ref);
|
|
35186
35012
|
helperRef = helper(args, initialOwner);
|
|
35187
35013
|
if ((0, _destroyable._hasDestroyableChildren)(helperRef)) {
|
|
35188
35014
|
(0, _destroyable.associateDestroyableChild)(helperInstanceRef, helperRef);
|
|
@@ -35198,17 +35024,23 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35198
35024
|
vm.associateDestroyable(helperInstanceRef);
|
|
35199
35025
|
vm.loadValue(_vm2.$v0, helperValueRef);
|
|
35200
35026
|
});
|
|
35201
|
-
function resolveHelper(
|
|
35202
|
-
let
|
|
35203
|
-
|
|
35027
|
+
function resolveHelper(definition, ref) {
|
|
35028
|
+
let managerOrHelper = (0, _manager.getInternalHelperManager)(definition, true);
|
|
35029
|
+
let helper;
|
|
35030
|
+
if (managerOrHelper === null) {
|
|
35031
|
+
helper = null;
|
|
35032
|
+
} else {
|
|
35033
|
+
helper = typeof managerOrHelper === 'function' ? managerOrHelper : managerOrHelper.getHelper(definition);
|
|
35034
|
+
(0, _util.assert)(managerOrHelper, 'BUG: expected manager or helper');
|
|
35035
|
+
}
|
|
35036
|
+
if (true /* DEBUG */ && helper === null) {
|
|
35204
35037
|
throw new Error(`Expected a dynamic helper definition, but received an object or function that did not have a helper manager associated with it. The dynamic invocation was \`{{${ref.debugLabel}}}\` or \`(${ref.debugLabel})\`, and the incorrect definition is the value at the path \`${ref.debugLabel}\`, which was: ${(0, _util.debugToString)(definition)}`);
|
|
35205
35038
|
}
|
|
35206
|
-
return
|
|
35039
|
+
return helper;
|
|
35207
35040
|
}
|
|
35208
|
-
APPEND_OPCODES.add(_vm2.Op.Helper, (vm,
|
|
35209
|
-
|
|
35210
|
-
|
|
35211
|
-
} = _ref2;
|
|
35041
|
+
APPEND_OPCODES.add(_vm2.Op.Helper, (vm, {
|
|
35042
|
+
op1: handle
|
|
35043
|
+
}) => {
|
|
35212
35044
|
let stack = vm.stack;
|
|
35213
35045
|
let helper = (0, _debug.check)(vm[CONSTANTS].getValue(handle), CheckHelper);
|
|
35214
35046
|
let args = (0, _debug.check)(stack.pop(), CheckArguments);
|
|
@@ -35218,33 +35050,29 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35218
35050
|
}
|
|
35219
35051
|
vm.loadValue(_vm2.$v0, value);
|
|
35220
35052
|
});
|
|
35221
|
-
APPEND_OPCODES.add(_vm2.Op.GetVariable, (vm,
|
|
35222
|
-
|
|
35223
|
-
|
|
35224
|
-
} = _ref3;
|
|
35053
|
+
APPEND_OPCODES.add(_vm2.Op.GetVariable, (vm, {
|
|
35054
|
+
op1: symbol
|
|
35055
|
+
}) => {
|
|
35225
35056
|
let expr = vm.referenceForSymbol(symbol);
|
|
35226
35057
|
vm.stack.push(expr);
|
|
35227
35058
|
});
|
|
35228
|
-
APPEND_OPCODES.add(_vm2.Op.SetVariable, (vm,
|
|
35229
|
-
|
|
35230
|
-
|
|
35231
|
-
} = _ref4;
|
|
35059
|
+
APPEND_OPCODES.add(_vm2.Op.SetVariable, (vm, {
|
|
35060
|
+
op1: symbol
|
|
35061
|
+
}) => {
|
|
35232
35062
|
let expr = (0, _debug.check)(vm.stack.pop(), CheckReference);
|
|
35233
35063
|
vm.scope().bindSymbol(symbol, expr);
|
|
35234
35064
|
});
|
|
35235
|
-
APPEND_OPCODES.add(_vm2.Op.SetBlock, (vm,
|
|
35236
|
-
|
|
35237
|
-
|
|
35238
|
-
} = _ref5;
|
|
35065
|
+
APPEND_OPCODES.add(_vm2.Op.SetBlock, (vm, {
|
|
35066
|
+
op1: symbol
|
|
35067
|
+
}) => {
|
|
35239
35068
|
let handle = (0, _debug.check)(vm.stack.pop(), CheckCompilableBlock);
|
|
35240
35069
|
let scope = (0, _debug.check)(vm.stack.pop(), CheckScope);
|
|
35241
35070
|
let table = (0, _debug.check)(vm.stack.pop(), _debug.CheckBlockSymbolTable);
|
|
35242
35071
|
vm.scope().bindBlock(symbol, [handle, scope, table]);
|
|
35243
35072
|
});
|
|
35244
|
-
APPEND_OPCODES.add(_vm2.Op.ResolveMaybeLocal, (vm,
|
|
35245
|
-
|
|
35246
|
-
|
|
35247
|
-
} = _ref6;
|
|
35073
|
+
APPEND_OPCODES.add(_vm2.Op.ResolveMaybeLocal, (vm, {
|
|
35074
|
+
op1: _name
|
|
35075
|
+
}) => {
|
|
35248
35076
|
let name = vm[CONSTANTS].getValue(_name);
|
|
35249
35077
|
let locals = vm.scope().getPartialMap();
|
|
35250
35078
|
let ref = locals[name];
|
|
@@ -35253,24 +35081,21 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35253
35081
|
}
|
|
35254
35082
|
vm.stack.push(ref);
|
|
35255
35083
|
});
|
|
35256
|
-
APPEND_OPCODES.add(_vm2.Op.RootScope, (vm,
|
|
35257
|
-
|
|
35258
|
-
|
|
35259
|
-
} = _ref7;
|
|
35084
|
+
APPEND_OPCODES.add(_vm2.Op.RootScope, (vm, {
|
|
35085
|
+
op1: symbols
|
|
35086
|
+
}) => {
|
|
35260
35087
|
vm.pushRootScope(symbols, vm.getOwner());
|
|
35261
35088
|
});
|
|
35262
|
-
APPEND_OPCODES.add(_vm2.Op.GetProperty, (vm,
|
|
35263
|
-
|
|
35264
|
-
|
|
35265
|
-
} = _ref8;
|
|
35089
|
+
APPEND_OPCODES.add(_vm2.Op.GetProperty, (vm, {
|
|
35090
|
+
op1: _key
|
|
35091
|
+
}) => {
|
|
35266
35092
|
let key = vm[CONSTANTS].getValue(_key);
|
|
35267
35093
|
let expr = (0, _debug.check)(vm.stack.pop(), CheckReference);
|
|
35268
35094
|
vm.stack.push((0, _reference.childRefFor)(expr, key));
|
|
35269
35095
|
});
|
|
35270
|
-
APPEND_OPCODES.add(_vm2.Op.GetBlock, (vm,
|
|
35271
|
-
|
|
35272
|
-
|
|
35273
|
-
} = _ref9;
|
|
35096
|
+
APPEND_OPCODES.add(_vm2.Op.GetBlock, (vm, {
|
|
35097
|
+
op1: _block
|
|
35098
|
+
}) => {
|
|
35274
35099
|
let {
|
|
35275
35100
|
stack
|
|
35276
35101
|
} = vm;
|
|
@@ -35318,10 +35143,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35318
35143
|
let hasBlockParams = table && table.parameters.length;
|
|
35319
35144
|
vm.stack.push(hasBlockParams ? _reference.TRUE_REFERENCE : _reference.FALSE_REFERENCE);
|
|
35320
35145
|
});
|
|
35321
|
-
APPEND_OPCODES.add(_vm2.Op.Concat, (vm,
|
|
35322
|
-
|
|
35323
|
-
|
|
35324
|
-
} = _ref10;
|
|
35146
|
+
APPEND_OPCODES.add(_vm2.Op.Concat, (vm, {
|
|
35147
|
+
op1: count
|
|
35148
|
+
}) => {
|
|
35325
35149
|
let out = new Array(count);
|
|
35326
35150
|
for (let i = count; i > 0; i--) {
|
|
35327
35151
|
let offset = i - 1;
|
|
@@ -35517,21 +35341,19 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35517
35341
|
return tail.reduce((r, part) => (0, _reference.childRefFor)(r, part), ref);
|
|
35518
35342
|
}
|
|
35519
35343
|
}
|
|
35520
|
-
APPEND_OPCODES.add(_vm2.Op.Debugger, (vm,
|
|
35521
|
-
|
|
35522
|
-
|
|
35523
|
-
|
|
35524
|
-
} = _ref;
|
|
35344
|
+
APPEND_OPCODES.add(_vm2.Op.Debugger, (vm, {
|
|
35345
|
+
op1: _symbols,
|
|
35346
|
+
op2: _debugInfo
|
|
35347
|
+
}) => {
|
|
35525
35348
|
let symbols = vm[CONSTANTS].getArray(_symbols);
|
|
35526
35349
|
let debugInfo = vm[CONSTANTS].getArray((0, _util.decodeHandle)(_debugInfo));
|
|
35527
35350
|
let inspector = new ScopeInspector(vm.scope(), symbols, debugInfo);
|
|
35528
35351
|
callback((0, _reference.valueForRef)(vm.getSelf()), path => (0, _reference.valueForRef)(inspector.get(path)));
|
|
35529
35352
|
});
|
|
35530
|
-
APPEND_OPCODES.add(_vm2.Op.EnterList, (vm,
|
|
35531
|
-
|
|
35532
|
-
|
|
35533
|
-
|
|
35534
|
-
} = _ref;
|
|
35353
|
+
APPEND_OPCODES.add(_vm2.Op.EnterList, (vm, {
|
|
35354
|
+
op1: relativeStart,
|
|
35355
|
+
op2: elseTarget
|
|
35356
|
+
}) => {
|
|
35535
35357
|
let stack = vm.stack;
|
|
35536
35358
|
let listRef = (0, _debug.check)(stack.pop(), CheckReference);
|
|
35537
35359
|
let keyRef = (0, _debug.check)(stack.pop(), CheckReference);
|
|
@@ -35551,10 +35373,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35551
35373
|
APPEND_OPCODES.add(_vm2.Op.ExitList, vm => {
|
|
35552
35374
|
vm.exitList();
|
|
35553
35375
|
});
|
|
35554
|
-
APPEND_OPCODES.add(_vm2.Op.Iterate, (vm,
|
|
35555
|
-
|
|
35556
|
-
|
|
35557
|
-
} = _ref2;
|
|
35376
|
+
APPEND_OPCODES.add(_vm2.Op.Iterate, (vm, {
|
|
35377
|
+
op1: breaks
|
|
35378
|
+
}) => {
|
|
35558
35379
|
let stack = vm.stack;
|
|
35559
35380
|
let iterator = (0, _debug.check)(stack.peek(), CheckIterator);
|
|
35560
35381
|
let item = iterator.next();
|
|
@@ -35583,10 +35404,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35583
35404
|
getCapabilities() {
|
|
35584
35405
|
return CAPABILITIES;
|
|
35585
35406
|
}
|
|
35586
|
-
getDebugName(
|
|
35587
|
-
|
|
35588
|
-
|
|
35589
|
-
} = _ref;
|
|
35407
|
+
getDebugName({
|
|
35408
|
+
name
|
|
35409
|
+
}) {
|
|
35590
35410
|
return name;
|
|
35591
35411
|
}
|
|
35592
35412
|
getSelf() {
|
|
@@ -35601,9 +35421,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35601
35421
|
|
|
35602
35422
|
// This is only exported for types, don't use this class directly
|
|
35603
35423
|
class TemplateOnlyComponentDefinition {
|
|
35604
|
-
constructor() {
|
|
35605
|
-
let moduleName = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : '@glimmer/component/template-only';
|
|
35606
|
-
let name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '(unknown template-only component)';
|
|
35424
|
+
constructor(moduleName = '@glimmer/component/template-only', name = '(unknown template-only component)') {
|
|
35607
35425
|
this.moduleName = moduleName;
|
|
35608
35426
|
this.name = name;
|
|
35609
35427
|
}
|
|
@@ -35874,8 +35692,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
35874
35692
|
createElementNS(namespace, tag) {
|
|
35875
35693
|
return this.document.createElementNS(namespace, tag);
|
|
35876
35694
|
}
|
|
35877
|
-
setAttribute(element, name, value) {
|
|
35878
|
-
let namespace = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : null;
|
|
35695
|
+
setAttribute(element, name, value, namespace = null) {
|
|
35879
35696
|
if (namespace) {
|
|
35880
35697
|
element.setAttributeNS(namespace, name, value);
|
|
35881
35698
|
} else {
|
|
@@ -36065,10 +35882,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36065
35882
|
children
|
|
36066
35883
|
};
|
|
36067
35884
|
}
|
|
36068
|
-
captureTemplate(
|
|
36069
|
-
|
|
36070
|
-
|
|
36071
|
-
} = _ref;
|
|
35885
|
+
captureTemplate({
|
|
35886
|
+
template
|
|
35887
|
+
}) {
|
|
36072
35888
|
return template || null;
|
|
36073
35889
|
}
|
|
36074
35890
|
captureBounds(node) {
|
|
@@ -36268,10 +36084,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36268
36084
|
@public
|
|
36269
36085
|
*/
|
|
36270
36086
|
|
|
36271
|
-
const array = _exports.array = internalHelper(
|
|
36272
|
-
|
|
36273
|
-
|
|
36274
|
-
} = _ref;
|
|
36087
|
+
const array = _exports.array = internalHelper(({
|
|
36088
|
+
positional
|
|
36089
|
+
}) => {
|
|
36275
36090
|
return (0, _reference.createComputeRef)(() => reifyPositional(positional), null, 'array');
|
|
36276
36091
|
});
|
|
36277
36092
|
const isEmpty$1 = value => {
|
|
@@ -36304,10 +36119,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36304
36119
|
@public
|
|
36305
36120
|
@method concat
|
|
36306
36121
|
*/
|
|
36307
|
-
const concat = _exports.concat = internalHelper(
|
|
36308
|
-
|
|
36309
|
-
|
|
36310
|
-
} = _ref;
|
|
36122
|
+
const concat = _exports.concat = internalHelper(({
|
|
36123
|
+
positional
|
|
36124
|
+
}) => {
|
|
36311
36125
|
return (0, _reference.createComputeRef)(() => reifyPositional(positional).map(normalizeTextValue).join(''), null, 'concat');
|
|
36312
36126
|
});
|
|
36313
36127
|
const context = (0, _util.buildUntouchableThis)('`fn` helper');
|
|
@@ -36376,18 +36190,14 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36376
36190
|
@method fn
|
|
36377
36191
|
@public
|
|
36378
36192
|
*/
|
|
36379
|
-
const fn = _exports.fn = internalHelper(
|
|
36380
|
-
|
|
36381
|
-
|
|
36382
|
-
} = _ref;
|
|
36193
|
+
const fn = _exports.fn = internalHelper(({
|
|
36194
|
+
positional
|
|
36195
|
+
}) => {
|
|
36383
36196
|
let callbackRef = (0, _debug.check)(positional[0], assertCallbackIsFn);
|
|
36384
36197
|
return (0, _reference.createComputeRef)(() => {
|
|
36385
|
-
return
|
|
36198
|
+
return (...invocationArgs) => {
|
|
36386
36199
|
let [fn, ...args] = reifyPositional(positional);
|
|
36387
36200
|
if (true /* DEBUG */) assertCallbackIsFn(callbackRef);
|
|
36388
|
-
for (var _len = arguments.length, invocationArgs = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
36389
|
-
invocationArgs[_key] = arguments[_key];
|
|
36390
|
-
}
|
|
36391
36201
|
if ((0, _reference.isInvokableRef)(callbackRef)) {
|
|
36392
36202
|
let value = args.length > 0 ? args[0] : invocationArgs[0];
|
|
36393
36203
|
return (0, _reference.updateRef)(callbackRef, value);
|
|
@@ -36480,10 +36290,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36480
36290
|
@public
|
|
36481
36291
|
@method get
|
|
36482
36292
|
*/
|
|
36483
|
-
const get = _exports.get = internalHelper(
|
|
36484
|
-
|
|
36485
|
-
|
|
36486
|
-
} = _ref;
|
|
36293
|
+
const get = _exports.get = internalHelper(({
|
|
36294
|
+
positional
|
|
36295
|
+
}) => {
|
|
36487
36296
|
let sourceRef = positional[0] ?? _reference.UNDEFINED_REFERENCE;
|
|
36488
36297
|
let pathRef = positional[1] ?? _reference.UNDEFINED_REFERENCE;
|
|
36489
36298
|
return (0, _reference.createComputeRef)(() => {
|
|
@@ -36549,10 +36358,9 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36549
36358
|
@return {Object} Hash
|
|
36550
36359
|
@public
|
|
36551
36360
|
*/
|
|
36552
|
-
const hash = _exports.hash = internalHelper(
|
|
36553
|
-
|
|
36554
|
-
|
|
36555
|
-
} = _ref;
|
|
36361
|
+
const hash = _exports.hash = internalHelper(({
|
|
36362
|
+
named
|
|
36363
|
+
}) => {
|
|
36556
36364
|
let ref = (0, _reference.createComputeRef)(() => {
|
|
36557
36365
|
let hash = reifyNamed(named);
|
|
36558
36366
|
if (true /* DEBUG */) {
|
|
@@ -36575,9 +36383,8 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36575
36383
|
return (0, _validator.getValue)(true /* DEBUG */ ? ARGS_CACHES.get(proxy) : proxy.argsCache);
|
|
36576
36384
|
}
|
|
36577
36385
|
class SimpleArgsProxy {
|
|
36578
|
-
constructor(context) {
|
|
36386
|
+
constructor(context, computeArgs = () => EMPTY_ARGS) {
|
|
36579
36387
|
this.argsCache = void 0;
|
|
36580
|
-
let computeArgs = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : () => EMPTY_ARGS;
|
|
36581
36388
|
let argsCache = (0, _validator.createCache)(() => computeArgs(context));
|
|
36582
36389
|
if (true /* DEBUG */) {
|
|
36583
36390
|
ARGS_CACHES.set(this, argsCache);
|
|
@@ -36632,40 +36439,6 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36632
36439
|
return cache;
|
|
36633
36440
|
}
|
|
36634
36441
|
const untouchableContext = (0, _util.buildUntouchableThis)('`on` modifier');
|
|
36635
|
-
|
|
36636
|
-
/*
|
|
36637
|
-
Internet Explorer 11 does not support `once` and also does not support
|
|
36638
|
-
passing `eventOptions`. In some situations it then throws a weird script
|
|
36639
|
-
error, like:
|
|
36640
|
-
|
|
36641
|
-
```
|
|
36642
|
-
Could not complete the operation due to error 80020101
|
|
36643
|
-
```
|
|
36644
|
-
|
|
36645
|
-
This flag determines, whether `{ once: true }` and thus also event options in
|
|
36646
|
-
general are supported.
|
|
36647
|
-
*/
|
|
36648
|
-
const SUPPORTS_EVENT_OPTIONS = (() => {
|
|
36649
|
-
try {
|
|
36650
|
-
const div = document.createElement('div');
|
|
36651
|
-
let counter = 0;
|
|
36652
|
-
div.addEventListener('click', () => counter++, {
|
|
36653
|
-
once: true
|
|
36654
|
-
});
|
|
36655
|
-
let event;
|
|
36656
|
-
if (typeof Event === 'function') {
|
|
36657
|
-
event = new Event('click');
|
|
36658
|
-
} else {
|
|
36659
|
-
event = document.createEvent('Event');
|
|
36660
|
-
event.initEvent('click', true, true);
|
|
36661
|
-
}
|
|
36662
|
-
div.dispatchEvent(event);
|
|
36663
|
-
div.dispatchEvent(event);
|
|
36664
|
-
return counter === 1;
|
|
36665
|
-
} catch (error) {
|
|
36666
|
-
return false;
|
|
36667
|
-
}
|
|
36668
|
-
})();
|
|
36669
36442
|
class OnModifierState {
|
|
36670
36443
|
constructor(element, args) {
|
|
36671
36444
|
this.tag = (0, _validator.createUpdatableTag)();
|
|
@@ -36700,11 +36473,11 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36700
36473
|
this.capture = capture;
|
|
36701
36474
|
this.shouldUpdate = true;
|
|
36702
36475
|
}
|
|
36703
|
-
|
|
36476
|
+
|
|
36704
36477
|
// we want to handle both `true` and `false` because both have a meaning:
|
|
36705
36478
|
// https://bugs.chromium.org/p/chromium/issues/detail?id=770208
|
|
36706
36479
|
if (once !== undefined || passive !== undefined || capture !== undefined) {
|
|
36707
|
-
|
|
36480
|
+
this.options = {
|
|
36708
36481
|
once,
|
|
36709
36482
|
passive,
|
|
36710
36483
|
capture
|
|
@@ -36729,19 +36502,16 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36729
36502
|
if (true /* DEBUG */ && args.positional.length !== 2) {
|
|
36730
36503
|
throw new Error(`You can only pass two positional arguments (event name and callback) to the \`on\` modifier, but you provided ${args.positional.length}. Consider using the \`fn\` helper to provide additional arguments to the \`on\` callback.`);
|
|
36731
36504
|
}
|
|
36732
|
-
let needsCustomCallback =
|
|
36505
|
+
let needsCustomCallback = true /* DEBUG */ && passive; /* needs passive enforcement */
|
|
36733
36506
|
|
|
36734
36507
|
if (this.shouldUpdate) {
|
|
36735
36508
|
if (needsCustomCallback) {
|
|
36736
|
-
|
|
36509
|
+
this.callback = function (event) {
|
|
36737
36510
|
if (true /* DEBUG */ && passive) {
|
|
36738
36511
|
event.preventDefault = () => {
|
|
36739
36512
|
throw new Error(`You marked this listener as 'passive', meaning that you must not call 'event.preventDefault()': \n\n${userProvidedCallback.name ?? `{anonymous function}`}`);
|
|
36740
36513
|
};
|
|
36741
36514
|
}
|
|
36742
|
-
if (!SUPPORTS_EVENT_OPTIONS && once) {
|
|
36743
|
-
removeEventListener(this, eventName, callback, options);
|
|
36744
|
-
}
|
|
36745
36515
|
return userProvidedCallback.call(untouchableContext, event);
|
|
36746
36516
|
};
|
|
36747
36517
|
} else if (true /* DEBUG */) {
|
|
@@ -36757,45 +36527,11 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36757
36527
|
let removes = 0;
|
|
36758
36528
|
function removeEventListener(element, eventName, callback, options) {
|
|
36759
36529
|
removes++;
|
|
36760
|
-
|
|
36761
|
-
// when options are supported, use them across the board
|
|
36762
|
-
element.removeEventListener(eventName, callback, options);
|
|
36763
|
-
} else if (options !== undefined && options.capture) {
|
|
36764
|
-
// used only in the following case:
|
|
36765
|
-
//
|
|
36766
|
-
// `{ once: true | false, passive: true | false, capture: true }
|
|
36767
|
-
//
|
|
36768
|
-
// `once` is handled via a custom callback that removes after first
|
|
36769
|
-
// invocation so we only care about capture here as a boolean
|
|
36770
|
-
element.removeEventListener(eventName, callback, true);
|
|
36771
|
-
} else {
|
|
36772
|
-
// used only in the following cases:
|
|
36773
|
-
//
|
|
36774
|
-
// * where there is no options
|
|
36775
|
-
// * `{ once: true | false, passive: true | false, capture: false }
|
|
36776
|
-
element.removeEventListener(eventName, callback);
|
|
36777
|
-
}
|
|
36530
|
+
element.removeEventListener(eventName, callback, options);
|
|
36778
36531
|
}
|
|
36779
36532
|
function addEventListener(element, eventName, callback, options) {
|
|
36780
36533
|
adds++;
|
|
36781
|
-
|
|
36782
|
-
// when options are supported, use them across the board
|
|
36783
|
-
element.addEventListener(eventName, callback, options);
|
|
36784
|
-
} else if (options !== undefined && options.capture) {
|
|
36785
|
-
// used only in the following case:
|
|
36786
|
-
//
|
|
36787
|
-
// `{ once: true | false, passive: true | false, capture: true }
|
|
36788
|
-
//
|
|
36789
|
-
// `once` is handled via a custom callback that removes after first
|
|
36790
|
-
// invocation so we only care about capture here as a boolean
|
|
36791
|
-
element.addEventListener(eventName, callback, true);
|
|
36792
|
-
} else {
|
|
36793
|
-
// used only in the following cases:
|
|
36794
|
-
//
|
|
36795
|
-
// * where there is no options
|
|
36796
|
-
// * `{ once: true | false, passive: true | false, capture: false }
|
|
36797
|
-
element.addEventListener(eventName, callback);
|
|
36798
|
-
}
|
|
36534
|
+
element.addEventListener(eventName, callback, options);
|
|
36799
36535
|
}
|
|
36800
36536
|
|
|
36801
36537
|
/**
|
|
@@ -36885,9 +36621,6 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
36885
36621
|
@public
|
|
36886
36622
|
*/
|
|
36887
36623
|
class OnModifierManager {
|
|
36888
|
-
constructor() {
|
|
36889
|
-
this.SUPPORTS_EVENT_OPTIONS = SUPPORTS_EVENT_OPTIONS;
|
|
36890
|
-
}
|
|
36891
36624
|
getDebugName() {
|
|
36892
36625
|
return 'on';
|
|
36893
36626
|
}
|
|
@@ -37073,14 +36806,13 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37073
36806
|
}
|
|
37074
36807
|
}
|
|
37075
36808
|
class UpdatingVM {
|
|
37076
|
-
constructor(env,
|
|
36809
|
+
constructor(env, {
|
|
36810
|
+
alwaysRevalidate = false
|
|
36811
|
+
}) {
|
|
37077
36812
|
this.env = void 0;
|
|
37078
36813
|
this.dom = void 0;
|
|
37079
36814
|
this.alwaysRevalidate = void 0;
|
|
37080
36815
|
this.frameStack = new _util.Stack();
|
|
37081
|
-
let {
|
|
37082
|
-
alwaysRevalidate = false
|
|
37083
|
-
} = _ref;
|
|
37084
36816
|
this.env = env;
|
|
37085
36817
|
this.dom = env.getDOM();
|
|
37086
36818
|
this.alwaysRevalidate = alwaysRevalidate;
|
|
@@ -37414,12 +37146,11 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37414
37146
|
(0, _destroyable.associateDestroyableChild)(this, drop);
|
|
37415
37147
|
(0, _destroyable.registerDestructor)(this, () => clear(this.bounds));
|
|
37416
37148
|
}
|
|
37417
|
-
rerender(
|
|
37418
|
-
|
|
37419
|
-
|
|
37420
|
-
|
|
37421
|
-
|
|
37422
|
-
};
|
|
37149
|
+
rerender({
|
|
37150
|
+
alwaysRevalidate = false
|
|
37151
|
+
} = {
|
|
37152
|
+
alwaysRevalidate: false
|
|
37153
|
+
}) {
|
|
37423
37154
|
let {
|
|
37424
37155
|
env,
|
|
37425
37156
|
updating
|
|
@@ -37447,39 +37178,32 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37447
37178
|
return new this(snapshot.slice(), initializeRegistersWithSP(snapshot.length - 1));
|
|
37448
37179
|
}
|
|
37449
37180
|
// fp -> sp
|
|
37450
|
-
constructor() {
|
|
37181
|
+
constructor(stack = [], registers) {
|
|
37451
37182
|
this[REGISTERS] = void 0;
|
|
37452
|
-
let stack = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
37453
|
-
let registers = arguments.length > 1 ? arguments[1] : undefined;
|
|
37454
37183
|
this.stack = stack;
|
|
37455
37184
|
this[REGISTERS] = registers;
|
|
37456
37185
|
}
|
|
37457
37186
|
push(value) {
|
|
37458
37187
|
this.stack[++this[REGISTERS][_vm2.$sp]] = value;
|
|
37459
37188
|
}
|
|
37460
|
-
dup() {
|
|
37461
|
-
let position = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : this[REGISTERS][_vm2.$sp];
|
|
37189
|
+
dup(position = this[REGISTERS][_vm2.$sp]) {
|
|
37462
37190
|
this.stack[++this[REGISTERS][_vm2.$sp]] = this.stack[position];
|
|
37463
37191
|
}
|
|
37464
37192
|
copy(from, to) {
|
|
37465
37193
|
this.stack[to] = this.stack[from];
|
|
37466
37194
|
}
|
|
37467
|
-
pop() {
|
|
37468
|
-
let n = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 1;
|
|
37195
|
+
pop(n = 1) {
|
|
37469
37196
|
let top = this.stack[this[REGISTERS][_vm2.$sp]];
|
|
37470
37197
|
this[REGISTERS][_vm2.$sp] -= n;
|
|
37471
37198
|
return top;
|
|
37472
37199
|
}
|
|
37473
|
-
peek() {
|
|
37474
|
-
let offset = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;
|
|
37200
|
+
peek(offset = 0) {
|
|
37475
37201
|
return this.stack[this[REGISTERS][_vm2.$sp] - offset];
|
|
37476
37202
|
}
|
|
37477
|
-
get(offset) {
|
|
37478
|
-
let base = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this[REGISTERS][_vm2.$fp];
|
|
37203
|
+
get(offset, base = this[REGISTERS][_vm2.$fp]) {
|
|
37479
37204
|
return this.stack[base + offset];
|
|
37480
37205
|
}
|
|
37481
|
-
set(value, offset) {
|
|
37482
|
-
let base = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : this[REGISTERS][_vm2.$fp];
|
|
37206
|
+
set(value, offset, base = this[REGISTERS][_vm2.$fp]) {
|
|
37483
37207
|
this.stack[base + offset] = value;
|
|
37484
37208
|
}
|
|
37485
37209
|
slice(start, end) {
|
|
@@ -37617,7 +37341,12 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37617
37341
|
* End of migrated.
|
|
37618
37342
|
*/
|
|
37619
37343
|
|
|
37620
|
-
constructor(runtime,
|
|
37344
|
+
constructor(runtime, {
|
|
37345
|
+
pc,
|
|
37346
|
+
scope,
|
|
37347
|
+
dynamicScope,
|
|
37348
|
+
stack
|
|
37349
|
+
}, elementStack, context) {
|
|
37621
37350
|
this[STACKS] = new Stacks();
|
|
37622
37351
|
this[HEAP] = void 0;
|
|
37623
37352
|
this.destructor = void 0;
|
|
@@ -37631,12 +37360,6 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37631
37360
|
this.t1 = null;
|
|
37632
37361
|
this.v0 = null;
|
|
37633
37362
|
this.resume = void 0;
|
|
37634
|
-
let {
|
|
37635
|
-
pc,
|
|
37636
|
-
scope,
|
|
37637
|
-
dynamicScope,
|
|
37638
|
-
stack
|
|
37639
|
-
} = _ref;
|
|
37640
37363
|
this.runtime = runtime;
|
|
37641
37364
|
this.elementStack = elementStack;
|
|
37642
37365
|
this.context = context;
|
|
@@ -37666,28 +37389,26 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37666
37389
|
this.destructor = {};
|
|
37667
37390
|
this[DESTROYABLE_STACK].push(this.destructor);
|
|
37668
37391
|
}
|
|
37669
|
-
static initial(runtime, context,
|
|
37670
|
-
|
|
37671
|
-
|
|
37672
|
-
|
|
37673
|
-
|
|
37674
|
-
|
|
37675
|
-
|
|
37676
|
-
|
|
37677
|
-
} = _ref2;
|
|
37392
|
+
static initial(runtime, context, {
|
|
37393
|
+
handle,
|
|
37394
|
+
self,
|
|
37395
|
+
dynamicScope,
|
|
37396
|
+
treeBuilder,
|
|
37397
|
+
numSymbols,
|
|
37398
|
+
owner
|
|
37399
|
+
}) {
|
|
37678
37400
|
let scope = PartialScopeImpl.root(self, numSymbols, owner);
|
|
37679
37401
|
let state = vmState(runtime.program.heap.getaddr(handle), scope, dynamicScope);
|
|
37680
37402
|
let vm = initVM(context)(runtime, state, treeBuilder);
|
|
37681
37403
|
vm.pushUpdating();
|
|
37682
37404
|
return vm;
|
|
37683
37405
|
}
|
|
37684
|
-
static empty(runtime,
|
|
37685
|
-
|
|
37686
|
-
|
|
37687
|
-
|
|
37688
|
-
|
|
37689
|
-
|
|
37690
|
-
} = _ref3;
|
|
37406
|
+
static empty(runtime, {
|
|
37407
|
+
handle,
|
|
37408
|
+
treeBuilder,
|
|
37409
|
+
dynamicScope,
|
|
37410
|
+
owner
|
|
37411
|
+
}, context) {
|
|
37691
37412
|
let vm = initVM(context)(runtime, vmState(runtime.program.heap.getaddr(handle), PartialScopeImpl.root(_reference.UNDEFINED_REFERENCE, 0, owner), dynamicScope), treeBuilder);
|
|
37692
37413
|
vm.pushUpdating();
|
|
37693
37414
|
return vm;
|
|
@@ -37702,8 +37423,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37702
37423
|
get env() {
|
|
37703
37424
|
return this.runtime.env;
|
|
37704
37425
|
}
|
|
37705
|
-
captureState(args) {
|
|
37706
|
-
let pc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this[INNER_VM].fetchRegister(_vm2.$pc);
|
|
37426
|
+
captureState(args, pc = this[INNER_VM].fetchRegister(_vm2.$pc)) {
|
|
37707
37427
|
return {
|
|
37708
37428
|
pc,
|
|
37709
37429
|
scope: this.scope(),
|
|
@@ -37711,8 +37431,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37711
37431
|
stack: this.stack.capture(args)
|
|
37712
37432
|
};
|
|
37713
37433
|
}
|
|
37714
|
-
capture(args) {
|
|
37715
|
-
let pc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : this[INNER_VM].fetchRegister(_vm2.$pc);
|
|
37434
|
+
capture(args, pc = this[INNER_VM].fetchRegister(_vm2.$pc)) {
|
|
37716
37435
|
return new ResumableVMStateImpl(this.captureState(args, pc), this.resume);
|
|
37717
37436
|
}
|
|
37718
37437
|
beginCacheGroup(name) {
|
|
@@ -37737,12 +37456,11 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37737
37456
|
let tryOpcode = new TryOpcode(state, this.runtime, block, updating);
|
|
37738
37457
|
this.didEnter(tryOpcode);
|
|
37739
37458
|
}
|
|
37740
|
-
enterItem(
|
|
37741
|
-
|
|
37742
|
-
|
|
37743
|
-
|
|
37744
|
-
|
|
37745
|
-
} = _ref4;
|
|
37459
|
+
enterItem({
|
|
37460
|
+
key,
|
|
37461
|
+
value,
|
|
37462
|
+
memo
|
|
37463
|
+
}) {
|
|
37746
37464
|
let {
|
|
37747
37465
|
stack
|
|
37748
37466
|
} = this;
|
|
@@ -37783,8 +37501,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37783
37501
|
this.exit();
|
|
37784
37502
|
this[STACKS].list.pop();
|
|
37785
37503
|
}
|
|
37786
|
-
pushUpdating() {
|
|
37787
|
-
let list = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
37504
|
+
pushUpdating(list = []) {
|
|
37788
37505
|
this[STACKS].updating.push(list);
|
|
37789
37506
|
}
|
|
37790
37507
|
popUpdating() {
|
|
@@ -37947,8 +37664,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37947
37664
|
inTransaction(env, () => result = iterator.sync());
|
|
37948
37665
|
return result;
|
|
37949
37666
|
}
|
|
37950
|
-
function renderMain(runtime, context, owner, self, treeBuilder, layout) {
|
|
37951
|
-
let dynamicScope = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : new DynamicScopeImpl();
|
|
37667
|
+
function renderMain(runtime, context, owner, self, treeBuilder, layout, dynamicScope = new DynamicScopeImpl()) {
|
|
37952
37668
|
let handle = (0, _util.unwrapHandle)(layout.compile(context));
|
|
37953
37669
|
let numSymbols = layout.symbolTable.symbols.length;
|
|
37954
37670
|
let vm = VM.initial(runtime, context, {
|
|
@@ -37967,10 +37683,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37967
37683
|
const argList = Object.keys(args).map(key => [key, args[key]]);
|
|
37968
37684
|
const blockNames = ['main', 'else', 'attrs'];
|
|
37969
37685
|
// Prefix argument names with `@` symbol
|
|
37970
|
-
const argNames = argList.map(
|
|
37971
|
-
let [name] = _ref;
|
|
37972
|
-
return `@${name}`;
|
|
37973
|
-
});
|
|
37686
|
+
const argNames = argList.map(([name]) => `@${name}`);
|
|
37974
37687
|
let reified = vm[CONSTANTS].component(definition, owner);
|
|
37975
37688
|
vm.pushFrame();
|
|
37976
37689
|
|
|
@@ -37981,8 +37694,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
37981
37694
|
vm.stack.push(null);
|
|
37982
37695
|
|
|
37983
37696
|
// For each argument, push its backing reference on to the stack
|
|
37984
|
-
argList.forEach(
|
|
37985
|
-
let [, reference] = _ref2;
|
|
37697
|
+
argList.forEach(([, reference]) => {
|
|
37986
37698
|
vm.stack.push(reference);
|
|
37987
37699
|
});
|
|
37988
37700
|
|
|
@@ -38002,9 +37714,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
38002
37714
|
vm.stack.push(reified);
|
|
38003
37715
|
return new TemplateIteratorImpl(vm);
|
|
38004
37716
|
}
|
|
38005
|
-
function renderComponent(runtime, treeBuilder, context, owner, definition) {
|
|
38006
|
-
let args = arguments.length > 5 && arguments[5] !== undefined ? arguments[5] : {};
|
|
38007
|
-
let dynamicScope = arguments.length > 6 && arguments[6] !== undefined ? arguments[6] : new DynamicScopeImpl();
|
|
37717
|
+
function renderComponent(runtime, treeBuilder, context, owner, definition, args = {}, dynamicScope = new DynamicScopeImpl()) {
|
|
38008
37718
|
let vm = VM.empty(runtime, {
|
|
38009
37719
|
treeBuilder,
|
|
38010
37720
|
handle: context.stdlib.main,
|
|
@@ -38103,8 +37813,7 @@ define("@glimmer/runtime", ["exports", "@glimmer/debug", "@glimmer/reference", "
|
|
|
38103
37813
|
currentCursor.candidate = candidate;
|
|
38104
37814
|
currentCursor.nextSibling = null;
|
|
38105
37815
|
}
|
|
38106
|
-
pushElement(element) {
|
|
38107
|
-
let nextSibling = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : null;
|
|
37816
|
+
pushElement(element, nextSibling = null) {
|
|
38108
37817
|
const cursor = new RehydratingCursor(element, nextSibling, this.blockDepth || 0);
|
|
38109
37818
|
|
|
38110
37819
|
/**
|
|
@@ -38544,7 +38253,6 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
38544
38253
|
_exports.exhausted = exhausted;
|
|
38545
38254
|
_exports.expect = expect;
|
|
38546
38255
|
_exports.extractHandle = extractHandle;
|
|
38547
|
-
_exports.fillNulls = fillNulls;
|
|
38548
38256
|
_exports.getFirst = getFirst;
|
|
38549
38257
|
_exports.getLast = getLast;
|
|
38550
38258
|
_exports.ifPresent = ifPresent;
|
|
@@ -38628,19 +38336,13 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
38628
38336
|
if (val === null || val === undefined) throw new Error(message);
|
|
38629
38337
|
return val;
|
|
38630
38338
|
}
|
|
38631
|
-
function unreachable() {
|
|
38632
|
-
let message = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'unreachable';
|
|
38339
|
+
function unreachable(message = 'unreachable') {
|
|
38633
38340
|
return new Error(message);
|
|
38634
38341
|
}
|
|
38635
38342
|
function exhausted(value) {
|
|
38636
38343
|
throw new Error(`Exhausted ${String(value)}`);
|
|
38637
38344
|
}
|
|
38638
|
-
const tuple =
|
|
38639
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
38640
|
-
args[_key] = arguments[_key];
|
|
38641
|
-
}
|
|
38642
|
-
return args;
|
|
38643
|
-
};
|
|
38345
|
+
const tuple = (...args) => args;
|
|
38644
38346
|
_exports.tuple = tuple;
|
|
38645
38347
|
function isPresent(value) {
|
|
38646
38348
|
return value !== null && value !== undefined;
|
|
@@ -38667,14 +38369,12 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
38667
38369
|
return null;
|
|
38668
38370
|
}
|
|
38669
38371
|
}
|
|
38670
|
-
function assertPresentArray(list) {
|
|
38671
|
-
let message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : `unexpected empty list`;
|
|
38372
|
+
function assertPresentArray(list, message = `unexpected empty list`) {
|
|
38672
38373
|
if (!isPresentArray(list)) {
|
|
38673
38374
|
throw new Error(message);
|
|
38674
38375
|
}
|
|
38675
38376
|
}
|
|
38676
|
-
function asPresentArray(list) {
|
|
38677
|
-
let message = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : `unexpected empty list`;
|
|
38377
|
+
function asPresentArray(list, message = `unexpected empty list`) {
|
|
38678
38378
|
assertPresentArray(list, message);
|
|
38679
38379
|
return list;
|
|
38680
38380
|
}
|
|
@@ -38704,10 +38404,9 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
38704
38404
|
return typeof u === 'function' || typeof u === 'object' && u !== null;
|
|
38705
38405
|
}
|
|
38706
38406
|
class StackImpl {
|
|
38707
|
-
constructor() {
|
|
38407
|
+
constructor(values = []) {
|
|
38708
38408
|
this.stack = void 0;
|
|
38709
38409
|
this.current = null;
|
|
38710
|
-
let values = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
38711
38410
|
this.stack = values;
|
|
38712
38411
|
}
|
|
38713
38412
|
get size() {
|
|
@@ -38867,10 +38566,7 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
38867
38566
|
function isNonPrimitiveHandle(value) {
|
|
38868
38567
|
return value > ImmediateConstants.ENCODED_UNDEFINED_HANDLE;
|
|
38869
38568
|
}
|
|
38870
|
-
function constants() {
|
|
38871
|
-
for (var _len = arguments.length, values = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
38872
|
-
values[_key] = arguments[_key];
|
|
38873
|
-
}
|
|
38569
|
+
function constants(...values) {
|
|
38874
38570
|
return [false, true, null, undefined, ...values];
|
|
38875
38571
|
}
|
|
38876
38572
|
function isSmallInt(value) {
|
|
@@ -38958,13 +38654,6 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
38958
38654
|
return node.nodeValue === SERIALIZATION_FIRST_NODE_STRING;
|
|
38959
38655
|
}
|
|
38960
38656
|
let assign = _exports.assign = Object.assign;
|
|
38961
|
-
function fillNulls(count) {
|
|
38962
|
-
let arr = new Array(count);
|
|
38963
|
-
for (let i = 0; i < count; i++) {
|
|
38964
|
-
arr[i] = null;
|
|
38965
|
-
}
|
|
38966
|
-
return arr;
|
|
38967
|
-
}
|
|
38968
38657
|
function values(obj) {
|
|
38969
38658
|
return Object.values(obj);
|
|
38970
38659
|
}
|
|
@@ -39048,11 +38737,8 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
39048
38737
|
return node instanceof Element && node.tagName.toLowerCase() === check;
|
|
39049
38738
|
}
|
|
39050
38739
|
}
|
|
39051
|
-
function strip(strings) {
|
|
38740
|
+
function strip(strings, ...args) {
|
|
39052
38741
|
let out = '';
|
|
39053
|
-
for (var _len = arguments.length, args = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
|
39054
|
-
args[_key - 1] = arguments[_key];
|
|
39055
|
-
}
|
|
39056
38742
|
for (const [i, string] of enumerate(strings)) {
|
|
39057
38743
|
let dynamic = args[i] !== undefined ? String(args[i]) : '';
|
|
39058
38744
|
out += `${string}${dynamic}`;
|
|
@@ -39143,8 +38829,7 @@ define("@glimmer/util", ["exports"], function (_exports) {
|
|
|
39143
38829
|
* actually appropriate.
|
|
39144
38830
|
*/
|
|
39145
38831
|
const LOGGER = _exports.LOGGER = console;
|
|
39146
|
-
function assertNever(value) {
|
|
39147
|
-
let desc = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'unexpected unreachable branch';
|
|
38832
|
+
function assertNever(value, desc = 'unexpected unreachable branch') {
|
|
39148
38833
|
LOGGER.log('unreachable', value);
|
|
39149
38834
|
LOGGER.log(`${desc} :: ${JSON.stringify(value)} (${value})`);
|
|
39150
38835
|
throw new Error(`code reached unreachable`);
|
|
@@ -39186,7 +38871,6 @@ define("@glimmer/validator", ["exports", "@glimmer/global-context", "@glimmer/ut
|
|
|
39186
38871
|
return input;
|
|
39187
38872
|
}
|
|
39188
38873
|
function getGlobal() {
|
|
39189
|
-
// eslint-disable-next-line n/no-unsupported-features/es-builtins
|
|
39190
38874
|
if (typeof globalThis !== 'undefined') return indexable(globalThis);
|
|
39191
38875
|
if (typeof self !== 'undefined') return indexable(self);
|
|
39192
38876
|
if (typeof window !== 'undefined') return indexable(window);
|
|
@@ -39280,8 +38964,7 @@ define("@glimmer/validator", ["exports", "@glimmer/global-context", "@glimmer/ut
|
|
|
39280
38964
|
}
|
|
39281
38965
|
};
|
|
39282
38966
|
|
|
39283
|
-
let nthIndex =
|
|
39284
|
-
let startingPos = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : -1;
|
|
38967
|
+
let nthIndex = (str, pattern, n, startingPos = -1) => {
|
|
39285
38968
|
let i = startingPos;
|
|
39286
38969
|
while (n-- > 0 && i++ < str.length) {
|
|
39287
38970
|
i = str.indexOf(pattern, i);
|
|
@@ -39306,9 +38989,7 @@ define("@glimmer/validator", ["exports", "@glimmer/global-context", "@glimmer/ut
|
|
|
39306
38989
|
}
|
|
39307
38990
|
current = current.parent;
|
|
39308
38991
|
}
|
|
39309
|
-
|
|
39310
|
-
// TODO: Use String.prototype.repeat here once we can drop support for IE11
|
|
39311
|
-
return trackingStack.map((label, index) => Array(2 * index + 1).join(' ') + label).join('\n');
|
|
38992
|
+
return trackingStack.map((label, index) => ' '.repeat(2 * index) + label).join('\n');
|
|
39312
38993
|
};
|
|
39313
38994
|
debug.markTagAsConsumed = _tag => {
|
|
39314
38995
|
if (!CONSUMED_TAGS || CONSUMED_TAGS.has(_tag)) return;
|
|
@@ -39461,18 +39142,18 @@ define("@glimmer/validator", ["exports", "@glimmer/global-context", "@glimmer/ut
|
|
|
39461
39142
|
} = this;
|
|
39462
39143
|
if (subtag !== null) {
|
|
39463
39144
|
if (Array.isArray(subtag)) {
|
|
39464
|
-
|
|
39465
|
-
let
|
|
39466
|
-
|
|
39467
|
-
}
|
|
39145
|
+
revision = subtag.reduce((prev, currentTag) => {
|
|
39146
|
+
let current = currentTag[COMPUTE]();
|
|
39147
|
+
return current > prev ? current : prev;
|
|
39148
|
+
}, revision);
|
|
39468
39149
|
} else {
|
|
39469
39150
|
let subtagValue = subtag[COMPUTE]();
|
|
39470
39151
|
if (subtagValue === this.subtagBufferCache) {
|
|
39471
|
-
revision =
|
|
39152
|
+
revision = revision > this.lastValue ? revision : this.lastValue;
|
|
39472
39153
|
} else {
|
|
39473
39154
|
// Clear the temporary buffer cache
|
|
39474
39155
|
this.subtagBufferCache = null;
|
|
39475
|
-
revision =
|
|
39156
|
+
revision = revision > subtagValue ? revision : subtagValue;
|
|
39476
39157
|
}
|
|
39477
39158
|
}
|
|
39478
39159
|
}
|
|
@@ -39666,9 +39347,7 @@ define("@glimmer/validator", ["exports", "@glimmer/global-context", "@glimmer/ut
|
|
|
39666
39347
|
} else if (tags.size === 1) {
|
|
39667
39348
|
return this.last;
|
|
39668
39349
|
} else {
|
|
39669
|
-
|
|
39670
|
-
tags.forEach(tag => tagsArr.push(tag));
|
|
39671
|
-
return combine(tagsArr);
|
|
39350
|
+
return combine(Array.from(this.tags));
|
|
39672
39351
|
}
|
|
39673
39352
|
}
|
|
39674
39353
|
}
|
|
@@ -43520,7 +43199,7 @@ define("ember/version", ["exports"], function (_exports) {
|
|
|
43520
43199
|
value: true
|
|
43521
43200
|
});
|
|
43522
43201
|
_exports.default = void 0;
|
|
43523
|
-
var _default = _exports.default = "5.7.0-alpha.
|
|
43202
|
+
var _default = _exports.default = "5.7.0-alpha.4";
|
|
43524
43203
|
});
|
|
43525
43204
|
define("route-recognizer", ["exports"], function (_exports) {
|
|
43526
43205
|
"use strict";
|