conflict_resolution
stringlengths 27
16k
|
---|
<<<<<<<
// Custom Extra Liners (empty) - ()
opts.extra_liners = [];
test_fragment('<html><head><meta></head><body><div><p>x</p></div></body></html>', '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n <p>x</p>\n </div>\n</body>\n</html>');
// Custom Extra Liners (default) - ()
opts.extra_liners = null;
test_fragment('<html><head></head><body></body></html>', '<html>\n\n<head></head>\n\n<body></body>\n\n</html>');
// Custom Extra Liners (p, string) - ()
opts.extra_liners = 'p,/p';
test_fragment('<html><head><meta></head><body><div><p>x</p></div></body></html>', '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n\n <p>x\n\n </p>\n </div>\n</body>\n</html>');
// Custom Extra Liners (p) - ()
opts.extra_liners = ['p', '/p'];
test_fragment('<html><head><meta></head><body><div><p>x</p></div></body></html>', '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n\n <p>x\n\n </p>\n </div>\n</body>\n</html>');
=======
// Attribute Wrap - (eof = "\n", indent_attr = " ", over80 = "\n")
opts.wrap_attributes = 'force';
test_fragment('<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>', '<div attr0\n attr1="123"\n data-attr2="hello t here">This is some text</div>');
test_fragment('<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>', '<div lookatthissuperduperlongattributenamewhoahcrazy0="true"\n attr0\n attr1="123"\n data-attr2="hello t here"\n heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>');
test_fragment('<img attr0 attr1="123" data-attr2="hello t here"/>', '<img attr0\n attr1="123"\n data-attr2="hello t here" />');
// Attribute Wrap - (eof = "\n", indent_attr = " ", over80 = "\n")
opts.wrap_attributes = 'force';
opts.wrap_line_length = 80;
test_fragment('<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>', '<div attr0\n attr1="123"\n data-attr2="hello t here">This is some text</div>');
test_fragment('<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>', '<div lookatthissuperduperlongattributenamewhoahcrazy0="true"\n attr0\n attr1="123"\n data-attr2="hello t here"\n heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>');
test_fragment('<img attr0 attr1="123" data-attr2="hello t here"/>', '<img attr0\n attr1="123"\n data-attr2="hello t here" />');
// Attribute Wrap - (eof = "\n", indent_attr = " ", over80 = "\n")
opts.wrap_attributes = 'force';
opts.wrap_attributes_indent_size = 8;
test_fragment('<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>', '<div attr0\n attr1="123"\n data-attr2="hello t here">This is some text</div>');
test_fragment('<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>', '<div lookatthissuperduperlongattributenamewhoahcrazy0="true"\n attr0\n attr1="123"\n data-attr2="hello t here"\n heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>');
test_fragment('<img attr0 attr1="123" data-attr2="hello t here"/>', '<img attr0\n attr1="123"\n data-attr2="hello t here" />');
// Attribute Wrap - (eof = " ", indent_attr = "", over80 = "\n")
opts.wrap_attributes = 'auto';
opts.wrap_line_length = 80;
test_fragment('<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>');
test_fragment('<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>', '<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here"\nheymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>');
test_fragment('<img attr0 attr1="123" data-attr2="hello t here"/>', '<img attr0 attr1="123" data-attr2="hello t here" />');
// Attribute Wrap - (eof = " ", indent_attr = "", over80 = " ")
opts.wrap_attributes = 'auto';
opts.wrap_line_length = 0;
test_fragment('<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>');
test_fragment('<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>');
test_fragment('<img attr0 attr1="123" data-attr2="hello t here"/>', '<img attr0 attr1="123" data-attr2="hello t here" />');
// Unformatted tags
test_fragment('<ol>\n <li>b<pre>c</pre></li>\n</ol>');
test_fragment('<ol>\n <li>b<code>c</code></li>\n</ol>');
>>>>>>>
// Custom Extra Liners (empty) - ()
opts.extra_liners = [];
test_fragment('<html><head><meta></head><body><div><p>x</p></div></body></html>', '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n <p>x</p>\n </div>\n</body>\n</html>');
// Custom Extra Liners (default) - ()
opts.extra_liners = null;
test_fragment('<html><head></head><body></body></html>', '<html>\n\n<head></head>\n\n<body></body>\n\n</html>');
// Custom Extra Liners (p, string) - ()
opts.extra_liners = 'p,/p';
test_fragment('<html><head><meta></head><body><div><p>x</p></div></body></html>', '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n\n <p>x\n\n </p>\n </div>\n</body>\n</html>');
// Custom Extra Liners (p) - ()
opts.extra_liners = ['p', '/p'];
test_fragment('<html><head><meta></head><body><div><p>x</p></div></body></html>', '<html>\n<head>\n <meta>\n</head>\n<body>\n <div>\n\n <p>x\n\n </p>\n </div>\n</body>\n</html>');
// Attribute Wrap - (eof = "\n", indent_attr = " ", over80 = "\n")
opts.wrap_attributes = 'force';
test_fragment('<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>', '<div attr0\n attr1="123"\n data-attr2="hello t here">This is some text</div>');
test_fragment('<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>', '<div lookatthissuperduperlongattributenamewhoahcrazy0="true"\n attr0\n attr1="123"\n data-attr2="hello t here"\n heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>');
test_fragment('<img attr0 attr1="123" data-attr2="hello t here"/>', '<img attr0\n attr1="123"\n data-attr2="hello t here" />');
// Attribute Wrap - (eof = "\n", indent_attr = " ", over80 = "\n")
opts.wrap_attributes = 'force';
opts.wrap_line_length = 80;
test_fragment('<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>', '<div attr0\n attr1="123"\n data-attr2="hello t here">This is some text</div>');
test_fragment('<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>', '<div lookatthissuperduperlongattributenamewhoahcrazy0="true"\n attr0\n attr1="123"\n data-attr2="hello t here"\n heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>');
test_fragment('<img attr0 attr1="123" data-attr2="hello t here"/>', '<img attr0\n attr1="123"\n data-attr2="hello t here" />');
// Attribute Wrap - (eof = "\n", indent_attr = " ", over80 = "\n")
opts.wrap_attributes = 'force';
opts.wrap_attributes_indent_size = 8;
test_fragment('<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>', '<div attr0\n attr1="123"\n data-attr2="hello t here">This is some text</div>');
test_fragment('<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>', '<div lookatthissuperduperlongattributenamewhoahcrazy0="true"\n attr0\n attr1="123"\n data-attr2="hello t here"\n heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>');
test_fragment('<img attr0 attr1="123" data-attr2="hello t here"/>', '<img attr0\n attr1="123"\n data-attr2="hello t here" />');
// Attribute Wrap - (eof = " ", indent_attr = "", over80 = "\n")
opts.wrap_attributes = 'auto';
opts.wrap_line_length = 80;
test_fragment('<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>');
test_fragment('<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>', '<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here"\nheymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>');
test_fragment('<img attr0 attr1="123" data-attr2="hello t here"/>', '<img attr0 attr1="123" data-attr2="hello t here" />');
// Attribute Wrap - (eof = " ", indent_attr = "", over80 = " ")
opts.wrap_attributes = 'auto';
opts.wrap_line_length = 0;
test_fragment('<div attr0 attr1="123" data-attr2="hello t here">This is some text</div>');
test_fragment('<div lookatthissuperduperlongattributenamewhoahcrazy0="true" attr0 attr1="123" data-attr2="hello t here" heymanimreallylongtoowhocomesupwiththesenames="false">This is some text</div>');
test_fragment('<img attr0 attr1="123" data-attr2="hello t here"/>', '<img attr0 attr1="123" data-attr2="hello t here" />');
// Unformatted tags
test_fragment('<ol>\n <li>b<pre>c</pre></li>\n</ol>');
test_fragment('<ol>\n <li>b<code>c</code></li>\n</ol>'); |
<<<<<<<
=======
if(configuration.assocs) {
classObj.assocs = configuration.assocs;
instanceObj.assocs = configuration.assocs;
}
>>>>>>> |
<<<<<<<
/* useless but can be overwitten */
parse: function(properties) {
return properties;
},
post: function(data) {
fetch(this.url(), {
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: this.httpParse(data)
});
},
put: function(id, data) {
return fetch(this.url(id), {
method: 'put',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: this.httpParse(data)
});
},
=======
>>>>>>>
/* useless but can be overwitten */
parse: function(properties) {
return properties;
},
post: function(data) {
fetch(this.url(), {
method: 'post',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: this.httpParse(data)
});
},
put: function(id, data) {
return fetch(this.url(id), {
method: 'put',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json'
},
body: this.httpParse(data)
});
},
<<<<<<<
delete: function() {
return this.$class.delete(this.primaryKey());
=======
delete: function(){
return this.$class.delete(this.primaryKeyValue());
>>>>>>>
delete: function(){
return this.$class.delete(this.primaryKeyValue());
<<<<<<<
fetch: function() {
return this.$class.fetchOne(this.attrs.id.value);
=======
validate: function() {
var self = this;
_.each(self.$class.attrs, function(attr, attrName) {
self.attrs[attrName].validate();
});
return this.isValid(false);
>>>>>>>
validate: function() {
var self = this;
_.each(self.$class.attrs, function(attr, attrName) {
self.attrs[attrName].validate();
});
return this.isValid(false);
<<<<<<<
=======
fetch: function() {
var self = this;
return fetch(this.url(this.id))
.then(function(response) {
return response.json();
}).then(function(json) {
json = self.$class.httpParse(json);
json = self.parse(json);
self.set(json);
self.cleanAttributes();
return self;
});
},
>>>>>>>
fetch: function() {
var self = this;
return fetch(this.url(this.id))
.then(function(response) {
return response.json();
}).then(function(json) {
json = self.$class.httpParse(json);
json = self.parse(json);
self.set(json);
self.cleanAttributes();
return self;
});
},
<<<<<<<
return buildUrl(this.baseUrl, this.name, this.primaryKey());
},
validate: function() {
var self = this;
self.errors = {};
_.each(self.attrs, function(attr, key) {
if(!attr.validate())
self.errors[key] = attr.errors;
});
return this.isValid(false);
=======
return buildUrl(this.$class.baseUrl, this.$class.name, this.primaryKeyValue());
>>>>>>>
return buildUrl(this.$class.baseUrl, this.$class.name, this.primaryKeyValue());
},
validate: function() {
var self = this;
self.errors = {};
_.each(self.attrs, function(attr, key) {
if(!attr.validate())
self.errors[key] = attr.errors;
});
return this.isValid(false); |
<<<<<<<
httpParse: function(data, direction) {
return data;
},
=======
/* useless but can be overwitten */
parse: function(properties) {
return properties;
},
>>>>>>>
httpParse: function(data, direction) {
return data;
},
/* useless but can be overwitten */
parse: function(properties) {
return properties;
}, |
<<<<<<<
//disabledCmds errors.
if (typeof musicbot.disabledCmds !== 'object') {
console.log(new TypeError(`disabledCmds must be an array`));
process.exit(1);
};
=======
>>>>>>> |
<<<<<<<
import Navigation from './components/Navigation/Navigation';
import Footer from './components/Footer/Footer';
import Contributors from './components/Contributors/Contributors';
import GetStarted from './components/Get_started/Get_started';
import Introduction from './components/Introduction/Introduction';
import Testimonial from './components/Testimonial/Testimonial';
import CardLayout from './components/CardLayout/CardLayout';
import Partner from './components/Partners/Partners';
import Data from './components/Testimonial/testimonial_data';
import AboutUs from './components/AboutUs/AboutUs';
import LoginProfessor from './components/Login/login';
import SignupProfessor from './components/SignUp/Signup';
import LoginStudent from './components/StudentLogin/Login';
import SignupStudent from './components/StudentSignUp/Signup';
import loader from './Images/loader.gif';
import Team from './components/Team/Team';
import data from './Data/data-card-layout';
=======
>>>>>>>
<<<<<<<
<Route exact path='/' render={() => {
return (
<div>
<Navigation />
<Introduction/>
<CardLayout data={data} />
<Contributors />
<Team />
<Partner />
<Testimonial slides = {Data}/>
<GetStarted />
<Footer />
</div>
)
}}/>
<Route path ='/aboutus' component ={AboutUs}/>
<Route path ='/login/professor' component ={LoginProfessor}/>
<Route path ='/signup/professor' component ={SignupProfessor}/>
<Route path ='/login/student' component ={LoginStudent}/>
<Route path ='/signup/student' component ={SignupStudent}/>
=======
<Route
exact
path="/"
render={() => (
<div>
<Navigation />
<Introduction />
<CardLayout />
<Contributors />
<Partner />
<Testimonial slides={Data} />
<GetStarted />
<Footer />
</div>
)}
/>
<Route path="/aboutus" component={AboutUs} />
<Route path="/login/professor" component={LoginProfessor} />
<Route path="/signup/professor" component={SignupProfessor} />
<Route path="/login/student" component={LoginStudent} />
<Route path="/signup/student" component={SignupStudent} />
<Route path="/contributors" component={Contributors} />
>>>>>>>
<Route
exact
path="/"
render={() => (
<div>
<Navigation />
<Introduction />
<CardLayout data={data}/>
<Contributors />
<Partner />
<Testimonial slides={Data} />
<GetStarted />
<Footer />
</div>
)}
/>
<Route path="/aboutus" component={AboutUs} />
<Route path="/login/professor" component={LoginProfessor} />
<Route path="/signup/professor" component={SignupProfessor} />
<Route path="/login/student" component={LoginStudent} />
<Route path="/signup/student" component={SignupStudent} />
<Route path="/contributors" component={Contributors} />
<<<<<<<
=======
>>>>>>> |
<<<<<<<
import { Testimonial } from '../Components';
=======
import { createStructuredSelector } from 'reselect';
import Testimonial from '../Components/Testimonial';
>>>>>>>
import { Testimonial } from '../Components';
import { createStructuredSelector } from 'reselect'; |
<<<<<<<
// remove the __tests__ directory that come with React Native
filesystem.remove('__tests__')
// copy our App directory
=======
// copy our App & Tests directories
>>>>>>>
// remove the __tests__ directory that come with React Native
filesystem.remove('__tests__')
// copy our App & Tests directories |
<<<<<<<
=======
this.handlePressLogin = this.handlePressLogin.bind(this)
this.handlePressLogout = this.handlePressLogout.bind(this)
this.handlePressRocket = this.handlePressRocket.bind(this)
this.handlePressSend = this.handlePressSend.bind(this)
this.handlePressStar = this.handlePressStar.bind(this)
this.handlePressListview = this.handlePressListview.bind(this)
this.handlePressListviewGrid = this.handlePressListviewGrid.bind(this)
this.handlePressMapview = this.handlePressMapview.bind(this)
>>>>>>> |
<<<<<<<
import { fakeAccountLogin, getFakeCaptcha } from '../services/api';
=======
import { stringify } from 'qs';
import { fakeAccountLogin } from '../services/api';
>>>>>>>
import { stringify } from 'qs';
import { fakeAccountLogin, getFakeCaptcha } from '../services/api';
<<<<<<<
*getCaptcha({ payload }, { call }) {
yield call(getFakeCaptcha, payload);
},
=======
*logout(_, { put }) {
yield put({
type: 'changeLoginStatus',
payload: {
status: false,
currentAuthority: 'guest',
},
});
reloadAuthorized();
yield put(
routerRedux.push({
pathname: '/user/login',
search: stringify({
redirect: window.location.href,
}),
})
);
},
>>>>>>>
*getCaptcha({ payload }, { call }) {
yield call(getFakeCaptcha, payload);
},
*logout(_, { put }) {
yield put({
type: 'changeLoginStatus',
payload: {
status: false,
currentAuthority: 'guest',
},
});
reloadAuthorized();
yield put(
routerRedux.push({
pathname: '/user/login',
search: stringify({
redirect: window.location.href,
}),
})
);
}, |
<<<<<<<
componentDidUpdate(preProps) {
if (this.props.data !== preProps.data) {
this.getLegendData();
=======
componentWillReceiveProps(nextProps) {
const { data } = this.props;
if (data !== nextProps.data) {
this.getLengendData();
>>>>>>>
componentDidUpdate(preProps) {
const { data } = this.props;
if (data !== preProps.data) {
this.getLegendData(); |
<<<<<<<
const applyCommit = (state, commitId, reducer) => {
const { history } = state;
=======
const applyCommit = (state, targetActionIndex, reducer) => {
const history = state.get('history');
>>>>>>>
const applyCommit = (state, targetActionIndex, reducer) => {
const { history } = state;
<<<<<<<
if (history[0].meta.optimistic.id === commitId) {
const historyWithoutCommit = history.slice(1);
const nextOptimisticIndex = findIndex(historyWithoutCommit, action => action.meta && action.meta.optimistic && !action.meta.optimistic.isNotOptimistic && action.meta.optimistic.id);
=======
if (targetActionIndex === 0) {
const historyWithoutCommit = history.shift();
const nextOptimisticIndex = historyWithoutCommit.findIndex(action => action.meta && action.meta.optimistic && !action.meta.optimistic.isNotOptimistic && action.meta.optimistic.id);
>>>>>>>
if (targetActionIndex === 0) {
const historyWithoutCommit = history.slice(1);
const nextOptimisticIndex = findIndex(historyWithoutCommit, action => action.meta && action.meta.optimistic && !action.meta.optimistic.isNotOptimistic && action.meta.optimistic.id);
<<<<<<<
const actionToCommitIndex = findIndex(history, action => action.meta && action.meta.optimistic && action.meta.optimistic.id === commitId);
if (!actionToCommitIndex) {
console.error(`@@optimist: Failed commit. Transaction #${commitId} does not exist!`);
}
const actionToCommit = history[actionToCommitIndex];
=======
const actionToCommit = history.get(targetActionIndex);
>>>>>>>
const actionToCommit = history[targetActionIndex];
<<<<<<<
if (history[0].meta.optimistic.id === revertId) {
const historyWithoutRevert = history.slice(1);
const nextOptimisticIndex = findIndex(historyWithoutRevert, action => action.meta && action.meta.optimistic && !action.meta.optimistic.isNotOptimistic && action.meta.optimistic.id);
=======
if (targetActionIndex === 0) {
const historyWithoutRevert = history.shift();
const nextOptimisticIndex = historyWithoutRevert.findIndex(action => action.meta && action.meta.optimistic && !action.meta.optimistic.isNotOptimistic && action.meta.optimistic.id);
>>>>>>>
if (targetActionIndex === 0) {
const historyWithoutRevert = history.slice(1);
const nextOptimisticIndex = findIndex(historyWithoutRevert, action => action.meta && action.meta.optimistic && !action.meta.optimistic.isNotOptimistic && action.meta.optimistic.id);
<<<<<<<
const indexToRevert = findIndex(history, action => action.meta && action.meta.optimistic && action.meta.optimistic.id === revertId);
if (indexToRevert === -1) {
console.error(`@@optimist: Failed revert. Transaction #${revertId} does not exist!`);
}
newHistory = history.slice();
newHistory.splice(indexToRevert, 1);
=======
newHistory = history.delete(targetActionIndex);
>>>>>>>
newHistory = history.slice();
newHistory.splice(targetActionIndex, 1); |
<<<<<<<
unstack: false
=======
unstack: false,
opacity: 1.0
>>>>>>>
unstack: false,
opacity: 1.0
<<<<<<<
.attr("height", function(d) { return graph.y.magnitude(Math.abs(d.y)) })
.attr("transform", transform);
=======
.attr("opacity", series.opacity)
.attr("height", function(d) { return graph.y.magnitude(d.y) });
>>>>>>>
.attr("height", function(d) { return graph.y.magnitude(Math.abs(d.y)) })
.attr("opacity", series.opacity)
.attr("transform", transform); |
<<<<<<<
usageRecord.totalTimeThisPlay = Math.max(usageRecord.recordingDuration, usageRecord.currentPlayTime + usageRecord.totalTimeThisPlay);
usageRecord.maxViewingTime = Math.max(usageRecord.maxViewingTime, usageRecord.totalTimeThisPlay);
=======
usageRecord.totalTimeThisPlay = Math.max(usageRecord.recordingDuration, usageRecord.currentPlayTime + usageRecord.totalTimeThisPlay);
usageRecord.maxViewingTime = Math.min(usageRecord.recordingDuration, Math.max(usageRecord.maxViewingTime, usageRecord.totalTimeThisPlay));
>>>>>>>
usageRecord.totalTimeThisPlay = Math.min(usageRecord.recordingDuration, usageRecord.currentPlayTime + usageRecord.totalTimeThisPlay);
usageRecord.maxViewingTime = Math.min(usageRecord.recordingDuration, Math.max(usageRecord.maxViewingTime, usageRecord.totalTimeThisPlay)); |
<<<<<<<
* Whether the given comment should be included in the base side of the
* given patch range.
* @param {!Object} comment
* @param {!Gerrit.PatchRange} range
* @return {boolean}
*/
=======
* Whether the given comment should be included in the base side of the
* given patch range.
*
* @param {!Object} comment
* @param {!Defs.patchRange} range
* @return {boolean}
*/
>>>>>>>
* Whether the given comment should be included in the base side of the
* given patch range.
*
* @param {!Object} comment
* @param {!Gerrit.PatchRange} range
* @return {boolean}
*/ |
<<<<<<<
], function(dialog, LZString, state, utils, audio, storage, stickerLib, selectionSerializer, udacityUser, marked) {
=======
], function(dialog, LZString, state, utils, audio, storage, stickerLib, localizer, selectionSerializer, marked) {
>>>>>>>
], function(dialog, LZString, state, utils, audio, storage, stickerLib, localizer, selectionSerializer, udacityUser, marked) {
<<<<<<<
let buttonContents = '<div id="graffiti-setup-button" style="display:none;" class="btn-group"><button class="btn btn-default" title="Enable Graffiti">';
=======
//sprayCanIcon = '<img src="jupytergraffiti/css/spray_can_icon.png">';
let buttonContents = '<div id="graffiti-setup-button" class="btn-group"><button class="btn btn-default" title="' + localizer.getString('ENABLE_GRAFFITI') + '">';
>>>>>>>
//sprayCanIcon = '<img src="jupytergraffiti/css/spray_can_icon.png">';
let buttonContents = '<div id="graffiti-setup-button" style="display:none;" class="btn-group"><button class="btn btn-default" title="' + localizer.getString('ENABLE_GRAFFITI') + '">'; |
<<<<<<<
editable
=======
inputProps,
>>>>>>>
editable
inputProps,
<<<<<<<
testID={testID || undefined}
editable={editable} />
=======
testID={testID || undefined}
{...inputProps} />
>>>>>>>
testID={testID || undefined}
editable={editable}
{...inputProps} />
<<<<<<<
editable: true,
=======
inputProps: {},
>>>>>>>
editable: true,
inputProps: {},
<<<<<<<
editable: PropTypes.bool,
=======
inputProps: PropTypes.exact(TextInput.propTypes),
>>>>>>>
editable: PropTypes.bool,
inputProps: PropTypes.exact(TextInput.propTypes), |
<<<<<<<
<<<<<<< HEAD
import DefaultPluginRegister from "../../lib-es5/Core/Node/DefaultPluginRegister"
import GrimoireInterface from "../../lib-es5/Core/GrimoireInterface"
import NamespacedIdentity from "../../lib-es5/Core/Base/NamespacedIdentity"
=======
import GrimoireInterface from "../../lib-es5/Core/GrimoireInterface"
import NamespacedIdentity from "../../lib-es5/Core/Base/NamespacedIdentity"
import jsdomAsync from "../JsDOMAsync";
>>>>>>> 90271576a775407b50eb0c66374f15427d64640b
=======
import GrimoireInterface from "../../lib-es5/GrimoireInterface"
import NSIdentity from "../../lib-es5/Base/NSIdentity"
import jsdomAsync from "../JsDOMAsync";
>>>>>>>
import GrimoireInterface from "../../lib-es5/Core/GrimoireInterface"
import NamespacedIdentity from "../../lib-es5/Core/Base/NamespacedIdentity"
import jsdomAsync from "../JsDOMAsync";
<<<<<<<
<<<<<<< HEAD
test.beforeEach(() => {
=======
test.beforeEach(async () => {
global.document = (await jsdomAsync("<html></html>",[])).document;
>>>>>>> 90271576a775407b50eb0c66374f15427d64640b
=======
test.beforeEach(async () => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString("<html></html>","text/html");
global.document = htmlDoc;
>>>>>>>
test.beforeEach(async () => {
const parser = new DOMParser();
const htmlDoc = parser.parseFromString("<html></html>","text/html");
global.document = htmlDoc;
<<<<<<<
<<<<<<< HEAD
DefaultPluginRegister.register();
=======
>>>>>>> 90271576a775407b50eb0c66374f15427d64640b
registerUserPlugin();
=======
>>>>>>>
<<<<<<<
sinon.assert.calledWith(testComponent1Spy, "testArg");
sinon.assert.calledWith(testComponent2Spy, "testArg");
sinon.assert.calledWith(testComponentOptionalSpy, "testArg");
<<<<<<< HEAD
sinon.assert.calledWith(testComponentBaseSpy, "testArg");
sinon.assert.callOrder(testComponent1Spy, testComponentBaseSpy, testComponent2Spy, testComponentOptionalSpy);
sinon.assert.calledWith(stringConverterSpy, "hugahuga");
sinon.assert.calledWith(stringConverterSpy, "123");
sinon.assert.calledWith(stringConverterSpy, "hogehoge");
=======
// TODO uncomment this. sinon.assert.calledWith(testComponentBaseSpy, "testArg");
sinon.assert.callOrder(testComponent1Spy, /*TODO uncomment this also testComponentBaseSpy,*/ testComponent2Spy, testComponentOptionalSpy);
sinon.assert.calledWith(stringConverterSpy, "hugahuga");
sinon.assert.calledWith(stringConverterSpy, "123");
//sinon.assert.calledWith(stringConverterSpy, "hogehoge");
>>>>>>> 90271576a775407b50eb0c66374f15427d64640b
sinon.assert.calledWith(stringConverterSpy, "999");
=======
sinon.assert.neverCalledWith(testComponent1Spy, "testArg");
sinon.assert.neverCalledWith(testComponent2Spy, "testArg");
sinon.assert.neverCalledWith(testComponentOptionalSpy, "testArg");
// TODO uncomment this. sinon.assert.calledWith(testComponentBaseSpy, "testArg");
sinon.assert.neverCalledWith(stringConverterSpy, "hugahuga");
sinon.assert.neverCalledWith(stringConverterSpy, "123");
//sinon.assert.calledWith(stringConverterSpy, "hogehoge");
sinon.assert.neverCalledWith(stringConverterSpy, "999");
>>>>>>>
sinon.assert.neverCalledWith(testComponent1Spy, "testArg");
sinon.assert.neverCalledWith(testComponent2Spy, "testArg");
sinon.assert.neverCalledWith(testComponentOptionalSpy, "testArg");
// TODO uncomment this. sinon.assert.calledWith(testComponentBaseSpy, "testArg");
sinon.assert.neverCalledWith(stringConverterSpy, "hugahuga");
sinon.assert.neverCalledWith(stringConverterSpy, "123");
//sinon.assert.calledWith(stringConverterSpy, "hogehoge");
sinon.assert.neverCalledWith(stringConverterSpy, "999"); |
<<<<<<<
'force_auth(/)': showView(SignInView, { forceAuth: true }),
'oauth/signin(/)': showView(SignInView, { isOAuth: true })
=======
'force_auth(/)': showView(SignInView, { forceAuth: true }),
'cookies_disabled(/)': showView(CookiesDisabledView)
>>>>>>>
'force_auth(/)': showView(SignInView, { forceAuth: true }),
'oauth/signin(/)': showView(SignInView, { isOAuth: true }),
'cookies_disabled(/)': showView(CookiesDisabledView) |
<<<<<<<
'views/oauth_sign_in',
=======
'views/force_auth',
>>>>>>>
'views/oauth_sign_in',
'views/force_auth',
<<<<<<<
OAuthSignInView,
=======
ForceAuthView,
>>>>>>>
OAuthSignInView,
ForceAuthView, |
<<<<<<<
.then(function (accountData) {
return self.onSignUpSuccess(accountData);
=======
.then(function () {
self.navigate('confirm');
>>>>>>>
.then(function (accountData) {
return self.onSignUpSuccess(accountData);
<<<<<<<
},
onSignUpSuccess: function(accountData) {
if (accountData.verified) {
this.navigate('settings');
} else {
this.navigate('confirm');
}
}
=======
},
_suggestSignIn: function () {
var msg = t('Account already exists. <a href="/signin">Sign in</a>');
return this.displayErrorUnsafe(msg);
},
>>>>>>>
},
onSignUpSuccess: function(accountData) {
if (accountData.verified) {
this.navigate('settings');
} else {
this.navigate('confirm');
}
},
_suggestSignIn: function () {
var msg = t('Account already exists. <a href="/signin">Sign in</a>');
return this.displayErrorUnsafe(msg);
}, |
<<<<<<<
var calName = $('#calendarNameTxt').val();
var link = $('#fromPublicCalendar').val();
if(calName.length === 0){
=======
var calendarName = $('#calendarNameTxt').val();
var synchronize = $('#synchronize').attr('checked');
if(calendarName.length === 0){
>>>>>>>
var calendarName = $('#calendarNameTxt').val();
var synchronize = $('#synchronize').attr('checked');
var link = $('#fromPublicCalendar').val();
if(calendarName.length === 0){
<<<<<<<
self.createNewCalendar(calName,link);
=======
self.createNewCalendar({calName : calendarName, sync:synchronize});
>>>>>>>
self.createNewCalendar({calName : calendarName, sync:synchronize,link:link}); |
<<<<<<<
=======
if(viewType == "thumbnails" || viewType == "list"){
$('#top-bar-editBtn').hide();
}
>>>>>>>
if(viewType == "thumbnails" || viewType == "list"){
$('#top-bar-editBtn').hide();
} |
<<<<<<<
_computeShowPrimaryTabs(dynamicTabContentEndpoints) {
return dynamicTabContentEndpoints.length > 0;
},
=======
/**
* Gets base patch number, if is a parent try and
* decide from preference weather to default to `auto merge`
* or `Parent 1`.
* @param {Object} change
* @param {Object} patchRange
* @return {number|string}
*/
_getBasePatchNum(change, patchRange) {
if (patchRange.basePatchNum &&
patchRange.basePatchNum !== 'PARENT') {
return patchRange.basePatchNum;
}
const revisionInfo = this._getRevisionInfo(change);
if (!revisionInfo) return 'PARENT';
const parentCounts = revisionInfo.getParentCountMap();
// check that there is at least 2 parents otherwise fall back to 1,
// which means there is only one parent.
const parentCount = parentCounts.hasOwnProperty(1) ?
parentCounts[1] : 1;
const preferFirst = this._prefs &&
this._prefs.default_base_for_merges === 'FIRST_PARENT';
return parentCount > 1 && preferFirst ? -1 : 'PARENT';
},
>>>>>>>
/**
* Gets base patch number, if is a parent try and
* decide from preference weather to default to `auto merge`
* or `Parent 1`.
* @param {Object} change
* @param {Object} patchRange
* @return {number|string}
*/
_getBasePatchNum(change, patchRange) {
if (patchRange.basePatchNum &&
patchRange.basePatchNum !== 'PARENT') {
return patchRange.basePatchNum;
}
const revisionInfo = this._getRevisionInfo(change);
if (!revisionInfo) return 'PARENT';
const parentCounts = revisionInfo.getParentCountMap();
// check that there is at least 2 parents otherwise fall back to 1,
// which means there is only one parent.
const parentCount = parentCounts.hasOwnProperty(1) ?
parentCounts[1] : 1;
const preferFirst = this._prefs &&
this._prefs.default_base_for_merges === 'FIRST_PARENT';
return parentCount > 1 && preferFirst ? -1 : 'PARENT';
},
_computeShowPrimaryTabs(dynamicTabContentEndpoints) {
return dynamicTabContentEndpoints.length > 0;
}, |
<<<<<<<
common.populateUsersForGroups('#sourceUsers','#targetUsers',this.currentModel.toJSON(),this.page);
common.populateUsers("#allUsers", "/Users",this.currentModel.toJSON(),null,true);
common.populateDepartmentsList("#sourceGroups","#targetGroups", "/Departments",this.currentModel.toJSON(),this.pageG);
=======
common.populateJobPositions(App.ID.jobPositionDd, "/JobPosition", this.currentModel.toJSON(),function(){self.styleSelect(App.ID.jobPositionDd);});
>>>>>>>
common.populateUsersForGroups('#sourceUsers','#targetUsers',this.currentModel.toJSON(),this.page);
common.populateUsers("#allUsers", "/Users",this.currentModel.toJSON(),null,true);
common.populateDepartmentsList("#sourceGroups","#targetGroups", "/Departments",this.currentModel.toJSON(),this.pageG);
common.populateJobPositions(App.ID.jobPositionDd, "/JobPosition", this.currentModel.toJSON(),function(){self.styleSelect(App.ID.jobPositionDd);}); |
<<<<<<<
=======
getProjectPMForDashboard:getProjectPMForDashboard,
getProjectStatusCountForDashboard:getProjectStatusCountForDashboard,
>>>>>>>
getProjectPMForDashboard:getProjectPMForDashboard,
getProjectStatusCountForDashboard:getProjectStatusCountForDashboard, |
<<<<<<<
jsonProfile.profileAccess[i].read = readAccess[i];
jsonProfile.profileAccess[i].editWrite = writeAccess[i];
jsonProfile.profileAccess[i].del = deleteAccess[i];
=======
jsonProfile.profileAccess[i].access.read = readAccess[i];
jsonProfile.profileAccess[i].access.editWrite = writeAccess[i];
jsonProfile.profileAccess[i].access.del = deleteAccess[i];
>>>>>>>
jsonProfile.profileAccess[i].read = readAccess[i];
jsonProfile.profileAccess[i].editWrite = writeAccess[i];
jsonProfile.profileAccess[i].del = deleteAccess[i];
<<<<<<<
//saveProfile: function(){
// var selectedProfileId = $('#profilesList > li.active > a').data('id');
// var profile = this.profilesCollection.get(selectedProfileId);
// var jsonProfile = profile.toJSON();
// var tableContent = $('#modulesAccessTable tbody');
// var readAccess = tableContent.find('input.read:checkbox').map(function(){
// return this.checked;
// }).get();
// var writeAccess = tableContent.find('input.write:checkbox').map(function(){
// return this.checked;
// }).get();
// var deleteAccess = tableContent.find('input.delete:checkbox').map(function(){
// return this.checked;
// }).get();
// for(var i= 0, len = readAccess.length; i < len; i++){
// jsonProfile.profileAccess[i].access[0] = readAccess[i];
// jsonProfile.profileAccess[i].access[1] = writeAccess[i];
// jsonProfile.profileAccess[i].access[2] = deleteAccess[i];
// }
// profile.save(jsonProfile,
// {
// headers: {
// mid: 39
// },
// wait: true,
// success: function () {
// $('#top-bar-saveBtn').hide();
// var tableRows = $('#modulesAccessTable tbody tr');
// for (var i= 0, len = tableRows.length; i<len; i++){
// $(tableRows[i]).find('.read').prop('disabled', true);
// $(tableRows[i]).find('.write').prop('disabled', true);
// $(tableRows[i]).find('.delete').prop('disabled', true);
// }
// $("#modulesAccessTable").show();
// },
// error: function (model, xhr, options) {
// if (xhr && xhr.status === 401) {
// Backbone.history.navigate("login", { trigger: true });
// } else {
// Backbone.history.navigate("home", { trigger: true });
// }
// }
// });
//},
=======
/* saveProfile: function(){
var selectedProfileId = $('#profilesList > li.active > a').data('id');
var profile = this.profilesCollection.get(selectedProfileId);
var jsonProfile = profile.toJSON();
var tableContent = $('#modulesAccessTable tbody');
var readAccess = tableContent.find('input.read:checkbox').map(function(){
return this.checked;
}).get();
var writeAccess = tableContent.find('input.write:checkbox').map(function(){
return this.checked;
}).get();
var deleteAccess = tableContent.find('input.delete:checkbox').map(function(){
return this.checked;
}).get();
for(var i= 0, len = readAccess.length; i < len; i++){
jsonProfile.profileAccess[i].access[0] = readAccess[i];
jsonProfile.profileAccess[i].access[1] = writeAccess[i];
jsonProfile.profileAccess[i].access[2] = deleteAccess[i];
}
profile.save(jsonProfile,
{
headers: {
mid: 39
},
wait: true,
success: function () {
$('#top-bar-saveBtn').hide();
var tableRows = $('#modulesAccessTable tbody tr');
for (var i= 0, len = tableRows.length; i<len; i++){
$(tableRows[i]).find('.read').prop('disabled', true);
$(tableRows[i]).find('.write').prop('disabled', true);
$(tableRows[i]).find('.delete').prop('disabled', true);
}
$("#modulesAccessTable").show();
},
error: function (model, xhr, options) {
if (xhr && xhr.status === 401) {
Backbone.history.navigate("login", { trigger: true });
} else {
Backbone.history.navigate("home", { trigger: true });
}
}
});
},
*/
>>>>>>>
saveProfile: function(){
var selectedProfileId = $('#profilesList > li.active > a').data('id');
var profile = this.profilesCollection.get(selectedProfileId);
var jsonProfile = profile.toJSON();
var tableContent = $('#modulesAccessTable tbody');
var readAccess = tableContent.find('input.read:checkbox').map(function(){
return this.checked;
}).get();
var writeAccess = tableContent.find('input.write:checkbox').map(function(){
return this.checked;
}).get();
var deleteAccess = tableContent.find('input.delete:checkbox').map(function(){
return this.checked;
}).get();
for(var i= 0, len = readAccess.length; i < len; i++){
jsonProfile.profileAccess[i].access[0] = readAccess[i];
jsonProfile.profileAccess[i].access[1] = writeAccess[i];
jsonProfile.profileAccess[i].access[2] = deleteAccess[i];
}
// profile.save(jsonProfile,
// {
// headers: {
// mid: 39
// },
// wait: true,
// success: function () {
// $('#top-bar-saveBtn').hide();
// var tableRows = $('#modulesAccessTable tbody tr');
// for (var i= 0, len = tableRows.length; i<len; i++){
// $(tableRows[i]).find('.read').prop('disabled', true);
// $(tableRows[i]).find('.write').prop('disabled', true);
// $(tableRows[i]).find('.delete').prop('disabled', true);
// }
// $("#modulesAccessTable").show();
// },
// error: function (model, xhr, options) {
// if (xhr && xhr.status === 401) {
// Backbone.history.navigate("login", { trigger: true });
// } else {
// Backbone.history.navigate("home", { trigger: true });
// }
// }
// });
//}, |
<<<<<<<
var collection = new ContentCollection({ viewType: 'list', page: 1, count: 5 });
=======
var collection = new ContentCollection({ viewType: 'list', page: 1, count: 50 });
>>>>>>>
var collection = new ContentCollection({ viewType: 'list', page: 1, count: 50 });
var collection = new ContentCollection({ viewType: 'list', page: 1, count: 5 }); |
<<<<<<<
resizable:true,
dialogClass:"edit-person-dialog",
title: "Personal Info",
width:"80%",
height:690
=======
resizable:false,
title: "Edit Person",
dialogClass: "edit-person-dialog"
>>>>>>>
resizable:true,
dialogClass:"edit-person-dialog",
title: "Edit Person",
width:"80%",
height:690 |
<<<<<<<
if (val || title) {
var formModel = this.formModel;
var notes = formModel.get('notes');
var arrKeyStr = $('#getNoteKey').attr("value");
var noteObj = {
note: '',
title: ''
};
if (arrKeyStr) {
var editNotes = _.map(notes, function (note) {
if (note._id == arrKeyStr) {
note.note = val;
note.title = title;
}
return note;
});
formModel.save({ 'notes': editNotes },
{
headers: {
mid: 39
},
patch: true,
success: function () {
$('#noteBody').val($('#' + arrKeyStr).find('.noteText').html(val));
$('#noteBody').val($('#' + arrKeyStr).find('.noteTitle').html(title));
$('#getNoteKey').attr("value", '');
}
});
} else {
noteObj.note = val;
noteObj.title = title;
notes.push(noteObj);
formModel.save({ 'notes': notes },
{
headers: {
mid: 39
},
patch: true,
wait: true,
success: function (models, data) {
debugger;
$('#noteBody').empty();
data.notes.forEach(function (item) {
/* var key = notes.length - 1;
var notes_data = response.notes;
var date = common.utcDateToLocaleDate(response.notes[key].date);
var author = currentModel.get('name').first;
var id = response.notes[key]._id;
$('#noteBody').prepend(_.template(addNoteTemplate, { val: val, title: title, author: author, data: notes_data, date: date, id: id }));*/
var date = common.utcDateToLocaleDate(item.date);
//notes.push(item);
$('#noteBody').prepend(_.template(addNoteTemplate, { id: item._id, title: item.title, val: item.note, author: item.author, date: date }));
});
},
error: function (models, data) {
alert('some error');
}
});
}
$('#noteArea').val('');
$('#noteTitleArea').val('');
=======
if (!val) {//textarrea notes not be empty
alert("Note Content can not be empty");
}
else {
if (val || title) {
var notes = this.formModel.get('notes');
var arrKeyStr = $('#getNoteKey').attr("value");
var noteObj = {
note: '',
title: ''
};
if (arrKeyStr) {
var editNotes = _.map(notes, function (note) {
if (note._id == arrKeyStr) {
note.note = val;
note.title = title;
}
return note;
});
this.formModel.save({ 'notes': editNotes },
{
headers: {
mid: 39
},
patch: true,
success: function () {
$('#noteBody').val($('#' + arrKeyStr).find('.noteText').html(val));
$('#noteBody').val($('#' + arrKeyStr).find('.noteTitle').html(title));
$('#getNoteKey').attr("value", '');
}
});
} else {
noteObj.note = val;
noteObj.title = title;
notes.push(noteObj);
this.formModel.set();
this.formModel.save({ 'notes': notes },
{
headers: {
mid: 39
},
patch: true,
success: function (models, data) {
$('#noteBody').empty();
data.notes.forEach(function (item) {
/* var key = notes.length - 1;
var notes_data = response.notes;
var date = common.utcDateToLocaleDate(response.notes[key].date);
var author = currentModel.get('name').first;
var id = response.notes[key]._id;
$('#noteBody').prepend(_.template(addNoteTemplate, { val: val, title: title, author: author, data: notes_data, date: date, id: id }));*/
var date = common.utcDateToLocaleDate(item.date);
//notes.push(item);
$('#noteBody').prepend(_.template(addNoteTemplate, { id: item._id, title: item.title, val: item.note, author: item.author, date: date }));
});
}
});
}
}
$('#noteArea').val('');
$('#noteTitleArea').val('');
>>>>>>>
if (val || title) {
var formModel = this.formModel;
var notes = formModel.get('notes');
var arrKeyStr = $('#getNoteKey').attr("value");
var noteObj = {
note: '',
title: ''
};
if (arrKeyStr) {
var editNotes = _.map(notes, function (note) {
if (note._id == arrKeyStr) {
note.note = val;
note.title = title;
}
return note;
});
formModel.save({ 'notes': editNotes },
{
headers: {
mid: 39
},
patch: true,
success: function () {
$('#noteBody').val($('#' + arrKeyStr).find('.noteText').html(val));
$('#noteBody').val($('#' + arrKeyStr).find('.noteTitle').html(title));
$('#getNoteKey').attr("value", '');
}
});
} else {
noteObj.note = val;
noteObj.title = title;
notes.push(noteObj);
formModel.save({ 'notes': notes },
{
headers: {
mid: 39
},
patch: true,
wait: true,
success: function (models, data) {
$('#noteBody').empty();
data.notes.forEach(function (item) {
/* var key = notes.length - 1;
var notes_data = response.notes;
var date = common.utcDateToLocaleDate(response.notes[key].date);
var author = currentModel.get('name').first;
var id = response.notes[key]._id;
$('#noteBody').prepend(_.template(addNoteTemplate, { val: val, title: title, author: author, data: notes_data, date: date, id: id }));*/
var date = common.utcDateToLocaleDate(item.date);
//notes.push(item);
$('#noteBody').prepend(_.template(addNoteTemplate, { id: item._id, title: item.title, val: item.note, author: item.author, date: date }));
});
}
});
}
$('#noteArea').val('');
$('#noteTitleArea').val(''); |
<<<<<<<
var collection = new ContentCollection({ viewType: 'list', page: 1, count: 5, status: [], parrentContentId: parrentContentId });
=======
var collection = new ContentCollection({ viewType: 'list', page: 1, count: 50, status: [] });
>>>>>>>
var collection = new ContentCollection({ viewType: 'list', page: 1, count: 50, status: [], parrentContentId: parrentContentId }); |
<<<<<<<
=======
viewType: null,
contentType: null,
>>>>>>>
viewType: null,
contentType: null,
<<<<<<<
=======
getListLength: function (callback) {
dataService.getData("/getPersonListLength", {}, function (response) {
console.log(response);
callback(response.listLength);
});
},
>>>>>>> |
<<<<<<<
var es6computedPropertyKeys = require('es6-computed-property-keys');
=======
var es6comprehensions = require('es6-comprehensions');
var es6computedProperties = require('es6-computed-properties');
>>>>>>>
var es6computedProperties = require('es6-computed-properties'); |
<<<<<<<
* Version: 1.3-devel
* Updated: 2013-08-26
=======
* Version: 1.2.2
* Updated: 2013-08-29
>>>>>>>
* Version: 1.3-devel
* Updated: 2013-08-31
<<<<<<<
set(_rowlock_, opt.rowlock);
set(_framelock_, opt.framelock);
set(_dimensions_, size);
=======
>>>>>>>
set(_rowlock_, opt.rowlock);
set(_framelock_, opt.framelock);
<<<<<<<
if (rows > 1 && !get(_rowlock_)) var
space_y= get(_dimensions_).y,
=======
if (rows > 1) var
>>>>>>>
if (rows > 1 && !get(_rowlock_)) var
<<<<<<<
space= get(_dimensions_),
$overlay= t.parent()
=======
$overlay= t.parent()
>>>>>>>
$overlay= t.parent()
<<<<<<<
oriented= false,
delay, // openingDone's delayed play pointer
=======
>>>>>>>
oriented= false,
<<<<<<<
loops= opt.loops
set(_lo_, loops ? 0 : - fraction * revolution);
set(_hi_, loops ? revolution : revolution - fraction * revolution);
return x !== undefined && set(_clicked_location_, { x: x, y: y }) || undefined
=======
loops= opt.loops,
lo= set(_lo_, loops ? 0 : - fraction * revolution),
hi= set(_hi_, loops ? revolution : revolution - fraction * revolution)
return x && set(_clicked_location_, { x: x, y: y }) || undefined
>>>>>>>
loops= opt.loops,
lo= set(_lo_, loops ? 0 : - fraction * revolution),
hi= set(_hi_, loops ? revolution : revolution - fraction * revolution)
return x !== undefined && set(_clicked_location_, { x: x, y: y }) || undefined
<<<<<<<
_cwish_= 'cwish', _dimensions_= 'dimensions', _fraction_= 'fraction', _frame_= 'frame', _framelock_= 'framelock',
_frames_= 'frames', _hi_= 'hi', _hidden_= 'hidden', _image_= 'image', _images_= 'images', _opening_= 'opening', _opening_ticks_= _opening_+'_ticks',
_lo_= 'lo', _options_= 'options', _playing_= 'playing', _preloaded_= 'preloaded', _reeling_= 'reeling', _reeled_= 'reeled', _revolution_= 'revolution',
_revolution_y_= 'revolution_y', _row_= 'row', _rowlock_= 'rowlock', _rows_= 'rows', _spacing_= 'spacing', _speed_= 'speed', _stage_= 'stage',
_stitched_shift_= 'stitched_shift', _stitched_travel_= 'stitched_travel', _stopped_= 'stopped', _style_= 'style', _tempo_= 'tempo', _ticks_= 'ticks',
_tier_= 'tier', _velocity_= 'velocity', _vertical_= 'vertical',
=======
_cwish_= 'cwish', _footage_= 'footage', _fraction_= 'fraction', _frame_= 'frame', _frames_= 'frames', _height_= 'height', _hi_= 'hi', _hidden_= 'hidden',
_image_= 'image', _images_= 'images', _loading_= 'loading', _opening_= 'opening', _opening_ticks_= _opening_+'_ticks', _lo_= 'lo', _options_= 'options',
_playing_= 'playing', _preloaded_= 'preloaded', _ratio_= 'ratio', _reeling_= 'reeling', _reeled_= 'reeled', _responsive_= 'responsive',
_revolution_= 'revolution', _revolution_y_= 'revolution_y', _row_= 'row', _rows_= 'rows', _spacing_= 'spacing', _speed_= 'speed', _stage_= 'stage',
_stitched_= 'stitched', _stitched_shift_= _stitched_+'_shift', _stitched_travel_= _stitched_+'_travel', _stopped_= 'stopped', _style_= 'style',
_tempo_= 'tempo', _ticks_= 'ticks', _tier_= 'tier', _truescale_= 'truescale', _velocity_= 'velocity', _vertical_= 'vertical', _width_= 'width',
>>>>>>>
_cwish_= 'cwish', _footage_= 'footage', _fraction_= 'fraction', _frame_= 'frame', _framelock_= 'framelock',
_frames_= 'frames', _height_= 'height', _hi_= 'hi', _hidden_= 'hidden', _image_= 'image', _images_= 'images', _loading_= 'loading', _opening_= 'opening', _opening_ticks_= _opening_+'_ticks',
_lo_= 'lo', _options_= 'options', _playing_= 'playing', _preloaded_= 'preloaded', _ratio_= 'ratio', _reeling_= 'reeling', _reeled_= 'reeled', _responsive_= 'responsive', _revolution_= 'revolution',
_revolution_y_= 'revolution_y', _row_= 'row', _rowlock_= 'rowlock', _rows_= 'rows', _spacing_= 'spacing', _speed_= 'speed', _stage_= 'stage',
_stitched_= 'stitched', _stitched_shift_= _stitched_+'_shift', _stitched_travel_= _stitched_+'_travel', _stopped_= 'stopped', _style_= 'style', _tempo_= 'tempo', _ticks_= 'ticks',
_tier_= 'tier', _truescale_= 'truescale', _velocity_= 'velocity', _vertical_= 'vertical', _width_= 'width',
<<<<<<<
_deviceorientation_= 'deviceorientation'+ns,
=======
_resize_= 'resize'+ns,
>>>>>>>
_deviceorientation_= 'deviceorientation'+ns, _resize_= 'resize'+ns, |
<<<<<<<
rebound: 0.5, // time spent on the edge (in seconds) of a non-looping panorama before it bounces back
=======
rebound: 0.5,
loading: 'Loading...', // label used for preloader
path: '', // URL path to be prepended to `image` or `images` filenames
preloader: true, // whether display the preloader or not
>>>>>>>
path: '', // URL path to be prepended to `image` or `images` filenames
preloader: true, // whether display the preloader or not
rebound: 0.5, // time spent on the edge (in seconds) of a non-looping panorama before it bounces back |
<<<<<<<
* Updated: 2013-02-20
=======
* Updated: 2012-10-12
>>>>>>>
* Updated: 2013-02-20
<<<<<<<
? undefined : stitched && px(stitched)+___+px(space.y)
|| px(space.x * opt.footage)+___+px(space.y * get(_rows_) * (rows || 1) * (opt.directional? 2:1))
=======
? !stitched ? undefined : px(stitched)+___+px(space.y)
: stitched && px(stitched)+___+px((space.y + opt.spacing) * rows - opt.spacing)
|| px(space.x * opt.footage)+___+px(space.y * get(_rows_) * rows * (opt.directional? 2:1))
>>>>>>>
? !stitched ? undefined : px(stitched)+___+px(space.y)
: stitched && px(stitched)+___+px((space.y + opt.spacing) * rows - opt.spacing)
|| px(space.x * opt.footage)+___+px(space.y * get(_rows_) * rows * (opt.directional? 2:1))
<<<<<<<
else var
x= set(_stitched_shift_, round(interpolate(frame_fraction, 0, get(_stitched_travel_))) % stitched),
y= 0,
shift= [px(-x), px(y)]
=======
else{
var
x= set(_stitched_shift_, round(interpolate(frame_fraction, 0, get(_stitched_travel_))) % opt.stitched),
y= opt.rows <= 1 ? 0 : (get(_dimensions_).y + get(_spacing_)) * (opt.rows - get(_row_)),
shift= [px(-x), px(-y)],
image= get(_images_).length > 1 && get(_images_)[get(_row_) - 1]
image && t.css('backgroundImage').search(opt.path+image) < 0 && t.css({ backgroundImage: url(opt.path+image) })
}
>>>>>>>
else{
var
x= set(_stitched_shift_, round(interpolate(frame_fraction, 0, get(_stitched_travel_))) % stitched),
y= rows <= 1 ? 0 : (space.y + spacing) * (rows - row),
shift= [px(-x), px(-y)],
image= images.length > 1 && images[row - 1]
image && t.css('backgroundImage').search(path+image) < 0 && t.css({ backgroundImage: url(path+image) })
}
<<<<<<<
rows= orbital ? 2 : opt.rows || 1,
frames= orbital ? opt.footage : opt.frames,
=======
rows= opt.orbital ? 2 : opt.rows || 1,
frames= opt.orbital ? opt.footage : opt.stitched ? 1 : opt.frames,
>>>>>>>
rows= orbital ? 2 : opt.rows || 1,
frames= orbital ? opt.footage : opt.stitched ? 1 : opt.frames, |
<<<<<<<
gotoPage: function(page, focusLink){
=======
gotoPage: function(page){
>>>>>>>
gotoPage: function(page){
<<<<<<<
// after renderQueryResults is resolved as well (to prevent jumping).
grid._updateNavigation(focusLink);
=======
// after renderArray is resolved as well (to prevent jumping).
grid._updateNavigation();
>>>>>>>
// after renderQueryResults is resolved as well (to prevent jumping).
grid._updateNavigation(); |
<<<<<<<
=======
set(_dimensions_, size);
set(_departure_, set(_destination_, set(_distance_, 0)));
>>>>>>>
set(_departure_, set(_destination_, set(_distance_, 0)));
<<<<<<<
_cwish_= 'cwish', _footage_= 'footage', _fraction_= 'fraction', _frame_= 'frame', _framelock_= 'framelock',
_frames_= 'frames', _height_= 'height', _hi_= 'hi', _hidden_= 'hidden', _image_= 'image', _images_= 'images', _loading_= 'loading', _opening_= 'opening', _opening_ticks_= _opening_+'_ticks',
_lo_= 'lo', _options_= 'options', _playing_= 'playing', _preloaded_= 'preloaded', _ratio_= 'ratio', _reeling_= 'reeling', _reeled_= 'reeled', _responsive_= 'responsive', _revolution_= 'revolution',
=======
_cwish_= 'cwish', _departure_= 'departure', _destination_= 'destination', _dimensions_= 'dimensions', _distance_= 'distance', _fraction_= 'fraction',
_frame_= 'frame', _framelock_= 'framelock',
_frames_= 'frames', _hi_= 'hi', _hidden_= 'hidden', _image_= 'image', _images_= 'images', _opening_= 'opening', _opening_ticks_= _opening_+'_ticks',
_lo_= 'lo', _options_= 'options', _playing_= 'playing', _preloaded_= 'preloaded', _reeling_= 'reeling', _reeled_= 'reeled', _revolution_= 'revolution',
>>>>>>>
_cwish_= 'cwish', _departure_= 'departure', _destination_= 'destination', _distance_= 'distance', _footage_= 'footage', _fraction_= 'fraction', _frame_= 'frame', _framelock_= 'framelock',
_frames_= 'frames', _height_= 'height', _hi_= 'hi', _hidden_= 'hidden', _image_= 'image', _images_= 'images', _loading_= 'loading', _opening_= 'opening', _opening_ticks_= _opening_+'_ticks',
_lo_= 'lo', _options_= 'options', _playing_= 'playing', _preloaded_= 'preloaded', _ratio_= 'ratio', _reeling_= 'reeling', _reeled_= 'reeled', _responsive_= 'responsive', _revolution_= 'revolution', |
<<<<<<<
if(this._sort.length){
=======
// Prevents SimpleQueryEngine from doing unnecessary "null" sorts (which can
// change the ordering in browsers that don't use a stable sort algorithm, eg Chrome)
if(this._sort && this._sort.length){
>>>>>>>
if(this._sort.length){
// Prevents SimpleQueryEngine from doing unnecessary "null" sorts (which can
// change the ordering in browsers that don't use a stable sort algorithm, eg Chrome) |
<<<<<<<
footage= set(_footage_, min(opt.footage, opt.frames)),
spacing= set(_spacing_, opt.spacing),
width= set(_width_, t.width()),
height= set(_height_, t.height()),
=======
footage= opt.footage,
shy= set(_shy_, opt.shy),
size= { x: t.width(), y: t.height() },
>>>>>>>
footage= set(_footage_, min(opt.footage, opt.frames)),
spacing= set(_spacing_, opt.spacing),
width= set(_width_, t.width()),
height= set(_height_, t.height()),
shy= set(_shy_, opt.shy),
<<<<<<<
get(_style_).remove();
get(_cache_).empty();
clearTimeout(delay);
clearTimeout(gauge_delay);
get(_area_).unbind(ns);
$(window).unbind(_resize_, slow_gauge);
=======
if (!get(_shy_)){
get(_style_).remove();
get(_area_).unbind(ns);
}
>>>>>>>
if (!get(_shy_)){
get(_style_).remove();
get(_cache_).empty();
get(_area_).unbind(ns);
}
clearTimeout(delay);
clearTimeout(gauge_delay);
$(window).unbind(_resize_, slow_gauge);
<<<<<<<
if (!(loaded || get(_loading_))) return;
=======
if (get(_shy_)) return;
>>>>>>>
if (!(loaded || get(_loading_)) || get(_shy_)) return;
<<<<<<<
_center_= 'center', _clicked_= 'clicked', _clicked_location_= 'clicked_location', _clicked_on_= 'clicked_on', _clicked_tier_= 'clicked_tier',
_cwish_= 'cwish', _departure_= 'departure', _destination_= 'destination', _distance_= 'distance', _footage_= 'footage', _fraction_= 'fraction', _frame_= 'frame', _framelock_= 'framelock',
_frames_= 'frames', _height_= 'height', _hi_= 'hi', _hidden_= 'hidden', _image_= 'image', _images_= 'images', _loading_= 'loading', _opening_= 'opening', _opening_ticks_= _opening_+'_ticks',
_lo_= 'lo', _options_= 'options', _playing_= 'playing', _preloaded_= 'preloaded', _ratio_= 'ratio', _reeling_= 'reeling', _reeled_= 'reeled', _responsive_= 'responsive', _revolution_= 'revolution',
_revolution_y_= 'revolution_y', _row_= 'row', _rowlock_= 'rowlock', _rows_= 'rows', _spacing_= 'spacing', _speed_= 'speed', _stage_= 'stage',
_stitched_= 'stitched', _stitched_shift_= _stitched_+'_shift', _stitched_travel_= _stitched_+'_travel', _stopped_= 'stopped', _style_= 'style', _tempo_= 'tempo', _ticks_= 'ticks',
_tier_= 'tier', _truescale_= 'truescale', _velocity_= 'velocity', _vertical_= 'vertical', _width_= 'width',
=======
_center_= 'center', _click_= 'click', _clicked_= _click_+'ed', _clicked_location_= _clicked_+'_location', _clicked_on_= _clicked_+'_on',
_clicked_tier_= _clicked_+'_tier', _cwish_= 'cwish', _dimensions_= 'dimensions', _fraction_= 'fraction', _frame_= 'frame', _framelock_= 'framelock',
_frames_= 'frames', _hi_= 'hi', _hidden_= 'hidden', _image_= 'image', _images_= 'images', _opening_= 'opening', _opening_ticks_= _opening_+'_ticks',
_lo_= 'lo', _options_= 'options', _playing_= 'playing', _preloaded_= 'preloaded', _reeling_= 'reeling', _reeled_= 'reeled', _revolution_= 'revolution',
_revolution_y_= 'revolution_y', _row_= 'row', _rowlock_= 'rowlock', _rows_= 'rows', _shy_= 'shy', _spacing_= 'spacing', _speed_= 'speed',
_stage_= 'stage', _stitched_shift_= 'stitched_shift', _stitched_travel_= 'stitched_travel', _stopped_= 'stopped', _style_= 'style', _tempo_= 'tempo',
_ticks_= 'ticks', _tier_= 'tier', _velocity_= 'velocity', _vertical_= 'vertical',
>>>>>>>
_center_= 'center', _click_= 'click', _clicked_= _click_+'ed', _clicked_location_= _clicked_+'_location', _clicked_on_= _clicked_+'_on', _clicked_tier_= _clicked_+'_tier',
_cwish_= 'cwish', _departure_= 'departure', _destination_= 'destination', _distance_= 'distance', _footage_= 'footage', _fraction_= 'fraction', _frame_= 'frame', _framelock_= 'framelock',
_frames_= 'frames', _height_= 'height', _hi_= 'hi', _hidden_= 'hidden', _image_= 'image', _images_= 'images', _loading_= 'loading', _opening_= 'opening', _opening_ticks_= _opening_+'_ticks',
_lo_= 'lo', _options_= 'options', _playing_= 'playing', _preloaded_= 'preloaded', _ratio_= 'ratio', _reeling_= 'reeling', _reeled_= 'reeled', _responsive_= 'responsive', _revolution_= 'revolution',
_revolution_y_= 'revolution_y', _row_= 'row', _rowlock_= 'rowlock', _rows_= 'rows', _shy_= 'shy', _spacing_= 'spacing', _speed_= 'speed', _stage_= 'stage',
_stitched_= 'stitched', _stitched_shift_= _stitched_+'_shift', _stitched_travel_= _stitched_+'_travel', _stopped_= 'stopped', _style_= 'style', _tempo_= 'tempo', _ticks_= 'ticks',
_tier_= 'tier', _truescale_= 'truescale', _velocity_= 'velocity', _vertical_= 'vertical', _width_= 'width', |
<<<<<<<
* http://reel360.org
* Version: 1.2.2
* Updated: 2013-08-26
=======
* http://jquery.vostrel.cz/reel
* Version: 1.2-devel
* Updated: 2013-05-17
>>>>>>>
* http://reel360.org
* Version: 1.2.2
* Updated: 2013-08-26
<<<<<<<
_area_= 'area', _auto_= 'auto', _backup_= 'backup', _backwards_= 'backwards', _bit_= 'bit', _brake_= 'brake', _cache_= 'cache', _cached_=_cache_+'d',
_center_= 'center', _clicked_= 'clicked', _clicked_location_= 'clicked_location', _clicked_on_= 'clicked_on', _clicked_tier_= 'clicked_tier',
_cwish_= 'cwish', _dimensions_= 'dimensions', _fraction_= 'fraction', _frame_= 'frame',
=======
_area_= 'area', _auto_= 'auto', _backup_= 'backup', _backwards_= 'backwards', _bit_= 'bit', _brake_= 'brake', _cached_= 'cached', _center_= 'center',
_clicked_= 'clicked', _clicked_location_= 'clicked_location', _clicked_on_= 'clicked_on', _clicked_tier_= 'clicked_tier',
_cwish_= 'cwish', _dimensions_= 'dimensions', _fraction_= 'fraction', _frame_= 'frame', _framelock_= 'framelock',
>>>>>>>
_area_= 'area', _auto_= 'auto', _backup_= 'backup', _backwards_= 'backwards', _bit_= 'bit', _brake_= 'brake', _cache_= 'cache', _cached_=_cache_+'d',
_center_= 'center', _clicked_= 'clicked', _clicked_location_= 'clicked_location', _clicked_on_= 'clicked_on', _clicked_tier_= 'clicked_tier',
_cwish_= 'cwish', _dimensions_= 'dimensions', _fraction_= 'fraction', _frame_= 'frame', _framelock_= 'framelock', |
<<<<<<<
Deferred.when(
grid.renderQuery ?
grid._trackError(function(){
return grid.renderQuery(query, preloadNode, options);
}) :
grid.renderQueryResults(query(options), preloadNode,
"level" in query ? { queryLevel: query.level } : {}),
function(){
// Expand once results are retrieved, if the row is still expanded.
if(grid._expanded[row.id] && hasTransitionend){
var scrollHeight = container.scrollHeight;
container.style.height = scrollHeight ? scrollHeight + "px" : "auto";
}
=======
// Add the query to the promise chain.
promise = promise.then(function(){
return grid.renderQuery ?
grid.renderQuery(query, preloadNode, options) :
grid.renderArray(query(options), preloadNode,
"level" in query ? { queryLevel: query.level } : {});
}).then(function(){
// Expand once results are retrieved, if the row is still expanded.
if(grid._expanded[row.id] && hasTransitionend){
var scrollHeight = container.scrollHeight;
container.style.height = scrollHeight ? scrollHeight + "px" : "auto";
>>>>>>>
// Add the query to the promise chain.
promise = promise.then(function(){
return grid.renderQuery ?
grid.renderQuery(query, preloadNode, options) :
grid.renderQueryResults(query(options), preloadNode,
"level" in query ? { queryLevel: query.level } : {});
}).then(function(){
// Expand once results are retrieved, if the row is still expanded.
if(grid._expanded[row.id] && hasTransitionend){
var scrollHeight = container.scrollHeight;
container.style.height = scrollHeight ? scrollHeight + "px" : "auto"; |
<<<<<<<
=======
// Include a performance.now polyfill
(function () {
// In node.js, use process.hrtime.
if (this.window === undefined && this.process !== undefined) {
TWEEN.now = function () {
var time = process.hrtime();
// Convert [seconds, microseconds] to milliseconds.
return time[0] * 1000 + time[1] / 1000;
};
}
// In a browser, use window.performance.now if it is available.
else if (this.window !== undefined &&
window.performance !== undefined &&
window.performance.now !== undefined) {
// This must be bound, because directly assigning this function
// leads to an invocation exception in Chrome.
TWEEN.now = window.performance.now.bind(window.performance);
}
// Use Date.now if it is available.
else if (Date.now !== undefined) {
TWEEN.now = Date.now;
}
// Otherwise, use 'new Date().getTime()'.
else {
TWEEN.now = function () {
return new Date().getTime();
};
}
})();
>>>>>>>
// Include a performance.now polyfill
(function () {
// In node.js, use process.hrtime.
if (this.window === undefined && this.process !== undefined) {
TWEEN.now = function () {
var time = process.hrtime();
// Convert [seconds, microseconds] to milliseconds.
return time[0] * 1000 + time[1] / 1000;
};
}
// In a browser, use window.performance.now if it is available.
else if (this.window !== undefined &&
window.performance !== undefined &&
window.performance.now !== undefined) {
// This must be bound, because directly assigning this function
// leads to an invocation exception in Chrome.
TWEEN.now = window.performance.now.bind(window.performance);
}
// Use Date.now if it is available.
else if (Date.now !== undefined) {
TWEEN.now = Date.now;
}
// Otherwise, use 'new Date().getTime()'.
else {
TWEEN.now = function () {
return new Date().getTime();
};
}
})(); |
<<<<<<<
this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat);
return this;
},
_setupProperties: function (_object, _valuesStart, _valuesEnd, _valuesStartRepeat) {
for (var property in _valuesEnd) {
// Check if an Array was provided as property value
if (_valuesEnd[property] instanceof Array) {
var endValues = _valuesEnd[property];
if (endValues.length === 0) {
continue;
}
var startValue = _object[property];
// handle an array of relative values
endValues = endValues.map(this._handleRelativeValue.bind(this, startValue));
// Create a local copy of the Array with the start value at the front
_valuesEnd[property] = [startValue].concat(endValues);
}
// If `to()` specifies a property that doesn't exist in the source object,
// we should not set that property in the object
if (_object[property] === undefined) {
continue;
}
// handle the deepness of the values
if (_valuesEnd[property] instanceof Object && !(_valuesEnd[property] instanceof Array)) {
_valuesStart[property] = {};
for (var prop in _object[property]) {
_valuesStart[property][prop] = _object[property][prop];
}
_valuesStartRepeat[property] = {}; // TODO? repeat nested values? And yoyo? And array values?
=======
_setupProperties (this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat);
>>>>>>>
this._setupProperties(this._object, this._valuesStart, this._valuesEnd, this._valuesStartRepeat);
return this;
},
_setupProperties: function (_object, _valuesStart, _valuesEnd, _valuesStartRepeat) {
for (var property in _valuesEnd) {
var isInterpolationList = Array.isArray(_valuesEnd[property]);
// Check if an Array was provided as property value
if (isInterpolationList) {
var endValues = _valuesEnd[property];
if (endValues.length === 0) {
continue;
}
var startValue = _object[property];
// handle an array of relative values
endValues = endValues.map(this._handleRelativeValue.bind(this, startValue));
// Create a local copy of the Array with the start value at the front
_valuesEnd[property] = [startValue].concat(endValues);
}
// If `to()` specifies a property that doesn't exist in the source object,
// we should not set that property in the object
var propValue = _object[property];
var propType = typeof propValue;
if (propType === 'undefined' || propType === 'function') {
continue;
}
// handle the deepness of the values
if (propType === 'object' && propValue && !isInterpolationList) {
_valuesStart[property] = {};
for (var prop in _object[property]) {
_valuesStart[property][prop] = _object[property][prop];
}
_valuesStartRepeat[property] = {}; // TODO? repeat nested values? And yoyo? And array values?
<<<<<<<
// properties transformations
this._updateProperties(this._object, this._valuesStart, this._valuesEnd, value, this._interpolationFunction);
=======
_updateProperties(this._object, value, this._valuesStart, this._valuesEnd);
>>>>>>>
// properties transformations
this._updateProperties(this._object, this._valuesStart, this._valuesEnd, value); |
<<<<<<<
this.logs();
=======
this.fetchAllImages();
>>>>>>>
this.logs();
this.fetchAllImages(); |
<<<<<<<
var app = require('app');
var fs = require('fs');
=======
>>>>>>>
var app = require('app');
var fs = require('fs');
<<<<<<<
=======
var fs = require('fs');
>>>>>>>
<<<<<<<
app.commandLine.appendSwitch('js-flags', '--harmony');
var mainWindow = null;
=======
var windowOptions = {
width: 1000,
height: 700,
'min-width': 1000,
'min-height': 700,
resizable: true,
frame: false,
show: false
};
>>>>>>>
app.commandLine.appendSwitch('js-flags', '--harmony');
var mainWindow = null;
var windowOptions = {
width: 1000,
height: 700,
'min-width': 1000,
'min-height': 700,
resizable: true,
frame: false,
show: false
};
<<<<<<<
app.on('ready', function () {
mainWindow = new BrowserWindow({
width: 1000,
height: 700,
'min-width': 1000,
'min-height': 700,
resizable: true,
frame: false,
show: false
});
=======
app.on('ready', function() {
var mainWindow = new BrowserWindow(windowOptions);
>>>>>>>
app.on('ready', function() {
mainWindow = new BrowserWindow(windowOptions); |
<<<<<<<
grid._trackError(
function(){ return preload.query(options); }
).then(function(rangeCollection){
// Use function to isolate the variables in case we make multiple requests
// (which can happen if we need to render on both sides of an island of already-rendered rows)
(function(loadingNode, scrollNode, below, keepScrollTo, rangeCollection){
lastRows = Deferred.when(grid.renderCollection(rangeCollection, loadingNode, options), function(rows){
lastCollection = rangeCollection;
// can remove the loading node now
beforeNode = loadingNode.nextSibling;
put(loadingNode, "!");
if(keepScrollTo && beforeNode && beforeNode.offsetWidth){ // beforeNode may have been removed if the query results loading node was a removed as a distant node before rendering
// if the preload area above the nodes is approximated based on average
// row height, we may need to adjust the scroll once they are filled in
// so we don't "jump" in the scrolling position
var pos = grid.getScrollPosition();
grid.scrollTo({
// Since we already had to query the scroll position,
// include x to avoid TouchScroll querying it again on its end.
x: pos.x,
y: pos.y + beforeNode.offsetTop - keepScrollTo,
// Don't kill momentum mid-scroll (for TouchScroll only).
preserveMomentum: true
});
=======
// Keep _trackError-wrapped results separate, since if results is a
// promise, it will lose QueryResults functions when chained by `when`
var results = preload.query(options),
trackedResults = grid._trackError(function(){ return results; });
if(trackedResults === undefined){
// Sync query failed
put(loadingNode, "!");
return;
}
// Isolate the variables in case we make multiple requests
// (which can happen if we need to render on both sides of an island of already-rendered rows)
(function(loadingNode, below, keepScrollTo, results){
lastRows = Deferred.when(grid.renderArray(results, loadingNode, options), function(rows){
lastResults = results;
// can remove the loading node now
beforeNode = loadingNode.nextSibling;
put(loadingNode, "!");
if(keepScrollTo && beforeNode && beforeNode.offsetWidth){ // beforeNode may have been removed if the query results loading node was a removed as a distant node before rendering
// if the preload area above the nodes is approximated based on average
// row height, we may need to adjust the scroll once they are filled in
// so we don't "jump" in the scrolling position
var pos = grid.getScrollPosition();
grid.scrollTo({
// Since we already had to query the scroll position,
// include x to avoid TouchScroll querying it again on its end.
x: pos.x,
y: pos.y + beforeNode.offsetTop - keepScrollTo,
// Don't kill momentum mid-scroll (for TouchScroll only).
preserveMomentum: true
});
}
Deferred.when(results.total || results.length, function(total){
if(!("queryLevel" in options)){
grid._total = total;
>>>>>>>
grid._trackError(
function(){ return preload.query(options); }
).then(function(rangeCollection){
// Use function to isolate the variables in case we make multiple requests
// (which can happen if we need to render on both sides of an island of already-rendered rows)
(function(loadingNode, below, keepScrollTo, rangeCollection){
lastRows = Deferred.when(grid.renderCollection(rangeCollection, loadingNode, options), function(rows){
lastCollection = rangeCollection;
// can remove the loading node now
beforeNode = loadingNode.nextSibling;
put(loadingNode, "!");
if(keepScrollTo && beforeNode && beforeNode.offsetWidth){ // beforeNode may have been removed if the query results loading node was a removed as a distant node before rendering
// if the preload area above the nodes is approximated based on average
// row height, we may need to adjust the scroll once they are filled in
// so we don't "jump" in the scrolling position
var pos = grid.getScrollPosition();
grid.scrollTo({
// Since we already had to query the scroll position,
// include x to avoid TouchScroll querying it again on its end.
x: pos.x,
y: pos.y + beforeNode.offsetTop - keepScrollTo,
// Don't kill momentum mid-scroll (for TouchScroll only).
preserveMomentum: true
});
<<<<<<<
})(loadingNode, scrollNode, below, keepScrollTo, rangeCollection);
});
=======
// make sure we have covered the visible area
grid._processScroll();
return rows;
}, function (e) {
put(loadingNode, "!");
throw e;
});
}).call(this, loadingNode, below, keepScrollTo, results);
>>>>>>>
})(loadingNode, below, keepScrollTo, rangeCollection);
}); |
<<<<<<<
=======
user_env.METEOR_SETTINGS = fs.readFileSync(path.join(process.cwd(), 'resources', 'settings.json'), 'utf8');
console.log(path.join(process.cwd(), 'resources', 'node'));
>>>>>>>
user_env.METEOR_SETTINGS = fs.readFileSync(path.join(process.cwd(), 'resources', 'settings.json'), 'utf8'); |
<<<<<<<
var LINUX_FILENAME = OSX_OUT + '/' + BASENAME + '_' + packagejson.version + '_amd64.deb';
=======
>>>>>>>
var LINUX_FILENAME = OSX_OUT + '/' + BASENAME + '_' + packagejson.version + '_amd64.deb';
<<<<<<<
var IS_LINUX = process.platform === 'linux';
var IS_I386 = process.arch === 'ia32';
var IS_X64 = process.arch === 'x64';
var IS_DEB = fs.existsSync('/etc/lsb-release') || fs.existsSync('/etc/debian_version');
var IS_RPM = fs.existsSync('/etc/redhat-release');
var linuxpackage = null;
// linux package detection
if (IS_DEB && IS_X64) {
linuxpackage = 'electron-installer-debian:linux64';
} else if (IS_DEB && IS_I386) {
linuxpackage = 'electron-installer-debian:linux32';
LINUX_FILENAME = OSX_OUT + '/' + BASENAME + '_' + packagejson.version + '_i386.deb';
} else if (IS_RPM && IS_X64) {
linuxpackage = 'electron-installer-redhat:linux64';
LINUX_FILENAME = OSX_OUT + '/' + BASENAME + '_' + packagejson.version + '_x86_64.rpm';
} else if (IS_RPM && IS_I386) {
linuxpackage = 'electron-installer-redhat:linux32';
LINUX_FILENAME = OSX_OUT + '/' + BASENAME + '_' + packagejson.version + '_x86.rpm';
}
=======
var IS_LINUX = process.platform === 'linux';
var IS_I386 = process.arch === 'ia32';
var IS_X64 = process.arch === 'x64';
var IS_DEB = fs.existsSync('/etc/lsb-release') || fs.existsSync('/etc/debian_version');
var IS_RPM = fs.existsSync('/etc/redhat-release');
>>>>>>>
var IS_LINUX = process.platform === 'linux';
var IS_I386 = process.arch === 'ia32';
var IS_X64 = process.arch === 'x64';
var IS_DEB = fs.existsSync('/etc/lsb-release') || fs.existsSync('/etc/debian_version');
var IS_RPM = fs.existsSync('/etc/redhat-release');
var linuxpackage = null;
// linux package detection
if (IS_DEB && IS_X64) {
linuxpackage = 'electron-installer-debian:linux64';
} else if (IS_DEB && IS_I386) {
linuxpackage = 'electron-installer-debian:linux32';
LINUX_FILENAME = OSX_OUT + '/' + BASENAME + '_' + packagejson.version + '_i386.deb';
} else if (IS_RPM && IS_X64) {
linuxpackage = 'electron-installer-redhat:linux64';
LINUX_FILENAME = OSX_OUT + '/' + BASENAME + '_' + packagejson.version + '_x86_64.rpm';
} else if (IS_RPM && IS_I386) {
linuxpackage = 'electron-installer-redhat:linux32';
LINUX_FILENAME = OSX_OUT + '/' + BASENAME + '_' + packagejson.version + '_x86.rpm';
}
<<<<<<<
OSX_FILENAME_ESCAPED: OSX_FILENAME.replace(/ /g, '\\ ').replace(/\(/g, '\\(').replace(/\)/g, '\\)'),
LINUX_FILENAME: LINUX_FILENAME,
=======
OSX_FILENAME_ESCAPED: OSX_FILENAME.replace(/ /g, '\\ ').replace(/\(/g, '\\(').replace(/\)/g, '\\)'),
>>>>>>>
OSX_FILENAME_ESCAPED: OSX_FILENAME.replace(/ /g, '\\ ').replace(/\(/g, '\\(').replace(/\)/g, '\\)'),
LINUX_FILENAME: LINUX_FILENAME,
<<<<<<<
command: 'ditto -c -k --sequesterRsrc --keepParent <%= OSX_FILENAME_ESCAPED %> release/' + BASENAME + '-Mac.zip'
},
linux_npm: {
command: 'cd build && npm install --production'
},
linux_zip: {
command: 'ditto -c -k --sequesterRsrc --keepParent <%= LINUX_FILENAME %> release/' + BASENAME + '-Ubuntu.deb'
=======
command: 'ditto -c -k --sequesterRsrc --keepParent <%= OSX_FILENAME_ESCAPED %> release/' + BASENAME + '-Mac.zip'
},
linux_npm: {
command: 'cd build && npm install --production'
>>>>>>>
command: 'ditto -c -k --sequesterRsrc --keepParent <%= OSX_FILENAME_ESCAPED %> release/' + BASENAME + '-Mac.zip'
},
linux_npm: {
command: 'cd build && npm install --production'
},
linux_zip: {
command: 'ditto -c -k --sequesterRsrc --keepParent <%= LINUX_FILENAME %> release/' + BASENAME + '-Ubuntu.deb'
<<<<<<<
},
'electron-packager': {
build: {
options: {
platform: process.platform,
arch: process.arch,
dir: './build',
out: './dist/',
name: 'Kitematic',
ignore: 'bower.json',
version: packagejson['electron-version'], // set version of electron
overwrite: true
}
},
osxlnx: {
options: {
platform: 'linux',
arch: 'x64',
dir: './build',
out: './dist/',
name: 'Kitematic',
ignore: 'bower.json',
version: packagejson['electron-version'], // set version of electron
overwrite: true
}
}
},
'electron-installer-debian': {
options: {
productName: LINUX_APPNAME,
productDescription: 'Run containers through a simple, yet powerful graphical user interface.',
section: 'devel',
priority: 'optional',
icon: './util/kitematic.png',
lintianOverrides: [
'changelog-file-missing-in-native-package',
'executable-not-elf-or-script',
'extra-license-file'
],
categories: [
'Utility'
],
rename: function (dest, src) {
return LINUX_FILENAME;
}
},
linux64: {
options: {
arch: 'amd64'
},
src: './dist/Kitematic-linux-x64/',
dest: './dist/'
},
linux32: {
options: {
arch: 'i386'
},
src: './dist/Kitematic-linux-ia32/',
dest: './dist/'
}
},
'electron-installer-redhat': {
options: {
productName: LINUX_APPNAME,
productDescription: 'Run containers through a simple, yet powerful graphical user interface.',
priority: 'optional',
icon: './util/kitematic.png',
categories: [
'Utilities'
],
rename: function (dest, src) {
return LINUX_FILENAME;
}
},
linux64: {
options: {
arch: 'x86_64'
},
src: './dist/Kitematic-linux-x64/',
dest: './dist/'
},
linux32: {
options: {
arch: 'x86'
},
src: './dist/Kitematic-linux-ia32/',
dest: './dist/'
}
=======
},
'electron-packager': {
build: {
options: {
platform: process.platform,
arch: process.arch,
dir: './build',
out: './dist/',
name: 'Kitematic',
ignore: 'bower.json',
version: packagejson['electron-version'], // set version of electron
overwrite: true
}
},
osxlnx: {
options: {
platform: 'linux',
arch: 'x64',
dir: './build',
out: './dist/',
name: 'Kitematic',
ignore: 'bower.json',
version: packagejson['electron-version'], // set version of electron
overwrite: true
}
}
},
'electron-installer-debian': {
options: {
productName: LINUX_APPNAME,
productDescription: 'Run containers through a simple, yet powerful graphical user interface.',
section: 'devel',
priority: 'optional',
icon: './util/kitematic.png',
lintianOverrides: [
'changelog-file-missing-in-native-package',
'executable-not-elf-or-script',
'extra-license-file'
],
categories: [
'Utility'
],
rename: function (dest, src) {
return dest + '<%= name %>_' + packagejson.version + '-<%= revision %>_<%= arch %>.deb';
}
},
linux64: {
options: {
arch: 'amd64'
},
src: './dist/Kitematic-linux-x64/',
dest: './dist/'
},
linux32: {
options: {
arch: 'i386'
},
src: './dist/Kitematic-linux-ia32/',
dest: './dist/'
}
},
'electron-installer-redhat': {
options: {
productName: LINUX_APPNAME,
productDescription: 'Run containers through a simple, yet powerful graphical user interface.',
priority: 'optional',
icon: './util/kitematic.png',
categories: [
'Utilities'
],
rename: function (dest, src) {
return dest + '<%= name %>_' + packagejson.version + '-<%= revision %>_<%= arch %>.rpm';
}
},
linux64: {
options: {
arch: 'x86_64'
},
src: './dist/Kitematic-linux-x64/',
dest: './dist/'
},
linux32: {
options: {
arch: 'x86'
},
src: './dist/Kitematic-linux-ia32/',
dest: './dist/'
}
>>>>>>>
},
'electron-packager': {
build: {
options: {
platform: process.platform,
arch: process.arch,
dir: './build',
out: './dist/',
name: 'Kitematic',
ignore: 'bower.json',
version: packagejson['electron-version'], // set version of electron
overwrite: true
}
},
osxlnx: {
options: {
platform: 'linux',
arch: 'x64',
dir: './build',
out: './dist/',
name: 'Kitematic',
ignore: 'bower.json',
version: packagejson['electron-version'], // set version of electron
overwrite: true
}
}
},
'electron-installer-debian': {
options: {
productName: LINUX_APPNAME,
productDescription: 'Run containers through a simple, yet powerful graphical user interface.',
section: 'devel',
priority: 'optional',
icon: './util/kitematic.png',
lintianOverrides: [
'changelog-file-missing-in-native-package',
'executable-not-elf-or-script',
'extra-license-file'
],
categories: [
'Utility'
],
rename: function (dest, src) {
return LINUX_FILENAME;
}
},
linux64: {
options: {
arch: 'amd64'
},
src: './dist/Kitematic-linux-x64/',
dest: './dist/'
},
linux32: {
options: {
arch: 'i386'
},
src: './dist/Kitematic-linux-ia32/',
dest: './dist/'
}
},
'electron-installer-redhat': {
options: {
productName: LINUX_APPNAME,
productDescription: 'Run containers through a simple, yet powerful graphical user interface.',
priority: 'optional',
icon: './util/kitematic.png',
categories: [
'Utilities'
],
rename: function (dest, src) {
return LINUX_FILENAME;
}
},
linux64: {
options: {
arch: 'x86_64'
},
src: './dist/Kitematic-linux-x64/',
dest: './dist/'
},
linux32: {
options: {
arch: 'x86'
},
src: './dist/Kitematic-linux-ia32/',
dest: './dist/'
}
<<<<<<<
if (!IS_WINDOWS && !IS_LINUX) {
grunt.registerTask('release', ['clean:release', 'babel', 'less', 'copy:dev', 'electron', 'copy:osx', 'shell:sign', 'shell:zip', 'copy:windows', 'rcedit:exes', 'shell:linux_npm', 'electron-packager:osxlnx', 'electron-installer-debian:linux64', 'shell:linux_zip']);
}else if (IS_LINUX) {
if (linuxpackage) {
grunt.registerTask('release', ['clean:release', 'babel', 'less', 'copy:dev', 'shell:linux_npm', 'electron-packager:build', linuxpackage]);
}else {
grunt.log.errorlns('Your Linux distribution is not yet supported - arch:' + process.arch + ' platform:' + process.platform);
}
=======
if (!IS_WINDOWS && !IS_LINUX) {
grunt.registerTask('release', ['clean:release', 'babel', 'less', 'copy:dev', 'electron', 'copy:osx', 'shell:sign', 'shell:zip', 'copy:windows', 'rcedit:exes', 'compress', 'shell:linux_npm', 'electron-packager:osxlnx', 'electron-installer-debian:linux64']);
}else if (IS_LINUX) {
var linuxpackage = null;
// linux package detection
if (IS_DEB && IS_X64) {
linuxpackage = 'electron-installer-debian:linux64';
} else if (IS_DEB && IS_I386) {
linuxpackage = 'electron-installer-debian:linux32';
} else if (IS_RPM && IS_X64) {
linuxpackage = 'electron-installer-redhat:linux64';
}else if (IS_RPM && IS_I386) {
linuxpackage = 'electron-installer-redhat:linux32';
}
if (linuxpackage) {
grunt.registerTask('release', ['clean:release', 'babel', 'less', 'copy:dev', 'shell:linux_npm', 'electron-packager:build', linuxpackage]);
}else {
grunt.log.errorlns('Your Linux distribution is not yet supported - arch:' + process.arch + ' platform:' + process.platform);
}
>>>>>>>
if (!IS_WINDOWS && !IS_LINUX) {
grunt.registerTask('release', ['clean:release', 'babel', 'less', 'copy:dev', 'electron', 'copy:osx', 'shell:sign', 'shell:zip', 'copy:windows', 'rcedit:exes', 'compress', 'shell:linux_npm', 'electron-packager:osxlnx', 'electron-installer-debian:linux64', 'shell:linux_zip']);
}else if (IS_LINUX) {
if (linuxpackage) {
grunt.registerTask('release', ['clean:release', 'babel', 'less', 'copy:dev', 'shell:linux_npm', 'electron-packager:build', linuxpackage]);
}else {
grunt.log.errorlns('Your Linux distribution is not yet supported - arch:' + process.arch + ' platform:' + process.platform);
} |
<<<<<<<
=======
Meteor.call('recoverApps');
>>>>>>>
Meteor.call('recoverApps'); |
<<<<<<<
volumes: {}
=======
popoverVolumeOpen: false,
popoverViewOpen: false,
>>>>>>>
volumes: {}
<<<<<<<
=======
var $viewDropdown = $(this.getDOMNode()).find('.dropdown-view > .icon-dropdown');
var $volumeDropdown = $(this.getDOMNode()).find('.dropdown-volume');
var $viewPopover = $(this.getDOMNode()).find('.popover-view');
var $volumePopover = $(this.getDOMNode()).find('.popover-volume');
if ($viewDropdown.offset()) {
$viewPopover.offset({
top: $viewDropdown.offset().top + 27,
left: $viewDropdown.offset().left - ($viewPopover.outerWidth() / 2) + 5
});
}
if ($volumeDropdown.offset()) {
$volumePopover.offset({
top: $volumeDropdown.offset().top + 33,
left: $volumeDropdown.offset().left + $volumeDropdown.outerWidth() - $volumePopover.outerWidth() / 2 - 20
});
}
>>>>>>>
<<<<<<<
=======
handleChangeDefaultPort: function (port, e) {
if (e.target.checked) {
this.setState({
defaultPort: null
});
} else {
this.setState({
defaultPort: port
});
}
},
handleViewDropdown: function(e) {
this.setState({
popoverViewOpen: !this.state.popoverViewOpen
});
},
handleVolumeDropdown: function(e) {
var self = this;
if (_.keys(this.props.container.Volumes).length) {
exec(['open', path.join(process.env.HOME, 'Kitematic', self.props.container.Name)], function (err) {
if (err) { throw err; }
});
}
},
handleChooseVolumeClick: function (dockerVol) {
var self = this;
dialog.showOpenDialog({properties: ['openDirectory', 'createDirectory']}, function (filenames) {
if (!filenames) {
return;
}
var directory = filenames[0];
if (directory) {
var volumes = _.clone(self.props.container.Volumes);
volumes[dockerVol] = directory;
var binds = _.pairs(volumes).map(function (pair) {
return pair[1] + ':' + pair[0];
});
ContainerStore.updateContainer(self.props.container.Name, {
Binds: binds
}, function (err) {
if (err) console.log(err);
});
}
});
},
handleOpenVolumeClick: function (path) {
exec(['open', path], function (err) {
if (err) { throw err; }
});
},
>>>>>>>
handleChangeDefaultPort: function (port, e) {
if (e.target.checked) {
this.setState({
defaultPort: null
});
} else {
this.setState({
defaultPort: port
});
}
},
handleChooseVolumeClick: function (dockerVol) {
var self = this;
dialog.showOpenDialog({properties: ['openDirectory', 'createDirectory']}, function (filenames) {
if (!filenames) {
return;
}
var directory = filenames[0];
if (directory) {
var volumes = _.clone(self.props.container.Volumes);
volumes[dockerVol] = directory;
var binds = _.pairs(volumes).map(function (pair) {
return pair[1] + ':' + pair[0];
});
ContainerStore.updateContainer(self.props.container.Name, {
Binds: binds
}, function (err) {
if (err) { console.log(err); }
});
}
});
},
handleOpenVolumeClick: function (path) {
exec(['open', path], function (err) {
if (err) { throw err; }
});
},
<<<<<<<
=======
var dropdownClasses = {
btn: true,
'btn-action': true,
'with-icon': true,
'dropdown-toggle': true,
disabled: !this.props.container.State.Running
};
var dropdownViewButtonClass = React.addons.classSet(assign({'dropdown-view': true}, dropdownClasses));
>>>>>>>
<<<<<<<
<div className="settings-section">
<h3>Container Name</h3>
<div className="container-name">
<input id="input-container-name" type="text" className="line" placeholder="Container Name" defaultValue={this.props.container.Name}></input>
</div>
<a className="btn btn-action" onClick={this.handleSaveContainerName}>Save</a>
=======
{rename}
<h3>Environment Variables</h3>
<div className="env-vars-labels">
<div className="label-key">KEY</div>
<div className="label-val">VALUE</div>
>>>>>>>
{rename}
<div className="settings-section">
<h3>Environment Variables</h3>
<div className="env-vars-labels">
<div className="label-key">KEY</div>
<div className="label-val">VALUE</div>
</div>
<div className="env-vars">
{envVars}
{pendingEnvVars}
<div className="keyval-row">
<input id="new-env-key" type="text" className="key line"></input>
<input id="new-env-val" type="text" className="val line"></input>
<a onClick={this.handleAddPendingEnvVar} className="only-icon btn btn-positive small"><span className="icon icon-add-1"></span></a>
</div>
</div>
<a className="btn btn-action" onClick={this.handleSaveEnvVar}>Save</a>
<<<<<<<
<div className="details-subheader-tabs">
<span className={tabHomeClasses} onClick={this.showHome}>Home</span>
<span className={tabLogsClasses} onClick={this.showLogs}>Logs</span>
<span className={tabSettingsClasses} onClick={this.showSettings}>Settings</span>
</div>
=======
<Popover className={popoverViewClasses} placement="bottom">
<div className="table ports">
<div className="table-labels">
<div className="label-left">DOCKER PORT</div>
<div className="label-right">MAC PORT</div>
</div>
{ports}
</div>
</Popover>
<Popover className={popoverVolumeClasses} placement="bottom">
<div className="table volumes">
<div className="table-labels">
<div className="label-left">DOCKER VOLUME</div>
<div className="label-right">MAC FOLDER</div>
</div>
{volumes}
</div>
</Popover>
>>>>>>>
<div className="details-subheader-tabs">
<span className={tabHomeClasses} onClick={this.showHome}>Home</span>
<span className={tabLogsClasses} onClick={this.showLogs}>Logs</span>
<span className={tabSettingsClasses} onClick={this.showSettings}>Settings</span>
</div> |
<<<<<<<
=======
require.main.paths.splice(0, 0, process.env.NODE_PATH);
>>>>>>>
require.main.paths.splice(0, 0, process.env.NODE_PATH);
<<<<<<<
SetupStore.run().then(boot2docker.ip).then(ip => {
docker.setHost(ip);
ContainerStore.init(function (err) {
if (err) { console.log(err); }
router.transitionTo('containers');
=======
router.run(function (Handler) {
React.render(<Handler/>, document.body);
});
SetupStore.run(function (err) {
if (err) { console.log(err); }
boot2docker.ip(function (err, ip) {
if (err) { console.log(err); }
docker.setHost(ip);
router.transitionTo('containers');
ContainerStore.init(function (err) {
if (err) { console.log(err); }
});
>>>>>>>
SetupStore.run().then(boot2docker.ip).then(ip => {
docker.setHost(ip);
ContainerStore.init(function (err) {
if (err) { console.log(err); }
router.transitionTo('containers');
<<<<<<<
console.log('Skipping installer.');
router.transitionTo('containers');
boot2docker.ip().then(ip => {
=======
router.run(function (Handler) {
React.render(<Handler/>, document.body);
});
boot2docker.ip(function (err, ip) {
if (err) { console.log(err); }
>>>>>>>
console.log('Skipping installer.');
router.transitionTo('containers');
boot2docker.ip().then(ip => { |
<<<<<<<
=======
require.main.paths.splice(0, 0, process.env.NODE_PATH);
>>>>>>>
require.main.paths.splice(0, 0, process.env.NODE_PATH);
<<<<<<<
SetupStore.run().then(boot2docker.ip).then(ip => {
docker.setHost(ip);
ContainerStore.init(function (err) {
if (err) { console.log(err); }
router.transitionTo('containers');
=======
router.run(function (Handler) {
React.render(<Handler/>, document.body);
});
SetupStore.run(function (err) {
if (err) { console.log(err); }
boot2docker.ip(function (err, ip) {
if (err) { console.log(err); }
docker.setHost(ip);
router.transitionTo('containers');
ContainerStore.init(function (err) {
if (err) { console.log(err); }
});
>>>>>>>
SetupStore.run().then(boot2docker.ip).then(ip => {
docker.setHost(ip);
ContainerStore.init(function (err) {
if (err) { console.log(err); }
router.transitionTo('containers');
<<<<<<<
console.log('Skipping installer.');
router.transitionTo('containers');
boot2docker.ip().then(ip => {
=======
router.run(function (Handler) {
React.render(<Handler/>, document.body);
});
boot2docker.ip(function (err, ip) {
if (err) { console.log(err); }
>>>>>>>
console.log('Skipping installer.');
router.transitionTo('containers');
boot2docker.ip().then(ip => { |
<<<<<<<
var mainWindow = new BrowserWindow(windowOptions);
=======
mainWindow = new BrowserWindow({
width: 1000,
height: 700,
'min-width': 1000,
'min-height': 700,
resizable: true,
frame: false,
show: false
});
var saveVMOnQuit = false;
>>>>>>>
var mainWindow = new BrowserWindow(windowOptions);
var saveVMOnQuit = false;
<<<<<<<
mainWindow.loadUrl('file://' + __dirname + '/../build/index.html');
app.on('will-quit', function () {
=======
mainWindow.loadUrl(path.normalize('file://' + path.join(__dirname, '..', 'build/index.html')));
app.on('will-quit', function (e) {
>>>>>>>
mainWindow.loadUrl(path.normalize('file://' + path.join(__dirname, '..', 'build/index.html')));
app.on('will-quit', function () { |
<<<<<<<
Boot2Docker = {};
Boot2Docker.REQUIRED_IP = '192.168.60.103';
Boot2Docker.exec = function (command, callback) {
exec(path.join(getBinDir(), 'boot2docker') + ' ' + command, function(err, stdout, stderr) {
callback(err, stdout, stderr);
});
};
Boot2Docker.exists = function (callback) {
this.exec('info', function (err) {
if (err) {
callback(null, false);
} else {
callback(null, true);
}
});
};
Boot2Docker.stop = function (callback) {
this.exec('stop', function (err, stdout) {
if (err) {
callback(err);
} else {
callback(null);
}
});
};
Boot2Docker.erase = function (callback) {
var VMFileLocation = path.join(getHomePath(), 'VirtualBox\\ VMs/boot2docker-vm');
exec('rm -rf ' + VMFileLocation, function (err) {
callback(err);
});
};
Boot2Docker.upgrade = function (callback) {
var self = this;
self.stop(function (err) {
self.exec('upgrade', function (err, stdout) {
callback(err);
});
=======
boot2dockerexec = function (command, callback) {
exec(path.join(Util.getBinDir(), 'boot2docker') + ' ' + command, function(err, stdout) {
callback(err, stdout);
>>>>>>>
Boot2Docker = {};
Boot2Docker.REQUIRED_IP = '192.168.60.103';
Boot2Docker.exec = function (command, callback) {
exec(path.join(Util.getBinDir(), 'boot2docker') + ' ' + command, function(err, stdout, stderr) {
callback(err, stdout, stderr);
});
};
Boot2Docker.exists = function (callback) {
this.exec('info', function (err) {
if (err) {
callback(null, false);
} else {
callback(null, true);
}
});
};
Boot2Docker.stop = function (callback) {
this.exec('stop', function (err, stdout) {
if (err) {
callback(err);
} else {
callback(null);
}
});
};
Boot2Docker.erase = function (callback) {
var VMFileLocation = path.join(getHomePath(), 'VirtualBox\\ VMs/boot2docker-vm');
exec('rm -rf ' + VMFileLocation, function (err) {
callback(err);
});
};
Boot2Docker.upgrade = function (callback) {
var self = this;
self.stop(function (err) {
self.exec('upgrade', function (err, stdout) {
callback(err);
});
<<<<<<<
/**
* Get the VM's version.
* Node that this only works if the VM is up and running.
*/
Boot2Docker.vmVersion = function (callback) {
this.exec('ssh "cat /etc/version', function (err, stdout, stderr) {
=======
boot2DockerVMExists = function (callback) {
boot2dockerexec('info', function (err) {
if (err) {
callback(null, false);
} else {
callback(null, true);
}
});
};
eraseBoot2DockerVMFiles = function (callback) {
var VMFileLocation = path.join(Util.getHomePath(), 'VirtualBox\\ VMs/boot2docker-vm');
exec('rm -rf ' + VMFileLocation, function (err) {
callback(err);
});
};
initBoot2Docker = function (callback) {
isVirtualBoxInstalled(function (err, installed) {
>>>>>>>
/**
* Get the VM's version.
* Node that this only works if the VM is up and running.
*/
Boot2Docker.vmVersion = function (callback) {
this.exec('ssh "cat /etc/version', function (err, stdout, stderr) {
<<<<<<<
Boot2Docker.version = function (callback) {
this.exec('version', function (err, stdout, stderr) {
=======
upgradeBoot2Docker = function (callback) {
boot2dockerexec('upgrade', function (err, stdout) {
console.log(stdout);
callback(err);
});
};
installBoot2DockerAddons = function (callback) {
exec('/bin/cat ' + path.join(Util.getBinDir(), 'kite-binaries.tar.gz') + ' | ' + path.join(Util.getBinDir(), 'boot2docker') + ' ssh "tar zx -C /usr/local/bin"', function (err, stdout) {
console.log(stdout);
callback(err);
});
boot2dockerexec('ssh "sudo ifconfig eth1 192.168.59.103 netmask 255.255.255.0"', function (err, stdout) {});
exec('VBoxManage dhcpserver remove --netname HostInterfaceNetworking-vboxnet0', function (err, stdout) {});
};
startBoot2Docker = function (callback) {
isVirtualBoxInstalled(function (err, installed) {
>>>>>>>
Boot2Docker.version = function (callback) {
this.exec('version', function (err, stdout, stderr) { |
<<<<<<<
var shell = require('shell');
var resources = require('./Resources');
=======
var classNames = require('classNames');
>>>>>>>
var shell = require('shell');
var resources = require('./Resources');
var classNames = require('classNames'); |
<<<<<<<
tags: {},
results: _recommended
=======
results: _recommended
>>>>>>>
results: _recommended
<<<<<<<
handleClick: function (name) {
ContainerStore.create(name, 'latest', function (err) {
if (err) {
throw err;
}
$(document.body).find('.new-container-item').parent().fadeOut();
}.bind(this));
},
handleDropdownClick: function (name) {
if (this.state.tags[name]) {
return;
}
$.get('https://registry.hub.docker.com/v1/repositories/' + name + '/tags', function (result) {
var res = {};
res[name] = result;
this.setState({
tags: assign(this.state.tags, res)
});
}.bind(this));
},
=======
>>>>>>> |
<<<<<<<
<Router.Link tabIndex="-1" to="new">
<span className="btn btn-new btn-action has-icon btn-hollow"><span className="icon icon-add"></span>New</span>
=======
<Router.Link to="new">
<span className="btn-new icon icon-add-3"></span>
>>>>>>>
<Router.Link to="new">
<span className="btn btn-new btn-action has-icon btn-hollow"><span className="icon icon-add"></span>New</span> |
<<<<<<<
var homeDir = process.env.HOME;
if(util.isWindows()) {
homeDir = util.windowsToLinuxPath(homeDir);
}
=======
>>>>>>>
var homeDir = process.env.HOME;
if(util.isWindows()) {
homeDir = util.windowsToLinuxPath(homeDir);
}
<<<<<<<
<div className="table volumes">
<div className="table-labels">
<div className="label-left">DOCKER FOLDER</div>
<div className="label-right">LOCAL FOLDER</div>
</div>
{volumes}
</div>
=======
<table className="table volumes">
<thead>
<tr>
<th>DOCKER FOLDER</th>
<th>MAC FOLDER</th>
<th></th>
</tr>
</thead>
<tbody>
{volumes}
</tbody>
</table>
>>>>>>>
<table className="table volumes">
<thead>
<tr>
<th>DOCKER FOLDER</th>
<th>MAC FOLDER</th>
<th></th>
</tr>
</thead>
<tbody>
{volumes}
</tbody>
</table> |
<<<<<<<
}while(preload && !preload.node.offsetParent); // skip past preloads that are not currently connected
}else if(visibleTop - mungeAmount - searchBuffer > (preloadTop + (preloadHeight = preloadNode.offsetHeight))){
=======
}while(preload && !preload.node.offsetWidth); // skip past preloads that are not currently connected
}else if(visibleTop - mungeAmount > (preloadTop + (preloadHeight = preloadNode.offsetHeight))){
>>>>>>>
}while(preload && !preload.node.offsetWidth); // skip past preloads that are not currently connected
}else if(visibleTop - mungeAmount - searchBuffer > (preloadTop + (preloadHeight = preloadNode.offsetHeight))){ |
<<<<<<<
this.objMarkerSC == undefined;
=======
this.objMarkerSC = new ObjectMarker();
// pin image를 그림
// api.getIssueId(),
// api.getDataKey(),
// api.getLatitude()),
// api.getLongitude()),
// api.getElevation()),
>>>>>>>
this.objMarkerSC = new ObjectMarker(); |
<<<<<<<
//this.dateSC = new Date();
//this.startTimeSC = this.dateSC.getTime();
//this.currentTimeSC;
//var secondsUsed;
=======
this.dateSC = new Date();
this.startTimeSC = this.dateSC.getTime();
this.currentTimeSC;
>>>>>>>
//this.dateSC = new Date();
//this.startTimeSC = this.dateSC.getTime();
//this.currentTimeSC;
//var secondsUsed;
<<<<<<<
visibleIndices_count = neoRefList.neoRefs_Array.length; // TEST******************************
if(f4d_manager.isCameraMoving)// && !isInterior && f4d_manager.isCameraInsideBuilding)
=======
//visibleIndices_count = neoRefList.neoRefs_Array.length; // TEST******************************
if(magoManager.isCameraMoving)// && !isInterior && magoManager.isCameraInsideBuilding)
>>>>>>>
visibleIndices_count = neoRefList.neoRefs_Array.length; // TEST******************************
//visibleIndices_count = neoRefList.neoRefs_Array.length; // TEST******************************
if(f4d_manager.isCameraMoving)// && !isInterior && f4d_manager.isCameraInsideBuilding)
<<<<<<<
for(var k=0; k<visibleIndices_count; k++)
{
//if(f4d_manager.isCameraMoving && isInterior && timeControlCounter == 0)
if(f4d_manager.isCameraMoving && timeControlCounter == 0)
{
//if(j==4)return;
//this.dateSC = new Date();
//this.currentTimeSC = this.dateSC.getTime();
//secondsUsed = this.currentTimeSC - this.startTimeSC;
//if(secondsUsed > 600) // miliseconds.***
{
//GL.disableVertexAttribArray(standardShader.normal3_loc);
//GL.disableVertexAttribArray(standardShader.position3_loc);
//GL.disableVertexAttribArray(standardShader.texCoord2_loc);
//return;
}
}
//var neoReference = neoRefList.neoRefs_Array[neoRefList._currentVisibleIndices[k]]; // good.***
var neoReference = neoRefList.neoRefs_Array[k]; // TEST.***
if(!neoReference || neoReference== undefined)
{
=======
for(var k=0; k<visibleIndices_count; k++) {
//if(magoManager.isCameraMoving && isInterior && timeControlCounter == 0)
// if(magoManager.isCameraMoving && timeControlCounter == 0) {
// //if(j==4)return;
//
// //this.dateSC = new Date();
// //this.currentTimeSC = this.dateSC.getTime();
// //secondsUsed = this.currentTimeSC - this.startTimeSC;
// //if(secondsUsed > 600) // miliseconds.***
// {
// //gl.disableVertexAttribArray(standardShader.normal3_loc);
// //gl.disableVertexAttribArray(standardShader.position3_loc);
// //gl.disableVertexAttribArray(standardShader.texCoord2_loc);
// //return;
// }
// }
var neoReference = neoRefList.neoRefs_Array[neoRefList._currentVisibleIndices[k]]; // good.***
//var neoReference = neoRefList.neoRefs_Array[k]; // TEST.***
if(!neoReference || neoReference== undefined) {
>>>>>>>
for(var k=0; k<visibleIndices_count; k++)
{
//if(f4d_manager.isCameraMoving && isInterior && timeControlCounter == 0)
if(f4d_manager.isCameraMoving && timeControlCounter == 0)
{
//if(j==4)return;
//this.dateSC = new Date();
//this.currentTimeSC = this.dateSC.getTime();
//secondsUsed = this.currentTimeSC - this.startTimeSC;
//if(secondsUsed > 600) // miliseconds.***
{
//GL.disableVertexAttribArray(standardShader.normal3_loc);
//GL.disableVertexAttribArray(standardShader.position3_loc);
//GL.disableVertexAttribArray(standardShader.texCoord2_loc);
//return;
}
}
//var neoReference = neoRefList.neoRefs_Array[neoRefList._currentVisibleIndices[k]]; // good.***
var neoReference = neoRefList.neoRefs_Array[k]; // TEST.***
if(!neoReference || neoReference== undefined)
{
<<<<<<<
for(var n=0; n<cacheKeys_count; n++) // Original.***
{
//var mesh_array = block._vi_arrays_Container._meshArrays[n];
this.vbo_vi_cacheKey_aux = block._vbo_VertexIdx_CacheKeys_Container._vbo_cacheKeysArray[n];
//****************************************************************************************************AAA
if(this.vbo_vi_cacheKey_aux.MESH_VERTEX_cacheKey == undefined)
{
if(this.vbo_vi_cacheKey_aux.pos_vboDataArray == undefined)
continue;
this.vbo_vi_cacheKey_aux.MESH_VERTEX_cacheKey = GL.createBuffer ();
GL.bindBuffer(GL.ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.MESH_VERTEX_cacheKey);
GL.bufferData(GL.ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.pos_vboDataArray, GL.STATIC_DRAW);
this.vbo_vi_cacheKey_aux.pos_vboDataArray = [];
this.vbo_vi_cacheKey_aux.pos_vboDataArray = null;
continue;
}
if(this.vbo_vi_cacheKey_aux.MESH_NORMAL_cacheKey == undefined)
{
if(this.vbo_vi_cacheKey_aux.nor_vboDataArray == undefined)
continue;
this.vbo_vi_cacheKey_aux.MESH_NORMAL_cacheKey = GL.createBuffer ();
GL.bindBuffer(GL.ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.MESH_NORMAL_cacheKey);
GL.bufferData(GL.ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.nor_vboDataArray, GL.STATIC_DRAW);
this.vbo_vi_cacheKey_aux.nor_vboDataArray = [];
this.vbo_vi_cacheKey_aux.nor_vboDataArray = null;
continue;
}
if(this.vbo_vi_cacheKey_aux.MESH_FACES_cacheKey == undefined)
{
if(this.vbo_vi_cacheKey_aux.idx_vboDataArray == undefined)
continue;
this.vbo_vi_cacheKey_aux.MESH_FACES_cacheKey = GL.createBuffer ();
GL.bindBuffer(GL.ELEMENT_ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.MESH_FACES_cacheKey);
GL.bufferData(GL.ELEMENT_ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.idx_vboDataArray, GL.STATIC_DRAW);
this.vbo_vi_cacheKey_aux.idx_vboDataArray = [];
this.vbo_vi_cacheKey_aux.idx_vboDataArray = null;
continue;
}
//if(this.vbo_vi_cacheKey_aux.MESH_VERTEX_cacheKey == undefined || this.vbo_vi_cacheKey_aux.MESH_NORMAL_cacheKey == undefined || this.vbo_vi_cacheKey_aux.MESH_FACES_cacheKey == undefined)
// continue;
//----------------------------------------------------------------------------------------------------AAA
// Positions.***
GL.bindBuffer(GL.ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.MESH_VERTEX_cacheKey);
GL.vertexAttribPointer(standardShader.position3_loc, 3, GL.FLOAT, false,0,0);
=======
if(this.vboViCacheKeyAux.MESH_FACES_cacheKey == undefined) {
if(this.vboViCacheKeyAux.idx_vboDataArray == undefined) continue;
this.vboViCacheKeyAux.MESH_FACES_cacheKey = gl.createBuffer ();
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.vboViCacheKeyAux.MESH_FACES_cacheKey);
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.vboViCacheKeyAux.idx_vboDataArray, gl.STATIC_DRAW);
//this.vboViCacheKeyAux.indices_count = this.vboViCacheKeyAux.idx_vboDataArray.length;
this.vboViCacheKeyAux.idx_vboDataArray = [];
this.vboViCacheKeyAux.idx_vboDataArray = null;
continue;
}
>>>>>>>
for(var n=0; n<cacheKeys_count; n++) // Original.***
{
//var mesh_array = block._vi_arrays_Container._meshArrays[n];
this.vbo_vi_cacheKey_aux = block._vbo_VertexIdx_CacheKeys_Container._vbo_cacheKeysArray[n];
//****************************************************************************************************AAA
if(this.vbo_vi_cacheKey_aux.MESH_VERTEX_cacheKey == undefined)
{
if(this.vbo_vi_cacheKey_aux.pos_vboDataArray == undefined)
continue;
this.vbo_vi_cacheKey_aux.MESH_VERTEX_cacheKey = gl.createBuffer ();
gl.bindBuffer(gl.ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.MESH_VERTEX_cacheKey);
gl.bufferData(gl.ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.pos_vboDataArray, gl.STATIC_DRAW);
this.vbo_vi_cacheKey_aux.pos_vboDataArray = [];
this.vbo_vi_cacheKey_aux.pos_vboDataArray = null;
continue;
}
if(this.vbo_vi_cacheKey_aux.MESH_NORMAL_cacheKey == undefined)
{
if(this.vbo_vi_cacheKey_aux.nor_vboDataArray == undefined)
continue;
this.vbo_vi_cacheKey_aux.MESH_NORMAL_cacheKey = gl.createBuffer ();
gl.bindBuffer(gl.ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.MESH_NORMAL_cacheKey);
gl.bufferData(gl.ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.nor_vboDataArray, gl.STATIC_DRAW);
this.vbo_vi_cacheKey_aux.nor_vboDataArray = [];
this.vbo_vi_cacheKey_aux.nor_vboDataArray = null;
continue;
}
if(this.vbo_vi_cacheKey_aux.MESH_FACES_cacheKey == undefined)
{
if(this.vbo_vi_cacheKey_aux.idx_vboDataArray == undefined)
continue;
this.vbo_vi_cacheKey_aux.MESH_FACES_cacheKey = gl.createBuffer ();
gl.bindBuffer(gl.ELEMENT_ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.MESH_FACES_cacheKey);
gl.bufferData(gl.ELEMENT_ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.idx_vboDataArray, gl.STATIC_DRAW);
this.vbo_vi_cacheKey_aux.idx_vboDataArray = [];
this.vbo_vi_cacheKey_aux.idx_vboDataArray = null;
continue;
}
//if(this.vbo_vi_cacheKey_aux.MESH_VERTEX_cacheKey == undefined || this.vbo_vi_cacheKey_aux.MESH_NORMAL_cacheKey == undefined || this.vbo_vi_cacheKey_aux.MESH_FACES_cacheKey == undefined)
// continue;
//----------------------------------------------------------------------------------------------------AAA
// Positions.***
gl.bindBuffer(gl.ARRAY_BUFFER, this.vbo_vi_cacheKey_aux.MESH_VERTEX_cacheKey);
gl.vertexAttribPointer(standardShader.position3_loc, 3, gl.FLOAT, false,0,0);
<<<<<<<
//timeControlCounter++;
//if(timeControlCounter > 20)
// timeControlCounter = 0;
=======
}
timeControlCounter++;
if(timeControlCounter > 20) timeControlCounter = 0;
>>>>>>>
//timeControlCounter++;
//if(timeControlCounter > 20)
// timeControlCounter = 0; |
<<<<<<<
/**
* This has "VertexIdxVBOArraysContainer" because the "indices" cannot to be greater than 65000, because indices are short type.
* Change this for "vbo_VertexIdx_CacheKeys_Container__idx"
* @type {VBOVertexIdxCacheKeysContainer}
*/
this.vBOVertexIdxCacheKeysContainer = new VBOVertexIdxCacheKeysContainer();
/**
* @deprecated
* @type {number}
* @default -1
*/
=======
// This has "VertexIdxVBOArraysContainer" because the "indices" cannot to be greater than 65000, because indices are short type.
this.vBOVertexIdxCacheKeysContainer = new VBOVertexIdxCacheKeysContainer(); // Change this for "vbo_VertexIdx_CacheKeys_Container__idx".
>>>>>>>
/**
* This has "VertexIdxVBOArraysContainer" because the "indices" cannot to be greater than 65000, because indices are short type.
* Change this for "vbo_VertexIdx_CacheKeys_Container__idx"
* @type {VBOVertexIdxCacheKeysContainer}
*/
this.vBOVertexIdxCacheKeysContainer = new VBOVertexIdxCacheKeysContainer();
/**
* @deprecated
* @type {number}
* @default -1
*/
<<<<<<<
/**
* BlocksArrayPartition 리스트 관련 변수들.
* f4d 버전 0.0.2 이후 부터 사용 계획있음 현재는 개발중
*/
=======
// v002.
>>>>>>>
/**
* BlocksArrayPartition 리스트 관련 변수들.
* f4d 버전 0.0.2 이후 부터 사용 계획있음 현재는 개발중
*/
<<<<<<<
=======
// test.
if (vboDatasCount > 12)
{ var hola = 0; }
>>>>>>> |
<<<<<<<
var row = currentTarget,
lastRow = this._lastSelected;
//console.log("in focus; event: ", event, "; row: ", row);
if(mode == "single"){
=======
var row = event.target, lastRow = this._lastRow;
if(mode == "single" && lastRow && event.ctrlKey){
// allow deselection even within single select mode
this.deselect(lastRow);
>>>>>>>
var row = currentTarget,
lastRow = this._lastSelected;
if(mode == "single"){ |
<<<<<<<
grid.setDirty(row.id, column.field, value);
// perform auto-save (if applicable) in next tick to avoid
// unintentional mishaps due to order of handler execution
column.autoSave && setTimeout(function(){ grid._trackError("save"); }, 0);
=======
grid.updateDirty(row.id, column.field, value);
column.autoSave && grid._trackError("save");
>>>>>>>
grid.updateDirty(row.id, column.field, value);
// perform auto-save (if applicable) in next tick to avoid
// unintentional mishaps due to order of handler execution
column.autoSave && setTimeout(function(){ grid._trackError("save"); }, 0); |
<<<<<<<
"*://chatclient.venew.io",
"*://api.venyoo.ru/*",
=======
"*://d1fw6d83a3emwv.cloudfront.net/bot/prod/js/web-chan.js",
"*://cdn.bitrix24.kz/*",
"*://live.vnpgroup.net/js/*",
"*://crm.digtlab.ru/upload/*",
"*://me-talk.ru/support/*",
"*://cdn-app.continual.ly/js/embed/continually-embed.latest.min.js",
"*://corp.aquadom.info/upload/crm/site_button/loader_1_lue57s.js*",
"*://lawbook.online/chat.js*",
"*://static.parastorage.com/services/chat-widget/*",
"*://service.giosg.com/*",
"*://chatbox.cuuma.fi/*",
"*://envybox.io/*",
>>>>>>>
"*://chatclient.venew.io",
"*://api.venyoo.ru/*",
"*://d1fw6d83a3emwv.cloudfront.net/bot/prod/js/web-chan.js",
"*://cdn.bitrix24.kz/*",
"*://live.vnpgroup.net/js/*",
"*://crm.digtlab.ru/upload/*",
"*://me-talk.ru/support/*",
"*://cdn-app.continual.ly/js/embed/continually-embed.latest.min.js",
"*://corp.aquadom.info/upload/crm/site_button/loader_1_lue57s.js*",
"*://lawbook.online/chat.js*",
"*://static.parastorage.com/services/chat-widget/*",
"*://service.giosg.com/*",
"*://chatbox.cuuma.fi/*",
"*://envybox.io/*", |
<<<<<<<
this.getPriceTicker();
this.setHeader();
=======
>>>>>>>
this.setHeader();
<<<<<<<
const listContent = theme === 'list' ? (
<Transactions
type='home'
transactions={transactions}
footer={footer}
navigate={navigation.navigate}
account={account}
/>
) : <Empty />;
const listElements = theme === 'list' ? [
...transactions.pending, ...transactions.confirmed,
] : ['emptyState'];
=======
const listElements = transactions.count > 0 ?
[...transactions.pending, ...transactions.confirmed] :
['emptyState'];
>>>>>>>
const listElements = transactions.count > 0 ?
[...transactions.pending, ...transactions.confirmed] :
['emptyState']; |
<<<<<<<
<View style={styles.footer}>
<View style={styles.switchContainer}>
<Switch
height={26}
width={43}
onSyncPress={this.confirm}
backgroundActive={colors.light.ultramarineBlue}
backgroundInactive={colors.light.platinum}
/>
<P style={styles.confirmText}>{t('I understand that it’s my responsibility to keep my passphrase safe.')}</P>
</View>
<View>
<PrimaryButton
disabled={!this.state.confirmed}
testID="registerSafeKeepingButton"
style={styles.button}
noTheme={true}
onClick={this.forward}
title={t('I wrote it down')} />
</View>
=======
</View>
<View style={styles.footer}>
<View style={styles.switchContainer}>
<Switch
testID="understandResponsibilitySwitch"
height={26}
width={43}
onSyncPress={this.confirm}
backgroundActive={colors.light.ultramarineBlue}
backgroundInactive={colors.light.platinum}
/>
<P style={styles.confirmText}>{t('I understand that it’s my responsibility to keep my passphrase safe.')}</P>
</View>
<View style={styles.buttonWrapper}>
<PrimaryButton
disabled={!this.state.confirmed}
testID="safeKeepingButton"
style={styles.button}
noTheme={true}
onClick={this.forward}
title={t('I wrote it down')} />
>>>>>>>
<View style={styles.footer}>
<View style={styles.switchContainer}>
<Switch
testID="understandResponsibilitySwitch"
height={26}
width={43}
onSyncPress={this.confirm}
backgroundActive={colors.light.ultramarineBlue}
backgroundInactive={colors.light.platinum}
/>
<P style={styles.confirmText}>{t('I understand that it’s my responsibility to keep my passphrase safe.')}</P>
</View>
<View>
<PrimaryButton
disabled={!this.state.confirmed}
testID="registerSafeKeepingButton"
style={styles.button}
noTheme={true}
onClick={this.forward}
title={t('I wrote it down')} />
</View> |
<<<<<<<
title: <Logo color={colors.white}/>,
headerLeft: null,
=======
title: <Logo />,
>>>>>>>
headerLeft: null,
title: <Logo />, |
<<<<<<<
state = {
secondPassphrase: {
value: '',
validity: [],
},
};
=======
constructor(props) {
super(props);
this.state = {
secondPassphrase: {
value: '',
validity: validatePassphrase(''),
buttonStyle: props.styles.button,
},
};
}
componentDidMount() {
this.props.navigation.setParams({
title: 'Confirm your identity',
showButtonLeft: true,
action: () => this.props.prevStep(),
});
}
>>>>>>>
state = {
secondPassphrase: {
value: '',
validity: [],
},
};
componentDidMount() {
this.props.navigation.setParams({
title: 'Confirm your identity',
showButtonLeft: true,
action: () => this.props.prevStep(),
});
}
<<<<<<<
componentDidMount() {
const { navigation, prevStep } = this.props;
navigation.setParams({
showButtonLeft: true,
action: () => prevStep(),
});
}
=======
>>>>>>>
<<<<<<<
.filter(item => item.code !== 'INVALID_MNEMONIC' || secondPassphrase.validity.length === 1);
if (error.length) {
errorMessage = (error[0].message && error[0].message.length > 0) ?
error[0].message.replace(' Please check the passphrase.', '') :
'';
}
return (
<View style={[styles.wrapper, styles.theme.wrapper]}>
<KeyboardAwareScrollView
onSubmit={this.onSubmit}
hasTabBar={true}
styles={{ innerContainer: styles.innerContainer }}
button={{
title: 'Continue',
type: 'inBox',
}}
>
<View style={styles.titleContainer}>
<View style={styles.headings}>
<H1 style={[styles.title, styles.theme.title]}>Confirm your identity</H1>
<P style={[styles.subtitle, styles.theme.subtitle]}>
Enter you second passphrase to continue to transaction overview page.
</P>
</View>
<View style={styles.illustrationWrapper}>
{
theme === themes.light ?
<Image style={styles.illustration} source={secondPassphraseImageLight} /> :
<Image style={styles.illustration} source={secondPassphraseImageDark} />
}
</View>
<Input
label='Second Passphrase'
reference={(ref) => { this.SecondPassphraseInput = ref; }}
innerStyles={{ input: styles.input }}
value={secondPassphrase.value}
onChange={this.changeHandler}
autoFocus={true}
autoCorrect={false}
multiline={Platform.OS === 'ios'}
secureTextEntry={Platform.OS !== 'ios'}
error={errorMessage}
/>
</View>
</KeyboardAwareScrollView>
</View>
);
=======
.filter(item =>
item.code !== 'INVALID_MNEMONIC' || secondPassphrase.validity.length === 1);
return (
<View style={[styles.wrapper, styles.theme.wrapper]}>
<KeyboardAwareScrollView
disabled={secondPassphrase.validity.length !== 0}
onSubmit={this.forward}
hasTabBar={true}
styles={{ innerContainer: styles.innerContainer }}
button={{
title: 'Continue',
type: 'inBox',
}}>
<View style={styles.titleContainer}>
<P style={[styles.subtitle, styles.theme.subtitle]}>
Enter you second passphrase to continue to transaction overview page.
</P>
<View style={styles.illustrationWrapper}>
{
theme === themes.light ?
<Image style={styles.illustration} source={secondPassphraseImageLight} /> :
<Image style={styles.illustration} source={secondPassphraseImageDark} />
}
</View>
<Input
label='Second Passphrase'
reference={(ref) => { this.SecondPassphraseInput = ref; }}
innerStyles={{ input: styles.input }}
value={secondPassphrase.value}
onChange={this.changeHandler}
autoFocus={true}
autoCorrect={false}
multiline={Platform.OS === 'ios'}
secureTextEntry={Platform.OS !== 'ios'}
error={
(error.length > 0 && error[0].message && error[0].message.length > 0) ?
error[0].message.replace(' Please check the passphrase.', '') : ''
}/>
</View>
</KeyboardAwareScrollView>
</View>
);
>>>>>>>
.filter(item => item.code !== 'INVALID_MNEMONIC' || secondPassphrase.validity.length === 1);
if (error.length) {
errorMessage = (error[0].message && error[0].message.length > 0) ?
error[0].message.replace(' Please check the passphrase.', '') :
'';
}
return (
<View style={[styles.wrapper, styles.theme.wrapper]}>
<KeyboardAwareScrollView
onSubmit={this.onSubmit}
hasTabBar={true}
styles={{ innerContainer: styles.innerContainer }}
button={{
title: 'Continue',
type: 'inBox',
}}>
<View style={styles.titleContainer}>
<P style={[styles.subtitle, styles.theme.subtitle]}>
Enter you second passphrase to continue to transaction overview page.
</P>
<View style={styles.illustrationWrapper}>
{
theme === themes.light ?
<Image style={styles.illustration} source={secondPassphraseImageLight} /> :
<Image style={styles.illustration} source={secondPassphraseImageDark} />
}
</View>
<Input
label='Second Passphrase'
reference={(ref) => { this.SecondPassphraseInput = ref; }}
innerStyles={{ input: styles.input }}
value={secondPassphrase.value}
onChange={this.changeHandler}
autoFocus={true}
autoCorrect={false}
multiline={Platform.OS === 'ios'}
secureTextEntry={Platform.OS !== 'ios'}
error={errorMessage}
/>
</View>
</KeyboardAwareScrollView>
</View>
); |
<<<<<<<
define(["dojo/has", "put-selector/put", "dojo/_base/declare", "dojo/on", "./List", "dojo/_base/sniff"], function(has, put, declare, listen, List){
=======
define(["dojo/_base/kernel", "dojo/_base/declare", "dojo/on", "dojo/has", "put-selector/put", "./Editor", "./List", "dojo/_base/sniff"],
function(kernel, declare, listen, has, put, Editor, List){
>>>>>>>
define(["dojo/_base/kernel", "dojo/_base/declare", "dojo/on", "dojo/has", "put-selector/put", "./List", "dojo/_base/sniff"],
function(kernel, declare, listen, has, put, List){ |
<<<<<<<
data[key] = marked(data[key].toString(), options);
=======
if (data[key]) {
data[key] = marked(data[key], options);
}
>>>>>>>
if (data[key]) {
data[key] = marked(data[key].toString(), options);
} |
<<<<<<<
if (locale && locale.indexOf('_') < 0)
locale = locale.replace('-','_');
=======
>>>>>>> |
<<<<<<<
SITE_NAME: 'Name der Site',
SITE_ROOT: 'Root-Verzeichnis der Site',
MEDIA_ROOT: 'Root-Verzeichnis der Medientyp',
=======
SITE_NAME: 'Name der Seite',
SITE_ROOT: 'Root-Verzeichnis der Seite',
>>>>>>>
MEDIA_ROOT: 'Root-Verzeichnis der Medientyp',
SITE_NAME: 'Name der Seite',
SITE_ROOT: 'Root-Verzeichnis der Seite', |
<<<<<<<
},
{
method: 'get',
path: "/admin/sites",
access_level: pb.SecurityService.ACCESS_ADMINISTRATOR,
auth_required: true,
controller: path.join(pb.config.docRoot, 'plugins', 'pencilblue', 'controllers', 'admin', 'sites', 'manage.js'),
content_type: 'text/html'
},
{
method: 'post',
path: "/actions/admin/site",
access_level: pb.SecurityService.ACCESS_ADMINISTRATOR,
auth_required: true,
controller: path.join(pb.config.docRoot, 'plugins', 'pencilblue', 'controllers', 'actions', 'admin', 'sites', 'new_site.js')
},
{
method: 'post',
path: "/actions/admin/site/activate/:id",
access_level: pb.SecurityService.ACCESS_ADMINISTRATOR,
auth_required: true,
controller: path.join(pb.config.docRoot, 'plugins', 'pencilblue', 'controllers', 'actions', 'admin', 'sites', 'activate_site.js')
},
{
method: 'post',
path: "/actions/admin/site/deactivate/:id",
access_level: pb.SecurityService.ACCESS_ADMINISTRATOR,
auth_required: true,
controller: path.join(pb.config.docRoot, 'plugins', 'pencilblue', 'controllers', 'actions', 'admin', 'sites', 'deactivate_site.js')
=======
},
//**********************API************************
//topics
{
method: 'get',
path: "/api/content/topics/:id",
handler: "get",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/topic_api_controller.js')
},
{
method: 'get',
path: "/api/content/topics",
handler: "getAll",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/topic_api_controller.js')
},
{
method: 'delete',
path: "/api/content/topics/:id",
handler: "delete",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/topic_api_controller.js')
},
{
method: 'post',
path: "/api/content/topics",
handler: "post",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/topic_api_controller.js'),
request_body: ['application/json']
},
{
method: 'put',
path: "/api/content/topics/:id",
handler: "put",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/topic_api_controller.js'),
request_body: ['application/json']
>>>>>>>
},
{
method: 'get',
path: "/admin/sites",
access_level: pb.SecurityService.ACCESS_ADMINISTRATOR,
auth_required: true,
controller: path.join(pb.config.docRoot, 'plugins', 'pencilblue', 'controllers', 'admin', 'sites', 'manage.js'),
content_type: 'text/html'
},
{
method: 'post',
path: "/actions/admin/site",
access_level: pb.SecurityService.ACCESS_ADMINISTRATOR,
auth_required: true,
controller: path.join(pb.config.docRoot, 'plugins', 'pencilblue', 'controllers', 'actions', 'admin', 'sites', 'new_site.js')
},
{
method: 'post',
path: "/actions/admin/site/activate/:id",
access_level: pb.SecurityService.ACCESS_ADMINISTRATOR,
auth_required: true,
controller: path.join(pb.config.docRoot, 'plugins', 'pencilblue', 'controllers', 'actions', 'admin', 'sites', 'activate_site.js')
},
{
method: 'post',
path: "/actions/admin/site/deactivate/:id",
access_level: pb.SecurityService.ACCESS_ADMINISTRATOR,
auth_required: true,
controller: path.join(pb.config.docRoot, 'plugins', 'pencilblue', 'controllers', 'actions', 'admin', 'sites', 'deactivate_site.js')
},
//**********************API************************
//topics
{
method: 'get',
path: "/api/content/topics/:id",
handler: "get",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/topic_api_controller.js')
},
{
method: 'get',
path: "/api/content/topics",
handler: "getAll",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/topic_api_controller.js')
},
{
method: 'delete',
path: "/api/content/topics/:id",
handler: "delete",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/topic_api_controller.js')
},
{
method: 'post',
path: "/api/content/topics",
handler: "post",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/topic_api_controller.js'),
request_body: ['application/json']
},
{
method: 'put',
path: "/api/content/topics/:id",
handler: "put",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/topic_api_controller.js'),
request_body: ['application/json'] |
<<<<<<<
self.req.pencilblue_article = article[pb.DAO.getIdField()].toString();
this.article = article;
self.setPageName(article.name);
Article.super_.prototype.render.apply(self, [cb]);
});
};
//exports
return Article;
};
=======
//check for object ID as the custom URL
var where = null;
if(pb.validation.isIdStr(custUrl)) {
where = {_id: pb.DAO.getObjectID(custUrl)};
if (pb.log.isSilly()) {
pb.log.silly("ArticleController: The custom URL was not an object ID [%s]. Will now search url field. [%s]", custUrl, e.message);
}
}
else {
where = {url: custUrl};
}
//attempt to load object
var dao = new pb.DAO();
dao.loadByValues(where, 'article', function(err, article) {
if (util.isError(err) || article == null) {
if (where.url) {
self.reqHandler.serve404();
return;
}
dao.loadByValues({url: custUrl}, 'article', function(err, article) {
if (util.isError(err) || article == null) {
self.reqHandler.serve404();
return;
}
self.renderArticle(article, cb);
});
return;
}
self.renderArticle(article, cb);
});
};
Article.prototype.renderArticle = function(article, cb) {
this.req.pencilblue_article = article._id.toString();
this.article = article;
this.setPageName(article.name);
Article.super_.prototype.render.apply(this, [cb]);
};
//exports
module.exports = Article;
>>>>>>>
self.renderArticle(article, cb);
});
};
Article.prototype.renderArticle = function(article, cb) {
this.req.pencilblue_article = article._id.toString();
this.article = article;
this.setPageName(article.name);
Article.super_.prototype.render.apply(this, [cb]);
};
//exports
return Article;
}; |
<<<<<<<
cb(null, template);
=======
cb(null, template.split('^article_id^').join(this.pathVars.id));
};
EditArticle.prototype.getAngularController = function(pills, tabs, data) {
var self = this;
var objects = {
navigation: pb.AdminNavigation.get(this.session, ['content', 'articles'], this.ls),
pills: pills,
tabs: tabs,
templates: data.templates,
sections: data.sections,
topics: data.topics,
media: data.media,
article: self.article
};
return angular = pb.js.getAngularController(
objects,
[],
'initMediaPagination();initSectionsPagination();initTopicsPagination()'
);
>>>>>>>
cb(null, template);
};
EditArticle.prototype.getAngularController = function(pills, tabs, data) {
var self = this;
var objects = {
navigation: pb.AdminNavigation.get(this.session, ['content', 'articles'], this.ls),
pills: pills,
tabs: tabs,
templates: data.templates,
sections: data.sections,
topics: data.topics,
media: data.media,
article: self.article
};
return angular = pb.js.getAngularController(
objects,
[],
'initMediaPagination();initSectionsPagination();initTopicsPagination()'
); |
<<<<<<<
TemplateService.unregisteredFlagHandler = function(flag) {
return '^'+flag+'^';
};
/**
* Sets the prioritized theme to use when loading templates
*
* @method setTheme
* @param {string} theme The name of the theme.
*/
TemplateService.prototype.setTheme = function(theme) {
this.theme = theme;
};
/**
* Retrieves the prioratized theme
*
* @method getTheme
* @return {string} The prioritized theme to use when loading templates
*/
TemplateService.prototype.getTheme = function() {
return this.theme;
};
/**
* When a flag is encountered that is not registered with the engine the
* handler is called as a fail safe. It is expected to return a string that
* will be put in the place of the flag.
*
* @method setUnregisteredFlagHandler
* @param {Function} unregisteredFlagHandler
* @return {Boolean} TRUE when the handler was set, FALSE if not
*/
TemplateService.prototype.setUnregisteredFlagHandler = function(unregisteredFlagHandler) {
if (!util.isFunction(unregisteredFlagHandler)) {
return false;
=======
this.unregisteredFlagHandler = null;
}
//constants
var TEMPLATE_PREFIX = 'tmp_';
var TEMPLATE_PREFIX_LEN = TEMPLATE_PREFIX.length;
var LOCALIZATION_PREFIX = 'loc_';
var LOCALIZATION_PREFIX_LEN = LOCALIZATION_PREFIX.length;
var SYSTEM_PREFIX = 'system_';
var SYSTEM_PREFIX_LEN = SYSTEM_PREFIX.length;
var TEMPLATE_LOADER = null;
var TEMPLATE_PIECE_STATIC = 'static';
var TEMPLATE_PIECE_FLAG = 'flag';
/**
* A container that provides the mapping for global call backs. These should
* only be added to at the start of the application or on plugin install/update.
*
* @private
* @property
*/
var GLOBAL_CALLBACKS = {
site_root: pb.config.siteRoot,
site_name: pb.config.siteName,
site_logo: function(flag, callback) {
pb.settings.get('site_logo', function(err, logo) {
callback(null, logo ? logo : '/img/pb_logo.png');
});
},
site_menu_logo: '/img/logo_menu.png',
site_icon: function(flag, callback) {
pb.plugins.getActiveIcon(callback);
},
version: pb.config.version
};
/**
*
* @property unregisteredFlagHandler
* @type {Function}
*/
TemplateService.unregisteredFlagHandler = function(flag, cb) {
cb(null, '^'+flag+'^');
};
/**
* Sets the prioritized theme to use when loading templates
*
* @method setTheme
* @param {string} theme The name of the theme.
*/
TemplateService.prototype.setTheme = function(theme) {
this.theme = theme;
};
/**
* Retrieves the prioratized theme
*
* @method getTheme
* @return {string} The prioritized theme to use when loading templates
*/
TemplateService.prototype.getTheme = function() {
return this.theme;
};
/**
* When a flag is encountered that is not registered with the engine the
* handler is called as a fail safe. It is expected to return a string that
* will be put in the place of the flag.
*
* @method setUnregisteredFlagHandler
* @param {Function} unregisteredFlagHandler
* @return {Boolean} TRUE when the handler was set, FALSE if not
*/
TemplateService.prototype.setUnregisteredFlagHandler = function(unregisteredFlagHandler) {
if (!pb.utils.isFunction(unregisteredFlagHandler)) {
return false;
}
this.unregisteredFlagHandler = unregisteredFlagHandler;
return true;
};
/**
* When a flag is encountered that is not registered with the engine the
* handler is called as a fail safe unless there is a locally registered handler.
* It is expected to return a string that will be put in the place of the flag.
*
* @method setGlobalUnregisteredFlagHandler
* @param {Function} unregisteredFlagHandler
* @return {Boolean} TRUE when the handler was set, FALSE if not
*/
TemplateService.setGlobalUnregisteredFlagHandler = function(unregisteredFlagHandler) {
if (!pb.utils.isFunction(unregisteredFlagHandler)) {
return false;
}
TemplateService.unregisteredFlagHandler = unregisteredFlagHandler;
return true;
};
/**
* Sets the option that when true, instructs the engine to inspect the content
* provided by a flag for more flags. This is one way of providing iterative
* processing of items. See the sample plugin for an example.
* @method setReprocess
* @param {Boolean} reprocess
*/
TemplateService.prototype.setReprocess = function(reprocess) {
this.reprocess = reprocess ? true : false;
};
/**
* Retrieves the raw template based on a priority. The path to the template is
* derived from the specified relative path and the following order of
* directories:
* <ol>
* <li>The theme provided by "getTheme" if not null</li>
* <li>The globally set active_theme</li>
* <li>Iterates over the list of active plugins looking for the template</li>
* <li>The system template directory</li>
* </ol>
*
* @method getTemplateContentsByPriority
* @param {string} relativePath
* @param {function} cb Callback function
*/
TemplateService.prototype.getTemplateContentsByPriority = function(relativePath, cb) {
//build set of paths to search through
var hintedTheme = this.getTheme();
var paths = [];
if (hintedTheme) {
paths.push(TemplateService.getCustomPath(this.getTheme(), relativePath));
}
pb.settings.get('active_theme', function(err, activeTheme){
if (activeTheme !== null) {
paths.push(TemplateService.getCustomPath(activeTheme, relativePath));
}
var activePlugins = pb.plugins.getActivePluginNames();
for (var i = 0; i < activePlugins.length; i++) {
if (hintedTheme !== activePlugins[i] && 'pencilblue' !== activePlugins[i]) {
paths.push(TemplateService.getCustomPath(activePlugins[i], relativePath));
}
}
paths.push(TemplateService.getDefaultPath(relativePath));
//iterate over paths until a valid template is found
var i = 0;
var doLoop = true;
var template = null;
async.whilst(
function(){return i < paths.length && doLoop;},
function(callback) {
//attempt to load template
TEMPLATE_LOADER.get(paths[i], function(err, templateData){
template = templateData;
doLoop = util.isError(err) || !pb.utils.isObject(template);
i++;
callback();
});
},
function(err) {
cb(err, template);
}
);
});
};
/**
* Loads a template file along with any encountered sub-template files and
* processes any flags. The call back provides any error encountered and a
* second parameter that is the transformed content.
*
* @method load
* @param {string} templateLocation The relative location of the template file.
* @param {function} cb Callback function
*/
TemplateService.prototype.load = function(templateLocation, cb) {
var self = this;
this.getTemplateContentsByPriority(templateLocation, function(err, templateContents) {
if (util.isError(err)) {
return cb(err, null);
return;
}
else if (!templateContents) {
return cb(new Error('Failed to find a matching template for location: '+templateLocation), null);
>>>>>>>
TemplateService.unregisteredFlagHandler = function(flag, cb) {
cb(null, '^'+flag+'^');
};
/**
* Sets the prioritized theme to use when loading templates
*
* @method setTheme
* @param {string} theme The name of the theme.
*/
TemplateService.prototype.setTheme = function(theme) {
this.theme = theme;
};
/**
* Retrieves the prioratized theme
*
* @method getTheme
* @return {string} The prioritized theme to use when loading templates
*/
TemplateService.prototype.getTheme = function() {
return this.theme;
};
/**
* When a flag is encountered that is not registered with the engine the
* handler is called as a fail safe. It is expected to return a string that
* will be put in the place of the flag.
*
* @method setUnregisteredFlagHandler
* @param {Function} unregisteredFlagHandler
* @return {Boolean} TRUE when the handler was set, FALSE if not
*/
TemplateService.prototype.setUnregisteredFlagHandler = function(unregisteredFlagHandler) {
if (!util.isFunction(unregisteredFlagHandler)) {
return false; |
<<<<<<<
href: '/admin/site_settings/email',
access: SecurityService.ACCESS_MANAGING_EDITOR
=======
href: '/admin/site_settings/email'
},
{
id: 'library_settings',
title: 'LIBRARIES',
icon: 'book',
href: '/admin/site_settings/libraries'
>>>>>>>
href: '/admin/site_settings/email',
access: SecurityService.ACCESS_ADMINISTRATOR
<<<<<<<
* @returns {Boolean}
* @param site
=======
* @return {Boolean}
>>>>>>>
* @param {String} site - site unique id
* @return {Boolean}
<<<<<<<
* @returns {Boolean}
* @param site
=======
* @return {Boolean}
>>>>>>>
* @param site
* @return {Boolean}
<<<<<<<
* @returns {boolean}
* @param site
=======
* @param navigation
* @return {boolean}
>>>>>>>
* @param site
* @return {boolean} |
<<<<<<<
module.exports = function(pb) {
//pb dependencies
var util = pb.util;
/**
* Creates an object type
* @class NewObjectTypeActionController
* @constructor
* @extends FormController
*/
function NewObjectTypeActionController(){}
util.inherits(NewObjectTypeActionController, pb.BaseController);
NewObjectTypeActionController.prototype.render = function(cb) {
var self = this;
var post = self.body;
post.fields.name = {field_type: 'text'};
var service = new pb.CustomObjectService();
service.saveType(post, function(err, result) {
if(util.isError(err)) {
cb({
code: 500,
content: pb.BaseController.apiResponse(pb.BaseController.API_ERROR, self.ls.get('ERROR_SAVING'))
});
return;
}
else if(util.isArray(result) && result.length > 0) {
cb({
code: 500,
content: pb.BaseController.apiResponse(pb.BaseController.API_ERROR, self.ls.get('ERROR_SAVING'))
});
return;
}
cb({content: pb.BaseController.apiResponse(pb.BaseController.API_SUCCESS, post.name + ' ' + self.ls.get('CREATED'), result)});
});
};
//exports
return NewObjectTypeActionController;
};
=======
/**
* Creates an object type
* @class NewObjectTypeActionController
* @constructor
* @extends FormController
*/
function NewObjectTypeActionController(){}
//inheritance
util.inherits(NewObjectTypeActionController, pb.BaseController);
NewObjectTypeActionController.prototype.render = function(cb) {
var self = this;
var post = self.body;
post.fields.name = {field_type: 'text'};
var service = new pb.CustomObjectService();
service.saveType(post, function(err, result) {
if(util.isError(err)) {
return cb({
code: 500,
content: pb.BaseController.apiResponse(pb.BaseController.API_ERROR, self.ls.get('ERROR_SAVING'))
});
}
else if(util.isArray(result) && result.length > 0) {
return cb({
code: 400,
content: pb.BaseController.apiResponse(pb.BaseController.API_ERROR, self.ls.get('ERROR_SAVING'), result)
});
}
cb({content: pb.BaseController.apiResponse(pb.BaseController.API_SUCCESS, post.name + ' ' + self.ls.get('CREATED'), result)});
});
};
//exports
module.exports = NewObjectTypeActionController;
>>>>>>>
module.exports = function(pb) {
//pb dependencies
var util = pb.util;
/**
* Creates an object type
* @class NewObjectTypeActionController
* @constructor
* @extends FormController
*/
function NewObjectTypeActionController(){}
util.inherits(NewObjectTypeActionController, pb.BaseController);
NewObjectTypeActionController.prototype.render = function(cb) {
var self = this;
var post = self.body;
post.fields.name = {field_type: 'text'};
var service = new pb.CustomObjectService();
service.saveType(post, function(err, result) {
if(util.isError(err)) {
cb({
code: 500,
content: pb.BaseController.apiResponse(pb.BaseController.API_ERROR, self.ls.get('ERROR_SAVING'))
});
return;
}
else if(util.isArray(result) && result.length > 0) {
cb({
code: 400,
content: pb.BaseController.apiResponse(pb.BaseController.API_ERROR, self.ls.get('ERROR_SAVING'), result)
});
return;
}
cb({content: pb.BaseController.apiResponse(pb.BaseController.API_SUCCESS, post.name + ' ' + self.ls.get('CREATED'), result)});
});
};
//exports
return NewObjectTypeActionController;
}; |
<<<<<<<
/**
* A value that has special meaning to TemplateService. It acts as a wrapper
* for a value to be used in a template along with special processing
* instructions.
* @class TemplateValue
* @constructor
* @param {String} The raw value to be included in the template processing
* @param {Boolean} [htmlEncode=true] Indicates if the value should be
* encoded during serialization.
*/
function TemplateValue(val, htmlEncode){
this.raw = val;
this.htmlEncode = util.isBoolean(htmlEncode) ? htmlEncode : true;
};
/**
* Encodes the value for an HTML document when a value is provided.
* @method encode
* @param {Boolean} [doHtmlEncoding] Sets the property to encode the value to HTML
* @return {Boolean} The current value of the htmlEncode property
*/
TemplateValue.prototype.encode = function(doHtmlEncoding) {
if (doHtmlEncoding == true || doHtmlEncoding == false) {
this.htmlEncode = doHtmlEncoding;
}
return this.htmlEncode;
};
/**
* Specifies that the value should not be encoded for HTML
* @method skipEncode
*/
TemplateValue.prototype.skipEncode = function() {
this.enocde(false);
};
/**
* Specifies that the value should be encoded for HTML
* @method doEncode
*/
TemplateValue.prototype.doEncode = function() {
this.encode(true);
};
/**
* Retrieves the processed value represented by this object.
* @method val
* @return {String} The processed value
*/
TemplateValue.prototype.val = function() {
var val = this.raw;
if (this.encode()) {
val = HtmlEncoder.htmlEncode(this.raw);
}
return val;
};
/**
* Overrides the toString function in order to properly serialize the value.
* @method toString
* @return {String} A string representation of the value that follows the
* processing instructions.
*/
TemplateValue.prototype.toString = function() {
return this.val();
};
return {
TemplateService: TemplateService,
TemplateValue: TemplateValue
};
};
=======
//add what's left
if (text) {
compiled.push(genPiece(TEMPLATE_PIECE_STATIC, text));
}
return compiled;
};
/**
* A value that has special meaning to TemplateService. It acts as a wrapper
* for a value to be used in a template along with special processing
* instructions.
* @class TemplateValue
* @constructor
* @param {String} The raw value to be included in the template processing
* @param {Boolean} [htmlEncode=true] Indicates if the value should be
* encoded during serialization.
*/
function TemplateValue(val, htmlEncode){
this.raw = val;
this.htmlEncode = pb.utils.isBoolean(htmlEncode) ? htmlEncode : true;
};
/**
* Encodes the value for an HTML document when a value is provided.
* @method encode
* @param {Boolean} [doHtmlEncoding] Sets the property to encode the value to HTML
* @return {Boolean} The current value of the htmlEncode property
*/
TemplateValue.prototype.encode = function(doHtmlEncoding) {
if (doHtmlEncoding == true || doHtmlEncoding == false) {
this.htmlEncode = doHtmlEncoding;
}
return this.htmlEncode;
};
/**
* Specifies that the value should not be encoded for HTML
* @method skipEncode
*/
TemplateValue.prototype.skipEncode = function() {
this.encode(false);
};
/**
* Specifies that the value should be encoded for HTML
* @method doEncode
*/
TemplateValue.prototype.doEncode = function() {
this.encode(true);
};
/**
* Retrieves the processed value represented by this object.
* @method val
* @return {String} The processed value
*/
TemplateValue.prototype.val = function() {
var val = this.raw;
if (this.encode()) {
val = HtmlEncoder.htmlEncode(this.raw);
}
return val;
};
/**
* Overrides the toString function in order to properly serialize the value.
* @method toString
* @return {String} A string representation of the value that follows the
* processing instructions.
*/
TemplateValue.prototype.toString = function() {
return this.val();
}
//exports
module.exports.TemplateService = TemplateService;
module.exports.TemplateValue = TemplateValue;
>>>>>>>
/**
* A value that has special meaning to TemplateService. It acts as a wrapper
* for a value to be used in a template along with special processing
* instructions.
* @class TemplateValue
* @constructor
* @param {String} The raw value to be included in the template processing
* @param {Boolean} [htmlEncode=true] Indicates if the value should be
* encoded during serialization.
*/
function TemplateValue(val, htmlEncode){
this.raw = val;
this.htmlEncode = util.isBoolean(htmlEncode) ? htmlEncode : true;
};
/**
* Encodes the value for an HTML document when a value is provided.
* @method encode
* @param {Boolean} [doHtmlEncoding] Sets the property to encode the value to HTML
* @return {Boolean} The current value of the htmlEncode property
*/
TemplateValue.prototype.encode = function(doHtmlEncoding) {
if (doHtmlEncoding == true || doHtmlEncoding == false) {
this.htmlEncode = doHtmlEncoding;
}
return this.htmlEncode;
};
/**
* Specifies that the value should not be encoded for HTML
* @method skipEncode
*/
TemplateValue.prototype.skipEncode = function() {
this.encode(false);
};
/**
* Specifies that the value should be encoded for HTML
* @method doEncode
*/
TemplateValue.prototype.doEncode = function() {
this.encode(true);
};
/**
* Retrieves the processed value represented by this object.
* @method val
* @return {String} The processed value
*/
TemplateValue.prototype.val = function() {
var val = this.raw;
if (this.encode()) {
val = HtmlEncoder.htmlEncode(this.raw);
}
return val;
};
/**
* Overrides the toString function in order to properly serialize the value.
* @method toString
* @return {String} A string representation of the value that follows the
* processing instructions.
*/
TemplateValue.prototype.toString = function() {
return this.val();
};
return {
TemplateService: TemplateService,
TemplateValue: TemplateValue
};
}; |
<<<<<<<
},
//pages
{
method: 'get',
path: "/api/content/pages/:id",
handler: "get",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_WRITER,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/page_api_controller.js')
},
{
method: 'get',
path: "/api/content/pages",
handler: "getAll",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_WRITER,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/page_api_controller.js')
},
{
method: 'delete',
path: "/api/content/pages/:id",
handler: "delete",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/page_api_controller.js')
},
{
method: 'post',
path: "/api/content/pages",
handler: "post",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_WRITER,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/page_api_controller.js'),
request_body: ['application/json']
},
{
method: 'put',
path: "/api/content/pages/:id",
handler: "put",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_WRITER,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/page_api_controller.js'),
request_body: ['application/json']
},
=======
},
{
method: 'get',
path: "/admin/elements/wysiwyg",
access_level: pb.SecurityService.ACCESS_WRITER,
auth_required: true,
controller: path.join(pb.config.docRoot, 'plugins', 'pencilblue', 'controllers', 'admin', 'elements', 'wysiwyg.js'),
}
>>>>>>>
},
//pages
{
method: 'get',
path: "/api/content/pages/:id",
handler: "get",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_WRITER,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/page_api_controller.js')
},
{
method: 'get',
path: "/api/content/pages",
handler: "getAll",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_WRITER,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/page_api_controller.js')
},
{
method: 'delete',
path: "/api/content/pages/:id",
handler: "delete",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_EDITOR,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/page_api_controller.js')
},
{
method: 'post',
path: "/api/content/pages",
handler: "post",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_WRITER,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/page_api_controller.js'),
request_body: ['application/json']
},
{
method: 'put',
path: "/api/content/pages/:id",
handler: "put",
content_type: 'application/json',
auth_required: true,
access_level: pb.SecurityService.ACCESS_WRITER,
controller: path.join(pb.config.docRoot, 'plugins/pencilblue/controllers/api/content/page_api_controller.js'),
request_body: ['application/json']
} |
<<<<<<<
{
method: 'post',
path: "/api/cluster/:action",
auth_required: true,
access_level: ACCESS_ADMINISTRATOR,
controller: path.join(DOCUMENT_ROOT, 'controllers', 'api', 'admin', 'system', 'cluster_api.js'),
content_type: 'application/json'
},
=======
{
method: 'get',
path: "/admin/content/comments/manage_comments",
auth_required: true,
access_level: ACCESS_EDITOR,
controller: path.join(DOCUMENT_ROOT, 'controllers', 'admin', 'content', 'comments', 'manage_comments.js'),
content_type: 'text/html'
},
{
method: 'get',
path: "/actions/admin/content/comments/delete_comment/:id",
access_level: ACCESS_EDITOR,
auth_required: true,
controller: path.join(DOCUMENT_ROOT, 'controllers', 'actions', 'admin', 'content', 'comments', 'delete_comment.js'),
content_type: 'text/html'
},
>>>>>>>
{
method: 'post',
path: "/api/cluster/:action",
auth_required: true,
access_level: ACCESS_ADMINISTRATOR,
controller: path.join(DOCUMENT_ROOT, 'controllers', 'api', 'admin', 'system', 'cluster_api.js'),
content_type: 'application/json'
},
{
method: 'get',
path: "/admin/content/comments/manage_comments",
auth_required: true,
access_level: ACCESS_EDITOR,
controller: path.join(DOCUMENT_ROOT, 'controllers', 'admin', 'content', 'comments', 'manage_comments.js'),
content_type: 'text/html'
},
{
method: 'get',
path: "/actions/admin/content/comments/delete_comment/:id",
access_level: ACCESS_EDITOR,
auth_required: true,
controller: path.join(DOCUMENT_ROOT, 'controllers', 'actions', 'admin', 'content', 'comments', 'delete_comment.js'),
content_type: 'text/html'
}, |
<<<<<<<
self.navService = new pb.SectionService({site: self.site});
self.siteQueryService = new pb.SiteQueryService(self.site, true);
=======
self.navService = new pb.SectionService(self.site);
self.siteQueryService = new pb.SiteQueryService({site: self.site, onlyThisSite: true});
>>>>>>>
self.navService = new pb.SectionService({site: self.site});
self.siteQueryService = new pb.SiteQueryService({site: self.site, onlyThisSite: true}); |
<<<<<<<
var val = expr_atom(allow_calls, allow_arrows);
while (is("operator") && UNARY_POSTFIX(S.token.value) && !S.token.nlb) {
if (val instanceof AST_Arrow) unexpected();
=======
var val = expr_atom(allow_calls);
while (is("operator") && UNARY_POSTFIX(S.token.value) && !has_newline_before(S.token)) {
>>>>>>>
var val = expr_atom(allow_calls, allow_arrows);
while (is("operator") && UNARY_POSTFIX(S.token.value) && !has_newline_before(S.token)) {
if (val instanceof AST_Arrow) unexpected(); |
<<<<<<<
function to_ascii(str, identifier) {
return str.replace(/[\ud800-\udbff][\udc00-\udfff]|[\u0000-\u001f\u007f-\uffff]/g, function(ch) {
var code = get_full_char_code(ch, 0).toString(16);
if ((identifier && code.length === 1 && options.ecma >= 6) || code.length > 4) {
if (options.ecma < 6) {
if (identifier) {
return ch; // no \u{} support
}
return "\\u" + ch.charCodeAt(0).toString(16) + "\\u"
+ ch.charCodeAt(1).toString(16);
}
return "\\u{" + code + "}";
} else if (code.length <= 2 && !identifier) {
=======
var to_utf8 = options.ascii_only ? function(str, identifier) {
return str.replace(/[\u0000-\u001f\u007f-\uffff]/g, function(ch) {
var code = ch.charCodeAt(0).toString(16);
if (code.length <= 2 && !identifier) {
>>>>>>>
var to_utf8 = options.ascii_only ? function(str, identifier) {
return str.replace(/[\ud800-\udbff][\udc00-\udfff]|[\u0000-\u001f\u007f-\uffff]/g, function(ch) {
var code = get_full_char_code(ch, 0).toString(16);
if ((identifier && code.length === 1 && options.ecma >= 6) || code.length > 4) {
if (options.ecma < 6) {
if (identifier) {
return ch; // no \u{} support
}
return "\\u" + ch.charCodeAt(0).toString(16) + "\\u"
+ ch.charCodeAt(1).toString(16);
}
return "\\u{" + code + "}";
} else if (code.length <= 2 && !identifier) {
<<<<<<<
function quote_template() {
return '`' + str.replace(/`/g, '\\`') + '`';
}
if (options.ascii_only) str = to_ascii(str);
if (quote === "`") return quote_template();
=======
str = to_utf8(str);
>>>>>>>
function quote_template() {
return '`' + str.replace(/`/g, '\\`') + '`';
}
str = to_utf8(str);
if (quote === "`") return quote_template();
<<<<<<<
if (options.ascii_identifiers)
name = to_ascii(name, true);
=======
name = to_utf8(name, true);
>>>>>>>
name = to_utf8(name, true); |
<<<<<<<
if (exp instanceof AST_Function && !self.expression.is_generator) {
if (exp.body[0] instanceof AST_Return) {
var value = exp.body[0].value;
=======
if (exp instanceof AST_Function) {
var stat = exp.body[0];
if (compressor.option("inline") && stat instanceof AST_Return) {
var value = stat && stat.value;
>>>>>>>
if (exp instanceof AST_Function && !self.expression.is_generator) {
var stat = exp.body[0];
if (compressor.option("inline") && stat instanceof AST_Return) {
var value = stat && stat.value; |
<<<<<<<
if (code == 92 || is_identifier_start(ch)) return read_word();
if (shebang) {
if (S.pos == 0 && looking_at("#!")) {
forward(2);
skip_line_comment("comment5");
continue;
}
}
=======
if (code == 92 || is_identifier_start(code)) return read_word();
>>>>>>>
if (code == 92 || is_identifier_start(ch)) return read_word(); |
<<<<<<<
if (value && !compressor.exposed(d) && ref_once(tw, compressor, d)) {
=======
if (value instanceof AST_Lambda && recursive_ref(tw, d)) {
d.recursive_refs++;
} else if (value && ref_once(tw, compressor, d)) {
>>>>>>>
if (value instanceof AST_Lambda && recursive_ref(tw, d)) {
d.recursive_refs++;
} else if (value && !compressor.exposed(d) && ref_once(tw, compressor, d)) {
<<<<<<<
if (node instanceof AST_Defun || node instanceof AST_DefClass) {
var in_export = tw.parent() instanceof AST_Export;
if (in_export || !drop_funcs && scope === self) {
var node_def = node.name.definition();
if (node_def.global && !(node_def.id in in_use_ids)) {
=======
if (node instanceof AST_Defun) {
var node_def = node.name.definition();
if (!drop_funcs && scope === self) {
if (!(node_def.id in in_use_ids)) {
>>>>>>>
if (node instanceof AST_Defun || node instanceof AST_DefClass) {
var node_def = node.name.definition();
var in_export = tw.parent() instanceof AST_Export;
if (in_export || !drop_funcs && scope === self) {
if (node_def.global && !(node_def.id in in_use_ids)) {
<<<<<<<
if (def.name instanceof AST_Destructuring) {
var destructuring_cache = destructuring_value;
destructuring_value = def.value;
def.walk(tw);
destructuring_value = destructuring_cache;
} else {
initializations.add(def.name.name, def.value);
}
=======
initializations.add(node_def.id, def.value);
>>>>>>>
if (def.name instanceof AST_Destructuring) {
var destructuring_cache = destructuring_value;
destructuring_value = def.value;
def.walk(tw);
destructuring_value = destructuring_cache;
} else {
initializations.add(def.name.definition().id, def.value);
}
<<<<<<<
&& simple_args
&& is_func_expr(fn)
=======
&& is_func
>>>>>>>
&& simple_args
&& is_func
<<<<<<<
var stat = is_func_expr(fn) && fn.body;
if (stat instanceof AST_Node) {
stat = make_node(AST_Return, stat, {
value: stat
});
} else if (stat) {
stat = stat[0];
}
=======
var stat = is_func && fn.body[0];
>>>>>>>
var stat = is_func && fn.body;
if (stat instanceof AST_Node) {
stat = make_node(AST_Return, stat, {
value: stat
});
} else if (stat) {
stat = stat[0];
}
<<<<<<<
if (is_func_expr(fn) && !fn.is_generator && !fn.async) {
=======
if (is_func) {
>>>>>>>
if (is_func && !fn.is_generator && !fn.async) {
<<<<<<<
return all(fn.argnames, function(arg) {
if (arg instanceof AST_DefaultAssign) return arg.left.__unused;
if (arg instanceof AST_Destructuring) return false;
if (arg instanceof AST_Expansion) return arg.expression.__unused;
return arg.__unused
|| safe_to_inject
&& !catches[arg.name]
&& !identifier_atom(arg.name)
&& !scope.var_names()[arg.name];
});
=======
for (var i = 0, len = fn.argnames.length; i < len; i++) {
var arg = fn.argnames[i];
if (arg.__unused) continue;
if (!safe_to_inject
|| catches[arg.name]
|| identifier_atom(arg.name)
|| scope.var_names()[arg.name]) {
return false;
}
if (defs) defs.push(arg.definition());
}
return !defs || defs.length == 0 || !is_reachable(fn.body[0], defs);
>>>>>>>
for (var i = 0, len = fn.argnames.length; i < len; i++) {
var arg = fn.argnames[i];
if (arg instanceof AST_DefaultAssign) {
if (arg.left.__unused) continue;
return false;
}
if (arg instanceof AST_Destructuring) return false;
if (arg instanceof AST_Expansion) {
if (arg.expression.__unused) continue;
return false;
}
if (arg.__unused) continue;
if (!safe_to_inject
|| catches[arg.name]
|| identifier_atom(arg.name)
|| scope.var_names()[arg.name]) {
return false;
}
if (defs) defs.push(arg.definition());
}
return !defs || defs.length == 0 || !is_reachable(stat, defs);
<<<<<<<
if (fixed instanceof AST_DefClass) {
d.fixed = fixed = make_node(AST_ClassExpression, fixed, fixed);
}
if (fixed instanceof AST_Defun) {
d.fixed = fixed = make_node(AST_Function, fixed, fixed);
}
if (d.single_use && (is_func_expr(fixed) || fixed instanceof AST_ClassExpression)) {
=======
var single_use = d.single_use;
if (single_use && fixed instanceof AST_Lambda) {
>>>>>>>
var single_use = d.single_use;
if (single_use && (fixed instanceof AST_Lambda || fixed instanceof AST_Class)) { |
<<<<<<<
=======
&& (!(self instanceof AST_Toplevel) || toplevel)
>>>>>>>
&& (!(self instanceof AST_Toplevel) || toplevel)
<<<<<<<
if (node instanceof AST_Defun || node instanceof AST_DefClass) {
=======
if (node instanceof AST_Defun) {
if (!drop_funcs && scope === self) {
var node_def = node.name.definition();
if (!(node_def.id in in_use_ids)) {
in_use_ids[node_def.id] = true;
in_use.push(node_def);
}
}
>>>>>>>
if (node instanceof AST_Defun) {
if (!drop_funcs && scope === self) {
var node_def = node.name.definition();
if (!(node_def.id in in_use_ids)) {
in_use_ids[node_def.id] = true;
in_use.push(node_def);
}
}
}
if (node instanceof AST_Defun || node instanceof AST_DefClass) {
<<<<<<<
if (a[i] instanceof AST_Destructuring) {
// Do not drop destructuring arguments.
// They constitute a type assertion, so dropping
// them would stop that TypeError which would happen
// if someone called it with an incorrectly formatted
// parameter.
break;
} else {
var sym = a[i];
if (sym instanceof AST_Expansion) {
sym = sym.symbol;
}
if (sym.unreferenced()) {
a.pop();
compressor.warn("Dropping unused function argument {name} [{file}:{line},{col}]", {
name : sym.name,
file : sym.start.file,
line : sym.start.line,
col : sym.start.col
});
}
else break;
=======
var sym = a[i];
if (!(sym.definition().id in in_use_ids)) {
a.pop();
compressor.warn("Dropping unused function argument {name} [{file}:{line},{col}]", {
name : sym.name,
file : sym.start.file,
line : sym.start.line,
col : sym.start.col
});
>>>>>>>
if (a[i] instanceof AST_Destructuring) {
// Do not drop destructuring arguments.
// They constitute a type assertion, so dropping
// them would stop that TypeError which would happen
// if someone called it with an incorrectly formatted
// parameter.
break;
} else {
var sym = a[i];
if (sym instanceof AST_Expansion) {
sym = sym.symbol;
}
if (!(sym.definition().id in in_use_ids)) {
a.pop();
compressor.warn("Dropping unused function argument {name} [{file}:{line},{col}]", {
name : sym.name,
file : sym.start.file,
line : sym.start.line,
col : sym.start.col
});
}
else break;
<<<<<<<
if ((node instanceof AST_Defun || node instanceof AST_DefClass) && node !== self) {
var keep = (node.name.definition().id in in_use_ids) || node.name.definition().global;
if (!keep) {
=======
if (drop_funcs && node instanceof AST_Defun && node !== self) {
if (!(node.name.definition().id in in_use_ids)) {
>>>>>>>
if (drop_funcs && (node instanceof AST_Defun || node instanceof AST_DefClass) && node !== self) {
var keep = (node.name.definition().id in in_use_ids) || node.name.definition().global;
if (!keep) {
<<<<<<<
OPT(AST_Import, function(self, compressor) {
return self;
});
OPT(AST_Function, function(self, compressor){
self = AST_Lambda.prototype.optimize.call(self, compressor);
if (compressor.option("unused") && !compressor.option("keep_fnames")) {
if (self.name && self.name.unreferenced()) {
self.name = null;
}
}
return self;
});
=======
>>>>>>>
OPT(AST_Import, function(self, compressor) {
return self;
});
<<<<<<<
OPT(AST_Class, function(self, compressor){
// HACK to avoid compress failure.
// AST_Class is not really an AST_Scope/AST_Block as it lacks a body.
return self;
});
OPT(AST_Yield, function(self, compressor){
if (!self.is_star && self.expression instanceof AST_Undefined) {
self.expression = null;
}
return self;
});
OPT(AST_TemplateString, function(self, compressor){
if (!compressor.option("evaluate")
|| compressor.parent() instanceof AST_PrefixedTemplateString)
return self;
var segments = [];
for (var i = 0; i < self.segments.length; i++) {
if (self.segments[i] instanceof AST_Node) {
var result = self.segments[i].evaluate(compressor);
// No result[1] means nothing to stringify
if (result.length === 1) {
segments.push(result[0]);
continue;
}
// Evaluate length
if (result[0].print_to_string().length + 3 /* ${} */ < (result[1]+"").length) {
segments.push(result[0]);
continue;
}
// There should always be a previous and next segment if segment is a node
segments[segments.length - 1].value = segments[segments.length - 1].value + result[1] + self.segments[++i].value;
} else {
segments.push(self.segments[i]);
}
}
self.segments = segments;
return self;
});
OPT(AST_PrefixedTemplateString, function(self, compressor){
return self;
});
=======
OPT(AST_VarDef, function(self, compressor){
var defines = compressor.option("global_defs");
if (defines && HOP(defines, self.name.name)) {
compressor.warn('global_defs ' + self.name.name + ' redefined [{file}:{line},{col}]', self.start);
}
return self;
});
>>>>>>>
OPT(AST_Class, function(self, compressor){
// HACK to avoid compress failure.
// AST_Class is not really an AST_Scope/AST_Block as it lacks a body.
return self;
});
OPT(AST_Yield, function(self, compressor){
if (!self.is_star && self.expression instanceof AST_Undefined) {
self.expression = null;
}
return self;
});
OPT(AST_VarDef, function(self, compressor){
var defines = compressor.option("global_defs");
if (defines && HOP(defines, self.name.name)) {
compressor.warn('global_defs ' + self.name.name + ' redefined [{file}:{line},{col}]', self.start);
}
return self;
});
OPT(AST_TemplateString, function(self, compressor){
if (!compressor.option("evaluate")
|| compressor.parent() instanceof AST_PrefixedTemplateString)
return self;
var segments = [];
for (var i = 0; i < self.segments.length; i++) {
if (self.segments[i] instanceof AST_Node) {
var result = self.segments[i].evaluate(compressor);
// No result[1] means nothing to stringify
if (result.length === 1) {
segments.push(result[0]);
continue;
}
// Evaluate length
if (result[0].print_to_string().length + 3 /* ${} */ < (result[1]+"").length) {
segments.push(result[0]);
continue;
}
// There should always be a previous and next segment if segment is a node
segments[segments.length - 1].value = segments[segments.length - 1].value + result[1] + self.segments[++i].value;
} else {
segments.push(self.segments[i]);
}
}
self.segments = segments;
return self;
});
OPT(AST_PrefixedTemplateString, function(self, compressor){
return self;
}); |
<<<<<<<
|| node instanceof AST_Await
=======
|| node instanceof AST_Call && lhs instanceof AST_PropAccess && lhs.equivalent_to(node.expression)
>>>>>>>
|| node instanceof AST_Await
|| node instanceof AST_Call && lhs instanceof AST_PropAccess && lhs.equivalent_to(node.expression)
<<<<<<<
return statements.reduce(function(a, stat){
if (stat instanceof AST_BlockStatement && all(stat.body, can_be_evicted_from_block)) {
=======
for (var i = 0; i < statements.length;) {
var stat = statements[i];
if (stat instanceof AST_BlockStatement) {
>>>>>>>
for (var i = 0; i < statements.length;) {
var stat = statements[i];
if (stat instanceof AST_BlockStatement && all(stat.body, can_be_evicted_from_block)) {
<<<<<<<
if (self.body instanceof AST_Node) { return self; }
self.body = tighten_body(self.body, compressor);
=======
tighten_body(self.body, compressor);
>>>>>>>
if (!(self.body instanceof AST_Node)) tighten_body(self.body, compressor);
<<<<<<<
if (exp instanceof AST_Function && !self.expression.is_generator && !self.expression.async) {
var stat = exp.body[0];
if (compressor.option("inline") && stat instanceof AST_Return) {
var value = stat && stat.value;
if (!value || value.is_constant_expression()) {
var args = self.args.concat(value || make_node(AST_Undefined, self));
return make_sequence(self, args).transform(compressor);
}
=======
var stat = fn instanceof AST_Function && fn.body[0];
if (compressor.option("inline") && stat instanceof AST_Return) {
var value = stat.value;
if (!value || value.is_constant_expression()) {
var args = self.args.concat(value || make_node(AST_Undefined, self));
return make_sequence(self, args).transform(compressor);
>>>>>>>
var stat = fn instanceof AST_Function && fn.body[0];
if (compressor.option("inline") && stat instanceof AST_Return) {
var value = stat.value;
if (!value || value.is_constant_expression()) {
var args = self.args.concat(value || make_node(AST_Undefined, self));
return make_sequence(self, args).transform(compressor); |
<<<<<<<
except : [],
keep_classnames: false,
=======
ie8 : false,
>>>>>>>
ie8 : false,
keep_classnames: false,
<<<<<<<
var mangle_with_block_scope =
(options.screw_ie8 && node instanceof AST_SymbolCatch) ||
node instanceof AST_SymbolBlockDeclaration;
if (mangle_with_block_scope) {
=======
if (!options.ie8 && node instanceof AST_SymbolCatch) {
>>>>>>>
var mangle_with_block_scope =
(!options.ie8 && node instanceof AST_SymbolCatch) ||
node instanceof AST_SymbolBlockDeclaration;
if (mangle_with_block_scope) { |
<<<<<<<
if (node.name
&& (!compressor.option("keep_classnames") && node instanceof AST_ClassExpression
|| !compressor.option("keep_fnames") && node instanceof AST_Function)) {
=======
var parent = tt.parent();
if (drop_vars) {
var sym = assign_as_unused(node);
if (sym instanceof AST_SymbolRef
&& !(sym.definition().id in in_use_ids)) {
if (node instanceof AST_Assign) {
return maintain_this_binding(parent, node, node.right.transform(tt));
}
return make_node(AST_Number, node, {
value: 0
});
}
}
if (scope !== self) return;
if (node instanceof AST_Function
&& node.name
&& !compressor.option("keep_fnames")) {
>>>>>>>
var parent = tt.parent();
if (drop_vars) {
var sym = assign_as_unused(node);
if (sym instanceof AST_SymbolRef
&& !((sym = sym.definition()).id in in_use_ids)
&& (drop_vars || !sym.global)) {
if (node instanceof AST_Assign) {
return maintain_this_binding(parent, node, node.right.transform(tt));
}
return make_node(AST_Number, node, {
value: 0
});
}
}
if (scope !== self) return;
if (node.name
&& (!compressor.option("keep_classnames") && node instanceof AST_ClassExpression
|| !compressor.option("keep_fnames") && node instanceof AST_Function)) {
<<<<<<<
if (drop_vars) {
var def = assign_as_unused(node);
if (def instanceof AST_SymbolRef
&& !((def = def.definition()).id in in_use_ids)
&& (drop_vars || !def.global)) {
if (node instanceof AST_Assign) {
return maintain_this_binding(parent, node, node.right.transform(tt));
}
return make_node(AST_Number, node, {
value: 0
});
}
}
=======
>>>>>>>
<<<<<<<
if (node instanceof AST_BlockStatement) {
descend(node, this);
if (in_list && all(node.body, can_be_evicted_from_block)) {
return MAP.splice(node.body);
}
}
if (node instanceof AST_Scope && node !== self)
=======
if (node instanceof AST_Scope) {
var save_scope = scope;
scope = node;
descend(node, this);
scope = save_scope;
>>>>>>>
if (node instanceof AST_BlockStatement) {
descend(node, this);
if (in_list && all(node.body, can_be_evicted_from_block)) {
return MAP.splice(node.body);
}
}
if (node instanceof AST_Scope) {
var save_scope = scope;
scope = node;
descend(node, this);
scope = save_scope;
<<<<<<<
if (scope === self
&& (sym = assign_as_unused(node)) instanceof AST_SymbolRef
&& !is_ref_of(node.left, AST_SymbolBlockDeclaration)
=======
if ((sym = assign_as_unused(node)) instanceof AST_SymbolRef
>>>>>>>
if ((sym = assign_as_unused(node)) instanceof AST_SymbolRef
&& !is_ref_of(node.left, AST_SymbolBlockDeclaration)
<<<<<<<
var simple_args = all(self.args, function(arg) {
return !(arg instanceof AST_Expansion);
});
=======
if (compressor.option("reduce_vars") && fn instanceof AST_SymbolRef) {
fn = fn.fixed_value();
}
>>>>>>>
var simple_args = all(self.args, function(arg) {
return !(arg instanceof AST_Expansion);
});
if (compressor.option("reduce_vars") && fn instanceof AST_SymbolRef) {
fn = fn.fixed_value();
}
<<<<<<<
&& simple_args
&& (is_func_expr(fn)
|| compressor.option("reduce_vars")
&& fn instanceof AST_SymbolRef
&& is_func_expr(fn = fn.fixed_value()))
=======
&& fn instanceof AST_Function
>>>>>>>
&& simple_args
&& is_func_expr(fn)
<<<<<<<
if (is_func_expr(exp) && !exp.is_generator && !exp.async) {
=======
if (fn instanceof AST_Function) {
>>>>>>>
if (is_func_expr(fn) && !fn.is_generator && !fn.async) {
<<<<<<<
&& simple_args
&& !exp.name
&& !exp.uses_arguments
&& !exp.uses_eval
&& (exp.body instanceof AST_Node || exp.body.length == 1)
&& !exp.contains_this()
&& all(exp.argnames, function(arg) {
if (arg instanceof AST_Expansion) return arg.expression.__unused;
=======
&& exp === fn
&& !fn.name
&& !fn.uses_arguments
&& !fn.uses_eval
&& fn.body.length == 1
&& !fn.contains_this()
&& all(fn.argnames, function(arg) {
>>>>>>>
&& exp === fn
&& simple_args
&& !fn.name
&& !fn.uses_arguments
&& !fn.uses_eval
&& (fn.body instanceof AST_Node || fn.body.length == 1)
&& !fn.contains_this()
&& all(fn.argnames, function(arg) {
if (arg instanceof AST_Expansion) return arg.expression.__unused;
<<<<<<<
if (compressor.option("side_effects") && !(exp.body instanceof AST_Node) && all(exp.body, is_empty)) {
=======
if (compressor.option("side_effects") && all(fn.body, is_empty)) {
>>>>>>>
if (compressor.option("side_effects") && !(fn.body instanceof AST_Node) && all(fn.body, is_empty)) {
<<<<<<<
&& consequent.args.length == 1
&& alternative.args.length == 1
&& !(consequent.args[0] instanceof AST_Expansion)
&& !(alternative.args[0] instanceof AST_Expansion)
=======
&& consequent.args.length > 0
&& consequent.args.length == alternative.args.length
>>>>>>>
&& consequent.args.length > 0
&& consequent.args.length == alternative.args.length |
<<<<<<<
def(AST_Node, function(){ return false });
def(AST_String, function(){ return true });
def(AST_TemplateString, function(){
return this.segments.length === 1;
});
=======
def(AST_Node, return_false);
def(AST_String, return_true);
>>>>>>>
def(AST_Node, function(){ return false });
def(AST_String, function(){ return true });
def(AST_TemplateString, function(){
return this.segments.length === 1;
});
<<<<<<<
def(AST_Defun, function(compressor){ return true });
def(AST_Function, function(compressor){ return false });
def(AST_Class, function(compressor){ return false });
def(AST_DefClass, function(compressor){ return true });
=======
def(AST_Defun, return_true);
def(AST_Function, return_false);
>>>>>>>
def(AST_Defun, return_true);
def(AST_Function, return_false);
def(AST_Class, return_false);
def(AST_DefClass, return_true); |
<<<<<<<
DEFPRINT(AST_Class, function(self, output){
output.print("class");
output.space();
if (self.name) {
self.name.print(output);
output.space();
}
if (self.extends) {
var parens = (
!(self.extends instanceof AST_SymbolRef)
&& !(self.extends instanceof AST_PropAccess)
&& !(self.extends instanceof AST_ClassExpression)
&& !(self.extends instanceof AST_Function)
);
output.print("extends");
if (parens) {
output.print("(");
} else {
output.space();
}
self.extends.print(output);
if (parens) {
output.print(")");
} else {
output.space();
}
}
if (self.properties.length > 0) output.with_block(function(){
self.properties.forEach(function(prop, i){
if (i) {
output.newline();
}
output.indent();
prop.print(output);
});
output.newline();
});
else output.print("{}");
});
DEFPRINT(AST_NewTarget, function(self, output) {
output.print("new.target");
});
AST_ObjectProperty.DEFMETHOD("print_property_name", function(key, quote, output) {
=======
function print_property_name(key, quote, output) {
>>>>>>>
DEFPRINT(AST_Class, function(self, output){
output.print("class");
output.space();
if (self.name) {
self.name.print(output);
output.space();
}
if (self.extends) {
var parens = (
!(self.extends instanceof AST_SymbolRef)
&& !(self.extends instanceof AST_PropAccess)
&& !(self.extends instanceof AST_ClassExpression)
&& !(self.extends instanceof AST_Function)
);
output.print("extends");
if (parens) {
output.print("(");
} else {
output.space();
}
self.extends.print(output);
if (parens) {
output.print(")");
} else {
output.space();
}
}
if (self.properties.length > 0) output.with_block(function(){
self.properties.forEach(function(prop, i){
if (i) {
output.newline();
}
output.indent();
prop.print(output);
});
output.newline();
});
else output.print("{}");
});
DEFPRINT(AST_NewTarget, function(self, output) {
output.print("new.target");
});
function print_property_name(key, quote, output) {
<<<<<<<
self._print_getter_setter("get", self, output);
});
DEFPRINT(AST_ConciseMethod, function(self, output){
if (self.static) {
output.print("static");
output.space();
}
if (self.is_generator) {
output.print("*");
}
if (self.key instanceof AST_SymbolMethod) {
self.print_property_name(self.key.name, self.quote, output);
} else {
output.with_square(function() {
self.key.print(output);
});
}
self.value._do_print(output, true);
=======
self._print_getter_setter("get", output);
>>>>>>>
self._print_getter_setter("get", output);
});
DEFPRINT(AST_ConciseMethod, function(self, output){
self._print_getter_setter(self.is_generator && "*", output); |
<<<<<<<
}
toplevel_const: {
options = {
hoist_props: true,
reduce_vars: true,
toplevel: false,
}
input: {
const a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect: {
const a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect_stdout: "3"
}
toplevel_let: {
options = {
hoist_props: true,
reduce_vars: true,
toplevel: false,
}
input: {
let a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect: {
let a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect_stdout: "3"
node_version: ">=6"
}
toplevel_var: {
options = {
hoist_props: true,
reduce_vars: true,
toplevel: false,
}
input: {
var a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect: {
var a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect_stdout: "3"
=======
}
undefined_key: {
options = {
evaluate: true,
hoist_props: true,
join_vars: true,
passes: 4,
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
var a, o = {};
o[a] = 1;
o.b = 2;
console.log(o[a] + o.b);
}
expect: {
console.log(3);
}
expect_stdout: "3"
>>>>>>>
}
toplevel_const: {
options = {
hoist_props: true,
reduce_vars: true,
toplevel: false,
}
input: {
const a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect: {
const a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect_stdout: "3"
}
toplevel_let: {
options = {
hoist_props: true,
reduce_vars: true,
toplevel: false,
}
input: {
let a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect: {
let a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect_stdout: "3"
node_version: ">=6"
}
toplevel_var: {
options = {
hoist_props: true,
reduce_vars: true,
toplevel: false,
}
input: {
var a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect: {
var a = {
b: 1,
c: 2
};
console.log(a.b + a.c);
}
expect_stdout: "3"
}
undefined_key: {
options = {
evaluate: true,
hoist_props: true,
join_vars: true,
passes: 4,
reduce_vars: true,
toplevel: true,
unused: true,
}
input: {
var a, o = {};
o[a] = 1;
o.b = 2;
console.log(o[a] + o.b);
}
expect: {
console.log(3);
}
expect_stdout: "3" |
<<<<<<<
var thingTimer = window.setInterval(doTheThing, 1000);
function clickTheThing() {
g_Minigame.m_CurrentScene.DoClick(
{
data: {
getLocalPosition: function() {
var enemy = g_Minigame.m_CurrentScene.GetEnemy(
g_Minigame.m_CurrentScene.m_rgPlayerData.current_lane,
g_Minigame.m_CurrentScene.m_rgPlayerData.target),
laneOffset = enemy.m_nLane * 440;
return {
x: enemy.m_Sprite.position.x - laneOffset,
y: enemy.m_Sprite.position.y - 52
}
}
}
}
);
}
var clickTimer = window.setInterval(clickTheThing, 1000/clickRate);
=======
function hasCooldown(abilityId) {
return g_Minigame.CurrentScene().GetCooldownForAbility(abilityId) > 0;
}
var thingTimer = window.setInterval(doTheThing, 1000);
>>>>>>>
function hasCooldown(abilityId) {
return g_Minigame.CurrentScene().GetCooldownForAbility(abilityId) > 0;
}
var thingTimer = window.setInterval(doTheThing, 1000);
function clickTheThing() {
g_Minigame.m_CurrentScene.DoClick(
{
data: {
getLocalPosition: function() {
var enemy = g_Minigame.m_CurrentScene.GetEnemy(
g_Minigame.m_CurrentScene.m_rgPlayerData.current_lane,
g_Minigame.m_CurrentScene.m_rgPlayerData.target),
laneOffset = enemy.m_nLane * 440;
return {
x: enemy.m_Sprite.position.x - laneOffset,
y: enemy.m_Sprite.position.y - 52
}
}
}
}
);
}
var clickTimer = window.setInterval(clickTheThing, 1000/clickRate); |
<<<<<<<
if (node.left instanceof AST_Destructuring) {
node.left.walk(suppressor);
return;
}
if (node.operator != "=" || !(node.left instanceof AST_SymbolRef)) return;
=======
if (!(node.left instanceof AST_SymbolRef)) return;
>>>>>>>
if (node.left instanceof AST_Destructuring) {
node.left.walk(suppressor);
return;
}
if (!(node.left instanceof AST_SymbolRef)) return;
<<<<<<<
function has_overlapping_symbol(fn, arg, fn_strict) {
var found = false, scan_this = !(fn instanceof AST_Arrow);
arg.walk(new TreeWalker(function(node, descend) {
if (found) return true;
if (node instanceof AST_SymbolRef && fn.variables.has(node.name)) {
var s = node.definition().scope;
if (s !== scope) while (s = s.parent_scope) {
if (s === scope) return true;
}
return found = true;
}
if ((fn_strict || scan_this) && node instanceof AST_This) {
return found = true;
}
if (node instanceof AST_Scope && !(node instanceof AST_Arrow)) {
var prev = scan_this;
scan_this = false;
descend();
scan_this = prev;
return true;
}
}));
return found;
}
=======
function handle_custom_scan_order(node) {
// Skip (non-executed) functions
if (node instanceof AST_Scope) return node;
// Scan case expressions first in a switch statement
if (node instanceof AST_Switch) {
node.expression = node.expression.transform(scanner);
for (var i = 0, len = node.body.length; !abort && i < len; i++) {
var branch = node.body[i];
if (branch instanceof AST_Case) {
if (!hit) {
if (branch !== hit_stack[hit_index]) continue;
hit_index++;
}
branch.expression = branch.expression.transform(scanner);
if (side_effects || !replace_all) break;
}
}
abort = true;
return node;
}
}
>>>>>>>
function handle_custom_scan_order(node) {
// Skip (non-executed) functions
if (node instanceof AST_Scope) return node;
// Scan case expressions first in a switch statement
if (node instanceof AST_Switch) {
node.expression = node.expression.transform(scanner);
for (var i = 0, len = node.body.length; !abort && i < len; i++) {
var branch = node.body[i];
if (branch instanceof AST_Case) {
if (!hit) {
if (branch !== hit_stack[hit_index]) continue;
hit_index++;
}
branch.expression = branch.expression.transform(scanner);
if (side_effects || !replace_all) break;
}
}
abort = true;
return node;
}
}
function has_overlapping_symbol(fn, arg, fn_strict) {
var found = false, scan_this = !(fn instanceof AST_Arrow);
arg.walk(new TreeWalker(function(node, descend) {
if (found) return true;
if (node instanceof AST_SymbolRef && fn.variables.has(node.name)) {
var s = node.definition().scope;
if (s !== scope) while (s = s.parent_scope) {
if (s === scope) return true;
}
return found = true;
}
if ((fn_strict || scan_this) && node instanceof AST_This) {
return found = true;
}
if (node instanceof AST_Scope && !(node instanceof AST_Arrow)) {
var prev = scan_this;
scan_this = false;
descend();
scan_this = prev;
return true;
}
}));
return found;
}
<<<<<<<
function references_in_scope(def) {
if (def.orig.length == 1 && def.orig[0] instanceof AST_SymbolDefun) return true;
if (def.scope.get_defun_scope() !== scope) return false;
return def.references.every(function(ref) {
return ref.scope.get_defun_scope() === scope;
=======
function may_modify(sym) {
var def = sym.definition();
if (def.orig.length == 1 && def.orig[0] instanceof AST_SymbolDefun) return false;
if (def.scope !== scope) return true;
return !all(def.references, function(ref) {
return ref.scope === scope;
>>>>>>>
function may_modify(sym) {
var def = sym.definition();
if (def.orig.length == 1 && def.orig[0] instanceof AST_SymbolDefun) return false;
if (def.scope.get_defun_scope() !== scope) return true;
return !all(def.references, function(ref) {
return ref.scope.get_defun_scope() === scope;
<<<<<<<
=======
if (!node_def.chained && def.name.fixed_value() === def.value) {
fixed_ids[node_def.id] = def;
}
>>>>>>> |
<<<<<<<
// pass 4: add symbol definitions to loop scopes
// Safari/Webkit bug workaround - loop init let variable shadowing argument.
// https://github.com/mishoo/UglifyJS2/issues/1753
// https://bugs.webkit.org/show_bug.cgi?id=171041
if (options.safari10) {
for (var i = 0; i < for_scopes.length; i++) {
var scope = for_scopes[i];
scope.parent_scope.variables.each(function(def) {
push_uniq(scope.enclosed, def);
});
}
}
if (options.cache) {
this.cname = options.cache.cname;
}
=======
>>>>>>>
// pass 4: add symbol definitions to loop scopes
// Safari/Webkit bug workaround - loop init let variable shadowing argument.
// https://github.com/mishoo/UglifyJS2/issues/1753
// https://bugs.webkit.org/show_bug.cgi?id=171041
if (options.safari10) {
for (var i = 0; i < for_scopes.length; i++) {
var scope = for_scopes[i];
scope.parent_scope.variables.each(function(def) {
push_uniq(scope.enclosed, def);
});
}
} |
<<<<<<<
&& iife.expression === fn
&& all(iife.args, function(arg) {
return !(arg instanceof AST_Expansion);
})) {
fn.argnames.forEach(function(sym, i) {
if (sym instanceof AST_Expansion) {
var elements = iife.args.slice(i);
if (all(elements, function(arg) {
return !has_overlapping_symbol(fn, arg);
})) {
candidates.push(make_node(AST_VarDef, sym, {
name: sym.expression,
value: make_node(AST_Array, iife, {
elements: elements
})
}));
}
} else {
var arg = iife.args[i];
if (!arg) arg = make_node(AST_Undefined, sym);
else if (has_overlapping_symbol(fn, arg)) arg = null;
if (arg) candidates.push(make_node(AST_VarDef, sym, {
name: sym,
value: arg
}));
}
});
=======
&& iife.expression === fn) {
var names = Object.create(null);
for (var i = fn.argnames.length; --i >= 0;) {
var sym = fn.argnames[i];
if (sym.name in names) continue;
names[sym.name] = true;
var arg = iife.args[i];
if (!arg) arg = make_node(AST_Undefined, sym);
else {
var tw = new TreeWalker(function(node) {
if (!arg) return true;
if (node instanceof AST_SymbolRef && fn.variables.has(node.name)) {
var s = node.definition().scope;
if (s !== scope) while (s = s.parent_scope) {
if (s === scope) return true;
}
arg = null;
}
if (node instanceof AST_This && !tw.find_parent(AST_Scope)) {
arg = null;
return true;
}
});
arg.walk(tw);
}
if (arg) candidates.unshift(make_node(AST_VarDef, sym, {
name: sym,
value: arg
}));
}
>>>>>>>
&& iife.expression === fn
&& all(iife.args, function(arg) {
return !(arg instanceof AST_Expansion);
})) {
var names = Object.create(null);
for (var i = fn.argnames.length; --i >= 0;) {
var sym = fn.argnames[i];
if (sym.name in names) continue;
names[sym.name] = true;
if (sym instanceof AST_Expansion) {
var elements = iife.args.slice(i);
if (all(elements, function(arg) {
return !has_overlapping_symbol(fn, arg);
})) {
candidates.unshift(make_node(AST_VarDef, sym, {
name: sym.expression,
value: make_node(AST_Array, iife, {
elements: elements
})
}));
}
} else {
var arg = iife.args[i];
if (!arg) arg = make_node(AST_Undefined, sym);
else if (has_overlapping_symbol(fn, arg)) arg = null;
if (arg) candidates.unshift(make_node(AST_VarDef, sym, {
name: sym,
value: arg
}));
}
}
<<<<<<<
def(AST_Lambda, function(){
throw def;
});
def(AST_Class, function() {
throw def;
});
=======
def(AST_Lambda, return_this);
>>>>>>>
def(AST_Lambda, return_this);
def(AST_Class, return_this);
<<<<<<<
// Function would be evaluated to an array and so typeof would
// incorrectly return 'object'. Hence making is a special case.
if (is_func_expr(e)) return typeof function(){};
e = ev(e, compressor);
=======
>>>>>>>
<<<<<<<
case "&&" : result = ev(left, c) && ev(right, c); break;
case "||" : result = ev(left, c) || ev(right, c); break;
case "|" : result = ev(left, c) | ev(right, c); break;
case "&" : result = ev(left, c) & ev(right, c); break;
case "^" : result = ev(left, c) ^ ev(right, c); break;
case "+" : result = ev(left, c) + ev(right, c); break;
case "*" : result = ev(left, c) * ev(right, c); break;
case "**" : result = Math.pow(ev(left, c), ev(right, c)); break;
case "/" : result = ev(left, c) / ev(right, c); break;
case "%" : result = ev(left, c) % ev(right, c); break;
case "-" : result = ev(left, c) - ev(right, c); break;
case "<<" : result = ev(left, c) << ev(right, c); break;
case ">>" : result = ev(left, c) >> ev(right, c); break;
case ">>>" : result = ev(left, c) >>> ev(right, c); break;
case "==" : result = ev(left, c) == ev(right, c); break;
case "===" : result = ev(left, c) === ev(right, c); break;
case "!=" : result = ev(left, c) != ev(right, c); break;
case "!==" : result = ev(left, c) !== ev(right, c); break;
case "<" : result = ev(left, c) < ev(right, c); break;
case "<=" : result = ev(left, c) <= ev(right, c); break;
case ">" : result = ev(left, c) > ev(right, c); break;
case ">=" : result = ev(left, c) >= ev(right, c); break;
=======
case "&&" : result = left && right; break;
case "||" : result = left || right; break;
case "|" : result = left | right; break;
case "&" : result = left & right; break;
case "^" : result = left ^ right; break;
case "+" : result = left + right; break;
case "*" : result = left * right; break;
case "/" : result = left / right; break;
case "%" : result = left % right; break;
case "-" : result = left - right; break;
case "<<" : result = left << right; break;
case ">>" : result = left >> right; break;
case ">>>" : result = left >>> right; break;
case "==" : result = left == right; break;
case "===" : result = left === right; break;
case "!=" : result = left != right; break;
case "!==" : result = left !== right; break;
case "<" : result = left < right; break;
case "<=" : result = left <= right; break;
case ">" : result = left > right; break;
case ">=" : result = left >= right; break;
>>>>>>>
case "&&" : result = left && right; break;
case "||" : result = left || right; break;
case "|" : result = left | right; break;
case "&" : result = left & right; break;
case "^" : result = left ^ right; break;
case "+" : result = left + right; break;
case "*" : result = left * right; break;
case "**" : result = Math.pow(left, right); break;
case "/" : result = left / right; break;
case "%" : result = left % right; break;
case "-" : result = left - right; break;
case "<<" : result = left << right; break;
case ">>" : result = left >> right; break;
case ">>>" : result = left >>> right; break;
case "==" : result = left == right; break;
case "===" : result = left === right; break;
case "!=" : result = left != right; break;
case "!==" : result = left !== right; break;
case "<" : result = left < right; break;
case "<=" : result = left <= right; break;
case ">" : result = left > right; break;
case ">=" : result = left >= right; break; |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.