Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
// IMPORTS =========================================================================================
require("../../common/scripts/shims");
let Cycle = require("cyclejs");
let Model = require("./model");
let View = require("./view");
let Intent = require("./intent");
// APP =============================================================================================
let User = Cycle.createDOMUser("main");
User.inject(View).inject(Model).inject(Intent).inject(User);
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o
var Rx = Cycle.Rx;
var h = Cycle.h;
var Menu = require("./menu");
// APP =============================================================================================
var data = ["Home", "Services", "About", "Contact us"];
var active = "Services";
var View = Cycle.createView(function () {
return {
vtree$: Rx.Observable["return"](h("div", null, [h("Menu", { items: data, active: active })])) };
});
Cycle.createDOMUser("main").inject(View);
},{"../../common/scripts/shims":3,"./menu":2,"cyclejs":"cyclejs"}],2:[function(require,module,exports){
"use strict";
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o
});
var Intent = Cycle.createIntent(function (User) {
return {
pause$: User.event$(".btn.pause", "click").map(function () {
return true;
}),
continue$: User.event$(".btn.continue", "click").map(function () {
return true;
}),
stop$: User.event$(".btn.stop", "click").map(function () {
return true;
}) };
});
var User = Cycle.createDOMUser("main");
User.inject(View).inject(Model).inject(Intent).inject(User);
},{"classnames":"classnames","cyclejs":"cyclejs"}]},{},[1])
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uL3Vzci9sb2NhbC9saWIvbm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL2Jyb3dzZXItcGFjay9fcHJlbHVkZS5qcyIsImJ1aWxkL3NjcmlwdHMvYXBwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0FDQ0EsSUFBSSxTQUFTLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDO0FBQ3RDLElBQUksS0FBSyxHQUFHLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUMxQixFQUFFLEdBQU8sS0FBSyxDQUFkLEVBQUU7SUFBRSxDQUFDLEdBQUksS0FBSyxDQUFWLENBQUM7OztBQUdWLElBQUksS0FBSyxHQUFHLEtBQUssQ0FBQyxXQUFXLENBQUMsVUFBQSxNQUFNLEVBQUk7QUFDdEMsTUFBSSxPQUFPLEdBQUcsSUFBSSxDQUFDLEdBQUcsRUFBRSxDQUFDO0FBQ3pCLE1BQUksUUFBUSxHQUFHLEVBQUUsQ0FBQyxVQUFVLENBQUMsS0FBSyxDQUNoQyxNQUFNLENBQUMsR0FBRyxDQUFDLFdBQVcsQ0FBQyxFQUN2QixNQUFNLENBQUMsR0FBRyxDQUFDLFFBQVEsQ0FBQyxDQUFDLEdBQUcsQ0FBQztXQUFNLEtBQUs7R0FBQSxDQUFDLENBQ3RD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nBhdXNlXCIsIFwiY2xpY2tcIikubWFwKCgpID0+IHRydWUpLFxuICAgIGNvbnRpbnVlJDogVXNlci5ldmVudCQoXCIuYnRuLmNvbnRpbnVlXCIsIFwiY2xpY2tcIikubWFwKCgpID0+IHRydWUpLFxuICAgIHN0b3AkOiBVc2VyLmV2ZW50JChcIi5idG4uc3RvcFwiLCBcImNsaWNrXCIpLm1hcCgoKSA9PiB0cnVlKSxcbiAgfVxufSk7XG5cbmxldCBVc2VyID0gQ3ljbGUuY3JlYXRlRE9NVXNlcihcIm1haW5cIik7XG5cblVzZXIuaW5qZWN0KFZpZXcpLmluamVjdChNb2RlbCkuaW5qZWN0KEludGVudCkuaW5qZWN0KFVzZXIpOyJdfQ==
});
var Intent = Cycle.createIntent(function (DOM) {
return {
pause$: DOM.event$(".btn.pause", "click").map(function () {
return true;
}),
continue$: DOM.event$(".btn.continue", "click").map(function () {
return true;
}),
stop$: DOM.event$(".btn.stop", "click").map(function () {
return true;
}) };
});
var DOM = Cycle.createDOMUser("main");
DOM.inject(View).inject(Model).inject(Intent).inject(DOM);
},{"classnames":"classnames","cyclejs":"cyclejs"}]},{},[1])
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3Vzci9sb2NhbC9saWIvbm9kZV9tb2R1bGVzL2Jyb3dzZXJpZnkvbm9kZV9tb2R1bGVzL2Jyb3dzZXItcGFjay9fcHJlbHVkZS5qcyIsImJ1aWxkLzEuMi10aW1lci1tb3JlL3NjcmlwdHMvYXBwLmpzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOzs7O0FDQ0EsSUFBSSxTQUFTLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDO0FBQ3RDLElBQUksS0FBSyxHQUFHLE9BQU8sQ0FBQyxTQUFTLENBQUMsQ0FBQztJQUMxQixFQUFFLEdBQU8sS0FBSyxDQUFkLEVBQUU7SUFBRSx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VORFwiLGZ9dmFyIGw9bltvXT17ZXhwb3J0czp7fX07dFtvXVswXS5jYWxsKGwuZXhwb3J0cyxmdW5jdGlvbihlKXt2YXIgbj10W29dWzFdW2VdO3JldHVybiBzKG4/bjplKX0sbCxsLmV4cG9ydHMsZSx0LG4scil9cmV0dXJuIG5bb10uZXhwb3J0c312YXIgaT10eXBlb2YgcmVxdWlyZT09XCJmdW5jdGlvblwiJiZyZXF1aXJlO2Zvcih2YXIgbz0wO288ci5sZW5ndGg7bysrKXMocltvXSk7cmV0dXJuIHN9KSIsIi8vIElNUE9SVFMgPT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT1cbmxldCBtYWtlQ2xhc3MgPSByZXF1aXJlKFwiY2xhc3NuYW1lc1wiKTtcbmxldCBDeWNsZSA9IHJlcXVpcmUoXCJjeWNsZWpzXCIpO1xubGV0IHtSeCwgaH0gPSBDeWNsZTtcblxuLy8gQVBQID09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PVxubGV0IE1vZGVsID0gQ3ljbGUuY3JlYXRlTW9kZWwoSW50ZW50ID0+IHtcbiAgbGV0IHN0YXJ0ZWQgPSBEYXRlLm5vdygpO1xuICBsZXQgY29udHJvbCQgPSBSeC5PYnNlcnZhYmxlLm1lcmdlKFxuICAgIEludGVudC5nZXQoXCJjb250aW51ZSRcIiksXG4gICAgSW50ZW50LmdldChcInBhdXNlJFwiKS5tYXAoKCkgPT4gZmFsc2UpXG4gICk7XG4gIHJldHVybiB7XG4gICAgbXNTaW5jZVN0YXJ0JDogUnguT2JzZXJ2YWJsZS5pbnRlcnZhbCgxMDApXG4gICAgICAubWFwKCgpID0+IERhdGUubm93KCkgLSBzdGFydGVkKVxuICAgICAgLnBhdXNhYmxlKGNvbnRyb2wkLn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GVmYXVsdCBjb250aW51ZVwiLCBkaXNhYmxlZDogc3RvcHBlZH0sIFtcIkNvbnRpbnVlXCJdKSxcbiAgICAgICAgICAgICAgaCgnYnV0dG9uJywge2NsYXNzTmFtZTogXCJidG4gYnRuLWRlZmF1bHQgc3RvcFwiLCBkaXNhYmxlZDogc3RvcHBlZH0sIFtcIlN0b3BcIl0pXG4gICAgICAgICAgICBdKVxuICAgICAgICAgIF0pXG4gICAgICAgICk7XG4gICAgICB9XG4gICAgKSxcbiAgfTtcbn0pO1xuXG5sZXQgSW50ZW50ID0gQ3ljbGUuY3JlYXRlSW50ZW50KERPTSA9PiB7XG4gIHJldHVybiB7XG4gICAgcGF1c2UkOiBET00uZXZlbnQkKFwiLmJ0bi5wYXVzZVwiLCBcImNsaWNrXCIpLm1hcCgoKSA9PiB0cnVlKSxcbiAgICBjb250aW51ZSQ6IERPTS5ldmVudCQoXCIuYnRuLmNvbnRpbnVlXCIsIFwiY2xpY2tcIikubWFwKCgpID0+IHRydWUpLFxuICAgIHN0b3AkOiBET00uZXZlbnQkKFwiLmJ0bi5zdG9wXCIsIFwiY2xpY2tcIikubWFwKCgpID0+IHRydWUpLFxuICB9XG59KTtcblxubGV0IERPTSA9IEN5Y2xlLmNyZWF0ZURPTVVzZXIoXCJtYWluXCIpO1xuXG5ET00uaW5qZWN0KFZpZXcpLmluamVjdChNb2RlbCkuaW5qZWN0KEludGVudCkuaW5qZWN0KERPTSk7Il19
let data = [
{name: "Web Development", price: 300},
{name: "Design", price: 400},
{name: "Integration", price: 250},
{name: "Training", price: 220}
];
let active = ["Web Development", "Integration"];
let View = Cycle.createView(() => ({
vtree$: Rx.Observable.return(
<menu>
),
}));
Cycle.createDOMUser("main").inject(View);</menu>
return {
pause$: User.event$(".btn.pause", "click").map(function () {
return true;
}),
resume$: User.event$(".btn.resume", "click").map(function () {
return true;
}),
continue$: User.event$(".btn.continue", "click").map(function () {
return true;
}),
stop$: User.event$(".btn.stop", "click").map(function () {
return true;
}) };
});
var User = Cycle.createDOMUser("main");
User.inject(View).inject(Model).inject(Intent).inject(User);
},{"../../common/scripts/shims":2,"classnames":"classnames","cyclejs":"cyclejs"}],2:[function(require,module,exports){
"use strict";
active$: Rx.Observable.interval(2000)
.map(() => generateRandomActive(data)),
}
});
let View = Cycle.createView(Model => ({
vtree$: Model.get("active$").map(active => {
return (
<div>
<menu>
</menu></div>
);
}),
}));
Cycle.createDOMUser("main").inject(View).inject(Model);