Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save fluffywaffles/9f5367f9232e4452d22c73e481cb4f7b to your computer and use it in GitHub Desktop.
Save fluffywaffles/9f5367f9232e4452d22c73e481cb4f7b to your computer and use it in GitHub Desktop.
Blendle js source (mangled, webpack)
This file has been truncated, but you can view the full file.
webpackJsonp([2], {
0: function(e, t, n) {
"use strict";
var i = n(1)["default"];
n(657);
var s = n(5929)
, r = i(s)
, a = n(34)
, o = i(a)
, l = n(25)
, u = i(l)
, c = n(16)
, d = i(c)
, p = n(105)
, f = i(p);
f["default"].applicationBooting(),
o["default"].Deferred = function() {
return u["default"].defer()
}
,
d["default"].embedded = !1,
"BlendleEmbedded" in window && (d["default"].embedded = window.BlendleEmbedded.embedded,
d["default"].embeddedOrigin = window.BlendleEmbedded.origin,
d["default"].embeddedDomain = window.BlendleEmbedded.domain),
d["default"].open = document.location.href.match(/\?open/),
d["default"].url = r["default"].api;
var h = n(140);
h.load()
},
14: function(e, t, n) {
var i = n(42)
, s = n(96)
, r = n(85)
, a = n(73)
, o = n(83)
, l = "prototype"
, u = function(e, t, n) {
var c, d, p, f, h = e & u.F, m = e & u.G, g = e & u.S, v = e & u.P, y = e & u.B, _ = m ? i : g ? i[t] || (i[t] = {}) : (i[t] || {})[l], b = m ? s : s[t] || (s[t] = {}), w = b[l] || (b[l] = {});
m && (n = t);
for (c in n)
d = !h && _ && c in _,
p = (d ? _ : n)[c],
f = y && d ? o(p, i) : v && "function" == typeof p ? o(Function.call, p) : p,
_ && !d && a(_, c, p),
b[c] != p && r(b, c, f),
v && w[c] != p && (w[c] = p)
}
;
i.core = s,
u.F = 1,
u.G = 2,
u.S = 4,
u.P = 8,
u.B = 16,
u.W = 32,
e.exports = u
},
20: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(2)
, a = s(r)
, o = n(11)
, l = s(o)
, u = a["default"].createClass({
displayName: "Button",
propTypes: {
disabled: a["default"].PropTypes.bool,
loading: a["default"].PropTypes.bool,
children: a["default"].PropTypes.oneOfType([a["default"].PropTypes.array, a["default"].PropTypes.string]),
className: a["default"].PropTypes.string,
type: a["default"].PropTypes.string,
onSubmit: a["default"].PropTypes.func,
onClick: a["default"].PropTypes.func
},
_onSubmit: function(e) {
this.props.loading || this.props.onSubmit && this.props.onSubmit(e)
},
_onClick: function(e) {
this.props.loading || this.props.onClick && this.props.onClick(e)
},
render: function() {
var e, t = (0,
l["default"])((e = {
btn: !0
},
i(e, this.props.className, this.props.className),
i(e, "s-inactive", this.props.disabled),
i(e, "s-loading", this.props.loading),
e));
return a["default"].createElement("button", {
onSubmit: this._onSubmit,
onClick: this._onClick,
className: t,
type: this.props.type
}, this.props.children)
}
});
t["default"] = u,
e.exports = t["default"]
},
29: 45,
33: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(558)
, o = i(a)
, l = n(11)
, u = i(l)
, c = n(8);
t["default"] = r["default"].createClass({
displayName: "Dialogue",
propTypes: {
className: r["default"].PropTypes.string,
onClose: r["default"].PropTypes.func,
allowClose: r["default"].PropTypes.bool,
hideClose: r["default"].PropTypes.bool,
closeOnEscapeKey: r["default"].PropTypes.bool,
onKeyDown: r["default"].PropTypes.func,
children: r["default"].PropTypes.any
},
getDefaultProps: function() {
return {
allowClose: !0,
hideClose: !1,
closeOnEscapeKey: !0
}
},
getInitialState: function() {
return {}
},
componentDidMount: function() {
window.addEventListener("keydown", this._onKeyDown)
},
componentWillUnmount: function() {
window.removeEventListener("keydown", this._onKeyDown)
},
_onKeyDown: function(e) {
return e.keyCode === c.keyCode.ESC && this.props.closeOnEscapeKey ? this._onClose(e) : void (this.props.onKeyDown && this.props.onKeyDown(e))
},
_onClose: function(e) {
var t = this;
this.props.allowClose && (this.setState({
willClose: !0
}),
setTimeout(function() {
t.setState({
closed: !0
}),
t.props.onClose && t.props.onClose(e)
}, 200))
},
_renderCloseButton: function() {
return this.props.hideClose || !this.props.allowClose ? !1 : r["default"].createElement("div", {
className: "btn btn-close",
"aria-label": "Close",
onClick: this._onClose
})
},
render: function() {
if (this.state.closed)
return !1;
var e = (0,
u["default"])({
"will-close": this.state.willClose
});
return r["default"].createElement(o["default"], {
onClick: this._onClose,
className: e
}, r["default"].createElement("dialog", {
className: this.props.className + " dialog-animation",
open: "open"
}, this._renderCloseButton(), this.props.children))
}
}),
e.exports = t["default"]
},
36: 125,
39: [5930, 36],
40: [5964, 436, 130, 42],
42: 70,
46: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(3)
, d = o(c)
, p = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
return u["default"].createElement(d["default"].TranslateElement, {
node: u["default"].DOM[this.props.nodeName](this.props),
sanitize: this.props.sanitize,
args: this.props.args,
path: this.props.find
})
}
}], [{
key: "propTypes",
value: {
find: u["default"].PropTypes.string.isRequired,
args: u["default"].PropTypes.array,
sanitize: u["default"].PropTypes.bool,
nodeName: u["default"].PropTypes.string
},
enumerable: !0
}, {
key: "defaultProps",
value: {
sanitize: !0,
nodeName: "span",
args: [],
find: ""
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = p,
e.exports = t["default"]
},
51: 148,
56: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(94)["default"]
, l = n(21)["default"]
, u = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var c = n(2)
, d = u(c)
, p = n(77)
, f = u(p)
, h = n(8)
, m = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
var e = this.props
, t = e.fallback
, n = o(e, ["fallback"]);
return d["default"].createElement(f["default"], l({
fallback: t || h.DEFAULT_AVATAR
}, n))
}
}], [{
key: "propTypes",
value: {
src: d["default"].PropTypes.string.isRequired,
fallback: d["default"].PropTypes.string
},
enumerable: !0
}]),
t
}(d["default"].Component);
t["default"] = m,
e.exports = t["default"]
},
58: function(e, t, n) {
"use strict";
var i = n(2)
, s = n(15)
, r = n(11);
e.exports = {
propTypes: {
onSubmit: i.PropTypes.func.isRequired
},
getInitialState: function() {
return {
valid: !0,
loading: !1,
navigateNext: !1
}
},
componentDidMount: function() {
this.updateNavigationState(),
this.props.disabled || this.focusAndSelectMainField()
},
componentDidUpdate: function(e) {
this.props.disabled || !e.disabled && e || this.focusAndSelectMainField(),
this.props.disabled && !e.disabled && this.blurMainField()
},
getField: function(e, t) {
return t || (t = s.findDOMNode(this)),
t.elements[e]
},
getMainField: function() {
return this.refs.mainField ? s.findDOMNode(this.refs.mainField) : void 0
},
getFieldClassNames: function() {
return r({
"main-input": !0,
"main-input-valid": this.state.valid,
"main-input-invalid": !this.state.valid
})
},
getFieldValue: function(e) {
return e ? "checkbox" === e.type ? e.checked : e.value : void 0
},
onMainFieldChange: function() {
this.resetValidation(),
this.updateNavigationState()
},
updateNavigationState: function() {
var e = this.getFieldValue(this.getMainField())
, t = !0;
"string" == typeof e && (t = e.length > 0),
this.setState({
navigateNext: t
})
},
resetValidation: function() {
this.setState({
valid: !0
})
},
onSubmit: function(e, t) {
var n = this;
if (e && e.preventDefault && e.preventDefault(),
!this.state.loading) {
this.setState({
loading: !0
});
var i = [];
this.getMainField() && i.push(this.getFieldValue(this.getMainField())),
t && (i = i.concat(t)),
this.props.onSubmit.apply(this, i).then(function(e) {
n.isMounted() && (n.setState({
valid: !0,
loading: !1
}),
n.blurMainField()),
n.onSubmitValid && n.onSubmitValid(e)
}, function(e) {
if (n.isMounted() && (n.setState({
valid: !1,
loading: !1
}),
n.focusAndSelectMainField()),
n.onSubmitError && n.onSubmitError(e),
!(!e || e && e.xhr))
throw e
}).done()
}
},
focusAndSelectMainField: function() {
this.refs.mainField && "checkbox" !== s.findDOMNode(this.refs.mainField).type && "iPhone" !== window.BrowserDetect.device && ("Explorer" === window.BrowserDetect.browser && window.BrowserDetect.version <= 11 || this._focusAndSelect(this.refs.mainField))
},
_focusAndSelect: function(e) {
s.findDOMNode(e).focus(),
s.findDOMNode(e).select()
},
blurMainField: function() {
this.refs.mainField && s.findDOMNode(this.refs.mainField).blur()
}
}
},
60: 191,
61: [5962, 156],
65: function(e, t, n) {
"use strict";
var i = n(21)["default"]
, s = n(24)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(35)
, o = r(a)
, l = n(4)
, u = r(l)
, c = n(16)
, d = r(c)
, p = n(244)
, f = r(p)
, h = n(47)
, m = r(h)
, g = n(8)
, v = n(13)
, y = r(v)
, _ = {
_errors: {
"Id already exists": {
type: g.USER_ID_TAKEN,
message: "Provided ID for user already exists"
},
"email blank": {
type: g.EMAIL_INVALID,
message: "Provided e-mail address is blank"
},
"invalid email": {
type: g.EMAIL_INVALID,
message: "Provided e-mail address is invalid"
},
"Email already exists": {
type: g.EMAIL_EXISTS,
message: "Provided e-mail address already exists"
},
"id too long": {
type: "IDTooLong",
message: "ID is too long"
},
"Temporary email service detected": {
type: "TemporaryEmailServiceUsed",
message: "Temporary email service detected"
},
"Facebook id already exists": {
type: "FacebookIDTaken",
message: "Facebook ID already exists"
},
"email not allowed": {
type: g.EMAIL_INVALID,
message: "Provided e-mail address is invalid"
}
},
emailIsAvailable: function(e) {
return this.userIdIsAvailable(e.trim().toLowerCase())
},
emailIsAllowed: function(e) {
var t = e.split("@")[0].trim().toLowerCase()
, n = e.split("@")[1].trim().toLowerCase();
return -1 !== t.indexOf("+") && "blendle" !== n.split(".")[0] ? (y["default"].track("SignUp", {
event: "signup_error",
message: "plus sign in email"
}),
s.reject(new o["default"](g.EMAIL_CONTAINS_PLUS_SIGN,"Email is not allowed"))) : u["default"].ajax({
url: "https://static.blendle.com/blacklisted_domains.json"
}).then(function(t) {
var i = t.data.find(function(e) {
return n === e.toLowerCase()
});
return i ? (y["default"].track("SignUp", {
event: "signup_error",
message: "blacklisted domain"
}),
s.reject(new o["default"](g.EMAIL_BLACKLISTED,"Email is not allowed"))) : e
})
},
userIdIsAvailable: function(e) {
return u["default"].ajax({
url: d["default"].getLink("user", {
user_id: e
}) + "?q=exists"
}).then(function() {
return s.reject(new o["default"](g.USER_ID_TAKEN,"User ID Unavailable"))
}, function() {
return s.resolve(e)
})
},
signup: function(e) {
var t = "";
return t = m["default"].get("signUpCode") ? m["default"].get("signUpCode").exportForSignUp(e) : e.toJSON(),
u["default"].ajax({
url: d["default"].getLink("users"),
type: "POST",
data: JSON.stringify(i({
referrer: window.document.referrer
}, t))
}).then(function(e) {
return _._constructToken(e)
}).then(function(e) {
return y["default"].signup(e.getEmbedded("user")),
e
})["catch"](function(e) {
var t = _._errors[e.data.message];
if (422 === e.status && t)
throw new o["default"](t.type,t.message,e);
throw e
})
},
confirmEmail: function(e) {
return u["default"].ajax({
url: d["default"].getLink("confirm_email", {
token: e
}),
type: "GET"
}).then(function(e) {
return s.resolve(new f["default"](e.data,{
parse: !0,
track: !0
}))
}, function(e) {
return 404 === e.status ? s.reject(new o["default"]("ConfirmationTokenDoesNotExit","Confirmation token doesn't exist")) : s.reject(new o["default"]("InvalidConfirmationToken","Invalid confirmation token provided"))
})
},
resendEmailConfirmation: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1];
return u["default"].ajax({
url: d["default"].getLink("user_resend_confirmation_email", {
user_id: u["default"].Helpers.modelId(e)
}),
type: "POST",
data: JSON.stringify(t)
})
},
getSignUpRewards: function(e) {
return u["default"].ajax({
url: d["default"].getLink("signup_rewards", {
user_id: e
}),
type: "get"
}).then(function(e) {
return e.data.rewards
})
},
_constructToken: function(e) {
return new f["default"](e.data,{
parse: !0,
track: !0
})
}
};
t["default"] = _,
e.exports = t["default"]
},
66: function(e, t, n) {
"use strict";
var i = n(4)
, s = n(5)
, r = n(25)
, a = n(16)
, o = n(12)
, l = n(244)
, u = n(67)
, c = (n(3),
{
requestResetToken: function(e) {
return i.ajax({
url: a.get("links").request_password_reset_token.href,
type: "post",
data: JSON.stringify({
email: e
})
})
},
resetPassword: function(e, t) {
return i.ajax({
url: a.get("links").password_reset.href,
type: "post",
data: JSON.stringify({
password: t,
token: e
})
}).then(function(e) {
return o.loginWithToken(new l(e.data,{
track: !0,
parse: !0
}))
})
},
followUser: function(e, t) {
return t = i.Helpers.toArray(t),
i.ajax({
url: a.getLink("follows", {
user_id: e.id
}),
data: JSON.stringify({
user_uids: t.map(function(e) {
return {
id: i.Helpers.modelId(e)
}
})
}),
type: "POST"
}).then(function() {
return t.forEach(function(t) {
e.increaseFollowCount && e.increaseFollowCount(),
t.setFollowed && t.setFollowed()
}),
r.resolve(t)
})
},
unfollowUser: function(e, t) {
return i.ajax({
url: a.getLink("follows", {
user_id: e.id
}) + "/" + t.id,
type: "DELETE"
}).then(function() {
return e.decreaseFollowCount(),
t.unsetFollowed && t.unsetFollowed(),
r.resolve(t)
})
},
toggleFollow: function(e, t) {
return t.get("following") ? this.unfollowUser(e, t) : this.followUser(e, t)
},
saveFacebookCredentials: function(e, t) {
return i.ajax({
url: a.getLink("user", {
user_id: e.id
}),
type: "POST",
data: JSON.stringify({
facebook_id: t.userID,
facebook_access_token: t.accessToken
})
}).then(function() {
return e.set("facebook_id", t.userID),
e.set("facebook_access_token", t.accessToken),
r.resolve(e)
})
},
disconnectFromFacebook: function(e) {
return this.saveFacebookCredentials(e, {
userID: null ,
accessToken: null
})
},
followUsers: function(e, t) {
var n = t.filter(function(t) {
return i.Helpers.modelId(t) !== i.Helpers.modelId(e)
});
return r.all(s.map(n, function(t) {
return c.followUser(e, t).fail(r.resolve)
})).then(function() {
return r.resolve(n)
})
},
getUser: function(e) {
var t = new u({
id: e
},{
track: !0
});
return t.get("fullname") ? r.resolve(t) : c.fetchUser(e)
},
fetchUser: function(e) {
return i.ajax({
url: a.getLink("user", {
user_id: e
})
}).then(function(e) {
return new u(e.data,{
track: !0,
parse: !0
})
})
},
setAvatarByURL: function(e, t) {
return i.ajax({
url: a.getLink("user", {
user_id: i.Helpers.modelId(e)
}) + "/avatars",
type: "POST",
contentType: "application/x-www-form-urlencoded",
data: "avatar_url=" + encodeURIComponent(t)
}).then(function() {
return r.resolve(e)
})
},
resendConfirmationEmail: function(e) {
return i.ajax({
url: a.getLink("user_resend_confirmation_email", {
user_id: e
}),
type: "POST"
})
}
});
e.exports = c
},
68: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(25)
, s = (n(5),
n(3))
, r = n(66)
, a = n(708)
, o = n(841)
, l = t.Module.extend({
name: "dialogue",
type: "dialogue",
afterLoadOrWake: function() {},
openDialogue: function(e, t) {
this.setController(new a({
module: this,
area: this.getArea(),
callback: t
})),
this.getController().showDialogue(e),
this.load()
},
openDialogueWithView: function(e, t, n) {
this.setController(new a({
module: this,
area: this.getArea(),
callback: n
})),
this.getController().showDialogueWithView(e, t),
this.load()
},
resetPassword: function(e) {
var t = this;
return i.promise(function(n, i) {
t.openDialogueWithView(new o({
title: s.locale.settings.profile.no_password_set_title,
more: s.translate("settings.profile.no_password_set_more", e.get("email")),
hideCancelButton: !0,
confirmButton: s.locale.settings.profile.no_password_set_button,
confirmCallback: function() {
r.requestResetToken(e.get("email")).then(function() {
t.openDialogue({
title: s.locale.app.buttons.submitted,
message: s.translate("settings.profile.password_reset_token_sent", e.get("email")),
buttonText: s.locale.app.buttons.ok,
className: "password-reset-token-sent",
rootViewClassName: "v-password-reset-token-sent"
}),
n()
}, i).done()
},
cancelCallback: i
}), {
ignoreCloseView: !1,
className: "v-confirm reset-password white-close"
}),
t.load()
})
}
});
return new l
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
71: [5935, 51],
72: [5952, 14, 96, 51],
73: function(e, t, n) {
var i = n(42)
, s = n(85)
, r = n(130)("src")
, a = "toString"
, o = Function[a]
, l = ("" + o).split(a);
n(96).inspectSource = function(e) {
return o.call(e)
}
,
(e.exports = function(e, t, n, a) {
"function" == typeof n && (n.hasOwnProperty(r) || s(n, r, e[t] ? "" + e[t] : l.join(String(t))),
n.hasOwnProperty("name") || s(n, "name", t)),
e === i ? e[t] = n : (a || delete e[t],
s(e, t, n))
}
)(Function.prototype, a, function() {
return "function" == typeof this && this[r] || o.call(this)
})
},
74: [5961, 198, 84],
77: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(26)["default"]
, l = n(94)["default"]
, u = n(21)["default"]
, c = n(93)["default"]
, d = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var p = n(2)
, f = d(p)
, h = n(11)
, m = d(h)
, g = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments),
this.state = {
ready: !1,
error: !1,
usesFallback: !1
}
}
return s(t, e),
r(t, [{
key: "componentWillMount",
value: function() {
this._onLoad = this._onLoad.bind(this),
this._onError = this._onError.bind(this),
this._image = new Image,
this._image.addEventListener("load", this._onLoad),
this._image.addEventListener("error", this._onError),
this._image.src = this.props.src
}
}, {
key: "componentWillUnmount",
value: function() {
this._image.removeEventListener("load", this._onLoad),
this._image.removeEventListener("error", this._onError),
this._image = null
}
}, {
key: "_onLoad",
value: function() {
this.setState({
ready: !0
}),
this.props.onLoad && this.props.onLoad(this.props.src)
}
}, {
key: "_onError",
value: function() {
return this.props.fallback && !this.state.usesFallback ? (this._image.src = this.props.fallback,
this.setState({
usesFallback: !0
}),
void (this.props.onFallback && this.props.onFallback(this._image.src))) : (this.setState({
error: !0
}),
void (this.props.onError && this.props.onError(this._image.src)))
}
}, {
key: "render",
value: function() {
var e, t = this.props, n = (t.src,
t.className), i = (t.animate,
t.alt), s = void 0 === i ? "" : i, r = t.style, a = void 0 === r ? {} : r, d = l(t, ["src", "className", "animate", "alt", "style"]);
this.props.animate && c(a, {
opacity: this.state.ready ? 1 : 0,
transition: "opacity 0.5s"
});
var p = (0,
m["default"])((e = {},
o(e, n, n),
o(e, "s-fallback", this.state.usesFallback),
o(e, "s-error", this.state.error),
o(e, "s-ready", this.state.ready),
o(e, "s-loading", !this.state.ready),
e))
, h = this.state.usesFallback ? this.props.fallback : this.props.src;
return f["default"].createElement("img", u({
className: p,
style: a,
alt: s
}, d, {
src: h
}))
}
}], [{
key: "propTypes",
value: {
src: f["default"].PropTypes.string.isRequired,
width: f["default"].PropTypes.number,
animate: f["default"].PropTypes.bool,
height: f["default"].PropTypes.number,
alt: f["default"].PropTypes.any,
className: f["default"].PropTypes.string,
style: f["default"].PropTypes.object,
fallback: f["default"].PropTypes.string,
onLoad: f["default"].PropTypes.func,
onFallback: f["default"].PropTypes.func,
onError: f["default"].PropTypes.func
},
enumerable: !0
}]),
t
}(f["default"].Component);
t["default"] = g,
e.exports = t["default"]
},
78: function(e, t, n) {
"use strict";
var i = n(94)["default"]
, s = n(21)["default"]
, r = n(2)
, a = n(15)
, o = n(11)
, l = r.createClass({
displayName: "Input",
getInitialState: function() {
return {
value: this.props.value || this.props.defaultValue
}
},
render: function() {
var e = this.props
, t = e.className
, n = (e.onChange,
i(e, ["className", "onChange"]));
return t = o(t, {
"l-value": this.state.value
}),
r.createElement("input", s({}, n, {
className: t,
onChange: this._onChange
}))
},
_onChange: function(e) {
this.setState({
value: a.findDOMNode(this).value || null
}),
this.props.onChange(e)
}
});
e.exports = l
},
79: function(e, t, n) {
"use strict";
var i = n(1)["default"]
, s = n(575)
, r = i(s)
, a = n(35)
, o = i(a)
, l = n(8)
, u = n(4)
, c = n(2)
, d = n(15)
, p = n(13)
, f = n(12)
, h = n(844)
, m = n(68)
, g = n(3)
, v = (n(5),
n(16))
, y = n(101)
, _ = n(587)
, b = n(588)
, w = n(66)
, S = n(584)
, k = n(585)
, E = {
_close: function() {
m.getController().close()
},
openComponent: function(e) {
var t = document.querySelector(".a-dialogue");
return d.render(e, t),
function() {
d.unmountComponentAtNode(t)
}
},
openUserFollowers: function(e, t, n) {
w.getUser(t).then(function(i) {
var s = "";
s = 1 === i.get("followers") ? g.translate("profile.title.user_followed_by_one", i.get("username")) : g.translate("profile.title.user_followed_by_many", [i.get("followers"), i.getFormattedFollowers(), i.get("username")]);
var r = new y(null ,{
url: v.getLink("followers", {
user_id: t
})
});
d.render(c.createElement(S, {
users: r,
title: s,
analytics: {
type: e + "/followers",
user_id: i.id
},
onClose: function() {
d.unmountComponentAtNode(document.querySelector(".a-dialogue")),
u.history.navigate(n, {
trigger: !0
})
}
}), document.querySelector(".a-dialogue"))
})
},
openUserFollowing: function(e, t, n) {
w.getUser(t).then(function(i) {
var s = "";
s = 1 === i.get("follows") ? g.translate("profile.title.user_follows_one", i.get("username")) : g.translate("profile.title.user_follows_many", [i.get("username"), i.get("follows"), i.getFormattedFollowing()]);
var r = new y(null ,{
url: v.getLink("follows", {
user_id: t
})
});
d.render(c.createElement(S, {
users: r,
title: s,
analytics: {
type: e + "/follows",
user_id: i.id
},
onClose: function() {
d.unmountComponentAtNode(document.querySelector(".a-dialogue")),
u.history.navigate(n, {
trigger: !0
})
}
}), document.querySelector(".a-dialogue"))
})
},
openUsers: function(e, t) {
d.render(c.createElement(S, {
users: t,
title: e,
analytics: {
type: "users"
},
onClose: function() {
d.unmountComponentAtNode(document.querySelector(".a-dialogue"))
}
}), document.querySelector(".a-dialogue"))
},
openUserVerified: function(e, t) {
d.render(c.createElement(k, {
user: e,
rewards: t,
onClose: function() {
d.unmountComponentAtNode(document.querySelector(".a-dialogue")),
u.history.navigate("", {
trigger: !0,
replace: !0
})
},
onClickProvider: function(e) {
d.unmountComponentAtNode(document.querySelector(".a-dialogue")),
u.history.navigate("/issue/" + e, {
trigger: !0,
replace: !0
})
}
}), document.querySelector(".a-dialogue"))
},
openSignupProgress: function(e) {
var t = new h({
user: e
});
m.openDialogueWithView(t, {
ignoreCloseView: !1,
className: "v-confirm v-fb-signup-confirm white-close large-close"
})
},
openSignUpEnterPassword: function(e) {
var t = this
, n = !1
, i = !1
, s = void 0
, r = function(t) {
return n = !1,
i = !0,
t.length < 5 ? (n = g.locale.error.password_too_short,
i = !1,
s.render()) : void e.saveProperty({
password: t
}).then(function() {
p.track("Open Item Password Saved", {
reads: e.get("reads")
}),
f.getUser().save("has_password", !0),
E._close()
}).fail(function(e) {
n = e,
i = !1,
s.render()
})
}
;
s = new u.ReactView({
className: "enter-password pane s-success",
renderComponent: function() {
return c.createElement(_, {
error: n,
onSubmit: r.bind(t),
loading: i
})
}
}),
m.openDialogueWithView(s, {
hideCancelButton: !0,
disableClose: !0,
className: "v-enter-password white-close l-no-animation v-module-dialogue s-success"
})
},
openVerifyEmail: function(e, t, n) {
var i = this
, s = function(e) {
E._close(),
t(e)
}
, r = function() {
E._close(),
n && n(new o["default"](l.USER_REJECTED_EMAIL,"Users rejected email " + e))
}
, a = new u.ReactView({
className: "dialogue-content s-success",
renderComponent: function() {
return c.createElement(b, {
email: e,
onCancel: r.bind(i),
onSubmit: s.bind(i)
})
}
});
m.openDialogueWithView(a, {
className: "v-dialogue vertical-center white-close l-no-animation v-module-dialogue s-success"
})
},
openFacebookConnectExistingEmail: function(e) {
p.track("Open Dialogue Facebook Connect Existing Email", {
hasEmail: !!e
});
var t = this.openComponent(c.createElement(r["default"], {
email: e,
onClose: function() {
return t()
}
}))
}
};
e.exports = E
},
80: function(e, t, n) {
var i, s = n(24)["default"];
i = function(e) {
"use strict";
var t = n(4)
, i = n(25)
, r = n(5)
, a = n(348)
, o = n(5929)
, l = "//connect.facebook.net/en_US/sdk.js"
, u = (n(47),
n(35))
, c = n(8);
"test" === o.name && (l = "http://localhost:3000/static/scripts/facebook-js-stub.js");
var d = new a(l,{
libVar: "FB"
});
return r.extend(d, {
appId: "157559707786240",
version: "v2.1",
scope: "email,user_birthday,user_friends,public_profile,user_hometown,user_about_me",
avatarUrl: "https://graph.facebook.com/%s/picture",
_authResponse: null ,
_me: !1,
_getFriendsLimit: 1e3,
getAvatar: function(e, t) {
return r.sprintf(this.avatarUrl + "?type=%s", r.escape(e), t || "square")
},
getAvatarWithDimensions: function(e, t, n) {
return r.sprintf(this.avatarUrl + "?width=%s&height=%s", r.escape(e), t, n)
},
getAuthResponse: function() {
return this._authResponse
},
getFriendIDs: function() {
return i.promise(function(e) {
d.lib.api("/me/friends?limit=100", function(t) {
e(d._fetchFacebookIDs([], t))
})
})
},
_fetchFacebookIDs: function(e, n) {
var s = this;
return e = e.concat(d._processFacebookIDs(n.data)),
n.paging && n.paging.next ? t.ajax({
url: n.paging.next
}).then(function(t) {
return s._fetchFacebookIDs(e, t.data)
}) : i.resolve(e)
},
_processFacebookIDs: function(e) {
return r.map(e, function(e) {
return {
id: parseInt(e.id, 10)
}
})
},
redirectLoginUrl: function() {
var e = r.sprintf("https://www.facebook.com/dialog/oauth?client_id=%s&redirect_uri=%s&scope=%s&response_type=none", this.appId, encodeURIComponent(window.location), this.scope);
return e
},
loggedIn: function() {
return this._authResponse ? s.resolve(this._authResponse) : this.load().then(this._loggedIn.bind(this))
},
_loggedIn: function() {
var e = this;
return new s(function(t, n) {
var i = setTimeout(function() {
n(new u(c.LIBRARY_UNAVAILABLE))
}, 4e3);
e.lib.getLoginStatus(function(s) {
return clearTimeout(i),
"connected" === s.status ? (e._authResponse = s.authResponse,
t(s.authResponse)) : n(new u("UnableToLogin","Unable to get login status from Facebook",s.data))
})
}
)
},
login: function() {
return new s(function(e, t) {
d.lib.login(function(n) {
return n.authResponse && n.authResponse.accessToken ? (d._authResponse = n.authResponse,
e(n)) : t(new u("UnableToLogin","Unable to log into Facebook",n))
}, {
scope: d.scope
})
}
)
},
logout: function() {
var e = this
, t = i.defer();
return this.execute("logout", function(n) {
e._me = !1,
e._authResponse = !1,
t.resolve(n)
}),
t.promise
},
getMe: function() {
var e = this;
return this._me ? s.resolve(this._me) : new s(function(t, n) {
e.loggedIn().then(function() {
e.execute("api", "/me", function(i) {
i && !i.error ? (e._me = i,
t(i)) : n(i)
})
})["catch"](n)
}
)
},
getFriends: function(e) {
e = e || this._getFriendsLimit;
var t = i.defer()
, n = [];
return this.execute("api", "/me/friends?limit=" + e, this._processFriends.bind(this, n, t)),
t.promise
},
execute: function() {
a.prototype.execute.apply(this, arguments)["catch"](function(e) {
if (e.type !== c.LIBRARY_UNAVAILABLE)
throw e
})
},
_processFriends: function(e, n, i) {
if (!i || !i.data)
return void n.reject(new Error("Unable to fetch Facebook friends"));
for (var s in i.data)
e.push(i.data[s]);
i.paging && i.paging.next ? t.ajax({
url: i.paging.next
}).then(this._processFriends.bind(this, e, n)).done() : n.resolve(e)
}
}),
d
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
81: function(e, t, n) {
"use strict";
var i = n(2)
, s = (n(46),
n(3).locale)
, r = (n(20),
n(28),
i.createClass({
displayName: "SubmitPaneButton",
propTypes: {
onClick: i.PropTypes.func.isRequired
},
onClick: function(e) {
e.preventDefault(),
this.props.onClick()
},
render: function() {
return i.createElement("div", {
className: "v-navigate-prev"
}, i.createElement("a", {
onClick: this.onClick
}, s.signup.back))
}
}));
e.exports = r
},
82: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = n(19)
, l = r(o)
, u = n(114)
, c = r(u)
, d = function() {
function e() {
s(this, e),
this.status = a.STATUS_INITIAL,
this.user = null ,
this.bindActions(c["default"])
}
return i(e, [{
key: "onAuthenticateUser",
value: function(e) {
this.setState({
status: a.STATUS_OK,
user: e
})
}
}, {
key: "onLogout",
value: function() {
this.setState({
status: a.STATUS_INITIAL,
user: null
})
}
}]),
e
}();
t["default"] = l["default"].createStore(d, "AuthStore"),
e.exports = t["default"]
},
83: [5934, 128],
84: 189,
85: [5940, 29, 108, 71],
90: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(16)
, s = n(12)
, r = n(144)
, a = n(537)
, o = n(380)
, l = t.Model.extend({
name: "issue",
mappings: {
manifest: {
resource: r
},
"b:manifest": {
resource: r
},
"b:issue-acquisition": {
resource: o,
options: {
track: !0
}
},
pages: {
resource: a
},
items: {
resource: function(e, t) {
var i = n(318);
return new i(e,t)
}
}
},
getRepresentation: function() {
return this.getLink("cover_image") ? "pages" : this.get("representations") ? this.get("representations")[0] : "default"
},
getCoverURL: function() {
return this.getLink(this.getCoverKey())
},
getCoverWidth: function() {
return this.getLinkAttribute(this.getCoverKey(), "width")
},
getCoverHeight: function() {
return this.getLinkAttribute(this.getCoverKey(), "height")
},
getCoverKey: function() {
return this.getLink("cover_image") ? "cover_image" : this.getLink("page_preview") ? "page_preview" : void 0
},
parse: function(e) {
if (e._links || (e._links = {}),
!e._links["b:issue-acquisition"]) {
var t = {
issue_id: e.id
};
s.getId() && (t.user_context = s.getId()),
e._links["b:issue-acquisition"] = {
href: i.getLink("issue_acquisition", t)
}
}
return "tiles" === e.representations[0] && (e._links.items = {
href: i.getLink("issue_items", {
issue_id: e.id
})
}),
this.parseHal(e)
}
});
return l
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
91: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(5)
, i = n(4)
, s = n(44)
, r = n(12)
, a = n(16)
, o = n(638)
, l = n(43)
, u = n(144)
, c = n(669)
, d = n(90)
, p = n(666)
, f = n(376)
, h = i.Model.extend({
autoRefundTimeout: 10,
name: "item",
defaults: {
type: "item",
acquirable: !0
},
mappings: {
"b:acquisition": {
resource: function(e, t) {
return e.id = e._links.self.href,
new p(e,t)
}
},
item_content: {
resource: c
},
manifest: {
resource: u
},
issue: {
resource: d
},
"item-tracker": {
resource: f,
track: !0
}
},
initialize: function(e) {
var t = this;
e && e.id && (this.url = a.getLink("item", {
item_id: e.id
})),
this.on("change:post_count", function() {
t.set("posts", t.get("post_count")),
t.set("posts_count", t.get("post_count"))
})
},
getLink: function(e) {
var t = i.Model.prototype.getLink.apply(this, arguments);
return s.subItems && "item_content" === e ? new l(t).addSearch({
subitems: !0
}).toString() : t
},
parse: function(e) {
var t = a.getLink("item", {
item_id: e.id
})
, n = t + "/acquisition";
return r.getId() && (n += "?user_context=" + r.getId()),
e._links || (e._links = {}),
e._embedded || (e._embedded = {}),
e.id || (e.id = e._embedded.manifest.id),
r.getId() && void 0 !== e.acquired && void 0 !== e.price && void 0 !== e.refundable && void 0 !== e.subscription && (e._embedded["b:acquisition"] = {
_links: {
self: {
href: n
},
"b:issue-acquisition": {
href: a.getLink("issue_acquisition", {
user_context: r.getId(),
issue_id: e._embedded.manifest.issue.id
})
}
},
price: e.price,
refundable: e.refundable,
subscription: e.subscription,
acquired: e.acquired
}),
!r.getId() && e.price && (e._embedded["b:acquisition"] = {
_links: {
self: {
href: n
},
"b:issue-acquisition": {
href: a.getLink("issue_acquisition", {
issue_id: e._embedded.manifest.issue.id
})
}
},
price: e.price
}),
e._links["b:acquisition"] || (e._links["b:acquisition"] = {
href: n
}),
r.getId() && !e._links["b:pin"] && (e._links["b:pin"] = {
href: a.getLink("user", {
user_id: r.getId()
}) + "/pin/" + e.id
}),
e._embedded["item-tracker"] = {
id: e.id
},
e.posts && (e.post_count = e.posts,
e.posts_count = e.posts),
e.posts_count && (e.posts = e.posts_count,
e.post_count = e.posts_count),
e.post_count && (e.posts = e.post_count,
e.posts_count = e.post_count),
this.parseHal(e)
},
getURI: function() {
return o.createItemUri(this)
},
getFeaturedImage: function() {
var e = this.get("manifest").get("images");
return t.find(e, {
featured: !0
})
},
getImageHrefByDimension: function(e, n) {
var i = this.getFeaturedImage();
if (i) {
var s = i._links.original || i._links.large || i._links.medium || i._links.small;
if (s.width < 300 || s.height < 300)
return;
var r = t.find(i._links, function(t) {
return t.width >= e && t.height >= n && t.width > t.height && t.width / t.height < e / n
});
if (r)
return r.href
}
},
isAcquirable: function() {
return this.get("acquirable")
}
});
return h
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
92: function(e, t, n) {
"use strict";
var i = n(2)
, s = n(3).locale
, r = n(20)
, a = i.createClass({
displayName: "SubmitPaneButton",
propTypes: {
disabled: i.PropTypes.bool,
onClick: i.PropTypes.func,
loading: i.PropTypes.bool,
value: i.PropTypes.string,
children: i.PropTypes.array
},
getDefaultProps: function() {
return {
disabled: !1,
loading: !1,
value: null
}
},
render: function() {
return i.createElement("div", {
className: "v-navigate-next"
}, i.createElement(r, {
type: "submit",
loading: this.props.loading,
disabled: this.props.disabled,
onClick: this.props.onClick
}, this.props.value || s.signup.next), this.props.children)
}
});
e.exports = a
},
95: 147,
96: 50,
97: [5963, 84],
102: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(11)
, o = i(a)
, l = n(351)
, u = i(l)
, c = n(3)
, d = n(12)
, p = i(d)
, f = n(115)
, h = i(f)
, m = n(20)
, g = i(m)
, v = n(28)
, y = i(v)
, _ = n(77)
, b = i(_)
, w = n(553)
, S = i(w)
, k = r["default"].createClass({
displayName: "Manifest",
propTypes: {
item: r["default"].PropTypes.object.isRequired,
analytics: r["default"].PropTypes.object.isRequired,
top: r["default"].PropTypes.number,
hideImage: r["default"].PropTypes.bool,
disableClick: r["default"].PropTypes.bool,
hideDropdown: r["default"].PropTypes.bool,
className: r["default"].PropTypes.string,
showPin: r["default"].PropTypes.bool,
showButton: r["default"].PropTypes.bool,
onPinChanged: r["default"].PropTypes.func
},
getDefaultProps: function() {
return {
hideImage: !1,
className: "v-manifest item-manifest item",
disableClick: !1,
showButton: !1,
showPin: !0
}
},
getInitialState: function() {
var e = this.props.item.getEmbedded("b:acquisition")
, t = this.props.item.getEmbedded("b:pin");
return {
acquisition: e,
pinned: t ? t.get("pinned") : null
}
},
componentWillMount: function() {
this._hasAcquisition() || this._fetchAcquisition(),
null === this.state.pinned && this._fetchPin()
},
_hasAcquisition: function() {
var e = this.props.item.getEmbedded("b:acquisition");
return e && e.getEmbedded("b:issue-acquisition")
},
_fetchAcquisition: function() {
var e = this;
this.props.item.getRelation("b:acquisition").then(function(e) {
return e.getRelation("b:issue-acquisition")
}).then(function() {
e.setState({
acquisition: e.props.item.getEmbedded("b:acquisition")
})
})
},
_fetchPin: function() {
var e = this
, t = this.props.item;
t.getLink("b:pin") && t.getRelation("b:pin").then(function(t) {
e.setState({
pinned: t.get("pinned")
})
})
},
_onOpenItem: function(e) {
e.preventDefault(),
h["default"].navigateToItem(this.props.item.id, {
analytics: this.props.analytics || {
type: "manifest"
},
lastEvent: e
})
},
_onPinChange: function(e) {
this.setState({
pinned: e
}),
this.props.onPinChanged && this.props.onPinChanged(e)
},
_renderButton: function() {
return this.props.showButton ? r["default"].createElement(g["default"], {
className: "btn-green btn-text btn-acquire",
onClick: this._onOpenItem
}, (0,
c.translate)("item.buttons.read")) : void 0
},
_renderImage: function(e) {
return e ? r["default"].createElement("div", {
className: "item-image"
}, r["default"].createElement("div", {
className: "image-canvas"
}, r["default"].createElement(y["default"], {
href: "/" + this.props.item.getURI(),
onClick: this._onOpenItem
}, r["default"].createElement(b["default"], {
src: e
}))), this._renderImageCredits()) : void 0
},
_renderImageCredits: function() {
var e = this.props.item.getFeaturedImage().credit;
if (e)
return r["default"].createElement("div", {
className: "credits"
}, e)
},
_renderProvider: function(e) {
return this.props.disableClick ? r["default"].createElement("div", {
className: "item-provider"
}, e.get("name")) : r["default"].createElement(y["default"], {
href: "/issue/" + this.props.item.getEmbedded("manifest").get("provider").id,
className: "item-provider"
}, e.get("name"))
},
_renderExcerpt: function(e) {
return this.props.disableClick ? r["default"].createElement("div", {
className: "item-excerpt"
}, e) : r["default"].createElement(y["default"], {
href: "/" + this.props.item.getURI(),
className: "item-excerpt",
onClick: this._onOpenItem
}, e)
},
_renderPrice: function() {
var e = this.state.acquisition;
if (e) {
var t = e.getEmbedded("b:issue-acquisition")
, n = ["item-price"]
, i = (0,
c.formatCurrency)(e.get("price"))
, s = this.props.item.getEmbedded("b:acquisition");
return e.get("subscription") ? (n.push("subscription"),
i = (0,
c.translate)("timeline.tiles.subscriber")) : s.get("acquired") ? (n.push("acquired"),
i = "Acquired") : t && t.get("acquired") && (n.push("issue-acquired"),
i = (0,
c.translate)("timeline.tiles.edition")),
r["default"].createElement("div", {
className: (0,
o["default"])(n)
}, i)
}
},
_renderDropdown: function() {
return this.props.hideDropdown ? null : r["default"].createElement(S["default"], {
showPin: p["default"].getUser() && this.props.showPin,
onPin: this._onPinChange,
item: this.props.item,
pinned: this.state.pinned,
analytics: this.props.analytics
})
},
render: function() {
var e = {};
"number" == typeof this.props.top && (e.top = this.props.top + "px");
var t = this.props.item.getEmbedded("manifest")
, n = t.getProvider()
, i = (0,
u["default"])(t.getBody(), n.getTemplate("tile"))
, s = void 0;
this.props.hideImage || (s = this.props.item.getImageHrefByDimension(310, 200));
var a = (0,
o["default"])(this.props.className, "s-success", "provider-" + n.id, {
"has-image": s
});
return r["default"].createElement("div", {
className: a,
style: e
}, this._renderProvider(n), this._renderPrice(), this._renderDropdown(), this._renderImage(s), this._renderExcerpt(i), this._renderButton())
}
});
t["default"] = k,
e.exports = t["default"]
},
103: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(3)
, d = n(11)
, p = o(d)
, f = n(41)
, h = o(f)
, m = n(56)
, g = o(m)
, v = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
var e = this.props.user.get("balance")
, t = this.props.user.getAvatarHref()
, n = (0,
p["default"])(["balance", {
"s-low": 1 >= e
}])
, i = (0,
h["default"])(e);
return u["default"].createElement("div", {
className: "v-avatar-balance-header"
}, u["default"].createElement("div", {
className: "title"
}, u["default"].createElement("div", {
className: "avatar"
}, u["default"].createElement(g["default"], {
src: t
})), u["default"].createElement("div", {
className: "current-balance"
}, c.locale.payment.text.current_balance, u["default"].createElement("span", {
className: n
}, i))))
}
}], [{
key: "propTypes",
value: {
user: u["default"].PropTypes.object.isRequired
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = v,
e.exports = t["default"]
},
104: function(e, t, n) {
var i;
i = function() {
"use strict";
return function(e, t) {
if (!e)
throw new Error(t || "Assertion failed")
}
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
105: function(e, t, n) {
"use strict";
function i(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1]
, n = arguments.length <= 2 || void 0 === arguments[2] ? window.__perfInitTime : arguments[2];
t.event = e,
t.timing = Date.now() - n,
l["default"].trackPerformance && a["default"].trackPerformance(t)
}
var s = n(1)["default"]
, r = n(13)
, a = s(r)
, o = n(44)
, l = s(o)
, u = {};
i.once = function(e, t) {
u[e] || (i(e, t),
u[e] = !0)
}
,
i.applicationBooting = function() {
i.once("Application Booting")
}
,
i.applicationRunning = function() {
i.once("Application Running")
}
,
i.applicationReady = function(e) {
i.once("Application Ready", {
view: e
})
}
,
i.readerReady = function(e) {
i("Reader Ready", {}, e)
}
,
e.exports = i
},
108: 257,
111: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(345)
, o = r["default"].createClass({
displayName: "Logo",
getDefaultProps: function() {
return {
href: "/"
}
},
_renderLogo: function() {
return (0,
a.getException)("showBetaLogo", !1) ? r["default"].createElement("svg", {
id: "logo",
viewBox: "0 0 130 36",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg"
}, r["default"].createElement("g", {
id: "Blendle",
transform: "translate(41.131667, 6.056782)",
fill: "#000000"
}, r["default"].createElement("path", {
d: "M0.0705833333,19.4321767 L0.0705833333,0 L6.19116667,0 C8.21791667,0 9.84133333,0.444164038 11.011,1.3022082 C12.2008333,2.16025237 12.8058333,3.43217666 12.8058333,5.15835962 C12.8058333,6.87444795 12.0899167,8.26750789 10.6379167,9.31735016 C12.3924167,10.3974763 13.2696667,11.9520505 13.2696667,13.9205047 C13.2696667,17.3324921 10.6883333,19.4422713 6.66508333,19.4422713 L0.0705833333,19.4422713 L0.0705833333,19.4321767 Z M3.33758333,2.98801262 L3.33758333,8.00504732 L5.53575,8.00504732 C8.1675,8.00504732 9.47833333,7.14700315 9.47833333,5.4511041 C9.47833333,3.56340694 7.96583333,2.98801262 5.36433333,2.98801262 L3.33758333,2.98801262 L3.33758333,2.98801262 Z M3.33758333,16.444164 L5.72733333,16.444164 C8.55066667,16.444164 9.97241667,15.5053628 9.97241667,13.6176656 C9.97241667,11.9015773 8.60108333,11.0435331 5.82816667,11.0435331 L3.3275,11.0435331 L3.3275,16.444164 L3.33758333,16.444164 Z",
id: "B"
}), r["default"].createElement("path", {
d: "M15.15525,19.4927445 L15.15525,0.0504731861 L18.2810833,0.0504731861 L18.2810833,19.4826498 L15.15525,19.4826498 L15.15525,19.4927445 Z",
id: "l"
}), r["default"].createElement("path", {
d: "M32.5288333,13.6277603 L23.3429167,13.6277603 C23.4840833,15.6567823 24.8755833,16.9287066 26.8821667,16.9287066 C28.3341667,16.9287066 29.4836667,16.2927445 30.34075,15.0107256 L32.4481667,17.0094637 C31.0264167,18.8769716 29.161,19.785489 26.8821667,19.785489 C24.8856667,19.785489 23.232,19.1495268 22.0018333,17.8473186 C20.7716667,16.5451104 20.1364167,14.8492114 20.1364167,12.7697161 C20.1364167,10.740694 20.7111667,9.02460568 21.8405,7.64164038 C22.99,6.25867508 24.5226667,5.56214511 26.4183333,5.56214511 C30.7743333,5.56214511 32.5590833,9.0851735 32.5590833,12.5173502 L32.5288333,13.6277603 L32.5288333,13.6277603 Z M23.5143333,11.1041009 L29.2416667,11.1041009 C29.2114167,9.69085174 28.3341667,8.43911672 26.4485833,8.43911672 C24.7949167,8.44921136 23.8168333,9.64037855 23.5143333,11.1041009 L23.5143333,11.1041009 Z",
id: "e"
}), r["default"].createElement("path", {
d: "M40.3030833,5.55205047 C40.0409167,5.54195584 34.3135833,5.41072555 34.3135833,10.9829653 L34.3135833,19.5028391 L37.631,19.5028391 L37.631,11.1343849 C37.631,9.64037855 38.8309167,8.43911672 40.3030833,8.43911672 C41.77525,8.43911672 42.9751667,9.65047319 42.9751667,11.1343849 L42.9751667,19.5028391 L46.2825,19.5028391 L46.2825,10.9829653 C46.2825,5.40063091 40.5551667,5.54195584 40.3030833,5.55205047 L40.3030833,5.55205047 Z",
id: "n"
}), r["default"].createElement("path", {
d: "M58.3724167,0.0403785489 L58.3724167,6.88454259 C57.354,5.99621451 56.0935833,5.55205047 54.6214167,5.55205047 C52.7055833,5.55205047 51.1426667,6.21829653 49.9024167,7.58107256 C48.67225,8.94384858 48.06725,10.629653 48.06725,12.6788644 C48.06725,14.7280757 48.67225,16.4239748 49.9024167,17.7766562 C51.1325833,19.1091483 52.6955,19.7753943 54.6214167,19.7753943 C56.1843333,19.7753943 57.475,19.2807571 58.4329167,18.2511041 L58.4329167,19.4826498 L61.49825,19.4826498 L61.49825,0.0403785489 L58.3724167,0.0403785489 L58.3724167,0.0403785489 Z M54.84325,17.0094637 C52.5644167,17.0094637 51.2535833,15.1217666 51.2535833,12.6788644 C51.2535833,10.2359621 52.5644167,8.35835962 54.84325,8.35835962 C57.14225,8.35835962 58.4329167,10.2460568 58.4329167,12.6788644 C58.4329167,15.1217666 57.14225,17.0094637 54.84325,17.0094637 L54.84325,17.0094637 Z",
id: "d"
}), r["default"].createElement("path", {
d: "M63.73675,19.4927445 L63.73675,0.0504731861 L66.8625833,0.0504731861 L66.8625833,19.4826498 L63.73675,19.4826498 L63.73675,19.4927445 Z",
id: "l_1_"
}), r["default"].createElement("path", {
d: "M80.8380833,13.6277603 L71.6521667,13.6277603 C71.7933333,15.6567823 73.1848333,16.9287066 75.1914167,16.9287066 C76.6434167,16.9287066 77.7929167,16.2927445 78.65,15.0107256 L80.7574167,17.0094637 C79.3356667,18.866877 77.47025,19.785489 75.1914167,19.785489 C73.1949167,19.785489 71.54125,19.1495268 70.3110833,17.8473186 C69.0809167,16.5451104 68.4456667,14.8492114 68.4456667,12.7697161 C68.4456667,10.740694 69.0204167,9.02460568 70.14975,7.64164038 C71.29925,6.25867508 72.8319167,5.56214511 74.7275833,5.56214511 C79.0835833,5.56214511 80.8683333,9.0851735 80.8683333,12.5173502 L80.8380833,13.6277603 L80.8380833,13.6277603 Z M71.8235833,11.1041009 L77.5509167,11.1041009 C77.5206667,9.69085174 76.6434167,8.43911672 74.7578333,8.43911672 C73.11425,8.44921136 72.1260833,9.64037855 71.8235833,11.1041009 L71.8235833,11.1041009 Z",
id: "e_1_"
})), r["default"].createElement("g", {
id: "Icon"
}, r["default"].createElement("path", {
d: "M31.581,15.9697161 C31.5305833,21.0271293 30.3911667,25.3072555 27.67875,27.992429 C25.01675,30.7381703 20.7918333,31.888959 15.7905,31.9394322 C10.7891667,31.888959 6.56425,30.7381703 3.90225,27.992429 C1.18983333,25.3072555 0.0504166667,21.0271293 0,15.9697161 C0.0504166667,10.9123028 1.18983333,6.63217666 3.90225,3.94700315 C6.56425,1.20126183 10.7891667,0.0504731861 15.7905,0 C20.7918333,0.0504731861 25.01675,1.20126183 27.67875,3.94700315 C30.3810833,6.63217666 31.5305833,10.9123028 31.581,15.9697161 L31.581,15.9697161 Z",
id: "supercircle",
fill: "#FF6255"
}), r["default"].createElement("g", {
id: "Guillemet",
transform: "translate(7.764167, 7.974763)",
fill: "#FFFFFF"
}, r["default"].createElement("path", {
d: "M9.3775,7.99495268 L9.3775,7.99495268 C6.87683333,5.28958991 4.43666667,2.66498423 1.98641667,0.0302839117 C1.089,0.736908517 0.87725,0.90851735 0.03025,1.56466877 C0.03025,1.56466877 2.19816667,5.19873817 3.29725,6.93501577 C3.55941667,7.35899054 3.72075,7.68201893 3.751,7.99495268 C3.73083333,8.30788644 3.5695,8.63091483 3.29725,9.05488959 C2.20825,10.7911672 0.03025,14.4252366 0.03025,14.4252366 C0.867166667,15.081388 1.07891667,15.2529968 1.98641667,15.9596215 C4.43666667,13.3249211 6.87683333,10.7003155 9.3775,7.99495268 L9.3775,7.99495268",
id: "Shape"
}), r["default"].createElement("path", {
d: "M18.05925,7.99495268 L18.05925,7.99495268 C15.3770833,5.0977918 13.3301667,2.89716088 10.6681667,0.0302839117 C9.77075,0.736908517 9.559,0.90851735 8.712,1.56466877 C8.712,1.56466877 10.8799167,5.19873817 11.979,6.93501577 C12.2411667,7.35899054 12.4025,7.68201893 12.43275,7.99495268 C12.4125833,8.30788644 12.25125,8.63091483 11.979,9.05488959 C10.89,10.7911672 8.712,14.4252366 8.712,14.4252366 C9.54891667,15.081388 9.76066667,15.2529968 10.6681667,15.9596215 C13.1083333,13.3249211 15.5485,10.7003155 18.05925,7.99495268 L18.05925,7.99495268",
id: "Shape"
}))), r["default"].createElement("path", {
d: "M104.72,34 L106.776,34 C107.824,34 108.736,33.488 108.736,32.352 C108.736,31.776 108.44,31.2 107.816,31.016 L107.816,31 C108.248,30.768 108.504,30.312 108.504,29.784 C108.504,28.848 107.776,28.32 106.752,28.32 L104.72,28.32 L104.72,34 Z M105.752,30.64 L105.752,29.208 L106.736,29.208 C107.216,29.208 107.456,29.504 107.456,29.912 C107.456,30.32 107.2,30.64 106.752,30.64 L105.752,30.64 Z M105.752,33.112 L105.752,31.472 L106.856,31.472 C107.376,31.472 107.68,31.816 107.68,32.288 C107.68,32.768 107.384,33.112 106.856,33.112 L105.752,33.112 Z M109.856,34 L113.384,34 L113.384,33.112 L110.888,33.112 L110.888,31.584 L112.8,31.584 L112.8,30.696 L110.888,30.696 L110.888,29.208 L113.256,29.208 L113.256,28.32 L109.856,28.32 L109.856,34 Z M115.632,34 L116.664,34 L116.664,29.208 L118.528,29.208 L118.528,28.32 L113.768,28.32 L113.768,29.208 L115.632,29.208 L115.632,34 Z M122.584,34 L123.648,34 L121.648,28.32 L120.568,28.32 L118.568,34 L119.632,34 L120.112,32.544 L122.104,32.544 L122.584,34 Z M121.12,29.304 C121.12,29.304 121.24,29.864 121.344,30.184 L121.848,31.704 L120.36,31.704 L120.864,30.184 C120.976,29.864 121.104,29.304 121.104,29.304 L121.12,29.304 Z",
id: "BETA",
fill: "#948784"
})) : r["default"].createElement("svg", {
version: "1.1",
id: "logo",
xmlns: "http://www.w3.org/2000/svg",
x: "0px",
y: "0px",
viewBox: "0 0 1200 316.4",
"enable-background": "new 0 0 1200 316.4"
}, r["default"].createElement("g", {
id: "Blendle"
}, r["default"].createElement("path", {
id: "B",
d: "M398.7,252.5V60h60.7c20.1,0,36.2,4.4,47.8,12.9C519,81.4,525,94,525,111.1c0,17-7.1,30.8-21.5,41.2 c17.4,10.7,26.1,26.1,26.1,45.6c0,33.8-25.6,54.7-65.5,54.7H398.7z M431.1,89.6v49.7h21.8c26.1,0,39.1-8.5,39.1-25.3 c0-18.7-15-24.4-40.8-24.4H431.1z M431.1,222.9h23.7c28,0,42.1-9.3,42.1-28c0-17-13.6-25.5-41.1-25.5h-24.8V222.9z"
}), r["default"].createElement("path", {
id: "l",
d: "M548.3,253.1V60.5h31v192.5H548.3z"
}), r["default"].createElement("path", {
id: "e",
d: "M720.6,195h-91.1c1.4,20.1,15.2,32.7,35.1,32.7c14.4,0,25.8-6.3,34.3-19l20.9,19.8C705.7,247,687.2,256,664.6,256 c-19.8,0-36.2-6.3-48.4-19.2c-12.2-12.9-18.5-29.7-18.5-50.3c0-20.1,5.7-37.1,16.9-50.8c11.4-13.7,26.6-20.6,45.4-20.6 c43.2,0,60.9,34.9,60.9,68.9L720.6,195z M631.2,170H688c-0.3-14-9-26.4-27.7-26.4C643.9,143.7,634.2,155.5,631.2,170z"
}), r["default"].createElement("path", {
id: "n",
d: "M797.7,115c-2.6-0.1-59.4-1.4-59.4,53.8c0,56.5,0,84.4,0,84.4h32.9v-82.9c0-14.8,11.9-26.7,26.5-26.7 c14.6,0,26.5,12,26.5,26.7v82.9H857c0,0,0-27.9,0-84.4C857,113.5,800.2,114.9,797.7,115z"
}), r["default"].createElement("path", {
id: "d",
d: "M976.9,60.4v67.8c-10.1-8.8-22.6-13.2-37.2-13.2c-19,0-34.5,6.6-46.8,20.1c-12.2,13.5-18.2,30.2-18.2,50.5 c0,20.3,6,37.1,18.2,50.5c12.2,13.2,27.7,19.8,46.8,19.8c15.5,0,28.3-4.9,37.8-15.1V253h30.4V60.4H976.9z M941.9,228.5 c-22.6,0-35.6-18.7-35.6-42.9c0-24.2,13-42.8,35.6-42.8c22.8,0,35.6,18.7,35.6,42.8C977.5,209.8,964.7,228.5,941.9,228.5z"
}), r["default"].createElement("path", {
id: "l_1_",
d: "M1030.1,253.1V60.5h31v192.5H1030.1z"
}), r["default"].createElement("path", {
id: "e_1_",
d: "M1199.7,195h-91.1c1.4,20.1,15.2,32.7,35.1,32.7c14.4,0,25.8-6.3,34.3-19l20.9,19.8 c-14.1,18.4-32.6,27.5-55.2,27.5c-19.8,0-36.2-6.3-48.4-19.2c-12.2-12.9-18.5-29.7-18.5-50.3c0-20.1,5.7-37.1,16.9-50.8 c11.4-13.7,26.6-20.6,45.4-20.6c43.2,0,60.9,34.9,60.9,68.9L1199.7,195z M1110.3,170h56.8c-0.3-14-9-26.4-27.7-26.4 C1123.1,143.7,1113.3,155.5,1110.3,170z"
})), r["default"].createElement("g", {
id: "Icon"
}, r["default"].createElement("path", {
id: "supercircle",
"fill-rule": "evenodd",
fill: "#FF6255",
"clip-rule": "evenodd",
d: "M313.2,158.2c-0.5,50.1-11.8,92.5-38.7,119.1 c-26.4,27.2-68.3,38.6-117.9,39.1c-49.6-0.5-91.5-11.9-117.9-39.1C11.8,250.7,0.5,208.3,0,158.2c0.5-50.1,11.8-92.5,38.7-119.1 C65.1,11.9,107,0.5,156.6,0c49.6,0.5,91.5,11.9,117.9,39.1C301.3,65.7,312.7,108.1,313.2,158.2z"
}), r["default"].createElement("g", {
id: "Guillemet"
}, r["default"].createElement("path", {
"fill-rule": "evenodd",
"clip-rule": "evenodd",
fill: "#FFFFFF",
d: "M170,158.2C170,158.2,170.1,158.2,170,158.2 c-24.8-26.8-49-52.8-73.3-78.9c-8.9,7-11,8.7-19.4,15.2c0,0,21.5,36,32.4,53.2c2.6,4.2,4.2,7.4,4.5,10.5 c-0.2,3.1-1.8,6.3-4.5,10.5c-10.8,17.2-32.4,53.2-32.4,53.2c8.3,6.5,10.4,8.2,19.4,15.2C121,211,145.2,185,170,158.2 C170.1,158.2,170,158.2,170,158.2"
}), r["default"].createElement("path", {
"fill-rule": "evenodd",
"clip-rule": "evenodd",
fill: "#FFFFFF",
d: "M256.1,158.2C256.1,158.2,256.1,158.2,256.1,158.2 c-26.6-28.7-46.9-50.5-73.3-78.9c-8.9,7-11,8.7-19.4,15.2c0,0,21.5,36,32.4,53.2c2.6,4.2,4.2,7.4,4.5,10.5 c-0.2,3.1-1.8,6.3-4.5,10.5c-10.8,17.2-32.4,53.2-32.4,53.2c8.3,6.5,10.4,8.2,19.4,15.2C207,211,231.2,185,256.1,158.2 C256.1,158.2,256.1,158.2,256.1,158.2"
}))))
},
render: function() {
return r["default"].createElement("a", {
className: "logo",
href: this.props.href
}, this._renderLogo())
}
});
t["default"] = o,
e.exports = t["default"]
},
112: function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var i = n(2)
, s = n(15)
, r = n(11)
, a = n(235)
, o = i.createClass({
displayName: "BackboneView",
propTypes: {
view: i.PropTypes.object.isRequired,
className: i.PropTypes.string
},
componentDidMount: function() {
var e = this.props.view;
s.findDOMNode(this).appendChild(e.render().el),
e.load(),
e.afterRender()
},
compontentDidUpdate: function() {
this.options.preventReplace || (a(s.findDOMNode(this)),
s.findDOMNode(this).appendChild(this.props.view.render().el))
},
componentWillUnmount: function() {
var e = this;
setTimeout(function() {
return e.props.view.unload()
})
},
render: function() {
var e = r("v-backbone-view", this.props.className);
return i.createElement("div", {
className: e
})
}
});
t["default"] = o,
e.exports = t["default"]
},
115: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(21)["default"]
, a = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(19)
, l = a(o)
, u = n(4)
, c = a(u)
, d = n(8)
, p = n(179)
, f = a(p)
, h = n(91)
, m = a(h)
, g = n(373)
, v = a(g)
, y = n(13)
, _ = a(y)
, b = function() {
function e() {
s(this, e),
this.generateActions("fetchItemSuccess", "fetchItemError")
}
return i(e, [{
key: "fetchItem",
value: function(e) {
var t = this;
return function(n) {
var i = new m["default"]({
id: e
});
n({
item: i
}),
i.fetch().then(function() {
t.fetchItemSuccess({
item: i
})
})["catch"](function(e) {
if (e.type === d.XHR_STATUS)
return t.fetchItemError({
item: i,
error: e
});
throw e
})
}
}
}, {
key: "navigateToItem",
value: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1];
return function(n) {
var i = r({
urlAfterItemClose: c["default"].history.fragment
}, t);
f["default"].openItem(e, i),
n({
itemId: e,
config: i
})
}
}
}, {
key: "pinItem",
value: function(e, t, n, i) {
return function(s) {
v["default"].updatePin(e, t, n);
var r = n ? "Pin Item" : "Unpin Item";
_["default"].trackItemEvent(t, i, r),
s({
itemId: t.id,
pinned: n
})
}
}
}]),
e
}();
t["default"] = l["default"].createActions(b),
e.exports = t["default"]
},
116: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(2)
, r = n(86)
, a = (n(17),
n(11))
, o = s.createClass({
displayName: "Tile",
mixins: [r],
getInitialState: function() {
return {}
},
componentDidMount: function() {
this.props.onDidMount && this.props.onDidMount()
},
render: function() {
return s.createElement("div", {
className: this._getClassName(),
style: this._getStyle()
}, this._getChildren())
},
_getClassName: function() {
return a(i({
"v-pane-tile": !0
}, "l-" + this.props.type, this.props.type))
},
_getChildren: function() {
var e = this;
return s.Children.toArray(this.props.children).filter(function(e) {
return e
}).map(function(t) {
return s.cloneElement(t, {
disabled: e.props.disabled || !e.props.visible
})
})
},
_getStyle: function(e) {
return this.props.width && this.props.height ? "horizontal" === this.props.orientation ? this._getHorizontalDimensions() : this._getVerticalDimensions() : {}
},
_getHorizontalDimensions: function() {
var e = this.props.baseHeight;
return {
height: e,
width: Math.round(e / this.props.height * this.props.width)
}
},
_getVerticalDimensions: function() {
var e = this.props.baseWidth / 2 - 6;
return {
width: e,
height: Math.round(e / this.props.width * this.props.height)
}
}
});
e.exports = o
},
117: function(e, t, n) {
"use strict";
var i = n(5)
, s = n(2)
, r = n(15)
, a = n(346)
, o = s.createClass({
displayName: "Portal",
componentWillUnmount: function() {
this.props.onWillUnmount && this.props.onWillUnmount()
},
componentDidMount: function() {
this.props.onDidMount && this.props.onDidMount(r.findDOMNode(this))
},
componentWillMount: function() {
this.props.onWillMount && this.props.onWillMount()
},
render: function() {
return s.Children.only(this.props.children)
}
})
, l = function(e) {
return {
getInitialState: function() {
return {
portalKey: i.uniqueId("portal")
}
},
componentWillMount: function() {
this.props.portal ? this._target = this.props.portal : this._target = this._createPortal(),
this._target._portalKey = this.state.portalKey
},
componentDidMount: function() {
this._renderLayer(),
this.props.onScroll && (this._scrollParent = a(r.findDOMNode(this)),
this._scrollParent.addEventListener("scroll", this.props.onScroll))
},
componentDidUpdate: function() {
this._renderLayer()
},
componentWillUnmount: function() {
this.getLayerDOMNode() && this.getLayerDOMNode().parentNode === this._target && this.unrenderLayer(),
this.props.onScroll && this._scrollParent.removeEventListener("scroll", this.props.onScroll)
},
getLayerDOMNode: function() {
return this._layerDOMNode
},
_renderLayer: function() {
r.render(s.createElement(o, {
key: this.state.portalKey,
onWillMount: this.layerWillMount,
onDidMount: this._layerDidMount,
onDidUnmount: this.layerDidUnmount
}, this.renderLayer()), this._target)
},
unrenderLayer: function() {
var e = this;
setTimeout(function() {
e.state.portalKey === e._target._portalKey && r.unmountComponentAtNode(e._target)
})
},
_layerDidMount: function(e) {
this._layerDOMNode = e,
this.layerDidMount && this.layerDidMount()
},
_createPortal: function() {
var t;
return e && (t = document.getElementById(e)),
t || (t = document.createElement("div"),
e && (t.id = e)),
t.parentNode || document.body.appendChild(t),
t
}
}
}
;
e.exports = l
},
119: function(e, t, n) {
"use strict";
var i = n(24)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(4)
, a = s(r)
, o = n(80)
, l = s(o)
, u = n(12)
, c = s(u)
, d = n(66)
, p = s(d)
, f = n(16)
, h = s(f)
, m = n(101)
, g = s(m)
, v = n(52)
, y = s(v)
, _ = n(8)
, b = n(35)
, w = s(b)
, S = {
statusCodes: {
200: "authorized",
401: "unauthorized",
403: "authorized_new_user",
429: "throttled"
},
login: function(e) {
var t = this;
return e = e || l["default"].getAuthResponse(),
e ? this._processAuthResponse(e) : l["default"].login().then(function(e) {
return t._processAuthResponse(e.authResponse)
})
},
authorize: function(e) {
return new i(function(e, t) {
return l["default"].getAuthResponse() ? e(l["default"].getAuthResponse()) : void l["default"].login().then(e)["catch"](t)
}
).then(function(t) {
var n = t.authResponse || t;
return p["default"].saveFacebookCredentials(e, n)
})
},
getFriends: function(e) {
return l["default"].getFriendIDs().then(function(t) {
return a["default"].ajax({
url: h["default"].getLink("follows", {
user_id: e.id
}),
type: "POST",
data: JSON.stringify({
facebook_friends: t
})
})
}).then(function(e) {
return i.resolve(new g["default"](e.data,{
parse: !0
}))
})
},
loginIfAuthorized: function() {
return y["default"].get(_.MANUAL_LOGOUT) ? i.reject(new w["default"](_.MANUAL_LOGOUT)) : l["default"].loggedIn().then(S._processAuthResponse.bind(S))
},
authorizeAndGetFriends: function(e) {
return this.authorize(e).then(this.getFriends)
},
_processAuthResponse: function(e) {
var t = this;
return c["default"].loginWithCredentials({
facebook_id: e.userID,
facebook_access_token: e.accessToken
})["catch"](function(n) {
if (n.status)
return i.reject({
authResponse: e,
status: t.statusCodes[n.status]
});
throw n
})
}
};
t["default"] = S,
e.exports = t["default"]
},
120: function(e, t, n) {
var i, s = n(53)["default"], r = n(24)["default"], a = n(93)["default"];
i = function(e) {
"use strict";
function t() {
return s(m).length ? r.resolve(m) : l.ajax({
url: c.getLink("microservice_subscriptions"),
type: "GET",
headers: {
Accept: "application/hal+json"
}
}).then(function(e) {
return a(m, e.data),
m
})
}
var i = n(44)
, o = n(5)
, l = n(34)
, u = n(25)
, c = n(16)
, d = n(12)
, p = n(622)
, f = n(635).getLink
, h = n(18);
p = o.filter(p, function(e) {
return e.id in i.subscriptions ? i.subscriptions[e.id] : !0
});
var m = {}
, g = {
getProviders: function() {
return p
},
addSubscriptionWithUsernameAndPassword: function(e, t, n) {
var i = u.defer();
return l.ajax({
url: c.getLink("user_provider_accounts", {
user_id: d.getId()
}),
type: "POST",
data: JSON.stringify({
provider: e,
username: t,
password: n
})
}).then(function(e) {
201 === e.status ? i.resolve(e) : i.reject(new Error("Unknown status code"))
}, function(e) {
i.reject(e)
}).done(),
i.promise
},
addSubscriptionWithAuthorizationCode: function(e, t) {
var n = u.defer();
return l.ajax({
url: c.getLink("user_provider_accounts", {
user_id: d.getId()
}),
type: "POST",
data: JSON.stringify({
provider: e,
authorization_code: t
})
}).then(function(e) {
201 === e.status ? n.resolve(e) : n.reject(new Error("Unknown status code"))
}, function(e) {
n.reject(e)
}),
n.promise
},
addSubscriptionWithAuthURI: function(e, t) {
var n = u.defer();
return l.ajax({
url: c.getLink("user_provider_accounts", {
user_id: d.getId()
}),
type: "POST",
data: JSON.stringify({
provider: e,
auth_uri: t
})
}).then(function(e) {
201 === e.status ? n.resolve(e) : n.reject(new Error("Unknown status code"))
}, function(e) {
n.reject(e)
}),
n.promise
},
stopSubscription: function(e, n) {
return t().then(function() {
var t = f(m, "user_subscription", {
user_uid: e,
subscription_uid: n
});
return l.ajax({
url: t,
type: "POST",
headers: {
Accept: "application/hal+json"
},
data: {
renew: !1
}
})
})
},
deleteSubscription: function(e) {
var t = u.defer();
return l.ajax({
url: c.getLink("user_provider_accounts", {
user_id: d.getId()
}) + "/" + e,
type: "DELETE"
}).then(function(e) {
204 === e.status ? t.resolve(e) : t.reject(new Error("Unknown status code"))
}, function(e) {
t.reject(e)
}),
t.promise
},
getUserSubscriptions: function(e) {
return t().then(function() {
return r.all([l.ajax({
url: c.getLink("user_provider_accounts", {
user_id: e
}),
type: "GET"
}), l.ajax({
url: f(m, "user_subscriptions", {
user_uid: e
}),
type: "GET",
headers: {
Accept: "application/hal+json"
}
})])
})
},
fetchSubscription: function(e, n) {
return t().then(function() {
return l.ajax({
url: f(m, "user_subscription", {
subscription_uid: e,
user_uid: n
}),
type: "GET",
headers: {
Accept: "application/hal+json"
}
})
}).then(function(e) {
return 200 === e.status ? e.data : r.reject()
})
},
fetchProduct: function(e) {
return t().then(function() {
return l.ajax({
url: f(m, "subscription_product", {
subscription_product_uid: e
}),
type: "GET",
headers: {
Accept: "application/hal+json"
}
})
}).then(function(e) {
return 200 === e.status ? e.data : r.reject()
})
},
createOrder: function(e, n, i) {
return t().then(function() {
return l.ajax({
url: f(m, "user_orders", {
user_uid: i
}),
type: "POST",
headers: {
Accept: "application/jwt"
},
data: JSON.stringify({
subscription_uid: e,
start_date: h(n).format()
})
})
}).then(function(e) {
return 201 === e.status ? e.data : r.reject()
})
}
};
return g
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
121: function(e, t, n) {
var i, s;
i = [n(4), n(67), n(91), n(144)],
s = function(e, t, n, i) {
"use strict";
var s = e.Model.extend({
name: "post",
mappings: {
manifest: {
resource: i
},
user: {
resource: t,
track: !0
},
"b:user": {
resource: t,
track: !0
},
"b:manager": {
resource: t,
track: !0
},
manager: {
resource: t,
track: !0
},
item: {
resource: n
}
}
});
return s
}
.apply(t, i),
!(void 0 !== s && (e.exports = s))
},
123: function(e, t, n) {
var i, s = n(53)["default"];
i = function(e) {
"use strict";
var t = n(5)
, i = n(4)
, r = i.View.extend({
className: "v-input v-dropdown frm-field-wrapper",
constructor: function(e, t) {
i.View.call(this, t),
this._items = e,
this.options.selected ? this._selected = this.options.selected : this.options.key && this.options.value ? this._selected = this._items[0][this.options.key] : this._selected = s(this._items)[0]
},
render: function() {
return this.delegateEvents(),
this._renderItems(),
this
},
setItems: function(e) {
this._items = e
},
reset: function() {
this.setSelected(this.options.selected)
},
setSelected: function(e) {
this._selected = e,
this._selectedItemView.setValue(e),
this._selectedItemView.setTitle(this.getSelectedLabel()),
this.inputElement && (this.inputElement.value = e)
},
setValue: function(e) {
this.setSelected(e)
},
setSelectedTitle: function(e, t) {
this._selectedItemView.setTitle(e),
t && (this._selected = t,
this._selectedItemView.setValue(t),
this.inputElement && (this.inputElement.value = t))
},
getSelected: function() {
return this._selected
},
getValue: function() {
return this._selected
},
getSelectedLabel: function() {
if (this.options.key && this.options.value) {
var e = {};
return e[this.options.key] = this._selected,
t.findWhere(this._items, e)[this.options.value]
}
return this._items[this._selected]
},
toggle: function() {
this._open ? this.close() : this.open()
},
open: function() {
this.addEventListener(window, "click", this._eCloseDropdown.bind(this)),
this._open = !0;
var e = this.el.querySelector(".selected-item")
, t = this.el.querySelector(".v-dropdown-items");
t.classList.add("s-open"),
this._setBestPosition(e, t),
e.classList.add("s-open")
},
_setBestPosition: function(e, t) {
t.style.maxHeight = "";
var n = e.getBoundingClientRect()
, i = t.offsetHeight
, s = !0
, r = window.innerHeight - n.bottom;
n.bottom + i > window.innerHeight && n.top > r && (s = !1,
r = n.top),
t.style.maxHeight = Math.min(r - 20, 300) + "px",
t.style.top = s ? n.height + "px" : "auto",
t.style.bottom = s ? "auto" : n.height + "px",
t.classList.add(s ? "below" : "above"),
t.classList.remove(s ? "above" : "below")
},
close: function() {
var e = this;
this.el && (this.removeEventListener(window, "click"),
e._open = !1,
t.each(this.el.querySelectorAll(".v-dropdown-item"), function(e) {
e.style.top = "0px"
}),
e.el.querySelector(".v-dropdown-items").classList.remove("s-open"),
setTimeout(function() {
e.el && !e._open && (e.el.querySelector(".selected-item").classList.remove("s-open"),
e.el.querySelector(".v-dropdown-items").style.height = "")
}, 200))
},
addSeperator: function(e) {
this.getView("item-" + e).addSeperator()
},
_renderItems: function() {
var e = this;
this.removeAllChildren(),
this.el.innerHTML = "",
this._selectedItemView = new a({
value: this._selected,
title: this.getSelectedLabel(),
onClick: this.toggle.bind(this)
}),
this.addView(this._selectedItemView, "selected-item"),
this.el.appendChild(this._selectedItemView.render().el),
this._selectedItemView.el.className = "selected-item";
var n = document.createElement("div");
n.className = "v-dropdown-items",
t.forIn(this._items, function(t, i) {
if (e.options.key && e.options.value) {
var s = t;
i = s[e.options.key],
t = s[e.options.value]
}
var r = new a({
value: i,
title: t,
onClick: e._changeSelected.bind(e)
});
e.addView(r, "item-" + i),
n.appendChild(r.render().el)
}),
this.el.appendChild(n),
this.options.name && (this.inputElement = document.createElement("input"),
this.inputElement.type = "hidden",
this.inputElement.value = this._selected,
this.inputElement.className = "inp",
this.inputElement.name = this.options.name,
this.el.appendChild(this.inputElement),
this.el.classList.add("dropdown-" + this.options.name))
},
_changeSelected: function(e) {
var t = !1;
this.getSelected() !== e && (t = !0),
this.setSelected(e),
t && this._changed(),
this.close()
},
_changed: function() {
this.options.onChange && this.options.onChange(this.getSelected())
},
_eCloseDropdown: function(e) {
this.el.contains(e.target) || e.target === this.el || this.close()
}
})
, a = i.View.extend({
className: "v-dropdown-item dropdown-item",
events: {
click: "_eClick",
mousewheel: "_eMousewheel"
},
render: function() {
return this.el.innerHTML = this.options.title,
this.el.setAttribute("data-value", this.options.value),
this
},
setValue: function(e) {
this.options.value = e,
this.render()
},
setTitle: function(e) {
this.options.title = e,
this.render()
},
addSeperator: function() {
this.setLayout("seperator")
},
removeSeperator: function() {
this.removeLayout("seperator")
},
_eClick: function() {
this.options.onClick(this.options.value)
},
_eMousewheel: function(e) {
e.stopPropagation()
}
});
return r
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
128: 254,
129: function(e, t, n) {
var i = n(40)("unscopables")
, s = Array.prototype;
void 0 == s[i] && n(85)(s, i, {}),
e.exports = function(e) {
s[i][e] = !0
}
},
130: 262,
133: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(19)
, o = r(a)
, l = n(12)
, u = r(l)
, c = n(241)
, d = r(c)
, p = n(13)
, f = r(p)
, h = n(8)
, m = function() {
function e() {
s(this, e),
this.generateActions("fetchChannelsSuccess", "fetchChannelsError", "fetchChannelDetailsSuccess", "fetchChannelDetailsError")
}
return i(e, [{
key: "fetchChannels",
value: function() {
var e = this;
return function(t) {
t(),
d["default"].fetchChannels().then(function(t) {
e.fetchChannelsSuccess({
data: t
})
})
}
}
}, {
key: "fetchChannelDetails",
value: function(e) {
var t = this;
return function(n) {
n({
channelId: e
}),
d["default"].fetchChannel(e).then(function(n) {
t.fetchChannelDetailsSuccess({
channelId: e,
data: n
})
})["catch"](function(n) {
if (n.type === h.XHR_STATUS && 404 === n.status)
return t.fetchChannelDetailsError({
channelId: e
});
throw n
})
}
}
}, {
key: "followChannel",
value: function(e, t, n) {
return function(i) {
i({
userId: e,
channelId: t,
isFollowing: n
}),
n ? (d["default"].follow(u["default"].getUser(), [{
id: t
}]),
f["default"].track("Channel Subscribe", {
channel: t
})) : (d["default"].unfollow(u["default"].getUser(), [{
id: t
}]),
f["default"].track("Channel Unsubscribe", {
channel: t
}))
}
}
}]),
e
}();
t["default"] = o["default"].createActions(m),
e.exports = t["default"]
},
134: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(21)["default"]
, a = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(19)
, l = a(o)
, u = n(12)
, c = a(u)
, d = n(8)
, p = n(350)
, f = a(p)
, h = n(4)
, m = n(13)
, g = a(m)
, v = n(113)
, y = a(v)
, _ = n(16)
, b = a(_)
, w = function() {
function e() {
s(this, e),
this.generateActions("parseTokenSuccess", "parseTokenError", "sendLoginEmailSuccess", "sendLoginEmailError")
}
return i(e, [{
key: "loginWithEmailTokenAndRedirect",
value: function(e) {
var t = this
, n = (0,
f["default"])(e);
c["default"].loginWithCredentials({
email_token: e
}).then(function() {
var e = n.item_id ? "/item/" + n.item_id : "/";
g["default"].track("Login Successful", {
login_type: "email"
}),
h.history.navigate(e, {
trigger: !0,
replace: !0
})
})["catch"](function(e) {
if (e.type === d.INVALID_TOKEN)
return t.loginError(e);
throw e
})
}
}, {
key: "loginWithCredentials",
value: function(e) {
var t = this;
return function(n) {
n(),
c["default"].loginWithCredentials(e).then(t.loginSuccess)["catch"](function(e) {
if (e.type === d.INVALID_TOKEN || e.type === d.MISSING_PASSWORD)
return t.loginError(e);
throw e
})
}
}
}, {
key: "loginSuccess",
value: function(e) {
return function(t) {
g["default"].track("Login Blendle"),
g["default"].track("Login Successful", {
platform: "blendle"
}),
t(e)
}
}
}, {
key: "loginError",
value: function(e) {
return function(t) {
g["default"].track("Login Error", {
event: e.message || e.type,
platform: "blendle"
}),
t(e)
}
}
}, {
key: "sendLoginEmail",
value: function(e, t) {
var n = this
, i = arguments.length <= 2 || void 0 === arguments[2] ? !1 : arguments[2];
return function(s) {
s();
var a = r({}, e.includes("@") ? {
email: e
} : {
user_id: e
}, {
item_id: t,
force_send: i
});
return y["default"].post(b["default"].getLink("email_tokens"), a).then(n.sendLoginEmailSuccess)["catch"](function(e) {
if (e.type === d.XHR_STATUS && 404 === e.status)
return n.sendLoginEmailError(e);
throw e
})
}
}
}, {
key: "setEmail",
value: function(e) {
return e
}
}]),
e
}();
t["default"] = l["default"].createActions(w),
e.exports = t["default"]
},
135: function(e, t, n) {
"use strict";
function i(e) {
return w["default"].get(e.getLink("rewards")).then(function(e) {
return e.data._embedded.rewards
})
}
function s(e, t) {
var n = t.redeem_token
, i = t.provider_uid;
return w["default"].post(e.getLink("rewards"), {
redeem_token: n,
provider_uid: i
}).then(function() {
return !0
})
}
function r(e) {
var t = e.find(function(e) {
return e.pick_a_subscription
});
return t ? (t._embedded.providers = t._embedded.providers.map(function(e) {
return e.most_recent_issue = new k["default"](e.most_recent_issue),
e
}),
t) : null
}
var a = n(7)["default"]
, o = n(6)["default"]
, l = n(21)["default"]
, u = n(146)["default"]
, c = n(24)["default"]
, d = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var p = n(19)
, f = d(p)
, h = n(142)
, m = d(h)
, g = n(13)
, v = d(g)
, y = n(52)
, _ = d(y)
, b = n(113)
, w = d(b)
, S = n(90)
, k = d(S)
, E = n(4)
, C = n(3)
, T = d(C)
, P = function() {
function e() {
o(this, e),
this.generateActions("fetchPaymentMethodsSuccess", "fetchPaymentMethodsError", "setActiveStep", "setReturnUrl", "setRewardSubscription", "redeemSubscriptionRewardSuccess", "redeemSubscriptionRewardError")
}
return a(e, [{
key: "redeemSubscriptionReward",
value: function(e, t) {
var n = this;
return function(a) {
a(),
i(e).then(r).then(function(n) {
return s(e, {
redeem_token: n.redeem_token,
provider_uid: t
})
}).then(function() {
return n.redeemSubscriptionRewardSuccess()
})["catch"](function(e) {
throw n.redeemSubscriptionRewardError({
error: !0
}),
e
})
}
}
}, {
key: "fetchPaymentMethods",
value: function(e) {
var t = this;
return function(n) {
return n(),
c.all([m["default"].getPaymentMethodsProcessed(e), m["default"].getRecurringContract(e), i(e)]).then(function(n) {
var i = u(n, 3)
, s = i[0]
, a = i[1]
, o = i[2]
, c = "options";
o && o.length > 0 && (c = "rewards");
var d = r(o)
, p = e.get("preferences").last_payment_method
, f = e.get("preferences").last_bank
, h = s.find(function(e) {
return e.code === p
})
, m = void 0;
return h && h.banks && (m = h.banks.find(function(e) {
return e.code === f
})),
t.setPaymentMethod(h ? h.code : void 0, m ? m.code : void 0, s),
v["default"].track("Start Payment", l({
balance: e.get("balance")
}, null !== d ? {
reward: "pick_a_subscription"
} : void 0)),
{
paymentMethods: s,
recurring: a.recurring_enabled,
reward: d,
activeStep: c,
recurring_contracts: a._embedded.recurring_contracts
}
}).then(function(e) {
return t.fetchPaymentMethodsSuccess(e),
e
})["catch"](function(e) {
throw t.fetchPaymentMethodsError(e),
e
})
}
}
}, {
key: "setAmount",
value: function(e) {
return parseInt(e)
}
}, {
key: "setPaymentMethod",
value: function(e, t, n) {
if (void 0 === e && (e = "0"),
void 0 === t && (t = "0"),
"creditcard" === e && "0" === t) {
var i = n.find(function(t) {
return t.code === e
}).banks;
t = i[0].code
}
return {
selectedPaymentMethod: e,
selectedBank: t
}
}
}, {
key: "setRecurringRequestContract",
value: function(e) {
return {
recurringRequest: e
}
}
}, {
key: "setRecurringContract",
value: function(e, t) {
return function(n) {
m["default"].setRecurringContract(e, t).then(function(e) {
return m["default"].getRecurringState(e)
}).then(function(e) {
return n({
recurring: e
})
})
}
}
}, {
key: "fetchPaymentURL",
value: function(e, t) {
var n = this;
return function(i) {
i();
var s = e.selectedReward
, r = {
success_url: s ? "payment/success/pick-a-subscription/" + s.providerUid : "payment/success",
pending_url: "payment/pending",
cancel_url: "payment/cancelled",
method: e.selectedPaymentMethod,
amount: e.selectedAmount,
recurring: e.recurringRequest
};
e.selectedBanks[e.selectedPaymentMethod] && (r.bank = e.selectedBanks[e.selectedPaymentMethod]),
t.savePreferences({
last_payment_method: r.method,
last_bank: r.bank
}),
m["default"].fetchPaymentURL(t, r).then(function(t) {
n.fetchPaymentURLSuccess(e, t)
})
}
}
}, {
key: "fetchPaymentURLSuccess",
value: function(e, t) {
var n = {
bank: e.selectedBanks[e.selectedPaymentMethod]
};
return v["default"].track("Payment Request", l({
method: e.selectedPaymentMethod,
amount: e.selectedAmount,
recurring: !!e.recurring_enabled
}, "0" !== n.bank ? n : void 0, null !== e.selectedReward ? {
reward: "pick_a_subscription"
} : void 0, null !== e.selectedReward ? {
rewardSubscription: e.selectedReward.providerUid
} : void 0)),
_["default"].set("paymentRequest", JSON.stringify(l({
method: e.selectedPaymentMethod,
amount: e.selectedAmount,
recurring: !!e.recurring_enabled,
returnUrl: e.returnUrl
}, "0" !== n.bank ? n : void 0, null !== e.selectedReward ? {
reward: "pick_a_subscription"
} : void 0, null !== e.selectedReward ? {
rewardSubscription: e.selectedReward.providerUid
} : void 0))),
{
paymentURL: t,
activeStep: "confirmation"
}
}
}, {
key: "fetchSubscriptionPaymentURL",
value: function(e, t, n) {
var i = this
, s = t.product
, r = t.jwt
, a = "payment/success/subscription/" + s.uid
, o = {
success_url: a,
pending_url: "payment/pending",
cancel_url: "payment/cancelled",
payment: r
};
return e && e.selectedBanks[e.selectedPaymentMethod] && (o.bank = e.selectedBanks[e.selectedPaymentMethod]),
e && e.selectedPaymentMethod && (o.method = e.selectedPaymentMethod),
n.savePreferences({
last_payment_method: o.method,
last_bank: o.bank
}),
m["default"].fetchOrderURL(o).then(function(t) {
var n = null ;
t._links.payment && (n = t._links.payment.href),
i.fetchSubscriptionPaymentURLSuccess(e, n, a, s)
})["catch"](function(e) {
throw i.fetchSubscriptionPaymentURLError(e),
e
}),
null
}
}, {
key: "fetchSubscriptionPaymentURLSuccess",
value: function(e, t, n, i) {
var s = {
bank: e.selectedBanks[e.selectedPaymentMethod]
}
, r = i._links["b:providers"][0].href.split("/").pop()
, a = i._embedded["b:tier"]._embedded["b:tier-prices"].find(function(e) {
return e.currency === T["default"].currentCurrency
}).amount
, o = {
method: e.selectedPaymentMethod,
recurring: e.recurring_contracts.length > 0,
offer: a,
provider_uid: r,
subscription: i.uid
};
return s && "0" !== s.bank && (o.bank = s.bank),
_["default"].set("paymentRequest", JSON.stringify(o)),
v["default"].track("Provider Subscription/Payment Request", o),
t || E.history.navigate(n, {
trigger: !0,
replace: !0
}),
{
paymentURL: t,
activeStep: "confirmation"
}
}
}, {
key: "fetchSubscriptionPaymentURLError",
value: function(e) {
return v["default"].track("Provider Subscription/Payment Request Error", {
error: e.message
}),
e
}
}]),
e
}();
t["default"] = f["default"].createActions(P),
e.exports = t["default"]
},
136: function(e, t, n) {
"use strict";
function i(e) {
return E["default"].getProviderOrDefault(e).get("name")
}
function s(e) {
return {
isLegacy: !0,
uid: e._embedded.provider.id,
renew: !e.expires_at,
trial: !!e.expires_at,
expired: e.expires_at ? (0,
b["default"])(e.expires_at).isBefore(new Date) : !1,
startDate: (0,
b["default"])(e.created_at),
endDate: (0,
b["default"])(e.expires_at),
provider: {
uid: e._embedded.provider.id
}
}
}
function r(e) {
return {
uid: e.subscription_uid,
renew: e.renew,
trial: e.trial,
expired: e.expired,
startDate: (0,
b["default"])(e.start_date),
endDate: (0,
b["default"])(e.end_date),
provider: {
uid: e._embedded["b:providers"][0].uid
},
product: e._embedded["b:subscription-product"]
}
}
function a(e, t) {
var n = e.map(function(e) {
return r(e)
})
, i = t.map(function(e) {
return s(e)
});
return n.concat(i)
}
var o = n(7)["default"]
, l = n(6)["default"]
, u = n(21)["default"]
, c = n(146)["default"]
, d = n(24)["default"]
, p = n(1)["default"]
, f = n(145)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var h = n(19)
, m = p(h)
, g = n(120)
, v = f(g)
, y = n(5)
, _ = n(18)
, b = p(_)
, w = n(13)
, S = p(w)
, k = n(30)
, E = p(k)
, C = function() {
function e() {
l(this, e),
this.generateActions("fetchUserSubscriptionsSuccess", "fetchUserSubscriptionsError", "fetchUserSubscriptionSuccess")
}
return o(e, [{
key: "stopSubscription",
value: function(e, t, n) {
var i = this;
return function(s) {
s({
subscriptionUid: t
});
var r = {
subscriptionUid: t,
reason: n,
subscription_type: "internal"
};
v.stopSubscription(e, t).then(function() {
i.fetchUserSubscriptions(e),
S["default"].track("Subscription Cancel", r)
})["catch"](function() {
S["default"].track("Subscription Cancel Failed", r)
})
}
}
}, {
key: "cancelSubscription",
value: function(e, t) {
var n = this;
return function(s) {
s({
providerId: t
});
var r = {
providerId: t,
provider: i(t),
subscription_type: "external"
};
v.deleteSubscription(t).then(function() {
n.fetchUserSubscriptions(e),
S["default"].track("Subscription Cancel", r),
S["default"].track("Subscription Remove", r)
})["catch"](function() {
S["default"].track("Subscription Cancel Failed", r),
S["default"].track("Subscription Remove Failed", r)
})
}
}
}, {
key: "fetchUserSubscription",
value: function(e, t) {
return v.fetchSubscription(e, t).then(r.bind(this)).then(this.fetchUserSubscriptionSuccess)["catch"](this.fetchUserSubscriptionError),
null
}
}, {
key: "fetchUserSubscriptionError",
value: function(e) {
var t = e.data && e.data.hasOwnProperty("subscription_uid")
, n = void 0;
return 402 === e.status && t && (n = r(e.data)),
{
error: e,
subscription: n
}
}
}, {
key: "pollFetchUserSubscription",
value: function(e, t) {
var n = this
, i = 10
, s = 0;
return function(a) {
return a({
userId: t
}),
new d(function(n, r) {
var a = function o() {
v.fetchSubscription(e, t).then(n, function() {
i > s ? (s++,
setTimeout(o, 500 + 250 * s)) : r(new Error("Cannot fetch valid subscription after " + (s + 1) + " times."))
})
}
;
setTimeout(a, 500)
}
).then(r.bind(n)).then(n.fetchUserSubscriptionSuccess)["catch"](n.fetchUserSubscriptionError)
}
}
}, {
key: "fetchUserSubscriptions",
value: function(e) {
var t = this;
return function(n) {
n({
userId: e
}),
v.getUserSubscriptions(e).then(function(e) {
var n = c(e, 2)
, i = n[0]
, s = n[1]
, r = (0,
y.get)(s.data, ["_embedded", "b:subscriptions"], [])
, o = (0,
y.get)(i.data, ["_embedded", "provider_accounts"], []).map(function(e) {
return u({}, e, {
isLegacy: !0
})
})
, l = a(r, o);
t.fetchUserSubscriptionsSuccess(l)
})["catch"](function(e) {
t.fetchUserSubscriptionsError(e)
})
}
}
}, {
key: "updateCancelReason",
value: function(e) {
return e
}
}, {
key: "selectSubscription",
value: function(e) {
return {
subscription: e
}
}
}, {
key: "deselectSubscription",
value: function() {
return {}
}
}]),
e
}();
t["default"] = m["default"].createActions(C),
e.exports = t["default"]
},
137: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(543)
, r = i(s);
t["default"] = r["default"],
e.exports = t["default"]
},
138: function(e, t, n) {
"use strict";
var i = n(21)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(2)
, a = s(r)
, o = n(550)
, l = s(o)
, u = n(571)
, c = s(u)
, d = n(17)
, p = s(d)
, f = a["default"].createClass({
displayName: "TilePaneView",
propTypes: {
version: a["default"].PropTypes.number,
orientation: a["default"].PropTypes.oneOf(["horizontal", "vertical"]),
onNearEnd: a["default"].PropTypes.func.isRequired
},
getDefaultProps: function() {
return {
active: !0,
showButtons: p["default"].isDesktop() && !p["default"].hasTouch(),
orientation: p["default"].isMobile() ? "vertical" : "horizontal"
}
},
scrollTo: function(e) {
this.refs.pane.setScrollPosition(e)
},
render: function() {
return "horizontal" === this.props.orientation ? a["default"].createElement(l["default"], i({
ref: "pane"
}, this.props)) : a["default"].createElement(c["default"], i({
ref: "pane"
}, this.props))
}
});
t["default"] = f,
e.exports = t["default"]
},
139: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(94)["default"]
, r = n(21)["default"]
, a = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(2)
, l = a(o)
, u = n(33)
, c = a(u)
, d = n(11)
, p = a(d)
, f = n(8);
t["default"] = l["default"].createClass({
displayName: "Alert",
propTypes: {
onClose: l["default"].PropTypes.func,
onConfirm: l["default"].PropTypes.func.isRequired,
className: l["default"].PropTypes.string,
children: l["default"].PropTypes.any
},
_onKeyDown: function(e) {
e.keyCode === f.keyCode.RETURN && this.props.onConfirm && this.props.onConfirm(e)
},
render: function() {
var e = this.props
, t = e.className
, n = (s(e, ["className"]),
(0,
p["default"])(i({
"v-alert": !0
}, t, t)));
return l["default"].createElement(c["default"], r({}, this.props, {
onKeyDown: this._onKeyDown,
className: n
}), this.props.children)
}
}),
e.exports = t["default"]
},
140: function(e, t, n) {
"use strict";
var i = n(24)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(44)
, a = s(r)
, o = n(8)
, l = s(o)
, u = n(5929)
, c = s(u)
, d = n(4)
, p = s(d)
, f = n(3)
, h = s(f)
, m = n(38)
, g = s(m)
, v = n(47)
, y = s(v)
, _ = n(13)
, b = s(_)
, w = n(105)
, S = s(w)
, k = n(17)
, E = s(k)
, C = n(16)
, T = s(C)
, P = n(12)
, N = s(P)
, x = n(178)
, R = s(x)
, L = n(230)
, I = n(35)
, M = s(I)
, A = n(175)
, D = s(A)
, O = n(165)
, U = s(O)
, q = n(114)
, F = s(q)
, j = n(828)
, V = s(j)
, B = n(179)
, W = s(B)
, z = n(384)
, H = s(z)
, G = n(181)
, K = s(G)
, Y = n(739)
, X = s(Y)
, J = n(715)
, Q = s(J)
, Z = n(784)
, $ = s(Z)
, ee = n(180)
, te = s(ee)
, ne = n(392)
, ie = s(ne)
, se = n(694)
, re = s(se)
, ae = n(679)
, oe = s(ae)
, le = n(741)
, ue = s(le)
, ce = n(68)
, de = s(ce)
, pe = n(769)
, fe = s(pe)
, he = n(701)
, me = s(he)
, ge = n(685)
, ve = s(ge)
, ye = n(712)
, _e = s(ye)
, be = n(696)
, we = s(be)
, Se = n(816)
, ke = s(Se)
, Ee = n(819)
, Ce = s(Ee)
, Te = n(661)
, Pe = s(Te)
, Ne = n(241)
, xe = s(Ne)
, Re = n(80)
, Le = s(Re)
, Ie = n(838)
, Me = s(Ie)
, Ae = n(642)
, De = s(Ae)
, Oe = n(5685)
, Ue = s(Oe);
n(349);
var qe = p["default"].RootController.extend({
loaded: !1,
moduleTypeStackOrder: ["content", "item", "overlay", "dialogue"],
modules: [K["default"], oe["default"], $["default"], W["default"], H["default"], V["default"], X["default"], Q["default"], te["default"], ie["default"], fe["default"], re["default"], ue["default"], de["default"], me["default"], _e["default"], we["default"], ke["default"], Ce["default"]],
initialize: function() {
a["default"].accesspage && this.modules.push(ve["default"]),
this.on("route", this._onRoute),
this.on("activeModuleChange", this._trackActiveModule),
navigator.standalone && p["default"].history.on("navigate", this._rememberLastVisitedURL),
this._addRoutes(),
this._initializeSocial(),
this._addModules(),
this._setupView(),
y["default"].loadFromCookie()
},
getNavigation: function() {
return this.view.getModuleNavigation()
},
getPrimaryNavigation: function() {
return this.view.getPrimaryNavigation()
},
load: function() {
i.all([this._loadUserAndValidateCountry(), this._loadSettings(), this._loadFonts()]).then(this.run.bind(this), this.error.bind(this)).done(),
this._requestMaintenanceStatus()
},
_loadUserAndValidateCountry: function() {
return i.all([this._loadUser(), this._loadSupportedLocales()]).then(function() {
return !N["default"].getUser() && D["default"].shouldRedirect() ? new i(function() {
D["default"].redirectToLaunchSite()
}
) : void 0
}).then(function() {
g["default"].isSupportedCountry() || g["default"].setCountryCode(g["default"].getDefaultCountryCode())
}).then(this._loadLocale.bind(this))
},
error: function(e) {
if (e.type === l["default"].MAINTENANCE)
return this.view.showMaintenanceMessage(e.message),
i.resolve();
if (!this._inMaintenance)
return window.ErrorLogger.captureException(e),
window.navigator.userAgent.match(/googlebot/i) || (e.type === l["default"].XHR ? this.view.showApiFailMessage(e.message) : this.view.showFailMessage(e.message)),
"production" === c["default"].name ? (console.error(e.message),
i.resolve()) : i.reject(e)
},
_authHandler: function() {
var e = N["default"].getUser();
F["default"].authenticateUser(e),
window.Raven.setTagsContext({
user_id: e.id
}),
b["default"].setUser(e),
g["default"].setCountryCode(e.get("country")),
h["default"].load(e.get("primary_language")),
h["default"].setCurrency(e.get("currency")),
Ue["default"].syncExperiments(N["default"].getUser())
},
run: function() {
var e = this;
N["default"].getUser() ? this._authHandler() : (Ue["default"].syncExperiments(),
this.listenTo(N["default"], "login", function() {
e._authHandler()
}));
var t = (0,
De["default"])();
b["default"].setSession(t),
b["default"].track("Session", {
browser: window.BrowserDetect.browser,
device: window.BrowserDetect.device,
os: window.BrowserDetect.operatingSystem,
version: window.BrowserDetect.version,
orientation: E["default"].getOrientation(),
app: window.BrowserDetect.app,
appVersion: window.BrowserDetect.appVersion,
standalone: void 0 !== navigator.standalone ? navigator.standalone : "unknown"
}),
S["default"].applicationRunning(),
R["default"].removeTrailingSlash(document.location.href, !0),
p["default"].history.start({
pushState: !T["default"].embedded,
silent: !0
}),
navigator.standalone && window.BrowserDetect.localStorageEnabled() && p["default"].history.navigate(localStorage.getItem("standaloneUrl"), {
replace: !0
}),
p["default"].history.loadUrl(),
U["default"].setActiveUrl(p["default"].history.fragment),
window.addEventListener("orientationchange", this._trackOrientation.bind(this)),
this.listenTo(N["default"], "logout", h["default"].resetCookie)
},
_addRoutes: function() {
this.route("*notFound", function(e) {
return xe["default"].fetchChannels().then(function(t) {
var n = t.find(function(t) {
var n = t.get("id").replace("blendle", "") || t.get("id");
return n === e
});
n ? p["default"].history.navigate("/channel/" + n.get("id"), {
trigger: !0,
replace: !0
}) : p["default"].history.navigate("/404", {
trigger: !0,
replace: !0
})
})
}),
this.route("cadeaubon(/:code)", function(e) {
var t = "coupon";
e && (t += "/" + e),
p["default"].history.navigate(t, {
trigger: !0
})
}),
this.route("cadeautje", function() {
p["default"].history.navigate("coupon/gift", {
trigger: !0
})
}),
this.route("logout(/:loginEmail)", function(e) {
N["default"].getUser() ? N["default"].logout().then(function() {
e ? window.location = "/login?email=" + e : window.location = "/"
}) : p["default"].history.navigate("", {
trigger: !0,
replace: !0
})
});
var e = function() {
p["default"].history.navigate("user/" + N["default"].getId() + "/items", {
trigger: !0
})
}
;
this.route("archive", e)
},
_initializeSocial: function() {
Le["default"].execute("init", {
appId: Le["default"].appId,
version: Le["default"].version,
status: !0
})
},
_setupView: function() {
this.view = new Me["default"],
this.view.render(),
this.view.load()
},
_addModules: function() {
var e = this;
this.modules.forEach(function(t) {
e.addModule(t)
})
},
_onRoute: function() {
p["default"].history.add(p["default"].history.fragment),
b["default"].urlChange(p["default"].history.fragment),
U["default"].setActiveUrl(p["default"].history.fragment)
},
_trackActiveModule: function(e) {
y["default"].set({
activeModule: e.name
}),
U["default"].setActiveModule(e.name)
},
_rememberLastVisitedURL: function() {
if (window.BrowserDetect.localStorageEnabled()) {
var e = p["default"].history.fragment;
"logout" === p["default"].history.fragment && (e = ""),
window.localStorage.setItem("standaloneUrl", e)
}
},
_requestMaintenanceStatus: function() {
var e = this;
c["default"].maintenanceFile && p["default"].ajax({
url: c["default"].maintenanceFile + "?" + (new Date).getTime()
}).then(function(t) {
var n = "We're tinkering with our machines at the moment. We'll be back shortly!";
t && t.data && t.data.message && (n = t.data.message),
e._inMaintenance = !0,
e.error(new M["default"](l["default"].MAINTENANCE,t.data.message,t))
})["catch"](function() {
return !0
})
},
_loadSettings: function() {
return T["default"].fetch()["catch"](function(e) {
return i.reject(new M["default"](l["default"].XHR,"Unable to load api.json",e))
})
},
_loadUser: function() {
return N["default"].autoLogin()["catch"](function(e) {
if (e.type === l["default"].INVALID_TOKEN)
return b["default"].track("JWT Expired", {
type: "autologin"
}),
i.resolve(null );
if (e.type === l["default"].NO_TOKEN)
return i.resolve(null );
if (e.status)
throw new M["default"](l["default"].MAINTENANCE,e.message,e);
throw e
})
},
_loadLocale: function() {
var e = g["default"].getLocale();
return h["default"].load(e).then(function() {
h["default"].currentCurrency || h["default"].setCurrencyBasedOnLocale(e)
})["catch"](function(e) {
return e instanceof Error || (e = new M["default"](l["default"].XHR,"Unable to load locale (" + g["default"].getLocale() + ")",e)),
i.reject(e)
})
},
_loadSupportedLocales: function() {
return Pe["default"].getSupported().then(function(e) {
return h["default"].setSupportedOptionsFromResponse(e),
g["default"].getCountryCode() || g["default"].setCountryCode(e.countryHeader),
e
})
},
_loadFonts: function() {
return E["default"].isMobile() ? i.resolve() : (0,
L.load)([{
family: "Proxima Nova",
weight: 400,
style: "normal"
}], 3e3)["catch"](function() {
return i.resolve()
})
},
_trackOrientation: function() {
b["default"].track("Change orientation", {
orientation: E["default"].getOrientation(),
location: p["default"].history.fragment
})
}
});
t["default"] = new qe,
e.exports = t["default"]
},
141: function(e, t, n) {
"use strict";
function i(e, t, n) {
return s(e).map(function(i) {
return {
size: i,
offset: e[i][t] - n
}
}).filter(function(e) {
return e.offset >= 0
}).sort(function(e, t) {
return e.offset - t.offset
}).map(function(e) {
return e.size
})
}
var s = n(53)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(5);
t["default"] = {
getXHD: function(e, t) {
if (void 0 === e && (e = {}),
!window.BrowserDetect.isXHD() || "original" === t)
return e[t];
var n = e[t].width * e[t].height
, i = 4 * n;
return s(e).reduce(function(n, s) {
var a = e[s].width * e[s].height
, o = Math.abs(a - i)
, l = n;
return ("string" == typeof n || n._xhdOffset >= o) && (l = (0,
r.merge)(e[s], {
_xhdOffset: o,
isXHD: s !== t
})),
l
})
},
getSizeForHeight: function(e, t) {
void 0 === e && (e = {});
var n = i(e, "height", t);
return n[0] || "original"
},
getSizeForWidth: function(e, t) {
void 0 === e && (e = {});
var n = i(e, "width", t);
return n[0] || "original"
}
},
e.exports = t["default"]
},
142: function(e, t, n) {
var i, s = n(24)["default"];
i = function(e) {
"use strict";
function t(e) {
var t = l.uri2url(e);
return window.BrowserDetect.iOS && "Chrome" === window.BrowserDetect.browser ? t.replace(/https?/, "googlechrome") : t
}
function i(e) {
return e.success_url && (e.success_url = t(e.success_url)),
e.pending_url && (e.pending_url = t(e.pending_url)),
e.cancel_url && (e.cancel_url = t(e.cancel_url)),
e
}
var r = n(5)
, a = n(4)
, o = n(16)
, l = n(178)
, u = {
ideal: ["0031", "0021", "0721", "0751", "0511", "0161"]
}
, c = {
getAmounts: function() {
return [5, 10, 20, 50]
},
getTransactionFees: function() {
return {
5: .3
}
},
getDefaultPaymentMethod: function() {
return "ideal"
},
getPaymentMethods: function(e) {
return a.ajax({
url: o.getLink("adyen_payment_methods", {
user_id: e.id
})
}).then(function(e) {
return s.resolve(e.data)
})
},
getPaymentMethodsProcessed: function(e) {
return this.getPaymentMethods(e).then(this._processPaymentMethods.bind(this))["catch"](function() {
return new Error("Unable to fetch payment methods.")
})
},
_processPaymentMethods: function(e) {
var t = this
, n = {
name: "Creditcard",
code: "creditcard",
banks: []
}
, i = r.reduce(e, function(e, i) {
return "directdebit_NL" === i.code ? e : "mc" === i.code || "visa" === i.code || "amex" === i.code ? (n.banks.push(i),
e) : (i.banks && (i.banks = t._orderBanks(i.code, i.banks)),
e.push(i),
e)
}, [n])
, s = ["directEbanking", "paypal", "ideal", "creditcard"];
return i.sort(function(e, t) {
var n = s.indexOf(e.code)
, i = s.indexOf(t.code);
return i > n ? -1 : n > i ? 1 : 0
}),
i
},
getRecurringContract: function(e) {
return a.ajax({
url: o.getLink("user_payment", {
user_id: e.id
}),
type: "GET"
}).then(function(e) {
return e.data
})
},
setRecurringContract: function(e, t) {
return a.ajax({
url: o.getLink("user_payment", {
user_id: e.id
}),
type: "PUT",
data: JSON.stringify({
recurring_enabled: t
})
}).then(function(e) {
return e.data
})
},
getRecurringState: function(e) {
var t = e.recurring_enabled
, n = r.get(e, "_embedded.recurring_contracts", [])
, i = "norecurring_nocontracts";
return t && n.length ? i = "recurring" : t && !n.length ? i = "recurring_nocontracts" : !t && n.length && (i = "norecurring_hascontracts"),
{
state: i,
enabled: t,
recurringContracts: n,
data: e
}
},
upgradeRecurring: function(e) {
return a.ajax({
url: o.getLink("adyen_place_order", {
user_id: e.id
}),
type: "POST",
data: JSON.stringify({
amount: 10
})
})
},
fetchPaymentURL: function(e, t) {
var n = i(t);
return "creditcard" === n.method && (n.method = n.bank),
a.ajax({
type: "POST",
url: o.getLink("adyen_payment_proposal", {
user_id: e.id
}),
data: JSON.stringify(n)
}).then(function(e) {
return e.data.location
})
},
fetchOrderURL: function(e) {
var t = i(e);
return "creditcard" === t.method && (t.method = t.bank),
a.ajax({
type: "POST",
url: o.getLink("orders"),
data: JSON.stringify(t),
skipJWTRefresh: !!t.payment
}).then(function(e) {
return e.data
})
},
_orderBanks: function(e, t) {
if (!u[e])
return t;
var n = r.reduce(u[e], function(e, n) {
var i = r.findWhere(t, {
code: n
});
return i && e.push(i),
e
}, []);
return n.concat(r.filter(t, function(t) {
return -1 === u[e].indexOf(t.code)
}))
}
};
return c
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
143: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(25)
, s = n(16)
, r = n(121)
, a = {
requestUniqueAccessURL: function(e, n) {
var r = this
, a = i.defer()
, o = {
url: s.getLink("onetimelink", {
item_id: e,
service: n
}),
type: "POST"
};
return navigator.standalone && (o.async = !1,
o.success = function(e) {
var t = document.createElement("a");
t.setAttribute("href", r._createPocketUrl(e.data.url)),
t.setAttribute("target", "_blank");
var n = document.createEvent("HTMLEvents");
n.initEvent("click", !0, !0),
t.dispatchEvent(n),
a.resolve(e.data.url)
}
),
t.ajax(o).then(function(e) {
201 === e.status ? a.resolve(e.data.url) : a.reject(e)
}, function(e) {
a.reject(e)
}).done(),
a.promise
},
shareToPocket: function(e) {
var t, n = this;
return navigator.standalone || (t = window.open("about:blank", "pocket", "width=550,height=300")),
a.requestUniqueAccessURL(e, "getpocket.com").then(function(e) {
navigator.standalone || (t.location.href = n._createPocketUrl(e))
}, function() {
console.error("Something went wrong then requesting sharing URL from manager.")
})
},
shareToEmail: function(e, n, i, r) {
return t.ajax({
url: s.getLink("email_share", {
user_id: e
}),
type: "POST",
data: JSON.stringify({
item_id: n,
emails: i,
message: r
})
})
},
shareToChannel: function(e, n, r, o, l) {
var u = _.merge({}, {
id: r.id,
text: o,
published_at: l
})
, c = 1;
return this.previousShared === r && (c = 0),
this.previousShared = r,
t.ajax({
url: s.getLink("posts", {
user_id: n.id
}),
data: JSON.stringify(u),
type: "POST"
}).then(function(t) {
return n.set("posts", (n.get("posts") || 0) + c),
r.set("post_count", r.get("post_count") + c),
r.trigger("posts_change"),
i.resolve(a._newPost(e, n, r, t.data))
})
},
removePost: function(e, t) {
var n = this;
return e.destroy().then(function() {
return t.set("post_count", t.get("post_count") - 1),
n.previousShared = void 0,
t.trigger("posts_change"),
i.resolve(e)
})
},
_newPost: function(e, t, n, i) {
var s = new r(i,{
parse: !0,
track: !0
});
return s.set("manifest", n.getEmbedded("manifest")),
s
},
_createPocketUrl: function(e) {
return "https://getpocket.com/edit?url=" + encodeURIComponent(e)
}
};
return a
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
144: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(5)
, s = n(347)
, r = n(30)
, a = t.Model.extend({
name: "manifest",
parse: function(e) {
return e._links && e._links.self && (this.url = e._links.self.href),
e.images && !s.allowImages(e.date, e.id, e.provider.id) && (e.images = []),
"telegraaf" === e.provider.id && (e.body = i.map(e.body, function(e) {
return "hl1" === e.type ? {
type: e.type,
content: "<b>" + e.content + "</b>"
} : e
})),
this.parseHal(e)
},
getProvider: function() {
return r.getProviderOrDefault(this.get("provider").id)
},
getTitle: function() {
try {
return (i.findWhere(this.get("body"), {
type: "hl1"
}) || i.findWhere(this.get("body"), {
type: "hl2"
})).content
} catch (e) {
return "Unknown title format"
}
},
getReadingTime: function() {
var e = 275;
return Math.ceil(this.get("length").words / e)
},
getTitleAsText: function() {
return i.unescape(i.stripTags(this.getTitle())).trim()
},
getByline: function() {
var e = i.findWhere(this.get("body"), {
type: "byline"
});
return e ? e.content : ""
},
getIntro: function() {
try {
return (i.findWhere(this.get("body"), {
type: "intro"
}) || i.findWhere(this.get("body"), {
type: "lead"
}) || i.findWhere(this.get("body"), {
type: "paragraph"
}) || i.findWhere(this.get("body"), {
type: "p"
})).content
} catch (e) {
return ""
}
},
getIntroAsText: function() {
return i.unescape(i.stripTags(this.getIntro()))
},
getBody: function() {
return this.get("format_version") >= 4 ? this.get("body") : [{
type: "kicker",
content: this.get("kicker")
}, {
type: "head",
content: this.get("head")
}, {
type: "byline",
content: this.get("byline")
}, {
type: "dateline",
content: this.get("dateline")
}, {
type: "intro",
content: this.get("intro")
}, {
type: "lead",
content: this.get("lead")
}]
}
});
return a
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
145: function(e, t) {
"use strict";
t["default"] = function(e) {
if (e && e.__esModule)
return e;
var t = {};
if (null != e)
for (var n in e)
Object.prototype.hasOwnProperty.call(e, n) && (t[n] = e[n]);
return t["default"] = e,
t
}
,
t.__esModule = !0
},
146: function(e, t, n) {
"use strict";
var i = n(866)["default"]
, s = n(867)["default"];
t["default"] = function() {
function e(e, t) {
var n = []
, s = !0
, r = !1
, a = void 0;
try {
for (var o, l = i(e); !(s = (o = l.next()).done) && (n.push(o.value),
!t || n.length !== t); s = !0)
;
} catch (u) {
r = !0,
a = u
} finally {
try {
!s && l["return"] && l["return"]()
} finally {
if (r)
throw a
}
}
return n
}
return function(t, n) {
if (Array.isArray(t))
return t;
if (s(Object(t)))
return e(t, n);
throw new TypeError("Invalid attempt to destructure non-iterable instance")
}
}(),
t.__esModule = !0
},
152: [5938, 83, 429, 426, 39, 61, 440],
153: 126,
154: [5956, 29, 60, 40],
155: function(e, t, n) {
var i = n(156)
, s = Math.max
, r = Math.min;
e.exports = function(e, t) {
return e = i(e),
0 > e ? s(e + t, 0) : r(e, t)
}
},
156: 416,
163: function(e, t) {
"use strict";
function n() {
document.activeElement && document.activeElement.blur()
}
function i(e) {
return document.activeElement ? e in document.activeElement : !1
}
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.blurActiveElement = n,
t.inActiveElement = i
},
164: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(19)
, o = r(a)
, l = n(66)
, u = r(l)
, c = n(119)
, d = r(c)
, p = (n(3),
n(13))
, f = r(p)
, h = n(12)
, m = r(h)
, g = n(15)
, v = r(g)
, y = function() {
function e() {
s(this, e),
this.generateActions("loginAndConnectFacebookError", "loginAndConnectFacebookSuccess")
}
return i(e, [{
key: "connectFacebook",
value: function(e) {
var t = this;
return function(n) {
n(),
d["default"].authorizeAndGetFriends(e).then(function(e) {
return t.facebookConnectSuccess(e)
})["catch"](function(e) {
return t.facebookError(e)
})
}
}
}, {
key: "toggleFacebook",
value: function(e) {
var t = this;
return function(n) {
n(),
e.get("facebook_id") ? u["default"].disconnectFromFacebook(e).then(function() {
return t.facebookDisconnectSuccess()
})["catch"](function(e) {
return t.facebookError(e)
}) : t.connectFacebook(e)
}
}
}, {
key: "facebookConnectSuccess",
value: function(e) {
return f["default"].track("Social Connect", {
platform: "facebook"
}),
e
}
}, {
key: "facebookDisconnectSuccess",
value: function() {
return f["default"].track("Social Disconnect", {
platform: "facebook"
}),
null
}
}, {
key: "facebookError",
value: function(e) {
var t = e.message;
return f["default"].track("Social Connect Error", {
platform: "facebook",
error: t
}),
null
}
}, {
key: "loginAndConnectFacebook",
value: function(e, t) {
var n = this;
return function(i) {
i(),
m["default"].loginWithCredentials({
login: e.trim(),
password: t
}).then(function() {
f["default"].track("Login Blendle"),
f["default"].track("Login Successful", {
platform: "facebook"
})
}).then(function() {
n.connectFacebook(m["default"].getUser()),
m["default"].navigateToReturnURL(),
v["default"].unmountComponentAtNode(document.querySelector(".a-dialogue"))
})["catch"](function(e) {
return n.loginAndConnectFacebookError(e)
})
}
}
}]),
e
}();
t["default"] = o["default"].createActions(y),
e.exports = t["default"]
},
166: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(19)
, o = r(a)
, l = n(319)
, u = r(l)
, c = function() {
function e() {
s(this, e),
this.generateActions("fetchNotificationsSuccess", "fetchNotificationsError", "fetchNextNotificationsSuccess", "fetchNextNotificationsError")
}
return i(e, [{
key: "fetchNotifications",
value: function(e, t) {
var n = this;
return function(i) {
if (!(t && t.length > 0)) {
var s = new u["default"](e);
i(s),
s.fetch().then(function() {
n.fetchNotificationsSuccess(s)
})["catch"](function(e) {
n.fetchNotificationsError(e)
})
}
}
}
}, {
key: "fetchNextNotifications",
value: function(e) {
var t = this;
return function(n) {
e instanceof u["default"] && e.hasNext() && !e.isFetching() && (n(),
e.fetchNext().then(function() {
t.fetchNextNotificationsSuccess(e)
})["catch"](function(e) {
throw t.fetchNextNotificationsError(e),
e
}))
}
}
}]),
e
}();
t["default"] = o["default"].createActions(c),
e.exports = t["default"]
},
167: function(e, t, n) {
"use strict";
function i(e, t) {
var n = arguments.length <= 2 || void 0 === arguments[2] ? {} : arguments[2]
, i = o(n).map(function(e) {
return encodeURIComponent(e) + "=" + encodeURIComponent(n[e])
}).join("&");
return [window.location.protocol, "//", window.location.host, "/", e.getURI(), "/r/", t, "?", i].join("")
}
var s = n(7)["default"]
, r = n(6)["default"]
, a = n(21)["default"]
, o = n(53)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(5)
, c = l(u)
, d = n(18)
, p = l(d)
, f = n(19)
, h = l(f)
, m = n(358)
, g = l(m)
, v = n(3)
, y = n(80)
, _ = l(y)
, b = n(645)
, w = l(b)
, S = n(13)
, k = l(S)
, E = n(143)
, C = l(E)
, T = n(68)
, P = l(T)
, N = n(845)
, x = l(N)
, R = function() {
function e() {
r(this, e),
this.generateActions("shareItemToEmailSuccess", "shareItemToEmailError", "loadPlatform", "loadPlatformSuccess")
}
return s(e, [{
key: "loadPlatforms",
value: function() {
var e = this;
return this.loadPlatform("twitter"),
this.loadPlatform("facebook"),
w["default"].load().then(function() {
return e.loadPlatformSuccess("twitter")
})["catch"](function() {
return null
}),
_["default"].load().then(function() {
return e.loadPlatformSuccess("facebook")
})["catch"](function() {
return null
}),
null
}
}, {
key: "shareItemToPlaform",
value: function(e, t, n) {
return "twitter" === e ? this.shareItemToTwitter(t, n) : "facebook" === e ? this.shareItemToFacebook(t, n) : "linkedin" === e ? this.shareItemToLinkedIn(t, n) : "whatsapp" === e ? this.shareItemToWhatsApp(t, n) : "email" === e ? (n.provider_id = t.getEmbedded("manifest").get("provider").id,
this.openEmailDialog(t, n)) : void 0
}
}, {
key: "shareItemToFacebook",
value: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1]
, n = e.get("manifest")
, s = (0,
p["default"])(n.get("date"))
, r = e.getFeaturedImage()
, o = void 0;
r && (o = c["default"].get(r, "_links.medium.href"));
var l = i(e, "sh-fb", {
medium: "facebook",
campaign: "social-share",
source: "blendle"
});
return _["default"].lib.ui({
method: "feed",
display: "popup",
name: n.getTitleAsText(),
caption: c["default"].sprintf("Blendle: %s %s", n.getProvider().get("name"), s.format("L")),
description: n.getIntroAsText(),
link: l,
picture: o
}),
k["default"].track("Start Social Share Item", a({}, t, {
type: "facebook"
})),
e
}
}, {
key: "openEmailDialog",
value: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1];
return P["default"].openDialogueWithView(new x["default"]({
item: e
}), {
ignoreCloseView: !1,
className: "v-share-email white-close"
}),
k["default"].track("Share Email: Open dialogue", t),
e
}
}, {
key: "shareItemToEmail",
value: function(e, t, n, i) {
var s = this;
return C["default"].shareToEmail(e, t.id, n, i).then(function() {
s.shareItemToEmailSuccess(n)
})["catch"](function(e) {
s.shareItemToEmailError({
error: e
})
}),
null
}
}, {
key: "shareItemToTwitter",
value: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1]
, n = i(e, "sh-tw", {
medium: "twitter",
campaign: "social-share",
source: "blendle"
})
, s = e.get("manifest")
, r = (0,
v.translate)("item.text.sharing.twitter", [s.getProvider().get("name"), s.getTitleAsText()]);
return w["default"].openTweet(n, c["default"].unescape(r)),
k["default"].track("Start Social Share Item", a({}, t, {
type: "twitter"
})),
e
}
}, {
key: "shareItemToLinkedIn",
value: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1]
, n = e.get("manifest")
, s = n.getProvider().get("name")
, r = i(e, "sh-in", {
medium: "linkedin",
campaign: "social-share",
source: "blendle"
})
, o = c["default"].sprintf("http://www.linkedin.com/shareArticle?mini=true&url=%s&title=%s&summary=%s&source=%s", encodeURIComponent(r), encodeURIComponent(n.getTitleAsText() + " (" + s + ")"), encodeURIComponent(n.getIntroAsText()), "Blendle");
return (0,
g["default"])({
src: o,
name: "intent",
width: 550,
height: 542
}),
k["default"].track("Start Social Share Item", a({}, t, {
type: "linkedin"
})),
e
}
}, {
key: "shareItemToWhatsApp",
value: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1]
, n = e.get("manifest")
, s = i(e, "sh-wa", {
medium: "whatsapp",
campaign: "social-share",
source: "blendle"
})
, r = (0,
v.translate)("item.text.sharing.general", [n.getProvider().get("name"), n.getTitleAsText(), s])
, o = "whatsapp://send?text=" + encodeURIComponent(c["default"].unescape(r));
return "Android" === window.BrowserDetect.device ? window.open(o, "_blank") : window.location = o,
k["default"].track("Start Social Share Item", a({}, t, {
type: "whatsapp"
})),
e
}
}]),
e
}();
t["default"] = h["default"].createActions(R),
e.exports = t["default"]
},
168: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(21)["default"]
, a = n(24)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(19)
, u = o(l)
, c = n(12)
, d = o(c)
, p = n(8)
, f = n(13)
, h = o(f)
, m = n(38)
, g = o(m)
, v = n(3)
, y = o(v)
, _ = n(65)
, b = o(_)
, w = n(305)
, S = o(w)
, k = n(35)
, E = o(k)
, C = n(79)
, T = o(C)
, P = function() {
function e() {
s(this, e),
this.generateActions("signUpError", "resendEmailConfirmSuccess", "signUpChangeEmail")
}
return i(e, [{
key: "signUpSuccess",
value: function() {
return function(e) {
e(),
h["default"].track("Signup/Send Confirmation")
}
}
}, {
key: "signUp",
value: function(e, t) {
var n = this
, i = arguments.length <= 2 || void 0 === arguments[2] ? "SignUp" : arguments[2]
, s = arguments.length <= 3 || void 0 === arguments[3] ? !1 : arguments[3];
return function(o) {
return o({
email: e
}),
new a(function(t) {
if (!e.match(/^.+@.+$/))
throw new E["default"](p.EMAIL_INVALID);
t()
}
).then(function() {
return a.all([b["default"].emailIsAllowed(e), b["default"].emailIsAvailable(e)])
}).then(function() {
return s ? new a(function(t, n) {
T["default"].openVerifyEmail(e, t, n)
}
) : a.resolve()
}).then(function() {
var n = new S["default"](r({
email: e,
country: g["default"].getCountryCode(),
primary_language: y["default"].currentLocale
}, t));
return b["default"].signup(n)
}).then(function(e) {
d["default"].loginWithToken(e),
h["default"].track(i),
n.signUpSuccess()
})["catch"](function(e) {
if (e.type && e.type === p.USER_REJECTED_EMAIL)
return n.signUpChangeEmail();
h["default"].track(i, {
event: "signup_error",
message: e.message || e.type
});
var t = e.type;
if ("ExistingEmail" === t ? t = p.USER_ID_TAKEN : "TemporaryEmailServiceUsed" === t && (t = p.EMAIL_INVALID),
[p.EMAIL_INVALID, p.EMAIL_BLACKLISTED, p.USER_ID_TAKEN, p.EMAIL_CONTAINS_PLUS_SIGN].includes(t))
return n.signUpError(t);
throw e
})
}
}
}, {
key: "resendEmailConfirm",
value: function(e, t) {
var n = this
, i = arguments.length <= 2 || void 0 === arguments[2] ? "SignUp" : arguments[2];
return function(s) {
s(),
h["default"].track(i, {
event: "Signup/Resend Confirmation"
}),
b["default"].resendEmailConfirmation(e, t).then(function() {
return n.resendEmailConfirmSuccess()
})
}
}
}]),
e
}();
t["default"] = u["default"].createActions(P),
e.exports = t["default"]
},
169: function(e, t, n) {
"use strict";
function i(e, t, n) {
switch (e) {
case "following":
return p["default"].fetchFollowing(t);
case "pins":
return p["default"].fetchPins(t);
case "trending":
return m["default"].getUser().updateLastViewedTrendingTime(),
p["default"].fetchTrending(t, n.details);
case "channel":
return p["default"].fetchChannel(t, n.details);
case "user":
return p["default"].fetchUser(n.details);
case "userArchive":
return p["default"].fetchUserArchive(t, n.details);
default:
throw new Error("undefined timeline " + e)
}
}
function s(e) {
var t = e.filter(function(e) {
return e.get("b:item") ? !1 : (window.ErrorLogger.captureMessage("TimelineResource: invalid tile", {
extra: {
data: {
message: e.get("message"),
keys: o(e.attributes)
}
}
}),
!0)
});
return e.remove(t),
e
}
var r = n(7)["default"]
, a = n(6)["default"]
, o = n(53)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(19)
, c = l(u)
, d = n(243)
, p = l(d)
, f = n(8)
, h = n(12)
, m = l(h)
, g = n(118)
, v = l(g)
, y = function() {
function e() {
a(this, e),
this.generateActions("fetchTimelineSuccess", "fetchTimelineError", "fetchNextItemsSuccess", "fetchNextItemsError")
}
return r(e, [{
key: "changeVisibility",
value: function(e) {
return e
}
}, {
key: "fetchTimeline",
value: function(e, t) {
var n = this
, r = arguments.length <= 2 || void 0 === arguments[2] ? {} : arguments[2];
return function(a) {
"trending" !== e || r.details || (r.details = p["default"].getUserTrendingFilter(m["default"].getUser())),
a({
name: e,
options: r
}),
i(e, t, r).then(function(t) {
n.fetchTimelineSuccess({
name: e,
options: r,
items: s(t)
})
})["catch"](function(t) {
if (t.type === f.XHR_STATUS && 404 === t.status)
return n.fetchTimelineSuccess({
name: e,
items: new v["default"],
options: r
});
if (t.type === f.XHR_STATUS)
return n.fetchTimelineError({
name: e,
err: t,
options: r
});
throw t
})
}
}
}, {
key: "fetchNextItems",
value: function(e, t) {
var n = this
, i = arguments.length <= 2 || void 0 === arguments[2] ? {} : arguments[2];
return function(r) {
t instanceof v["default"] && t.hasNext() && !t.isFetching() && (r({
name: e,
options: i
}),
t.fetchNext().then(function() {
n.fetchNextItemsSuccess({
name: e,
options: i,
collection: s(t)
})
})["catch"](function(t) {
if (t.type !== f.STATUS_PENDING) {
if (t.type === f.XHR_STATUS)
return void n.fetchNextItemsError({
name: e,
err: t,
options: i
});
throw t
}
}))
}
}
}]),
e
}();
t["default"] = c["default"].createActions(y),
e.exports = t["default"]
},
170: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(5)
, s = n(16)
, r = n(676)
, a = n(343)
, o = a.getProviderUid
, l = n(30)
, u = t.Collection.extend({
model: r,
type: "tiles",
key: "_embedded.b:tiles",
parse: function(e) {
return e._embedded = i.reduce(e._embedded, this._convert.bind(this), {
"b:tiles": []
}),
this.parseHal(e)
},
_addID: function(e) {
if (!e._links)
return e;
var t = decodeURI(e._links.self.href);
return t.indexOf("?zoom=") > -1 ? e.id = t.substring(0, t.indexOf("?zoom=")) : t.indexOf("&zoom=") > -1 ? e.id = t.substring(0, t.indexOf("&zoom=")) : e.id = t,
e
},
_convert: function(e, t, n) {
return this._converters[n] ? e["b:tiles"] = this._convertValue(this._converters[n], t) : e[n] = t,
e
},
_convertValue: function(e, t) {
return t.map(e.bind(this)).filter(function(e) {
return e
}).filter(this._isDisabled)
},
_isDisabled: function(e) {
var t = i.get(e, ["_embedded", "b:item", "id"]);
if (!t)
return !0;
var n = l.getProvider(o(t));
return !n || n && !n.getCapability("disableIssue", !1)
},
_converters: {
"b:tiles": function(e) {
return this._addID(e)
},
items: function(e) {
var t;
if (e._embedded)
return t = e._embedded.posts ? e._embedded.posts : {
id: i.uniqueId(),
date: e._embedded.manifest,
_embedded: {
user: {
id: "blendle"
}
}
},
this._addID({
_links: {
self: {
href: e._links.self.href
}
},
_embedded: {
"b:recent-post": t,
"b:item": {
_links: {
self: {
href: e._links.self.href
}
},
_embedded: {
manifest: e._embedded.manifest
},
id: e.id,
price: e.price,
refundable: e.refundable,
subscription: e.subscription,
acquired: e.acquired
}
}
})
},
posts: function(e) {
if (e._embedded) {
var t = e._embedded.manifest;
return delete e._embedded.manifest,
this._addID({
_links: {
self: {
href: s.getLink("item", {
item_id: t.id
})
}
},
_embedded: {
"b:recent-post": e,
"b:item": {
_links: {
self: {
href: t._links.self.href
}
},
_embedded: {
manifest: t
},
id: t.id
}
}
})
}
}
}
});
return u
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
171: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(186)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(2)
, o = r(a)
, l = n(15)
, u = r(l)
, c = n(117)
, d = r(c)
, p = n(11)
, f = r(p)
, h = n(346)
, m = r(h)
, g = n(556)
, v = r(g)
, y = o["default"].createClass({
displayName: "PortalTooltip",
propTypes: {
pointerSize: o["default"].PropTypes.number,
position: o["default"].PropTypes.string,
layout: o["default"].PropTypes.string,
name: o["default"].PropTypes.string,
onScroll: o["default"].PropTypes.func,
className: o["default"].PropTypes.string,
onMouseEnter: o["default"].PropTypes.func,
truncate: o["default"].PropTypes.oneOfType([o["default"].PropTypes.func, o["default"].PropTypes.bool])
},
mixins: [(0,
d["default"])("tooltip-portal")],
getInitialState: function() {
return {
pos: {
x: 0,
y: 0,
maxHeight: window.innerHeight,
yPos: "bottom",
xPos: "left"
},
truncateCount: null
}
},
getDefaultProps: function() {
return {
truncate: !1,
truncateMessage: null ,
pointerSize: 5
}
},
render: function() {
return o["default"].createElement("span", null )
},
componentDidMount: function() {
this._updatePosition(),
this.props.onScroll && (this._scrollParent = (0,
m["default"])(u["default"].findDOMNode(this)),
this._scrollParent.addEventListener("scroll", this.props.onScroll))
},
componentWillUnmount: function() {
this.props.onScroll && this._scrollParent.removeEventListener("scroll", this.props.onScroll)
},
_updatePosition: function() {
var e = this._getPosition();
this.props.truncate && this._truncateChildren(e.maxHeight),
this.setState({
pos: e
})
},
_getPosition: function() {
var e = u["default"].findDOMNode(this).parentNode.getBoundingClientRect()
, t = {
width: window.innerWidth,
height: window.innerHeight
}
, n = this.getLayerDOMNode().getBoundingClientRect()
, i = window.getComputedStyle(this.getLayerDOMNode())
, s = {
x: parseInt(i.marginLeft, 0) + parseInt(i.marginRight, 0),
y: parseInt(i.marginTop, 0) + parseInt(i.marginBottom, 0)
}
, r = {
width: n.width + s.x,
height: n.height + s.y
}
, a = this._getFitPosition(e, t, r);
return a.maxHeight = t.height - a.y - s.y,
a
},
_getFitPosition: function(e, t, n) {
var i, s, r = {
top: e.top - n.height > 0,
bottom: e.top + e.height + n.height < t.height,
left: e.left - n.width > 0,
right: e.right + e.width + n.width < t.width
};
r.right ? (i = e.left,
s = "right") : r.left ? (i = e.left - n.width + e.width,
s = "left") : (i = e.left - n.width / 2 + e.width / 2,
s = "center");
var a = void 0
, o = void 0
, l = this.props.position;
return l && r[l] && (a = e[l] + n.height * ("top" === l ? -1 : 1),
o = "top" === l ? "above" : "below"),
a && o || (!r.bottom && r.top ? (a = e.top - n.height,
o = "above") : (a = e.top + e.height,
o = "below")),
{
x: Math.round(i),
y: Math.round(a),
xPos: s,
yPos: o
}
},
_truncateChildren: function(e) {
if (null === this.state.truncateCount) {
var t = this.getLayerDOMNode()
, n = s(t.children)
, i = 0
, r = 0
, a = 0;
n.forEach(function(t, n) {
i > e ? r++ : (i = t.offsetHeight + t.offsetTop,
i > e && r++),
0 === r && (a = n)
}),
r && "function" == typeof this.props.truncate && r++,
this.setState({
truncateCount: r
})
}
},
_getPointerOffset: function(e) {
var t = u["default"].findDOMNode(this).parentNode;
return Math.round(t.offsetWidth / 2 - e)
},
renderLayer: function() {
var e = (0,
f["default"])(["v-portal-tooltip", "pos-" + this.state.pos.xPos, "pos-" + this.state.pos.yPos, i({}, "l-" + this.props.layout, this.props.layout), i({}, "tooltip-" + this.props.name, this.props.name)])
, t = {
position: "fixed",
zIndex: 1e5,
left: this.state.pos.x + "px",
top: this.state.pos.y + "px",
maxHeight: this.state.pos.maxHeight + "px"
}
, n = {}
, s = void 0;
"function" == typeof this.props.truncate && this.state.truncateCount && (s = this.props.truncate(this.state.truncateCount));
var r = void 0;
this.props.pointerSize && (r = o["default"].createElement(v["default"], {
position: "above" === this.state.pos.yPos ? "bottom" : "top",
direction: this.state.pos.xPos,
offset: this._getPointerOffset(this.props.pointerSize),
width: this.props.pointerSize
}),
"above" === this.state.pos.yPos ? n.marginBottom = 3 + this.props.pointerSize + "px" : n.marginTop = 3 + this.props.pointerSize + "px");
var a = this.props.children.length - (this.state.truncateCount || 0);
return o["default"].createElement("div", {
className: e,
style: t,
onMouseEnter: this.props.onMouseEnter,
onMouseLeave: this.props.onMouseLeave
}, r, o["default"].createElement("div", {
className: this.props.className,
style: n
}, this.props.children.slice(0, a), s))
}
});
t["default"] = y,
e.exports = t["default"]
},
172: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(26)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(2)
, c = l(u)
, d = n(11)
, p = l(d)
, f = n(13)
, h = l(f)
, m = n(3)
, g = n(12)
, v = l(g)
, y = n(17)
, _ = l(y)
, b = n(133)
, w = l(b)
, S = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments),
this.state = {
hover: !1,
buttonState: ""
}
}
return s(t, e),
r(t, [{
key: "componentWillMount",
value: function() {
this._render = this.render.bind(this),
this.props.user.on("change:following", this._render)
}
}, {
key: "componentWillUnmount",
value: function() {
this.props.user.off("change:following", this._render),
clearTimeout(this._delayedLoadingState)
}
}, {
key: "render",
value: function() {
var e;
if (this.props.user.id === v["default"].getId())
return null ;
var t = "";
t = this.props.user.get("following") && this.state.hover && !this.props.isProfile ? m.locale.user.buttons.unfollow : this.props.user.get("following") ? m.locale.user.buttons.following : m.locale.user.buttons.follow;
var n = (0,
p["default"])("btn btn-text", "btn-follow", (e = {
profile: this.props.isProfile,
"btn-following": this.props.user.get("following"),
"btn-follow": !this.props.user.get("following")
},
o(e, "s-" + this.state.buttonState, this.state.buttonState),
o(e, "s-" + this.props.size, this.props.size && "large" !== this.props.size),
o(e, this.props.className, this.props.className),
e));
return c["default"].createElement("button", {
className: n,
onClick: this._click.bind(this),
onMouseEnter: this._mouseEnter.bind(this),
onMouseLeave: this._mouseLeave.bind(this)
}, t)
}
}, {
key: "_resetLoadingState",
value: function() {
var e = this;
clearTimeout(this._delayedLoadingState),
this._delayedLoadingState = setTimeout(function() {
e.setState({
buttonState: ""
})
}, 500)
}
}, {
key: "_click",
value: function(e) {
var t = this;
e.preventDefault();
var n = this.props.user;
this.setState({
buttonState: "loading"
}),
n.get("following") ? n.unfollow(v["default"].getUser(), function(e) {
t._resetLoadingState(),
t._trackAnalytics(!1),
e ? t.props.user.isChannel && w["default"].fetchChannels(v["default"].getUser().id) : t.setState({
buttonState: "error"
})
}) : n.follow(v["default"].getUser(), function(e) {
t._resetLoadingState(),
t._trackAnalytics(!0),
e ? t.props.user.isChannel && w["default"].fetchChannels(v["default"].getUser().id) : t.setState({
buttonState: "error"
})
})
}
}, {
key: "_mouseEnter",
value: function() {
_["default"].hasTouch() || this.setState({
hover: !0
})
}
}, {
key: "_mouseLeave",
value: function() {
_["default"].hasTouch() || this.setState({
hover: !1
})
}
}, {
key: "_trackAnalytics",
value: function(e) {
var t = this.props.user;
if (this.props.analytics)
if ("channel" === this.props.analytics.type) {
var n = {
type: "profile",
channel: t.id
};
h["default"].track(e ? "Channel Subscribe" : "Channel Unsubscribe", n)
} else {
var n = {
type: this.props.analytics.type,
user_id: t.id,
user_name: t.get("username")
};
this.props.analytics.item_id && (n.item_id = this.props.analytics.item_id),
this.props.analytics.item_title && (n.item_title = this.props.analytics.item_title),
h["default"].track(e ? "Follow User" : "Unfollow User", n)
}
}
}], [{
key: "propTypes",
value: {
user: c["default"].PropTypes.object.isRequired,
isProfile: c["default"].PropTypes.bool,
analytics: c["default"].PropTypes.object,
size: c["default"].PropTypes.string
},
enumerable: !0
}]),
t
}(c["default"].Component);
t["default"] = S,
e.exports = t["default"]
},
174: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(117)
, o = i(a)
, l = n(173)
, u = i(l)
, c = n(233);
t["default"] = r["default"].createClass({
displayName: "ModuleNavigationPortal",
mixins: [(0,
o["default"])()],
getDefaultProps: function() {
return {
portal: document.querySelector(".a-navigation")
}
},
renderLayer: function() {
var e = this.props.children;
return this.props.items && (e = (0,
c.getComponents)(this.props.items)),
r["default"].createElement(u["default"], null , e)
},
render: function() {
return null
}
}),
e.exports = t["default"]
},
175: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(52)
, r = i(s)
, a = n(38)
, o = i(a)
, l = n(5929)
, u = i(l)
, c = n(13)
, d = i(c)
, p = n(89)
, f = (i(p),
!0)
, h = "redirect_to_launch"
, m = "redeemed_access_code"
, g = /^(\/login|\/access|\/about|\/i(tem)?\/)/;
t["default"] = {
shouldRedirect: function() {
return "approval" === u["default"].name ? !1 : g.test(window.location.pathname) ? !1 : r["default"].get(m) ? !1 : f || !r["default"].get(h) || o["default"].isBetaCountry() ? !o["default"].isSupportedCountry() || o["default"].isBetaCountry() : !1
},
setAccessCookie: function() {
r["default"].set(m, !0, {
expires: 31536e3,
secure: u["default"].ssl
})
},
redirectToLaunchSite: function() {
r["default"].set(h, !0, {
expires: 31536e3,
secure: u["default"].ssl
}),
d["default"].track("Redirect to international launch", {
country: o["default"].getCountryCode(),
href: window.location.href,
referrer: document.referrer
}),
setTimeout(function() {
window.location = "https://launch.blendle.com"
}, 100)
}
},
e.exports = t["default"]
},
177: function(e, t, n) {
var i;
(function(s) {
"use strict";
i = function(e) {
var t = n(299)
, i = 250
, r = "easeOutQuad"
, a = {
y: "scrollTop",
x: "scrollLeft"
}
, o = {
horizontal: function(e, t, n) {
this._scroll("x", e, t, n)
},
vertical: function(e, t, n) {
this._scroll("y", e, t, n)
},
_scroll: function(e, n, o, l) {
l = l || {},
n === window && (n = "Windows Phone" === s.BrowserDetect.device ? document.querySelector("html") : document.body);
var u = new t
, c = a[e]
, d = {}
, p = {}
, f = l.duration || i
, h = l.easing || r;
d[e] = n[c],
p[e] = o,
u.tween({
from: d,
to: p,
duration: f,
easing: h,
step: function(t) {
n[c] = t[e]
},
start: l.startCb,
finish: l.finishCb
})
}
};
return o
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
}
).call(t, function() {
return this
}())
},
178: function(e, t, n) {
var i, s = n(53)["default"];
i = function(e) {
"use strict";
var t = n(5)
, i = n(3).locale
, r = {
hostUrl: function(e, n, i) {
return t.sprintf("%s//%s%s", e || window.location.protocol, n || window.location.host, i !== !1 ? "/" : "")
},
uri2url: function(e, n, i) {
return t.sprintf("%s//%s/%s", i || window.location.protocol, n || window.location.host, e)
},
param: function(e) {
return s(e).map(function(t) {
return encodeURIComponent(t) + "=" + encodeURIComponent(e[t])
}).join("&")
},
getParams: function() {
for (var e = {}, t = location.hash.substring(1), n = /([^&=]+)=([^&]*)/g, i = n.exec(t); i; )
e[decodeURIComponent(i[1])] = decodeURIComponent(i[2]),
i = n.exec(t);
return e
},
removeTrailingSlash: function() {
var e = arguments.length <= 0 || void 0 === arguments[0] ? "" : arguments[0]
, t = arguments.length <= 1 || void 0 === arguments[1] ? !1 : arguments[1]
, n = e.split("?");
return n[0] = n[0].replace(/\/$/, ""),
e = n.join("?"),
t && window.history.replaceState({}, i.app.text.page_title, e),
e
},
removeProtocol: function() {
var e = arguments.length <= 0 || void 0 === arguments[0] ? "" : arguments[0];
return e.replace(/^https?:\/\//, "")
},
createURLForFragment: function(e) {
return window.location.protocol + "//" + window.location.host + "/" + e
}
};
return r
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
179: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(5)
, i = n(4)
, s = n(34)
, r = n(52)
, a = n(727)
, o = n(726)
, l = n(5929)
, u = n(12)
, c = n(13)
, d = n(16)
, p = n(47)
, f = n(180)
, h = n(181)
, m = n(178)
, g = i.Module.extend({
name: "item",
type: "item",
initialize: function() {
this.setRouter(new a({
module: this
})),
this.listenToOnce(this, "unload", function() {
if (this._showOnBoardingAfterClose)
return h.markAsDeeplinkSignUp(),
void h.show();
if (r.get("urlAfterItemClose")) {
var e = r.get("urlAfterItemClose");
i.history.navigate(e, {
trigger: !0
}),
r.expire("urlAfterItemClose")
}
}
.bind(this))
},
showOnBoardingAfterClose: function() {
this._showOnBoardingAfterClose = !0
},
openItem: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1];
this.__perfStartTime = (new Date).getTime();
var n = void 0 === i.history.getPrevious();
n && !i.history.fragment.match(/^(i|item)\//) && (n = !1);
var s = "Android Browser" === window.BrowserDetect.browser;
s && Number(window.BrowserDetect.version) <= 4.3 && (n = !0),
this.getArea().classList.toggle("no-animation", n),
u.getId() ? this._afterAuth(u.getUser(), e, t) : i.history.navigate("", {
trigger: !0,
replace: !0
})
},
_afterAuth: function(e, n, i) {
var s = i.lastEvent
, r = s && (s.metaKey || s.ctrlKey);
if (i && i.newWindow !== !1 && r)
return c.track("Open Item New Window", {
item_id: n
}),
void window.open(m.uri2url("item/" + n));
i && i.urlAfterItemClose && (this._urlAfterItemClose = i.urlAfterItemClose);
var a = "deeplink";
d.embedded && (a = "widget"),
i = i || {},
i.analytics = t.defaults(i.analytics || {}, {
type: a,
referrer: document.referrer
}),
this.getController() && this.getController() instanceof o || this.setController(new o({
module: this,
area: this.getArea()
})),
this.getController().openItem(n, i, this.__perfStartTime),
this.loadOrWake()
},
openDeeplinkSignup: function(e) {
p.set({
requireAuthUrl: i.history.fragment
});
var t = n(384);
t.openSignup(e)
},
openItemOnSocial: function(e) {
return this.openItem(e, {
openOnSocial: !0
})
},
openEmailVerification: function(e, n, r) {
var a;
r && r.urlAfterItemClose && (this._urlAfterItemClose = r.urlAfterItemClose),
a = t.sprintf("%s/%s", this.getRouter().getPrefix(), e);
var l = "deeplink";
d.embedded ? l = "widget" : i.history.fragment !== a && (l = i.history.fragment + ""),
r = t.defaults(r || {}, {
analytics: {
type: l,
referrer: document.referrer
}
}),
s.history.fragment !== a && i.history.navigate(a),
this.setController(new o({
module: this,
area: this.getArea()
})),
this.loadOrWake(),
this.getController().openEmailVerification(e, n, r)
},
insufficientFunds: function(e) {
this._urlAfterItemClose && r.set("urlAfterItemClose", this._urlAfterItemClose, {
secure: l.ssl,
expires: 600
}),
c.track("Balance too low"),
this.openPaymentDialogue(e)
},
openPaymentDialogue: function(e) {
f.openPayment({
cancelCallback: this.unload.bind(this),
returnUrl: e.getURI()
})
}
});
return new g
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
180: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(4)
, u = n(2)
, c = o(u)
, d = n(12)
, p = o(d)
, f = n(13)
, h = o(f)
, m = n(37)
, g = o(m)
, v = n(135)
, y = o(v)
, _ = n(182)
, b = o(_)
, w = n(136)
, S = o(w)
, k = n(250)
, E = o(k)
, C = n(578)
, T = o(C)
, P = n(579)
, N = o(P)
, x = n(577)
, R = o(x)
, L = n(742)
, I = o(L)
, M = n(743)
, A = o(M)
, D = n(52)
, O = o(D)
, U = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).call(this),
this.name = "payment",
this.type = "dialogue",
this._cancelCallback = null ,
this.setupModuleRouter()
}
return s(t, e),
r(t, [{
key: "beforeUnload",
value: function() {
i(Object.getPrototypeOf(t.prototype), "beforeUnload", this).call(this);
var e = this._getPaymentCookie();
e.returnUrl && l.history.navigate(e.returnUrl, {
trigger: !0
}),
"function" == typeof this._cancelCallback && this._cancelCallback(),
this._cancelCallback = null
}
}, {
key: "_getPaymentCookie",
value: function() {
var e = O["default"].get("paymentRequest");
return e && JSON.parse(e) ? JSON.parse(e) : {}
}
}, {
key: "_onClosePaymentDialogue",
value: function() {
O["default"].expire("paymentRequest"),
this.unload()
}
}, {
key: "requireAuth",
value: function() {
return !p["default"].getUser()
}
}, {
key: "getModuleRoutes",
value: function() {
return {
"": this.openPayment.bind(this),
"subscription/:subscriptionProductId/:startDate": this.openSubscription.bind(this),
success: this.openPaymentResult.bind(this, "success"),
"success/pick-a-subscription/:providerUid": this.openPaymentResult.bind(this, "success"),
"success/subscription/:subscriptionProductId": this.openSubscriptionPaymentResult.bind(this, "success"),
cancelled: this.openPaymentResult.bind(this, "cancelled"),
pending: this.openPaymentResult.bind(this, "pending"),
recurring: this.openPaymentRecurring.bind(this),
"recurring/activate": this.openPaymentRecurring.bind(this, !0)
}
}
}, {
key: "openSubscription",
value: function(e, t) {
this.load(),
this.render(c["default"].createElement(I["default"], {
subscriptionProductId: e,
startDate: t,
onClose: this._onClosePaymentDialogue.bind(this)
}))
}
}, {
key: "openPayment",
value: function() {
var e = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0];
this.load(),
y["default"].fetchPaymentMethods(p["default"].getUser()),
e.returnUrl && y["default"].setReturnUrl(e.returnUrl),
this._cancelCallback = e.cancelCallback,
this.render(c["default"].createElement(A["default"], {
onClose: this._onClosePaymentDialogue.bind(this)
}))
}
}, {
key: "openPaymentResult",
value: function(e, t) {
var n = this;
this.load(),
t && y["default"].redeemSubscriptionReward(p["default"].getUser(), t),
this.render(c["default"].createElement(g["default"], {
store: b["default"],
render: function(i) {
return c["default"].createElement(T["default"], {
user: p["default"].getUser(),
condition: e,
onClose: function(e) {
return e.preventDefault(),
t ? l.history.navigate("issue/" + t, {
trigger: !0,
replace: !0
}) : void n.unload()
},
redeemStatus: i.redeemStatus,
providerUid: t
})
}
})),
h["default"].track("Payment Result:" + e, this._getPaymentCookie())
}
}, {
key: "openSubscriptionPaymentResult",
value: function(e, t) {
var n = this;
this.load(),
S["default"].pollFetchUserSubscription(t, p["default"].getId()),
this.render(c["default"].createElement(g["default"], {
store: E["default"],
render: function(i) {
return c["default"].createElement(N["default"], {
user: p["default"].getUser(),
condition: e,
onClose: function(e) {
e.preventDefault();
var s = i.subscriptions.find(function(e) {
return e.uid === t
});
return s ? l.history.navigate("issue/" + s.provider.uid, {
trigger: !0,
replace: !0
}) : (O["default"].expire("paymentRequest"),
void n.unload())
},
subscription: i.subscriptions.find(function(e) {
return e.uid === t
}),
status: i.status
})
}
}), function() {
h["default"].track("Provider Subscription/Subscription Upgrade Success", n._getPaymentCookie())
})
}
}, {
key: "openPaymentRecurring",
value: function() {
this.load();
var e = p["default"].getUser();
y["default"].setRecurringContract(e, !0),
h["default"].track("Enabled Recurring Contract"),
this.render(c["default"].createElement(R["default"], {
user: p["default"].getUser(),
onClose: this.unload.bind(this)
}))
}
}]),
t
}(l.ReactModule);
t["default"] = new U,
e.exports = t["default"]
},
181: function(e, t, n) {
"use strict";
var i = n(4)
, s = n(5)
, r = n(25)
, a = n(2)
, o = n(15)
, l = (n(44),
n(38))
, u = (n(3),
n(13))
, c = n(47)
, d = n(65)
, p = n(12)
, f = n(797)
, h = n(79)
, m = n(175)
, g = n(43)
, v = n(134)
, y = i.Module.extend({
name: "signup",
type: "content",
initialize: function() {
var e = new i.ModuleRouter({
module: this,
routes: this._getRoutes()
});
e.route("login", this._onLoginRoute.bind(this), ""),
e.route("login/warning", this._onLoginWarningRoute.bind(this), ""),
e.route("login/reset(/:resetToken)", this._onResetPasswordRoute.bind(this), ""),
c.set("requireAuthUrl", "/"),
this.setRouter(e)
},
getScenario: function() {
var e = p.getUser();
return e ? e.didOnboarding() ? "verify" : "onboard" : "signup"
},
_renderRootComponent: function() {
var e = p.getUser()
, t = this._scenario || this.getScenario();
this._rootComponent = o.render(a.createElement(f, {
onPaneChange: this._onPaneChange.bind(this),
scenario: t,
user: e
}), this.getArea())
},
loadOrWake: function() {
return l.isBetaCountry() && !c.get("signUpCode") && m.shouldRedirect() ? void m.redirectToLaunchSite() : (i.Module.prototype.loadOrWake.apply(this, arguments),
void this._setScenarioAndRender())
},
load: function() {
i.Module.prototype.load.apply(this, arguments),
this._setScenarioAndRender()
},
reset: function() {
this._scenario = this.getScenario(),
this._renderRootComponent(),
this._rootComponent.setState({
currentPane: s.find(this._rootComponent.state.panes, {
enabled: !0
})
})
},
_setScenarioAndRender: function() {
this._scenario || (this._scenario = this.getScenario()),
this._renderRootComponent()
},
beforeUnload: function() {
o.unmountComponentAtNode(this.getArea()),
this._rootComponent = null
},
show: function() {
return this._rerouteToKiosk()
},
markAsDeeplinkSignUp: function() {
this._deeplinkSignUp = !0,
this._rootComponent && (this._rootComponent.state.analyticsDeeplink = !0)
},
_getRoutes: function() {
return {
"": this._rerouteToKiosk.bind(this),
kiosk: this._onKioskRoute.bind(this),
channels: this._onProgressPaneRoute.bind(this, "channels"),
about: this._onProgressPaneRoute.bind(this, "about"),
account: this._onProgressPaneRoute.bind(this, "accountEmail"),
"first-name": this._onProgressPaneRoute.bind(this, "accountFirstName"),
"last-name": this._onProgressPaneRoute.bind(this, "accountLastName"),
password: this._onProgressPaneRoute.bind(this, "accountPassword"),
"sign-in": this._onProgressPaneRoute.bind(this, "accountSignIn"),
social: this._onSocialRoute.bind(this),
"send-confirm": this._onProgressPaneRoute.bind(this, "verifyEmail"),
"verify/:confirmationToken": this._onVerifyCodeRoute.bind(this),
verified: this._onVerifyRoute.bind(this, null ),
unverified: this._onUnverifiedRoute.bind(this, "verifyRequired")
}
},
_rerouteToKiosk: function() {
i.history.navigate(this.name + "/kiosk", {
trigger: !0,
replace: !0
})
},
_onPaneChange: function(e, t) {
var n = {
kiosk: "/kiosk",
channels: "/channels",
about: "/about",
accountEmail: "/account",
accountFirstName: "/first-name",
accountLastName: "/last-name",
accountPassword: "/password",
accountSignIn: "/sign-in",
social: "/social",
verifyEmail: "/send-confirm",
verifyRequired: "/unverified",
verifyFinalize: "/verified"
};
t && void 0 !== n[t.name] && i.history.navigate("/" + this.name + n[t.name], {
replace: !1,
trigger: !0
})
},
_onPaneRoute: function(e) {
this.loadOrWake(),
this._setCurrentPaneByName(e)
},
_onProgressPaneRoute: function(e) {
if (this.loadOrWake(),
!this._entryPaneVisited) {
this._entryPaneVisited = !0;
var t = this._rootComponent.state.panes
, n = s.find(t, {
enabled: !0
});
if (n && n.name !== e)
return void this._setCurrentPaneByName(n.name)
}
return "accountPassword" === e && p.getUser() ? void i.history.navigate("/" + this.name + "/social", {
replace: !1,
trigger: !0
}) : void this._setCurrentPaneByName(e)
},
_onSinglePaneRoute: function(e) {
this.loadOrWake(),
this._rootComponent.state.panes.forEach(function(t) {
t.enabled = t.name === e
}),
this._setCurrentPaneByName(e)
},
_onUnverifiedRoute: function() {
var e = p.getUser();
return !e || e.get("email_confirmed") ? i.history.navigate("/", {
replace: !0,
trigger: !0
}) : this._onSinglePaneRoute("verifyRequired")
},
_onKioskRoute: function() {
var e = p.getUser();
return e && e.didOnboarding() && !this._deeplinkSignUp ? void i.history.navigate("/", {
replace: !0,
trigger: !0
}) : (this._onProgressPaneRoute("kiosk"),
void (!e || this._welcomeUserPopupShown || e.didOnboarding() || (this._welcomeUserPopupShown = !0,
h.openSignupProgress(e))))
},
_onSocialRoute: function() {
var e = p.getUser();
if (e && e.didOnboarding() && !this._deeplinkSignUp && !this._entryPaneVisited) {
this.loadOrWake();
for (var t = this._rootComponent.state.panes, n = 0; n < t.length && "social" !== t[n].name; n++)
t[n].enabled = !1;
return this._rootComponent.setState({
showTimelineGift: !1,
allowSkipEmail: !1,
panes: t
}),
void this._setCurrentPaneByName("social")
}
e || c.set("requireAuthUrl", "/signup/social"),
this._onProgressPaneRoute("social")
},
_onVerifyRoute: function() {
this._onSinglePaneRoute("verifyFinalize");
var e = p.getUser();
this._rootComponent.setState({
userVerified: e ? e.get("email_confirmed") : !1
})
},
_onVerifyCodeRoute: function(e) {
var t = this
, n = g(location.href).query(!0);
this._onSinglePaneRoute("verifyFinalize"),
t._rootComponent.setState({
userVerified: null ,
hidden: "true" === n.skip_personalizing
}),
d.confirmEmail(e).then(function(e) {
return u.track("Signup/Verify email", {
platform: "blendle"
}),
p.getToken() ? r.resolve(p.getToken()) : p.loginWithToken(e)
}).then(function(e) {
t._rootComponent.setState({
userVerified: !0,
analyticsPlatform: "blendle",
analyticsType: "signup",
user: e.get("user")
})
}).fail(function(e) {
var n = p.getUser();
t._rootComponent.setState({
userVerified: n ? n.get("email_confirmed") : !1
})
}).done()
},
_onResetPasswordRoute: function(e) {
if (e)
this._onSinglePaneRoute("accountResetPassword"),
this._rootComponent.setState({
resetToken: e
});
else {
this._onProgressPaneRoute("kiosk");
var t = n(140);
t.getPrimaryNavigation().openLogin("resetpassword")
}
},
_onLoginRoute: function() {
if (p.getUser())
return void i.history.navigate("/", {
trigger: !0,
replace: !0
});
this._onProgressPaneRoute("kiosk");
var e = g(location.href).query(!0);
e.email && v.setEmail(e.email);
var t = n(140);
t.getPrimaryNavigation().openLogin("login")
},
_onLoginWarningRoute: function() {
if (p.getUser())
return void i.history.navigate("/", {
trigger: !0,
replace: !0
});
this._onProgressPaneRoute("kiosk");
var e = n(140);
e.getPrimaryNavigation().openLoginWarning("login")
},
_setCurrentPaneByName: function(e) {
var t = this._rootComponent.state
, n = {
kiosk: ["Browse Publications", {
deeplink: t.analyticsDeeplink
}],
channels: ["Browse Channels", {
deeplink: t.analyticsDeeplink
}],
about: ["View about Blendle", {
deeplink: t.analyticsDeeplink
}]
};
n[e] && u.track.apply(u, n[e]);
var i = s.find(t.panes, {
name: e
});
this._rootComponent.setState({
currentPane: i
})
}
});
e.exports = new y
},
182: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(21)["default"]
, a = n(26)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(8)
, u = n(19)
, c = o(u)
, d = n(135)
, p = o(d)
, f = function() {
function e() {
s(this, e),
this.bindActions(p["default"]),
this.paymentMethods = [],
this.status = l.STATUS_INITIAL,
this.selectedPaymentMethod = "0",
this.selectedBanks = {},
this.amounts = [5, 10, 20, 50],
this.selectedAmount = 10,
this.transactionFees = {
5: .3
},
this.activeStep = "options",
this.paymentURL = "",
this.paymentURLStatus = l.STATUS_INITIAL,
this.recurring = !1,
this.reward = {},
this.selectedReward = null ,
this.recurringRequest = !1,
this.returnUrl = "",
this.redeemStatus = l.STATUS_INITIAL,
this.recurring_contracts = []
}
return i(e, [{
key: "onSetReturnUrl",
value: function(e) {
this.setState({
returnUrl: e
})
}
}, {
key: "onFetchPaymentMethods",
value: function() {
this.setState({
status: l.STATUS_PENDING
})
}
}, {
key: "onFetchPaymentMethodsSuccess",
value: function(e) {
var t = e.paymentMethods
, n = e.recurring
, i = e.reward
, s = e.activeStep
, r = e.recurring_contracts;
this.setState({
status: l.STATUS_OK,
paymentMethods: t,
recurring: n,
recurringRequest: n,
reward: i,
activeStep: s,
recurring_contracts: r
})
}
}, {
key: "onFetchPaymentMethodsError",
value: function() {
this.setState({
status: l.STATUS_ERROR
})
}
}, {
key: "onSetPaymentMethod",
value: function(e) {
var t = e.selectedPaymentMethod
, n = e.selectedBank;
this.setState({
selectedPaymentMethod: t,
selectedBanks: r({}, this.selectedBanks, a({}, t, n))
})
}
}, {
key: "onSetRecurringRequestContract",
value: function(e) {
var t = e.recurringRequest;
this.setState({
recurringRequest: t
})
}
}, {
key: "onSetRecurringContract",
value: function(e) {
var t = e.recurring;
this.setState({
recurring: t
})
}
}, {
key: "onSetAmount",
value: function(e) {
this.setState({
selectedAmount: e
})
}
}, {
key: "onSetActiveStep",
value: function(e) {
this.setState({
activeStep: e
})
}
}, {
key: "onFetchPaymentURL",
value: function() {
this.setState({
paymentURLStatus: l.STATUS_PENDING
})
}
}, {
key: "onFetchPaymentURLSuccess",
value: function(e) {
var t = e.paymentURL
, n = e.activeStep;
this.setState({
paymentURL: t,
activeStep: n,
paymentURLStatus: l.STATUS_OK
})
}
}, {
key: "onFetchSubscriptionPaymentURL",
value: function() {
this.setState({
paymentURLStatus: l.STATUS_PENDING
})
}
}, {
key: "onFetchSubscriptionPaymentURLSuccess",
value: function(e) {
var t = e.paymentURL
, n = e.activeStep;
this.setState({
paymentURL: t,
activeStep: n,
paymentURLStatus: l.STATUS_OK
})
}
}, {
key: "fetchSubscriptionPaymentURLError",
value: function() {
this.setState({
paymentURLStatus: l.STATUS_ERROR
})
}
}, {
key: "onSetRewardSubscription",
value: function(e) {
var t = e.providerUid
, n = {
providerUid: t
};
this.setState({
selectedReward: n
})
}
}, {
key: "onRedeemSubscriptionReward",
value: function() {
this.setState({
redeemStatus: l.STATUS_PENDING
})
}
}, {
key: "onRedeemSubscriptionRewardSuccess",
value: function() {
this.setState({
redeemStatus: l.STATUS_OK
})
}
}, {
key: "onRedeemSubscriptionRewardError",
value: function() {
this.setState({
redeemStatus: l.STATUS_ERROR
})
}
}]),
e
}();
t["default"] = c["default"].createStore(f, "PaymentStore"),
e.exports = t["default"]
},
183: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(5)
, s = n(104)
, r = t.View.extend({
tagName: "button",
className: "v-button btn",
events: {
click: "_onClick"
},
initialize: function(e) {
s(i.isObject(e), "ButtonView.initialize: Requires options object"),
s(i.isFunction(e.onClick), "ButtonView.initialize: Requires onClick method in options object"),
e.className && this.el.setAttribute("class", this.options.className),
e.type && this.el.setAttribute("type", this.options.type),
e.layout && this.el.classList.add("l-" + this.options.layout),
e.text && (this.el.innerHTML = e.text),
this._disabled = e.disabled,
this._disabled && this.disable()
},
setLayout: function(e) {
this.el.classList.add("l-" + e)
},
disable: function() {
this._disabled = !0,
this.el.setAttribute("disabled", ""),
this.setState("inactive")
},
enable: function() {
this._disabled = !1,
this.el.removeAttribute("disabled"),
this.removeState("inactive")
},
setSuccess: function() {
this.setState("success")
},
setError: function() {
this.setState("error")
},
setLoading: function() {
this.setState("loading")
},
setText: function(e) {
this.el.innerHTML = e
},
_onClick: function(e) {
this._disabled || this.options.onClick(e)
}
});
return r
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
184: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(25)
, i = n(4)
, s = n(5)
, r = n(18)
, a = n(299)
, o = n(17)
, l = n(12)
, u = n(41)
, c = n(30)
, d = n(368)
, p = n(68)
, f = n(180)
, h = n(181)
, m = n(388)
, g = n(402)
, v = n(863)
, y = n(3).locale
, _ = n(3).translate
, b = n(1049)
, w = n(13)
, S = i.View.extend({
className: "v-acquire-issue",
events: {
"click .acquire-button": "_showConfirmationView",
"click .btn-acquire:not(.s-confirm)": "_eShowButtonConfirmation",
"click .btn-acquire.s-confirm": "_eAcquireIssue",
"mouseout .btn-acquire.s-confirm .confirm": "_eResetConfirmation",
"click .v-cover": "_openIssue"
},
initialize: function(e) {
var t = this;
e && void 0 === e.button && (e.button = !0),
this.options.issue.track(),
this.listenTo(this.options.issue.getEmbedded("b:issue-acquisition"), "change", function() {
t._drawPrice(),
t._drawProgress()
})
},
resetState: function() {
var e = this;
this.options.issue.fetch().then(function() {
return e.options.issue.fetchRelation("b:issue-acquisition")
}).then(function() {
e._drawPrice(),
e._drawProgress()
}).done()
},
afterUnload: function() {
this.options.issue.untrack(),
i.View.prototype.afterUnload.apply(this, arguments)
},
beforeUnload: function() {
clearTimeout(this._tooltipTimeout)
},
render: function() {
var e = this;
this.options.button ? this.el.classList.add("l-button") : this.el.classList.remove("l-button");
var t, n, i = this.options.issue.getEmbedded("b:issue-acquisition"), s = c.getProviderOrDefault(this.options.issue.get("provider").id).get("name"), a = r(this.options.issue.get("date")).calendar(), d = u(Math.max(0, i.get("price")));
return o.isMobile() ? (n = _("item.text.acquire_and_read_issue", a),
t = y.item.text.read_for_free_mobile) : (n = _("item.text.from_issue", [s, a]),
t = _("item.text.read_for_free", [s, a])),
this.el.innerHTML = b({
i18n: y,
expanded: this.options.expanded,
acquired: i.get("acquired"),
price: d,
notAcquiredTitle: n,
acquiredTitle: t,
button: this.options.button,
buttonAcquireText: y.app.buttons.acquire_issue_mobile,
buttonConfirmText: _("app.buttons.confirm_acquire_issue", d)
}),
this._prepareProgressCircle(),
this._drawProgress(),
this.options.expanded && (this.el.classList.add("l-expanded"),
this._loadCover()),
o.isMobile() || !l.getId() || l.getUser().get("preferences").hide_acquire_issue_tooltip || (this._tooltipTimeout = setTimeout(function() {
if (!e.options.hidePingu) {
var t = e.addView(new v({
onClose: function() {
e.removeView(e.getView("acquire-issue-tooltip")),
l.getId() && l.getUser().savePreferences({
hide_acquire_issue_tooltip: "1"
})
}
}), "acquire-issue-tooltip");
e.el.appendChild(t.render().el)
}
}, 1500)),
this
},
setFloating: function() {
this.el.classList.add("l-floating")
},
unsetFloating: function() {
this.el.classList.remove("l-floating")
},
showButton: function() {
this.el.classList.add("l-button")
},
hideButton: function() {
this.el.classList.remove("l-button")
},
_drawProgress: function() {
var e = this.options.issue.getEmbedded("b:issue-acquisition");
e.get("acquired") ? this.el.classList.add("s-acquired") : this.el.classList.remove("s-acquired"),
this._setProgressCircle(e.getPercentagePurchased())
},
_drawPrice: function() {
var e = Math.max(0, this.options.issue.getEmbedded("b:issue-acquisition").get("price"))
, t = u(e, {
symbol: ""
});
s.each(this.el.querySelectorAll(".amount"), function(e) {
e.innerHTML = t
})
},
_loadCover: function() {
var e = this.addView(new g({
issue: this.options.issue,
hasHoverState: this.options.expanded,
ignoreSize: !0
}), "cover");
this.el.insertBefore(e.render().el, this.el.querySelector(".acquire-message"))
},
_openIssue: function() {
i.history.navigate("issue/" + this.options.issue.get("provider").id + "/" + this.options.issue.id, {
trigger: !0
})
},
_prepareProgressCircle: function() {
var e = this.el.querySelector(".progress-circle")
, t = e.getContext("2d")
, n = 55;
e.width = 2 * n,
e.height = 2 * n,
e.style.width = n + "px",
e.style.height = n + "px",
t.scale(2, 2),
t.lineCap = "square",
t.lineWidth = 4
},
_setProgressCircle: function(e) {
var t = this;
this._progressTween && this._progressTween.stop(),
e > 1 && (e = 1),
this.el && ("undefined" != typeof this._currentPercentage && 1 === e ? this.el.classList.add("s-acquired-now") : this.el.classList.remove("s-acquired-now"),
this._progressTween = new a,
this._progressTween.tween({
from: {
x: this._currentPercentage
},
to: {
x: e
},
duration: 300,
easing: "easeOutQuad",
step: function(e) {
t._drawProgressCircle(e.x)
},
finish: function() {
t._currentPercentage = e
}
}))
},
_drawProgressCircle: function(e) {
if (this.el) {
var t = this.el.querySelector(".progress-circle").getContext("2d")
, n = 27.5
, i = 4
, s = 2 * Math.PI
, r = Math.PI / 2;
t.clearRect(0, 0, 2 * n, 2 * n),
t.strokeStyle = "#eaeaea",
t.beginPath(),
t.arc(n, n, n - i / 2, -r, s - r, !1),
t.stroke(),
e > 0 && (t.strokeStyle = "#61b376",
t.beginPath(),
t.arc(n, n, n - i / 2, -r, s * e - r, !1),
t.stroke())
}
},
_eShowButtonConfirmation: function(e) {
o.isMobile() || (e.preventDefault(),
setTimeout(function() {
this.el.querySelector(".btn-acquire").classList.add("s-confirm")
}
.bind(this)))
},
_eAcquireIssue: function(e) {
e.preventDefault(),
this._checkBalance() && this._acquireIssue()
},
_acquireIssue: function() {
var e = this
, n = this;
d.acquireIssue(this.options.issue).then(function() {
return n.options.item ? n.options.item.fetch() : t.resolve()
}).then(function() {
w.track("Acquire Full Issue", {
type: "kiosk",
percentage_purchased: e.options.issue.getEmbedded("b:issue-acquisition").getRealPercentagePurchased(),
issue_price: e.options.issue.getEmbedded("b:issue-acquisition").get("original_price"),
issue_id: e.options.issue.get("id")
}),
e.options && e.options.onAcquireIssue && e.options.onAcquireIssue(e.options.issue)
}).done()
},
_checkBalance: function() {
var e = l.getUser();
return e ? e.get("email_confirmed") ? e.get("balance") <= 0 ? (f.openPayment({
returnUrl: i.history.fragment,
negativeBalance: !0
}),
!1) : !0 : (p.openDialogue({
rootViewClassName: "medium-dialogue",
title: _("signup.verifyRequired.title"),
message: _("signup.verifyRequired.body", [e.get("email")]),
buttonText: _("app.buttons.close_window")
}),
!1) : (h.show(),
!1)
},
_eResetConfirmation: function(e) {
e.target === e.delegateTarget && this.el.querySelector(".btn-acquire").classList.remove("s-confirm")
},
_showConfirmationView: function() {
if (o.isMobile()) {
var e = this;
this._checkBalance() && p.openDialogueWithView(new m({
issue: this.options.issue,
onClick: function(t) {
t.preventDefault(),
e._acquireIssue(),
p.unload()
},
onClose: function(e) {
e.preventDefault(),
p.unload()
}
}), {
ignoreCloseView: !1,
className: "v-acquire-issue-dialogue white-close"
})
}
}
});
return S
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
185: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(357)
, i = n(253)
, s = i.extend({
defaultClassName: "v-dialogue",
viewDirector: new t({
viewType: "dialogue"
})
});
return s
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
193: function(e, t, n) {
var i = n(83)
, s = n(198)
, r = n(97)
, a = n(61)
, o = n(922);
e.exports = function(e) {
var t = 1 == e
, n = 2 == e
, l = 3 == e
, u = 4 == e
, c = 6 == e
, d = 5 == e || c;
return function(p, f, h) {
for (var m, g, v = r(p), y = s(v), _ = i(f, h, 3), b = a(y.length), w = 0, S = t ? o(p, b) : n ? o(p, 0) : void 0; b > w; w++)
if ((d || w in y) && (m = y[w],
g = _(m, w, v),
e))
if (t)
S[w] = g;
else if (g)
switch (e) {
case 3:
return !0;
case 5:
return m;
case 6:
return w;
case 2:
S.push(m)
}
else if (u)
return !1;
return c ? -1 : l || u ? u : S
}
}
},
194: [5931, 95, 40],
195: function(e, t, n) {
"use strict";
var i = n(42)
, s = n(14)
, r = n(73)
, a = n(199)
, o = n(152)
, l = n(201)
, u = n(36)
, c = n(51)
, d = n(268)
, p = n(154);
e.exports = function(e, t, n, f, h, m) {
var g = i[e]
, v = g
, y = h ? "set" : "add"
, _ = v && v.prototype
, b = {}
, w = function(e) {
var t = _[e];
r(_, e, "delete" == e ? function(e) {
return m && !u(e) ? !1 : t.call(this, 0 === e ? 0 : e)
}
: "has" == e ? function(e) {
return m && !u(e) ? !1 : t.call(this, 0 === e ? 0 : e)
}
: "get" == e ? function(e) {
return m && !u(e) ? void 0 : t.call(this, 0 === e ? 0 : e)
}
: "add" == e ? function(e) {
return t.call(this, 0 === e ? 0 : e),
this
}
: function(e, n) {
return t.call(this, 0 === e ? 0 : e, n),
this
}
)
}
;
if ("function" == typeof v && (m || _.forEach && !c(function() {
(new v).entries().next()
}))) {
var S, k = new v, E = k[y](m ? {} : -0, 1) != k, C = c(function() {
k.has(1)
}), T = d(function(e) {
new v(e)
});
T || (v = t(function(t, n) {
l(t, v, e);
var i = new g;
return void 0 != n && o(n, h, i[y], i),
i
}),
v.prototype = _,
_.constructor = v),
m || k.forEach(function(e, t) {
S = 1 / t === -(1 / 0)
}),
(C || S) && (w("delete"),
w("has"),
h && w("get")),
(S || E) && w(y),
m && _.clear && delete _.clear
} else
v = f.getConstructor(t, e, h, y),
a(v.prototype, n);
return p(v, e),
b[e] = v,
s(s.G + s.W + s.F * (v != g), b),
m || f.setStrong(v, e, h),
v
}
},
196: function(e, t, n) {
"use strict";
var i = n(85)
, s = n(73)
, r = n(51)
, a = n(84)
, o = n(40);
e.exports = function(e, t, n) {
var l = o(e)
, u = ""[e];
r(function() {
var t = {};
return t[l] = function() {
return 7
}
,
7 != ""[e](t)
}) && (s(String.prototype, e, n(a, l, u)),
i(RegExp.prototype, l, 2 == t ? function(e, t) {
return u.call(e, this, t)
}
: function(e) {
return u.call(e, this)
}
))
}
},
197: 896,
198: [5942, 95],
199: [5954, 73],
200: function(e, t, n) {
"use strict";
var i = n(42)
, s = n(29)
, r = n(71)
, a = n(40)("species");
e.exports = function(e) {
var t = i[e];
r && t && !t[a] && s.setDesc(t, a, {
configurable: !0,
get: function() {
return this
}
})
}
},
201: 260,
202: function(e, t, n) {
var i = n(14)
, s = n(84)
, r = n(51)
, a = " \n\x0B\f\r   ᠎              \u2028\u2029\ufeff"
, o = "[" + a + "]"
, l = "​…"
, u = RegExp("^" + o + o + "*")
, c = RegExp(o + o + "*$")
, d = function(e, t) {
var n = {};
n[e] = t(p),
i(i.P + i.F * r(function() {
return !!a[e]() || l[e]() != l
}), "String", n)
}
, p = d.trim = function(e, t) {
return e = String(s(e)),
1 & t && (e = e.replace(u, "")),
2 & t && (e = e.replace(c, "")),
e
}
;
e.exports = d
},
218: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(24)["default"]
, a = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(19)
, l = a(o)
, u = n(5)
, c = a(u)
, d = n(16)
, p = a(d)
, f = n(242)
, h = a(f)
, m = n(8)
, g = n(372)
, v = a(g)
, y = n(221)
, _ = a(y)
, b = n(536)
, w = a(b)
, S = n(118)
, k = a(S)
, E = function() {
function e() {
s(this, e),
this.generateActions("fetchNewsStandSuccess", "fetchNewsStandError", "fetchCategorySuccess", "fetchCategoryError", "fetchAcquiredIssuesSuccess", "fetchAcquiredIssuesError", "fetchNextAcquiredIssuesSuccess", "fetchNextAcquiredIssuesError")
}
return i(e, [{
key: "setInactive",
value: function() {
return {
active: !1
}
}
}, {
key: "setActive",
value: function() {
return {
active: !0
}
}
}, {
key: "fetchAcquiredIssues",
value: function(e) {
var t = this;
return function(n) {
n({
categoryId: "my-issues"
});
var i = new _["default"];
i.fetch({
url: p["default"].getLink("user_issues", {
user_id: e
})
}).then(function() {
return t.fetchAcquiredIssuesSuccess({
issues: i
})
})["catch"](function(e) {
if (e.type === m.XHR_STATUS)
return t.fetchAcquiredIssuesError({
message: e.message
});
throw e
})
}
}
}, {
key: "fetchNextAcquiredIssues",
value: function(e) {
var t = this;
return function(n) {
e instanceof k["default"] && e.hasNext() && !e.isFetching() && (n({
categoryId: "my-issues"
}),
e.fetchNext().then(function() {
t.fetchNextAcquiredIssuesSuccess({
issues: e
})
})["catch"](function(e) {
if (e.type !== m.STATUS_PENDING) {
if (e.type === m.XHR_STATUS)
return void t.fetchNextAcquiredIssuesError({
err: e
});
throw e
}
}))
}
}
}, {
key: "fetchKiosk",
value: function(e, t, n) {
var i = this;
return function(s) {
s();
var a = void 0;
a = e ? r.resolve(e) : v["default"].getNewsStand(n).then(function(e) {
return i.fetchNewsStandSuccess({
newsStand: e
}),
e
})["catch"](function(e) {
if (e.type === m.XHR_STATUS)
return i.fetchNewsStandError({
message: e.message
});
throw e
}),
a.then(function(e) {
i.fetchCategory(e, t, n)
})
}
}
}, {
key: "fetchNewsStand",
value: function(e) {
var t = this;
return function(n) {
return n(),
v["default"].getNewsStand(e).then(function(e) {
return t.fetchNewsStandSuccess({
newsStand: e
}),
e
})["catch"](function(e) {
if (e.type === m.XHR_STATUS)
return t.fetchNewsStandError({
message: e.message
});
throw e
})
}
}
}, {
key: "fetchCategory",
value: function(e, t, n) {
var i = this;
return function(s) {
var r = new _["default"]
, a = new w["default"];
r.setFavourites(a);
var o = c["default"].find(e.categories, {
id: t
}) || e[t];
o ? s({
categoryId: t
}) : i.fetchCategoryError({
message: "ID not found"
});
var l = o.href.replace("{user_id}", n)
, u = p["default"].getLink("user_favourites", {
user_id: n
});
h["default"].set("kiosk_favs", a.fetch({
url: u
})).then(function() {
return h["default"].set("kiosk_issues", r.fetch({
url: l
}))
}).then(function() {
i.fetchCategorySuccess({
issues: r
})
})["catch"](function(e) {
if (e.type !== m.XHR_ABORT) {
if (e.type === m.XHR_STATUS)
return i.fetchCategoryError({
message: e.message
});
throw e
}
})
}
}
}, {
key: "rememberScrollPosition",
value: function(e) {
return {
position: e
}
}
}]),
e
}();
t["default"] = l["default"].createActions(E),
e.exports = t["default"]
},
219: function(e, t, n) {
"use strict";
var i = n(146)["default"]
, s = n(24)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(19)
, o = r(a)
, l = n(120)
, u = r(l)
, c = n(135)
, d = r(c)
, p = n(13)
, f = r(p)
, h = n(3)
, m = r(h);
t["default"] = o["default"].createActions({
fetchProduct: function(e) {
var t = this;
return function(n) {
return n(),
u["default"].fetchProduct(e).then(t.fetchProductSuccess)["catch"](t.fetchProductError)
}
},
fetchProductSuccess: function(e) {
return e
},
fetchProductError: function(e) {
return e
},
createOrder: function(e, t, n) {
var i = this;
return function(s) {
return s(),
u["default"].createOrder(e, t, n).then(i.createOrderSuccess)
}
},
retry: function(e, t, n, i, s) {
return f["default"].track("Provider Subscription/Subscription Upgrade Retry"),
this.createOrder(i, s, n.id).then(function(i) {
d["default"].fetchSubscriptionPaymentURL(e, {
product: t,
jwt: i
}, n)
})["catch"](function(e) {
throw f["default"].track("Provider Subscription/Subscription Upgrade Retry Error", {
error: e.message
}),
e
}),
null
},
startSubscriptionOrder: function(e, t, n) {
var r = this;
return s.all([d["default"].fetchPaymentMethods(e), this.fetchProduct(t)]).then(function(s) {
var a = i(s, 2)
, o = a[0]
, l = a[1];
return r.createOrder(t, n, e.id).then(function(e) {
return [o, l, e]
})
}).then(function(e) {
var t = i(e, 3)
, s = t[0]
, r = t[1];
t[2];
s.recurring_contracts.length > 0 && d["default"].setActiveStep("confirmation");
var a = r._links["b:providers"][0].href.split("/").pop()
, o = r._embedded["b:tier"]._embedded["b:tier-prices"].find(function(e) {
return e.currency === m["default"].currentCurrency
}).amount;
f["default"].track("Provider Subscription/Subscription Upgrade Started", {
provider_uid: r.uid,
subscription: a,
offer: o,
recurring: s.recurring_contracts.length > 0,
start_date: n
})
})["catch"](function(e) {
throw f["default"].track("Provider Subscription/Subscription Upgrade Error", {
error: e.message
}),
e
}),
null
},
createOrderSuccess: function(e) {
return e
}
}),
e.exports = t["default"]
},
220: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(19)
, o = r(a)
, l = n(375)
, u = r(l)
, c = n(13)
, d = r(c)
, p = function() {
function e() {
s(this, e),
this.generateActions("fetchTwitterFriendsSuccess")
}
return i(e, [{
key: "connectTwitter",
value: function(e, t) {
var n = this;
return function(i) {
i(),
u["default"].authorize(e).then(function() {
n.twitterConnectSuccess(),
t && n.fetchTwitterFriends(e)
})["catch"](function(e) {
return n.twitterError(e)
})
}
}
}, {
key: "toggleTwitter",
value: function(e) {
var t = this;
return function(n) {
n(),
"string" != typeof e.get("twitter_id") ? t.connectTwitter(e) : u["default"].unauthorize(e).then(function() {
return t.twitterDisconnectSuccess()
})["catch"](function(e) {
return t.twitterError(e)
})
}
}
}, {
key: "twitterConnectSuccess",
value: function() {
return d["default"].track("Social Connect", {
platform: "twitter"
}),
null
}
}, {
key: "twitterDisconnectSuccess",
value: function() {
return d["default"].track("Social Disconnect", {
platform: "twitter"
}),
null
}
}, {
key: "twitterError",
value: function(e) {
return d["default"].track("Social Connect Error", {
platform: "twitter",
error: e.message
}),
null
}
}, {
key: "fetchTwitterFriends",
value: function(e) {
var t = this;
u["default"].getFriends(e).then(function(e) {
return t.fetchTwitterFriendsSuccess(e)
})
}
}]),
e
}();
t["default"] = o["default"].createActions(p),
e.exports = t["default"]
},
221: function(e, t, n) {
var i, s;
i = [n(4), n(90)],
s = function(e, t) {
"use strict";
var i = n(229)
, s = e.Collection.extend({
model: t,
parse: function(e) {
e._links.self && (this.url = e._links.self.href),
e._links.next ? this.next = e._links.next.href : this.next = void 0,
e._links.prev ? this.prev = e._links.prev.href : this.prev = void 0;
var t = !1;
if (e._links.self.href.toLowerCase().indexOf("most_recent.json") > -1 && (t = !0),
-1 === e._links.self.href.toLowerCase().indexOf("popular") && -1 === e._links.self.href.toLowerCase().indexOf("user") && e._embedded.issues && (e._embedded.issues = e._embedded.issues.reverse()),
this._favourites) {
var n = []
, s = []
, r = void 0;
for (r = 0; r < e._embedded.issues.length; r++) {
var a = this._favourites.findWhere({
provider_id: e._embedded.issues[r].provider.id
});
a ? (e._embedded.issues[r].favourite = !0,
t ? s.push(e._embedded.issues[r]) : n.push(e._embedded.issues[r])) : (e._embedded.issues[r].favourite = !1,
s.push(e._embedded.issues[r]))
}
if (!t)
for (r = n.length; r > 0; r--)
s.unshift(n[r - 1]);
e._embedded.issues = s,
n = null ,
s = null
}
var o = e._embedded.issues.filter(function(e) {
return !i(e.provider).disableIssue
});
return o
},
setFavourites: function(e) {
this._favourites = e
}
});
return s
}
.apply(t, i),
!(void 0 !== s && (e.exports = s))
},
222: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(2)
, a = s(r)
, o = n(15)
, l = s(o)
, u = n(11)
, c = s(u)
, d = n(231)
, p = s(d)
, f = a["default"].createClass({
displayName: "Select2",
propTypes: {
children: a["default"].PropTypes.any,
name: a["default"].PropTypes.string,
selected: a["default"].PropTypes.string,
onChange: a["default"].PropTypes.func.isRequired,
className: a["default"].PropTypes.string
},
_dropdownStyle: {},
getInitialState: function() {
return {
open: !1
}
},
componentDidMount: function() {
window.addEventListener("click", this._onCloseDropdown)
},
componentWillUpdate: function() {
this._dropdownStyle = this._calculatePosition()
},
componentWillUnmount: function() {
window.removeEventListener("click", this._onCloseDropdown)
},
_onToggle: function() {
this.setState({
open: !this.state.open
})
},
_onCloseDropdown: function(e) {
e && (l["default"].findDOMNode(this).contains(e.target) || e.target === l["default"].findDOMNode(this)) || this.setState({
open: !1
})
},
_onChange: function(e) {
var t = (0,
p["default"])(e.target, ".v-dropdown-item")
, n = t.getAttribute("data-value");
this.props.onChange(n),
this._onCloseDropdown()
},
_calculatePosition: function() {
if (!this.props.children)
return {};
var e = l["default"].findDOMNode(this)
, t = e.getBoundingClientRect()
, n = Math.min(300, 46 * this.props.children.length);
if (t.bottom + n < window.innerHeight)
return {};
if (t.top - n > 0)
return {
top: -n
};
var i = t.top
, s = window.innerHeight - t.bottom
, r = 63;
return i > s ? {
top: -Math.max(i, r),
height: Math.max(i, r)
} : {
height: Math.max(s, r)
}
},
_renderSelected: function() {
var e = this;
return this.props.children ? this.props.children.filter(function(e) {
return e.props.selected
}).map(function(t) {
var n = (0,
c["default"])("v-dropdown-item dropdown-item selected-item", {
"s-open": e.state.open
});
return a["default"].createElement("div", {
className: n,
"data-value": t.props.value,
key: t.props.value,
onClick: e._onToggle
}, t.props.children)
}) : void 0
},
_renderOptions: function() {
var e = this;
return this.props.children ? this.props.children.map(function(t) {
return a["default"].createElement("div", {
className: "v-dropdown-item dropdown-item",
"data-value": t.props.value,
key: t.props.value,
onClick: e._onChange
}, t.props.children)
}) : void 0
},
render: function() {
var e = (0,
c["default"])("v-input v-dropdown frm-field-wrapper", i({}, this.props.className, this.props.className))
, t = (0,
c["default"])("v-dropdown-items", {
"s-open": this.state.open,
above: this._dropdownStyle.top < 0
});
return a["default"].createElement("div", {
className: e
}, this._renderSelected(), a["default"].createElement("div", {
className: t,
style: this._dropdownStyle
}, this._renderOptions()))
}
});
t["default"] = f,
e.exports = t["default"]
},
223: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(57)
, o = i(a)
, l = n(171)
, u = i(l);
t["default"] = r["default"].createClass({
displayName: "UsernameTooltip",
propTypes: {
username: r["default"].PropTypes.string.isRequired,
className: r["default"].PropTypes.string,
children: r["default"].PropTypes.object
},
mixins: [(0,
o["default"])()],
_openTimer: null ,
_showTooltip: function() {
clearTimeout(this._openTimer),
this._openTimer = setTimeout(this.openDropdown, 200)
},
_hideTooltip: function() {
clearTimeout(this._openTimer),
this.closeDropdown()
},
_renderTooltip: function() {
return this.state.open ? r["default"].createElement(u["default"], {
name: "username",
className: "tooltip",
onScroll: this._hideTooltip,
position: "top"
}, this.props.username) : !1
},
render: function() {
return r["default"].createElement("div", {
className: this.props.className,
onClick: this._showTooltip,
onMouseEnter: this._showTooltip,
onMouseLeave: this._hideTooltip
}, this.props.children, this._renderTooltip())
}
}),
e.exports = t["default"]
},
224: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(3)
, d = n(334)
, p = o(d)
, f = n(13)
, h = o(f)
, m = n(80)
, g = o(m)
, v = n(79)
, y = o(v)
, _ = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments),
this.state = {
error: null
}
}
return s(t, e),
r(t, [{
key: "_onError",
value: function(e) {
h["default"].track(this.props.analyticsName, {
event: "signup_error_facebook",
message: e.message
}),
422 === e.status ? this._onConnectFacebook() : this._setError("app.error.error_default")
}
}, {
key: "_onConnectFacebook",
value: function() {
var e = this;
g["default"].getMe().then(function(t) {
y["default"].openFacebookConnectExistingEmail(t.email),
e.props.onConnectDialogueOpen && e.props.onConnectDialogueOpen()
})
}
}, {
key: "_onSignUp",
value: function() {
var e;
h["default"].track("SignUp Facebook"),
h["default"].track("SignUp Successful", {
platform: "facebook"
}),
(e = this.props).onSignUp.apply(e, arguments)
}
}, {
key: "_onLogin",
value: function() {
var e;
h["default"].track("Login Facebook"),
h["default"].track("Login Successful", {
platform: "facebook"
}),
(e = this.props).onLogin.apply(e, arguments)
}
}, {
key: "_setError",
value: function(e) {
var t = void 0;
e && (t = (0,
c.translate)(e)),
this.setState({
error: t
})
}
}, {
key: "render",
value: function() {
return u["default"].createElement(p["default"], {
error: this.state.error,
buttonText: this.props.buttonText,
onSignUp: this._onSignUp.bind(this),
onLogin: this._onLogin.bind(this),
onError: this._onError.bind(this),
signUpContext: this.props.signUpContext
})
}
}], [{
key: "propTypes",
value: {
buttonText: u["default"].PropTypes.string,
analyticsName: u["default"].PropTypes.string,
onLogin: u["default"].PropTypes.func,
onSignUp: u["default"].PropTypes.func,
onConnectDialogueOpen: u["default"].PropTypes.func,
signUpContext: u["default"].PropTypes.object
},
enumerable: !0
}, {
key: "defaultProps",
value: {
analyticsName: "Login Form",
signUpContext: {}
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = _,
e.exports = t["default"]
},
225: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(3)
, o = i(a)
, l = n(371)
, u = i(l);
t["default"] = r["default"].createClass({
displayName: "EmailSuggestion",
propTypes: {
email: r["default"].PropTypes.string.isRequired,
onClick: r["default"].PropTypes.func.isRequired,
delay: r["default"].PropTypes.number
},
getInitialState: function() {
return {
suggestion: this.getSuggestion(this.props.email)
}
},
componentWillReceiveProps: function(e) {
var t = this;
return this.props.delay ? (clearTimeout(this._suggestionTimeout),
void (this._suggestionTimeout = setTimeout(function() {
t.setState({
suggestion: t.getSuggestion(e.email)
})
}, this.props.delay))) : void this.setState({
suggestion: this.getSuggestion(e.email)
})
},
getSuggestion: function(e) {
return u["default"].checkForCommonMistakes(e)
},
onClick: function() {
this.props.onClick(this.state.suggestion)
},
render: function() {
return this.state.suggestion ? r["default"].createElement("div", {
className: "v-email-suggestion"
}, o["default"].locale.app.did_you_mean, " ", r["default"].createElement("strong", {
onClick: this.onClick
}, this.state.suggestion), "?") : null
}
}),
e.exports = t["default"]
},
226: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = (n(4),
n(2))
, u = o(l)
, c = n(37)
, d = o(c)
, p = (n(3),
n(590))
, f = o(p)
, h = n(35)
, m = (o(h),
n(13))
, g = (o(m),
n(134))
, v = o(g)
, y = n(82)
, _ = o(y)
, b = n(395)
, w = o(b)
, S = n(8)
, k = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).call(this),
w["default"].listen(this._onLoginStore.bind(this))
}
return s(t, e),
r(t, null , [{
key: "propTypes",
value: {
analyticsName: u["default"].PropTypes.string,
onToReset: u["default"].PropTypes.func,
onLogin: u["default"].PropTypes.func,
buttonHTML: u["default"].PropTypes.string
},
enumerable: !0
}, {
key: "defaultProps",
value: {
analyticsName: "Login Form"
},
enumerable: !0
}]),
r(t, [{
key: "_onLoginStore",
value: function(e) {
var t = this;
e.login.status === S.STATUS_OK && setTimeout(function() {
t.props.onLogin && t.props.onLogin(_["default"].getState().user)
})
}
}, {
key: "_onLogin",
value: function(e, t) {
v["default"].loginWithCredentials({
login: e,
password: t
})
}
}, {
key: "_onSendLoginEmail",
value: function(e) {
v["default"].sendLoginEmail(e)
}
}, {
key: "_renderLoginForm",
value: function(e) {
return u["default"].createElement(f["default"], {
initialUsername: e.login.email,
loginState: e.login,
emailLoginState: e.loginEmail,
buttonHTML: this.props.buttonHTML,
onToReset: this.props.onToReset,
onLogin: this._onLogin.bind(this),
onSendLoginEmail: this._onSendLoginEmail.bind(this)
})
}
}, {
key: "render",
value: function() {
return u["default"].createElement(d["default"], {
store: w["default"],
render: this._renderLoginForm.bind(this)
})
}
}]),
t
}(u["default"].Component);
t["default"] = k,
e.exports = t["default"]
},
227: function(e, t, n) {
"use strict";
var i = n(5)
, s = n(47)
, r = {
getInitialState: function() {
return {
inElement: !1,
inPopover: !1
}
},
enterElement: function(e) {
e && "Android" === window.BrowserDetect.device || e && "Windows Phone" === window.BrowserDetect.device || s.get("touch") || this.setPositionInElement(e)
},
leaveElement: function(e) {
e && "Android" === window.BrowserDetect.device || e && "Windows Phone" === window.BrowserDetect.device || s.get("touch") || this.determinePopover({
inElement: !1
})
},
enterPopover: function(e) {
e && "Android" === window.BrowserDetect.device || e && "Windows Phone" === window.BrowserDetect.device || s.get("touch") || this.determinePopover({
inPopover: !0,
inElement: !1
})
},
leavePopover: function(e) {
var t = this;
e && "Android" === window.BrowserDetect.device || e && "Windows Phone" === window.BrowserDetect.device || setTimeout(function() {
return t.determinePopover({
inPopover: !1
})
})
},
closePopover: function() {
this.determinePopover({
inElement: !1,
inPopover: !1
})
},
onElementClick: function(e) {
var t = this;
return this.props.disabled ? void e.preventDefault() : this.state.popover ? void setTimeout(function() {
return t.determinePopover({
inElement: !1
})
}) : (e.preventDefault(),
void this.setPositionInElement(e))
},
setPositionInElement: function(e) {
this.determinePopover({
inElement: !0,
x: e.clientX,
y: e.clientY
})
},
determinePopover: function(e) {
if (!this.props.disabled) {
var t = i.defaults(e, this.state);
(t.inElement || t.inPopover) && (t.popover = !0,
this.onPopoverOpen && this.onPopoverOpen()),
t.inPopover || t.inElement || (t.popover = !1,
this.onPopoverClose && this.onPopoverClose()),
this.setState(t)
}
}
};
e.exports = r
},
228: function(e, t, n) {
"use strict";
var i = n(11)
, s = n(12)
, r = n(13)
, a = n(17)
, o = n(2)
, l = n(15)
, u = n(57)
, c = n(3)
, d = n(112)
, p = n(251)
, f = n(181)
, h = n(224)
, m = n(226)
, g = n(28)
, v = o.createClass({
displayName: "Login",
propTypes: {
active: o.PropTypes.bool,
onResetPasswordLink: o.PropTypes.func,
onFacebookConnectDialogueOpen: o.PropTypes.func
},
getDefaultProps: function() {
return {
active: !0
}
},
_onLogin: function() {
s.getUser().didOnboarding() ? s.navigateToReturnURL() : f.reset()
},
_onFacebookError: function(e) {
window.Raven.captureException(e)
},
render: function() {
return this.props.active ? o.createElement("div", {
className: "v-login"
}, o.createElement("div", {
className: "form-container"
}, o.createElement("div", {
className: "v-dropdown-login"
}, o.createElement("div", {
className: "v-login-form"
}, o.createElement("h2", null , c.translate("login.dropdown.fb.title")), o.createElement(h, {
analyticsName: "Login Dropdown",
onLogin: this._onLogin,
onSignUp: this._onLogin,
onConnectDialogueOpen: this.props.onFacebookConnectDialogueOpen
}), o.createElement("h2", null , c.translate("login.dropdown.blendle.title")), o.createElement(m, {
analyticsName: "Login Dropdown",
onLogin: this._onLogin,
onToReset: this.props.onResetPasswordLink
}))))) : null
}
})
, y = o.createClass({
displayName: "ResetPassword",
propTypes: {
active: o.PropTypes.bool,
onLoginLink: o.PropTypes.func
},
getDefaultProps: function() {
return {
active: !0
}
},
componentWillReceiveProps: function(e) {
var t = this;
e.active && !this.props.active && (this._autofocusTimeout = setTimeout(function() {
return t._resetTokenForm.focus()
}, 200))
},
componentWillMount: function() {
this._resetTokenForm = new p,
this._resetTokenForm.render()
},
componentWillUnmount: function() {
clearTimeout(this._autofocusTimeout)
},
render: function() {
var e;
return this._resetTokenForm.setDisabled(!this.props.active),
this.props.showBack && (e = o.createElement(g, {
className: "lnk-toggle-pane lnk-login",
onClick: this.props.onLoginLink
}, c.locale.login.dropdown.to_login)),
o.createElement("div", {
className: "v-reset-password"
}, o.createElement(d, {
view: this._resetTokenForm
}), e)
}
})
, _ = o.createClass({
displayName: "PanelSection",
propTypes: {
onBack: o.PropTypes.func
},
render: function() {
var e, t = i({
"s-active": this.props.active
}, "v-panel-section");
return this.props.showTitle && (e = o.createElement("div", {
className: "v-panel-title"
}, o.createElement(g, {
className: "btn-back",
onClick: this.props.onBack
}), this.props.title)),
o.createElement("div", {
className: t
}, e, o.createElement("div", {
className: "v-panel-content"
}, this.props.children))
}
})
, b = o.createClass({
displayName: "LoginDropdown",
mixins: [u(".a-sidebar")],
propTypes: {
onOpen: o.PropTypes.func,
onClose: o.PropTypes.func,
text: o.PropTypes.string
},
getDefaultProps: function() {
return {
mobile: a.isMobile()
}
},
getInitialState: function() {
return {
active: this.props.active || "login"
}
},
componentWillReceiveProps: function(e) {
this.props.active !== e.active && this.setState({
active: e.active
})
},
componentDidMount: function() {
s.once("login", function() {
document.body.classList.remove("l-mobile-menu-open-full")
})
},
componentDidUpdate: function(e, t) {
this.props.mobile && (l.render(this._getPanel(), document.querySelector(".a-sidebar")),
this.state.open ? document.body.classList.add("l-mobile-menu-open-full") : document.body.classList.remove("l-mobile-menu-open-full"))
},
_getPanel: function() {
var e = "login" === this.state.active
, t = "resetpassword" === this.state.active;
return o.createElement("div", {
onClick: this._backToLogin,
className: "v-panel v-login-panel"
}, o.createElement(_, {
key: "login",
active: e,
title: c.locale.app.text.login,
showTitle: this.props.mobile,
onBack: this.closeDropdown
}, this.state.open ? o.createElement(v, {
active: e,
onResetPasswordLink: this._showResetPassword,
onFacebookConnectDialogueOpen: this.closeDropdown
}) : ""), o.createElement(_, {
key: "resetpassword",
active: t,
title: c.locale.signup.signin.forgotPassword,
showTitle: this.props.mobile,
onBack: this._showLogin
}, this.state.open ? o.createElement(y, {
active: t,
onLoginLink: this._showLogin,
showBack: !this.props.mobile
}) : ""))
},
_toggleLoginForm: function(e) {
e.preventDefault(),
this.state.open ? r.track("Close Login") : r.track("Open Login"),
this.toggleDropdown()
},
render: function() {
var e, t = i({
"s-active": this.state.open
}, "v-login-dropdown");
this.props.mobile || (e = o.createElement("div", {
className: "overlay"
}, o.createElement("div", {
className: "container"
}, this.state.open && this._getPanel())));
var n = this.props.text || c.translate("app.buttons.login");
return o.createElement("div", {
className: t
}, o.createElement(g, {
className: "btn btn-green btn-login",
onClick: this._toggleLoginForm
}, n), e)
},
_showResetPassword: function(e) {
e.preventDefault(),
this.setState({
active: "resetpassword"
})
},
_showLogin: function() {
this.setState({
active: "login"
})
}
});
e.exports = b
},
230: function(e, t, n) {
"use strict";
function i(e, t) {
var n = new window.FontFaceObserver(e.family,e);
return n.check(null , t).then(function() {
return e
})["catch"](function(t) {
if (t === n)
return d.reject({
font: e
});
throw t
})
}
function s(e) {
var t = e.getPropertyValue("font-family").replace(/'|"/g, "");
return t.indexOf(",") > -1 ? t.substring(0, t.indexOf(",")) : t
}
function r(e) {
var t = e.getPropertyValue("font-weight");
if (!isNaN(t))
return t;
switch (t) {
case "bold":
return 700;
case "normal":
return 400;
default:
return
}
}
function a(e) {
return e.getPropertyValue("font-style") || "normal"
}
function o(e) {
var t = g["default"].map(e.children, function(e) {
var t = window.getComputedStyle(e);
return {
family: s(t),
weight: r(t),
style: a(t)
}
});
return g["default"].unique(t, function(e) {
return JSON.stringify(e)
})
}
function l(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? 3e3 : arguments[1]
, n = new d(function(n, s) {
function r() {
o.length + l.length < e.length || (o.length ? s(new h["default"]("WebFontsNotLoaded","Selected web fonts could not loaded or timed out",{
loadedFonts: l,
failedFonts: o
})) : n(l))
}
function a(e) {
if (e.font)
return o.push(e.font),
d.resolve();
throw e
}
var o = []
, l = [];
e.forEach(function(e) {
i(e, t).then(function(e) {
return l.push(e)
}, a).then(r)
})
}
);
return n["catch"](function(e) {
if ("WebFontsNotLoaded" !== e.type)
throw e
})
}
function u(e, t) {
return l(o(e), t)
}
function c(e, t) {
return g["default"].filter(e.children, function(e) {
var n = window.getComputedStyle(e);
return g["default"].where(t, {
family: s(n),
weight: r(n),
style: a(n)
}).length
})
}
var d = n(24)["default"]
, p = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.load = l,
t.loadFromElement = u,
t.getElementsWithFonts = c,
n(865);
var f = n(35)
, h = p(f)
, m = n(5)
, g = p(m)
},
231: function(e, t, n) {
var i;
i = function() {
"use strict";
function e(e, n) {
for (var i = "string" == typeof n; e; ) {
if (i && t(e, n) || e === n)
return e;
e = e.parentNode
}
return null
}
var t = function(e, t) {
var n = e.matches || e.matchesSelector || e.mozMatchesSelector || e.msMatchesSelector || e.oMatchesSelector || e.webkitMatchesSelector;
return n ? n.call(e, t) : void 0
}
;
return e
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
232: function(e, t, n) {
var i, s = n(53)["default"];
i = function(e) {
"use strict";
var t = n(25)
, i = n(141)
, r = function() {
this.initialize.apply(this, arguments)
}
;
return r.prototype = {
initialize: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1];
this.options = t,
"string" == typeof e ? this._variants = {
original: {
href: e
}
} : this._variants = e._links,
this.el = new Image,
this.el.classList.add("s-loading"),
this._caption = e.caption
},
load: function(e) {
var n = t.defer()
, i = this._getVariantOrDefault(e);
return this.el.onabort = this._error.bind(this, n),
this.el.onerror = this._error.bind(this, n),
this.el.onload = this._success.bind(this, n),
this.el.src = i.href,
n.promise
},
getWidthMultiplier: function(e) {
return this.getWidth(e) / this.getHeight(e)
},
getHeightMultiplier: function(e) {
return this.getHeight(e) / this.getWidth(e)
},
getWidth: function(e) {
var t = this._getVariantOrDefault(e);
return t.width
},
getHeight: function(e) {
var t = this._getVariantOrDefault(e);
return t.height
},
_getDefaultVariant: function() {
var e = s(this._variants);
return this._variants[e[e.length - 1]]
},
_getVariantOrDefault: function(e) {
if (this._variants[e]) {
var t = e;
return this.options.height && this.options.height > 0 && (t = i.getSizeForHeight(this._variants, this.options.height)),
i.getXHD(this._variants, t)
}
return this._getDefaultVariant()
},
_error: function(e) {
this.el.classList.remove("s-loading"),
this.el.classList.add("s-error"),
e.reject(new Error("Image at url " + this.el.src + " could not be loaded"))
},
_success: function(e) {
this.el.classList.remove("s-loading"),
this.el.classList.add("s-success"),
this.el.removeAttribute("width"),
this.el.removeAttribute("height"),
e.resolve(this)
}
},
r
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
234: function(e, t) {
"use strict";
function n(e, t) {
var n, i, s = "";
for (i = 0; i < t.length; i++) {
var r = !0;
for (n = 0; e > n && n + i + e < t.length; n++)
r = r && t.charAt(n + i) === t.charAt(n + i + e);
e > n && (r = !1),
r ? (i += e - 1,
r = !1) : s += t.charAt(i)
}
return s
}
function i(e) {
var t = 0;
return e.length < 5 ? r : (t += 4 * e.length,
t += n(1, e).length - e.length,
t += n(2, e).length - e.length,
t += n(3, e).length - e.length,
t += n(4, e).length - e.length,
e.match(/(.*[0-9].*[0-9].*[0-9])/) && (t += 5),
e.match(/(.*[!,@,#,$,%,^,&,*,?,_,~].*[!,@,#,$,%,^,&,*,?,_,~])/) && (t += 5),
e.match(/([a-z].*[A-Z])|([A-Z].*[a-z])/) && (t += 10),
e.match(/([a-zA-Z])/) && e.match(/([0-9])/) && (t += 15),
e.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && e.match(/([0-9])/) && (t += 15),
e.match(/([!,@,#,$,%,^,&,*,?,_,~])/) && e.match(/([a-zA-Z])/) && (t += 15),
(e.match(/^\w+$/) || e.match(/^\d+$/)) && (t -= 10),
0 > t ? r : 34 > t ? a : 68 > t ? o : l)
}
function s(e) {
return u[e]
}
var r = 1
, a = 2
, o = 3
, l = 4
, u = {};
u[r] = "#FF0000",
u[a] = "#FFD900",
u[o] = "#FFD900",
u[l] = "#64B278",
e.exports = {
getScore: i,
getScoreColor: s,
colors: u,
SHORT: r,
WEAK: a,
GOOD: o,
STRONG: l
}
},
235: function(e, t) {
"use strict";
e.exports = function(e) {
for (; e.firstChild; )
e.removeChild(e.firstChild)
}
},
241: function(e, t, n) {
"use strict";
var i = n(24)["default"]
, s = n(5)
, r = n(4)
, a = n(16)
, o = n(534)
, l = n(378)
, u = n(66)
, c = n(43);
e.exports = {
fetchChannels: function() {
var e = arguments.length <= 0 || void 0 === arguments[0] ? {} : arguments[0]
, t = new c(a.getLink("channels")).addSearch(s.defaults(e, {
amount: 50
}))
, n = new o(null ,{
url: t.toString(),
parse: !0
});
return n.fetch().then(function() {
return n
})
},
fetchChannel: function(e) {
return r.ajax({
url: a.getLink("user", {
user_id: e
})
}).then(function(e) {
return new l(e.data,{
parse: !0
})
})
},
follow: function(e, t) {
return u.followUser(e, t)
},
unfollow: function(e, t) {
return t = r.Helpers.toArray(t),
i.all(t.map(function(t) {
return u.unfollowUser(e, t)
})).then(function() {
return t
})
}
}
},
242: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(5)
, i = n(25)
, s = n(35)
, r = n(8)
, a = {
_requests: {},
abort: function(e) {
a._requests = t.reduce(a._requests, function(t, n, i) {
return e && e !== i ? (t[i] = n,
t) : (n.abort && n.abort(),
t)
}, {})
},
get: function(e) {
return a._requests[e]
},
set: function(e, t) {
var n = a.get(e);
return n && a.abort(e),
a._requests[e] = t,
t.then(function(n) {
return a.get(e) === t ? i.resolve(n) : i.reject(new s(r.XHR_ABORT,"Request has been aborted"))
})
}
};
return a
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
243: function(e, t, n) {
"use strict";
function i(e) {
var t = (0,
d["default"])();
switch (e) {
case "now":
return t.subtract(1, "h");
case "today":
return t.subtract(24, "h");
case "week":
return t.subtract(7, "d");
default:
return null
}
}
function s() {
var e = (new Date).getHours();
return e >= 3 && 12 > e ? (0,
g.translate)("timeline.trending.morning") : e >= 18 ? (0,
g.translate)("timeline.trending.evening") : (0,
g.translate)("timeline.trending.afternoon")
}
var r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(16)
, o = r(a)
, l = n(170)
, u = r(l)
, c = n(18)
, d = r(c)
, p = n(43)
, f = r(p)
, h = n(38)
, m = r(h)
, g = n(3)
, v = n(345)
, y = ["b:tiles", "b:item", "b:pin", "b:acquisition", "b:issue-acquisition", "b:relevant-posts", "b:requested-user-post", "manifest", "b:user", "b:manager"];
t["default"] = {
fetchTilesByUrl: function(e) {
var t = new u["default"](null ,{
track: !0
});
return t.fetch({
url: e,
accept: "application/hal+json"
}).then(function() {
return t
})
},
fetchPins: function(e) {
return this.fetchTilesByUrl(o["default"].getLink("user_pins_timeline", {
user_id: e
}, y))
},
fetchFollowing: function(e) {
return this.fetchTilesByUrl(o["default"].getLink("user_following_tiles", {
user_id: e,
user_context: e
}, y))
},
fetchUser: function(e) {
return this.fetchTilesByUrl(o["default"].getLink("user_posted_tiles", {
user_context: e,
user_id: e
}, y))
},
fetchUserArchive: function(e) {
return this.fetchTilesByUrl(o["default"].getLink("user_items", {
user_id: e
}, y))
},
fetchChannel: function(e, t) {
return this.fetchTilesByUrl(o["default"].getLink("user_posted_tiles", {
user_context: e,
user_id: t
}, y))
},
fetchTrending: function(e, t) {
var n = o["default"].getLink("user_trending_tiles", {
user_id: e,
user_context: e
}, y)
, s = i(t)
, r = (0,
f["default"])(n).addSearch({
from: s ? s.toISOString() : null ,
type: s ? null : t,
version: 2
});
return this.fetchTilesByUrl(r.toString())
},
getUserTrendingFilter: function(e) {
var t = (0,
d["default"])()
, n = (0,
d["default"])(e.get("trending_viewed_at"));
return !m["default"].isBetaCountry(e.get("country")) && n.isAfter(t.subtract(1, "h")) ? "now" : n.isAfter(t.subtract(24, "h")) ? "today" : "week"
},
getTrendingFilters: function() {
var e = (0,
v.getException)("hiddenTrendingTimelines", [])
, t = [{
label: (0,
g.translate)("timeline.trending.now", [s()]),
trending: "now"
}, {
label: (0,
g.translate)("timeline.trending.today"),
trending: "today"
}, {
label: (0,
g.translate)("timeline.trending.week"),
trending: "week"
}, {
label: (0,
g.translate)("timeline.trending.international"),
trending: "international"
}, {
label: (0,
g.translate)("timeline.trending.dutch"),
trending: "dutch",
countryCode: "NL"
}, {
label: (0,
g.translate)("timeline.trending.german"),
trending: "german",
countryCode: "DE"
}, {
label: (0,
g.translate)("timeline.trending.belgian"),
trending: "belgian",
countryCode: "BE"
}];
return t.filter(function(t) {
return (m["default"].isBetaCountry(t.countryCode) && m["default"].isBetaCountry() || !m["default"].isBetaCountry(t.countryCode) && !m["default"].isBetaCountry()) && !e.includes(t.trending)
})
}
},
e.exports = t["default"]
},
245: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(77)
, o = i(a)
, l = n(11)
, u = i(l)
, c = r["default"].createClass({
displayName: "SelectableIssue",
propTypes: {
issue: r["default"].PropTypes.object.isRequired,
onChange: r["default"].PropTypes.func.isRequired,
height: r["default"].PropTypes.oneOf([115, 180]),
selected: r["default"].PropTypes.bool,
disabled: r["default"].PropTypes.bool,
checked: r["default"].PropTypes.bool
},
render: function() {
if (!this.props.issue.get)
return null ;
var e = this.props.issue._links.cover_image || this.props.issue._links.page_preview || (this.props.issue.get("_links") ? this.props.issue.get("_links").page_preview : void 0)
, t = this.props.height / e.height * e.width
, n = {
width: Math.ceil(t),
height: Math.ceil(this.props.height)
}
, i = void 0
, s = this.props.issue.get("manifest");
s && (i = s.getProvider().get("name")),
i || (i = this.props.issue.get("provider").id);
var a = (0,
u["default"])("v-selectable-issue", {
selected: this.props.selected
}, {
small: 115 === this.props.height
});
return r["default"].createElement("div", {
className: "selectable-issue"
}, r["default"].createElement("label", {
"aria-label": i,
className: a,
style: n
}, r["default"].createElement("input", {
type: "checkbox",
onChange: this.props.onChange,
disabled: this.props.disabled,
checked: this.props.selected
}), r["default"].createElement(o["default"], {
src: e.href,
alt: i,
width: t,
height: this.props.height
})))
}
});
t["default"] = c,
e.exports = t["default"]
},
246: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(21)["default"]
, a = n(26)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(8)
, u = n(19)
, c = o(u)
, d = n(133)
, p = o(d)
, f = function() {
function e() {
s(this, e),
this.channels = {
status: l.STATUS_INITIAL,
data: []
},
this.details = {},
this.bindActions(p["default"])
}
return i(e, [{
key: "onFetchChannels",
value: function() {
this.setState({
channels: {
status: l.STATUS_PENDING,
data: []
}
})
}
}, {
key: "onFetchChannelsSuccess",
value: function(e) {
var t = e.data;
this.setState({
channels: {
status: l.STATUS_OK,
data: t
}
})
}
}, {
key: "onFetchChannelsError",
value: function(e) {
var t = e.error;
this.setState({
channels: {
status: l.STATUS_ERROR,
error: t
}
})
}
}, {
key: "onFetchChannelDetails",
value: function(e) {
var t = e.channelId;
this.setState({
details: r({}, this.details, a({}, t, r({
data: {}
}, this.details[t], {
status: l.STATUS_PENDING
})))
})
}
}, {
key: "onFetchChannelDetailsSuccess",
value: function(e) {
var t = e.channelId
, n = e.data;
this.setState({
details: r({}, this.details, a({}, t, {
status: l.STATUS_OK,
data: n
}))
})
}
}, {
key: "onFetchChannelDetailsError",
value: function(e) {
var t = e.channelId
, n = e.error;
this.setState({
details: r({}, this.details, a({}, t, {
status: l.STATUS_ERROR,
error: n
}))
})
}
}, {
key: "followChannel",
value: function(e) {
var t = e.channelId
, n = e.isFollowing
, i = this.details[t];
i && (i.data.set("following", n),
this.setState({
details: r({}, this.details, a({}, t, r({}, i, {
data: i.data
})))
}));
var s = this.channels.data.map(function(e) {
return e.id === t && e.set("following", n),
e
});
this.setState({
channels: r({}, this.channels, {
data: s
})
})
}
}]),
e
}();
t["default"] = c["default"].createStore(f, "ChannelsStore"),
e.exports = t["default"]
},
247: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = n(19)
, l = r(o)
, u = n(164)
, c = r(u)
, d = n(114)
, p = r(d)
, f = function() {
function e() {
s(this, e),
this.status = a.STATUS_INITIAL,
this.connected = !1,
this.friends = [],
this.error = null ,
this.bindActions(c["default"]),
this.bindAction(p["default"].UPDATE, this.onUpdateUser)
}
return i(e, [{
key: "onUpdateUser",
value: function(e) {
this.setState({
connected: !!e.get("facebook_id")
})
}
}, {
key: "onToggleFacebook",
value: function() {
this.setState({
status: a.STATUS_PENDING,
error: null
})
}
}, {
key: "onConnectFacebook",
value: function() {
this.setState({
status: a.STATUS_PENDING,
error: null
})
}
}, {
key: "onFacebookError",
value: function() {
this.setState({
status: a.STATUS_ERROR
})
}
}, {
key: "onFacebookConnectSuccess",
value: function(e) {
this.setState({
status: a.STATUS_OK,
error: null ,
connected: !0,
friends: e
})
}
}, {
key: "onFacebookDisconnectSuccess",
value: function() {
this.setState({
status: a.STATUS_OK,
error: null ,
connected: !1
})
}
}, {
key: "onLoginAndConnectFacebook",
value: function() {
this.setState({
status: a.STATUS_PENDING
})
}
}, {
key: "onLoginAndConnectFacebookError",
value: function(e) {
this.setState({
status: a.STATUS_ERROR,
error: e
})
}
}]),
e
}();
t["default"] = l["default"].createStore(f, "FacebookStore"),
e.exports = t["default"]
},
248: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = r(a)
, l = n(19)
, u = r(l)
, c = n(218)
, d = r(c)
, p = n(314)
, f = r(p)
, h = function() {
function e() {
s(this, e),
this.status = o["default"].STATUS_INITIAL,
this.latestIssue = null ,
this.bindActions(d["default"]),
this.bindActions(f["default"])
}
return i(e, [{
key: "onFetchLatestIssue",
value: function() {
this.setState({
latestIssue: null
})
}
}, {
key: "onFetchLatestIssueSuccess",
value: function(e) {
this.setState({
latestIssue: e
})
}
}, {
key: "onFetchCategory",
value: function(e) {
var t = e.categoryId
, n = this.issues;
this.categoryId !== t && (n = null ),
this.setState({
status: o["default"].STATUS_PENDING,
scrollPosition: 0,
issues: n,
categoryId: t
})
}
}, {
key: "onFetchAcquiredIssues",
value: function() {
this.onFetchCategory({
categoryId: "my-issues"
})
}
}, {
key: "onFetchNextAcquiredIssues",
value: function() {
this.onFetchCategory({
categoryId: "my-issues"
})
}
}, {
key: "onFetchCategorySuccess",
value: function(e) {
var t = e.issues;
this.setState({
status: o["default"].STATUS_OK,
scrollPosition: 0,
issues: t
})
}
}, {
key: "onFetchAcquiredIssuesSuccess",
value: function(e) {
var t = e.issues;
this.onFetchCategorySuccess({
issues: t
})
}
}, {
key: "onFetchNextAcquiredIssuesSuccess",
value: function(e) {
var t = e.issues;
this.setState({
status: o["default"].STATUS_OK,
issues: t
})
}
}, {
key: "onFetchCategoryError",
value: function(e) {
var t = e.message;
this.setState({
status: o["default"].STATUS_ERROR,
scrollPosition: 0,
categoryId: null ,
issues: null ,
message: t
})
}
}, {
key: "onFetchAcquiredIssuesError",
value: function(e) {
var t = e.message;
this.onFetchCategoryError({
message: t
})
}
}, {
key: "onRememberScrollPosition",
value: function(e) {
var t = e.position;
this.setState({
scrollPosition: t
})
}
}]),
e
}();
t["default"] = u["default"].createStore(h, "IssuesStore"),
e.exports = t["default"]
},
249: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = n(19)
, l = r(o)
, u = n(168)
, c = r(u)
, d = function() {
function e() {
s(this, e),
this.error = null ,
this.status = a.STATUS_INITIAL,
this.resendStatus = a.STATUS_INITIAL,
this.bindActions(c["default"])
}
return i(e, [{
key: "onSignUp",
value: function() {
this.setState({
status: a.STATUS_PENDING,
error: null
})
}
}, {
key: "onSignUpSuccess",
value: function() {
this.setState({
status: a.STATUS_OK,
error: null
})
}
}, {
key: "onSignUpError",
value: function(e) {
this.setState({
status: a.STATUS_ERROR,
error: e
})
}
}, {
key: "onSignUpChangeEmail",
value: function() {
this.setState({
status: a.STATUS_INITIAL
})
}
}, {
key: "onResendEmailConfirm",
value: function() {
this.setState({
resendStatus: a.STATUS_PENDING
})
}
}, {
key: "onResendEmailConfirmSuccess",
value: function() {
this.setState({
resendStatus: a.STATUS_OK
})
}
}]),
e
}();
t["default"] = l["default"].createStore(d, "SignUpStore"),
e.exports = t["default"]
},
250: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = n(19)
, l = r(o)
, u = n(136)
, c = r(u)
, d = function() {
function e() {
s(this, e),
this.subscriptions = [],
this.status = a.STATUS_INITIAL,
this.error = null ,
this.selected = null ,
this.cancelReason = null ,
this.bindActions(c["default"])
}
return i(e, [{
key: "onFetchUserSubscriptionSuccess",
value: function(e) {
var t = this.subscriptions.filter(function(t) {
return t.uid !== e.uid
});
t.push(e),
this.setState({
status: a.STATUS_OK,
subscriptions: t
})
}
}, {
key: "onFetchUserSubscriptionError",
value: function(e) {
var t = e.error
, n = e.subscription
, i = this.subscriptions;
n && (i = i.filter(function(e) {
return e.uid !== n.uid
}),
i.push(n)),
this.setState({
status: a.STATUS_ERROR,
error: t,
subscriptions: i
})
}
}, {
key: "onFetchUserSubscription",
value: function() {
this.setState({
status: a.STATUS_PENDING
})
}
}, {
key: "onPollFetchUserSubscription",
value: function() {
this.setState({
status: a.STATUS_PENDING
})
}
}, {
key: "onFetchUserSubscriptions",
value: function() {
this.setState({
status: a.STATUS_PENDING
})
}
}, {
key: "onFetchUserSubscriptionsSuccess",
value: function(e) {
this.setState({
status: a.STATUS_OK,
subscriptions: e
})
}
}, {
key: "onFetchUserSubscriptionsError",
value: function(e) {
var t = e.error;
this.setState({
status: a.STATUS_ERROR,
error: t
})
}
}, {
key: "onUpdateCancelReason",
value: function(e) {
this.setState({
cancelReason: e
})
}
}, {
key: "onSelectSubscription",
value: function(e) {
var t = e.subscription;
this.setState({
selected: t,
cancelReason: null
})
}
}, {
key: "onDeselectSubscription",
value: function() {
this.setState({
selected: null ,
cancelReason: null
})
}
}]),
e
}();
t["default"] = l["default"].createStore(d, "SubscriptionsStore"),
e.exports = t["default"]
},
251: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(13)
, s = n(3).locale
, r = n(66)
, a = n(403)
, o = n(183)
, l = n(1060)
, u = n(47)
, c = t.View.extend({
className: "v-reset-token-form",
events: {
"submit form": "_eSubmit",
"click .btn-back": "_eBack"
},
initialize: function() {
this._email = this.addView(new a({
type: "email",
name: "email",
value: "",
placeholder: s.login.dropdown.reset.email,
className: "frm-field-wrapper error-left",
autoFocus: !0
}), "email"),
this._submit = this.addView(new o({
type: "submit",
text: s.login.dropdown.reset.submit,
onClick: this._eSubmit.bind(this)
}), "submit")
},
render: function() {
this.el.innerHTML = l({
i18n: s
}),
this.dom.form = this.el.querySelector(".reset-token-form"),
this.dom.success = this.el.querySelector(".reset-token-success"),
this.el.removeChild(this.dom.success);
var e = this.dom.form.querySelector("form");
return e.appendChild(this.getView("email").render().el),
e.appendChild(this.getView("submit").render().el),
this
},
reset: function() {
this._toggleForm(!0),
this._email.resetError()
},
setDisabled: function(e) {
var t = this.getView("email");
t.setDisabled(e)
},
_validateEmail: function() {
return this._email.resetError(),
0 === this._email.getValue().trim().length ? (this._email.setError(s.app.error.default_form_field_required),
!1) : this._email.getValue().indexOf("@") < 1 ? (this._email.setError(s.error.invalid_email),
!1) : !0
},
_toggleForm: function(e) {
e ? (this.el.appendChild(this.dom.form),
this.el.removeChild(this.dom.success)) : (this.el.removeChild(this.dom.form),
this.el.appendChild(this.dom.success))
},
_requestToken: function() {
var e = this;
this._submit.setState("loading"),
i.track("Request Password Reset"),
r.requestResetToken(this._email.getValue()).then(function() {
i.track("Request Password Reset Send"),
e._toggleForm(!1),
u.saveToCookie()
}, function(t) {
i.track("Request Password Failed"),
404 === t.status ? e._email.setError(s.login.reset_token_not_found) : e._email.setError(s.login.reset_token_fail)
}).fin(function() {
e._submit.resetState()
})
},
_eSubmit: function(e) {
e.preventDefault(),
this._email.el.blur(),
this._validateEmail() && this._requestToken()
},
_eBack: function() {
this.options.back()
},
focus: function() {
this._email && this._email.el.querySelector("input") && this._email.el.querySelector("input").focus()
}
});
return c
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
252: function(e, t, n) {
var i, s = n(53)["default"];
i = function(e) {
"use strict";
var t = n(4)
, i = n(5)
, r = n(25)
, a = n(234)
, o = n(3).locale
, l = n(3).translate
, u = t.View.extend({
defaultClassName: "v-form",
errorClass: "s-error",
validatedClass: "s-validated",
fields: {},
fieldNames: {},
fieldErrors: {},
drawErrorFields: !0,
validators: {},
defaultEvents: {
"submit form": "_ePreventDefault",
"click .btn-submit.s-inactive": "_ePreventDefault",
"submit form:not(.s-inactive):not(.s-loading)": "_eSubmit",
"click .btn-submit:not(.s-inactive):not(.s-loading)": "_eSubmit",
"keypress form": "_eSubmitOnKeyPress",
"focusin .inp": "_eInputFocus",
"focusout .inp": "_eInputChange",
"change .inp": "_eInputChange"
},
constructor: function() {
this.applyDefaultEvents(),
this.listenTo(this, "validationError", this._eValidationError),
this.listenTo(this, "validated", this._eValidated),
t.View.apply(this, arguments)
},
getModelKey: function(e) {
for (var t in this.fields)
if (this.fields[t] === e)
return t
},
afterUnload: function() {
t.View.prototype.afterUnload.apply(this, arguments)
},
getValue: function(e) {
return e ? this.isCheckboxOrRadio(e) ? this.getCheckboxValue(e) : e.value : void 0
},
isCheckboxOrRadio: function(e) {
return e.getAttribute("type") && e.getAttribute("type").toLowerCase().match(/radio|checkbox/)
},
getCheckboxValue: function(e) {
var t = e.getAttribute("name")
, n = !1;
return i.each(this.el.querySelectorAll(".inp[name=" + t + "]"), function(e) {
n = e.checked ? e.value : n
}),
n
},
getRadioValue: function(e) {
return this.getCheckboxValue(e)
},
isValid: function(e) {
for (var t = r.defer(), n = [], i = 0; i < e.length; i++) {
var s = e[i];
if (this.model.isValid([s])) {
if (this.validators[s]) {
var a = this.validators[s].call(this, this.model.get(s));
r.when(a).fail(t.reject).done(),
n.push(a)
}
} else
t.reject(new Error("Unable to validate form"))
}
return r.all(n).then(t.resolve).done(),
t.promise
},
validateInput: function(e) {
var t, n, s, r = this, a = {};
if (e && this.fields) {
if (n = this.getValue(e),
s = e.getAttribute("name"),
t = this.getModelKey(s),
!t)
return void this.isComplete();
this.model.get(t) !== n && this.model.set(t, n),
this.isValid([t]).then(this._removeError.bind(this, e), function(o) {
r.model.validStates[t] = !1,
e.classList.remove(r.validatedClass),
e.classList.add(r.errorClass),
r.drawErrorFields && ("password" === t ? i.extend(a, {
password: r._getPasswordStrengthError(n)
}) : o && i.extend(a, o),
r._drawErrorFields([s], a))
}).done(function() {
r.isComplete()
})
}
},
_getPasswordStrengthError: function(e) {
var t = o.app.error.default_form_field_validation;
return a.getScore(e) === a.SHORT && (t = o.error.password_too_short),
t
},
_eInputFocus: function(e) {
this._removeError(e.delegateTarget)
},
_eInputChange: function(e) {
var t = e.delegateTarget;
t && this.getValue(t) && this.validateInput(t)
},
_removeError: function(e) {
e.classList.remove(this.errorClass),
e.classList.add(this.validatedClass),
this.drawErrorFields && this._removeErrorField(name),
this.el && !this.el.querySelector("." + this.errorClass) && this.removeState("error")
},
_ePreventDefault: function(e) {
e.preventDefault(),
e.stopPropagation()
},
_eSubmitOnKeyPress: function(e) {
var t = e.delegateTarget;
return "TEXTAREA" === t.tagName || 10 !== e.which && 13 !== e.which ? !0 : (this._eSubmit(e),
!1)
},
_eSubmit: function(e) {
var t, n = e.delegateTarget;
e.preventDefault(),
n.classList.contains("btn") ? t = n : "FORM" === n.tagName && (t = n.querySelector(".btn-submit")),
t && t.classList.add("s-loading"),
this.removeState("error"),
this.parseForm()
},
_eValidated: function() {},
_eValidationError: function(e) {
this.drawErrorFields && this._drawErrorFields(e);
var t = this.el.querySelector(".btn.s-loading");
t && t.classList.remove("s-loading"),
this.setState("error")
},
fillForm: function(e) {
var t, n;
e = e ? e : this.model.attributes;
for (var i in e)
t = this.el.querySelector(".inp[name=" + i + "]"),
t.getAttribute("type").toLowerCase().match(/radio|checkbox/) ? (n = this.el.querySelector(".inp[name=" + i + "][value=" + e[i] + "]"),
n && n.setAttribute("checked", "checked")) : t.value = e[i]
},
parseForm: function(e) {
var t = this;
e = e ? e : this.fields;
for (var n in e) {
var i = e[n]
, r = this.el.querySelector(".inp[name=" + i + "]");
if (r) {
var a = this.getValue(r);
this.model.set(n, a)
}
}
this.options && this.options.validate === !1 || this.isValid(s(e)).then(function() {
t.trigger("validated")
}, function() {
var n, i = t.model.invalidAttributes(e), s = [];
for (var r in i) {
n = e[i[r]],
s.push(n);
var a = t.el.querySelector(".inp[name=" + n + "]");
a && (a.classList.add(t.errorClass),
a.classList.remove(t.validatedClass),
t._drawErrorFields([n]))
}
t.trigger("validationError", s)
}).done()
},
_drawErrorFields: function(e, t) {
for (var n = {}, s = 0; s < e.length; s++) {
var r = e[s]
, a = this.fieldNames[r] ? this.fieldNames[r]() : null ;
t && t[r] ? n[r] = t[r] : this.model.required && this.model.required[r] && !this.model.get(this.getModelKey(r)) ? this.fieldErrors[r] && this.fieldErrors[r].required ? n[r] = this.fieldErrors[r].required : a ? n[r] = l("app.error.named_form_field_required", a.toLowerCase()) : -1 !== this.className.indexOf("pane refund") ? n[r] = o.refund.no_reason : n[r] = o.app.error.default_form_field_required : this.fieldErrors[r] && this.fieldErrors[r].validation ? n[r] = this.fieldErrors[r].validation() : a ? n[r] = l("app.error.named_form_field_validation", i.capitalize(a)) : n[r] = o.app.error.default_form_field_validation
}
for (var u in n)
this._drawErrorField(u, n[u])
},
_drawErrorField: function(e, t) {
var n = arguments.length <= 2 || void 0 === arguments[2] ? !1 : arguments[2]
, i = this.el.querySelector(".inp[name=" + e + "]");
this._removeErrorField(e);
var s = document.createElement("div");
s.setAttribute("data-field", e),
s.className = "error-message",
n ? s.innerHTML = t : s.textContent = t,
i.parentNode.appendChild(s),
setTimeout(function() {
s.classList.add("visible")
})
},
_removeErrorField: function(e) {
if (!e)
return this._removeAllErrorFields();
var t = this.el.querySelector(".error-message[data-field=" + e + "]");
t && t.parentNode.removeChild(t)
},
_removeAllErrorFields: function() {
this.el && i.each(this.el.querySelectorAll(".error-message"), function(e) {
e.parentNode.removeChild(e)
})
},
isComplete: function() {
var e, t = !0;
if (this.model)
for (var n in this.model.required)
if (this.model.required[n] && (e = this.el.querySelector(".inp[name=" + this.fields[n] + "]"),
e && (!this.getValue(e) || -1 !== this.model.invalidAttributes().indexOf(n)))) {
t = !1;
break
}
return t ? this.trigger("formComplete") : this.trigger("formIncomplete"),
t
},
enableSubmitButton: function(e) {
e = "string" == typeof e ? e : null ;
var t = this.el.querySelector(e || ".btn-submit");
t && t.classList.remove("s-inactive")
},
disableSubmitButton: function(e) {
e = "string" == typeof e ? e : null ;
var t = this.el.querySelector(e || ".btn-submit");
t && t.classList.add("s-inactive")
}
});
return u
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
253: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(5)
, i = n(8).keyCode
, s = n(16)
, r = n(357)
, a = n(858)
, o = n(405)
, l = a.extend({
defaultClassName: "v-overlay",
viewDirector: new r({
viewType: "overlay"
}),
initialize: function(e) {
this.options = t.extend(this.options, e),
this._closeByClickEnabled = !this.options.disableClose;
var n = this._closeByClickEnabled && !this.options.disableOverlayClose;
this._closeByClickOverlayEnabled = n
},
constructor: function() {
l.__super__.defaultClassName && (this.defaultClassName = t.sprintf("%s %s", l.__super__.defaultClassName, this.defaultClassName)),
a.apply(this, arguments)
},
render: function(e) {
return e && e.length || this.options.ignoreCloseView || this.options.closeView === !1 || this.addView(new o, "close"),
a.prototype.render.apply(this, arguments)
},
display: function() {
a.prototype.display.apply(this, arguments),
this.viewDirector.openView(this)
},
afterLoadOrWake: function() {
this.addEventListener(this.options.main, "click", this._eCloseByClick.bind(this)),
this.addEventListener(this.options.main, "mousedown", this._eStartClick.bind(this)),
s.embedded || this.addEventListener(window, "keyup", this._eCloseByKey.bind(this))
},
afterWake: function() {
this.afterLoadOrWake(),
a.prototype.afterWake.apply(this, arguments)
},
afterLoad: function() {
this.afterLoadOrWake(),
a.prototype.afterLoad.apply(this, arguments)
},
_eCloseByKey: function(e) {
if (!e.ctrlKey && e.keyCode === i.ESC && this._closeByClickEnabled) {
var t = document.activeElement;
if (t && t.form && t.blur)
return void t.blur();
e.stopPropagation(),
e.preventDefault(),
this._close()
}
},
_eStartClick: function(e) {
e.currentTarget === e.target && (this._overlayClick = !0)
},
_eCloseByClick: function(e) {
var t = this._closeByClickEnabled && this._closeByClickOverlayEnabled;
e.currentTarget === e.target && this._overlayClick && t && (this._close(),
this._overlayClick = !1)
},
_close: function() {
var e = this.getController();
this.options.onClose ? this.options.onClose(e) : e.close()
},
setCloseByClickEnabled: function(e) {
this._closeByClickEnabled = e
}
});
return l
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
265: function(e, t, n) {
var i = n(40)("match");
e.exports = function(e) {
var t = /./;
try {
"/./"[e](t)
} catch (n) {
try {
return t[i] = !1,
!"/./"[e](t)
} catch (s) {}
}
return !0
}
},
266: [5944, 95],
267: [5947, 269, 14, 73, 85, 60, 153, 430, 154, 29, 40],
268: [5948, 40],
269: function(e, t) {
e.exports = !1
},
270: function(e, t) {
e.exports = Math.expm1 || function(e) {
return 0 == (e = +e) ? e : e > -1e-6 && 1e-6 > e ? e + e * e / 2 : Math.exp(e) - 1
}
},
271: function(e, t) {
e.exports = Math.sign || function(e) {
return 0 == (e = +e) || e != e ? e : 0 > e ? -1 : 1
}
},
272: [5955, 29, 36, 39, 83],
273: [5959, 156, 84],
274: function(e, t, n) {
var i = n(428)
, s = n(84);
e.exports = function(e, t, n) {
if (i(t))
throw TypeError("String#" + n + " doesn't accept regex!");
return String(s(e))
}
},
305: function(e, t, n) {
"use strict";
var i = n(4)
, s = i.Model.extend({
required: {
email: !0,
password: !1
},
expressions: {
email: /^.+@.+\..+$/,
password: /^.+$/
}
});
e.exports = s
},
306: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(33)
, o = i(a)
, l = n(137)
, u = i(l)
, c = n(20)
, d = i(c)
, p = n(3);
t["default"] = r["default"].createClass({
displayName: "NewsletterSignUpSuccessDialogue",
propTypes: {
onClose: r["default"].PropTypes.func.isRequired
},
render: function() {
return r["default"].createElement(o["default"], {
className: "newsletter-signup-done-dialog",
hideClose: !0,
onClose: this.props.onClose
}, r["default"].createElement("div", {
className: "head"
}, r["default"].createElement(u["default"], {
className: "confetti"
}, r["default"].createElement("h1", null , (0,
p.translate)("campaigns.newsletter.success_title")), r["default"].createElement("p", null , (0,
p.translate)("campaigns.newsletter.success_message")), r["default"].createElement("p", null , (0,
p.translate)("campaigns.newsletter.success_message_browse"))), r["default"].createElement("div", {
className: "fade"
})), r["default"].createElement(d["default"], {
className: "btn-continue",
onClick: this.props.onClose
}, (0,
p.translate)("campaigns.newsletter.view_selection")))
}
}),
e.exports = t["default"]
},
307: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(5)
, i = n(4)
, s = i.View.extend({
defaultClassName: "v-form",
_expressions: {},
_modelValidationFields: [],
addModelValidation: function(e, n) {
t.each(n, function(t) {
this.addModelValidationField(e, t)
}, this)
},
addModelValidationField: function(e, t) {
this._modelValidationFields.push({
field: t,
model: e
})
},
validateFieldsAndShowErrors: function(e) {
t.each(e || this.el.querySelectorAll(".inp-text"), function(e) {
this.validateFieldAndShowError(e)
}, this)
},
validateFieldAndShowError: function(e) {
var t = e.getAttribute("name");
this._validateField(e) ? this._removeErrorField(t) : this._drawErrorField(t, "Wil je hier iets invullen?")
},
_validateFields: function() {
var e = this.el.querySelectorAll(".inp-text")
, n = t.map(e, this._validateField, this);
return !!t.every(n)
},
_validateField: function(e) {
var n = e.getAttribute("name")
, i = this._expressions[n]
, s = t.findWhere(this._modelValidationFields, {
field: e
});
if (s)
return !!s.model.isValid(e);
if (i) {
var r = new RegExp(this._expressions[n]);
return !!r.test(e.value)
}
},
_drawErrorField: function(e, t) {
var n = arguments.length <= 2 || void 0 === arguments[2] ? !1 : arguments[2]
, i = this.el.querySelector(".inp[name=" + e + "]");
this._removeErrorField(e);
var s = document.createElement("div");
s.setAttribute("data-field", e),
s.className = "error-message",
n ? s.innerHTML = t : s.textContent = t,
i.parentNode.appendChild(s),
setTimeout(function() {
s.classList.add("visible")
})
},
_removeErrorField: function(e) {
var t = ".error-message";
e && (t += "[data-field=" + e + "]");
var n = this.el.querySelector(t);
n && n.parentNode.removeChild(n)
}
});
return s
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
311: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(19)
, o = r(a)
, l = n(16)
, u = r(l)
, c = n(118)
, d = r(c)
, p = n(170)
, f = r(p)
, h = n(533)
, m = r(h)
, g = n(4)
, v = n(35)
, y = r(v)
, _ = n(13)
, b = r(_)
, w = n(369)
, S = r(w)
, k = ["b:tiles", "b:item", "b:pin", "b:acquisition", "b:issue-acquisition", "manifest", "b:search-context"]
, E = function() {
function e() {
s(this, e),
this.generateActions("fetchAlertsSuccess", "fetchAlertsError", "fetchResultsSuccess", "fetchResultsError", "setAlert", "addAlertError", "deleteAlertSuccess")
}
return i(e, [{
key: "fetchAlerts",
value: function(e, t) {
var n = this
, i = arguments.length <= 2 || void 0 === arguments[2] ? !1 : arguments[2];
return function(s) {
s({
userId: e
});
var r = new m["default"];
r.fetch({
url: u["default"].getLink("alerts", {
user_id: e
}),
params: {
amount: 100,
page: 1
}
}).then(function() {
if (n.fetchAlertsSuccess(r),
i)
return n.fetchResultsSuccess({
results: new f["default"](null ,{
track: !0
}),
query: t
});
if (!r.models.length)
return n.fetchResultsSuccess({
results: new f["default"](null ,{
track: !0
}),
query: t
}),
g.history.navigate("alerts/manage/new", {
trigger: !0
});
var e = void 0;
if (t ? e = r.findWhere({
query: t
}) : (b["default"].track("View Alerts"),
e = r.findWhere({
id: 0
})),
!e)
return n.fetchAlertsError({
error: new y["default"](404)
});
n.setAlert(e);
var s = new f["default"](null ,{
track: !0
});
s.fetch({
url: e.getLink("results", {}, k),
accept: "application/hal+json"
}).then(function() {
n.fetchResultsSuccess({
results: s,
query: t
})
})
})["catch"](function(e) {
n.fetchAlertsError({
error: e
})
})
}
}
}, {
key: "fetchResults",
value: function(e) {
var t = this;
if (e)
return b["default"].track("Try Alert", {
query: e.toLowerCase()
}),
function(n) {
n(e);
var i = u["default"].getLink("search", {
query: e
}, k)
, s = new f["default"](null ,{
track: !0
});
s.fetch({
url: i,
accept: "application/hal+json"
}).then(function() {
t.fetchResultsSuccess({
results: s,
query: e
})
})
}
}
}, {
key: "fetchNextResults",
value: function(e) {
var t = this;
return function(n) {
e instanceof d["default"] && e.hasNext() && !e.isFetching() && (n(),
e.fetchNext().then(function() {
t.fetchResultsSuccess({
results: e
})
}))
}
}
}, {
key: "setSearchQuery",
value: function(e) {
return function(t) {
t(e)
}
}
}, {
key: "addAlert",
value: function(e, t) {
var n = this;
t && (b["default"].track("Alert Add", {
alert: t.toLowerCase()
}),
S["default"].add(e, t).then(function() {
g.history.navigate("alerts/" + encodeURIComponent(t.toLowerCase()), {
trigger: !0
})
})["catch"](function(e) {
n.addAlertError({
error: e
})
}))
}
}, {
key: "editAlert",
value: function(e, t) {
e && e.save(t).then(function() {
g.history.navigate("alerts/" + encodeURIComponent(e.get("query")), {
trigger: !0
})
})
}
}, {
key: "deleteAlert",
value: function(e) {
var t = this;
e && (b["default"].track("Alert Remove", {
alert: e.get("query").toLowerCase()
}),
e.destroy().then(function() {
g.history.navigate("alerts", {
trigger: !0
}),
t.deleteAlertSuccess()
}))
}
}]),
e
}();
t["default"] = o["default"].createActions(E),
e.exports = t["default"]
},
312: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(19)
, o = r(a)
, l = n(66)
, u = r(l)
, c = n(65)
, d = r(c)
, p = function() {
function e() {
s(this, e),
this.generateActions("changeEmailSuccess", "changeEmailError", "resendConfirmationEmailSuccess", "resendConfirmationEmailError")
}
return i(e, [{
key: "resetState",
value: function() {
return {}
}
}, {
key: "changeEmail",
value: function(e, t) {
var n = this;
d["default"].emailIsAvailable(e).then(function() {
return t.saveProperty("email", e)
}).then(function() {
n.changeEmailSuccess({
email: e
})
})["catch"](function(t) {
n.changeEmailError({
error: t,
email: e
})
})
}
}, {
key: "resendConfirmationEmail",
value: function(e) {
var t = this;
return u["default"].resendConfirmationEmail(e).then(function() {
t.resendConfirmationEmailSuccess()
})["catch"](function(e) {
t.resendConfirmationEmailError({
error: e
})
}),
{
userId: e
}
}
}]),
e
}();
t["default"] = o["default"].createActions(p),
e.exports = t["default"]
},
313: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(19)
, o = r(a)
, l = n(8)
, u = n(13)
, c = r(u)
, d = n(35)
, p = r(d)
, f = n(370)
, h = function() {
function e() {
s(this, e)
}
return i(e, [{
key: "redeem",
value: function(e, t) {
var n = this;
return function(i) {
i({
code: e
}),
(0,
f.validateCoupon)(e).then(function() {
return t ? void (0,
f.redeemCoupon)(e, t).then(function(e) {
n.redeemSuccess({
data: e
})
})["catch"](function(e) {
var t = [l.COUPON_INVALID, l.COUPON_REDEEMED, l.COUPON_EXCEEDED_MAX, l.COUPON_EXPIRED, l.COUPON_NEW_USERS_ONLY];
if (!t.includes(e.type))
throw e;
n.redeemError({
error: e
})
}) : void n.redeemError({
error: new p["default"](l.AUTH_REQUIRED)
})
})["catch"](function(e) {
n.redeemError({
error: e
})
})
}
}
}, {
key: "redeemSuccess",
value: function(e) {
var t = e.data;
return c["default"].track("Redeem Coupon: Success", {
type: "coupon-deeplink"
}),
{
data: t
}
}
}, {
key: "redeemError",
value: function(e) {
var t = e.error;
return c["default"].track("Redeem Coupon: Failed", {
type: "coupon-deeplink",
reason: t.type
}),
{
error: t
}
}
}]),
e
}();
t["default"] = o["default"].createActions(h),
e.exports = t["default"]
},
314: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(19)
, o = r(a)
, l = n(90)
, u = r(l)
, c = n(16)
, d = r(c)
, p = function() {
function e() {
s(this, e),
this.generateActions("fetchLatestIssueSuccess")
}
return i(e, [{
key: "fetchLatestIssue",
value: function(e) {
var t = this
, n = d["default"].get("links").latest_issue.href.replace("{provider_id}", e)
, i = new u["default"](null ,{
url: n
});
return i.fetch().then(function() {
return t.fetchLatestIssueSuccess(i)
}),
null
}
}]),
e
}();
t["default"] = o["default"].createActions(p),
e.exports = t["default"]
},
315: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(146)["default"]
, a = n(24)["default"]
, o = n(1)["default"]
, l = n(145)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(19)
, c = o(u)
, d = n(13)
, p = o(d)
, f = n(664)
, h = l(f)
, m = n(8)
, g = n(118)
, v = o(g)
, y = function() {
function e() {
s(this, e),
this.generateActions("fetchResultsSuccess", "fetchResultsError", "fetchNextResultsSuccess", "fetchNextResultsError")
}
return i(e, [{
key: "fetchResults",
value: function(e, t) {
var n = this
, i = arguments.length <= 2 || void 0 === arguments[2] ? null : arguments[2];
return function(s) {
var o = {
keyword: e,
locale: t,
date: i
};
s({
query: o
}),
p["default"].track("Search", {
query: e.toLowerCase()
}),
a.all([h.fetchItems(e, t, i), h.fetchProvidersIssue(e, t, 6)]).then(function(e) {
var t = r(e, 2)
, i = t[0]
, s = t[1];
n.fetchResultsSuccess({
query: o,
issues: s,
items: i
})
})["catch"](function(e) {
if (e.type === m.XHR_STATUS)
return n.fetchResultsError({
query: o,
error: e
});
throw e
})
}
}
}, {
key: "fetchNextResults",
value: function(e) {
var t = this;
return function(n) {
e instanceof v["default"] && e.hasNext() && !e.isFetching() && (n(),
e.fetchNext().then(function() {
t.fetchNextResultsSuccess({
items: e
})
})["catch"](function(e) {
if (e.type !== m.STATUS_PENDING) {
if (e.type === m.XHR_STATUS)
return void t.fetchNextResultsError({
error: e
});
throw e
}
}))
}
}
}]),
e
}();
t["default"] = c["default"].createActions(y),
e.exports = t["default"]
},
316: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(19)
, o = r(a)
, l = n(66)
, u = r(l)
, c = n(8)
, d = function() {
function e() {
s(this, e),
this.generateActions("fetchUserDetailsSuccess", "fetchUserDetailsError")
}
return i(e, [{
key: "fetchUserDetails",
value: function(e) {
var t = this;
return function(n) {
n({
userId: e
}),
u["default"].getUser(e).then(function(n) {
t.fetchUserDetailsSuccess({
userId: e,
data: n
})
})["catch"](function(n) {
if (n.type === c.XHR_STATUS && 404 === n.status)
return t.fetchUserDetailsError({
userId: e
});
throw n
})
}
}
}]),
e
}();
t["default"] = o["default"].createActions(d),
e.exports = t["default"]
},
317: function(e, t, n) {
"use strict";
var i = n(4)
, s = n(121)
, r = i.Collection.extend({
model: s,
key: "_embedded.b:posts",
parse: function(e) {
return e.count && (this.total = e.count),
this.parseHal(e)
},
getPostByUserId: function(e) {
return this.find(function(t) {
return t.getEmbedded("b:user").id === e ? t : void 0
})
}
});
e.exports = r
},
318: function(e, t, n) {
"use strict";
var i = n(5)
, s = n(4)
, r = n(91)
, a = s.Collection.extend({
model: r,
type: "items",
key: "_embedded.items",
parse: function(e) {
return e.total && (this.total = e.total),
this.options.exclude && (e._embedded.items = i.filter(e._embedded.items, function(e) {
return e.id !== this.options.exclude
}, this)),
this.parseHal(e)
},
comparator: function(e) {
return -e.get("date")
}
});
e.exports = a
},
319: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(4)
, r = i(s)
, a = n(16)
, o = i(a)
, l = n(670)
, u = i(l)
, c = r["default"].Collection.extend({
model: u["default"],
key: "_embedded.notifications",
constructor: function(e) {
this.userId = e,
r["default"].Collection.call(this)
},
comparator: function(e) {
return -e.id
},
parse: function(e) {
return this.parseHal(e)
},
sync: function(e, t, n) {
return this.urlTemplate = o["default"].get("links").user_notifications.href,
t.url = this.urlTemplate.replace("{user_id}", this.userId),
r["default"].Collection.prototype.sync.call(this, e, t, n)
}
});
t["default"] = c,
e.exports = t["default"]
},
321: function(e, t, n) {
"use strict";
var i = n(1)["default"]
, s = n(2)
, r = i(s)
, a = n(13)
, o = i(a)
, l = n(12)
, u = i(l)
, c = n(77)
, d = i(c)
, p = n(20)
, f = i(p)
, h = n(11)
, m = i(h)
, g = n(30)
, v = i(g)
, y = n(374)
, _ = i(y)
, b = n(17)
, w = i(b)
, S = n(86)
, k = i(S)
, E = n(28)
, C = i(E)
, T = r["default"].createClass({
displayName: "Cover",
mixins: [k["default"]],
propTypes: {
issue: r["default"].PropTypes.object.isRequired,
onLoad: r["default"].PropTypes.func
},
render: function() {
var e, t;
return u["default"].getUser() && (t = (0,
m["default"])({
favourite: !0,
"l-favourite": this.props.issue.get("favourite")
}),
e = r["default"].createElement(f["default"], {
className: t,
onClick: this._toggleFavourite
})),
r["default"].createElement("div", {
className: "v-cover cover-image"
}, r["default"].createElement(C["default"], {
href: "/issue/" + this.props.issue.get("provider").id + "/" + this.props.issue.id
}, r["default"].createElement(d["default"], {
animate: w["default"].isDesktop(),
src: this.props.issue.getCoverURL(),
width: this.props.issue.getCoverWidth(),
height: this.props.issue.getCoverHeight(),
onLoad: this.props.onLoad
})), e)
},
_toggleFavourite: function(e) {
var t = this;
e.preventDefault();
var n = this.props.issue.get("provider").id
, i = {
type: "kiosk",
issue_id: this.props.issue.id,
provider: v["default"].getProviderOrDefault(n).get("name")
};
this.props.issue.get("favourite") ? _["default"].unfavorite(u["default"].getUser(), n).then(function() {
o["default"].track("Remove Favorite", i),
t.props.issue.set("favourite", !1),
t.forceUpdate()
}).done() : _["default"].favorite(u["default"].getUser(), n).then(function() {
o["default"].track("Add Favorite", i),
t.props.issue.set("favourite", !0),
t.forceUpdate()
}).done()
}
});
e.exports = T
},
322: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(11)
, o = i(a)
, l = r["default"].createClass({
displayName: "LoadingView",
propTypes: {
center: r["default"].PropTypes.bool,
square: r["default"].PropTypes.bool
},
render: function() {
var e = (0,
o["default"])("v-loading", {
center: this.props.center
}, {
square: this.props.square
});
return r["default"].createElement("div", {
className: e
})
}
});
t["default"] = l,
e.exports = t["default"]
},
323: function(e, t, n) {
"use strict";
var i = n(17)
, s = n(2)
, r = n(86)
, a = n(91)
, o = n(102)
, l = n(326)
, u = s.createClass({
displayName: "ManifestPopover",
mixins: [r],
getInitialState: function() {
return {
item: null
}
},
componentDidMount: function() {
var e = this
, t = new a({
id: this.props.item.id
},{
track: !0
});
t.fetch().then(function() {
e.isMounted() && e.setState({
item: t
})
})
},
_onScroll: function(e) {
var t = "Android Browser" === window.BrowserDetect.browser;
t && parseFloat(window.BrowserDetect.version) <= 4.3 || this.props.onClose(e)
},
render: function() {
return this.state.item ? s.createElement(l, {
layout: "manifest",
x: this.props.x,
y: this.props.y,
offset: 20,
mobile: i.isMobile(),
viewportOffsetTop: 112,
viewportOffsetBottom: 0,
viewportOffsetLeft: 40,
viewportOffsetRight: 40,
onClose: this.props.onClose,
onScroll: this._onScroll,
onMouseEnter: this.props.onMouseEnter,
onMouseLeave: this.props.onMouseLeave
}, s.createElement(o, {
item: this.state.item,
analytics: {
type: this.props.from
},
hideImage: !0,
showButton: i.isMobile()
})) : s.createElement("span", null )
}
});
e.exports = u
},
324: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(26)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(2)
, c = l(u)
, d = n(566)
, p = l(d)
, f = n(356)
, h = l(f)
, m = n(3)
, g = n(18)
, v = l(g)
, y = n(11)
, _ = l(y)
, b = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "_getTitle",
value: function(e) {
return (0,
m.translate)("post.posted_at", [e.get("full_name"), (0,
v["default"])(this.props.post.get("created_at")).format("LLLL")])
}
}, {
key: "_renderUserName",
value: function() {
var e = this.props.post.getEmbedded("b:manager")
, t = this.props.post.getEmbedded("b:user")
, n = t;
return e && (n = e),
c["default"].createElement("span", null , c["default"].createElement(p["default"], {
user: n,
title: this._getTitle(n)
}))
}
}, {
key: "_renderText",
value: function() {
var e = this.props.post.get("text");
if (!e)
return !1;
var t = (0,
h["default"])(this.props.post.get("text"));
return c["default"].createElement("div", {
className: "text",
dangerouslySetInnerHTML: {
__html: t
}
})
}
}, {
key: "render",
value: function() {
var e, t = (0,
_["default"])((e = {},
o(e, this.props.className, this.props.className),
o(e, "v-mini-post", !0),
e));
return c["default"].createElement("div", {
className: t
}, this._renderText(), c["default"].createElement("div", {
className: "user"
}, this._renderUserName()))
}
}], [{
key: "propTypes",
value: {
post: c["default"].PropTypes.object.isRequired,
className: c["default"].PropTypes.string
},
enumerable: !0
}]),
t
}(c["default"].Component);
t["default"] = b,
e.exports = t["default"]
},
325: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(3)
, o = n(11)
, l = i(o)
, u = n(28)
, c = (i(u),
n(12))
, d = i(c)
, p = n(115)
, f = i(p)
, h = r["default"].createClass({
displayName: "PinButton",
propTypes: {
onChange: r["default"].PropTypes.func,
item: r["default"].PropTypes.object.isRequired,
analytics: r["default"].PropTypes.object.isRequired,
marked: r["default"].PropTypes.bool,
hideText: r["default"].PropTypes.bool
},
_onClick: function(e) {
var t = this;
e.preventDefault();
var n = !this.props.marked;
f["default"].pinItem(d["default"].getUser(), this.props.item, n, this.props.analytics),
this.props.onChange && this.props.onChange(n),
this.props.item.getRelation("b:pin").then(function(e) {
e.set("pinned", n),
t.props.item.trigger("change", t.props.item)
})
},
_renderText: function() {
return this.props.hideText ? void 0 : (0,
a.translate)("app.pin.button")
},
render: function() {
var e = (0,
l["default"])({
icon: !0,
marked: this.props.marked
});
return r["default"].createElement("a", {
className: "btn-pin",
onClick: this._onClick
}, r["default"].createElement("span", {
className: e
}), this._renderText())
}
});
t["default"] = h,
e.exports = t["default"]
},
326: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(2)
, r = n(117)
, a = n(8).keyCode
, o = n(11)
, l = s.createClass({
displayName: "PortalPopover",
mixins: [r("popover-portal")],
getDefaultProps: function() {
return {
x: 0,
y: 0,
viewport: window,
mobile: !1
}
},
getInitialState: function() {
return {
x: 0,
y: 0,
vertical: "left",
horizontal: "top"
}
},
componentWillMount: function() {
this.setState({
x: this.props.x,
y: this.props.y,
offset: 0,
viewportOffsetTop: 0,
viewportOffsetBottom: 0,
viewportOffsetLeft: 0,
viewportOffsetRight: 0
})
},
componentDidMount: function() {
this.props.mobile || this.setState(this.getDimensions()),
window.addEventListener("touchstart", this._considerClose),
window.addEventListener("keyup", this._eKeyUp)
},
componentWillUnmount: function() {
window.removeEventListener("touchstart", this._considerClose),
window.removeEventListener("keyup", this._eKeyUp)
},
_eKeyUp: function(e) {
e.ctrlKey || e.keyCode === a.ESC && this._close()
},
_considerClose: function(e) {
var t = this.getLayerDOMNode();
e.target === t || t.contains(e.target) || this._close()
},
_close: function() {
this.props.onClose && this.props.onClose(),
this.unrenderLayer()
},
getDimensions: function() {
var e = this.getViewportBoundingRect()
, t = e.top + this.props.viewportOffsetTop
, n = e.bottom - this.props.viewportOffsetBottom
, i = e.left + this.props.viewportOffsetLeft
, s = e.right - this.props.viewportOffsetRight
, r = this.getLayerDOMNode().getBoundingClientRect()
, a = parseInt(this.getLayerDOMNode().offsetWidth, 10)
, o = parseInt(this.getLayerDOMNode().offsetHeight, 10)
, l = r.top
, u = r.bottom
, c = r.left
, d = r.right
, p = c + this.props.offset
, f = l + this.props.offset;
return o > n - t && (o = n - t,
u = l + o),
a > s - i && (a = s - i,
d = c + a),
t > l && (f = t),
u > n && (f = n - o - this.props.offset),
i > c && (p = i + this.props.offset),
d > s && (p = Math.min(s - a, p - a - 2 * this.props.offset)),
{
x: Math.round(p),
y: Math.round(f),
width: a,
height: o
}
},
getViewportBoundingRect: function() {
return this.props.viewport === window ? {
left: 0,
right: window.innerWidth,
top: 0,
bottom: window.innerHeight
} : this.props.viewport.getBoundingClientRect()
},
render: function() {
return s.createElement("span", null )
},
renderLayer: function() {
var e, t = o(i({
"v-portal-popover": !0
}, "l-" + this.props.layout, this.props.layout)), n = {
position: "fixed",
zIndex: 1e5
};
return this.props.mobile ? (n.top = 0,
n.left = 0,
n.right = 0,
n.bottom = 0,
e = s.createElement("div", {
className: "close-area",
onClick: this.props.onClose
})) : (n.left = this.state.x + "px",
n.top = this.state.y + "px",
this.state.height && (n.height = this.state.height + "px"),
this.state.width && (n.width = this.state.width + "px")),
s.createElement("div", {
className: t,
style: n,
onMouseEnter: this.props.onMouseEnter,
onMouseLeave: this.props.onMouseLeave
}, e, this.props.children)
}
});
e.exports = l
},
327: function(e, t, n) {
"use strict";
var i = n(1)["default"]
, s = n(5)
, r = i(s)
, a = n(2)
, o = i(a)
, l = n(568)
, u = i(l)
, c = n(554)
, d = i(c)
, p = o["default"].createClass({
displayName: "PostFacePile",
propTypes: {
onSelect: o["default"].PropTypes.func.isRequired,
amount: o["default"].PropTypes.number,
activePost: o["default"].PropTypes.oneOfType([o["default"].PropTypes.bool, o["default"].PropTypes.object]),
posts: o["default"].PropTypes.array.isRequired
},
getDefaultProps: function() {
return {
amount: 2
}
},
_onSelectPost: function(e, t) {
this.props.onSelect(e, t)
},
render: function() {
var e = this
, t = this.props.amount;
this.props.posts.length > t && (t -= 1);
var n = r["default"].take(this.props.posts, t)
, i = r["default"].drop(this.props.posts, t)
, s = n.map(function(t) {
return o["default"].createElement(u["default"], {
post: t,
key: t.id,
active: t === e.props.activePost,
onSelect: e._onSelectPost,
showTooltip: !e.props.onSelect
})
})
, a = void 0;
return i.length && (a = o["default"].createElement(d["default"], {
posts: i,
active: i.indexOf(this.props.activePost) > -1
})),
o["default"].createElement("div", {
className: "v-facepile"
}, s, a)
}
});
e.exports = p
},
328: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(15)
, o = i(a)
, l = n(3)
, u = i(l)
, c = n(11)
, d = i(c)
, p = n(171)
, f = i(p)
, h = n(57)
, m = i(h)
, g = n(324)
, v = i(g)
, y = r["default"].createClass({
displayName: "PostsTooltipDropdown",
propTypes: {
posts: r["default"].PropTypes.array.isRequired,
className: r["default"].PropTypes.string
},
mixins: [(0,
m["default"])("#tooltip-portal")],
_timer: null ,
_delayDropdown: function() {
this._clearDelay(),
this._timer = setTimeout(function() {
this.openDropdown(),
this._timer = null
}
.bind(this), 200)
},
_clearDelay: function() {
clearTimeout(this._timer)
},
_closeDropdown: function() {
this._clearDelay(),
this.closeDropdown()
},
_toggleDropdown: function() {
this._clearDelay(),
this.toggleDropdown()
},
_truncateMessage: function(e) {
return 1 === e ? r["default"].createElement("p", null , u["default"].locale.tooltip.one_more) : r["default"].createElement("p", null , u["default"].translate("tooltip.multiple_more", [e]))
},
_setMouseMoveHandler: function() {
var e = this;
window.addEventListener("mousemove", this._doubtClose),
setTimeout(function() {
e.isMounted() && e.refs.tooltip && e.refs.tooltip.getLayerDOMNode() && (e._elementBoundingRect = o["default"].findDOMNode(e).getBoundingClientRect(),
e._tooltipBoundingRect = e.refs.tooltip.getLayerDOMNode().getBoundingClientRect())
})
},
_removeMouseMoveHandler: function() {
this._elementBoundingRect = null ,
this._tooltipBoundingRect = null ,
window.removeEventListener("mousemove", this._doubtClose)
},
_doubtClose: function(e) {
if (!this._elementBoundingRect || !this._tooltipBoundingRect)
return void this._closeDropdown();
var t = e.clientX >= this._elementBoundingRect.left && e.clientX <= this._elementBoundingRect.right && e.clientY >= this._elementBoundingRect.top && e.clientY <= this._elementBoundingRect.bottom
, n = e.clientX >= this._tooltipBoundingRect.left && e.clientX <= this._tooltipBoundingRect.right && e.clientY >= this._tooltipBoundingRect.top && e.clientY <= this._tooltipBoundingRect.bottom;
t || n || this._closeDropdown()
},
componentWillUnmount: function() {
this._removeMouseMoveHandler()
},
render: function() {
var e = (0,
d["default"])([this.props.className, {
"s-open": this.state.open
}])
, t = this.props.posts.sort(function(e) {
return e.get("text") ? -1 : 1
})
, n = void 0;
return this.state.open && !this.props.disabled ? (n = r["default"].createElement(f["default"], {
className: "tooltip",
truncate: this._truncateMessage,
onScroll: this._closeDropdown,
ref: "tooltip",
onClose: this._closeDropdown
}, t.map(function(e) {
return r["default"].createElement(v["default"], {
post: e,
key: e.id
})
})),
this._setMouseMoveHandler()) : this._removeMouseMoveHandler(),
r["default"].createElement("div", {
className: e,
onClick: this.openDropdown,
onMouseEnter: this._delayDropdown,
onMouseLeave: this._doubtClose
}, this.props.children, n)
}
});
t["default"] = y,
e.exports = t["default"]
},
329: function(e, t, n) {
"use strict";
function i(e) {
return (0,
d["default"])("reward-giver", {
"is-blendle": e === p.BLENDLE_COUPON
})
}
var s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(2)
, a = s(r)
, o = n(3)
, l = n(18)
, u = s(l)
, c = n(11)
, d = s(c)
, p = n(8)
, f = n(30)
, h = s(f);
t["default"] = a["default"].createClass({
displayName: "RewardsTable",
propTypes: {
rewards: a["default"].PropTypes.array.isRequired,
hideGivers: a["default"].PropTypes.bool.isRequired
},
_renderGiver: function(e) {
return e ? a["default"].createElement("div", {
className: i(e)
}, (0,
o.translateElement)(a["default"].createElement("span", null ), "dialogues.verified_account.reward.giver", [e], !1)) : null
},
_renderSubscriptionRow: function(e) {
var t = this
, n = u["default"].duration(1e3 * e.subscription_duration).humanize()
, i = h["default"].getProvider(e.provider_uid);
return a["default"].createElement("tr", null , a["default"].createElement("td", null , a["default"].createElement("div", {
className: "reward-content"
}, a["default"].createElement("div", {
className: "reward-label subscription-provider",
onClick: function() {
return t.props.onClickProvider(i.get("id"))
}
}, i.get("name")), this._renderGiver(e.name))), a["default"].createElement("td", null , a["default"].createElement("div", {
className: "reward-content"
}, (0,
o.translateElement)(a["default"].createElement("span", null ), "dialogues.verified_account.reward.subscription", [n], !1))))
},
_renderMoneyRow: function(e) {
return a["default"].createElement("tr", null , a["default"].createElement("td", null , a["default"].createElement("div", {
className: "reward-content"
}, a["default"].createElement("div", {
className: "reward-label"
}, (0,
o.translateElement)(a["default"].createElement("span", null ), "dialogues.verified_account.reward.money", !1)), this._renderGiver(e.name))), a["default"].createElement("td", null , a["default"].createElement("div", {
className: "reward-content"
}, (0,
o.formatCurrency)(e.amount))))
},
_renderRows: function() {
var e = this;
return this.props.rewards.map(function(t) {
return "subscription" === t.reward_type ? e._renderSubscriptionRow(t) : e._renderMoneyRow(t)
})
},
render: function() {
var e = (0,
d["default"])("v-rewards-table", {
"hide-givers": this.props.hideGivers
});
return a["default"].createElement("table", {
className: e
}, a["default"].createElement("tbody", null , this._renderRows()))
}
}),
e.exports = t["default"]
},
330: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(21)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(2)
, c = l(u)
, d = n(112)
, p = l(d)
, f = n(123)
, h = l(f)
, m = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "componentWillMount",
value: function() {
var e = this._getOptions(this.props)
, t = e.options
, n = e.selected;
this._view = new h["default"](t,o({}, this.props, {
selected: n
}))
}
}, {
key: "componentDidUpdate",
value: function(e) {
this.props.selectedLabel && this.props.selectedLabel !== e.selectedLabel && this._view.setSelectedTitle(this.props.selectedLabel, "custom-label");
var t = this._getOptions(this.props)
, n = t.options
, i = t.selected;
e.children && e.children.length === this.props.children.length || this._view.setItems(n),
e.selected !== this.props.selected && this._view.setSelected(i),
this._view.render()
}
}, {
key: "_getOptions",
value: function(e) {
var t = {}
, n = null ;
return c["default"].Children.map(e.children, function(e) {
t[e.props.value] = e.props.children,
e.props.selected && (n = e.props.value)
}),
{
options: t,
selected: n
}
}
}, {
key: "render",
value: function() {
return c["default"].createElement(p["default"], {
view: this._view
})
}
}], [{
key: "propTypes",
value: {
children: c["default"].PropTypes.any,
name: c["default"].PropTypes.string,
selectedLabel: c["default"].PropTypes.string
},
enumerable: !0
}]),
t
}(c["default"].Component);
t["default"] = m,
e.exports = t["default"]
},
331: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(2)
, a = s(r)
, o = n(11)
, l = s(o)
, u = a["default"].createClass({
displayName: "ToggleButton",
propTypes: {
onToggle: a["default"].PropTypes.func.isRequired,
checked: a["default"].PropTypes.bool.isRequired,
className: a["default"].PropTypes.string
},
render: function() {
var e = (0,
l["default"])("l-toggle", "v-checkbox", {
"l-checked": this.props.checked
}, {
"l-unchecked": !this.props.checked
}, i({}, this.props.className, this.props.className));
return a["default"].createElement("div", {
className: e,
onClick: this.props.onToggle
}, a["default"].createElement("div", {
className: "btn-toggle"
}))
}
});
t["default"] = u,
e.exports = t["default"]
},
332: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(573)
, d = o(c)
, p = n(572)
, f = o(p)
, h = n(18)
, m = o(h)
, g = n(11)
, v = o(g)
, y = n(3)
, _ = o(y)
, b = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "componentWillMount",
value: function() {
var e = (0,
m["default"])(this.props.date, "YYYY-MM-DD");
this.setState({
date: this.props.date,
month: this.props.month || e.month() + 1,
year: this.props.year || e.year(),
limitReached: this._limitReached(this.props.date)
})
}
}, {
key: "_onNavigateMonth",
value: function(e, t) {
t.preventDefault(),
t.target.classList.contains("disabled") || this._onChangeMonth(e)
}
}, {
key: "_onChangeMonth",
value: function(e) {
var t = (0,
m["default"])(this.state.date).add(e, "month").startOf("month");
this.setState({
date: t,
year: t.year(),
month: t.month() + 1,
limitReached: this._limitReached(t)
}),
this.props.onChangeMonth(t)
}
}, {
key: "_onSelectDay",
value: function(e) {
this.setState({
selected: e.format("YYYY-MM-DD")
}),
this.props.onSelect(e)
}
}, {
key: "_limitReached",
value: function(e) {
var t = (0,
m["default"])(e).startOf("month").add(1, "months");
return t.isAfter((0,
m["default"])())
}
}, {
key: "render",
value: function() {
var e = this.state.year + "-" + this.state.month + "-1"
, t = (0,
m["default"])(e, "YYYY-MM-DD").format("MMMM, YYYY")
, n = (0,
v["default"])({
"btn-next": !0,
disabled: this.state.limitReached
});
return u["default"].createElement("div", {
className: "v-datepicker s-success"
}, u["default"].createElement("div", {
className: "datepicker-header"
}, u["default"].createElement("a", {
href: "#",
className: "btn-previous",
onClick: this._onNavigateMonth.bind(this, -1)
}, _["default"].translate("elements.datepicker.previous_month")), u["default"].createElement("a", {
href: "#",
className: n,
onClick: this._onNavigateMonth.bind(this, 1)
}, _["default"].translate("elements.datepicker.next_month")), u["default"].createElement("p", {
className: "current-month"
}, t)), u["default"].createElement("table", {
className: "datepicker-body"
}, u["default"].createElement(d["default"], null ), u["default"].createElement(f["default"], {
year: this.state.year,
month: this.state.month,
selected: this.props.date,
onSelect: this._onSelectDay.bind(this),
activeDates: this.props.activeDates,
dateRange: this.props.dateRange,
fromDate: this.props.fromDate,
toDate: this.props.toDate
})))
}
}], [{
key: "propTypes",
value: {
date: u["default"].PropTypes.object,
onSelect: u["default"].PropTypes.func,
onChangeMonth: u["default"].PropTypes.func,
activeDates: u["default"].PropTypes.array,
dateRange: u["default"].PropTypes.bool,
fromDate: u["default"].PropTypes.object,
toDate: u["default"].PropTypes.object,
month: u["default"].PropTypes.number,
year: u["default"].PropTypes.number
},
enumerable: !0
}, {
key: "defaultProps",
value: {
date: (0,
m["default"])(),
dateRange: !1,
fromDate: null ,
toDate: null ,
onChangeMonth: function() {},
onSelect: function() {}
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = b,
e.exports = t["default"]
},
333: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(137)
, o = i(a)
, l = n(33)
, u = i(l)
, c = n(329)
, d = i(c)
, p = n(20)
, f = i(p)
, h = n(3);
t["default"] = r["default"].createClass({
displayName: "Coupon",
propTypes: {
rewards: r["default"].PropTypes.array.isRequired,
onClickButton: r["default"].PropTypes.func.isRequired
},
_onClickButton: function(e) {
this.props.onClickButton(e)
},
render: function() {
return r["default"].createElement(u["default"], {
className: "coupon-dialogue"
}, r["default"].createElement(o["default"], null , r["default"].createElement("h2", null , (0,
h.translate)("app.success.it_worked")), r["default"].createElement("p", null , (0,
h.translate)("coupons.redeemed.dialog_message")), r["default"].createElement(d["default"], {
rewards: this.props.rewards,
hideGivers: !1,
onClickProvider: this.props.onClickProvider
}), r["default"].createElement(f["default"], {
className: "btn-fullwidth btn-green",
onClick: this._onClickButton
}, (0,
h.translate)("supersympathiek"))))
}
}),
e.exports = t["default"]
},
334: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(112)
, d = o(c)
, p = n(507)
, f = o(p)
, h = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "componentWillMount",
value: function() {
var e = this;
this.view = new f["default"]({
text: this.props.buttonText,
className: this.props.className || "v-facebook-connect",
onConnect: function(t, n) {
"signIn" === t ? e.props.onLogin && e.props.onLogin() : e.props.onSignUp && e.props.onSignUp(n),
e.props.onConnect && e.props.onConnect(t)
},
onFail: function(t) {
e.props.onError && e.props.onError(t)
},
signUpContext: this.props.signUpContext
})
}
}, {
key: "_renderError",
value: function() {
return this.props.error ? u["default"].createElement("div", {
className: "error-message visible"
}, this.props.error) : void 0
}
}, {
key: "render",
value: function() {
return u["default"].createElement("div", {
className: this.props.className
}, u["default"].createElement(d["default"], {
view: this.view
}), this._renderError())
}
}], [{
key: "propTypes",
value: {
onLogin: u["default"].PropTypes.func,
onSignUp: u["default"].PropTypes.func,
onConnect: u["default"].PropTypes.func,
onError: u["default"].PropTypes.func,
error: u["default"].PropTypes.string,
className: u["default"].PropTypes.string,
buttonText: u["default"].PropTypes.string
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = h,
e.exports = t["default"]
},
335: function(e, t) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t["default"] = {
debouncedEnterElement: function(e) {
var t = this;
clearTimeout(this._hideManifestTimeout),
clearTimeout(this._showManifestTimeout);
var n = Number(e.clientX)
, i = Number(e.clientY);
this._showManifestTimeout = setTimeout(function() {
t.enterElement({
clientX: n,
clientY: i
})
}, 150)
},
debouncedMoveElement: function(e) {
var t = this;
if (clearTimeout(this._hideManifestTimeout),
clearTimeout(this._showManifestTimeout),
!(e && "Android" === window.BrowserDetect.device || e && "Windows Phone" === window.BrowserDetect.device)) {
var n = Number(e.clientX)
, i = Number(e.clientY);
this._showManifestTimeout = setTimeout(function() {
t.enterElement({
clientX: n,
clientY: i
})
}, 150)
}
},
debouncedLeaveElement: function(e) {
var t = this;
clearTimeout(this._hideManifestTimeout),
clearTimeout(this._showManifestTimeout),
this.setState({
inElement: !1
}),
this._hideManifestTimeout = setTimeout(function() {
return t.leaveElement(e)
}, 300)
}
},
e.exports = t["default"]
},
336: function(e, t, n) {
"use strict";
var i = n(5)
, s = n(2)
, r = n(15)
, a = n(11)
, o = n(640)
, l = n(322)
, u = function(e) {
return {
propTypes: {
className: s.PropTypes.string,
loading: s.PropTypes.bool,
disabled: s.PropTypes.bool,
showButtons: s.PropTypes.bool,
mobile: s.PropTypes.bool,
pageIndex: s.PropTypes.number,
scrollPosition: s.PropTypes.number,
screenOffset: s.PropTypes.number,
maxHeight: s.PropTypes.number,
onEnd: s.PropTypes.func,
onNearEnd: s.PropTypes.func,
onScroll: s.PropTypes.func,
onElementsVisible: s.PropTypes.func,
onNextItem: s.PropTypes.func,
onPrevItem: s.PropTypes.func,
onNextPage: s.PropTypes.func,
onPrevPage: s.PropTypes.func
},
getChildren: function() {
var t = this;
return s.Children.map((this.props.children || []).filter(function(e) {
return e
}), function(n, r) {
var a = n.baseWidth
, o = n.baseHeight;
a || (a = t.state.width),
o || (o = t.state.height);
var l = i.find(t.state.visibleTiles, {
index: r
})
, u = t.state.isScrolling || t.props.disabled || !l;
return s.cloneElement(n, {
baseWidth: t.state.width,
baseHeight: t.state.height,
mobile: t.props.mobile,
disabled: u,
visible: l,
ref: "tile-" + r,
orientation: e,
onDidMount: t.debounceOnChildDidMount
})
})
},
componentDidMount: function() {
this.debounceResetScrollState = i.debounce(this._resetScrollState, 100),
this.debounceOnChildDidMount = i.debounce(this.onChildDidMount, 100),
this.setDimensions(),
this.requireMethod("setScrollPosition", this.props.scrollPosition),
this.setEventListeners(!this.props.disabled)
},
componentDidUpdate: function(e) {
this.setEventListeners(!this.props.disabled),
e.children && this.props.children && this.props.children.length != e.children.length && this.setDimensions()
},
componentWillUnmount: function() {
this.setEventListeners(!1),
this.debounceResetScrollState.cancel(),
this.debounceOnChildDidMount.cancel()
},
shouldComponentUpdate: function(e, t) {
var n = i.clone(this.state)
, s = i.clone(t);
return n.scrollPosition = null ,
s.scrollPosition = null ,
n.scrollSize = null ,
s.scrollSize = null ,
!o(n, s) || !o(this.props, e)
},
setEventListeners: function(e) {
e ? this.requireMethod("bindListeners") : this.requireMethod("unbindListeners")
},
setDimensions: function() {
var e = i.pairs(this.refs).filter(function(e) {
return 0 === e[0].indexOf("tile-")
}).map(function(e) {
var t = r.findDOMNode(e[1]);
return {
component: e[1],
index: parseInt(e[0].replace("tile-", ""), 10),
width: t.offsetWidth,
height: t.offsetHeight,
top: t.offsetTop,
left: t.offsetLeft
}
});
this.setState({
height: this.getContentHeight(),
width: this.getContentWidth(),
tileDimensions: e
})
},
getLoading: function() {
return this.props.loading ? s.createElement(l, null ) : null
},
getClassName: function() {
return a([this.props.className, "v-" + e + "-tile-pane", {
"l-loading": this.props.loading
}, {
"l-empty": !this.props.children || !this.props.children.length
}, {
"s-scroll": this.state.isScrolling
}])
},
requireMethod: function(e) {
if (!this[e])
throw new Error("TilePaneMixin expects the " + e + " method to be implemented");
for (var t = arguments.length, n = Array(t > 1 ? t - 1 : 0), i = 1; t > i; i++)
n[i - 1] = arguments[i];
return this[e].apply(this, n)
},
_resetScrollState: function() {
this.isMounted() && this.setState({
isScrolling: !1
})
}
}
}
;
e.exports = u
},
337: function(e, t, n) {
"use strict";
var i = n(234);
e.exports = {
getInitialState: function() {
return {
score: null
}
},
updatePasswordScore: function(e) {
this.setState({
score: i.getScore(e)
})
},
getPasswordScore: function() {
return this.state.score
},
getPasswordScoreColor: function() {
return i.getScoreColor(this.state.score)
}
}
},
338: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(26)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(2)
, c = l(u)
, d = n(11)
, p = l(d)
, f = n(28)
, h = l(f)
, m = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
var e = (0,
p["default"])(o({
"s-new": this.props["new"],
"s-active": this.props.active
}, this.props.className, !0));
return c["default"].createElement(h["default"], {
href: this.props.url,
title: this.props.title,
className: e,
onClick: this.props.onClick
}, this.props.children)
}
}]),
t
}(c["default"].Component);
t["default"] = m,
e.exports = t["default"]
},
339: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(3)
, o = n(607)
, l = i(o)
, u = n(606)
, c = i(u)
, d = n(604)
, p = i(d)
, f = n(28)
, h = i(f)
, m = n(17)
, g = (i(m),
n(8))
, v = i(g)
, y = {
blueprints: {
follow: l["default"],
"recurring-payment": c["default"],
"low-balance": p["default"]
},
assemble: function(e, t) {
return this.blueprints[e] ? r["default"].createElement(this.blueprints[e], t) : null
}
}
, _ = r["default"].createClass({
displayName: "NotificationsList",
propTypes: {
notifications: r["default"].PropTypes.object.isRequired,
fetchNextNotifications: r["default"].PropTypes.func.isRequired,
limit: r["default"].PropTypes.number,
onNotificationClick: r["default"].PropTypes.func,
autoLoad: r["default"].PropTypes.bool.isRequired,
loadingStatus: r["default"].PropTypes.number.isRequired
},
_onScroll: function(e) {
var t = e.target;
t.scrollTop + t.offsetHeight + 100 >= t.scrollHeight && this.props.fetchNextNotifications(this.props.notifications)
},
_renderInitialLoading: function() {
return this.props.loadingStatus === v["default"].STATUS_PENDING && 0 === this.props.notifications.length ? r["default"].createElement("div", {
className: "loading"
}) : void 0
},
_renderNoNotificationsMessage: function() {
return 0 === this.props.notifications.length && this.props.loadingStatus === v["default"].STATUS_OK ? r["default"].createElement("div", {
className: "v-notification"
}, r["default"].createElement("div", {
className: "text"
}, (0,
a.translate)("notifications.none"))) : void 0
},
_renderNotifications: function() {
var e = this;
return this.props.notifications.length > 0 ? this.props.notifications.slice(0, this.props.limit).map(function(t) {
return y.assemble(t.get("event"), {
notification: t,
key: t.id,
onClick: e.props.onNotificationClick
})
}) : void 0
},
_renderMore: function() {
return !this.props.autoLoad && (this.props.notifications.length > this.props.limit || this.props.notifications.hasNext()) ? r["default"].createElement("div", {
className: "more"
}, r["default"].createElement(h["default"], {
href: "/notifications",
onClick: this.props.fetchNextNotifications
}, (0,
a.translate)("notifications.all"))) : this.props.autoLoad && this.props.loadingStatus === v["default"].STATUS_PENDING && this.props.notifications.length > 0 ? r["default"].createElement("div", {
className: "loading-more"
}) : void 0
},
render: function() {
return r["default"].createElement("div", {
className: "v-notifications-list",
onScroll: this._onScroll
}, this._renderInitialLoading(), this._renderNoNotificationsMessage(), this._renderNotifications(), this._renderMore())
}
});
t["default"] = _,
e.exports = t["default"]
},
340: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(4)
, u = n(8)
, c = n(2)
, d = o(c)
, p = n(249)
, f = o(p)
, h = n(82)
, m = o(h)
, g = n(168)
, v = o(g)
, y = n(609)
, _ = o(y)
, b = function(e) {
function t(e) {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).call(this, e),
this.state = {
signUpStore: f["default"].getState(),
authStore: m["default"].getState()
},
this._onSignUpStore = this._onSignUpStore.bind(this),
this._onAuthStore = this._onAuthStore.bind(this),
f["default"].listen(this._onSignUpStore),
m["default"].listen(this._onAuthStore)
}
return s(t, e),
r(t, null , [{
key: "propTypes",
value: {
analyticsName: d["default"].PropTypes.string,
onSignUp: d["default"].PropTypes.func,
onToLogin: d["default"].PropTypes.func,
signUpContext: d["default"].PropTypes.object,
buttonHTML: d["default"].PropTypes.string,
verifyEmail: d["default"].PropTypes.bool
},
enumerable: !0
}, {
key: "defaultProps",
value: {
verifyEmail: !1,
analyticsName: "Signup Form",
signUpContext: {},
onToLogin: function() {
l.history.navigate("/login", {
trigger: !0
})
}
},
enumerable: !0
}]),
r(t, [{
key: "componentWillUnmount",
value: function() {
f["default"].unlisten(this._onSignUpStore),
m["default"].unlisten(this._onAuthStore)
}
}, {
key: "_onSignUpStore",
value: function(e) {
e.status === u.STATUS_OK ? setTimeout(this.props.onSignUp) : this.setState({
signUpStore: e
})
}
}, {
key: "_onAuthStore",
value: function(e) {
this.setState({
authStore: e
})
}
}, {
key: "_onSignUp",
value: function(e) {
v["default"].signUp(e, this.props.signUpContext, this.props.analyticsName, this.props.verifyEmail)
}
}, {
key: "render",
value: function() {
return d["default"].createElement(_["default"], {
buttonHTML: this.props.buttonHTML,
onToLogin: this.props.onToLogin,
error: this.state.signUpStore.error,
onSignUp: this._onSignUp.bind(this),
isLoading: this.state.signUpStore.status === u.STATUS_PENDING
})
}
}]),
t
}(d["default"].Component);
t["default"] = b,
e.exports = t["default"]
},
341: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(116)
, d = o(c)
, p = n(3)
, f = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
return u["default"].createElement(d["default"], {
type: "message"
}, u["default"].createElement("div", {
className: "error-body"
}, (0,
p.translateElement)("search.errors.no_results", [this.props.query])))
}
}], [{
key: "propTypes",
value: {
query: u["default"].PropTypes.string.isRequired
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = f,
e.exports = t["default"]
},
342: function(e, t, n) {
var i, s = n(24)["default"];
i = function(e) {
"use strict";
var t = n(4)
, i = n(16)
, r = n(89)
, a = n(12)
, o = n(674)
, l = n(13)
, u = t.Collection.extend({
initialize: function() {
this.state = new o,
this._oldMessageState = this.state.get("messages"),
this.listenTo(this.state, "change:messages", this._eMessagesChange),
this._initStart()
},
_eMessagesChange: function() {
!this._oldMessageState && this.state.get("messages") && l.track("New Notification"),
this._oldMessageState = this.state.get("messages")
},
_initStart: function() {
var e = !1
, t = !1;
this.listenTo(i, "sync", function() {
e = !0,
t && e && this._start()
}),
this.listenTo(a, "login", function() {
t = !0,
t && e && this._start()
})
},
_setUrls: function() {
this.state.url = i.getLink("notifications", {
user_id: a.getId()
})
},
_start: function() {
this._setUrls(),
this.state.poll(r.notificationInterval, null , this._catchXHRError.bind(this))
},
_catchXHRError: function(e) {
return !e || e && e.xhr ? void this._setUrls() : s.reject(e)
}
});
return new u
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
343: function(e, t) {
"use strict";
function n(e) {
var t = e.split("-");
return {
supplierId: t[0],
providerUid: t[1],
datetime: t[2],
custom: t[3]
}
}
function i(e) {
var t = n(e)
, i = t.providerUid;
return i
}
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.getUidParts = n,
t.getProviderUid = i
},
345: function(e, t, n) {
"use strict";
function i(e, t) {
var n = (0,
u.getCountryCode)();
return (0,
l.get)(o["default"].countryExceptions, [n, e], t)
}
function s(e, t, n) {
return (0,
l.get)(o["default"].countryExceptions, [e, t], n)
}
var r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.getException = i,
t.getExceptionForCountry = s;
var a = n(89)
, o = r(a)
, l = n(5)
, u = n(3)
},
346: function(e, t) {
"use strict";
e.exports = function(e) {
for (var t = e.parentNode, n = window.getComputedStyle(t), i = /auto|scroll|scroll-x|scroll-y/; n && !i.test(n.overflow) && (t = t.parentNode,
t instanceof Element); )
n = window.getComputedStyle(t);
return t && n && i.test(n.overflow) ? t : window
}
},
347: function(e, t, n) {
"use strict";
function i(e, t, n) {
var i = c["default"].getProvider(n);
if (i && i.getCapability("alwaysShowImages", !1))
return !0;
if (p.includes(t))
return !0;
if (!l.hideImagesAfterXDays)
return !0;
var s = d.diff((0,
a["default"])(e), "days");
return s < o.hideItemImagesAfterDays
}
var s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.allowImages = i;
var r = n(18)
, a = s(r)
, o = n(89)
, l = n(44)
, u = n(30)
, c = s(u)
, d = (0,
a["default"])()
, p = ["bnl-par-20151215-5578786"]
},
348: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(5)
, i = n(4)
, s = n(35)
, r = n(25)
, a = n(8).LIBRARY_UNAVAILABLE
, o = {
id: null ,
libVar: null ,
loadAs: "lib",
load: function() {},
error: function() {}
}
, l = function(e, n) {
if (!e)
throw new Error("No url to load");
this.url = e,
this.options = t.defaults(n, o)
}
;
return t.extend(l.prototype, i.Events, {
loadPromise: !1,
loadTimeout: 5e3,
loadTimer: !1,
initialized: !1,
loaded: !1,
error: !1,
_lib: !1,
_startLoadTimer: function() {
this.loadTimer = setTimeout(this._eError.bind(this), this.loadTimeout)
},
_stopLoadTimer: function() {
clearTimeout(this.loadTimer)
},
_load: function() {
var e, t = document, n = t.getElementsByTagName("script")[0];
this.initialized ? this.loaded ? this.loadPromise.resolve() : this.error && this.loadPromise.reject(new s(a,"Unable to load library: " + this.url)) : (this._startLoadTimer(),
e = t.createElement("script"),
e.async = !0,
e.src = this.url,
e.addEventListener("error", this._eError.bind(this), !1),
e.addEventListener("load", this._eLoad.bind(this), !1),
this.options.id && (e.id = this.options.id),
n.parentNode.insertBefore(e, n),
this.initialized = !0)
},
_eLoad: function() {
this._libVarLoaded() ? (this._stopLoadTimer(),
this._lib = this[this.options.loadAs] = window[this.options.libVar],
this.loaded = !0,
this.options.load(this[this.options.loadAs]),
this.trigger("load"),
this.loadPromise.resolve()) : this._eError()
},
_eError: function() {
this._stopLoadTimer(),
this.error = !0,
this.options.error(),
this.trigger("error"),
this.loadPromise.reject(new s(a,"Unable to load library: " + this.url))
},
_libVarLoaded: function() {
return !!window[this.options.libVar]
},
isLoaded: function() {
return this.loaded
},
isInitialized: function() {
return this.initialized
},
load: function() {
return this.loadPromise && !this.loaded ? this.loadPromise = this.loadPromise : this.loadPromise = r.defer(),
this._load(),
this.loadPromise.promise
},
execute: function() {
var e = Array.prototype.slice.call(arguments)
, t = r.defer();
return this.load().then(this._execute.bind(this, t, e)).fail(t.reject).done(),
t.promise
},
_execute: function(e, t) {
var n = t.shift();
e.resolve(this._lib[n].apply(this._lib, t))
}
}),
l
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
349: function(e, t, n) {
var i;
i = function(e) {
"use strict";
function t(e) {
if (!e)
return !1;
var t = e.getAttribute("href");
if (!t || "#" === t)
return !1;
var n = e.protocol + "//";
return t.substr(0, n.length) === n ? !1 : !e.getAttribute("data-ignoreclickhandler")
}
function i(e) {
var n = o(e.delegateTarget || e.target, "a");
if (n && t(n) && !e.defaultPrevented) {
var i = s(n.getAttribute("href"));
a.history.navigate(i, {
trigger: !0
}),
e.preventDefault()
}
}
function s(e) {
return l(e).absoluteTo(document.location.pathname).toString()
}
function r() {
document.addEventListener("click", i, !1)
}
var a = n(4)
, o = n(231)
, l = n(43);
r()
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
350: function(e, t) {
"use strict";
function n(e) {
return JSON.parse(window.atob(e.split(".")[1]))
}
Object.defineProperty(t, "__esModule", {
value: !0
}),
t["default"] = n,
e.exports = t["default"]
},
351: function(e, t, n) {
"use strict";
function i(e, t) {
var n, i = e.slice(0), r = [];
for (var a in t) {
var o = t[a]
, l = s(o, e);
"content" === o ? n = r.push({
key: o
}) - 1 : r.push({
key: o,
values: l
}),
i = c.difference(i, l)
}
var u = {
key: "content",
values: i
};
return r[n] ? r[n] = u : r.push(u),
r
}
function s(e, t) {
var n = [];
for (var i in t) {
var s = t[i];
s.type === e && n.push(s)
}
return n
}
function r(e) {
var t = e.split(" ");
return t = c.map(t, function(e) {
return e.substring(1, e.length - 1)
})
}
function a(e) {
return e = c.flatten(e.filter(function(e) {
return e.values.length
}).map(function(e) {
return e.values
}), !0),
e.reduce(function(e, t) {
var n;
return n = f[t.type] ? f[t.type] : f["default"],
e.push(n(t.content)),
e
}, [])
}
function o(e, t) {
return function(n) {
return d.createElement(e, {
className: t,
dangerouslySetInnerHTML: {
__html: n
}
})
}
}
function l(e) {
return d.createElement("img", {
src: e,
className: "item-image item-content-image"
})
}
function u(e) {
return d.createElement(p, {
node: e
})
}
var c = n(5)
, d = n(2)
, p = n(608)
, f = {
kicker: o("p", "item-kicker"),
head: o("h1", "item-title"),
hl1: o("h1", "item-title"),
hl2: o("h2", "item-subtitle"),
lead: o("p", "item-lead"),
byline: o("p", "item-byline"),
dateline: o("p", "item-dateline"),
intro: o("p", "item-intro"),
ph: o("h3", "item-header"),
p: o("p", "item-paragraph"),
streamer: o("p", "item-streamer"),
image: l,
"image-grid": u,
"image-meta": o("div", "item-image-meta"),
"default": o("p", "item-default")
};
e.exports = function(e, t) {
var n = r(t)
, s = i(e, n);
return a(s, t)
}
},
354: function(e, t, n) {
var i, s;
i = [n(5)],
s = function(e) {
"use strict";
var t = "Blendle"
, n = " - "
, i = {
_set: function(t) {
document.title = e.trim(e.unescape(e.stripTags(t)))
},
reset: function() {
this._set(t)
},
set: function(e) {
var i = [];
e instanceof Array ? i = e : i.push(e),
i.push(t),
this._set(i.join(n))
}
};
return i
}
.apply(t, i),
!(void 0 !== s && (e.exports = s))
},
357: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(5)
, s = function(e) {
this.viewType = e.viewType || "view"
}
;
return i.extend(s.prototype, t.Events, {
extend: t.Model.extend,
_closeHandler: null ,
openView: function(e) {
var t = this;
this._closeHandler && this._closeHandler(),
i.isFunction(e) ? this._closeHandler = e : (this._closeHandler = e.close.bind(e),
this.listenToOnce(e, "unload", function() {
t._closeHandler = null
}))
},
resetDirector: function() {
this.stopListening(),
this._closeHandler = null
},
closeView: function() {
this.stopListening(),
this._closeHandler && (this._closeHandler(),
this._closeHandler = null )
}
}),
s
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
358: function(e, t) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t["default"] = function(e) {
var t = e.src
, n = e.name
, i = e.width
, s = e.height
, r = e.options
, a = r || "scrollbars=yes,resizable=yes,toolbar=no,location=yes"
, o = Math.round(screen.width / 2 - i / 2)
, l = screen.height > s ? Math.round(screen.height / 2 - s / 2) : 0;
window.open(t, n, "width=" + i + ",height=" + s + ",left=" + o + ",top=" + l + "," + a)
}
,
e.exports = t["default"]
},
359: function(e, t, n) {
"use strict";
function i(e) {
for (var t = arguments.length, n = Array(t > 1 ? t - 1 : 0), i = 1; t > i; i++)
n[i - 1] = arguments[i];
if (!r)
return s.reject(new Error("No AndroidJSInterface available"));
var l = a++;
return new s(function(t, i) {
o[l] = function(e, n) {
e ? i(e) : t(n),
delete o[l]
}
,
window.AndroidJSInterface.send(e, l, n)
}
)
}
var s = n(24)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.action = i;
var r = window.AndroidJSInterface && window.AndroidJSInterface.send;
t.isInjected = r;
var a = 1
, o = {};
r && (window.AndroidJSInterface.response = function(e, t, n) {
o[e] && o[e](t, n)
}
)
},
368: function(e, t, n) {
var i, s = n(24)["default"];
i = function(e) {
"use strict";
var t = n(8)
, i = n(4)
, r = n(16)
, a = n(12)
, o = n(35)
, l = {
acquireIssue: function(e) {
return i.ajax({
url: r.getLink("user_issues", {
user_id: a.getId()
}),
type: "post",
data: JSON.stringify({
id: e.id
}),
accept: "application/hal+json"
}).then(function(t) {
var n = e.getEmbedded("b:issue-acquisition");
a.getUser().subtractFromBalance(n.get("price")),
n.set(t.data, {
parse: !0
})
})
},
acquireItem: function(e, n) {
return n.isAcquirable() || n.get("acquired") ? i.ajax({
data: JSON.stringify({
id: n.id
}),
type: "POST",
url: r.getLink("user_items", {
user_id: e.id
}),
accept: "application/hal+json"
}).then(function(t) {
return l._processItemPurchase(e, n, t)
}, function(t) {
return l._processItemPurchase(e, n, t)
}) : s.reject(new o(t.NOT_ACQUIRABLE,"Item not acquirable"))
},
_processItemPurchase: function(e, n, i) {
return 201 === i.status || "Issue containing item already purchased." === i.data.message ? l._processItemPurchaseSuccess(e, n, i) : s.reject(new o(t.XHR_STATUS,i.data.message,i))
},
_processItemPurchaseSuccess: function(e, t, n) {
var i = n.data;
return i.subscription || (i.justAcquired = !0,
i.purchaseDate = new Date,
e.subtractFromBalance(i.price)),
t.setEmbedded("b:acquisition", i),
e.set("reads", e.get("reads") + 1),
s.resolve(t)
}
};
return l
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
369: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(16)
, s = {
add: function(e, n) {
return t.ajax({
url: i.getLink("alerts", {
user_id: e.id || e
}),
type: "POST",
data: JSON.stringify({
query: n.toLowerCase()
})
})
}
};
return s
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
370: function(e, t, n) {
"use strict";
function i(e) {
return (0,
l["default"])({
url: d["default"].getLink("verify_coupon", {
code: e
}),
method: "get"
}).then(function(e) {
return e.data.only_new_accounts && f["default"].getUser() ? r.reject(new m["default"](u.COUPON_NEW_USERS_ONLY)) : e.data.redeemed ? r.reject(new m["default"](u.COUPON_REDEEMED)) : e.data.expired ? r.reject(new m["default"](u.COUPON_EXPIRED)) : e.data.maximum_exceeded ? r.reject(new m["default"](u.COUPON_EXCEEDED_MAX)) : r.resolve()
})["catch"](function(e) {
if (404 === e.status)
return r.reject(new m["default"](u.COUPON_INVALID));
throw e
})
}
function s(e, t) {
return (0,
l["default"])({
url: d["default"].getLink("coupons", {
user_id: t
}),
method: "post",
data: JSON.stringify({
code: e
})
}).then(function(e) {
return f["default"].getUser().setBalance(e.data._embedded.user.balance),
e.data._embedded
})["catch"](function(e) {
if (e.data.message.match(/Coupon (.+) not found./))
throw new m["default"](u.COUPON_INVALID);
if ("Coupon already redeemed." === e.data.message)
throw new m["default"](u.COUPON_REDEEMED);
if ("Campaign exceeded maximum." === e.data.message)
throw new m["default"](u.COUPON_EXCEEDED_MAX);
if ("Coupon expired." === e.data.message)
throw new m["default"](u.COUPON_EXPIRED);
if ("Coupon is only for new accounts." === e.data.message)
throw new m["default"](u.COUPON_NEW_USERS_ONLY);
throw e
})
}
var r = n(24)["default"]
, a = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.validateCoupon = i,
t.redeemCoupon = s;
var o = n(113)
, l = a(o)
, u = n(8)
, c = n(16)
, d = a(c)
, p = n(12)
, f = a(p)
, h = n(35)
, m = a(h)
},
371: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(5)
, i = {
tld: {
com: ["con", "kom", "cm", "cmo", "cim", "cpm"],
nl: ["ml", "ln", "nk", "bl"],
net: ["nt", "met"],
"tante.nel": ["nel"]
},
hostname: {
gmail: ["gmai", "gail", "gmai", "gnail", "mgail", "gmial", "mgail", "gamil"],
hotmail: ["htmail", "otmail", "hotmal", "hotmai", "hotmial", "hoitmail", "homail", "hotrmail", "hotmil", "hotmaill"],
live: ["lve", "liv"],
yahoo: ["yhoo", "yaho"]
}
}
, s = {
disectAddress: function(e) {
var t = e.split("@")
, n = t[0]
, i = t[1]
, s = i && i.split(".")
, r = s && s.pop()
, a = s && s.join(".");
return {
user: n,
hostname: a,
tld: r
}
},
compileAddress: function(e) {
return t.sprintf("%s@%s.%s", e.user, e.hostname, e.tld)
},
checkForCommonMistakes: function(e) {
var n = this.disectAddress(e)
, s = {}
, r = !1;
if (!n.user || !n.hostname || !n.tld)
return !1;
for (var a in i.tld)
-1 !== i.tld[a].indexOf(n.tld) && (s.tld = a,
r = !0);
for (var o in i.hostname)
-1 !== i.hostname[o].indexOf(n.hostname) && (s.hostname = o,
r = !0);
return r ? this.compileAddress(t.extend(n, s)) : !1
}
};
return s
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
372: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(5)
, r = i(s)
, a = n(4)
, o = i(a)
, l = n(3)
, u = i(l)
, c = n(16)
, d = i(c);
t["default"] = {
getCountryNewsStand: function(e) {
var t = d["default"].get("links").onboarding_newsstand
, n = r["default"].find(t, {
name: e
});
return n || (n = r["default"].find(t, {
name: u["default"].getCountryCode(u["default"].getDefaultLocale())
})),
o["default"].ajax({
url: n.href
}).then(function(e) {
return e.data._links
})
},
getNewsStand: function(e) {
return o["default"].ajax({
url: d["default"].getLink("newsstand", {
user_context: e
})
}).then(function(e) {
return e.data._links
})
}
},
e.exports = t["default"]
},
373: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(16)
, r = i(s)
, a = n(113)
, o = i(a)
, l = {
pinItem: function(e, t) {
return this.updatePin(e, t, !0)
},
unpinItem: function(e, t) {
return this.updatePin(e, t, !1)
},
updatePin: function(e, t, n) {
return (0,
o["default"])({
url: r["default"].getLink("user", {
user_id: e.id
}) + "/pin/" + t.id,
data: JSON.stringify({
pinned: n
}),
method: "put"
}).then(function(t) {
return n ? e.set("pins", e.get("pins") + 1) : e.set("pins", e.get("pins") - 1),
t.data
})
}
};
t["default"] = l,
e.exports = t["default"]
},
374: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(25)
, i = n(4)
, s = n(16)
, r = {
favorite: function(e, t) {
return t = i.Helpers.toArray(t).map(function(e) {
return {
id: e
}
}),
i.ajax({
url: s.getLink("user_favourites", {
user_id: i.Helpers.modelId(e)
}),
type: "POST",
data: JSON.stringify(t)
})
},
unfavorite: function(e, n) {
return n = i.Helpers.toArray(n),
t.all(n.map(function(t) {
return i.ajax({
url: s.getLink("user_favourite", {
user_id: i.Helpers.modelId(e),
provider_id: i.Helpers.modelId(t)
}),
type: "DELETE"
})
}))
}
};
return r
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
375: function(e, t, n) {
"use strict";
var i = n(24)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(4)
, a = s(r)
, o = n(12)
, l = s(o)
, u = n(16)
, c = s(u)
, d = n(101)
, p = s(d)
, f = n(35)
, h = s(f)
, m = {
authorize: function(e) {
return "string" != typeof e.get("twitter_id") && e.set("twitter_id", this.login(e)),
e.get("twitter_id")
},
login: function() {
var e = this
, t = this._openPopup();
return this._requestLoginUrl().then(function(n) {
return !t || t.closed ? i.reject(new h["default"]("PopupClosed","User has prematurily closed the Twitter authorization window")) : e._getAuthorizationFromPopup(n, t)
}).then(function() {
return l["default"].renewJWT()
}).then(function() {
return l["default"].fetchUser()
})
},
unauthorize: function(e) {
return e.get("twitter_id") ? a["default"].ajax({
url: c["default"].getLink("oauth", {
oauth_provider: "twitter"
}),
type: "DELETE"
}).then(function() {
return e.set("twitter_id", null ),
l["default"].fetchUser()
}) : i.resolve(e)
},
getFriends: function(e) {
return a["default"].ajax({
url: c["default"].getLink("follows", {
user_id: e.id,
reason: "twitter"
})
}).then(function(e) {
return i.resolve(new p["default"](e.data,{
parse: !0
}))
})
},
authorizeAndGetFriends: function(e) {
return this.authorize(e).then(this.getFriends)
},
_requestLoginUrl: function() {
return a["default"].ajax({
url: c["default"].getLink("oauth", {
oauth_provider: "twitter"
})
}).then(function(e) {
return i.resolve(e.data.authorize_url)
})
},
_openPopup: function() {
var e = window.open("about:blank", "twitter", "height=400,width=600,status=no,menubar=no,toolbar=no,location=no");
return e.focus(),
e
},
_getAuthorizationFromPopup: function(e, t) {
return t.location.href = e,
this._pollForStatus(t)
},
_pollForStatus: function(e) {
return new i(function(t, n) {
var i = setInterval(function() {
e && !e.closed || (clearInterval(i),
n(new h["default"]("PopupClosed","User has prematurily closed the Twitter authorization window"))),
e.postMessage({
ping: !0
}, window.location.origin)
}, 100);
e && !e.closed || n(new h["default"]("PopupClosed","User has prematurily closed the Twitter authorization window")),
window.addEventListener("message", function(e) {
e.origin === window.location.origin && (clearInterval(i),
t(e.data))
})
}
)
}
};
t["default"] = m,
e.exports = t["default"]
},
376: function(e, t, n) {
"use strict";
var i = n(4)
, s = i.Model.extend({
name: "item-tracker"
});
e.exports = s
},
377: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = t.Model.extend({
name: "alert",
parse: function(e) {
return this.id = e.id,
e.query = e.query && e.query.toLowerCase(),
this.parseHal(e)
}
});
return i
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
378: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(67)
, r = i(s);
t["default"] = r["default"].extend({
name: "channel",
isChannel: !0,
mappings: {
managers: {
resource: function(e) {
var t = n(101);
return new t({
_embedded: {
users: e
}
},{
parse: !0
})
}
}
}
}),
e.exports = t["default"]
},
379: function(e, t, n) {
"use strict";
var i = n(4)
, s = i.Model.extend({
required: {
facebook_id: !0,
facebook_access_token: !0
}
});
e.exports = s
},
380: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = t.Model.extend({
name: "issue-acquisition",
defaults: {
acquirable: !0,
subscription: !1
},
addToPrice: function(e) {
var t = parseFloat(this.get("price")) + parseFloat(e)
, n = Math.round(100 * t) / 100;
return this.set("price", n),
n
},
getPercentagePurchased: function() {
return this.get("acquired") ? 1 : this.getRealPercentagePurchased()
},
getRealPercentagePurchased: function() {
if (null === this.get("price") || null === this.get("original_price"))
return 0;
var e = 1 - this.get("price") / this.get("original_price");
return Math.round(100 * e) / 100
},
isEligibleForAcquisition: function() {
return null !== this.get("original_price") && !this.get("subscription") && this.get("acquirable")
}
});
return i
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i));
},
381: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(4)
, r = i(s)
, a = n(2)
, o = i(a)
, l = n(15)
, u = i(l)
, c = n(12)
, d = i(c)
, p = n(3)
, f = n(331)
, h = i(f)
, m = n(171)
, g = i(m)
, v = n(345)
, y = r["default"].View.extend({
beforeUnload: function() {
u["default"].unmountComponentAtNode(this.el),
r["default"].View.prototype.beforeUnload.apply(this, arguments)
},
_onToggleMixpanel: function() {
var e = this
, t = !d["default"].getUser().get("mixpanel_opt_out");
d["default"].getUser().saveProperty("mixpanel_opt_out", t, function() {
e.render()
})
},
_onToggleSharePrivacy: function() {
var e = this
, t = !d["default"].getUser().get("providers_opt_in");
d["default"].getUser().saveProperty("providers_opt_in", t, function() {
e.render()
})
},
_toggleTooltip: function() {
this._showTooltip = !this._showTooltip,
this.render()
},
_openTooltip: function() {
this._showTooltip = !0,
this.render()
},
_closeTooltip: function() {
this._showTooltip = !1,
this.render()
},
_renderPrivacyStatement: function() {
if (/^settings\//.test(r["default"].history.fragment)) {
var e = (0,
p.translate)("about.privacy_statement.contents");
return e.replace("/about/", "/settings/")
}
return (0,
p.translate)("about.privacy_statement.contents")
},
_renderTooltip: function() {
if (this._showTooltip) {
var e = [o["default"].createElement("span", {
dangerouslySetInnerHTML: {
__html: (0,
p.translate)("app.text.providers_opt_in_more")
}
})];
return o["default"].createElement(g["default"], {
name: "privacy-tooltip",
className: "tooltip",
position: "top",
onScroll: this._closeTooltip()
}, e)
}
},
_renderProvidersToggle: function(e) {
return (0,
v.getExceptionForCountry)(e.get("country"), "showProviderTrackingSetting", !1) ? o["default"].createElement("div", {
className: "providers-opt-in opt-switch"
}, o["default"].createElement(h["default"], {
className: "btn-toggle",
checked: e.get("providers_opt_in"),
onToggle: this._onToggleSharePrivacy.bind(this)
}), (0,
p.translate)("app.text.agree_to_providers_opt_in"), o["default"].createElement("span", {
className: "info-tooltip",
onClick: this._toggleTooltip.bind(this),
onMouseEnter: this._openTooltip.bind(this),
onMouseLeave: this._closeTooltip.bind(this)
}, " ?", this._renderTooltip())) : null
},
_renderLoggedIn: function() {
var e = d["default"].getUser();
return e ? [o["default"].createElement("div", {
className: "analytics-opt-out opt-switch"
}, o["default"].createElement(h["default"], {
className: "btn-toggle",
checked: !e.get("mixpanel_opt_out"),
onToggle: this._onToggleMixpanel.bind(this)
}), (0,
p.translate)("app.text.agree_to_analytics")), this._renderProvidersToggle(e)] : void 0
},
render: function() {
return u["default"].render(o["default"].createElement("div", {
className: "pane privacystatement"
}, o["default"].createElement("div", {
className: "container l-text"
}, o["default"].createElement("h1", null , (0,
p.translate)("about.privacy_statement.title")), o["default"].createElement("div", {
dangerouslySetInnerHTML: {
__html: this._renderPrivacyStatement()
}
}), o["default"].createElement("p", {
className: "end",
dangerouslySetInnerHTML: {
__html: "&middot;&middot;&middot;"
}
}), this._renderLoggedIn())), this.el),
this.display(),
this
}
});
t["default"] = y,
e.exports = t["default"]
},
382: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(4)
, r = i(s)
, a = n(5)
, o = i(a)
, l = n(1062)
, u = i(l)
, c = n(3)
, d = r["default"].View.extend({
className: "pane termsandconditions",
_updateInteralHrefs: function() {
o["default"].forEach(this.el.querySelectorAll("a"), function(e) {
var t = e.href.match(/\/about\/.*/);
t && (e.href = t[0].replace(/\/about\//, "/settings/"))
})
},
render: function() {
return this.delegateEvents(),
this.el.innerHTML = (0,
u["default"])({
i18n: c.locale
}),
/^settings\//.test(r["default"].history.fragment) && this._updateInteralHrefs(),
this.display(),
this
}
});
t["default"] = d,
e.exports = t["default"]
},
383: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(37)
, d = o(c)
, p = n(82)
, f = o(p)
, h = n(249)
, m = o(h)
, g = n(168)
, v = (o(g),
n(832))
, y = o(v)
, _ = n(114)
, b = o(_)
, w = n(313)
, S = o(w)
, k = n(699)
, E = o(k)
, C = n(65)
, T = n(8)
, P = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments),
this.state = {
loading: !1
}
}
return s(t, e),
r(t, [{
key: "_onRedeem",
value: function(e, t) {
S["default"].redeem(t, e && e.id)
}
}, {
key: "_onFacebookSignUp",
value: function(e) {
var t = this;
(0,
C.getSignUpRewards)(e.id).then(function(e) {
t.setState({
facebookSignUp: T.STATUS_OK,
signUpRewards: e
})
})
}
}, {
key: "render",
value: function() {
var e = this;
return u["default"].createElement(d["default"], {
stores: {
AuthStore: f["default"],
CouponStore: y["default"],
SignUpStore: m["default"]
},
render: function(t) {
return u["default"].createElement(E["default"], {
initialCode: e.props.initialCode,
campaign: e.props.campaign,
user: t.AuthStore.user,
signUpStatus: t.SignUpStore.status,
facebookSignUpStatus: e.state.facebookSignUp,
signUpRewards: e.state.signUpRewards,
couponStatus: t.CouponStore.status,
couponData: t.CouponStore.data,
couponError: t.CouponStore.error,
onLogout: b["default"].logout,
onRedeem: e._onRedeem.bind(e, t.AuthStore.user),
onFacebookSignUp: function(t) {
return e._onFacebookSignUp(t)
},
loading: e.state.loading
})
}
})
}
}], [{
key: "propTypes",
value: {
initialCode: u["default"].PropTypes.string,
campaign: u["default"].PropTypes.object
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = P,
e.exports = t["default"]
},
384: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(4)
, u = n(2)
, c = o(u)
, d = n(702)
, p = o(d)
, f = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments),
this.name = "deeplink",
this.type = "item"
}
return s(t, e),
r(t, [{
key: "openSignup",
value: function(e) {
var t = "signUp";
window.location.search.match(/medium=(newsletter|email)/) && (t = "login"),
this.load(),
this.render(c["default"].createElement(p["default"], {
itemId: e,
initialVariant: t
}))
}
}]),
t
}(l.ReactModule);
t["default"] = new f,
e.exports = t["default"]
},
385: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(37)
, o = i(a)
, l = n(725)
, u = i(l)
, c = n(167)
, d = i(c)
, p = n(398)
, f = i(p)
, h = n(12)
, m = i(h)
, g = r["default"].createClass({
displayName: "SocialPaneContainer",
propTypes: {
item: r["default"].PropTypes.object.isRequired,
analytics: r["default"].PropTypes.object.isRequired
},
componentDidMount: function() {
d["default"].loadPlatforms()
},
_onSocialShare: function(e) {
d["default"].shareItemToPlaform(e, this.props.item, this.props.analytics)
},
_onEmailFormShare: function(e, t) {
d["default"].shareItemToEmail(m["default"].getUser().id, this.props.item, e, t)
},
render: function() {
var e = this;
return r["default"].createElement(o["default"], {
stores: {
ShareStore: f["default"]
},
render: function(t) {
return r["default"].createElement(u["default"], {
onSocialShare: e._onSocialShare,
loadingPlatforms: t.ShareStore.loadingPlatforms,
onEmailFormShare: e._onEmailFormShare,
emailSentTo: t.ShareStore.sentTo,
status: t.ShareStore.status,
error: t.ShareStore.error
})
}
})
}
});
t["default"] = g,
e.exports = t["default"]
},
386: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(2)
, a = s(r)
, o = n(11)
, l = s(o)
, u = a["default"].createClass({
displayName: "SharingButtons",
propTypes: {
onSocialShare: a["default"].PropTypes.func.isRequired,
loadingPlatforms: a["default"].PropTypes.object.isRequired
},
_onClickSharingButton: function(e, t) {
t.preventDefault(),
this.props.onSocialShare(e)
},
_renderButtons: function() {
var e = this;
return ["twitter", "facebook", "linkedin", "email", "whatsapp"].map(function(t) {
var n, s = (0,
l["default"])((n = {
btn: !0,
"btn-icon": !0
},
i(n, "btn-share-" + t, !0),
i(n, "s-inactive", e.props.loadingPlatforms.hasOwnProperty(t)),
n));
return a["default"].createElement("a", {
href: "#",
className: s,
onClick: e._onClickSharingButton.bind(e, t)
})
})
},
render: function() {
return a["default"].createElement("div", {
className: "v-sharing-buttons"
}, this._renderButtons())
}
});
t["default"] = u,
e.exports = t["default"]
},
387: function(e, t, n) {
"use strict";
function i(e, t) {
return e.width > t && e.height > t
}
function s(e) {
e.forEach(function(e) {
e.style["font-family"] = "'Proxima Nova', helvetica, arial, sans-serif"
})
}
var r = n(1)["default"]
, a = n(145)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = n(5)
, l = r(o)
, u = n(25)
, c = r(u)
, d = n(2)
, p = r(d)
, f = n(15)
, h = r(f)
, m = n(454)
, g = r(m)
, v = n(4)
, y = r(v)
, _ = n(230)
, b = a(_)
, w = n(17)
, S = r(w)
, k = n(41)
, E = r(k)
, C = n(626)
, T = r(C)
, P = n(351)
, N = r(P)
, x = n(30)
, R = r(x)
, L = n(857)
, I = r(L)
, M = n(721)
, A = r(M)
, D = n(736)
, O = r(D)
, U = n(729)
, q = r(U)
, F = n(3)
, j = n(141)
, V = r(j)
, B = n(38)
, W = (r(B),
y["default"].View.extend({
className: "v-content item-content item",
events: {
"click .lnk-refund": "_onRefundItemByClick",
"click .grid .container > div": "_onOpenImageOverlay"
},
initialize: function(e) {
this.setState("loading"),
this.item = e.item
},
beforeUnload: function() {
this._recommendElement && h["default"].unmountComponentAtNode(this._recommendElement),
y["default"].View.prototype.beforeUnload.apply(this, arguments)
},
update: function() {
"horizontal" === this.options.orientation ? this._updateHorizontal() : this._updateVertical()
},
getNextColumnOffset: function(e) {
var t = this._getFeaturedImage();
if (t && e < t.offsetWidth)
return t.offsetWidth;
var n = -1
, i = this.el.querySelector(".item-columns");
return [].some.call(this.el.querySelectorAll(".item-columns .kolom-column"), function(t) {
var s = t.offsetLeft + i.offsetLeft
, r = s + t.offsetWidth;
return s > e || e >= s && r > e ? (n = parseInt(r, 10),
!0) : void 0
}),
n
},
getPreviousColumnOffset: function(e) {
var t = this._getFeaturedImage();
if (t && e <= t.offsetWidth)
return 0;
var n = t ? t.offsetWidth : 0
, i = this.el.querySelector(".item-columns");
return [].some.call(this.el.querySelectorAll(".item-columns .kolom-column"), function(t) {
var s = t.offsetLeft + i.offsetLeft
, r = s + t.offsetWidth;
return e >= s && (r >= e || !t.nextSibling) ? (t.previousSibling && (n = parseInt(t.previousSibling.offsetLeft + t.previousSibling.offsetWidth + i.offsetLeft, 10)),
!0) : void 0
}),
n
},
getContentOffset: function() {
var e = this._getFeaturedImage();
if (!e)
return 0;
var t = e.offsetWidth - 330;
return "vertical" === this.options.orientation && (t = e.offsetHeight - 200),
Math.max(0, t)
},
_onRefundItemByClick: function(e) {
e.preventDefault(),
e.stopPropagation(),
this.options.onRefund()
},
_onOpenImageOverlay: function(e) {
var t = e.delegateTarget.getAttribute("data-src")
, n = this.options.item.getEmbedded("item_content")
, i = R["default"].getProviderOrDefault(n.get("provider").id);
if (i.getCapability("imageGridZoom", !0)) {
var s = n.get("images")
, r = n.getEmbedded("items");
r && r.forEach(function(e) {
s = s.concat(e.get("images"))
});
var a = l["default"].findIndex(s, function(e) {
return l["default"].find(e._links, function(e) {
return e.href === t
})
});
this.options.onOpenImageViewer(e, s, a, t),
e.preventDefault()
}
},
_setWidth: function(e) {
this.el && (this.el.style.width = e + "px")
},
_getFeaturedImage: function() {
return l["default"].get(this._imageContainer, "el")
},
_createImageContainer: function(e, t) {
var n = this
, i = this.addView(new I["default"]({
image: t,
orientation: e,
height: this.el.offsetHeight,
width: this.el.offsetWidth
}))
, s = S["default"].isMobile() ? "medium" : "original";
return "horizontal" === e && this.el.offsetHeight > 0 ? s = V["default"].getSizeForHeight(t._links, this.el.offsetHeight) : "vertical" === e && this.el.offsetWidth > 0 && (s = V["default"].getSizeForWidth(t._links, this.el.offsetWidth)),
i.loadImage(s).then(function() {
i.render(),
n._imageContainer = i
})
},
_updateHorizontal: function() {
var e = 0;
this._imageContainer && (e += Math.ceil(this._imageContainer.setSizeBasedOnHeight(this.el.parentNode.offsetHeight))),
this._columnizedContent && (this._columnizedContent.columnize(this.el.offsetHeight),
this._appendHorizontalSubItems(),
this._appendBlendleControlsToContent(),
e += this._columnizedContent.getWidth()),
this._setWidth(e)
},
_updateVertical: function() {
this._imageContainer && this._imageContainer.setSizeBasedOnWidth(this.el.offsetWidth)
},
_renderHorizontalContent: function(e, t) {
var n = this
, r = R["default"].getProviderOrDefault(t.get("provider").id)
, a = 0
, o = !1
, l = !1
, u = c["default"].defer()
, d = c["default"].defer()
, p = e && i(e._links.original, 500);
return r.getCapability("featuredImage") && p ? (o = !0,
l = !0,
this._createImageContainer("horizontal", e).then(function() {
n.el.appendChild(n._imageContainer.el),
a += n._imageContainer.el.offsetWidth,
u.resolve()
})) : u.resolve(),
u.promise.then(function() {
var e = n._renderContentBody(r, t.get("body"))
, i = [];
t.get("streamers") && r.get("capabilities").streamers && (i = t.get("streamers")),
n._columnizedContent = new q["default"]({
height: n.el.offsetHeight,
content: e,
images: t.get("images").filter(function(e) {
return !l || !e.featured
}),
imageGridEnabled: r.getCapability("imageGrid", !0),
imageGridZoomEnabled: r.getCapability("imageGridZoom", !0),
streamers: i
}),
n.el.appendChild(n._columnizedContent.el),
o && n.el.classList.add("has-image"),
b.loadFromElement(e.firstChild, 3e3)["catch"](function(t) {
if (t && "WebFontsNotLoaded" === t.type) {
var n = b.getElementsWithFonts(e.firstChild, t.failedFonts);
return s(n),
d.resolve()
}
return d.reject(t)
}).then(function() {
n._renderHorizontalContentColumns(a, t),
n.setState("ready"),
d.resolve()
})
}),
d.promise
},
_renderVerticalContent: function(e, t) {
var n = this
, s = R["default"].getProviderOrDefault(t.get("provider").id)
, r = c["default"].defer()
, a = c["default"].defer()
, o = !1
, l = e && i(e._links.original, 500);
return s.getCapability("featuredImage") && l ? (o = !0,
this._createImageContainer("vertical", e).then(function() {
n.el.appendChild(n._imageContainer.el),
r.resolve()
})) : r.resolve(),
r.promise.then(function() {
var e = (0,
T["default"])("div", {
className: "item-columns"
})
, i = [];
s.get("capabilities").streamers && (i = t.get("streamers"));
var r = s.getCapability("imageGrid", !0)
, l = (0,
O["default"])({
streamers: i,
containerWidth: n.el.offsetWidth,
body: t.get("body"),
images: t.get("images").filter(function(e) {
return !o || !e.featured
}),
imageGridEnabled: r
});
e.appendChild(n._renderContentBody(s, l)),
n.el.appendChild(e),
n._appendVerticalSubItems(),
n._appendRecommendElement(n.el),
n._appendRefundElement(n.el),
n.setState("ready"),
a.resolve(n.el)
}),
a.promise
},
_renderHorizontalContentColumns: function(e, t) {
this.loaded && (this._columnizedContent.columnize(),
this._appendHorizontalSubItems(),
this._appendBlendleControlsToContent(),
this._setWidth(e + this._columnizedContent.getWidth()))
},
_renderContentBody: function(e, t) {
var n = e.get("templates").item_content
, i = (0,
T["default"])("div", {
innerHTML: g["default"].renderToStaticMarkup(p["default"].createElement("div", null , (0,
N["default"])(t, n)))
});
return this.findAll(".item-paragraph a", i).forEach(function(e) {
e.target = "_blank"
}),
i
},
_renderAcquisitionStatus: function() {
if (!this.item.getEmbedded("b:acquisition").get("refundable")) {
var e = this.el.querySelector(".item-columns .item-refund");
e && e.parentNode.removeChild(e)
}
},
_appendRefundElement: function(e) {
var t = this.item.getEmbedded("b:acquisition").get("subscription")
, n = this.item.getEmbedded("b:acquisition").get("refundable")
, i = this.item.getEmbedded("b:acquisition").get("price");
return !t && n ? (0,
T["default"])("p", {
appendTo: e,
className: "item-refund",
innerHTML: (0,
F.translate)("item.text.refund", [(0,
E["default"])(i)])
}) : void 0
},
_appendRecommendElement: function(e) {
return this._recommendElement ? e.appendChild(this._recommendElement) : (this._recommendElement = (0,
T["default"])("div"),
e.appendChild(this._recommendElement),
h["default"].render(p["default"].createElement(A["default"], {
item: this.options.item,
analytics: this.options.analytics,
posts: this.options.posts,
onBlendleShare: this.options.onBlendleShare,
onRemoveBlendleShare: this.options.onRemoveBlendleShare
}), this._recommendElement)),
this._recommendElement
},
_appendHorizontalSubItems: function() {
var e = this
, t = this.item.getEmbedded("item_content")
, n = R["default"].getProviderOrDefault(t.get("provider").id)
, i = t.getEmbedded("items");
i && (this._subItemsContent = i.map(function(t) {
var i = e._renderContentBody(n, t.get("body"))
, s = [];
n.get("capabilities").streamers && (s = t.get("streamers"));
var r = new q["default"]({
height: e.el.offsetHeight,
content: i,
images: t.get("images"),
startWithGrid: !0,
streamers: s,
isSubItem: !0
});
e.el.appendChild(r.el),
r.el.classList.add("subitem-columns"),
r.columnize();
var a = e._columnizedContent.appendColumn(r.el, r.getWidth());
return a.classList.add("subitem"),
r
}))
},
_appendVerticalSubItems: function() {
var e = this
, t = this.item.getEmbedded("item_content")
, n = R["default"].getProviderOrDefault(t.get("provider").id)
, i = t.getEmbedded("items");
i && i.forEach(function(t) {
var i = (0,
T["default"])("div", {
className: "item-columns subitem-columns"
})
, s = [];
n.get("capabilities").streamers && (s = t.get("streamers"));
var r = (0,
O["default"])({
streamers: s,
containerWidth: e.el.offsetWidth,
body: t.get("body"),
images: t.get("images")
});
i.appendChild(e._renderContentBody(n, r));
var a = document.createElement("div");
a.className = "subitem",
a.appendChild(i),
e.el.appendChild(a)
})
},
_appendBlendleControlsToContent: function() {
var e = this._columnizedContent.el.lastChild
, t = this._appendRecommendElement(e)
, n = this._appendRefundElement(e)
, i = e.lastChild.previousSibling
, s = 0;
n && (s = 2 * n.offsetHeight,
i = i.previousSibling);
var r = t.offsetHeight + 100
, a = i.offsetTop + i.offsetHeight + s + r;
i && a > e.offsetHeight && (this._columnizedContent.appendColumn(t),
e = this._columnizedContent.el.lastChild,
n && e.appendChild(n))
},
render: function(e) {
this.el.id = "itemContent",
this.el.classList.add("item"),
this.el.classList.add("provider-" + e.get("provider").id),
this.listenTo(this.item.getEmbedded("b:acquisition"), "change", this._renderAcquisitionStatus.bind(this));
var t = l["default"].findWhere(e.get("images"), {
featured: !0
});
return "horizontal" === this.options.orientation ? this._renderHorizontalContent(t, e) : this._renderVerticalContent(t, e)
}
}));
t["default"] = W,
e.exports = t["default"]
},
388: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(5)
, i = n(4)
, s = n(18)
, r = n(17)
, a = n(104)
, o = n(41)
, l = n(30)
, u = n(401)
, c = n(402)
, d = n(183)
, p = (n(3).locale,
n(3).translate)
, f = n(1066)
, h = u.extend({
className: "v-issue-acquired",
initialize: function(e) {
a(t.isObject(e), "IssueAcquiredView: Expected an options object"),
a(e.issue, "IssueAcquiredView: Expects an issue model to be present in options object"),
u.prototype.initialize.call(this, {
areas: ["close", "message", "cover"]
})
},
render: function() {
return this._attachChildren(),
this
},
_attachChildren: function() {
r.isMobile() || this.attach(null , "close"),
this._attachMessage(),
this._attachCover(),
this.renderChildren().done()
},
_attachClose: function() {
this.attach(new d({
className: "v-button btn btn-close btn-icon btn-white",
onClick: this.options.onClose
}), "close")
},
_attachMessage: function() {
this.attach(new m({
issue: this.options.issue,
onClick: this.options.onClick,
onClose: this.options.onClose
}), "message")
},
_attachCover: function() {
var e = this.attach(new u({
className: "v-cover-container",
areas: ["cover", "status"]
}), "cover");
e.attach(new c({
issue: this.options.issue
}), "cover");
var t = n(184);
e.attach(new t({
issue: this.options.issue,
button: !1,
hidePingu: this.options.hidePingu
}), "status"),
e.renderChildren().done()
}
})
, m = i.View.extend({
events: {
"click .btn-issue, .btn-purchase-issue": "_eClick",
"click .btn-okay": "_eClose"
},
className: "v-issue-acquired-message",
_eClick: function(e) {
this.options.onClick(e)
},
_eClose: function(e) {
this.options.onClose(e)
},
render: function() {
var e = l.getProviderOrDefault(this.options.issue.get("provider").id).get("name")
, t = s(this.options.issue.get("date")).calendar().toLowerCase()
, n = this.options.issue.getEmbedded("b:issue-acquisition");
this.el.innerHTML = f({
acquired: n.get("acquired"),
titleAcquired: p("item.text.read_for_free", [e, t]),
messageAcquired: p("item.text.subtext_all_articles_free"),
titleNotAcquired: p("item.dialogs.acquire.title_not_acquired", [e, t]),
buttonIssueText: p("item.text.browse_issue"),
buttonOkayText: p("app.buttons.i_get_it"),
buttonAcquireIssue: p("item.dialogs.acquire.btn_not_acquired", o(n.get("price")))
})
}
});
return h
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
389: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(25)
, i = n(5)
, s = n(4)
, r = n(170)
, a = n(3).locale
, o = n(1067)
, l = s.View.extend({
className: "v-item-suggestions",
initialize: function(e) {
this._setupModels(),
this.orientation = e.orientation,
this.addEventListener(window, "resize", this._resizePostTiles.bind(this)),
this.el.classList.add("type-" + e.type)
},
_setupModels: function() {
this.tiles = new r(null ,{
exclude: this.options.item.id,
track: !0
})
},
render: function() {
return this.el.innerHTML = o({
i18n: a,
type: this.options.type,
typeOfArticles: a.item.text[this.options.type]
}),
this.options.item.waitFor("links").then(this.fetchMore.bind(this)).fail(function(e) {
return 404 !== e.status ? t.reject(e) : (window.ErrorLogger.captureMessage("Failed loading " + e.xhr.responseURL),
t.resolve())
}).done(),
this
},
fetchMore: function() {
var e = this
, s = document.createDocumentFragment()
, r = n(862)
, a = i.clone(this.analytics)
, o = this.options;
return a.type = "readmore/" + o.type,
this.tiles.fetch({
url: o.url,
accept: "application/hal+json"
}).then(function() {
return 0 === e.tiles.length && o.onEmpty ? o.onEmpty() : void (e.el && (e.tiles.each(function(t, n) {
if (5 > n && (t.getEmbedded("b:item") || t.getEmbedded("item"))) {
a.readmoreNumber = n;
var i = e.addView(new r({
tile: t,
orientation: e.orientation,
analytics: a
}));
s.appendChild(i.render().el)
}
}),
e.el.querySelector(".v-items").appendChild(s),
i.each(e.getViews(), function(e) {
e.afterRender()
})))
}).fail(function(e) {
return e.status ? (window.ErrorLogger.captureMessage("Failed loading " + o.url),
t.resolve()) : t.reject(e)
}).done(),
this
},
hide: function() {
this.el.classList.add("hidden")
},
_resizePostTiles: function() {
i.each(this.getViews(), function(e) {
e.setHeight && e.setHeight()
})
}
});
return l
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
390: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(3)
, o = n(28)
, l = i(o)
, u = r["default"].createClass({
displayName: "PaymentFooter",
render: function() {
return r["default"].createElement("div", {
className: "dialogue-payment-footer"
}, r["default"].createElement(l["default"], {
className: "dialogue-payment-footer-link",
href: "/about/termsandconditions"
}, (0,
a.translate)("terms_and_conditions")), "  •  ", r["default"].createElement(l["default"], {
className: "dialogue-payment-footer-link",
href: "/about/privacy"
}, (0,
a.translate)("privacy_statement")))
}
});
t["default"] = u,
e.exports = t["default"]
},
391: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(5)
, i = n(34)
, s = n(4)
, r = n(16)
, a = n(13)
, o = n(12)
, l = n(30)
, u = s.ModuleController.extend({
refundItem: function(e, n, s, u, c) {
i.ajax({
async: !c,
url: r.get("links").user_items.href.replace("{user_id}", o.getId()) + "/" + e.id,
type: "DELETE"
}).then(function(i) {
if (200 === i.status) {
var r = e.getEmbedded("b:acquisition");
r.set("acquired", !1),
r.set("justAcquired", !1),
r.fetchRelation("b:issue-acquisition").done(),
t.has(e, "_embedded.item_content") && delete e._embedded.item_content,
a.track("Refund Item", {
provider: l.getProviderOrDefault(e.getEmbedded("manifest").get("provider").id).get("name"),
item_id: e.id,
wordcount: e.getEmbedded("manifest").get("length").words,
issue_id: e.getEmbedded("manifest").get("issue").id,
item_title: e.getEmbedded("manifest").getTitle(),
price: r.get("price"),
reason: "other" !== n ? n : s,
referrer: document.referrer
}),
o.getUser().addToBalance(r.get("price")),
o.getUser().set("reads", o.getUser().get("reads") - 1),
t.isFunction(u) && u(!0, i.refund_limit_exceeded === !0 && "refund_account_limit")
} else
202 === i.status && t.isFunction(u) && u(!1, "refund_account_limit")
}, function(e) {
403 === e.status ? t.isFunction(u) && u(!1, "refund_time_limit") : 429 === e.status ? t.isFunction(u) && u(!1, "refund_rate_limit") : t.isFunction(u) && u(!1, "unable_to_refund")
}).done()
},
refundReason: function(e, n, s, a) {
i.ajax({
url: r.get("links").refund_reason.href.replace("{user_id}", o.getId()).replace("{item_id}", e.id),
type: "POST",
data: JSON.stringify({
refund_code: n,
refund_message: s
})
}).then(function() {
t.isFunction(a) && a()
}).done()
}
});
return u
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
392: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = (n(16),
n(17),
n(758))
, s = n(757)
, r = n(12)
, a = t.Module.extend({
name: "refund",
type: "dialogue",
requireAuth: function() {
return r.requireSignup()
},
openRefundNotice: function(e, t) {
var n = this;
this.setController(new i({
module: this,
area: this.getArea(),
callback: t
})),
this.getController().showNoticeLoading(),
this.getController().refundItem(e, "close_within_x", null , function(t, i) {
n.getController() && n.getController().showNotice(e, i)
}),
this.load()
},
refundWithoutNotice: function(e, t) {
this.setController(new i({
module: this,
area: this.getArea(),
callback: t
})),
this.getController().refundItem(e, "close_within_x", null , null , !0),
this.load()
},
openRefundDialogue: function(e, n, i) {
this.setController(new s({
module: this,
area: this.getArea(),
callback: n
})),
t.history.navigate(t.history.fragment + "/refund"),
this.getController().showDialogue(e, i),
this.load()
}
});
return new a
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
393: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(8)
, d = n(37)
, p = (o(d),
n(369))
, f = o(p)
, h = n(82)
, m = o(h)
, g = n(762)
, v = o(g)
, y = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).call(this),
this.state = {
status: c.STATUS_INITIAL
}
}
return s(t, e),
r(t, null , [{
key: "propTypes",
value: {
layout: u["default"].PropTypes.oneOf(["button", "link"]),
alert: u["default"].PropTypes.string
},
enumerable: !0
}]),
r(t, [{
key: "componentWillReceiveProps",
value: function(e) {
this.props.alert !== e.alert && this.setState({
status: c.STATUS_INITIAL
})
}
}, {
key: "_onAdd",
value: function(e, t) {
var n = this;
this.setState({
status: c.STATUS_PENDING
}),
f["default"].add(e, t).then(function() {
n.setState({
status: c.STATUS_OK
})
})["catch"](function(e) {
if (e.type === c.XHR_STATUS && 422 === e.status)
return n.setState({
status: c.STATUS_OK
});
throw e
})
}
}, {
key: "render",
value: function() {
var e = this;
return u["default"].createElement(v["default"], {
layout: this.props.layout,
status: this.state.status,
onAdd: function(t) {
e._onAdd(m["default"].getState().user.id, e.props.alert)
}
})
}
}]),
t
}(u["default"].Component);
t["default"] = y,
e.exports = t["default"]
},
394: function(e, t, n) {
"use strict";
function i() {
var e = document.createElement("div");
return document.querySelector(".a-main").appendChild(e),
e
}
var s = n(5)
, r = n(2)
, a = n(15)
, o = (n(17),
n(92))
, l = n(117)
, u = n(231)
, c = n(11);
e.exports = r.createClass({
displayName: "exports",
propTypes: {
disabled: r.PropTypes.bool,
onClick: r.PropTypes.func.isRequired
},
mixins: [l()],
_scrollParentNode: null ,
_stickySubmitNode: null ,
_debouncedUpdate: null ,
getDefaultProps: function() {
return {
disabled: !0,
portal: i()
}
},
getInitialState: function() {
return {
visible: !1
}
},
componentWillMount: function() {
this._debouncedUpdate = s.debounce(this.updateVisiblity, 16)
},
componentDidMount: function() {
this._scrollParentNode = u(a.findDOMNode(this), ".pane"),
this._scrollParentNode.addEventListener("scroll", this._debouncedUpdate)
},
componentWillUnmount: function() {
this._scrollParentNode.removeEventListener("scroll", this._debouncedUpdate)
},
layerDidUnmount: function() {
this._target && this._target.parentNode && this._target.parentNode.removeChild(this._target)
},
componentWillReceiveProps: function(e) {
e.disabled ? this._scrollParentNode.removeEventListener("scroll", this._debouncedUpdate) : !e.disabled && this.props.disabled && this._scrollParentNode.addEventListener("scroll", this._debouncedUpdate)
},
updateVisiblity: function() {
if (this.isMounted()) {
var e = 250
, t = this._scrollParentNode.clientHeight + this._scrollParentNode.scrollTop + e
, n = t > this._scrollParentNode.scrollHeight;
this.setState({
visible: !n
})
}
},
_renderButton: function(e) {
if (this.props.disabled)
return r.createElement("span", null );
var t = c(["sticky-submit", {
visible: this.state.visible
}]);
return r.createElement("div", {
className: t,
"aria-hidden": !0
}, r.createElement(o, {
onClick: e,
loading: this.props.loading
}))
},
renderLayer: function() {
return this._renderButton(this.props.onClick)
},
render: function() {
return r.createElement("span", null )
}
})
},
395: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = (r(a),
n(19))
, l = r(o)
, u = n(134)
, c = r(u)
, d = function() {
function e() {
s(this, e),
this.bindActions(c["default"]),
this.state = {
login: {
status: a.STATUS_INITIAL
},
loginEmail: {
status: a.STATUS_INITIAL
}
}
}
return i(e, [{
key: "onSetEmail",
value: function(e) {
this.setState({
login: {
email: e
}
})
}
}, {
key: "onLoginWithCredentials",
value: function() {
this.setState({
login: {
status: a.STATUS_PENDING
},
loginEmail: {
status: a.STATUS_INITIAL
}
})
}
}, {
key: "onLoginSuccess",
value: function() {
this.setState({
login: {
status: a.STATUS_OK
}
})
}
}, {
key: "onLoginError",
value: function(e) {
this.setState({
login: {
status: a.STATUS_ERROR,
error: e
}
})
}
}, {
key: "onSendLoginEmailSuccess",
value: function() {
this.setState({
loginEmail: {
status: a.STATUS_OK
}
})
}
}, {
key: "onSendLoginEmailError",
value: function(e) {
this.setState({
loginEmail: {
status: a.STATUS_ERROR,
error: e
}
})
}
}]),
e
}();
t["default"] = l["default"].createStore(d, "LoginStore"),
e.exports = t["default"]
},
396: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = r(a)
, l = n(19)
, u = r(l)
, c = n(218)
, d = r(c)
, p = function() {
function e() {
s(this, e),
this.status = o["default"].STATUS_INITIAL,
this.bindActions(d["default"])
}
return i(e, [{
key: "onSetInactive",
value: function(e) {
var t = e.active;
this.setState({
active: t
})
}
}, {
key: "onSetActive",
value: function(e) {
var t = e.active;
this.setState({
active: t
})
}
}, {
key: "onFetchNewsStand",
value: function() {
this.setState({
status: o["default"].STATUS_PENDING
})
}
}, {
key: "onFetchNewsStandSuccess",
value: function(e) {
var t = e.newsStand;
this.setState({
status: o["default"].STATUS_OK,
newsStand: t
})
}
}, {
key: "onFetchNewsStandError",
value: function(e) {
var t = e.message;
this.setState({
status: o["default"].STATUS_ERROR,
newsStand: null ,
message: t
})
}
}]),
e
}();
t["default"] = u["default"].createStore(p, "NewsStandStore"),
e.exports = t["default"]
},
397: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = r(a)
, l = n(19)
, u = r(l)
, c = n(166)
, d = r(c)
, p = n(319)
, f = r(p)
, h = function() {
function e() {
s(this, e),
this.bindActions(d["default"]),
this.notifications = new f["default"],
this.status = o["default"].STATUS_INITIAL
}
return i(e, [{
key: "onFetchNotifications",
value: function(e) {
this.setState({
status: o["default"].STATUS_PENDING,
notifications: e
})
}
}, {
key: "onFetchNotificationsSuccess",
value: function(e) {
this.setState({
status: o["default"].STATUS_OK,
notifications: e
})
}
}, {
key: "onFetchNotificationsError",
value: function(e) {
this.setState({
status: o["default"].STATUS_ERROR,
message: e
})
}
}, {
key: "onFetchNextNotifications",
value: function() {
this.setState({
status: o["default"].STATUS_PENDING
})
}
}, {
key: "onFetchNextNotificationsSuccess",
value: function(e) {
this.setState({
status: o["default"].STATUS_OK,
notifications: e
})
}
}]),
e
}();
t["default"] = u["default"].createStore(h, "NotificationsStore"),
e.exports = t["default"]
},
398: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = n(19)
, l = r(o)
, u = n(167)
, c = r(u)
, d = function() {
function e() {
s(this, e),
this.status = a.STATUS_INITIAL,
this.error = null ,
this.sentTo = null ,
this.loadingPlatforms = {},
this.bindActions(c["default"])
}
return i(e, [{
key: "onLoadPlatform",
value: function(e) {
var t = this.loadingPlatforms;
t[e] = a.STATUS_PENDING,
this.setState({
loadingPlatforms: t
})
}
}, {
key: "onLoadPlatformSuccess",
value: function(e) {
var t = this.loadingPlatforms;
delete t[e],
this.setState({
loadingPlatforms: t
})
}
}, {
key: "onShareItemToEmailSuccess",
value: function(e) {
this.setState({
status: a.STATUS_OK,
sentTo: e
})
}
}, {
key: "onShareItemToEmailError",
value: function(e) {
var t = e.error;
this.setState({
status: a.STATUS_ERROR,
error: t.message
})
}
}]),
e
}();
t["default"] = l["default"].createStore(d, "ShareStore"),
e.exports = t["default"]
},
399: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = n(19)
, l = r(o)
, u = n(219)
, c = r(u)
, d = function() {
function e() {
s(this, e),
this.product = null ,
this.status = a.STATUS_INITIAL,
this.jwt = null ,
this.bindActions(c["default"])
}
return i(e, [{
key: "onFetchProduct",
value: function() {
this.setState({
status: a.STATUS_PENDING,
jwt: null
})
}
}, {
key: "onFetchProductSuccess",
value: function(e) {
this.setState({
product: e,
status: a.STATUS_OK
})
}
}, {
key: "onFetchProductError",
value: function() {
this.setState({
status: a.STATUS_ERROR
})
}
}, {
key: "onCreateOrder",
value: function() {
this.setState({
status: a.STATUS_PENDING
})
}
}, {
key: "onCreateOrderSuccess",
value: function(e) {
this.setState({
jwt: e,
status: a.STATUS_OK
})
}
}]),
e
}();
t["default"] = l["default"].createStore(d, "SubscriptionsProductsStore"),
e.exports = t["default"]
},
400: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"]
, r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(8)
, o = n(19)
, l = r(o)
, u = n(220)
, c = r(u)
, d = n(114)
, p = r(d)
, f = function() {
function e() {
s(this, e),
this.status = a.STATUS_INITIAL,
this.errorMessage = null ,
this.connected = !1,
this.friends = [],
this.bindActions(c["default"]),
this.bindAction(p["default"].UPDATE, this.onUpdateUser)
}
return i(e, [{
key: "onUpdateUser",
value: function(e) {
this.setState({
connected: "string" == typeof e.get("twitter_id")
})
}
}, {
key: "onToggleTwitter",
value: function() {
this.setState({
status: a.STATUS_PENDING,
error: null
})
}
}, {
key: "onConnectTwitter",
value: function() {
this.setState({
status: a.STATUS_PENDING,
error: null
})
}
}, {
key: "onTwitterError",
value: function() {
this.setState({
status: a.STATUS_ERROR
})
}
}, {
key: "onTwitterConnectSuccess",
value: function() {
this.setState({
status: a.STATUS_OK
})
}
}, {
key: "onTwitterDisconnectSuccess",
value: function() {
this.setState({
status: a.STATUS_OK,
connected: !1
})
}
}, {
key: "onFetchTwitterFriendsSuccess",
value: function(e) {
this.setState({
friends: e
})
}
}]),
e
}();
t["default"] = l["default"].createStore(f, "TwitterStore"),
e.exports = t["default"]
},
401: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(25)
, s = n(5)
, r = n(104)
, a = t.View.extend({
className: "v-composite",
initialize: function(e) {
this._areas = [],
e = e || {},
e.className && this.el.setAttribute("class", this.options.className),
e && e.areas && (this._areas = e.areas.map(function(e) {
return {
name: e,
view: null
}
}, this))
},
attach: function(e, t, n) {
r(s.isString(t), "CompositeView.attach: Area must be a string");
var i = this._detach(t);
return n || (n = i >= 0 ? i : this._areas.length),
this._insertArea(t, e, n),
this.options && this.options.zIndexIncrement && this.resetAreaIndexes(),
e && e.el && this._insertViewIntoDOM(e, n),
e
},
detach: function(e) {
this.attach(null , e)
},
_detach: function(e) {
var t = this._getArea(e)
, n = this._areaIndex(t && t.name);
return n >= 0 && t && t.view && this.removeView(t.view),
n
},
_insertArea: function(e, t, n) {
var i = {
name: e,
view: t ? this.addView(t, e) : null
};
return this._areas[n] = i,
i
},
_getArea: function(e) {
return s.findWhere(this._areas, {
name: e
})
},
_areaIndex: function(e) {
var t = this._areas.indexOf(s.findWhere(this._areas, {
name: e
}));
return 0 > t ? null : t
},
_nextActiveArea: function(e) {
return s.first(s.filter(this._areas, function(t, n) {
return n > e && t.view && t.view.el
}))
},
_insertViewIntoDOM: function(e, t) {
var n = this._nextActiveArea(t);
n ? this.el.insertBefore(e.el, n.view.el) : this.el.appendChild(e.el)
},
render: function() {
return this
},
renderChildren: function(e) {
return i.all(s.map(s.filter(this._areas, function(t) {
return e ? e.indexOf(t.name) >= 0 : !0
}), function(e) {
return i.when(!e.view || e.view.render.call(e.view))
}))
},
resetAreaIndexes: function() {
s.each(this._areas, function(e, t) {
e.view && e.view.el && (e.view.el.style.zIndex = (this.options.zIndexIncrement > 0 ? 0 : this._areas.length - 1) + t * this.options.zIndexIncrement)
}, this)
}
});
return a
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
402: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(5)
, s = n(104)
, r = n(232)
, a = n(3).locale
, o = n(1051)
, l = n(1052)
, u = t.View.extend({
tagName: "a",
className: "v-cover cover",
initialize: function(e) {
s(i.isObject(e), "CoverView: An options object is required"),
s(i.isObject(e), "CoverView: An issue object is required"),
this.setState("loading"),
e && !e.size && (this.options.size = "original"),
this._coverImage = new r(this.options.issue.getCoverURL()),
this.el.classList.add(this.options.issue.get("provider").id),
"tiles" === this.options.issue.get("representations")[0] && this.setLayout("web"),
e.href && this.el.setAttribute("href", this.options.href),
e.onClick && this.addEventListener(this.el, "click", e.onClick)
},
render: function() {
return this.el.innerHTML = o({
provider: this.options.issue.get("provider")
}),
this.setupDomLinks({
canvas: ".image-canvas"
}),
this.options.hasHoverState && this.el.insertAdjacentHTML("beforeend", l({
i18n: a
})),
this._coverImage.load(this.options.size).then(this._setImage.bind(this)).fail(function() {}).done(),
this
},
_setImage: function(e) {
if (this.dom.canvas.appendChild(e.el),
!this.options.ignoreSize) {
var t = this.options.issue.getCoverWidth()
, n = this.options.issue.getCoverHeight();
this.el.style.height = Math.ceil(this.el.offsetWidth * (n / t)) + "px",
this.el.style.width = Math.ceil(this.el.offsetHeight * (t / n)) + "px"
}
this.display()
}
});
return u
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
403: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(5)
, i = n(4)
, s = n(1057)
, r = i.View.extend({
template: s,
className: "frm-field-wrapper",
type: "text",
name: "defaultName",
placeholder: "placeholder",
value: "",
maxlength: "",
autoFocus: !1,
autoComplete: !0,
classNames: [],
keyUpChangeTimeout: 700,
toLowerCase: !1,
_keyUpChangePrevValue: null ,
typeClassMapping: {
text: "text",
email: "text",
file: "file"
},
events: {
"click input": "_eClick",
"change input": "_eChange",
"focus input": "_eFocus",
"blur input": "_eBlur",
"keyup input": "_eKeyUp",
"keydown input": "_eKeyDown"
},
_eClick: function() {},
_eChange: function() {},
_eFocus: function() {},
_eBlur: function() {},
_eKeyUp: function() {},
_eKeyDown: function() {},
initialize: function(e) {
this.setup(e)
},
validate: function() {
return !0
},
reset: function() {
this.resetKeyUpChange()
},
transformValue: function(e) {
return this.toLowerCase && (e = e.toLowerCase()),
e
},
getValue: function() {
return this.dom ? this.transformValue(this.dom.input.value) : void 0
},
setValue: function(e) {
this.dom && (this.dom.input.value = this.transformValue(e))
},
setup: function(e) {
this.options = t.defaults(e, {
type: this.type,
name: this.name,
placeholder: this.placeholder,
value: this.value,
maxlength: this.maxlength,
autoFocus: this.autoFocus,
autoComplete: this.autoComplete,
classNames: this.classNames,
keyUpChangeTimeout: this.keyUpChangeTimeout
})
},
_setupKeyUpChange: function(e) {
var n = t.debounce(this._keyUpHasChanged.bind(this), e);
this._keyUpChangePrevValue = this.getValue(),
this.dom.input.addEventListener("keyup", n, !1)
},
_keyUpHasChanged: function(e) {
if (this.dom) {
var t = this.getValue();
t !== this._keyUpChangePrevValue && (e.preventDefault(),
this._keyUpChangePrevValue = t,
this.setValue(t),
this._eChange(e))
}
},
resetKeyUpChange: function() {
this._keyUpChangePrevValue = null
},
setClassNames: function() {
var e = this
, n = this.options.classNames || [];
n.push("inp-" + this.typeClassMapping[this.options.type] || this.options.type),
n.push("inp-" + this.options.name),
this.toLowerCase && n.push("lowercase"),
t.each(n, function(t) {
e.dom.input.classList.add(t)
})
},
setAttributes: function() {
this.dom.input && (this.options.autocapitalize === !1 && this.dom.input.setAttribute("autocapitalize", "off"),
this.options.autocomplete === !1 && this.dom.input.setAttribute("autocomplete", "off"),
this.options.autoFocus === !0 && this.dom.input.setAttribute("autofocus", "true"),
this.options.autocorrect === !1 && this.dom.input.setAttribute("autocorrect", "off"),
this.options.disabled === !0 ? this.dom.input.setAttribute("disabled", "disabled") : this.dom.input.removeAttribute("disabled"),
!this.options.autofocus || "Explorer" === window.BrowserDetect.browser && window.BrowserDetect.version <= 11 || this.dom.input.setAttribute("autofocus", !0))
},
setError: function(e) {
this.resetError();
var t = document.createElement("div");
t.className = "error-message visible",
t.innerHTML = e,
this.dom.input.parentNode.appendChild(t),
this.dom.error = t
},
resetError: function() {
this.dom.error && (this.dom.error.parentNode.removeChild(this.dom.error),
this.dom.error = null )
},
setDisabled: function(e) {
this.options.disabled = e,
this.setAttributes()
},
render: function() {
return this.el.innerHTML = this.template(this.options),
this.dom.input = this.el.querySelector("input"),
this.setClassNames(),
this.setAttributes(),
this.options.keyUpChangeTimeout && this._setupKeyUpChange(this.options.keyUpChangeTimeout),
this
}
});
return r
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
404: function(e, t, n) {
var i;
i = function() {
"use strict";
var e = n(8).keyCode
, t = {
events: {
"change .inp": "_onChange",
"keyup .inp": "_eOnKeyUp",
"keydown .inp": "_eOnKeyDown",
"focus .inp": "_onFocus",
"blur .inp": "_onBlur"
},
initialize: function() {
this._value = this.options.value,
this.options.className && this.el.setAttribute("class", this.options.className),
this.options.layout && this.el.classList.add("l-" + this.options.layout),
this._disabled = this.options.disabled
},
render: function() {
return this._addInput(),
this.options.showLimit && this._addLimit(),
this.options.disabled && this.disable(),
this
},
setValue: function(e) {
return this._value = e,
this._inputEl.value = e,
this._updateLimit(this.options.limit - e.length),
e
},
getValue: function() {
return this._value
},
setSuccess: function() {
this.setState("success")
},
setError: function() {
this.setState("error")
},
setLoading: function() {
this.setState("loading")
},
focus: function() {
this._inputEl.focus(),
this.options.onFocus && this.options.onFocus()
},
disable: function() {
this._disabled = !0,
this._inputEl.setAttribute("readonly", ""),
this.setState("inactive")
},
enable: function() {
this._disabled = !1,
this._inputEl.removeAttribute("readonly"),
this.removeState("inactive")
},
_addInput: function() {
return this._inputEl = document.createElement(this.inputTagName || "input"),
this._inputEl.classList.add("inp"),
this._inputEl.classList.add("inp-" + this.inputTagType || "text"),
this._inputEl.setAttribute("type", this.inputTagType || "text"),
this.options.value && (this._inputEl.value = this.options.value),
this.options.placeholder && this._inputEl.setAttribute("placeholder", this.options.placeholder),
this.el.appendChild(this._inputEl),
this._inputEl
},
_addLimit: function() {
return this._limitEl = document.createElement("p"),
this._limitEl.classList.add("limit"),
this.el.appendChild(this._limitEl),
this._updateLimit(this.options.limit),
this._limitEl
},
_onFocus: function() {
this.onFocus && this.onFocus()
},
_onBlur: function() {
this._onBlur && this._onBlur()
},
_onChange: function() {
this._value = this._inputEl.value,
this._updateLimit(this.options.limit - this._value.length),
this.options.onChange && this.options.onChange(this._value)
},
_onSubmit: function() {
this.options.onSubmit && this.options.onSubmit(this.getValue())
},
_eOnKeyUp: function(t) {
return t.ctrlKey ? void 0 : t.keyCode >= e.ARROW_LEFT && t.keyCode <= e.ARROW_DOWN ? (t.stopPropagation(),
!1) : void this._onChange()
},
_eOnKeyDown: function(t) {
return t.ctrlKey ? void 0 : this.options.submitOnEnter && t.keyCode === e.RETURN ? (t.preventDefault(),
this._onSubmit(),
!1) : t.keyCode >= e.ARROW_LEFT && t.keyCode <= e.ARROW_DOWN ? (t.stopPropagation(),
!1) : void 0
},
_updateLimit: function(e) {
this.options.showLimit && (this._limitEl.innerHTML = e),
e >= 0 ? this.removeState("limit") : this.setState("limit"),
0 >= e && this.options.onLimit && this.options.onLimit(e)
}
};
return t
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
405: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(3).locale
, s = n(1050)
, r = t.View.extend({
className: "v-close",
events: {
"click .btn-close": "_eCloseByClick"
},
render: function() {
return this.delegateEvents(),
this.el.innerHTML = s({
i18n: i
}),
this
},
_eCloseByClick: function() {
this.options.onClick ? this.options.onClick(this.getController()) : this.getController().close()
}
});
return r
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
418: function(e, t, n) {
var i = n(74)
, s = n(61)
, r = n(155);
e.exports = function(e) {
return function(t, n, a) {
var o, l = i(t), u = s(l.length), c = r(a, u);
if (e && n != n) {
for (; u > c; )
if (o = l[c++],
o != o)
return !0
} else
for (; u > c; c++)
if ((e || c in l) && l[c] === n)
return e || c;
return !e && -1
}
}
},
419: [5932, 29, 85, 199, 83, 201, 84, 152, 267, 431, 130, 60, 36, 200, 71],
420: [5933, 152, 194],
421: function(e, t, n) {
"use strict";
var i = n(85)
, s = n(199)
, r = n(39)
, a = n(36)
, o = n(201)
, l = n(152)
, u = n(193)
, c = n(60)
, d = n(130)("weak")
, p = Object.isExtensible || a
, f = u(5)
, h = u(6)
, m = 0
, g = function(e) {
return e._l || (e._l = new v)
}
, v = function() {
this.a = []
}
, y = function(e, t) {
return f(e.a, function(e) {
return e[0] === t
})
}
;
v.prototype = {
get: function(e) {
var t = y(this, e);
return t ? t[1] : void 0
},
has: function(e) {
return !!y(this, e)
},
set: function(e, t) {
var n = y(this, e);
n ? n[1] = t : this.a.push([e, t])
},
"delete": function(e) {
var t = h(this.a, function(t) {
return t[0] === e
});
return ~t && this.a.splice(t, 1),
!!~t
}
},
e.exports = {
getConstructor: function(e, t, n, i) {
var r = e(function(e, s) {
o(e, r, t),
e._i = m++,
e._l = void 0,
void 0 != s && l(s, n, e[i], e)
});
return s(r.prototype, {
"delete": function(e) {
return a(e) ? p(e) ? c(e, d) && c(e[d], this._i) && delete e[d][this._i] : g(this)["delete"](e) : !1
},
has: function(e) {
return a(e) ? p(e) ? c(e, d) && c(e[d], this._i) : g(this).has(e) : !1
}
}),
r
},
def: function(e, t, n) {
return p(r(t)) ? (c(t, d) || i(t, d, {}),
t[d][e._i] = n) : g(e).set(t, n),
e
},
frozenStore: g,
WEAK: d
}
},
422: [5936, 36, 42],
423: function(e, t, n) {
"use strict";
var i = n(39);
e.exports = function() {
var e = i(this)
, t = "";
return e.global && (t += "g"),
e.ignoreCase && (t += "i"),
e.multiline && (t += "m"),
e.unicode && (t += "u"),
e.sticky && (t += "y"),
t
}
},
424: [5939, 74, 29],
425: [5941, 42],
426: [5943, 153, 40],
427: function(e, t, n) {
var i = n(36)
, s = Math.floor;
e.exports = function(e) {
return !i(e) && isFinite(e) && s(e) === e
}
},
428: function(e, t, n) {
var i = n(36)
, s = n(95)
, r = n(40)("match");
e.exports = function(e) {
var t;
return i(e) && (void 0 !== (t = e[r]) ? !!t : "RegExp" == s(e))
}
},
429: [5945, 39],
430: [5946, 29, 108, 154, 85, 40],
431: 411,
432: function(e, t) {
e.exports = Math.log1p || function(e) {
return (e = +e) > -1e-8 && 1e-8 > e ? e - e * e / 2 : Math.log(1 + e)
}
},
433: [5953, 29, 74],
434: function(e, t, n) {
var i = n(29)
, s = n(39)
, r = n(42).Reflect;
e.exports = r && r.ownKeys || function(e) {
var t = i.getNames(s(e))
, n = i.getSymbols;
return n ? t.concat(n(e)) : t
}
},
435: 903,
436: [5957, 42],
437: function(e, t, n) {
var i = n(61)
, s = n(438)
, r = n(84);
e.exports = function(e, t, n, a) {
var o = String(r(e))
, l = o.length
, u = void 0 === n ? " " : String(n)
, c = i(t);
if (l >= c)
return o;
"" == u && (u = " ");
var d = c - l
, p = s.call(u, Math.ceil(d / u.length));
return p.length > d && (p = p.slice(0, d)),
a ? p + o : o + p
}
},
438: function(e, t, n) {
"use strict";
var i = n(156)
, s = n(84);
e.exports = function(e) {
var t = String(s(this))
, n = ""
, r = i(e);
if (0 > r || r == 1 / 0)
throw RangeError("Count can't be negative");
for (; r > 0; (r >>>= 1) && (t += t))
1 & r && (n += t);
return n
}
},
439: [5960, 83, 197, 425, 422, 42, 95],
440: [5965, 194, 40, 153, 96],
441: [5967, 129, 431, 153, 74, 267],
445: function(e, t, n) {
n(22);
e.exports = function(e) {
var t, n = [], i = e || {};
return function(e, i) {
e && n.push('<p class="item-image-caption">' + (null == (t = e) ? "" : t) + "</p>"),
i && n.push('<p class="item-image-credit">' + (null == (t = i) ? "" : t) + "</p>")
}
.call(this, "caption" in i ? i.caption : "undefined" != typeof caption ? caption : void 0, "credit" in i ? i.credit : "undefined" != typeof credit ? credit : void 0),
n.join("")
}
},
507: function(e, t, n) {
var i, s = n(21)["default"];
i = function(e) {
"use strict";
var t = n(4)
, i = n(5)
, r = n(12)
, a = n(38)
, o = n(13)
, l = n(80)
, u = n(119)
, c = n(65)
, d = n(379)
, p = (n(352),
n(3).locale)
, f = n(3).translate
, h = n(1079)
, m = n(8)
, g = n(35)
, v = t.View.extend({
className: "pane v-facebook-connect connect",
events: {
"click .lnk-not-you": "_eFacebookLogout",
"click .btn-facebook": "_eFacebookConnect"
},
initialize: function() {
this.options = i.defaults(this.options, {
text: p.app.buttons.connect_to_facebook
}),
this._onFail = this.options.onFail,
this._onConnect = this.options.onConnect,
l.load()["catch"](function(e) {
if (e.type !== m.LIBRARY_UNAVAILABLE)
throw e
})
},
render: function() {
return this.delegateEvents(),
this.el.innerHTML = h({
i18n: p,
text: this.options.text
}),
this.dom = {
button: this.el.querySelector(".btn-facebook"),
promise: this.el.querySelector(".fb-promise"),
not_you: this.el.querySelector(".lnk-not-you")
},
l.load().then(this._facebookLoad.bind(this))["catch"](this._facebookFail.bind(this)),
l.loggedIn()["catch"](function(e) {
if ("UnableToLogin" !== e.type && e.type !== m.LIBRARY_UNAVAILABLE)
throw e
}),
this.display(),
this
},
_facebookLoad: function() {
this.dom.button.classList.remove("s-inactive"),
l.getMe().then(this._addFacebookIdentity.bind(this))["catch"](this._facebookDone.bind(this)),
this.trigger("load")
},
_facebookFail: function(e) {
this.dom && (this.dom.button.textContent = p.app.error.facebook_unavailable,
this.dom.promise.textContent = p.app.error.facebook_unavailable_hint,
this._facebookDone(),
this.trigger("fail"))
},
_facebookDone: function(e) {
this.dom && (this.dom.button.classList.remove("s-loading"),
e && e.type === m.LIBRARY_UNAVAILABLE && this._facebookFail(e))
},
_addFacebookIdentity: function(e) {
this.dom.button.innerHTML = f("app.buttons.continue_as", e.first_name),
this.dom.not_you.classList.remove("s-inactive"),
this._facebookDone()
},
_removeFacebookIdentity: function() {
this.dom.button.textContent = this.options.text,
this.dom.not_you.classList.add("s-inactive")
},
_addConnectedMessage: function() {
this.dom && this.options && this.options.showConnected !== !1 && (this.dom.button.textContent = p.app.buttons.connected)
},
_eFacebookConnect: function() {
var e = this.dom.button;
e.classList.contains("s-inactive") || e.classList.contains("s-loading") || e.classList.contains("redirect") || (e.classList.add("s-loading"),
u.login().then(this._facebookLoginSuccess.bind(this), this._facebookLoginFailure.bind(this)).done())
},
_facebookLoginSuccess: function() {
this._addConnectedMessage(),
this._onConnect("signIn"),
this.trigger("connect")
},
_facebookLoginFailure: function(e) {
var t = this;
if (!e.status)
return void this._facebookDone();
var n = function(e) {
t._onFail && t._onFail(e),
t._facebookDone()
}
;
return "authorized_new_user" === e.status ? void this._facebookAuthorizedNewUser(e.authResponse.userID, e.authResponse.accessToken).then(function(e) {
t._onConnect("signUp", e),
t.trigger("connect")
}, n).done() : void n(new g(m.FACEBOOK_FAILURE,"Unable to process login",e))
},
_facebookAuthorizedNewUser: function(e, t) {
var n = new d(s({
facebook_id: e,
facebook_access_token: t,
country: a.getCountryCode()
}, this.options.signUpContext));
return o.trackUserSignup(this.options.analyticsEvent, "facebook"),
c.signup(n).then(function(e) {
return r.loginWithToken(e)
}).then(function(e) {
return e.get("user")
})
},
_eFacebookLogout: function() {
var e = this;
this.dom.button.classList.contains("s-inactive") || this.dom.button.classList.contains("s-loading") || (this.dom.button.classList.add("s-loading"),
l.logout().then(function() {
e._removeFacebookIdentity(),
e.dom.button.classList.remove("s-loading"),
e.trigger("logout")
}).done())
}
});
return v
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
508: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = (n(5),
n(371))
, i = n(403)
, s = n(854)
, r = n(3)
, a = i.extend({
type: "email",
name: "email",
autoComplete: !1,
toLowerCase: !0,
keyUpChangeTimeout: 300,
_eChange: function() {
this.checkForCommonMistakes()
},
_eKeyDown: function(e) {
this.options.onKeyDown && this.options.onKeyDown(e)
},
checkForCommonMistakes: function() {
var e = t.checkForCommonMistakes(this.getValue());
e ? this.drawSuggestion(e) : this.resetSuggestion()
},
drawSuggestion: function(e) {
var t = this;
if (!this.getView("suggestion")) {
var n = this.addView(new s({
accept: function(e) {
t.setValue(e),
t.removeView(t.getView("suggestion"));
var n = t.el.querySelector(".v-inp-suggestion");
n && t.el.removeChild(n)
}
}), "suggestion");
this.el.appendChild(n.render().el)
}
this.getView("suggestion").suggest(e, r.translate("app.text.did_you_mean", e))
},
resetSuggestion: function() {
this.getView("suggestion") && this.getView("suggestion").reset()
},
reset: function() {
this.resetSuggestion(),
i.prototype.reset.apply(this)
}
});
return a
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
518: function(e, t, n) {
(function(e) {
"use strict";
if (n(1034),
n(1158),
e._babelPolyfill)
throw new Error("only one instance of babel/polyfill is allowed");
e._babelPolyfill = !0
}
).call(t, function() {
return this
}())
},
519: function(e, t, n) {
e.exports = n(518)
},
533: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(377)
, s = t.Collection.extend({
model: i,
parse: function(e) {
return e._links.next && (this.next = e._links.next.href),
e._links.prev && (this.prev = e._links.prev.href),
e._links.results && (this.results = e._links.results.href),
e._embedded.alerts.length && e._embedded.alerts.unshift({
_links: e._links,
queried_at: e.queried_at,
all: !0,
active: !1,
id: 0,
query: e.query
}),
e._embedded.alerts
}
});
return s
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
534: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(101)
, r = i(s)
, a = n(378)
, o = i(a);
t["default"] = r["default"].extend({
model: function(e, t) {
return new o["default"](e,t)
}
}),
e.exports = t["default"]
},
535: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = t.Collection.extend({
collectionKeyString: "deposits"
});
return i
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
536: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(4)
, r = i(s);
t["default"] = r["default"].Collection.extend({
parse: function(e) {
return e._embedded.favourites
}
}),
e.exports = t["default"]
},
537: function(e, t, n) {
var i, s;
i = [n(4), n(671)],
s = function(e, t) {
"use strict";
var n = e.Collection.extend({
model: t,
parse: function(e) {
return e._links.self && (this.url = e._links.self.href),
e._links.next ? this.next = e._links.next.href : this.next = void 0,
e._links.prev ? this.prev = e._links.prev.href : this.prev = void 0,
e.sections && (this.sections = e.sections),
e.pages
}
});
return n
}
.apply(t, i),
!(void 0 !== s && (e.exports = s))
},
538: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(121)
, s = t.Collection.extend({
model: i,
key: "_embedded.posts",
parse: function(e) {
return e.total && (this.total = e.total),
this.parseHal(e)
},
comparator: function(e) {
var t = new Date(e.get("date"));
return -t.getTime()
},
getPostByUserId: function(e) {
return this.find(function(t) {
return t.getEmbedded("user").id === e ? t : void 0
})
}
});
return s
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
539: function(e, t, n) {
var i, s;
i = [n(4), n(675)],
s = function(e, t) {
"use strict";
var n = e.Collection.extend({
model: t,
collectionKeyString: "_embedded.provider_accounts"
});
return n
}
.apply(t, i),
!(void 0 !== s && (e.exports = s))
},
540: function(e, t, n) {
var i, s;
i = [n(4), n(677)],
s = function(e, t) {
"use strict";
var n = e.Collection.extend({
model: t,
key: "_embedded.transactions",
allowed_transactions: ["purchase", "refund", "auto-refund"],
parse: function(e) {
for (var t = [], n = 0; n < e._embedded.transactions.length; n++)
this.allowed_transactions.indexOf(e._embedded.transactions[n].type) > -1 && t.push(e._embedded.transactions[n]);
return e._embedded.transactions = t,
this.parseHal(e)
},
comparator: function(e) {
return -e.get("created_at")
}
});
return n
}
.apply(t, i),
!(void 0 !== s && (e.exports = s))
},
541: function(e, t, n) {
"use strict";
var i = n(21)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(4);
t["default"] = s.Collection.extend({
product: null ,
key: "_embedded.b:orders",
model: s.Model,
parse: function(e) {
var t = this;
return e._embedded && (e._embedded["b:orders"] = e._embedded["b:orders"].map(function(e) {
return i({}, e, {
product: t.product
})
})),
this.parseHal(e)
},
comparator: function(e) {
return -e.get("created_at")
}
}),
e.exports = t["default"]
},
542: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(21)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(2)
, c = l(u)
, d = n(11)
, p = l(d)
, f = n(28)
, h = l(f)
, m = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
var e = "/channel/" + this.props.channel.id
, t = (0,
p["default"])("v-channel-name", "channel", "channel-" + this.props.channel.id, this.props.className);
return c["default"].createElement(h["default"], o({}, this.props, {
className: t,
href: e,
title: this.props.channel.get("full_name")
}), this.props.channel.get("full_name"))
}
}], [{
key: "propTypes",
value: {
channel: c["default"].PropTypes.object.isRequired,
className: c["default"].PropTypes.any
},
enumerable: !0
}]),
t
}(c["default"].Component);
t["default"] = m,
e.exports = t["default"]
},
543: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(26)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(2)
, c = l(u)
, d = n(15)
, p = l(d)
, f = n(544)
, h = l(f)
, m = n(11)
, g = l(m)
, v = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "componentDidMount",
value: function() {
this.confetti()
}
}, {
key: "orientationWatchListener",
value: function() {
this.canvasW = this.canvas.width = this.canvas.scrollWidth,
this.canvasH = this.canvas.height = this.canvas.scrollHeight
}
}, {
key: "confetti",
value: function n() {
var e = this;
this.canvas = p["default"].findDOMNode(this.refs.canvas);
var t = this.canvas.getContext("2d")
, i = 50
, n = [];
this.orientationWatchListener(),
this.orientationWatch = window.matchMedia("(orientation: portrait)"),
this.orientationWatch.addListener(this.orientationWatchListener.bind(this));
for (var s = 0; i > s; s++)
n.push(new h["default"](this));
var r = function a() {
t.clearRect(0, 0, e.canvasW, e.canvasH);
for (var s = 0; i > s; s++) {
var r = n[s];
r.draw(t)
}
e.requestId = window.requestAnimationFrame(a)
}
;
this.requestId = window.requestAnimationFrame(r)
}
}, {
key: "render",
value: function() {
var e = (0,
g["default"])("c-confetti", o({}, this.props.className, this.props.className));
return c["default"].createElement("div", null , c["default"].createElement("canvas", {
className: e,
ref: "canvas"
}), this.props.children)
}
}], [{
key: "propTypes",
value: {
children: c["default"].PropTypes.array
},
enumerable: !0
}]),
t
}(c["default"].Component);
t["default"] = v,
e.exports = t["default"]
},
544: function(e, t, n) {
"use strict";
var i = n(7)["default"]
, s = n(6)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = function() {
function e(t) {
s(this, e),
this.COLORS = [[235, 119, 136], [253, 208, 117], [215, 150, 171]],
this.PI_2 = 2 * Math.PI,
this.view = t,
this.style = this.COLORS[~~this.range(0, 3)],
this.rgb = "rgba(" + this.style[0] + ", " + this.style[1] + ", " + this.style[2],
this.r = ~~this.range(2, 5),
this.r2 = 2 * this.r,
this.replace()
}
return i(e, [{
key: "range",
value: function(e, t) {
return Math.random() * (t - e) + e
}
}, {
key: "replace",
value: function() {
this.opacity = 0,
this.dop = .01 * this.range(1, 4),
this.x = this.range(0, this.view.canvasW - this.r2),
this.y = this.range(-40, this.view.canvasH),
this.xmax = this.view.canvasW - this.r,
this.ymax = this.view.canvasH - this.r,
this.vx = this.range(0, 1),
this.vy = .4 * this.r
}
}, {
key: "draw",
value: function(e) {
this.x += this.vx,
this.y += this.vy,
this.opacity += this.dop,
this.opacity > 1 && (this.opacity = 1,
this.dop *= -1),
(this.opacity < 0 || this.y > this.ymax) && this.replace(),
this.x < 0 && this.x < this.xmax || (this.x = (this.x + this.xmax) % this.xmax),
e.beginPath(),
e.arc(this.x, this.y, this.r, 0, this.PI_2, !1),
e.fillStyle = this.rgb + ", " + this.opacity + ")",
e.fill()
}
}]),
e
}();
t["default"] = r,
e.exports = t["default"]
},
545: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(2)
, a = s(r)
, o = n(11)
, l = s(o)
, u = n(57)
, c = s(u);
t["default"] = a["default"].createClass({
displayName: "Dropdown",
propTypes: {
className: a["default"].PropTypes.string,
children: a["default"].PropTypes.any
},
mixins: [(0,
c["default"])()],
toggle: function() {
this.toggleDropdown()
},
open: function() {
this.openDropdown()
},
close: function() {
this.closeDropdown()
},
isOpen: function() {
return this.state.open
},
setToggleNode: function(e) {
this.setToggleNodeElement(e)
},
render: function() {
var e, t = (0,
l["default"])((e = {},
i(e, this.props.className, !0),
i(e, "dropdown-open", this.state.open),
i(e, "dropdown-closed", !this.state.open),
e));
return a["default"].createElement("div", {
className: t,
"aria-expanded": this.state.open
}, this.props.children)
}
}),
e.exports = t["default"]
},
546: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(3)
, d = n(545)
, p = o(d)
, f = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "_onToggle",
value: function(e) {
this.props.onToggle && this.props.onToggle(!this.refs.dropdown.isOpen()),
this.refs.dropdown.setToggleNode(e.target),
this.refs.dropdown.toggle()
}
}, {
key: "render",
value: function() {
return u["default"].createElement("div", {
className: "v-dropdown-list-button"
}, u["default"].createElement("button", {
"aria-label": (0,
c.translate)("a11y.options"),
className: "btn btn-options btn-no-text btn-icon",
onClick: this._onToggle.bind(this)
}), u["default"].createElement(p["default"], {
ref: "dropdown",
className: "dropdown-items"
}, this.props.children))
}
}], [{
key: "propTypes",
value: {
onToggle: u["default"].PropTypes.func,
children: u["default"].PropTypes.any.isRequired
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = f,
e.exports = t["default"]
},
547: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(3)
, d = o(c)
, p = n(67)
, f = o(p)
, h = n(20)
, m = o(h)
, g = n(11)
, v = o(g)
, y = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "componentDidMount",
value: function() {
this.props.user.get("email_confirmed") && this.props.user.savePreferences({
hide_tile_explain_following: "1"
})
}
}, {
key: "render",
value: function() {
var e = this.props.user.get("email_confirmed")
, t = (0,
v["default"])({
"v-explain-following": !0,
email_confirmed: e
});
return u["default"].createElement("div", {
className: t
}, u["default"].createElement("div", {
className: "explanation"
}, this._renderHeader(), this._renderExplanation(e)), this._renderButton())
}
}, {
key: "_renderHeader",
value: function() {
var e = "timeline.explain.following.explanation";
return d["default"].translateElement(u["default"].createElement("h2", null ), e, [], !1)
}
}, {
key: "_renderExplanation",
value: function(e) {
if (!e) {
var t = "timeline.explain.following.verify_email";
return d["default"].translateElement(u["default"].createElement("p", null ), t, {
gift: d["default"].formatCurrency(2.5)
})
}
return u["default"].createElement("p", {
className: "small"
})
}
}, {
key: "_renderButton",
value: function() {
return u["default"].createElement("div", {
className: "center"
}, u["default"].createElement(m["default"], {
className: "btn-text.btn-okay",
onClick: this.props.onClose
}, d["default"].translate("app.buttons.i_get_it")))
}
}], [{
key: "propTypes",
value: {
user: u["default"].PropTypes.instanceOf(f["default"]).isRequired
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = y,
e.exports = t["default"]
},
548: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(77)
, o = i(a)
, l = n(17)
, u = i(l)
, c = n(3)
, d = n(86)
, p = i(d);
t["default"] = r["default"].createClass({
displayName: "FakeCover",
propTypes: {
provider: r["default"].PropTypes.object.isRequired
},
mixins: [p["default"]],
_getSrc: function() {
return "/img/fake_covers/" + this.props.provider.id + ".png"
},
render: function() {
return r["default"].createElement("div", {
className: "v-cover"
}, r["default"].createElement(o["default"], {
animate: u["default"].isDesktop(),
width: this.props.provider.width,
height: this.props.provider.height,
src: this._getSrc()
}), r["default"].createElement("div", {
className: "coming-soon"
}, (0,
c.translate)("app.text.available_soon")))
}
}),
e.exports = t["default"]
},
549: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(3)
, o = r["default"].createClass({
displayName: "GeneralError",
propTypes: {
title: r["default"].PropTypes.string,
message: r["default"].PropTypes.string
},
_onContactClick: function(e) {
return e.preventDefault(),
window.reamaze.popup(),
!1
},
render: function() {
return r["default"].createElement("div", {
className: "v-error",
style: {
opacity: 1,
zIndex: 1
}
}, r["default"].createElement("div", {
className: "error-wrapper"
}, r["default"].createElement("div", {
className: "error-container"
}, r["default"].createElement("h1", {
className: "error-title"
}, (0,
a.translate)("app.error.title")), (0,
a.translateElement)(r["default"].createElement("p", {
className: "error-message",
onClick: this._onContactClick
}), "dialogues.subscription_result.failure_message"))))
}
});
t["default"] = o,
e.exports = t["default"]
},
550: function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var i = n(5)
, s = n(176)
, r = n(2)
, a = n(15)
, o = n(20)
, l = n(177)
, u = n(336)
, c = n(8).keyCode
, d = n(157)
, p = n(163).inActiveElement
, f = (n(13),
r.createClass({
displayName: "HorizontalTilePaneView",
mixins: [u("horizontal")],
propTypes: {
onNextItem: r.PropTypes.func,
onPrevItem: r.PropTypes.func,
activeTimeline: r.PropTypes.object,
onNearEnd: r.PropTypes.func.isRequired,
children: r.PropTypes.arrayOf(r.PropTypes.element),
loading: r.PropTypes.bool,
screenOffset: r.PropTypes.number
},
getDefaultProps: function() {
return {
loading: !1,
active: !0,
showButtons: !0,
tileOffset: 20,
screenOffset: 1.5 * window.innerWidth,
scrollPosition: 0,
maxHeight: 760
}
},
getInitialState: function() {
return {
active: !0,
width: 0,
height: 0,
isScrolling: !1,
visibleTiles: [],
next: null ,
prev: null ,
scrollSize: 0,
scrollPosition: this.props.scrollPosition || 0
}
},
_getButtons: function() {
return this.props.showButtons ? r.createElement("div", {
className: "pane-controls"
}, r.createElement(o, {
className: "btn-prev btn-icon btn-flat btn-no-text",
onClick: this._prevItem,
disabled: !this.state.prev
}, "Prev"), r.createElement(o, {
className: "btn-next btn-icon btn-flat btn-no-text",
onClick: this._nextItem,
disabled: !this.state.next
}, "Next")) : null
},
_renderPaneContents: function() {
if (this.props.activeTimeline) {
var e = "pins" === this.props.activeTimeline.name;
return r.createElement(d, {
component: "div",
className: "pane-contents",
ref: "content",
transitionName: "tile-horizontal-transition",
transitionEnter: !1,
transitionLeaveTimeout: 300,
transitionLeave: e,
key: this.props.activeTimeline.key
}, this.getChildren(), this.getLoading())
}
return r.createElement("div", {
className: "pane-contents",
ref: "content"
}, this.getChildren(), this.getLoading())
},
render: function() {
return r.createElement("div", {
className: this.getClassName()
}, this._getButtons(), r.createElement("div", {
className: "pane-scroll",
ref: "scroll",
onScroll: this._onPaneScroll
}, this._renderPaneContents()))
},
_getScrollElement: function() {
return a.findDOMNode(this.refs.scroll)
},
_getScrollElementScrollSize: function() {
return this._getScrollElement().scrollWidth
},
_getScrollElementScrollPosition: function() {
return this._getScrollElement().scrollLeft
},
componentDidUpdate: function(e) {
if (!this.props.loading && e.children && 0 !== e.children.length && e.children.length !== this.props.children.length) {
var t = this._getScrollElementScrollPosition()
, n = this._getScrollElementScrollSize();
this.props.onNearEnd && t + this.state.width >= n - this.props.screenOffset && setTimeout(this.props.onNearEnd)
}
this.props.pageIndex !== e.pageIndex && this._setPageIndex(this.props.pageIndex, {
offset: -30
})
},
componentWillUnmount: function() {
this._onScrollTimer && window.cancelAnimationFrame(this._onScrollTimer),
clearTimeout(this._updateLayoutTimer),
clearTimeout(this._scrollIntentTimeout)
},
bindListeners: function() {
s.addEventListener(a.findDOMNode(this), this._invertWheel),
window.addEventListener("resize", this.setDimensions),
window.addEventListener("orientationchange", this.setDimensions),
window.addEventListener("keydown", this._navigateByKey)
},
unbindListeners: function() {
s.removeEventListener(a.findDOMNode(this), this._invertWheel),
window.removeEventListener("resize", this.setDimensions),
window.removeEventListener("orientationchange", this.setDimensions),
window.removeEventListener("keydown", this._navigateByKey)
},
getContentHeight: function() {
var e = window.getComputedStyle(a.findDOMNode(this.refs.content))
, t = parseInt(e.height, 10) - parseInt(e.paddingTop, 10);
return Math.min(this.props.maxHeight, t)
},
getContentWidth: function() {
return a.findDOMNode(this).offsetWidth
},
_invertWheel: function(e) {
var t = this
, n = s.normalize(e);
if (n) {
if (e.preventDefault(),
!this._scrollIntent) {
var i = Math.abs(n.deltaX)
, r = Math.abs(n.deltaY);
i > r ? this._scrollIntent = "x" : this._scrollIntent = "y",
this._scrollIntentTimeout = setTimeout(function() {
t._scrollIntent = void 0
}, 500)
}
var a = ("x" === this._scrollIntent ? n.deltaX : -n.deltaY) * n.deltaFactor;
if (this._scrollIntent && a && this.isMounted()) {
if (this._previousScrollPosition === this.state.scrollPosition && (a > 0 && a <= this._previousDelta || 0 > a && a >= this._previousDelta))
return;
this._previousScrollPosition = this.state.scrollPosition,
this._previousDelta = a,
this.setScrollPosition(this.state.scrollPosition + a)
}
}
},
_setPageIndex: function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1]
, n = this.refs["tile-" + e];
if (n) {
var i = a.findDOMNode(this.refs["tile-" + e]).offsetLeft;
this.setScrollPosition(i, !0, t.offset)
}
},
setScrollPosition: function(e, t) {
var n = arguments.length <= 2 || void 0 === arguments[2] ? 0 : arguments[2];
if (this.isMounted()) {
var i = this._getScrollElement();
i.scrollLeft !== e && (t ? l.horizontal(i, e + n) : i.scrollLeft = e + n)
}
},
onChildDidMount: function() {
this._previousScrollPosition = void 0,
this.setDimensions(),
this.onScroll(),
this.props.scrollPosition && (this.setScrollPosition(this.props.scrollPosition),
this.props.scrollPosition = null );
var e = this.determineButtons(this._getScrollElementScrollPosition(), this._getScrollElementScrollSize());
this.setState(e)
},
determineButtons: function(e, t) {
var n = {};
return this.props.showButtons && (n.next = e + this.state.width < t,
n.prev = e > 0),
n
},
_determineEnd: function() {
!this.props.onEnd
},
_onPaneScroll: function(e) {
this._paneScrollLeft !== e.target.scrollLeft && (this._paneScrollLeft = e.target.scrollLeft,
this.onScroll(e))
},
onScroll: function() {
var e = this;
this._rafTicking || (this._rafTicking = !0,
this._onScrollTimer = window.requestAnimationFrame(function() {
e._onScrollRAF(),
e._rafTicking = !1
}))
},
_onScrollRAF: function() {
var e = this._getScrollElementScrollPosition()
, t = this._getScrollElementScrollSize()
, n = this.determineButtons(e, t);
this.setState({
scrollPosition: e,
visibleTiles: this.getVisibleTiles(e),
isScrolling: !0,
next: n.next,
prev: n.prev
}),
this.props.onElementsVisible && this.props.onElementsVisible(this.state.visibleTiles),
this.props.onScroll && this.props.onScroll(this.state.scrollPosition),
this.props.onNearEnd && e + this.state.width >= t - this.props.screenOffset && this.props.onNearEnd(),
this.props.onEnd && e + this.state.width === t && this.props.onEnd(),
this.debounceResetScrollState()
},
getVisibleTiles: function(e) {
var t = this;
return this.state.tileDimensions.filter(function(e) {
return e.component.isMounted()
}).filter(function(n) {
var i = n.left
, s = n.width
, r = i + s
, a = t.state.width
, o = e + a
, l = i > e && o > i
, u = r > e && o > r;
return l || u
})
},
_nextItem: function() {
var e = this
, t = i.find(a.findDOMNode(this.refs.content).childNodes, function(t) {
var n = t.getBoundingClientRect();
return n.left - e.props.tileOffset > 0
}, 0)
, n = t ? t.offsetLeft - this.props.tileOffset : this.state.scrollSize;
this.setScrollPosition(n, !0),
this.props.onNextItem && this.props.onNextItem()
},
_prevItem: function() {
var e = this
, t = i.findLast(a.findDOMNode(this.refs.content).childNodes, function(t) {
var n = t.getBoundingClientRect();
return n.right - e.props.tileOffset < e.state.width && n.left - e.props.tileOffset < 0
}, 0)
, n = t ? t.offsetLeft - this.props.tileOffset : 0;
this.setScrollPosition(n, !0),
this.props.onPrevItem && this.props.onPrevItem()
},
_nextPage: function() {
this.setScrollPosition(this.state.scrollPosition + this.state.width, !0),
this.props.onNextPage && this.props.onNextPage()
},
_prevPage: function() {
this.setScrollPosition(this.state.scrollPosition - this.state.width, !0),
this.props.onNextPage && this.props.onNextPage()
},
_navigateByKey: function(e) {
var t = p("form");
if (!e.shiftKey && !t && this.isMounted())
return -1 !== [c.PAGE_UP, c.ARROW_UP].indexOf(e.keyCode) ? void this._prevPage() : -1 !== [c.SPACE, c.PAGE_DOWN, c.ARROW_DOWN].indexOf(e.keyCode) ? void this._nextPage() : e.keyCode === c.ARROW_LEFT ? void this._prevItem() : e.keyCode === c.ARROW_RIGHT ? void this._nextItem() : void 0
}
}));
t["default"] = f,
e.exports = t["default"]
},
551: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(17)
, o = (i(a),
n(77))
, l = i(o)
, u = n(11)
, c = i(u)
, d = n(8)
, p = n(141)
, f = i(p)
, h = r["default"].createClass({
displayName: "ImageViewer",
propTypes: {
images: r["default"].PropTypes.array.isRequired,
activeIndex: r["default"].PropTypes.number,
placeholderSrc: r["default"].PropTypes.string,
onClose: r["default"].PropTypes.func
},
getDefaultProps: function() {
return {
activeIndex: 0
}
},
getInitialState: function() {
return {
loading: !0
}
},
componentDidMount: function() {
window.addEventListener("resize", this._onResize),
window.addEventListener("keyup", this._onKeyUp)
},
componentWillUnmount: function() {
window.removeEventListener("resize", this._onResize),
window.removeEventListener("keyup", this._onKeyUp)
},
componentWillReceiveProps: function(e) {
this.props.activeIndex !== e.activeIndex && this.setState({
loading: !0
})
},
_getDimensionStyles: function(e) {
var t = e.width
, n = e.height
, i = window.innerWidth
, s = window.innerHeight;
return i >= t && s >= n ? {
width: t,
height: n
} : s / n > i / t ? {
width: i,
height: n * (i / t)
} : {
height: s,
width: t * (s / n)
}
},
_getImageOrientation: function(e) {
return e.width > e.height ? "landscape" : "portrait"
},
_getOptimalImageLink: function(e) {
var t = window.innerWidth
, n = window.innerHeight
, i = void 0;
return i = n > t ? f["default"].getSizeForWidth(e, t) : f["default"].getSizeForHeight(e, n),
f["default"].getXHD(e, i)
},
_onImageReady: function() {
this.setState({
loading: !1
})
},
_onKeyUp: function(e) {
e.keyCode === d.keyCode.ESC && (this.props.onClose(),
e.preventDefault(),
e.stopPropagation())
},
_onResize: function() {
this.forceUpdate()
},
_renderActiveImage: function() {
var e = this.props.images[this.props.activeIndex];
if (!e && !this.props.initialImage)
return null ;
var t = this._getOptimalImageLink(e._links)
, n = this._getDimensionStyles(t)
, i = this._getImageOrientation(t);
if (this.props.placeholderSrc && this.state.loading)
return r["default"].createElement("figure", {
style: n,
className: i
}, r["default"].createElement(l["default"], {
key: t.href,
animate: !1,
src: this.props.placeholderSrc,
width: t.width,
height: t.height,
alt: ""
}), r["default"].createElement(l["default"], {
key: "preloader",
animate: !1,
onLoad: this._onImageReady,
src: t.href,
width: t.width,
height: t.height,
alt: ""
}), this._renderMetaInformation(e));
var s = (0,
c["default"])(i, {
loading: this.state.loading
});
return r["default"].createElement("figure", {
style: n,
className: s
}, r["default"].createElement(l["default"], {
key: t.href,
animate: !1,
onLoad: this._onImageReady,
src: t.href,
width: t.width,
height: t.height,
alt: ""
}), this._renderMetaInformation(e))
},
_renderMetaInformation: function(e) {
if (!e.caption && !e.credit || this.state.loading)
return null ;
var t = r["default"].createElement("p", {
className: "item-image-caption",
dangerouslySetInnerHTML: {
__html: e.caption
}
});
return r["default"].createElement("figcaption", {
className: "item-image-meta-container"
}, r["default"].createElement("div", {
className: "item-image-meta"
}, e.caption ? t : null , e.credit ? r["default"].createElement("p", {
className: "item-image-credit"
}, e.credit) : null ))
},
render: function() {
return r["default"].createElement("div", {
className: "v-image-viewer",
onClick: this.props.onClose
}, r["default"].createElement("div", {
className: "btn-close"
}), this._renderActiveImage())
}
});
t["default"] = h,
e.exports = t["default"]
},
552: function(e, t, n) {
"use strict";
var i = n(2)
, s = n(15)
, r = n(112)
, a = n(184)
, o = i.createClass({
displayName: "IssueAcquisition",
propTypes: {
issue: i.PropTypes.object.isRequired,
position: i.PropTypes.number,
minimize: i.PropTypes.bool,
showButton: i.PropTypes.bool,
onMount: i.PropTypes.func
},
componentDidUpdate: function(e) {
this.props.minimize && !e.minimize && (this._acquireIssueView.hideButton(),
this._acquireIssueView.unsetFloating()),
!this.props.minimize && e.minimize && (this._acquireIssueView.showButton(),
this._acquireIssueView.setFloating()),
this.props.position && this.props.position !== e.position && (s.findDOMNode(this).style.bottom = this.props.position + "px")
},
componentDidMount: function() {
this.props.onMount && this.props.onMount()
},
render: function() {
return this._acquireIssueView || (this._acquireIssueView = new a({
issue: this.props.issue,
button: this.props.showButton
})),
i.createElement(r, {
view: this._acquireIssueView,
preventReplace: !0,
className: "v-issue-acquisition-card"
})
}
});
e.exports = o
},
553: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(3)
, d = n(18)
, p = o(d)
, f = n(13)
, h = o(f)
, m = n(325)
, g = o(m)
, v = n(546)
, y = o(v)
, _ = n(167)
, b = o(_)
, w = n(17)
, S = o(w)
, k = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "_onToggleDropdown",
value: function(e) {
e && h["default"].track("Open Manifest Dropdown", {
item: this.props.item.id
})
}
}, {
key: "_onShareToEmail",
value: function(e) {
e.preventDefault(),
b["default"].openEmailDialog(this.props.item, this.props.analytics)
}
}, {
key: "_onShareToTwitter",
value: function(e) {
e.preventDefault(),
b["default"].shareItemToTwitter(this.props.item, this.props.analytics)
}
}, {
key: "_onShareToFacebook",
value: function(e) {
e.preventDefault(),
b["default"].shareItemToFacebook(this.props.item, this.props.analytics)
}
}, {
key: "_onShareToWhatsApp",
value: function(e) {
e.preventDefault(),
b["default"].shareItemToWhatsApp(this.props.item, this.props.analytics)
}
}, {
key: "_renderPinButton",
value: function() {
return this.props.showPin ? u["default"].createElement(g["default"], {
onChange: this.props.onPin,
item: this.props.item,
marked: this.props.pinned,
analytics: this.props.analytics
}) : void 0
}
}, {
key: "_renderStats",
value: function() {
var e = this.props.item.getEmbedded("manifest");
return u["default"].createElement("dl", {
className: "dl-compact"
}, u["default"].createElement("dt", null , (0,
c.translate)("app.manifest.time.to.read")), u["default"].createElement("dd", {
title: (0,
c.translate)("app.text.nr_words", [e.get("length").words])
}, p["default"].duration(e.getReadingTime(), "minutes").humanize()), u["default"].createElement("dt", null , (0,
c.translate)("app.manifest.date")), u["default"].createElement("dd", null , (0,
p["default"])(e.get("date")).format("LL")))
}
}, {
key: "render",
value: function() {
var e = u["default"].createElement("a", {
className: "share share-whatsapp",
onClick: this._onShareToWhatsApp.bind(this)
}, (0,
c.translate)("app.manifest.share.whatsapp"));
return u["default"].createElement(y["default"], {
className: "tooltip",
onToggle: this._onToggleDropdown.bind(this)
}, this._renderPinButton(), u["default"].createElement("a", {
className: "share share-email",
onClick: this._onShareToEmail.bind(this)
}, (0,
c.translate)("app.manifest.share.email")), u["default"].createElement("a", {
className: "share share-facebook",
onClick: this._onShareToFacebook.bind(this)
}, (0,
c.translate)("app.manifest.share.facebook")), u["default"].createElement("a", {
className: "share share-twitter",
onClick: this._onShareToTwitter.bind(this)
}, (0,
c.translate)("app.manifest.share.twitter")), S["default"].isMobile() && e, this._renderStats())
}
}], [{
key: "propTypes",
value: {
item: u["default"].PropTypes.object.isRequired,
analytics: u["default"].PropTypes.object,
pinned: u["default"].PropTypes.bool,
showPin: u["default"].PropTypes.bool,
onPin: u["default"].PropTypes.func
},
enumerable: !0
}, {
key: "defaultProps",
value: {
showPin: !0
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = k,
e.exports = t["default"]
},
554: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(11)
, o = i(a)
, l = n(328)
, u = i(l)
, c = r["default"].createClass({
displayName: "MorePostsDropdown",
propTypes: {
posts: r["default"].PropTypes.array.isRequired
},
render: function() {
var e = (0,
o["default"])("v-more-posts-dropdown", {
"s-active": this.props.active
});
return r["default"].createElement(u["default"], {
posts: this.props.posts,
className: e
}, "+", this.props.posts.length)
}
});
t["default"] = c,
e.exports = t["default"]
},
555: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(15)
, o = i(a)
, l = n(86)
, u = i(l)
, c = n(77)
, d = i(c)
, p = n(17)
, f = i(p)
, h = n(11)
, m = i(h)
, g = n(323)
, v = i(g)
, y = n(591)
, _ = i(y)
, b = n(227)
, w = i(b)
, S = n(335)
, k = i(S)
, E = n(47)
, C = i(E)
, T = n(115)
, P = i(T)
, N = r["default"].createClass({
displayName: "Region",
mixins: [u["default"]],
propTypes: {
region: r["default"].PropTypes.object.isRequired,
onClick: r["default"].PropTypes.func,
onMouseMove: r["default"].PropTypes.func,
onMouseLeave: r["default"].PropTypes.func,
onMouseEnter: r["default"].PropTypes.func
},
componentDidMount: function() {
if (this.props.onMouseEnter) {
var e = C["default"].getHorizontalMousePosition()
, t = C["default"].getVerticalMousePosition();
o["default"].findDOMNode(this) === document.elementFromPoint(e, t) && this.props.onMouseEnter({
clientX: e,
clientY: t
})
}
},
render: function() {
var e = {
left: this.props.region.position[0] + "%",
right: 100 - this.props.region.position[2] + "%",
top: this.props.region.position[1] + "%",
bottom: 100 - this.props.region.position[3] + "%",
position: "absolute"
};
return r["default"].createElement("div", {
className: "v-page-item-region",
style: e,
onClick: this.props.onClick,
onMouseEnter: this.props.onMouseEnter,
onMouseMove: this.props.onMouseMove,
onMouseLeave: this.props.onMouseLeave
})
}
})
, x = r["default"].createClass({
displayName: "PageItem",
mixins: [_["default"], u["default"], w["default"], k["default"]],
propTypes: {
item: r["default"].PropTypes.object.isRequired,
active: r["default"].PropTypes.bool
},
getInitialState: function() {
return {
active: !1
}
},
componentDidMount: function() {
this.props.item.getEmbedded("item-tracker").set("active", !1),
this.props.item.getEmbedded("item-tracker").on("change:active", this.setActive, this),
this.determinePopover({
inElement: !1,
inPopover: !1
})
},
componentWillUnmount: function() {
this.props.item.getEmbedded("item-tracker").off(null , null , this)
},
render: function() {
var e = this
, t = (0,
m["default"])({
"v-page-item": !0,
"s-active": this.state.active
})
, n = this.props.item.get("regions").map(function(t, n) {
return r["default"].createElement(N, {
key: e.props.item.id + "-" + n,
region: t,
item: e.props.item,
active: e.state.active,
onClick: e.onClick,
onMouseEnter: e.debouncedEnterElement,
onMouseMove: e.debouncedMoveElement,
onMouseLeave: e.debouncedLeaveElement
})
})
, i = void 0;
return this.state.popover && (i = r["default"].createElement(v["default"], {
from: "page",
key: this.props.item.id,
item: this.props.item,
x: this.state.x,
y: this.state.y,
onClose: this.closePopover,
onMouseEnter: this.enterPopover,
onMouseLeave: this.leavePopover
})),
r["default"].createElement("div", {
className: t
}, n, i)
},
onClick: function(e) {
this.onElementClick(e),
e.defaultPrevented || (e.preventDefault(),
P["default"].navigateToItem(this.props.item.id, {
analytics: {
type: "page"
},
lastEvent: e
}))
},
setActive: function() {
var e = {
active: this.props.item.getEmbedded("item-tracker").get("active")
};
this.props.item.getEmbedded("item-tracker").get("active") || (e.popover = !1),
this.setState(e)
},
onPopoverOpen: function() {
var e = this;
setTimeout(function() {
return e.props.item.getEmbedded("item-tracker").set("active", !0)
})
},
onPopoverClose: function() {
var e = this;
setTimeout(function() {
return e.props.item.getEmbedded("item-tracker").set("active", !1)
})
}
})
, R = r["default"].createClass({
displayName: "Page",
propTypes: {
page: r["default"].PropTypes.object.isRequired,
disabled: r["default"].PropTypes.bool,
onLoad: r["default"].PropTypes.func
},
mixins: [u["default"]],
render: function() {
var e = void 0;
return this.props.disabled || (e = this.props.page.getEmbedded("items").map(function(e) {
return r["default"].createElement(x, {
item: e,
key: e.id
})
})),
r["default"].createElement("div", {
className: "v-page"
}, r["default"].createElement(d["default"], {
animate: f["default"].isDesktop(),
src: this.props.page.getLink("preview"),
width: this.props.page.getPageWidth(),
height: this.props.page.getPageHeight(),
onLoad: this.props.onLoad
}), e)
}
});
t["default"] = R,
e.exports = t["default"]
},
556: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = r["default"].createClass({
displayName: "Pointer",
propTypes: {
width: r["default"].PropTypes.number.isRequired,
position: r["default"].PropTypes.string,
direction: r["default"].PropTypes.string,
offset: r["default"].PropTypes.number
},
render: function() {
var e = {
borderWidth: this.props.width + "px",
borderStyle: "solid",
position: "absolute",
display: "inline-block"
};
return "top" === this.props.position && (e.borderLeftColor = "transparent",
e.borderRightColor = "transparent",
e.borderTop = "none"),
"bottom" === this.props.position && (e.borderLeftColor = "transparent",
e.borderRightColor = "transparent",
e.borderBottom = "none",
e.borderTopWidth = "5px",
e.borderTopStyle = "solid",
e.marginTop = "none",
e.bottom = "4px"),
("bottom" === this.props.position || "top" === this.props.position && this.props.offset) && ("left" === this.props.direction ? e.right = this.props.offset + "px" : e.left = this.props.offset + "px"),
r["default"].createElement("div", {
className: "v-pointer",
style: e
})
}
});
t["default"] = a,
e.exports = t["default"]
},
557: function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
});
var i = n(5)
, s = n(2)
, r = n(86)
, a = n(11)
, o = n(18)
, l = n(323)
, u = n(227)
, c = n(335)
, d = n(120)
, p = n(46)
, f = n(345).getException
, h = s.createClass({
displayName: "PopularItem",
propTypes: {
disabled: s.PropTypes.bool,
item: s.PropTypes.object
},
mixins: [r, u, c],
render: function() {
var e = this.props.item.getEmbedded("manifest").getTitleAsText();
e.length > 90 && (e = e.substring(0, 90) + "...");
var t;
return this.state.popover && !this.props.disabled && (t = s.createElement(l, {
from: "popular-in-issue",
key: this.props.item.id,
item: this.props.item,
x: this.state.x,
y: this.state.y,
onClose: this.closePopover,
onMouseEnter: this.enterPopover,
onMouseLeave: this.leavePopover
})),
s.createElement("li", {
className: "v-popular-item",
onMouseEnter: this.debouncedEnterElement,
onMouseMove: this.debouncedMoveElement,
onMouseLeave: this.debouncedLeaveElement
}, s.createElement("a", {
className: "popular-item-link",
onClick: this.onClick,
dangerouslySetInnerHTML: {
__html: e
}
}), t)
},
onClick: function(e) {
if (this.onElementClick(e),
!e.defaultPrevented) {
e.preventDefault();
var t = n(179);
t.openItem(this.props.item.id, {
analytics: {
type: "popular-in-issue"
}
})
}
},
componentWillUnmount: function() {
clearTimeout(this._leaveTimeout)
},
componentWillUpdate: function(e) {
e.disabled && !this.props.disabled && (this.determinePopover({
inElement: !1,
inPopover: !1
}),
this.props.item.getEmbedded("item-tracker").set("active", !1))
},
onPopoverOpen: function() {
this.props.item.getEmbedded("item-tracker").set("active", !0)
},
onPopoverClose: function() {
this.props.item.getEmbedded("item-tracker").set("active", !1)
}
})
, m = s.createClass({
displayName: "PopularItemsInIssue",
mixins: [r],
_renderSubscription: function() {
var e = i.findWhere(d.getProviders(), {
id: this.props.provider.id
});
if (f("hideSubscriptionsSetting", !1) || !e)
return null ;
var t = this.props.issue.getEmbedded("b:issue-acquisition")
, n = "/settings/subscriptions/" + this.props.provider.id
, r = this.props.provider.get("name");
return t && t.get("subscription") ? s.createElement("div", {
className: "bottom-content"
}, s.createElement("div", {
className: "is-subscribed"
}, s.createElement("h3", null , s.createElement(p, {
find: "issue.popular.is_subscribed_header"
})), s.createElement("p", {
className: "subscribed"
}, s.createElement("span", {
className: "subscriber"
}, s.createElement(p, {
find: "issue.popular.subscriber"
})), s.createElement(p, {
find: "issue.popular.is_subscribed_content",
args: [r],
sanitize: !1
}), s.createElement("span", {
className: "edit-subscription"
}, s.createElement("a", {
href: n
}, "(", s.createElement(p, {
find: "issue.popular.edit"
}), ")"))))) : s.createElement("div", {
className: "bottom-content"
}, s.createElement("div", {
className: "can-subscribe"
}, s.createElement("h3", null , s.createElement(p, {
find: "issue.popular.subscribed"
})), s.createElement("p", null , s.createElement("a", {
href: n
}, s.createElement(p, {
find: "issue.popular.subscription"
})))))
},
_renderPopularItems: function() {
var e = this;
return this.props.popularItems ? this.props.popularItems.take(3).map(function(t) {
return s.createElement(h, {
key: t.id,
item: t,
disabled: e.props.disabled
})
}) : void 0
},
render: function() {
var e = this.props.issue.getEmbedded("b:issue-acquisition")
, t = o(this.props.issue.get("date")).calendar().toLowerCase()
, n = this.props.provider.get("name")
, i = a(["v-popular-in-issue", "tile-explain", {
"l-acquire-issue": e && e.isEligibleForAcquisition()
}]);
return s.createElement("div", {
className: i
}, s.createElement("div", {
className: "explanation"
}, s.createElement("h2", null , s.createElement(p, {
sanitize: !1,
find: "issue.popular.title",
args: [n, t]
}))), s.createElement("ul", {
className: "popular-list"
}, this._renderPopularItems()), this._renderSubscription())
}
});
t["default"] = m,
e.exports = t["default"]
},
558: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(2)
, a = s(r)
, o = n(117)
, l = s(o)
, u = n(11)
, c = s(u);
t["default"] = a["default"].createClass({
displayName: "PortalDialog",
propTypes: {
children: a["default"].PropTypes.element.isRequired,
onClick: a["default"].PropTypes.func.isRequired,
className: a["default"].PropTypes.string
},
mixins: [(0,
l["default"])("dialog-portal")],
_onClick: function(e) {
e.target.classList.contains("dialog-overlay") && this.props.onClick(e)
},
render: function() {
return null
},
renderLayer: function() {
var e, t = window.BrowserDetect, n = "Android Browser" === t.browser && t.version < "4.4", s = (0,
c["default"])((e = {},
i(e, this.props.className, this.props.className),
i(e, "dialog-overlay", !0),
i(e, "no-overflow", n),
e));
return a["default"].createElement("div", {
className: s,
onClick: this._onClick
}, this.props.children)
}
}),
e.exports = t["default"]
},
559: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(11)
, o = i(a)
, l = r["default"].createClass({
displayName: "PostChannelBadge",
propTypes: {
post: r["default"].PropTypes.object.isRequired,
active: r["default"].PropTypes.bool,
onSelect: r["default"].PropTypes.func.isRequired
},
_onClickBadge: function(e) {
this.props.post.get("text") && this.props.onSelect(e, this.props.post)
},
render: function() {
var e = (0,
o["default"])({
"v-channel-badge": !0
})
, t = (0,
o["default"])({
"s-active": this.props.active
}, ["channel", "channel-" + this.props.post.getEmbedded("b:user").get("id")]);
return r["default"].createElement("div", {
className: e
}, r["default"].createElement("div", {
className: t,
onClick: this._onClickBadge
}, this.props.post.getEmbedded("b:user").get("full_name")))
}
});
t["default"] = l,
e.exports = t["default"]
},
560: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(559)
, o = i(a)
, l = r["default"].createClass({
displayName: "PostChannelBadges",
propTypes: {
posts: r["default"].PropTypes.array,
limit: r["default"].PropTypes.number,
onSelect: r["default"].PropTypes.func.isRequired,
activePost: r["default"].PropTypes.object
},
getDefaultProps: function() {
return {
limit: 0
}
},
_onSelectPost: function(e, t) {
this.props.onSelect(e, t)
},
render: function() {
var e = this
, t = 0
, n = this.props.posts.filter(function(n) {
return t += n.getEmbedded("b:user").get("full_name").length,
!e.props.limit || t < e.props.limit
}).map(function(t) {
return r["default"].createElement(o["default"], {
active: e.props.activePost === t,
post: t,
key: t.id,
onSelect: e._onSelectPost
})
});
return r["default"].createElement("div", {
className: "v-channel-badges"
}, n)
}
});
t["default"] = l,
e.exports = t["default"]
},
561: function(e, t, n) {
"use strict";
var i = n(26)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(2)
, a = s(r)
, o = n(77)
, l = s(o)
, u = n(11)
, c = s(u);
t["default"] = a["default"].createClass({
displayName: "ProviderImage",
propTypes: {
className: a["default"].PropTypes.string,
provider: a["default"].PropTypes.object.isRequired
},
render: function() {
var e = (0,
c["default"])("provider", i({}, this.props.className, this.props.className))
, t = "/img/providers/" + this.props.provider.get("id") + "/logo.png"
, n = this.props.provider.get("name");
return a["default"].createElement(l["default"], {
className: e,
src: t,
alt: n,
text: n
})
}
}),
e.exports = t["default"]
},
562: function(e, t, n) {
"use strict";
var i = (n(5),
n(2))
, s = n(11)
, r = (n(12),
n(143),
n(3))
, a = i.createClass({
displayName: "RecommendCount",
propTypes: {
hot: i.PropTypes.bool,
amount: i.PropTypes.number.isRequired
},
render: function() {
var e = s({
"v-like": !0,
"s-active": this.props.hot
});
return i.createElement("div", {
className: e,
"aria-label": r.translate("recommendation.count", [this.props.amount])
}, this.props.amount)
}
});
e.exports = a
},
563: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(5)
, r = i(s)
, a = n(12)
, o = i(a)
, l = n(2)
, u = i(l)
, c = n(86)
, d = i(c)
, p = n(327)
, f = i(p)
, h = n(560)
, m = i(h)
, g = n(324)
, v = i(g)
, y = n(562)
, _ = i(y)
, b = n(320)
, w = i(b)
, S = u["default"].createClass({
displayName: "Toast",
propTypes: {
posts: u["default"].PropTypes.array,
item: u["default"].PropTypes.object,
activePost: u["default"].PropTypes.oneOfType([u["default"].PropTypes.bool, u["default"].PropTypes.object]),
onActivePostChange: u["default"].PropTypes.func,
activeChannel: u["default"].PropTypes.string
},
mixins: [d["default"]],
getDefaultProps: function() {
return {
activePost: null
}
},
getInitialState: function() {
return {
activePost: this.props.activePost
}
},
componentWillReceiveProps: function(e) {
var t = r["default"].get(this.props, "posts", []).length
, n = r["default"].get(e, "posts", []).length;
t !== n && this.setState({
activePost: null
})
},
componentDidUpdate: function(e, t) {
t.activePost !== this.state.activePost && this.props.onActivePostChange && this.props.onActivePostChange()
},
_getActivePost: function(e) {
var t = this;
if (null !== this.state.activePost)
return this.state.activePost;
if (this.props.activeChannel) {
var n = r["default"].first(e.filter(function(e) {
return e.get("b:user").get("id") === t.props.activeChannel
}));
if (n && n.get("text"))
return n
}
return r["default"].first(e.filter(function(e) {
return e.get("text")
}))
},
_arrangePosts: function(e) {
if (!this._sortedPosts) {
var t = this._getActivePost(e);
t && (e = r["default"].without(e, t),
e.unshift(t)),
this._sortedPosts = e.sort(function(e) {
return e.getEmbedded("b:user") === o["default"].getUser() ? -1 : 0
})
}
return this._sortedPosts
},
_onSelectPost: function(e, t) {
t !== this.state.activePost && this.setState({
activePost: t
})
},
_renderChannelBadges: function() {
var e = this._arrangePosts(this.props.posts)
, t = e.filter(function(e) {
return e.getEmbedded("b:manager")
})
, n = this._getActivePost(e);
return t.length ? u["default"].createElement(m["default"], {
ref: "postchannelbadges",
activePost: n,
posts: r["default"].take(t, 2),
onSelect: this._onSelectPost,
limit: 18
}) : !1
},
_renderFaces: function() {
var e = this._arrangePosts(this.props.posts)
, t = e.filter(function(e) {
return !e.getEmbedded("b:manager")
})
, n = this._getActivePost(e);
return t.length ? u["default"].createElement(f["default"], {
ref: "facepile",
activePost: n,
posts: t,
onSelect: this._onSelectPost
}) : !1
},
_renderPost: function() {
var e = this._arrangePosts(this.props.posts)
, t = this._getActivePost(e);
return t ? u["default"].createElement(v["default"], {
post: t,
key: t.id
}) : !1
},
render: function() {
return u["default"].createElement("div", {
className: "v-toast",
ref: "toast"
}, u["default"].createElement("div", {
className: "v-shared-by"
}, this._renderChannelBadges(), this._renderFaces(), u["default"].createElement(w["default"], {
target: this
})), u["default"].createElement(_["default"], {
amount: this.props.item.get("post_count"),
onRecommend: this.onRecommend,
onDeleteRecommend: this.onDeleteRecommend
}), this._renderPost())
}
});
t["default"] = S,
e.exports = t["default"]
},
564: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(67)
, d = o(c)
, p = n(28)
, f = o(p)
, h = n(13)
, m = o(h)
, g = n(56)
, v = o(g)
, y = n(3)
, _ = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
var e = this.props.user
, t = this.props.user.getAvatarHref()
, n = e.get("username")
, i = e.getFirstName()
, s = "timeline.tiles.upgrade_account.message" + (n ? "" : "_no_name");
return u["default"].createElement("div", {
className: "v-upgrade-account"
}, u["default"].createElement("div", {
className: "profile-render"
}, u["default"].createElement(v["default"], {
src: t
}), u["default"].createElement("h3", null , n), this._renderBio()), u["default"].createElement("div", {
className: "overlay"
}), u["default"].createElement("div", {
className: "container"
}, (0,
y.translateElement)(u["default"].createElement("h2", null ), s, {
name: i,
gift: (0,
y.formatCurrency)(2.5)
}), u["default"].createElement(f["default"], {
className: "btn btn-blendle-icon-green btn-green btn-upgrade",
onClick: this._trackUpgrade.bind(this),
href: "/payment"
}, (0,
y.translate)("timeline.tiles.upgrade_account.button")), u["default"].createElement("div", {
className: "payment-icons"
})))
}
}, {
key: "_renderBio",
value: function() {
var e = this.props.user.get("text");
return e ? u["default"].createElement("p", {
className: "bio"
}, e) : void 0
}
}, {
key: "_trackUpgrade",
value: function(e) {
m["default"].track("Deposit Trigger", {
type: "timeline/" + this.props.timeline
})
}
}], [{
key: "propTypes",
value: {
user: u["default"].PropTypes.instanceOf(d["default"]).isRequired,
timeline: u["default"].PropTypes.string.isRequired
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = _,
e.exports = t["default"]
},
565: function(e, t, n) {
"use strict";
var i = n(5)
, s = n(2)
, r = n(86)
, a = n(13)
, o = n(28)
, l = n(567)
, u = n(227)
, c = n(8)
, d = s.createClass({
displayName: "User",
mixins: [r, u],
propTypes: {
user: s.PropTypes.object.isRequired,
analytics: s.PropTypes.object.isRequired,
hideTooltip: s.PropTypes.bool
},
_getUsername: function() {
return this.props.user.username || this.props.user.get("username")
},
render: function() {
var e = this.props.user
, t = i.includes(c.STAFFPICKS, e.id) ? "/channel/" : "/user/"
, n = "blendle" === e.id ? "Trending" : e.get("username")
, r = void 0;
return this.state.popover && (r = s.createElement(l, {
user: e,
analytics: this.props.analytics,
x: this.state.x,
y: this.state.y,
onClose: this.closePopover,
onMouseEnter: this.enterPopover,
onMouseLeave: this.leavePopover
})),
s.createElement("div", {
className: "v-user user-id-" + e.id
}, s.createElement("h4", {
"data-id": e.id,
className: "user-name"
}, s.createElement(o, {
href: t + e.id,
onMouseEnter: this.debouncedEnterElement,
onMouseMove: this.debouncedEnterElement,
onMouseLeave: this.debouncedLeaveElement,
onClick: this._trackUsernameClick
}, n)), r)
},
debouncedEnterElement: function(e) {
clearTimeout(this._leaveTimeout),
this.enterElement(e)
},
debouncedLeaveElement: function(e) {
var t = this;
clearTimeout(this._leaveTimeout),
this._leaveTimeout = setTimeout(function() {
return t.leaveElement(e)
}, 300)
},
_trackUsernameClick: function(e) {
a.track("View User", {
type: this.props.analytics.type,
user_id: this.props.user.id,
user_name: this._getUsername()
})
}
});
e.exports = d
},
566: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(12)
, d = o(c)
, p = n(3)
, f = n(28)
, h = o(f)
, m = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
var e = "/user/" + this.props.user.get("id")
, t = this.props.user.get("full_name");
return t || this.props.user.id !== d["default"].getId() || (t = p.locale.recommendation.btn.you),
this.props.disableLink && (e = "#"),
u["default"].createElement(h["default"], {
className: "v-user-name",
href: e,
title: this.props.title || t
}, t)
}
}], [{
key: "propTypes",
value: {
channel: u["default"].PropTypes.object,
disableLink: u["default"].PropTypes.bool
},
enumerable: !0
}, {
key: "defaultProps",
value: {
disableLink: !1
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = m,
e.exports = t["default"]
},
567: function(e, t, n) {
"use strict";
var i = n(2)
, s = n(326)
, r = n(17)
, a = n(570)
, o = i.createClass({
displayName: "UserPopover",
propTypes: {
user: i.PropTypes.object.isRequired,
analytics: i.PropTypes.object.isRequired
},
render: function() {
return i.createElement(s, {
x: this.props.x,
y: this.props.y,
offset: 10,
viewportOffsetBottom: 10,
mobile: r.isMobile(),
onClose: this.props.onClose,
onMouseEnter: this.props.onMouseEnter,
onMouseLeave: this.props.onMouseLeave,
onScroll: this.props.onClose
}, i.createElement(a, {
user: this.props.user,
analytics: this.props.analytics
}))
}
});
e.exports = o
},
568: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(12)
, r = i(s)
, a = n(2)
, o = i(a)
, l = n(11)
, u = i(l)
, c = n(56)
, d = i(c)
, p = n(328)
, f = i(p)
, h = n(223)
, m = i(h)
, g = o["default"].createClass({
displayName: "UserPostAvatar",
propTypes: {
post: o["default"].PropTypes.object.isRequired,
onSelect: o["default"].PropTypes.func.isRequired,
active: o["default"].PropTypes.bool,
showTooltip: o["default"].PropTypes.bool
},
_onClickAvatar: function(e) {
this.props.post.get("text") && this.props.onSelect(e, this.props.post)
},
render: function() {
var e = this.props.post.getEmbedded("b:manager") || this.props.post.getEmbedded("b:user")
, t = (0,
u["default"])({
"v-user-avatar": !0,
"s-has-message": this.props.post.get("text"),
"s-active": this.props.active
});
if (this.props.showTooltip) {
var n = "/user/" + e.id;
return o["default"].createElement(f["default"], {
posts: [this.props.post],
disabled: this.props.active,
className: t
}, o["default"].createElement("a", {
href: n
}, o["default"].createElement(d["default"], {
src: e.getAvatarHref(),
className: e.id === r["default"].getId() ? "is-me" : ""
})))
}
return o["default"].createElement(m["default"], {
posts: [this.props.post],
username: e.get("full_name"),
disabled: this.props.active,
className: t
}, o["default"].createElement("div", {
onClick: this._onClickAvatar
}, o["default"].createElement(d["default"], {
src: e.getAvatarHref(),
className: e.id === r["default"].getId() ? "is-me" : ""
})))
}
});
t["default"] = g,
e.exports = t["default"]
},
569: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(172)
, o = i(a)
, l = n(28)
, u = i(l)
, c = n(56)
, d = i(c)
, p = n(5)
, f = n(8)
, h = n(3)
, m = n(11)
, g = i(m)
, v = r["default"].createClass({
displayName: "UserRow",
propTypes: {
user: r["default"].PropTypes.object.isRequired,
analytics: r["default"].PropTypes.object.isRequired,
onNavigate: r["default"].PropTypes.func
},
_renderReason: function() {
if (this.props.user.get("reason") && h.locale.whotofollow.reasons[this.props.user.get("reason")]) {
var e = h.locale.whotofollow.reasons[this.props.user.get("reason")];
if (e)
return r["default"].createElement("p", {
className: "reason"
}, e)
}
},
_renderBio: function() {
return this.props.user.get("text") ? r["default"].createElement("span", {
className: "bio"
}, this.props.user.get("text")) : void 0
},
_renderInfo: function() {
return (0,
p.includes)(f.STAFFPICKS, this.props.user.id) ? r["default"].createElement("div", {
className: "follow-info"
}, r["default"].createElement("span", {
className: "info info-followers"
}, this.props.user.get("followers")), r["default"].createElement("span", {
className: "info info-posts"
}, this.props.user.get("posts"))) : void 0
},
render: function() {
var e = (0,
g["default"])({
"user-name": !0,
"no-bio": !this.props.user.get("text")
});
return r["default"].createElement("li", null , r["default"].createElement(o["default"], {
user: this.props.user,
analytics: this.props.analytics,
size: "small"
}), this._renderReason(), r["default"].createElement(u["default"], {
className: "user-avatar",
href: "/user/" + this.props.user.id,
onClick: this.props.onNavigate
}, r["default"].createElement(d["default"], {
src: this.props.user.getAvatarHref()
})), r["default"].createElement(u["default"], {
className: e,
href: "/user/" + this.props.user.id,
onClick: this.props.onNavigate
}, this.props.user.get("username")), this._renderBio(), this._renderInfo())
}
});
t["default"] = v,
e.exports = t["default"]
},
570: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(5)
, r = n(2)
, a = i(r)
, o = n(28)
, l = i(o)
, u = n(46)
, c = i(u)
, d = n(172)
, p = i(d)
, f = n(12)
, h = i(f)
, m = n(56)
, g = i(m)
, v = n(8);
t["default"] = a["default"].createClass({
displayName: "UserTooltip",
propTypes: {
user: a["default"].PropTypes.object.isRequired,
analytics: a["default"].PropTypes.object.isRequired
},
render: function() {
return a["default"].createElement("div", {
className: "v-user-tooltip user-id-" + this.props.user.id
}, a["default"].createElement("div", {
className: "hovercard-top"
}, a["default"].createElement(g["default"], {
src: this.props.user.getAvatarHref(),
animate: !0
}), a["default"].createElement("div", {
className: "gradient"
}), a["default"].createElement("h1", {
className: "user-name"
}, a["default"].createElement(l["default"], {
href: "/user/" + this.props.user.id
}, this.props.user.get("username")))), a["default"].createElement("div", {
className: "hovercard-bottom"
}, this._renderBio(), this._renderUserInfo(), this._renderFollowButton()))
},
_renderBio: function() {
var e = this.props.user.getBioHTML();
if (e)
return a["default"].createElement("div", {
className: "bio",
dangerouslySetInnerHTML: {
__html: e
}
})
},
_renderUserInfo: function() {
return (0,
s.includes)(v.STAFFPICKS, this.props.user.id) ? void 0 : a["default"].createElement("div", {
className: "user-info"
}, a["default"].createElement("div", {
className: "info-followers"
}, a["default"].createElement("span", {
className: "user-info-amount"
}, this.props.user.getFormattedFollowers()), a["default"].createElement(c["default"], {
find: "user.captions.followers",
className: "user-info-title"
})), a["default"].createElement("div", {
className: "info-posts"
}, a["default"].createElement("span", {
className: "user-info-amount"
}, this.props.user.get("posts")), a["default"].createElement(c["default"], {
find: "user.captions.shared",
className: "user-info-title"
})))
},
_renderFollowButton: function() {
return h["default"].getId() === this.props.user.id || (0,
s.includes)(v.STAFFPICKS, this.props.user.id) ? void 0 : a["default"].createElement(p["default"], {
user: this.props.user,
analytics: this.props.analytics,
size: "small"
})
}
}),
e.exports = t["default"]
},
571: function(e, t, n) {
"use strict";
var i = n(5)
, s = n(2)
, r = n(15)
, a = n(336)
, o = n(157)
, l = s.createClass({
displayName: "VerticalTilePaneView",
mixins: [a("vertical")],
propTypes: {
activeTimeline: s.PropTypes.object,
onNearEnd: s.PropTypes.func.isRequired,
children: s.PropTypes.arrayOf(s.PropTypes.element),
loading: s.PropTypes.bool,
screenOffset: s.PropTypes.number
},
getDefaultProps: function() {
return {
loading: !1,
active: !0,
tileOffset: 20,
screenOffset: window.innerHeight,
scrollPosition: 0
}
},
getInitialState: function() {
return {
active: !0,
scroll: !1,
width: 0,
height: 0,
next: null ,
prev: null ,
scrollSize: 0,
scrollPosition: this.props.scrollPosition || 1
}
},
componentDidUpdate: function(e) {
!this.props.loading && e.children && 0 !== e.children.length && e.children.length !== this.props.children.length && this._determineNearEnd()
},
_renderChildren: function() {
if (this.props.activeTimeline) {
var e = "pins" === this.props.activeTimeline.name;
return s.createElement(o, {
transitionName: "tile-vertical-transition",
transitionEnter: !1,
transitionLeaveTimeout: 300,
transitionLeave: e,
key: this.props.activeTimeline.key
}, this.getChildren(), this.getLoading())
}
return this.getChildren()
},
render: function() {
return s.createElement("div", {
className: this.getClassName()
}, this._renderChildren(), this.getLoading())
},
onChildDidMount: function() {
var e = this;
clearTimeout(this._updateLayoutTimer),
this._updateLayoutTimer = setTimeout(function() {
e.state.scrollPosition && e.setScrollPosition(e.state.scrollPosition)
}, 50)
},
bindListeners: function() {
window.addEventListener("resize", this.setDimensions),
window.addEventListener("orientationchange", this.setDimensions),
window.addEventListener("scroll", this._onScroll)
},
unbindListeners: function() {
window.removeEventListener("resize", this.setDimensions),
window.removeEventListener("orientationchange", this.setDimensions),
window.removeEventListener("scroll", this._onScroll)
},
getContentHeight: function() {
return r.findDOMNode(this).getBoundingClientRect().height
},
getContentWidth: function() {
return r.findDOMNode(this).offsetWidth
},
_setPageIndex: function(e) {
var t = this.refs["tile-" + e];
if (t) {
var n = r.findDOMNode(this.refs["tile-" + e]).offsetTop;
this.setScrollPosition(n, !0)
}
},
scrollTo: function() {
return this.setScrollPosition.apply(this, arguments)
},
setScrollPosition: function(e) {
window.scrollTo(0, e)
},
_determineNearEnd: function() {
if (this.props.onNearEnd) {
var e = window.pageYOffset
, t = r.findDOMNode(this).offsetHeight;
t - e - 2 * this.props.screenOffset <= 0 && setTimeout(this.props.onNearEnd)
}
},
_determineEnd: function() {
if (this.props.onEnd) {
var e = window.pageYOffset
, t = e + r.findDOMNode(this).offsetHeight
, n = r.findDOMNode(this).parentNode.parentNode.scrollHeight;
n - t === 0 && setTimeout(this.props.onEnd)
}
},
_onScroll: function() {
var e = this;
!this._rafTicking && this.props.active && (this._rafTicking = !0,
window.requestAnimationFrame(function() {
e._rafTicking = !1,
e._onScrollRAF()
}))
},
_onScrollRAF: function() {
var e = window.pageYOffset
, t = r.findDOMNode(this).offsetHeight;
if (this.setState({
scrollPosition: e,
isScrolling: !0
}),
this.props.showButtons && this.setState({
next: e + this.state.height < t,
prev: e > 1
}),
this._determineNearEnd(),
this._determineEnd(),
this.props.onElementsVisible) {
var n = this.getVisibleTiles(e);
this.setState({
visibleTiles: n
}),
this.props.onElementsVisible(n)
}
this.props.onScroll && this.props.onScroll(e),
this.debounceResetScrollState()
},
getVisibleTiles: function(e) {
var t = this;
return this.state.tileDimensions.filter(function(n) {
return n.top > e && n.top + n.height < e + t.state.height
})
},
_nextItem: function() {
var e = this
, t = i.find(r.findDOMNode(this.refs.content).childNodes, function(t) {
var n = t.getBoundingClientRect();
return n.bottom > e.state.height
}, 0)
, n = t ? t.offsetTop - this.props.tileOffset : this.state.scrollSize;
this.setScrollPosition(n, !0),
this.props.onNextItem && this.props.onNextItem()
},
_prevItem: function() {
var e = i.findLast(r.findDOMNode(this.refs.content).childNodes, function(e) {
var t = e.getBoundingClientRect();
return t.top < 0
}, 0)
, t = e ? e.offsetTop - this.props.tileOffset : 0;
this.setScrollPosition(t, !0),
this.props.onPrevItem && this.props.onPrevItem()
},
_nextPage: function() {
this.setScrollPosition(this.state.scrollPosition + this.state.height, !0),
this.props.onNextPage && this.props.onNextPage()
},
_prevPage: function() {
this.setScrollPosition(this.state.scrollPosition - this.state.height, !0),
this.props.onNextPage && this.props.onNextPage()
}
});
e.exports = l
},
572: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(18)
, d = o(c)
, p = n(11)
, f = o(p)
, h = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "_onClickDay",
value: function(e) {
if (e.preventDefault(),
e.target.classList.contains("active")) {
var t = e.target.getAttribute("data-date");
this.props.onSelect((0,
d["default"])(t, "YYYY-MM-DD"))
}
}
}, {
key: "_getWeeksInMonth",
value: function(e) {
var t = e.clone().startOf("month")
, n = e.clone().endOf("month");
return Math.ceil((n.date() + t.weekday()) / 7)
}
}, {
key: "_getAllDays",
value: function() {
var e = this._getPreviousDaysAmount()
, t = (0,
d["default"])(this.props.year + "-" + this.props.month + "-1", "YYYY-MM-DD")
, n = this._getWeeksInMonth(t.clone());
return t.subtract(e + 1, "days"),
Array(7 * n).fill().map(function() {
return t.add(1, "days").clone()
})
}
}, {
key: "_getPreviousDaysAmount",
value: function() {
var e = (0,
d["default"])(this.props.year + "-" + this.props.month + "-1", "YYYY-MM-DD").day() - 1;
return -1 === e && (e = 6),
e
}
}, {
key: "_renderDay",
value: function(e) {
var t = e.format("YYYY-MM-DD")
, n = e.month() + 1 !== this.props.month
, i = this.props.selected.format("YYYY-MM-DD") === t && !n
, s = void 0;
if (this.props.dateRange) {
var r = this.props.fromDate
, a = this.props.toDate;
r && !e.isAfter(r) && !e.isSame(r) || a && !e.isBefore(a) ? (this.props.selected.isSame(a) && e.isAfter(a) || this.props.selected.isSame(r) && e.isBefore(r)) && (s = !0) : s = !0
} else
s = -1 !== this.props.activeDates.indexOf(t) && !n;
var o = (0,
f["default"])({
"datepicker-day": !0,
"other-month": n,
"s-selected": i,
active: s
});
return u["default"].createElement("td", {
className: o,
"data-date": t,
key: t,
onClick: this._onClickDay.bind(this)
}, e.date())
}
}, {
key: "render",
value: function() {
var e = this
, t = this._getAllDays()
, n = (0,
d["default"])(this.props.year + "-" + this.props.month + "-1", "YYYY-MM-DD")
, i = this._getWeeksInMonth(n)
, s = Array(i).fill().map(function() {
return t.splice(0, 7).map(function(t) {
return e._renderDay(t)
})
});
return u["default"].createElement("tbody", null , s.map(function(e, t) {
return u["default"].createElement("tr", {
key: t
}, e)
}))
}
}], [{
key: "propTypes",
value: {
year: u["default"].PropTypes.number,
month: u["default"].PropTypes.number,
selected: u["default"].PropTypes.object,
onSelect: u["default"].PropTypes.func,
dateRange: u["default"].PropTypes.bool,
activeDates: u["default"].PropTypes.array,
fromDate: u["default"].PropTypes.object,
toDate: u["default"].PropTypes.object
},
enumerable: !0
}, {
key: "defaultProps",
value: {
year: 0,
month: 0,
selected: (0,
d["default"])(),
activeDates: [],
dateRange: !1,
fromDate: null ,
toDate: null
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = h,
e.exports = t["default"]
},
573: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(18)
, d = o(c)
, p = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
var e = Array(7).fill().map(function(e, t) {
var n = (0,
d["default"])().day(t + 1).format("dd").substr(0, 1);
return u["default"].createElement("td", {
className: "datepicker-dayname",
key: t
}, n)
});
return u["default"].createElement("thead", null , u["default"].createElement("tr", null , e))
}
}]),
t
}(u["default"].Component);
t["default"] = p,
e.exports = t["default"]
},
574: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(33)
, o = i(a)
, l = n(3)
, u = n(251)
, c = i(u)
, d = n(112)
, p = i(d)
, f = n(11)
, h = i(f)
, m = r["default"].createClass({
displayName: "FacebookConnectExistingEmailDialogue",
propTypes: {
onClose: r["default"].PropTypes.func.isRequired,
email: r["default"].PropTypes.string.isRequired,
onRequestConnect: r["default"].PropTypes.func.isRequired,
loading: r["default"].PropTypes.bool.isRequired,
onShowForm: r["default"].PropTypes.func.isRequired,
onShowPasswordReset: r["default"].PropTypes.func.isRequired,
showPasswordReset: r["default"].PropTypes.bool.isRequired,
error: r["default"].PropTypes.string
},
componentWillMount: function() {
this._resetTokenForm = new c["default"]({
back: this.props.onShowForm
}),
this._resetTokenForm.render()
},
componentDidMount: function() {
"Explorer" === window.BrowserDetect.browser && window.BrowserDetect.version <= 11 || this._password.focus()
},
componentWillUpdate: function() {
this._form && (this._height = this._form.getBoundingClientRect().height)
},
_getHiddenStyle: function() {
return {
visibility: "hidden",
position: "absolute",
zIndex: -1
}
},
_renderError: function() {
return this.props.error ? r["default"].createElement("div", {
className: "error-message"
}, this.props.error) : void 0
},
_renderPasswordReset: function() {
var e = {};
return this.props.showPasswordReset || (e = this._getHiddenStyle()),
this._height && (e.height = this._height),
r["default"].createElement("div", {
style: e,
className: "v-reset-password"
}, r["default"].createElement("h2", {
className: "welcome"
}, (0,
l.translate)("login.dropdown.to_reset_token")), r["default"].createElement(p["default"], {
view: this._resetTokenForm
}))
},
_renderConnectForm: function() {
var e = this
, t = (0,
h["default"])("btn", "btn-go", "btn-green", "btn-fullwidth", {
"s-loading": this.props.loading
})
, n = {};
return this.props.showPasswordReset && (n = this._getHiddenStyle()),
r["default"].createElement("div", {
style: n,
ref: function(t) {
return e._form = t
}
}, r["default"].createElement("form", {
onSubmit: this.props.onRequestConnect,
name: "facebook-connect"
}, r["default"].createElement("h2", {
className: "welcome"
}, (0,
l.translate)("facebook.email_exists.title")), r["default"].createElement("p", null , (0,
l.translate)("facebook.email_exists.message")), r["default"].createElement("input", {
ref: function(t) {
return e._password = t
},
className: "inp inp-text inp-fullwidth inp-password",
type: "password",
name: "password",
placeholder: (0,
l.translate)("facebook.email_exists.password_placeholder")
}), this._renderError(), r["default"].createElement("button", {
type: "submit",
className: t
}, (0,
l.translate)("facebook.email_exists.connect")), r["default"].createElement("a", {
className: "forgot-password",
onClick: this.props.onShowPasswordReset
}, (0,
l.translate)("login.dropdown.to_reset_token"))))
},
render: function() {
return r["default"].createElement(o["default"], {
className: "dialog-facebook-connect-existing",
onClose: this.props.onClose
}, this._renderPasswordReset(), this._renderConnectForm())
}
});
t["default"] = m,
e.exports = t["default"]
},
575: function(e, t, n) {
"use strict";
var i = n(186)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(2)
, a = s(r)
, o = n(574)
, l = s(o)
, u = n(164)
, c = s(u)
, d = n(247)
, p = s(d)
, f = n(37)
, h = s(f)
, m = n(8)
, g = n(3)
, v = a["default"].createClass({
displayName: "FacebookConnectExistingEmailDialogueContainer",
propTypes: {
onClose: a["default"].PropTypes.func.isRequired,
email: a["default"].PropTypes.string.isRequired
},
getInitialState: function() {
return {
showPasswordReset: !1
}
},
_mapError: function(e) {
return e.error && e.status === m.STATUS_ERROR ? e.error.type === m.MISSING_PASSWORD ? (0,
g.translate)("app.error.default_form_field_required") : e.error.type === m.INVALID_TOKEN ? (0,
g.translate)("dialogues.enterpassword.error") : null : null
},
_onRequestConnect: function(e) {
e.preventDefault();
var t = i(e.target.elements).find(function(e) {
return "password" === e.name
}).value;
c["default"].loginAndConnectFacebook(this.props.email, t, this)
},
_onShowForm: function() {
this.setState({
showPasswordReset: !1
})
},
_onShowPasswordReset: function(e) {
e.preventDefault(),
this.setState({
showPasswordReset: !0
})
},
_renderDialogue: function(e) {
return a["default"].createElement(l["default"], {
onClose: this.props.onClose,
email: this.props.email,
error: this._mapError(e.FacebookStore),
loading: e.FacebookStore.status === m.STATUS_PENDING,
onRequestConnect: this._onRequestConnect,
onShowPasswordReset: this._onShowPasswordReset,
onShowForm: this._onShowForm,
showPasswordReset: this.state.showPasswordReset
})
},
render: function() {
return a["default"].createElement(h["default"], {
stores: {
FacebookStore: p["default"]
},
render: this._renderDialogue
})
}
});
t["default"] = v,
e.exports = t["default"]
},
576: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(33)
, o = i(a)
, l = n(20)
, u = i(l)
, c = n(3)
, d = r["default"].createClass({
displayName: "JustEnoughBalanceDialogue",
propTypes: {
onClose: r["default"].PropTypes.func.isRequired
},
render: function() {
return r["default"].createElement(o["default"], {
hideClose: !0,
className: "dialogue-just-enough-balance"
}, r["default"].createElement("h2", null , (0,
c.translate)("item.dialogs.justenough.title")), r["default"].createElement("p", null , (0,
c.translate)("item.dialogs.justenough.text")), r["default"].createElement(u["default"], {
onClick: this.props.onClose,
className: "btn-fullwidth btn-dismiss"
}, (0,
c.translate)("item.dialogs.justenough.button")))
}
});
t["default"] = d,
e.exports = t["default"]
},
577: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(3)
, o = n(33)
, l = i(o)
, u = n(103)
, c = i(u)
, d = r["default"].createClass({
displayName: "PaymentRecurringDialogue",
propTypes: {
onClose: r["default"].PropTypes.func.isRequired,
user: r["default"].PropTypes.object.isRequired
},
render: function() {
return r["default"].createElement(l["default"], {
className: "dialogue-payment-recurring",
onClose: this.props.onClose
}, r["default"].createElement(c["default"], {
user: this.props.user
}), r["default"].createElement("div", {
className: "body"
}, r["default"].createElement("h1", {
className: "dialogue-payment-recurring-title"
}, (0,
a.translate)("payment.recurring.hotlink.title")), r["default"].createElement("div", {
className: "text",
dangerouslySetInnerHTML: {
__html: (0,
a.translate)("payment.recurring.hotlink.body", {
currency: (0,
a.getCurrencyWord)()
})
}
}), r["default"].createElement("button", {
className: "btn btn-dismiss",
onClick: this.props.onClose
}, (0,
a.translate)("app.buttons.i_get_it"))))
}
});
t["default"] = d,
e.exports = t["default"]
},
578: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(33)
, o = i(a)
, l = n(103)
, u = i(l)
, c = n(3)
, d = n(137)
, p = i(d)
, f = n(8)
, h = n(30)
, m = i(h)
, g = n(11)
, v = i(g)
, y = r["default"].createClass({
displayName: "PaymentResultDialogue",
propTypes: {
onClose: r["default"].PropTypes.func.isRequired,
user: r["default"].PropTypes.object.isRequired,
condition: r["default"].PropTypes.oneOf("success", "cancelled", "pending"),
redeemStatus: r["default"].PropTypes.oneOf(f.STATUS_INITIAL, f.STATUS_ERROR, f.STATUS_OK, f.STATUS_PENDING),
providerUid: r["default"].PropTypes.string
},
_renderPickASubscription: function() {
return this.props.redeemStatus === f.STATUS_INITIAL || this.props.redeemStatus === f.STATUS_PENDING ? r["default"].createElement("div", {
className: "dialog-payment-loading"
}) : this.props.redeemStatus === f.STATUS_OK ? r["default"].createElement("div", null , r["default"].createElement("h2", {
className: "lead"
}, (0,
c.translate)("payment.result.success.title")), r["default"].createElement(p["default"], {
className: "confetti"
}), r["default"].createElement("div", {
className: "fade"
}), r["default"].createElement("p", {
className: "text"
}, (0,
c.translate)("payment.result.success.text"), " ", r["default"].createElement("br", null ), (0,
c.translate)("payment.subscription.result_text", [m["default"].getProvider(this.props.providerUid).get("name")]))) : this.props.redeemStatus === f.STATUS_ERROR ? r["default"].createElement("div", null , r["default"].createElement("h2", {
className: "lead"
}, (0,
c.translate)("payment.subscription.failed.lead")), (0,
c.translateElement)(r["default"].createElement("p", {
className: "text"
}), "payment.subscription.failed.text", !1)) : void 0
},
_renderSuccess: function() {
return r["default"].createElement("div", null , r["default"].createElement("h2", {
className: "lead"
}, (0,
c.translate)("payment.result.success.title")), r["default"].createElement(p["default"], {
className: "confetti"
}), r["default"].createElement("div", {
className: "fade"
}), r["default"].createElement("p", {
className: "text"
}, (0,
c.translate)("payment.result.success.text")))
},
_renderCancelled: function() {
return r["default"].createElement("div", null , r["default"].createElement("h2", {
className: "lead"
}, (0,
c.translate)("payment.result.cancelled.title")))
},
_renderPending: function() {
return r["default"].createElement("div", null , r["default"].createElement("h2", {
className: "lead"
}, (0,
c.translate)("payment.result.pending.title")), r["default"].createElement("p", {
className: "text"
}, (0,
c.translate)("payment.result.pending.text")))
},
_renderBody: function() {
return this.props.providerUid ? this._renderPickASubscription() : "pending" === this.props.condition ? this._renderPending() : "cancelled" === this.props.condition ? this._renderCancelled() : "success" === this.props.condition ? this._renderSuccess() : void 0
},
_renderButton: function() {
return this.props.providerUid && this.props.redeemStatus !== f.STATUS_ERROR ? this.props.redeemStatus === f.STATUS_OK ? r["default"].createElement("a", {
href: "#",
className: "btn btn-go",
onClick: this.props.onClose
}, (0,
c.translate)("payment.subscription.result_button")) : void 0 : r["default"].createElement("a", {
href: "#",
className: "btn btn-go",
onClick: this.props.onClose
}, (0,
c.translate)("app.buttons.ok"))
},
render: function() {
var e = (0,
v["default"])("dialog-payment-result", "dialog-payment-" + this.props.condition, {
"dialog-payment-reward-fail": this.props.redeemStatus === f.STATUS_ERROR
});
return r["default"].createElement(o["default"], {
className: e,
onClose: this.props.onClose
}, r["default"].createElement(u["default"], {
user: this.props.user
}), r["default"].createElement("div", {
className: "body"
}, this._renderBody(), this._renderButton()))
}
});
t["default"] = y,
e.exports = t["default"]
},
579: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(3)
, o = n(8)
, l = n(30)
, u = i(l)
, c = n(11)
, d = i(c)
, p = n(33)
, f = i(p)
, h = n(103)
, m = i(h)
, g = n(137)
, v = i(g)
, y = r["default"].createClass({
displayName: "PaymentSubscriptionResultDialogue",
propTypes: {
onClose: r["default"].PropTypes.func.isRequired,
user: r["default"].PropTypes.object.isRequired,
status: r["default"].PropTypes.oneOf([o.STATUS_PENDING, o.STATUS_ERROR, o.STATUS_OK, o.STATUS_INITIAL]).isRequired,
subscription: r["default"].PropTypes.object
},
_renderBody: function() {
if (this.props.status === o.STATUS_OK) {
var e = this.props.subscription.provider.uid;
return r["default"].createElement("div", {
className: "body"
}, r["default"].createElement("h2", {
className: "lead"
}, (0,
a.translate)("app.text.congratulations")), r["default"].createElement(v["default"], {
className: "confetti"
}), r["default"].createElement("div", {
className: "fade"
}), (0,
a.translateElement)(r["default"].createElement("p", {
className: "text"
}), "payment.subscription.success_message", [u["default"].getProvider(e).get("name")]), r["default"].createElement("a", {
href: "#",
className: "btn btn-go",
onClick: this.props.onClose
}, (0,
a.translate)("payment.subscription.result_button")))
}
return r["default"].createElement("div", {
className: "body"
})
},
render: function() {
var e = (0,
d["default"])("dialog-payment-result", "dialog-payment-success", {
"dialog-payment-loading": this.props.status === o.STATUS_PENDING
});
return r["default"].createElement(f["default"], {
className: e,
onClose: this.props.onClose
}, r["default"].createElement(m["default"], {
user: this.props.user
}), this._renderBody())
}
});
t["default"] = y,
e.exports = t["default"]
},
580: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(33)
, o = i(a)
, l = n(20)
, u = i(l)
, c = n(3);
t["default"] = r["default"].createClass({
displayName: "RecurringPaymentTriggered",
propTypes: {
onClose: r["default"].PropTypes.func.isRequired
},
render: function() {
return r["default"].createElement(o["default"], {
className: "recurring-triggered",
onClose: this.props.onClose
}, r["default"].createElement("h2", null , (0,
c.translate)("payment.recurring.triggered.title")), r["default"].createElement("p", null , (0,
c.translate)("payment.recurring.triggered.body")), r["default"].createElement(u["default"], {
className: "btn-fullwidth",
onClick: this.props.onClose
}, (0,
c.translate)("app.buttons.i_get_it")))
}
}),
e.exports = t["default"]
},
581: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(33)
, o = i(a)
, l = n(20)
, u = (i(l),
n(8),
n(613))
, c = i(u)
, d = n(612)
, p = i(d)
, f = n(614)
, h = i(f)
, m = r["default"].createClass({
displayName: "SocialDialogue",
propTypes: {
page: r["default"].PropTypes.oneOf(["twitter", "facebook", "landing"]).isRequired,
onClose: r["default"].PropTypes.func.isRequired,
connectTwitter: r["default"].PropTypes.func.isRequired,
twitterConnected: r["default"].PropTypes.bool.isRequired,
twitterFriends: r["default"].PropTypes.oneOfType([r["default"].PropTypes.object, r["default"].PropTypes.array]).isRequired,
twitterStatus: r["default"].PropTypes.number.isRequired,
connectFacebook: r["default"].PropTypes.func.isRequired,
facebookConnected: r["default"].PropTypes.bool.isRequired,
facebookFriends: r["default"].PropTypes.oneOfType([r["default"].PropTypes.object, r["default"].PropTypes.array]).isRequired,
facebookStatus: r["default"].PropTypes.number.isRequired
},
_renderTwitterFriends: function() {
return r["default"].createElement(h["default"], {
connectFacebook: this.props.connectFacebook,
facebookConnected: this.props.facebookConnected,
twitterFriends: this.props.twitterFriends,
onClose: this.props.onClose
})
},
_renderFacebookFriends: function() {
return r["default"].createElement(p["default"], {
connectTwitter: this.props.connectTwitter,
twitterConnected: this.props.twitterConnected,
facebookFriends: this.props.facebookFriends,
onClose: this.props.onClose
})
},
_renderLanding: function() {
return r["default"].createElement(c["default"], {
connectFacebook: this.props.connectFacebook,
facebookConnected: this.props.facebookConnected,
facebookStatus: this.props.facebookStatus,
connectTwitter: this.props.connectTwitter,
twitterConnected: this.props.twitterConnected,
twitterStatus: this.props.twitterStatus
})
},
_renderBody: function() {
return "twitter" === this.props.page && this.props.twitterConnected ? this._renderTwitterFriends() : "facebook" === this.props.page && this.props.facebookConnected ? this._renderFacebookFriends() : this._renderLanding()
},
render: function() {
return r["default"].createElement(o["default"], {
className: "dialogue-social",
onClose: this.props.onClose
}, this._renderBody())
}
});
t["default"] = m,
e.exports = t["default"]
},
582: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(11)
, o = i(a)
, l = n(33)
, u = i(l)
, c = n(78)
, d = i(c)
, p = n(20)
, f = i(p)
, h = n(3)
, m = n(5);
t["default"] = r["default"].createClass({
displayName: "SubscriptionForm",
propTypes: {
data: r["default"].PropTypes.object.isRequired,
providerName: r["default"].PropTypes.string.isRequired,
onChangeInput: r["default"].PropTypes.func.isRequired,
onClickSubmit: r["default"].PropTypes.func.isRequired,
loading: r["default"].PropTypes.bool,
error: r["default"].PropTypes.bool,
statusCode: r["default"].PropTypes.number
},
_onSubmit: function(e) {
e.preventDefault(),
this.props.onClickSubmit()
},
_renderFirstField: function() {
var e = (0,
m.get)(this.props.data, "firstField.label")
, t = (0,
o["default"])({
inp: !0,
"inp-text": !0,
"inp-username": !0,
"s-error": this.props.error && 403 === this.props.statusCode
});
return r["default"].createElement(d["default"], {
type: "text",
name: "username",
placeholder: e || (0,
h.translate)("app.user.id"),
onChange: this.props.onChangeInput,
className: t
})
},
_renderSecondField: function() {
var e = (0,
m.get)(this.props.data, "secondField.label")
, t = (0,
m.get)(this.props.data, "secondField.secret")
, n = (0,
o["default"])({
inp: !0,
"inp-text": !0,
"inp-password": !0,
"s-error": this.props.error && 403 === this.props.statusCode
});
return r["default"].createElement(d["default"], {
type: t ? "password" : "text",
name: "password",
placeholder: e || (0,
h.translate)("app.user.password"),
onChange: this.props.onChangeInput,
className: n
})
},
_renderError: function() {
return this.props.error ? r["default"].createElement("p", {
className: "error"
}, (0,
h.translate)("settings.subscriptions.errors.invalid_credentials")) : null
},
render: function() {
return r["default"].createElement(u["default"], {
className: "dialog-subscription-form"
}, r["default"].createElement("form", {
name: "subscription-form",
onSubmit: this._onSubmit
}, r["default"].createElement("h2", null , (0,
h.translate)("settings.subscriptions.title")), (0,
h.translateElement)(r["default"].createElement("p", null ), "settings.subscriptions.add_subscription", [this.props.providerName], !1), this._renderError(), r["default"].createElement("div", {
className: "frm-add-subscription"
}, this._renderFirstField(), this._renderSecondField(), r["default"].createElement(f["default"], {
type: "submit",
className: "btn-text btn-blendle-icon-green btn-submit",
loading: this.props.loading
}, (0,
h.translate)("settings.subscriptions.link_subscription")))))
}
}),
e.exports = t["default"]
},
583: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(12)
, o = i(a)
, l = n(3)
, u = n(33)
, c = i(u)
, d = n(103)
, p = i(d)
, f = n(561)
, h = i(f)
, m = n(20)
, g = i(m);
t["default"] = r["default"].createClass({
displayName: "SubscriptionResult",
propTypes: {
onClickButton: r["default"].PropTypes.func.isRequired,
present: r["default"].PropTypes.number,
status: r["default"].PropTypes.string.isRequired,
provider: r["default"].PropTypes.object.isRequired
},
_onClickButton: function(e) {
this.props.onClickButton(e)
},
_renderSuccess: function() {
var e = void 0;
return this.props.present && (e = (0,
l.translateElement)(r["default"].createElement("p", {
className: "message"
}), "dialogues.subscription_result.success_message", [(0,
l.formatCurrency)(this.props.present), this.props.provider.get("name")])),
r["default"].createElement("div", {
className: "dialog-content s-success"
}, r["default"].createElement(h["default"], {
provider: this.props.provider
}), r["default"].createElement("h2", {
className: "title"
}, (0,
l.translate)("dialogues.subscription_result.success_title")), e, r["default"].createElement(g["default"], {
className: "btn-submit btn-green",
onClick: this._onClickButton
}, (0,
l.translate)("dialogues.subscription_result.success_button")))
},
_renderError: function() {
return r["default"].createElement("div", {
className: "dialog-content s-error"
}, r["default"].createElement(h["default"], {
provider: this.props.provider
}), r["default"].createElement("h2", {
className: "title"
}, (0,
l.translate)("dialogues.subscription_result.failure_title")), (0,
l.translateElement)(r["default"].createElement("p", {
className: "message"
}), "dialogues.subscription_result.failure_message", !1), r["default"].createElement(g["default"], {
className: "btn-submit",
onClick: this._onClickButton
}, (0,
l.translate)("dialogues.subscription_result.failure_button")))
},
_renderContent: function() {
return "success" !== this.props.status ? this._renderError() : this._renderSuccess()
},
render: function() {
return r["default"].createElement(c["default"], {
className: "dialog-subscription-result",
ref: "dialog"
}, r["default"].createElement(p["default"], {
user: o["default"].getUser()
}), this._renderContent())
}
}),
e.exports = t["default"]
},
584: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(33)
, o = i(a)
, l = n(569)
, u = i(l)
, c = n(3)
, d = r["default"].createClass({
displayName: "UsersDialogue",
propTypes: {
title: r["default"].PropTypes.string.isRequired,
onClose: r["default"].PropTypes.func.isRequired,
users: r["default"].PropTypes.object.isRequired,
analytics: r["default"].PropTypes.object.isRequired
},
getInitialState: function() {
return {
users: this.props.users,
fetching: !0
}
},
componentDidMount: function() {
this.state.users.on("sync", this._onSync),
this.state.users.fetch()
},
componentWillUnmount: function() {
this.state.users.off("sync", this._onSync)
},
_fetchMore: function() {
this.state.users.hasNext() && !this.state.users.isFetching() && (this.state.users.fetchNext(),
this.setState({
fetchingMore: !0
}))
},
_onSync: function(e) {
this.setState({
users: e,
fetchingMore: !1,
fetching: !1
})
},
_onScroll: function(e) {
var t = e.target;
t.scrollTop + t.offsetHeight + 100 >= t.scrollHeight && this._fetchMore()
},
_renderUsers: function() {
var e = this;
return 0 !== this.state.users.length || this.state.fetching ? this.state.users.map(function(t) {
return r["default"].createElement(u["default"], {
key: t.id,
user: t,
analytics: e.props.analytics,
onNavigate: e.props.onClose
})
}) : r["default"].createElement("div", {
className: "empty"
}, (0,
c.translate)("user.errors.users_not_found"))
},
_renderInitialLoading: function() {
return 0 === this.state.users.length && this.state.fetching ? r["default"].createElement("div", {
className: "loading"
}) : void 0
},
_renderLoadingMore: function() {
return this.state.fetchingMore ? r["default"].createElement("div", {
className: "loading-more"
}) : void 0
},
render: function() {
return r["default"].createElement(o["default"], {
className: "users-dialogue",
onClose: this.props.onClose
}, r["default"].createElement("div", {
className: "users-header s-success"
}, r["default"].createElement("div", {
className: "title",
dangerouslySetInnerHTML: {
__html: this.props.title
}
})), r["default"].createElement("ul", {
className: "users-list",
onScroll: this._onScroll
}, this._renderUsers(), this._renderInitialLoading(), this._renderLoadingMore()))
}
});
t["default"] = d,
e.exports = t["default"]
},
585: function(e, t, n) {
"use strict";
function i(e) {
var t = w["default"].duration(1e3 * e.subscription_duration).humanize()
, n = E["default"].getProvider(e.provider_uid);
return (0,
y.translate)("dialogues.verified_account.reward.intro_blendle_subscription", [n.get("name"), t])
}
function s(e) {
return (0,
y.translate)("dialogues.verified_account.reward.intro_blendle_money", [(0,
y.formatCurrency)(e.amount)])
}
function r(e, t) {
var n = w["default"].duration(1e3 * t.subscription_duration).humanize()
, i = E["default"].getProvider(t.provider_uid);
return (0,
y.translate)("dialogues.verified_account.reward.intro_third_party_subscription", [e, i.get("name"), n])
}
function a(e, t) {
return (0,
y.translate)("dialogues.verified_account.reward.intro_third_party_money", [e, (0,
y.formatCurrency)(t.amount)])
}
var o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(33)
, d = o(c)
, p = n(137)
, f = o(p)
, h = n(329)
, m = o(h)
, g = n(103)
, v = o(g)
, y = n(3)
, _ = n(8)
, b = n(18)
, w = o(b)
, S = n(5)
, k = n(30)
, E = o(k)
, C = u["default"].createClass({
displayName: "VerifiedUserDialogue",
propTypes: {
onClose: u["default"].PropTypes.func.isRequired,
onClickProvider: u["default"].PropTypes.func.isRequired,
user: u["default"].PropTypes.object.isRequired,
rewards: u["default"].PropTypes.array
},
_onClickProvider: function(e, t) {
t.target.classList.contains("subscription-provider") && this.props.onClickProvider(e)
},
_getSingleRewardIntro: function(e) {
var t = void 0;
return t = e.name === _.BLENDLE_COUPON ? "subscription" === e.reward_type ? i(e) : s(e) : "subscription" === e.reward_type ? r(e.name, e) : a(e.name, e),
u["default"].createElement("span", {
dangerouslySetInnerHTML: {
__html: t
}
})
},
_getMultipleRewardsIntro: function(e) {
var t = (0,
S.uniq)(e.map(function(e) {
return e.name
}));
return 1 === t.length ? t[0] === _.BLENDLE_COUPON ? u["default"].createElement("span", null , (0,
y.translateElement)(u["default"].createElement("span", null ), "dialogues.verified_account.reward.intro_multiple_us", !1), u["default"].createElement(m["default"], {
rewards: e,
onClickProvider: this.props.onClickProvider,
hideGivers: !0
})) : u["default"].createElement("span", null , (0,
y.translateElement)(u["default"].createElement("span", null ), "dialogues.verified_account.reward.intro_multiple_third_party", [t[0]], !1), u["default"].createElement(m["default"], {
rewards: e,
onClickProvider: this.props.onClickProvider,
hideGivers: !0
})) : u["default"].createElement("span", null , (0,
y.translateElement)(u["default"].createElement("span", null ), "dialogues.verified_account.reward.intro_multiple_third_parties", !1), u["default"].createElement(m["default"], {
rewards: e,
hideGivers: !1,
onClickProvider: this.props.onClickProvider
}))
},
_renderSingleReward: function(e) {
var t = this._getSingleRewardIntro(e);
return u["default"].createElement("div", {
className: "intro",
onClick: this._onClickProvider.bind(this, e.provider_uid)
}, t)
},
_renderMultipleRewards: function(e) {
var t = this._getMultipleRewardsIntro(e);
return u["default"].createElement("div", {
className: "intro"
}, t)
},
_renderRewards: function() {
var e = this.props.rewards;
return e ? 1 === e.length ? this._renderSingleReward(e[0]) : this._renderMultipleRewards(e) : null
},
render: function() {
return u["default"].createElement(d["default"], {
className: "dialog-verified-user",
onClose: this.props.onClose
}, u["default"].createElement(v["default"], {
user: this.props.user
}), u["default"].createElement("div", {
className: "body"
}, u["default"].createElement("h2", {
className: "welcome"
}, (0,
y.translate)("dialogues.verified_account.title")), u["default"].createElement(f["default"], {
className: "confetti"
}), u["default"].createElement("div", {
className: "fade"
}), this._renderRewards(), u["default"].createElement("a", {
className: "btn btn-go",
onClick: this.props.onClose
}, (0,
y.translate)("supersympathiek"))))
}
});
t["default"] = C,
e.exports = t["default"]
},
586: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(3)
, o = i(a)
, l = n(225)
, u = i(l)
, c = n(8);
t["default"] = r["default"].createClass({
displayName: "ChangeEmailForm",
propTypes: {
onSubmit: r["default"].PropTypes.func.isRequired,
email: r["default"].PropTypes.string.isRequired,
error: r["default"].PropTypes.object
},
getInitialState: function() {
return {
email: this.props.email
}
},
_onInputEmailChange: function(e) {
this.setState({
email: e.target.value
})
},
_onSuggestion: function(e) {
this.setState({
email: e
})
},
_renderEmailExists: function() {
var e = this.props.error;
if (e && e.type === c.USER_ID_TAKEN) {
var t = this.props.email;
return r["default"].createElement("p", {
className: "email-exists"
}, o["default"].translate("signup.user.email_used"), " ", r["default"].createElement("a", {
href: "/logout/" + t
}, o["default"].translate("signup.email.login_as", [t])))
}
return null
},
render: function() {
return r["default"].createElement("form", {
className: "v-change-email-form",
name: "change-email",
onSubmit: this._onSubmit
}, r["default"].createElement("h2", null , o["default"].translate("deeplink.signup.email")), r["default"].createElement("p", null , r["default"].createElement("input", {
className: "inp inp-text inp-fullwidth",
ref: "email",
type: "email",
name: "email",
onChange: this._onInputEmailChange,
value: this.state.email
}), r["default"].createElement(u["default"], {
email: this.state.email,
onClick: this._onSuggestion
})), this._renderEmailExists(), r["default"].createElement("p", null , r["default"].createElement("input", {
className: "btn btn-submit btn-fullwidth",
type: "submit",
value: o["default"].translate("app.buttons.edit")
})))
},
_onSubmit: function(e) {
e.preventDefault(),
this.props.onSubmit(this.state.email)
}
}),
e.exports = t["default"]
},
587: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(15)
, o = i(a)
, l = n(3)
, u = n(234)
, c = i(u)
, d = n(11)
, p = i(d);
t["default"] = r["default"].createClass({
displayName: "SignUpEnterPasswordForm",
propTypes: {
onSubmit: r["default"].PropTypes.func.isRequired,
error: r["default"].PropTypes.string,
loading: r["default"].PropTypes.bool
},
getInitialState: function() {
return {
password: ""
}
},
componentDidMount: function() {
var e = this;
setTimeout(function() {
o["default"].findDOMNode(e.refs.password).focus()
})
},
render: function() {
var e = (0,
p["default"])(["frm", {
"s-loading": this.props.loading
}])
, t = (0,
p["default"])(["btn", "btn-fullwidth", "btn-text", "btn-submit", {
"s-loading": this.props.loading
}]);
return r["default"].createElement("form", {
className: e,
onSubmit: this._onSubmit
}, r["default"].createElement("h2", null , l.locale.deeplink.signup.password), r["default"].createElement("p", {
className: "lead"
}, l.locale.deeplink.signup.password_form), r["default"].createElement("div", {
className: "frm-field-wrapper"
}, r["default"].createElement("input", {
className: "inp inp-text inp-fullwidth inp-password",
name: "password",
style: this._getPasswordStyles(),
ref: "password",
onChange: this._onPasswordChange,
type: "password",
placeholder: l.locale.signup.password.placeholder
}), this._renderError()), r["default"].createElement("button", {
className: t
}, l.locale.app.buttons.save))
},
_renderError: function() {
return this.props.error ? r["default"].createElement("div", {
className: "error-message visible"
}, this.props.error) : null
},
_onSubmit: function(e) {
e.preventDefault(),
this.props.loading || this.props.onSubmit(this._getPassword())
},
_onPasswordChange: function() {
this.setState({
password: this._getPassword()
})
},
_getPassword: function() {
return o["default"].findDOMNode(this.refs.password).value
},
_getPasswordStyles: function() {
if (!this.state.password.length)
return null ;
var e = c["default"].getScore(this.state.password);
return {
color: c["default"].getScoreColor(e),
borderColor: c["default"].getScoreColor(e)
}
}
}),
e.exports = t["default"]
},
588: function(e, t, n) {
"use strict";
var i = n(2)
, s = n(46)
, r = n(3).locale;
e.exports = i.createClass({
displayName: "exports",
propTypes: {
onSubmit: i.PropTypes.func.isRequired,
onCancel: i.PropTypes.func.isRequired,
email: i.PropTypes.string.isRequired
},
render: function() {
return i.createElement("form", {
onSubmit: this._onSubmit
}, i.createElement("p", null , i.createElement(s, {
find: "deeplink.verification.checkEmail",
sanitize: !1,
args: [this.props.email]
})), i.createElement("p", {
className: "btn-group"
}, i.createElement("input", {
className: "btn btn-fullwidth btn-confirm",
type: "submit",
value: r.app.buttons.yes
}), i.createElement("input", {
className: "btn btn-fullwidth btn-secondary",
type: "button",
onClick: this.props.onCancel,
value: r.app.buttons.no
})))
},
_onSubmit: function(e) {
e.preventDefault(),
this.props.onSubmit(this.props.email)
}
})
},
589: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(11)
, d = o(c)
, p = n(3)
, f = n(8)
, h = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "_onClick",
value: function(e) {
"A" === e.target.nodeName && (e.preventDefault(),
this.props.onSendLoginEmail())
}
}, {
key: "render",
value: function() {
var e = this.props.emailLoginState.status
, t = (0,
d["default"])("login-email-message", {
"s-success": e === f.STATUS_OK,
"s-error": e === f.STATUS_ERROR
})
, n = "emaillogin.login.propose";
e === f.STATUS_OK ? n = "emaillogin.login.send" : e === f.STATUS_ERROR && (n = "emaillogin.login.invalid");
var i = Math.random();
return (0,
p.translateElement)(u["default"].createElement("p", {
key: i,
className: t,
onClick: this._onClick.bind(this)
}), n, !1)
}
}], [{
key: "propTypes",
value: {
onSendLoginEmail: u["default"].PropTypes.func.isRequired,
emailLoginState: u["default"].PropTypes.object
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = h,
e.exports = t["default"]
},
590: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(26)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(2)
, c = l(u)
, d = n(11)
, p = (l(d),
n(3))
, f = n(8)
, h = n(589)
, m = l(h)
, g = n(157)
, v = l(g)
, y = function(e) {
function t(e) {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).call(this),
this.state = {
username: "",
password: ""
},
this.state.username = e.initialUsername || ""
}
return s(t, e),
r(t, null , [{
key: "propTypes",
value: {
onLogin: c["default"].PropTypes.func.isRequired,
onToReset: c["default"].PropTypes.func,
onSendLoginEmail: c["default"].PropTypes.func.isRequired,
loginState: c["default"].PropTypes.object,
emailLoginState: c["default"].PropTypes.object,
initialUsername: c["default"].PropTypes.string,
buttonHTML: c["default"].PropTypes.string
},
enumerable: !0
}]),
r(t, [{
key: "componentDidMount",
value: function() {
"Explorer" === window.BrowserDetect.browser && window.BrowserDetect.version <= 11 || this._usernameInput.focus()
}
}, {
key: "componentDidUpdate",
value: function(e) {
this.props.emailLoginState !== e.emailLoginState && this.setState({
hideEmailLogin: !1
})
}
}, {
key: "_onSubmit",
value: function(e) {
e.preventDefault(),
this.state.username.trim() && this.props.onLogin(this.state.username.trim(), this.state.password)
}
}, {
key: "_onSendLoginEmail",
value: function() {
this.props.onSendLoginEmail(this.state.username.trim())
}
}, {
key: "_onChangeInput",
value: function(e) {
var t;
this.setState((t = {},
o(t, e.target.name, e.target.value),
o(t, "hideEmailLogin", !0),
t))
}
}, {
key: "_renderError",
value: function() {
var e = this.props.loginState;
if (e.status === f.STATUS_ERROR)
return e.error.type === f.INVALID_TOKEN || e.error.type === f.MISSING_PASSWORD ? c["default"].createElement("div", {
className: "error-message visible"
}, (0,
p.translate)("error.invalid_username_or_password")) : c["default"].createElement("div", {
className: "error-message visible"
}, (0,
p.translate)("error.invalid_email"))
}
}, {
key: "_renderEmailLoginLink",
value: function() {
var e = this.props.loginState
, t = null ;
return this.state.hideEmailLogin || e.status !== f.STATUS_ERROR || e.error.type !== f.INVALID_TOKEN && e.error.type !== f.MISSING_PASSWORD || (t = c["default"].createElement(m["default"], {
key: "link",
emailLoginState: this.props.emailLoginState,
onSendLoginEmail: this._onSendLoginEmail.bind(this)
})),
c["default"].createElement(v["default"], {
key: "link",
component: "div",
transitionName: "slide",
transitionEnter: !0,
transitionEnterTimeout: 500,
transitionLeave: !1,
children: t
})
}
}, {
key: "render",
value: function() {
var e = this;
return c["default"].createElement("form", {
name: "login",
onSubmit: this._onSubmit.bind(this),
className: "frm frm-user-blendle s-active",
noValidate: !0
}, c["default"].createElement("div", {
className: "frm-field-wrapper"
}, c["default"].createElement("input", {
onChange: this._onChangeInput.bind(this),
defaultValue: this.state.username,
type: "email",
name: "username",
placeholder: (0,
p.translate)("login.dropdown.blendle.username"),
autoComplete: "off",
className: "inp inp-text inp-email lowercase",
ref: function(t) {
return e._usernameInput = t
}
}), this._renderError()), this._renderEmailLoginLink(), c["default"].createElement("div", {
className: "frm-field-wrapper"
}, c["default"].createElement("input", {
onChange: this._onChangeInput.bind(this),
type: "password",
name: "password",
placeholder: (0,
p.translate)("login.dropdown.blendle.password"),
autoComplete: "off",
className: "inp inp-text inp-password"
})), c["default"].createElement("div", {
className: "frm-field-wrapper form-field-submit"
}, c["default"].createElement("button", {
type: "submit",
className: "btn btn-submit btn-blendle btn-green",
dangerouslySetInnerHTML: {
__html: this.props.buttonHTML || (0,
p.translate)("login.dropdown.blendle.submit")
}
})), c["default"].createElement("p", null , c["default"].createElement("a", {
className: "forgot-password",
href: "/login/reset",
onClick: this.props.onToReset
}, (0,
p.translate)("login.dropdown.to_reset_token"))))
}
}]),
t
}(c["default"].Component);
t["default"] = y,
e.exports = t["default"]
},
591: function(e, t, n) {
"use strict";
var i = n(5)
, s = {
subscribeToModel: function(e, t) {
e.on(t || "change", this.forceUpdate.bind(this, null ), this)
},
subscribeToCollection: function(e, t) {
var n = i.debounce(this.forceUpdate.bind(this, null ), 10);
e.on(t || "add remove reset sort", n, this)
},
unsubscribeFromModel: function(e) {
e.off(null , null , this)
},
unsubscribeFromCollection: function(e) {
e.off(null , null , this)
}
};
e.exports = s
},
597: function(e, t, n) {
"use strict";
var i = n(2)
, s = n(5)
, r = n(57)
, a = n(11)
, o = n(3)
, l = n(345).getExceptionForCountry
, u = [{
code: "nl_NL",
label: "Nederland"
}, {
code: "de_DE",
label: "Deutschland"
}, {
code: "en_US",
label: "USA"
}, {
code: "fr_FR",
label: "Français"
}]
, c = i.createClass({
displayName: "LocaleDropdown",
mixins: [r()],
propTypes: {
selected: i.PropTypes.string.isRequired,
onChange: i.PropTypes.func.isRequired
},
_onChange: function(e, t) {
t.preventDefault(),
this.toggleDropdown(),
this.props.onChange(e)
},
render: function() {
var e = a("v-locale-dropdown", {
"s-active": this.state.open
});
return i.createElement("div", {
className: e
}, i.createElement("div", {
className: "handle",
onClick: this.toggleDropdown
}, this._renderSelected()), i.createElement("div", {
className: "v-locale-list"
}, this._renderOptions()))
},
_renderOptions: function() {
var e = this;
return s(o.supportedCountryLocales).filter(function(e) {
return !l(e.split("_")[1], "hideFromCountrySelector", !1)
}).map(function(e) {
return s.find(u, {
code: e
})
}).compact().map(function(t) {
return i.createElement("a", {
key: t.code,
href: "#",
className: "lang-" + t.code,
onClick: e._onChange.bind(e, t.code)
}, t.label)
}).value()
},
_renderSelected: function() {
var e = s.find(u, {
code: this.props.selected
});
return i.createElement("div", {
className: "lang-" + e.code
}, i.createElement("label", null , e.label))
}
});
e.exports = c
},
598: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(3)
, d = n(28)
, p = o(d)
, f = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
return u["default"].createElement("p", {
className: "v-logout-link"
}, u["default"].createElement(p["default"], {
href: "/logout",
className: "btn"
}, (0,
c.translate)("login.buttons.logout")))
}
}]),
t
}(u["default"].Component);
t["default"] = f,
e.exports = t["default"]
},
599: function(e, t, n) {
"use strict";
var i = n(53)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(33)
, a = s(r)
, o = n(20)
, l = s(o)
, u = n(3)
, c = n(4)
, d = s(c)
, p = n(2)
, f = s(p)
, h = s(u)
, m = n(601)
, g = s(m)
, v = n(600)
, y = s(v)
, _ = n(602)
, b = s(_)
, w = n(605)
, S = s(w)
, k = n(228)
, E = s(k)
, C = n(598)
, T = s(C)
, P = n(597)
, N = s(P)
, x = n(111)
, R = s(x)
, L = n(38)
, I = s(L)
, M = n(175)
, A = s(M)
, D = n(47)
, O = s(D)
, U = f["default"].createClass({
displayName: "PrimaryNavigation",
propTypes: {
activeModule: f["default"].PropTypes.string,
active: f["default"].PropTypes.string,
mobile: f["default"].PropTypes.bool,
authorizedUser: f["default"].PropTypes.object,
notifications: f["default"].PropTypes.object,
notificationsState: f["default"].PropTypes.object,
fetchNotifications: f["default"].PropTypes.func
},
getInitialState: function() {
return {
openSearch: !1,
openLogin: !1
}
},
_closeWarning: function() {
this.setState({
openLogin: !0,
loginWarning: !1
})
},
_onLanguageChange: function(e) {
e !== h["default"].getLocale() && (h["default"].load(e),
h["default"].setCurrencyBasedOnLocale(e),
I["default"].setCountryCode(e.slice(-2)))
},
_onSearch: function(e) {
d["default"].history.navigate("search/" + encodeURIComponent(e), {
trigger: !0
})
},
_openSearch: function() {
this.setState({
openSearch: !0
})
},
_resetSearch: function() {
this.setState({
openSearch: !1
})
},
_onLoginOpen: function() {
this.setState({
openLogin: !0
})
},
_onLoginClose: function() {
return I["default"].isBetaCountry() && !O["default"].get("signUpCode") ? void A["default"].redirectToLaunchSite() : void this.setState({
openLogin: !1
})
},
openLogin: function(e) {
this.setState({
openLogin: !0,
openLoginPane: e
})
},
openSearch: function() {
this._openSearch()
},
openLoginWarning: function(e) {
this.setState({
openLogin: !1,
openLoginPane: e,
loginWarning: !0
})
},
_renderUnauthorizedNavigation: function() {
return f["default"].createElement(E["default"], {
mobile: this.props.mobile,
active: this.state.openLoginPane,
open: this.state.openLogin,
onOpen: this._onLoginOpen,
onClose: this._onLoginClose
})
},
_renderDefaultNavigation: function() {
return [f["default"].createElement(g["default"], {
key: "search",
mobile: this.props.mobile,
onSearch: this._onSearch,
onClose: this._resetSearch,
open: this.state.openSearch,
i18n: h["default"].locale
}), f["default"].createElement(y["default"], {
key: "items",
"new": this.props.notificationsState,
activeNavigation: this.props.active,
user: this.props.authorizedUser,
mobile: this.props.mobile,
onOpenSearch: this._openSearch
}), f["default"].createElement(S["default"], {
key: "notifications",
onOpen: this.props.fetchNotifications,
fetchNextNotifications: this.props.fetchNextNotifications,
notifications: this.props.notifications,
loadingStatus: this.props.loadingNotificationsStatus,
"new": !!this.props.notificationsState.get("messages")
}), f["default"].createElement(b["default"], {
key: "user",
user: this.props.authorizedUser,
mobile: this.props.mobile
})]
},
_renderSignUpNavigation: function() {
if (!this.props.authorizedUser) {
var e = [f["default"].createElement(E["default"], {
key: "login",
mobile: this.props.mobile,
active: this.state.openLoginPane,
open: this.state.openLogin,
onOpen: this._onLoginOpen,
onClose: this._onLoginClose
})];
return I["default"].isBetaCountry() || e.push(f["default"].createElement(N["default"], {
key: "lang",
selected: h["default"].currentLocale,
onChange: this._onLanguageChange
})),
e
}
return f["default"].createElement(T["default"], {
user: this.props.authorizedUser
})
},
_renderNavigation: function() {
return i(h["default"].locale).length && this.props.activeModule ? "signup" === this.props.activeModule ? this._renderSignUpNavigation() : this.props.authorizedUser && "deeplink" !== this.props.activeModule ? this._renderDefaultNavigation() : this._renderUnauthorizedNavigation() : null
},
_renderWarning: function() {
return this.state.loginWarning ? f["default"].createElement(a["default"], {
onClose: this._closeWarning
}, f["default"].createElement("h2", null , (0,
u.translate)("login.settings_warning_header")), f["default"].createElement("p", null , (0,
u.translate)("login.settings_warning")), f["default"].createElement(l["default"], {
onClick: this._closeWarning,
className: "btn-fullwidth"
}, (0,
u.translate)("app.buttons.login"))) : null
},
render: function() {
return f["default"].createElement("div", {
className: "v-primary-navigation"
}, f["default"].createElement(R["default"], null ), this._renderNavigation(), this._renderWarning())
}
});
t["default"] = U,
e.exports = t["default"]
},
600: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(338)
, o = i(a)
, l = n(3)
, u = r["default"].createClass({
displayName: "PrimaryNavigationItems",
propTypes: {
user: r["default"].PropTypes.object.isRequired,
activeNavigation: r["default"].PropTypes.string.isRequired,
mobile: r["default"].PropTypes.bool.isRequired,
onOpenSearch: r["default"].PropTypes.func.isRequired,
"new": r["default"].PropTypes.object.isRequired
},
render: function() {
var e = void 0
, t = void 0
, n = void 0;
return this.props.user && this.props.user.get("pins") && (n = r["default"].createElement("span", {
className: "count"
}, this.props.user.get("pins"))),
this.props.user && (e = [r["default"].createElement(o["default"], {
url: "/alerts",
className: "alerts",
title: (0,
l.translate)("navigation.links.alerts.alt"),
active: "alerts" === this.props.activeNavigation,
"new": this.props["new"].get("alerts"),
key: "alerts"
}, (0,
l.translate)("navigation.links.alerts.label")), r["default"].createElement(o["default"], {
url: "/pins",
className: "readlater",
title: (0,
l.translate)("navigation.links.readlater.alt"),
active: "pins" === this.props.activeNavigation,
key: "pins"
}, (0,
l.translate)("navigation.links.readlater.label"), n)]),
this.props.mobile && (t = r["default"].createElement("a", {
className: "search",
title: (0,
l.translate)("navigation.links.search.alt"),
onClick: this.props.onOpenSearch,
active: "search" === this.props.activeNavigation,
key: "search"
}, (0,
l.translate)("navigation.links.search.label"))),
r["default"].createElement("div", {
className: "v-primary-navigation-items"
}, r["default"].createElement(o["default"], {
url: "/",
className: "timeline",
title: (0,
l.translate)("navigation.links.timeline.alt"),
active: "" === this.props.activeNavigation || "following" === this.props.activeNavigation,
key: "timeline"
}, (0,
l.translate)("navigation.links.timeline.label")), r["default"].createElement(o["default"], {
url: "/kiosk",
className: "kiosk",
title: (0,
l.translate)("navigation.links.kiosk.alt"),
active: "kiosk" === this.props.activeNavigation,
"new": this.props["new"].get("favourites"),
key: "kiosk"
}, (0,
l.translate)("navigation.links.kiosk.label")), e, t)
}
});
t["default"] = u,
e.exports = t["default"]
},
601: function(e, t, n) {
"use strict";
var i = n(2)
, s = n(15)
, r = (n(3),
n(11))
, a = n(57)
, o = n(17)
, l = n(177)
, u = i.createClass({
displayName: "Search",
mixins: [a()],
getInitialState: function() {
return {
term: ""
}
},
componentDidUpdate: function(e, t) {
this.props.open && !this.state.open && this.setState({
open: !0
}),
this.state.open && !t.open && s.findDOMNode(this.refs.input).focus()
},
render: function() {
var e = r([{
"s-active": this.state.open
}, "frm-search"]);
return i.createElement("form", {
className: e,
onSubmit: this._performSearch,
onClick: this._considerOpen
}, i.createElement("label", {
ref: "label",
htmlFor: "frm-search-input",
className: "lbl-search"
}, this.props.i18n.navigation.links.search.label), i.createElement("input", {
ref: "input",
type: "search",
name: "q",
id: "frm-search-input",
placeholder: this.props.i18n.navigation.links.search.placeholder_text,
className: "inp inp-text inp-search",
value: this.state.term,
onChange: this._handleSearch,
onFocus: this._selectSearch,
autoComplete: "off"
}), i.createElement("a", {
onClick: this.closeDropdown,
className: "btn-search-close"
}))
},
_considerOpen: function(e) {
this.props.mobile ? e.target === s.findDOMNode(this) && this.closeDropdown() : this.openDropdown()
},
_performSearch: function(e) {
e.preventDefault();
var t = s.findDOMNode(this.refs.input).value;
"" !== t && (s.findDOMNode(this.refs.input).blur(),
this.props.onSearch(t)),
this.closeDropdown()
},
_handleSearch: function(e) {
this.setState({
term: e.target.value
})
},
_selectSearch: function() {
s.findDOMNode(this.refs.input).select(),
o.hasTouch() && setTimeout(function() {
l.vertical(document.body, 0)
}, 200)
}
});
e.exports = u
},
602: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(57)
, r = i(s)
, a = n(2)
, o = i(a)
, l = n(15)
, u = i(l)
, c = n(11)
, d = i(c)
, p = n(56)
, f = i(p)
, h = n(603)
, m = i(h)
, g = n(3)
, v = o["default"].createClass({
displayName: "UserDropdown",
mixins: [(0,
r["default"])()],
componentDidUpdate: function() {
if (this.props.mobile) {
var e = document.querySelector(".a-sidebar");
e.classList.add("l-under"),
u["default"].render(o["default"].createElement(m["default"], {
lang: (0,
g.getLocale)(),
user: this.props.user,
active: this.state.open
}), e),
this.state.open ? document.body.classList.add("l-mobile-menu-open") : document.body.classList.remove("l-mobile-menu-open")
}
},
compontentWillUnmount: function() {
document.querySelector(".a-sidebar").classList.remove("l-under")
},
render: function() {
var e = void 0
, t = (0,
d["default"])({
"s-active": this.state.open,
"v-user-dropdown": !0
});
return this.props.mobile || (e = o["default"].createElement(m["default"], {
lang: (0,
g.getLocale)(),
user: this.props.user,
active: this.state.open,
onNavigationClicked: this.closeDropdown
})),
o["default"].createElement("div", {
className: t
}, o["default"].createElement("div", {
className: "user dropdown"
}, o["default"].createElement("a", {
className: "user-avatar current",
onClick: this.toggleDropdown
}, o["default"].createElement(f["default"], {
className: "user-avatar-image l-original s-success",
src: this.props.user.getAvatarHref(),
alt: this.props.user.get("fullname")
}), o["default"].createElement("div", {
className: "user-avatar-overlay"
})), e))
}
});
t["default"] = v,
e.exports = t["default"]
},
603: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(11)
, o = i(a)
, l = n(41)
, u = i(l)
, c = n(338)
, d = i(c)
, p = n(56)
, f = i(p)
, h = n(3)
, m = n(345)
, g = r["default"].createClass({
displayName: "UserNavigationItems",
propTypes: {
lang: r["default"].PropTypes.string.isRequired,
active: r["default"].PropTypes.bool.isRequired,
user: r["default"].PropTypes.object.isRequired,
onNavigationClicked: r["default"].PropTypes.func.isRequired
},
render: function() {
var e = (0,
o["default"])([{
"s-active": this.props.active
}, "v-user-navigation"])
, t = (0,
o["default"])([{
"s-low": this.props.user.get("balance") < 1
}, "amount"])
, n = "nl_NL" === this.props.lang ? "https://blendle.homerun.hr/" : "https://blendle.homerun.hr/?lang=en"
, i = void 0;
return (0,
m.getException)("hideSubscriptionsSetting", !1) || (i = r["default"].createElement(d["default"], {
url: "/settings/subscriptions",
className: "subscriptions",
onClick: this.props.onNavigationClicked
}, (0,
h.translate)("settings.subscriptions.title_short"))),
r["default"].createElement("div", {
className: e
}, r["default"].createElement(d["default"], {
url: "/me",
className: "profile me",
onClick: this.props.onNavigationClicked
}, r["default"].createElement(f["default"], {
className: "user-avatar-menu l-original s-success",
src: this.props.user.getAvatarHref(),
alt: ""
}), (0,
h.translate)("navigation.links.profile.label")), r["default"].createElement(d["default"], {
url: "/me/items",
className: "profile archive",
onClick: this.props.onNavigationClicked
}, (0,
h.translate)("navigation.links.archive.label")), r["default"].createElement(d["default"], {
url: "/settings",
className: "settings",
onClick: this.props.onNavigationClicked
}, (0,
h.translate)("navigation.links.settings.label")), r["default"].createElement(d["default"], {
url: "/settings/wallet",
className: "wallet",
onClick: this.props.onNavigationClicked
}, (0,
h.translate)("navigation.links.wallet.label"), r["default"].createElement("span", {
className: t
}, (0,
u["default"])(this.props.user.get("balance")))), i, r["default"].createElement("a", {
href: n,
className: "jobs",
target: "_blank",
onClick: this.props.onNavigationClicked
}, (0,
h.translate)("navigation.links.jobs.label")), r["default"].createElement("a", {
href: "#",
className: "helpdesk",
"data-reamaze-lightbox": "kb"
}, (0,
h.translate)("navigation.links.helpdesk.label")), r["default"].createElement(d["default"], {
url: "/about",
className: "contact",
onClick: this.props.onNavigationClicked
}, (0,
h.translate)("navigation.links.about.label")), r["default"].createElement(d["default"], {
url: "/logout",
className: "logout",
onClick: this.props.onNavigationClicked
}, (0,
h.translate)("navigation.links.logout.label")))
}
});
t["default"] = g,
e.exports = t["default"]
},
604: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(3)
, o = n(18)
, l = i(o)
, u = n(28)
, c = i(u)
, d = r["default"].createClass({
displayName: "LowBalanceNotification",
propTypes: {
notification: r["default"].PropTypes.object.isRequired,
onClick: r["default"].PropTypes.func
},
render: function() {
var e = (0,
l["default"])(this.props.notification.get("time")).calendar();
return r["default"].createElement(c["default"], {
className: "v-low-balance-notification v-notification",
href: "/payment",
onClick: this.props.onClick
}, r["default"].createElement("div", {
className: "icon-blendle"
}), r["default"].createElement("p", {
className: "message"
}, (0,
a.translate)("notifications.events.low-balance"), r["default"].createElement("span", {
className: "time"
}, e)))
}
});
t["default"] = d,
e.exports = t["default"]
},
605: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(57)
, o = i(a)
, l = n(11)
, u = i(l)
, c = n(339)
, d = i(c)
, p = n(13)
, f = i(p)
, h = r["default"].createClass({
displayName: "NotificationsDropdown",
propTypes: {
notifications: r["default"].PropTypes.object.isRequired,
fetchNextNotifications: r["default"].PropTypes.func.isRequired,
loadingStatus: r["default"].PropTypes.number.isRequired,
"new": r["default"].PropTypes.bool.isRequired
},
mixins: [(0,
o["default"])()],
_fetchNextNotifications: function(e) {
this.props.fetchNextNotifications(e),
this.closeDropdown()
},
_toggleDropdown: function(e) {
this.state.open || f["default"].track("Notification Open Dropdown", {
"new": this.props["new"]
}),
this.toggleDropdown(e)
},
render: function() {
var e = (0,
u["default"])("v-notifications-dropdown", {
"s-active": this.state.open
}, {
"s-new": this.props["new"]
});
return r["default"].createElement("div", {
className: e
}, r["default"].createElement("div", {
className: "handle",
onClick: this._toggleDropdown
}, r["default"].createElement("div", {
className: "inner-handle"
})), r["default"].createElement(d["default"], {
notifications: this.props.notifications,
onNotificationClick: this.closeDropdown,
limit: 5,
fetchNextNotifications: this._fetchNextNotifications,
autoLoad: !1,
loadingStatus: this.props.loadingStatus
}))
}
});
t["default"] = h,
e.exports = t["default"]
},
606: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(3)
, o = n(18)
, l = i(o)
, u = n(41)
, c = i(u)
, d = n(28)
, p = i(d)
, f = r["default"].createClass({
displayName: "PaymentNotification",
propTypes: {
notification: r["default"].PropTypes.object.isRequired,
onClick: r["default"].PropTypes.func
},
render: function() {
var e = this.props.notification;
return r["default"].createElement(p["default"], {
className: "v-payment-notification v-notification",
href: "/settings/wallet",
onClick: this.props.onClick
}, r["default"].createElement("div", {
className: "icon-check"
}), r["default"].createElement("p", {
className: "message"
}, (0,
a.translate)("notifications.events.recurring-payment", [(0,
c["default"])(e.get("amount"))]), r["default"].createElement("span", {
className: "time"
}, (0,
l["default"])(e.get("time")).calendar())))
}
});
t["default"] = f,
e.exports = t["default"]
},
607: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(15)
, o = i(a)
, l = n(3)
, u = n(18)
, c = i(u)
, d = n(28)
, p = i(d)
, f = n(56)
, h = i(f)
, m = n(172)
, g = i(m)
, v = r["default"].createClass({
displayName: "UserNotification",
propTypes: {
notification: r["default"].PropTypes.object.isRequired,
onClick: r["default"].PropTypes.func
},
_onClick: function(e) {
e.target.contains(o["default"].findDOMNode(this.refs.follow)) || this.props.onClick && this.props.onClick(e)
},
render: function() {
var e = this.props.notification.getEmbedded("user")
, t = (0,
c["default"])(this.props.notification.get("time")).calendar();
return e ? r["default"].createElement(p["default"], {
className: "v-notification",
href: "/user/" + e.id,
onClick: this._onClick
}, r["default"].createElement(h["default"], {
className: "image",
src: e.getAvatarHref()
}), r["default"].createElement("p", {
className: "message"
}, r["default"].createElement("strong", {
className: "user-name"
}, e.get("username")), " ", (0,
l.translate)("notifications.events.follow"), r["default"].createElement("span", {
className: "time"
}, t)), r["default"].createElement(g["default"], {
ref: "follow",
analytics: {
type: "notification"
},
user: e,
className: "s-auto"
})) : null
}
});
t["default"] = v,
e.exports = t["default"]
},
608: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(629)
, d = o(c)
, p = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
return u["default"].createElement("div", {
dangerouslySetInnerHTML: {
__html: (0,
d["default"])(this.props.node)
}
})
}
}], [{
key: "propTypes",
value: {
node: u["default"].PropTypes.object.isRequired
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = p,
e.exports = t["default"]
},
609: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(26)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var u = n(2)
, c = l(u)
, d = n(15)
, p = l(d)
, f = n(8)
, h = n(3)
, m = n(225)
, g = l(m)
, v = n(20)
, y = l(v)
, _ = n(17)
, b = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments),
this.state = {
email: "",
hideError: !1
}
}
return s(t, e),
r(t, [{
key: "componentDidMount",
value: function() {
var e = "Explorer" === window.BrowserDetect.browser && window.BrowserDetect.version <= 11;
(0,
_.isMobile)() || e || p["default"].findDOMNode(this.refs.email).focus()
}
}, {
key: "componentWillReceiveProps",
value: function() {
this.setState({
hideError: !1
})
}
}, {
key: "_onSubmit",
value: function(e) {
e.preventDefault(),
this.props.onSignUp(this.state.email)
}
}, {
key: "_onChangeEmail",
value: function(e) {
var t = e.target.value.trim();
this.setState({
email: t,
hideError: !0
})
}
}, {
key: "_onClickError",
value: function(e) {
this.setState({
hideError: !0
}),
"A" === e.target.nodeName && (e.preventDefault(),
this.props.onToLogin && this.props.onToLogin(this.state.email))
}
}, {
key: "_onSuggestion",
value: function(e) {
this.setState({
email: e
})
}
}, {
key: "_renderError",
value: function() {
var e;
if (this.props.error && !this.state.hideError) {
var t = (e = {},
o(e, f.EMAIL_BLACKLISTED, (0,
h.translate)("app.signup.blacklisted_email_warning")),
o(e, f.USER_ID_TAKEN, (0,
h.translate)("deeplink.signup.email_exists")),
o(e, f.EMAIL_INVALID, (0,
h.translate)("error.invalid_email")),
o(e, f.EMAIL_CONTAINS_PLUS_SIGN, (0,
h.translate)("error.invalid_email")),
e)
, n = t[this.props.error] || this.props.error;
return c["default"].createElement("div", {
onClick: this._onClickError.bind(this),
className: "error-message visible",
dangerouslySetInnerHTML: {
__html: n
}
})
}
}
}, {
key: "render",
value: function() {
return c["default"].createElement("form", {
onSubmit: this._onSubmit.bind(this),
className: "frm frm-user-blendle s-active",
noValidate: !0,
name: "signup"
}, c["default"].createElement("div", {
className: "frm-field-wrapper"
}, c["default"].createElement("input", {
ref: "email",
value: this.state.email,
onChange: this._onChangeEmail.bind(this),
type: "email",
name: "email",
placeholder: (0,
h.translate)("deeplink.signup.email"),
autoComplete: "off",
className: "inp inp-text inp-email lowercase"
}), c["default"].createElement(g["default"], {
email: this.state.email,
onClick: this._onSuggestion.bind(this),
delay: 300
}), this._renderError()), c["default"].createElement("div", {
className: "frm-field-wrapper form-field-submit"
}, c["default"].createElement(y["default"], {
type: "submit",
className: "btn-submit btn-blendle btn-green",
loading: this.props.isLoading
}, this.props.buttonHTML || (0,
h.translate)("signup.buttons.create_account"))))
}
}], [{
key: "propTypes",
value: {
onToLogin: c["default"].PropTypes.func.isRequired,
onSignUp: c["default"].PropTypes.func.isRequired,
error: c["default"].PropTypes.string,
buttonHTML: c["default"].PropTypes.string,
isLoading: c["default"].PropTypes.bool
},
enumerable: !0
}]),
t
}(c["default"].Component);
t["default"] = b,
e.exports = t["default"]
},
610: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(3)
, d = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments),
this.state = {
isResend: !1
}
}
return s(t, e),
r(t, [{
key: "_onResend",
value: function(e) {
e.preventDefault(),
this.setState({
isResend: !0
}),
this.props.onResend()
}
}, {
key: "_renderResendMessage",
value: function() {
return this.state.isResend ? (0,
c.translateElement)("signup.verifyEmail.isResend", [this.props.email], !1) : (0,
c.translateElement)("signup.verifyEmail.resend", !1)
}
}, {
key: "render",
value: function() {
return u["default"].createElement("div", {
className: "v-verification"
}, u["default"].createElement("div", {
className: "deeplink-verification"
}, u["default"].createElement("img", {
src: "/img/signup/newemail.gif",
width: "210",
height: "150",
alt: ""
}), u["default"].createElement("h2", null , (0,
c.translate)("deeplink.verification.title")), u["default"].createElement("p", {
className: "thanks"
}, (0,
c.translate)("deeplink.verification.thanks")), u["default"].createElement("p", {
className: "resend",
onClick: this._onResend.bind(this)
}, this._renderResendMessage())))
}
}], [{
key: "propTypes",
value: {
email: u["default"].PropTypes.string.isRequired,
onResend: u["default"].PropTypes.func.isRequired
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = d,
e.exports = t["default"]
},
611: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(249)
, d = o(c)
, p = n(82)
, f = o(p)
, h = n(168)
, m = o(h)
, g = n(610)
, v = o(g)
, y = function(e) {
function t(e) {
var n = this;
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).call(this, e),
this.state = {
signUpStore: d["default"].getState(),
authStore: f["default"].getState()
},
d["default"].listen(function(e) {
return n.setState({
signUpStore: e
})
}),
f["default"].listen(function(e) {
return n.setState({
authStore: e
})
})
}
return s(t, e),
r(t, null , [{
key: "propTypes",
value: {
analyticsName: u["default"].PropTypes.string,
signUpContext: u["default"].PropTypes.object
},
enumerable: !0
}, {
key: "defaultProps",
value: {
analyticsName: "Signup Form",
signUpContext: {}
},
enumerable: !0
}]),
r(t, [{
key: "_onResendConfirmMail",
value: function() {
m["default"].resendEmailConfirm(this.state.authStore.user, this.props.signUpContext, this.props.analyticsName)
}
}, {
key: "render",
value: function() {
return u["default"].createElement(v["default"], {
email: this.state.authStore.user.get("email"),
resendStatus: this.state.signUpStore.resendStatus,
onResend: this._onResendConfirmMail.bind(this)
})
}
}]),
t
}(u["default"].Component);
t["default"] = y,
e.exports = t["default"]
},
612: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(20)
, o = i(a)
, l = n(56)
, u = i(l)
, c = n(223)
, d = i(c)
, p = n(28)
, f = i(p)
, h = n(3)
, m = r["default"].createClass({
displayName: "ConnectFacebook",
propTypes: {
connectTwitter: r["default"].PropTypes.func.isRequired,
twitterConnected: r["default"].PropTypes.bool.isRequired,
facebookFriends: r["default"].PropTypes.oneOfType([r["default"].PropTypes.object, r["default"].PropTypes.array]).isRequired,
onClose: r["default"].PropTypes.func.isRequired
},
_renderOthers: function(e) {
return e.length > 14 ? r["default"].createElement("p", {
className: "social-others"
}, (0,
h.translate)("social.others", [e.length - 14])) : void 0
},
_renderAvatars: function(e) {
return e.slice(0, 14).map(function(e) {
return r["default"].createElement(f["default"], {
className: "social-avatar-holder",
href: "/user/" + e.id
}, r["default"].createElement(d["default"], {
className: "social-avatar-tooltip-holder",
username: e.get("full_name")
}, r["default"].createElement(u["default"], {
className: "social-avatar",
src: e.getAvatarHref(),
height: "44",
width: "44"
})))
})
},
_renderHeader: function() {
return 0 === this.props.facebookFriends.length ? (0,
h.translate)("social.facebook.no_friends") : (0,
h.translate)("social.facebook.found_friends")
},
_renderBody: function() {
return this.props.twitterConnected ? r["default"].createElement("div", {
className: "social-body social-body-connect"
}, r["default"].createElement("p", {
className: "social-body-text"
}, (0,
h.translate)("social.facebook_twitter_connected")), r["default"].createElement(o["default"], {
className: "btn btn-fullwidth btn-dismiss",
onClick: this.props.onClose
}, (0,
h.translate)("continue_reading"))) : r["default"].createElement("div", {
className: "social-body social-body-connect"
}, r["default"].createElement("p", {
className: "social-body-text"
}, (0,
h.translate)("social.twitter.follow_suggestion")), r["default"].createElement(o["default"], {
className: "btn-twitter btn-fullwidth",
onClick: this.props.connectTwitter
}, (0,
h.translate)("social.twitter.button")))
},
render: function() {
return r["default"].createElement("div", null , r["default"].createElement("div", {
className: "social-header social-header-friends"
}, r["default"].createElement("h2", {
className: "social-header-title"
}, this._renderHeader()), this._renderAvatars(this.props.facebookFriends), this._renderOthers(this.props.facebookFriends)), this._renderBody())
}
});
t["default"] = m,
e.exports = t["default"]
},
613: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(20)
, o = i(a)
, l = n(11)
, u = i(l)
, c = n(3)
, d = n(8)
, p = r["default"].createClass({
displayName: "ConnectLanding",
propTypes: {
connectFacebook: r["default"].PropTypes.func.isRequired,
facebookConnected: r["default"].PropTypes.bool.isRequired,
facebookStatus: r["default"].PropTypes.number.isRequired,
twitterConnected: r["default"].PropTypes.bool.isRequired,
connectTwitter: r["default"].PropTypes.func.isRequired,
twitterStatus: r["default"].PropTypes.number.isRequired
},
_renderFacebook: function() {
if (this.props.facebookConnected)
return r["default"].createElement("div", {
className: "social-connected"
}, (0,
c.translate)("social.facebook.already_following_friends"));
var e = (0,
u["default"])("btn-facebook", "btn-fullwidth", {
"s-loading": this.props.facebookStatus === d.STATUS_PENDING
});
return r["default"].createElement(o["default"], {
className: e,
onClick: this.props.connectFacebook
}, (0,
c.translate)("social.facebook.button"))
},
_renderTwitter: function() {
if (this.props.twitterConnected)
return r["default"].createElement("div", {
className: "social-connected"
}, (0,
c.translate)("social.twitter.already_following_friends"));
var e = (0,
u["default"])("btn-twitter", "btn-fullwidth", {
"s-loading": this.props.twitterStatus === d.STATUS_PENDING
});
return r["default"].createElement(o["default"], {
className: e,
onClick: this.props.connectTwitter
}, (0,
c.translate)("social.twitter.button"))
},
render: function() {
return r["default"].createElement("div", null , r["default"].createElement("div", {
className: "social-header"
}, r["default"].createElement("h2", {
className: "social-header-title"
}, (0,
c.translate)("social.header")), r["default"].createElement("img", {
className: "social-heart",
src: "/img/illustrations/heart.svg",
alt: "",
height: "100"
})), r["default"].createElement("div", {
className: "social-body"
}, r["default"].createElement("p", {
className: "social-body-text",
dangerouslySetInnerHTML: {
__html: (0,
c.translate)("social.text")
}
}), this._renderFacebook(), this._renderTwitter()))
}
});
t["default"] = p,
e.exports = t["default"]
},
614: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(2)
, r = i(s)
, a = n(20)
, o = i(a)
, l = n(56)
, u = i(l)
, c = n(223)
, d = i(c)
, p = n(28)
, f = i(p)
, h = n(3)
, m = r["default"].createClass({
displayName: "ConnectTwitter",
propTypes: {
connectFacebook: r["default"].PropTypes.func.isRequired,
facebookConnected: r["default"].PropTypes.bool.isRequired,
twitterFriends: r["default"].PropTypes.oneOfType([r["default"].PropTypes.object, r["default"].PropTypes.array]).isRequired,
onClose: r["default"].PropTypes.func.isRequired
},
_renderOthers: function(e) {
return e.length > 14 ? r["default"].createElement("p", {
className: "social-others"
}, (0,
h.translate)("social.others", [e.length - 14])) : void 0
},
_renderAvatars: function(e) {
return e.slice(0, 14).map(function(e) {
return r["default"].createElement(f["default"], {
className: "social-avatar-holder",
href: "/user/" + e.id
}, r["default"].createElement(d["default"], {
className: "social-avatar-tooltip-holder",
username: e.get("full_name")
}, r["default"].createElement(u["default"], {
className: "social-avatar",
src: e.getAvatarHref(),
height: "44",
width: "44"
})))
})
},
_renderHeader: function() {
return 0 === this.props.twitterFriends.length ? (0,
h.translate)("social.twitter.no_friends") : (0,
h.translate)("social.twitter.found_friends")
},
_renderBody: function() {
return this.props.facebookConnected ? r["default"].createElement("div", {
className: "social-body social-body-connect"
}, r["default"].createElement("p", {
className: "social-body-text"
}, (0,
h.translate)("social.facebook_twitter_connected")), r["default"].createElement(o["default"], {
className: "btn btn-fullwidth btn-dismiss",
onClick: this.props.onClose
}, (0,
h.translate)("continue_reading"))) : r["default"].createElement("div", {
className: "social-body"
}, r["default"].createElement("p", {
className: "social-body-text"
}, (0,
h.translate)("social.facebook.follow_suggestion")), r["default"].createElement(o["default"], {
className: "btn-facebook btn-fullwidth",
onClick: this.props.connectFacebook
}, (0,
h.translate)("social.facebook.button")))
},
render: function() {
return r["default"].createElement("div", null , r["default"].createElement("div", {
className: "social-header social-header-friends"
}, r["default"].createElement("h2", {
className: "social-header-title"
}, this._renderHeader()), this._renderAvatars(this.props.twitterFriends), this._renderOthers(this.props.twitterFriends)), this._renderBody())
}
});
t["default"] = m,
e.exports = t["default"]
},
615: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(15)
, d = o(c)
, p = n(102)
, f = o(p)
, h = n(563)
, m = o(h)
, g = n(17)
, v = o(g)
, y = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments),
this.state = {
toastHeight: null
}
}
return s(t, e),
r(t, [{
key: "shouldComponentUpdate",
value: function(e, t) {
return t !== this.state ? !0 : !e.disabled && !this.props.disabled
}
}, {
key: "componentDidMount",
value: function() {
this._setToastHeight()
}
}, {
key: "_setToastHeight",
value: function() {
if (!v["default"].isMobile() && this.refs.toast) {
var e = d["default"].findDOMNode(this.refs.toast).offsetHeight;
this.setState({
toastHeight: e
})
}
}
}, {
key: "_renderToast",
value: function() {
var e = this.props.item
, t = e.get("b:relevant-posts");
return t ? u["default"].createElement("div", {
className: "post-container",
ref: "toast"
}, u["default"].createElement(m["default"], {
item: e.get("b:item"),
posts: t.models,
onActivePostChange: this._setToastHeight.bind(this),
activeChannel: this.props.activeChannel
})) : void 0
}
}, {
key: "render",
value: function() {
var e = this.props.item
, t = e.get("b:relevant-posts") ? this.state.toastHeight : 0;
return u["default"].createElement("div", {
className: "item-tile-container v-tile"
}, this._renderToast(), u["default"].createElement(f["default"], {
top: t,
item: e.get("b:item"),
analytics: this.props.analytics
}))
}
}], [{
key: "propTypes",
value: {
item: u["default"].PropTypes.object.isRequired,
analytics: u["default"].PropTypes.object.isRequired,
disabled: u["default"].PropTypes.bool,
activeChannel: u["default"].PropTypes.string
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = y,
e.exports = t["default"]
},
616: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(26)["default"]
, l = n(872)["default"]
, u = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var c = n(2)
, d = u(c)
, p = n(11)
, f = u(p)
, h = n(3)
, m = n(13)
, g = u(m)
, v = n(12)
, y = u(v)
, _ = n(56)
, b = u(_)
, w = n(565)
, S = u(w)
, k = n(172)
, E = u(k)
, C = n(17)
, T = u(C)
, P = n(8)
, N = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "_onClickFollowers",
value: function() {
g["default"].track("View Followers", this._getAnalytics())
}
}, {
key: "_onClickFollowing",
value: function() {
g["default"].track("View Following", this._getAnalytics())
}
}, {
key: "_onClickItems",
value: function() {
g["default"].track("View Bought", this._getAnalytics())
}
}, {
key: "_getAnalytics",
value: function() {
return {
type: "profile",
user_id: this.props.profile.id
}
}
}, {
key: "_renderManagers",
value: function() {
var e = this
, t = this.props.profile.getEmbedded("managers");
if (!t || !t.length)
return null ;
var n = t.filter(function(e) {
return !e.get("manager_hidden")
}).map(function(t, n, i) {
var s = ", ";
return n === i.length - 2 && 1 !== i.length ? s = " " + (0,
h.translate)("user.and") + " " : n === i.length - 1 && (s = "."),
d["default"].createElement("span", {
key: t.id
}, d["default"].createElement(S["default"], {
user: t,
analytics: e._getAnalytics()
}), s)
});
return d["default"].createElement("div", {
className: "curators"
}, (0,
h.translate)("user.curated_by"), " ", n)
}
}, {
key: "_renderChannels",
value: function() {
var e = this.props.profile.getEmbedded("shared_users");
if (!e || !e.length)
return null ;
var t = e.filter(function(e) {
return !e.get("shared_user_hidden")
}).map(function(e, t, n) {
var i = " ";
return T["default"].isMobile() && (t === n.length - 2 && 1 !== n.length ? i = " " + (0,
h.translate)("user.and") + " " : t < n.length - 2 && 1 !== n.length && (i = ", ")),
d["default"].createElement("span", {
key: e.id
}, d["default"].createElement("a", {
href: "/channel/" + e.id,
className: "channel channel-" + e.id
}, e.get("username")), i)
});
return d["default"].createElement("div", {
className: "curates-for"
}, (0,
h.translate)("user.curates_for"), " ", t)
}
}, {
key: "_renderSuperCircleAvatar",
value: function() {
var e = this.props.profile.getAvatarHref() || P.DEFAULT_AVATAR
, t = {
background: "url(" + e + ") 50% 50%",
backgroundSize: "cover"
};
return d["default"].createElement("div", {
className: "supercircle-user-avatar",
style: t
})
}
}, {
key: "_renderAvatar",
value: function() {
return this.props.profile.isChannel ? null : void 0 !== document.createElement("div").style.mask && "Firefox" !== window.BrowserDetect.browser ? this._renderSuperCircleAvatar() : d["default"].createElement("div", {
className: "user-avatar"
}, d["default"].createElement(b["default"], {
src: this.props.profile.getAvatarHref()
}))
}
}, {
key: "_renderFollowButtonOrReads",
value: function() {
var e = this.props.profile;
if ("blendle" !== e.id) {
if (y["default"].getId() !== e.id)
return d["default"].createElement("div", {
className: "lnk button-area"
}, d["default"].createElement("div", {
className: "button-holder"
}, d["default"].createElement(E["default"], {
user: e,
isProfile: !0,
analytics: this._getAnalytics()
})));
var t = "/" + (e.isChannel ? "channel" : "user") + "/" + e.id + "/items";
return d["default"].createElement("a", {
href: t,
title: (0,
h.translate)("user.labels.items") + (" (" + e.get("reads") + ")"),
onClick: this._onClickItems.bind(this),
className: "lnk lnk-items"
}, d["default"].createElement("span", {
className: "amount"
}, e.getFormattedReads()), d["default"].createElement("span", {
className: "caption"
}, (0,
h.translate)("user.captions.read")))
}
}
}, {
key: "_renderFollowers",
value: function() {
var e = this.props.profile;
if (!l(P.STAFFPICKS).includes(e.id)) {
var t = "/" + (e.isChannel ? "channel" : "user") + "/" + e.id + "/followers";
return d["default"].createElement("a", {
className: "lnk lnk-followers",
onClick: this._onClickFollowers.bind(this),
href: t,
title: (0,
h.translate)("user.captions.followers")
}, d["default"].createElement("span", {
className: "amount"
}, e.getFormattedFollowers()), d["default"].createElement("span", {
className: "caption"
}, (0,
h.translate)("user.captions.followers")))
}
}
}, {
key: "_renderFollowingButton",
value: function() {
var e = this.props.profile;
if (!e.isChannel) {
var t = "/" + (e.isChannel ? "channel" : "user") + "/" + e.id + "/following";
return d["default"].createElement("a", {
href: t,
title: (0,
h.translate)("user.labels.following"),
className: "lnk lnk-following",
onClick: this._onClickFollowing.bind(this)
}, d["default"].createElement("span", {
className: "amount"
}, e.getFormattedFollowing()), d["default"].createElement("span", {
className: "caption"
}, (0,
h.translate)("user.captions.following")))
}
}
}, {
key: "_renderBio",
value: function() {
return this.props.profile.get("text") ? d["default"].createElement("p", {
className: "user-description",
dangerouslySetInnerHTML: {
__html: this.props.profile.getBioHTML()
}
}) : void 0
}
}, {
key: "render",
value: function() {
var e = this.props.profile
, t = (0,
f["default"])(o({
"v-tile": !0,
"v-profile-tile": !0,
"tile-profile": !0,
"s-success": !0,
"channel-profile": e.isChannel
}, "user-id-" + e.id, !0))
, n = (0,
f["default"])(o({
"user-name": !0,
"v-channel-name": e.isChannel,
channel: e.isChannel
}, "channel-" + e.id, e.isChannel));
return d["default"].createElement("div", {
className: t
}, d["default"].createElement("div", {
className: "tile-container"
}, this._renderAvatar(), d["default"].createElement("h2", {
className: n
}, e.get("full_name")), this._renderBio(), this._renderManagers(), this._renderChannels(), d["default"].createElement("div", {
className: "properties"
}, this._renderFollowButtonOrReads(), this._renderFollowers(), this._renderFollowingButton())))
}
}], [{
key: "propTypes",
value: {
profile: d["default"].PropTypes.object.isRequired
},
enumerable: !0
}]),
t
}(d["default"].Component);
t["default"] = N,
e.exports = t["default"]
},
617: function(e, t) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t["default"] = {
couponCampaigns: [{
id: "paypal",
name: "PayPal",
code: "PAYPAL2015"
}, {
id: "tmobile",
name: "T-Mobile",
code: "TMOBILE2015"
}, {
id: "deichmann",
name: "Deichmann",
code: "DMNN2015"
}, {
id: "voetbalshop",
name: "Voetbalshop.nl",
code: "DB5086F730"
}, {
id: "kicker",
name: "Kicker",
code: "KICKER2016"
}, {
id: "efellows",
name: "e-fellows.net",
code: ""
}, {
id: "stgallen",
name: "HSG Alumni",
code: "BLENDLESTGALLEN"
}, {
id: "vrr",
name: "VRR",
code: "VRR2016"
}, {
id: "greetz",
name: "Greetz",
code: "A594B431EF"
}, {
id: "greetz_logged_in",
name: "Greetz",
code: "25168EC57E"
}, {
id: "vnc",
name: "VNC",
code: "J1K9IE2LD87"
}, {
id: "vnc_logged_in",
name: "VNC",
code: "L2P0PE1LD67"
}, {
id: "reportagenfm",
name: "Reportagen.fm",
code: "REPORTAGENLIEBE"
}, {
id: "reportagennewsletter",
name: "Reportagen.fm",
code: "RLIEBTB"
}, {
id: "htm",
name: "HTM",
code: "LQ5066F730"
}, {
id: "htm_logged_in",
name: "HTM",
code: "98F7SNFKE3"
}, {
id: "cjp",
name: "CJP",
code: ""
}, {
id: "theinnercirclev",
name: "The Inner Circle",
code: "AFEDJKL2342JKLDF"
}, {
id: "theinnercirclem",
name: "The Inner Circle",
code: "AFSDJKLSF18JKJ85"
}, {
id: "wired",
name: "WIRED",
code: "WIREDAUFBLENDLE"
}, {
id: "gq",
name: "GQ",
code: "GQAUFBLENDLE"
}]
},
e.exports = t["default"]
},
622: function(e, t, n) {
"use strict";
function i() {
return "https://login.wsj.com/auth/oauth2/authorize?response_type=code&redirect_uri=https%3A%2F%2Fblendle.com%2Fsettings%2Fsubscriptions%2Fcallback%2Fwsj&scope=email%2Cfirst_name%2Clast_name%2Croles%2Ctrackid%2Crefresh_token&client_id=a40688b344384e0db700bed49cb47be7"
}
function s() {
return "https://triplea.telegraaf.nl/api/o/authorize/?response_type=code&client_id=kCHMTmUlrqp1tVSkJMjrj8yWgS3MhpV52H5UBp3o&scope=subscription_read&redirect_uri=https%3A%2F%2Fblendle.com%2Fsettings%2Fsubscriptions%2Fcallback%2Ftelegraaf"
}
function r(e) {
return "https://webservice.genj.nl/" + e + "/user/register/blendle?continueUrl=https%3A%2F%2Fblendle.com%2Fsettings%2Fsubscriptions%2Fcallback%2F" + e
}
function a(e) {
return "https://id.sueddeutsche.de/service/ticket?redirect_uri=https://blendle.com/settings/subscriptions/callback/sueddeutschezeitung&service_id=blendle"
}
Object.defineProperty(t, "__esModule", {
value: !0
});
var o = [{
id: "par",
url: "https://caps.parool.nl/service/ssologin/index.html?client_id=caps-par-1461&service=https://blendle.com/settings/subscriptions/callback/par",
redirect: !0
}, {
id: "vkn",
url: "https://caps.volkskrant.nl/service/ssologin/index.html?client_id=caps-vk-1503&service=https://blendle.com/settings/subscriptions/callback/vkn"
}, {
id: "adn",
url: "https://caps.ad.nl/service/ssologin/index.html?client_id=caps-ad-1501&service=https://blendle.com/settings/subscriptions/callback/adn"
}, {
id: "trn",
url: "https://caps.trouw.nl/service/ssologin/index.html?client_id=caps-tr-1502&service=https://blendle.com/settings/subscriptions/callback/trn"
}, {
id: "lc",
url: "https://ndc.evolok.net/evolok-ui-web/login.htm?serviceName=lc&viewType=paywall&redirectTo=https%3A%2F%2Fws.blendle.nl%2Fuser%2F{user_id}%2Fprovider_account%2Flc%2Fredirect%3Fsession_id%3D__sessionId",
redirect: !0
}, {
id: "dvhn",
url: "https://ndc.evolok.net/evolok-ui-web/login.htm?serviceName=dvhn&viewType=paywall&redirectTo=https%3A%2F%2Fws.blendle.nl%2Fuser%2F{user_id}%2Fprovider_account%2Fdvhn%2Fredirect%3Fsession_id%3D__sessionId",
redirect: !0
}, {
id: "sueddeutschezeitung",
url: a()
}, {
id: "vn",
secondField: {
secret: !0
}
}, {
id: "elsevier",
authUri: "auth://%s:%s@reedbusiness/elsevier",
intro: "Voer je abonneenummer en postcode in van je account bij <strong>Elsevier</strong> om je abonnement te koppelen.",
firstField: {
label: "Abonneenummer"
},
secondField: {
label: "Postcode",
filter: function(e) {
return e.replace(" ", "")
}
}
}, {
id: "opzij",
secondField: {
secret: !0
}
}, {
id: "newscientist",
secondField: {
secret: !0
}
}, {
id: "tpomagazine",
secondField: {
secret: !0
}
}, {
id: "brightideas",
secondField: {
secret: !0
}
}, {
id: "runners",
secondField: {
secret: !0
}
}, {
id: "psychologie",
secondField: {
secret: !0
}
}, {
id: "filosofiemagazine",
secondField: {
secret: !0
}
}, {
id: "nedag",
secondField: {
secret: !0
}
}, {
id: "derspiegel",
name: "Der digitale Spiegel",
secondField: {
secret: !0
}
}, {
id: "varagids",
intro: "Voer het relatienummer en huisnummer in van je <strong>Varagids</strong> account om je abonnement te koppelen.",
firstField: {
label: "Relatienummer"
},
secondField: {
label: "Huisnummer"
}
}, {
id: "wallstreetjournal",
url: "https://login.wsj.com/auth/oauth2/authorize?response_type=code&redirect_uri=https%3A%2F%2Fblendle.com%2Fsettings%2Fsubscriptions%2Fcallback%2Fwallstreetjournal&scope=email%2Cfirst_name%2Clast_name%2Croles%2Ctrackid%2Crefresh_token&client_id=a40688b344384e0db700bed49cb47be7",
redirect: !0
}, {
id: "wsj",
url: i(),
redirect: !0
}, {
id: "quest",
url: r("quest"),
redirect: !0
}, {
id: "questhistorie",
url: r("questhistorie"),
redirect: !0
}, {
id: "questpsychologie",
url: r("questpsychologie"),
redirect: !0
}, {
id: "nationalgeographic",
url: r("nationalgeographic"),
redirect: !0
}, {
id: "jan",
url: r("jan"),
redirect: !0
}, {
id: "glamour",
url: r("glamour"),
redirect: !0
}, {
id: "vogue",
url: r("vogue"),
redirect: !0
}, {
id: "telegraaf",
url: s(),
redirect: !0
}, {
id: "zeit",
secondField: {
secret: !0
}
}];
t["default"] = o,
e.exports = t["default"]
},
625: function(e, t, n) {
"use strict";
function i(e) {
return "all" === e ? s.providerLocales : s.providerLocales.filter(function(t) {
return t.split("_")[1] === e.toUpperCase()
})
}
Object.defineProperty(t, "__esModule", {
value: !0
}),
t["default"] = i;
var s = n(89);
e.exports = t["default"]
},
626: function(e, t) {
"use strict";
e.exports = function(e) {
var t = arguments.length <= 1 || void 0 === arguments[1] ? {} : arguments[1]
, n = document.createElement(e);
if (t.appendTo && (t.appendTo.appendChild(n),
delete t.appendTo),
t.children) {
for (var i = 0; i < t.children.length; i++)
n.appendChild(t.children[i]);
delete t.children
}
for (var s in t)
n[s] = t[s];
return n
}
},
627: function(e, t, n) {
var i;
i = function(e) {
"use strict";
function t(e, n) {
for (var s in n)
i.isObject(n[s]) ? (e[s] || (e[s] = {}),
t(e[s], n[s])) : e[s] = n[s];
return e
}
var i = n(5);
return t
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
629: function(e, t) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t["default"] = function(e) {
var t = document.createElement("div");
return t.appendChild(e),
t.innerHTML
}
,
e.exports = t["default"]
},
630: function(e, t) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
t["default"] = {
getClassNames: function(e, t) {
void 0 === e && (e = document.body);
var n = arguments.length <= 2 || void 0 === arguments[2] ? {} : arguments[2]
, i = this._getBoundingBoxesDiff(e, t, n);
return {
vertical: i.bottom < 0 ? "l-top" : "l-bottom",
horizontal: i.right < 0 ? "l-left" : "l-right"
}
},
_getBoundingBoxesDiff: function(e, t, n) {
var i = e.getBoundingClientRect()
, s = t.getBoundingClientRect()
, r = {};
for (var a in s) {
r[a] = i[a] - s[a];
var o = n[a];
o && (r[a] -= o)
}
return r
}
},
e.exports = t["default"]
},
632: function(e, t, n) {
"use strict";
function i(e) {
var t = new a["default"](e).domain()
, n = o.find(function(e) {
return e.domain === t
});
return n ? n.label : null
}
var s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
}),
t["default"] = i;
var r = n(43)
, a = s(r)
, o = [{
domain: "facebook.com",
label: "Facebook"
}, {
domain: "t.co",
label: "Twitter"
}, {
domain: "twitter.com",
label: "Twitter"
}, {
domain: "linkedin.com",
label: "LinkedIn"
}, {
domain: "xing.com",
label: "XING"
}, {
domain: "xing-news.com",
label: "XING"
}];
e.exports = t["default"]
},
633: function(e, t, n) {
"use strict";
function i(e, t) {
var n = e[0];
if (o["default"].get(n, ["gifts", "blendle_first_deposit_gift", "eligible"])) {
var i = n.gifts.blendle_first_deposit_gift;
return t >= parseFloat(i.minimum_deposit_amount)
}
return !1
}
function s(e, t, n) {
var i = e.filter(function(e) {
return "paypal" === e.code
})[0];
if (o["default"].get(i, ["gifts", "paypal_gift", "eligible"])) {
var s = !1;
return t >= parseFloat(o["default"].get(i, ["gifts", "paypal_gift", "minimum_deposit_amount"])) && "paypal" === n && (s = !0),
o["default"].extend(i.gifts.paypal_gift, {
unlocked: s
})
}
return null
}
var r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.eligibleFirstDepositGift = i,
t.eligiblePayPalDepositGift = s;
var a = n(5)
, o = r(a)
},
635: function(e, t, n) {
"use strict";
function i(e, t, n) {
return o["default"].expand((0,
r.get)(e, ["_links", t, "href"]), n).toString()
}
var s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.getLink = i;
var r = n(5)
, a = n(43)
, o = s(a)
},
638: function(e, t, n) {
"use strict";
function i(e) {
return e.replace(/[ ]{2,}/g, " ")
}
function s(e) {
return e.replace(/@/g, " at ")
}
var r = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var a = n(5)
, o = r(a)
, l = o["default"].flowRight(o["default"].kebabCase, i, o["default"].deburr, o["default"].trim, s);
t["default"] = {
createItemUri: function(e) {
var t = e.getEmbedded("manifest");
return ["i", l(t.getProvider().get("name")), l(t.getTitleAsText()), e.id].join("/")
}
},
e.exports = t["default"]
},
639: function(e, t, n) {
"use strict";
function i(e) {
for (var t = arguments.length, n = Array(t > 1 ? t - 1 : 0), i = 1; t > i; i++)
n[i - 1] = arguments[i];
l.push({
fn: e,
args: n
})
}
function s() {
l.forEach(function(e) {
return e.fn.apply(e, o(e.args))
}),
l = []
}
function r(e) {
return function() {
for (var t = arguments.length, n = Array(t), r = 0; t > r; r++)
n[r] = arguments[r];
a() ? (s(),
e.apply(void 0, n)) : i.apply(void 0, [e].concat(n))
}
}
function a() {
return window._support && window.Reamaze && "reload" in window.Reamaze
}
var o = n(187)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = []
, u = r(function(e) {
"DE" === e ? window._support.account = "blendlede" : "NL" === e ? window._support.account = "blendle" : window._support.account = "blendleintl",
window.Reamaze.reload()
});
t.updateCountry = u;
var c = r(function(e) {
e.fetchRelation("private").then(function(t) {
window._support.user = {
id: e.get("id"),
email: e.get("email"),
name: e.get("full_name"),
authkey: t.get("reamaze_auth_key"),
avatar: e.get("avatar_url"),
data: {
country: e.get("country"),
userAgent: window.navigator.userAgent,
uri: window.location.href
}
},
window.Reamaze.reload()
})
});
t.updateUser = c;
var d = r(function(e) {
window._support.user && window._support.user.data && (window._support.user.data.uri = e)
});
t.updateURI = d
},
640: function(e, t) {
"use strict";
function n(e, t) {
if (e === t)
return !0;
if (!e || !t)
return !1;
if ("object" != typeof e || "object" != typeof t)
return !1;
var n;
for (n in e)
if (e.hasOwnProperty(n) && (!t.hasOwnProperty(n) || e[n] !== t[n]))
return !1;
for (n in t)
if (t.hasOwnProperty(n) && !e.hasOwnProperty(n))
return !1;
return !0
}
e.exports = n
},
641: function(e, t, n) {
var i;
i = function() {
"use strict";
var e = function(e, t) {
var n = document.createEvent("HTMLEvents");
n.initEvent(t, !0, !0),
e.dispatchEvent(n)
}
;
return e
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
642: function(e, t, n) {
"use strict";
function i() {
return l.v4()
}
function s() {
return u.get("uuid")
}
function r() {
return c ? window.localStorage.getItem("uuid") : null
}
function a(e) {
return c && window.localStorage.setItem("uuid", e),
u.set("uuid", e, {
domain: ".blendle.com"
}),
e
}
function o() {
var e = r()
, t = s();
return a(e && t ? e : e || t ? e || t : i())
}
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(450)
, u = n(52)
, c = window.BrowserDetect.localStorageEnabled();
t["default"] = o,
e.exports = t["default"]
},
645: function(e, t, n) {
"use strict";
var i = n(93)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(348)
, a = s(r)
, o = n(358)
, l = s(o)
, u = n(497)
, c = new a["default"]("//platform.twitter.com/widgets.js",{
libVar: "twttr"
});
i(c, {
shareUrl: "https://twitter.com/intent/tweet?url=%s&text=%s",
openTweet: function(e, t) {
var n = (0,
u.sprintf)(this.shareUrl, encodeURIComponent(e), encodeURIComponent(t));
(0,
l["default"])({
src: n,
name: "intent",
width: 550,
height: 420
})
}
}),
t["default"] = c,
e.exports = t["default"]
},
657: function(e, t, n) {
"use strict";
n(874),
n(659),
n(658)
},
658: function(e, t) {
"use strict";
var n = document.createElement("_");
if (n.classList.add("c1", "c2"),
!n.classList.contains("c2")) {
var i = function(e) {
var t = DOMTokenList.prototype[e];
DOMTokenList.prototype[e] = function(e) {
for (var n = 0; n < arguments.length; n++)
e = arguments[n],
t.call(this, e)
}
}
;
i("add"),
i("remove")
}
n.classList.toggle("c3", !1),
n.classList.contains("c3") && !function() {
var e = DOMTokenList.prototype.toggle;
DOMTokenList.prototype.toggle = function(t, n) {
return 1 in arguments && !this.contains(t) == !n ? n : e.call(this, t)
}
}(),
n = null
},
659: function(e, t) {
"use strict";
!function(e) {
if (!e.requestAnimationFrame) {
if (e.webkitRequestAnimationFrame)
return e.requestAnimationFrame = e.webkitRequestAnimationFrame,
void (e.cancelAnimationFrame = e.webkitCancelAnimationFrame || e.webkitCancelRequestAnimationFrame);
var t = 0;
e.requestAnimationFrame = function(n) {
var i = (new Date).getTime()
, s = Math.max(0, 16 - (i - t))
, r = e.setTimeout(function() {
n(i + s)
}, s);
return t = i + s,
r
}
,
e.cancelAnimationFrame = function(e) {
clearTimeout(e)
}
}
}(window)
},
660: function(e, t, n) {
"use strict";
var i = n(5)
, s = n(4)
, r = n(25)
, a = n(16)
, o = n(221)
, l = n(30)
, u = {
_issues: new o(null ,{
track: !0
}),
getRecommended: function(e) {
return new o(null ,{
url: a.getLink("recommended_issues", {
user_id: e.id
})
})
},
fetchIssues: function(e) {
var t = u._issues;
return t.reset(),
s.ajax({
url: a.get("publications").get("links").popular.href
}).then(function(n) {
return t.add(n.data, {
parse: !0
}),
i.isArray(e) ? r.resolve(i.reduce(e, function(e, n) {
return e[n] = u._parseTag(t, n),
e
}, {})) : r.resolve(u._parseTag(t, e))
})
},
getIssues: function(e) {
var t = u._issues;
return t.length ? r.resolve(u._parseTag(t, e)) : u.fetchIssues(e)
},
getIssuesByLatLng: function(e, t, n) {
var i = {
amount: n,
latitude: e,
longitude: t
};
return s.ajax({
url: a.getLink("nearby_issues", i, ["issue-manifest"]),
accept: "application/hal+json"
}).then(function(e) {
var t = new o(e.data._embedded["b:issues"]);
return r.resolve(t)
})
},
_parseTag: function(e, t) {
return t ? u._filterTag(e, t) : e
},
_filterTag: function(e, t) {
return e.filter(function(e) {
return i.find(l.models, function(n) {
return e.get("provider").id === n.id && n.get("tags") && i.findWhere(n.get("tags"), {
name: t
})
})
})
}
};
e.exports = u
},
661: function(e, t, n) {
"use strict";
var i = n(21)["default"]
, s = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var r = n(4)
, a = s(r)
, o = n(5929)
, l = s(o);
t["default"] = {
getSupported: function() {
return a["default"].ajax({
url: l["default"].i18n + "?" + Date.now()
}).then(function(e) {
return i({
countryHeader: e.headers["x-country"]
}, e.data)
})
}
},
e.exports = t["default"]
},
662: function(e, t, n) {
"use strict";
var i = n(4)
, s = (n(5),
n(25))
, r = n(16)
, a = {
getCurrentLocation: function() {
return i.ajax({
url: r.getLink("current_location"),
accept: "*/*",
beforeSend: function(e, t) {
t.headers = {}
}
}).then(function(e) {
return s.resolve(e.data)
})
},
suggestLocations: function(e) {
return i.ajax({
url: r.getLink("search_locations", {
name: e
}),
accept: "application/hal+json"
}).then(function(e) {
return s.resolve(e.data._embedded["b:locations"])
})
}
};
e.exports = a
},
664: function(e, t, n) {
"use strict";
function i(e) {
var t = c["default"].getLink("latest_issue", {
provider_id: e.id
})
, n = new g["default"];
return n.fetch({
url: t
}).then(function() {
return n
})
}
function s(e, t) {
var n = (0,
b["default"])(t);
return h["default"].getAll().filter(function(t) {
if ("tst" === t.id || t.getCapability("disableIssue", !1))
return !1;
var i = t.get("name").toLowerCase().includes(e.toLowerCase())
, s = n.includes(t.get("language"));
return i && s
})
}
function r(e, t, n) {
var r = s(e, t).splice(0, n);
return o.all(r.map(i))
}
function a(e, t, n) {
var i = c["default"].getLink("search", {
query: e
}, ["b:tiles", "b:item", "b:pin", "b:acquisition", "b:issue-acquisition", "manifest", "b:search-context"])
, s = (0,
b["default"])(t)
, r = new p["default"](i);
if (s.forEach(function(e) {
r.addSearch({
"locales[]": e
})
}),
n) {
var a = (0,
S["default"])().startOf("day").unix();
r.addSearch({
min_age: a - (0,
S["default"])(n.from).subtract(1, "days").unix(),
max_age: a - n.to.unix()
})
}
var o = new y["default"];
return o.fetch({
url: r.toString(),
accept: "application/hal+json"
}).then(function() {
return o
})
}
var o = n(24)["default"]
, l = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
}),
t.fetchProvidersIssue = r,
t.fetchItems = a;
var u = n(16)
, c = l(u)
, d = n(43)
, p = l(d)
, f = n(30)
, h = l(f)
, m = n(90)
, g = l(m)
, v = n(170)
, y = l(v)
, _ = n(625)
, b = l(_)
, w = n(18)
, S = l(w)
},
665: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(4)
, r = i(s)
, a = n(30)
, o = i(a)
, l = r["default"].Model.extend({
name: "pay_item",
mappings: {
"b:metadata": {
resource: r["default"].Model
}
},
getParts: function() {
var e = this.get("uid").split("-");
return {
supplierUID: e[0],
providerUID: e[1],
datetime: e[2],
custom: e[3]
}
},
getUrl: function() {
var e = this.get("b:metadata");
return this.get("url") || (e ? e.get("url") : null )
},
getProvider: function() {
return o["default"].getProvider(this.getParts().providerUID)
}
});
t["default"] = l,
e.exports = t["default"]
},
666: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(16)
, s = n(380)
, r = n(12)
, a = t.Model.extend({
name: "acquisition",
autoRefundTimeout: 10,
mappings: {
"b:issue-acquisition": {
resource: s
}
},
getSecondsSincePurchaseDate: function() {
var e = this.get("purchaseDate");
return e ? ((new Date).getTime() - e.getTime()) / 1e3 : void 0
},
isEligibleForRefund: function() {
var e = this.getSecondsSincePurchaseDate();
return this.get("refundable") && this.get("acquired") && e && e < this.autoRefundTimeout && !this.get("subscription") && !this.getEmbedded("b:issue-acquisition").get("acquired")
},
parse: function(e) {
return e._links || (e._links = {}),
e._links["b:issue-acquisition"] || (e._links["b:issue-acquisition"] = {
href: i.getLink("issue_acquisition", {
issue_id: e._embedded.manifest.issue.id,
user_context: r.getId()
})
}),
this.parseHal(e)
}
});
return a
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
667: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(4)
, r = i(s)
, a = n(38)
, o = i(a)
, l = n(16)
, u = i(l)
, c = n(5)
, d = i(c)
, p = r["default"].Model.extend({
defaults: {
code: null ,
used: !0
},
required: {
code: !0
},
idAttribute: "code",
initialize: function() {
this.urlTemplate = u["default"].get("links").signup_code.href
},
sync: function(e, t) {
return t.url = this.urlTemplate.replace("{code}", t.id),
r["default"].Model.prototype.sync.apply(this, arguments)
},
exportForSignUp: function(e) {
return d["default"].merge(e.toJSON(), {
signup_code: this.id,
country: o["default"].getCountryCode()
})
}
});
t["default"] = p,
e.exports = t["default"]
},
668: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(4)
, r = n(12)
, a = i(r)
, o = n(16)
, l = i(o)
, u = s.Model.extend({
defaults: {
body: null
},
required: {
body: !0
},
expressions: {
body: /..*/
},
initialize: function() {
this.url = l["default"].get("links").feedback.href
},
toJSON: function() {
return {
type: "contact-form",
body: this.get("body"),
user_agent: navigator.userAgent,
email: a["default"].getUser() ? a["default"].getUser().get("email") : !1
}
}
});
t["default"] = u,
e.exports = t["default"]
},
669: function(e, t, n) {
var i, s = n(21)["default"];
i = function(e) {
"use strict";
var t = n(4)
, i = n(5)
, r = n(347)
, a = n(44)
, o = n(229)
, l = t.Model.extend({
name: "subitem"
})
, u = t.Model.extend({
name: "content",
mappings: {
items: {
resource: function(e, t) {
return e && a.subItems ? e.map(function(e) {
return new l(e,t)
}) : []
}
}
},
get: function(e) {
if ("images" === e) {
var n = this.get("provider");
if (n && n.id) {
var i = o(n);
if (i.disableImages)
return []
}
}
return t.Model.prototype.get.apply(this, arguments)
},
parse: function(e) {
if (e._embedded && e._embedded.content) {
var t = e._embedded.content;
e = s({}, t)
}
return r.allowImages(e.date, e.id, e.provider.id) || (e.images && (e.images = []),
i.has(e, "_embedded.content.images") && (e._embedded.content.images = []),
i.has(e, "_links.content_images") && (e._links.content_images = [])),
"telegraaf" === e.provider.id && (e.body = i.map(e.body, function(e) {
return "hl1" === e.type ? {
type: e.type,
content: "<b>" + e.content + "</b>"
} : e
})),
this.parseHal(e)
}
});
return u
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
670: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(67)
, s = n(121)
, r = n(377)
, a = n(144)
, o = n(91)
, l = t.Model.extend({
name: "notification",
mappings: {
user: {
resource: i
},
item: {
resource: o
},
manifest: {
resource: a
},
post: {
resource: s
},
alert: {
resource: r
}
}
});
return l
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
671: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(376)
, s = t.Model.extend({
mappings: {
"item-tracker": {
resource: i,
track: !0
}
},
constructor: function(e, n) {
return n.track = !1,
t.Model.call(this, e, n)
},
parse: function(e) {
return e._embedded || (e._embedded = {}),
e._embedded["item-tracker"] = {
id: e.id
},
this.parseHal(e)
}
})
, r = t.Collection.extend({
model: s,
parse: function(e) {
return e
}
})
, a = t.Model.extend({
name: "page",
defaults: {
date: new Date,
text: "",
active: !1
},
mappings: {
items: {
resource: r,
track: !1
}
},
parse: function(e) {
return e._embedded || (e._embedded = {}),
e._embedded.items = e.items,
delete e.items,
this.parseHal(e)
},
getPageWidth: function() {
return this.getLinkAttribute("preview", "width")
},
getPageHeight: function() {
return this.getLinkAttribute("preview", "height")
}
});
return a
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
673: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = t.Model.extend({
defaults: {
reason: "",
message: ""
},
required: {
reason: !0,
message: !1
},
reasons: ["printed", "copied", "accident", "price_high", "accident", "price_high", "article_short", "article_long", "article_quality", "article_legability", "other"],
expressions: {
message: /^.{1,255}$/m
},
createExpression: function() {
var e = "^";
for (var t in this.reasons)
e += this.reasons[t],
t < this.reasons.length - 1 && (e += "|");
e += "$",
this.expressions.reason = new RegExp(e)
},
initialize: function() {
this.createExpression()
}
});
return i
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
674: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = t.Model.extend({});
return i
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
675: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = t.Model.extend({
required: {
provider: !0,
username: !0,
password: !0
},
expressions: {
provider: /^.+$/,
password: /^.+$/,
username: /^.+$/
},
toJSON: function() {
var e = {
provider: this.get("provider"),
username: this.get("username"),
password: this.get("password")
};
return e
},
parse: function(e) {
var t = e._embedded.provider;
return t.valid = e.valid,
t
}
});
return i
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
676: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(121)
, s = n(91)
, r = n(538)
, a = n(317)
, i = n(121)
, o = t.Model.extend({
name: "tile",
mappings: {
"b:item": {
resource: s,
track: !0
},
"b:posts": {
resource: r
},
"b:relevant-posts": {
resource: a
},
"b:requested-user-post": {
resource: i
},
"b:popular-post": {
resource: i
},
"b:recent-post": {
resource: i
}
}
});
return o
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
677: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(91)
, s = n(90)
, r = n(144)
, a = n(665)
, o = t.Model.extend({
name: "transaction",
mappings: {
item: {
resource: i
},
issue: {
resource: s
},
manifest: {
resource: r
},
pay_item: {
resource: a
}
},
parse: function(e) {
return e._embedded && (e._embedded.refunded_transaction && e._embedded.refunded_transaction._embedded.item && (e._embedded.manifest = e._embedded.refunded_transaction._embedded.item._embedded.manifest),
e._embedded.refunded_transaction && e._embedded.refunded_transaction._embedded.pay_item && (e._embedded.pay_item = e._embedded.refunded_transaction._embedded.pay_item),
e._embedded.item && e._embedded.item._embedded.manifest && (e._embedded.manifest = e._embedded.item._embedded.manifest),
e._embedded.issue && (e._embedded.issue = e._embedded.issue._embedded.issue)),
this.parseHal(e)
}
});
return o
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
678: function(e, t, n) {
"use strict";
var i = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var s = n(4)
, r = i(s)
, a = n(682)
, o = i(a)
, l = n(683)
, u = i(l)
, c = n(382)
, d = i(c)
, p = n(381)
, f = i(p)
, h = n(13)
, m = i(h)
, g = n(2)
, v = i(g)
, y = n(681)
, _ = i(y)
, b = r["default"].ModuleController.extend({
initialize: function(e) {
this.setRootView(new o["default"]({
main: e.area
})),
this.addView(new u["default"], "sidebar")
},
openAbout: function() {
return this.addView(new r["default"].ReactView({
renderComponent: function() {
return v["default"].createElement(_["default"], null )
}
}), "pane"),
this.getView("sidebar").setCurrent("blendle"),
m["default"].track("View About/Contact"),
this.getRootView().renderAndDisplay()
},
openTermsAndConditions: function() {
return this.addView(new d["default"], "pane"),
this.getView("sidebar").setCurrent("termsandconditions"),
m["default"].track("View About/Terms and Conditions"),
this.getRootView().renderAndDisplay()
},
openPrivacyStatement: function() {
return this.addView(new f["default"], "pane"),
this.getView("sidebar").setCurrent("privacy"),
m["default"].track("View About/Privacy Statement"),
this.getRootView().renderAndDisplay()
}
});
t["default"] = b,
e.exports = t["default"]
},
679: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(678)
, s = n(680)
, r = t.Module.extend({
name: "about",
prefix: "",
type: "dialogue",
initialize: function() {
this.setRouter(new s({
module: this
}))
},
openAbout: function() {
this.setController(new i({
module: this,
area: this.getArea()
})),
this.getController().openAbout(),
this.load()
},
openTermsAndConditions: function() {
this.setController(new i({
module: this,
area: this.getArea()
})),
this.getController().openTermsAndConditions(),
this.load()
},
openPrivacyStatement: function() {
this.setController(new i({
module: this,
area: this.getArea()
})),
this.getController().openPrivacyStatement(),
this.load()
}
});
return new r
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
680: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = t.ModuleRouter.extend({
initialize: function() {
this.route("about", this.routeRoot),
this.route("about/blendle", this.routeRoot),
this.route("about/termsandconditions", this.routeTermsAndConditions),
this.route("about/privacy", this.routePrivacyStatement),
this.route("contact", this.routeRoot)
},
routeRoot: function() {
this._module.openAbout()
},
routeTermsAndConditions: function() {
this._module.openTermsAndConditions()
},
routePrivacyStatement: function() {
this._module.openPrivacyStatement()
}
});
return i
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
681: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(3)
, d = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
return u["default"].createElement("div", {
className: "pane contact l-text"
}, u["default"].createElement("h1", {
className: "title"
}, (0,
c.translate)("about.about.navigation")), u["default"].createElement("p", null , (0,
c.translate)("app.text.about_blendle"), " ", u["default"].createElement("br", null ), u["default"].createElement("br", null ), (0,
c.translateElement)("about.impressum", !1), u["default"].createElement("br", null ), (0,
c.translate)("about.managing_directors")))
}
}]),
t
}(u["default"].Component);
t["default"] = d,
e.exports = t["default"]
},
682: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(185)
, i = t.extend({
className: "white-close v-about"
});
return i
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
683: function(e, t, n) {
var i;
i = function(e) {
"use strict";
var t = n(4)
, i = n(3).locale
, s = n(1061)
, r = t.View.extend({
className: "sidebar left",
setCurrent: function(e) {
this.current = e;
var t = this.el.querySelector(".current");
t && t.classList.remove("current");
var n = this.el.querySelector("." + e);
n && n.classList.add("current")
},
render: function() {
return this.el.innerHTML = s({
prefix: this.getModule().getRouter().getPrefix(),
user: this.options.model,
current: this.current,
i18n: i
}),
this.display(),
this
}
});
return r
}
.call(t, n, t, e),
!(void 0 !== i && (e.exports = i))
},
684: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(15)
, d = o(c)
, p = n(46)
, f = (o(p),
n(228))
, h = o(f)
, m = n(111)
, g = o(m)
, v = n(3)
, y = n(667)
, _ = o(y)
, b = n(20)
, w = o(b)
, S = n(4)
, k = n(47)
, E = o(k)
, C = n(17)
, T = o(C)
, P = n(11)
, N = o(P)
, x = n(175)
, R = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments),
this.state = {
formState: {},
checkingFromUrl: !1
}
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
var e = (0,
N["default"])("access-page", {
hidden: this.state.checkingFromUrl
});
return u["default"].createElement("div", {
className: e
}, u["default"].createElement("div", {
className: "v-primary-navigation"
}, u["default"].createElement(g["default"], null ), u["default"].createElement("div", {
className: "access-login"
}, u["default"].createElement(h["default"], {
mobile: T["default"].isMobile()
}))), u["default"].createElement("div", {
className: "background"
}, u["default"].createElement("div", {
className: "content-container"
}, u["default"].createElement("h1", null , v.locale.accesspage.header), u["default"].createElement("h2", null , v.locale.accesspage.subheader), u["default"].createElement("form", {
method: "GET",
className: "frm frm-access",
onSubmit: this._onSubmit.bind(this)
}, u["default"].createElement("p", {
dangerouslySetInnerHTML: {
__html: v.locale.accesspage.form.title
}
}), u["default"].createElement("div", {
className: "input-wrapper"
}, u["default"].createElement("input", {
autoCorrect: "off",
autoComplete: "off",
className: "inp inp-text inp-accesskey",
maxLength: "6",
placeholder: v.locale.accesspage.form.placeholder,
ref: "code",
name: "code",
onChange: this._onChange.bind(this)
}), this._renderError(), u["default"].createElement(w["default"], {
className: "btn-unlock btn-green",
loading: "loading" === this.state.formState.type
}, u["default"].createElement("span", {
className: "icon-unlock"
}), v.locale.accesspage.form.button))))), u["default"].createElement("p", {
className: "lnk-invite",
dangerouslySetInnerHTML: {
__html: v.locale.accesspage.noinvite
}
}))
}
}, {
key: "componentDidMount",
value: function() {
this.props.code && (d["default"].findDOMNode(this.refs.code).value = this.props.code)
}
}, {
key: "_renderError",
value: function() {
return "error" === this.state.formState.type ? u["default"].createElement("p", {
className: "error-message"
}, this.state.formState.message) : void 0
}
}, {
key: "_onChange",
value: function() {
var e = d["default"].findDOMNode(this.refs.code).value;
this.setState({
formState: {}
}),
d["default"].findDOMNode(this.refs.code).value = e
}
}, {
key: "_checkCode",
value: function(e) {
var t = this;
if ("" === e)
return void this.setState({
formState: {
type: "error",
message: v.locale.app.error.default_form_field_required
}
});
this.setState({
formState: {
type: "loading"
}
});
var n = new _["default"];
n.set("code", e),
n.fetch().then(function() {
n.get("used") ? t.setState({
formState: {
type: "error",
message: v.locale.accesspage.form.error
},
checkingFromUrl: !1
}) : ((0,
x.setAccessCookie)(),
E["default"].set("signUpCode", n),
S.history.navigate("signup/kiosk", {
trigger: !0
}))
}, function() {
t.setState({
formState: {
type: "error",
message: v.locale.accesspage.form.error
},
checkingFromUrl: !1
})
})
}
}, {
key: "_onSubmit",
value: function(e) {
e.preventDefault();
var t = d["default"].findDOMNode(this.refs.code).value.trim();
this._checkCode(t)
}
}], [{
key: "propTypes",
value: {
code: u["default"].PropTypes.string
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = R,
e.exports = t["default"]
},
685: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(4)
, u = n(2)
, c = o(u)
, d = n(684)
, p = o(d)
, f = n(12)
, h = o(f)
, m = n(38)
, g = o(m)
, v = n(44)
, y = o(v)
, _ = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).call(this),
this.name = "access",
this.type = "dialogue",
this.setupModuleRouter(),
window.location.href.includes(this.name) && !y["default"].showBetaAsReleased && g["default"].setCountryCode("US")
}
return s(t, e),
r(t, [{
key: "requireAuth",
value: function() {
return !h["default"].requireSignup()
}
}, {
key: "getModuleRoutes",
value: function() {
return {
"": this.openAccess.bind(this),
":code": this.openAccess.bind(this)
}
}
}, {
key: "openAccess",
value: function(e) {
this.load(),
this.render(c["default"].createElement(p["default"], {
code: e
}))
}
}]),
t
}(l.ReactModule);
t["default"] = new _,
e.exports = t["default"]
},
686: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(37)
, d = o(c)
, p = n(12)
, f = o(p)
, h = n(8)
, m = n(692)
, g = o(m)
, v = n(311)
, y = o(v)
, _ = n(830)
, b = o(_)
, w = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "componentDidMount",
value: function() {
y["default"].fetchAlerts(f["default"].getUser().id, this.props.query, this.props.showAddAlert)
}
}, {
key: "componentWillReceiveProps",
value: function(e) {
e.query !== this.props.query && y["default"].fetchAlerts(f["default"].getUser().id, e.query)
}
}, {
key: "_onAddAlert",
value: function(e) {
y["default"].addAlert(f["default"].getUser().id, e)
}
}, {
key: "_onDeleteAlert",
value: function() {
var e = b["default"].getState().alert;
y["default"].deleteAlert(e)
}
}, {
key: "_onEditAlert",
value: function(e) {
var t = b["default"].getState().alert;
y["default"].editAlert(t, e)
}
}, {
key: "render",
value: function() {
var e = this;
return u["default"].createElement(d["default"], {
stores: {
AlertsStore: b["default"]
},
render: function(t) {
return u["default"].createElement(g["default"], {
showAddAlert: !!e.props.showAddAlert,
showManager: !!e.props.query,
query: e.props.query,
searchQuery: t.AlertsStore.searchQuery,
alertsStore: t.AlertsStore,
onSetSearchQuery: y["default"].setSearchQuery,
onAddAlert: e._onAddAlert,
onClickDelete: e._onDeleteAlert.bind(e),
onClickEdit: e._onEditAlert.bind(e),
onShowResults: y["default"].fetchResults,
onNearEnd: y["default"].fetchNextResults,
loading: [t.AlertsStore.alertsStatus, t.AlertsStore.resultsStatus].includes(h.STATUS_PENDING)
})
}
})
}
}], [{
key: "propTypes",
value: {
query: u["default"].PropTypes.string,
showAddAlert: u["default"].PropTypes.bool
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = w,
e.exports = t["default"]
},
687: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(33)
, d = o(c)
, p = n(3)
, f = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "_renderMessage",
value: function() {
switch (this.props.error.status) {
case 422:
return (0,
p.translateElement)(u["default"].createElement("p", null ), "alerts.errors.double", [this.props.query], !1);
case 409:
return (0,
p.translateElement)(u["default"].createElement("p", null ), "alerts.errors.limit");
default:
return (0,
p.translateElement)(u["default"].createElement("p", null ), "alerts.errors.failed_adding_alert")
}
}
}, {
key: "render",
value: function() {
return u["default"].createElement(d["default"], null , (0,
p.translateElement)(u["default"].createElement("h2", null ), "app.error.title"), this._renderMessage())
}
}], [{
key: "propTypes",
value: {
error: u["default"].PropTypes.object.isRequired,
query: u["default"].PropTypes.string.isRequired
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = f,
e.exports = t["default"]
},
688: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(15)
, d = o(c)
, p = n(78)
, f = o(p)
, h = n(20)
, m = o(h)
, g = n(687)
, v = o(g)
, y = n(8)
, _ = n(3)
, b = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "_onClickExampleAlert",
value: function(e) {
if (e.target.classList.contains("clickable")) {
var t = e.target.innerText
, n = d["default"].findDOMNode(this.refs.input);
n.value = t,
this.props.onClickExampleAlert(t)
}
}
}, {
key: "_renderError",
value: function() {
if (this.props.status !== y.STATUS_ERROR)
return null ;
var e = d["default"].findDOMNode(this.refs.input);
return u["default"].createElement(v["default"], {
error: this.props.error,
query: e.value
})
}
}, {
key: "render",
value: function() {
return u["default"].createElement("div", {
className: "v-tile v-alert-settings first tile-explain l-transparent l-edit s-success"
}, u["default"].createElement("div", {
className: "explanation"
}, (0,
_.translateElement)(u["default"].createElement("h2", null ), "alerts.text.explanation", !1), (0,
_.translateElement)(u["default"].createElement("p", {
className: "small-bottom-margin",
onClick: this._onClickExampleAlert.bind(this)
}), "alerts.text.example", !1)), u["default"].createElement("form", {
className: "edit",
name: "alert",
onSubmit: this.props.onClickShowResults
}, u["default"].createElement(f["default"], {
ref: "input",
name: "query",
className: "inp inp-text inp-keyword",
placeholder: (0,
_.translate)("alerts.text.enter_keyword"),
onChange: this.props.onChangeQuery,
autoFocus: !0
}), u["default"].createElement(m["default"], {
className: "btn-text btn-try",
onClick: this.props.onClickShowResults
}, (0,
_.translate)("alerts.buttons.show")), u["default"].createElement(m["default"], {
className: "btn-text btn-add",
onClick: this.props.onClickAdd
}, (0,
_.translate)("alerts.buttons.add"))), this._renderError())
}
}], [{
key: "propTypes",
value: {
onClickExampleAlert: u["default"].PropTypes.func.isRequired,
onClickAdd: u["default"].PropTypes.func.isRequired,
onClickShowResults: u["default"].PropTypes.func.isRequired,
status: u["default"].PropTypes.number,
error: u["default"].PropTypes.bool
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = b,
e.exports = t["default"]
},
689: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(33)
, d = o(c)
, p = n(3)
, f = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "render",
value: function() {
return u["default"].createElement(d["default"], {
className: "v-edit-alert-dialog",
onClose: this.props.onClose
}, u["default"].createElement("div", null , (0,
p.translateElement)(u["default"].createElement("span", {
className: "header-title"
}), "alerts.title.mobile_edit", [this.props.alert.get("query")], !1)), u["default"].createElement("button", {
className: "btn-delete",
onClick: this.props.onClickDelete
}), u["default"].createElement("div", {
className: "row"
}, u["default"].createElement("p", {
className: "label"
}, (0,
p.translate)("alerts.label.keyword")), u["default"].createElement("p", {
className: "keyword"
}, this.props.alert.get("query"))))
}
}], [{
key: "propTypes",
value: {
onClose: u["default"].PropTypes.func.isRequired,
onClickDelete: u["default"].PropTypes.func.isRequired,
alert: u["default"].PropTypes.object.isRequired
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = f,
e.exports = t["default"]
},
690: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(15)
, d = o(c)
, p = n(78)
, f = o(p)
, h = n(20)
, m = o(h)
, g = n(3)
, v = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments),
this.state = {
showEdit: !1,
query: this.props.query
}
}
return s(t, e),
r(t, [{
key: "_onClickShowEdit",
value: function(e) {
e.preventDefault(),
this.setState({
showEdit: !this.state.showEdit
})
}
}, {
key: "_onClickEdit",
value: function() {
var e = d["default"].findDOMNode(this.refs.query);
this.props.onClickEdit({
query: e.value
})
}
}, {
key: "_renderEdit",
value: function() {
var e = this;
return this.state.showEdit ? u["default"].createElement("form", {
className: "edit",
name: "alert",
onSubmit: this.props.onClickShowResults
}, u["default"].createElement(f["default"], {
ref: "query",
name: "query",
className: "inp inp-text inp-keyword",
defaultValue: this.props.query,
onChange: this.props.onChangeQuery,
autoFocus: !0
}), u["default"].createElement(m["default"], {
className: "btn-text btn-try",
onClick: this.props.onClickShowResults
}, (0,
g.translate)("alerts.buttons.show")), u["default"].createElement(m["default"], {
className: "btn-text btn-update",
onClick: function() {
return e._onClickEdit()
}
}, (0,
g.translate)("alerts.buttons.edit")), u["default"].createElement("div", {
className: "lnk lnk-delete",
onClick: this.props.onClickDelete
}, (0,
g.translate)("alerts.buttons.delete"))) : null
}
}, {
key: "render",
value: function() {
return u["default"].createElement("div", {
className: "v-tile v-alert-settings l-transparent tile-explain s-success"
}, u["default"].createElement("div", {
className: "explanation"
}, (0,
g.translateElement)(u["default"].createElement("h2", null ), "alerts.tiles.settings.explanation", [this.props.query], !0)), u["default"].createElement("div", {
className: "display"
}, u["default"].createElement("a", {
href: "#",
className: "lnk lnk-edit",
onClick: this._onClickShowEdit.bind(this)
}, (0,
g.translate)("alerts.links.edit"))), this._renderEdit())
}
}], [{
key: "propTypes",
value: {
onClickEdit: u["default"].PropTypes.func.isRequired,
onChangeQuery: u["default"].PropTypes.func.isRequired,
onClickShowResults: u["default"].PropTypes.func.isRequired,
onClickDelete: u["default"].PropTypes.func.isRequired,
query: u["default"].PropTypes.string
},
enumerable: !0
}]),
t
}(u["default"].Component);
t["default"] = v,
e.exports = t["default"]
},
691: function(e, t, n) {
"use strict";
var i = n(9)["default"]
, s = n(10)["default"]
, r = n(7)["default"]
, a = n(6)["default"]
, o = n(1)["default"];
Object.defineProperty(t, "__esModule", {
value: !0
});
var l = n(2)
, u = o(l)
, c = n(174)
, d = o(c)
, p = n(5)
, f = n(3)
, h = n(17)
, m = function(e) {
function t() {
a(this, t),
i(Object.getPrototypeOf(t.prototype), "constructor", this).apply(this, arguments)
}
return s(t, e),
r(t, [{
key: "_renderMobileDetailNavigation",
value: function(e) {
var t = [{
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment