Initial commit
This commit is contained in:
109
node_modules/node-blockly/blockly/accessible/app.component.js
generated
vendored
Normal file
109
node_modules/node-blockly/blockly/accessible/app.component.js
generated
vendored
Normal file
@@ -0,0 +1,109 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Top-level component for the Accessible Blockly application.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.AppComponent');
|
||||
|
||||
goog.require('Blockly');
|
||||
|
||||
goog.require('blocklyApp.AudioService');
|
||||
goog.require('blocklyApp.BlockConnectionService');
|
||||
goog.require('blocklyApp.BlockOptionsModalComponent');
|
||||
goog.require('blocklyApp.BlockOptionsModalService');
|
||||
goog.require('blocklyApp.KeyboardInputService');
|
||||
goog.require('blocklyApp.NotificationsService');
|
||||
goog.require('blocklyApp.SidebarComponent');
|
||||
goog.require('blocklyApp.ToolboxModalComponent');
|
||||
goog.require('blocklyApp.ToolboxModalService');
|
||||
goog.require('blocklyApp.TranslatePipe');
|
||||
goog.require('blocklyApp.TreeService');
|
||||
goog.require('blocklyApp.UtilsService');
|
||||
goog.require('blocklyApp.VariableAddModalComponent');
|
||||
goog.require('blocklyApp.VariableModalService');
|
||||
goog.require('blocklyApp.VariableRenameModalComponent');
|
||||
goog.require('blocklyApp.VariableRemoveModalComponent');
|
||||
goog.require('blocklyApp.WorkspaceComponent');
|
||||
|
||||
|
||||
blocklyApp.workspace = new Blockly.Workspace();
|
||||
|
||||
blocklyApp.AppComponent = ng.core.Component({
|
||||
selector: 'blockly-app',
|
||||
template: `
|
||||
<blockly-workspace></blockly-workspace>
|
||||
<blockly-sidebar></blockly-sidebar>
|
||||
<!-- Warning: Hiding this when there is no content looks visually nicer,
|
||||
but it can have unexpected side effects. In particular, it sometimes stops
|
||||
screenreaders from reading anything in this div. -->
|
||||
<div class="blocklyAriaLiveStatus">
|
||||
<span aria-live="polite" role="status">{{getAriaLiveReadout()}}</span>
|
||||
</div>
|
||||
|
||||
<blockly-add-variable-modal></blockly-add-variable-modal>
|
||||
<blockly-rename-variable-modal></blockly-rename-variable-modal>
|
||||
<blockly-remove-variable-modal></blockly-remove-variable-modal>
|
||||
<blockly-toolbox-modal></blockly-toolbox-modal>
|
||||
<blockly-block-options-modal></blockly-block-options-modal>
|
||||
|
||||
<label id="blockly-translate-button" aria-hidden="true" hidden>
|
||||
{{'BUTTON'|translate}}
|
||||
</label>
|
||||
<label id="blockly-translate-workspace-block" aria-hidden="true" hidden>
|
||||
{{'WORKSPACE_BLOCK'|translate}}
|
||||
</label>
|
||||
`,
|
||||
directives: [
|
||||
blocklyApp.BlockOptionsModalComponent,
|
||||
blocklyApp.SidebarComponent,
|
||||
blocklyApp.ToolboxModalComponent,
|
||||
blocklyApp.VariableAddModalComponent,
|
||||
blocklyApp.VariableRenameModalComponent,
|
||||
blocklyApp.VariableRemoveModalComponent,
|
||||
blocklyApp.WorkspaceComponent
|
||||
],
|
||||
pipes: [blocklyApp.TranslatePipe],
|
||||
// All services are declared here, so that all components in the application
|
||||
// use the same instance of the service.
|
||||
// https://www.sitepoint.com/angular-2-components-providers-classes-factories-values/
|
||||
providers: [
|
||||
blocklyApp.AudioService,
|
||||
blocklyApp.BlockConnectionService,
|
||||
blocklyApp.BlockOptionsModalService,
|
||||
blocklyApp.KeyboardInputService,
|
||||
blocklyApp.NotificationsService,
|
||||
blocklyApp.ToolboxModalService,
|
||||
blocklyApp.TreeService,
|
||||
blocklyApp.UtilsService,
|
||||
blocklyApp.VariableModalService
|
||||
]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.NotificationsService, function(notificationsService) {
|
||||
this.notificationsService = notificationsService;
|
||||
}
|
||||
],
|
||||
getAriaLiveReadout: function() {
|
||||
return this.notificationsService.getDisplayedMessage();
|
||||
}
|
||||
});
|
||||
96
node_modules/node-blockly/blockly/accessible/audio.service.js
generated
vendored
Normal file
96
node_modules/node-blockly/blockly/accessible/audio.service.js
generated
vendored
Normal file
@@ -0,0 +1,96 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service for playing audio files.
|
||||
* @author sll@google.com (Sean Lip)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.AudioService');
|
||||
|
||||
goog.require('blocklyApp.NotificationsService');
|
||||
|
||||
|
||||
blocklyApp.AudioService = ng.core.Class({
|
||||
constructor: [
|
||||
blocklyApp.NotificationsService, function(notificationsService) {
|
||||
this.notificationsService = notificationsService;
|
||||
|
||||
// We do not play any audio unless a media path prefix is specified.
|
||||
this.canPlayAudio = false;
|
||||
|
||||
if (ACCESSIBLE_GLOBALS.hasOwnProperty('mediaPathPrefix')) {
|
||||
this.canPlayAudio = true;
|
||||
var mediaPathPrefix = ACCESSIBLE_GLOBALS['mediaPathPrefix'];
|
||||
this.AUDIO_PATHS_ = {
|
||||
'connect': mediaPathPrefix + 'click.mp3',
|
||||
'delete': mediaPathPrefix + 'delete.mp3',
|
||||
'oops': mediaPathPrefix + 'oops.mp3'
|
||||
};
|
||||
}
|
||||
|
||||
this.cachedAudioFiles_ = {};
|
||||
// Store callback references here so that they can be removed if a new
|
||||
// call to this.play_() comes in.
|
||||
this.onEndedCallbacks_ = {
|
||||
'connect': [],
|
||||
'delete': [],
|
||||
'oops': []
|
||||
};
|
||||
}
|
||||
],
|
||||
play_: function(audioId, onEndedCallback) {
|
||||
if (this.canPlayAudio) {
|
||||
if (!this.cachedAudioFiles_.hasOwnProperty(audioId)) {
|
||||
this.cachedAudioFiles_[audioId] = new Audio(this.AUDIO_PATHS_[audioId]);
|
||||
}
|
||||
|
||||
if (onEndedCallback) {
|
||||
this.onEndedCallbacks_[audioId].push(onEndedCallback);
|
||||
this.cachedAudioFiles_[audioId].addEventListener(
|
||||
'ended', onEndedCallback);
|
||||
} else {
|
||||
var that = this;
|
||||
this.onEndedCallbacks_[audioId].forEach(function(callback) {
|
||||
that.cachedAudioFiles_[audioId].removeEventListener(
|
||||
'ended', callback);
|
||||
});
|
||||
this.onEndedCallbacks_[audioId].length = 0;
|
||||
}
|
||||
|
||||
this.cachedAudioFiles_[audioId].play();
|
||||
}
|
||||
},
|
||||
playConnectSound: function() {
|
||||
this.play_('connect');
|
||||
},
|
||||
playDeleteSound: function() {
|
||||
this.play_('delete');
|
||||
},
|
||||
playOopsSound: function(optionalStatusMessage) {
|
||||
if (optionalStatusMessage) {
|
||||
var that = this;
|
||||
this.play_('oops', function() {
|
||||
that.notificationsService.speak(optionalStatusMessage);
|
||||
});
|
||||
} else {
|
||||
this.play_('oops');
|
||||
}
|
||||
}
|
||||
});
|
||||
135
node_modules/node-blockly/blockly/accessible/block-connection.service.js
generated
vendored
Normal file
135
node_modules/node-blockly/blockly/accessible/block-connection.service.js
generated
vendored
Normal file
@@ -0,0 +1,135 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service for handling the mechanics of how blocks
|
||||
* get connected to each other.
|
||||
* @author sll@google.com (Sean Lip)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.BlockConnectionService');
|
||||
|
||||
goog.require('blocklyApp.AudioService');
|
||||
goog.require('blocklyApp.NotificationsService');
|
||||
|
||||
|
||||
blocklyApp.BlockConnectionService = ng.core.Class({
|
||||
constructor: [
|
||||
blocklyApp.NotificationsService, blocklyApp.AudioService,
|
||||
function(_notificationsService, _audioService) {
|
||||
this.notificationsService = _notificationsService;
|
||||
this.audioService = _audioService;
|
||||
|
||||
// When a user "adds a link" to a block, the connection representing this
|
||||
// link is stored here.
|
||||
this.markedConnection_ = null;
|
||||
}],
|
||||
findCompatibleConnection_: function(block, targetConnection) {
|
||||
// Locates and returns a connection on the given block that is compatible
|
||||
// with the target connection, if one exists. Returns null if no such
|
||||
// connection exists.
|
||||
// Note: the targetConnection is assumed to be the markedConnection_, or
|
||||
// possibly its counterpart (in the case where the marked connection is
|
||||
// currently attached to another connection). This method therefore ignores
|
||||
// input connections on the given block, since one doesn't usually mark an
|
||||
// output connection and attach a block to it.
|
||||
if (!targetConnection || !targetConnection.getSourceBlock().workspace) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var desiredType = Blockly.OPPOSITE_TYPE[targetConnection.type];
|
||||
var potentialConnection = (
|
||||
desiredType == Blockly.OUTPUT_VALUE ? block.outputConnection :
|
||||
desiredType == Blockly.PREVIOUS_STATEMENT ? block.previousConnection :
|
||||
desiredType == Blockly.NEXT_STATEMENT ? block.nextConnection :
|
||||
null);
|
||||
|
||||
if (potentialConnection &&
|
||||
potentialConnection.checkType_(targetConnection)) {
|
||||
return potentialConnection;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
},
|
||||
isAnyConnectionMarked: function() {
|
||||
return Boolean(this.markedConnection_);
|
||||
},
|
||||
getMarkedConnectionSourceBlock: function() {
|
||||
return this.markedConnection_ ?
|
||||
this.markedConnection_.getSourceBlock() : null;
|
||||
},
|
||||
canBeAttachedToMarkedConnection: function(block) {
|
||||
return Boolean(
|
||||
this.findCompatibleConnection_(block, this.markedConnection_));
|
||||
},
|
||||
canBeMovedToMarkedConnection: function(block) {
|
||||
if (!this.markedConnection_) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// It should not be possible to move any ancestor of the block containing
|
||||
// the marked connection to the marked connection.
|
||||
var ancestorBlock = this.getMarkedConnectionSourceBlock();
|
||||
while (ancestorBlock) {
|
||||
if (ancestorBlock.id == block.id) {
|
||||
return false;
|
||||
}
|
||||
ancestorBlock = ancestorBlock.getParent();
|
||||
}
|
||||
|
||||
return this.canBeAttachedToMarkedConnection(block);
|
||||
},
|
||||
markConnection: function(connection) {
|
||||
this.markedConnection_ = connection;
|
||||
this.notificationsService.speak(Blockly.Msg.ADDED_LINK_MSG);
|
||||
},
|
||||
attachToMarkedConnection: function(block) {
|
||||
var xml = Blockly.Xml.blockToDom(block);
|
||||
var reconstitutedBlock = Blockly.Xml.domToBlock(blocklyApp.workspace, xml);
|
||||
|
||||
var targetConnection = null;
|
||||
if (this.markedConnection_.targetBlock() &&
|
||||
this.markedConnection_.type == Blockly.PREVIOUS_STATEMENT) {
|
||||
// Is the marked connection a 'previous' connection that is already
|
||||
// connected? If so, find the block that's currently connected to it, and
|
||||
// use that block's 'next' connection as the new marked connection.
|
||||
// Otherwise, splicing does not happen correctly, and inserting a block
|
||||
// in the middle of a group of two linked blocks will split the group.
|
||||
targetConnection = this.markedConnection_.targetConnection;
|
||||
} else {
|
||||
targetConnection = this.markedConnection_;
|
||||
}
|
||||
|
||||
var connection = this.findCompatibleConnection_(
|
||||
reconstitutedBlock, targetConnection);
|
||||
if (connection) {
|
||||
targetConnection.connect(connection);
|
||||
|
||||
this.markedConnection_ = null;
|
||||
this.audioService.playConnectSound();
|
||||
return reconstitutedBlock.id;
|
||||
} else {
|
||||
// We throw an error here, because we expect any UI controls that would
|
||||
// result in a non-connection to be disabled or hidden.
|
||||
throw Error(
|
||||
'Unable to connect block to marked connection. This should not ' +
|
||||
'happen.');
|
||||
}
|
||||
}
|
||||
});
|
||||
146
node_modules/node-blockly/blockly/accessible/block-options-modal.component.js
generated
vendored
Normal file
146
node_modules/node-blockly/blockly/accessible/block-options-modal.component.js
generated
vendored
Normal file
@@ -0,0 +1,146 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component that represents the block options modal.
|
||||
*
|
||||
* @author sll@google.com (Sean Lip)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.BlockOptionsModalComponent');
|
||||
|
||||
goog.require('blocklyApp.AudioService');
|
||||
goog.require('blocklyApp.BlockOptionsModalService');
|
||||
goog.require('blocklyApp.KeyboardInputService');
|
||||
goog.require('blocklyApp.TranslatePipe');
|
||||
|
||||
goog.require('Blockly.CommonModal');
|
||||
|
||||
|
||||
blocklyApp.BlockOptionsModalComponent = ng.core.Component({
|
||||
selector: 'blockly-block-options-modal',
|
||||
template: `
|
||||
<div *ngIf="modalIsVisible" class="blocklyModalCurtain"
|
||||
(click)="dismissModal()">
|
||||
<!-- $event.stopPropagation() prevents the modal from closing when its
|
||||
interior is clicked. -->
|
||||
<div id="blockOptionsModal" class="blocklyModal" role="alertdialog"
|
||||
(click)="$event.stopPropagation()" tabindex="-1"
|
||||
aria-labelledby="blockOptionsModalHeading">
|
||||
<h3 id="blockOptionsModalHeading">{{'BLOCK_OPTIONS'|translate}}</h3>
|
||||
<div role="document">
|
||||
<div class="blocklyModalButtonContainer"
|
||||
*ngFor="#buttonInfo of actionButtonsInfo; #buttonIndex=index">
|
||||
<button [id]="getOptionId(buttonIndex)"
|
||||
(click)="buttonInfo.action(); hideModal();"
|
||||
[ngClass]="{activeButton: activeButtonIndex == buttonIndex}">
|
||||
{{buttonInfo.translationIdForText|translate}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="blocklyModalButtonContainer">
|
||||
<button [id]="getCancelOptionId()"
|
||||
(click)="dismissModal()"
|
||||
[ngClass]="{activeButton: activeButtonIndex == actionButtonsInfo.length}">
|
||||
{{'CANCEL'|translate}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.BlockOptionsModalService, blocklyApp.KeyboardInputService,
|
||||
blocklyApp.AudioService,
|
||||
function(blockOptionsModalService_, keyboardInputService_, audioService_) {
|
||||
this.blockOptionsModalService = blockOptionsModalService_;
|
||||
this.keyboardInputService = keyboardInputService_;
|
||||
this.audioService = audioService_;
|
||||
|
||||
this.modalIsVisible = false;
|
||||
this.actionButtonsInfo = [];
|
||||
this.activeButtonIndex = -1;
|
||||
this.onDismissCallback = null;
|
||||
|
||||
var that = this;
|
||||
this.blockOptionsModalService.registerPreShowHook(
|
||||
function(newActionButtonsInfo, onDismissCallback) {
|
||||
that.modalIsVisible = true;
|
||||
that.actionButtonsInfo = newActionButtonsInfo;
|
||||
that.activeActionButtonIndex = -1;
|
||||
that.onDismissCallback = onDismissCallback;
|
||||
|
||||
Blockly.CommonModal.setupKeyboardOverrides(that);
|
||||
that.keyboardInputService.addOverride('13', function(evt) {
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
|
||||
if (that.activeButtonIndex == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
var button = document.getElementById(
|
||||
that.getOptionId(that.activeButtonIndex));
|
||||
if (that.activeButtonIndex <
|
||||
that.actionButtonsInfo.length) {
|
||||
that.actionButtonsInfo[that.activeButtonIndex].action();
|
||||
} else {
|
||||
that.dismissModal();
|
||||
}
|
||||
|
||||
that.hideModal();
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
document.getElementById('blockOptionsModal').focus();
|
||||
}, 150);
|
||||
}
|
||||
);
|
||||
}
|
||||
],
|
||||
focusOnOption: function(index) {
|
||||
var button = document.getElementById(this.getOptionId(index));
|
||||
button.focus();
|
||||
},
|
||||
// Counts the number of interactive elements for the modal.
|
||||
numInteractiveElements: function() {
|
||||
return this.actionButtonsInfo.length + 1;
|
||||
},
|
||||
// Returns the ID for the corresponding option button.
|
||||
getOptionId: function(index) {
|
||||
return 'block-options-modal-option-' + index;
|
||||
},
|
||||
// Returns the ID for the "cancel" option button.
|
||||
getCancelOptionId: function() {
|
||||
return this.getOptionId(this.actionButtonsInfo.length);
|
||||
},
|
||||
dismissModal: function() {
|
||||
this.onDismissCallback();
|
||||
this.hideModal();
|
||||
},
|
||||
// Closes the modal.
|
||||
hideModal: function() {
|
||||
this.modalIsVisible = false;
|
||||
this.keyboardInputService.clearOverride();
|
||||
this.blockOptionsModalService.hideModal();
|
||||
}
|
||||
});
|
||||
62
node_modules/node-blockly/blockly/accessible/block-options-modal.service.js
generated
vendored
Normal file
62
node_modules/node-blockly/blockly/accessible/block-options-modal.service.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service for the block options modal.
|
||||
*
|
||||
* @author sll@google.com (Sean Lip)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.BlockOptionsModalService');
|
||||
|
||||
|
||||
blocklyApp.BlockOptionsModalService = ng.core.Class({
|
||||
constructor: [function() {
|
||||
this.actionButtonsInfo = [];
|
||||
// The aim of the pre-show hook is to populate the modal component with the
|
||||
// information it needs to display the modal (e.g., which action buttons to
|
||||
// display).
|
||||
this.preShowHook = function() {
|
||||
throw Error(
|
||||
'A pre-show hook must be defined for the block options modal ' +
|
||||
'before it can be shown.');
|
||||
};
|
||||
this.modalIsShown = false;
|
||||
this.onDismissCallback = null;
|
||||
}],
|
||||
registerPreShowHook: function(preShowHook) {
|
||||
var that = this;
|
||||
this.preShowHook = function() {
|
||||
preShowHook(that.actionButtonsInfo, that.onDismissCallback);
|
||||
};
|
||||
},
|
||||
isModalShown: function() {
|
||||
return this.modalIsShown;
|
||||
},
|
||||
showModal: function(actionButtonsInfo, onDismissCallback) {
|
||||
this.actionButtonsInfo = actionButtonsInfo;
|
||||
this.onDismissCallback = onDismissCallback;
|
||||
|
||||
this.preShowHook();
|
||||
this.modalIsShown = true;
|
||||
},
|
||||
hideModal: function() {
|
||||
this.modalIsShown = false;
|
||||
}
|
||||
});
|
||||
77
node_modules/node-blockly/blockly/accessible/commonModal.js
generated
vendored
Normal file
77
node_modules/node-blockly/blockly/accessible/commonModal.js
generated
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
goog.provide('Blockly.CommonModal');
|
||||
|
||||
|
||||
Blockly.CommonModal = function() {};
|
||||
|
||||
Blockly.CommonModal.setupKeyboardOverrides = function(component) {
|
||||
component.keyboardInputService.setOverride({
|
||||
// Tab key: navigates to the previous or next item in the list.
|
||||
'9': function(evt) {
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
|
||||
if (evt.shiftKey) {
|
||||
// Move to the previous item in the list.
|
||||
if (component.activeButtonIndex <= 0) {
|
||||
component.activeActionButtonIndex = 0;
|
||||
component.audioService.playOopsSound();
|
||||
} else {
|
||||
component.activeButtonIndex--;
|
||||
}
|
||||
} else {
|
||||
// Move to the next item in the list.
|
||||
if (component.activeButtonIndex == component.numInteractiveElements(component) - 1) {
|
||||
component.audioService.playOopsSound();
|
||||
} else {
|
||||
component.activeButtonIndex++;
|
||||
}
|
||||
}
|
||||
|
||||
component.focusOnOption(component.activeButtonIndex, component);
|
||||
},
|
||||
// Escape key: closes the modal.
|
||||
'27': function() {
|
||||
component.dismissModal();
|
||||
},
|
||||
// Up key: no-op.
|
||||
'38': function(evt) {
|
||||
evt.preventDefault();
|
||||
},
|
||||
// Down key: no-op.
|
||||
'40': function(evt) {
|
||||
evt.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Blockly.CommonModal.getInteractiveElements = function(component) {
|
||||
return Array.prototype.filter.call(
|
||||
component.getInteractiveContainer().elements, function(element) {
|
||||
if (element.type === 'hidden') {
|
||||
return false;
|
||||
}
|
||||
if (element.disabled) {
|
||||
return false;
|
||||
}
|
||||
if (element.tabIndex < 0) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
};
|
||||
|
||||
Blockly.CommonModal.numInteractiveElements = function(component) {
|
||||
var elements = this.getInteractiveElements(component);
|
||||
return elements.length;
|
||||
};
|
||||
|
||||
Blockly.CommonModal.focusOnOption = function(index, component) {
|
||||
var elements = this.getInteractiveElements(component);
|
||||
var button = elements[index];
|
||||
button.focus();
|
||||
};
|
||||
|
||||
Blockly.CommonModal.hideModal = function() {
|
||||
this.modalIsVisible = false;
|
||||
this.keyboardInputService.clearOverride();
|
||||
};
|
||||
206
node_modules/node-blockly/blockly/accessible/field-segment.component.js
generated
vendored
Normal file
206
node_modules/node-blockly/blockly/accessible/field-segment.component.js
generated
vendored
Normal file
@@ -0,0 +1,206 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component that renders a "field segment" (a group
|
||||
* of non-editable Blockly.Field followed by 0 or 1 editable Blockly.Field)
|
||||
* in a block. Also handles any interactions with the field.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.FieldSegmentComponent');
|
||||
|
||||
goog.require('blocklyApp.NotificationsService');
|
||||
goog.require('blocklyApp.TranslatePipe');
|
||||
goog.require('blocklyApp.VariableModalService');
|
||||
|
||||
|
||||
blocklyApp.FieldSegmentComponent = ng.core.Component({
|
||||
selector: 'blockly-field-segment',
|
||||
template: `
|
||||
<template [ngIf]="!mainField">
|
||||
<label [id]="mainFieldId">{{getPrefixText()}}</label>
|
||||
</template>
|
||||
|
||||
<template [ngIf]="mainField">
|
||||
<template [ngIf]="isTextInput()">
|
||||
{{getPrefixText()}}
|
||||
<input [id]="mainFieldId" type="text"
|
||||
[ngModel]="mainField.getValue()" (ngModelChange)="setTextValue($event)"
|
||||
[attr.aria-label]="getFieldDescription() + '. ' + ('PRESS_ENTER_TO_EDIT_TEXT'|translate)"
|
||||
tabindex="-1">
|
||||
</template>
|
||||
|
||||
<template [ngIf]="isNumberInput()">
|
||||
{{getPrefixText()}}
|
||||
<input [id]="mainFieldId" type="number"
|
||||
[ngModel]="mainField.getValue()" (ngModelChange)="setNumberValue($event)"
|
||||
[attr.aria-label]="getFieldDescription() + '. ' + ('PRESS_ENTER_TO_EDIT_NUMBER'|translate)"
|
||||
tabindex="-1">
|
||||
</template>
|
||||
|
||||
<template [ngIf]="isDropdown()">
|
||||
{{getPrefixText()}}
|
||||
<select [id]="mainFieldId" [name]="mainFieldId"
|
||||
[ngModel]="selectedOption" (ngModelChange)="setDropdownValue($event)"
|
||||
(keydown.enter)="selectOption()"
|
||||
tabindex="-1">
|
||||
<option *ngFor="#option of dropdownOptions" value="{{option.value}}">
|
||||
{{option.text}}
|
||||
</option>
|
||||
</select>
|
||||
</template>
|
||||
</template>
|
||||
`,
|
||||
inputs: ['prefixFields', 'mainField', 'mainFieldId', 'level'],
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.NotificationsService,
|
||||
blocklyApp.VariableModalService,
|
||||
function(notificationsService, variableModalService) {
|
||||
this.notificationsService = notificationsService;
|
||||
this.variableModalService = variableModalService;
|
||||
this.dropdownOptions = [];
|
||||
this.rawOptions = [];
|
||||
}],
|
||||
// Angular2 hook - called after initialization.
|
||||
ngAfterContentInit: function() {
|
||||
if (this.mainField) {
|
||||
this.mainField.initModel();
|
||||
}
|
||||
},
|
||||
// Angular2 hook - called to check if the cached component needs an update.
|
||||
ngDoCheck: function() {
|
||||
if (this.isDropdown() && this.shouldBreakCache()) {
|
||||
this.optionValue = this.mainField.getValue();
|
||||
this.fieldValue = this.mainField.getValue();
|
||||
this.rawOptions = this.mainField.getOptions();
|
||||
this.dropdownOptions = this.rawOptions.map(function(valueAndText) {
|
||||
return {
|
||||
text: valueAndText[0],
|
||||
value: valueAndText[1]
|
||||
};
|
||||
});
|
||||
|
||||
// Set the currently selected value to the variable on the field.
|
||||
for (var i = 0; i < this.dropdownOptions.length; i++) {
|
||||
if (this.dropdownOptions[i].text === this.fieldValue) {
|
||||
this.selectedOption = this.dropdownOptions[i].value;
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
// Returns whether the mutable, cached information needs to be refreshed.
|
||||
shouldBreakCache: function() {
|
||||
var newOptions = this.mainField.getOptions();
|
||||
if (newOptions.length != this.rawOptions.length) {
|
||||
return true;
|
||||
}
|
||||
|
||||
for (var i = 0; i < this.rawOptions.length; i++) {
|
||||
// Compare the value of the cached options with the values in the field.
|
||||
if (newOptions[i][0] != this.rawOptions[i][0]) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (this.fieldValue != this.mainField.getValue()) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
},
|
||||
// Gets the prefix text, to be printed before a field.
|
||||
getPrefixText: function() {
|
||||
var prefixTexts = this.prefixFields.map(function(prefixField) {
|
||||
return prefixField.getText();
|
||||
});
|
||||
return prefixTexts.join(' ');
|
||||
},
|
||||
// Gets the description, for labeling a field.
|
||||
getFieldDescription: function() {
|
||||
var description = this.mainField.getText();
|
||||
if (this.prefixFields.length > 0) {
|
||||
description = this.getPrefixText() + ': ' + description;
|
||||
}
|
||||
return description;
|
||||
},
|
||||
// Returns true if the field is text input, false otherwise.
|
||||
isTextInput: function() {
|
||||
return this.mainField instanceof Blockly.FieldTextInput &&
|
||||
!(this.mainField instanceof Blockly.FieldNumber);
|
||||
},
|
||||
// Returns true if the field is number input, false otherwise.
|
||||
isNumberInput: function() {
|
||||
return this.mainField instanceof Blockly.FieldNumber;
|
||||
},
|
||||
// Returns true if the field is a dropdown, false otherwise.
|
||||
isDropdown: function() {
|
||||
return this.mainField instanceof Blockly.FieldDropdown;
|
||||
},
|
||||
// Sets the text value on the underlying field.
|
||||
setTextValue: function(newValue) {
|
||||
this.mainField.setValue(newValue);
|
||||
},
|
||||
// Sets the number value on the underlying field.
|
||||
setNumberValue: function(newValue) {
|
||||
// Do not permit a residual value of NaN after a backspace event.
|
||||
this.mainField.setValue(newValue || 0);
|
||||
},
|
||||
// Confirm a selection for dropdown fields.
|
||||
selectOption: function() {
|
||||
if (this.optionValue != Blockly.RENAME_VARIABLE_ID && this.optionValue !=
|
||||
Blockly.DELETE_VARIABLE_ID) {
|
||||
this.mainField.setValue(this.optionValue);
|
||||
}
|
||||
|
||||
if (this.optionValue == Blockly.RENAME_VARIABLE_ID) {
|
||||
this.variableModalService.showRenameModal_(this.mainField.getValue());
|
||||
}
|
||||
|
||||
if (this.optionValue == Blockly.DELETE_VARIABLE_ID) {
|
||||
this.variableModalService.showRemoveModal_(this.mainField.getValue());
|
||||
}
|
||||
},
|
||||
// Sets the value on a dropdown input.
|
||||
setDropdownValue: function(optionValue) {
|
||||
this.optionValue = optionValue
|
||||
if (this.optionValue == 'NO_ACTION') {
|
||||
return;
|
||||
}
|
||||
|
||||
var optionText = undefined;
|
||||
for (var i = 0; i < this.dropdownOptions.length; i++) {
|
||||
if (this.dropdownOptions[i].value == optionValue) {
|
||||
optionText = this.dropdownOptions[i].text;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (!optionText) {
|
||||
throw Error(
|
||||
'There is no option text corresponding to the value: ' +
|
||||
this.optionValue);
|
||||
}
|
||||
|
||||
this.notificationsService.speak('Selected option ' + optionText);
|
||||
}
|
||||
});
|
||||
58
node_modules/node-blockly/blockly/accessible/keyboard-input.service.js
generated
vendored
Normal file
58
node_modules/node-blockly/blockly/accessible/keyboard-input.service.js
generated
vendored
Normal file
@@ -0,0 +1,58 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service for handling keyboard input.
|
||||
*
|
||||
* @author sll@google.com (Sean Lip)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.KeyboardInputService');
|
||||
|
||||
|
||||
blocklyApp.KeyboardInputService = ng.core.Class({
|
||||
constructor: [function() {
|
||||
// Default custom actions for global keystrokes. The keys of this object
|
||||
// are string representations of the key codes.
|
||||
this.keysToActions = {};
|
||||
// Override for the default keysToActions mapping (e.g. in a modal
|
||||
// context).
|
||||
this.keysToActionsOverride = null;
|
||||
|
||||
// Attach a keydown handler to the entire window.
|
||||
var that = this;
|
||||
document.addEventListener('keydown', function(evt) {
|
||||
var stringifiedKeycode = String(evt.keyCode);
|
||||
var actionsObject = that.keysToActionsOverride || that.keysToActions;
|
||||
|
||||
if (actionsObject.hasOwnProperty(stringifiedKeycode)) {
|
||||
actionsObject[stringifiedKeycode](evt);
|
||||
}
|
||||
});
|
||||
}],
|
||||
setOverride: function(newKeysToActions) {
|
||||
this.keysToActionsOverride = newKeysToActions;
|
||||
},
|
||||
addOverride: function(keyCode, action) {
|
||||
this.keysToActionsOverride[keyCode] = action;
|
||||
},
|
||||
clearOverride: function() {
|
||||
this.keysToActionsOverride = null;
|
||||
}
|
||||
});
|
||||
15
node_modules/node-blockly/blockly/accessible/libs/README
generated
vendored
Normal file
15
node_modules/node-blockly/blockly/accessible/libs/README
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
This folder contains the following dependencies for accessible Blockly:
|
||||
|
||||
* Angular2 (angular2-all.umd.min.js, angular2-polyfills.min.js)
|
||||
* RxJava (Rx.umd.min)
|
||||
|
||||
Used for data binding between the core Blockly workspace and accessible Blockly.
|
||||
RxJava is required by Angular2.
|
||||
Fetched from https://code.angularjs.org/
|
||||
The current version is 2.0.0-beta.16.
|
||||
|
||||
* ES6 Shim
|
||||
|
||||
Required by Angular2, for Javascript files.
|
||||
Fetched from https://github.com/paulmillr/es6-shim
|
||||
The current version is 0.35.1.
|
||||
748
node_modules/node-blockly/blockly/accessible/libs/Rx.umd.min.js
generated
vendored
Normal file
748
node_modules/node-blockly/blockly/accessible/libs/Rx.umd.min.js
generated
vendored
Normal file
@@ -0,0 +1,748 @@
|
||||
/**
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2015-2016 Netflix, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
**/
|
||||
/**
|
||||
@license
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2015-2016 Netflix, Inc.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
**/
|
||||
(function(w){"object"===typeof exports&&"undefined"!==typeof module?module.exports=w():"function"===typeof define&&define.amd?define([],w):("undefined"!==typeof window?window:"undefined"!==typeof global?global:"undefined"!==typeof self?self:this).Rx=w()})(function(){return function a(b,f,g){function k(e,d){if(!f[e]){if(!b[e]){var c="function"==typeof require&&require;if(!d&&c)return c(e,!0);if(l)return l(e,!0);c=Error("Cannot find module '"+e+"'");throw c.code="MODULE_NOT_FOUND",c;}c=f[e]={exports:{}};
|
||||
b[e][0].call(c.exports,function(a){var c=b[e][1][a];return k(c?c:a)},c,c.exports,a,b,f,g)}return f[e].exports}for(var l="function"==typeof require&&require,h=0;h<g.length;h++)k(g[h]);return k}({1:[function(a,b,f){var g=this&&this.__extends||function(a,b){function h(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(h.prototype=b.prototype,new h)};a=function(a){function b(h,e,d){a.call(this);this.parent=h;this.outerValue=e;this.outerIndex=d;
|
||||
this.index=0}g(b,a);b.prototype._next=function(a){this.parent.notifyNext(this.outerValue,a,this.outerIndex,this.index++,this)};b.prototype._error=function(a){this.parent.notifyError(a,this);this.unsubscribe()};b.prototype._complete=function(){this.parent.notifyComplete(this);this.unsubscribe()};return b}(a("./Subscriber").Subscriber);f.InnerSubscriber=a},{"./Subscriber":9}],2:[function(a,b,f){var g=a("./Observable");a=function(){function a(b,h,e){this.kind=b;this.value=h;this.exception=e;this.hasValue=
|
||||
"N"===b}a.prototype.observe=function(a){switch(this.kind){case "N":return a.next&&a.next(this.value);case "E":return a.error&&a.error(this.exception);case "C":return a.complete&&a.complete()}};a.prototype["do"]=function(a,b,e){switch(this.kind){case "N":return a&&a(this.value);case "E":return b&&b(this.exception);case "C":return e&&e()}};a.prototype.accept=function(a,b,e){return a&&"function"===typeof a.next?this.observe(a):this["do"](a,b,e)};a.prototype.toObservable=function(){switch(this.kind){case "N":return g.Observable.of(this.value);
|
||||
case "E":return g.Observable["throw"](this.exception);case "C":return g.Observable.empty()}};a.createNext=function(b){return"undefined"!==typeof b?new a("N",b):this.undefinedValueNotification};a.createError=function(b){return new a("E",void 0,b)};a.createComplete=function(){return this.completeNotification};a.completeNotification=new a("C");a.undefinedValueNotification=new a("N",void 0);return a}();f.Notification=a},{"./Observable":3}],3:[function(a,b,f){var g=a("./util/root"),k=a("./util/SymbolShim"),
|
||||
l=a("./util/toSubscriber"),h=a("./util/tryCatch"),e=a("./util/errorObject");a=function(){function a(c){this._isScalar=!1;c&&(this._subscribe=c)}a.prototype.lift=function(c){var m=new a;m.source=this;m.operator=c;return m};a.prototype.subscribe=function(a,d,e){var b=this.operator;a=l.toSubscriber(a,d,e);b?a.add(this._subscribe(b.call(a))):a.add(this._subscribe(a));if(a.syncErrorThrowable&&(a.syncErrorThrowable=!1,a.syncErrorThrown))throw a.syncErrorValue;return a};a.prototype.forEach=function(a,d,
|
||||
n){n||(g.root.Rx&&g.root.Rx.config&&g.root.Rx.config.Promise?n=g.root.Rx.config.Promise:g.root.Promise&&(n=g.root.Promise));if(!n)throw Error("no Promise impl found");var b=this;return new n(function(n,l){b.subscribe(function(n){h.tryCatch(a).call(d,n)===e.errorObject&&l(e.errorObject.e)},l,n)})};a.prototype._subscribe=function(a){return this.source.subscribe(a)};a.prototype[k.SymbolShim.observable]=function(){return this};a.create=function(c){return new a(c)};return a}();f.Observable=a},{"./util/SymbolShim":238,
|
||||
"./util/errorObject":239,"./util/root":249,"./util/toSubscriber":252,"./util/tryCatch":253}],4:[function(a,b,f){f.empty={isUnsubscribed:!0,next:function(a){},error:function(a){throw a;},complete:function(){}}},{}],5:[function(a,b,f){var g=a("./Subscriber");a=function(){function a(){}a.prototype.call=function(a){return new g.Subscriber(a)};return a}();f.Operator=a},{"./Subscriber":9}],6:[function(a,b,f){var g=this&&this.__extends||function(a,b){function h(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&
|
||||
(a[e]=b[e]);a.prototype=null===b?Object.create(b):(h.prototype=b.prototype,new h)};a=function(a){function b(){a.apply(this,arguments)}g(b,a);b.prototype.notifyNext=function(a,e,d,c,m){this.destination.next(e)};b.prototype.notifyError=function(a,e){this.destination.error(a)};b.prototype.notifyComplete=function(a){this.destination.complete()};return b}(a("./Subscriber").Subscriber);f.OuterSubscriber=a},{"./Subscriber":9}],7:[function(a,b,f){b=a("./Subject");f.Subject=b.Subject;b=a("./Observable");f.Observable=
|
||||
b.Observable;a("./add/observable/combineLatest");a("./add/observable/concat");a("./add/observable/merge");a("./add/observable/race");a("./add/observable/bindCallback");a("./add/observable/bindNodeCallback");a("./add/observable/defer");a("./add/observable/empty");a("./add/observable/forkJoin");a("./add/observable/from");a("./add/observable/fromArray");a("./add/observable/fromEvent");a("./add/observable/fromEventPattern");a("./add/observable/fromPromise");a("./add/observable/interval");a("./add/observable/never");
|
||||
a("./add/observable/range");a("./add/observable/throw");a("./add/observable/timer");a("./add/observable/zip");a("./add/operator/buffer");a("./add/operator/bufferCount");a("./add/operator/bufferTime");a("./add/operator/bufferToggle");a("./add/operator/bufferWhen");a("./add/operator/cache");a("./add/operator/catch");a("./add/operator/combineAll");a("./add/operator/combineLatest");a("./add/operator/concat");a("./add/operator/concatAll");a("./add/operator/concatMap");a("./add/operator/concatMapTo");a("./add/operator/count");
|
||||
a("./add/operator/dematerialize");a("./add/operator/debounce");a("./add/operator/debounceTime");a("./add/operator/defaultIfEmpty");a("./add/operator/delay");a("./add/operator/delayWhen");a("./add/operator/distinctUntilChanged");a("./add/operator/do");a("./add/operator/expand");a("./add/operator/filter");a("./add/operator/finally");a("./add/operator/first");a("./add/operator/groupBy");a("./add/operator/ignoreElements");a("./add/operator/inspect");a("./add/operator/inspectTime");a("./add/operator/every");
|
||||
a("./add/operator/last");a("./add/operator/let");a("./add/operator/map");a("./add/operator/mapTo");a("./add/operator/materialize");a("./add/operator/merge");a("./add/operator/mergeAll");a("./add/operator/mergeMap");a("./add/operator/mergeMapTo");a("./add/operator/multicast");a("./add/operator/observeOn");a("./add/operator/partition");a("./add/operator/pluck");a("./add/operator/publish");a("./add/operator/publishBehavior");a("./add/operator/publishReplay");a("./add/operator/publishLast");a("./add/operator/race");
|
||||
a("./add/operator/reduce");a("./add/operator/repeat");a("./add/operator/retry");a("./add/operator/retryWhen");a("./add/operator/sample");a("./add/operator/sampleTime");a("./add/operator/scan");a("./add/operator/share");a("./add/operator/single");a("./add/operator/skip");a("./add/operator/skipUntil");a("./add/operator/skipWhile");a("./add/operator/startWith");a("./add/operator/subscribeOn");a("./add/operator/switch");a("./add/operator/switchMap");a("./add/operator/switchMapTo");a("./add/operator/take");
|
||||
a("./add/operator/takeLast");a("./add/operator/takeUntil");a("./add/operator/takeWhile");a("./add/operator/throttle");a("./add/operator/throttleTime");a("./add/operator/timeout");a("./add/operator/timeoutWith");a("./add/operator/toArray");a("./add/operator/toPromise");a("./add/operator/window");a("./add/operator/windowCount");a("./add/operator/windowTime");a("./add/operator/windowToggle");a("./add/operator/windowWhen");a("./add/operator/withLatestFrom");a("./add/operator/zip");a("./add/operator/zipAll");
|
||||
b=a("./Operator");f.Operator=b.Operator;b=a("./Subscription");f.Subscription=b.Subscription;f.UnsubscriptionError=b.UnsubscriptionError;b=a("./Subscriber");f.Subscriber=b.Subscriber;b=a("./subject/AsyncSubject");f.AsyncSubject=b.AsyncSubject;b=a("./subject/ReplaySubject");f.ReplaySubject=b.ReplaySubject;b=a("./subject/BehaviorSubject");f.BehaviorSubject=b.BehaviorSubject;b=a("./observable/ConnectableObservable");f.ConnectableObservable=b.ConnectableObservable;b=a("./Notification");f.Notification=
|
||||
b.Notification;b=a("./util/EmptyError");f.EmptyError=b.EmptyError;b=a("./util/ArgumentOutOfRangeError");f.ArgumentOutOfRangeError=b.ArgumentOutOfRangeError;b=a("./util/ObjectUnsubscribedError");f.ObjectUnsubscribedError=b.ObjectUnsubscribedError;b=a("./scheduler/asap");var g=a("./scheduler/queue");a=a("./symbol/rxSubscriber");f.Scheduler={asap:b.asap,queue:g.queue};f.Symbol={rxSubscriber:a.rxSubscriber}},{"./Notification":2,"./Observable":3,"./Operator":5,"./Subject":8,"./Subscriber":9,"./Subscription":10,
|
||||
"./add/observable/bindCallback":11,"./add/observable/bindNodeCallback":12,"./add/observable/combineLatest":13,"./add/observable/concat":14,"./add/observable/defer":15,"./add/observable/empty":16,"./add/observable/forkJoin":17,"./add/observable/from":18,"./add/observable/fromArray":19,"./add/observable/fromEvent":20,"./add/observable/fromEventPattern":21,"./add/observable/fromPromise":22,"./add/observable/interval":23,"./add/observable/merge":24,"./add/observable/never":25,"./add/observable/race":26,
|
||||
"./add/observable/range":27,"./add/observable/throw":28,"./add/observable/timer":29,"./add/observable/zip":30,"./add/operator/buffer":31,"./add/operator/bufferCount":32,"./add/operator/bufferTime":33,"./add/operator/bufferToggle":34,"./add/operator/bufferWhen":35,"./add/operator/cache":36,"./add/operator/catch":37,"./add/operator/combineAll":38,"./add/operator/combineLatest":39,"./add/operator/concat":40,"./add/operator/concatAll":41,"./add/operator/concatMap":42,"./add/operator/concatMapTo":43,"./add/operator/count":44,
|
||||
"./add/operator/debounce":45,"./add/operator/debounceTime":46,"./add/operator/defaultIfEmpty":47,"./add/operator/delay":48,"./add/operator/delayWhen":49,"./add/operator/dematerialize":50,"./add/operator/distinctUntilChanged":51,"./add/operator/do":52,"./add/operator/every":53,"./add/operator/expand":54,"./add/operator/filter":55,"./add/operator/finally":56,"./add/operator/first":57,"./add/operator/groupBy":58,"./add/operator/ignoreElements":59,"./add/operator/inspect":60,"./add/operator/inspectTime":61,
|
||||
"./add/operator/last":62,"./add/operator/let":63,"./add/operator/map":64,"./add/operator/mapTo":65,"./add/operator/materialize":66,"./add/operator/merge":67,"./add/operator/mergeAll":68,"./add/operator/mergeMap":69,"./add/operator/mergeMapTo":70,"./add/operator/multicast":71,"./add/operator/observeOn":72,"./add/operator/partition":73,"./add/operator/pluck":74,"./add/operator/publish":75,"./add/operator/publishBehavior":76,"./add/operator/publishLast":77,"./add/operator/publishReplay":78,"./add/operator/race":79,
|
||||
"./add/operator/reduce":80,"./add/operator/repeat":81,"./add/operator/retry":82,"./add/operator/retryWhen":83,"./add/operator/sample":84,"./add/operator/sampleTime":85,"./add/operator/scan":86,"./add/operator/share":87,"./add/operator/single":88,"./add/operator/skip":89,"./add/operator/skipUntil":90,"./add/operator/skipWhile":91,"./add/operator/startWith":92,"./add/operator/subscribeOn":93,"./add/operator/switch":94,"./add/operator/switchMap":95,"./add/operator/switchMapTo":96,"./add/operator/take":97,
|
||||
"./add/operator/takeLast":98,"./add/operator/takeUntil":99,"./add/operator/takeWhile":100,"./add/operator/throttle":101,"./add/operator/throttleTime":102,"./add/operator/timeout":103,"./add/operator/timeoutWith":104,"./add/operator/toArray":105,"./add/operator/toPromise":106,"./add/operator/window":107,"./add/operator/windowCount":108,"./add/operator/windowTime":109,"./add/operator/windowToggle":110,"./add/operator/windowWhen":111,"./add/operator/withLatestFrom":112,"./add/operator/zip":113,"./add/operator/zipAll":114,
|
||||
"./observable/ConnectableObservable":119,"./scheduler/asap":224,"./scheduler/queue":225,"./subject/AsyncSubject":226,"./subject/BehaviorSubject":227,"./subject/ReplaySubject":228,"./symbol/rxSubscriber":230,"./util/ArgumentOutOfRangeError":231,"./util/EmptyError":232,"./util/ObjectUnsubscribedError":237}],8:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var m in c)c.hasOwnProperty(m)&&(a[m]=c[m]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,
|
||||
new d)};b=a("./Observable");var k=a("./Subscriber"),l=a("./Subscription"),h=a("./subject/SubjectSubscription"),e=a("./symbol/rxSubscriber"),d=a("./util/throwError"),c=a("./util/ObjectUnsubscribedError");a=function(a){function b(c,d){a.call(this);this.destination=c;this.source=d;this.observers=[];this.hasCompleted=this.dispatching=this.hasErrored=this.isStopped=this.isUnsubscribed=!1}g(b,a);b.prototype.lift=function(a){var c=new b(this.destination||this,this);c.operator=a;return c};b.prototype.add=
|
||||
function(a){l.Subscription.prototype.add.call(this,a)};b.prototype.remove=function(a){l.Subscription.prototype.remove.call(this,a)};b.prototype.unsubscribe=function(){l.Subscription.prototype.unsubscribe.call(this)};b.prototype._subscribe=function(a){if(this.source)return this.source.subscribe(a);if(!a.isUnsubscribed){if(this.hasErrored)return a.error(this.errorValue);if(this.hasCompleted)return a.complete();this.throwIfUnsubscribed();var c=new h.SubjectSubscription(this,a);this.observers.push(a);
|
||||
return c}};b.prototype._unsubscribe=function(){this.source=null;this.isStopped=!0;this.destination=this.observers=null};b.prototype.next=function(a){this.throwIfUnsubscribed();this.isStopped||(this.dispatching=!0,this._next(a),this.dispatching=!1,this.hasErrored?this._error(this.errorValue):this.hasCompleted&&this._complete())};b.prototype.error=function(a){this.throwIfUnsubscribed();this.isStopped||(this.hasErrored=this.isStopped=!0,this.errorValue=a,this.dispatching||this._error(a))};b.prototype.complete=
|
||||
function(){this.throwIfUnsubscribed();this.isStopped||(this.hasCompleted=this.isStopped=!0,this.dispatching||this._complete())};b.prototype.asObservable=function(){return new m(this)};b.prototype._next=function(a){this.destination?this.destination.next(a):this._finalNext(a)};b.prototype._finalNext=function(a){for(var c=-1,d=this.observers.slice(0),m=d.length;++c<m;)d[c].next(a)};b.prototype._error=function(a){this.destination?this.destination.error(a):this._finalError(a)};b.prototype._finalError=
|
||||
function(a){var c=-1,d=this.observers;this.observers=null;this.isUnsubscribed=!0;if(d)for(var m=d.length;++c<m;)d[c].error(a);this.isUnsubscribed=!1;this.unsubscribe()};b.prototype._complete=function(){this.destination?this.destination.complete():this._finalComplete()};b.prototype._finalComplete=function(){var a=-1,c=this.observers;this.observers=null;this.isUnsubscribed=!0;if(c)for(var d=c.length;++a<d;)c[a].complete();this.isUnsubscribed=!1;this.unsubscribe()};b.prototype.throwIfUnsubscribed=function(){this.isUnsubscribed&&
|
||||
d.throwError(new c.ObjectUnsubscribedError)};b.prototype[e.rxSubscriber]=function(){return new k.Subscriber(this)};b.create=function(a,c){return new b(a,c)};return b}(b.Observable);f.Subject=a;var m=function(a){function c(d){a.call(this);this.source=d}g(c,a);return c}(b.Observable)},{"./Observable":3,"./Subscriber":9,"./Subscription":10,"./subject/SubjectSubscription":229,"./symbol/rxSubscriber":230,"./util/ObjectUnsubscribedError":237,"./util/throwError":251}],9:[function(a,b,f){var g=this&&this.__extends||
|
||||
function(a,c){function m(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(m.prototype=c.prototype,new m)},k=a("./util/isFunction");b=a("./Subscription");var l=a("./symbol/rxSubscriber"),h=a("./Observer");a=function(a){function c(m,n,b){a.call(this);this.syncErrorValue=null;this.isStopped=this.syncErrorThrowable=this.syncErrorThrown=!1;switch(arguments.length){case 0:this.destination=h.empty;break;case 1:if(!m){this.destination=h.empty;break}if("object"===
|
||||
typeof m){m instanceof c?this.destination=m:(this.syncErrorThrowable=!0,this.destination=new e(this,m));break}default:this.syncErrorThrowable=!0,this.destination=new e(this,m,n,b)}}g(c,a);c.create=function(a,d,e){a=new c(a,d,e);a.syncErrorThrowable=!1;return a};c.prototype.next=function(a){this.isStopped||this._next(a)};c.prototype.error=function(a){this.isStopped||(this.isStopped=!0,this._error(a))};c.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())};c.prototype.unsubscribe=
|
||||
function(){this.isUnsubscribed||(this.isStopped=!0,a.prototype.unsubscribe.call(this))};c.prototype._next=function(a){this.destination.next(a)};c.prototype._error=function(a){this.destination.error(a);this.unsubscribe()};c.prototype._complete=function(){this.destination.complete();this.unsubscribe()};c.prototype[l.rxSubscriber]=function(){return this};return c}(b.Subscription);f.Subscriber=a;var e=function(a){function c(c,e,b,h){a.call(this);this._parent=c;var f;c=this;k.isFunction(e)?f=e:e&&(c=e,
|
||||
f=e.next,b=e.error,h=e.complete);this._context=c;this._next=f;this._error=b;this._complete=h}g(c,a);c.prototype.next=function(a){if(!this.isStopped&&this._next){var c=this._parent;c.syncErrorThrowable?this.__tryOrSetError(c,this._next,a)&&this.unsubscribe():this.__tryOrUnsub(this._next,a)}};c.prototype.error=function(a){if(!this.isStopped){var c=this._parent;if(this._error)c.syncErrorThrowable?this.__tryOrSetError(c,this._error,a):this.__tryOrUnsub(this._error,a),this.unsubscribe();else if(c.syncErrorThrowable)c.syncErrorValue=
|
||||
a,c.syncErrorThrown=!0,this.unsubscribe();else throw this.unsubscribe(),a;}};c.prototype.complete=function(){if(!this.isStopped){var a=this._parent;this._complete&&(a.syncErrorThrowable?this.__tryOrSetError(a,this._complete):this.__tryOrUnsub(this._complete));this.unsubscribe()}};c.prototype.__tryOrUnsub=function(a,c){try{a.call(this._context,c)}catch(d){throw this.unsubscribe(),d;}};c.prototype.__tryOrSetError=function(a,c,d){try{c.call(this._context,d)}catch(e){return a.syncErrorValue=e,a.syncErrorThrown=
|
||||
!0}return!1};c.prototype._unsubscribe=function(){var a=this._parent;this._parent=this._context=null;a.unsubscribe()};return c}(a)},{"./Observer":4,"./Subscription":10,"./symbol/rxSubscriber":230,"./util/isFunction":242}],10:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("./util/isArray"),l=a("./util/isObject"),h=a("./util/isFunction"),
|
||||
e=a("./util/tryCatch"),d=a("./util/errorObject");a=function(){function a(c){this.isUnsubscribed=!1;c&&(this._unsubscribe=c)}a.prototype.unsubscribe=function(){var a=!1,m;if(!this.isUnsubscribed){this.isUnsubscribed=!0;var b=this._unsubscribe,f=this._subscriptions;this._subscriptions=null;if(h.isFunction(b)){var g=e.tryCatch(b).call(this);g===d.errorObject&&(a=!0,(m=m||[]).push(d.errorObject.e))}if(k.isArray(f))for(var b=-1,r=f.length;++b<r;)g=f[b],l.isObject(g)&&(g=e.tryCatch(g.unsubscribe).call(g),
|
||||
g===d.errorObject&&(a=!0,m=m||[],g=d.errorObject.e,g instanceof c?m=m.concat(g.errors):m.push(g)));if(a)throw new c(m);}};a.prototype.add=function(c){if(c&&c!==this&&c!==a.EMPTY){var d=c;switch(typeof c){case "function":d=new a(c);case "object":d.isUnsubscribed||"function"!==typeof d.unsubscribe||(this.isUnsubscribed?d.unsubscribe():(this._subscriptions||(this._subscriptions=[])).push(d));break;default:throw Error("Unrecognized subscription "+c+" added to Subscription.");}}};a.prototype.remove=function(c){if(null!=
|
||||
c&&c!==this&&c!==a.EMPTY){var d=this._subscriptions;d&&(c=d.indexOf(c),-1!==c&&d.splice(c,1))}};a.EMPTY=function(a){a.isUnsubscribed=!0;return a}(new a);return a}();f.Subscription=a;var c=function(a){function c(d){a.call(this,"unsubscriptoin error(s)");this.errors=d;this.name="UnsubscriptionError"}g(c,a);return c}(Error);f.UnsubscriptionError=c},{"./util/errorObject":239,"./util/isArray":240,"./util/isFunction":242,"./util/isObject":244,"./util/tryCatch":253}],11:[function(a,b,f){b=a("../../Observable");
|
||||
a=a("../../observable/BoundCallbackObservable");b.Observable.bindCallback=a.BoundCallbackObservable.create},{"../../Observable":3,"../../observable/BoundCallbackObservable":117}],12:[function(a,b,f){b=a("../../Observable");a=a("../../observable/BoundNodeCallbackObservable");b.Observable.bindNodeCallback=a.BoundNodeCallbackObservable.create},{"../../Observable":3,"../../observable/BoundNodeCallbackObservable":118}],13:[function(a,b,f){b=a("../../Observable");a=a("../../operator/combineLatest");b.Observable.combineLatest=
|
||||
a.combineLatestStatic},{"../../Observable":3,"../../operator/combineLatest":143}],14:[function(a,b,f){b=a("../../Observable");a=a("../../operator/concat");b.Observable.concat=a.concatStatic},{"../../Observable":3,"../../operator/concat":144}],15:[function(a,b,f){b=a("../../Observable");a=a("../../observable/DeferObservable");b.Observable.defer=a.DeferObservable.create},{"../../Observable":3,"../../observable/DeferObservable":120}],16:[function(a,b,f){b=a("../../Observable");a=a("../../observable/EmptyObservable");
|
||||
b.Observable.empty=a.EmptyObservable.create},{"../../Observable":3,"../../observable/EmptyObservable":121}],17:[function(a,b,f){b=a("../../Observable");a=a("../../observable/ForkJoinObservable");b.Observable.forkJoin=a.ForkJoinObservable.create},{"../../Observable":3,"../../observable/ForkJoinObservable":123}],18:[function(a,b,f){b=a("../../Observable");a=a("../../observable/FromObservable");b.Observable.from=a.FromObservable.create},{"../../Observable":3,"../../observable/FromObservable":126}],19:[function(a,
|
||||
b,f){b=a("../../Observable");a=a("../../observable/ArrayObservable");b.Observable.fromArray=a.ArrayObservable.create;b.Observable.of=a.ArrayObservable.of},{"../../Observable":3,"../../observable/ArrayObservable":116}],20:[function(a,b,f){b=a("../../Observable");a=a("../../observable/FromEventObservable");b.Observable.fromEvent=a.FromEventObservable.create},{"../../Observable":3,"../../observable/FromEventObservable":124}],21:[function(a,b,f){b=a("../../Observable");a=a("../../observable/FromEventPatternObservable");
|
||||
b.Observable.fromEventPattern=a.FromEventPatternObservable.create},{"../../Observable":3,"../../observable/FromEventPatternObservable":125}],22:[function(a,b,f){b=a("../../Observable");a=a("../../observable/PromiseObservable");b.Observable.fromPromise=a.PromiseObservable.create},{"../../Observable":3,"../../observable/PromiseObservable":130}],23:[function(a,b,f){b=a("../../Observable");a=a("../../observable/IntervalObservable");b.Observable.interval=a.IntervalObservable.create},{"../../Observable":3,
|
||||
"../../observable/IntervalObservable":127}],24:[function(a,b,f){b=a("../../Observable");a=a("../../operator/merge");b.Observable.merge=a.mergeStatic},{"../../Observable":3,"../../operator/merge":171}],25:[function(a,b,f){b=a("../../Observable");a=a("../../observable/NeverObservable");b.Observable.never=a.NeverObservable.create},{"../../Observable":3,"../../observable/NeverObservable":129}],26:[function(a,b,f){b=a("../../Observable");a=a("../../operator/race");b.Observable.race=a.raceStatic},{"../../Observable":3,
|
||||
"../../operator/race":183}],27:[function(a,b,f){b=a("../../Observable");a=a("../../observable/RangeObservable");b.Observable.range=a.RangeObservable.create},{"../../Observable":3,"../../observable/RangeObservable":131}],28:[function(a,b,f){b=a("../../Observable");a=a("../../observable/ErrorObservable");b.Observable["throw"]=a.ErrorObservable.create},{"../../Observable":3,"../../observable/ErrorObservable":122}],29:[function(a,b,f){b=a("../../Observable");a=a("../../observable/TimerObservable");b.Observable.timer=
|
||||
a.TimerObservable.create},{"../../Observable":3,"../../observable/TimerObservable":134}],30:[function(a,b,f){b=a("../../Observable");a=a("../../operator/zip");b.Observable.zip=a.zipStatic},{"../../Observable":3,"../../operator/zip":217}],31:[function(a,b,f){b=a("../../Observable");a=a("../../operator/buffer");b.Observable.prototype.buffer=a.buffer},{"../../Observable":3,"../../operator/buffer":135}],32:[function(a,b,f){b=a("../../Observable");a=a("../../operator/bufferCount");b.Observable.prototype.bufferCount=
|
||||
a.bufferCount},{"../../Observable":3,"../../operator/bufferCount":136}],33:[function(a,b,f){b=a("../../Observable");a=a("../../operator/bufferTime");b.Observable.prototype.bufferTime=a.bufferTime},{"../../Observable":3,"../../operator/bufferTime":137}],34:[function(a,b,f){b=a("../../Observable");a=a("../../operator/bufferToggle");b.Observable.prototype.bufferToggle=a.bufferToggle},{"../../Observable":3,"../../operator/bufferToggle":138}],35:[function(a,b,f){b=a("../../Observable");a=a("../../operator/bufferWhen");
|
||||
b.Observable.prototype.bufferWhen=a.bufferWhen},{"../../Observable":3,"../../operator/bufferWhen":139}],36:[function(a,b,f){b=a("../../Observable");a=a("../../operator/cache");b.Observable.prototype.cache=a.cache},{"../../Observable":3,"../../operator/cache":140}],37:[function(a,b,f){b=a("../../Observable");a=a("../../operator/catch");b.Observable.prototype["catch"]=a._catch},{"../../Observable":3,"../../operator/catch":141}],38:[function(a,b,f){b=a("../../Observable");a=a("../../operator/combineAll");
|
||||
b.Observable.prototype.combineAll=a.combineAll},{"../../Observable":3,"../../operator/combineAll":142}],39:[function(a,b,f){b=a("../../Observable");a=a("../../operator/combineLatest");b.Observable.prototype.combineLatest=a.combineLatest},{"../../Observable":3,"../../operator/combineLatest":143}],40:[function(a,b,f){b=a("../../Observable");a=a("../../operator/concat");b.Observable.prototype.concat=a.concat},{"../../Observable":3,"../../operator/concat":144}],41:[function(a,b,f){b=a("../../Observable");
|
||||
a=a("../../operator/concatAll");b.Observable.prototype.concatAll=a.concatAll},{"../../Observable":3,"../../operator/concatAll":145}],42:[function(a,b,f){b=a("../../Observable");a=a("../../operator/concatMap");b.Observable.prototype.concatMap=a.concatMap},{"../../Observable":3,"../../operator/concatMap":146}],43:[function(a,b,f){b=a("../../Observable");a=a("../../operator/concatMapTo");b.Observable.prototype.concatMapTo=a.concatMapTo},{"../../Observable":3,"../../operator/concatMapTo":147}],44:[function(a,
|
||||
b,f){b=a("../../Observable");a=a("../../operator/count");b.Observable.prototype.count=a.count},{"../../Observable":3,"../../operator/count":148}],45:[function(a,b,f){b=a("../../Observable");a=a("../../operator/debounce");b.Observable.prototype.debounce=a.debounce},{"../../Observable":3,"../../operator/debounce":149}],46:[function(a,b,f){b=a("../../Observable");a=a("../../operator/debounceTime");b.Observable.prototype.debounceTime=a.debounceTime},{"../../Observable":3,"../../operator/debounceTime":150}],
|
||||
47:[function(a,b,f){b=a("../../Observable");a=a("../../operator/defaultIfEmpty");b.Observable.prototype.defaultIfEmpty=a.defaultIfEmpty},{"../../Observable":3,"../../operator/defaultIfEmpty":151}],48:[function(a,b,f){b=a("../../Observable");a=a("../../operator/delay");b.Observable.prototype.delay=a.delay},{"../../Observable":3,"../../operator/delay":152}],49:[function(a,b,f){b=a("../../Observable");a=a("../../operator/delayWhen");b.Observable.prototype.delayWhen=a.delayWhen},{"../../Observable":3,
|
||||
"../../operator/delayWhen":153}],50:[function(a,b,f){b=a("../../Observable");a=a("../../operator/dematerialize");b.Observable.prototype.dematerialize=a.dematerialize},{"../../Observable":3,"../../operator/dematerialize":154}],51:[function(a,b,f){b=a("../../Observable");a=a("../../operator/distinctUntilChanged");b.Observable.prototype.distinctUntilChanged=a.distinctUntilChanged},{"../../Observable":3,"../../operator/distinctUntilChanged":155}],52:[function(a,b,f){b=a("../../Observable");a=a("../../operator/do");
|
||||
b.Observable.prototype["do"]=a._do},{"../../Observable":3,"../../operator/do":156}],53:[function(a,b,f){b=a("../../Observable");a=a("../../operator/every");b.Observable.prototype.every=a.every},{"../../Observable":3,"../../operator/every":157}],54:[function(a,b,f){b=a("../../Observable");a=a("../../operator/expand");b.Observable.prototype.expand=a.expand},{"../../Observable":3,"../../operator/expand":158}],55:[function(a,b,f){b=a("../../Observable");a=a("../../operator/filter");b.Observable.prototype.filter=
|
||||
a.filter},{"../../Observable":3,"../../operator/filter":159}],56:[function(a,b,f){b=a("../../Observable");a=a("../../operator/finally");b.Observable.prototype["finally"]=a._finally},{"../../Observable":3,"../../operator/finally":160}],57:[function(a,b,f){b=a("../../Observable");a=a("../../operator/first");b.Observable.prototype.first=a.first},{"../../Observable":3,"../../operator/first":161}],58:[function(a,b,f){b=a("../../Observable");a=a("../../operator/groupBy");b.Observable.prototype.groupBy=
|
||||
a.groupBy},{"../../Observable":3,"../../operator/groupBy":162}],59:[function(a,b,f){b=a("../../Observable");a=a("../../operator/ignoreElements");b.Observable.prototype.ignoreElements=a.ignoreElements},{"../../Observable":3,"../../operator/ignoreElements":163}],60:[function(a,b,f){b=a("../../Observable");a=a("../../operator/inspect");b.Observable.prototype.inspect=a.inspect},{"../../Observable":3,"../../operator/inspect":164}],61:[function(a,b,f){b=a("../../Observable");a=a("../../operator/inspectTime");
|
||||
b.Observable.prototype.inspectTime=a.inspectTime},{"../../Observable":3,"../../operator/inspectTime":165}],62:[function(a,b,f){b=a("../../Observable");a=a("../../operator/last");b.Observable.prototype.last=a.last},{"../../Observable":3,"../../operator/last":166}],63:[function(a,b,f){b=a("../../Observable");a=a("../../operator/let");b.Observable.prototype.let=a.letProto;b.Observable.prototype.letBind=a.letProto},{"../../Observable":3,"../../operator/let":167}],64:[function(a,b,f){b=a("../../Observable");
|
||||
a=a("../../operator/map");b.Observable.prototype.map=a.map},{"../../Observable":3,"../../operator/map":168}],65:[function(a,b,f){b=a("../../Observable");a=a("../../operator/mapTo");b.Observable.prototype.mapTo=a.mapTo},{"../../Observable":3,"../../operator/mapTo":169}],66:[function(a,b,f){b=a("../../Observable");a=a("../../operator/materialize");b.Observable.prototype.materialize=a.materialize},{"../../Observable":3,"../../operator/materialize":170}],67:[function(a,b,f){b=a("../../Observable");a=
|
||||
a("../../operator/merge");b.Observable.prototype.merge=a.merge},{"../../Observable":3,"../../operator/merge":171}],68:[function(a,b,f){b=a("../../Observable");a=a("../../operator/mergeAll");b.Observable.prototype.mergeAll=a.mergeAll},{"../../Observable":3,"../../operator/mergeAll":172}],69:[function(a,b,f){b=a("../../Observable");a=a("../../operator/mergeMap");b.Observable.prototype.mergeMap=a.mergeMap;b.Observable.prototype.flatMap=a.mergeMap},{"../../Observable":3,"../../operator/mergeMap":173}],
|
||||
70:[function(a,b,f){b=a("../../Observable");a=a("../../operator/mergeMapTo");b.Observable.prototype.mergeMapTo=a.mergeMapTo},{"../../Observable":3,"../../operator/mergeMapTo":174}],71:[function(a,b,f){b=a("../../Observable");a=a("../../operator/multicast");b.Observable.prototype.multicast=a.multicast},{"../../Observable":3,"../../operator/multicast":175}],72:[function(a,b,f){b=a("../../Observable");a=a("../../operator/observeOn");b.Observable.prototype.observeOn=a.observeOn},{"../../Observable":3,
|
||||
"../../operator/observeOn":176}],73:[function(a,b,f){b=a("../../Observable");a=a("../../operator/partition");b.Observable.prototype.partition=a.partition},{"../../Observable":3,"../../operator/partition":177}],74:[function(a,b,f){b=a("../../Observable");a=a("../../operator/pluck");b.Observable.prototype.pluck=a.pluck},{"../../Observable":3,"../../operator/pluck":178}],75:[function(a,b,f){b=a("../../Observable");a=a("../../operator/publish");b.Observable.prototype.publish=a.publish},{"../../Observable":3,
|
||||
"../../operator/publish":179}],76:[function(a,b,f){b=a("../../Observable");a=a("../../operator/publishBehavior");b.Observable.prototype.publishBehavior=a.publishBehavior},{"../../Observable":3,"../../operator/publishBehavior":180}],77:[function(a,b,f){b=a("../../Observable");a=a("../../operator/publishLast");b.Observable.prototype.publishLast=a.publishLast},{"../../Observable":3,"../../operator/publishLast":181}],78:[function(a,b,f){b=a("../../Observable");a=a("../../operator/publishReplay");b.Observable.prototype.publishReplay=
|
||||
a.publishReplay},{"../../Observable":3,"../../operator/publishReplay":182}],79:[function(a,b,f){b=a("../../Observable");a=a("../../operator/race");b.Observable.prototype.race=a.race},{"../../Observable":3,"../../operator/race":183}],80:[function(a,b,f){b=a("../../Observable");a=a("../../operator/reduce");b.Observable.prototype.reduce=a.reduce},{"../../Observable":3,"../../operator/reduce":184}],81:[function(a,b,f){b=a("../../Observable");a=a("../../operator/repeat");b.Observable.prototype.repeat=
|
||||
a.repeat},{"../../Observable":3,"../../operator/repeat":185}],82:[function(a,b,f){b=a("../../Observable");a=a("../../operator/retry");b.Observable.prototype.retry=a.retry},{"../../Observable":3,"../../operator/retry":186}],83:[function(a,b,f){b=a("../../Observable");a=a("../../operator/retryWhen");b.Observable.prototype.retryWhen=a.retryWhen},{"../../Observable":3,"../../operator/retryWhen":187}],84:[function(a,b,f){b=a("../../Observable");a=a("../../operator/sample");b.Observable.prototype.sample=
|
||||
a.sample},{"../../Observable":3,"../../operator/sample":188}],85:[function(a,b,f){b=a("../../Observable");a=a("../../operator/sampleTime");b.Observable.prototype.sampleTime=a.sampleTime},{"../../Observable":3,"../../operator/sampleTime":189}],86:[function(a,b,f){b=a("../../Observable");a=a("../../operator/scan");b.Observable.prototype.scan=a.scan},{"../../Observable":3,"../../operator/scan":190}],87:[function(a,b,f){b=a("../../Observable");a=a("../../operator/share");b.Observable.prototype.share=
|
||||
a.share},{"../../Observable":3,"../../operator/share":191}],88:[function(a,b,f){b=a("../../Observable");a=a("../../operator/single");b.Observable.prototype.single=a.single},{"../../Observable":3,"../../operator/single":192}],89:[function(a,b,f){b=a("../../Observable");a=a("../../operator/skip");b.Observable.prototype.skip=a.skip},{"../../Observable":3,"../../operator/skip":193}],90:[function(a,b,f){b=a("../../Observable");a=a("../../operator/skipUntil");b.Observable.prototype.skipUntil=a.skipUntil},
|
||||
{"../../Observable":3,"../../operator/skipUntil":194}],91:[function(a,b,f){b=a("../../Observable");a=a("../../operator/skipWhile");b.Observable.prototype.skipWhile=a.skipWhile},{"../../Observable":3,"../../operator/skipWhile":195}],92:[function(a,b,f){b=a("../../Observable");a=a("../../operator/startWith");b.Observable.prototype.startWith=a.startWith},{"../../Observable":3,"../../operator/startWith":196}],93:[function(a,b,f){b=a("../../Observable");a=a("../../operator/subscribeOn");b.Observable.prototype.subscribeOn=
|
||||
a.subscribeOn},{"../../Observable":3,"../../operator/subscribeOn":197}],94:[function(a,b,f){b=a("../../Observable");a=a("../../operator/switch");b.Observable.prototype["switch"]=a._switch},{"../../Observable":3,"../../operator/switch":198}],95:[function(a,b,f){b=a("../../Observable");a=a("../../operator/switchMap");b.Observable.prototype.switchMap=a.switchMap},{"../../Observable":3,"../../operator/switchMap":199}],96:[function(a,b,f){b=a("../../Observable");a=a("../../operator/switchMapTo");b.Observable.prototype.switchMapTo=
|
||||
a.switchMapTo},{"../../Observable":3,"../../operator/switchMapTo":200}],97:[function(a,b,f){b=a("../../Observable");a=a("../../operator/take");b.Observable.prototype.take=a.take},{"../../Observable":3,"../../operator/take":201}],98:[function(a,b,f){b=a("../../Observable");a=a("../../operator/takeLast");b.Observable.prototype.takeLast=a.takeLast},{"../../Observable":3,"../../operator/takeLast":202}],99:[function(a,b,f){b=a("../../Observable");a=a("../../operator/takeUntil");b.Observable.prototype.takeUntil=
|
||||
a.takeUntil},{"../../Observable":3,"../../operator/takeUntil":203}],100:[function(a,b,f){b=a("../../Observable");a=a("../../operator/takeWhile");b.Observable.prototype.takeWhile=a.takeWhile},{"../../Observable":3,"../../operator/takeWhile":204}],101:[function(a,b,f){b=a("../../Observable");a=a("../../operator/throttle");b.Observable.prototype.throttle=a.throttle},{"../../Observable":3,"../../operator/throttle":205}],102:[function(a,b,f){b=a("../../Observable");a=a("../../operator/throttleTime");b.Observable.prototype.throttleTime=
|
||||
a.throttleTime},{"../../Observable":3,"../../operator/throttleTime":206}],103:[function(a,b,f){b=a("../../Observable");a=a("../../operator/timeout");b.Observable.prototype.timeout=a.timeout},{"../../Observable":3,"../../operator/timeout":207}],104:[function(a,b,f){b=a("../../Observable");a=a("../../operator/timeoutWith");b.Observable.prototype.timeoutWith=a.timeoutWith},{"../../Observable":3,"../../operator/timeoutWith":208}],105:[function(a,b,f){b=a("../../Observable");a=a("../../operator/toArray");
|
||||
b.Observable.prototype.toArray=a.toArray},{"../../Observable":3,"../../operator/toArray":209}],106:[function(a,b,f){b=a("../../Observable");a=a("../../operator/toPromise");b.Observable.prototype.toPromise=a.toPromise},{"../../Observable":3,"../../operator/toPromise":210}],107:[function(a,b,f){b=a("../../Observable");a=a("../../operator/window");b.Observable.prototype.window=a.window},{"../../Observable":3,"../../operator/window":211}],108:[function(a,b,f){b=a("../../Observable");a=a("../../operator/windowCount");
|
||||
b.Observable.prototype.windowCount=a.windowCount},{"../../Observable":3,"../../operator/windowCount":212}],109:[function(a,b,f){b=a("../../Observable");a=a("../../operator/windowTime");b.Observable.prototype.windowTime=a.windowTime},{"../../Observable":3,"../../operator/windowTime":213}],110:[function(a,b,f){b=a("../../Observable");a=a("../../operator/windowToggle");b.Observable.prototype.windowToggle=a.windowToggle},{"../../Observable":3,"../../operator/windowToggle":214}],111:[function(a,b,f){b=
|
||||
a("../../Observable");a=a("../../operator/windowWhen");b.Observable.prototype.windowWhen=a.windowWhen},{"../../Observable":3,"../../operator/windowWhen":215}],112:[function(a,b,f){b=a("../../Observable");a=a("../../operator/withLatestFrom");b.Observable.prototype.withLatestFrom=a.withLatestFrom},{"../../Observable":3,"../../operator/withLatestFrom":216}],113:[function(a,b,f){b=a("../../Observable");a=a("../../operator/zip");b.Observable.prototype.zip=a.zipProto},{"../../Observable":3,"../../operator/zip":217}],
|
||||
114:[function(a,b,f){b=a("../../Observable");a=a("../../operator/zipAll");b.Observable.prototype.zipAll=a.zipAll},{"../../Observable":3,"../../operator/zipAll":218}],115:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};b=a("../Observable");var k=a("./ScalarObservable"),l=a("./EmptyObservable");a=function(a){function e(d,c,e,n){a.call(this);
|
||||
this.arrayLike=d;this.scheduler=n;c||n||1!==d.length||(this._isScalar=!0,this.value=d[0]);c&&(this.mapFn=c.bind(e))}g(e,a);e.create=function(a,c,m,n){var b=a.length;return 0===b?new l.EmptyObservable:1!==b||c?new e(a,c,m,n):new k.ScalarObservable(a[0],n)};e.dispatch=function(a){var c=a.arrayLike,e=a.index,n=a.length,b=a.mapFn,h=a.subscriber;h.isUnsubscribed||(e>=n?h.complete():(c=b?b(c[e],e):c[e],h.next(c),a.index=e+1,this.schedule(a)))};e.prototype._subscribe=function(a){var c=this.arrayLike,m=this.mapFn,
|
||||
n=this.scheduler,b=c.length;if(n)return n.schedule(e.dispatch,0,{arrayLike:c,index:0,length:b,mapFn:m,subscriber:a});for(n=0;n<b&&!a.isUnsubscribed;n++){var h=m?m(c[n],n):c[n];a.next(h)}a.complete()};return e}(b.Observable);f.ArrayLikeObservable=a},{"../Observable":3,"./EmptyObservable":121,"./ScalarObservable":132}],116:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var m in d)d.hasOwnProperty(m)&&(a[m]=d[m]);a.prototype=null===d?Object.create(d):(c.prototype=
|
||||
d.prototype,new c)};b=a("../Observable");var k=a("./ScalarObservable"),l=a("./EmptyObservable"),h=a("../util/isScheduler");a=function(a){function d(c,d){a.call(this);this.array=c;this.scheduler=d;d||1!==c.length||(this._isScalar=!0,this.value=c[0])}g(d,a);d.create=function(a,e){return new d(a,e)};d.of=function(){for(var a=[],e=0;e<arguments.length;e++)a[e-0]=arguments[e];e=a[a.length-1];h.isScheduler(e)?a.pop():e=null;var n=a.length;return 1<n?new d(a,e):1===n?new k.ScalarObservable(a[0],e):new l.EmptyObservable(e)};
|
||||
d.dispatch=function(a){var d=a.array,e=a.index,b=a.subscriber;e>=a.count?b.complete():(b.next(d[e]),b.isUnsubscribed||(a.index=e+1,this.schedule(a)))};d.prototype._subscribe=function(a){var e=this.array,n=e.length,b=this.scheduler;if(b)return b.schedule(d.dispatch,0,{array:e,index:0,count:n,subscriber:a});for(b=0;b<n&&!a.isUnsubscribed;b++)a.next(e[b]);a.complete()};return d}(b.Observable);f.ArrayObservable=a},{"../Observable":3,"../util/isScheduler":246,"./EmptyObservable":121,"./ScalarObservable":132}],
|
||||
117:[function(a,b,f){function g(a){var n=this,b=a.source;a=a.subscriber;var h=b.callbackFunc,f=b.args,g=b.scheduler,r=b.subject;if(!r){var r=b.subject=new c.AsyncSubject,v=function x(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];var m=x.source,c=m.selector,m=m.subject;c?(a=e.tryCatch(c).apply(this,a),a===d.errorObject?n.add(g.schedule(l,0,{err:d.errorObject.e,subject:m})):n.add(g.schedule(k,0,{value:a,subject:m}))):n.add(g.schedule(k,0,{value:1===a.length?a[0]:a,subject:m}))};v.source=
|
||||
b;e.tryCatch(h).apply(this,f.concat(v))===d.errorObject&&r.error(d.errorObject.e)}n.add(r.subscribe(a))}function k(a){var c=a.subject;c.next(a.value);c.complete()}function l(a){a.subject.error(a.err)}var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Observable");var e=a("../util/tryCatch"),d=a("../util/errorObject"),c=a("../subject/AsyncSubject");a=
|
||||
function(a){function n(c,d,e,n){a.call(this);this.callbackFunc=c;this.selector=d;this.args=e;this.scheduler=n}h(n,a);n.create=function(a,c,d){void 0===c&&(c=void 0);return function(){for(var e=[],m=0;m<arguments.length;m++)e[m-0]=arguments[m];return new n(a,c,e,d)}};n.prototype._subscribe=function(a){var m=this.callbackFunc,n=this.args,b=this.scheduler,h=this.subject;if(b)return b.schedule(g,0,{source:this,subscriber:a});h||(h=this.subject=new c.AsyncSubject,b=function y(){for(var a=[],c=0;c<arguments.length;c++)a[c-
|
||||
0]=arguments[c];var m=y.source,c=m.selector,m=m.subject;c?(a=e.tryCatch(c).apply(this,a),a===d.errorObject?m.error(d.errorObject.e):(m.next(a),m.complete())):(m.next(1===a.length?a[0]:a),m.complete())},b.source=this,e.tryCatch(m).apply(this,n.concat(b))===d.errorObject&&h.error(d.errorObject.e));return h.subscribe(a)};return n}(b.Observable);f.BoundCallbackObservable=a},{"../Observable":3,"../subject/AsyncSubject":226,"../util/errorObject":239,"../util/tryCatch":253}],118:[function(a,b,f){function g(a){var n=
|
||||
this,b=a.source;a=a.subscriber;var h=b.callbackFunc,f=b.args,g=b.scheduler,r=b.subject;if(!r){var r=b.subject=new c.AsyncSubject,v=function x(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];var m=x.source,c=m.selector,m=m.subject,b=a.shift();b?m.error(b):c?(a=e.tryCatch(c).apply(this,a),a===d.errorObject?n.add(g.schedule(l,0,{err:d.errorObject.e,subject:m})):n.add(g.schedule(k,0,{value:a,subject:m}))):n.add(g.schedule(k,0,{value:1===a.length?a[0]:a,subject:m}))};v.source=b;e.tryCatch(h).apply(this,
|
||||
f.concat(v))===d.errorObject&&r.error(d.errorObject.e)}n.add(r.subscribe(a))}function k(a){var c=a.subject;c.next(a.value);c.complete()}function l(a){a.subject.error(a.err)}var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Observable");var e=a("../util/tryCatch"),d=a("../util/errorObject"),c=a("../subject/AsyncSubject");a=function(a){function b(c,d,
|
||||
e,n){a.call(this);this.callbackFunc=c;this.selector=d;this.args=e;this.scheduler=n}h(b,a);b.create=function(a,c,d){void 0===c&&(c=void 0);return function(){for(var e=[],m=0;m<arguments.length;m++)e[m-0]=arguments[m];return new b(a,c,e,d)}};b.prototype._subscribe=function(a){var m=this.callbackFunc,b=this.args,n=this.scheduler,h=this.subject;if(n)return n.schedule(g,0,{source:this,subscriber:a});h||(h=this.subject=new c.AsyncSubject,n=function y(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];
|
||||
var m=y.source,c=m.selector,m=m.subject,b=a.shift();b?m.error(b):c?(a=e.tryCatch(c).apply(this,a),a===d.errorObject?m.error(d.errorObject.e):(m.next(a),m.complete())):(m.next(1===a.length?a[0]:a),m.complete())},n.source=this,e.tryCatch(m).apply(this,b.concat(n))===d.errorObject&&h.error(d.errorObject.e));return h.subscribe(a)};return b}(b.Observable);f.BoundNodeCallbackObservable=a},{"../Observable":3,"../subject/AsyncSubject":226,"../util/errorObject":239,"../util/tryCatch":253}],119:[function(a,
|
||||
b,f){var g=this&&this.__extends||function(a,d){function e(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(e.prototype=d.prototype,new e)};b=a("../Observable");var k=a("../Subscriber");a=a("../Subscription");var l=function(a){function d(e,m){a.call(this);this.source=e;this.subjectFactory=m}g(d,a);d.prototype._subscribe=function(a){return this.getSubject().subscribe(a)};d.prototype.getSubject=function(){var a=this.subject;return a&&!a.isUnsubscribed?
|
||||
a:this.subject=this.subjectFactory()};d.prototype.connect=function(){var a=this.subscription;if(a&&!a.isUnsubscribed)return a;a=this.source.subscribe(this.getSubject());a.add(new h(this));return this.subscription=a};d.prototype.refCount=function(){return new e(this)};d.prototype._closeSubscription=function(){this.subscription=this.subject=null};return d}(b.Observable);f.ConnectableObservable=l;var h=function(a){function d(e){a.call(this);this.connectable=e}g(d,a);d.prototype._unsubscribe=function(){this.connectable._closeSubscription();
|
||||
this.connectable=null};return d}(a.Subscription),e=function(a){function e(d,m){void 0===m&&(m=0);a.call(this);this.connectable=d;this.refCount=m}g(e,a);e.prototype._subscribe=function(a){var c=this.connectable;a=new d(a,this);var e=c.subscribe(a);e.isUnsubscribed||1!==++this.refCount||(a.connection=this.connection=c.connect());return e};return e}(b.Observable),d=function(a){function d(e,m){a.call(this,null);this.destination=e;this.refCountObservable=m;this.connection=m.connection;e.add(this)}g(d,
|
||||
a);d.prototype._next=function(a){this.destination.next(a)};d.prototype._error=function(a){this._resetConnectable();this.destination.error(a)};d.prototype._complete=function(){this._resetConnectable();this.destination.complete()};d.prototype._resetConnectable=function(){var a=this.refCountObservable,c=a.connection,d=this.connection;d&&d===c&&(a.refCount=0,c.unsubscribe(),a.connection=null,this.unsubscribe())};d.prototype._unsubscribe=function(){var a=this.refCountObservable;if(0!==a.refCount&&0===
|
||||
--a.refCount){var c=a.connection,d=this.connection;d&&d===c&&(c.unsubscribe(),a.connection=null)}};return d}(k.Subscriber)},{"../Observable":3,"../Subscriber":9,"../Subscription":10}],120:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};b=a("../Observable");var k=a("../util/tryCatch"),l=a("../util/errorObject");a=function(a){function e(d){a.call(this);
|
||||
this.observableFactory=d}g(e,a);e.create=function(a){return new e(a)};e.prototype._subscribe=function(a){var c=k.tryCatch(this.observableFactory)();c===l.errorObject?a.error(l.errorObject.e):c.subscribe(a)};return e}(b.Observable);f.DeferObservable=a},{"../Observable":3,"../util/errorObject":239,"../util/tryCatch":253}],121:[function(a,b,f){var g=this&&this.__extends||function(a,b){function h(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):
|
||||
(h.prototype=b.prototype,new h)};a=function(a){function b(h){a.call(this);this.scheduler=h}g(b,a);b.create=function(a){return new b(a)};b.dispatch=function(a){a.subscriber.complete()};b.prototype._subscribe=function(a){var e=this.scheduler;if(e)return e.schedule(b.dispatch,0,{subscriber:a});a.complete()};return b}(a("../Observable").Observable);f.EmptyObservable=a},{"../Observable":3}],122:[function(a,b,f){var g=this&&this.__extends||function(a,b){function h(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&
|
||||
(a[e]=b[e]);a.prototype=null===b?Object.create(b):(h.prototype=b.prototype,new h)};a=function(a){function b(h,e){a.call(this);this.error=h;this.scheduler=e}g(b,a);b.create=function(a,e){return new b(a,e)};b.dispatch=function(a){a.subscriber.error(a.error)};b.prototype._subscribe=function(a){var e=this.error,d=this.scheduler;if(d)return d.schedule(b.dispatch,0,{error:e,subscriber:a});a.error(e)};return b}(a("../Observable").Observable);f.ErrorObservable=a},{"../Observable":3}],123:[function(a,b,f){function g(a){return null!==
|
||||
a}var k=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},l=a("../Observable");b=a("../Subscriber");var h=a("./PromiseObservable"),e=a("./EmptyObservable"),d=a("../util/isPromise"),c=a("../util/isArray");a=function(a){function b(c,d){a.call(this);this.sources=c;this.resultSelector=d}k(b,a);b.create=function(){for(var a=[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];
|
||||
if(null===a||0===arguments.length)return new e.EmptyObservable;d=null;"function"===typeof a[a.length-1]&&(d=a.pop());1===a.length&&c.isArray(a[0])&&(a=a[0]);return 0===a.length?new e.EmptyObservable:new b(a,d)};b.prototype._subscribe=function(a){for(var c=this.sources,e=c.length,b=[],n=0;n<e;n++)b.push(null);b={completed:0,total:e,values:b,selector:this.resultSelector};for(n=0;n<e;n++){var q=c[n];d.isPromise(q)&&(q=new h.PromiseObservable(q));q.subscribe(new m(a,n,b))}};return b}(l.Observable);f.ForkJoinObservable=
|
||||
a;var m=function(a){function c(d,e,m){a.call(this,d);this.index=e;this.context=m;this._value=null}k(c,a);c.prototype._next=function(a){this._value=a};c.prototype._complete=function(){var a=this.destination;null==this._value&&a.complete();var c=this.context;c.completed++;c.values[this.index]=this._value;var d=c.values;c.completed===d.length&&(d.every(g)&&(c=c.selector?c.selector.apply(this,d):d,a.next(c)),a.complete())};return c}(b.Subscriber)},{"../Observable":3,"../Subscriber":9,"../util/isArray":240,
|
||||
"../util/isPromise":245,"./EmptyObservable":121,"./PromiseObservable":130}],124:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var m in d)d.hasOwnProperty(m)&&(a[m]=d[m]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Observable");var k=a("../util/tryCatch"),l=a("../util/errorObject"),h=a("../Subscription");a=function(a){function d(c,d,b){a.call(this);this.sourceObj=c;this.eventName=d;this.selector=b}g(d,a);d.create=function(a,
|
||||
e,b){return new d(a,e,b)};d.setupSubscription=function(a,e,b,q){var f;if(a&&"[object NodeList]"===a.toString()||a&&"[object HTMLCollection]"===a.toString())for(var l=0,k=a.length;l<k;l++)d.setupSubscription(a[l],e,b,q);else a&&"function"===typeof a.addEventListener&&"function"===typeof a.removeEventListener?(a.addEventListener(e,b),f=function(){return a.removeEventListener(e,b)}):a&&"function"===typeof a.on&&"function"===typeof a.off?(a.on(e,b),f=function(){return a.off(e,b)}):a&&"function"===typeof a.addListener&&
|
||||
"function"===typeof a.removeListener&&(a.addListener(e,b),f=function(){return a.removeListener(e,b)});q.add(new h.Subscription(f))};d.prototype._subscribe=function(a){var e=this.selector;d.setupSubscription(this.sourceObj,this.eventName,e?function(){for(var d=[],b=0;b<arguments.length;b++)d[b-0]=arguments[b];d=k.tryCatch(e).apply(void 0,d);d===l.errorObject?a.error(l.errorObject.e):a.next(d)}:function(d){return a.next(d)},a)};return d}(b.Observable);f.FromEventObservable=a},{"../Observable":3,"../Subscription":10,
|
||||
"../util/errorObject":239,"../util/tryCatch":253}],125:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var m in d)d.hasOwnProperty(m)&&(a[m]=d[m]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Observable");var k=a("../Subscription"),l=a("../util/tryCatch"),h=a("../util/errorObject");a=function(a){function d(c,d,b){a.call(this);this.addHandler=c;this.removeHandler=d;this.selector=b}g(d,a);d.create=function(a,e,b){return new d(a,
|
||||
e,b)};d.prototype._subscribe=function(a){var d=this.removeHandler,e=this.selector,b=e?function(d){var m=l.tryCatch(e).apply(null,arguments);m===h.errorObject?a.error(m.e):a.next(m)}:function(d){a.next(d)},f=l.tryCatch(this.addHandler)(b);f===h.errorObject&&a.error(f.e);a.add(new k.Subscription(function(){d(b)}))};return d}(b.Observable);f.FromEventPatternObservable=a},{"../Observable":3,"../Subscription":10,"../util/errorObject":239,"../util/tryCatch":253}],126:[function(a,b,f){var g=this&&this.__extends||
|
||||
function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("../util/isArray"),l=a("../util/isFunction"),h=a("../util/isPromise"),e=a("../util/isScheduler"),d=a("./PromiseObservable"),c=a("./IteratorObservable"),m=a("./ArrayObservable"),n=a("./ArrayLikeObservable"),q=a("../util/SymbolShim"),p=a("../Observable"),u=a("../operator/observeOn");a=function(a){function b(c,d){a.call(this,null);this.ish=
|
||||
c;this.scheduler=d}g(b,a);b.create=function(a,f,g,u){var t=null,z=null;l.isFunction(f)?(t=u||null,z=f):e.isScheduler(t)&&(t=f);if(null!=a){if("function"===typeof a[q.SymbolShim.observable])return a instanceof p.Observable&&!t?a:new b(a,t);if(k.isArray(a))return new m.ArrayObservable(a,t);if(h.isPromise(a))return new d.PromiseObservable(a,t);if("function"===typeof a[q.SymbolShim.iterator]||"string"===typeof a)return new c.IteratorObservable(a,null,null,t);if(a&&"number"===typeof a.length)return new n.ArrayLikeObservable(a,
|
||||
z,g,t)}throw new TypeError((null!==a&&typeof a||a)+" is not observable");};b.prototype._subscribe=function(a){var c=this.ish,d=this.scheduler;return null==d?c[q.SymbolShim.observable]().subscribe(a):c[q.SymbolShim.observable]().subscribe(new u.ObserveOnSubscriber(a,d,0))};return b}(p.Observable);f.FromObservable=a},{"../Observable":3,"../operator/observeOn":176,"../util/SymbolShim":238,"../util/isArray":240,"../util/isFunction":242,"../util/isPromise":245,"../util/isScheduler":246,"./ArrayLikeObservable":115,
|
||||
"./ArrayObservable":116,"./IteratorObservable":128,"./PromiseObservable":130}],127:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)},k=a("../util/isNumeric");b=a("../Observable");var l=a("../scheduler/asap");a=function(a){function e(d,c){void 0===d&&(d=0);void 0===c&&(c=l.asap);a.call(this);this.period=d;this.scheduler=c;if(!k.isNumeric(d)||
|
||||
0>d)this.period=0;c&&"function"===typeof c.schedule||(this.scheduler=l.asap)}g(e,a);e.create=function(a,c){void 0===a&&(a=0);void 0===c&&(c=l.asap);return new e(a,c)};e.dispatch=function(a){var c=a.subscriber,e=a.period;c.next(a.index);c.isUnsubscribed||(a.index+=1,this.schedule(a,e))};e.prototype._subscribe=function(a){var c=this.period;a.add(this.scheduler.schedule(e.dispatch,c,{index:0,subscriber:a,period:c}))};return e}(b.Observable);f.IntervalObservable=a},{"../Observable":3,"../scheduler/asap":224,
|
||||
"../util/isNumeric":243}],128:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("../util/root"),l=a("../util/isObject"),h=a("../util/tryCatch");b=a("../Observable");var e=a("../util/isFunction"),d=a("../util/SymbolShim"),c=a("../util/errorObject");a=function(a){function b(c,h,f,q){a.call(this);if(null==c)throw Error("iterator cannot be null.");
|
||||
if(l.isObject(h))this.thisArg=h,this.scheduler=f;else if(e.isFunction(h))this.project=h,this.thisArg=f,this.scheduler=q;else if(null!=h)throw Error("When provided, `project` must be a function.");if((h=c[d.SymbolShim.iterator])||"string"!==typeof c)if(h||void 0===c.length){if(!h)throw new TypeError("Object is not iterable");c=c[d.SymbolShim.iterator]()}else c=new n(c);else c=new m(c);this.iterator=c}g(b,a);b.create=function(a,c,d,e){return new b(a,c,d,e)};b.dispatch=function(a){var d=a.index,e=a.thisArg,
|
||||
m=a.project,b=a.iterator,n=a.subscriber;a.hasError?n.error(a.error):(b=b.next(),b.done?n.complete():(m?(b=h.tryCatch(m).call(e,b.value,d),b===c.errorObject?(a.error=c.errorObject.e,a.hasError=!0):(n.next(b),a.index=d+1)):(n.next(b.value),a.index=d+1),n.isUnsubscribed||this.schedule(a)))};b.prototype._subscribe=function(a){var d=0,e=this.iterator,m=this.project,n=this.thisArg,f=this.scheduler;if(f)return f.schedule(b.dispatch,0,{index:d,thisArg:n,project:m,iterator:e,subscriber:a});do{f=e.next();if(f.done){a.complete();
|
||||
break}else if(m){f=h.tryCatch(m).call(n,f.value,d++);if(f===c.errorObject){a.error(c.errorObject.e);break}a.next(f)}else a.next(f.value);if(a.isUnsubscribed)break}while(1)};return b}(b.Observable);f.IteratorObservable=a;var m=function(){function a(c,d,e){void 0===d&&(d=0);void 0===e&&(e=c.length);this.str=c;this.idx=d;this.len=e}a.prototype[d.SymbolShim.iterator]=function(){return this};a.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.str.charAt(this.idx++)}:{done:!0,value:void 0}};
|
||||
return a}(),n=function(){function a(c,d,e){void 0===d&&(d=0);if(void 0===e)if(e=+c.length,isNaN(e))e=0;else if(0!==e&&"number"===typeof e&&k.root.isFinite(e)){var m;m=+e;m=0===m?m:isNaN(m)?m:0>m?-1:1;e=m*Math.floor(Math.abs(e));e=0>=e?0:e>q?q:e}this.arr=c;this.idx=d;this.len=e}a.prototype[d.SymbolShim.iterator]=function(){return this};a.prototype.next=function(){return this.idx<this.len?{done:!1,value:this.arr[this.idx++]}:{done:!0,value:void 0}};return a}(),q=Math.pow(2,53)-1},{"../Observable":3,
|
||||
"../util/SymbolShim":238,"../util/errorObject":239,"../util/isFunction":242,"../util/isObject":244,"../util/root":249,"../util/tryCatch":253}],129:[function(a,b,f){var g=this&&this.__extends||function(a,b){function e(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(e.prototype=b.prototype,new e)};b=a("../Observable");var k=a("../util/noop");a=function(a){function b(){a.call(this)}g(b,a);b.create=function(){return new b};b.prototype._subscribe=
|
||||
function(a){k.noop()};return b}(b.Observable);f.NeverObservable=a},{"../Observable":3,"../util/noop":247}],130:[function(a,b,f){function g(a){var d=a.value;a=a.subscriber;a.isUnsubscribed||(a.next(d),a.complete())}function k(a){var d=a.err;a=a.subscriber;a.isUnsubscribed||a.error(d)}var l=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var m in d)d.hasOwnProperty(m)&&(a[m]=d[m]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)},h=a("../util/root");a=function(a){function d(c,
|
||||
d){void 0===d&&(d=null);a.call(this);this.promise=c;this.scheduler=d}l(d,a);d.create=function(a,e){void 0===e&&(e=null);return new d(a,e)};d.prototype._subscribe=function(a){var d=this,e=this.promise,b=this.scheduler;if(null==b)this._isScalar?a.isUnsubscribed||(a.next(this.value),a.complete()):e.then(function(e){d.value=e;d._isScalar=!0;a.isUnsubscribed||(a.next(e),a.complete())},function(d){a.isUnsubscribed||a.error(d)}).then(null,function(a){h.root.setTimeout(function(){throw a;})});else if(this._isScalar){if(!a.isUnsubscribed)return b.schedule(g,
|
||||
0,{value:this.value,subscriber:a})}else e.then(function(e){d.value=e;d._isScalar=!0;a.isUnsubscribed||a.add(b.schedule(g,0,{value:e,subscriber:a}))},function(d){a.isUnsubscribed||a.add(b.schedule(k,0,{err:d,subscriber:a}))}).then(null,function(a){h.root.setTimeout(function(){throw a;})})};return d}(a("../Observable").Observable);f.PromiseObservable=a},{"../Observable":3,"../util/root":249}],131:[function(a,b,f){var g=this&&this.__extends||function(a,b){function h(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&
|
||||
(a[e]=b[e]);a.prototype=null===b?Object.create(b):(h.prototype=b.prototype,new h)};a=function(a){function b(h,e,d){a.call(this);this.start=h;this.end=e;this.scheduler=d}g(b,a);b.create=function(a,e,d){void 0===a&&(a=0);void 0===e&&(e=0);return new b(a,e,d)};b.dispatch=function(a){var e=a.start,d=a.index,c=a.subscriber;d>=a.end?c.complete():(c.next(e),c.isUnsubscribed||(a.index=d+1,a.start=e+1,this.schedule(a)))};b.prototype._subscribe=function(a){var e=0,d=this.start,c=this.end,m=this.scheduler;if(m)return m.schedule(b.dispatch,
|
||||
0,{index:e,end:c,start:d,subscriber:a});do{if(e++>=c){a.complete();break}a.next(d++);if(a.isUnsubscribed)break}while(1)};return b}(a("../Observable").Observable);f.RangeObservable=a},{"../Observable":3}],132:[function(a,b,f){var g=this&&this.__extends||function(a,b){function h(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(h.prototype=b.prototype,new h)};a=function(a){function b(h,e){a.call(this);this.value=h;this.scheduler=e;this._isScalar=
|
||||
!0}g(b,a);b.create=function(a,e){return new b(a,e)};b.dispatch=function(a){var e=a.value,d=a.subscriber;a.done?d.complete():(d.next(e),d.isUnsubscribed||(a.done=!0,this.schedule(a)))};b.prototype._subscribe=function(a){var e=this.value,d=this.scheduler;if(d)return d.schedule(b.dispatch,0,{done:!1,value:e,subscriber:a});a.next(e);a.isUnsubscribed||a.complete()};return b}(a("../Observable").Observable);f.ScalarObservable=a},{"../Observable":3}],133:[function(a,b,f){var g=this&&this.__extends||function(a,
|
||||
e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};b=a("../Observable");var k=a("../scheduler/asap"),l=a("../util/isNumeric");a=function(a){function e(d,c,e){void 0===c&&(c=0);void 0===e&&(e=k.asap);a.call(this);this.source=d;this.delayTime=c;this.scheduler=e;if(!l.isNumeric(c)||0>c)this.delayTime=0;e&&"function"===typeof e.schedule||(this.scheduler=k.asap)}g(e,a);e.create=function(a,c,m){void 0===
|
||||
c&&(c=0);void 0===m&&(m=k.asap);return new e(a,c,m)};e.dispatch=function(a){return a.source.subscribe(a.subscriber)};e.prototype._subscribe=function(a){return this.scheduler.schedule(e.dispatch,this.delayTime,{source:this.source,subscriber:a})};return e}(b.Observable);f.SubscribeOnObservable=a},{"../Observable":3,"../scheduler/asap":224,"../util/isNumeric":243}],134:[function(a,b,f){var g=this&&this.__extends||function(a,c){function e(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=
|
||||
c[b]);a.prototype=null===c?Object.create(c):(e.prototype=c.prototype,new e)},k=a("../util/isNumeric");b=a("../Observable");var l=a("../scheduler/asap"),h=a("../util/isScheduler"),e=a("../util/isDate");a=function(a){function c(c,b,f){void 0===c&&(c=0);a.call(this);this.period=-1;this.dueTime=0;k.isNumeric(b)?this.period=1>+b&&1||+b:h.isScheduler(b)&&(f=b);h.isScheduler(f)||(f=l.asap);this.scheduler=f;this.dueTime=e.isDate(c)?+c-this.scheduler.now():c}g(c,a);c.create=function(a,d,e){void 0===a&&(a=
|
||||
0);return new c(a,d,e)};c.dispatch=function(a){var c=a.index,d=a.period,e=a.subscriber;e.next(c);if(!e.isUnsubscribed){if(-1===d)return e.complete();a.index=c+1;this.schedule(a,d)}};c.prototype._subscribe=function(a){return this.scheduler.schedule(c.dispatch,this.dueTime,{index:0,period:this.period,subscriber:a})};return c}(b.Observable);f.TimerObservable=a},{"../Observable":3,"../scheduler/asap":224,"../util/isDate":241,"../util/isNumeric":243,"../util/isScheduler":246}],135:[function(a,b,f){var g=
|
||||
this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.buffer=function(a){return this.lift(new l(a))};var l=function(){function a(d){this.closingNotifier=d}a.prototype.call=function(a){return new h(a,this.closingNotifier)};return a}(),h=function(a){function d(c,d){a.call(this,c);this.buffer=[];this.add(k.subscribeToResult(this,
|
||||
d))}g(d,a);d.prototype._next=function(a){this.buffer.push(a)};d.prototype.notifyNext=function(a,d,e,b,h){a=this.buffer;this.buffer=[];this.destination.next(a)};return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],136:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};a=a("../Subscriber");f.bufferCount=function(a,
|
||||
e){void 0===e&&(e=null);return this.lift(new k(a,e))};var k=function(){function a(e,d){this.bufferSize=e;this.startBufferEvery=d}a.prototype.call=function(a){return new l(a,this.bufferSize,this.startBufferEvery)};return a}(),l=function(a){function e(d,c,e){a.call(this,d);this.bufferSize=c;this.startBufferEvery=e;this.buffers=[[]];this.count=0}g(e,a);e.prototype._next=function(a){var c=this.count+=1,e=this.destination,b=this.bufferSize,h=this.buffers,f=h.length,k=-1;0===c%(null==this.startBufferEvery?
|
||||
b:this.startBufferEvery)&&h.push([]);for(c=0;c<f;c++){var l=h[c];l.push(a);l.length===b&&(k=c,e.next(l))}-1!==k&&h.splice(k,1)};e.prototype._complete=function(){for(var d=this.destination,c=this.buffers;0<c.length;){var e=c.shift();0<e.length&&d.next(e)}a.prototype._complete.call(this)};return e}(a.Subscriber)},{"../Subscriber":9}],137:[function(a,b,f){function g(a){var c=a.subscriber,d=a.buffer;d&&c.closeBuffer(d);a.buffer=c.openBuffer();c.isUnsubscribed||this.schedule(a,a.bufferTimeSpan)}function k(a){var c=
|
||||
a.bufferCreationInterval,d=a.bufferTimeSpan,e=a.subscriber,b=a.scheduler,h=e.openBuffer();e.isUnsubscribed||(this.add(b.schedule(l,d,{subscriber:e,buffer:h})),this.schedule(a,c))}function l(a){a.subscriber.closeBuffer(a.buffer)}var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Subscriber");var e=a("../scheduler/asap");f.bufferTime=function(a,c,b){void 0===
|
||||
c&&(c=null);void 0===b&&(b=e.asap);return this.lift(new d(a,c,b))};var d=function(){function a(c,d,e){this.bufferTimeSpan=c;this.bufferCreationInterval=d;this.scheduler=e}a.prototype.call=function(a){return new c(a,this.bufferTimeSpan,this.bufferCreationInterval,this.scheduler)};return a}(),c=function(a){function c(d,e,b,n){a.call(this,d);this.bufferTimeSpan=e;this.bufferCreationInterval=b;this.scheduler=n;this.buffers=[];d=this.openBuffer();if(null!==b&&0<=b){var h={bufferTimeSpan:e,bufferCreationInterval:b,
|
||||
subscriber:this,scheduler:n};this.add(n.schedule(l,e,{subscriber:this,buffer:d}));this.add(n.schedule(k,b,h))}else this.add(n.schedule(g,e,{subscriber:this,buffer:d,bufferTimeSpan:e}))}h(c,a);c.prototype._next=function(a){for(var c=this.buffers,d=c.length,e=0;e<d;e++)c[e].push(a)};c.prototype._error=function(c){this.buffers.length=0;a.prototype._error.call(this,c)};c.prototype._complete=function(){for(var c=this.buffers,d=this.destination;0<c.length;)d.next(c.shift());a.prototype._complete.call(this)};
|
||||
c.prototype._unsubscribe=function(){this.buffers=null};c.prototype.openBuffer=function(){var a=[];this.buffers.push(a);return a};c.prototype.closeBuffer=function(a){this.destination.next(a);var c=this.buffers;c.splice(c.indexOf(a),1)};return c}(b.Subscriber)},{"../Subscriber":9,"../scheduler/asap":224}],138:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,
|
||||
new d)};b=a("../Subscriber");var k=a("../Subscription"),l=a("../util/tryCatch"),h=a("../util/errorObject");f.bufferToggle=function(a,c){return this.lift(new e(a,c))};var e=function(){function a(c,d){this.openings=c;this.closingSelector=d}a.prototype.call=function(a){return new d(a,this.openings,this.closingSelector)};return a}(),d=function(a){function d(e,b,m){a.call(this,e);this.openings=b;this.closingSelector=m;this.contexts=[];this.add(this.openings.subscribe(new c(this)))}g(d,a);d.prototype._next=
|
||||
function(a){for(var c=this.contexts,d=c.length,e=0;e<d;e++)c[e].buffer.push(a)};d.prototype._error=function(c){for(var d=this.contexts;0<d.length;){var e=d.shift();e.subscription.unsubscribe();e.buffer=null;e.subscription=null}this.contexts=null;a.prototype._error.call(this,c)};d.prototype._complete=function(){for(var c=this.contexts;0<c.length;){var d=c.shift();this.destination.next(d.buffer);d.subscription.unsubscribe();d.buffer=null;d.subscription=null}this.contexts=null;a.prototype._complete.call(this)};
|
||||
d.prototype.openBuffer=function(a){var c=this.contexts,d=l.tryCatch(this.closingSelector)(a);d===h.errorObject?this._error(h.errorObject.e):(a={buffer:[],subscription:new k.Subscription},c.push(a),c=new m(this,a),c=d.subscribe(c),a.subscription.add(c),this.add(c))};d.prototype.closeBuffer=function(a){var c=this.contexts;if(null!==c){var d=a.subscription;this.destination.next(a.buffer);c.splice(c.indexOf(a),1);this.remove(d);d.unsubscribe()}};return d}(b.Subscriber),c=function(a){function c(d){a.call(this,
|
||||
null);this.parent=d}g(c,a);c.prototype._next=function(a){this.parent.openBuffer(a)};c.prototype._error=function(a){this.parent.error(a)};c.prototype._complete=function(){};return c}(b.Subscriber),m=function(a){function c(d,e){a.call(this,null);this.parent=d;this.context=e}g(c,a);c.prototype._next=function(){this.parent.closeBuffer(this.context)};c.prototype._error=function(a){this.parent.error(a)};c.prototype._complete=function(){this.parent.closeBuffer(this.context)};return c}(b.Subscriber)},{"../Subscriber":9,
|
||||
"../Subscription":10,"../util/errorObject":239,"../util/tryCatch":253}],139:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("../Subscription"),l=a("../util/tryCatch"),h=a("../util/errorObject");b=a("../OuterSubscriber");var e=a("../util/subscribeToResult");f.bufferWhen=function(a){return this.lift(new d(a))};var d=function(){function a(c){this.closingSelector=
|
||||
c}a.prototype.call=function(a){return new c(a,this.closingSelector)};return a}(),c=function(a){function c(d,e){a.call(this,d);this.closingSelector=e;this.subscribing=!1;this.openBuffer()}g(c,a);c.prototype._next=function(a){this.buffer.push(a)};c.prototype._complete=function(){var c=this.buffer;c&&this.destination.next(c);a.prototype._complete.call(this)};c.prototype._unsubscribe=function(){this.buffer=null;this.subscribing=!1};c.prototype.notifyNext=function(a,c,d,e,b){this.openBuffer()};c.prototype.notifyComplete=
|
||||
function(){this.subscribing?this.complete():this.openBuffer()};c.prototype.openBuffer=function(){var a=this.closingSubscription;a&&(this.remove(a),a.unsubscribe());(a=this.buffer)&&this.destination.next(a);this.buffer=[];var c=l.tryCatch(this.closingSelector)();c===h.errorObject?this.error(h.errorObject.e):(this.closingSubscription=a=new k.Subscription,this.add(a),this.subscribing=!0,a.add(e.subscribeToResult(this,c)),this.subscribing=!1)};return c}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../Subscription":10,
|
||||
"../util/errorObject":239,"../util/subscribeToResult":250,"../util/tryCatch":253}],140:[function(a,b,f){var g=a("./publishReplay");f.cache=function(a,b,h){void 0===a&&(a=Number.POSITIVE_INFINITY);void 0===b&&(b=Number.POSITIVE_INFINITY);return g.publishReplay.call(this,a,b,h).refCount()}},{"./publishReplay":182}],141:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=
|
||||
e.prototype,new d)};a=a("../Subscriber");f._catch=function(a){a=new k(a);var e=this.lift(a);return a.caught=e};var k=function(){function a(e){this.selector=e}a.prototype.call=function(a){return new l(a,this.selector,this.caught)};return a}(),l=function(a){function e(d,c,e){a.call(this,d);this.selector=c;this.caught=e}g(e,a);e.prototype.error=function(a){if(!this.isStopped){var c=void 0;try{c=this.selector(a,this.caught)}catch(e){this.destination.error(e);return}this._innerSub(c)}};e.prototype._innerSub=
|
||||
function(a){this.unsubscribe();this.destination.remove(this);a.subscribe(this.destination)};return e}(a.Subscriber)},{"../Subscriber":9}],142:[function(a,b,f){var g=a("./combineLatest");f.combineAll=function(a){return this.lift(new g.CombineLatestOperator(a))}},{"./combineLatest":143}],143:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},
|
||||
k=a("../observable/ArrayObservable"),l=a("../util/isArray"),h=a("../util/isScheduler");b=a("../OuterSubscriber");var e=a("../util/subscribeToResult");f.combineLatest=function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];c=null;"function"===typeof a[a.length-1]&&(c=a.pop());1===a.length&&l.isArray(a[0])&&(a=a[0]);a.unshift(this);return(new k.ArrayObservable(a)).lift(new d(c))};f.combineLatestStatic=function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];var e=c=null;
|
||||
h.isScheduler(a[a.length-1])&&(e=a.pop());"function"===typeof a[a.length-1]&&(c=a.pop());1===a.length&&l.isArray(a[0])&&(a=a[0]);return(new k.ArrayObservable(a,e)).lift(new d(c))};var d=function(){function a(c){this.project=c}a.prototype.call=function(a){return new c(a,this.project)};return a}();f.CombineLatestOperator=d;var c=function(a){function c(d,e){a.call(this,d);this.project=e;this.active=0;this.values=[];this.observables=[];this.toRespond=[]}g(c,a);c.prototype._next=function(a){var c=this.toRespond;
|
||||
c.push(c.length);this.observables.push(a)};c.prototype._complete=function(){var a=this.observables,c=a.length;if(0===c)this.destination.complete();else{this.active=c;for(var d=0;d<c;d++){var b=a[d];this.add(e.subscribeToResult(this,b,b,d))}}};c.prototype.notifyComplete=function(a){0===--this.active&&this.destination.complete()};c.prototype.notifyNext=function(a,c,d,e,b){a=this.values;a[d]=c;c=this.toRespond;0<c.length&&(d=c.indexOf(d),-1!==d&&c.splice(d,1));0===c.length&&(this.project?this._tryProject(a):
|
||||
this.destination.next(a))};c.prototype._tryProject=function(a){var c;try{c=this.project.apply(this,a)}catch(d){this.destination.error(d);return}this.destination.next(c)};return c}(b.OuterSubscriber);f.CombineLatestSubscriber=c},{"../OuterSubscriber":6,"../observable/ArrayObservable":116,"../util/isArray":240,"../util/isScheduler":246,"../util/subscribeToResult":250}],144:[function(a,b,f){function g(){for(var a=[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];d=null;k.isScheduler(a[a.length-1])&&
|
||||
(d=a.pop());return(new l.ArrayObservable(a,d)).lift(new h.MergeAllOperator(1))}var k=a("../util/isScheduler"),l=a("../observable/ArrayObservable"),h=a("./mergeAll");f.concat=function(){for(var a=[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];return g.apply(void 0,[this].concat(a))};f.concatStatic=g},{"../observable/ArrayObservable":116,"../util/isScheduler":246,"./mergeAll":172}],145:[function(a,b,f){var g=a("./mergeAll");f.concatAll=function(){return this.lift(new g.MergeAllOperator(1))}},{"./mergeAll":172}],
|
||||
146:[function(a,b,f){var g=a("./mergeMap");f.concatMap=function(a,b){return this.lift(new g.MergeMapOperator(a,b,1))}},{"./mergeMap":173}],147:[function(a,b,f){var g=a("./mergeMapTo");f.concatMapTo=function(a,b){return this.lift(new g.MergeMapToOperator(a,b,1))}},{"./mergeMapTo":174}],148:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};a=
|
||||
a("../Subscriber");f.count=function(a){return this.lift(new k(a,this))};var k=function(){function a(e,d){this.predicate=e;this.source=d}a.prototype.call=function(a){return new l(a,this.predicate,this.source)};return a}(),l=function(a){function e(d,c,e){a.call(this,d);this.predicate=c;this.source=e;this.index=this.count=0}g(e,a);e.prototype._next=function(a){this.predicate?this._tryPredicate(a):this.count++};e.prototype._tryPredicate=function(a){var c;try{c=this.predicate(a,this.index++,this.source)}catch(e){this.destination.error(e);
|
||||
return}c&&this.count++};e.prototype._complete=function(){this.destination.next(this.count);this.destination.complete()};return e}(a.Subscriber)},{"../Subscriber":9}],149:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.debounce=function(a){return this.lift(new l(a))};var l=function(){function a(d){this.durationSelector=
|
||||
d}a.prototype.call=function(a){return new h(a,this.durationSelector)};return a}(),h=function(a){function d(c,d){a.call(this,c);this.durationSelector=d;this.hasValue=!1;this.durationSubscription=null}g(d,a);d.prototype._next=function(a){try{var d=this.durationSelector.call(this,a);d&&this._tryNext(a,d)}catch(e){this.destination.error(e)}};d.prototype._complete=function(){this.emitValue();this.destination.complete()};d.prototype._tryNext=function(a,d){var e=this.durationSubscription;this.value=a;this.hasValue=
|
||||
!0;e&&(e.unsubscribe(),this.remove(e));e=k.subscribeToResult(this,d);e.isUnsubscribed||this.add(this.durationSubscription=e)};d.prototype.notifyNext=function(a,d,e,b,h){this.emitValue()};d.prototype.notifyComplete=function(){this.emitValue()};d.prototype.emitValue=function(){if(this.hasValue){var c=this.value,d=this.durationSubscription;d&&(this.durationSubscription=null,d.unsubscribe(),this.remove(d));this.value=null;this.hasValue=!1;a.prototype._next.call(this,c)}};return d}(b.OuterSubscriber)},
|
||||
{"../OuterSubscriber":6,"../util/subscribeToResult":250}],150:[function(a,b,f){function g(a){a.debouncedNext()}var k=this&&this.__extends||function(a,c){function e(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(e.prototype=c.prototype,new e)};b=a("../Subscriber");var l=a("../scheduler/asap");f.debounceTime=function(a,c){void 0===c&&(c=l.asap);return this.lift(new h(a,c))};var h=function(){function a(c,d){this.dueTime=c;this.scheduler=d}
|
||||
a.prototype.call=function(a){return new e(a,this.dueTime,this.scheduler)};return a}(),e=function(a){function c(c,e,b){a.call(this,c);this.dueTime=e;this.scheduler=b;this.lastValue=this.debouncedSubscription=null;this.hasValue=!1}k(c,a);c.prototype._next=function(a){this.clearDebounce();this.lastValue=a;this.hasValue=!0;this.add(this.debouncedSubscription=this.scheduler.schedule(g,this.dueTime,this))};c.prototype._complete=function(){this.debouncedNext();this.destination.complete()};c.prototype.debouncedNext=
|
||||
function(){this.clearDebounce();this.hasValue&&(this.destination.next(this.lastValue),this.lastValue=null,this.hasValue=!1)};c.prototype.clearDebounce=function(){var a=this.debouncedSubscription;null!==a&&(this.remove(a),a.unsubscribe(),this.debouncedSubscription=null)};return c}(b.Subscriber)},{"../Subscriber":9,"../scheduler/asap":224}],151:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===
|
||||
e?Object.create(e):(d.prototype=e.prototype,new d)};a=a("../Subscriber");f.defaultIfEmpty=function(a){void 0===a&&(a=null);return this.lift(new k(a))};var k=function(){function a(e){this.defaultValue=e}a.prototype.call=function(a){return new l(a,this.defaultValue)};return a}(),l=function(a){function e(d,c){a.call(this,d);this.defaultValue=c;this.isEmpty=!0}g(e,a);e.prototype._next=function(a){this.isEmpty=!1;this.destination.next(a)};e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue);
|
||||
this.destination.complete()};return e}(a.Subscriber)},{"../Subscriber":9}],152:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("../scheduler/asap"),l=a("../util/isDate");b=a("../Subscriber");var h=a("../Notification");f.delay=function(a,c){void 0===c&&(c=k.asap);var d=l.isDate(a)?+a-c.now():Math.abs(a);return this.lift(new e(d,c))};var e=
|
||||
function(){function a(c,d){this.delay=c;this.scheduler=d}a.prototype.call=function(a){return new d(a,this.delay,this.scheduler)};return a}(),d=function(a){function d(c,e,b){a.call(this,c);this.delay=e;this.scheduler=b;this.queue=[];this.errored=this.active=!1}g(d,a);d.dispatch=function(a){for(var c=a.source,d=c.queue,e=a.scheduler,b=a.destination;0<d.length&&0>=d[0].time-e.now();)d.shift().notification.observe(b);0<d.length?(c=Math.max(0,d[0].time-e.now()),this.schedule(a,c)):c.active=!1};d.prototype._schedule=
|
||||
function(a){this.active=!0;this.add(a.schedule(d.dispatch,this.delay,{source:this,destination:this.destination,scheduler:a}))};d.prototype.scheduleNotification=function(a){if(!0!==this.errored){var d=this.scheduler;a=new c(d.now()+this.delay,a);this.queue.push(a);!1===this.active&&this._schedule(d)}};d.prototype._next=function(a){this.scheduleNotification(h.Notification.createNext(a))};d.prototype._error=function(a){this.errored=!0;this.queue=[];this.destination.error(a)};d.prototype._complete=function(){this.scheduleNotification(h.Notification.createComplete())};
|
||||
return d}(b.Subscriber),c=function(){return function(a,c){this.time=a;this.notification=c}}()},{"../Notification":2,"../Subscriber":9,"../scheduler/asap":224,"../util/isDate":241}],153:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Subscriber");var k=a("../Observable"),l=a("../OuterSubscriber"),h=a("../util/subscribeToResult");f.delayWhen=
|
||||
function(a,d){return d?(new c(this,d)).lift(new e(a)):this.lift(new e(a))};var e=function(){function a(c){this.delayDurationSelector=c}a.prototype.call=function(a){return new d(a,this.delayDurationSelector)};return a}(),d=function(a){function c(d,e){a.call(this,d);this.delayDurationSelector=e;this.completed=!1;this.delayNotifierSubscriptions=[];this.values=[]}g(c,a);c.prototype.notifyNext=function(a,c,d,e,b){this.destination.next(a);this.removeSubscription(b);this.tryComplete()};c.prototype.notifyError=
|
||||
function(a,c){this._error(a)};c.prototype.notifyComplete=function(a){(a=this.removeSubscription(a))&&this.destination.next(a);this.tryComplete()};c.prototype._next=function(a){try{var c=this.delayDurationSelector(a);c&&this.tryDelay(c,a)}catch(d){this.destination.error(d)}};c.prototype._complete=function(){this.completed=!0;this.tryComplete()};c.prototype.removeSubscription=function(a){a.unsubscribe();a=this.delayNotifierSubscriptions.indexOf(a);var c=null;-1!==a&&(c=this.values[a],this.delayNotifierSubscriptions.splice(a,
|
||||
1),this.values.splice(a,1));return c};c.prototype.tryDelay=function(a,c){var d=h.subscribeToResult(this,a,c);this.add(d);this.delayNotifierSubscriptions.push(d);this.values.push(c)};c.prototype.tryComplete=function(){this.completed&&0===this.delayNotifierSubscriptions.length&&this.destination.complete()};return c}(l.OuterSubscriber),c=function(a){function c(d,e){a.call(this);this.source=d;this.subscriptionDelay=e}g(c,a);c.prototype._subscribe=function(a){this.subscriptionDelay.subscribe(new m(a,this.source))};
|
||||
return c}(k.Observable),m=function(a){function c(d,e){a.call(this);this.parent=d;this.source=e;this.sourceSubscribed=!1}g(c,a);c.prototype._next=function(a){this.subscribeToSource()};c.prototype._error=function(a){this.unsubscribe();this.parent.error(a)};c.prototype._complete=function(){this.subscribeToSource()};c.prototype.subscribeToSource=function(){this.sourceSubscribed||(this.sourceSubscribed=!0,this.unsubscribe(),this.source.subscribe(this.parent))};return c}(b.Subscriber)},{"../Observable":3,
|
||||
"../OuterSubscriber":6,"../Subscriber":9,"../util/subscribeToResult":250}],154:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};a=a("../Subscriber");f.dematerialize=function(){return this.lift(new k)};var k=function(){function a(){}a.prototype.call=function(a){return new l(a)};return a}(),l=function(a){function e(d){a.call(this,d)}g(e,a);
|
||||
e.prototype._next=function(a){a.observe(this.destination)};return e}(a.Subscriber)},{"../Subscriber":9}],155:[function(a,b,f){var g=this&&this.__extends||function(a,c){function e(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(e.prototype=c.prototype,new e)};b=a("../Subscriber");var k=a("../util/tryCatch"),l=a("../util/errorObject");f.distinctUntilChanged=function(a,c){return this.lift(new h(a,c))};var h=function(){function a(c,d){this.compare=
|
||||
c;this.keySelector=d}a.prototype.call=function(a){return new e(a,this.compare,this.keySelector)};return a}(),e=function(a){function c(c,e,b){a.call(this,c);this.keySelector=b;this.hasKey=!1;"function"===typeof e&&(this.compare=e)}g(c,a);c.prototype.compare=function(a,c){return a===c};c.prototype._next=function(a){var c=a;if(this.keySelector&&(c=k.tryCatch(this.keySelector)(a),c===l.errorObject))return this.destination.error(l.errorObject.e);var d=!1;if(this.hasKey){if(d=k.tryCatch(this.compare)(this.key,
|
||||
c),d===l.errorObject)return this.destination.error(l.errorObject.e)}else this.hasKey=!0;!1===!!d&&(this.key=c,this.destination.next(a))};return c}(b.Subscriber)},{"../Subscriber":9,"../util/errorObject":239,"../util/tryCatch":253}],156:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../util/noop");f._do=function(a,
|
||||
d,c){var b;a&&"object"===typeof a?(b=a.next,d=a.error,c=a.complete):b=a;return this.lift(new l(b||k.noop,d||k.noop,c||k.noop))};var l=function(){function a(d,c,e){this.next=d;this.error=c;this.complete=e}a.prototype.call=function(a){return new h(a,this.next,this.error,this.complete)};return a}(),h=function(a){function d(c,d,b,h){a.call(this,c);this.__next=d;this.__error=b;this.__complete=h}g(d,a);d.prototype._next=function(a){try{this.__next(a)}catch(d){this.destination.error(d);return}this.destination.next(a)};
|
||||
d.prototype._error=function(a){try{this.__error(a)}catch(d){this.destination.error(d);return}this.destination.error(a)};d.prototype._complete=function(){try{this.__complete()}catch(a){this.destination.error(a);return}this.destination.complete()};return d}(b.Subscriber)},{"../Subscriber":9,"../util/noop":247}],157:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=
|
||||
e.prototype,new d)};a=a("../Subscriber");f.every=function(a,e){return this.lift(new k(a,e,this))};var k=function(){function a(e,d,c){this.predicate=e;this.thisArg=d;this.source=c}a.prototype.call=function(a){return new l(a,this.predicate,this.thisArg,this.source)};return a}(),l=function(a){function e(d,c,e,b){a.call(this,d);this.predicate=c;this.thisArg=e;this.source=b;this.index=0;this.thisArg=e||this}g(e,a);e.prototype.notifyComplete=function(a){this.destination.next(a);this.destination.complete()};
|
||||
e.prototype._next=function(a){var c=!1;try{c=this.predicate.call(this.thisArg,a,this.index++,this.source)}catch(e){this.destination.error(e);return}c||this.notifyComplete(!1)};e.prototype._complete=function(){this.notifyComplete(!0)};return e}(a.Subscriber)},{"../Subscriber":9}],158:[function(a,b,f){var g=this&&this.__extends||function(a,d){function e(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(e.prototype=d.prototype,new e)},k=a("../util/tryCatch"),
|
||||
l=a("../util/errorObject");b=a("../OuterSubscriber");var h=a("../util/subscribeToResult");f.expand=function(a,d,b){void 0===d&&(d=Number.POSITIVE_INFINITY);void 0===b&&(b=void 0);d=1>(d||0)?Number.POSITIVE_INFINITY:d;return this.lift(new e(a,d,b))};var e=function(){function a(c,d,e){this.project=c;this.concurrent=d;this.scheduler=e}a.prototype.call=function(a){return new d(a,this.project,this.concurrent,this.scheduler)};return a}();f.ExpandOperator=e;var d=function(a){function d(e,b,m,h){a.call(this,
|
||||
e);this.project=b;this.concurrent=m;this.scheduler=h;this.active=this.index=0;this.hasCompleted=!1;m<Number.POSITIVE_INFINITY&&(this.buffer=[])}g(d,a);d.dispatch=function(a){a.subscriber.subscribeToProjection(a.result,a.value,a.index)};d.prototype._next=function(a){var c=this.destination;if(c.isUnsubscribed)this._complete();else{var e=this.index++;if(this.active<this.concurrent){c.next(a);var b=k.tryCatch(this.project)(a,e);b===l.errorObject?c.error(l.errorObject.e):this.scheduler?this.add(this.scheduler.schedule(d.dispatch,
|
||||
0,{subscriber:this,result:b,value:a,index:e})):this.subscribeToProjection(b,a,e)}else this.buffer.push(a)}};d.prototype.subscribeToProjection=function(a,c,d){this.active++;this.add(h.subscribeToResult(this,a,c,d))};d.prototype._complete=function(){(this.hasCompleted=!0,0===this.active)&&this.destination.complete()};d.prototype.notifyNext=function(a,c,d,e,b){this._next(c)};d.prototype.notifyComplete=function(a){var c=this.buffer;this.remove(a);this.active--;c&&0<c.length&&this._next(c.shift());this.hasCompleted&&
|
||||
0===this.active&&this.destination.complete()};return d}(b.OuterSubscriber);f.ExpandSubscriber=d},{"../OuterSubscriber":6,"../util/errorObject":239,"../util/subscribeToResult":250,"../util/tryCatch":253}],159:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};a=a("../Subscriber");f.filter=function(a,e){return this.lift(new k(a,e))};var k=function(){function a(e,
|
||||
d){this.select=e;this.thisArg=d}a.prototype.call=function(a){return new l(a,this.select,this.thisArg)};return a}(),l=function(a){function e(d,c,e){a.call(this,d);this.select=c;this.thisArg=e;this.count=0;this.select=c}g(e,a);e.prototype._next=function(a){var c;try{c=this.select.call(this.thisArg,a,this.count++)}catch(e){this.destination.error(e);return}c&&this.destination.next(a)};return e}(a.Subscriber)},{"../Subscriber":9}],160:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=
|
||||
a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../Subscription");f._finally=function(a){return this.lift(new l(a))};var l=function(){function a(d){this.finallySelector=d}a.prototype.call=function(a){return new h(a,this.finallySelector)};return a}(),h=function(a){function d(c,d){a.call(this,c);this.add(new k.Subscription(d))}g(d,a);return d}(b.Subscriber)},{"../Subscriber":9,"../Subscription":10}],
|
||||
161:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../util/EmptyError");f.first=function(a,d,c){return this.lift(new l(a,d,c,this))};var l=function(){function a(d,c,e,b){this.predicate=d;this.resultSelector=c;this.defaultValue=e;this.source=b}a.prototype.call=function(a){return new h(a,this.predicate,this.resultSelector,
|
||||
this.defaultValue,this.source)};return a}(),h=function(a){function d(c,d,b,h,f){a.call(this,c);this.predicate=d;this.resultSelector=b;this.defaultValue=h;this.source=f;this.index=0;this.hasCompleted=!1}g(d,a);d.prototype._next=function(a){var d=this.index++;this.predicate?this._tryPredicate(a,d):this._emit(a,d)};d.prototype._tryPredicate=function(a,d){var e;try{e=this.predicate(a,d,this.source)}catch(b){this.destination.error(b);return}e&&this._emit(a,d)};d.prototype._emit=function(a,d){this.resultSelector?
|
||||
this._tryResultSelector(a,d):this._emitFinal(a)};d.prototype._tryResultSelector=function(a,d){var e;try{e=this.resultSelector(a,d)}catch(b){this.destination.error(b);return}this._emitFinal(e)};d.prototype._emitFinal=function(a){var d=this.destination;d.next(a);d.complete();this.hasCompleted=!0};d.prototype._complete=function(){var a=this.destination;this.hasCompleted||"undefined"===typeof this.defaultValue?this.hasCompleted||a.error(new k.EmptyError):(a.next(this.defaultValue),a.complete())};return d}(b.Subscriber)},
|
||||
{"../Subscriber":9,"../util/EmptyError":232}],162:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Subscriber");var k=a("../Subscription"),l=a("../Observable"),h=a("../Operator"),e=a("../Subject"),d=a("../util/Map"),c=a("../util/FastMap");f.groupBy=function(a,c,d){return this.lift(new m(this,a,c,d))};var m=function(a){function c(d,
|
||||
e,b,m){a.call(this);this.source=d;this.keySelector=e;this.elementSelector=b;this.durationSelector=m}g(c,a);c.prototype.call=function(a){return new n(a,this.keySelector,this.elementSelector,this.durationSelector)};return c}(h.Operator),n=function(a){function b(c,d,e,m){a.call(this);this.keySelector=d;this.elementSelector=e;this.durationSelector=m;this.groups=null;this.attemptedToUnsubscribe=!1;this.count=0;this.destination=c;this.add(c)}g(b,a);b.prototype._next=function(a){var c;try{c=this.keySelector(a)}catch(d){this.error(d);
|
||||
return}this._group(a,c)};b.prototype._group=function(a,b){var m=this.groups;m||(m=this.groups="string"===typeof b?new c.FastMap:new d.Map);var h=m.get(b);h||(m.set(b,h=new e.Subject),m=new p(b,h,this),this.durationSelector&&this._selectDuration(b,h),this.destination.next(m));this.elementSelector?this._selectElement(a,h):this.tryGroupNext(a,h)};b.prototype._selectElement=function(a,c){var d;try{d=this.elementSelector(a)}catch(e){this.error(e);return}this.tryGroupNext(d,c)};b.prototype._selectDuration=
|
||||
function(a,c){var d;try{d=this.durationSelector(new p(a,c))}catch(e){this.error(e);return}this.add(d.subscribe(new q(a,c,this)))};b.prototype.tryGroupNext=function(a,c){c.isUnsubscribed||c.next(a)};b.prototype._error=function(a){var c=this.groups;c&&(c.forEach(function(c,d){c.error(a)}),c.clear());this.destination.error(a)};b.prototype._complete=function(){var a=this.groups;a&&(a.forEach(function(a,c){a.complete()}),a.clear());this.destination.complete()};b.prototype.removeGroup=function(a){this.groups["delete"](a)};
|
||||
b.prototype.unsubscribe=function(){this.isUnsubscribed||this.attemptedToUnsubscribe||(this.attemptedToUnsubscribe=!0,0===this.count&&a.prototype.unsubscribe.call(this))};return b}(b.Subscriber),q=function(a){function c(d,e,b){a.call(this);this.key=d;this.group=e;this.parent=b}g(c,a);c.prototype._next=function(a){this.tryComplete()};c.prototype._error=function(a){this.tryError(a)};c.prototype._complete=function(){this.tryComplete()};c.prototype.tryError=function(a){var c=this.group;c.isUnsubscribed||
|
||||
c.error(a);this.parent.removeGroup(this.key)};c.prototype.tryComplete=function(){var a=this.group;a.isUnsubscribed||a.complete();this.parent.removeGroup(this.key)};return c}(b.Subscriber),p=function(a){function c(d,e,b){a.call(this);this.key=d;this.groupSubject=e;this.refCountSubscription=b}g(c,a);c.prototype._subscribe=function(a){var c=new k.Subscription,d=this.refCountSubscription,e=this.groupSubject;d&&!d.isUnsubscribed&&c.add(new u(d));c.add(e.subscribe(a));return c};return c}(l.Observable);
|
||||
f.GroupedObservable=p;var u=function(a){function c(d){a.call(this);this.parent=d;d.count++}g(c,a);c.prototype.unsubscribe=function(){var c=this.parent;c.isUnsubscribed||this.isUnsubscribed||(a.prototype.unsubscribe.call(this),--c.count,0===c.count&&c.attemptedToUnsubscribe&&c.unsubscribe())};return c}(k.Subscription)},{"../Observable":3,"../Operator":5,"../Subject":8,"../Subscriber":9,"../Subscription":10,"../util/FastMap":233,"../util/Map":235}],163:[function(a,b,f){var g=this&&this.__extends||function(a,
|
||||
d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../util/noop");f.ignoreElements=function(){return this.lift(new l)};var l=function(){function a(){}a.prototype.call=function(a){return new h(a)};return a}(),h=function(a){function d(){a.apply(this,arguments)}g(d,a);d.prototype._next=function(a){k.noop()};return d}(b.Subscriber)},{"../Subscriber":9,"../util/noop":247}],
|
||||
164:[function(a,b,f){var g=this&&this.__extends||function(a,d){function e(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(e.prototype=d.prototype,new e)},k=a("../util/tryCatch"),l=a("../util/errorObject");b=a("../OuterSubscriber");var h=a("../util/subscribeToResult");f.inspect=function(a){return this.lift(new e(a))};var e=function(){function a(c){this.durationSelector=c}a.prototype.call=function(a){return new d(a,this.durationSelector)};
|
||||
return a}(),d=function(a){function d(e,b){a.call(this,e);this.durationSelector=b;this.hasValue=!1}g(d,a);d.prototype._next=function(a){this.value=a;this.hasValue=!0;this.throttled||(a=k.tryCatch(this.durationSelector)(a),a===l.errorObject?this.destination.error(l.errorObject.e):this.add(this.throttled=h.subscribeToResult(this,a)))};d.prototype.clearThrottle=function(){var a=this.value,c=this.hasValue,d=this.throttled;d&&(this.remove(d),this.throttled=null,d.unsubscribe());c&&(this.value=null,this.hasValue=
|
||||
!1,this.destination.next(a))};d.prototype.notifyNext=function(a,c,d,e){this.clearThrottle()};d.prototype.notifyComplete=function(){this.clearThrottle()};return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../util/errorObject":239,"../util/subscribeToResult":250,"../util/tryCatch":253}],165:[function(a,b,f){function g(a){a.clearThrottle()}var k=this&&this.__extends||function(a,c){function e(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):
|
||||
(e.prototype=c.prototype,new e)},l=a("../scheduler/asap");a=a("../Subscriber");f.inspectTime=function(a,c){void 0===c&&(c=l.asap);return this.lift(new h(a,c))};var h=function(){function a(c,d){this.delay=c;this.scheduler=d}a.prototype.call=function(a){return new e(a,this.delay,this.scheduler)};return a}(),e=function(a){function c(c,e,b){a.call(this,c);this.delay=e;this.scheduler=b;this.hasValue=!1}k(c,a);c.prototype._next=function(a){this.value=a;this.hasValue=!0;this.throttled||this.add(this.throttled=
|
||||
this.scheduler.schedule(g,this.delay,this))};c.prototype.clearThrottle=function(){var a=this.value,c=this.hasValue,d=this.throttled;d&&(this.remove(d),this.throttled=null,d.unsubscribe());c&&(this.value=null,this.hasValue=!1,this.destination.next(a))};return c}(a.Subscriber)},{"../Subscriber":9,"../scheduler/asap":224}],166:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):
|
||||
(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../util/EmptyError");f.last=function(a,d,c){return this.lift(new l(a,d,c,this))};var l=function(){function a(d,c,e,b){this.predicate=d;this.resultSelector=c;this.defaultValue=e;this.source=b}a.prototype.call=function(a){return new h(a,this.predicate,this.resultSelector,this.defaultValue,this.source)};return a}(),h=function(a){function d(c,d,b,h,f){a.call(this,c);this.predicate=d;this.resultSelector=b;this.defaultValue=h;this.source=f;
|
||||
this.hasValue=!1;this.index=0;"undefined"!==typeof h&&(this.lastValue=h,this.hasValue=!0)}g(d,a);d.prototype._next=function(a){var d=this.index++;this.predicate?this._tryPredicate(a,d):this.resultSelector?this._tryResultSelector(a,d):(this.lastValue=a,this.hasValue=!0)};d.prototype._tryPredicate=function(a,d){var e;try{e=this.predicate(a,d,this.source)}catch(b){this.destination.error(b);return}e&&(this.resultSelector?this._tryResultSelector(a,d):(this.lastValue=a,this.hasValue=!0))};d.prototype._tryResultSelector=
|
||||
function(a,d){var e;try{e=this.resultSelector(a,d)}catch(b){this.destination.error(b);return}this.lastValue=e;this.hasValue=!0};d.prototype._complete=function(){var a=this.destination;this.hasValue?(a.next(this.lastValue),a.complete()):a.error(new k.EmptyError)};return d}(b.Subscriber)},{"../Subscriber":9,"../util/EmptyError":232}],167:[function(a,b,f){f.letProto=function(a){return a(this)}},{}],168:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&
|
||||
(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};a=a("../Subscriber");f.map=function(a,e){if("function"!==typeof a)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return this.lift(new k(a,e))};var k=function(){function a(e,d){this.project=e;this.thisArg=d}a.prototype.call=function(a){return new l(a,this.project,this.thisArg)};return a}(),l=function(a){function e(d,c,e){a.call(this,d);this.project=c;this.count=0;this.thisArg=e||this}
|
||||
g(e,a);e.prototype._next=function(a){var c;try{c=this.project.call(this.thisArg,a,this.count++)}catch(e){this.destination.error(e);return}this.destination.next(c)};return e}(a.Subscriber)},{"../Subscriber":9}],169:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};a=a("../Subscriber");f.mapTo=function(a){return this.lift(new k(a))};var k=function(){function a(e){this.value=
|
||||
e}a.prototype.call=function(a){return new l(a,this.value)};return a}(),l=function(a){function e(d,c){a.call(this,d);this.value=c}g(e,a);e.prototype._next=function(a){this.destination.next(this.value)};return e}(a.Subscriber)},{"../Subscriber":9}],170:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../Notification");
|
||||
f.materialize=function(){return this.lift(new l)};var l=function(){function a(){}a.prototype.call=function(a){return new h(a)};return a}(),h=function(a){function d(c){a.call(this,c)}g(d,a);d.prototype._next=function(a){this.destination.next(k.Notification.createNext(a))};d.prototype._error=function(a){var d=this.destination;d.next(k.Notification.createError(a));d.complete()};d.prototype._complete=function(){var a=this.destination;a.next(k.Notification.createComplete());a.complete()};return d}(b.Subscriber)},
|
||||
{"../Notification":2,"../Subscriber":9}],171:[function(a,b,f){function g(){for(var a=[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];var d=Number.POSITIVE_INFINITY,c=null,b=a[a.length-1];h.isScheduler(b)?(c=a.pop(),1<a.length&&"number"===typeof a[a.length-1]&&(d=a.pop())):"number"===typeof b&&(d=a.pop());return 1===a.length?a[0]:(new k.ArrayObservable(a,c)).lift(new l.MergeAllOperator(d))}var k=a("../observable/ArrayObservable"),l=a("./mergeAll"),h=a("../util/isScheduler");f.merge=function(){for(var a=
|
||||
[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];a.unshift(this);return g.apply(this,a)};f.mergeStatic=g},{"../observable/ArrayObservable":116,"../util/isScheduler":246,"./mergeAll":172}],172:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.mergeAll=function(a){void 0===a&&
|
||||
(a=Number.POSITIVE_INFINITY);return this.lift(new l(a))};var l=function(){function a(d){this.concurrent=d}a.prototype.call=function(a){return new h(a,this.concurrent)};return a}();f.MergeAllOperator=l;var h=function(a){function d(c,d){a.call(this,c);this.concurrent=d;this.hasCompleted=!1;this.buffer=[];this.active=0}g(d,a);d.prototype._next=function(a){this.active<this.concurrent?(this.active++,this.add(k.subscribeToResult(this,a))):this.buffer.push(a)};d.prototype._complete=function(){this.hasCompleted=
|
||||
!0;0===this.active&&0===this.buffer.length&&this.destination.complete()};d.prototype.notifyComplete=function(a){var d=this.buffer;this.remove(a);this.active--;0<d.length?this._next(d.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()};return d}(b.OuterSubscriber);f.MergeAllSubscriber=h},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],173:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=
|
||||
d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)},k=a("../util/subscribeToResult");a=a("../OuterSubscriber");f.mergeMap=function(a,d,c){void 0===c&&(c=Number.POSITIVE_INFINITY);return this.lift(new l(a,d,c))};var l=function(){function a(d,c,e){void 0===e&&(e=Number.POSITIVE_INFINITY);this.project=d;this.resultSelector=c;this.concurrent=e}a.prototype.call=function(a){return new h(a,this.project,this.resultSelector,this.concurrent)};return a}();f.MergeMapOperator=l;var h=
|
||||
function(a){function d(c,d,b,f){void 0===f&&(f=Number.POSITIVE_INFINITY);a.call(this,c);this.project=d;this.resultSelector=b;this.concurrent=f;this.hasCompleted=!1;this.buffer=[];this.index=this.active=0}g(d,a);d.prototype._next=function(a){this.active<this.concurrent?this._tryNext(a):this.buffer.push(a)};d.prototype._tryNext=function(a){var d,e=this.index++;try{d=this.project(a,e)}catch(b){this.destination.error(b);return}this.active++;this._innerSub(d,a,e)};d.prototype._innerSub=function(a,d,e){this.add(k.subscribeToResult(this,
|
||||
a,d,e))};d.prototype._complete=function(){this.hasCompleted=!0;0===this.active&&0===this.buffer.length&&this.destination.complete()};d.prototype.notifyNext=function(a,d,e,b,f){this.resultSelector?this._notifyResultSelector(a,d,e,b):this.destination.next(d)};d.prototype._notifyResultSelector=function(a,d,e,b){var f;try{f=this.resultSelector(a,d,e,b)}catch(h){this.destination.error(h);return}this.destination.next(f)};d.prototype.notifyComplete=function(a){var d=this.buffer;this.remove(a);this.active--;
|
||||
0<d.length?this._next(d.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()};return d}(a.OuterSubscriber);f.MergeMapSubscriber=h},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],174:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.mergeMapTo=function(a,
|
||||
d,c){void 0===c&&(c=Number.POSITIVE_INFINITY);return this.lift(new l(a,d,c))};var l=function(){function a(d,c,e){void 0===e&&(e=Number.POSITIVE_INFINITY);this.ish=d;this.resultSelector=c;this.concurrent=e}a.prototype.call=function(a){return new h(a,this.ish,this.resultSelector,this.concurrent)};return a}();f.MergeMapToOperator=l;var h=function(a){function d(c,d,b,f){void 0===f&&(f=Number.POSITIVE_INFINITY);a.call(this,c);this.ish=d;this.resultSelector=b;this.concurrent=f;this.hasCompleted=!1;this.buffer=
|
||||
[];this.index=this.active=0}g(d,a);d.prototype._next=function(a){if(this.active<this.concurrent){var d=this.resultSelector,e=this.index++,b=this.ish,f=this.destination;this.active++;this._innerSub(b,f,d,a,e)}else this.buffer.push(a)};d.prototype._innerSub=function(a,d,e,b,f){this.add(k.subscribeToResult(this,a,b,f))};d.prototype._complete=function(){this.hasCompleted=!0;0===this.active&&0===this.buffer.length&&this.destination.complete()};d.prototype.notifyNext=function(a,d,e,b,f){f=this.destination;
|
||||
this.resultSelector?this.trySelectResult(a,d,e,b):f.next(d)};d.prototype.trySelectResult=function(a,d,e,b){var f=this.resultSelector,h=this.destination,k;try{k=f(a,d,e,b)}catch(l){h.error(l);return}h.next(k)};d.prototype.notifyError=function(a){this.destination.error(a)};d.prototype.notifyComplete=function(a){var d=this.buffer;this.remove(a);this.active--;0<d.length?this._next(d.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()};return d}(b.OuterSubscriber);f.MergeMapToSubscriber=
|
||||
h},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],175:[function(a,b,f){var g=a("../observable/ConnectableObservable");f.multicast=function(a){return new g.ConnectableObservable(this,"function"===typeof a?a:function(){return a})}},{"../observable/ConnectableObservable":119}],176:[function(a,b,f){var g=this&&this.__extends||function(a,c){function e(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(e.prototype=c.prototype,new e)};b=
|
||||
a("../Subscriber");var k=a("../Notification");f.observeOn=function(a,c){void 0===c&&(c=0);return this.lift(new l(a,c))};var l=function(){function a(c,d){void 0===d&&(d=0);this.scheduler=c;this.delay=d}a.prototype.call=function(a){return new h(a,this.scheduler,this.delay)};return a}();f.ObserveOnOperator=l;var h=function(a){function c(c,e,b){void 0===b&&(b=0);a.call(this,c);this.scheduler=e;this.delay=b}g(c,a);c.dispatch=function(a){a.notification.observe(a.destination)};c.prototype.scheduleMessage=
|
||||
function(a){this.add(this.scheduler.schedule(c.dispatch,this.delay,new e(a,this.destination)))};c.prototype._next=function(a){this.scheduleMessage(k.Notification.createNext(a))};c.prototype._error=function(a){this.scheduleMessage(k.Notification.createError(a))};c.prototype._complete=function(){this.scheduleMessage(k.Notification.createComplete())};return c}(b.Subscriber);f.ObserveOnSubscriber=h;var e=function(){return function(a,c){this.notification=a;this.destination=c}}()},{"../Notification":2,
|
||||
"../Subscriber":9}],177:[function(a,b,f){var g=a("../util/not"),k=a("./filter");f.partition=function(a,b){return[k.filter.call(this,a),k.filter.call(this,g.not(a,b))]}},{"../util/not":248,"./filter":159}],178:[function(a,b,f){function g(a,b){return function(e){var d=e;for(e=0;e<b;e++)if(d=d[a[e]],"undefined"===typeof d)return;return d}}var k=a("./map");f.pluck=function(){for(var a=[],b=0;b<arguments.length;b++)a[b-0]=arguments[b];b=a.length;if(0===b)throw Error("List of properties cannot be empty.");
|
||||
return k.map.call(this,g(a,b))}},{"./map":168}],179:[function(a,b,f){var g=a("../Subject"),k=a("./multicast");f.publish=function(){return k.multicast.call(this,new g.Subject)}},{"../Subject":8,"./multicast":175}],180:[function(a,b,f){var g=a("../subject/BehaviorSubject"),k=a("./multicast");f.publishBehavior=function(a){return k.multicast.call(this,new g.BehaviorSubject(a))}},{"../subject/BehaviorSubject":227,"./multicast":175}],181:[function(a,b,f){var g=a("../subject/AsyncSubject"),k=a("./multicast");
|
||||
f.publishLast=function(){return k.multicast.call(this,new g.AsyncSubject)}},{"../subject/AsyncSubject":226,"./multicast":175}],182:[function(a,b,f){var g=a("../subject/ReplaySubject"),k=a("./multicast");f.publishReplay=function(a,b,e){void 0===a&&(a=Number.POSITIVE_INFINITY);void 0===b&&(b=Number.POSITIVE_INFINITY);return k.multicast.call(this,new g.ReplaySubject(a,b,e))}},{"../subject/ReplaySubject":228,"./multicast":175}],183:[function(a,b,f){function g(){for(var a=[],c=0;c<arguments.length;c++)a[c-
|
||||
0]=arguments[c];if(1===a.length)if(l.isArray(a[0]))a=a[0];else return a[0];return(new h.ArrayObservable(a)).lift(new d)}var k=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},l=a("../util/isArray"),h=a("../observable/ArrayObservable");b=a("../OuterSubscriber");var e=a("../util/subscribeToResult");f.race=function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=
|
||||
arguments[c];1===a.length&&l.isArray(a[0])&&(a=a[0]);a.unshift(this);return g.apply(this,a)};f.raceStatic=g;var d=function(){function a(){}a.prototype.call=function(a){return new c(a)};return a}();f.RaceOperator=d;var c=function(a){function c(d){a.call(this,d);this.hasFirst=!1;this.observables=[];this.subscriptions=[]}k(c,a);c.prototype._next=function(a){this.observables.push(a)};c.prototype._complete=function(){var a=this.observables,c=a.length;if(0===c)this.destination.complete();else{for(var d=
|
||||
0;d<c;d++){var b=a[d],b=e.subscribeToResult(this,b,b,d);this.subscriptions.push(b);this.add(b)}this.observables=null}};c.prototype.notifyNext=function(a,c,d,e,b){if(!this.hasFirst){this.hasFirst=!0;for(a=0;a<this.subscriptions.length;a++)a!==d&&(e=this.subscriptions[a],e.unsubscribe(),this.remove(e));this.subscriptions=null}this.destination.next(c)};return c}(b.OuterSubscriber);f.RaceSubscriber=c},{"../OuterSubscriber":6,"../observable/ArrayObservable":116,"../util/isArray":240,"../util/subscribeToResult":250}],
|
||||
184:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};a=a("../Subscriber");f.reduce=function(a,e){return this.lift(new k(a,e))};var k=function(){function a(e,d){this.project=e;this.seed=d}a.prototype.call=function(a){return new l(a,this.project,this.seed)};return a}();f.ReduceOperator=k;var l=function(a){function e(d,c,e){a.call(this,d);this.hasValue=
|
||||
!1;this.acc=e;this.project=c;this.hasSeed="undefined"!==typeof e}g(e,a);e.prototype._next=function(a){this.hasValue||(this.hasValue=this.hasSeed)?this._tryReduce(a):(this.acc=a,this.hasValue=!0)};e.prototype._tryReduce=function(a){var c;try{c=this.project(this.acc,a)}catch(e){this.destination.error(e);return}this.acc=c};e.prototype._complete=function(){(this.hasValue||this.hasSeed)&&this.destination.next(this.acc);this.destination.complete()};return e}(a.Subscriber);f.ReduceSubscriber=l},{"../Subscriber":9}],
|
||||
185:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../observable/EmptyObservable");f.repeat=function(a){void 0===a&&(a=-1);return 0===a?new k.EmptyObservable:0>a?this.lift(new l(-1,this)):this.lift(new l(a-1,this))};var l=function(){function a(d,c){this.count=d;this.source=c}a.prototype.call=function(a){return new h(a,
|
||||
this.count,this.source)};return a}(),h=function(a){function d(c,d,b){a.call(this,c);this.count=d;this.source=b}g(d,a);d.prototype.complete=function(){if(!this.isStopped){var c=this.source,d=this.count;if(0===d)return a.prototype.complete.call(this);-1<d&&(this.count=d-1);this.unsubscribe();this.isUnsubscribed=this.isStopped=!1;c.subscribe(this)}};return d}(b.Subscriber)},{"../Subscriber":9,"../observable/EmptyObservable":121}],186:[function(a,b,f){var g=this&&this.__extends||function(a,e){function d(){this.constructor=
|
||||
a}for(var c in e)e.hasOwnProperty(c)&&(a[c]=e[c]);a.prototype=null===e?Object.create(e):(d.prototype=e.prototype,new d)};a=a("../Subscriber");f.retry=function(a){void 0===a&&(a=-1);return this.lift(new k(a,this))};var k=function(){function a(e,d){this.count=e;this.source=d}a.prototype.call=function(a){return new l(a,this.count,this.source)};return a}(),l=function(a){function e(d,c,e){a.call(this,d);this.count=c;this.source=e}g(e,a);e.prototype.error=function(d){if(!this.isStopped){var c=this.source,
|
||||
e=this.count;if(0===e)return a.prototype.error.call(this,d);-1<e&&(this.count=e-1);this.unsubscribe();this.isUnsubscribed=this.isStopped=!1;c.subscribe(this)}};return e}(a.Subscriber)},{"../Subscriber":9}],187:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("../Subject"),l=a("../util/tryCatch"),h=a("../util/errorObject");b=a("../OuterSubscriber");
|
||||
var e=a("../util/subscribeToResult");f.retryWhen=function(a){return this.lift(new d(a,this))};var d=function(){function a(c,d){this.notifier=c;this.source=d}a.prototype.call=function(a){return new c(a,this.notifier,this.source)};return a}(),c=function(a){function c(d,e,b){a.call(this,d);this.notifier=e;this.source=b}g(c,a);c.prototype.error=function(c){if(!this.isStopped){var d=this.errors,b=this.retries,f=this.retriesSubscription;if(b)this.retriesSubscription=this.errors=null;else{d=new k.Subject;
|
||||
b=l.tryCatch(this.notifier)(d);if(b===h.errorObject)return a.prototype.error.call(this,h.errorObject.e);f=e.subscribeToResult(this,b)}this.unsubscribe();this.isUnsubscribed=!1;this.errors=d;this.retries=b;this.retriesSubscription=f;d.next(c)}};c.prototype._unsubscribe=function(){var a=this.errors,c=this.retriesSubscription;a&&(a.unsubscribe(),this.errors=null);c&&(c.unsubscribe(),this.retriesSubscription=null);this.retries=null};c.prototype.notifyNext=function(a,c,d,e,b){a=this.errors;c=this.retries;
|
||||
d=this.retriesSubscription;this.retriesSubscription=this.retries=this.errors=null;this.unsubscribe();this.isUnsubscribed=this.isStopped=!1;this.errors=a;this.retries=c;this.retriesSubscription=d;this.source.subscribe(this)};return c}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../Subject":8,"../util/errorObject":239,"../util/subscribeToResult":250,"../util/tryCatch":253}],188:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&
|
||||
(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.sample=function(a){return this.lift(new l(a))};var l=function(){function a(d){this.notifier=d}a.prototype.call=function(a){return new h(a,this.notifier)};return a}(),h=function(a){function d(c,d){a.call(this,c);this.hasValue=!1;this.add(k.subscribeToResult(this,d))}g(d,a);d.prototype._next=function(a){this.value=a;this.hasValue=!0};d.prototype.notifyNext=
|
||||
function(a,d,b,e,f){this.emitValue()};d.prototype.notifyComplete=function(){this.emitValue()};d.prototype.emitValue=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.value))};return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],189:[function(a,b,f){function g(a){var c=a.delay;a.subscriber.notifyNext();this.schedule(a,c)}var k=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=
|
||||
null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var l=a("../scheduler/asap");f.sampleTime=function(a,c){void 0===c&&(c=l.asap);return this.lift(new h(a,c))};var h=function(){function a(c,d){this.delay=c;this.scheduler=d}a.prototype.call=function(a){return new e(a,this.delay,this.scheduler)};return a}(),e=function(a){function c(c,b,e){a.call(this,c);this.delay=b;this.scheduler=e;this.hasValue=!1;this.add(e.schedule(g,b,{subscriber:this,delay:b}))}k(c,a);c.prototype._next=
|
||||
function(a){this.lastValue=a;this.hasValue=!0};c.prototype.notifyNext=function(){this.hasValue&&(this.hasValue=!1,this.destination.next(this.lastValue))};return c}(b.Subscriber)},{"../Subscriber":9,"../scheduler/asap":224}],190:[function(a,b,f){var g=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");f.scan=function(a,b){return this.lift(new k(a,
|
||||
b))};var k=function(){function a(b,d){this.accumulator=b;this.seed=d}a.prototype.call=function(a){return new l(a,this.accumulator,this.seed)};return a}(),l=function(a){function b(d,c,e){a.call(this,d);this.accumulator=c;this.accumulatorSet=!1;this.seed=e;this.accumulator=c;this.accumulatorSet="undefined"!==typeof e}g(b,a);Object.defineProperty(b.prototype,"seed",{get:function(){return this._seed},set:function(a){this.accumulatorSet=!0;this._seed=a},enumerable:!0,configurable:!0});b.prototype._next=
|
||||
function(a){if(this.accumulatorSet)return this._tryNext(a);this.seed=a;this.destination.next(a)};b.prototype._tryNext=function(a){var c;try{c=this.accumulator(this.seed,a)}catch(b){this.destination.error(b)}this.seed=c;this.destination.next(c)};return b}(a.Subscriber)},{"../Subscriber":9}],191:[function(a,b,f){function g(){return new l.Subject}var k=a("./multicast"),l=a("../Subject");f.share=function(){return k.multicast.call(this,g).refCount()}},{"../Subject":8,"./multicast":175}],192:[function(a,
|
||||
b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../util/EmptyError");f.single=function(a){return this.lift(new l(a,this))};var l=function(){function a(d,c){this.predicate=d;this.source=c}a.prototype.call=function(a){return new h(a,this.predicate,this.source)};return a}(),h=function(a){function d(c,d,b){a.call(this,c);this.predicate=
|
||||
d;this.source=b;this.seenValue=!1;this.index=0}g(d,a);d.prototype.applySingleValue=function(a){this.seenValue?this.destination.error("Sequence contains more than one element"):(this.seenValue=!0,this.singleValue=a)};d.prototype._next=function(a){var d=this.predicate;this.index++;d?this.tryNext(a):this.applySingleValue(a)};d.prototype.tryNext=function(a){try{this.predicate(a,this.index,this.source)&&this.applySingleValue(a)}catch(d){this.destination.error(d)}};d.prototype._complete=function(){var a=
|
||||
this.destination;0<this.index?(a.next(this.seenValue?this.singleValue:void 0),a.complete()):a.error(new k.EmptyError)};return d}(b.Subscriber)},{"../Subscriber":9,"../util/EmptyError":232}],193:[function(a,b,f){var g=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");f.skip=function(a){return this.lift(new k(a))};var k=function(){function a(b){this.total=
|
||||
b}a.prototype.call=function(a){return new l(a,this.total)};return a}(),l=function(a){function b(d,c){a.call(this,d);this.total=c;this.count=0}g(b,a);b.prototype._next=function(a){++this.count>this.total&&this.destination.next(a)};return b}(a.Subscriber)},{"../Subscriber":9}],194:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");
|
||||
var k=a("../util/subscribeToResult");f.skipUntil=function(a){return this.lift(new l(a))};var l=function(){function a(d){this.notifier=d}a.prototype.call=function(a){return new h(a,this.notifier)};return a}(),h=function(a){function d(c,d){a.call(this,c);this.isInnerStopped=this.hasValue=!1;this.add(k.subscribeToResult(this,d))}g(d,a);d.prototype._next=function(c){this.hasValue&&a.prototype._next.call(this,c)};d.prototype._complete=function(){this.isInnerStopped?a.prototype._complete.call(this):this.unsubscribe()};
|
||||
d.prototype.notifyNext=function(a,d,b,e,f){this.hasValue=!0};d.prototype.notifyComplete=function(){this.isInnerStopped=!0;this.isStopped&&a.prototype._complete.call(this)};return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],195:[function(a,b,f){var g=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");f.skipWhile=
|
||||
function(a){return this.lift(new k(a))};var k=function(){function a(b){this.predicate=b}a.prototype.call=function(a){return new l(a,this.predicate)};return a}(),l=function(a){function b(d,c){a.call(this,d);this.predicate=c;this.skipping=!0;this.index=0}g(b,a);b.prototype._next=function(a){var c=this.destination;this.skipping&&this.tryCallPredicate(a);this.skipping||c.next(a)};b.prototype.tryCallPredicate=function(a){try{this.skipping=!!this.predicate(a,this.index++)}catch(c){this.destination.error(c)}};
|
||||
return b}(a.Subscriber)},{"../Subscriber":9}],196:[function(a,b,f){var g=a("../observable/ArrayObservable"),k=a("../observable/ScalarObservable"),l=a("../observable/EmptyObservable"),h=a("./concat"),e=a("../util/isScheduler");f.startWith=function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];c=a[a.length-1];e.isScheduler(c)?a.pop():c=null;var b=a.length;return 1===b?h.concatStatic(new k.ScalarObservable(a[0],c),this):1<b?h.concatStatic(new g.ArrayObservable(a,c),this):h.concatStatic(new l.EmptyObservable(c),
|
||||
this)}},{"../observable/ArrayObservable":116,"../observable/EmptyObservable":121,"../observable/ScalarObservable":132,"../util/isScheduler":246,"./concat":144}],197:[function(a,b,f){var g=a("../observable/SubscribeOnObservable");f.subscribeOn=function(a,b){void 0===b&&(b=0);return new g.SubscribeOnObservable(this,b,a)}},{"../observable/SubscribeOnObservable":133}],198:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=
|
||||
d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f._switch=function(){return this.lift(new l)};var l=function(){function a(){}a.prototype.call=function(a){return new h(a)};return a}(),h=function(a){function d(c){a.call(this,c);this.active=0;this.hasCompleted=!1}g(d,a);d.prototype._next=function(a){this.unsubscribeInner();this.active++;this.add(this.innerSubscription=k.subscribeToResult(this,a))};d.prototype._complete=
|
||||
function(){this.hasCompleted=!0;0===this.active&&this.destination.complete()};d.prototype.unsubscribeInner=function(){this.active=0<this.active?this.active-1:0;var a=this.innerSubscription;a&&(a.unsubscribe(),this.remove(a))};d.prototype.notifyNext=function(a,d,b,e,f){this.destination.next(d)};d.prototype.notifyError=function(a){this.destination.error(a)};d.prototype.notifyComplete=function(){this.unsubscribeInner();this.hasCompleted&&0===this.active&&this.destination.complete()};return d}(b.OuterSubscriber)},
|
||||
{"../OuterSubscriber":6,"../util/subscribeToResult":250}],199:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.switchMap=function(a,d){return this.lift(new l(a,d))};var l=function(){function a(d,c){this.project=d;this.resultSelector=c}a.prototype.call=function(a){return new h(a,
|
||||
this.project,this.resultSelector)};return a}(),h=function(a){function d(c,d,b){a.call(this,c);this.project=d;this.resultSelector=b;this.index=0}g(d,a);d.prototype._next=function(a){var d,b=this.index++;try{d=this.project(a,b)}catch(e){this.destination.error(e);return}this._innerSub(d,a,b)};d.prototype._innerSub=function(a,d,b){var e=this.innerSubscription;e&&e.unsubscribe();this.add(this.innerSubscription=k.subscribeToResult(this,a,d,b))};d.prototype._complete=function(){var c=this.innerSubscription;
|
||||
c&&!c.isUnsubscribed||a.prototype._complete.call(this)};d.prototype._unsubscribe=function(){this.innerSubscription=null};d.prototype.notifyComplete=function(c){this.remove(c);this.innerSubscription=null;this.isStopped&&a.prototype._complete.call(this)};d.prototype.notifyNext=function(a,d,b,e,f){this.resultSelector?this._tryNotifyNext(a,d,b,e):this.destination.next(d)};d.prototype._tryNotifyNext=function(a,d,b,e){var f;try{f=this.resultSelector(a,d,b,e)}catch(h){this.destination.error(h);return}this.destination.next(f)};
|
||||
return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],200:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.switchMapTo=function(a,d){return this.lift(new l(a,d))};var l=function(){function a(d,c){this.observable=d;this.resultSelector=c}a.prototype.call=
|
||||
function(a){return new h(a,this.observable,this.resultSelector)};return a}(),h=function(a){function d(c,d,b){a.call(this,c);this.inner=d;this.resultSelector=b;this.index=0}g(d,a);d.prototype._next=function(a){var d=this.innerSubscription;d&&d.unsubscribe();this.add(this.innerSubscription=k.subscribeToResult(this,this.inner,a,this.index++))};d.prototype._complete=function(){var c=this.innerSubscription;c&&!c.isUnsubscribed||a.prototype._complete.call(this)};d.prototype._unsubscribe=function(){this.innerSubscription=
|
||||
null};d.prototype.notifyComplete=function(c){this.remove(c);this.innerSubscription=null;this.isStopped&&a.prototype._complete.call(this)};d.prototype.notifyNext=function(a,d,b,e,f){f=this.destination;this.resultSelector?this.tryResultSelector(a,d,b,e):f.next(d)};d.prototype.tryResultSelector=function(a,d,b,e){var f=this.resultSelector,h=this.destination,k;try{k=f(a,d,b,e)}catch(g){h.error(g);return}h.next(k)};return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],
|
||||
201:[function(a,b,f){var g=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../util/ArgumentOutOfRangeError"),l=a("../observable/EmptyObservable");f.take=function(a){return 0===a?new l.EmptyObservable:this.lift(new h(a))};var h=function(){function a(c){this.total=c;if(0>this.total)throw new k.ArgumentOutOfRangeError;}a.prototype.call=
|
||||
function(a){return new e(a,this.total)};return a}(),e=function(a){function c(c,b){a.call(this,c);this.total=b;this.count=0}g(c,a);c.prototype._next=function(a){var c=this.total;++this.count<=c&&(this.destination.next(a),this.count===c&&this.destination.complete())};return c}(b.Subscriber)},{"../Subscriber":9,"../observable/EmptyObservable":121,"../util/ArgumentOutOfRangeError":231}],202:[function(a,b,f){var g=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&
|
||||
(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var k=a("../util/ArgumentOutOfRangeError"),l=a("../observable/EmptyObservable");f.takeLast=function(a){return 0===a?new l.EmptyObservable:this.lift(new h(a))};var h=function(){function a(c){this.total=c;if(0>this.total)throw new k.ArgumentOutOfRangeError;}a.prototype.call=function(a){return new e(a,this.total)};return a}(),e=function(a){function c(c,b){a.call(this,c);this.total=b;this.index=this.count=
|
||||
0;this.ring=Array(b)}g(c,a);c.prototype._next=function(a){var c=this.index,d=this.ring,b=this.total,e=this.count;1<b?e<b?(this.count=e+1,this.index=c+1):this.index=0===c?++c:c<b?c+1:c=0:e<b&&(this.count=b);d[c]=a};c.prototype._complete=function(){for(var a=-1,c=this.ring,d=this.count,b=this.total,e=this.destination,f=1===b||d<b?0:this.index-1;++a<d;)a+f===b&&(f=b-a),e.next(c[a+f]);e.complete()};return c}(b.Subscriber)},{"../Subscriber":9,"../observable/EmptyObservable":121,"../util/ArgumentOutOfRangeError":231}],
|
||||
203:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.takeUntil=function(a){return this.lift(new l(a))};var l=function(){function a(d){this.notifier=d}a.prototype.call=function(a){return new h(a,this.notifier)};return a}(),h=function(a){function d(c,d){a.call(this,c);this.notifier=
|
||||
d;this.add(k.subscribeToResult(this,d))}g(d,a);d.prototype.notifyNext=function(a,d,b,e,f){this.complete()};d.prototype.notifyComplete=function(){};return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],204:[function(a,b,f){var g=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");f.takeWhile=function(a){return this.lift(new k(a))};
|
||||
var k=function(){function a(b){this.predicate=b}a.prototype.call=function(a){return new l(a,this.predicate)};return a}(),l=function(a){function b(d,c){a.call(this,d);this.predicate=c;this.index=0}g(b,a);b.prototype._next=function(a){var c=this.destination,b;try{b=this.predicate(a,this.index++)}catch(e){c.error(e);return}this.nextOrComplete(a,b)};b.prototype.nextOrComplete=function(a,c){var b=this.destination;c?b.next(a):b.complete()};return b}(a.Subscriber)},{"../Subscriber":9}],205:[function(a,b,
|
||||
f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.throttle=function(a){return this.lift(new l(a))};var l=function(){function a(d){this.durationSelector=d}a.prototype.call=function(a){return new h(a,this.durationSelector)};return a}(),h=function(a){function d(c,d){a.call(this,c);this.destination=
|
||||
c;this.durationSelector=d}g(d,a);d.prototype._next=function(a){this.throttled||this.tryDurationSelector(a)};d.prototype.tryDurationSelector=function(a){var d=null;try{d=this.durationSelector(a)}catch(b){this.destination.error(b);return}this.emitAndThrottle(a,d)};d.prototype.emitAndThrottle=function(a,d){this.add(this.throttled=k.subscribeToResult(this,d));this.destination.next(a)};d.prototype._unsubscribe=function(){var a=this.throttled;a&&(this.remove(a),this.throttled=null,a.unsubscribe())};d.prototype.notifyNext=
|
||||
function(a,d,b,e,f){this._unsubscribe()};d.prototype.notifyComplete=function(){this._unsubscribe()};return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../util/subscribeToResult":250}],206:[function(a,b,f){function g(a){a.subscriber.clearThrottle()}var k=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)};b=a("../Subscriber");var l=a("../scheduler/asap");f.throttleTime=
|
||||
function(a,c){void 0===c&&(c=l.asap);return this.lift(new h(a,c))};var h=function(){function a(c,d){this.delay=c;this.scheduler=d}a.prototype.call=function(a){return new e(a,this.delay,this.scheduler)};return a}(),e=function(a){function c(c,b,e){a.call(this,c);this.delay=b;this.scheduler=e}k(c,a);c.prototype._next=function(a){this.throttled||(this.add(this.throttled=this.scheduler.schedule(g,this.delay,{subscriber:this})),this.destination.next(a))};c.prototype.clearThrottle=function(){var a=this.throttled;
|
||||
a&&(a.unsubscribe(),this.remove(a),this.throttled=null)};return c}(b.Subscriber)},{"../Subscriber":9,"../scheduler/asap":224}],207:[function(a,b,f){var g=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)},k=a("../scheduler/asap"),l=a("../util/isDate");a=a("../Subscriber");f.timeout=function(a,c,b){void 0===c&&(c=null);void 0===b&&(b=k.asap);var e=l.isDate(a);a=e?
|
||||
+a-b.now():Math.abs(a);return this.lift(new h(a,e,c,b))};var h=function(){function a(c,d,b,e){this.waitFor=c;this.absoluteTimeout=d;this.errorToSend=b;this.scheduler=e}a.prototype.call=function(a){return new e(a,this.absoluteTimeout,this.waitFor,this.errorToSend,this.scheduler)};return a}(),e=function(a){function c(c,b,e,f,h){a.call(this,c);this.absoluteTimeout=b;this.waitFor=e;this.errorToSend=f;this.scheduler=h;this._previousIndex=this.index=0;this._hasCompleted=!1;this.scheduleTimeout()}g(c,a);
|
||||
Object.defineProperty(c.prototype,"previousIndex",{get:function(){return this._previousIndex},enumerable:!0,configurable:!0});Object.defineProperty(c.prototype,"hasCompleted",{get:function(){return this._hasCompleted},enumerable:!0,configurable:!0});c.dispatchTimeout=function(a){var c=a.subscriber;a=a.index;c.hasCompleted||c.previousIndex!==a||c.notifyTimeout()};c.prototype.scheduleTimeout=function(){var a=this.index;this.scheduler.schedule(c.dispatchTimeout,this.waitFor,{subscriber:this,index:a});
|
||||
this.index++;this._previousIndex=a};c.prototype._next=function(a){this.destination.next(a);this.absoluteTimeout||this.scheduleTimeout()};c.prototype._error=function(a){this.destination.error(a);this._hasCompleted=!0};c.prototype._complete=function(){this.destination.complete();this._hasCompleted=!0};c.prototype.notifyTimeout=function(){this.error(this.errorToSend||Error("timeout"))};return c}(a.Subscriber)},{"../Subscriber":9,"../scheduler/asap":224,"../util/isDate":241}],208:[function(a,b,f){var g=
|
||||
this&&this.__extends||function(a,d){function b(){this.constructor=a}for(var e in d)d.hasOwnProperty(e)&&(a[e]=d[e]);a.prototype=null===d?Object.create(d):(b.prototype=d.prototype,new b)},k=a("../scheduler/asap"),l=a("../util/isDate");b=a("../OuterSubscriber");var h=a("../util/subscribeToResult");f.timeoutWith=function(a,d,b){void 0===b&&(b=k.asap);var f=l.isDate(a);a=f?+a-b.now():Math.abs(a);return this.lift(new e(a,f,d,b))};var e=function(){function a(c,d,b,e){this.waitFor=c;this.absoluteTimeout=
|
||||
d;this.withObservable=b;this.scheduler=e}a.prototype.call=function(a){return new d(a,this.absoluteTimeout,this.waitFor,this.withObservable,this.scheduler)};return a}(),d=function(a){function d(b,e,f,h,k){a.call(this);this.destination=b;this.absoluteTimeout=e;this.waitFor=f;this.withObservable=h;this.scheduler=k;this.timeoutSubscription=void 0;this._previousIndex=this.index=0;this._hasCompleted=!1;b.add(this);this.scheduleTimeout()}g(d,a);Object.defineProperty(d.prototype,"previousIndex",{get:function(){return this._previousIndex},
|
||||
enumerable:!0,configurable:!0});Object.defineProperty(d.prototype,"hasCompleted",{get:function(){return this._hasCompleted},enumerable:!0,configurable:!0});d.dispatchTimeout=function(a){var c=a.subscriber;a=a.index;c.hasCompleted||c.previousIndex!==a||c.handleTimeout()};d.prototype.scheduleTimeout=function(){var a=this.index;this.scheduler.schedule(d.dispatchTimeout,this.waitFor,{subscriber:this,index:a});this.index++;this._previousIndex=a};d.prototype._next=function(a){this.destination.next(a);this.absoluteTimeout||
|
||||
this.scheduleTimeout()};d.prototype._error=function(a){this.destination.error(a);this._hasCompleted=!0};d.prototype._complete=function(){this.destination.complete();this._hasCompleted=!0};d.prototype.handleTimeout=function(){if(!this.isUnsubscribed){var a=this.withObservable;this.unsubscribe();this.destination.add(this.timeoutSubscription=h.subscribeToResult(this,a))}};return d}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../scheduler/asap":224,"../util/isDate":241,"../util/subscribeToResult":250}],
|
||||
209:[function(a,b,f){var g=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};a=a("../Subscriber");f.toArray=function(){return this.lift(new k)};var k=function(){function a(){}a.prototype.call=function(a){return new l(a)};return a}(),l=function(a){function b(d){a.call(this,d);this.array=[]}g(b,a);b.prototype._next=function(a){this.array.push(a)};b.prototype._complete=
|
||||
function(){this.destination.next(this.array);this.destination.complete()};return b}(a.Subscriber)},{"../Subscriber":9}],210:[function(a,b,f){var g=a("../util/root");f.toPromise=function(a){var b=this;a||(g.root.Rx&&g.root.Rx.config&&g.root.Rx.config.Promise?a=g.root.Rx.config.Promise:g.root.Promise&&(a=g.root.Promise));if(!a)throw Error("no Promise impl found");return new a(function(a,e){var d;b.subscribe(function(a){return d=a},function(a){return e(a)},function(){return a(d)})})}},{"../util/root":249}],
|
||||
211:[function(a,b,f){var g=this&&this.__extends||function(a,c){function b(){this.constructor=a}for(var e in c)c.hasOwnProperty(e)&&(a[e]=c[e]);a.prototype=null===c?Object.create(c):(b.prototype=c.prototype,new b)},k=a("../Subject");b=a("../OuterSubscriber");var l=a("../util/subscribeToResult");f.window=function(a){return this.lift(new h(a))};var h=function(){function a(c){this.closingNotifier=c}a.prototype.call=function(a){return new e(a,this.closingNotifier)};return a}(),e=function(a){function c(c,
|
||||
b){a.call(this,c);this.destination=c;this.closingNotifier=b;this.add(l.subscribeToResult(this,b));this.openWindow()}g(c,a);c.prototype.notifyNext=function(a,c,d,b,e){this.openWindow()};c.prototype.notifyError=function(a,c){this._error(a)};c.prototype.notifyComplete=function(a){this._complete()};c.prototype._next=function(a){this.window.next(a)};c.prototype._error=function(a){this.window.error(a);this.destination.error(a)};c.prototype._complete=function(){this.window.complete();this.destination.complete()};
|
||||
c.prototype.openWindow=function(){var a=this.window;a&&a.complete();var a=this.destination,c=this.window=new k.Subject;a.add(c);a.next(c)};return c}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../Subject":8,"../util/subscribeToResult":250}],212:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../Subscriber");var k=a("../Subject");f.windowCount=
|
||||
function(a,d){void 0===d&&(d=0);return this.lift(new l(a,d))};var l=function(){function a(d,c){this.windowSize=d;this.startWindowEvery=c}a.prototype.call=function(a){return new h(a,this.windowSize,this.startWindowEvery)};return a}(),h=function(a){function d(c,d,b){a.call(this,c);this.destination=c;this.windowSize=d;this.startWindowEvery=b;this.windows=[new k.Subject];this.count=0;d=this.windows[0];c.add(d);c.next(d)}g(d,a);d.prototype._next=function(a){for(var d=0<this.startWindowEvery?this.startWindowEvery:
|
||||
this.windowSize,b=this.destination,e=this.windowSize,f=this.windows,h=f.length,g=0;g<h;g++)f[g].next(a);a=this.count-e+1;0<=a&&0===a%d&&f.shift().complete();0===++this.count%d&&(d=new k.Subject,f.push(d),b.add(d),b.next(d))};d.prototype._error=function(a){for(var d=this.windows;0<d.length;)d.shift().error(a);this.destination.error(a)};d.prototype._complete=function(){for(var a=this.windows;0<a.length;)a.shift().complete();this.destination.complete()};return d}(b.Subscriber)},{"../Subject":8,"../Subscriber":9}],
|
||||
213:[function(a,b,f){function g(a){var c=a.subscriber,d=a.windowTimeSpan,b=a.window;b&&b.complete();a.window=c.openWindow();this.schedule(a,d)}function k(a){var c=a.windowTimeSpan,d=a.subscriber,b=a.scheduler,e=a.windowCreationInterval,f=d.openWindow(),h={action:this,subscription:null};h.subscription=b.schedule(l,c,{subscriber:d,window:f,context:h});this.add(h.subscription);this.schedule(a,e)}function l(a){var c=a.subscriber,d=a.window;(a=a.context)&&a.action&&a.subscription&&a.action.remove(a.subscription);
|
||||
c.closeWindow(d)}var h=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)};b=a("../Subscriber");var e=a("../Subject"),d=a("../scheduler/asap");f.windowTime=function(a,b,e){void 0===b&&(b=null);void 0===e&&(e=d.asap);return this.lift(new c(a,b,e))};var c=function(){function a(c,d,b){this.windowTimeSpan=c;this.windowCreationInterval=d;this.scheduler=b}a.prototype.call=
|
||||
function(a){return new m(a,this.windowTimeSpan,this.windowCreationInterval,this.scheduler)};return a}(),m=function(a){function c(d,b,e,f){a.call(this,d);this.destination=d;this.windowTimeSpan=b;this.windowCreationInterval=e;this.scheduler=f;this.windows=[];if(null!==e&&0<=e){d={subscriber:this,window:this.openWindow(),context:null};var h={windowTimeSpan:b,windowCreationInterval:e,subscriber:this,scheduler:f};this.add(f.schedule(l,b,d));this.add(f.schedule(k,e,h))}else e={subscriber:this,window:this.openWindow(),
|
||||
windowTimeSpan:b},this.add(f.schedule(g,b,e))}h(c,a);c.prototype._next=function(a){for(var c=this.windows,d=c.length,b=0;b<d;b++){var e=c[b];e.isUnsubscribed||e.next(a)}};c.prototype._error=function(a){for(var c=this.windows;0<c.length;)c.shift().error(a);this.destination.error(a)};c.prototype._complete=function(){for(var a=this.windows;0<a.length;){var c=a.shift();c.isUnsubscribed||c.complete()}this.destination.complete()};c.prototype.openWindow=function(){var a=new e.Subject;this.windows.push(a);
|
||||
var c=this.destination;c.add(a);c.next(a);return a};c.prototype.closeWindow=function(a){a.complete();var c=this.windows;c.splice(c.indexOf(a),1)};return c}(b.Subscriber)},{"../Subject":8,"../Subscriber":9,"../scheduler/asap":224}],214:[function(a,b,f){var g=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("../Subject"),l=a("../Subscription"),h=a("../util/tryCatch"),
|
||||
e=a("../util/errorObject");b=a("../OuterSubscriber");var d=a("../util/subscribeToResult");f.windowToggle=function(a,d){return this.lift(new c(a,d))};var c=function(){function a(c,d){this.openings=c;this.closingSelector=d}a.prototype.call=function(a){return new m(a,this.openings,this.closingSelector)};return a}(),m=function(a){function c(b,e,f){a.call(this,b);this.openings=e;this.closingSelector=f;this.contexts=[];this.add(this.openSubscription=d.subscribeToResult(this,e,e))}g(c,a);c.prototype._next=
|
||||
function(a){var c=this.contexts;if(c)for(var d=c.length,b=0;b<d;b++)c[b].window.next(a)};c.prototype._error=function(c){var d=this.contexts;this.contexts=null;if(d)for(var b=d.length,e=-1;++e<b;){var f=d[e];f.window.error(c);f.subscription.unsubscribe()}a.prototype._error.call(this,c)};c.prototype._complete=function(){var c=this.contexts;this.contexts=null;if(c)for(var d=c.length,b=-1;++b<d;){var e=c[b];e.window.complete();e.subscription.unsubscribe()}a.prototype._complete.call(this)};c.prototype._unsubscribe=
|
||||
function(){var a=this.contexts;this.contexts=null;if(a)for(var c=a.length,d=-1;++d<c;){var b=a[d];b.window.unsubscribe();b.subscription.unsubscribe()}};c.prototype.notifyNext=function(a,c,b,f,g){if(a===this.openings){f=h.tryCatch(this.closingSelector)(c);if(f===e.errorObject)return this.error(e.errorObject.e);a=new k.Subject;c=new l.Subscription;b={window:a,subscription:c};this.contexts.push(b);f=d.subscribeToResult(this,f,b);f.context=b;c.add(f);this.destination.next(a)}else this.closeWindow(this.contexts.indexOf(a))};
|
||||
c.prototype.notifyError=function(a){this.error(a)};c.prototype.notifyComplete=function(a){a!==this.openSubscription&&this.closeWindow(this.contexts.indexOf(a.context))};c.prototype.closeWindow=function(a){var c=this.contexts,d=c[a],b=d.window,d=d.subscription;c.splice(a,1);b.complete();d.unsubscribe()};return c}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../Subject":8,"../Subscription":10,"../util/errorObject":239,"../util/subscribeToResult":250,"../util/tryCatch":253}],215:[function(a,b,f){var g=
|
||||
this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},k=a("../Subject"),l=a("../util/tryCatch"),h=a("../util/errorObject");b=a("../OuterSubscriber");var e=a("../util/subscribeToResult");f.windowWhen=function(a){return this.lift(new d(a))};var d=function(){function a(c){this.closingSelector=c}a.prototype.call=function(a){return new c(a,this.closingSelector)};return a}(),
|
||||
c=function(a){function c(d,b){a.call(this,d);this.destination=d;this.closingSelector=b;this.openWindow()}g(c,a);c.prototype.notifyNext=function(a,c,d,b,e){this.openWindow(e)};c.prototype.notifyError=function(a,c){this._error(a)};c.prototype.notifyComplete=function(a){this.openWindow(a)};c.prototype._next=function(a){this.window.next(a)};c.prototype._error=function(a){this.window.error(a);this.destination.error(a);this.unsubscribeClosingNotification()};c.prototype._complete=function(){this.window.complete();
|
||||
this.destination.complete();this.unsubscribeClosingNotification()};c.prototype.unsubscribeClosingNotification=function(){this.closingNotification&&this.closingNotification.unsubscribe()};c.prototype.openWindow=function(a){void 0===a&&(a=null);a&&(this.remove(a),a.unsubscribe());(a=this.window)&&a.complete();a=this.window=new k.Subject;this.destination.next(a);var c=l.tryCatch(this.closingSelector)();c===h.errorObject?(a=h.errorObject.e,this.destination.error(a),this.window.error(a)):(this.add(this.closingNotification=
|
||||
e.subscribeToResult(this,c)),this.add(a))};return c}(b.OuterSubscriber)},{"../OuterSubscriber":6,"../Subject":8,"../util/errorObject":239,"../util/subscribeToResult":250,"../util/tryCatch":253}],216:[function(a,b,f){var g=this&&this.__extends||function(a,d){function c(){this.constructor=a}for(var b in d)d.hasOwnProperty(b)&&(a[b]=d[b]);a.prototype=null===d?Object.create(d):(c.prototype=d.prototype,new c)};b=a("../OuterSubscriber");var k=a("../util/subscribeToResult");f.withLatestFrom=function(){for(var a=
|
||||
[],d=0;d<arguments.length;d++)a[d-0]=arguments[d];var c;"function"===typeof a[a.length-1]&&(c=a.pop());return this.lift(new l(a,c))};var l=function(){function a(d,c){this.observables=d;this.project=c}a.prototype.call=function(a){return new h(a,this.observables,this.project)};return a}(),h=function(a){function d(c,d,b){a.call(this,c);this.observables=d;this.project=b;this.toRespond=[];c=d.length;this.values=Array(c);for(b=0;b<c;b++)this.toRespond.push(b);for(b=0;b<c;b++){var f=d[b];this.add(k.subscribeToResult(this,
|
||||
f,f,b))}}g(d,a);d.prototype.notifyNext=function(a,d,b,e,f){this.values[b]=d;a=this.toRespond;0<a.length&&(b=a.indexOf(b),-1!==b&&a.splice(b,1))};d.prototype.notifyComplete=function(){};d.prototype._next=function(a){0===this.toRespond.length&&(a=[a].concat(this.values),this.project?this._tryProject(a):this.destination.next(a))};d.prototype._tryProject=function(a){var d;try{d=this.project.apply(this,a)}catch(b){this.destination.error(b);return}this.destination.next(d)};return d}(b.OuterSubscriber)},
|
||||
{"../OuterSubscriber":6,"../util/subscribeToResult":250}],217:[function(a,b,f){function g(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];c=a[a.length-1];"function"===typeof c&&a.pop();return(new l.ArrayObservable(a)).lift(new m(c))}var k=this&&this.__extends||function(a,c){function d(){this.constructor=a}for(var b in c)c.hasOwnProperty(b)&&(a[b]=c[b]);a.prototype=null===c?Object.create(c):(d.prototype=c.prototype,new d)},l=a("../observable/ArrayObservable"),h=a("../util/isArray");b=
|
||||
a("../Subscriber");var e=a("../OuterSubscriber"),d=a("../util/subscribeToResult"),c=a("../util/SymbolShim");f.zipProto=function(){for(var a=[],c=0;c<arguments.length;c++)a[c-0]=arguments[c];a.unshift(this);return g.apply(this,a)};f.zipStatic=g;var m=function(){function a(c){this.project=c}a.prototype.call=function(a){return new n(a,this.project)};return a}();f.ZipOperator=m;var n=function(a){function d(c,b,e){void 0===e&&(e=Object.create(null));a.call(this,c);this.index=0;this.iterators=[];this.active=
|
||||
0;this.project="function"===typeof b?b:null;this.values=e}k(d,a);d.prototype._next=function(a){var d=this.iterators,b=this.index++;h.isArray(a)?d.push(new p(a)):"function"===typeof a[c.SymbolShim.iterator]?d.push(new q(a[c.SymbolShim.iterator]())):d.push(new u(this.destination,this,a,b))};d.prototype._complete=function(){var a=this.iterators,c=a.length;this.active=c;for(var d=0;d<c;d++){var b=a[d];b.stillUnsubscribed?this.add(b.subscribe(b,d)):this.active--}};d.prototype.notifyInactive=function(){this.active--;
|
||||
0===this.active&&this.destination.complete()};d.prototype.checkIterators=function(){for(var a=this.iterators,c=a.length,d=this.destination,b=0;b<c;b++){var e=a[b];if("function"===typeof e.hasValue&&!e.hasValue())return}for(var f=!1,h=[],b=0;b<c;b++){var e=a[b],g=e.next();e.hasCompleted()&&(f=!0);if(g.done){d.complete();return}h.push(g.value)}this.project?this._tryProject(h):d.next(h);f&&d.complete()};d.prototype._tryProject=function(a){var c;try{c=this.project.apply(this,a)}catch(d){this.destination.error(d);
|
||||
return}this.destination.next(c)};return d}(b.Subscriber);f.ZipSubscriber=n;var q=function(){function a(c){this.iterator=c;this.nextResult=c.next()}a.prototype.hasValue=function(){return!0};a.prototype.next=function(){var a=this.nextResult;this.nextResult=this.iterator.next();return a};a.prototype.hasCompleted=function(){var a=this.nextResult;return a&&a.done};return a}(),p=function(){function a(c){this.array=c;this.length=this.index=0;this.length=c.length}a.prototype[c.SymbolShim.iterator]=function(){return this};
|
||||
a.prototype.next=function(a){a=this.index++;var c=this.array;return a<this.length?{value:c[a],done:!1}:{done:!0}};a.prototype.hasValue=function(){return this.array.length>this.index};a.prototype.hasCompleted=function(){return this.array.length===this.index};return a}(),u=function(a){function b(c,d,e,f){a.call(this,c);this.parent=d;this.observable=e;this.index=f;this.stillUnsubscribed=!0;this.buffer=[];this.isComplete=!1}k(b,a);b.prototype[c.SymbolShim.iterator]=function(){return this};b.prototype.next=
|
||||
function(){var a=this.buffer;return 0===a.length&&this.isComplete?{done:!0}:{value:a.shift(),done:!1}};b.prototype.hasValue=function(){return 0<this.buffer.length};b.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete};b.prototype.notifyComplete=function(){0<this.buffer.length?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()};b.prototype.notifyNext=function(a,c,d,b,e){this.buffer.push(c);this.parent.checkIterators()};b.prototype.subscribe=
|
||||
function(a,c){return d.subscribeToResult(this,this.observable,this,c)};return b}(e.OuterSubscriber)},{"../OuterSubscriber":6,"../Subscriber":9,"../observable/ArrayObservable":116,"../util/SymbolShim":238,"../util/isArray":240,"../util/subscribeToResult":250}],218:[function(a,b,f){var g=a("./zip");f.zipAll=function(a){return this.lift(new g.ZipOperator(a))}},{"./zip":217}],219:[function(a,b,f){var g=this&&this.__extends||function(a,b){function e(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&
|
||||
(a[d]=b[d]);a.prototype=null===b?Object.create(b):(e.prototype=b.prototype,new e)},k=a("../util/Immediate");a=function(a){function b(){a.apply(this,arguments)}g(b,a);b.prototype._schedule=function(b,d){void 0===d&&(d=0);if(0<d)return a.prototype._schedule.call(this,b,d);this.delay=d;this.state=b;var c=this.scheduler;c.actions.push(this);c.scheduledId||(c.scheduledId=k.Immediate.setImmediate(function(){c.scheduledId=null;c.flush()}));return this};b.prototype._unsubscribe=function(){var b=this.scheduler,
|
||||
d=b.scheduledId,c=b.actions;a.prototype._unsubscribe.call(this);0===c.length&&(b.active=!1,null!=d&&(b.scheduledId=null,k.Immediate.clearImmediate(d)))};return b}(a("./FutureAction").FutureAction);f.AsapAction=a},{"../util/Immediate":234,"./FutureAction":221}],220:[function(a,b,f){var g=this&&this.__extends||function(a,b){function e(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(e.prototype=b.prototype,new e)},k=a("./AsapAction");a=function(a){function b(){a.apply(this,
|
||||
arguments)}g(b,a);b.prototype.scheduleNow=function(a,b){return(new k.AsapAction(this,a)).schedule(b)};return b}(a("./QueueScheduler").QueueScheduler);f.AsapScheduler=a},{"./AsapAction":219,"./QueueScheduler":223}],221:[function(a,b,f){var g=this&&this.__extends||function(a,b){function e(){this.constructor=a}for(var d in b)b.hasOwnProperty(d)&&(a[d]=b[d]);a.prototype=null===b?Object.create(b):(e.prototype=b.prototype,new e)},k=a("../util/root");a=function(a){function b(e,d){a.call(this);this.scheduler=
|
||||
e;this.work=d}g(b,a);b.prototype.execute=function(){if(this.isUnsubscribed)throw Error("How did did we execute a canceled Action?");this.work(this.state)};b.prototype.schedule=function(a,b){void 0===b&&(b=0);return this.isUnsubscribed?this:this._schedule(a,b)};b.prototype._schedule=function(a,b){var c=this;void 0===b&&(b=0);this.delay=b;this.state=a;var f=this.id;null!=f&&(this.id=void 0,k.root.clearTimeout(f));this.id=k.root.setTimeout(function(){c.id=null;var a=c.scheduler;a.actions.push(c);a.flush()},
|
||||
b);return this};b.prototype._unsubscribe=function(){var a=this.id,b=this.scheduler.actions,c=b.indexOf(this);null!=a&&(this.id=null,k.root.clearTimeout(a));-1!==c&&b.splice(c,1);this.scheduler=this.state=this.work=null};return b}(a("../Subscription").Subscription);f.FutureAction=a},{"../Subscription":10,"../util/root":249}],222:[function(a,b,f){var g=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):
|
||||
(f.prototype=b.prototype,new f)};a=function(a){function b(){a.apply(this,arguments)}g(b,a);b.prototype._schedule=function(b,e){void 0===e&&(e=0);if(0<e)return a.prototype._schedule.call(this,b,e);this.delay=e;this.state=b;var d=this.scheduler;d.actions.push(this);d.flush();return this};return b}(a("./FutureAction").FutureAction);f.QueueAction=a},{"./FutureAction":221}],223:[function(a,b,f){var g=a("./QueueAction"),k=a("./FutureAction");a=function(){function a(){this.active=!1;this.actions=[];this.scheduledId=
|
||||
null}a.prototype.now=function(){return Date.now()};a.prototype.flush=function(){if(!this.active&&!this.scheduledId){this.active=!0;for(var a=this.actions,b=void 0;b=a.shift();)b.execute();this.active=!1}};a.prototype.schedule=function(a,b,d){void 0===b&&(b=0);return 0>=b?this.scheduleNow(a,d):this.scheduleLater(a,b,d)};a.prototype.scheduleNow=function(a,b){return(new g.QueueAction(this,a)).schedule(b)};a.prototype.scheduleLater=function(a,b,d){return(new k.FutureAction(this,a)).schedule(d,b)};return a}();
|
||||
f.QueueScheduler=a},{"./FutureAction":221,"./QueueAction":222}],224:[function(a,b,f){a=a("./AsapScheduler");f.asap=new a.AsapScheduler},{"./AsapScheduler":220}],225:[function(a,b,f){a=a("./QueueScheduler");f.queue=new a.QueueScheduler},{"./QueueScheduler":223}],226:[function(a,b,f){var g=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};a=function(a){function b(){a.apply(this,
|
||||
arguments);this.value=null;this.hasNext=!1}g(b,a);b.prototype._subscribe=function(b){this.hasCompleted&&this.hasNext&&b.next(this.value);return a.prototype._subscribe.call(this,b)};b.prototype._next=function(a){this.value=a;this.hasNext=!0};b.prototype._complete=function(){var a=-1,b=this.observers,d=b.length;this.isUnsubscribed=!0;if(this.hasNext)for(;++a<d;){var c=b[a];c.next(this.value);c.complete()}else for(;++a<d;)b[a].complete();this.isUnsubscribed=!1;this.unsubscribe()};return b}(a("../Subject").Subject);
|
||||
f.AsyncSubject=a},{"../Subject":8}],227:[function(a,b,f){var g=this&&this.__extends||function(a,b){function d(){this.constructor=a}for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);a.prototype=null===b?Object.create(b):(d.prototype=b.prototype,new d)};b=a("../Subject");var k=a("../util/throwError"),l=a("../util/ObjectUnsubscribedError");a=function(a){function b(d){a.call(this);this._value=d}g(b,a);b.prototype.getValue=function(){if(this.hasErrored)k.throwError(this.errorValue);else if(this.isUnsubscribed)k.throwError(new l.ObjectUnsubscribedError);
|
||||
else return this._value};Object.defineProperty(b.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0});b.prototype._subscribe=function(b){var c=a.prototype._subscribe.call(this,b);c&&!c.isUnsubscribed&&b.next(this._value);return c};b.prototype._next=function(b){a.prototype._next.call(this,this._value=b)};b.prototype._error=function(b){this.hasErrored=!0;a.prototype._error.call(this,this.errorValue=b)};return b}(b.Subject);f.BehaviorSubject=a},{"../Subject":8,"../util/ObjectUnsubscribedError":237,
|
||||
"../util/throwError":251}],228:[function(a,b,f){var g=this&&this.__extends||function(a,b){function c(){this.constructor=a}for(var f in b)b.hasOwnProperty(f)&&(a[f]=b[f]);a.prototype=null===b?Object.create(b):(c.prototype=b.prototype,new c)};b=a("../Subject");var k=a("../scheduler/queue"),l=a("../operator/observeOn");a=function(a){function b(c,d,f){void 0===c&&(c=Number.POSITIVE_INFINITY);void 0===d&&(d=Number.POSITIVE_INFINITY);a.call(this);this.events=[];this.scheduler=f;this.bufferSize=1>c?1:c;
|
||||
this._windowTime=1>d?1:d}g(b,a);b.prototype._next=function(b){var d=this._getNow();this.events.push(new h(d,b));this._trimBufferThenGetEvents(d);a.prototype._next.call(this,b)};b.prototype._subscribe=function(b){var d=this._trimBufferThenGetEvents(this._getNow()),f=this.scheduler;f&&b.add(b=new l.ObserveOnSubscriber(b,f));for(var f=-1,g=d.length;++f<g&&!b.isUnsubscribed;)b.next(d[f].value);return a.prototype._subscribe.call(this,b)};b.prototype._getNow=function(){return(this.scheduler||k.queue).now()};
|
||||
b.prototype._trimBufferThenGetEvents=function(a){for(var b=this.bufferSize,d=this._windowTime,e=this.events,f=e.length,g=0;g<f&&!(a-e[g].time<d);)g+=1;f>b&&(g=Math.max(g,f-b));0<g&&e.splice(0,g);return e};return b}(b.Subject);f.ReplaySubject=a;var h=function(){return function(a,b){this.time=a;this.value=b}}()},{"../Subject":8,"../operator/observeOn":176,"../scheduler/queue":225}],229:[function(a,b,f){var g=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&
|
||||
(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};a=function(a){function b(f,e){a.call(this);this.subject=f;this.observer=e;this.isUnsubscribed=!1}g(b,a);b.prototype.unsubscribe=function(){if(!this.isUnsubscribed){this.isUnsubscribed=!0;var a=this.subject,b=a.observers;this.subject=null;b&&0!==b.length&&!a.isUnsubscribed&&(a=b.indexOf(this.observer),-1!==a&&b.splice(a,1))}};return b}(a("../Subscription").Subscription);f.SubjectSubscription=a},{"../Subscription":10}],
|
||||
230:[function(a,b,f){a=a("../util/SymbolShim");f.rxSubscriber=a.SymbolShim["for"]("rxSubscriber")},{"../util/SymbolShim":238}],231:[function(a,b,f){var g=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};a=function(a){function b(){a.call(this,"argument out of range");this.name="ArgumentOutOfRangeError"}g(b,a);return b}(Error);f.ArgumentOutOfRangeError=a},{}],232:[function(a,
|
||||
b,f){var g=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};a=function(a){function b(){a.call(this,"no elements in sequence");this.name="EmptyError"}g(b,a);return b}(Error);f.EmptyError=a},{}],233:[function(a,b,f){a=function(){function a(){this.values={}}a.prototype["delete"]=function(a){this.values[a]=null;return!0};a.prototype.set=function(a,b){this.values[a]=
|
||||
b;return this};a.prototype.get=function(a){return this.values[a]};a.prototype.forEach=function(a,b){var f=this.values,e;for(e in f)f.hasOwnProperty(e)&&null!==f[e]&&a.call(b,f[e],e)};a.prototype.clear=function(){this.values={}};return a}();f.FastMap=a},{}],234:[function(a,b,f){a=a("./root");b=function(){function a(b){this.root=b;b.setImmediate&&"function"===typeof b.setImmediate?(this.setImmediate=b.setImmediate.bind(b),this.clearImmediate=b.clearImmediate.bind(b)):(this.nextHandle=1,this.tasksByHandle=
|
||||
{},this.currentlyRunningATask=!1,this.canUseProcessNextTick()?this.setImmediate=this.createProcessNextTickSetImmediate():this.canUsePostMessage()?this.setImmediate=this.createPostMessageSetImmediate():this.canUseMessageChannel()?this.setImmediate=this.createMessageChannelSetImmediate():this.canUseReadyStateChange()?this.setImmediate=this.createReadyStateChangeSetImmediate():this.setImmediate=this.createSetTimeoutSetImmediate(),b=function h(a){delete h.instance.tasksByHandle[a]},b.instance=this,this.clearImmediate=
|
||||
b)}a.prototype.identify=function(a){return this.root.Object.prototype.toString.call(a)};a.prototype.canUseProcessNextTick=function(){return"[object process]"===this.identify(this.root.process)};a.prototype.canUseMessageChannel=function(){return!!this.root.MessageChannel};a.prototype.canUseReadyStateChange=function(){var a=this.root.document;return!!(a&&"onreadystatechange"in a.createElement("script"))};a.prototype.canUsePostMessage=function(){var a=this.root;if(a.postMessage&&!a.importScripts){var b=
|
||||
!0,f=a.onmessage;a.onmessage=function(){b=!1};a.postMessage("","*");a.onmessage=f;return b}return!1};a.prototype.partiallyApplied=function(a){for(var b=[],f=1;f<arguments.length;f++)b[f-1]=arguments[f];f=function d(){var a=d.handler,b=d.args;"function"===typeof a?a.apply(void 0,b):(new Function(""+a))()};f.handler=a;f.args=b;return f};a.prototype.addFromSetImmediateArguments=function(a){this.tasksByHandle[this.nextHandle]=this.partiallyApplied.apply(void 0,a);return this.nextHandle++};a.prototype.createProcessNextTickSetImmediate=
|
||||
function(){var a=function h(){var a=h.instance,b=a.addFromSetImmediateArguments(arguments);a.root.process.nextTick(a.partiallyApplied(a.runIfPresent,b));return b};a.instance=this;return a};a.prototype.createPostMessageSetImmediate=function(){var a=this.root,b="setImmediate$"+a.Math.random()+"$",f=function d(c){var f=d.instance;c.source===a&&"string"===typeof c.data&&0===c.data.indexOf(b)&&f.runIfPresent(+c.data.slice(b.length))};f.instance=this;a.addEventListener("message",f,!1);f=function c(){var a=
|
||||
c,b=a.messagePrefix,a=a.instance,f=a.addFromSetImmediateArguments(arguments);a.root.postMessage(b+f,"*");return f};f.instance=this;f.messagePrefix=b;return f};a.prototype.runIfPresent=function(a){if(this.currentlyRunningATask)this.root.setTimeout(this.partiallyApplied(this.runIfPresent,a),0);else{var b=this.tasksByHandle[a];if(b){this.currentlyRunningATask=!0;try{b()}finally{this.clearImmediate(a),this.currentlyRunningATask=!1}}}};a.prototype.createMessageChannelSetImmediate=function(){var a=this,
|
||||
b=new this.root.MessageChannel;b.port1.onmessage=function(b){a.runIfPresent(b.data)};var f=function d(){var a=d,b=a.channel,a=a.instance.addFromSetImmediateArguments(arguments);b.port2.postMessage(a);return a};f.channel=b;f.instance=this;return f};a.prototype.createReadyStateChangeSetImmediate=function(){var a=function h(){var a=h.instance,b=a.root.document,c=b.documentElement,f=a.addFromSetImmediateArguments(arguments),g=b.createElement("script");g.onreadystatechange=function(){a.runIfPresent(f);
|
||||
g.onreadystatechange=null;c.removeChild(g);g=null};c.appendChild(g);return f};a.instance=this;return a};a.prototype.createSetTimeoutSetImmediate=function(){var a=function h(){var a=h.instance,b=a.addFromSetImmediateArguments(arguments);a.root.setTimeout(a.partiallyApplied(a.runIfPresent,b),0);return b};a.instance=this;return a};return a}();f.ImmediateDefinition=b;f.Immediate=new b(a.root)},{"./root":249}],235:[function(a,b,f){b=a("./root");a=a("./MapPolyfill");f.Map=b.root.Map||a.MapPolyfill},{"./MapPolyfill":236,
|
||||
"./root":249}],236:[function(a,b,f){a=function(){function a(){this.size=0;this._values=[];this._keys=[]}a.prototype.get=function(a){a=this._keys.indexOf(a);return-1===a?void 0:this._values[a]};a.prototype.set=function(a,b){var f=this._keys.indexOf(a);-1===f?(this._keys.push(a),this._values.push(b),this.size++):this._values[f]=b;return this};a.prototype["delete"]=function(a){a=this._keys.indexOf(a);if(-1===a)return!1;this._values.splice(a,1);this._keys.splice(a,1);this.size--;return!0};a.prototype.clear=
|
||||
function(){this._keys.length=0;this.size=this._values.length=0};a.prototype.forEach=function(a,b){for(var f=0;f<this.size;f++)a.call(b,this._values[f],this._keys[f])};return a}();f.MapPolyfill=a},{}],237:[function(a,b,f){var g=this&&this.__extends||function(a,b){function f(){this.constructor=a}for(var e in b)b.hasOwnProperty(e)&&(a[e]=b[e]);a.prototype=null===b?Object.create(b):(f.prototype=b.prototype,new f)};a=function(a){function b(){a.call(this,"object unsubscribed");this.name="ObjectUnsubscribedError"}
|
||||
g(b,a);return b}(Error);f.ObjectUnsubscribedError=a},{}],238:[function(a,b,f){function g(a){var b=l(a);e(b,a);d(b);k(b);return b}function k(a){a["for"]||(a["for"]=h)}function l(a){a.Symbol||(a.Symbol=function(a){return"@@Symbol("+a+"):"+c++});return a.Symbol}function h(a){return"@@"+a}function e(a,b){if(!a.iterator)if("function"===typeof a["for"])a.iterator=a["for"]("iterator");else if(b.Set&&"function"===typeof(new b.Set)["@@iterator"])a.iterator="@@iterator";else if(b.Map)for(var c=Object.getOwnPropertyNames(b.Map.prototype),
|
||||
d=0;d<c.length;++d){var e=c[d];if("entries"!==e&&"size"!==e&&b.Map.prototype[e]===b.Map.prototype.entries){a.iterator=e;break}}else a.iterator="@@iterator"}function d(a){a.observable||(a.observable="function"===typeof a["for"]?a["for"]("observable"):"@@observable")}a=a("./root");f.polyfillSymbol=g;f.ensureFor=k;var c=0;f.ensureSymbol=l;f.symbolForPolyfill=h;f.ensureIterator=e;f.ensureObservable=d;f.SymbolShim=g(a.root)},{"./root":249}],239:[function(a,b,f){f.errorObject={e:{}}},{}],240:[function(a,
|
||||
b,f){f.isArray=Array.isArray||function(a){return a&&"number"===typeof a.length}},{}],241:[function(a,b,f){f.isDate=function(a){return a instanceof Date&&!isNaN(+a)}},{}],242:[function(a,b,f){f.isFunction=function(a){return"function"===typeof a}},{}],243:[function(a,b,f){var g=a("../util/isArray");f.isNumeric=function(a){return!g.isArray(a)&&0<=a-parseFloat(a)+1}},{"../util/isArray":240}],244:[function(a,b,f){f.isObject=function(a){return null!=a&&"object"===typeof a}},{}],245:[function(a,b,f){f.isPromise=
|
||||
function(a){return a&&"function"!==typeof a.subscribe&&"function"===typeof a.then}},{}],246:[function(a,b,f){f.isScheduler=function(a){return a&&"function"===typeof a.schedule}},{}],247:[function(a,b,f){f.noop=function(){}},{}],248:[function(a,b,f){f.not=function(a,b){function f(){return!f.pred.apply(f.thisArg,arguments)}f.pred=a;f.thisArg=b;return f}},{}],249:[function(a,b,f){a="undefined"!==typeof global?global:"undefined"!==typeof self?self:"undefined"!==typeof window?window:{};b={"boolean":!1,
|
||||
"function":!0,object:!0,number:!1,string:!1,undefined:!1};f.root=b[typeof self]&&self||b[typeof window]&&window;!(a=b[typeof a]&&a)||a.global!==a&&a.window!==a||(f.root=a)},{}],250:[function(a,b,f){var g=a("./root"),k=a("./isArray"),l=a("./isPromise"),h=a("../Observable"),e=a("../util/SymbolShim"),d=a("../InnerSubscriber");f.subscribeToResult=function(a,b,f,q){var p=new d.InnerSubscriber(a,f,q);if(!p.isUnsubscribed){if(b instanceof h.Observable){if(b._isScalar){p.next(b.value);p.complete();return}return b.subscribe(p)}if(k.isArray(b)){a=
|
||||
0;for(f=b.length;a<f&&!p.isUnsubscribed;a++)p.next(b[a]);p.isUnsubscribed||p.complete()}else{if(l.isPromise(b))return b.then(function(a){p.isUnsubscribed||(p.next(a),p.complete())},function(a){return p.error(a)}).then(null,function(a){g.root.setTimeout(function(){throw a;})}),p;if("function"===typeof b[e.SymbolShim.iterator]){for(a=0;a<b.length&&(p.next(b[a]),!p.isUnsubscribed);a++);p.isUnsubscribed||p.complete()}else if("function"===typeof b[e.SymbolShim.observable])if(b=b[e.SymbolShim.observable](),
|
||||
"function"!==typeof b.subscribe)p.error("invalid observable");else return b.subscribe(new d.InnerSubscriber(a,f,q));else p.error(new TypeError("unknown type returned"))}}}},{"../InnerSubscriber":1,"../Observable":3,"../util/SymbolShim":238,"./isArray":240,"./isPromise":245,"./root":249}],251:[function(a,b,f){f.throwError=function(a){throw a;}},{}],252:[function(a,b,f){var g=a("../Subscriber"),k=a("../symbol/rxSubscriber");f.toSubscriber=function(a,b,e){if(a&&"object"===typeof a){if(a instanceof g.Subscriber)return a;
|
||||
if("function"===typeof a[k.rxSubscriber])return a[k.rxSubscriber]()}return new g.Subscriber(a,b,e)}},{"../Subscriber":9,"../symbol/rxSubscriber":230}],253:[function(a,b,f){function g(){try{return l.apply(this,arguments)}catch(a){return k.errorObject.e=a,k.errorObject}}var k=a("./errorObject"),l;f.tryCatch=function(a){l=a;return g}},{"./errorObject":239}]},{},[7])(7)});
|
||||
|
||||
44
node_modules/node-blockly/blockly/accessible/libs/angular2-all.umd.min.js
generated
vendored
Normal file
44
node_modules/node-blockly/blockly/accessible/libs/angular2-all.umd.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
24
node_modules/node-blockly/blockly/accessible/libs/angular2-polyfills.min.js
generated
vendored
Normal file
24
node_modules/node-blockly/blockly/accessible/libs/angular2-polyfills.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
12
node_modules/node-blockly/blockly/accessible/libs/es6-shim.min.js
generated
vendored
Normal file
12
node_modules/node-blockly/blockly/accessible/libs/es6-shim.min.js
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
80
node_modules/node-blockly/blockly/accessible/media/accessible.css
generated
vendored
Normal file
80
node_modules/node-blockly/blockly/accessible/media/accessible.css
generated
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
.blocklyWorkspaceColumn {
|
||||
float: left;
|
||||
margin-right: 20px;
|
||||
width: 800px;
|
||||
}
|
||||
.blocklySidebarColumn {
|
||||
border-left: 1px solid #888;
|
||||
float: left;
|
||||
padding-left: 20px;
|
||||
margin-top: 20px;
|
||||
min-height: 700px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
.blocklySidebarButton {
|
||||
background-color: #fff;
|
||||
border: 1px solid #333;
|
||||
border-radius: 4px;
|
||||
color: #000;
|
||||
font-size: 1em;
|
||||
margin: 10px 0 10px 30px;
|
||||
padding: 10px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
white-space: nowrap;
|
||||
}
|
||||
.blocklySidebarButton[disabled] {
|
||||
border: 1px solid #ccc;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.blocklyAriaLiveStatus {
|
||||
background: #c8f7be;
|
||||
border-radius: 10px;
|
||||
bottom: 80px;
|
||||
left: 20px;
|
||||
max-width: 275px;
|
||||
padding: 10px;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
.blocklyTree .blocklyActiveDescendant > label,
|
||||
.blocklyTree .blocklyActiveDescendant > div > label,
|
||||
.blocklyActiveDescendant > button,
|
||||
.blocklyActiveDescendant > input,
|
||||
.blocklyActiveDescendant > select,
|
||||
.blocklyActiveDescendant > blockly-field-segment > label,
|
||||
.blocklyActiveDescendant > blockly-field-segment > input,
|
||||
.blocklyActiveDescendant > blockly-field-segment > select {
|
||||
outline: 2px dotted #00f;
|
||||
}
|
||||
|
||||
.blocklyDropdownListItem[aria-selected="true"] button {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.blocklyModalCurtain {
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
height: 100%;
|
||||
left: 0;
|
||||
overflow: auto;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
z-index: 1;
|
||||
}
|
||||
.blocklyModal {
|
||||
background-color: #fefefe;
|
||||
border: 1px solid #888;
|
||||
margin: 10% auto;
|
||||
max-width: 600px;
|
||||
padding: 20px;
|
||||
width: 60%;
|
||||
}
|
||||
.blocklyModalButtonContainer {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.blocklyModal .activeButton {
|
||||
border: 1px solid blue;
|
||||
}
|
||||
BIN
node_modules/node-blockly/blockly/accessible/media/click.mp3
generated
vendored
Normal file
BIN
node_modules/node-blockly/blockly/accessible/media/click.mp3
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/node-blockly/blockly/accessible/media/click.ogg
generated
vendored
Normal file
BIN
node_modules/node-blockly/blockly/accessible/media/click.ogg
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/node-blockly/blockly/accessible/media/click.wav
generated
vendored
Normal file
BIN
node_modules/node-blockly/blockly/accessible/media/click.wav
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/node-blockly/blockly/accessible/media/delete.mp3
generated
vendored
Normal file
BIN
node_modules/node-blockly/blockly/accessible/media/delete.mp3
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/node-blockly/blockly/accessible/media/delete.ogg
generated
vendored
Normal file
BIN
node_modules/node-blockly/blockly/accessible/media/delete.ogg
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/node-blockly/blockly/accessible/media/delete.wav
generated
vendored
Normal file
BIN
node_modules/node-blockly/blockly/accessible/media/delete.wav
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/node-blockly/blockly/accessible/media/oops.mp3
generated
vendored
Normal file
BIN
node_modules/node-blockly/blockly/accessible/media/oops.mp3
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/node-blockly/blockly/accessible/media/oops.ogg
generated
vendored
Normal file
BIN
node_modules/node-blockly/blockly/accessible/media/oops.ogg
generated
vendored
Normal file
Binary file not shown.
BIN
node_modules/node-blockly/blockly/accessible/media/oops.wav
generated
vendored
Normal file
BIN
node_modules/node-blockly/blockly/accessible/media/oops.wav
generated
vendored
Normal file
Binary file not shown.
62
node_modules/node-blockly/blockly/accessible/messages.js
generated
vendored
Normal file
62
node_modules/node-blockly/blockly/accessible/messages.js
generated
vendored
Normal file
@@ -0,0 +1,62 @@
|
||||
/**
|
||||
* @license
|
||||
* Visual Blocks Language
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Translatable string constants for Accessible Blockly.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
'use strict';
|
||||
|
||||
Blockly.Msg.WORKSPACE = 'Workspace';
|
||||
Blockly.Msg.WORKSPACE_BLOCK =
|
||||
'workspace block. Move right to edit. Press Enter for more options.';
|
||||
|
||||
Blockly.Msg.ATTACH_NEW_BLOCK_TO_LINK = 'Attach new block to link...';
|
||||
Blockly.Msg.CREATE_NEW_BLOCK_GROUP = 'Create new block group...';
|
||||
Blockly.Msg.ERASE_WORKSPACE = 'Erase Workspace';
|
||||
Blockly.Msg.NO_BLOCKS_IN_WORKSPACE = 'There are no blocks in the workspace.';
|
||||
|
||||
Blockly.Msg.COPY_BLOCK = 'Copy block';
|
||||
Blockly.Msg.DELETE = 'Delete block';
|
||||
Blockly.Msg.MARK_SPOT_BEFORE = 'Add link before';
|
||||
Blockly.Msg.MARK_SPOT_AFTER = 'Add link after';
|
||||
Blockly.Msg.MARK_THIS_SPOT = 'Add link inside';
|
||||
Blockly.Msg.MOVE_TO_MARKED_SPOT = 'Move to existing link';
|
||||
Blockly.Msg.PASTE_AFTER = 'Paste after';
|
||||
Blockly.Msg.PASTE_BEFORE = 'Paste before';
|
||||
Blockly.Msg.PASTE_INSIDE = 'Paste inside';
|
||||
|
||||
Blockly.Msg.BLOCK_OPTIONS = 'Block Options';
|
||||
Blockly.Msg.SELECT_A_BLOCK = 'Select a block...';
|
||||
Blockly.Msg.CANCEL = 'Cancel';
|
||||
|
||||
Blockly.Msg.ANY = 'any';
|
||||
Blockly.Msg.BLOCK = 'block';
|
||||
Blockly.Msg.BUTTON = 'Button.';
|
||||
Blockly.Msg.FOR = 'for';
|
||||
Blockly.Msg.VALUE = 'value';
|
||||
|
||||
Blockly.Msg.ADDED_LINK_MSG = 'Added link.';
|
||||
Blockly.Msg.ATTACHED_BLOCK_TO_LINK_MSG = 'attached to link. ';
|
||||
Blockly.Msg.COPIED_BLOCK_MSG = 'copied. ';
|
||||
Blockly.Msg.PASTED_BLOCK_FROM_CLIPBOARD_MSG = 'pasted. ';
|
||||
|
||||
Blockly.Msg.PRESS_ENTER_TO_EDIT_NUMBER = 'Press Enter to edit number. ';
|
||||
Blockly.Msg.PRESS_ENTER_TO_EDIT_TEXT = 'Press Enter to edit text. ';
|
||||
61
node_modules/node-blockly/blockly/accessible/notifications.service.js
generated
vendored
Normal file
61
node_modules/node-blockly/blockly/accessible/notifications.service.js
generated
vendored
Normal file
@@ -0,0 +1,61 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service for updating the ARIA live region that
|
||||
* allows screenreaders to notify the user about actions that they have taken.
|
||||
* @author sll@google.com (Sean Lip)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.NotificationsService');
|
||||
|
||||
|
||||
blocklyApp.NotificationsService = ng.core.Class({
|
||||
constructor: [function() {
|
||||
this.currentMessage = '';
|
||||
this.timeouts = [];
|
||||
}],
|
||||
setDisplayedMessage_: function(newMessage) {
|
||||
this.currentMessage = newMessage;
|
||||
},
|
||||
getDisplayedMessage: function() {
|
||||
return this.currentMessage;
|
||||
},
|
||||
speak: function(newMessage) {
|
||||
// Clear and reset any existing timeouts.
|
||||
this.timeouts.forEach(function(timeout) {
|
||||
clearTimeout(timeout);
|
||||
});
|
||||
this.timeouts.length = 0;
|
||||
|
||||
// Clear the current message, so that if, e.g., two operations of the same
|
||||
// type are performed, both messages will be read in succession.
|
||||
this.setDisplayedMessage_('');
|
||||
|
||||
// We need a non-zero timeout here, otherwise NVDA does not read the
|
||||
// notification messages properly.
|
||||
var that = this;
|
||||
this.timeouts.push(setTimeout(function() {
|
||||
that.setDisplayedMessage_(newMessage);
|
||||
}, 20));
|
||||
this.timeouts.push(setTimeout(function() {
|
||||
that.setDisplayedMessage_('');
|
||||
}, 5000));
|
||||
}
|
||||
});
|
||||
132
node_modules/node-blockly/blockly/accessible/sidebar.component.js
generated
vendored
Normal file
132
node_modules/node-blockly/blockly/accessible/sidebar.component.js
generated
vendored
Normal file
@@ -0,0 +1,132 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component representing the sidebar that is shown next
|
||||
* to the workspace.
|
||||
*
|
||||
* @author sll@google.com (Sean Lip)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.SidebarComponent');
|
||||
|
||||
goog.require('blocklyApp.UtilsService');
|
||||
|
||||
goog.require('blocklyApp.BlockConnectionService');
|
||||
goog.require('blocklyApp.ToolboxModalService');
|
||||
goog.require('blocklyApp.TranslatePipe');
|
||||
goog.require('blocklyApp.TreeService');
|
||||
goog.require('blocklyApp.VariableModalService');
|
||||
|
||||
|
||||
blocklyApp.SidebarComponent = ng.core.Component({
|
||||
selector: 'blockly-sidebar',
|
||||
template: `
|
||||
<div class="blocklySidebarColumn">
|
||||
<button *ngFor="#buttonConfig of customSidebarButtons"
|
||||
id="{{buttonConfig.id || undefined}}"
|
||||
(click)="buttonConfig.action()"
|
||||
class="blocklySidebarButton">
|
||||
{{buttonConfig.text}}
|
||||
</button>
|
||||
<button id="{{ID_FOR_ATTACH_TO_LINK_BUTTON}}"
|
||||
(click)="showToolboxModalForAttachToMarkedConnection()"
|
||||
[attr.disabled]="!isAnyConnectionMarked() ? 'disabled' : undefined"
|
||||
[attr.aria-disabled]="!isAnyConnectionMarked()"
|
||||
class="blocklySidebarButton">
|
||||
{{'ATTACH_NEW_BLOCK_TO_LINK'|translate}}
|
||||
</button>
|
||||
<button id="{{ID_FOR_CREATE_NEW_GROUP_BUTTON}}"
|
||||
(click)="showToolboxModalForCreateNewGroup()"
|
||||
class="blocklySidebarButton">
|
||||
{{'CREATE_NEW_BLOCK_GROUP'|translate}}
|
||||
</button>
|
||||
<button id="clear-workspace" (click)="clearWorkspace()"
|
||||
[attr.disabled]="isWorkspaceEmpty() ? 'disabled' : undefined"
|
||||
[attr.aria-disabled]="isWorkspaceEmpty()"
|
||||
class="blocklySidebarButton">
|
||||
{{'ERASE_WORKSPACE'|translate}}
|
||||
</button>
|
||||
<button *ngIf="hasVariableCategory()" id="add-variable"
|
||||
(click)="showAddVariableModal()"
|
||||
class="blocklySidebarButton">
|
||||
Add Variable
|
||||
</button>
|
||||
</div>
|
||||
`,
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.BlockConnectionService,
|
||||
blocklyApp.ToolboxModalService,
|
||||
blocklyApp.TreeService,
|
||||
blocklyApp.UtilsService,
|
||||
blocklyApp.VariableModalService,
|
||||
function(
|
||||
blockConnectionService, toolboxModalService, treeService,
|
||||
utilsService, variableService) {
|
||||
// ACCESSIBLE_GLOBALS is a global variable defined by the containing
|
||||
// page. It should contain a key, customSidebarButtons, describing
|
||||
// additional buttons that should be displayed after the default ones.
|
||||
// See README.md for details.
|
||||
this.customSidebarButtons =
|
||||
ACCESSIBLE_GLOBALS && ACCESSIBLE_GLOBALS.customSidebarButtons ?
|
||||
ACCESSIBLE_GLOBALS.customSidebarButtons : [];
|
||||
|
||||
this.blockConnectionService = blockConnectionService;
|
||||
this.toolboxModalService = toolboxModalService;
|
||||
this.treeService = treeService;
|
||||
this.utilsService = utilsService;
|
||||
this.variableModalService = variableService;
|
||||
|
||||
this.ID_FOR_ATTACH_TO_LINK_BUTTON = 'blocklyAttachToLinkBtn';
|
||||
this.ID_FOR_CREATE_NEW_GROUP_BUTTON = 'blocklyCreateNewGroupBtn';
|
||||
}
|
||||
],
|
||||
isAnyConnectionMarked: function() {
|
||||
return this.blockConnectionService.isAnyConnectionMarked();
|
||||
},
|
||||
isWorkspaceEmpty: function() {
|
||||
return this.utilsService.isWorkspaceEmpty();
|
||||
},
|
||||
hasVariableCategory: function() {
|
||||
return this.toolboxModalService.toolboxHasVariableCategory();
|
||||
},
|
||||
clearWorkspace: function() {
|
||||
blocklyApp.workspace.clear();
|
||||
this.treeService.clearAllActiveDescs();
|
||||
// The timeout is needed in order to give the blocks time to be cleared
|
||||
// from the workspace, and for the 'workspace is empty' button to show up.
|
||||
setTimeout(function() {
|
||||
document.getElementById(blocklyApp.ID_FOR_EMPTY_WORKSPACE_BTN).focus();
|
||||
}, 50);
|
||||
},
|
||||
showToolboxModalForAttachToMarkedConnection: function() {
|
||||
this.toolboxModalService.showToolboxModalForAttachToMarkedConnection(
|
||||
this.ID_FOR_ATTACH_TO_LINK_BUTTON);
|
||||
},
|
||||
showToolboxModalForCreateNewGroup: function() {
|
||||
this.toolboxModalService.showToolboxModalForCreateNewGroup(
|
||||
this.ID_FOR_CREATE_NEW_GROUP_BUTTON);
|
||||
},
|
||||
showAddVariableModal: function() {
|
||||
this.variableModalService.showAddModal_("item");
|
||||
}
|
||||
});
|
||||
188
node_modules/node-blockly/blockly/accessible/toolbox-modal.component.js
generated
vendored
Normal file
188
node_modules/node-blockly/blockly/accessible/toolbox-modal.component.js
generated
vendored
Normal file
@@ -0,0 +1,188 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component representing the toolbox modal.
|
||||
*
|
||||
* @author sll@google.com (Sean Lip)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.ToolboxModalComponent');
|
||||
|
||||
goog.require('Blockly.CommonModal');
|
||||
goog.require('blocklyApp.AudioService');
|
||||
goog.require('blocklyApp.KeyboardInputService');
|
||||
goog.require('blocklyApp.ToolboxModalService');
|
||||
goog.require('blocklyApp.TranslatePipe');
|
||||
goog.require('blocklyApp.TreeService');
|
||||
goog.require('blocklyApp.UtilsService');
|
||||
|
||||
|
||||
blocklyApp.ToolboxModalComponent = ng.core.Component({
|
||||
selector: 'blockly-toolbox-modal',
|
||||
template: `
|
||||
<div *ngIf="modalIsVisible" class="blocklyModalCurtain"
|
||||
(click)="dismissModal()">
|
||||
<!-- $event.stopPropagation() prevents the modal from closing when its
|
||||
interior is clicked. -->
|
||||
<div id="toolboxModal" class="blocklyModal" role="alertdialog"
|
||||
(click)="$event.stopPropagation()" tabindex="-1"
|
||||
aria-labelledby="toolboxModalHeading">
|
||||
<h3 id="toolboxModalHeading">{{'SELECT_A_BLOCK'|translate}}</h3>
|
||||
|
||||
<div *ngFor="#toolboxCategory of toolboxCategories; #categoryIndex=index">
|
||||
<h4 *ngIf="toolboxCategory.categoryName">{{toolboxCategory.categoryName}}</h4>
|
||||
<div class="blocklyModalButtonContainer"
|
||||
*ngFor="#block of toolboxCategory.blocks; #blockIndex=index">
|
||||
<button [id]="getOptionId(getOverallIndex(categoryIndex, blockIndex))"
|
||||
(click)="selectBlock(getBlock(categoryIndex, blockIndex))"
|
||||
[ngClass]="{activeButton: activeButtonIndex == getOverallIndex(categoryIndex, blockIndex)}">
|
||||
{{getBlockDescription(block)}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="blocklyModalButtonContainer">
|
||||
<button [id]="getCancelOptionId()" (click)="dismissModal()"
|
||||
[ngClass]="{activeButton: activeButtonIndex == totalNumBlocks}">
|
||||
{{'CANCEL'|translate}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.ToolboxModalService, blocklyApp.KeyboardInputService,
|
||||
blocklyApp.AudioService, blocklyApp.UtilsService, blocklyApp.TreeService,
|
||||
function(
|
||||
toolboxModalService_, keyboardInputService_, audioService_,
|
||||
utilsService_, treeService_) {
|
||||
this.toolboxModalService = toolboxModalService_;
|
||||
this.keyboardInputService = keyboardInputService_;
|
||||
this.audioService = audioService_;
|
||||
this.utilsService = utilsService_;
|
||||
this.treeService = treeService_;
|
||||
|
||||
this.modalIsVisible = false;
|
||||
this.toolboxCategories = [];
|
||||
this.onSelectBlockCallback = null;
|
||||
this.onDismissCallback = null;
|
||||
|
||||
this.firstBlockIndexes = [];
|
||||
this.activeButtonIndex = -1;
|
||||
this.totalNumBlocks = 0;
|
||||
|
||||
var that = this;
|
||||
this.toolboxModalService.registerPreShowHook(
|
||||
function(
|
||||
toolboxCategories, onSelectBlockCallback, onDismissCallback) {
|
||||
that.modalIsVisible = true;
|
||||
that.toolboxCategories = toolboxCategories;
|
||||
that.onSelectBlockCallback = onSelectBlockCallback;
|
||||
that.onDismissCallback = onDismissCallback;
|
||||
|
||||
// The indexes of the buttons corresponding to the first block in
|
||||
// each category, as well as the 'cancel' button at the end.
|
||||
that.firstBlockIndexes = [];
|
||||
that.activeButtonIndex = -1;
|
||||
that.totalNumBlocks = 0;
|
||||
|
||||
var cumulativeIndex = 0;
|
||||
that.toolboxCategories.forEach(function(category) {
|
||||
that.firstBlockIndexes.push(cumulativeIndex);
|
||||
cumulativeIndex += category.blocks.length;
|
||||
});
|
||||
that.firstBlockIndexes.push(cumulativeIndex);
|
||||
that.totalNumBlocks = cumulativeIndex;
|
||||
|
||||
Blockly.CommonModal.setupKeyboardOverrides(that);
|
||||
that.keyboardInputService.addOverride('13', function(evt) {
|
||||
evt.preventDefault();
|
||||
evt.stopPropagation();
|
||||
|
||||
if (that.activeButtonIndex == -1) {
|
||||
return;
|
||||
}
|
||||
|
||||
var button = document.getElementById(
|
||||
that.getOptionId(that.activeButtonIndex));
|
||||
|
||||
for (var i = 0; i < that.toolboxCategories.length; i++) {
|
||||
if (that.firstBlockIndexes[i + 1] > that.activeButtonIndex) {
|
||||
var categoryIndex = i;
|
||||
var blockIndex =
|
||||
that.activeButtonIndex - that.firstBlockIndexes[i];
|
||||
var block = that.getBlock(categoryIndex, blockIndex);
|
||||
that.selectBlock(block);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// The 'Cancel' button has been pressed.
|
||||
that.dismissModal();
|
||||
});
|
||||
|
||||
setTimeout(function() {
|
||||
document.getElementById('toolboxModal').focus();
|
||||
}, 150);
|
||||
}
|
||||
);
|
||||
}
|
||||
],
|
||||
// Closes the modal (on both success and failure).
|
||||
hideModal_: Blockly.CommonModal.hideModal,
|
||||
// Focuses on the button represented by the given index.
|
||||
focusOnOption: function(index) {
|
||||
var button = document.getElementById(this.getOptionId(index));
|
||||
button.focus();
|
||||
},
|
||||
// Counts the number of interactive elements for the modal.
|
||||
numInteractiveElements: function() {
|
||||
return this.totalNumBlocks + 1;
|
||||
},
|
||||
getOverallIndex: function(categoryIndex, blockIndex) {
|
||||
return this.firstBlockIndexes[categoryIndex] + blockIndex;
|
||||
},
|
||||
getBlock: function(categoryIndex, blockIndex) {
|
||||
return this.toolboxCategories[categoryIndex].blocks[blockIndex];
|
||||
},
|
||||
getBlockDescription: function(block) {
|
||||
return this.utilsService.getBlockDescription(block);
|
||||
},
|
||||
// Returns the ID for the corresponding option button.
|
||||
getOptionId: function(index) {
|
||||
return 'toolbox-modal-option-' + index;
|
||||
},
|
||||
// Returns the ID for the "cancel" option button.
|
||||
getCancelOptionId: function() {
|
||||
return 'toolbox-modal-option-' + this.totalNumBlocks;
|
||||
},
|
||||
selectBlock: function(block) {
|
||||
this.onSelectBlockCallback(block);
|
||||
this.hideModal_();
|
||||
},
|
||||
// Dismisses and closes the modal.
|
||||
dismissModal: function() {
|
||||
this.hideModal_();
|
||||
this.onDismissCallback();
|
||||
}
|
||||
});
|
||||
230
node_modules/node-blockly/blockly/accessible/toolbox-modal.service.js
generated
vendored
Normal file
230
node_modules/node-blockly/blockly/accessible/toolbox-modal.service.js
generated
vendored
Normal file
@@ -0,0 +1,230 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service for the toolbox modal.
|
||||
*
|
||||
* @author sll@google.com (Sean Lip)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.ToolboxModalService');
|
||||
|
||||
goog.require('blocklyApp.UtilsService');
|
||||
|
||||
goog.require('blocklyApp.BlockConnectionService');
|
||||
goog.require('blocklyApp.NotificationsService');
|
||||
goog.require('blocklyApp.TreeService');
|
||||
|
||||
|
||||
blocklyApp.ToolboxModalService = ng.core.Class({
|
||||
constructor: [
|
||||
blocklyApp.BlockConnectionService,
|
||||
blocklyApp.NotificationsService,
|
||||
blocklyApp.TreeService,
|
||||
blocklyApp.UtilsService,
|
||||
function(
|
||||
blockConnectionService, notificationsService, treeService,
|
||||
utilsService) {
|
||||
this.blockConnectionService = blockConnectionService;
|
||||
this.notificationsService = notificationsService;
|
||||
this.treeService = treeService;
|
||||
this.utilsService = utilsService;
|
||||
|
||||
this.modalIsShown = false;
|
||||
|
||||
this.selectedToolboxCategories = null;
|
||||
this.onSelectBlockCallback = null;
|
||||
this.onDismissCallback = null;
|
||||
this.hasVariableCategory = null;
|
||||
// The aim of the pre-show hook is to populate the modal component with
|
||||
// the information it needs to display the modal (e.g., which categories
|
||||
// and blocks to display).
|
||||
this.preShowHook = function() {
|
||||
throw Error(
|
||||
'A pre-show hook must be defined for the toolbox modal before it ' +
|
||||
'can be shown.');
|
||||
};
|
||||
}
|
||||
],
|
||||
populateToolbox_: function() {
|
||||
// Populate the toolbox categories.
|
||||
this.allToolboxCategories = [];
|
||||
var toolboxXmlElt = document.getElementById('blockly-toolbox-xml');
|
||||
var toolboxCategoryElts = toolboxXmlElt.getElementsByTagName('category');
|
||||
if (toolboxCategoryElts.length) {
|
||||
this.allToolboxCategories = Array.from(toolboxCategoryElts).map(
|
||||
function(categoryElt) {
|
||||
var tmpWorkspace = new Blockly.Workspace();
|
||||
var custom = categoryElt.attributes.custom
|
||||
// TODO (corydiers): Implement custom flyouts once #1153 is solved.
|
||||
if (custom && custom.value == Blockly.VARIABLE_CATEGORY_NAME) {
|
||||
var varBlocks =
|
||||
Blockly.Variables.flyoutCategoryBlocks(blocklyApp.workspace);
|
||||
varBlocks.forEach(function(block) {
|
||||
Blockly.Xml.domToBlock(block, tmpWorkspace);
|
||||
});
|
||||
} else {
|
||||
Blockly.Xml.domToWorkspace(categoryElt, tmpWorkspace);
|
||||
}
|
||||
return {
|
||||
categoryName: categoryElt.attributes.name.value,
|
||||
blocks: tmpWorkspace.topBlocks_
|
||||
};
|
||||
}
|
||||
);
|
||||
this.computeCategoriesForCreateNewGroupModal_();
|
||||
} else {
|
||||
var that = this;
|
||||
// If there are no top-level categories, we create a single category
|
||||
// containing all the top-level blocks.
|
||||
var tmpWorkspace = new Blockly.Workspace();
|
||||
Array.from(toolboxXmlElt.children).forEach(function(topLevelNode) {
|
||||
Blockly.Xml.domToBlock(tmpWorkspace, topLevelNode);
|
||||
});
|
||||
|
||||
that.allToolboxCategories = [{
|
||||
categoryName: '',
|
||||
blocks: tmpWorkspace.topBlocks_
|
||||
}];
|
||||
|
||||
that.computeCategoriesForCreateNewGroupModal_();
|
||||
}
|
||||
},
|
||||
computeCategoriesForCreateNewGroupModal_: function() {
|
||||
// Precompute toolbox categories for blocks that have no output
|
||||
// connection (and that can therefore be used as the base block of a
|
||||
// "create new block group" action).
|
||||
this.toolboxCategoriesForNewGroup = [];
|
||||
var that = this;
|
||||
this.allToolboxCategories.forEach(function(toolboxCategory) {
|
||||
var baseBlocks = toolboxCategory.blocks.filter(function(block) {
|
||||
return !block.outputConnection;
|
||||
});
|
||||
|
||||
if (baseBlocks.length > 0) {
|
||||
that.toolboxCategoriesForNewGroup.push({
|
||||
categoryName: toolboxCategory.categoryName,
|
||||
blocks: baseBlocks
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
registerPreShowHook: function(preShowHook) {
|
||||
var that = this;
|
||||
this.preShowHook = function() {
|
||||
preShowHook(
|
||||
that.selectedToolboxCategories, that.onSelectBlockCallback,
|
||||
that.onDismissCallback);
|
||||
};
|
||||
},
|
||||
isModalShown: function() {
|
||||
return this.modalIsShown;
|
||||
},
|
||||
toolboxHasVariableCategory: function() {
|
||||
if (this.hasVariableCategory === null) {
|
||||
var toolboxXmlElt = document.getElementById('blockly-toolbox-xml');
|
||||
var toolboxCategoryElts = toolboxXmlElt.getElementsByTagName('category');
|
||||
var that = this;
|
||||
Array.from(toolboxCategoryElts).forEach(
|
||||
function(categoryElt) {
|
||||
var custom = categoryElt.attributes.custom;
|
||||
if (custom && custom.value == Blockly.VARIABLE_CATEGORY_NAME) {
|
||||
that.hasVariableCategory = true;
|
||||
}
|
||||
});
|
||||
|
||||
if (this.hasVariableCategory === null) {
|
||||
this.hasVariableCategory = false;
|
||||
}
|
||||
}
|
||||
|
||||
return this.hasVariableCategory;
|
||||
},
|
||||
showModal_: function(
|
||||
selectedToolboxCategories, onSelectBlockCallback, onDismissCallback) {
|
||||
this.selectedToolboxCategories = selectedToolboxCategories;
|
||||
this.onSelectBlockCallback = onSelectBlockCallback;
|
||||
this.onDismissCallback = onDismissCallback;
|
||||
|
||||
this.preShowHook();
|
||||
this.modalIsShown = true;
|
||||
},
|
||||
hideModal: function() {
|
||||
this.modalIsShown = false;
|
||||
},
|
||||
showToolboxModalForAttachToMarkedConnection: function(sourceButtonId) {
|
||||
var that = this;
|
||||
|
||||
var selectedToolboxCategories = [];
|
||||
this.populateToolbox_();
|
||||
this.allToolboxCategories.forEach(function(toolboxCategory) {
|
||||
var selectedBlocks = toolboxCategory.blocks.filter(function(block) {
|
||||
return that.blockConnectionService.canBeAttachedToMarkedConnection(
|
||||
block);
|
||||
});
|
||||
|
||||
if (selectedBlocks.length > 0) {
|
||||
selectedToolboxCategories.push({
|
||||
categoryName: toolboxCategory.categoryName,
|
||||
blocks: selectedBlocks
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
this.showModal_(selectedToolboxCategories, function(block) {
|
||||
var blockDescription = that.utilsService.getBlockDescription(block);
|
||||
|
||||
// Clear the active desc for the destination tree, so that it can be
|
||||
// cleanly reinstated after the new block is attached.
|
||||
var destinationTreeId = that.treeService.getTreeIdForBlock(
|
||||
that.blockConnectionService.getMarkedConnectionSourceBlock().id);
|
||||
that.treeService.clearActiveDesc(destinationTreeId);
|
||||
var newBlockId = that.blockConnectionService.attachToMarkedConnection(
|
||||
block);
|
||||
|
||||
// Invoke a digest cycle, so that the DOM settles.
|
||||
setTimeout(function() {
|
||||
that.treeService.focusOnBlock(newBlockId);
|
||||
that.notificationsService.speak(
|
||||
'Attached. Now on, ' + blockDescription + ', block in workspace.');
|
||||
});
|
||||
}, function() {
|
||||
document.getElementById(sourceButtonId).focus();
|
||||
});
|
||||
},
|
||||
showToolboxModalForCreateNewGroup: function(sourceButtonId) {
|
||||
var that = this;
|
||||
this.populateToolbox_();
|
||||
this.showModal_(this.toolboxCategoriesForNewGroup, function(block) {
|
||||
var blockDescription = that.utilsService.getBlockDescription(block);
|
||||
var xml = Blockly.Xml.blockToDom(block);
|
||||
var newBlockId = Blockly.Xml.domToBlock(blocklyApp.workspace, xml).id;
|
||||
|
||||
// Invoke a digest cycle, so that the DOM settles.
|
||||
setTimeout(function() {
|
||||
that.treeService.focusOnBlock(newBlockId);
|
||||
that.notificationsService.speak(
|
||||
'Created new group in workspace. Now on, ' + blockDescription +
|
||||
', block in workspace.');
|
||||
});
|
||||
}, function() {
|
||||
document.getElementById(sourceButtonId).focus();
|
||||
});
|
||||
}
|
||||
});
|
||||
36
node_modules/node-blockly/blockly/accessible/translate.pipe.js
generated
vendored
Normal file
36
node_modules/node-blockly/blockly/accessible/translate.pipe.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Pipe for internationalizing Blockly message strings.
|
||||
* @author sll@google.com (Sean Lip)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.TranslatePipe');
|
||||
|
||||
|
||||
blocklyApp.TranslatePipe = ng.core.Pipe({
|
||||
name: 'translate'
|
||||
})
|
||||
.Class({
|
||||
constructor: function() {},
|
||||
transform: function(messageId) {
|
||||
return Blockly.Msg[messageId];
|
||||
}
|
||||
});
|
||||
609
node_modules/node-blockly/blockly/accessible/tree.service.js
generated
vendored
Normal file
609
node_modules/node-blockly/blockly/accessible/tree.service.js
generated
vendored
Normal file
@@ -0,0 +1,609 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service that handles keyboard navigation on workspace
|
||||
* block groups (internally represented as trees). This is a singleton service
|
||||
* for the entire application.
|
||||
*
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.TreeService');
|
||||
|
||||
goog.require('blocklyApp.UtilsService');
|
||||
|
||||
goog.require('blocklyApp.AudioService');
|
||||
goog.require('blocklyApp.BlockConnectionService');
|
||||
goog.require('blocklyApp.BlockOptionsModalService');
|
||||
goog.require('blocklyApp.NotificationsService');
|
||||
goog.require('blocklyApp.VariableModalService');
|
||||
|
||||
|
||||
blocklyApp.TreeService = ng.core.Class({
|
||||
constructor: [
|
||||
blocklyApp.AudioService,
|
||||
blocklyApp.BlockConnectionService,
|
||||
blocklyApp.BlockOptionsModalService,
|
||||
blocklyApp.NotificationsService,
|
||||
blocklyApp.UtilsService,
|
||||
blocklyApp.VariableModalService,
|
||||
function(
|
||||
audioService, blockConnectionService, blockOptionsModalService,
|
||||
notificationsService, utilsService, variableModalService) {
|
||||
this.audioService = audioService;
|
||||
this.blockConnectionService = blockConnectionService;
|
||||
this.blockOptionsModalService = blockOptionsModalService;
|
||||
this.notificationsService = notificationsService;
|
||||
this.utilsService = utilsService;
|
||||
this.variableModalService = variableModalService;
|
||||
|
||||
// The suffix used for all IDs of block root elements.
|
||||
this.BLOCK_ROOT_ID_SUFFIX_ = blocklyApp.BLOCK_ROOT_ID_SUFFIX;
|
||||
// Maps tree IDs to the IDs of their active descendants.
|
||||
this.activeDescendantIds_ = {};
|
||||
// Array containing all the sidebar button elements.
|
||||
this.sidebarButtonElements_ = Array.from(
|
||||
document.querySelectorAll('button.blocklySidebarButton'));
|
||||
}
|
||||
],
|
||||
scrollToElement_: function(elementId) {
|
||||
var element = document.getElementById(elementId);
|
||||
var documentElement = document.body || document.documentElement;
|
||||
if (element.offsetTop < documentElement.scrollTop ||
|
||||
element.offsetTop > documentElement.scrollTop + window.innerHeight) {
|
||||
window.scrollTo(0, element.offsetTop - 10);
|
||||
}
|
||||
},
|
||||
|
||||
isLi_: function(node) {
|
||||
return node.tagName == 'LI';
|
||||
},
|
||||
getParentLi_: function(element) {
|
||||
var nextNode = element.parentNode;
|
||||
while (nextNode && !this.isLi_(nextNode)) {
|
||||
nextNode = nextNode.parentNode;
|
||||
}
|
||||
return nextNode;
|
||||
},
|
||||
getFirstChildLi_: function(element) {
|
||||
var childList = element.children;
|
||||
for (var i = 0; i < childList.length; i++) {
|
||||
if (this.isLi_(childList[i])) {
|
||||
return childList[i];
|
||||
} else {
|
||||
var potentialElement = this.getFirstChildLi_(childList[i]);
|
||||
if (potentialElement) {
|
||||
return potentialElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
getLastChildLi_: function(element) {
|
||||
var childList = element.children;
|
||||
for (var i = childList.length - 1; i >= 0; i--) {
|
||||
if (this.isLi_(childList[i])) {
|
||||
return childList[i];
|
||||
} else {
|
||||
var potentialElement = this.getLastChildLi_(childList[i]);
|
||||
if (potentialElement) {
|
||||
return potentialElement;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
getInitialSiblingLi_: function(element) {
|
||||
while (true) {
|
||||
var previousSibling = this.getPreviousSiblingLi_(element);
|
||||
if (previousSibling && previousSibling.id != element.id) {
|
||||
element = previousSibling;
|
||||
} else {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
},
|
||||
getPreviousSiblingLi_: function(element) {
|
||||
if (element.previousElementSibling) {
|
||||
var sibling = element.previousElementSibling;
|
||||
return this.isLi_(sibling) ? sibling : this.getLastChildLi_(sibling);
|
||||
} else {
|
||||
var parent = element.parentNode;
|
||||
while (parent && parent.tagName != 'OL') {
|
||||
if (parent.previousElementSibling) {
|
||||
var node = parent.previousElementSibling;
|
||||
return this.isLi_(node) ? node : this.getLastChildLi_(node);
|
||||
} else {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getNextSiblingLi_: function(element) {
|
||||
if (element.nextElementSibling) {
|
||||
var sibling = element.nextElementSibling;
|
||||
return this.isLi_(sibling) ? sibling : this.getFirstChildLi_(sibling);
|
||||
} else {
|
||||
var parent = element.parentNode;
|
||||
while (parent && parent.tagName != 'OL') {
|
||||
if (parent.nextElementSibling) {
|
||||
var node = parent.nextElementSibling;
|
||||
return this.isLi_(node) ? node : this.getFirstChildLi_(node);
|
||||
} else {
|
||||
parent = parent.parentNode;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
},
|
||||
getFinalSiblingLi_: function(element) {
|
||||
while (true) {
|
||||
var nextSibling = this.getNextSiblingLi_(element);
|
||||
if (nextSibling && nextSibling.id != element.id) {
|
||||
element = nextSibling;
|
||||
} else {
|
||||
return element;
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
// Returns a list of all focus targets in the workspace, including the
|
||||
// "Create new group" button that appears when no blocks are present.
|
||||
getWorkspaceFocusTargets_: function() {
|
||||
return Array.from(
|
||||
document.querySelectorAll('.blocklyWorkspaceFocusTarget'));
|
||||
},
|
||||
getAllFocusTargets_: function() {
|
||||
return this.getWorkspaceFocusTargets_().concat(this.sidebarButtonElements_);
|
||||
},
|
||||
getNextFocusTargetId_: function(treeId) {
|
||||
var trees = this.getAllFocusTargets_();
|
||||
for (var i = 0; i < trees.length - 1; i++) {
|
||||
if (trees[i].id == treeId) {
|
||||
return trees[i + 1].id;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
getPreviousFocusTargetId_: function(treeId) {
|
||||
var trees = this.getAllFocusTargets_();
|
||||
for (var i = trees.length - 1; i > 0; i--) {
|
||||
if (trees[i].id == treeId) {
|
||||
return trees[i - 1].id;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
},
|
||||
|
||||
getActiveDescId: function(treeId) {
|
||||
return this.activeDescendantIds_[treeId] || '';
|
||||
},
|
||||
// Set the active desc for this tree to its first child.
|
||||
initActiveDesc: function(treeId) {
|
||||
var tree = document.getElementById(treeId);
|
||||
this.setActiveDesc(this.getFirstChildLi_(tree).id, treeId);
|
||||
},
|
||||
// Make a given element the active descendant of a given tree.
|
||||
setActiveDesc: function(newActiveDescId, treeId) {
|
||||
if (this.getActiveDescId(treeId)) {
|
||||
this.clearActiveDesc(treeId);
|
||||
}
|
||||
document.getElementById(newActiveDescId).classList.add(
|
||||
'blocklyActiveDescendant');
|
||||
this.activeDescendantIds_[treeId] = newActiveDescId;
|
||||
|
||||
// Scroll the new active desc into view, if needed. This has no effect
|
||||
// for blind users, but is helpful for sighted onlookers.
|
||||
this.scrollToElement_(newActiveDescId);
|
||||
},
|
||||
// This clears the active descendant of the given tree. It is used just
|
||||
// before the tree is deleted.
|
||||
clearActiveDesc: function(treeId) {
|
||||
var activeDesc = document.getElementById(this.getActiveDescId(treeId));
|
||||
if (activeDesc) {
|
||||
activeDesc.classList.remove('blocklyActiveDescendant');
|
||||
}
|
||||
|
||||
if (this.activeDescendantIds_[treeId]) {
|
||||
delete this.activeDescendantIds_[treeId];
|
||||
}
|
||||
},
|
||||
clearAllActiveDescs: function() {
|
||||
for (var treeId in this.activeDescendantIds_) {
|
||||
var activeDesc = document.getElementById(this.getActiveDescId(treeId));
|
||||
if (activeDesc) {
|
||||
activeDesc.classList.remove('blocklyActiveDescendant');
|
||||
}
|
||||
}
|
||||
|
||||
this.activeDescendantIds_ = {};
|
||||
},
|
||||
|
||||
isTreeRoot_: function(element) {
|
||||
return element.classList.contains('blocklyTree');
|
||||
},
|
||||
getBlockRootId_: function(blockId) {
|
||||
return blockId + this.BLOCK_ROOT_ID_SUFFIX_;
|
||||
},
|
||||
// Return the 'lowest' Blockly block in the DOM tree that contains the given
|
||||
// DOM element.
|
||||
getContainingBlock_: function(domElement) {
|
||||
var potentialBlockRoot = domElement;
|
||||
while (potentialBlockRoot.id.indexOf(this.BLOCK_ROOT_ID_SUFFIX_) === -1) {
|
||||
potentialBlockRoot = potentialBlockRoot.parentNode;
|
||||
}
|
||||
|
||||
var blockRootId = potentialBlockRoot.id;
|
||||
var blockId = blockRootId.substring(
|
||||
0, blockRootId.length - this.BLOCK_ROOT_ID_SUFFIX_.length);
|
||||
return blocklyApp.workspace.getBlockById(blockId);
|
||||
},
|
||||
isTopLevelBlock_: function(block) {
|
||||
return !block.getParent();
|
||||
},
|
||||
// Returns whether the given block is at the top level, and has no siblings.
|
||||
isIsolatedTopLevelBlock_: function(block) {
|
||||
var blockHasNoSiblings = (
|
||||
(!block.nextConnection ||
|
||||
!block.nextConnection.targetConnection) &&
|
||||
(!block.previousConnection ||
|
||||
!block.previousConnection.targetConnection));
|
||||
return this.isTopLevelBlock_(block) && blockHasNoSiblings;
|
||||
},
|
||||
safelyRemoveBlock_: function(block, deleteBlockFunc, areNextBlocksRemoved) {
|
||||
// Runs the given deleteBlockFunc (which should have the effect of deleting
|
||||
// the given block, and possibly others after it if `areNextBlocksRemoved`
|
||||
// is true) and then does one of two things:
|
||||
// - If the deleted block was an isolated top-level block, or it is a top-
|
||||
// level block and the next blocks are going to be removed, this means
|
||||
// the current tree has no more blocks after the deletion. So, pick a new
|
||||
// tree to focus on.
|
||||
// - Otherwise, set the correct new active desc for the current tree.
|
||||
var treeId = this.getTreeIdForBlock(block.id);
|
||||
|
||||
var treeCeasesToExist = areNextBlocksRemoved ?
|
||||
this.isTopLevelBlock_(block) : this.isIsolatedTopLevelBlock_(block);
|
||||
|
||||
if (treeCeasesToExist) {
|
||||
// Find the node to focus on after the deletion happens.
|
||||
var nextElementToFocusOn = null;
|
||||
var focusTargets = this.getWorkspaceFocusTargets_();
|
||||
for (var i = 0; i < focusTargets.length; i++) {
|
||||
if (focusTargets[i].id == treeId) {
|
||||
if (i + 1 < focusTargets.length) {
|
||||
nextElementToFocusOn = focusTargets[i + 1];
|
||||
} else if (i > 0) {
|
||||
nextElementToFocusOn = focusTargets[i - 1];
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
this.clearActiveDesc(treeId);
|
||||
deleteBlockFunc();
|
||||
// Invoke a digest cycle, so that the DOM settles (and the "Create new
|
||||
// group" button in the workspace shows up, if applicable).
|
||||
setTimeout(function() {
|
||||
if (nextElementToFocusOn) {
|
||||
nextElementToFocusOn.focus();
|
||||
} else {
|
||||
document.getElementById(
|
||||
blocklyApp.ID_FOR_EMPTY_WORKSPACE_BTN).focus();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var blockRootId = this.getBlockRootId_(block.id);
|
||||
var blockRootElement = document.getElementById(blockRootId);
|
||||
|
||||
// Find the new active desc for the current tree by trying the following
|
||||
// possibilities in order: the parent, the next sibling, and the previous
|
||||
// sibling. (If `areNextBlocksRemoved` is true, the next sibling would be
|
||||
// moved together with the moved block, so we don't check it.)
|
||||
if (areNextBlocksRemoved) {
|
||||
var newActiveDesc =
|
||||
this.getParentLi_(blockRootElement) ||
|
||||
this.getPreviousSiblingLi_(blockRootElement);
|
||||
} else {
|
||||
var newActiveDesc =
|
||||
this.getParentLi_(blockRootElement) ||
|
||||
this.getNextSiblingLi_(blockRootElement) ||
|
||||
this.getPreviousSiblingLi_(blockRootElement);
|
||||
}
|
||||
|
||||
this.clearActiveDesc(treeId);
|
||||
deleteBlockFunc();
|
||||
// Invoke a digest cycle, so that the DOM settles.
|
||||
var that = this;
|
||||
setTimeout(function() {
|
||||
that.setActiveDesc(newActiveDesc.id, treeId);
|
||||
document.getElementById(treeId).focus();
|
||||
});
|
||||
}
|
||||
},
|
||||
getTreeIdForBlock: function(blockId) {
|
||||
// Walk up the DOM until we get to the root element of the tree.
|
||||
var potentialRoot = document.getElementById(this.getBlockRootId_(blockId));
|
||||
while (!this.isTreeRoot_(potentialRoot)) {
|
||||
potentialRoot = potentialRoot.parentNode;
|
||||
}
|
||||
return potentialRoot.id;
|
||||
},
|
||||
// Set focus to the tree containing the given block, and set the tree's
|
||||
// active desc to the root element of the given block.
|
||||
focusOnBlock: function(blockId) {
|
||||
// Invoke a digest cycle, in order to allow the ID of the newly-created
|
||||
// tree to be set in the DOM.
|
||||
var that = this;
|
||||
setTimeout(function() {
|
||||
var treeId = that.getTreeIdForBlock(blockId);
|
||||
document.getElementById(treeId).focus();
|
||||
that.setActiveDesc(that.getBlockRootId_(blockId), treeId);
|
||||
});
|
||||
},
|
||||
showBlockOptionsModal: function(block) {
|
||||
var that = this;
|
||||
var actionButtonsInfo = [];
|
||||
|
||||
if (block.previousConnection) {
|
||||
actionButtonsInfo.push({
|
||||
action: function() {
|
||||
that.blockConnectionService.markConnection(block.previousConnection);
|
||||
that.focusOnBlock(block.id);
|
||||
},
|
||||
translationIdForText: 'MARK_SPOT_BEFORE'
|
||||
});
|
||||
}
|
||||
|
||||
if (block.nextConnection) {
|
||||
actionButtonsInfo.push({
|
||||
action: function() {
|
||||
that.blockConnectionService.markConnection(block.nextConnection);
|
||||
that.focusOnBlock(block.id);
|
||||
},
|
||||
translationIdForText: 'MARK_SPOT_AFTER'
|
||||
});
|
||||
}
|
||||
|
||||
if (this.blockConnectionService.canBeMovedToMarkedConnection(block)) {
|
||||
actionButtonsInfo.push({
|
||||
action: function() {
|
||||
var blockDescription = that.utilsService.getBlockDescription(block);
|
||||
var oldDestinationTreeId = that.getTreeIdForBlock(
|
||||
that.blockConnectionService.getMarkedConnectionSourceBlock().id);
|
||||
that.clearActiveDesc(oldDestinationTreeId);
|
||||
|
||||
var newBlockId = that.blockConnectionService.attachToMarkedConnection(
|
||||
block);
|
||||
that.safelyRemoveBlock_(block, function() {
|
||||
block.dispose(false);
|
||||
}, true);
|
||||
|
||||
// Invoke a digest cycle, so that the DOM settles.
|
||||
setTimeout(function() {
|
||||
that.focusOnBlock(newBlockId);
|
||||
var newDestinationTreeId = that.getTreeIdForBlock(newBlockId);
|
||||
|
||||
if (newDestinationTreeId != oldDestinationTreeId) {
|
||||
// The tree ID for a moved block does not seem to behave
|
||||
// predictably. E.g. start with two separate groups of one block
|
||||
// each, add a link before the block in the second group, and
|
||||
// move the block in the first group to that link. The tree ID of
|
||||
// the resulting group ends up being the tree ID for the group
|
||||
// that was originally first, not second as might be expected.
|
||||
// Here, we double-check to ensure that all affected trees have
|
||||
// an active desc set.
|
||||
if (document.getElementById(oldDestinationTreeId)) {
|
||||
var activeDescId = that.getActiveDescId(oldDestinationTreeId);
|
||||
var activeDescTreeId = null;
|
||||
if (activeDescId) {
|
||||
var oldDestinationBlock = that.getContainingBlock_(
|
||||
document.getElementById(activeDescId));
|
||||
activeDescTreeId = that.getTreeIdForBlock(
|
||||
oldDestinationBlock);
|
||||
if (activeDescTreeId != oldDestinationTreeId) {
|
||||
that.clearActiveDesc(oldDestinationTreeId);
|
||||
}
|
||||
}
|
||||
that.initActiveDesc(oldDestinationTreeId);
|
||||
}
|
||||
}
|
||||
|
||||
that.notificationsService.speak(
|
||||
blockDescription + ' ' +
|
||||
Blockly.Msg.ATTACHED_BLOCK_TO_LINK_MSG +
|
||||
'. Now on attached block in workspace.');
|
||||
});
|
||||
},
|
||||
translationIdForText: 'MOVE_TO_MARKED_SPOT'
|
||||
});
|
||||
}
|
||||
|
||||
actionButtonsInfo.push({
|
||||
action: function() {
|
||||
var blockDescription = that.utilsService.getBlockDescription(block);
|
||||
|
||||
that.safelyRemoveBlock_(block, function() {
|
||||
block.dispose(true);
|
||||
that.audioService.playDeleteSound();
|
||||
}, false);
|
||||
|
||||
setTimeout(function() {
|
||||
var message = blockDescription + ' deleted. ' + (
|
||||
that.utilsService.isWorkspaceEmpty() ?
|
||||
'Workspace is empty.' : 'Now on workspace.');
|
||||
that.notificationsService.speak(message);
|
||||
});
|
||||
},
|
||||
translationIdForText: 'DELETE'
|
||||
});
|
||||
|
||||
this.blockOptionsModalService.showModal(actionButtonsInfo, function() {
|
||||
that.focusOnBlock(block.id);
|
||||
});
|
||||
},
|
||||
|
||||
moveUpOneLevel_: function(treeId) {
|
||||
var activeDesc = document.getElementById(this.getActiveDescId(treeId));
|
||||
var nextNode = this.getParentLi_(activeDesc);
|
||||
if (nextNode) {
|
||||
this.setActiveDesc(nextNode.id, treeId);
|
||||
} else {
|
||||
this.audioService.playOopsSound();
|
||||
}
|
||||
},
|
||||
onKeypress: function(e, tree) {
|
||||
// TODO(sll): Instead of this, have a common ActiveContextService which
|
||||
// returns true if at least one modal is shown, and false otherwise.
|
||||
if (this.blockOptionsModalService.isModalShown() ||
|
||||
this.variableModalService.isModalShown()) {
|
||||
return;
|
||||
}
|
||||
|
||||
var treeId = tree.id;
|
||||
var activeDesc = document.getElementById(this.getActiveDescId(treeId));
|
||||
if (!activeDesc) {
|
||||
// The underlying Blockly instance may have decided blocks needed to
|
||||
// be deleted. This is not necessarily an error, but needs to be repaired.
|
||||
this.initActiveDesc(treeId);
|
||||
activeDesc = document.getElementById(this.getActiveDescId(treeId));
|
||||
}
|
||||
|
||||
if (e.altKey || e.ctrlKey) {
|
||||
// Do not intercept combinations such as Alt+Home.
|
||||
return;
|
||||
}
|
||||
|
||||
if (document.activeElement.tagName == 'INPUT' ||
|
||||
document.activeElement.tagName == 'SELECT') {
|
||||
// For input fields, Esc, Enter, and Tab keystrokes are handled specially.
|
||||
if (e.keyCode == 9 || e.keyCode == 13 || e.keyCode == 27) {
|
||||
// Return the focus to the workspace tree containing the input field.
|
||||
document.getElementById(treeId).focus();
|
||||
|
||||
// Note that Tab and Enter events stop propagating, this behavior is
|
||||
// handled on other listeners.
|
||||
if (e.keyCode == 27 || e.keyCode == 13) {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
// Outside an input field, Enter, Tab, Esc and navigation keys are all
|
||||
// recognized.
|
||||
if (e.keyCode == 13) {
|
||||
// Enter key. The user wants to interact with a button, interact with
|
||||
// an input field, or open the block options modal.
|
||||
// Algorithm to find the field: do a DFS through the children until
|
||||
// we find an INPUT, BUTTON or SELECT element (in which case we use it).
|
||||
// Truncate the search at child LI elements.
|
||||
e.stopPropagation();
|
||||
|
||||
var found = false;
|
||||
var dfsStack = Array.from(activeDesc.children);
|
||||
while (dfsStack.length) {
|
||||
var currentNode = dfsStack.shift();
|
||||
if (currentNode.tagName == 'BUTTON') {
|
||||
currentNode.click();
|
||||
found = true;
|
||||
break;
|
||||
} else if (currentNode.tagName == 'INPUT') {
|
||||
currentNode.focus();
|
||||
currentNode.select();
|
||||
this.notificationsService.speak(
|
||||
'Type a value, then press Escape to exit');
|
||||
found = true;
|
||||
break;
|
||||
} else if (currentNode.tagName == 'SELECT') {
|
||||
currentNode.focus();
|
||||
found = true;
|
||||
return;
|
||||
} else if (currentNode.tagName == 'LI') {
|
||||
continue;
|
||||
}
|
||||
|
||||
if (currentNode.children) {
|
||||
var reversedChildren = Array.from(currentNode.children).reverse();
|
||||
reversedChildren.forEach(function(childNode) {
|
||||
dfsStack.unshift(childNode);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// If we cannot find a field to interact with, we open the modal for
|
||||
// the current block instead.
|
||||
if (!found) {
|
||||
var block = this.getContainingBlock_(activeDesc);
|
||||
this.showBlockOptionsModal(block);
|
||||
}
|
||||
} else if (e.keyCode == 9) {
|
||||
// Tab key. The event is allowed to propagate through.
|
||||
} else if ([27, 35, 36, 37, 38, 39, 40].indexOf(e.keyCode) !== -1) {
|
||||
if (e.keyCode == 27 || e.keyCode == 37) {
|
||||
// Esc or left arrow key. Go up a level, if possible.
|
||||
this.moveUpOneLevel_(treeId);
|
||||
} else if (e.keyCode == 35) {
|
||||
// End key. Go to the last sibling in the subtree.
|
||||
var potentialFinalSibling = this.getFinalSiblingLi_(activeDesc);
|
||||
if (potentialFinalSibling) {
|
||||
this.setActiveDesc(potentialFinalSibling.id, treeId);
|
||||
}
|
||||
} else if (e.keyCode == 36) {
|
||||
// Home key. Go to the first sibling in the subtree.
|
||||
var potentialInitialSibling = this.getInitialSiblingLi_(activeDesc);
|
||||
if (potentialInitialSibling) {
|
||||
this.setActiveDesc(potentialInitialSibling.id, treeId);
|
||||
}
|
||||
} else if (e.keyCode == 38) {
|
||||
// Up arrow key. Go to the previous sibling, if possible.
|
||||
var potentialPrevSibling = this.getPreviousSiblingLi_(activeDesc);
|
||||
if (potentialPrevSibling) {
|
||||
this.setActiveDesc(potentialPrevSibling.id, treeId);
|
||||
} else {
|
||||
var statusMessage = 'Reached top of list.';
|
||||
if (this.getParentLi_(activeDesc)) {
|
||||
statusMessage += ' Press left to go to parent list.';
|
||||
}
|
||||
this.audioService.playOopsSound(statusMessage);
|
||||
}
|
||||
} else if (e.keyCode == 39) {
|
||||
// Right arrow key. Go down a level, if possible.
|
||||
var potentialFirstChild = this.getFirstChildLi_(activeDesc);
|
||||
if (potentialFirstChild) {
|
||||
this.setActiveDesc(potentialFirstChild.id, treeId);
|
||||
} else {
|
||||
this.audioService.playOopsSound();
|
||||
}
|
||||
} else if (e.keyCode == 40) {
|
||||
// Down arrow key. Go to the next sibling, if possible.
|
||||
var potentialNextSibling = this.getNextSiblingLi_(activeDesc);
|
||||
if (potentialNextSibling) {
|
||||
this.setActiveDesc(potentialNextSibling.id, treeId);
|
||||
} else {
|
||||
this.audioService.playOopsSound('Reached bottom of list.');
|
||||
}
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
44
node_modules/node-blockly/blockly/accessible/utils.service.js
generated
vendored
Normal file
44
node_modules/node-blockly/blockly/accessible/utils.service.js
generated
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 utility service for multiple components. This is a
|
||||
* singleton service that is used for the entire application. In general, it
|
||||
* should only be used as a stateless adapter for native Blockly functions.
|
||||
*
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.UtilsService');
|
||||
|
||||
|
||||
blocklyApp.ID_FOR_EMPTY_WORKSPACE_BTN = 'blocklyEmptyWorkspaceBtn';
|
||||
blocklyApp.BLOCK_ROOT_ID_SUFFIX = '-blockRoot';
|
||||
|
||||
blocklyApp.UtilsService = ng.core.Class({
|
||||
constructor: [function() {}],
|
||||
getBlockDescription: function(block) {
|
||||
// We use 'BLANK' instead of the default '?' so that the string is read
|
||||
// out. (By default, screen readers tend to ignore punctuation.)
|
||||
return block.toString(undefined, 'BLANK');
|
||||
},
|
||||
isWorkspaceEmpty: function() {
|
||||
return !blocklyApp.workspace.topBlocks_.length;
|
||||
}
|
||||
});
|
||||
118
node_modules/node-blockly/blockly/accessible/variable-add-modal.component.js
generated
vendored
Normal file
118
node_modules/node-blockly/blockly/accessible/variable-add-modal.component.js
generated
vendored
Normal file
@@ -0,0 +1,118 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2017 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Component representing the variable rename modal.
|
||||
*
|
||||
* @author corydiers@google.com (Cory Diers)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.VariableAddModalComponent');
|
||||
|
||||
goog.require('blocklyApp.AudioService');
|
||||
goog.require('blocklyApp.KeyboardInputService');
|
||||
goog.require('blocklyApp.TranslatePipe');
|
||||
goog.require('blocklyApp.VariableModalService');
|
||||
|
||||
goog.require('Blockly.CommonModal');
|
||||
|
||||
|
||||
blocklyApp.VariableAddModalComponent = ng.core.Component({
|
||||
selector: 'blockly-add-variable-modal',
|
||||
template: `
|
||||
<div *ngIf="modalIsVisible"class="blocklyModalCurtain"
|
||||
(click)="dismissModal()">
|
||||
<!-- $event.stopPropagation() prevents the modal from closing when its
|
||||
interior is clicked. -->
|
||||
<div id="varModal" class="blocklyModal" role="alertdialog"
|
||||
(click)="$event.stopPropagation()" tabindex="0"
|
||||
aria-labelledby="variableModalHeading">
|
||||
<h3 id="variableModalHeading">Add a variable...</h3>
|
||||
|
||||
<form id="varForm">
|
||||
<p id="inputLabel">New Variable Name:
|
||||
<input id="mainFieldId" type="text" [ngModel]="VALUE"
|
||||
(ngModelChange)="setTextValue($event)" tabindex="0"
|
||||
aria-labelledby="inputLabel" />
|
||||
</p>
|
||||
<hr>
|
||||
<button type="button" id="submitButton" (click)="submit()">
|
||||
SUBMIT
|
||||
</button>
|
||||
<button type="button" id="cancelButton" (click)="dismissModal()">
|
||||
CANCEL
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.AudioService, blocklyApp.KeyboardInputService, blocklyApp.VariableModalService,
|
||||
function(audioService, keyboardService, variableService) {
|
||||
this.workspace = blocklyApp.workspace;
|
||||
this.variableModalService = variableService;
|
||||
this.audioService = audioService;
|
||||
this.keyboardInputService = keyboardService
|
||||
this.modalIsVisible = false;
|
||||
this.activeButtonIndex = -1;
|
||||
|
||||
var that = this;
|
||||
this.variableModalService.registerPreAddShowHook(
|
||||
function() {
|
||||
that.modalIsVisible = true;
|
||||
|
||||
Blockly.CommonModal.setupKeyboardOverrides(that);
|
||||
|
||||
setTimeout(function() {
|
||||
document.getElementById('varModal').focus();
|
||||
}, 150);
|
||||
}
|
||||
);
|
||||
}
|
||||
],
|
||||
// Caches the current text variable as the user types.
|
||||
setTextValue: function(newValue) {
|
||||
this.variableName = newValue;
|
||||
},
|
||||
// Closes the modal (on both success and failure).
|
||||
hideModal_: Blockly.CommonModal.hideModal,
|
||||
// Focuses on the button represented by the given index.
|
||||
focusOnOption: Blockly.CommonModal.focusOnOption,
|
||||
// Counts the number of interactive elements for the modal.
|
||||
numInteractiveElements: Blockly.CommonModal.numInteractiveElements,
|
||||
// Gets all the interactive elements for the modal.
|
||||
getInteractiveElements: Blockly.CommonModal.getInteractiveElements,
|
||||
// Gets the container with interactive elements.
|
||||
getInteractiveContainer: function() {
|
||||
return document.getElementById("varForm");
|
||||
},
|
||||
// Submits the name change for the variable.
|
||||
submit: function() {
|
||||
this.workspace.createVariable(this.variableName);
|
||||
this.dismissModal();
|
||||
},
|
||||
// Dismisses and closes the modal.
|
||||
dismissModal: function() {
|
||||
this.variableModalService.hideModal();
|
||||
this.hideModal_();
|
||||
}
|
||||
})
|
||||
91
node_modules/node-blockly/blockly/accessible/variable-modal.service.js
generated
vendored
Normal file
91
node_modules/node-blockly/blockly/accessible/variable-modal.service.js
generated
vendored
Normal file
@@ -0,0 +1,91 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2017 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Service for the variable modal.
|
||||
*
|
||||
* @author corydiers@google.com (Cory Diers)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.VariableModalService');
|
||||
|
||||
blocklyApp.VariableModalService = ng.core.Class({
|
||||
constructor: [
|
||||
function() {
|
||||
this.modalIsShown = false;
|
||||
}
|
||||
],
|
||||
// Registers a hook to be called before the add modal is shown.
|
||||
registerPreAddShowHook: function(preShowHook) {
|
||||
this.preAddShowHook = function() {
|
||||
preShowHook();
|
||||
};
|
||||
},
|
||||
// Registers a hook to be called before the rename modal is shown.
|
||||
registerPreRenameShowHook: function(preShowHook) {
|
||||
this.preRenameShowHook = function(oldName) {
|
||||
preShowHook(oldName);
|
||||
};
|
||||
},
|
||||
// Registers a hook to be called before the remove modal is shown.
|
||||
registerPreRemoveShowHook: function(preShowHook) {
|
||||
this.preRemoveShowHook = function(oldName, count) {
|
||||
preShowHook(oldName, count);
|
||||
};
|
||||
},
|
||||
// Returns true if the variable modal is shown.
|
||||
isModalShown: function() {
|
||||
return this.modalIsShown;
|
||||
},
|
||||
// Show the add variable modal.
|
||||
showAddModal_: function() {
|
||||
this.preAddShowHook();
|
||||
this.modalIsShown = true;
|
||||
},
|
||||
// Show the rename variable modal.
|
||||
showRenameModal_: function(oldName) {
|
||||
this.preRenameShowHook(oldName);
|
||||
this.modalIsShown = true;
|
||||
},
|
||||
// Show the remove variable modal.
|
||||
showRemoveModal_: function(oldName) {
|
||||
var count = this.getNumVariables(oldName);
|
||||
this.modalIsShown = true;
|
||||
if (count > 1) {
|
||||
this.preRemoveShowHook(oldName, count);
|
||||
} else {
|
||||
var variable = blocklyApp.workspace.getVariable(oldName);
|
||||
blocklyApp.workspace.deleteVariableInternal_(variable);
|
||||
// Allow the execution loop to finish before "closing" the modal. While
|
||||
// the modal never opens, its being "open" should prevent other keypresses
|
||||
// anyway.
|
||||
var that = this;
|
||||
setTimeout(function() {
|
||||
that.modalIsShown = false;
|
||||
});
|
||||
}
|
||||
},
|
||||
getNumVariables: function(oldName) {
|
||||
return blocklyApp.workspace.getVariableUses(oldName).length;
|
||||
},
|
||||
// Hide the variable modal.
|
||||
hideModal: function() {
|
||||
this.modalIsShown = false;
|
||||
}
|
||||
});
|
||||
125
node_modules/node-blockly/blockly/accessible/variable-remove-modal.component.js
generated
vendored
Normal file
125
node_modules/node-blockly/blockly/accessible/variable-remove-modal.component.js
generated
vendored
Normal file
@@ -0,0 +1,125 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2017 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Component representing the variable remove modal.
|
||||
*
|
||||
* @author corydiers@google.com (Cory Diers)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.VariableRemoveModalComponent');
|
||||
|
||||
goog.require('blocklyApp.AudioService');
|
||||
goog.require('blocklyApp.KeyboardInputService');
|
||||
goog.require('blocklyApp.TranslatePipe');
|
||||
goog.require('blocklyApp.TreeService');
|
||||
goog.require('blocklyApp.VariableModalService');
|
||||
|
||||
goog.require('Blockly.CommonModal');
|
||||
|
||||
|
||||
blocklyApp.VariableRemoveModalComponent = ng.core.Component({
|
||||
selector: 'blockly-remove-variable-modal',
|
||||
template: `
|
||||
<div *ngIf="modalIsVisible"class="blocklyModalCurtain"
|
||||
(click)="dismissModal()">
|
||||
<!-- $event.stopPropagation() prevents the modal from closing when its
|
||||
interior is clicked. -->
|
||||
<div id="varModal" class="blocklyModal" role="alertdialog"
|
||||
(click)="$event.stopPropagation()" tabindex="0"
|
||||
aria-labelledby="variableModalHeading">
|
||||
<h3 id="variableModalHeading">
|
||||
Delete {{getNumVariables()}} uses of the "{{currentVariableName}}"
|
||||
variable?
|
||||
</h3>
|
||||
|
||||
<form id="varForm">
|
||||
<hr>
|
||||
<button type="button" id="yesButton" (click)="submit()">
|
||||
YES
|
||||
</button>
|
||||
<button type="button" id="noButton" (click)="dismissModal()">
|
||||
NO
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.AudioService,
|
||||
blocklyApp.KeyboardInputService,
|
||||
blocklyApp.TreeService,
|
||||
blocklyApp.VariableModalService,
|
||||
function(audioService, keyboardService, treeService, variableService) {
|
||||
this.workspace = blocklyApp.workspace;
|
||||
this.treeService = treeService;
|
||||
this.variableModalService = variableService;
|
||||
this.audioService = audioService;
|
||||
this.keyboardInputService = keyboardService
|
||||
this.modalIsVisible = false;
|
||||
this.activeButtonIndex = -1;
|
||||
this.currentVariableName = "";
|
||||
this.count = 0;
|
||||
|
||||
var that = this;
|
||||
this.variableModalService.registerPreRemoveShowHook(
|
||||
function(name, count) {
|
||||
that.currentVariableName = name;
|
||||
that.count = count
|
||||
that.modalIsVisible = true;
|
||||
|
||||
Blockly.CommonModal.setupKeyboardOverrides(that);
|
||||
|
||||
setTimeout(function() {
|
||||
document.getElementById('varModal').focus();
|
||||
}, 150);
|
||||
}
|
||||
);
|
||||
}
|
||||
],
|
||||
// Closes the modal (on both success and failure).
|
||||
hideModal_: Blockly.CommonModal.hideModal,
|
||||
// Focuses on the button represented by the given index.
|
||||
focusOnOption: Blockly.CommonModal.focusOnOption,
|
||||
// Counts the number of interactive elements for the modal.
|
||||
numInteractiveElements: Blockly.CommonModal.numInteractiveElements,
|
||||
// Gets all the interactive elements for the modal.
|
||||
getInteractiveElements: Blockly.CommonModal.getInteractiveElements,
|
||||
// Gets the container with interactive elements.
|
||||
getInteractiveContainer: function() {
|
||||
return document.getElementById("varForm");
|
||||
},
|
||||
getNumVariables: function() {
|
||||
return this.variableModalService.getNumVariables(this.currentVariableName);
|
||||
},
|
||||
// Submits the name change for the variable.
|
||||
submit: function() {
|
||||
var variable = blocklyApp.workspace.getVariable(this.currentVariableName);
|
||||
blocklyApp.workspace.deleteVariableInternal_(variable);
|
||||
this.dismissModal();
|
||||
},
|
||||
// Dismisses and closes the modal.
|
||||
dismissModal: function() {
|
||||
this.variableModalService.hideModal();
|
||||
this.hideModal_();
|
||||
}
|
||||
})
|
||||
121
node_modules/node-blockly/blockly/accessible/variable-rename-modal.component.js
generated
vendored
Normal file
121
node_modules/node-blockly/blockly/accessible/variable-rename-modal.component.js
generated
vendored
Normal file
@@ -0,0 +1,121 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2017 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Component representing the variable rename modal.
|
||||
*
|
||||
* @author corydiers@google.com (Cory Diers)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.VariableRenameModalComponent');
|
||||
|
||||
goog.require('Blockly.CommonModal');
|
||||
goog.require('blocklyApp.AudioService');
|
||||
goog.require('blocklyApp.KeyboardInputService');
|
||||
goog.require('blocklyApp.TranslatePipe');
|
||||
goog.require('blocklyApp.VariableModalService');
|
||||
|
||||
|
||||
blocklyApp.VariableRenameModalComponent = ng.core.Component({
|
||||
selector: 'blockly-rename-variable-modal',
|
||||
template: `
|
||||
<div *ngIf="modalIsVisible"class="blocklyModalCurtain"
|
||||
(click)="dismissModal()">
|
||||
<!-- $event.stopPropagation() prevents the modal from closing when its
|
||||
interior is clicked. -->
|
||||
<div id="varModal" class="blocklyModal" role="alertdialog"
|
||||
(click)="$event.stopPropagation()" tabindex="0"
|
||||
aria-labelledby="variableModalHeading">
|
||||
<h3 id="variableModalHeading">
|
||||
Rename the "{{currentVariableName}}" variable...
|
||||
</h3>
|
||||
|
||||
<form id="varForm">
|
||||
<p id="inputLabel">New Variable Name:
|
||||
<input id="mainFieldId" type="text" [ngModel]="VALUE"
|
||||
(ngModelChange)="setTextValue($event)" tabindex="0"
|
||||
aria-labelledby="inputLabel" />
|
||||
</p>
|
||||
<hr>
|
||||
<button type="button" id="submitButton" (click)="submit()">
|
||||
SUBMIT
|
||||
</button>
|
||||
<button type="button" id="cancelButton" (click)="dismissModal()">
|
||||
CANCEL
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.AudioService, blocklyApp.KeyboardInputService, blocklyApp.VariableModalService,
|
||||
function(audioService, keyboardService, variableService) {
|
||||
this.workspace = blocklyApp.workspace;
|
||||
this.variableModalService = variableService;
|
||||
this.audioService = audioService;
|
||||
this.keyboardInputService = keyboardService
|
||||
this.modalIsVisible = false;
|
||||
this.activeButtonIndex = -1;
|
||||
this.currentVariableName = "";
|
||||
|
||||
var that = this;
|
||||
this.variableModalService.registerPreRenameShowHook(
|
||||
function(oldName) {
|
||||
that.currentVariableName = oldName;
|
||||
that.modalIsVisible = true;
|
||||
|
||||
Blockly.CommonModal.setupKeyboardOverrides(that);
|
||||
|
||||
setTimeout(function() {
|
||||
document.getElementById('varModal').focus();
|
||||
}, 150);
|
||||
}
|
||||
);
|
||||
}
|
||||
],
|
||||
// Caches the current text variable as the user types.
|
||||
setTextValue: function(newValue) {
|
||||
this.variableName = newValue;
|
||||
},
|
||||
// Closes the modal (on both success and failure).
|
||||
hideModal_: Blockly.CommonModal.hideModal,
|
||||
// Focuses on the button represented by the given index.
|
||||
focusOnOption: Blockly.CommonModal.focusOnOption,
|
||||
// Counts the number of interactive elements for the modal.
|
||||
numInteractiveElements: Blockly.CommonModal.numInteractiveElements,
|
||||
// Gets all the interactive elements for the modal.
|
||||
getInteractiveElements: Blockly.CommonModal.getInteractiveElements,
|
||||
// Gets the container with interactive elements.
|
||||
getInteractiveContainer: function() {
|
||||
return document.getElementById("varForm");
|
||||
},
|
||||
// Submits the name change for the variable.
|
||||
submit: function() {
|
||||
this.workspace.renameVariable(this.currentVariableName, this.variableName);
|
||||
this.dismissModal();
|
||||
},
|
||||
// Dismisses and closes the modal.
|
||||
dismissModal: function() {
|
||||
this.variableModalService.hideModal();
|
||||
this.hideModal_();
|
||||
}
|
||||
})
|
||||
216
node_modules/node-blockly/blockly/accessible/workspace-block.component.js
generated
vendored
Normal file
216
node_modules/node-blockly/blockly/accessible/workspace-block.component.js
generated
vendored
Normal file
@@ -0,0 +1,216 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component representing a Blockly.Block in the
|
||||
* workspace.
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.WorkspaceBlockComponent');
|
||||
|
||||
goog.require('blocklyApp.UtilsService');
|
||||
|
||||
goog.require('blocklyApp.AudioService');
|
||||
goog.require('blocklyApp.BlockConnectionService');
|
||||
goog.require('blocklyApp.FieldSegmentComponent');
|
||||
goog.require('blocklyApp.TranslatePipe');
|
||||
goog.require('blocklyApp.TreeService');
|
||||
|
||||
|
||||
blocklyApp.WorkspaceBlockComponent = ng.core.Component({
|
||||
selector: 'blockly-workspace-block',
|
||||
template: `
|
||||
<li [id]="componentIds.blockRoot" role="treeitem"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(componentIds.blockSummary, 'blockly-translate-workspace-block')"
|
||||
[attr.aria-level]="level">
|
||||
<label #blockSummaryLabel [id]="componentIds.blockSummary">{{getBlockDescription()}}</label>
|
||||
|
||||
<ol role="group">
|
||||
<template ngFor #blockInput [ngForOf]="block.inputList" #i="index">
|
||||
<li [id]="componentIds.inputs[i].inputLi" role="treeitem"
|
||||
*ngIf="blockInput.fieldRow.length"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(componentIds.inputs[i].fieldLabel)"
|
||||
[attr.aria-level]="level + 1">
|
||||
<blockly-field-segment *ngFor="#fieldSegment of inputListAsFieldSegments[i]"
|
||||
[prefixFields]="fieldSegment.prefixFields"
|
||||
[mainField]="fieldSegment.mainField"
|
||||
[mainFieldId]="componentIds.inputs[i].fieldLabel"
|
||||
[level]="level + 2">
|
||||
</blockly-field-segment>
|
||||
</li>
|
||||
|
||||
<template [ngIf]="blockInput.connection">
|
||||
<blockly-workspace-block *ngIf="blockInput.connection.targetBlock()"
|
||||
[block]="blockInput.connection.targetBlock()"
|
||||
[level]="level + 1"
|
||||
[tree]="tree">
|
||||
</blockly-workspace-block>
|
||||
<li [id]="componentIds.inputs[i].actionButtonLi" role="treeitem"
|
||||
*ngIf="!blockInput.connection.targetBlock()"
|
||||
[attr.aria-labelledBy]="generateAriaLabelledByAttr(componentIds.inputs[i].buttonLabel)"
|
||||
[attr.aria-level]="level + 1">
|
||||
<label [id]="componentIds.inputs[i].label">
|
||||
{{getBlockNeededLabel(blockInput)}}
|
||||
</label>
|
||||
<button [id]="componentIds.inputs[i].actionButton"
|
||||
(click)="addInteriorLink(blockInput.connection)"
|
||||
tabindex="-1">
|
||||
{{'MARK_THIS_SPOT'|translate}}
|
||||
</button>
|
||||
</li>
|
||||
</template>
|
||||
</template>
|
||||
</ol>
|
||||
</li>
|
||||
|
||||
<blockly-workspace-block *ngIf= "block.nextConnection && block.nextConnection.targetBlock()"
|
||||
[block]="block.nextConnection.targetBlock()"
|
||||
[level]="level" [tree]="tree">
|
||||
</blockly-workspace-block>
|
||||
`,
|
||||
directives: [blocklyApp.FieldSegmentComponent, ng.core.forwardRef(function() {
|
||||
return blocklyApp.WorkspaceBlockComponent;
|
||||
})],
|
||||
inputs: ['block', 'level', 'tree'],
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.AudioService,
|
||||
blocklyApp.BlockConnectionService,
|
||||
blocklyApp.TreeService,
|
||||
blocklyApp.UtilsService,
|
||||
function(audioService, blockConnectionService, treeService, utilsService) {
|
||||
this.audioService = audioService;
|
||||
this.blockConnectionService = blockConnectionService;
|
||||
this.treeService = treeService;
|
||||
this.utilsService = utilsService;
|
||||
this.cachedBlockId = null;
|
||||
}
|
||||
],
|
||||
ngDoCheck: function() {
|
||||
// The block ID can change if, for example, a block is spliced between two
|
||||
// linked blocks. We need to refresh the fields and component IDs when this
|
||||
// happens.
|
||||
if (this.cachedBlockId != this.block.id) {
|
||||
this.cachedBlockId = this.block.id;
|
||||
|
||||
var SUPPORTED_FIELDS = [Blockly.FieldTextInput, Blockly.FieldDropdown];
|
||||
this.inputListAsFieldSegments = this.block.inputList.map(function(input) {
|
||||
// Converts the input list to an array of field segments. Each field
|
||||
// segment represents a user-editable field, prefixed by an arbitrary
|
||||
// number of non-editable fields.
|
||||
var fieldSegments = [];
|
||||
|
||||
var bufferedFields = [];
|
||||
input.fieldRow.forEach(function(field) {
|
||||
var fieldIsSupported = SUPPORTED_FIELDS.some(function(fieldType) {
|
||||
return (field instanceof fieldType);
|
||||
});
|
||||
|
||||
if (fieldIsSupported) {
|
||||
var fieldSegment = {
|
||||
prefixFields: [],
|
||||
mainField: field
|
||||
};
|
||||
bufferedFields.forEach(function(bufferedField) {
|
||||
fieldSegment.prefixFields.push(bufferedField);
|
||||
});
|
||||
fieldSegments.push(fieldSegment);
|
||||
bufferedFields = [];
|
||||
} else {
|
||||
bufferedFields.push(field);
|
||||
}
|
||||
});
|
||||
|
||||
// Handle leftover text at the end.
|
||||
if (bufferedFields.length) {
|
||||
fieldSegments.push({
|
||||
prefixFields: bufferedFields,
|
||||
mainField: null
|
||||
});
|
||||
}
|
||||
|
||||
return fieldSegments;
|
||||
});
|
||||
|
||||
// Generate unique IDs for elements in this component.
|
||||
this.componentIds = {};
|
||||
this.componentIds.blockRoot =
|
||||
this.block.id + blocklyApp.BLOCK_ROOT_ID_SUFFIX;
|
||||
this.componentIds.blockSummary = this.block.id + '-blockSummary';
|
||||
|
||||
var that = this;
|
||||
this.componentIds.inputs = this.block.inputList.map(function(input, i) {
|
||||
var idsToGenerate = ['inputLi', 'fieldLabel'];
|
||||
if (input.connection && !input.connection.targetBlock()) {
|
||||
idsToGenerate.push('actionButtonLi', 'actionButton', 'buttonLabel');
|
||||
}
|
||||
|
||||
var inputIds = {};
|
||||
idsToGenerate.forEach(function(idBaseString) {
|
||||
inputIds[idBaseString] = [that.block.id, i, idBaseString].join('-');
|
||||
});
|
||||
|
||||
return inputIds;
|
||||
});
|
||||
}
|
||||
},
|
||||
ngAfterViewInit: function() {
|
||||
// If this is a top-level tree in the workspace, ensure that it has an
|
||||
// active descendant. (Note that a timeout is needed here in order to
|
||||
// trigger Angular change detection.)
|
||||
var that = this;
|
||||
setTimeout(function() {
|
||||
if (that.level === 0 && !that.treeService.getActiveDescId(that.tree.id)) {
|
||||
that.treeService.setActiveDesc(
|
||||
that.componentIds.blockRoot, that.tree.id);
|
||||
}
|
||||
});
|
||||
},
|
||||
addInteriorLink: function(connection) {
|
||||
this.blockConnectionService.markConnection(connection);
|
||||
},
|
||||
getBlockDescription: function() {
|
||||
var blockDescription = this.utilsService.getBlockDescription(this.block);
|
||||
|
||||
var parentBlock = this.block.getSurroundParent();
|
||||
if (parentBlock) {
|
||||
var fullDescription = blockDescription + ' inside ' +
|
||||
this.utilsService.getBlockDescription(parentBlock);
|
||||
return fullDescription;
|
||||
} else {
|
||||
return blockDescription;
|
||||
}
|
||||
},
|
||||
getBlockNeededLabel: function(blockInput) {
|
||||
// The input type name, or 'any' if any official input type qualifies.
|
||||
var inputTypeLabel = (
|
||||
blockInput.connection.check_ ?
|
||||
blockInput.connection.check_.join(', ') : Blockly.Msg.ANY);
|
||||
var blockTypeLabel = (
|
||||
blockInput.type == Blockly.NEXT_STATEMENT ?
|
||||
Blockly.Msg.BLOCK : Blockly.Msg.VALUE);
|
||||
return inputTypeLabel + ' ' + blockTypeLabel + ' needed:';
|
||||
},
|
||||
generateAriaLabelledByAttr: function(mainLabel, secondLabel) {
|
||||
return mainLabel + (secondLabel ? ' ' + secondLabel : '');
|
||||
}
|
||||
});
|
||||
106
node_modules/node-blockly/blockly/accessible/workspace.component.js
generated
vendored
Normal file
106
node_modules/node-blockly/blockly/accessible/workspace.component.js
generated
vendored
Normal file
@@ -0,0 +1,106 @@
|
||||
/**
|
||||
* AccessibleBlockly
|
||||
*
|
||||
* Copyright 2016 Google Inc.
|
||||
* https://developers.google.com/blockly/
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the 'License');
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an 'AS IS' BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Angular2 Component that details how a Blockly.Workspace is
|
||||
* rendered in AccessibleBlockly.
|
||||
*
|
||||
* @author madeeha@google.com (Madeeha Ghori)
|
||||
*/
|
||||
|
||||
goog.provide('blocklyApp.WorkspaceComponent');
|
||||
|
||||
goog.require('blocklyApp.NotificationsService');
|
||||
goog.require('blocklyApp.ToolboxModalService');
|
||||
goog.require('blocklyApp.TranslatePipe');
|
||||
goog.require('blocklyApp.TreeService');
|
||||
|
||||
goog.require('blocklyApp.WorkspaceBlockComponent');
|
||||
|
||||
|
||||
blocklyApp.WorkspaceComponent = ng.core.Component({
|
||||
selector: 'blockly-workspace',
|
||||
template: `
|
||||
<div class="blocklyWorkspaceColumn">
|
||||
<h3 #workspaceTitle id="blockly-workspace-title">{{'WORKSPACE'|translate}}</h3>
|
||||
|
||||
<div *ngIf="workspace" class="blocklyWorkspace">
|
||||
<ol #tree *ngFor="#topBlock of workspace.topBlocks_; #groupIndex = index"
|
||||
[id]="tree.id || getNewTreeId()"
|
||||
tabindex="0" role="tree" class="blocklyTree blocklyWorkspaceFocusTarget"
|
||||
[attr.aria-activedescendant]="getActiveDescId(tree.id)"
|
||||
[attr.aria-labelledby]="workspaceTitle.id"
|
||||
(keydown)="onKeypress($event, tree)"
|
||||
(focus)="speakLocation(groupIndex, tree.id)">
|
||||
<blockly-workspace-block [level]="0" [block]="topBlock" [tree]="tree">
|
||||
</blockly-workspace-block>
|
||||
</ol>
|
||||
|
||||
<span *ngIf="workspace.topBlocks_.length === 0">
|
||||
<p id="emptyWorkspaceBtnLabel">
|
||||
{{'NO_BLOCKS_IN_WORKSPACE'|translate}}
|
||||
<button (click)="showToolboxModalForCreateNewGroup()"
|
||||
class="blocklyWorkspaceFocusTarget"
|
||||
id="{{ID_FOR_EMPTY_WORKSPACE_BTN}}"
|
||||
aria-describedby="emptyWorkspaceBtnLabel">
|
||||
{{'CREATE_NEW_BLOCK_GROUP'|translate}}
|
||||
</button>
|
||||
</p>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
directives: [blocklyApp.WorkspaceBlockComponent],
|
||||
pipes: [blocklyApp.TranslatePipe]
|
||||
})
|
||||
.Class({
|
||||
constructor: [
|
||||
blocklyApp.NotificationsService,
|
||||
blocklyApp.ToolboxModalService,
|
||||
blocklyApp.TreeService,
|
||||
function(notificationsService, toolboxModalService, treeService) {
|
||||
this.notificationsService = notificationsService;
|
||||
this.toolboxModalService = toolboxModalService;
|
||||
this.treeService = treeService;
|
||||
|
||||
this.ID_FOR_EMPTY_WORKSPACE_BTN = blocklyApp.ID_FOR_EMPTY_WORKSPACE_BTN;
|
||||
this.workspace = blocklyApp.workspace;
|
||||
this.currentTreeId = 0;
|
||||
}
|
||||
],
|
||||
getNewTreeId: function() {
|
||||
this.currentTreeId++;
|
||||
return 'blockly-tree-' + this.currentTreeId;
|
||||
},
|
||||
getActiveDescId: function(treeId) {
|
||||
return this.treeService.getActiveDescId(treeId);
|
||||
},
|
||||
onKeypress: function(e, tree) {
|
||||
this.treeService.onKeypress(e, tree);
|
||||
},
|
||||
showToolboxModalForCreateNewGroup: function() {
|
||||
this.toolboxModalService.showToolboxModalForCreateNewGroup(
|
||||
this.ID_FOR_EMPTY_WORKSPACE_BTN);
|
||||
},
|
||||
speakLocation: function(groupIndex, treeId) {
|
||||
this.notificationsService.speak(
|
||||
'Now in workspace group ' + (groupIndex + 1) + ' of ' +
|
||||
this.workspace.topBlocks_.length);
|
||||
}
|
||||
});
|
||||
Reference in New Issue
Block a user