Create new
Bindings
Transitions
Animations
Easing
Component composition
Context API
Special elements
Module context
Debugging
Miscellaneous
App.svelte
runes
This component is in runes mode.
To disable runes mode, add the following to the top of your component:
<svelte:options runes={false} />
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
⌄
⌄
⌄
⌄
<script>
// These values are bound to properties of the video
let time = $state(0);
let duration = $state();
let paused = $state(true);
let showControls = $state(true);
let showControlsTimeout;
// Used to track time of last mouse down event
let lastMouseDown;
function handleMove(e) {
// Make the controls visible, but fade out after
// 2.5 seconds of inactivity
clearTimeout(showControlsTimeout);
showControlsTimeout = setTimeout(() => (showControls = false), 2500);
showControls = true;
if (!duration) return; // video not loaded yet
if (e.type !== 'touchmove' && !(e.buttons & 1)) return; // mouse not down
const clientX = e.type === 'touchmove' ? e.touches[0].clientX : e.clientX;
const { left, right } = this.getBoundingClientRect();
time = (duration * (clientX - left)) / (right - left);
}
// we can't rely on the built-in click event, because it fires
// after a drag — we have to listen for clicks ourselves
function handleMousedown(e) {
lastMouseDown = new Date();
}
function handleMouseup(e) {
if (new Date() - lastMouseDown < 300) {
if (paused) e.target.play();
Error compiling component
WebAssembly.instantiateStreaming(): value type opcode @+13
999
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
⌄
⌄
import 'svelte/internal/disclose-version';
import * as $ from 'svelte/internal/client';
var on_touchmove = (e, handleMove) => {
e.preventDefault();
handleMove();
};
var root = $.template(`<h1>Caminandes: Llamigos</h1> <p>From <a href="https://studio.blender.org/films">Blender Studio</a>. CC-BY</p> <div class="svelte-sdvmme"><video poster="https://sveltejs.github.io/assets/caminandes-llamigos.jpg" src="https://sveltejs.github.io/assets/caminandes-llamigos.mp4" class="svelte-sdvmme"><track kind="captions"></video> <div class="controls svelte-sdvmme"><progress class="svelte-sdvmme"></progress> <div class="info svelte-sdvmme"><span class="time svelte-sdvmme"> </span> <span class="svelte-sdvmme"> </span> <span class="time svelte-sdvmme"> </span></div></div></div>`, 3);
export default function App($$anchor, $$props) {
$.push($$props, true);
// These values are bound to properties of the video
let time = $.state(0);
let duration = $.state(undefined);
let paused = $.state(true);
let showControls = $.state(true);
let showControlsTimeout;
// Used to track time of last mouse down event
let lastMouseDown;
function handleMove(e) {
// Make the controls visible, but fade out after
// 2.5 seconds of inactivity
clearTimeout(showControlsTimeout);
showControlsTimeout = setTimeout(() => $.set(showControls, false), 2500);
$.set(showControls, true);
if (!$.get(duration)) return; // video not loaded yet
if (e.type !== 'touchmove' && !(e.buttons & 1)) return; // mouse not down
const clientX = e.type === 'touchmove' ? e.touches[0].clientX : e.clientX;
const { left, right } = this.getBoundingClientRect();
$.set(time, $.get(duration) * (clientX - left) / (right - left));
}
result = svelte.compile(source, {
generate: ,
});99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
div.svelte-sdvmme {
position: relative;
}
.controls.svelte-sdvmme {
position: absolute;
top: 0;
width: 100%;
transition: opacity 1s;
}
.info.svelte-sdvmme {
display: flex;
width: 100%;
justify-content: space-between;
}
span.svelte-sdvmme {
padding: 0.2em 0.5em;
color: white;
text-shadow: 0 0 8px black;
font-size: 1.4em;
opacity: 0.7;
}
.time.svelte-sdvmme {
width: 3em;
}
.time.svelte-sdvmme:last-child {
text-align: right;
}
progress.svelte-sdvmme {
display: block;
Root {
css: StyleSheet {...}
- type: "StyleSheet"
- start: 2247
- end: 2959
- attributes: []
children: [...] (10)
Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 2256
- end: 2259
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 2256
- end: 2259
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "div"
- start: 2256
- end: 2259
}
]- start: 2256
- end: 2259
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 2260
- end: 2286
children: [...] (1)
Declaration {...}
- type: "Declaration"
- start: 2264
- end: 2282
- property: "position"
- value: "relative"
}
]
}- start: 2256
- end: 2286
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 2289
- end: 2298
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 2289
- end: 2298
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
ClassSelector {...}
- type: "ClassSelector"
- name: "controls"
- start: 2289
- end: 2298
}
]- start: 2289
- end: 2298
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 2299
- end: 2376
children: [...] (4)
Declaration {...}
- type: "Declaration"
- start: 2303
- end: 2321
- property: "position"
- value: "absolute"
} Declaration {...}
- type: "Declaration"
- start: 2325
- end: 2331
- property: "top"
- value: "0"
} Declaration {...}
- type: "Declaration"
- start: 2335
- end: 2346
- property: "width"
- value: "100%"
} Declaration {...}
- type: "Declaration"
- start: 2350
- end: 2372
- property: "transition"
- value: "opacity 1s"
}
]
}- start: 2289
- end: 2376
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 2379
- end: 2384
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 2379
- end: 2384
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
ClassSelector {...}
- type: "ClassSelector"
- name: "info"
- start: 2379
- end: 2384
}
]- start: 2379
- end: 2384
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 2385
- end: 2455
children: [...] (3)
Declaration {...}
- type: "Declaration"
- start: 2389
- end: 2402
- property: "display"
- value: "flex"
} Declaration {...}
- type: "Declaration"
- start: 2406
- end: 2417
- property: "width"
- value: "100%"
} Declaration {...}
- type: "Declaration"
- start: 2421
- end: 2451
- property: "justify-content"
- value: "space-between"
}
]
}- start: 2379
- end: 2455
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 2458
- end: 2462
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 2458
- end: 2462
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "span"
- start: 2458
- end: 2462
}
]- start: 2458
- end: 2462
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 2463
- end: 2573
children: [...] (5)
Declaration {...}
- type: "Declaration"
- start: 2467
- end: 2487
- property: "padding"
- value: "0.2em 0.5em"
} Declaration {...}
- type: "Declaration"
- start: 2491
- end: 2503
- property: "color"
- value: "white"
} Declaration {...}
- type: "Declaration"
- start: 2507
- end: 2533
- property: "text-shadow"
- value: "0 0 8px black"
} Declaration {...}
- type: "Declaration"
- start: 2537
- end: 2553
- property: "font-size"
- value: "1.4em"
} Declaration {...}
- type: "Declaration"
- start: 2557
- end: 2569
- property: "opacity"
- value: "0.7"
}
]
}- start: 2458
- end: 2573
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 2576
- end: 2581
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 2576
- end: 2581
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
ClassSelector {...}
- type: "ClassSelector"
- name: "time"
- start: 2576
- end: 2581
}
]- start: 2576
- end: 2581
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 2582
- end: 2600
children: [...] (1)
Declaration {...}
- type: "Declaration"
- start: 2586
- end: 2596
- property: "width"
- value: "3em"
}
]
}- start: 2576
- end: 2600
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 2603
- end: 2619
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 2603
- end: 2619
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (2)
ClassSelector {...}
- type: "ClassSelector"
- name: "time"
- start: 2603
- end: 2608
} PseudoClassSelector {...}
- type: "PseudoClassSelector"
- name: "last-child"
- args: null
- start: 2608
- end: 2619
}
]- start: 2603
- end: 2619
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 2620
- end: 2645
children: [...] (1)
Declaration {...}
- type: "Declaration"
- start: 2624
- end: 2641
- property: "text-align"
- value: "right"
}
]
}- start: 2603
- end: 2645
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 2648
- end: 2656
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 2648
- end: 2656
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "progress"
- start: 2648
- end: 2656
}
]- start: 2648
- end: 2656
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 2657
- end: 2758
children: [...] (5)
Declaration {...}
- type: "Declaration"
- start: 2661
- end: 2675
- property: "display"
- value: "block"
} Declaration {...}
- type: "Declaration"
- start: 2679
- end: 2690
- property: "width"
- value: "100%"
} Declaration {...}
- type: "Declaration"
- start: 2694
- end: 2706
- property: "height"
- value: "10px"
} Declaration {...}
- type: "Declaration"
- start: 2710
- end: 2734
- property: "-webkit-appearance"
- value: "none"
} Declaration {...}
- type: "Declaration"
- start: 2738
- end: 2754
- property: "appearance"
- value: "none"
}
]
}- start: 2648
- end: 2758
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 2761
- end: 2791
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 2761
- end: 2791
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (2)
TypeSelector {...}
- type: "TypeSelector"
- name: "progress"
- start: 2761
- end: 2769
} PseudoElementSelector {...}
- type: "PseudoElementSelector"
- name: "-webkit-progress-bar"
- start: 2769
- end: 2791
}
]- start: 2761
- end: 2791
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 2792
- end: 2836
children: [...] (1)
Declaration {...}
- type: "Declaration"
- start: 2796
- end: 2832
- property: "background-color"
- value: "rgba(0, 0, 0, 0.2)"
}
]
}- start: 2761
- end: 2836
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 2839
- end: 2871
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 2839
- end: 2871
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (2)
TypeSelector {...}
- type: "TypeSelector"
- name: "progress"
- start: 2839
- end: 2847
} PseudoElementSelector {...}
- type: "PseudoElementSelector"
- name: "-webkit-progress-value"
- start: 2847
- end: 2871
}
]- start: 2839
- end: 2871
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 2872
- end: 2922
children: [...] (1)
Declaration {...}
- type: "Declaration"
- start: 2876
- end: 2918
- property: "background-color"
- value: "rgba(255, 255, 255, 0.6)"
}
]
}- start: 2839
- end: 2922
} Rule {...}
- type: "Rule"
prelude: SelectorList {...}
- type: "SelectorList"
- start: 2925
- end: 2930
children: [...] (1)
ComplexSelector {...}
- type: "ComplexSelector"
- start: 2925
- end: 2930
children: [...] (1)
RelativeSelector {...}
- type: "RelativeSelector"
- combinator: null
selectors: [...] (1)
TypeSelector {...}
- type: "TypeSelector"
- name: "video"
- start: 2925
- end: 2930
}
]- start: 2925
- end: 2930
}
]
}
]
}block: Block {...}
- type: "Block"
- start: 2931
- end: 2950
children: [...] (1)
Declaration {...}
- type: "Declaration"
- start: 2935
- end: 2946
- property: "width"
- value: "100%"
}
]
}- start: 2925
- end: 2950
}
]content: {...}
- start: 2254
- end: 2951
- styles: "\n\tdiv {\n\t\tposition: relative;\n\t}\n\n\t.controls {\n\t\tposition: absolute;\n\t\ttop: 0;\n\t\twidth: 100%;\n\t\ttransition: opacity 1s;\n\t}\n\n\t.info {\n\t\tdisplay: flex;\n\t\twidth: 100%;\n\t\tjustify-content: space-between;\n\t}\n\n\tspan {\n\t\tpadding: 0.2em 0.5em;\n\t\tcolor: white;\n\t\ttext-shadow: 0 0 8px black;\n\t\tfont-size: 1.4em;\n\t\topacity: 0.7;\n\t}\n\n\t.time {\n\t\twidth: 3em;\n\t}\n\n\t.time:last-child {\n\t\ttext-align: right;\n\t}\n\n\tprogress {\n\t\tdisplay: block;\n\t\twidth: 100%;\n\t\theight: 10px;\n\t\t-webkit-appearance: none;\n\t\tappearance: none;\n\t}\n\n\tprogress::-webkit-progress-bar {\n\t\tbackground-color: rgba(0, 0, 0, 0.2);\n\t}\n\n\tprogress::-webkit-progress-value {\n\t\tbackground-color: rgba(255, 255, 255, 0.6);\n\t}\n\n\tvideo {\n\t\twidth: 100%;\n\t}\n"
- comment: null
}
}- js: []
- start: 1397
- end: 2245
- type: "Root"
fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (7)
Text {...}
- type: "Text"
- start: 1395
- end: 1397
- raw: "\n\n"
- data: "\n\n"
} RegularElement {...}
- type: "RegularElement"
- start: 1397
- end: 1426
- name: "h1"
- attributes: []
fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (1)
Text {...}
- type: "Text"
- start: 1401
- end: 1421
- raw: "Caminandes: Llamigos"
- data: "Caminandes: Llamigos"
}
]
}
} Text {...}
- type: "Text"
- start: 1426
- end: 1427
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 1427
- end: 1507
- name: "p"
- attributes: []
fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 1430
- end: 1435
- raw: "From "
- data: "From "
} RegularElement {...}
- type: "RegularElement"
- start: 1435
- end: 1496
- name: "a"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 1438
- end: 1477
- name: "href"
value: [...] (1)
Text {...}
- start: 1444
- end: 1476
- type: "Text"
- raw: "https://studio.blender.org/films"
- data: "https://studio.blender.org/films"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (1)
Text {...}
- type: "Text"
- start: 1478
- end: 1492
- raw: "Blender Studio"
- data: "Blender Studio"
}
]
}
} Text {...}
- type: "Text"
- start: 1496
- end: 1503
- raw: ". CC-BY"
- data: ". CC-BY"
}
]
}
} Text {...}
- type: "Text"
- start: 1507
- end: 1509
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 1509
- end: 2245
- name: "div"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: "svelte-sdvmme"
- raw: "svelte-sdvmme"
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (5)
Text {...}
- type: "Text"
- start: 1514
- end: 1516
- raw: "\n\t"
- data: "\n\t"
} RegularElement {...}
- type: "RegularElement"
- start: 1516
- end: 1900
- name: "video"
attributes: [...] (10)
Attribute {...}
- type: "Attribute"
- start: 1525
- end: 1591
- name: "poster"
value: [...] (1)
Text {...}
- start: 1533
- end: 1590
- type: "Text"
- raw: "https://sveltejs.github.io/assets/caminandes-llamigos.jpg"
- data: "https://sveltejs.github.io/assets/caminandes-llamigos.jpg"
}
]
} Attribute {...}
- type: "Attribute"
- start: 1594
- end: 1657
- name: "src"
value: [...] (1)
Text {...}
- start: 1599
- end: 1656
- type: "Text"
- raw: "https://sveltejs.github.io/assets/caminandes-llamigos.mp4"
- data: "https://sveltejs.github.io/assets/caminandes-llamigos.mp4"
}
]
} Attribute {...}
- type: "Attribute"
- start: 1660
- end: 1684
- name: "onmousemove"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1672
- end: 1684
expression: Identifier {...}
- type: "Identifier"
- start: 1673
- end: 1683
loc: {...}
start: {...}
- line: 59
- column: 15
}end: {...}
- line: 59
- column: 25
}
}- name: "handleMove"
}
}
} Attribute {...}
- type: "Attribute"
- start: 1687
- end: 1743
- name: "ontouchmove"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1699
- end: 1743
expression: ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 1700
- end: 1742
loc: {...}
start: {...}
- line: 60
- column: 15
}end: {...}
- line: 60
- column: 57
}
}- id: null
- expression: false
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 1700
- end: 1701
loc: {...}
start: {...}
- line: 60
- column: 15
}end: {...}
- line: 60
- column: 16
}
}- name: "e"
}
]body: BlockStatement {...}
- type: "BlockStatement"
- start: 1705
- end: 1742
loc: {...}
start: {...}
- line: 60
- column: 20
}end: {...}
- line: 60
- column: 57
}
}body: [...] (2)
ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 1707
- end: 1726
loc: {...}
start: {...}
- line: 60
- column: 22
}end: {...}
- line: 60
- column: 41
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 1707
- end: 1725
loc: {...}
start: {...}
- line: 60
- column: 22
}end: {...}
- line: 60
- column: 40
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 1707
- end: 1723
loc: {...}
start: {...}
- line: 60
- column: 22
}end: {...}
- line: 60
- column: 38
}
}object: Identifier {...}
- type: "Identifier"
- start: 1707
- end: 1708
loc: {...}
start: {...}
- line: 60
- column: 22
}end: {...}
- line: 60
- column: 23
}
}- name: "e"
}property: Identifier {...}
- type: "Identifier"
- start: 1709
- end: 1723
loc: {...}
start: {...}
- line: 60
- column: 24
}end: {...}
- line: 60
- column: 38
}
}- name: "preventDefault"
}- computed: false
- optional: false
}- arguments: []
- optional: false
}
} ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 1727
- end: 1740
loc: {...}
start: {...}
- line: 60
- column: 42
}end: {...}
- line: 60
- column: 55
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 1727
- end: 1739
loc: {...}
start: {...}
- line: 60
- column: 42
}end: {...}
- line: 60
- column: 54
}
}callee: Identifier {...}
- type: "Identifier"
- start: 1727
- end: 1737
loc: {...}
start: {...}
- line: 60
- column: 42
}end: {...}
- line: 60
- column: 52
}
}- name: "handleMove"
}- arguments: []
- optional: false
}
}
]
}
}
}
} Attribute {...}
- type: "Attribute"
- start: 1746
- end: 1775
- name: "onmousedown"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1758
- end: 1775
expression: Identifier {...}
- type: "Identifier"
- start: 1759
- end: 1774
loc: {...}
start: {...}
- line: 61
- column: 15
}end: {...}
- line: 61
- column: 30
}
}- name: "handleMousedown"
}
}
} Attribute {...}
- type: "Attribute"
- start: 1778
- end: 1803
- name: "onmouseup"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1788
- end: 1803
expression: Identifier {...}
- type: "Identifier"
- start: 1789
- end: 1802
loc: {...}
start: {...}
- line: 62
- column: 13
}end: {...}
- line: 62
- column: 26
}
}- name: "handleMouseup"
}
}
} BindDirective {...}
- start: 1806
- end: 1829
- type: "BindDirective"
- name: "currentTime"
expression: Identifier {...}
- type: "Identifier"
- start: 1824
- end: 1828
loc: {...}
start: {...}
- line: 63
- column: 20
}end: {...}
- line: 63
- column: 24
}
}- name: "time"
}- modifiers: []
} BindDirective {...}
- start: 1832
- end: 1845
- type: "BindDirective"
- name: "duration"
expression: Identifier {...}
- start: 1837
- end: 1845
- type: "Identifier"
- name: "duration"
}- modifiers: []
} BindDirective {...}
- start: 1848
- end: 1859
- type: "BindDirective"
- name: "paused"
expression: Identifier {...}
- start: 1853
- end: 1859
- type: "Identifier"
- name: "paused"
}- modifiers: []
} Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: "svelte-sdvmme"
- raw: "svelte-sdvmme"
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 1862
- end: 1865
- raw: "\n\t\t"
- data: "\n\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 1865
- end: 1890
- name: "track"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 1872
- end: 1887
- name: "kind"
value: [...] (1)
Text {...}
- start: 1878
- end: 1886
- type: "Text"
- raw: "captions"
- data: "captions"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 1890
- end: 1892
- raw: "\n\t"
- data: "\n\t"
}
]
}
} Text {...}
- type: "Text"
- start: 1900
- end: 1903
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 1903
- end: 2238
- name: "div"
attributes: [...] (2)
Attribute {...}
- type: "Attribute"
- start: 1908
- end: 1924
- name: "class"
value: [...] (1)
Text {...}
- start: 1915
- end: 1923
- type: "Text"
- raw: "controls"
- data: "controls svelte-sdvmme"
}
]
} Attribute {...}
- type: "Attribute"
- start: 1925
- end: 1976
- name: "style"
value: [...] (2)
Text {...}
- start: 1932
- end: 1941
- type: "Text"
- raw: "opacity: "
- data: "opacity: "
} ExpressionTag {...}
- type: "ExpressionTag"
- start: 1941
- end: 1975
expression: ConditionalExpression {...}
- type: "ConditionalExpression"
- start: 1942
- end: 1974
loc: {...}
start: {...}
- line: 70
- column: 40
}end: {...}
- line: 70
- column: 72
}
}test: LogicalExpression {...}
- type: "LogicalExpression"
- start: 1942
- end: 1966
loc: {...}
start: {...}
- line: 70
- column: 40
}end: {...}
- line: 70
- column: 64
}
}left: Identifier {...}
- type: "Identifier"
- start: 1942
- end: 1950
loc: {...}
start: {...}
- line: 70
- column: 40
}end: {...}
- line: 70
- column: 48
}
}- name: "duration"
}- operator: "&&"
right: Identifier {...}
- type: "Identifier"
- start: 1954
- end: 1966
loc: {...}
start: {...}
- line: 70
- column: 52
}end: {...}
- line: 70
- column: 64
}
}- name: "showControls"
}
}consequent: Literal {...}
- type: "Literal"
- start: 1969
- end: 1970
loc: {...}
start: {...}
- line: 70
- column: 67
}end: {...}
- line: 70
- column: 68
}
}- value: 1
- raw: "1"
}alternate: Literal {...}
- type: "Literal"
- start: 1973
- end: 1974
loc: {...}
start: {...}
- line: 70
- column: 71
}end: {...}
- line: 70
- column: 72
}
}- value: 0
- raw: "0"
}
}
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (5)
Text {...}
- type: "Text"
- start: 1977
- end: 1980
- raw: "\n\t\t"
- data: "\n\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 1980
- end: 2030
- name: "progress"
attributes: [...] (2)
Attribute {...}
- type: "Attribute"
- start: 1990
- end: 2018
- name: "value"
value: ExpressionTag {...}
- type: "ExpressionTag"
- start: 1996
- end: 2018
expression: LogicalExpression {...}
- type: "LogicalExpression"
- start: 1997
- end: 2017
loc: {...}
start: {...}
- line: 71
- column: 19
}end: {...}
- line: 71
- column: 39
}
}left: BinaryExpression {...}
- type: "BinaryExpression"
- start: 1997
- end: 2012
loc: {...}
start: {...}
- line: 71
- column: 19
}end: {...}
- line: 71
- column: 34
}
}left: Identifier {...}
- type: "Identifier"
- start: 1997
- end: 2001
loc: {...}
start: {...}
- line: 71
- column: 19
}end: {...}
- line: 71
- column: 23
}
}- name: "time"
}- operator: "/"
right: Identifier {...}
- type: "Identifier"
- start: 2004
- end: 2012
loc: {...}
start: {...}
- line: 71
- column: 26
}end: {...}
- line: 71
- column: 34
}
}- name: "duration"
}
}- operator: "||"
right: Literal {...}
- type: "Literal"
- start: 2016
- end: 2017
loc: {...}
start: {...}
- line: 71
- column: 38
}end: {...}
- line: 71
- column: 39
}
}- value: 0
- raw: "0"
}
}
}
} Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: "svelte-sdvmme"
- raw: "svelte-sdvmme"
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
- nodes: []
}
} Text {...}
- type: "Text"
- start: 2030
- end: 2034
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 2034
- end: 2230
- name: "div"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 2039
- end: 2051
- name: "class"
value: [...] (1)
Text {...}
- start: 2046
- end: 2050
- type: "Text"
- raw: "info"
- data: "info svelte-sdvmme"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (7)
Text {...}
- type: "Text"
- start: 2052
- end: 2056
- raw: "\n\t\t\t"
- data: "\n\t\t\t"
} RegularElement {...}
- type: "RegularElement"
- start: 2056
- end: 2096
- name: "span"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 2062
- end: 2074
- name: "class"
value: [...] (1)
Text {...}
- start: 2069
- end: 2073
- type: "Text"
- raw: "time"
- data: "time svelte-sdvmme"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (1)
ExpressionTag {...}
- type: "ExpressionTag"
- start: 2075
- end: 2089
expression: CallExpression {...}
- type: "CallExpression"
- start: 2076
- end: 2088
loc: {...}
start: {...}
- line: 74
- column: 23
}end: {...}
- line: 74
- column: 35
}
}callee: Identifier {...}
- type: "Identifier"
- start: 2076
- end: 2082
loc: {...}
start: {...}
- line: 74
- column: 23
}end: {...}
- line: 74
- column: 29
}
}- name: "format"
}arguments: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 2083
- end: 2087
loc: {...}
start: {...}
- line: 74
- column: 30
}end: {...}
- line: 74
- column: 34
}
}- name: "time"
}
]- optional: false
}
}
]
}
} Text {...}
- type: "Text"
- start: 2096
- end: 2100
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 2100
- end: 2173
- name: "span"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: -1
- end: -1
- name: "class"
value: [...] (1)
Text {...}
- type: "Text"
- data: "svelte-sdvmme"
- raw: "svelte-sdvmme"
- start: -1
- end: -1
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (3)
Text {...}
- type: "Text"
- start: 2106
- end: 2124
- raw: "click anywhere to "
- data: "click anywhere to "
} ExpressionTag {...}
- type: "ExpressionTag"
- start: 2124
- end: 2151
expression: ConditionalExpression {...}
- type: "ConditionalExpression"
- start: 2125
- end: 2150
loc: {...}
start: {...}
- line: 75
- column: 28
}end: {...}
- line: 75
- column: 53
}
}test: Identifier {...}
- type: "Identifier"
- start: 2125
- end: 2131
loc: {...}
start: {...}
- line: 75
- column: 28
}end: {...}
- line: 75
- column: 34
}
}- name: "paused"
}consequent: Literal {...}
- type: "Literal"
- start: 2134
- end: 2140
loc: {...}
start: {...}
- line: 75
- column: 37
}end: {...}
- line: 75
- column: 43
}
}- value: "play"
- raw: "'play'"
}alternate: Literal {...}
- type: "Literal"
- start: 2143
- end: 2150
loc: {...}
start: {...}
- line: 75
- column: 46
}end: {...}
- line: 75
- column: 53
}
}- value: "pause"
- raw: "'pause'"
}
}
} Text {...}
- type: "Text"
- start: 2151
- end: 2166
- raw: " / drag to seek"
- data: " / drag to seek"
}
]
}
} Text {...}
- type: "Text"
- start: 2173
- end: 2177
- raw: " "
- data: " "
} RegularElement {...}
- type: "RegularElement"
- start: 2177
- end: 2221
- name: "span"
attributes: [...] (1)
Attribute {...}
- type: "Attribute"
- start: 2183
- end: 2195
- name: "class"
value: [...] (1)
Text {...}
- start: 2190
- end: 2194
- type: "Text"
- raw: "time"
- data: "time svelte-sdvmme"
}
]
}
]fragment: Fragment {...}
- type: "Fragment"
nodes: [...] (1)
ExpressionTag {...}
- type: "ExpressionTag"
- start: 2196
- end: 2214
expression: CallExpression {...}
- type: "CallExpression"
- start: 2197
- end: 2213
loc: {...}
start: {...}
- line: 76
- column: 23
}end: {...}
- line: 76
- column: 39
}
}callee: Identifier {...}
- type: "Identifier"
- start: 2197
- end: 2203
loc: {...}
start: {...}
- line: 76
- column: 23
}end: {...}
- line: 76
- column: 29
}
}- name: "format"
}arguments: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 2204
- end: 2212
loc: {...}
start: {...}
- line: 76
- column: 30
}end: {...}
- line: 76
- column: 38
}
}- name: "duration"
}
]- optional: false
}
}
]
}
} Text {...}
- type: "Text"
- start: 2221
- end: 2224
- raw: "\n\t\t"
- data: "\n\t\t"
}
]
}
} Text {...}
- type: "Text"
- start: 2230
- end: 2232
- raw: "\n\t"
- data: "\n\t"
}
]
}
} Text {...}
- type: "Text"
- start: 2238
- end: 2239
- raw: "\n"
- data: "\n"
}
]
}
} Text {...}
- type: "Text"
- start: 2245
- end: 2247
- raw: "\n\n"
- data: "\n\n"
}
]
}- options: null
instance: Script {...}
- type: "Script"
- start: 0
- end: 1395
- context: "default"
content: Program {...}
- type: "Program"
- start: 8
- end: 1386
loc: {...}
start: {...}
- line: 1
- column: 0
}end: {...}
- line: 50
- column: 0
}
}body: [...] (10)
VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 64
- end: 85
loc: {...}
start: {...}
- line: 3
- column: 1
}end: {...}
- line: 3
- column: 22
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 68
- end: 84
loc: {...}
start: {...}
- line: 3
- column: 5
}end: {...}
- line: 3
- column: 21
}
}id: Identifier {...}
- type: "Identifier"
- start: 68
- end: 72
loc: {...}
start: {...}
- line: 3
- column: 5
}end: {...}
- line: 3
- column: 9
}
}- name: "time"
}init: CallExpression {...}
- type: "CallExpression"
- start: 75
- end: 84
loc: {...}
start: {...}
- line: 3
- column: 12
}end: {...}
- line: 3
- column: 21
}
}callee: Identifier {...}
- type: "Identifier"
- start: 75
- end: 81
loc: {...}
start: {...}
- line: 3
- column: 12
}end: {...}
- line: 3
- column: 18
}
}- name: "$state"
}arguments: [...] (1)
Literal {...}
- type: "Literal"
- start: 82
- end: 83
loc: {...}
start: {...}
- line: 3
- column: 19
}end: {...}
- line: 3
- column: 20
}
}- value: 0
- raw: "0"
}
]- optional: false
}
}
]- kind: "let"
leadingComments: [...] (1)
Line {...}
- type: "Line"
- value: " These values are bound to properties of the video"
- start: 10
- end: 62
}
]
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 87
- end: 111
loc: {...}
start: {...}
- line: 4
- column: 1
}end: {...}
- line: 4
- column: 25
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 91
- end: 110
loc: {...}
start: {...}
- line: 4
- column: 5
}end: {...}
- line: 4
- column: 24
}
}id: Identifier {...}
- type: "Identifier"
- start: 91
- end: 99
loc: {...}
start: {...}
- line: 4
- column: 5
}end: {...}
- line: 4
- column: 13
}
}- name: "duration"
}init: CallExpression {...}
- type: "CallExpression"
- start: 102
- end: 110
loc: {...}
start: {...}
- line: 4
- column: 16
}end: {...}
- line: 4
- column: 24
}
}callee: Identifier {...}
- type: "Identifier"
- start: 102
- end: 108
loc: {...}
start: {...}
- line: 4
- column: 16
}end: {...}
- line: 4
- column: 22
}
}- name: "$state"
}- arguments: []
- optional: false
}
}
]- kind: "let"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 113
- end: 139
loc: {...}
start: {...}
- line: 5
- column: 1
}end: {...}
- line: 5
- column: 27
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 117
- end: 138
loc: {...}
start: {...}
- line: 5
- column: 5
}end: {...}
- line: 5
- column: 26
}
}id: Identifier {...}
- type: "Identifier"
- start: 117
- end: 123
loc: {...}
start: {...}
- line: 5
- column: 5
}end: {...}
- line: 5
- column: 11
}
}- name: "paused"
}init: CallExpression {...}
- type: "CallExpression"
- start: 126
- end: 138
loc: {...}
start: {...}
- line: 5
- column: 14
}end: {...}
- line: 5
- column: 26
}
}callee: Identifier {...}
- type: "Identifier"
- start: 126
- end: 132
loc: {...}
start: {...}
- line: 5
- column: 14
}end: {...}
- line: 5
- column: 20
}
}- name: "$state"
}arguments: [...] (1)
Literal {...}
- type: "Literal"
- start: 133
- end: 137
loc: {...}
start: {...}
- line: 5
- column: 21
}end: {...}
- line: 5
- column: 25
}
}- value: true
- raw: "true"
}
]- optional: false
}
}
]- kind: "let"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 142
- end: 174
loc: {...}
start: {...}
- line: 7
- column: 1
}end: {...}
- line: 7
- column: 33
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 146
- end: 173
loc: {...}
start: {...}
- line: 7
- column: 5
}end: {...}
- line: 7
- column: 32
}
}id: Identifier {...}
- type: "Identifier"
- start: 146
- end: 158
loc: {...}
start: {...}
- line: 7
- column: 5
}end: {...}
- line: 7
- column: 17
}
}- name: "showControls"
}init: CallExpression {...}
- type: "CallExpression"
- start: 161
- end: 173
loc: {...}
start: {...}
- line: 7
- column: 20
}end: {...}
- line: 7
- column: 32
}
}callee: Identifier {...}
- type: "Identifier"
- start: 161
- end: 167
loc: {...}
start: {...}
- line: 7
- column: 20
}end: {...}
- line: 7
- column: 26
}
}- name: "$state"
}arguments: [...] (1)
Literal {...}
- type: "Literal"
- start: 168
- end: 172
loc: {...}
start: {...}
- line: 7
- column: 27
}end: {...}
- line: 7
- column: 31
}
}- value: true
- raw: "true"
}
]- optional: false
}
}
]- kind: "let"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 176
- end: 200
loc: {...}
start: {...}
- line: 8
- column: 1
}end: {...}
- line: 8
- column: 25
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 180
- end: 199
loc: {...}
start: {...}
- line: 8
- column: 5
}end: {...}
- line: 8
- column: 24
}
}id: Identifier {...}
- type: "Identifier"
- start: 180
- end: 199
loc: {...}
start: {...}
- line: 8
- column: 5
}end: {...}
- line: 8
- column: 24
}
}- name: "showControlsTimeout"
}- init: null
}
]- kind: "let"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 251
- end: 269
loc: {...}
start: {...}
- line: 11
- column: 1
}end: {...}
- line: 11
- column: 19
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 255
- end: 268
loc: {...}
start: {...}
- line: 11
- column: 5
}end: {...}
- line: 11
- column: 18
}
}id: Identifier {...}
- type: "Identifier"
- start: 255
- end: 268
loc: {...}
start: {...}
- line: 11
- column: 5
}end: {...}
- line: 11
- column: 18
}
}- name: "lastMouseDown"
}- init: null
}
]- kind: "let"
leadingComments: [...] (1)
Line {...}
- type: "Line"
- value: " Used to track time of last mouse down event"
- start: 203
- end: 249
}
]
} FunctionDeclaration {...}
- type: "FunctionDeclaration"
- start: 272
- end: 830
loc: {...}
start: {...}
- line: 13
- column: 1
}end: {...}
- line: 26
- column: 2
}
}id: Identifier {...}
- type: "Identifier"
- start: 281
- end: 291
loc: {...}
start: {...}
- line: 13
- column: 10
}end: {...}
- line: 13
- column: 20
}
}- name: "handleMove"
}- expression: false
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 292
- end: 293
loc: {...}
start: {...}
- line: 13
- column: 21
}end: {...}
- line: 13
- column: 22
}
}- name: "e"
}
]body: BlockStatement {...}
- type: "BlockStatement"
- start: 295
- end: 830
loc: {...}
start: {...}
- line: 13
- column: 24
}end: {...}
- line: 26
- column: 2
}
}body: [...] (8)
ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 381
- end: 415
loc: {...}
start: {...}
- line: 16
- column: 2
}end: {...}
- line: 16
- column: 36
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 381
- end: 414
loc: {...}
start: {...}
- line: 16
- column: 2
}end: {...}
- line: 16
- column: 35
}
}callee: Identifier {...}
- type: "Identifier"
- start: 381
- end: 393
loc: {...}
start: {...}
- line: 16
- column: 2
}end: {...}
- line: 16
- column: 14
}
}- name: "clearTimeout"
}arguments: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 394
- end: 413
loc: {...}
start: {...}
- line: 16
- column: 15
}end: {...}
- line: 16
- column: 34
}
}- name: "showControlsTimeout"
}
]- optional: false
}leadingComments: [...] (2)
Line {...}
- type: "Line"
- value: " Make the controls visible, but fade out after"
- start: 299
- end: 347
} Line {...}
- type: "Line"
- value: " 2.5 seconds of inactivity"
- start: 350
- end: 378
}
]
} ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 418
- end: 487
loc: {...}
start: {...}
- line: 17
- column: 2
}end: {...}
- line: 17
- column: 71
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 418
- end: 486
loc: {...}
start: {...}
- line: 17
- column: 2
}end: {...}
- line: 17
- column: 70
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 418
- end: 437
loc: {...}
start: {...}
- line: 17
- column: 2
}end: {...}
- line: 17
- column: 21
}
}- name: "showControlsTimeout"
}right: CallExpression {...}
- type: "CallExpression"
- start: 440
- end: 486
loc: {...}
start: {...}
- line: 17
- column: 24
}end: {...}
- line: 17
- column: 70
}
}callee: Identifier {...}
- type: "Identifier"
- start: 440
- end: 450
loc: {...}
start: {...}
- line: 17
- column: 24
}end: {...}
- line: 17
- column: 34
}
}- name: "setTimeout"
}arguments: [...] (2)
ArrowFunctionExpression {...}
- type: "ArrowFunctionExpression"
- start: 451
- end: 479
loc: {...}
start: {...}
- line: 17
- column: 35
}end: {...}
- line: 17
- column: 63
}
}- id: null
- expression: true
- generator: false
- async: false
- params: []
body: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 458
- end: 478
loc: {...}
start: {...}
- line: 17
- column: 42
}end: {...}
- line: 17
- column: 62
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 458
- end: 470
loc: {...}
start: {...}
- line: 17
- column: 42
}end: {...}
- line: 17
- column: 54
}
}- name: "showControls"
}right: Literal {...}
- type: "Literal"
- start: 473
- end: 478
loc: {...}
start: {...}
- line: 17
- column: 57
}end: {...}
- line: 17
- column: 62
}
}- value: false
- raw: "false"
}
}
} Literal {...}
- type: "Literal"
- start: 481
- end: 485
loc: {...}
start: {...}
- line: 17
- column: 65
}end: {...}
- line: 17
- column: 69
}
}- value: 2500
- raw: "2500"
}
]- optional: false
}
}
} ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 490
- end: 510
loc: {...}
start: {...}
- line: 18
- column: 2
}end: {...}
- line: 18
- column: 22
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 490
- end: 509
loc: {...}
start: {...}
- line: 18
- column: 2
}end: {...}
- line: 18
- column: 21
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 490
- end: 502
loc: {...}
start: {...}
- line: 18
- column: 2
}end: {...}
- line: 18
- column: 14
}
}- name: "showControls"
}right: Literal {...}
- type: "Literal"
- start: 505
- end: 509
loc: {...}
start: {...}
- line: 18
- column: 17
}end: {...}
- line: 18
- column: 21
}
}- value: true
- raw: "true"
}
}
} IfStatement {...}
- type: "IfStatement"
- start: 514
- end: 536
loc: {...}
start: {...}
- line: 20
- column: 2
}end: {...}
- line: 20
- column: 24
}
}test: UnaryExpression {...}
- type: "UnaryExpression"
- start: 518
- end: 527
loc: {...}
start: {...}
- line: 20
- column: 6
}end: {...}
- line: 20
- column: 15
}
}- operator: "!"
- prefix: true
argument: Identifier {...}
- type: "Identifier"
- start: 519
- end: 527
loc: {...}
start: {...}
- line: 20
- column: 7
}end: {...}
- line: 20
- column: 15
}
}- name: "duration"
}
}consequent: ReturnStatement {...}
- type: "ReturnStatement"
- start: 529
- end: 536
loc: {...}
start: {...}
- line: 20
- column: 17
}end: {...}
- line: 20
- column: 24
}
}- argument: null
}- alternate: null
trailingComments: [...] (1)
Line {...}
- type: "Line"
- value: " video not loaded yet"
- start: 537
- end: 560
}
]
} IfStatement {...}
- type: "IfStatement"
- start: 563
- end: 618
loc: {...}
start: {...}
- line: 21
- column: 2
}end: {...}
- line: 21
- column: 57
}
}test: LogicalExpression {...}
- type: "LogicalExpression"
- start: 567
- end: 609
loc: {...}
start: {...}
- line: 21
- column: 6
}end: {...}
- line: 21
- column: 48
}
}left: BinaryExpression {...}
- type: "BinaryExpression"
- start: 567
- end: 589
loc: {...}
start: {...}
- line: 21
- column: 6
}end: {...}
- line: 21
- column: 28
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 567
- end: 573
loc: {...}
start: {...}
- line: 21
- column: 6
}end: {...}
- line: 21
- column: 12
}
}object: Identifier {...}
- type: "Identifier"
- start: 567
- end: 568
loc: {...}
start: {...}
- line: 21
- column: 6
}end: {...}
- line: 21
- column: 7
}
}- name: "e"
}property: Identifier {...}
- type: "Identifier"
- start: 569
- end: 573
loc: {...}
start: {...}
- line: 21
- column: 8
}end: {...}
- line: 21
- column: 12
}
}- name: "type"
}- computed: false
- optional: false
}- operator: "!=="
right: Literal {...}
- type: "Literal"
- start: 578
- end: 589
loc: {...}
start: {...}
- line: 21
- column: 17
}end: {...}
- line: 21
- column: 28
}
}- value: "touchmove"
- raw: "'touchmove'"
}
}- operator: "&&"
right: UnaryExpression {...}
- type: "UnaryExpression"
- start: 593
- end: 609
loc: {...}
start: {...}
- line: 21
- column: 32
}end: {...}
- line: 21
- column: 48
}
}- operator: "!"
- prefix: true
argument: BinaryExpression {...}
- type: "BinaryExpression"
- start: 595
- end: 608
loc: {...}
start: {...}
- line: 21
- column: 34
}end: {...}
- line: 21
- column: 47
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 595
- end: 604
loc: {...}
start: {...}
- line: 21
- column: 34
}end: {...}
- line: 21
- column: 43
}
}object: Identifier {...}
- type: "Identifier"
- start: 595
- end: 596
loc: {...}
start: {...}
- line: 21
- column: 34
}end: {...}
- line: 21
- column: 35
}
}- name: "e"
}property: Identifier {...}
- type: "Identifier"
- start: 597
- end: 604
loc: {...}
start: {...}
- line: 21
- column: 36
}end: {...}
- line: 21
- column: 43
}
}- name: "buttons"
}- computed: false
- optional: false
}- operator: "&"
right: Literal {...}
- type: "Literal"
- start: 607
- end: 608
loc: {...}
start: {...}
- line: 21
- column: 46
}end: {...}
- line: 21
- column: 47
}
}- value: 1
- raw: "1"
}
}
}
}consequent: ReturnStatement {...}
- type: "ReturnStatement"
- start: 611
- end: 618
loc: {...}
start: {...}
- line: 21
- column: 50
}end: {...}
- line: 21
- column: 57
}
}- argument: null
}- alternate: null
trailingComments: [...] (1)
Line {...}
- type: "Line"
- value: " mouse not down"
- start: 619
- end: 636
}
]
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 640
- end: 714
loc: {...}
start: {...}
- line: 23
- column: 2
}end: {...}
- line: 23
- column: 76
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 646
- end: 713
loc: {...}
start: {...}
- line: 23
- column: 8
}end: {...}
- line: 23
- column: 75
}
}id: Identifier {...}
- type: "Identifier"
- start: 646
- end: 653
loc: {...}
start: {...}
- line: 23
- column: 8
}end: {...}
- line: 23
- column: 15
}
}- name: "clientX"
}init: ConditionalExpression {...}
- type: "ConditionalExpression"
- start: 656
- end: 713
loc: {...}
start: {...}
- line: 23
- column: 18
}end: {...}
- line: 23
- column: 75
}
}test: BinaryExpression {...}
- type: "BinaryExpression"
- start: 656
- end: 678
loc: {...}
start: {...}
- line: 23
- column: 18
}end: {...}
- line: 23
- column: 40
}
}left: MemberExpression {...}
- type: "MemberExpression"
- start: 656
- end: 662
loc: {...}
start: {...}
- line: 23
- column: 18
}end: {...}
- line: 23
- column: 24
}
}object: Identifier {...}
- type: "Identifier"
- start: 656
- end: 657
loc: {...}
start: {...}
- line: 23
- column: 18
}end: {...}
- line: 23
- column: 19
}
}- name: "e"
}property: Identifier {...}
- type: "Identifier"
- start: 658
- end: 662
loc: {...}
start: {...}
- line: 23
- column: 20
}end: {...}
- line: 23
- column: 24
}
}- name: "type"
}- computed: false
- optional: false
}- operator: "==="
right: Literal {...}
- type: "Literal"
- start: 667
- end: 678
loc: {...}
start: {...}
- line: 23
- column: 29
}end: {...}
- line: 23
- column: 40
}
}- value: "touchmove"
- raw: "'touchmove'"
}
}consequent: MemberExpression {...}
- type: "MemberExpression"
- start: 681
- end: 701
loc: {...}
start: {...}
- line: 23
- column: 43
}end: {...}
- line: 23
- column: 63
}
}object: MemberExpression {...}
- type: "MemberExpression"
- start: 681
- end: 693
loc: {...}
start: {...}
- line: 23
- column: 43
}end: {...}
- line: 23
- column: 55
}
}object: MemberExpression {...}
- type: "MemberExpression"
- start: 681
- end: 690
loc: {...}
start: {...}
- line: 23
- column: 43
}end: {...}
- line: 23
- column: 52
}
}object: Identifier {...}
- type: "Identifier"
- start: 681
- end: 682
loc: {...}
start: {...}
- line: 23
- column: 43
}end: {...}
- line: 23
- column: 44
}
}- name: "e"
}property: Identifier {...}
- type: "Identifier"
- start: 683
- end: 690
loc: {...}
start: {...}
- line: 23
- column: 45
}end: {...}
- line: 23
- column: 52
}
}- name: "touches"
}- computed: false
- optional: false
}property: Literal {...}
- type: "Literal"
- start: 691
- end: 692
loc: {...}
start: {...}
- line: 23
- column: 53
}end: {...}
- line: 23
- column: 54
}
}- value: 0
- raw: "0"
}- computed: true
- optional: false
}property: Identifier {...}
- type: "Identifier"
- start: 694
- end: 701
loc: {...}
start: {...}
- line: 23
- column: 56
}end: {...}
- line: 23
- column: 63
}
}- name: "clientX"
}- computed: false
- optional: false
}alternate: MemberExpression {...}
- type: "MemberExpression"
- start: 704
- end: 713
loc: {...}
start: {...}
- line: 23
- column: 66
}end: {...}
- line: 23
- column: 75
}
}object: Identifier {...}
- type: "Identifier"
- start: 704
- end: 705
loc: {...}
start: {...}
- line: 23
- column: 66
}end: {...}
- line: 23
- column: 67
}
}- name: "e"
}property: Identifier {...}
- type: "Identifier"
- start: 706
- end: 713
loc: {...}
start: {...}
- line: 23
- column: 68
}end: {...}
- line: 23
- column: 75
}
}- name: "clientX"
}- computed: false
- optional: false
}
}
}
]- kind: "const"
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 717
- end: 770
loc: {...}
start: {...}
- line: 24
- column: 2
}end: {...}
- line: 24
- column: 55
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 723
- end: 769
loc: {...}
start: {...}
- line: 24
- column: 8
}end: {...}
- line: 24
- column: 54
}
}id: ObjectPattern {...}
- type: "ObjectPattern"
- start: 723
- end: 738
loc: {...}
start: {...}
- line: 24
- column: 8
}end: {...}
- line: 24
- column: 23
}
}properties: [...] (2)
Property {...}
- type: "Property"
- start: 725
- end: 729
loc: {...}
start: {...}
- line: 24
- column: 10
}end: {...}
- line: 24
- column: 14
}
}- method: false
- shorthand: true
- computed: false
key: Identifier {...}
- type: "Identifier"
- start: 725
- end: 729
loc: {...}
start: {...}
- line: 24
- column: 10
}end: {...}
- line: 24
- column: 14
}
}- name: "left"
}- kind: "init"
value: Identifier {...}
- type: "Identifier"
- start: 725
- end: 729
loc: {...}
start: {...}
- line: 24
- column: 10
}end: {...}
- line: 24
- column: 14
}
}- name: "left"
}
} Property {...}
- type: "Property"
- start: 731
- end: 736
loc: {...}
start: {...}
- line: 24
- column: 16
}end: {...}
- line: 24
- column: 21
}
}- method: false
- shorthand: true
- computed: false
key: Identifier {...}
- type: "Identifier"
- start: 731
- end: 736
loc: {...}
start: {...}
- line: 24
- column: 16
}end: {...}
- line: 24
- column: 21
}
}- name: "right"
}- kind: "init"
value: Identifier {...}
- type: "Identifier"
- start: 731
- end: 736
loc: {...}
start: {...}
- line: 24
- column: 16
}end: {...}
- line: 24
- column: 21
}
}- name: "right"
}
}
]
}init: CallExpression {...}
- type: "CallExpression"
- start: 741
- end: 769
loc: {...}
start: {...}
- line: 24
- column: 26
}end: {...}
- line: 24
- column: 54
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 741
- end: 767
loc: {...}
start: {...}
- line: 24
- column: 26
}end: {...}
- line: 24
- column: 52
}
}object: ThisExpression {...}
- type: "ThisExpression"
- start: 741
- end: 745
loc: {...}
start: {...}
- line: 24
- column: 26
}end: {...}
- line: 24
- column: 30
}
}
}property: Identifier {...}
- type: "Identifier"
- start: 746
- end: 767
loc: {...}
start: {...}
- line: 24
- column: 31
}end: {...}
- line: 24
- column: 52
}
}- name: "getBoundingClientRect"
}- computed: false
- optional: false
}- arguments: []
- optional: false
}
}
]- kind: "const"
} ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 773
- end: 827
loc: {...}
start: {...}
- line: 25
- column: 2
}end: {...}
- line: 25
- column: 56
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 773
- end: 826
loc: {...}
start: {...}
- line: 25
- column: 2
}end: {...}
- line: 25
- column: 55
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 773
- end: 777
loc: {...}
start: {...}
- line: 25
- column: 2
}end: {...}
- line: 25
- column: 6
}
}- name: "time"
}right: BinaryExpression {...}
- type: "BinaryExpression"
- start: 780
- end: 826
loc: {...}
start: {...}
- line: 25
- column: 9
}end: {...}
- line: 25
- column: 55
}
}left: BinaryExpression {...}
- type: "BinaryExpression"
- start: 781
- end: 808
loc: {...}
start: {...}
- line: 25
- column: 10
}end: {...}
- line: 25
- column: 37
}
}left: Identifier {...}
- type: "Identifier"
- start: 781
- end: 789
loc: {...}
start: {...}
- line: 25
- column: 10
}end: {...}
- line: 25
- column: 18
}
}- name: "duration"
}- operator: "*"
right: BinaryExpression {...}
- type: "BinaryExpression"
- start: 793
- end: 807
loc: {...}
start: {...}
- line: 25
- column: 22
}end: {...}
- line: 25
- column: 36
}
}left: Identifier {...}
- type: "Identifier"
- start: 793
- end: 800
loc: {...}
start: {...}
- line: 25
- column: 22
}end: {...}
- line: 25
- column: 29
}
}- name: "clientX"
}- operator: "-"
right: Identifier {...}
- type: "Identifier"
- start: 803
- end: 807
loc: {...}
start: {...}
- line: 25
- column: 32
}end: {...}
- line: 25
- column: 36
}
}- name: "left"
}
}
}- operator: "/"
right: BinaryExpression {...}
- type: "BinaryExpression"
- start: 813
- end: 825
loc: {...}
start: {...}
- line: 25
- column: 42
}end: {...}
- line: 25
- column: 54
}
}left: Identifier {...}
- type: "Identifier"
- start: 813
- end: 818
loc: {...}
start: {...}
- line: 25
- column: 42
}end: {...}
- line: 25
- column: 47
}
}- name: "right"
}- operator: "-"
right: Identifier {...}
- type: "Identifier"
- start: 821
- end: 825
loc: {...}
start: {...}
- line: 25
- column: 50
}end: {...}
- line: 25
- column: 54
}
}- name: "left"
}
}
}
}
}
]
}
} FunctionDeclaration {...}
- type: "FunctionDeclaration"
- start: 955
- end: 1017
loc: {...}
start: {...}
- line: 30
- column: 1
}end: {...}
- line: 32
- column: 2
}
}id: Identifier {...}
- type: "Identifier"
- start: 964
- end: 979
loc: {...}
start: {...}
- line: 30
- column: 10
}end: {...}
- line: 30
- column: 25
}
}- name: "handleMousedown"
}- expression: false
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 980
- end: 981
loc: {...}
start: {...}
- line: 30
- column: 26
}end: {...}
- line: 30
- column: 27
}
}- name: "e"
}
]body: BlockStatement {...}
- type: "BlockStatement"
- start: 983
- end: 1017
loc: {...}
start: {...}
- line: 30
- column: 29
}end: {...}
- line: 32
- column: 2
}
}body: [...] (1)
ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 987
- end: 1014
loc: {...}
start: {...}
- line: 31
- column: 2
}end: {...}
- line: 31
- column: 29
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 987
- end: 1013
loc: {...}
start: {...}
- line: 31
- column: 2
}end: {...}
- line: 31
- column: 28
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 987
- end: 1000
loc: {...}
start: {...}
- line: 31
- column: 2
}end: {...}
- line: 31
- column: 15
}
}- name: "lastMouseDown"
}right: NewExpression {...}
- type: "NewExpression"
- start: 1003
- end: 1013
loc: {...}
start: {...}
- line: 31
- column: 18
}end: {...}
- line: 31
- column: 28
}
}callee: Identifier {...}
- type: "Identifier"
- start: 1007
- end: 1011
loc: {...}
start: {...}
- line: 31
- column: 22
}end: {...}
- line: 31
- column: 26
}
}- name: "Date"
}- arguments: []
}
}
}
]
}leadingComments: [...] (2)
Line {...}
- type: "Line"
- value: " we can't rely on the built-in click event, because it fires"
- start: 833
- end: 895
} Line {...}
- type: "Line"
- value: " after a drag — we have to listen for clicks ourselves"
- start: 897
- end: 953
}
]
} FunctionDeclaration {...}
- type: "FunctionDeclaration"
- start: 1020
- end: 1154
loc: {...}
start: {...}
- line: 34
- column: 1
}end: {...}
- line: 39
- column: 2
}
}id: Identifier {...}
- type: "Identifier"
- start: 1029
- end: 1042
loc: {...}
start: {...}
- line: 34
- column: 10
}end: {...}
- line: 34
- column: 23
}
}- name: "handleMouseup"
}- expression: false
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 1043
- end: 1044
loc: {...}
start: {...}
- line: 34
- column: 24
}end: {...}
- line: 34
- column: 25
}
}- name: "e"
}
]body: BlockStatement {...}
- type: "BlockStatement"
- start: 1046
- end: 1154
loc: {...}
start: {...}
- line: 34
- column: 27
}end: {...}
- line: 39
- column: 2
}
}body: [...] (1)
IfStatement {...}
- type: "IfStatement"
- start: 1050
- end: 1151
loc: {...}
start: {...}
- line: 35
- column: 2
}end: {...}
- line: 38
- column: 3
}
}test: BinaryExpression {...}
- type: "BinaryExpression"
- start: 1054
- end: 1086
loc: {...}
start: {...}
- line: 35
- column: 6
}end: {...}
- line: 35
- column: 38
}
}left: BinaryExpression {...}
- type: "BinaryExpression"
- start: 1054
- end: 1080
loc: {...}
start: {...}
- line: 35
- column: 6
}end: {...}
- line: 35
- column: 32
}
}left: NewExpression {...}
- type: "NewExpression"
- start: 1054
- end: 1064
loc: {...}
start: {...}
- line: 35
- column: 6
}end: {...}
- line: 35
- column: 16
}
}callee: Identifier {...}
- type: "Identifier"
- start: 1058
- end: 1062
loc: {...}
start: {...}
- line: 35
- column: 10
}end: {...}
- line: 35
- column: 14
}
}- name: "Date"
}- arguments: []
}- operator: "-"
right: Identifier {...}
- type: "Identifier"
- start: 1067
- end: 1080
loc: {...}
start: {...}
- line: 35
- column: 19
}end: {...}
- line: 35
- column: 32
}
}- name: "lastMouseDown"
}
}- operator: "<"
right: Literal {...}
- type: "Literal"
- start: 1083
- end: 1086
loc: {...}
start: {...}
- line: 35
- column: 35
}end: {...}
- line: 35
- column: 38
}
}- value: 300
- raw: "300"
}
}consequent: BlockStatement {...}
- type: "BlockStatement"
- start: 1088
- end: 1151
loc: {...}
start: {...}
- line: 35
- column: 40
}end: {...}
- line: 38
- column: 3
}
}body: [...] (1)
IfStatement {...}
- type: "IfStatement"
- start: 1093
- end: 1147
loc: {...}
start: {...}
- line: 36
- column: 3
}end: {...}
- line: 37
- column: 25
}
}test: Identifier {...}
- type: "Identifier"
- start: 1097
- end: 1103
loc: {...}
start: {...}
- line: 36
- column: 7
}end: {...}
- line: 36
- column: 13
}
}- name: "paused"
}consequent: ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 1105
- end: 1121
loc: {...}
start: {...}
- line: 36
- column: 15
}end: {...}
- line: 36
- column: 31
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 1105
- end: 1120
loc: {...}
start: {...}
- line: 36
- column: 15
}end: {...}
- line: 36
- column: 30
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 1105
- end: 1118
loc: {...}
start: {...}
- line: 36
- column: 15
}end: {...}
- line: 36
- column: 28
}
}object: MemberExpression {...}
- type: "MemberExpression"
- start: 1105
- end: 1113
loc: {...}
start: {...}
- line: 36
- column: 15
}end: {...}
- line: 36
- column: 23
}
}object: Identifier {...}
- type: "Identifier"
- start: 1105
- end: 1106
loc: {...}
start: {...}
- line: 36
- column: 15
}end: {...}
- line: 36
- column: 16
}
}- name: "e"
}property: Identifier {...}
- type: "Identifier"
- start: 1107
- end: 1113
loc: {...}
start: {...}
- line: 36
- column: 17
}end: {...}
- line: 36
- column: 23
}
}- name: "target"
}- computed: false
- optional: false
}property: Identifier {...}
- type: "Identifier"
- start: 1114
- end: 1118
loc: {...}
start: {...}
- line: 36
- column: 24
}end: {...}
- line: 36
- column: 28
}
}- name: "play"
}- computed: false
- optional: false
}- arguments: []
- optional: false
}
}alternate: ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 1130
- end: 1147
loc: {...}
start: {...}
- line: 37
- column: 8
}end: {...}
- line: 37
- column: 25
}
}expression: CallExpression {...}
- type: "CallExpression"
- start: 1130
- end: 1146
loc: {...}
start: {...}
- line: 37
- column: 8
}end: {...}
- line: 37
- column: 24
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 1130
- end: 1144
loc: {...}
start: {...}
- line: 37
- column: 8
}end: {...}
- line: 37
- column: 22
}
}object: MemberExpression {...}
- type: "MemberExpression"
- start: 1130
- end: 1138
loc: {...}
start: {...}
- line: 37
- column: 8
}end: {...}
- line: 37
- column: 16
}
}object: Identifier {...}
- type: "Identifier"
- start: 1130
- end: 1131
loc: {...}
start: {...}
- line: 37
- column: 8
}end: {...}
- line: 37
- column: 9
}
}- name: "e"
}property: Identifier {...}
- type: "Identifier"
- start: 1132
- end: 1138
loc: {...}
start: {...}
- line: 37
- column: 10
}end: {...}
- line: 37
- column: 16
}
}- name: "target"
}- computed: false
- optional: false
}property: Identifier {...}
- type: "Identifier"
- start: 1139
- end: 1144
loc: {...}
start: {...}
- line: 37
- column: 17
}end: {...}
- line: 37
- column: 22
}
}- name: "pause"
}- computed: false
- optional: false
}- arguments: []
- optional: false
}
}
}
]
}- alternate: null
}
]
}
} FunctionDeclaration {...}
- type: "FunctionDeclaration"
- start: 1157
- end: 1385
loc: {...}
start: {...}
- line: 41
- column: 1
}end: {...}
- line: 49
- column: 2
}
}id: Identifier {...}
- type: "Identifier"
- start: 1166
- end: 1172
loc: {...}
start: {...}
- line: 41
- column: 10
}end: {...}
- line: 41
- column: 16
}
}- name: "format"
}- expression: false
- generator: false
- async: false
params: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 1173
- end: 1180
loc: {...}
start: {...}
- line: 41
- column: 17
}end: {...}
- line: 41
- column: 24
}
}- name: "seconds"
}
]body: BlockStatement {...}
- type: "BlockStatement"
- start: 1182
- end: 1385
loc: {...}
start: {...}
- line: 41
- column: 26
}end: {...}
- line: 49
- column: 2
}
}body: [...] (5)
IfStatement {...}
- type: "IfStatement"
- start: 1186
- end: 1219
loc: {...}
start: {...}
- line: 42
- column: 2
}end: {...}
- line: 42
- column: 35
}
}test: CallExpression {...}
- type: "CallExpression"
- start: 1190
- end: 1204
loc: {...}
start: {...}
- line: 42
- column: 6
}end: {...}
- line: 42
- column: 20
}
}callee: Identifier {...}
- type: "Identifier"
- start: 1190
- end: 1195
loc: {...}
start: {...}
- line: 42
- column: 6
}end: {...}
- line: 42
- column: 11
}
}- name: "isNaN"
}arguments: [...] (1)
Identifier {...}
- type: "Identifier"
- start: 1196
- end: 1203
loc: {...}
start: {...}
- line: 42
- column: 12
}end: {...}
- line: 42
- column: 19
}
}- name: "seconds"
}
]- optional: false
}consequent: ReturnStatement {...}
- type: "ReturnStatement"
- start: 1206
- end: 1219
loc: {...}
start: {...}
- line: 42
- column: 22
}end: {...}
- line: 42
- column: 35
}
}argument: Literal {...}
- type: "Literal"
- start: 1213
- end: 1218
loc: {...}
start: {...}
- line: 42
- column: 29
}end: {...}
- line: 42
- column: 34
}
}- value: "..."
- raw: "'...'"
}
}- alternate: null
} VariableDeclaration {...}
- type: "VariableDeclaration"
- start: 1223
- end: 1264
loc: {...}
start: {...}
- line: 44
- column: 2
}end: {...}
- line: 44
- column: 43
}
}declarations: [...] (1)
VariableDeclarator {...}
- type: "VariableDeclarator"
- start: 1229
- end: 1263
loc: {...}
start: {...}
- line: 44
- column: 8
}end: {...}
- line: 44
- column: 42
}
}id: Identifier {...}
- type: "Identifier"
- start: 1229
- end: 1236
loc: {...}
start: {...}
- line: 44
- column: 8
}end: {...}
- line: 44
- column: 15
}
}- name: "minutes"
}init: CallExpression {...}
- type: "CallExpression"
- start: 1239
- end: 1263
loc: {...}
start: {...}
- line: 44
- column: 18
}end: {...}
- line: 44
- column: 42
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 1239
- end: 1249
loc: {...}
start: {...}
- line: 44
- column: 18
}end: {...}
- line: 44
- column: 28
}
}object: Identifier {...}
- type: "Identifier"
- start: 1239
- end: 1243
loc: {...}
start: {...}
- line: 44
- column: 18
}end: {...}
- line: 44
- column: 22
}
}- name: "Math"
}property: Identifier {...}
- type: "Identifier"
- start: 1244
- end: 1249
loc: {...}
start: {...}
- line: 44
- column: 23
}end: {...}
- line: 44
- column: 28
}
}- name: "floor"
}- computed: false
- optional: false
}arguments: [...] (1)
BinaryExpression {...}
- type: "BinaryExpression"
- start: 1250
- end: 1262
loc: {...}
start: {...}
- line: 44
- column: 29
}end: {...}
- line: 44
- column: 41
}
}left: Identifier {...}
- type: "Identifier"
- start: 1250
- end: 1257
loc: {...}
start: {...}
- line: 44
- column: 29
}end: {...}
- line: 44
- column: 36
}
}- name: "seconds"
}- operator: "/"
right: Literal {...}
- type: "Literal"
- start: 1260
- end: 1262
loc: {...}
start: {...}
- line: 44
- column: 39
}end: {...}
- line: 44
- column: 41
}
}- value: 60
- raw: "60"
}
}
]- optional: false
}
}
]- kind: "const"
} ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 1267
- end: 1302
loc: {...}
start: {...}
- line: 45
- column: 2
}end: {...}
- line: 45
- column: 37
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 1267
- end: 1301
loc: {...}
start: {...}
- line: 45
- column: 2
}end: {...}
- line: 45
- column: 36
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 1267
- end: 1274
loc: {...}
start: {...}
- line: 45
- column: 2
}end: {...}
- line: 45
- column: 9
}
}- name: "seconds"
}right: CallExpression {...}
- type: "CallExpression"
- start: 1277
- end: 1301
loc: {...}
start: {...}
- line: 45
- column: 12
}end: {...}
- line: 45
- column: 36
}
}callee: MemberExpression {...}
- type: "MemberExpression"
- start: 1277
- end: 1287
loc: {...}
start: {...}
- line: 45
- column: 12
}end: {...}
- line: 45
- column: 22
}
}object: Identifier {...}
- type: "Identifier"
- start: 1277
- end: 1281
loc: {...}
start: {...}
- line: 45
- column: 12
}end: {...}
- line: 45
- column: 16
}
}- name: "Math"
}property: Identifier {...}
- type: "Identifier"
- start: 1282
- end: 1287
loc: {...}
start: {...}
- line: 45
- column: 17
}end: {...}
- line: 45
- column: 22
}
}- name: "floor"
}- computed: false
- optional: false
}arguments: [...] (1)
BinaryExpression {...}
- type: "BinaryExpression"
- start: 1288
- end: 1300
loc: {...}
start: {...}
- line: 45
- column: 23
}end: {...}
- line: 45
- column: 35
}
}left: Identifier {...}
- type: "Identifier"
- start: 1288
- end: 1295
loc: {...}
start: {...}
- line: 45
- column: 23
}end: {...}
- line: 45
- column: 30
}
}- name: "seconds"
}- operator: "%"
right: Literal {...}
- type: "Literal"
- start: 1298
- end: 1300
loc: {...}
start: {...}
- line: 45
- column: 33
}end: {...}
- line: 45
- column: 35
}
}- value: 60
- raw: "60"
}
}
]- optional: false
}
}
} IfStatement {...}
- type: "IfStatement"
- start: 1305
- end: 1347
loc: {...}
start: {...}
- line: 46
- column: 2
}end: {...}
- line: 46
- column: 44
}
}test: BinaryExpression {...}
- type: "BinaryExpression"
- start: 1309
- end: 1321
loc: {...}
start: {...}
- line: 46
- column: 6
}end: {...}
- line: 46
- column: 18
}
}left: Identifier {...}
- type: "Identifier"
- start: 1309
- end: 1316
loc: {...}
start: {...}
- line: 46
- column: 6
}end: {...}
- line: 46
- column: 13
}
}- name: "seconds"
}- operator: "<"
right: Literal {...}
- type: "Literal"
- start: 1319
- end: 1321
loc: {...}
start: {...}
- line: 46
- column: 16
}end: {...}
- line: 46
- column: 18
}
}- value: 10
- raw: "10"
}
}consequent: ExpressionStatement {...}
- type: "ExpressionStatement"
- start: 1323
- end: 1347
loc: {...}
start: {...}
- line: 46
- column: 20
}end: {...}
- line: 46
- column: 44
}
}expression: AssignmentExpression {...}
- type: "AssignmentExpression"
- start: 1323
- end: 1346
loc: {...}
start: {...}
- line: 46
- column: 20
}end: {...}
- line: 46
- column: 43
}
}- operator: "="
left: Identifier {...}
- type: "Identifier"
- start: 1323
- end: 1330
loc: {...}
start: {...}
- line: 46
- column: 20
}end: {...}
- line: 46
- column: 27
}
}- name: "seconds"
}right: BinaryExpression {...}
- type: "BinaryExpression"
- start: 1333
- end: 1346
loc: {...}
start: {...}
- line: 46
- column: 30
}end: {...}
- line: 46
- column: 43
}
}left: Literal {...}
- type: "Literal"
- start: 1333
- end: 1336
loc: {...}
start: {...}
- line: 46
- column: 30
}end: {...}
- line: 46
- column: 33
}
}- value: "0"
- raw: "'0'"
}- operator: "+"
right: Identifier {...}
- type: "Identifier"
- start: 1339
- end: 1346
loc: {...}
start: {...}
- line: 46
- column: 36
}end: {...}
- line: 46
- column: 43
}
}- name: "seconds"
}
}
}
}- alternate: null
} ReturnStatement {...}
- type: "ReturnStatement"
- start: 1351
- end: 1382
loc: {...}
start: {...}
- line: 48
- column: 2
}end: {...}
- line: 48
- column: 33
}
}argument: TemplateLiteral {...}
- type: "TemplateLiteral"
- start: 1358
- end: 1381
loc: {...}
start: {...}
- line: 48
- column: 9
}end: {...}
- line: 48
- column: 32
}
}expressions: [...] (2)
Identifier {...}
- type: "Identifier"
- start: 1361
- end: 1368
loc: {...}
start: {...}
- line: 48
- column: 12
}end: {...}
- line: 48
- column: 19
}
}- name: "minutes"
} Identifier {...}
- type: "Identifier"
- start: 1372
- end: 1379
loc: {...}
start: {...}
- line: 48
- column: 23
}end: {...}
- line: 48
- column: 30
}
}- name: "seconds"
}
]quasis: [...] (3)
TemplateElement {...}
- type: "TemplateElement"
- start: 1359
- end: 1359
loc: {...}
start: {...}
- line: 48
- column: 10
}end: {...}
- line: 48
- column: 10
}
}value: {...}
- raw: ""
- cooked: ""
}- tail: false
} TemplateElement {...}
- type: "TemplateElement"
- start: 1369
- end: 1370
loc: {...}
start: {...}
- line: 48
- column: 20
}end: {...}
- line: 48
- column: 21
}
}value: {...}
- raw: ":"
- cooked: ":"
}- tail: false
} TemplateElement {...}
- type: "TemplateElement"
- start: 1380
- end: 1380
loc: {...}
start: {...}
- line: 48
- column: 31
}end: {...}
- line: 48
- column: 31
}
}value: {...}
- raw: ""
- cooked: ""
}- tail: true
}
]
}
}
]
}
}
]- sourceType: "module"
}- attributes: []
}
}
The AST is not public API and may change at any point in time