conflict_resolution
stringlengths
27
16k
<<<<<<< #### Version 2.1.0-dev The entire dc.js library is scoped under the **dc** name space. It does not introduce anything else into the global name space. #### Function Chaining Most dc functions are designed to allow function chaining, meaning they return the current chart instance whenever it is appropriate. This way chart configuration can be written in the following style: ```js chart.width(300) .height(300) .filter('sunday') ``` The getter forms of functions do not participate in function chaining because they necessarily return values that are not the chart. (Although some, such as `.svg` and `.xAxis`, return values that are chainable d3 objects.) **/ ======= * The entire dc.js library is scoped under the **dc** name space. It does not introduce * anything else into the global name space. * * Most `dc` functions are designed to allow function chaining, meaning they return the current chart * instance whenever it is appropriate. The getter forms of functions do not participate in function * chaining because they necessarily return values that are not the chart. Although some, * such as `.svg` and `.xAxis`, return values that are chainable d3 objects. * @namespace dc * @version 2.1.0-dev * @example * // Example chaining * chart.width(300) * .height(300) * .filter('sunday'); */ /*jshint -W062*/ >>>>>>> * The entire dc.js library is scoped under the **dc** name space. It does not introduce * anything else into the global name space. * * Most `dc` functions are designed to allow function chaining, meaning they return the current chart * instance whenever it is appropriate. The getter forms of functions do not participate in function * chaining because they necessarily return values that are not the chart. Although some, * such as `.svg` and `.xAxis`, return values that are chainable d3 objects. * @namespace dc * @version 2.1.0-dev * @example * // Example chaining * chart.width(300) * .height(300) * .filter('sunday'); */
<<<<<<< version: "0.8.0", ======= version: "0.7.1", >>>>>>> version: "0.7.0", <<<<<<< return _chart.x()(_chart.keyAccessor()(data)) + _chart.margins().left - barWidth(data)/2; ======= var position = _chart.x()(_chart.keyRetriever()(data)) + _chart.margins().left; if(_centering) position = position - barWidth(data)/2; return position; >>>>>>> var position = _chart.x()(_chart.keyAccessor()(data)) + _chart.margins().left; if(_centering) position = position - barWidth(data)/2; return position;
<<<<<<< * dc 2.1.0-dev ======= * dc 2.0.0-beta.26 >>>>>>> * dc 2.1.0-dev <<<<<<< * @version 2.1.0-dev ======= * @version 2.0.0-beta.26 >>>>>>> * @version 2.1.0-dev <<<<<<< version: '2.1.0-dev', ======= version: '2.0.0-beta.26', >>>>>>> version: '2.1.0-dev', <<<<<<< * The handler should return a new or modified array as the result. * @name removeFilterHandler ======= * Any changes should modify the `filters` array argument and return that array. * @method removeFilterHandler >>>>>>> * The handler should return a new or modified array as the result. * @method removeFilterHandler <<<<<<< * The handler should return a new or modified array as the result. * @name addFilterHandler ======= * Any changes should modify the `filters` array argument and return that array. * @method addFilterHandler >>>>>>> * The handler should return a new or modified array as the result. * @method addFilterHandler <<<<<<< * The handler should return a new or modified array as the result. * @name resetFilterHandler ======= * This function should return an array. * @method resetFilterHandler >>>>>>> * The handler should return a new or modified array as the result. * @method resetFilterHandler <<<<<<< * the values will be fetched from the data using the value accessor. * @name rows ======= * the values will be fetched from the data using the value accessor, and they will be sorted in * ascending order. * @method rows >>>>>>> * the values will be fetched from the data using the value accessor. * @method rows <<<<<<< * the values will be fetched from the data using the key accessor. * @name cols ======= * the values will be fetched from the data using the key accessor, and they will be sorted in * ascending order. * @method cols >>>>>>> * the values will be fetched from the data using the key accessor. * @method cols
<<<<<<< return _chart.x()(_chart.keyAccessor()(data)) + _chart.margins().left - barWidth(data)/2; ======= var position = _chart.x()(_chart.keyRetriever()(data)) + _chart.margins().left; if(_centering) position = position - barWidth(data)/2; return position; >>>>>>> var position = _chart.x()(_chart.keyAccessor()(data)) + _chart.margins().left; if(_centering) position = position - barWidth(data)/2; return position;
<<<<<<< describe('the y-axes', function() { describe('when composing charts with both left and right y-axes', function () { var rightChart; ======= describe('subchart title rendering', function () { beforeEach(function () { chart.renderTitle(false); chart.render(); }); it('should respect boolean flag when title not set', function () { expect(chart.select(".sub._0 .dc-tooltip._0 .dot").empty()).toBeTruthy(); expect(chart.select(".sub._1 .dc-tooltip._0 .dot").empty()).toBeTruthy(); }); }); describe('when using a right y-axis', function () { var rightChart; >>>>>>> describe('subchart title rendering', function () { beforeEach(function () { chart.renderTitle(false); chart.render(); }); it('should respect boolean flag when title not set', function () { expect(chart.select(".sub._0 .dc-tooltip._0 .dot").empty()).toBeTruthy(); expect(chart.select(".sub._1 .dc-tooltip._0 .dot").empty()).toBeTruthy(); }); }); describe('the y-axes', function() { describe('when composing charts with both left and right y-axes', function () { var rightChart;
<<<<<<< var _boxOnClick = function () {}; var _xAxisOnClick = function () {}; var _yAxisOnClick = function () {}; ======= _chart.boxOnClick = function (d) { var filter = d.key; dc.events.trigger(function() { _chart.filter(filter); dc.redrawAll(_chart.chartGroup()); }); }; function filterAxis(axis, value) { var cellsOnAxis = _chart.selectAll(".box-group").filter( function (d) { return d.key[axis] == value; }); var unfilteredCellsOnAxis = cellsOnAxis.filter( function (d) { return !_chart.hasFilter(d.key); }); dc.events.trigger(function() { if(unfilteredCellsOnAxis.empty()) { cellsOnAxis.each( function (d) { _chart.filter(d.key); }); } else { unfilteredCellsOnAxis.each( function (d) { _chart.filter(d.key); }); } dc.redrawAll(_chart.chartGroup()); }); } dc.override(_chart, "filter", function(filter) { if(filter) { return _chart._filter(dc.filters.TwoDimensionalFilter(filter)); } else { return _chart._filter(); } }); _chart.xAxisOnClick = function (d) { filterAxis(0, d); }; _chart.yAxisOnClick = function (d) { filterAxis(1, d); }; _chart.keyAccessor(function(d) { return d.key[0]; }); >>>>>>> var _xAxisOnClick = function (d) { filterAxis(0, d); }; var _yAxisOnClick = function (d) { filterAxis(1, d); }; var _boxOnClick = function (d) { var filter = d.key; dc.events.trigger(function() { _chart.filter(filter); dc.redrawAll(_chart.chartGroup()); }); }; function filterAxis(axis, value) { var cellsOnAxis = _chart.selectAll(".box-group").filter( function (d) { return d.key[axis] == value; }); var unfilteredCellsOnAxis = cellsOnAxis.filter( function (d) { return !_chart.hasFilter(d.key); }); dc.events.trigger(function() { if(unfilteredCellsOnAxis.empty()) { cellsOnAxis.each( function (d) { _chart.filter(d.key); }); } else { unfilteredCellsOnAxis.each( function (d) { _chart.filter(d.key); }); } dc.redrawAll(_chart.chartGroup()); }); } dc.override(_chart, "filter", function(filter) { if(filter) { return _chart._filter(dc.filters.TwoDimensionalFilter(filter)); } else { return _chart._filter(); } }); <<<<<<< .on("click", _chart.boxOnClick()); ======= .on("click", _chart.boxOnClick); >>>>>>> .on("click", _chart.boxOnClick()); <<<<<<< dc.transition(boxes.selectAll("rect"), _chart.transitionDuration()) .attr("class","heat-box") ======= dc.transition(boxes.select("rect"), _chart.transitionDuration()) >>>>>>> dc.transition(boxes.selectAll("rect"), _chart.transitionDuration()) <<<<<<< dc.transition(gRows.selectAll('text'), _chart.transitionDuration()) .text(function(d) { return d; }) .attr("y", function(d) { return rows(d) + boxHeight/2; }); }; _chart.boxOnClick = function (f) { if (!arguments.length) return _boxOnClick; _boxOnClick = f; return _chart; }; _chart.xAxisOnClick = function (f) { if (!arguments.length) return _xAxisOnClick; _xAxisOnClick = f; return _chart; }; _chart.yAxisOnClick = function (f) { if (!arguments.length) return _yAxisOnClick; _yAxisOnClick = f; return _chart; ======= if (_chart.hasFilter()) { _chart.selectAll("g.box-group").each(function (d) { if (_chart.isSelectedNode(d)) { _chart.highlightSelected(this); } else { _chart.fadeDeselected(this); } }); } else { _chart.selectAll("g.box-group").each(function (d) { _chart.resetHighlight(this); }); } }; _chart.xBorderRadius = function (d) { if (arguments.length) { _xBorderRadius = d; } return _xBorderRadius; }; _chart.yBorderRadius = function (d) { if (arguments.length) { _yBorderRadius = d; } return _yBorderRadius; }; _chart.isSelectedNode = function (d) { return _chart.hasFilter(d.key); >>>>>>> dc.transition(gRows.selectAll('text'), _chart.transitionDuration()) .text(function(d) { return d; }) .attr("y", function(d) { return rows(d) + boxHeight/2; }); if (_chart.hasFilter()) { _chart.selectAll("g.box-group").each(function (d) { if (_chart.isSelectedNode(d)) { _chart.highlightSelected(this); } else { _chart.fadeDeselected(this); } }); } else { _chart.selectAll("g.box-group").each(function (d) { _chart.resetHighlight(this); }); } }; _chart.boxOnClick = function (f) { if (!arguments.length) return _boxOnClick; _boxOnClick = f; return _chart; }; _chart.xAxisOnClick = function (f) { if (!arguments.length) return _xAxisOnClick; _xAxisOnClick = f; return _chart; }; _chart.yAxisOnClick = function (f) { if (!arguments.length) return _yAxisOnClick; _yAxisOnClick = f; return _chart; }; _chart.xBorderRadius = function (d) { if (arguments.length) { _xBorderRadius = d; } return _xBorderRadius; }; _chart.yBorderRadius = function (d) { if (arguments.length) { _yBorderRadius = d; } return _yBorderRadius; }; _chart.isSelectedNode = function (d) { return _chart.hasFilter(d.key);
<<<<<<< * dc 2.1.0-dev ======= * dc 2.0.0-beta.18 >>>>>>> * dc 2.1.0-dev <<<<<<< #### Version 2.1.0-dev The entire dc.js library is scoped under the **dc** name space. It does not introduce anything else into the global name space. #### Function Chaining Most dc functions are designed to allow function chaining, meaning they return the current chart instance whenever it is appropriate. This way chart configuration can be written in the following style: ```js chart.width(300) .height(300) .filter('sunday') ``` The getter forms of functions do not participate in function chaining because they necessarily return values that are not the chart. (Although some, such as `.svg` and `.xAxis`, return values that are chainable d3 objects.) **/ ======= * The entire dc.js library is scoped under the **dc** name space. It does not introduce * anything else into the global name space. * * Most `dc` functions are designed to allow function chaining, meaning they return the current chart * instance whenever it is appropriate. The getter forms of functions do not participate in function * chaining because they necessarily return values that are not the chart. Although some, * such as `.svg` and `.xAxis`, return values that are chainable d3 objects. * @namespace dc * @version 2.0.0-beta.18 * @example * // Example chaining * chart.width(300) * .height(300) * .filter('sunday'); */ >>>>>>> * The entire dc.js library is scoped under the **dc** name space. It does not introduce * anything else into the global name space. * * Most `dc` functions are designed to allow function chaining, meaning they return the current chart * instance whenever it is appropriate. The getter forms of functions do not participate in function * chaining because they necessarily return values that are not the chart. Although some, * such as `.svg` and `.xAxis`, return values that are chainable d3 objects. * @namespace dc * @version 2.1.0-dev * @example * // Example chaining * chart.width(300) * .height(300) * .filter('sunday'); */ <<<<<<< version: '2.1.0-dev', ======= version: '2.0.0-beta.18', >>>>>>> version: '2.1.0-dev', <<<<<<< #### .cols([keys]) Gets or sets the keys used to create the columns of the heatmap, as an array. By default, all the values will be fetched from the data using the key accessor. **/ _chart.cols = function (_) { if (!arguments.length) { ======= * Gets or sets the keys used to create the columns of the heatmap, as an array. By default, all * the values will be fetched from the data using the key accessor, and they will be sorted in * ascending order. * @name cols * @memberof dc.heatMap * @instance * @param {Array<String|Number>} [cols] * @returns {Chart} */ _chart.cols = function (cols) { if (arguments.length) { _cols = cols; return _chart; } if (_cols) { >>>>>>> * Gets or sets the keys used to create the columns of the heatmap, as an array. By default, all * the values will be fetched from the data using the key accessor. * @name cols * @memberof dc.heatMap * @instance * @param {Array<String|Number>} [cols] * @returns {Chart} */ _chart.cols = function (cols) { if (!arguments.length) {
<<<<<<< this._handlers["toggle-command-line"] = function(action_id, event, target) { eventHandlers.click["toggle-console"](); return false; }; ======= this._handlers["navigate-next-top-tab"] = function(action_id, event, target) { window.topCell.tab.navigate_to_next_or_previous_tab(false); return false; } this._handlers["navigate-previous-top-tab"] = function(action_id, event, target) { window.topCell.tab.navigate_to_next_or_previous_tab(true); return false; } >>>>>>> this._handlers["toggle-command-line"] = function(action_id, event, target) { eventHandlers.click["toggle-console"](); return false; }; this._handlers["navigate-next-top-tab"] = function(action_id, event, target) { window.topCell.tab.navigate_to_next_or_previous_tab(false); return false; }; this._handlers["navigate-previous-top-tab"] = function(action_id, event, target) { window.topCell.tab.navigate_to_next_or_previous_tab(true); return false; };
<<<<<<< intersects(range) { return !(range.x - range.w > this.x + this.w || range.x + range.w < this.x - this.w || range.y - range.h > this.y + this.h || range.y + range.h < this.y - this.h); } } // circle class for a circle shaped query class Circle { constructor(x, y, r){ this.x = x; this.y = y; this.r = r; } contains(point) { // check if the point is in the circle by checking if the euclidean distance of // the point and the center of the circle if smaller or equal to the radius of // the circle dist = Math.sqrt(Math.pow((point.x - this.x), 2) + Math.pow((point.y - this.y), 2)); return dist <= this.r; } intersects(range){ var xDist = Math.abs(range.x - this.x); var yDist = Math.abs(range.y - this.y); // radius of the circle var r = this.r; // radius of circle squared var r_squared = Math.pow(this.r, 2); var w = range.w; var h = range.h; var edges = Math.pow((xDist - w), 2) + Math.pow((yDist - h), 2); // no intersection if (xDist > (r + w) || yDist > (r + h)) return false; // intersection within the circle if (xDist <= w || yDist <= h) return true; // intersection on the edge of the circle return edges <= r_squared; } ======= intersects(range) { return !(range.x - range.w > this.x + this.w || range.x + range.w < this.x - this.w || range.y - range.h > this.y + this.h || range.y + range.h < this.y - this.h); } >>>>>>> intersects(range) { return !(range.x - range.w > this.x + this.w || range.x + range.w < this.x - this.w || range.y - range.h > this.y + this.h || range.y + range.h < this.y - this.h); } } // circle class for a circle shaped query class Circle { constructor(x, y, r){ this.x = x; this.y = y; this.r = r; } contains(point) { // check if the point is in the circle by checking if the euclidean distance of // the point and the center of the circle if smaller or equal to the radius of // the circle dist = Math.sqrt(Math.pow((point.x - this.x), 2) + Math.pow((point.y - this.y), 2)); return dist <= this.r; } intersects(range){ var xDist = Math.abs(range.x - this.x); var yDist = Math.abs(range.y - this.y); // radius of the circle var r = this.r; // radius of circle squared var r_squared = Math.pow(this.r, 2); var w = range.w; var h = range.h; var edges = Math.pow((xDist - w), 2) + Math.pow((yDist - h), 2); // no intersection if (xDist > (r + w) || yDist > (r + h)) return false; // intersection within the circle if (xDist <= w || yDist <= h) return true; // intersection on the edge of the circle return edges <= r_squared; } <<<<<<< // if (!this.boundary.intersects(range)) { // return; // } if(!range.intersects(this.boundary)){ return found; } else { for (let p of this.points) { if (range.contains(p)) { found.push(p); } } if (this.divided) { this.northwest.query(range, found); this.northeast.query(range, found); this.southwest.query(range, found); this.southeast.query(range, found); ======= if (!this.boundary.intersects(range)) { return found; } for (let p of this.points) { if (range.contains(p)) { found.push(p); >>>>>>> if(!range.intersects(this.boundary)){ return found; } else { for (let p of this.points) { if (range.contains(p)) { found.push(p); } } if (this.divided) { this.northwest.query(range, found); this.northeast.query(range, found); this.southwest.query(range, found); this.southeast.query(range, found);
<<<<<<< var msaKeepdesk = [ "Baltimore-Towson, MD", "Bloomington, IN", "Boston, MA", "Chicago, IL-IN-WI", "Corvallis, OR", "Danville, IL", "Honolulu, HI", "Lebanon, PA", "Los Angeles, CA", "New York City, NY", "Rochester, MN", "San Francisco", "Seattle, WA", "Washington, DC", "Muncie, IN", "Hot Springs, AR", "Washington, DC", "Houston, TX", "Dallas-Fort Worth, TX" ] msaKeepmobile = [ "Baltimore-Towson, MD", "Bloomington, IN", "Chicago, IL-IN-WI", "Corvallis, OR", "Danville, IL", "Honolulu, HI", "Lebanon, PA", "Los Angeles, CA", "New York City, NY", "Rochester, MN", "San Francisco", "Washington, DC", "Muncie, IN", "Hot Springs, AR", "Washington, DC", ] ======= >>>>>>> var msaKeepdesk = [ "Baltimore-Towson, MD", "Bloomington, IN", "Chicago, IL-IN-WI", "Corvallis, OR", "Danville, IL", "Honolulu, HI", "Los Angeles, CA", "New York City, NY", "Rochester, MN", "San Francisco", "Washington, DC", "Muncie, IN", "Hot Springs, AR", "Washington, DC", "Houston, TX", "Dallas-Fort Worth, TX" ] msaKeepmobile = [ "Baltimore-Towson, MD", "Bloomington, IN", "Chicago, IL-IN-WI", "Corvallis, OR", "Danville, IL", "Honolulu, HI", "Los Angeles, CA", "New York City, NY", "Rochester, MN", "San Francisco", "Washington, DC", "Muncie, IN", "Hot Springs, AR", "Washington, DC", ] var colors = { 'red1': '#6C2315', 'red2': '#A23520', 'red3': '#D8472B', 'red4': '#E27560', 'red5': '#ECA395', 'red6': '#F5D1CA', 'orange1': '#714616', 'orange2': '#AA6A21', 'orange3': '#E38D2C', 'orange4': '#EAAA61', 'orange5': '#F1C696', 'orange6': '#F8E2CA', 'yellow1': '#77631B', 'yellow2': '#B39429', 'yellow3': '#EFC637', 'yellow4': '#F3D469', 'yellow5': '#F7E39B', 'yellow6': '#FBF1CD', 'teal1': '#0B403F', 'teal2': '#11605E', 'teal3': '#17807E', 'teal4': '#51A09E', 'teal5': '#8BC0BF', 'teal6': '#C5DFDF', 'blue1': '#28556F', 'blue2': '#3D7FA6', 'blue3': '#51AADE', 'blue4': '#7DBFE6', 'blue5': '#A8D5EF', 'blue6': '#D3EAF7' }; <<<<<<< ======= // var entry = d3.entries(lines); // var values2 = d3.values(lines); // var keys = d3.keys(lines); // var numberFormat = d3.format("d") // console.log(msaValue) // console.log(values2[0][0]) // console.log(values2[0][0]["msa"]) >>>>>>> <<<<<<< .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); ======= .attr("transform", "translate(" + margin.left + "," + margin.top + ")") .on('mouseout', on_mouseout); >>>>>>> .attr("transform", "translate(" + margin.left + "," + margin.top + ")"); <<<<<<< // var voronoiGroup = svg.append("g") // .attr("class", "voronoi"); // voronoiGroup.selectAll("path") // .data(voronoi(d3.entries(lines))) // .enter().append("path") // .attr("d", function(d) { return "M" + d.join("L") + "Z"; }) // .on("mouseover", mouseover) // .on("mouseout", mouseout); ======= >>>>>>> // var voronoiGroup = svg.append("g") // .attr("class", "voronoi"); // voronoiGroup.selectAll("path") // .data(voronoi(d3.entries(lines))) // .enter().append("path") // .attr("d", function(d) { return "M" + d.join("L") + "Z"; }) // .on("mouseover", mouseover) // .on("mouseout", mouseout); <<<<<<< // left side labels ======= // var toggleColor = (function(){ // var currentColor = "#a0a0a0"; // return function(){ // currentColor = currentColor == "#a0a0a0" ? "#3D7FA6" : "#a0a0a0"; // d3.select(".line." + this.getAttribute('class')).style("stroke", currentColor); // } // })(); // d3.selectAll("#hidden-path") // .on("click", toggleColor); // console.log(lines) // console.log(entry) // console.log(entry[0]["key"]) // console.log(entry[0][key][0]) // console.log(keys[0]) // left side labels >>>>>>> // left white boxes svg.append('g').selectAll('rect') .data(d3.entries(lines)) .enter() .append('rect') // console.log(d.key) .attr('id', "whitebox") .attr('class', function(d) { return "box" + d.key.replace(/\W+/g, '-').toLowerCase(); }) // .attr("x","-19%") .attr("x",function(d) { return x(d['value'][0]['msa'])-195; }) .attr("y",function(d) { return y(d['value'][0]['amt'])-9; }) .attr("width", "12em") .attr("height", "1em") .attr("dy", ".3em"); // .attr("dx", "10px"); // left side labels <<<<<<< }) ======= }) >>>>>>> })
<<<<<<< rxIpc.registerListener('backend-rpccall', createObservable); } ======= rxIpc.registerListener('rpc-channel', createObservable); } function checkDaemon(options) { return new Promise((resolve, reject) => { const _timeout = TIMEOUT; TIMEOUT = 150; rpcCall( 'getnetworkinfo', null, cookie.getAuth(options), (error, response) => { rxIpc.removeListeners(); if (error) { // console.log('ERROR:', error); reject(); } else if (response) { resolve(); } }); TIMEOUT = _timeout; }); } exports.init = init; exports.checkDaemon = checkDaemon; >>>>>>> rxIpc.registerListener('rpc-channel', createObservable); }
<<<<<<< const _options = require('./modules/options'); const init = require('./modules/init'); const rpc = require('./modules/rpc/rpc'); const _auth = require('./modules/webrequest/http-auth'); const daemon = require('./modules/daemon/daemon'); ======= const options = require('./modules/options').parse(); const log = require('./modules/logger').init(); const init = require('./modules/init'); const rpc = require('./modules/rpc/rpc'); const daemon = require('./modules/daemon/daemon'); >>>>>>> const options = require('./modules/options').parse(); const log = require('./modules/logger').init(); const init = require('./modules/init'); const rpc = require('./modules/rpc/rpc'); const _auth = require('./modules/webrequest/http-auth'); const daemon = require('./modules/daemon/daemon'); <<<<<<< log.debug('app ready') options = _options.parse(); _auth.init(); ======= log.info('app ready') log.debug('argv', process.argv); log.debug('options', options); >>>>>>> log.info('app ready') log.debug('argv', process.argv); log.debug('options', options); // initialize the authentication filter _auth.init();
<<<<<<< Query.prototype.removed = function(id) { this._debug('removed id:%s', id); ======= Query.prototype.removed = function(id, callback) { callback = callback || function() {}; >>>>>>> Query.prototype.removed = function(id, callback) { this._debug('removed id:%s', id); callback = callback || function() {}; <<<<<<< Query.prototype.changed = function(id, fields) { this._debug('changed id:%s fields:%j', id, fields); if(this._docMap[id]) { ======= Query.prototype.changed = function(id, fields, callback) { callback = callback || function() {}; if(this._idMap[id]) { >>>>>>> Query.prototype.changed = function(id, fields, callback) { this._debug('changed id:%s fields:%j', id, fields); callback = callback || function() {}; if(this._docMap[id]) {
<<<<<<< function windowDiscordSettings() { const discord = new BrowserWindow({ //parent: mainWindow, icon: iconDefault, modal: false, frame: windowConfig.frame, titleBarStyle: windowConfig.titleBarStyle, center: true, resizable: true, backgroundColor: '#232323', width: 600, minWidth: 600, height: 300, minHeight: 300, autoHideMenuBar: false, skipTaskbar: false, webPreferences: { nodeIntegration: true, webviewTag: true, }, }) discord.loadFile( path.join( __dirname, './src/pages/shared/window-buttons/window-buttons.html' ), { search: 'page=settings/discord_settings&icon=settings&title=' + __.trans('LABEL_SETTINGS_DISCORD') + '&hide=btn-minimize,btn-maximize', } ) } ======= function windowChangelog() { let changelog = new BrowserWindow({ title: __.trans('LABEL_CHANGELOG'), icon: iconDefault, modal: false, frame: windowConfig.frame, titleBarStyle: windowConfig.titleBarStyle, center: true, resizable: false, backgroundColor: '#232323', width: 460, height: 650, autoHideMenuBar: false, skipTaskbar: false, webPreferences: { nodeIntegration: true, webviewTag: true, }, }) changelog.loadFile( path.join( app.getAppPath(), '/src/pages/shared/window-buttons/window-buttons.html' ), { search: `title=${__.trans( 'LABEL_CHANGELOG' )}&page=changelog/changelog&hide=btn-minimize,btn-maximize`, } ) } >>>>>>> function windowDiscordSettings() { const discord = new BrowserWindow({ //parent: mainWindow, icon: iconDefault, modal: false, frame: windowConfig.frame, titleBarStyle: windowConfig.titleBarStyle, center: true, resizable: true, backgroundColor: '#232323', width: 600, minWidth: 600, height: 300, minHeight: 300, autoHideMenuBar: false, skipTaskbar: false, webPreferences: { nodeIntegration: true, webviewTag: true, }, }) discord.loadFile( path.join( __dirname, './src/pages/shared/window-buttons/window-buttons.html' ), { search: 'page=settings/discord_settings&icon=settings&title=' + __.trans('LABEL_SETTINGS_DISCORD') + '&hide=btn-minimize,btn-maximize', } ) } function windowChangelog() { let changelog = new BrowserWindow({ title: __.trans('LABEL_CHANGELOG'), icon: iconDefault, modal: false, frame: windowConfig.frame, titleBarStyle: windowConfig.titleBarStyle, center: true, resizable: false, backgroundColor: '#232323', width: 460, height: 650, autoHideMenuBar: false, skipTaskbar: false, webPreferences: { nodeIntegration: true, webviewTag: true, }, }) changelog.loadFile( path.join( app.getAppPath(), '/src/pages/shared/window-buttons/window-buttons.html' ), { search: `title=${__.trans( 'LABEL_CHANGELOG' )}&page=changelog/changelog&hide=btn-minimize,btn-maximize`, } ) }
<<<<<<< if (!PDFJS.isFirefoxExtension || (PDFJS.isFirefoxExtension && FirefoxCom.request('searchEnabled'))) { document.querySelector('#viewSearch').classList.remove('hidden'); } ======= // Listen for warnings to trigger the fallback UI. Errors should be caught // and call PDFView.error() so we don't need to listen for those. PDFJS.LogManager.addLogger({ warn: function() { PDFView.fallback(); } }); >>>>>>> if (!PDFJS.isFirefoxExtension || (PDFJS.isFirefoxExtension && FirefoxCom.request('searchEnabled'))) { document.querySelector('#viewSearch').classList.remove('hidden'); } // Listen for warnings to trigger the fallback UI. Errors should be caught // and call PDFView.error() so we don't need to listen for those. PDFJS.LogManager.addLogger({ warn: function() { PDFView.fallback(); } });
<<<<<<< messageHandler.on('text_extracted', function pdfDocError(data) { var index = data.index; if (this.textExtracted) this.textExtracted(index); }, this); ======= messageHandler.on('jpeg_decode', function(data, promise) { var imageData = data[0]; var components = data[1]; if (components != 3 && components != 1) error('Only 3 component or 1 component can be returned'); var img = new Image(); img.onload = (function jpegImageLoaderOnload() { var width = img.width; var height = img.height; var size = width * height; var rgbaLength = size * 4; var buf = new Uint8Array(size * components); var tmpCanvas = new ScratchCanvas(width, height); var tmpCtx = tmpCanvas.getContext('2d'); tmpCtx.drawImage(img, 0, 0); var data = tmpCtx.getImageData(0, 0, width, height).data; if (components == 3) { for (var i = 0, j = 0; i < rgbaLength; i += 4, j += 3) { buf[j] = data[i]; buf[j + 1] = data[i + 1]; buf[j + 2] = data[i + 2]; } } else if (components == 1) { for (var i = 0, j = 0; i < rgbaLength; i += 4, j++) { buf[j] = data[i]; } } promise.resolve({ data: buf, width: width, height: height}); }).bind(this); var src = 'data:image/jpeg;base64,' + window.btoa(imageData); img.src = src; }); >>>>>>> messageHandler.on('text_extracted', function pdfDocError(data) { var index = data[0]; if (this.textExtracted) this.textExtracted(index); }, this); messageHandler.on('jpeg_decode', function(data, promise) { var imageData = data[0]; var components = data[1]; if (components != 3 && components != 1) error('Only 3 component or 1 component can be returned'); var img = new Image(); img.onload = (function jpegImageLoaderOnload() { var width = img.width; var height = img.height; var size = width * height; var rgbaLength = size * 4; var buf = new Uint8Array(size * components); var tmpCanvas = new ScratchCanvas(width, height); var tmpCtx = tmpCanvas.getContext('2d'); tmpCtx.drawImage(img, 0, 0); var data = tmpCtx.getImageData(0, 0, width, height).data; if (components == 3) { for (var i = 0, j = 0; i < rgbaLength; i += 4, j += 3) { buf[j] = data[i]; buf[j + 1] = data[i + 1]; buf[j + 2] = data[i + 2]; } } else if (components == 1) { for (var i = 0, j = 0; i < rgbaLength; i += 4, j++) { buf[j] = data[i]; } } promise.resolve({ data: buf, width: width, height: height}); }).bind(this); var src = 'data:image/jpeg;base64,' + window.btoa(imageData); img.src = src; });
<<<<<<< if ('disableWorker' in params) PDFJS.disableWorker = params['disableWorker'] === 'true' ? true : false; ======= var sidebarScrollView = document.getElementById('sidebarScrollView'); sidebarScrollView.addEventListener('scroll', updateThumbViewArea, true); >>>>>>> if ('disableWorker' in params) PDFJS.disableWorker = params['disableWorker'] === 'true' ? true : false; var sidebarScrollView = document.getElementById('sidebarScrollView'); sidebarScrollView.addEventListener('scroll', updateThumbViewArea, true);
<<<<<<< for (var i = 1; i <= pagesCount; i++) { var page = pdf.getPage(i); var pageView = new PageView(container, page, i, page.width, page.height, page.stats, this.navigateTo.bind(this)); var thumbnailView = new ThumbnailView(thumbsView, page, i, page.width / page.height); bindOnAfterDraw(pageView, thumbnailView); pages.push(pageView); thumbnails.push(thumbnailView); var pageRef = page.ref; pagesRefMap[pageRef.num + ' ' + pageRef.gen + ' R'] = i; } ======= var pagePromises = []; for (var i = 1; i <= pagesCount; i++) pagePromises.push(pdfDocument.getPage(i)); var self = this; var pagesPromise = PDFJS.Promise.all(pagePromises); pagesPromise.then(function(promisedPages) { for (var i = 1; i <= pagesCount; i++) { var page = promisedPages[i - 1]; var pageView = new PageView(container, page, i, scale, page.stats, self.navigateTo.bind(self)); var thumbnailView = new ThumbnailView(sidebar, page, i); bindOnAfterDraw(pageView, thumbnailView); pages.push(pageView); thumbnails.push(thumbnailView); var pageRef = page.ref; pagesRefMap[pageRef.num + ' ' + pageRef.gen + ' R'] = i; } self.pagesRefMap = pagesRefMap; }); >>>>>>> var pagePromises = []; for (var i = 1; i <= pagesCount; i++) pagePromises.push(pdfDocument.getPage(i)); var self = this; var pagesPromise = PDFJS.Promise.all(pagePromises); pagesPromise.then(function(promisedPages) { for (var i = 1; i <= pagesCount; i++) { var page = promisedPages[i - 1]; var pageView = new PageView(container, page, i, scale, page.stats, self.navigateTo.bind(self)); var thumbnailView = new ThumbnailView(thumbsView, page, i); bindOnAfterDraw(pageView, thumbnailView); pages.push(pageView); thumbnails.push(thumbnailView); var pageRef = page.ref; pagesRefMap[pageRef.num + ' ' + pageRef.gen + ' R'] = i; } self.pagesRefMap = pagesRefMap; }); <<<<<<< if (pdf.catalog.documentOutline) { this.outline = new DocumentOutlineView(pdf.catalog.documentOutline); var outlineSwitchButton = document.getElementById('viewOutline'); outlineSwitchButton.removeAttribute('disabled'); this.switchSidebarView('outline'); } ======= // outline and initial view depends on destinations and pagesRefMap PDFJS.Promise.all([pagesPromise, destinationsPromise]).then(function() { pdfDocument.getOutline().then(function(outline) { if (!outline) return; >>>>>>> // outline and initial view depends on destinations and pagesRefMap PDFJS.Promise.all([pagesPromise, destinationsPromise]).then(function() { pdfDocument.getOutline().then(function(outline) { if (!outline) return; <<<<<<< var canvasWidth = 98; var canvasHeight = canvasWidth / this.width * this.height; var scaleX = this.scaleX = (canvasWidth / this.width); var scaleY = this.scaleY = (canvasHeight / this.height); ======= var maxThumbSize = 134; var canvasWidth = this.width = pageRatio >= 1 ? maxThumbSize : maxThumbSize * pageRatio; var canvasHeight = this.height = pageRatio <= 1 ? maxThumbSize : maxThumbSize / pageRatio; var scaleX = this.scaleX = (canvasWidth / pageWidth); var scaleY = this.scaleY = (canvasHeight / pageHeight); >>>>>>> var canvasWidth = 98; var canvasHeight = canvasWidth / this.width * this.height; var scaleX = this.scaleX = (canvasWidth / pageWidth); var scaleY = this.scaleY = (canvasHeight / pageHeight); <<<<<<< var view = page.view; ctx.translate(-view.x * scaleX, -view.y * scaleY); ======= >>>>>>> <<<<<<< var thumbsView = document.getElementById('thumbnailView'); thumbsView.addEventListener('scroll', updateThumbViewArea, true); document.getElementById('sidebarToggle').addEventListener('click', function() { this.classList.toggle('toggled'); document.getElementById('toolbarSidebar').classList.toggle('hidden'); document.getElementById('sidebarContainer').classList.toggle('hidden'); updateThumbViewArea(); }); ======= var sidebarScrollView = document.getElementById('sidebarScrollView'); sidebarScrollView.addEventListener('scroll', updateThumbViewArea, true); PDFView.open(file, 0); >>>>>>> var thumbsView = document.getElementById('thumbnailView'); thumbsView.addEventListener('scroll', updateThumbViewArea, true); document.getElementById('sidebarToggle').addEventListener('click', function() { this.classList.toggle('toggled'); document.getElementById('toolbarSidebar').classList.toggle('hidden'); document.getElementById('sidebarContainer').classList.toggle('hidden'); updateThumbViewArea(); }); PDFView.open(file, 0);
<<<<<<< var TilingPattern = (function TilingPatternClosure() { var PAINT_TYPE_COLORED = 1, PAINT_TYPE_UNCOLORED = 2; ======= var TilingPattern = (function tilingPattern() { var PaintType = { COLORED: 1, UNCOLORED: 2 }; var MAX_PATTERN_SIZE = 512; >>>>>>> var TilingPattern = (function TilingPatternClosure() { var PaintType = { COLORED: 1, UNCOLORED: 2 }; var MAX_PATTERN_SIZE = 512;
<<<<<<< getBaseFontMetrics: function(baseFontName) { var map = {}; if (/^Symbol(-?(Bold|Italic))*$/.test(baseFontName)) { // special case for symbols var encoding = Encodings.symbolsEncoding; for (var i = 0, n = encoding.length, j; i < n; i++) { if (!(j = encoding[i])) continue; map[i] = GlyphsUnicode[j] || 0; } } var defaultWidth = 0; var widths = Metrics[stdFontMap[baseFontName] || baseFontName]; if (IsNum(widths)) { defaultWidth = widths; widths = null; } return { defaultWidth: defaultWidth, widths: widths || [], map: map }; }, translateFont: function(dict, xref, resources) { ======= translateFont: function partialEvaluatorTranslateFont(dict, xref, resources) { >>>>>>> getBaseFontMetrics: function(baseFontName) { var map = {}; if (/^Symbol(-?(Bold|Italic))*$/.test(baseFontName)) { // special case for symbols var encoding = Encodings.symbolsEncoding; for (var i = 0, n = encoding.length, j; i < n; i++) { if (!(j = encoding[i])) continue; map[i] = GlyphsUnicode[j] || 0; } } var defaultWidth = 0; var widths = Metrics[stdFontMap[baseFontName] || baseFontName]; if (IsNum(widths)) { defaultWidth = widths; widths = null; } return { defaultWidth: defaultWidth, widths: widths || [], map: map }; }, translateFont: function partialEvaluatorTranslateFont(dict, xref, resources) { <<<<<<< widths: glyphWidths, encoding: encoding ======= widths: (function partialEvaluatorWidths() { var glyphWidths = {}; for (var i = 0; i < widths.length; i++) glyphWidths[firstChar++] = widths[i]; return glyphWidths; })(), encoding: {} >>>>>>> widths: glyphWidths, encoding: encoding
<<<<<<< // If there is a pdfDoc on the last task executed, destroy it to free memory. if (task && task.pdfDoc) { task.pdfDoc.destroy(); delete task.pdfDoc; } ======= cleanup(); >>>>>>> // If there is a pdfDoc on the last task executed, destroy it to free memory. if (task && task.pdfDoc) { task.pdfDoc.destroy(); delete task.pdfDoc; } cleanup(); <<<<<<< if (r.readyState == 4) { var data = r.mozResponseArrayBuffer || r.mozResponse || r.responseArrayBuffer || r.response; try { task.pdfDoc = new WorkerPDFDoc(data); // task.pdfDoc = new PDFDoc(new Stream(data)); } catch (e) { failure = 'load PDF doc : ' + e.toString(); } task.pageNum = task.firstPage || 1, nextPage(task, failure); ======= try { task.pdfDoc = new PDFDoc(data); } catch (e) { failure = 'load PDF doc : ' + e.toString(); >>>>>>> try { task.pdfDoc = new PDFDoc(data); } catch (e) { failure = 'load PDF doc : ' + e.toString();
<<<<<<< const EXT_ID = '[email protected]'; const EXT_PREFIX = 'extensions.' + EXT_ID; ======= const PREF_PREFIX = 'PDFJSSCRIPT_PREF_PREFIX'; >>>>>>> const PREF_PREFIX = 'PDFJSSCRIPT_PREF_PREFIX'; <<<<<<< return getBoolPref(EXT_PREFIX + '.pdfBugEnabled', false); }, fallback: function(url) { var self = this; var domWindow = this.domWindow; var strings = getLocalizedStrings('chrome.properties'); var message = getLocalizedString(strings, 'unsupported_feature'); var win = Services.wm.getMostRecentWindow('navigator:browser'); var browser = win.gBrowser.getBrowserForDocument(domWindow.top.document); var notificationBox = win.gBrowser.getNotificationBox(browser); var buttons = [{ label: getLocalizedString(strings, 'open_with_different_viewer'), accessKey: null, callback: function() { self.download(url); } }]; notificationBox.appendNotification(message, 'pdfjs-fallback', null, notificationBox.PRIORITY_WARNING_LOW, buttons); ======= return getBoolPref(PREF_PREFIX + '.pdfBugEnabled', false); >>>>>>> return getBoolPref(PREF_PREFIX + '.pdfBugEnabled', false); }, fallback: function(url) { var self = this; var domWindow = this.domWindow; var strings = getLocalizedStrings('chrome.properties'); var message = getLocalizedString(strings, 'unsupported_feature'); var win = Services.wm.getMostRecentWindow('navigator:browser'); var browser = win.gBrowser.getBrowserForDocument(domWindow.top.document); var notificationBox = win.gBrowser.getNotificationBox(browser); var buttons = [{ label: getLocalizedString(strings, 'open_with_different_viewer'), accessKey: null, callback: function() { self.download(url); } }]; notificationBox.appendNotification(message, 'pdfjs-fallback', null, notificationBox.PRIORITY_WARNING_LOW, buttons);
<<<<<<< if ('textlayer' in hashParams) { switch (hashParams['textlayer']) { case 'off': PDFJS.disableTextLayer = true; break; case 'visible': case 'shadow': case 'hover': var viewer = document.getElementById('viewer'); viewer.classList.add('textLayer-' + hashParams['textlayer']); break; } } //#if !(FIREFOX || MOZCENTRAL) if ('pdfbug' in hashParams) { //#else //if ('pdfBug' in hashParams && FirefoxCom.requestSync('pdfBugEnabled')) { //#endif PDFJS.pdfBug = true; var pdfBug = hashParams['pdfbug']; var enabled = pdfBug.split(','); PDFBug.enable(enabled); PDFBug.init(); } ======= >>>>>>>
<<<<<<< initPassiveLoading: function pdfViewInitPassiveLoading() { if (!PDFView.loadingBar) { PDFView.loadingBar = new ProgressBar('#loadingBar', {}); } window.addEventListener('message', function window_message(e) { var args = e.data; if (!('pdfjsLoadAction' in args)) return; switch (args.pdfjsLoadAction) { case 'progress': PDFView.progress(args.loaded / args.total); break; case 'complete': PDFView.open(args.data, 0); break; } }); FirefoxCom.requestSync('initPassiveLoading', null); }, setTitleUsingUrl: function pdfViewSetTitleUsingUrl(url) { this.url = url; document.title = decodeURIComponent(getFileName(url)) || url; }, ======= get supportsFullscreen() { var doc = document.documentElement; var support = doc.requestFullScreen || doc.mozRequestFullScreen || doc.webkitRequestFullScreen; Object.defineProperty(this, 'supportsFullScreen', { value: support, enumerable: true, configurable: true, writable: false }); return support; }, >>>>>>> get supportsFullscreen() { var doc = document.documentElement; var support = doc.requestFullScreen || doc.mozRequestFullScreen || doc.webkitRequestFullScreen; Object.defineProperty(this, 'supportsFullScreen', { value: support, enumerable: true, configurable: true, writable: false }); return support; }, initPassiveLoading: function pdfViewInitPassiveLoading() { if (!PDFView.loadingBar) { PDFView.loadingBar = new ProgressBar('#loadingBar', {}); } window.addEventListener('message', function window_message(e) { var args = e.data; if (!('pdfjsLoadAction' in args)) return; switch (args.pdfjsLoadAction) { case 'progress': PDFView.progress(args.loaded / args.total); break; case 'complete': PDFView.open(args.data, 0); break; } }); FirefoxCom.requestSync('initPassiveLoading', null); }, setTitleUsingUrl: function pdfViewSetTitleUsingUrl(url) { this.url = url; document.title = decodeURIComponent(getFileName(url)) || url; },
<<<<<<< for (var i = 0; i < charstrings.length; i++) ======= for (var i = 0, ii = charstrings.length; i < ii; i++) { >>>>>>> for (var i = 0, ii = charstrings.length; i < ii; i++) <<<<<<< if (!cidToUnicode) return; // identity encoding var glyph = 1, i, j, k; for (i = 0; i < cidToUnicode.length; ++i) { ======= encoding[0] = { unicode: 0, width: 0 }; var glyph = 1, i, j, k, cidLength, ii; for (i = 0, ii = cidToUnicode.length; i < ii; ++i) { >>>>>>> if (!cidToUnicode) return; // identity encoding var glyph = 1, i, j, k, ii; for (i = 0, ii = cidToUnicode.length; i < ii; ++i) { <<<<<<< var reverseMapping = {}; var encoding = properties.baseEncoding; var i, length, glyphName; for (i = 0, length = encoding.length; i < length; ++i) { glyphName = encoding[i]; if (!glyphName || isSpecialUnicode(i)) continue; reverseMapping[glyphName] = i; } reverseMapping['.notdef'] = 0; var unusedUnicode = kCmapGlyphOffset; for (i = 0, length = glyphs.length; i < length; i++) { var item = glyphs[i]; var glyphName = item.glyph; var unicode = glyphName in reverseMapping ? reverseMapping[glyphName] : unusedUnicode++; charstrings.push({ glyph: glyphName, unicode: unicode, gid: i, charstring: item.data, width: item.width, lsb: item.lsb }); ======= var missings = []; for (var i = 0, ii = glyphs.length; i < ii; i++) { var glyph = glyphs[i]; var mapping = properties.glyphs[glyph.glyph]; if (!mapping) { if (glyph.glyph != '.notdef') missings.push(glyph.glyph); } else { charstrings.push({ glyph: glyph.glyph, unicode: mapping.unicode, charstring: glyph.data, width: glyph.width, lsb: glyph.lsb }); } >>>>>>> var reverseMapping = {}; var encoding = properties.baseEncoding; var i, length, glyphName; for (i = 0, length = encoding.length; i < length; ++i) { glyphName = encoding[i]; if (!glyphName || isSpecialUnicode(i)) continue; reverseMapping[glyphName] = i; } reverseMapping['.notdef'] = 0; var unusedUnicode = kCmapGlyphOffset; for (i = 0, length = glyphs.length; i < length; i++) { var item = glyphs[i]; var glyphName = item.glyph; var unicode = glyphName in reverseMapping ? reverseMapping[glyphName] : unusedUnicode++; charstrings.push({ glyph: glyphName, unicode: unicode, gid: i, charstring: item.data, width: item.width, lsb: item.lsb }); <<<<<<< var unicodeUsed = []; var unassignedUnicodeItems = []; for (var i = 0; i < charsets.length; i++) { ======= var firstChar = properties.firstChar; var glyphMap = {}; for (var i = 0, ii = charsets.length; i < ii; i++) { >>>>>>> var unicodeUsed = []; var unassignedUnicodeItems = []; for (var i = 0, ii = charsets.length; i < ii; i++) { <<<<<<< var nextUnusedUnicode = 0x21; for (var j = 0; j < unassignedUnicodeItems.length; ++j) { var i = unassignedUnicodeItems[j]; // giving unicode value anyway while (unicodeUsed[nextUnusedUnicode]) nextUnusedUnicode++; var code = nextUnusedUnicode++; ======= var differences = properties.differences; for (var i = 0, ii = differences.length; i < ii; ++i) { var glyph = differences[i]; if (!glyph) continue; var oldGlyph = charsets[i]; if (oldGlyph) delete glyphMap[oldGlyph]; glyphMap[differences[i]] = i; } var glyphs = properties.glyphs; for (var i = 1, ii = charsets.length; i < ii; i++) { var glyph = charsets[i]; var code = glyphMap[glyph] || 0; var mapping = glyphs[code] || glyphs[glyph] || { width: defaultWidth }; var unicode = mapping.unicode; if (unicode <= 0x1f || (unicode >= 127 && unicode <= 255)) unicode += kCmapGlyphOffset; var width = (mapping.hasOwnProperty('width') && isNum(mapping.width)) ? mapping.width : defaultWidth; properties.encoding[code] = { unicode: unicode, width: width }; >>>>>>> var nextUnusedUnicode = 0x21; for (var j = 0, jj = unassignedUnicodeItems.length; j < jj; ++j) { var i = unassignedUnicodeItems[j]; // giving unicode value anyway while (unicodeUsed[nextUnusedUnicode]) nextUnusedUnicode++; var code = nextUnusedUnicode++; <<<<<<< ======= // sort the array by the unicode value charstrings.sort(function type2CFFGetCharStringsSort(a, b) { return a.unicode - b.unicode; }); // remove duplicates -- they might appear during selection: // properties.glyphs[code] || properties.glyphs[glyph] var nextUnusedUnicode = kCmapGlyphOffset + 0x0020; var lastUnicode = charstrings[0].unicode, wasModified = false; for (var i = 1, ii = charstrings.length; i < ii; ++i) { if (lastUnicode != charstrings[i].unicode) { lastUnicode = charstrings[i].unicode; continue; } // duplicate found -- keeping the item that has // different code and unicode, that one created // as result of modification of the base encoding var duplicateIndex = charstrings[i].unicode == charstrings[i].code ? i : i - 1; charstrings[duplicateIndex].unicode = nextUnusedUnicode++; wasModified = true; } if (!wasModified) return charstrings; >>>>>>> <<<<<<< var baseEncoding = pos ? Encodings.ExpertEncoding : Encodings.StandardEncoding; for (var i = 0; i < charset.length; i++) { ======= var baseEncoding = pos ? Encodings.ExpertEncoding.slice() : Encodings.StandardEncoding.slice(); for (var i = 0, ii = charset.length; i < ii; i++) { >>>>>>> var baseEncoding = pos ? Encodings.ExpertEncoding : Encodings.StandardEncoding; for (var i = 0, ii = charset.length; i < ii; i++) {
<<<<<<< var PDFImage = (function pdfImage() { /** * Decode the image in the main thread if it supported. Resovles the promise * when the image data is ready. */ function handleImageData(handler, xref, res, image, promise) { if (image instanceof JpegStream && image.isNative) { // For natively supported jpegs send them to the main thread for decoding. var dict = image.dict; var colorSpace = dict.get('ColorSpace', 'CS'); colorSpace = ColorSpace.parse(colorSpace, xref, res); var numComps = colorSpace.numComps; handler.send('jpeg_decode', [image.getIR(), numComps], function(message) { var data = message.data; var stream = new Stream(data, 0, data.length, image.dict); promise.resolve(stream); }); } else { promise.resolve(image); } } function constructor(xref, res, image, inline, smask) { ======= var PDFImage = (function PDFImageClosure() { function PDFImage(xref, res, image, inline) { >>>>>>> var PDFImage = (function PDFImageClosure() { /** * Decode the image in the main thread if it supported. Resovles the promise * when the image data is ready. */ function handleImageData(handler, xref, res, image, promise) { if (image instanceof JpegStream && image.isNative) { // For natively supported jpegs send them to the main thread for decoding. var dict = image.dict; var colorSpace = dict.get('ColorSpace', 'CS'); colorSpace = ColorSpace.parse(colorSpace, xref, res); var numComps = colorSpace.numComps; handler.send('jpeg_decode', [image.getIR(), numComps], function(message) { var data = message.data; var stream = new Stream(data, 0, data.length, image.dict); promise.resolve(stream); }); } else { promise.resolve(image); } } function PDFImage(xref, res, image, inline, smask) { <<<<<<< ======= if (smask.image.src) { // smask is a DOM image var tempCanvas = new ScratchCanvas(width, height); var tempCtx = tempCanvas.getContext('2d'); var domImage = smask.image; tempCtx.drawImage(domImage, 0, 0, domImage.width, domImage.height, 0, 0, width, height); var data = tempCtx.getImageData(0, 0, width, height).data; for (var i = 0, j = 0, ii = width * height; i < ii; ++i, j += 4) buf[i] = data[j]; // getting first component value return buf; } >>>>>>> <<<<<<< function loadJpegStream(id, imageData, objs) { var img = new Image(); img.onload = (function jpegImageLoaderOnload() { objs.resolve(id, img); }); img.src = 'data:image/jpeg;base64,' + window.btoa(imageData); } ======= function loadJpegStream(id, imageData, objs) { var img = new Image(); img.onload = (function jpegImageLoaderOnload() { objs.resolve(id, img); }); img.src = 'data:image/jpeg;base64,' + window.btoa(imageData); } >>>>>>> function loadJpegStream(id, imageData, objs) { var img = new Image(); img.onload = (function jpegImageLoaderOnload() { objs.resolve(id, img); }); img.src = 'data:image/jpeg;base64,' + window.btoa(imageData); }
<<<<<<< validDate: date, count: 1000 ======= date: date, count: 1000, >>>>>>> validDate: date, count: 1000,
<<<<<<< .query({ validDate: submissionDate }) .then((res) => { ======= .query({ validDate: new Date().toISOString() }) .then(res => { >>>>>>> .query({ validDate: submissionDate }) .then(res => {
<<<<<<< validDate: term({ generate: date, matcher: dateRegex }), count: like(1000) } } ======= validDate: term({ generate: date, matcher: '\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\+|\\-)\\d{2}:\\d{2}', }), count: like(1000), }, }, >>>>>>> validDate: term({ generate: date, matcher: dateRegex }), count: like(1000), }, },
<<<<<<< els[0].css( 'width', size + 'px' ); els[1].css( 'marginLeft', ( size + spaceBetweenColumns ) + 'px' ); ======= els[0].css( 'width', ( size ) + 'px' ); els[1].css( 'marginLeft', ( size + 10 ) + 'px' ); $( '#left-panels-separator' ).css( 'left', (parseInt($('#leftmenu').css( 'width'),10) - 20) + 'px' ); >>>>>>> els[0].css( 'width', ( size ) + 'px' ); els[1].css( 'marginLeft', ( size + 10 ) + 'px' ); $( '#left-panels-separator' ).css( 'left', (parseInt($('#leftmenu').css( 'width'),10) - 20) + 'px' ); <<<<<<< var $leftmenu = $('#leftmenu'), width = $leftmenu.outerWidth(), margin = parseInt($leftmenu.css('marginLeft'), 10); $( '#maincontent' ).css( 'marginLeft', (width + margin + spaceBetweenColumns) + 'px' ); ======= // Temporary measure - not good approach, but least messy. $( '#maincontent' ).css( 'marginLeft', (parseInt($('#leftmenu').css( 'width'),10) + 10) + 'px' ); $( '#left-panels-separator' ).css( 'left', (parseInt($('#leftmenu').css( 'width'),10) - 20) + 'px' ); >>>>>>> var $leftmenu = $('#leftmenu'), width = $leftmenu.outerWidth(), margin = parseInt($leftmenu.css('marginLeft'), 10); $( '#maincontent' ).css( 'marginLeft', (width + margin + spaceBetweenColumns) + 'px' ); $( '#left-panels-separator' ).css( 'left', (parseInt($('#leftmenu').css( 'width'),10) - 20) + 'px' );
<<<<<<< 'use strict'; const fs = require('fs'), _ = require('lodash'), isNilOrEmpty = require('../utils/string_utils').isNilOrEmpty, buildException = require('../exceptions/exception_factory').buildException, Exceptions = require('../exceptions/exception_factory').exceptions; ======= const fs = require('fs'); const _ = require('lodash'); const isNilOrEmpty = require('../utils/string_utils').isNilOrEmpty; const BuildException = require('../exceptions/exception_factory').BuildException; const exceptions = require('../exceptions/exception_factory').exceptions; >>>>>>> const fs = require('fs'); const _ = require('lodash'); const isNilOrEmpty = require('../utils/string_utils').isNilOrEmpty; const BuildException = require('../exceptions/exception_factory').BuildException; const exceptions = require('../exceptions/exception_factory').exceptions; <<<<<<< readEntityJSON: readEntityJSON, toFilePath: toFilePath, doesFileExist: doesFileExist ======= readEntityJSON, toFilePath, doesfileExist >>>>>>> readEntityJSON, toFilePath, doesFileExist <<<<<<< throw new buildException(Exceptions.NullPointer, 'The passed file path must not be nil.'); ======= throw new BuildException(exceptions.NullPointer, 'The passed file path must not be nil.'); >>>>>>> throw new BuildException(exceptions.NullPointer, 'The passed file path must not be nil.'); <<<<<<< if (!doesFileExist(filePath)) { throw new buildException(Exceptions.FileNotFound, `The passed file '${filePath}' is a folder.`); ======= if (!doesfileExist(filePath)) { throw new BuildException(exceptions.FileNotFound, `The passed file '${filePath}' is a folder.`); >>>>>>> if (!doesFileExist(filePath)) { throw new BuildException(exceptions.FileNotFound, `The passed file '${filePath}' is a folder.`); <<<<<<< throw new buildException(Exceptions.FileNotFound, `The passed file '${filePath}' couldn't be found.`); ======= throw new BuildException(exceptions.FileNotFound, `The passed file '${filePath}' couldn't be found.`); >>>>>>> throw new BuildException(exceptions.FileNotFound, `The passed file '${filePath}' couldn't be found.`); <<<<<<< throw new buildException(Exceptions.NullPointer, 'The passed entity name must not be nil.'); ======= throw new BuildException(exceptions.NullPointer, 'The passed entity name must not be nil.'); >>>>>>> throw new BuildException(exceptions.NullPointer, 'The passed entity name must not be nil.');
<<<<<<< context('when passing valid args', () => { context('with no error', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/complex_jdl.jdl']); content = JDLParser.parse(input, 'mysql'); }); ======= describe('when passing valid args', () => { describe('with no error', () => { const input = parseFromFiles(['./test/test_files/complex_jdl.jdl']); const content = DocumentParser.parse(input, 'mysql'); >>>>>>> context('when passing valid args', () => { context('with no error', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/complex_jdl.jdl']); content = DocumentParser.parse(input, 'mysql'); }); <<<<<<< context('with a required relationship', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/required_relationships.jdl']); content = JDLParser.parse(input, 'sql'); }); ======= describe('with a required relationship', () => { const input = parseFromFiles(['./test/test_files/required_relationships.jdl']); const content = DocumentParser.parse(input, 'sql'); >>>>>>> context('with a required relationship', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/required_relationships.jdl']); content = DocumentParser.parse(input, 'sql'); }); <<<<<<< context('with a field name \'id\'', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/id_field.jdl']); content = JDLParser.parse(input, 'sql'); }); ======= describe('with a field name \'id\'', () => { const input = parseFromFiles(['./test/test_files/id_field.jdl']); const content = DocumentParser.parse(input, 'sql'); >>>>>>> context('with a field name \'id\'', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/id_field.jdl']); content = DocumentParser.parse(input, 'sql'); }); <<<<<<< context('with User entity as to for a relationship', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/user_entity_to_relationship.jdl']); content = JDLParser.parse(input, 'sql'); }); ======= describe('with User entity as to for a relationship', () => { const input = parseFromFiles(['./test/test_files/user_entity_to_relationship.jdl']); const content = DocumentParser.parse(input, 'sql'); >>>>>>> context('with User entity as to for a relationship', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/user_entity_to_relationship.jdl']); content = DocumentParser.parse(input, 'sql'); }); <<<<<<< context('with a required enum', () => { let content = null; let enumField = null; before(() => { const input = parseFromFiles(['./test/test_files/enum.jdl']); content = JDLParser.parse(input, 'sql'); enumField = new JDLField({ name: 'sourceType', type: 'MyEnum' }); enumField.addValidation(new JDLValidation({ name: Validations.REQUIRED })); }); ======= describe('with a required enum', () => { const input = parseFromFiles(['./test/test_files/enum.jdl']); const content = DocumentParser.parse(input, 'sql'); const enumField = new JDLField({ name: 'sourceType', type: 'MyEnum' }); enumField.addValidation(new JDLValidation({ name: Validations.REQUIRED })); >>>>>>> context('with a required enum', () => { let content = null; let enumField = null; before(() => { const input = parseFromFiles(['./test/test_files/enum.jdl']); content = DocumentParser.parse(input, 'sql'); enumField = new JDLField({ name: 'sourceType', type: 'MyEnum' }); enumField.addValidation(new JDLValidation({ name: Validations.REQUIRED })); }); <<<<<<< context('when using the noFluentMethods option', () => { let input = null; let content = null; before(() => { input = parseFromFiles(['./test/test_files/fluent_methods.jdl']); content = JDLParser.parse(input, 'sql'); }); ======= describe('when using the noFluentMethods option', () => { let input = parseFromFiles(['./test/test_files/fluent_methods.jdl']); let content = DocumentParser.parse(input, 'sql'); >>>>>>> context('when using the noFluentMethods option', () => { let input = null; let content = null; before(() => { input = parseFromFiles(['./test/test_files/fluent_methods.jdl']); content = DocumentParser.parse(input, 'sql'); }); <<<<<<< context('when parsing another complex JDL file', () => { let content = null; let options = null; before(() => { const input = parseFromFiles(['./test/test_files/complex_jdl_2.jdl']); content = JDLParser.parse(input, 'sql'); options = content.getOptions(); }); context('checking the entities', () => { it('parses them', () => { expect(content.entities.A).to.deep.eq({ name: 'A', tableName: 'A', fields: {}, comment: undefined }); expect(content.entities.B).to.deep.eq({ name: 'B', tableName: 'B', fields: {}, comment: undefined }); expect(content.entities.C).to.deep.eq({ name: 'C', tableName: 'C', fields: { name: { comment: undefined, name: 'name', type: 'String', validations: { required: { name: 'required', value: '' } ======= describe('when parsing another complex JDL file', () => { const input = parseFromFiles(['./test/test_files/complex_jdl_2.jdl']); const content = DocumentParser.parse(input, 'sql'); it('parses it', () => { expect(content.entities.A).to.deep.eq({ name: 'A', tableName: 'A', fields: {}, comment: undefined }); expect(content.entities.B).to.deep.eq({ name: 'B', tableName: 'B', fields: {}, comment: undefined }); expect(content.entities.C).to.deep.eq({ name: 'C', tableName: 'C', fields: { name: { comment: undefined, name: 'name', type: 'String', validations: { required: { name: 'required', value: '' >>>>>>> context('when parsing another complex JDL file', () => { let content = null; let options = null; before(() => { const input = parseFromFiles(['./test/test_files/complex_jdl_2.jdl']); content = DocumentParser.parse(input, 'sql'); options = content.getOptions(); }); context('checking the entities', () => { it('parses them', () => { expect(content.entities.A).to.deep.eq({ name: 'A', tableName: 'A', fields: {}, comment: undefined }); expect(content.entities.B).to.deep.eq({ name: 'B', tableName: 'B', fields: {}, comment: undefined }); expect(content.entities.C).to.deep.eq({ name: 'C', tableName: 'C', fields: { name: { comment: undefined, name: 'name', type: 'String', validations: { required: { name: 'required', value: '' } <<<<<<< context('when having two consecutive comments for fields', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/field_comments.jdl']); content = JDLParser.parse(input, 'sql'); }); ======= describe('when having two consecutive comments for fields', () => { const input = parseFromFiles(['./test/test_files/field_comments.jdl']); const content = DocumentParser.parse(input, 'sql'); >>>>>>> context('when having two consecutive comments for fields', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/field_comments.jdl']); content = DocumentParser.parse(input, 'sql'); }); <<<<<<< context('when having constants', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/constants.jdl']); content = JDLParser.parse(input, 'sql'); }); ======= describe('when having constants', () => { const input = parseFromFiles(['./test/test_files/constants.jdl']); const content = DocumentParser.parse(input, 'sql'); >>>>>>> context('when having constants', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/constants.jdl']); content = DocumentParser.parse(input, 'sql'); }); <<<<<<< context('when parsing application', () => { let application = null; before(() => { const input = parseFromFiles(['./test/test_files/application.jdl']); const content = JDLParser.parse(input, 'sql'); application = content.applications.toto.config; }); it('parses it', () => { expect(application.baseName).to.eq('toto'); expect(application.packageName).to.eq('com.mathieu.sample'); expect(application.packageFolder).to.eq('com/mathieu/sample'); expect(application.authenticationType).to.eq('jwt'); expect(application.hibernateCache).to.eq('no'); expect(application.clusteredHttpSession).to.eq('no'); expect(application.websocket).to.be.false; expect(application.databaseType).to.eq('sql'); expect(application.devDatabaseType).to.eq('h2Memory'); expect(application.prodDatabaseType).to.eq('mysql'); expect(application.useCompass).to.be.false; expect(application.buildTool).to.eq('maven'); expect(application.searchEngine).to.be.false; expect(application.enableTranslation).to.be.false; expect(application.applicationType).to.eq('monolith'); expect(application.testFrameworks.size()).to.equal(0); expect( application.languages.has('en') && application.languages.has('fr') ).be.true; expect(application.serverPort).to.eq(8080); expect(application.enableSocialSignIn).to.be.false; expect(application.useSass).to.be.false; expect(application.jhiPrefix).to.eq('jhi'); expect(application.messageBroker).to.be.false; expect(application.serviceDiscoveryType).to.be.false; expect(application.clientPackageManager).to.eq('yarn'); expect(application.clientFramework).to.eq('angular1'); expect(application.nativeLanguage).to.eq('en'); expect(application.frontEndBuilder).to.be.null; expect(application.skipUserManagement).to.be.false; expect(application.skipClient).to.be.false; expect(application.skipServer).to.be.false; }); }); context('when parsing filtered entities', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/filtering_without_service.jdl']); content = JDLParser.parse(input, 'sql'); }); ======= describe('when parsing filtered entities', () => { const input = parseFromFiles(['./test/test_files/filtering_without_service.jdl']); const content = DocumentParser.parse(input, 'sql'); >>>>>>> context('when parsing application', () => { let application = null; before(() => { const input = parseFromFiles(['./test/test_files/application.jdl']); const content = DocumentParser.parse(input, 'sql'); application = content.applications.toto.config; }); it('parses it', () => { expect(application.baseName).to.eq('toto'); expect(application.packageName).to.eq('com.mathieu.sample'); expect(application.packageFolder).to.eq('com/mathieu/sample'); expect(application.authenticationType).to.eq('jwt'); expect(application.hibernateCache).to.eq('no'); expect(application.clusteredHttpSession).to.eq('no'); expect(application.websocket).to.be.false; expect(application.databaseType).to.eq('sql'); expect(application.devDatabaseType).to.eq('h2Memory'); expect(application.prodDatabaseType).to.eq('mysql'); expect(application.useCompass).to.be.false; expect(application.buildTool).to.eq('maven'); expect(application.searchEngine).to.be.false; expect(application.enableTranslation).to.be.false; expect(application.applicationType).to.eq('monolith'); expect(application.testFrameworks.size()).to.equal(0); expect( application.languages.has('en') && application.languages.has('fr') ).be.true; expect(application.serverPort).to.eq(8080); expect(application.enableSocialSignIn).to.be.false; expect(application.useSass).to.be.false; expect(application.jhiPrefix).to.eq('jhi'); expect(application.messageBroker).to.be.false; expect(application.serviceDiscoveryType).to.be.false; expect(application.clientPackageManager).to.eq('yarn'); expect(application.clientFramework).to.eq('angular1'); expect(application.nativeLanguage).to.eq('en'); expect(application.frontEndBuilder).to.be.null; expect(application.skipUserManagement).to.be.false; expect(application.skipClient).to.be.false; expect(application.skipServer).to.be.false; }); }); context('when parsing filtered entities', () => { let content = null; before(() => { const input = parseFromFiles(['./test/test_files/filtering_without_service.jdl']); content = DocumentParser.parse(input, 'sql'); });
<<<<<<< init(passedDocument, passedDatabaseType); fillApplications(); ======= init(passedDocument, passedDatabaseType, applicationType); >>>>>>> init(passedDocument, passedDatabaseType, applicationType); fillApplications(); <<<<<<< throw new buildException(Exceptions.WrongType, `The type '${field.type}' doesn't exist.`); ======= throw new buildException(exceptions.WrongType, `The type '${field.type}' doesn't exist for ${passedDatabaseType}.`); >>>>>>> throw new buildException(Exceptions.WrongType, `The type '${field.type}' doesn't exist for ${passedDatabaseType}.`);
<<<<<<< var input = fs.readFileSync('./test/samples/valid_jdl.jdl', 'utf-8').toString(); var content = parse(input); ======= var input = fs.readFileSync('./test/test_files/valid_jdl.jdl', 'utf-8').toString(); var content = read(input); >>>>>>> var input = fs.readFileSync('./test/test_files/valid_jdl.jdl', 'utf-8').toString(); var content = parse(input); <<<<<<< parseFromFiles(['../../samples/invalid_file.txt']); ======= readFiles(['../../test_files/invalid_file.txt']); >>>>>>> parseFromFiles(['../../test_files/invalid_file.txt']); <<<<<<< parseFromFiles(['../../samples/folder.jdl']); ======= readFiles(['../../test_files/folder.jdl']); >>>>>>> parseFromFiles(['../../test_files/folder.jdl']); <<<<<<< var content = parseFromFiles(['./test/samples/valid_jdl.jdl']); ======= var content = readFiles(['./test/test_files/valid_jdl.jdl']); >>>>>>> var content = parseFromFiles(['./test/test_files/valid_jdl.jdl']); <<<<<<< var content = parseFromFiles(['./test/samples/valid_jdl.jdl', './test/samples/valid_jdl2.jdl']); ======= var content = readFiles(['./test/test_files/valid_jdl.jdl', './test/test_files/valid_jdl2.jdl']); >>>>>>> var content = parseFromFiles(['./test/test_files/valid_jdl.jdl', './test/test_files/valid_jdl2.jdl']);
<<<<<<< search () { this.updatePagination({ page: 1, totalItems: this.itemsLength }) }, 'computedPagination.sortBy': function () { this.updatePagination({ page: 1 }) }, 'computedPagination.descending': function () { this.updatePagination({ page: 1 }) } ======= itemsLength (totalItems) { this.updatePagination({ page: 1, totalItems }) } >>>>>>> itemsLength (totalItems) { this.updatePagination({ page: 1, totalItems }) }, 'computedPagination.sortBy': function () { this.updatePagination({ page: 1 }) }, 'computedPagination.descending': function () { this.updatePagination({ page: 1 }) }
<<<<<<< }, // template { collapsed_protos: function(setting) { return [ ['setting-composite', ['label', // TODO create ui string ui_strings.S_LABEL_COLLAPSED_INSPECTED_PROTOTYPES, ['input', 'type', 'text', 'handler', 'update-collapsed-prototypes', 'class', 'collapsed-prototypes', 'value', setting.get('collapsed-prototypes').join(', ') ], ], ['span', ' '], ['input', 'type', 'button', 'value', ui_strings.S_BUTTON_TEXT_APPLY, 'handler', 'apply-collapsed-prototypes' ], ['input', 'type', 'button', 'value', 'Set default value.', 'handler', 'default-collapsed-prototypes' ], 'class', ' ' ] ]; } } ======= }, null, "script" >>>>>>> }, // template { collapsed_protos: function(setting) { return [ ['setting-composite', ['label', // TODO create ui string ui_strings.S_LABEL_COLLAPSED_INSPECTED_PROTOTYPES, ['input', 'type', 'text', 'handler', 'update-collapsed-prototypes', 'class', 'collapsed-prototypes', 'value', setting.get('collapsed-prototypes').join(', ') ], ], ['span', ' '], ['input', 'type', 'button', 'value', ui_strings.S_BUTTON_TEXT_APPLY, 'handler', 'apply-collapsed-prototypes' ], ['input', 'type', 'button', 'value', 'Set default value.', 'handler', 'default-collapsed-prototypes' ], 'class', ' ' ] ]; } }, "script"
<<<<<<< it('should render role=combobox correctly when autocomplete', async () => { const wrapper = mount(VSelect, { propsData: { autocomplete: true, items: [] } }) let ele = wrapper.find('.input-group--select') expect(ele.length).toBe(1) expect(ele[0].element.getAttribute('role')).toBeFalsy() ele = wrapper.find('.input-group--select input') expect(ele.length).toBe(1) expect(ele[0].hasAttribute('role', 'combobox')).toBe(true) expect('Application is missing <v-app> component.').toHaveBeenTipped() }) it('should render role=combobox correctly when not autocomplete)', async () => { const wrapper = mount(VSelect, { propsData: { items: [] } }) let ele = wrapper.find('.input-group--select') expect(ele.length).toBe(1) expect(ele[0].hasAttribute('role', 'combobox')).toBe(true) ele = wrapper.find('.input-group--select input') expect(ele.length).toBe(0) expect('Application is missing <v-app> component.').toHaveBeenTipped() }) it('should render aria-hidden=true on arrow icon', async () => { const wrapper = mount(VSelect, { propsData: { items: [] } }) const icon = wrapper.find('i.input-group__append-icon') expect(icon.length).toBe(1) expect(icon[0].hasAttribute('aria-hidden', 'true')).toBe(true) expect('Application is missing <v-app> component.').toHaveBeenTipped() }) ======= it('should render a disabled input with placeholder', () => { const wrapper = mount(VSelect, { propsData: { placeholder: 'Placeholder' } }) const input = wrapper.find('input')[0] expect(input.hasAttribute('disabled', 'disabled')).toBe(true) expect(input.hasAttribute('placeholder', 'Placeholder')).toBe(true) expect(input.html()).toMatchSnapshot() expect('Application is missing <v-app> component.').toHaveBeenTipped() }) it('should not display when not autocomplete with placeholder and dirty', () => { const wrapper = mount(VSelect, { propsData: { placeholder: 'Placeholder', items: ['foo'], value: 'foo' } }) const input = wrapper.find('input')[0] expect(input.hasAttribute('style', 'display: none;')).toBe(true) expect(input.html()).toMatchSnapshot() expect('Application is missing <v-app> component.').toHaveBeenTipped() }) it('should change search input text when value changes', async () => { const wrapper = mount(VSelect, { attachToDocument: true, propsData: { autocomplete: true, placeholder: 'Placeholder', items: ['foo', 'bar'], value: 'foo' } }) await wrapper.vm.$nextTick() expect(wrapper.vm.searchValue).toBe('foo') wrapper.setProps({ value: null }) await wrapper.vm.$nextTick() expect(wrapper.vm.searchValue).toBe(undefined) expect('Application is missing <v-app> component.').toHaveBeenTipped() }) >>>>>>> it('should render role=combobox correctly when autocomplete', async () => { const wrapper = mount(VSelect, { propsData: { autocomplete: true, items: [] } }) let ele = wrapper.find('.input-group--select') expect(ele.length).toBe(1) expect(ele[0].element.getAttribute('role')).toBeFalsy() ele = wrapper.find('.input-group--select input') expect(ele.length).toBe(1) expect(ele[0].hasAttribute('role', 'combobox')).toBe(true) expect('Application is missing <v-app> component.').toHaveBeenTipped() }) it('should render role=combobox correctly when not autocomplete)', async () => { const wrapper = mount(VSelect, { propsData: { items: [] } }) let ele = wrapper.find('.input-group--select') expect(ele.length).toBe(1) expect(ele[0].hasAttribute('role', 'combobox')).toBe(true) ele = wrapper.find('.input-group--select input') expect(ele.length).toBe(0) expect('Application is missing <v-app> component.').toHaveBeenTipped() }) it('should render aria-hidden=true on arrow icon', async () => { const wrapper = mount(VSelect, { propsData: { items: [] } }) const icon = wrapper.find('i.input-group__append-icon') expect(icon.length).toBe(1) expect(icon[0].hasAttribute('aria-hidden', 'true')).toBe(true) }) it('should render a disabled input with placeholder', () => { const wrapper = mount(VSelect, { propsData: { placeholder: 'Placeholder' } }) const input = wrapper.find('input')[0] expect(input.hasAttribute('disabled', 'disabled')).toBe(true) expect(input.hasAttribute('placeholder', 'Placeholder')).toBe(true) expect(input.html()).toMatchSnapshot() expect('Application is missing <v-app> component.').toHaveBeenTipped() }) it('should not display when not autocomplete with placeholder and dirty', () => { const wrapper = mount(VSelect, { propsData: { placeholder: 'Placeholder', items: ['foo'], value: 'foo' } }) const input = wrapper.find('input')[0] expect(input.hasAttribute('style', 'display: none;')).toBe(true) expect(input.html()).toMatchSnapshot() expect('Application is missing <v-app> component.').toHaveBeenTipped() }) it('should change search input text when value changes', async () => { const wrapper = mount(VSelect, { attachToDocument: true, propsData: { autocomplete: true, placeholder: 'Placeholder', items: ['foo', 'bar'], value: 'foo' } }) await wrapper.vm.$nextTick() expect(wrapper.vm.searchValue).toBe('foo') wrapper.setProps({ value: null }) await wrapper.vm.$nextTick() expect(wrapper.vm.searchValue).toBe(undefined) expect('Application is missing <v-app> component.').toHaveBeenTipped() })
<<<<<<< 'input-group--dirty': this.isDirty, ======= 'input-group--tab-focused': this.tabFocused, 'input-group--dirty': this.isDirty(), >>>>>>> 'input-group--dirty': this.isDirty, 'input-group--tab-focused': this.tabFocused, <<<<<<< genLabel () { return this.$createElement('label', {}, this.label) ======= toggle () {}, isDirty () { return this.inputValue }, genLabel (h) { return h('label', {}, this.label) >>>>>>> genLabel () { return this.$createElement('label', {}, this.label) }, toggle () {}, isDirty () { return this.inputValue
<<<<<<< this._rendertimer = 0; this._everrendered = false; this._url_list_width = 250; this.requierd_services = ["resource-manager", "document-manager"]; ======= this._render_timeout = 0; this._graph_tooltip_id = null; this._type_filters = null; this.needs_instant_update = false; >>>>>>> this._render_timeout = 0; this._graph_tooltip_id = null; this._type_filters = null; this.needs_instant_update = false; this.requierd_services = ["resource-manager", "document-manager"];
<<<<<<< "show-only-normal-and-gadget-type-windows", "pin-active-window" ======= "show-only-normal-and-gadget-type-windows" ], customSettings: [ 'hr', 'ui-language' >>>>>>> "show-only-normal-and-gadget-type-windows", "pin-active-window" ], customSettings: [ 'hr', 'ui-language' <<<<<<< ======= 'debug-remote' >>>>>>> 'debug-remote'
<<<<<<< ======= /** * API examples routes. * accepts a post request. the challenge id req.body.challengeNumber * and updates user.challengesHash & user.challengesCompleted * */ app.post('/completed-challenge', function (req, res, done) { req.user.challengesHash[parseInt(req.body.challengeNumber)] = Math.round(+new Date() / 1000); var timestamp = req.user.challengesHash; var points = 0; for (var key in timestamp) { if (timestamp[key] > 0 && req.body.challengeNumber < 54) { points += 1; } } req.user.points = points; req.user.save(function(err) { if (err) { return done(err); } res.status(200).send({ msg: 'progress saved' }); }); }); >>>>>>>
<<<<<<< this._scale = 1; ======= this._ruler = new cls.Ruler(); this._ruler.callback = this._onrulerdimesions.bind(this); this._ruler.onclose = this._onrulerclose.bind(this); >>>>>>> this._scale = 1; this._ruler = new cls.Ruler(); this._ruler.callback = this._onrulerdimesions.bind(this); this._ruler.onclose = this._onrulerclose.bind(this); <<<<<<< this._scale = parseInt(event.target.value); this._screenshot.zoom_center(this._scale); ======= var scale = parseInt(event.target.value); this._screenshot.zoom_center(scale); this._ruler.scale = scale; >>>>>>> this._scale = parseInt(event.target.value); this._screenshot.zoom_center(this._scale); this._ruler.scale = this._scale;
<<<<<<< var express = require('express'), debug = require('debug')('freecc:server'), cookieParser = require('cookie-parser'), compress = require('compression'), session = require('express-session'), bodyParser = require('body-parser'), logger = require('morgan'), errorHandler = require('errorhandler'), methodOverride = require('method-override'), bodyParser = require('body-parser'), helmet = require('helmet'), ======= require('newrelic'); require('dotenv').load(); var express = require('express'); var debug = require('debug')('freecc:server'); var cookieParser = require('cookie-parser'); var compress = require('compression'); var session = require('express-session'); var bodyParser = require('body-parser'); var logger = require('morgan'); var errorHandler = require('errorhandler'); var methodOverride = require('method-override'); var bodyParser = require('body-parser'); var helmet = require('helmet'); var _ = require('lodash'); var MongoStore = require('connect-mongo')(session); var flash = require('express-flash'); var path = require('path'); var mongoose = require('mongoose'); var passport = require('passport'); var expressValidator = require('express-validator'); var connectAssets = require('connect-assets'); >>>>>>> var express = require('express'), debug = require('debug')('freecc:server'), cookieParser = require('cookie-parser'), compress = require('compression'), session = require('express-session'), logger = require('morgan'), errorHandler = require('errorhandler'), methodOverride = require('method-override'), bodyParser = require('body-parser'), helmet = require('helmet'), <<<<<<< '*.google-analytics.com', '*.googleapis.com', '*.gstatic.com', '*.doubleclick.net', '*.twitter.com', ======= "*.google-analytics.com", "*.googleapis.com", "*.google.com", "*.gstatic.com", "*.doubleclick.net", "*.twitter.com", >>>>>>> '*.gstatic.com', "*.google-analytics.com", "*.googleapis.com", "*.google.com", "*.gstatic.com", "*.doubleclick.net", "*.twitter.com", <<<<<<< '*.githubusercontent.com', '"unsafe-eval"', '"unsafe-inline"' ======= "*.githubusercontent.com", "'unsafe-eval'", "'unsafe-inline'", "*.rafflecopter.com", "localhost:3001" >>>>>>> "*.githubusercontent.com", "'unsafe-eval'", "'unsafe-inline'", "*.rafflecopter.com", "localhost:3001" <<<<<<< 'connect-src': ['ws://localhost:3001/', 'http://localhost:3001/'], ======= 'connect-src': ["ws://*.rafflecopter.com", "wss://*.rafflecopter.com","https://*.rafflecopter.com", "ws://www.freecodecamp.com", 'ws://localhost:3001/', 'http://localhost:3001', 'http://www.freecodecamp.com'], >>>>>>> 'connect-src': ['ws://*.rafflecopter.com', 'wss://*.rafflecopter.com','https://*.rafflecopter.com', 'ws://www.freecodecamp.com', 'ws://localhost:3001/', 'http://localhost:3001', 'http://www.freecodecamp.com'], <<<<<<< imgSrc: ['*.evernote.com', '*.amazonaws.com', 'data:'].concat(trusted), fontSrc: ['"self"', '*.googleapis.com'].concat(trusted), ======= imgSrc: ['*.evernote.com', '*.amazonaws.com', "data:", '*.licdn.com', '*.gravatar.com', '*.youtube.com'].concat(trusted), fontSrc: ["'self", '*.googleapis.com'].concat(trusted), >>>>>>> imgSrc: ['*.evernote.com', '*.amazonaws.com', "data:", '*.licdn.com', '*.gravatar.com', '*.youtube.com'].concat(trusted), fontSrc: ["'self", '*.googleapis.com'].concat(trusted), <<<<<<< '/challenges/:challengeNumber', passportConf.isAuthenticated, challengesController.returnChallenge ); ======= '/challenges/:challengeNumber', challengesController.returnChallenge); >>>>>>> '/challenges/:challengeNumber', challengesController.returnChallenge );
<<<<<<< '/programmer-interview-questions-app', resourcesController.programmerInterviewQuestionsApp ======= '/done-with-first-100-hours', resourcesController.doneWithFirst100Hours ); app.get( '/programmer-interview-questions-app', resourcesController.programmerInterviewQuestionsApp >>>>>>> '/done-with-first-100-hours', resourcesController.doneWithFirst100Hours
<<<<<<< this.scrollTargetIntoView = function() { var target = document.getElementById('target-element'); if(target) { document.getElementById('target-element').scrollIntoView(); while( !/container/.test(target.nodeName) && ( target = target.parentElement) ); if(target) { target.scrollTop -= 100; } } } var spotlightElement = function() { hostspotlighter.spotlight(this.getAttribute('ref-id')); } var clearSpotlightElement = function() { hostspotlighter.clearSpotlight(); } ======= >>>>>>> var spotlightElement = function() { hostspotlighter.spotlight(this.getAttribute('ref-id')); } var clearSpotlightElement = function() { hostspotlighter.clearSpotlight(); }
<<<<<<< console.log(); // chainInterface.addFingerprint(batch_uid, batch_uid_hash, trail_hash); ======= chainInterface.addFingerprint(batch_uid, batch_uid_hash, trail_hash); >>>>>>> console.log(); chainInterface.addFingerprint(batch_uid, batch_uid_hash, trail_hash);
<<<<<<< ======= // eslint-disable-next-line no-shadow async _importXML(ot_xml_document, callback) { const options = { mode: 'text', pythonPath: 'python3', scriptPath: 'importers/', args: [ot_xml_document], }; PythonShell.run('v1.5.py', options, (stderr, stdout) => { if (stderr) { this.log.info(stderr); utilities.executeCallback(callback, { message: 'Import failure', data: [], }); return; } this.log.info('[DC] Import complete'); const result = JSON.parse(stdout); // eslint-disable-next-line prefer-destructuring const vertices = result.vertices; // eslint-disable-next-line prefer-destructuring const edges = result.edges; const { import_id } = result; const leaves = []; const hash_pairs = []; for (const i in vertices) { // eslint-disable-next-line max-len leaves.push(utilities.sha3(utilities.sortObject({ identifiers: vertices[i].identifiers, data: vertices[i].data }))); // eslint-disable-next-line no-underscore-dangle hash_pairs.push({ key: vertices[i]._key, hash: utilities.sha3({ identifiers: vertices[i].identifiers, data: vertices[i].data }) }); // eslint-disable-line max-len } const tree = new MerkleTree(hash_pairs); const root_hash = tree.root(); this.log.info(`Import id: ${import_id}`); this.log.info(`Import hash: ${root_hash}`); utilities.executeCallback(callback, { message: 'Import success', data: [], }); }); } /** * Process successfull import * @param result Import result * @return {Promise<>} */ >>>>>>> /** * Process successfull import * @param result Import result * @return {Promise<>} */
<<<<<<< locationKey = GS1Helper.createKey('business_location', senderId, identifiers, data); const attrs = GS1Helper.parseAttributes(GS1Helper.arrayze(location.extension.attribute), 'urn:ot:object:location:'); for (const attr of GS1Helper.arrayze(attrs)) { if (attr.actorId) { location.participant_id = attr.actorId; ======= locationKey = this.helper.createKey('business_location', senderId, identifiers, data); const attrs = this.helper.parseAttributes(this.helper.arrayze(location.extension.attribute), 'urn:ot:location:'); for (const attr of this.helper.arrayze(attrs)) { if (attr.participantId) { location.participant_id = attr.participantId; >>>>>>> locationKey = this.helper.createKey('business_location', senderId, identifiers, data); const attrs = this.helper.parseAttributes(this.helper.arrayze(location.extension.attribute), 'urn:ot:object:location:'); for (const attr of this.helper.arrayze(attrs)) { if (attr.actorId) { location.participant_id = attr.participantId; <<<<<<< _key: GS1Helper.createKey('owned_by', senderId, locationKey, attr.actorId), ======= _key: this.helper.createKey('owned_by', senderId, locationKey, attr.participantId), >>>>>>> _key: this.helper.createKey('owned_by', senderId, locationKey, attr.actorId), <<<<<<< const childLocationKey = GS1Helper.createKey('child_business_location', senderId, identifiers, data); ======= const childLocationKey = this.helper.createKey('child_business_location', senderId, identifiers, data); >>>>>>> const childLocationKey = this.helper.createKey('child_business_location', senderId, identifiers, data); <<<<<<< eventCategories = GS1Helper.arrayze(eventClass).map(obj => GS1Helper.ignorePattern(obj, 'urn:ot:events:')); ======= eventCategories = this.helper.arrayze(eventClass).map(obj => this.helper.ignorePattern(obj, 'ot:events:')); >>>>>>> eventCategories = this.helper.arrayze(eventClass).map(obj => this.helper.ignorePattern(obj, 'urn:ot:events:')); <<<<<<< eventCategories = GS1Helper.arrayze(eventClass).map(obj => GS1Helper.ignorePattern(obj, 'urn:ot:event:')); ======= eventCategories = this.helper.arrayze(eventClass).map(obj => this.helper.ignorePattern(obj, 'ot:event:')); >>>>>>> eventCategories = this.helper.arrayze(eventClass).map(obj => this.helper.ignorePattern(obj, 'urn:ot:event:')); <<<<<<< attributes: GS1Helper.parseAttributes(element.attribute, 'urn:ot:object:location:'), ======= attributes: this.helper.parseAttributes(element.attribute, 'urn:ot:mda:location:'), >>>>>>> attributes: this.helper.parseAttributes(element.attribute, 'urn:ot:object:location:'), <<<<<<< attributes: GS1Helper.parseAttributes(element.attribute, 'urn:ot:object:actor:'), ======= attributes: this.helper.parseAttributes(element.attribute, 'urn:ot:mda:actor:'), >>>>>>> attributes: this.helper.parseAttributes(element.attribute, 'urn:ot:object:actor:'), <<<<<<< attributes: GS1Helper.parseAttributes(element.attribute, 'urn:ot:object:product:'), ======= attributes: this.helper.parseAttributes(element.attribute, 'urn:ot:mda:product:'), >>>>>>> attributes: this.helper.parseAttributes(element.attribute, 'urn:ot:object:product:'), <<<<<<< attributes: GS1Helper.parseAttributes(element.attribute, 'urn:ot:object:product:batch:'), ======= attributes: this.helper.parseAttributes(element.attribute, 'urn:ot:mda:batch:'), >>>>>>> attributes: this.helper.parseAttributes(element.attribute, 'urn:ot:object:product:batch:'),
<<<<<<< const utilities = require('../../utilities')(); const Web3 = require('web3'); const fs = require('fs'); const util = require('ethereumjs-util'); const tx = require('ethereumjs-tx'); const lightwallet = require('eth-lightwallet'); const Account = require('eth-lib/lib/account'); const Hash = require('eth-lib/lib/hash'); const BN = require('bn.js'); const abi = require('ethereumjs-abi'); //---------------- const transacting = require('./transacting'); //--------------- // eslint-disable-next-line prefer-destructuring const txutils = lightwallet.txutils; const config = utilities.getConfig(); ======= const utilities = require('../../utilities')(); const Web3 = require('web3'); const fs = require('fs'); const util = require('ethereumjs-util'); const tx = require('ethereumjs-tx'); const lightwallet = require('eth-lightwallet'); const Account = require('eth-lib/lib/account'); const Hash = require('eth-lib/lib/hash'); const BN = require('bn.js'); const abi = require('ethereumjs-abi'); // eslint-disable-next-line prefer-destructuring const txutils = lightwallet.txutils; const config = utilities.getConfig(); >>>>>>> const utilities = require('../../utilities')(); const Web3 = require('web3'); const fs = require('fs'); const util = require('ethereumjs-util'); const tx = require('ethereumjs-tx'); const lightwallet = require('eth-lightwallet'); const Account = require('eth-lib/lib/account'); const Hash = require('eth-lib/lib/hash'); const BN = require('bn.js'); const abi = require('ethereumjs-abi'); const transacting = require('./transacting'); // eslint-disable-next-line prefer-destructuring const txutils = lightwallet.txutils; const config = utilities.getConfig(); <<<<<<< // eslint-disable-next-line max-len // (msg.sender, data_id, confirmation_verification_number, confirmation_time, confirmation_valid) === confirmation_hash const raw_data = `0x${abi.soliditySHA3( ['address', 'uint', 'uint', 'uint', 'bool'], // eslint-disable-next-line max-len [new BN(DH_wallet, 16), data_id, confirmation_verification_number, confirmation_time, confirmation_valid], ).toString('hex')}`; const hash = utilities.sha3(raw_data); const signature = Account.sign(hash, `0x${private_key}`); const vrs = Account.decodeSignature(signature); const s = { message: raw_data, messageHash: hash, v: vrs[0], r: vrs[1], s: vrs[2], signature, }; const confirmation = { DC_wallet: wallet_address, data_id, confirmation_verification_number, confirmation_time, confirmation_valid, v: s.v, r: s.r, s: s.s, confirmation_hash: s.message, }; return confirmation; }, // sendRawX(rawTx, callback) { // // eslint-disable-next-line no-buffer-constructor // const privateKey = new Buffer(private_key, 'hex'); // // eslint-disable-next-line new-cap // const transaction = new tx(rawTx); // transaction.sign(privateKey); // const serializedTx = transaction.serialize().toString('hex'); // web3.eth.sendSignedTransaction(`0x${serializedTx}`, (err, result) => { // if (err) { // console.log(err); // if (callback) { // utilities.executeCallback(callback, false); // } // } else { // if (callback) { // utilities.executeCallback(callback, result); // } // console.log('Transaction: ', result); // } // }); // }, async sendConfirmation(confirmation, callback) { if (nonce === -1) { nonce = await web3.eth.getTransactionCount(wallet_address); } const new_nonce = nonce + nonce_increment; nonce_increment += 1; const txOptions = { nonce: new_nonce, gasLimit: web3.utils.toHex(config.blockchain.settings.ethereum.gas_limit), gasPrice: web3.utils.toHex(config.blockchain.settings.ethereum.gas_price), to: escrow_address, }; console.log(txOptions); const rawTx = txutils.functionTx(escrow_abi, 'payOut', [confirmation.DC_wallet, confirmation.data_id, confirmation.confirmation_verification_number, confirmation.confirmation_time, confirmation.confirmation_valid, confirmation.confirmation_hash, confirmation.v, confirmation.r, confirmation.s], txOptions); transacting.queueTransaction(rawTx,callback); // this.sendRawX(rawTx, callback); }, }; return signing; ======= // eslint-disable-next-line max-len // (msg.sender, data_id, confirmation_verification_number, confirmation_time, confirmation_valid) === confirmation_hash const raw_data = `0x${abi.soliditySHA3( ['address', 'uint', 'uint', 'uint', 'bool'], // eslint-disable-next-line max-len [new BN(DH_wallet, 16), data_id, confirmation_verification_number, confirmation_time, confirmation_valid], ).toString('hex')}`; const hash = utilities.sha3(raw_data); const signature = Account.sign(hash, `0x${private_key}`); const vrs = Account.decodeSignature(signature); const s = { message: raw_data, messageHash: hash, v: vrs[0], r: vrs[1], s: vrs[2], signature, }; const confirmation = { DC_wallet: wallet_address, data_id, confirmation_verification_number, confirmation_time, confirmation_valid, v: s.v, r: s.r, s: s.s, confirmation_hash: s.message, }; return confirmation; }, sendRawX(rawTx, callback) { // eslint-disable-next-line no-buffer-constructor const privateKey = new Buffer(private_key, 'hex'); // eslint-disable-next-line new-cap const transaction = new tx(rawTx); transaction.sign(privateKey); const serializedTx = transaction.serialize().toString('hex'); web3.eth.sendSignedTransaction(`0x${serializedTx}`, (err, result) => { if (err) { console.log(err); if (callback) { utilities.executeCallback(callback, false); } } else { if (callback) { utilities.executeCallback(callback, result); } console.log('Transaction: ', result); } }); }, async sendConfirmation(confirmation, callback) { if (nonce === -1) { nonce = await web3.eth.getTransactionCount(wallet_address); } const new_nonce = nonce + nonce_increment; nonce_increment += 1; const txOptions = { nonce: new_nonce, gasLimit: web3.utils.toHex(config.blockchain.settings.ethereum.gas_limit), gasPrice: web3.utils.toHex(config.blockchain.settings.ethereum.gas_price), to: escrow_address, }; console.log(txOptions); const rawTx = txutils.functionTx(escrow_abi, 'payOut', [confirmation.DC_wallet, confirmation.data_id, confirmation.confirmation_verification_number, confirmation.confirmation_time, confirmation.confirmation_valid, confirmation.confirmation_hash, confirmation.v, confirmation.r, confirmation.s], txOptions); this.sendRawX(rawTx, callback); }, }; return signing; >>>>>>> // eslint-disable-next-line max-len // (msg.sender, data_id, confirmation_verification_number, confirmation_time, confirmation_valid) === confirmation_hash const raw_data = `0x${abi.soliditySHA3( ['address', 'uint', 'uint', 'uint', 'bool'], // eslint-disable-next-line max-len [new BN(DH_wallet, 16), data_id, confirmation_verification_number, confirmation_time, confirmation_valid], ).toString('hex')}`; const hash = utilities.sha3(raw_data); const signature = Account.sign(hash, `0x${private_key}`); const vrs = Account.decodeSignature(signature); const s = { message: raw_data, messageHash: hash, v: vrs[0], r: vrs[1], s: vrs[2], signature, }; const confirmation = { DC_wallet: wallet_address, data_id, confirmation_verification_number, confirmation_time, confirmation_valid, v: s.v, r: s.r, s: s.s, confirmation_hash: s.message, }; return confirmation; }, async sendConfirmation(confirmation, callback) { if (nonce === -1) { nonce = await web3.eth.getTransactionCount(wallet_address); } const new_nonce = nonce + nonce_increment; nonce_increment += 1; const txOptions = { nonce: new_nonce, gasLimit: web3.utils.toHex(config.blockchain.settings.ethereum.gas_limit), gasPrice: web3.utils.toHex(config.blockchain.settings.ethereum.gas_price), to: escrow_address, }; console.log(txOptions); const rawTx = txutils.functionTx(escrow_abi, 'payOut', [confirmation.DC_wallet, confirmation.data_id, confirmation.confirmation_verification_number, confirmation.confirmation_time, confirmation.confirmation_valid, confirmation.confirmation_hash, confirmation.v, confirmation.r, confirmation.s], txOptions); transacting.queueTransaction(rawTx,callback); }, }; return signing;
<<<<<<< update_phone_list(); mCrashAnalyser = new CloudPebble.CrashChecker(CloudPebble.ProjectInfo.app_uuid); // Get build history ======= >>>>>>> <<<<<<< var update_phone_list = function() { $.getJSON("/ide/list_phones", function(data) { if(data.success) { pane.find('#phone').empty(); var platform_names = { 'ios': 'iPhone', 'android': 'Android phone' }; phone_map = {}; _.each(data.devices, function(device) { pane.find('#phone') .append($('<option>') .attr('value', device.id) .text(platform_names[device.type] + ' ' + device.id.substring(20))); phone_map[device.id] = device; }); var last_phone = localStorage['cp-last-picked-phone']; if(last_phone && _.has(phone_map, last_phone)) { pane.find('#phone').val(last_phone); } } }) } ======= var run_build = function(callback) { if(CloudPebble.ProjectInfo.sdk_version == '1') return; var temp_build = {started: (new Date()).toISOString(), finished: null, state: 1, uuid: null, id: null, size: {total: null, binary: null, resources: null}}; update_last_build(pane, temp_build); pane.find('#run-build-table').prepend(build_history_row(temp_build)); $.post('/ide/project/' + PROJECT_ID + '/build/run', function() { mRunningBuild = true; if(callback) { mPendingCallbacks.push(callback); } update_build_history(pane); }); ga('send','event', 'build', 'run', {eventValue: ++m_build_count}); }; >>>>>>> var update_phone_list = function() { $.getJSON("/ide/list_phones", function(data) { if(data.success) { pane.find('#phone').empty(); var platform_names = { 'ios': 'iPhone', 'android': 'Android phone' }; phone_map = {}; _.each(data.devices, function(device) { pane.find('#phone') .append($('<option>') .attr('value', device.id) .text(platform_names[device.type] + ' ' + device.id.substring(20))); phone_map[device.id] = device; }); var last_phone = localStorage['cp-last-picked-phone']; if(last_phone && _.has(phone_map, last_phone)) { pane.find('#phone').val(last_phone); } } }) } var run_build = function(callback) { if(CloudPebble.ProjectInfo.sdk_version == '1') return; var temp_build = {started: (new Date()).toISOString(), finished: null, state: 1, uuid: null, id: null, size: {total: null, binary: null, resources: null}}; update_last_build(pane, temp_build); pane.find('#run-build-table').prepend(build_history_row(temp_build)); $.post('/ide/project/' + PROJECT_ID + '/build/run', function() { mRunningBuild = true; if(callback) { mPendingCallbacks.push(callback); } update_build_history(pane); }); ga('send','event', 'build', 'run', {eventValue: ++m_build_count}); }; <<<<<<< get_phone_ip(function(ip) { var modal = $('#phone-install-progress').modal(); modal.find('.modal-body > p').text("Installing app on your watch…"); modal.find('.btn').addClass('hide'); modal.find('.progress').removeClass('progress-danger progress-success').addClass('progress-striped'); modal.off('hide'); var report_error = function(message) { modal.find('.modal-body > p').text(message); modal.find('.dismiss-btn').removeClass('hide'); modal.find('.progress').addClass('progress-danger').removeClass('progress-striped'); }; try { mPebble = pebble_connect(ip); } catch(e) { report_error("Failed to create socket."); } ======= var modal = $('#phone-install-progress').modal(); modal.find('.modal-body > p').text("Installing app on your watch…"); modal.find('.btn').addClass('hide'); modal.find('.progress').removeClass('progress-danger progress-success').addClass('progress-striped'); modal.off('hide'); var report_error = function(message) { modal.find('.modal-body > p').text(message); modal.find('.dismiss-btn').removeClass('hide'); modal.find('.progress').addClass('progress-danger').removeClass('progress-striped'); }; var ip = get_phone_ip(); if(ip == '') { report_error("You must specify your phone's IP to install to your watch."); return; } try { mPebble = pebble_connect(ip); } catch(e) { report_error("Failed to create socket."); } >>>>>>> get_phone_ip(function(ip) { var modal = $('#phone-install-progress').modal(); modal.find('.modal-body > p').text("Installing app on your watch…"); modal.find('.btn').addClass('hide'); modal.find('.progress').removeClass('progress-danger progress-success').addClass('progress-striped'); modal.off('hide'); var report_error = function(message) { modal.find('.modal-body > p').text(message); modal.find('.dismiss-btn').removeClass('hide'); modal.find('.progress').addClass('progress-danger').removeClass('progress-striped'); }; if(ip == '') { report_error("You must specify your phone's IP to install to your watch."); return; } try { mPebble = pebble_connect(ip); } catch(e) { report_error("Failed to create socket."); } <<<<<<< mPebble.on('screenshot:failed', function(reason) { CloudPebble.Analytics.addEvent('app_screenshot_failed', {target_ip: ip}); report_error("Screenshot failed: " + reason); mPebble.close(); }); mPebble.on('screenshot:progress', function(received, expected) { report_progress((received / expected) * 100); }); ======= mPebble.on('screenshot:complete', function(screenshot) { finished = true; var screenshot_holder = $('<div class="screenshot-holder">').append(screenshot); // $(screenshot).addClass('img-polaroid'); modal.find('.modal-body') .empty() .append(screenshot_holder) .append("<p>Right click -> Save Image as...</p>") .css({'text-align': 'center'}); modal.find('.dismiss-btn').removeClass('hide'); mPebble.request_colour(); CloudPebble.Analytics.addEvent('app_screenshot_succeeded', {target_ip: ip}); }); >>>>>>> mPebble.on('screenshot:failed', function(reason) { CloudPebble.Analytics.addEvent('app_screenshot_failed', {target_ip: ip}); report_error("Screenshot failed: " + reason); mPebble.close(); }); mPebble.on('screenshot:progress', function(received, expected) { report_progress((received / expected) * 100); });
<<<<<<< mPebble.install_app(pane.find('#last-compilation-pbw').attr('href')); ======= mPebble.once('version', function(version_info) { var version_string = version_info.running.version; console.log(version_string); // Make sure that we have the required version - but also assume that anyone who has the string 'test' // in their firmware version number (e.g. me) knows what they're doing. if(/test/.test(version_string) || compare_version_strings(version_string, MINIMUM_INSTALL_VERSION) >= 0) { mPebble.install_app(pane.find('#last-compilation-pbw > a').attr('href')); } else { mPebble.close(); mPebble = null; report_error( "Please <a href='https://developer.getpebble.com/2/getting-started/'>update your pebble</a>" + " to " + MINIMUM_INSTALL_VERSION + " to be able to install apps from CloudPebble and " + "the appstore (you're on version " + version_string + ")." ); } }); mPebble.request_version(); >>>>>>> mPebble.once('version', function(version_info) { var version_string = version_info.running.version; console.log(version_string); // Make sure that we have the required version - but also assume that anyone who has the string 'test' // in their firmware version number (e.g. me) knows what they're doing. if(/test/.test(version_string) || compare_version_strings(version_string, MINIMUM_INSTALL_VERSION) >= 0) { mPebble.install_app(pane.find('#last-compilation-pbw').attr('href')); } else { mPebble.close(); mPebble = null; report_error( "Please <a href='https://developer.getpebble.com/2/getting-started/'>update your pebble</a>" + " to " + MINIMUM_INSTALL_VERSION + " to be able to install apps from CloudPebble and " + "the appstore (you're on version " + version_string + ")." ); } }); mPebble.request_version();
<<<<<<< // If this isn't a native project or package, only JS files should exist. if(CloudPebble.ProjectProperties.js_only) { prompt.find('#new-file-type').val('js').change().parents('.control-group').hide(); ======= // If this isn't a native project, only JS and JSON files should exist. if(CloudPebble.ProjectInfo.type != 'native') { file_type_picker.val('js').change(); file_type_picker.find('option').filter(function() { return !(this.value == 'js' || this.value == 'json'); }).remove(); >>>>>>> // If this isn't a native project or package, only JS and JSON files should exist. if(CloudPebble.ProjectProperties.js_only) { file_type_picker.val('js').change(); file_type_picker.find('option').filter(function() { return !(this.value == 'js' || this.value == 'json'); }).remove();
<<<<<<< ======= var variant_tags = extract_tags(form.find('#edit-resource-previews .text-wrap input')); var new_tags = extract_tags(form.find('#edit-resource-new-file .text-wrap input')); var replacements_files = []; var replacement_map = []; var okay = true; $.each(form.find('.edit-resource-replace-file'), function() { var file; try { file = process_file(kind, this); } catch (e) { report_error(e); okay = false; return; } if (file !== null) { var tags = $(this).parents('.image-resource-preview-pane').find('.text-wrap input').val().slice(1, -1); replacement_map.push([tags, replacements_files.length]); replacements_files.push(file); } }); if (!okay) return; >>>>>>> var variant_tags = extract_tags(form.find('#edit-resource-previews .text-wrap input')); var new_tags = extract_tags(form.find('#edit-resource-new-file .text-wrap input')); var replacements_files = []; var replacement_map = []; okay = true; $.each(form.find('.edit-resource-replace-file'), function() { var file; try { file = process_file(kind, this); } catch (e) { report_error(e); okay = false; return; } if (file !== null) { var tags = $(this).parents('.image-resource-preview-pane').find('.text-wrap input').val().slice(1, -1); replacement_map.push([tags, replacements_files.length]); replacements_files.push(file); } }); if (!okay) return; <<<<<<< ======= form_data.append("target_platforms", JSON.stringify(target_platforms)); form_data.append("replacements", JSON.stringify(replacement_map)); _.each(replacements_files, function(file) { form_data.append("replacement_files[]", file); }); >>>>>>> form_data.append("replacements", JSON.stringify(replacement_map)); _.each(replacements_files, function(file) { form_data.append("replacement_files[]", file); });
<<<<<<< // If this isn't a native project or package, only JS files should exist. if(CloudPebble.ProjectProperties.js_only) { prompt.find('#new-file-type').val('js').change().parents('.control-group').hide(); ======= // If this isn't a native project, only JS and JSON files should exist. if(CloudPebble.ProjectInfo.type != 'native') { file_type_picker.val('js').change(); file_type_picker.find('option').filter(function() { return !(this.value == 'js' || this.value == 'json'); }).remove(); >>>>>>> // If this isn't a native project or package, only JS and JSON files should exist. if(CloudPebble.ProjectProperties.js_only) { file_type_picker.val('js').change(); file_type_picker.find('option').filter(function() { return !(this.value == 'js' || this.value == 'json'); }).remove();
<<<<<<< } else if(CloudPebble.ProjectInfo.type == 'pebblejs') { _.extend(jshint_globals, { require: true, ajax: true }); } ======= warning_lines = []; // And now bail. if(!CloudPebble.ProjectInfo.app_jshint) return; var jshint_globals = { Pebble: true, console: true, WebSocket: true, XMLHttpRequest: true, navigator: true, // For navigator.geolocation localStorage: true, setTimeout: true, setInterval: true, Int8Array: true, Uint8Array: true, Uint8ClampedArray: true, Int16Array: true, Uint16Array: true, Int32Array: true, Uint32Array: true, Float32Array: true, Float64Array: true }; if(CloudPebble.ProjectInfo.type == 'simplyjs') { _.extend(jshint_globals, { simply: true, util2: true, ajax: true }); } else if(CloudPebble.ProjectInfo.type == 'pebblejs') { _.extend(jshint_globals, { require: true, ajax: true }); } else if (CloudPebble.ProjectInfo.app_modern_multi_js) { _.extend(jshint_globals, { require: true, exports: true, module: true }); } >>>>>>> } else if(CloudPebble.ProjectInfo.type == 'pebblejs') { _.extend(jshint_globals, { require: true, ajax: true }); } else if (CloudPebble.ProjectInfo.app_modern_multi_js) { _.extend(jshint_globals, { require: true, exports: true, module: true }); }
<<<<<<< }; handleChange = (item) => { const { value, onChange } = this.props; if (value) { if (onChange) onChange(item); } else { this.setValue(item); } }; ======= }; >>>>>>> }; handleChange = (item) => { const { value, onChange } = this.props; if (value) { if (onChange) onChange(item); } else { this.setValue(item); } }; <<<<<<< items={ [ ...selectAll, ...this.state.options .filter(item => String(item.key).trim().length) .map(item => ({ ...item, key: String(item.key) })), ] } onChange={this.handleChange} ======= items={[ ...selectAll, ...this.state.options .filter(item => String(item.key).trim().length) .map(item => ({ ...item, key: String(item.key) })), ]} onChange={this.setValue} >>>>>>> items={[ ...selectAll, ...this.state.options .filter(item => String(item.key).trim().length) .map(item => ({ ...item, key: String(item.key) })), ]} onChange={this.handleChange}
<<<<<<< searchOperators: false, ======= showVoiceSearch: false, >>>>>>> searchOperators: false, showVoiceSearch: false,
<<<<<<< error, isLoading, aggregationData, promotedResults, customData, ======= error, isLoading, aggregationData, promotedResults, rawData, >>>>>>> error, isLoading, aggregationData, promotedResults, customData, rawData, <<<<<<< promotedData: promotedResults || [], customData: customData || {}, ======= rawData, promotedData: promotedResults, >>>>>>> promotedData: promotedResults || [], customData: customData || {}, rawData,
<<<<<<< packages: [ { name: 'dojo', location: 'lib/dojo', main: 'lib/main-browser', lib:'.'}, { name: 'dijit',location: 'lib/dijit', main: 'lib/main',lib: '.'}, { name: 'rest', location: 'lib/rest-d7c94f9', main: 'rest'} ], ======= packages: [{ name: 'dojo', location: 'lib/dojo', main:'lib/main-browser', lib:'.'}, { name: 'dijit',location: 'lib/dijit',main:'lib/main',lib: '.'}, { name: 'when', location: '../components/when', main:'when', lib: '.'}, { name: 'wire', location: '../components/wire', main:'wire', lib: '.'}, { name: 'meld', location: '../components/meld', main:'meld', lib: '.'} ], >>>>>>> packages: [{ name: 'dojo', location: 'lib/dojo', main:'lib/main-browser', lib:'.'}, { name: 'dijit',location: 'lib/dijit',main:'lib/main',lib: '.'}, { name: 'when', location: '../components/when', main:'when', lib: '.'}, { name: 'wire', location: '../components/wire', main:'wire', lib: '.'}, { name: 'meld', location: '../components/meld', main:'meld', lib: '.'}, { name: 'rest', location: 'lib/rest-d7c94f9', main: 'rest'} ],
<<<<<<< "scripted/markoccurrences","text!scripted/help.txt", "scripted/editor/themeManager", "scripted/inplacedialogs/infile-search", "scripted/exec/exec-keys", ======= "scripted/markoccurrences","text!scripted/help.txt", "scripted/editor/themeManager", "scripted/utils/storage", "layoutManager", "scripted/exec/exec-keys", >>>>>>> "scripted/markoccurrences","text!scripted/help.txt", "scripted/editor/themeManager", "scripted/utils/storage", "scripted/inplacedialogs/infile-search", "scripted/exec/exec-keys", <<<<<<< mIndexerService, mHtmlGrammar, mModuleVerifier, mJshintDriver, mJsBeautify, mTextModel, mProjectionModel, mCssContentAssist, mTemplateContentAssist, mMarkoccurrences, tHelptext, themeManager, infileSearchDialog ======= mIndexerService, mTextSearcher, mSelection, mCommands, mParameterCollectors, mHtmlGrammar, mModuleVerifier, mJshintDriver, mJsBeautify, mTextModel, mProjectionModel, mCssContentAssist, mTemplateContentAssist, mMarkoccurrences, tHelptext, themeManager, storage, layoutManager >>>>>>> mIndexerService, mHtmlGrammar, mModuleVerifier, mJshintDriver, mJsBeautify, mTextModel, mProjectionModel, mCssContentAssist, mTemplateContentAssist, mMarkoccurrences, tHelptext, themeManager, storage, infileSearchDialog
<<<<<<< /* DESC: Enable reformatting of JavaScript. */ ui_strings.S_BUTTON_LABEL_REFORMAT_JAVASCRIPT = "Pretty-print JavaScript"; ======= /* DESC: Refetch the event listeners. */ ui_strings.S_BUTTON_LABEL_REFETCH_EVENT_LISTENERS = "Refetch event listeners"; /* DESC: Enable reformatting of JavaScript. */ ui_strings.S_BUTTON_LABEL_REFORMAT_JAVASCRIPT = "Pretty print JavaScript"; >>>>>>> /* DESC: Enable reformatting of JavaScript. */ ui_strings.S_BUTTON_LABEL_REFORMAT_JAVASCRIPT = "Pretty-print JavaScript"; /* DESC: Refetch the event listeners. */ ui_strings.S_BUTTON_LABEL_REFETCH_EVENT_LISTENERS = "Refetch event listeners"; <<<<<<< /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_CSS_PARSING = "CSS parsing"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_CSS_SELECTOR_MATCHING = "CSS selector matching"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_DOCUMENT_PARSING = "Document parsing"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_GENERIC = "Generic"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_LAYOUT = "Layout"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_PAINT = "Paint"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_PROCESS = "Process"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_REFLOW = "Reflow"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_SCRIPT_COMPILATION = "Script compilation"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_STYLE_RECALCULATION = "Style recalculation"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_THREAD_EVALUATION = "Thread evaluation"; ======= /* DESC: Link in an event listener tooltip to the source position where the listener is added. */ ui_strings.S_EVENT_LISTENER_ADDED_IN = "Added in %s"; /* DESC: Info in an event listener tooltip that the according listener was added in the markup as element attribute. */ ui_strings.S_EVENT_LISTENER_SET_AS_MARKUP_ATTR = "Set as markup attribute"; /* DESC: Info in a tooltip that the according listener was set by the event target interface. */ ui_strings.S_EVENT_TARGET_LISTENER = "Event listener"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_CSS_PARSING = "CSS parsing"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_CSS_SELECTOR_MATCHING = "CSS selector matching"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_DOCUMENT_PARSING = "Document parsing"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_GENERIC = "Generic"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_LAYOUT = "Layout"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_PAINT = "Paint"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_PROCESS = "Process"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_REFLOW = "Reflow"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_SCRIPT_COMPILATION = "Script compilation"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_STYLE_RECALCULATION = "Style recalculation"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_THREAD_EVALUATION = "Thread evaluation"; >>>>>>> /* DESC: Link in an event listener tooltip to the source position where the listener is added. */ ui_strings.S_EVENT_LISTENER_ADDED_IN = "Added in %s"; /* DESC: Info in an event listener tooltip that the according listener was added in the markup as element attribute. */ ui_strings.S_EVENT_LISTENER_SET_AS_MARKUP_ATTR = "Set as markup attribute"; /* DESC: Info in a tooltip that the according listener was set by the event target interface. */ ui_strings.S_EVENT_TARGET_LISTENER = "Event listener"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_CSS_PARSING = "CSS parsing"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_CSS_SELECTOR_MATCHING = "CSS selector matching"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_DOCUMENT_PARSING = "Document parsing"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_GENERIC = "Generic"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_LAYOUT = "Layout"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_PAINT = "Paint"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_PROCESS = "Process"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_REFLOW = "Reflow"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_SCRIPT_COMPILATION = "Script compilation"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_STYLE_RECALCULATION = "Style recalculation"; /* DESC: Event type for events in the profiler */ ui_strings.S_EVENT_TYPE_THREAD_EVALUATION = "Thread evaluation"; <<<<<<< /* DESC: Enable smart reformatting of JavaScript. */ ui_strings.S_LABEL_SMART_REFORMAT_JAVASCRIPT = "Smart JavaScript pretty-printing"; ======= /* DESC: Enable smart reformatting of JavaScript. */ ui_strings.S_LABEL_SMART_REFORMAT_JAVASCRIPT = "Smart JavaScript pretty printing"; >>>>>>> /* DESC: Enable smart reformatting of JavaScript. */ ui_strings.S_LABEL_SMART_REFORMAT_JAVASCRIPT = "Smart JavaScript pretty-printing"; <<<<<<< /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_AREA_DIMENSION = "Area"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_AREA_LOCATION = "Location"; /* DESC: Message in the profiler when the profiler is calculating */ ui_strings.S_PROFILER_CALCULATING = "Calculating…"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_DURATION = "Duration"; /* DESC: Message in the profiler when no data was "captured" by the profiler */ ui_strings.S_PROFILER_NO_DATA = "No data"; /* DESC: Message when an event in the profiler has no details */ ui_strings.S_PROFILER_NO_DETAILS = "No details"; /* DESC: Message in the profiler when the profiler is active */ ui_strings.S_PROFILER_PROFILING = "Profiling…"; /* DESC: Message in the profiler when the profiler failed */ ui_strings.S_PROFILER_PROFILING_FAILED = "Profiling failed"; /* DESC: Message before activating the profiler profile */ ui_strings.S_PROFILER_RELOAD = "To get accurate data from the profiler, all other features have to be disabled and the document has to be reloaded."; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_SELF_TIME = "Self time"; /* DESC: Message before starting the profiler */ ui_strings.S_PROFILER_START_MESSAGE = "Press the Record button to start profiling"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_START_TIME = "Start"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TOTAL_SELF_TIME = "Total self time"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_EVENT = "Event name"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_SCRIPT = "Script type"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_SELECTOR = "Selector"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_THREAD = "Thread type"; ======= /* DESC: Info in the DOM side panel that the selected node has no event listeners attached. */ ui_strings.S_NO_EVENT_LISTENER = "No event listeners"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_AREA_DIMENSION = "Area"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_AREA_LOCATION = "Location"; /* DESC: Message in the profiler when the profiler is calculating */ ui_strings.S_PROFILER_CALCULATING = "Calculating…"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_DURATION = "Duration"; /* DESC: Message in the profiler when no data was "captured" by the profiler */ ui_strings.S_PROFILER_NO_DATA = "No data"; /* DESC: Message when an event in the profiler has no details */ ui_strings.S_PROFILER_NO_DETAILS = "No details"; /* DESC: Message in the profiler when the profiler is active */ ui_strings.S_PROFILER_PROFILING = "Profiling…"; /* DESC: Message in the profiler when the profiler failed */ ui_strings.S_PROFILER_PROFILING_FAILED = "Profiling failed"; /* DESC: Message before activating the profiler profile */ ui_strings.S_PROFILER_RELOAD = "To get accurate data from the profiler, all other features have to be disabled and the document has to be reloaded."; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_SELF_TIME = "Self time"; /* DESC: Message before starting the profiler */ ui_strings.S_PROFILER_START_MESSAGE = "Press the Record button to start profiling"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_START_TIME = "Start"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TOTAL_SELF_TIME = "Total self time"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_EVENT = "Event name"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_SCRIPT = "Script type"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_SELECTOR = "Selector"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_THREAD = "Thread type"; >>>>>>> /* DESC: Info in the DOM side panel that the selected node has no event listeners attached. */ ui_strings.S_NO_EVENT_LISTENER = "No event listeners"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_AREA_DIMENSION = "Area"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_AREA_LOCATION = "Location"; /* DESC: Message in the profiler when the profiler is calculating */ ui_strings.S_PROFILER_CALCULATING = "Calculating…"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_DURATION = "Duration"; /* DESC: Message in the profiler when no data was "captured" by the profiler */ ui_strings.S_PROFILER_NO_DATA = "No data"; /* DESC: Message when an event in the profiler has no details */ ui_strings.S_PROFILER_NO_DETAILS = "No details"; /* DESC: Message in the profiler when the profiler is active */ ui_strings.S_PROFILER_PROFILING = "Profiling…"; /* DESC: Message in the profiler when the profiler failed */ ui_strings.S_PROFILER_PROFILING_FAILED = "Profiling failed"; /* DESC: Message before activating the profiler profile */ ui_strings.S_PROFILER_RELOAD = "To get accurate data from the profiler, all other features have to be disabled and the document has to be reloaded."; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_SELF_TIME = "Self time"; /* DESC: Message before starting the profiler */ ui_strings.S_PROFILER_START_MESSAGE = "Press the Record button to start profiling"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_START_TIME = "Start"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TOTAL_SELF_TIME = "Total self time"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_EVENT = "Event name"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_SCRIPT = "Script type"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_SELECTOR = "Selector"; /* DESC: Label in a tooltip */ ui_strings.S_PROFILER_TYPE_THREAD = "Thread type";
<<<<<<< // TODO [v3.0] make Class pass the hook specs describe("#define", function() { before(function() { this.parent = new JS.Module("Parent") this.child = new JS.Module("Child", {aMethod: function() {}}) child.include(parent) }) it("adds the method to modules that depend on the receiver", function() { assertEqual( [child.instanceMethod("aMethod")], child.lookup("aMethod") ) parent.define("aMethod", function() {}) assertEqual( [parent.instanceMethod("aMethod"), child.instanceMethod("aMethod")], child.lookup("aMethod") ) }) }) describe("#extended", function() { before(function() { this.extenders = [] this.module = new subjectClass() this.module.extend({ extended: function(base) { extenders.push(base) } }) }) describe("when the module is included by a module", function() { before(function() { this.hostModule = new JS.Module() hostModule.include(module) }) it("is not called", function() { assertEqual( [], extenders ) }) }) describe("when the module is included by a class", function() { before(function() { this.hostClass = new JS.Class() hostClass.include(module) }) it("is not called", function() { assertEqual( [], extenders ) }) }) describe("when the module is used to extend a class", function() { before(function() { this.hostClass = new JS.Class() hostClass.extend(module) }) it("is called with the extended class", function() { assertEqual( [hostClass], extenders ) }) describe("and that class is inherited", function() { before(function() { this.child = new JS.Class(hostClass) }) it("is not called with the subclass", function() { assertEqual( [hostClass], extenders ) }) }) }) describe("when the module is used to extend an object", function() { before(function() { this.hostModule = new JS.Module() hostModule.extend(module) }) it("is called with the extended object", function() { assertEqual( [hostModule], extenders ) }) }) }) ======= >>>>>>> describe("#define", function() { before(function() { this.parent = new JS.Module("Parent") this.child = new JS.Module("Child", {aMethod: function() {}}) child.include(parent) }) it("adds the method to modules that depend on the receiver", function() { assertEqual( [child.instanceMethod("aMethod")], child.lookup("aMethod") ) parent.define("aMethod", function() {}) assertEqual( [parent.instanceMethod("aMethod"), child.instanceMethod("aMethod")], child.lookup("aMethod") ) }) })
<<<<<<< // Array manipulation // --------- Data.Array = {}; Data.Array.Delete = function(arr, val) { return ot.ArrayOperation.Delete(arr, val); }; Data.Array.Push = function(arr, val) { return ot.ArrayOperation.Push(arr, val); }; // Does not yet return a value Data.Array.Pop = function(arr) { return ot.ArrayOperation.Pop(arr); }; Data.Array.Clear = function(arr) { return ot.ArrayOperation.Clear(arr); }; ======= // Extensions // ======== var PersistenceAdapter = function(delegate, nodes) { this.delegate = delegate; this.nodes = nodes; }; PersistenceAdapter.__prototype__ = function() { this.get = function(path) { return this.delegate.get(path); }; this.create = function(__, value) { this.delegate.create(__, value); this.nodes.set(value.id, value); }; this.set = function(path, value) { this.delegate.set(path, value); // TODO: is it ok to store the value as node??? var nodeId = path[0]; var updated = this.delegate.get([nodeId]); this.nodes.set(nodeId, updated); }; this.delete = function(__, value) { this.delegate.delete(__, value); this.nodes.delete(value.id); }; }; PersistenceAdapter.__prototype__.prototype = ot.ObjectOperation.Object.prototype; PersistenceAdapter.prototype = new PersistenceAdapter.__prototype__(); // A mix-in for Data.Graph that makes a graph persistent Data.Graph.makePersistent = function(graph, store) { if (graph.__nodes__ !== undefined) { throw new Error("Graph is already persistent"); } var nodes = store.hash("nodes"); graph.__nodes__ = nodes; graph.objectAdapter = new PersistenceAdapter(graph.objectAdapter, nodes); graph.load = function() { // import persistet nodes var keys = this.__nodes__.keys(); for (var idx = 0; idx < keys.length; idx++) { graph.create(this.__nodes__.get(keys[idx])); } return this; }; var __get__ = graph.get; graph.get = function(path) { if (_.isString(path)) return this.__nodes__.get(path); else return __get__.call(this, path); }; var __reset__ = graph.reset; graph.reset = function() { __reset__.call(this); if (this.__nodes__) this.__nodes__.clear(); }; }; // Versioning // -------- var ChronicleAdapter = function(graph) { this.graph = graph; this.state = Chronicle.ROOT; }; ChronicleAdapter.__prototype__ = function() { this.apply = function(change) { this.graph.__exec__(change); }; this.invert = function(change) { return ot.ObjectOperation.fromJSON(change).invert(); }; this.transform = function(a, b, options) { return ot.ObjectOperation.transform(a, b, options); }; this.reset = function() { this.graph.reset(); }; }; ChronicleAdapter.__prototype__.prototype = Chronicle.Versioned.prototype; ChronicleAdapter.prototype = new ChronicleAdapter.__prototype__(); Data.Graph.makeVersioned = function(graph, chronicle) { if (graph.chronicle !== undefined) { throw new Error("Graph is already versioned."); } graph.chronicle = chronicle || Chronicle.create(); graph.chronicle.manage(new ChronicleAdapter(graph)); graph.__exec__ = graph.exec; graph.exec = function(command) { var op = graph.__exec__.call(this, command); this.chronicle.record(util.clone(op)); return op; }; var __reset__ = graph.reset; graph.reset = function() { __reset__.call(this); this.chronicle.versioned.state = Chronicle.ROOT; }; }; // Exports // ======== >>>>>>> // Array manipulation // --------- Data.Array = {}; Data.Array.Delete = function(arr, val) { return ot.ArrayOperation.Delete(arr, val); }; Data.Array.Push = function(arr, val) { return ot.ArrayOperation.Push(arr, val); }; // Does not yet return a value Data.Array.Pop = function(arr) { return ot.ArrayOperation.Pop(arr); }; Data.Array.Clear = function(arr) { return ot.ArrayOperation.Clear(arr); }; // Extensions // ======== var PersistenceAdapter = function(delegate, nodes) { this.delegate = delegate; this.nodes = nodes; }; PersistenceAdapter.__prototype__ = function() { this.get = function(path) { return this.delegate.get(path); }; this.create = function(__, value) { this.delegate.create(__, value); this.nodes.set(value.id, value); }; this.set = function(path, value) { this.delegate.set(path, value); // TODO: is it ok to store the value as node??? var nodeId = path[0]; var updated = this.delegate.get([nodeId]); this.nodes.set(nodeId, updated); }; this.delete = function(__, value) { this.delegate.delete(__, value); this.nodes.delete(value.id); }; }; PersistenceAdapter.__prototype__.prototype = ot.ObjectOperation.Object.prototype; PersistenceAdapter.prototype = new PersistenceAdapter.__prototype__(); // A mix-in for Data.Graph that makes a graph persistent Data.Graph.makePersistent = function(graph, store) { if (graph.__nodes__ !== undefined) { throw new Error("Graph is already persistent"); } var nodes = store.hash("nodes"); graph.__nodes__ = nodes; graph.objectAdapter = new PersistenceAdapter(graph.objectAdapter, nodes); graph.load = function() { // import persistet nodes var keys = this.__nodes__.keys(); for (var idx = 0; idx < keys.length; idx++) { graph.create(this.__nodes__.get(keys[idx])); } return this; }; var __get__ = graph.get; graph.get = function(path) { if (_.isString(path)) return this.__nodes__.get(path); else return __get__.call(this, path); }; var __reset__ = graph.reset; graph.reset = function() { __reset__.call(this); if (this.__nodes__) this.__nodes__.clear(); }; }; // Versioning // -------- var ChronicleAdapter = function(graph) { this.graph = graph; this.state = Chronicle.ROOT; }; ChronicleAdapter.__prototype__ = function() { this.apply = function(change) { this.graph.__exec__(change); }; this.invert = function(change) { return ot.ObjectOperation.fromJSON(change).invert(); }; this.transform = function(a, b, options) { return ot.ObjectOperation.transform(a, b, options); }; this.reset = function() { this.graph.reset(); }; }; ChronicleAdapter.__prototype__.prototype = Chronicle.Versioned.prototype; ChronicleAdapter.prototype = new ChronicleAdapter.__prototype__(); Data.Graph.makeVersioned = function(graph, chronicle) { if (graph.chronicle !== undefined) { throw new Error("Graph is already versioned."); } graph.chronicle = chronicle || Chronicle.create(); graph.chronicle.manage(new ChronicleAdapter(graph)); graph.__exec__ = graph.exec; graph.exec = function(command) { var op = graph.__exec__.call(this, command); this.chronicle.record(util.clone(op)); return op; }; var __reset__ = graph.reset; graph.reset = function() { __reset__.call(this); this.chronicle.versioned.state = Chronicle.ROOT; }; }; // Exports // ========
<<<<<<< var Generators = module.exports = { object: objectMock, array: arrayMock, string: stringMock, integer: integerMock, number: numberMock, boolean: booleanMock, file: fileMock, mock: mock }; function mock(schema, useExample) { var mock; ======= const mock = schema => { let mock; >>>>>>> const mock = (schema, useExample) => { let mock; <<<<<<< if (example && useExample) { mock = example; } else { /** * Get the mock generator from the `type` of the schema */ var generator = Generators[type]; if (generator) { mock = generator.call(null, schema, useExample); } ======= const generator = Generators[type]; if (generator) { mock = generator.call(null, schema); >>>>>>> if (example && useExample) { mock = example; } else { const generator = Generators[type]; if (generator) { mock = generator.call(null, schema); } <<<<<<< } function objectMock(schema, useExample) { var mockObj = {}; var props = schema.properties; if (props) { Object.keys(props).forEach(function (key) { mockObj[key] = mock(props[key], useExample); ======= }; const objectMock = ({ properties, additionalProperties }) => { let mockObj = {}; if (properties) { Object.keys(properties).forEach(function (key) { mockObj[key] = mock(properties[key]); >>>>>>> }; const objectMock = ({ properties, additionalProperties }, useExample ) => { let mockObj = {}; if (properties) { Object.keys(properties).forEach(function (key) { mockObj[key] = mock(properties[key], useExample); <<<<<<< mockObj[Chance.word()] = mock(schema.additionalProperties, useExample); ======= mockObj[Chance.word()] = mock(additionalProperties); >>>>>>> mockObj[Chance.word()] = mock(additionalProperties, useExample); <<<<<<< function arrayMock(schema, useExample) { var items = schema.items; var min; var max; var numItems; var arr = []; ======= const arrayMock = ({ items, minItems, maxItems }) => { let min; let max; let numItems; let arr = []; >>>>>>> const arrayMock = ({ items, minItems, maxItems }, useExample) => { let min; let max; let numItems; let arr = []; <<<<<<< for (var i = 0; i < numItems; i++) { arr.push(mock(items, useExample)); ======= for (let i = 0; i < numItems; i++) { arr.push(mock(items)); >>>>>>> for (let i = 0; i < numItems; i++) { arr.push(mock(items, useExample));
<<<<<<< // @ts-ignore dtstart: options.dtstart || dtstart, ignoretz: options.ignoretz, tzinfos: options.tzinfos ======= dtstart: options.dtstart || dtstart >>>>>>> // @ts-ignore dtstart: options.dtstart || dtstart <<<<<<< // @ts-ignore dtstart: options.dtstart || dtstart, ignoretz: options.ignoretz, tzinfos: options.tzinfos ======= dtstart: options.dtstart || dtstart >>>>>>> // @ts-ignore dtstart: options.dtstart || dtstart
<<<<<<< shouldContinue = false await sleep(1000) ======= await sleep(1100) >>>>>>> shouldContinue = false await sleep(1100)
<<<<<<< overrideOrganizationTextingHours: Boolean textingHoursEnforced: Boolean textingHoursStart: Int textingHoursEnd: Int timezone: String ======= editors: String >>>>>>> editors: String overrideOrganizationTextingHours: Boolean textingHoursEnforced: Boolean textingHoursStart: Int textingHoursEnd: Int timezone: String
<<<<<<< import { r, datawarehouse, Assignment, Campaign, CampaignContact, Organization, User } from '../server/models' ======= import { r, datawarehouse, cacheableData, Assignment, Campaign, CampaignContact, Organization, User, UserOrganization } from '../server/models' >>>>>>> import { r, datawarehouse, cacheableData, Assignment, Campaign, CampaignContact, Organization, User, UserOrganization } from '../server/models' <<<<<<< ======= let warehouseConnection = null function optOutsByOrgId(orgId) { return r.knex.select('cell').from('opt_out').where('organization_id', orgId) } function optOutsByInstance() { return r.knex.select('cell').from('opt_out') } function getOptOutSubQuery(orgId) { return (!!process.env.OPTOUTS_SHARE_ALL_ORGS ? optOutsByInstance() : optOutsByOrgId(orgId)) } >>>>>>> let warehouseConnection = null function optOutsByOrgId(orgId) { return r.knex.select('cell').from('opt_out').where('organization_id', orgId) } function optOutsByInstance() { return r.knex.select('cell').from('opt_out') } function getOptOutSubQuery(orgId) { return (!!process.env.OPTOUTS_SHARE_ALL_ORGS ? optOutsByInstance() : optOutsByOrgId(orgId)) } <<<<<<< const optOutCellCount = await r.knex('campaign_contact') .whereIn('cell', function optouts() { this.select('cell').from('opt_out').where('organization_id', campaign.organization_id) }) ======= const deleteOptOutCells = await r.knex('campaign_contact') .whereIn('cell', getOptOutSubQuery(campaign.organization_id)) >>>>>>> const optOutCellCount = await r.knex('campaign_contact') .whereIn('cell', function optouts() { this.select('cell').from('opt_out').where('organization_id', campaign.organization_id) }) const deleteOptOutCells = await r.knex('campaign_contact') .whereIn('cell', getOptOutSubQuery(campaign.organization_id)) <<<<<<< console.log('OPTOUT CELL COUNT', optOutCellCount) ======= .then(result => { console.log('# of contacts opted out removed from DW query: ' + result); validationStats = { optOutCount: result } }) const inValidCellCount = await r.knex('campaign_contact') .whereRaw('length(cell) != 12') .andWhere('campaign_id', jobEvent.campaignId) .delete() .then(result => { console.log('# of contacts with invalid cells removed from DW query: ' + result); validationStats = { invalidCellCount: result } }) >>>>>>> .then(result => { console.log('# of contacts opted out removed from DW query: ' + result); validationStats = { optOutCount: result } }) const inValidCellCount = await r.knex('campaign_contact') .whereRaw('length(cell) != 12') .andWhere('campaign_id', jobEvent.campaignId) .delete() .then(result => { console.log('# of contacts with invalid cells removed from DW query: ' + result); validationStats = { invalidCellCount: result } }) <<<<<<< return { 'completed': 1 } ======= await cacheableData.campaign.reload(jobEvent.campaignId) return { 'completed': 1, validationStats } >>>>>>> await cacheableData.campaign.reload(jobEvent.campaignId) return { 'completed': 1, validationStats } <<<<<<< ======= /* A. clientMessagedCount or serverMessagedCount: # of contacts assigned and already texted (for a texter) aka clientMessagedCount / serverMessagedCount B. needsMessageCount: # of contacts assigned but not yet texted (for a texter) C. max contacts (for a texter) D. pool of unassigned and assignable texters aka availableContacts In dynamic assignment mode: Add new texter Create assignment Change C if new C >= A and new C <> old C: Update assignment if new C >= A and new C = old C: No change if new C < A or new C = 0: Why are we doing this? If we want to keep someone from texting any more, we set their max_contacts to 0, and manually re-assign any of their previously texted contacts in the Message Review admin. TODO: Form validation should catch the case where C < A. Delete texter Assignment form currently prevents this (though it might be okay if A = 0). To stop a texter from texting any more in the campaign, set their max to zero and re-assign their contacts to another texter. In standard assignment mode: Add new texter Create assignment Assign B contacts Change B if new B > old B: Update assignment Assign (new B - old B) contacts if new B = old B: No change if new B < old B: Update assignment Unassign (old B - new B) untexted contacts if new B = 0: Update assignment Delete texter Not sure we allow this? TODO: what happens when we switch modes? Do we allow it? */ >>>>>>> /* A. clientMessagedCount or serverMessagedCount: # of contacts assigned and already texted (for a texter) aka clientMessagedCount / serverMessagedCount B. needsMessageCount: # of contacts assigned but not yet texted (for a texter) C. max contacts (for a texter) D. pool of unassigned and assignable texters aka availableContacts In dynamic assignment mode: Add new texter Create assignment Change C if new C >= A and new C <> old C: Update assignment if new C >= A and new C = old C: No change if new C < A or new C = 0: Why are we doing this? If we want to keep someone from texting any more, we set their max_contacts to 0, and manually re-assign any of their previously texted contacts in the Message Review admin. TODO: Form validation should catch the case where C < A. Delete texter Assignment form currently prevents this (though it might be okay if A = 0). To stop a texter from texting any more in the campaign, set their max to zero and re-assign their contacts to another texter. In standard assignment mode: Add new texter Create assignment Assign B contacts Change B if new B > old B: Update assignment Assign (new B - old B) contacts if new B = old B: No change if new B < old B: Update assignment Unassign (old B - new B) untexted contacts if new B = 0: Update assignment Delete texter Not sure we allow this? TODO: what happens when we switch modes? Do we allow it? */ <<<<<<< if (texter && texter.needsMessageCount === parseInt(assignment.needs_message_count, 10)) { unchangedTexters[assignment.user_id] = true return null } else if (texter) { // assignment change // If there is a delta between client and server, then accomodate delta (See #322) const clientMessagedCount = texter.contactsCount - texter.needsMessageCount const serverMessagedCount = assignment.full_contact_count - assignment.needs_message_count const numDifferent = ((texter.needsMessageCount || 0) - assignment.needs_message_count - Math.max(0, serverMessagedCount - clientMessagedCount)) if (numDifferent < 0) { // got less than before demotedTexters[assignment.id] = -numDifferent } else { // got more than before: assign the difference texter.needsMessageCount = numDifferent } ======= const unchangedMaxContacts = parseInt(texter.maxContacts, 10) === assignment.max_contacts || // integer = integer texter.maxContacts === assignment.max_contacts // null = null const unchangedNeedsMessageCount = texter.needsMessageCount === parseInt(assignment.needs_message_count, 10) if (texter) { if ((!dynamic && unchangedNeedsMessageCount) || (dynamic && unchangedMaxContacts)) { unchangedTexters[assignment.user_id] = true return null } else if (!dynamic) { // standard assignment change // If there is a delta between client and server, then accommodate delta (See #322) const clientMessagedCount = texter.contactsCount - texter.needsMessageCount const serverMessagedCount = assignment.full_contact_count - assignment.needs_message_count const numDifferent = ((texter.needsMessageCount || 0) - assignment.needs_message_count - Math.max(0, serverMessagedCount - clientMessagedCount)) if (numDifferent < 0) { // got less than before demotedTexters[assignment.id] = -numDifferent } else { // got more than before: assign the difference texter.needsMessageCount = numDifferent } } >>>>>>> const unchangedMaxContacts = parseInt(texter.maxContacts, 10) === assignment.max_contacts || // integer = integer texter.maxContacts === assignment.max_contacts // null = null const unchangedNeedsMessageCount = texter.needsMessageCount === parseInt(assignment.needs_message_count, 10) if (texter) { if ((!dynamic && unchangedNeedsMessageCount) || (dynamic && unchangedMaxContacts)) { unchangedTexters[assignment.user_id] = true return null } else if (!dynamic) { // standard assignment change // If there is a delta between client and server, then accommodate delta (See #322) const clientMessagedCount = texter.contactsCount - texter.needsMessageCount const serverMessagedCount = assignment.full_contact_count - assignment.needs_message_count const numDifferent = ((texter.needsMessageCount || 0) - assignment.needs_message_count - Math.max(0, serverMessagedCount - clientMessagedCount)) if (numDifferent < 0) { // got less than before demotedTexters[assignment.id] = -numDifferent } else { // got more than before: assign the difference texter.needsMessageCount = numDifferent } } <<<<<<< const maxContacts = parseInt(texter.maxContacts || 0, 10) ======= let maxContacts = null // no limit if (texter.maxContacts || texter.maxContacts === 0) { maxContacts = Math.min(parseInt(texter.maxContacts, 10), parseInt(process.env.MAX_CONTACTS_PER_TEXTER || texter.maxContacts, 10)) } else if (process.env.MAX_CONTACTS_PER_TEXTER) { maxContacts = parseInt(process.env.MAX_CONTACTS_PER_TEXTER, 10) } >>>>>>> let maxContacts = null // no limit if (texter.maxContacts || texter.maxContacts === 0) { maxContacts = Math.min(parseInt(texter.maxContacts, 10), parseInt(process.env.MAX_CONTACTS_PER_TEXTER || texter.maxContacts, 10)) } else if (process.env.MAX_CONTACTS_PER_TEXTER) { maxContacts = parseInt(process.env.MAX_CONTACTS_PER_TEXTER, 10) } <<<<<<< assignment = new Assignment({ id: existingAssignment.id, user_id: existingAssignment.user_id, campaign_id: cid }) ======= if (!dynamic) { assignment = new Assignment({ id: existingAssignment.id, user_id: existingAssignment.user_id, campaign_id: cid }) // for notification } else { await r.knex('assignment') .where({ id: existingAssignment.id }) .update({ max_contacts: maxContacts }) } >>>>>>> if (!dynamic) { assignment = new Assignment({ id: existingAssignment.id, user_id: existingAssignment.user_id, campaign_id: cid }) // for notification } else { await r.knex('assignment') .where({ id: existingAssignment.id }) .update({ max_contacts: maxContacts }) }
<<<<<<< const PER_ASSIGNED_NUMBER_MESSAGE_COUNT = 350 async function sleep(ms = 0) { return new Promise(fn => setTimeout(fn, ms)) } ======= import { sleep } from './lib' >>>>>>> import { sleep } from './lib' const PER_ASSIGNED_NUMBER_MESSAGE_COUNT = 350
<<<<<<< date: '2017-09-24', // eslint-disable-next-line migrate: async function() { await r.knex.schema.alterTable('job_request', (table) => { table.string('result_message').nullable().default('') }) await r.knex.schema.alterTable('opt_out', (table) => { table.string('reason_code').nullable().default('') }) } }, { auto: true, //4 date: '2017-09-22', migrate: async function migrate() { await r.knex.schema.alterTable('campaign', (table) => { table.boolean('use_dynamic_assignment').notNullable().default(false); }) await r.knex.schema.alterTable('assignment', (table) => { table.integer('max_contacts'); }) console.log('added dynamic_assigment column to campaign table and max_contacts to assignments') } }, { auto: true, //5 date: '2017-09-25', migrate: async function migrate() { await r.knex.schema.alterTable('campaign_contact', (table) => { table.timestamp('updated_at').default('now()'); }) console.log('added updated_at column to campaign_contact') } }, { auto: true, //6 date: '2017-10-03', migrate: async function migrate() { await r.knex.schema.alterTable('interaction_step', (table) => { table.timestamp('is_deleted').notNullable().default(false); }) console.log('added is_deleted column to interaction_step') } }, { auto: true, //7 date: '2017-10-04', migrate: async function migrate() { await r.knex.schema.alterTable('campaign', (table) => { table.text('intro_html'); table.text('logo_image_url'); table.string('primary_color'); }) console.log('added is_deleted column to interaction_step') } }, { auto: true, //8 date: '2017-09-28', migrate: async function migrate() { await r.knex.schema.alterTable('user', (table) => { table.boolean('terms').default(false); }) console.log('added terms column to user') } }, { auto: true, //9 date: '2017-10-23', migrate: async function migrate() { await r.knex.schema.alterTable('message', (table) => { table.timestamp('queued_at'); table.timestamp('sent_at'); table.timestamp('service_response_at'); }) console.log('added action timestamp columns to message') } }, { auto: true, //10 date: '2017-10-23', migrate: async function migrate() { await r.knex.schema.createTable('log', (table) => { table.string('message_sid'); table.json('body'); table.timestamp('created_at').default('now()'); }) console.log('added log table') } ======= date: '2017-09-24', // eslint-disable-next-line migrate: async function() { await r.knex.schema.alterTable('job_request', (table) => { table.string('result_message').nullable().default('') }) await r.knex.schema.alterTable('opt_out', (table) => { table.string('reason_code').nullable().default('') }) } }, { auto: true, //4 date: '2017-10-23', migrate: async function migrate() { await r.knex.schema.alterTable('message', (table) => { table.timestamp('queued_at'); table.timestamp('sent_at'); table.timestamp('service_response_at'); }) console.log('added action timestamp columns to message') } }, { auto: true, //5 date: '2017-10-23', migrate: async function migrate() { await r.knex.schema.createTableIfNotExists('log', (table) => { table.string('message_sid'); table.json('body'); table.timestamp('created_at').default('now()'); }) console.log('added log table') } >>>>>>> date: '2017-09-24', // eslint-disable-next-line migrate: async function() { await r.knex.schema.alterTable('job_request', (table) => { table.string('result_message').nullable().default('') }) await r.knex.schema.alterTable('opt_out', (table) => { table.string('reason_code').nullable().default('') }) } }, { auto: true, //4 date: '2017-09-22', migrate: async function migrate() { await r.knex.schema.alterTable('campaign', (table) => { table.boolean('use_dynamic_assignment').notNullable().default(false); }) await r.knex.schema.alterTable('assignment', (table) => { table.integer('max_contacts'); }) console.log('added dynamic_assigment column to campaign table and max_contacts to assignments') } }, { auto: true, //5 date: '2017-09-25', migrate: async function migrate() { await r.knex.schema.alterTable('campaign_contact', (table) => { table.timestamp('updated_at').default('now()'); }) console.log('added updated_at column to campaign_contact') } }, { auto: true, //6 date: '2017-10-03', migrate: async function migrate() { await r.knex.schema.alterTable('interaction_step', (table) => { table.timestamp('is_deleted').notNullable().default(false); }) console.log('added is_deleted column to interaction_step') } }, { auto: true, //7 date: '2017-10-04', migrate: async function migrate() { await r.knex.schema.alterTable('campaign', (table) => { table.text('intro_html'); table.text('logo_image_url'); table.string('primary_color'); }) console.log('added is_deleted column to interaction_step') } }, { auto: true, //8 date: '2017-09-28', migrate: async function migrate() { await r.knex.schema.alterTable('user', (table) => { table.boolean('terms').default(false); }) console.log('added terms column to user') } }, { auto: true, //9 date: '2017-10-23', migrate: async function migrate() { await r.knex.schema.alterTable('message', (table) => { table.timestamp('queued_at'); table.timestamp('sent_at'); table.timestamp('service_response_at'); }) console.log('added action timestamp columns to message') } }, { auto: true, //10 date: '2017-10-23', migrate: async function migrate() { await r.knex.schema.createTableIfNotExists('log', (table) => { table.string('message_sid'); table.json('body'); table.timestamp('created_at').default('now()'); }) console.log('added log table') }
<<<<<<< settings.debug_remote_setting.set('debug-remote', is_debug_remote); settings.debug_remote_setting.set('port', port); client.setup(); target.disabled = target.previousSibling.previousSibling.firstChild.checked == settings.debug_remote_setting.get('debug-remote'); ======= if(0 < port && port <= 0xffff) { settings.debug_remote_setting.set('debug-remote', is_debug_remote); settings.debug_remote_setting.set('port', port); client.scopeSetupClient(); target.disabled = ( target.previousSibling.previousSibling.firstChild.checked == settings.debug_remote_setting.get('debug-remote')); } else { alert(ui_strings.S_INFO_NO_VALID_PORT_NUMBER); target.parentNode.getElementsByTagName('input')[1].value = port < 1 && 1 || 0xffff; } >>>>>>> if(0 < port && port <= 0xffff) { settings.debug_remote_setting.set('debug-remote', is_debug_remote); settings.debug_remote_setting.set('port', port); client.setup(); target.disabled = ( target.previousSibling.previousSibling.firstChild.checked == settings.debug_remote_setting.get('debug-remote')); } else { alert(ui_strings.S_INFO_NO_VALID_PORT_NUMBER); target.parentNode.getElementsByTagName('input')[1].value = port < 1 && 1 || 0xffff; }
<<<<<<< this._searches = {}; ======= this._overlays = {}; >>>>>>> this._searches = {}; this._overlays = {}; <<<<<<< this.get_search = function(id){}; ======= this.get_overlay = function(id){}; >>>>>>> this.get_search = function(id){}; this.get_overlay = function(id){}; <<<<<<< this.register_modebar = function(id, modebar){}; this.register_search = function(id, search){}; ======= this.register_modebar = function(id, modebar){}; this.register_overlay = function(id, items){}; >>>>>>> this.register_modebar = function(id, modebar){}; this.register_search = function(id, search){}; this.register_overlay = function(id, items){}; <<<<<<< this.get_search = function(id) { return this._searches[id] || null; }; this.get_layout_box = function(view_id) { return window.topCell.get_cell(view_id); }; ======= this.get_overlay = function(id) { return this._overlays[id] || null; }; >>>>>>> this.get_search = function(id) { return this._searches[id] || null; }; this.get_overlay = function(id) { return this._overlays[id] || null; }; this.get_layout_box = function(view_id) { return window.topCell.get_cell(view_id); }; <<<<<<< this.register_search = function(id, search) { if (!this._searches[id]) { this._searches[id] = search; } return this._searches[id]; }; ======= this.register_overlay = function(id, items) { if (!this._overlays[id]) { this._overlays[id] = items; } return this._overlays[id]; }; >>>>>>> this.register_search = function(id, search) { if (!this._searches[id]) { this._searches[id] = search; } return this._searches[id]; }; this.register_overlay = function(id, items) { if (!this._overlays[id]) { this._overlays[id] = items; } return this._overlays[id]; };
<<<<<<< import { Link, Redirect } from 'react-router-dom'; import axios from 'axios'; import Button from '../../components/UI/Button/Button'; import ErrorMessage from '../../components/ErrorMessages/ErrorMessages'; ======= import './Login.css'; import Form from './Form'; import ky from 'ky'; >>>>>>> import { Link, Redirect } from 'react-router-dom'; import axios from 'axios'; import Button from '../../components/UI/Button/Button'; import ErrorMessage from '../../components/ErrorMessages/ErrorMessages'; import PasswordMessage from '../../components/ErrorMessages/PasswordMessage/PasswordMessage'; <<<<<<< import Form from './Form'; import './Login.css'; import './ForgotPassword.styles.scss'; import './ResetPassword.styles.scss'; import spinner from './tail-spin.svg'; ======= import Button from '../../components/UI/Button/Button'; import PasswordMessage from '../../components/ErrorMessages/PasswordMessage/PasswordMessage'; >>>>>>> import Form from './Form'; import './Login.css'; import './ForgotPassword.styles.scss'; import './ResetPassword.styles.scss'; import spinner from './tail-spin.svg'; <<<<<<< passwordMatchError: false, PasswordValidError: false, email: '', updated: false, isLoading: true, error: false, waitForRedirect: true, redirectToLogin: false ======= PasswordValidError: false >>>>>>> passwordMatchError: false, PasswordValidError: false, email: '', updated: false, isLoading: true, error: false, waitForRedirect: true, redirectToLogin: false <<<<<<< if (!IsPasswordIdenticalVar) { this.displayPasswordMatchError(); } else if (!isPasswordValidVar) { this.hidePasswordMatchError(); this.displayPasswordValidError(); } else { this.hidePasswordMatchError(); this.hidePasswordValidError(); const url = 'http://localhost:3001/users/updatePasswordViaEmail'; axios .put(url, { email, password }) .then(response => { if (response.data.message === 'password-updated') { this.setState({ updated: true, error: false, loading: false }); ======= if (IsPasswordIdenticalVar && isPasswordValidVar) { (async () => { const token = window.location.pathname; const url = `http://localhost:3001/users${token}`; await ky.post(url, { json: this.state }).then(res => { if (res.status === 200) { this.props.history.push('/login'); >>>>>>> if (!IsPasswordIdenticalVar) { this.displayPasswordMatchError(); } else if (!isPasswordValidVar) { this.hidePasswordMatchError(); this.displayPasswordValidError(); } else { this.hidePasswordMatchError(); this.hidePasswordValidError(); const url = 'http://localhost:3001/users/updatePasswordViaEmail'; axios .put(url, { email, password }) .then(response => { if (response.data.message === 'password-updated') { this.setState({ updated: true, error: false, loading: false }); <<<<<<< const { password, confirmPassword, error, isLoading, updated } = this.state; let passwordMatchErrorVar = ''; if (this.state.passwordMatchError) { passwordMatchErrorVar = ( <ErrorMessage content=" Password doesn't match" /> ); } ======= >>>>>>> const { password, confirmPassword, error, isLoading, updated } = this.state; let passwordMatchErrorVar = ''; if (this.state.passwordMatchError) { passwordMatchErrorVar = ( <ErrorMessage content=" Password doesn't match" /> ); }
<<<<<<< /* DESC: Label for the setting of the monospace font. */ ui_strings.M_VIEW_LABEL_MONOSPACE_FONT = 'Monospace Font'; /* DESC: Setting label to select the font face */ ui_strings.S_LABEL_FONT_SELECTION_FACE = "Font Face"; /* DESC: Setting label to select the font face */ ui_strings.S_LABEL_FONT_SELECTION_SIZE = "Font Size"; /* DESC: Setting label to select the line height */ ui_strings.S_LABEL_FONT_SELECTION_LINE_HEIGHT = "Line Height"; /* DESC: Button label to reset the fon selection to the default values */ ui_strings.S_BUTTON_RESET_TO_DEFAULTS = "Reset to default values"; /* DESC: Time strings that express in how long something will happen */ ======= /* DESC: In less then 1 minute */ >>>>>>> /* DESC: Label for the setting of the monospace font. */ ui_strings.M_VIEW_LABEL_MONOSPACE_FONT = 'Monospace Font'; /* DESC: Setting label to select the font face */ ui_strings.S_LABEL_FONT_SELECTION_FACE = "Font Face"; /* DESC: Setting label to select the font face */ ui_strings.S_LABEL_FONT_SELECTION_SIZE = "Font Size"; /* DESC: Setting label to select the line height */ ui_strings.S_LABEL_FONT_SELECTION_LINE_HEIGHT = "Line Height"; /* DESC: Button label to reset the fon selection to the default values */ ui_strings.S_BUTTON_RESET_TO_DEFAULTS = "Reset to default values"; /* DESC: In less then 1 minute */ <<<<<<< ui_strings.COOKIE_MANAGER_IN_X_MONTHS = "In %s months"; ======= /* DESC: In x months */ ui_strings.COOKIE_MANAGER_IN_X_MONTHS = "In %s month"; /* DESC: In 1 year */ >>>>>>> /* DESC: In x months */ ui_strings.COOKIE_MANAGER_IN_X_MONTHS = "In %s months"; /* DESC: In 1 year */
<<<<<<< /* temporary export view */ window.export_data = new cls.ExportData(); new cls.ExportDataView('export_data', ui_strings.M_VIEW_LABEL_EXPORT, 'scroll export-data'); ======= >>>>>>> <<<<<<< ui_strings.M_VIEW_LABEL_COMMAND_LINE, 'scroll command-line mono', ======= ui_strings.M_VIEW_LABEL_CONSOLE, 'scroll console mono', >>>>>>> ui_strings.M_VIEW_LABEL_COMMAND_LINE, 'scroll console mono',
<<<<<<< * @property {string} instanceID PacketInfo instanceID * @property {string} metadata PacketInfo metadata ======= * @property {number|null} [seq] PacketInfo seq >>>>>>> * @property {number} seq PacketInfo seq * @property {string} instanceID PacketInfo instanceID * @property {string} metadata PacketInfo metadata <<<<<<< * PacketInfo instanceID. * @member {string} instanceID * @memberof packets.PacketInfo * @instance */ PacketInfo.prototype.instanceID = ""; /** * PacketInfo metadata. * @member {string} metadata * @memberof packets.PacketInfo * @instance */ PacketInfo.prototype.metadata = ""; /** ======= * PacketInfo seq. * @member {number} seq * @memberof packets.PacketInfo * @instance */ PacketInfo.prototype.seq = 0; /** >>>>>>> * PacketInfo seq. * @member {number} seq * @memberof packets.PacketInfo * @instance */ PacketInfo.prototype.seq = 0; /** * PacketInfo instanceID. * @member {string} instanceID * @memberof packets.PacketInfo * @instance */ PacketInfo.prototype.instanceID = ""; /** * PacketInfo metadata. * @member {string} metadata * @memberof packets.PacketInfo * @instance */ PacketInfo.prototype.metadata = ""; /** <<<<<<< writer.uint32(/* id 8, wireType 2 =*/66).string(message.instanceID); writer.uint32(/* id 9, wireType 2 =*/74).string(message.metadata); ======= if (message.seq != null && message.hasOwnProperty("seq")) writer.uint32(/* id 8, wireType 0 =*/64).int32(message.seq); >>>>>>> writer.uint32(/* id 8, wireType 0 =*/64).int32(message.seq); writer.uint32(/* id 9, wireType 2 =*/74).string(message.instanceID); writer.uint32(/* id 10, wireType 2 =*/82).string(message.metadata); <<<<<<< case 8: message.instanceID = reader.string(); break; case 9: message.metadata = reader.string(); break; ======= case 8: message.seq = reader.int32(); break; >>>>>>> case 8: message.seq = reader.int32(); break; case 9: message.instanceID = reader.string(); break; case 10: message.metadata = reader.string(); break; <<<<<<< if (!$util.isString(message.instanceID)) return "instanceID: string expected"; if (!$util.isString(message.metadata)) return "metadata: string expected"; ======= if (message.seq != null && message.hasOwnProperty("seq")) if (!$util.isInteger(message.seq)) return "seq: integer expected"; >>>>>>> if (!$util.isInteger(message.seq)) return "seq: integer expected"; if (!$util.isString(message.instanceID)) return "instanceID: string expected"; if (!$util.isString(message.metadata)) return "metadata: string expected"; <<<<<<< if (object.instanceID != null) message.instanceID = String(object.instanceID); if (object.metadata != null) message.metadata = String(object.metadata); ======= if (object.seq != null) message.seq = object.seq | 0; >>>>>>> if (object.seq != null) message.seq = object.seq | 0; if (object.instanceID != null) message.instanceID = String(object.instanceID); if (object.metadata != null) message.metadata = String(object.metadata); <<<<<<< object.instanceID = ""; object.metadata = ""; ======= object.seq = 0; >>>>>>> object.seq = 0; object.instanceID = ""; object.metadata = ""; <<<<<<< if (message.instanceID != null && message.hasOwnProperty("instanceID")) object.instanceID = message.instanceID; if (message.metadata != null && message.hasOwnProperty("metadata")) object.metadata = message.metadata; ======= if (message.seq != null && message.hasOwnProperty("seq")) object.seq = message.seq; >>>>>>> if (message.seq != null && message.hasOwnProperty("seq")) object.seq = message.seq; if (message.instanceID != null && message.hasOwnProperty("instanceID")) object.instanceID = message.instanceID; if (message.metadata != null && message.hasOwnProperty("metadata")) object.metadata = message.metadata;
<<<<<<< const _ = require("lodash"); const Promise = require("bluebird"); const BaseCacher = require("./base"); const { METRIC } = require("../metrics"); const { BrokerOptionsError } = require("../errors"); let Redis, Redlock; ======= const Promise = require("bluebird"); const BaseCacher = require("./base"); const _ = require("lodash"); const { BrokerOptionsError } = require("../errors"); const Serializers = require("../serializers"); >>>>>>> let Redis, Redlock; const Promise = require("bluebird"); const BaseCacher = require("./base"); const _ = require("lodash"); const { METRIC } = require("../metrics"); const { BrokerOptionsError } = require("../errors"); const Serializers = require("../serializers"); <<<<<<< this.metrics.increment(METRIC.MOLECULER_CACHER_GET_TOTAL); const timeEnd = this.metrics.timer(METRIC.MOLECULER_CACHER_GET_TIME); return this.client.get(this.prefix + key).then((data) => { ======= return this.client.getBuffer(this.prefix + key).then((data) => { >>>>>>> this.metrics.increment(METRIC.MOLECULER_CACHER_GET_TOTAL); const timeEnd = this.metrics.timer(METRIC.MOLECULER_CACHER_GET_TIME); return this.client.getBuffer(this.prefix + key).then((data) => { <<<<<<< const res = JSON.parse(data); timeEnd(); return res; ======= return this.serializer.deserialize(data); >>>>>>> const res = this.serializer.deserialize(data); timeEnd(); return res; <<<<<<< this.metrics.increment(METRIC.MOLECULER_CACHER_SET_TOTAL); const timeEnd = this.metrics.timer(METRIC.MOLECULER_CACHER_SET_TIME); data = JSON.stringify(data); ======= data = this.serializer.serialize(data); >>>>>>> this.metrics.increment(METRIC.MOLECULER_CACHER_SET_TOTAL); const timeEnd = this.metrics.timer(METRIC.MOLECULER_CACHER_SET_TIME); data = this.serializer.serialize(data); <<<<<<< return this.client.pipeline().get(this.prefix + key).ttl(this.prefix + key).exec().then((res) => { let [err0, data] = res[0]; let [err1, ttl] = res[1]; ======= return this.client.pipeline().getBuffer(this.prefix + key).ttl(this.prefix + key).exec().then((res) => { let [err0, data] = res[0]; let [err1, ttl] = res[1]; >>>>>>> return this.client.pipeline().getBuffer(this.prefix + key).ttl(this.prefix + key).exec().then((res) => { let [err0, data] = res[0]; let [err1, ttl] = res[1]; <<<<<<< this.logger.error(`Error occured while deleting keys '${pattern}' from node.`, err); ======= // eslint-disable-next-line no-console console.error("Error occured while deleting keys from node"); >>>>>>> this.logger.error(`Error occured while deleting keys '${pattern}' from node.`, err); <<<<<<< // End deleting keys from node ======= // console.log('End deleting keys from node') >>>>>>> // End deleting keys from node
<<<<<<< const _ = require("lodash"); const Promise = require("bluebird"); const BaseCacher = require("./base"); const { METRIC } = require("../metrics"); ======= const Promise = require("bluebird"); const BaseCacher = require("./base"); const _ = require('lodash') const { BrokerOptionsError } = require("../errors"); >>>>>>> const _ = require("lodash"); const Promise = require("bluebird"); const BaseCacher = require("./base"); const { METRIC } = require("../metrics"); const { BrokerOptionsError } = require("../errors");
<<<<<<< it('should support multiple arguments on actions', () => { const { Provider, Consumer } = createStore({ model: 0, actions: { increment(state, stepper = 1, additionalStepper = 0) { return state + stepper + additionalStepper }, }, }) const tree = TestRenderer.create( <Provider> <Consumer> {(state, actions) => ( <div> <div>{JSON.stringify(state, null, 2)}</div> <button onClick={() => actions.increment(5, 2)}>Increment</button> </div> )} </Consumer> </Provider> ) tree.root.findByType('button').props.onClick() expect(tree.getInstance().state.state).toBe(7) expect(tree.toJSON()).toMatchSnapshot() }) it('should support async actions', async () => { ======= it('should support async actions', done => { >>>>>>> it('should support multiple arguments on actions', () => { const { Provider, Consumer } = createStore({ model: 0, actions: { increment(state, stepper = 1, additionalStepper = 0) { return state + stepper + additionalStepper }, }, }) const tree = TestRenderer.create( <Provider> <Consumer> {(state, actions) => ( <div> <div>{JSON.stringify(state, null, 2)}</div> <button onClick={() => actions.increment(5, 2)}>Increment</button> </div> )} </Consumer> </Provider> ) tree.root.findByType('button').props.onClick() expect(tree.getInstance().state.state).toBe(7) expect(tree.toJSON()).toMatchSnapshot() }) it('should support async actions', done => {
<<<<<<< function getPoliciesStatus() { return $resource('/policyContext', {}, { 'get': { method: 'GET', isArray: true, timeout: apiConfigSettings.timeout } }); }; ======= function savePolicy() { return $resource('/policy', {}, { 'put': { method: 'PUT', timeout: apiConfigSettings.timeout } }); } >>>>>>> function savePolicy() { return $resource('/policy', {}, { 'put': { method: 'PUT', timeout: apiConfigSettings.timeout } }); }; function getPoliciesStatus() { return $resource('/policyContext', {}, { 'get': { method: 'GET', isArray: true, timeout: apiConfigSettings.timeout } }); };
<<<<<<< GetAllpolicies: function() { return ApiPolicyService.GetAllpolicies().get().$promise; }, CreatePolicy: function(newPolicyData) { return ApiPolicyService.CreatePolicy().create(newPolicyData).$promise; }, GetFakePolicy: function() { return ApiPolicyService.GetFakePolicy().get().$promise; ======= GetAllPolicies: function() { return ApiPolicyService.GetAllpolicies().get().$promise; >>>>>>> GetAllPolicies: function() { return ApiPolicyService.GetAllpolicies().get().$promise; }, CreatePolicy: function(newPolicyData) { return ApiPolicyService.CreatePolicy().create(newPolicyData).$promise; }, GetFakePolicy: function() { return ApiPolicyService.GetFakePolicy().get().$promise;
<<<<<<< var fd = (process.platform === 'win32') ? process.stdin.fd : fs.openSync('/dev/tty', 'rs') process.stdin.setRawMode(true); ======= var fd = fs.openSync('/dev/stdin', 'rs'); var wasRaw = process.stdin.isRaw; if (!wasRaw) { process.stdin.setRawMode(true); } >>>>>>> var fd = (process.platform === 'win32') ? process.stdin.fd : fs.openSync('/dev/tty', 'rs') var wasRaw = process.stdin.isRaw; if (!wasRaw) { process.stdin.setRawMode(true); } <<<<<<< if (option.sigint) process.exit(130); process.stdin.setRawMode(false); ======= process.stdin.setRawMode(wasRaw); >>>>>>> if (option.sigint) process.exit(130); process.stdin.setRawMode(wasRaw);
<<<<<<< _renderHeader(isSprintLoaded: boolean) { const {zoomedIn} = this.state; ======= _renderHeader() { const {sprint, onOpenSprintSelect, onOpenBoardSelect, noBoardSelected} = this.props; >>>>>>> _renderHeader(isSprintLoaded: boolean) { const {zoomedIn} = this.state; <<<<<<< ======= {Boolean(sprint && !noBoardSelected) && <View style={styles.headerContent}> {this.renderHeaderButton( sprint?.agile?.name, onOpenBoardSelect, styles.headerBoardNotCollapsibleButton )} {this.renderHeaderButton( sprint?.name, onOpenSprintSelect, styles.headerBoardNotCollapsibleButton )} </View>} >>>>>>> <<<<<<< const isSprintLoaded: boolean = !!sprint && isValidBoard; const isFirstLoading = Boolean(isLoading && !sprint); ======= const hasSprint = !!sprint; const isValidSprint: boolean = hasSprint && isValidBoard; const isFirstLoading = Boolean(isLoading && !hasSprint); >>>>>>> const hasSprint = !!sprint; const isSprintLoaded: boolean = hasSprint && isValidBoard; const isFirstLoading = Boolean(isLoading && !hasSprint); <<<<<<< {isSprintLoaded && !isLoading && this._renderBoardHeader(sprint)} {(isFirstLoading || isLoading) && ( ======= {isFirstLoading && isValidBoard && ( >>>>>>> {isSprintLoaded && !isLoading && this._renderBoardHeader(sprint)} {((isFirstLoading && isValidBoard) || isLoading) && ( <<<<<<< <Text>Loading agile...</Text> ======= <Text>Loading agile board {agile?.name || ''}...</Text> {this.renderSelectBoardButton()} >>>>>>> <Text>Loading agile {agile?.name || ''}...</Text>
<<<<<<< import Select from '../../components/select/select'; import Icon from 'react-native-vector-icons/FontAwesome'; import SearchPanel from './issue-list__search-panel'; import styles from './issue-list.styles'; ======= import MenuIcon from '../../components/menu/menu-icon'; import Icon from 'react-native-vector-icons/MaterialCommunityIcons'; >>>>>>> import Select from '../../components/select/select'; import Icon from 'react-native-vector-icons/FontAwesome'; import IconMaterial from 'react-native-vector-icons/MaterialCommunityIcons'; import SearchPanel from './issue-list__search-panel'; import MenuIcon from '../../components/menu/menu-icon'; import styles from './issue-list.styles'; <<<<<<< searchPanelNode: Object; ======= unsubscribeFromOpeningWithIssueUrl: () => any; >>>>>>> searchPanelNode: Object; <<<<<<< ======= onQueryUpdated = (query: string) => { this.props.storeIssuesQuery(query); this.props.setIssuesQuery(query); this.props.clearAssistSuggestions(); this.props.loadIssues(query); }; >>>>>>>
<<<<<<< import Menu from './components/menu/menu'; import {routeMap, rootRoutesList} from './app-routes'; import {menuHeight} from './components/common-styles/navigation'; ======= import PushNotificationsProcessor from './components/push-notifications/push-notifications-processor'; import log from './components/log/log'; import {Notifications} from 'react-native-notifications-latest'; >>>>>>> import Menu from './components/menu/menu'; import {routeMap, rootRoutesList} from './app-routes'; import {menuHeight} from './components/common-styles/navigation'; import PushNotificationsProcessor from './components/push-notifications/push-notifications-processor'; import log from './components/log/log'; import {Notifications} from 'react-native-notifications-latest'; <<<<<<< Router.rootRoutes = rootRoutesList; ======= Router.rootRoutes = ['IssueList', 'Inbox', 'AgileBoard']; PushNotificationsProcessor.init((token: string) => { PushNotificationsProcessor.setDeviceToken(token); }, (error) => { log.warn(`Cannot get a device token`, error); }); >>>>>>> Router.rootRoutes = rootRoutesList; PushNotificationsProcessor.init((token: string) => { PushNotificationsProcessor.setDeviceToken(token); }, (error) => { log.warn(`Cannot get a device token`, error); }); <<<<<<< static init() { store.dispatch(setAccount()); ======= static async init(getRouteIssueId: () => Promise<string>) { let issueId = null; if (getRouteIssueId) { issueId = await getRouteIssueId(); } store.dispatch(getStoredConfigAndProceed(issueId)); >>>>>>> static async init(getRouteIssueId: () => Promise<string>) { let issueId = null; if (getRouteIssueId) { issueId = await getRouteIssueId(); } store.dispatch(setAccount(issueId));
<<<<<<< import {registerForPush, initializePushNotifications, unregisterForPushNotifications} from '../components/push-notifications/push-notifications'; import {EVERYTHING_CONTEXT} from '../components/search/search-context'; ======= import PushNotifications from '../components/push-notifications/push-notifications'; >>>>>>> import PushNotifications from '../components/push-notifications/push-notifications'; import {EVERYTHING_CONTEXT} from '../components/search/search-context'; <<<<<<< dispatch(loadUser()); dispatch(subscribeToPush()); ======= dispatch(subscribeToPushNotifications()); >>>>>>> dispatch(loadUser()); dispatch(subscribeToPushNotifications()); <<<<<<< if (DeviceInfo.isEmulator()) { log.debug('Push notifications won\'t work on simulator'); return; ======= if (isRegisteredForPush()) { log.info('Device was already registered for push notifications. Initializing...'); return PushNotifications.initialize(); >>>>>>> if (isRegisteredForPush()) { log.info('Device was already registered for push notifications. Initializing...'); return PushNotifications.initialize();
<<<<<<< baseURL: options.baseURL, ======= helpURL: options.helpURL, >>>>>>> baseURL: options.baseURL, helpURL: options.helpURL,
<<<<<<< import { INUMBER, IOP1, IOP2, IOP3, IVAR, IVARNAME, IFUNCALL, IFUNDEF, IEXPR, IMEMBER } from './instruction'; ======= import { INUMBER, IOP1, IOP2, IOP3, IVAR, IVARNAME, IFUNCALL, IEXPR, IEXPREVAL, IMEMBER, IENDSTATEMENT } from './instruction'; >>>>>>> import { INUMBER, IOP1, IOP2, IOP3, IVAR, IVARNAME, IFUNCALL, IFUNDEF, IEXPR, IEXPREVAL, IMEMBER, IENDSTATEMENT } from './instruction';
<<<<<<< it('f(x) = x * x', function () { var parser = new Parser({ operators: { assignment: true } }); var obj = { f: null }; assert.strictEqual(parser.evaluate('f(x) = x * x', obj) instanceof Function, true); assert.strictEqual(obj.f instanceof Function, true); assert.strictEqual(obj.f(3), 9); }); it('(f(x) = x * x)(3)', function () { var parser = new Parser({ operators: { assignment: true } }); assert.strictEqual(parser.evaluate('(f(x) = x * x)(3)'), 9); }); ======= it('3 ; 2 ; 1', function () { assert.strictEqual(Parser.evaluate('3 ; 2 ; 1'), 1); }); it('3 ; 2 ; 1 ;', function () { assert.strictEqual(Parser.evaluate('3 ; 2 ; 1 ;'), 1); }); it('x = 3 ; y = 4 ; z = x * y', function () { var parser = new Parser({ operators: { assignment: true } }); assert.strictEqual(parser.evaluate('x = 3 ; y = 4 ; z = x * y'), 12); }); it('x=3;y=4;z=x*y;', function () { var parser = new Parser({ operators: { assignment: true } }); assert.strictEqual(parser.evaluate('x=3;y=4;z=x*y;'), 12); }); it('1 + (( 3 ; 4 ) + 5)', function () { var parser = new Parser({ operators: { assignment: true } }); assert.strictEqual(parser.evaluate('1 + (( 3 ; 4 ) + 5)'), 10); }); it('2+(x=3;y=4;z=x*y)+5', function () { var parser = new Parser({ operators: { assignment: true } }); assert.strictEqual(parser.evaluate('2+(x=3;y=4;z=x*y)+5'), 19); }); >>>>>>> it('f(x) = x * x', function () { var parser = new Parser({ operators: { assignment: true } }); var obj = { f: null }; assert.strictEqual(parser.evaluate('f(x) = x * x', obj) instanceof Function, true); assert.strictEqual(obj.f instanceof Function, true); assert.strictEqual(obj.f(3), 9); }); it('(f(x) = x * x)(3)', function () { var parser = new Parser({ operators: { assignment: true } }); assert.strictEqual(parser.evaluate('(f(x) = x * x)(3)'), 9); }); it('3 ; 2 ; 1', function () { assert.strictEqual(Parser.evaluate('3 ; 2 ; 1'), 1); }); it('3 ; 2 ; 1 ;', function () { assert.strictEqual(Parser.evaluate('3 ; 2 ; 1 ;'), 1); }); it('x = 3 ; y = 4 ; z = x * y', function () { var parser = new Parser({ operators: { assignment: true } }); assert.strictEqual(parser.evaluate('x = 3 ; y = 4 ; z = x * y'), 12); }); it('x=3;y=4;z=x*y;', function () { var parser = new Parser({ operators: { assignment: true } }); assert.strictEqual(parser.evaluate('x=3;y=4;z=x*y;'), 12); }); it('1 + (( 3 ; 4 ) + 5)', function () { var parser = new Parser({ operators: { assignment: true } }); assert.strictEqual(parser.evaluate('1 + (( 3 ; 4 ) + 5)'), 10); }); it('2+(x=3;y=4;z=x*y)+5', function () { var parser = new Parser({ operators: { assignment: true } }); assert.strictEqual(parser.evaluate('2+(x=3;y=4;z=x*y)+5'), 19); }); <<<<<<< it('(f(x) = g(y) = x * y)(a)(b)', function () { var f = parser.parse('(f(x) = g(y) = x * y)(a)(b)').toJSFunction('a,b'); assert.strictEqual(f(3, 4), 12); assert.strictEqual(f(4, 5), 20); }); ======= >>>>>>> it('(f(x) = g(y) = x * y)(a)(b)', function () { var f = parser.parse('(f(x) = g(y) = x * y)(a)(b)').toJSFunction('a,b'); assert.strictEqual(f(3, 4), 12); assert.strictEqual(f(4, 5), 20); });
<<<<<<< import { INUMBER, IOP1, IOP2, IOP3, IVAR, IVARNAME, IFUNCALL, IFUNDEF, IEXPR, IEXPREVAL, IMEMBER, IENDSTATEMENT } from './instruction'; ======= import { INUMBER, IOP1, IOP2, IOP3, IVAR, IVARNAME, IFUNCALL, IEXPR, IMEMBER, IARRAY } from './instruction'; >>>>>>> import { INUMBER, IOP1, IOP2, IOP3, IVAR, IVARNAME, IFUNCALL, IFUNDEF, IEXPR, IEXPREVAL, IMEMBER, IENDSTATEMENT, IARRAY } from './instruction'; <<<<<<< var f; if (isExpressionEvaluator(tokens)) { return resolveExpression(tokens, values); } var numTokens = tokens.length; for (var i = 0; i < numTokens; i++) { ======= var f, args, argCount; for (var i = 0; i < tokens.length; i++) { >>>>>>> var f, args, argCount; if (isExpressionEvaluator(tokens)) { return resolveExpression(tokens, values); } var numTokens = tokens.length; for (var i = 0; i < numTokens; i++) { <<<<<<< } else if (type === IENDSTATEMENT) { nstack.pop(); ======= } else if (type === IARRAY) { argCount = item.value; args = []; while (argCount-- > 0) { args.unshift(nstack.pop()); } nstack.push(args); >>>>>>> } else if (type === IENDSTATEMENT) { nstack.pop(); } else if (type === IARRAY) { argCount = item.value; args = []; while (argCount-- > 0) { args.unshift(nstack.pop()); } nstack.push(args);
<<<<<<< it('f(x) = x * x', function () { var parser = new Parser(); var obj = { f: null }; assert.strictEqual(parser.evaluate('f(x) = x * x', obj) instanceof Function, true); assert.strictEqual(obj.f instanceof Function, true); assert.strictEqual(obj.f(3), 9); }); it('(f(x) = x * x)(3)', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('(f(x) = x * x)(3)'), 9); }); it('y = 5; f(x) = x * y', function () { var parser = new Parser(); var obj = { f: null }; assert.strictEqual(parser.evaluate('y = 5; f(x) = x * y', obj) instanceof Function, true); assert.strictEqual(obj.f instanceof Function, true); assert.strictEqual(obj.f(3), 15); }); it('y = 5; (f(x) = x * y)(3)', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('y = 5; (f(x) = x * y)(3)'), 15); }); it('(f(x) = x > 1 ? x*f(x-1) : 1)(5)', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('(f(x) = x > 1 ? x*f(x-1) : 1)(5)'), 120); assert.strictEqual(parser.evaluate('(f(x) = x > 1 ? x*f(x-1) : 1); f(6)'), 720); }); it('f(x) = x > 1 ? x*f(x-1) : 1; f(6); f(5)', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('f(x) = x > 1 ? x*f(x-1) : 1; f(6)'), 720); assert.strictEqual(parser.evaluate('f(x) = x > 1 ? x*f(x-1) : 1; f(6); f(5)'), 120); }); it('f(x) = x > 1 ? x*f(x-1) : 1', function () { var parser = new Parser(); var obj = { f: null }; assert.strictEqual(parser.evaluate('f(x) = x > 1 ? x*f(x-1) : 1', obj) instanceof Function, true); assert.strictEqual(obj.f instanceof Function, true); assert.strictEqual(obj.f(6), 720); assert.strictEqual(obj.f(5), 120); assert.strictEqual(obj.f(4), 24); assert.strictEqual(obj.f(3), 6); }); it('3 ; 2 ; 1', function () { assert.strictEqual(Parser.evaluate('3 ; 2 ; 1'), 1); }); it('3 ; 2 ; 1 ;', function () { assert.strictEqual(Parser.evaluate('3 ; 2 ; 1 ;'), 1); }); it('x = 3 ; y = 4 ; z = x * y', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('x = 3 ; y = 4 ; z = x * y'), 12); }); it('x=3;y=4;z=x*y;', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('x=3;y=4;z=x*y;'), 12); }); it('1 + (( 3 ; 4 ) + 5)', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('1 + (( 3 ; 4 ) + 5)'), 10); }); it('2+(x=3;y=4;z=x*y)+5', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('2+(x=3;y=4;z=x*y)+5'), 19); }); ======= it('[1, 2, 3]', function () { assert.deepEqual(Parser.evaluate('[1, 2, 3]'), [1, 2, 3]); }); it('[1, 2, 3, [4, [5, 6]]]', function () { assert.deepEqual(Parser.evaluate('[1, 2, 3, [4, [5, 6]]]'), [1, 2, 3, [4, [5, 6]]]); }); it('["a", ["b", ["c"]], true, 1 + 2 + 3]', function () { assert.deepEqual(Parser.evaluate('["a", ["b", ["c"]], true, 1 + 2 + 3]'), ['a', ['b', ['c']], true, 6]); }); >>>>>>> it('f(x) = x * x', function () { var parser = new Parser(); var obj = { f: null }; assert.strictEqual(parser.evaluate('f(x) = x * x', obj) instanceof Function, true); assert.strictEqual(obj.f instanceof Function, true); assert.strictEqual(obj.f(3), 9); }); it('(f(x) = x * x)(3)', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('(f(x) = x * x)(3)'), 9); }); it('y = 5; f(x) = x * y', function () { var parser = new Parser(); var obj = { f: null }; assert.strictEqual(parser.evaluate('y = 5; f(x) = x * y', obj) instanceof Function, true); assert.strictEqual(obj.f instanceof Function, true); assert.strictEqual(obj.f(3), 15); }); it('y = 5; (f(x) = x * y)(3)', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('y = 5; (f(x) = x * y)(3)'), 15); }); it('(f(x) = x > 1 ? x*f(x-1) : 1)(5)', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('(f(x) = x > 1 ? x*f(x-1) : 1)(5)'), 120); assert.strictEqual(parser.evaluate('(f(x) = x > 1 ? x*f(x-1) : 1); f(6)'), 720); }); it('f(x) = x > 1 ? x*f(x-1) : 1; f(6); f(5)', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('f(x) = x > 1 ? x*f(x-1) : 1; f(6)'), 720); assert.strictEqual(parser.evaluate('f(x) = x > 1 ? x*f(x-1) : 1; f(6); f(5)'), 120); }); it('f(x) = x > 1 ? x*f(x-1) : 1', function () { var parser = new Parser(); var obj = { f: null }; assert.strictEqual(parser.evaluate('f(x) = x > 1 ? x*f(x-1) : 1', obj) instanceof Function, true); assert.strictEqual(obj.f instanceof Function, true); assert.strictEqual(obj.f(6), 720); assert.strictEqual(obj.f(5), 120); assert.strictEqual(obj.f(4), 24); assert.strictEqual(obj.f(3), 6); }); it('3 ; 2 ; 1', function () { assert.strictEqual(Parser.evaluate('3 ; 2 ; 1'), 1); }); it('3 ; 2 ; 1 ;', function () { assert.strictEqual(Parser.evaluate('3 ; 2 ; 1 ;'), 1); }); it('x = 3 ; y = 4 ; z = x * y', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('x = 3 ; y = 4 ; z = x * y'), 12); }); it('x=3;y=4;z=x*y;', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('x=3;y=4;z=x*y;'), 12); }); it('1 + (( 3 ; 4 ) + 5)', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('1 + (( 3 ; 4 ) + 5)'), 10); }); it('2+(x=3;y=4;z=x*y)+5', function () { var parser = new Parser(); assert.strictEqual(parser.evaluate('2+(x=3;y=4;z=x*y)+5'), 19); }); it('[1, 2, 3]', function () { assert.deepEqual(Parser.evaluate('[1, 2, 3]'), [1, 2, 3]); }); it('[1, 2, 3, [4, [5, 6]]]', function () { assert.deepEqual(Parser.evaluate('[1, 2, 3, [4, [5, 6]]]'), [1, 2, 3, [4, [5, 6]]]); }); it('["a", ["b", ["c"]], true, 1 + 2 + 3]', function () { assert.deepEqual(Parser.evaluate('["a", ["b", ["c"]], true, 1 + 2 + 3]'), ['a', ['b', ['c']], true, 6]); }); <<<<<<< it('3 ; 2 ; 1', function () { assert.strictEqual(parser.parse('3 ; 2 ; 1').toString(), '(3,(2,1))'); }); it('3 ; 2 ; 1 ;', function () { assert.strictEqual(parser.parse('3 ; 2 ; 1 ;').toString(), '(3,(2,(1)))'); }); it('x = 3 ; y = 4 ; z = x * y', function () { var parser = new Parser(); assert.strictEqual(parser.parse('x = 3 ; y = 4 ; z = x * y').toString(), '((x = (3)),((y = (4)),(z = ((x * y)))))'); }); it('2+(x=3;y=4;z=x*y)+5', function () { var parser = new Parser(); assert.strictEqual(parser.parse('2+(x=3;y=4;z=x*y)+5').toString(), '((2 + ((x = (3)),((y = (4)),(z = ((x * y)))))) + 5)'); }); ======= it('[1, 2, 3]', function () { assert.strictEqual(Parser.parse('[1, 2, 3]').toString(), '[1, 2, 3]'); }); it('[1, 2, 3, [4, [5, 6]]]', function () { assert.strictEqual(Parser.parse('[1, 2, 3, [4, [5, 6]]]').toString(), '[1, 2, 3, [4, [5, 6]]]'); }); it('["a", ["b", ["c"]], true, 1 + 2 + 3]', function () { assert.strictEqual(Parser.parse('["a", ["b", ["c"]], true, 1 + 2 + 3]').toString(), '["a", ["b", ["c"]], true, ((1 + 2) + 3)]'); }); >>>>>>> it('3 ; 2 ; 1', function () { assert.strictEqual(parser.parse('3 ; 2 ; 1').toString(), '(3,(2,1))'); }); it('3 ; 2 ; 1 ;', function () { assert.strictEqual(parser.parse('3 ; 2 ; 1 ;').toString(), '(3,(2,(1)))'); }); it('x = 3 ; y = 4 ; z = x * y', function () { var parser = new Parser(); assert.strictEqual(parser.parse('x = 3 ; y = 4 ; z = x * y').toString(), '((x = (3)),((y = (4)),(z = ((x * y)))))'); }); it('2+(x=3;y=4;z=x*y)+5', function () { var parser = new Parser(); assert.strictEqual(parser.parse('2+(x=3;y=4;z=x*y)+5').toString(), '((2 + ((x = (3)),((y = (4)),(z = ((x * y)))))) + 5)'); }); it('[1, 2, 3]', function () { assert.strictEqual(Parser.parse('[1, 2, 3]').toString(), '[1, 2, 3]'); }); it('[1, 2, 3, [4, [5, 6]]]', function () { assert.strictEqual(Parser.parse('[1, 2, 3, [4, [5, 6]]]').toString(), '[1, 2, 3, [4, [5, 6]]]'); }); it('["a", ["b", ["c"]], true, 1 + 2 + 3]', function () { assert.strictEqual(Parser.parse('["a", ["b", ["c"]], true, 1 + 2 + 3]').toString(), '["a", ["b", ["c"]], true, ((1 + 2) + 3)]'); }); <<<<<<< it('(f(x) = g(y) = x * y)(a)(b)', function () { var f = parser.parse('(f(x) = g(y) = x * y)(a)(b)').toJSFunction('a,b'); assert.strictEqual(f(3, 4), 12); assert.strictEqual(f(4, 5), 20); }); ======= it('[x, y, z]', function () { assert.deepEqual(parser.parse('[x, y, z]').toJSFunction('x,y,z')(1, 2, 3), [1, 2, 3]); }); it('[x, [y, [z]]]', function () { assert.deepEqual(parser.parse('[x, [y, [z]]]').toJSFunction('x,y,z')('abc', true, 3), ['abc', [true, [3]]]); }); >>>>>>> it('(f(x) = g(y) = x * y)(a)(b)', function () { var f = parser.parse('(f(x) = g(y) = x * y)(a)(b)').toJSFunction('a,b'); assert.strictEqual(f(3, 4), 12); assert.strictEqual(f(4, 5), 20); }); it('[x, y, z]', function () { assert.deepEqual(parser.parse('[x, y, z]').toJSFunction('x,y,z')(1, 2, 3), [1, 2, 3]); }); it('[x, [y, [z]]]', function () { assert.deepEqual(parser.parse('[x, [y, [z]]]').toJSFunction('x,y,z')('abc', true, 3), ['abc', [true, [3]]]); });
<<<<<<< if (semver.gte(CONFIG.apiVersion, "1.15.0")) { uniqueData.push(MSP_codes.MSP_SENSOR_ALIGNMENT); } ======= if (semver.gte(CONFIG.apiVersion, "1.15.0")) { uniqueData.push(MSP_codes.MSP_RX_CONFIG); uniqueData.push(MSP_codes.MSP_FAILSAFE_CONFIG); uniqueData.push(MSP_codes.MSP_RXFAIL_CONFIG); } >>>>>>> if (semver.gte(CONFIG.apiVersion, "1.15.0")) { uniqueData.push(MSP_codes.MSP_SENSOR_ALIGNMENT); uniqueData.push(MSP_codes.MSP_RX_CONFIG); uniqueData.push(MSP_codes.MSP_FAILSAFE_CONFIG); uniqueData.push(MSP_codes.MSP_RXFAIL_CONFIG); } <<<<<<< if (semver.gte(CONFIG.apiVersion, "1.15.0")) { configuration.SENSOR_ALIGNMENT = jQuery.extend(true, {}, SENSOR_ALIGNMENT); } ======= if (semver.gte(CONFIG.apiVersion, "1.15.0")) { configuration.RX_CONFIG = jQuery.extend(true, {}, RX_CONFIG); configuration.FAILSAFE_CONFIG = jQuery.extend(true, {}, FAILSAFE_CONFIG); configuration.RXFAIL_CONFIG = jQuery.extend(true, [], RXFAIL_CONFIG); } >>>>>>> if (semver.gte(CONFIG.apiVersion, "1.15.0")) { configuration.SENSOR_ALIGNMENT = jQuery.extend(true, {}, SENSOR_ALIGNMENT); configuration.RX_CONFIG = jQuery.extend(true, {}, RX_CONFIG); configuration.FAILSAFE_CONFIG = jQuery.extend(true, {}, FAILSAFE_CONFIG); configuration.RXFAIL_CONFIG = jQuery.extend(true, [], RXFAIL_CONFIG); } <<<<<<< if (semver.gte(CONFIG.apiVersion, "1.15.0")) { uniqueData.push(MSP_codes.MSP_SET_SENSOR_ALIGNMENT); } ======= if (semver.gte(CONFIG.apiVersion, "1.15.0")) { uniqueData.push(MSP_codes.MSP_SET_RX_CONFIG); uniqueData.push(MSP_codes.MSP_SET_FAILSAFE_CONFIG); uniqueData.push(MSP_codes.MSP_SET_RXFAIL_CONFIG); } >>>>>>> if (semver.gte(CONFIG.apiVersion, "1.15.0")) { uniqueData.push(MSP_codes.MSP_SET_SENSOR_ALIGNMENT); uniqueData.push(MSP_codes.MSP_SET_RX_CONFIG); uniqueData.push(MSP_codes.MSP_SET_FAILSAFE_CONFIG); uniqueData.push(MSP_codes.MSP_SET_RXFAIL_CONFIG); } <<<<<<< SENSOR_ALIGNMENT = configuration.SENSOR_ALIGNMENT; ======= RX_CONFIG = configuration.RX_CONFIG; FAILSAFE_CONFIG = configuration.FAILSAFE_CONFIG; RXFAIL_CONFIG = configuration.RXFAIL_CONFIG; >>>>>>> SENSOR_ALIGNMENT = configuration.SENSOR_ALIGNMENT; RX_CONFIG = configuration.RX_CONFIG; FAILSAFE_CONFIG = configuration.FAILSAFE_CONFIG; RXFAIL_CONFIG = configuration.RXFAIL_CONFIG;
<<<<<<< "network-profiler-mode": "Profiling Mode", "show-incomplete-warning": ui_strings.S_NETWORK_REQUESTS_INCOMPLETE_SETTING_LABEL, ======= >>>>>>> "network-profiler-mode": "Profiling Mode",
<<<<<<< RC_tuning.dynamic_THR_breakpoint = data.getUint16(offset++, 1); } else { RC_tuning.dynamic_THR_breakpoint = 0; ======= RC_tuning.dynamic_THR_breakpoint = data.getUint16(offset, 1); offset += 2; // point past 16 bit (2 bytes) } if (semver.gte(CONFIG.apiVersion, "1.10.0")) { RC_tuning.RC_YAW_EXPO = parseFloat((data.getUint8(offset++) / 100).toFixed(2)); >>>>>>> RC_tuning.dynamic_THR_breakpoint = data.getUint16(offset, 1); offset += 2; } else { RC_tuning.dynamic_THR_breakpoint = 0; } if (semver.gte(CONFIG.apiVersion, "1.10.0")) { RC_tuning.RC_YAW_EXPO = parseFloat((data.getUint8(offset++) / 100).toFixed(2)); } else { RC_tuning.RC_YAW_EXPO = 0;
<<<<<<< case MSP_codes.MSP_SET_3D: console.log('3D settings saved'); break; case MSP_codes.MSP_SET_SENSOR_ALIGNMENT: console.log('Sensor alignment saved'); break; ======= case MSP_codes.MSP_SET_RX_CONFIG: console.log('Rx config saved'); break; case MSP_codes.MSP_SET_RXFAIL_CONFIG: console.log('Rxfail config saved'); break; case MSP_codes.MSP_SET_FAILSAFE_CONFIG: console.log('Failsafe config saved'); break; >>>>>>> case MSP_codes.MSP_SET_3D: console.log('3D settings saved'); break; case MSP_codes.MSP_SET_SENSOR_ALIGNMENT: console.log('Sensor alignment saved'); break; case MSP_codes.MSP_SET_RX_CONFIG: console.log('Rx config saved'); break; case MSP_codes.MSP_SET_RXFAIL_CONFIG: console.log('Rxfail config saved'); break; case MSP_codes.MSP_SET_FAILSAFE_CONFIG: console.log('Failsafe config saved'); break;
<<<<<<< MSP_SDCARD_SUMMARY: 79, MSP_BLACKBOX_CONFIG: 80, MSP_SET_BLACKBOX_CONFIG: 81, ======= MSP_FAILSAFE_CONFIG: 75, MSP_SET_FAILSAFE_CONFIG: 76, MSP_RXFAIL_CONFIG: 77, MSP_SET_RXFAIL_CONFIG: 78, >>>>>>> MSP_FAILSAFE_CONFIG: 75, MSP_SET_FAILSAFE_CONFIG: 76, MSP_RXFAIL_CONFIG: 77, MSP_SET_RXFAIL_CONFIG: 78, MSP_SDCARD_SUMMARY: 79, MSP_BLACKBOX_CONFIG: 80, MSP_SET_BLACKBOX_CONFIG: 81,
<<<<<<< var SDCARD = { supported: false, state: 0, filesystemLastError: 0, freeSizeKB: 0, totalSizeKB: 0, }; var BLACKBOX = { supported: false, blackboxDevice: 0, blackboxRateNum: 1, blackboxRateDenom: 1 }; ======= var RC_deadband = { deadband: 0, yaw_deadband: 0, alt_hold_deadband: 0 }; var SENSOR_ALIGNMENT = { align_gyro: 0, align_acc: 0, align_mag: 0 }; >>>>>>> var SDCARD = { supported: false, state: 0, filesystemLastError: 0, freeSizeKB: 0, totalSizeKB: 0, }; var BLACKBOX = { supported: false, blackboxDevice: 0, blackboxRateNum: 1, blackboxRateDenom: 1 }; var RC_deadband = { deadband: 0, yaw_deadband: 0, alt_hold_deadband: 0 }; var SENSOR_ALIGNMENT = { align_gyro: 0, align_acc: 0, align_mag: 0 };
<<<<<<< if (window_width < screen_medium){ $video_inner_wrapper.width('auto').height('auto'); } else { if (w_video_optimal >= window_width) { w_video = window_width; h_video = h_video_optimal; } else { w_video = w_video_optimal; h_video = window_height; } $video_inner_wrapper.width(w_video + 'px').height(h_video + 'px'); } ======= if (w_video_optimal >= window_width) { w_video = window_width; h_video = h_video_optimal; } else { w_video = w_video_optimal; h_video = window_height; } $video_inner_wrapper.width(w_video + 'px').height(h_video + 'px'); >>>>>>> if (window_width < screen_medium){ $video_inner_wrapper.width('auto').height('auto'); } else { if (w_video_optimal >= window_width) { w_video = window_width; h_video = h_video_optimal; } else { w_video = w_video_optimal; h_video = window_height; } $video_inner_wrapper.width(w_video + 'px').height(h_video + 'px'); } <<<<<<< var $iframe = $('#video-' + chapter)[0]; var $player = $f($iframe); $player.addEvent('ready', function() { //console.log('player ready'); //$player.api('setVolume', 0); //$player.api('play'); //$player.api('seekTo', 3); //$player.api('pause'); //show question at the end of a video $player.addEvent('finish', function() { console.log('finished'); $('section.show').find('.video-question').addClass('animated fadeIn show-me'); }); $player.addEvent('play', function() { // reset questions $video_question.removeClass('animated').removeClass('fadeOut').removeClass('backer'); }); }); ======= >>>>>>>
<<<<<<< }), shapedRecipe('minecraft:chest', ['AAA', 'A A', 'AAA'], { A: '#minecraft:planks' }) ======= }), shapedRecipe( Item.of('akashictome:tome', { 'akashictome:is_morphing': 1, 'akashictome:data': { industrialforegoing: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'industrialforegoing:industrial_foregoing' } }, tetra: { id: 'tetra:holo', Count: 1, tag: { 'holo/core_material': 'frame/dim', 'holo/frame': 'holo/frame', 'holo/core': 'holo/core', 'holo/frame_material': 'core/ancient' } }, resourcefulbees: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'resourcefulbees:fifty_shades_of_bees' } }, theoneprobe: { id: 'theoneprobe:probenote', Count: 1 }, astralsorcery: { id: 'astralsorcery:tome', Count: 1 }, ftbquests: { id: 'ftbquests:book', Count: 1 }, alexsmobs: { id: 'alexsmobs:animal_dictionary', Count: 1 }, immersiveengineering: { id: 'immersiveengineering:manual', Count: 1 }, eidolon: { id: 'eidolon:codex', Count: 1 }, botania: { id: 'botania:lexicon', Count: 1, tag: {} }, thermal: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'thermal:guidebook' } }, patchouli: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'patchouli:modded_for_dummies' } }, rftoolsbase: { id: 'rftoolsbase:manual', Count: 1 }, cookingforblockheads: { id: 'cookingforblockheads:crafting_book', Count: 1, tag: { 'akashictome:displayName': '{"translate":"item.cookingforblockheads.crafting_book"}', 'akashictome:is_morphing': 1, display: { Name: '{"translate":"akashictome.sudo_name","with":[{"color":"green","translate":"item.cookingforblockheads.crafting_book"}]}' } } }, powah: { id: 'powah:book', Count: 1 }, pneumaticcraft: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'pneumaticcraft:book' } }, naturesaura: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'naturesaura:book' } }, pedestals: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'pedestals:manual' } }, transport: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'transport:guide' } }, engineersdecor: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'engineersdecor:engineersdecor_manual' } }, occultism: { id: 'occultism:dictionary_of_spirits', Count: 1 }, solcarrot: { id: 'solcarrot:food_book', Count: 1 }, modularrouters: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'modularrouters:book' } }, tmechworks: { id: 'tmechworks:book', Count: 1 }, ars_nouveau: { id: 'ars_nouveau:worn_notebook', Count: 1 }, bloodmagic: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'bloodmagic:guide' } } } }), ['AAA', 'ABA', 'AAA'], { A: 'thermal:lightning_charge', B: 'minecraft:bookshelf' } ) >>>>>>> }), shapedRecipe('minecraft:chest', ['AAA', 'A A', 'AAA'], { A: '#minecraft:planks' }), shapedRecipe( Item.of('akashictome:tome', { 'akashictome:is_morphing': 1, 'akashictome:data': { industrialforegoing: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'industrialforegoing:industrial_foregoing' } }, tetra: { id: 'tetra:holo', Count: 1, tag: { 'holo/core_material': 'frame/dim', 'holo/frame': 'holo/frame', 'holo/core': 'holo/core', 'holo/frame_material': 'core/ancient' } }, resourcefulbees: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'resourcefulbees:fifty_shades_of_bees' } }, theoneprobe: { id: 'theoneprobe:probenote', Count: 1 }, astralsorcery: { id: 'astralsorcery:tome', Count: 1 }, ftbquests: { id: 'ftbquests:book', Count: 1 }, alexsmobs: { id: 'alexsmobs:animal_dictionary', Count: 1 }, immersiveengineering: { id: 'immersiveengineering:manual', Count: 1 }, eidolon: { id: 'eidolon:codex', Count: 1 }, botania: { id: 'botania:lexicon', Count: 1, tag: {} }, thermal: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'thermal:guidebook' } }, patchouli: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'patchouli:modded_for_dummies' } }, rftoolsbase: { id: 'rftoolsbase:manual', Count: 1 }, cookingforblockheads: { id: 'cookingforblockheads:crafting_book', Count: 1, tag: { 'akashictome:displayName': '{"translate":"item.cookingforblockheads.crafting_book"}', 'akashictome:is_morphing': 1, display: { Name: '{"translate":"akashictome.sudo_name","with":[{"color":"green","translate":"item.cookingforblockheads.crafting_book"}]}' } } }, powah: { id: 'powah:book', Count: 1 }, pneumaticcraft: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'pneumaticcraft:book' } }, naturesaura: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'naturesaura:book' } }, pedestals: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'pedestals:manual' } }, transport: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'transport:guide' } }, engineersdecor: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'engineersdecor:engineersdecor_manual' } }, occultism: { id: 'occultism:dictionary_of_spirits', Count: 1 }, solcarrot: { id: 'solcarrot:food_book', Count: 1 }, modularrouters: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'modularrouters:book' } }, tmechworks: { id: 'tmechworks:book', Count: 1 }, ars_nouveau: { id: 'ars_nouveau:worn_notebook', Count: 1 }, bloodmagic: { id: 'patchouli:guide_book', Count: 1, tag: { 'patchouli:book': 'bloodmagic:guide' } } } }), ['AAA', 'ABA', 'AAA'], { A: 'thermal:lightning_charge', B: 'minecraft:bookshelf' } )
<<<<<<< journey.version = [0, 3, 0]; ======= journey.version = [0, 2, 9]; journey.options = { strict: false, strictUrls: true }; >>>>>>> journey.version = [0, 3, 0]; journey.options = { strict: false, strictUrls: true }; <<<<<<< .match(/^\^?(.*?)\$?$/)[1] // Strip ^ and $ .replace(/^(\/|\\\/)(?!$)/, '') // Strip root / if pattern != '/' .replace(/(\/|\\\/)+/g, '/') + // Squeeze slashes extension + '$'; ======= .match(/^\^?(.*?)\$?$/)[1] // Strip ^ and $ .replace(/^(\/|\\\/)(?!$)/, '') // Strip root / if pattern != '/' .replace(/(\/|\\\/)+/g, '/'); // Squeeze slashes pattern += context.options.strictUrls ? '$' : '\\/?$'; // Add optional trailing slash if requested >>>>>>> .match(/^\^?(.*?)\$?$/)[1] // Strip ^ and $ .replace(/^(\/|\\\/)(?!$)/, '') // Strip root / if pattern != '/' .replace(/(\/|\\\/)+/g, '/') + // Squeeze slashes extension; pattern += context.options.strictUrls ? '$' : '\\/?$'; // Add optional trailing slash if requested <<<<<<< verifyHeaders: function (request, respond) { var accepts = request.headers.accept; ======= // This function glues together the request resolver, with the responder. // It creates a new `route` context, in which the response will be generated. dispatch: function (request, body, respond) { var route, parser, that = this, params = querystring.parse(request.url.query || null), accepts = request.headers.accept; >>>>>>> verifyHeaders: function (request, respond) { var accepts = request.headers.accept;