code
stringlengths
2
1.05M
'use strict'; // Helper function for the lock-icon to make sure its classes are cleared function clearLockIcon() { eID('lock-icon').className = 'fa'; } // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Locking ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Markup changes to reflect locked state function setLocked() { clearLockIcon(); eID('lock-status').innerHTML = 'Unlock Wallet'; eID('lock-icon').classList.add('fa-lock'); } // Lock the wallet function lock() { IPC.sendToHost('api-call', { url: '/wallet/lock', type: 'POST', }, 'locked'); } // React to the api call result addResultListener('locked', function(result) { setLocked(); notify('Wallet locked', 'locked'); update(); }); // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Unlocking ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // Markup changes to reflect unlocked state function setUnlocked() { clearLockIcon(); eID('lock-status').innerHTML = 'Lock Wallet'; eID('lock-icon').classList.add('fa-unlock'); } // Markup changes to reflect unlocked state function setUnlocking() { clearLockIcon(); eID('lock-status').innerHTML = 'Unlocking'; eID('lock-icon').classList.add('fa-cog'); eID('lock-icon').classList.add('fa-spin'); } // Unlock the wallet function unlock(password) { IPC.sendToHost('api-call', { url: '/wallet/unlock', type: 'POST', args: { encryptionpassword : password, }, }, 'unlocked'); // Password attempted, show responsive processing icon hide('request-password'); setUnlocking(); } // React to the api call result IPC.on('unlocked', function(err, result) { // Remove processing icon if (err) { setLocked(); notify('Wrong password', 'error'); } else { setUnlocked(); notify('Wallet unlocked', 'unlocked'); } update(); }); // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Encrypting ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // setUnencrypted sets the wallet lock status to unencrypted. function setUnencrypted() { clearLockIcon(); eID('lock-status').innerHTML = 'Create Wallet'; eID('lock-icon').classList.add('fa-plus'); } // Encrypt the wallet (only applies to first time opening) function encrypt() { IPC.sendToHost('api-call', { url: '/wallet/encrypt', type: 'POST', args: { dictionary: 'english', }, }, 'encrypted'); setLocked(); } addResultListener('encrypted', function(result) { var popup = eID('show-password'); show(popup); popup.querySelector('.password').innerHTML = result.primaryseed; update(); }); // ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Load ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ function loadLegacyWallet(filename, password) { IPC.sendToHost('api-call', { url: '/wallet/load/033x', type: 'POST', args: { filepath: filename, encryptionpassword: password, }, }, 'load-wallet'); } addResultListener('load-wallet', function(result) { notify('Loaded Wallet', 'success'); });
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _reactIconBase = require('react-icon-base'); var _reactIconBase2 = _interopRequireDefault(_reactIconBase); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var TiWeatherStormy = function TiWeatherStormy(props) { return _react2.default.createElement( _reactIconBase2.default, _extends({ viewBox: '0 0 40 40' }, props), _react2.default.createElement( 'g', null, _react2.default.createElement('path', { d: 'm28.3 30c-0.9 0-1.6-0.7-1.6-1.7s0.7-1.6 1.6-1.6c2.8 0 5-2.3 5-5s-2.2-5-5-5c-0.4 0-0.8 0-1.3 0.2l-1.8 0.5-0.3-1.8c-0.6-3.3-3.3-5.6-6.6-5.6-3.6 0-6.6 3-6.6 6.7 0 0.4 0 0.9 0.1 1.3l0.4 2.1-2.4-0.1c-1.6 0-3.1 1.5-3.1 3.3s1.5 3.4 3.3 3.4c0.9 0 1.7 0.7 1.7 1.6s-0.8 1.7-1.7 1.7c-3.7 0-6.7-3-6.7-6.7 0-3.1 2.2-5.7 5-6.4 0-0.1 0-0.2 0-0.2 0-5.6 4.5-10 10-10 4.3 0 8.1 2.7 9.4 6.7 4.9-0.4 9 3.5 9 8.3 0 4.6-3.8 8.3-8.4 8.3z m-7.2-6.7l-7.5 6.8 5 2.4-2.5 5.8 7.5-6.7-5-2.4z' }) ) ); }; exports.default = TiWeatherStormy; module.exports = exports['default'];
jQuery.noConflict(); jQuery(document).ready(function($){ MYNAMESPACE.namespace('view.AutoAddressManagerForIE10'); MYNAMESPACE.view.AutoAddressManagerForIE10 = function() { this.initialize.apply(this, arguments); }; MYNAMESPACE.view.AutoAddressManagerForIE10.prototype = { _Num_Name1 : null ,_Num_Name2 : null ,_Text_Name1 : null ,_Text_Name2 : null ,_Text_Name3 : null ,_Name2 : '' ,_Name4 : '' ,_isCorrect : true ,_AddressNumInput : null ,_AddressNumlength : null ,initialize: function() {//初期設定的な var thisObj = this; _.bindAll( this ,'autoAddress' ,'ajaxZip3Action' ,'changeNameAddressNum' ,'changeNameAddressText' ,'realTimeCheck' ,'returnName' ,'ajaxZip3zip2addrAction' ); this._instances = {// } this._Num_Name1 = $('#AutoAddressNum1').attr('name') this._Num_Name2 = $('#AutoAddressNum2').attr('name') this._Text_Name1 = $('#AutoAddressText1').attr('name') this._Text_Name2 = $('#AutoAddressText2').attr('name') this._Text_Name3 = $('#AutoAddressText3').attr('name') } ,autoAddress: function() { var thisObj = this; if($('#AutoAddressNum2').length === 0){ thisObj._AddressNumlength = 7 thisObj._AddressNumInput = $('#AutoAddressNum1') } else { thisObj._AddressNumlength = 4 thisObj._AddressNumInput = $('#AutoAddressNum2') //次のフォームへ移る $('form') .on('keyup', '#AutoAddressNum1', function(event) { if($('#AutoAddressNum1').val().replace('-', '').replace('-', '').length == 3){ $('#AutoAddressNum2').focus(); }; }) } thisObj._AddressNumInput .on('keyup change', function(event) { var countval = thisObj._AddressNumInput.val().replace('-', '').replace('-', '').replace(/[A-Za-z0-9]/g,function(s){return String.fromCharCode(s.charCodeAt(0)-0xFEE0)}); var count = countval.length; if(count == thisObj._AddressNumlength){ thisObj.ajaxZip3Action(); } }) } ,ajaxZip3Action: function() { var thisObj = this; thisObj.changeNameAddressNum();//name1、2を確定させるアクション thisObj.changeNameAddressText();//name3,4,5を確定させるアクション thisObj.ajaxZip3zip2addrAction(); /*カスタマイズ*/ thisObj.realTimeCheck();//飛ばされた項目をblurする。 thisObj.returnName();//name1,2を戻すアクション /*消すべき?*/ $(thisObj).trigger('onChangeAddressName',[thisObj._Num_Name1,thisObj._Num_Name2,thisObj._Text_Name1,thisObj._Text_Name2,thisObj._Text_Name3]); } ,changeNameAddressNum: function() { var thisObj = this; if($('#AutoAddressNum1').length !== 0){ // thisObj._Num_Name1 = $('#AutoAddressNum1').attr('name') $('#AutoAddressNum1').attr('name','name1') if($('#AutoAddressNum2').length !== 0){ // thisObj._Num_Name2 = $('#AutoAddressNum2').attr('name') $('#AutoAddressNum2').attr('name','name2') thisObj._Name2 = 'name2' } else { thisObj._Name2 = '' } } else { alert('class=AutoAddressNum1を設定してください。') } } ,changeNameAddressText: function() { var thisObj = this; if($('#AutoAddressText1').length !== 0){//true // thisObj._Text_Name1 = $('#AutoAddressText1').attr('name') $('#AutoAddressText1').attr('name','name3') if($('#AutoAddressText2').length !== 0){//true // thisObj._Text_Name2 = $('#AutoAddressText2').attr('name') $('#AutoAddressText2').attr('name','name4') thisObj._Name4 = 'name4' if($('#AutoAddressText3').length !== 0){//false thisObj._isCorrect = false; // thisObj._Text_Name3 = $('#AutoAddressText3').attr('name') $('#AutoAddressText3').attr('name','name5') } } else { thisObj._Name4 = 'name3' } } else { alert('class=AutoAddressText1を設定してください。') } } ,realTimeCheck: function() { var thisObj = this; $('#AutoAddressText1,#AutoAddressText2,#AutoAddressText3').blur() } ,returnName: function() { var thisObj = this; // alert(thisObj._Num_Name1+' , '+thisObj._Num_Name2+' , '+thisObj._Text_Name1+' , '+thisObj._Text_Name2+' , '+thisObj._Text_Name3) var arr = [ {'class':'AutoAddressNum1' , 'name':thisObj._Num_Name1 } ,{'class':'AutoAddressNum2' , 'name':thisObj._Num_Name2 } ,{'class':'AutoAddressText1' , 'name':thisObj._Text_Name1 } ,{'class':'AutoAddressText2' , 'name':thisObj._Text_Name2 } ,{'class':'AutoAddressText3' , 'name':thisObj._Text_Name3 } ] for (var i=0,len=arr.length; i<len; i++) { $('.' + arr[i]['class']).attr('name',arr[i]['name']); } } ,ajaxZip3zip2addrAction: function() { var thisObj = this; if(thisObj._isCorrect === true){ AjaxZip3.zip2addr('name1',thisObj._Name2,'name3',thisObj._Name4);//県・市区町村 } else if (thisObj._isCorrect === false){ AjaxZip3.zip2addr('name1',thisObj._Name2,'name3','name4','','name5');//県・市区・町村 } } } });
// Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; const { ArrayIsArray, Boolean, Error, NumberIsFinite, ObjectAssign, ObjectKeys, ObjectSetPrototypeOf, Symbol } = primordials; const net = require('net'); const url = require('url'); const assert = require('internal/assert'); const { _checkIsHttpToken: checkIsHttpToken, debug, freeParser, parsers, HTTPParser, isLenient, prepareError, } = require('_http_common'); const { OutgoingMessage } = require('_http_outgoing'); const Agent = require('_http_agent'); const { Buffer } = require('buffer'); const { defaultTriggerAsyncIdScope } = require('internal/async_hooks'); const { URL, urlToOptions, searchParamsSymbol } = require('internal/url'); const { kOutHeaders, kNeedDrain } = require('internal/http'); const { connResetException, codes } = require('internal/errors'); const { ERR_HTTP_HEADERS_SENT, ERR_INVALID_ARG_TYPE, ERR_INVALID_HTTP_TOKEN, ERR_INVALID_PROTOCOL, ERR_UNESCAPED_CHARACTERS } = codes; const { validateInteger } = require('internal/validators'); const { getTimerDuration } = require('internal/timers'); const { DTRACE_HTTP_CLIENT_REQUEST, DTRACE_HTTP_CLIENT_RESPONSE } = require('internal/dtrace'); const INVALID_PATH_REGEX = /[^\u0021-\u00ff]/; const kError = Symbol('kError'); function validateHost(host, name) { if (host !== null && host !== undefined && typeof host !== 'string') { throw new ERR_INVALID_ARG_TYPE(`options.${name}`, ['string', 'undefined', 'null'], host); } return host; } class HTTPClientAsyncResource { constructor(type, req) { this.type = type; this.req = req; } } let urlWarningEmitted = false; function ClientRequest(input, options, cb) { OutgoingMessage.call(this); if (typeof input === 'string') { const urlStr = input; try { input = urlToOptions(new URL(urlStr)); } catch (err) { input = url.parse(urlStr); if (!input.hostname) { throw err; } if (!urlWarningEmitted && !process.noDeprecation) { urlWarningEmitted = true; process.emitWarning( `The provided URL ${urlStr} is not a valid URL, and is supported ` + 'in the http module solely for compatibility.', 'DeprecationWarning', 'DEP0109'); } } } else if (input && input[searchParamsSymbol] && input[searchParamsSymbol][searchParamsSymbol]) { // url.URL instance input = urlToOptions(input); } else { cb = options; options = input; input = null; } if (typeof options === 'function') { cb = options; options = input || {}; } else { options = ObjectAssign(input || {}, options); } let agent = options.agent; const defaultAgent = options._defaultAgent || Agent.globalAgent; if (agent === false) { agent = new defaultAgent.constructor(); } else if (agent === null || agent === undefined) { if (typeof options.createConnection !== 'function') { agent = defaultAgent; } // Explicitly pass through this statement as agent will not be used // when createConnection is provided. } else if (typeof agent.addRequest !== 'function') { throw new ERR_INVALID_ARG_TYPE('options.agent', ['Agent-like Object', 'undefined', 'false'], agent); } this.agent = agent; const protocol = options.protocol || defaultAgent.protocol; let expectedProtocol = defaultAgent.protocol; if (this.agent && this.agent.protocol) expectedProtocol = this.agent.protocol; let path; if (options.path) { path = String(options.path); if (INVALID_PATH_REGEX.test(path)) throw new ERR_UNESCAPED_CHARACTERS('Request path'); } if (protocol !== expectedProtocol) { throw new ERR_INVALID_PROTOCOL(protocol, expectedProtocol); } const defaultPort = options.defaultPort || (this.agent && this.agent.defaultPort); const port = options.port = options.port || defaultPort || 80; const host = options.host = validateHost(options.hostname, 'hostname') || validateHost(options.host, 'host') || 'localhost'; const setHost = (options.setHost === undefined || Boolean(options.setHost)); this.socketPath = options.socketPath; if (options.timeout !== undefined) this.timeout = getTimerDuration(options.timeout, 'timeout'); let method = options.method; const methodIsString = (typeof method === 'string'); if (method !== null && method !== undefined && !methodIsString) { throw new ERR_INVALID_ARG_TYPE('options.method', 'string', method); } if (methodIsString && method) { if (!checkIsHttpToken(method)) { throw new ERR_INVALID_HTTP_TOKEN('Method', method); } method = this.method = method.toUpperCase(); } else { method = this.method = 'GET'; } const maxHeaderSize = options.maxHeaderSize; if (maxHeaderSize !== undefined) validateInteger(maxHeaderSize, 'maxHeaderSize', 0); this.maxHeaderSize = maxHeaderSize; const insecureHTTPParser = options.insecureHTTPParser; if (insecureHTTPParser !== undefined && typeof insecureHTTPParser !== 'boolean') { throw new ERR_INVALID_ARG_TYPE( 'options.insecureHTTPParser', 'boolean', insecureHTTPParser); } this.insecureHTTPParser = insecureHTTPParser; this.path = options.path || '/'; if (cb) { this.once('response', cb); } if (method === 'GET' || method === 'HEAD' || method === 'DELETE' || method === 'OPTIONS' || method === 'TRACE' || method === 'CONNECT') { this.useChunkedEncodingByDefault = false; } else { this.useChunkedEncodingByDefault = true; } this._ended = false; this.res = null; this.aborted = false; this.timeoutCb = null; this.upgradeOrConnect = false; this.parser = null; this.maxHeadersCount = null; this.reusedSocket = false; this.host = host; this.protocol = protocol; let called = false; if (this.agent) { // If there is an agent we should default to Connection:keep-alive, // but only if the Agent will actually reuse the connection! // If it's not a keepAlive agent, and the maxSockets==Infinity, then // there's never a case where this socket will actually be reused if (!this.agent.keepAlive && !NumberIsFinite(this.agent.maxSockets)) { this._last = true; this.shouldKeepAlive = false; } else { this._last = false; this.shouldKeepAlive = true; } } const headersArray = ArrayIsArray(options.headers); if (!headersArray) { if (options.headers) { const keys = ObjectKeys(options.headers); // Retain for(;;) loop for performance reasons // Refs: https://github.com/nodejs/node/pull/30958 for (let i = 0; i < keys.length; i++) { const key = keys[i]; this.setHeader(key, options.headers[key]); } } if (host && !this.getHeader('host') && setHost) { let hostHeader = host; // For the Host header, ensure that IPv6 addresses are enclosed // in square brackets, as defined by URI formatting // https://tools.ietf.org/html/rfc3986#section-3.2.2 const posColon = hostHeader.indexOf(':'); if (posColon !== -1 && hostHeader.includes(':', posColon + 1) && hostHeader.charCodeAt(0) !== 91/* '[' */) { hostHeader = `[${hostHeader}]`; } if (port && +port !== defaultPort) { hostHeader += ':' + port; } this.setHeader('Host', hostHeader); } if (options.auth && !this.getHeader('Authorization')) { this.setHeader('Authorization', 'Basic ' + Buffer.from(options.auth).toString('base64')); } if (this.getHeader('expect')) { if (this._header) { throw new ERR_HTTP_HEADERS_SENT('render'); } this._storeHeader(this.method + ' ' + this.path + ' HTTP/1.1\r\n', this[kOutHeaders]); } } else { this._storeHeader(this.method + ' ' + this.path + ' HTTP/1.1\r\n', options.headers); } const oncreate = (err, socket) => { if (called) return; called = true; if (err) { process.nextTick(() => this.emit('error', err)); return; } this.onSocket(socket); this._deferToConnect(null, null, () => this._flush()); }; // initiate connection if (this.agent) { this.agent.addRequest(this, options); } else { // No agent, default to Connection:close. this._last = true; this.shouldKeepAlive = false; if (typeof options.createConnection === 'function') { const newSocket = options.createConnection(options, oncreate); if (newSocket && !called) { called = true; this.onSocket(newSocket); } else { return; } } else { debug('CLIENT use net.createConnection', options); this.onSocket(net.createConnection(options)); } } this._deferToConnect(null, null, () => this._flush()); } ObjectSetPrototypeOf(ClientRequest.prototype, OutgoingMessage.prototype); ObjectSetPrototypeOf(ClientRequest, OutgoingMessage); ClientRequest.prototype._finish = function _finish() { DTRACE_HTTP_CLIENT_REQUEST(this, this.socket); OutgoingMessage.prototype._finish.call(this); }; ClientRequest.prototype._implicitHeader = function _implicitHeader() { if (this._header) { throw new ERR_HTTP_HEADERS_SENT('render'); } this._storeHeader(this.method + ' ' + this.path + ' HTTP/1.1\r\n', this[kOutHeaders]); }; ClientRequest.prototype.abort = function abort() { if (this.aborted) { return; } this.aborted = true; process.nextTick(emitAbortNT, this); this.destroy(); }; ClientRequest.prototype.destroy = function destroy(err) { if (this.destroyed) { return this; } this.destroyed = true; // If we're aborting, we don't care about any more response data. if (this.res) { this.res._dump(); } // In the event that we don't have a socket, we will pop out of // the request queue through handling in onSocket. if (this.socket) { _destroy(this, this.socket, err); } else if (err) { this[kError] = err; } return this; }; function _destroy(req, socket, err) { // TODO (ronag): Check if socket was used at all (e.g. headersSent) and // re-use it in that case. `req.socket` just checks whether the socket was // assigned to the request and *might* have been used. if (socket && (!req.agent || req.socket)) { socket.destroy(err); } else { if (socket) { socket.emit('free'); } if (!req.aborted && !err) { err = connResetException('socket hang up'); } if (err) { req.emit('error', err); } req.emit('close'); } } function emitAbortNT(req) { req.emit('abort'); } function ondrain() { const msg = this._httpMessage; if (msg && !msg.finished && msg[kNeedDrain]) { msg[kNeedDrain] = false; msg.emit('drain'); } } function socketCloseListener() { const socket = this; const req = socket._httpMessage; debug('HTTP socket close'); // Pull through final chunk, if anything is buffered. // the ondata function will handle it properly, and this // is a no-op if no final chunk remains. socket.read(); // NOTE: It's important to get parser here, because it could be freed by // the `socketOnData`. const parser = socket.parser; const res = req.res; req.destroyed = true; if (res) { // Socket closed before we emitted 'end' below. if (!res.complete) { res.aborted = true; res.emit('aborted'); } req.emit('close'); if (!res.aborted && res.readable) { res.on('end', function() { this.emit('close'); }); res.push(null); } else { res.emit('close'); } } else { if (!req.socket._hadError) { // This socket error fired before we started to // receive a response. The error needs to // fire on the request. req.socket._hadError = true; req.emit('error', connResetException('socket hang up')); } req.emit('close'); } // Too bad. That output wasn't getting written. // This is pretty terrible that it doesn't raise an error. // Fixed better in v0.10 if (req.outputData) req.outputData.length = 0; if (parser) { parser.finish(); freeParser(parser, req, socket); } } function socketErrorListener(err) { const socket = this; const req = socket._httpMessage; debug('SOCKET ERROR:', err.message, err.stack); if (req) { // For Safety. Some additional errors might fire later on // and we need to make sure we don't double-fire the error event. req.socket._hadError = true; req.emit('error', err); } const parser = socket.parser; if (parser) { parser.finish(); freeParser(parser, req, socket); } // Ensure that no further data will come out of the socket socket.removeListener('data', socketOnData); socket.removeListener('end', socketOnEnd); socket.destroy(); } function socketOnEnd() { const socket = this; const req = this._httpMessage; const parser = this.parser; if (!req.res && !req.socket._hadError) { // If we don't have a response then we know that the socket // ended prematurely and we need to emit an error on the request. req.socket._hadError = true; req.emit('error', connResetException('socket hang up')); } if (parser) { parser.finish(); freeParser(parser, req, socket); } socket.destroy(); } function socketOnData(d) { const socket = this; const req = this._httpMessage; const parser = this.parser; assert(parser && parser.socket === socket); const ret = parser.execute(d); if (ret instanceof Error) { prepareError(ret, parser, d); debug('parse error', ret); freeParser(parser, req, socket); socket.destroy(); req.socket._hadError = true; req.emit('error', ret); } else if (parser.incoming && parser.incoming.upgrade) { // Upgrade (if status code 101) or CONNECT const bytesParsed = ret; const res = parser.incoming; req.res = res; socket.removeListener('data', socketOnData); socket.removeListener('end', socketOnEnd); socket.removeListener('drain', ondrain); if (req.timeoutCb) socket.removeListener('timeout', req.timeoutCb); parser.finish(); freeParser(parser, req, socket); const bodyHead = d.slice(bytesParsed, d.length); const eventName = req.method === 'CONNECT' ? 'connect' : 'upgrade'; if (req.listenerCount(eventName) > 0) { req.upgradeOrConnect = true; // detach the socket socket.emit('agentRemove'); socket.removeListener('close', socketCloseListener); socket.removeListener('error', socketErrorListener); socket._httpMessage = null; socket.readableFlowing = null; req.emit(eventName, res, socket, bodyHead); req.emit('close'); } else { // Requested Upgrade or used CONNECT method, but have no handler. socket.destroy(); } } else if (parser.incoming && parser.incoming.complete && // When the status code is informational (100, 102-199), // the server will send a final response after this client // sends a request body, so we must not free the parser. // 101 (Switching Protocols) and all other status codes // should be processed normally. !statusIsInformational(parser.incoming.statusCode)) { socket.removeListener('data', socketOnData); socket.removeListener('end', socketOnEnd); socket.removeListener('drain', ondrain); freeParser(parser, req, socket); } } function statusIsInformational(status) { // 100 (Continue) RFC7231 Section 6.2.1 // 102 (Processing) RFC2518 // 103 (Early Hints) RFC8297 // 104-199 (Unassigned) return (status < 200 && status >= 100 && status !== 101); } // client function parserOnIncomingClient(res, shouldKeepAlive) { const socket = this.socket; const req = socket._httpMessage; debug('AGENT incoming response!'); if (req.res) { // We already have a response object, this means the server // sent a double response. socket.destroy(); return 0; // No special treatment. } req.res = res; // Skip body and treat as Upgrade. if (res.upgrade) return 2; // Responses to CONNECT request is handled as Upgrade. const method = req.method; if (method === 'CONNECT') { res.upgrade = true; return 2; // Skip body and treat as Upgrade. } if (statusIsInformational(res.statusCode)) { // Restart the parser, as this is a 1xx informational message. req.res = null; // Clear res so that we don't hit double-responses. // Maintain compatibility by sending 100-specific events if (res.statusCode === 100) { req.emit('continue'); } // Send information events to all 1xx responses except 101 Upgrade. req.emit('information', { statusCode: res.statusCode, statusMessage: res.statusMessage, httpVersion: res.httpVersion, httpVersionMajor: res.httpVersionMajor, httpVersionMinor: res.httpVersionMinor, headers: res.headers, rawHeaders: res.rawHeaders }); return 1; // Skip body but don't treat as Upgrade. } if (req.shouldKeepAlive && !shouldKeepAlive && !req.upgradeOrConnect) { // Server MUST respond with Connection:keep-alive for us to enable it. // If we've been upgraded (via WebSockets) we also shouldn't try to // keep the connection open. req.shouldKeepAlive = false; } DTRACE_HTTP_CLIENT_RESPONSE(socket, req); req.res = res; res.req = req; // Add our listener first, so that we guarantee socket cleanup res.on('end', responseOnEnd); req.on('prefinish', requestOnPrefinish); // If the user did not listen for the 'response' event, then they // can't possibly read the data, so we ._dump() it into the void // so that the socket doesn't hang there in a paused state. if (req.aborted || !req.emit('response', res)) res._dump(); if (method === 'HEAD') return 1; // Skip body but don't treat as Upgrade. return 0; // No special treatment. } // client function responseKeepAlive(req) { const socket = req.socket; debug('AGENT socket keep-alive'); if (req.timeoutCb) { socket.setTimeout(0, req.timeoutCb); req.timeoutCb = null; } socket.removeListener('close', socketCloseListener); socket.removeListener('error', socketErrorListener); socket.removeListener('data', socketOnData); socket.removeListener('end', socketOnEnd); // TODO(ronag): Between here and emitFreeNT the socket // has no 'error' handler. // There are cases where _handle === null. Avoid those. Passing undefined to // nextTick() will call getDefaultTriggerAsyncId() to retrieve the id. const asyncId = socket._handle ? socket._handle.getAsyncId() : undefined; // Mark this socket as available, AFTER user-added end // handlers have a chance to run. defaultTriggerAsyncIdScope(asyncId, process.nextTick, emitFreeNT, req); req.destroyed = true; if (req.res) { req.res.destroyed = true; // Detach socket from IncomingMessage to avoid destroying the freed // socket in IncomingMessage.destroy(). req.res.socket = null; } } function responseOnEnd() { const req = this.req; if (req.socket && req.timeoutCb) { req.socket.removeListener('timeout', emitRequestTimeout); } req._ended = true; if (!req.shouldKeepAlive) { const socket = req.socket; if (socket.writable) { debug('AGENT socket.destroySoon()'); if (typeof socket.destroySoon === 'function') socket.destroySoon(); else socket.end(); } assert(!socket.writable); } else if (req.finished && !this.aborted) { // We can assume `req.finished` means all data has been written since: // - `'responseOnEnd'` means we have been assigned a socket. // - when we have a socket we write directly to it without buffering. // - `req.finished` means `end()` has been called and no further data. // can be written responseKeepAlive(req); } } function requestOnPrefinish() { const req = this; if (req.shouldKeepAlive && req._ended) responseKeepAlive(req); } function emitFreeNT(req) { req.emit('close'); if (req.res) { req.res.emit('close'); } if (req.socket) { req.socket.emit('free'); } } function tickOnSocket(req, socket) { const parser = parsers.alloc(); req.socket = socket; parser.initialize(HTTPParser.RESPONSE, new HTTPClientAsyncResource('HTTPINCOMINGMESSAGE', req), req.maxHeaderSize || 0, req.insecureHTTPParser === undefined ? isLenient() : req.insecureHTTPParser, 0); parser.socket = socket; parser.outgoing = req; req.parser = parser; socket.parser = parser; socket._httpMessage = req; // Propagate headers limit from request object to parser if (typeof req.maxHeadersCount === 'number') { parser.maxHeaderPairs = req.maxHeadersCount << 1; } parser.onIncoming = parserOnIncomingClient; socket.on('error', socketErrorListener); socket.on('data', socketOnData); socket.on('end', socketOnEnd); socket.on('close', socketCloseListener); socket.on('drain', ondrain); if ( req.timeout !== undefined || (req.agent && req.agent.options && req.agent.options.timeout) ) { listenSocketTimeout(req); } req.emit('socket', socket); } function emitRequestTimeout() { const req = this._httpMessage; if (req) { req.emit('timeout'); } } function listenSocketTimeout(req) { if (req.timeoutCb) { return; } // Set timeoutCb so it will get cleaned up on request end. req.timeoutCb = emitRequestTimeout; // Delegate socket timeout event. if (req.socket) { req.socket.once('timeout', emitRequestTimeout); } else { req.on('socket', (socket) => { socket.once('timeout', emitRequestTimeout); }); } } ClientRequest.prototype.onSocket = function onSocket(socket, err) { // TODO(ronag): Between here and onSocketNT the socket // has no 'error' handler. process.nextTick(onSocketNT, this, socket, err); }; function onSocketNT(req, socket, err) { if (req.destroyed) { _destroy(req, socket, req[kError]); } else if (err) { req.destroyed = true; _destroy(req, null, err); } else { tickOnSocket(req, socket); } } ClientRequest.prototype._deferToConnect = _deferToConnect; function _deferToConnect(method, arguments_, cb) { // This function is for calls that need to happen once the socket is // assigned to this request and writable. It's an important promisy // thing for all the socket calls that happen either now // (when a socket is assigned) or in the future (when a socket gets // assigned out of the pool and is eventually writable). const callSocketMethod = () => { if (method) this.socket[method].apply(this.socket, arguments_); if (typeof cb === 'function') cb(); }; const onSocket = () => { if (this.socket.writable) { callSocketMethod(); } else { this.socket.once('connect', callSocketMethod); } }; if (!this.socket) { this.once('socket', onSocket); } else { onSocket(); } } ClientRequest.prototype.setTimeout = function setTimeout(msecs, callback) { if (this._ended) { return this; } listenSocketTimeout(this); msecs = getTimerDuration(msecs, 'msecs'); if (callback) this.once('timeout', callback); if (this.socket) { setSocketTimeout(this.socket, msecs); } else { this.once('socket', (sock) => setSocketTimeout(sock, msecs)); } return this; }; function setSocketTimeout(sock, msecs) { if (sock.connecting) { sock.once('connect', function() { sock.setTimeout(msecs); }); } else { sock.setTimeout(msecs); } } ClientRequest.prototype.setNoDelay = function setNoDelay(noDelay) { this._deferToConnect('setNoDelay', [noDelay]); }; ClientRequest.prototype.setSocketKeepAlive = function setSocketKeepAlive(enable, initialDelay) { this._deferToConnect('setKeepAlive', [enable, initialDelay]); }; ClientRequest.prototype.clearTimeout = function clearTimeout(cb) { this.setTimeout(0, cb); }; module.exports = { ClientRequest };
'use strict' const express = require('express'); const app = express(); app.use('/', express.static(__dirname + '/')); module.exports = app
'use strict' class RunnerInterface { constructor () { if (new.target === RunnerInterface) { throw new Error('RunnerInterface cannot be directly constructed') } } run () { throw new Error('Unimplemented method') } close () { throw new Error('Unimplemented method') } exit () { throw new Error('Unimplemented method') } } module.exports = RunnerInterface
/** */ THREE.GlitchPass = function ( dt_size ) { if ( THREE.DigitalGlitch === undefined ) console.error( "THREE.GlitchPass relies on THREE.DigitalGlitch" ); var shader = THREE.DigitalGlitch; this.uniforms = THREE.UniformsUtils.clone( shader.uniforms ); if (dt_size == undefined) dt_size = 64; this.uniforms[ "tDisp"].value = this.generateHeightmap(dt_size); this.material = new THREE.ShaderMaterial({ uniforms: this.uniforms, vertexShader: shader.vertexShader, fragmentShader: shader.fragmentShader }); console.log(this.material); this.enabled = true; this.renderToScreen = false; this.needsSwap = true; this.camera = new THREE.OrthographicCamera( -1, 1, 1, -1, 0, 1 ); this.scene = new THREE.Scene(); this.quad = new THREE.Mesh( new THREE.PlaneBufferGeometry( 2, 2 ), null ); this.scene.add( this.quad ); this.goWild = false; this.curF = 0; this.generateTrigger(); }; THREE.GlitchPass.prototype = { render: function ( renderer, writeBuffer, readBuffer, delta ) { this.uniforms[ "tDiffuse" ].value = readBuffer; this.uniforms[ 'seed' ].value = Math.random();//default seeding this.uniforms[ 'byp' ].value = 0; if (this.curF % this.randX == 0 || this.goWild == true) { this.uniforms[ 'amount' ].value = Math.random() / 30; this.uniforms[ 'angle' ].value = THREE.Math.randFloat(-Math.PI, Math.PI); this.uniforms[ 'seed_x' ].value = THREE.Math.randFloat(-1, 1); this.uniforms[ 'seed_y' ].value = THREE.Math.randFloat(-1, 1); this.uniforms[ 'distortion_x' ].value = THREE.Math.randFloat(0, 1); this.uniforms[ 'distortion_y' ].value = THREE.Math.randFloat(0, 1); this.curF = 0; this.generateTrigger(); } else if (this.curF % this.randX < this.randX / 4) { this.uniforms[ 'amount' ].value = Math.random() / 90; this.uniforms[ 'angle' ].value = THREE.Math.randFloat(-Math.PI, Math.PI); this.uniforms[ 'distortion_x' ].value = THREE.Math.randFloat(0, 1); this.uniforms[ 'distortion_y' ].value = THREE.Math.randFloat(0, 1); this.uniforms[ 'seed_x' ].value = THREE.Math.randFloat(-0.3, 0.3); this.uniforms[ 'seed_y' ].value = THREE.Math.randFloat(-0.3, 0.3); } else if (this.goWild == false) { this.uniforms[ 'byp' ].value = 1; } this.curF ++; this.quad.material = this.material; if ( this.renderToScreen ) { renderer.render( this.scene, this.camera ); } else { renderer.render( this.scene, this.camera, writeBuffer, false ); } }, generateTrigger:function() { this.randX = THREE.Math.randInt(1,6) * 60; }, generateHeightmap:function(dt_size) { var data_arr = new Float32Array( dt_size * dt_size * 3 ); console.log(dt_size); var length = dt_size * dt_size; for ( var i = 0; i < length; i ++) { var val = THREE.Math.randFloat(0, 1); data_arr[ i * 3 + 0 ] = val; data_arr[ i * 3 + 1 ] = val; data_arr[ i * 3 + 2 ] = val; } var texture = new THREE.DataTexture( data_arr, dt_size, dt_size, THREE.RGBFormat, THREE.FloatType ); console.log(texture); console.log(dt_size); texture.minFilter = THREE.NearestFilter; texture.magFilter = THREE.NearestFilter; texture.needsUpdate = true; texture.flipY = false; return texture; } };
// Avoid `console` errors in browsers that lack a console. (function() { var method; var noop = function() {}; var methods = [ 'assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn' ]; var length = methods.length; var console = (window.console = window.console || {}); while (length--) { method = methods[length]; // Only stub undefined methods. if (!console[method]) { console[method] = noop; } } }()); // Place any jQuery/helper plugins in here. /* Respond.js: min/max-width media query polyfill. (c) Scott Jehl. MIT Lic. j.mp/respondjs */ (function(w) { "use strict"; //exposed namespace var respond = {}; w.respond = respond; //define update even in native-mq-supporting browsers, to avoid errors respond.update = function() {}; //define ajax obj var requestQueue = [], xmlHttp = (function() { var xmlhttpmethod = false; try { xmlhttpmethod = new w.XMLHttpRequest(); } catch (e) { xmlhttpmethod = new w.ActiveXObject("Microsoft.XMLHTTP"); } return function() { return xmlhttpmethod; }; })(), //tweaked Ajax functions from Quirksmode ajax = function(url, callback) { var req = xmlHttp(); if (!req) { return; } req.open("GET", url, true); req.onreadystatechange = function() { if (req.readyState !== 4 || req.status !== 200 && req.status !== 304) { return; } callback(req.responseText); }; if (req.readyState === 4) { return; } req.send(null); }, isUnsupportedMediaQuery = function(query) { return query.replace(respond.regex.minmaxwh, '').match(respond.regex.other); }; //expose for testing respond.ajax = ajax; respond.queue = requestQueue; respond.unsupportedmq = isUnsupportedMediaQuery; respond.regex = { media: /@media[^\{]+\{([^\{\}]*\{[^\}\{]*\})+/gi, keyframes: /@(?:\-(?:o|moz|webkit)\-)?keyframes[^\{]+\{(?:[^\{\}]*\{[^\}\{]*\})+[^\}]*\}/gi, comments: /\/\*[^*]*\*+([^/][^*]*\*+)*\//gi, urls: /(url\()['"]?([^\/\)'"][^:\)'"]+)['"]?(\))/g, findStyles: /@media *([^\{]+)\{([\S\s]+?)$/, only: /(only\s+)?([a-zA-Z]+)\s?/, minw: /\(\s*min\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/, maxw: /\(\s*max\-width\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/, minmaxwh: /\(\s*m(in|ax)\-(height|width)\s*:\s*(\s*[0-9\.]+)(px|em)\s*\)/gi, other: /\([^\)]*\)/g }; //expose media query support flag for external use respond.mediaQueriesSupported = w.matchMedia && w.matchMedia("only all") !== null && w.matchMedia("only all").matches; //if media queries are supported, exit here if (respond.mediaQueriesSupported) { return; } //define vars var doc = w.document, docElem = doc.documentElement, mediastyles = [], rules = [], appendedEls = [], parsedSheets = {}, resizeThrottle = 30, head = doc.getElementsByTagName("head")[0] || docElem, base = doc.getElementsByTagName("base")[0], links = head.getElementsByTagName("link"), lastCall, resizeDefer, //cached container for 1em value, populated the first time it's needed eminpx, // returns the value of 1em in pixels getEmValue = function() { var ret, div = doc.createElement('div'), body = doc.body, originalHTMLFontSize = docElem.style.fontSize, originalBodyFontSize = body && body.style.fontSize, fakeUsed = false; div.style.cssText = "position:absolute;font-size:1em;width:1em"; if (!body) { body = fakeUsed = doc.createElement("body"); body.style.background = "none"; } // 1em in a media query is the value of the default font size of the browser // reset docElem and body to ensure the correct value is returned docElem.style.fontSize = "100%"; body.style.fontSize = "100%"; body.appendChild(div); if (fakeUsed) { docElem.insertBefore(body, docElem.firstChild); } ret = div.offsetWidth; if (fakeUsed) { docElem.removeChild(body); } else { body.removeChild(div); } // restore the original values docElem.style.fontSize = originalHTMLFontSize; if (originalBodyFontSize) { body.style.fontSize = originalBodyFontSize; } //also update eminpx before returning ret = eminpx = parseFloat(ret); return ret; }, //enable/disable styles applyMedia = function(fromResize) { var name = "clientWidth", docElemProp = docElem[name], currWidth = doc.compatMode === "CSS1Compat" && docElemProp || doc.body[name] || docElemProp, styleBlocks = {}, lastLink = links[links.length - 1], now = (new Date()).getTime(); //throttle resize calls if (fromResize && lastCall && now - lastCall < resizeThrottle) { w.clearTimeout(resizeDefer); resizeDefer = w.setTimeout(applyMedia, resizeThrottle); return; } else { lastCall = now; } for (var i in mediastyles) { if (mediastyles.hasOwnProperty(i)) { var thisstyle = mediastyles[i], min = thisstyle.minw, max = thisstyle.maxw, minnull = min === null, maxnull = max === null, em = "em"; if (!!min) { min = parseFloat(min) * (min.indexOf(em) > -1 ? (eminpx || getEmValue()) : 1); } if (!!max) { max = parseFloat(max) * (max.indexOf(em) > -1 ? (eminpx || getEmValue()) : 1); } // if there's no media query at all (the () part), or min or max is not null, and if either is present, they're true if (!thisstyle.hasquery || (!minnull || !maxnull) && (minnull || currWidth >= min) && (maxnull || currWidth <= max)) { if (!styleBlocks[thisstyle.media]) { styleBlocks[thisstyle.media] = []; } styleBlocks[thisstyle.media].push(rules[thisstyle.rules]); } } } //remove any existing respond style element(s) for (var j in appendedEls) { if (appendedEls.hasOwnProperty(j)) { if (appendedEls[j] && appendedEls[j].parentNode === head) { head.removeChild(appendedEls[j]); } } } appendedEls.length = 0; //inject active styles, grouped by media type for (var k in styleBlocks) { if (styleBlocks.hasOwnProperty(k)) { var ss = doc.createElement("style"), css = styleBlocks[k].join("\n"); ss.type = "text/css"; ss.media = k; //originally, ss was appended to a documentFragment and sheets were appended in bulk. //this caused crashes in IE in a number of circumstances, such as when the HTML element had a bg image set, so appending beforehand seems best. Thanks to @dvelyk for the initial research on this one! head.insertBefore(ss, lastLink.nextSibling); if (ss.styleSheet) { ss.styleSheet.cssText = css; } else { ss.appendChild(doc.createTextNode(css)); } //push to appendedEls to track for later removal appendedEls.push(ss); } } }, //find media blocks in css text, convert to style blocks translate = function(styles, href, media) { var qs = styles.replace(respond.regex.comments, '') .replace(respond.regex.keyframes, '') .match(respond.regex.media), ql = qs && qs.length || 0; //try to get CSS path href = href.substring(0, href.lastIndexOf("/")); var repUrls = function(css) { return css.replace(respond.regex.urls, "$1" + href + "$2$3"); }, useMedia = !ql && media; //if path exists, tack on trailing slash if (href.length) { href += "/"; } //if no internal queries exist, but media attr does, use that //note: this currently lacks support for situations where a media attr is specified on a link AND //its associated stylesheet has internal CSS media queries. //In those cases, the media attribute will currently be ignored. if (useMedia) { ql = 1; } for (var i = 0; i < ql; i++) { var fullq, thisq, eachq, eql; //media attr if (useMedia) { fullq = media; rules.push(repUrls(styles)); } //parse for styles else { fullq = qs[i].match(respond.regex.findStyles) && RegExp.$1; rules.push(RegExp.$2 && repUrls(RegExp.$2)); } eachq = fullq.split(","); eql = eachq.length; for (var j = 0; j < eql; j++) { thisq = eachq[j]; if (isUnsupportedMediaQuery(thisq)) { continue; } mediastyles.push({ media: thisq.split("(")[0].match(respond.regex.only) && RegExp.$2 || "all", rules: rules.length - 1, hasquery: thisq.indexOf("(") > -1, minw: thisq.match(respond.regex.minw) && parseFloat(RegExp.$1) + (RegExp.$2 || ""), maxw: thisq.match(respond.regex.maxw) && parseFloat(RegExp.$1) + (RegExp.$2 || "") }); } } applyMedia(); }, //recurse through request queue, get css text makeRequests = function() { if (requestQueue.length) { var thisRequest = requestQueue.shift(); ajax(thisRequest.href, function(styles) { translate(styles, thisRequest.href, thisRequest.media); parsedSheets[thisRequest.href] = true; // by wrapping recursive function call in setTimeout // we prevent "Stack overflow" error in IE7 w.setTimeout(function() { makeRequests(); }, 0); }); } }, //loop stylesheets, send text content to translate ripCSS = function() { for (var i = 0; i < links.length; i++) { var sheet = links[i], href = sheet.href, media = sheet.media, isCSS = sheet.rel && sheet.rel.toLowerCase() === "stylesheet"; //only links plz and prevent re-parsing if (!!href && isCSS && !parsedSheets[href]) { // selectivizr exposes css through the rawCssText expando if (sheet.styleSheet && sheet.styleSheet.rawCssText) { translate(sheet.styleSheet.rawCssText, href, media); parsedSheets[href] = true; } else { if ((!/^([a-zA-Z:]*\/\/)/.test(href) && !base) || href.replace(RegExp.$1, "").split("/")[0] === w.location.host) { // IE7 doesn't handle urls that start with '//' for ajax request // manually add in the protocol if (href.substring(0, 2) === "//") { href = w.location.protocol + href; } requestQueue.push({ href: href, media: media }); } } } } makeRequests(); }; //translate CSS ripCSS(); //expose update for re-running respond later on respond.update = ripCSS; //expose getEmValue respond.getEmValue = getEmValue; //adjust on resize function callMedia() { applyMedia(true); } if (w.addEventListener) { w.addEventListener("resize", callMedia, false); } else if (w.attachEvent) { w.attachEvent("onresize", callMedia); } })(this); /*global jQuery */ /*jshint browser:true */ /*! * FitVids 1.1 * * Copyright 2013, Chris Coyier - http://css-tricks.com + Dave Rupert - http://daverupert.com * Credit to Thierry Koblentz - http://www.alistapart.com/articles/creating-intrinsic-ratios-for-video/ * Released under the WTFPL license - http://sam.zoy.org/wtfpl/ * */ (function($) { "use strict"; $.fn.fitVids = function(options) { var settings = { customSelector: null, ignore: null }; if (!document.getElementById('fit-vids-style')) { // appendStyles: https://github.com/toddmotto/fluidvids/blob/master/dist/fluidvids.js var head = document.head || document.getElementsByTagName('head')[0]; var css = '.fluid-width-video-wrapper{width:100%;position:relative;padding:0;}.fluid-width-video-wrapper iframe,.fluid-width-video-wrapper object,.fluid-width-video-wrapper embed {position:absolute;top:0;left:0;width:100%;height:100%;}'; var div = document.createElement('div'); div.innerHTML = '<p>x</p><style id="fit-vids-style">' + css + '</style>'; head.appendChild(div.childNodes[1]); } if (options) { $.extend(settings, options); } return this.each(function() { var selectors = [ "iframe[src*='player.vimeo.com']", "iframe[src*='youtube.com']", "iframe[src*='youtube-nocookie.com']", "iframe[src*='kickstarter.com'][src*='video.html']", "object", "embed" ]; if (settings.customSelector) { selectors.push(settings.customSelector); } var ignoreList = '.fitvidsignore'; if (settings.ignore) { ignoreList = ignoreList + ', ' + settings.ignore; } var $allVideos = $(this).find(selectors.join(',')); $allVideos = $allVideos.not("object object"); // SwfObj conflict patch $allVideos = $allVideos.not(ignoreList); // Disable FitVids on this video. $allVideos.each(function() { var $this = $(this); if ($this.parents(ignoreList).length > 0) { return; // Disable FitVids on this video. } if (this.tagName.toLowerCase() === 'embed' && $this.parent('object').length || $this.parent('.fluid-width-video-wrapper').length) { return; } if ((!$this.css('height') && !$this.css('width')) && (isNaN($this.attr('height')) || isNaN($this.attr('width')))) { $this.attr('height', 9); $this.attr('width', 16); } var height = (this.tagName.toLowerCase() === 'object' || ($this.attr('height') && !isNaN(parseInt($this.attr('height'), 10)))) ? parseInt($this.attr('height'), 10) : $this.height(), width = !isNaN(parseInt($this.attr('width'), 10)) ? parseInt($this.attr('width'), 10) : $this.width(), aspectRatio = height / width; if (!$this.attr('id')) { var videoID = 'fitvid' + Math.floor(Math.random() * 999999); $this.attr('id', videoID); } $this.wrap('<div class="fluid-width-video-wrapper"></div>').parent('.fluid-width-video-wrapper').css('padding-top', (aspectRatio * 100) + "%"); $this.removeAttr('height').removeAttr('width'); }); }); }; // Works with either jQuery or Zepto })(window.jQuery || window.Zepto);
ApplicationFollowButtonView = Backbone.View.extend({ events: { 'click .follow_btn': 'toggleFollowing' }, initialize: function (options) { if (options.user.get('id') != CurrentUser.get('id')){ this.model = new FollowButton(); this.listenTo(this.model, 'sync', this.render); this.listenTo(this.model, 'change', this.render); this.model.set({ 'user_id': options.user.get('id'), 'following': options.user.get('following') }, { silent: true }); this.render(); } }, render: function () { this.$el.html(render('application/follow_button', this.model)); }, toggleFollowing: function (e) { e.preventDefault(); this.model.toggle(); } });
'use strict'; window.onload = function init (){ $("#H1C").fadeIn("slow"); $("#H2C").fadeIn("slow"); $("#H3C").fadeIn("slow"); $("#H1PC").fadeOut("slow"); $("#H2PC").fadeOut("slow"); $("#H3PC").fadeOut("slow"); /* $(".BateauG1").fadeOut("slow"); $(".BateauP1").fadeOut("slow"); $(".BateauM1").fadeOut("slow"); $(".BateauM2").fadeOut("slow"); $(".BateauP2").fadeOut("slow"); $(".BateauG2").fadeOut("slow"); */ $(".Homard1").fadeIn("slow"); $(".Homard2").fadeOut("slow"); $(".Homard3").fadeIn("slow"); $(".Homard4").fadeOut("slow"); $(".Merlu1").fadeIn("slow"); $(".Merlu2").fadeOut("slow"); $(".Merlu3").fadeIn("slow"); $(".Merlu4").fadeOut("slow"); $(".Sole1").fadeIn("slow"); $(".Sole2").fadeOut("slow"); $(".Sole3").fadeOut("slow"); $(".Sole4").fadeIn("slow"); /* $(".Touriste1").fadeOut("slow"); $(".Touriste2").fadeOut("slow"); $(".Touriste3").fadeOut("slow"); $(".Touriste4").fadeOut("slow"); */ $(".Agriculteur").fadeOut("slow"); $(".PORC").fadeOut("slow"); //caca $(".Bouse1").fadeOut("slow"); $(".Bouse2").fadeOut("slow"); $(".Bouse3").fadeOut("slow"); $(".Bouse4").fadeOut("slow"); $(".Scientifique").fadeOut("slow"); //Scientifique victoire $(".Scientifique-réussite").fadeOut("slow"); $(".LogoScientifique1").fadeOut("slow"); $(".LogoScientifique2").fadeOut("slow"); $(".LogoScientifique3").fadeOut("slow"); $(".LogoScientifique4").fadeOut("slow"); $(".LogoScientifique5").fadeOut("slow"); $(".Monstre4").fadeIn("slow"); $(".Monstre3").fadeOut("slow"); $(".Monstre2").fadeOut("slow"); $(".Monstre1").fadeOut("slow"); $(".Sceau").fadeOut("slow"); $(".Maison1").fadeIn("slow"); $(".Maison2").fadeIn("slow"); $(".Maison3").fadeOut("slow"); $(".Digue1").fadeOut("slow"); $(".Digue2").fadeOut("slow"); $(".Digue3").fadeIn("slow"); $(".Mer2").fadeIn("slow"); $(".Mer1").fadeOut("slow"); $(".Mer3").fadeOut("slow"); $(".Mer4").fadeOut("slow"); $(".ScientifiqueJ3-1").fadeIn("slow"); $(".ScientifiqueJ3-2").fadeOut("slow"); $(".ScientifiqueJ3-3").fadeOut("slow"); $(".ScientifiqueJ3-4").fadeOut("slow"); $(".DataJ3-1").fadeIn("slow"); $(".DataJ3-2").fadeOut("slow"); $(".DataJ3-3").fadeOut("slow"); $(".DataJ3-4").fadeOut("slow"); $("#Macération").css("background-color", "#faf7f5"); $("#Ultrasons").css("background-color", "#6a9dae"); $("#Enzymes").css("background-color", "#6a9dae"); $("#Ultrasons_Enzymes").css("background-color", "#6a9dae"); var echelle =200000-document.getElementById("barreJ4-2").value*80000+document.getElementById("barreJ4-1").value*50000; if(echelle<0){ echelle=0; } document.getElementById("bourse").style.transform = 'scale(' + echelle/200000 + ')'; }
/* * Navigation is where when the app first starts it reads from the configuration * and determine which navigator to use */ import React from 'react'; import { connect } from 'react-redux'; import { Views, Defaults } from '../../global/globalIncludes'; class NavigationShell extends React.Component { static propTypes = { loading: React.PropTypes.bool, navigation: React.PropTypes.object }; render() { return ( (() => { const NavigationView = Views[this.props.navigation.config.type]; // If the component is missing, fallback to default with message if (!NavigationView) { const warningText = `View ${this.props.navigation.config.type} not found`; return <Defaults.WarningView warningText={warningText} />; } return <NavigationView />; })() ); } } module.exports = connect((store) => ({ navigation: store.data.navigation.data }))(NavigationShell);
'use strict'; module.exports = [ { method: 'GET', path: '/assets/{filename}', handler: { file: (request) => { return request.params.filename; } } }, { method: 'GET', path: '/{path*}', handler: (request, reply) => { reply.file('index.html'); } } ];
'use strict'; const common = require('../common'); const { Readable } = require('stream'); const assert = require('assert'); { const read = new Readable({ read() {} }); read.resume(); read.on('close', common.mustCall()); read.destroy(); assert.strictEqual(read.destroyed, true); } { const read = new Readable({ read() {} }); read.resume(); const expected = new Error('kaboom'); read.on('end', common.mustNotCall('no end event')); read.on('close', common.mustCall()); read.on('error', common.mustCall((err) => { assert.strictEqual(err, expected); })); read.destroy(expected); assert.strictEqual(read.destroyed, true); } { const read = new Readable({ read() {} }); read._destroy = common.mustCall(function(err, cb) { assert.strictEqual(err, expected); cb(err); }); const expected = new Error('kaboom'); read.on('end', common.mustNotCall('no end event')); read.on('close', common.mustCall()); read.on('error', common.mustCall((err) => { assert.strictEqual(err, expected); })); read.destroy(expected); assert.strictEqual(read.destroyed, true); } { const read = new Readable({ read() {}, destroy: common.mustCall(function(err, cb) { assert.strictEqual(err, expected); cb(); }) }); const expected = new Error('kaboom'); read.on('end', common.mustNotCall('no end event')); // Error is swallowed by the custom _destroy read.on('error', common.mustNotCall('no error event')); read.on('close', common.mustCall()); read.destroy(expected); assert.strictEqual(read.destroyed, true); } { const read = new Readable({ read() {} }); read._destroy = common.mustCall(function(err, cb) { assert.strictEqual(err, null); cb(); }); read.destroy(); assert.strictEqual(read.destroyed, true); } { const read = new Readable({ read() {} }); read.resume(); read._destroy = common.mustCall(function(err, cb) { assert.strictEqual(err, null); process.nextTick(() => { this.push(null); cb(); }); }); const fail = common.mustNotCall('no end event'); read.on('end', fail); read.on('close', common.mustCall()); read.destroy(); read.removeListener('end', fail); read.on('end', common.mustNotCall()); assert.strictEqual(read.destroyed, true); } { const read = new Readable({ read() {} }); const expected = new Error('kaboom'); read._destroy = common.mustCall(function(err, cb) { assert.strictEqual(err, null); cb(expected); }); let ticked = false; read.on('end', common.mustNotCall('no end event')); read.on('error', common.mustCall((err) => { assert.strictEqual(ticked, true); assert.strictEqual(read._readableState.errorEmitted, true); assert.strictEqual(read._readableState.errored, true); assert.strictEqual(err, expected); })); read.destroy(); assert.strictEqual(read._readableState.errorEmitted, false); assert.strictEqual(read._readableState.errored, true); assert.strictEqual(read.destroyed, true); ticked = true; } { const read = new Readable({ read() {} }); read.resume(); read.destroyed = true; assert.strictEqual(read.destroyed, true); // The internal destroy() mechanism should not be triggered read.on('end', common.mustNotCall()); read.destroy(); } { function MyReadable() { assert.strictEqual(this.destroyed, false); this.destroyed = false; Readable.call(this); } Object.setPrototypeOf(MyReadable.prototype, Readable.prototype); Object.setPrototypeOf(MyReadable, Readable); new MyReadable(); } { // Destroy and destroy callback const read = new Readable({ read() {} }); read.resume(); const expected = new Error('kaboom'); let ticked = false; read.on('close', common.mustCall(() => { assert.strictEqual(read._readableState.errorEmitted, true); assert.strictEqual(ticked, true); })); read.on('error', common.mustCall((err) => { assert.strictEqual(err, expected); })); assert.strictEqual(read._readableState.errored, false); assert.strictEqual(read._readableState.errorEmitted, false); read.destroy(expected, common.mustCall(function(err) { assert.strictEqual(read._readableState.errored, true); assert.strictEqual(err, expected); })); assert.strictEqual(read._readableState.errorEmitted, false); assert.strictEqual(read._readableState.errored, true); ticked = true; } { const readable = new Readable({ destroy: common.mustCall(function(err, cb) { process.nextTick(cb, new Error('kaboom 1')); }), read() {} }); let ticked = false; readable.on('close', common.mustCall(() => { assert.strictEqual(ticked, true); assert.strictEqual(readable._readableState.errorEmitted, true); })); readable.on('error', common.mustCall((err) => { assert.strictEqual(ticked, true); assert.strictEqual(err.message, 'kaboom 1'); assert.strictEqual(readable._readableState.errorEmitted, true); })); readable.destroy(); assert.strictEqual(readable.destroyed, true); assert.strictEqual(readable._readableState.errored, false); assert.strictEqual(readable._readableState.errorEmitted, false); // Test case where `readable.destroy()` is called again with an error before // the `_destroy()` callback is called. readable.destroy(new Error('kaboom 2')); assert.strictEqual(readable._readableState.errorEmitted, false); assert.strictEqual(readable._readableState.errored, false); ticked = true; } { const read = new Readable({ read() {} }); read.destroy(); read.push('hi'); read.on('data', common.mustNotCall()); } { const read = new Readable({ read: common.mustNotCall(function() {}) }); read.destroy(); assert.strictEqual(read.destroyed, true); read.read(); }
(function(){ var C = (typeof window === 'undefined') ? require('./Crypto').Crypto : window.Crypto; // Shortcuts var util = C.util, charenc = C.charenc, UTF8 = charenc.UTF8, Binary = charenc.Binary; var MARC4 = C.MARC4 = { /** * Public API */ encrypt: function (message, password) { var // Convert to bytes m = UTF8.stringToBytes(message), // Generate random IV iv = util.randomBytes(16), // Generate key k = password.constructor == String ? // Derive key from passphrase C.PBKDF2(password, iv, 32, { asBytes: true }) : // else, assume byte array representing cryptographic key password; // Encrypt MARC4._marc4(m, k, 1536); // Return ciphertext return util.bytesToBase64(iv.concat(m)); }, decrypt: function (ciphertext, password) { var // Convert to bytes c = util.base64ToBytes(ciphertext), // Separate IV and message iv = c.splice(0, 16), // Generate key k = password.constructor == String ? // Derive key from passphrase C.PBKDF2(password, iv, 32, { asBytes: true }) : // else, assume byte array representing cryptographic key password; // Decrypt MARC4._marc4(c, k, 1536); // Return plaintext return UTF8.bytesToString(c); }, /** * Internal methods */ // The core _marc4: function (m, k, drop) { // State variables var i, j, s, temp; // Key setup for (i = 0, s = []; i < 256; i++) s[i] = i; for (i = 0, j = 0; i < 256; i++) { j = (j + s[i] + k[i % k.length]) % 256; // Swap temp = s[i]; s[i] = s[j]; s[j] = temp; } // Clear counters i = j = 0; // Encryption for (var k = -drop; k < m.length; k++) { i = (i + 1) % 256; j = (j + s[i]) % 256; // Swap temp = s[i]; s[i] = s[j]; s[j] = temp; // Stop here if we're still dropping keystream if (k < 0) continue; // Encrypt m[k] ^= s[(s[i] + s[j]) % 256]; } } }; })();
module.exports={A:{A:{"2":"K C G E B A WB"},B:{"1":"D u Y I M H"},C:{"2":"0 1 2 3 5 6 7 UB z F J K C G E B A D u Y I M H N O P Q R S T U V W X w Z a b c d e f L h i j k l m n o p q r s t y v g SB RB"},D:{"2":"0 1 2 3 5 6 7 F J K C G E B A D u Y I M H N O P Q R S T U V W X w Z a b c d e f L h i j k l m n o p q r s t y v g GB BB DB VB EB"},E:{"2":"F J K C G E B A FB AB HB IB JB KB LB MB"},F:{"2":"8 9 E A D I M H N O P Q R S T U V W X w Z a b c d e f L h i j k l m n o p q r s t NB OB PB QB TB x"},G:{"2":"4 G AB CB XB YB ZB aB","132":"A bB cB dB eB"},H:{"2":"fB"},I:{"2":"4 z F v gB hB iB jB kB lB"},J:{"2":"C","132":"B"},K:{"2":"8 9 B A D L","132":"x"},L:{"2":"BB"},M:{"2":"g"},N:{"2":"B A"},O:{"132":"mB"},P:{"2":"F J"},Q:{"2":"nB"},R:{"2":"oB"}},B:6,C:"AC-3 (Dolby Digital) and EC-3 (Dolby Digital Plus) codecs"};
/*! * jquery.fancytree.columnview.js * * Render tree like a Mac Finder's column view. * (Extension module for jquery.fancytree.js: https://github.com/mar10/fancytree/) * * Copyright (c) 2008-2016, Martin Wendt (http://wwWendt.de) * * Released under the MIT license * https://github.com/mar10/fancytree/wiki/LicenseInfo * * @version 2.19.0 * @date 2016-08-11T15:51 */ ;(function($, window, document, undefined) { "use strict"; // prevent duplicate loading // if ( $.ui.fancytree && $.ui.fancytree.version ) { // $.ui.fancytree.warn("Fancytree: duplicate include"); // return; // } /******************************************************************************* * Private functions and variables */ /* function _assert(cond, msg){ msg = msg || ""; if(!cond){ $.error("Assertion failed " + msg); } } */ /******************************************************************************* * Private functions and variables */ $.ui.fancytree.registerExtension({ name: "columnview", version: "2.19.0", // Default options for this extension. options: { }, // Overide virtual methods for this extension. // `this` : is this extension object // `this._base` : the Fancytree instance // `this._super`: the virtual function that was overriden (member of prev. extension or Fancytree) treeInit: function(ctx){ var $tdFirst, $ul, tree = ctx.tree, $table = tree.widget.element; tree.tr = $("tbody tr", $table)[0]; tree.columnCount = $(">td", tree.tr).length; // Perform default behavior this._superApply(arguments); // Standard Fancytree created a root <ul>. Now move this into first table cell $ul = $(tree.rootNode.ul); $tdFirst = $(">td", tree.tr).eq(0); $ul.removeClass("fancytree-container"); $ul.removeAttr("tabindex"); tree.$container = $table; $table.addClass("fancytree-container fancytree-ext-columnview"); $table.attr("tabindex", "0"); $tdFirst.empty(); $ul.detach().appendTo($tdFirst); // Force some required options tree.widget.options.autoCollapse = true; // tree.widget.options.autoActivate = true; tree.widget.options.toggleEffect = false; tree.widget.options.clickFolderMode = 1; // Make sure that only active path is expanded when a node is activated: $table.bind("fancytreeactivate", function(event, data){ var i, tdList, node = data.node, tree = data.tree, level = node.getLevel(); tree._callHook("nodeCollapseSiblings", node); // Clear right neighbours if(level <= tree.columnCount){ tdList = $(">td", tree.tr); for(i=level; i<tree.columnCount; i++){ tdList.eq(i).empty(); } } // Expand nodes on activate, so we populate the right neighbor cell if(!node.expanded && (node.children || node.lazy)) { node.setExpanded(); } // Adjust keyboard behaviour: }).bind("fancytreekeydown", function(event, data){ var next = null, node = data.node || data.tree.getFirstChild(); switch(event.which){ case $.ui.keyCode.DOWN: next = node.getNextSibling(); if( next ){ next.setFocus(); } return false; case $.ui.keyCode.LEFT: next = node.getParent(); if( next ){ next.setFocus(); } return false; case $.ui.keyCode.UP: next = node.getPrevSibling(); if( next ){ next.setFocus(); } return false; } }); }, nodeRender: function(ctx, force, deep, collapsed, _recursive) { // Render standard nested <ul> - <li> hierarchy this._superApply(arguments); // Remove expander and add a trailing triangle instead var level, $tdChild, $ul, tree = ctx.tree, node = ctx.node, $span = $(node.span); $span.find("span.fancytree-expander").remove(); if(node.hasChildren() !== false && !$span.find("span.fancytree-cv-right").length){ $span.append($("<span class='fancytree-icon fancytree-cv-right'>")); } // Move <ul> with children into the appropriate <td> if(node.ul){ node.ul.style.display = ""; // might be hidden if RIGHT was pressed level = node.getLevel(); if(level < tree.columnCount){ $tdChild = $(">td", tree.tr).eq(level); $ul = $(node.ul).detach(); $tdChild.empty().append($ul); } } } }); }(jQuery, window, document));
const camelCase = require('lodash/camelCase'); function writeImport(config, cmd) { if (config && config.loader === false) { return `// not importing ${cmd}`; } return `import ${camelCase(cmd)} from '${cmd}'` } function uc(value) { if (value) { value = value + ''; return value[0].toUpperCase() + value.substring(1); } return value; } function writeLoader(config, cmd) { if (config) { if (config.loader === false) { return `// ${cmd} not loading`; } if (config.loader) { let l = `loader.add${uc(config.loader)}`; let v1 = camelCase(cmd); if (config.name) { return `${l}('${config.name}',${v1})`; } else { return `${l}(${v1})`; } } } return `loader.addLoader(${camelCase(cmd)})` } const has = Function.call.bind(Object.prototype.hasOwnProperty); const keys = (obj) => { const ret = [] if (!obj) { return ret; } for (let k in obj) { if (has(obj, k)) { ret.push(k); } } return ret; }; function writeLoadType(plugins) { const map = {}; plugins.forEach((value, key) => { if (value && value.config && value.config.loader) { map[value.config.loader] = true; } }); return keys(map).map(function (key) { return `loader.loaderType('${uc(key)}')` }).join(';\n'); } function map(m, each) { const result = []; m.forEach((value, key) => { if (value) { result.push(each(value.config, key)); } }); return result; } module.exports = function ({ plugins }) { return { code : ` import loaderFactory from 'subschema-loader'; //Automagically imported ${map(plugins, writeImport).join(';\n')} const loader = loaderFactory(); //Setup loader types; ${writeLoadType(plugins)} //Automagically added to importer ${map(plugins, writeLoader).join(';\n')} //Your Welcome. export default loader; `, cacheable: true } };
!function (doc, $) { var q = require('qwery') $.pseudos = q.pseudos $._select = function (s, r) { // detect if sibling module 'bonzo' is available at run-time // rather than load-time since technically it's not a dependency and // can be loaded in any order // hence the lazy function re-definition return ($._select = (function(b) { try { b = require('bonzo') return function (s, r) { return /^\s*</.test(s) ? b.create(s, r) : q(s, r) } } catch (e) { } return q })())(s, r) } $.ender({ find: function (s) { var r = [], i, l, j, k, els for (i = 0, l = this.length; i < l; i++) { els = q(s, this[i]) for (j = 0, k = els.length; j < k; j++) r.push(els[j]) } return $(q.uniq(r)) } , and: function (s) { var plus = $(s) for (var i = this.length, j = 0, l = this.length + plus.length; i < l; i++, j++) { this[i] = plus[j] } return this } , is: function(s, r) { var i, l for (i = 0, l = this.length; i < l; i++) { if (q.is(this[i], s, r)) { return true } } return false } }, true) }(document, ender);
// Generated by CoffeeScript 1.6.2 (function() { var Director, Messenger, _ref, __hasProp = {}.hasOwnProperty, __extends = function(child, parent) { for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; } function ctor() { this.constructor = child; } ctor.prototype = parent.prototype; child.prototype = new ctor(); child.__super__ = parent.prototype; return child; }; Director = require("../concrete/director"); Messenger = require("./messenger"); module.exports = (function(_super) { __extends(_Class, _super); function _Class() { _ref = _Class.__super__.constructor.apply(this, arguments); return _ref; } _Class.prototype.passive = false; /* */ _Class.prototype._newMessenger = function(request, middleware) { return new Messenger(request, middleware, this); }; /* */ _Class.prototype.getListeners = function(request, search) { return this.prepareListeners(_Class.__super__.getListeners.call(this, request, search)); }; /* */ _Class.prototype.prepareListeners = function(listeners) { if (!!listeners.length) { return [listeners[0]]; } else { return []; } }; return _Class; })(Director); }).call(this);
(function($) { "use strict"; // Start of use strict // jQuery for page scrolling feature - requires jQuery Easing plugin $('a.page-scroll').bind('click', function(event) { var $anchor = $(this); $('html, body').stop().animate({ scrollTop: ($($anchor.attr('href')).offset().top - 50) }, 1250, 'easeInOutExpo'); event.preventDefault(); }); // Highlight the top nav as scrolling occurs $('body').scrollspy({ target: '.navbar-fixed-top', offset: 51 }); // Closes the Responsive Menu on Menu Item Click $('.navbar-collapse ul li a').click(function() { $('.navbar-toggle:visible').click(); }); // Offset for Main Navigation $('#mainNav').affix({ offset: { top: $('header').height() } }) // var mn = $("#main-nav"); // mns = "main-nav-scrolled"; // hdr = $('header').height(); // $(window).scroll(function() { // if( $(this).scrollTop() > hdr ) { // mn.addClass(mns); // } else { // mn.removeClass(mns); // } // }); $('.carousel').each(function() { var $t = $(this), $forward = $('<span class="forward"></span>'), $backward = $('<span class="backward"></span>'), $reel = $t.children('.reel'), $items = $reel.children('article'); var pos = 0, leftLimit, rightLimit, itemWidth, reelWidth, timerId; // Items. if (settings.carousels.fadeIn) { $items.addClass('loading'); $t.onVisible(function() { var timerId, limit = $items.length - Math.ceil($window.width() / itemWidth); timerId = window.setInterval(function() { var x = $items.filter('.loading'), xf = x.first(); if (x.length <= limit) { window.clearInterval(timerId); $items.removeClass('loading'); return; } if (skel.vars.IEVersion < 10) { xf.fadeTo(750, 1.0); window.setTimeout(function() { xf.removeClass('loading'); }, 50); } else xf.removeClass('loading'); }, settings.carousels.fadeDelay); }, 50); } // Main. $t._update = function() { pos = 0; rightLimit = (-1 * reelWidth) + $window.width(); leftLimit = 0; $t._updatePos(); }; if (skel.vars.IEVersion < 9) $t._updatePos = function() { $reel.css('left', pos); }; else $t._updatePos = function() { $reel.css('transform', 'translate(' + pos + 'px, 0)'); }; // Forward. $forward .appendTo($t) .hide() .mouseenter(function(e) { timerId = window.setInterval(function() { pos -= settings.carousels.speed; if (pos <= rightLimit) { window.clearInterval(timerId); pos = rightLimit; } $t._updatePos(); }, 10); }) .mouseleave(function(e) { window.clearInterval(timerId); }); // Backward. $backward .appendTo($t) .hide() .mouseenter(function(e) { timerId = window.setInterval(function() { pos += settings.carousels.speed; if (pos >= leftLimit) { window.clearInterval(timerId); pos = leftLimit; } $t._updatePos(); }, 10); }) .mouseleave(function(e) { window.clearInterval(timerId); }); // Init. $window.load(function() { reelWidth = $reel[0].scrollWidth; skel.on('change', function() { if (skel.vars.touch) { $reel .css('overflow-y', 'hidden') .css('overflow-x', 'scroll') .scrollLeft(0); $forward.hide(); $backward.hide(); } else { $reel .css('overflow', 'visible') .scrollLeft(0); $forward.show(); $backward.show(); } $t._update(); }); $window.resize(function() { reelWidth = $reel[0].scrollWidth; $t._update(); }).trigger('resize'); }); }); // Initialize and Configure Scroll Reveal Animation window.sr = ScrollReveal(); sr.reveal('.sr-icons', { duration: 600, scale: 0.3, distance: '0px' }, 200); sr.reveal('.sr-button', { duration: 1000, delay: 200 }); sr.reveal('.sr-contact', { duration: 600, scale: 0.3, distance: '0px' }, 300); // Initialize and Configure Magnific Popup Lightbox Plugin $('.popup-gallery').magnificPopup({ delegate: 'a', type: 'image', tLoading: 'Loading image #%curr%...', mainClass: 'mfp-img-mobile', gallery: { enabled: true, navigateByImgClick: true, preload: [0, 1] // Will preload 0 - before current, and 1 after the current image }, image: { tError: '<a href="%url%">The image #%curr%</a> could not be loaded.' } }); })(jQuery); // End of use strict
'use strict' var Buffer = require('safe-buffer').Buffer var writeToStream = require('./writeToStream') var EE = require('events').EventEmitter var inherits = require('inherits') function generate (packet) { var stream = new Accumulator() writeToStream(packet, stream) return stream.concat() } function Accumulator () { this._array = new Array(20) this._i = 0 } inherits(Accumulator, EE) Accumulator.prototype.write = function (chunk) { this._array[this._i++] = chunk return true } Accumulator.prototype.concat = function () { var length = 0 var lengths = new Array(this._array.length) var list = this._array var pos = 0 var i var result for (i = 0; i < list.length && list[i] !== undefined; i++) { if (typeof list[i] !== 'string') lengths[i] = list[i].length else lengths[i] = Buffer.byteLength(list[i]) length += lengths[i] } result = Buffer.allocUnsafe(length) for (i = 0; i < list.length && list[i] !== undefined; i++) { if (typeof list[i] !== 'string') { list[i].copy(result, pos) pos += lengths[i] } else { result.write(list[i], pos) pos += lengths[i] } } return result } module.exports = generate
var request = require('request'); module.exports = class TTV{ constructor(){ if(config.API.youtube && config.API.youtube.key !== ''){ this.yt_search = true; } else { b.log.error('Missing Youtube API key!'); this.yt_search = false; } if (config.API.trakt && config.API.trakt.key !== ''){ this.use_trakt = true; } else { b.log.error('Missing Trakt API key!'); this.use_trakt = false; } if (config.API.themoviedb && config.API.themoviedb.key !== ''){ this.use_themoviedb = true; } else { b.log.error('Missing TheMovieDB API key!'); this.use_themoviedb = false; } } get_tmdb_url(CHAN, method, params, callback){ var url = 'https://api.themoviedb.org/3/' + method + '?'; for(var key in params){ if(key === 'handlers') continue; url += '&' + key + '=' + encodeURIComponent(params[key]); } url += '&api_key=' + config.API.themoviedb.key; request({url: url, followRedirect: false}, function (error, response, body) { if(error){ CHAN.log.error('Error:', error); if(params.handlers.error) params.handlers.error(error); } else if(response.statusCode !== 200){ CHAN.log.error('Invalid Status Code Returned:', response.statusCode); if(params.handlers.error) params.handlers.error(error); } else { var json_parse = JSON.parse(body); if(json_parse.error) CHAN.log.error('Error:', json_parse.message); params.handlers.success(json_parse); } }); }; get_trakt_url(CHAN, method, params, callback){ if (this.use_trakt){ var headers = { 'trakt-api-key' : config.API.trakt.key, 'trakt-api-version' : '2', 'Content-type' : 'application/json' } } else { callback({err: 'Missing Trakt API key!'}); return; } var url = 'https://api.trakt.tv/' + method; var i = 0; for(var key in params){ if(key === 'handlers') continue; url += (i === 0 ? '?' : '&') + key + '=' + encodeURIComponent(params[key]); i++; } CHAN.log.debug(url); request({url: url, followRedirect: false, headers: headers}, function (error, response, body) { if(error){ CHAN.log.error('Error:', error); if(params.handlers.error) params.handlers.error(error); } else if(response.statusCode >= 400){ CHAN.log.error('Invalid Status Code Returned:', response.statusCode); if(params.handlers.error) params.handlers.error(error); } else { try{ var json_parse = JSON.parse(body); params.handlers.success(json_parse); } catch(e) { CHAN.log.debug(e.message); params.handlers.success({err: response.statusCode}); } } }); }; yt_video_search(CHAN, term, callback) { if(!this.yt_search){ return callback({err: 'No YouTube API key provided'}); } var params = { q: term, part: 'snippet', maxResults: 1 } var url = 'https://www.googleapis.com/youtube/v3/search?key=' + config.API.youtube.key for(var key in params){ url += '&' + key + '=' + encodeURI(params[key]); } CHAN.log.debug(url); request({url: url}, function (error, response, body){ try{ if(error && error != null && error != 'null') { CHAN.log.error('Error:', error); return callback({err: error}); } else { var json_parse = JSON.parse(body); if(json_parse && json_parse.items) { var results = json_parse.items.map(function (item) { var link = '' var id = '' switch (item.id.kind) { case 'youtube#channel': link = 'https://www.youtube.com/channel/' + item.id.channelId; id = item.id.channelId; break; case 'youtube#playlist': link = 'https://www.youtube.com/playlist?list=' + item.id.playlistId; id = item.id.playlistId break; default: link = 'https://www.youtube.com/watch?v=' + item.id.videoId; id = item.id.videoId break; } return { id: id, link: link, kind: item.id.kind, publishedAt: item.snippet.publishedAt, channelId: item.snippet.channelId, channelTitle: item.snippet.channelTitle, title: item.snippet.title, description: item.snippet.description, thumbnails: item.snippet.thumbnails } }); return callback(results); } else { CHAN.log.error('Error:', body); return callback({err: 'An error has occured'}); } } } catch(e) { CHAN.log.error('Error:', error); return callback({err: e.message}); } }); } search(CHAN, media_type, query, callback){ var _this = this; if(!this.use_trakt){ callback({err: 'Missing Trakt API key!'}); return; } this.get_trakt_url(CHAN, 'search/' + media_type, { query: query, extended : 'max', handlers: { error: function(err){ CHAN.log.error(err); callback({err: 'An error has occured'}); return; }, success: function(data){ if(!data || !data[0] || !data[0][media_type]){ callback({err: 'No ' + media_type + ' found by that name (' + query + ')'}); return; } var d = data[0][media_type]; d.type = media_type; d.score = data[0].score; _this.get_trakt_url(CHAN, media_type + 's/' + d.ids.slug, { extended : 'full', handlers: { error: function(err){ CHAN.log.error(err); callback({err: 'An error has occured'}); return; }, success: function(dd){ if(!dd){ callback({err: 'No ' + media_type + ' found by that name (' + query + ')'}); return; } d = Object.assign({}, d, dd); if(!d.trailer && _this.yt_search){ _this.yt_video_search(CHAN, (d.title + ' trailer'), function(results) { if(results.err){ CHAN.log.error(results.err); callback({err: 'an error has occured'}); } else if(!results || results.length === 0){ callback({err: 'no youtube video found show'}, 2); } else { d.trailer = CHAN.t.null('(YouTube Search) ') + results[0].link; } callback(d); }); } else { callback(d); } } } }); } } }) } getTrending(CHAN, media_type, callback){ var _this = this; if(!this.use_trakt){ callback({err: 'Missing Trakt API key!'}); return; } if(media_type !== '-movies' && media_type !== '-shows'){ callback({err: '-movies and -shows are the only accepted parameters'}); return; } if(media_type === '-movies'){ this.get_trakt_url(CHAN, 'movies/trending', { handlers: { error: function(err){ CHAN.log.error(err); callback({err: 'An error has occured'}); return; }, success: function(data){ if(!data || !data.length){ callback({err: 'No movies trending'}); return; } _this.parseMediaInfo(CHAN, data, null, null, {type: 'movie'}, function(new_data){ callback(new_data); }); } } }); } else if(media_type === '-shows') { this.get_trakt_url(CHAN, 'shows/trending', { handlers: { error: function(err){ CHAN.log.error(err); callback({err: 'An error has occured'}); return; }, success: function(data){ if(!data || !data.length){ callback({err: 'No shows trending'}); return; } _this.parseMediaInfo(CHAN, data, null, null, {type: 'show'}, function(new_data){ callback(new_data); }); } } }); } }; parseMediaInfo(CHAN, media, irc_nick, ttv_nick, merge_info, callback) { if (!media){ CHAN.log.error('no media found'); return callback({err: 'no media found'}); } //error, non-fatal if(media.statusCode) { CHAN.log.error(media.statusCode + ': ' + media.statusMessage); callback({err: media.statusMessage}); return; } if(!media.length) media = [media]; var media_arr = []; for(var m = 0; m < media.length; m++){ var media_info = { title: '', year: '', type: media[m].type || '' }; for(var key in merge_info){ media_info[key] = merge_info[key]; } if(media[m].watchers) media_info.watchers = media[m].watchers; if(media[m].now_watching !== undefined) media_info = media[m].now_watching; if(irc_nick) media_info.irc_nick = irc_nick; switch(media_info.type) { case 'episode': var title = []; if(media[m].show.title) title.push(media[m].show.title); if(media[m].episode.title) title.push(media[m].episode.title); var season = media[m].season ? media[m].season : media[m].episode.season; var episode = media[m].number ? media[m].number : media[m].episode.number; var SE = 'S' + (season < 10 ? '0' + season : season); SE += 'E' + (episode < 10 ? '0' + episode : episode); title.push(SE); media_info.title = title.join(' - '); media_info.year = media[m].show.year; break; case 'show': media_info.title = media[m].show.title; media_info.year = media[m].show.year; break; case 'movie': media_info.title = media[m].movie.title; media_info.year = media[m].movie.year; break; default: media_info = media[m]; break; } media_arr.push(media_info); } callback(media_arr.length === 1 ? media_arr[0] : media_arr); }; getRecent(CHAN, irc_nick, ttv_nick, callback) { var _this = this; if(!this.use_trakt){ callback({err: 'Missing Trakt API key!'}); return; } this.get_trakt_url(CHAN, 'users/' + ttv_nick + '/watching', { handlers: { error: function(err){ CHAN.log.error(err); callback({err: 'An error has occured'}); return; }, success: function(data){ if(data.err && data.err === 204) //no content { _this.get_trakt_url(CHAN, 'users/' + ttv_nick + '/history', { handlers: { error: function(err){ CHAN.log.error(err); callback({err: 'An error has occured'}); return; }, success: function(data2){ if(data2.err && data2.err === 204) //no content { CHAN.log.error(CHAN.t.highlight(irc_nick) + ' hasn\'t scrobbled any media yet.'); callback({err: CHAN.t.highlight(irc_nick) + ' hasn\'t scrobbled any media yet.'}); } else if(data2.err) { callback({err: 'An error has occured, status code ' + data2.err}); return; } else if(data2.length > 0) { var media = data2[0]; _this.parseMediaInfo(CHAN, media, irc_nick, ttv_nick, {now_watching: false}, callback); } } } }); } else if(data.err) { callback({err: 'An error has occured, status code ' + data.err}); return; } else { var media = data; _this.parseMediaInfo(CHAN, media, irc_nick, ttv_nick, {now_watching: true}, callback); } } } }); } }
/* * jQuery Nivo Slider v3.2 * http://nivo.dev7studios.com * * Copyright 2012, Dev7studios * Free to use and abuse under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function($) { var NivoSlider = function(element, options){ // Defaults are below var settings = $.extend({}, $.fn.nivoSlider.defaults, options); // Useful variables. Play carefully. var vars = { currentSlide: 0, currentImage: '', totalSlides: 0, running: false, paused: false, stop: false, controlNavEl: false }; // Get this slider var slider = $(element); slider.data('nivo:vars', vars).addClass('nivoSlider'); // Find our slider children var kids = slider.children(); kids.each(function() { var child = $(this); var link = ''; if(!child.is('img')){ if(child.is('a')){ child.addClass('nivo-imageLink'); link = child; } child = child.find('img:first'); } // Get img width & height var childWidth = (childWidth === 0) ? child.attr('width') : child.width(), childHeight = (childHeight === 0) ? child.attr('height') : child.height(); if(link !== ''){ link.css('display','none'); } child.css('display','none'); vars.totalSlides++; }); // If randomStart if(settings.randomStart){ settings.startSlide = Math.floor(Math.random() * vars.totalSlides); } // Set startSlide if(settings.startSlide > 0){ if(settings.startSlide >= vars.totalSlides) { settings.startSlide = vars.totalSlides - 1; } vars.currentSlide = settings.startSlide; } // Get initial image if($(kids[vars.currentSlide]).is('img')){ vars.currentImage = $(kids[vars.currentSlide]); } else { vars.currentImage = $(kids[vars.currentSlide]).find('img:first'); } // Show initial link if($(kids[vars.currentSlide]).is('a')){ $(kids[vars.currentSlide]).css('display','block'); } // Set first background var sliderImg = $('<img/>').addClass('nivo-main-image'); sliderImg.attr('src', vars.currentImage.attr('src')).show(); slider.append(sliderImg); // Detect Window Resize $(window).resize(function() { slider.children('img').width(slider.width()); sliderImg.attr('src', vars.currentImage.attr('src')); sliderImg.stop().height('auto'); $('.nivo-slice').remove(); $('.nivo-box').remove(); }); //Create caption slider.append($('<div class="nivo-caption"></div>')); // Process caption function var processCaption = function(settings){ var nivoCaption = $('.nivo-caption', slider); if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){ var title = vars.currentImage.attr('title'); if(title.substr(0,1) == '#') title = $(title).html(); if(nivoCaption.css('display') == 'block'){ setTimeout(function(){ nivoCaption.html(title); }, settings.animSpeed); } else { nivoCaption.html(title); nivoCaption.stop().fadeIn(settings.animSpeed); } } else { nivoCaption.stop().fadeOut(settings.animSpeed); } } //Process initial caption processCaption(settings); // In the words of Super Mario "let's a go!" var timer = 0; if(!settings.manualAdvance && kids.length > 1){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } // Add Direction nav if(settings.directionNav){ slider.append('<div class="nivo-directionNav"><a class="nivo-prevNav">'+ settings.prevText +'</a><a class="nivo-nextNav">'+ settings.nextText +'</a></div>'); $(slider).on('click', 'a.nivo-prevNav', function(){ if(vars.running) { return false; } clearInterval(timer); timer = ''; vars.currentSlide -= 2; nivoRun(slider, kids, settings, 'prev'); }); $(slider).on('click', 'a.nivo-nextNav', function(){ if(vars.running) { return false; } clearInterval(timer); timer = ''; nivoRun(slider, kids, settings, 'next'); }); } // Add Control nav if(settings.controlNav){ vars.controlNavEl = $('<div class="nivo-controlNav"></div>'); slider.after(vars.controlNavEl); for(var i = 0; i < kids.length; i++){ if(settings.controlNavThumbs){ vars.controlNavEl.addClass('nivo-thumbs-enabled'); var child = kids.eq(i); if(!child.is('img')){ child = child.find('img:first'); } if(child.attr('data-thumb')) vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'"><img src="'+ child.attr('data-thumb') +'" alt="" /></a>'); } else { vars.controlNavEl.append('<a class="nivo-control" rel="'+ i +'">'+ (i + 1) +'</a>'); } } //Set initial active link $('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active'); $('a', vars.controlNavEl).bind('click', function(){ if(vars.running) return false; if($(this).hasClass('active')) return false; clearInterval(timer); timer = ''; sliderImg.attr('src', vars.currentImage.attr('src')); vars.currentSlide = $(this).attr('rel') - 1; nivoRun(slider, kids, settings, 'control'); }); } //For pauseOnHover setting if(settings.pauseOnHover){ slider.hover(function(){ vars.paused = true; clearInterval(timer); timer = ''; }, function(){ vars.paused = false; // Restart the timer if(timer === '' && !settings.manualAdvance){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } }); } // Event when Animation finishes slider.bind('nivo:animFinished', function(){ sliderImg.attr('src', vars.currentImage.attr('src')); vars.running = false; // Hide child links $(kids).each(function(){ if($(this).is('a')){ $(this).css('display','none'); } }); // Show current link if($(kids[vars.currentSlide]).is('a')){ $(kids[vars.currentSlide]).css('display','block'); } // Restart the timer if(timer === '' && !vars.paused && !settings.manualAdvance){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } // Trigger the afterChange callback settings.afterChange.call(this); }); // Add slices for slice animations var createSlices = function(slider, settings, vars) { if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block'); $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show(); var sliceHeight = ($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().is('a')) ? $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().height() : $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height(); for(var i = 0; i < settings.slices; i++){ var sliceWidth = Math.round(slider.width()/settings.slices); if(i === settings.slices-1){ slider.append( $('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({ left:(sliceWidth*i)+'px', width:(slider.width()-(sliceWidth*i))+'px', height:sliceHeight+'px', opacity:'0', overflow:'hidden' }) ); } else { slider.append( $('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({ left:(sliceWidth*i)+'px', width:sliceWidth+'px', height:sliceHeight+'px', opacity:'0', overflow:'hidden' }) ); } } $('.nivo-slice', slider).height(sliceHeight); sliderImg.stop().animate({ height: $(vars.currentImage).height() }, settings.animSpeed); }; // Add boxes for box animations var createBoxes = function(slider, settings, vars){ if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block'); $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show(); var boxWidth = Math.round(slider.width()/settings.boxCols), boxHeight = Math.round($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height() / settings.boxRows); for(var rows = 0; rows < settings.boxRows; rows++){ for(var cols = 0; cols < settings.boxCols; cols++){ if(cols === settings.boxCols-1){ slider.append( $('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({ opacity:0, left:(boxWidth*cols)+'px', top:(boxHeight*rows)+'px', width:(slider.width()-(boxWidth*cols))+'px' }) ); $('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px'); } else { slider.append( $('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({ opacity:0, left:(boxWidth*cols)+'px', top:(boxHeight*rows)+'px', width:boxWidth+'px' }) ); $('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px'); } } } sliderImg.stop().animate({ height: $(vars.currentImage).height() }, settings.animSpeed); }; // Private run method var nivoRun = function(slider, kids, settings, nudge){ // Get our vars var vars = slider.data('nivo:vars'); // Trigger the lastSlide callback if(vars && (vars.currentSlide === vars.totalSlides - 1)){ settings.lastSlide.call(this); } // Stop if((!vars || vars.stop) && !nudge) { return false; } // Trigger the beforeChange callback settings.beforeChange.call(this); // Set current background before change if(!nudge){ sliderImg.attr('src', vars.currentImage.attr('src')); } else { if(nudge === 'prev'){ sliderImg.attr('src', vars.currentImage.attr('src')); } if(nudge === 'next'){ sliderImg.attr('src', vars.currentImage.attr('src')); } } vars.currentSlide++; // Trigger the slideshowEnd callback if(vars.currentSlide === vars.totalSlides){ vars.currentSlide = 0; settings.slideshowEnd.call(this); } if(vars.currentSlide < 0) { vars.currentSlide = (vars.totalSlides - 1); } // Set vars.currentImage if($(kids[vars.currentSlide]).is('img')){ vars.currentImage = $(kids[vars.currentSlide]); } else { vars.currentImage = $(kids[vars.currentSlide]).find('img:first'); } // Set active links if(settings.controlNav){ $('a', vars.controlNavEl).removeClass('active'); $('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active'); } // Process caption processCaption(settings); // Remove any slices from last transition $('.nivo-slice', slider).remove(); // Remove any boxes from last transition $('.nivo-box', slider).remove(); var currentEffect = settings.effect, anims = ''; // Generate random effect if(settings.effect === 'random'){ anims = new Array('sliceDownRight','sliceDownLeft','sliceUpRight','sliceUpLeft','sliceUpDown','sliceUpDownLeft','fold','fade', 'boxRandom','boxRain','boxRainReverse','boxRainGrow','boxRainGrowReverse'); currentEffect = anims[Math.floor(Math.random()*(anims.length + 1))]; if(currentEffect === undefined) { currentEffect = 'fade'; } } // Run random effect from specified set (eg: effect:'fold,fade') if(settings.effect.indexOf(',') !== -1){ anims = settings.effect.split(','); currentEffect = anims[Math.floor(Math.random()*(anims.length))]; if(currentEffect === undefined) { currentEffect = 'fade'; } } // Custom transition as defined by "data-transition" attribute if(vars.currentImage.attr('data-transition')){ currentEffect = vars.currentImage.attr('data-transition'); } // Run effects vars.running = true; var timeBuff = 0, i = 0, slices = '', firstSlice = '', totalBoxes = '', boxes = ''; if(currentEffect === 'sliceDown' || currentEffect === 'sliceDownRight' || currentEffect === 'sliceDownLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceDownLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); slice.css({ 'top': '0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'sliceUp' || currentEffect === 'sliceUpRight' || currentEffect === 'sliceUpLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceUpLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); slice.css({ 'bottom': '0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'sliceUpDown' || currentEffect === 'sliceUpDownRight' || currentEffect === 'sliceUpDownLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; var v = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceUpDownLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); if(i === 0){ slice.css('top','0px'); i++; } else { slice.css('bottom','0px'); i = 0; } if(v === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; v++; }); } else if(currentEffect === 'fold'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; $('.nivo-slice', slider).each(function(){ var slice = $(this); var origWidth = slice.width(); slice.css({ top:'0px', width:'0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'fade'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': slider.width() + 'px' }); firstSlice.animate({ opacity:'1.0' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'slideInRight'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': '0px', 'opacity': '1' }); firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'slideInLeft'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': '0px', 'opacity': '1', 'left': '', 'right': '0px' }); firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ // Reset positioning firstSlice.css({ 'left': '0px', 'right': '' }); slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'boxRandom'){ createBoxes(slider, settings, vars); totalBoxes = settings.boxCols * settings.boxRows; i = 0; timeBuff = 0; boxes = shuffle($('.nivo-box', slider)); boxes.each(function(){ var box = $(this); if(i === totalBoxes-1){ setTimeout(function(){ box.animate({ opacity:'1' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ box.animate({ opacity:'1' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 20; i++; }); } else if(currentEffect === 'boxRain' || currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){ createBoxes(slider, settings, vars); totalBoxes = settings.boxCols * settings.boxRows; i = 0; timeBuff = 0; // Split boxes into 2D array var rowIndex = 0; var colIndex = 0; var box2Darr = []; box2Darr[rowIndex] = []; boxes = $('.nivo-box', slider); if(currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrowReverse'){ boxes = $('.nivo-box', slider)._reverse(); } boxes.each(function(){ box2Darr[rowIndex][colIndex] = $(this); colIndex++; if(colIndex === settings.boxCols){ rowIndex++; colIndex = 0; box2Darr[rowIndex] = []; } }); // Run animation for(var cols = 0; cols < (settings.boxCols * 2); cols++){ var prevCol = cols; for(var rows = 0; rows < settings.boxRows; rows++){ if(prevCol >= 0 && prevCol < settings.boxCols){ /* Due to some weird JS bug with loop vars being used in setTimeout, this is wrapped with an anonymous function call */ (function(row, col, time, i, totalBoxes) { var box = $(box2Darr[row][col]); var w = box.width(); var h = box.height(); if(currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){ box.width(0).height(0); } if(i === totalBoxes-1){ setTimeout(function(){ box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + time)); } else { setTimeout(function(){ box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3); }, (100 + time)); } })(rows, prevCol, timeBuff, i, totalBoxes); i++; } prevCol--; } timeBuff += 100; } } }; // Shuffle an array var shuffle = function(arr){ for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i, 10), x = arr[--i], arr[i] = arr[j], arr[j] = x); return arr; }; // For debugging var trace = function(msg){ if(this.console && typeof console.log !== 'undefined') { console.log(msg); } }; // Start / Stop this.stop = function(){ if(!$(element).data('nivo:vars').stop){ $(element).data('nivo:vars').stop = true; trace('Stop Slider'); } }; this.start = function(){ if($(element).data('nivo:vars').stop){ $(element).data('nivo:vars').stop = false; trace('Start Slider'); } }; // Trigger the afterLoad callback settings.afterLoad.call(this); return this; }; $.fn.nivoSlider = function(options) { return this.each(function(key, value){ var element = $(this); // Return early if this element already has a plugin instance if (element.data('nivoslider')) { return element.data('nivoslider'); } // Pass options to plugin constructor var nivoslider = new NivoSlider(this, options); // Store plugin object in this element's data element.data('nivoslider', nivoslider); }); }; //Default settings $.fn.nivoSlider.defaults = { effect: 'random', slices: 15, boxCols: 8, boxRows: 4, animSpeed: 500, pauseTime: 5000, startSlide: 0, directionNav: true, controlNav: true, controlNavThumbs: false, pauseOnHover: true, manualAdvance: false, prevText: 'Prev', nextText: 'Next', randomStart: false, beforeChange: function(){}, afterChange: function(){}, slideshowEnd: function(){}, lastSlide: function(){}, afterLoad: function(){} }; $.fn._reverse = [].reverse; })(jQuery);
(function (app) { 'use strict'; app.registerModule('professions', ['core.admin', 'spells', 'ui.bootstrap']); })(ApplicationConfiguration);
// Flags: --expose-internals // Copyright Joyent, Inc. and other Node contributors. // // Permission is hereby granted, free of charge, to any person obtaining a // copy of this software and associated documentation files (the // "Software"), to deal in the Software without restriction, including // without limitation the rights to use, copy, modify, merge, publish, // distribute, sublicense, and/or sell copies of the Software, and to permit // persons to whom the Software is furnished to do so, subject to the // following conditions: // // The above copyright notice and this permission notice shall be included // in all copies or substantial portions of the Software. // // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS // OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN // NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, // DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR // OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE // USE OR OTHER DEALINGS IN THE SOFTWARE. 'use strict'; const common = require('../common'); const assert = require('assert'); const { inspect } = require('util'); const vm = require('vm'); const { internalBinding } = require('internal/test/binding'); const a = assert; // Disable colored output to prevent color codes from breaking assertion // message comparisons. This should only be an issue when process.stdout // is a TTY. if (process.stdout.isTTY) process.env.NODE_DISABLE_COLORS = '1'; const strictEqualMessageStart = 'Expected values to be strictly equal:\n'; const start = 'Expected values to be strictly deep-equal:'; const actExp = '+ actual - expected'; assert.ok(a.AssertionError.prototype instanceof Error, 'a.AssertionError instanceof Error'); assert.throws(() => a(false), a.AssertionError, 'ok(false)'); assert.throws(() => a.ok(false), a.AssertionError, 'ok(false)'); // Throw message if the message is instanceof Error. { let threw = false; try { assert.ok(false, new Error('ok(false)')); } catch (e) { threw = true; assert.ok(e instanceof Error); } assert.ok(threw, 'Error: ok(false)'); } a(true); a('test', 'ok(\'test\')'); a.ok(true); a.ok('test'); assert.throws(() => a.equal(true, false), a.AssertionError, 'equal(true, false)'); a.equal(null, null); a.equal(undefined, undefined); a.equal(null, undefined); a.equal(true, true); a.equal(2, '2'); a.notEqual(true, false); assert.throws(() => a.notEqual(true, true), a.AssertionError, 'notEqual(true, true)'); assert.throws(() => a.strictEqual(2, '2'), a.AssertionError, 'strictEqual(2, \'2\')'); /* eslint-disable no-restricted-syntax */ assert.throws(() => a.strictEqual(null, undefined), a.AssertionError, 'strictEqual(null, undefined)'); assert.throws( () => a.notStrictEqual(2, 2), { message: 'Expected "actual" to be strictly unequal to: 2', name: 'AssertionError' } ); assert.throws( () => a.notStrictEqual('a '.repeat(30), 'a '.repeat(30)), { message: 'Expected "actual" to be strictly unequal to:\n\n' + `'${'a '.repeat(30)}'`, name: 'AssertionError' } ); assert.throws( () => a.notEqual(1, 1), { message: '1 != 1', operator: '!=' } ); a.notStrictEqual(2, '2'); // Testing the throwing. function thrower(errorConstructor) { throw new errorConstructor({}); } // The basic calls work. assert.throws(() => thrower(a.AssertionError), a.AssertionError, 'message'); assert.throws(() => thrower(a.AssertionError), a.AssertionError); assert.throws(() => thrower(a.AssertionError)); // If not passing an error, catch all. assert.throws(() => thrower(TypeError)); // When passing a type, only catch errors of the appropriate type. assert.throws( () => a.throws(() => thrower(TypeError), a.AssertionError), { generatedMessage: true, actual: new TypeError({}), expected: a.AssertionError, code: 'ERR_ASSERTION', name: 'AssertionError', operator: 'throws', message: 'The error is expected to be an instance of "AssertionError". ' + 'Received "TypeError"\n\nError message:\n\n[object Object]' } ); // doesNotThrow should pass through all errors. { let threw = false; try { a.doesNotThrow(() => thrower(TypeError), a.AssertionError); } catch (e) { threw = true; assert.ok(e instanceof TypeError); } assert(threw, 'a.doesNotThrow with an explicit error is eating extra errors'); } // Key difference is that throwing our correct error makes an assertion error. { let threw = false; try { a.doesNotThrow(() => thrower(TypeError), TypeError); } catch (e) { threw = true; assert.ok(e instanceof a.AssertionError); assert.ok(!e.stack.includes('at Function.doesNotThrow')); } assert.ok(threw, 'a.doesNotThrow is not catching type matching errors'); } assert.throws( () => a.doesNotThrow(() => thrower(Error), 'user message'), { name: 'AssertionError', code: 'ERR_ASSERTION', operator: 'doesNotThrow', message: 'Got unwanted exception: user message\n' + 'Actual message: "[object Object]"' } ); assert.throws( () => a.doesNotThrow(() => thrower(Error)), { code: 'ERR_ASSERTION', message: 'Got unwanted exception.\nActual message: "[object Object]"' } ); assert.throws( () => a.doesNotThrow(() => thrower(Error), /\[[a-z]{6}\s[A-z]{6}\]/g, 'user message'), { name: 'AssertionError', code: 'ERR_ASSERTION', operator: 'doesNotThrow', message: 'Got unwanted exception: user message\n' + 'Actual message: "[object Object]"' } ); // Make sure that validating using constructor really works. { let threw = false; try { assert.throws( () => { throw ({}); // eslint-disable-line no-throw-literal }, Array ); } catch { threw = true; } assert.ok(threw, 'wrong constructor validation'); } // Use a RegExp to validate the error message. { a.throws(() => thrower(TypeError), /\[object Object\]/); const symbol = Symbol('foo'); a.throws(() => { throw symbol; }, /foo/); a.throws(() => { a.throws(() => { throw symbol; }, /abc/); }, { message: 'The input did not match the regular expression /abc/. ' + "Input:\n\n'Symbol(foo)'\n", code: 'ERR_ASSERTION', operator: 'throws', actual: symbol, expected: /abc/ }); } // Use a fn to validate the error object. a.throws(() => thrower(TypeError), (err) => { if ((err instanceof TypeError) && /\[object Object\]/.test(err)) { return true; } }); // https://github.com/nodejs/node/issues/3188 { let actual; assert.throws( () => { const ES6Error = class extends Error {}; const AnotherErrorType = class extends Error {}; assert.throws(() => { actual = new AnotherErrorType('foo'); throw actual; }, ES6Error); }, (err) => { assert.strictEqual( err.message, 'The error is expected to be an instance of "ES6Error". ' + 'Received "AnotherErrorType"\n\nError message:\n\nfoo' ); assert.strictEqual(err.actual, actual); return true; } ); } // Check messages from assert.throws(). { const noop = () => {}; assert.throws( () => { a.throws((noop)); }, { code: 'ERR_ASSERTION', message: 'Missing expected exception.', operator: 'throws', actual: undefined, expected: undefined }); assert.throws( () => { a.throws(noop, TypeError); }, { code: 'ERR_ASSERTION', message: 'Missing expected exception (TypeError).', actual: undefined, expected: TypeError }); assert.throws( () => { a.throws(noop, 'fhqwhgads'); }, { code: 'ERR_ASSERTION', message: 'Missing expected exception: fhqwhgads', actual: undefined, expected: undefined }); assert.throws( () => { a.throws(noop, TypeError, 'fhqwhgads'); }, { code: 'ERR_ASSERTION', message: 'Missing expected exception (TypeError): fhqwhgads', actual: undefined, expected: TypeError }); let threw = false; try { a.throws(noop); } catch (e) { threw = true; assert.ok(e instanceof a.AssertionError); assert.ok(!e.stack.includes('at Function.throws')); } assert.ok(threw); } const circular = { y: 1 }; circular.x = circular; function testAssertionMessage(actual, expected, msg) { assert.throws( () => assert.strictEqual(actual, ''), { generatedMessage: true, message: msg || strictEqualMessageStart + `+ actual - expected\n\n+ ${expected}\n- ''` } ); } function testShortAssertionMessage(actual, expected) { testAssertionMessage(actual, expected, strictEqualMessageStart + `\n${inspect(actual)} !== ''\n`); } testShortAssertionMessage(null, 'null'); testShortAssertionMessage(true, 'true'); testShortAssertionMessage(false, 'false'); testShortAssertionMessage(100, '100'); testShortAssertionMessage(NaN, 'NaN'); testShortAssertionMessage(Infinity, 'Infinity'); testShortAssertionMessage('a', '"a"'); testShortAssertionMessage('foo', '\'foo\''); testShortAssertionMessage(0, '0'); testShortAssertionMessage(Symbol(), 'Symbol()'); testShortAssertionMessage(undefined, 'undefined'); testShortAssertionMessage(-Infinity, '-Infinity'); testAssertionMessage([], '[]'); testAssertionMessage(/a/, '/a/'); testAssertionMessage(/abc/gim, '/abc/gim'); testAssertionMessage({}, '{}'); testAssertionMessage([1, 2, 3], '[\n+ 1,\n+ 2,\n+ 3\n+ ]'); testAssertionMessage(function f() {}, '[Function: f]'); testAssertionMessage(function() {}, '[Function (anonymous)]'); testAssertionMessage(circular, '<ref *1> {\n+ x: [Circular *1],\n+ y: 1\n+ }'); testAssertionMessage({ a: undefined, b: null }, '{\n+ a: undefined,\n+ b: null\n+ }'); testAssertionMessage({ a: NaN, b: Infinity, c: -Infinity }, '{\n+ a: NaN,\n+ b: Infinity,\n+ c: -Infinity\n+ }'); // https://github.com/nodejs/node-v0.x-archive/issues/5292 assert.throws( () => assert.strictEqual(1, 2), { message: `${strictEqualMessageStart}\n1 !== 2\n`, generatedMessage: true } ); assert.throws( () => assert.strictEqual(1, 2, 'oh no'), { message: 'oh no', generatedMessage: false } ); { let threw = false; const rangeError = new RangeError('my range'); // Verify custom errors. try { assert.strictEqual(1, 2, rangeError); } catch (e) { assert.strictEqual(e, rangeError); threw = true; assert.ok(e instanceof RangeError, 'Incorrect error type thrown'); } assert.ok(threw); threw = false; // Verify AssertionError is the result from doesNotThrow with custom Error. try { a.doesNotThrow(() => { throw new TypeError('wrong type'); }, TypeError, rangeError); } catch (e) { threw = true; assert.ok(e.message.includes(rangeError.message)); assert.ok(e instanceof assert.AssertionError); assert.ok(!e.stack.includes('doesNotThrow'), e); } assert.ok(threw); } { // Verify that throws() and doesNotThrow() throw on non-functions. const testBlockTypeError = (method, fn) => { assert.throws( () => method(fn), { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', message: 'The "fn" argument must be of type function.' + common.invalidArgTypeHelper(fn) } ); }; testBlockTypeError(assert.throws, 'string'); testBlockTypeError(assert.doesNotThrow, 'string'); testBlockTypeError(assert.throws, 1); testBlockTypeError(assert.doesNotThrow, 1); testBlockTypeError(assert.throws, true); testBlockTypeError(assert.doesNotThrow, true); testBlockTypeError(assert.throws, false); testBlockTypeError(assert.doesNotThrow, false); testBlockTypeError(assert.throws, []); testBlockTypeError(assert.doesNotThrow, []); testBlockTypeError(assert.throws, {}); testBlockTypeError(assert.doesNotThrow, {}); testBlockTypeError(assert.throws, /foo/); testBlockTypeError(assert.doesNotThrow, /foo/); testBlockTypeError(assert.throws, null); testBlockTypeError(assert.doesNotThrow, null); testBlockTypeError(assert.throws, undefined); testBlockTypeError(assert.doesNotThrow, undefined); } // https://github.com/nodejs/node/issues/3275 // eslint-disable-next-line no-throw-literal assert.throws(() => { throw 'error'; }, (err) => err === 'error'); assert.throws(() => { throw new Error(); }, (err) => err instanceof Error); // Long values should be truncated for display. assert.throws(() => { assert.strictEqual('A'.repeat(1000), ''); }, (err) => { assert.strictEqual(err.code, 'ERR_ASSERTION'); assert.strictEqual(err.message, `${strictEqualMessageStart}+ actual - expected\n\n` + `+ '${'A'.repeat(1000)}'\n- ''`); assert.strictEqual(err.actual.length, 1000); assert.ok(inspect(err).includes(`actual: '${'A'.repeat(488)}...'`)); return true; }); // Output that extends beyond 10 lines should also be truncated for display. { const multilineString = 'fhqwhgads\n'.repeat(15); assert.throws(() => { assert.strictEqual(multilineString, ''); }, (err) => { assert.strictEqual(err.code, 'ERR_ASSERTION'); assert.strictEqual(err.message.split('\n').length, 19); assert.strictEqual(err.actual.split('\n').length, 16); assert.ok(inspect(err).includes( "actual: 'fhqwhgads\\n' +\n" + " 'fhqwhgads\\n' +\n".repeat(9) + " '...'")); return true; }); } { // Bad args to AssertionError constructor should throw TypeError. const args = [1, true, false, '', null, Infinity, Symbol('test'), undefined]; args.forEach((input) => { assert.throws( () => new assert.AssertionError(input), { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', message: 'The "options" argument must be of type object.' + common.invalidArgTypeHelper(input) }); }); } assert.throws( () => assert.strictEqual(new Error('foo'), new Error('foobar')), { code: 'ERR_ASSERTION', name: 'AssertionError', message: 'Expected "actual" to be reference-equal to "expected":\n' + '+ actual - expected\n\n' + '+ [Error: foo]\n- [Error: foobar]' } ); a.equal(NaN, NaN); a.throws( () => a.notEqual(NaN, NaN), a.AssertionError ); // Test strict assert. { const a = require('assert'); const assert = require('assert').strict; /* eslint-disable no-restricted-properties */ assert.throws(() => assert.equal(1, true), assert.AssertionError); assert.notEqual(0, false); assert.throws(() => assert.deepEqual(1, true), assert.AssertionError); assert.notDeepEqual(0, false); assert.equal(assert.strict, assert.strict.strict); assert.equal(assert.equal, assert.strictEqual); assert.equal(assert.deepEqual, assert.deepStrictEqual); assert.equal(assert.notEqual, assert.notStrictEqual); assert.equal(assert.notDeepEqual, assert.notDeepStrictEqual); assert.equal(Object.keys(assert).length, Object.keys(a).length); assert(7); assert.throws( () => assert(...[]), { message: 'No value argument passed to `assert.ok()`', name: 'AssertionError', generatedMessage: true } ); assert.throws( () => a(), { message: 'No value argument passed to `assert.ok()`', name: 'AssertionError' } ); // Test setting the limit to zero and that assert.strict works properly. const tmpLimit = Error.stackTraceLimit; Error.stackTraceLimit = 0; assert.throws( () => { assert.ok( typeof 123 === 'string' ); }, { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n ' + "assert.ok(\n typeof 123 === 'string'\n )\n" } ); Error.stackTraceLimit = tmpLimit; // Test error diffs. let message = [ start, `${actExp} ... Lines skipped`, '', ' [', ' [', ' [', ' 1,', ' 2,', '+ 3', "- '3'", ' ]', '...', ' 4,', ' 5', ' ]'].join('\n'); assert.throws( () => assert.deepEqual([[[1, 2, 3]], 4, 5], [[[1, 2, '3']], 4, 5]), { message }); message = [ start, `${actExp} ... Lines skipped`, '', ' [', ' 1,', '...', ' 1,', ' 0,', '- 1,', ' 1,', '...', ' 1,', ' 1', ' ]' ].join('\n'); assert.throws( () => assert.deepEqual( [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1]), { message }); message = [ start, `${actExp} ... Lines skipped`, '', ' [', ' 1,', '...', ' 1,', ' 0,', '+ 1,', ' 1,', ' 1,', ' 1', ' ]' ].join('\n'); assert.throws( () => assert.deepEqual( [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1]), { message }); message = [ start, actExp, '', ' [', ' 1,', '+ 2,', '- 1,', ' 1,', ' 1,', ' 0,', '+ 1,', ' 1', ' ]' ].join('\n'); assert.throws( () => assert.deepEqual( [1, 2, 1, 1, 0, 1, 1], [1, 1, 1, 1, 0, 1]), { message }); message = [ start, actExp, '', '+ [', '+ 1,', '+ 2,', '+ 1', '+ ]', '- undefined', ].join('\n'); assert.throws( () => assert.deepEqual([1, 2, 1], undefined), { message }); message = [ start, actExp, '', ' [', '+ 1,', ' 2,', ' 1', ' ]' ].join('\n'); assert.throws( () => assert.deepEqual([1, 2, 1], [2, 1]), { message }); message = `${start}\n` + `${actExp} ... Lines skipped\n` + '\n' + ' [\n' + '+ 1,\n'.repeat(25) + '...\n' + '- 2,\n'.repeat(25) + '...'; assert.throws( () => assert.deepEqual(Array(28).fill(1), Array(28).fill(2)), { message }); const obj1 = {}; const obj2 = { loop: 'forever' }; obj2[inspect.custom] = () => '{}'; // No infinite loop and no custom inspect. assert.throws(() => assert.deepEqual(obj1, obj2), { message: `${start}\n` + `${actExp}\n` + '\n' + '+ {}\n' + '- {\n' + '- [Symbol(nodejs.util.inspect.custom)]: [Function (anonymous)],\n' + "- loop: 'forever'\n" + '- }' }); // notDeepEqual tests assert.throws( () => assert.notDeepEqual([1], [1]), { message: 'Expected "actual" not to be strictly deep-equal to:\n\n' + '[\n 1\n]\n' } ); message = 'Expected "actual" not to be strictly deep-equal to:' + `\n\n[${'\n 1,'.repeat(45)}\n...\n`; const data = Array(51).fill(1); assert.throws( () => assert.notDeepEqual(data, data), { message }); /* eslint-enable no-restricted-properties */ } assert.throws( () => assert.ok(null), { code: 'ERR_ASSERTION', constructor: assert.AssertionError, generatedMessage: true, message: 'The expression evaluated to a falsy value:\n\n ' + 'assert.ok(null)\n' } ); assert.throws( () => assert(typeof 123n === 'string'), { code: 'ERR_ASSERTION', constructor: assert.AssertionError, generatedMessage: true, message: 'The expression evaluated to a falsy value:\n\n ' + "assert(typeof 123n === 'string')\n" } ); assert.throws( () => assert(false, Symbol('foo')), { code: 'ERR_ASSERTION', constructor: assert.AssertionError, generatedMessage: false, message: 'Symbol(foo)' } ); { // Test caching. const fs = internalBinding('fs'); const tmp = fs.close; fs.close = common.mustCall(tmp, 1); function throwErr() { assert( (Buffer.from('test') instanceof Error) ); } assert.throws( () => throwErr(), { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n ' + "assert(\n (Buffer.from('test') instanceof Error)\n )\n" } ); assert.throws( () => throwErr(), { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n ' + "assert(\n (Buffer.from('test') instanceof Error)\n )\n" } ); fs.close = tmp; } assert.throws( () => { a( (() => 'string')() // eslint-disable-next-line operator-linebreak === 123 instanceof Buffer ); }, { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n' + ' a(\n' + ' (() => \'string\')()\n' + ' // eslint-disable-next-line operator-linebreak\n' + ' ===\n' + ' 123 instanceof\n' + ' Buffer\n' + ' )\n' } ); assert.throws( () => { a( (() => 'string')() // eslint-disable-next-line operator-linebreak === 123 instanceof Buffer ); }, { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n' + ' a(\n' + ' (() => \'string\')()\n' + ' // eslint-disable-next-line operator-linebreak\n' + ' ===\n' + ' 123 instanceof\n' + ' Buffer\n' + ' )\n' } ); /* eslint-disable indent */ assert.throws(() => { a(( () => 'string')() === 123 instanceof Buffer ); }, { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n' + ' a((\n' + ' () => \'string\')() ===\n' + ' 123 instanceof\n' + ' Buffer\n' + ' )\n' } ); /* eslint-enable indent */ assert.throws( () => { assert(true); assert(null, undefined); }, { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n ' + 'assert(null, undefined)\n' } ); assert.throws( () => { assert .ok(null, undefined); }, { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n ' + 'ok(null, undefined)\n' } ); assert.throws( // eslint-disable-next-line dot-notation, quotes () => assert['ok']["apply"](null, [0]), { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n ' + 'assert[\'ok\']["apply"](null, [0])\n' } ); assert.throws( () => { const wrapper = (fn, value) => fn(value); wrapper(assert, false); }, { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n fn(value)\n' } ); assert.throws( () => assert.ok.call(null, 0), { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n ' + 'assert.ok.call(null, 0)\n', generatedMessage: true } ); assert.throws( () => assert.ok.call(null, 0, 'test'), { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'test', generatedMessage: false } ); // Works in eval. assert.throws( () => new Function('assert', 'assert(1 === 2);')(assert), { code: 'ERR_ASSERTION', constructor: assert.AssertionError, message: 'The expression evaluated to a falsy value:\n\n assert(1 === 2)\n' } ); assert.throws( () => eval('console.log("FOO");\nassert.ok(1 === 2);'), { code: 'ERR_ASSERTION', message: 'false == true' } ); assert.throws( () => assert.throws(() => {}, 'Error message', 'message'), { code: 'ERR_INVALID_ARG_TYPE', name: 'TypeError', message: 'The "error" argument must be of type function or ' + 'an instance of Error, RegExp, or Object. Received type string ' + "('Error message')" } ); [ 1, false, Symbol() ].forEach((input) => { assert.throws( () => assert.throws(() => {}, input), { code: 'ERR_INVALID_ARG_TYPE', message: 'The "error" argument must be of type function or ' + 'an instance of Error, RegExp, or Object.' + common.invalidArgTypeHelper(input) } ); }); { assert.throws(() => { assert.ok((() => Boolean('' === false))()); }, { message: 'The expression evaluated to a falsy value:\n\n' + " assert.ok((() => Boolean('\\u0001' === false))())\n" }); const errFn = () => { const err = new TypeError('Wrong value'); err.code = 404; throw err; }; const errObj = { name: 'TypeError', message: 'Wrong value' }; assert.throws(errFn, errObj); errObj.code = 404; assert.throws(errFn, errObj); // Fail in case a expected property is undefined and not existent on the // error. errObj.foo = undefined; assert.throws( () => assert.throws(errFn, errObj), { code: 'ERR_ASSERTION', name: 'AssertionError', message: `${start}\n${actExp}\n\n` + ' Comparison {\n' + ' code: 404,\n' + '- foo: undefined,\n' + " message: 'Wrong value',\n" + " name: 'TypeError'\n" + ' }' } ); // Show multiple wrong properties at the same time. errObj.code = '404'; assert.throws( () => assert.throws(errFn, errObj), { code: 'ERR_ASSERTION', name: 'AssertionError', message: `${start}\n${actExp}\n\n` + ' Comparison {\n' + '+ code: 404,\n' + "- code: '404',\n" + '- foo: undefined,\n' + " message: 'Wrong value',\n" + " name: 'TypeError'\n" + ' }' } ); assert.throws( () => assert.throws(() => { throw new Error(); }, { foo: 'bar' }, 'foobar'), { constructor: assert.AssertionError, code: 'ERR_ASSERTION', message: 'foobar' } ); assert.throws( () => a.doesNotThrow(() => { throw new Error(); }, { foo: 'bar' }), { name: 'TypeError', code: 'ERR_INVALID_ARG_TYPE', message: 'The "expected" argument must be of type function or an ' + 'instance of RegExp. Received an instance of Object' } ); assert.throws(() => { throw new Error('e'); }, new Error('e')); assert.throws( () => assert.throws(() => { throw new TypeError('e'); }, new Error('e')), { name: 'AssertionError', code: 'ERR_ASSERTION', message: `${start}\n${actExp}\n\n` + ' Comparison {\n' + " message: 'e',\n" + "+ name: 'TypeError'\n" + "- name: 'Error'\n" + ' }' } ); assert.throws( () => assert.throws(() => { throw new Error('foo'); }, new Error('')), { name: 'AssertionError', code: 'ERR_ASSERTION', generatedMessage: true, message: `${start}\n${actExp}\n\n` + ' Comparison {\n' + "+ message: 'foo',\n" + "- message: '',\n" + " name: 'Error'\n" + ' }' } ); // eslint-disable-next-line no-throw-literal assert.throws(() => { throw undefined; }, /undefined/); assert.throws( // eslint-disable-next-line no-throw-literal () => a.doesNotThrow(() => { throw undefined; }), { name: 'AssertionError', code: 'ERR_ASSERTION', message: 'Got unwanted exception.\nActual message: "undefined"' } ); } assert.throws( () => assert.throws(() => { throw new Error(); }, {}), { message: "The argument 'error' may not be an empty object. Received {}", code: 'ERR_INVALID_ARG_VALUE' } ); assert.throws( () => a.throws( // eslint-disable-next-line no-throw-literal () => { throw 'foo'; }, 'foo' ), { code: 'ERR_AMBIGUOUS_ARGUMENT', message: 'The "error/message" argument is ambiguous. ' + 'The error "foo" is identical to the message.' } ); assert.throws( () => a.throws( () => { throw new TypeError('foo'); }, 'foo' ), { code: 'ERR_AMBIGUOUS_ARGUMENT', message: 'The "error/message" argument is ambiguous. ' + 'The error message "foo" is identical to the message.' } ); /* eslint-enable no-restricted-syntax */ // Should not throw. // eslint-disable-next-line no-restricted-syntax, no-throw-literal assert.throws(() => { throw null; }, 'foo'); assert.throws( () => assert.strictEqual([], []), { message: 'Values have same structure but are not reference-equal:\n\n[]\n' } ); { const args = (function() { return arguments; })('a'); assert.throws( () => assert.strictEqual(args, { 0: 'a' }), { message: 'Expected "actual" to be reference-equal to "expected":\n' + '+ actual - expected\n\n' + "+ [Arguments] {\n- {\n '0': 'a'\n }" } ); } assert.throws( () => { throw new TypeError('foobar'); }, { message: /foo/, name: /^TypeError$/ } ); assert.throws( () => assert.throws( () => { throw new TypeError('foobar'); }, { message: /fooa/, name: /^TypeError$/ } ), { message: `${start}\n${actExp}\n\n` + ' Comparison {\n' + "+ message: 'foobar',\n" + '- message: /fooa/,\n' + " name: 'TypeError'\n" + ' }' } ); { let actual = null; const expected = { message: 'foo' }; assert.throws( () => assert.throws( () => { throw actual; }, expected ), { operator: 'throws', actual, expected, generatedMessage: true, message: `${start}\n${actExp}\n\n` + '+ null\n' + '- {\n' + "- message: 'foo'\n" + '- }' } ); actual = 'foobar'; const message = 'message'; assert.throws( () => assert.throws( () => { throw actual; }, { message: 'foobar' }, message ), { actual, message, operator: 'throws', generatedMessage: false } ); } // Indicate where the strings diverge. assert.throws( () => assert.strictEqual('test test', 'test foobar'), { code: 'ERR_ASSERTION', name: 'AssertionError', message: strictEqualMessageStart + '+ actual - expected\n\n' + "+ 'test test'\n" + "- 'test foobar'\n" + ' ^' } ); // Check for reference-equal objects in `notStrictEqual()` assert.throws( () => { const obj = {}; assert.notStrictEqual(obj, obj); }, { code: 'ERR_ASSERTION', name: 'AssertionError', message: 'Expected "actual" not to be reference-equal to "expected": {}' } ); assert.throws( () => { const obj = { a: true }; assert.notStrictEqual(obj, obj); }, { code: 'ERR_ASSERTION', name: 'AssertionError', message: 'Expected "actual" not to be reference-equal to "expected":\n\n' + '{\n a: true\n}\n' } ); { let threw = false; try { assert.deepStrictEqual(Array(100).fill(1), 'foobar'); } catch (err) { threw = true; assert(/actual: \[Array],\n expected: 'foobar',/.test(inspect(err))); } assert(threw); } assert.throws( () => a.equal(1), { code: 'ERR_MISSING_ARGS' } ); assert.throws( () => a.deepEqual(/a/), { code: 'ERR_MISSING_ARGS' } ); assert.throws( () => a.notEqual(null), { code: 'ERR_MISSING_ARGS' } ); assert.throws( () => a.notDeepEqual('test'), { code: 'ERR_MISSING_ARGS' } ); assert.throws( () => a.strictEqual({}), { code: 'ERR_MISSING_ARGS' } ); assert.throws( () => a.deepStrictEqual(Symbol()), { code: 'ERR_MISSING_ARGS' } ); assert.throws( () => a.notStrictEqual(5n), { code: 'ERR_MISSING_ARGS' } ); assert.throws( () => a.notDeepStrictEqual(undefined), { code: 'ERR_MISSING_ARGS' } ); assert.throws( () => a.strictEqual(), { code: 'ERR_MISSING_ARGS' } ); assert.throws( () => a.deepStrictEqual(), { code: 'ERR_MISSING_ARGS' } ); // Verify that `stackStartFunction` works as alternative to `stackStartFn`. { (function hidden() { const err = new assert.AssertionError({ actual: 'foo', operator: 'strictEqual', stackStartFunction: hidden }); const err2 = new assert.AssertionError({ actual: 'foo', operator: 'strictEqual', stackStartFn: hidden }); assert(!err.stack.includes('hidden')); assert(!err2.stack.includes('hidden')); })(); } assert.throws( () => assert.throws(() => { throw Symbol('foo'); }, RangeError), { message: 'The error is expected to be an instance of "RangeError". ' + 'Received "Symbol(foo)"' } ); assert.throws( // eslint-disable-next-line no-throw-literal () => assert.throws(() => { throw [1, 2]; }, RangeError), { message: 'The error is expected to be an instance of "RangeError". ' + 'Received "[Array]"' } ); { const err = new TypeError('foo'); const validate = (() => () => ({ a: true, b: [ 1, 2, 3 ] }))(); assert.throws( () => assert.throws(() => { throw err; }, validate), { message: 'The validation function is expected to ' + `return "true". Received ${inspect(validate())}\n\nCaught ` + `error:\n\n${err}`, code: 'ERR_ASSERTION', actual: err, expected: validate, name: 'AssertionError', operator: 'throws', } ); } assert.throws( () => { const script = new vm.Script('new RangeError("foobar");'); const context = vm.createContext(); const err = script.runInContext(context); assert.throws(() => { throw err; }, RangeError); }, { message: 'The error is expected to be an instance of "RangeError". ' + 'Received an error with identical name but a different ' + 'prototype.\n\nError message:\n\nfoobar' } ); // Multiple assert.match() tests. { assert.throws( () => assert.match(/abc/, 'string'), { code: 'ERR_INVALID_ARG_TYPE', message: 'The "regexp" argument must be an instance of RegExp. ' + "Received type string ('string')" } ); assert.throws( () => assert.match('string', /abc/), { actual: 'string', expected: /abc/, operator: 'match', message: 'The input did not match the regular expression /abc/. ' + "Input:\n\n'string'\n", generatedMessage: true } ); assert.throws( () => assert.match('string', /abc/, 'foobar'), { actual: 'string', expected: /abc/, operator: 'match', message: 'foobar', generatedMessage: false } ); const errorMessage = new RangeError('foobar'); assert.throws( () => assert.match('string', /abc/, errorMessage), errorMessage ); assert.throws( () => assert.match({ abc: 123 }, /abc/), { actual: { abc: 123 }, expected: /abc/, operator: 'match', message: 'The "string" argument must be of type string. ' + 'Received type object ({ abc: 123 })', generatedMessage: true } ); assert.match('I will pass', /pass$/); } // Multiple assert.doesNotMatch() tests. { assert.throws( () => assert.doesNotMatch(/abc/, 'string'), { code: 'ERR_INVALID_ARG_TYPE', message: 'The "regexp" argument must be an instance of RegExp. ' + "Received type string ('string')" } ); assert.throws( () => assert.doesNotMatch('string', /string/), { actual: 'string', expected: /string/, operator: 'doesNotMatch', message: 'The input was expected to not match the regular expression ' + "/string/. Input:\n\n'string'\n", generatedMessage: true } ); assert.throws( () => assert.doesNotMatch('string', /string/, 'foobar'), { actual: 'string', expected: /string/, operator: 'doesNotMatch', message: 'foobar', generatedMessage: false } ); const errorMessage = new RangeError('foobar'); assert.throws( () => assert.doesNotMatch('string', /string/, errorMessage), errorMessage ); assert.throws( () => assert.doesNotMatch({ abc: 123 }, /abc/), { actual: { abc: 123 }, expected: /abc/, operator: 'doesNotMatch', message: 'The "string" argument must be of type string. ' + 'Received type object ({ abc: 123 })', generatedMessage: true } ); assert.doesNotMatch('I will pass', /different$/); } { const tempColor = inspect.defaultOptions.colors; assert.throws(() => { inspect.defaultOptions.colors = true; // Guarantee the position indicator is placed correctly. assert.strictEqual(111554n, 11111115); }, (err) => { assert.strictEqual(inspect(err).split('\n')[5], ' ^'); inspect.defaultOptions.colors = tempColor; return true; }); }
'use strict' const fs = require('fs') const path = require('path') /** * mkdirp recursively creates needed folders for the given dir path * @param {string} dir * @returns {string} The path that was created */ module.exports.mkdirp = (dir) => { return path .resolve(dir) .split(path.sep) .reduce((acc, cur) => { const currentPath = path.normalize(acc + path.sep + cur) try { fs.statSync(currentPath) } catch (e) { if (e.code === 'ENOENT') { fs.mkdirSync(currentPath) } else { throw e } } return currentPath }, '') }
import React from 'react' import Icon from 'react-icon-base' const IoSocialWindowsOutline = props => ( <Icon viewBox="0 0 40 40" {...props}> <g><path d="m33.8 22h-16.9v11.6l16.9 2.5v-14.1z m1.2-1.3v16.8l-19.4-2.8v-14h19.4z m-21.9 1.3h-11.8v9.3l11.8 1.7v-11z m1.3-1.3v13.8l-14.4-2.1v-11.7h14.4z m19.4-16.8l-16.9 2.4v11.9h16.9v-14.3z m1.2-1.4v17h-19.4v-14.3z m-21.9 4.4l-11.8 1.7v9.6h11.8v-11.3z m1.3-1.4v14h-14.4v-12z"/></g> </Icon> ) export default IoSocialWindowsOutline
/*global Autolinker, _, describe, beforeEach, afterEach, it, expect, jasmine */ describe( "Autolinker.matcher.Mention", function() { var MatchChecker = Autolinker.match.MatchChecker, matcher; beforeEach( function() { matcher = new Autolinker.matcher.Mention( { tagBuilder : new Autolinker.AnchorTagBuilder(), serviceName: 'twitter' } ); } ); describe( 'parseMatches()', function() { it( 'should return an empty array if there are no matches for usernames', function() { expect( matcher.parseMatches( '' ) ).toEqual( [] ); expect( matcher.parseMatches( 'asdf' ) ).toEqual( [] ); expect( matcher.parseMatches( 'asdf@asdf.com' ) ).toEqual( [] ); // an email address is not a username expect( matcher.parseMatches( 'stuff@asdf' ) ).toEqual( [] ); // using an '@' symbol as part of a word is not a username } ); it( 'should return an array of a single username match when the string is the username itself', function() { var matches = matcher.parseMatches( '@asdf' ); expect( matches.length ).toBe( 1 ); MatchChecker.expectMentionMatch( matches[ 0 ], 'twitter', 'asdf', 0 ); } ); it( 'should return an array of a single username match when the username is in the middle of the string', function() { var matches = matcher.parseMatches( 'Hello @asdf my good friend' ); expect( matches.length ).toBe( 1 ); MatchChecker.expectMentionMatch( matches[ 0 ], 'twitter', 'asdf', 6 ); } ); it( 'should return an array of a single username match when the username is at the end of the string', function() { var matches = matcher.parseMatches( 'Hello @asdf' ); expect( matches.length ).toBe( 1 ); MatchChecker.expectMentionMatch( matches[ 0 ], 'twitter', 'asdf', 6 ); } ); it( 'should return an array of multiple usernames when there are more than one within the string', function() { var matches = matcher.parseMatches( 'Talk to @asdf or @fdsa' ); expect( matches.length ).toBe( 2 ); MatchChecker.expectMentionMatch( matches[ 0 ], 'twitter', 'asdf', 8 ); MatchChecker.expectMentionMatch( matches[ 1 ], 'twitter', 'fdsa', 17 ); } ); it( 'a match within parenthesis should be parsed correctly', function() { var matches = matcher.parseMatches( 'Hello (@asdf)' ); expect( matches.length ).toBe( 1 ); MatchChecker.expectMentionMatch( matches[ 0 ], 'twitter', 'asdf', 7 ); } ); it( 'an Instagram username with period not at boundaries should be parsed correctly', function() { var instagramMatcher = new Autolinker.matcher.Mention( { tagBuilder : new Autolinker.AnchorTagBuilder(), serviceName: 'instagram' } ); var matches = instagramMatcher.parseMatches( 'Hello (@as.df)' ); expect( matches.length ).toBe( 1 ); MatchChecker.expectMentionMatch( matches[ 0 ], 'instagram', 'as.df', 7 ); } ); it( 'an Instagram username with period at end of string should ignore period', function() { var instagramMatcher = new Autolinker.matcher.Mention( { tagBuilder : new Autolinker.AnchorTagBuilder(), serviceName: 'instagram' } ); var matches = instagramMatcher.parseMatches( 'Hello (@asdf.)' ); expect( matches.length ).toBe( 1 ); MatchChecker.expectMentionMatch( matches[ 0 ], 'instagram', 'asdf', 7 ); } ); } ); } );
import React from 'react'; import { withState } from 'recompose'; import styled from 'styled-components'; import MenuWrapper from './MenuWrapper'; import Layer from './Layer'; import { play as Play, pause as Pause } from './Icons'; import { mergePixels, debounce } from '../utils'; class Debounce extends React.Component { update = debounce(() => this.forceUpdate(), this.props.delay); componentDidMount() { this.forceUpdate(); } componentWillReceiveProps() { this.update(); } shouldComponentUpdate() { return false; } render() { return this.props.children(); } } const PreviewImage = styled.img` width: ${({ width }) => width}; height: ${({ height }) => height}; margin: auto; background-color: #fff; image-rendering: pixelated; transform: translateZ(0); border-radius: 4px; `; class Preview extends React.Component { state = { paused: true, frame: 0, fps: 2, from: 0, to: Infinity }; tick = () => { this.timer = setTimeout(() => { if (!this.state.paused) this.setState({ frame: this.state.frame + 1 }); this.tick(); }, 1000 / this.state.fps); }; setPaused = paused => this.setState({ paused }); setFPS = fps => this.setState({ fps }); setFrame = frame => this.setState({ frame }); componentDidMount() { this.tick(); } componentWillUnmount() { clearTimeout(this.timer); } render() { const { setFPS, setFrame, setPaused } = this; const { sources, width, height, children, style } = this.props; const { paused, fps } = this.state; const index = this.state.frame % sources.length; return ( <div style={style}> <PreviewImage src={sources[index]} width={width} height={height} style={{ display: 'block', margin: '0 auto' }} onClick={() => setPaused(!paused)} /> {React.Children.map(children, x => React.cloneElement(x, { index, sources, fps, paused, setFPS, setFrame, setPaused }) )} </div> ); } } const PreviewControls = ({ index, sources, fps, paused, setFPS, setFrame, setPaused }) => ( <div> <div style={{ display: 'flex', alignItems: 'center', justifyContent: 'center', padding: 16 }} > {sources.map((uri, i) => { return ( <Debounce key={i} delay={50}> {() => ( <div style={{ opacity: index === i ? 1 : 0.5 }} > <PreviewImage width="32px" height="32px" src={uri} onClick={() => setFrame(i)} /> </div> )} </Debounce> ); })} </div> <div style={{ position: 'absolute', top: 28, left: 24, width: 64, fontSize: 36, textAlign: 'center' }} > {paused && ( <button onClick={() => setPaused(false)} style={{ outline: 'none', background: 'none', border: 'none ' }} > <Play height={48} width={48} color="#fff" /> </button> )} {!paused && ( <button onClick={() => setPaused(true)} style={{ outline: 'none', background: 'none', border: 'none ' }} > <Pause height={48} width={48} color="#fff" /> </button> )} </div> <div style={{ position: 'absolute', top: 24, right: 24, width: 64, fontSize: 36, textAlign: 'center' }} > <div> {fps} <span style={{ fontSize: 18 }}>fps</span> </div> <div style={{ display: 'flex', justifyContent: 'space-evenly' }}> <button style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', color: '#fff', margin: 0, width: 24, height: 24, border: '1px solid #fff', borderRadius: 24, background: 'none', outline: 'none' }} onClick={() => setFPS(fps >= 59 ? 60 : fps + 1)} > + </button> <button style={{ display: 'flex', justifyContent: 'center', alignItems: 'center', color: '#fff', margin: 0, width: 24, height: 24, border: '1px solid #fff', borderRadius: 24, background: 'none', outline: 'none' }} onClick={() => setFPS(fps <= 1 ? 0 : fps - 1)} > - </button> </div> </div> </div> ); export default ({ active, bottomMenuHeight, canvas, cursor, dataURIs, layers, undos, redos }) => { return ( <MenuWrapper active={active}> <Preview width="72px" height="72px" sources={dataURIs} style={{ paddingTop: 16 }} > <PreviewControls /> </Preview> </MenuWrapper> ); };
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const q = require("smartq"); const paths = require("../npmts.paths"); const plugins = require("./mod.plugins"); /** * removes the dist directory which will be entirely rebuild */ let removeDist = function () { plugins.beautylog.ora.text('cleaning dist folder'); return plugins.smartfile.fs.remove(paths.distDir); }; /** * remove old pages */ let removePages = function () { plugins.beautylog.ora.text('cleaning pages folder'); return plugins.smartfile.fs.remove(paths.pagesDir); }; exports.run = function (configArg) { plugins.beautylog.ora.text('cleaning up from previous builds...'); let done = q.defer(); removeDist() .then(removePages) .then(function () { plugins.beautylog.ok('Cleaned up from previous builds!'); done.resolve(configArg); }); return done.promise; };
/** * server-sent-event.module.dev.js * * @package ServerSentEventModule * @category Module * @version 1.0 * @author Ricky Hurtado <ricky@aelogica.com> */ // ServerSentEvent Namespace I.ServerSentEvent = {}; define([ 'server_sent_event_view', 'server_sent_event_controller', 'server_sent_event_router' ], function( ServerSentEventView, ServerSentEventController, ServerSentEventRouter ){ /** * Init ServerSentEvent properties */ I.ServerSentEvent.View = new ServerSentEventView; I.ServerSentEvent.Controller = new ServerSentEventController; I.ServerSentEvent.Router = new ServerSentEventRouter('server-sent-event'); /** * Init ServerSentEventModule class */ var ServerSentEventModule = Backbone.Module.extend( { /** * Initialize module */ initialize : function() { console.log('Backbone.Module.ServerSentEventModule has been initialized.'); } }); return ServerSentEventModule; });
// @flow type Point = { x: number, y: number } export function ps (p: Point) { return `${p.x} ${p.y}` }
// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * @name: S11.9.4_A2.4_T3; * @section: 11.9.4; * @assertion: First expression is evaluated first, and then second expression; * @description: Checking with undeclarated variables; */ //CHECK#1 try { x === (x = 1); $ERROR('#1.1: x === (x = 1) throw ReferenceError. Actual: ' + (x === (x = 1))); } catch (e) { if ((e instanceof ReferenceError) !== true) { $ERROR('#1.2: x === (x = 1) throw ReferenceError. Actual: ' + (e)); } } //CHECK#2 if (!((y = 1) === y)) { $ERROR('#2: (y = 1) === y'); }
// This function will be executed as soon as the page is loaded and is responsable for the main orchestration window.onload = function() { var controller = new Controller(); controller.bindElements(); controller.bindActions(); } // The controller... where all logic is controlled or delegated to other controllers. function Controller() { // The Data Binder. Where all our "models" are stored. We don't wanna touch the DOM, let the binder do the dirty job. var dataBinder = new DataBinder(); // Binding the relevent elements. This will make sure the view and our "models" are always in sync. Change one, // the other will reflect the change. We don't wanna interact with the DOM directly. this.bindElements = function() { dataBinder.bindById('user-name', 'value', 'user.name'); dataBinder.bindById('user-name-welcome', 'textContent', 'user.name'); dataBinder.bindById('user-age', 'value', 'user.age'); dataBinder.bindById('user-country', 'value', 'user.country'); // Setting a default name for our user model. dataBinder.set('user.name', 'Anonymous'); } // Let's bind all the user actions with some javascript functions this.bindActions = function() { var goButton = document.getElementById('go-button'); goButton.onclick = this.okButtonClicked; } // Called when ok button is clicked (this was binded in the bindActions function) this.okButtonClicked = function() { var message = "Welcome " + dataBinder.get('user.name') + "! I understand you have " + dataBinder.get('user.age') + " years old and your country is " + dataBinder.get('user.country'); alert(message); } }
exports.level = { "goalTreeString": "{\"branches\":{\"master\":{\"target\":\"C3\",\"id\":\"master\",\"remoteTrackingBranchID\":\"o/master\",\"localBranchesThatTrackThis\":null},\"o/master\":{\"target\":\"C3\",\"id\":\"o/master\",\"remoteTrackingBranchID\":null,\"localBranchesThatTrackThis\":[\"master\"]}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C2\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"},\"originTree\":{\"branches\":{\"master\":{\"target\":\"C3\",\"id\":\"master\",\"remoteTrackingBranchID\":null,\"localBranchesThatTrackThis\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"},\"C2\":{\"parents\":[\"C1\"],\"id\":\"C2\"},\"C3\":{\"parents\":[\"C2\"],\"id\":\"C3\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}}", "solutionCommand": "git clone;git commit;git commit;git push", "startTree": "{\"branches\":{\"master\":{\"target\":\"C1\",\"id\":\"master\",\"remoteTrackingBranchID\":null,\"localBranchesThatTrackThis\":null}},\"commits\":{\"C0\":{\"parents\":[],\"id\":\"C0\",\"rootCommit\":true},\"C1\":{\"parents\":[\"C0\"],\"id\":\"C1\"}},\"HEAD\":{\"target\":\"master\",\"id\":\"HEAD\"}}", "name": { "en_US": "Git Pushin'", "zh_CN": "Git Push", "zh_TW": "git push", "es_AR": "git push", "pt_BR": "Git Push", "de_DE": "Git Push", "ja" : "Git Push", "fr_FR": "Git push" }, "hint": { "en_US": "Remember you have to clone before you can push!", "zh_CN": "push 之前你需要先 clone.", "zh_TW": "push 之前你需要先 clone", "es_AR": "¡Acordate que tenés que clonar antes de pushear!", "pt_BR": "Lembre-se de clonar antes de fazer o push!", "de_DE": "Denk dran, dass du einen Clone brauchst bevor du Pushen kannst!", "ja" : "Pushできる前にまずレポジトリをcloneする必要があるのをお忘れなく", "fr_FR": "Rappelez-vous que vous devez cloner avant de pouvoir faire un push !" }, "startDialog": { "en_US": { "childViews": [ { "type": "ModalAlert", "options": { "markdowns": [ "## Git Push", "", "Ok, so I've fetched changes from remote and incorporated them into my work locally. That's great and all... but how do I share _my_ awesome work with everyone else?", "", "Well, the way to upload shared work is the opposite of downloading shared work. And what's the opposite of `git pull`? `git push`!", "", "`git push` is responsible for uploading _your_ changes to a specified remote and updating that remote to incorporate your new commits. Once `git push` completes, all your friends can then download your work from the remote.", "", "You can think of `git push` as a command to \"publish\" your work. It has a bunch of subtleties that we will get into shortly, but let's start with baby steps...", "", "*note -- the behavior of `git push` with no arguments varies depending on one of git's settings called `push.default`. The default value for this setting depends on the version of git you're using, but we are going to use the `upstream` value in our lessons. This isn't a huge deal, but it's worth checking your settings before pushing in your own projects.*" ] } }, { "type": "GitDemonstrationView", "options": { "beforeMarkdowns": [ "Here we have some changes that the remote does not have. Let's upload them!" ], "afterMarkdowns": [ "There we go -- the remote received commit `C2`, the branch `master` on the remote was updated to point at `C2`, and our *own* reflection of the remote (`o/master`) was updated as well. Everything is in sync!" ], "command": "git push", "beforeCommand": "git clone; git commit" } }, { "type": "ModalAlert", "options": { "markdowns": [ "To finish this level, simply share two new commits with the remote. Strap in though, because these lessons are about to get a lot harder!" ] } } ] }, "fr_FR": { "childViews": [ { "type": "ModalAlert", "options": { "markdowns": [ "## Git Push", "", "Ok, donc j'ai rapatrié les changements du dépôt distant et les incorporé dans mon travail local. C'est super ... mais comment je partage _mon_ travail génial avec tous les autres ?", "", "En fait, la manière d'envoyer du travail à partager fonctionne à l'opposé du téléchargement de travail partagé. Et quel est l'opposé de `git pull` ? `git push`!", "", "`git push` est responsable de l'envoi de _vos_ changements vers un dépôt distant et de la mise à jour de ce dépôt pour incorporer vos commits. Une fois `git push` terminé, tous vos amis peuvent télécharger votre travail depuis le dépôt distant.", "", "Vous pouvez voir `git push` comme une commande qui \"publie\" votre travail. Elle a une variété de subtilité que nous allons voir rapidement, mais commençons avec le b.a-ba ...", "", "*note : le comportement de `git push` avec aucun argument varie avec l'un des réglages de git appelé `push.default`. La valeur par défaut pour ce réglage dépend de la version de git utilisée, mais nous allons utiliser la valeur `upstream` dans nos leçons. Ce n'est pas un gros inconvénient, mais vérifiez tout de même vos réglages avant de pusher vos propres projets.*" ] } }, { "type": "GitDemonstrationView", "options": { "beforeMarkdowns": [ "Nous avons fait ici quelques changements que le dépôt distant n'a pas. Envoyons-les !" ], "afterMarkdowns": [ "Et voilà -- le dépôt distant a reçu le commit `C2`, la branche `master` a été mise à jour sur `C2`, et vôtre *propre* représentation de la branche distante (`o/master`) a aussi été mise à jour. Tout est synchronisé !" ], "command": "git push", "beforeCommand": "git clone; git commit" } }, { "type": "ModalAlert", "options": { "markdowns": [ "Pour finir ce niveau, partager simplement des nouveaux commits avec le dépôt distant. Accrochez-vous, parce que ces leçons vont devenir beaucoup plus difficiles !" ] } } ] }, "es_AR": { "childViews": [ { "type": "ModalAlert", "options": { "markdowns": [ "## git push", "", "Ok, entonces ya bajé los cambios de un repositorio remoto y los integré en mi trabajo localmente. Esto es genial y todo... pero ¿cómo comparto _mis_ cambios con el resto?", "", "Bueno, la forma de subir el trabajo compartido es la opuesta a cómo descargar trabajo. Y ¿qué es lo opuesto a `git pull`? ¡`git push`!", "", "`git push` es el responsable de subir _tus_ cambios a un remoto específico y de actualizar ese remoto para incluir tus nuevos commits. Cuando `git push` termina, todos tus amigos pueden descargar tu trabajo del remoto.", "", "Podés pensar en `git push` como un comando para \"publicar\" tu trabajo. Tiene un par de sutilezas con las que vamos a meternos pronto, pero empecemos de a poco." ] } }, { "type": "GitDemonstrationView", "options": { "beforeMarkdowns": [ "Acá tenemos algunos cambios que nuestro remoto no tiene. ¡Subámoslos!" ], "afterMarkdowns": [ "Ahí está: el remoto recibió el commit `C2`, la rama `master` de ese remoto se actualizó para apuntar a `C2`, y nuestro *propio* reflejo del remoto (`o/master`) también fue actualizado. ¡Todo está en sincronía!" ], "command": "git push", "beforeCommand": "git clone; git commit" } }, { "type": "ModalAlert", "options": { "markdowns": [ "Para completar este nivel, simplemente compartí dos nuevos commits con el remoto. Igual, no te confíes, ¡ya se van a complicar las lecciones!" ] } } ] }, "pt_BR": { "childViews": [ { "type": "ModalAlert", "options": { "markdowns": [ "## Git Push", "", "Ok, então vimos como baixar mudanças do repositório remoto e incorporá-las à árvore local. Isso é ótimo e tal... mas como eu faço para compartilhar o _meu_ trabalho sensacional com as outras pessoas?", "", "Bem, a forma de subir trabalho a ser compartilhado é a oposta daquela de baixar trabalho que foi compartilhado. E qual o oposto de `git pull` (puxar)? É `git push` (empurrar)!", "", "O `git push` é responsável por subir as _suas_ mudanças para um repositório remoto especificado, e atualizar esse remoto para incorporar seus novos commits. Uma vez que o `git push` se completa, todos os seus amigos podem baixar o seu trabalho do repositório remoto.", "", "Você pode pensar no `git push` como um comando para \"publicar\" o seu trabalho. Ele tem uma série de nuances que vamos abordar em breve, mas comecemos com passos curtos...", "", "*Nota -- o comportamento de `git push` sem argumentos varia dependendo da configuração `push.default` do Git. O valor padrão para essa configuração depende da versão do Git que você estiver usando, mas vamos assumir o valor `upstream` nestas lições. Isso não é um grande problema, mas vale a pena verificar suas configurações antes de fazer push nos seus próprios projetos.*" ] } }, { "type": "GitDemonstrationView", "options": { "beforeMarkdowns": [ "Aqui temos algumas mudanças que o repositório remoto não contém. Vamos subi-las!" ], "afterMarkdowns": [ "Aqui vamos nós -- o repositório remoto recebeu o commit `C2`, o ramo `master` no repositório remoto foi atualizado para apontar para `C2`, e a *nossa* reflexão do remoto (`o/master`) foi atualizada também. Está tudo sincronizado!" ], "command": "git push", "beforeCommand": "git clone; git commit" } }, { "type": "ModalAlert", "options": { "markdowns": [ "Para completar este nível, simplesmente compartilhe dois novos commits com o repositório remoto. No entanto, segure-se no seu assento, pois estas lições estão prestes a ficar mais difíceis!" ] } } ] }, "zh_TW": { "childViews": [ { "type": "ModalAlert", "options": { "markdowns": [ "## Git Push", "", "ok,現在我已經從 remote 下載了一些更新,並且把它們 merge 到我的 local 上面的 branch,這聽起來實在太讚了...,但是我要如何分享_我_所做的更新給其它人呢?", "", "喔,其實上傳並且分享更新跟下載更新並且 merge 是相反的兩件事情,那什麼是 `git pull` 的相反呢? 那就是 `git push`!", "", "`git push` 負責上傳_你的_ commit 到特定 remote 上面並且做出相對應的更新,只要做完了 `git push`,所有你的朋友都可以從 remote 上面下載你所送出去的 commit。", "", "你可以把 `git push` 當作是一個\"發佈\"你的工作進度的指令,還有一些我們即將要講到的細節,但是先讓我們從一些簡單的步驟開始。" ] } }, { "type": "GitDemonstrationView", "options": { "beforeMarkdowns": [ "這裡我們有了一些 remote 所沒有的 commit。讓我們來上傳它們吧!" ], "afterMarkdowns": [ "我說的沒錯吧!remote 收到了 commit `C2`,同時在 remote 上的 `master` branch 也一起更新並且指向 `C2`,同時我們*自己的* `o/master` 也一併更新了!" ], "command": "git push", "beforeCommand": "git clone; git commit" } }, { "type": "ModalAlert", "options": { "markdowns": [ "要完成這個關卡,只要上傳兩個新的 commit 給 remote,不要太得意忘形喔!因為這些課程將會愈來愈難!" ] } } ] }, "zh_CN":{ "childViews": [ { "type": "ModalAlert", "options": { "markdowns": [ "## Git Push", "", "太棒了, 我们已经学习了从远端获取|合并工作到我们的本地工作.但是我们如果分享工作呢?", "", "好吧, 上载工作正好同下载工作相反, 那与`git pull`相反的命令是什么? `git push`! ", "", "`git push` 负责将你的提交上传到远端, 一旦`git push`完成, 你的朋友就可以在远端下载你的工作了! ", "", "你可以将`git push`视为发布你工作的命令. 它有一些特别的地方, 稍后我们会了解到, 我们开始吧." ] } }, { "type": "GitDemonstrationView", "options": { "beforeMarkdowns": [ "这里我们有一个变更, 而远端却没有, 我们先上传吧!" ], "afterMarkdowns": [ "到了, 远端收到的了`C2`提交, 远端的`master`分支 也被更新并指到了`C2`,我们的远端代表(o/master)也同样被更新了. 所有的东西都被同步了!" ], "command": "git push", "beforeCommand": "git clone; git commit" } }, { "type": "ModalAlert", "options": { "markdowns": [ "要完成本节, 需要向远端分享两个提交. 戒骄戒躁,课程还会更难哦! " ] } } ] }, "de_DE": { "childViews": [ { "type": "ModalAlert", "options": { "markdowns": [ "## Git Push", "", "Nun hab ich also Änderungen vom entfernten Server geholt und in meine lokale Arbeit integriert. Das ist schön und gut ... aber wie teile ich _meine_ Wahnsinns-Entwicklungen mit allen anderen?", "", "Naja, das Hochladen von Zeug ist das Gegenteil zum Herunterladen von Zeug. Und was ist das Gegenteil von `git pull`? Genau, `git push`!", "", "`git push` ist dafür verantwortlich _deine_ Änderungen zu einem bestimmten entfernten Server hochzuladen und dort zu integrieren. Sobald das `git push` durch ist, können alle deine Freunde diese Änderungen zu sich herunterladen.", "", "Du kannst dir `git push` als einen Befehl zum \"Veröffentlichen\" deiner Arbeit vorstellen. Es gibt da noch ein paar Feinheiten, aber lass uns mal mit kleinen Schritten anfangen." ] } }, { "type": "GitDemonstrationView", "options": { "beforeMarkdowns": [ "Hier haben wir ein paar Änderungen, die auf dem Remote noch fehlen. Und hoch damit!" ], "afterMarkdowns": [ "Na bitte -- das Remote hat den Commit `C2` bekommen, der `master` auf dem Remote ist entsprechend aktualisiert worden und unsere *eigene* Abbildung des `master` auf dem Remote namens `o/master` wurde auch aktualisiert. Alles im Lot!" ], "command": "git push", "beforeCommand": "git clone; git commit" } }, { "type": "ModalAlert", "options": { "markdowns": [ "Um diesen Level zu schaffen musst du einfach nur zwei neue Commits auf das Remote bringen. Aber stell dich schon mal darauf ein, dass die nächsten Level anspruchsvoller werden!" ] } } ] } } };
var searchData= [ ['_7econsole',['~Console',['../classthewizardplusplus_1_1utils_1_1_console.html#a3f2c8232f58fcbe5cbd826419dbd190d',1,'thewizardplusplus::utils::Console']]], ['_7egraphicapi',['~GraphicApi',['../classthewizardplusplus_1_1anna_1_1graphics_1_1_graphic_api.html#ae2403ea4d117c29e5070a50b8a418897',1,'thewizardplusplus::anna::graphics::GraphicApi']]], ['_7emesh',['~Mesh',['../classthewizardplusplus_1_1anna_1_1graphics_1_1_mesh.html#a5d57b290621dea7bae044a18beac008a',1,'thewizardplusplus::anna::graphics::Mesh']]], ['_7eobject',['~Object',['../classthewizardplusplus_1_1anna_1_1graphics_1_1_object.html#ac9ec2177266554587e8ddb40eb72ae1c',1,'thewizardplusplus::anna::graphics::Object']]], ['_7eopenglwindow',['~OpenGlWindow',['../classthewizardplusplus_1_1anna_1_1graphics_1_1_open_gl_window.html#af2f349fd5b9dc18d7337fc11ac1f9aa7',1,'thewizardplusplus::anna::graphics::OpenGlWindow']]], ['_7etextureloader',['~TextureLoader',['../classthewizardplusplus_1_1anna_1_1graphics_1_1_texture_loader.html#a034f4e7be9f168db99258ad2c31cd4a9',1,'thewizardplusplus::anna::graphics::TextureLoader']]], ['_7ewindow',['~Window',['../classthewizardplusplus_1_1anna_1_1graphics_1_1_window.html#a1367dd865683b20712a93b8089457dbe',1,'thewizardplusplus::anna::graphics::Window']]], ['_7eworld',['~World',['../classthewizardplusplus_1_1anna_1_1graphics_1_1_world.html#a2b1f837573746324336571e0fec15f78',1,'thewizardplusplus::anna::graphics::World']]] ];
/** * A utility class to help make it easier to access the data stores * @extends {Map} */ class Collection extends Map { /** * Returns an ordered array of the values of this collection. * @returns {array} * @example * // identical to: * Array.from(collection.values()); */ array() { return Array.from(this.values()); } /** * Returns the first item in this collection. * @returns {*} * @example * // identical to: * Array.from(collection.values())[0]; */ first() { return this.values().next().value; } /** * Returns the last item in this collection. This is a relatively slow operation, * since an array copy of the values must be made to find the last element. * @returns {*} */ last() { const arr = this.array(); return arr[arr.length - 1]; } /** * Returns a random item from this collection. This is a relatively slow operation, * since an array copy of the values must be made to find a random element. * @returns {*} */ random() { const arr = this.array(); return arr[Math.floor(Math.random() * arr.length)]; } /** * If the items in this collection have a delete method (e.g. messages), invoke * the delete method. Returns an array of promises * @returns {Promise[]} */ deleteAll() { const returns = []; for (const item of this.values()) { if (item.delete) returns.push(item.delete()); } return returns; } /** * Returns an array of items where `item[key] === value` of the collection * @param {string} key The key to filter by * @param {*} value The expected value * @returns {array} * @example * collection.getAll('username', 'Bob'); */ findAll(key, value) { if (typeof key !== 'string') throw new TypeError('key must be a string'); if (typeof value === 'undefined') throw new Error('value must be specified'); const results = []; for (const item of this.values()) { if (item[key] === value) results.push(item); } return results; } /** * Returns a single item where `item[key] === value` * @param {string} key The key to filter by * @param {*} value The expected value * @returns {*} * @example * collection.get('id', '123123...'); */ find(key, value) { if (typeof key !== 'string') throw new TypeError('key must be a string'); if (typeof value === 'undefined') throw new Error('value must be specified'); for (const item of this.values()) { if (item[key] === value) return item; } return null; } /** * Returns true if the collection has an item where `item[key] === value` * @param {string} key The key to filter by * @param {*} value The expected value * @returns {boolean} * @example * if (collection.exists('id', '123123...')) { * console.log('user here!'); * } */ exists(key, value) { return Boolean(this.find(key, value)); } /** * Identical to * [Array.filter()](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/filter), * but returns a Collection instead of an Array. * @param {function} callback Function used to filter (should return a boolean) * @param {Object} [thisArg] Value to set as this when filtering * @returns {Collection} */ filter(...args) { const newArray = this.array().filter(...args); const collection = new Collection(); for (const item of newArray) collection.set(item.id, item); return collection; } /** * Functionally identical shortcut to `collection.array().map(...)`. * @param {function} callback Function that produces an element of the new Array, taking three arguments * @param {*} [thisArg] Optional. Value to use as this when executing callback. * @returns {array} */ map(...args) { return this.array().map(...args); } } module.exports = Collection;
/* @flow */ import React from "react"; import { observer } from "mobx-react"; type Props = { status: string, style: Object }; const Status = observer(({ status, style }: Props) => { switch (status) { case "running": return ( <div className="inline-container spinner" style={style}> <div className="rect1" /> <div className="rect2" /> <div className="rect3" /> <div className="rect4" /> <div className="rect5" /> </div> ); case "ok": return <div className="inline-container icon icon-check" style={style} />; case "empty": return <div className="inline-container icon icon-zap" style={style} />; default: return <div className="inline-container icon icon-x" style={style} />; } }); export default Status;
define(['./_realNames'], function(realNames) { /** Used for built-in method references. */ var objectProto = Object.prototype; /** Used to check objects for own properties. */ var hasOwnProperty = objectProto.hasOwnProperty; /** * Gets the name of `func`. * * @private * @param {Function} func The function to query. * @returns {string} Returns the function name. */ function getFuncName(func) { var result = (func.name + ''), array = realNames[result], length = hasOwnProperty.call(realNames, result) ? array.length : 0; while (length--) { var data = array[length], otherFunc = data.func; if (otherFunc == null || otherFunc == func) { return data.name; } } return result; } return getFuncName; });
'use strict'; module.exports = function(gulp) { var help, dependencies = [ '' ]; help = 'build the code for release'; gulp.task('release', help, dependencies); };
var Tokenizer = require('../../../index').query.tokenizer; var assert = require('assert'); describe('Tokenizer ::', function() { describe('Various Operators', function() { it('should generate a valid token array when LIKE is used', function() { var result = Tokenizer({ select: ['*'], from: 'users', where: { or: [ { name: { like: '%Test%' } }, { id: { nin: [1, 2, 3] } } ] } }); assert.deepEqual(result, [ { type: 'IDENTIFIER', value: 'SELECT' }, { type: 'VALUE', value: '*' }, { type: 'ENDIDENTIFIER', value: 'SELECT' }, { type: 'IDENTIFIER', value: 'FROM' }, { type: 'VALUE', value: 'users' }, { type: 'ENDIDENTIFIER', value: 'FROM' }, { type: 'IDENTIFIER', value: 'WHERE' }, { type: 'CONDITION', value: 'OR' }, { type: 'GROUP', value: 0 }, { type: 'KEY', value: 'name' }, { type: 'OPERATOR', value: 'like' }, { type: 'VALUE', value: '%Test%' }, { type: 'ENDOPERATOR', value: 'like' }, { type: 'ENDGROUP', value: 0 }, { type: 'GROUP', value: 1 }, { type: 'KEY', value: 'id' }, { type: 'CONDITION', value: 'NOTIN' }, { type: 'VALUE', value: [1, 2, 3] }, { type: 'ENDCONDITION', value: 'NOTIN' }, { type: 'ENDGROUP', value: 1 }, { type: 'ENDCONDITION', value: 'OR' }, { type: 'ENDIDENTIFIER', value: 'WHERE' } ]); }); it('should generate a valid token array when != is used', function() { var result = Tokenizer({ select: ['id'], from: 'users', where: { and: [ { firstName: { '!=': 'Test' } }, { lastName: { '!=': 'User' } } ] } }); assert.deepEqual(result, [ { type: 'IDENTIFIER', value: 'SELECT' }, { type: 'VALUE', value: 'id' }, { type: 'ENDIDENTIFIER', value: 'SELECT' }, { type: 'IDENTIFIER', value: 'FROM' }, { type: 'VALUE', value: 'users' }, { type: 'ENDIDENTIFIER', value: 'FROM' }, { type: 'IDENTIFIER', value: 'WHERE' }, { type: 'CONDITION', value: 'AND' }, { type: 'GROUP', value: 0 }, { type: 'KEY', value: 'firstName' }, { type: 'OPERATOR', value: '!=' }, { type: 'VALUE', value: 'Test' }, { type: 'ENDOPERATOR', value: '!=' }, { type: 'ENDGROUP', value: 0 }, { type: 'GROUP', value: 1 }, { type: 'KEY', value: 'lastName' }, { type: 'OPERATOR', value: '!=' }, { type: 'VALUE', value: 'User' }, { type: 'ENDOPERATOR', value: '!=' }, { type: 'ENDGROUP', value: 1 }, { type: 'ENDCONDITION', value: 'AND' }, { type: 'ENDIDENTIFIER', value: 'WHERE' } ]); }); it('should generate a valid token array when nested != statements are used', function() { var result = Tokenizer({ select: ['*'], from: 'users', where: { or: [ { or: [ { id: { '!=': 1 } }, { id: { '>': 10 } } ] }, { name: { '!=': 'Tester' } } ] } }); assert.deepEqual(result, [ { type: 'IDENTIFIER', value: 'SELECT' }, { type: 'VALUE', value: '*' }, { type: 'ENDIDENTIFIER', value: 'SELECT' }, { type: 'IDENTIFIER', value: 'FROM' }, { type: 'VALUE', value: 'users' }, { type: 'ENDIDENTIFIER', value: 'FROM' }, { type: 'IDENTIFIER', value: 'WHERE' }, { type: 'CONDITION', value: 'OR' }, { type: 'GROUP', value: 0 }, { type: 'CONDITION', value: 'OR' }, { type: 'GROUP', value: 0 }, { type: 'KEY', value: 'id' }, { type: 'OPERATOR', value: '!=' }, { type: 'VALUE', value: 1 }, { type: 'ENDOPERATOR', value: '!=' }, { type: 'ENDGROUP', value: 0 }, { type: 'GROUP', value: 1 }, { type: 'KEY', value: 'id' }, { type: 'OPERATOR', value: '>' }, { type: 'VALUE', value: 10 }, { type: 'ENDOPERATOR', value: '>' }, { type: 'ENDGROUP', value: 1 }, { type: 'ENDCONDITION', value: 'OR' }, { type: 'ENDGROUP', value: 0 }, { type: 'GROUP', value: 1 }, { type: 'KEY', value: 'name' }, { type: 'OPERATOR', value: '!=' }, { type: 'VALUE', value: 'Tester' }, { type: 'ENDOPERATOR', value: '!=' }, { type: 'ENDGROUP', value: 1 }, { type: 'ENDCONDITION', value: 'OR' }, { type: 'ENDIDENTIFIER', value: 'WHERE' } ]); }); it('should generate a valid token array when multiple operators are used', function() { var result = Tokenizer({ select: ['*'], from: 'users', where: { or: [ { name: 'John' }, { votes: { '>': 100 }, title: { '!=': 'Admin' } } ] } }); assert.deepEqual(result, [ { type: 'IDENTIFIER', value: 'SELECT' }, { type: 'VALUE', value: '*' }, { type: 'ENDIDENTIFIER', value: 'SELECT' }, { type: 'IDENTIFIER', value: 'FROM' }, { type: 'VALUE', value: 'users' }, { type: 'ENDIDENTIFIER', value: 'FROM' }, { type: 'IDENTIFIER', value: 'WHERE' }, { type: 'CONDITION', value: 'OR' }, { type: 'GROUP', value: 0 }, { type: 'KEY', value: 'name' }, { type: 'VALUE', value: 'John' }, { type: 'ENDGROUP', value: 0 }, { type: 'GROUP', value: 1 }, { type: 'KEY', value: 'votes' }, { type: 'OPERATOR', value: '>' }, { type: 'VALUE', value: 100 }, { type: 'ENDOPERATOR', value: '>' }, { type: 'KEY', value: 'title' }, { type: 'OPERATOR', value: '!=' }, { type: 'VALUE', value: 'Admin' }, { type: 'ENDOPERATOR', value: '!=' }, { type: 'ENDGROUP', value: 1 }, { type: 'ENDCONDITION', value: 'OR' }, { type: 'ENDIDENTIFIER', value: 'WHERE' } ]); }); }); });
import React, { PropTypes } from 'react'; import { dateTimeUtils } from '../../utils'; import styles from './DateBlock.sass'; const DateBlock = ({ startDate, endDate }) => { const isMultiDayEvent = endDate ? dateTimeUtils.dateTimeNoOffset(startDate, 'DDD') !== dateTimeUtils.dateTimeNoOffset(endDate, 'DDD') : false; // get start date values const [startDayName, startMonth, startDayNum] = dateTimeUtils.dateTimeNoOffset(startDate, 'ddd MMM D').split(' '); // get end date values const [endMonth, endDayNum] = dateTimeUtils.dateTimeNoOffset(endDate, 'MMM D').split(' '); // display appropriate info based on whether or not this is a multi-day event or not const leftBox = isMultiDayEvent ? `${startMonth} ${startDayNum} -` : startDayName; const rightBox = isMultiDayEvent ? `${endMonth} ${endDayNum}` : `${startMonth} ${startDayNum}`; return ( <div className={styles.container}> <span className={styles.left}>{leftBox}</span> <span className={styles.right}>{rightBox}</span> </div> ); }; DateBlock.propTypes = { startDate: PropTypes.string.isRequired, endDate: PropTypes.string, }; export default DateBlock;
module.exports = { extends: './index.js' };
// Returns fragment generator, where each returned fragment emits selected indexed data for // specified object 'use strict'; var ensureCallable = require('es5-ext/object/valid-callable') , ensureString = require('es5-ext/object/validate-stringifiable-value') , escape = require('es5-ext/reg-exp/escape') , memoize = require('memoizee') , Fragment = require('data-fragment') , ensureStorage = require('dbjs-persistence/ensure-storage') , assimilateEvent = require('./lib/assimilate-driver-event'); var getKeyPathFilter = function (keyPath) { var matches = RegExp.prototype.test.bind(new RegExp('^[a-z0-9][a-z0-9A-Z]*/' + escape(keyPath) + '(?:/.+|$)')); return function (data) { return matches(data.id); }; }; module.exports = memoize(function (storage) { ensureStorage(storage); return memoize(function (ownerId/*, options*/) { var fragment, options = Object(arguments[2]), filter, index, customFilter, keyPathFilter; ownerId = ensureString(ownerId); if (options.filter != null) customFilter = ensureCallable(options.filter); index = ownerId.indexOf('/'); if (index !== -1) { keyPathFilter = getKeyPathFilter(ownerId.slice(index + 1)); ownerId = ownerId.slice(0, index); } if (keyPathFilter) { if (customFilter) { filter = function (data) { return keyPathFilter(data) && customFilter(data); }; } else { filter = keyPathFilter; } } else if (customFilter) { filter = customFilter; } fragment = new Fragment(); fragment.promise = storage.getReducedObject(ownerId)(function (data) { data.forEach(function (data) { if (!filter || filter(data)) assimilateEvent(fragment, data.id, data.data); }); }); storage.on('owner:' + ownerId, function (event) { if (event.type !== 'reduced') return; if (!filter || filter(event)) assimilateEvent(fragment, event.id, event.data); }); return fragment; }, { primitive: true }); }, { primitive: true });
#!/usr/bin/env node var CompactToStylishStream = require('../') var minimist = require('minimist') var argv = minimist(process.argv.slice(2), { boolean: [ 'stdin' ] }) if (!process.stdin.isTTY || argv._[0] === '-' || argv.stdin) { var snazzy = new CompactToStylishStream() // Set the process exit code based on whether snazzy found errors process.on('exit', function (code) { if (code === 0 && snazzy.exitCode !== 0) { process.exitCode = snazzy.exitCode } }) process.stdin.pipe(snazzy).pipe(process.stdout) } else { console.error(` snazzy: 'standard' is no longer bundled with 'snazzy'. Install standard snazzy: ('npm install standard') then run 'standard | snazzy' instead. `) process.exitCode = 1 }
import { jsdom } from 'jsdom' if (typeof document === 'undefined') { global.document = jsdom('<!doctype html><html><body></body></html>') global.window = document.defaultView global.navigator = global.window.navigator }
'use strict'; var qs = require('querystring'); var request = require('request'); var parseString = require('xml2js').parseString; module.exports = function(auth) { return function(o, cb) { var fmt = 'MM/DD/YYYY'; var url = 'https://xmlreporter.dotcom-monitor.com/reporting/xml/responses.aspx?' + qs.stringify({ pid: auth, Site: '*', Type: 'Day', Options: 'AllDownPercentages', From: o.from.toFormat(fmt), To: o.to.toFormat(fmt), }); request(url, function(err, res) { if(err) { return cb(err); } var xml = res.body; parseString(xml, function(err, result) { if(err) { return cb(err); } var report = result.DotcomMonitorOnlineReport; if(!report) { return cb(new Error('Missing report!')); } var siteData = report.Site; cb(null, { providers: parseDotcomAverages(siteData) }); }); }); }; }; function parseDotcomAverages(siteData) { if(!siteData) { console.error('parseDotcomAverages - Failed to get siteData'); return []; } return siteData.map(function(v) { var attrs = v.$; var summary = v.Summary; return { name: attrs.Name, latency: summary.map(function(s) { var avgRes = s['Average-Response-Time']; var avgResponse = avgRes ? avgRes[0] : null; avgResponse = parseFloat(avgResponse) * 1000; if(!avgResponse) { avgResponse = null; } return avgResponse; }) }; }); }
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports["default"] = void 0; var _react = babelHelpers.interopRequireDefault(require("react")); var RandomComponent = /*#__PURE__*/function (_Component) { babelHelpers.inherits(RandomComponent, _Component); var _super = babelHelpers.createSuper(RandomComponent); function RandomComponent() { babelHelpers.classCallCheck(this, RandomComponent); return _super.call(this); } babelHelpers.createClass(RandomComponent, [{ key: "render", value: function render() { return /*#__PURE__*/_react["default"].createElement("div", { className: "sui-RandomComponent" }, /*#__PURE__*/_react["default"].createElement("h2", null, "Hi there!")); } }]); return RandomComponent; }(_react.Component); exports["default"] = RandomComponent;
var searchData= [ ['py',['py',['../namespacepresence_1_1py.html',1,'presence']]] ];
import add2D from './2d/add2D'; import { complexChromatogram } from './complexChromatogram'; import postProcessingNMR from './postProcessingNMR'; import profiling from './profiling'; import simpleChromatogram from './simpleChromatogram'; export default function postProcessing(entriesFlat, result, options) { // converting Hz to ppm postProcessingNMR(entriesFlat); for (let entry of entriesFlat) { if (Object.keys(entry.ntuples).length > 0) { let newNtuples = []; let keys = Object.keys(entry.ntuples); for (let i = 0; i < keys.length; i++) { let key = keys[i]; let values = entry.ntuples[key]; for (let j = 0; j < values.length; j++) { if (!newNtuples[j]) newNtuples[j] = {}; newNtuples[j][key] = values[j]; } } entry.ntuples = newNtuples; } if (entry.twoD && options.wantXY) { add2D(entry, options); profiling(result, 'Finished countour plot calculation', options); if (!options.keepSpectra) { delete entry.spectra; } } // maybe it is a GC (HPLC) / MS. In this case we add a new format if (options.chromatogram) { if (entry.spectra.length > 1) { complexChromatogram(entry); } else { simpleChromatogram(entry); } profiling(result, 'Finished chromatogram calculation', options); } delete entry.tmp; } }
'use strict'; require('mocha'); const path = require('path'); const assert = require('assert'); const { braceExpand } = require('..'); if (!process.env.ORIGINAL_PATH_SEP) { process.env.ORIGINAL_PATH_SEP = path.sep } describe('.braceExpand()', () => {it('should throw an error when arguments are invalid', () => { assert.throws(() => braceExpand()); }); it('should expand a brace pattern', () => { assert.deepEqual(braceExpand('{a,b}'), ['a', 'b']); }); });
Package.describe({ name: "server-render", version: "0.4.0", summary: "Generic support for server-side rendering in Meteor apps", documentation: "README.md" }); Npm.depends({ "combined-stream2": "1.1.2", "magic-string": "0.25.7", "stream-to-string": "1.2.0", "parse5": "4.0.0" }); Package.onUse(function(api) { api.use("ecmascript"); api.use("webapp"); api.mainModule("client.js", "client", { lazy: true }); api.mainModule("server.js", "server"); }); Package.onTest(function(api) { api.use("ecmascript"); api.use("tinytest"); api.use("server-render"); api.mainModule("server-render-tests.js", "server"); });
var React = require('react/addons'); var { Container, createApp, UI, View, ViewManager } = require('touchstonejs'); // App Config // ------------------------------ var PeopleStore = require('./stores/people') var peopleStore = new PeopleStore() var App = React.createClass({ mixins: [createApp()], childContextTypes: { peopleStore: React.PropTypes.object }, getChildContext () { return { peopleStore: peopleStore }; }, render () { var appWrapperClassName = 'app-wrapper device--' + (window.device || {}).platform return ( <div className={appWrapperClassName}> <div className="device-silhouette"> <ViewManager name="app" defaultView="main"> <View name="main" component={MainViewController} /> <View name="transitions-target-over" component={require('./views/transitions-target-over')} /> </ViewManager> </div> </div> ); } }); // Main Controller // ------------------------------ var MainViewController = React.createClass({ render () { return ( <Container> <UI.NavigationBar name="main" /> <ViewManager name="main" defaultView="tabs"> <View name="tabs" component={TabViewController} /> </ViewManager> </Container> ); } }); // Tab Controller // ------------------------------ var lastSelectedTab = 'lists' var TabViewController = React.createClass({ getInitialState () { return { selectedTab: lastSelectedTab }; }, onViewChange (nextView) { lastSelectedTab = nextView this.setState({ selectedTab: nextView }); }, selectTab (value) { var viewProps; this.refs.vm.transitionTo(value, { transition: 'instant', viewProps: viewProps }); this.setState({ selectedTab: value }) }, render () { var selectedTab = this.state.selectedTab var selectedTabSpan = selectedTab if (selectedTab === 'lists' || selectedTab === 'list-simple' || selectedTab === 'list-complex' || selectedTab === 'list-details') { selectedTabSpan = 'lists'; } if (selectedTab === 'transitions' || selectedTab === 'transitions-target') { selectedTabSpan = 'transitions'; } return ( <Container> <ViewManager ref="vm" name="tabs" defaultView={selectedTab} onViewChange={this.onViewChange}> <View name="lists" component={require('./views/lists')} /> <View name="list-simple" component={require('./views/list-simple')} /> <View name="list-complex" component={require('./views/list-complex')} /> <View name="list-details" component={require('./views/list-details')} /> <View name="form" component={require('./views/form')} /> <View name="controls" component={require('./views/controls')} /> <View name="transitions" component={require('./views/transitions')} /> <View name="transitions-target" component={require('./views/transitions-target')} /> </ViewManager> <UI.Tabs.Navigator> <UI.Tabs.Tab onTap={this.selectTab.bind(this, 'lists')} selected={selectedTabSpan === 'lists'}> <span className="Tabs-Icon Tabs-Icon--lists" /> <UI.Tabs.Label>Lists</UI.Tabs.Label> </UI.Tabs.Tab> <UI.Tabs.Tab onTap={this.selectTab.bind(this, 'form')} selected={selectedTabSpan === 'form'}> <span className="Tabs-Icon Tabs-Icon--forms" /> <UI.Tabs.Label>Forms</UI.Tabs.Label> </UI.Tabs.Tab> <UI.Tabs.Tab onTap={this.selectTab.bind(this, 'controls')} selected={selectedTabSpan === 'controls'}> <span className="Tabs-Icon Tabs-Icon--controls" /> <UI.Tabs.Label>Controls</UI.Tabs.Label> </UI.Tabs.Tab> <UI.Tabs.Tab onTap={this.selectTab.bind(this, 'transitions')} selected={selectedTabSpan === 'transitions'}> <span className="Tabs-Icon Tabs-Icon--transitions" /> <UI.Tabs.Label>Transitions</UI.Tabs.Label> </UI.Tabs.Tab> </UI.Tabs.Navigator> </Container> ); } }); function startApp () { if (window.StatusBar) { window.StatusBar.styleDefault(); } React.render(<App />, document.getElementById('app')); } if (!window.cordova) { startApp(); } else { document.addEventListener('deviceready', startApp, false); }
/******************************************************************************* # ____ __ __ _ _____ _ _ # # / __ \ \ \ / / | | / ____| | | | # # | | | |_ __ ___ _ __ \ /\ / /__| |__ | | __| | ___ | |__ ___ # # | | | | '_ \ / _ \ '_ \ \/ \/ / _ \ '_ \| | |_ | |/ _ \| '_ \ / _ \ # # | |__| | |_) | __/ | | \ /\ / __/ |_) | |__| | | (_) | |_) | __/ # # \____/| .__/ \___|_| |_|\/ \/ \___|_.__/ \_____|_|\___/|_.__/ \___| # # | | # # |_| _____ _____ _ __ # # / ____| __ \| |/ / # # | (___ | | | | ' / # # \___ \| | | | < # # ____) | |__| | . \ # # |_____/|_____/|_|\_\ # # # # (c) 2010-2011 by # # University of Applied Sciences Northwestern Switzerland # # Institute of Geomatics Engineering # # martin.christen@fhnw.ch # ******************************************************************************** * Licensed under MIT License. Read the file LICENSE for more information * *******************************************************************************/ goog.provide('owg.Texture'); goog.require('goog.debug.Logger'); goog.require('owg.MathUtils'); goog.require('owg.Surface'); goog.require('owg.mat4'); /** * @type {string} Path to artwork, including trailing slash. */ owg.ARTWORK_PATH = "art/"; //------------------------------------------------------------------------------ /** * @class texture * @constructor * {@link http://www.openwebglobe.org} * @author Martin Christen martin.christen@fhnw.ch * @param {engine3d} engine * @param {boolean=} opt_useAsRenderTarget * @param {number=} opt_framebufferWidth * @param {number=} opt_framebufferHeight * @param {boolean=} opt_depthbuffer */ function Texture(engine, opt_useAsRenderTarget, opt_framebufferWidth, opt_framebufferHeight, opt_depthbuffer) { /** @type {engine3d} */ this.engine = engine; // pointer to the engine /** @type {WebGLRenderingContext} */ this.gl = engine.gl; // pointer to the gl /** @type {?WebGLTexture} */ this.texture = null; // the texture /** @type {boolean} */ this.ready = false; // is true when texture is ready to use /** @type {boolean} */ this.failed = false; // is true when texture creation / download failed /** @type {Surface} */ this.blitMesh = null; // optional mesh used for blitting /** @type {number} */ this.width = 0; /** @type {number} */ this.height = 0; /** @type {?WebGLFramebuffer} */ this.rttFrameBuffer = null; //used if this texture is used as a render target /** @type {boolean} */ this.usedAsRenderTarget = false; /** @type {boolean} */ this.flip = false; /** @type {number} */ var nWidth = opt_framebufferWidth || 0; /** @type {number} */ var nHeight = opt_framebufferHeight || 0; /** @type {boolean} */ var bDepthbuffer = opt_depthbuffer || false; if (opt_useAsRenderTarget) // texture is used as render target. { this.UpdateFBO(nWidth, nHeight, bDepthbuffer); } /** @type {boolean} */ // PROBLEMS WITH TEXTURE COORDINATE gl.REPEAT not supported in google chrome or safari 17.10.2012 this.repeat = false; } //------------------------------------------------------------------------------ /** @description create or recreate FBO * * @param {number} nWidth * @param {number} nHeight * @param {boolean} bDepthBuffer */ Texture.prototype.UpdateFBO = function(nWidth, nHeight, bDepthBuffer) { this._DestroyFBO(); this.rttFramebuffer = this.gl.createFramebuffer(); this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, this.rttFramebuffer); this.rttFramebuffer.width = nWidth; this.rttFramebuffer.height = nHeight; this.texture = this.gl.createTexture(); this.gl.bindTexture(this.gl.TEXTURE_2D, this.texture); this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MAG_FILTER, this.gl.LINEAR); this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_MIN_FILTER, this.gl.LINEAR); this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_S, this.gl.CLAMP_TO_EDGE); this.gl.texParameteri(this.gl.TEXTURE_2D, this.gl.TEXTURE_WRAP_T, this.gl.CLAMP_TO_EDGE); this.gl.texImage2D(this.gl.TEXTURE_2D, 0, this.gl.RGBA, this.rttFramebuffer.width, this.rttFramebuffer.height, 0, this.gl.RGBA, this.gl.UNSIGNED_BYTE, null); this.renderbuffer = this.gl.createRenderbuffer(); this.gl.bindRenderbuffer(this.gl.RENDERBUFFER, this.renderbuffer); if (bDepthBuffer) { //this.gl.renderbufferStorage(this.gl.RENDERBUFFER, this.gl.DEPTH_COMPONENT16, this.rttFramebuffer.width, this.rttFramebuffer.height); this.gl.renderbufferStorage(this.gl.RENDERBUFFER, this.gl.DEPTH_STENCIL, this.rttFramebuffer.width, this.rttFramebuffer.height); } this.gl.framebufferTexture2D(this.gl.FRAMEBUFFER, this.gl.COLOR_ATTACHMENT0, this.gl.TEXTURE_2D, this.texture, 0); if (bDepthBuffer) { //this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER, this.gl.DEPTH_ATTACHMENT, this.gl.RENDERBUFFER, this.renderbuffer); this.gl.framebufferRenderbuffer(this.gl.FRAMEBUFFER, this.gl.DEPTH_STENCIL_ATTACHMENT, this.gl.RENDERBUFFER, this.renderbuffer); } this.gl.bindTexture(this.gl.TEXTURE_2D, null); this.gl.bindRenderbuffer(this.gl.RENDERBUFFER, null); this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, null); this.ready = true; this.usedAsRenderTarget = true; this.width = nWidth; this.height = nHeight; } //------------------------------------------------------------------------------ /** * @description destroy FBO: Free all memory */ Texture.prototype._DestroyFBO = function() { if (this.rttFramebuffer != null) { this.gl.deleteRenderbuffer(this.renderbuffer); this.renderbuffer = null; this.gl.deleteFramebuffer(this.rttFramebuffer); this.rttFramebuffer = null; this.gl.deleteTexture(this.texture); this.texture = null; if (this.blitMesh) { this.blitMesh.Destroy(); this.blitMesh = null; } } } //------------------------------------------------------------------------------ /** * Loads the Texture image. * @param {string} url The url to download the image * @param {null|function(Texture)=} opt_callbackready An optional callback called when texture is ready. Has the texture class as param. * @param {null|function(Texture)=} opt_callbackfailed An optional callback called when texture failed. Has the texture class as param. * @param {boolean=} opt_flip Flip texture image on load */ Texture.prototype.loadTexture = function(url, opt_callbackready, opt_callbackfailed, opt_flip) { // preparations if (goog.isDef(opt_flip)) { this.flip = opt_flip; } else { this.flip = false; } this.texture = this.gl.createTexture(); var texture=this.texture; var curgl = this.gl; var thismat = this; var cbr = opt_callbackready; var cbf = opt_callbackfailed; this.texture.image = new Image(); this.texture.image["crossOrigin"] = 'anonymous'; this.texture.image.onload = function() { _cbHandleLoadedTexture(curgl, texture, cbr, thismat); thismat.ready = true; } this.texture.image.onerror = function() { goog.debug.Logger.getLogger('owg.Texture').warning("***FAILED DOWNLOADING: " + url); this.failed = true; if (cbf) { cbf(thismat); } } this.texture.image.src = url; return this.texture; } //------------------------------------------------------------------------------ /** * @description Create WebGL texture object once it is available * @ignore */ function _cbHandleLoadedTexture(gl, textureobject, cb, TextureClass) { // Create texture: gl.bindTexture(gl.TEXTURE_2D, textureobject); gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, TextureClass.flip); gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, textureobject.image); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.LINEAR); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.LINEAR); /*if (TextureClass.repeat) // PROBLEMS WITH TEXTURE COORDINATE gl.REPEAT not supported in google chrome or safari 17.10.2012 { gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.REPEAT); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.REPEAT); } else {*/ gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); //} gl.bindTexture(gl.TEXTURE_2D, null); TextureClass.width = textureobject.image.width; TextureClass.height = textureobject.image.height; if (cb != null) { cb(TextureClass); } } //------------------------------------------------------------------------------ /** * Texture Binding, must be called before mesh.draw() called. * */ Texture.prototype.Enable = function() { if (this.ready) { this.gl.activeTexture(this.gl.TEXTURE0); this.gl.bindTexture(this.gl.TEXTURE_2D, this.texture); } } //------------------------------------------------------------------------------ /** * Unbinds the texture * */ Texture.prototype.Disable = function() { if (this.ready) { this.gl.bindTexture(this.gl.TEXTURE_2D, null); } } //------------------------------------------------------------------------------ /** * BlitRect(x0,y0,width,height) * Convienience function to draw Texture in a rectangular shape, internally using the blit function * @param {number} x0 Top Left x-coord * @param {number} y0 Top Left y-coord * @param {number} width The width of the rectangle * @param {number} height The height of the rectangle */ Texture.prototype.BlitRect = function(x0, y0, width, height) { if (this.ready) { var scalex = width / this.width; var scaley = height / this.height; this.Blit(x0, y0, 0, 0, scalex, scaley); } } //------------------------------------------------------------------------------ /** * Blit Texture: Draw texture on screen * @param {number} x * @param {number} y * @param {number=} opt_z * @param {number=} opt_angle * @param {number=} opt_scalex * @param {number=} opt_scaley * @param {boolean=} opt_blend * @param {boolean=} opt_invtexcoord * @param {number=} opt_alpha * @param {vec4=} opt_color * @param {Texture=} opt_blendtexture */ Texture.prototype.Blit = function(x, y, opt_z, opt_angle, opt_scalex, opt_scaley, opt_blend, opt_invtexcoord, opt_alpha, opt_color, opt_blendtexture) { /** @type {number} */ var z = opt_z || 0; /** @type {number} */ var angle = opt_angle || 0; /** @type {number} */ var scalex = opt_scalex || 1; /** @type {number} */ var scaley = opt_scaley || 1; /** @type {boolean} */ var blend = opt_blend || false; /** @type {boolean} */ var invtexcoord = opt_invtexcoord ||false; /** @type {number} */ var alpha = opt_alpha || 1.0; /** @type {Texture} */ var blendtexture = opt_blendtexture || null; if (this.ready) { /** @type {number} */ var w = this.width; /** @type {number} */ var h = this.height; /** @type {number} */ var xr = this.width/2; /** @type {number} */ var yr = this.height/2; this.engine.PushMatrices(); this.engine.SetOrtho2D(); angle = MathUtils.Deg2Rad(angle); /** @type {mat4} */ var model = new mat4(); if(angle > 0) { model.SetFromArray([Math.cos(angle)*scalex, Math.sin(angle)*scaley,0,0,-Math.sin(angle)*scalex,Math.cos(angle)*scaley,0,0,0,0,1,0,-Math.cos(angle)*scalex*xr + Math.sin(angle)*scalex*yr + scalex*xr + x,-Math.cos(angle)*scaley*yr - Math.sin(angle)*scaley*xr + scaley*yr + y,z,1]); } else { model.Translation(x,y,z); /** @type {mat4} */ var scaleMat = new mat4(); scaleMat.Scale(scalex, scaley, 1.0); model.Multiply(model, scaleMat); } this.engine.SetModelMatrix(model); if (goog.isNull(this.blitMesh)) { this.blitMesh = new Surface(this.engine); if (!invtexcoord) { this.blitMesh.SetBufferPoi( [0,0,0, 0,1, w,0,0, 1,1, w,h,0, 1,0, 0,h,0, 0,0]); } else { this.blitMesh.SetBufferPoi( [0,0,0, 0,0, w,0,0, 1,0, w,h,0, 1,1, 0,h,0, 0,1]); } this.blitMesh.SetIndexBuffer([0,1,2,0,2,3], "TRIANGLES"); this.blitMesh.SetTexture(this); } if (blend) { this.engine.gl.enable(this.engine.gl.BLEND); this.engine.gl.disable(this.engine.gl.DEPTH_TEST); this.engine.gl.depthFunc(this.engine.gl.LEQUAL); this.engine.gl.blendFunc(this.engine.gl.SRC_ALPHA,this.engine.gl.ONE_MINUS_SRC_ALPHA); } else { this.engine.gl.disable(this.engine.gl.BLEND); } if (alpha < 1.0) { this.engine.gl.blendColor(0,0,0,alpha); this.engine.gl.blendFunc(this.engine.gl.CONSTANT_ALPHA, this.engine.gl.ONE_MINUS_CONSTANT_ALPHA); } if (blendtexture) { this.gl.activeTexture(this.gl.TEXTURE1); this.gl.bindTexture(this.gl.TEXTURE_2D, blendtexture.texture); } this.blitMesh.Draw(null, null, null, null, opt_color); if (blendtexture) { this.gl.activeTexture(this.gl.TEXTURE1); this.gl.bindTexture(this.gl.TEXTURE_2D, null); this.gl.activeTexture(this.gl.TEXTURE0); } if (blend) { this.engine.gl.disable(this.engine.gl.BLEND); this.engine.gl.enable(this.engine.gl.DEPTH_TEST); } this.engine.PopMatrices(); } } //------------------------------------------------------------------------------ /** * @description Free all memory, especially the GPU buffers. * @ignore */ Texture.prototype.Destroy = function() { this.engine.gl.deleteTexture(this.texture); this.texture = null; this.ready = false; this.failed = false; if (this.blitMesh) { this.blitMesh.Destroy(); this.blitMesh = null; } this._DestroyFBO(); } //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ /** * @description Load Default Font Texture * @ignore */ Texture.prototype.LoadFontTexture = function() { this.loadTexture(owg.ARTWORK_PATH + "font.png"); } //------------------------------------------------------------------------------ /** * @description Load Default "empty" (nodata) texture * @ignore */ Texture.prototype.LoadNoDataTexture = function() { this.loadTexture(owg.ARTWORK_PATH + "nodata.png"); } //------------------------------------------------------------------------------ /** * @description Load Logo * @ignore */ Texture.prototype.LoadLogo = function() { this.loadTexture(owg.ARTWORK_PATH + "sphere64.png"); } //------------------------------------------------------------------------------ /** * @description Load Compass Background * @ignore */ Texture.prototype.LoadCompassBackground = function() { this.loadTexture(owg.ARTWORK_PATH + "flightnavigation/cmpbg.png"); } //------------------------------------------------------------------------------ /** * @description Load Compass Rose * @ignore */ Texture.prototype.LoadCompassRose = function() { this.loadTexture(owg.ARTWORK_PATH + "flightnavigation/cmpr.png"); } //------------------------------------------------------------------------------ /** * @description Binds the internal framebuffer if this texture is used as render target * In most cases this shoulnd't called directy. Use engine->PushRenderTarget(texture) */ Texture.prototype._EnableRenderToTexture = function() { if(this.usedAsRenderTarget) { this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, this.rttFramebuffer); this.gl.viewport(0, 0, this.rttFramebuffer.width, this.rttFramebuffer.height); } } //------------------------------------------------------------------------------ /** * @description unbinds the internal framebuffer if this texture is used as render target * In most cases this shoulnd't called directy. Use engine->PopRenderTarget() */ Texture.prototype._DisableRenderToTexture = function() { //this.gl.bindTexture(this.gl.TEXTURE_2D, rttTexture); this.gl.bindTexture(this.gl.TEXTURE_2D, null); this.gl.bindFramebuffer(this.gl.FRAMEBUFFER, null); this.gl.viewport(0, 0, this.engine.width, this.engine.height); } //------------------------------------------------------------------------------ /** * @description copies the texture * param {Texture} texture */ Texture.prototype.CopyFrom = function(texture) { this.texture = texture.texture; this.ready = texture.ready; this.failed = texture.failed; this.blitMesh = texture.blitMesh; this.width = texture.blitMesh; this.height = texture.blitMesh; } goog.exportSymbol('Texture', Texture); goog.exportProperty(Texture.prototype, 'CopyFrom', Texture.prototype.CopyFrom); goog.exportProperty(Texture.prototype, 'Blit', Texture.prototype.Blit); goog.exportProperty(Texture.prototype, '_EnableRenderToTexture', Texture.prototype._EnableRenderToTexture); goog.exportProperty(Texture.prototype, '_DisableRenderToTexture', Texture.prototype._DisableRenderToTexture);
//>>built define({smiley:"\u9854\u6587\u5b57\u306e\u633f\u5165",emoticonSmile:"\u7b11\u9854",emoticonLaughing:"\u5927\u7b11\u3044",emoticonWink:"\u30a6\u30a3\u30f3\u30af",emoticonGrin:"\u306b\u3084\u308a",emoticonCool:"\u30af\u30fc\u30eb",emoticonAngry:"\u6012\u308a",emoticonHalf:"\u3084\u3084\u4e0d\u6e80",emoticonEyebrow:"\u9a5a\u304d",emoticonFrown:"\u3057\u304b\u3081\u9762",emoticonShy:"\u6238\u60d1\u3044",emoticonGoofy:"\u304a\u3084\u304a\u3084",emoticonOops:"\u3057\u307e\u3063\u305f",emoticonTongue:"\u820c\u3092\u51fa\u3059", emoticonIdea:"\u3072\u3089\u3081\u304d",emoticonYes:"\u306f\u3044",emoticonNo:"\u3044\u3044\u3048",emoticonAngel:"\u5929\u4f7f",emoticonCrying:"\u6ce3\u304d\u9854",emoticonHappy:"\u5e78\u305b"});
/* evol.colorpicker 3.2.1 ColorPicker widget for jQuery UI https://github.com/evoluteur/colorpicker (c) 2015 Olivier Giulieri * Depends: * jquery.ui.core.js * jquery.ui.widget.js */ (function( $, undefined ) { var _idx=0, ua=window.navigator.userAgent, isIE=ua.indexOf("MSIE ")>0, _ie=isIE?'-ie':'', isMoz=isIE?false:/mozilla/.test(ua.toLowerCase()) && !/webkit/.test(ua.toLowerCase()), history=[], baseThemeColors=['ffffff','000000','eeece1','1f497d','4f81bd','c0504d','9bbb59','8064a2','4bacc6','f79646'], subThemeColors=['f2f2f2','7f7f7f','ddd9c3','c6d9f0','dbe5f1','f2dcdb','ebf1dd','e5e0ec','dbeef3','fdeada', 'd8d8d8','595959','c4bd97','8db3e2','b8cce4','e5b9b7','d7e3bc','ccc1d9','b7dde8','fbd5b5', 'bfbfbf','3f3f3f','938953','548dd4','95b3d7','d99694','c3d69b','b2a2c7','92cddc','fac08f', 'a5a5a5','262626','494429','17365d','366092','953734','76923c','5f497a','31859b','e36c09', '7f7f7f','0c0c0c','1d1b10','0f243e','244061','632423','4f6128','3f3151','205867','974806'], standardColors=['c00000','ff0000','ffc000','ffff00','92d050','00b050','00b0f0','0070c0','002060','7030a0'], webColors=[ ['003366','336699','3366cc','003399','000099','0000cc','000066'], ['006666','006699','0099cc','0066cc','0033cc','0000ff','3333ff','333399'], ['669999','009999','33cccc','00ccff','0099ff','0066ff','3366ff','3333cc','666699'], ['339966','00cc99','00ffcc','00ffff','33ccff','3399ff','6699ff','6666ff','6600ff','6600cc'], ['339933','00cc66','00ff99','66ffcc','66ffff','66ccff','99ccff','9999ff','9966ff','9933ff','9900ff'], ['006600','00cc00','00ff00','66ff99','99ffcc','ccffff','ccccff','cc99ff','cc66ff','cc33ff','cc00ff','9900cc'], ['003300','009933','33cc33','66ff66','99ff99','ccffcc','ffffff','ffccff','ff99ff','ff66ff','ff00ff','cc00cc','660066'], ['333300','009900','66ff33','99ff66','ccff99','ffffcc','ffcccc','ff99cc','ff66cc','ff33cc','cc0099','993399'], ['336600','669900','99ff33','ccff66','ffff99','ffcc99','ff9999','ff6699','ff3399','cc3399','990099'], ['666633','99cc00','ccff33','ffff66','ffcc66','ff9966','ff6666','ff0066','d60094','993366'], ['a58800','cccc00','ffff00','ffcc00','ff9933','ff6600','ff0033','cc0066','660033'], ['996633','cc9900','ff9900','cc6600','ff3300','ff0000','cc0000','990033'], ['663300','996600','cc3300','993300','990000','800000','993333'] ], transColor='#0000ffff', int2Hex=function(i){ var h=i.toString(16); if(h.length==1){ h='0'+h; } return h; }, st2Hex=function(s){ return int2Hex(Number(s)); }, int2Hex3=function(i){ var h=int2Hex(i); return h+h+h; }, toHex3=function(c){ if(c.length>10){ // IE9 var p1=1+c.indexOf('('), p2=c.indexOf(')'), cs=c.substring(p1,p2).split(','); return ['#',st2Hex(cs[0]),st2Hex(cs[1]),st2Hex(cs[2])].join(''); }else{ return c; } }; $.widget( "evol.colorpicker", { version: '3.2.1', options: { color: null, // example:'#31859B' showOn: 'both', // possible values: 'focus','button','both' hideButton: false, displayIndicator: true, transparentColor: false, history: true, defaultPalette: 'theme', // possible values: 'theme', 'web' strings: 'Theme Colors,Standard Colors,Web Colors,Theme Colors,Back to Palette,History,No history yet.' }, // this is only true while showing the palette until color is chosen _active: false, _create: function() { var that=this; this._paletteIdx=this.options.defaultPalette=='theme'?1:2; this._id='evo-cp'+_idx++; this._enabled=true; this.options.showOn=this.options.hideButton?'focus':this.options.showOn; switch(this.element.get(0).tagName){ case 'INPUT': var color=this.options.color, e=this.element, css=((this.options.showOn==='focus')?'':'evo-pointer ')+'evo-colorind'+(isMoz?'-ff':_ie)+(this.options.hideButton?' evo-hidden-button':''), style=''; this._isPopup=true; this._palette=null; if(color!==null){ e.val(color); }else{ var v=e.val(); if(v!==''){ color=this.options.color=v; } } if(color===transColor){ css+=' evo-transparent'; }else{ style=(color!==null)?('background-color:'+color):''; } e.addClass('colorPicker '+this._id) .wrap('<div style="width:'+(this.options.hideButton?this.element.width():this.element.width()+32)+'px;'+ (isIE?'margin-bottom:-21px;':'')+ (isMoz?'padding:1px 0;':'')+ '"></div>') .after('<div class="'+css+'" style="'+style+'"></div>') .on('keyup onpaste', function(evt){ var c=$(this).val(); if(c!=that.options.color){ that._setValue(c, true); } }); var showOn=this.options.showOn; if(showOn==='both' || showOn==='focus'){ e.on('focus', function(){ that.showPalette(); }); } if(showOn==='both' || showOn==='button'){ e.next().on('click', function(evt){ evt.stopPropagation(); that.showPalette(); }); } break; default: this._isPopup=false; this._palette=this.element.html(this._paletteHTML()) .attr('aria-haspopup','true'); this._bindColors(); } if(this.options.history){ if(color){ this._add2History(color); } if (this.options.initialHistory) { var c = this.options.initialHistory; for (var i in c){ this._add2History(c[i]); } } } }, _paletteHTML: function() { var pIdx=this._paletteIdx=Math.abs(this._paletteIdx), opts=this.options, labels=opts.strings.split(','); var h='<div class="evo-pop'+_ie+' ui-widget ui-widget-content ui-corner-all"'+ (this._isPopup?' style="position:absolute"':'')+'>'+ // palette '<span>'+this['_paletteHTML'+pIdx]()+'</span>'+ // links '<div class="evo-more"><a href="javascript:void(0)">'+labels[1+pIdx]+'</a>'; if(opts.history){ h+='<a href="javascript:void(0)" class="evo-hist">'+labels[5]+'</a>'; } h+='</div>'; // indicator if(opts.displayIndicator){ h+=this._colorIndHTML(this.options.color)+this._colorIndHTML(''); } h+='</div>'; return h; }, _colorIndHTML: function(c) { var css=isIE?'evo-colorbox-ie ':'', style=''; if(c){ if(c===transColor){ css+='evo-transparent'; }else{ style='background-color:'+c; } }else{ style='display:none'; } return '<div class="evo-color" style="float:left">'+ '<div style="'+style+'" class="'+css+'"></div><span>'+ // class="evo-colortxt-ie" (c?c:'')+'</span></div>'; }, _paletteHTML1: function() { var opts=this.options, labels=opts.strings.split(','), oTD='<td style="background-color:#', cTD=isIE?'"><div style="width:2px;"></div></td>':'"><span/></td>', oTRTH='<tr><th colspan="10" class="ui-widget-content">'; // base theme colors var h='<table class="evo-palette'+_ie+'">'+oTRTH+labels[0]+'</th></tr><tr>'; for(var i=0;i<10;i++){ h+=oTD+baseThemeColors[i]+cTD; } h+='</tr>'; if(!isIE){ h+='<tr><th colspan="10"></th></tr>'; } h+='<tr class="top">'; // theme colors for(i=0;i<10;i++){ h+=oTD+subThemeColors[i]+cTD; } for(var r=1;r<4;r++){ h+='</tr><tr class="in">'; for(i=0;i<10;i++){ h+=oTD+subThemeColors[r*10+i]+cTD; } } h+='</tr><tr class="bottom">'; for(i=40;i<50;i++){ h+=oTD+subThemeColors[i]+cTD; } h+='</tr>'+oTRTH; // transparent color if(opts.transparentColor){ h+='<div class="evo-transparent evo-tr-box"></div>'; } h+=labels[1]+'</th></tr><tr>'; // standard colors for(i=0;i<10;i++){ h+=oTD+standardColors[i]+cTD; } h+='</tr></table>'; return h; }, _paletteHTML2: function() { var i, iMax, oTD='<td style="background-color:#', cTD=isIE?'"><div style="width:5px;"></div></td>':'"><span/></td>', oTableTR='<table class="evo-palette2'+_ie+'"><tr>', cTableTR='</tr></table>'; var h='<div class="evo-palcenter">'; // hexagon colors for(var r=0,rMax=webColors.length;r<rMax;r++){ h+=oTableTR; var cs=webColors[r]; for(i=0,iMax=cs.length;i<iMax;i++){ h+=oTD+cs[i]+cTD; } h+=cTableTR; } h+='<div class="evo-sep"/>'; // gray scale colors var h2=''; h+=oTableTR; for(i=255;i>10;i-=10){ h+=oTD+int2Hex3(i)+cTD; i-=10; h2+=oTD+int2Hex3(i)+cTD; } h+=cTableTR+oTableTR+h2+cTableTR+'</div>'; return h; }, _switchPalette: function(link) { if(this._enabled){ var idx, content, label, labels=this.options.strings.split(','); if($(link).hasClass('evo-hist')){ // history var h=['<table class="evo-palette"><tr><th class="ui-widget-content">', labels[5], '</th></tr></tr></table>', '<div class="evo-cHist">']; if(history.length===0){ h.push('<p>&nbsp;',labels[6],'</p>'); }else{ for(var i=history.length-1;i>-1;i--){ if(history[i].length===9){ h.push('<div class="evo-transparent"></div>'); }else{ h.push('<div style="background-color:',history[i],'"></div>'); } } } h.push('</div>'); idx=-this._paletteIdx; content=h.join(''); label=labels[4]; }else{ // palette if(this._paletteIdx<0){ idx=-this._paletteIdx; this._palette.find('.evo-hist').show(); }else{ idx=(this._paletteIdx==2)?1:2; } content=this['_paletteHTML'+idx](); label=labels[idx+1]; this._paletteIdx=idx; } this._paletteIdx=idx; var e=this._palette.find('.evo-more') .prev().html(content).end() .children().eq(0).html(label); if(idx<0){ e.next().hide(); } } }, showPalette: function() { if(this._enabled){ this._active=true; $('.colorPicker').not('.'+this._id).colorpicker('hidePalette'); if(this._palette===null){ this._palette=this.element.next() .after(this._paletteHTML()).next() .on('click',function(evt){ evt.stopPropagation(); }); this._bindColors(); var that=this; if(this._isPopup){ $(document.body).on('click.'+that._id, function(evt){ if(evt.target!=that.element.get(0)){ that.hidePalette(); } }).on('keyup.'+that._id, function(evt){ if(evt.keyCode===27){ that.hidePalette(); } }); } } } return this; }, hidePalette: function() { if(this._isPopup && this._palette){ $(document.body).off('click.'+this._id); var that=this; this._palette.off('mouseover click', 'td,.evo-transparent') .fadeOut(function(){ that._palette.remove(); that._palette=that._cTxt=null; }) .find('.evo-more a').off('click'); } return this; }, _bindColors: function() { var that=this, opts=this.options, es=this._palette.find('div.evo-color'), sel=opts.history?'td,.evo-cHist>div':'td'; if(opts.transparentColor){ sel+=',.evo-transparent'; } this._cTxt1=es.eq(0).children().eq(0); this._cTxt2=es.eq(1).children().eq(0); this._palette .on('click', sel, function(evt){ if(that._enabled){ var $this=$(this); that._setValue($this.hasClass('evo-transparent')?transColor:toHex3($this.attr('style').substring(17))); that._active=false; } }) .on('mouseover', sel, function(evt){ if(that._enabled){ var $this=$(this), c=$this.hasClass('evo-transparent')?transColor:toHex3($this.attr('style').substring(17)); if(that.options.displayIndicator){ that._setColorInd(c,2); } if(that._active){ that.element.trigger('mouseover.color', c); } } }) .find('.evo-more a').on('click', function(){ that._switchPalette(this); }); }, val: function(value) { if (typeof value=='undefined') { return this.options.color; }else{ this._setValue(value); return this; } }, _setValue: function(c, noHide) { c = c.replace(/ /g,''); this.options.color=c; if(this._isPopup){ if(!noHide){ this.hidePalette(); } this._setBoxColor(this.element.val(c).next(), c); }else{ this._setColorInd(c,1); } if(this.options.history && this._paletteIdx>0){ this._add2History(c); } this.element.trigger('change.color', c); }, _setColorInd: function(c, idx) { var $box=this['_cTxt'+idx]; this._setBoxColor($box, c); $box.next().html(c); }, _setBoxColor: function($box, c) { if(c===transColor){ $box.addClass('evo-transparent') .removeAttr('style'); }else{ $box.removeClass('evo-transparent') .attr('style','background-color:'+c); } }, _setOption: function(key, value) { if(key=='color'){ this._setValue(value, true); }else{ this.options[key]=value; } }, _add2History: function(c) { var iMax=history.length; // skip color if already in history for(var i=0;i<iMax;i++){ if(c==history[i]){ return; } } // limit of 28 colors in history if(iMax>27){ history.shift(); } // add to history history.push(c); }, clear: function(){ this.hidePalette().val(''); }, enable: function() { var e=this.element; if(this._isPopup){ e.removeAttr('disabled'); }else{ e.css({ 'opacity': '1', 'pointer-events': 'auto' }); } if(this.options.showOn!=='focus'){ this.element.next().addClass('evo-pointer'); } e.removeAttr('aria-disabled'); this._enabled=true; return this; }, disable: function() { var e=this.element; if(this._isPopup){ e.attr('disabled', 'disabled'); }else{ this.hidePalette(); e.css({ 'opacity': '0.3', 'pointer-events': 'none' }); } if(this.options.showOn!=='focus'){ this.element.next().removeClass('evo-pointer'); } e.attr('aria-disabled','true'); this._enabled=false; return this; }, isDisabled: function() { return !this._enabled; }, destroy: function() { $(document.body).off('click.'+this._id); if(this._palette){ this._palette.off('mouseover click', 'td,.evo-cHist>div,.evo-transparent') .find('.evo-more a').off('click'); if(this._isPopup){ this._palette.remove(); } this._palette=this._cTxt=null; } if(this._isPopup){ this.element .next().off('click').remove() .end().off('focus').unwrap(); } this.element.removeClass('colorPicker '+this.id).empty(); $.Widget.prototype.destroy.call(this); } }); })(jQuery);
// All material copyright ESRI, All Rights Reserved, unless otherwise specified. // See http://js.arcgis.com/3.17/esri/copyright.txt for details. //>>built define("esri/opsdashboard/FeatureActionFeatures",["dojo/_base/declare","./core/messageHandler"],function(d,c){return d(null,{dataSourceProxy:null,constructor:function(a){this.dataSourceProxy=a;this._featureIds={}},_addFeature:function(a){if(!this.dataSourceProxy||!a)return null;var b=a;if("object"===typeof a){if(!a.attributes||!a.attributes[this.dataSourceProxy.objectIdFieldName])return null;b=a.attributes[this.dataSourceProxy.objectIdFieldName]}return this._featureIds[b]=b},addFeature:function(a){this.dataSourceProxy&& (a=this._addFeature(a))&&c._sendMessage({functionName:"featureActionFeaturesAdded",args:{dataSourceId:this.dataSourceProxy.id,objectIds:[a]}})},addFeatures:function(a){if(this.dataSourceProxy&&Array.isArray(a)&&0!==a.length){var b=[];a.forEach(function(a){(a=this._addFeature(a))&&b.push(a)},this);0!==b.length&&c._sendMessage({functionName:"featureActionFeaturesAdded",args:{dataSourceId:this.dataSourceProxy.id,objectIds:b}})}},_removeFeature:function(a){if(!this.dataSourceProxy||!a)return null;var b= a;if("object"===typeof a){if(!a.attributes||!a.attributes[this.dataSourceProxy.objectIdFieldName])return null;b=a.attributes[this.dataSourceProxy.objectIdFieldName]}if(!this._featureIds[b])return null;delete this._featureIds[b];return b},removeFeature:function(a){this.dataSourceProxy&&(a=this._removeFeature(a))&&c._sendMessage({functionName:"featureActionFeaturesRemoved",args:{dataSourceId:this.dataSourceProxy.id,objectIds:[a]}})},removeFeatures:function(a){if(this.dataSourceProxy&&Array.isArray(a)&& 0!==a.length){var b=[];a.forEach(function(a){(a=this._removeFeature(a))&&b.push(a)},this);0!==b.length&&c._sendMessage({functionName:"featureActionFeaturesRemoved",args:{dataSourceId:this.dataSourceProxy.id,objectIds:b}})}},clear:function(){this.dataSourceProxy&&(this._featureIds={},c._sendMessage({functionName:"featureActionFeaturesClear"}))},indexOf:function(a){if(!this.dataSourceProxy||!a)return-1;var b=a;if("object"===typeof a){if(!a.attributes||!a.attributes[this.dataSourceProxy.objectIdFieldName])return-1; b=a.attributes[this.dataSourceProxy.objectIdFieldName]}return this._featureIds[b]||-1},contains:function(a){return-1!==this.indexOf(a)}})});
/**@module request-listener*/ modules.define('request-listener', ['app-navigation'], function (provide, navigation, RequestListener) { "use strict"; /** * @class RequestListener * @extends BEM * @exports */ provide(RequestListener.decl(/**@lends RequestListener.prototype*/{ /** * @returns {boolean} */ isNeedToProcessInitialRequest: function () { return navigation.isNeedToProcessInitialRequest(); }, /** * @returns {{request: {url: string, isUrlUpdated: boolean, method: string}}} */ getInitialRequestData: function () { return navigation.getInitialRequestData(); } })); });
// This file is part of Indico. // Copyright (C) 2002 - 2019 CERN // // Indico is free software; you can redistribute it and/or // modify it under the terms of the MIT License; see the // LICENSE file for more details. (function($) { 'use strict'; $.widget('indico.actioninput', $.indico.clearableinput, { options: { actionCallback: function() {}, actionIcon: 'icon-checkmark', alwaysClearable: true, enterKeyEnabled: true, }, _create: function() { var self = this; var input = self.element; self._super(); self.actionIcon = $( '<a class="i-link accept hide-if-locked {0}"></a>'.format(self.options.actionIcon) ) .css('line-height', input.css('height')) .click(function() { self._action(); }); input.on('keydown keypress', function(e) { if (e.which === K.ENTER && self.options.enterKeyEnabled) { self._action(); } }); self.buttonBox.prepend(self.actionIcon); input.addClass('actionabletext'); }, _action: function() { var self = this; var opt = self.options; var input = self.element; opt.actionCallback(); if (opt.focusOnClear) { input.focus(); } else { input.blur(); } }, initSize: function(fontSize, lineHeight) { var self = this; self._super(fontSize, lineHeight); self.actionIcon.css('font-size', self.size.fontSize); self.actionIcon.css('line-height', self.size.lineHeight); }, setIconsVisibility: function(visibility) { var self = this; self._super(visibility); self.actionIcon.css('visibility', visibility); }, }); })(jQuery);
module.exports = /******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ exports: {}, /******/ id: moduleId, /******/ loaded: false /******/ }; /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ // Flag the module as loaded /******/ module.loaded = true; /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ // __webpack_public_path__ /******/ __webpack_require__.p = "/dist/"; /******/ // Load entry module and return exports /******/ return __webpack_require__(0); /******/ }) /************************************************************************/ /******/ ({ /***/ 0: /***/ function(module, exports, __webpack_require__) { module.exports = __webpack_require__(81); /***/ }, /***/ 3: /***/ function(module, exports) { /* globals __VUE_SSR_CONTEXT__ */ // this module is a runtime utility for cleaner component module output and will // be included in the final webpack user bundle module.exports = function normalizeComponent ( rawScriptExports, compiledTemplate, injectStyles, scopeId, moduleIdentifier /* server only */ ) { var esModule var scriptExports = rawScriptExports = rawScriptExports || {} // ES6 modules interop var type = typeof rawScriptExports.default if (type === 'object' || type === 'function') { esModule = rawScriptExports scriptExports = rawScriptExports.default } // Vue.extend constructor export interop var options = typeof scriptExports === 'function' ? scriptExports.options : scriptExports // render functions if (compiledTemplate) { options.render = compiledTemplate.render options.staticRenderFns = compiledTemplate.staticRenderFns } // scopedId if (scopeId) { options._scopeId = scopeId } var hook if (moduleIdentifier) { // server build hook = function (context) { // 2.3 injection context = context || (this.$vnode && this.$vnode.ssrContext) // 2.2 with runInNewContext: true if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') { context = __VUE_SSR_CONTEXT__ } // inject component styles if (injectStyles) { injectStyles.call(this, context) } // register component module identifier for async chunk inferrence if (context && context._registeredComponents) { context._registeredComponents.add(moduleIdentifier) } } // used by ssr in case component is cached and beforeCreate // never gets called options._ssrRegister = hook } else if (injectStyles) { hook = injectStyles } if (hook) { // inject component registration as beforeCreate hook var existing = options.beforeCreate options.beforeCreate = existing ? [].concat(existing, hook) : [hook] } return { esModule: esModule, exports: scriptExports, options: options } } /***/ }, /***/ 14: /***/ function(module, exports) { module.exports = require("element-ui/lib/mixins/emitter"); /***/ }, /***/ 81: /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _collapseItem = __webpack_require__(82); var _collapseItem2 = _interopRequireDefault(_collapseItem); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } /* istanbul ignore next */ _collapseItem2.default.install = function (Vue) { Vue.component(_collapseItem2.default.name, _collapseItem2.default); }; exports.default = _collapseItem2.default; /***/ }, /***/ 82: /***/ function(module, exports, __webpack_require__) { var Component = __webpack_require__(3)( /* script */ __webpack_require__(83), /* template */ __webpack_require__(85), /* styles */ null, /* scopeId */ null, /* moduleIdentifier (server only) */ null ) module.exports = Component.exports /***/ }, /***/ 83: /***/ function(module, exports, __webpack_require__) { 'use strict'; exports.__esModule = true; var _collapseTransition = __webpack_require__(84); var _collapseTransition2 = _interopRequireDefault(_collapseTransition); var _emitter = __webpack_require__(14); var _emitter2 = _interopRequireDefault(_emitter); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } // // // // // // // // // // // // // // // exports.default = { name: 'ElCollapseItem', componentName: 'ElCollapseItem', mixins: [_emitter2.default], components: { ElCollapseTransition: _collapseTransition2.default }, data: function data() { return { contentWrapStyle: { height: 'auto', display: 'block' }, contentHeight: 0 }; }, props: { title: String, name: { type: [String, Number], default: function _default() { return this._uid; } } }, computed: { isActive: function isActive() { return this.$parent.activeNames.indexOf(this.name) > -1; } }, watch: { 'isActive': function isActive(value) {} }, methods: { handleHeaderClick: function handleHeaderClick() { this.dispatch('ElCollapse', 'item-click', this); } }, mounted: function mounted() {} }; /***/ }, /***/ 84: /***/ function(module, exports) { module.exports = require("element-ui/lib/transitions/collapse-transition"); /***/ }, /***/ 85: /***/ function(module, exports) { module.exports={render:function (){var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h; return _c('div', { staticClass: "el-collapse-item", class: { 'is-active': _vm.isActive } }, [_c('div', { staticClass: "el-collapse-item__header", on: { "click": _vm.handleHeaderClick } }, [_c('i', { staticClass: "el-collapse-item__header__arrow el-icon-arrow-right" }), _vm._t("title", [_vm._v(_vm._s(_vm.title))])], 2), _c('el-collapse-transition', [_c('div', { directives: [{ name: "show", rawName: "v-show", value: (_vm.isActive), expression: "isActive" }], staticClass: "el-collapse-item__wrap" }, [_c('div', { staticClass: "el-collapse-item__content" }, [_vm._t("default")], 2)])])], 1) },staticRenderFns: []} /***/ } /******/ });
/** * @module inputex-list */ var lang = Y.Lang, inputEx = Y.inputEx; /** * Meta field to create a list of other fields * @class inputEx.ListField * @extends inputEx.Field * @constructor * @param options Added options: * <ul> * <li>sortable: Add arrows to sort the items if true (default false)</li> * <li>elementType: an element type definition (default is {type: 'string'})</li> * <li>useButtons: use buttons instead of links (default false)</li> * <li>unique: require values to be unique (default false)</li> * <li>listAddLabel: if useButtons is false, text to add an item</li> * <li>listRemoveLabel: if useButtons is false, text to remove an item</li> * <li>maxItems: maximum number of items (leave undefined if no maximum, default)</li> * <li>minItems: minimum number of items to validate (leave undefined if no minimum, default)</li> * </ul> */ inputEx.ListField = function(options) { /** * List of all the subField instances * @property subFields */ this.subFields = []; inputEx.ListField.superclass.constructor.call(this, options); }; Y.extend(inputEx.ListField,inputEx.Field, { /** * Colors for the animation * @property arrowAnimColors */ arrowAnimColors: { from: "#FFFF99", to: "#FFFFFF" }, /** * Set the ListField classname * @method setOptions * @param {Object} options Options object as passed to the constructor */ setOptions: function(options) { inputEx.ListField.superclass.setOptions.call(this, options); this.messages = Y.mix(this.messages, Y.Intl.get("inputex-list")); this.options.className = options.className ? options.className : 'inputEx-Field inputEx-ListField'; this.options.sortable = lang.isUndefined(options.sortable) ? false : options.sortable; this.options.elementType = options.elementType || {type: 'string'}; this.options.useButtons = lang.isUndefined(options.useButtons) ? false : options.useButtons; this.options.unique = lang.isUndefined(options.unique) ? false : options.unique; this.options.listAddLabel = options.listAddLabel || this.messages.listAddLink; this.options.listRemoveLabel = options.listRemoveLabel || this.messages.listRemoveLink; this.options.maxItems = options.maxItems; this.options.minItems = options.minItems; }, /** * Render the addButton * @method renderComponent */ renderComponent: function() { // Add element button if(this.options.useButtons) { this.addButton = inputEx.cn('img', {src: inputEx.spacerUrl, className: 'inputEx-ListField-addButton'}); this.fieldContainer.appendChild(this.addButton); } // List label this.fieldContainer.appendChild( inputEx.cn('span', null, {marginLeft: "4px"}, this.options.listLabel) ); // Div element to contain the children this.childContainer = inputEx.cn('div', {className: 'inputEx-ListField-childContainer'}); this.fieldContainer.appendChild(this.childContainer); // Add link if(!this.options.useButtons) { this.addButton = inputEx.cn('a', {className: 'inputEx-ListField-addLink'}, null, this.options.listAddLabel); this.fieldContainer.appendChild(this.addButton); } }, /** * Handle the click event on the add button * @method initEvents */ initEvents: function() { Y.one(this.addButton).on('click', this.onAddButton, this, true); }, /** * Validate each field * @method validate * @return {Boolean} true if all fields validate, required fields are not empty and unique constraint (if specified) is not violated */ validate: function() { var response = true; var uniques = {}; // Hash for unique values option var l = this.subFields.length; // Validate maxItems / minItems if( lang.isNumber(this.options.minItems) && l < this.options.minItems ) { response = false; } if( lang.isNumber(this.options.maxItems) && l > this.options.maxItems ) { response = false; } // Validate all the sub fields for (var i = 0 ; i < l && response; i++) { var input = this.subFields[i]; var state = input.getState(); input.setClassFromState(state); // update field classes (mark invalid fields...) if( state == inputEx.stateRequired || state == inputEx.stateInvalid ) { response = false; // but keep looping on fields to set classes } if(this.options.unique) { var hash = lang.dump(input.getValue()); if(uniques[hash]) { response = false; // not unique } else { uniques[hash] = true; } } } return response; }, /** * Set the value of all the subfields * @method setValue * @param {Array} value The list of values to set * @param {boolean} [sendUpdatedEvt] (optional) Wether this setValue should fire the 'updated' event or not (default is true, pass false to NOT send the event) */ setValue: function(value, sendUpdatedEvt) { if(!lang.isArray(value) ) { throw new Error("inputEx.ListField.setValue expected an array, got "+(typeof value)); } // Set the values (and add the lines if necessary) for(var i = 0 ; i < value.length ; i++) { if(i == this.subFields.length) { this.addElement(value[i]); } else { this.subFields[i].setValue(value[i], false); } } // Remove additional subFields var additionalElements = this.subFields.length-value.length; if(additionalElements > 0) { for(i = 0 ; i < additionalElements ; i++) { this.removeElement(value.length); } } inputEx.ListField.superclass.setValue.call(this, value, sendUpdatedEvt); }, /** * Return the array of values * @method getValue * @return {Array} The array */ getValue: function() { var values = []; for(var i = 0 ; i < this.subFields.length ; i++) { values[i] = this.subFields[i].getValue(); } return values; }, /** * Adds an element * @method addElement * @param {Any} The initial value of the subfield to create * @return {inputEx.Field} SubField added instance */ addElement: function(value) { // Render the subField var subFieldEl = this.renderSubField(value); if(this.options.name) { subFieldEl.setFieldName(this.options.name+"["+this.subFields.length+"]"); } // Adds it to the local list this.subFields.push(subFieldEl); return subFieldEl; }, /** * Re-set the name of all the fields (when we remove an element) * @method resetAllNames */ resetAllNames: function() { if(this.options.name) { for(var i = 0 ; i < this.subFields.length ; i++) { var subFieldEl = this.subFields[i]; subFieldEl.setFieldName(this.options.name+"["+i+"]"); } } }, /** * Add a new element to the list and fire updated event * @method onAddButton * @param {Event} e The original click event */ onAddButton: function(e) { e.halt(); // Prevent adding a new field if already at maxItems if( lang.isNumber(this.options.maxItems) && this.subFields.length >= this.options.maxItems ) { return; } // Add a field with no value var subFieldEl = this.addElement(); // Focus on this field subFieldEl.focus(); // Fire updated ! this.fireUpdatedEvt(); }, /** * Adds a new line to the List Field * @method renderSubField * @param {Any} The initial value of the subfield to create * @return {inputEx.Field} instance of the created field (inputEx.Field or derivative) */ renderSubField: function(value) { // Div that wraps the deleteButton + the subField var newDiv = inputEx.cn('div'), delButton; // Delete button if(this.options.useButtons) { delButton = inputEx.cn('img', {src: inputEx.spacerUrl, className: 'inputEx-ListField-delButton'}); Y.one(delButton).on('click', this.onDelete, this); newDiv.appendChild( delButton ); } // Instantiate the new subField var opts = Y.merge({}, this.options.elementType); // New prefered way to set options of a field if (!lang.isUndefined(value)) { opts.value = value; } var el = inputEx(opts,this); var subFieldEl = el.getEl(); Y.one(subFieldEl).addClass('inputEx-ListField-subFieldEl'); newDiv.appendChild( subFieldEl ); // Subscribe the onChange event to resend it el.on("updated",this.onChange, this, true); // Arrows to order: if(this.options.sortable) { var arrowUp = inputEx.cn('div', {className: 'inputEx-ListField-Arrow inputEx-ListField-ArrowUp'}); Y.one(arrowUp).on('click', this.onArrowUp, this); var arrowDown = inputEx.cn('div', {className: 'inputEx-ListField-Arrow inputEx-ListField-ArrowDown'}); Y.one(arrowDown).on('click', this.onArrowDown, this, true); newDiv.appendChild( arrowUp ); newDiv.appendChild( arrowDown ); } // Delete link if(!this.options.useButtons) { delButton = inputEx.cn('a', {className: 'inputEx-ListField-delLink'}, null, this.options.listRemoveLabel); Y.one(delButton).on('click', this.onDelete, this); newDiv.appendChild( delButton ); } // Line breaker newDiv.appendChild( inputEx.cn('div', null, {clear: "both"}) ); this.childContainer.appendChild(newDiv); return el; }, /** * Switch a subField with its previous one * Called when the user clicked on the up arrow of a sortable list * @method onArrowUp * @param {Event} e Original click event */ onArrowUp: function(e) { var childElement = e.target._node.parentNode; var previousChildNode = null; var nodeIndex = -1; for(var i = 1 ; i < childElement.parentNode.childNodes.length ; i++) { var el=childElement.parentNode.childNodes[i]; if(el == childElement) { previousChildNode = childElement.parentNode.childNodes[i-1]; nodeIndex = i; break; } } if(previousChildNode) { // Remove the line var elToMove = this.childContainer.removeChild(childElement); // Adds it before the previousChildNode this.childContainer.insertBefore(elToMove, previousChildNode); // Swap this.subFields elements (i,i-1) var temp = this.subFields[nodeIndex]; this.subFields[nodeIndex] = this.subFields[nodeIndex-1]; this.subFields[nodeIndex-1] = temp; // Note: not very efficient, we could just swap the names this.resetAllNames(); // Color Animation if(this.arrowAnim) { this.arrowAnim.stop(true); } this.arrowAnim = new Y.Anim({node:elToMove, from: {backgroundColor: this.arrowAnimColors.from}, to : {backgroundColor: this.arrowAnimColors.to },duration: 0.4}); this.arrowAnim.on("end",function() { Y.one(elToMove).setStyle('backgroundColor', ''); }); this.arrowAnim.run(); // Fire updated ! this.fireUpdatedEvt(); } }, /** * Switch a subField with its next one * Called when the user clicked on the down arrow of a sortable list * @method onArrowDown * @param {Event} e Original click event */ onArrowDown: function(e) { var childElement = e.target._node.parentNode; var nodeIndex = -1; var nextChildNode = null; for(var i = 0 ; i < childElement.parentNode.childNodes.length ; i++) { var el=childElement.parentNode.childNodes[i]; if(el == childElement) { nextChildNode = childElement.parentNode.childNodes[i+1]; nodeIndex = i; break; } } if(nextChildNode) { // Remove the line var elToMove = this.childContainer.removeChild(childElement); // Adds it after the nextChildNode Y.one(nextChildNode).insert(elToMove, "after"); // Swap this.subFields elements (i,i+1) var temp = this.subFields[nodeIndex]; this.subFields[nodeIndex] = this.subFields[nodeIndex+1]; this.subFields[nodeIndex+1] = temp; // Note: not very efficient, we could just swap the names this.resetAllNames(); // Color Animation if(this.arrowAnim) { this.arrowAnim.stop(true); } this.arrowAnim = new Y.Anim({node: elToMove, from: {backgroundColor: this.arrowAnimColors.from}, to : {backgroundColor: this.arrowAnimColors.to }, duration: 1}); this.arrowAnim.on("end",function() { Y.one(elToMove).setStyle( 'backgroundColor', ''); }); this.arrowAnim.run(); // Fire updated ! this.fireUpdatedEvt(); } }, /** * Called when the user clicked on a delete button. * @method onDelete * @param {Event} e The original click event */ onDelete: function(e) { e.halt(); // Prevent removing a field if already at minItems if( lang.isNumber(this.options.minItems) && this.subFields.length <= this.options.minItems ) { return; } // Get the wrapping div element var elementDiv = e.target._node.parentNode; // Get the index of the subField var index = -1; var subFieldEl = elementDiv.childNodes[this.options.useButtons ? 1 : 0]; for(var i = 0 ; i < this.subFields.length ; i++) { if(this.subFields[i].getEl() == subFieldEl) { index = i; break; } } // Remove it if(index != -1) { this.removeElement(index); } // Note: not very efficient this.resetAllNames(); // Fire the updated event this.fireUpdatedEvt(); }, /** * Remove the line from the dom and the subField from the list. * @method removeElement * @param {integer} index The index of the element to remove */ removeElement: function(index) { var elementDiv = this.subFields[index].getEl().parentNode; this.subFields[index] = undefined; this.subFields = inputEx.compactArray(this.subFields); // Remove the element elementDiv.parentNode.removeChild(elementDiv); }, /** * Clear the field by setting the field value to this.options.value * @method clear * @param {boolean} [sendUpdatedEvt] (optional) Wether this clear should fire the 'updated' event or not (default is true, pass false to NOT send the event) */ clear: function(sendUpdatedEvt) { this.setValue(lang.isUndefined(this.options.value) ? [] : this.options.value, sendUpdatedEvt); } }); // Register this class as "list" type inputEx.registerType("list", inputEx.ListField, [ { type: 'string', label: 'List label', name: 'listLabel', value: ''}, { type: 'type', label: 'List element type', required: true, name: 'elementType' } ]);
Ext.define('MyApp.view.project.action.EditUserAction', { extend : 'MyApp.action.Action', icon : 'css/images/edit_16x16.png', requires : [ 'MyApp.view.project.EditUserWin' ], text : Locale.getMsg('view.common.edit'), panel : null, // TODO disableIfNoSelectionOrMoreThanOne:true, handler : function() { var me = this; Ext.widget('editUserWin', { panel : me.panel }).show(); }, switchStatus : function(projectRecord) { var me = this; if (me.disableIfNoSelectionOrMoreThanOne()) { return; } var result = MyApp.Validator.notProject1(projectRecord); // TODO determine it at ecfa action if (result !== true) { me.disable(); me.setTooltip(result); } else { me.enable(); me.setTooltip(''); } } });
var searchData= [ ['add_5fdemonstration',['add_demonstration',['../classintprim_1_1bayesian__interaction__primitives_1_1BayesianInteractionPrimitive.html#a47a076a1ad01545460f65ddd0b5d2ae7',1,'intprim.bayesian_interaction_primitives.BayesianInteractionPrimitive.add_demonstration(self, trajectory)'],['../classintprim_1_1bayesian__interaction__primitives_1_1BayesianInteractionPrimitive.html#a47a076a1ad01545460f65ddd0b5d2ae7',1,'intprim.bayesian_interaction_primitives.BayesianInteractionPrimitive.add_demonstration(self, trajectory)']]], ['align_5fobservations',['align_observations',['../classintprim_1_1filter_1_1kf_1_1KalmanFilter.html#a0c3f337fe61a0ea424d55a2be0eb7b8c',1,'intprim.filter.kf.KalmanFilter.align_observations(self, observed_trajectory, active_dofs)'],['../classintprim_1_1filter_1_1kf_1_1KalmanFilter.html#a0c3f337fe61a0ea424d55a2be0eb7b8c',1,'intprim.filter.kf.KalmanFilter.align_observations(self, observed_trajectory, active_dofs)']]], ['apply_5fcoefficients',['apply_coefficients',['../classintprim_1_1basis_1_1basis__model_1_1BasisModel.html#ab11bdcc1a2c77de9d8cef957d146195b',1,'intprim.basis.basis_model.BasisModel.apply_coefficients()'],['../classintprim_1_1basis_1_1mixture__model_1_1MixtureModel.html#a4a23784b8bb345d7d1995e51f5050d49',1,'intprim.basis.mixture_model.MixtureModel.apply_coefficients()'],['../classintprim_1_1basis_1_1basis__model_1_1BasisModel.html#ab11bdcc1a2c77de9d8cef957d146195b',1,'intprim.basis.basis_model.BasisModel.apply_coefficients()'],['../classintprim_1_1basis_1_1mixture__model_1_1MixtureModel.html#a4a23784b8bb345d7d1995e51f5050d49',1,'intprim.basis.mixture_model.MixtureModel.apply_coefficients()']]] ];
import createSvgIcon from './utils/createSvgIcon'; import { jsx as _jsx } from "react/jsx-runtime"; export default createSvgIcon( /*#__PURE__*/_jsx("path", { d: "M21.95 8.15c-.29-.16-.61-.31-.93-.46C19.4 4.33 15.98 2 12 2 8.02 2 4.6 4.33 2.99 7.68c-.33.15-.64.3-.93.46C1.41 8.5 1 9.17 1 9.91v4.18c0 .74.41 1.41 1.05 1.77.29.16.61.31.93.46C4.6 19.67 8.02 22 12 22c3.98 0 7.4-2.33 9.01-5.68.33-.15.64-.3.93-.46.65-.36 1.06-1.03 1.06-1.77V9.91c0-.74-.41-1.41-1.05-1.76zM12 4c2.37 0 4.49 1.04 5.95 2.68C16.17 6.25 14.15 6 12 6c-2.15 0-4.17.25-5.95.68C7.51 5.04 9.63 4 12 4zm0 16c-2.37 0-4.49-1.04-5.95-2.68 1.78.43 3.8.68 5.95.68s4.17-.25 5.95-.68C16.49 18.96 14.37 20 12 20z" }), 'PanoramaPhotosphereSelectOutlined');
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. * * @flow */ import type {InspectedElementPayload} from 'react-devtools-shared/src/backend/types'; import type {DehydratedData} from 'react-devtools-shared/src/devtools/views/Components/types'; import type {FrontendBridge} from 'react-devtools-shared/src/bridge'; import type Store from 'react-devtools-shared/src/devtools/store'; describe('InspectedElementContext', () => { let React; let ReactDOM; let hydrate; let meta; let bridge: FrontendBridge; let store: Store; const act = (callback: Function) => { callback(); jest.runAllTimers(); // Flush Bridge operations }; function dehydrateHelper( dehydratedData: DehydratedData | null, ): Object | null { if (dehydratedData !== null) { return hydrate( dehydratedData.data, dehydratedData.cleaned, dehydratedData.unserializable, ); } else { return null; } } async function read( id: number, path?: Array<string | number>, ): Promise<Object> { return new Promise((resolve, reject) => { const rendererID = ((store.getRendererIDForElement(id): any): number); const onInspectedElement = (payload: InspectedElementPayload) => { bridge.removeListener('inspectedElement', onInspectedElement); if (payload.type === 'full-data' && payload.value !== null) { payload.value.context = dehydrateHelper(payload.value.context); payload.value.props = dehydrateHelper(payload.value.props); payload.value.state = dehydrateHelper(payload.value.state); } resolve(payload); }; bridge.addListener('inspectedElement', onInspectedElement); bridge.send('inspectElement', {id, path, rendererID}); jest.runOnlyPendingTimers(); }); } beforeEach(() => { bridge = global.bridge; store = global.store; hydrate = require('react-devtools-shared/src/hydration').hydrate; meta = require('react-devtools-shared/src/hydration').meta; // Redirect all React/ReactDOM requires to the v15 UMD. // We use the UMD because Jest doesn't enable us to mock deep imports (e.g. "react/lib/Something"). jest.mock('react', () => jest.requireActual('react-15/dist/react.js')); jest.mock('react-dom', () => jest.requireActual('react-dom-15/dist/react-dom.js'), ); React = require('react'); ReactDOM = require('react-dom'); }); it('should inspect the currently selected element', async done => { const Example = () => null; act(() => ReactDOM.render(<Example a={1} b="abc" />, document.createElement('div')), ); const id = ((store.getElementIDAtIndex(0): any): number); const inspectedElement = await read(id); expect(inspectedElement).toMatchSnapshot('1: Initial inspection'); done(); }); it('should support simple data types', async done => { const Example = () => null; act(() => ReactDOM.render( <Example boolean_false={false} boolean_true={true} infinity={Infinity} integer_zero={0} integer_one={1} float={1.23} string="abc" string_empty="" nan={NaN} value_null={null} value_undefined={undefined} />, document.createElement('div'), ), ); const id = ((store.getElementIDAtIndex(0): any): number); const inspectedElement = await read(id); expect(inspectedElement).toMatchSnapshot('1: Initial inspection'); const {props} = inspectedElement.value; expect(props.boolean_false).toBe(false); expect(props.boolean_true).toBe(true); expect(Number.isFinite(props.infinity)).toBe(false); expect(props.integer_zero).toEqual(0); expect(props.integer_one).toEqual(1); expect(props.float).toEqual(1.23); expect(props.string).toEqual('abc'); expect(props.string_empty).toEqual(''); expect(props.nan).toBeNaN(); expect(props.value_null).toBeNull(); expect(props.value_undefined).toBeUndefined(); done(); }); it('should support complex data types', async done => { const Immutable = require('immutable'); const Example = () => null; const arrayOfArrays = [[['abc', 123, true], []]]; const div = document.createElement('div'); const exampleFunction = () => {}; const setShallow = new Set(['abc', 123]); const mapShallow = new Map([ ['name', 'Brian'], ['food', 'sushi'], ]); const setOfSets = new Set([new Set(['a', 'b', 'c']), new Set([1, 2, 3])]); const mapOfMaps = new Map([ ['first', mapShallow], ['second', mapShallow], ]); const objectOfObjects = { inner: {string: 'abc', number: 123, boolean: true}, }; const typedArray = Int8Array.from([100, -100, 0]); const arrayBuffer = typedArray.buffer; const dataView = new DataView(arrayBuffer); const immutableMap = Immutable.fromJS({ a: [{hello: 'there'}, 'fixed', true], b: 123, c: { '1': 'xyz', xyz: 1, }, }); class Class { anonymousFunction = () => {}; } const instance = new Class(); act(() => ReactDOM.render( <Example anonymous_fn={instance.anonymousFunction} array_buffer={arrayBuffer} array_of_arrays={arrayOfArrays} // eslint-disable-next-line no-undef big_int={BigInt(123)} bound_fn={exampleFunction.bind(this)} data_view={dataView} date={new Date(123)} fn={exampleFunction} html_element={div} immutable={immutableMap} map={mapShallow} map_of_maps={mapOfMaps} object_of_objects={objectOfObjects} react_element={<span />} regexp={/abc/giu} set={setShallow} set_of_sets={setOfSets} symbol={Symbol('symbol')} typed_array={typedArray} />, document.createElement('div'), ), ); const id = ((store.getElementIDAtIndex(0): any): number); const inspectedElement = await read(id); expect(inspectedElement).toMatchSnapshot('1: Initial inspection'); const { anonymous_fn, array_buffer, array_of_arrays, big_int, bound_fn, data_view, date, fn, html_element, immutable, map, map_of_maps, object_of_objects, react_element, regexp, set, set_of_sets, symbol, typed_array, } = inspectedElement.value.props; expect(anonymous_fn[meta.inspectable]).toBe(false); expect(anonymous_fn[meta.name]).toBe('function'); expect(anonymous_fn[meta.type]).toBe('function'); expect(anonymous_fn[meta.preview_long]).toBe('ƒ () {}'); expect(anonymous_fn[meta.preview_short]).toBe('ƒ () {}'); expect(array_buffer[meta.size]).toBe(3); expect(array_buffer[meta.inspectable]).toBe(false); expect(array_buffer[meta.name]).toBe('ArrayBuffer'); expect(array_buffer[meta.type]).toBe('array_buffer'); expect(array_buffer[meta.preview_short]).toBe('ArrayBuffer(3)'); expect(array_buffer[meta.preview_long]).toBe('ArrayBuffer(3)'); expect(array_of_arrays[0][meta.size]).toBe(2); expect(array_of_arrays[0][meta.inspectable]).toBe(true); expect(array_of_arrays[0][meta.name]).toBe('Array'); expect(array_of_arrays[0][meta.type]).toBe('array'); expect(array_of_arrays[0][meta.preview_long]).toBe('[Array(3), Array(0)]'); expect(array_of_arrays[0][meta.preview_short]).toBe('Array(2)'); expect(big_int[meta.inspectable]).toBe(false); expect(big_int[meta.name]).toBe('123'); expect(big_int[meta.type]).toBe('bigint'); expect(bound_fn[meta.inspectable]).toBe(false); expect(bound_fn[meta.name]).toBe('bound exampleFunction'); expect(bound_fn[meta.type]).toBe('function'); expect(bound_fn[meta.preview_long]).toBe('ƒ bound exampleFunction() {}'); expect(bound_fn[meta.preview_short]).toBe('ƒ bound exampleFunction() {}'); expect(data_view[meta.size]).toBe(3); expect(data_view[meta.inspectable]).toBe(false); expect(data_view[meta.name]).toBe('DataView'); expect(data_view[meta.type]).toBe('data_view'); expect(date[meta.inspectable]).toBe(false); expect(date[meta.type]).toBe('date'); expect(fn[meta.inspectable]).toBe(false); expect(fn[meta.name]).toBe('exampleFunction'); expect(fn[meta.type]).toBe('function'); expect(fn[meta.preview_long]).toBe('ƒ exampleFunction() {}'); expect(fn[meta.preview_short]).toBe('ƒ exampleFunction() {}'); expect(html_element[meta.inspectable]).toBe(false); expect(html_element[meta.name]).toBe('DIV'); expect(html_element[meta.type]).toBe('html_element'); expect(immutable[meta.inspectable]).toBeUndefined(); // Complex type expect(immutable[meta.name]).toBe('Map'); expect(immutable[meta.type]).toBe('iterator'); expect(map[meta.inspectable]).toBeUndefined(); // Complex type expect(map[meta.name]).toBe('Map'); expect(map[meta.type]).toBe('iterator'); expect(map[0][meta.type]).toBe('array'); expect(map_of_maps[meta.inspectable]).toBeUndefined(); // Complex type expect(map_of_maps[meta.name]).toBe('Map'); expect(map_of_maps[meta.type]).toBe('iterator'); expect(map_of_maps[0][meta.type]).toBe('array'); expect(object_of_objects.inner[meta.size]).toBe(3); expect(object_of_objects.inner[meta.inspectable]).toBe(true); expect(object_of_objects.inner[meta.name]).toBe(''); expect(object_of_objects.inner[meta.type]).toBe('object'); expect(object_of_objects.inner[meta.preview_long]).toBe( '{boolean: true, number: 123, string: "abc"}', ); expect(object_of_objects.inner[meta.preview_short]).toBe('{…}'); expect(react_element[meta.inspectable]).toBe(false); expect(react_element[meta.name]).toBe('span'); expect(react_element[meta.type]).toBe('react_element'); expect(regexp[meta.inspectable]).toBe(false); expect(regexp[meta.name]).toBe('/abc/giu'); expect(regexp[meta.preview_long]).toBe('/abc/giu'); expect(regexp[meta.preview_short]).toBe('/abc/giu'); expect(regexp[meta.type]).toBe('regexp'); expect(set[meta.inspectable]).toBeUndefined(); // Complex type expect(set[meta.name]).toBe('Set'); expect(set[meta.type]).toBe('iterator'); expect(set[0]).toBe('abc'); expect(set[1]).toBe(123); expect(set_of_sets[meta.inspectable]).toBeUndefined(); // Complex type expect(set_of_sets[meta.name]).toBe('Set'); expect(set_of_sets[meta.type]).toBe('iterator'); expect(set_of_sets['0'][meta.inspectable]).toBe(true); expect(symbol[meta.inspectable]).toBe(false); expect(symbol[meta.name]).toBe('Symbol(symbol)'); expect(symbol[meta.type]).toBe('symbol'); expect(typed_array[meta.inspectable]).toBeUndefined(); // Complex type expect(typed_array[meta.size]).toBe(3); expect(typed_array[meta.name]).toBe('Int8Array'); expect(typed_array[meta.type]).toBe('typed_array'); expect(typed_array[0]).toBe(100); expect(typed_array[1]).toBe(-100); expect(typed_array[2]).toBe(0); done(); }); it('should support objects with no prototype', async done => { const Example = () => null; const object = Object.create(null); object.string = 'abc'; object.number = 123; object.boolean = true; act(() => ReactDOM.render( <Example object={object} />, document.createElement('div'), ), ); const id = ((store.getElementIDAtIndex(0): any): number); const inspectedElement = await read(id); expect(inspectedElement).toMatchSnapshot('1: Initial inspection'); expect(inspectedElement.value.props.object).toEqual({ boolean: true, number: 123, string: 'abc', }); done(); }); it('should support objects with overridden hasOwnProperty', async done => { const Example = () => null; const object = { name: 'blah', hasOwnProperty: true, }; act(() => ReactDOM.render( <Example object={object} />, document.createElement('div'), ), ); const id = ((store.getElementIDAtIndex(0): any): number); const inspectedElement = await read(id); expect(inspectedElement).toMatchSnapshot('1: Initial inspection'); expect(inspectedElement.value.props.object).toEqual({ name: 'blah', hasOwnProperty: true, }); done(); }); it('should not consume iterables while inspecting', async done => { const Example = () => null; function* generator() { yield 1; yield 2; } const iteratable = generator(); act(() => ReactDOM.render( <Example iteratable={iteratable} />, document.createElement('div'), ), ); const id = ((store.getElementIDAtIndex(0): any): number); const inspectedElement = await read(id); expect(inspectedElement).toMatchSnapshot('1: Initial inspection'); // Inspecting should not consume the iterable. expect(iteratable.next().value).toEqual(1); expect(iteratable.next().value).toEqual(2); expect(iteratable.next().value).toBeUndefined(); done(); }); it('should support custom objects with enumerable properties and getters', async done => { class CustomData { _number = 42; get number() { return this._number; } set number(value) { this._number = value; } } const descriptor = ((Object.getOwnPropertyDescriptor( CustomData.prototype, 'number', ): any): PropertyDescriptor<number>); descriptor.enumerable = true; Object.defineProperty(CustomData.prototype, 'number', descriptor); const Example = ({data}) => null; act(() => ReactDOM.render( <Example data={new CustomData()} />, document.createElement('div'), ), ); const id = ((store.getElementIDAtIndex(0): any): number); const inspectedElement = await read(id); expect(inspectedElement).toMatchSnapshot('1: Initial inspection'); done(); }); it('should support objects with with inherited keys', async done => { const Example = () => null; const base = Object.create(Object.prototype, { enumerableStringBase: { value: 1, writable: true, enumerable: true, configurable: true, }, [Symbol('enumerableSymbolBase')]: { value: 1, writable: true, enumerable: true, configurable: true, }, nonEnumerableStringBase: { value: 1, writable: true, enumerable: false, configurable: true, }, [Symbol('nonEnumerableSymbolBase')]: { value: 1, writable: true, enumerable: false, configurable: true, }, }); const object = Object.create(base, { enumerableString: { value: 2, writable: true, enumerable: true, configurable: true, }, nonEnumerableString: { value: 3, writable: true, enumerable: false, configurable: true, }, 123: { value: 3, writable: true, enumerable: true, configurable: true, }, [Symbol('nonEnumerableSymbol')]: { value: 2, writable: true, enumerable: false, configurable: true, }, [Symbol('enumerableSymbol')]: { value: 3, writable: true, enumerable: true, configurable: true, }, }); act(() => ReactDOM.render(<Example data={object} />, document.createElement('div')), ); const id = ((store.getElementIDAtIndex(0): any): number); const inspectedElement = await read(id); expect(inspectedElement).toMatchSnapshot('1: Initial inspection'); done(); }); it('should not dehydrate nested values until explicitly requested', async done => { const Example = () => null; act(() => ReactDOM.render( <Example nestedObject={{ a: { b: { c: [ { d: { e: {}, }, }, ], }, }, }} />, document.createElement('div'), ), ); const id = ((store.getElementIDAtIndex(0): any): number); let inspectedElement = await read(id); expect(inspectedElement).toMatchSnapshot('1: Initially inspect element'); inspectedElement = await read(id, ['props', 'nestedObject', 'a']); expect(inspectedElement).toMatchSnapshot('2: Inspect props.nestedObject.a'); inspectedElement = await read(id, ['props', 'nestedObject', 'a', 'b', 'c']); expect(inspectedElement).toMatchSnapshot( '3: Inspect props.nestedObject.a.b.c', ); inspectedElement = await read(id, [ 'props', 'nestedObject', 'a', 'b', 'c', 0, 'd', ]); expect(inspectedElement).toMatchSnapshot( '4: Inspect props.nestedObject.a.b.c.0.d', ); done(); }); it('should enable inspected values to be stored as global variables', () => { const Example = () => null; const nestedObject = { a: { value: 1, b: { value: 1, c: { value: 1, }, }, }, }; act(() => ReactDOM.render( <Example nestedObject={nestedObject} />, document.createElement('div'), ), ); const id = ((store.getElementIDAtIndex(0): any): number); const rendererID = ((store.getRendererIDForElement(id): any): number); const logSpy = jest.fn(); spyOn(console, 'log').and.callFake(logSpy); // Should store the whole value (not just the hydrated parts) bridge.send('storeAsGlobal', { count: 1, id, path: ['props', 'nestedObject'], rendererID, }); jest.runOnlyPendingTimers(); expect(logSpy).toHaveBeenCalledWith('$reactTemp1'); expect(global.$reactTemp1).toBe(nestedObject); logSpy.mockReset(); // Should store the nested property specified (not just the outer value) bridge.send('storeAsGlobal', { count: 2, id, path: ['props', 'nestedObject', 'a', 'b'], rendererID, }); jest.runOnlyPendingTimers(); expect(logSpy).toHaveBeenCalledWith('$reactTemp2'); expect(global.$reactTemp2).toBe(nestedObject.a.b); }); it('should enable inspected values to be copied to the clipboard', () => { const Example = () => null; const nestedObject = { a: { value: 1, b: { value: 1, c: { value: 1, }, }, }, }; act(() => ReactDOM.render( <Example nestedObject={nestedObject} />, document.createElement('div'), ), ); const id = ((store.getElementIDAtIndex(0): any): number); const rendererID = ((store.getRendererIDForElement(id): any): number); // Should copy the whole value (not just the hydrated parts) bridge.send('copyElementPath', { id, path: ['props', 'nestedObject'], rendererID, }); jest.runOnlyPendingTimers(); expect(global.mockClipboardCopy).toHaveBeenCalledTimes(1); expect(global.mockClipboardCopy).toHaveBeenCalledWith( JSON.stringify(nestedObject), ); global.mockClipboardCopy.mockReset(); // Should copy the nested property specified (not just the outer value) bridge.send('copyElementPath', { id, path: ['props', 'nestedObject', 'a', 'b'], rendererID, }); jest.runOnlyPendingTimers(); expect(global.mockClipboardCopy).toHaveBeenCalledTimes(1); expect(global.mockClipboardCopy).toHaveBeenCalledWith( JSON.stringify(nestedObject.a.b), ); }); it('should enable complex values to be copied to the clipboard', () => { const Immutable = require('immutable'); const Example = () => null; const set = new Set(['abc', 123]); const map = new Map([ ['name', 'Brian'], ['food', 'sushi'], ]); const setOfSets = new Set([new Set(['a', 'b', 'c']), new Set([1, 2, 3])]); const mapOfMaps = new Map([ ['first', map], ['second', map], ]); const typedArray = Int8Array.from([100, -100, 0]); const arrayBuffer = typedArray.buffer; const dataView = new DataView(arrayBuffer); const immutable = Immutable.fromJS({ a: [{hello: 'there'}, 'fixed', true], b: 123, c: { '1': 'xyz', xyz: 1, }, }); // $FlowFixMe const bigInt = BigInt(123); // eslint-disable-line no-undef act(() => ReactDOM.render( <Example arrayBuffer={arrayBuffer} dataView={dataView} map={map} set={set} mapOfMaps={mapOfMaps} setOfSets={setOfSets} typedArray={typedArray} immutable={immutable} bigInt={bigInt} />, document.createElement('div'), ), ); const id = ((store.getElementIDAtIndex(0): any): number); const rendererID = ((store.getRendererIDForElement(id): any): number); // Should copy the whole value (not just the hydrated parts) bridge.send('copyElementPath', { id, path: ['props'], rendererID, }); jest.runOnlyPendingTimers(); // Should not error despite lots of unserialized values. global.mockClipboardCopy.mockReset(); // Should copy the nested property specified (not just the outer value) bridge.send('copyElementPath', { id, path: ['props', 'bigInt'], rendererID, }); jest.runOnlyPendingTimers(); expect(global.mockClipboardCopy).toHaveBeenCalledTimes(1); expect(global.mockClipboardCopy).toHaveBeenCalledWith( JSON.stringify('123n'), ); global.mockClipboardCopy.mockReset(); // Should copy the nested property specified (not just the outer value) bridge.send('copyElementPath', { id, path: ['props', 'typedArray'], rendererID, }); jest.runOnlyPendingTimers(); expect(global.mockClipboardCopy).toHaveBeenCalledTimes(1); expect(global.mockClipboardCopy).toHaveBeenCalledWith( JSON.stringify({0: 100, 1: -100, 2: 0}), ); }); });
$(document).ready(function() { /* Demo Start */ /* jQuery-UI Widgets */ $(".mws-accordion").accordion(); $(".mws-tabs").tabs(); $(".mws-datepicker").datepicker({showOtherMonths:true}); $(".mws-datepicker-wk").datepicker({showOtherMonths:true, showWeek:true}); $(".mws-datepicker-mm").datepicker({showOtherMonths:true, numberOfMonths:3}); $(".mws-dtpicker").datetimepicker(); $(".mws-tpicker").timepicker({}); $(".mws-slider").slider({range: "min"}); $(".mws-progressbar").progressbar({value: 37}); $(".mws-range-slider").slider({range: true, min:0, max: 500, values: [75, 300]}); var availableTags = [ "ActionScript", "AppleScript", "Asp", "BASIC", "C", "C++", "Clojure", "COBOL", "ColdFusion", "Erlang", "Fortran", "Groovy", "Haskell", "Java", "JavaScript", "Lisp", "Perl", "PHP", "Python", "Ruby", "Scala", "Scheme" ]; $( ".mws-autocomplete" ).autocomplete({ source: availableTags }); $("#mws-jui-dialog").dialog({ autoOpen: false, title: "jQuery-UI Dialog", modal: true, width: "640", buttons: [{ text: "Close Dialog", click: function() { $( this ).dialog( "close" ); }}] }); $("#mws-form-dialog").dialog({ autoOpen: false, title: "jQuery-UI Modal Form", modal: true, width: "640", buttons: [{ text: "Submit", click: function() { $( this ).find('form#mws-validate').submit(); }}] }); $("#mws-jui-dialog-btn").bind("click", function(event) { $("#mws-jui-dialog").dialog("option", {modal: false}).dialog("open"); event.preventDefault(); }); $("#mws-jui-dialog-mdl-btn").bind("click", function(event) { $("#mws-jui-dialog").dialog("option", {modal: true}).dialog("open"); event.preventDefault(); }); $("#mws-form-dialog-mdl-btn").bind("click", function(event) { $("#mws-form-dialog").dialog("option", {modal: true}).dialog("open"); event.preventDefault(); }); $(".mws-slider-vertical").slider({ orientation: "vertical", range: "min", min: 0, max: 100, value: 60 }); $(".mws-ui-button").button(); $("#mws-ui-button-radio, #mws-ui-button-cb").buttonset(); $("#mws-ui-button-icon button:first" ).button({ icons: { primary: "ui-icon-locked" }, text: false }).next().button({ icons: { primary: "ui-icon-locked" } }).next().button({ icons: { primary: "ui-icon-gear", secondary: "ui-icon-triangle-1-s" } }).next().button({ icons: { primary: "ui-icon-gear", secondary: "ui-icon-triangle-1-s" }, text: false }); $( "#eq > span" ).each(function() { // read initial values from markup and remove that var value = parseInt( $( this ).text(), 10 ); $( this ).empty().slider({ value: value, range: "min", animate: true, orientation: "vertical" }); }); /* Spinner */ var itemList = [ {url: "http://ejohn.org", title: "John Resig"}, {url: "http://bassistance.de/", title: "J&ouml;rn Zaefferer"}, {url: "http://snook.ca/jonathan/", title: "Jonathan Snook"}, {url: "http://rdworth.org/", title: "Richard Worth"}, {url: "http://www.paulbakaus.com/", title: "Paul Bakaus"}, {url: "http://www.yehudakatz.com/", title: "Yehuda Katz"}, {url: "http://www.azarask.in/", title: "Aza Raskin"}, {url: "http://www.karlswedberg.com/", title: "Karl Swedberg"}, {url: "http://scottjehl.com/", title: "Scott Jehl"}, {url: "http://jdsharp.us/", title: "Jonathan Sharp"}, {url: "http://www.kevinhoyt.org/", title: "Kevin Hoyt"}, {url: "http://www.codylindley.com/", title: "Cody Lindley"}, {url: "http://malsup.com/jquery/", title: "Mike Alsup"} ]; var opts = { s1: {}, s2: {places: 2, step : 0.25}, s3: {prefix : '$', places: 2, step: 0.1} }; for (var n in opts) $("#" + n).spinner(opts[n]); /* ColorPicker */ $(".mws-colorpicker").ColorPicker({ onSubmit: function(hsb, hex, rgb, el) { $(el).val(hex); $(el).ColorPickerHide(); }, onBeforeShow: function () { $(this).ColorPickerSetColor(this.value); } }); /* Data Tables */ $(".mws-datatable").dataTable(); $(".mws-datatable-fn").dataTable({sPaginationType: "full_numbers"}); /* imgAreaSelect */ $(".mws-crop-target").imgAreaSelect({ handles: true, x1: 32, y1: 32, x2: 132, y2: 132, onSelectChange: function(img, selection) { $("#crop_x1").val(selection.x1); $("#crop_y1").val(selection.y1); $("#crop_x2").val(selection.x2); $("#crop_y2").val(selection.y2); } }); /* Full Calendar */ var date = new Date(); var d = date.getDate(); var m = date.getMonth(); var y = date.getFullYear(); $("#mws-calendar").fullCalendar({ header: { left: 'prev,next today', center: 'title', right: 'month,agendaWeek,agendaDay' }, editable: true, events: [ { title: 'All Day Event', start: new Date(y, m, 1) }, { title: 'Long Event', start: new Date(y, m, d-5), end: new Date(y, m, d-2) }, { id: 999, title: 'Repeating Event', start: new Date(y, m, d-3, 16, 0), allDay: false }, { id: 999, title: 'Repeating Event', start: new Date(y, m, d+4, 16, 0), allDay: false }, { title: 'Meeting', start: new Date(y, m, d, 10, 30), allDay: false }, { title: 'Lunch', start: new Date(y, m, d, 12, 0), end: new Date(y, m, d, 14, 0), allDay: false }, { title: 'Birthday Party', start: new Date(y, m, d+1, 19, 0), end: new Date(y, m, d+1, 22, 30), allDay: false }, { title: 'Click for Google', start: new Date(y, m, 28), end: new Date(y, m, 29), url: 'http://google.com/' } ] }); /* Sourcerer */ $(".mws-code-html").sourcerer('html'); /* Validation Plugin */ $("#mws-validate").validate({ rules: { spinner: { required: true, max: 5 } }, invalidHandler: function(form, validator) { var errors = validator.numberOfInvalids(); if (errors) { var message = errors == 1 ? 'You missed 1 field. It has been highlighted' : 'You missed ' + errors + ' fields. They have been highlighted'; $("#mws-validate-error").html(message).show(); } else { $("#mws-validate-error").hide(); } } }); /* jGrowl Notifications */ $("#mws-growl-btn").bind("click", function(event) { $.jGrowl("Hello World!", {position: "bottom-right"}); }); $("#mws-growl-btn-1").bind("click", function(event) { $.jGrowl("A sticky message", {sticky: true, position: "bottom-right"}); }); $("#mws-growl-btn-2").bind("click", function(event) { $.jGrowl("Message with Header", {header: "Important!", position: "bottom-right"}); }); /* Form Wizard */ var v = $("#mws-wizard-form").validate({ onsubmit: false }); if($.fn.mwsWizard) { $("#mws-wizard-form").mwsWizard({ forwardOnly: false, onLeaveStep: function(index, elem) { return v.form(); }, onBeforeSubmit: function() { return v.form(); } }); } });
/* * RequestUtils * Visit http://createjs.com/ for documentation, updates and examples. * * * Copyright (c) 2012 gskinner.com, inc. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ /** * @module PreloadJS */ (function () { /** * Utilities that assist with parsing load items, and determining file types, etc. * @class RequestUtils */ var s = {}; /** * The Regular Expression used to test file URLS for an absolute path. * @property ABSOLUTE_PATH * @type {RegExp} * @static */ s.ABSOLUTE_PATT = /^(?:\w+:)?\/{2}/i; /** * The Regular Expression used to test file URLS for a relative path. * @property RELATIVE_PATH * @type {RegExp} * @static */ s.RELATIVE_PATT = (/^[./]*?\//i); /** * The Regular Expression used to test file URLS for an extension. Note that URIs must already have the query string * removed. * @property EXTENSION_PATT * @type {RegExp} * @static */ s.EXTENSION_PATT = /\/?[^/]+\.(\w{1,5})$/i; /** * Parse a file path to determine the information we need to work with it. Currently, PreloadJS needs to know: * <ul> * <li>If the path is absolute. Absolute paths start with a protocol (such as `http://`, `file://`, or * `//networkPath`)</li> * <li>If the path is relative. Relative paths start with `../` or `/path` (or similar)</li> * <li>The file extension. This is determined by the filename with an extension. Query strings are dropped, and * the file path is expected to follow the format `name.ext`.</li> * </ul> * @method parseURI * @param {String} path * @returns {Object} An Object with an `absolute` and `relative` Boolean values, as well as an optional 'extension` * property, which is the lowercase extension. * @static */ s.parseURI = function (path) { var info = {absolute: false, relative: false}; if (path == null) { return info; } // Drop the query string var queryIndex = path.indexOf("?"); if (queryIndex > -1) { path = path.substr(0, queryIndex); } // Absolute var match; if (s.ABSOLUTE_PATT.test(path)) { info.absolute = true; // Relative } else if (s.RELATIVE_PATT.test(path)) { info.relative = true; } // Extension if (match = path.match(s.EXTENSION_PATT)) { info.extension = match[1].toLowerCase(); } return info; }; /** * Formats an object into a query string for either a POST or GET request. * @method formatQueryString * @param {Object} data The data to convert to a query string. * @param {Array} [query] Existing name/value pairs to append on to this query. * @static */ s.formatQueryString = function (data, query) { if (data == null) { throw new Error('You must specify data.'); } var params = []; for (var n in data) { params.push(n + '=' + escape(data[n])); } if (query) { params = params.concat(query); } return params.join('&'); }; /** * A utility method that builds a file path using a source and a data object, and formats it into a new path. * @method buildPath * @param {String} src The source path to add values to. * @param {Object} [data] Object used to append values to this request as a query string. Existing parameters on the * path will be preserved. * @returns {string} A formatted string that contains the path and the supplied parameters. * @static */ s.buildPath = function (src, data) { if (data == null) { return src; } var query = []; var idx = src.indexOf('?'); if (idx != -1) { var q = src.slice(idx + 1); query = query.concat(q.split('&')); } if (idx != -1) { return src.slice(0, idx) + '?' + this.formatQueryString(data, query); } else { return src + '?' + this.formatQueryString(data, query); } }; /** * @method isCrossDomain * @param {LoadItem|Object} item A load item with a `src` property. * @return {Boolean} If the load item is loading from a different domain than the current location. * @static */ s.isCrossDomain = function (item) { var target = document.createElement("a"); target.href = item.src; var host = document.createElement("a"); host.href = location.href; var crossdomain = (target.hostname != "") && (target.port != host.port || target.protocol != host.protocol || target.hostname != host.hostname); return crossdomain; }; /** * @method isLocal * @param {LoadItem|Object} item A load item with a `src` property * @return {Boolean} If the load item is loading from the "file:" protocol. Assume that the host must be local as * well. * @static */ s.isLocal = function (item) { var target = document.createElement("a"); target.href = item.src; return target.hostname == "" && target.protocol == "file:"; }; /** * Determine if a specific type should be loaded as a binary file. Currently, only images and items marked * specifically as "binary" are loaded as binary. Note that audio is <b>not</b> a binary type, as we can not play * back using an audio tag if it is loaded as binary. Plugins can change the item type to binary to ensure they get * a binary result to work with. Binary files are loaded using XHR2. Types are defined as static constants on * {{#crossLink "AbstractLoader"}}{{/crossLink}}. * @method isBinary * @param {String} type The item type. * @return {Boolean} If the specified type is binary. * @static */ s.isBinary = function (type) { switch (type) { case createjs.AbstractLoader.IMAGE: case createjs.AbstractLoader.BINARY: return true; default: return false; } }; /** * Check if item is a valid HTMLImageElement * @method isImageTag * @param {Object} item * @returns {Boolean} * @static */ s.isImageTag = function(item) { return item instanceof HTMLImageElement; }; /** * Check if item is a valid HTMLAudioElement * @method isAudioTag * @param {Object} item * @returns {Boolean} * @static */ s.isAudioTag = function(item) { if (window.HTMLAudioElement) { return item instanceof HTMLAudioElement; } else { return false; } }; /** * Check if item is a valid HTMLVideoElement * @method isVideoTag * @param {Object} item * @returns {Boolean} * @static */ s.isVideoTag = function(item) { if (window.HTMLVideoElement) { return item instanceof HTMLVideoElement; } else { return false; } }; /** * Determine if a specific type is a text-based asset, and should be loaded as UTF-8. * @method isText * @param {String} type The item type. * @return {Boolean} If the specified type is text. * @static */ s.isText = function (type) { switch (type) { case createjs.AbstractLoader.TEXT: case createjs.AbstractLoader.JSON: case createjs.AbstractLoader.MANIFEST: case createjs.AbstractLoader.XML: case createjs.AbstractLoader.CSS: case createjs.AbstractLoader.SVG: case createjs.AbstractLoader.JAVASCRIPT: case createjs.AbstractLoader.SPRITESHEET: return true; default: return false; } }; /** * Determine the type of the object using common extensions. Note that the type can be passed in with the load item * if it is an unusual extension. * @method getTypeByExtension * @param {String} extension The file extension to use to determine the load type. * @return {String} The determined load type (for example, <code>AbstractLoader.IMAGE</code>). Will return `null` if * the type can not be determined by the extension. * @static */ s.getTypeByExtension = function (extension) { if (extension == null) { return createjs.AbstractLoader.TEXT; } switch (extension.toLowerCase()) { case "jpeg": case "jpg": case "gif": case "png": case "webp": case "bmp": return createjs.AbstractLoader.IMAGE; case "ogg": case "mp3": case "webm": return createjs.AbstractLoader.SOUND; case "mp4": case "webm": case "ts": return createjs.AbstractLoader.VIDEO; case "json": return createjs.AbstractLoader.JSON; case "xml": return createjs.AbstractLoader.XML; case "css": return createjs.AbstractLoader.CSS; case "js": return createjs.AbstractLoader.JAVASCRIPT; case 'svg': return createjs.AbstractLoader.SVG; default: return createjs.AbstractLoader.TEXT; } }; createjs.RequestUtils = s; }());
'use babel'; import VueAutocomplete from '../lib/vue-autocomplete'; // Use the command `window:run-package-specs` (cmd-alt-ctrl-p) to run specs. // // To run a specific `it` or `describe` block add an `f` to the front (e.g. `fit` // or `fdescribe`). Remove the `f` to unfocus the block. describe('VueAutocomplete', () => { let workspaceElement, activationPromise; beforeEach(() => { workspaceElement = atom.views.getView(atom.workspace); activationPromise = atom.packages.activatePackage('vue-autocomplete'); }); describe('when the vue-autocomplete:toggle event is triggered', () => { it('hides and shows the modal panel', () => { // Before the activation event the view is not on the DOM, and no panel // has been created expect(workspaceElement.querySelector('.vue-autocomplete')).not.toExist(); // This is an activation event, triggering it will cause the package to be // activated. atom.commands.dispatch(workspaceElement, 'vue-autocomplete:toggle'); waitsForPromise(() => { return activationPromise; }); runs(() => { expect(workspaceElement.querySelector('.vue-autocomplete')).toExist(); let vueAutocompleteElement = workspaceElement.querySelector('.vue-autocomplete'); expect(vueAutocompleteElement).toExist(); let vueAutocompletePanel = atom.workspace.panelForItem(vueAutocompleteElement); expect(vueAutocompletePanel.isVisible()).toBe(true); atom.commands.dispatch(workspaceElement, 'vue-autocomplete:toggle'); expect(vueAutocompletePanel.isVisible()).toBe(false); }); }); it('hides and shows the view', () => { // This test shows you an integration test testing at the view level. // Attaching the workspaceElement to the DOM is required to allow the // `toBeVisible()` matchers to work. Anything testing visibility or focus // requires that the workspaceElement is on the DOM. Tests that attach the // workspaceElement to the DOM are generally slower than those off DOM. jasmine.attachToDOM(workspaceElement); expect(workspaceElement.querySelector('.vue-autocomplete')).not.toExist(); // This is an activation event, triggering it causes the package to be // activated. atom.commands.dispatch(workspaceElement, 'vue-autocomplete:toggle'); waitsForPromise(() => { return activationPromise; }); runs(() => { // Now we can test for view visibility let vueAutocompleteElement = workspaceElement.querySelector('.vue-autocomplete'); expect(vueAutocompleteElement).toBeVisible(); atom.commands.dispatch(workspaceElement, 'vue-autocomplete:toggle'); expect(vueAutocompleteElement).not.toBeVisible(); }); }); }); });
/* * jQuery Nivo Slider v3.2 * http://nivo.dev7studios.com * * Copyright 2012, Dev7studios * Free to use and abuse under the MIT license. * http://www.opensource.org/licenses/mit-license.php */ (function($) { var NivoSlider = function(element, options){ // Defaults are below var settings = $.extend({}, $.fn.nivoSlider.defaults, options); // Useful variables. Play carefully. var vars = { currentSlide: 0, currentImage: '', totalSlides: 0, running: false, paused: false, stop: false, controlNavEl: false }; // Get this slider var slider = $(element); slider.data('nivo:vars', vars).addClass('nivoSlider'); // Find our slider children var kids = slider.children(); kids.each(function() { var child = $(this); var link = ''; if(!child.is('img')){ if(child.is('a')){ child.addClass('nivo-imageLink'); link = child; } child = child.find('img:first'); } // Get img width & height var childWidth = (childWidth === 0) ? child.attr('width') : child.width(), childHeight = (childHeight === 0) ? child.attr('height') : child.height(); if(link !== ''){ link.css('display','none'); } child.css('display','none'); vars.totalSlides++; }); // If randomStart if(settings.randomStart){ settings.startSlide = Math.floor(Math.random() * vars.totalSlides); } // Set startSlide if(settings.startSlide > 0){ if(settings.startSlide >= vars.totalSlides) { settings.startSlide = vars.totalSlides - 1; } vars.currentSlide = settings.startSlide; } // Get initial image if($(kids[vars.currentSlide]).is('img')){ vars.currentImage = $(kids[vars.currentSlide]); } else { vars.currentImage = $(kids[vars.currentSlide]).find('img:first'); } // Show initial link if($(kids[vars.currentSlide]).is('a')){ $(kids[vars.currentSlide]).css('display','block'); } // Set first background var sliderImg = $('<img/>').addClass('nivo-main-image'); sliderImg.attr('src', vars.currentImage.attr('src')).show(); slider.append(sliderImg); // Detect Window Resize $(window).resize(function() { slider.children('img').width(slider.width()); sliderImg.attr('src', vars.currentImage.attr('src')); sliderImg.stop().height('auto'); $('.nivo-slice').remove(); $('.nivo-box').remove(); }); //Create caption slider.append($('<div class="nivo-caption"></div>')); // Process caption function var processCaption = function(settings){ var nivoCaption = $('.nivo-caption', slider); if(vars.currentImage.attr('title') != '' && vars.currentImage.attr('title') != undefined){ var title = vars.currentImage.attr('title'); if(title.substr(0,1) == '#') title = $(title).html(); if(nivoCaption.css('display') == 'block'){ setTimeout(function(){ nivoCaption.html(title); }, settings.animSpeed); } else { nivoCaption.html(title); nivoCaption.stop().fadeIn(settings.animSpeed); } } else { nivoCaption.stop().fadeOut(settings.animSpeed); } } //Process initial caption processCaption(settings); // In the words of Super Mario "let's a go!" var timer = 0; if(!settings.manualAdvance && kids.length > 1){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } // Add Direction nav if(settings.directionNav){ $(slider).on('click', 'a.nivo-prevNav', function(){ if(vars.running) { return false; } clearInterval(timer); timer = ''; vars.currentSlide -= 2; nivoRun(slider, kids, settings, 'prev'); }); $(slider).on('click', 'a.nivo-nextNav', function(){ if(vars.running) { return false; } clearInterval(timer); timer = ''; nivoRun(slider, kids, settings, 'next'); }); } // Add Control nav if(settings.controlNav){ vars.controlNavEl = $('<div class="nivo-controlNav"></div>'); slider.after(vars.controlNavEl); for(var i = 0; i < kids.length; i++){ if(settings.controlNavThumbs){ vars.controlNavEl.addClass('nivo-thumbs-enabled'); var child = kids.eq(i); if(!child.is('img')){ child = child.find('img:first'); } if(child.attr('data-thumb')) vars.controlNavEl.append(); } else { vars.controlNavEl.append(); } } //Set initial active link $('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active'); $('a', vars.controlNavEl).bind('click', function(){ if(vars.running) return false; if($(this).hasClass('active')) return false; clearInterval(timer); timer = ''; sliderImg.attr('src', vars.currentImage.attr('src')); vars.currentSlide = $(this).attr('rel') - 1; nivoRun(slider, kids, settings, 'control'); }); } //For pauseOnHover setting if(settings.pauseOnHover){ slider.hover(function(){ vars.paused = true; clearInterval(timer); timer = ''; }, function(){ vars.paused = false; // Restart the timer if(timer === '' && !settings.manualAdvance){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } }); } // Event when Animation finishes slider.bind('nivo:animFinished', function(){ sliderImg.attr('src', vars.currentImage.attr('src')); vars.running = false; // Hide child links $(kids).each(function(){ if($(this).is('a')){ $(this).css('display','none'); } }); // Show current link if($(kids[vars.currentSlide]).is('a')){ $(kids[vars.currentSlide]).css('display','block'); } // Restart the timer if(timer === '' && !vars.paused && !settings.manualAdvance){ timer = setInterval(function(){ nivoRun(slider, kids, settings, false); }, settings.pauseTime); } // Trigger the afterChange callback settings.afterChange.call(this); }); // Add slices for slice animations var createSlices = function(slider, settings, vars) { if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block'); $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show(); var sliceHeight = ($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().is('a')) ? $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').parent().height() : $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height(); for(var i = 0; i < settings.slices; i++){ var sliceWidth = Math.round(slider.width()/settings.slices); if(i === settings.slices-1){ slider.append( $('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({ left:(sliceWidth*i)+'px', width:(slider.width()-(sliceWidth*i))+'px', height:sliceHeight+'px', opacity:'0', overflow:'hidden' }) ); } else { slider.append( $('<div class="nivo-slice" name="'+i+'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block !important; top:0; left:-'+ ((sliceWidth + (i * sliceWidth)) - sliceWidth) +'px;" /></div>').css({ left:(sliceWidth*i)+'px', width:sliceWidth+'px', height:sliceHeight+'px', opacity:'0', overflow:'hidden' }) ); } } $('.nivo-slice', slider).height(sliceHeight); sliderImg.stop().animate({ height: $(vars.currentImage).height() }, settings.animSpeed); }; // Add boxes for box animations var createBoxes = function(slider, settings, vars){ if($(vars.currentImage).parent().is('a')) $(vars.currentImage).parent().css('display','block'); $('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').width(slider.width()).css('visibility', 'hidden').show(); var boxWidth = Math.round(slider.width()/settings.boxCols), boxHeight = Math.round($('img[src="'+ vars.currentImage.attr('src') +'"]', slider).not('.nivo-main-image,.nivo-control img').height() / settings.boxRows); for(var rows = 0; rows < settings.boxRows; rows++){ for(var cols = 0; cols < settings.boxCols; cols++){ if(cols === settings.boxCols-1){ slider.append( $('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({ opacity:0, left:(boxWidth*cols)+'px', top:(boxHeight*rows)+'px', width:(slider.width()-(boxWidth*cols))+'px' }) ); $('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px'); } else { slider.append( $('<div class="nivo-box" name="'+ cols +'" rel="'+ rows +'"><img src="'+ vars.currentImage.attr('src') +'" style="position:absolute; width:'+ slider.width() +'px; height:auto; display:block; top:-'+ (boxHeight*rows) +'px; left:-'+ (boxWidth*cols) +'px;" /></div>').css({ opacity:0, left:(boxWidth*cols)+'px', top:(boxHeight*rows)+'px', width:boxWidth+'px' }) ); $('.nivo-box[name="'+ cols +'"]', slider).height($('.nivo-box[name="'+ cols +'"] img', slider).height()+'px'); } } } sliderImg.stop().animate({ height: $(vars.currentImage).height() }, settings.animSpeed); }; // Private run method var nivoRun = function(slider, kids, settings, nudge){ // Get our vars var vars = slider.data('nivo:vars'); // Trigger the lastSlide callback if(vars && (vars.currentSlide === vars.totalSlides - 1)){ settings.lastSlide.call(this); } // Stop if((!vars || vars.stop) && !nudge) { return false; } // Trigger the beforeChange callback settings.beforeChange.call(this); // Set current background before change if(!nudge){ sliderImg.attr('src', vars.currentImage.attr('src')); } else { if(nudge === 'prev'){ sliderImg.attr('src', vars.currentImage.attr('src')); } if(nudge === 'next'){ sliderImg.attr('src', vars.currentImage.attr('src')); } } vars.currentSlide++; // Trigger the slideshowEnd callback if(vars.currentSlide === vars.totalSlides){ vars.currentSlide = 0; settings.slideshowEnd.call(this); } if(vars.currentSlide < 0) { vars.currentSlide = (vars.totalSlides - 1); } // Set vars.currentImage if($(kids[vars.currentSlide]).is('img')){ vars.currentImage = $(kids[vars.currentSlide]); } else { vars.currentImage = $(kids[vars.currentSlide]).find('img:first'); } // Set active links if(settings.controlNav){ $('a', vars.controlNavEl).removeClass('active'); $('a:eq('+ vars.currentSlide +')', vars.controlNavEl).addClass('active'); } // Process caption processCaption(settings); // Remove any slices from last transition $('.nivo-slice', slider).remove(); // Remove any boxes from last transition $('.nivo-box', slider).remove(); var currentEffect = settings.effect, anims = ''; // Generate random effect if(settings.effect === 'random'){ anims = new Array('sliceDownRight','sliceDownLeft','sliceUpRight','sliceUpLeft','sliceUpDown','sliceUpDownLeft','fold','fade', 'boxRandom','boxRain','boxRainReverse','boxRainGrow','boxRainGrowReverse'); currentEffect = anims[Math.floor(Math.random()*(anims.length + 1))]; if(currentEffect === undefined) { currentEffect = 'fade'; } } // Run random effect from specified set (eg: effect:'fold,fade') if(settings.effect.indexOf(',') !== -1){ anims = settings.effect.split(','); currentEffect = anims[Math.floor(Math.random()*(anims.length))]; if(currentEffect === undefined) { currentEffect = 'fade'; } } // Custom transition as defined by "data-transition" attribute if(vars.currentImage.attr('data-transition')){ currentEffect = vars.currentImage.attr('data-transition'); } // Run effects vars.running = true; var timeBuff = 0, i = 0, slices = '', firstSlice = '', totalBoxes = '', boxes = ''; if(currentEffect === 'sliceDown' || currentEffect === 'sliceDownRight' || currentEffect === 'sliceDownLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceDownLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); slice.css({ 'top': '0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'sliceUp' || currentEffect === 'sliceUpRight' || currentEffect === 'sliceUpLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceUpLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); slice.css({ 'bottom': '0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'sliceUpDown' || currentEffect === 'sliceUpDownRight' || currentEffect === 'sliceUpDownLeft'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; var v = 0; slices = $('.nivo-slice', slider); if(currentEffect === 'sliceUpDownLeft') { slices = $('.nivo-slice', slider)._reverse(); } slices.each(function(){ var slice = $(this); if(i === 0){ slice.css('top','0px'); i++; } else { slice.css('bottom','0px'); i = 0; } if(v === settings.slices-1){ setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; v++; }); } else if(currentEffect === 'fold'){ createSlices(slider, settings, vars); timeBuff = 0; i = 0; $('.nivo-slice', slider).each(function(){ var slice = $(this); var origWidth = slice.width(); slice.css({ top:'0px', width:'0px' }); if(i === settings.slices-1){ setTimeout(function(){ slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ slice.animate({ width:origWidth, opacity:'1.0' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 50; i++; }); } else if(currentEffect === 'fade'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': slider.width() + 'px' }); firstSlice.animate({ opacity:'1.0' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'slideInRight'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': '0px', 'opacity': '1' }); firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'slideInLeft'){ createSlices(slider, settings, vars); firstSlice = $('.nivo-slice:first', slider); firstSlice.css({ 'width': '0px', 'opacity': '1', 'left': '', 'right': '0px' }); firstSlice.animate({ width: slider.width() + 'px' }, (settings.animSpeed*2), '', function(){ // Reset positioning firstSlice.css({ 'left': '0px', 'right': '' }); slider.trigger('nivo:animFinished'); }); } else if(currentEffect === 'boxRandom'){ createBoxes(slider, settings, vars); totalBoxes = settings.boxCols * settings.boxRows; i = 0; timeBuff = 0; boxes = shuffle($('.nivo-box', slider)); boxes.each(function(){ var box = $(this); if(i === totalBoxes-1){ setTimeout(function(){ box.animate({ opacity:'1' }, settings.animSpeed, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + timeBuff)); } else { setTimeout(function(){ box.animate({ opacity:'1' }, settings.animSpeed); }, (100 + timeBuff)); } timeBuff += 20; i++; }); } else if(currentEffect === 'boxRain' || currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){ createBoxes(slider, settings, vars); totalBoxes = settings.boxCols * settings.boxRows; i = 0; timeBuff = 0; // Split boxes into 2D array var rowIndex = 0; var colIndex = 0; var box2Darr = []; box2Darr[rowIndex] = []; boxes = $('.nivo-box', slider); if(currentEffect === 'boxRainReverse' || currentEffect === 'boxRainGrowReverse'){ boxes = $('.nivo-box', slider)._reverse(); } boxes.each(function(){ box2Darr[rowIndex][colIndex] = $(this); colIndex++; if(colIndex === settings.boxCols){ rowIndex++; colIndex = 0; box2Darr[rowIndex] = []; } }); // Run animation for(var cols = 0; cols < (settings.boxCols * 2); cols++){ var prevCol = cols; for(var rows = 0; rows < settings.boxRows; rows++){ if(prevCol >= 0 && prevCol < settings.boxCols){ /* Due to some weird JS bug with loop vars being used in setTimeout, this is wrapped with an anonymous function call */ (function(row, col, time, i, totalBoxes) { var box = $(box2Darr[row][col]); var w = box.width(); var h = box.height(); if(currentEffect === 'boxRainGrow' || currentEffect === 'boxRainGrowReverse'){ box.width(0).height(0); } if(i === totalBoxes-1){ setTimeout(function(){ box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3, '', function(){ slider.trigger('nivo:animFinished'); }); }, (100 + time)); } else { setTimeout(function(){ box.animate({ opacity:'1', width:w, height:h }, settings.animSpeed/1.3); }, (100 + time)); } })(rows, prevCol, timeBuff, i, totalBoxes); i++; } prevCol--; } timeBuff += 100; } } }; // Shuffle an array var shuffle = function(arr){ for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i, 10), x = arr[--i], arr[i] = arr[j], arr[j] = x); return arr; }; // For debugging var trace = function(msg){ if(this.console && typeof console.log !== 'undefined') { console.log(msg); } }; // Start / Stop this.stop = function(){ if(!$(element).data('nivo:vars').stop){ $(element).data('nivo:vars').stop = true; trace('Stop Slider'); } }; this.start = function(){ if($(element).data('nivo:vars').stop){ $(element).data('nivo:vars').stop = false; trace('Start Slider'); } }; // Trigger the afterLoad callback settings.afterLoad.call(this); return this; }; $.fn.nivoSlider = function(options) { return this.each(function(key, value){ var element = $(this); // Return early if this element already has a plugin instance if (element.data('nivoslider')) { return element.data('nivoslider'); } // Pass options to plugin constructor var nivoslider = new NivoSlider(this, options); // Store plugin object in this element's data element.data('nivoslider', nivoslider); }); }; //Default settings $.fn.nivoSlider.defaults = { effect: 'random', slices: 15, boxCols: 8, boxRows: 4, animSpeed: 500, pauseTime: 3000, startSlide: 0, directionNav: true, controlNav: true, controlNavThumbs: false, pauseOnHover: true, manualAdvance: false, randomStart: false, beforeChange: function(){}, afterChange: function(){}, slideshowEnd: function(){}, lastSlide: function(){}, afterLoad: function(){} }; $.fn._reverse = [].reverse; })(jQuery);
System.register(['@angular/core', '@angular/http', 'rxjs/Observable', '../shared/apiurl.service'], function(exports_1, context_1) { "use strict"; var __moduleName = context_1 && context_1.id; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __metadata = (this && this.__metadata) || function (k, v) { if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v); }; var core_1, http_1, Observable_1, apiurl_service_1, http_2; var SignupService; return { setters:[ function (core_1_1) { core_1 = core_1_1; }, function (http_1_1) { http_1 = http_1_1; http_2 = http_1_1; }, function (Observable_1_1) { Observable_1 = Observable_1_1; }, function (apiurl_service_1_1) { apiurl_service_1 = apiurl_service_1_1; }], execute: function() { SignupService = (function () { function SignupService(_apiUrl, _http) { this._apiUrl = _apiUrl; this._http = _http; } SignupService.prototype.signup = function (payload) { var body = JSON.stringify(payload); var headers = new http_2.Headers({ 'Content-Type': 'application/json' }); var options = new http_2.RequestOptions({ headers: headers }); return this._http.post(this._apiUrl.signupUrl, body, options) .map(function (response) { return response.json(); }) .do(function (data) { return console.log("SignUp:", JSON.stringify(data)); }) .catch(this.handleError); }; SignupService.prototype.handleError = function (error) { console.error(error); return Observable_1.Observable.throw(error.json().error || 'Server error'); }; SignupService = __decorate([ core_1.Injectable(), __metadata('design:paramtypes', [apiurl_service_1.ApiUrl, http_1.Http]) ], SignupService); return SignupService; }()); exports_1("SignupService", SignupService); } } }); //# sourceMappingURL=signup.service.js.map
import {extend} from 'lodash'; import path from 'path'; import baseConfig from './base.config'; import webpack from 'webpack'; export default extend({}, baseConfig, { output: { path: path.resolve('./dist'), filename: 'rt-select.js' }, entry: './src/index', externals: [{ 'react': { root: 'React', commonjs2: 'react', commonjs: 'react', amd: 'react' } }, { 'react-dom': { root: 'ReactDOM', commonjs2: 'react-dom', commonjs: 'react-dom', amd: 'react-dom' } }], plugins: [ new webpack.DefinePlugin({ 'process.env': { 'NODE_ENV': JSON.stringify('production') } }) ] })
var fs = require("fs") , child_process = require("child_process") , path = require("path") , chain = require("slide").chain , asyncMap = require("slide").asyncMap , TapProducer = require("./tap-producer.js") , TapConsumer = require("./tap-consumer.js") , assert = require("./tap-assert.js") , inherits = require("inherits") , util = require("util") , CovHtml = require("./tap-cov-html.js") // XXX Clean up the coverage options , doCoverage = process.env.TAP_COV || process.env.npm_package_config_coverage || process.env.npm_config_coverage module.exports = Runner inherits(Runner, TapProducer) function Runner (options, cb) { this.options = options var diag = this.options.diag var dir = this.options.argv.remain Runner.super.call(this, diag) this.doCoverage = doCoverage // An array of full paths to files to obtain coverage this.coverageFiles = [] // The source of these files this.coverageFilesSource = {} // Where to write coverage informat
version https://git-lfs.github.com/spec/v1 oid sha256:91504203f93c53de9a0f4163604c239d5e7a34f40c4f8b48872990570878d111 size 13467
const parseVersion = require('./util/parse-version'); const Driver = require('./driver'); const cqlTypes = require('./util/cql-types'); function driverFactory(context) { context = context || {}; context.config = context.config || {}; const { protocolOptions: { maxVersion = '3.1.0' } = {} } = context.config; context.config.version = maxVersion; context.config.parsedCqlVersion = parseVersion(maxVersion); return new Driver(context); } module.exports = function (context) { return driverFactory(context); }; module.exports.valueTypes = cqlTypes.valueTypes; module.exports.dataTypes = cqlTypes.dataTypes; module.exports.consistencies = cqlTypes.consistencies;
angular.module('myApp.controllers').config(function ($translateProvider) { $translateProvider.translations('en', { TITLE: 'Fangular', USERNAME: 'Username', LANGUAGE: 'Language', LOGOUT: 'Logout', OPTION_LANG_EN: 'English', OPTION_LANG_TW: '繁體中文', SELECT_ALL: 'ALL', SELECT_NONE: 'NONE', SORT_BY: 'Sort by', NAME: 'Name', SIZE: 'Size', TIME: 'Time', TYPE: 'Type' }); });
import fs from 'fs' import path from 'path' import _ from 'underscore' import Promise from 'bluebird' /** * * Create a shadow link of theme's static folder. * * @param {Theme} [theme] the theme object. * @param {String} [realPath] [the realPath of target theme] * @return {Promise} * **/ export function shadow(theme, publicPath) { if (!theme || !theme.realPath || !publicPath) return Promise.reject(new Error('shadow() invalid arguments')) // Ignore URIs. if (isRemote(theme.static)) return Promise.resolve() const statics = path.join(theme.realPath, theme.static || './static') const shadow = path.join(publicPath, theme.name) // Check if public folder exist, // If not, create a blank public folder using given try { if (!fs.existsSync(publicPath)) fs.mkdirSync(publicPath) } catch (err) { return Promise.reject(err) } // Check if a shadow is linked to real static folder try { if (fs.readlinkSync(shadow) === statics) return Promise.resolve() } catch (err) { // If link do not exist, // Create a shadow link. try { fs.symlinkSync(statics, shadow, 'dir') } catch (err) { return Promise.reject(err) } return Promise.resolve() } // If a shadow is not linked to the given static folder path // Remove it first try { fs.unlinkSync(shadow) fs.symlinkSync(statics, shadow, 'dir') return Promise.resolve() } catch (err) { return Promise.reject(err) } } /** * * Create static folders' shadows of a theme instance. * @param {Theme} [self] * **/ export function shadows(self) { const node_modules = path.join(self.path.home, './node_modules') if (!fs.existsSync(node_modules)) return const files = fs.readdirSync(node_modules) if (!files || files.length === 0) return var modules = files.filter(function(folder) { const modulePath = path.join(node_modules, folder) const isDir = fs.statSync(modulePath).isDirectory() const packagePath = path.join(modulePath, './package.json') // Check if it's a valid folder if (!isDir) return // Check if the folder is a theme module if (folder.indexOf(self.pattern) === -1) return // Check if there is a exist shadow if (fs.existsSync(path.join(self.path.public, folder))) return var pkg = {} if (fs.existsSync(packagePath)) pkg = readPkg(packagePath) // The relative static folder path of this theme module. const staticPath = pkg.static || './static' // Check if there is a valid static folder in this theme module if (!fs.existsSync(path.join(modulePath, staticPath))) return const theme = { name: folder, realPath: modulePath, static: staticPath } shadow(theme, self.path.public) return true }) return modules } export function split(name, isFilename) { if (!name || name.indexOf('/') === -1) return if (!isFilename) return name.substr(0, name.indexOf('/')) return name.substr(name.indexOf('/') + 1) } // Fetch package.json from parent dir export function pkg(home) { return readPkg(path.join(home, './package.json')) } function readPkg(filepath) { try { return require(filepath) } catch (err) { return {} } } // Check if a string is uri function isRemote(dir) { return dir && (dir.indexOf('http') === 0 || dir.indexOf('https') === 0) }
/*global document*/ //dependencies import React from 'react'; import ReactDOM from 'react-dom'; import mountedComponents from './mounted-components'; import clearComponent from './clear'; /** * Render a react component in a DOM selector. * @param {object} component - A react component. * @param {string} selector - A selector on a DOM node. * @param {object} options - Options for the component rendering. */ export default function renderComponent(component, selector, options) { options = options || {}; // Clear a potential previously mounted component clearComponent(selector); const targetDOMContainer = document.querySelector(selector); if (!targetDOMContainer) { throw new Error(`You are trying to render a component in a DOM element which is not existing, your selector is ${selector}`); } // Render the component const mountedComponent = ReactDOM.render( React.createElement(component, options.props, options.data), targetDOMContainer ); //Save the fact that a component is mounted. mountedComponents[selector] = mountedComponent; console.info('Mounted components : ', Object.keys(mountedComponents)); return mountedComponent; }
/* AngularJS v1.6.1 (c) 2010-2016 Google, Inc. http://angularjs.org License: MIT */ (function (z) { 'use strict'; function M(a, b) { b = b || Error; return function () { var d = arguments[0], c; c = "[" + (a ? a + ":" : "") + d + "] http://errors.angularjs.org/1.6.1/" + (a ? a + "/" : "") + d; for (d = 1; d < arguments.length; d++) { c = c + (1 == d ? "?" : "&") + "p" + (d - 1) + "="; var f = encodeURIComponent, e; e = arguments[d]; e = "function" == typeof e ? e.toString().replace(/ \{[\s\S]*$/, "") : "undefined" == typeof e ? "undefined" : "string" != typeof e ? JSON.stringify(e) : e; c += f(e) } return new b(c) } } function ta(a) { if (null == a || Wa(a)) return !1; if (C(a) || E(a) || D && a instanceof D) return !0; var b = "length" in Object(a) && a.length; return Y(b) && (0 <= b && (b - 1 in a || a instanceof Array) || "function" === typeof a.item) } function q(a, b, d) { var c, f; if (a) if (y(a)) for (c in a) "prototype" !== c && "length" !== c && "name" !== c && a.hasOwnProperty(c) && b.call(d, a[c], c, a); else if (C(a) || ta(a)) { var e = "object" !== typeof a; c = 0; for (f = a.length; c < f; c++) (e || c in a) && b.call(d, a[c], c, a) } else if (a.forEach && a.forEach !== q) a.forEach(b, d, a); else if (Dc(a)) for (c in a) b.call(d, a[c], c, a); else if ("function" === typeof a.hasOwnProperty) for (c in a) a.hasOwnProperty(c) && b.call(d, a[c], c, a); else for (c in a) va.call(a, c) && b.call(d, a[c], c, a); return a } function Ec(a, b, d) { for (var c = Object.keys(a).sort(), f = 0; f < c.length; f++) b.call(d, a[c[f]], c[f]); return c } function Fc(a) { return function (b, d) { a(d, b) } } function ie() { return ++rb } function Sb(a, b, d) { for (var c = a.$$hashKey, f = 0, e = b.length; f < e; ++f) { var g = b[f]; if (F(g) || y(g)) for (var h = Object.keys(g), k = 0, l = h.length; k < l; k++) { var m = h[k], n = g[m]; d && F(n) ? fa(n) ? a[m] = new Date(n.valueOf()) : Xa(n) ? a[m] = new RegExp(n) : n.nodeName ? a[m] = n.cloneNode(!0) : Tb(n) ? a[m] = n.clone() : (F(a[m]) || (a[m] = C(n) ? [] : {}), Sb(a[m], [n], !0)) : a[m] = n } } c ? a.$$hashKey = c : delete a.$$hashKey; return a } function R(a) { return Sb(a, wa.call(arguments, 1), !1) } function je(a) { return Sb(a, wa.call(arguments, 1), !0) } function Z(a) { return parseInt(a, 10) } function Ub(a, b) { return R(Object.create(a), b) } function w() { } function Ya(a) { return a } function ma(a) { return function () { return a } } function Vb(a) { return y(a.toString) && a.toString !== na } function x(a) { return "undefined" === typeof a } function v(a) { return "undefined" !== typeof a } function F(a) { return null !== a && "object" === typeof a } function Dc(a) { return null !== a && "object" === typeof a && !Gc(a) } function E(a) { return "string" === typeof a } function Y(a) { return "number" === typeof a } function fa(a) { return "[object Date]" === na.call(a) } function y(a) { return "function" === typeof a } function Xa(a) { return "[object RegExp]" === na.call(a) } function Wa(a) { return a && a.window === a } function Za(a) { return a && a.$evalAsync && a.$watch } function Ia(a) { return "boolean" === typeof a } function ke(a) { return a && Y(a.length) && le.test(na.call(a)) } function Tb(a) { return !(!a || !(a.nodeName || a.prop && a.attr && a.find)) } function me(a) { var b = {}; a = a.split(","); var d; for (d = 0; d < a.length; d++) b[a[d]] = !0; return b } function xa(a) { return P(a.nodeName || a[0] && a[0].nodeName) } function $a(a, b) { var d = a.indexOf(b); 0 <= d && a.splice(d, 1); return d } function Fa(a, b) { function d(a, b) { var d = b.$$hashKey, e; if (C(a)) { e = 0; for (var f = a.length; e < f; e++) b.push(c(a[e])) } else if (Dc(a)) for (e in a) b[e] = c(a[e]); else if (a && "function" === typeof a.hasOwnProperty) for (e in a) a.hasOwnProperty(e) && (b[e] = c(a[e])); else for (e in a) va.call(a, e) && (b[e] = c(a[e])); d ? b.$$hashKey = d : delete b.$$hashKey; return b } function c(a) { if (!F(a)) return a; var b = e.indexOf(a); if (-1 !== b) return g[b]; if (Wa(a) || Za(a)) throw Ga("cpws"); var b = !1, c = f(a); void 0 === c && (c = C(a) ? [] : Object.create(Gc(a)), b = !0); e.push(a); g.push(c); return b ? d(a, c) : c } function f(a) { switch (na.call(a)) { case "[object Int8Array]": case "[object Int16Array]": case "[object Int32Array]": case "[object Float32Array]": case "[object Float64Array]": case "[object Uint8Array]": case "[object Uint8ClampedArray]": case "[object Uint16Array]": case "[object Uint32Array]": return new a.constructor(c(a.buffer), a.byteOffset, a.length); case "[object ArrayBuffer]": if (!a.slice) { var b = new ArrayBuffer(a.byteLength); (new Uint8Array(b)).set(new Uint8Array(a)); return b } return a.slice(0); case "[object Boolean]": case "[object Number]": case "[object String]": case "[object Date]": return new a.constructor(a.valueOf()); case "[object RegExp]": return b = new RegExp(a.source, a.toString().match(/[^/]*$/)[0]), b.lastIndex = a.lastIndex, b; case "[object Blob]": return new a.constructor([a], { type: a.type }) } if (y(a.cloneNode)) return a.cloneNode(!0) } var e = [], g = []; if (b) { if (ke(b) || "[object ArrayBuffer]" === na.call(b)) throw Ga("cpta"); if (a === b) throw Ga("cpi"); C(b) ? b.length = 0 : q(b, function (a, d) { "$$hashKey" !== d && delete b[d] }); e.push(a); g.push(b); return d(a, b) } return c(a) } function qa(a, b) { if (a === b) return !0; if (null === a || null === b) return !1; if (a !== a && b !== b) return !0; var d = typeof a, c; if (d === typeof b && "object" === d) if (C(a)) { if (!C(b)) return !1; if ((d = a.length) === b.length) { for (c = 0; c < d; c++) if (!qa(a[c], b[c])) return !1; return !0 } } else { if (fa(a)) return fa(b) ? qa(a.getTime(), b.getTime()) : !1; if (Xa(a)) return Xa(b) ? a.toString() === b.toString() : !1; if (Za(a) || Za(b) || Wa(a) || Wa(b) || C(b) || fa(b) || Xa(b)) return !1; d = W(); for (c in a) if ("$" !== c.charAt(0) && !y(a[c])) { if (!qa(a[c], b[c])) return !1; d[c] = !0 } for (c in b) if (!(c in d) && "$" !== c.charAt(0) && v(b[c]) && !y(b[c])) return !1; return !0 } return !1 } function ab(a, b, d) { return a.concat(wa.call(b, d)) } function bb(a, b) { var d = 2 < arguments.length ? wa.call(arguments, 2) : []; return !y(b) || b instanceof RegExp ? b : d.length ? function () { return arguments.length ? b.apply(a, ab(d, arguments, 0)) : b.apply(a, d) } : function () { return arguments.length ? b.apply(a, arguments) : b.call(a) } } function Hc(a, b) { var d = b; "string" === typeof a && "$" === a.charAt(0) && "$" === a.charAt(1) ? d = void 0 : Wa(b) ? d = "$WINDOW" : b && z.document === b ? d = "$DOCUMENT" : Za(b) && (d = "$SCOPE"); return d } function cb(a, b) { if (!x(a)) return Y(b) || (b = b ? 2 : null), JSON.stringify(a, Hc, b) } function Ic(a) { return E(a) ? JSON.parse(a) : a } function Jc(a, b) { a = a.replace(ne, ""); var d = Date.parse("Jan 01, 1970 00:00:00 " + a) / 6E4; return ga(d) ? b : d } function Wb(a, b, d) { d = d ? -1 : 1; var c = a.getTimezoneOffset(); b = Jc(b, c); d *= b - c; a = new Date(a.getTime()); a.setMinutes(a.getMinutes() + d); return a } function ya(a) { a = D(a).clone(); try { a.empty() } catch (b) { } var d = D("<div>").append(a).html(); try { return a[0].nodeType === Ja ? P(d) : d.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/, function (a, b) { return "<" + P(b) }) } catch (c) { return P(d) } } function Kc(a) { try { return decodeURIComponent(a) } catch (b) { } } function Lc(a) { var b = {}; q((a || "").split("&"), function (a) { var c, f, e; a && (f = a = a.replace(/\+/g, "%20"), c = a.indexOf("="), -1 !== c && (f = a.substring(0, c), e = a.substring(c + 1)), f = Kc(f), v(f) && (e = v(e) ? Kc(e) : !0, va.call(b, f) ? C(b[f]) ? b[f].push(e) : b[f] = [b[f], e] : b[f] = e)) }); return b } function Xb(a) { var b = []; q(a, function (a, c) { C(a) ? q(a, function (a) { b.push(ka(c, !0) + (!0 === a ? "" : "=" + ka(a, !0))) }) : b.push(ka(c, !0) + (!0 === a ? "" : "=" + ka(a, !0))) }); return b.length ? b.join("&") : "" } function db(a) { return ka(a, !0).replace(/%26/gi, "&").replace(/%3D/gi, "=").replace(/%2B/gi, "+") } function ka(a, b) { return encodeURIComponent(a).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%3B/gi, ";").replace(/%20/g, b ? "%20" : "+") } function oe(a, b) { var d, c, f = Ka.length; for (c = 0; c < f; ++c) if (d = Ka[c] + b, E(d = a.getAttribute(d))) return d; return null } function pe(a, b) { var d, c, f = {}; q(Ka, function (b) { b += "app"; !d && a.hasAttribute && a.hasAttribute(b) && (d = a, c = a.getAttribute(b)) }); q(Ka, function (b) { b += "app"; var f; !d && (f = a.querySelector("[" + b.replace(":", "\\:") + "]")) && (d = f, c = f.getAttribute(b)) }); d && (qe ? (f.strictDi = null !== oe(d, "strict-di"), b(d, c ? [c] : [], f)) : z.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match.")) } function Mc(a, b, d) { F(d) || (d = {}); d = R({ strictDi: !1 }, d); var c = function () { a = D(a); if (a.injector()) { var c = a[0] === z.document ? "document" : ya(a); throw Ga("btstrpd", c.replace(/</, "&lt;").replace(/>/, "&gt;")); } b = b || []; b.unshift(["$provide", function (b) { b.value("$rootElement", a) }]); d.debugInfoEnabled && b.push(["$compileProvider", function (a) { a.debugInfoEnabled(!0) }]); b.unshift("ng"); c = eb(b, d.strictDi); c.invoke(["$rootScope", "$rootElement", "$compile", "$injector", function (a, b, d, c) { a.$apply(function () { b.data("$injector", c); d(b)(a) }) }]); return c }, f = /^NG_ENABLE_DEBUG_INFO!/, e = /^NG_DEFER_BOOTSTRAP!/; z && f.test(z.name) && (d.debugInfoEnabled = !0, z.name = z.name.replace(f, "")); if (z && !e.test(z.name)) return c(); z.name = z.name.replace(e, ""); $.resumeBootstrap = function (a) { q(a, function (a) { b.push(a) }); return c() }; y($.resumeDeferredBootstrap) && $.resumeDeferredBootstrap() } function re() { z.name = "NG_ENABLE_DEBUG_INFO!" + z.name; z.location.reload() } function se(a) { a = $.element(a).injector(); if (!a) throw Ga("test"); return a.get("$$testability") } function Nc(a, b) { b = b || "_"; return a.replace(te, function (a, c) { return (c ? b : "") + a.toLowerCase() }) } function ue() { var a; if (!Oc) { var b = sb(); (oa = x(b) ? z.jQuery : b ? z[b] : void 0) && oa.fn.on ? (D = oa, R(oa.fn, { scope: Oa.scope, isolateScope: Oa.isolateScope, controller: Oa.controller, injector: Oa.injector, inheritedData: Oa.inheritedData }), a = oa.cleanData, oa.cleanData = function (b) { for (var c, f = 0, e; null != (e = b[f]) ; f++) (c = oa._data(e, "events")) && c.$destroy && oa(e).triggerHandler("$destroy"); a(b) }) : D = X; $.element = D; Oc = !0 } } function fb(a, b, d) { if (!a) throw Ga("areq", b || "?", d || "required"); return a } function tb(a, b, d) { d && C(a) && (a = a[a.length - 1]); fb(y(a), b, "not a function, got " + (a && "object" === typeof a ? a.constructor.name || "Object" : typeof a)); return a } function Pa(a, b) { if ("hasOwnProperty" === a) throw Ga("badname", b); } function Pc(a, b, d) { if (!b) return a; b = b.split("."); for (var c, f = a, e = b.length, g = 0; g < e; g++) c = b[g], a && (a = (f = a)[c]); return !d && y(a) ? bb(f, a) : a } function ub(a) { for (var b = a[0], d = a[a.length - 1], c, f = 1; b !== d && (b = b.nextSibling) ; f++) if (c || a[f] !== b) c || (c = D(wa.call(a, 0, f))), c.push(b); return c || a } function W() { return Object.create(null) } function Yb(a) { if (null == a) return ""; switch (typeof a) { case "string": break; case "number": a = "" + a; break; default: a = !Vb(a) || C(a) || fa(a) ? cb(a) : a.toString() } return a } function ve(a) { function b(a, b, c) { return a[b] || (a[b] = c()) } var d = M("$injector"), c = M("ng"); a = b(a, "angular", Object); a.$$minErr = a.$$minErr || M; return b(a, "module", function () { var a = {}; return function (e, g, h) { if ("hasOwnProperty" === e) throw c("badname", "module"); g && a.hasOwnProperty(e) && (a[e] = null); return b(a, e, function () { function a(b, d, e, f) { f || (f = c); return function () { f[e || "push"]([b, d, arguments]); return J } } function b(a, d, f) { f || (f = c); return function (b, c) { c && y(c) && (c.$$moduleName = e); f.push([a, d, arguments]); return J } } if (!g) throw d("nomod", e); var c = [], f = [], p = [], r = a("$injector", "invoke", "push", f), J = { _invokeQueue: c, _configBlocks: f, _runBlocks: p, requires: g, name: e, provider: b("$provide", "provider"), factory: b("$provide", "factory"), service: b("$provide", "service"), value: a("$provide", "value"), constant: a("$provide", "constant", "unshift"), decorator: b("$provide", "decorator", f), animation: b("$animateProvider", "register"), filter: b("$filterProvider", "register"), controller: b("$controllerProvider", "register"), directive: b("$compileProvider", "directive"), component: b("$compileProvider", "component"), config: r, run: function (a) { p.push(a); return this } }; h && r(h); return J }) } }) } function ra(a, b) { if (C(a)) { b = b || []; for (var d = 0, c = a.length; d < c; d++) b[d] = a[d] } else if (F(a)) for (d in b = b || {}, a) if ("$" !== d.charAt(0) || "$" !== d.charAt(1)) b[d] = a[d]; return b || a } function we(a) { var b = []; return JSON.stringify(a, function (a, c) { c = Hc(a, c); if (F(c)) { if (0 <= b.indexOf(c)) return "..."; b.push(c) } return c }) } function xe(a) { R(a, { bootstrap: Mc, copy: Fa, extend: R, merge: je, equals: qa, element: D, forEach: q, injector: eb, noop: w, bind: bb, toJson: cb, fromJson: Ic, identity: Ya, isUndefined: x, isDefined: v, isString: E, isFunction: y, isObject: F, isNumber: Y, isElement: Tb, isArray: C, version: ye, isDate: fa, lowercase: P, uppercase: vb, callbacks: { $$counter: 0 }, getTestability: se, reloadWithDebugInfo: re, $$minErr: M, $$csp: za, $$encodeUriSegment: db, $$encodeUriQuery: ka, $$stringify: Yb }); Zb = ve(z); Zb("ng", ["ngLocale"], ["$provide", function (a) { a.provider({ $$sanitizeUri: ze }); a.provider("$compile", Qc).directive({ a: Ae, input: Rc, textarea: Rc, form: Be, script: Ce, select: De, option: Ee, ngBind: Fe, ngBindHtml: Ge, ngBindTemplate: He, ngClass: Ie, ngClassEven: Je, ngClassOdd: Ke, ngCloak: Le, ngController: Me, ngForm: Ne, ngHide: Oe, ngIf: Pe, ngInclude: Qe, ngInit: Re, ngNonBindable: Se, ngPluralize: Te, ngRepeat: Ue, ngShow: Ve, ngStyle: We, ngSwitch: Xe, ngSwitchWhen: Ye, ngSwitchDefault: Ze, ngOptions: $e, ngTransclude: af, ngModel: bf, ngList: cf, ngChange: df, pattern: Sc, ngPattern: Sc, required: Tc, ngRequired: Tc, minlength: Uc, ngMinlength: Uc, maxlength: Vc, ngMaxlength: Vc, ngValue: ef, ngModelOptions: ff }).directive({ ngInclude: gf }).directive(wb).directive(Wc); a.provider({ $anchorScroll: hf, $animate: jf, $animateCss: kf, $$animateJs: lf, $$animateQueue: mf, $$AnimateRunner: nf, $$animateAsyncRun: of, $browser: pf, $cacheFactory: qf, $controller: rf, $document: sf, $$isDocumentHidden: tf, $exceptionHandler: uf, $filter: Xc, $$forceReflow: vf, $interpolate: wf, $interval: xf, $http: yf, $httpParamSerializer: zf, $httpParamSerializerJQLike: Af, $httpBackend: Bf, $xhrFactory: Cf, $jsonpCallbacks: Df, $location: Ef, $log: Ff, $parse: Gf, $rootScope: Hf, $q: If, $$q: Jf, $sce: Kf, $sceDelegate: Lf, $sniffer: Mf, $templateCache: Nf, $templateRequest: Of, $$testability: Pf, $timeout: Qf, $window: Rf, $$rAF: Sf, $$jqLite: Tf, $$HashMap: Uf, $$cookieReader: Vf }) }]) } function gb(a, b) { return b.toUpperCase() } function xb(a) { return a.replace(Wf, gb) } function Yc(a) { a = a.nodeType; return 1 === a || !a || 9 === a } function Zc(a, b) { var d, c, f = b.createDocumentFragment(), e = []; if ($b.test(a)) { d = f.appendChild(b.createElement("div")); c = (Xf.exec(a) || ["", ""])[1].toLowerCase(); c = ha[c] || ha._default; d.innerHTML = c[1] + a.replace(Yf, "<$1></$2>") + c[2]; for (c = c[0]; c--;) d = d.lastChild; e = ab(e, d.childNodes); d = f.firstChild; d.textContent = "" } else e.push(b.createTextNode(a)); f.textContent = ""; f.innerHTML = ""; q(e, function (a) { f.appendChild(a) }); return f } function X(a) { if (a instanceof X) return a; var b; E(a) && (a = S(a), b = !0); if (!(this instanceof X)) { if (b && "<" !== a.charAt(0)) throw ac("nosel"); return new X(a) } if (b) { b = z.document; var d; a = (d = Zf.exec(a)) ? [b.createElement(d[1])] : (d = Zc(a, b)) ? d.childNodes : []; bc(this, a) } else y(a) ? $c(a) : bc(this, a) } function cc(a) { return a.cloneNode(!0) } function yb(a, b) { b || hb(a); if (a.querySelectorAll) for (var d = a.querySelectorAll("*"), c = 0, f = d.length; c < f; c++) hb(d[c]) } function ad(a, b, d, c) { if (v(c)) throw ac("offargs"); var f = (c = zb(a)) && c.events, e = c && c.handle; if (e) if (b) { var g = function (b) { var c = f[b]; v(d) && $a(c || [], d); v(d) && c && 0 < c.length || (a.removeEventListener(b, e), delete f[b]) }; q(b.split(" "), function (a) { g(a); Ab[a] && g(Ab[a]) }) } else for (b in f) "$destroy" !== b && a.removeEventListener(b, e), delete f[b] } function hb(a, b) { var d = a.ng339, c = d && ib[d]; c && (b ? delete c.data[b] : (c.handle && (c.events.$destroy && c.handle({}, "$destroy"), ad(a)), delete ib[d], a.ng339 = void 0)) } function zb(a, b) { var d = a.ng339, d = d && ib[d]; b && !d && (a.ng339 = d = ++$f, d = ib[d] = { events: {}, data: {}, handle: void 0 }); return d } function dc(a, b, d) { if (Yc(a)) { var c, f = v(d), e = !f && b && !F(b), g = !b; a = (a = zb(a, !e)) && a.data; if (f) a[xb(b)] = d; else { if (g) return a; if (e) return a && a[xb(b)]; for (c in b) a[xb(c)] = b[c] } } } function Bb(a, b) { return a.getAttribute ? -1 < (" " + (a.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " ").indexOf(" " + b + " ") : !1 } function Cb(a, b) { b && a.setAttribute && q(b.split(" "), function (b) { a.setAttribute("class", S((" " + (a.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " ").replace(" " + S(b) + " ", " "))) }) } function Db(a, b) { if (b && a.setAttribute) { var d = (" " + (a.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " "); q(b.split(" "), function (a) { a = S(a); -1 === d.indexOf(" " + a + " ") && (d += a + " ") }); a.setAttribute("class", S(d)) } } function bc(a, b) { if (b) if (b.nodeType) a[a.length++] = b; else { var d = b.length; if ("number" === typeof d && b.window !== b) { if (d) for (var c = 0; c < d; c++) a[a.length++] = b[c] } else a[a.length++] = b } } function bd(a, b) { return Eb(a, "$" + (b || "ngController") + "Controller") } function Eb(a, b, d) { 9 === a.nodeType && (a = a.documentElement); for (b = C(b) ? b : [b]; a;) { for (var c = 0, f = b.length; c < f; c++) if (v(d = D.data(a, b[c]))) return d; a = a.parentNode || 11 === a.nodeType && a.host } } function cd(a) { for (yb(a, !0) ; a.firstChild;) a.removeChild(a.firstChild) } function Fb(a, b) { b || yb(a); var d = a.parentNode; d && d.removeChild(a) } function ag(a, b) { b = b || z; if ("complete" === b.document.readyState) b.setTimeout(a); else D(b).on("load", a) } function $c(a) { function b() { z.document.removeEventListener("DOMContentLoaded", b); z.removeEventListener("load", b); a() } "complete" === z.document.readyState ? z.setTimeout(a) : (z.document.addEventListener("DOMContentLoaded", b), z.addEventListener("load", b)) } function dd(a, b) { var d = Gb[b.toLowerCase()]; return d && ed[xa(a)] && d } function bg(a, b) { var d = function (c, d) { c.isDefaultPrevented = function () { return c.defaultPrevented }; var e = b[d || c.type], g = e ? e.length : 0; if (g) { if (x(c.immediatePropagationStopped)) { var h = c.stopImmediatePropagation; c.stopImmediatePropagation = function () { c.immediatePropagationStopped = !0; c.stopPropagation && c.stopPropagation(); h && h.call(c) } } c.isImmediatePropagationStopped = function () { return !0 === c.immediatePropagationStopped }; var k = e.specialHandlerWrapper || cg; 1 < g && (e = ra(e)); for (var l = 0; l < g; l++) c.isImmediatePropagationStopped() || k(a, c, e[l]) } }; d.elem = a; return d } function cg(a, b, d) { d.call(a, b) } function dg(a, b, d) { var c = b.relatedTarget; c && (c === a || eg.call(a, c)) || d.call(a, b) } function Tf() { this.$get = function () { return R(X, { hasClass: function (a, b) { a.attr && (a = a[0]); return Bb(a, b) }, addClass: function (a, b) { a.attr && (a = a[0]); return Db(a, b) }, removeClass: function (a, b) { a.attr && (a = a[0]); return Cb(a, b) } }) } } function la(a, b) { var d = a && a.$$hashKey; if (d) return "function" === typeof d && (d = a.$$hashKey()), d; d = typeof a; return d = "function" === d || "object" === d && null !== a ? a.$$hashKey = d + ":" + (b || ie)() : d + ":" + a } function Qa(a, b) { if (b) { var d = 0; this.nextUid = function () { return ++d } } q(a, this.put, this) } function fd(a) { a = (Function.prototype.toString.call(a) + " ").replace(fg, ""); return a.match(gg) || a.match(hg) } function ig(a) { return (a = fd(a)) ? "function(" + (a[1] || "").replace(/[\s\r\n]+/, " ") + ")" : "fn" } function eb(a, b) { function d(a) { return function (b, c) { if (F(b)) q(b, Fc(a)); else return a(b, c) } } function c(a, b) { Pa(a, "service"); if (y(b) || C(b)) b = p.instantiate(b); if (!b.$get) throw da("pget", a); return n[a + "Provider"] = b } function f(a, b) { return function () { var c = O.invoke(b, this); if (x(c)) throw da("undef", a); return c } } function e(a, b, d) { return c(a, { $get: !1 !== d ? f(a, b) : b }) } function g(a) { fb(x(a) || C(a), "modulesToLoad", "not an array"); var b = [], c; q(a, function (a) { function d(a) { var b, c; b = 0; for (c = a.length; b < c; b++) { var e = a[b], f = p.get(e[0]); f[e[1]].apply(f, e[2]) } } if (!m.get(a)) { m.put(a, !0); try { E(a) ? (c = Zb(a), b = b.concat(g(c.requires)).concat(c._runBlocks), d(c._invokeQueue), d(c._configBlocks)) : y(a) ? b.push(p.invoke(a)) : C(a) ? b.push(p.invoke(a)) : tb(a, "module") } catch (e) { throw C(a) && (a = a[a.length - 1]), e.message && e.stack && -1 === e.stack.indexOf(e.message) && (e = e.message + "\n" + e.stack), da("modulerr", a, e.stack || e.message || e); } } }); return b } function h(a, c) { function d(b, e) { if (a.hasOwnProperty(b)) { if (a[b] === k) throw da("cdep", b + " <- " + l.join(" <- ")); return a[b] } try { return l.unshift(b), a[b] = k, a[b] = c(b, e), a[b] } catch (f) { throw a[b] === k && delete a[b], f; } finally { l.shift() } } function e(a, c, f) { var g = []; a = eb.$$annotate(a, b, f); for (var h = 0, k = a.length; h < k; h++) { var l = a[h]; if ("string" !== typeof l) throw da("itkn", l); g.push(c && c.hasOwnProperty(l) ? c[l] : d(l, f)) } return g } return { invoke: function (a, b, c, d) { "string" === typeof c && (d = c, c = null); c = e(a, c, d); C(a) && (a = a[a.length - 1]); d = a; if (La || "function" !== typeof d) d = !1; else { var f = d.$$ngIsClass; Ia(f) || (f = d.$$ngIsClass = /^(?:class\b|constructor\()/.test(Function.prototype.toString.call(d) + " ")); d = f } return d ? (c.unshift(null), new (Function.prototype.bind.apply(a, c))) : a.apply(b, c) }, instantiate: function (a, b, c) { var d = C(a) ? a[a.length - 1] : a; a = e(a, b, c); a.unshift(null); return new (Function.prototype.bind.apply(d, a)) }, get: d, annotate: eb.$$annotate, has: function (b) { return n.hasOwnProperty(b + "Provider") || a.hasOwnProperty(b) } } } b = !0 === b; var k = {}, l = [], m = new Qa([], !0), n = { $provide: { provider: d(c), factory: d(e), service: d(function (a, b) { return e(a, ["$injector", function (a) { return a.instantiate(b) }]) }), value: d(function (a, b) { return e(a, ma(b), !1) }), constant: d(function (a, b) { Pa(a, "constant"); n[a] = b; r[a] = b }), decorator: function (a, b) { var c = p.get(a + "Provider"), d = c.$get; c.$get = function () { var a = O.invoke(d, c); return O.invoke(b, null, { $delegate: a }) } } } }, p = n.$injector = h(n, function (a, b) { $.isString(b) && l.push(b); throw da("unpr", l.join(" <- ")); }), r = {}, J = h(r, function (a, b) { var c = p.get(a + "Provider", b); return O.invoke(c.$get, c, void 0, a) }), O = J; n.$injectorProvider = { $get: ma(J) }; var u = g(a), O = J.get("$injector"); O.strictDi = b; q(u, function (a) { a && O.invoke(a) }); return O } function hf() { var a = !0; this.disableAutoScrolling = function () { a = !1 }; this.$get = ["$window", "$location", "$rootScope", function (b, d, c) { function f(a) { var b = null; Array.prototype.some.call(a, function (a) { if ("a" === xa(a)) return b = a, !0 }); return b } function e(a) { if (a) { a.scrollIntoView(); var c; c = g.yOffset; y(c) ? c = c() : Tb(c) ? (c = c[0], c = "fixed" !== b.getComputedStyle(c).position ? 0 : c.getBoundingClientRect().bottom) : Y(c) || (c = 0); c && (a = a.getBoundingClientRect().top, b.scrollBy(0, a - c)) } else b.scrollTo(0, 0) } function g(a) { a = E(a) ? a : Y(a) ? a.toString() : d.hash(); var b; a ? (b = h.getElementById(a)) ? e(b) : (b = f(h.getElementsByName(a))) ? e(b) : "top" === a && e(null) : e(null) } var h = b.document; a && c.$watch(function () { return d.hash() }, function (a, b) { a === b && "" === a || ag(function () { c.$evalAsync(g) }) }); return g }] } function jb(a, b) { if (!a && !b) return ""; if (!a) return b; if (!b) return a; C(a) && (a = a.join(" ")); C(b) && (b = b.join(" ")); return a + " " + b } function jg(a) { E(a) && (a = a.split(" ")); var b = W(); q(a, function (a) { a.length && (b[a] = !0) }); return b } function Aa(a) { return F(a) ? a : {} } function kg(a, b, d, c) { function f(a) { try { a.apply(null, wa.call(arguments, 1)) } finally { if (J--, 0 === J) for (; O.length;) try { O.pop()() } catch (b) { d.error(b) } } } function e() { ia = null; g(); h() } function g() { u = A(); u = x(u) ? null : u; qa(u, B) && (u = B); B = u } function h() { if (U !== k.url() || H !== u) U = k.url(), H = u, q(K, function (a) { a(k.url(), u) }) } var k = this, l = a.location, m = a.history, n = a.setTimeout, p = a.clearTimeout, r = {}; k.isMock = !1; var J = 0, O = []; k.$$completeOutstandingRequest = f; k.$$incOutstandingRequestCount = function () { J++ }; k.notifyWhenNoOutstandingRequests = function (a) { 0 === J ? a() : O.push(a) }; var u, H, U = l.href, t = b.find("base"), ia = null, A = c.history ? function () { try { return m.state } catch (a) { } } : w; g(); H = u; k.url = function (b, d, e) { x(e) && (e = null); l !== a.location && (l = a.location); m !== a.history && (m = a.history); if (b) { var f = H === e; if (U === b && (!c.history || f)) return k; var h = U && Ba(U) === Ba(b); U = b; H = e; !c.history || h && f ? (h || (ia = b), d ? l.replace(b) : h ? (d = l, e = b.indexOf("#"), e = -1 === e ? "" : b.substr(e), d.hash = e) : l.href = b, l.href !== b && (ia = b)) : (m[d ? "replaceState" : "pushState"](e, "", b), g(), H = u); ia && (ia = b); return k } return ia || l.href.replace(/%27/g, "'") }; k.state = function () { return u }; var K = [], I = !1, B = null; k.onUrlChange = function (b) { if (!I) { if (c.history) D(a).on("popstate", e); D(a).on("hashchange", e); I = !0 } K.push(b); return b }; k.$$applicationDestroyed = function () { D(a).off("hashchange popstate", e) }; k.$$checkUrlChange = h; k.baseHref = function () { var a = t.attr("href"); return a ? a.replace(/^(https?:)?\/\/[^/]*/, "") : "" }; k.defer = function (a, b) { var c; J++; c = n(function () { delete r[c]; f(a) }, b || 0); r[c] = !0; return c }; k.defer.cancel = function (a) { return r[a] ? (delete r[a], p(a), f(w), !0) : !1 } } function pf() { this.$get = ["$window", "$log", "$sniffer", "$document", function (a, b, d, c) { return new kg(a, c, b, d) }] } function qf() { this.$get = function () { function a(a, c) { function f(a) { a !== n && (p ? p === a && (p = a.n) : p = a, e(a.n, a.p), e(a, n), n = a, n.n = null) } function e(a, b) { a !== b && (a && (a.p = b), b && (b.n = a)) } if (a in b) throw M("$cacheFactory")("iid", a); var g = 0, h = R({}, c, { id: a }), k = W(), l = c && c.capacity || Number.MAX_VALUE, m = W(), n = null, p = null; return b[a] = { put: function (a, b) { if (!x(b)) { if (l < Number.MAX_VALUE) { var c = m[a] || (m[a] = { key: a }); f(c) } a in k || g++; k[a] = b; g > l && this.remove(p.key); return b } }, get: function (a) { if (l < Number.MAX_VALUE) { var b = m[a]; if (!b) return; f(b) } return k[a] }, remove: function (a) { if (l < Number.MAX_VALUE) { var b = m[a]; if (!b) return; b === n && (n = b.p); b === p && (p = b.n); e(b.n, b.p); delete m[a] } a in k && (delete k[a], g--) }, removeAll: function () { k = W(); g = 0; m = W(); n = p = null }, destroy: function () { m = h = k = null; delete b[a] }, info: function () { return R({}, h, { size: g }) } } } var b = {}; a.info = function () { var a = {}; q(b, function (b, f) { a[f] = b.info() }); return a }; a.get = function (a) { return b[a] }; return a } } function Nf() { this.$get = ["$cacheFactory", function (a) { return a("templates") }] } function Qc(a, b) { function d(a, b, c) { var d = /^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/, e = W(); q(a, function (a, f) { if (a in n) e[f] = n[a]; else { var g = a.match(d); if (!g) throw ea("iscp", b, f, a, c ? "controller bindings definition" : "isolate scope definition"); e[f] = { mode: g[1][0], collection: "*" === g[2], optional: "?" === g[3], attrName: g[4] || f }; g[4] && (n[a] = e[f]) } }); return e } function c(a) { var b = a.charAt(0); if (!b || b !== P(b)) throw ea("baddir", a); if (a !== a.trim()) throw ea("baddir", a); } function f(a) { var b = a.require || a.controller && a.name; !C(b) && F(b) && q(b, function (a, c) { var d = a.match(l); a.substring(d[0].length) || (b[c] = d[0] + c) }); return b } var e = {}, g = /^\s*directive:\s*([\w-]+)\s+(.*)$/, h = /(([\w-]+)(?::([^;]+))?;?)/, k = me("ngSrc,ngSrcset,src,srcset"), l = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/, m = /^(on[a-z]+|formaction)$/, n = W(); this.directive = function U(b, d) { fb(b, "name"); Pa(b, "directive"); E(b) ? (c(b), fb(d, "directiveFactory"), e.hasOwnProperty(b) || (e[b] = [], a.factory(b + "Directive", ["$injector", "$exceptionHandler", function (a, c) { var d = []; q(e[b], function (e, g) { try { var h = a.invoke(e); y(h) ? h = { compile: ma(h) } : !h.compile && h.link && (h.compile = ma(h.link)); h.priority = h.priority || 0; h.index = g; h.name = h.name || b; h.require = f(h); var k = h, l = h.restrict; if (l && (!E(l) || !/[EACM]/.test(l))) throw ea("badrestrict", l, b); k.restrict = l || "EA"; h.$$moduleName = e.$$moduleName; d.push(h) } catch (m) { c(m) } }); return d }])), e[b].push(d)) : q(b, Fc(U)); return this }; this.component = function (a, b) { function c(a) { function e(b) { return y(b) || C(b) ? function (c, d) { return a.invoke(b, this, { $element: c, $attrs: d }) } : b } var f = b.template || b.templateUrl ? b.template : "", g = { controller: d, controllerAs: lg(b.controller) || b.controllerAs || "$ctrl", template: e(f), templateUrl: e(b.templateUrl), transclude: b.transclude, scope: {}, bindToController: b.bindings || {}, restrict: "E", require: b.require }; q(b, function (a, b) { "$" === b.charAt(0) && (g[b] = a) }); return g } var d = b.controller || function () { }; q(b, function (a, b) { "$" === b.charAt(0) && (c[b] = a, y(d) && (d[b] = a)) }); c.$inject = ["$injector"]; return this.directive(a, c) }; this.aHrefSanitizationWhitelist = function (a) { return v(a) ? (b.aHrefSanitizationWhitelist(a), this) : b.aHrefSanitizationWhitelist() }; this.imgSrcSanitizationWhitelist = function (a) { return v(a) ? (b.imgSrcSanitizationWhitelist(a), this) : b.imgSrcSanitizationWhitelist() }; var p = !0; this.debugInfoEnabled = function (a) { return v(a) ? (p = a, this) : p }; var r = !1; this.preAssignBindingsEnabled = function (a) { return v(a) ? (r = a, this) : r }; var J = 10; this.onChangesTtl = function (a) { return arguments.length ? (J = a, this) : J }; var O = !0; this.commentDirectivesEnabled = function (a) { return arguments.length ? (O = a, this) : O }; var u = !0; this.cssClassDirectivesEnabled = function (a) { return arguments.length ? (u = a, this) : u }; this.$get = ["$injector", "$interpolate", "$exceptionHandler", "$templateRequest", "$parse", "$controller", "$rootScope", "$sce", "$animate", "$$sanitizeUri", function (a, b, c, f, n, I, B, L, N, G) { function T() { try { if (!--za) throw da = void 0, ea("infchng", J); B.$apply(function () { for (var a = [], b = 0, c = da.length; b < c; ++b) try { da[b]() } catch (d) { a.push(d) } da = void 0; if (a.length) throw a; }) } finally { za++ } } function s(a, b) { if (b) { var c = Object.keys(b), d, e, f; d = 0; for (e = c.length; d < e; d++) f = c[d], this[f] = b[f] } else this.$attr = {}; this.$$element = a } function Q(a, b, c) { ua.innerHTML = "<span " + b + ">"; b = ua.firstChild.attributes; var d = b[0]; b.removeNamedItem(d.name); d.value = c; a.attributes.setNamedItem(d) } function Ma(a, b) { try { a.addClass(b) } catch (c) { } } function ba(a, b, c, d, e) { a instanceof D || (a = D(a)); var f = Na(a, b, a, c, d, e); ba.$$addScopeClass(a); var g = null; return function (b, c, d) { if (!a) throw ea("multilink"); fb(b, "scope"); e && e.needsNewScope && (b = b.$parent.$new()); d = d || {}; var h = d.parentBoundTranscludeFn, k = d.transcludeControllers; d = d.futureParentElement; h && h.$$boundTransclude && (h = h.$$boundTransclude); g || (g = (d = d && d[0]) ? "foreignobject" !== xa(d) && na.call(d).match(/SVG/) ? "svg" : "html" : "html"); d = "html" !== g ? D(ha(g, D("<div>").append(a).html())) : c ? Oa.clone.call(a) : a; if (k) for (var l in k) d.data("$" + l + "Controller", k[l].instance); ba.$$addScopeInfo(d, b); c && c(d, b); f && f(b, d, d, h); c || (a = f = null); return d } } function Na(a, b, c, d, e, f) { function g(a, c, d, e) { var f, k, l, m, n, p, r; if (K) for (r = Array(c.length), m = 0; m < h.length; m += 3) f = h[m], r[f] = c[f]; else r = c; m = 0; for (n = h.length; m < n;) k = r[h[m++]], c = h[m++], f = h[m++], c ? (c.scope ? (l = a.$new(), ba.$$addScopeInfo(D(k), l)) : l = a, p = c.transcludeOnThisElement ? ja(a, c.transclude, e) : !c.templateOnThisElement && e ? e : !e && b ? ja(a, b) : null, c(f, l, k, d, p)) : f && f(a, k.childNodes, void 0, e) } for (var h = [], k = C(a) || a instanceof D, l, m, n, p, K, r = 0; r < a.length; r++) { l = new s; 11 === La && M(a, r, k); m = fc(a[r], [], l, 0 === r ? d : void 0, e); (f = m.length ? X(m, a[r], l, b, c, null, [], [], f) : null) && f.scope && ba.$$addScopeClass(l.$$element); l = f && f.terminal || !(n = a[r].childNodes) || !n.length ? null : Na(n, f ? (f.transcludeOnThisElement || !f.templateOnThisElement) && f.transclude : b); if (f || l) h.push(r, f, l), p = !0, K = K || f; f = null } return p ? g : null } function M(a, b, c) { var d = a[b], e = d.parentNode, f; if (d.nodeType === Ja) for (; ;) { f = e ? d.nextSibling : a[b + 1]; if (!f || f.nodeType !== Ja) break; d.nodeValue += f.nodeValue; f.parentNode && f.parentNode.removeChild(f); c && f === a[b + 1] && a.splice(b + 1, 1) } } function ja(a, b, c) { function d(e, f, g, h, k) { e || (e = a.$new(!1, k), e.$$transcluded = !0); return b(e, f, { parentBoundTranscludeFn: c, transcludeControllers: g, futureParentElement: h }) } var e = d.$$slots = W(), f; for (f in b.$$slots) e[f] = b.$$slots[f] ? ja(a, b.$$slots[f], c) : null; return d } function fc(a, b, c, d, e) { var f = c.$attr, g; switch (a.nodeType) { case 1: g = xa(a); Y(b, Ca(g), "E", d, e); for (var k, l, m, n, p = a.attributes, K = 0, r = p && p.length; K < r; K++) { var A = !1, B = !1; k = p[K]; l = k.name; m = k.value; k = Ca(l); (n = Ha.test(k)) && (l = l.replace(gd, "").substr(8).replace(/_(.)/g, function (a, b) { return b.toUpperCase() })); (k = k.match(Ka)) && Z(k[1]) && (A = l, B = l.substr(0, l.length - 5) + "end", l = l.substr(0, l.length - 6)); k = Ca(l.toLowerCase()); f[k] = l; if (n || !c.hasOwnProperty(k)) c[k] = m, dd(a, k) && (c[k] = !0); ra(a, b, m, k, n); Y(b, k, "A", d, e, A, B) } "input" === g && "hidden" === a.getAttribute("type") && a.setAttribute("autocomplete", "off"); if (!Ga) break; f = a.className; F(f) && (f = f.animVal); if (E(f) && "" !== f) for (; a = h.exec(f) ;) k = Ca(a[2]), Y(b, k, "C", d, e) && (c[k] = S(a[3])), f = f.substr(a.index + a[0].length); break; case Ja: ma(b, a.nodeValue); break; case 8: if (!Fa) break; kb(a, b, c, d, e) } b.sort(ka); return b } function kb(a, b, c, d, e) { try { var f = g.exec(a.nodeValue); if (f) { var h = Ca(f[1]); Y(b, h, "M", d, e) && (c[h] = S(f[2])) } } catch (k) { } } function hd(a, b, c) { var d = [], e = 0; if (b && a.hasAttribute && a.hasAttribute(b)) { do { if (!a) throw ea("uterdir", b, c); 1 === a.nodeType && (a.hasAttribute(b) && e++, a.hasAttribute(c) && e--); d.push(a); a = a.nextSibling } while (0 < e) } else d.push(a); return D(d) } function id(a, b, c) { return function (d, e, f, g, h) { e = hd(e[0], b, c); return a(d, e, f, g, h) } } function gc(a, b, c, d, e, f) { var g; return a ? ba(b, c, d, e, f) : function () { g || (g = ba(b, c, d, e, f), b = c = f = null); return g.apply(this, arguments) } } function X(a, b, d, e, f, g, h, k, l) { function m(a, b, c, d) { if (a) { c && (a = id(a, c, d)); a.require = t.require; a.directiveName = L; if (B === t || t.$$isolateScope) a = sa(a, { isolateScope: !0 }); h.push(a) } if (b) { c && (b = id(b, c, d)); b.require = t.require; b.directiveName = L; if (B === t || t.$$isolateScope) b = sa(b, { isolateScope: !0 }); k.push(b) } } function n(a, e, f, g, l) { function m(a, b, c, d) { var e; Za(a) || (d = c, c = b, b = a, a = void 0); U && (e = N); c || (c = U ? L.parent() : L); if (d) { var f = l.$$slots[d]; if (f) return f(a, b, e, c, Q); if (x(f)) throw ea("noslot", d, ya(L)); } else return l(a, b, e, c, Q) } var p, t, u, G, J, N, T, L; b === f ? (g = d, L = d.$$element) : (L = D(f), g = new s(L, d)); J = e; B ? G = e.$new(!0) : K && (J = e.$parent); l && (T = m, T.$$boundTransclude = l, T.isSlotFilled = function (a) { return !!l.$$slots[a] }); A && (N = ca(L, g, T, A, G, e, B)); B && (ba.$$addScopeInfo(L, G, !0, !(I && (I === B || I === B.$$originalDirective))), ba.$$addScopeClass(L, !0), G.$$isolateBindings = B.$$isolateBindings, t = oa(e, g, G, G.$$isolateBindings, B), t.removeWatches && G.$on("$destroy", t.removeWatches)); for (p in N) { t = A[p]; u = N[p]; var Hb = t.$$bindings.bindToController; if (r) { u.bindingInfo = Hb ? oa(J, g, u.instance, Hb, t) : {}; var O = u(); O !== u.instance && (u.instance = O, L.data("$" + t.name + "Controller", O), u.bindingInfo.removeWatches && u.bindingInfo.removeWatches(), u.bindingInfo = oa(J, g, u.instance, Hb, t)) } else u.instance = u(), L.data("$" + t.name + "Controller", u.instance), u.bindingInfo = oa(J, g, u.instance, Hb, t) } q(A, function (a, b) { var c = a.require; a.bindToController && !C(c) && F(c) && R(N[b].instance, V(b, c, L, N)) }); q(N, function (a) { var b = a.instance; if (y(b.$onChanges)) try { b.$onChanges(a.bindingInfo.initialChanges) } catch (d) { c(d) } if (y(b.$onInit)) try { b.$onInit() } catch (e) { c(e) } y(b.$doCheck) && (J.$watch(function () { b.$doCheck() }), b.$doCheck()); y(b.$onDestroy) && J.$on("$destroy", function () { b.$onDestroy() }) }); p = 0; for (t = h.length; p < t; p++) u = h[p], ta(u, u.isolateScope ? G : e, L, g, u.require && V(u.directiveName, u.require, L, N), T); var Q = e; B && (B.template || null === B.templateUrl) && (Q = G); a && a(Q, f.childNodes, void 0, l); for (p = k.length - 1; 0 <= p; p--) u = k[p], ta(u, u.isolateScope ? G : e, L, g, u.require && V(u.directiveName, u.require, L, N), T); q(N, function (a) { a = a.instance; y(a.$postLink) && a.$postLink() }) } l = l || {}; for (var p = -Number.MAX_VALUE, K = l.newScopeDirective, A = l.controllerDirectives, B = l.newIsolateScopeDirective, I = l.templateDirective, u = l.nonTlbTranscludeDirective, J = !1, N = !1, U = l.hasElementTranscludeDirective, G = d.$$element = D(b), t, L, T, O = e, Q, v = !1, Ma = !1, w, z = 0, E = a.length; z < E; z++) { t = a[z]; var Na = t.$$start, M = t.$$end; Na && (G = hd(b, Na, M)); T = void 0; if (p > t.priority) break; if (w = t.scope) t.templateUrl || (F(w) ? ($("new/isolated scope", B || K, t, G), B = t) : $("new/isolated scope", B, t, G)), K = K || t; L = t.name; if (!v && (t.replace && (t.templateUrl || t.template) || t.transclude && !t.$$tlb)) { for (w = z + 1; v = a[w++];) if (v.transclude && !v.$$tlb || v.replace && (v.templateUrl || v.template)) { Ma = !0; break } v = !0 } !t.templateUrl && t.controller && (A = A || W(), $("'" + L + "' controller", A[L], t, G), A[L] = t); if (w = t.transclude) if (J = !0, t.$$tlb || ($("transclusion", u, t, G), u = t), "element" === w) U = !0, p = t.priority, T = G, G = d.$$element = D(ba.$$createComment(L, d[L])), b = G[0], la(f, wa.call(T, 0), b), T[0].$$parentNode = T[0].parentNode, O = gc(Ma, T, e, p, g && g.name, { nonTlbTranscludeDirective: u }); else { var ja = W(); if (F(w)) { T = []; var P = W(), kb = W(); q(w, function (a, b) { var c = "?" === a.charAt(0); a = c ? a.substring(1) : a; P[a] = b; ja[b] = null; kb[b] = c }); q(G.contents(), function (a) { var b = P[Ca(xa(a))]; b ? (kb[b] = !0, ja[b] = ja[b] || [], ja[b].push(a)) : T.push(a) }); q(kb, function (a, b) { if (!a) throw ea("reqslot", b); }); for (var ec in ja) ja[ec] && (ja[ec] = gc(Ma, ja[ec], e)) } else T = D(cc(b)).contents(); G.empty(); O = gc(Ma, T, e, void 0, void 0, { needsNewScope: t.$$isolateScope || t.$$newScope }); O.$$slots = ja } if (t.template) if (N = !0, $("template", I, t, G), I = t, w = y(t.template) ? t.template(G, d) : t.template, w = Ea(w), t.replace) { g = t; T = $b.test(w) ? jd(ha(t.templateNamespace, S(w))) : []; b = T[0]; if (1 !== T.length || 1 !== b.nodeType) throw ea("tplrt", L, ""); la(f, G, b); E = { $attr: {} }; w = fc(b, [], E); var Y = a.splice(z + 1, a.length - (z + 1)); (B || K) && aa(w, B, K); a = a.concat(w).concat(Y); fa(d, E); E = a.length } else G.html(w); if (t.templateUrl) N = !0, $("template", I, t, G), I = t, t.replace && (g = t), n = ga(a.splice(z, a.length - z), G, d, f, J && O, h, k, { controllerDirectives: A, newScopeDirective: K !== t && K, newIsolateScopeDirective: B, templateDirective: I, nonTlbTranscludeDirective: u }), E = a.length; else if (t.compile) try { Q = t.compile(G, d, O); var Z = t.$$originalDirective || t; y(Q) ? m(null, bb(Z, Q), Na, M) : Q && m(bb(Z, Q.pre), bb(Z, Q.post), Na, M) } catch (da) { c(da, ya(G)) } t.terminal && (n.terminal = !0, p = Math.max(p, t.priority)) } n.scope = K && !0 === K.scope; n.transcludeOnThisElement = J; n.templateOnThisElement = N; n.transclude = O; l.hasElementTranscludeDirective = U; return n } function V(a, b, c, d) { var e; if (E(b)) { var f = b.match(l); b = b.substring(f[0].length); var g = f[1] || f[3], f = "?" === f[2]; "^^" === g ? c = c.parent() : e = (e = d && d[b]) && e.instance; if (!e) { var h = "$" + b + "Controller"; e = g ? c.inheritedData(h) : c.data(h) } if (!e && !f) throw ea("ctreq", b, a); } else if (C(b)) for (e = [], g = 0, f = b.length; g < f; g++) e[g] = V(a, b[g], c, d); else F(b) && (e = {}, q(b, function (b, f) { e[f] = V(a, b, c, d) })); return e || null } function ca(a, b, c, d, e, f, g) { var h = W(), k; for (k in d) { var l = d[k], m = { $scope: l === g || l.$$isolateScope ? e : f, $element: a, $attrs: b, $transclude: c }, n = l.controller; "@" === n && (n = b[l.name]); m = I(n, m, !0, l.controllerAs); h[l.name] = m; a.data("$" + l.name + "Controller", m.instance) } return h } function aa(a, b, c) { for (var d = 0, e = a.length; d < e; d++) a[d] = Ub(a[d], { $$isolateScope: b, $$newScope: c }) } function Y(b, c, f, g, h, k, l) { if (c === h) return null; var m = null; if (e.hasOwnProperty(c)) { h = a.get(c + "Directive"); for (var n = 0, p = h.length; n < p; n++) if (c = h[n], (x(g) || g > c.priority) && -1 !== c.restrict.indexOf(f)) { k && (c = Ub(c, { $$start: k, $$end: l })); if (!c.$$bindings) { var K = m = c, r = c.name, A = { isolateScope: null, bindToController: null }; F(K.scope) && (!0 === K.bindToController ? (A.bindToController = d(K.scope, r, !0), A.isolateScope = {}) : A.isolateScope = d(K.scope, r, !1)); F(K.bindToController) && (A.bindToController = d(K.bindToController, r, !0)); if (A.bindToController && !K.controller) throw ea("noctrl", r); m = m.$$bindings = A; F(m.isolateScope) && (c.$$isolateBindings = m.isolateScope) } b.push(c); m = c } } return m } function Z(b) { if (e.hasOwnProperty(b)) for (var c = a.get(b + "Directive"), d = 0, f = c.length; d < f; d++) if (b = c[d], b.multiElement) return !0; return !1 } function fa(a, b) { var c = b.$attr, d = a.$attr; q(a, function (d, e) { "$" !== e.charAt(0) && (b[e] && b[e] !== d && (d = d.length ? d + (("style" === e ? ";" : " ") + b[e]) : b[e]), a.$set(e, d, !0, c[e])) }); q(b, function (b, e) { a.hasOwnProperty(e) || "$" === e.charAt(0) || (a[e] = b, "class" !== e && "style" !== e && (d[e] = c[e])) }) } function ga(a, b, d, e, g, h, k, l) { var m = [], n, p, K = b[0], r = a.shift(), u = Ub(r, { templateUrl: null, transclude: null, replace: null, $$originalDirective: r }), t = y(r.templateUrl) ? r.templateUrl(b, d) : r.templateUrl, B = r.templateNamespace; b.empty(); f(t).then(function (c) { var f, A; c = Ea(c); if (r.replace) { c = $b.test(c) ? jd(ha(B, S(c))) : []; f = c[0]; if (1 !== c.length || 1 !== f.nodeType) throw ea("tplrt", r.name, t); c = { $attr: {} }; la(e, b, f); var I = fc(f, [], c); F(r.scope) && aa(I, !0); a = I.concat(a); fa(d, c) } else f = K, b.html(c); a.unshift(u); n = X(a, f, d, g, b, r, h, k, l); q(e, function (a, c) { a === f && (e[c] = b[0]) }); for (p = Na(b[0].childNodes, g) ; m.length;) { c = m.shift(); A = m.shift(); var G = m.shift(), J = m.shift(), I = b[0]; if (!c.$$destroyed) { if (A !== K) { var N = A.className; l.hasElementTranscludeDirective && r.replace || (I = cc(f)); la(G, D(A), I); Ma(D(I), N) } A = n.transcludeOnThisElement ? ja(c, n.transclude, J) : J; n(p, c, I, e, A) } } m = null }).catch(function (a) { a instanceof Error && c(a) }).catch(w); return function (a, b, c, d, e) { a = e; b.$$destroyed || (m ? m.push(b, c, d, a) : (n.transcludeOnThisElement && (a = ja(b, n.transclude, e)), n(p, b, c, d, a))) } } function ka(a, b) { var c = b.priority - a.priority; return 0 !== c ? c : a.name !== b.name ? a.name < b.name ? -1 : 1 : a.index - b.index } function $(a, b, c, d) { function e(a) { return a ? " (module: " + a + ")" : "" } if (b) throw ea("multidir", b.name, e(b.$$moduleName), c.name, e(c.$$moduleName), a, ya(d)); } function ma(a, c) { var d = b(c, !0); d && a.push({ priority: 0, compile: function (a) { a = a.parent(); var b = !!a.length; b && ba.$$addBindingClass(a); return function (a, c) { var e = c.parent(); b || ba.$$addBindingClass(e); ba.$$addBindingInfo(e, d.expressions); a.$watch(d, function (a) { c[0].nodeValue = a }) } } }) } function ha(a, b) { a = P(a || "html"); switch (a) { case "svg": case "math": var c = z.document.createElement("div"); c.innerHTML = "<" + a + ">" + b + "</" + a + ">"; return c.childNodes[0].childNodes; default: return b } } function pa(a, b) { if ("srcdoc" === b) return L.HTML; var c = xa(a); if ("src" === b || "ngSrc" === b) { if (-1 === ["img", "video", "audio", "source", "track"].indexOf(c)) return L.RESOURCE_URL } else if ("xlinkHref" === b || "form" === c && "action" === b || "link" === c && "href" === b) return L.RESOURCE_URL } function ra(a, c, d, e, f) { var g = pa(a, e), h = k[e] || f, l = b(d, !f, g, h); if (l) { if ("multiple" === e && "select" === xa(a)) throw ea("selmulti", ya(a)); if (m.test(e)) throw ea("nodomevents"); c.push({ priority: 100, compile: function () { return { pre: function (a, c, f) { c = f.$$observers || (f.$$observers = W()); var k = f[e]; k !== d && (l = k && b(k, !0, g, h), d = k); l && (f[e] = l(a), (c[e] || (c[e] = [])).$$inter = !0, (f.$$observers && f.$$observers[e].$$scope || a).$watch(l, function (a, b) { "class" === e && a !== b ? f.$updateClass(a, b) : f.$set(e, a) })) } } } }) } } function la(a, b, c) { var d = b[0], e = b.length, f = d.parentNode, g, h; if (a) for (g = 0, h = a.length; g < h; g++) if (a[g] === d) { a[g++] = c; h = g + e - 1; for (var k = a.length; g < k; g++, h++) h < k ? a[g] = a[h] : delete a[g]; a.length -= e - 1; a.context === d && (a.context = c); break } f && f.replaceChild(c, d); a = z.document.createDocumentFragment(); for (g = 0; g < e; g++) a.appendChild(b[g]); D.hasData(d) && (D.data(c, D.data(d)), D(d).off("$destroy")); D.cleanData(a.querySelectorAll("*")); for (g = 1; g < e; g++) delete b[g]; b[0] = c; b.length = 1 } function sa(a, b) { return R(function () { return a.apply(null, arguments) }, a, b) } function ta(a, b, d, e, f, g) { try { a(b, d, e, f, g) } catch (h) { c(h, ya(d)) } } function oa(a, c, d, e, f) { function g(b, c, e) { !y(d.$onChanges) || c === e || c !== c && e !== e || (da || (a.$$postDigest(T), da = []), m || (m = {}, da.push(h)), m[b] && (e = m[b].previousValue), m[b] = new Ib(e, c)) } function h() { d.$onChanges(m); m = void 0 } var k = [], l = {}, m; q(e, function (e, h) { var m = e.attrName, p = e.optional, r, A, u, B; switch (e.mode) { case "@": p || va.call(c, m) || (d[h] = c[m] = void 0); p = c.$observe(m, function (a) { if (E(a) || Ia(a)) g(h, a, d[h]), d[h] = a }); c.$$observers[m].$$scope = a; r = c[m]; E(r) ? d[h] = b(r)(a) : Ia(r) && (d[h] = r); l[h] = new Ib(hc, d[h]); k.push(p); break; case "=": if (!va.call(c, m)) { if (p) break; c[m] = void 0 } if (p && !c[m]) break; A = n(c[m]); B = A.literal ? qa : function (a, b) { return a === b || a !== a && b !== b }; u = A.assign || function () { r = d[h] = A(a); throw ea("nonassign", c[m], m, f.name); }; r = d[h] = A(a); p = function (b) { B(b, d[h]) || (B(b, r) ? u(a, b = d[h]) : d[h] = b); return r = b }; p.$stateful = !0; p = e.collection ? a.$watchCollection(c[m], p) : a.$watch(n(c[m], p), null, A.literal); k.push(p); break; case "<": if (!va.call(c, m)) { if (p) break; c[m] = void 0 } if (p && !c[m]) break; A = n(c[m]); var I = A.literal, G = d[h] = A(a); l[h] = new Ib(hc, d[h]); p = a.$watch(A, function (a, b) { if (b === a) { if (b === G || I && qa(b, G)) return; b = G } g(h, a, b); d[h] = a }, I); k.push(p); break; case "&": A = c.hasOwnProperty(m) ? n(c[m]) : w; if (A === w && p) break; d[h] = function (b) { return A(a, b) } } }); return { initialChanges: l, removeWatches: k.length && function () { for (var a = 0, b = k.length; a < b; ++a) k[a]() } } } var Da = /^\w/, ua = z.document.createElement("div"), Fa = O, Ga = u, za = J, da; s.prototype = { $normalize: Ca, $addClass: function (a) { a && 0 < a.length && N.addClass(this.$$element, a) }, $removeClass: function (a) { a && 0 < a.length && N.removeClass(this.$$element, a) }, $updateClass: function (a, b) { var c = kd(a, b); c && c.length && N.addClass(this.$$element, c); (c = kd(b, a)) && c.length && N.removeClass(this.$$element, c) }, $set: function (a, b, d, e) { var f = dd(this.$$element[0], a), g = ld[a], h = a; f ? (this.$$element.prop(a, b), e = f) : g && (this[g] = b, h = g); this[a] = b; e ? this.$attr[a] = e : (e = this.$attr[a]) || (this.$attr[a] = e = Nc(a, "-")); f = xa(this.$$element); if ("a" === f && ("href" === a || "xlinkHref" === a) || "img" === f && "src" === a) this[a] = b = G(b, "src" === a); else if ("img" === f && "srcset" === a && v(b)) { for (var f = "", g = S(b), k = /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/, k = /\s/.test(g) ? k : /(,)/, g = g.split(k), k = Math.floor(g.length / 2), l = 0; l < k; l++) var m = 2 * l, f = f + G(S(g[m]), !0), f = f + (" " + S(g[m + 1])); g = S(g[2 * l]).split(/\s/); f += G(S(g[0]), !0); 2 === g.length && (f += " " + S(g[1])); this[a] = b = f } !1 !== d && (null === b || x(b) ? this.$$element.removeAttr(e) : Da.test(e) ? this.$$element.attr(e, b) : Q(this.$$element[0], e, b)); (a = this.$$observers) && q(a[h], function (a) { try { a(b) } catch (d) { c(d) } }) }, $observe: function (a, b) { var c = this, d = c.$$observers || (c.$$observers = W()), e = d[a] || (d[a] = []); e.push(b); B.$evalAsync(function () { e.$$inter || !c.hasOwnProperty(a) || x(c[a]) || b(c[a]) }); return function () { $a(e, b) } } }; var Aa = b.startSymbol(), Ba = b.endSymbol(), Ea = "{{" === Aa && "}}" === Ba ? Ya : function (a) { return a.replace(/\{\{/g, Aa).replace(/}}/g, Ba) }, Ha = /^ngAttr[A-Z]/, Ka = /^(.+)Start$/; ba.$$addBindingInfo = p ? function (a, b) { var c = a.data("$binding") || []; C(b) ? c = c.concat(b) : c.push(b); a.data("$binding", c) } : w; ba.$$addBindingClass = p ? function (a) { Ma(a, "ng-binding") } : w; ba.$$addScopeInfo = p ? function (a, b, c, d) { a.data(c ? d ? "$isolateScopeNoTemplate" : "$isolateScope" : "$scope", b) } : w; ba.$$addScopeClass = p ? function (a, b) { Ma(a, b ? "ng-isolate-scope" : "ng-scope") } : w; ba.$$createComment = function (a, b) { var c = ""; p && (c = " " + (a || "") + ": ", b && (c += b + " ")); return z.document.createComment(c) }; return ba }] } function Ib(a, b) { this.previousValue = a; this.currentValue = b } function Ca(a) { return a.replace(gd, "").replace(mg, gb) } function kd(a, b) { var d = "", c = a.split(/\s+/), f = b.split(/\s+/), e = 0; a: for (; e < c.length; e++) { for (var g = c[e], h = 0; h < f.length; h++) if (g === f[h]) continue a; d += (0 < d.length ? " " : "") + g } return d } function jd(a) { a = D(a); var b = a.length; if (1 >= b) return a; for (; b--;) { var d = a[b]; (8 === d.nodeType || d.nodeType === Ja && "" === d.nodeValue.trim()) && ng.call(a, b, 1) } return a } function lg(a, b) { if (b && E(b)) return b; if (E(a)) { var d = md.exec(a); if (d) return d[3] } } function rf() { var a = {}, b = !1; this.has = function (b) { return a.hasOwnProperty(b) }; this.register = function (b, c) { Pa(b, "controller"); F(b) ? R(a, b) : a[b] = c }; this.allowGlobals = function () { b = !0 }; this.$get = ["$injector", "$window", function (d, c) { function f(a, b, c, d) { if (!a || !F(a.$scope)) throw M("$controller")("noscp", d, b); a.$scope[b] = c } return function (e, g, h, k) { var l, m, n; h = !0 === h; k && E(k) && (n = k); if (E(e)) { k = e.match(md); if (!k) throw nd("ctrlfmt", e); m = k[1]; n = n || k[3]; e = a.hasOwnProperty(m) ? a[m] : Pc(g.$scope, m, !0) || (b ? Pc(c, m, !0) : void 0); if (!e) throw nd("ctrlreg", m); tb(e, m, !0) } if (h) return h = (C(e) ? e[e.length - 1] : e).prototype, l = Object.create(h || null), n && f(g, n, l, m || e.name), R(function () { var a = d.invoke(e, l, g, m); a !== l && (F(a) || y(a)) && (l = a, n && f(g, n, l, m || e.name)); return l }, { instance: l, identifier: n }); l = d.instantiate(e, g, m); n && f(g, n, l, m || e.name); return l } }] } function sf() { this.$get = ["$window", function (a) { return D(a.document) }] } function tf() { this.$get = ["$document", "$rootScope", function (a, b) { function d() { f = c.hidden } var c = a[0], f = c && c.hidden; a.on("visibilitychange", d); b.$on("$destroy", function () { a.off("visibilitychange", d) }); return function () { return f } }] } function uf() { this.$get = ["$log", function (a) { return function (b, d) { a.error.apply(a, arguments) } }] } function ic(a) { return F(a) ? fa(a) ? a.toISOString() : cb(a) : a } function zf() { this.$get = function () { return function (a) { if (!a) return ""; var b = []; Ec(a, function (a, c) { null === a || x(a) || (C(a) ? q(a, function (a) { b.push(ka(c) + "=" + ka(ic(a))) }) : b.push(ka(c) + "=" + ka(ic(a)))) }); return b.join("&") } } } function Af() { this.$get = function () { return function (a) { function b(a, f, e) { null === a || x(a) || (C(a) ? q(a, function (a, c) { b(a, f + "[" + (F(a) ? c : "") + "]") }) : F(a) && !fa(a) ? Ec(a, function (a, c) { b(a, f + (e ? "" : "[") + c + (e ? "" : "]")) }) : d.push(ka(f) + "=" + ka(ic(a)))) } if (!a) return ""; var d = []; b(a, "", !0); return d.join("&") } } } function jc(a, b) { if (E(a)) { var d = a.replace(og, "").trim(); if (d) { var c = b("Content-Type"); (c = c && 0 === c.indexOf(od)) || (c = (c = d.match(pg)) && qg[c[0]].test(d)); c && (a = Ic(d)) } } return a } function pd(a) { var b = W(), d; E(a) ? q(a.split("\n"), function (a) { d = a.indexOf(":"); var f = P(S(a.substr(0, d))); a = S(a.substr(d + 1)); f && (b[f] = b[f] ? b[f] + ", " + a : a) }) : F(a) && q(a, function (a, d) { var e = P(d), g = S(a); e && (b[e] = b[e] ? b[e] + ", " + g : g) }); return b } function qd(a) { var b; return function (d) { b || (b = pd(a)); return d ? (d = b[P(d)], void 0 === d && (d = null), d) : b } } function rd(a, b, d, c) { if (y(c)) return c(a, b, d); q(c, function (c) { a = c(a, b, d) }); return a } function yf() { var a = this.defaults = { transformResponse: [jc], transformRequest: [function (a) { return F(a) && "[object File]" !== na.call(a) && "[object Blob]" !== na.call(a) && "[object FormData]" !== na.call(a) ? cb(a) : a }], headers: { common: { Accept: "application/json, text/plain, */*" }, post: ra(kc), put: ra(kc), patch: ra(kc) }, xsrfCookieName: "XSRF-TOKEN", xsrfHeaderName: "X-XSRF-TOKEN", paramSerializer: "$httpParamSerializer", jsonpCallbackParam: "callback" }, b = !1; this.useApplyAsync = function (a) { return v(a) ? (b = !!a, this) : b }; var d = this.interceptors = []; this.$get = ["$browser", "$httpBackend", "$$cookieReader", "$cacheFactory", "$rootScope", "$q", "$injector", "$sce", function (c, f, e, g, h, k, l, m) { function n(b) { function d(a, b) { for (var c = 0, e = b.length; c < e;) { var f = b[c++], g = b[c++]; a = a.then(f, g) } b.length = 0; return a } function e(a, b) { var c, d = {}; q(a, function (a, e) { y(a) ? (c = a(b), null != c && (d[e] = c)) : d[e] = a }); return d } function f(a) { var b = R({}, a); b.data = rd(a.data, a.headers, a.status, g.transformResponse); a = a.status; return 200 <= a && 300 > a ? b : k.reject(b) } if (!F(b)) throw M("$http")("badreq", b); if (!E(m.valueOf(b.url))) throw M("$http")("badreq", b.url); var g = R({ method: "get", transformRequest: a.transformRequest, transformResponse: a.transformResponse, paramSerializer: a.paramSerializer, jsonpCallbackParam: a.jsonpCallbackParam }, b); g.headers = function (b) { var c = a.headers, d = R({}, b.headers), f, g, h, c = R({}, c.common, c[P(b.method)]); a: for (f in c) { g = P(f); for (h in d) if (P(h) === g) continue a; d[f] = c[f] } return e(d, ra(b)) }(b); g.method = vb(g.method); g.paramSerializer = E(g.paramSerializer) ? l.get(g.paramSerializer) : g.paramSerializer; c.$$incOutstandingRequestCount(); var h = [], n = []; b = k.resolve(g); q(u, function (a) { (a.request || a.requestError) && h.unshift(a.request, a.requestError); (a.response || a.responseError) && n.push(a.response, a.responseError) }); b = d(b, h); b = b.then(function (b) { var c = b.headers, d = rd(b.data, qd(c), void 0, b.transformRequest); x(d) && q(c, function (a, b) { "content-type" === P(b) && delete c[b] }); x(b.withCredentials) && !x(a.withCredentials) && (b.withCredentials = a.withCredentials); return p(b, d).then(f, f) }); b = d(b, n); return b = b.finally(function () { c.$$completeOutstandingRequest(w) }) } function p(c, d) { function g(a) { if (a) { var c = {}; q(a, function (a, d) { c[d] = function (c) { function d() { a(c) } b ? h.$applyAsync(d) : h.$$phase ? d() : h.$apply(d) } }); return c } } function l(a, c, d, e) { function f() { p(c, a, d, e) } N && (200 <= a && 300 > a ? N.put(Q, [a, c, pd(d), e]) : N.remove(Q)); b ? h.$applyAsync(f) : (f(), h.$$phase || h.$apply()) } function p(a, b, d, e) { b = -1 <= b ? b : 0; (200 <= b && 300 > b ? B.resolve : B.reject)({ data: a, status: b, headers: qd(d), config: c, statusText: e }) } function K(a) { p(a.data, a.status, ra(a.headers()), a.statusText) } function u() { var a = n.pendingRequests.indexOf(c); -1 !== a && n.pendingRequests.splice(a, 1) } var B = k.defer(), L = B.promise, N, G, T = c.headers, s = "jsonp" === P(c.method), Q = c.url; s ? Q = m.getTrustedResourceUrl(Q) : E(Q) || (Q = m.valueOf(Q)); Q = r(Q, c.paramSerializer(c.params)); s && (Q = J(Q, c.jsonpCallbackParam)); n.pendingRequests.push(c); L.then(u, u); !c.cache && !a.cache || !1 === c.cache || "GET" !== c.method && "JSONP" !== c.method || (N = F(c.cache) ? c.cache : F(a.cache) ? a.cache : O); N && (G = N.get(Q), v(G) ? G && y(G.then) ? G.then(K, K) : C(G) ? p(G[1], G[0], ra(G[2]), G[3]) : p(G, 200, {}, "OK") : N.put(Q, L)); x(G) && ((G = sd(c.url) ? e()[c.xsrfCookieName || a.xsrfCookieName] : void 0) && (T[c.xsrfHeaderName || a.xsrfHeaderName] = G), f(c.method, Q, d, l, T, c.timeout, c.withCredentials, c.responseType, g(c.eventHandlers), g(c.uploadEventHandlers))); return L } function r(a, b) { 0 < b.length && (a += (-1 === a.indexOf("?") ? "?" : "&") + b); return a } function J(a, b) { if (/[&?][^=]+=JSON_CALLBACK/.test(a)) throw td("badjsonp", a); if ((new RegExp("[&?]" + b + "=")).test(a)) throw td("badjsonp", b, a); return a += (-1 === a.indexOf("?") ? "?" : "&") + b + "=JSON_CALLBACK" } var O = g("$http"); a.paramSerializer = E(a.paramSerializer) ? l.get(a.paramSerializer) : a.paramSerializer; var u = []; q(d, function (a) { u.unshift(E(a) ? l.get(a) : l.invoke(a)) }); n.pendingRequests = []; (function (a) { q(arguments, function (a) { n[a] = function (b, c) { return n(R({}, c || {}, { method: a, url: b })) } }) })("get", "delete", "head", "jsonp"); (function (a) { q(arguments, function (a) { n[a] = function (b, c, d) { return n(R({}, d || {}, { method: a, url: b, data: c })) } }) })("post", "put", "patch"); n.defaults = a; return n }] } function Cf() { this.$get = function () { return function () { return new z.XMLHttpRequest } } } function Bf() { this.$get = ["$browser", "$jsonpCallbacks", "$document", "$xhrFactory", function (a, b, d, c) { return rg(a, c, a.defer, b, d[0]) }] } function rg(a, b, d, c, f) { function e(a, b, d) { a = a.replace("JSON_CALLBACK", b); var e = f.createElement("script"), m = null; e.type = "text/javascript"; e.src = a; e.async = !0; m = function (a) { e.removeEventListener("load", m); e.removeEventListener("error", m); f.body.removeChild(e); e = null; var g = -1, r = "unknown"; a && ("load" !== a.type || c.wasCalled(b) || (a = { type: "error" }), r = a.type, g = "error" === a.type ? 404 : 200); d && d(g, r) }; e.addEventListener("load", m); e.addEventListener("error", m); f.body.appendChild(e); return m } return function (f, h, k, l, m, n, p, r, J, O) { function u() { U && U(); t && t.abort() } h = h || a.url(); if ("jsonp" === P(f)) var H = c.createCallback(h), U = e(h, H, function (a, b) { var e = 200 === a && c.getResponse(H); v(A) && d.cancel(A); U = t = null; l(a, e, "", b); c.removeCallback(H) }); else { var t = b(f, h); t.open(f, h, !0); q(m, function (a, b) { v(a) && t.setRequestHeader(b, a) }); t.onload = function () { var a = t.statusText || "", b = "response" in t ? t.response : t.responseText, c = 1223 === t.status ? 204 : t.status; 0 === c && (c = b ? 200 : "file" === Da(h).protocol ? 404 : 0); var e = t.getAllResponseHeaders(); v(A) && d.cancel(A); U = t = null; l(c, b, e, a) }; f = function () { v(A) && d.cancel(A); U = t = null; l(-1, null, null, "") }; t.onerror = f; t.onabort = f; t.ontimeout = f; q(J, function (a, b) { t.addEventListener(b, a) }); q(O, function (a, b) { t.upload.addEventListener(b, a) }); p && (t.withCredentials = !0); if (r) try { t.responseType = r } catch (s) { if ("json" !== r) throw s; } t.send(x(k) ? null : k) } if (0 < n) var A = d(u, n); else n && y(n.then) && n.then(u) } } function wf() { var a = "{{", b = "}}"; this.startSymbol = function (b) { return b ? (a = b, this) : a }; this.endSymbol = function (a) { return a ? (b = a, this) : b }; this.$get = ["$parse", "$exceptionHandler", "$sce", function (d, c, f) { function e(a) { return "\\\\\\" + a } function g(c) { return c.replace(n, a).replace(p, b) } function h(a, b, c, d) { var e = a.$watch(function (a) { e(); return d(a) }, b, c); return e } function k(e, k, n, p) { function H(a) { try { var b = a; a = n ? f.getTrusted(n, b) : f.valueOf(b); return p && !v(a) ? a : Yb(a) } catch (d) { c(Ea.interr(e, d)) } } if (!e.length || -1 === e.indexOf(a)) { var q; k || (k = g(e), q = ma(k), q.exp = e, q.expressions = [], q.$$watchDelegate = h); return q } p = !!p; var t, s, A = 0, K = [], I = []; q = e.length; for (var B = [], L = []; A < q;) if (-1 !== (t = e.indexOf(a, A)) && -1 !== (s = e.indexOf(b, t + l))) A !== t && B.push(g(e.substring(A, t))), A = e.substring(t + l, s), K.push(A), I.push(d(A, H)), A = s + m, L.push(B.length), B.push(""); else { A !== q && B.push(g(e.substring(A))); break } n && 1 < B.length && Ea.throwNoconcat(e); if (!k || K.length) { var N = function (a) { for (var b = 0, c = K.length; b < c; b++) { if (p && x(a[b])) return; B[L[b]] = a[b] } return B.join("") }; return R(function (a) { var b = 0, d = K.length, f = Array(d); try { for (; b < d; b++) f[b] = I[b](a); return N(f) } catch (g) { c(Ea.interr(e, g)) } }, { exp: e, expressions: K, $$watchDelegate: function (a, b) { var c; return a.$watchGroup(I, function (d, e) { var f = N(d); y(b) && b.call(this, f, d !== e ? c : f, a); c = f }) } }) } } var l = a.length, m = b.length, n = new RegExp(a.replace(/./g, e), "g"), p = new RegExp(b.replace(/./g, e), "g"); k.startSymbol = function () { return a }; k.endSymbol = function () { return b }; return k }] } function xf() { this.$get = ["$rootScope", "$window", "$q", "$$q", "$browser", function (a, b, d, c, f) { function e(e, k, l, m) { function n() { p ? e.apply(null, r) : e(u) } var p = 4 < arguments.length, r = p ? wa.call(arguments, 4) : [], J = b.setInterval, q = b.clearInterval, u = 0, H = v(m) && !m, U = (H ? c : d).defer(), t = U.promise; l = v(l) ? l : 0; t.$$intervalId = J(function () { H ? f.defer(n) : a.$evalAsync(n); U.notify(u++); 0 < l && u >= l && (U.resolve(u), q(t.$$intervalId), delete g[t.$$intervalId]); H || a.$apply() }, k); g[t.$$intervalId] = U; return t } var g = {}; e.cancel = function (a) { return a && a.$$intervalId in g ? (g[a.$$intervalId].promise.catch(w), g[a.$$intervalId].reject("canceled"), b.clearInterval(a.$$intervalId), delete g[a.$$intervalId], !0) : !1 }; return e }] } function lc(a) { a = a.split("/"); for (var b = a.length; b--;) a[b] = db(a[b]); return a.join("/") } function ud(a, b) { var d = Da(a); b.$$protocol = d.protocol; b.$$host = d.hostname; b.$$port = Z(d.port) || sg[d.protocol] || null } function vd(a, b) { if (tg.test(a)) throw lb("badpath", a); var d = "/" !== a.charAt(0); d && (a = "/" + a); var c = Da(a); b.$$path = decodeURIComponent(d && "/" === c.pathname.charAt(0) ? c.pathname.substring(1) : c.pathname); b.$$search = Lc(c.search); b.$$hash = decodeURIComponent(c.hash); b.$$path && "/" !== b.$$path.charAt(0) && (b.$$path = "/" + b.$$path) } function mc(a, b) { return a.slice(0, b.length) === b } function sa(a, b) { if (mc(b, a)) return b.substr(a.length) } function Ba(a) { var b = a.indexOf("#"); return -1 === b ? a : a.substr(0, b) } function mb(a) { return a.replace(/(#.+)|#$/, "$1") } function nc(a, b, d) { this.$$html5 = !0; d = d || ""; ud(a, this); this.$$parse = function (a) { var d = sa(b, a); if (!E(d)) throw lb("ipthprfx", a, b); vd(d, this); this.$$path || (this.$$path = "/"); this.$$compose() }; this.$$compose = function () { var a = Xb(this.$$search), d = this.$$hash ? "#" + db(this.$$hash) : ""; this.$$url = lc(this.$$path) + (a ? "?" + a : "") + d; this.$$absUrl = b + this.$$url.substr(1) }; this.$$parseLinkUrl = function (c, f) { if (f && "#" === f[0]) return this.hash(f.slice(1)), !0; var e, g; v(e = sa(a, c)) ? (g = e, g = d && v(e = sa(d, e)) ? b + (sa("/", e) || e) : a + g) : v(e = sa(b, c)) ? g = b + e : b === c + "/" && (g = b); g && this.$$parse(g); return !!g } } function oc(a, b, d) { ud(a, this); this.$$parse = function (c) { var f = sa(a, c) || sa(b, c), e; x(f) || "#" !== f.charAt(0) ? this.$$html5 ? e = f : (e = "", x(f) && (a = c, this.replace())) : (e = sa(d, f), x(e) && (e = f)); vd(e, this); c = this.$$path; var f = a, g = /^\/[A-Z]:(\/.*)/; mc(e, f) && (e = e.replace(f, "")); g.exec(e) || (c = (e = g.exec(c)) ? e[1] : c); this.$$path = c; this.$$compose() }; this.$$compose = function () { var b = Xb(this.$$search), f = this.$$hash ? "#" + db(this.$$hash) : ""; this.$$url = lc(this.$$path) + (b ? "?" + b : "") + f; this.$$absUrl = a + (this.$$url ? d + this.$$url : "") }; this.$$parseLinkUrl = function (b, d) { return Ba(a) === Ba(b) ? (this.$$parse(b), !0) : !1 } } function wd(a, b, d) { this.$$html5 = !0; oc.apply(this, arguments); this.$$parseLinkUrl = function (c, f) { if (f && "#" === f[0]) return this.hash(f.slice(1)), !0; var e, g; a === Ba(c) ? e = c : (g = sa(b, c)) ? e = a + d + g : b === c + "/" && (e = b); e && this.$$parse(e); return !!e }; this.$$compose = function () { var b = Xb(this.$$search), f = this.$$hash ? "#" + db(this.$$hash) : ""; this.$$url = lc(this.$$path) + (b ? "?" + b : "") + f; this.$$absUrl = a + d + this.$$url } } function Jb(a) { return function () { return this[a] } } function xd(a, b) { return function (d) { if (x(d)) return this[a]; this[a] = b(d); this.$$compose(); return this } } function Ef() { var a = "!", b = { enabled: !1, requireBase: !0, rewriteLinks: !0 }; this.hashPrefix = function (b) { return v(b) ? (a = b, this) : a }; this.html5Mode = function (a) { if (Ia(a)) return b.enabled = a, this; if (F(a)) { Ia(a.enabled) && (b.enabled = a.enabled); Ia(a.requireBase) && (b.requireBase = a.requireBase); if (Ia(a.rewriteLinks) || E(a.rewriteLinks)) b.rewriteLinks = a.rewriteLinks; return this } return b }; this.$get = ["$rootScope", "$browser", "$sniffer", "$rootElement", "$window", function (d, c, f, e, g) { function h(a, b, d) { var e = l.url(), f = l.$$state; try { c.url(a, b, d), l.$$state = c.state() } catch (g) { throw l.url(e), l.$$state = f, g; } } function k(a, b) { d.$broadcast("$locationChangeSuccess", l.absUrl(), a, l.$$state, b) } var l, m; m = c.baseHref(); var n = c.url(), p; if (b.enabled) { if (!m && b.requireBase) throw lb("nobase"); p = n.substring(0, n.indexOf("/", n.indexOf("//") + 2)) + (m || "/"); m = f.history ? nc : wd } else p = Ba(n), m = oc; var r = p.substr(0, Ba(p).lastIndexOf("/") + 1); l = new m(p, r, "#" + a); l.$$parseLinkUrl(n, n); l.$$state = c.state(); var J = /^\s*(javascript|mailto):/i; e.on("click", function (a) { var f = b.rewriteLinks; if (f && !a.ctrlKey && !a.metaKey && !a.shiftKey && 2 !== a.which && 2 !== a.button) { for (var h = D(a.target) ; "a" !== xa(h[0]) ;) if (h[0] === e[0] || !(h = h.parent())[0]) return; if (!E(f) || !x(h.attr(f))) { var f = h.prop("href"), k = h.attr("href") || h.attr("xlink:href"); F(f) && "[object SVGAnimatedString]" === f.toString() && (f = Da(f.animVal).href); J.test(f) || !f || h.attr("target") || a.isDefaultPrevented() || !l.$$parseLinkUrl(f, k) || (a.preventDefault(), l.absUrl() !== c.url() && (d.$apply(), g.angular["ff-684208-preventDefault"] = !0)) } } }); mb(l.absUrl()) !== mb(n) && c.url(l.absUrl(), !0); var q = !0; c.onUrlChange(function (a, b) { mc(a, r) ? (d.$evalAsync(function () { var c = l.absUrl(), e = l.$$state, f; a = mb(a); l.$$parse(a); l.$$state = b; f = d.$broadcast("$locationChangeStart", a, c, b, e).defaultPrevented; l.absUrl() === a && (f ? (l.$$parse(c), l.$$state = e, h(c, !1, e)) : (q = !1, k(c, e))) }), d.$$phase || d.$digest()) : g.location.href = a }); d.$watch(function () { var a = mb(c.url()), b = mb(l.absUrl()), e = c.state(), g = l.$$replace, m = a !== b || l.$$html5 && f.history && e !== l.$$state; if (q || m) q = !1, d.$evalAsync(function () { var b = l.absUrl(), c = d.$broadcast("$locationChangeStart", b, a, l.$$state, e).defaultPrevented; l.absUrl() === b && (c ? (l.$$parse(a), l.$$state = e) : (m && h(b, g, e === l.$$state ? null : l.$$state), k(a, e))) }); l.$$replace = !1 }); return l }] } function Ff() { var a = !0, b = this; this.debugEnabled = function (b) { return v(b) ? (a = b, this) : a }; this.$get = ["$window", function (d) { function c(a) { a instanceof Error && (a.stack ? a = a.message && -1 === a.stack.indexOf(a.message) ? "Error: " + a.message + "\n" + a.stack : a.stack : a.sourceURL && (a = a.message + "\n" + a.sourceURL + ":" + a.line)); return a } function f(a) { var b = d.console || {}, f = b[a] || b.log || w; a = !1; try { a = !!f.apply } catch (k) { } return a ? function () { var a = []; q(arguments, function (b) { a.push(c(b)) }); return f.apply(b, a) } : function (a, b) { f(a, null == b ? "" : b) } } return { log: f("log"), info: f("info"), warn: f("warn"), error: f("error"), debug: function () { var c = f("debug"); return function () { a && c.apply(b, arguments) } }() } }] } function ug(a) { return a + "" } function vg(a, b) { return "undefined" !== typeof a ? a : b } function yd(a, b) { return "undefined" === typeof a ? b : "undefined" === typeof b ? a : a + b } function V(a, b) { var d, c, f; switch (a.type) { case s.Program: d = !0; q(a.body, function (a) { V(a.expression, b); d = d && a.expression.constant }); a.constant = d; break; case s.Literal: a.constant = !0; a.toWatch = []; break; case s.UnaryExpression: V(a.argument, b); a.constant = a.argument.constant; a.toWatch = a.argument.toWatch; break; case s.BinaryExpression: V(a.left, b); V(a.right, b); a.constant = a.left.constant && a.right.constant; a.toWatch = a.left.toWatch.concat(a.right.toWatch); break; case s.LogicalExpression: V(a.left, b); V(a.right, b); a.constant = a.left.constant && a.right.constant; a.toWatch = a.constant ? [] : [a]; break; case s.ConditionalExpression: V(a.test, b); V(a.alternate, b); V(a.consequent, b); a.constant = a.test.constant && a.alternate.constant && a.consequent.constant; a.toWatch = a.constant ? [] : [a]; break; case s.Identifier: a.constant = !1; a.toWatch = [a]; break; case s.MemberExpression: V(a.object, b); a.computed && V(a.property, b); a.constant = a.object.constant && (!a.computed || a.property.constant); a.toWatch = [a]; break; case s.CallExpression: d = f = a.filter ? !b(a.callee.name).$stateful : !1; c = []; q(a.arguments, function (a) { V(a, b); d = d && a.constant; a.constant || c.push.apply(c, a.toWatch) }); a.constant = d; a.toWatch = f ? c : [a]; break; case s.AssignmentExpression: V(a.left, b); V(a.right, b); a.constant = a.left.constant && a.right.constant; a.toWatch = [a]; break; case s.ArrayExpression: d = !0; c = []; q(a.elements, function (a) { V(a, b); d = d && a.constant; a.constant || c.push.apply(c, a.toWatch) }); a.constant = d; a.toWatch = c; break; case s.ObjectExpression: d = !0; c = []; q(a.properties, function (a) { V(a.value, b); d = d && a.value.constant && !a.computed; a.value.constant || c.push.apply(c, a.value.toWatch) }); a.constant = d; a.toWatch = c; break; case s.ThisExpression: a.constant = !1; a.toWatch = []; break; case s.LocalsExpression: a.constant = !1, a.toWatch = [] } } function zd(a) { if (1 === a.length) { a = a[0].expression; var b = a.toWatch; return 1 !== b.length ? b : b[0] !== a ? b : void 0 } } function Ad(a) { return a.type === s.Identifier || a.type === s.MemberExpression } function Bd(a) { if (1 === a.body.length && Ad(a.body[0].expression)) return { type: s.AssignmentExpression, left: a.body[0].expression, right: { type: s.NGValueParameter }, operator: "=" } } function Cd(a) { return 0 === a.body.length || 1 === a.body.length && (a.body[0].expression.type === s.Literal || a.body[0].expression.type === s.ArrayExpression || a.body[0].expression.type === s.ObjectExpression) } function Dd(a, b) { this.astBuilder = a; this.$filter = b } function Ed(a, b) { this.astBuilder = a; this.$filter = b } function pc(a) { return y(a.valueOf) ? a.valueOf() : wg.call(a) } function Gf() { var a = W(), b = { "true": !0, "false": !1, "null": null, undefined: void 0 }, d, c; this.addLiteral = function (a, c) { b[a] = c }; this.setIdentifierFns = function (a, b) { d = a; c = b; return this }; this.$get = ["$filter", function (f) { function e(a, b) { return null == a || null == b ? a === b : "object" === typeof a && (a = pc(a), "object" === typeof a) ? !1 : a === b || a !== a && b !== b } function g(a, b, c, d, f) { var g = d.inputs, h; if (1 === g.length) { var k = e, g = g[0]; return a.$watch(function (a) { var b = g(a); e(b, k) || (h = d(a, void 0, void 0, [b]), k = b && pc(b)); return h }, b, c, f) } for (var l = [], m = [], n = 0, I = g.length; n < I; n++) l[n] = e, m[n] = null; return a.$watch(function (a) { for (var b = !1, c = 0, f = g.length; c < f; c++) { var k = g[c](a); if (b || (b = !e(k, l[c]))) m[c] = k, l[c] = k && pc(k) } b && (h = d(a, void 0, void 0, m)); return h }, b, c, f) } function h(a, b, c, d, e) { function f(a) { return d(a) } function h(a, c, d) { l = a; y(b) && b(a, c, d); v(a) && d.$$postDigest(function () { v(l) && k() }) } var k, l; return k = d.inputs ? g(a, h, c, d, e) : a.$watch(f, h, c) } function k(a, b, c, d) { function e(a) { var b = !0; q(a, function (a) { v(a) || (b = !1) }); return b } var f, g; return f = a.$watch(function (a) { return d(a) }, function (a, c, d) { g = a; y(b) && b(a, c, d); e(a) && d.$$postDigest(function () { e(g) && f() }) }, c) } function l(a, b, c, d) { var e = a.$watch(function (a) { e(); return d(a) }, b, c); return e } function m(a, b) { if (!b) return a; var c = a.$$watchDelegate, d = !1, c = c !== k && c !== h ? function (c, e, f, g) { f = d && g ? g[0] : a(c, e, f, g); return b(f, c, e) } : function (c, d, e, f) { e = a(c, d, e, f); c = b(e, c, d); return v(e) ? c : e }, d = !a.inputs; a.$$watchDelegate && a.$$watchDelegate !== g ? (c.$$watchDelegate = a.$$watchDelegate, c.inputs = a.inputs) : b.$stateful || (c.$$watchDelegate = g, c.inputs = a.inputs ? a.inputs : [a]); return c } var n = { csp: za().noUnsafeEval, literals: Fa(b), isIdentifierStart: y(d) && d, isIdentifierContinue: y(c) && c }; return function (b, c) { var d, e, u; switch (typeof b) { case "string": return u = b = b.trim(), d = a[u], d || (":" === b.charAt(0) && ":" === b.charAt(1) && (e = !0, b = b.substring(2)), d = new qc(n), d = (new rc(d, f, n)).parse(b), d.constant ? d.$$watchDelegate = l : e ? d.$$watchDelegate = d.literal ? k : h : d.inputs && (d.$$watchDelegate = g), a[u] = d), m(d, c); case "function": return m(b, c); default: return m(w, c) } } }] } function If() { var a = !0; this.$get = ["$rootScope", "$exceptionHandler", function (b, d) { return Fd(function (a) { b.$evalAsync(a) }, d, a) }]; this.errorOnUnhandledRejections = function (b) { return v(b) ? (a = b, this) : a } } function Jf() { var a = !0; this.$get = ["$browser", "$exceptionHandler", function (b, d) { return Fd(function (a) { b.defer(a) }, d, a) }]; this.errorOnUnhandledRejections = function (b) { return v(b) ? (a = b, this) : a } } function Fd(a, b, d) { function c() { return new f } function f() { var a = this.promise = new e; this.resolve = function (b) { k(a, b) }; this.reject = function (b) { m(a, b) }; this.notify = function (b) { p(a, b) } } function e() { this.$$state = { status: 0 } } function g() { for (; !v && t.length;) { var a = t.shift(); if (!a.pur) { a.pur = !0; var c = a.value, c = "Possibly unhandled rejection: " + ("function" === typeof c ? c.toString().replace(/ \{[\s\S]*$/, "") : x(c) ? "undefined" : "string" !== typeof c ? we(c) : c); a.value instanceof Error ? b(a.value, c) : b(c) } } } function h(b) { !d || b.pending || 2 !== b.status || b.pur || (0 === v && 0 === t.length && a(g), t.push(b)); !b.processScheduled && b.pending && (b.processScheduled = !0, ++v, a(function () { var c, e, f; f = b.pending; b.processScheduled = !1; b.pending = void 0; try { for (var h = 0, l = f.length; h < l; ++h) { b.pur = !0; e = f[h][0]; c = f[h][b.status]; try { y(c) ? k(e, c(b.value)) : 1 === b.status ? k(e, b.value) : m(e, b.value) } catch (n) { m(e, n) } } } finally { --v, d && 0 === v && a(g) } })) } function k(a, b) { a.$$state.status || (b === a ? n(a, H("qcycle", b)) : l(a, b)) } function l(a, b) { function c(b) { g || (g = !0, l(a, b)) } function d(b) { g || (g = !0, n(a, b)) } function e(b) { p(a, b) } var f, g = !1; try { if (F(b) || y(b)) f = b.then; y(f) ? (a.$$state.status = -1, f.call(b, c, d, e)) : (a.$$state.value = b, a.$$state.status = 1, h(a.$$state)) } catch (k) { d(k) } } function m(a, b) { a.$$state.status || n(a, b) } function n(a, b) { a.$$state.value = b; a.$$state.status = 2; h(a.$$state) } function p(c, d) { var e = c.$$state.pending; 0 >= c.$$state.status && e && e.length && a(function () { for (var a, c, f = 0, g = e.length; f < g; f++) { c = e[f][0]; a = e[f][3]; try { p(c, y(a) ? a(d) : d) } catch (h) { b(h) } } }) } function r(a) { var b = new e; m(b, a); return b } function J(a, b, c) { var d = null; try { y(c) && (d = c()) } catch (e) { return r(e) } return d && y(d.then) ? d.then(function () { return b(a) }, r) : b(a) } function s(a, b, c, d) { var f = new e; k(f, a); return f.then(b, c, d) } function u(a) { if (!y(a)) throw H("norslvr", a); var b = new e; a(function (a) { k(b, a) }, function (a) { m(b, a) }); return b } var H = M("$q", TypeError), v = 0, t = []; R(e.prototype, { then: function (a, b, c) { if (x(a) && x(b) && x(c)) return this; var d = new e; this.$$state.pending = this.$$state.pending || []; this.$$state.pending.push([d, a, b, c]); 0 < this.$$state.status && h(this.$$state); return d }, "catch": function (a) { return this.then(null, a) }, "finally": function (a, b) { return this.then(function (b) { return J(b, w, a) }, function (b) { return J(b, r, a) }, b) } }); var w = s; u.prototype = e.prototype; u.defer = c; u.reject = r; u.when = s; u.resolve = w; u.all = function (a) { var b = new e, c = 0, d = C(a) ? [] : {}; q(a, function (a, e) { c++; s(a).then(function (a) { d[e] = a; --c || k(b, d) }, function (a) { m(b, a) }) }); 0 === c && k(b, d); return b }; u.race = function (a) { var b = c(); q(a, function (a) { s(a).then(b.resolve, b.reject) }); return b.promise }; return u } function Sf() { this.$get = ["$window", "$timeout", function (a, b) { var d = a.requestAnimationFrame || a.webkitRequestAnimationFrame, c = a.cancelAnimationFrame || a.webkitCancelAnimationFrame || a.webkitCancelRequestAnimationFrame, f = !!d, e = f ? function (a) { var b = d(a); return function () { c(b) } } : function (a) { var c = b(a, 16.66, !1); return function () { b.cancel(c) } }; e.supported = f; return e }] } function Hf() { function a(a) { function b() { this.$$watchers = this.$$nextSibling = this.$$childHead = this.$$childTail = null; this.$$listeners = {}; this.$$listenerCount = {}; this.$$watchersCount = 0; this.$id = ++rb; this.$$ChildScope = null } b.prototype = a; return b } var b = 10, d = M("$rootScope"), c = null, f = null; this.digestTtl = function (a) { arguments.length && (b = a); return b }; this.$get = ["$exceptionHandler", "$parse", "$browser", function (e, g, h) { function k(a) { a.currentScope.$$destroyed = !0 } function l(a) { 9 === La && (a.$$childHead && l(a.$$childHead), a.$$nextSibling && l(a.$$nextSibling)); a.$parent = a.$$nextSibling = a.$$prevSibling = a.$$childHead = a.$$childTail = a.$root = a.$$watchers = null } function m() { this.$id = ++rb; this.$$phase = this.$parent = this.$$watchers = this.$$nextSibling = this.$$prevSibling = this.$$childHead = this.$$childTail = null; this.$root = this; this.$$destroyed = !1; this.$$listeners = {}; this.$$listenerCount = {}; this.$$watchersCount = 0; this.$$isolateBindings = null } function n(a) { if (H.$$phase) throw d("inprog", H.$$phase); H.$$phase = a } function p(a, b) { do a.$$watchersCount += b; while (a = a.$parent) } function r(a, b, c) { do a.$$listenerCount[c] -= b, 0 === a.$$listenerCount[c] && delete a.$$listenerCount[c]; while (a = a.$parent) } function J() { } function s() { for (; ia.length;) try { ia.shift()() } catch (a) { e(a) } f = null } function u() { null === f && (f = h.defer(function () { H.$apply(s) })) } m.prototype = { constructor: m, $new: function (b, c) { var d; c = c || this; b ? (d = new m, d.$root = this.$root) : (this.$$ChildScope || (this.$$ChildScope = a(this)), d = new this.$$ChildScope); d.$parent = c; d.$$prevSibling = c.$$childTail; c.$$childHead ? (c.$$childTail.$$nextSibling = d, c.$$childTail = d) : c.$$childHead = c.$$childTail = d; (b || c !== this) && d.$on("$destroy", k); return d }, $watch: function (a, b, d, e) { var f = g(a); if (f.$$watchDelegate) return f.$$watchDelegate(this, b, d, f, a); var h = this, k = h.$$watchers, l = { fn: b, last: J, get: f, exp: e || a, eq: !!d }; c = null; y(b) || (l.fn = w); k || (k = h.$$watchers = [], k.$$digestWatchIndex = -1); k.unshift(l); k.$$digestWatchIndex++; p(this, 1); return function () { var a = $a(k, l); 0 <= a && (p(h, -1), a < k.$$digestWatchIndex && k.$$digestWatchIndex--); c = null } }, $watchGroup: function (a, b) { function c() { h = !1; k ? (k = !1, b(e, e, g)) : b(e, d, g) } var d = Array(a.length), e = Array(a.length), f = [], g = this, h = !1, k = !0; if (!a.length) { var l = !0; g.$evalAsync(function () { l && b(e, e, g) }); return function () { l = !1 } } if (1 === a.length) return this.$watch(a[0], function (a, c, f) { e[0] = a; d[0] = c; b(e, a === c ? e : d, f) }); q(a, function (a, b) { var k = g.$watch(a, function (a, f) { e[b] = a; d[b] = f; h || (h = !0, g.$evalAsync(c)) }); f.push(k) }); return function () { for (; f.length;) f.shift()() } }, $watchCollection: function (a, b) { function c(a) { e = a; var b, d, g, h; if (!x(e)) { if (F(e)) if (ta(e)) for (f !== n && (f = n, u = f.length = 0, l++), a = e.length, u !== a && (l++, f.length = u = a), b = 0; b < a; b++) h = f[b], g = e[b], d = h !== h && g !== g, d || h === g || (l++, f[b] = g); else { f !== p && (f = p = {}, u = 0, l++); a = 0; for (b in e) va.call(e, b) && (a++, g = e[b], h = f[b], b in f ? (d = h !== h && g !== g, d || h === g || (l++, f[b] = g)) : (u++, f[b] = g, l++)); if (u > a) for (b in l++, f) va.call(e, b) || (u--, delete f[b]) } else f !== e && (f = e, l++); return l } } c.$stateful = !0; var d = this, e, f, h, k = 1 < b.length, l = 0, m = g(a, c), n = [], p = {}, r = !0, u = 0; return this.$watch(m, function () { r ? (r = !1, b(e, e, d)) : b(e, h, d); if (k) if (F(e)) if (ta(e)) { h = Array(e.length); for (var a = 0; a < e.length; a++) h[a] = e[a] } else for (a in h = {}, e) va.call(e, a) && (h[a] = e[a]); else h = e }) }, $digest: function () { var a, g, k, l, m, p, r, u = b, q, w = [], x, ia; n("$digest"); h.$$checkUrlChange(); this === H && null !== f && (h.defer.cancel(f), s()); c = null; do { r = !1; q = this; for (p = 0; p < v.length; p++) { try { ia = v[p], ia.scope.$eval(ia.expression, ia.locals) } catch (z) { e(z) } c = null } v.length = 0; a: do { if (p = q.$$watchers) for (p.$$digestWatchIndex = p.length; p.$$digestWatchIndex--;) try { if (a = p[p.$$digestWatchIndex]) if (m = a.get, (g = m(q)) !== (k = a.last) && !(a.eq ? qa(g, k) : ga(g) && ga(k))) r = !0, c = a, a.last = a.eq ? Fa(g, null) : g, l = a.fn, l(g, k === J ? g : k, q), 5 > u && (x = 4 - u, w[x] || (w[x] = []), w[x].push({ msg: y(a.exp) ? "fn: " + (a.exp.name || a.exp.toString()) : a.exp, newVal: g, oldVal: k })); else if (a === c) { r = !1; break a } } catch (D) { e(D) } if (!(p = q.$$watchersCount && q.$$childHead || q !== this && q.$$nextSibling)) for (; q !== this && !(p = q.$$nextSibling) ;) q = q.$parent } while (q = p); if ((r || v.length) && !u--) throw H.$$phase = null, d("infdig", b, w); } while (r || v.length); for (H.$$phase = null; A < t.length;) try { t[A++]() } catch (E) { e(E) } t.length = A = 0 }, $destroy: function () { if (!this.$$destroyed) { var a = this.$parent; this.$broadcast("$destroy"); this.$$destroyed = !0; this === H && h.$$applicationDestroyed(); p(this, -this.$$watchersCount); for (var b in this.$$listenerCount) r(this, this.$$listenerCount[b], b); a && a.$$childHead === this && (a.$$childHead = this.$$nextSibling); a && a.$$childTail === this && (a.$$childTail = this.$$prevSibling); this.$$prevSibling && (this.$$prevSibling.$$nextSibling = this.$$nextSibling); this.$$nextSibling && (this.$$nextSibling.$$prevSibling = this.$$prevSibling); this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = w; this.$on = this.$watch = this.$watchGroup = function () { return w }; this.$$listeners = {}; this.$$nextSibling = null; l(this) } }, $eval: function (a, b) { return g(a)(this, b) }, $evalAsync: function (a, b) { H.$$phase || v.length || h.defer(function () { v.length && H.$digest() }); v.push({ scope: this, expression: g(a), locals: b }) }, $$postDigest: function (a) { t.push(a) }, $apply: function (a) { try { n("$apply"); try { return this.$eval(a) } finally { H.$$phase = null } } catch (b) { e(b) } finally { try { H.$digest() } catch (c) { throw e(c), c; } } }, $applyAsync: function (a) { function b() { c.$eval(a) } var c = this; a && ia.push(b); a = g(a); u() }, $on: function (a, b) { var c = this.$$listeners[a]; c || (this.$$listeners[a] = c = []); c.push(b); var d = this; do d.$$listenerCount[a] || (d.$$listenerCount[a] = 0), d.$$listenerCount[a]++; while (d = d.$parent); var e = this; return function () { var d = c.indexOf(b); -1 !== d && (c[d] = null, r(e, 1, a)) } }, $emit: function (a, b) { var c = [], d, f = this, g = !1, h = { name: a, targetScope: f, stopPropagation: function () { g = !0 }, preventDefault: function () { h.defaultPrevented = !0 }, defaultPrevented: !1 }, k = ab([h], arguments, 1), l, m; do { d = f.$$listeners[a] || c; h.currentScope = f; l = 0; for (m = d.length; l < m; l++) if (d[l]) try { d[l].apply(null, k) } catch (n) { e(n) } else d.splice(l, 1), l--, m--; if (g) return h.currentScope = null, h; f = f.$parent } while (f); h.currentScope = null; return h }, $broadcast: function (a, b) { var c = this, d = this, f = { name: a, targetScope: this, preventDefault: function () { f.defaultPrevented = !0 }, defaultPrevented: !1 }; if (!this.$$listenerCount[a]) return f; for (var g = ab([f], arguments, 1), h, k; c = d;) { f.currentScope = c; d = c.$$listeners[a] || []; h = 0; for (k = d.length; h < k; h++) if (d[h]) try { d[h].apply(null, g) } catch (l) { e(l) } else d.splice(h, 1), h--, k--; if (!(d = c.$$listenerCount[a] && c.$$childHead || c !== this && c.$$nextSibling)) for (; c !== this && !(d = c.$$nextSibling) ;) c = c.$parent } f.currentScope = null; return f } }; var H = new m, v = H.$$asyncQueue = [], t = H.$$postDigestQueue = [], ia = H.$$applyAsyncQueue = [], A = 0; return H }] } function ze() { var a = /^\s*(https?|ftp|mailto|tel|file):/, b = /^\s*((https?|ftp|file|blob):|data:image\/)/; this.aHrefSanitizationWhitelist = function (b) { return v(b) ? (a = b, this) : a }; this.imgSrcSanitizationWhitelist = function (a) { return v(a) ? (b = a, this) : b }; this.$get = function () { return function (d, c) { var f = c ? b : a, e; e = Da(d).href; return "" === e || e.match(f) ? d : "unsafe:" + e } } } function xg(a) { if ("self" === a) return a; if (E(a)) { if (-1 < a.indexOf("***")) throw ua("iwcard", a); a = Gd(a).replace(/\\\*\\\*/g, ".*").replace(/\\\*/g, "[^:/.?&;]*"); return new RegExp("^" + a + "$") } if (Xa(a)) return new RegExp("^" + a.source + "$"); throw ua("imatcher"); } function Hd(a) { var b = []; v(a) && q(a, function (a) { b.push(xg(a)) }); return b } function Lf() { this.SCE_CONTEXTS = pa; var a = ["self"], b = []; this.resourceUrlWhitelist = function (b) { arguments.length && (a = Hd(b)); return a }; this.resourceUrlBlacklist = function (a) { arguments.length && (b = Hd(a)); return b }; this.$get = ["$injector", function (d) { function c(a, b) { return "self" === a ? sd(b) : !!a.exec(b.href) } function f(a) { var b = function (a) { this.$$unwrapTrustedValue = function () { return a } }; a && (b.prototype = new a); b.prototype.valueOf = function () { return this.$$unwrapTrustedValue() }; b.prototype.toString = function () { return this.$$unwrapTrustedValue().toString() }; return b } var e = function (a) { throw ua("unsafe"); }; d.has("$sanitize") && (e = d.get("$sanitize")); var g = f(), h = {}; h[pa.HTML] = f(g); h[pa.CSS] = f(g); h[pa.URL] = f(g); h[pa.JS] = f(g); h[pa.RESOURCE_URL] = f(h[pa.URL]); return { trustAs: function (a, b) { var c = h.hasOwnProperty(a) ? h[a] : null; if (!c) throw ua("icontext", a, b); if (null === b || x(b) || "" === b) return b; if ("string" !== typeof b) throw ua("itype", a); return new c(b) }, getTrusted: function (d, f) { if (null === f || x(f) || "" === f) return f; var g = h.hasOwnProperty(d) ? h[d] : null; if (g && f instanceof g) return f.$$unwrapTrustedValue(); if (d === pa.RESOURCE_URL) { var g = Da(f.toString()), n, p, r = !1; n = 0; for (p = a.length; n < p; n++) if (c(a[n], g)) { r = !0; break } if (r) for (n = 0, p = b.length; n < p; n++) if (c(b[n], g)) { r = !1; break } if (r) return f; throw ua("insecurl", f.toString()); } if (d === pa.HTML) return e(f); throw ua("unsafe"); }, valueOf: function (a) { return a instanceof g ? a.$$unwrapTrustedValue() : a } } }] } function Kf() { var a = !0; this.enabled = function (b) { arguments.length && (a = !!b); return a }; this.$get = ["$parse", "$sceDelegate", function (b, d) { if (a && 8 > La) throw ua("iequirks"); var c = ra(pa); c.isEnabled = function () { return a }; c.trustAs = d.trustAs; c.getTrusted = d.getTrusted; c.valueOf = d.valueOf; a || (c.trustAs = c.getTrusted = function (a, b) { return b }, c.valueOf = Ya); c.parseAs = function (a, d) { var e = b(d); return e.literal && e.constant ? e : b(d, function (b) { return c.getTrusted(a, b) }) }; var f = c.parseAs, e = c.getTrusted, g = c.trustAs; q(pa, function (a, b) { var d = P(b); c[("parse_as_" + d).replace(sc, gb)] = function (b) { return f(a, b) }; c[("get_trusted_" + d).replace(sc, gb)] = function (b) { return e(a, b) }; c[("trust_as_" + d).replace(sc, gb)] = function (b) { return g(a, b) } }); return c }] } function Mf() { this.$get = ["$window", "$document", function (a, b) { var d = {}, c = !(a.chrome && (a.chrome.app && a.chrome.app.runtime || !a.chrome.app && a.chrome.runtime && a.chrome.runtime.id)) && a.history && a.history.pushState, f = Z((/android (\d+)/.exec(P((a.navigator || {}).userAgent)) || [])[1]), e = /Boxee/i.test((a.navigator || {}).userAgent), g = b[0] || {}, h = g.body && g.body.style, k = !1, l = !1; h && (k = !!("transition" in h || "webkitTransition" in h), l = !!("animation" in h || "webkitAnimation" in h)); return { history: !(!c || 4 > f || e), hasEvent: function (a) { if ("input" === a && La) return !1; if (x(d[a])) { var b = g.createElement("div"); d[a] = "on" + a in b } return d[a] }, csp: za(), transitions: k, animations: l, android: f } }] } function Of() { var a; this.httpOptions = function (b) { return b ? (a = b, this) : a }; this.$get = ["$exceptionHandler", "$templateCache", "$http", "$q", "$sce", function (b, d, c, f, e) { function g(h, k) { g.totalPendingRequests++; if (!E(h) || x(d.get(h))) h = e.getTrustedResourceUrl(h); var l = c.defaults && c.defaults.transformResponse; C(l) ? l = l.filter(function (a) { return a !== jc }) : l === jc && (l = null); return c.get(h, R({ cache: d, transformResponse: l }, a)).finally(function () { g.totalPendingRequests-- }).then(function (a) { d.put(h, a.data); return a.data }, function (a) { k || (a = yg("tpload", h, a.status, a.statusText), b(a)); return f.reject(a) }) } g.totalPendingRequests = 0; return g }] } function Pf() { this.$get = ["$rootScope", "$browser", "$location", function (a, b, d) { return { findBindings: function (a, b, d) { a = a.getElementsByClassName("ng-binding"); var g = []; q(a, function (a) { var c = $.element(a).data("$binding"); c && q(c, function (c) { d ? (new RegExp("(^|\\s)" + Gd(b) + "(\\s|\\||$)")).test(c) && g.push(a) : -1 !== c.indexOf(b) && g.push(a) }) }); return g }, findModels: function (a, b, d) { for (var g = ["ng-", "data-ng-", "ng\\:"], h = 0; h < g.length; ++h) { var k = a.querySelectorAll("[" + g[h] + "model" + (d ? "=" : "*=") + '"' + b + '"]'); if (k.length) return k } }, getLocation: function () { return d.url() }, setLocation: function (b) { b !== d.url() && (d.url(b), a.$digest()) }, whenStable: function (a) { b.notifyWhenNoOutstandingRequests(a) } } }] } function Qf() { this.$get = ["$rootScope", "$browser", "$q", "$$q", "$exceptionHandler", function (a, b, d, c, f) { function e(e, k, l) { y(e) || (l = k, k = e, e = w); var m = wa.call(arguments, 3), n = v(l) && !l, p = (n ? c : d).defer(), r = p.promise, q; q = b.defer(function () { try { p.resolve(e.apply(null, m)) } catch (b) { p.reject(b), f(b) } finally { delete g[r.$$timeoutId] } n || a.$apply() }, k); r.$$timeoutId = q; g[q] = p; return r } var g = {}; e.cancel = function (a) { return a && a.$$timeoutId in g ? (g[a.$$timeoutId].promise.catch(w), g[a.$$timeoutId].reject("canceled"), delete g[a.$$timeoutId], b.defer.cancel(a.$$timeoutId)) : !1 }; return e }] } function Da(a) { La && (ca.setAttribute("href", a), a = ca.href); ca.setAttribute("href", a); return { href: ca.href, protocol: ca.protocol ? ca.protocol.replace(/:$/, "") : "", host: ca.host, search: ca.search ? ca.search.replace(/^\?/, "") : "", hash: ca.hash ? ca.hash.replace(/^#/, "") : "", hostname: ca.hostname, port: ca.port, pathname: "/" === ca.pathname.charAt(0) ? ca.pathname : "/" + ca.pathname } } function sd(a) { a = E(a) ? Da(a) : a; return a.protocol === Id.protocol && a.host === Id.host } function Rf() { this.$get = ma(z) } function Jd(a) { function b(a) { try { return decodeURIComponent(a) } catch (b) { return a } } var d = a[0] || {}, c = {}, f = ""; return function () { var a, g, h, k, l; try { a = d.cookie || "" } catch (m) { a = "" } if (a !== f) for (f = a, a = f.split("; "), c = {}, h = 0; h < a.length; h++) g = a[h], k = g.indexOf("="), 0 < k && (l = b(g.substring(0, k)), x(c[l]) && (c[l] = b(g.substring(k + 1)))); return c } } function Vf() { this.$get = Jd } function Xc(a) { function b(d, c) { if (F(d)) { var f = {}; q(d, function (a, c) { f[c] = b(c, a) }); return f } return a.factory(d + "Filter", c) } this.register = b; this.$get = ["$injector", function (a) { return function (b) { return a.get(b + "Filter") } }]; b("currency", Kd); b("date", Ld); b("filter", zg); b("json", Ag); b("limitTo", Bg); b("lowercase", Cg); b("number", Md); b("orderBy", Nd); b("uppercase", Dg) } function zg() { return function (a, b, d, c) { if (!ta(a)) { if (null == a) return a; throw M("filter")("notarray", a); } c = c || "$"; var f; switch (tc(b)) { case "function": break; case "boolean": case "null": case "number": case "string": f = !0; case "object": b = Eg(b, d, c, f); break; default: return a } return Array.prototype.filter.call(a, b) } } function Eg(a, b, d, c) { var f = F(a) && d in a; !0 === b ? b = qa : y(b) || (b = function (a, b) { if (x(a)) return !1; if (null === a || null === b) return a === b; if (F(b) || F(a) && !Vb(a)) return !1; a = P("" + a); b = P("" + b); return -1 !== a.indexOf(b) }); return function (e) { return f && !F(e) ? Ha(e, a[d], b, d, !1) : Ha(e, a, b, d, c) } } function Ha(a, b, d, c, f, e) { var g = tc(a), h = tc(b); if ("string" === h && "!" === b.charAt(0)) return !Ha(a, b.substring(1), d, c, f); if (C(a)) return a.some(function (a) { return Ha(a, b, d, c, f) }); switch (g) { case "object": var k; if (f) { for (k in a) if ("$" !== k.charAt(0) && Ha(a[k], b, d, c, !0)) return !0; return e ? !1 : Ha(a, b, d, c, !1) } if ("object" === h) { for (k in b) if (e = b[k], !y(e) && !x(e) && (g = k === c, !Ha(g ? a : a[k], e, d, c, g, g))) return !1; return !0 } return d(a, b); case "function": return !1; default: return d(a, b) } } function tc(a) { return null === a ? "null" : typeof a } function Kd(a) { var b = a.NUMBER_FORMATS; return function (a, c, f) { x(c) && (c = b.CURRENCY_SYM); x(f) && (f = b.PATTERNS[1].maxFrac); return null == a ? a : Od(a, b.PATTERNS[1], b.GROUP_SEP, b.DECIMAL_SEP, f).replace(/\u00A4/g, c) } } function Md(a) { var b = a.NUMBER_FORMATS; return function (a, c) { return null == a ? a : Od(a, b.PATTERNS[0], b.GROUP_SEP, b.DECIMAL_SEP, c) } } function Fg(a) { var b = 0, d, c, f, e, g; -1 < (c = a.indexOf(Pd)) && (a = a.replace(Pd, "")); 0 < (f = a.search(/e/i)) ? (0 > c && (c = f), c += +a.slice(f + 1), a = a.substring(0, f)) : 0 > c && (c = a.length); for (f = 0; a.charAt(f) === uc; f++); if (f === (g = a.length)) d = [0], c = 1; else { for (g--; a.charAt(g) === uc;) g--; c -= f; d = []; for (e = 0; f <= g; f++, e++) d[e] = +a.charAt(f) } c > Qd && (d = d.splice(0, Qd - 1), b = c - 1, c = 1); return { d: d, e: b, i: c } } function Gg(a, b, d, c) { var f = a.d, e = f.length - a.i; b = x(b) ? Math.min(Math.max(d, e), c) : +b; d = b + a.i; c = f[d]; if (0 < d) { f.splice(Math.max(a.i, d)); for (var g = d; g < f.length; g++) f[g] = 0 } else for (e = Math.max(0, e), a.i = 1, f.length = Math.max(1, d = b + 1), f[0] = 0, g = 1; g < d; g++) f[g] = 0; if (5 <= c) if (0 > d - 1) { for (c = 0; c > d; c--) f.unshift(0), a.i++; f.unshift(1); a.i++ } else f[d - 1]++; for (; e < Math.max(0, b) ; e++) f.push(0); if (b = f.reduceRight(function (a, b, c, d) { b += a; d[c] = b % 10; return Math.floor(b / 10) }, 0)) f.unshift(b), a.i++ } function Od(a, b, d, c, f) { if (!E(a) && !Y(a) || isNaN(a)) return ""; var e = !isFinite(a), g = !1, h = Math.abs(a) + "", k = ""; if (e) k = "\u221e"; else { g = Fg(h); Gg(g, f, b.minFrac, b.maxFrac); k = g.d; h = g.i; f = g.e; e = []; for (g = k.reduce(function (a, b) { return a && !b }, !0) ; 0 > h;) k.unshift(0), h++; 0 < h ? e = k.splice(h, k.length) : (e = k, k = [0]); h = []; for (k.length >= b.lgSize && h.unshift(k.splice(-b.lgSize, k.length).join("")) ; k.length > b.gSize;) h.unshift(k.splice(-b.gSize, k.length).join("")); k.length && h.unshift(k.join("")); k = h.join(d); e.length && (k += c + e.join("")); f && (k += "e+" + f) } return 0 > a && !g ? b.negPre + k + b.negSuf : b.posPre + k + b.posSuf } function Kb(a, b, d, c) { var f = ""; if (0 > a || c && 0 >= a) c ? a = -a + 1 : (a = -a, f = "-"); for (a = "" + a; a.length < b;) a = uc + a; d && (a = a.substr(a.length - b)); return f + a } function aa(a, b, d, c, f) { d = d || 0; return function (e) { e = e["get" + a](); if (0 < d || e > -d) e += d; 0 === e && -12 === d && (e = 12); return Kb(e, b, c, f) } } function nb(a, b, d) { return function (c, f) { var e = c["get" + a](), g = vb((d ? "STANDALONE" : "") + (b ? "SHORT" : "") + a); return f[g][e] } } function Rd(a) { var b = (new Date(a, 0, 1)).getDay(); return new Date(a, 0, (4 >= b ? 5 : 12) - b) } function Sd(a) { return function (b) { var d = Rd(b.getFullYear()); b = +new Date(b.getFullYear(), b.getMonth(), b.getDate() + (4 - b.getDay())) - +d; b = 1 + Math.round(b / 6048E5); return Kb(b, a) } } function vc(a, b) { return 0 >= a.getFullYear() ? b.ERAS[0] : b.ERAS[1] } function Ld(a) { function b(a) { var b; if (b = a.match(d)) { a = new Date(0); var e = 0, g = 0, h = b[8] ? a.setUTCFullYear : a.setFullYear, k = b[8] ? a.setUTCHours : a.setHours; b[9] && (e = Z(b[9] + b[10]), g = Z(b[9] + b[11])); h.call(a, Z(b[1]), Z(b[2]) - 1, Z(b[3])); e = Z(b[4] || 0) - e; g = Z(b[5] || 0) - g; h = Z(b[6] || 0); b = Math.round(1E3 * parseFloat("0." + (b[7] || 0))); k.call(a, e, g, h, b) } return a } var d = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/; return function (c, d, e) { var g = "", h = [], k, l; d = d || "mediumDate"; d = a.DATETIME_FORMATS[d] || d; E(c) && (c = Hg.test(c) ? Z(c) : b(c)); Y(c) && (c = new Date(c)); if (!fa(c) || !isFinite(c.getTime())) return c; for (; d;) (l = Ig.exec(d)) ? (h = ab(h, l, 1), d = h.pop()) : (h.push(d), d = null); var m = c.getTimezoneOffset(); e && (m = Jc(e, m), c = Wb(c, e, !0)); q(h, function (b) { k = Jg[b]; g += k ? k(c, a.DATETIME_FORMATS, m) : "''" === b ? "'" : b.replace(/(^'|'$)/g, "").replace(/''/g, "'") }); return g } } function Ag() { return function (a, b) { x(b) && (b = 2); return cb(a, b) } } function Bg() { return function (a, b, d) { b = Infinity === Math.abs(Number(b)) ? Number(b) : Z(b); if (ga(b)) return a; Y(a) && (a = a.toString()); if (!ta(a)) return a; d = !d || isNaN(d) ? 0 : Z(d); d = 0 > d ? Math.max(0, a.length + d) : d; return 0 <= b ? wc(a, d, d + b) : 0 === d ? wc(a, b, a.length) : wc(a, Math.max(0, d + b), d) } } function wc(a, b, d) { return E(a) ? a.slice(b, d) : wa.call(a, b, d) } function Nd(a) { function b(b) { return b.map(function (b) { var c = 1, d = Ya; if (y(b)) d = b; else if (E(b)) { if ("+" === b.charAt(0) || "-" === b.charAt(0)) c = "-" === b.charAt(0) ? -1 : 1, b = b.substring(1); if ("" !== b && (d = a(b), d.constant)) var f = d(), d = function (a) { return a[f] } } return { get: d, descending: c } }) } function d(a) { switch (typeof a) { case "number": case "boolean": case "string": return !0; default: return !1 } } function c(a, b) { var c = 0, d = a.type, k = b.type; if (d === k) { var k = a.value, l = b.value; "string" === d ? (k = k.toLowerCase(), l = l.toLowerCase()) : "object" === d && (F(k) && (k = a.index), F(l) && (l = b.index)); k !== l && (c = k < l ? -1 : 1) } else c = d < k ? -1 : 1; return c } return function (a, e, g, h) { if (null == a) return a; if (!ta(a)) throw M("orderBy")("notarray", a); C(e) || (e = [e]); 0 === e.length && (e = ["+"]); var k = b(e), l = g ? -1 : 1, m = y(h) ? h : c; a = Array.prototype.map.call(a, function (a, b) { return { value: a, tieBreaker: { value: b, type: "number", index: b }, predicateValues: k.map(function (c) { var e = c.get(a); c = typeof e; if (null === e) c = "string", e = "null"; else if ("object" === c) a: { if (y(e.valueOf) && (e = e.valueOf(), d(e))) break a; Vb(e) && (e = e.toString(), d(e)) } return { value: e, type: c, index: b } }) } }); a.sort(function (a, b) { for (var c = 0, d = k.length; c < d; c++) { var e = m(a.predicateValues[c], b.predicateValues[c]); if (e) return e * k[c].descending * l } return m(a.tieBreaker, b.tieBreaker) * l }); return a = a.map(function (a) { return a.value }) } } function Ra(a) { y(a) && (a = { link: a }); a.restrict = a.restrict || "AC"; return ma(a) } function Lb(a, b, d, c, f) { this.$$controls = []; this.$error = {}; this.$$success = {}; this.$pending = void 0; this.$name = f(b.name || b.ngForm || "")(d); this.$dirty = !1; this.$valid = this.$pristine = !0; this.$submitted = this.$invalid = !1; this.$$parentForm = Mb; this.$$element = a; this.$$animate = c; Td(this) } function Td(a) { a.$$classCache = {}; a.$$classCache[Ud] = !(a.$$classCache[ob] = a.$$element.hasClass(ob)) } function Vd(a) { function b(a, b, c) { c && !a.$$classCache[b] ? (a.$$animate.addClass(a.$$element, b), a.$$classCache[b] = !0) : !c && a.$$classCache[b] && (a.$$animate.removeClass(a.$$element, b), a.$$classCache[b] = !1) } function d(a, c, d) { c = c ? "-" + Nc(c, "-") : ""; b(a, ob + c, !0 === d); b(a, Ud + c, !1 === d) } var c = a.set, f = a.unset; a.clazz.prototype.$setValidity = function (a, g, h) { x(g) ? (this.$pending || (this.$pending = {}), c(this.$pending, a, h)) : (this.$pending && f(this.$pending, a, h), Wd(this.$pending) && (this.$pending = void 0)); Ia(g) ? g ? (f(this.$error, a, h), c(this.$$success, a, h)) : (c(this.$error, a, h), f(this.$$success, a, h)) : (f(this.$error, a, h), f(this.$$success, a, h)); this.$pending ? (b(this, "ng-pending", !0), this.$valid = this.$invalid = void 0, d(this, "", null)) : (b(this, "ng-pending", !1), this.$valid = Wd(this.$error), this.$invalid = !this.$valid, d(this, "", this.$valid)); g = this.$pending && this.$pending[a] ? void 0 : this.$error[a] ? !1 : this.$$success[a] ? !0 : null; d(this, a, g); this.$$parentForm.$setValidity(a, g, this) } } function Wd(a) { if (a) for (var b in a) if (a.hasOwnProperty(b)) return !1; return !0 } function xc(a) { a.$formatters.push(function (b) { return a.$isEmpty(b) ? b : b.toString() }) } function Sa(a, b, d, c, f, e) { var g = P(b[0].type); if (!f.android) { var h = !1; b.on("compositionstart", function () { h = !0 }); b.on("compositionend", function () { h = !1; l() }) } var k, l = function (a) { k && (e.defer.cancel(k), k = null); if (!h) { var f = b.val(); a = a && a.type; "password" === g || d.ngTrim && "false" === d.ngTrim || (f = S(f)); (c.$viewValue !== f || "" === f && c.$$hasNativeValidators) && c.$setViewValue(f, a) } }; if (f.hasEvent("input")) b.on("input", l); else { var m = function (a, b, c) { k || (k = e.defer(function () { k = null; b && b.value === c || l(a) })) }; b.on("keydown", function (a) { var b = a.keyCode; 91 === b || 15 < b && 19 > b || 37 <= b && 40 >= b || m(a, this, this.value) }); if (f.hasEvent("paste")) b.on("paste cut", m) } b.on("change", l); if (Xd[g] && c.$$hasNativeValidators && g === d.type) b.on("keydown wheel mousedown", function (a) { if (!k) { var b = this.validity, c = b.badInput, d = b.typeMismatch; k = e.defer(function () { k = null; b.badInput === c && b.typeMismatch === d || l(a) }) } }); c.$render = function () { var a = c.$isEmpty(c.$viewValue) ? "" : c.$viewValue; b.val() !== a && b.val(a) } } function Nb(a, b) { return function (d, c) { var f, e; if (fa(d)) return d; if (E(d)) { '"' === d.charAt(0) && '"' === d.charAt(d.length - 1) && (d = d.substring(1, d.length - 1)); if (Kg.test(d)) return new Date(d); a.lastIndex = 0; if (f = a.exec(d)) return f.shift(), e = c ? { yyyy: c.getFullYear(), MM: c.getMonth() + 1, dd: c.getDate(), HH: c.getHours(), mm: c.getMinutes(), ss: c.getSeconds(), sss: c.getMilliseconds() / 1E3 } : { yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0 }, q(f, function (a, c) { c < b.length && (e[b[c]] = +a) }), new Date(e.yyyy, e.MM - 1, e.dd, e.HH, e.mm, e.ss || 0, 1E3 * e.sss || 0) } return NaN } } function pb(a, b, d, c) { return function (f, e, g, h, k, l, m) { function n(a) { return a && !(a.getTime && a.getTime() !== a.getTime()) } function p(a) { return v(a) && !fa(a) ? d(a) || void 0 : a } yc(f, e, g, h); Sa(f, e, g, h, k, l); var r = h && h.$options.getOption("timezone"), q; h.$$parserName = a; h.$parsers.push(function (a) { if (h.$isEmpty(a)) return null; if (b.test(a)) return a = d(a, q), r && (a = Wb(a, r)), a }); h.$formatters.push(function (a) { if (a && !fa(a)) throw qb("datefmt", a); if (n(a)) return (q = a) && r && (q = Wb(q, r, !0)), m("date")(a, c, r); q = null; return "" }); if (v(g.min) || g.ngMin) { var s; h.$validators.min = function (a) { return !n(a) || x(s) || d(a) >= s }; g.$observe("min", function (a) { s = p(a); h.$validate() }) } if (v(g.max) || g.ngMax) { var u; h.$validators.max = function (a) { return !n(a) || x(u) || d(a) <= u }; g.$observe("max", function (a) { u = p(a); h.$validate() }) } } } function yc(a, b, d, c) { (c.$$hasNativeValidators = F(b[0].validity)) && c.$parsers.push(function (a) { var c = b.prop("validity") || {}; return c.badInput || c.typeMismatch ? void 0 : a }) } function Yd(a) { a.$$parserName = "number"; a.$parsers.push(function (b) { if (a.$isEmpty(b)) return null; if (Lg.test(b)) return parseFloat(b) }); a.$formatters.push(function (b) { if (!a.$isEmpty(b)) { if (!Y(b)) throw qb("numfmt", b); b = b.toString() } return b }) } function Ta(a) { v(a) && !Y(a) && (a = parseFloat(a)); return ga(a) ? void 0 : a } function zc(a) { var b = a.toString(), d = b.indexOf("."); return -1 === d ? -1 < a && 1 > a && (a = /e-(\d+)$/.exec(b)) ? Number(a[1]) : 0 : b.length - d - 1 } function Zd(a, b, d) { a = Number(a); if ((a | 0) !== a || (b | 0) !== b || (d | 0) !== d) { var c = Math.max(zc(a), zc(b), zc(d)), c = Math.pow(10, c); a *= c; b *= c; d *= c } return 0 === (a - b) % d } function $d(a, b, d, c, f) { if (v(c)) { a = a(c); if (!a.constant) throw qb("constexpr", d, c); return a(b) } return f } function Ac(a, b) { function d(a, b) { if (!a || !a.length) return []; if (!b || !b.length) return a; var c = [], d = 0; a: for (; d < a.length; d++) { for (var e = a[d], f = 0; f < b.length; f++) if (e === b[f]) continue a; c.push(e) } return c } function c(a) { var b = a; C(a) ? b = a.map(c).join(" ") : F(a) && (b = Object.keys(a).filter(function (b) { return a[b] }).join(" ")); return b } function f(a) { var b = a; if (C(a)) b = a.map(f); else if (F(a)) { var c = !1, b = Object.keys(a).filter(function (b) { b = a[b]; !c && x(b) && (c = !0); return b }); c && b.push(void 0) } return b } a = "ngClass" + a; var e; return ["$parse", function (g) { return { restrict: "AC", link: function (h, k, l) { function m(a, b) { var c = []; q(a, function (a) { if (0 < b || H[a]) H[a] = (H[a] || 0) + b, H[a] === +(0 < b) && c.push(a) }); return c.join(" ") } function n(a) { if (a === b) { var c = t, c = m(c && c.split(" "), 1); l.$addClass(c) } else c = t, c = m(c && c.split(" "), -1), l.$removeClass(c); w = a } function p(a) { a = c(a); a !== t && r(a) } function r(a) { if (w === b) { var c = t && t.split(" "), e = a && a.split(" "), f = d(c, e), c = d(e, c), f = m(f, -1), c = m(c, 1); l.$addClass(c); l.$removeClass(f) } t = a } var s = l[a].trim(), v = ":" === s.charAt(0) && ":" === s.charAt(1), s = g(s, v ? f : c), u = v ? p : r, H = k.data("$classCounts"), w = !0, t; H || (H = W(), k.data("$classCounts", H)); "ngClass" !== a && (e || (e = g("$index", function (a) { return a & 1 })), h.$watch(e, n)); h.$watch(s, u, v) } } }] } function Ob(a, b, d, c, f, e, g, h, k) { this.$modelValue = this.$viewValue = Number.NaN; this.$$rawModelValue = void 0; this.$validators = {}; this.$asyncValidators = {}; this.$parsers = []; this.$formatters = []; this.$viewChangeListeners = []; this.$untouched = !0; this.$touched = !1; this.$pristine = !0; this.$dirty = !1; this.$valid = !0; this.$invalid = !1; this.$error = {}; this.$$success = {}; this.$pending = void 0; this.$name = k(d.name || "", !1)(a); this.$$parentForm = Mb; this.$options = Pb; this.$$parsedNgModel = f(d.ngModel); this.$$parsedNgModelAssign = this.$$parsedNgModel.assign; this.$$ngModelGet = this.$$parsedNgModel; this.$$ngModelSet = this.$$parsedNgModelAssign; this.$$pendingDebounce = null; this.$$parserValid = void 0; this.$$currentValidationRunId = 0; this.$$scope = a; this.$$attr = d; this.$$element = c; this.$$animate = e; this.$$timeout = g; this.$$parse = f; this.$$q = h; this.$$exceptionHandler = b; Td(this); Mg(this) } function Mg(a) { a.$$scope.$watch(function () { var b = a.$$ngModelGet(a.$$scope); if (b !== a.$modelValue && (a.$modelValue === a.$modelValue || b === b)) { a.$modelValue = a.$$rawModelValue = b; a.$$parserValid = void 0; for (var d = a.$formatters, c = d.length, f = b; c--;) f = d[c](f); a.$viewValue !== f && (a.$$updateEmptyClasses(f), a.$viewValue = a.$$lastCommittedViewValue = f, a.$render(), a.$$runValidators(a.$modelValue, a.$viewValue, w)) } return b }) } function Bc(a) { this.$$options = a } function ae(a, b) { q(b, function (b, c) { v(a[c]) || (a[c] = b) }) } var Ng = /^\/(.+)\/([a-z]*)$/, va = Object.prototype.hasOwnProperty, P = function (a) { return E(a) ? a.toLowerCase() : a }, vb = function (a) { return E(a) ? a.toUpperCase() : a }, La, D, oa, wa = [].slice, ng = [].splice, Og = [].push, na = Object.prototype.toString, Gc = Object.getPrototypeOf, Ga = M("ng"), $ = z.angular || (z.angular = {}), Zb, rb = 0; La = z.document.documentMode; var ga = Number.isNaN || function (a) { return a !== a }; w.$inject = []; Ya.$inject = []; var C = Array.isArray, le = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/, S = function (a) { return E(a) ? a.trim() : a }, Gd = function (a) { return a.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08") }, za = function () { if (!v(za.rules)) { var a = z.document.querySelector("[ng-csp]") || z.document.querySelector("[data-ng-csp]"); if (a) { var b = a.getAttribute("ng-csp") || a.getAttribute("data-ng-csp"); za.rules = { noUnsafeEval: !b || -1 !== b.indexOf("no-unsafe-eval"), noInlineStyle: !b || -1 !== b.indexOf("no-inline-style") } } else { a = za; try { new Function(""), b = !1 } catch (d) { b = !0 } a.rules = { noUnsafeEval: b, noInlineStyle: !1 } } } return za.rules }, sb = function () { if (v(sb.name_)) return sb.name_; var a, b, d = Ka.length, c, f; for (b = 0; b < d; ++b) if (c = Ka[b], a = z.document.querySelector("[" + c.replace(":", "\\:") + "jq]")) { f = a.getAttribute(c + "jq"); break } return sb.name_ = f }, ne = /:/g, Ka = ["ng-", "data-ng-", "ng:", "x-ng-"], qe = function (a) { if (!a.currentScript) return !0; var b = a.currentScript.getAttribute("src"), d = a.createElement("a"); d.href = b; if (a.location.origin === d.origin) return !0; switch (d.protocol) { case "http:": case "https:": case "ftp:": case "blob:": case "file:": case "data:": return !0; default: return !1 } }(z.document), te = /[A-Z]/g, Oc = !1, Ja = 3, ye = { full: "1.6.1", major: 1, minor: 6, dot: 1, codeName: "promise-rectification" }; X.expando = "ng339"; var ib = X.cache = {}, $f = 1; X._data = function (a) { return this.cache[a[this.expando]] || {} }; var Wf = /-([a-z])/g, Pg = /^-ms-/, Ab = { mouseleave: "mouseout", mouseenter: "mouseover" }, ac = M("jqLite"), Zf = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/, $b = /<|&#?\w+;/, Xf = /<([\w:-]+)/, Yf = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, ha = { option: [1, '<select multiple="multiple">', "</select>"], thead: [1, "<table>", "</table>"], col: [2, "<table><colgroup>", "</colgroup></table>"], tr: [2, "<table><tbody>", "</tbody></table>"], td: [3, "<table><tbody><tr>", "</tr></tbody></table>"], _default: [0, "", ""] }; ha.optgroup = ha.option; ha.tbody = ha.tfoot = ha.colgroup = ha.caption = ha.thead; ha.th = ha.td; var eg = z.Node.prototype.contains || function (a) { return !!(this.compareDocumentPosition(a) & 16) }, Oa = X.prototype = { ready: $c, toString: function () { var a = []; q(this, function (b) { a.push("" + b) }); return "[" + a.join(", ") + "]" }, eq: function (a) { return 0 <= a ? D(this[a]) : D(this[this.length + a]) }, length: 0, push: Og, sort: [].sort, splice: [].splice }, Gb = {}; q("multiple selected checked disabled readOnly required open".split(" "), function (a) { Gb[P(a)] = a }); var ed = {}; q("input select option textarea button form details".split(" "), function (a) { ed[a] = !0 }); var ld = { ngMinlength: "minlength", ngMaxlength: "maxlength", ngMin: "min", ngMax: "max", ngPattern: "pattern", ngStep: "step" }; q({ data: dc, removeData: hb, hasData: function (a) { for (var b in ib[a.ng339]) return !0; return !1 }, cleanData: function (a) { for (var b = 0, d = a.length; b < d; b++) hb(a[b]) } }, function (a, b) { X[b] = a }); q({ data: dc, inheritedData: Eb, scope: function (a) { return D.data(a, "$scope") || Eb(a.parentNode || a, ["$isolateScope", "$scope"]) }, isolateScope: function (a) { return D.data(a, "$isolateScope") || D.data(a, "$isolateScopeNoTemplate") }, controller: bd, injector: function (a) { return Eb(a, "$injector") }, removeAttr: function (a, b) { a.removeAttribute(b) }, hasClass: Bb, css: function (a, b, d) { b = xb(b.replace(Pg, "ms-")); if (v(d)) a.style[b] = d; else return a.style[b] }, attr: function (a, b, d) { var c = a.nodeType; if (c !== Ja && 2 !== c && 8 !== c && a.getAttribute) { var c = P(b), f = Gb[c]; if (v(d)) null === d || !1 === d && f ? a.removeAttribute(b) : a.setAttribute(b, f ? c : d); else return a = a.getAttribute(b), f && null !== a && (a = c), null === a ? void 0 : a } }, prop: function (a, b, d) { if (v(d)) a[b] = d; else return a[b] }, text: function () { function a(a, d) { if (x(d)) { var c = a.nodeType; return 1 === c || c === Ja ? a.textContent : "" } a.textContent = d } a.$dv = ""; return a }(), val: function (a, b) { if (x(b)) { if (a.multiple && "select" === xa(a)) { var d = []; q(a.options, function (a) { a.selected && d.push(a.value || a.text) }); return d } return a.value } a.value = b }, html: function (a, b) { if (x(b)) return a.innerHTML; yb(a, !0); a.innerHTML = b }, empty: cd }, function (a, b) { X.prototype[b] = function (b, c) { var f, e, g = this.length; if (a !== cd && x(2 === a.length && a !== Bb && a !== bd ? b : c)) { if (F(b)) { for (f = 0; f < g; f++) if (a === dc) a(this[f], b); else for (e in b) a(this[f], e, b[e]); return this } f = a.$dv; g = x(f) ? Math.min(g, 1) : g; for (e = 0; e < g; e++) { var h = a(this[e], b, c); f = f ? f + h : h } return f } for (f = 0; f < g; f++) a(this[f], b, c); return this } }); q({ removeData: hb, on: function (a, b, d, c) { if (v(c)) throw ac("onargs"); if (Yc(a)) { c = zb(a, !0); var f = c.events, e = c.handle; e || (e = c.handle = bg(a, f)); c = 0 <= b.indexOf(" ") ? b.split(" ") : [b]; for (var g = c.length, h = function (b, c, g) { var h = f[b]; h || (h = f[b] = [], h.specialHandlerWrapper = c, "$destroy" === b || g || a.addEventListener(b, e)); h.push(d) }; g--;) b = c[g], Ab[b] ? (h(Ab[b], dg), h(b, void 0, !0)) : h(b) } }, off: ad, one: function (a, b, d) { a = D(a); a.on(b, function f() { a.off(b, d); a.off(b, f) }); a.on(b, d) }, replaceWith: function (a, b) { var d, c = a.parentNode; yb(a); q(new X(b), function (b) { d ? c.insertBefore(b, d.nextSibling) : c.replaceChild(b, a); d = b }) }, children: function (a) { var b = []; q(a.childNodes, function (a) { 1 === a.nodeType && b.push(a) }); return b }, contents: function (a) { return a.contentDocument || a.childNodes || [] }, append: function (a, b) { var d = a.nodeType; if (1 === d || 11 === d) { b = new X(b); for (var d = 0, c = b.length; d < c; d++) a.appendChild(b[d]) } }, prepend: function (a, b) { if (1 === a.nodeType) { var d = a.firstChild; q(new X(b), function (b) { a.insertBefore(b, d) }) } }, wrap: function (a, b) { var d = D(b).eq(0).clone()[0], c = a.parentNode; c && c.replaceChild(d, a); d.appendChild(a) }, remove: Fb, detach: function (a) { Fb(a, !0) }, after: function (a, b) { var d = a, c = a.parentNode; if (c) { b = new X(b); for (var f = 0, e = b.length; f < e; f++) { var g = b[f]; c.insertBefore(g, d.nextSibling); d = g } } }, addClass: Db, removeClass: Cb, toggleClass: function (a, b, d) { b && q(b.split(" "), function (b) { var f = d; x(f) && (f = !Bb(a, b)); (f ? Db : Cb)(a, b) }) }, parent: function (a) { return (a = a.parentNode) && 11 !== a.nodeType ? a : null }, next: function (a) { return a.nextElementSibling }, find: function (a, b) { return a.getElementsByTagName ? a.getElementsByTagName(b) : [] }, clone: cc, triggerHandler: function (a, b, d) { var c, f, e = b.type || b, g = zb(a); if (g = (g = g && g.events) && g[e]) c = { preventDefault: function () { this.defaultPrevented = !0 }, isDefaultPrevented: function () { return !0 === this.defaultPrevented }, stopImmediatePropagation: function () { this.immediatePropagationStopped = !0 }, isImmediatePropagationStopped: function () { return !0 === this.immediatePropagationStopped }, stopPropagation: w, type: e, target: a }, b.type && (c = R(c, b)), b = ra(g), f = d ? [c].concat(d) : [c], q(b, function (b) { c.isImmediatePropagationStopped() || b.apply(a, f) }) } }, function (a, b) { X.prototype[b] = function (b, c, f) { for (var e, g = 0, h = this.length; g < h; g++) x(e) ? (e = a(this[g], b, c, f), v(e) && (e = D(e))) : bc(e, a(this[g], b, c, f)); return v(e) ? e : this } }); X.prototype.bind = X.prototype.on; X.prototype.unbind = X.prototype.off; Qa.prototype = { put: function (a, b) { this[la(a, this.nextUid)] = b }, get: function (a) { return this[la(a, this.nextUid)] }, remove: function (a) { var b = this[a = la(a, this.nextUid)]; delete this[a]; return b } }; var Uf = [function () { this.$get = [function () { return Qa }] }], gg = /^([^(]+?)=>/, hg = /^[^(]*\(\s*([^)]*)\)/m, Qg = /,/, Rg = /^\s*(_?)(\S+?)\1\s*$/, fg = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg, da = M("$injector"); eb.$$annotate = function (a, b, d) { var c; if ("function" === typeof a) { if (!(c = a.$inject)) { c = []; if (a.length) { if (b) throw E(d) && d || (d = a.name || ig(a)), da("strictdi", d); b = fd(a); q(b[1].split(Qg), function (a) { a.replace(Rg, function (a, b, d) { c.push(d) }) }) } a.$inject = c } } else C(a) ? (b = a.length - 1, tb(a[b], "fn"), c = a.slice(0, b)) : tb(a, "fn", !0); return c }; var be = M("$animate"), lf = function () { this.$get = w }, mf = function () { var a = new Qa, b = []; this.$get = ["$$AnimateRunner", "$rootScope", function (d, c) { function f(a, b, c) { var d = !1; b && (b = E(b) ? b.split(" ") : C(b) ? b : [], q(b, function (b) { b && (d = !0, a[b] = c) })); return d } function e() { q(b, function (b) { var c = a.get(b); if (c) { var d = jg(b.attr("class")), e = "", f = ""; q(c, function (a, b) { a !== !!d[b] && (a ? e += (e.length ? " " : "") + b : f += (f.length ? " " : "") + b) }); q(b, function (a) { e && Db(a, e); f && Cb(a, f) }); a.remove(b) } }); b.length = 0 } return { enabled: w, on: w, off: w, pin: w, push: function (g, h, k, l) { l && l(); k = k || {}; k.from && g.css(k.from); k.to && g.css(k.to); if (k.addClass || k.removeClass) if (h = k.addClass, l = k.removeClass, k = a.get(g) || {}, h = f(k, h, !0), l = f(k, l, !1), h || l) a.put(g, k), b.push(g), 1 === b.length && c.$$postDigest(e); g = new d; g.complete(); return g } } }] }, jf = ["$provide", function (a) { var b = this; this.$$registeredAnimations = Object.create(null); this.register = function (d, c) { if (d && "." !== d.charAt(0)) throw be("notcsel", d); var f = d + "-animation"; b.$$registeredAnimations[d.substr(1)] = f; a.factory(f, c) }; this.classNameFilter = function (a) { if (1 === arguments.length && (this.$$classNameFilter = a instanceof RegExp ? a : null) && /(\s+|\/)ng-animate(\s+|\/)/.test(this.$$classNameFilter.toString())) throw be("nongcls", "ng-animate"); return this.$$classNameFilter }; this.$get = ["$$animateQueue", function (a) { function b(a, c, d) { if (d) { var h; a: { for (h = 0; h < d.length; h++) { var k = d[h]; if (1 === k.nodeType) { h = k; break a } } h = void 0 } !h || h.parentNode || h.previousElementSibling || (d = null) } d ? d.after(a) : c.prepend(a) } return { on: a.on, off: a.off, pin: a.pin, enabled: a.enabled, cancel: function (a) { a.end && a.end() }, enter: function (f, e, g, h) { e = e && D(e); g = g && D(g); e = e || g.parent(); b(f, e, g); return a.push(f, "enter", Aa(h)) }, move: function (f, e, g, h) { e = e && D(e); g = g && D(g); e = e || g.parent(); b(f, e, g); return a.push(f, "move", Aa(h)) }, leave: function (b, c) { return a.push(b, "leave", Aa(c), function () { b.remove() }) }, addClass: function (b, c, g) { g = Aa(g); g.addClass = jb(g.addclass, c); return a.push(b, "addClass", g) }, removeClass: function (b, c, g) { g = Aa(g); g.removeClass = jb(g.removeClass, c); return a.push(b, "removeClass", g) }, setClass: function (b, c, g, h) { h = Aa(h); h.addClass = jb(h.addClass, c); h.removeClass = jb(h.removeClass, g); return a.push(b, "setClass", h) }, animate: function (b, c, g, h, k) { k = Aa(k); k.from = k.from ? R(k.from, c) : c; k.to = k.to ? R(k.to, g) : g; k.tempClasses = jb(k.tempClasses, h || "ng-inline-animate"); return a.push(b, "animate", k) } } }] }], of = function () { this.$get = ["$$rAF", function (a) { function b(b) { d.push(b); 1 < d.length || a(function () { for (var a = 0; a < d.length; a++) d[a](); d = [] }) } var d = []; return function () { var a = !1; b(function () { a = !0 }); return function (d) { a ? d() : b(d) } } }] }, nf = function () { this.$get = ["$q", "$sniffer", "$$animateAsyncRun", "$$isDocumentHidden", "$timeout", function (a, b, d, c, f) { function e(a) { this.setHost(a); var b = d(); this._doneCallbacks = []; this._tick = function (a) { c() ? f(a, 0, !1) : b(a) }; this._state = 0 } e.chain = function (a, b) { function c() { if (d === a.length) b(!0); else a[d](function (a) { !1 === a ? b(!1) : (d++, c()) }) } var d = 0; c() }; e.all = function (a, b) { function c(f) { e = e && f; ++d === a.length && b(e) } var d = 0, e = !0; q(a, function (a) { a.done(c) }) }; e.prototype = { setHost: function (a) { this.host = a || {} }, done: function (a) { 2 === this._state ? a() : this._doneCallbacks.push(a) }, progress: w, getPromise: function () { if (!this.promise) { var b = this; this.promise = a(function (a, c) { b.done(function (b) { !1 === b ? c() : a() }) }) } return this.promise }, then: function (a, b) { return this.getPromise().then(a, b) }, "catch": function (a) { return this.getPromise()["catch"](a) }, "finally": function (a) { return this.getPromise()["finally"](a) }, pause: function () { this.host.pause && this.host.pause() }, resume: function () { this.host.resume && this.host.resume() }, end: function () { this.host.end && this.host.end(); this._resolve(!0) }, cancel: function () { this.host.cancel && this.host.cancel(); this._resolve(!1) }, complete: function (a) { var b = this; 0 === b._state && (b._state = 1, b._tick(function () { b._resolve(a) })) }, _resolve: function (a) { 2 !== this._state && (q(this._doneCallbacks, function (b) { b(a) }), this._doneCallbacks.length = 0, this._state = 2) } }; return e }] }, kf = function () { this.$get = ["$$rAF", "$q", "$$AnimateRunner", function (a, b, d) { return function (b, f) { function e() { a(function () { g.addClass && (b.addClass(g.addClass), g.addClass = null); g.removeClass && (b.removeClass(g.removeClass), g.removeClass = null); g.to && (b.css(g.to), g.to = null); h || k.complete(); h = !0 }); return k } var g = f || {}; g.$$prepared || (g = Fa(g)); g.cleanupStyles && (g.from = g.to = null); g.from && (b.css(g.from), g.from = null); var h, k = new d; return { start: e, end: e } } }] }, ea = M("$compile"), hc = new function () { }; Qc.$inject = ["$provide", "$$sanitizeUriProvider"]; Ib.prototype.isFirstChange = function () { return this.previousValue === hc }; var gd = /^((?:x|data)[:\-_])/i, mg = /[:\-_]+(.)/g, nd = M("$controller"), md = /^(\S+)(\s+as\s+([\w$]+))?$/, vf = function () { this.$get = ["$document", function (a) { return function (b) { b ? !b.nodeType && b instanceof D && (b = b[0]) : b = a[0].body; return b.offsetWidth + 1 } }] }, od = "application/json", kc = { "Content-Type": od + ";charset=utf-8" }, pg = /^\[|^\{(?!\{)/, qg = { "[": /]$/, "{": /}$/ }, og = /^\)]\}',?\n/, td = M("$http"), Ea = $.$interpolateMinErr = M("$interpolate"); Ea.throwNoconcat = function (a) { throw Ea("noconcat", a); }; Ea.interr = function (a, b) { return Ea("interr", a, b.toString()) }; var Df = function () { this.$get = ["$window", function (a) { function b(a) { var b = function (a) { b.data = a; b.called = !0 }; b.id = a; return b } var d = a.angular.callbacks, c = {}; return { createCallback: function (a) { a = "_" + (d.$$counter++).toString(36); var e = "angular.callbacks." + a, g = b(a); c[e] = d[a] = g; return e }, wasCalled: function (a) { return c[a].called }, getResponse: function (a) { return c[a].data }, removeCallback: function (a) { delete d[c[a].id]; delete c[a] } } }] }, Sg = /^([^?#]*)(\?([^#]*))?(#(.*))?$/, sg = { http: 80, https: 443, ftp: 21 }, lb = M("$location"), tg = /^\s*[\\/]{2,}/, Tg = { $$absUrl: "", $$html5: !1, $$replace: !1, absUrl: Jb("$$absUrl"), url: function (a) { if (x(a)) return this.$$url; var b = Sg.exec(a); (b[1] || "" === a) && this.path(decodeURIComponent(b[1])); (b[2] || b[1] || "" === a) && this.search(b[3] || ""); this.hash(b[5] || ""); return this }, protocol: Jb("$$protocol"), host: Jb("$$host"), port: Jb("$$port"), path: xd("$$path", function (a) { a = null !== a ? a.toString() : ""; return "/" === a.charAt(0) ? a : "/" + a }), search: function (a, b) { switch (arguments.length) { case 0: return this.$$search; case 1: if (E(a) || Y(a)) a = a.toString(), this.$$search = Lc(a); else if (F(a)) a = Fa(a, {}), q(a, function (b, c) { null == b && delete a[c] }), this.$$search = a; else throw lb("isrcharg"); break; default: x(b) || null === b ? delete this.$$search[a] : this.$$search[a] = b } this.$$compose(); return this }, hash: xd("$$hash", function (a) { return null !== a ? a.toString() : "" }), replace: function () { this.$$replace = !0; return this } }; q([wd, oc, nc], function (a) { a.prototype = Object.create(Tg); a.prototype.state = function (b) { if (!arguments.length) return this.$$state; if (a !== nc || !this.$$html5) throw lb("nostate"); this.$$state = x(b) ? null : b; return this } }); var Ua = M("$parse"), wg = {}.constructor.prototype.valueOf, Qb = W(); q("+ - * / % === !== == != < > <= >= && || ! = |".split(" "), function (a) { Qb[a] = !0 }); var Ug = { n: "\n", f: "\f", r: "\r", t: "\t", v: "\v", "'": "'", '"': '"' }, qc = function (a) { this.options = a }; qc.prototype = { constructor: qc, lex: function (a) { this.text = a; this.index = 0; for (this.tokens = []; this.index < this.text.length;) if (a = this.text.charAt(this.index), '"' === a || "'" === a) this.readString(a); else if (this.isNumber(a) || "." === a && this.isNumber(this.peek())) this.readNumber(); else if (this.isIdentifierStart(this.peekMultichar())) this.readIdent(); else if (this.is(a, "(){}[].,;:?")) this.tokens.push({ index: this.index, text: a }), this.index++; else if (this.isWhitespace(a)) this.index++; else { var b = a + this.peek(), d = b + this.peek(2), c = Qb[b], f = Qb[d]; Qb[a] || c || f ? (a = f ? d : c ? b : a, this.tokens.push({ index: this.index, text: a, operator: !0 }), this.index += a.length) : this.throwError("Unexpected next character ", this.index, this.index + 1) } return this.tokens }, is: function (a, b) { return -1 !== b.indexOf(a) }, peek: function (a) { a = a || 1; return this.index + a < this.text.length ? this.text.charAt(this.index + a) : !1 }, isNumber: function (a) { return "0" <= a && "9" >= a && "string" === typeof a }, isWhitespace: function (a) { return " " === a || "\r" === a || "\t" === a || "\n" === a || "\v" === a || "\u00a0" === a }, isIdentifierStart: function (a) { return this.options.isIdentifierStart ? this.options.isIdentifierStart(a, this.codePointAt(a)) : this.isValidIdentifierStart(a) }, isValidIdentifierStart: function (a) { return "a" <= a && "z" >= a || "A" <= a && "Z" >= a || "_" === a || "$" === a }, isIdentifierContinue: function (a) { return this.options.isIdentifierContinue ? this.options.isIdentifierContinue(a, this.codePointAt(a)) : this.isValidIdentifierContinue(a) }, isValidIdentifierContinue: function (a, b) { return this.isValidIdentifierStart(a, b) || this.isNumber(a) }, codePointAt: function (a) { return 1 === a.length ? a.charCodeAt(0) : (a.charCodeAt(0) << 10) + a.charCodeAt(1) - 56613888 }, peekMultichar: function () { var a = this.text.charAt(this.index), b = this.peek(); if (!b) return a; var d = a.charCodeAt(0), c = b.charCodeAt(0); return 55296 <= d && 56319 >= d && 56320 <= c && 57343 >= c ? a + b : a }, isExpOperator: function (a) { return "-" === a || "+" === a || this.isNumber(a) }, throwError: function (a, b, d) { d = d || this.index; b = v(b) ? "s " + b + "-" + this.index + " [" + this.text.substring(b, d) + "]" : " " + d; throw Ua("lexerr", a, b, this.text); }, readNumber: function () { for (var a = "", b = this.index; this.index < this.text.length;) { var d = P(this.text.charAt(this.index)); if ("." === d || this.isNumber(d)) a += d; else { var c = this.peek(); if ("e" === d && this.isExpOperator(c)) a += d; else if (this.isExpOperator(d) && c && this.isNumber(c) && "e" === a.charAt(a.length - 1)) a += d; else if (!this.isExpOperator(d) || c && this.isNumber(c) || "e" !== a.charAt(a.length - 1)) break; else this.throwError("Invalid exponent") } this.index++ } this.tokens.push({ index: b, text: a, constant: !0, value: Number(a) }) }, readIdent: function () { var a = this.index; for (this.index += this.peekMultichar().length; this.index < this.text.length;) { var b = this.peekMultichar(); if (!this.isIdentifierContinue(b)) break; this.index += b.length } this.tokens.push({ index: a, text: this.text.slice(a, this.index), identifier: !0 }) }, readString: function (a) { var b = this.index; this.index++; for (var d = "", c = a, f = !1; this.index < this.text.length;) { var e = this.text.charAt(this.index), c = c + e; if (f) "u" === e ? (f = this.text.substring(this.index + 1, this.index + 5), f.match(/[\da-f]{4}/i) || this.throwError("Invalid unicode escape [\\u" + f + "]"), this.index += 4, d += String.fromCharCode(parseInt(f, 16))) : d += Ug[e] || e, f = !1; else if ("\\" === e) f = !0; else { if (e === a) { this.index++; this.tokens.push({ index: b, text: c, constant: !0, value: d }); return } d += e } this.index++ } this.throwError("Unterminated quote", b) } }; var s = function (a, b) { this.lexer = a; this.options = b }; s.Program = "Program"; s.ExpressionStatement = "ExpressionStatement"; s.AssignmentExpression = "AssignmentExpression"; s.ConditionalExpression = "ConditionalExpression"; s.LogicalExpression = "LogicalExpression"; s.BinaryExpression = "BinaryExpression"; s.UnaryExpression = "UnaryExpression"; s.CallExpression = "CallExpression"; s.MemberExpression = "MemberExpression"; s.Identifier = "Identifier"; s.Literal = "Literal"; s.ArrayExpression = "ArrayExpression"; s.Property = "Property"; s.ObjectExpression = "ObjectExpression"; s.ThisExpression = "ThisExpression"; s.LocalsExpression = "LocalsExpression"; s.NGValueParameter = "NGValueParameter"; s.prototype = { ast: function (a) { this.text = a; this.tokens = this.lexer.lex(a); a = this.program(); 0 !== this.tokens.length && this.throwError("is an unexpected token", this.tokens[0]); return a }, program: function () { for (var a = []; ;) if (0 < this.tokens.length && !this.peek("}", ")", ";", "]") && a.push(this.expressionStatement()), !this.expect(";")) return { type: s.Program, body: a } }, expressionStatement: function () { return { type: s.ExpressionStatement, expression: this.filterChain() } }, filterChain: function () { for (var a = this.expression() ; this.expect("|") ;) a = this.filter(a); return a }, expression: function () { return this.assignment() }, assignment: function () { var a = this.ternary(); if (this.expect("=")) { if (!Ad(a)) throw Ua("lval"); a = { type: s.AssignmentExpression, left: a, right: this.assignment(), operator: "=" } } return a }, ternary: function () { var a = this.logicalOR(), b, d; return this.expect("?") && (b = this.expression(), this.consume(":")) ? (d = this.expression(), { type: s.ConditionalExpression, test: a, alternate: b, consequent: d }) : a }, logicalOR: function () { for (var a = this.logicalAND() ; this.expect("||") ;) a = { type: s.LogicalExpression, operator: "||", left: a, right: this.logicalAND() }; return a }, logicalAND: function () { for (var a = this.equality() ; this.expect("&&") ;) a = { type: s.LogicalExpression, operator: "&&", left: a, right: this.equality() }; return a }, equality: function () { for (var a = this.relational(), b; b = this.expect("==", "!=", "===", "!==") ;) a = { type: s.BinaryExpression, operator: b.text, left: a, right: this.relational() }; return a }, relational: function () { for (var a = this.additive(), b; b = this.expect("<", ">", "<=", ">=") ;) a = { type: s.BinaryExpression, operator: b.text, left: a, right: this.additive() }; return a }, additive: function () { for (var a = this.multiplicative(), b; b = this.expect("+", "-") ;) a = { type: s.BinaryExpression, operator: b.text, left: a, right: this.multiplicative() }; return a }, multiplicative: function () { for (var a = this.unary(), b; b = this.expect("*", "/", "%") ;) a = { type: s.BinaryExpression, operator: b.text, left: a, right: this.unary() }; return a }, unary: function () { var a; return (a = this.expect("+", "-", "!")) ? { type: s.UnaryExpression, operator: a.text, prefix: !0, argument: this.unary() } : this.primary() }, primary: function () { var a; this.expect("(") ? (a = this.filterChain(), this.consume(")")) : this.expect("[") ? a = this.arrayDeclaration() : this.expect("{") ? a = this.object() : this.selfReferential.hasOwnProperty(this.peek().text) ? a = Fa(this.selfReferential[this.consume().text]) : this.options.literals.hasOwnProperty(this.peek().text) ? a = { type: s.Literal, value: this.options.literals[this.consume().text] } : this.peek().identifier ? a = this.identifier() : this.peek().constant ? a = this.constant() : this.throwError("not a primary expression", this.peek()); for (var b; b = this.expect("(", "[", ".") ;) "(" === b.text ? (a = { type: s.CallExpression, callee: a, arguments: this.parseArguments() }, this.consume(")")) : "[" === b.text ? (a = { type: s.MemberExpression, object: a, property: this.expression(), computed: !0 }, this.consume("]")) : "." === b.text ? a = { type: s.MemberExpression, object: a, property: this.identifier(), computed: !1 } : this.throwError("IMPOSSIBLE"); return a }, filter: function (a) { a = [a]; for (var b = { type: s.CallExpression, callee: this.identifier(), arguments: a, filter: !0 }; this.expect(":") ;) a.push(this.expression()); return b }, parseArguments: function () { var a = []; if (")" !== this.peekToken().text) { do a.push(this.filterChain()); while (this.expect(",")) } return a }, identifier: function () { var a = this.consume(); a.identifier || this.throwError("is not a valid identifier", a); return { type: s.Identifier, name: a.text } }, constant: function () { return { type: s.Literal, value: this.consume().value } }, arrayDeclaration: function () { var a = []; if ("]" !== this.peekToken().text) { do { if (this.peek("]")) break; a.push(this.expression()) } while (this.expect(",")) } this.consume("]"); return { type: s.ArrayExpression, elements: a } }, object: function () { var a = [], b; if ("}" !== this.peekToken().text) { do { if (this.peek("}")) break; b = { type: s.Property, kind: "init" }; this.peek().constant ? (b.key = this.constant(), b.computed = !1, this.consume(":"), b.value = this.expression()) : this.peek().identifier ? (b.key = this.identifier(), b.computed = !1, this.peek(":") ? (this.consume(":"), b.value = this.expression()) : b.value = b.key) : this.peek("[") ? (this.consume("["), b.key = this.expression(), this.consume("]"), b.computed = !0, this.consume(":"), b.value = this.expression()) : this.throwError("invalid key", this.peek()); a.push(b) } while (this.expect(",")) } this.consume("}"); return { type: s.ObjectExpression, properties: a } }, throwError: function (a, b) { throw Ua("syntax", b.text, a, b.index + 1, this.text, this.text.substring(b.index)); }, consume: function (a) { if (0 === this.tokens.length) throw Ua("ueoe", this.text); var b = this.expect(a); b || this.throwError("is unexpected, expecting [" + a + "]", this.peek()); return b }, peekToken: function () { if (0 === this.tokens.length) throw Ua("ueoe", this.text); return this.tokens[0] }, peek: function (a, b, d, c) { return this.peekAhead(0, a, b, d, c) }, peekAhead: function (a, b, d, c, f) { if (this.tokens.length > a) { a = this.tokens[a]; var e = a.text; if (e === b || e === d || e === c || e === f || !(b || d || c || f)) return a } return !1 }, expect: function (a, b, d, c) { return (a = this.peek(a, b, d, c)) ? (this.tokens.shift(), a) : !1 }, selfReferential: { "this": { type: s.ThisExpression }, $locals: { type: s.LocalsExpression } } }; Dd.prototype = { compile: function (a) { var b = this; a = this.astBuilder.ast(a); this.state = { nextId: 0, filters: {}, fn: { vars: [], body: [], own: {} }, assign: { vars: [], body: [], own: {} }, inputs: [] }; V(a, b.$filter); var d = "", c; this.stage = "assign"; if (c = Bd(a)) this.state.computing = "assign", d = this.nextId(), this.recurse(c, d), this.return_(d), d = "fn.assign=" + this.generateFunction("assign", "s,v,l"); c = zd(a.body); b.stage = "inputs"; q(c, function (a, c) { var d = "fn" + c; b.state[d] = { vars: [], body: [], own: {} }; b.state.computing = d; var h = b.nextId(); b.recurse(a, h); b.return_(h); b.state.inputs.push(d); a.watchId = c }); this.state.computing = "fn"; this.stage = "main"; this.recurse(a); d = '"' + this.USE + " " + this.STRICT + '";\n' + this.filterPrefix() + "var fn=" + this.generateFunction("fn", "s,l,a,i") + d + this.watchFns() + "return fn;"; d = (new Function("$filter", "getStringValue", "ifDefined", "plus", d))(this.$filter, ug, vg, yd); this.state = this.stage = void 0; d.literal = Cd(a); d.constant = a.constant; return d }, USE: "use", STRICT: "strict", watchFns: function () { var a = [], b = this.state.inputs, d = this; q(b, function (b) { a.push("var " + b + "=" + d.generateFunction(b, "s")) }); b.length && a.push("fn.inputs=[" + b.join(",") + "];"); return a.join("") }, generateFunction: function (a, b) { return "function(" + b + "){" + this.varsPrefix(a) + this.body(a) + "};" }, filterPrefix: function () { var a = [], b = this; q(this.state.filters, function (d, c) { a.push(d + "=$filter(" + b.escape(c) + ")") }); return a.length ? "var " + a.join(",") + ";" : "" }, varsPrefix: function (a) { return this.state[a].vars.length ? "var " + this.state[a].vars.join(",") + ";" : "" }, body: function (a) { return this.state[a].body.join("") }, recurse: function (a, b, d, c, f, e) { var g, h, k = this, l, m, n; c = c || w; if (!e && v(a.watchId)) b = b || this.nextId(), this.if_("i", this.lazyAssign(b, this.computedMember("i", a.watchId)), this.lazyRecurse(a, b, d, c, f, !0)); else switch (a.type) { case s.Program: q(a.body, function (b, c) { k.recurse(b.expression, void 0, void 0, function (a) { h = a }); c !== a.body.length - 1 ? k.current().body.push(h, ";") : k.return_(h) }); break; case s.Literal: m = this.escape(a.value); this.assign(b, m); c(b || m); break; case s.UnaryExpression: this.recurse(a.argument, void 0, void 0, function (a) { h = a }); m = a.operator + "(" + this.ifDefined(h, 0) + ")"; this.assign(b, m); c(m); break; case s.BinaryExpression: this.recurse(a.left, void 0, void 0, function (a) { g = a }); this.recurse(a.right, void 0, void 0, function (a) { h = a }); m = "+" === a.operator ? this.plus(g, h) : "-" === a.operator ? this.ifDefined(g, 0) + a.operator + this.ifDefined(h, 0) : "(" + g + ")" + a.operator + "(" + h + ")"; this.assign(b, m); c(m); break; case s.LogicalExpression: b = b || this.nextId(); k.recurse(a.left, b); k.if_("&&" === a.operator ? b : k.not(b), k.lazyRecurse(a.right, b)); c(b); break; case s.ConditionalExpression: b = b || this.nextId(); k.recurse(a.test, b); k.if_(b, k.lazyRecurse(a.alternate, b), k.lazyRecurse(a.consequent, b)); c(b); break; case s.Identifier: b = b || this.nextId(); d && (d.context = "inputs" === k.stage ? "s" : this.assign(this.nextId(), this.getHasOwnProperty("l", a.name) + "?l:s"), d.computed = !1, d.name = a.name); k.if_("inputs" === k.stage || k.not(k.getHasOwnProperty("l", a.name)), function () { k.if_("inputs" === k.stage || "s", function () { f && 1 !== f && k.if_(k.isNull(k.nonComputedMember("s", a.name)), k.lazyAssign(k.nonComputedMember("s", a.name), "{}")); k.assign(b, k.nonComputedMember("s", a.name)) }) }, b && k.lazyAssign(b, k.nonComputedMember("l", a.name))); c(b); break; case s.MemberExpression: g = d && (d.context = this.nextId()) || this.nextId(); b = b || this.nextId(); k.recurse(a.object, g, void 0, function () { k.if_(k.notNull(g), function () { a.computed ? (h = k.nextId(), k.recurse(a.property, h), k.getStringValue(h), f && 1 !== f && k.if_(k.not(k.computedMember(g, h)), k.lazyAssign(k.computedMember(g, h), "{}")), m = k.computedMember(g, h), k.assign(b, m), d && (d.computed = !0, d.name = h)) : (f && 1 !== f && k.if_(k.isNull(k.nonComputedMember(g, a.property.name)), k.lazyAssign(k.nonComputedMember(g, a.property.name), "{}")), m = k.nonComputedMember(g, a.property.name), k.assign(b, m), d && (d.computed = !1, d.name = a.property.name)) }, function () { k.assign(b, "undefined") }); c(b) }, !!f); break; case s.CallExpression: b = b || this.nextId(); a.filter ? (h = k.filter(a.callee.name), l = [], q(a.arguments, function (a) { var b = k.nextId(); k.recurse(a, b); l.push(b) }), m = h + "(" + l.join(",") + ")", k.assign(b, m), c(b)) : (h = k.nextId(), g = {}, l = [], k.recurse(a.callee, h, g, function () { k.if_(k.notNull(h), function () { q(a.arguments, function (b) { k.recurse(b, a.constant ? void 0 : k.nextId(), void 0, function (a) { l.push(a) }) }); m = g.name ? k.member(g.context, g.name, g.computed) + "(" + l.join(",") + ")" : h + "(" + l.join(",") + ")"; k.assign(b, m) }, function () { k.assign(b, "undefined") }); c(b) })); break; case s.AssignmentExpression: h = this.nextId(); g = {}; this.recurse(a.left, void 0, g, function () { k.if_(k.notNull(g.context), function () { k.recurse(a.right, h); m = k.member(g.context, g.name, g.computed) + a.operator + h; k.assign(b, m); c(b || m) }) }, 1); break; case s.ArrayExpression: l = []; q(a.elements, function (b) { k.recurse(b, a.constant ? void 0 : k.nextId(), void 0, function (a) { l.push(a) }) }); m = "[" + l.join(",") + "]"; this.assign(b, m); c(b || m); break; case s.ObjectExpression: l = []; n = !1; q(a.properties, function (a) { a.computed && (n = !0) }); n ? (b = b || this.nextId(), this.assign(b, "{}"), q(a.properties, function (a) { a.computed ? (g = k.nextId(), k.recurse(a.key, g)) : g = a.key.type === s.Identifier ? a.key.name : "" + a.key.value; h = k.nextId(); k.recurse(a.value, h); k.assign(k.member(b, g, a.computed), h) })) : (q(a.properties, function (b) { k.recurse(b.value, a.constant ? void 0 : k.nextId(), void 0, function (a) { l.push(k.escape(b.key.type === s.Identifier ? b.key.name : "" + b.key.value) + ":" + a) }) }), m = "{" + l.join(",") + "}", this.assign(b, m)); c(b || m); break; case s.ThisExpression: this.assign(b, "s"); c(b || "s"); break; case s.LocalsExpression: this.assign(b, "l"); c(b || "l"); break; case s.NGValueParameter: this.assign(b, "v"), c(b || "v") } }, getHasOwnProperty: function (a, b) { var d = a + "." + b, c = this.current().own; c.hasOwnProperty(d) || (c[d] = this.nextId(!1, a + "&&(" + this.escape(b) + " in " + a + ")")); return c[d] }, assign: function (a, b) { if (a) return this.current().body.push(a, "=", b, ";"), a }, filter: function (a) { this.state.filters.hasOwnProperty(a) || (this.state.filters[a] = this.nextId(!0)); return this.state.filters[a] }, ifDefined: function (a, b) { return "ifDefined(" + a + "," + this.escape(b) + ")" }, plus: function (a, b) { return "plus(" + a + "," + b + ")" }, return_: function (a) { this.current().body.push("return ", a, ";") }, if_: function (a, b, d) { if (!0 === a) b(); else { var c = this.current().body; c.push("if(", a, "){"); b(); c.push("}"); d && (c.push("else{"), d(), c.push("}")) } }, not: function (a) { return "!(" + a + ")" }, isNull: function (a) { return a + "==null" }, notNull: function (a) { return a + "!=null" }, nonComputedMember: function (a, b) { var d = /[^$_a-zA-Z0-9]/g; return /^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b) ? a + "." + b : a + '["' + b.replace(d, this.stringEscapeFn) + '"]' }, computedMember: function (a, b) { return a + "[" + b + "]" }, member: function (a, b, d) { return d ? this.computedMember(a, b) : this.nonComputedMember(a, b) }, getStringValue: function (a) { this.assign(a, "getStringValue(" + a + ")") }, lazyRecurse: function (a, b, d, c, f, e) { var g = this; return function () { g.recurse(a, b, d, c, f, e) } }, lazyAssign: function (a, b) { var d = this; return function () { d.assign(a, b) } }, stringEscapeRegex: /[^ a-zA-Z0-9]/g, stringEscapeFn: function (a) { return "\\u" + ("0000" + a.charCodeAt(0).toString(16)).slice(-4) }, escape: function (a) { if (E(a)) return "'" + a.replace(this.stringEscapeRegex, this.stringEscapeFn) + "'"; if (Y(a)) return a.toString(); if (!0 === a) return "true"; if (!1 === a) return "false"; if (null === a) return "null"; if ("undefined" === typeof a) return "undefined"; throw Ua("esc"); }, nextId: function (a, b) { var d = "v" + this.state.nextId++; a || this.current().vars.push(d + (b ? "=" + b : "")); return d }, current: function () { return this.state[this.state.computing] } }; Ed.prototype = { compile: function (a) { var b = this; a = this.astBuilder.ast(a); V(a, b.$filter); var d, c; if (d = Bd(a)) c = this.recurse(d); d = zd(a.body); var f; d && (f = [], q(d, function (a, c) { var d = b.recurse(a); a.input = d; f.push(d); a.watchId = c })); var e = []; q(a.body, function (a) { e.push(b.recurse(a.expression)) }); d = 0 === a.body.length ? w : 1 === a.body.length ? e[0] : function (a, b) { var c; q(e, function (d) { c = d(a, b) }); return c }; c && (d.assign = function (a, b, d) { return c(a, d, b) }); f && (d.inputs = f); d.literal = Cd(a); d.constant = a.constant; return d }, recurse: function (a, b, d) { var c, f, e = this, g; if (a.input) return this.inputs(a.input, a.watchId); switch (a.type) { case s.Literal: return this.value(a.value, b); case s.UnaryExpression: return f = this.recurse(a.argument), this["unary" + a.operator](f, b); case s.BinaryExpression: return c = this.recurse(a.left), f = this.recurse(a.right), this["binary" + a.operator](c, f, b); case s.LogicalExpression: return c = this.recurse(a.left), f = this.recurse(a.right), this["binary" + a.operator](c, f, b); case s.ConditionalExpression: return this["ternary?:"](this.recurse(a.test), this.recurse(a.alternate), this.recurse(a.consequent), b); case s.Identifier: return e.identifier(a.name, b, d); case s.MemberExpression: return c = this.recurse(a.object, !1, !!d), a.computed || (f = a.property.name), a.computed && (f = this.recurse(a.property)), a.computed ? this.computedMember(c, f, b, d) : this.nonComputedMember(c, f, b, d); case s.CallExpression: return g = [], q(a.arguments, function (a) { g.push(e.recurse(a)) }), a.filter && (f = this.$filter(a.callee.name)), a.filter || (f = this.recurse(a.callee, !0)), a.filter ? function (a, c, d, e) { for (var n = [], p = 0; p < g.length; ++p) n.push(g[p](a, c, d, e)); a = f.apply(void 0, n, e); return b ? { context: void 0, name: void 0, value: a } : a } : function (a, c, d, e) { var n = f(a, c, d, e), p; if (null != n.value) { p = []; for (var r = 0; r < g.length; ++r) p.push(g[r](a, c, d, e)); p = n.value.apply(n.context, p) } return b ? { value: p } : p }; case s.AssignmentExpression: return c = this.recurse(a.left, !0, 1), f = this.recurse(a.right), function (a, d, e, g) { var n = c(a, d, e, g); a = f(a, d, e, g); n.context[n.name] = a; return b ? { value: a } : a }; case s.ArrayExpression: return g = [], q(a.elements, function (a) { g.push(e.recurse(a)) }), function (a, c, d, e) { for (var f = [], p = 0; p < g.length; ++p) f.push(g[p](a, c, d, e)); return b ? { value: f } : f }; case s.ObjectExpression: return g = [], q(a.properties, function (a) { a.computed ? g.push({ key: e.recurse(a.key), computed: !0, value: e.recurse(a.value) }) : g.push({ key: a.key.type === s.Identifier ? a.key.name : "" + a.key.value, computed: !1, value: e.recurse(a.value) }) }), function (a, c, d, e) { for (var f = {}, p = 0; p < g.length; ++p) g[p].computed ? f[g[p].key(a, c, d, e)] = g[p].value(a, c, d, e) : f[g[p].key] = g[p].value(a, c, d, e); return b ? { value: f } : f }; case s.ThisExpression: return function (a) { return b ? { value: a } : a }; case s.LocalsExpression: return function (a, c) { return b ? { value: c } : c }; case s.NGValueParameter: return function (a, c, d) { return b ? { value: d } : d } } }, "unary+": function (a, b) { return function (d, c, f, e) { d = a(d, c, f, e); d = v(d) ? +d : 0; return b ? { value: d } : d } }, "unary-": function (a, b) { return function (d, c, f, e) { d = a(d, c, f, e); d = v(d) ? -d : -0; return b ? { value: d } : d } }, "unary!": function (a, b) { return function (d, c, f, e) { d = !a(d, c, f, e); return b ? { value: d } : d } }, "binary+": function (a, b, d) { return function (c, f, e, g) { var h = a(c, f, e, g); c = b(c, f, e, g); h = yd(h, c); return d ? { value: h } : h } }, "binary-": function (a, b, d) { return function (c, f, e, g) { var h = a(c, f, e, g); c = b(c, f, e, g); h = (v(h) ? h : 0) - (v(c) ? c : 0); return d ? { value: h } : h } }, "binary*": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) * b(c, f, e, g); return d ? { value: c } : c } }, "binary/": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) / b(c, f, e, g); return d ? { value: c } : c } }, "binary%": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) % b(c, f, e, g); return d ? { value: c } : c } }, "binary===": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) === b(c, f, e, g); return d ? { value: c } : c } }, "binary!==": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) !== b(c, f, e, g); return d ? { value: c } : c } }, "binary==": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) == b(c, f, e, g); return d ? { value: c } : c } }, "binary!=": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) != b(c, f, e, g); return d ? { value: c } : c } }, "binary<": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) < b(c, f, e, g); return d ? { value: c } : c } }, "binary>": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) > b(c, f, e, g); return d ? { value: c } : c } }, "binary<=": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) <= b(c, f, e, g); return d ? { value: c } : c } }, "binary>=": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) >= b(c, f, e, g); return d ? { value: c } : c } }, "binary&&": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) && b(c, f, e, g); return d ? { value: c } : c } }, "binary||": function (a, b, d) { return function (c, f, e, g) { c = a(c, f, e, g) || b(c, f, e, g); return d ? { value: c } : c } }, "ternary?:": function (a, b, d, c) { return function (f, e, g, h) { f = a(f, e, g, h) ? b(f, e, g, h) : d(f, e, g, h); return c ? { value: f } : f } }, value: function (a, b) { return function () { return b ? { context: void 0, name: void 0, value: a } : a } }, identifier: function (a, b, d) { return function (c, f, e, g) { c = f && a in f ? f : c; d && 1 !== d && c && null == c[a] && (c[a] = {}); f = c ? c[a] : void 0; return b ? { context: c, name: a, value: f } : f } }, computedMember: function (a, b, d, c) { return function (f, e, g, h) { var k = a(f, e, g, h), l, m; null != k && (l = b(f, e, g, h), l += "", c && 1 !== c && k && !k[l] && (k[l] = {}), m = k[l]); return d ? { context: k, name: l, value: m } : m } }, nonComputedMember: function (a, b, d, c) { return function (f, e, g, h) { f = a(f, e, g, h); c && 1 !== c && f && null == f[b] && (f[b] = {}); e = null != f ? f[b] : void 0; return d ? { context: f, name: b, value: e } : e } }, inputs: function (a, b) { return function (d, c, f, e) { return e ? e[b] : a(d, c, f) } } }; var rc = function (a, b, d) { this.lexer = a; this.$filter = b; this.options = d; this.ast = new s(a, d); this.astCompiler = d.csp ? new Ed(this.ast, b) : new Dd(this.ast, b) }; rc.prototype = { constructor: rc, parse: function (a) { return this.astCompiler.compile(a) } }; var ua = M("$sce"), pa = { HTML: "html", CSS: "css", URL: "url", RESOURCE_URL: "resourceUrl", JS: "js" }, sc = /_([a-z])/g, yg = M("$compile"), ca = z.document.createElement("a"), Id = Da(z.location.href); Jd.$inject = ["$document"]; Xc.$inject = ["$provide"]; var Qd = 22, Pd = ".", uc = "0"; Kd.$inject = ["$locale"]; Md.$inject = ["$locale"]; var Jg = { yyyy: aa("FullYear", 4, 0, !1, !0), yy: aa("FullYear", 2, 0, !0, !0), y: aa("FullYear", 1, 0, !1, !0), MMMM: nb("Month"), MMM: nb("Month", !0), MM: aa("Month", 2, 1), M: aa("Month", 1, 1), LLLL: nb("Month", !1, !0), dd: aa("Date", 2), d: aa("Date", 1), HH: aa("Hours", 2), H: aa("Hours", 1), hh: aa("Hours", 2, -12), h: aa("Hours", 1, -12), mm: aa("Minutes", 2), m: aa("Minutes", 1), ss: aa("Seconds", 2), s: aa("Seconds", 1), sss: aa("Milliseconds", 3), EEEE: nb("Day"), EEE: nb("Day", !0), a: function (a, b) { return 12 > a.getHours() ? b.AMPMS[0] : b.AMPMS[1] }, Z: function (a, b, d) { a = -1 * d; return a = (0 <= a ? "+" : "") + (Kb(Math[0 < a ? "floor" : "ceil"](a / 60), 2) + Kb(Math.abs(a % 60), 2)) }, ww: Sd(2), w: Sd(1), G: vc, GG: vc, GGG: vc, GGGG: function (a, b) { return 0 >= a.getFullYear() ? b.ERANAMES[0] : b.ERANAMES[1] } }, Ig = /((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/, Hg = /^-?\d+$/; Ld.$inject = ["$locale"]; var Cg = ma(P), Dg = ma(vb); Nd.$inject = ["$parse"]; var Ae = ma({ restrict: "E", compile: function (a, b) { if (!b.href && !b.xlinkHref) return function (a, b) { if ("a" === b[0].nodeName.toLowerCase()) { var f = "[object SVGAnimatedString]" === na.call(b.prop("href")) ? "xlink:href" : "href"; b.on("click", function (a) { b.attr(f) || a.preventDefault() }) } } } }), wb = {}; q(Gb, function (a, b) { function d(a, d, f) { a.$watch(f[c], function (a) { f.$set(b, !!a) }) } if ("multiple" !== a) { var c = Ca("ng-" + b), f = d; "checked" === a && (f = function (a, b, f) { f.ngModel !== f[c] && d(a, b, f) }); wb[c] = function () { return { restrict: "A", priority: 100, link: f } } } }); q(ld, function (a, b) { wb[b] = function () { return { priority: 100, link: function (a, c, f) { if ("ngPattern" === b && "/" === f.ngPattern.charAt(0) && (c = f.ngPattern.match(Ng))) { f.$set("ngPattern", new RegExp(c[1], c[2])); return } a.$watch(f[b], function (a) { f.$set(b, a) }) } } } }); q(["src", "srcset", "href"], function (a) { var b = Ca("ng-" + a); wb[b] = function () { return { priority: 99, link: function (d, c, f) { var e = a, g = a; "href" === a && "[object SVGAnimatedString]" === na.call(c.prop("href")) && (g = "xlinkHref", f.$attr[g] = "xlink:href", e = null); f.$observe(b, function (b) { b ? (f.$set(g, b), La && e && c.prop(e, f[g])) : "href" === a && f.$set(g, null) }) } } } }); var Mb = { $addControl: w, $$renameControl: function (a, b) { a.$name = b }, $removeControl: w, $setValidity: w, $setDirty: w, $setPristine: w, $setSubmitted: w }; Lb.$inject = ["$element", "$attrs", "$scope", "$animate", "$interpolate"]; Lb.prototype = { $rollbackViewValue: function () { q(this.$$controls, function (a) { a.$rollbackViewValue() }) }, $commitViewValue: function () { q(this.$$controls, function (a) { a.$commitViewValue() }) }, $addControl: function (a) { Pa(a.$name, "input"); this.$$controls.push(a); a.$name && (this[a.$name] = a); a.$$parentForm = this }, $$renameControl: function (a, b) { var d = a.$name; this[d] === a && delete this[d]; this[b] = a; a.$name = b }, $removeControl: function (a) { a.$name && this[a.$name] === a && delete this[a.$name]; q(this.$pending, function (b, d) { this.$setValidity(d, null, a) }, this); q(this.$error, function (b, d) { this.$setValidity(d, null, a) }, this); q(this.$$success, function (b, d) { this.$setValidity(d, null, a) }, this); $a(this.$$controls, a); a.$$parentForm = Mb }, $setDirty: function () { this.$$animate.removeClass(this.$$element, Va); this.$$animate.addClass(this.$$element, Rb); this.$dirty = !0; this.$pristine = !1; this.$$parentForm.$setDirty() }, $setPristine: function () { this.$$animate.setClass(this.$$element, Va, Rb + " ng-submitted"); this.$dirty = !1; this.$pristine = !0; this.$submitted = !1; q(this.$$controls, function (a) { a.$setPristine() }) }, $setUntouched: function () { q(this.$$controls, function (a) { a.$setUntouched() }) }, $setSubmitted: function () { this.$$animate.addClass(this.$$element, "ng-submitted"); this.$submitted = !0; this.$$parentForm.$setSubmitted() } }; Vd({ clazz: Lb, set: function (a, b, d) { var c = a[b]; c ? -1 === c.indexOf(d) && c.push(d) : a[b] = [d] }, unset: function (a, b, d) { var c = a[b]; c && ($a(c, d), 0 === c.length && delete a[b]) } }); var ce = function (a) { return ["$timeout", "$parse", function (b, d) { function c(a) { return "" === a ? d('this[""]').assign : d(a).assign || w } return { name: "form", restrict: a ? "EAC" : "E", require: ["form", "^^?form"], controller: Lb, compile: function (d, e) { d.addClass(Va).addClass(ob); var g = e.name ? "name" : a && e.ngForm ? "ngForm" : !1; return { pre: function (a, d, e, f) { var n = f[0]; if (!("action" in e)) { var p = function (b) { a.$apply(function () { n.$commitViewValue(); n.$setSubmitted() }); b.preventDefault() }; d[0].addEventListener("submit", p); d.on("$destroy", function () { b(function () { d[0].removeEventListener("submit", p) }, 0, !1) }) } (f[1] || n.$$parentForm).$addControl(n); var r = g ? c(n.$name) : w; g && (r(a, n), e.$observe(g, function (b) { n.$name !== b && (r(a, void 0), n.$$parentForm.$$renameControl(n, b), r = c(n.$name), r(a, n)) })); d.on("$destroy", function () { n.$$parentForm.$removeControl(n); r(a, void 0); R(n, Mb) }) } } } } }] }, Be = ce(), Ne = ce(!0), Kg = /^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/, Vg = /^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i, Wg = /^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/, Lg = /^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/, de = /^(\d{4,})-(\d{2})-(\d{2})$/, ee = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/, Cc = /^(\d{4,})-W(\d\d)$/, fe = /^(\d{4,})-(\d\d)$/, ge = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/, Xd = W(); q(["date", "datetime-local", "month", "time", "week"], function (a) { Xd[a] = !0 }); var he = { text: function (a, b, d, c, f, e) { Sa(a, b, d, c, f, e); xc(c) }, date: pb("date", de, Nb(de, ["yyyy", "MM", "dd"]), "yyyy-MM-dd"), "datetime-local": pb("datetimelocal", ee, Nb(ee, "yyyy MM dd HH mm ss sss".split(" ")), "yyyy-MM-ddTHH:mm:ss.sss"), time: pb("time", ge, Nb(ge, ["HH", "mm", "ss", "sss"]), "HH:mm:ss.sss"), week: pb("week", Cc, function (a, b) { if (fa(a)) return a; if (E(a)) { Cc.lastIndex = 0; var d = Cc.exec(a); if (d) { var c = +d[1], f = +d[2], e = d = 0, g = 0, h = 0, k = Rd(c), f = 7 * (f - 1); b && (d = b.getHours(), e = b.getMinutes(), g = b.getSeconds(), h = b.getMilliseconds()); return new Date(c, 0, k.getDate() + f, d, e, g, h) } } return NaN }, "yyyy-Www"), month: pb("month", fe, Nb(fe, ["yyyy", "MM"]), "yyyy-MM"), number: function (a, b, d, c, f, e) { yc(a, b, d, c); Yd(c); Sa(a, b, d, c, f, e); var g, h; if (v(d.min) || d.ngMin) c.$validators.min = function (a) { return c.$isEmpty(a) || x(g) || a >= g }, d.$observe("min", function (a) { g = Ta(a); c.$validate() }); if (v(d.max) || d.ngMax) c.$validators.max = function (a) { return c.$isEmpty(a) || x(h) || a <= h }, d.$observe("max", function (a) { h = Ta(a); c.$validate() }); if (v(d.step) || d.ngStep) { var k; c.$validators.step = function (a, b) { return c.$isEmpty(b) || x(k) || Zd(b, g || 0, k) }; d.$observe("step", function (a) { k = Ta(a); c.$validate() }) } }, url: function (a, b, d, c, f, e) { Sa(a, b, d, c, f, e); xc(c); c.$$parserName = "url"; c.$validators.url = function (a, b) { var d = a || b; return c.$isEmpty(d) || Vg.test(d) } }, email: function (a, b, d, c, f, e) { Sa(a, b, d, c, f, e); xc(c); c.$$parserName = "email"; c.$validators.email = function (a, b) { var d = a || b; return c.$isEmpty(d) || Wg.test(d) } }, radio: function (a, b, d, c) { var f = !d.ngTrim || "false" !== S(d.ngTrim); x(d.name) && b.attr("name", ++rb); b.on("click", function (a) { var g; b[0].checked && (g = d.value, f && (g = S(g)), c.$setViewValue(g, a && a.type)) }); c.$render = function () { var a = d.value; f && (a = S(a)); b[0].checked = a === c.$viewValue }; d.$observe("value", c.$render) }, range: function (a, b, d, c, f, e) { function g(a, c) { b.attr(a, d[a]); d.$observe(a, c) } function h(a) { n = Ta(a); ga(c.$modelValue) || (m ? (a = b.val(), n > a && (a = n, b.val(a)), c.$setViewValue(a)) : c.$validate()) } function k(a) { p = Ta(a); ga(c.$modelValue) || (m ? (a = b.val(), p < a && (b.val(p), a = p < n ? n : p), c.$setViewValue(a)) : c.$validate()) } function l(a) { r = Ta(a); ga(c.$modelValue) || (m && c.$viewValue !== b.val() ? c.$setViewValue(b.val()) : c.$validate()) } yc(a, b, d, c); Yd(c); Sa(a, b, d, c, f, e); var m = c.$$hasNativeValidators && "range" === b[0].type, n = m ? 0 : void 0, p = m ? 100 : void 0, r = m ? 1 : void 0, q = b[0].validity; a = v(d.min); f = v(d.max); e = v(d.step); var s = c.$render; c.$render = m && v(q.rangeUnderflow) && v(q.rangeOverflow) ? function () { s(); c.$setViewValue(b.val()) } : s; a && (c.$validators.min = m ? function () { return !0 } : function (a, b) { return c.$isEmpty(b) || x(n) || b >= n }, g("min", h)); f && (c.$validators.max = m ? function () { return !0 } : function (a, b) { return c.$isEmpty(b) || x(p) || b <= p }, g("max", k)); e && (c.$validators.step = m ? function () { return !q.stepMismatch } : function (a, b) { return c.$isEmpty(b) || x(r) || Zd(b, n || 0, r) }, g("step", l)) }, checkbox: function (a, b, d, c, f, e, g, h) { var k = $d(h, a, "ngTrueValue", d.ngTrueValue, !0), l = $d(h, a, "ngFalseValue", d.ngFalseValue, !1); b.on("click", function (a) { c.$setViewValue(b[0].checked, a && a.type) }); c.$render = function () { b[0].checked = c.$viewValue }; c.$isEmpty = function (a) { return !1 === a }; c.$formatters.push(function (a) { return qa(a, k) }); c.$parsers.push(function (a) { return a ? k : l }) }, hidden: w, button: w, submit: w, reset: w, file: w }, Rc = ["$browser", "$sniffer", "$filter", "$parse", function (a, b, d, c) { return { restrict: "E", require: ["?ngModel"], link: { pre: function (f, e, g, h) { h[0] && (he[P(g.type)] || he.text)(f, e, g, h[0], b, a, d, c) } } } }], Xg = /^(true|false|\d+)$/, ef = function () { return { restrict: "A", priority: 100, compile: function (a, b) { return Xg.test(b.ngValue) ? function (a, b, f) { a = a.$eval(f.ngValue); b.prop("value", a); f.$set("value", a) } : function (a, b, f) { a.$watch(f.ngValue, function (a) { b.prop("value", a); f.$set("value", a) }) } } } }, Fe = ["$compile", function (a) { return { restrict: "AC", compile: function (b) { a.$$addBindingClass(b); return function (b, c, f) { a.$$addBindingInfo(c, f.ngBind); c = c[0]; b.$watch(f.ngBind, function (a) { c.textContent = Yb(a) }) } } } }], He = ["$interpolate", "$compile", function (a, b) { return { compile: function (d) { b.$$addBindingClass(d); return function (c, d, e) { c = a(d.attr(e.$attr.ngBindTemplate)); b.$$addBindingInfo(d, c.expressions); d = d[0]; e.$observe("ngBindTemplate", function (a) { d.textContent = x(a) ? "" : a }) } } } }], Ge = ["$sce", "$parse", "$compile", function (a, b, d) { return { restrict: "A", compile: function (c, f) { var e = b(f.ngBindHtml), g = b(f.ngBindHtml, function (b) { return a.valueOf(b) }); d.$$addBindingClass(c); return function (b, c, f) { d.$$addBindingInfo(c, f.ngBindHtml); b.$watch(g, function () { var d = e(b); c.html(a.getTrustedHtml(d) || "") }) } } } }], df = ma({ restrict: "A", require: "ngModel", link: function (a, b, d, c) { c.$viewChangeListeners.push(function () { a.$eval(d.ngChange) }) } }), Ie = Ac("", !0), Ke = Ac("Odd", 0), Je = Ac("Even", 1), Le = Ra({ compile: function (a, b) { b.$set("ngCloak", void 0); a.removeClass("ng-cloak") } }), Me = [function () { return { restrict: "A", scope: !0, controller: "@", priority: 500 } }], Wc = {}, Yg = { blur: !0, focus: !0 }; q("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "), function (a) { var b = Ca("ng-" + a); Wc[b] = ["$parse", "$rootScope", function (d, c) { return { restrict: "A", compile: function (f, e) { var g = d(e[b], null, !0); return function (b, d) { d.on(a, function (d) { var e = function () { g(b, { $event: d }) }; Yg[a] && c.$$phase ? b.$evalAsync(e) : b.$apply(e) }) } } } }] }); var Pe = ["$animate", "$compile", function (a, b) { return { multiElement: !0, transclude: "element", priority: 600, terminal: !0, restrict: "A", $$tlb: !0, link: function (d, c, f, e, g) { var h, k, l; d.$watch(f.ngIf, function (d) { d ? k || g(function (d, e) { k = e; d[d.length++] = b.$$createComment("end ngIf", f.ngIf); h = { clone: d }; a.enter(d, c.parent(), c) }) : (l && (l.remove(), l = null), k && (k.$destroy(), k = null), h && (l = ub(h.clone), a.leave(l).done(function (a) { !1 !== a && (l = null) }), h = null)) }) } } }], Qe = ["$templateRequest", "$anchorScroll", "$animate", function (a, b, d) { return { restrict: "ECA", priority: 400, terminal: !0, transclude: "element", controller: $.noop, compile: function (c, f) { var e = f.ngInclude || f.src, g = f.onload || "", h = f.autoscroll; return function (c, f, m, n, p) { var q = 0, s, w, u, H = function () { w && (w.remove(), w = null); s && (s.$destroy(), s = null); u && (d.leave(u).done(function (a) { !1 !== a && (w = null) }), w = u, u = null) }; c.$watch(e, function (e) { var m = function (a) { !1 === a || !v(h) || h && !c.$eval(h) || b() }, w = ++q; e ? (a(e, !0).then(function (a) { if (!c.$$destroyed && w === q) { var b = c.$new(); n.template = a; a = p(b, function (a) { H(); d.enter(a, null, f).done(m) }); s = b; u = a; s.$emit("$includeContentLoaded", e); c.$eval(g) } }, function () { c.$$destroyed || w !== q || (H(), c.$emit("$includeContentError", e)) }), c.$emit("$includeContentRequested", e)) : (H(), n.template = null) }) } } } }], gf = ["$compile", function (a) { return { restrict: "ECA", priority: -400, require: "ngInclude", link: function (b, d, c, f) { na.call(d[0]).match(/SVG/) ? (d.empty(), a(Zc(f.template, z.document).childNodes)(b, function (a) { d.append(a) }, { futureParentElement: d })) : (d.html(f.template), a(d.contents())(b)) } } }], Re = Ra({ priority: 450, compile: function () { return { pre: function (a, b, d) { a.$eval(d.ngInit) } } } }), cf = function () { return { restrict: "A", priority: 100, require: "ngModel", link: function (a, b, d, c) { var f = d.ngList || ", ", e = "false" !== d.ngTrim, g = e ? S(f) : f; c.$parsers.push(function (a) { if (!x(a)) { var b = []; a && q(a.split(g), function (a) { a && b.push(e ? S(a) : a) }); return b } }); c.$formatters.push(function (a) { if (C(a)) return a.join(f) }); c.$isEmpty = function (a) { return !a || !a.length } } } }, ob = "ng-valid", Ud = "ng-invalid", Va = "ng-pristine", Rb = "ng-dirty", qb = M("ngModel"); Ob.$inject = "$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" "); Ob.prototype = { $$initGetterSetters: function () { if (this.$options.getOption("getterSetter")) { var a = this.$$parse(this.$$attr.ngModel + "()"), b = this.$$parse(this.$$attr.ngModel + "($$$p)"); this.$$ngModelGet = function (b) { var c = this.$$parsedNgModel(b); y(c) && (c = a(b)); return c }; this.$$ngModelSet = function (a, c) { y(this.$$parsedNgModel(a)) ? b(a, { $$$p: c }) : this.$$parsedNgModelAssign(a, c) } } else if (!this.$$parsedNgModel.assign) throw qb("nonassign", this.$$attr.ngModel, ya(this.$$element)); }, $render: w, $isEmpty: function (a) { return x(a) || "" === a || null === a || a !== a }, $$updateEmptyClasses: function (a) { this.$isEmpty(a) ? (this.$$animate.removeClass(this.$$element, "ng-not-empty"), this.$$animate.addClass(this.$$element, "ng-empty")) : (this.$$animate.removeClass(this.$$element, "ng-empty"), this.$$animate.addClass(this.$$element, "ng-not-empty")) }, $setPristine: function () { this.$dirty = !1; this.$pristine = !0; this.$$animate.removeClass(this.$$element, Rb); this.$$animate.addClass(this.$$element, Va) }, $setDirty: function () { this.$dirty = !0; this.$pristine = !1; this.$$animate.removeClass(this.$$element, Va); this.$$animate.addClass(this.$$element, Rb); this.$$parentForm.$setDirty() }, $setUntouched: function () { this.$touched = !1; this.$untouched = !0; this.$$animate.setClass(this.$$element, "ng-untouched", "ng-touched") }, $setTouched: function () { this.$touched = !0; this.$untouched = !1; this.$$animate.setClass(this.$$element, "ng-touched", "ng-untouched") }, $rollbackViewValue: function () { this.$$timeout.cancel(this.$$pendingDebounce); this.$viewValue = this.$$lastCommittedViewValue; this.$render() }, $validate: function () { if (!ga(this.$modelValue)) { var a = this.$$lastCommittedViewValue, b = this.$$rawModelValue, d = this.$valid, c = this.$modelValue, f = this.$options.getOption("allowInvalid"), e = this; this.$$runValidators(b, a, function (a) { f || d === a || (e.$modelValue = a ? b : void 0, e.$modelValue !== c && e.$$writeModelToScope()) }) } }, $$runValidators: function (a, b, d) { function c() { var c = !0; q(k.$validators, function (d, f) { var g = Boolean(d(a, b)); c = c && g; e(f, g) }); return c ? !0 : (q(k.$asyncValidators, function (a, b) { e(b, null) }), !1) } function f() { var c = [], d = !0; q(k.$asyncValidators, function (f, g) { var h = f(a, b); if (!h || !y(h.then)) throw qb("nopromise", h); e(g, void 0); c.push(h.then(function () { e(g, !0) }, function () { d = !1; e(g, !1) })) }); c.length ? k.$$q.all(c).then(function () { g(d) }, w) : g(!0) } function e(a, b) { h === k.$$currentValidationRunId && k.$setValidity(a, b) } function g(a) { h === k.$$currentValidationRunId && d(a) } this.$$currentValidationRunId++; var h = this.$$currentValidationRunId, k = this; (function () { var a = k.$$parserName || "parse"; if (x(k.$$parserValid)) e(a, null); else return k.$$parserValid || (q(k.$validators, function (a, b) { e(b, null) }), q(k.$asyncValidators, function (a, b) { e(b, null) })), e(a, k.$$parserValid), k.$$parserValid; return !0 })() ? c() ? f() : g(!1) : g(!1) }, $commitViewValue: function () { var a = this.$viewValue; this.$$timeout.cancel(this.$$pendingDebounce); if (this.$$lastCommittedViewValue !== a || "" === a && this.$$hasNativeValidators) this.$$updateEmptyClasses(a), this.$$lastCommittedViewValue = a, this.$pristine && this.$setDirty(), this.$$parseAndValidate() }, $$parseAndValidate: function () { var a = this.$$lastCommittedViewValue, b = this; if (this.$$parserValid = x(a) ? void 0 : !0) for (var d = 0; d < this.$parsers.length; d++) if (a = this.$parsers[d](a), x(a)) { this.$$parserValid = !1; break } ga(this.$modelValue) && (this.$modelValue = this.$$ngModelGet(this.$$scope)); var c = this.$modelValue, f = this.$options.getOption("allowInvalid"); this.$$rawModelValue = a; f && (this.$modelValue = a, b.$modelValue !== c && b.$$writeModelToScope()); this.$$runValidators(a, this.$$lastCommittedViewValue, function (d) { f || (b.$modelValue = d ? a : void 0, b.$modelValue !== c && b.$$writeModelToScope()) }) }, $$writeModelToScope: function () { this.$$ngModelSet(this.$$scope, this.$modelValue); q(this.$viewChangeListeners, function (a) { try { a() } catch (b) { this.$$exceptionHandler(b) } }, this) }, $setViewValue: function (a, b) { this.$viewValue = a; this.$options.getOption("updateOnDefault") && this.$$debounceViewValueCommit(b) }, $$debounceViewValueCommit: function (a) { var b = this.$options.getOption("debounce"); Y(b[a]) ? b = b[a] : Y(b["default"]) && (b = b["default"]); this.$$timeout.cancel(this.$$pendingDebounce); var d = this; 0 < b ? this.$$pendingDebounce = this.$$timeout(function () { d.$commitViewValue() }, b) : this.$$scope.$root.$$phase ? this.$commitViewValue() : this.$$scope.$apply(function () { d.$commitViewValue() }) } }; Vd({ clazz: Ob, set: function (a, b) { a[b] = !0 }, unset: function (a, b) { delete a[b] } }); var bf = ["$rootScope", function (a) { return { restrict: "A", require: ["ngModel", "^?form", "^?ngModelOptions"], controller: Ob, priority: 1, compile: function (b) { b.addClass(Va).addClass("ng-untouched").addClass(ob); return { pre: function (a, b, f, e) { var g = e[0]; b = e[1] || g.$$parentForm; if (e = e[2]) g.$options = e.$options; g.$$initGetterSetters(); b.$addControl(g); f.$observe("name", function (a) { g.$name !== a && g.$$parentForm.$$renameControl(g, a) }); a.$on("$destroy", function () { g.$$parentForm.$removeControl(g) }) }, post: function (b, c, f, e) { function g() { h.$setTouched() } var h = e[0]; if (h.$options.getOption("updateOn")) c.on(h.$options.getOption("updateOn"), function (a) { h.$$debounceViewValueCommit(a && a.type) }); c.on("blur", function () { h.$touched || (a.$$phase ? b.$evalAsync(g) : b.$apply(g)) }) } } } } }], Pb, Zg = /(\s+|^)default(\s+|$)/; Bc.prototype = { getOption: function (a) { return this.$$options[a] }, createChild: function (a) { var b = !1; a = R({}, a); q(a, function (d, c) { "$inherit" === d ? "*" === c ? b = !0 : (a[c] = this.$$options[c], "updateOn" === c && (a.updateOnDefault = this.$$options.updateOnDefault)) : "updateOn" === c && (a.updateOnDefault = !1, a[c] = S(d.replace(Zg, function () { a.updateOnDefault = !0; return " " }))) }, this); b && (delete a["*"], ae(a, this.$$options)); ae(a, Pb.$$options); return new Bc(a) } }; Pb = new Bc({ updateOn: "", updateOnDefault: !0, debounce: 0, getterSetter: !1, allowInvalid: !1, timezone: null }); var ff = function () { function a(a, d) { this.$$attrs = a; this.$$scope = d } a.$inject = ["$attrs", "$scope"]; a.prototype = { $onInit: function () { var a = this.parentCtrl ? this.parentCtrl.$options : Pb, d = this.$$scope.$eval(this.$$attrs.ngModelOptions); this.$options = a.createChild(d) } }; return { restrict: "A", priority: 10, require: { parentCtrl: "?^^ngModelOptions" }, bindToController: !0, controller: a } }, Se = Ra({ terminal: !0, priority: 1E3 }), $g = M("ngOptions"), ah = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/, $e = ["$compile", "$document", "$parse", function (a, b, d) { function c(a, b, c) { function e(a, b, c, d, f) { this.selectValue = a; this.viewValue = b; this.label = c; this.group = d; this.disabled = f } function f(a) { var b; if (!q && ta(a)) b = a; else { b = []; for (var c in a) a.hasOwnProperty(c) && "$" !== c.charAt(0) && b.push(c) } return b } var n = a.match(ah); if (!n) throw $g("iexp", a, ya(b)); var p = n[5] || n[7], q = n[6]; a = / as /.test(n[0]) && n[1]; var s = n[9]; b = d(n[2] ? n[1] : p); var v = a && d(a) || b, u = s && d(s), w = s ? function (a, b) { return u(c, b) } : function (a) { return la(a) }, x = function (a, b) { return w(a, B(a, b)) }, t = d(n[2] || n[1]), z = d(n[3] || ""), A = d(n[4] || ""), K = d(n[8]), I = {}, B = q ? function (a, b) { I[q] = b; I[p] = a; return I } : function (a) { I[p] = a; return I }; return { trackBy: s, getTrackByValue: x, getWatchables: d(K, function (a) { var b = []; a = a || []; for (var d = f(a), e = d.length, g = 0; g < e; g++) { var h = a === d ? g : d[g], l = a[h], h = B(l, h), l = w(l, h); b.push(l); if (n[2] || n[1]) l = t(c, h), b.push(l); n[4] && (h = A(c, h), b.push(h)) } return b }), getOptions: function () { for (var a = [], b = {}, d = K(c) || [], g = f(d), h = g.length, n = 0; n < h; n++) { var p = d === g ? n : g[n], q = B(d[p], p), r = v(c, q), p = w(r, q), u = t(c, q), I = z(c, q), q = A(c, q), r = new e(p, r, u, I, q); a.push(r); b[p] = r } return { items: a, selectValueMap: b, getOptionFromViewValue: function (a) { return b[x(a)] }, getViewValueFromOption: function (a) { return s ? Fa(a.viewValue) : a.viewValue } } } } } var f = z.document.createElement("option"), e = z.document.createElement("optgroup"); return { restrict: "A", terminal: !0, require: ["select", "ngModel"], link: { pre: function (a, b, c, d) { d[0].registerOption = w }, post: function (d, h, k, l) { function m(a) { var b = (a = t.getOptionFromViewValue(a)) && a.element; b && !b.selected && (b.selected = !0); return a } function n(a, b) { a.element = b; b.disabled = a.disabled; a.label !== b.label && (b.label = a.label, b.textContent = a.label); b.value = a.selectValue } function p() { var a = t && r.readValue(); if (t) for (var b = t.items.length - 1; 0 <= b; b--) { var c = t.items[b]; v(c.group) ? Fb(c.element.parentNode) : Fb(c.element) } t = y.getOptions(); var d = {}; z && h.prepend(r.emptyOption); t.items.forEach(function (a) { var b; if (v(a.group)) { b = d[a.group]; b || (b = e.cloneNode(!1), A.appendChild(b), b.label = null === a.group ? "null" : a.group, d[a.group] = b); var c = f.cloneNode(!1) } else b = A, c = f.cloneNode(!1); b.appendChild(c); n(a, c) }); h[0].appendChild(A); s.$render(); s.$isEmpty(a) || (b = r.readValue(), (y.trackBy || w ? qa(a, b) : a === b) || (s.$setViewValue(b), s.$render())) } var r = l[0], s = l[1], w = k.multiple; l = 0; for (var u = h.children(), x = u.length; l < x; l++) if ("" === u[l].value) { r.hasEmptyOption = !0; r.emptyOption = u.eq(l); break } var z = !!r.emptyOption; D(f.cloneNode(!1)).val("?"); var t, y = c(k.ngOptions, h, d), A = b[0].createDocumentFragment(); r.generateUnknownOptionValue = function (a) { return "?" }; w ? (r.writeValue = function (a) { var b = a && a.map(m) || []; t.items.forEach(function (a) { a.element.selected && -1 === Array.prototype.indexOf.call(b, a) && (a.element.selected = !1) }) }, r.readValue = function () { var a = h.val() || [], b = []; q(a, function (a) { (a = t.selectValueMap[a]) && !a.disabled && b.push(t.getViewValueFromOption(a)) }); return b }, y.trackBy && d.$watchCollection(function () { if (C(s.$viewValue)) return s.$viewValue.map(function (a) { return y.getTrackByValue(a) }) }, function () { s.$render() })) : (r.writeValue = function (a) { var b = t.selectValueMap[h.val()], c = t.getOptionFromViewValue(a); b && b.element.removeAttribute("selected"); c ? (h[0].value !== c.selectValue && (r.removeUnknownOption(), r.unselectEmptyOption(), h[0].value = c.selectValue, c.element.selected = !0), c.element.setAttribute("selected", "selected")) : z ? r.selectEmptyOption() : r.unknownOption.parent().length ? r.updateUnknownOption(a) : r.renderUnknownOption(a) }, r.readValue = function () { var a = t.selectValueMap[h.val()]; return a && !a.disabled ? (r.unselectEmptyOption(), r.removeUnknownOption(), t.getViewValueFromOption(a)) : null }, y.trackBy && d.$watch(function () { return y.getTrackByValue(s.$viewValue) }, function () { s.$render() })); z && (r.emptyOption.remove(), a(r.emptyOption)(d), 8 === r.emptyOption[0].nodeType ? (r.hasEmptyOption = !1, r.registerOption = function (a, b) { "" === b.val() && (r.hasEmptyOption = !0, r.emptyOption = b, r.emptyOption.removeClass("ng-scope"), s.$render(), b.on("$destroy", function () { r.hasEmptyOption = !1; r.emptyOption = void 0 })) }) : r.emptyOption.removeClass("ng-scope")); h.empty(); p(); d.$watchCollection(y.getWatchables, p) } } } }], Te = ["$locale", "$interpolate", "$log", function (a, b, d) { var c = /{}/g, f = /^when(Minus)?(.+)$/; return { link: function (e, g, h) { function k(a) { g.text(a || "") } var l = h.count, m = h.$attr.when && g.attr(h.$attr.when), n = h.offset || 0, p = e.$eval(m) || {}, r = {}, s = b.startSymbol(), v = b.endSymbol(), u = s + l + "-" + n + v, H = $.noop, y; q(h, function (a, b) { var c = f.exec(b); c && (c = (c[1] ? "-" : "") + P(c[2]), p[c] = g.attr(h.$attr[b])) }); q(p, function (a, d) { r[d] = b(a.replace(c, u)) }); e.$watch(l, function (b) { var c = parseFloat(b), f = ga(c); f || c in p || (c = a.pluralCat(c - n)); c === y || f && ga(y) || (H(), f = r[c], x(f) ? (null != b && d.debug("ngPluralize: no rule defined for '" + c + "' in " + m), H = w, k()) : H = e.$watch(f, k), y = c) }) } } }], Ue = ["$parse", "$animate", "$compile", function (a, b, d) { var c = M("ngRepeat"), f = function (a, b, c, d, f, m, n) { a[c] = d; f && (a[f] = m); a.$index = b; a.$first = 0 === b; a.$last = b === n - 1; a.$middle = !(a.$first || a.$last); a.$odd = !(a.$even = 0 === (b & 1)) }; return { restrict: "A", multiElement: !0, transclude: "element", priority: 1E3, terminal: !0, $$tlb: !0, compile: function (e, g) { var h = g.ngRepeat, k = d.$$createComment("end ngRepeat", h), l = h.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/); if (!l) throw c("iexp", h); var m = l[1], n = l[2], p = l[3], r = l[4], l = m.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/); if (!l) throw c("iidexp", m); var s = l[3] || l[1], v = l[2]; if (p && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(p) || /^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(p))) throw c("badident", p); var u, w, x, t, y = { $id: la }; r ? u = a(r) : (x = function (a, b) { return la(b) }, t = function (a) { return a }); return function (a, d, e, g, l) { u && (w = function (b, c, d) { v && (y[v] = b); y[s] = c; y.$index = d; return u(a, y) }); var m = W(); a.$watchCollection(n, function (e) { var g, n, r = d[0], u, y = W(), z, D, E, B, F, C, I; p && (a[p] = e); if (ta(e)) F = e, n = w || x; else for (I in n = w || t, F = [], e) va.call(e, I) && "$" !== I.charAt(0) && F.push(I); z = F.length; I = Array(z); for (g = 0; g < z; g++) if (D = e === F ? g : F[g], E = e[D], B = n(D, E, g), m[B]) C = m[B], delete m[B], y[B] = C, I[g] = C; else { if (y[B]) throw q(I, function (a) { a && a.scope && (m[a.id] = a) }), c("dupes", h, B, E); I[g] = { id: B, scope: void 0, clone: void 0 }; y[B] = !0 } for (u in m) { C = m[u]; B = ub(C.clone); b.leave(B); if (B[0].parentNode) for (g = 0, n = B.length; g < n; g++) B[g].$$NG_REMOVED = !0; C.scope.$destroy() } for (g = 0; g < z; g++) if (D = e === F ? g : F[g], E = e[D], C = I[g], C.scope) { u = r; do u = u.nextSibling; while (u && u.$$NG_REMOVED); C.clone[0] !== u && b.move(ub(C.clone), null, r); r = C.clone[C.clone.length - 1]; f(C.scope, g, s, E, v, D, z) } else l(function (a, c) { C.scope = c; var d = k.cloneNode(!1); a[a.length++] = d; b.enter(a, null, r); r = d; C.clone = a; y[C.id] = C; f(C.scope, g, s, E, v, D, z) }); m = y }) } } } }], Ve = ["$animate", function (a) { return { restrict: "A", multiElement: !0, link: function (b, d, c) { b.$watch(c.ngShow, function (b) { a[b ? "removeClass" : "addClass"](d, "ng-hide", { tempClasses: "ng-hide-animate" }) }) } } }], Oe = ["$animate", function (a) { return { restrict: "A", multiElement: !0, link: function (b, d, c) { b.$watch(c.ngHide, function (b) { a[b ? "addClass" : "removeClass"](d, "ng-hide", { tempClasses: "ng-hide-animate" }) }) } } }], We = Ra(function (a, b, d) { a.$watch(d.ngStyle, function (a, d) { d && a !== d && q(d, function (a, c) { b.css(c, "") }); a && b.css(a) }, !0) }), Xe = ["$animate", "$compile", function (a, b) { return { require: "ngSwitch", controller: ["$scope", function () { this.cases = {} }], link: function (d, c, f, e) { var g = [], h = [], k = [], l = [], m = function (a, b) { return function (c) { !1 !== c && a.splice(b, 1) } }; d.$watch(f.ngSwitch || f.on, function (c) { for (var d, f; k.length;) a.cancel(k.pop()); d = 0; for (f = l.length; d < f; ++d) { var s = ub(h[d].clone); l[d].$destroy(); (k[d] = a.leave(s)).done(m(k, d)) } h.length = 0; l.length = 0; (g = e.cases["!" + c] || e.cases["?"]) && q(g, function (c) { c.transclude(function (d, e) { l.push(e); var f = c.element; d[d.length++] = b.$$createComment("end ngSwitchWhen"); h.push({ clone: d }); a.enter(d, f.parent(), f) }) }) }) } } }], Ye = Ra({ transclude: "element", priority: 1200, require: "^ngSwitch", multiElement: !0, link: function (a, b, d, c, f) { a = d.ngSwitchWhen.split(d.ngSwitchWhenSeparator).sort().filter(function (a, b, c) { return c[b - 1] !== a }); q(a, function (a) { c.cases["!" + a] = c.cases["!" + a] || []; c.cases["!" + a].push({ transclude: f, element: b }) }) } }), Ze = Ra({ transclude: "element", priority: 1200, require: "^ngSwitch", multiElement: !0, link: function (a, b, d, c, f) { c.cases["?"] = c.cases["?"] || []; c.cases["?"].push({ transclude: f, element: b }) } }), bh = M("ngTransclude"), af = ["$compile", function (a) { return { restrict: "EAC", terminal: !0, compile: function (b) { var d = a(b.contents()); b.empty(); return function (a, b, e, g, h) { function k() { d(a, function (a) { b.append(a) }) } if (!h) throw bh("orphan", ya(b)); e.ngTransclude === e.$attr.ngTransclude && (e.ngTransclude = ""); e = e.ngTransclude || e.ngTranscludeSlot; h(function (a, c) { var d; if (d = a.length) a: { d = 0; for (var e = a.length; d < e; d++) { var g = a[d]; if (g.nodeType !== Ja || g.nodeValue.trim()) { d = !0; break a } } d = void 0 } d ? b.append(a) : (k(), c.$destroy()) }, null, e); e && !h.isSlotFilled(e) && k() } } } }], Ce = ["$templateCache", function (a) { return { restrict: "E", terminal: !0, compile: function (b, d) { "text/ng-template" === d.type && a.put(d.id, b[0].text) } } }], ch = { $setViewValue: w, $render: w }, dh = ["$element", "$scope", function (a, b) { function d() { h || (h = !0, b.$$postDigest(function () { h = !1; e.ngModelCtrl.$render() })) } function c(a) { k || (k = !0, b.$$postDigest(function () { b.$$destroyed || (k = !1, e.ngModelCtrl.$setViewValue(e.readValue()), a && e.ngModelCtrl.$render()) })) } function f(a) { a.prop("selected", !0); a.attr("selected", !0) } var e = this, g = new Qa; e.selectValueMap = {}; e.ngModelCtrl = ch; e.multiple = !1; e.unknownOption = D(z.document.createElement("option")); e.hasEmptyOption = !1; e.emptyOption = void 0; e.renderUnknownOption = function (b) { b = e.generateUnknownOptionValue(b); e.unknownOption.val(b); a.prepend(e.unknownOption); f(e.unknownOption); a.val(b) }; e.updateUnknownOption = function (b) { b = e.generateUnknownOptionValue(b); e.unknownOption.val(b); f(e.unknownOption); a.val(b) }; e.generateUnknownOptionValue = function (a) { return "? " + la(a) + " ?" }; e.removeUnknownOption = function () { e.unknownOption.parent() && e.unknownOption.remove() }; e.selectEmptyOption = function () { e.emptyOption && (a.val(""), f(e.emptyOption)) }; e.unselectEmptyOption = function () { e.hasEmptyOption && e.emptyOption.removeAttr("selected") }; b.$on("$destroy", function () { e.renderUnknownOption = w }); e.readValue = function () { var b = a.val(), b = b in e.selectValueMap ? e.selectValueMap[b] : b; return e.hasOption(b) ? b : null }; e.writeValue = function (b) { var c = a[0].options[a[0].selectedIndex]; c && c.removeAttribute("selected"); e.hasOption(b) ? (e.removeUnknownOption(), c = la(b), a.val(c in e.selectValueMap ? c : b), f(D(a[0].options[a[0].selectedIndex]))) : null == b && e.emptyOption ? (e.removeUnknownOption(), e.selectEmptyOption()) : e.unknownOption.parent().length ? e.updateUnknownOption(b) : e.renderUnknownOption(b) }; e.addOption = function (a, b) { if (8 !== b[0].nodeType) { Pa(a, '"option value"'); "" === a && (e.hasEmptyOption = !0, e.emptyOption = b); var c = g.get(a) || 0; g.put(a, c + 1); d() } }; e.removeOption = function (a) { var b = g.get(a); b && (1 === b ? (g.remove(a), "" === a && (e.hasEmptyOption = !1, e.emptyOption = void 0)) : g.put(a, b - 1)) }; e.hasOption = function (a) { return !!g.get(a) }; var h = !1, k = !1; e.registerOption = function (a, b, d, f, g) { if (d.$attr.ngValue) { var h, k = NaN; d.$observe("value", function (a) { var d, f = b.prop("selected"); v(k) && (e.removeOption(h), delete e.selectValueMap[k], d = !0); k = la(a); h = a; e.selectValueMap[k] = a; e.addOption(a, b); b.attr("value", k); d && f && c() }) } else f ? d.$observe("value", function (a) { e.readValue(); var d, f = b.prop("selected"); v(h) && (e.removeOption(h), d = !0); h = a; e.addOption(a, b); d && f && c() }) : g ? a.$watch(g, function (a, f) { d.$set("value", a); var g = b.prop("selected"); f !== a && e.removeOption(f); e.addOption(a, b); f && g && c() }) : e.addOption(d.value, b); d.$observe("disabled", function (a) { if ("true" === a || a && b.prop("selected")) e.multiple ? c(!0) : (e.ngModelCtrl.$setViewValue(null), e.ngModelCtrl.$render()) }); b.on("$destroy", function () { var a = e.readValue(), b = d.value; e.removeOption(b); e.ngModelCtrl.$render(); (e.multiple && a && -1 !== a.indexOf(b) || a === b) && c(!0) }) } }], De = function () { return { restrict: "E", require: ["select", "?ngModel"], controller: dh, priority: 1, link: { pre: function (a, b, d, c) { var f = c[0], e = c[1]; if (e) { if (f.ngModelCtrl = e, b.on("change", function () { f.removeUnknownOption(); a.$apply(function () { e.$setViewValue(f.readValue()) }) }), d.multiple) { f.multiple = !0; f.readValue = function () { var a = []; q(b.find("option"), function (b) { b.selected && !b.disabled && (b = b.value, a.push(b in f.selectValueMap ? f.selectValueMap[b] : b)) }); return a }; f.writeValue = function (a) { var c = new Qa(a); q(b.find("option"), function (a) { a.selected = v(c.get(a.value)) || v(c.get(f.selectValueMap[a.value])) }) }; var g, h = NaN; a.$watch(function () { h !== e.$viewValue || qa(g, e.$viewValue) || (g = ra(e.$viewValue), e.$render()); h = e.$viewValue }); e.$isEmpty = function (a) { return !a || 0 === a.length } } } else f.registerOption = w }, post: function (a, b, d, c) { var f = c[1]; if (f) { var e = c[0]; f.$render = function () { e.writeValue(f.$viewValue) } } } } } }, Ee = ["$interpolate", function (a) { return { restrict: "E", priority: 100, compile: function (b, d) { var c, f; v(d.ngValue) || (v(d.value) ? c = a(d.value, !0) : (f = a(b.text(), !0)) || d.$set("value", b.text())); return function (a, b, d) { var k = b.parent(); (k = k.data("$selectController") || k.parent().data("$selectController")) && k.registerOption(a, b, d, c, f) } } } }], Tc = function () { return { restrict: "A", require: "?ngModel", link: function (a, b, d, c) { c && (d.required = !0, c.$validators.required = function (a, b) { return !d.required || !c.$isEmpty(b) }, d.$observe("required", function () { c.$validate() })) } } }, Sc = function () { return { restrict: "A", require: "?ngModel", link: function (a, b, d, c) { if (c) { var f, e = d.ngPattern || d.pattern; d.$observe("pattern", function (a) { E(a) && 0 < a.length && (a = new RegExp("^" + a + "$")); if (a && !a.test) throw M("ngPattern")("noregexp", e, a, ya(b)); f = a || void 0; c.$validate() }); c.$validators.pattern = function (a, b) { return c.$isEmpty(b) || x(f) || f.test(b) } } } } }, Vc = function () { return { restrict: "A", require: "?ngModel", link: function (a, b, d, c) { if (c) { var f = -1; d.$observe("maxlength", function (a) { a = Z(a); f = ga(a) ? -1 : a; c.$validate() }); c.$validators.maxlength = function (a, b) { return 0 > f || c.$isEmpty(b) || b.length <= f } } } } }, Uc = function () { return { restrict: "A", require: "?ngModel", link: function (a, b, d, c) { if (c) { var f = 0; d.$observe("minlength", function (a) { f = Z(a) || 0; c.$validate() }); c.$validators.minlength = function (a, b) { return c.$isEmpty(b) || b.length >= f } } } } }; z.angular.bootstrap ? z.console && console.log("WARNING: Tried to load angular more than once.") : (ue(), xe($), $.module("ngLocale", [], ["$provide", function (a) { function b(a) { a += ""; var b = a.indexOf("."); return -1 == b ? 0 : a.length - b - 1 } a.value("$locale", { DATETIME_FORMATS: { AMPMS: ["AM", "PM"], DAY: "Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "), ERANAMES: ["Before Christ", "Anno Domini"], ERAS: ["BC", "AD"], FIRSTDAYOFWEEK: 6, MONTH: "January February March April May June July August September October November December".split(" "), SHORTDAY: "Sun Mon Tue Wed Thu Fri Sat".split(" "), SHORTMONTH: "Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "), STANDALONEMONTH: "January February March April May June July August September October November December".split(" "), WEEKENDRANGE: [5, 6], fullDate: "EEEE, MMMM d, y", longDate: "MMMM d, y", medium: "MMM d, y h:mm:ss a", mediumDate: "MMM d, y", mediumTime: "h:mm:ss a", "short": "M/d/yy h:mm a", shortDate: "M/d/yy", shortTime: "h:mm a" }, NUMBER_FORMATS: { CURRENCY_SYM: "$", DECIMAL_SEP: ".", GROUP_SEP: ",", PATTERNS: [{ gSize: 3, lgSize: 3, maxFrac: 3, minFrac: 0, minInt: 1, negPre: "-", negSuf: "", posPre: "", posSuf: "" }, { gSize: 3, lgSize: 3, maxFrac: 2, minFrac: 2, minInt: 1, negPre: "-\u00a4", negSuf: "", posPre: "\u00a4", posSuf: "" }] }, id: "en-us", localeID: "en_US", pluralCat: function (a, c) { var f = a | 0, e = c; void 0 === e && (e = Math.min(b(a), 3)); Math.pow(10, e); return 1 == f && 0 == e ? "one" : "other" } }) }]), D(function () { pe(z.document, Mc) })) })(window); !window.angular.$$csp().noInlineStyle && window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'); //# sourceMappingURL=angular.min.js.map
exports.config = { capabilities: { 'browserName': 'chrome', 'chromeOptions': { args: ['--disable-web-security'] } }, baseUrl: 'http://localhost:8100', specs: [ 'e2e-tests/**/*.tests.js' ], jasmineNodeOpts: { isVerbose: true, } };
import Draft from './Draft'; export default Draft;
/*!----------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Version: 0.5.3(793ede49d53dba79d39e52205f16321278f5183c) * Released under the MIT license * https://github.com/Microsoft/vscode/blob/master/LICENSE.txt *-----------------------------------------------------------*/ (function() { var __m = ["exports","require","vs/languages/razor/common/razorTokenTypes","vs/languages/razor/common/vsxmlTokenTypes","vs/languages/razor/common/vsxml","vs/base/common/objects","vs/editor/common/modes/abstractMode","vs/editor/common/modes/abstractState","vs/languages/razor/common/csharpTokenization","vs/languages/html/common/html","vs/base/common/errors","vs/languages/razor/common/razor","vs/editor/common/modes","vs/platform/instantiation/common/instantiation","vs/editor/common/services/modeService","vs/editor/common/modes/languageConfigurationRegistry","vs/base/common/async","vs/editor/common/services/compatWorkerService"]; var __M = function(deps) { var result = []; for (var i = 0, len = deps.length; i < len; i++) { result[i] = __m[deps[i]]; } return result; }; define(__m[2], __M([1,0]), function (require, exports) { /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; exports.EMBED_CS = 'support.function.cshtml'; }); define(__m[3], __M([1,0]), function (require, exports) { /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; exports.TOKEN_VALUE = 'support.property-value.constant.other.json'; exports.TOKEN_KEY = 'support.type.property-name.json'; }); /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ /* In order to use VSXML in your own modes, you need to have an IState * which implements IVSXMLWrapperState. Upon a START token such as '///', * the wrapper state can return a new VSXMLEmbeddedState as the nextState in * the tokenization result. */ var __extends = (this && this.__extends) || function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; function __() { this.constructor = d; } d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); }; define(__m[4], __M([1,0,5,10,7,3]), function (require, exports, objects, errors, abstractState_1, vsxmlTokenTypes) { 'use strict'; var separators = '<>"=/'; var whitespace = '\t '; var isEntity = objects.createKeywordMatcher(['summary', 'reference', 'returns', 'param', 'loc']); var isAttribute = objects.createKeywordMatcher(['type', 'path', 'name', 'locid', 'filename', 'format', 'optional']); var isSeparator = objects.createKeywordMatcher(separators.split('')); var EmbeddedState = (function (_super) { __extends(EmbeddedState, _super); function EmbeddedState(mode, state, parentState) { _super.call(this, mode); this.state = state; this.parentState = parentState; } EmbeddedState.prototype.getParentState = function () { return this.parentState; }; EmbeddedState.prototype.makeClone = function () { return new EmbeddedState(this.getMode(), abstractState_1.AbstractState.safeClone(this.state), abstractState_1.AbstractState.safeClone(this.parentState)); }; EmbeddedState.prototype.equals = function (other) { if (other instanceof EmbeddedState) { return (_super.prototype.equals.call(this, other) && abstractState_1.AbstractState.safeEquals(this.state, other.state) && abstractState_1.AbstractState.safeEquals(this.parentState, other.parentState)); } return false; }; EmbeddedState.prototype.setState = function (nextState) { this.state = nextState; }; EmbeddedState.prototype.postTokenize = function (result, stream) { return result; }; EmbeddedState.prototype.tokenize = function (stream) { var result = this.state.tokenize(stream); if (result.nextState !== undefined) { this.setState(result.nextState); } result.nextState = this; return this.postTokenize(result, stream); }; return EmbeddedState; }(abstractState_1.AbstractState)); exports.EmbeddedState = EmbeddedState; var VSXMLEmbeddedState = (function (_super) { __extends(VSXMLEmbeddedState, _super); function VSXMLEmbeddedState(mode, state, parentState) { _super.call(this, mode, state, parentState); } VSXMLEmbeddedState.prototype.equals = function (other) { if (other instanceof VSXMLEmbeddedState) { return (_super.prototype.equals.call(this, other)); } return false; }; VSXMLEmbeddedState.prototype.setState = function (nextState) { _super.prototype.setState.call(this, nextState); this.getParentState().setVSXMLState(nextState); }; VSXMLEmbeddedState.prototype.postTokenize = function (result, stream) { if (stream.eos()) { result.nextState = this.getParentState(); } return result; }; return VSXMLEmbeddedState; }(EmbeddedState)); exports.VSXMLEmbeddedState = VSXMLEmbeddedState; var VSXMLState = (function (_super) { __extends(VSXMLState, _super); function VSXMLState(mode, name, parent, whitespaceTokenType) { if (whitespaceTokenType === void 0) { whitespaceTokenType = ''; } _super.call(this, mode); this.name = name; this.parent = parent; this.whitespaceTokenType = whitespaceTokenType; } VSXMLState.prototype.equals = function (other) { if (other instanceof VSXMLState) { return (_super.prototype.equals.call(this, other) && this.whitespaceTokenType === other.whitespaceTokenType && this.name === other.name && abstractState_1.AbstractState.safeEquals(this.parent, other.parent)); } return false; }; VSXMLState.prototype.tokenize = function (stream) { stream.setTokenRules(separators, whitespace); if (stream.skipWhitespace().length > 0) { return { type: this.whitespaceTokenType }; } return this.stateTokenize(stream); }; VSXMLState.prototype.stateTokenize = function (stream) { throw errors.notImplemented(); }; return VSXMLState; }(abstractState_1.AbstractState)); exports.VSXMLState = VSXMLState; var VSXMLString = (function (_super) { __extends(VSXMLString, _super); function VSXMLString(mode, parent) { _super.call(this, mode, 'string', parent, vsxmlTokenTypes.TOKEN_VALUE); } VSXMLString.prototype.makeClone = function () { return new VSXMLString(this.getMode(), this.parent ? this.parent.clone() : null); }; VSXMLString.prototype.equals = function (other) { if (other instanceof VSXMLString) { return (_super.prototype.equals.call(this, other)); } return false; }; VSXMLString.prototype.stateTokenize = function (stream) { while (!stream.eos()) { var token = stream.nextToken(); if (token === '"') { return { type: vsxmlTokenTypes.TOKEN_VALUE, nextState: this.parent }; } } return { type: vsxmlTokenTypes.TOKEN_VALUE, nextState: this.parent }; }; return VSXMLString; }(VSXMLState)); exports.VSXMLString = VSXMLString; var VSXMLTag = (function (_super) { __extends(VSXMLTag, _super); function VSXMLTag(mode, parent) { _super.call(this, mode, 'expression', parent, 'vs'); } VSXMLTag.prototype.makeClone = function () { return new VSXMLTag(this.getMode(), this.parent ? this.parent.clone() : null); }; VSXMLTag.prototype.equals = function (other) { if (other instanceof VSXMLTag) { return (_super.prototype.equals.call(this, other)); } return false; }; VSXMLTag.prototype.stateTokenize = function (stream) { var token = stream.nextToken(); var tokenType = this.whitespaceTokenType; if (token === '>') { return { type: 'punctuation.vs', nextState: this.parent }; } else if (token === '"') { return { type: vsxmlTokenTypes.TOKEN_VALUE, nextState: new VSXMLString(this.getMode(), this) }; } else if (isEntity(token)) { tokenType = 'tag.vs'; } else if (isAttribute(token)) { tokenType = vsxmlTokenTypes.TOKEN_KEY; } else if (isSeparator(token)) { tokenType = 'punctuation.vs'; } return { type: tokenType, nextState: this }; }; return VSXMLTag; }(VSXMLState)); exports.VSXMLTag = VSXMLTag; var VSXMLExpression = (function (_super) { __extends(VSXMLExpression, _super); function VSXMLExpression(mode, parent) { _super.call(this, mode, 'expression', parent, 'vs'); } VSXMLExpression.prototype.makeClone = function () { return new VSXMLExpression(this.getMode(), this.parent ? this.parent.clone() : null); }; VSXMLExpression.prototype.equals = function (other) { if (other instanceof VSXMLExpression) { return (_super.prototype.equals.call(this, other)); } return false; }; VSXMLExpression.prototype.stateTokenize = function (stream) { var token = stream.nextToken(); if (token === '<') { return { type: 'punctuation.vs', nextState: new VSXMLTag(this.getMode(), this) }; } return { type: this.whitespaceTokenType, nextState: this }; }; return VSXMLExpression; }(VSXMLState)); exports.VSXMLExpression = VSXMLExpression; }); define(__m[8], __M([1,0,5,9,4,7,6,2]), function (require, exports, objects, htmlMode, VSXML, abstractState_1, abstractMode_1, razorTokenTypes) { /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; var htmlTokenTypes = htmlMode.htmlTokenTypes; var punctuations = '+-*%&|^~!=<>/?;:.,'; var separators = '+-*/%&|^~!=<>(){}[]\"\'\\/?;:.,'; var whitespace = '\t '; var brackets = (function () { var bracketsSource = [ { tokenType: 'punctuation.bracket.cs', open: '{', close: '}' }, { tokenType: 'punctuation.array.cs', open: '[', close: ']' }, { tokenType: 'punctuation.parenthesis.cs', open: '(', close: ')' } ]; var MAP = Object.create(null); for (var i = 0; i < bracketsSource.length; i++) { var bracket = bracketsSource[i]; MAP[bracket.open] = { tokenType: bracket.tokenType, }; MAP[bracket.close] = { tokenType: bracket.tokenType, }; } return { stringIsBracket: function (text) { return !!MAP[text]; }, tokenTypeFromString: function (text) { return MAP[text].tokenType; } }; })(); var isKeyword = objects.createKeywordMatcher([ 'abstract', 'as', 'async', 'await', 'base', 'bool', 'break', 'by', 'byte', 'case', 'catch', 'char', 'checked', 'class', 'const', 'continue', 'decimal', 'default', 'delegate', 'do', 'double', 'descending', 'explicit', 'event', 'extern', 'else', 'enum', 'false', 'finally', 'fixed', 'float', 'for', 'foreach', 'from', 'goto', 'group', 'if', 'implicit', 'in', 'int', 'interface', 'internal', 'into', 'is', 'lock', 'long', 'nameof', 'new', 'null', 'namespace', 'object', 'operator', 'out', 'override', 'orderby', 'params', 'private', 'protected', 'public', 'readonly', 'ref', 'return', 'switch', 'struct', 'sbyte', 'sealed', 'short', 'sizeof', 'stackalloc', 'static', 'string', 'select', 'this', 'throw', 'true', 'try', 'typeof', 'uint', 'ulong', 'unchecked', 'unsafe', 'ushort', 'using', 'var', 'virtual', 'volatile', 'void', 'when', 'while', 'where', 'yield', 'model', 'inject' // Razor specific ]); var ispunctuation = function (character) { return punctuations.indexOf(character) > -1; }; var CSState = (function (_super) { __extends(CSState, _super); function CSState(mode, name, parent) { _super.call(this, mode); this.name = name; this.parent = parent; } CSState.prototype.equals = function (other) { if (!_super.prototype.equals.call(this, other)) { return false; } var otherCSState = other; return (other instanceof CSState) && (this.getMode() === otherCSState.getMode()) && (this.name === otherCSState.name) && ((this.parent === null && otherCSState.parent === null) || (this.parent !== null && this.parent.equals(otherCSState.parent))); }; CSState.prototype.tokenize = function (stream) { stream.setTokenRules(separators, whitespace); if (stream.skipWhitespace().length > 0) { return { type: '' }; } return this.stateTokenize(stream); }; CSState.prototype.stateTokenize = function (stream) { throw new Error('To be implemented'); }; return CSState; }(abstractState_1.AbstractState)); exports.CSState = CSState; var CSString = (function (_super) { __extends(CSString, _super); function CSString(mode, parent, punctuation) { _super.call(this, mode, 'string', parent); this.isAtBeginning = true; this.punctuation = punctuation; } CSString.prototype.makeClone = function () { return new CSString(this.getMode(), this.parent ? this.parent.clone() : null, this.punctuation); }; CSString.prototype.equals = function (other) { return _super.prototype.equals.call(this, other) && this.punctuation === other.punctuation; }; CSString.prototype.tokenize = function (stream) { var readChars = this.isAtBeginning ? 1 : 0; this.isAtBeginning = false; while (!stream.eos()) { var c = stream.next(); if (c === '\\') { if (readChars === 0) { if (stream.eos()) { return { type: 'string.escape.cs' }; } else { stream.next(); if (stream.eos()) { return { type: 'string.escape.cs', nextState: this.parent }; } else { return { type: 'string.escape.cs' }; } } } else { stream.goBack(1); return { type: 'string.cs' }; } } else if (c === this.punctuation) { break; } readChars += 1; } return { type: 'string.cs', nextState: this.parent }; }; return CSString; }(CSState)); var CSVerbatimString = (function (_super) { __extends(CSVerbatimString, _super); function CSVerbatimString(mode, parent) { _super.call(this, mode, 'verbatimstring', parent); } CSVerbatimString.prototype.makeClone = function () { return new CSVerbatimString(this.getMode(), this.parent ? this.parent.clone() : null); }; CSVerbatimString.prototype.tokenize = function (stream) { while (!stream.eos()) { var token = stream.next(); if (token === '"') { if (!stream.eos() && stream.peek() === '"') { stream.next(); } else { return { type: 'string.cs', nextState: this.parent }; } } } return { type: 'string.cs' }; }; return CSVerbatimString; }(CSState)); var CSNumber = (function (_super) { __extends(CSNumber, _super); function CSNumber(mode, parent, firstDigit) { _super.call(this, mode, 'number', parent); this.firstDigit = firstDigit; } CSNumber.prototype.makeClone = function () { return new CSNumber(this.getMode(), this.parent ? this.parent.clone() : null, this.firstDigit); }; CSNumber.prototype.tokenize = function (stream) { var character = this.firstDigit; var base = 10, isDecimal = false, isExponent = false; if (character === '0' && !stream.eos()) { character = stream.peek(); if (character === 'x') { base = 16; } else if (character === '.') { base = 10; } else { return { type: 'number.cs', nextState: this.parent }; } stream.next(); } while (!stream.eos()) { character = stream.peek(); if (abstractMode_1.isDigit(character, base)) { stream.next(); } else if (base === 10) { if (character === '.' && !isExponent && !isDecimal) { isDecimal = true; stream.next(); } else if (character.toLowerCase() === 'e' && !isExponent) { isExponent = true; stream.next(); if (!stream.eos() && stream.peek() === '-') { stream.next(); } } else if (character.toLowerCase() === 'f' || character.toLowerCase() === 'd') { stream.next(); break; } else { break; } } else { break; } } var tokenType = 'number'; if (base === 16) { tokenType += '.hex'; } return { type: tokenType + '.cs', nextState: this.parent }; }; return CSNumber; }(CSState)); // the multi line comment var CSComment = (function (_super) { __extends(CSComment, _super); function CSComment(mode, parent, commentChar) { _super.call(this, mode, 'comment', parent); this.commentChar = commentChar; } CSComment.prototype.makeClone = function () { return new CSComment(this.getMode(), this.parent ? this.parent.clone() : null, this.commentChar); }; CSComment.prototype.tokenize = function (stream) { while (!stream.eos()) { var token = stream.next(); if (token === '*' && !stream.eos() && !stream.peekWhitespace() && stream.peek() === this.commentChar) { stream.next(); return { type: 'comment.cs', nextState: this.parent }; } } return { type: 'comment.cs' }; }; return CSComment; }(CSState)); exports.CSComment = CSComment; var CSStatement = (function (_super) { __extends(CSStatement, _super); function CSStatement(mode, parent, level, plevel, razorMode, expression, firstToken, firstTokenWasKeyword) { _super.call(this, mode, 'expression', parent); this.level = level; this.plevel = plevel; this.razorMode = razorMode; this.expression = expression; this.vsState = new VSXML.VSXMLExpression(mode, null); this.firstToken = firstToken; this.firstTokenWasKeyword = firstTokenWasKeyword; } CSStatement.prototype.setVSXMLState = function (newVSState) { this.vsState = newVSState; }; CSStatement.prototype.makeClone = function () { var st = new CSStatement(this.getMode(), this.parent ? this.parent.clone() : null, this.level, this.plevel, this.razorMode, this.expression, this.firstToken, this.firstTokenWasKeyword); if (this.vsState !== null) { st.setVSXMLState(this.vsState.clone()); } return st; }; CSStatement.prototype.equals = function (other) { return _super.prototype.equals.call(this, other) && (other instanceof CSStatement) && ((this.vsState === null && other.vsState === null) || (this.vsState !== null && this.vsState.equals(other.vsState))); }; CSStatement.prototype.stateTokenize = function (stream) { if (abstractMode_1.isDigit(stream.peek(), 10)) { this.firstToken = false; return { nextState: new CSNumber(this.getMode(), this, stream.next()) }; } var token = stream.nextToken(); var acceptNestedModes = !this.firstTokenWasKeyword; var nextStateAtEnd = (this.level <= 0 && this.plevel <= 0 && stream.eos() ? this.parent : undefined); if (stream.eos()) { this.firstTokenWasKeyword = false; // Set this for the state starting on the next line. } if (isKeyword(token)) { if (this.level <= 0) { this.expression = false; } if (this.firstToken) { this.firstTokenWasKeyword = true; } return { type: 'keyword.cs' }; } this.firstToken = false; if (this.razorMode && token === '<' && acceptNestedModes) { if (!stream.eos() && /[_:!\/\w]/.test(stream.peek())) { return { nextState: new CSSimpleHTML(this.getMode(), this, htmlMode.States.Content) }; } } // exit expressions on anything that doesn't look like part of the same expression if (this.razorMode && this.expression && this.level <= 0 && this.plevel <= 0 && !stream.eos()) { if (!/^(\.|\[|\(|\{\w+)$/.test(stream.peekToken())) { nextStateAtEnd = this.parent; } } if (token === '/') { if (!stream.eos() && !stream.peekWhitespace()) { switch (stream.peekToken()) { case '/': stream.nextToken(); if (!stream.eos() && stream.peekToken() === '/') { stream.nextToken(); if (stream.eos()) { return { type: 'comment.vs' }; } if (stream.peekToken() !== '/') { return { type: 'comment.vs', nextState: new VSXML.VSXMLEmbeddedState(this.getMode(), this.vsState, this) }; } } stream.advanceToEOS(); return { type: 'comment.cs' }; case '*': stream.nextToken(); return { nextState: new CSComment(this.getMode(), this, '/') }; } } return { type: 'punctuation.cs', nextState: nextStateAtEnd }; } if (token === '@') { if (!stream.eos()) { switch (stream.peekToken()) { case '"': stream.nextToken(); return { nextState: new CSVerbatimString(this.getMode(), this) }; case '*': stream.nextToken(); return { nextState: new CSComment(this.getMode(), this, '@') }; } } } if (/@?\w+/.test(token)) { return { type: 'ident.cs', nextState: nextStateAtEnd }; } if (token === '"' || token === '\'') { return { nextState: new CSString(this.getMode(), this, token) }; } if (brackets.stringIsBracket(token)) { var tr = { type: brackets.tokenTypeFromString(token), nextState: nextStateAtEnd }; if (this.razorMode) { if (token === '{') { this.expression = false; // whenever we enter a block, we exit expression mode this.level++; if (this.level === 1) { tr.type = razorTokenTypes.EMBED_CS; tr.nextState = undefined; } } if (token === '}') { this.level--; if (this.level <= 0) { tr.type = razorTokenTypes.EMBED_CS; tr.nextState = this.parent; } } if (this.expression) { if (token === '(') { this.plevel++; if (this.plevel === 1) { tr.type = razorTokenTypes.EMBED_CS; tr.nextState = undefined; } } if (token === ')') { this.plevel--; if (this.expression && this.plevel <= 0) { tr.type = razorTokenTypes.EMBED_CS; tr.nextState = this.parent; } } if (token === '[') { this.plevel++; tr.nextState = undefined; } if (token === ']') { this.plevel--; } } } return tr; } if (ispunctuation(token)) { return { type: 'punctuation.cs', nextState: nextStateAtEnd }; } if (this.razorMode && this.expression && this.plevel <= 0) { return { type: '', nextState: this.parent }; } return { type: '', nextState: nextStateAtEnd }; }; return CSStatement; }(CSState)); exports.CSStatement = CSStatement; // this state always returns to parent state if it leaves a html tag var CSSimpleHTML = (function (_super) { __extends(CSSimpleHTML, _super); function CSSimpleHTML(mode, parent, state) { _super.call(this, mode, 'number', parent); this.state = state; } CSSimpleHTML.prototype.makeClone = function () { return new CSSimpleHTML(this.getMode(), this.parent ? this.parent.clone() : null, this.state); }; CSSimpleHTML.prototype.nextName = function (stream) { return stream.advanceIfRegExp(/^[_:\w][_:\w-.\d]*/); }; CSSimpleHTML.prototype.nextAttrValue = function (stream) { return stream.advanceIfRegExp(/^('|').*?\1/); }; CSSimpleHTML.prototype.tokenize = function (stream) { switch (this.state) { case htmlMode.States.WithinComment: if (stream.advanceUntil('-->', false).length > 0) { return { type: htmlTokenTypes.COMMENT }; } if (stream.advanceIfString('-->').length > 0) { this.state = htmlMode.States.Content; return { type: htmlTokenTypes.DELIM_COMMENT, nextState: this.parent }; } break; case htmlMode.States.WithinDoctype: if (stream.advanceUntil('>', false).length > 0) { return { type: htmlTokenTypes.DOCTYPE }; } if (stream.advanceIfString('>').length > 0) { this.state = htmlMode.States.Content; return { type: htmlTokenTypes.DELIM_DOCTYPE, nextState: this.parent }; } break; case htmlMode.States.Content: if (stream.advanceIfString('!--').length > 0) { this.state = htmlMode.States.WithinComment; return { type: htmlTokenTypes.DELIM_COMMENT }; } if (stream.advanceIfRegExp(/!DOCTYPE/i).length > 0) { this.state = htmlMode.States.WithinDoctype; return { type: htmlTokenTypes.DELIM_DOCTYPE }; } if (stream.advanceIfString('/').length > 0) { this.state = htmlMode.States.OpeningEndTag; return { type: htmlTokenTypes.DELIM_END }; } this.state = htmlMode.States.OpeningStartTag; return { type: htmlTokenTypes.DELIM_START }; case htmlMode.States.OpeningEndTag: { var tagName = this.nextName(stream); if (tagName.length > 0) { return { type: htmlTokenTypes.getTag(tagName) }; } if (stream.advanceIfString('>').length > 0) { this.state = htmlMode.States.Content; return { type: htmlTokenTypes.DELIM_END, nextState: this.parent }; } stream.advanceUntil('>', false); return { type: '' }; } case htmlMode.States.OpeningStartTag: { var tagName = this.nextName(stream); if (tagName.length > 0) { this.state = htmlMode.States.WithinTag; return { type: htmlTokenTypes.getTag(tagName) }; } break; } case htmlMode.States.WithinTag: if (stream.skipWhitespace().length > 0) { return { type: '' }; } var name = this.nextName(stream); if (name.length > 0) { this.state = htmlMode.States.AttributeName; return { type: htmlTokenTypes.ATTRIB_NAME }; } if (stream.advanceIfRegExp(/^\/?>/).length > 0) { this.state = htmlMode.States.Content; return { type: htmlTokenTypes.DELIM_START, nextState: this.parent }; } stream.next(); return { type: '' }; case htmlMode.States.AttributeName: if (stream.skipWhitespace().length > 0 || stream.eos()) { return { type: '' }; } if (stream.peek() === '=') { stream.next(); this.state = htmlMode.States.AttributeValue; return { type: '' }; } this.state = htmlMode.States.WithinTag; return this.tokenize(stream); // no advance yet - jump to WithinTag case htmlMode.States.AttributeValue: if (stream.skipWhitespace().length > 0 || stream.eos()) { return { type: '' }; } var value = this.nextAttrValue(stream); if (value.length > 0) { this.state = htmlMode.States.WithinTag; return { type: htmlTokenTypes.ATTRIB_VALUE }; } this.state = htmlMode.States.WithinTag; return this.tokenize(stream); // no advance yet - jump to WithinTag } stream.next(); this.state = htmlMode.States.Content; return { type: '', nextState: this.parent }; }; return CSSimpleHTML; }(CSState)); }); var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; var __param = (this && this.__param) || function (paramIndex, decorator) { return function (target, key) { decorator(target, key, paramIndex); } }; define(__m[11], __M([1,0,12,9,8,6,2,13,14,15,16,17]), function (require, exports, modes, htmlMode, csharpTokenization, abstractMode_1, razorTokenTypes, instantiation_1, modeService_1, languageConfigurationRegistry_1, async_1, compatWorkerService_1) { /*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; // for a brief description of the razor syntax see http://www.mikesdotnetting.com/Article/153/Inline-Razor-Syntax-Overview var RAZORState = (function (_super) { __extends(RAZORState, _super); function RAZORState(mode, kind, lastTagName, lastAttributeName, embeddedContentType, attributeValueQuote, attributeValue) { _super.call(this, mode, kind, lastTagName, lastAttributeName, embeddedContentType, attributeValueQuote, attributeValue); } RAZORState.prototype.makeClone = function () { return new RAZORState(this.getMode(), this.kind, this.lastTagName, this.lastAttributeName, this.embeddedContentType, this.attributeValueQuote, this.attributeValue); }; RAZORState.prototype.equals = function (other) { if (other instanceof RAZORState) { return (_super.prototype.equals.call(this, other)); } return false; }; RAZORState.prototype.tokenize = function (stream) { if (!stream.eos() && stream.peek() === '@') { stream.next(); if (!stream.eos() && stream.peek() === '*') { return { nextState: new csharpTokenization.CSComment(this.getMode(), this, '@') }; } if (stream.eos() || stream.peek() !== '@') { return { type: razorTokenTypes.EMBED_CS, nextState: new csharpTokenization.CSStatement(this.getMode(), this, 0, 0, true, true, true, false) }; } } return _super.prototype.tokenize.call(this, stream); }; return RAZORState; }(htmlMode.State)); var RAZORMode = (function (_super) { __extends(RAZORMode, _super); function RAZORMode(descriptor, instantiationService, modeService, compatWorkerService) { _super.call(this, descriptor, instantiationService, modeService, compatWorkerService); } RAZORMode.prototype._registerSupports = function () { var _this = this; modes.SuggestRegistry.register(this.getId(), { triggerCharacters: ['.', ':', '<', '"', '=', '/'], shouldAutotriggerSuggest: true, provideCompletionItems: function (model, position, token) { return async_1.wireCancellationToken(token, _this._provideCompletionItems(model.uri, position)); } }, true); modes.DocumentHighlightProviderRegistry.register(this.getId(), { provideDocumentHighlights: function (model, position, token) { return async_1.wireCancellationToken(token, _this._provideDocumentHighlights(model.uri, position)); } }, true); modes.LinkProviderRegistry.register(this.getId(), { provideLinks: function (model, token) { return async_1.wireCancellationToken(token, _this._provideLinks(model.uri)); } }, true); languageConfigurationRegistry_1.LanguageConfigurationRegistry.register(this.getId(), RAZORMode.LANG_CONFIG); }; RAZORMode.prototype._createModeWorkerManager = function (descriptor, instantiationService) { return new abstractMode_1.ModeWorkerManager(descriptor, 'vs/languages/razor/common/razorWorker', 'RAZORWorker', 'vs/languages/html/common/htmlWorker', instantiationService); }; RAZORMode.prototype.getInitialState = function () { return new RAZORState(this, htmlMode.States.Content, '', '', '', '', ''); }; RAZORMode.prototype.getLeavingNestedModeData = function (line, state) { var leavingNestedModeData = _super.prototype.getLeavingNestedModeData.call(this, line, state); if (leavingNestedModeData) { leavingNestedModeData.stateAfterNestedMode = new RAZORState(this, htmlMode.States.Content, '', '', '', '', ''); } return leavingNestedModeData; }; RAZORMode.LANG_CONFIG = { wordPattern: abstractMode_1.createWordRegExp('#?%'), comments: { blockComment: ['<!--', '-->'] }, brackets: [ ['<!--', '-->'], ['{', '}'], ['(', ')'] ], __electricCharacterSupport: { embeddedElectricCharacters: ['*', '}', ']', ')'] }, autoClosingPairs: [ { open: '{', close: '}' }, { open: '[', close: ']' }, { open: '(', close: ')' }, { open: '"', close: '"' }, { open: '\'', close: '\'' } ], surroundingPairs: [ { open: '"', close: '"' }, { open: '\'', close: '\'' } ], onEnterRules: [ { beforeText: new RegExp("<(?!(?:" + htmlMode.EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'), afterText: /^<\/(\w[\w\d]*)\s*>$/i, action: { indentAction: modes.IndentAction.IndentOutdent } }, { beforeText: new RegExp("<(?!(?:" + htmlMode.EMPTY_ELEMENTS.join('|') + "))(\\w[\\w\\d]*)([^/>]*(?!/)>)[^<]*$", 'i'), action: { indentAction: modes.IndentAction.Indent } } ], }; RAZORMode = __decorate([ __param(1, instantiation_1.IInstantiationService), __param(2, modeService_1.IModeService), __param(3, compatWorkerService_1.ICompatWorkerService) ], RAZORMode); return RAZORMode; }(htmlMode.HTMLMode)); exports.RAZORMode = RAZORMode; }); }).call(this); //# sourceMappingURL=razor.js.map
/* * @name Video Pixels * @frame 320,240 * @description <p>Load a video, manipulate it's pixels and draw to canvas. * <p><em><span class="small"> To run this example locally, you will need the * <a href="http://p5js.org/reference/#/libraries/p5.dom">p5.dom library</a> * at least one video file, and a running <a href="https://github.com/processing/p5.js/wiki/Local-server">local server</a>.</span></em></p> */ var fingers; function setup() { createCanvas(320, 240); // specify multiple formats for different browsers fingers = createVideo(['assets/fingers.mov', 'assets/fingers.webm']); fingers.loop(); fingers.hide(); noStroke(); fill(0); } function draw() { background(255); fingers.loadPixels(); var stepSize = round(constrain(mouseX / 8, 6, 32)); for (var y=0; y<height; y+=stepSize) { for (var x=0; x<width; x+=stepSize) { var i = y * width + x; var darkness = (255 - fingers.pixels[i*4]) / 255; var radius = stepSize * darkness; ellipse(x, y, radius, radius); } } }
/* Magic Mirror * Node Helper: Calendar - CalendarFetcher * * By Michael Teeuw http://michaelteeuw.nl * MIT Licensed. */ var ical = require("./vendor/ical.js"); var moment = require("moment"); var CalendarFetcher = function(url, reloadInterval, excludedEvents, maximumEntries, maximumNumberOfDays, auth) { var self = this; var reloadTimer = null; var events = []; var fetchFailedCallback = function() {}; var eventsReceivedCallback = function() {}; /* fetchCalendar() * Initiates calendar fetch. */ var fetchCalendar = function() { clearTimeout(reloadTimer); reloadTimer = null; nodeVersion = Number(process.version.match(/^v(\d+\.\d+)/)[1]); var opts = { headers: { "User-Agent": "Mozilla/5.0 (Node.js "+ nodeVersion + ") MagicMirror/" + global.version + " (https://github.com/MichMich/MagicMirror/)" }, gzip: true }; if (auth) { if(auth.method === "bearer"){ opts.auth = { bearer: auth.pass } }else{ opts.auth = { user: auth.user, pass: auth.pass }; if(auth.method === "digest"){ opts.auth.sendImmediately = false; }else{ opts.auth.sendImmediately = true; } } } ical.fromURL(url, opts, function(err, data) { if (err) { fetchFailedCallback(self, err); scheduleTimer(); return; } // console.log(data); newEvents = []; var limitFunction = function(date, i) {return i < maximumEntries;}; var eventDate = function(event, time) { return (event[time].length === 8) ? moment(event[time], "YYYYMMDD") : moment(new Date(event[time])); }; for (var e in data) { var event = data[e]; var now = new Date(); var today = moment().startOf("day").toDate(); var future = moment().startOf("day").add(maximumNumberOfDays, "days").subtract(1,"seconds").toDate(); // Subtract 1 second so that events that start on the middle of the night will not repeat. // FIXME: // Ugly fix to solve the facebook birthday issue. // Otherwise, the recurring events only show the birthday for next year. var isFacebookBirthday = false; if (typeof event.uid !== "undefined") { if (event.uid.indexOf("@facebook.com") !== -1) { isFacebookBirthday = true; } } if (event.type === "VEVENT") { var startDate = eventDate(event, "start"); var endDate; if (typeof event.end !== "undefined") { endDate = eventDate(event, "end"); } else if(typeof event.duration !== "undefined") { dur=moment.duration(event.duration); endDate = startDate.clone().add(dur); } else { if (!isFacebookBirthday) { endDate = startDate; } else { endDate = moment(startDate).add(1, "days"); } } // calculate the duration f the event for use with recurring events. var duration = parseInt(endDate.format("x")) - parseInt(startDate.format("x")); if (event.start.length === 8) { startDate = startDate.startOf("day"); } var title = "Event"; if (event.summary) { title = (typeof event.summary.val !== "undefined") ? event.summary.val : event.summary; } else if(event.description) { title = event.description; } var excluded = false, dateFilter = null; for (var f in excludedEvents) { var filter = excludedEvents[f], testTitle = title.toLowerCase(), until = null, useRegex = false, regexFlags = "g"; if (filter instanceof Object) { if (typeof filter.until !== "undefined") { until = filter.until; } if (typeof filter.regex !== "undefined") { useRegex = filter.regex; } // If additional advanced filtering is added in, this section // must remain last as we overwrite the filter object with the // filterBy string if (filter.caseSensitive) { filter = filter.filterBy; testTitle = title; } else if (useRegex) { filter = filter.filterBy; testTitle = title; regexFlags += "i"; } else { filter = filter.filterBy.toLowerCase(); } } else { filter = filter.toLowerCase(); } if (testTitleByFilter(testTitle, filter, useRegex, regexFlags)) { if (until) { dateFilter = until; } else { excluded = true; } break; } } if (excluded) { continue; } var location = event.location || false; var geo = event.geo || false; var description = event.description || false; if (typeof event.rrule != "undefined" && !isFacebookBirthday) { var rule = event.rrule; var dates = rule.between(today, future, true, limitFunction); for (var d in dates) { startDate = moment(new Date(dates[d])); endDate = moment(parseInt(startDate.format("x")) + duration, "x"); if (timeFilterApplies(now, endDate, dateFilter)) { continue; } if (endDate.format("x") > now) { newEvents.push({ title: title, startDate: startDate.format("x"), endDate: endDate.format("x"), fullDayEvent: isFullDayEvent(event), class: event.class, firstYear: event.start.getFullYear(), location: location, geo: geo, description: description }); } } } else { // console.log("Single event ..."); // Single event. var fullDayEvent = (isFacebookBirthday) ? true : isFullDayEvent(event); if (!fullDayEvent && endDate < new Date()) { //console.log("It's not a fullday event, and it is in the past. So skip: " + title); continue; } if (fullDayEvent && endDate <= today) { //console.log("It's a fullday event, and it is before today. So skip: " + title); continue; } if (startDate > future) { //console.log("It exceeds the maximumNumberOfDays limit. So skip: " + title); continue; } if (timeFilterApplies(now, endDate, dateFilter)) { continue; } // Every thing is good. Add it to the list. newEvents.push({ title: title, startDate: startDate.format("x"), endDate: endDate.format("x"), fullDayEvent: fullDayEvent, class: event.class, location: location, geo: geo, description: description }); } } } newEvents.sort(function(a, b) { return a.startDate - b.startDate; }); //console.log(newEvents); events = newEvents.slice(0, maximumEntries); self.broadcastEvents(); scheduleTimer(); }); }; /* scheduleTimer() * Schedule the timer for the next update. */ var scheduleTimer = function() { //console.log('Schedule update timer.'); clearTimeout(reloadTimer); reloadTimer = setTimeout(function() { fetchCalendar(); }, reloadInterval); }; /* isFullDayEvent(event) * Checks if an event is a fullday event. * * argument event obejct - The event object to check. * * return bool - The event is a fullday event. */ var isFullDayEvent = function(event) { if (event.start.length === 8) { return true; } var start = event.start || 0; var startDate = new Date(start); var end = event.end || 0; if (((end - start) % (24 * 60 * 60 * 1000)) === 0 && startDate.getHours() === 0 && startDate.getMinutes() === 0) { // Is 24 hours, and starts on the middle of the night. return true; } return false; }; /* timeFilterApplies() * Determines if the user defined time filter should apply * * argument now Date - Date object using previously created object for consistency * argument endDate Moment - Moment object representing the event end date * argument filter string - The time to subtract from the end date to determine if an event should be shown * * return bool - The event should be filtered out */ var timeFilterApplies = function(now, endDate, filter) { if (filter) { var until = filter.split(" "), value = parseInt(until[0]), increment = until[1].slice("-1") === "s" ? until[1] : until[1] + "s", // Massage the data for moment js filterUntil = moment(endDate.format()).subtract(value, increment); return now < filterUntil.format("x"); } return false; }; var testTitleByFilter = function (title, filter, useRegex, regexFlags) { if (useRegex) { // Assume if leading slash, there is also trailing slash if (filter[0] === "/") { // Strip leading and trailing slashes filter = filter.substr(1).slice(0, -1); } filter = new RegExp(filter, regexFlags); return filter.test(title); } else { return title.includes(filter); } } /* public methods */ /* startFetch() * Initiate fetchCalendar(); */ this.startFetch = function() { fetchCalendar(); }; /* broadcastItems() * Broadcast the existing events. */ this.broadcastEvents = function() { //console.log('Broadcasting ' + events.length + ' events.'); eventsReceivedCallback(self); }; /* onReceive(callback) * Sets the on success callback * * argument callback function - The on success callback. */ this.onReceive = function(callback) { eventsReceivedCallback = callback; }; /* onError(callback) * Sets the on error callback * * argument callback function - The on error callback. */ this.onError = function(callback) { fetchFailedCallback = callback; }; /* url() * Returns the url of this fetcher. * * return string - The url of this fetcher. */ this.url = function() { return url; }; /* events() * Returns current available events for this fetcher. * * return array - The current available events for this fetcher. */ this.events = function() { return events; }; }; module.exports = CalendarFetcher;
/** * Copyright (c) Tiny Technologies, Inc. All rights reserved. * Licensed under the LGPL or a commercial license. * For LGPL see License.txt in the project root for license information. * For commercial licenses see https://www.tiny.cloud/ * * Version: 5.1.6 (2020-01-28) */ (function (domGlobals) { 'use strict'; var global = tinymce.util.Tools.resolve('tinymce.PluginManager'); var fireInsertCustomChar = function (editor, chr) { return editor.fire('insertCustomChar', { chr: chr }); }; var Events = { fireInsertCustomChar: fireInsertCustomChar }; var insertChar = function (editor, chr) { var evtChr = Events.fireInsertCustomChar(editor, chr).chr; editor.execCommand('mceInsertContent', false, evtChr); }; var Actions = { insertChar: insertChar }; var global$1 = tinymce.util.Tools.resolve('tinymce.util.Tools'); var getCharMap = function (editor) { return editor.settings.charmap; }; var getCharMapAppend = function (editor) { return editor.settings.charmap_append; }; var Settings = { getCharMap: getCharMap, getCharMapAppend: getCharMapAppend }; var noop = function () { }; var constant = function (value) { return function () { return value; }; }; var never = constant(false); var always = constant(true); var none = function () { return NONE; }; var NONE = function () { var eq = function (o) { return o.isNone(); }; var call = function (thunk) { return thunk(); }; var id = function (n) { return n; }; var me = { fold: function (n, s) { return n(); }, is: never, isSome: never, isNone: always, getOr: id, getOrThunk: call, getOrDie: function (msg) { throw new Error(msg || 'error: getOrDie called on none.'); }, getOrNull: constant(null), getOrUndefined: constant(undefined), or: id, orThunk: call, map: none, each: noop, bind: none, exists: never, forall: always, filter: none, equals: eq, equals_: eq, toArray: function () { return []; }, toString: constant('none()') }; if (Object.freeze) { Object.freeze(me); } return me; }(); var some = function (a) { var constant_a = constant(a); var self = function () { return me; }; var bind = function (f) { return f(a); }; var me = { fold: function (n, s) { return s(a); }, is: function (v) { return a === v; }, isSome: always, isNone: never, getOr: constant_a, getOrThunk: constant_a, getOrDie: constant_a, getOrNull: constant_a, getOrUndefined: constant_a, or: self, orThunk: self, map: function (f) { return some(f(a)); }, each: function (f) { f(a); }, bind: bind, exists: bind, forall: bind, filter: function (f) { return f(a) ? me : NONE; }, toArray: function () { return [a]; }, toString: function () { return 'some(' + a + ')'; }, equals: function (o) { return o.is(a); }, equals_: function (o, elementEq) { return o.fold(never, function (b) { return elementEq(a, b); }); } }; return me; }; var from = function (value) { return value === null || value === undefined ? NONE : some(value); }; var Option = { some: some, none: none, from: from }; var typeOf = function (x) { if (x === null) { return 'null'; } var t = typeof x; if (t === 'object' && (Array.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'Array')) { return 'array'; } if (t === 'object' && (String.prototype.isPrototypeOf(x) || x.constructor && x.constructor.name === 'String')) { return 'string'; } return t; }; var isType = function (type) { return function (value) { return typeOf(value) === type; }; }; var isArray = isType('array'); var isFunction = isType('function'); var nativeSlice = Array.prototype.slice; var nativePush = Array.prototype.push; var map = function (xs, f) { var len = xs.length; var r = new Array(len); for (var i = 0; i < len; i++) { var x = xs[i]; r[i] = f(x, i); } return r; }; var each = function (xs, f) { for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; f(x, i); } }; var find = function (xs, pred) { for (var i = 0, len = xs.length; i < len; i++) { var x = xs[i]; if (pred(x, i)) { return Option.some(x); } } return Option.none(); }; var flatten = function (xs) { var r = []; for (var i = 0, len = xs.length; i < len; ++i) { if (!isArray(xs[i])) { throw new Error('Arr.flatten item ' + i + ' was not an array, input: ' + xs); } nativePush.apply(r, xs[i]); } return r; }; var bind = function (xs, f) { var output = map(xs, f); return flatten(output); }; var from$1 = isFunction(Array.from) ? Array.from : function (x) { return nativeSlice.call(x); }; var isArray$1 = global$1.isArray; var UserDefined = 'User Defined'; var getDefaultCharMap = function () { return [ { name: 'Currency', characters: [ [ 36, 'dollar sign' ], [ 162, 'cent sign' ], [ 8364, 'euro sign' ], [ 163, 'pound sign' ], [ 165, 'yen sign' ], [ 164, 'currency sign' ], [ 8352, 'euro-currency sign' ], [ 8353, 'colon sign' ], [ 8354, 'cruzeiro sign' ], [ 8355, 'french franc sign' ], [ 8356, 'lira sign' ], [ 8357, 'mill sign' ], [ 8358, 'naira sign' ], [ 8359, 'peseta sign' ], [ 8360, 'rupee sign' ], [ 8361, 'won sign' ], [ 8362, 'new sheqel sign' ], [ 8363, 'dong sign' ], [ 8365, 'kip sign' ], [ 8366, 'tugrik sign' ], [ 8367, 'drachma sign' ], [ 8368, 'german penny symbol' ], [ 8369, 'peso sign' ], [ 8370, 'guarani sign' ], [ 8371, 'austral sign' ], [ 8372, 'hryvnia sign' ], [ 8373, 'cedi sign' ], [ 8374, 'livre tournois sign' ], [ 8375, 'spesmilo sign' ], [ 8376, 'tenge sign' ], [ 8377, 'indian rupee sign' ], [ 8378, 'turkish lira sign' ], [ 8379, 'nordic mark sign' ], [ 8380, 'manat sign' ], [ 8381, 'ruble sign' ], [ 20870, 'yen character' ], [ 20803, 'yuan character' ], [ 22291, 'yuan character, in hong kong and taiwan' ], [ 22278, 'yen/yuan character variant one' ] ] }, { name: 'Text', characters: [ [ 169, 'copyright sign' ], [ 174, 'registered sign' ], [ 8482, 'trade mark sign' ], [ 8240, 'per mille sign' ], [ 181, 'micro sign' ], [ 183, 'middle dot' ], [ 8226, 'bullet' ], [ 8230, 'three dot leader' ], [ 8242, 'minutes / feet' ], [ 8243, 'seconds / inches' ], [ 167, 'section sign' ], [ 182, 'paragraph sign' ], [ 223, 'sharp s / ess-zed' ] ] }, { name: 'Quotations', characters: [ [ 8249, 'single left-pointing angle quotation mark' ], [ 8250, 'single right-pointing angle quotation mark' ], [ 171, 'left pointing guillemet' ], [ 187, 'right pointing guillemet' ], [ 8216, 'left single quotation mark' ], [ 8217, 'right single quotation mark' ], [ 8220, 'left double quotation mark' ], [ 8221, 'right double quotation mark' ], [ 8218, 'single low-9 quotation mark' ], [ 8222, 'double low-9 quotation mark' ], [ 60, 'less-than sign' ], [ 62, 'greater-than sign' ], [ 8804, 'less-than or equal to' ], [ 8805, 'greater-than or equal to' ], [ 8211, 'en dash' ], [ 8212, 'em dash' ], [ 175, 'macron' ], [ 8254, 'overline' ], [ 164, 'currency sign' ], [ 166, 'broken bar' ], [ 168, 'diaeresis' ], [ 161, 'inverted exclamation mark' ], [ 191, 'turned question mark' ], [ 710, 'circumflex accent' ], [ 732, 'small tilde' ], [ 176, 'degree sign' ], [ 8722, 'minus sign' ], [ 177, 'plus-minus sign' ], [ 247, 'division sign' ], [ 8260, 'fraction slash' ], [ 215, 'multiplication sign' ], [ 185, 'superscript one' ], [ 178, 'superscript two' ], [ 179, 'superscript three' ], [ 188, 'fraction one quarter' ], [ 189, 'fraction one half' ], [ 190, 'fraction three quarters' ] ] }, { name: 'Mathematical', characters: [ [ 402, 'function / florin' ], [ 8747, 'integral' ], [ 8721, 'n-ary sumation' ], [ 8734, 'infinity' ], [ 8730, 'square root' ], [ 8764, 'similar to' ], [ 8773, 'approximately equal to' ], [ 8776, 'almost equal to' ], [ 8800, 'not equal to' ], [ 8801, 'identical to' ], [ 8712, 'element of' ], [ 8713, 'not an element of' ], [ 8715, 'contains as member' ], [ 8719, 'n-ary product' ], [ 8743, 'logical and' ], [ 8744, 'logical or' ], [ 172, 'not sign' ], [ 8745, 'intersection' ], [ 8746, 'union' ], [ 8706, 'partial differential' ], [ 8704, 'for all' ], [ 8707, 'there exists' ], [ 8709, 'diameter' ], [ 8711, 'backward difference' ], [ 8727, 'asterisk operator' ], [ 8733, 'proportional to' ], [ 8736, 'angle' ] ] }, { name: 'Extended Latin', characters: [ [ 192, 'A - grave' ], [ 193, 'A - acute' ], [ 194, 'A - circumflex' ], [ 195, 'A - tilde' ], [ 196, 'A - diaeresis' ], [ 197, 'A - ring above' ], [ 256, 'A - macron' ], [ 198, 'ligature AE' ], [ 199, 'C - cedilla' ], [ 200, 'E - grave' ], [ 201, 'E - acute' ], [ 202, 'E - circumflex' ], [ 203, 'E - diaeresis' ], [ 274, 'E - macron' ], [ 204, 'I - grave' ], [ 205, 'I - acute' ], [ 206, 'I - circumflex' ], [ 207, 'I - diaeresis' ], [ 298, 'I - macron' ], [ 208, 'ETH' ], [ 209, 'N - tilde' ], [ 210, 'O - grave' ], [ 211, 'O - acute' ], [ 212, 'O - circumflex' ], [ 213, 'O - tilde' ], [ 214, 'O - diaeresis' ], [ 216, 'O - slash' ], [ 332, 'O - macron' ], [ 338, 'ligature OE' ], [ 352, 'S - caron' ], [ 217, 'U - grave' ], [ 218, 'U - acute' ], [ 219, 'U - circumflex' ], [ 220, 'U - diaeresis' ], [ 362, 'U - macron' ], [ 221, 'Y - acute' ], [ 376, 'Y - diaeresis' ], [ 562, 'Y - macron' ], [ 222, 'THORN' ], [ 224, 'a - grave' ], [ 225, 'a - acute' ], [ 226, 'a - circumflex' ], [ 227, 'a - tilde' ], [ 228, 'a - diaeresis' ], [ 229, 'a - ring above' ], [ 257, 'a - macron' ], [ 230, 'ligature ae' ], [ 231, 'c - cedilla' ], [ 232, 'e - grave' ], [ 233, 'e - acute' ], [ 234, 'e - circumflex' ], [ 235, 'e - diaeresis' ], [ 275, 'e - macron' ], [ 236, 'i - grave' ], [ 237, 'i - acute' ], [ 238, 'i - circumflex' ], [ 239, 'i - diaeresis' ], [ 299, 'i - macron' ], [ 240, 'eth' ], [ 241, 'n - tilde' ], [ 242, 'o - grave' ], [ 243, 'o - acute' ], [ 244, 'o - circumflex' ], [ 245, 'o - tilde' ], [ 246, 'o - diaeresis' ], [ 248, 'o slash' ], [ 333, 'o macron' ], [ 339, 'ligature oe' ], [ 353, 's - caron' ], [ 249, 'u - grave' ], [ 250, 'u - acute' ], [ 251, 'u - circumflex' ], [ 252, 'u - diaeresis' ], [ 363, 'u - macron' ], [ 253, 'y - acute' ], [ 254, 'thorn' ], [ 255, 'y - diaeresis' ], [ 563, 'y - macron' ], [ 913, 'Alpha' ], [ 914, 'Beta' ], [ 915, 'Gamma' ], [ 916, 'Delta' ], [ 917, 'Epsilon' ], [ 918, 'Zeta' ], [ 919, 'Eta' ], [ 920, 'Theta' ], [ 921, 'Iota' ], [ 922, 'Kappa' ], [ 923, 'Lambda' ], [ 924, 'Mu' ], [ 925, 'Nu' ], [ 926, 'Xi' ], [ 927, 'Omicron' ], [ 928, 'Pi' ], [ 929, 'Rho' ], [ 931, 'Sigma' ], [ 932, 'Tau' ], [ 933, 'Upsilon' ], [ 934, 'Phi' ], [ 935, 'Chi' ], [ 936, 'Psi' ], [ 937, 'Omega' ], [ 945, 'alpha' ], [ 946, 'beta' ], [ 947, 'gamma' ], [ 948, 'delta' ], [ 949, 'epsilon' ], [ 950, 'zeta' ], [ 951, 'eta' ], [ 952, 'theta' ], [ 953, 'iota' ], [ 954, 'kappa' ], [ 955, 'lambda' ], [ 956, 'mu' ], [ 957, 'nu' ], [ 958, 'xi' ], [ 959, 'omicron' ], [ 960, 'pi' ], [ 961, 'rho' ], [ 962, 'final sigma' ], [ 963, 'sigma' ], [ 964, 'tau' ], [ 965, 'upsilon' ], [ 966, 'phi' ], [ 967, 'chi' ], [ 968, 'psi' ], [ 969, 'omega' ] ] }, { name: 'Symbols', characters: [ [ 8501, 'alef symbol' ], [ 982, 'pi symbol' ], [ 8476, 'real part symbol' ], [ 978, 'upsilon - hook symbol' ], [ 8472, 'Weierstrass p' ], [ 8465, 'imaginary part' ] ] }, { name: 'Arrows', characters: [ [ 8592, 'leftwards arrow' ], [ 8593, 'upwards arrow' ], [ 8594, 'rightwards arrow' ], [ 8595, 'downwards arrow' ], [ 8596, 'left right arrow' ], [ 8629, 'carriage return' ], [ 8656, 'leftwards double arrow' ], [ 8657, 'upwards double arrow' ], [ 8658, 'rightwards double arrow' ], [ 8659, 'downwards double arrow' ], [ 8660, 'left right double arrow' ], [ 8756, 'therefore' ], [ 8834, 'subset of' ], [ 8835, 'superset of' ], [ 8836, 'not a subset of' ], [ 8838, 'subset of or equal to' ], [ 8839, 'superset of or equal to' ], [ 8853, 'circled plus' ], [ 8855, 'circled times' ], [ 8869, 'perpendicular' ], [ 8901, 'dot operator' ], [ 8968, 'left ceiling' ], [ 8969, 'right ceiling' ], [ 8970, 'left floor' ], [ 8971, 'right floor' ], [ 9001, 'left-pointing angle bracket' ], [ 9002, 'right-pointing angle bracket' ], [ 9674, 'lozenge' ], [ 9824, 'black spade suit' ], [ 9827, 'black club suit' ], [ 9829, 'black heart suit' ], [ 9830, 'black diamond suit' ], [ 8194, 'en space' ], [ 8195, 'em space' ], [ 8201, 'thin space' ], [ 8204, 'zero width non-joiner' ], [ 8205, 'zero width joiner' ], [ 8206, 'left-to-right mark' ], [ 8207, 'right-to-left mark' ] ] } ]; }; var charmapFilter = function (charmap) { return global$1.grep(charmap, function (item) { return isArray$1(item) && item.length === 2; }); }; var getCharsFromSetting = function (settingValue) { if (isArray$1(settingValue)) { return [].concat(charmapFilter(settingValue)); } if (typeof settingValue === 'function') { return settingValue(); } return []; }; var extendCharMap = function (editor, charmap) { var userCharMap = Settings.getCharMap(editor); if (userCharMap) { charmap = [{ name: UserDefined, characters: getCharsFromSetting(userCharMap) }]; } var userCharMapAppend = Settings.getCharMapAppend(editor); if (userCharMapAppend) { var userDefinedGroup = global$1.grep(charmap, function (cg) { return cg.name === UserDefined; }); if (userDefinedGroup.length) { userDefinedGroup[0].characters = [].concat(userDefinedGroup[0].characters).concat(getCharsFromSetting(userCharMapAppend)); return charmap; } return [].concat(charmap).concat({ name: UserDefined, characters: getCharsFromSetting(userCharMapAppend) }); } return charmap; }; var getCharMap$1 = function (editor) { var groups = extendCharMap(editor, getDefaultCharMap()); return groups.length > 1 ? [{ name: 'All', characters: bind(groups, function (g) { return g.characters; }) }].concat(groups) : groups; }; var CharMap = { getCharMap: getCharMap$1 }; var get = function (editor) { var getCharMap = function () { return CharMap.getCharMap(editor); }; var insertChar = function (chr) { Actions.insertChar(editor, chr); }; return { getCharMap: getCharMap, insertChar: insertChar }; }; var Api = { get: get }; var Cell = function (initial) { var value = initial; var get = function () { return value; }; var set = function (v) { value = v; }; var clone = function () { return Cell(get()); }; return { get: get, set: set, clone: clone }; }; var last = function (fn, rate) { var timer = null; var cancel = function () { if (timer !== null) { domGlobals.clearTimeout(timer); timer = null; } }; var throttle = function () { var args = []; for (var _i = 0; _i < arguments.length; _i++) { args[_i] = arguments[_i]; } if (timer !== null) { domGlobals.clearTimeout(timer); } timer = domGlobals.setTimeout(function () { fn.apply(null, args); timer = null; }, rate); }; return { cancel: cancel, throttle: throttle }; }; var contains = function (str, substr) { return str.indexOf(substr) !== -1; }; var charMatches = function (charCode, name, lowerCasePattern) { if (contains(String.fromCharCode(charCode).toLowerCase(), lowerCasePattern)) { return true; } else { return contains(name.toLowerCase(), lowerCasePattern) || contains(name.toLowerCase().replace(/\s+/g, ''), lowerCasePattern); } }; var scan = function (group, pattern) { var matches = []; var lowerCasePattern = pattern.toLowerCase(); each(group.characters, function (g) { if (charMatches(g[0], g[1], lowerCasePattern)) { matches.push(g); } }); return map(matches, function (m) { return { text: m[1], value: String.fromCharCode(m[0]), icon: String.fromCharCode(m[0]) }; }); }; var Scan = { scan: scan }; var patternName = 'pattern'; var open = function (editor, charMap) { var makeGroupItems = function () { return [ { label: 'Search', type: 'input', name: patternName }, { type: 'collection', name: 'results' } ]; }; var makeTabs = function () { return map(charMap, function (charGroup) { return { title: charGroup.name, name: charGroup.name, items: makeGroupItems() }; }); }; var makePanel = function () { return { type: 'panel', items: makeGroupItems() }; }; var makeTabPanel = function () { return { type: 'tabpanel', tabs: makeTabs() }; }; var currentTab = charMap.length === 1 ? Cell(UserDefined) : Cell('All'); var scanAndSet = function (dialogApi, pattern) { find(charMap, function (group) { return group.name === currentTab.get(); }).each(function (f) { var items = Scan.scan(f, pattern); dialogApi.setData({ results: items }); }); }; var SEARCH_DELAY = 40; var updateFilter = last(function (dialogApi) { var pattern = dialogApi.getData().pattern; scanAndSet(dialogApi, pattern); }, SEARCH_DELAY); var body = charMap.length === 1 ? makePanel() : makeTabPanel(); var initialData = { pattern: '', results: Scan.scan(charMap[0], '') }; var bridgeSpec = { title: 'Special Character', size: 'normal', body: body, buttons: [{ type: 'cancel', name: 'close', text: 'Close', primary: true }], initialData: initialData, onAction: function (api, details) { if (details.name === 'results') { Actions.insertChar(editor, details.value); api.close(); } }, onTabChange: function (dialogApi, details) { currentTab.set(details.newTabName); updateFilter.throttle(dialogApi); }, onChange: function (dialogApi, changeData) { if (changeData.name === patternName) { updateFilter.throttle(dialogApi); } } }; var dialogApi = editor.windowManager.open(bridgeSpec); dialogApi.focus(patternName); }; var Dialog = { open: open }; var register = function (editor, charMap) { editor.addCommand('mceShowCharmap', function () { Dialog.open(editor, charMap); }); }; var Commands = { register: register }; var global$2 = tinymce.util.Tools.resolve('tinymce.util.Promise'); var init = function (editor, all) { editor.ui.registry.addAutocompleter('charmap', { ch: ':', columns: 'auto', minChars: 2, fetch: function (pattern, maxResults) { return new global$2(function (resolve, reject) { resolve(Scan.scan(all, pattern)); }); }, onAction: function (autocompleteApi, rng, value) { editor.selection.setRng(rng); editor.insertContent(value); autocompleteApi.hide(); } }); }; var register$1 = function (editor) { editor.ui.registry.addButton('charmap', { icon: 'insert-character', tooltip: 'Special character', onAction: function () { return editor.execCommand('mceShowCharmap'); } }); editor.ui.registry.addMenuItem('charmap', { icon: 'insert-character', text: 'Special character...', onAction: function () { return editor.execCommand('mceShowCharmap'); } }); }; var Buttons = { register: register$1 }; function Plugin () { global.add('charmap', function (editor) { var charMap = CharMap.getCharMap(editor); Commands.register(editor, charMap); Buttons.register(editor); init(editor, charMap[0]); return Api.get(editor); }); } Plugin(); }(window));
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Attractor = void 0; const Utils_1 = require("../../../../Utils"); class Attractor { constructor(container) { this.container = container; } interact(p1, _delta) { var _a; const container = this.container; const options = container.options; const distance = (_a = p1.linksDistance) !== null && _a !== void 0 ? _a : container.retina.linksDistance; const pos1 = p1.getPosition(); const query = container.particles.quadTree.query(new Utils_1.Circle(pos1.x, pos1.y, distance)); for (const p2 of query) { if (p1 === p2 || p2.particlesOptions.move.attract.enable) { continue; } const pos2 = p2.getPosition(); const { dx, dy } = Utils_1.Utils.getDistances(pos1, pos2); const rotate = options.particles.move.attract.rotate; const ax = dx / (rotate.x * 1000); const ay = dy / (rotate.y * 1000); p1.velocity.horizontal -= ax; p1.velocity.vertical -= ay; p2.velocity.horizontal += ax; p2.velocity.vertical += ay; } } isEnabled(particle) { return particle.particlesOptions.move.attract.enable; } reset(particle) { } } exports.Attractor = Attractor;
"use strict";import"../../Stock/Indicators/DEMAIndicator.js";
import InputNode from '../core/InputNode.js'; class IntNode extends InputNode { constructor( value = 0 ) { super( 'int' ); this.value = value; } serialize( data ) { super.serialize( data ); data.value = this.value; } deserialize( data ) { super.serialize( data ); this.value = data.value; } } IntNode.prototype.isIntNode = true; export default IntNode;
module.exports = { semi: true, trailingComma: 'all', singleQuote: true, printWidth: 80, tabWidth: 2, };
define([ "../core", "../css" ], function( jQuery ) { function Tween( elem, options, prop, end, easing ) { return new Tween.prototype.init( elem, options, prop, end, easing ); } jQuery.Tween = Tween; Tween.prototype = { constructor: Tween, init: function( elem, options, prop, end, easing, unit ) { this.elem = elem; this.prop = prop; this.easing = easing || jQuery.easing._default; this.options = options; this.start = this.now = this.cur(); this.end = end; this.unit = unit || ( jQuery.cssNumber[ prop ] ? "" : "px" ); }, cur: function() { var hooks = Tween.propHooks[ this.prop ]; return hooks && hooks.get ? hooks.get( this ) : Tween.propHooks._default.get( this ); }, run: function( percent ) { var eased, hooks = Tween.propHooks[ this.prop ]; if ( this.options.duration ) { this.pos = eased = jQuery.easing[ this.easing ]( percent, this.options.duration * percent, 0, 1, this.options.duration ); } else { this.pos = eased = percent; } this.now = ( this.end - this.start ) * eased + this.start; if ( this.options.step ) { this.options.step.call( this.elem, this.now, this ); } if ( hooks && hooks.set ) { hooks.set( this ); } else { Tween.propHooks._default.set( this ); } return this; } }; Tween.prototype.init.prototype = Tween.prototype; Tween.propHooks = { _default: { get: function( tween ) { var result; // Use a property on the element directly when it is not a DOM element, // or when there is no matching style property that exists. if ( tween.elem.nodeType !== 1 || tween.elem[ tween.prop ] != null && tween.elem.style[ tween.prop ] == null ) { return tween.elem[ tween.prop ]; } // Passing an empty string as a 3rd parameter to .css will automatically // attempt a parseFloat and fallback to a string if the parse fails. // Simple values such as "10px" are parsed to Float; // complex values such as "rotate(1rad)" are returned as-is. result = jQuery.css( tween.elem, tween.prop, "" ); // Empty strings, null, undefined and "auto" are converted to 0. return !result || result === "auto" ? 0 : result; }, set: function( tween ) { // Use step hook for back compat. // Use cssHook if its there. // Use .style if available and use plain properties where available. if ( jQuery.fx.step[ tween.prop ] ) { jQuery.fx.step[ tween.prop ]( tween ); } else if ( tween.elem.nodeType === 1 && ( tween.elem.style[ jQuery.cssProps[ tween.prop ] ] != null || jQuery.cssHooks[ tween.prop ] ) ) { jQuery.style( tween.elem, tween.prop, tween.now + tween.unit ); } else { tween.elem[ tween.prop ] = tween.now; } } } }; // Support: IE9 // Panic based approach to setting things on disconnected nodes Tween.propHooks.scrollTop = Tween.propHooks.scrollLeft = { set: function( tween ) { if ( tween.elem.nodeType && tween.elem.parentNode ) { tween.elem[ tween.prop ] = tween.now; } } }; jQuery.easing = { linear: function( p ) { return p; }, swing: function( p ) { return 0.5 - Math.cos( p * Math.PI ) / 2; }, _default: "swing" }; jQuery.fx = Tween.prototype.init; // Back Compat <1.8 extension point jQuery.fx.step = {}; });
/* Copyright (c) 2003-2014, CKSource - Frederico Knabben. All rights reserved. For licensing, see LICENSE.md or http://ckeditor.com/license */ CKEDITOR.plugins.setLang( 'image2', 'es', { alt: 'Texto Alternativo', btnUpload: 'Enviar al Servidor', captioned: 'Imagen subtitulada', infoTab: 'Información de Imagen', lockRatio: 'Proporcional', menu: 'Propiedades de Imagen', pathName: 'image', pathNameCaption: 'subtítulo', resetSize: 'Tamaño Original', resizer: 'Dar clic y arrastrar para cambiar tamaño', title: 'Propiedades de Imagen', uploadTab: 'Cargar', urlMissing: 'Debe indicar la URL de la imagen.' } );
var http = require('http') // make requests to the server var request = module.exports = function request (o, cb ) { if (!request.address) throw new Error('missing host/port'); return new Request; } function Request () { this.host = request.address.address; this.port = request.address.port; this.path; this.method; this.headers = {}; this.data= []; } Request.prototype.post = function (path) { this.path = path; this.method = 'post'; return this; } Request.prototype.get= function (path) { this.path = path; this.method = 'get'; return this; } Request.prototype.header = function (key, val) { this.headers[key] = val; return this; } Request.prototype.write = function (data) { this.data.push(data); return this; } Request.prototype.end = function (cb) { var req = http.request({ method: this.method , host: this.host , port: this.port , path: this.path || '/' , headers: this.headers }); this.data.forEach(function (data) { req.write(data); }); req.on('response', function (res) { var buf = ''; res.setEncoding('utf8'); res.on('data', function (data) { buf += data; }); res.on('end', function () { res.body = buf; cb(res); }); }); req.end(); }
var React = require('react'); var JobListing = React.createClass({ getInitialState: function() { return null; }, render: function() { return ( <div className="job-item"> <div className="job-location"> <div className="loc-icon"><img className="loc-img" src="https://maps.google.com/mapfiles/ms/icons/red-dot.png" height="18" width="18" /></div> <span className="loc-text">{this.props.joblisting.get('location')}</span> </div> <div className="job-company">{this.props.joblisting.get('company')}</div> <div className="job-sal-equity"> <span className="job-sal">${this.props.joblisting.get('salary_min').toLocaleString().split(',')[0]}k - ${this.props.joblisting.get('salary_max').toLocaleString().split(',')[0]}k</span> <span> | </span> <span className="job-equity">{this.props.joblisting.get('equity')}</span> </div> <div className="job-title">{this.props.joblisting.get('title')}</div> <div className="job-skills">{this.props.joblisting.get('skills')}</div> <div className="job-link"><a href={this.props.joblisting.get('link')} target="_blank">{this.props.joblisting.get('link')}</a></div> </div>) } }); module.exports = JobListing;
var Board = require("../lib/board.js"), events = require("events"), util = require("util"); /** * Sonar * @constructor * * @param {Object} opts Options: pin (analog) */ function Sonar( opts ) { if ( !(this instanceof Sonar) ) { return new Sonar( opts ); } var median, last, samples; median = 0; last = 0; samples = []; // Initialize a Device instance on a Board Board.Device.call( this, opts = Board.Options( opts ) ); // Sonar instance properties this.freq = opts.freq || 100; this.voltage = null; // Set the pin to ANALOG mode this.mode = this.firmata.MODES.ANALOG; this.firmata.pinMode( this.pin, this.mode ); this.firmata.analogRead( this.pin, function( data ) { this.voltage = data; samples.push( data ); }.bind(this)); // Throttle setInterval(function() { var err; err = null; // Nothing read since previous interval if ( samples.length === 0 ) { return; } median = samples.sort()[ Math.floor( samples.length / 2 ) ]; // Emit throttled event this.emit( "read", err, median ); // If the median value for this interval is not the same as the // median value in the last interval, fire a "change" event. // if ( last && median && (median.toFixed(1) !== last.toFixed(1)) ) { this.emit( "change", err, median ); } // Store this media value for comparison // in next interval last = median; // Reset samples; samples.length = 0; }.bind(this), this.freq ); Object.defineProperties( this, { // Based on the voltage, // Calculate the distance in inches and centimeters inches: { get: function() { return +(( 254 / 1024 ) * 2 * median).toFixed(1); } }, cm: { get: function() { return +(( median / 2 ) * 2.54).toFixed(1); } } }); } util.inherits( Sonar, events.EventEmitter ); module.exports = Sonar; // Reference // // http://www.maxbotix.com/tutorials.htm#Code_example_for_the_BasicX_BX24p // http://www.electrojoystick.com/tutorial/?page_id=285 // Tutorials // // http://www.sensorpedia.com/blog/how-to-interface-an-ultrasonic-rangefinder-with-sensorpedia-via-twitter-guide-2/
// @flow const path = require('path'); module.exports = { tests: path.resolve(__dirname, '../tmp/tests.js'), testUrl: process.env.DOCKER_TEST_URL || 'http://10.200.10.1:3090', storage: { baseline: path.resolve(__dirname, 'regressions/screenshots'), output: path.resolve(__dirname, '../tmp/output'), }, selenium: { server: 'http://127.0.0.1:4444/wd/hub', }, profiles: [ { name: 'chrome', desiredCapabilities: { browserName: 'chrome', }, }, ], };
'use strict'; /** * Module dependencies. */ var mongoose = require('mongoose'), Schema = mongoose.Schema; /** * Answer Schema */ var AnswerSchema = new Schema({ answer1: { type: String, default: '', required: 'Please fill Answer 1', trim: true }, answer2: { type: String, default: '', required: 'Please fill Answer 2', trim: true }, answer3: { type: String, default: '', required: 'Please fill Answer 3', trim: true }, surveyid: { type: String, default: '', required: 'Please fill id', trim: true }, created: { type: Date, default: Date.now }, //user: { // type: Schema.ObjectId, // ref: 'User' //}, Survey: { type: Schema.ObjectId, ref: 'Survey' } }); mongoose.model('Answer', AnswerSchema);
/*! * UI development toolkit for HTML5 (OpenUI5) * (c) Copyright 2009-2015 SAP SE or an SAP affiliate company. * Licensed under the Apache License, Version 2.0 - see LICENSE.txt. */ sap.ui.define(['jquery.sap.global','sap/ui/core/Element','./library'],function(q,E,l){"use strict";var C=E.extend("sap.ui.unified.CalendarLegendItem",{metadata:{library:"sap.ui.unified",properties:{text:{type:"string",group:"Misc",defaultValue:null},type:{type:"sap.ui.unified.CalendarDayType",group:"Appearance",defaultValue:sap.ui.unified.CalendarDayType.None}}}});return C;},true);
/* global assert, suite, test */ suite('a-mixin', function () { suite('cacheAttributes', function () { test('cache component attributes', function () { var mixinEl = document.createElement('a-mixin'); mixinEl.setAttribute('material', 'color: red'); mixinEl.cacheAttributes(); assert.shallowDeepEqual(mixinEl.componentAttrCache.material, { color: 'red' }); }); test('does not cache non component attributes', function () { var mixinEl = document.createElement('a-mixin'); mixinEl.setAttribute('test', 'src: url(www.mozilla.com)'); mixinEl.cacheAttributes(); assert.equal(mixinEl.componentAttrCache.test, undefined); }); }); });
$(function(){ $("#show_area").click(function(){ $("#j_headercitylist").slideToggle(); }); $("#j_headercitylist").children("li").hover(function(){ //清空二级地区 $("#citylist").empty(); //鼠标移入样式 $(this).css({ "background":"#89ccf0", "color":"#fff" }); //获取当前子地区 var id=$(this).attr("id") var data=$("#hidden_"+id).text(); //转换成json对象 var dataObj=eval("("+data+")"); var html=''; /* 判断是否有子类 */ if(dataObj.length>0){ $.each(dataObj,function(idv,item){ html+="<li value="+item.flea_area_id+"><a onclick=\"areaGo("+item.flea_area_id+",'"+encodeURI(item.flea_area_name)+"');return false;\">"+item.flea_area_name+"</a></li>"; }); $("#citylist").append("<div id='citylb1'>◆</div><div id='citylb2'>◆</div><ul>"+html+"</ul>"); } //输出子地区样式 var local=$(this).position(); var elementwidth=$(this).width(); $("#citylist").show(); $("#citylist").css({ "top":local.top+30, "left":local.left+elementwidth+21 }); },function(){ //鼠标移出样式 mark=this; $(mark).css({ "background":"#fff", "color":"#555" }); $("#citylist").hide(); //鼠标移入二级地区 $("#citylist").hover(function(){ $("#citylist").show(); $(mark).css({ "background":"#89ccf0", "color":"#fff" }); },function(){ $(mark).css({ "background":"#fff", "color":"#555" }); $("#citylist").hide(); }); }); }); function areaGo(id,name){ $.cookie('flea_area',decodeURI(name)); window.location.href='index.php?act=flea_class&area_input='+id; }
import 'dep';
import React, { PropTypes } from 'react' import { FloatingActionButton } from 'material-ui' import { selectColor } from '../actions' import PureComponent from 'react-pure-render/component' import '../styles/ColorPicker.less' // TODO: refactor ColorPicker export default class ColorPicker extends PureComponent { static get contextTypes() { return { muiTheme: PropTypes.object } } getStyle() { let { toolbarsOpen } = this.props let size = this.context.muiTheme.component.floatingActionButton.miniSize return { buttonStyle: { position: 'relative', top: (toolbarsOpen ? 56 : 50) - size / 2, margin: '0px 6px', pointerEvents: 'auto' } } } render() { let { selected, open, dispatch } = this.props let size = this.context.muiTheme.component.floatingActionButton.miniSize; let spacer = <div style={{width: size, height: size, borderRadius: '50%'}} /> let buttonStyle = this.getStyle().buttonStyle let colors = [ 'white', 'grey', 'black' ] return ( <div className='ColorPicker'> <div> {[0, 1, 2].map(i => <FloatingActionButton key={i} style={{...buttonStyle, transform: `scale(${!open ? 0 : selected === i ? 1.4 : 1})` }} backgroundColor={colors[i]} mini onTouchTap={() => dispatch(selectColor(i))} > {i === 0 ? <div style={{width: size, height: size, borderRadius: '50%'}} /> : spacer} </FloatingActionButton> )} </div> </div> ) } }