test
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

20814 lines
1.3 MiB

var mod;
function resizeView() {
var e = document.documentElement.clientHeight, t = 0 < $(".footer").length ? $(".footer").css("height") : 0,
a = 0 < $(".left-menu-content").length ? $(".left-menu-content").css("height") : 0;
$(".main-panel-body,.panel-cut").css("min-height", e - 100), $(".caret-wxapp .panel-app").css("min-height", e - 95), parseInt(a) > e - 50 ? $(".skin-black .right-content>.content").css("min-height", parseInt(a) - parseInt(t) - 30 + "px") : $(".skin-black .right-content>.content").css("min-height", e - parseInt(t) - 93 + "px")
}
!function (L) {
"use strict";
function $(s, o) {
return o = o || Error, function () {
var e, t, a = arguments, n = a[0], i = "[" + (s ? s + ":" : "") + n + "] ";
for (i += a[1].replace(/\{\d+\}/g, function (e) {
var t = 2 + +e.slice(1, -1);
return t < a.length ? Be(a[t]) : e
}), i += "\nhttp://errors.angularjs.org/1.5.6/" + (s ? s + "/" : "") + n, t = 2, e = "?"; t < a.length; t++, e = "&") i += e + "p" + (t - 2) + "=" + encodeURIComponent(Be(a[t]));
return new o(i)
}
}
var s = /^\/(.+)\/([a-z]*)$/, d = "validity", O = Object.prototype.hasOwnProperty, U = function (e) {
return ge(e) ? e.toLowerCase() : e
}, u = function (e) {
return ge(e) ? e.toUpperCase() : e
};
"i" !== "I".toLowerCase() && (U = function (e) {
return ge(e) ? e.replace(/[A-Z]/g, function (e) {
return String.fromCharCode(32 | e.charCodeAt(0))
}) : e
}, u = function (e) {
return ge(e) ? e.replace(/[a-z]/g, function (e) {
return String.fromCharCode(-33 & e.charCodeAt(0))
}) : e
});
var N, ce, o, h, r = [].slice, a = [].splice, e = [].push, B = Object.prototype.toString, l = Object.getPrototypeOf,
c = $("ng"), S = L.angular || (L.angular = {}), t = 0;
function j(e) {
if (null == e || _(e)) return !1;
if (fe(e) || ge(e) || ce && e instanceof ce) return !0;
var t = "length" in Object(e) && e.length;
return w(t) && (0 <= t && (t - 1 in e || e instanceof Array) || "function" == typeof e.item)
}
function ue(e, t, a) {
var n, i;
if (e) if (he(e)) for (n in e) "prototype" == n || "length" == n || "name" == n || e.hasOwnProperty && !e.hasOwnProperty(n) || t.call(a, e[n], n, e); else if (fe(e) || j(e)) {
var s = "object" != typeof e;
for (n = 0, i = e.length; n < i; n++) (s || n in e) && t.call(a, e[n], n, e)
} else if (e.forEach && e.forEach !== ue) e.forEach(t, a, e); else if (b(e)) for (n in e) t.call(a, e[n], n, e); else if ("function" == typeof e.hasOwnProperty) for (n in e) e.hasOwnProperty(n) && t.call(a, e[n], n, e); else for (n in e) O.call(e, n) && t.call(a, e[n], n, e);
return e
}
function p(e, t, a) {
for (var n = Object.keys(e).sort(), i = 0; i < n.length; i++) t.call(a, e[n[i]], n[i]);
return n
}
function v(a) {
return function (e, t) {
a(t, e)
}
}
function A() {
return ++t
}
function m(e, t) {
t ? e.$$hashKey = t : delete e.$$hashKey
}
function g(e, t, a) {
for (var n = e.$$hashKey, i = 0, s = t.length; i < s; ++i) {
var o = t[i];
if (me(o) || he(o)) for (var r = Object.keys(o), l = 0, c = r.length; l < c; l++) {
var u = r[l], d = o[u];
a && me(d) ? k(d) ? e[u] = new Date(d.valueOf()) : x(d) ? e[u] = new RegExp(d) : d.nodeName ? e[u] = d.cloneNode(!0) : T(d) ? e[u] = d.clone() : (me(e[u]) || (e[u] = fe(d) ? [] : {}), g(e[u], [d], !0)) : e[u] = d
}
}
return m(e, n), e
}
function de(e) {
return g(e, r.call(arguments, 1), !1)
}
function n(e) {
return g(e, r.call(arguments, 1), !0)
}
function f(e) {
return parseInt(e, 10)
}
function R(e, t) {
return de(Object.create(e), t)
}
function q() {
}
function Y(e) {
return e
}
function I(e) {
return function () {
return e
}
}
function y(e) {
return he(e.toString) && e.toString !== B
}
function pe(e) {
return void 0 === e
}
function V(e) {
return void 0 !== e
}
function me(e) {
return null !== e && "object" == typeof e
}
function b(e) {
return null !== e && "object" == typeof e && !l(e)
}
function ge(e) {
return "string" == typeof e
}
function w(e) {
return "number" == typeof e
}
function k(e) {
return "[object Date]" === B.call(e)
}
N = L.document.documentMode, q.$inject = [], Y.$inject = [];
var fe = Array.isArray;
function he(e) {
return "function" == typeof e
}
function x(e) {
return "[object RegExp]" === B.call(e)
}
function _(e) {
return e && e.window === e
}
function ve(e) {
return e && e.$evalAsync && e.$watch
}
function ye(e) {
return "boolean" == typeof e
}
function C(e) {
return e && he(e.then)
}
var M = /^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array\]$/;
var be = function (e) {
return ge(e) ? e.trim() : e
}, D = function (e) {
return e.replace(/([-()\[\]{}+?*.$\^|,:#<!\\])/g, "\\$1").replace(/\x08/g, "\\x08")
};
function T(e) {
return !(!e || !(e.nodeName || e.prop && e.attr && e.find))
}
function we(e) {
return U(e.nodeName || e[0] && e[0].nodeName)
}
function $e(e, t) {
var a = e.indexOf(t);
return 0 <= a && e.splice(a, 1), a
}
function P(e, a) {
var i = [], s = [];
if (a) {
if (function (e) {
return e && w(e.length) && M.test(B.call(e))
}(a) || function (e) {
return "[object ArrayBuffer]" === B.call(e)
}(a)) throw c("cpta", "Can't copy! TypedArray destination cannot be mutated.");
if (e === a) throw c("cpi", "Can't copy! Source and destination are identical.");
return fe(a) ? a.length = 0 : ue(a, function (e, t) {
"$$hashKey" !== t && delete a[t]
}), i.push(e), s.push(a), o(e, a)
}
return r(e);
function o(e, t) {
var a, n = t.$$hashKey;
if (fe(e)) for (var i = 0, s = e.length; i < s; i++) t.push(r(e[i])); else if (b(e)) for (a in e) t[a] = r(e[a]); else if (e && "function" == typeof e.hasOwnProperty) for (a in e) e.hasOwnProperty(a) && (t[a] = r(e[a])); else for (a in e) O.call(e, a) && (t[a] = r(e[a]));
return m(t, n), t
}
function r(e) {
if (!me(e)) return e;
var t = i.indexOf(e);
if (-1 !== t) return s[t];
if (_(e) || ve(e)) throw c("cpws", "Can't copy! Making copies of Window or Scope instances is not supported.");
var a = !1, n = function (e) {
switch (B.call(e)) {
case"[object Int8Array]":
case"[object Int16Array]":
case"[object Int32Array]":
case"[object Float32Array]":
case"[object Float64Array]":
case"[object Uint8Array]":
case"[object Uint8ClampedArray]":
case"[object Uint16Array]":
case"[object Uint32Array]":
return new e.constructor(r(e.buffer));
case"[object ArrayBuffer]":
if (e.slice) return e.slice(0);
var t = new ArrayBuffer(e.byteLength);
return new Uint8Array(t).set(new Uint8Array(e)), t;
case"[object Boolean]":
case"[object Number]":
case"[object String]":
case"[object Date]":
return new e.constructor(e.valueOf());
case"[object RegExp]":
var a = new RegExp(e.source, e.toString().match(/[^\/]*$/)[0]);
return a.lastIndex = e.lastIndex, a;
case"[object Blob]":
return new e.constructor([e], {type: e.type})
}
if (he(e.cloneNode)) return e.cloneNode(!0)
}(e);
return void 0 === n && (n = fe(e) ? [] : Object.create(l(e)), a = !0), i.push(e), s.push(n), a ? o(e, n) : n
}
}
function E(e, t) {
if (fe(e)) {
t = t || [];
for (var a = 0, n = e.length; a < n; a++) t[a] = e[a]
} else if (me(e)) for (var i in t = t || {}, e) "$" === i.charAt(0) && "$" === i.charAt(1) || (t[i] = e[i]);
return t || e
}
function ke(e, t) {
if (e === t) return !0;
if (null === e || null === t) return !1;
if (e != e && t != t) return !0;
var a, n, i, s = typeof e;
if (s == typeof t && "object" == s) {
if (!fe(e)) {
if (k(e)) return !!k(t) && ke(e.getTime(), t.getTime());
if (x(e)) return !!x(t) && e.toString() == t.toString();
if (ve(e) || ve(t) || _(e) || _(t) || fe(t) || k(t) || x(t)) return !1;
for (n in i = Ee(), e) if ("$" !== n.charAt(0) && !he(e[n])) {
if (!ke(e[n], t[n])) return !1;
i[n] = !0
}
for (n in t) if (!(n in i) && "$" !== n.charAt(0) && V(t[n]) && !he(t[n])) return !1;
return !0
}
if (!fe(t)) return !1;
if ((a = e.length) == t.length) {
for (n = 0; n < a; n++) if (!ke(e[n], t[n])) return !1;
return !0
}
}
return !1
}
var F = function () {
if (!V(F.rules)) {
var e = L.document.querySelector("[ng-csp]") || L.document.querySelector("[data-ng-csp]");
if (e) {
var t = e.getAttribute("ng-csp") || e.getAttribute("data-ng-csp");
F.rules = {
noUnsafeEval: !t || -1 !== t.indexOf("no-unsafe-eval"),
noInlineStyle: !t || -1 !== t.indexOf("no-inline-style")
}
} else F.rules = {
noUnsafeEval: function () {
try {
return new Function(""), !1
} catch (e) {
return !0
}
}(), noInlineStyle: !1
}
}
return F.rules
}, z = function () {
if (V(z.name_)) return z.name_;
var e, t, a, n, i = ne.length;
for (t = 0; t < i; ++t) if (a = ne[t], e = L.document.querySelector("[" + a.replace(":", "\\:") + "jq]")) {
n = e.getAttribute(a + "jq");
break
}
return z.name_ = n
};
function H(e, t, a) {
return e.concat(r.call(t, a))
}
function xe(e, t) {
return r.call(e, t || 0)
}
function _e(e, t) {
var a = 2 < arguments.length ? xe(arguments, 2) : [];
return !he(t) || t instanceof RegExp ? t : a.length ? function () {
return arguments.length ? t.apply(e, H(a, arguments, 0)) : t.apply(e, a)
} : function () {
return arguments.length ? t.apply(e, arguments) : t.call(e)
}
}
function i(e, t) {
var a = t;
return "string" == typeof e && "$" === e.charAt(0) && "$" === e.charAt(1) ? a = void 0 : _(t) ? a = "$WINDOW" : t && L.document === t ? a = "$DOCUMENT" : ve(t) && (a = "$SCOPE"), a
}
function W(e, t) {
if (!pe(e)) return w(t) || (t = t ? 2 : null), JSON.stringify(e, i, t)
}
function G(e) {
return ge(e) ? JSON.parse(e) : e
}
var Q = /:/g;
function K(e, t) {
e = e.replace(Q, "");
var a = Date.parse("Jan 01, 1970 00:00:00 " + e) / 6e4;
return isNaN(a) ? t : a
}
function J(e, t, a) {
a = a ? -1 : 1;
var n = e.getTimezoneOffset();
return function (e, t) {
return (e = new Date(e.getTime())).setMinutes(e.getMinutes() + t), e
}(e, a * (K(t, n) - n))
}
function Se(e) {
e = ce(e).clone();
try {
e.empty()
} catch (e) {
}
var t = ce("<div>").append(e).html();
try {
return e[0].nodeType === Le ? U(t) : t.match(/^(<[^>]+>)/)[1].replace(/^<([\w\-]+)/, function (e, t) {
return "<" + U(t)
})
} catch (e) {
return U(t)
}
}
function Z(e) {
try {
return decodeURIComponent(e)
} catch (e) {
}
}
function X(e) {
var i = {};
return ue((e || "").split("&"), function (e) {
var t, a, n;
e && (a = e = e.replace(/\+/g, "%20"), -1 !== (t = e.indexOf("=")) && (a = e.substring(0, t), n = e.substring(t + 1)), V(a = Z(a)) && (n = !V(n) || Z(n), O.call(i, a) ? fe(i[a]) ? i[a].push(n) : i[a] = [i[a], n] : i[a] = n))
}), i
}
function ee(e) {
var a = [];
return ue(e, function (e, t) {
fe(e) ? ue(e, function (e) {
a.push(ae(t, !0) + (!0 === e ? "" : "=" + ae(e, !0)))
}) : a.push(ae(t, !0) + (!0 === e ? "" : "=" + ae(e, !0)))
}), a.length ? a.join("&") : ""
}
function te(e) {
return ae(e, !0).replace(/%26/gi, "&").replace(/%3D/gi, "=").replace(/%2B/gi, "+")
}
function ae(e, t) {
return encodeURIComponent(e).replace(/%40/gi, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%3B/gi, ";").replace(/%20/g, t ? "%20" : "+")
}
var ne = ["ng-", "data-ng-", "ng:", "x-ng-"];
function ie(n, e) {
var i, s, t = {};
ue(ne, function (e) {
var t = e + "app";
!i && n.hasAttribute && n.hasAttribute(t) && (s = (i = n).getAttribute(t))
}), ue(ne, function (e) {
var t, a = e + "app";
!i && (t = n.querySelector("[" + a.replace(":", "\\:") + "]")) && (s = (i = t).getAttribute(a))
}), i && (t.strictDi = null !== function (e, t) {
var a, n, i = ne.length;
for (n = 0; n < i; ++n) if (a = ne[n] + t, ge(a = e.getAttribute(a))) return a;
return null
}(i, "strict-di"), e(i, s ? [s] : [], t))
}
function se(a, n, i) {
me(i) || (i = {});
i = de({strictDi: !1}, i);
function t() {
if ((a = ce(a)).injector()) {
var e = a[0] === L.document ? "document" : Se(a);
throw c("btstrpd", "App already bootstrapped with this element '{0}'", e.replace(/</, "&lt;").replace(/>/, "&gt;"))
}
(n = n || []).unshift(["$provide", function (e) {
e.value("$rootElement", a)
}]), i.debugInfoEnabled && n.push(["$compileProvider", function (e) {
e.debugInfoEnabled(!0)
}]), n.unshift("ng");
var t = qt(n, i.strictDi);
return t.invoke(["$rootScope", "$rootElement", "$compile", "$injector", function (e, t, a, n) {
e.$apply(function () {
t.data("$injector", n), a(t)(e)
})
}]), t
}
var e = /^NG_ENABLE_DEBUG_INFO!/, s = /^NG_DEFER_BOOTSTRAP!/;
if (L && e.test(L.name) && (i.debugInfoEnabled = !0, L.name = L.name.replace(e, "")), L && !s.test(L.name)) return t();
L.name = L.name.replace(s, ""), S.resumeBootstrap = function (e) {
return ue(e, function (e) {
n.push(e)
}), t()
}, he(S.resumeDeferredBootstrap) && S.resumeDeferredBootstrap()
}
function oe() {
L.name = "NG_ENABLE_DEBUG_INFO!" + L.name, L.location.reload()
}
function re(e) {
var t = S.element(e).injector();
if (!t) throw c("test", "no injector found for element argument to getTestability");
return t.get("$$testability")
}
var le = /[A-Z]/g;
function Ie(e, a) {
return a = a || "_", e.replace(le, function (e, t) {
return (t ? a : "") + e.toLowerCase()
})
}
var Ce = !1;
function Ae(e, t, a) {
if (!e) throw c("areq", "Argument '{0}' is {1}", t || "?", a || "required");
return e
}
function Me(e, t, a) {
return a && fe(e) && (e = e[e.length - 1]), Ae(he(e), t, "not a function, got " + (e && "object" == typeof e ? e.constructor.name || "Object" : typeof e)), e
}
function De(e, t) {
if ("hasOwnProperty" === e) throw c("badname", "hasOwnProperty is not a valid {0} name", t)
}
function Te(e, t, a) {
if (!t) return e;
for (var n, i = t.split("."), s = e, o = i.length, r = 0; r < o; r++) n = i[r], e && (e = (s = e)[n]);
return !a && he(e) ? _e(s, e) : e
}
function Pe(e) {
for (var t, a = e[0], n = e[e.length - 1], i = 1; a !== n && (a = a.nextSibling); i++) !t && e[i] === a || (t || (t = ce(r.call(e, 0, i))), t.push(a));
return t || e
}
function Ee() {
return Object.create(null)
}
var je = 1, Le = 3, Oe = 8, Ue = 9, Ne = 11;
function Be(e) {
return "function" == typeof e ? e.toString().replace(/ \{[\s\S]*$/, "") : pe(e) ? "undefined" : "string" != typeof e ? function (e) {
var a = [];
return JSON.stringify(e, function (e, t) {
if (me(t = i(e, t))) {
if (0 <= a.indexOf(t)) return "...";
a.push(t)
}
return t
})
}(e) : e
}
var Re = {full: "1.5.6", major: 1, minor: 5, dot: 6, codeName: "arrow-stringification"};
ot.expando = "ng339";
var qe = ot.cache = {}, Ye = 1, Ve = function (e, t, a) {
e.addEventListener(t, a, !1)
}, Fe = function (e, t, a) {
e.removeEventListener(t, a, !1)
};
ot._data = function (e) {
return this.cache[e[this.expando]] || {}
};
var ze = /([\:\-\_]+(.))/g, He = /^moz([A-Z])/, We = {mouseleave: "mouseout", mouseenter: "mouseover"},
Ge = $("jqLite");
function Qe(e) {
return e.replace(ze, function (e, t, a, n) {
return n ? a.toUpperCase() : a
}).replace(He, "Moz$1")
}
var Ke = /^<([\w-]+)\s*\/?>(?:<\/\1>|)$/, Je = /<|&#?\w+;/, Ze = /<([\w:-]+)/,
Xe = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi, et = {
option: [1, '<select multiple="multiple">', "</select>"],
thead: [1, "<table>", "</table>"],
col: [2, "<table><colgroup>", "</colgroup></table>"],
tr: [2, "<table><tbody>", "</tbody></table>"],
td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
_default: [0, "", ""]
};
function tt(e) {
return !Je.test(e)
}
function at(e) {
var t = e.nodeType;
return t === je || !t || t === Ue
}
function nt(e, t) {
var a, n, i, s, o = t.createDocumentFragment(), r = [];
if (tt(e)) r.push(t.createTextNode(e)); else {
for (a = a || o.appendChild(t.createElement("div")), n = (Ze.exec(e) || ["", ""])[1].toLowerCase(), i = et[n] || et._default, a.innerHTML = i[1] + e.replace(Xe, "<$1></$2>") + i[2], s = i[0]; s--;) a = a.lastChild;
r = H(r, a.childNodes), (a = o.firstChild).textContent = ""
}
return o.textContent = "", o.innerHTML = "", ue(r, function (e) {
o.appendChild(e)
}), o
}
function it(e, t) {
var a = e.parentNode;
a && a.replaceChild(t, e), t.appendChild(e)
}
et.optgroup = et.option, et.tbody = et.tfoot = et.colgroup = et.caption = et.thead, et.th = et.td;
var st = L.Node.prototype.contains || function (e) {
return !!(16 & this.compareDocumentPosition(e))
};
function ot(e) {
if (e instanceof ot) return e;
var t;
if (ge(e) && (e = be(e), t = !0), !(this instanceof ot)) {
if (t && "<" != e.charAt(0)) throw Ge("nosel", "Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");
return new ot(e)
}
ht(this, t ? function (e, t) {
var a;
return t = t || L.document, (a = Ke.exec(e)) ? [t.createElement(a[1])] : (a = nt(e, t)) ? a.childNodes : []
}(e) : e)
}
function rt(e) {
return e.cloneNode(!0)
}
function lt(e, t) {
if (t || ut(e), e.querySelectorAll) for (var a = e.querySelectorAll("*"), n = 0, i = a.length; n < i; n++) ut(a[n])
}
function ct(a, e, n, t) {
if (V(t)) throw Ge("offargs", "jqLite#off() does not support the `selector` argument");
var i = dt(a), s = i && i.events, o = i && i.handle;
if (o) if (e) {
var r = function (e) {
var t = s[e];
V(n) && $e(t || [], n), V(n) && t && 0 < t.length || (Fe(a, e, o), delete s[e])
};
ue(e.split(" "), function (e) {
r(e), We[e] && r(We[e])
})
} else for (e in s) "$destroy" !== e && Fe(a, e, o), delete s[e]
}
function ut(e, t) {
var a = e.ng339, n = a && qe[a];
if (n) {
if (t) return void delete n.data[t];
n.handle && (n.events.$destroy && n.handle({}, "$destroy"), ct(e)), delete qe[a], e.ng339 = void 0
}
}
function dt(e, t) {
var a = e.ng339, n = a && qe[a];
return t && !n && (e.ng339 = a = ++Ye, n = qe[a] = {events: {}, data: {}, handle: void 0}), n
}
function pt(e, t, a) {
if (at(e)) {
var n = V(a), i = !n && t && !me(t), s = !t, o = dt(e, !i), r = o && o.data;
if (n) r[t] = a; else {
if (s) return r;
if (i) return r && r[t];
de(r, t)
}
}
}
function mt(e, t) {
return !!e.getAttribute && -1 < (" " + (e.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " ").indexOf(" " + t + " ")
}
function gt(t, e) {
e && t.setAttribute && ue(e.split(" "), function (e) {
t.setAttribute("class", be((" " + (t.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " ").replace(" " + be(e) + " ", " ")))
})
}
function ft(e, t) {
if (t && e.setAttribute) {
var a = (" " + (e.getAttribute("class") || "") + " ").replace(/[\n\t]/g, " ");
ue(t.split(" "), function (e) {
e = be(e), -1 === a.indexOf(" " + e + " ") && (a += e + " ")
}), e.setAttribute("class", be(a))
}
}
function ht(e, t) {
if (t) if (t.nodeType) e[e.length++] = t; else {
var a = t.length;
if ("number" == typeof a && t.window !== t) {
if (a) for (var n = 0; n < a; n++) e[e.length++] = t[n]
} else e[e.length++] = t
}
}
function vt(e, t) {
return yt(e, "$" + (t || "ngController") + "Controller")
}
function yt(e, t, a) {
e.nodeType == Ue && (e = e.documentElement);
for (var n = fe(t) ? t : [t]; e;) {
for (var i = 0, s = n.length; i < s; i++) if (V(a = ce.data(e, n[i]))) return a;
e = e.parentNode || e.nodeType === Ne && e.host
}
}
function bt(e) {
for (lt(e, !0); e.firstChild;) e.removeChild(e.firstChild)
}
function wt(e, t) {
t || lt(e);
var a = e.parentNode;
a && a.removeChild(e)
}
var $t = ot.prototype = {
ready: function (e) {
var t = !1;
function a() {
t || (t = !0, e())
}
"complete" === L.document.readyState ? L.setTimeout(a) : (this.on("DOMContentLoaded", a), ot(L).on("load", a))
}, toString: function () {
var t = [];
return ue(this, function (e) {
t.push("" + e)
}), "[" + t.join(", ") + "]"
}, eq: function (e) {
return ce(0 <= e ? this[e] : this[this.length + e])
}, length: 0, push: e, sort: [].sort, splice: [].splice
}, kt = {};
ue("multiple,selected,checked,disabled,readOnly,required,open".split(","), function (e) {
kt[U(e)] = e
});
var xt = {};
ue("input,select,option,textarea,button,form,details".split(","), function (e) {
xt[e] = !0
});
var _t = {ngMinlength: "minlength", ngMaxlength: "maxlength", ngMin: "min", ngMax: "max", ngPattern: "pattern"};
function St(e, t) {
var a = kt[t.toLowerCase()];
return a && xt[we(e)] && a
}
function It(e, t) {
if (pe(t)) {
var a = e.nodeType;
return a === je || a === Le ? e.textContent : ""
}
e.textContent = t
}
function Ct(e, t, a) {
a.call(e, t)
}
function At(e, t, a) {
var n = t.relatedTarget;
n && (n === e || st.call(e, n)) || a.call(e, t)
}
function Mt() {
this.$get = function () {
return de(ot, {
hasClass: function (e, t) {
return e.attr && (e = e[0]), mt(e, t)
}, addClass: function (e, t) {
return e.attr && (e = e[0]), ft(e, t)
}, removeClass: function (e, t) {
return e.attr && (e = e[0]), gt(e, t)
}
})
}
}
function Dt(e, t) {
var a = e && e.$$hashKey;
if (a) return "function" == typeof a && (a = e.$$hashKey()), a;
var n = typeof e;
return a = "function" == n || "object" == n && null !== e ? e.$$hashKey = n + ":" + (t || A)() : n + ":" + e
}
function Tt(e, t) {
if (t) {
var a = 0;
this.nextUid = function () {
return ++a
}
}
ue(e, this.put, this)
}
ue({
data: pt, removeData: ut, hasData: function (e) {
for (var t in qe[e.ng339]) return !0;
return !1
}, cleanData: function (e) {
for (var t = 0, a = e.length; t < a; t++) ut(e[t])
}
}, function (e, t) {
ot[t] = e
}), ue({
data: pt, inheritedData: yt, scope: function (e) {
return ce.data(e, "$scope") || yt(e.parentNode || e, ["$isolateScope", "$scope"])
}, isolateScope: function (e) {
return ce.data(e, "$isolateScope") || ce.data(e, "$isolateScopeNoTemplate")
}, controller: vt, injector: function (e) {
return yt(e, "$injector")
}, removeAttr: function (e, t) {
e.removeAttribute(t)
}, hasClass: mt, css: function (e, t, a) {
if (t = Qe(t), !V(a)) return e.style[t];
e.style[t] = a
}, attr: function (e, t, a) {
var n = e.nodeType;
if (n !== Le && 2 !== n && n !== Oe) {
var i = U(t);
if (kt[i]) {
if (!V(a)) return e[t] || (e.attributes.getNamedItem(t) || q).specified ? i : void 0;
a ? (e[t] = !0, e.setAttribute(t, i)) : (e[t] = !1, e.removeAttribute(i))
} else if (V(a)) e.setAttribute(t, a); else if (e.getAttribute) {
var s = e.getAttribute(t, 2);
return null === s ? void 0 : s
}
}
}, prop: function (e, t, a) {
if (!V(a)) return e[t];
e[t] = a
}, text: (It.$dv = "", It), val: function (e, t) {
if (pe(t)) {
if (e.multiple && "select" === we(e)) {
var a = [];
return ue(e.options, function (e) {
e.selected && a.push(e.value || e.text)
}), 0 === a.length ? null : a
}
return e.value
}
e.value = t
}, html: function (e, t) {
if (pe(t)) return e.innerHTML;
lt(e, !0), e.innerHTML = t
}, empty: bt
}, function (c, e) {
ot.prototype[e] = function (e, t) {
var a, n, i = this.length;
if (c !== bt && pe(2 == c.length && c !== mt && c !== vt ? e : t)) {
if (me(e)) {
for (a = 0; a < i; a++) if (c === pt) c(this[a], e); else for (n in e) c(this[a], n, e[n]);
return this
}
for (var s = c.$dv, o = pe(s) ? Math.min(i, 1) : i, r = 0; r < o; r++) {
var l = c(this[r], e, t);
s = s ? s + l : l
}
return s
}
for (a = 0; a < i; a++) c(this[a], e, t);
return this
}
}), ue({
removeData: ut, on: function (i, e, s, t) {
if (V(t)) throw Ge("onargs", "jqLite#on() does not support the `selector` or `eventData` parameters");
if (at(i)) {
var a = dt(i, !0), o = a.events, r = a.handle;
r || (r = a.handle = function (r, l) {
function e(e, t) {
e.isDefaultPrevented = function () {
return e.defaultPrevented
};
var a = l[t || e.type], n = a ? a.length : 0;
if (n) {
if (pe(e.immediatePropagationStopped)) {
var i = e.stopImmediatePropagation;
e.stopImmediatePropagation = function () {
e.immediatePropagationStopped = !0, e.stopPropagation && e.stopPropagation(), i && i.call(e)
}
}
e.isImmediatePropagationStopped = function () {
return !0 === e.immediatePropagationStopped
};
var s = a.specialHandlerWrapper || Ct;
1 < n && (a = E(a));
for (var o = 0; o < n; o++) e.isImmediatePropagationStopped() || s(r, e, a[o])
}
}
return e.elem = r, e
}(i, o));
for (var n = 0 <= e.indexOf(" ") ? e.split(" ") : [e], l = n.length, c = function (e, t, a) {
var n = o[e];
n || ((n = o[e] = []).specialHandlerWrapper = t, "$destroy" === e || a || Ve(i, e, r)), n.push(s)
}; l--;) e = n[l], We[e] ? (c(We[e], At), c(e, void 0, !0)) : c(e)
}
}, off: ct, one: function (t, a, n) {
(t = ce(t)).on(a, function e() {
t.off(a, n), t.off(a, e)
}), t.on(a, n)
}, replaceWith: function (t, e) {
var a, n = t.parentNode;
lt(t), ue(new ot(e), function (e) {
a ? n.insertBefore(e, a.nextSibling) : n.replaceChild(e, t), a = e
})
}, children: function (e) {
var t = [];
return ue(e.childNodes, function (e) {
e.nodeType === je && t.push(e)
}), t
}, contents: function (e) {
return e.contentDocument || e.childNodes || []
}, append: function (e, t) {
var a = e.nodeType;
if (a === je || a === Ne) for (var n = 0, i = (t = new ot(t)).length; n < i; n++) {
var s = t[n];
e.appendChild(s)
}
}, prepend: function (t, e) {
if (t.nodeType === je) {
var a = t.firstChild;
ue(new ot(e), function (e) {
t.insertBefore(e, a)
})
}
}, wrap: function (e, t) {
it(e, ce(t).eq(0).clone()[0])
}, remove: wt, detach: function (e) {
wt(e, !0)
}, after: function (e, t) {
for (var a = e, n = e.parentNode, i = 0, s = (t = new ot(t)).length; i < s; i++) {
var o = t[i];
n.insertBefore(o, a.nextSibling), a = o
}
}, addClass: ft, removeClass: gt, toggleClass: function (a, e, n) {
e && ue(e.split(" "), function (e) {
var t = n;
pe(t) && (t = !mt(a, e)), (t ? ft : gt)(a, e)
})
}, parent: function (e) {
var t = e.parentNode;
return t && t.nodeType !== Ne ? t : null
}, next: function (e) {
return e.nextElementSibling
}, find: function (e, t) {
return e.getElementsByTagName ? e.getElementsByTagName(t) : []
}, clone: rt, triggerHandler: function (t, e, a) {
var n, i, s, o = e.type || e, r = dt(t), l = r && r.events, c = l && l[o];
c && (n = {
preventDefault: function () {
this.defaultPrevented = !0
}, isDefaultPrevented: function () {
return !0 === this.defaultPrevented
}, stopImmediatePropagation: function () {
this.immediatePropagationStopped = !0
}, isImmediatePropagationStopped: function () {
return !0 === this.immediatePropagationStopped
}, stopPropagation: q, type: o, target: t
}, e.type && (n = de(n, e)), i = E(c), s = a ? [n].concat(a) : [n], ue(i, function (e) {
n.isImmediatePropagationStopped() || e.apply(t, s)
}))
}
}, function (o, e) {
ot.prototype[e] = function (e, t, a) {
for (var n, i = 0, s = this.length; i < s; i++) pe(n) ? V(n = o(this[i], e, t, a)) && (n = ce(n)) : ht(n, o(this[i], e, t, a));
return V(n) ? n : this
}, ot.prototype.bind = ot.prototype.on, ot.prototype.unbind = ot.prototype.off
}), Tt.prototype = {
put: function (e, t) {
this[Dt(e, this.nextUid)] = t
}, get: function (e) {
return this[Dt(e, this.nextUid)]
}, remove: function (e) {
var t = this[e = Dt(e, this.nextUid)];
return delete this[e], t
}
};
var Pt = [function () {
this.$get = [function () {
return Tt
}]
}], Et = /^([^\(]+?)=>/, jt = /^[^\(]*\(\s*([^\)]*)\)/m, Lt = /,/, Ot = /^\s*(_?)(\S+?)\1\s*$/,
Ut = /((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm, Nt = $("$injector");
function Bt(e) {
return Function.prototype.toString.call(e) + " "
}
function Rt(e) {
var t = Bt(e).replace(Ut, "");
return t.match(Et) || t.match(jt)
}
function qt(e, c) {
c = !0 === c;
var i = {}, o = "Provider", r = [], s = new Tt([], !0), u = {
$provide: {
provider: p(m), factory: p(g), service: p(function (e, t) {
return g(e, ["$injector", function (e) {
return e.instantiate(t)
}])
}), value: p(function (e, t) {
return g(e, I(t), !1)
}), constant: p(function (e, t) {
De(e, "constant"), u[e] = t, a[e] = t
}), decorator: function (e, t) {
var a = l.get(e + o), n = a.$get;
a.$get = function () {
var e = d.invoke(n, a);
return d.invoke(t, null, {$delegate: e})
}
}
}
}, l = u.$injector = f(u, function (e, t) {
throw S.isString(t) && r.push(t), Nt("unpr", "Unknown provider: {0}", r.join(" <- "))
}), a = {}, t = f(a, function (e, t) {
var a = l.get(e + o, t);
return d.invoke(a.$get, a, void 0, e)
}), d = t;
u["$injector" + o] = {$get: I(t)};
var n = function a(e) {
Ae(pe(e) || fe(e), "modulesToLoad", "not an array");
var n, i = [];
ue(e, function (t) {
if (!s.get(t)) {
s.put(t, !0);
try {
ge(t) ? (n = h(t), i = i.concat(a(n.requires)).concat(n._runBlocks), e(n._invokeQueue), e(n._configBlocks)) : he(t) ? i.push(l.invoke(t)) : fe(t) ? i.push(l.invoke(t)) : Me(t, "module")
} catch (e) {
throw fe(t) && (t = t[t.length - 1]), e.message && e.stack && -1 == e.stack.indexOf(e.message) && (e = e.message + "\n" + e.stack), Nt("modulerr", "Failed to instantiate module {0} due to:\n{1}", t, e.stack || e.message || e)
}
}
function e(e) {
var t, a;
for (t = 0, a = e.length; t < a; t++) {
var n = e[t], i = l.get(n[0]);
i[n[1]].apply(i, n[2])
}
}
});
return i
}(e);
return (d = t.get("$injector")).strictDi = c, ue(n, function (e) {
e && d.invoke(e)
}), d;
function p(a) {
return function (e, t) {
if (!me(e)) return a(e, t);
ue(e, v(a))
}
}
function m(e, t) {
if (De(e, "service"), (he(t) || fe(t)) && (t = l.instantiate(t)), !t.$get) throw Nt("pget", "Provider '{0}' must define $get factory method.", e);
return u[e + o] = t
}
function g(e, t, a) {
return m(e, {
$get: !1 !== a ? function (t, a) {
return function () {
var e = d.invoke(a, this);
if (pe(e)) throw Nt("undef", "Provider '{0}' must return a value from $get factory method.", t);
return e
}
}(e, t) : t
})
}
function f(a, n) {
function l(t, e) {
if (a.hasOwnProperty(t)) {
if (a[t] === i) throw Nt("cdep", "Circular dependency found: {0}", t + " <- " + r.join(" <- "));
return a[t]
}
try {
return r.unshift(t), a[t] = i, a[t] = n(t, e)
} catch (e) {
throw a[t] === i && delete a[t], e
} finally {
r.shift()
}
}
function s(e, t, a) {
for (var n = [], i = qt.$$annotate(e, c, a), s = 0, o = i.length; s < o; s++) {
var r = i[s];
if ("string" != typeof r) throw Nt("itkn", "Incorrect injection token! Expected service name as string, got {0}", r);
n.push(t && t.hasOwnProperty(r) ? t[r] : l(r, a))
}
return n
}
return {
invoke: function (e, t, a, n) {
"string" == typeof a && (n = a, a = null);
var i = s(e, a, n);
return fe(e) && (e = e[e.length - 1]), function (e) {
return !(N <= 11) && ("function" == typeof e && /^(?:class\s|constructor\()/.test(Bt(e)))
}(e) ? (i.unshift(null), new (Function.prototype.bind.apply(e, i))) : e.apply(t, i)
}, instantiate: function (e, t, a) {
var n = fe(e) ? e[e.length - 1] : e, i = s(e, t, a);
return i.unshift(null), new (Function.prototype.bind.apply(n, i))
}, get: l, annotate: qt.$$annotate, has: function (e) {
return u.hasOwnProperty(e + o) || a.hasOwnProperty(e)
}
}
}
}
function Yt() {
var e = !0;
this.disableAutoScrolling = function () {
e = !1
}, this.$get = ["$window", "$location", "$rootScope", function (n, a, i) {
var s = n.document;
function o(e) {
if (e) {
e.scrollIntoView();
var t = function () {
var e = r.yOffset;
if (he(e)) e = e(); else if (T(e)) {
var t = e[0];
e = "fixed" !== n.getComputedStyle(t).position ? 0 : t.getBoundingClientRect().bottom
} else w(e) || (e = 0);
return e
}();
if (t) {
var a = e.getBoundingClientRect().top;
n.scrollBy(0, a - t)
}
} else n.scrollTo(0, 0)
}
function r(e) {
var t;
(e = ge(e) ? e : a.hash()) ? (t = s.getElementById(e)) ? o(t) : (t = function (e) {
var t = null;
return Array.prototype.some.call(e, function (e) {
if ("a" === we(e)) return t = e, !0
}), t
}(s.getElementsByName(e))) ? o(t) : "top" === e && o(null) : o(null)
}
return e && i.$watch(function () {
return a.hash()
}, function (e, t) {
e === t && "" === e || function (e, t) {
"complete" === (t = t || L).document.readyState ? t.setTimeout(e) : ce(t).on("load", e)
}(function () {
i.$evalAsync(r)
})
}), r
}]
}
qt.$$annotate = function (e, t, a) {
var n, i;
if ("function" == typeof e) {
if (!(n = e.$inject)) {
if (n = [], e.length) {
if (t) throw ge(a) && a || (a = e.name || function (e) {
var t = Rt(e);
return t ? "function(" + (t[1] || "").replace(/[\s\r\n]+/, " ") + ")" : "fn"
}(e)), Nt("strictdi", "{0} is not using explicit annotation and cannot be invoked in strict mode", a);
ue(Rt(e)[1].split(Lt), function (e) {
e.replace(Ot, function (e, t, a) {
n.push(a)
})
})
}
e.$inject = n
}
} else fe(e) ? (Me(e[i = e.length - 1], "fn"), n = e.slice(0, i)) : Me(e, "fn", !0);
return n
};
var Vt = $("$animate"), Ft = 1, zt = "ng-animate";
function Ht(e, t) {
return e || t ? e ? t ? (fe(e) && (e = e.join(" ")), fe(t) && (t = t.join(" ")), e + " " + t) : e : t : ""
}
function Wt(e) {
return me(e) ? e : {}
}
function Gt() {
this.$get = q
}
function Qt() {
var c = new Tt, u = [];
this.$get = ["$$AnimateRunner", "$rootScope", function (s, o) {
return {
enabled: q, on: q, off: q, pin: q, push: function (e, t, a, n) {
n && n(), (a = a || {}).from && e.css(a.from), a.to && e.css(a.to), (a.addClass || a.removeClass) && function (e, t, a) {
var n = c.get(e) || {}, i = r(n, t, !0), s = r(n, a, !1);
(i || s) && (c.put(e, n), u.push(e), 1 === u.length && o.$$postDigest(l))
}(e, a.addClass, a.removeClass);
var i = new s;
return i.complete(), i
}
};
function r(t, e, a) {
var n = !1;
return e && ue(e = ge(e) ? e.split(" ") : fe(e) ? e : [], function (e) {
e && (n = !0, t[e] = a)
}), n
}
function l() {
ue(u, function (e) {
var t = c.get(e);
if (t) {
var a = function (e) {
ge(e) && (e = e.split(" "));
var t = Ee();
return ue(e, function (e) {
e.length && (t[e] = !0)
}), t
}(e.attr("class")), n = "", i = "";
ue(t, function (e, t) {
e !== !!a[t] && (e ? n += (n.length ? " " : "") + t : i += (i.length ? " " : "") + t)
}), ue(e, function (e) {
n && ft(e, n), i && gt(e, i)
}), c.remove(e)
}
}), u.length = 0
}
}]
}
function Kt() {
this.$get = ["$$rAF", function (t) {
var a = [];
function n(e) {
a.push(e), 1 < a.length || t(function () {
for (var e = 0; e < a.length; e++) a[e]();
a = []
})
}
return function () {
var t = !1;
return n(function () {
t = !0
}), function (e) {
t ? e() : n(e)
}
}
}]
}
function Jt() {
this.$get = ["$q", "$sniffer", "$$animateAsyncRun", "$document", "$timeout", function (t, e, n, i, s) {
function a(e) {
this.setHost(e);
var a = n();
this._doneCallbacks = [], this._tick = function (e) {
var t = i[0];
t && t.hidden ? function (e) {
s(e, 0, !1)
}(e) : a(e)
}, this._state = 0
}
return a.chain = function (e, a) {
var n = 0;
!function t() {
if (n === e.length) return void a(!0);
e[n](function (e) {
!1 !== e ? (n++, t()) : a(!1)
})
}()
}, a.all = function (t, a) {
var n = 0, i = !0;
function s(e) {
i = i && e, ++n === t.length && a(i)
}
ue(t, function (e) {
e.done(s)
})
}, a.prototype = {
setHost: function (e) {
this.host = e || {}
}, done: function (e) {
2 === this._state ? e() : this._doneCallbacks.push(e)
}, progress: q, getPromise: function () {
if (!this.promise) {
var e = this;
this.promise = t(function (t, a) {
e.done(function (e) {
!1 === e ? a() : t()
})
})
}
return this.promise
}, then: function (e, t) {
return this.getPromise().then(e, t)
}, catch: function (e) {
return this.getPromise().catch(e)
}, finally: function (e) {
return this.getPromise().finally(e)
}, pause: function () {
this.host.pause && this.host.pause()
}, resume: function () {
this.host.resume && this.host.resume()
}, end: function () {
this.host.end && this.host.end(), this._resolve(!0)
}, cancel: function () {
this.host.cancel && this.host.cancel(), this._resolve(!1)
}, complete: function (e) {
var t = this;
0 === t._state && (t._state = 1, t._tick(function () {
t._resolve(e)
}))
}, _resolve: function (t) {
2 !== this._state && (ue(this._doneCallbacks, function (e) {
e(t)
}), this._doneCallbacks.length = 0, this._state = 2)
}
}, a
}]
}
function Zt() {
this.$get = ["$$rAF", "$q", "$$AnimateRunner", function (o, e, r) {
return function (e, t) {
var a = t || {};
a.$$prepared || (a = P(a)), a.cleanupStyles && (a.from = a.to = null), a.from && (e.css(a.from), a.from = null);
var n, i = new r;
return {start: s, end: s};
function s() {
return o(function () {
!function () {
a.addClass && (e.addClass(a.addClass), a.addClass = null);
a.removeClass && (e.removeClass(a.removeClass), a.removeClass = null);
a.to && (e.css(a.to), a.to = null)
}(), n || i.complete(), n = !0
}), i
}
}
}]
}
var Xt = ["$provide", function (n) {
var i = this;
this.$$registeredAnimations = Object.create(null), this.register = function (e, t) {
if (e && "." !== e.charAt(0)) throw Vt("notcsel", "Expecting class selector starting with '.' got '{0}'.", e);
var a = e + "-animation";
i.$$registeredAnimations[e.substr(1)] = a, n.factory(a, t)
}, this.classNameFilter = function (e) {
if (1 === arguments.length && (this.$$classNameFilter = e instanceof RegExp ? e : null, this.$$classNameFilter && new RegExp("(\\s+|\\/)" + zt + "(\\s+|\\/)").test(this.$$classNameFilter.toString()))) throw Vt("nongcls", '$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.', zt);
return this.$$classNameFilter
}, this.$get = ["$$animateQueue", function (s) {
function i(e, t, a) {
if (a) {
var n = function (e) {
for (var t = 0; t < e.length; t++) {
var a = e[t];
if (a.nodeType === Ft) return a
}
}(a);
!n || n.parentNode || n.previousElementSibling || (a = null)
}
a ? a.after(e) : t.prepend(e)
}
return {
on: s.on, off: s.off, pin: s.pin, enabled: s.enabled, cancel: function (e) {
e.end && e.end()
}, enter: function (e, t, a, n) {
return t = t && ce(t), a = a && ce(a), i(e, t = t || a.parent(), a), s.push(e, "enter", Wt(n))
}, move: function (e, t, a, n) {
return t = t && ce(t), a = a && ce(a), i(e, t = t || a.parent(), a), s.push(e, "move", Wt(n))
}, leave: function (e, t) {
return s.push(e, "leave", Wt(t), function () {
e.remove()
})
}, addClass: function (e, t, a) {
return (a = Wt(a)).addClass = Ht(a.addclass, t), s.push(e, "addClass", a)
}, removeClass: function (e, t, a) {
return (a = Wt(a)).removeClass = Ht(a.removeClass, t), s.push(e, "removeClass", a)
}, setClass: function (e, t, a, n) {
return (n = Wt(n)).addClass = Ht(n.addClass, t), n.removeClass = Ht(n.removeClass, a), s.push(e, "setClass", n)
}, animate: function (e, t, a, n, i) {
return (i = Wt(i)).from = i.from ? de(i.from, t) : t, i.to = i.to ? de(i.to, a) : a, n = n || "ng-inline-animate", i.tempClasses = Ht(i.tempClasses, n), s.push(e, "animate", i)
}
}
}]
}];
function ea(s, e, t, o) {
var r = this, l = s.location, c = s.history, n = s.setTimeout, a = s.clearTimeout, i = {};
r.isMock = !1;
var u = 0, d = [];
function p(e) {
try {
e.apply(null, xe(arguments, 1))
} finally {
if (0 === --u) for (; d.length;) try {
d.pop()()
} catch (e) {
t.error(e)
}
}
}
r.$$completeOutstandingRequest = p, r.$$incOutstandingRequestCount = function () {
u++
}, r.notifyWhenNoOutstandingRequests = function (e) {
0 === u ? e() : d.push(e)
};
var m, g, f = l.href, h = e.find("base"), v = null, y = o.history ? function () {
try {
return c.state
} catch (e) {
}
} : q;
x(), g = m, r.url = function (e, t, a) {
if (pe(a) && (a = null), l !== s.location && (l = s.location), c !== s.history && (c = s.history), e) {
var n = g === a;
if (f === e && (!o.history || n)) return r;
var i = f && Ga(f) === Ga(e);
return f = e, g = a, !o.history || i && n ? (i || (v = e), t ? l.replace(e) : i ? l.hash = function (e) {
var t = e.indexOf("#");
return -1 === t ? "" : e.substr(t)
}(e) : l.href = e, l.href !== e && (v = e)) : (c[t ? "replaceState" : "pushState"](a, "", e), x(), g = m), v && (v = e), r
}
return v || l.href.replace(/%27/g, "'")
}, r.state = function () {
return m
};
var b = [], w = !1;
function $() {
v = null, x(), _()
}
var k = null;
function x() {
ke(m = pe(m = y()) ? null : m, k) && (m = k), k = m
}
function _() {
f === r.url() && g === m || (f = r.url(), g = m, ue(b, function (e) {
e(r.url(), m)
}))
}
r.onUrlChange = function (e) {
return w || (o.history && ce(s).on("popstate", $), ce(s).on("hashchange", $), w = !0), b.push(e), e
}, r.$$applicationDestroyed = function () {
ce(s).off("hashchange popstate", $)
}, r.$$checkUrlChange = _, r.baseHref = function () {
var e = h.attr("href");
return e ? e.replace(/^(https?\:)?\/\/[^\/]*/, "") : ""
}, r.defer = function (e, t) {
var a;
return u++, a = n(function () {
delete i[a], p(e)
}, t || 0), i[a] = !0, a
}, r.defer.cancel = function (e) {
return !!i[e] && (delete i[e], a(e), p(q), !0)
}
}
function ta() {
this.$get = ["$window", "$log", "$sniffer", "$document", function (e, t, a, n) {
return new ea(e, n, t, a)
}]
}
function aa() {
this.$get = function () {
var d = {};
function e(e, t) {
if (e in d) throw $("$cacheFactory")("iid", "CacheId '{0}' is already taken!", e);
var a = 0, n = de({}, t, {id: e}), i = Ee(), s = t && t.capacity || Number.MAX_VALUE, o = Ee(),
r = null, l = null;
return d[e] = {
put: function (e, t) {
if (!pe(t)) {
if (s < Number.MAX_VALUE) c(o[e] || (o[e] = {key: e}));
return e in i || a++, i[e] = t, s < a && this.remove(l.key), t
}
}, get: function (e) {
if (s < Number.MAX_VALUE) {
var t = o[e];
if (!t) return;
c(t)
}
return i[e]
}, remove: function (e) {
if (s < Number.MAX_VALUE) {
var t = o[e];
if (!t) return;
t == r && (r = t.p), t == l && (l = t.n), u(t.n, t.p), delete o[e]
}
e in i && (delete i[e], a--)
}, removeAll: function () {
i = Ee(), a = 0, o = Ee(), r = l = null
}, destroy: function () {
o = n = i = null, delete d[e]
}, info: function () {
return de({}, n, {size: a})
}
};
function c(e) {
e != r && (l ? l == e && (l = e.n) : l = e, u(e.n, e.p), u(e, r), (r = e).n = null)
}
function u(e, t) {
e != t && (e && (e.p = t), t && (t.n = e))
}
}
return e.info = function () {
var a = {};
return ue(d, function (e, t) {
a[t] = e.info()
}), a
}, e.get = function (e) {
return d[e]
}, e
}
}
function na() {
this.$get = ["$cacheFactory", function (e) {
return e("templates")
}]
}
var ia = $("$compile");
var sa = new function () {
};
function oa(a, t) {
var g = {}, f = "Directive", P = /^\s*directive\:\s*([\w\-]+)\s+(.*)$/, E = /(([\w\-]+)(?:\:([^;]+))?;?)/,
u = function (e) {
var t, a = {}, n = e.split(",");
for (t = 0; t < n.length; t++) a[n[t]] = !0;
return a
}("ngSrc,ngSrcset,src,srcset"), p = /^(?:(\^\^?)?(\?)?(\^\^?)?)?/, d = /^(on[a-z]+|formaction)$/, r = Ee();
function s(e, n, i) {
var s = /^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/, o = Ee();
return ue(e, function (e, t) {
if (e in r) o[t] = r[e]; else {
var a = e.match(s);
if (!a) throw ia("iscp", "Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}", n, t, e, i ? "controller bindings definition" : "isolate scope definition");
o[t] = {
mode: a[1][0],
collection: "*" === a[2],
optional: "?" === a[3],
attrName: a[4] || t
}, a[4] && (r[e] = o[t])
}
}), o
}
function h(e, t) {
var a = {isolateScope: null, bindToController: null};
if (me(e.scope) && (!0 === e.bindToController ? (a.bindToController = s(e.scope, t, !0), a.isolateScope = {}) : a.isolateScope = s(e.scope, t, !1)), me(e.bindToController) && (a.bindToController = s(e.bindToController, t, !0)), me(a.bindToController)) {
var n = e.controller, i = e.controllerAs;
if (!n) throw ia("noctrl", "Cannot bind to controller without directive '{0}'s controller.", t);
if (!ga(n, i)) throw ia("noident", "Cannot bind to controller without identifier for directive '{0}'.", t)
}
return a
}
this.directive = function e(o, t) {
return De(o, "directive"), ge(o) ? (function (e) {
var t = e.charAt(0);
if (!t || t !== U(t)) throw ia("baddir", "Directive/Component name '{0}' is invalid. The first character must be a lowercase letter", e);
if (e !== e.trim()) throw ia("baddir", "Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces", e)
}(o), Ae(t, "directiveFactory"), g.hasOwnProperty(o) || (g[o] = [], a.factory(o + f, ["$injector", "$exceptionHandler", function (n, i) {
var s = [];
return ue(g[o], function (e, t) {
try {
var a = n.invoke(e);
he(a) ? a = {compile: I(a)} : !a.compile && a.link && (a.compile = I(a.link)), a.priority = a.priority || 0, a.index = t, a.name = a.name || o, a.require = function (e) {
var n = e.require || e.controller && e.name;
return !fe(n) && me(n) && ue(n, function (e, t) {
var a = e.match(p);
e.substring(a[0].length) || (n[t] = a[0] + t)
}), n
}(a), a.restrict = a.restrict || "EA", a.$$moduleName = e.$$moduleName, s.push(a)
} catch (e) {
i(e)
}
}), s
}])), g[o].push(t)) : ue(o, v(e)), this
}, this.component = function (e, i) {
var s = i.controller || function () {
};
function a(n) {
function e(a) {
return he(a) || fe(a) ? function (e, t) {
return n.invoke(a, this, {$element: e, $attrs: t})
} : a
}
var t = i.template || i.templateUrl ? i.template : "", a = {
controller: s,
controllerAs: ga(i.controller) || i.controllerAs || "$ctrl",
template: e(t),
templateUrl: e(i.templateUrl),
transclude: i.transclude,
scope: {},
bindToController: i.bindings || {},
restrict: "E",
require: i.require
};
return ue(i, function (e, t) {
"$" === t.charAt(0) && (a[t] = e)
}), a
}
return ue(i, function (e, t) {
"$" === t.charAt(0) && (a[t] = e, he(s) && (s[t] = e))
}), a.$inject = ["$injector"], this.directive(e, a)
}, this.aHrefSanitizationWhitelist = function (e) {
return V(e) ? (t.aHrefSanitizationWhitelist(e), this) : t.aHrefSanitizationWhitelist()
}, this.imgSrcSanitizationWhitelist = function (e) {
return V(e) ? (t.imgSrcSanitizationWhitelist(e), this) : t.imgSrcSanitizationWhitelist()
};
var c = !0;
this.debugInfoEnabled = function (e) {
return V(e) ? (c = e, this) : c
};
var j = 10;
this.onChangesTtl = function (e) {
return arguments.length ? (j = e, this) : j
}, this.$get = ["$injector", "$interpolate", "$exceptionHandler", "$templateRequest", "$parse", "$controller", "$rootScope", "$sce", "$animate", "$$sanitizeUri", function (m, $, F, e, y, z, s, n, i, v) {
var o, b = /^\w/, w = L.document.createElement("div"), t = j;
function r() {
try {
if (!--t) throw o = void 0, ia("infchng", "{0} $onChanges() iterations reached. Aborting!\n", j);
s.$apply(function () {
for (var e = 0, t = o.length; e < t; ++e) o[e]();
o = void 0
})
} finally {
t++
}
}
function H(e, t) {
if (t) {
var a, n, i, s = Object.keys(t);
for (a = 0, n = s.length; a < n; a++) this[i = s[a]] = t[i]
} else this.$attr = {};
this.$$element = e
}
function A(e, t) {
try {
e.addClass(t)
} catch (e) {
}
}
H.prototype = {
$normalize: ca, $addClass: function (e) {
e && 0 < e.length && i.addClass(this.$$element, e)
}, $removeClass: function (e) {
e && 0 < e.length && i.removeClass(this.$$element, e)
}, $updateClass: function (e, t) {
var a = ua(e, t);
a && a.length && i.addClass(this.$$element, a);
var n = ua(t, e);
n && n.length && i.removeClass(this.$$element, n)
}, $set: function (e, t, a, n) {
var i, s = St(this.$$element[0], e), o = function (e) {
return _t[e]
}(e), r = e;
if (s ? (this.$$element.prop(e, t), n = s) : o && (this[o] = t, r = o), this[e] = t, n ? this.$attr[e] = n : (n = this.$attr[e]) || (this.$attr[e] = n = Ie(e, "-")), "a" === (i = we(this.$$element)) && ("href" === e || "xlinkHref" === e) || "img" === i && "src" === e) this[e] = t = v(t, "src" === e); else if ("img" === i && "srcset" === e && V(t)) {
for (var l = "", c = be(t), u = /\s/.test(c) ? /(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/ : /(,)/, d = c.split(u), p = Math.floor(d.length / 2), m = 0; m < p; m++) {
var g = 2 * m;
l += v(be(d[g]), !0), l += " " + be(d[1 + g])
}
var f = be(d[2 * m]).split(/\s/);
l += v(be(f[0]), !0), 2 === f.length && (l += " " + be(f[1])), this[e] = t = l
}
!1 !== a && (null === t || pe(t) ? this.$$element.removeAttr(n) : b.test(n) ? this.$$element.attr(n, t) : function (e, t, a) {
w.innerHTML = "<span " + t + ">";
var n = w.firstChild.attributes, i = n[0];
n.removeNamedItem(i.name), i.value = a, e.attributes.setNamedItem(i)
}(this.$$element[0], n, t));
var h = this.$$observers;
h && ue(h[r], function (e) {
try {
e(t)
} catch (e) {
F(e)
}
})
}, $observe: function (e, t) {
var a = this, n = a.$$observers || (a.$$observers = Ee()), i = n[e] || (n[e] = []);
return i.push(t), s.$evalAsync(function () {
i.$$inter || !a.hasOwnProperty(e) || pe(a[e]) || t(a[e])
}), function () {
$e(i, t)
}
}
};
var a = $.startSymbol(), l = $.endSymbol(), W = "{{" == a && "}}" == l ? Y : function (e) {
return e.replace(/\{\{/g, a).replace(/}}/g, l)
}, k = /^ngAttr[A-Z]/, x = /^(.+)Start$/;
return G.$$addBindingInfo = c ? function (e, t) {
var a = e.data("$binding") || [];
fe(t) ? a = a.concat(t) : a.push(t), e.data("$binding", a)
} : q, G.$$addBindingClass = c ? function (e) {
A(e, "ng-binding")
} : q, G.$$addScopeInfo = c ? function (e, t, a, n) {
var i = a ? n ? "$isolateScopeNoTemplate" : "$isolateScope" : "$scope";
e.data(i, t)
} : q, G.$$addScopeClass = c ? function (e, t) {
A(e, t ? "ng-isolate-scope" : "ng-scope")
} : q, G.$$createComment = function (e, t) {
var a = "";
return c && (a = " " + (e || "") + ": ", t && (a += t + " ")), L.document.createComment(a)
}, G;
function G(l, e, t, a, c) {
l instanceof ce || (l = ce(l));
for (var n = /\S+/, i = 0, s = l.length; i < s; i++) {
var o = l[i];
o.nodeType === Le && o.nodeValue.match(n) && it(o, l[i] = L.document.createElement("span"))
}
var u = M(l, e, l, t, a, c);
G.$$addScopeClass(l);
var d = null;
return function (e, t, a) {
Ae(e, "scope"), c && c.needsNewScope && (e = e.$parent.$new());
var n, i = (a = a || {}).parentBoundTranscludeFn, s = a.transcludeControllers,
o = a.futureParentElement;
if (i && i.$$boundTransclude && (i = i.$$boundTransclude), d || (d = function (e) {
var t = e && e[0];
return t && "foreignobject" !== we(t) && B.call(t).match(/SVG/) ? "svg" : "html"
}(o)), n = "html" !== d ? ce(ie(d, ce("<div>").append(l).html())) : t ? $t.clone.call(l) : l, s) for (var r in s) n.data("$" + r + "Controller", s[r].instance);
return G.$$addScopeInfo(n, e), t && t(n, e), u && u(e, n, n, i), n
}
}
function M(e, g, t, a, n, i) {
for (var s, o, r, l, c, u, f, h = [], d = 0; d < e.length; d++) s = new H, (r = (o = Q(e[d], [], s, 0 === d ? a : void 0, n)).length ? T(o, e[d], s, g, t, null, [], [], i) : null) && r.scope && G.$$addScopeClass(s.$$element), c = r && r.terminal || !(l = e[d].childNodes) || !l.length ? null : M(l, r ? (r.transcludeOnThisElement || !r.templateOnThisElement) && r.transclude : g), (r || c) && (h.push(d, r, c), u = !0, f = f || r), i = null;
return u ? function (e, t, a, n) {
var i, s, o, r, l, c, u, d, p;
if (f) {
var m = t.length;
for (p = new Array(m), l = 0; l < h.length; l += 3) u = h[l], p[u] = t[u]
} else p = t;
for (l = 0, c = h.length; l < c;) o = p[h[l++]], i = h[l++], s = h[l++], i ? (i.scope ? (r = e.$new(), G.$$addScopeInfo(ce(o), r)) : r = e, d = i.transcludeOnThisElement ? D(e, i.transclude, n) : !i.templateOnThisElement && n ? n : !n && g ? D(e, g) : null, i(s, r, o, a, d)) : s && s(e, o.childNodes, void 0, n)
} : null
}
function D(s, o, r) {
function e(e, t, a, n, i) {
return e || ((e = s.$new(!1, i)).$$transcluded = !0), o(e, t, {
parentBoundTranscludeFn: r,
transcludeControllers: a,
futureParentElement: n
})
}
var t = e.$$slots = Ee();
for (var a in o.$$slots) o.$$slots[a] ? t[a] = D(s, o.$$slots[a], r) : t[a] = null;
return e
}
function Q(e, t, a, n, i) {
var s, o, r = e.nodeType, l = a.$attr;
switch (r) {
case je:
_(t, ca(we(e)), "E", n, i);
for (var c, u, d, p, m, g, f = e.attributes, h = 0, v = f && f.length; h < v; h++) {
var y = !1, b = !1;
u = (c = f[h]).name, m = be(c.value), p = ca(u), (g = k.test(p)) && (u = u.replace(la, "").substr(8).replace(/_(.)/g, function (e, t) {
return t.toUpperCase()
}));
var w = p.match(x);
w && S(w[1]) && (b = (y = u).substr(0, u.length - 5) + "end", u = u.substr(0, u.length - 6)), l[d = ca(u.toLowerCase())] = u, !g && a.hasOwnProperty(d) || (a[d] = m, St(e, d) && (a[d] = !0)), C(e, t, m, d, g), _(t, d, "A", n, i, y, b)
}
if (me(o = e.className) && (o = o.animVal), ge(o) && "" !== o) for (; s = E.exec(o);) _(t, d = ca(s[2]), "C", n, i) && (a[d] = be(s[3])), o = o.substr(s.index + s[0].length);
break;
case Le:
if (11 === N) for (; e.parentNode && e.nextSibling && e.nextSibling.nodeType === Le;) e.nodeValue = e.nodeValue + e.nextSibling.nodeValue, e.parentNode.removeChild(e.nextSibling);
!function (e, t) {
var i = $(t, !0);
i && e.push({
priority: 0, compile: function (e) {
var t = e.parent(), n = !!t.length;
return n && G.$$addBindingClass(t), function (e, t) {
var a = t.parent();
n || G.$$addBindingClass(a), G.$$addBindingInfo(a, i.expressions), e.$watch(i, function (e) {
t[0].nodeValue = e
})
}
}
})
}(t, e.nodeValue);
break;
case Oe:
try {
(s = P.exec(e.nodeValue)) && _(t, d = ca(s[1]), "M", n, i) && (a[d] = be(s[2]))
} catch (e) {
}
}
return t.sort(I), t
}
function K(e, t, a) {
var n = [], i = 0;
if (t && e.hasAttribute && e.hasAttribute(t)) do {
if (!e) throw ia("uterdir", "Unterminated attribute, found '{0}' but no matching '{1}' found.", t, a);
e.nodeType == je && (e.hasAttribute(t) && i++, e.hasAttribute(a) && i--), n.push(e), e = e.nextSibling
} while (0 < i); else n.push(e);
return ce(n)
}
function J(s, o, r) {
return function (e, t, a, n, i) {
return t = K(t[0], o, r), s(e, t, a, n, i)
}
}
function Z(e, t, a, n, i, s) {
var o;
return e ? G(t, a, n, i, s) : function () {
return o || (o = G(t, a, n, i, s), t = a = s = null), o.apply(this, arguments)
}
}
function T(e, $, k, t, a, n, x, _, i) {
i = i || {};
for (var s, o, r, l, c, u = -Number.MAX_VALUE, S = i.newScopeDirective, I = i.controllerDirectives, C = i.newIsolateScopeDirective, A = i.templateDirective, d = i.nonTlbTranscludeDirective, p = !1, m = !1, M = i.hasElementTranscludeDirective, g = k.$$element = ce($), f = n, h = t, v = !1, y = !1, b = 0, w = e.length; b < w; b++) {
var D = (s = e[b]).$$start, T = s.$$end;
if (D && (g = K($, D, T)), r = void 0, u > s.priority) break;
if ((c = s.scope) && (s.templateUrl || (me(c) ? (ne("new/isolated scope", C || S, s, g), C = s) : ne("new/isolated scope", C, s, g)), S = S || s), o = s.name, !v && (s.replace && (s.templateUrl || s.template) || s.transclude && !s.$$tlb)) {
for (var P, E = b + 1; P = e[E++];) if (P.transclude && !P.$$tlb || P.replace && (P.templateUrl || P.template)) {
y = !0;
break
}
v = !0
}
if (!s.templateUrl && s.controller && (c = s.controller, I = I || Ee(), ne("'" + o + "' controller", I[o], s, g), I[o] = s), c = s.transclude) if (p = !0, s.$$tlb || (ne("transclusion", d, s, g), d = s), "element" == c) M = !0, u = s.priority, r = g, g = k.$$element = ce(G.$$createComment(o, k[o])), $ = g[0], se(a, xe(r), $), r[0].$$parentNode = r[0].parentNode, h = Z(y, r, t, u, f && f.name, {nonTlbTranscludeDirective: d}); else {
var j = Ee();
if (r = ce(rt($)).contents(), me(c)) {
r = [];
var L = Ee(), O = Ee();
for (var U in ue(c, function (e, t) {
var a = "?" === e.charAt(0);
e = a ? e.substring(1) : e, L[e] = t, j[t] = null, O[t] = a
}), ue(g.contents(), function (e) {
var t = L[ca(we(e))];
t ? (O[t] = !0, j[t] = j[t] || [], j[t].push(e)) : r.push(e)
}), ue(O, function (e, t) {
if (!e) throw ia("reqslot", "Required transclusion slot `{0}` was not filled.", t)
}), j) j[U] && (j[U] = Z(y, j[U], t))
}
g.empty(), (h = Z(y, r, t, void 0, void 0, {needsNewScope: s.$$isolateScope || s.$$newScope})).$$slots = j
}
if (s.template) if (m = !0, ne("template", A, s, g), c = he((A = s).template) ? s.template(g, k) : s.template, c = W(c), s.replace) {
if (f = s, r = tt(c) ? [] : da(ie(s.templateNamespace, be(c))), $ = r[0], 1 != r.length || $.nodeType !== je) throw ia("tplrt", "Template for directive '{0}' must have exactly one root element. {1}", o, "");
se(a, g, $);
var N = {$attr: {}}, B = Q($, [], N), R = e.splice(b + 1, e.length - (b + 1));
(C || S) && ee(B, C, S), e = e.concat(B).concat(R), te(k, N), w = e.length
} else g.html(c);
if (s.templateUrl) m = !0, ne("template", A, s, g), (A = s).replace && (f = s), V = ae(e.splice(b, e.length - b), g, k, a, p && h, x, _, {
controllerDirectives: I,
newScopeDirective: S !== s && S,
newIsolateScopeDirective: C,
templateDirective: A,
nonTlbTranscludeDirective: d
}), w = e.length; else if (s.compile) try {
l = s.compile(g, k, h);
var q = s.$$originalDirective || s;
he(l) ? Y(null, _e(q, l), D, T) : l && Y(_e(q, l.pre), _e(q, l.post), D, T)
} catch (e) {
F(e, Se(g))
}
s.terminal && (V.terminal = !0, u = Math.max(u, s.priority))
}
return V.scope = S && !0 === S.scope, V.transcludeOnThisElement = p, V.templateOnThisElement = m, V.transclude = h, i.hasElementTranscludeDirective = M, V;
function Y(e, t, a, n) {
e && (a && (e = J(e, a, n)), e.require = s.require, e.directiveName = o, C !== s && !s.$$isolateScope || (e = oe(e, {isolateScope: !0})), x.push(e)), t && (a && (t = J(t, a, n)), t.require = s.require, t.directiveName = o, C !== s && !s.$$isolateScope || (t = oe(t, {isolateScope: !0})), _.push(t))
}
function V(e, t, a, n, o) {
var i, s, r, l, c, u, d, p, m, g;
for (var f in $ === a ? p = (m = k).$$element : m = new H(p = ce(a), k), c = t, C ? l = t.$new(!0) : S && (c = t.$parent), o && ((d = function (e, t, a, n) {
var i;
ve(e) || (n = a, a = t, t = e, e = void 0);
M && (i = u);
a || (a = M ? p.parent() : p);
{
if (!n) return o(e, t, i, a, w);
var s = o.$$slots[n];
if (s) return s(e, t, i, a, w);
if (pe(s)) throw ia("noslot", 'No parent directive that requires a transclusion with slot name "{0}". Element: {1}', n, Se(p))
}
}).$$boundTransclude = o, d.isSlotFilled = function (e) {
return !!o.$$slots[e]
}), I && (u = function (e, t, a, n, i, s, o) {
var r = Ee();
for (var l in n) {
var c = n[l], u = {
$scope: c === o || c.$$isolateScope ? i : s,
$element: e,
$attrs: t,
$transclude: a
}, d = c.controller;
"@" == d && (d = t[c.name]);
var p = z(d, u, !0, c.controllerAs);
r[c.name] = p, e.data("$" + c.name + "Controller", p.instance)
}
return r
}(p, m, d, I, l, t, C)), C && (G.$$addScopeInfo(p, l, !0, !(A && (A === C || A === C.$$originalDirective))), G.$$addScopeClass(p, !0), l.$$isolateBindings = C.$$isolateBindings, (g = le(t, m, l, l.$$isolateBindings, C)).removeWatches && l.$on("$destroy", g.removeWatches)), u) {
var h = I[f], v = u[f], y = h.$$bindings.bindToController;
v.identifier && y ? v.bindingInfo = le(c, m, v.instance, y, h) : v.bindingInfo = {};
var b = v();
b !== v.instance && (v.instance = b, p.data("$" + h.name + "Controller", b), v.bindingInfo.removeWatches && v.bindingInfo.removeWatches(), v.bindingInfo = le(c, m, v.instance, y, h))
}
for (ue(I, function (e, t) {
var a = e.require;
e.bindToController && !fe(a) && me(a) && de(u[t].instance, X(t, a, p, u))
}), ue(u, function (e) {
var t = e.instance;
he(t.$onChanges) && t.$onChanges(e.bindingInfo.initialChanges), he(t.$onInit) && t.$onInit(), he(t.$onDestroy) && c.$on("$destroy", function () {
t.$onDestroy()
})
}), i = 0, s = x.length; i < s; i++) re(r = x[i], r.isolateScope ? l : t, p, m, r.require && X(r.directiveName, r.require, p, u), d);
var w = t;
for (C && (C.template || null === C.templateUrl) && (w = l), e && e(w, a.childNodes, void 0, o), i = _.length - 1; 0 <= i; i--) re(r = _[i], r.isolateScope ? l : t, p, m, r.require && X(r.directiveName, r.require, p, u), d);
ue(u, function (e) {
var t = e.instance;
he(t.$postLink) && t.$postLink()
})
}
}
function X(a, e, n, i) {
var s;
if (ge(e)) {
var t = e.match(p), o = e.substring(t[0].length), r = t[1] || t[3], l = "?" === t[2];
if ("^^" === r ? n = n.parent() : s = (s = i && i[o]) && s.instance, !s) {
var c = "$" + o + "Controller";
s = r ? n.inheritedData(c) : n.data(c)
}
if (!s && !l) throw ia("ctreq", "Controller '{0}', required by directive '{1}', can't be found!", o, a)
} else if (fe(e)) {
s = [];
for (var u = 0, d = e.length; u < d; u++) s[u] = X(a, e[u], n, i)
} else me(e) && (s = {}, ue(e, function (e, t) {
s[t] = X(a, e, n, i)
}));
return s || null
}
function ee(e, t, a) {
for (var n = 0, i = e.length; n < i; n++) e[n] = R(e[n], {$$isolateScope: t, $$newScope: a})
}
function _(e, t, a, n, i, s, o) {
if (t === i) return null;
var r = null;
if (g.hasOwnProperty(t)) for (var l, c = m.get(t + f), u = 0, d = c.length; u < d; u++) try {
if (l = c[u], (pe(n) || n > l.priority) && -1 != l.restrict.indexOf(a)) {
if (s && (l = R(l, {$$start: s, $$end: o})), !l.$$bindings) {
var p = l.$$bindings = h(l, l.name);
me(p.isolateScope) && (l.$$isolateBindings = p.isolateScope)
}
e.push(l), r = l
}
} catch (e) {
F(e)
}
return r
}
function S(e) {
if (g.hasOwnProperty(e)) for (var t = m.get(e + f), a = 0, n = t.length; a < n; a++) if (t[a].multiElement) return !0;
return !1
}
function te(a, n) {
var i = n.$attr, s = a.$attr, o = a.$$element;
ue(a, function (e, t) {
"$" != t.charAt(0) && (n[t] && n[t] !== e && (e += ("style" === t ? ";" : " ") + n[t]), a.$set(t, e, !0, i[t]))
}), ue(n, function (e, t) {
"class" == t ? (A(o, e), a.class = (a.class ? a.class + " " : "") + e) : "style" == t ? (o.attr("style", o.attr("style") + ";" + e), a.style = (a.style ? a.style + ";" : "") + e) : "$" == t.charAt(0) || a.hasOwnProperty(t) || (a[t] = e, s[t] = i[t])
})
}
function ae(p, m, g, f, h, v, y, b) {
var w, $, k = [], x = m[0], _ = p.shift(),
S = R(_, {templateUrl: null, transclude: null, replace: null, $$originalDirective: _}),
I = he(_.templateUrl) ? _.templateUrl(m, g) : _.templateUrl, C = _.templateNamespace;
return m.empty(), e(I).then(function (e) {
var a, t, n, i;
if (e = W(e), _.replace) {
if (n = tt(e) ? [] : da(ie(C, be(e))), a = n[0], 1 != n.length || a.nodeType !== je) throw ia("tplrt", "Template for directive '{0}' must have exactly one root element. {1}", _.name, I);
t = {$attr: {}}, se(f, m, a);
var s = Q(a, [], t);
me(_.scope) && ee(s, !0), p = s.concat(p), te(g, t)
} else a = x, m.html(e);
for (p.unshift(S), w = T(p, a, g, h, m, _, v, y, b), ue(f, function (e, t) {
e == a && (f[t] = m[0])
}), $ = M(m[0].childNodes, h); k.length;) {
var o = k.shift(), r = k.shift(), l = k.shift(), c = k.shift(), u = m[0];
if (!o.$$destroyed) {
if (r !== x) {
var d = r.className;
b.hasElementTranscludeDirective && _.replace || (u = rt(a)), se(l, ce(r), u), A(ce(u), d)
}
i = w.transcludeOnThisElement ? D(o, w.transclude, c) : c, w($, o, u, f, i)
}
}
k = null
}), function (e, t, a, n, i) {
var s = i;
t.$$destroyed || (k ? k.push(t, a, n, s) : (w.transcludeOnThisElement && (s = D(t, w.transclude, i)), w($, t, a, n, s)))
}
}
function I(e, t) {
var a = t.priority - e.priority;
return 0 != a ? a : e.name !== t.name ? e.name < t.name ? -1 : 1 : e.index - t.index
}
function ne(e, t, a, n) {
function i(e) {
return e ? " (module: " + e + ")" : ""
}
if (t) throw ia("multidir", "Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}", t.name, i(t.$$moduleName), a.name, i(a.$$moduleName), e, Se(n))
}
function ie(e, t) {
switch (e = U(e || "html")) {
case"svg":
case"math":
var a = L.document.createElement("div");
return a.innerHTML = "<" + e + ">" + t + "</" + e + ">", a.childNodes[0].childNodes;
default:
return t
}
}
function C(e, t, s, o, r) {
var l = function (e, t) {
if ("srcdoc" == t) return n.HTML;
var a = we(e);
return "xlinkHref" == t || "form" == a && "action" == t || "img" != a && ("src" == t || "ngSrc" == t) ? n.RESOURCE_URL : void 0
}(e, o);
r = u[o] || r;
var c = $(s, !0, l, r);
if (c) {
if ("multiple" === o && "select" === we(e)) throw ia("selmulti", "Binding to the 'multiple' attribute is not supported. Element: {0}", Se(e));
t.push({
priority: 100, compile: function () {
return {
pre: function (e, t, a) {
var n = a.$$observers || (a.$$observers = Ee());
if (d.test(o)) throw ia("nodomevents", "Interpolations for HTML DOM event attributes are disallowed. Please use the ng- versions (such as ng-click instead of onclick) instead.");
var i = a[o];
i !== s && (c = i && $(i, !0, l, r), s = i), c && (a[o] = c(e), (n[o] || (n[o] = [])).$$inter = !0, (a.$$observers && a.$$observers[o].$$scope || e).$watch(c, function (e, t) {
"class" === o && e != t ? a.$updateClass(e, t) : a.$set(o, e)
}))
}
}
}
})
}
}
function se(e, t, a) {
var n, i, s = t[0], o = t.length, r = s.parentNode;
if (e) for (n = 0, i = e.length; n < i; n++) if (e[n] == s) {
e[n++] = a;
for (var l = n, c = l + o - 1, u = e.length; l < u; l++, c++) c < u ? e[l] = e[c] : delete e[l];
e.length -= o - 1, e.context === s && (e.context = a);
break
}
r && r.replaceChild(a, s);
var d = L.document.createDocumentFragment();
for (n = 0; n < o; n++) d.appendChild(t[n]);
for (ce.hasData(s) && (ce.data(a, ce.data(s)), ce(s).off("$destroy")), ce.cleanData(d.querySelectorAll("*")), n = 1; n < o; n++) delete t[n];
t[0] = a, t.length = 1
}
function oe(e, t) {
return de(function () {
return e.apply(null, arguments)
}, e, t)
}
function re(e, t, a, n, i, s) {
try {
e(t, a, n, i, s)
} catch (e) {
F(e, Se(a))
}
}
function le(d, p, m, e, g) {
var n, f = [], h = {};
function v(e, t, a) {
he(m.$onChanges) && t !== a && (o || (d.$$postDigest(r), o = []), n || (n = {}, o.push(i)), n[e] && (a = n[e].previousValue), n[e] = new ra(a, t))
}
function i() {
m.$onChanges(n), n = void 0
}
return ue(e, function (e, a) {
var t, n, i, s, o, r = e.attrName, l = e.optional;
switch (e.mode) {
case"@":
l || O.call(p, r) || (m[a] = p[r] = void 0), p.$observe(r, function (e) {
if (ge(e) || ye(e)) {
var t = m[a];
v(a, e, t), m[a] = e
}
}), p.$$observers[r].$$scope = d, ge(t = p[r]) ? m[a] = $(t)(d) : ye(t) && (m[a] = t), h[a] = new ra(sa, m[a]);
break;
case"=":
if (!O.call(p, r)) {
if (l) break;
p[r] = void 0
}
if (l && !p[r]) break;
n = y(p[r]), s = n.literal ? ke : function (e, t) {
return e === t || e != e && t != t
}, i = n.assign || function () {
throw t = m[a] = n(d), ia("nonassign", "Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!", p[r], r, g.name)
}, t = m[a] = n(d);
var c = function (e) {
return s(e, m[a]) || (s(e, t) ? i(d, e = m[a]) : m[a] = e), t = e
};
c.$stateful = !0, o = e.collection ? d.$watchCollection(p[r], c) : d.$watch(y(p[r], c), null, n.literal), f.push(o);
break;
case"<":
if (!O.call(p, r)) {
if (l) break;
p[r] = void 0
}
if (l && !p[r]) break;
n = y(p[r]);
var u = m[a] = n(d);
h[a] = new ra(sa, m[a]), o = d.$watch(n, function (e, t) {
if (t === e) {
if (t === u) return;
t = u
}
v(a, e, t), m[a] = e
}, n.literal), f.push(o);
break;
case"&":
if ((n = p.hasOwnProperty(r) ? y(p[r]) : q) === q && l) break;
m[a] = function (e) {
return n(d, e)
}
}
}), {
initialChanges: h, removeWatches: f.length && function () {
for (var e = 0, t = f.length; e < t; ++e) f[e]()
}
}
}
}]
}
function ra(e, t) {
this.previousValue = e, this.currentValue = t
}
oa.$inject = ["$provide", "$$sanitizeUriProvider"], ra.prototype.isFirstChange = function () {
return this.previousValue === sa
};
var la = /^((?:x|data)[\:\-_])/i;
function ca(e) {
return Qe(e.replace(la, ""))
}
function ua(e, t) {
var a = "", n = e.split(/\s+/), i = t.split(/\s+/);
e:for (var s = 0; s < n.length; s++) {
for (var o = n[s], r = 0; r < i.length; r++) if (o == i[r]) continue e;
a += (0 < a.length ? " " : "") + o
}
return a
}
function da(e) {
var t = (e = ce(e)).length;
if (t <= 1) return e;
for (; t--;) {
e[t].nodeType === Oe && a.call(e, t, 1)
}
return e
}
var pa = $("$controller"), ma = /^(\S+)(\s+as\s+([\w$]+))?$/;
function ga(e, t) {
if (t && ge(t)) return t;
if (ge(e)) {
var a = ma.exec(e);
if (a) return a[3]
}
}
function fa() {
var p = {}, m = !1;
this.has = function (e) {
return p.hasOwnProperty(e)
}, this.register = function (e, t) {
De(e, "controller"), me(e) ? de(p, e) : p[e] = t
}, this.allowGlobals = function () {
m = !0
}, this.$get = ["$injector", "$window", function (c, u) {
return function (t, a, e, n) {
var i, s, o, r;
if (e = !0 === e, n && ge(n) && (r = n), ge(t)) {
if (!(s = t.match(ma))) throw pa("ctrlfmt", "Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.", t);
o = s[1], r = r || s[3], Me(t = p.hasOwnProperty(o) ? p[o] : Te(a.$scope, o, !0) || (m ? Te(u, o, !0) : void 0), o, !0)
}
if (e) {
var l = (fe(t) ? t[t.length - 1] : t).prototype;
return i = Object.create(l || null), r && d(a, r, i, o || t.name), de(function () {
var e = c.invoke(t, i, a, o);
return e !== i && (me(e) || he(e)) && (i = e, r && d(a, r, i, o || t.name)), i
}, {instance: i, identifier: r})
}
return i = c.instantiate(t, a, o), r && d(a, r, i, o || t.name), i
};
function d(e, t, a, n) {
if (!e || !me(e.$scope)) throw $("$controller")("noscp", "Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.", n, t);
e.$scope[t] = a
}
}]
}
function ha() {
this.$get = ["$window", function (e) {
return ce(e.document)
}]
}
function va() {
this.$get = ["$log", function (a) {
return function (e, t) {
a.error.apply(a, arguments)
}
}]
}
function ya() {
this.$get = ["$document", function (t) {
return function (e) {
return e ? !e.nodeType && e instanceof ce && (e = e[0]) : e = t[0].body, e.offsetWidth + 1
}
}]
}
var ba = "application/json", wa = {"Content-Type": ba + ";charset=utf-8"}, $a = /^\[|^\{(?!\{)/,
ka = {"[": /]$/, "{": /}$/}, xa = /^\)\]\}',?\n/, _a = $("$http"), Sa = function (e) {
return function () {
throw _a("legacy", "The method `{0}` on the promise returned from `$http` has been disabled.", e)
}
};
function Ia(e) {
return me(e) ? k(e) ? e.toISOString() : W(e) : e
}
function Ca() {
this.$get = function () {
return function (e) {
if (!e) return "";
var a = [];
return p(e, function (e, t) {
null === e || pe(e) || (fe(e) ? ue(e, function (e) {
a.push(ae(t) + "=" + ae(Ia(e)))
}) : a.push(ae(t) + "=" + ae(Ia(e))))
}), a.join("&")
}
}
}
function Aa() {
this.$get = function () {
return function (e) {
if (!e) return "";
var t = [];
return function a(e, n, i) {
if (null === e || pe(e)) return;
fe(e) ? ue(e, function (e, t) {
a(e, n + "[" + (me(e) ? t : "") + "]")
}) : me(e) && !k(e) ? p(e, function (e, t) {
a(e, n + (i ? "" : "[") + t + (i ? "" : "]"))
}) : t.push(ae(n) + "=" + ae(Ia(e)))
}(e, "", !0), t.join("&")
}
}
}
function Ma(e, t) {
if (ge(e)) {
var a = e.replace(xa, "").trim();
if (a) {
var n = t("Content-Type");
(n && 0 === n.indexOf(ba) || function (e) {
var t = e.match($a);
return t && ka[t[0]].test(e)
}(a)) && (e = G(a))
}
}
return e
}
function Da(e) {
var t, a = Ee();
function n(e, t) {
e && (a[e] = a[e] ? a[e] + ", " + t : t)
}
return ge(e) ? ue(e.split("\n"), function (e) {
t = e.indexOf(":"), n(U(be(e.substr(0, t))), be(e.substr(t + 1)))
}) : me(e) && ue(e, function (e, t) {
n(U(t), be(e))
}), a
}
function Ta(a) {
var n;
return function (e) {
if (n || (n = Da(a)), e) {
var t = n[U(e)];
return void 0 === t && (t = null), t
}
return n
}
}
function Pa(t, a, n, e) {
return he(e) ? e(t, a, n) : (ue(e, function (e) {
t = e(t, a, n)
}), t)
}
function Ea(e) {
return 200 <= e && e < 300
}
function ja() {
var b = this.defaults = {
transformResponse: [Ma],
transformRequest: [function (e) {
return !me(e) || function (e) {
return "[object File]" === B.call(e)
}(e) || function (e) {
return "[object Blob]" === B.call(e)
}(e) || function (e) {
return "[object FormData]" === B.call(e)
}(e) ? e : W(e)
}],
headers: {common: {Accept: "application/json, text/plain, */*"}, post: E(wa), put: E(wa), patch: E(wa)},
xsrfCookieName: "XSRF-TOKEN",
xsrfHeaderName: "X-XSRF-TOKEN",
paramSerializer: "$httpParamSerializer"
}, w = !1;
this.useApplyAsync = function (e) {
return V(e) ? (w = !!e, this) : w
};
var c = !0;
this.useLegacyPromiseExtensions = function (e) {
return V(e) ? (c = !!e, this) : c
};
var t = this.interceptors = [];
this.$get = ["$httpBackend", "$$cookieReader", "$cacheFactory", "$rootScope", "$q", "$injector", function (m, g, e, f, h, r) {
var v = e("$http");
b.paramSerializer = ge(b.paramSerializer) ? r.get(b.paramSerializer) : b.paramSerializer;
var l = [];
function y(e) {
if (!me(e)) throw $("$http")("badreq", "Http request configuration must be an object. Received: {0}", e);
if (!ge(e.url)) throw $("$http")("badreq", "Http request configuration url must be a string. Received: {0}", e.url);
var a = de({
method: "get",
transformRequest: b.transformRequest,
transformResponse: b.transformResponse,
paramSerializer: b.paramSerializer
}, e);
a.headers = function (e) {
var t, a, n, i = b.headers, s = de({}, e.headers);
i = de({}, i.common, i[U(e.method)]);
e:for (t in i) {
for (n in a = U(t), s) if (U(n) === a) continue e;
s[t] = i[t]
}
return function (e, a) {
var n, i = {};
return ue(e, function (e, t) {
he(e) ? null != (n = e(a)) && (i[t] = n) : i[t] = e
}), i
}(s, E(e))
}(e), a.method = u(a.method), a.paramSerializer = ge(a.paramSerializer) ? r.get(a.paramSerializer) : a.paramSerializer;
var t = [function (e) {
var a = e.headers, t = Pa(e.data, Ta(a), void 0, e.transformRequest);
return pe(t) && ue(a, function (e, t) {
"content-type" === U(t) && delete a[t]
}), pe(e.withCredentials) && !pe(b.withCredentials) && (e.withCredentials = b.withCredentials), function (i, e) {
var s, t, o = h.defer(), a = o.promise, n = i.headers, r = function (e, t) {
0 < t.length && (e += (-1 == e.indexOf("?") ? "?" : "&") + t);
return e
}(i.url, i.paramSerializer(i.params));
y.pendingRequests.push(i), a.then(p, p), !i.cache && !b.cache || !1 === i.cache || "GET" !== i.method && "JSONP" !== i.method || (s = me(i.cache) ? i.cache : me(b.cache) ? b.cache : v);
s && (V(t = s.get(r)) ? C(t) ? t.then(d, d) : fe(t) ? u(t[1], t[0], E(t[2]), t[3]) : u(t, 200, {}, "OK") : s.put(r, a));
if (pe(t)) {
var l = Xn(i.url) ? g()[i.xsrfCookieName || b.xsrfCookieName] : void 0;
l && (n[i.xsrfHeaderName || b.xsrfHeaderName] = l), m(i.method, r, e, function (e, t, a, n) {
s && (Ea(e) ? s.put(r, [e, t, Da(a), n]) : s.remove(r));
function i() {
u(t, e, a, n)
}
w ? f.$applyAsync(i) : (i(), f.$$phase || f.$apply())
}, n, i.timeout, i.withCredentials, i.responseType, c(i.eventHandlers), c(i.uploadEventHandlers))
}
return a;
function c(e) {
if (e) {
var t = {};
return ue(e, function (a, e) {
t[e] = function (e) {
function t() {
a(e)
}
w ? f.$applyAsync(t) : f.$$phase ? t() : f.$apply(t)
}
}), t
}
}
function u(e, t, a, n) {
(Ea(t = -1 <= t ? t : 0) ? o.resolve : o.reject)({
data: e,
status: t,
headers: Ta(a),
config: i,
statusText: n
})
}
function d(e) {
u(e.data, e.status, E(e.headers()), e.statusText)
}
function p() {
var e = y.pendingRequests.indexOf(i);
-1 !== e && y.pendingRequests.splice(e, 1)
}
}(e, t).then(o, o)
}, void 0], n = h.when(a);
for (ue(l, function (e) {
(e.request || e.requestError) && t.unshift(e.request, e.requestError), (e.response || e.responseError) && t.push(e.response, e.responseError)
}); t.length;) {
var i = t.shift(), s = t.shift();
n = n.then(i, s)
}
return c ? (n.success = function (t) {
return Me(t, "fn"), n.then(function (e) {
t(e.data, e.status, e.headers, a)
}), n
}, n.error = function (t) {
return Me(t, "fn"), n.then(null, function (e) {
t(e.data, e.status, e.headers, a)
}), n
}) : (n.success = Sa("success"), n.error = Sa("error")), n;
function o(e) {
var t = de({}, e);
return t.data = Pa(e.data, e.headers, e.status, a.transformResponse), Ea(e.status) ? t : h.reject(t)
}
}
return ue(t, function (e) {
l.unshift(ge(e) ? r.get(e) : r.invoke(e))
}), y.pendingRequests = [], function (e) {
ue(arguments, function (a) {
y[a] = function (e, t) {
return y(de({}, t || {}, {method: a, url: e}))
}
})
}("get", "delete", "head", "jsonp"), function (e) {
ue(arguments, function (n) {
y[n] = function (e, t, a) {
return y(de({}, a || {}, {method: n, url: e, data: t}))
}
})
}("post", "put", "patch"), y.defaults = b, y
}]
}
function La() {
this.$get = function () {
return function () {
return new L.XMLHttpRequest
}
}
}
function Oa() {
this.$get = ["$browser", "$window", "$document", "$xhrFactory", function (e, t, a, n) {
return function (v, y, b, w, $) {
return function (e, n, t, i, a, s, o, r, l, c) {
if (v.$$incOutstandingRequestCount(), n = n || v.url(), "jsonp" == U(e)) {
var u = "_" + (w.counter++).toString(36);
w[u] = function (e) {
w[u].data = e, w[u].called = !0
};
var d = function (e, n, i) {
var s = $.createElement("script"), o = null;
return s.type = "text/javascript", s.src = e, s.async = !0, o = function (e) {
Fe(s, "load", o), Fe(s, "error", o), $.body.removeChild(s), s = null;
var t = -1, a = "unknown";
e && ("load" !== e.type || w[n].called || (e = {type: "error"}), a = e.type, t = "error" === e.type ? 404 : 200), i && i(t, a)
}, Ve(s, "load", o), Ve(s, "error", o), $.body.appendChild(s), o
}(n.replace("JSON_CALLBACK", "angular.callbacks." + u), u, function (e, t) {
h(i, e, w[u].data, "", t), w[u] = q
})
} else {
var p = y(e, n);
p.open(e, n, !0), ue(a, function (e, t) {
V(e) && p.setRequestHeader(t, e)
}), p.onload = function () {
var e = p.statusText || "", t = "response" in p ? p.response : p.responseText,
a = 1223 === p.status ? 204 : p.status;
0 === a && (a = t ? 200 : "file" == Zn(n).protocol ? 404 : 0), h(i, a, t, p.getAllResponseHeaders(), e)
};
var m = function () {
h(i, -1, null, null, "")
};
if (p.onerror = m, p.onabort = m, ue(l, function (e, t) {
p.addEventListener(t, e)
}), ue(c, function (e, t) {
p.upload.addEventListener(t, e)
}), o && (p.withCredentials = !0), r) try {
p.responseType = r
} catch (e) {
if ("json" !== r) throw e
}
p.send(pe(t) ? null : t)
}
if (0 < s) var g = b(f, s); else C(s) && s.then(f);
function f() {
d && d(), p && p.abort()
}
function h(e, t, a, n, i) {
V(g) && b.cancel(g), d = p = null, e(t, a, n, i), v.$$completeOutstandingRequest(q)
}
}
}(e, n, e.defer, t.angular.callbacks, a[0])
}]
}
var Ua = S.$interpolateMinErr = $("$interpolate");
function Na() {
var _ = "{{", S = "}}";
this.startSymbol = function (e) {
return e ? (_ = e, this) : _
}, this.endSymbol = function (e) {
return e ? (S = e, this) : S
}, this.$get = ["$parse", "$exceptionHandler", "$sce", function (v, y, b) {
var w = _.length, $ = S.length, t = new RegExp(_.replace(/./g, e), "g"),
a = new RegExp(S.replace(/./g, e), "g");
function e(e) {
return "\\\\\\" + e
}
function k(e) {
return e.replace(t, _).replace(a, S)
}
function x(e, t, a, n) {
var i;
return i = e.$watch(function (e) {
return i(), n(e)
}, t, a)
}
function n(i, e, t, n) {
if (!i.length || -1 === i.indexOf(_)) {
var a;
if (!e) (a = I(k(i))).exp = i, a.expressions = [], a.$$watchDelegate = x;
return a
}
n = !!n;
for (var s, o, r, l = 0, c = [], u = [], d = i.length, p = [], m = []; l < d;) {
if (-1 == (s = i.indexOf(_, l)) || -1 == (o = i.indexOf(S, s + w))) {
l !== d && p.push(k(i.substring(l)));
break
}
l !== s && p.push(k(i.substring(l, s))), r = i.substring(s + w, o), c.push(r), u.push(v(r, h)), l = o + $, m.push(p.length), p.push("")
}
if (t && 1 < p.length && Ua.throwNoconcat(i), !e || c.length) {
var g = function (e) {
for (var t = 0, a = c.length; t < a; t++) {
if (n && pe(e[t])) return;
p[m[t]] = e[t]
}
return p.join("")
}, f = function (e) {
return t ? b.getTrusted(t, e) : b.valueOf(e)
};
return de(function (e) {
var t = 0, a = c.length, n = new Array(a);
try {
for (; t < a; t++) n[t] = u[t](e);
return g(n)
} catch (e) {
y(Ua.interr(i, e))
}
}, {
exp: i, expressions: c, $$watchDelegate: function (n, i) {
var s;
return n.$watchGroup(u, function (e, t) {
var a = g(e);
he(i) && i.call(this, a, e !== t ? s : a, n), s = a
})
}
})
}
function h(e) {
try {
return e = f(e), n && !V(e) ? e : function (e) {
if (null == e) return "";
switch (typeof e) {
case"string":
break;
case"number":
e = "" + e;
break;
default:
e = W(e)
}
return e
}(e)
} catch (e) {
y(Ua.interr(i, e))
}
}
}
return n.startSymbol = function () {
return _
}, n.endSymbol = function () {
return S
}, n
}]
}
function Ba() {
this.$get = ["$rootScope", "$window", "$q", "$$q", "$browser", function (m, g, f, h, v) {
var y = {};
function e(e, t, a, n) {
var i = 4 < arguments.length, s = i ? xe(arguments, 4) : [], o = g.setInterval, r = g.clearInterval,
l = 0, c = V(n) && !n, u = (c ? h : f).defer(), d = u.promise;
return a = V(a) ? a : 0, d.$$intervalId = o(function () {
c ? v.defer(p) : m.$evalAsync(p), u.notify(l++), 0 < a && a <= l && (u.resolve(l), r(d.$$intervalId), delete y[d.$$intervalId]), c || m.$apply()
}, t), y[d.$$intervalId] = u, d;
function p() {
i ? e.apply(null, s) : e(l)
}
}
return e.cancel = function (e) {
return !!(e && e.$$intervalId in y) && (y[e.$$intervalId].reject("canceled"), g.clearInterval(e.$$intervalId), delete y[e.$$intervalId], !0)
}, e
}]
}
Ua.throwNoconcat = function (e) {
throw Ua("noconcat", "Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required. See http://docs.angularjs.org/api/ng.$sce", e)
}, Ua.interr = function (e, t) {
return Ua("interr", "Can't interpolate: {0}\n{1}", e, t.toString())
};
var Ra = /^([^\?#]*)(\?([^#]*))?(#(.*))?$/, qa = {http: 80, https: 443, ftp: 21}, Ya = $("$location");
function Va(e) {
for (var t = e.split("/"), a = t.length; a--;) t[a] = te(t[a]);
return t.join("/")
}
function Fa(e, t) {
var a = Zn(e);
t.$$protocol = a.protocol, t.$$host = a.hostname, t.$$port = f(a.port) || qa[a.protocol] || null
}
function za(e, t) {
var a = "/" !== e.charAt(0);
a && (e = "/" + e);
var n = Zn(e);
t.$$path = decodeURIComponent(a && "/" === n.pathname.charAt(0) ? n.pathname.substring(1) : n.pathname), t.$$search = X(n.search), t.$$hash = decodeURIComponent(n.hash), t.$$path && "/" != t.$$path.charAt(0) && (t.$$path = "/" + t.$$path)
}
function Ha(e, t) {
return 0 === e.lastIndexOf(t, 0)
}
function Wa(e, t) {
if (Ha(t, e)) return t.substr(e.length)
}
function Ga(e) {
var t = e.indexOf("#");
return -1 == t ? e : e.substr(0, t)
}
function Qa(e) {
return e.replace(/(#.+)|#$/, "$1")
}
function Ka(s, o, r) {
this.$$html5 = !0, r = r || "", Fa(s, this), this.$$parse = function (e) {
var t = Wa(o, e);
if (!ge(t)) throw Ya("ipthprfx", 'Invalid url "{0}", missing path prefix "{1}".', e, o);
za(t, this), this.$$path || (this.$$path = "/"), this.$$compose()
}, this.$$compose = function () {
var e = ee(this.$$search), t = this.$$hash ? "#" + te(this.$$hash) : "";
this.$$url = Va(this.$$path) + (e ? "?" + e : "") + t, this.$$absUrl = o + this.$$url.substr(1)
}, this.$$parseLinkUrl = function (e, t) {
return t && "#" === t[0] ? (this.hash(t.slice(1)), !0) : (V(a = Wa(s, e)) ? i = V(a = Wa(r, n = a)) ? o + (Wa("/", a) || a) : s + n : V(a = Wa(o, e)) ? i = o + a : o == e + "/" && (i = o), i && this.$$parse(i), !!i);
var a, n, i
}
}
function Ja(n, i, s) {
Fa(n, this), this.$$parse = function (e) {
var t, a = Wa(n, e) || Wa(i, e);
pe(a) || "#" !== a.charAt(0) ? this.$$html5 ? t = a : (t = "", pe(a) && (n = e, this.replace())) : pe(t = Wa(s, a)) && (t = a), za(t, this), this.$$path = function (e, t, a) {
var n, i = /^\/[A-Z]:(\/.*)/;
Ha(t, a) && (t = t.replace(a, ""));
if (i.exec(t)) return e;
return (n = i.exec(e)) ? n[1] : e
}(this.$$path, t, n), this.$$compose()
}, this.$$compose = function () {
var e = ee(this.$$search), t = this.$$hash ? "#" + te(this.$$hash) : "";
this.$$url = Va(this.$$path) + (e ? "?" + e : "") + t, this.$$absUrl = n + (this.$$url ? s + this.$$url : "")
}, this.$$parseLinkUrl = function (e, t) {
return Ga(n) == Ga(e) && (this.$$parse(e), !0)
}
}
function Za(i, s, o) {
this.$$html5 = !0, Ja.apply(this, arguments), this.$$parseLinkUrl = function (e, t) {
return t && "#" === t[0] ? (this.hash(t.slice(1)), !0) : (i == Ga(e) ? a = e : (n = Wa(s, e)) ? a = i + o + n : s === e + "/" && (a = s), a && this.$$parse(a), !!a);
var a, n
}, this.$$compose = function () {
var e = ee(this.$$search), t = this.$$hash ? "#" + te(this.$$hash) : "";
this.$$url = Va(this.$$path) + (e ? "?" + e : "") + t, this.$$absUrl = i + o + this.$$url
}
}
var Xa = {
$$html5: !1, $$replace: !1, absUrl: en("$$absUrl"), url: function (e) {
if (pe(e)) return this.$$url;
var t = Ra.exec(e);
return !t[1] && "" !== e || this.path(decodeURIComponent(t[1])), (t[2] || t[1] || "" === e) && this.search(t[3] || ""), this.hash(t[5] || ""), this
}, protocol: en("$$protocol"), host: en("$$host"), port: en("$$port"), path: tn("$$path", function (e) {
return "/" == (e = null !== e ? e.toString() : "").charAt(0) ? e : "/" + e
}), search: function (a, e) {
switch (arguments.length) {
case 0:
return this.$$search;
case 1:
if (ge(a) || w(a)) a = a.toString(), this.$$search = X(a); else {
if (!me(a)) throw Ya("isrcharg", "The first argument of the `$location#search()` call must be a string or an object.");
ue(a = P(a, {}), function (e, t) {
null == e && delete a[t]
}), this.$$search = a
}
break;
default:
pe(e) || null === e ? delete this.$$search[a] : this.$$search[a] = e
}
return this.$$compose(), this
}, hash: tn("$$hash", function (e) {
return null !== e ? e.toString() : ""
}), replace: function () {
return this.$$replace = !0, this
}
};
function en(e) {
return function () {
return this[e]
}
}
function tn(t, a) {
return function (e) {
return pe(e) ? this[t] : (this[t] = a(e), this.$$compose(), this)
}
}
function an() {
var f = "", h = {enabled: !1, requireBase: !0, rewriteLinks: !0};
this.hashPrefix = function (e) {
return V(e) ? (f = e, this) : f
}, this.html5Mode = function (e) {
return ye(e) ? (h.enabled = e, this) : me(e) ? (ye(e.enabled) && (h.enabled = e.enabled), ye(e.requireBase) && (h.requireBase = e.requireBase), ye(e.rewriteLinks) && (h.rewriteLinks = e.rewriteLinks), this) : h
}, this.$get = ["$rootScope", "$browser", "$sniffer", "$rootElement", "$window", function (o, r, t, i, s) {
var l, e, a, n = r.baseHref(), c = r.url();
if (h.enabled) {
if (!n && h.requireBase) throw Ya("nobase", "$location in HTML5 mode requires a <base> tag to be present!");
a = function (e) {
return e.substring(0, e.indexOf("/", e.indexOf("//") + 2))
}(c) + (n || "/"), e = t.history ? Ka : Za
} else a = Ga(c), e = Ja;
var u = function (e) {
return e.substr(0, Ga(e).lastIndexOf("/") + 1)
}(a);
(l = new e(a, u, "#" + f)).$$parseLinkUrl(c, c), l.$$state = r.state();
var d = /^\s*(javascript|mailto):/i;
function p(e, t, a) {
var n = l.url(), i = l.$$state;
try {
r.url(e, t, a), l.$$state = r.state()
} catch (e) {
throw l.url(n), l.$$state = i, e
}
}
i.on("click", function (e) {
if (h.rewriteLinks && !e.ctrlKey && !e.metaKey && !e.shiftKey && 2 != e.which && 2 != e.button) {
for (var t = ce(e.target); "a" !== we(t[0]);) if (t[0] === i[0] || !(t = t.parent())[0]) return;
var a = t.prop("href"), n = t.attr("href") || t.attr("xlink:href");
me(a) && "[object SVGAnimatedString]" === a.toString() && (a = Zn(a.animVal).href), d.test(a) || !a || t.attr("target") || e.isDefaultPrevented() || l.$$parseLinkUrl(a, n) && (e.preventDefault(), l.absUrl() != r.url() && (o.$apply(), s.angular["ff-684208-preventDefault"] = !0))
}
}), Qa(l.absUrl()) != Qa(c) && r.url(l.absUrl(), !0);
var m = !0;
return r.onUrlChange(function (n, i) {
pe(Wa(u, n)) ? s.location.href = n : (o.$evalAsync(function () {
var e, t = l.absUrl(), a = l.$$state;
n = Qa(n), l.$$parse(n), l.$$state = i, e = o.$broadcast("$locationChangeStart", n, t, i, a).defaultPrevented, l.absUrl() === n && (e ? (l.$$parse(t), p(t, !1, l.$$state = a)) : (m = !1, g(t, a)))
}), o.$$phase || o.$digest())
}), o.$watch(function () {
var a = Qa(r.url()), e = Qa(l.absUrl()), n = r.state(), i = l.$$replace,
s = a !== e || l.$$html5 && t.history && n !== l.$$state;
(m || s) && (m = !1, o.$evalAsync(function () {
var e = l.absUrl(), t = o.$broadcast("$locationChangeStart", e, a, l.$$state, n).defaultPrevented;
l.absUrl() === e && (t ? (l.$$parse(a), l.$$state = n) : (s && p(e, i, n === l.$$state ? null : l.$$state), g(a, n)))
})), l.$$replace = !1
}), l;
function g(e, t) {
o.$broadcast("$locationChangeSuccess", l.absUrl(), e, l.$$state, t)
}
}]
}
function nn() {
var a = !0, n = this;
this.debugEnabled = function (e) {
return V(e) ? (a = e, this) : a
}, this.$get = ["$window", function (i) {
return {
log: t("log"),
info: t("info"),
warn: t("warn"),
error: t("error"),
debug: (e = t("debug"), function () {
a && e.apply(n, arguments)
})
};
var e;
function t(e) {
var a = i.console || {}, n = a[e] || a.log || q, t = !1;
try {
t = !!n.apply
} catch (e) {
}
return t ? function () {
var t = [];
return ue(arguments, function (e) {
t.push(function (e) {
return e instanceof Error && (e.stack ? e = e.message && -1 === e.stack.indexOf(e.message) ? "Error: " + e.message + "\n" + e.stack : e.stack : e.sourceURL && (e = e.message + "\n" + e.sourceURL + ":" + e.line)), e
}(e))
}), n.apply(a, t)
} : function (e, t) {
n(e, null == t ? "" : t)
}
}
}]
}
ue([Za, Ja, Ka], function (t) {
t.prototype = Object.create(Xa), t.prototype.state = function (e) {
if (!arguments.length) return this.$$state;
if (t !== Ka || !this.$$html5) throw Ya("nostate", "History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");
return this.$$state = pe(e) ? null : e, this
}
});
var sn = $("$parse");
function on(e, t) {
if ("__defineGetter__" === e || "__defineSetter__" === e || "__lookupGetter__" === e || "__lookupSetter__" === e || "__proto__" === e) throw sn("isecfld", "Attempting to access a disallowed field in Angular expressions! Expression: {0}", t);
return e
}
function rn(e) {
return e + ""
}
function ln(e, t) {
if (e) {
if (e.constructor === e) throw sn("isecfn", "Referencing Function in Angular expressions is disallowed! Expression: {0}", t);
if (e.window === e) throw sn("isecwindow", "Referencing the Window in Angular expressions is disallowed! Expression: {0}", t);
if (e.children && (e.nodeName || e.prop && e.attr && e.find)) throw sn("isecdom", "Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}", t);
if (e === Object) throw sn("isecobj", "Referencing Object in Angular expressions is disallowed! Expression: {0}", t)
}
return e
}
var cn = Function.prototype.call, un = Function.prototype.apply, dn = Function.prototype.bind;
function pn(e, t) {
if (e) {
if (e.constructor === e) throw sn("isecfn", "Referencing Function in Angular expressions is disallowed! Expression: {0}", t);
if (e === cn || e === un || e === dn) throw sn("isecff", "Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}", t)
}
}
function mn(e, t) {
if (e && (e === (0).constructor || e === (!1).constructor || e === "".constructor || e === {}.constructor || e === [].constructor || e === Function.constructor)) throw sn("isecaf", "Assigning to a constructor is disallowed! Expression: {0}", t)
}
var gn = Ee();
ue("+ - * / % === !== == != < > <= >= && || ! = |".split(" "), function (e) {
gn[e] = !0
});
var fn = {n: "\n", f: "\f", r: "\r", t: "\t", v: "\v", "'": "'", '"': '"'}, hn = function (e) {
this.options = e
};
hn.prototype = {
constructor: hn, lex: function (e) {
for (this.text = e, this.index = 0, this.tokens = []; this.index < this.text.length;) {
var t = this.text.charAt(this.index);
if ('"' === t || "'" === t) this.readString(t); else if (this.isNumber(t) || "." === t && this.isNumber(this.peek())) this.readNumber(); else if (this.isIdentifierStart(this.peekMultichar())) this.readIdent(); else if (this.is(t, "(){}[].,;:?")) this.tokens.push({
index: this.index,
text: t
}), this.index++; else if (this.isWhitespace(t)) this.index++; else {
var a = t + this.peek(), n = a + this.peek(2), i = gn[t], s = gn[a], o = gn[n];
if (i || s || o) {
var r = o ? n : s ? a : t;
this.tokens.push({index: this.index, text: r, operator: !0}), this.index += r.length
} else this.throwError("Unexpected next character ", this.index, this.index + 1)
}
}
return this.tokens
}, is: function (e, t) {
return -1 !== t.indexOf(e)
}, peek: function (e) {
var t = e || 1;
return this.index + t < this.text.length && this.text.charAt(this.index + t)
}, isNumber: function (e) {
return "0" <= e && e <= "9" && "string" == typeof e
}, isWhitespace: function (e) {
return " " === e || "\r" === e || "\t" === e || "\n" === e || "\v" === e || " " === e
}, isIdentifierStart: function (e) {
return this.options.isIdentifierStart ? this.options.isIdentifierStart(e, this.codePointAt(e)) : this.isValidIdentifierStart(e)
}, isValidIdentifierStart: function (e) {
return "a" <= e && e <= "z" || "A" <= e && e <= "Z" || "_" === e || "$" === e
}, isIdentifierContinue: function (e) {
return this.options.isIdentifierContinue ? this.options.isIdentifierContinue(e, this.codePointAt(e)) : this.isValidIdentifierContinue(e)
}, isValidIdentifierContinue: function (e, t) {
return this.isValidIdentifierStart(e, t) || this.isNumber(e)
}, codePointAt: function (e) {
return 1 === e.length ? e.charCodeAt(0) : (e.charCodeAt(0) << 10) + e.charCodeAt(1) - 56613888
}, peekMultichar: function () {
var e = this.text.charAt(this.index), t = this.peek();
if (!t) return e;
var a = e.charCodeAt(0), n = t.charCodeAt(0);
return 55296 <= a && a <= 56319 && 56320 <= n && n <= 57343 ? e + t : e
}, isExpOperator: function (e) {
return "-" === e || "+" === e || this.isNumber(e)
}, throwError: function (e, t, a) {
a = a || this.index;
var n = V(t) ? "s " + t + "-" + this.index + " [" + this.text.substring(t, a) + "]" : " " + a;
throw sn("lexerr", "Lexer Error: {0} at column{1} in expression [{2}].", e, n, this.text)
}, readNumber: function () {
for (var e = "", t = this.index; this.index < this.text.length;) {
var a = U(this.text.charAt(this.index));
if ("." == a || this.isNumber(a)) e += a; else {
var n = this.peek();
if ("e" == a && this.isExpOperator(n)) e += a; else if (this.isExpOperator(a) && n && this.isNumber(n) && "e" == e.charAt(e.length - 1)) e += a; else {
if (!this.isExpOperator(a) || n && this.isNumber(n) || "e" != e.charAt(e.length - 1)) break;
this.throwError("Invalid exponent")
}
}
this.index++
}
this.tokens.push({index: t, text: e, constant: !0, value: Number(e)})
}, readIdent: function () {
var e = this.index;
for (this.index += this.peekMultichar().length; this.index < this.text.length;) {
var t = this.peekMultichar();
if (!this.isIdentifierContinue(t)) break;
this.index += t.length
}
this.tokens.push({index: e, text: this.text.slice(e, this.index), identifier: !0})
}, readString: function (e) {
var t = this.index;
this.index++;
for (var a = "", n = e, i = !1; this.index < this.text.length;) {
var s = this.text.charAt(this.index);
if (n += s, i) {
if ("u" === s) {
var o = this.text.substring(this.index + 1, this.index + 5);
o.match(/[\da-f]{4}/i) || this.throwError("Invalid unicode escape [\\u" + o + "]"), this.index += 4, a += String.fromCharCode(parseInt(o, 16))
} else {
a += fn[s] || s
}
i = !1
} else if ("\\" === s) i = !0; else {
if (s === e) return this.index++, void this.tokens.push({
index: t,
text: n,
constant: !0,
value: a
});
a += s
}
this.index++
}
this.throwError("Unterminated quote", t)
}
};
var vn = function (e, t) {
this.lexer = e, this.options = t
};
function yn(e, t) {
return void 0 !== e ? e : t
}
function bn(e, t) {
return void 0 === e ? t : void 0 === t ? e : e + t
}
function wn(e, t) {
return !e(t).$stateful
}
function $n(e, t) {
var a, n;
switch (e.type) {
case vn.Program:
a = !0, ue(e.body, function (e) {
$n(e.expression, t), a = a && e.expression.constant
}), e.constant = a;
break;
case vn.Literal:
e.constant = !0, e.toWatch = [];
break;
case vn.UnaryExpression:
$n(e.argument, t), e.constant = e.argument.constant, e.toWatch = e.argument.toWatch;
break;
case vn.BinaryExpression:
$n(e.left, t), $n(e.right, t), e.constant = e.left.constant && e.right.constant, e.toWatch = e.left.toWatch.concat(e.right.toWatch);
break;
case vn.LogicalExpression:
$n(e.left, t), $n(e.right, t), e.constant = e.left.constant && e.right.constant, e.toWatch = e.constant ? [] : [e];
break;
case vn.ConditionalExpression:
$n(e.test, t), $n(e.alternate, t), $n(e.consequent, t), e.constant = e.test.constant && e.alternate.constant && e.consequent.constant, e.toWatch = e.constant ? [] : [e];
break;
case vn.Identifier:
e.constant = !1, e.toWatch = [e];
break;
case vn.MemberExpression:
$n(e.object, t), e.computed && $n(e.property, t), e.constant = e.object.constant && (!e.computed || e.property.constant), e.toWatch = [e];
break;
case vn.CallExpression:
a = !!e.filter && wn(t, e.callee.name), n = [], ue(e.arguments, function (e) {
$n(e, t), a = a && e.constant, e.constant || n.push.apply(n, e.toWatch)
}), e.constant = a, e.toWatch = e.filter && wn(t, e.callee.name) ? n : [e];
break;
case vn.AssignmentExpression:
$n(e.left, t), $n(e.right, t), e.constant = e.left.constant && e.right.constant, e.toWatch = [e];
break;
case vn.ArrayExpression:
a = !0, n = [], ue(e.elements, function (e) {
$n(e, t), a = a && e.constant, e.constant || n.push.apply(n, e.toWatch)
}), e.constant = a, e.toWatch = n;
break;
case vn.ObjectExpression:
a = !0, n = [], ue(e.properties, function (e) {
$n(e.value, t), a = a && e.value.constant && !e.computed, e.value.constant || n.push.apply(n, e.value.toWatch)
}), e.constant = a, e.toWatch = n;
break;
case vn.ThisExpression:
case vn.LocalsExpression:
e.constant = !1, e.toWatch = []
}
}
function kn(e) {
if (1 == e.length) {
var t = e[0].expression, a = t.toWatch;
return 1 !== a.length ? a : a[0] !== t ? a : void 0
}
}
function xn(e) {
return e.type === vn.Identifier || e.type === vn.MemberExpression
}
function _n(e) {
if (1 === e.body.length && xn(e.body[0].expression)) return {
type: vn.AssignmentExpression,
left: e.body[0].expression,
right: {type: vn.NGValueParameter},
operator: "="
}
}
function Sn(e) {
return 0 === e.body.length || 1 === e.body.length && (e.body[0].expression.type === vn.Literal || e.body[0].expression.type === vn.ArrayExpression || e.body[0].expression.type === vn.ObjectExpression)
}
function In(e) {
return e.constant
}
function Cn(e, t) {
this.astBuilder = e, this.$filter = t
}
function An(e, t) {
this.astBuilder = e, this.$filter = t
}
vn.Program = "Program", vn.ExpressionStatement = "ExpressionStatement", vn.AssignmentExpression = "AssignmentExpression", vn.ConditionalExpression = "ConditionalExpression", vn.LogicalExpression = "LogicalExpression", vn.BinaryExpression = "BinaryExpression", vn.UnaryExpression = "UnaryExpression", vn.CallExpression = "CallExpression", vn.MemberExpression = "MemberExpression", vn.Identifier = "Identifier", vn.Literal = "Literal", vn.ArrayExpression = "ArrayExpression", vn.Property = "Property", vn.ObjectExpression = "ObjectExpression", vn.ThisExpression = "ThisExpression", vn.LocalsExpression = "LocalsExpression", vn.NGValueParameter = "NGValueParameter", vn.prototype = {
ast: function (e) {
this.text = e, this.tokens = this.lexer.lex(e);
var t = this.program();
return 0 !== this.tokens.length && this.throwError("is an unexpected token", this.tokens[0]), t
}, program: function () {
for (var e = []; ;) if (0 < this.tokens.length && !this.peek("}", ")", ";", "]") && e.push(this.expressionStatement()), !this.expect(";")) return {
type: vn.Program,
body: e
}
}, expressionStatement: function () {
return {type: vn.ExpressionStatement, expression: this.filterChain()}
}, filterChain: function () {
for (var e = this.expression(); this.expect("|");) e = this.filter(e);
return e
}, expression: function () {
return this.assignment()
}, assignment: function () {
var e = this.ternary();
return this.expect("=") && (e = {
type: vn.AssignmentExpression,
left: e,
right: this.assignment(),
operator: "="
}), e
}, ternary: function () {
var e, t, a = this.logicalOR();
return this.expect("?") && (e = this.expression(), this.consume(":")) ? (t = this.expression(), {
type: vn.ConditionalExpression,
test: a,
alternate: e,
consequent: t
}) : a
}, logicalOR: function () {
for (var e = this.logicalAND(); this.expect("||");) e = {
type: vn.LogicalExpression,
operator: "||",
left: e,
right: this.logicalAND()
};
return e
}, logicalAND: function () {
for (var e = this.equality(); this.expect("&&");) e = {
type: vn.LogicalExpression,
operator: "&&",
left: e,
right: this.equality()
};
return e
}, equality: function () {
for (var e, t = this.relational(); e = this.expect("==", "!=", "===", "!==");) t = {
type: vn.BinaryExpression,
operator: e.text,
left: t,
right: this.relational()
};
return t
}, relational: function () {
for (var e, t = this.additive(); e = this.expect("<", ">", "<=", ">=");) t = {
type: vn.BinaryExpression,
operator: e.text,
left: t,
right: this.additive()
};
return t
}, additive: function () {
for (var e, t = this.multiplicative(); e = this.expect("+", "-");) t = {
type: vn.BinaryExpression,
operator: e.text,
left: t,
right: this.multiplicative()
};
return t
}, multiplicative: function () {
for (var e, t = this.unary(); e = this.expect("*", "/", "%");) t = {
type: vn.BinaryExpression,
operator: e.text,
left: t,
right: this.unary()
};
return t
}, unary: function () {
var e;
return (e = this.expect("+", "-", "!")) ? {
type: vn.UnaryExpression,
operator: e.text,
prefix: !0,
argument: this.unary()
} : this.primary()
}, primary: function () {
var e, t;
for (this.expect("(") ? (e = this.filterChain(), this.consume(")")) : this.expect("[") ? e = this.arrayDeclaration() : this.expect("{") ? e = this.object() : this.selfReferential.hasOwnProperty(this.peek().text) ? e = P(this.selfReferential[this.consume().text]) : this.options.literals.hasOwnProperty(this.peek().text) ? e = {
type: vn.Literal,
value: this.options.literals[this.consume().text]
} : this.peek().identifier ? e = this.identifier() : this.peek().constant ? e = this.constant() : this.throwError("not a primary expression", this.peek()); t = this.expect("(", "[", ".");) "(" === t.text ? (e = {
type: vn.CallExpression,
callee: e,
arguments: this.parseArguments()
}, this.consume(")")) : "[" === t.text ? (e = {
type: vn.MemberExpression,
object: e,
property: this.expression(),
computed: !0
}, this.consume("]")) : "." === t.text ? e = {
type: vn.MemberExpression,
object: e,
property: this.identifier(),
computed: !1
} : this.throwError("IMPOSSIBLE");
return e
}, filter: function (e) {
for (var t = [e], a = {
type: vn.CallExpression,
callee: this.identifier(),
arguments: t,
filter: !0
}; this.expect(":");) t.push(this.expression());
return a
}, parseArguments: function () {
var e = [];
if (")" !== this.peekToken().text) for (; e.push(this.expression()), this.expect(",");) ;
return e
}, identifier: function () {
var e = this.consume();
return e.identifier || this.throwError("is not a valid identifier", e), {type: vn.Identifier, name: e.text}
}, constant: function () {
return {type: vn.Literal, value: this.consume().value}
}, arrayDeclaration: function () {
var e = [];
if ("]" !== this.peekToken().text) do {
if (this.peek("]")) break;
e.push(this.expression())
} while (this.expect(","));
return this.consume("]"), {type: vn.ArrayExpression, elements: e}
}, object: function () {
var e, t = [];
if ("}" !== this.peekToken().text) do {
if (this.peek("}")) break;
e = {
type: vn.Property,
kind: "init"
}, this.peek().constant ? (e.key = this.constant(), e.computed = !1, this.consume(":"), e.value = this.expression()) : this.peek().identifier ? (e.key = this.identifier(), e.computed = !1, this.peek(":") ? (this.consume(":"), e.value = this.expression()) : e.value = e.key) : this.peek("[") ? (this.consume("["), e.key = this.expression(), this.consume("]"), e.computed = !0, this.consume(":"), e.value = this.expression()) : this.throwError("invalid key", this.peek()), t.push(e)
} while (this.expect(","));
return this.consume("}"), {type: vn.ObjectExpression, properties: t}
}, throwError: function (e, t) {
throw sn("syntax", "Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].", t.text, e, t.index + 1, this.text, this.text.substring(t.index))
}, consume: function (e) {
if (0 === this.tokens.length) throw sn("ueoe", "Unexpected end of expression: {0}", this.text);
var t = this.expect(e);
return t || this.throwError("is unexpected, expecting [" + e + "]", this.peek()), t
}, peekToken: function () {
if (0 === this.tokens.length) throw sn("ueoe", "Unexpected end of expression: {0}", this.text);
return this.tokens[0]
}, peek: function (e, t, a, n) {
return this.peekAhead(0, e, t, a, n)
}, peekAhead: function (e, t, a, n, i) {
if (this.tokens.length > e) {
var s = this.tokens[e], o = s.text;
if (o === t || o === a || o === n || o === i || !t && !a && !n && !i) return s
}
return !1
}, expect: function (e, t, a, n) {
var i = this.peek(e, t, a, n);
return !!i && (this.tokens.shift(), i)
}, selfReferential: {this: {type: vn.ThisExpression}, $locals: {type: vn.LocalsExpression}}
}, Cn.prototype = {
compile: function (e, t) {
var i = this, a = this.astBuilder.ast(e);
this.state = {
nextId: 0,
filters: {},
expensiveChecks: t,
fn: {vars: [], body: [], own: {}},
assign: {vars: [], body: [], own: {}},
inputs: []
}, $n(a, i.$filter);
var n, s = "";
if (this.stage = "assign", n = _n(a)) {
this.state.computing = "assign";
var o = this.nextId();
this.recurse(n, o), this.return_(o), s = "fn.assign=" + this.generateFunction("assign", "s,v,l")
}
var r = kn(a.body);
i.stage = "inputs", ue(r, function (e, t) {
var a = "fn" + t;
i.state[a] = {vars: [], body: [], own: {}}, i.state.computing = a;
var n = i.nextId();
i.recurse(e, n), i.return_(n), i.state.inputs.push(a), e.watchId = t
}), this.state.computing = "fn", this.stage = "main", this.recurse(a);
var l = '"' + this.USE + " " + this.STRICT + '";\n' + this.filterPrefix() + "var fn=" + this.generateFunction("fn", "s,l,a,i") + s + this.watchFns() + "return fn;",
c = new Function("$filter", "ensureSafeMemberName", "ensureSafeObject", "ensureSafeFunction", "getStringValue", "ensureSafeAssignContext", "ifDefined", "plus", "text", l)(this.$filter, on, ln, pn, rn, mn, yn, bn, e);
return this.state = this.stage = void 0, c.literal = Sn(a), c.constant = In(a), c
}, USE: "use", STRICT: "strict", watchFns: function () {
var t = [], e = this.state.inputs, a = this;
return ue(e, function (e) {
t.push("var " + e + "=" + a.generateFunction(e, "s"))
}), e.length && t.push("fn.inputs=[" + e.join(",") + "];"), t.join("")
}, generateFunction: function (e, t) {
return "function(" + t + "){" + this.varsPrefix(e) + this.body(e) + "};"
}, filterPrefix: function () {
var a = [], n = this;
return ue(this.state.filters, function (e, t) {
a.push(e + "=$filter(" + n.escape(t) + ")")
}), a.length ? "var " + a.join(",") + ";" : ""
}, varsPrefix: function (e) {
return this.state[e].vars.length ? "var " + this.state[e].vars.join(",") + ";" : ""
}, body: function (e) {
return this.state[e].body.join("")
}, recurse: function (a, t, e, n, i, s) {
var o, r, l, c, u, d = this;
if (n = n || q, !s && V(a.watchId)) return t = t || this.nextId(), void this.if_("i", this.lazyAssign(t, this.computedMember("i", a.watchId)), this.lazyRecurse(a, t, e, n, i, !0));
switch (a.type) {
case vn.Program:
ue(a.body, function (e, t) {
d.recurse(e.expression, void 0, void 0, function (e) {
r = e
}), t !== a.body.length - 1 ? d.current().body.push(r, ";") : d.return_(r)
});
break;
case vn.Literal:
c = this.escape(a.value), this.assign(t, c), n(c);
break;
case vn.UnaryExpression:
this.recurse(a.argument, void 0, void 0, function (e) {
r = e
}), c = a.operator + "(" + this.ifDefined(r, 0) + ")", this.assign(t, c), n(c);
break;
case vn.BinaryExpression:
this.recurse(a.left, void 0, void 0, function (e) {
o = e
}), this.recurse(a.right, void 0, void 0, function (e) {
r = e
}), c = "+" === a.operator ? this.plus(o, r) : "-" === a.operator ? this.ifDefined(o, 0) + a.operator + this.ifDefined(r, 0) : "(" + o + ")" + a.operator + "(" + r + ")", this.assign(t, c), n(c);
break;
case vn.LogicalExpression:
t = t || this.nextId(), d.recurse(a.left, t), d.if_("&&" === a.operator ? t : d.not(t), d.lazyRecurse(a.right, t)), n(t);
break;
case vn.ConditionalExpression:
t = t || this.nextId(), d.recurse(a.test, t), d.if_(t, d.lazyRecurse(a.alternate, t), d.lazyRecurse(a.consequent, t)), n(t);
break;
case vn.Identifier:
t = t || this.nextId(), e && (e.context = "inputs" === d.stage ? "s" : this.assign(this.nextId(), this.getHasOwnProperty("l", a.name) + "?l:s"), e.computed = !1, e.name = a.name), on(a.name), d.if_("inputs" === d.stage || d.not(d.getHasOwnProperty("l", a.name)), function () {
d.if_("inputs" === d.stage || "s", function () {
i && 1 !== i && d.if_(d.not(d.nonComputedMember("s", a.name)), d.lazyAssign(d.nonComputedMember("s", a.name), "{}")), d.assign(t, d.nonComputedMember("s", a.name))
})
}, t && d.lazyAssign(t, d.nonComputedMember("l", a.name))), (d.state.expensiveChecks || Dn(a.name)) && d.addEnsureSafeObject(t), n(t);
break;
case vn.MemberExpression:
o = e && (e.context = this.nextId()) || this.nextId(), t = t || this.nextId(), d.recurse(a.object, o, void 0, function () {
d.if_(d.notNull(o), function () {
i && 1 !== i && d.addEnsureSafeAssignContext(o), a.computed ? (r = d.nextId(), d.recurse(a.property, r), d.getStringValue(r), d.addEnsureSafeMemberName(r), i && 1 !== i && d.if_(d.not(d.computedMember(o, r)), d.lazyAssign(d.computedMember(o, r), "{}")), c = d.ensureSafeObject(d.computedMember(o, r)), d.assign(t, c), e && (e.computed = !0, e.name = r)) : (on(a.property.name), i && 1 !== i && d.if_(d.not(d.nonComputedMember(o, a.property.name)), d.lazyAssign(d.nonComputedMember(o, a.property.name), "{}")), c = d.nonComputedMember(o, a.property.name), (d.state.expensiveChecks || Dn(a.property.name)) && (c = d.ensureSafeObject(c)), d.assign(t, c), e && (e.computed = !1, e.name = a.property.name))
}, function () {
d.assign(t, "undefined")
}), n(t)
}, !!i);
break;
case vn.CallExpression:
t = t || this.nextId(), a.filter ? (r = d.filter(a.callee.name), l = [], ue(a.arguments, function (e) {
var t = d.nextId();
d.recurse(e, t), l.push(t)
}), c = r + "(" + l.join(",") + ")", d.assign(t, c), n(t)) : (r = d.nextId(), o = {}, l = [], d.recurse(a.callee, r, o, function () {
d.if_(d.notNull(r), function () {
d.addEnsureSafeFunction(r), ue(a.arguments, function (e) {
d.recurse(e, d.nextId(), void 0, function (e) {
l.push(d.ensureSafeObject(e))
})
}), c = o.name ? (d.state.expensiveChecks || d.addEnsureSafeObject(o.context), d.member(o.context, o.name, o.computed) + "(" + l.join(",") + ")") : r + "(" + l.join(",") + ")", c = d.ensureSafeObject(c), d.assign(t, c)
}, function () {
d.assign(t, "undefined")
}), n(t)
}));
break;
case vn.AssignmentExpression:
if (r = this.nextId(), o = {}, !xn(a.left)) throw sn("lval", "Trying to assign a value to a non l-value");
this.recurse(a.left, void 0, o, function () {
d.if_(d.notNull(o.context), function () {
d.recurse(a.right, r), d.addEnsureSafeObject(d.member(o.context, o.name, o.computed)), d.addEnsureSafeAssignContext(o.context), c = d.member(o.context, o.name, o.computed) + a.operator + r, d.assign(t, c), n(t || c)
})
}, 1);
break;
case vn.ArrayExpression:
l = [], ue(a.elements, function (e) {
d.recurse(e, d.nextId(), void 0, function (e) {
l.push(e)
})
}), c = "[" + l.join(",") + "]", this.assign(t, c), n(c);
break;
case vn.ObjectExpression:
u = !(l = []), ue(a.properties, function (e) {
e.computed && (u = !0)
}), u ? (t = t || this.nextId(), this.assign(t, "{}"), ue(a.properties, function (e) {
e.computed ? (o = d.nextId(), d.recurse(e.key, o)) : o = e.key.type === vn.Identifier ? e.key.name : "" + e.key.value, r = d.nextId(), d.recurse(e.value, r), d.assign(d.member(t, o, e.computed), r)
})) : (ue(a.properties, function (t) {
d.recurse(t.value, a.constant ? void 0 : d.nextId(), void 0, function (e) {
l.push(d.escape(t.key.type === vn.Identifier ? t.key.name : "" + t.key.value) + ":" + e)
})
}), c = "{" + l.join(",") + "}", this.assign(t, c)), n(t || c);
break;
case vn.ThisExpression:
this.assign(t, "s"), n("s");
break;
case vn.LocalsExpression:
this.assign(t, "l"), n("l");
break;
case vn.NGValueParameter:
this.assign(t, "v"), n("v")
}
}, getHasOwnProperty: function (e, t) {
var a = e + "." + t, n = this.current().own;
return n.hasOwnProperty(a) || (n[a] = this.nextId(!1, e + "&&(" + this.escape(t) + " in " + e + ")")), n[a]
}, assign: function (e, t) {
if (e) return this.current().body.push(e, "=", t, ";"), e
}, filter: function (e) {
return this.state.filters.hasOwnProperty(e) || (this.state.filters[e] = this.nextId(!0)), this.state.filters[e]
}, ifDefined: function (e, t) {
return "ifDefined(" + e + "," + this.escape(t) + ")"
}, plus: function (e, t) {
return "plus(" + e + "," + t + ")"
}, return_: function (e) {
this.current().body.push("return ", e, ";")
}, if_: function (e, t, a) {
if (!0 === e) t(); else {
var n = this.current().body;
n.push("if(", e, "){"), t(), n.push("}"), a && (n.push("else{"), a(), n.push("}"))
}
}, not: function (e) {
return "!(" + e + ")"
}, notNull: function (e) {
return e + "!=null"
}, nonComputedMember: function (e, t) {
return /[$_a-zA-Z][$_a-zA-Z0-9]*/.test(t) ? e + "." + t : e + '["' + t.replace(/[^$_a-zA-Z0-9]/g, this.stringEscapeFn) + '"]'
}, computedMember: function (e, t) {
return e + "[" + t + "]"
}, member: function (e, t, a) {
return a ? this.computedMember(e, t) : this.nonComputedMember(e, t)
}, addEnsureSafeObject: function (e) {
this.current().body.push(this.ensureSafeObject(e), ";")
}, addEnsureSafeMemberName: function (e) {
this.current().body.push(this.ensureSafeMemberName(e), ";")
}, addEnsureSafeFunction: function (e) {
this.current().body.push(this.ensureSafeFunction(e), ";")
}, addEnsureSafeAssignContext: function (e) {
this.current().body.push(this.ensureSafeAssignContext(e), ";")
}, ensureSafeObject: function (e) {
return "ensureSafeObject(" + e + ",text)"
}, ensureSafeMemberName: function (e) {
return "ensureSafeMemberName(" + e + ",text)"
}, ensureSafeFunction: function (e) {
return "ensureSafeFunction(" + e + ",text)"
}, getStringValue: function (e) {
this.assign(e, "getStringValue(" + e + ")")
}, ensureSafeAssignContext: function (e) {
return "ensureSafeAssignContext(" + e + ",text)"
}, lazyRecurse: function (e, t, a, n, i, s) {
var o = this;
return function () {
o.recurse(e, t, a, n, i, s)
}
}, lazyAssign: function (e, t) {
var a = this;
return function () {
a.assign(e, t)
}
}, stringEscapeRegex: /[^ a-zA-Z0-9]/g, stringEscapeFn: function (e) {
return "\\u" + ("0000" + e.charCodeAt(0).toString(16)).slice(-4)
}, escape: function (e) {
if (ge(e)) return "'" + e.replace(this.stringEscapeRegex, this.stringEscapeFn) + "'";
if (w(e)) return e.toString();
if (!0 === e) return "true";
if (!1 === e) return "false";
if (null === e) return "null";
if (void 0 === e) return "undefined";
throw sn("esc", "IMPOSSIBLE")
}, nextId: function (e, t) {
var a = "v" + this.state.nextId++;
return e || this.current().vars.push(a + (t ? "=" + t : "")), a
}, current: function () {
return this.state[this.state.computing]
}
}, An.prototype = {
compile: function (e, t) {
var a, n, i = this, s = this.astBuilder.ast(e);
this.expression = e, this.expensiveChecks = t, $n(s, i.$filter), (a = _n(s)) && (n = this.recurse(a));
var o, r = kn(s.body);
r && (o = [], ue(r, function (e, t) {
var a = i.recurse(e);
e.input = a, o.push(a), e.watchId = t
}));
var l = [];
ue(s.body, function (e) {
l.push(i.recurse(e.expression))
});
var c = 0 === s.body.length ? q : 1 === s.body.length ? l[0] : function (t, a) {
var n;
return ue(l, function (e) {
n = e(t, a)
}), n
};
return n && (c.assign = function (e, t, a) {
return n(e, a, t)
}), o && (c.inputs = o), c.literal = Sn(s), c.constant = In(s), c
}, recurse: function (e, l, t) {
var o, c, u, d = this;
if (e.input) return this.inputs(e.input, e.watchId);
switch (e.type) {
case vn.Literal:
return this.value(e.value, l);
case vn.UnaryExpression:
return c = this.recurse(e.argument), this["unary" + e.operator](c, l);
case vn.BinaryExpression:
case vn.LogicalExpression:
return o = this.recurse(e.left), c = this.recurse(e.right), this["binary" + e.operator](o, c, l);
case vn.ConditionalExpression:
return this["ternary?:"](this.recurse(e.test), this.recurse(e.alternate), this.recurse(e.consequent), l);
case vn.Identifier:
return on(e.name, d.expression), d.identifier(e.name, d.expensiveChecks || Dn(e.name), l, t, d.expression);
case vn.MemberExpression:
return o = this.recurse(e.object, !1, !!t), e.computed || (on(e.property.name, d.expression), c = e.property.name), e.computed && (c = this.recurse(e.property)), e.computed ? this.computedMember(o, c, l, t, d.expression) : this.nonComputedMember(o, c, d.expensiveChecks, l, t, d.expression);
case vn.CallExpression:
return u = [], ue(e.arguments, function (e) {
u.push(d.recurse(e))
}), e.filter && (c = this.$filter(e.callee.name)), e.filter || (c = this.recurse(e.callee, !0)), e.filter ? function (e, t, a, n) {
for (var i = [], s = 0; s < u.length; ++s) i.push(u[s](e, t, a, n));
var o = c.apply(void 0, i, n);
return l ? {context: void 0, name: void 0, value: o} : o
} : function (e, t, a, n) {
var i, s = c(e, t, a, n);
if (null != s.value) {
ln(s.context, d.expression), pn(s.value, d.expression);
for (var o = [], r = 0; r < u.length; ++r) o.push(ln(u[r](e, t, a, n), d.expression));
i = ln(s.value.apply(s.context, o), d.expression)
}
return l ? {value: i} : i
};
case vn.AssignmentExpression:
return o = this.recurse(e.left, !0, 1), c = this.recurse(e.right), function (e, t, a, n) {
var i = o(e, t, a, n), s = c(e, t, a, n);
return ln(i.value, d.expression), mn(i.context), i.context[i.name] = s, l ? {value: s} : s
};
case vn.ArrayExpression:
return u = [], ue(e.elements, function (e) {
u.push(d.recurse(e))
}), function (e, t, a, n) {
for (var i = [], s = 0; s < u.length; ++s) i.push(u[s](e, t, a, n));
return l ? {value: i} : i
};
case vn.ObjectExpression:
return u = [], ue(e.properties, function (e) {
e.computed ? u.push({
key: d.recurse(e.key),
computed: !0,
value: d.recurse(e.value)
}) : u.push({
key: e.key.type === vn.Identifier ? e.key.name : "" + e.key.value,
computed: !1,
value: d.recurse(e.value)
})
}), function (e, t, a, n) {
for (var i = {}, s = 0; s < u.length; ++s) u[s].computed ? i[u[s].key(e, t, a, n)] = u[s].value(e, t, a, n) : i[u[s].key] = u[s].value(e, t, a, n);
return l ? {value: i} : i
};
case vn.ThisExpression:
return function (e) {
return l ? {value: e} : e
};
case vn.LocalsExpression:
return function (e, t) {
return l ? {value: t} : t
};
case vn.NGValueParameter:
return function (e, t, a) {
return l ? {value: a} : a
}
}
}, "unary+": function (s, o) {
return function (e, t, a, n) {
var i = s(e, t, a, n);
return i = V(i) ? +i : 0, o ? {value: i} : i
}
}, "unary-": function (s, o) {
return function (e, t, a, n) {
var i = s(e, t, a, n);
return i = V(i) ? -i : 0, o ? {value: i} : i
}
}, "unary!": function (s, o) {
return function (e, t, a, n) {
var i = !s(e, t, a, n);
return o ? {value: i} : i
}
}, "binary+": function (s, o, r) {
return function (e, t, a, n) {
var i = bn(s(e, t, a, n), o(e, t, a, n));
return r ? {value: i} : i
}
}, "binary-": function (r, l, c) {
return function (e, t, a, n) {
var i = r(e, t, a, n), s = l(e, t, a, n), o = (V(i) ? i : 0) - (V(s) ? s : 0);
return c ? {value: o} : o
}
}, "binary*": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) * o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary/": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) / o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary%": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) % o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary===": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) === o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary!==": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) !== o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary==": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) == o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary!=": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) != o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary<": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) < o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary>": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) > o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary<=": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) <= o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary>=": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) >= o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary&&": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) && o(e, t, a, n);
return r ? {value: i} : i
}
}, "binary||": function (s, o, r) {
return function (e, t, a, n) {
var i = s(e, t, a, n) || o(e, t, a, n);
return r ? {value: i} : i
}
}, "ternary?:": function (s, o, r, l) {
return function (e, t, a, n) {
var i = s(e, t, a, n) ? o(e, t, a, n) : r(e, t, a, n);
return l ? {value: i} : i
}
}, value: function (e, t) {
return function () {
return t ? {context: void 0, name: void 0, value: e} : e
}
}, identifier: function (o, r, l, c, u) {
return function (e, t, a, n) {
var i = t && o in t ? t : e;
c && 1 !== c && i && !i[o] && (i[o] = {});
var s = i ? i[o] : void 0;
return r && ln(s, u), l ? {context: i, name: o, value: s} : s
}
}, computedMember: function (r, l, c, u, d) {
return function (e, t, a, n) {
var i, s, o = r(e, t, a, n);
return null != o && (on(i = rn(i = l(e, t, a, n)), d), u && 1 !== u && (mn(o), o && !o[i] && (o[i] = {})), ln(s = o[i], d)), c ? {
context: o,
name: i,
value: s
} : s
}
}, nonComputedMember: function (o, r, l, c, u, d) {
return function (e, t, a, n) {
var i = o(e, t, a, n);
u && 1 !== u && (mn(i), i && !i[r] && (i[r] = {}));
var s = null != i ? i[r] : void 0;
return (l || Dn(r)) && ln(s, d), c ? {context: i, name: r, value: s} : s
}
}, inputs: function (i, s) {
return function (e, t, a, n) {
return n ? n[s] : i(e, t, a)
}
}
};
var Mn = function (e, t, a) {
this.lexer = e, this.$filter = t, this.options = a, this.ast = new vn(e, a), this.astCompiler = a.csp ? new An(this.ast, t) : new Cn(this.ast, t)
};
function Dn(e) {
return "constructor" == e
}
Mn.prototype = {
constructor: Mn, parse: function (e) {
return this.astCompiler.compile(e, this.options.expensiveChecks)
}
};
var Tn = Object.prototype.valueOf;
function Pn(e) {
return he(e.valueOf) ? e.valueOf() : Tn.call(e)
}
function En() {
var a, n, b = Ee(), w = Ee(), i = {true: !0, false: !1, null: null, undefined: void 0};
this.addLiteral = function (e, t) {
i[e] = t
}, this.setIdentifierFns = function (e, t) {
return a = e, n = t, this
}, this.$get = ["$filter", function (c) {
var e = F().noUnsafeEval, u = {
csp: e,
expensiveChecks: !1,
literals: P(i),
isIdentifierStart: he(a) && a,
isIdentifierContinue: he(n) && n
}, d = {
csp: e,
expensiveChecks: !0,
literals: P(i),
isIdentifierStart: he(a) && a,
isIdentifierContinue: he(n) && n
}, p = !1;
return t.$$runningExpensiveChecks = function () {
return p
}, t;
function t(e, t, a) {
var n, i, s;
switch (a = a || p, typeof e) {
case"string":
e = e.trim();
var o = a ? w : b;
if (!(n = o[s = e])) {
":" === e.charAt(0) && ":" === e.charAt(1) && (i = !0, e = e.substring(2));
var r = a ? d : u, l = new hn(r);
(n = new Mn(l, c, r).parse(e)).constant ? n.$$watchDelegate = v : i ? n.$$watchDelegate = n.literal ? h : f : n.inputs && (n.$$watchDelegate = g), a && (n = function e(s) {
if (!s) return s;
a.$$watchDelegate = s.$$watchDelegate;
a.assign = e(s.assign);
a.constant = s.constant;
a.literal = s.literal;
for (var t = 0; s.inputs && t < s.inputs.length; ++t) s.inputs[t] = e(s.inputs[t]);
a.inputs = s.inputs;
return a;
function a(e, t, a, n) {
var i = p;
p = !0;
try {
return s(e, t, a, n)
} finally {
p = i
}
}
}(n)), o[s] = n
}
return y(n, t);
case"function":
return y(e, t);
default:
return y(q, t)
}
}
function m(e, t) {
return null == e || null == t ? e === t : ("object" != typeof e || "object" != typeof (e = Pn(e))) && (e === t || e != e && t != t)
}
function g(e, t, a, s, n) {
var o, r = s.inputs;
if (1 === r.length) {
var i = m;
return r = r[0], e.$watch(function (e) {
var t = r(e);
return m(t, i) || (o = s(e, void 0, void 0, [t]), i = t && Pn(t)), o
}, t, a, n)
}
for (var l = [], c = [], u = 0, d = r.length; u < d; u++) l[u] = m, c[u] = null;
return e.$watch(function (e) {
for (var t = !1, a = 0, n = r.length; a < n; a++) {
var i = r[a](e);
(t || (t = !m(i, l[a]))) && (c[a] = i, l[a] = i && Pn(i))
}
return t && (o = s(e, void 0, void 0, c)), o
}, t, a, n)
}
function f(e, n, t, a) {
var i, s;
return i = e.$watch(function (e) {
return a(e)
}, function (e, t, a) {
s = e, he(n) && n.apply(this, arguments), V(e) && a.$$postDigest(function () {
V(s) && i()
})
}, t)
}
function h(e, n, t, a) {
var i, s;
return i = e.$watch(function (e) {
return a(e)
}, function (e, t, a) {
s = e, he(n) && n.call(this, e, t, a), o(e) && a.$$postDigest(function () {
o(s) && i()
})
}, t);
function o(e) {
var t = !0;
return ue(e, function (e) {
V(e) || (t = !1)
}), t
}
}
function v(e, t, a, n) {
var i;
return i = e.$watch(function (e) {
return i(), n(e)
}, t, a)
}
function y(o, r) {
if (!r) return o;
var e = o.$$watchDelegate, s = !1, t = e !== h && e !== f ? function (e, t, a, n) {
var i = s && n ? n[0] : o(e, t, a, n);
return r(i, e, t)
} : function (e, t, a, n) {
var i = o(e, t, a, n), s = r(i, e, t);
return V(i) ? s : i
};
return o.$$watchDelegate && o.$$watchDelegate !== g ? t.$$watchDelegate = o.$$watchDelegate : r.$stateful || (t.$$watchDelegate = g, s = !o.inputs, t.inputs = o.inputs ? o.inputs : [o]), t
}
}]
}
function jn() {
this.$get = ["$rootScope", "$exceptionHandler", function (t, e) {
return On(function (e) {
t.$evalAsync(e)
}, e)
}]
}
function Ln() {
this.$get = ["$browser", "$exceptionHandler", function (t, e) {
return On(function (e) {
t.defer(e)
}, e)
}]
}
function On(t, o) {
var a = $("$q", TypeError);
function e() {
this.$$state = {status: 0}
}
function s(t, a) {
return function (e) {
a.call(t, e)
}
}
function r(e) {
!e.processScheduled && e.pending && (e.processScheduled = !0, t(function () {
!function (e) {
var t, a, n;
n = e.pending, e.processScheduled = !1, e.pending = void 0;
for (var i = 0, s = n.length; i < s; ++i) {
a = n[i][0], t = n[i][e.status];
try {
he(t) ? a.resolve(t(e.value)) : 1 === e.status ? a.resolve(e.value) : a.reject(e.value)
} catch (e) {
a.reject(e), o(e)
}
}
}(e)
}))
}
function l() {
this.promise = new e
}
de(e.prototype, {
then: function (e, t, a) {
if (pe(e) && pe(t) && pe(a)) return this;
var n = new l;
return this.$$state.pending = this.$$state.pending || [], this.$$state.pending.push([n, e, t, a]), 0 < this.$$state.status && r(this.$$state), n.promise
}, catch: function (e) {
return this.then(null, e)
}, finally: function (t, e) {
return this.then(function (e) {
return n(e, !0, t)
}, function (e) {
return n(e, !1, t)
}, e)
}
}), de(l.prototype, {
resolve: function (e) {
this.promise.$$state.status || (e === this.promise ? this.$$reject(a("qcycle", "Expected promise to be resolved with value other than itself '{0}'", e)) : this.$$resolve(e))
}, $$resolve: function (e) {
var t, a = this, n = !1;
try {
(me(e) || he(e)) && (t = e && e.then), he(t) ? (this.promise.$$state.status = -1, t.call(e, function (e) {
if (n) return;
n = !0, a.$$resolve(e)
}, i, s(this, this.notify))) : (this.promise.$$state.value = e, this.promise.$$state.status = 1, r(this.promise.$$state))
} catch (e) {
i(e), o(e)
}
function i(e) {
n || (n = !0, a.$$reject(e))
}
}, reject: function (e) {
this.promise.$$state.status || this.$$reject(e)
}, $$reject: function (e) {
this.promise.$$state.value = e, this.promise.$$state.status = 2, r(this.promise.$$state)
}, notify: function (i) {
var s = this.promise.$$state.pending;
this.promise.$$state.status <= 0 && s && s.length && t(function () {
for (var e, t, a = 0, n = s.length; a < n; a++) {
t = s[a][0], e = s[a][3];
try {
t.notify(he(e) ? e(i) : i)
} catch (e) {
o(e)
}
}
})
}
});
function i(e, t) {
var a = new l;
return t ? a.resolve(e) : a.reject(e), a.promise
}
function c(e, t, a, n) {
var i = new l;
return i.resolve(e), i.promise.then(t, a, n)
}
var n = function (e, t, a) {
var n = null;
try {
he(a) && (n = a())
} catch (e) {
return i(e, !1)
}
return C(n) ? n.then(function () {
return i(e, t)
}, function (e) {
return i(e, !1)
}) : i(e, t)
}, u = c;
function d(e) {
if (!he(e)) throw a("norslvr", "Expected resolverFn, got '{0}'", e);
var t = new l;
return e(function (e) {
t.resolve(e)
}, function (e) {
t.reject(e)
}), t.promise
}
return d.prototype = e.prototype, d.defer = function () {
var e = new l;
return e.resolve = s(e, e.resolve), e.reject = s(e, e.reject), e.notify = s(e, e.notify), e
}, d.reject = function (e) {
var t = new l;
return t.reject(e), t.promise
}, d.when = c, d.resolve = u, d.all = function (e) {
var a = new l, n = 0, i = fe(e) ? [] : {};
return ue(e, function (e, t) {
n++, c(e).then(function (e) {
i.hasOwnProperty(t) || (i[t] = e, --n || a.resolve(i))
}, function (e) {
i.hasOwnProperty(t) || a.reject(e)
})
}), 0 === n && a.resolve(i), a.promise
}, d
}
function Un() {
this.$get = ["$window", "$timeout", function (e, a) {
var n = e.requestAnimationFrame || e.webkitRequestAnimationFrame,
i = e.cancelAnimationFrame || e.webkitCancelAnimationFrame || e.webkitCancelRequestAnimationFrame,
t = !!n, s = t ? function (e) {
var t = n(e);
return function () {
i(t)
}
} : function (e) {
var t = a(e, 16.66, !1);
return function () {
a.cancel(t)
}
};
return s.supported = t, s
}]
}
function Nn() {
var _ = 10, S = $("$rootScope"), I = null, C = null;
this.digestTtl = function (e) {
return arguments.length && (_ = e), _
}, this.$get = ["$exceptionHandler", "$parse", "$browser", function (m, g, f) {
function n(e) {
e.currentScope.$$destroyed = !0
}
function i() {
this.$id = A(), this.$$phase = this.$parent = this.$$watchers = this.$$nextSibling = this.$$prevSibling = this.$$childHead = this.$$childTail = null, (this.$root = this).$$destroyed = !1, this.$$listeners = {}, this.$$listenerCount = {}, this.$$watchersCount = 0, this.$$isolateBindings = null
}
i.prototype = {
constructor: i, $new: function (e, t) {
var a;
return t = t || this, e ? (a = new i).$root = this.$root : (this.$$ChildScope || (this.$$ChildScope = function (e) {
function t() {
this.$$watchers = this.$$nextSibling = this.$$childHead = this.$$childTail = null, this.$$listeners = {}, this.$$listenerCount = {}, this.$$watchersCount = 0, this.$id = A(), this.$$ChildScope = null
}
return t.prototype = e, t
}(this)), a = new this.$$ChildScope), a.$parent = t, a.$$prevSibling = t.$$childTail, t.$$childHead ? (t.$$childTail.$$nextSibling = a, t.$$childTail = a) : t.$$childHead = t.$$childTail = a, !e && t == this || a.$on("$destroy", n), a
}, $watch: function (e, t, a, n) {
var i = g(e);
if (i.$$watchDelegate) return i.$$watchDelegate(this, t, a, i, e);
var s = this, o = s.$$watchers, r = {fn: t, last: k, get: i, exp: n || e, eq: !!a};
return I = null, he(t) || (r.fn = q), o || (o = s.$$watchers = []), o.unshift(r), l(this, 1), function () {
0 <= $e(o, r) && l(s, -1), I = null
}
}, $watchGroup: function (e, n) {
var i = new Array(e.length), s = new Array(e.length), o = [], r = this, l = !1, t = !0;
if (!e.length) {
var a = !0;
return r.$evalAsync(function () {
a && n(s, s, r)
}), function () {
a = !1
}
}
if (1 === e.length) return this.$watch(e[0], function (e, t, a) {
s[0] = e, i[0] = t, n(s, e === t ? s : i, a)
});
function c() {
l = !1, t ? (t = !1, n(s, s, r)) : n(s, i, r)
}
return ue(e, function (e, a) {
var t = r.$watch(e, function (e, t) {
s[a] = e, i[a] = t, l || (l = !0, r.$evalAsync(c))
});
o.push(t)
}), function () {
for (; o.length;) o.shift()()
}
}, $watchCollection: function (e, a) {
m.$stateful = !0;
var o, r, n, i = this, s = 1 < a.length, l = 0, t = g(e, m), c = [], u = {}, d = !0, p = 0;
function m(e) {
var t, a, n, i;
if (!pe(o = e)) {
if (me(o)) if (j(o)) {
r !== c && (p = (r = c).length = 0, l++), t = o.length, p !== t && (l++, r.length = p = t);
for (var s = 0; s < t; s++) i = r[s], n = o[s], i != i && n != n || i === n || (l++, r[s] = n)
} else {
for (a in r !== u && (r = u = {}, p = 0, l++), t = 0, o) O.call(o, a) && (t++, n = o[a], i = r[a], a in r ? i != i && n != n || i === n || (l++, r[a] = n) : (p++, r[a] = n, l++));
if (t < p) for (a in l++, r) O.call(o, a) || (p--, delete r[a])
} else r !== o && (r = o, l++);
return l
}
}
return this.$watch(t, function () {
if (d ? (d = !1, a(o, o, i)) : a(o, n, i), s) if (me(o)) if (j(o)) {
n = new Array(o.length);
for (var e = 0; e < o.length; e++) n[e] = o[e]
} else for (var t in n = {}, o) O.call(o, t) && (n[t] = o[t]); else n = o
})
}, $digest: function () {
var e, t, a, n, i, s, o, r, l, c, u = _, d = [];
w("$digest"), f.$$checkUrlChange(), this === h && null !== C && (f.defer.cancel(C), x()), I = null;
do {
s = !1, r = this;
for (var p = 0; p < v.length; p++) {
try {
(c = v[p]).scope.$eval(c.expression, c.locals)
} catch (e) {
m(e)
}
I = null
}
v.length = 0;
e:do {
if (n = r.$$watchers) for (i = n.length; i--;) try {
if (e = n[i]) if ((t = (0, e.get)(r)) === (a = e.last) || (e.eq ? ke(t, a) : "number" == typeof t && "number" == typeof a && isNaN(t) && isNaN(a))) {
if (e === I) {
s = !1;
break e
}
} else s = !0, (I = e).last = e.eq ? P(t, null) : t, (0, e.fn)(t, a === k ? t : a, r), u < 5 && (d[l = 4 - u] || (d[l] = []), d[l].push({
msg: he(e.exp) ? "fn: " + (e.exp.name || e.exp.toString()) : e.exp,
newVal: t,
oldVal: a
}))
} catch (e) {
m(e)
}
if (!(o = r.$$watchersCount && r.$$childHead || r !== this && r.$$nextSibling)) for (; r !== this && !(o = r.$$nextSibling);) r = r.$parent
} while (r = o);
if ((s || v.length) && !u--) throw $(), S("infdig", "{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}", _, d)
} while (s || v.length);
for ($(); b < y.length;) try {
y[b++]()
} catch (e) {
m(e)
}
y.length = b = 0
}, $destroy: function () {
if (!this.$$destroyed) {
var e = this.$parent;
for (var t in this.$broadcast("$destroy"), this.$$destroyed = !0, this === h && f.$$applicationDestroyed(), l(this, -this.$$watchersCount), this.$$listenerCount) s(this, this.$$listenerCount[t], t);
e && e.$$childHead == this && (e.$$childHead = this.$$nextSibling), e && e.$$childTail == this && (e.$$childTail = this.$$prevSibling), this.$$prevSibling && (this.$$prevSibling.$$nextSibling = this.$$nextSibling), this.$$nextSibling && (this.$$nextSibling.$$prevSibling = this.$$prevSibling), this.$destroy = this.$digest = this.$apply = this.$evalAsync = this.$applyAsync = q, this.$on = this.$watch = this.$watchGroup = function () {
return q
}, this.$$listeners = {}, this.$$nextSibling = null, function e(t) {
9 === N && (t.$$childHead && e(t.$$childHead), t.$$nextSibling && e(t.$$nextSibling)), t.$parent = t.$$nextSibling = t.$$prevSibling = t.$$childHead = t.$$childTail = t.$root = t.$$watchers = null
}(this)
}
}, $eval: function (e, t) {
return g(e)(this, t)
}, $evalAsync: function (e, t) {
h.$$phase || v.length || f.defer(function () {
v.length && h.$digest()
}), v.push({scope: this, expression: g(e), locals: t})
}, $$postDigest: function (e) {
y.push(e)
}, $apply: function (e) {
try {
w("$apply");
try {
return this.$eval(e)
} finally {
$()
}
} catch (e) {
m(e)
} finally {
try {
h.$digest()
} catch (e) {
throw m(e), e
}
}
}, $applyAsync: function (e) {
var t = this;
e && a.push(function () {
t.$eval(e)
}), e = g(e), null === C && (C = f.defer(function () {
h.$apply(x)
}))
}, $on: function (t, a) {
var n = this.$$listeners[t];
n || (this.$$listeners[t] = n = []), n.push(a);
for (var e = this; e.$$listenerCount[t] || (e.$$listenerCount[t] = 0), e.$$listenerCount[t]++, e = e.$parent;) ;
var i = this;
return function () {
var e = n.indexOf(a);
-1 !== e && (n[e] = null, s(i, 1, t))
}
}, $emit: function (e, t) {
var a, n, i, s = [], o = this, r = !1, l = {
name: e, targetScope: o, stopPropagation: function () {
r = !0
}, preventDefault: function () {
l.defaultPrevented = !0
}, defaultPrevented: !1
}, c = H([l], arguments, 1);
do {
for (a = o.$$listeners[e] || s, l.currentScope = o, n = 0, i = a.length; n < i; n++) if (a[n]) try {
a[n].apply(null, c)
} catch (e) {
m(e)
} else a.splice(n, 1), n--, i--;
if (r) return l.currentScope = null, l;
o = o.$parent
} while (o);
return l.currentScope = null, l
}, $broadcast: function (e, t) {
var a = this, n = a, i = a, s = {
name: e, targetScope: a, preventDefault: function () {
s.defaultPrevented = !0
}, defaultPrevented: !1
};
if (!a.$$listenerCount[e]) return s;
for (var o, r, l, c = H([s], arguments, 1); n = i;) {
for (r = 0, l = (o = (s.currentScope = n).$$listeners[e] || []).length; r < l; r++) if (o[r]) try {
o[r].apply(null, c)
} catch (e) {
m(e)
} else o.splice(r, 1), r--, l--;
if (!(i = n.$$listenerCount[e] && n.$$childHead || n !== a && n.$$nextSibling)) for (; n !== a && !(i = n.$$nextSibling);) n = n.$parent
}
return s.currentScope = null, s
}
};
var h = new i, v = h.$$asyncQueue = [], y = h.$$postDigestQueue = [], a = h.$$applyAsyncQueue = [], b = 0;
return h;
function w(e) {
if (h.$$phase) throw S("inprog", "{0} already in progress", h.$$phase);
h.$$phase = e
}
function $() {
h.$$phase = null
}
function l(e, t) {
for (; e.$$watchersCount += t, e = e.$parent;) ;
}
function s(e, t, a) {
for (; e.$$listenerCount[a] -= t, 0 === e.$$listenerCount[a] && delete e.$$listenerCount[a], e = e.$parent;) ;
}
function k() {
}
function x() {
for (; a.length;) try {
a.shift()()
} catch (e) {
m(e)
}
C = null
}
}]
}
function Bn() {
var i = /^\s*(https?|ftp|mailto|tel|file):/, s = /^\s*((https?|ftp|file|blob):|data:image\/)/;
this.aHrefSanitizationWhitelist = function (e) {
return V(e) ? (i = e, this) : i
}, this.imgSrcSanitizationWhitelist = function (e) {
return V(e) ? (s = e, this) : s
}, this.$get = function () {
return function (e, t) {
var a, n = t ? s : i;
return "" === (a = Zn(e).href) || a.match(n) ? e : "unsafe:" + a
}
}
}
var Rn = $("$sce"), qn = {HTML: "html", CSS: "css", URL: "url", RESOURCE_URL: "resourceUrl", JS: "js"};
function Yn(e) {
var t = [];
return V(e) && ue(e, function (e) {
t.push(function (e) {
if ("self" === e) return e;
if (ge(e)) {
if (-1 < e.indexOf("***")) throw Rn("iwcard", "Illegal sequence *** in string matcher. String: {0}", e);
return e = D(e).replace("\\*\\*", ".*").replace("\\*", "[^:/.?&;]*"), new RegExp("^" + e + "$")
}
if (x(e)) return new RegExp("^" + e.source + "$");
throw Rn("imatcher", 'Matchers may only be "self", string patterns or RegExp objects')
}(e))
}), t
}
function Vn() {
this.SCE_CONTEXTS = qn;
var o = ["self"], r = [];
this.resourceUrlWhitelist = function (e) {
return arguments.length && (o = Yn(e)), o
}, this.resourceUrlBlacklist = function (e) {
return arguments.length && (r = Yn(e)), r
}, this.$get = ["$injector", function (e) {
var n = function (e) {
throw Rn("unsafe", "Attempting to use an unsafe value in a safe context.")
};
function s(e, t) {
return "self" === e ? Xn(t) : !!e.exec(t.href)
}
function t(e) {
function t(e) {
this.$$unwrapTrustedValue = function () {
return e
}
}
return e && (t.prototype = new e), t.prototype.valueOf = function () {
return this.$$unwrapTrustedValue()
}, t.prototype.toString = function () {
return this.$$unwrapTrustedValue().toString()
}, t
}
e.has("$sanitize") && (n = e.get("$sanitize"));
var a = t(), i = {};
return i[qn.HTML] = t(a), i[qn.CSS] = t(a), i[qn.URL] = t(a), i[qn.JS] = t(a), i[qn.RESOURCE_URL] = t(i[qn.URL]), {
trustAs: function (e, t) {
var a = i.hasOwnProperty(e) ? i[e] : null;
if (!a) throw Rn("icontext", "Attempted to trust a value in invalid context. Context: {0}; Value: {1}", e, t);
if (null === t || pe(t) || "" === t) return t;
if ("string" != typeof t) throw Rn("itype", "Attempted to trust a non-string value in a content requiring a string: Context: {0}", e);
return new a(t)
}, getTrusted: function (e, t) {
if (null === t || pe(t) || "" === t) return t;
var a = i.hasOwnProperty(e) ? i[e] : null;
if (a && t instanceof a) return t.$$unwrapTrustedValue();
if (e === qn.RESOURCE_URL) {
if (function (e) {
var t, a, n = Zn(e.toString()), i = !1;
for (t = 0, a = o.length; t < a; t++) if (s(o[t], n)) {
i = !0;
break
}
if (i) for (t = 0, a = r.length; t < a; t++) if (s(r[t], n)) {
i = !1;
break
}
return i
}(t)) return t;
throw Rn("insecurl", "Blocked loading resource from url not allowed by $sceDelegate policy. URL: {0}", t.toString())
}
if (e === qn.HTML) return n(t);
throw Rn("unsafe", "Attempting to use an unsafe value in a safe context.")
}, valueOf: function (e) {
return e instanceof a ? e.$$unwrapTrustedValue() : e
}
}
}]
}
function Fn() {
var t = !0;
this.enabled = function (e) {
return arguments.length && (t = !!e), t
}, this.$get = ["$parse", "$sceDelegate", function (n, e) {
if (t && N < 8) throw Rn("iequirks", "Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode. You can fix this by adding the text <!doctype html> to the top of your HTML document. See http://docs.angularjs.org/api/ng.$sce for more information.");
var i = E(qn);
i.isEnabled = function () {
return t
}, i.trustAs = e.trustAs, i.getTrusted = e.getTrusted, i.valueOf = e.valueOf, t || (i.trustAs = i.getTrusted = function (e, t) {
return t
}, i.valueOf = Y), i.parseAs = function (t, e) {
var a = n(e);
return a.literal && a.constant ? a : n(e, function (e) {
return i.getTrusted(t, e)
})
};
var s = i.parseAs, o = i.getTrusted, r = i.trustAs;
return ue(qn, function (t, e) {
var a = U(e);
i[Qe("parse_as_" + a)] = function (e) {
return s(t, e)
}, i[Qe("get_trusted_" + a)] = function (e) {
return o(t, e)
}, i[Qe("trust_as_" + a)] = function (e) {
return r(t, e)
}
}), i
}]
}
function zn() {
this.$get = ["$window", "$document", function (e, t) {
var a, n, i = {},
s = !(e.chrome && e.chrome.app && e.chrome.app.runtime) && e.history && e.history.pushState,
o = f((/android (\d+)/.exec(U((e.navigator || {}).userAgent)) || [])[1]),
r = /Boxee/i.test((e.navigator || {}).userAgent), l = t[0] || {}, c = /^(Moz|webkit|ms)(?=[A-Z])/,
u = l.body && l.body.style, d = !1, p = !1;
if (u) {
for (var m in u) if (n = c.exec(m)) {
a = (a = n[0])[0].toUpperCase() + a.substr(1);
break
}
a || (a = "WebkitOpacity" in u && "webkit"), d = !!("transition" in u || a + "Transition" in u), p = !!("animation" in u || a + "Animation" in u), !o || d && p || (d = ge(u.webkitTransition), p = ge(u.webkitAnimation))
}
return {
history: !(!s || o < 4 || r), hasEvent: function (e) {
if ("input" === e && N <= 11) return !1;
if (pe(i[e])) {
var t = l.createElement("div");
i[e] = "on" + e in t
}
return i[e]
}, csp: F(), vendorPrefix: a, transitions: d, animations: p, android: o
}
}]
}
var Hn = $("$compile");
function Wn() {
var l;
this.httpOptions = function (e) {
return e ? (l = e, this) : l
}, this.$get = ["$templateCache", "$http", "$q", "$sce", function (n, i, s, o) {
function r(t, a) {
r.totalPendingRequests++, ge(t) && !pe(n.get(t)) || (t = o.getTrustedResourceUrl(t));
var e = i.defaults && i.defaults.transformResponse;
return fe(e) ? e = e.filter(function (e) {
return e !== Ma
}) : e === Ma && (e = null), i.get(t, de({cache: n, transformResponse: e}, l)).finally(function () {
r.totalPendingRequests--
}).then(function (e) {
return n.put(t, e.data), e.data
}, function (e) {
if (a) return s.reject(e);
throw Hn("tpload", "Failed to load template: {0} (HTTP status: {1} {2})", t, e.status, e.statusText)
})
}
return r.totalPendingRequests = 0, r
}]
}
function Gn() {
this.$get = ["$rootScope", "$browser", "$location", function (t, a, n) {
var e = {
findBindings: function (e, a, n) {
var t = e.getElementsByClassName("ng-binding"), i = [];
return ue(t, function (t) {
var e = S.element(t).data("$binding");
e && ue(e, function (e) {
n ? new RegExp("(^|\\s)" + D(a) + "(\\s|\\||$)").test(e) && i.push(t) : -1 != e.indexOf(a) && i.push(t)
})
}), i
}, findModels: function (e, t, a) {
for (var n = ["ng-", "data-ng-", "ng\\:"], i = 0; i < n.length; ++i) {
var s = "[" + n[i] + "model" + (a ? "=" : "*=") + '"' + t + '"]', o = e.querySelectorAll(s);
if (o.length) return o
}
}, getLocation: function () {
return n.url()
}, setLocation: function (e) {
e !== n.url() && (n.url(e), t.$digest())
}, whenStable: function (e) {
a.notifyWhenNoOutstandingRequests(e)
}
};
return e
}]
}
function Qn() {
this.$get = ["$rootScope", "$browser", "$q", "$$q", "$exceptionHandler", function (l, c, u, d, p) {
var m = {};
function e(e, t, a) {
he(e) || (a = t, t = e, e = q);
var n, i = xe(arguments, 3), s = V(a) && !a, o = (s ? d : u).defer(), r = o.promise;
return n = c.defer(function () {
try {
o.resolve(e.apply(null, i))
} catch (e) {
o.reject(e), p(e)
} finally {
delete m[r.$$timeoutId]
}
s || l.$apply()
}, t), r.$$timeoutId = n, m[n] = o, r
}
return e.cancel = function (e) {
return !!(e && e.$$timeoutId in m) && (m[e.$$timeoutId].reject("canceled"), delete m[e.$$timeoutId], c.defer.cancel(e.$$timeoutId))
}, e
}]
}
var Kn = L.document.createElement("a"), Jn = Zn(L.location.href);
function Zn(e) {
var t = e;
return N && (Kn.setAttribute("href", t), t = Kn.href), Kn.setAttribute("href", t), {
href: Kn.href,
protocol: Kn.protocol ? Kn.protocol.replace(/:$/, "") : "",
host: Kn.host,
search: Kn.search ? Kn.search.replace(/^\?/, "") : "",
hash: Kn.hash ? Kn.hash.replace(/^#/, "") : "",
hostname: Kn.hostname,
port: Kn.port,
pathname: "/" === Kn.pathname.charAt(0) ? Kn.pathname : "/" + Kn.pathname
}
}
function Xn(e) {
var t = ge(e) ? Zn(e) : e;
return t.protocol === Jn.protocol && t.host === Jn.host
}
function ei() {
this.$get = I(L)
}
function ti(e) {
var o = e[0] || {}, r = {}, l = "";
function c(t) {
try {
return decodeURIComponent(t)
} catch (e) {
return t
}
}
return function () {
var e, t, a, n, i, s = o.cookie || "";
if (s !== l) for (e = (l = s).split("; "), r = {}, a = 0; a < e.length; a++) 0 < (n = (t = e[a]).indexOf("=")) && (i = c(t.substring(0, n)), pe(r[i]) && (r[i] = c(t.substring(n + 1))));
return r
}
}
function ai() {
this.$get = ti
}
function ni(n) {
var i = "Filter";
function s(e, t) {
if (me(e)) {
var a = {};
return ue(e, function (e, t) {
a[t] = s(t, e)
}), a
}
return n.factory(e + i, t)
}
this.register = s, this.$get = ["$injector", function (t) {
return function (e) {
return t.get(e + i)
}
}], s("currency", ui), s("date", ki), s("filter", ii), s("json", xi), s("limitTo", Ii), s("lowercase", _i), s("number", di), s("orderBy", Ci), s("uppercase", Si)
}
function ii() {
return function (e, t, a) {
if (!j(e)) {
if (null == e) return e;
throw $("filter")("notarray", "Expected array but received: {0}", e)
}
var n, i;
switch (oi(t)) {
case"function":
n = t;
break;
case"boolean":
case"null":
case"number":
case"string":
i = !0;
case"object":
n = function (t, a, n) {
var i = me(t) && "$" in t;
!0 === a ? a = ke : he(a) || (a = function (e, t) {
return !pe(e) && (null === e || null === t ? e === t : !(me(t) || me(e) && !y(e)) && (e = U("" + e), t = U("" + t), -1 !== e.indexOf(t)))
});
return function (e) {
return i && !me(e) ? si(e, t.$, a, !1) : si(e, t, a, n)
}
}(t, a, i);
break;
default:
return e
}
return Array.prototype.filter.call(e, n)
}
}
function si(e, t, a, n, i) {
var s = oi(e), o = oi(t);
if ("string" === o && "!" === t.charAt(0)) return !si(e, t.substring(1), a, n);
if (fe(e)) return e.some(function (e) {
return si(e, t, a, n)
});
switch (s) {
case"object":
var r;
if (n) {
for (r in e) if ("$" !== r.charAt(0) && si(e[r], t, a, !0)) return !0;
return !i && si(e, t, a, !1)
}
if ("object" !== o) return a(e, t);
for (r in t) {
var l = t[r];
if (!he(l) && !pe(l)) {
var c = "$" === r;
if (!si(c ? e : e[r], l, a, c, c)) return !1
}
}
return !0;
case"function":
return !1;
default:
return a(e, t)
}
}
function oi(e) {
return null === e ? "null" : typeof e
}
ti.$inject = ["$document"], ni.$inject = ["$provide"];
var ri = 22, li = ".", ci = "0";
function ui(e) {
var n = e.NUMBER_FORMATS;
return function (e, t, a) {
return pe(t) && (t = n.CURRENCY_SYM), pe(a) && (a = n.PATTERNS[1].maxFrac), null == e ? e : pi(e, n.PATTERNS[1], n.GROUP_SEP, n.DECIMAL_SEP, a).replace(/\u00A4/g, t)
}
}
function di(e) {
var a = e.NUMBER_FORMATS;
return function (e, t) {
return null == e ? e : pi(e, a.PATTERNS[0], a.GROUP_SEP, a.DECIMAL_SEP, t)
}
}
function pi(e, t, a, n, i) {
if (!ge(e) && !w(e) || isNaN(e)) return "";
var s, o = !isFinite(e), r = !1, l = Math.abs(e) + "", c = "";
if (o) c = "∞"; else {
(function (e, t, a, n) {
var i = e.d, s = i.length - e.i, o = (t = pe(t) ? Math.min(Math.max(a, s), n) : +t) + e.i, r = i[o];
if (0 < o) {
i.splice(Math.max(e.i, o));
for (var l = o; l < i.length; l++) i[l] = 0
} else {
s = Math.max(0, s), e.i = 1, i.length = Math.max(1, o = t + 1), i[0] = 0;
for (var c = 1; c < o; c++) i[c] = 0
}
if (5 <= r) if (o - 1 < 0) {
for (var u = 0; o < u; u--) i.unshift(0), e.i++;
i.unshift(1), e.i++
} else i[o - 1]++;
for (; s < Math.max(0, t); s++) i.push(0);
var d = i.reduceRight(function (e, t, a, n) {
return t += e, n[a] = t % 10, Math.floor(t / 10)
}, 0);
d && (i.unshift(d), e.i++)
})(s = function (e) {
var t, a, n, i, s, o = 0;
for (-1 < (a = e.indexOf(li)) && (e = e.replace(li, "")), 0 < (n = e.search(/e/i)) ? (a < 0 && (a = n), a += +e.slice(n + 1), e = e.substring(0, n)) : a < 0 && (a = e.length), n = 0; e.charAt(n) == ci; n++) ;
if (n == (s = e.length)) t = [0], a = 1; else {
for (s--; e.charAt(s) == ci;) s--;
for (a -= n, t = [], i = 0; n <= s; n++, i++) t[i] = +e.charAt(n)
}
return ri < a && (t = t.splice(0, ri - 1), o = a - 1, a = 1), {d: t, e: o, i: a}
}(l), i, t.minFrac, t.maxFrac);
var u = s.d, d = s.i, p = s.e, m = [];
for (r = u.reduce(function (e, t) {
return e && !t
}, !0); d < 0;) u.unshift(0), d++;
0 < d ? m = u.splice(d, u.length) : (m = u, u = [0]);
var g = [];
for (u.length >= t.lgSize && g.unshift(u.splice(-t.lgSize, u.length).join("")); u.length > t.gSize;) g.unshift(u.splice(-t.gSize, u.length).join(""));
u.length && g.unshift(u.join("")), c = g.join(a), m.length && (c += n + m.join("")), p && (c += "e+" + p)
}
return e < 0 && !r ? t.negPre + c + t.negSuf : t.posPre + c + t.posSuf
}
function mi(e, t, a, n) {
var i = "";
for ((e < 0 || n && e <= 0) && (n ? e = 1 - e : (e = -e, i = "-")), e = "" + e; e.length < t;) e = ci + e;
return a && (e = e.substr(e.length - t)), i + e
}
function gi(a, n, i, s, o) {
return i = i || 0, function (e) {
var t = e["get" + a]();
return (0 < i || -i < t) && (t += i), 0 === t && -12 == i && (t = 12), mi(t, n, s, o)
}
}
function fi(n, i, s) {
return function (e, t) {
var a = e["get" + n]();
return t[u((s ? "STANDALONE" : "") + (i ? "SHORT" : "") + n)][a]
}
}
function hi(e) {
var t = new Date(e, 0, 1).getDay();
return new Date(e, 0, (t <= 4 ? 5 : 12) - t)
}
function vi(n) {
return function (e) {
var t = hi(e.getFullYear()), a = +function (e) {
return new Date(e.getFullYear(), e.getMonth(), e.getDate() + (4 - e.getDay()))
}(e) - +t;
return mi(1 + Math.round(a / 6048e5), n)
}
}
function yi(e, t) {
return e.getFullYear() <= 0 ? t.ERAS[0] : t.ERAS[1]
}
ui.$inject = ["$locale"];
var bi = {
yyyy: gi("FullYear", 4, 0, !(di.$inject = ["$locale"]), !0),
yy: gi("FullYear", 2, 0, !0, !0),
y: gi("FullYear", 1, 0, !1, !0),
MMMM: fi("Month"),
MMM: fi("Month", !0),
MM: gi("Month", 2, 1),
M: gi("Month", 1, 1),
LLLL: fi("Month", !1, !0),
dd: gi("Date", 2),
d: gi("Date", 1),
HH: gi("Hours", 2),
H: gi("Hours", 1),
hh: gi("Hours", 2, -12),
h: gi("Hours", 1, -12),
mm: gi("Minutes", 2),
m: gi("Minutes", 1),
ss: gi("Seconds", 2),
s: gi("Seconds", 1),
sss: gi("Milliseconds", 3),
EEEE: fi("Day"),
EEE: fi("Day", !0),
a: function (e, t) {
return e.getHours() < 12 ? t.AMPMS[0] : t.AMPMS[1]
},
Z: function (e, t, a) {
var n = -1 * a, i = 0 <= n ? "+" : "";
return i += mi(Math[0 < n ? "floor" : "ceil"](n / 60), 2) + mi(Math.abs(n % 60), 2)
},
ww: vi(2),
w: vi(1),
G: yi,
GG: yi,
GGG: yi,
GGGG: function (e, t) {
return e.getFullYear() <= 0 ? t.ERANAMES[0] : t.ERANAMES[1]
}
}, wi = /((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/, $i = /^\-?\d+$/;
function ki(l) {
var d = /^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;
return function (t, e, a) {
var n, i, s = "", o = [];
if (e = e || "mediumDate", e = l.DATETIME_FORMATS[e] || e, ge(t) && (t = $i.test(t) ? f(t) : function (e) {
var t;
if (t = e.match(d)) {
var a = new Date(0), n = 0, i = 0, s = t[8] ? a.setUTCFullYear : a.setFullYear,
o = t[8] ? a.setUTCHours : a.setHours;
t[9] && (n = f(t[9] + t[10]), i = f(t[9] + t[11])), s.call(a, f(t[1]), f(t[2]) - 1, f(t[3]));
var r = f(t[4] || 0) - n, l = f(t[5] || 0) - i, c = f(t[6] || 0),
u = Math.round(1e3 * parseFloat("0." + (t[7] || 0)));
return o.call(a, r, l, c, u), a
}
return e
}(t)), w(t) && (t = new Date(t)), !k(t) || !isFinite(t.getTime())) return t;
for (; e;) e = (i = wi.exec(e)) ? (o = H(o, i, 1)).pop() : (o.push(e), null);
var r = t.getTimezoneOffset();
return a && (r = K(a, r), t = J(t, a, !0)), ue(o, function (e) {
n = bi[e], s += n ? n(t, l.DATETIME_FORMATS, r) : "''" === e ? "'" : e.replace(/(^'|'$)/g, "").replace(/''/g, "'")
}), s
}
}
function xi() {
return function (e, t) {
return pe(t) && (t = 2), W(e, t)
}
}
ki.$inject = ["$locale"];
var _i = I(U), Si = I(u);
function Ii() {
return function (e, t, a) {
return t = Math.abs(Number(t)) === 1 / 0 ? Number(t) : f(t), isNaN(t) ? e : (w(e) && (e = e.toString()), fe(e) || ge(e) ? (a = (a = !a || isNaN(a) ? 0 : f(a)) < 0 ? Math.max(0, e.length + a) : a, 0 <= t ? e.slice(a, a + t) : 0 === a ? e.slice(t, e.length) : e.slice(Math.max(0, a + t), a)) : e)
}
}
function Ci(o) {
return function (e, t, a) {
if (null == e) return e;
if (!j(e)) throw $("orderBy")("notarray", "Expected array but received: {0}", e);
fe(t) || (t = [t]), 0 === t.length && (t = ["+"]);
var s = function (e, i) {
return i = i ? -1 : 1, e.map(function (e) {
var t = 1, a = Y;
if (he(e)) a = e; else if (ge(e) && ("+" != e.charAt(0) && "-" != e.charAt(0) || (t = "-" == e.charAt(0) ? -1 : 1, e = e.substring(1)), "" !== e && (a = o(e)).constant)) {
var n = a();
a = function (e) {
return e[n]
}
}
return {get: a, descending: t * i}
})
}(t, a);
s.push({
get: function () {
return {}
}, descending: a ? -1 : 1
});
var n = Array.prototype.map.call(e, function (t, a) {
return {
value: t, predicateValues: s.map(function (e) {
return function (e, t) {
var a = typeof e;
null === e ? (a = "string", e = "null") : "string" === a ? e = e.toLowerCase() : "object" === a && (e = function (e, t) {
if ("function" == typeof e.valueOf && i(e = e.valueOf())) return e;
if (y(e) && i(e = e.toString())) return e;
return t
}(e, t));
return {value: e, type: a}
}(e.get(t), a)
})
}
});
return n.sort(function (e, t) {
for (var a = 0, n = 0, i = s.length; n < i && !(a = r(e.predicateValues[n], t.predicateValues[n]) * s[n].descending); ++n) ;
return a
}), e = n.map(function (e) {
return e.value
})
};
function i(e) {
switch (typeof e) {
case"number":
case"boolean":
case"string":
return !0;
default:
return !1
}
}
function r(e, t) {
var a = 0;
return e.type === t.type ? e.value !== t.value && (a = e.value < t.value ? -1 : 1) : a = e.type < t.type ? -1 : 1, a
}
}
function Ai(e) {
return he(e) && (e = {link: e}), e.restrict = e.restrict || "AC", I(e)
}
Ci.$inject = ["$parse"];
var Mi = I({
restrict: "E", compile: function (e, t) {
if (!t.href && !t.xlinkHref) return function (e, t) {
if ("a" === t[0].nodeName.toLowerCase()) {
var a = "[object SVGAnimatedString]" === B.call(t.prop("href")) ? "xlink:href" : "href";
t.on("click", function (e) {
t.attr(a) || e.preventDefault()
})
}
}
}
}), Di = {};
ue(kt, function (e, n) {
if ("multiple" != e) {
var i = ca("ng-" + n), t = s;
"checked" === e && (t = function (e, t, a) {
a.ngModel !== a[i] && s(e, 0, a)
}), Di[i] = function () {
return {restrict: "A", priority: 100, link: t}
}
}
function s(e, t, a) {
e.$watch(a[i], function (e) {
a.$set(n, !!e)
})
}
}), ue(_t, function (e, i) {
Di[i] = function () {
return {
priority: 100, link: function (e, t, a) {
if ("ngPattern" === i && "/" == a.ngPattern.charAt(0)) {
var n = a.ngPattern.match(s);
if (n) return void a.$set("ngPattern", new RegExp(n[1], n[2]))
}
e.$watch(a[i], function (e) {
a.$set(i, e)
})
}
}
}
}), ue(["src", "srcset", "href"], function (s) {
var o = ca("ng-" + s);
Di[o] = function () {
return {
priority: 99, link: function (e, t, a) {
var n = s, i = s;
"href" === s && "[object SVGAnimatedString]" === B.call(t.prop("href")) && (i = "xlinkHref", a.$attr[i] = "xlink:href", n = null), a.$observe(o, function (e) {
e ? (a.$set(i, e), N && n && t.prop(n, a[i])) : "href" === s && a.$set(i, null)
})
}
}
}
});
var Ti = {
$addControl: q, $$renameControl: function (e, t) {
e.$name = t
}, $removeControl: q, $setValidity: q, $setDirty: q, $setPristine: q, $setSubmitted: q
}, Pi = "ng-submitted";
function Ei(e, t, a, n, i) {
var s = this, o = [];
s.$error = {}, s.$$success = {}, s.$pending = void 0, s.$name = i(t.name || t.ngForm || "")(a), s.$dirty = !1, s.$pristine = !0, s.$valid = !0, s.$invalid = !1, s.$submitted = !1, s.$$parentForm = Ti, s.$rollbackViewValue = function () {
ue(o, function (e) {
e.$rollbackViewValue()
})
}, s.$commitViewValue = function () {
ue(o, function (e) {
e.$commitViewValue()
})
}, s.$addControl = function (e) {
De(e.$name, "input"), o.push(e), e.$name && (s[e.$name] = e), e.$$parentForm = s
}, s.$$renameControl = function (e, t) {
var a = e.$name;
s[a] === e && delete s[a], (s[t] = e).$name = t
}, s.$removeControl = function (a) {
a.$name && s[a.$name] === a && delete s[a.$name], ue(s.$pending, function (e, t) {
s.$setValidity(t, null, a)
}), ue(s.$error, function (e, t) {
s.$setValidity(t, null, a)
}), ue(s.$$success, function (e, t) {
s.$setValidity(t, null, a)
}), $e(o, a), a.$$parentForm = Ti
}, Ls({
ctrl: this, $element: e, set: function (e, t, a) {
var n = e[t];
n ? -1 === n.indexOf(a) && n.push(a) : e[t] = [a]
}, unset: function (e, t, a) {
var n = e[t];
n && ($e(n, a), 0 === n.length && delete e[t])
}, $animate: n
}), s.$setDirty = function () {
n.removeClass(e, _s), n.addClass(e, Ss), s.$dirty = !0, s.$pristine = !1, s.$$parentForm.$setDirty()
}, s.$setPristine = function () {
n.setClass(e, _s, Ss + " " + Pi), s.$dirty = !1, s.$pristine = !0, s.$submitted = !1, ue(o, function (e) {
e.$setPristine()
})
}, s.$setUntouched = function () {
ue(o, function (e) {
e.$setUntouched()
})
}, s.$setSubmitted = function () {
n.addClass(e, Pi), s.$submitted = !0, s.$$parentForm.$setSubmitted()
}
}
Ei.$inject = ["$element", "$attrs", "$scope", "$animate", "$interpolate"];
function ji(a) {
return ["$timeout", "$parse", function (l, t) {
return {
name: "form",
restrict: a ? "EAC" : "E",
require: ["form", "^^?form"],
controller: Ei,
compile: function (e, t) {
e.addClass(_s).addClass(ks);
var r = t.name ? "name" : !(!a || !t.ngForm) && "ngForm";
return {
pre: function (t, e, a, n) {
var i = n[0];
if (!("action" in a)) {
var s = function (e) {
t.$apply(function () {
i.$commitViewValue(), i.$setSubmitted()
}), e.preventDefault()
};
Ve(e[0], "submit", s), e.on("$destroy", function () {
l(function () {
Fe(e[0], "submit", s)
}, 0, !1)
})
}
(n[1] || i.$$parentForm).$addControl(i);
var o = r ? c(i.$name) : q;
r && (o(t, i), a.$observe(r, function (e) {
i.$name !== e && (o(t, void 0), i.$$parentForm.$$renameControl(i, e), (o = c(i.$name))(t, i))
})), e.on("$destroy", function () {
i.$$parentForm.$removeControl(i), o(t, void 0), de(i, Ti)
})
}
}
}
};
function c(e) {
return "" === e ? t('this[""]').assign : t(e).assign || q
}
}]
}
var Li = ji(), Oi = ji(!0), Ui = /^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,
Ni = /^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+\])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,
Bi = /^[a-z0-9!#$%&'*+\/=?^_`{|}~.-]+@[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)*$/i,
Ri = /^\s*(\-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/, qi = /^(\d{4,})-(\d{2})-(\d{2})$/,
Yi = /^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/, Vi = /^(\d{4,})-W(\d\d)$/,
Fi = /^(\d{4,})-(\d\d)$/, zi = /^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/, Hi = "keydown wheel mousedown",
Wi = Ee();
ue("date,datetime-local,month,time,week".split(","), function (e) {
Wi[e] = !0
});
var Gi = {
text: function (e, t, a, n, i, s) {
Ki(e, t, a, n, i, s), Qi(n)
},
date: Zi("date", qi, Ji(qi, ["yyyy", "MM", "dd"]), "yyyy-MM-dd"),
"datetime-local": Zi("datetimelocal", Yi, Ji(Yi, ["yyyy", "MM", "dd", "HH", "mm", "ss", "sss"]), "yyyy-MM-ddTHH:mm:ss.sss"),
time: Zi("time", zi, Ji(zi, ["HH", "mm", "ss", "sss"]), "HH:mm:ss.sss"),
week: Zi("week", Vi, function (e, t) {
if (k(e)) return e;
if (ge(e)) {
Vi.lastIndex = 0;
var a = Vi.exec(e);
if (a) {
var n = +a[1], i = +a[2], s = 0, o = 0, r = 0, l = 0, c = hi(n), u = 7 * (i - 1);
return t && (s = t.getHours(), o = t.getMinutes(), r = t.getSeconds(), l = t.getMilliseconds()), new Date(n, 0, c.getDate() + u, s, o, r, l)
}
}
return NaN
}, "yyyy-Www"),
month: Zi("month", Fi, Ji(Fi, ["yyyy", "MM"]), "yyyy-MM"),
number: function (e, t, a, n, i, s) {
if (Xi(e, t, a, n), Ki(e, t, a, n, i, s), n.$$parserName = "number", n.$parsers.push(function (e) {
return n.$isEmpty(e) ? null : Ri.test(e) ? parseFloat(e) : void 0
}), n.$formatters.push(function (e) {
if (!n.$isEmpty(e)) {
if (!w(e)) throw Ts("numfmt", "Expected `{0}` to be a number", e);
e = e.toString()
}
return e
}), V(a.min) || a.ngMin) {
var o;
n.$validators.min = function (e) {
return n.$isEmpty(e) || pe(o) || o <= e
}, a.$observe("min", function (e) {
V(e) && !w(e) && (e = parseFloat(e, 10)), o = w(e) && !isNaN(e) ? e : void 0, n.$validate()
})
}
if (V(a.max) || a.ngMax) {
var r;
n.$validators.max = function (e) {
return n.$isEmpty(e) || pe(r) || e <= r
}, a.$observe("max", function (e) {
V(e) && !w(e) && (e = parseFloat(e, 10)), r = w(e) && !isNaN(e) ? e : void 0, n.$validate()
})
}
},
url: function (e, t, a, n, i, s) {
Ki(e, t, a, n, i, s), Qi(n), n.$$parserName = "url", n.$validators.url = function (e, t) {
var a = e || t;
return n.$isEmpty(a) || Ni.test(a)
}
},
email: function (e, t, a, n, i, s) {
Ki(e, t, a, n, i, s), Qi(n), n.$$parserName = "email", n.$validators.email = function (e, t) {
var a = e || t;
return n.$isEmpty(a) || Bi.test(a)
}
},
radio: function (e, t, a, n) {
pe(a.name) && t.attr("name", A());
t.on("click", function (e) {
t[0].checked && n.$setViewValue(a.value, e && e.type)
}), n.$render = function () {
var e = a.value;
t[0].checked = e == n.$viewValue
}, a.$observe("value", n.$render)
},
checkbox: function (e, t, a, n, i, s, o, r) {
var l = es(r, e, "ngTrueValue", a.ngTrueValue, !0), c = es(r, e, "ngFalseValue", a.ngFalseValue, !1);
t.on("click", function (e) {
n.$setViewValue(t[0].checked, e && e.type)
}), n.$render = function () {
t[0].checked = n.$viewValue
}, n.$isEmpty = function (e) {
return !1 === e
}, n.$formatters.push(function (e) {
return ke(e, l)
}), n.$parsers.push(function (e) {
return e ? l : c
})
},
hidden: q,
button: q,
submit: q,
reset: q,
file: q
};
function Qi(t) {
t.$formatters.push(function (e) {
return t.$isEmpty(e) ? e : e.toString()
})
}
function Ki(e, n, i, s, t, o) {
var r, l = U(n[0].type);
if (!t.android) {
var c = !1;
n.on("compositionstart", function () {
c = !0
}), n.on("compositionend", function () {
c = !1, u()
})
}
var u = function (e) {
if (r && (o.defer.cancel(r), r = null), !c) {
var t = n.val(), a = e && e.type;
"password" === l || i.ngTrim && "false" === i.ngTrim || (t = be(t)), (s.$viewValue !== t || "" === t && s.$$hasNativeValidators) && s.$setViewValue(t, a)
}
};
if (t.hasEvent("input")) n.on("input", u); else {
var a = function (e, t, a) {
r || (r = o.defer(function () {
r = null, t && t.value === a || u(e)
}))
};
n.on("keydown", function (e) {
var t = e.keyCode;
91 === t || 15 < t && t < 19 || 37 <= t && t <= 40 || a(e, this, this.value)
}), t.hasEvent("paste") && n.on("paste cut", a)
}
n.on("change", u), Wi[l] && s.$$hasNativeValidators && l === i.type && n.on(Hi, function (e) {
if (!r) {
var t = this[d], a = t.badInput, n = t.typeMismatch;
r = o.defer(function () {
r = null, t.badInput === a && t.typeMismatch === n || u(e)
})
}
}), s.$render = function () {
var e = s.$isEmpty(s.$viewValue) ? "" : s.$viewValue;
n.val() !== e && n.val(e)
}
}
function Ji(i, s) {
return function (e, t) {
var a, n;
if (k(e)) return e;
if (ge(e)) {
if ('"' == e.charAt(0) && '"' == e.charAt(e.length - 1) && (e = e.substring(1, e.length - 1)), Ui.test(e)) return new Date(e);
if (i.lastIndex = 0, a = i.exec(e)) return a.shift(), n = t ? {
yyyy: t.getFullYear(),
MM: t.getMonth() + 1,
dd: t.getDate(),
HH: t.getHours(),
mm: t.getMinutes(),
ss: t.getSeconds(),
sss: t.getMilliseconds() / 1e3
} : {yyyy: 1970, MM: 1, dd: 1, HH: 0, mm: 0, ss: 0, sss: 0}, ue(a, function (e, t) {
t < s.length && (n[s[t]] = +e)
}), new Date(n.yyyy, n.MM - 1, n.dd, n.HH, n.mm, n.ss || 0, 1e3 * n.sss || 0)
}
return NaN
}
}
function Zi(m, g, f, h) {
return function (e, t, a, n, i, s, o) {
Xi(e, t, a, n), Ki(0, t, a, n, i, s);
var r, l, c, u = n && n.$options && n.$options.timezone;
n.$$parserName = m, n.$parsers.push(function (e) {
if (n.$isEmpty(e)) return null;
if (g.test(e)) {
var t = f(e, r);
return u && (t = J(t, u)), t
}
}), n.$formatters.push(function (e) {
if (e && !k(e)) throw Ts("datefmt", "Expected `{0}` to be a date", e);
return d(e) ? ((r = e) && u && (r = J(r, u, !0)), o("date")(e, h, u)) : (r = null, "")
}), (V(a.min) || a.ngMin) && (n.$validators.min = function (e) {
return !d(e) || pe(l) || f(e) >= l
}, a.$observe("min", function (e) {
l = p(e), n.$validate()
}));
(V(a.max) || a.ngMax) && (n.$validators.max = function (e) {
return !d(e) || pe(c) || f(e) <= c
}, a.$observe("max", function (e) {
c = p(e), n.$validate()
}));
function d(e) {
return e && !(e.getTime && e.getTime() != e.getTime())
}
function p(e) {
return V(e) && !k(e) ? f(e) || void 0 : e
}
}
}
function Xi(e, a, t, n) {
var i = a[0];
(n.$$hasNativeValidators = me(i.validity)) && n.$parsers.push(function (e) {
var t = a.prop(d) || {};
return t.badInput || t.typeMismatch ? void 0 : e
})
}
function es(e, t, a, n, i) {
var s;
if (V(n)) {
if (!(s = e(n)).constant) throw Ts("constexpr", "Expected constant expression for `{0}`, but saw `{1}`.", a, n);
return s(t)
}
return i
}
function ts() {
return {
restrict: "A", priority: 100, compile: function (e, t) {
return ns.test(t.ngValue) ? function (e, t, a) {
a.$set("value", e.$eval(a.ngValue))
} : function (e, t, a) {
e.$watch(a.ngValue, function (e) {
a.$set("value", e)
})
}
}
}
}
var as = ["$browser", "$sniffer", "$filter", "$parse", function (i, s, o, r) {
return {
restrict: "E", require: ["?ngModel"], link: {
pre: function (e, t, a, n) {
n[0] && (Gi[U(a.type)] || Gi.text)(e, t, a, n[0], s, i, o, r)
}
}
}
}], ns = /^(true|false|\d+)$/, is = ["$compile", function (n) {
return {
restrict: "AC", compile: function (e) {
return n.$$addBindingClass(e), function (e, t, a) {
n.$$addBindingInfo(t, a.ngBind), t = t[0], e.$watch(a.ngBind, function (e) {
t.textContent = pe(e) ? "" : e
})
}
}
}
}], ss = ["$interpolate", "$compile", function (i, s) {
return {
compile: function (e) {
return s.$$addBindingClass(e), function (e, t, a) {
var n = i(t.attr(a.$attr.ngBindTemplate));
s.$$addBindingInfo(t, n.expressions), t = t[0], a.$observe("ngBindTemplate", function (e) {
t.textContent = pe(e) ? "" : e
})
}
}
}
}], os = ["$sce", "$parse", "$compile", function (s, a, o) {
return {
restrict: "A", compile: function (e, t) {
var n = a(t.ngBindHtml), i = a(t.ngBindHtml, function (e) {
return s.valueOf(e)
});
return o.$$addBindingClass(e), function (t, a, e) {
o.$$addBindingInfo(a, e.ngBindHtml), t.$watch(i, function () {
var e = n(t);
a.html(s.getTrustedHtml(e) || "")
})
}
}
}
}], rs = I({
restrict: "A", require: "ngModel", link: function (e, t, a, n) {
n.$viewChangeListeners.push(function () {
e.$eval(a.ngChange)
})
}
});
function ls(p, m) {
return p = "ngClass" + p, ["$animate", function (c) {
return {
restrict: "AC", link: function (i, s, o) {
var a;
function r(e) {
var t = l(e, 1);
o.$addClass(t)
}
function l(e, t) {
var a = s.data("$classCounts") || Ee(), n = [];
return ue(e, function (e) {
(0 < t || a[e]) && (a[e] = (a[e] || 0) + t, a[e] === +(0 < t) && n.push(e))
}), s.data("$classCounts", a), n.join(" ")
}
function t(e) {
if (!0 === m || (1 & i.$index) === m) {
var t = d(e || []);
if (a) {
if (!ke(e, a)) {
!function (e, t) {
var a = u(t, e), n = u(e, t);
a = l(a, 1), n = l(n, -1), a && a.length && c.addClass(s, a), n && n.length && c.removeClass(s, n)
}(d(a), t)
}
} else r(t)
}
a = fe(e) ? e.map(function (e) {
return E(e)
}) : E(e)
}
i.$watch(o[p], t, !0), o.$observe("class", function (e) {
t(i.$eval(o[p]))
}), "ngClass" !== p && i.$watch("$index", function (e, t) {
var a = 1 & e;
if (a != (1 & t)) {
var n = d(i.$eval(o[p]));
a === m ? r(n) : function (e) {
var t = l(e, -1);
o.$removeClass(t)
}(n)
}
})
}
};
function u(e, t) {
var a = [];
e:for (var n = 0; n < e.length; n++) {
for (var i = e[n], s = 0; s < t.length; s++) if (i == t[s]) continue e;
a.push(i)
}
return a
}
function d(e) {
var a = [];
return fe(e) ? (ue(e, function (e) {
a = a.concat(d(e))
}), a) : ge(e) ? e.split(" ") : me(e) ? (ue(e, function (e, t) {
e && (a = a.concat(t.split(" ")))
}), a) : e
}
}]
}
var cs = ls("", !0), us = ls("Odd", 0), ds = ls("Even", 1), ps = Ai({
compile: function (e, t) {
t.$set("ngCloak", void 0), e.removeClass("ng-cloak")
}
}), ms = [function () {
return {restrict: "A", scope: !0, controller: "@", priority: 500}
}], gs = {}, fs = {blur: !0, focus: !0};
ue("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "), function (s) {
var o = ca("ng-" + s);
gs[o] = ["$parse", "$rootScope", function (a, i) {
return {
restrict: "A", compile: function (e, t) {
var n = a(t[o], null, !0);
return function (a, e) {
e.on(s, function (e) {
function t() {
n(a, {$event: e})
}
fs[s] && i.$$phase ? a.$evalAsync(t) : a.$apply(t)
})
}
}
}
}]
});
function hs() {
return {
restrict: "A", priority: 100, require: "ngModel", link: function (e, t, a, n) {
var i = t.attr(a.$attr.ngList) || ", ", s = "false" !== a.ngTrim, o = s ? be(i) : i;
n.$parsers.push(function (e) {
if (!pe(e)) {
var t = [];
return e && ue(e.split(o), function (e) {
e && t.push(s ? be(e) : e)
}), t
}
}), n.$formatters.push(function (e) {
if (fe(e)) return e.join(i)
}), n.$isEmpty = function (e) {
return !e || !e.length
}
}
}
}
function vs() {
return {
restrict: "A", controller: ["$scope", "$attrs", function (e, t) {
var a = this;
this.$options = P(e.$eval(t.ngModelOptions)), V(this.$options.updateOn) ? (this.$options.updateOnDefault = !1, this.$options.updateOn = be(this.$options.updateOn.replace(js, function () {
return a.$options.updateOnDefault = !0, " "
}))) : this.$options.updateOnDefault = !0
}]
}
}
var ys = ["$animate", "$compile", function (l, c) {
return {
multiElement: !0,
transclude: "element",
priority: 600,
terminal: !0,
restrict: "A",
$$tlb: !0,
link: function (e, a, n, t, i) {
var s, o, r;
e.$watch(n.ngIf, function (e) {
e ? o || i(function (e, t) {
o = t, e[e.length++] = c.$$createComment("end ngIf", n.ngIf), s = {clone: e}, l.enter(e, a.parent(), a)
}) : (r && (r.remove(), r = null), o && (o.$destroy(), o = null), s && (r = Pe(s.clone), l.leave(r).then(function () {
r = null
}), s = null))
})
}
}
}], bs = ["$templateRequest", "$anchorScroll", "$animate", function (h, v, y) {
return {
restrict: "ECA",
priority: 400,
terminal: !0,
transclude: "element",
controller: S.noop,
compile: function (e, t) {
var a = t.ngInclude || t.src, g = t.onload || "", f = t.autoscroll;
return function (o, r, e, l, c) {
function u() {
t && (t.remove(), t = null), d && (d.$destroy(), d = null), p && (y.leave(p).then(function () {
t = null
}), t = p, p = null)
}
var d, t, p, m = 0;
o.$watch(a, function (n) {
function i() {
!V(f) || f && !o.$eval(f) || v()
}
var s = ++m;
n ? (h(n, !0).then(function (e) {
if (!o.$$destroyed && s === m) {
var t = o.$new();
l.template = e;
var a = c(t, function (e) {
u(), y.enter(e, null, r).then(i)
});
p = a, (d = t).$emit("$includeContentLoaded", n), o.$eval(g)
}
}, function () {
o.$$destroyed || s === m && (u(), o.$emit("$includeContentError", n))
}), o.$emit("$includeContentRequested", n)) : (u(), l.template = null)
})
}
}
}
}], ws = ["$compile", function (i) {
return {
restrict: "ECA", priority: -400, require: "ngInclude", link: function (e, t, a, n) {
if (B.call(t[0]).match(/SVG/)) return t.empty(), void i(nt(n.template, L.document).childNodes)(e, function (e) {
t.append(e)
}, {futureParentElement: t});
t.html(n.template), i(t.contents())(e)
}
}
}], $s = Ai({
priority: 450, compile: function () {
return {
pre: function (e, t, a) {
e.$eval(a.ngInit)
}
}
}
}), ks = "ng-valid", xs = "ng-invalid", _s = "ng-pristine", Ss = "ng-dirty", Is = "ng-untouched", Cs = "ng-touched",
As = "ng-pending", Ms = "ng-empty", Ds = "ng-not-empty", Ts = $("ngModel"),
Ps = ["$scope", "$exceptionHandler", "$attrs", "$element", "$parse", "$animate", "$timeout", "$rootScope", "$q", "$interpolate", function (s, t, i, o, r, a, l, c, u, e) {
this.$viewValue = Number.NaN, this.$modelValue = Number.NaN, this.$$rawModelValue = void 0, this.$validators = {}, this.$asyncValidators = {}, this.$parsers = [], this.$formatters = [], this.$viewChangeListeners = [], this.$untouched = !0, this.$touched = !1, this.$pristine = !0, this.$dirty = !1, this.$valid = !0, this.$invalid = !1, this.$error = {}, this.$$success = {}, this.$pending = void 0, this.$name = e(i.name || "", !1)(s), this.$$parentForm = Ti;
var d, p = r(i.ngModel), m = p.assign, g = p, f = m, h = null, v = this;
this.$$setOptions = function (e) {
if ((v.$options = e) && e.getterSetter) {
var a = r(i.ngModel + "()"), n = r(i.ngModel + "($$$p)");
g = function (e) {
var t = p(e);
return he(t) && (t = a(e)), t
}, f = function (e, t) {
he(p(e)) ? n(e, {$$$p: t}) : m(e, t)
}
} else if (!p.assign) throw Ts("nonassign", "Expression '{0}' is non-assignable. Element: {1}", i.ngModel, Se(o))
}, this.$render = q, this.$isEmpty = function (e) {
return pe(e) || "" === e || null === e || e != e
}, this.$$updateEmptyClasses = function (e) {
v.$isEmpty(e) ? (a.removeClass(o, Ds), a.addClass(o, Ms)) : (a.removeClass(o, Ms), a.addClass(o, Ds))
};
var y = 0;
Ls({
ctrl: this, $element: o, set: function (e, t) {
e[t] = !0
}, unset: function (e, t) {
delete e[t]
}, $animate: a
}), this.$setPristine = function () {
v.$dirty = !1, v.$pristine = !0, a.removeClass(o, Ss), a.addClass(o, _s)
}, this.$setDirty = function () {
v.$dirty = !0, v.$pristine = !1, a.removeClass(o, _s), a.addClass(o, Ss), v.$$parentForm.$setDirty()
}, this.$setUntouched = function () {
v.$touched = !1, v.$untouched = !0, a.setClass(o, Is, Cs)
}, this.$setTouched = function () {
v.$touched = !0, v.$untouched = !1, a.setClass(o, Cs, Is)
}, this.$rollbackViewValue = function () {
l.cancel(h), v.$viewValue = v.$$lastCommittedViewValue, v.$render()
}, this.$validate = function () {
if (!w(v.$modelValue) || !isNaN(v.$modelValue)) {
var e = v.$$lastCommittedViewValue, t = v.$$rawModelValue, a = v.$valid, n = v.$modelValue,
i = v.$options && v.$options.allowInvalid;
v.$$runValidators(t, e, function (e) {
i || a === e || (v.$modelValue = e ? t : void 0, v.$modelValue !== n && v.$$writeModelToScope())
})
}
}, this.$$runValidators = function (n, i, t) {
var s, o, r, a = ++y;
(function () {
var e = v.$$parserName || "parse";
{
if (!pe(d)) return d || (ue(v.$validators, function (e, t) {
l(t, null)
}), ue(v.$asyncValidators, function (e, t) {
l(t, null)
})), l(e, d), d;
l(e, null)
}
return !0
})() ? (s = !0, ue(v.$validators, function (e, t) {
var a = e(n, i);
s = s && a, l(t, a)
}), s || (ue(v.$asyncValidators, function (e, t) {
l(t, null)
}), 0) ? (o = [], r = !0, ue(v.$asyncValidators, function (e, t) {
var a = e(n, i);
if (!C(a)) throw Ts("nopromise", "Expected asynchronous validator to return a promise but got '{0}' instead.", a);
l(t, void 0), o.push(a.then(function () {
l(t, !0)
}, function () {
l(t, r = !1)
}))
}), o.length ? u.all(o).then(function () {
e(r)
}, q) : e(!0)) : e(!1)) : e(!1);
function l(e, t) {
a === y && v.$setValidity(e, t)
}
function e(e) {
a === y && t(e)
}
}, this.$commitViewValue = function () {
var e = v.$viewValue;
l.cancel(h), (v.$$lastCommittedViewValue !== e || "" === e && v.$$hasNativeValidators) && (v.$$updateEmptyClasses(e), v.$$lastCommittedViewValue = e, v.$pristine && this.$setDirty(), this.$$parseAndValidate())
}, this.$$parseAndValidate = function () {
var t = v.$$lastCommittedViewValue;
if (d = !pe(t) || void 0) for (var e = 0; e < v.$parsers.length; e++) if (pe(t = v.$parsers[e](t))) {
d = !1;
break
}
w(v.$modelValue) && isNaN(v.$modelValue) && (v.$modelValue = g(s));
var a = v.$modelValue, n = v.$options && v.$options.allowInvalid;
function i() {
v.$modelValue !== a && v.$$writeModelToScope()
}
v.$$rawModelValue = t, n && (v.$modelValue = t, i()), v.$$runValidators(t, v.$$lastCommittedViewValue, function (e) {
n || (v.$modelValue = e ? t : void 0, i())
})
}, this.$$writeModelToScope = function () {
f(s, v.$modelValue), ue(v.$viewChangeListeners, function (e) {
try {
e()
} catch (e) {
t(e)
}
})
}, this.$setViewValue = function (e, t) {
v.$viewValue = e, v.$options && !v.$options.updateOnDefault || v.$$debounceViewValueCommit(t)
}, this.$$debounceViewValueCommit = function (e) {
var t, a = 0, n = v.$options;
n && V(n.debounce) && (w(t = n.debounce) ? a = t : w(t[e]) ? a = t[e] : w(t.default) && (a = t.default)), l.cancel(h), a ? h = l(function () {
v.$commitViewValue()
}, a) : c.$$phase ? v.$commitViewValue() : s.$apply(function () {
v.$commitViewValue()
})
}, s.$watch(function () {
var e = g(s);
if (e !== v.$modelValue && (v.$modelValue == v.$modelValue || e == e)) {
v.$modelValue = v.$$rawModelValue = e, d = void 0;
for (var t = v.$formatters, a = t.length, n = e; a--;) n = t[a](n);
v.$viewValue !== n && (v.$$updateEmptyClasses(n), v.$viewValue = v.$$lastCommittedViewValue = n, v.$render(), v.$$runValidators(e, n, q))
}
return e
})
}], Es = ["$rootScope", function (s) {
return {
restrict: "A",
require: ["ngModel", "^?form", "^?ngModelOptions"],
controller: Ps,
priority: 1,
compile: function (e) {
return e.addClass(_s).addClass(Is).addClass(ks), {
pre: function (e, t, a, n) {
var i = n[0], s = n[1] || i.$$parentForm;
i.$$setOptions(n[2] && n[2].$options), s.$addControl(i), a.$observe("name", function (e) {
i.$name !== e && i.$$parentForm.$$renameControl(i, e)
}), e.$on("$destroy", function () {
i.$$parentForm.$removeControl(i)
})
}, post: function (e, t, a, n) {
var i = n[0];
i.$options && i.$options.updateOn && t.on(i.$options.updateOn, function (e) {
i.$$debounceViewValueCommit(e && e.type)
}), t.on("blur", function () {
i.$touched || (s.$$phase ? e.$evalAsync(i.$setTouched) : e.$apply(i.$setTouched))
})
}
}
}
}
}], js = /(\s+|^)default(\s+|$)/;
function Ls(e) {
var i = e.ctrl, a = e.$element, n = {}, s = e.set, o = e.unset, r = e.$animate;
function l(e, t) {
t && !n[e] ? (r.addClass(a, e), n[e] = !0) : !t && n[e] && (r.removeClass(a, e), n[e] = !1)
}
function c(e, t) {
e = e ? "-" + Ie(e, "-") : "", l(ks + e, !0 === t), l(xs + e, !1 === t)
}
n[xs] = !(n[ks] = a.hasClass(ks)), i.$setValidity = function (e, t, a) {
pe(t) ? function (e, t, a) {
i[e] || (i[e] = {});
s(i[e], t, a)
}("$pending", e, a) : function (e, t, a) {
i[e] && o(i[e], t, a);
Os(i[e]) && (i[e] = void 0)
}("$pending", e, a);
ye(t) ? t ? (o(i.$error, e, a), s(i.$$success, e, a)) : (s(i.$error, e, a), o(i.$$success, e, a)) : (o(i.$error, e, a), o(i.$$success, e, a));
i.$pending ? (l(As, !0), i.$valid = i.$invalid = void 0, c("", null)) : (l(As, !1), i.$valid = Os(i.$error), i.$invalid = !i.$valid, c("", i.$valid));
var n;
n = i.$pending && i.$pending[e] ? void 0 : !i.$error[e] && (!!i.$$success[e] || null);
c(e, n), i.$$parentForm.$setValidity(e, n, i)
}
}
function Os(e) {
if (e) for (var t in e) if (e.hasOwnProperty(t)) return !1;
return !0
}
var Us = Ai({terminal: !0, priority: 1e3}), Ns = $("ngOptions"),
Bs = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w]*)|(?:\(\s*([\$\w][\$\w]*)\s*,\s*([\$\w][\$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,
Rs = ["$compile", "$document", "$parse", function (w, $, _) {
var k = L.document.createElement("option"), x = L.document.createElement("optgroup");
return {
restrict: "A", terminal: !0, require: ["select", "ngModel"], link: {
pre: function (e, t, a, n) {
n[0].registerOption = q
}, post: function (e, s, t, a) {
for (var o, r = a[0], l = a[1], c = t.multiple, n = 0, i = s.children(), u = i.length; n < u; n++) if ("" === i[n].value) {
o = i.eq(n);
break
}
var d, p = !!o, m = ce(k.cloneNode(!1));
function g() {
p || o.remove()
}
function f() {
m.remove()
}
m.val("?");
var h = function (e, t, p) {
var d = e.match(Bs);
if (!d) throw Ns("iexp", "Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}", e, Se(t));
function m(e, t) {
return h(e, $(e, t))
}
var a = d[5] || d[7], n = d[6], i = / as /.test(d[0]) && d[1], g = d[9],
s = _(d[2] ? d[1] : a), f = i && _(i) || s, o = g && _(g), h = g ? function (e, t) {
return o(p, t)
} : function (e) {
return Dt(e)
}, v = _(d[2] || d[1]), y = _(d[3] || ""), b = _(d[4] || ""), w = _(d[8]), r = {},
$ = n ? function (e, t) {
return r[n] = t, r[a] = e, r
} : function (e) {
return r[a] = e, r
};
function k(e, t, a, n, i) {
this.selectValue = e, this.viewValue = t, this.label = a, this.group = n, this.disabled = i
}
function x(e) {
var t;
if (!n && j(e)) t = e; else for (var a in t = [], e) e.hasOwnProperty(a) && "$" !== a.charAt(0) && t.push(a);
return t
}
return {
trackBy: g, getTrackByValue: m, getWatchables: _(w, function (e) {
for (var t = [], a = x(e = e || []), n = a.length, i = 0; i < n; i++) {
var s = e === a ? i : a[i], o = e[s], r = $(o, s), l = h(o, r);
if (t.push(l), d[2] || d[1]) {
var c = v(p, r);
t.push(c)
}
if (d[4]) {
var u = b(p, r);
t.push(u)
}
}
return t
}), getOptions: function () {
for (var e = [], t = {}, a = w(p) || [], n = x(a), i = n.length, s = 0; s < i; s++) {
var o = a === n ? s : n[s], r = a[o], l = $(r, o), c = f(p, l), u = h(c, l),
d = new k(u, c, v(p, l), y(p, l), b(p, l));
e.push(d), t[u] = d
}
return {
items: e, selectValueMap: t, getOptionFromViewValue: function (e) {
return t[m(e)]
}, getViewValueFromOption: function (e) {
return g ? S.copy(e.viewValue) : e.viewValue
}
}
}
}
}(t.ngOptions, s, e), v = $[0].createDocumentFragment();
function y(e, t) {
var a = k.cloneNode(!1);
t.appendChild(a), function (e, t) {
(e.element = t).disabled = e.disabled, e.label !== t.label && (t.label = e.label, t.textContent = e.label);
e.value !== t.value && (t.value = e.selectValue)
}(e, a)
}
function b() {
var e = d && r.readValue();
if (d) for (var t = d.items.length - 1; 0 <= t; t--) {
var a = d.items[t];
a.group ? wt(a.element.parentNode) : wt(a.element)
}
d = h.getOptions();
var n = {};
if (p && s.prepend(o), d.items.forEach(function (e) {
var t;
V(e.group) ? ((t = n[e.group]) || (t = x.cloneNode(!1), v.appendChild(t), t.label = e.group, n[e.group] = t), y(e, t)) : y(e, v)
}), s[0].appendChild(v), l.$render(), !l.$isEmpty(e)) {
var i = r.readValue();
(h.trackBy || c ? ke(e, i) : e === i) || (l.$setViewValue(i), l.$render())
}
}
c ? (l.$isEmpty = function (e) {
return !e || 0 === e.length
}, r.writeValue = function (e) {
d.items.forEach(function (e) {
e.element.selected = !1
}), e && e.forEach(function (e) {
var t = d.getOptionFromViewValue(e);
t && (t.element.selected = !0)
})
}, r.readValue = function () {
var e = s.val() || [], a = [];
return ue(e, function (e) {
var t = d.selectValueMap[e];
t && !t.disabled && a.push(d.getViewValueFromOption(t))
}), a
}, h.trackBy && e.$watchCollection(function () {
if (fe(l.$viewValue)) return l.$viewValue.map(function (e) {
return h.getTrackByValue(e)
})
}, function () {
l.$render()
})) : (r.writeValue = function (e) {
var t = d.getOptionFromViewValue(e);
t ? (s[0].value !== t.selectValue && (f(), g(), s[0].value = t.selectValue, t.element.selected = !0), t.element.setAttribute("selected", "selected")) : null === e || p ? (f(), p || s.prepend(o), s.val(""), o.prop("selected", !0), o.attr("selected", !0)) : (g(), s.prepend(m), s.val("?"), m.prop("selected", !0), m.attr("selected", !0))
}, r.readValue = function () {
var e = d.selectValueMap[s.val()];
return e && !e.disabled ? (g(), f(), d.getViewValueFromOption(e)) : null
}, h.trackBy && e.$watch(function () {
return h.getTrackByValue(l.$viewValue)
}, function () {
l.$render()
})), p ? (o.remove(), w(o)(e), o.removeClass("ng-scope")) : o = ce(k.cloneNode(!1)), s.empty(), b(), e.$watchCollection(h.getWatchables, b)
}
}
}
}], qs = ["$locale", "$interpolate", "$log", function (g, f, h) {
var v = /{}/g, y = /^when(Minus)?(.+)$/;
return {
link: function (i, s, o) {
var r, e = o.count, l = o.$attr.when && s.attr(o.$attr.when), c = o.offset || 0, u = i.$eval(l) || {},
d = {}, t = f.startSymbol(), a = f.endSymbol(), n = t + e + "-" + c + a, p = S.noop;
function m(e) {
s.text(e || "")
}
ue(o, function (e, t) {
var a = y.exec(t);
if (a) {
var n = (a[1] ? "-" : "") + U(a[2]);
u[n] = s.attr(o.$attr[t])
}
}), ue(u, function (e, t) {
d[t] = f(e.replace(v, n))
}), i.$watch(e, function (e) {
var t = parseFloat(e), a = isNaN(t);
if (a || t in u || (t = g.pluralCat(t - c)), t !== r && !(a && w(r) && isNaN(r))) {
p();
var n = d[t];
pe(n) ? (null != e && h.debug("ngPluralize: no rule defined for '" + t + "' in " + l), p = q, m()) : p = i.$watch(n, m), r = t
}
})
}
}
}], Ys = ["$parse", "$animate", "$compile", function (l, D, c) {
function T(e, t, a, n, i, s, o) {
e[a] = n, i && (e[i] = s), e.$index = t, e.$first = 0 === t, e.$last = t === o - 1, e.$middle = !(e.$first || e.$last), e.$odd = !(e.$even = 0 == (1 & t))
}
var P = "$$NG_REMOVED", E = $("ngRepeat");
return {
restrict: "A",
multiElement: !0,
transclude: "element",
priority: 1e3,
terminal: !0,
$$tlb: !0,
compile: function (e, t) {
var k = t.ngRepeat, x = c.$$createComment("end ngRepeat", k),
a = k.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);
if (!a) throw E("iexp", "Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.", k);
var n = a[1], i = a[2], _ = a[3], s = a[4];
if (!(a = n.match(/^(?:(\s*[\$\w]+)|\(\s*([\$\w]+)\s*,\s*([\$\w]+)\s*\))$/))) throw E("iidexp", "'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.", n);
var o, S, I, C, A = a[3] || a[1], M = a[2];
if (_ && (!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(_) || /^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(_))) throw E("badident", "alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.", _);
var r = {$id: Dt};
return s ? o = l(s) : (I = function (e, t) {
return Dt(t)
}, C = function (e) {
return e
}), function (y, b, e, t, w) {
o && (S = function (e, t, a) {
return M && (r[M] = e), r[A] = t, r.$index = a, o(y, r)
});
var $ = Ee();
y.$watchCollection(i, function (e) {
var n, t, a, i, s, o, r, l, c, u, d, p, m, g = b[0], f = Ee();
if (_ && (y[_] = e), j(e)) c = e, l = S || I; else for (var h in l = S || C, c = [], e) O.call(e, h) && "$" !== h.charAt(0) && c.push(h);
for (i = c.length, d = new Array(i), n = 0; n < i; n++) if (s = e === c ? n : c[n], o = e[s], r = l(s, o, n), $[r]) u = $[r], delete $[r], f[r] = u, d[n] = u; else {
if (f[r]) throw ue(d, function (e) {
e && e.scope && ($[e.id] = e)
}), E("dupes", "Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}", k, r, o);
d[n] = {id: r, scope: void 0, clone: void 0}, f[r] = !0
}
for (var v in $) {
if (p = Pe((u = $[v]).clone), D.leave(p), p[0].parentNode) for (n = 0, t = p.length; n < t; n++) p[n][P] = !0;
u.scope.$destroy()
}
for (n = 0; n < i; n++) if (s = e === c ? n : c[n], o = e[s], (u = d[n]).scope) {
for (a = g; (a = a.nextSibling) && a[P];) ;
u.clone[0] != a && D.move(Pe(u.clone), null, g), g = (m = u).clone[m.clone.length - 1], T(u.scope, n, A, o, M, s, i)
} else w(function (e, t) {
u.scope = t;
var a = x.cloneNode(!1);
e[e.length++] = a, D.enter(e, null, g), g = a, u.clone = e, f[u.id] = u, T(u.scope, n, A, o, M, s, i)
});
$ = f
})
}
}
}
}], Vs = "ng-hide", Fs = "ng-hide-animate", zs = ["$animate", function (n) {
return {
restrict: "A", multiElement: !0, link: function (e, t, a) {
e.$watch(a.ngShow, function (e) {
n[e ? "removeClass" : "addClass"](t, Vs, {tempClasses: Fs})
})
}
}
}], Hs = ["$animate", function (n) {
return {
restrict: "A", multiElement: !0, link: function (e, t, a) {
e.$watch(a.ngHide, function (e) {
n[e ? "addClass" : "removeClass"](t, Vs, {tempClasses: Fs})
})
}
}
}], Ws = Ai(function (e, a, t) {
e.$watch(t.ngStyle, function (e, t) {
t && e !== t && ue(t, function (e, t) {
a.css(t, "")
}), e && a.css(e)
}, !0)
}), Gs = ["$animate", "$compile", function (u, d) {
return {
require: "ngSwitch", controller: ["$scope", function () {
this.cases = {}
}], link: function (e, t, a, i) {
function s(e, t) {
return function () {
e.splice(t, 1)
}
}
var n = a.ngSwitch || a.on, o = [], r = [], l = [], c = [];
e.$watch(n, function (e) {
var t, a;
for (t = 0, a = l.length; t < a; ++t) u.cancel(l[t]);
for (t = l.length = 0, a = c.length; t < a; ++t) {
var n = Pe(r[t].clone);
c[t].$destroy(), (l[t] = u.leave(n)).then(s(l, t))
}
r.length = 0, c.length = 0, (o = i.cases["!" + e] || i.cases["?"]) && ue(o, function (i) {
i.transclude(function (e, t) {
c.push(t);
var a = i.element;
e[e.length++] = d.$$createComment("end ngSwitchWhen");
var n = {clone: e};
r.push(n), u.enter(e, a.parent(), a)
})
})
})
}
}
}], Qs = Ai({
transclude: "element",
priority: 1200,
require: "^ngSwitch",
multiElement: !0,
link: function (e, t, a, n, i) {
n.cases["!" + a.ngSwitchWhen] = n.cases["!" + a.ngSwitchWhen] || [], n.cases["!" + a.ngSwitchWhen].push({
transclude: i,
element: t
})
}
}), Ks = Ai({
transclude: "element",
priority: 1200,
require: "^ngSwitch",
multiElement: !0,
link: function (e, t, a, n, i) {
n.cases["?"] = n.cases["?"] || [], n.cases["?"].push({transclude: i, element: t})
}
}), Js = $("ngTransclude"), Zs = Ai({
restrict: "EAC", link: function (e, t, a, n, i) {
if (a.ngTransclude === a.$attr.ngTransclude && (a.ngTransclude = ""), !i) throw Js("orphan", "Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}", Se(t));
i(function (e) {
e.length && (t.empty(), t.append(e))
}, null, a.ngTransclude || a.ngTranscludeSlot)
}
}), Xs = ["$templateCache", function (i) {
return {
restrict: "E", terminal: !0, compile: function (e, t) {
if ("text/ng-template" == t.type) {
var a = t.id, n = e[0].text;
i.put(a, n)
}
}
}
}], eo = {$setViewValue: q, $render: q};
function to() {
return {
restrict: "E",
require: ["select", "?ngModel"],
controller: uo,
priority: 1,
link: {
pre: function (e, a, t, n) {
var i = n[1];
if (!i) return;
var s = n[0];
if (s.ngModelCtrl = i, a.on("change", function () {
e.$apply(function () {
i.$setViewValue(s.readValue())
})
}), t.multiple) {
s.readValue = function () {
var t = [];
return ue(a.find("option"), function (e) {
e.selected && t.push(e.value)
}), t
}, s.writeValue = function (e) {
var t = new Tt(e);
ue(a.find("option"), function (e) {
e.selected = V(t.get(e.value))
})
};
var o, r = NaN;
e.$watch(function () {
r !== i.$viewValue || ke(o, i.$viewValue) || (o = E(i.$viewValue), i.$render()), r = i.$viewValue
}), i.$isEmpty = function (e) {
return !e || 0 === e.length
}
}
}, post: function (e, t, a, n) {
var i = n[1];
if (!i) return;
var s = n[0];
i.$render = function () {
s.writeValue(i.$viewValue)
}
}
}
}
}
function ao() {
return {
restrict: "A", require: "?ngModel", link: function (e, t, a, n) {
n && (a.required = !0, n.$validators.required = function (e, t) {
return !a.required || !n.$isEmpty(t)
}, a.$observe("required", function () {
n.$validate()
}))
}
}
}
function no() {
return {
restrict: "A", require: "?ngModel", link: function (e, t, a, n) {
if (n) {
var i, s = a.ngPattern || a.pattern;
a.$observe("pattern", function (e) {
if (ge(e) && 0 < e.length && (e = new RegExp("^" + e + "$")), e && !e.test) throw $("ngPattern")("noregexp", "Expected {0} to be a RegExp but was {1}. Element: {2}", s, e, Se(t));
i = e || void 0, n.$validate()
}), n.$validators.pattern = function (e, t) {
return n.$isEmpty(t) || pe(i) || i.test(t)
}
}
}
}
}
function io() {
return {
restrict: "A", require: "?ngModel", link: function (e, t, a, n) {
if (n) {
var i = -1;
a.$observe("maxlength", function (e) {
var t = f(e);
i = isNaN(t) ? -1 : t, n.$validate()
}), n.$validators.maxlength = function (e, t) {
return i < 0 || n.$isEmpty(t) || t.length <= i
}
}
}
}
}
function so() {
return {
restrict: "A", require: "?ngModel", link: function (e, t, a, n) {
if (n) {
var i = 0;
a.$observe("minlength", function (e) {
i = f(e) || 0, n.$validate()
}), n.$validators.minlength = function (e, t) {
return n.$isEmpty(t) || t.length >= i
}
}
}
}
}
var oo, ro, lo, co, uo = ["$element", "$scope", function (a, e) {
var o = this, n = new Tt;
o.ngModelCtrl = eo, o.unknownOption = ce(L.document.createElement("option")), o.renderUnknownOption = function (e) {
var t = "? " + Dt(e) + " ?";
o.unknownOption.val(t), a.prepend(o.unknownOption), a.val(t)
}, e.$on("$destroy", function () {
o.renderUnknownOption = q
}), o.removeUnknownOption = function () {
o.unknownOption.parent() && o.unknownOption.remove()
}, o.readValue = function () {
return o.removeUnknownOption(), a.val()
}, o.writeValue = function (e) {
o.hasOption(e) ? (o.removeUnknownOption(), a.val(e), "" === e && o.emptyOption.prop("selected", !0)) : null == e && o.emptyOption ? (o.removeUnknownOption(), a.val("")) : o.renderUnknownOption(e)
}, o.addOption = function (e, t) {
if (t[0].nodeType !== Oe) {
De(e, '"option value"'), "" === e && (o.emptyOption = t);
var a = n.get(e) || 0;
n.put(e, a + 1), o.ngModelCtrl.$render(), function (e) {
e[0].hasAttribute("selected") && (e[0].selected = !0)
}(t)
}
}, o.removeOption = function (e) {
var t = n.get(e);
t && (1 === t ? (n.remove(e), "" === e && (o.emptyOption = void 0)) : n.put(e, t - 1))
}, o.hasOption = function (e) {
return !!n.get(e)
}, o.registerOption = function (e, a, n, t, i) {
var s;
t ? n.$observe("value", function (e) {
V(s) && o.removeOption(s), s = e, o.addOption(e, a)
}) : i ? e.$watch(i, function (e, t) {
n.$set("value", e), t !== e && o.removeOption(t), o.addOption(e, a)
}) : o.addOption(n.value, a);
a.on("$destroy", function () {
o.removeOption(n.value), o.ngModelCtrl.$render()
})
}
}], po = ["$interpolate", function (a) {
return {
restrict: "E", priority: 100, compile: function (e, t) {
if (V(t.value)) var o = a(t.value, !0); else {
var r = a(e.text(), !0);
r || t.$set("value", e.text())
}
return function (e, t, a) {
var n = "$selectController", i = t.parent(), s = i.data(n) || i.parent().data(n);
s && s.registerOption(e, t, a, o, r)
}
}
}
}], mo = I({restrict: "E", terminal: !1});
L.angular.bootstrap ? L.console && console.log("WARNING: Tried to load angular more than once.") : (function () {
var i;
if (!Ce) {
var e = z();
(o = pe(e) ? L.jQuery : e ? L[e] : void 0) && o.fn.on ? (de((ce = o).fn, {
scope: $t.scope,
isolateScope: $t.isolateScope,
controller: $t.controller,
injector: $t.injector,
inheritedData: $t.inheritedData
}), i = o.cleanData, o.cleanData = function (e) {
for (var t, a, n = 0; null != (a = e[n]); n++) (t = o._data(a, "events")) && t.$destroy && o(a).triggerHandler("$destroy");
i(e)
}) : ce = ot, S.element = ce, Ce = !0
}
}(), de(S, {
bootstrap: se,
copy: P,
extend: de,
merge: n,
equals: ke,
element: ce,
forEach: ue,
injector: qt,
noop: q,
bind: _e,
toJson: W,
fromJson: G,
identity: Y,
isUndefined: pe,
isDefined: V,
isString: ge,
isFunction: he,
isObject: me,
isNumber: w,
isElement: T,
isArray: fe,
version: Re,
isDate: k,
lowercase: U,
uppercase: u,
callbacks: {counter: 0},
getTestability: re,
$$minErr: $,
$$csp: F,
reloadWithDebugInfo: oe
}), oo = L, ro = $("$injector"), lo = $("ng"), (co = go(oo, "angular", Object)).$$minErr = co.$$minErr || $, (h = go(co, "module", function () {
var e = {};
return function (r, l, c) {
return function (e, t) {
if ("hasOwnProperty" === e) throw lo("badname", "hasOwnProperty is not a valid {0} name", t)
}(r, "module"), l && e.hasOwnProperty(r) && (e[r] = null), go(e, r, function () {
if (!l) throw ro("nomod", "Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.", r);
var i = [], e = [], t = [], a = n("$injector", "invoke", "push", e), s = {
_invokeQueue: i,
_configBlocks: e,
_runBlocks: t,
requires: l,
name: r,
provider: o("$provide", "provider"),
factory: o("$provide", "factory"),
service: o("$provide", "service"),
value: n("$provide", "value"),
constant: n("$provide", "constant", "unshift"),
decorator: o("$provide", "decorator"),
animation: o("$animateProvider", "register"),
filter: o("$filterProvider", "register"),
controller: o("$controllerProvider", "register"),
directive: o("$compileProvider", "directive"),
component: o("$compileProvider", "component"),
config: a,
run: function (e) {
return t.push(e), this
}
};
return c && a(c), s;
function n(e, t, a, n) {
return n || (n = i), function () {
return n[a || "push"]([e, t, arguments]), s
}
}
function o(a, n) {
return function (e, t) {
return t && he(t) && (t.$$moduleName = r), i.push([a, n, arguments]), s
}
}
})
}
}))("ng", ["ngLocale"], ["$provide", function (e) {
e.provider({$$sanitizeUri: Bn}), e.provider("$compile", oa).directive({
a: Mi,
input: as,
textarea: as,
form: Li,
script: Xs,
select: to,
style: mo,
option: po,
ngBind: is,
ngBindHtml: os,
ngBindTemplate: ss,
ngClass: cs,
ngClassEven: ds,
ngClassOdd: us,
ngCloak: ps,
ngController: ms,
ngForm: Oi,
ngHide: Hs,
ngIf: ys,
ngInclude: bs,
ngInit: $s,
ngNonBindable: Us,
ngPluralize: qs,
ngRepeat: Ys,
ngShow: zs,
ngStyle: Ws,
ngSwitch: Gs,
ngSwitchWhen: Qs,
ngSwitchDefault: Ks,
ngOptions: Rs,
ngTransclude: Zs,
ngModel: Es,
ngList: hs,
ngChange: rs,
pattern: no,
ngPattern: no,
required: ao,
ngRequired: ao,
minlength: so,
ngMinlength: so,
maxlength: io,
ngMaxlength: io,
ngValue: ts,
ngModelOptions: vs
}).directive({ngInclude: ws}).directive(Di).directive(gs), e.provider({
$anchorScroll: Yt,
$animate: Xt,
$animateCss: Zt,
$$animateJs: Gt,
$$animateQueue: Qt,
$$AnimateRunner: Jt,
$$animateAsyncRun: Kt,
$browser: ta,
$cacheFactory: aa,
$controller: fa,
$document: ha,
$exceptionHandler: va,
$filter: ni,
$$forceReflow: ya,
$interpolate: Na,
$interval: Ba,
$http: ja,
$httpParamSerializer: Ca,
$httpParamSerializerJQLike: Aa,
$httpBackend: Oa,
$xhrFactory: La,
$location: an,
$log: nn,
$parse: En,
$rootScope: Nn,
$q: jn,
$$q: Ln,
$sce: Fn,
$sceDelegate: Vn,
$sniffer: zn,
$templateCache: na,
$templateRequest: Wn,
$$testability: Gn,
$timeout: Qn,
$window: ei,
$$rAF: Un,
$$jqLite: Mt,
$$HashMap: Pt,
$$cookieReader: ai
})
}]), S.module("ngLocale", [], ["$provide", function (e) {
var i = "one", s = "other";
e.value("$locale", {
DATETIME_FORMATS: {
AMPMS: ["AM", "PM"],
DAY: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
ERANAMES: ["Before Christ", "Anno Domini"],
ERAS: ["BC", "AD"],
FIRSTDAYOFWEEK: 6,
MONTH: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
SHORTDAY: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
SHORTMONTH: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
STANDALONEMONTH: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
WEEKENDRANGE: [5, 6],
fullDate: "EEEE, MMMM d, y",
longDate: "MMMM d, y",
medium: "MMM d, y h:mm:ss a",
mediumDate: "MMM d, y",
mediumTime: "h:mm:ss a",
short: "M/d/yy h:mm a",
shortDate: "M/d/yy",
shortTime: "h:mm a"
},
NUMBER_FORMATS: {
CURRENCY_SYM: "$",
DECIMAL_SEP: ".",
GROUP_SEP: ",",
PATTERNS: [{
gSize: 3,
lgSize: 3,
maxFrac: 3,
minFrac: 0,
minInt: 1,
negPre: "-",
negSuf: "",
posPre: "",
posSuf: ""
}, {
gSize: 3,
lgSize: 3,
maxFrac: 2,
minFrac: 2,
minInt: 1,
negPre: "-¤",
negSuf: "",
posPre: "¤",
posSuf: ""
}]
},
id: "en-us",
localeID: "en_US",
pluralCat: function (e, t) {
var a = 0 | e, n = function (e, t) {
var a = t;
void 0 === a && (a = Math.min(function (e) {
var t = (e += "").indexOf(".");
return -1 == t ? 0 : e.length - t - 1
}(e), 3));
var n = Math.pow(10, a);
return {v: a, f: (e * n | 0) % n}
}(e, t);
return 1 == a && 0 == n.v ? i : s
}
})
}]), ce(L.document).ready(function () {
ie(L.document, se)
}));
function go(e, t, a) {
return e[t] || (e[t] = a())
}
}(window), window.angular.$$csp().noInlineStyle || window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'), function (c, u) {
"use strict";
var ie, se, oe, re, le = u.noop, ce = u.copy, d = u.extend, B = u.element, ue = u.forEach, de = u.isArray,
R = u.isString, q = u.isObject, Y = u.isUndefined, V = u.isDefined, $ = u.isFunction, p = u.isElement, F = 1,
pe = "-add", me = "-remove", ge = "ng-", k = "ng-animate", z = "$$ngAnimateChildren";
se = Y(c.ontransitionend) && V(c.onwebkittransitionend) ? ("-webkit-", ie = "WebkitTransition", "webkitTransitionEnd transitionend") : (ie = "transition", "transitionend"), re = Y(c.onanimationend) && V(c.onwebkitanimationend) ? ("-webkit-", oe = "WebkitAnimation", "webkitAnimationEnd animationend") : (oe = "animation", "animationend");
var i = "Duration", fe = "TimingFunction", s = "PlayState", a = oe + "Delay", he = oe + i, n = ie + "Delay",
e = ie + i, o = u.$$minErr("ng");
function m(e, t, a) {
if (!e) throw o("areq", "Argument '{0}' is {1}", t || "?", a || "required");
return e
}
function x(e, t) {
return e || t ? e ? t ? (de(e) && (e = e.join(" ")), de(t) && (t = t.join(" ")), e + " " + t) : e : t : ""
}
function ve(e, a, n) {
var i = "";
return e = de(e) ? e : e && R(e) && e.length ? e.split(/\s+/) : [], ue(e, function (e, t) {
e && 0 < e.length && (i += 0 < t ? " " : "", i += n ? a + e : e + a)
}), i
}
function H(e) {
if (!e[0]) return e;
for (var t = 0; t < e.length; t++) {
var a = e[t];
if (a.nodeType == F) return a
}
}
function ye(a) {
return function (e, t) {
t.addClass && (function (t, e, a) {
ue(e, function (e) {
t.addClass(e, a)
})
}(a, e, t.addClass), t.addClass = null), t.removeClass && (function (t, e, a) {
ue(e, function (e) {
t.removeClass(e, a)
})
}(a, e, t.removeClass), t.removeClass = null)
}
}
function be(e) {
if (!(e = e || {}).$$prepared) {
var t = e.domOperation || le;
e.domOperation = function () {
e.$$domOperationFired = !0, t(), t = le
}, e.$$prepared = !0
}
return e
}
function we(e, t) {
$e(e, t), ke(e, t)
}
function $e(e, t) {
t.from && (e.css(t.from), t.from = null)
}
function ke(e, t) {
t.to && (e.css(t.to), t.to = null)
}
function W(e, t, a) {
var n = t.options || {}, i = a.options || {}, s = (n.addClass || "") + " " + (i.addClass || ""),
o = (n.removeClass || "") + " " + (i.removeClass || ""), r = function (i, e, t) {
var a = {};
i = n(i), e = n(e), ue(e, function (e, t) {
a[t] = 1
}), t = n(t), ue(t, function (e, t) {
a[t] = 1 === a[t] ? null : -1
});
var s = {addClass: "", removeClass: ""};
function n(e) {
R(e) && (e = e.split(" "));
var t = {};
return ue(e, function (e) {
e.length && (t[e] = !0)
}), t
}
return ue(a, function (e, t) {
var a, n;
1 === e ? (a = "addClass", n = !i[t]) : -1 === e && (a = "removeClass", n = i[t]), n && (s[a].length && (s[a] += " "), s[a] += t)
}), s
}(e.attr("class"), s, o);
i.preparationClasses && (n.preparationClasses = G(i.preparationClasses, n.preparationClasses), delete i.preparationClasses);
var l = n.domOperation !== le ? n.domOperation : null;
return d(n, i), l && (n.domOperation = l), r.addClass ? n.addClass = r.addClass : n.addClass = null, r.removeClass ? n.removeClass = r.removeClass : n.removeClass = null, t.addClass = n.addClass, t.removeClass = n.removeClass, n
}
function xe(e) {
return e instanceof u.element ? e[0] : e
}
function _e(e, t) {
var a = t ? "-" + t + "s" : "";
return Ie(e, [n, a]), [n, a]
}
function Se(e, t) {
var a = t ? "paused" : "", n = oe + s;
return Ie(e, [n, a]), [n, a]
}
function Ie(e, t) {
var a = t[0], n = t[1];
e.style[a] = n
}
function G(e, t) {
return e ? t ? e + " " + t : e : t
}
var t = ["$interpolate", function (s) {
return {
link: function (e, t, a) {
var n = a.ngAnimateChildren;
function i(e) {
e = "on" === e || "true" === e, t.data(z, e)
}
u.isString(n) && 0 === n.length ? t.data(z, !0) : (i(s(n)(e)), a.$observe("ngAnimateChildren", i))
}
}
}], Ce = "$$animateCss", r = {
transitionDuration: e,
transitionDelay: n,
transitionProperty: ie + "Property",
animationDuration: he,
animationDelay: a,
animationIterationCount: oe + "IterationCount"
}, Ae = {transitionDuration: e, transitionDelay: n, animationDuration: he, animationDelay: a};
function Me(e, t) {
return [t ? a : n, e + "s"]
}
function De(e, t, a) {
var i = Object.create(null), s = e.getComputedStyle(t) || {};
return ue(a, function (e, t) {
var a = s[e];
if (a) {
var n = a.charAt(0);
("-" === n || "+" === n || 0 <= n) && (a = function (e) {
var t = 0, a = e.split(/\s*,\s*/);
return ue(a, function (e) {
"s" == e.charAt(e.length - 1) && (e = e.substring(0, e.length - 1)), e = parseFloat(e) || 0, t = t ? Math.max(e, t) : e
}), t
}(a)), 0 === a && (a = null), i[t] = a
}
}), i
}
function Te(e) {
return 0 === e || null != e
}
function Pe(e, t) {
var a = ie, n = e + "s";
return t ? a += i : n += " linear all", [a, n]
}
function l() {
var a = Object.create(null);
return {
flush: function () {
a = Object.create(null)
}, count: function (e) {
var t = a[e];
return t ? t.total : 0
}, get: function (e) {
var t = a[e];
return t && t.value
}, put: function (e, t) {
a[e] ? a[e].total++ : a[e] = {total: 1, value: t}
}
}
}
function Ee(t, a, e) {
ue(e, function (e) {
t[e] = V(t[e]) ? t[e] : a.style.getPropertyValue(e)
})
}
var g = ["$animateProvider", function (e) {
var ae = l(), ne = l();
this.$get = ["$window", "$$jqLite", "$$AnimateRunner", "$timeout", "$$forceReflow", "$sniffer", "$$rAFScheduler", "$$animateQueue", function (H, W, G, Q, a, K, t, J) {
var Z = ye(W), i = 0;
function X(e, t) {
var a = "$$ngAnimateParentKey", n = e.parentNode;
return (n[a] || (n[a] = ++i)) + "-" + e.getAttribute("class") + "-" + t
}
var n = [];
function ee(e) {
n.push(e), t.waitUntilQuiet(function () {
ae.flush(), ne.flush();
for (var e = a(), t = 0; t < n.length; t++) n[t](e);
n.length = 0
})
}
function te(e, t, a) {
var n = function (e, t, a, n) {
var i = ae.get(a);
return i || "infinite" === (i = De(H, e, n)).animationIterationCount && (i.animationIterationCount = 1), ae.put(a, i), i
}(e, 0, a, r), i = n.animationDelay, s = n.transitionDelay;
return n.maxDelay = i && s ? Math.max(i, s) : i || s, n.maxDuration = Math.max(n.animationDuration * n.animationIterationCount, n.transitionDuration), n
}
return function (c, e) {
var u = e || {};
u.$$prepared || (u = be(ce(u)));
var d = {}, p = xe(c);
if (!p || !p.parentNode || !J.enabled()) return V();
var m, n, i, a, s, g, f, h, v, y, b = [], t = c.attr("class"), o = function (e) {
var t = {};
return e && (e.to || e.from) && (t.to = e.to, t.from = e.from), t
}(u), w = [];
if (0 === u.duration || !K.animations && !K.transitions) return V();
var r = u.event && de(u.event) ? u.event.join(" ") : u.event, l = "", $ = "";
r && u.structural ? l = ve(r, ge, !0) : r && (l = r), u.addClass && ($ += ve(u.addClass, pe)), u.removeClass && ($.length && ($ += " "), $ += ve(u.removeClass, me)), u.applyClassesEarly && $.length && Z(c, u);
var k, x, _, S = [l, $].join(" ").trim(), I = t + " " + S, C = ve(S, "-active"),
A = o.to && 0 < Object.keys(o.to).length;
if (!(0 < (u.keyframeStyle || "").length) && !A && !S) return V();
if (0 < u.stagger) {
var M = parseFloat(u.stagger);
x = {transitionDelay: M, animationDelay: M, transitionDuration: 0, animationDuration: 0}
} else k = X(p, I), x = function (e, t, a, n) {
var i;
if (0 < ae.count(a) && !(i = ne.get(a))) {
var s = ve(t, "-stagger");
W.addClass(e, s), (i = De(H, e, n)).animationDuration = Math.max(i.animationDuration, 0), i.transitionDuration = Math.max(i.transitionDuration, 0), W.removeClass(e, s), ne.put(a, i)
}
return i || {}
}(p, S, k, Ae);
if (u.$$skipPreparationClasses || W.addClass(c, S), u.transitionStyle) {
var D = [ie, u.transitionStyle];
Ie(p, D), b.push(D)
}
if (0 <= u.duration) {
_ = 0 < p.style[ie].length;
var T = Pe(u.duration, _);
Ie(p, T), b.push(T)
}
if (u.keyframeStyle) {
var P = [oe, u.keyframeStyle];
Ie(p, P), b.push(P)
}
var E = x ? 0 <= u.staggerIndex ? u.staggerIndex : ae.count(k) : 0, j = 0 === E;
j && !u.skipBlocking && _e(p, 9999);
var L = te(p, 0, k), O = L.maxDelay;
g = Math.max(O, 0), h = L.maxDuration;
var U, N = {};
if (N.hasTransitions = 0 < L.transitionDuration, N.hasAnimations = 0 < L.animationDuration, N.hasTransitionAll = N.hasTransitions && "all" == L.transitionProperty, N.applyTransitionDuration = A && (N.hasTransitions && !N.hasTransitionAll || N.hasAnimations && !N.hasTransitions), N.applyAnimationDuration = u.duration && N.hasAnimations, N.applyTransitionDelay = Te(u.delay) && (N.applyTransitionDuration || N.hasTransitions), N.applyAnimationDelay = Te(u.delay) && N.hasAnimations, N.recalculateTimingStyles = 0 < $.length, (N.applyTransitionDuration || N.applyAnimationDuration) && (h = u.duration ? parseFloat(u.duration) : h, N.applyTransitionDuration && (N.hasTransitions = !0, L.transitionDuration = h, _ = 0 < p.style[ie + "Property"].length, b.push(Pe(h, _))), N.applyAnimationDuration && (N.hasAnimations = !0, L.animationDuration = h, b.push(function (e) {
return [he, e + "s"]
}(h)))), 0 === h && !N.recalculateTimingStyles) return V();
null != u.delay && ("boolean" != typeof u.delay && (U = parseFloat(u.delay), g = Math.max(U, 0)), N.applyTransitionDelay && b.push(Me(U)), N.applyAnimationDelay && b.push(Me(U, !0)));
return null == u.duration && 0 < L.transitionDuration && (N.recalculateTimingStyles = N.recalculateTimingStyles || j), f = 1e3 * g, v = 1e3 * h, u.skipBlocking || (N.blockTransition = 0 < L.transitionDuration, N.blockKeyframeAnimation = 0 < L.animationDuration && 0 < x.animationDelay && 0 === x.animationDuration), u.from && (u.cleanupStyles && Ee(d, p, Object.keys(u.from)), $e(c, u)), N.blockTransition || N.blockKeyframeAnimation ? Y(h) : u.skipBlocking || _e(p, !1), {
$$willAnimate: !0,
end: B,
start: function () {
if (!m) return a = new G(s = {end: B, cancel: R, resume: null, pause: null}), ee(z), a
}
};
function B() {
q()
}
function R() {
q(!0)
}
function q(e) {
if (!(m || i && n)) {
n = !(m = !0), u.$$skipPreparationClasses || W.removeClass(c, S), W.removeClass(c, C), Se(p, !1), _e(p, !1), ue(b, function (e) {
p.style[e[0]] = ""
}), Z(c, u), we(c, u), Object.keys(d).length && ue(d, function (e, t) {
e ? p.style.setProperty(t, e) : p.style.removeProperty(t)
}), u.onDone && u.onDone(), w && w.length && c.off(w.join(" "), F);
var t = c.data(Ce);
t && (Q.cancel(t[0].timer), c.removeData(Ce)), a && a.complete(!e)
}
}
function Y(e) {
N.blockTransition && _e(p, e), N.blockKeyframeAnimation && Se(p, !!e)
}
function V() {
return a = new G({end: B, cancel: R}), ee(le), q(), {
$$willAnimate: !1, start: function () {
return a
}, end: B
}
}
function F(e) {
e.stopPropagation();
var t = e.originalEvent || e, a = t.$manualTimeStamp || Date.now(),
n = parseFloat(t.elapsedTime.toFixed(3));
Math.max(a - y, 0) >= f && h <= n && (i = !0, q())
}
function z() {
if (!m) if (p.parentNode) {
var e = function (e) {
if (i) n && e && (n = !1, q()); else if (n = !e, L.animationDuration) {
var t = Se(p, n);
n ? b.push(t) : function (e, t) {
var a = e.indexOf(t);
0 <= t && e.splice(a, 1)
}(b, t)
}
},
t = 0 < E && (L.transitionDuration && 0 === x.transitionDuration || L.animationDuration && 0 === x.animationDuration) && Math.max(x.animationDelay, x.transitionDelay);
t ? Q(a, Math.floor(t * E * 1e3), !1) : a(), s.resume = function () {
e(!0)
}, s.pause = function () {
e(!1)
}
} else q();
function a() {
if (!m) {
if (Y(!1), ue(b, function (e) {
var t = e[0], a = e[1];
p.style[t] = a
}), Z(c, u), W.addClass(c, C), N.recalculateTimingStyles) {
if (I = p.className + " " + S, k = X(p, I), L = te(p, 0, k), O = L.maxDelay, g = Math.max(O, 0), 0 === (h = L.maxDuration)) return void q();
N.hasTransitions = 0 < L.transitionDuration, N.hasAnimations = 0 < L.animationDuration
}
if (N.applyAnimationDelay && (O = "boolean" != typeof u.delay && Te(u.delay) ? parseFloat(u.delay) : O, g = Math.max(O, 0), L.animationDelay = O, U = Me(O, !0), b.push(U), p.style[U[0]] = U[1]), f = 1e3 * g, v = 1e3 * h, u.easing) {
var e, t = u.easing;
N.hasTransitions && (e = ie + fe, b.push([e, t]), p.style[e] = t), N.hasAnimations && (e = oe + fe, b.push([e, t]), p.style[e] = t)
}
L.transitionDuration && w.push(se), L.animationDuration && w.push(re), y = Date.now();
var a = f + 1.5 * v, n = y + a, i = c.data(Ce) || [], s = !0;
if (i.length) {
var o = i[0];
(s = n > o.expectedEndTime) ? Q.cancel(o.timer) : i.push(q)
}
if (s) {
var r = Q(l, a, !1);
i[0] = {timer: r, expectedEndTime: n}, i.push(q), c.data(Ce, i)
}
w.length && c.on(w.join(" "), F), u.to && (u.cleanupStyles && Ee(d, p, Object.keys(u.to)), ke(c, u))
}
}
function l() {
var e = c.data(Ce);
if (e) {
for (var t = 1; t < e.length; t++) e[t]();
c.removeData(Ce)
}
}
}
}
}]
}], f = ["$$animationProvider", function (e) {
e.drivers.push("$$animateCssDriver");
var y = "ng-animate-shim", b = "ng-anchor-out";
this.$get = ["$animateCss", "$rootScope", "$$AnimateRunner", "$rootElement", "$sniffer", "$$jqLite", "$document", function (p, e, m, t, a, n, i) {
if (!a.animations && !a.transitions) return le;
var g = i[0].body, s = xe(t), f = B(function (e) {
return e.parentNode && 11 === e.parentNode.nodeType
}(s) || g.contains(s) ? s : g);
ye(n);
return function (e) {
return e.from && e.to ? function (e, t, a, n) {
var i = r(e), s = r(t), o = [];
if (ue(n, function (e) {
var t = function (e, t, i) {
var s = B(xe(t).cloneNode(!0)), o = h(c(s));
t.addClass(y), i.addClass(y), s.addClass("ng-anchor"), f.append(s);
var n, a = function () {
var e = p(s, {addClass: b, delay: !0, from: l(t)});
return e.$$willAnimate ? e : null
}();
if (!a && !(n = u())) return d();
var r = a || n;
return {
start: function () {
var e, t = r.start();
return t.done(function () {
if (t = null, !n && (n = u())) return (t = n.start()).done(function () {
t = null, d(), e.complete()
}), t;
d(), e.complete()
}), e = new m({end: a, cancel: a});
function a() {
t && t.end()
}
}
};
function l(e) {
var a = {}, n = xe(e).getBoundingClientRect();
return ue(["width", "height", "top", "left"], function (e) {
var t = n[e];
switch (e) {
case"top":
t += g.scrollTop;
break;
case"left":
t += g.scrollLeft
}
a[e] = Math.floor(t) + "px"
}), a
}
function c(e) {
return e.attr("class") || ""
}
function u() {
var e = h(c(i)), t = v(e, o), a = v(o, e), n = p(s, {
to: l(i),
addClass: "ng-anchor-in " + t,
removeClass: b + " " + a,
delay: !0
});
return n.$$willAnimate ? n : null
}
function d() {
s.remove(), t.removeClass(y), i.removeClass(y)
}
}(0, e.out, e.in);
t && o.push(t)
}), !i && !s && 0 === o.length) return;
return {
start: function () {
var t = [];
i && t.push(i.start()), s && t.push(s.start()), ue(o, function (e) {
t.push(e.start())
});
var a = new m({end: e, cancel: e});
return m.all(t, function (e) {
a.complete(e)
}), a;
function e() {
ue(t, function (e) {
e.end()
})
}
}
}
}(e.from, e.to, e.classes, e.anchors) : r(e)
};
function h(e) {
return e.replace(/\bng-\S+\b/g, "")
}
function v(e, t) {
return R(e) && (e = e.split(" ")), R(t) && (t = t.split(" ")), e.filter(function (e) {
return -1 === t.indexOf(e)
}).join(" ")
}
function r(e) {
var t = e.element, a = e.options || {};
e.structural && (a.event = e.event, a.structural = !0, a.applyClassesEarly = !0, "leave" === e.event && (a.onDone = a.domOperation)), a.preparationClasses && (a.event = G(a.event, a.preparationClasses));
var n = p(t, a);
return n.$$willAnimate ? n : null
}
}]
}], h = ["$animateProvider", function (w) {
this.$get = ["$injector", "$$AnimateRunner", "$$jqLite", function (v, y, e) {
var b = ye(e);
return function (e, t, a, n) {
var i = !1;
3 === arguments.length && q(a) && (n = a, a = null), n = be(n), a || (a = e.attr("class") || "", n.addClass && (a += " " + n.addClass), n.removeClass && (a += " " + n.removeClass));
var s, o, r, l, c, u = n.addClass, d = n.removeClass, p = function (e) {
e = de(e) ? e : e.split(" ");
for (var t = [], a = {}, n = 0; n < e.length; n++) {
var i = e[n], s = w.$$registeredAnimations[i];
s && !a[i] && (t.push(v.get(s)), a[i] = !0)
}
return t
}(a);
p.length && (r = "leave" == t ? (l = "leave", "afterLeave") : (l = "before" + t.charAt(0).toUpperCase() + t.substr(1), t), "enter" !== t && "move" !== t && (s = h(e, t, n, p, l)), o = h(e, t, n, p, r));
if (s || o) return {
$$willAnimate: !0, end: function () {
return c ? c.end() : (g(), (c = new y).complete(!0)), c
}, start: function () {
if (c) return c;
var t;
c = new y;
var e = [];
return s && e.push(function (e) {
t = s(e)
}), e.length ? e.push(function (e) {
m(), e(!0)
}) : m(), o && e.push(function (e) {
t = o(e)
}), c.setHost({
end: function () {
n()
}, cancel: function () {
n(!0)
}
}), y.chain(e, a), c;
function a(e) {
g(), c.complete(e)
}
function n(e) {
i || ((t || le)(e), a(e))
}
}
};
function m() {
n.domOperation(), b(e, n)
}
function g() {
i = !0, m(), we(e, n)
}
function f(o, r, l, e, t) {
var a = [];
return ue(e, function (e) {
var s = e[t];
s && a.push(function () {
function t(e) {
i || (i = !0, (n || le)(e), a.complete(!e))
}
var a, n, i = !1;
return a = new y({
end: function () {
t()
}, cancel: function () {
t(!0)
}
}), n = function (e, t, a, n, i) {
var s;
switch (a) {
case"animate":
s = [t, n.from, n.to, i];
break;
case"setClass":
s = [t, u, d, i];
break;
case"addClass":
s = [t, u, i];
break;
case"removeClass":
s = [t, d, i];
break;
default:
s = [t, i]
}
s.push(n);
var o = e.apply(e, s);
if (o) if ($(o.start) && (o = o.start()), o instanceof y) o.done(i); else if ($(o)) return o;
return le
}(s, o, r, l, function (e) {
t(!1 === e)
}), a
})
}), a
}
function h(e, t, a, n, i) {
var s, o, r = f(e, t, a, n, i);
0 === r.length && ("beforeSetClass" === i ? (s = f(e, "removeClass", a, n, "beforeRemoveClass"), o = f(e, "addClass", a, n, "beforeAddClass")) : "setClass" === i && (s = f(e, "removeClass", a, n, "removeClass"), o = f(e, "addClass", a, n, "addClass")), s && (r = r.concat(s)), o && (r = r.concat(o)));
if (0 !== r.length) return function (e) {
var a = [];
return r.length && ue(r, function (e) {
a.push(e())
}), a.length ? y.all(a, e) : e(), function (t) {
ue(a, function (e) {
t ? e.cancel() : e.end()
})
}
}
}
}
}]
}], v = ["$$animationProvider", function (e) {
e.drivers.push("$$animateJsDriver"), this.$get = ["$$animateJs", "$$AnimateRunner", function (s, o) {
return function (e) {
if (e.from && e.to) {
var n = t(e.from), i = t(e.to);
if (!n && !i) return;
return {
start: function () {
var e = [];
n && e.push(n.start()), i && e.push(i.start()), o.all(e, function (e) {
t.complete(e)
});
var t = new o({end: a(), cancel: a()});
return t;
function a() {
return function () {
ue(e, function (e) {
e.end()
})
}
}
}
}
}
return t(e)
};
function t(e) {
var t = e.element, a = e.event, n = e.options, i = e.classes;
return s(t, a, i, n)
}
}]
}], Q = "data-ng-animate", K = "$ngAnimatePin", y = ["$animateProvider", function (l) {
var n = " ", i = this.rules = {skip: [], cancel: [], join: []};
function r(e, t) {
if (e && t) {
var a = function (e) {
if (!e) return null;
var t = e.split(n), a = Object.create(null);
return ue(t, function (e) {
a[e] = !0
}), a
}(t);
return e.split(n).some(function (e) {
return a[e]
})
}
}
function U(e, t, a, n) {
return i[e].some(function (e) {
return e(t, a, n)
})
}
function N(e, t) {
var a = 0 < (e.addClass || "").length, n = 0 < (e.removeClass || "").length;
return t ? a && n : a || n
}
i.join.push(function (e, t, a) {
return !t.structural && N(t)
}), i.skip.push(function (e, t, a) {
return !t.structural && !N(t)
}), i.skip.push(function (e, t, a) {
return "leave" == a.event && t.structural
}), i.skip.push(function (e, t, a) {
return a.structural && 2 === a.state && !t.structural
}), i.cancel.push(function (e, t, a) {
return a.structural && t.structural
}), i.cancel.push(function (e, t, a) {
return 2 === a.state && t.structural
}), i.cancel.push(function (e, t, a) {
if (a.structural) return !1;
var n = t.addClass, i = t.removeClass, s = a.addClass, o = a.removeClass;
return !(Y(n) && Y(i) || Y(s) && Y(o)) && (r(n, o) || r(i, s))
}), this.$get = ["$$rAF", "$rootScope", "$rootElement", "$document", "$$HashMap", "$$animation", "$$AnimateRunner", "$templateRequest", "$$jqLite", "$$forceReflow", function (b, w, $, k, e, x, _, t, a, n) {
var S = new e, I = new e, C = null;
var i = w.$watch(function () {
return 0 === t.totalPendingRequests
}, function (e) {
e && (i(), w.$$postDigest(function () {
w.$$postDigest(function () {
null === C && (C = !0)
})
}))
}), A = {}, s = l.classNameFilter(), M = s ? function (e) {
return s.test(e)
} : function () {
return !0
}, D = ye(a);
function T(e, t) {
return W(e, t, {})
}
var P = c.Node.prototype.contains || function (e) {
return this === e || !!(16 & this.compareDocumentPosition(e))
};
function o(e, t, a) {
var n = H(t);
return e.filter(function (e) {
return !(e.node === n && (!a || e.callback === a))
})
}
function E(e, t) {
"close" !== e || t[0].parentNode || r.off(t)
}
var r = {
on: function (e, t, a) {
var n = H(t);
A[e] = A[e] || [], A[e].push({node: n, callback: a}), B(t).on("$destroy", function () {
S.get(n) || r.off(e, t, a)
})
}, off: function (e, t, a) {
if (1 !== arguments.length || u.isString(e)) {
var n = A[e];
n && (A[e] = 1 === arguments.length ? null : o(n, t, a))
} else for (var i in t = e, A) A[i] = o(A[i], t)
}, pin: function (e, t) {
m(p(e), "element", "not an element"), m(p(t), "parentElement", "not an element"), e.data(K, t)
}, push: function (e, t, a, n) {
return (a = a || {}).domOperation = n, function (i, s, e) {
var o, r, l = ce(e);
(i = function (e) {
if (e instanceof B) switch (e.length) {
case 0:
return e;
case 1:
if (e[0].nodeType === F) return e;
break;
default:
return B(H(e))
}
if (e.nodeType === F) return B(e)
}(i)) && (o = xe(i), r = i.parent());
l = be(l);
var c = new _, u = function () {
var t = !1;
return function (e) {
t ? e() : w.$$postDigest(function () {
t = !0, e()
})
}
}();
de(l.addClass) && (l.addClass = l.addClass.join(" "));
l.addClass && !R(l.addClass) && (l.addClass = null);
de(l.removeClass) && (l.removeClass = l.removeClass.join(" "));
l.removeClass && !R(l.removeClass) && (l.removeClass = null);
l.from && !q(l.from) && (l.from = null);
l.to && !q(l.to) && (l.to = null);
if (!o) return y(), c;
var t = [o.className, l.addClass, l.removeClass].join(" ");
if (!M(t)) return y(), c;
var d = 0 <= ["enter", "move", "leave"].indexOf(s), a = k[0].hidden, n = !C || a || I.get(o),
p = !n && S.get(o) || {}, m = !!p.state;
n || m && 1 == p.state || (n = !function (e, t) {
var a, n = B(k[0].body), i = L(e, n) || "HTML" === e[0].nodeName, s = L(e, $), o = !1,
r = I.get(xe(e)), l = B.data(e[0], K);
l && (t = l);
t = xe(t);
for (; t && (s || (s = L(t, $)), t.nodeType === F);) {
var c = S.get(t) || {};
if (!o) {
var u = I.get(t);
if (!0 === u && !1 !== r) {
r = !0;
break
}
!1 === u && (r = !1), o = c.structural
}
if (Y(a) || !0 === a) {
var d = B.data(t, z);
V(d) && (a = d)
}
if (o && !1 === a) break;
if (i || (i = L(t, n)), i && s) break;
t = s || !(l = B.data(t, K)) ? t.parentNode : xe(l)
}
return (!o || a) && !0 !== r && s && i
}(i, r));
if (n) return a && v(c, s, "start"), y(), a && v(c, s, "close"), c;
d && function (e) {
var t = xe(e).querySelectorAll("[" + Q + "]");
ue(t, function (e) {
var t = parseInt(e.getAttribute(Q)), a = S.get(e);
if (a) switch (t) {
case 2:
a.runner.end();
case 1:
S.remove(e)
}
})
}(i);
var g = {
structural: d,
element: i,
event: s,
addClass: l.addClass,
removeClass: l.removeClass,
close: y,
options: l,
runner: c
};
if (m) {
if (U("skip", i, g, p)) return 2 === p.state ? (y(), c) : (W(i, p, g), p.runner);
if (U("cancel", i, g, p)) if (2 === p.state) p.runner.end(); else {
if (!p.structural) return W(i, p, g), p.runner;
p.close()
} else if (U("join", i, g, p)) {
if (2 !== p.state) return function (e, t, a) {
var n = "";
t && (n = ve(t, ge, !0)), a.addClass && (n = G(n, ve(a.addClass, pe))), a.removeClass && (n = G(n, ve(a.removeClass, me))), n.length && (a.preparationClasses = n, e.addClass(n))
}(i, d ? s : null, l), s = g.event = p.event, l = W(i, p, g), p.runner;
T(i, g)
}
} else T(i, g);
var f = g.structural;
f || (f = "animate" === g.event && 0 < Object.keys(g.options.to || {}).length || N(g));
if (!f) return y(), j(i), c;
var h = (p.counter || 0) + 1;
return g.counter = h, O(i, 1, g), w.$$postDigest(function () {
var e = S.get(o), t = !e;
e = e || {};
var a = 0 < (i.parent() || []).length && ("animate" === e.event || e.structural || N(e));
if (t || e.counter !== h || !a) return t && (D(i, l), we(i, l)), (t || d && e.event !== s) && (l.domOperation(), c.end()), void (a || j(i));
s = !e.structural && N(e, !0) ? "setClass" : e.event, O(i, 2);
var n = x(i, s, e.options);
c.setHost(n), v(c, s, "start", {}), n.done(function (e) {
y(!e);
var t = S.get(o);
t && t.counter === h && j(xe(i)), v(c, s, "close", {})
})
}), c;
function v(e, t, a, n) {
u(function () {
var e = function (e, t, a) {
var n = xe(t), i = xe(e), s = [], o = A[a];
return o && ue(o, function (e) {
P.call(e.node, n) ? s.push(e.callback) : "leave" === a && P.call(e.node, i) && s.push(e.callback)
}), s
}(r, i, t);
e.length ? b(function () {
ue(e, function (e) {
e(i, a, n)
}), E(a, i)
}) : E(a, i)
}), e.progress(t, a, n)
}
function y(e) {
!function (e, t) {
t.preparationClasses && (e.removeClass(t.preparationClasses), t.preparationClasses = null), t.activeClasses && (e.removeClass(t.activeClasses), t.activeClasses = null)
}(i, l), D(i, l), we(i, l), l.domOperation(), c.complete(!e)
}
}(e, t, a)
}, enabled: function (e, t) {
var a = arguments.length;
if (0 === a) t = !!C; else if (p(e)) {
var n = xe(e), i = I.get(n);
1 === a ? t = !i : I.put(n, !t)
} else t = C = !!e;
return t
}
};
return r;
function j(e) {
var t = xe(e);
t.removeAttribute(Q), S.remove(t)
}
function L(e, t) {
return xe(e) === xe(t)
}
function O(e, t, a) {
(a = a || {}).state = t;
var n = xe(e);
n.setAttribute(Q, t);
var i = S.get(n), s = i ? d(i, a) : a;
S.put(n, s)
}
}]
}], b = ["$animateProvider", function (e) {
var y = "ng-animate-ref", b = this.drivers = [], w = "$$animationRunner";
function $(e) {
return e.data(w)
}
this.$get = ["$$jqLite", "$rootScope", "$injector", "$$AnimateRunner", "$$HashMap", "$$rAFScheduler", function (u, d, p, m, g, f) {
var h = [], v = ye(u);
return function (t, a, n) {
n = be(n);
var e = 0 <= ["enter", "move", "leave"].indexOf(a), i = new m({
end: function () {
c()
}, cancel: function () {
c(!0)
}
});
if (!b.length) return c(), i;
!function (e, t) {
e.data(w, t)
}(t, i);
var s, o = x(t.attr("class"), x(n.addClass, n.removeClass)), r = n.tempClasses;
return r && (o += " " + r, n.tempClasses = null), e && (s = "ng-" + a + "-prepare", u.addClass(t, s)), h.push({
element: t,
classes: o,
event: a,
structural: e,
options: n,
beforeStart: function () {
t.addClass(k), r && u.addClass(t, r);
s && (u.removeClass(t, s), s = null)
},
close: c
}), t.on("$destroy", l), 1 < h.length || d.$$postDigest(function () {
var t = [];
ue(h, function (e) {
$(e.element) ? t.push(e) : e.close()
}), h.length = 0;
var e = function (u) {
var d = [], r = {};
ue(u, function (e, a) {
var t = xe(e.element), n = e.event, i = 0 <= ["enter", "move"].indexOf(n),
s = e.structural ? function (e) {
var t = e.hasAttribute(y) ? [e] : e.querySelectorAll("[ng-animate-ref]"), a = [];
return ue(t, function (e) {
var t = e.getAttribute(y);
t && t.length && a.push(e)
}), a
}(t) : [];
if (s.length) {
var o = i ? "to" : "from";
ue(s, function (e) {
var t = e.getAttribute(y);
r[t] = r[t] || {}, r[t][o] = {animationID: a, element: B(e)}
})
} else d.push(e)
});
var p = {}, m = {};
return ue(r, function (e, t) {
var a = e.from, n = e.to;
if (a && n) {
var i = u[a.animationID], s = u[n.animationID], o = a.animationID.toString();
if (!m[o]) {
var r = m[o] = {
structural: !0, beforeStart: function () {
i.beforeStart(), s.beforeStart()
}, close: function () {
i.close(), s.close()
}, classes: function (e, t) {
e = e.split(" "), t = t.split(" ");
for (var a = [], n = 0; n < e.length; n++) {
var i = e[n];
if ("ng-" !== i.substring(0, 3)) for (var s = 0; s < t.length; s++) if (i === t[s]) {
a.push(i);
break
}
}
return a.join(" ")
}(i.classes, s.classes), from: i, to: s, anchors: []
};
r.classes.length ? d.push(r) : (d.push(i), d.push(s))
}
m[o].anchors.push({out: a.element, in: n.element})
} else {
var l = a ? a.animationID : n.animationID, c = l.toString();
p[c] || (p[c] = !0, d.push(u[l]))
}
}), d
}(t), a = [];
ue(e, function (i) {
a.push({
domNode: xe(i.from ? i.from.element : i.element), fn: function () {
i.beforeStart();
var e, t = i.close;
if ($(i.anchors ? i.from.element || i.to.element : i.element)) {
var a = function (e) {
for (var t = b.length - 1; 0 <= t; t--) {
var a = b[t];
if (p.has(a)) {
var n = p.get(a)(e);
if (n) return n
}
}
}(i);
a && (e = a.start)
}
if (e) {
var n = e();
n.done(function (e) {
t(!e)
}), function (e, a) {
e.from && e.to ? (t(e.from.element), t(e.to.element)) : t(e.element);
function t(e) {
var t = $(e);
t && t.setHost(a)
}
}(i, n)
} else t()
}
})
}), f(function (e) {
var t, i = {children: []}, s = new g;
for (t = 0; t < e.length; t++) {
var a = e[t];
s.put(a.domNode, e[t] = {domNode: a.domNode, fn: a.fn, children: []})
}
for (t = 0; t < e.length; t++) o(e[t]);
return function (e) {
var t, a = [], n = [];
for (t = 0; t < e.children.length; t++) n.push(e.children[t]);
var i = n.length, s = 0, o = [];
for (t = 0; t < n.length; t++) {
var r = n[t];
i <= 0 && (i = s, s = 0, a.push(o), o = []), o.push(r.fn), r.children.forEach(function (e) {
s++, n.push(e)
}), i--
}
o.length && a.push(o);
return a
}(i);
function o(e) {
if (e.processed) return e;
e.processed = !0;
var t, a = e.domNode, n = a.parentNode;
for (s.put(a, e); n;) {
if (t = s.get(n)) {
t.processed || (t = o(t));
break
}
n = n.parentNode
}
return (t || i).children.push(e), e
}
}(a))
}), i;
function l() {
var e = $(t);
!e || "leave" === a && n.$$domOperationFired || e.end()
}
function c(e) {
t.off("$destroy", l), function (e) {
e.removeData(w)
}(t), v(t, n), we(t, n), n.domOperation(), r && u.removeClass(t, r), t.removeClass(k), i.complete(!e)
}
}
}]
}];
u.module("ngAnimate", []).directive("ngAnimateSwap", ["$animate", "$rootScope", function (r, e) {
return {
restrict: "A", transclude: "element", terminal: !0, priority: 600, link: function (t, a, e, n, i) {
var s, o;
t.$watchCollection(e.ngAnimateSwap || e.for, function (e) {
s && r.leave(s), o && (o.$destroy(), o = null), !e && 0 !== e || (o = t.$new(), i(o, function (e) {
s = e, r.enter(e, null, a)
}))
})
}
}
}]).directive("ngAnimateChildren", t).factory("$$rAFScheduler", ["$$rAF", function (a) {
var n, i;
function e(e) {
n = n.concat(e), s()
}
return n = e.queue = [], e.waitUntilQuiet = function (e) {
i && i(), i = a(function () {
i = null, e(), s()
})
}, e;
function s() {
if (n.length) {
for (var e = n.shift(), t = 0; t < e.length; t++) e[t]();
i || a(function () {
i || s()
})
}
}
}]).provider("$$animateQueue", y).provider("$$animation", b).provider("$animateCss", g).provider("$$animateCssDriver", f).provider("$$animateJs", h).provider("$$animateJsDriver", v)
}(window, window.angular), angular.module("ui.bootstrap", ["ui.bootstrap.tpls", "ui.bootstrap.collapse", "ui.bootstrap.tabindex", "ui.bootstrap.accordion", "ui.bootstrap.alert", "ui.bootstrap.buttons", "ui.bootstrap.carousel", "ui.bootstrap.dateparser", "ui.bootstrap.isClass", "ui.bootstrap.datepicker", "ui.bootstrap.position", "ui.bootstrap.datepickerPopup", "ui.bootstrap.debounce", "ui.bootstrap.dropdown", "ui.bootstrap.stackedMap", "ui.bootstrap.modal", "ui.bootstrap.paging", "ui.bootstrap.pager", "ui.bootstrap.pagination", "ui.bootstrap.tooltip", "ui.bootstrap.popover", "ui.bootstrap.progressbar", "ui.bootstrap.rating", "ui.bootstrap.tabs", "ui.bootstrap.timepicker", "ui.bootstrap.typeahead"]), angular.module("ui.bootstrap.tpls", ["uib/template/accordion/accordion-group.html", "uib/template/accordion/accordion.html", "uib/template/alert/alert.html", "uib/template/carousel/carousel.html", "uib/template/carousel/slide.html", "uib/template/datepicker/datepicker.html", "uib/template/datepicker/day.html", "uib/template/datepicker/month.html", "uib/template/datepicker/year.html", "uib/template/datepickerPopup/popup.html", "uib/template/modal/window.html", "uib/template/pager/pager.html", "uib/template/pagination/pagination.html", "uib/template/tooltip/tooltip-html-popup.html", "uib/template/tooltip/tooltip-popup.html", "uib/template/tooltip/tooltip-template-popup.html", "uib/template/popover/popover-html.html", "uib/template/popover/popover-template.html", "uib/template/popover/popover.html", "uib/template/progressbar/bar.html", "uib/template/progressbar/progress.html", "uib/template/progressbar/progressbar.html", "uib/template/rating/rating.html", "uib/template/tabs/tab.html", "uib/template/tabs/tabset.html", "uib/template/timepicker/timepicker.html", "uib/template/typeahead/typeahead-match.html", "uib/template/typeahead/typeahead-popup.html"]), angular.module("ui.bootstrap.collapse", []).directive("uibCollapse", ["$animate", "$q", "$parse", "$injector", function (m, g, f, e) {
var h = e.has("$animateCss") ? e.get("$animateCss") : null;
return {
link: function (t, a, e) {
var n = f(e.expanding), i = f(e.expanded), s = f(e.collapsing), o = f(e.collapsed), r = !1, l = {}, c = {};
function u(e) {
return r ? {width: e.scrollWidth + "px"} : {height: e.scrollHeight + "px"}
}
function d() {
a.removeClass("collapsing").addClass("collapse").css(l), i(t)
}
function p() {
a.css(c), a.removeClass("collapsing").addClass("collapse"), o(t)
}
!function () {
c = (r = !!("horizontal" in e)) ? (l = {
width: "auto",
height: "inherit"
}, {width: "0"}) : (l = {width: "inherit", height: "auto"}, {height: "0"});
t.$eval(e.uibCollapse) || a.addClass("in").addClass("collapse").attr("aria-expanded", !0).attr("aria-hidden", !1).css(l)
}(), t.$watch(e.uibCollapse, function (e) {
e ? function () {
if (!a.hasClass("collapse") && !a.hasClass("in")) return p();
g.resolve(s(t)).then(function () {
a.css(u(a[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded", !1).attr("aria-hidden", !0), h ? h(a, {
removeClass: "in",
to: c
}).start().finally(p) : m.removeClass(a, "in", {to: c}).then(p)
})
}() : a.hasClass("collapse") && a.hasClass("in") || g.resolve(n(t)).then(function () {
a.removeClass("collapse").addClass("collapsing").attr("aria-expanded", !0).attr("aria-hidden", !1), h ? h(a, {
addClass: "in",
easing: "ease",
to: u(a[0])
}).start().finally(d) : m.addClass(a, "in", {to: u(a[0])}).then(d)
})
})
}
}
}]), angular.module("ui.bootstrap.tabindex", []).directive("uibTabindexToggle", function () {
return {
restrict: "A", link: function (e, t, a) {
a.$observe("disabled", function (e) {
a.$set("tabindex", e ? -1 : null)
})
}
}
}), angular.module("ui.bootstrap.accordion", ["ui.bootstrap.collapse", "ui.bootstrap.tabindex"]).constant("uibAccordionConfig", {closeOthers: !0}).controller("UibAccordionController", ["$scope", "$attrs", "uibAccordionConfig", function (e, a, n) {
this.groups = [], this.closeOthers = function (t) {
(angular.isDefined(a.closeOthers) ? e.$eval(a.closeOthers) : n.closeOthers) && angular.forEach(this.groups, function (e) {
e !== t && (e.isOpen = !1)
})
}, this.addGroup = function (t) {
var a = this;
this.groups.push(t), t.$on("$destroy", function (e) {
a.removeGroup(t)
})
}, this.removeGroup = function (e) {
var t = this.groups.indexOf(e);
-1 !== t && this.groups.splice(t, 1)
}
}]).directive("uibAccordion", function () {
return {
controller: "UibAccordionController",
controllerAs: "accordion",
transclude: !0,
templateUrl: function (e, t) {
return t.templateUrl || "uib/template/accordion/accordion.html"
}
}
}).directive("uibAccordionGroup", function () {
return {
require: "^uibAccordion", transclude: !0, restrict: "A", templateUrl: function (e, t) {
return t.templateUrl || "uib/template/accordion/accordion-group.html"
}, scope: {heading: "@", panelClass: "@?", isOpen: "=?", isDisabled: "=?"}, controller: function () {
this.setHeading = function (e) {
this.heading = e
}
}, link: function (t, a, e, n) {
a.addClass("panel"), n.addGroup(t), t.openClass = e.openClass || "panel-open", t.panelClass = e.panelClass || "panel-default", t.$watch("isOpen", function (e) {
a.toggleClass(t.openClass, !!e), e && n.closeOthers(t)
}), t.toggleOpen = function (e) {
t.isDisabled || e && 32 !== e.which || (t.isOpen = !t.isOpen)
};
var i = "accordiongroup-" + t.$id + "-" + Math.floor(1e4 * Math.random());
t.headingId = i + "-tab", t.panelId = i + "-panel"
}
}
}).directive("uibAccordionHeading", function () {
return {
transclude: !0, template: "", replace: !0, require: "^uibAccordionGroup", link: function (e, t, a, n, i) {
n.setHeading(i(e, angular.noop))
}
}
}).directive("uibAccordionTransclude", function () {
return {
require: "^uibAccordionGroup", link: function (e, a, t, n) {
e.$watch(function () {
return n[t.uibAccordionTransclude]
}, function (e) {
if (e) {
var t = angular.element(a[0].querySelector("uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"));
t.html(""), t.append(e)
}
})
}
}
}), angular.module("ui.bootstrap.alert", []).controller("UibAlertController", ["$scope", "$element", "$attrs", "$interpolate", "$timeout", function (e, t, a, n, i) {
e.closeable = !!a.close, t.addClass("alert"), a.$set("role", "alert"), e.closeable && t.addClass("alert-dismissible");
var s = angular.isDefined(a.dismissOnTimeout) ? n(a.dismissOnTimeout)(e.$parent) : null;
s && i(function () {
e.close()
}, parseInt(s, 10))
}]).directive("uibAlert", function () {
return {
controller: "UibAlertController", controllerAs: "alert", restrict: "A", templateUrl: function (e, t) {
return t.templateUrl || "uib/template/alert/alert.html"
}, transclude: !0, scope: {close: "&"}
}
}), angular.module("ui.bootstrap.buttons", []).constant("uibButtonConfig", {
activeClass: "active",
toggleEvent: "click"
}).controller("UibButtonsController", ["uibButtonConfig", function (e) {
this.activeClass = e.activeClass || "active", this.toggleEvent = e.toggleEvent || "click"
}]).directive("uibBtnRadio", ["$parse", function (r) {
return {
require: ["uibBtnRadio", "ngModel"],
controller: "UibButtonsController",
controllerAs: "buttons",
link: function (t, a, n, e) {
var i = e[0], s = e[1], o = r(n.uibUncheckable);
a.find("input").css({display: "none"}), s.$render = function () {
a.toggleClass(i.activeClass, angular.equals(s.$modelValue, t.$eval(n.uibBtnRadio)))
}, a.on(i.toggleEvent, function () {
if (!n.disabled) {
var e = a.hasClass(i.activeClass);
e && !angular.isDefined(n.uncheckable) || t.$apply(function () {
s.$setViewValue(e ? null : t.$eval(n.uibBtnRadio)), s.$render()
})
}
}), n.uibUncheckable && t.$watch(o, function (e) {
n.$set("uncheckable", e ? "" : void 0)
})
}
}
}]).directive("uibBtnCheckbox", function () {
return {
require: ["uibBtnCheckbox", "ngModel"],
controller: "UibButtonsController",
controllerAs: "button",
link: function (a, e, t, n) {
var i = n[0], s = n[1];
function o() {
return r(t.btnCheckboxTrue, !0)
}
function r(e, t) {
return angular.isDefined(e) ? a.$eval(e) : t
}
e.find("input").css({display: "none"}), s.$render = function () {
e.toggleClass(i.activeClass, angular.equals(s.$modelValue, o()))
}, e.on(i.toggleEvent, function () {
t.disabled || a.$apply(function () {
s.$setViewValue(e.hasClass(i.activeClass) ? r(t.btnCheckboxFalse, !1) : o()), s.$render()
})
})
}
}
}), angular.module("ui.bootstrap.carousel", []).controller("UibCarouselController", ["$scope", "$element", "$interval", "$timeout", "$animate", function (o, i, t, e, r) {
var a, n, l = this, c = l.slides = o.slides = [], u = "uib-slideDirection", d = o.active, p = [], m = !1;
function g() {
for (; p.length;) p.shift()
}
function f(e) {
for (var t = 0; t < c.length; t++) c[t].slide.active = t === e
}
function s(e) {
for (var t = 0; t < c.length; t++) if (c[t].slide === e) return t
}
function h() {
a && (t.cancel(a), a = null)
}
function v() {
h();
var e = +o.interval;
!isNaN(e) && 0 < e && (a = t(y, e))
}
function y() {
var e = +o.interval;
n && !isNaN(e) && 0 < e && c.length ? o.next() : o.pause()
}
i.addClass("carousel"), l.addSlide = function (e, t) {
c.push({slide: e, element: t}), c.sort(function (e, t) {
return +e.slide.index - +t.slide.index
}), e.index !== o.active && (1 !== c.length || angular.isNumber(o.active)) || (o.$currentTransition && (o.$currentTransition = null), d = e.index, o.active = e.index, f(d), l.select(c[s(e)]), 1 === c.length && o.play())
}, l.getCurrentIndex = function () {
for (var e = 0; e < c.length; e++) if (c[e].slide.index === d) return e
}, l.next = o.next = function () {
var e = (l.getCurrentIndex() + 1) % c.length;
if (0 != e || !o.noWrap()) return l.select(c[e], "next");
o.pause()
}, l.prev = o.prev = function () {
var e = l.getCurrentIndex() - 1 < 0 ? c.length - 1 : l.getCurrentIndex() - 1;
if (!o.noWrap() || e != c.length - 1) return l.select(c[e], "prev");
o.pause()
}, l.removeSlide = function (e) {
var t = s(e), a = p.indexOf(c[t]);
-1 !== a && p.splice(a, 1), c.splice(t, 1), 0 < c.length && d === t ? t >= c.length ? (d = c.length - 1, f(o.active = d), l.select(c[c.length - 1])) : (d = t, f(o.active = d), l.select(c[t])) : t < d && (d--, o.active = d), 0 === c.length && (d = null, o.active = null, g())
}, l.select = o.select = function (e, t) {
var a = s(e.slide);
void 0 === t && (t = a > l.getCurrentIndex() ? "next" : "prev"), e.slide.index === d || o.$currentTransition ? e && e.slide.index !== d && o.$currentTransition && p.push(c[a]) : function s(e, t, a) {
if (m) return;
angular.extend(e, {direction: a});
angular.extend(c[d].slide || {}, {direction: a});
if (r.enabled(i) && !o.$currentTransition && c[t].element && 1 < l.slides.length) {
c[t].element.data(u, e.direction);
var n = l.getCurrentIndex();
angular.isNumber(n) && c[n].element && c[n].element.data(u, e.direction), o.$currentTransition = !0, r.on("addClass", c[t].element, function (e, t) {
if ("close" === t && (o.$currentTransition = null, r.off("addClass", e), p.length)) {
var a = p.pop().slide, n = a.index, i = n > l.getCurrentIndex() ? "next" : "prev";
g(), s(a, n, i)
}
})
}
o.active = e.index;
d = e.index;
f(t);
v()
}(e.slide, a, t)
}, o.indexOfSlide = function (e) {
return +e.slide.index
}, o.isActive = function (e) {
return o.active === e.slide.index
}, o.isPrevDisabled = function () {
return 0 === o.active && o.noWrap()
}, o.isNextDisabled = function () {
return o.active === c.length - 1 && o.noWrap()
}, o.pause = function () {
o.noPause || (n = !1, h())
}, o.play = function () {
n || (n = !0, v())
}, i.on("mouseenter", o.pause), i.on("mouseleave", o.play), o.$on("$destroy", function () {
m = !0, h()
}), o.$watch("noTransition", function (e) {
r.enabled(i, !e)
}), o.$watch("interval", v), o.$watchCollection("slides", function (e) {
e.length || (o.$currentTransition = null, g())
}), o.$watch("active", function (e) {
if (angular.isNumber(e) && d !== e) {
for (var t = 0; t < c.length; t++) if (c[t].slide.index === e) {
e = t;
break
}
c[e] && (f(e), l.select(c[e]), d = e)
}
})
}]).directive("uibCarousel", function () {
return {
transclude: !0,
controller: "UibCarouselController",
controllerAs: "carousel",
restrict: "A",
templateUrl: function (e, t) {
return t.templateUrl || "uib/template/carousel/carousel.html"
},
scope: {active: "=", interval: "=", noTransition: "=", noPause: "=", noWrap: "&"}
}
}).directive("uibSlide", ["$animate", function (i) {
return {
require: "^uibCarousel", restrict: "A", transclude: !0, templateUrl: function (e, t) {
return t.templateUrl || "uib/template/carousel/slide.html"
}, scope: {actual: "=?", index: "=?"}, link: function (e, t, a, n) {
t.addClass("item"), n.addSlide(e, t), e.$on("$destroy", function () {
n.removeSlide(e)
}), e.$watch("active", function (e) {
i[e ? "addClass" : "removeClass"](t, "active")
})
}
}
}]).animation(".item", ["$animateCss", function (o) {
var r = "uib-slideDirection";
function l(e, t, a) {
e.removeClass(t), a && a()
}
return {
beforeAddClass: function (e, t, a) {
if ("active" === t) {
var n = e.data(r), i = "next" === n ? "left" : "right", s = l.bind(this, e, i + " " + n, a);
return e.addClass(n), o(e, {addClass: i}).start().done(s), function () {
!0
}
}
a()
}, beforeRemoveClass: function (e, t, a) {
if ("active" === t) {
var n = "next" === e.data(r) ? "left" : "right", i = l.bind(this, e, n, a);
return o(e, {addClass: n}).start().done(i), function () {
!0
}
}
a()
}
}
}]), angular.module("ui.bootstrap.dateparser", []).service("uibDateParser", ["$log", "$locale", "dateFilter", "orderByFilter", function (f, h, a, v) {
var y, b, w = /[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;
function s(e, t, a) {
return function () {
return e.substr(t + 1, a - t - 1)
}
}
function o(e, t) {
for (var a = e.substr(t), n = 0; n < b.length; n++) if (new RegExp("^" + b[n].key).test(a)) {
var i = b[n];
return {endIdx: t + i.key.length, parser: i.formatter}
}
return {
endIdx: t + 1, parser: function () {
return a.charAt(0)
}
}
}
function r(e) {
return parseInt(e, 10)
}
function i(e, t) {
e = e.replace(/:/g, "");
var a = Date.parse("Jan 01, 1970 00:00:00 " + e) / 6e4;
return isNaN(a) ? t : a
}
function l(e, t) {
return (e = new Date(e.getTime())).setMinutes(e.getMinutes() + t), e
}
function n(e, t, a) {
a = a ? -1 : 1;
var n = e.getTimezoneOffset();
return l(e, a * (i(t, n) - n))
}
this.init = function () {
y = h.id, this.parsers = {}, this.formatters = {}, b = [{
key: "yyyy", regex: "\\d{4}", apply: function (e) {
this.year = +e
}, formatter: function (e) {
var t = new Date;
return t.setFullYear(Math.abs(e.getFullYear())), a(t, "yyyy")
}
}, {
key: "yy", regex: "\\d{2}", apply: function (e) {
e = +e, this.year = e < 69 ? e + 2e3 : e + 1900
}, formatter: function (e) {
var t = new Date;
return t.setFullYear(Math.abs(e.getFullYear())), a(t, "yy")
}
}, {
key: "y", regex: "\\d{1,4}", apply: function (e) {
this.year = +e
}, formatter: function (e) {
var t = new Date;
return t.setFullYear(Math.abs(e.getFullYear())), a(t, "y")
}
}, {
key: "M!", regex: "0?[1-9]|1[0-2]", apply: function (e) {
this.month = e - 1
}, formatter: function (e) {
var t = e.getMonth();
return /^[0-9]$/.test(t) ? a(e, "MM") : a(e, "M")
}
}, {
key: "MMMM", regex: h.DATETIME_FORMATS.MONTH.join("|"), apply: function (e) {
this.month = h.DATETIME_FORMATS.MONTH.indexOf(e)
}, formatter: function (e) {
return a(e, "MMMM")
}
}, {
key: "MMM", regex: h.DATETIME_FORMATS.SHORTMONTH.join("|"), apply: function (e) {
this.month = h.DATETIME_FORMATS.SHORTMONTH.indexOf(e)
}, formatter: function (e) {
return a(e, "MMM")
}
}, {
key: "MM", regex: "0[1-9]|1[0-2]", apply: function (e) {
this.month = e - 1
}, formatter: function (e) {
return a(e, "MM")
}
}, {
key: "M", regex: "[1-9]|1[0-2]", apply: function (e) {
this.month = e - 1
}, formatter: function (e) {
return a(e, "M")
}
}, {
key: "d!", regex: "[0-2]?[0-9]{1}|3[0-1]{1}", apply: function (e) {
this.date = +e
}, formatter: function (e) {
var t = e.getDate();
return /^[1-9]$/.test(t) ? a(e, "dd") : a(e, "d")
}
}, {
key: "dd", regex: "[0-2][0-9]{1}|3[0-1]{1}", apply: function (e) {
this.date = +e
}, formatter: function (e) {
return a(e, "dd")
}
}, {
key: "d", regex: "[1-2]?[0-9]{1}|3[0-1]{1}", apply: function (e) {
this.date = +e
}, formatter: function (e) {
return a(e, "d")
}
}, {
key: "EEEE", regex: h.DATETIME_FORMATS.DAY.join("|"), formatter: function (e) {
return a(e, "EEEE")
}
}, {
key: "EEE", regex: h.DATETIME_FORMATS.SHORTDAY.join("|"), formatter: function (e) {
return a(e, "EEE")
}
}, {
key: "HH", regex: "(?:0|1)[0-9]|2[0-3]", apply: function (e) {
this.hours = +e
}, formatter: function (e) {
return a(e, "HH")
}
}, {
key: "hh", regex: "0[0-9]|1[0-2]", apply: function (e) {
this.hours = +e
}, formatter: function (e) {
return a(e, "hh")
}
}, {
key: "H", regex: "1?[0-9]|2[0-3]", apply: function (e) {
this.hours = +e
}, formatter: function (e) {
return a(e, "H")
}
}, {
key: "h", regex: "[0-9]|1[0-2]", apply: function (e) {
this.hours = +e
}, formatter: function (e) {
return a(e, "h")
}
}, {
key: "mm", regex: "[0-5][0-9]", apply: function (e) {
this.minutes = +e
}, formatter: function (e) {
return a(e, "mm")
}
}, {
key: "m", regex: "[0-9]|[1-5][0-9]", apply: function (e) {
this.minutes = +e
}, formatter: function (e) {
return a(e, "m")
}
}, {
key: "sss", regex: "[0-9][0-9][0-9]", apply: function (e) {
this.milliseconds = +e
}, formatter: function (e) {
return a(e, "sss")
}
}, {
key: "ss", regex: "[0-5][0-9]", apply: function (e) {
this.seconds = +e
}, formatter: function (e) {
return a(e, "ss")
}
}, {
key: "s", regex: "[0-9]|[1-5][0-9]", apply: function (e) {
this.seconds = +e
}, formatter: function (e) {
return a(e, "s")
}
}, {
key: "a", regex: h.DATETIME_FORMATS.AMPMS.join("|"), apply: function (e) {
12 === this.hours && (this.hours = 0), "PM" === e && (this.hours += 12)
}, formatter: function (e) {
return a(e, "a")
}
}, {
key: "Z", regex: "[+-]\\d{4}", apply: function (e) {
var t = e.match(/([+-])(\d{2})(\d{2})/), a = t[1], n = t[2], i = t[3];
this.hours += r(a + n), this.minutes += r(a + i)
}, formatter: function (e) {
return a(e, "Z")
}
}, {
key: "ww", regex: "[0-4][0-9]|5[0-3]", formatter: function (e) {
return a(e, "ww")
}
}, {
key: "w", regex: "[0-9]|[1-4][0-9]|5[0-3]", formatter: function (e) {
return a(e, "w")
}
}, {
key: "GGGG", regex: h.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g, "\\s"), formatter: function (e) {
return a(e, "GGGG")
}
}, {
key: "GGG", regex: h.DATETIME_FORMATS.ERAS.join("|"), formatter: function (e) {
return a(e, "GGG")
}
}, {
key: "GG", regex: h.DATETIME_FORMATS.ERAS.join("|"), formatter: function (e) {
return a(e, "GG")
}
}, {
key: "G", regex: h.DATETIME_FORMATS.ERAS.join("|"), formatter: function (e) {
return a(e, "G")
}
}]
}, this.init(), this.filter = function (a, e) {
return angular.isDate(a) && !isNaN(a) && e ? (e = h.DATETIME_FORMATS[e] || e, h.id !== y && this.init(), this.formatters[e] || (this.formatters[e] = function (e) {
for (var t, a, n = [], i = 0; i < e.length;) if (angular.isNumber(a)) {
if ("'" === e.charAt(i)) (i + 1 >= e.length || "'" !== e.charAt(i + 1)) && (n.push(s(e, a, i)), a = null); else if (i === e.length) for (; a < e.length;) t = o(e, a), n.push(t), a = t.endIdx;
i++
} else "'" !== e.charAt(i) ? (t = o(e, i), n.push(t.parser), i = t.endIdx) : (a = i, i++);
return n
}(e)), this.formatters[e].reduce(function (e, t) {
return e + t(a)
}, "")) : ""
}, this.parse = function (e, t, a) {
if (!angular.isString(e) || !t) return e;
t = (t = h.DATETIME_FORMATS[t] || t).replace(w, "\\$&"), h.id !== y && this.init(), this.parsers[t] || (this.parsers[t] = function (i) {
var s = [], o = i.split(""), e = i.indexOf("'");
if (-1 < e) {
var t = !1;
i = i.split("");
for (var a = e; a < i.length; a++) t ? ("'" === i[a] && (a + 1 < i.length && "'" === i[a + 1] ? (i[a + 1] = "$", o[a + 1] = "") : (o[a] = "", t = !1)), i[a] = "$") : "'" === i[a] && (i[a] = "$", t = !(o[a] = ""));
i = i.join("")
}
return angular.forEach(b, function (e) {
var t = i.indexOf(e.key);
if (-1 < t) {
i = i.split(""), o[t] = "(" + e.regex + ")", i[t] = "$";
for (var a = t + 1, n = t + e.key.length; a < n; a++) o[a] = "", i[a] = "$";
i = i.join(""), s.push({index: t, key: e.key, apply: e.apply, matcher: e.regex})
}
}), {regex: new RegExp("^" + o.join("") + "$"), map: v(s, "index")}
}(t));
var n = this.parsers[t], i = n.regex, s = n.map, o = e.match(i), r = !1;
if (o && o.length) {
var l, c;
l = angular.isDate(a) && !isNaN(a.getTime()) ? {
year: a.getFullYear(),
month: a.getMonth(),
date: a.getDate(),
hours: a.getHours(),
minutes: a.getMinutes(),
seconds: a.getSeconds(),
milliseconds: a.getMilliseconds()
} : (a && f.warn("dateparser:", "baseDate is not a valid date"), {
year: 1900,
month: 0,
date: 1,
hours: 0,
minutes: 0,
seconds: 0,
milliseconds: 0
});
for (var u = 1, d = o.length; u < d; u++) {
var p = s[u - 1];
"Z" === p.matcher && (r = !0), p.apply && p.apply.call(l, o[u])
}
var m = r ? Date.prototype.setUTCFullYear : Date.prototype.setFullYear,
g = r ? Date.prototype.setUTCHours : Date.prototype.setHours;
return function (e, t, a) {
if (a < 1) return !1;
if (1 === t && 28 < a) return 29 === a && (e % 4 == 0 && e % 100 != 0 || e % 400 == 0);
return 3 !== t && 5 !== t && 8 !== t && 10 !== t || a < 31
}(l.year, l.month, l.date) && (!angular.isDate(a) || isNaN(a.getTime()) || r ? (c = new Date(0), m.call(c, l.year, l.month, l.date), g.call(c, l.hours || 0, l.minutes || 0, l.seconds || 0, l.milliseconds || 0)) : (c = new Date(a), m.call(c, l.year, l.month, l.date), g.call(c, l.hours, l.minutes, l.seconds, l.milliseconds))), c
}
}, this.toTimezone = function (e, t) {
return e && t ? n(e, t) : e
}, this.fromTimezone = function (e, t) {
return e && t ? n(e, t, !0) : e
}, this.timezoneToOffset = i, this.addDateMinutes = l, this.convertTimezoneToLocal = n
}]), angular.module("ui.bootstrap.isClass", []).directive("uibIsClass", ["$animate", function (u) {
var o = /^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/, d = /^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;
return {
restrict: "A", compile: function (e, t) {
var i = [], r = [], l = {}, a = t.uibIsClass.match(o), c = a[2], n = a[1].split(",");
return function (a, e, t) {
i.push(a), r.push({scope: a, element: e}), n.forEach(function (e, t) {
!function (e, t) {
var a = e.match(d), n = t.$eval(a[1]), i = a[2], s = l[e];
if (!s) {
function o(t) {
var a = null;
r.some(function (e) {
if (e.scope.$eval(c) === t) return a = e, !0
}), s.lastActivated !== a && (s.lastActivated && u.removeClass(s.lastActivated.element, n), a && u.addClass(a.element, n), s.lastActivated = a)
}
l[e] = s = {
lastActivated: null,
scope: t,
watchFn: o,
compareWithExp: i,
watcher: t.$watch(i, o)
}
}
s.watchFn(t.$eval(i))
}(e, a)
}), a.$on("$destroy", s)
};
function s(e) {
var t = e.targetScope, a = i.indexOf(t);
if (i.splice(a, 1), r.splice(a, 1), i.length) {
var n = i[0];
angular.forEach(l, function (e) {
e.scope === t && (e.watcher = n.$watch(e.compareWithExp, e.watchFn), e.scope = n)
})
} else l = {}
}
}
}
}]), angular.module("ui.bootstrap.datepicker", ["ui.bootstrap.dateparser", "ui.bootstrap.isClass"]).value("$datepickerSuppressError", !1).value("$datepickerLiteralWarning", !0).constant("uibDatepickerConfig", {
datepickerMode: "day",
formatDay: "dd",
formatMonth: "MMMM",
formatYear: "yyyy",
formatDayHeader: "EEE",
formatDayTitle: "MMMM yyyy",
formatMonthTitle: "yyyy",
maxDate: null,
maxMode: "year",
minDate: null,
minMode: "day",
monthColumns: 3,
ngModelOptions: {},
shortcutPropagation: !1,
showWeeks: !0,
yearColumns: 5,
yearRows: 4
}).controller("UibDatepickerController", ["$scope", "$element", "$attrs", "$parse", "$interpolate", "$locale", "$log", "dateFilter", "uibDatepickerConfig", "$datepickerLiteralWarning", "$datepickerSuppressError", "uibDateParser", function (o, e, t, a, n, i, s, r, l, c, u, d) {
var p = this, m = {$setViewValue: angular.noop}, g = {}, f = [];
e.addClass("uib-datepicker"), t.$set("role", "application"), o.datepickerOptions || (o.datepickerOptions = {}), this.modes = ["day", "month", "year"], ["customClass", "dateDisabled", "datepickerMode", "formatDay", "formatDayHeader", "formatDayTitle", "formatMonth", "formatMonthTitle", "formatYear", "maxDate", "maxMode", "minDate", "minMode", "monthColumns", "showWeeks", "shortcutPropagation", "startingDay", "yearColumns", "yearRows"].forEach(function (t) {
switch (t) {
case"customClass":
case"dateDisabled":
o[t] = o.datepickerOptions[t] || angular.noop;
break;
case"datepickerMode":
o.datepickerMode = angular.isDefined(o.datepickerOptions.datepickerMode) ? o.datepickerOptions.datepickerMode : l.datepickerMode;
break;
case"formatDay":
case"formatDayHeader":
case"formatDayTitle":
case"formatMonth":
case"formatMonthTitle":
case"formatYear":
p[t] = angular.isDefined(o.datepickerOptions[t]) ? n(o.datepickerOptions[t])(o.$parent) : l[t];
break;
case"monthColumns":
case"showWeeks":
case"shortcutPropagation":
case"yearColumns":
case"yearRows":
p[t] = angular.isDefined(o.datepickerOptions[t]) ? o.datepickerOptions[t] : l[t];
break;
case"startingDay":
angular.isDefined(o.datepickerOptions.startingDay) ? p.startingDay = o.datepickerOptions.startingDay : angular.isNumber(l.startingDay) ? p.startingDay = l.startingDay : p.startingDay = (i.DATETIME_FORMATS.FIRSTDAYOFWEEK + 8) % 7;
break;
case"maxDate":
case"minDate":
o.$watch("datepickerOptions." + t, function (e) {
e ? angular.isDate(e) ? p[t] = d.fromTimezone(new Date(e), g.timezone) : (c && s.warn("Literal date support has been deprecated, please switch to date object usage"), p[t] = new Date(r(e, "medium"))) : p[t] = l[t] ? d.fromTimezone(new Date(l[t]), g.timezone) : null, p.refreshView()
});
break;
case"maxMode":
case"minMode":
o.datepickerOptions[t] ? o.$watch(function () {
return o.datepickerOptions[t]
}, function (e) {
p[t] = o[t] = angular.isDefined(e) ? e : datepickerOptions[t], ("minMode" === t && p.modes.indexOf(o.datepickerOptions.datepickerMode) < p.modes.indexOf(p[t]) || "maxMode" === t && p.modes.indexOf(o.datepickerOptions.datepickerMode) > p.modes.indexOf(p[t])) && (o.datepickerMode = p[t], o.datepickerOptions.datepickerMode = p[t])
}) : p[t] = o[t] = l[t] || null
}
}), o.uniqueId = "datepicker-" + o.$id + "-" + Math.floor(1e4 * Math.random()), o.disabled = angular.isDefined(t.disabled) || !1, angular.isDefined(t.ngDisabled) && f.push(o.$parent.$watch(t.ngDisabled, function (e) {
o.disabled = e, p.refreshView()
})), o.isActive = function (e) {
return 0 === p.compare(e.date, p.activeDate) && (o.activeDateId = e.uid, !0)
}, this.init = function (e) {
g = (m = e).$options || o.datepickerOptions.ngModelOptions || l.ngModelOptions, o.datepickerOptions.initDate ? (p.activeDate = d.fromTimezone(o.datepickerOptions.initDate, g.timezone) || new Date, o.$watch("datepickerOptions.initDate", function (e) {
e && (m.$isEmpty(m.$modelValue) || m.$invalid) && (p.activeDate = d.fromTimezone(e, g.timezone), p.refreshView())
})) : p.activeDate = new Date;
var t = m.$modelValue ? new Date(m.$modelValue) : new Date;
this.activeDate = isNaN(t) ? d.fromTimezone(new Date, g.timezone) : d.fromTimezone(t, g.timezone), m.$render = function () {
p.render()
}
}, this.render = function () {
if (m.$viewValue) {
var e = new Date(m.$viewValue);
!isNaN(e) ? this.activeDate = d.fromTimezone(e, g.timezone) : u || s.error('Datepicker directive: "ng-model" value must be a Date object')
}
this.refreshView()
}, this.refreshView = function () {
if (this.element) {
o.selectedDt = null, this._refreshView(), o.activeDt && (o.activeDateId = o.activeDt.uid);
var e = m.$viewValue ? new Date(m.$viewValue) : null;
e = d.fromTimezone(e, g.timezone), m.$setValidity("dateDisabled", !e || this.element && !this.isDisabled(e))
}
}, this.createDateObject = function (e, t) {
var a = m.$viewValue ? new Date(m.$viewValue) : null;
a = d.fromTimezone(a, g.timezone);
var n = new Date;
n = d.fromTimezone(n, g.timezone);
var i = this.compare(e, n), s = {
date: e,
label: d.filter(e, t),
selected: a && 0 === this.compare(e, a),
disabled: this.isDisabled(e),
past: i < 0,
current: 0 === i,
future: 0 < i,
customClass: this.customClass(e) || null
};
return a && 0 === this.compare(e, a) && (o.selectedDt = s), p.activeDate && 0 === this.compare(s.date, p.activeDate) && (o.activeDt = s), s
}, this.isDisabled = function (e) {
return o.disabled || this.minDate && this.compare(e, this.minDate) < 0 || this.maxDate && 0 < this.compare(e, this.maxDate) || o.dateDisabled && o.dateDisabled({
date: e,
mode: o.datepickerMode
})
}, this.customClass = function (e) {
return o.customClass({date: e, mode: o.datepickerMode})
}, this.split = function (e, t) {
for (var a = []; 0 < e.length;) a.push(e.splice(0, t));
return a
}, o.select = function (e) {
if (o.datepickerMode === p.minMode) {
var t = m.$viewValue ? d.fromTimezone(new Date(m.$viewValue), g.timezone) : new Date(0, 0, 0, 0, 0, 0, 0);
t.setFullYear(e.getFullYear(), e.getMonth(), e.getDate()), t = d.toTimezone(t, g.timezone), m.$setViewValue(t), m.$render()
} else p.activeDate = e, h(p.modes[p.modes.indexOf(o.datepickerMode) - 1]), o.$emit("uib:datepicker.mode");
o.$broadcast("uib:datepicker.focus")
}, o.move = function (e) {
var t = p.activeDate.getFullYear() + e * (p.step.years || 0),
a = p.activeDate.getMonth() + e * (p.step.months || 0);
p.activeDate.setFullYear(t, a, 1), p.refreshView()
}, o.toggleMode = function (e) {
e = e || 1, o.datepickerMode === p.maxMode && 1 === e || o.datepickerMode === p.minMode && -1 === e || (h(p.modes[p.modes.indexOf(o.datepickerMode) + e]), o.$emit("uib:datepicker.mode"))
}, o.keys = {
13: "enter",
32: "space",
33: "pageup",
34: "pagedown",
35: "end",
36: "home",
37: "left",
38: "up",
39: "right",
40: "down"
};
function h(e) {
o.datepickerMode = e, o.datepickerOptions.datepickerMode = e
}
o.$on("uib:datepicker.focus", function () {
p.element[0].focus()
}), o.keydown = function (e) {
var t = o.keys[e.which];
if (t && !e.shiftKey && !e.altKey && !o.disabled) if (e.preventDefault(), p.shortcutPropagation || e.stopPropagation(), "enter" === t || "space" === t) {
if (p.isDisabled(p.activeDate)) return;
o.select(p.activeDate)
} else !e.ctrlKey || "up" !== t && "down" !== t ? (p.handleKeyDown(t, e), p.refreshView()) : o.toggleMode("up" === t ? 1 : -1)
}, e.on("keydown", function (e) {
o.$apply(function () {
o.keydown(e)
})
}), o.$on("$destroy", function () {
for (; f.length;) f.shift()()
})
}]).controller("UibDaypickerController", ["$scope", "$element", "dateFilter", function (p, e, m) {
var a = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
function i(e, t) {
return 1 !== t || e % 4 != 0 || e % 100 == 0 && e % 400 != 0 ? a[t] : 29
}
function g(e) {
var t = new Date(e);
t.setDate(t.getDate() + 4 - (t.getDay() || 7));
var a = t.getTime();
return t.setMonth(0), t.setDate(1), Math.floor(Math.round((a - t) / 864e5) / 7) + 1
}
this.step = {months: 1}, this.element = e, this.init = function (e) {
angular.extend(e, this), p.showWeeks = e.showWeeks, e.refreshView()
}, this.getDates = function (e, t) {
for (var a, n = new Array(t), i = new Date(e), s = 0; s < t;) a = new Date(i), n[s++] = a, i.setDate(i.getDate() + 1);
return n
}, this._refreshView = function () {
var e = this.activeDate.getFullYear(), t = this.activeDate.getMonth(), a = new Date(this.activeDate);
a.setFullYear(e, t, 1);
var n = this.startingDay - a.getDay(), i = 0 < n ? 7 - n : -n, s = new Date(a);
0 < i && s.setDate(1 - i);
for (var o = this.getDates(s, 42), r = 0; r < 42; r++) o[r] = angular.extend(this.createDateObject(o[r], this.formatDay), {
secondary: o[r].getMonth() !== t,
uid: p.uniqueId + "-" + r
});
p.labels = new Array(7);
for (var l = 0; l < 7; l++) p.labels[l] = {
abbr: m(o[l].date, this.formatDayHeader),
full: m(o[l].date, "EEEE")
};
if (p.title = m(this.activeDate, this.formatDayTitle), p.rows = this.split(o, 7), p.showWeeks) {
p.weekNumbers = [];
for (var c = (11 - this.startingDay) % 7, u = p.rows.length, d = 0; d < u; d++) p.weekNumbers.push(g(p.rows[d][c].date))
}
}, this.compare = function (e, t) {
var a = new Date(e.getFullYear(), e.getMonth(), e.getDate()),
n = new Date(t.getFullYear(), t.getMonth(), t.getDate());
return a.setFullYear(e.getFullYear()), n.setFullYear(t.getFullYear()), a - n
}, this.handleKeyDown = function (e, t) {
var a = this.activeDate.getDate();
if ("left" === e) a -= 1; else if ("up" === e) a -= 7; else if ("right" === e) a += 1; else if ("down" === e) a += 7; else if ("pageup" === e || "pagedown" === e) {
var n = this.activeDate.getMonth() + ("pageup" === e ? -1 : 1);
this.activeDate.setMonth(n, 1), a = Math.min(i(this.activeDate.getFullYear(), this.activeDate.getMonth()), a)
} else "home" === e ? a = 1 : "end" === e && (a = i(this.activeDate.getFullYear(), this.activeDate.getMonth()));
this.activeDate.setDate(a)
}
}]).controller("UibMonthpickerController", ["$scope", "$element", "dateFilter", function (i, e, s) {
this.step = {years: 1}, this.element = e, this.init = function (e) {
angular.extend(e, this), e.refreshView()
}, this._refreshView = function () {
for (var e, t = new Array(12), a = this.activeDate.getFullYear(), n = 0; n < 12; n++) (e = new Date(this.activeDate)).setFullYear(a, n, 1), t[n] = angular.extend(this.createDateObject(e, this.formatMonth), {uid: i.uniqueId + "-" + n});
i.title = s(this.activeDate, this.formatMonthTitle), i.rows = this.split(t, this.monthColumns), i.yearHeaderColspan = 3 < this.monthColumns ? this.monthColumns - 2 : 1
}, this.compare = function (e, t) {
var a = new Date(e.getFullYear(), e.getMonth()), n = new Date(t.getFullYear(), t.getMonth());
return a.setFullYear(e.getFullYear()), n.setFullYear(t.getFullYear()), a - n
}, this.handleKeyDown = function (e, t) {
var a = this.activeDate.getMonth();
if ("left" === e) a -= 1; else if ("up" === e) a -= this.monthColumns; else if ("right" === e) a += 1; else if ("down" === e) a += this.monthColumns; else if ("pageup" === e || "pagedown" === e) {
var n = this.activeDate.getFullYear() + ("pageup" === e ? -1 : 1);
this.activeDate.setFullYear(n)
} else "home" === e ? a = 0 : "end" === e && (a = 11);
this.activeDate.setMonth(a)
}
}]).controller("UibYearpickerController", ["$scope", "$element", "dateFilter", function (i, e, t) {
var s, o;
function r(e) {
return parseInt((e - 1) / o, 10) * o + 1
}
this.element = e, this.yearpickerInit = function () {
s = this.yearColumns, o = this.yearRows * s, this.step = {years: o}
}, this._refreshView = function () {
for (var e, t = new Array(o), a = 0, n = r(this.activeDate.getFullYear()); a < o; a++) (e = new Date(this.activeDate)).setFullYear(n + a, 0, 1), t[a] = angular.extend(this.createDateObject(e, this.formatYear), {uid: i.uniqueId + "-" + a});
i.title = [t[0].label, t[o - 1].label].join(" - "), i.rows = this.split(t, s), i.columns = s
}, this.compare = function (e, t) {
return e.getFullYear() - t.getFullYear()
}, this.handleKeyDown = function (e, t) {
var a = this.activeDate.getFullYear();
"left" === e ? a -= 1 : "up" === e ? a -= s : "right" === e ? a += 1 : "down" === e ? a += s : "pageup" === e || "pagedown" === e ? a += ("pageup" === e ? -1 : 1) * o : "home" === e ? a = r(this.activeDate.getFullYear()) : "end" === e && (a = r(this.activeDate.getFullYear()) + o - 1), this.activeDate.setFullYear(a)
}
}]).directive("uibDatepicker", function () {
return {
templateUrl: function (e, t) {
return t.templateUrl || "uib/template/datepicker/datepicker.html"
},
scope: {datepickerOptions: "=?"},
require: ["uibDatepicker", "^ngModel"],
restrict: "A",
controller: "UibDatepickerController",
controllerAs: "datepicker",
link: function (e, t, a, n) {
var i = n[0], s = n[1];
i.init(s)
}
}
}).directive("uibDaypicker", function () {
return {
templateUrl: function (e, t) {
return t.templateUrl || "uib/template/datepicker/day.html"
},
require: ["^uibDatepicker", "uibDaypicker"],
restrict: "A",
controller: "UibDaypickerController",
link: function (e, t, a, n) {
var i = n[0];
n[1].init(i)
}
}
}).directive("uibMonthpicker", function () {
return {
templateUrl: function (e, t) {
return t.templateUrl || "uib/template/datepicker/month.html"
},
require: ["^uibDatepicker", "uibMonthpicker"],
restrict: "A",
controller: "UibMonthpickerController",
link: function (e, t, a, n) {
var i = n[0];
n[1].init(i)
}
}
}).directive("uibYearpicker", function () {
return {
templateUrl: function (e, t) {
return t.templateUrl || "uib/template/datepicker/year.html"
},
require: ["^uibDatepicker", "uibYearpicker"],
restrict: "A",
controller: "UibYearpickerController",
link: function (e, t, a, n) {
var i = n[0];
angular.extend(i, n[1]), i.yearpickerInit(), i.refreshView()
}
}
}), angular.module("ui.bootstrap.position", []).factory("$uibPosition", ["$document", "$window", function (c, g) {
var n, i, u = {normal: /(auto|scroll)/, hidden: /(auto|scroll|hidden)/}, f = {
auto: /\s?auto?\s?/i,
primary: /^(top|bottom|left|right)$/,
secondary: /^(top|bottom|left|right|center)$/,
vertical: /^(top|bottom)$/
}, o = /(HTML|BODY)/;
return {
getRawNode: function (e) {
return e.nodeName ? e : e[0] || e
}, parseStyle: function (e) {
return e = parseFloat(e), isFinite(e) ? e : 0
}, offsetParent: function (e) {
var t, a = (e = this.getRawNode(e)).offsetParent || c[0].documentElement;
for (; a && a !== c[0].documentElement && (t = a, "static" === (g.getComputedStyle(t).position || "static"));) a = a.offsetParent;
return a || c[0].documentElement
}, scrollbarWidth: function (e) {
if (e) {
if (angular.isUndefined(i)) {
var t = c.find("body");
t.addClass("uib-position-body-scrollbar-measure"), i = g.innerWidth - t[0].clientWidth, i = isFinite(i) ? i : 0, t.removeClass("uib-position-body-scrollbar-measure")
}
return i
}
if (angular.isUndefined(n)) {
var a = angular.element('<div class="uib-position-scrollbar-measure"></div>');
c.find("body").append(a), n = a[0].offsetWidth - a[0].clientWidth, n = isFinite(n) ? n : 0, a.remove()
}
return n
}, scrollbarPadding: function (e) {
e = this.getRawNode(e);
var t = g.getComputedStyle(e), a = this.parseStyle(t.paddingRight), n = this.parseStyle(t.paddingBottom),
i = this.scrollParent(e, !1, !0), s = this.scrollbarWidth(i, o.test(i.tagName));
return {
scrollbarWidth: s,
widthOverflow: i.scrollWidth > i.clientWidth,
right: a + s,
originalRight: a,
heightOverflow: i.scrollHeight > i.clientHeight,
bottom: n + s,
originalBottom: n
}
}, isScrollable: function (e, t) {
e = this.getRawNode(e);
var a = t ? u.hidden : u.normal, n = g.getComputedStyle(e);
return a.test(n.overflow + n.overflowY + n.overflowX)
}, scrollParent: function (e, t, a) {
e = this.getRawNode(e);
var n = t ? u.hidden : u.normal, i = c[0].documentElement, s = g.getComputedStyle(e);
if (a && n.test(s.overflow + s.overflowY + s.overflowX)) return e;
var o = "absolute" === s.position, r = e.parentElement || i;
if (r === i || "fixed" === s.position) return i;
for (; r.parentElement && r !== i;) {
var l = g.getComputedStyle(r);
if (o && "static" !== l.position && (o = !1), !o && n.test(l.overflow + l.overflowY + l.overflowX)) break;
r = r.parentElement
}
return r
}, position: function (e, t) {
e = this.getRawNode(e);
var a = this.offset(e);
if (t) {
var n = g.getComputedStyle(e);
a.top -= this.parseStyle(n.marginTop), a.left -= this.parseStyle(n.marginLeft)
}
var i = this.offsetParent(e), s = {top: 0, left: 0};
return i !== c[0].documentElement && ((s = this.offset(i)).top += i.clientTop - i.scrollTop, s.left += i.clientLeft - i.scrollLeft), {
width: Math.round(angular.isNumber(a.width) ? a.width : e.offsetWidth),
height: Math.round(angular.isNumber(a.height) ? a.height : e.offsetHeight),
top: Math.round(a.top - s.top),
left: Math.round(a.left - s.left)
}
}, offset: function (e) {
var t = (e = this.getRawNode(e)).getBoundingClientRect();
return {
width: Math.round(angular.isNumber(t.width) ? t.width : e.offsetWidth),
height: Math.round(angular.isNumber(t.height) ? t.height : e.offsetHeight),
top: Math.round(t.top + (g.pageYOffset || c[0].documentElement.scrollTop)),
left: Math.round(t.left + (g.pageXOffset || c[0].documentElement.scrollLeft))
}
}, viewportOffset: function (e, t, a) {
a = !1 !== a;
var n = (e = this.getRawNode(e)).getBoundingClientRect(), i = {top: 0, left: 0, bottom: 0, right: 0},
s = t ? c[0].documentElement : this.scrollParent(e), o = s.getBoundingClientRect();
if (i.top = o.top + s.clientTop, i.left = o.left + s.clientLeft, s === c[0].documentElement && (i.top += g.pageYOffset, i.left += g.pageXOffset), i.bottom = i.top + s.clientHeight, i.right = i.left + s.clientWidth, a) {
var r = g.getComputedStyle(s);
i.top += this.parseStyle(r.paddingTop), i.bottom -= this.parseStyle(r.paddingBottom), i.left += this.parseStyle(r.paddingLeft), i.right -= this.parseStyle(r.paddingRight)
}
return {
top: Math.round(n.top - i.top),
bottom: Math.round(i.bottom - n.bottom),
left: Math.round(n.left - i.left),
right: Math.round(i.right - n.right)
}
}, parsePlacement: function (e) {
var t = f.auto.test(e);
return t && (e = e.replace(f.auto, "")), (e = e.split("-"))[0] = e[0] || "top", f.primary.test(e[0]) || (e[0] = "top"), e[1] = e[1] || "center", f.secondary.test(e[1]) || (e[1] = "center"), e[2] = !!t, e
}, positionElements: function (e, t, a, n) {
e = this.getRawNode(e), t = this.getRawNode(t);
var i = angular.isDefined(t.offsetWidth) ? t.offsetWidth : t.prop("offsetWidth"),
s = angular.isDefined(t.offsetHeight) ? t.offsetHeight : t.prop("offsetHeight");
a = this.parsePlacement(a);
var o = n ? this.offset(e) : this.position(e), r = {top: 0, left: 0, placement: ""};
if (a[2]) {
var l = this.viewportOffset(e, n), c = g.getComputedStyle(t),
u = i + Math.round(Math.abs(this.parseStyle(c.marginLeft) + this.parseStyle(c.marginRight))),
d = s + Math.round(Math.abs(this.parseStyle(c.marginTop) + this.parseStyle(c.marginBottom)));
if (a[0] = "top" === a[0] && d > l.top && d <= l.bottom ? "bottom" : "bottom" === a[0] && d > l.bottom && d <= l.top ? "top" : "left" === a[0] && u > l.left && u <= l.right ? "right" : "right" === a[0] && u > l.right && u <= l.left ? "left" : a[0], a[1] = "top" === a[1] && d - o.height > l.bottom && d - o.height <= l.top ? "bottom" : "bottom" === a[1] && d - o.height > l.top && d - o.height <= l.bottom ? "top" : "left" === a[1] && u - o.width > l.right && u - o.width <= l.left ? "right" : "right" === a[1] && u - o.width > l.left && u - o.width <= l.right ? "left" : a[1], "center" === a[1]) if (f.vertical.test(a[0])) {
var p = o.width / 2 - i / 2;
l.left + p < 0 && u - o.width <= l.right ? a[1] = "left" : l.right + p < 0 && u - o.width <= l.left && (a[1] = "right")
} else {
var m = o.height / 2 - d / 2;
l.top + m < 0 && d - o.height <= l.bottom ? a[1] = "top" : l.bottom + m < 0 && d - o.height <= l.top && (a[1] = "bottom")
}
}
switch (a[0]) {
case"top":
r.top = o.top - s;
break;
case"bottom":
r.top = o.top + o.height;
break;
case"left":
r.left = o.left - i;
break;
case"right":
r.left = o.left + o.width
}
switch (a[1]) {
case"top":
r.top = o.top;
break;
case"bottom":
r.top = o.top + o.height - s;
break;
case"left":
r.left = o.left;
break;
case"right":
r.left = o.left + o.width - i;
break;
case"center":
f.vertical.test(a[0]) ? r.left = o.left + o.width / 2 - i / 2 : r.top = o.top + o.height / 2 - s / 2
}
return r.top = Math.round(r.top), r.left = Math.round(r.left), r.placement = "center" === a[1] ? a[0] : a[0] + "-" + a[1], r
}, adjustTop: function (e, t, a, n) {
if (-1 !== e.indexOf("top") && a !== n) return {top: t.top - n + "px"}
}, positionArrow: function (e, t) {
var a = (e = this.getRawNode(e)).querySelector(".tooltip-inner, .popover-inner");
if (a) {
var n = angular.element(a).hasClass("tooltip-inner"),
i = n ? e.querySelector(".tooltip-arrow") : e.querySelector(".arrow");
if (i) {
var s = {top: "", bottom: "", left: "", right: ""};
if ("center" !== (t = this.parsePlacement(t))[1]) {
var o = "border-" + t[0] + "-width", r = g.getComputedStyle(i)[o], l = "border-";
f.vertical.test(t[0]) ? l += t[0] + "-" + t[1] : l += t[1] + "-" + t[0], l += "-radius";
var c = g.getComputedStyle(n ? a : e)[l];
switch (t[0]) {
case"top":
s.bottom = n ? "0" : "-" + r;
break;
case"bottom":
s.top = n ? "0" : "-" + r;
break;
case"left":
s.right = n ? "0" : "-" + r;
break;
case"right":
s.left = n ? "0" : "-" + r
}
s[t[1]] = c, angular.element(i).css(s)
} else angular.element(i).css(s)
}
}
}
}
}]), angular.module("ui.bootstrap.datepickerPopup", ["ui.bootstrap.datepicker", "ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning", !0).constant("uibDatepickerPopupConfig", {
altInputFormats: [],
appendToBody: !1,
clearText: "Clear",
closeOnDateSelection: !0,
closeText: "Done",
currentText: "Today",
datepickerPopup: "yyyy-MM-dd",
datepickerPopupTemplateUrl: "uib/template/datepickerPopup/popup.html",
datepickerTemplateUrl: "uib/template/datepicker/datepicker.html",
html5Types: {date: "yyyy-MM-dd", "datetime-local": "yyyy-MM-ddTHH:mm:ss.sss", month: "yyyy-MM"},
onOpenFocus: !0,
showButtonBar: !0,
placement: "auto bottom-left"
}).controller("UibDatepickerPopupController", ["$scope", "$element", "$attrs", "$compile", "$log", "$parse", "$window", "$document", "$rootScope", "$uibPosition", "dateFilter", "uibDateParser", "uibDatepickerPopupConfig", "$timeout", "uibDatepickerConfig", "$datepickerPopupLiteralWarning", function (i, s, n, t, a, e, o, r, l, c, u, d, p, m, g, f) {
var h, v, y, b, w, $, k, x, _, S, I, C, A = !1, M = [];
function D(e) {
var t = d.parse(e, h, i.date);
if (isNaN(t)) for (var a = 0; a < C.length; a++) if (t = d.parse(e, C[a], i.date), !isNaN(t)) return t;
return t
}
function T(e) {
if (angular.isNumber(e) && (e = new Date(e)), !e) return null;
if (angular.isDate(e) && !isNaN(e)) return e;
if (angular.isString(e)) {
var t = D(e);
if (!isNaN(t)) return t
}
return S.$options && S.$options.allowInvalid ? e : void 0
}
function P(e, t) {
var a = e || t;
return !n.ngRequired && !a || (angular.isNumber(a) && (a = new Date(a)), !a || (!(!angular.isDate(a) || isNaN(a)) || !!angular.isString(a) && !isNaN(D(a))))
}
function E(e) {
if (i.isOpen || !i.disabled) {
var t = I[0], a = s[0].contains(e.target), n = void 0 !== t.contains && t.contains(e.target);
!i.isOpen || a || n || i.$apply(function () {
i.isOpen = !1
})
}
}
function j(e) {
27 === e.which && i.isOpen ? (e.preventDefault(), e.stopPropagation(), i.$apply(function () {
i.isOpen = !1
}), s[0].focus()) : 40 !== e.which || i.isOpen || (e.preventDefault(), e.stopPropagation(), i.$apply(function () {
i.isOpen = !0
}))
}
function L() {
if (i.isOpen) {
var e = angular.element(I[0].querySelector(".uib-datepicker-popup")),
t = n.popupPlacement ? n.popupPlacement : p.placement, a = c.positionElements(s, e, t, y);
e.css({
top: a.top + "px",
left: a.left + "px"
}), e.hasClass("uib-position-measure") && e.removeClass("uib-position-measure")
}
}
this.init = function (e) {
if ((S = e).$options, v = angular.isDefined(n.closeOnDateSelection) ? i.$parent.$eval(n.closeOnDateSelection) : p.closeOnDateSelection, y = angular.isDefined(n.datepickerAppendToBody) ? i.$parent.$eval(n.datepickerAppendToBody) : p.appendToBody, b = angular.isDefined(n.onOpenFocus) ? i.$parent.$eval(n.onOpenFocus) : p.onOpenFocus, w = angular.isDefined(n.datepickerPopupTemplateUrl) ? n.datepickerPopupTemplateUrl : p.datepickerPopupTemplateUrl, $ = angular.isDefined(n.datepickerTemplateUrl) ? n.datepickerTemplateUrl : p.datepickerTemplateUrl, C = angular.isDefined(n.altInputFormats) ? i.$parent.$eval(n.altInputFormats) : p.altInputFormats, i.showButtonBar = angular.isDefined(n.showButtonBar) ? i.$parent.$eval(n.showButtonBar) : p.showButtonBar, p.html5Types[n.type] ? (h = p.html5Types[n.type], A = !0) : (h = n.uibDatepickerPopup || p.datepickerPopup, n.$observe("uibDatepickerPopup", function (e, t) {
var a = e || p.datepickerPopup;
if (a !== h && (h = a, S.$modelValue = null, !h)) throw new Error("uibDatepickerPopup must have a date format specified.")
})), !h) throw new Error("uibDatepickerPopup must have a date format specified.");
if (A && n.uibDatepickerPopup) throw new Error("HTML5 date input types do not support custom formats.");
(k = angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>")).attr({
"ng-model": "date",
"ng-change": "dateSelection(date)",
"template-url": w
}), (x = angular.element(k.children()[0])).attr("template-url", $), i.datepickerOptions || (i.datepickerOptions = {}), A && "month" === n.type && (i.datepickerOptions.datepickerMode = "month", i.datepickerOptions.minMode = "month"), x.attr("datepicker-options", "datepickerOptions"), A ? S.$formatters.push(function (e) {
return i.date = e
}) : (S.$$parserName = "date", S.$validators.date = P, S.$parsers.unshift(T), S.$formatters.push(function (e) {
return S.$isEmpty(e) ? i.date = e : (angular.isNumber(e) && (e = new Date(e)), i.date = e, d.filter(i.date, h))
})), S.$viewChangeListeners.push(function () {
i.date = D(S.$viewValue)
}), s.on("keydown", j), I = t(k)(i), k.remove(), y ? r.find("body").append(I) : s.after(I), i.$on("$destroy", function () {
for (!0 === i.isOpen && (l.$$phase || i.$apply(function () {
i.isOpen = !1
})), I.remove(), s.off("keydown", j), r.off("click", E), _ && _.off("scroll", L), angular.element(o).off("resize", L); M.length;) M.shift()()
})
}, i.getText = function (e) {
return i[e + "Text"] || p[e + "Text"]
}, i.isDisabled = function (e) {
"today" === e && (e = new Date);
var t = {};
return angular.forEach(["minDate", "maxDate"], function (e) {
i.datepickerOptions[e] ? angular.isDate(i.datepickerOptions[e]) ? t[e] = new Date(i.datepickerOptions[e]) : (f && a.warn("Literal date support has been deprecated, please switch to date object usage"), t[e] = new Date(u(i.datepickerOptions[e], "medium"))) : t[e] = null
}), i.datepickerOptions && t.minDate && i.compare(e, t.minDate) < 0 || t.maxDate && 0 < i.compare(e, t.maxDate)
}, i.compare = function (e, t) {
return new Date(e.getFullYear(), e.getMonth(), e.getDate()) - new Date(t.getFullYear(), t.getMonth(), t.getDate())
}, i.dateSelection = function (e) {
i.date = e;
var t = i.date ? d.filter(i.date, h) : null;
s.val(t), S.$setViewValue(t), v && (i.isOpen = !1, s[0].focus())
}, i.keydown = function (e) {
27 === e.which && (e.stopPropagation(), i.isOpen = !1, s[0].focus())
}, i.select = function (e, t) {
if (t.stopPropagation(), "today" === e) {
var a = new Date;
angular.isDate(i.date) ? (e = new Date(i.date)).setFullYear(a.getFullYear(), a.getMonth(), a.getDate()) : e = new Date(a.setHours(0, 0, 0, 0))
}
i.dateSelection(e)
}, i.close = function (e) {
e.stopPropagation(), i.isOpen = !1, s[0].focus()
}, i.disabled = angular.isDefined(n.disabled) || !1, n.ngDisabled && M.push(i.$parent.$watch(e(n.ngDisabled), function (e) {
i.disabled = e
})), i.$watch("isOpen", function (e) {
e ? i.disabled ? i.isOpen = !1 : m(function () {
L(), b && i.$broadcast("uib:datepicker.focus"), r.on("click", E);
var e = n.popupPlacement ? n.popupPlacement : p.placement;
y || c.parsePlacement(e)[2] ? (_ = _ || angular.element(c.scrollParent(s))) && _.on("scroll", L) : _ = null, angular.element(o).on("resize", L)
}, 0, !1) : (r.off("click", E), _ && _.off("scroll", L), angular.element(o).off("resize", L))
}), i.$on("uib:datepicker.mode", function () {
m(L, 0, !1)
})
}]).directive("uibDatepickerPopup", function () {
return {
require: ["ngModel", "uibDatepickerPopup"],
controller: "UibDatepickerPopupController",
scope: {datepickerOptions: "=?", isOpen: "=?", currentText: "@", clearText: "@", closeText: "@"},
link: function (e, t, a, n) {
var i = n[0];
n[1].init(i)
}
}
}).directive("uibDatepickerPopupWrap", function () {
return {
restrict: "A", transclude: !0, templateUrl: function (e, t) {
return t.templateUrl || "uib/template/datepickerPopup/popup.html"
}
}
}), angular.module("ui.bootstrap.debounce", []).factory("$$debounce", ["$timeout", function (s) {
return function (a, n) {
var i;
return function () {
var e = this, t = Array.prototype.slice.call(arguments);
i && s.cancel(i), i = s(function () {
a.apply(e, t)
}, n)
}
}
}]), angular.module("ui.bootstrap.dropdown", ["ui.bootstrap.position"]).constant("uibDropdownConfig", {
appendToOpenClass: "uib-dropdown-open",
openClass: "open"
}).service("uibDropdownService", ["$document", "$rootScope", function (n, i) {
var s = null;
this.open = function (e, t) {
s || n.on("click", o), s && s !== e && (s.isOpen = !1), s = e
}, this.close = function (e, t) {
if (s === e) {
s = null, n.off("click", o);
var a = e.getDropdownElement();
a && a.off("keydown", this.keybindFilter)
}
};
var o = function (e) {
if (s && !(e && "disabled" === s.getAutoClose() || e && 3 === e.which)) {
var t = s.getToggleElement();
if (!(e && t && t[0].contains(e.target))) {
var a = s.getDropdownElement();
e && "outsideClick" === s.getAutoClose() && a && a[0].contains(e.target) || (s.isOpen = !1, s.focusToggleElement(), i.$$phase || s.$apply())
}
}
};
this.keybindFilter = function (e) {
27 === e.which ? (e.stopPropagation(), s.focusToggleElement(), o()) : s.isKeynavEnabled() && -1 !== [38, 40].indexOf(e.which) && s.isOpen && (e.preventDefault(), e.stopPropagation(), s.focusDropdownEntry(e.which))
}
}]).controller("UibDropdownController", ["$scope", "$element", "$attrs", "$parse", "uibDropdownConfig", "uibDropdownService", "$animate", "$uibPosition", "$document", "$compile", "$templateRequest", function (u, d, t, a, e, p, m, g, n, f, h) {
var v, i, y = this, b = u.$new(), w = e.appendToOpenClass, $ = e.openClass, k = angular.noop,
x = t.onToggle ? a(t.onToggle) : angular.noop, _ = !1, S = null, s = !1, o = n.find("body");
d.addClass("dropdown"), this.init = function () {
if (t.isOpen && (i = a(t.isOpen), k = i.assign, u.$watch(i, function (e) {
b.isOpen = !!e
})), angular.isDefined(t.dropdownAppendTo)) {
var e = a(t.dropdownAppendTo)(b);
e && (S = angular.element(e))
}
_ = angular.isDefined(t.dropdownAppendToBody), s = angular.isDefined(t.keyboardNav), _ && !S && (S = o), S && y.dropdownMenu && (S.append(y.dropdownMenu), d.on("$destroy", function () {
y.dropdownMenu.remove()
}))
}, this.toggle = function (e) {
return b.isOpen = arguments.length ? !!e : !b.isOpen, angular.isFunction(k) && k(b, b.isOpen), b.isOpen
}, this.isOpen = function () {
return b.isOpen
}, b.getToggleElement = function () {
return y.toggleElement
}, b.getAutoClose = function () {
return t.autoClose || "always"
}, b.getElement = function () {
return d
}, b.isKeynavEnabled = function () {
return s
}, b.focusDropdownEntry = function (e) {
var t = y.dropdownMenu ? angular.element(y.dropdownMenu).find("a") : d.find("ul").eq(0).find("a");
switch (e) {
case 40:
angular.isNumber(y.selectedOption) ? y.selectedOption = y.selectedOption === t.length - 1 ? y.selectedOption : y.selectedOption + 1 : y.selectedOption = 0;
break;
case 38:
angular.isNumber(y.selectedOption) ? y.selectedOption = 0 === y.selectedOption ? 0 : y.selectedOption - 1 : y.selectedOption = t.length - 1
}
t[y.selectedOption].focus()
}, b.getDropdownElement = function () {
return y.dropdownMenu
}, b.focusToggleElement = function () {
y.toggleElement && y.toggleElement[0].focus()
}, b.$watch("isOpen", function (e, t) {
if (S && y.dropdownMenu) {
var a, n, i, s = g.positionElements(d, y.dropdownMenu, "bottom-left", !0), o = 0;
if (a = {
top: s.top + "px",
display: e ? "block" : "none"
}, (n = y.dropdownMenu.hasClass("dropdown-menu-right")) ? (a.left = "auto", (i = g.scrollbarPadding(S)).heightOverflow && i.scrollbarWidth && (o = i.scrollbarWidth), a.right = window.innerWidth - o - (s.left + d.prop("offsetWidth")) + "px") : (a.left = s.left + "px", a.right = "auto"), !_) {
var r = g.offset(S);
a.top = s.top - r.top + "px", n ? a.right = window.innerWidth - (s.left - r.left + d.prop("offsetWidth")) + "px" : a.left = s.left - r.left + "px"
}
y.dropdownMenu.css(a)
}
var l = S || d;
if (l.hasClass(S ? w : $) === !e && m[e ? "addClass" : "removeClass"](l, S ? w : $).then(function () {
angular.isDefined(e) && e !== t && x(u, {open: !!e})
}), e) y.dropdownMenuTemplateUrl ? h(y.dropdownMenuTemplateUrl).then(function (e) {
v = b.$new(), f(e.trim())(v, function (e) {
var t = e;
y.dropdownMenu.replaceWith(t), y.dropdownMenu = t, y.dropdownMenu.on("keydown", p.keybindFilter)
})
}) : y.dropdownMenu && y.dropdownMenu.on("keydown", p.keybindFilter), b.focusToggleElement(), p.open(b, d); else {
if (p.close(b, d), y.dropdownMenuTemplateUrl) {
v && v.$destroy();
var c = angular.element('<ul class="dropdown-menu"></ul>');
y.dropdownMenu.replaceWith(c), y.dropdownMenu = c
}
y.selectedOption = null
}
angular.isFunction(k) && k(u, e)
})
}]).directive("uibDropdown", function () {
return {
controller: "UibDropdownController", link: function (e, t, a, n) {
n.init()
}
}
}).directive("uibDropdownMenu", function () {
return {
restrict: "A", require: "?^uibDropdown", link: function (e, t, a, n) {
if (n && !angular.isDefined(a.dropdownNested)) {
t.addClass("dropdown-menu");
var i = a.templateUrl;
i && (n.dropdownMenuTemplateUrl = i), n.dropdownMenu || (n.dropdownMenu = t)
}
}
}
}).directive("uibDropdownToggle", function () {
return {
require: "?^uibDropdown", link: function (t, a, n, i) {
if (i) {
a.addClass("dropdown-toggle"), i.toggleElement = a;
function e(e) {
e.preventDefault(), a.hasClass("disabled") || n.disabled || t.$apply(function () {
i.toggle()
})
}
a.bind("click", e), a.attr({
"aria-haspopup": !0,
"aria-expanded": !1
}), t.$watch(i.isOpen, function (e) {
a.attr("aria-expanded", !!e)
}), t.$on("$destroy", function () {
a.unbind("click", e)
})
}
}
}
}), angular.module("ui.bootstrap.stackedMap", []).factory("$$stackedMap", function () {
return {
createNew: function () {
var n = [];
return {
add: function (e, t) {
n.push({key: e, value: t})
}, get: function (e) {
for (var t = 0; t < n.length; t++) if (e === n[t].key) return n[t]
}, keys: function () {
for (var e = [], t = 0; t < n.length; t++) e.push(n[t].key);
return e
}, top: function () {
return n[n.length - 1]
}, remove: function (e) {
for (var t = -1, a = 0; a < n.length; a++) if (e === n[a].key) {
t = a;
break
}
return n.splice(t, 1)[0]
}, removeTop: function () {
return n.pop()
}, length: function () {
return n.length
}
}
}
}
}), angular.module("ui.bootstrap.modal", ["ui.bootstrap.stackedMap", "ui.bootstrap.position"]).factory("$$multiMap", function () {
return {
createNew: function () {
var i = {};
return {
entries: function () {
return Object.keys(i).map(function (e) {
return {key: e, value: i[e]}
})
}, get: function (e) {
return i[e]
}, hasKey: function (e) {
return !!i[e]
}, keys: function () {
return Object.keys(i)
}, put: function (e, t) {
i[e] || (i[e] = []), i[e].push(t)
}, remove: function (e, t) {
var a = i[e];
if (a) {
var n = a.indexOf(t);
-1 !== n && a.splice(n, 1), a.length || delete i[e]
}
}
}
}
}
}).provider("$uibResolve", function () {
var e = this;
this.resolver = null, this.setResolver = function (e) {
this.resolver = e
}, this.$get = ["$injector", "$q", function (s, o) {
var r = e.resolver ? s.get(e.resolver) : null;
return {
resolve: function (e, t, a, n) {
if (r) return r.resolve(e, t, a, n);
var i = [];
return angular.forEach(e, function (e) {
angular.isFunction(e) || angular.isArray(e) ? i.push(o.resolve(s.invoke(e))) : angular.isString(e) ? i.push(o.resolve(s.get(e))) : i.push(o.resolve(e))
}), o.all(i).then(function (a) {
var n = {}, i = 0;
return angular.forEach(e, function (e, t) {
n[t] = a[i++]
}), n
})
}
}
}]
}).directive("uibModalBackdrop", ["$animate", "$injector", "$uibModalStack", function (o, e, t) {
return {
restrict: "A", compile: function (e, t) {
return e.addClass(t.backdropClass), a
}
};
function a(n, i, s) {
s.modalInClass && (o.addClass(i, s.modalInClass), n.$on(t.NOW_CLOSING_EVENT, function (e, t) {
var a = t();
n.modalOptions.animation ? o.removeClass(i, s.modalInClass).then(a) : a()
}))
}
}]).directive("uibModalWindow", ["$uibModalStack", "$q", "$animateCss", "$document", function (a, s, o, r) {
return {
scope: {index: "@"}, restrict: "A", transclude: !0, templateUrl: function (e, t) {
return t.templateUrl || "uib/template/modal/window.html"
}, link: function (t, n, i) {
n.addClass(i.windowTopClass || ""), t.size = i.size, t.close = function (e) {
var t = a.getTop();
t && t.value.backdrop && "static" !== t.value.backdrop && e.target === e.currentTarget && (e.preventDefault(), e.stopPropagation(), a.dismiss(t.key, "backdrop click"))
}, n.on("click", t.close), t.$isRendered = !0;
var e = s.defer();
t.$$postDigest(function () {
e.resolve()
}), e.promise.then(function () {
var e = null;
i.modalInClass && (e = o(n, {addClass: i.modalInClass}).start(), t.$on(a.NOW_CLOSING_EVENT, function (e, t) {
var a = t();
o(n, {removeClass: i.modalInClass}).start().then(a)
})), s.when(e).then(function () {
var e = a.getTop();
if (e && a.modalRendered(e.key), !r[0].activeElement || !n[0].contains(r[0].activeElement)) {
var t = n[0].querySelector("[autofocus]");
t ? t.focus() : n[0].focus()
}
})
})
}
}
}]).directive("uibModalAnimationClass", function () {
return {
compile: function (e, t) {
t.modalAnimation && e.addClass(t.uibModalAnimationClass)
}
}
}).directive("uibModalTransclude", ["$animate", function (s) {
return {
link: function (e, t, a, n, i) {
i(e.$parent, function (e) {
t.empty(), s.enter(e, t)
})
}
}
}]).factory("$uibModalStack", ["$animate", "$animateCss", "$document", "$compile", "$rootScope", "$q", "$$multiMap", "$$stackedMap", "$uibPosition", function (r, e, l, c, u, o, t, a, d) {
var p, m, g, f = "modal-open", h = a.createNew(), v = t.createNew(),
y = {NOW_CLOSING_EVENT: "modal.stack.now-closing"}, b = 0, w = null;
function $() {
for (var e = -1, t = h.keys(), a = 0; a < t.length; a++) h.get(t[a]).value.backdrop && (e = a);
return -1 < e && e < b && (e = b), e
}
function n(a, e) {
var n = h.get(a).value, i = n.appendTo;
h.remove(a), (w = h.top()) && (b = parseInt(w.value.modalDomEl.attr("index"), 10)), s(n.modalDomEl, n.modalScope, function () {
var e = n.openedClass || f;
v.remove(e, a);
var t = v.hasKey(e);
i.toggleClass(e, t), !t && g && g.heightOverflow && g.scrollbarWidth && (g.originalRight ? i.css({paddingRight: g.originalRight + "px"}) : i.css({paddingRight: ""}), g = null), k(!0)
}, n.closedDeferred), function () {
if (p && -1 === $()) {
s(p, m, function () {
null
}), m = p = void 0
}
}(), e && e.focus ? e.focus() : i.focus && i.focus()
}
function k(e) {
var t;
0 < h.length() && (t = h.top().value).modalDomEl.toggleClass(t.windowTopClass || "", e)
}
function s(t, a, n, i) {
var e, s = null;
return a.$broadcast(y.NOW_CLOSING_EVENT, function () {
return e || (e = o.defer(), s = e.promise), function () {
e.resolve()
}
}), o.when(s).then(function e() {
if (e.done) return;
e.done = !0;
r.leave(t).then(function () {
n && n(), t.remove(), i && i.resolve()
});
a.$destroy()
})
}
function i(e) {
if (e.isDefaultPrevented()) return e;
var t = h.top();
if (t) switch (e.which) {
case 27:
t.value.keyboard && (e.preventDefault(), u.$apply(function () {
y.dismiss(t.key, "escape key press")
}));
break;
case 9:
var a = y.loadFocusElementList(t), n = !1;
e.shiftKey ? (y.isFocusInFirstItem(e, a) || y.isModalFocused(e, t)) && (n = y.focusLastFocusableElement(a)) : y.isFocusInLastItem(e, a) && (n = y.focusFirstFocusableElement(a)), n && (e.preventDefault(), e.stopPropagation())
}
}
function x(e, t, a) {
return !e.value.modalScope.$broadcast("modal.closing", t, a).defaultPrevented
}
return u.$watch($, function (e) {
m && (m.index = e)
}), l.on("keydown", i), u.$on("$destroy", function () {
l.off("keydown", i)
}), y.open = function (e, t) {
var a = l[0].activeElement, n = t.openedClass || f;
k(!1), w = h.top(), h.add(e, {
deferred: t.deferred,
renderDeferred: t.renderDeferred,
closedDeferred: t.closedDeferred,
modalScope: t.scope,
backdrop: t.backdrop,
keyboard: t.keyboard,
openedClass: t.openedClass,
windowTopClass: t.windowTopClass,
animation: t.animation,
appendTo: t.appendTo
}), v.put(n, e);
var i = t.appendTo, s = $();
if (!i.length) throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");
0 <= s && !p && ((m = u.$new(!0)).modalOptions = t, m.index = s, (p = angular.element('<div uib-modal-backdrop="modal-backdrop"></div>')).attr({
class: "modal-backdrop",
"ng-style": "{'z-index': 1040 + (index && 1 || 0) + index*10}",
"uib-modal-animation-class": "fade",
"modal-in-class": "in"
}), t.backdropClass && p.addClass(t.backdropClass), t.animation && p.attr("modal-animation", "true"), c(p)(m), r.enter(p, i), d.isScrollable(i) && (g = d.scrollbarPadding(i)).heightOverflow && g.scrollbarWidth && i.css({paddingRight: g.right + "px"})), b = w ? parseInt(w.value.modalDomEl.attr("index"), 10) + 1 : 0;
var o = angular.element('<div uib-modal-window="modal-window"></div>');
o.attr({
class: "modal",
"template-url": t.windowTemplateUrl,
"window-top-class": t.windowTopClass,
role: "dialog",
size: t.size,
index: b,
animate: "animate",
"ng-style": "{'z-index': 1050 + index*10, display: 'block'}",
tabindex: -1,
"uib-modal-animation-class": "fade",
"modal-in-class": "in"
}).html(t.content), t.windowClass && o.addClass(t.windowClass), t.animation && o.attr("modal-animation", "true"), i.addClass(n), r.enter(c(o)(t.scope), i), h.top().value.modalDomEl = o, h.top().value.modalOpener = a
}, y.close = function (e, t) {
var a = h.get(e);
return a && x(a, t, !0) ? (a.value.modalScope.$$uibDestructionScheduled = !0, a.value.deferred.resolve(t), n(e, a.value.modalOpener), !0) : !a
}, y.dismiss = function (e, t) {
var a = h.get(e);
return a && x(a, t, !1) ? (a.value.modalScope.$$uibDestructionScheduled = !0, a.value.deferred.reject(t), n(e, a.value.modalOpener), !0) : !a
}, y.dismissAll = function (e) {
for (var t = this.getTop(); t && this.dismiss(t.key, e);) t = this.getTop()
}, y.getTop = function () {
return h.top()
}, y.modalRendered = function (e) {
var t = h.get(e);
t && t.value.renderDeferred.resolve()
}, y.focusFirstFocusableElement = function (e) {
return 0 < e.length && (e[0].focus(), !0)
}, y.focusLastFocusableElement = function (e) {
return 0 < e.length && (e[e.length - 1].focus(), !0)
}, y.isModalFocused = function (e, t) {
if (e && t) {
var a = t.value.modalDomEl;
if (a && a.length) return (e.target || e.srcElement) === a[0]
}
return !1
}, y.isFocusInFirstItem = function (e, t) {
return 0 < t.length && (e.target || e.srcElement) === t[0]
}, y.isFocusInLastItem = function (e, t) {
return 0 < t.length && (e.target || e.srcElement) === t[t.length - 1]
}, y.loadFocusElementList = function (e) {
if (e) {
var t = e.value.modalDomEl;
if (t && t.length) {
var a = t[0].querySelectorAll("a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]");
return a ? Array.prototype.filter.call(a, function (e) {
return function (e) {
return !!(e.offsetWidth || e.offsetHeight || e.getClientRects().length)
}(e)
}) : a
}
}
}, y
}]).provider("$uibModal", function () {
var v = {
options: {animation: !0, backdrop: !0, keyboard: !0},
$get: ["$rootScope", "$q", "$document", "$templateRequest", "$controller", "$uibResolve", "$uibModalStack", function (p, n, i, s, m, g, f) {
var e = {};
var h = null;
return e.getPromiseChain = function () {
return h
}, e.open = function (o) {
var r = n.defer(), l = n.defer(), c = n.defer(), u = n.defer(), d = {
result: r.promise,
opened: l.promise,
closed: c.promise,
rendered: u.promise,
close: function (e) {
return f.close(d, e)
},
dismiss: function (e) {
return f.dismiss(d, e)
}
};
if ((o = angular.extend({}, v.options, o)).resolve = o.resolve || {}, o.appendTo = o.appendTo || i.find("body").eq(0), !o.template && !o.templateUrl) throw new Error("One of template or templateUrl options is required.");
var e, t = n.all([function (e) {
return e.template ? n.when(e.template) : s(angular.isFunction(e.templateUrl) ? e.templateUrl() : e.templateUrl)
}(o), g.resolve(o.resolve, {}, null, null)]);
function a() {
return t
}
return e = h = n.all([h]).then(a, a).then(function (e) {
var t = o.scope || p, a = t.$new();
a.$close = d.close, a.$dismiss = d.dismiss, a.$on("$destroy", function () {
a.$$uibDestructionScheduled || a.$dismiss("$uibUnscheduledDestruction")
});
var n, i, s = {};
o.controller && (s.$scope = a, s.$scope.$resolve = {}, s.$uibModalInstance = d, angular.forEach(e[1], function (e, t) {
s[t] = e, s.$scope.$resolve[t] = e
}), i = m(o.controller, s, !0, o.controllerAs), o.controllerAs && o.bindToController && ((n = i.instance).$close = a.$close, n.$dismiss = a.$dismiss, angular.extend(n, {$resolve: s.$scope.$resolve}, t)), n = i(), angular.isFunction(n.$onInit) && n.$onInit()), f.open(d, {
scope: a,
deferred: r,
renderDeferred: u,
closedDeferred: c,
content: e[0],
animation: o.animation,
backdrop: o.backdrop,
keyboard: o.keyboard,
backdropClass: o.backdropClass,
windowTopClass: o.windowTopClass,
windowClass: o.windowClass,
windowTemplateUrl: o.windowTemplateUrl,
size: o.size,
openedClass: o.openedClass,
appendTo: o.appendTo
}), l.resolve(!0)
}, function (e) {
l.reject(e), r.reject(e)
}).finally(function () {
h === e && (h = null)
}), d
}, e
}]
};
return v
}), angular.module("ui.bootstrap.paging", []).factory("uibPaging", ["$parse", function (e) {
return {
create: function (a, n, i) {
a.setNumPages = i.numPages ? e(i.numPages).assign : angular.noop, a.ngModelCtrl = {$setViewValue: angular.noop}, a._watchers = [], a.init = function (e, t) {
a.ngModelCtrl = e, a.config = t, e.$render = function () {
a.render()
}, i.itemsPerPage ? a._watchers.push(n.$parent.$watch(i.itemsPerPage, function (e) {
a.itemsPerPage = parseInt(e, 10), n.totalPages = a.calculateTotalPages(), a.updatePage()
})) : a.itemsPerPage = t.itemsPerPage, n.$watch("totalItems", function (e, t) {
!angular.isDefined(e) && e === t || (n.totalPages = a.calculateTotalPages(), a.updatePage())
})
}, a.calculateTotalPages = function () {
var e = a.itemsPerPage < 1 ? 1 : Math.ceil(n.totalItems / a.itemsPerPage);
return Math.max(e || 0, 1)
}, a.render = function () {
n.page = parseInt(a.ngModelCtrl.$viewValue, 10) || 1
}, n.selectPage = function (e, t) {
t && t.preventDefault(), (!n.ngDisabled || !t) && n.page !== e && 0 < e && e <= n.totalPages && (t && t.target && t.target.blur(), a.ngModelCtrl.$setViewValue(e), a.ngModelCtrl.$render())
}, n.getText = function (e) {
return n[e + "Text"] || a.config[e + "Text"]
}, n.noPrevious = function () {
return 1 === n.page
}, n.noNext = function () {
return n.page === n.totalPages
}, a.updatePage = function () {
a.setNumPages(n.$parent, n.totalPages), n.page > n.totalPages ? n.selectPage(n.totalPages) : a.ngModelCtrl.$render()
}, n.$on("$destroy", function () {
for (; a._watchers.length;) a._watchers.shift()()
})
}
}
}]), angular.module("ui.bootstrap.pager", ["ui.bootstrap.paging", "ui.bootstrap.tabindex"]).controller("UibPagerController", ["$scope", "$attrs", "uibPaging", "uibPagerConfig", function (e, t, a, n) {
e.align = angular.isDefined(t.align) ? e.$parent.$eval(t.align) : n.align, a.create(this, e, t)
}]).constant("uibPagerConfig", {
itemsPerPage: 10,
previousText: "« Previous",
nextText: "Next »",
align: !0
}).directive("uibPager", ["uibPagerConfig", function (o) {
return {
scope: {totalItems: "=", previousText: "@", nextText: "@", ngDisabled: "="},
require: ["uibPager", "?ngModel"],
restrict: "A",
controller: "UibPagerController",
controllerAs: "pager",
templateUrl: function (e, t) {
return t.templateUrl || "uib/template/pager/pager.html"
},
link: function (e, t, a, n) {
t.addClass("pager");
var i = n[0], s = n[1];
s && i.init(s, o)
}
}
}]), angular.module("ui.bootstrap.pagination", ["ui.bootstrap.paging", "ui.bootstrap.tabindex"]).controller("UibPaginationController", ["$scope", "$attrs", "$parse", "uibPaging", "uibPaginationConfig", function (t, a, e, n, i) {
var s = this, g = angular.isDefined(a.maxSize) ? t.$parent.$eval(a.maxSize) : i.maxSize,
f = angular.isDefined(a.rotate) ? t.$parent.$eval(a.rotate) : i.rotate,
h = angular.isDefined(a.forceEllipses) ? t.$parent.$eval(a.forceEllipses) : i.forceEllipses,
v = angular.isDefined(a.boundaryLinkNumbers) ? t.$parent.$eval(a.boundaryLinkNumbers) : i.boundaryLinkNumbers,
y = angular.isDefined(a.pageLabel) ? function (e) {
return t.$parent.$eval(a.pageLabel, {$page: e})
} : angular.identity;
function b(e, t, a) {
return {number: e, text: t, active: a}
}
t.boundaryLinks = angular.isDefined(a.boundaryLinks) ? t.$parent.$eval(a.boundaryLinks) : i.boundaryLinks, t.directionLinks = angular.isDefined(a.directionLinks) ? t.$parent.$eval(a.directionLinks) : i.directionLinks, n.create(this, t, a), a.maxSize && s._watchers.push(t.$parent.$watch(e(a.maxSize), function (e) {
g = parseInt(e, 10), s.render()
}));
var o = this.render;
this.render = function () {
o(), 0 < t.page && t.page <= t.totalPages && (t.pages = function (e, t) {
var a = [], n = 1, i = t, s = angular.isDefined(g) && g < t;
s && (f ? t < (i = (n = Math.max(e - Math.floor(g / 2), 1)) + g - 1) && (n = (i = t) - g + 1) : (n = (Math.ceil(e / g) - 1) * g + 1, i = Math.min(n + g - 1, t)));
for (var o = n; o <= i; o++) {
var r = b(o, y(o), o === e);
a.push(r)
}
if (s && 0 < g && (!f || h || v)) {
if (1 < n) {
if (!v || 3 < n) {
var l = b(n - 1, "...", !1);
a.unshift(l)
}
if (v) {
if (3 === n) {
var c = b(2, "2", !1);
a.unshift(c)
}
var u = b(1, "1", !1);
a.unshift(u)
}
}
if (i < t) {
if (!v || i < t - 2) {
var d = b(i + 1, "...", !1);
a.push(d)
}
if (v) {
if (i === t - 2) {
var p = b(t - 1, t - 1, !1);
a.push(p)
}
var m = b(t, t, !1);
a.push(m)
}
}
}
return a
}(t.page, t.totalPages))
}
}]).constant("uibPaginationConfig", {
itemsPerPage: 10,
boundaryLinks: !1,
boundaryLinkNumbers: !1,
directionLinks: !0,
firstText: "First",
previousText: "Previous",
nextText: "Next",
lastText: "Last",
rotate: !0,
forceEllipses: !1
}).directive("uibPagination", ["$parse", "uibPaginationConfig", function (e, o) {
return {
scope: {totalItems: "=", firstText: "@", previousText: "@", nextText: "@", lastText: "@", ngDisabled: "="},
require: ["uibPagination", "?ngModel"],
restrict: "A",
controller: "UibPaginationController",
controllerAs: "pagination",
templateUrl: function (e, t) {
return t.templateUrl || "uib/template/pagination/pagination.html"
},
link: function (e, t, a, n) {
t.addClass("pagination");
var i = n[0], s = n[1];
s && i.init(s, o)
}
}
}]), angular.module("ui.bootstrap.tooltip", ["ui.bootstrap.position", "ui.bootstrap.stackedMap"]).provider("$uibTooltip", function () {
var r = {
placement: "top",
placementClassPrefix: "",
animation: !0,
popupDelay: 0,
popupCloseDelay: 0,
useContentExp: !1
}, l = {mouseenter: "mouseleave", click: "click", outsideClick: "outsideClick", focus: "blur", none: ""}, c = {};
this.options = function (e) {
angular.extend(c, e)
}, this.setTriggers = function (e) {
angular.extend(l, e)
}, this.$get = ["$window", "$compile", "$timeout", "$document", "$uibPosition", "$interpolate", "$rootScope", "$parse", "$$stackedMap", function (e, s, Y, V, F, o, t, z, a) {
var H = a.createNew();
function n(e) {
if (27 === e.which) {
var t = H.top();
t && (t.value.close(), H.removeTop(), t = null)
}
}
return V.on("keypress", n), t.$on("$destroy", function () {
V.off("keypress", n)
}), function (N, B, n, R) {
function q(e) {
var t = (e || R.trigger || n).split(" "), a = t.map(function (e) {
return l[e] || e
});
return {show: t, hide: a}
}
R = angular.extend({}, r, c, R);
var e = function (e) {
return e.replace(/[A-Z]/g, function (e, t) {
return (t ? "-" : "") + e.toLowerCase()
})
}(N), t = o.startSymbol(), a = o.endSymbol(),
i = "<div " + e + '-popup uib-title="' + t + "title" + a + '" ' + (R.useContentExp ? 'content-exp="contentExp()" ' : 'content="' + t + "content" + a + '" ') + 'origin-scope="origScope" class="uib-position-measure ' + B + '" tooltip-animation-class="fade"uib-tooltip-classes ng-class="{ in: isOpen }" ></div>';
return {
compile: function (e, t) {
var U = s(i);
return function (n, s, i, e) {
var o, t, a, r, l, c, u, d = !!angular.isDefined(R.appendToBody) && R.appendToBody,
p = q(void 0), m = angular.isDefined(i[B + "Enable"]), g = n.$new(!0), f = !1,
h = !!angular.isDefined(i[B + "IsOpen"]) && z(i[B + "IsOpen"]),
v = !!R.useContentExp && z(i[N]), y = [], b = function () {
o && o.html() && (c || (c = Y(function () {
var e = F.positionElements(s, o, g.placement, d),
a = angular.isDefined(o.offsetHeight) ? o.offsetHeight : o.prop("offsetHeight"),
n = d ? F.offset(s) : F.position(s);
o.css({top: e.top + "px", left: e.left + "px"});
var i = e.placement.split("-");
o.hasClass(i[0]) || (o.removeClass(u.split("-")[0]), o.addClass(i[0])), o.hasClass(R.placementClassPrefix + e.placement) || (o.removeClass(R.placementClassPrefix + u), o.addClass(R.placementClassPrefix + e.placement)), Y(function () {
var e = angular.isDefined(o.offsetHeight) ? o.offsetHeight : o.prop("offsetHeight"),
t = F.adjustTop(i, n, a, e);
t && o.css(t)
}, 0, !1), o.hasClass("uib-position-measure") ? (F.positionArrow(o, e.placement), o.removeClass("uib-position-measure")) : u !== e.placement && F.positionArrow(o, e.placement), u = e.placement, c = null
}, 0, !1)))
};
function w() {
g.isOpen ? k() : $()
}
function $() {
m && !n.$eval(i[B + "Enable"]) || (I(), function () {
g.title = i[B + "Title"], g.content = v ? v(n) : i[N];
g.popupClass = i[B + "Class"], g.placement = angular.isDefined(i[B + "Placement"]) ? i[B + "Placement"] : R.placement;
var e = F.parsePlacement(g.placement);
u = e[1] ? e[0] + "-" + e[1] : e[0];
var t = parseInt(i[B + "PopupDelay"], 10), a = parseInt(i[B + "PopupCloseDelay"], 10);
g.popupDelay = isNaN(t) ? R.popupDelay : t, g.popupCloseDelay = isNaN(a) ? R.popupCloseDelay : a
}(), g.popupDelay ? r || (r = Y(x, g.popupDelay, !1)) : x())
}
function k() {
_(), g.popupCloseDelay ? l || (l = Y(S, g.popupCloseDelay, !1)) : S()
}
function x() {
if (_(), I(), !g.content) return angular.noop;
!function () {
if (o) return;
t = g.$new(), o = U(t, function (e) {
d ? V.find("body").append(e) : s.after(e)
}), function () {
y.length = 0, v ? (y.push(n.$watch(v, function (e) {
!(g.content = e) && g.isOpen && S()
})), y.push(t.$watch(function () {
f || (f = !0, t.$$postDigest(function () {
f = !1, g && g.isOpen && b()
}))
}))) : y.push(i.$observe(N, function (e) {
!(g.content = e) && g.isOpen ? S() : b()
}));
y.push(i.$observe(B + "Title", function (e) {
g.title = e, g.isOpen && b()
})), y.push(i.$observe(B + "Placement", function (e) {
g.placement = e || R.placement, g.isOpen && b()
}))
}()
}(), g.$evalAsync(function () {
A(g.isOpen = !0), b()
})
}
function _() {
r && (Y.cancel(r), r = null), c && (Y.cancel(c), c = null)
}
function S() {
g && g.$evalAsync(function () {
g && (A(g.isOpen = !1), g.animation ? a || (a = Y(C, 150, !1)) : C())
})
}
function I() {
l && (Y.cancel(l), l = null), a && (Y.cancel(a), a = null)
}
function C() {
_(), I(), y.length && (angular.forEach(y, function (e) {
e()
}), y.length = 0), o && (o.remove(), o = null), t && (t.$destroy(), t = null)
}
function A(e) {
h && angular.isFunction(h.assign) && h.assign(n, e)
}
function M(e) {
g && g.isOpen && o && (s[0].contains(e.target) || o[0].contains(e.target) || k())
}
g.origScope = n, g.isOpen = !1, H.add(g, {close: S}), g.contentExp = function () {
return g.content
}, i.$observe("disabled", function (e) {
e && _(), e && g.isOpen && S()
}), h && n.$watch(h, function (e) {
g && !e === g.isOpen && w()
});
function D() {
p.show.forEach(function (e) {
"outsideClick" === e ? s.off("click", w) : (s.off(e, $), s.off(e, w))
}), p.hide.forEach(function (e) {
"outsideClick" === e ? V.off("click", M) : s.off(e, k)
})
}
var T, P, E;
T = [], P = [], E = n.$eval(i[B + "Trigger"]), D(), "none" !== (p = angular.isObject(E) ? (Object.keys(E).forEach(function (e) {
T.push(e), P.push(E[e])
}), {show: T, hide: P}) : q(E)).show && p.show.forEach(function (e, t) {
"outsideClick" === e ? (s.on("click", w), V.on("click", M)) : e === p.hide[t] ? s.on(e, w) : e && (s.on(e, $), s.on(p.hide[t], k)), s.on("keypress", function (e) {
27 === e.which && k()
})
});
var j, L = n.$eval(i[B + "Animation"]);
g.animation = angular.isDefined(L) ? !!L : R.animation;
var O = B + "AppendToBody";
j = O in i && void 0 === i[O] || n.$eval(i[O]), d = angular.isDefined(j) ? j : d, n.$on("$destroy", function () {
D(), C(), H.remove(g), g = null
})
}
}
}
}
}]
}).directive("uibTooltipTemplateTransclude", ["$animate", "$sce", "$compile", "$templateRequest", function (d, n, p, m) {
return {
link: function (e, s, t) {
function o() {
a && (a.remove(), a = null), r && (r.$destroy(), r = null), l && (d.leave(l).then(function () {
a = null
}), a = l, l = null)
}
var r, a, l, c = e.$eval(t.tooltipTemplateTranscludeScope), u = 0;
e.$watch(n.parseAsResourceUrl(t.uibTooltipTemplateTransclude), function (n) {
var i = ++u;
n ? (m(n, !0).then(function (e) {
if (i === u) {
var t = c.$new(), a = p(e)(t, function (e) {
o(), d.enter(e, s)
});
l = a, (r = t).$emit("$includeContentLoaded", n)
}
}, function () {
i === u && (o(), e.$emit("$includeContentError", n))
}), e.$emit("$includeContentRequested", n)) : o()
}), e.$on("$destroy", o)
}
}
}]).directive("uibTooltipClasses", ["$uibPosition", function (i) {
return {
restrict: "A", link: function (e, t, a) {
if (e.placement) {
var n = i.parsePlacement(e.placement);
t.addClass(n[0])
}
e.popupClass && t.addClass(e.popupClass), e.animation && t.addClass(a.tooltipAnimationClass)
}
}
}]).directive("uibTooltipPopup", function () {
return {restrict: "A", scope: {content: "@"}, templateUrl: "uib/template/tooltip/tooltip-popup.html"}
}).directive("uibTooltip", ["$uibTooltip", function (e) {
return e("uibTooltip", "tooltip", "mouseenter")
}]).directive("uibTooltipTemplatePopup", function () {
return {
restrict: "A",
scope: {contentExp: "&", originScope: "&"},
templateUrl: "uib/template/tooltip/tooltip-template-popup.html"
}
}).directive("uibTooltipTemplate", ["$uibTooltip", function (e) {
return e("uibTooltipTemplate", "tooltip", "mouseenter", {useContentExp: !0})
}]).directive("uibTooltipHtmlPopup", function () {
return {restrict: "A", scope: {contentExp: "&"}, templateUrl: "uib/template/tooltip/tooltip-html-popup.html"}
}).directive("uibTooltipHtml", ["$uibTooltip", function (e) {
return e("uibTooltipHtml", "tooltip", "mouseenter", {useContentExp: !0})
}]), angular.module("ui.bootstrap.popover", ["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup", function () {
return {
restrict: "A",
scope: {uibTitle: "@", contentExp: "&", originScope: "&"},
templateUrl: "uib/template/popover/popover-template.html"
}
}).directive("uibPopoverTemplate", ["$uibTooltip", function (e) {
return e("uibPopoverTemplate", "popover", "click", {useContentExp: !0})
}]).directive("uibPopoverHtmlPopup", function () {
return {
restrict: "A",
scope: {contentExp: "&", uibTitle: "@"},
templateUrl: "uib/template/popover/popover-html.html"
}
}).directive("uibPopoverHtml", ["$uibTooltip", function (e) {
return e("uibPopoverHtml", "popover", "click", {useContentExp: !0})
}]).directive("uibPopoverPopup", function () {
return {restrict: "A", scope: {uibTitle: "@", content: "@"}, templateUrl: "uib/template/popover/popover.html"}
}).directive("uibPopover", ["$uibTooltip", function (e) {
return e("uibPopover", "popover", "click")
}]), angular.module("ui.bootstrap.progressbar", []).constant("uibProgressConfig", {
animate: !0,
max: 100
}).controller("UibProgressController", ["$scope", "$attrs", "uibProgressConfig", function (e, t, a) {
var n = this, i = angular.isDefined(t.animate) ? e.$parent.$eval(t.animate) : a.animate;
function s() {
return angular.isDefined(e.maxParam) ? e.maxParam : a.max
}
this.bars = [], e.max = s(), this.addBar = function (t, e, a) {
i || e.css({transition: "none"}), this.bars.push(t), t.max = s(), t.title = a && angular.isDefined(a.title) ? a.title : "progressbar", t.$watch("value", function (e) {
t.recalculatePercentage()
}), t.recalculatePercentage = function () {
var e = n.bars.reduce(function (e, t) {
return t.percent = +(100 * t.value / t.max).toFixed(2), e + t.percent
}, 0);
100 < e && (t.percent -= e - 100)
}, t.$on("$destroy", function () {
e = null, n.removeBar(t)
})
}, this.removeBar = function (e) {
this.bars.splice(this.bars.indexOf(e), 1), this.bars.forEach(function (e) {
e.recalculatePercentage()
})
}, e.$watch("maxParam", function (e) {
n.bars.forEach(function (e) {
e.max = s(), e.recalculatePercentage()
})
})
}]).directive("uibProgress", function () {
return {
replace: !0,
transclude: !0,
controller: "UibProgressController",
require: "uibProgress",
scope: {maxParam: "=?max"},
templateUrl: "uib/template/progressbar/progress.html"
}
}).directive("uibBar", function () {
return {
replace: !0,
transclude: !0,
require: "^uibProgress",
scope: {value: "=", type: "@"},
templateUrl: "uib/template/progressbar/bar.html",
link: function (e, t, a, n) {
n.addBar(e, t, a)
}
}
}).directive("uibProgressbar", function () {
return {
replace: !0,
transclude: !0,
controller: "UibProgressController",
scope: {value: "=", maxParam: "=?max", type: "@"},
templateUrl: "uib/template/progressbar/progressbar.html",
link: function (e, t, a, n) {
n.addBar(e, angular.element(t.children()[0]), {title: a.title})
}
}
}), angular.module("ui.bootstrap.rating", []).constant("uibRatingConfig", {
max: 5,
stateOn: null,
stateOff: null,
enableReset: !0,
titles: ["one", "two", "three", "four", "five"]
}).controller("UibRatingController", ["$scope", "$attrs", "uibRatingConfig", function (n, i, s) {
var o = {$setViewValue: angular.noop}, a = this;
this.init = function (e) {
(o = e).$render = this.render, o.$formatters.push(function (e) {
return angular.isNumber(e) && e << 0 !== e && (e = Math.round(e)), e
}), this.stateOn = angular.isDefined(i.stateOn) ? n.$parent.$eval(i.stateOn) : s.stateOn, this.stateOff = angular.isDefined(i.stateOff) ? n.$parent.$eval(i.stateOff) : s.stateOff, this.enableReset = angular.isDefined(i.enableReset) ? n.$parent.$eval(i.enableReset) : s.enableReset;
var t = angular.isDefined(i.titles) ? n.$parent.$eval(i.titles) : s.titles;
this.titles = angular.isArray(t) && 0 < t.length ? t : s.titles;
var a = angular.isDefined(i.ratingStates) ? n.$parent.$eval(i.ratingStates) : new Array(angular.isDefined(i.max) ? n.$parent.$eval(i.max) : s.max);
n.range = this.buildTemplateObjects(a)
}, this.buildTemplateObjects = function (e) {
for (var t = 0, a = e.length; t < a; t++) e[t] = angular.extend({index: t}, {
stateOn: this.stateOn,
stateOff: this.stateOff,
title: this.getTitle(t)
}, e[t]);
return e
}, this.getTitle = function (e) {
return e >= this.titles.length ? e + 1 : this.titles[e]
}, n.rate = function (e) {
if (!n.readonly && 0 <= e && e <= n.range.length) {
var t = a.enableReset && o.$viewValue === e ? 0 : e;
o.$setViewValue(t), o.$render()
}
}, n.enter = function (e) {
n.readonly || (n.value = e), n.onHover({value: e})
}, n.reset = function () {
n.value = o.$viewValue, n.onLeave()
}, n.onKeydown = function (e) {
/(37|38|39|40)/.test(e.which) && (e.preventDefault(), e.stopPropagation(), n.rate(n.value + (38 === e.which || 39 === e.which ? 1 : -1)))
}, this.render = function () {
n.value = o.$viewValue, n.title = a.getTitle(n.value - 1)
}
}]).directive("uibRating", function () {
return {
require: ["uibRating", "ngModel"],
restrict: "A",
scope: {readonly: "=?readOnly", onHover: "&", onLeave: "&"},
controller: "UibRatingController",
templateUrl: "uib/template/rating/rating.html",
link: function (e, t, a, n) {
var i = n[0], s = n[1];
i.init(s)
}
}
}), angular.module("ui.bootstrap.tabs", []).controller("UibTabsetController", ["$scope", function (e) {
var s, o, r = this;
function l(e) {
for (var t = 0; t < r.tabs.length; t++) if (r.tabs[t].index === e) return t
}
r.tabs = [], r.select = function (e, t) {
if (!o) {
var a = l(s), n = r.tabs[a];
if (n) {
if (n.tab.onDeselect({$event: t, $selectedIndex: e}), t && t.isDefaultPrevented()) return;
n.tab.active = !1
}
var i = r.tabs[e];
i ? (i.tab.onSelect({$event: t}), i.tab.active = !0, r.active = i.index, s = i.index) : !i && angular.isDefined(s) && (r.active = null, s = null)
}
}, r.addTab = function (e) {
if (r.tabs.push({tab: e, index: e.index}), r.tabs.sort(function (e, t) {
return e.index > t.index ? 1 : e.index < t.index ? -1 : 0
}), e.index === r.active || !angular.isDefined(r.active) && 1 === r.tabs.length) {
var t = l(e.index);
r.select(t)
}
}, r.removeTab = function (e) {
for (var t, a = 0; a < r.tabs.length; a++) if (r.tabs[a].tab === e) {
t = a;
break
}
if (r.tabs[t].index === r.active) {
var n = t === r.tabs.length - 1 ? t - 1 : t + 1 % r.tabs.length;
r.select(n)
}
r.tabs.splice(t, 1)
}, e.$watch("tabset.active", function (e) {
angular.isDefined(e) && e !== s && r.select(l(e))
}), e.$on("$destroy", function () {
o = !0
})
}]).directive("uibTabset", function () {
return {
transclude: !0,
replace: !0,
scope: {},
bindToController: {active: "=?", type: "@"},
controller: "UibTabsetController",
controllerAs: "tabset",
templateUrl: function (e, t) {
return t.templateUrl || "uib/template/tabs/tabset.html"
},
link: function (e, t, a) {
e.vertical = !!angular.isDefined(a.vertical) && e.$parent.$eval(a.vertical), e.justified = !!angular.isDefined(a.justified) && e.$parent.$eval(a.justified)
}
}
}).directive("uibTab", ["$parse", function (s) {
return {
require: "^uibTabset",
replace: !0,
templateUrl: function (e, t) {
return t.templateUrl || "uib/template/tabs/tab.html"
},
transclude: !0,
scope: {heading: "@", index: "=?", classes: "@?", onSelect: "&select", onDeselect: "&deselect"},
controller: function () {
},
controllerAs: "tab",
link: function (n, e, t, i, a) {
n.disabled = !1, t.disable && n.$parent.$watch(s(t.disable), function (e) {
n.disabled = !!e
}), angular.isUndefined(t.index) && (i.tabs && i.tabs.length ? n.index = Math.max.apply(null, i.tabs.map(function (e) {
return e.index
})) + 1 : n.index = 0), angular.isUndefined(t.classes) && (n.classes = ""), n.select = function (e) {
if (!n.disabled) {
for (var t, a = 0; a < i.tabs.length; a++) if (i.tabs[a].tab === n) {
t = a;
break
}
i.select(t, e)
}
}, i.addTab(n), n.$on("$destroy", function () {
i.removeTab(n)
}), n.$transcludeFn = a
}
}
}]).directive("uibTabHeadingTransclude", function () {
return {
restrict: "A", require: "^uibTab", link: function (e, t) {
e.$watch("headingElement", function (e) {
e && (t.html(""), t.append(e))
})
}
}
}).directive("uibTabContentTransclude", function () {
return {
restrict: "A", require: "^uibTabset", link: function (e, t, a) {
var n = e.$eval(a.uibTabContentTransclude).tab;
n.$transcludeFn(n.$parent, function (e) {
angular.forEach(e, function (e) {
!function (e) {
return e.tagName && (e.hasAttribute("uib-tab-heading") || e.hasAttribute("data-uib-tab-heading") || e.hasAttribute("x-uib-tab-heading") || "uib-tab-heading" === e.tagName.toLowerCase() || "data-uib-tab-heading" === e.tagName.toLowerCase() || "x-uib-tab-heading" === e.tagName.toLowerCase() || "uib:tab-heading" === e.tagName.toLowerCase())
}(e) ? t.append(e) : n.headingElement = e
})
})
}
}
}), angular.module("ui.bootstrap.timepicker", []).constant("uibTimepickerConfig", {
hourStep: 1,
minuteStep: 1,
secondStep: 1,
showMeridian: !0,
showSeconds: !1,
meridians: null,
readonlyInput: !1,
mousewheel: !0,
arrowkeys: !0,
showSpinners: !0,
templateUrl: "uib/template/timepicker/timepicker.html"
}).controller("UibTimepickerController", ["$scope", "$element", "$attrs", "$parse", "$log", "$locale", "uibTimepickerConfig", function (s, e, o, t, a, n, r) {
var i = new Date, l = [], c = {$setViewValue: angular.noop},
u = angular.isDefined(o.meridians) ? s.$parent.$eval(o.meridians) : r.meridians || n.DATETIME_FORMATS.AMPMS,
d = !angular.isDefined(o.padHours) || s.$parent.$eval(o.padHours);
s.tabindex = angular.isDefined(o.tabindex) ? o.tabindex : 0, e.removeAttr("tabindex"), this.init = function (e, t) {
(c = e).$render = this.render, c.$formatters.unshift(function (e) {
return e ? new Date(e) : null
});
var a = t.eq(0), n = t.eq(1), i = t.eq(2);
(angular.isDefined(o.mousewheel) ? s.$parent.$eval(o.mousewheel) : r.mousewheel) && this.setupMousewheelEvents(a, n, i), (angular.isDefined(o.arrowkeys) ? s.$parent.$eval(o.arrowkeys) : r.arrowkeys) && this.setupArrowkeyEvents(a, n, i), s.readonlyInput = angular.isDefined(o.readonlyInput) ? s.$parent.$eval(o.readonlyInput) : r.readonlyInput, this.setupInputEvents(a, n, i)
};
var p = r.hourStep;
o.hourStep && l.push(s.$parent.$watch(t(o.hourStep), function (e) {
p = +e
}));
var m, g, f = r.minuteStep;
o.minuteStep && l.push(s.$parent.$watch(t(o.minuteStep), function (e) {
f = +e
})), l.push(s.$parent.$watch(t(o.min), function (e) {
var t = new Date(e);
m = isNaN(t) ? void 0 : t
})), l.push(s.$parent.$watch(t(o.max), function (e) {
var t = new Date(e);
g = isNaN(t) ? void 0 : t
}));
var h = !1;
o.ngDisabled && l.push(s.$parent.$watch(t(o.ngDisabled), function (e) {
h = e
})), s.noIncrementHours = function () {
var e = S(i, 60 * p);
return h || g < e || e < i && e < m
}, s.noDecrementHours = function () {
var e = S(i, 60 * -p);
return h || e < m || i < e && g < e
}, s.noIncrementMinutes = function () {
var e = S(i, f);
return h || g < e || e < i && e < m
}, s.noDecrementMinutes = function () {
var e = S(i, -f);
return h || e < m || i < e && g < e
}, s.noIncrementSeconds = function () {
var e = I(i, v);
return h || g < e || e < i && e < m
}, s.noDecrementSeconds = function () {
var e = I(i, -v);
return h || e < m || i < e && g < e
}, s.noToggleMeridian = function () {
return i.getHours() < 12 ? h || S(i, 720) > g : h || S(i, -720) < m
};
var v = r.secondStep;
function y() {
var e = +s.hours;
if ((s.showMeridian ? 0 < e && e < 13 : 0 <= e && e < 24) && "" !== s.hours) return s.showMeridian && (12 === e && (e = 0), s.meridian === u[1] && (e += 12)), e
}
function b() {
var e = +s.minutes;
if (0 <= e && e < 60 && "" !== s.minutes) return e
}
function w(e, t) {
return null === e ? "" : angular.isDefined(e) && e.toString().length < 2 && !t ? "0" + e : e.toString()
}
function $(e) {
k(), c.$setViewValue(new Date(i)), x(e)
}
function k() {
c.$setValidity("time", !0), s.invalidHours = !1, s.invalidMinutes = !1, s.invalidSeconds = !1
}
function x(e) {
if (c.$modelValue) {
var t = i.getHours(), a = i.getMinutes(), n = i.getSeconds();
s.showMeridian && (t = 0 === t || 12 === t ? 12 : t % 12), s.hours = "h" === e ? t : w(t, !d), "m" !== e && (s.minutes = w(a)), s.meridian = i.getHours() < 12 ? u[0] : u[1], "s" !== e && (s.seconds = w(n)), s.meridian = i.getHours() < 12 ? u[0] : u[1]
} else s.hours = null, s.minutes = null, s.seconds = null, s.meridian = u[0]
}
function _(e) {
i = I(i, e), $()
}
function S(e, t) {
return I(e, 60 * t)
}
function I(e, t) {
var a = new Date(e.getTime() + 1e3 * t), n = new Date(e);
return n.setHours(a.getHours(), a.getMinutes(), a.getSeconds()), n
}
function C() {
return (null === s.hours || "" === s.hours) && (null === s.minutes || "" === s.minutes) && (!s.showSeconds || s.showSeconds && (null === s.seconds || "" === s.seconds))
}
o.secondStep && l.push(s.$parent.$watch(t(o.secondStep), function (e) {
v = +e
})), s.showSeconds = r.showSeconds, o.showSeconds && l.push(s.$parent.$watch(t(o.showSeconds), function (e) {
s.showSeconds = !!e
})), s.showMeridian = r.showMeridian, o.showMeridian && l.push(s.$parent.$watch(t(o.showMeridian), function (e) {
if (s.showMeridian = !!e, c.$error.time) {
var t = y(), a = b();
angular.isDefined(t) && angular.isDefined(a) && (i.setHours(t), $())
} else x()
})), this.setupMousewheelEvents = function (e, t, a) {
function n(e) {
e.originalEvent && (e = e.originalEvent);
var t = e.wheelDelta ? e.wheelDelta : -e.deltaY;
return e.detail || 0 < t
}
e.bind("mousewheel wheel", function (e) {
h || s.$apply(n(e) ? s.incrementHours() : s.decrementHours()), e.preventDefault()
}), t.bind("mousewheel wheel", function (e) {
h || s.$apply(n(e) ? s.incrementMinutes() : s.decrementMinutes()), e.preventDefault()
}), a.bind("mousewheel wheel", function (e) {
h || s.$apply(n(e) ? s.incrementSeconds() : s.decrementSeconds()), e.preventDefault()
})
}, this.setupArrowkeyEvents = function (e, t, a) {
e.bind("keydown", function (e) {
h || (38 === e.which ? (e.preventDefault(), s.incrementHours(), s.$apply()) : 40 === e.which && (e.preventDefault(), s.decrementHours(), s.$apply()))
}), t.bind("keydown", function (e) {
h || (38 === e.which ? (e.preventDefault(), s.incrementMinutes(), s.$apply()) : 40 === e.which && (e.preventDefault(), s.decrementMinutes(), s.$apply()))
}), a.bind("keydown", function (e) {
h || (38 === e.which ? (e.preventDefault(), s.incrementSeconds(), s.$apply()) : 40 === e.which && (e.preventDefault(), s.decrementSeconds(), s.$apply()))
})
}, this.setupInputEvents = function (e, t, a) {
if (s.readonlyInput) return s.updateHours = angular.noop, s.updateMinutes = angular.noop, void (s.updateSeconds = angular.noop);
function n(e, t, a) {
c.$setViewValue(null), c.$setValidity("time", !1), angular.isDefined(e) && (s.invalidHours = e), angular.isDefined(t) && (s.invalidMinutes = t), angular.isDefined(a) && (s.invalidSeconds = a)
}
s.updateHours = function () {
var e = y(), t = b();
c.$setDirty(), angular.isDefined(e) && angular.isDefined(t) ? (i.setHours(e), i.setMinutes(t), i < m || g < i ? n(!0) : $("h")) : n(!0)
}, e.bind("blur", function (e) {
c.$setTouched(), C() ? k() : null === s.hours || "" === s.hours ? n(!0) : !s.invalidHours && s.hours < 10 && s.$apply(function () {
s.hours = w(s.hours, !d)
})
}), s.updateMinutes = function () {
var e = b(), t = y();
c.$setDirty(), angular.isDefined(e) && angular.isDefined(t) ? (i.setHours(t), i.setMinutes(e), i < m || g < i ? n(void 0, !0) : $("m")) : n(void 0, !0)
}, t.bind("blur", function (e) {
c.$setTouched(), C() ? k() : null === s.minutes ? n(void 0, !0) : !s.invalidMinutes && s.minutes < 10 && s.$apply(function () {
s.minutes = w(s.minutes)
})
}), s.updateSeconds = function () {
var e = function () {
var e = +s.seconds;
return 0 <= e && e < 60 ? e : void 0
}();
c.$setDirty(), angular.isDefined(e) ? (i.setSeconds(e), $("s")) : n(void 0, void 0, !0)
}, a.bind("blur", function (e) {
C() ? k() : !s.invalidSeconds && s.seconds < 10 && s.$apply(function () {
s.seconds = w(s.seconds)
})
})
}, this.render = function () {
var e = c.$viewValue;
isNaN(e) ? (c.$setValidity("time", !1), a.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')) : (e && (i = e), i < m || g < i ? (c.$setValidity("time", !1), s.invalidHours = !0, s.invalidMinutes = !0) : k(), x())
}, s.showSpinners = angular.isDefined(o.showSpinners) ? s.$parent.$eval(o.showSpinners) : r.showSpinners, s.incrementHours = function () {
s.noIncrementHours() || _(60 * p * 60)
}, s.decrementHours = function () {
s.noDecrementHours() || _(60 * -p * 60)
}, s.incrementMinutes = function () {
s.noIncrementMinutes() || _(60 * f)
}, s.decrementMinutes = function () {
s.noDecrementMinutes() || _(60 * -f)
}, s.incrementSeconds = function () {
s.noIncrementSeconds() || _(v)
}, s.decrementSeconds = function () {
s.noDecrementSeconds() || _(-v)
}, s.toggleMeridian = function () {
var e = b(), t = y();
s.noToggleMeridian() || (angular.isDefined(e) && angular.isDefined(t) ? _(720 * (i.getHours() < 12 ? 60 : -60)) : s.meridian = s.meridian === u[0] ? u[1] : u[0])
}, s.blur = function () {
c.$setTouched()
}, s.$on("$destroy", function () {
for (; l.length;) l.shift()()
})
}]).directive("uibTimepicker", ["uibTimepickerConfig", function (a) {
return {
require: ["uibTimepicker", "?^ngModel"],
restrict: "A",
controller: "UibTimepickerController",
controllerAs: "timepicker",
scope: {},
templateUrl: function (e, t) {
return t.templateUrl || a.templateUrl
},
link: function (e, t, a, n) {
var i = n[0], s = n[1];
s && i.init(s, t.find("input"))
}
}
}]), angular.module("ui.bootstrap.typeahead", ["ui.bootstrap.debounce", "ui.bootstrap.position"]).factory("uibTypeaheadParser", ["$parse", function (a) {
var n = /^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;
return {
parse: function (e) {
var t = e.match(n);
if (!t) throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "' + e + '".');
return {itemName: t[3], source: a(t[4]), viewMapper: a(t[2] || t[1]), modelMapper: a(t[1])}
}
}
}]).controller("UibTypeaheadController", ["$scope", "$element", "$attrs", "$compile", "$parse", "$q", "$timeout", "$document", "$window", "$rootScope", "$$debounce", "$uibPosition", "uibTypeaheadParser", function (r, l, s, e, a, t, o, n, i, c, u, d, p) {
var m, g, f = [9, 13, 27, 38, 40], h = r.$eval(s.typeaheadMinLength);
h || 0 === h || (h = 1), r.$watch(s.typeaheadMinLength, function (e) {
h = e || 0 === e ? e : 1
});
var v = r.$eval(s.typeaheadWaitMs) || 0, y = !1 !== r.$eval(s.typeaheadEditable);
r.$watch(s.typeaheadEditable, function (e) {
y = !1 !== e
});
var b, w, $ = a(s.typeaheadLoading).assign || angular.noop,
k = s.typeaheadShouldSelect ? a(s.typeaheadShouldSelect) : function (e, t) {
var a = t.$event;
return 13 === a.which || 9 === a.which
}, x = a(s.typeaheadOnSelect),
_ = !!angular.isDefined(s.typeaheadSelectOnBlur) && r.$eval(s.typeaheadSelectOnBlur),
S = a(s.typeaheadNoResults).assign || angular.noop,
I = s.typeaheadInputFormatter ? a(s.typeaheadInputFormatter) : void 0,
C = !!s.typeaheadAppendToBody && r.$eval(s.typeaheadAppendToBody),
A = s.typeaheadAppendTo ? r.$eval(s.typeaheadAppendTo) : null, M = !1 !== r.$eval(s.typeaheadFocusFirst),
D = !!s.typeaheadSelectOnExact && r.$eval(s.typeaheadSelectOnExact),
T = a(s.typeaheadIsOpen).assign || angular.noop, P = r.$eval(s.typeaheadShowHint) || !1, E = a(s.ngModel),
j = a(s.ngModel + "($$$p)"), L = p.parse(s.uibTypeahead), O = r.$new(), U = r.$on("$destroy", function () {
O.$destroy()
});
O.$on("$destroy", U);
var N, B, R = "typeahead-" + O.$id + "-" + Math.floor(1e4 * Math.random());
l.attr({
"aria-autocomplete": "list",
"aria-expanded": !1,
"aria-owns": R
}), P && ((N = angular.element("<div></div>")).css("position", "relative"), l.after(N), (B = l.clone()).attr("placeholder", ""), B.attr("tabindex", "-1"), B.val(""), B.css({
position: "absolute",
top: "0px",
left: "0px",
"border-color": "transparent",
"box-shadow": "none",
opacity: 1,
background: "none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",
color: "#999"
}), l.css({
position: "relative",
"vertical-align": "top",
"background-color": "transparent"
}), B.attr("id") && B.removeAttr("id"), N.append(B), B.after(l));
var q = angular.element("<div uib-typeahead-popup></div>");
q.attr({
id: R,
matches: "matches",
active: "activeIdx",
select: "select(activeIdx, evt)",
"move-in-progress": "moveInProgress",
query: "query",
position: "position",
"assign-is-open": "assignIsOpen(isOpen)",
debounce: "debounceUpdate"
}), angular.isDefined(s.typeaheadTemplateUrl) && q.attr("template-url", s.typeaheadTemplateUrl), angular.isDefined(s.typeaheadPopupTemplateUrl) && q.attr("popup-template-url", s.typeaheadPopupTemplateUrl);
function Y() {
O.matches = [], O.activeIdx = -1, l.attr("aria-expanded", !1), P && B.val("")
}
function V(e) {
return R + "-option-" + e
}
O.$watch("activeIdx", function (e) {
e < 0 ? l.removeAttr("aria-activedescendant") : l.attr("aria-activedescendant", V(e))
});
function F(i, s) {
var o = {$viewValue: i};
$(r, !0), S(r, !1), t.when(L.source(r, o)).then(function (e) {
var t = i === m.$viewValue;
if (t && b) if (e && 0 < e.length) {
O.activeIdx = M ? 0 : -1, S(r, !1);
for (var a = O.matches.length = 0; a < e.length; a++) o[L.itemName] = e[a], O.matches.push({
id: V(a),
label: L.viewMapper(O, o),
model: e[a]
});
if (O.query = i, G(), l.attr("aria-expanded", !0), D && 1 === O.matches.length && function (e, t) {
return !!(O.matches.length > t && e) && e.toUpperCase() === O.matches[t].label.toUpperCase()
}(i, 0) && (angular.isNumber(O.debounceUpdate) || angular.isObject(O.debounceUpdate) ? u(function () {
O.select(0, s)
}, angular.isNumber(O.debounceUpdate) ? O.debounceUpdate : O.debounceUpdate.default) : O.select(0, s)), P) {
var n = O.matches[0].label;
angular.isString(i) && 0 < i.length && n.slice(0, i.length).toUpperCase() === i.toUpperCase() ? B.val(i + n.slice(i.length)) : B.val("")
}
} else Y(), S(r, !0);
t && $(r, !1)
}, function () {
Y(), $(r, !1), S(r, !0)
})
}
C && (angular.element(i).on("resize", W), n.find("body").on("scroll", W));
var z, H = u(function () {
O.matches.length && G(), O.moveInProgress = !1
}, 200);
function W() {
O.moveInProgress || (O.moveInProgress = !0, O.$digest()), H()
}
function G() {
O.position = C ? d.offset(l) : d.position(l), O.position.top += l.prop("offsetHeight")
}
O.moveInProgress = !1, O.query = void 0;
function Q() {
z && o.cancel(z)
}
Y(), O.assignIsOpen = function (e) {
T(r, e)
}, O.select = function (e, t) {
var a, n, i = {};
w = !0, i[L.itemName] = n = O.matches[e].model, a = L.modelMapper(r, i), function (e, t) {
angular.isFunction(E(r)) && g && g.$options && g.$options.getterSetter ? j(e, {$$$p: t}) : E.assign(e, t)
}(r, a), m.$setValidity("editable", !0), m.$setValidity("parse", !0), x(r, {
$item: n,
$model: a,
$label: L.viewMapper(r, i),
$event: t
}), Y(), !1 !== O.$eval(s.typeaheadFocusOnSelect) && o(function () {
l[0].focus()
}, 0, !1)
}, l.on("keydown", function (e) {
if (0 !== O.matches.length && -1 !== f.indexOf(e.which)) {
var t, a = k(r, {$event: e});
if (-1 === O.activeIdx && a || 9 === e.which && e.shiftKey) return Y(), void O.$digest();
switch (e.preventDefault(), e.which) {
case 27:
e.stopPropagation(), Y(), r.$digest();
break;
case 38:
O.activeIdx = (0 < O.activeIdx ? O.activeIdx : O.matches.length) - 1, O.$digest(), (t = q[0].querySelectorAll(".uib-typeahead-match")[O.activeIdx]).parentNode.scrollTop = t.offsetTop;
break;
case 40:
O.activeIdx = (O.activeIdx + 1) % O.matches.length, O.$digest(), (t = q[0].querySelectorAll(".uib-typeahead-match")[O.activeIdx]).parentNode.scrollTop = t.offsetTop;
break;
default:
a && O.$apply(function () {
angular.isNumber(O.debounceUpdate) || angular.isObject(O.debounceUpdate) ? u(function () {
O.select(O.activeIdx, e)
}, angular.isNumber(O.debounceUpdate) ? O.debounceUpdate : O.debounceUpdate.default) : O.select(O.activeIdx, e)
})
}
}
}), l.bind("focus", function (e) {
b = !0, 0 !== h || m.$viewValue || o(function () {
F(m.$viewValue, e)
}, 0)
}), l.bind("blur", function (e) {
_ && O.matches.length && -1 !== O.activeIdx && !w && (w = !0, O.$apply(function () {
angular.isObject(O.debounceUpdate) && angular.isNumber(O.debounceUpdate.blur) ? u(function () {
O.select(O.activeIdx, e)
}, O.debounceUpdate.blur) : O.select(O.activeIdx, e)
})), !y && m.$error.editable && (m.$setViewValue(), O.$apply(function () {
m.$setValidity("editable", !0), m.$setValidity("parse", !0)
}), l.val("")), w = b = !1
});
function K(e) {
l[0] !== e.target && 3 !== e.which && 0 !== O.matches.length && (Y(), c.$$phase || r.$digest())
}
n.on("click", K), r.$on("$destroy", function () {
n.off("click", K), (C || A) && J.remove(), C && (angular.element(i).off("resize", W), n.find("body").off("scroll", W)), q.remove(), P && N.remove()
});
var J = e(q)(O);
C ? n.find("body").append(J) : A ? angular.element(A).eq(0).append(J) : l.after(J), this.init = function (e, t) {
m = e, g = t, O.debounceUpdate = m.$options && a(m.$options.debounce)(r), m.$parsers.unshift(function (e) {
return b = !0, 0 === h || e && e.length >= h ? 0 < v ? (Q(), function (e) {
z = o(function () {
F(e)
}, v)
}(e)) : F(e) : ($(r, !1), Q(), Y()), y ? e : e ? void m.$setValidity("editable", !1) : (m.$setValidity("editable", !0), null)
}), m.$formatters.push(function (e) {
var t, a = {};
return y || m.$setValidity("editable", !0), I ? (a.$model = e, I(r, a)) : (a[L.itemName] = e, t = L.viewMapper(r, a), a[L.itemName] = void 0, t !== L.viewMapper(r, a) ? t : e)
})
}
}]).directive("uibTypeahead", function () {
return {
controller: "UibTypeaheadController",
require: ["ngModel", "^?ngModelOptions", "uibTypeahead"],
link: function (e, t, a, n) {
n[2].init(n[0], n[1])
}
}
}).directive("uibTypeaheadPopup", ["$$debounce", function (i) {
return {
scope: {
matches: "=",
query: "=",
active: "=",
position: "&",
moveInProgress: "=",
select: "&",
assignIsOpen: "&",
debounce: "&"
}, replace: !0, templateUrl: function (e, t) {
return t.popupTemplateUrl || "uib/template/typeahead/typeahead-popup.html"
}, link: function (n, e, t) {
n.templateUrl = t.templateUrl, n.isOpen = function () {
var e = 0 < n.matches.length;
return n.assignIsOpen({isOpen: e}), e
}, n.isActive = function (e) {
return n.active === e
}, n.selectActive = function (e) {
n.active = e
}, n.selectMatch = function (e, t) {
var a = n.debounce();
angular.isNumber(a) || angular.isObject(a) ? i(function () {
n.select({activeIdx: e, evt: t})
}, angular.isNumber(a) ? a : a.default) : n.select({activeIdx: e, evt: t})
}
}
}
}]).directive("uibTypeaheadMatch", ["$templateRequest", "$compile", "$parse", function (i, s, o) {
return {
scope: {index: "=", match: "=", query: "="}, link: function (a, n, e) {
var t = o(e.templateUrl)(a.$parent) || "uib/template/typeahead/typeahead-match.html";
i(t).then(function (e) {
var t = angular.element(e.trim());
n.replaceWith(t), s(t)(a)
})
}
}
}]).filter("uibTypeaheadHighlight", ["$sce", "$injector", "$log", function (a, e, n) {
var i;
return i = e.has("$sanitize"), function (e, t) {
return !i && function (e) {
return /<.*>/g.test(e)
}(e) && n.warn("Unsafe use of typeahead please use ngSanitize"), e = t ? ("" + e).replace(new RegExp(function (e) {
return e.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1")
}(t), "gi"), "<strong>$&</strong>") : e, i || (e = a.trustAsHtml(e)), e
}
}]), angular.module("uib/template/accordion/accordion-group.html", []).run(["$templateCache", function (e) {
e.put("uib/template/accordion/accordion-group.html", '<div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n <h4 class="panel-title">\n <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading" ng-disabled="isDisabled" uib-tabindex-toggle><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n </h4>\n</div>\n<div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n <div class="panel-body" ng-transclude></div>\n</div>\n')
}]), angular.module("uib/template/accordion/accordion.html", []).run(["$templateCache", function (e) {
e.put("uib/template/accordion/accordion.html", '<div role="tablist" class="panel-group" ng-transclude></div>')
}]), angular.module("uib/template/alert/alert.html", []).run(["$templateCache", function (e) {
e.put("uib/template/alert/alert.html", '<button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n <span aria-hidden="true">&times;</span>\n <span class="sr-only">Close</span>\n</button>\n<div ng-transclude></div>\n')
}]), angular.module("uib/template/carousel/carousel.html", []).run(["$templateCache", function (e) {
e.put("uib/template/carousel/carousel.html", '<div class="carousel-inner" ng-transclude></div>\n<a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n <span class="sr-only">previous</span>\n</a>\n<a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n <span class="sr-only">next</span>\n</a>\n<ol class="carousel-indicators" ng-show="slides.length > 1">\n <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n </li>\n</ol>\n')
}]), angular.module("uib/template/carousel/slide.html", []).run(["$templateCache", function (e) {
e.put("uib/template/carousel/slide.html", '<div class="text-center" ng-transclude></div>\n')
}]), angular.module("uib/template/datepicker/datepicker.html", []).run(["$templateCache", function (e) {
e.put("uib/template/datepicker/datepicker.html", '<div ng-switch="datepickerMode">\n <div uib-daypicker ng-switch-when="day" tabindex="0" class="uib-daypicker"></div>\n <div uib-monthpicker ng-switch-when="month" tabindex="0" class="uib-monthpicker"></div>\n <div uib-yearpicker ng-switch-when="year" tabindex="0" class="uib-yearpicker"></div>\n</div>\n')
}]), angular.module("uib/template/datepicker/day.html", []).run(["$templateCache", function (e) {
e.put("uib/template/datepicker/day.html", '<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n <tr>\n <th ng-if="showWeeks" class="text-center"></th>\n <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-weeks" ng-repeat="row in rows track by $index">\n <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default btn-sm"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')
}]), angular.module("uib/template/datepicker/month.html", []).run(["$templateCache", function (e) {
e.put("uib/template/datepicker/month.html", '<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::yearHeaderColspan}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-months" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')
}]), angular.module("uib/template/datepicker/year.html", []).run(["$templateCache", function (e) {
e.put("uib/template/datepicker/year.html", '<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n <thead>\n <tr>\n <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-left"></i></button></th>\n <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i class="glyphicon glyphicon-chevron-right"></i></button></th>\n </tr>\n </thead>\n <tbody>\n <tr class="uib-years" ng-repeat="row in rows track by $index">\n <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n id="{{::dt.uid}}"\n ng-class="::dt.customClass">\n <button type="button" class="btn btn-default"\n uib-is-class="\n \'btn-info\' for selectedDt,\n \'active\' for activeDt\n on dt"\n ng-click="select(dt.date)"\n ng-disabled="::dt.disabled"\n tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n </td>\n </tr>\n </tbody>\n</table>\n')
}]), angular.module("uib/template/datepickerPopup/popup.html", []).run(["$templateCache", function (e) {
e.put("uib/template/datepickerPopup/popup.html", '<ul class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n <li ng-transclude></li>\n <li ng-if="showButtonBar" class="uib-button-bar">\n <span class="btn-group pull-left">\n <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n </span>\n <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n </li>\n</ul>\n')
}]), angular.module("uib/template/modal/window.html", []).run(["$templateCache", function (e) {
e.put("uib/template/modal/window.html", "<div class=\"modal-dialog {{size ? 'modal-' + size : ''}}\"><div class=\"modal-content\" uib-modal-transclude></div></div>\n")
}]), angular.module("uib/template/pager/pager.html", []).run(["$templateCache", function (e) {
e.put("uib/template/pager/pager.html", '<li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n')
}]), angular.module("uib/template/pagination/pagination.html", []).run(["$templateCache", function (e) {
e.put("uib/template/pagination/pagination.html", '<li ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'first\')}}</a></li>\n<li ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)" ng-disabled="ngDisabled&&!page.active" uib-tabindex-toggle>{{page.text}}</a></li>\n<li ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n<li ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'last\')}}</a></li>\n')
}]), angular.module("uib/template/tooltip/tooltip-html-popup.html", []).run(["$templateCache", function (e) {
e.put("uib/template/tooltip/tooltip-html-popup.html", '<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n')
}]), angular.module("uib/template/tooltip/tooltip-popup.html", []).run(["$templateCache", function (e) {
e.put("uib/template/tooltip/tooltip-popup.html", '<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind="content"></div>\n')
}]), angular.module("uib/template/tooltip/tooltip-template-popup.html", []).run(["$templateCache", function (e) {
e.put("uib/template/tooltip/tooltip-template-popup.html", '<div class="tooltip-arrow"></div>\n<div class="tooltip-inner"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n')
}]), angular.module("uib/template/popover/popover-html.html", []).run(["$templateCache", function (e) {
e.put("uib/template/popover/popover-html.html", '<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind-html="contentExp()"></div>\n</div>\n')
}]), angular.module("uib/template/popover/popover-template.html", []).run(["$templateCache", function (e) {
e.put("uib/template/popover/popover-template.html", '<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content"\n uib-tooltip-template-transclude="contentExp()"\n tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')
}]), angular.module("uib/template/popover/popover.html", []).run(["$templateCache", function (e) {
e.put("uib/template/popover/popover.html", '<div class="arrow"></div>\n\n<div class="popover-inner">\n <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n <div class="popover-content" ng-bind="content"></div>\n</div>\n')
}]), angular.module("uib/template/progressbar/bar.html", []).run(["$templateCache", function (e) {
e.put("uib/template/progressbar/bar.html", '<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')
}]), angular.module("uib/template/progressbar/progress.html", []).run(["$templateCache", function (e) {
e.put("uib/template/progressbar/progress.html", '<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')
}]), angular.module("uib/template/progressbar/progressbar.html", []).run(["$templateCache", function (e) {
e.put("uib/template/progressbar/progressbar.html", '<div class="progress">\n <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')
}]), angular.module("uib/template/rating/rating.html", []).run(["$templateCache", function (e) {
e.put("uib/template/rating/rating.html", '<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')
}]), angular.module("uib/template/tabs/tab.html", []).run(["$templateCache", function (e) {
e.put("uib/template/tabs/tab.html", '<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')
}]), angular.module("uib/template/tabs/tabset.html", []).run(["$templateCache", function (e) {
e.put("uib/template/tabs/tabset.html", '<div>\n <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n <div class="tab-content">\n <div class="tab-pane"\n ng-repeat="tab in tabset.tabs"\n ng-class="{active: tabset.active === tab.index}"\n uib-tab-content-transclude="tab">\n </div>\n </div>\n</div>\n')
}]), angular.module("uib/template/timepicker/timepicker.html", []).run(["$templateCache", function (e) {
e.put("uib/template/timepicker/timepicker.html", '<table class="uib-timepicker">\n <tbody>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n <tr>\n <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n </td>\n <td class="uib-separator">:</td>\n <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n </td>\n <td ng-show="showSeconds" class="uib-separator">:</td>\n <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n </td>\n <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n </tr>\n <tr class="text-center" ng-show="::showSpinners">\n <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td>&nbsp;</td>\n <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showSeconds">&nbsp;</td>\n <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n <td ng-show="showMeridian"></td>\n </tr>\n </tbody>\n</table>\n')
}]), angular.module("uib/template/typeahead/typeahead-match.html", []).run(["$templateCache", function (e) {
e.put("uib/template/typeahead/typeahead-match.html", '<a href\n tabindex="-1"\n ng-bind-html="match.label | uibTypeaheadHighlight:query"\n ng-attr-title="{{match.label}}"></a>\n')
}]), angular.module("uib/template/typeahead/typeahead-popup.html", []).run(["$templateCache", function (e) {
e.put("uib/template/typeahead/typeahead-popup.html", '<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n <li class="uib-typeahead-match" ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n </li>\n</ul>\n')
}]), angular.module("ui.bootstrap.carousel").run(function () {
angular.$$csp().noInlineStyle || angular.$$uibCarouselCss || angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'), angular.$$uibCarouselCss = !0
}), angular.module("ui.bootstrap.datepicker").run(function () {
angular.$$csp().noInlineStyle || angular.$$uibDatepickerCss || angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'), angular.$$uibDatepickerCss = !0
}), angular.module("ui.bootstrap.position").run(function () {
angular.$$csp().noInlineStyle || angular.$$uibPositionCss || angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'), angular.$$uibPositionCss = !0
}), angular.module("ui.bootstrap.datepickerPopup").run(function () {
angular.$$csp().noInlineStyle || angular.$$uibDatepickerpopupCss || angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'), angular.$$uibDatepickerpopupCss = !0
}), angular.module("ui.bootstrap.tooltip").run(function () {
angular.$$csp().noInlineStyle || angular.$$uibTooltipCss || angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'), angular.$$uibTooltipCss = !0
}), angular.module("ui.bootstrap.timepicker").run(function () {
angular.$$csp().noInlineStyle || angular.$$uibTimepickerCss || angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'), angular.$$uibTimepickerCss = !0
}), angular.module("ui.bootstrap.typeahead").run(function () {
angular.$$csp().noInlineStyle || angular.$$uibTypeaheadCss || angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'), angular.$$uibTypeaheadCss = !0
}), function (e, t) {
"function" == typeof define && define.amd ? define(["angular"], t) : "object" == typeof module && module.exports ? module.exports = t(require("angular")) : e.angularClipboard = t(e.angular)
}(this, function (i) {
return i.module("angular-clipboard", []).factory("clipboard", ["$document", "$window", function (n, i) {
return {
copyText: function (e, t) {
var a = function (e) {
var t = n[0].createElement("textarea");
return t.style.position = "absolute", t.textContent = e, t.style.left = "-10000px", t.style.top = (i.pageYOffset || n[0].documentElement.scrollTop) + "px", t
}(e);
n[0].body.appendChild(a), function (e) {
try {
n[0].body.style.webkitUserSelect = "initial";
var t = n[0].getSelection();
if (t.removeAllRanges(), e.select(), !n[0].execCommand("copy")) throw"failure copy";
t.removeAllRanges()
} finally {
n[0].body.style.webkitUserSelect = ""
}
}(a), n[0].body.removeChild(a)
}, supported: "queryCommandSupported" in n[0] && n[0].queryCommandSupported("copy")
}
}]).directive("clipboard", ["clipboard", function (n) {
return {
restrict: "A", scope: {onCopied: "&", onError: "&", text: "=", supported: "=?"}, link: function (t, a) {
t.supported = n.supported, a.on("click", function (e) {
try {
n.copyText(t.text, a[0]), i.isFunction(t.onCopied) && t.$evalAsync(t.onCopied())
} catch (e) {
i.isFunction(t.onError) && t.$evalAsync(t.onError({err: e}))
}
})
}
}
}])
}), function () {
"use strict";
angular.module("cfp.hotkeys", []).provider("hotkeys", ["$injector", function (e) {
this.includeCheatSheet = !0, this.useNgRoute = e.has("ngViewDirective"), this.templateTitle = "Keyboard Shortcuts:", this.templateHeader = null, this.templateFooter = null, this.template = '<div class="cfp-hotkeys-container fade" ng-class="{in: helpVisible}" style="display: none;"><div class="cfp-hotkeys"><h4 class="cfp-hotkeys-title" ng-if="!header">{{ title }}</h4><div ng-bind-html="header" ng-if="header"></div><table><tbody><tr ng-repeat="hotkey in hotkeys | filter:{ description: \'!$$undefined$$\' }"><td class="cfp-hotkeys-keys"><span ng-repeat="key in hotkey.format() track by $index" class="cfp-hotkeys-key">{{ key }}</span></td><td class="cfp-hotkeys-text">{{ hotkey.description }}</td></tr></tbody></table><div ng-bind-html="footer" ng-if="footer"></div><div class="cfp-hotkeys-close" ng-click="toggleCheatSheet()">&#215;</div></div></div>', this.cheatSheetHotkey = "?", this.cheatSheetDescription = "Show / hide this help menu", this.$get = ["$rootElement", "$rootScope", "$compile", "$window", "$document", function (e, s, t, n, a) {
var i = !0;
function o(e) {
var t = {
command: "⌘",
shift: "⇧",
left: "←",
right: "→",
up: "↑",
down: "↓",
return: "⏎",
backspace: "⌫"
};
e = e.split("+");
for (var a = 0; a < e.length; a++) "mod" === e[a] && (n.navigator && 0 <= n.navigator.platform.indexOf("Mac") ? e[a] = "command" : e[a] = "ctrl"), e[a] = t[e[a]] || e[a];
return e.join(" + ")
}
function d(e, t, a, n, i, s) {
this.combo = e instanceof Array ? e : [e], this.description = t, this.callback = a, this.action = n, this.allowIn = i, this.persistent = s, this._formated = null
}
Mousetrap.prototype.stopCallback = function (e, t) {
return !i || !(-1 < (" " + t.className + " ").indexOf(" mousetrap ")) && (t.contentEditable && "true" == t.contentEditable)
}, d.prototype.format = function () {
if (null === this._formated) {
for (var e = this.combo[0].split(/[\s]/), t = 0; t < e.length; t++) e[t] = o(e[t]);
this._formated = e
}
return this._formated
};
var p = s.$new();
p.hotkeys = [], p.helpVisible = !1, p.title = this.templateTitle, p.header = this.templateHeader, p.footer = this.templateFooter, p.toggleCheatSheet = f;
var r = {};
if (this.useNgRoute && s.$on("$routeChangeSuccess", function (e, a) {
m(), a && a.hotkeys && angular.forEach(a.hotkeys, function (e) {
var t = e[2];
("string" == typeof t || t instanceof String) && (e[2] = [t, a]), e[5] = !1, h.apply(this, e)
})
}), this.includeCheatSheet) {
var l = a[0], c = e[0], u = angular.element(this.template);
h(this.cheatSheetHotkey, this.cheatSheetDescription, f), c !== l && c !== l.documentElement || (c = l.body), angular.element(c).append(t(u)(p))
}
function m() {
for (var e = p.hotkeys.length; e--;) {
var t = p.hotkeys[e];
t && !t.persistent && v(t)
}
}
var g = !1;
function f() {
p.helpVisible = !p.helpVisible, p.helpVisible ? (g = y("esc"), v("esc"), h("esc", g.description, f, null, ["INPUT", "SELECT", "TEXTAREA"])) : (v("esc"), !1 !== g && h(g))
}
function h(e, t, a, n, i, s) {
var o, r = ["INPUT", "SELECT", "TEXTAREA"];
if ("[object Object]" === Object.prototype.toString.call(e) && (t = e.description, a = e.callback, n = e.action, s = e.persistent, i = e.allowIn, e = e.combo), v(e), t instanceof Function ? (n = a, a = t, t = "$$undefined$$") : angular.isUndefined(t) && (t = "$$undefined$$"), void 0 === s && (s = !0), "function" == typeof a) {
var l;
o = a, i instanceof Array || (i = []);
for (var c = 0; c < i.length; c++) i[c] = i[c].toUpperCase(), -1 !== (l = r.indexOf(i[c])) && r.splice(l, 1);
a = function (e) {
var t = !0;
if (e) {
var a = e.target || e.srcElement, n = a.nodeName.toUpperCase();
if (-1 < (" " + a.className + " ").indexOf(" mousetrap ")) t = !0; else for (var i = 0; i < r.length; i++) if (r[i] === n) {
t = !1;
break
}
}
t && b(o.apply(this, arguments))
}
}
"string" == typeof n ? Mousetrap.bind(e, b(a), n) : Mousetrap.bind(e, b(a));
var u = new d(e, t, a, n, i, s);
return p.hotkeys.push(u), u
}
function v(e) {
var t = e instanceof d ? e.combo : e;
if (Mousetrap.unbind(t), angular.isArray(t)) {
for (var a = !0, n = t.length; n--;) a = v(t[n]) && a;
return a
}
var i = p.hotkeys.indexOf(y(t));
return -1 < i && (1 < p.hotkeys[i].combo.length ? p.hotkeys[i].combo.splice(p.hotkeys[i].combo.indexOf(t), 1) : (angular.forEach(r, function (e) {
var t = e.indexOf(p.hotkeys[i]);
-1 !== t && e.splice(t, 1)
}), p.hotkeys.splice(i, 1)), !0)
}
function y(e) {
if (!e) return p.hotkeys;
for (var t, a = 0; a < p.hotkeys.length; a++) if (-1 < (t = p.hotkeys[a]).combo.indexOf(e)) return t;
return !1
}
function b(i) {
return function (e, t) {
if (i instanceof Array) {
var a = i[0], n = i[1];
i = function (e) {
n.scope.$eval(a)
}
}
s.$apply(function () {
i(e, y(t))
})
}
}
return {
add: h,
del: v,
get: y,
bindTo: function (a) {
return a.$id in r || (r[a.$id] = [], a.$on("$destroy", function () {
for (var e = r[a.$id].length; e--;) v(r[a.$id].pop())
})), {
add: function (e) {
var t;
return t = 1 < arguments.length ? h.apply(this, arguments) : h(e), r[a.$id].push(t), this
}
}
},
template: this.template,
toggleCheatSheet: f,
includeCheatSheet: this.includeCheatSheet,
cheatSheetHotkey: this.cheatSheetHotkey,
cheatSheetDescription: this.cheatSheetDescription,
useNgRoute: this.useNgRoute,
purgeHotkeys: m,
templateTitle: this.templateTitle,
pause: function () {
i = !1
},
unpause: function () {
i = !0
}
}
}]
}]).directive("hotkey", ["hotkeys", function (s) {
return {
restrict: "A", link: function (e, t, a) {
var n, i = [];
angular.forEach(e.$eval(a.hotkey), function (e, t) {
n = "string" == typeof a.hotkeyAllowIn ? a.hotkeyAllowIn.split(/[\s,]+/) : [], i.push(t), s.add({
combo: t,
description: a.hotkeyDescription,
callback: e,
action: a.hotkeyAction,
allowIn: n
})
}), t.bind("$destroy", function () {
angular.forEach(i, s.del)
})
}
}
}]).run(["hotkeys", function (e) {
}])
}(), function (e, n) {
for (var i, s = {
8: "backspace",
9: "tab",
13: "enter",
16: "shift",
17: "ctrl",
18: "alt",
20: "capslock",
27: "esc",
32: "space",
33: "pageup",
34: "pagedown",
35: "end",
36: "home",
37: "left",
38: "up",
39: "right",
40: "down",
45: "ins",
46: "del",
91: "meta",
93: "meta",
224: "meta"
}, a = {
106: "*",
107: "+",
109: "-",
110: ".",
111: "/",
186: ";",
187: "=",
188: ",",
189: "-",
190: ".",
191: "/",
192: "`",
219: "[",
220: "\\",
221: "]",
222: "'"
}, o = {
"~": "`",
"!": "1",
"@": "2",
"#": "3",
$: "4",
"%": "5",
"^": "6",
"&": "7",
"*": "8",
"(": "9",
")": "0",
_: "-",
"+": "=",
":": ";",
'"': "'",
"<": ",",
">": ".",
"?": "/",
"|": "\\"
}, r = {
option: "alt",
command: "meta",
return: "enter",
escape: "esc",
plus: "+",
mod: /Mac|iPod|iPhone|iPad/.test(navigator.platform) ? "meta" : "ctrl"
}, t = 1; t < 20; ++t) s[111 + t] = "f" + t;
for (t = 0; t <= 9; ++t) s[t + 96] = t;
function y(e, t, a) {
e.addEventListener ? e.addEventListener(t, a, !1) : e.attachEvent("on" + t, a)
}
function b(e) {
if ("keypress" != e.type) return s[e.which] ? s[e.which] : a[e.which] ? a[e.which] : String.fromCharCode(e.which).toLowerCase();
var t = String.fromCharCode(e.which);
return e.shiftKey || (t = t.toLowerCase()), t
}
function w(e) {
return "shift" == e || "ctrl" == e || "alt" == e || "meta" == e
}
function l(e, t, a) {
return a || (a = function () {
if (!i) for (var e in i = {}, s) 95 < e && e < 112 || s.hasOwnProperty(e) && (i[s[e]] = e);
return i
}()[e] ? "keydown" : "keypress"), "keypress" == a && t.length && (a = "keydown"), a
}
function $(e, t) {
var a, n, i, s = [];
for (a = function (e) {
return "+" === e ? ["+"] : (e = e.replace(/\+{2}/g, "+plus")).split("+")
}(e), i = 0; i < a.length; ++i) n = a[i], r[n] && (n = r[n]), t && "keypress" != t && o[n] && (n = o[n], s.push("shift")), w(n) && s.push(n);
return {key: n, modifiers: s, action: t = l(n, s, t)}
}
function k(e) {
var g = this;
if (e = e || n, !(g instanceof k)) return new k(e);
g.target = e, g._callbacks = {}, g._directMap = {};
var l, f = {}, c = !1, u = !1, d = !1;
function p(e) {
e = e || {};
var t, a = !1;
for (t in f) e[t] ? a = !0 : f[t] = 0;
a || (d = !1)
}
function m(e, t, a, n, i, s) {
var o, r, l, c, u = [], d = a.type;
if (!g._callbacks[e]) return [];
for ("keyup" == d && w(e) && (t = [e]), o = 0; o < g._callbacks[e].length; ++o) if (r = g._callbacks[e][o], (n || !r.seq || f[r.seq] == r.level) && d == r.action && ("keypress" == d && !a.metaKey && !a.ctrlKey || (l = t, c = r.modifiers, l.sort().join(",") === c.sort().join(",")))) {
var p = !n && r.combo == i, m = n && r.seq == n && r.level == s;
(p || m) && g._callbacks[e].splice(o, 1), u.push(r)
}
return u
}
function h(e, t, a, n) {
g.stopCallback(t, t.target || t.srcElement, a, n) || !1 === e(t, a) && (function (e) {
e.preventDefault ? e.preventDefault() : e.returnValue = !1
}(t), function (e) {
e.stopPropagation ? e.stopPropagation() : e.cancelBubble = !0
}(t))
}
function t(e) {
"number" != typeof e.which && (e.which = e.keyCode);
var t = b(e);
t && ("keyup" != e.type || c !== t ? g.handleKey(t, function (e) {
var t = [];
return e.shiftKey && t.push("shift"), e.altKey && t.push("alt"), e.ctrlKey && t.push("ctrl"), e.metaKey && t.push("meta"), t
}(e), e) : c = !1)
}
function r(t, e, a, n) {
function i(e) {
return function () {
d = e, ++f[t], clearTimeout(l), l = setTimeout(p, 1e3)
}
}
function s(e) {
h(a, e, t), "keyup" !== n && (c = b(e)), setTimeout(p, 10)
}
for (var o = f[t] = 0; o < e.length; ++o) {
var r = o + 1 === e.length ? s : i(n || $(e[o + 1]).action);
v(e[o], r, n, t, o)
}
}
function v(e, t, a, n, i) {
g._directMap[e + ":" + a] = t;
var s, o = (e = e.replace(/\s+/g, " ")).split(" ");
1 < o.length ? r(e, o, t, a) : (s = $(e, a), g._callbacks[s.key] = g._callbacks[s.key] || [], m(s.key, s.modifiers, {type: s.action}, n, e, i), g._callbacks[s.key][n ? "unshift" : "push"]({
callback: t,
modifiers: s.modifiers,
action: s.action,
seq: n,
level: i,
combo: e
}))
}
g._handleKey = function (e, t, a) {
var n, i = m(e, t, a), s = {}, o = 0, r = !1;
for (n = 0; n < i.length; ++n) i[n].seq && (o = Math.max(o, i[n].level));
for (n = 0; n < i.length; ++n) if (i[n].seq) {
if (i[n].level != o) continue;
r = !0, s[i[n].seq] = 1, h(i[n].callback, a, i[n].combo, i[n].seq)
} else r || h(i[n].callback, a, i[n].combo);
var l = "keypress" == a.type && u;
a.type != d || w(e) || l || p(s), u = r && "keydown" == a.type
}, g._bindMultiple = function (e, t, a) {
for (var n = 0; n < e.length; ++n) v(e[n], t, a)
}, y(e, "keypress", t), y(e, "keydown", t), y(e, "keyup", t)
}
k.prototype.bind = function (e, t, a) {
return e = e instanceof Array ? e : [e], this._bindMultiple.call(this, e, t, a), this
}, k.prototype.unbind = function (e, t) {
return this.bind.call(this, e, function () {
}, t)
}, k.prototype.trigger = function (e, t) {
return this._directMap[e + ":" + t] && this._directMap[e + ":" + t]({}, e), this
}, k.prototype.reset = function () {
return this._callbacks = {}, this._directMap = {}, this
}, k.prototype.stopCallback = function (e, t) {
return !(-1 < (" " + t.className + " ").indexOf(" mousetrap ")) && (!function e(t, a) {
return t !== n && (t === a || e(t.parentNode, a))
}(t, this.target) && ("INPUT" == t.tagName || "SELECT" == t.tagName || "TEXTAREA" == t.tagName || t.isContentEditable))
}, k.prototype.handleKey = function () {
return this._handleKey.apply(this, arguments)
}, k.init = function () {
var t = k(n);
for (var e in t) "_" !== e.charAt(0) && (k[e] = function (e) {
return function () {
return t[e].apply(t, arguments)
}
}(e))
}, k.init(), e.Mousetrap = k, "undefined" != typeof module && module.exports && (module.exports = k), "function" == typeof define && define.amd && define(function () {
return k
})
}(window, document), function (r, f) {
"use strict";
var s = f.$$minErr("$sanitize");
var o, t = /[\uD800-\uDBFF][\uDC00-\uDFFF]/g, a = /([^\#-~ |!])/g, n = b("area,br,col,hr,img,wbr"),
e = b("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"), i = b("rp,rt"), l = f.extend({}, i, e),
c = f.extend({}, e, b("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),
u = f.extend({}, i, b("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),
d = b("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),
p = b("script,style"), m = f.extend({}, n, c, u, l), g = b("background,cite,href,longdesc,src,xlink:href"),
h = b("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),
v = b("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan", !0),
y = f.extend({}, g, v, h);
function b(e, t) {
var a, n = {}, i = e.split(",");
for (a = 0; a < i.length; a++) n[t ? f.lowercase(i[a]) : i[a]] = !0;
return n
}
function w(e) {
for (var t = {}, a = 0, n = e.length; a < n; a++) {
var i = e[a];
t[i.name] = i.value
}
return t
}
function $(e) {
return e.replace(/&/g, "&amp;").replace(t, function (e) {
return "&#" + (1024 * (e.charCodeAt(0) - 55296) + (e.charCodeAt(1) - 56320) + 65536) + ";"
}).replace(a, function (e) {
return "&#" + e.charCodeAt(0) + ";"
}).replace(/</g, "&lt;").replace(/>/g, "&gt;")
}
function k(e, s) {
var t = !1, o = f.bind(e, e.push);
return {
start: function (i, e) {
i = f.lowercase(i), !t && p[i] && (t = i), t || !0 !== m[i] || (o("<"), o(i), f.forEach(e, function (e, t) {
var a = f.lowercase(t), n = "img" === i && "src" === a || "background" === a;
!0 !== y[a] || !0 === g[a] && !s(e, n) || (o(" "), o(t), o('="'), o($(e)), o('"'))
}), o(">"))
}, end: function (e) {
e = f.lowercase(e), t || !0 !== m[e] || !0 === n[e] || (o("</"), o(e), o(">")), e == t && (t = !1)
}, chars: function (e) {
t || o($(e))
}
}
}
function x(e) {
if (e.nodeType === r.Node.ELEMENT_NODE) for (var t = e.attributes, a = 0, n = t.length; a < n; a++) {
var i = t[a], s = i.name.toLowerCase();
"xmlns:ns1" !== s && 0 !== s.lastIndexOf("ns1:", 0) || (e.removeAttributeNode(i), a--, n--)
}
var o = e.firstChild;
o && x(o), (o = e.nextSibling) && x(o)
}
!function (e) {
var t;
if (!e.document || !e.document.implementation) throw s("noinert", "Can't create an inert html document");
var a = ((t = e.document.implementation.createHTMLDocument("inert")).documentElement || t.getDocumentElement()).getElementsByTagName("body");
if (1 === a.length) o = a[0]; else {
var n = t.createElement("html");
o = t.createElement("body"), n.appendChild(o), t.appendChild(n)
}
}(r), f.module("ngSanitize", []).provider("$sanitize", function () {
var t = !1;
this.$get = ["$$sanitizeUri", function (a) {
return t && f.extend(m, d), function (e) {
var t = [];
return function (e, t) {
null == e ? e = "" : "string" != typeof e && (e = "" + e);
o.innerHTML = e;
var a = 5;
do {
if (0 === a) throw s("uinput", "Failed to sanitize html because the input is unstable");
a--, r.document.documentMode && x(o), e = o.innerHTML, o.innerHTML = e
} while (e !== o.innerHTML);
var n = o.firstChild;
for (; n;) {
switch (n.nodeType) {
case 1:
t.start(n.nodeName.toLowerCase(), w(n.attributes));
break;
case 3:
t.chars(n.textContent)
}
var i;
if (!((i = n.firstChild) || (1 == n.nodeType && t.end(n.nodeName.toLowerCase()), i = n.nextSibling))) for (; null == i && (n = n.parentNode) !== o;) i = n.nextSibling, 1 == n.nodeType && t.end(n.nodeName.toLowerCase());
n = i
}
for (; n = o.firstChild;) o.removeChild(n)
}(e, k(t, function (e, t) {
return !/^unsafe:/.test(a(e, t))
})), t.join("")
}
}], this.enableSvg = function (e) {
return f.isDefined(e) ? (t = e, this) : t
}
}), f.module("ngSanitize").filter("linky", ["$sanitize", function (u) {
var d = /((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,
p = /^mailto:/i, m = f.$$minErr("linky"), g = f.isString;
return function (e, n, i) {
if (null == e || "" === e) return e;
if (!g(e)) throw m("notstring", "Expected string but received: {0}", e);
for (var t, a, s, o = e, r = []; t = o.match(d);) a = t[0], t[2] || t[4] || (a = (t[3] ? "http://" : "mailto:") + a), s = t.index, l(o.substr(0, s)), c(a, t[0].replace(p, "")), o = o.substring(s + t[0].length);
return l(o), u(r.join(""));
function l(e) {
e && r.push(function (e) {
var t = [];
return k(t, f.noop).chars(e), t.join("")
}(e))
}
function c(e, t) {
var a;
if (r.push("<a "), f.isFunction(i) && (i = i(e)), f.isObject(i)) for (a in i) r.push(a + '="' + i[a] + '" '); else i = {};
!f.isDefined(n) || "target" in i || r.push('target="', n, '" '), r.push('href="', e.replace(/"/g, "&quot;"), '">'), l(t), r.push("</a>")
}
}
}])
}(window, window.angular), mod = angular.module("infinite-scroll", []), mod.directive("infiniteScroll", ["$rootScope", "$window", "$timeout", function (l, c, e) {
return {
link: function (a, n, i) {
var s, t, o, r;
return c = angular.element(c), o = 0, null != i.infiniteScrollDistance && a.$watch(i.infiniteScrollDistance, function (e) {
return o = parseInt(e, 10)
}), s = !(r = !0), null != i.infiniteScrollDisabled && a.$watch(i.infiniteScrollDisabled, function (e) {
if ((r = !e) && s) return s = !1, t()
}), t = function () {
var e, t;
return t = c.height() + c.scrollTop(), (e = n.offset().top + n.height() - t <= c.height() * o) && r ? l.$$phase ? a.$eval(i.infiniteScroll) : a.$apply(i.infiniteScroll) : e ? s = !0 : void 0
}, c.on("scroll", t), a.$on("$destroy", function () {
return c.off("scroll", t)
}), e(function () {
return i.infiniteScrollImmediateCheck ? a.$eval(i.infiniteScrollImmediateCheck) ? t() : void 0 : t()
}, 0)
}
}
}]), function (e, k) {
"use strict";
var t = k.module("ngTouch", []);
function a(t, a) {
var n = !1, i = !1;
this.ngClickOverrideEnabled = function (e) {
return k.isDefined(e) ? (e && !i && (i = !0, s.$$moduleName = "ngTouch", a.directive("ngClick", s), t.decorator("ngClickDirective", ["$delegate", function (e) {
if (n) e.shift(); else for (var t = e.length - 1; 0 <= t;) {
if ("ngTouch" === e[t].$$moduleName) {
e.splice(t, 1);
break
}
t--
}
return e
}])), n = e, this) : n
}, this.$get = function () {
return {
ngClickOverrideEnabled: function () {
return n
}
}
}
}
t.provider("$touch", a), a.$inject = ["$provide", "$compileProvider"], t.factory("$swipe", [function () {
var i = {
mouse: {start: "mousedown", move: "mousemove", end: "mouseup"},
touch: {start: "touchstart", move: "touchmove", end: "touchend", cancel: "touchcancel"}
};
function c(e) {
var t = e.originalEvent || e, a = t.touches && t.touches.length ? t.touches : [t],
n = t.changedTouches && t.changedTouches[0] || a[0];
return {x: n.clientX, y: n.clientY}
}
function u(e, a) {
var n = [];
return k.forEach(e, function (e) {
var t = i[e][a];
t && n.push(t)
}), n.join(" ")
}
return {
bind: function (e, a, t) {
var n, i, s, o, r = !1;
t = t || ["mouse", "touch"], e.on(u(t, "start"), function (e) {
s = c(e), r = !0, i = n = 0, o = s, a.start && a.start(s, e)
});
var l = u(t, "cancel");
l && e.on(l, function (e) {
r = !1, a.cancel && a.cancel(e)
}), e.on(u(t, "move"), function (e) {
if (r && s) {
var t = c(e);
if (n += Math.abs(t.x - o.x), i += Math.abs(t.y - o.y), o = t, !(n < 10 && i < 10)) return n < i ? (r = !1, void (a.cancel && a.cancel(e))) : (e.preventDefault(), void (a.move && a.move(t, e)))
}
}), e.on(u(t, "end"), function (e) {
r && (r = !1, a.end && a.end(c(e), e))
})
}
}
}]);
var s = ["$parse", "$timeout", "$rootElement", function (e, i, f) {
var h, v, s, o = 2500, l = 25, y = "ng-click-active";
function b(e, t, a) {
for (var n = 0; n < e.length; n += 2) if (i = e[n], s = e[n + 1], o = t, r = a, Math.abs(i - o) < l && Math.abs(s - r) < l) return e.splice(n, n + 2), !0;
var i, s, o, r;
return !1
}
function w(e) {
if (!(Date.now() - h > o)) {
var t = e.touches && e.touches.length ? e.touches : [e], a = t[0].clientX, n = t[0].clientY;
a < 1 && n < 1 || s && s[0] === a && s[1] === n || (s && (s = null), "label" === function (e) {
return k.lowercase(e.nodeName || e[0] && e[0].nodeName)
}(e.target) && (s = [a, n]), b(v, a, n) || (e.stopPropagation(), e.preventDefault(), e.target && e.target.blur && e.target.blur()))
}
}
function $(e) {
var t = e.touches && e.touches.length ? e.touches : [e], a = t[0].clientX, n = t[0].clientY;
v.push(a, n), i(function () {
for (var e = 0; e < v.length; e += 2) if (v[e] == a && v[e + 1] == n) return void v.splice(e, e + 2)
}, o, !1)
}
return function (a, r, l) {
var c, u, d, p, n = e(l.ngClick), m = !1;
function g() {
m = !1, r.removeClass(y)
}
r.on("touchstart", function (e) {
m = !0, 3 == (c = e.target ? e.target : e.srcElement).nodeType && (c = c.parentNode), r.addClass(y), u = Date.now();
var t = e.originalEvent || e, a = (t.touches && t.touches.length ? t.touches : [t])[0];
d = a.clientX, p = a.clientY
}), r.on("touchcancel", function (e) {
g()
}), r.on("touchend", function (e) {
var t = Date.now() - u, a = e.originalEvent || e,
n = (a.changedTouches && a.changedTouches.length ? a.changedTouches : a.touches && a.touches.length ? a.touches : [a])[0],
i = n.clientX, s = n.clientY, o = Math.sqrt(Math.pow(i - d, 2) + Math.pow(s - p, 2));
m && t < 750 && o < 12 && (function (e, t) {
v || (f[0].addEventListener("click", w, !0), f[0].addEventListener("touchstart", $, !0), v = []), h = Date.now(), b(v, e, t)
}(i, s), c && c.blur(), k.isDefined(l.disabled) && !1 !== l.disabled || r.triggerHandler("click", [e])), g()
}), r.onclick = function (e) {
}, r.on("click", function (e, t) {
a.$apply(function () {
n(a, {$event: t || e})
})
}), r.on("mousedown", function (e) {
r.addClass(y)
}), r.on("mousemove mouseup", function (e) {
r.removeClass(y)
})
}
}];
function n(c, u, d) {
t.directive(c, ["$parse", "$swipe", function (r, l) {
return function (a, n, e) {
var i, s, o = r(e[c]);
var t = ["touch"];
k.isDefined(e.ngSwipeDisableMouse) || t.push("mouse"), l.bind(n, {
start: function (e, t) {
i = e, s = !0
}, cancel: function (e) {
s = !1
}, end: function (e, t) {
!function (e) {
if (!i) return !1;
var t = Math.abs(e.y - i.y), a = (e.x - i.x) * u;
return s && t < 75 && 0 < a && 30 < a && t / a < .3
}(e) || a.$apply(function () {
n.triggerHandler(d), o(a, {$event: t})
})
}
}, t)
}
}])
}
n("ngSwipeLeft", -1, "swipeleft"), n("ngSwipeRight", 1, "swiperight")
}(window, window.angular), angular.module("we7app", ["ngAnimate", "ngSanitize", "ui.bootstrap", "angular-clipboard"]), angular.module("we7app").run(["$rootScope", "we7TypeDefault", function (e, t) {
e.URL = "test", e.we7TypeDefault = t
}]), angular.module("we7app").factory("interceptors", [function () {
return {
request: function (e) {
return e.beforeSend && e.beforeSend(), e
}, response: function (e) {
return e.config.complete && e.config.complete(e), e
}
}
}]), angular.module("we7app").config(["$httpProvider", function (e) {
e.interceptors.push("interceptors"), e.defaults.headers.post["Content-Type"] = "application/x-www-form-urlencoded;charset=utf-8", e.defaults.headers.common["X-Requested-With"] = "XMLHttpRequest";
var l = function (e) {
var t, a, n, i, s, o, r = "";
for (t in e) if ((a = e[t]) instanceof Array) for (o = 0; o < a.length; ++o) i = a[o], (s = {})[t + "[" + o + "]"] = i, r += l(s) + "&"; else if (a instanceof Object) for (n in a) i = a[n], (s = {})[t + "[" + n + "]"] = i, r += l(s) + "&"; else null != a && (r += encodeURIComponent(t) + "=" + encodeURIComponent(a) + "&");
return r.length ? r.substr(0, r.length - 1) : r
};
e.defaults.transformRequest = [function (e) {
return angular.isObject(e) && "[object File]" !== String(e) ? l(e) : e
}]
}]), window.we7ImgError = function (e) {
if (!$(e).attr("onerror")) {
console.log(1);
var t = "resource/images/nopic-107.png";
$(e).width() == $(e).height() ? t = "resource/images/nopic-107.png" : $(e).width() < $(e).height() && (t = "resource/images/nopic-203.png"), $(e).hasClass("user-avatar") && (t = "resource/images/nopic-user.png"), $(e).hasClass("module-img") && (t = "resource/images/nopic-module.png"), $(e).hasClass("template-img") && (t = "resource/images/nopic-template.png"), $(e).hasClass("account-img") && (t = "resource/images/nopic-account.png"), $(e).attr("src", t)
}
}, window.addEventListener("error", function (e) {
var t = e.target, a = t.tagName, n = Number(t.dataset.times) || 0;
"IMG" === a.toUpperCase() && 0 == n && (we7ImgError(e.target), t.dataset.times = n + 1)
}, !0), $(function () {
if (util.cookie_message(), window.sysinfo.uid && util.cookie.set("__lastvisit_" + window.sysinfo.uid, [window.sysinfo.uniacid, window.sysinfo.siteurl], 604800), $(".js-clip").each(function () {
util.clip(this, $(this).attr("data-url"))
}), $.fn.tooltip && ($('[data-toggle="tooltip"]').tooltip(), $('[data-toggle="dropdown"]').dropdown(), $('[data-toggle="popover"]').popover()), $(function () {
$(".we7-group-show").each(function () {
70 < $(this).find(".group-app-list").outerHeight() ? ($(this).addClass("closed"), $(this).find(".action").on("click", function () {
console.log($(this).parent().toggleClass("closed"))
})) : $(this).addClass("low")
})
}), window.sysinfo.module && window.sysinfo.module.name && (null === util.cookie.get("module_status:" + window.sysinfo.module.name) && null === util.cookie.get("module_status:" + window.sysinfo.module.name) || (module_status = util.cookie.get("module_status:" + window.sysinfo.module.name), module_status = $.parseJSON(module_status), 1 == module_status.ban ? $(".head").after('<div class="system-tips we7-body-alert"><div class="container text-right"> <span class="alert-info"><a href="javascript:;">您的站点存在盗版模块, 请删除文件后联系客服</a></span></div></div>') : 1 == module_status.upgrade.upgrade && 1 == window.sysinfo.isfounder && $(".head").after('<div class="system-tips we7-body-alert"><div class="container text-right"> <span class="alert-info"><a href="javascript:;">【' + module_status.upgrade.name + "】检测最新版为" + module_status.upgrade.version + ",请尽快更新!</a></span></div></div>"))), window.sysinfo.isfounder) {
}
}), window.UEDITOR_HOME_URL = "./resource/components/ueditor/", $(function () {
if (1 == $("[data-skin='black']").length && resizeView(), 3 == $(".menu-fixed, .left-menu, .right-content").length) {
require(["slimscroll"], function () {
$(".plugin-menu-sub").slimscroll({width: "210px", height: "100%", opacity: .4, color: "#aaa"})
});
var n = document.documentElement.clientHeight, i = $(".left-menu"), s = i.offset().top, o = i.css("position"),
e = 0 < $(".footer").length ? $(".footer").css("height") : 0;
"default" == $(".skin-default").attr("data-skin") && $(".left-menu, .skin-default .right-content").css("min-height", n - 174 - parseInt(e) + "px"), "black" == $(".skin-black").attr("data-skin") && $(".left-menu, .skin-default .right-content").css("min-height", n - 51 + "px"), $(window).scroll(function () {
var e = 0 < $(".footer").length && !$(".footer").is(":hidden") ? $(".footer").offset().top : 0,
t = $(document).scrollTop(), a = e ? e - t : n;
"default" == $(".skin-default").attr("data-skin") ? (s < t ? i.css({
position: "fixed",
height: "auto",
top: 0,
bottom: a < n ? n - a + 31 + "px" : "0"
}) : i.css({
position: o,
height: n
}), s < t ? $(".right-content").css({marginLeft: i.css("width")}) : $(".right-content").css({
marginLeft: 0,
minHeight: i.height()
})) : "black" == $(".skin-black").attr("data-skin") && (s < t ? i.css({
position: "fixed",
top: 0,
bottom: 0
}) : i.css({
position: o,
top: t
}), s < t ? $(".right-content").css({marginLeft: i.css("width")}) : $(".right-content").css({
marginLeft: 0,
minHeight: i.height()
}))
})
}
if (1 == $("[data-skin='classical']").length) {
n = document.documentElement.clientHeight, e = 0 < $(".footer").length ? $(".footer").css("height") : 0;
2 == $(".left-menu, .right-content").length && $(".right-content>.content").css("min-height", n - parseInt(e) - 71), 0 < $(".panel-cut").length && $(".panel-cut").css("min-height", n - parseInt(e) - 71)
}
1 == $("[data-skin='2']").length && require(["slimscroll"], function () {
if ($(".skin-2__left .main-nav").slimScroll({
height: "calc(100vh - 90px)",
opacity: .4,
color: "#989898"
}), $(".js-menu").length) {
var e = $(".sub-top").outerHeight(), t = $(".js-menu").attr("id"), a = util.cookie.get("jsMenuScroll");
a && -1 !== a.indexOf(t + ":") ? a = a.split(":")[1] : (a = "", util.cookie.set("jsMenuScroll", "")), $(".js-menu").slimScroll({
width: "110px",
height: $(".skin-2__sub")[0].clientHeight - e + "px",
opacity: .4,
color: "#989898",
scrollTo: "100px"
}).bind("scroll", function (e, t) {
util.cookie.set("jsMenuScroll", e.currentTarget.id + ":" + $(e.currentTarget).scrollTop())
}), a && $(".js-menu").slimScroll({scrollTo: a + "px"}), setTimeout(function () {
$(".js-menu").trigger("mouseenter")
}, 100), $(".slimScrollBar").css("display", "none")
}
$(".js-lock-menu").on("click", function () {
$(".skin-2__left").toggleClass("skin-2__left--small"), $(".js-lock-menu").toggleClass("lock"), util.cookie.set("jsMenuLock", 1 == util.cookie.get("jsMenuLock") ? 0 : 1)
}), $(".action-cut").each(function () {
$(this).hover(function () {
$(this).hasClass("open") && $(this).find('[data-toggle="dropdown"]').dropdown("toggle")
}), $(this).offset().left < 350 ? $(this).find(".dropdown-menu").addClass("dropdown-menu-left") : $(this).offset().left + 350 > $(document).width() && $(this).find(".dropdown-menu").addClass("dropdown-menu-right")
})
})
}), angular.module("we7app").directive("we7Colorpicker", [function () {
return {
restrict: "AE",
templateUrl: "directive-colorpicker-colorpicker.html",
scope: {colorValue: "=we7MyColor", colorDefault: "=we7MyDefaultColor", colorFormName: "=we7FormName"},
link: function (t, a, e) {
$(a).data("data-colorpicker-init") || (util.colorpicker(a, function (e) {
$(a).parent().parent().find(":text").val(e.toHexString()), t.colorValue = e.toHexString(), t.$apply("colorValue"), t.$watch("colorValue", function (e) {
$(a).spectrum("get") != e && ($(a).spectrum("set", e || t.colorDefault), $(a).parent().parent().find(":text").val(e || t.colorDefault), $(a).parent().parent().find(".input-group-addon").css("background-color", e || t.colorDefault))
})
}), $(a).find(".colorclean").click(function () {
return $(a).find(":text").val("rgba(0,0,0,0)"), $(a).find(".input-group-addon").css("background-color", "rgba(0,0,0,0)"), t.colorValue = t.colorDefault = "rgba(0,0,0,0)", $(a).spectrum("set", t.colorDefault), t.$apply("colorValue"), !1
}), $(a).data("data-colorpicker-init", !0))
}
}
}]), angular.module("we7app").directive("we7DatePicker", ["$http", "$parse", function () {
return {
transclude: !0,
template: "<span ng-transclude></span>",
scope: {dateValue: "=we7DateValue", type: "@dateType"},
link: function (n, t, e) {
require(["datetimepicker"], function () {
var a = "time" === n.type ? "H:i:s" : "date" === n.type ? "Y-m-d" : "Y-m-d H:i:s", e = {
lang: "zh",
step: "1",
format: a,
closeOnDateSelect: !0,
datepicker: "time" != n.type,
timepicker: "date" != n.type,
onSelectDate: function (e, t) {
n.dateValue = e.dateFormat(a), n.$apply("dateValue")
},
onSelectTime: function (e, t) {
n.dateValue = e.dateFormat(a), n.$apply("dateValue")
}
};
$(t).datetimepicker(e)
})
}
}
}]), angular.module("we7app").directive("we7DateRangePicker", ["$compile", "$parse", "$filter", function (e, r, l) {
return {
restrict: "A", require: "?ngModel", link: function (i, s, e, o) {
require(["daterangepicker"], function () {
var t = {};
function a(e) {
return moment.isMoment(e) ? e : moment(e)
}
function n(e) {
return l("date")(function (e) {
return moment.isMoment(e) ? e.toDate() : e
}(e), t.format.replace(/Y/g, "y").replace(/D/g, "d"))
}
t.format = e.format || "YYYY-MM-DD", t.separator = e.separator || " - ", t.minDate = e.minDate && moment(e.minDate), t.maxDate = e.maxDate && moment(e.maxDate), t.dateLimit = e.limit && moment.duration.apply(this, e.limit.split(" ").map(function (e, t) {
return 0 === t && parseInt(e, 10) || e
})), t.ranges = e.ranges && r(e.ranges)(i), t.locale = e.locale && r(e.locale)(i), t.opens = e.opens || r(e.opens)(i), e.enabletimepicker && (t.timePicker = !0, angular.extend(t, r(e.enabletimepicker)(i))), o.$render = function () {
o.$viewValue && o.$viewValue.startDate && s.val(function (e) {
return [n(e.startDate), n(e.endDate)].join(t.separator)
}(o.$viewValue))
}, i.$watch(function () {
return e.ngModel
}, function (e, t) {
i[e] && i[e].startDate ? t === e && (s.data("daterangepicker").startDate = a(i[e].startDate), s.data("daterangepicker").endDate = a(i[e].endDate), s.data("daterangepicker").updateView(), s.data("daterangepicker").updateCalendars(), s.data("daterangepicker").updateInputText()) : o.$setViewValue({
startDate: moment().startOf("day"),
endDate: moment().startOf("day")
})
}), s.daterangepicker(t, function (e, t, a) {
var n = o.$viewValue;
angular.equals(e, n.startDate) && angular.equals(t, n.endDate) || i.$apply(function () {
o.$setViewValue({
startDate: moment.isMoment(n.startDate) ? e : e.toDate(),
endDate: moment.isMoment(n.endDate) ? t : t.toDate()
}), o.$render()
})
})
})
}
}
}]), angular.module("we7app").directive("we7Editor", function () {
return {
scope: {value: "=?we7MyValue", params: "=?we7MyParams", options: "@options", global: "@global"},
template: '<textarea id="" rows="10" style="height:600px;width:100%"></textarea>',
link: function (a, n, e) {
if (!n.data("editor")) {
n.find("textarea").attr("id", "editor" + (new Date).getTime());
var t = {
callback: function (e, t) {
n.data("editor", "true"), t.addListener("contentChange", function () {
a.value = t.getContent(), a.value && (a.params = a.value.replace(/\&quot;/g, "#quot;")), a.$root.$$phase || a.$apply("value")
}), t.addListener("ready", function () {
!a.value && a.params && (a.value = a.params.replace(/\#quot;/g, "&quot;")), a.value && t && t.getContent() != a.value && t.setContent(a.value), a.$watch("value", function (e) {
t && t.getContent() != e && t.setContent(e || "")
})
})
}
};
a.options && "object" == typeof a.options && Object.assign(t, a.options), a.global && (t.global = !0, t.uniacid = 0), util.editor(n.find("textarea").attr("id"), t)
}
}
}
}), angular.module("we7app").directive("we7FileUp", ["$http", "$parse", function () {
return {
scope: {
type: "@type",
multiple: "@multiple",
value: "=we7File",
onConfirm: "=?onConfirm",
options: "@options",
global: "@global"
}, link: function (t, a, n) {
var i = {
type: t.type || "image",
direct: !1,
multiple: t.multiple || !1,
dest_dir: "",
global: !1,
thumb: !1,
width: 0,
needType: 2
};
t.options && "object" == typeof t.options && (i = $.extend({}, i, t.options)), t.global && (i.global = !0, i.uniacid = 0), a.on("click", function (e) {
require(["fileUploader"], function (e) {
e.show(function (e) {
e && (t.value = e, t.onConfirm && "function" == typeof t.onConfirm && t.onConfirm(e, a, n), t.$root.$$phase || t.$apply("value"))
}, i)
})
})
}
}
}]), angular.module("we7app").directive("we7Iconer", ["$templateCache", function (e) {
e.get("directive-iconer-nav-pills-inline.html"), e.get("directive-iconer-tab-content-inline.html");
return {
scope: {image: "=we7MyImage", icon: "=we7MyIcon", iconcolor: "=we7MyIconColor"},
transclude: !0,
templateUrl: "directive-iconer-iconer.html",
link: function (t, e, a) {
t.selectIcon = function () {
require(["fileUploader"], function (e) {
e.show(function (e) {
t.icon = {}, t.icon.name = e.name, t.icon.color = e.color, t.$apply("image"), t.$apply("icon")
}, {direct: !0, multiple: !1, type: "icon", otherVal: t.iconcolor})
})
}, t.removeIcon = function () {
t.image = "", t.icon = {}
}
}
}
}]), angular.module("we7app").directive("we7InitialSearchbar", function () {
return {
templateUrl: "directive-initialsearchbar-searchbar.html",
scope: {doSearch: "&we7SearchCallback"},
link: function (t, e, a) {
t.alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], t.searchResult = function (e) {
t.activeLetter = e, t.doSearch({letter: e})
}
}
}
}), angular.module("we7app").directive("we7Linker", ["$http", "$templateCache", function (n, e) {
var s = e.get("directive-linker-cms-header-inline.html"), l = e.get("directive-linker-cms-content-inline.html"),
c = e.get("directive-linker-cms-article-item-inline.html"),
u = e.get("directive-linker-cms-cate-item-inline.html"), a = e.get("directive-linker-news-content-inline.html"),
d = e.get("directive-linker-news-item-inline.html"), p = e.get("directive-linker-page-content-inline.html"),
m = e.get("directive-linker-page-item-inline.html"), o = e.get("directive-linker-map-content-inline.html"),
g = e.get("directive-linker-tel-content-inline.html");
return {
templateUrl: "directive-linker-linker.html",
scope: {url: "=we7MyUrl", title: "=we7MyTitle"},
link: function (r, t, e) {
t.find(".input-group-btn").mouseover(function (e) {
clearTimeout(r.timer), t.find(".dropdown-menu").show()
}).mouseout(function () {
r.timer = setTimeout(function () {
t.find(".dropdown-menu").hide()
}, 500)
}), t.find(".dropdown-menu").mouseover(function () {
clearTimeout(r.timer), t.find(".dropdown-menu").show()
}).mouseout(function () {
r.timer = setTimeout(function () {
t.find(".dropdown-menu").hide()
}, 500)
}), r.addLink = function (e, t) {
r.url = e, t && (r.title = t)
}, r.searchSystemLinker = function () {
r.modalobj = util.dialog("请选择链接", ["./index.php?c=utility&a=link&callback=selectLinkComplete"], "", {containerName: "link-search-system"}), r.modalobj.modal({keyboard: !1}), r.modalobj.find(".modal-body").css({
height: "680px",
"overflow-y": "auto"
}), r.modalobj.modal("show"), window.selectLinkComplete = function (e, t) {
r.addLink(e, t), r.$apply("url", "title"), r.modalobj.modal("hide")
}
}, r.searchCmsLinker = function (e) {
var o = {};
o.header = s, o.content = l, o.footer = "", o.articleitem = c, o.cateitem = u, $("#link-search-cms")[0] ? r.modalobj = $("#link-search-cms").data("modal") : (r.modalobj = util.dialog(o.header, o.content, o.footer, {containerName: "link-search-cms"}), r.modalobj.find(".modal-body").css({
height: "680px",
"overflow-y": "auto"
}), r.modalobj.modal("show"), r.modalobj.on("hidden.bs.modal", function () {
r.modalobj.remove()
}), $("#link-search-cms").data("modal", r.modalobj)), e = e || 1;
var t = $("#articlelist .article-list-input").val();
n.get("./index.php?c=utility&a=link&do=articlelist&page=" + e + "&keyword=" + t).success(function (e, t, a, n) {
var s = {items: []};
if (e.message = e.message.message, e.message.list) {
for (i in e.message.list) s.items.push({
title: e.message.list[i].title,
id: e.message.list[i].id,
uniacid: e.message.list[i].uniacid,
attachment: e.message.list[i].thumb_url,
createtime: e.message.list[i].createtime
});
r.modalobj.find("#articlelist tbody").html(_.template(o.articleitem)(s)), r.modalobj.find("#pager").html(e.message.pager), r.modalobj.find("#pager .pagination li[class!='active'] a").click(function () {
return r.searchCmsLinker($(this).attr("page")), !1
}), r.modalobj.find("#articlelist .input-group-btn").click(function () {
return r.searchCmsLinker(), !1
}), r.modalobj.find(".js-btn-select").click(function () {
r.addLink($(this).attr("js-url"), $(this).attr("js-title")), r.$apply("url", "title"), r.modalobj.modal("hide")
})
}
});
var a = $("#category .category-list-input").val();
n.get("./index.php?c=utility&a=link&do=catelist&page=" + e + "&keyword=" + a).success(function (e, t, a, n) {
var s = {items: []};
if (e.message = e.message.message, e.message) {
for (i in e.message) s.items.push({
id: e.message[i].id,
uniacid: e.message[i].uniacid,
name: e.message[i].name,
children: e.message[i].children
});
r.modalobj.find("#category tbody").html(_.template(o.cateitem)(s)), r.modalobj.find("#category .input-group-btn").click(function () {
return r.searchCmsLinker(), !1
}), r.modalobj.find(".js-btn-select").click(function () {
r.addLink($(this).attr("js-url"), $(this).attr("js-title")), r.$apply("url", "title"), r.modalobj.modal("hide")
})
}
})
}, r.searchNewsLinker = function (e) {
var o = {};
o.content = a, o.footer = "", o.newsitem = d, $("#link-search-news")[0] ? r.modalobj = $("#link-search-news").data("modal") : (r.modalobj = util.dialog(o.header, o.content, o.footer, {containerName: "link-search-news"}), r.modalobj.find(".modal-body").css({
height: "680px",
"overflow-y": "auto"
}), r.modalobj.modal("show"), r.modalobj.on("hidden.bs.modal", function () {
r.modalobj.remove()
}), $("#link-search-news").data("modal", r.modalobj)), e = e || 1;
var t = $("#newslist .news-list-input").val();
n.get("./index.php?c=utility&a=link&do=newslist&page=" + e + "&keyword=" + t).success(function (e, t, a, n) {
var s = {items: []};
if (e.message = e.message.message, e.message.list) {
for (i in e.message.list) s.items.push({
title: e.message.list[i].title,
id: e.message.list[i].id,
uniacid: window.sysinfo.uniacid,
attachment: e.message.list[i].thumb_url,
createtime: e.message.list[i].createtime,
url: e.message.list[i].url
});
r.modalobj.find("#newslist tbody").html(_.template(o.newsitem)(s)), r.modalobj.find("#pager").html(e.message.pager), r.modalobj.find("#pager .pagination li[class!='active'] a").click(function () {
return r.searchNewsLinker($(this).attr("page")), !1
}), r.modalobj.find("#newslist .input-group-btn").click(function () {
return r.searchNewsLinker(), !1
}), r.modalobj.find(".js-btn-select").click(function () {
r.addLink($(this).attr("js-url"), $(this).attr("js-title")), r.$apply("url", "title"), r.modalobj.modal("hide")
})
}
})
}, r.searchPageLinker = function (e) {
var o = {};
o.content = p, o.footer = "", o.pageItem = m, $("#link-search-page")[0] ? r.modalobj = $("#link-search-page").data("modal") : (r.modalobj = util.dialog(o.header, o.content, o.footer, {containerName: "link-search-page"}), r.modalobj.find(".modal-body").css({
height: "680px",
"overflow-y": "auto"
}), r.modalobj.modal("show"), r.modalobj.on("hidden.bs.modal", function () {
r.modalobj.remove()
}), $("#link-search-page").data("modal", r.modalobj)), e = e || 1;
var t = $("#pageList .page-list-input").val();
n.get("./index.php?c=utility&a=link&do=pagelist&&page=" + e + "&keyword=" + t).success(function (e, t, a, n) {
var s = {items: []};
if (e.message = e.message.message, e.message.list) {
for (i in e.message.list) s.items.push({
title: e.message.list[i].title,
id: e.message.list[i].id,
uniacid: window.sysinfo.uniacid,
createtime: e.message.list[i].createtime
});
r.modalobj.find("#pageList tbody").html(_.template(o.pageItem)(s)), r.modalobj.find("#pager").html(e.message.pager), r.modalobj.find("#pager .pagination li[class!='active'] a").click(function () {
return r.searchPageLinker($(this).attr("page")), !1
}), r.modalobj.find("#pageList .input-group-btn").click(function () {
return r.searchPageLinker(), !1
}), r.modalobj.find(".js-btn-select").click(function () {
r.addLink($(this).attr("js-url"), $(this).attr("js-title")), r.$apply("url", "title"), r.modalobj.modal("hide")
})
}
})
}, r.searchMapPosLinker = function () {
var e = {};
e.content = o, r.modalobj = util.dialog(e.content), r.modalobj.modal("show"), r.modalobj.find("#getnav").click(function () {
r.addLink("https://api.map.baidu.com/marker?location=" + $("#navlat").val() + "," + $("#navlng").val() + "&title=" + $("#navtitle").val() + "&name=" + $("#navtitle").val() + "&output=html&src=we7", $("#navtitle").val()), r.$apply("url", "title"), r.modalobj.modal("hide")
})
}, r.addTelLinker = function () {
var e = {};
e.content = g, r.modalobj = util.dialog("一键拨号", e.content), r.modalobj.modal("show"), r.modalobj.find(".btn-primary").click(function () {
r.addLink("tel:" + r.modalobj.find("#telphone").val(), ""), r.$apply("url", "title"), r.modalobj.modal("hide")
})
}
}
}
}]), angular.module("we7app").directive("we7ModalAccount", ["we7TypeDefault", function (n) {
return {
restrict: "AE",
templateUrl: "directive-modal_account-modal_account.html",
scope: {account: "=account", multiple: "=multiple", title: "=title", confirm: "&onConfirm", type: "=type"},
transclude: !0,
link: function (o, t, e, a) {
o.type = o.type || 1, o.showType = 3 != o.type ? "account" : "number", o.we7TypeDefault = n, o.module_keyword = "", o.time = (new Date).getTime(), o.checkAllStatus = !1, o.changePage = function (e, t) {
var a = -1, n = (e - 1) * t;
for (index in o.groups = [], o.checkAllStatus = !0, o.activeList) if (!(++a < n)) {
if (n + t <= a) break;
o.activeList[a].checked || (o.checkAllStatus = !1), o.groups.push(o.activeList[index])
}
}, o.loadMore = function (e) {
o.pageindex = e;
for (var t in o.activeList = [], o.accountList) {
var a = o.accountList[t];
a.checked = a.checked || 0, a.group_name = a.group_name || "", o.module_keyword && -1 === a.group_name.indexOf(o.module_keyword) || o.activeList.push(a)
}
if (totalPage = Math.ceil(o.activeList.length / 3), o.totalPage = totalPage, o.changePage(e, 3), totalPage < e) return !1;
if (totalPage < 2) return !(o.pageList = []);
e *= 1;
var n = Math.max(1, e - 4), i = Math.min(totalPage, e + 4);
i - n < 9 && (i = Math.min(totalPage, n + 8), n = Math.max(1, i - 8)), o.pageList = [];
for (var s = n; s <= i; s++) o.pageList.push(s)
}, o.checkAll = function () {
for (var e in console.log(o.checkAllStatus), o.groups) o.groups[e].checked = o.checkAllStatus ? 1 : 0, console.log(o.groups[e])
}, o.tabChange = function (e) {
o.showType = e
}, o.ngConfirm = function () {
3 != o.type && (o.account.create_groups = JSON.parse(JSON.stringify(o.accountList))), 2 != o.type && (o.account.create_numbers = JSON.parse(JSON.stringify(o.numberList))), setTimeout(function () {
o.confirm && "function" == typeof o.confirm && o.confirm()
}, 0), t.find(".modal").modal("hide")
}, o.check = function (e) {
for (var t in e.checked = e.checked ? 0 : 1, o.multiple || o.ngConfirm(), o.checkAllStatus = !0, o.groups) o.groups[t].checked || (o.checkAllStatus = !1)
}, t.on("click", "ng-transclude", function (e) {
o.type = o.type || 1, o.accountList = 3 != o.type ? JSON.parse(JSON.stringify(o.account.create_groups)) : [], o.numberList = 2 != o.type ? JSON.parse(JSON.stringify(o.account.create_numbers)) : {}, 3 != o.type && o.loadMore(o.pageindex), o.$apply(), t.find(".modal").modal("show")
})
},
controller: ["$scope", function (e) {
this.$onInit = function () {
}
}]
}
}]), angular.module("we7app").directive("we7ModalAccountList", ["we7TypeDefault", function (n) {
return {
restrict: "AE",
templateUrl: "directive-modal_account_list-modal_account_list.html",
scope: {accountList: "=accountList", multiple: "=multiple", title: "=title", confirm: "&onConfirm"},
transclude: !0,
link: function (i, t, e, a) {
i.typeList = n, i.modules = [], i.activeList = [], i.appList = [], i.checkAllStatus = !1, i.pageindex = 1, i.changePage = function (e, t) {
var a = -1, n = (e - 1) * t;
for (index in i.modules = [], i.checkAllStatus = !0, i.accountModalList) if (!(++a < n)) {
if (n + t <= a) break;
i.accountModalList[a].checked || (i.checkAllStatus = !1), i.modules.push(i.accountModalList[index])
}
}, i.loadMore = function (e) {
i.pageindex = e;
if (totalPage = Math.ceil(i.accountModalList.length / 21), i.totalPage = totalPage, i.changePage(e, 21), totalPage < e) return !1;
if (totalPage < 2) return !(i.pageList = []);
e *= 1;
var t = Math.max(1, e - 4), a = Math.min(totalPage, e + 4);
a - t < 9 && (a = Math.min(totalPage, t + 8), t = Math.max(1, a - 8));
i.pageList = [];
for (var n = t; n <= a; n++) i.pageList.push(n)
}, i.itemCheck = function (e) {
for (var t in e.checked = e.checked ? 0 : 1, i.checkAllStatus = !0, i.modules) i.modules[t].checked || (i.checkAllStatus = !1);
i.multiple || i.ngConfirm()
}, i.ngConfirm = function () {
i.accountList = i.accountModalList, setTimeout(function () {
i.confirm && "function" == typeof i.confirm && (console.log(i.accountList), i.confirm())
}, 0), t.find(".modal").modal("hide")
}, i.checkAll = function () {
for (var e in i.modules) i.modules[e].checked = i.checkAllStatus ? 1 : 0
}, t.on("click", "ng-transclude", function (e) {
i.accountModalList = i.accountList, i.loadMore(i.pageindex), i.$apply(), t.find(".modal").modal("show")
})
},
controller: ["$scope", function (e) {
this.$onInit = function () {
}
}]
}
}]), angular.module("we7app").directive("we7ModalApp", ["we7TypeDefault", function (n) {
return {
restrict: "AE",
templateUrl: "directive-modal_app-modal_app.html",
scope: {moduleList: "=moduleList", multiple: "=multiple", title: "=title", confirm: "&onConfirm"},
transclude: !0,
link: function (s, t, e, a) {
s.showType = "app", s.typeList = n, s.modules = [], s.activeList = [], s.appList = [], s.checkAllStatus = {checkAllStatus: !0}, s.time = (new Date).getTime(), s.manage = function () {
if (s.modalType = 0, s.moduleList) {
var e = JSON.parse(JSON.stringify(s.moduleList));
(e.modules || e.templates) && (s.modalType = 1, s.appList = e.modules, s.templateList = e.templates), e.groups && (s.modalType = s.modalType ? 2 : 3, s.groupList = e.groups), 3 == s.modalType && (s.showType = "group")
}
}, s.copy = function (e) {
var t = [];
for (var a in s[e]) {
var n = s[e][a];
n.title = n.title || "", n.checked = n.checked || 0, s.module_keyword && -1 === n.title.indexOf(s.module_keyword) && -1 === n.name.indexOf(s.module_keyword) || "appList" == e && s.moduleType && n.support != s.moduleType || t.push(n)
}
return t
}, s.changePage = function (e, t) {
var a = -1, n = (e - 1) * t;
for (index in s.modules = [], s.checkAllStatus.checkAllStatus = !0, s.activeList) if (!(++a < n)) {
if (n + t <= a) break;
s.activeList[a].checked || (s.checkAllStatus.checkAllStatus = !1), s.modules.push(s.activeList[index])
}
}, s.loadMore = function (e) {
s.pageindex = e;
var t = 14;
if (s.showType = s.showType || "app", "app" == s.showType ? s.activeList = s.copy("appList") : "template" == s.showType ? (s.activeList = s.copy("templateList"), t = 6) : "group" == s.showType && (s.activeList = s.copy("groupList"), t = 3), totalPage = Math.ceil(s.activeList.length / t), s.totalPage = totalPage, s.changePage(e, t), totalPage < e) return !1;
if (totalPage < 2) return !(s.pageList = []);
e *= 1;
var a = Math.max(1, e - 4), n = Math.min(totalPage, e + 4);
n - a < 9 && (n = Math.min(totalPage, a + 8), a = Math.max(1, n - 8));
s.pageList = [];
for (var i = a; i <= n; i++) s.pageList.push(i)
}, s.tabChange = function (e) {
s.showType = e, s.loadMore(1), setTimeout(function () {
t.find("select").niceSelect && t.find("select").niceSelect()
})
}, s.itemCheck = function (e) {
for (var t in e.checked = e.checked ? 0 : 1, s.multiple || s.ngConfirm(), s.checkAllStatus.checkAllStatus = !0, s.modules) s.modules[t].checked || (s.checkAllStatus.checkAllStatus = !1)
}, s.ngConfirm = function () {
3 != s.modalType && (s.appList && (s.moduleList.modules = JSON.parse(JSON.stringify(s.appList))), s.templateList && (s.moduleList.templates = JSON.parse(JSON.stringify(s.templateList)))), 1 != s.modalType && s.groupList && (s.moduleList.groups = JSON.parse(JSON.stringify(s.groupList))), setTimeout(function () {
s.confirm && "function" == typeof s.confirm && s.confirm()
}, 0), t.find(".modal").modal("hide")
}, s.checkAll = function () {
for (var e in s.modules) s.modules[e].checked = s.checkAllStatus.checkAllStatus ? 1 : 0
}, s.manage(), s.loadMore(1), t.on("click", "ng-transclude", function (e) {
s.manage(), s.tabChange(s.showType), s.$apply(), t.find(".modal").modal("show")
})
},
controller: ["$scope", function (e) {
this.$onInit = function () {
}
}]
}
}]), angular.module("we7app").directive("we7ModalForm", function () {
return {
restrict: "AE",
templateUrl: "directive-modal_form-modal_form.html",
scope: {
type: "=type",
rows: "@rows",
label: "=label",
name: "=name",
options: "=options",
key: "=key",
value: "=value",
help: "=help",
confirm: "&onConfirm",
cancel: "&onCancel",
text: "=text"
},
transclude: !1,
link: function (t, a, e) {
if (t.formRows = t.rows || 3, t.formValue = t.value || "", t.value && t.key) for (var n in t.options) t.options[n][t.key] == t.value[t.key] && (t.formValue = t.options[n]);
t.showModal = function () {
a.find(".modal").modal("show"), a.find("select").niceSelect && a.find("select").niceSelect()
}, t.ngConfirm = function () {
a.find(".modal").modal("hide");
var e = {value: JSON.parse(JSON.stringify(t.formValue))};
e.value && e.value.$$hashKey && delete e.value.$$hashKey, t.confirm && "function" == typeof t.confirm && t.confirm({formValue: e})
}
},
controller: ["$scope", function (e) {
this.$onInit = function () {
e.formValue = e.value || ""
}
}]
}
}), angular.module("we7app").directive("we7ModalTip", function () {
return {
restrict: "AE",
template: '<ng-transclude ></ng-transclude><div class="modal fade modal-tip" tabindex="-1" role="dialog" >\t<div class="modal-dialog" role="document">\t\t<div class="modal-content">\t\t\t<div class="modal-header clearfix">\t\t\t\t<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>\t\t\t</div>\t\t\t<div class="modal-body"> \t\t\t\t<i class="wi wi-info"></i> \t<p class="title">{{titile || "系统提示"}}</p> \t\t\t\t<p class="content">{{content}}</p>\t\t\t</div>\t\t\t<div class="modal-footer">\t\t\t\t<button type="button" class="btn btn-primary" ng-click="ngConfirm()">确定</button>\t\t\t\t<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>\t\t\t</div>\t\t</div>\t</div></div>',
scope: {title: "=title", type: "=type", content: "=content", confirm: "&onConfirm", cancel: "&onCancel"},
transclude: !0,
link: function (e, t, a) {
t.on("click", "ng-transclude", function (e) {
t.find(".modal").modal("show")
}), e.ngConfirm = function () {
t.find(".modal").modal("hide"), e.confirm && "function" == typeof e.confirm && e.confirm()
}
},
controller: ["$scope", function (e) {
this.$onInit = function () {
}
}]
}
}), angular.module("we7app").directive("we7ModalType", function () {
return {
restrict: "AE",
templateUrl: "directive-modal_type-modal_type.html",
scope: {typeList: "=typeList", multiple: "=multiple", title: "=title", confirm: "&onConfirm"},
transclude: !0,
link: function (a, n, e, t) {
a.typeText = {
wxapp_support: "小程序",
account_support: "公众号",
welcome_support: "系统首页",
webapp_support: "PC",
phoneapp_support: "APP",
xzapp_support: "熊掌号",
aliapp_support: "支付宝小程序"
}, a.typeDefault = ["wxapp_support", "account_support", "welcome_support", "webapp_support", "phoneapp_support", "xzapp_support", "aliapp_support"], a.list = a.typeList || a.typeDefault, n.on("click", "ng-transclude", function (e) {
a.list = a.typeList || a.typeDefault, a.$apply("list"), n.find(".modal").modal("show")
}), a.checkArray = {}, a.check = function (e) {
a.checkArray[e] = !a.checkArray[e], a.multiple || a.ngConfirm()
}, a.ngConfirm = function () {
var e = [];
for (var t in a.checkArray) a.checkArray[t] && e.push(t);
a.checkArray = {}, n.find(".modal").modal("hide"), setTimeout(function () {
a.confirm({type: e})
}, 100)
}
},
controller: ["$scope", function (e) {
this.$onInit = function () {
}
}]
}
}), angular.module("we7app").directive("img", ["$timeout", function (e) {
return {
restrict: "E", priority: -1, link: function (e, t, a) {
t.bind("error", function () {
e.setSrc(t, a)
}), e.setSrc = function (e, t) {
var a = "resource/images/nopic-107.png";
$(e).width() == $(e).height() ? a = "resource/images/nopic-107.png" : $(e).width() < $(e).height() && (a = "resource/images/nopic-203.png"), $(e).hasClass("user-avatar") && (a = "resource/images/nopic-user.png"), $(e).hasClass("module-img") && (a = "resource/images/nopic-module.png"), $(e).hasClass("template-img") && (a = "resource/images/nopic-template.png"), $(e).hasClass("account-img") && (a = "resource/images/nopic-account.png"), t.$set("src", a)
}, setTimeout(function () {
a.src || a.ngSrc || e.setSrc(t, a)
}, 10)
}
}
}]), angular.module("we7app").directive("ngModel", ["$timeout", function (n) {
return {
restrict: "A", priority: -1, link: function (e, a, t) {
e.$watch(t.ngModel, function (e, t) {
e && n(function () {
if ("createEvent" in document) {
var e = document.createEvent("HTMLEvents");
e.initEvent("change", !1, !0), a[0].dispatchEvent(e)
} else a[0].fireEvent("onchange")
}, 0, !1)
})
}
}
}]), angular.module("we7app").directive("we7ResourcePicker", function () {
return {
scope: {
type: "@type",
isWechat: "@isWechat",
multiple: "@mutiple",
showType: "@showType",
needType: "@needType",
global: "@global",
dest_dir: "@dest_dir",
onSelect: "&onSelect"
}, link: function (a, e, t) {
$(e).unbind("click").on("click", function () {
a.show()
}), $(window).unbind("resource_selected").on("resource_selected", function (e, t) {
a.finish(t.type, t.items)
})
}, controller: function (n) {
n.show = function () {
var e = {
type: n.type,
isWechat: "true" === n.isWechat,
multiple: "true" === n.multiple,
needType: n.needType <= 3 ? n.needType : 3,
global: "true" === n.global,
dest_dir: n.dest_dir
};
$("#material-Modal").remove();
var t = function (e) {
return "<div " + ("we7-resource-" + e + "-dialog") + ' class="uploader-modal modal fade ' + e + '" id="material-Modal" role="dialog" aria-labelledby="myModalLabel2"></div>'
}(n.type);
$(document.body).prepend(t);
var a = $("#material-Modal");
a.modal("show"), angular.module("we7resource").value("config", e), angular.bootstrap(a, ["we7resource"])
}, n.finish = function (e, t) {
n.onSelect({type: e, items: t}), $("#material-Modal").modal("hide")
}
}
}
}), angular.module("we7app").directive("we7Page", [function () {
return {
restrict: "EA",
template: '<div class="page-list page-list--flex" ng-show="conf.totalItems > conf.itemsPerPage"><ul class="pagination pagination-centered" ng-show="conf.totalItems > 1"><li ng-class="{disabled: conf.currentPage == 1}"><a href="javascript:;" ng-click="prevPage()"><span>&laquo;</span></a></li><li ng-repeat="item in pageList track by $index" ng-class="{active: item == conf.currentPage, separate: item == \'...\'}" ng-click="changeCurrentPage(item)"><a href="javascript:;"><span>{{ item }}</span></a></li><li ng-class="{disabled: conf.currentPage == conf.numberOfPages}" ng-click="nextPage()"><a href="javascript:;"><span>&raquo;</span></a></li></ul><div class="search-page we7-form" ng-show="conf.totalItems > conf.itemsPerPage" ng-if="conf.showGo"><input type="number" min="1" max="{{conf.numberOfPages}}" ng-model="goPage" class="form-control"><a href="javascript:;" ng-click="changeCurrentPage(goPage)">跳转</a></div></div>',
replace: !0,
scope: {conf: "="},
link: function (i, e, t) {
i.goPage = "", i.changeCurrentPage = function (e) {
"..." != e && (i.conf.currentPage = e, i.conf.onChange && i.conf.onChange())
}, i.conf.pagesLength = parseInt(i.conf.pagesLength) ? parseInt(i.conf.pagesLength) : 9, i.conf.pagesLength % 2 == 0 && (i.conf.pagesLength = i.conf.pagesLength - 1), i.conf.perPageOptions || (i.conf.perPageOptions = [10, 15, 20, 30, 50]), i.prevPage = function () {
1 < i.conf.currentPage && (i.conf.currentPage -= 1, i.conf.onChange && i.conf.onChange())
}, i.nextPage = function () {
i.conf.currentPage < i.conf.numberOfPages && (i.conf.currentPage += 1, i.conf.onChange && i.conf.onChange())
}, i.jumpToPage = function () {
i.jumpPageNum = i.jumpPageNum.replace(/[^0-9]/g, ""), "" !== i.jumpPageNum && (i.conf.currentPage = i.jumpPageNum, i.conf.onChange && i.conf.onChange())
}, i.changeItemsPerPage = function () {
i.conf.rememberPerPage && localStorage.removeItem(i.conf.rememberPerPage)
}, i.$watch("conf", function (e, t) {
t.currentPage == e.currentPage && t.totalItems == e.totalItems && t.itemsPerPage == e.itemsPerPage || function () {
i.conf.currentPage = parseInt(i.conf.currentPage) ? parseInt(i.conf.currentPage) : 1, i.conf.totalItems = parseInt(i.conf.totalItems), i.conf.rememberPerPage ? (parseInt(localStorage[i.conf.rememberPerPage]) || (localStorage[i.conf.rememberPerPage] = parseInt(i.conf.itemsPerPage) ? parseInt(i.conf.itemsPerPage) : 15), i.conf.itemsPerPage = parseInt(localStorage[i.conf.rememberPerPage])) : i.conf.itemsPerPage = parseInt(i.conf.itemsPerPage) ? parseInt(i.conf.itemsPerPage) : 15, i.conf.numberOfPages = Math.ceil(i.conf.totalItems / i.conf.itemsPerPage), i.conf.currentPage < 1 && (i.conf.currentPage = 1), i.conf.currentPage > i.conf.numberOfPages && 0 < i.conf.numberOfPages && (i.conf.currentPage = i.conf.numberOfPages), i.jumpPageNum = i.conf.currentPage;
for (var e, t = i.conf.perPageOptions.length, a = 0; a < t; a++) i.conf.perPageOptions[a] == i.conf.itemsPerPage && (e = !0);
if (e || i.conf.perPageOptions.push(i.conf.itemsPerPage), i.conf.perPageOptions.sort(function (e, t) {
return e - t
}), i.pageList = [], i.conf.numberOfPages <= i.conf.pagesLength) for (a = 1; a <= i.conf.numberOfPages; a++) i.pageList.push(a); else {
var n = (i.conf.pagesLength - 1) / 2;
if (i.conf.currentPage <= n) {
for (a = 1; a <= 1 + n; a++) i.pageList.push(a);
i.pageList.push("..."), i.pageList.push(i.conf.numberOfPages)
} else if (i.conf.currentPage > i.conf.numberOfPages - n) {
for (i.pageList.push(1), i.pageList.push("..."), a = 1 + n; 1 <= a; a--) i.pageList.push(i.conf.numberOfPages - a);
i.pageList.push(i.conf.numberOfPages)
} else {
for (i.pageList.push(1), i.pageList.push("..."), a = Math.ceil(n / 2); 1 <= a; a--) i.pageList.push(i.conf.currentPage - a);
for (i.pageList.push(i.conf.currentPage), a = 1; a <= n / 2; a++) i.pageList.push(i.conf.currentPage + a);
i.pageList.push("..."), i.pageList.push(i.conf.numberOfPages)
}
}
i.$parent.conf = i.conf
}()
}, !0)
}
}
}]), angular.module("we7app").filter("we7IsEmpty", function () {
return function (e) {
for (var t in e) if (e[t]) return !1;
return !0
}
}).filter("mobile", function () {
return function (e) {
return e ? e.substr(0, 3) + "****" + e.substr(7, 11) : "还未绑定手机号"
}
}), angular.module("we7app").constant("we7TypeDefault", {
account: {name: "公众号", icon: "wi wi-account"},
wxapp: {name: "小程序", icon: "wi wi-wxapp"},
welcome: {name: "系统首页", icon: "wi wi-system-welcome"},
webapp: {name: "PC", icon: "wi wi-pc"},
phoneapp: {name: "APP", icon: "wi wi-app"},
aliapp: {name: "支付宝小程序", icon: "wi wi-aliapp"},
toutiaoapp: {name: "字节跳动小程序", icon: "wi wi-toutiaoapp"},
baiduapp: {name: "百度小程序", icon: "wi wi-baiduapp"}
}),angular.module("we7app").filter("moduleInfo", ["we7TypeDefault", function (s) {
return function (e, t) {
var a = s;
if (!e) return !1;
if ("string" == typeof e) return -1 !== e.indexOf("_support") && (e = e.replace("_support", "")), a[e][t];
if ("object" == typeof e && !e.length) {
var n = [];
for (var i in e) 2 == e[i] && (-1 !== i.indexOf("_support") && (i = i.replace("_support", "")), t ? n.push(a[i][t]) : n.push(a[i]));
return n
}
}
}]),angular.module("we7app").run(["$templateCache", function (e) {
"use strict";
e.put("directive-colorpicker-colorpicker.html", '<div class="input-group"><input type="text" name="{{colorFormName}}" value="" ng-model="colorValue" class="form-control"> <span class="input-group-addon" style="width:35px; border-left:none" ng-style="{\'background-color\' : colorValue}"></span> <span class="input-group-btn"><button class="btn btn-default colorpicker" type="button">选择颜色 <i class="fa fa-caret-down"></i></button> <button class="btn btn-default colorclean" type="button"><span><i class="fa fa-remove"></i></span></button></span></div>'), e.put("directive-iconer-iconer.html", '<div class="nav-img-box" style="background-color: #2B2D30"><div class="btns"><a style="height:19px" ng-click="removeIcon()" href="javascript:;"><i class="fa fa-times"></i></a></div><div class="nav-img" ng-style="{\'background-image\': image ? \'url(\'+image+\')\' : \'\'}"><i ng-hide="menu.image" class="fa" ng-style="{\'color\' : icon.color}" ng-class="icon.name"></i></div><a href="javascript:;" ng-click="selectIcon()"><span ng-transclude></span></a></div>'), e.put("directive-iconer-nav-pills-inline.html", '<li id="li_icon" role="presentation"><a href="#icon" aria-controls="icon" role="tab" data-toggle="tab">图标</a></li>'), e.put("directive-iconer-tab-content-inline.html", '<div id="icon" class="tab-pane icon form-horizontal" role="tabpanel"><div class="form-group" style="border-bottom:1px solid #e5e5e5; padding:0 0 15px 0; margin:10px 0 0 0"><label class="col-xs-3 control-label">图标颜色</label><div class="col-xs-9"><input type="color" value="" class="form-control" id="iconcolor" onchange="$(this).parents(\'#icon\').attr(\'color\', this.value);$(this).parents(\'#icon\').find(\'i\').css(\'color\', this.value)"></div></div></div>'), e.put("directive-initialsearchbar-searchbar.html", '<ul class="letters-list cut-wechat-letters"><li ng-click="searchResult(\'\')"><a href="javascript:;">不限</a></li><li ng-repeat="letter in alphabet" ng-style="{\'background-color\': letter == activeLetter ? \'#ddd\' : \'none\'}" ng-class="{\'active\': letter == activeLetter}" ng-click="searchResult(letter)"><a href="javascript:;" ng-bind="letter"></a></li></ul>'), e.put("directive-linker-cms-article-item-inline.html", '<%_.each(items, function(item) {%><tr><td><a href="#" data-cover-attachment-url="<%=item.attachment%>" title="<%=item.title%>"><%=item.title%></a></td><td><%=item.createtime%></td><td class="text-right"><button class="btn btn-default js-btn-select" js-url="./index.php?c=site&a=site&do=detail&id=<%=item.id%>&i=<%=item.uniacid%>" js-title="<%=item.title%>">选取</button></td></tr><%});%>'), e.put("directive-linker-cms-cate-item-inline.html", '<%_.each(items, function(item) {%><tr><td colspan="2"><a href="#"><%=item.name%></a></td><td class="text-right"><a class="btn btn-default js-btn-select" js-url="./index.php?c=site&a=site&cid=<%=item.id%>&i=<%=item.uniacid%>" js-title="<%=item.name%>">选取</a></td></tr><%_.each(item.children, function(child) {%><tr><td colspan="2" style="padding-left:50px;height:30px;line-height:30px;background-image:url(\\\'./resource/images/bg_repno.gif\\\'); background-repeat:no-repeat; background-position: -245px -540px"><a href="#"><%=child.name%></a></td><td class="text-right"><a class="btn btn-default js-btn-select" js-url="./index.php?c=site&a=site&cid=<%=child.id%>&i=<%=child.uniacid%>" js-title="<%=child.name%>">选取</a></td></tr><%});%><%});%>'), e.put("directive-linker-cms-content-inline.html", '<div class="tab-content"><div id="articlelist" class="tab-pane active" role="tabpanel"><table class="table table-hover"><thead class="navbar-inner"><tr><th style="width:40%">标题</th><th style="width:30%">创建时间</th><th style="width:30%; text-align:right"><div class="input-group input-group-sm"><input type="text" class="form-control article-list-input"> <span class="input-group-btn"><button class="btn btn-default" type="button"><i class="fa fa-search"></i></button></span></div></th></tr></thead><tbody></tbody></table><div id="pager" style="text-align:center"></div></div><div id="category" class="tab-pane" role="tabpanel"><table class="table table-hover"><thead class="navbar-inner"><tr><th style="width:40%">标题</th><th style="width:30%">创建时间</th><th style="width:30%; text-align:right"><div class="input-group input-group-sm"><input type="text" class="form-control category-list-input"> <span class="input-group-btn"><button class="btn btn-default" type="button"><i class="fa fa-search"></i></button></span></div></th></tr></thead><tbody></tbody></table><div id="pager" style="text-align:center"></div></div></div>'), e.put("directive-linker-cms-header-inline.html", '<ul role="tablist" class="nav nav-pills" style="font-size:14px; margin-top:-20px"><li role="presentation" class="active" id="li_goodslist"><a data-toggle="tab" role="tab" aria-controls="articlelist" href="#articlelist">文章</a></li><li role="presentation" class="" id="li_category"><a data-toggle="tab" role="tab" aria-controls="category" href="#category">分类</a></li></ul>'), e.put("directive-linker-linker.html", '<div class="dropdown link"><div class="input-group"><input type="text" value="" placeholder="链接地址:http://example.com" ng-model="url" class="form-control"> <span class="input-group-btn"><button class="btn btn-default" type="button" onclick="">选择链接 <i class="fa fa-caret-down"></i></button></span></div><ul class="dropdown-menu" role="menu" style="left: 0; right:0"><li><a href="javascript:;" ng-click="searchSystemLinker()">系统菜单</a></li><li><a href="javascript:;" ng-click="searchPageLinker()">微页面</a></li><li><a href="javascript:;" ng-click="searchCmsLinker()">文章及分类</a></li><li><a href="javascript:;" ng-click="searchNewsLinker()">图文回复</a></li><li><a href="javascript:;" ng-click="searchMapPosLinker()">一键导航</a></li><li><a href="javascript:;" ng-click="addTelLinker()">一键拨号</a></li></ul></div>'), e.put("directive-linker-map-content-inline.html", '<div class="model-dialog"><div class="model-content"><div class="modal-header"><h4 class="modal-title" id="myModalLabel">一键导航</h4></div><div class="modal-body"><form action="" class="form-horizontal" role="form" enctype="multipart/form-data"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label"><span style="font-size:16px">标题</span></label><div class="col-sm-9 col-xs-12"><input type="text" id="navtitle" class="form-control" name="navtitle" value=""></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 col-lg-2 control-label"><span style="font-size:16px">地理位置</span></label><div class="col-sm-9 col-xs-12"><div class="row row-fix"><div class="col-xs-4 col-sm-4"><input type="text" name="navtitle[lng]" id="navlng" value="" placeholder="地理经度" class="form-control"></div><div class="col-xs-4 col-sm-4"><input type="text" name="navtitle[lat]" id="navlat" value="" placeholder="地理纬度" class="form-control"></div><div class="col-xs-4 col-sm-4"><button onclick="showCoordinate(this)" class="btn btn-default" type="button">选择坐标</button></div></div><script type="text/javascript">function showCoordinate(elm) {\r\n\t\t\t\t\tvar val = {};\r\n\t\t\t\t\tval.lng = parseFloat($(elm).parent().prev().prev().find(":text").val());\r\n\t\t\t\t\tval.lat = parseFloat($(elm).parent().prev().find(":text").val());\r\n\t\t\t\t\tutil.qqmap(val, function(r){\r\n\t\t\t\t\t\t$(elm).parent().prev().prev().find(":text").val(r.lng);\r\n\t\t\t\t\t\t$(elm).parent().prev().find(":text").val(r.lat);\r\n\t\t\t\t\t});\r\n\t\t\t\t};<\/script></div></div></form></div></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal" id="getnav">确定</button></div></div>'), e.put("directive-linker-news-content-inline.html", '<div id="newslist" class="tab-pane active" role="tabpanel"><table class="table table-hover"><thead class="navbar-inner"><tr><th style="width:40%">标题</th><th style="width:30%">创建时间</th><th style="width:30%; text-align:right"><div class="input-group input-group-sm"><input type="text" class="form-control news-list-input"> <span class="input-group-btn"><button class="btn btn-default" type="button"><i class="fa fa-search"></i></button></span></div></th></tr></thead><tbody></tbody></table><div id="pager" style="text-align:center"></div></div>'), e.put("directive-linker-news-item-inline.html", '<%_.each(items, function(item) {%><tr><td><a href="#" data-cover-attachment-url="<%=item.attachment%>" title="<%=item.title%>"><%=item.title%></a></td><td><%=item.createtime%></td><td class="text-right"><button class="btn btn-default js-btn-select" js-url="<%=item.url%>" js-title="<%=item.title%>">选取</button></td></tr><%});%>'), e.put("directive-linker-page-content-inline.html", '<div id="pageList" class="tab-pane active" role="tabpanel"><table class="table table-hover"><thead class="navbar-inner"><tr><th style="width:40%">名称</th><th style="width:30%">创建间</th><th style="width:30%; text-align:right"><div class="input-group input-group-sm"><input type="text" class="form-control page-list-input"> <span class="input-group-btn"><button class="btn btn-default" type="button"><i class="fa fa-search"></i></button></span></div></th></tr></thead><tbody></tbody></table><div id="pager" style="text-align:center"></div></div>'), e.put("directive-linker-page-item-inline.html", '<%_.each(items, function(item) {%><tr><td><a href="#" title="<%=item.title%>"><%=item.title%></a></td><td><%=item.createtime%></td><td class="text-right"><button class="btn btn-default js-btn-select" js-url="./index.php?i=<%=item.uniacid%>&c=home&a=page&id=<%=item.id%>" js-title="<%=item.title%>">选取</button></td></tr><%});%>'), e.put("directive-linker-tel-content-inline.html", '<div class="" id="telphone-modal"><div class="form-group list-group-item clearfix"><label style="margin-top:5px" class="col-xs-12 col-sm-2 col-md-2 control-label">号码</label><div class="col-sm-6"><input type="text" value="" id="telphone" name="telphone" class="form-control"></div><div class="col-sm-4"><a class="btn btn-primary" href="javascript:;">确定</a></div></div></div>'), e.put("directive-modal_account-modal_account.html", '<ng-transclude></ng-transclude><div class="modal fade modal-account" tabindex="-1" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header clearfix"><h4 class="text-over">{{title || \'系统提示\'}}</h4><div class="type"><a href="javascript:;" ng-click="tabChange(\'account\')" ng-if="type != 3" ng-class="{\'active\': showType == \'account\'}">账号权限组</a> <a href="javascript:;" ng-click="tabChange(\'number\')" ng-if="type != 2" ng-class="{\'active\': showType == \'number\'}">附加账号</a></div><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body"><div class="" ng-if="showType == \'account\'"><div class="search-box"><div class="search-form"><div class="input-group"><input class="form-control" name="keyword" type="text" ng-model="$parent.module_keyword" autocomplete="false"> <span class="input-group-btn" ng-click="loadMore(1)"><button class="btn btn-default"><i class="fa fa-search"></i></button></span></div></div></div><div class="account-list"><div class="item" ng-repeat="group in groups" ng-class="{active: group.checked == 1}" ng-click="check(group)"><div class="title">{{group.group_name}}</div><div class="type-list"><div class="type-item" ng-repeat="(key, type) in we7TypeDefault" ng-if="group.hasOwnProperty(\'max\' + key)"><div ng-show="group[\'max\' + key] > 0"><i class="{{type.icon}}"></i> {{group[\'max\' + key]}}</div></div></div><div class="mark"><i class="wi wi-right"></i></div></div></div><div class="js-pager"><div class="checkAll pull-left we7-form" ng-if="multiple"><input type="checkbox" id="{{\'select-group-all\' + time}}" ng-model="$parent.$parent.checkAllStatus" ng-change="checkAll()"><label for="{{\'select-group-all\' + time}}">全选</label></div><ul ng-if="totalPage > 1" class="pagination"><li ng-if="pageindex != 1"><a href="javascript:;" page="1" ng-click="loadMore(1)">首页</a></li><li ng-repeat="(i, page) in pageList" ng-class="{active: page == pageindex}"><a href="javascript:;" page="page" ng-click="loadMore(page)">{{page}}</a></li><li ng-if="pageindex != totalPage"><a href="javascript:;" page="totalPage" ng-click="loadMore(totalPage)">尾页</a></li></ul></div></div><div class="account-form we7-form" ng-if="showType == \'number\'"><div class="form-group"><label for="" class="control-label col-sm-2">创建账号个数</label><div class="form-controls col-sm-10"><div class="we7-account-num-box"><div class="item" ng-repeat="(key, type) in we7TypeDefault" ng-if="numberList.hasOwnProperty(\'max\' + key)" ng-if="key != \'welcome\'"><div class="name"><i ng-class="type.icon"></i>{{type.name}}</div><input type="text" ng-model="numberList[\'max\' + key]" required class="form-control"></div></div><span class="help-block">限制各平台账号的创建数量,为0则不允许添加。</span></div></div></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="ngConfirm()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div></div>'), e.put("directive-modal_account_list-modal_account_list.html", '<ng-transclude></ng-transclude><div class="modal fade modal-app" tabindex="-1" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header clearfix"><h4 class="text-over">{{title || \'系统提示\'}}</h4><div class="type"></div><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body"><div class="search-box"><div class="input-group search-form"><input class="form-control" name="keyword" type="text" ng-model="module_keyword" autocomplete="false"> <span class="input-group-btn" ng-click="loadMore(1)"><button class="btn btn-default"><i class="fa fa-search"></i></button></span></div></div><div class="modal-app-list"><div class="modal-item" ng-repeat="item in modules" ng-class="{\'active\': item.checked == 1}" ng-click="itemCheck(item)"><div class="logo"><img ng-src="{{item.logo}}" class="account-logo" alt=""><div class="mark"><i class="wi wi-right"></i></div></div><div class="name text-over"><i class="{{we7TypeDefault[item.type_sign][\'icon\']}}"></i>{{item.name}}</div></div></div><div class="js-pager"><div class="form-group pull-left"><input type="checkbox" id="select-app-all" ng-model="checkAllStatus" ng-change="checkAll()"><label for="select-app-all">全选</label></div><ul ng-if="totalPage > 1" class="pagination"><li ng-if="pageindex != 1"><a href="javascript:;" page="1" ng-click="loadMore(1)">首页</a></li><li ng-repeat="(i, page) in pageList" ng-class="{active: page == pageindex}"><a href="javascript:;" page="page" ng-click="loadMore(page)">{{page}}</a></li><li ng-if="pageindex != totalPage"><a href="javascript:;" page="totalPage" ng-click="loadMore(totalPage)">尾页</a></li></ul></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="ngConfirm()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div></div>'), e.put("directive-modal_app-modal_app.html", '<ng-transclude></ng-transclude><div class="modal fade modal-app" tabindex="-1" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header clearfix"><h3 class="modal-title text-over">{{title || \'系统提示\'}}</h3><div class="type"><a href="javascript:;" ng-click="tabChange(\'group\')" ng-if="modalType != 1" ng-class="{\'active\': showType == \'group\'}">应用组</a> <a href="javascript:;" ng-click="tabChange(\'app\')" ng-if="modalType != 3 && appList" ng-class="{\'active\': showType == \'app\'}">应用</a> <a href="javascript:;" ng-click="tabChange(\'template\')" ng-if="modalType != 3 && !(templateList | we7IsEmpty)" ng-class="{\'active\': showType == \'template\'}">模板</a></div><a class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></a></div><div class="modal-body"><div class="search-box"><select class="we7-margin-right" ng-model="$parent.moduleType" ng-change="loadMore(1)" ng-if="showType == \'app\'"><option value="">全部</option><option value="{{key + \'_support\'}}" ng-repeat="(key,value) in typeList">{{value.name}}</option></select><div class="search-form"><div class="input-group"><input class="form-control" name="keyword" type="text" ng-model="module_keyword" autocomplete="false"> <span class="input-group-btn" ng-click="loadMore(1)"><a class="btn btn-default"><i class="wi wi-search"></i></a></span></div></div></div><div class="modal-app-list" ng-if="showType == \'app\'"><div class="modal-item" title="{{item.title}}" ng-repeat="item in modules" ng-class="{\'active\': item.checked == 1}" ng-click="itemCheck(item)"><div class="logo"><img ng-src="{{item.logo}}" alt=""><div class="mark"><i class="wi wi-right"></i></div></div><div class="name text-over" title="{{item.title}}"><i class="{{item.support | moduleInfo:\'icon\'}}"></i>{{item.title}}</div></div></div><div class="modal-app-list template" ng-if="showType == \'template\'"><div class="modal-item" ng-repeat="item in modules" ng-class="{\'active\': item.checked == 1}" ng-click="itemCheck(item)"><div class="logo"><img src="{{item.logo || \'\'}}" alt=""><div class="mark"><i class="wi wi-right"></i></div></div><div class="name text-over">{{item.title}}</div></div></div><div class="modal-app-list groups" ng-if="showType == \'group\'"><div class="modal-group-item" ng-repeat="item in modules" ng-class="{\'active\': item.checked == 1}" ng-click="itemCheck(item)"><div class="group-header">{{item.name}}</div><div class="group-modules"><div class="module" ng-repeat="module in item.modules_all"><div class="logo"><img ng-src="{{module.logo || \'\'}}" class="module-img" alt=""></div><div class="info"><div class="name text-over">{{module.title}}</div><div class="support"><i ng-repeat="icon in module.group_support | moduleInfo:\'icon\'" class="{{icon}}"></i></div></div></div><div class="module" ng-repeat="module in item.templates"><div class="logo"><img ng-src="{{module.logo || \'\'}}" class="template-img" alt=""></div><div class="info"><div class="name text-over">{{module.title}}</div><div class="support"><i class="wi wi-template"></i></div></div></div></div><div class="mark"><i class="wi wi-right"></i></div></div></div><div class="js-pager"><div class="checkAll pull-left we7-form" ng-if="multiple"><input type="checkbox" id="{{\'select-app-all\' + time}}" ng-model="checkAllStatus.checkAllStatus" ng-change="checkAll()"><label for="{{\'select-app-all\' + time}}">全选</label></div><ul ng-if="totalPage > 1" class="pagination"><li ng-if="pageindex != 1"><a href="javascript:;" page="1" ng-click="loadMore(1)">首页</a></li><li ng-repeat="(i, page) in pageList" ng-class="{active: page == pageindex}"><a href="javascript:;" page="page" ng-click="loadMore(page)">{{page}}</a></li><li ng-if="pageindex != totalPage"><a href="javascript:;" page="totalPage" ng-click="loadMore(totalPage)">尾页</a></li></ul></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="ngConfirm()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div></div>'), e.put("directive-modal_form-modal_form.html", '<a href="javascript:;" ng-click="showModal()">{{text ? text : \'修改\'}}</a><div class="modal fade modal-form" tabindex="-1" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header clearfix"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4>修改{{label}}{{formType}}</h4></div><div class="modal-body marbot0 we7-form" ng-switch="type"><div class="form-group marbot0" style="margin-bottom: 0" ng-switch-when="select"><label class="col-sm-2 control-label">{{label}}</label><div class="col-sm-10" ng-if="options.length"><select ng-model="$parent.$parent.formValue" ng-options="x[key] for x in options"></select></div><div class="col-sm-10" ng-if="!options.length"><select ng-model="$parent.$parent.formValue"><option ng-repeat="(x, y) in options" value="{{x}}">{{y}}</option></select></div></div><div class="form-group marbot0" style="margin-bottom: 0" ng-switch-when="textarea"><label class="col-sm-2 control-label">{{label}}</label><div class="col-sm-10"><textarea class="form-control" rows="{{formRows}}" ng-name="{{name}}" ng-model="$parent.formValue" autocomplete="off"></textarea><span class="help-block" ng-if="help">{{help}}</span></div></div><div class="form-group marbot0" style="margin-bottom: 0" ng-switch-default><label class="col-sm-2 control-label">{{label}}</label><div class="col-sm-10"><input type="text" class="form-control" ng-name="{{name}}" ng-model="$parent.formValue" autocomplete="off"> <span class="help-block" ng-if="help">{{help}}</span></div></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="ngConfirm()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div></div>'), e.put("directive-modal_type-modal_type.html", '<ng-transclude></ng-transclude><div class="modal fade modal-type" tabindex="-1" role="dialog"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header clearfix"><h4 class="text-over">{{title || \'选择删除应用的类型\'}}</h4><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body"><div class="type-list"><div class="item" ng-repeat="value in list" ng-click="check(value)" ng-class="{active: checkArray[value]}"><i class="{{value | moduleInfo:\'icon\'}}"></i><div class="name">{{value | moduleInfo:\'name\'}}</div><div class="mark"><i class="wi wi-right"></i></div></div></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="ngConfirm()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div></div>'), e.put("fans-tag-selector.html", '<div style="text-align:left" class="modal fade {{modalClass}}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"><div class="modal-dialog" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel">勾选粉丝标签(每个粉丝最多3个标签)</h4></div><div class="modal-body row"><label class="checkbox-inline col-md-3" style="margin-left:0px" ng-repeat="tag in tags" ng-click="checkMaxNumb($event)"><input type="checkbox" value="{{tag.id}}" ng-model="selectTags[tag.id]"> {{tag.name}}</label></div><div class="modal-footer"><button type="button" class="btn btn-default" data-dismiss="modal">取消</button> <button type="button" class="btn btn-primary" ng-click="tagSubmit($event)" data-dismiss="modal">确定</button></div></div></div></div>'), e.put("directive-basic-basic.html", '<div class="modal-dialog" ng-controller="we7resource-basic-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel">文字</h4></div><div class="modal-body material-content clearfix"><div id="basic" class="material-body we7-form"><textarea id="basictext" rows="10" class="form-control" placeholder="文本输入"></textarea><div class="input-emoji"><a href="javascript:;" class="emoji-triggers" ng-click="emoji()"><span class="fa fa-github-alt"></span>选择表情</a> <a href="javascript:;" class="emotion-triggers" title="添加表情" ng-click="emotion()"><span class="fa fa-github-alt"></span>选择Emoji</a> <a href="javascript:;" class="link-triggers" title="插入链接" ng-click="showLink()"><span class="wi wi-link"></span>插入链接</a></div><div class="modal-content" ng-show="linkStatus" style="position: absolute; width: 600px"><div class="modal-body"><div class="we7-padding"><div class="color-red we7-margin-bottom"><i class="wi wi-info"></i> 需要认证服务号开通微信支付以后,才能添加外链和超链</div><div class="form-group"><label class="col-sm-2 control-label">显示文字</label><div class="col-sm-10"><input type="text" class="form-control" ng-model="link.text" autocomplete="off"></div></div><div class="form-group" style="margin-bottom: 0"><label class="col-sm-2 control-label">跳转链接</label><div class="col-sm-10"><input type="text" class="form-control" ng-model="link.url" autocomplete="off"></div></div></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-disabled="!link.url" ng-click="changeLink()">确定</button> <button type="button" class="btn btn-default" ng-click="showLink()">取消</button></div></div></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="ok()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'), e.put("directive-icon-icon.html", '<div class="modal-dialog modal-lg modal-material" ng-controller="we7resource-icon-controller"><div class="modal-content"><div class="modal-header"><h4 class="modal-title" id="myModalLabel2">图标</h4><div class="material-nav"><a href="javascript:;" ng-click="setIndex(0)" ng-class="{true:\'active\',false:\'\'}[index==0]">Web Icons</a> <a href="javascript:;" ng-click="setIndex(1)" ng-class="{true:\'active\',false:\'\'}[index==1]">File Type Icons</a> <a href="javascript:;" ng-click="setIndex(2)" ng-class="{true:\'active\',false:\'\'}[index==2]">Spinner Icons</a> <a href="javascript:;" ng-click="setIndex(3)" ng-class="{true:\'active\',false:\'\'}[index==3]">Form Control Icons</a> <a href="javascript:;" ng-click="setIndex(4)" ng-class="{true:\'active\',false:\'\'}[index==4]">Currency Icons</a> <a href="javascript:;" ng-click="setIndex(5)" ng-class="{true:\'active\',false:\'\'}[index==5]">Text Editor Icons</a> <a href="javascript:;" ng-click="setIndex(6)" ng-class="{true:\'active\',false:\'\'}[index==6]">Directional Icons</a> <a href="javascript:;" ng-click="setIndex(7)" ng-class="{true:\'active\',false:\'\'}[index==7]">Video Player Icons</a> <a href="javascript:;" ng-click="setIndex(8)" ng-class="{true:\'active\',false:\'\'}[index==8]">Brand Icons</a> <a href="javascript:;" ng-click="setIndex(9)" ng-class="{true:\'active\',false:\'\'}[index==9]">Medical Icons</a> <a href="javascript:;" id="we7colorpicker">颜色选择</a></div><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body material-content clearfix"><div class="material-body"><div class="row"><div class="col-sm-2" ng-repeat="(index, value) in icons()" ng-click="itemClick(value)"><div class="item" ng-class="{true:\'active\',false:\'\'}[index == selectIndex]"><i class="fa {{value}}" style="color: {{color}};font-size: 48px;position:relative; top:-15px; margin: 0"></i><div class="name">{{value}}</div><div class="mask"><span class="wi wi-right"></span></div></div></div></div></div><div class="material-pager text-right"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-show="multiple">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'), e.put("directive-images-images.html", '<div class="modal-dialog modal-lg modal-material" ng-controller="we7resource-image-controller"><div class="modal-content"><div class="modal-header"><h4 class="modal-title" id="myModalLabel1">图片</h4><div class="material-nav"><a href="javascript:;" ng-click="setIndex(0)" ng-show="showWx()" ng-class="{true:\'active\',false:\'\'}[index==0]">{{ config.typeName }}</a> <a href="javascript:;" ng-click="setIndex(1)" ng-show="showLocal()" ng-class="{true:\'active\',false:\'\'}[index==1]">本地服务器</a> <a href="javascript:;" ng-click="setIndex(2)" ng-class="{true:\'active\',false:\'\'}[index==2]">提取网络图片</a></div><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body material-content clearfix"><div id="image" class="material-body" ng-show="index!=2"><div class="category"><div class="category-menu panel-group" id="category-menu" role="tablist" aria-multiselectable="true"><ul><li ng-click="loadAll()" ng-class="{true : \'active\', false : \'\'}[groupid == -1]"><div class="name">全部图片</div><a class="edit"></a></li><li ng-click="loadNoGroup()" ng-class="{true : \'active\', false : \'\'}[groupid == 0]"><div class="name">未分组</div><a href="javascript:;" class="edit"></a></li><li ng-repeat="(key, value) in groups" ng-class="{active: groupid == value.id, \'show-sub\' : showSubGroups[value.id]}"><div class="caret-box" ng-click="showSubGroups[value.id] = !showSubGroups[value.id];$event.stopPropagation();" ng-if="value.sub_group && !(value.sub_group | we7IsEmpty)"><span class="caret"></span></div><div class="name" ng-click="loadImages(value)">{{value.name}} <span class="setting js-show-action group" data-action-id="{{value.id}}" v-show="!value.editable && !value.editing" ng-click="showGroupAction($event, value)"><i class="js-show-del"></i> <i class="wi wi-more"></i></span></div><ul><li ng-repeat="(sub_key, sub_value) in value.sub_group" ng-class="{true : \'active\', false : \'\'}[groupid == sub_value.id]"><div class="name" ng-click="loadImages(sub_value)">{{sub_value.name}} <span class="setting js-show-action group" data-action-id="{{sub_value.id}}" ng-click="showGroupAction($event, sub_value)"><i class="js-show-del"></i> <i class="wi wi-more"></i></span></div></li></ul></li></ul></div><div class="category-add"><a href="javascript:;" ng-click="showRenameGroup($event)">新建分组</a></div></div><div class="image-box"><div class="material-head"><div class="search-box" role="form"><div class="input-group we7-margin-right-sm" style="width: 250px"><input class="form-control" ng-model="keyword" type="text" placeholder="请输入图片名称"> <span class="input-group-btn" ng-click="search()"><button class="btn btn-default"><i class="fa fa-search"></i></button></span></div><select name="" id="" class="we7-margin-right-sm" ng-change="search()" ng-model="order"><option value="ase">上传时间正序</option><option value="desc">上传时间倒序</option><option value="filename_ase">名称正序</option><option value="filename_desc">名称倒序</option></select><div class="search-form"></div><div ng-show="index<2"><we7-uploader-btn upload-url="uploadurl" concurrency="1" on-upload-start="onUploadStart(files)" on-uploaded="uploaded()" on-progress="onprogress(file, progress)" on-upload-error="uploaderror(mes)" multiple name="uploadname" accept="accept"></we7-uploader-btn></div></div></div><div class="img-container we7-flex"><div ng-if="files.length == 0 && images.length == 0" class="color-gray font-lg text-center we7-margin we7-padding">暂无相关图片</div><div class="item" ng-repeat="(key, value) in files" style="background-image: url(\'{{value.res && value.res.url}}\')"><div class="name text-over">{{value.name}}</div><div class="progress"><div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: {{value.progress}}%"></div></div></div><div class="item" ng-class="{true:\'active\',false:\'\'}[value.selected]" ng-repeat="(key, value) in images" ng-click="itemClick(value)" style="background-image: {{getImage(value)}}"><div class="check" data-check-id="{{value.id}}" ng-class="{checked: value.selected}"><i class="wi wi-right"></i></div><div class="action js-show-action" data-action-id="{{value.id}}" ng-click="showAction($event, value)"><i class="js-show-del"></i> <i class="wi wi-checking"></i></div><div class="name">{{value.filename}}</div></div></div><div class="material-pager text-right"><div class="we7-form form-inline selected-all"><input type="checkbox" id="selected-all" ng-model="selectedAllImage" ng-change="selectedAll(selectedAllImage)"><label for="selected-all">全选</label></div><div class="search-pager-aciton" ng-show="index < 2"><a href="javascript:;" class="color-default js-show-del" ng-disabled="getSelectedKeys().length == 0" ng-if="index==0 || role != \'operator\'" ng-click="showMove($event)">移动</a> <a href="javascript:;" class="color-red has-popover js-show-del" ng-click="showDel($event)" ng-disabled="getSelectedKeys().length == 0" ng-if="index==0 || role != \'operator\'">删除</a></div><div class="page-box"><we7-page conf="page" style="display: block; line-height: 1"></we7-page></div><div class="search-page we7-form" ng-show="maxPage > 1"><input type="number" min="1" ng-max="maxPage" ng-model="goPage" class="form-control"> <a href="javascript:;" ng-click="setCurrentPage(goPage)">跳转</a></div></div></div></div><div class="img-net text-center" ng-show="index==2"><form action="" method="get" class="we7-form"><img class="img" src="{{netWorkurl}}" alt=""><div class="color-gray">输入图片链接</div><input type="text" class="form-control text-center" placeholder="图片链接" ng-model="netWorkurl"><div><button class="btn btn-default" type="button" ng-click="fetchNetwork()">转化</button></div></form></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="ok()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'), e.put("directive-keyword-keyword.html", '<div class="modal-dialog modal-lg" ng-controller="we7resource-keyword-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel">关键字</h4></div><div class="modal-body material-content clearfix"><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form" onsubmit="return false"><div class="input-group pull-left"><input type="text" name="keyword" id="" ng-model="keyword" class="form-control" placeholder="搜索关键字"> <span class="input-group-btn" ng-click="search()"><button type="button" class="btn btn-default"><i class="wi wi-search"></i></button></span></div><div class="pull-right"><a href="./index.php?c=site&a=entry&m=weliam_smartcity&p=wxplatform&ac=wechat&do=creatReply&" target="_blank" class="btn btn-primary">新建关键字</a></div></form></div><div id="keyword" class="material-body"><div class="row"><div class="col-sm-2" ng-repeat="(key, value) in keywords" ng-click="itemClick(value)"><div class="item" ng-class="{true:\'active\',false:\'\'}[value.selected]"><a><span>{{value.content}}</span></a><div class="mask"><span class="wi wi-right"></span></div></div></div></div></div><div class="material-pager text-right" ng-bind-html="pager"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-show="multiple">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'), e.put("directive-module-module.html", '<div class="modal-dialog modal-lg" ng-controller="we7resource-module-controller"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="myModalLabel2">应用</h4></div><div class="modal-body material-content clearfix"><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form" onsubmit="return false"><div class="input-group pull-left"><input type="text" name="keyword" id="" ng-model="keyword" class="form-control" placeholder="搜索关键字"> <span class="input-group-btn"><button type="button" class="btn btn-default"><i class="wi wi-search"></i></button></span></div></form></div><div id="module" class="material-body"><div class="row"><div class="col-sm-2" ng-repeat="(key, value) in modules | filter:keyword" ng-click="itemClick(value)"><div class="item" ng-class="{true:\'active\',false:\'\'}[value.selected]"><img ng-src="{{value.logo}}" alt="" class="icon" onerror="this.src=\'./resource/images/nopic-107.png\'"><div class="name">{{value.title}}</div><div class="mask"><span class="wi wi-right"></span></div></div></div></div></div><div class="material-pager text-right"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-show="multiple" ng-click="ok()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'), e.put("directive-music-music.html", '<div class="modal-dialog modal-lg modal-material" ng-controller="we7resource-music-controller"><div class="modal-content"><we7-resource-musicform ng-show="showMusicForm" doselect="selectVoice()" musicurl="musicurl"></we7-resource-musicform><we7-resource-voice ng-show="!showMusicForm" is-wechat="false" show-type="2" doselect="selectVoice()"></we7-resource-voice></div></div>'), e.put("directive-news-news.html", '<div class="modal-dialog modal-lg modal-material" ng-controller="we7resource-news-controller"><div class="modal-content"><div class="modal-header"><h4 class="modal-title" id="myModalLabel5">图文</h4><div class="material-nav"><a href="javascript:;" ng-class="{true:\'active\',false:\'\'}[index==0]" ng-show="showWx()" ng-click="setIndex(0)">平台</a> <a href="javascript:;" ng-show="showLocal()" ng-class="{true:\'active\',false:\'\'}[index==1]" ng-click="setIndex(1)">本地服务器</a></div><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body material-content clearfix"><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form" onsubmit="return false"><div class="input-group pull-left" ng-show="index == 1"><input type="text" name="keyword" ng-model="keyword" class="form-control" placeholder="标题/作者/摘要"> <span class="input-group-btn" ng-click="search()"><button type="button" href="javascript:;" class="btn btn-default"><i class="wi wi-search"></i></button></span></div><div class="pull-right"><a href="./index.php?c=platform&a=material-post&&new_type=link" class="btn btn-primary">新建图文链接</a> <a href="./index.php?c=platform&a=material-post&&new_type=reply" class="btn btn-primary">新建图文</a></div></form></div><div id="news" class="material-body"><div class="row"><div class="col-sm-4" ng-repeat="(key, value) in news" ng-click="itemClick(value)"><div class="material-appmsg-item multi item" ng-class="{true:\'active\',false:\'\'}[value.selected]"><div class="appmsg-content"><div class="appmsg-info"><em class="appmsg-date">{{ timeToDate(value.createtime) | date:\'yyyy-MM-dd\' }}</em></div><div ng-repeat="(childkey, child) in value.items"><div class="cover-appmsg-item" ng-if="$index==0"><h4 class="appmsg-title"><a href="#" target="_blank">{{child.title}}</a></h4><div class="appmsg-thumb" style="background-image: url(\'{{child.thumb_url}}\')"></div><p class="appmsg-desc">{{child.content}}</p></div><div class="appmsg-item" ng-if="$index>0"><div class="appmsg-thumb" style="background-image: url(\'{{child.thumb_url}}\')"></div><h4 class="appmsg-title"><a href="#" target="_blank">{{child.title}}</a></h4></div></div></div><div class="mask"><span class="wi wi-right"></span></div><div class="del" ng-click="delItem(value,$event)"><span class="wi wi-delete2"></span></div></div></div></div></div><div class="material-pager text-right" ng-bind-html="pager"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-show="multiple">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'), e.put("directive-video-video.html", '<div class="modal-dialog modal-lg modal-material" ng-controller="we7resource-video-controller"><div class="modal-content"><div class="modal-header"><h4 class="modal-title" id="myModalLabel3">视频</h4><div class="material-nav"><a href="javascript:;" ng-class="{true:\'active\',false:\'\'}[index == 0]" ng-show="showWx()" ng-click="setIndex(0)">微信</a> <a href="javascript:;" ng-class="{true:\'active\',false:\'\'}[index == 1]" ng-show="showLocal()" ng-click="setIndex(1)">本地服务器</a> <a href="javascript:;" ng-show="showNetWork()" ng-click="setIndex(2)" ng-class="{true:\'active\',false:\'\'}[index==2]">提取网络视频</a></div><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body material-content clearfix"><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form"><div class="pull-right btn-uploader"><we7-uploader-btn upload-url="uploadurl" on-uploaded="uploaded()" on-upload-error="uploaderror(mes)" multiple name="uploadname" accept="accept"></we7-uploader-btn></div></form></div><div id="video" class="material-body" ng-show="index!=2"><div class="row"><div class="col-sm-3" ng-repeat="(key, value) in videos" ng-click="itemClick(value)"><div class="item"><img src="/web/resource/images/icon-video.png" alt="" class="icon"><div class="time">创建于:{{ timeToDate(value.createtime) | date:\'yyyy-MM-dd HH:mm\' }}</div><div class="name">{{getTitle(value)}}</div><div class="mask"><span class="wi wi-right"></span></div><div class="del" ng-click="delItem(value,$event)"><span class="wi wi-delete2"></span></div></div></div></div></div><div class="img-net text-center" ng-show="index==2"><form action="" method="get" class="we7-form"><img class="img" src="data:image/jpg;base64,/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wgARCADxAecDASIAAhEBAxEB/8QAGwABAAIDAQEAAAAAAAAAAAAAAAIEAQMFBgf/xAAaAQEAAwEBAQAAAAAAAAAAAAAAAgMEAQUG/9oADAMBAAIQAxAAAAHu9rmdvkq6w4rrArrArrArrArrArrArrArrAr7NjvNULDna6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wK6wKiwOP2+J25RAAFCULmri7b8ncz57s13WBVoQp8rFo7m/zk6p+hV7HoZRwk+vW8VjP6P0KfgPX25egLcjTyPMZqva3Pnm6uH0Bz+hrvCXQBgyAAoUoVdxQvymavL8t9Vq+a4zbPqMvlvdnX7VCejIABAHH7fE7YABDz/b4mrz+l0dezPs42vocrVg9FCdfB6nD26ul43obuX0NOmqv3vOejshp8D7Xx9uzp79+lxyujxIX/AEPTuoa/D8V2eJ1/Oy9Hm4hZLV7n539EtmGq4BjODIHE7fla6Nr0GiMfI9yHLqz1ebv05/qMy36Y2Rlrsc56Xu+X63ofP9gXXAQBx+3xO2AAY8/6GvbnqWObquy2sOtGc8ZZd/nt3T5Pk7t+jVZhJ2oT9PHDwX0Dnyv85KvVzenO89ZOjdCbX5Hz+76Py3n5r1Ol0oxey0b9ugLZgMZwZA8V7XiVZ91nyNmun1vkrfGWVfT+R9Zn9yr3vOegnT523zexyflvQ8/sT76QbPPAgDj9vidsAAAAAAAAAAAAAAAAAAYzgyAChS7iFVDHQds+Vdj1Pnsu/twu8i3Le8p7TytWnu9GFi/NvFtYEAcft8TtgiYw1mxpG5DJJpybWvJNDWb0JhDJJATRmZSolxUyWmiRtaBvVRaSBjIxnBkDn9D5afQrPzbsHrbfze+e15nmeTHvuXK4rnunjelyXoseFtd5661887MuewBAHH7dS2IyGvVtwVYXRSlbGnRdFGVwUd1gUtlkUdtkVY3Br3RybOV0xzNHaFOv1Bz3QHKh2BDbEZyDGcGQPmf0zhHkbs+YdKt3OaUZWdRo3c7vnM7PI7Zu5UKRv7XQ7QBAGZRkAEcE0BNATQE0BNATQE0BNATQE0RJESREkRJESRyZAxnBkD5Z9T+WljreU9ueN6G2yVOhpsFPjdDJZjGY31LBX+i/LvqIBAGZRkMZiRIE1PWX88vYdDFDeWXN3lvVDBYUInSc7aWZ16h086N5Ovv4J2pcaR2NVC2WJcO4W1CJ0tnO6RjMZDGcGQPmH0/5wXur5ysQ9HS1HZoYqFmhPYQ4fu+SbeJmJZ9hzvWAEAZlGQxka2yJFIRSEUhFIRSEcTEcTEMyEc5EtchjISREkQxkYykAMZwZA+efQ/Fnnbui0bLWjeXvK9ORX6vE7Jw72j0R511OSb/dfPvpBMEAZlGQMGYxEkRJESREkRJESREkRJESRq87caDu9oG9oG9oG9oG+VbRzvQEoMZwZA8D77yh4z2Pmdh0tdvkm+n2KBvn0vLHbt6hZpU+kVfXfNvpJeBAGZRkIywQhMVtNvJUntmaNdrJXbpFTO/JqjYwVd2zYV424EYWK/JXOT1q/Y8zHTkcrV1sHMtdDBQrdWRmG7RyViWM9ixnBkD579C+YnrvL6uoba2jvHH5mvtnnO7o9GcvRxPSlShbFX6B8w+mnQBAGZRkARxMQTEExBMQTEExBMQTEExDTZc7WWTtZZFZZFZZFZZFaFw6HYMZwZA+W/UvPnjvfU+2eHu3+seW5P0nmnj8e60HkqfvqJ4/H0blHjPcLBcBAGZRkAU1TYbd9aRszogW1fJY11pFiGnJZlTmWNuiJYlV1FyGvJv11thYlWybZVslnFPcbqeapelSsF4DGcGQANeznFtRydBW1FrPM3F9ztJ1Z822WgAQBmUMkkRJESREkRJESREkRJESREkRJESREkRJESREkRJESREkRJESREohmORiWAxkRngZYEkRJEYRGYAAAAAAAAAAAAAAAAAAAAAAAAAAAAABkH//xAAvEAABBAEDAwMEAgICAwAAAAABAAIDBBEFEhMQICEUMkEVIjE1M1AjNDBABkJD/9oACAEBAAEFAtKijdp3BEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJNY1idFG88ES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcES4IlwRLgiXBEuCJcESdBFjSP1v92726R+t7y9rVzRoEHtL2tXPGgQe18sca9bXTXNeOx8sca9bXTXNeP+k57WLnhKDmu/4He3SP1vdNNtXknieA1xaYpeQdJptvVri0xS8g6XbvGSSSmSPhdVsiwzpdu8ZJJKjkfE6rZFhnd89kluKNfUVFbik6OkYxXNScScuOEMg1tSkiLHtkZ2u9ukfre152sVZvhWG7ZInbZE921iETynw/4TG8KJ22RSv44ScmrRMwkoPbYkJIqycVhSv44ScmrvdF96uF4VWTisd3z1u2CFHRe8SUXsCq2HuFmWQOQWQspjOR7WPhijkEsfY726R+t7Zv4Uxu1istywflT/AMKglysB7p5DkflXf9OIB0zpt005kqy6gxsUg9yu/wCmqex8bY6rn3HNLx7u756wnku7P8h/mmpv3McWSTTGxNgoxu4+N46Qycbze+3T/ui7He3SP1vaRkObtdBK1rfUR5nc17oGbpERkObtdC8Rn1L90rg98DN0ic0PZIwxSNtkH1YDpJHSvow8thOaHskjMUkU8EaFuBssskL20YeWx3fPVwMcrbsYbGGS19jS+2Rz1cGzLI1gq3WSSp12B8npIpFJ/Jo0nnsd7dI/W90kQkDont6Mge5NaGN6SxCQOie1YTIHuTWhjelmq2w2SrNEsFQ0ZZTFE2FnSzVbYbJVmiWCoaMspiibCzu+et2uT0inkhXrpSpncaDtr2x8kFbT3RTHY9rdOmbPKfTmlXE7q0MdSfsd7dI/W/03z2SVIpF9OUVSKNXa/qa3sNbUuNsc8U7Y4GRvkniiVuxHYlqRcVdoyex3t0j9b/TfP/BaoQ2lLoxa6JjK8DLsrn267LEEOlyNkUfa726R+t65XleV5XleV5XleV5XleV5XleV5XleV5QWFhYWFhYWFhYWO756+upr11RSTRQgWq5YjIxrzaq5FqsXGpHEWTwzF7GxtPExptVYj66mo5Y5m9He3SP1vQ/hOeGoysBErCt7du4LeuRi3sxvaAHNcjKxbmgIPaUHBy3N3b2kAhwH5T7LWSCy0j1A4xLkslY8GdgTp2NLbMbj6lmzoPx0+esboK2kPdBZ0nWqU8sOjOgZp9sTaerjpLktJtFmpWqbmST2RHp0L6wllOa9iCy/UJBELVOetdk/8c/X9He3SP1vQ9HDLg1zU7IaWuRzj8yNjOw/45Iw5iLJHO8uOxy2u4vLiwlbXbSxzi0YI/KlD3TNYXMEJaxkXkMmTI37uN+G5Tw9R7dqH46fPWHb9Pl2ihqLn2LtNj4RqLo5XS14rNZum1hqM9SDgkgrULsjfRalR1B7mV77tkp47sPp6x0CN8VDo721oG1oev4WQshZCyFkLIWQshZCyFkLIWQshZCyFkLIQIzkLIWQshZCyFkLIWQshZC/PZ89dO1Jl9hfK+Si06pIyzFTdWjoT2I9XqVWQi3qc88Wp7tUbDXZNXdZtvoVoTp0diw67qdirrFo2ZqfV3tH9P8APW3JYrGhIa1fmrRMhEsMkz36q+2yWqaNm7ZFOk6AV2uL5KkmsTXGwm9DTq2G2rXqWtdHal6u9o7MrJWSslZKyVkrJWSslZKyVkrJWSslZKyVkrJXleV5XleV5XleV5Xlee3563TWo6pFBJ66Kg50E0T6kIgb9OijfJeuUdRbDBXdWg2S3468GqQ1b0tcXKdnTm2X6UHihTtN1Xq72jqfx2E4HQHPYJGnt3DHQflc8WeWPaXNB3Bc0RW9uAQVyswZWtc2Rrj2fPV2jvsqGGCPTas0l7R9PNyOwNOpMU1e3Jp83PbgdBFPp8lWmIbO3T5Z2TSWWxxxR2f9LS5IzqGl2LFmt0d7R1PR27BJ4x5TvEWfGfEX8TfuLTktEm57Ru8Z+1rS7xn7f/duSyND8n8eWGWP/E0KPdj/AO7WO4o3jiDPsc7EkW9sqH46fPW3emsXKk0s8B5qd+pHMLVmXTmC9HYmowVrFay9jg6zWOoXbFWrBYtWKE1nZ6SCxpMUMVIV4bvV3tH/AESM9CMrGD0H5QjY0BjQ3a3d2YG3Y0LY0O7PnrBTbYq0pmsLpOTUmWpYLWn0YTHyPgnbasV9Rke9zoDusPnsWK5rVqupy6ffnVi66Z8YsyapBYitM6O9o7cBbQtoW0LaFtC2hbQtoW0LaFtC2hbQtoW0LaFtCwsLCwsLCwsLCwsLHb89abnubZqcGpwvhsWrFOvJrUEEXHdrGgJ9Sle2BsmpXKcDq0FmWG3PrFNslaprDmV7nNqVjTasc1prGsHR3tHbkLIWQshZCyFkLIWQshZCyFkLIWQshZCyFlZWVlZWVlZWVlZWe3566nDGLdO/Z3C7VNF9Q16zJYbNBjIp7TXwaU7T9YtSN1GxWmVaG7SkhsXHajXuF1DT4XaVA97r2s1YpoYujvaP+vK0Of6eFenhXp4V6eFenhXp4V6eFenhXp4V6eFenhUsMbG9fnrHGIqJoS0dUp6c17LuOSGjx2JmR15RplsRunFahTgoW1XhFiK5UDJ/qjm1Y3yMZemFnUqtYVY+jvaOp6OdtBc7ZFuC5XLe8KORzzJnkc9zTvkK5nLc4O5HIPeRyFrN7kDyAt+6M5jf/KrX2yMLio3vy7/Xrt2JrW7oy4lgc2H7GiIgxTewfjp89XN1OXUrdRrq2ouimeLF+OTUo69vUPqPpxE+96yFtjSxXiil0B8TKcl21PqdVznaTRvP1N09AahftVY5ooujvaOp/HTY1bGhCJgW0IMa0loKMbSdoXG0rjbu2N3GNpHG0gADo5od0f8Ayp0Qc4QgLiGfTtXpwnMyWxhqMLS4RbWMaGMn/j6/PWHjGny8TqEsrYdZrvtx39WZVMMLY7AsTsqarLNDJFM1mmw2bD7TA6fT2ag62RZ1CtPBXtGpYqPnfF0d7R2YWCsFYKwVgrBWCsFYKwVgrBWCsFYKwVgrBT43E4mWJliZYmWJliZYmWJliZYmWJkY5Hdnz1jFezpDxXraVZZF6axru2VptXoG6fZpu1PUJZzVl1WxabB6exUdZN/UbkEF76ZarR0AKd988dHV6DajYOjvaP6f56/RNPX0TT0+Nskf0TT1BXiqxKWhWmscEYsWaNe4m1oWzy6VSnl2N44tKpQS2NOq25K9WGpH0d7R2STOjXP/AIxYyTJhc2W73ZMwCMzQOUb+ZcuGmZ24ykOMu1vKt7du9gBc0Ivw4SgkPaRyjYZA129u4yND+RmN4CY7e1rt0ZskAT/aJmud1+e0vaFysxyNReGouAQlC5W55GoPaU6VjU17XdrvaOxzNyY042kHhBEmZAYyA5oLsDZwDeYyvJbsKc3w9u9hi8FrtzYzkxuxguayMhbJCvJc6NzjsKDXZDXNAje0sOxkWxrOJ2NpDGgiTr89rfscXeMyAAOEn5gj/lO4TYIQDCXfaoDlvY72j+tADVgLa0rY0jAwAGgNa1bG4wFgdzvbnC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcFuC3BbgtwW4LcESCD/e//8QALBEAAgEEAQMDAwMFAAAAAAAAAQIAAxESUSEEIjEgMkEQE0AFFGEjMGBwgf/aAAgBAwEBPwHNtzNtzNtzNtzNtzNtzNtzNtzNtzNtwsTMm3M23M23M23M23M23M23M23M23M23M23M23M23M23M23M23M23M23M23M236HcILmfuXPtEpVw/Hz9KdDLkw9MPgwgg2Mp02qNisH6eluTK/SGl3DkfRqlvEFXcBv6jVQfMDBvEpoahss/Z/zH6Rh7f7HVnuAlJcUAlUYVeIouY5Ki4lMsDjOpHInQABC0zqs/n/AJKKhqX8GHxE8wniUfTWY8KPmfYS0XKk0pIqLwLQGMbKTLuamVjz669LMcQV6idtpTptUfNvorrUFjLInMqPmZ0lf7Rs3gwU6TcidT1KouCfQqVMuTxEXEenqEJFxF6jnuh/rEKglXmxjWvxPB7J1FRbFPyjSQ/EQYe2Curixj9WKXafmUqijujg+4/mA2j2f3QMR4hYn/Rai5nbudu527nbudu4FUm1/wAlPPqp+4fkg2mZmZmZmZmZmZ/yv//EACoRAAIBBAECBQMFAAAAAAAAAAABAgMREiExBCAQEyJAQRQyYTBRYHDB/9oACAECAQE/AcUYoxRijFGKMUYoxRiiyMUYoxRijFGKMUYoxRijFGKMUYoxRijFGKMUYrsjFydkeTFcsnScd+Fbq1B4xI9c7+pEZKSuiUlFXZ57IVVLXhUrqOkLqX8oTTV13OcUJ34JyUFdn1P4I9Qnz+hQWibvK5TeUCbtFsoxjOVpFeMGszoXpor8pFopE3aRJ2iyn9xJ+k6V6a7aj+Dy4m4Mbb5dyxZ/B06lGGEvj8r/ADvpTxezy4y2TmoxxXhOjOjLKJlVq+nkoUvLjYqwyWjKSKdNt3fhKnKm7ovOeilTwjbtqxuhVP3Kkk1ohyI+NlGD+73ThFmKtYlScdkemc9onT3YhJfaveSipckI4cEoRlyKKXH9GbNmzZs37l9z491YsWLFi38r/8QARxAAAQMBBAcEBwUFBgYDAAAAAQACAxEEEiExEyIzQVFhkRAgMnEUIzBCgZLhBVJysdE0UKHB8EBDRFOTohUkYmNzgmCDwv/aAAgBAQAGPwKMuYCcd3NbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRbNvRarQPJVcwE+S2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2bei2beij+P5/v2P4/n7DErxLA93E0XiWB7uu8BbRVaQRy7uu8BbRVa4Ecv7HrOA8ytqz5lqkHy9jH8fz791ua4lVulVBXPtutz7agrn26OPxbzwVSansq0lpXB4zHbo4/FvPBVJqey8x1CuDxmPaU8R5LZ/xVPCefZrPA+KLIDQfeVSann2VBoVdm12cd4Qc01B78fx/PvE9hd2eaB7CezwlXRmFi0oHsc/gFU5q/Jqt3c0DB4c6kpzJDfwd4hi0hNduyPY5/AKpzRutgo3fIF/gk1jmw461Ywmu3ZH2eiZ8VVxuqrTe7NFUXvdvItcwNcc+3LsomvZgK5IOHej+P5953YB2V3jtd2XHYrWbQcLquDAdsiYDkXBSB73RxR4au9M0b3kO9xxqg5ho59aodknZJA6tX8EGgzVPIJjG11G3cUPZgu3mqv3jlSivNJ4YnBFzbuON1A8CnSHeskyjTzwXgd07Kq7XDgnPB1Scu9H8fz71EQUbxxW9VaVXcOyiIKJKru4K8FXcOwtORwRYcwquFXfeBoVfEVX/ee6qvPNSgfdbj2FpyOCLHZhNOgJeN95aQWfW43lqQlruN6qB91uPsyN7Sm3zrUxomVx3/ABQfTWCkIyUYOSeXVDGYUbmSrl1zK5Vde7KOv3fvCn5JzaUcPebvCfTipY//AG70fx/Pv81iOzHAKg7eaxHZjgFQdvB4yK1mGnELJYi43iVcZl28HjIrWYacQsliLjeJVxmXs9Kz49mqfgsQ2iAcM0HN3GoTyx5rLjrCtEJJXNo3gi2+014Fe4W8T+ifLfwuhobROLxVoWk1m3tW6ce9H8fz/dlfCeS2v8FXxHmiweLNvmi12BCDJW4DeFqOqr1VrvAQ0daBNG84nvx/H8/3hV2q/wC8FqTC7zGKuRNy3VzQ9U014ItePI8Exz3x3a5A9le9H8fz7mCzWazWazWazWazWazWazWazWazWazWazWazWazWazWazWax9h+1Qf6gX7VB/qBAySMYDvcaIvE8RYM3XxQdgYXtDnZCuJWNrg/1ArotMJJ/wC4EJXShjWGuOAV2O0RvPBr6oufIGtG8ppdK0A5EnNXHWiJrhmC8L9qg/1Ar0UjXji017kfx/Puiu9AXhivEOqreFONVnkm4eJeIdVW8KcarFwx5rBwKGsOqreFOPZg4Yc1gQfJXbwrwVbwp5qoNUey7T41ARN04cKFXrp6I0Y7DM4IawvEeGqGs0itCa5JoqNbmqVRIIJFcAfZQzOsscrnvI1lPM2yRxOY5oBahMx7nMaKlm4YZq1G0gGK82tRVQTG3TOjMgqDwUckLiyX/DXffG/yRZK7Ssc2gvN96qIsv2dCRTCStCCp7PaLS99pdSrHe78VpbAdfRXXtApdG9ysspldLYwDpnO97hgorPFM+WOglAJyC+05pIWS6O7QOUkfoELKRl1QpP8Ayn8h3I/j+fdZyKabtc0QW+9X+KLrprWopTBXS0CtBUb07kKKhGNQr5y8003a6tPJGvAhM1KUQz35UWjA93Oqdq08OCdq+8nspnXWVbtMsE7mUeyrbw3UFcfyTmubrVGY/VO1Ty1c8+CeTXPDW5Jgc00b5UyTKg3WnC9SuSa25vdmU2gfUUwuogtOTvC0nNajbo/DT2MdmtNhtbrjidVqks9msNrbfIOs1ejPeBFGA+77zuQUkNlGMxvC8K6Pk7moJxWK0aQNLZN3OitEsYe+1RkVLDgTyT4i2QtbBpKA41UEjGTx35gwiQ40Wna1zWwnWDzjJ+FOdZXsjvQ3/W7+SabSWOY/7gwj/Ejpoy6TSXWtaMbvHyVuZLZbRJHNdxjanOhsFtDi0txCeJGOYdIcHCm4dwRMJLW8e9ms1ms1ms1ms1ms1ms1ms1ms1ms1ms1ms1ms1ms1ms1muXsPuyjNqtkklvlhjilu4CquvcWzR6+n3lOA1mNwtE2+8pZpLT6VRlTfZkFaPR4WNxFwD31JbIqwal0XTmeChFre8NMgAN6tCrO60SaaSMGjXDaKKe2x+jwkNa2mtXkpbNpbnpfhaG5URxI0brvpG+g91SUe50bT4K4ZKF1mqHktcaHd3T+63y6ezPMwuO0S0Ilh0s+uHOOq3zT/s+yte9zxTSNxArzU9kljfLDe9ZoxU1WjguwQjIyClTwVjEDWyyQtIfdbexU8U8eiZojQ3LuKtDnWmGX1LsGvrRWaSFr2uFb0k3gTbRG8CNuo4E8OCsljcJGRR3hfcaV+KvWOUseyTWD37gvtCEaN1KaK7mVDMdJdjaIjE061Rvpw7p7uSyWSyWSyWSyWSyWSyWSyWSyWSyWXs8vYyN9EZIy6KNrkmP9CDmyguZFewog6NnoM1cbmNQrTNB9oPc9rhpBdpirM6CTSxxz6R7qUoN6lcy1ugFodeioK3wvVWuSe9gW4DBCK5dtIdem/wDErWyyTO0DCAyIZFNszITH6y8ZA4KyQ2ibS6K8JS4J85LYRQx6MAmo4o237Pl5xtaKK5I90MhbfJzrj3T7Cp7cO5ge6OeXaewjSNw5qt8U5KhKGIxyW0Z8yBvChyxWCrXBUxryaVQVrzaR7Ezwu0cX/fOspWuZO66QHFm/8PJSOcWte4ObXKikssGjfV2s9wq1eqtPrfdbpcKqVlofZ2PwuObgAmwOdedEb7nxZFvAc1dh0jLj77xKde6ofR3yxvtAqwvfQDzTYLO+QzyNAJeatoUywyuiDo8L/wCpWkmMcs5bogIcQBxKbAyZodZBrUd4q8Feg0hIgNb+OKc+0suvv08NMO4e7q5p1Cb2+uFEBewvbncl4jvGafccSMMarF+pezDv5rqmi8c8SHZo62vjhVaxw8/omDLHd5Jhc47xWqOuQb33ua8erXCrs/inULrxAFDuVNzQq3nZgZpw4FFGqIxa33caf/pMzrdPi/opp3Vph8VZqkU8uSk/CP5qL7mqR5pzA9ofV2/moXOe67SnCiAY7ClGjj1TQ77tMvr7GQ2ZxlsrW1e3IEb1LN6a6ywRuoGgVoo7Bpy+BxF4UzqrZZrMNFHpNqPc+CaLHEyS0F1BSooeKggdMfSHNxh++n2RttdGxkelJuqK1MtxnErxC7VpUIWSKLRw2bVLhimWu1SC61oYARv4pvo9lZapZM8SFo6aC1ySU/8ArKncy1X3w+JtxRRR2drXugvmSvdP9hx7PJHn2nsIaxorwCuhoA4UV6grx7t2mHBeEK8GivH2Mlril9Eie0h7AL2CmsTIPS2vdUY3a0UxtEOin0Y0La11tygZA3STkH0iOtKuTo5mBltFXc28CmOtdnq2HD0on+Sf6REZXytuBpNMCo7K2w6ARPEztatArVdm0RtRBgfTOijinaZI/SaaUnPkr9mlDpmnVswH80LXI1zpg/CLDw+ansjbDctE2DtdRh9bK6ODzqAr8L77QaV7h/dbJyYo3PN2WN+Au8gjK8P0MlXAwZqOe1R2hs94YtbRvJRBkrvXXnOLHZLT2WVwEh0chndjd5c0y0wTaRgzbK+9X4Jtos0UL25ULKvB/RSy2tsjKRf3YpVSyRuYL9NBpziFC6Fk18SNDqDUTrQ0OE0eVzeqWqCW8Pus3KF8FwNeTcI8Q/EjFaHTi0t54UVGtDRy7h/ddqmtDdV0VIifvJkJtuhiAzu1onwS/aDZHuBF+6oXfZ8GklLf2hp/kjE6x6NmOiN6tZF9n2SUXjGxzZGcCpJLPaBM94LLoFLvNaLQG0SZ1vUwUUs9NLFW9Zjv+KuQtdJZ5G1FMLhKZZgS5kBpM/73BWg2iTEyOjbX+ARc/WtE/hhyyTfRp9E8Q6xpWmOSLZp9M6vipTuH+zxhwBF7f5FbGP5VsY/lWxj+VbGP5VsY/lWxj+VbGP5VsY/lWxj+VbGP5VsY/lQc2NoN5uQ5+wZY7b6yR5Lat1qVTWs0RvVLNLlTmoJy5oeJddrzTBevMrY/7r0XhzUURlpLG8SODnat39VaTOHkWh15j4RUgJsYFmo12k1jrfFPdKyLTOq3/lwmCV9o0x8Tty0bJ5BZA7xF9H3uHkrHA2SRrDevyA4/Eoxx2dr5GyYerqKcfNR2+QA6TGRpzb+AJjrMySOoANBdOaLA976mtXmvcPdqVXDEiib4dYVJosKHKhpRY3cHUyWWBHBF2ButqKhDEHldQ8OJIWAxHLNOOFLyrhdJom+GpFck0NHug5VTjhQbkWubQU5/ortTTEppOZCi/F/I9jCXYbv6qE8h+Tfv/Uoip8Qz8xyQF0eEY/FPw9139ZJuq3w/5BUQDRgyoqaIvdQi7QspwVDHHUDln8U2mVEPxt/MewM0UL7PpKNccDRMfNB6XMwUzpVQOdZqWovAdFexIUWisEjIGChjvZoQOIhloPWHG9yX/Db+iMerp/opxJC6aV8N3hhxUr5rO67Iwx9VKyyi9O4C+BxqmiZl2yNZfAP+aoxYwSCPWsG7go4I5q2h0gcW03FelGJ8bI8W5aq0+mLaNu6W6OiInn0zq+KlO4e9lzWW6iy/ivjVVH5o134KpCHJZfxVf5qtEBwQw5Zo8+zHsi/F/I9lakeSOLqHMIkEgnehRzsEdY454D9FW8QaUwTc9UURNT5K61zhzQaNyH4m/n7CO02m12sX3EajlLaLNa7WSwga7k8uZee+NrYqjC8pbVaS7Rxuo9rSd/AKOWfSN1sHRjFWizRhzpJnAxPkG4c0/TXw10AZVg3qz2eP0iT14cTKFap7NQyOobibZob72F968/O9+islkgZAZ31D6qN9ojs9GvGMWLlahCbQ98wGBGATfQi91W6zZMryJtGjv1/uzhTuHu5rNZrNZrNZrNZrNZrNZrNZrNZrNNIcAQa5LaR/J9VtI/k+q2kfyfVbSP5PqtpH8n1W0j+T6raR/J9VtI/k+q2kfyfVbSP5Pqtoz5PqhekbSoPh+vsIYX2tkTmPJxU8LLWyV73NOCE0jL+hGkGO8KzyRmrC31kY4owMtFWnOe7gf+lRTmT0jQCjI2toooPRnxTNeHCpRs8loMLg29rMCtElqnEdor6qZwz44L0eEmzR00hBFb/P4qbR2cttTThLe/kvSYp6mXx0bkDmoY4LY2Vsp1w0JznWV0bXtLSC7OpzR9Dpo72NDv7h/df7P/vd+q/Z/wDe79UY3CrSKEL9n/3u/VaOFt1nCvYJ5I6yDI1KM931pbdrXcm6eO9dyxIWmDfWXbla7k6SSGr3Zm8Vo6atKUTZI4aPbkbxV+eK86lPEUWQMutJrnXuHueCvxV4tANaUJXuZ0wencAaKrQDjTxLwtzpmhg75SuGO/BXaHoUaDGu/BEluI4HlVUuKmjdhniFVzSOixBGWavXhTjVVLh1QqQKqnKqyI5qocKDmnuGNP4prTmVdvCvBBtRXzVb7aeaxNFeQdTMVoq6PqmktNTuoVTHOmXssXAearWo5Yr3vlKx4VW/4Cqyf8pVNav4Ss1gUbzgFquB8u8e4dUtzpqq6KjWrl9EdZ51uCkF3GuBKHq3Ybk3OvAAolkVa8WpjG38+CaOf3R+icBeqTv8l4Ku/wCpu+i8OHIKUG+ScqA8FRgd/wC1eHNb3GorVXqV160+CqRx+CGDvBSgopab9UKpzqaBEuBrhwVCKVdVPdUg7gjhm8FAXciTVR6taNpRNNK3aKjga45CqbqEOpncQutd/RVLrhmcFW6bm7z9k/GKPFE6RtL+Y8le3Vrl9UQ1zeZIX4t25bM4b7v0WLgMa4u+ioeVeiHGuRXixvH+s0ca4/1v7x/duAoskNUYZKl0U8lTcqAUWAAVLop5LJZd8/8Azr//xAAqEAACAQIFAwQCAwEAAAAAAAABEQAhMUFRYXGRECChgbHB8dHwMFDhQP/aAAgBAQABPyFqyVnU/wCX3ve973ve973ve973h5Ak3SagEP8ATPe973ve973ve973ve973ve973ve973vAmRF5fvf3l6eX738FpxK9vECsBGnbaeKtvECsBGnbxpk1gKUvBmqGifbxpk1gKUvBmqEif8AxhmP2ILQ+wTzqH/Benl+93vP1HKaokLwqMyBgMsbjq8/UcoSSWSzEU1SNyBgssbjqQh4xEQS5PT5rxDtr7B1IQ8YiIJcno0DSxh219g78O3adLEOEo8v7yhUMcnpuxZGFVmhG52hGFExJ9CIoFiDAwh/YawAYJgjuvTy/e7tGxCSSSbmDZFbDoBoCAOZPNHpoWISSSTcyxccERC6o1gFhDNTL5o9N+obwhyMiyYEEJbBeGKAAElDClAK0IncYQr6o+gemvURCHIyLJhi2+pjrrP1rAINYuIV9UfQPfh27CrEcY9oOjicCGYaiCMAEehKBRFWLSElQWBZgpCWD6JMopw4w3JBszGCuMj23p5fvfwQQnDoCMqBdiIJAUDGMDc4rCTO5h1g+ZUC6ASjIe8tngdnDGVAtJKF/wDCqQp4RIN4JIBcmnQCUZD36YFIRjpWEzjICAQBUeOkEkAuTTvw7dgsbP4SzY3NIxZEHoP+YcWI2HxLCy6DrTUGQwgJYjsIWxmpAWV/yG6BuUNLwTQoby90qQalNEGB7b08v3u4RysQoS8hAcUEcYDIwGagSQaVirUnoI5WIUJeQgZiSkBBUkYFICHnFWpPS0MkpR9LLcYqq3znr6QsJDSwxEYo64dLQySgpKi3gk1RqYrHThyYHjCW5wYiMUdcO/Dt2AQVQGBJhMmgh1BQoEgUCBgdnHzjBBoJGxh8g4KgVg8IH5UHA+pqOh8+1hB6hX1hMOCJFgliv20XKOuZUZpQPY/Hbenl+935SGxhmqsxESUjCtGsYudOuShsYdqrMRiUjCtGsYvdOr8/2LhksbgQHKBE5KBhNkNeILgQeer8/wBi4ZLG4EBygROSgYTZDXiD4EHnvw7dhVDKpHv0IYZuVoaTACAFAG2VkZZPzFHtMgaMwSBiStlSX6ODGWwhKrB5KnPChQgDznDXvF3hZpmYBRQXEg0I27b08v3v6fDt2nShLjKPJ+84VCHNmjRaxgsOJVQcIF8iQmfJHERMkTg8IP8ATyamFAlFWx2jNC5gxCO29PL97+nw7fw0GPqfrnAQkYhIfFUMXC3gDBxoC6mUwETxDiowxKJI46DQ9q9PL97sP+03JuTcm5Nybk3JuTcm5Nybk3JuTcm5NybkYkho2fxGz+I2fxGz+I2fxGz+I2fxGz+I2fxGz+IjmjLXLsw7dn7T8z95+ZQLkAQPMo/RF6gYCCGLS9eLD0BHNTj9kAioQAqeZWTAkAM5wzWzIBL0l0Jx0BHbOAAAI2UM7bCET9p+YeAcohg/Trenl+9183QzSAJMlKEVQMFhR+qZxCfheSiaCjNYKcapO1IKFEnBJnf2IQhDFhN0KEGBcAwIoUEonBCJMBWI06AySxcRZBTGZk57wVYEg9jhYQZgzxB0LTZCt09SIPRQlzCcAiY8qmtCQsCbnaJhTKwFHnFrVFwiGlMUDgcc7wURbUURvg65Rj8Coa6EMKE+rDt2H/8AMjlA6ugrUiORgJACKggIxVQ0pvDgha2F8XwRqb4nRBZRBD3hT/ZhJluZDaAf8ABIIGwsigDabwQ4kUpDGt3AM1xrKDBtg7DYQ/8AGi5iGikQmWOxDenl+91tByPQ5CYYeDCDCFwCMTAKEhQNKxRASUJqFjSDVB72RPaTc/og6mr9ApXhDEqgYCtdoEIbDQnylRAojRVssYnBCdWRlCMGBQXFap1hqCBS2LKELjIAnIqjGzBs1gkUCEuSzIUIuMRVLLAw7IVUcCeIOiMEFhSzbDzHyCuJQebhp2hGXQiiyQYGqi8KFclkIA0YOV0E0dCjduD0EEoA2UJkBAIUJF/mCBMi9mBQIskb4wUFzUEF11NeFm8en5uuHbsAyIAkwFYB2B8mIoZeAvVRrmEwTECUYI4YqvnFABiyQShZscakRgoEWa65Y/ldEAAiWLAV106xBe0zqLTWD87cAR4PCCmIz2Hr7oYkMAyAzhtaceKw+wmYJdS9CVIKN9a/PYjqE1BNBNBNBNBNBNBNBNBNBNBNBNBNBNBNBNBNBGFFppOZpOZpOZpOZpOZpOZpOZpOZpOZpOZpJw93Zh27D+gqBsoOlYoqwFKmktKuCtag9ILgEtggMDGL0h1ZHCQKxjIAVgFzNKQ0Q3KMqgMoPQamkOezD5NnBQHQAyQ3SjMOCs1RSLtI+20AIdFuWMBAT1oUISWUW17L0u3f0+HbspPniaC8RoZLEAXGuAk5aAzGQwBhk/UzoWR3gcJFWNuoXvaU8Z1Bq/2A3EakAsvLB9HpZwNkkrffKESeCAEm4pvSExaW+A6QGPTud4oelYAwTFAL7rONRoRdmF6XbuwgKXM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nM0nMBCk5mwczYOZsHM2DmbBzNg5mwczYOZsHM2DmPI5gL37MO3ZeWKoCV4Y004Akz0j00QvciC/3XoyqmPMwrhWjSYGOBoX09YqnifFQN5YkgBrnZstLx5wKiCd7Wg+WaggDQhRE6ZJxFHCZUpR2PXKHjgngq5O8fm0BEP5dl6XbupKBTsAciAv1ALJi3YTAuWpo4w06nCAg2L6vK6SBBDBYPTxB0rgZJEFJYS5icCgATRfuxlEqWZeAwAGJwSNrURWGAGQI0iNSLWRRgodazD4Eouo/wAgIQ98ICw+uHbsFlk2MAV3S0Pw68iWZwOOAtYATMSzgcBnKxSFkB8LGTmKpBCutcIkZh5WCZjpg2VomGAqtI3igIleSwkOVGmrhbqkSoC6wJXICENAe5hEnYHouY1whvBLHTpFsIgDWhnuet6XbuuHfoYUgdUei6Mghk608UdjjsayZtQP8QmFzGIWddoKaLBIKCt6oQrBo6r4mGWIKCZFB4gmyDoarKkHCrsH4RZBDoYpYIBWGMaSg4jqoIQao3gIvlCKt0AQikMnufqVe7HcQJRWJCQy8BPEEWsQVYTV0JIMw2T2hFEVBIFXUVVzlMadVCphQHtAfPwgKb8XBPAMFB3wj/eYTQZhcKsIimEQBRhmK3UscwdZqR8Im6BQCAoNi7bDt2BkuHsNFaxNgF2JsIAbbOgN4hh5L0GjBruM/u2MOrVQVLbgrBBNbBRCNqErOkOky7zcRn7ElQwxT0j7S821FEBpDN1Y3hq9jhUjAyTi7JBok7VcGsCATrcLsvS7d1IYU0N/5QCgxfQCMXMQAQBW7r4g6CQFwAHC4u4KITARhoEqO3DFKoooEkFWQtAUAncBUwl0HOUt1w7dlHOiJL1gmeWkxQVBOKwZZhCJcBi8T+IiKSTUD2JfOWt0aZ2h9UsbGpaIuUxSbmWFGLLcQPzB8wBgaKIc1ixDKt7oQHDBLArFCz0MSRUaWiFOs0dfPxD0JhAG/wCnrel27sIBvN7mbnM3OZuczc5m5zNzmbnM3OZuczc5m5zNzmbnM3OZuczc5m5zF15i68mLryYuvJi68mLryYuvJi68mLryYuvJi68mLrzLdmHbsZ1uSwPLGpTVqAwgd5UggGovzLLMJZLBWhz2CrmfBBIxSUx6BYrx3kilBihAIec1KWFbyszAaTi8vSJHkcEakLGCpAzoJEgVxMGbTgnSDFm8W21D3AtakILgkEKQkZ1vMbKIF1vS7d2EgXm9xN7ib3E3uJvcTe4m9xN7ib3E3uJvcTe4m9xN7ib3E3uJvcTe4i68RdeDF14MXXgxdeDF14MXXgxdeDF14MXXgxdeDF14l+zDt2B1gDFhGCjVlAMAACgj1w+QvpDA2AQXqzEBKMhDwSGsDIKBkNGBm8CK9brpQ9R2Yh7EoZhYFkVRMryr8IQMRqoRRihuDYYRxUmhioUCAMcSRo9jLEMgrBVVvCAiOCpBCnW9Lt3UlBzU3/4yfVWAYn9In0ifSJ9In0ifSJ9In0ifSJ9In0iCkesEYZfrh27C+G/gwizbeALGDh/kR9Bg8FOAhCIrzKPzRhyRGthFKjFSa4Q9inNQPhBeoBVkCKE4wjollO5hsaoBwGlVqIpx5SWX+kdSMXEIHELA2igyNYGR5pQzSB7121h+Ot6XbuuHfoKuLSKKVgLxiAAiy8++scwWcIVKjxqABoqv11gS7heF64xGCgZAoTqMCxObpAQiAZQ0T10hssAyjNxGFrQAiqIIN6qBguEQqhP8QHMKu1BzA0wi8tpS0wZlBC8P20K6D9KhAARAQOiq+m8JbQJ6jkU4TANI/ZMUMxFayENr4j2PvKinFQFkhBZa6wRAEBqEZFXSIPPcud4WeFsBNNMjEkYhHZorXTKMd2QnXQjZDGJFAA9uaw7dgkm0BLOH4A6W5zSGxGTLIj1ghONAdFY9M2pUoF9YKJi3UBVe60eVfCQO0Arg0kpH6QKVr9TY+YjKJah3XfiGaqpzfcfQwGwAqFFuRHj7Vauh3i1PI4gzo9Y3MuLIIU9+t6XbuoOBXpeSM2ZwIKxG0sBYXI2tL9L8kWAj1Ieko5Y20dw6YnCAdAuJEOOY2IXmClt3J7QCK9vCABQIIkUhGGQFhCkogXM9E6GmIKgAAQoB1HKa8mEqtU/MJVw0Qt+t/MXh2htsLYRAQkAAWDQaELWVzNOqEn1EUICqJ87QkQNjeVPxFoQWwNGQnBGZC6mfMaAgVYe5S4wBBdcO3YB9AENtAJYeEipgyJAPsquEZ58mB0DMDgcCIQ+E3OUrWHFGoXshMWa4dkoLjR0teMgtlIVVAN4F4WIJQqEPdB0RMzCoZG8KWkzhD8S5ZAy8soFwIQ0hXKHpMLmitQHm/W9Lt3YQOhmk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4mk4iEYjcWIz1n3mPvMfeY+8x95j7zH3mPvMfeY+8x97hMJaIwSi/Z2Yduw87mBd4HtsAqxEwg00UIB3aSgxgDUFKCJABGaUZh3iJMzoINL+YuBLASThSXrB6o1G5cSsGYLNIh4K69XRBIxgNFXwWhGLZalEYp1/KRT3mqVIYNsApmyqNgz0XW9Lt39Ph27kELlppcdEBhULqH36UdvoyVqNQDW4HehWhonWwR7GBSYDVemPjxo3wZ5p2Fo+PGzXJgopIKKehlZJkNV67db0u3dnrNbBnaArAhEBb0lAyrgnakBYoiLzl2sMEWxsCR/iZ0yv0EFiTUApPugPlN/8obVEl9CJdtITq0JMcAiogXJJpugRCigBlY8xgLDM1eYRALQFgljjPwjIRAMGxN00Uhm8FSWIi4OAjEkAkioXE7hFkcgA0EYdV7M90asCchGouFHE4gTSFpAAAskQKVmcdegIBJgBdSPwDAERlsJTiLjIF6+OzDt3N6QVUoQLrEx+ErAIHSoPiGiCszaDQSwOZ7IThb/ilTaX+iUSVQVd4RACSaQuBQYGMaDdn23pdu7BoSt13SsCrbxYBlYKgtQHiEILAlKjbSA6BgXQV5hMCPVLlGExsRFB8oQKXGIhX1/dYTqAAMOMc1DQp1BSRxhupGtmB+Yk64PJoY0wiSUuOkrWGNoqsk1RRlKqqb3AjOEsJYGBEChgKiiCjgKdRtE5gIGX5fEJtUQ4P9cGNKEIkGTAyhKTciyKQB128nAAfKlrAWqqo8xoOk+gUgbxFHFW/wAwqY4FUNJZcqAb0P5iYORJFxaQKRaEDb3UJqgILb+QgrxA0hZOFn7wRQso2NZdmDbuQxgpUaDGkMcwFuxZxAtQOQqbfpTOHDJL1rEkIkE0BRHCh4igSQg7PwEwQwEKUVw+kFDJIWUBApgCLC7uf0wlIJNUadtEy+Jd/LtvS7d/WjkINAo64Z2hMIkORaFrOzRjABQlFxBkAo8rl0E4BmD1VBNcDRWwii0e0AAJQvftvQATZzU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8TU8Q5A/vYn//aAAwDAQACAAMAAAAQkPPPPPPPPPdOPPPPPPPPPPPPPPPPPP8A1PPPHHPJqdODdPIm/vPOPPN9eGndfPPFPPGdur9+tVik6Dl3PPKPOPqzQU2vPPFPPHOwrhldvWWvCj//ADyjz6/4NXELTzxTzzzzzzzzzzzzzzzzzyjzx89NHyHzzxTyggAwgwwQhjzDDjDjSjzzQgkiD3TzxSjDDACDCDBCCxzwxxhyjyxCxjBQyTzzzzjDDDDDDDDTzzzzzzyjzzhAAzRhTzzyhzxyThDTCSCBRhiATyjyhCgzTDwzzzzxDDDDDCCBCSwzzyzhyjyjAxihCyjzzzwQwwwwwwwxv33332vSjziyjjARTzzzyjSjxSxxRDjXjjCxjXyjyxjRTAjxzzzzywwwwwwwwx733333zyjyxCxjgjAzzzzyzhhhzAgSDTBCBShzyjzzzgixzjzzzDDDDDDDDDDDDDDDDDDDDDDBADCBDDDxzzzzzzzzzzzzzzzzzzzzzzzzzzzzzwD/xAApEQACAQMDAwQCAwEAAAAAAAAAAREhYZExUdEQIEFAcaGxgeFgcMHw/9oACAEDAQE/EEhQmyXGS4yXGS4yXGS4yXGS4yXGRNDbEpQmyXGS4yXGS4yXGS4yXGS4yXGS4yXGS4yXGS4yXGS4yXGS4yXGe3vNbo/lj2SjoYksIiE9agtIqKVc2j9iqT/DotoqGzQISV3PYYVS8j34tbCWK/ESS0jTTh97thHRl83uQpKe5HWTzhNXbkQmHkfP0haYTaoyppOu8Ds/B7bp0/7ceGa6MzjOGu1RMQ2gaINV3kZNtU+0QpUquNxLWo9SphNwvImjQapTSn84jvep6kIVQizIwwtfcTipOaH5JniV3wJbwFxHSas3H3pYZWS3SmiXSfLQVGXwUDz2oeoh1CyhqpVlitPCxU2SqUw67qvVPZYQyaRAhUWP3Il8hRIYb1H6x+kWGEwa+NQf9Fpib3+FJG9hckb2FyRvYXJG9hckb2FyKyNW379Tqez+n3fKX36lzyiwsLgsLC4LCwuCwsLgsLC4EtyowuP5X//EACkRAQACAQMDAgUFAAAAAAAAAAEAEWEhMUEQIFFAcWCRsdHwcIGhwfH/2gAIAQIBAT8QVdphJhJhJhJhJhJhJhJhIE2EV1SYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSYSPYA2mpCaanRQFp8oXRViH3segBv0IzbR6KU2y9xYhrY7lKWALU8odsxV6QlQqDfY9Suy2gKH2jGbgy2aXLO0rQrn3K0jrtiv5/yJZON255iU8kZBwR/V+fOOt/u4j2hABzEiqhuYw2ZNv1jrixW9iDhFajk1OnJe2p2PUatjFzfeWZtiCUyplhs/eAN+q/x4mvt3eLduI6JnAv6xL0YzCz2uGkl/sfaak357UsOI9+PRSlrgUtjS6QqDbsfTKWk4DSWg2h941FNS4/Q27H1AFRqL7ytrNfH6FrRL8JfhL8JfhL8IoLr1Ozu3PUpcpKSkpKSnxX/AP/EACoQAQABAwIEBwEBAQEBAAAAAAERACExQWFRkdHwECBxgaGx8cHhMFBA/9oACAEBAAE/EE44EytX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNIAiQBPrVo7RCWPWvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNfma/M1+Zr8zX5mvzNCxJGnj/7rL6f3/xZFe1rflQ0CTdH8reOSk8pXty35UJAk3R/K3vkpPKPLMSDl6GWoXn3M5pFH2zQj48o8uxIOXoZah+fczmkVt+Yj4/4STGv/Msjal9qmLRxf9ohRzKP0/4fT+/+DJEB3wb1uQ9VatQHAl5UL2S19eNNVDBvs28XYHfBvSpSZVlaQCUmBizQPZLX140lUMG+zbxDfbAX9Bvvp64dsEplXdoFQCVwFBTHhYHBNT1pIECHjYbPx4hvtgL+g3309cO2CVyru+AsUzK2xMJ60mCBDxsNn4+/M/I/nlMtoN4HdxXHd1SlYsWhdnHg8hbRDyqVNoa79DfLpGudvjE+74G9omGT3qfxIVi4z/V96kHuayeb6f352Qo6yTx0pGlSVdWtYhO6Gvgp0RcTr3vTEML2D4AjrJPHSmaVJV1aRC61WHzUBQScWvOmAJmWD3pJiF7B7nwJuJUHXQc4p9ySMq3WrlWsC43wb60EuJQa2NXA41q1U4i+5kQlGaAd9oeWfbwJuFEOroc4p9zSMq3WowEXgkxZbbl4QXOBYQuBLpryozQDvtDyz7ed+R/PIiapLrg4H9oKCScwlo50bNJbA2Lzz8J6AJyAy0v6N6QkFIjN/S9TGXnQTUh41Y4vSrVoUmLV2aBmnregLPjJi8Z4lWpw/YHl+n9+dkVMzA/J4P3MLvFy+AWQKRfRYoIMlA8AomYH5PAqK6BKDSNalUWfWAB8FMyYcmHoNqCDJQPAnnMlibBX4ot5I1i4D8UCk4SooXCYs40ihlBqQybsyYvm9EkiZsbL7ykYtWJOkDWfAnzmxoFfjwSRMKCQ5RNtKNKWKXWPaoGBkF0jRSsSdIGs+d+R/PJBSkY8YUc4plmjqN5mONNto5DynEK+jnSewZKO92aBoiIbNm5RIMb08OXzNAqUWlGjp+OKqQTbgGvjOX8oKgI8EoGZKFqa/YUZBBWNvQpcn3ElIzw0+PL9P787LKOl70VULHrvUmONikRpFKWBrteV/iscppEM2zSoFwbfQ74eGVdL3ouoWPXelaOK1vx0xR0LeGANnM0GIJJoYincLg2+h3w8DFn0ISKOFhZxJomyXoo8g2jMSJIWyTQxbMDn0EAe1ZBirocA0KWZKaaGHO/oPgas+hCRUHxUow0TZL1F0G6w1jHtT9puVu5Yxq6Vf9enXGzxpZk5Gs6HO/oPnfkfzyNodA0Rs0joRZU4Zz6UeoGVLcttZmjtqpbYc08JIZOA/qajhVRkWGPmK1oZozCLgIWEb5tcKImIrC8Uta6PCYpQFUAyrAU1b4QGlIhHudjFYKnlFnSaIxxRA2jJSZW0qbMAXg3Tvp5fp/f/AAZHFYn+LtS4UNOSiMM8AogrqDf2KNQBlcrxfEIrE/xdqTChpyUQhngFEldYb+xRiALq5Xi+IBQEATbgNT6+zoVpr+5j3itl+kta0NQEbZc4Ky2QrdWqvHxBKAgCbcBqfX2dCtNf3Me8Vsv0lrWhqAjbJ94rJZCt1aq8fO/I/nkRJGBroYHtnwdWmkMr26VnQCiSJGZYanU1l3LocWFGYJ1oXYgF9xmHlVtiPoAIOECWbTPEVJYkSmFUIDPtVg87IoSGKnVhTPuyXbE660ZxDAWbDOJTAfV2TRUlJ3L2B5lX4J4gSDors8dKGQePHyfT+/8AyGT8j+eUy3g2hdzFcY2Z0UpFy8DsYqzYpYAEwOyKe9BpqBwoyNIECMuBYk19SmduREiDxG5SIamKIlUreSSwNjLTpa0mLmR+aVb4G/wPYg9q4WZfTy/T+/8AyGT8j+f8beSQQiOAwPW/BKbHkkAGsRI/FRKyNkvKrXHK1Ma6WiYLct4fQ51F5gAB40fh2pUU4wF4hGWD0Wlu0PFTHl+n9+VkipCDV/Knog6VP+I6VP8AiOlT/iOlT/iOlT/iOlT/AIjpU/4jpU/4jpU/4jpU/wCI6VP+I6VP+I6VP+I6VP8AiOlT/iOlT/iOlT/iOlS5EA4N9tq/B6K/B6K/B6K/B6K/B6K/B6K/B6K/B6K/B6K/B6Kjx7wdKCAAuBh8j8j+eao0eukrCJgUTamdCIiOCSCdJoAgokRs0IglHCXZGWNYpUamwRR4RQHSHVSwAZO1XvDSG4KYCYKn1OG2Coli5zoplSUWYJVA01p4KMfAJYV0jNK7GF2zcUS0eFREFSCgMKkmEY3PH6f35GTSBlRQQQYqRqRREBZ+KKnmZaes66ejRLBMJoGJzh/tJhyGCCTwnFXkxgDBEjSLsSlobn+HvSiRCZzYnR4UgWKQISeE1f2cQHo41jqUanrFATdGYtW/KsdahF6NCJIycaG8kkIN+FIzNiAJ9qTkHKzonGaemDIhB4TWjD4Scyu0b+EIzPqQkBMwyjZtUSKTcRa5nL7UAIiIRXBBo8TE0o/kBDI1BwmlGhQMGUTEZt6VJVQEEVdyjSkseajFCicZSDdpuEQgkE2EWRDl0ahswrQcTIWkh99aLk0DLDTAucPr4vyP55IhfPEEpeNoqdhdKEq8WtahSKdnrhuvA41PWAFHYFcKt6XYuFYZbERFSkP2K0SkTA2Ymk0KXWhhHqaL1DDxC7NhcqEaBaiVaoJUl5nSlMA1BULgSsGaKRAcSoLSOAYije4TTsILiANb0nt5UCw3005VaRLEARk38mr6f35GR94fz++AtKckWsDzSiTAksCQboacdabpiCgoYJZm+tt6XIOwIbhSm8w8Kn5h0GjQXABzRCLgl7j8Uu8iBRkJ8oaatRyuvZSOI40VzgkEFURFmfik0qsGORgwgvNF4qwkLy0LrHChWYirEw6ce9/WkzAgEpCJR9lHOAwBFJFNKtbCCm8NpH0Kx2ADkEm8zeMaUgmSjKSVbKRDBrTfA9SIJ5jXaN/ByEZiRSiNrNjibzYVIux6BZHCsSetOaBCuyFgQuWW4Uc54QAC4g3EuU5twCcGtxicPWmIl4EQZtSUjXNFRyZGpC0qwGIjcqC6EmWVAJBhhMZpmQkQSAJguS2IzegYOO6OMg50sEuKwvGeZnxfkfzyTrFbpPG+GgvfHCTpfBUj/wBN0ArRKBxp9RyhlUtQkC96eNBDk8aWYM6lO/J4dXFqcKESoVcEhu3A40dnvYKZQ0nR2oAugTZjgFz2VhTT4um4gg2ank6CDKZtpo9jQ3DHgcTSly4KUyIBEmeZMcGgN3UgHh7FDHipEOYTEjy8fp/dTNAIKlKUAytPFBESRzTYI6CXfetq9Wv2K/Yr9iv2K/Yr9iv2K/Yr9iv2K/Yr9iv2K/Yr9iv2K/YozoENfWvz1fnq/PV+er89X56vz1fnq/PV+erhp6M1e1HUnP8AjyPyP55CKMsWWykAzamtGeAQCC+YKVpGAjgHGIJCelaI7oAuFWmJkE1Ou8vIYLmC0HGob7hnJCmgLZq7tFZ4ilEFS8Rap2fTobAWQlomKy0TBFOQd4ofmQ72YUglyQRSjmMrlCFtdYqEsbEuBTkc3cag1jRQi2OLNRHHjgpGWJLnk+n913Gx/wCO/I/nkzCTuPICNGeNOIZ9kJl3GTBDeiG5ITIlJEE2tU5jCzKzcEBZyTReOsSrxMJu9FSUW6WgghIwsWNKwwbdAVaAq+m1F+YmoQSKWiM70nRJ+UIIpCEl9UpBLNA5IEhLk1DQ+WISfMNl3ioQeD3gnJIzBWzSXYYwwZhVkaYoHIJAsMw4zCt58n0/uu42PI7Y8Ar/AEP8V2HpXYeldh6V2HpXYeldh6V2HpXYeldh6V2HpXYeldh6V2HpXYeldh6V2HpXYelKhIA942qf9/pU/wC/0qf9/pU/7/Sp/wB/pU/7/Sp/3+lT/v8ASp/3+lT/AL/Socp6f4oUlwZHPkfkfzyTeQmmgos3aAy9iFJErAveG1A4ILCMJkIWH2o7CxsBcN27iogmJyxFXfRK0rFxRkFzwNIN6keILZkst2hG9MIQpFLSMrMH0Ulio9VMSxApvQjsL4RcbhnOlQemFLAwBfTE4ojZdpAyBZFrNKC/8dAl4CjCuVcctuIkYYhDy8n0/uu42PF2TLY9aEPt4+SPY5UTB45/BlEXGH5PFQFcFMoVhcJmDJwvSRYAUldjNCqQFGGYTJ4LBLigx4xDe0/RQMwJEZE8O0b+F0DTaEzmpspyDKMxGad6YNUop6cR4UOdsqMWzbjYmmr1AEV4ZoIGIESrADq1cRSSpJGE50muKAkiATGBS/vipx4zAfQoVASYBMBAxBOTnUaSwuqi8JMeL8j+eRkAgYaleCQpfFWA/F2hqJvxV1mmDAoSxGrUN80/lIx0YtJdowFcS5IHKgJqWqaJCwEUKJlAEVD3SYKIs5MrUNkmbtjCWQ2m01dryUUuGLSETdrPiMzyYokAjFiaQTOawDUJcASU2l7j3EpCPBEotfMfHSTTrIRTes9gKLY6og9ayHCcBxi7Nzbx+n913Gx44vQ/h8Ebw0votLtJ60AomGSkJgCxE3Jxlir2YmNJMrVvfb2rKVNsQRs20XzS1dJMJW26MG2KeAK1rbJQ6OcTRGuKilRmvdpyqC5UmGysSGLUGnSRgvZikQzDxpkzMn1D7qTIpmc7QXL4IoGmbRLaUS8D6xSiwoFmUXhbWc71M5Ezha8BLkxximSJJ1kIHGbq+lCkxhtLByFzqItcRAEm28tSUuMsgkiW7da7RvSLIKkKQa3L0URiynVgzZtBLEgsU5gDbFgrCBQ0NrtMDRippu2SLjMM0NjongwSkPIrv3Gi+E8yYVI2vq5cEozEmUxco5Vi6AYskIC65KBvAGATHUsgslgvFK93MkOTLuTPA8NTRVOfi/I/nkU1+QAJoEG4xe9IAM5xrbMFjFByWQOiYuwimdagayYBmguWIzaaDARpZMMIUxVekRmVAzsBc3ioJnrCUhdpxnTFMKLF8S8uIOGuaOQTqDMTRzCy5pkVr4FgKWYG0RTvUXBARhDIPKggMybGbiVB62q7Z+kzINi5e01L/PkWEi10mZ8n0/uu42PE3WtSjh+3p/1OSAAvqMngu5nIYYT+1HEQVOYI/nj2jekEhJGigNBJ6gL02CJRCfQtQPbklDgOTL5EEhJGuUZMERGIjSiCYQAkBkjhDRHTg0Ddy4q5e+o7XoAAWCx4vyP55CGuLBONSKMLYqUPJtEkglsTmgeLBsYEFpWIm3GjLLGCUrESXdFqfYssasoZQohtSyQyKWGrJJIXialJpgE5hIS2mahtrjMQu0OitsU5HmUZFY4FsM0PuUgQtmSWVmlOGWFIpahAstopoWUyQlgxAqYmjhyOJgkI+QzRTgky3xtYLvSj3aggEFLhoOfj9P7ruNjyAwBN62vYq7D612H1rsPrXYfWuw+tdh9a7D612H1rsPrXYfWuw+tdh9a7D612H1rsPrXYfWuw+tBskH19a3O9vW53t63O9vW53t63O9vW53t63O9vW53t63O9vW53t64svVNACAA4HkfkfzyYUZGmS2GGWzNKQPapzGQgyWHFGzNgWpNwQEp404qCPRSCFjvNKBhzAOcxYSX2q/HKWQxQEuzaBp+4s8BWRaUQzTcvE+Gca4W2tqSB2KjUJYmj8JoGc4ZOxpZJd0pMURJCLCwb8aZFfBWArgGWiylCMUBZmS9FQTpSPIkSGWyUheGQyvGDWx4/T+67jY8gEoDet72Ku4+ldx9K7j6V3H0ruPpXcfSu4+ldx9K7j6V3H0ruPpXcfSu4+ldx9K7j6V3H0ruPpQ7BJN/StjvbVsd7atjvbVsd7atjvbVsd7atjvbVsd7atjvbVsd7auLD1RQgkROJ5H5H88igmCYJtJm2tqWqvjkgiXAZpCYiChQsNJ43oQj5kVhZUuJtNL6YkFEEQiVza1ITiZEmENZJs6U4EKZJCUiQEazV4f0MkERZZfmrRxpxIkUFhqmKsYohrNcsIW1ockVCT0gmCRZagcqwSoBB65ozUEhdYLxsulIdovNycgKIvtTi2EbUIm4s7+P0/uu42PEnWlQrl+np/wDHYkERIS4712H/ACuw/wCV2H/K7D/ldh/yuw/5XYf8rsP+V2H/ACuw/wCV2H/KhnjrMNkLUIBGRueL8j+eSXRNL8y3IjotRbPWdImgLMb1le+obdJVjWyUb7QEr326Ii0TSYxj8SMy+MnrQRuHkl99kLTJNBGG01AOL8Z80px7GUqBgCXdLVHHt9tq3JQQ11qzs2cpDJNIZmrHggOAoiFmw+ylwpKQ+BI3aCu9T8YelUkunN16L0NKs2DIuXeFM7woGoQMFuDd8fp/ddxseOJ0f4fBeSHB9uA3UKagjQSAi6iTnBbdpLIV1KEy5N16JWMzFDQKybjFCNwYBsXLoiFrztUw84plSBVpDk4VjyNJBlwzZkLxUuK41INQ9xeKnFMEzqHVs+aQIVRlxAOJK7OdmrTw6cRkZgiS0NSuMUKbIs3ytGtSNCUggLRky5+KeA2EqZYOw3aGSYF4GFdJ46KnyNCgG9tJ9077ydsjWDBK1X0EDiweLcQUGY4vM1yEzBYi8t5ycKBTdAtiYYzFmosOUIKQLLIwg2WcVCAWqJKGW5KGEaE0hEkrm0LmxklvdBtUoLdMzGbkm7k50FBclAlSE2gxq8KEZsAGQkwUyYW9Cs46fipuRnH8oMKEBIFtFNOPhy0NBQ5vi/I/nkEkYoDAqS4RNquAyVMSAUGrFKYTwORMWMAS96H5JcLCmSR80+LlWVYSgMynaogWnfHScFk2moVMUTCEAQm29CFxeRSOs2VqnzpwknIWCxhUsFuQhMF0gNuSrsOHNhCBmQjhR9V7rEb5MBNTJOMiQXIyTU1ptHXlAmiOKanmBG2oQNxTv4/T+67jY8XYM5PWlDg6nDwhAIFCQgyMGs89aIIQwKt0SfBX1IBKRdwOlL3Yju3EQ/BSFRCBJIywmD2KeUrlW91vlqVRmghlJIMMb1hzlTZZl+WjoQwZhFKMNyXDWbbFUsRN0TGsUMFNXOBcoTAvEKCyulDCJGUsU0QhpjYo3PWkVE5DLAfQeAl0lCUTkkRjagZAIAwHi2/YkENyTQewjJeoSiL0MRdi8+iiTb8mLEyDdC8TRiKthAxIyCUTJZKJAlFCqyiBv61Cu4JECi4JRXRWYX1G2bKWoVCXhRizD6axNaSr4bbUvDWkXUQqV3agESUZri+AjxfkfzyNi9mBTo7HGk6bHRIwZs8aie/nmSqwnKXKRIdYyZJgEelCBkElGJCQF9kKL/Q68LkFDjNAMzSBRla9mParrdvpbIeC+I40uV10YsQ0ITFMS1ylgyQEIIkrWdHBnAOFmmeDYiJQyrq94ohIBNKMBsYZ40fpzZIBKWIub5ohiHKYhKrk+yPH6f3XcbHkdmXiFf6H+q7D1rsPWuw9a7D1rsPWuw9a7D1rsPWuw9a7D1rsPWuw9a7D1rsPWuw9a7D1rsPWpd3xmxkBo9dP+YMGDBgwYMGDBrlj9KYwksWGQVBfg8j8j+eRsjH0iQsJxmns4fYSrKza9MRKBpiEuemslDAmsSLjkJM24UDIHo0jbHENKeYCKbmEnE5Tis/6O0EYaqcqsSSkmAWA4/FabdpwhDIhLsTQoA56IhKSBi9ooc4boQpkHIkUWY0hkdyUgi8BSlvReBmSy3ViMU4QIdqXWYQYOFLfbIXMulnxfp/ddxsf+O/I/nlcBZKyQ68gSkJIyW8HJo0nIuWUvz4T6W8uZsCx2qOKDNAzk1GYmoPtDtEJxTgzUCcWTAZILGmYnetZpCCIwIY0K+dU02TnGua1mkIIjCjnUqCa1qwqEAZWp6k3OYCy1wOXj9P7ruNjyGEzKoRtibVASTMbTmsHRSZg3JjOgm9YG8W6EJGZf4acUVUwJRPIRolGpx5YIQZn2+KCMATSRYWBMwM5pMCQuTjfi9KQJuGWFIExm1ADdkW0zHs3xR8TQhcUS1WigQCBAQ1EItbFKiQCCtiBCNxym9IO8YING8Is5TFEE4sIYCsQpxUPrzxCwSFIzrpXt9tbM4o1PyAA4jN6YDygmezjU6zIWEAgZte+UxV1gz4lJZUw5DFXL2GJ6nSgZy4NFAkPqxQGXMJc9TvgpAKYwQ7sZpgngBCKSe3zTMwyMUxMTOYpufYOLzGu2tGhJARIQRM7xNOUpABFuTEsU9o0sUjESDRc6Oy20gPUgc7X9KYFfglRLwEXmeHkfkfzzateoCYGL5slRW3xxHeDGaJpIARJbF2BUEFQAWBqx3nhQcYh+sNC3fKRxWbUFIJABanF9G9IqmQjHBDrM6UtAEBtM+1m9B0MVIb8DX2r0NQw9Y8v0/uu42PIcsSgRwLiCnAtxpUUx2u9YKc1PUjpAjNUt5mPWmaU2VZUuzujeoOwZRCSWbIWhmGaCiORJWFUmRmQ1pnuIimWQirfYbWRQhn9z2KuCLsiFFRNNUcIoJMwQz9NTLTUExZGtpJWMxEQSDTRclLCAiF5K20JaHdzS0JvnuDXaZsNXc8ipOA0oNoZ+6eaNlA3BDuTFJeIdOAYgAgu41peMBDJhIliR4xii8gvcMjTknFqn4B4okyKcM54PShQYwXIUy7qT63elQGxNx1WJaWZiKicI4OEvq0YxCxdchTChgIgVuUVFLnUpezCckwv5Q0scRiAjaZmwxQtctwKF10NEb606GRorgWJTEMxS2AigFpcJrQTCoGIQvFpoe8kG+qYlA44PWmCJiKki5LjqMS00VlC1ICWQgt6q5PIjNpL+eYLSEEskyEplxiMzV+5FsJEBKMhl0pRGJoZAyJRqeik/CIk1gUdJYtBFr02BwHrpYRjBdJwimpHaZYSI1TDFRdNIFTYTJta73pECk6jpsHFuTwm5Qjyeq5GbPMZNlPf8Tvo4D9CWhjJTlegbO7o+3l+n913Gx/5ql+ZQgvG1KlWrKRdiJ5WrPCklfTwrTiJEnjHG9BRloNo4RwqFP3hDkUi33KP3IzQZKSIBcTFSN6SkM8HpRCxksgm+fo5UoAKlBliL+weX6f3Qw0mRZ4Fb7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mrfc1b7mpiFWLQ8ay/9zKv/9k=" alt="示例"><div class="color-gray">输入通用代码(暂只支持腾讯视频)</div><input type="text" class="form-control text-center" placeholder="通用代码" ng-model="netWorkurl"><div><button class="btn btn-default" type="button" ng-click="fetchNetwork()">提取</button></div></form></div><div class="material-pager text-right" ng-bind-html="pager" ng-show="index!=2"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" data-dismiss="modal">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div></div></div>'), e.put("directive-voice-voice.html", '<div class="modal-dialog modal-lg modal-material" ng-controller="we7resource-voice-controller as vctrl"><div class="modal-content"><we7-resource-voice is-wechat="isWechat" show-type="3"></we7-resource-voice></div></div>'), e.put("widget-musicform-musicform.html", '<div class="modal-body material-content clearfix"><div id="music" class="material-body we7-form"><form action="" method="post" class="form-horizontal"><div class="form-group"><label class="col-sm-2 control-label">音乐标题</label><div class="col-sm-10"><input type="text" class="form-control" placeholder="添加音乐消息的标题" ng-model="$ctrl.music.title"></div></div><div class="form-group"><label class="col-sm-2 control-label">选择音乐</label><div class="col-sm-10"><div class="input-group"><input type="text" class="form-control" readonly ng-model="$ctrl.music.url"> <span class="input-group-btn"><button class="btn btn-default" type="button" ng-click="$ctrl.selectVoice()">选择媒体文件</button></span></div><div class="help-block">选择上传的音频文件或直接输入URL地址,常用格式:mp3</div></div></div><div class="form-group"><label class="col-sm-2 control-label">高品质链接</label><div class="col-sm-10"><input type="text" class="form-control" ng-model="$ctrl.music.HQUrl"><div class="help-block">没有高品质音乐链接,请留空。高质量音乐链接,WIFI环境优先使用该链接播放音乐</div></div></div><div class="form-group"><label class="col-sm-2 control-label">描述</label><div class="col-sm-10"><input type="text" class="form-control" ng-model="$ctrl.music.description"><div class="help-block">描述内容将出现在音乐名称下方,建议控制在20个汉字以内最佳</div></div></div></form></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-click="$ctrl.ok()">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div>'), e.put("widget-upload-upload.html", '<label for="we7resourceFile" class="btn btn-primary">{{$ctrl.name}}</label><input type="file" id="we7resourceFile" multiple name="file" accept="{{$ctrl.accept}}" style="display: none"><div class="progress-uploader row" ng-repeat="(key, value) in $ctrl.files" ng-show="uploading" style="z-index: 9900"><div class="col-sm-3 text-over">{{value.name}}</div><div class="col-sm-2 color-gray">({{value.filesize}}KB)</div><div class="col-sm-7"><div class="progress"><div class="progress-bar" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: {{value.progress}}%"></div></div></div></div>'), e.put("widget-voice-voice.html", '<div class="modal-header"><h4 class="modal-title" id="myModalLabel4">音乐</h4><div class="material-nav"><a href="javascript:;" ng-class="{true:\'active\',false:\'\'}[index==0]" ng-show="showWx()" ng-click="setIndex(0)">平台</a> <a href="javascript:;" ng-class="{true:\'active\',false:\'\'}[index == 1]" ng-show="showLocal()" ng-click="setIndex(1)">本地服务器</a></div><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button></div><div class="modal-body material-content clearfix"><div class="material-head"><form action="" method="get" class="form-horizontal clearfix form-inline" role="form"><div class="pull-right btn-uploader" style="z-index: 10"><we7-uploader-btn upload-url="uploadurl" on-uploaded="uploaded()" on-upload-error="uploaderror(mes)" name="uploadname" accept="accept"></we7-uploader-btn></div></form></div><div id="voice" class="material-body voice-content"><div class="row"><div class="col-sm-3" ng-repeat="(key, value) in $ctrl.voices" ng-click="$ctrl.itemClick(value)"><div class="item" ng-class="{true:\'active\',false:\'\'}[value.selected]"><img src="/web/resource/images/icon-voice.png" alt="" class="icon"><div class="time">创建于:{{ $ctrl.timeToDate(value.createtime) | date:\'yyyy-MM-dd HH:mm\' }}</div><div class="name">{{$ctrl.getTitle(value)}}</div><div class="mask"><span class="wi wi-right"></span></div><div class="del" ng-click="delItem(value,$event)"><span class="wi wi-delete2"></span></div></div></div></div></div><div class="material-pager text-right" ng-bind-html="$ctrl.pager"></div></div><div class="modal-footer"><button type="button" class="btn btn-primary" ng-show="$ctrl.multiple">确定</button> <button type="button" class="btn btn-default" data-dismiss="modal">取消</button></div>'), e.put("directive-multipage-multipage.html", '<div class="page-navigator"><div class="top-title">页面</div><div class="page-list"><ul><li class="page-menu" ng-repeat="page in allPages track by $index" ng-click="navToPage($index)" ng-init="" ng-class="{\'current\' : page.num-1 == $index}"><div class="page-thumb-block" ng-class="{active : page.active}"><div class="page-thumb"><div class="page-thumb-con"></div></div><div class="page-menu-title" ng-bind="{{$index+1}}"></div><div class="icon icon-remove" ng-click="removePage($index);"><span class="fa fa-trash"></span></div><div class="icon icon-copy" ng-click="copyPage($index, $event);" ng-if="isMultiPage"><span class="fa fa-copy"></span></div></div></li></ul></div><div class="add-blank-page" ng-click="insertPage();" ng-if="isMultiPage">+</div><div class="template hidden"><ul class="nav nav-tabs nav-justified"><li class="active"><a href="#">普通版式</a></li><li><a href="#">统计版式</a></li><li><a href="#">特效版式</a></li></ul><div class="template-area"><div class="template-item"><div class="add-icon"><span class="fa fa-plus-circle"></span></div><div class="text">空白页</div></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div></div></div></div>'), e.put("widget-cardactivity-display.html", '<div ng-controller="CardActivityCtrl"><div class="nav-container" ng-if="module.params.discount_type != 0 && module.params.discount_style == 1"><div class="list-group"><div class="list-group-item"><a href="#">优惠说明 <span class="pull-right"><i class="fa fa-angle-right"></i></span></a></div></div></div><div class="app-richText" ng-if="module.params.discount_type != 0 && module.params.discount_style == 2" ng-style="{\'background-color\' : module.params.bgColor}"><div class="inner" ng-bind-html="module.params.content" ng-if="module.params.content"></div><div class="inner js-default-content" ng-if="!module.params.content"><p>点此编辑『富文本』内容 ——&gt;</p><p>你可以对文字进行 <strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline">下划线</span>、 <span style="text-decoration: line-through">删除线</span>、文字<span style="color: rgb(0, 176, 240)">颜色</span>、 <span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255)">背景色</span>、 以及字号<span style="font-size: 20px">大</span><span style="font-size: 14px">小</span>等简单排版操作。</p><p>还可以在这里加入表格了</p><table class="table-bordered"><tbody><tr><td>中奖客户</td><td>发放奖品</td><td>备注</td></tr><tr><td>猪猪</td><td>内测码</td><td><em><span class="red">已经发放</span></em></td></tr><tr><td>大麦</td><td>积分</td><td><a href="#" target="_blank">领取地址</a></td></tr></tbody></table><p style="text-align: left"><span style="text-align: left">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span></p></div></div></div>'), e.put("widget-cardactivity-editor.html", '<div ng-controller="CardActivityCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><ul class="nav nav-tabs" style="margin:10px 15px 0 15px"><li ng-class="{\'active\' : activeItem.id == \'cardBasic\'}"><a href="javascript:;" ng-click="editItem(\'cardBasic\');">基本设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardActivity\'}"><a href="javascript:;" ng-click="editItem(\'cardActivity\');">消费优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardRecharge\'}"><a href="javascript:;" ng-click="editItem(\'cardRecharge\');">充值优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardNums\'}"><a href="javascript:;" ng-click="editItem(\'cardNums\');">计次设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardTimes\'}"><a href="javascript:;" ng-click="editItem(\'cardTimes\');">计时设置</a></li></ul><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">付款返积分比率</label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon">每消费 1 元赠送</span> <input type="text" ng-model="activeItem.params.grant_rate" class="form-control"> <span class="input-group-addon">积分</span></div><div class="help-block">设置消费返积分的比率.如果开启了充值优惠设置,请到充值优惠设置中->设置消费是否返还积分的开关.</div><div class="help-block"><strong class="text-danger">例:兑换比率:1元返10积分,那用户每消费1元,将得到10积分.</strong></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">优惠设置</label><div class="col-sm-9 col-xs-12"><input type="radio" value="0" ng-model="activeItem.params.discount_type" id="discount_type1"><label class="radio-inline" for="discount_type1">不开启</label><input type="radio" value="1" ng-model="activeItem.params.discount_type" id="discount_type2"><label class="radio-inline" for="discount_type2">使用满减功能</label><input type="radio" value="2" ng-model="activeItem.params.discount_type" id="discount_type3"><label class="radio-inline" for="discount_type3">使用折扣功能</label></div></div><div class="form-group" ng-show="activeItem.params.discount_type == 1" ng-repeat="discount in activeItem.params.discounts"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon">{{discount.title}}</span> <span class="input-group-addon">满</span> <input type="hidden" ng-model="discount.groupid"> <input type="text" class="form-control" ng-model="discount.condition_1"> <span class="input-group-addon">元</span> <span class="input-group-addon">减</span> <input type="text" class="form-control" ng-model="discount.discount_1"> <span class="input-group-addon">元</span></div></div></div><div class="form-group" ng-show="activeItem.params.discount_type == 2" ng-repeat="discount in activeItem.params.discounts"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon">{{discount.title}}</span> <span class="input-group-addon">满</span> <input type="hidden" ng-model="discount.groupid"> <input type="text" class="form-control" ng-model="discount.condition_2"> <span class="input-group-addon">元</span> <span class="input-group-addon">打</span> <input type="text" class="form-control" ng-model="discount.discount_2"> <span class="input-group-addon">折</span></div></div></div><div class="form-group" ng-show="activeItem.params.discount_type != 0"><label class="col-xs-12 col-sm-3 col-md-2 control-label">样式设置</label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" value="1" ng-model="activeItem.params.discount_style"> 系统默认</label><label class="radio-inline"><input type="radio" value="2" ng-model="activeItem.params.discount_style"> 自定义</label></div></div><div class="form-group" ng-show="activeItem.params.discount_type != 0 && activeItem.params.discount_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.bgColor" we7-my-default-color="\'#ffffff\'"></div></div></div></div><div class="form-group" ng-show="activeItem.params.discount_type != 0 && activeItem.params.discount_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div we7-editor we7-my-value="activeItem.params.content"></div></div></div></div></div></div></div></div>'), e.put("widget-cardbasic-display.html", '<div ng-controller="CardBasicCtrl"><div class="title"><h1><span>会员卡</span></h1></div><div class="card"><div class="card-panel"><div class="card-logo"><img src="" ng-if="module.params.logo" ng-src="{{module.params.logo}}"></div><img class="card-bg" src="" ng-if="module.params.background.image" ng-src="{{module.params.background.image}}"><div class="card-grade" ng-if="module.params.card_level.type == \'1\'" ng-style="{\'color\' : module.params.color.rank}">默认会员组</div><div class="card-info"><div class="text-center" ng-if="module.params.card_label.type == \'1\'"><span class="card-rank" ng-style="{\'color\' : module.params.color.title}" ng-bind="module.params.card_label.title"></span></div><div class="card-no text-right" ng-if="!module.params.format_type" ng-style="{\'color\' : module.params.color.number}" ng-bind="module.params.format">会员卡号:<span>{$setting[\'format\']}</span></div></div></div></div><div class="btn-manage clearfix"><a href="javascript:;" class="recharge"><img ng-src="{{recharge_src}}" alt=""> <span>充值</span></a> <a href="javascript:;" class="payment"><img ng-src="{{scanpay_src}}" alt=""> <span>付款</span></a></div><div class="list-group"><div class="list-group-item"><a href="#">我的余额 <span class="pull-right">0.00 <i class="fa fa-angle-right"></i></span></a></div><div class="list-group-item"><a href="#">我的积分 <span class="pull-right">0.00 <i class="fa fa-angle-right"></i></span></a></div><div class="list-group-item"><a href="#">我的卡券 <span class="pull-right">0张 <i class="fa fa-angle-right"></i></span></a></div></div><div class="list-group"><div class="list-group-item"><a href="#">消息 <span class="pull-right"><i class="fa fa-angle-right"></i></span></a></div></div><div class="list-group"><div class="list-group-item"><a href="#">个人信息 <span class="pull-right"><i class="fa fa-angle-right"></i></span></a></div><div class="list-group-item"><a href="#">账单 <span class="pull-right"><i class="fa fa-angle-right"></i></span></a></div></div></div>'), e.put("widget-cardbasic-editor.html", '<div ng-controller="CardBasicCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><ul class="nav nav-tabs" style="margin:10px 15px 0 15px"><li ng-class="{\'active\' : activeItem.id == \'cardBasic\'}"><a href="javascript:;" ng-click="editItem(\'cardBasic\');">基本设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardActivity\'}"><a href="javascript:;" ng-click="editItem(\'cardActivity\');">消费优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardRecharge\'}"><a href="javascript:;" ng-click="editItem(\'cardRecharge\');">充值优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardNums\'}"><a href="javascript:;" ng-click="editItem(\'cardNums\');">计次设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardTimes\'}"><a href="javascript:;" ng-click="editItem(\'cardTimes\');">计时设置</a></li></ul><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">名称<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><input type="text" class="form-control" ng-model="activeItem.params.title"></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">商户名称<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><input type="text" class="form-control" ng-model="activeItem.params.brand_name"></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">背景图案<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" value="system" ng-init="activeItem.params.background && activeItem.params.background == 0 ? activeItem.params.background = {} : \'\'" ng-model="activeItem.params.background.type"> 系统</label><label class="radio-inline"><input type="radio" value="user" ng-init="activeItem.params.background && activeItem.params.background == 0 ? activeItem.params.background = {} : \'\'" ng-model="activeItem.params.background.type"> 自定义</label></div></div><div class="form-group" ng-if="activeItem.params.background.type == \'user\'"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-xs-9"><span ng-click="addBgThumb()" class="form-control-static"><i class="fa fa-plus-circle green"></i>&nbsp;选择图片</span><div style="margin-top:.5em" class="input-group" ng-show="activeItem.params.background.image"><img width="150" class="img-responsive img-thumbnail" ng-src="{{activeItem.params.background.image}}"> <em ng-click="activeItem.params.background.image = \'\';" title="删除这张图片" style="position:absolute; top: 0px; right: -14px" class="close">×</em></div></div></div><div class="form-group" ng-if="activeItem.params.background.type == \'system\'"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><select class="form-control" ng-model="activeItem.params.background.image"><option value="{{tomedia(\'images/global/card/1.png\')}}">背景1</option><option value="{{tomedia(\'images/global/card/2.png\')}}">背景2</option><option value="{{tomedia(\'images/global/card/3.png\')}}">背景3</option><option value="{{tomedia(\'images/global/card/4.png\')}}">背景4</option><option value="{{tomedia(\'images/global/card/5.png\')}}">背景5</option><option value="{{tomedia(\'images/global/card/6.png\')}}">背景6</option><option value="{{tomedia(\'images/global/card/7.png\')}}">背景7</option><option value="{{tomedia(\'images/global/card/8.png\')}}">背景8</option><option value="{{tomedia(\'images/global/card/9.png\')}}">背景9</option><option value="{{tomedia(\'images/global/card/10.png\')}}">背景10</option><option value="{{tomedia(\'images/global/card/11.png\')}}">背景11</option><option value="{{tomedia(\'images/global/card/12.png\')}}">背景12</option><option value="{{tomedia(\'images/global/card/13.png\')}}">背景13</option><option value="{{tomedia(\'images/global/card/14.png\')}}">背景14</option><option value="{{tomedia(\'images/global/card/15.png\')}}">背景15</option><option value="{{tomedia(\'images/global/card/16.png\')}}">背景16</option><option value="{{tomedia(\'images/global/card/17.png\')}}">背景17</option><option value="{{tomedia(\'images/global/card/18.png\')}}">背景18</option><option value="{{tomedia(\'images/global/card/19.png\')}}">背景19</option><option value="{{tomedia(\'images/global/card/20.png\')}}">背景20</option><option value="{{tomedia(\'images/global/card/21.png\')}}">背景21</option><option value="{{tomedia(\'images/global/card/22.png\')}}">背景22</option><option value="{{tomedia(\'images/global/card/23.png\')}}">背景23</option></select></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">LOGO<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><span ng-click="addThumb(\'logo\')" class="form-control-static"><i class="fa fa-plus-circle green"></i>&nbsp;选择图片</span><div style="margin-top:.5em" class="input-group" ng-show="activeItem.params.logo"><img width="150" class="img-responsive img-thumbnail" ng-src="{{activeItem.params.logo}}"> <em ng-click="activeItem.params.logo = \'\';" title="删除这张图片" style="position:absolute; top: 0px; right: -14px" class="close">×</em></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">会员卡等级</label><div class="col-sm-9 col-xs-12"><input type="radio" value="1" ng-model="activeItem.params.card_level.type" id="card-label-type1"><label class="radio-inline" for="card-level-type1">开启</label><input type="radio" value="2" ng-model="activeItem.params.card_level.type" id="card-label-type2"><label class="radio-inline" for="card-level-type2">关闭</label></div></div><div class="form-group" ng-show="activeItem.params.card_level.type == \'1\'"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div we7-colorpicker we7-my-color="activeItem.params.color.rank" we7-my-default-color="\'#fff\'"></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">会员卡标题</label><div class="col-sm-9 col-xs-12"><input type="radio" value="1" ng-model="activeItem.params.card_label.type" id="card-label-type1"><label class="radio-inline" for="card-label-type1">开启</label><input type="radio" value="2" ng-model="activeItem.params.card_label.type" id="card-label-type2"><label class="radio-inline" for="card-label-type2">关闭</label></div></div><div class="form-group" ng-show="activeItem.params.card_label.type == \'1\'"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><input type="text" ng-model="activeItem.params.card_label.title" class="form-control"><br><span><span><div we7-colorpicker we7-my-color="activeItem.params.color.title" we7-my-default-color="\'Color010\'"></div></span></span></div></div><div class="form-group" style="display:none"><label class="col-xs-12 col-sm-3 col-md-2 control-label">卡号设置<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><label class="checkbox-inline"><input type="checkbox" value="1" ng-model="activeItem.params.format_type" ng-init="activeItem.params.format_type = (activeItem.params.format_type == 1 ? true : false)"> 使用手机号作为卡号</label><span class="help-block">强烈推荐使用手机号作为卡号</span><div ng-show="activeItem.params.format_type != 1"><input name="format" type="text" ng-model="activeItem.params.format" ng-init="activeItem.params.format = \'\'" class="form-control"> <span class="help-block"><p>"*"代表任意随机数字,<span style="color:red">"#"代表流水号码, "#"必须连续出现,且只能存在一组.</span></p><p>卡号规则样本:"WQ2015*****#####***"</p>注意:规则位数过小会造成卡号生成重复概率增大,过多的重复卡密会造成卡密生成终止 卡密规则中不能带有中文及其他特殊符号 为了避免卡密重复,随机位数最好不要少于8位</span></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">使用说明<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><textarea class="form-control" rows="6" ng-model="activeItem.params.description"></textarea><span class="help-block">请填写会员卡的使用说明。</span></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">会员卡资料</label><div class="col-sm-10 col-xs-9"><div ng-repeat="field in activeItem.params.fields" style="margin-left:-15px"><div class="col-sm-10" style="margin-bottom:10px"><div class="input-group"><input type="text" class="form-control" ng-model="field.title" ng-disabled="(field.bind == \'realname\' || field.bind == \'mobile\') && $index <= \'1\'"> <span class="input-group-addon"><label><input type="checkbox" ng-init="field.require = field.require == 1 ? true : false;" ng-model="field.require" ng-disabled="(field.bind == \'realname\' || field.bind == \'mobile\') && $index <= \'1\'"> 必填</label></span><select ng-model="field.bind" class="form-control" ng-disabled="(field.bind == \'realname\' || field.bind == \'mobile\') && $index <= \'1\'"><option value="{{fansfield.bind}}" ng-repeat="fansfield in fansFields" ng-model="field.bind" ng-selected="{{field.bind == fansfield.bind}}">{{fansfield.title}}</option></select></div></div><div class="col-sm-1" style="margin-top:5px" ng-show="field.bind != \'mobile\' && field.bind != \'realname\'"><a href="javascript:;" ng-click="removeFields(field);"><i class="fa fa-times-circle"></i></a></div></div><span class="help-block col-sm-9" style="margin-left:-15px">系统会自动绑定:真实姓名和手机号码</span> <span class="help-block col-sm-9" style="margin-left:-15px"><a href="javascript:;" ng-click="addFields();"><i class="fa fa-plus-circle" title="添加填写项目"></i> 添加填写项目</a></span></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">领卡赠送<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon" ng-init="activeItem.params.grant && activeItem.params.grant == 0 ? activeItem.params.grant = {} : \'\'">赠送</span> <input type="text" ng-model="activeItem.params.grant.credit1" class="form-control"> <span class="input-group-addon">积分</span></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon">赠送</span> <input type="text" ng-model="activeItem.params.grant.credit2" class="form-control"> <span class="input-group-addon">余额</span></div></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><input type="hidden" ng-model="activeItem.params.grant.coupon"> <span class="input-group-addon text-over" style="max-width: 240px">已选:<span ng-repeat="grant in activeItem.params.grant.coupon"><span ng-bind="grant.couponTitle">{{grant.couponTitle}}</span>|</span></span> <span class="input-group-btn"><button class="btn btn-primary" type="button" ng-click="selectCoupon();">搜索优惠券</button> <button class="btn btn-default" type="button" ng-click="clearCoupon();"><span><i class="fa fa-remove"></i></span></button></span></div><div class="help-block"><a href="{{url(\'activity/coupon\');}}" target="_blank">添加优惠券</a>.注意:赠送的优惠券应该各个会员组都可以领取.否则会造成赠送失败的问题</div></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">单次积分<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><input type="text" ng-model="activeItem.params.bonus_rule.max_increase_bonus" class="form-control"> <span class="help-block">单次最多可获取积分数量</span></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">抵扣条件<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><input type="text" ng-model="activeItem.params.bonus_rule.least_money_to_use_bonus" class="form-control"> <span class="help-block">满足xx元,可使用积分抵扣</span></div></div><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">抵现比率<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><div class="input-group"><input type="text" ng-model="activeItem.params.offset_rate" class="form-control"> <span class="input-group-addon">积分抵 1 元</span></div><br><div class="input-group"><span class="input-group-addon">单次最多可抵现</span> <input type="text" ng-model="activeItem.params.offset_max" class="form-control"> <span class="input-group-addon">元</span></div><div class="help-block"><strong class="text-danger">例:积分抵现金比率:100积分抵1元,那用户在消费的时候,将可用账户积分抵消部分金额.</strong></div><div class="help-block"><strong class="text-danger">目前仅支持后台交易抵现,暂不支持手机交易抵现.</strong></div></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">库存<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><input type="text" ng-model="activeItem.params.quantity" class="form-control"> <span class="help-block">卡券库存的数量,不支持填写0,上限为100000000.</span></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">使用提醒<span style="color:red">*</span></label><div class="radio"><div class="col-sm-9 col-xs-12"><input type="text" ng-model="activeItem.params.notice" class="form-control"> <span class="help-block">卡券使用提醒,字数上限为16个汉字。</span></div></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">刷卡支付<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" ng-model="activeItem.params.swipe_card" value="1">开启</label><label class="radio-inline"><input type="radio" ng-checked="activeItem.params.swipe_card == null || activeItem.params.swipe_card == 2" ng-model="activeItem.params.swipe_card" value="2">关闭</label><span class="help-block">选择是否开启刷卡支付</span></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">有效日期<span style="color:red">*</span></label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" ng-model="activeItem.params.date_info.type" value="DATE_TYPE_PERMANENT"> 永久有效</label></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="radio"><div class="col-sm-3"><label class="radio-inline"><input type="radio" ng-model="activeItem.params.date_info.type" value="DATE_TYPE_FIX_TIME_RANGE"> 固定日期</label></div><div class="input-group" style="width: 240px"><input we7-date-picker we7-date-value="activeItem.params.date_info.begin_timestamp" ng-model="activeItem.params.date_info.begin_timestamp" class="form-control" style="width: 100px"><div class="input-group-addon">到</div><input we7-date-picker we7-date-value="activeItem.params.date_info.end_timestamp" ng-model="activeItem.params.date_info.end_timestamp" class="form-control" style="width: 100px"></div></div></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input ng-model="activeItem.params.date_info.type" type="radio" value="DATE_TYPE_FIX_TERM">领取后</label><div class="input-group" style="width: 240px"><input ng-model="activeItem.params.date_info.fixed_begin_term" class="form-control" style="width: 100px"> <span class="input-group-addon">天生效,有效期</span> <input ng-model="activeItem.params.date_info.fixed_term" class="form-control" style="width: 100px"></div></div></div><div class="form-group" ng-if="newcard"><label class="col-xs-12 col-sm-3 col-md-2 control-label">可用门店</label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><a href="#" class="location_list">选择适用门店</a></label></div></div></div></div></div></div></div>'), e.put("widget-cardnums-display.html", '<div ng-controller="CardNumsCtrl"><div class="nav-container" ng-if="module.params.nums_status == 1 && module.params.nums_style == 1"><ul><li class="collapse-link"><a class="nav-container-list" href="javascript:;"><span class="nav-title"><i class="fa fa-eye"></i>{{module.params.nums_text}}充值</span> <span class="pull-right"><i class="fa fa-angle-right"></i></span></a><div class="collapse-con padding-b-0"><a href="./index.php?i={$_W[\'uniacid\']}&j={$_W[\'acid\']}&c=entry&m=recharge&do=pay&type=card_nums&fee={{num.recharge}}" class="btn btn-warning btn-recharge" ng-repeat="num in module.params.nums">充{{num.recharge}}返{{num.num}}次</a></div></li></ul></div><div class="app-richText" ng-if="module.params.nums_status == 1 && module.params.nums_style == 2" ng-style="{\'background-color\' : module.params.bgColor}"><div class="inner" ng-bind-html="module.params.content" ng-if="module.params.content"></div><div class="inner js-default-content" ng-if="!module.params.content"><p>点此编辑『富文本』内容 ——&gt;</p><p>你可以对文字进行 <strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline">下划线</span>、 <span style="text-decoration: line-through">删除线</span>、文字<span style="color: rgb(0, 176, 240)">颜色</span>、 <span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255)">背景色</span>、 以及字号<span style="font-size: 20px">大</span><span style="font-size: 14px">小</span>等简单排版操作。</p><p>还可以在这里加入表格了</p><table class="table-bordered"><tbody><tr><td>中奖客户</td><td>发放奖品</td><td>备注</td></tr><tr><td>猪猪</td><td>内测码</td><td><em><span class="red">已经发放</span></em></td></tr><tr><td>大麦</td><td>积分</td><td><a href="#" target="_blank">领取地址</a></td></tr></tbody></table><p style="text-align: left"><span style="text-align: left">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span></p></div></div></div>'), e.put("widget-cardnums-editor.html", '<div ng-controller="CardNumsCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><ul class="nav nav-tabs" style="margin:10px 15px 0 15px"><li ng-class="{\'active\' : activeItem.id == \'cardBasic\'}"><a href="javascript:;" ng-click="editItem(\'cardBasic\');">基本设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardActivity\'}"><a href="javascript:;" ng-click="editItem(\'cardActivity\');">消费优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardRecharge\'}"><a href="javascript:;" ng-click="editItem(\'cardRecharge\');">充值优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardNums\'}"><a href="javascript:;" ng-click="editItem(\'cardNums\');">计次设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardTimes\'}"><a href="javascript:;" ng-click="editItem(\'cardTimes\');">计时设置</a></li></ul><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">计次设置</label><div class="col-sm-9 col-xs-12"><input type="radio" value="1" ng-model="activeItem.params.nums_status" id="nums_status1"><label class="radio-inline" for="nums_status1">开启</label><input type="radio" value="0" ng-model="activeItem.params.nums_status" id="nums_status2"><label class="radio-inline" for="nums_status2">关闭</label><span class="help-block">如你的业务有需要次数限制,可开启进行设置。</span></div></div><div class="form-group" ng-show="activeItem.params.nums_status == 1"><label class="col-xs-12 col-sm-3 col-md-2 control-label">计次设置</label><div class="col-sm-9 col-xs-12"><input type="text" class="form-control" ng-model="activeItem.params.nums_text"> <span class="help-block">例如:设置为”洗发剩余次数“,前台将显示为:”洗发剩余次数:n次“,请根据自己的业务需求设置。</span></div></div><div class="form-group" ng-show="activeItem.params.nums_status == 1"><label class="col-xs-12 col-sm-3 col-md-2 control-label">充值返次数</label><div class="col-sm-9 col-xs-12"><div ng-repeat="num in activeItem.params.nums" style="margin-left:-15px"><div class="col-sm-8" style="margin-bottom:10px"><div class="input-group"><span class="input-group-addon">充</span> <input type="text" class="form-control" ng-model="num.recharge"> <span class="input-group-addon">元</span> <input type="text" class="form-control" ng-model="num.num"> <span class="input-group-addon">次</span></div></div><div class="col-sm-1" style="margin-top:5px"><a href="javascript:;" ng-click="removeNums(num);"><i class="fa fa-times-circle"></i></a></div></div><div class="help-block col-sm-9" style="margin-left:-15px"><a href="javascript:;" ng-click="addNums();"><i class="fa fa-plus-circle" title="添加充值设置"></i> 添加充值设置</a></div></div></div><div class="form-group" ng-show="activeItem.params.nums_status != 0"><label class="col-xs-12 col-sm-3 col-md-2 control-label">样式设置</label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" value="1" ng-model="activeItem.params.nums_style"> 系统默认</label><label class="radio-inline"><input type="radio" value="2" ng-model="activeItem.params.nums_style"> 自定义</label></div></div><div class="form-group" ng-show="activeItem.params.nums_status != 0 && activeItem.params.nums_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.bgColor" we7-my-default-color="\'#ffffff\'"></div></div></div></div><div class="form-group" ng-show="activeItem.params.nums_status != 0 && activeItem.params.nums_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div we7-editor we7-my-value="activeItem.params.content"></div></div></div></div></div></div></div></div>'), e.put("widget-cardrecharge-display.html", '<div ng-controller="CardRechargeCtrl"><div class="nav-container" ng-if="module.params.recharge_type != 0 && module.params.recharge_style == 1"><div class="list-group"><div class="list-group-item"><a href="#">充值优惠说明 <span class="pull-right"><i class="fa fa-angle-right"></i></span></a></div></div></div><div class="app-richText" ng-if="module.params.discount_type != 0 && module.params.discount_style == 2" ng-style="{\'background-color\' : module.params.bgColor}"><div class="inner" ng-bind-html="module.params.content" ng-if="module.params.content"></div><div class="inner js-default-content" ng-if="!module.params.content"><p>点此编辑『富文本』内容 ——&gt;</p><p>你可以对文字进行 <strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline">下划线</span>、 <span style="text-decoration: line-through">删除线</span>、文字<span style="color: rgb(0, 176, 240)">颜色</span>、 <span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255)">背景色</span>、 以及字号<span style="font-size: 20px">大</span><span style="font-size: 14px">小</span>等简单排版操作。</p><p>还可以在这里加入表格了</p><table class="table-bordered"><tbody><tr><td>中奖客户</td><td>发放奖品</td><td>备注</td></tr><tr><td>猪猪</td><td>内测码</td><td><em><span class="red">已经发放</span></em></td></tr><tr><td>大麦</td><td>积分</td><td><a href="#" target="_blank">领取地址</a></td></tr></tbody></table><p style="text-align: left"><span style="text-align: left">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span></p></div></div></div>'), e.put("widget-cardrecharge-editor.html", '<div ng-controller="CardRechargeCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><ul class="nav nav-tabs" style="margin:10px 15px 0 15px"><li ng-class="{\'active\' : activeItem.id == \'cardBasic\'}"><a href="javascript:;" ng-click="editItem(\'cardBasic\');">基本设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardActivity\'}"><a href="javascript:;" ng-click="editItem(\'cardActivity\');">消费优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardRecharge\'}"><a href="javascript:;" ng-click="editItem(\'cardRecharge\');">充值优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardNums\'}"><a href="javascript:;" ng-click="editItem(\'cardNums\');">计次设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardTimes\'}"><a href="javascript:;" ng-click="editItem(\'cardTimes\');">计时设置</a></li></ul><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">优惠设置</label><div class="col-sm-9 col-xs-12"><input type="radio" value="1" ng-model="activeItem.params.recharge_type" id="recharge_type1"><label class="radio-inline" for="recharge_type1">开启</label><input type="radio" value="0" ng-model="activeItem.params.recharge_type" id="recharge_type2"><label class="radio-inline" for="recharge_type2">不开启</label></div></div><div class="form-group" ng-show="activeItem.params.recharge_type == 1" ng-repeat="recharge in activeItem.params.recharges"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><span class="input-group-addon">充</span> <input type="text" class="form-control" ng-model="recharge.condition"> <span class="input-group-addon">元</span> <span class="input-group-addon" ng-if="recharge.backtype == \'0\'">送</span> <span class="input-group-addon" ng-if="recharge.backtype == \'1\'">送</span> <input type="text" class="form-control" ng-model="recharge.back"><div class="input-group-btn"><button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="width:88px"><span ng-switch on="recharge.backtype"><span ng-switch-when="0">元</span> <span ng-switch-when="1">积分</span></span> <i class="fa fa-angle-down"></i></button><ul class="dropdown-menu dropdown-menu-right select-back"><li><a href="#" ng-click="recharge.backtype=\'0\';recharge.backunit=\'元\'">元</a></li><li><a href="#" ng-click="recharge.backtype=\'1\';recharge.backunit=\'积分\'">积分</a></li></ul></div></div></div><div class="col-sm-1" style="margin-top:5px"><a href="javascript:;" ng-click="removeRecharges(recharge);"><i class="fa fa-times-circle"></i></a></div></div><div class="form-group" ng-show="activeItem.params.recharge_type != 0"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="help-block col-sm-9 col-xs-12" style="margin-left:-15px"><a href="javascript:;" ng-click="addRecharges();"><i class="fa fa-plus-circle" title="添加充值设置"></i> 添加充值设置</a></div></div><div class="form-group" ng-show="activeItem.params.recharge_type == 1"><label class="col-xs-12 col-sm-3 col-md-2 control-label">消费返积分</label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" value="1" ng-model="activeItem.params.grant_rate_switch"> 是</label><label class="radio-inline"><input type="radio" value="0" ng-model="activeItem.params.grant_rate_switch"> 否</label><div class="help-block"><strong class="text-danger">开启充值优惠设置后,用户是否继续享受消费返积分的优惠</strong></div></div></div><div class="form-group" ng-show="activeItem.params.discount_type != 0 && activeItem.params.discount_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.bgColor" we7-my-default-color="\'#ffffff\'"></div></div></div></div><div class="form-group" ng-show="activeItem.params.discount_type != 0 && activeItem.params.discount_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div we7-editor we7-my-value="activeItem.params.content"></div></div></div></div></div></div></div></div>'), e.put("widget-cardtimes-display.html", '<div ng-controller="CardTimesCtrl"><div class="nav-container" ng-if="module.params.times_status == 1 && module.params.times_style == 1"><ul><li class="collapse-link"><a class="nav-container-list" href="javascript:;"><span class="nav-title"><i class="fa fa-eye"></i>{{module.params.times_text}}充值</span> <span class="pull-right"><i class="fa fa-angle-right"></i></span></a><div class="collapse-con padding-b-0"><a href="./index.php?i={$_W[\'uniacid\']}&j={$_W[\'acid\']}&c=entry&m=recharge&do=pay&type=card_times&fee={{time.recharge}}" class="btn btn-warning btn-recharge" ng-repeat="time in module.params.times">充{{time.recharge}}返{{time.time}}天</a></div></li></ul></div><div class="app-richText" ng-if="module.params.times_status == 1 && module.params.times_style == 2" ng-style="{\'background-color\' : module.params.bgColor}"><div class="inner" ng-bind-html="module.params.content" ng-if="module.params.content"></div><div class="inner js-default-content" ng-if="!module.params.content"><p>点此编辑『富文本』内容 ——&gt;</p><p>你可以对文字进行 <strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline">下划线</span>、 <span style="text-decoration: line-through">删除线</span>、文字<span style="color: rgb(0, 176, 240)">颜色</span>、 <span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255)">背景色</span>、 以及字号<span style="font-size: 20px">大</span><span style="font-size: 14px">小</span>等简单排版操作。</p><p>还可以在这里加入表格了</p><table class="table-bordered"><tbody><tr><td>中奖客户</td><td>发放奖品</td><td>备注</td></tr><tr><td>猪猪</td><td>内测码</td><td><em><span class="red">已经发放</span></em></td></tr><tr><td>大麦</td><td>积分</td><td><a href="#" target="_blank">领取地址</a></td></tr></tbody></table><p style="text-align: left"><span style="text-align: left">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span></p></div></div></div>'), e.put("widget-cardtimes-editor.html", '<div ng-controller="CardTimesCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><ul class="nav nav-tabs" style="margin:10px 15px 0 15px"><li ng-class="{\'active\' : activeItem.id == \'cardBasic\'}"><a href="javascript:;" ng-click="editItem(\'cardBasic\');">基本设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardActivity\'}"><a href="javascript:;" ng-click="editItem(\'cardActivity\');">消费优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardRecharge\'}"><a href="javascript:;" ng-click="editItem(\'cardRecharge\');">充值优惠设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardNums\'}"><a href="javascript:;" ng-click="editItem(\'cardNums\');">计次设置</a></li><li ng-class="{\'active\' : activeItem.id == \'cardTimes\'}"><a href="javascript:;" ng-click="editItem(\'cardTimes\');">计时设置</a></li></ul><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-12 col-sm-3 col-md-2 control-label">计时设置</label><div class="col-sm-9 col-xs-12"><input type="radio" value="1" ng-model="activeItem.params.times_status" id="times_status1"><label class="radio-inline" for="times_status1">开启</label><input type="radio" value="0" ng-model="activeItem.params.times_status" id="times_status2"><label class="radio-inline" for="times_status2">关闭</label><span class="help-block">如你的业务有需要时长限制,可开启进行设置。</span></div></div><div class="form-group" ng-show="activeItem.params.times_status == 1"><label class="col-xs-12 col-sm-3 col-md-2 control-label">计时设置</label><div class="col-sm-9 col-xs-12"><input type="text" class="form-control" ng-model="activeItem.params.times_text"> <span class="help-block">例如:设置为”到期时间“,系统将根据用户的领卡时间,加上用户的可用时长,计算到期时间,前台将显示为:”到期时间:x年x月x日“,请根据自己的业务需求设置。</span></div></div><div class="form-group" ng-show="activeItem.params.times_status == 1"><label class="col-xs-12 col-sm-3 col-md-2 control-label">充值返时长</label><div class="col-sm-9 col-xs-12"><div ng-repeat="time in activeItem.params.times" style="margin-left:-15px"><div class="col-sm-8" style="margin-bottom:10px"><div class="input-group"><span class="input-group-addon">充</span> <input type="text" class="form-control" ng-model="time.recharge"> <span class="input-group-addon">元</span> <input type="text" class="form-control" ng-model="time.time"> <span class="input-group-addon">天</span></div></div><div class="col-sm-1" style="margin-top:5px"><a href="javascript:;" ng-click="removeTimes(time);"><i class="fa fa-times-circle"></i></a></div></div><div class="help-block col-sm-9" style="margin-left:-15px"><a href="javascript:;" ng-click="addTimes();"><i class="fa fa-plus-circle" title="添加充值设置"></i> 添加充值设置</a></div></div></div><div class="form-group" ng-show="activeItem.params.times_status != 0"><label class="col-xs-12 col-sm-3 col-md-2 control-label">样式设置</label><div class="col-sm-9 col-xs-12"><label class="radio-inline"><input type="radio" value="1" ng-model="activeItem.params.times_style"> 系统默认</label><label class="radio-inline"><input type="radio" value="2" ng-model="activeItem.params.times_style"> 自定义</label></div></div><div class="form-group" ng-show="activeItem.params.times_status != 0 && activeItem.params.times_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.bgColor" we7-my-default-color="\'#ffffff\'"></div></div></div></div><div class="form-group" ng-show="activeItem.params.times_status != 0 && activeItem.params.times_style == 2"><label class="col-xs-12 col-sm-3 col-md-2 control-label"></label><div class="col-sm-9 col-xs-12"><div we7-editor we7-my-value="activeItem.params.content"></div></div></div></div></div></div></div></div>'), e.put("widget-ucheader-display.html", '<div ng-controller="HeaderCtrl"><div class="title"><h1><span>{{module.params.title}}</span></h1></div><div class="head" style="background-repeat:no-repeat; background-position: center center" ng-style="{\'background-image\' : module.params.bgImage ? \'url(\' + module.params.bgImage + \')\' : \'url(\\\'./resource/images/app/head-bg.png\\\')\'}"><a class="ptool" href="{{url(\'mc/profile\')}}">设置</a><div class="logo-img"><img ng-src="{{logo_url}}" class="img-circle"></div><div class="banner-info"><div class="name">设置昵称</div><div class="tel">1884512367</div></div><div class="head-nav"><a class="head-nav-list" href="{{url(\'mc/bond/credits\')}}&credittype=credit1"><span class="fa fa-rmb"></span>余额: <span>4000.00</span></a> <a class="head-nav-list" href="{{url(\'mc/bond/credits\')}}&credittype=credit2"><span class="fa fa-database"></span>积分: <span>900.00</span></a></div></div></div>'), e.put("widget-ucheader-editor.html", '<div ng-controller="HeaderCtrl"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-3 control-label"><span class="red">*</span> 页面名称</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.title" placeholder="微页面标题" class="form-control"></div></div><div class="form-group"><label class="control-label col-xs-3">背景图片</label><div class="col-xs-9"><span ng-click="addThumb(\'bgImage\')"><i class="fa fa-plus-circle green"></i>&nbsp;选择图片</span><div style="margin-top:.5em" class="input-group" ng-show="activeItem.params.bgImage"><img width="150" class="img-responsive img-thumbnail" ng-src="{{activeItem.params.bgImage}}"> <em ng-click="activeItem.params.bgImage = \'\';" title="删除这张图片" style="position:absolute; top: 0px; right: -14px" class="close">×</em></div></div></div><div class="form-group"><label class="col-xs-3 control-label">触发关键字</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.keyword" class="form-control"> <span class="help-block">用户触发关键字,系统回复此页面的图文链接</span></div></div><div class="form-group"><label class="control-label col-xs-3">封面</label><div class="col-xs-9"><span ng-click="addThumb(\'cover\')"><i class="fa fa-plus-circle green"></i>&nbsp;选择图片</span><div style="margin-top:.5em" class="input-group" ng-show="activeItem.params.cover"><img width="150" class="img-responsive img-thumbnail" ng-src="{{activeItem.params.cover}}"> <em ng-click="activeItem.params.cover = \'\';" title="删除这张图片" style="position:absolute; top: 0px; right: -14px" class="close">×</em></div><span class="help-block">用于用户触发关键字后,系统回复时的封面图片</span></div></div><div class="form-group"><label class="col-xs-3 control-label">页面描述</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.description" class="form-control"></div></div><div class="form-group"><label class="col-xs-3 control-label">联系方式</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.contact" class="form-control"> <span class="help-block">用于用户点击会员中心->设置->联系我们时拨打的电话</span></div></div><div class="shopNav-edit-header clearfix">个人中心扩展菜单</div><div class="shopNav-wx"><div class="card" ng-repeat="menu in activeMenus"><div class="btns"><a href="javascript:;" ng-click="removeMenu(menu)"><i class="fa fa-times"></i></a></div><div class="nav-region"><div class="first-nav"><div class="alert"><div class="form-group"><label class="control-label col-xs-3">标题</label><div class="col-xs-9"><input type="text" class="form-control" name="" value="" ng-model="menu.name"></div></div><div class="form-group"><label class="control-label col-xs-3">链接到</label><div class="col-xs-9"><input ng-if="menu.module_info" type="text" ng-model="menu.url" class="form-control" disabled><div ng-if="!menu.module_info" we7-linker we7-my-url="menu.url" we7-my-title="menu.name"></div></div></div><div class="form-group" ng-if="menu.module_info"><label class="control-label col-xs-3">是否显示</label><div class="col-xs-9"><label class="radio-inline"><input type="radio" value="1" ng-model="menu.status">显示</label><label class="radio-inline"><input type="radio" value="0" ng-model="menu.status">隐藏</label><span class="help-block"><strong class="text-danger">该菜单来源于{{menu.module_info.title}}模块,仅可设置标题和是否显示</strong></span></div></div></div></div></div></div><div class="add-shopNav text-center" ng-click="addMenu();">+添加一级导航</div></div></div></div></div></div></div>'), e.put("directive-pagelength-pagelength.html", '<div class="app-plength" ng-if="isLongPage"><div class="btn btn-default col-sm-3 app-plength-change" ng-class="{\'disabled\' : pageLength <= 1}" ng-style="{\'cursor\' : pageLength <= 1 ? \'not-allowed\' : \'pointer\'}" ng-click="changePageLength(\'minus\');"><span>-</span></div><div class="col-sm-6 app-plength-info"><div>页面长度(页):<span ng-bind="pageLength"></span></div></div><div class="btn btn-default col-sm-3 app-plength-change" ng-class="{\'disabled\' : pageLength >= 5}" ng-style="{\'cursor\' : pageLength >= 5 ? \'not-allowed\' : \'pointer\'}" ng-click="changePageLength(\'plus\');"><span>+</span></div></div>'), e.put("directive-style-style.html", '<div class="app-text-edit" ng-if="activeItem.id != \'header\' && activeItem.id != \'UCheader\'"><div class="inner"><div class="panel panel-default"><div class="panel-body"><ul class="nav nav-tabs"><li class="active"><a href="#attribute" role="tab" data-toggle="tab">属性</a></li><li><a href="#action" role="tab" data-toggle="tab">动作</a></li></ul><div class="tab-content"><div class="tab-pane active" id="attribute"><div class="panel-group" id="accordion"><div class="panel panel-default"><div class="panel-heading" role="tab" id="heading-basic"><h4 class="panel-title"><a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-basic" aria-expanded="true" aria-controls="collapse-basic">基础样式</a></h4></div><div id="collapse-basic" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="heading-basic"><div class="panel-body"><div class="form-group"><label class="col-xs-3 control-label">背景颜色</label><div class="col-xs-9"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.baseStyle.backgroundColor" we7-my-default-color="activeItem.params.baseStyle.backgroundColor"></div></div></div></div><div class="form-group" ng-show="activeItem.id == \'onlyText\' || activeItem.id == \'countDown\' || activeItem.id == \'line\'"><label class="col-xs-3 control-label" ng-show="activeItem.id == \'line\'">辅助线颜色</label><label class="col-xs-3 control-label" ng-show="activeItem.id != \'line\'">文字颜色</label><div class="col-xs-9"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.baseStyle.color" we7-my-default-color="activeItem.params.baseStyle.color"></div></div></div></div><div class="form-group"><label class="col-xs-3 control-label">透明度</label><div class="col-xs-9"><input type="number" class="form-control" max="100" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.baseStyle.opacity"></div></div><div class="form-group" ng-show="activeItem.id == \'onlyText\' || activeItem.id == \'pureLink\' || activeItem.id == \'dial\' || activeItem.id == \'good\' || activeItem.id == \'countDown\' || activeItem.id == \'line\'"><label class="col-xs-3 control-label">上偏移</label><div class="col-xs-9"><input type="number" class="form-control" max="100" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.baseStyle.paddingTop"></div></div><div class="form-group" ng-if="activeItem.id == \'onlyText\'"><label class="control-label col-xs-3">行距</label><div class="col-xs-8"><div class="input-group"><select class="form-control" id="lineheight" ng-model="activeItem.params.baseStyle.lineHeight" ng-options="lhKey for (lhKey, lhVal) in lineHeights"></select><span class="input-group-addon">倍</span></div></div></div><div class="form-group" ng-show="activeItem.id == \'onlyText\' || activeItem.id == \'pureLink\' || activeItem.id == \'dial\' || activeItem.id == \'good\' || activeItem.id == \'countDown\'"><label class="control-label col-xs-3">字体大小</label><div class="col-xs-8"><div class="input-group"><select class="form-control" id="fontsize" ng-model="activeItem.params.baseStyle.fontSize" ng-options="fzKey for (fzKey, fzVal) in fontSizes"></select><span class="input-group-addon">px</span></div></div></div><div class="form-group" ng-show="isLongPage"><label class="col-xs-3 control-label">固定组件</label><div class="col-xs-9"><label class="checkbox-inline"><input type="checkbox" ng-click="changeLock()" ng-checked="activeItem.params.baseStyle.lock"> 固定组件只能在长页面中使用</label></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading" role="tab" id="heading-border"><h4 class="panel-title"><a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-border" aria-expanded="true" aria-controls="collapse-border">边框样式</a></h4></div><div id="collapse-border" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-border"><div class="panel-body"><div class="form-group"><label class="col-xs-3 control-label">尺寸</label><div class="col-xs-9"><input type="number" class="form-control" max="20" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.borderStyle.borderWidth" ng-change="changeBorderWidth()"></div></div><div class="form-group"><label class="col-xs-3 control-label">弧度</label><div class="col-xs-9"><input type="number" class="form-control" max="29" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.borderStyle.borderRadius"></div></div><div class="form-group"><label class="col-xs-3 control-label">样式</label><div class="col-xs-9"><select name="" class="form-control" ng-model="activeItem.params.borderStyle.borderStyle"><option value="solid">直线</option><option value="dashed">破折线</option><option value="dotted">点状线</option><option value="double">双划线</option><option value="groove">3D凹槽</option><option value="ridge">3D垄状</option><option value="inset">3D内嵌</option><option value="outset">3D外嵌</option></select></div></div><div class="form-group"><label class="col-xs-3 control-label">颜色</label><div class="col-xs-9"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.borderStyle.borderColor" we7-my-default-color="activeItem.params.borderStyle.borderColor"></div></div></div></div><div class="form-group"><label class="col-xs-3 control-label">旋转度</label><div class="col-xs-9"><input type="number" class="form-control" max="360" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.borderStyle.transform"></div></div></div></div></div><div class="panel panel-default"><div class="panel-heading" role="tab" id="heading-shadow"><h4 class="panel-title"><a role="button" data-toggle="collapse" data-parent="#accordion" href="#collapse-shadow" aria-expanded="true" aria-controls="collapse-shadow">阴影样式</a></h4></div><div id="collapse-shadow" class="panel-collapse collapse" role="tabpanel" aria-labelledby="heading-shadow"><div class="panel-body"><div class="form-group"><label class="col-xs-3 control-label">大小</label><div class="col-xs-9"><input type="number" class="form-control" max="20" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.shadowStyle.shadowSize"></div></div><div class="form-group"><label class="col-xs-3 control-label">模糊</label><div class="col-xs-9"><input type="number" class="form-control" max="20" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.shadowStyle.shadowBlur"></div></div><div class="form-group"><label class="col-xs-3 control-label">颜色</label><div class="col-xs-9"><div class="input-group"><div we7-colorpicker we7-my-color="activeItem.params.shadowStyle.shadowColor" we7-my-default-color="activeItem.params.shadowStyle.shadowColor"></div></div></div></div><div class="form-group"><label class="col-xs-3 control-label">方向</label><div class="col-xs-9"><input type="number" class="form-control" max="359" min="0" step="1" placeholder="0" value="" name="" ng-model="activeItem.params.shadowStyle.shadowDirection"></div></div></div></div></div></div><div><a class="btn btn-primary" ng-click="clearModuleStyle()">重置属性</a></div></div><div class="tab-pane" id="action"><div class="form-group"><label class="col-xs-3 control-label">速度</label><div class="col-xs-9"><div class="input-group"><input type="number" ng-model="activeItem.params.animationStyle.animationDuration" max="30" min="0" step="0.1" class="form-control"> <span class="input-group-btn"><button class="btn btn-default" type="reset">秒(S)</button></span></div></div></div><div class="form-group"><label class="col-xs-3 control-label">延迟</label><div class="col-xs-9"><div class="input-group"><input type="number" ng-model="activeItem.params.animationStyle.animationDelay" max="10" min="0" step="0.1" class="form-control"> <span class="input-group-btn"><button class="btn btn-default" type="reset">秒(S)</button></span></div></div></div><div class="clearfix icons"><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'noEffect\'}" ng-click="eleAnimationIns(\'noEffect\', $event)"><div class="icon no-effect"></div><div class="name">无效果</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeInNormal\'}" ng-click="eleAnimationIns(\'fadeInNormal\', $event);"><div class="icon fade-in-normal"></div><div class="name">淡入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'rotateInDownLeft\'}" ng-click="eleAnimationIns(\'rotateInDownLeft\', $event);"><div class="icon rotate-in-down-left"></div><div class="name">从左滚入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'rotateInDownRight\'}" ng-click="eleAnimationIns(\'rotateInDownRight\', $event);"><div class="icon rotate-in-down-right"></div><div class="name">从右滚入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'zoomIn\'}" ng-click="eleAnimationIns(\'zoomIn\', $event);"><div class="icon zoom-in"></div><div class="name">放大</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'zoomInDown\'}" ng-click="eleAnimationIns(\'zoomInDown\', $event);"><div class="icon zoom-in-down"></div><div class="name">下落放大</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeIn\'}" ng-click="eleAnimationIns(\'fadeIn\', $event);"><div class="icon fade-in"></div><div class="name">弹性放大</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'expandOpen\'}" ng-click="eleAnimationIns(\'expandOpen\', $event);"><div class="icon expand-open"></div><div class="name">弹性缩小</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeInRight\'}" ng-click="eleAnimationIns(\'fadeInRight\', $event);"><div class="icon fade-in-right"></div><div class="name">向右飞入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeInLeft\'}" ng-click="eleAnimationIns(\'fadeInLeft\', $event);"><div class="icon fade-in-left"></div><div class="name">向左飞入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeInUp\'}" ng-click="eleAnimationIns(\'fadeInUp\', $event);"><div class="icon fade-in-up"></div><div class="name">向上飞入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'fadeInDown\'}" ng-click="eleAnimationIns(\'fadeInDown\', $event);"><div class="icon fade-in-down"></div><div class="name">向下飞入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'rotateIn\'}" ng-click="eleAnimationIns(\'rotateIn\', $event);"><div class="icon rotate-in"></div><div class="name">旋转出现</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'flipInY\'}" ng-click="eleAnimationIns(\'flipInY\', $event);"><div class="icon flip-in-y"></div><div class="name">左右翻转</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'flipInX\'}" ng-click="eleAnimationIns(\'flipInX\', $event);"><div class="icon flip-in-x"></div><div class="name">上下翻转</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'lightSpeedIn\'}" ng-click="eleAnimationIns(\'lightSpeedIn\', $event);"><div class="icon light-speed-in"></div><div class="name">刹车</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'slideRight\'}" ng-click="eleAnimationIns(\'slideRight\', $event);"><div class="icon slide-right"></div><div class="name">向右滑入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'slideLeft\'}" ng-click="eleAnimationIns(\'slideLeft\', $event);"><div class="icon slide-left"></div><div class="name">向左滑入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'slideUp\'}" ng-click="eleAnimationIns(\'slideUp\', $event);"><div class="icon slide-up"></div><div class="name">向上滑入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'slideDown\'}" ng-click="eleAnimationIns(\'slideDown\', $event);"><div class="icon slide-down"></div><div class="name">向下滑入</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'stretchRight\'}" ng-click="eleAnimationIns(\'stretchRight\', $event);"><div class="icon stretch-right"></div><div class="name">向右展开</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'stretchLeft\'}" ng-click="eleAnimationIns(\'stretchLeft\', $event);"><div class="icon stretch-left"></div><div class="name">向左展开</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'pullUp\'}" ng-click="eleAnimationIns(\'pullUp\', $event);"><div class="icon pull-up"></div><div class="name">向上展开</div></div><div class="icon-container" ng-class="{\'select\': activeItem.params.animationStyle.animationName == \'pullDown\'}" ng-click="eleAnimationIns(\'pullDown\', $event);"><div class="icon pull-down"></div><div class="name">向下展开</div></div></div></div></div></div></div></div></div>'), e.put("widget-adimg-display.html", '<div ng-controller="AdImgCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><link href="./resource/components/swiper/swiper.min.css" rel="stylesheet"><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-adImg" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><div class="appstyle js-default-content" ng-if="module.params.items.length == 0"><img ng-show="module.params.listStyle == 1" src="./resource/images/app/adImg-lg.jpg" width="100%"> <img ng-show="module.params.listStyle == 2" src="./resource/images/app/adImg-separate.jpg" width="100%"></div><div class="swiper-container swiper-container-horizontal" ng-if="module.params.items.length != 0 && module.params.listStyle == 1"><div class="swiper-wrapper"><div class="swiper-slide" ng-class="{\'swiper-slide-active\' : $index == 0}" style="width: 100%" ng-repeat="item in module.params.items"><a href="{{item.url}}" style="display:block; width:100%; text-align:center"><img ng-src="{{item.imgurl}}" title="{{item.title}}" style="display:block; height:auto; max-width:100%; margin:0 auto"></a></div></div><div class="swiper-pagination swiper-pagination-clickable"><span class="swiper-pagination-bullet" ng-class="{\'swiper-pagination-bullet-active\': $index == 0}" ng-repeat="item in module.params.items"></span></div><div class="swiper-button-next hidden"></div><div class="swiper-button-prev hidden"></div></div><div class="show-separate" ng-if="module.params.items.length != 0 && module.params.listStyle == 2"><div class="ad-list lg" ng-if="module.params.sizeType == 1"><div class="ad-list-item" ng-repeat="item in module.params.items"><a href="{{item.url}}"><h3 ng-bind="item.title">广告标题</h3><img ng-src="{{item.imgurl}}"></a></div></div><div class="ad-list clearfix sm" ng-if="module.params.sizeType == 2"><div class="ad-list-item col-xs-6 col-sm-6" ng-repeat="item in module.params.items"><a href="{{item.url}}"><h3 ng-bind="item.title">广告标题</h3><img ng-src="{{item.imgurl}}"></a></div></div></div></div></div><div we7-drag></div></div></div>'), e.put("widget-adimg-editor.html", '<div ng-controller="AdImgCtrl"><div class="app-adImg-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="control-label col-xs-3">显示方式</label><div class="col-xs-9"><input type="radio" class="carousel-style" ng-model="activeItem.params.listStyle" value="1" ng-click="activeItem.params.sizeType=1;changeInnerHeight()" name="ad-show-style" id="list-style1"><label class="radio-inline" for="list-style1">折叠轮播</label><input type="radio" class="separate-style" ng-model="activeItem.params.listStyle" value="2" name="ad-show-style" ng-click="changeInnerHeight()" id="list-style2"><label class="radio-inline" for="list-style2">分开显示</label></div></div><div class="form-group"><label class="control-label col-xs-3">显示大小</label><div class="col-xs-9"><input type="radio" class="size-lg-style" ng-model="activeItem.params.sizeType" value="1" name="ad-size" ng-click="changeInnerHeight()" id="size-type1"><label class="radio-inline" for="size-type1">大图</label><input type="radio" class="size-sm-style" ng-model="activeItem.params.sizeType" value="2" name="ad-size" ng-click="changeInnerHeight()" id="size-type2"><label class="radio-inline" for="size-type2" ng-show="activeItem.params.listStyle == 2">小图</label></div></div><div class="add-adImg-item card clearfix" ng-repeat="item in activeItem.params.items"><div class="btns"><a href="#" ng-click="addEmpty()"><i class="fa fa-plus"></i></a> <a href="#" ng-click="removeItem(item)"><i class="fa fa-times"></i></a></div><div class="col-xs-3 img"><h3 ng-click="changeItem(item)">重新上传</h3><img src="" ng-src="{{ item.imgurl }}" width="100%"></div><div class="col-xs-9"><div class="form-group"><label class="control-label col-xs-3">标题</label><div class="col-xs-9"><input class="form-control" name="title" ng-model="item.title" value="" type="text"></div></div><div class="form-group"><label class="control-label col-xs-3">链接</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="item.url" we7-my-title="item.title"></div></div></div></div></div><div class="add-adImg card" ng-click="addItem()"><a href="#"><i class="fa fa-plus-circle green"></i>添加一个广告</a></div></div></div></div></div></div>'), e.put("widget-audio-display.html", '<div ng-controller="AudioCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-audio" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><div ng-if="module.params.style == \'1\'" id="audio-music-{{$index+0}}" data-reload="{{module.params.reload}}" class="wx audioLeft clearfix" data-src="{{module.params.audio.url}}" ng-class="{\'audioLeft\': module.params.align == \'left\', \'audioRight\': module.params.align == \'right\'}" style="width:100%;height:100%"><img ng-init="module.params.headimg = module.params.headimg ? module.params.headimg : \'./resource/images/app/shop.png!80x80.jpg\'" ng-src="{{module.params.headimg}}" alt="语音头像" class="audioLogo" width="40" height="40"> <span class="audioBar js-play"><img style="display:none" ng-if="module.params.align == \'left\'" src="./resource/images/app/player.gif" class="audioAnimation"> <img style="display:none" ng-if="module.params.align == \'right\'" src="./resource/images/app/green_player.gif" class="audioAnimation"> <i class="audioStatic"></i> <span style="display:none" class="audioLoading"><i class="fa fa-spinner fa-pulse"></i></span></span> <span class="audioBar js-pause" style="display:none"><img ng-if="module.params.align == \'left\'" src="./resource/images/app/player.gif" class="audioAnimation"> <img ng-if="module.params.align == \'right\'" src="./resource/images/app/green_player.gif" class="audioAnimation"> <i class="audioStatic"></i></span> <span class="audio-time"></span><div class="js-audio-wx" data-id="audio-music-{{$index+0}}"></div></div><div class="music music-play" id="audio-music-{{$index+0}}" data-src="{{module.params.audio.url}}" data-reload="{{module.params.reload}}" data-loop="{{module.params.isloop}}" ng-if="module.params.style == \'2\'"><span class="audioStatic js-play"><a href="javascript:;"><i class="fa fa-play-circle-o"></i></a></span> <span class="audioAnimation js-pause" style="display:none"><a href="javascript:;"><i class="fa fa-pause"></i></a></span> <span class="musicTitle" ng-if="module.params.title == \'\'">歌名儿</span> <span class="musicTitle" ng-if="module.params.title != \'\'">{{module.params.title}}</span> <span class="audioLoading" style="display:none"><i class="fa fa-spinner fa-pulse"></i></span> <span class="audio-time" style="display:none"><span class="audio-current-time">00:00</span>/<span class="audio-duration">00:00</span></span><div class="slider-bar"><div class="slider-fill"></div></div><div class="js-audio-music" data-id="audio-music-{{$index+0}}"></div></div></div></div><div we7-drag></div></div></div>'), e.put("widget-audio-editor.html", '<div ng-controller="AudioCtrl"><div class="app-audio-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-2 control-label">音频</label><div class="col-xs-10"><span class="input-group-btn"><button type="button" class="btn btn-default audio-player-play" style="display:none"><i class="fa fa-play"></i></button> <button ng-click="addAudioItem()" type="button" class="btn btn-default">选择媒体文件</button></span></div></div><div class="form-group"><label class="col-xs-2 control-label">样式</label><div class="col-xs-10"><div class=""><input id="wx-music-type" type="radio" name="wx-music" value="1" ng-model="activeItem.params.style" ng-click="changeInnerHeight()"><label class="radio-inline" for="wx-music-type">模仿微信对话样式</label><div class="form-group" ng-show="activeItem.params.style == \'1\'"><label class="control-label col-xs-3">头像:</label><div class="col-xs-3" style="padding-top:10px"><img ng-init="activeItem.params.headimg = activeItem.params.headimg ? activeItem.params.headimg : \'./resource/images/app/shop.png!80x80.jpg\'" ng-src="{{activeItem.params.headimg}}" alt="语音头像" width="62" height="62"></div><div class="help-block col-xs-6" style="padding-left:0;padding-top:10px"><a href="#" ng-click="addImgItem()">上传头像</a><br>建议尺寸80*80像素<br>如果不设置,默认将使用店铺logo</div></div><div class="form-group" ng-show="activeItem.params.style == \'1\'"><label class="control-label col-xs-3">气泡:</label><div class="col-xs-9"><input id="bubble-left" type="radio" name="bubble" value="left" ng-model="activeItem.params.align"><label class="radio-inline" for="bubble-left">居左</label><input id="bubble-right" type="radio" name="bubble" value="right" ng-model="activeItem.params.align"><label class="radio-inline" for="bubble-right">居右</label></div></div></div><div class=""><input id="simple-music-type" type="radio" name="wx-music" value="2" ng-model="activeItem.params.style" ng-click="changeInnerHeight()"><label class="radio-inline" for="simple-music-type">简易音乐播放器</label><div><div class="form-group" ng-show="activeItem.params.style == \'2\'"><label class="control-label col-xs-3">标题:</label><div class="col-xs-9"><input class="form-control" type="text" ng-model="activeItem.params.title"></div></div><div class="form-group" ng-show="activeItem.params.style == \'2\'"><label class="control-label col-xs-3">循环:</label><div class="col-xs-9"><label class="checkbox-inline"><input type="checkbox" ng-model="activeItem.params.isloop">开启循环播放</label></div></div></div></div></div></div><div class="form-group"><label class="col-xs-2 control-label">播放</label><div class="col-xs-10"><div><input id="play-type1" type="radio" name="play" ng-model="activeItem.params.reload" value="true"><label class="radio-inline" for="play-type1">暂停后再回复播放时,从头开始</label></div><div><input id="play-type2" type="radio" name="play" ng-model="activeItem.params.reload" value="false"><label class="radio-inline" for="play-type2">暂停后再回复播放时,从暂停位置开始</label></div></div></div></div></div></div></div></div>'), e.put("widget-countdown-display.html", '<div ng-controller="CountDownCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-countDown" style="width:100%;height:100%;overflow:hidden;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="timer" data="{{module.params.deadtime}}"><span class="day" ng-bind="module.params.leftTimeText.day"></span> <small style="vertical-align:middle;margin:3px">天</small> <span class="hours" ng-bind="module.params.leftTimeText.hour"></span> <small style="vertical-align:middle;margin:3px">时</small> <span class="minutes" ng-bind="module.params.leftTimeText.min"></span> <small style="vertical-align:middle;margin:3px">分</small> <span class="seconds" ng-bind="module.params.leftTimeText.sec"></span> <small style="vertical-align:middle;margin:3px">秒</small></div><script type="text/javascript">$(document).ready(function(){\r\n\t\t\t\t\tsetInterval(function(){\r\n\t\t\t\t\t\tvar timer = $(\'.timer\');\r\n\t\t\t\t\t\tfor (var i = 0; i < timer.length; i++) {\r\n\t\t\t\t\t\t\tvar dead = $(timer.get(i)).attr(\'data\');\r\n\t\t\t\t\t\t\tvar deadtime = dead.replace(/-/g,\'/\');\r\n\t\t\t\t\t\t\tdeadtime = new Date(deadtime).getTime();\r\n\t\t\t\t\t\t\tvar nowtime = Date.parse(Date());\r\n\t\t\t\t\t\t\tvar diff = deadtime - nowtime > 0 ? deadtime - nowtime : 0;\r\n\t\t\t\t\t\t\tvar res = {};\r\n\t\t\t\t\t\t\tres.day = parseInt(diff / (24 * 60 * 60 * 1000));\r\n\t\t\t\t\t\t\tres.hour = parseInt(diff / (60 * 60 * 1000) % 24);\r\n\t\t\t\t\t\t\tres.min = parseInt(diff / (60 * 1000) % 60);\r\n\t\t\t\t\t\t\tres.sec = parseInt(diff / 1000 % 60);\r\n\t\t\t\t\t\t\t$(\'.timer[data="\'+dead+\'"] .day\').text(res.day);\r\n\t\t\t\t\t\t\t$(\'.timer[data="\'+dead+\'"] .hours\').text(res.hour);\r\n\t\t\t\t\t\t\t$(\'.timer[data="\'+dead+\'"] .minutes\').text(res.min);\r\n\t\t\t\t\t\t\t$(\'.timer[data="\'+dead+\'"] .seconds\').text(res.sec);\r\n\t\t\t\t\t\t};\r\n\t\t\t\t\t}, 1000);\r\n\t\t\t\t});<\/script></div><div we7-drag we7-resize we7-rotate></div></div></div>'), e.put("widget-countdown-editor.html", '<div ng-controller="CountDownCtrl"><div class="app-countDown-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><div class="form-group"><label class="col-xs-3 control-label">倒计时截止时</label><div class="col-xs-6"><input type="text" class="form-control" ng-model="activeItem.params.deadtimeToMin" disabled></div><div class="col-xs-3 form-control-static"><span class="date"><a href="javascript:;" we7-date-picker we7-date-value="activeItem.params.deadtime">日期</a></span></div></div></div></div></div></div></div>'), e.put("widget-cube-display.html", '<div ng-controller="CubeCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-cube" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><table><tr ng-repeat="row in module.params.layout" ng-init="rowindex=$index"><td ng-init="colindex=$index" ng-repeat="col in row" class="{{col.classname}} rows-{{col.rows}} cols-{{col.cols}}" ng-class="{\'empty\' : col.isempty, \'not-empty\' : !col.isempty}" rowspan="{{col.rows}}" colspan="{{col.cols}}"><div ng-if="!col.isempty && col.imgurl"><a href="{{col.url}}"><img ng-src="{{col.imgurl}}" width="{{col.cols * 60}}" height="{{col.rows * 60}}"></a></div></td></tr></table></div></div><div we7-drag></div></div></div>'), e.put("widget-cube-editor.html", '<div ng-controller="CubeCtrl"><div class="app-cube-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-3 control-label">布局</label><div class="col-xs-9"><table id="cube-editor"><tr ng-repeat="(x, row) in activeItem.params.layout"><td ng-repeat="(y, col) in row" class="{{col.classname}} rows-{{col.rows}} cols-{{col.cols}}" ng-click="col[\'isempty\'] ? showSelection(x, y) : changeItem(x, y)" ng-class="{\'empty\' : col.isempty, \'not-empty\' : !col.isempty}" rowspan="{{col.rows}}" colspan="{{col.cols}}" x="{{x}}" y="{{y}}"><div ng-if="col.isempty">+</div><div ng-if="!col.imgurl && !col.isempty">{{col.cols * 160}} * {{col.rows * 160}}</div><div ng-if="!col.isempty && col.imgurl"><img ng-src="{{col.imgurl}}" width="{{col.cols * 60}}" height="{{col.rows * 60}}"></div></td></tr></table><span class="help-block">点击"+",添加内容</span><img ng-src="{{col.imgurl}}" width="{{col.cols * 60}}" height="{{col.cols * 60}}"></div></div><div ng-show="activeItem.params.currentLayout.isempty == false" class="add-cube-item card clearfix"><div class="btns"><a href="#" ng-click="removeItem()"><i class="fa fa-times"></i></a></div><div class="form-group"><label class="control-label col-xs-3"><span class="red">*</span>选择图片</label><div class="col-xs-9"><div style="width:50px; height:50px; overflow:hidden; float:left; margin-right:10px"><img ng-src="{{activeItem.params.currentLayout.imgurl}}" id="thumb" width="100%"></div><span ng-click="addItem()"><i class="fa fa-plus-circle green"></i>&nbsp;添加图片</span> <span class="help-block">建议尺寸:{{activeItem.params.currentLayout.cols * 160}} * {{activeItem.params.currentLayout.rows * 160}} 像素</span></div></div><div class="form-group"><label class="control-label col-xs-3">链接</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="activeItem.params.currentLayout.url" we7-my-title="activeItem.params.currentLayout.title"></div></div></div></div></div></div></div></div><div id="modal-cube-layout" class="modal fade in" role="dialog" aria-hidden="false"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h3>选择布局</h3></div><div class="modal-body text-center"><div class="layout-table"><ul class="layout-cols layout-rows-{{col.rows}} clearfix" ng-repeat="row in activeItem.params.selection"><li data-cols="{{col.cols}}" data-rows="{{col.rows}}" ng-click="selectLayout(activeItem.params.currentPos.row, activeItem.params.currentPos.col, col.rows, col.cols)" ng-repeat="col in row"></li></ul></div></div></div></div></div></div>'), e.put("widget-dial-display.html", '<div ng-controller="DialCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-dial" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div ng-repeat="item in module.params.items" ng-if="item.active" style="width:100%;height:100%"><div class="app-dialphone animated" ng-if="item.type==\'text\'" style="width:100%;height:100%"><a ng-href="tel:{{item.tel}}" class="element-link"><div class="element-box" ng-bind="item.title" ng-style="{\'line-height\' : module.params.baseStyle.lineHeight, \'color\' : item.color}"></div></a></div><div ng-if="item.type==\'img\'" style="width:100%;height:100%"><a ng-href="tel:{{item.tel}}" class="element-link" style="width:100%"><img ng-src="{{item.imgurl}}" style="width:100%;height:100%" alt=""></a></div></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'), e.put("widget-dial-editor.html", '<div ng-controller="DialCtrl"><div class="app-dial-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><ul class="nav nav-pills nav-justified"><li ng-class="{active : item.active}" ng-repeat="item in activeItem.params.items"><a ng-href="#{{item.id}}" role="tab" data-toggle="tab" ng-click="changeItem(item);"><button ng-class="{\'btn\' : 1,\'btn-danger\' : item.editcolor==\'danger\', \'btn-warning\' : item.editcolor==\'warning\', \'btn-success\' : item.editcolor==\'success\', \'btn-default\' : item.editcolor==\'default\', \'btn-primary\' : item.editcolor==\'primary\'}"><span ng-if="item.type==\'img\'" class="fa fa-picture-o"></span> <span ng-if="item.id==\'1\'">一键拨号</span> <span ng-if="item.id==\'2\'">热线电话</span> <span ng-if="item.id==\'3\'">拨打电话</span> <span ng-if="item.id==\'4\'">销售专线</span> <span ng-if="item.id==\'5\'">自定义</span></button></a></li></ul><hr><div class="tab-content"><div class="tab-pane active" id="{{item.id}}" ng-repeat="item in activeItem.params.items" ng-if="item.active"><div class="form-group" ng-if="item.type==\'text\'"><label class="col-xs-3 control-label">按钮名称</label><div class="col-xs-9"><input type="text" class="form-control" ng-model="item.title"></div></div><div class="form-group" ng-if="item.type==\'img\'"><label class="col-xs-3 control-label">按钮图片</label><div class="col-xs-9"><div class="img-container"><img ng-src="{{item.imgurl}}" alt=""> <span class="change-img" ng-click="addImage(item);"><span ng-show="item.imgurl">更换</span><span ng-show="!item.imgurl">添加</span>图片</span></div></div></div><div class="form-group"><label class="col-xs-3 control-label">手机/电话</label><div class="col-xs-9"><input type="text" class="form-control" ng-model="item.tel" placeholder="010-8888888"></div></div></div></div></div></div></div></div></div>'), e.put("widget-good-display.html", '<div ng-controller="GoodCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-good" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="element app-good-up" ng-if="module.params.layoutstyle==\'1\'"><div class="counter-container" ng-style="{\'width\': \'100%\', \'height\': \'100%\', \'line-height\' : module.params.baseStyle.lineHeight, \'overflow\' : \'hidden\'}"><i class="fa fa-thumbs-o-up"></i> <span class="counter-num">0</span></div></div><div class="element app-good-up" ng-if="module.params.layoutstyle==\'2\'"><div class="counter-container counter-vertical" style="width:100%; height:100%; line-height:normal;overflow:hidden"><i class="fa fa-thumbs-o-up"></i> <span class="counter-num">0</span></div></div><script type="text/javascript">$(document).ready(function() {\r\n\t\t\t\t\tvar patt = new RegExp(\'c=home&a=page\');\r\n\t\t\t\t\tif (patt.exec(window.location.href)) {\r\n' + "\t\t\t\t\t\t$.post(window.location.href, {'do' : 'getnum'}, function(data) {\r\n\t\t\t\t\t\t\tif (data.message.errno == 0) {\r\n\t\t\t\t\t\t\t\t$('.counter-num').text(data.message.message.goodnum);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}, 'json');\r\n\t\t\t\t\t\t$(\".app-good .element\").click(function() {\r\n\t\t\t\t\t\t\tvar id=GetQueryString(\"id\");\r\n\t\t\t\t\t\t\tif(id !=null && id.toString().length>=1 && localStorage.havegood != id){\r\n\t\t\t\t\t\t\t\t$.post(window.location.href, {'do': 'addnum'}, function(data) {\r\n\t\t\t\t\t\t\t\t\tif (data.message.errno == 0) {\r\n\t\t\t\t\t\t\t\t\t\tvar now = $('.counter-num').text();\r\n\t\t\t\t\t\t\t\t\t\tnow = parseInt(now)+1;\r\n\t\t\t\t\t\t\t\t\t\t$('.counter-num').text(now);\r\n\t\t\t\t\t\t\t\t\t\tlocalStorage.havegood = id;\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t}, 'json');\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\t\t\t\t\t\tfunction GetQueryString(name){\r\n\t\t\t\t\t\t\tvar reg = new RegExp(\"(^|&)\"+ name +\"=([^&]*)(&|$)\");\r\n\t\t\t\t\t\t\tvar r = window.location.search.substr(1).match(reg);\r\n\t\t\t\t\t\t\tif(r!=null)return unescape(r[2]); return null;\r\n\t\t\t\t\t\t}\t\t\t\t\t\t\r\n\t\t\t\t\t};\r\n\t\t\t\t});<\/script></div><div we7-drag we7-resize we7-rotate></div></div></div>"), e.put("widget-good-editor.html", '<div ng-controller="GoodCtrl"><div class="app-good-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><div class="form-group"><label class="col-xs-3 control-label">颜色</label><div class="col-xs-9"><div we7-colorpicker we7-my-color="activeItem.params.baseStyle.color" we7-my-default-color="activeItem.params.baseStyle.color"></div></div></div><div class="form-group"><label class="col-xs-3 control-label">布局</label><div class="col-xs-9"><div class="btn-group"><div ng-class="{\'btn\' : \'1\', \'active\' : activeItem.params.layoutactive==\'lr\',\'btn-default\' : activeItem.params.layoutstyle != \'1\',\'btn-primary\' : activeItem.params.layoutstyle==\'1\'}" ng-click="changeLayout(\'lr\')">左右</div><div ng-class="{\'btn\' : \'1\', \'active\' : activeItem.params.layoutactive==\'ud\',\'btn-default\' : activeItem.params.layoutstyle != \'2\',\'btn-primary\' : activeItem.params.layoutstyle==\'2\'}" ng-click="changeLayout(\'ud\')">上下</div></div></div></div></div></div></div></div></div>'), e.put("widget-header-display.html", '<div ng-controller="HeaderCtrl" we7-nobar><div class="title js-default-content"><h1><span>{{module.params.title}}</span></h1></div></div>'), e.put("widget-header-editor.html", '<div ng-controller="HeaderCtrl" ng-if="activePageIndex == 0"><div class="app-header-setting"><div class="arrow-left"></div><div class="app-header-setting-inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-3 control-label"><span class="red">*</span> 页面名称</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.title" placeholder="微页面标题" class="form-control"></div></div><div class="form-group"><label class="col-xs-3 control-label">页面描述</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.description" placeholder="用户通过微信分享给朋友时,会自动显示页面描述" class="form-control"></div></div><div class="form-group"><label class="col-xs-3 control-label">触发关键字</label><div class="col-xs-9"><input type="text" ng-model="activeItem.params.keyword" class="form-control"> <span class="help-block">用户触发关键字,系统回复此页面的图文链接.不支持多关键字</span></div></div><div class="form-group"><label class="control-label col-xs-3"><span class="red">*</span>封面</label><div class="col-xs-9"><span ng-click="addThumb(\'thumb\')"><i class="fa fa-plus-circle green"></i>&nbsp;选择图片</span><div style="margin-top:.5em" class="input-group" ng-show="activeItem.params.thumb"><img width="150" class="img-responsive img-thumbnail" ng-src="{{activeItem.params.thumb}}"> <em ng-click="activeItem.params.thumb = \'\';" title="删除这张图片" style="position:absolute; top: 0px; right: -14px" class="close">×</em></div><span class="help-block">用于用户触发关键字后,系统回复时的封面图片</span></div></div><div class="form-group"><label class="control-label col-xs-3">快捷菜单</label><div class="col-xs-9" style="margin-top:7px"><input type="checkbox" class="from-control" ng-click="ifCheck()" ng-checked="activeItem.params.bottom_menu"> <span>是否在本专题页面中显示微站快捷菜单</span></div></div></div></div></div></div></div>'), e.put("widget-image-display.html", '<div ng-controller="ImageCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-image" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><img style="width:100%;height:100%" ng-src="{{module.params.items.imgurl}}" alt=""></div><div we7-drag we7-resize we7-rotate></div></div></div>'), e.put("widget-image-editor.html", '<div ng-controller="ImageCtrl"><div class="app-image-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><div class="add-image-item card clearfix" ng-show="activeItem.params.items.imgurl"><div class="col-xs-3 img"><h3 ng-click="changeItem(activeItem.params.items)">重新上传</h3><img ng-src="{{ activeItem.params.items.imgurl }}" width="100%"></div></div><div class="add-image-editor card" ng-click="addItem()" ng-hide="activeItem.params.items.imgurl"><a href="#"><i class="fa fa-plus-circle green"></i>添加一个图片</a></div></div></div></div></div></div>'), e.put("widget-line-display.html", '<div ng-controller="LineCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-line" style="width:100%;height:100%;overflow:hidden;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><hr style="border-top-color:{{module.params.baseStyle.color}}"></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'), e.put("widget-line-editor.html", '<div ng-controller="LineCtrl"><div class="app-line-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body">辅助线(请于左侧拖动缩放调整)</div></div></div></div></div>'), e.put("widget-link-display.html", '<div ng-controller="LinkCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div class="container-link" style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-link js-default-content" ng-if="module.params.items.length == 0" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><div class="list-group"><div class="list-group-item"><a class="clearfix" href="javascript:;"><span class="app-nav-title">点此编辑第1条『关联链接』<i class="pull-right fa fa-angle-right"></i></span></a></div><div class="list-group-item"><a class="clearfix" href="javascript:;"><span class="app-nav-title">点此编辑第2条『关联链接』<i class="pull-right fa fa-angle-right"></i></span></a></div><div class="list-group-item"><a class="clearfix" href="javascript:;"><span class="app-nav-title">点此编辑第n条『关联链接』<i class="pull-right fa fa-angle-right"></i></span></a></div></div></div></div><div ng-if="module.params.items.length != 0"><div class="app-link" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.params.animate}}"><div class="inner"><div class="list-group"><div ng-repeat="item in module.params.items"><div ng-if="item.type == \'1\' && (item.selectCate.pid > 0 || item.selectCate.cid > 0)"><div class="list-group-item" ng-repeat="i in pageSize | limitTo:item.pageSize"><a class="clearfix" href="javascript:;"><span class="app-nav-title">第{{$index+1}}条 {{item.selectCate.name}} 的『关联链接』<i class="pull-right fa fa-angle-right"></i></span></a></div></div><div class="list-group-item" ng-if="item.type == \'2\'"><a class="clearfix" href="{{item.url}}"><span class="app-nav-title">{{item.title}} <i class="pull-right fa fa-angle-right"></i></span></a></div></div></div></div></div></div><div we7-drag></div></div></div>'), e.put("widget-link-editor.html", '<div ng-controller="LinkCtrl"><div class="app-textNav-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="card add-textNav-con" ng-repeat="item in activeItem.params.items"><div class="btns"><a href="javascript:" ng-click="addItem()"><i class="fa fa-plus"></i></a> <a href="javascript:" ng-click="removeItem(item)"><i class="fa fa-times"></i></a></div><div class="form-group"><label class="control-label col-xs-3"><span class="red">*</span> 数据来源</label><div class="col-xs-9"><input id="source-type1" type="radio" value="1" ng-model="item.type" name="link-type-{{$index+0}}" ng-click="changeInnerHeight()"><label class="radio-inline" for="source-type1">分类</label><input id="source-type2" type="radio" value="2" ng-model="item.type" name="link-type-{{$index+0}}" ng-click="changeInnerHeight()"><label class="radio-inline" for="source-type2">自定义</label></div></div><div class="form-group" ng-show="item.type == 2"><label class="control-label col-xs-3"><span class="red">*</span> 导航名称</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-class="{\'red\': item.title == \'\'}" ng-model="item.title"></div></div><div class="form-group" ng-show="item.type == 2"><label class="control-label col-xs-3"><span class="red">*</span> 链接到</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="item.url" we7-my-title="item.title"></div></div></div><div class="form-group" ng-show="item.type == 1"><label class="control-label col-xs-3"><span class="red">*</span>内容来源</label><div class="col-xs-9"><div class="input-group"><div class="form-control-static"><label ng-if="item.selectCate.id != 0" class="label label-success">{{item.selectCate.name}}</label><a href="javascript:;" ng-click="showSearchCateList(item)"><span ng-if="item.selectCate.id == 0">从分类中选择</span><span ng-if="item.selectCate.id != 0">修改</span></a></div></div></div></div><div class="form-group" ng-show="item.type == 1"><label class="control-label col-xs-3">文章属性</label><div class="col-xs-9"><input id="article-attr-type1" type="checkbox" ng-model="item.isnew" value="1" name="attribute"><label class="checkbox-inline" for="article-attr-type1">最新</label><input id="article-attr-type2" type="checkbox" ng-model="item.iscommend" value="1" name="attribute"><label class="checkbox-inline" for="article-attr-type2">推荐</label><input id="article-attr-type3" type="checkbox" ng-model="item.ishot" value="1" name="attribute"><label class="checkbox-inline" for="article-attr-type3">头条</label></div></div><div class="form-group" ng-show="item.type == 1"><label class="control-label col-xs-3">显示条数</label><div class="col-xs-9"><select class="form-control" ng-model="item.pageSize" ng-change="changePageSize(item)"><option value="1">1条</option><option value="2">2条</option><option value="3">3条</option><option value="4">4条</option><option value="5">5条</option><option value="10">10条</option><option value="15">15条</option><option value="20">20条</option><option value="30">30条</option></select></div></div></div><div class="add-textNav card"><a href="javascript:" ng-click="addItem()"><i class="fa fa-plus-circle green"></i> 添加一个导航</a></div></div></div></div></div><div id="modal-search-cate-link" class="modal fade in" role="dialog" aria-hidden="false"><div class="modal-dialog"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3>选择分类</h3></div><div class="modal-body"><table class="table table-hover"><thead class="navbar-inner"><tr><th style="width:60%">标题</th><th style="width:30%; text-align:right"><div class="input-group input-group-sm"><input type="text" class="form-control js-search-cate-keyword"> <span class="input-group-btn"><button ng-click="showSearchCateList(currentItem)" class="btn btn-default" type="button"><i class="fa fa-search"></i></button></span></div></th></tr></thead><tbody ng-repeat="pcate in searchCateList"><tr><td><a href="#">{{pcate.name}}</a></td><td class="text-right"><a class="btn btn-default btn-sm" ng-click="selectCateItem(pcate.id, 0, pcate.name)">选取</a></td></tr><tr ng-repeat="ccate in pcate.children track by $index"><td style="padding-left:50px;height:30px;line-height:30px;background-image:url(\'./resource/images/bg_repno.gif\'); background-repeat:no-repeat; background-position: -245px -540px"><a href="#">{{ccate.name}}</a></td><td class="text-right"><a class="btn btn-default btn-sm" ng-click="selectCateItem(0, ccate.id, ccate.name)">选取</a></td></tr></tbody></table></div></div></div></div></div>'), e.put("widget-navimg-display.html", '<div ng-controller="NavImgCtrl" style="{{module.positionStyle}}min-height:90px;transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-navImg" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner" style="height:100%"><ul class="clearfix" style="height:100%"><li ng-repeat="item in module.params.items" style="height:100%"><a href="{{item.url}}" style="height:100%;width:100%"><span class="nav-img" style="height:80%;width:100%" ng-if="item.imgurl"><img ng-src="{{item.imgurl}}" style="height:100%;width:95%"></span> <span class="title" title="{{item.title}}" style="height:20%;width:100%;line-height:100%">{{item.title}}</span></a></li></ul></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'), e.put("widget-navimg-editor.html", '<div ng-controller="NavImgCtrl"><div class="app-nav-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div ng-repeat="item in activeItem.params.items"><div class="card nav-item clearfix"><div class="col-xs-3 img" ng-if="item.imgurl == \'\'"><span ng-click="changeItem(item)"><i class="fa fa-plus-circle green"></i>&nbsp;添加图片</span></div><div class="col-xs-3 img" ng-if="item.imgurl != \'\'"><h3 ng-click="changeItem(item)">重新上传</h3><img ng-src="{{ item.imgurl }}"></div><div class="col-xs-9"><div class="form-group"><label class="control-label col-xs-3">文字</label><div class="col-xs-9"><input name="title" ng-model="item.title" class="form-control" typel="text" placeholder="文字"></div></div><div class="form-group"><label class="control-label col-xs-3">链接</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="item.url" we7-my-title="item.title"></div></div></div></div></div></div></div></div></div></div></div>'), e.put("widget-notice-display.html", '<div ng-controller="NoticeCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-notice" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><div class="notice-box"><div class="scrollNotice"><span class="js-scroll-notice">公告: {{module.params.notice || \'请填写内容,如果过长,将会在手机上滚动显示!\'}}</span></div></div></div></div><div we7-drag></div></div></div>'), e.put("widget-notice-editor.html", '<div ng-controller="NoticeCtrl"><div class="app-notice-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group" style="margin-bottom:0"><label class="col-xs-2 control-label">公告</label><div class="col-xs-10"><input type="text" ng-model="activeItem.params.notice" value="" class="form-control" placeholder="请填写内容,如果过长,将会在手机上滚动显示"></div></div></div></div></div></div></div>'), e.put("widget-onlytext-display.html", '<div ng-controller="OnlyTextCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-onlyText" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="element" ng-bind="module.params.title" style="overflow:hidden"></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'), e.put("widget-onlytext-editor.html", "<div ng-controller=\"OnlyTextCtrl\"><div class=\"app-onlyText-edit\"><div class=\"arrow-left\"></div><div class=\"inner\"><div class=\"panel panel-default\"><div class=\"panel-body\"><div class=\"form-group\"><label class=\"control-label col-xs-3\">文字</label><div class=\"col-xs-6\"><input ng-model=\"activeItem.params.title\" class=\"form-control\"></div></div><div class=\"form-group\"><label class=\"col-xs-3 control-label\">位置</label><div class=\"col-xs-9\"><div class=\"btn-group\"><div ng-class=\"{'btn' : '1', 'btn-default' : '1', 'active' : activeItem.params.baseStyle.textAlign == 'left', 'btn-primary' : activeItem.params.baseStyle.textAlign == 'left'}\" ng-click=\"changeTextAlign('left')\">左</div><div ng-class=\"{'btn' : '1', 'btn-default' : '1', 'active' : activeItem.params.baseStyle.textAlign == 'center', 'btn-primary' : activeItem.params.baseStyle.textAlign == 'center'}\" ng-click=\"changeTextAlign('center')\">中</div><div ng-class=\"{'btn' : '1', 'btn-default' : '1', 'active' : activeItem.params.baseStyle.textAlign == 'right', 'btn-primary' : activeItem.params.baseStyle.textAlign == 'right'}\" ng-click=\"changeTextAlign('right')\">右</div></div></div></div></div></div></div></div></div>"), e.put("widget-purelink-display.html", '<div ng-controller="PureLinkCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-pureLink" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div ng-repeat="item in module.params.items" ng-if="item.active" style="width:100%;height:100%"><div class="app-pureLink-basic animated" ng-if="item.type==\'text\'" style="width:100%;height:100%"><a ng-href="{{item.url}}" class="element-link"><div class="element-box" ng-bind="item.title" ng-style="{\'line-height\' : module.params.baseStyle.lineHeight, \'color\' : item.color}"></div></a></div><div ng-if="item.type==\'img\'" style="width:100%;height:100%"><a ng-href="{{item.url}}" class="element-link"><img ng-src="{{item.imgurl}}" style="width:100%;height:100%" alt=""></a></div></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'), e.put("widget-purelink-editor.html", '<div ng-controller="PureLinkCtrl"><div class="app-pureLink-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><ul class="nav nav-pills nav-justified"><li ng-class="{active : item.active}" ng-repeat="item in activeItem.params.items"><a ng-href="#{{item.id}}" role="tab" data-toggle="tab" ng-click="changeItem(item);"><button ng-class="{\'btn\' : 1,\'btn-danger\' : item.editcolor==\'danger\', \'btn-warning\' : item.editcolor==\'warning\', \'btn-success\' : item.editcolor==\'success\', \'btn-default\' : item.editcolor==\'default\', \'btn-primary\' : item.editcolor==\'primary\'}"><span ng-if="item.type==\'img\'" class="fa fa-picture-o"></span><span ng-if="item.id==\'1\'">点我购买</span><span ng-if="item.id==\'2\'">点开链接</span><span ng-if="item.id==\'3\'">马上购买</span><span ng-if="item.id==\'4\'">关注我们</span><span ng-if="item.id==\'5\'">自定义</span></button></a></li></ul><hr><div class="tab-content"><div class="tab-pane active" id="{{item.id}}" ng-repeat="item in activeItem.params.items" ng-show="item.active"><div class="form-group" ng-show="item.type==\'text\'"><label class="col-xs-3 control-label">按钮名称</label><div class="col-xs-9"><input type="text" class="form-control" ng-model="item.title"></div></div><div class="form-group" ng-show="item.type==\'img\'"><label class="col-xs-3 control-label">按钮图片</label><div class="col-xs-9"><div class="img-container"><img ng-src="{{item.imgurl}}" alt=""> <span class="change-img" ng-click="addImage(item);"><span ng-show="item.imgurl">更换</span><span ng-show="!item.imgurl">添加</span>图片</span></div></div></div><div class="form-group"><label class="col-xs-3 control-label">网站地址</label><div class="col-xs-6"><input type="text" ng-model="item.url" class="form-control" placeholder="http://example.com"></div><div class="col-xs-3 form-control-static"><a href="http://dwz.cn/" target="_blank">生成短链接</a></div></div></div></div></div></div></div></div></div>'), e.put("widget-reward-display.html", "<div ng-controller=\"RewardCtrl\" style=\"{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)\" we7-context-menu><div style=\"{{module.transform}}width:100%;height:100%\" ng-class=\"{'alock' : module.params.baseStyle.lock}\"><div class=\"app-reward\" style=\"width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}\"><div class=\"element\" ng-style=\"{'width': '100%', 'height': '100%', 'line-height' : module.params.baseStyle.lineHeight}\"><a style=\"width:100%;height:100%;display:block;color:inherit\" href=\"{php echo url('home/page', array('do' => 'reward', 'id' => $id))}\">打赏</a></div></div><div we7-drag we7-resize we7-rotate></div></div></div>"), e.put("widget-reward-editor.html", "<div ng-controller=\"RewardCtrl\"><div class=\"app-reward-edit\"><div class=\"arrow-left\"></div><div class=\"inner\"><div class=\"panel panel-default\"><div class=\"panel-body\"><div class=\"form-group\"><label class=\"col-xs-3 control-label\">文字颜色</label><div class=\"col-xs-9\" ng-my-colorpicker ng-my-color=\"activeItem.params.baseStyle.color\" ng-my-default-color=\"activeItem.params.baseStyle.color\"></div></div><div class=\"form-group\"><label class=\"col-xs-3 control-label\">字号</label><div class=\"col-xs-9\"><div class=\"btn-group\" data-toggle=\"buttons\"><div ng-class=\"{'btn' : '1', 'active' : activeItem.params.fontactive=='big','btn-default' : activeItem.params.fonttype != 'big','btn-primary' : activeItem.params.fonttype=='big'}\" ng-click=\"changeSize('big')\">大</div><div ng-class=\"{'btn' : '1', 'active' : activeItem.params.fontactive=='middle','btn-default' : activeItem.params.fonttype != 'middle','btn-primary' : activeItem.params.fonttype=='middle'}\" ng-click=\"changeSize('middle')\">中</div><div ng-class=\"{'btn' : '1', 'active' : activeItem.params.fontactive=='small','btn-default' : activeItem.params.fonttype != 'small','btn-primary' : activeItem.params.fonttype=='small'}\" ng-click=\"changeSize('small')\">小</div></div></div></div></div></div></div></div></div>"), e.put("widget-richtext-display.html", '<div ng-controller="RichTextCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-richText" style="width:100%;height:100%;word-break:break-all;overflow:hidden;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner" ng-style="{\'padding\' : module.params.isfull ? \'0\' : \'10px\'}" ng-bind-html="trustAsHtml(module.params.content, module.params.params)" ng-if="module.params.content || module.params.params"></div><div class="inner js-default-content" ng-if="!module.params.content && !module.params.params"><p>点此编辑『富文本』内容 ——&gt;</p><p>你可以对文字进行 <strong>加粗</strong>、<em>斜体</em>、<span style="text-decoration: underline">下划线</span>、 <span style="text-decoration: line-through">删除线</span>、文字<span style="color: rgb(0, 176, 240)">颜色</span>、 <span style="background-color: rgb(255, 192, 0); color: rgb(255, 255, 255)">背景色</span>、 以及字号<span style="font-size: 20px">大</span><span style="font-size: 14px">小</span>等简单排版操作。</p><p>还可以在这里加入表格了</p><table class="table-bordered"><tbody><tr><td>中奖客户</td><td>发放奖品</td><td>备注</td></tr><tr><td>猪猪</td><td>内测码</td><td><em><span class="red">已经发放</span></em></td></tr><tr><td>大麦</td><td>积分</td><td><a href="#" target="_blank">领取地址</a></td></tr></tbody></table><p style="text-align: left"><span style="text-align: left">也可在这里插入图片、并对图片加上超级链接,方便用户点击。</span></p></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'), e.put("widget-richtext-editor.html", '<div ng-controller="RichTextCtrl"><div class="app-richText-edit"><div class="arrow-left"></div><div class="app-header-setting-new-inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-3 control-label">是否全屏</label><div class="col-xs-9"><label for="fullScreen" class="checkbox-inline"><input id="fullScreen" name="fullScreen" type="checkbox" ng-model="activeItem.params.isfull">全屏显示</label></div></div><div class="form-group"><div class="col-xs-12"><div we7-editor we7-my-value="activeItem.params.content" we7-my-params="activeItem.params.params"></div></div></div></div></div></div></div></div>'), e.put("widget-shape-display.html", '<div ng-controller="ShapeCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-shape" style="width:100%;height:100%;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div style="width:100%;height:100%" class="element" we7-svger we7-svg="module.params.svgValue"></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'), e.put("widget-shape-editor.html", '<div ng-controller="ShapeCtrl"><div class="app-shape-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body"><div class="shape-editor"><a href="javascript:;" ng-click="addItem()" ng-if="!activeItem.params.svgValue"><i class="fa fa-plus-circle green"></i> &nbsp;填充形状</a> <a href="javascript:;" ng-click="addItem()" ng-if="activeItem.params.svgValue"><i class="fa fa-plus-circle green"></i> &nbsp;修改形状</a></div><div id="shapeModal" class="modal fade" role="dialog" aria-labelledby="gridSystemModalLabel"><div class="modal-dialog modal-lg" role="document"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button><h4 class="modal-title" id="gridSystemModalLabel">形状库<span class="action">矢量素材,可更换颜色,放大不失真</span></h4></div><div class="dialog-content bg_console sound-flex clearfix"><div class="cate-title"><ul class="nav tabs-left"><li><a href="javascript:;" data-toggle="tab">形状库</a></li></ul></div><div class="cate-list bg-rig"><div id="bg_contain"><div class="tab-pane tab-head"><div class="img_list"><div class="category_list clearfix"><ul class="category_list_container clearfix"><li class="category_item" ng-class="{\'active\' : sysCategory.active}" ng-repeat="sysCategory in sysCategoryList" ng-click="getSysCatAndList(sysCategory)" ng-bind="sysCategory.name"></li></ul></div><div class="cat_two_list"><ul ng-repeat="sysCategory in sysCategoryList" ng-if="sysCategory.active"><li class="cat_two_item" ng-class="{\'active\': sysTag.active}" ng-if="sysCategory.id == sysTag.parentid" ng-repeat="sysTag in sysImageTag" ng-click="getSysImgByTag(sysTag);" ng-bind="sysTag.name"></li></ul></div></div></div><div class="img_list"><div class="img_list_container photo_list"><ul class="img_box" style="height:348px"><li ng-if="img.parentid == activeItem.params.imgListActive" ng-repeat="img in currentImageList" style="width: 100px; height: 100px;cursor:pointer; position: relative; display: inline-block; background:50% 50% / contain no-repeat rgb(230, 235, 237)" ng-style="{backgroundImage: \'url(\' + img.imgurl + \')\'}" data-url="{{img.imgurl}}" ng-click="selectSvg($event,img)"></li></ul></div></div></div></div><div class="modal-footer bg-pagination"><div class="fl mr20" ng-show="page.numPages > 1"><ul class="pagination" style="float: left"><li><a href="" ng-click="selectPage(1)">首页</a></li><li><a href="" ng-click="selectPage(page.currentPage - 1)">‹</a></li><li ng-repeat="p in pages track by $index" ng-class="{active: p.active}"><a href="javascript:;" ng-click="selectPage(p.number)" ng-bind="p.number"></a></li><li><a href="" ng-click="selectPage(page.currentPage + 1)">›</a></li><li><a href="" ng-click="selectPage(page.numPages)">尾页</a></li></ul><div class="current_page"><span class="fl">到</span> <input type="text" ng-model="page.toPage" ng-keyup="$event.keyCode == 13 ? getImgByPage() : null"> <span class="fl">页</span> <a ng-click="getImgByPage()" class="go">确定</a></div></div><a class="modal-cancle" ng-click="cancel()">取消</a> <a class="btn btn-primary" ng-click="confirm();">确定</a></div></div></div></div></div></div></div></div></div></div>'), e.put("widget-textnav-display.html", '<div ng-controller="TextNavCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-textNav" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"><div class="list-group mnav-box"><div class="list-group-item" ng-repeat="item in module.params.items" ng-style="{\'background-color\': module.params.baseStyle.backgroundColor}"><a class="clearfix" href="{{item.url}}"><span class="app-nav-title">{{item.title}}<i class="pull-right fa fa-angle-right"></i></span></a></div></div></div></div><div we7-drag></div></div></div>'), e.put("widget-textnav-editor.html", '<div ng-controller="TextNavCtrl"><div class="app-textNav-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="card add-textNav-con" ng-repeat="item in activeItem.params.items"><div class="btns"><a href="javascript:" ng-click="addItem()"><i class="fa fa-plus"></i></a> <a href="javascript:" ng-click="removeItem(item)"><i class="fa fa-times"></i></a></div><div class="form-group"><label class="control-label col-xs-3"><span class="red">*</span> 导航名称</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-class="{\'red\': item.title == \'\'}" ng-model="item.title" value=""></div></div><div class="form-group"><label class="control-label col-xs-3"><span class="red">*</span> 链接到</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="item.url" we7-my-title="item.title"></div></div></div></div><div class="add-textNav card"><a href="javascript:" ng-click="addItem()"><i class="fa fa-plus-circle green"></i> 添加一个文本导航</a></div></div></div></div></div></div>'), e.put("widget-title-display.html", '<div ng-controller="TitleCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-title" style="{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner" style="height:96px"><div ng-if="module.params.template == 1" class="title-detail tradition" style="text-align: {{module.params.tradition.align}}"><h2 class="title-con">{{ module.params.title || "点击编辑『标题』"}}<span ng-if="module.params.tradition.nav.enable == 1" class="title-link">- <a href="{{module.params.tradition.nav.url}}" ng-bind="module.params.tradition.nav.title">文本导航</a></span></h2><p class="sub-title" ng-bind="module.params.tradition.subtitle">副标题</p></div><div ng-if="module.params.template == 2" class="title-detail text-left wx"><h2 class="title-con">{{ module.params.title || "点击编辑『标题』"}}</h2><p class="sub-title"><span class="date" ng-bind="module.params.news.date">2015-03-12</span>&nbsp;&nbsp;<span class="author" ng-bind="module.params.news.author">zhangsan</span>&nbsp;&nbsp;<span><a href="{{module.params.news.url}}" ng-bind="module.params.news.title">微擎团队</a></span></p></div></div></div><div we7-drag></div></div></div>'), e.put("widget-title-editor.html", '<div ng-controller="TitleCtrl"><div class="app-title-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body form-horizontal"><div class="form-group"><label class="col-xs-3 control-label"><span class="red">*</span> 标题名</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-model="activeItem.params.title" value=""></div></div><div class="form-group"><label class="control-label col-xs-3">标题模板</label><div class="col-xs-9"><input type="radio" name="title-style" ng-model="activeItem.params.template" value="1" class="tradition" id="template-type1"><label class="radio-inline" for="template-type1">传统样式</label><input type="radio" name="title-style" ng-model="activeItem.params.template" value="2" class="wx" id="template-type2"><label class="radio-inline" for="template-type2">模仿微信图文页样式</label></div></div><div class="form-group" ng-if="activeItem.params.template == 1"><label class="col-xs-3 control-label">副标题</label><div class="col-xs-6"><input type="text" class="form-control" ng-model="activeItem.params.tradition.subtitle" value=""></div><div class="col-xs-3 form-control-static"><span class="date"><a href="javascript:;" we7-date-picker we7-date-value="activeItem.params.tradition.subtitle">日期</a></span></div></div><div class="form-group" ng-if="activeItem.params.template == 1"><label class="control-label col-xs-3">显示</label><div class="col-xs-9"><input type="radio" name="tra-style" value="left" ng-model="activeItem.params.tradition.align" id="show-type1"><label class="radio-inline" for="show-type1">居左显示</label><input type="radio" name="tra-style" value="center" ng-model="activeItem.params.tradition.align" id="show-type2"><label class="radio-inline" for="show-type2">居中显示</label><input type="radio" name="tra-style" value="right" ng-model="activeItem.params.tradition.align" id="show-type3"><label class="radio-inline" for="show-type3">居右显示</label></div></div><div class="add-textNav card" ng-if="activeItem.params.template == 1 && activeItem.params.tradition.nav.enable == 0"><a href="javascript:" ng-click="changeNavEnable(1)"><i class="fa fa-plus-circle green"></i> 添加一个文本导航</a></div><div class="card" style="padding:20px" ng-if="activeItem.params.template == 1 && activeItem.params.tradition.nav.enable == 1"><div class="btns"><a href="javascript:" ng-click="changeNavEnable(0)"><i class="fa fa-times"></i></a></div><div class="form-group"><label class="col-xs-3 control-label"><span class="red">*</span> 名称</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-model="activeItem.params.tradition.nav.title" value=""></div></div><div class="form-group"><label class="col-xs-3 control-label"><span class="red">*</span> 链接</label><div class="col-xs-9 form-control-static"><div we7-linker we7-my-url="activeItem.params.tradition.nav.url" we7-my-title="activeItem.params.tradition.nav.title"></div></div></div></div><div class="form-group" ng-if="activeItem.params.template == 2"><label class="col-xs-3 control-label">日期</label><div class="col-xs-9"><input type="text" class="form-control" name="" we7-date-picker we7-date-value="activeItem.params.news.date" value=""></div></div><div class="form-group" ng-if="activeItem.params.template == 2"><label class="col-xs-3 control-label">作者</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-model="activeItem.params.news.author" value=""></div></div><div class="form-group" ng-if="activeItem.params.template == 2"><label class="col-xs-3 control-label">链接标题</label><div class="col-xs-9"><input type="text" class="form-control" name="" ng-model="activeItem.params.news.title" value=""></div></div><div class="form-group" ng-if="activeItem.params.template == 2"><label class="control-label col-xs-3">链接地址</label><div class="col-xs-9"><div we7-linker we7-my-url="activeItem.params.news.url" we7-my-title="activeItem.params.news.title"></div></div></div></div></div></div></div></div>'), e.put("widget-white-display.html", '<div ng-controller="WhiteCtrl" style="{{module.positionStyle}}transform:translate3d(0px, 0px, 0px)" we7-context-menu><div style="{{module.transform}}width:100%;height:100%" ng-class="{\'alock\' : module.params.baseStyle.lock}"><div class="app-white" style="width:100%;height:100%;overflow:hidden;{{module.baseStyle}}{{module.borderStyle}}{{module.shadowStyle}}{{module.animationStyle}}"><div class="inner"></div></div><div we7-drag we7-resize we7-rotate></div></div></div>'), e.put("widget-white-editor.html", '<div ng-controller="WhiteCtrl"><div class="app-white-edit"><div class="arrow-left"></div><div class="inner"><div class="panel panel-default"><div class="panel-body">空白高度(请于左侧拖动缩放调整)</div></div></div></div></div>'), e.put("directive-selectmore-module-item.html", '<ul class="app-list"><li class="select" ng-repeat="module in selectModules"><div class="app-info"><img ng-src="{{module.icon}}"><p>{{module.title}}</p></div><div class="cover-dark"><a href="javascript:;" class="cover-delect" ng-click="delModule(module);"><i class="fa fa-minus-circle"></i>删除</a></div><input type="hidden" name="select_modules[]" value="{{module.module}}"> <input type="hidden" name="select_modules_version[]" value="{{module.version}}"></li><li class="select select-more" ng-click="selectMore()"></li></ul><div class="wxapp-modules"><div id="modules-Modal" class="modal fade" tabindex="-1" role="dialog" aria-hidden="true"><div class="modal-dialog modal-dialog-default modal-lg"><div class="modal-content"><div class="modal-header"><button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button><h3><ul role="tablist" class="nav nav-pills" style="font-size:14px; margin-top:-20px"><li role="presentation" class="basic"><a data-toggle="tab" data-type="basic" role="tab" aria-controls="baisc" href="#basic">选择需要打包的应用</a></li></ul></h3></div><div class="modal-body modules-content"><div class="tab-content"><div class="info text-center" ng-show="$scope.apps.length == 0"><i class="fa fa-spinner fa-pulse fa-lg"></i> 数据加载中</div><ul class="app-allow-list"><li ng-repeat="module in wxappModuleList"><div class="app-info"><img ng-src="{{module.logo}}"><p>{{module.title}}</p></div><a href="javascript:;" ng-click="selectModule(module)" class="cover-dark"><i class="fa fa-check cover-selected"></i></a></li></ul></div></div><div class="modal-footer"></div></div></div></div></div>'), e.put("directive-multipage-multipage.html", '<div class="page-navigator"><div class="top-title">页面</div><div class="page-list"><ul><li class="page-menu" ng-repeat="page in allPages track by $index" ng-click="navToPage($index)" ng-init="" ng-class="{\'current\' : page.num-1 == $index}"><div class="page-thumb-block" ng-class="{active : page.active}"><div class="page-thumb"><div class="page-thumb-con"></div></div><div class="page-menu-title" ng-bind="{{$index+1}}"></div><div class="icon icon-remove" ng-click="removePage($index);"><span class="fa fa-trash"></span></div><div class="icon icon-copy" ng-click="copyPage($index, $event);" ng-if="isMultiPage"><span class="fa fa-copy"></span></div></div></li></ul></div><div class="add-blank-page" ng-click="insertPage();" ng-if="isMultiPage">+</div><div class="template hidden"><ul class="nav nav-tabs nav-justified"><li class="active"><a href="#">普通版式</a></li><li><a href="#">统计版式</a></li><li><a href="#">特效版式</a></li></ul><div class="template-area"><div class="template-item"><div class="add-icon"><span class="fa fa-plus-circle"></span></div><div class="text">空白页</div></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div><div class="template-item"><img src="" alt=""></div></div></div></div>')
}]),angular.module("wapeditorApp", ["we7app"]),angular.module("wapeditorApp").controller("CommonCtrl", ["$scope", "$sanitize", function (e, t) {
}]),angular.module("wapeditorApp").directive("we7ContextMenu", ["serviceBase", "$timeout", function (o, r) {
return {
link: function (s, a, e) {
$(".right-hand-menu").length || ($("body").append('<menu class="right-hand-menu"> <li class="menu-item menu-item-del"> <button type="button" class="menu-btn"> <i class="fa fa-folder-open"></i> <span class="menu-text">删除</span> </button> </li> <li class="menu-item menu-item-top"> <button type="button" class="menu-btn"> <i class="fa fa-folder-open"></i> <span class="menu-text">置顶</span> </button> </li> <li class="menu-item menu-item-up"> <button type="button" class="menu-btn"> <i class="fa fa-folder-open"></i> <span class="menu-text">上移一层</span> </button> </li> <li class="menu-item menu-item-down"> <button type="button" class="menu-btn"> <i class="fa fa-folder-open"></i> <span class="menu-text">下移一层</span> </button> </li> <li class="menu-item menu-item-bottom"> <button type="button" class="menu-btn"> <i class="fa fa-folder-open"></i> <span class="menu-text">置底</span> </button> </li> </menu>'), $(".modules").on("contextmenu", function (e) {
e.preventDefault()
}), $(document).on("mouseup", function () {
$(".right-hand-menu").removeClass("show-menu")
}), $(".right-hand-menu").on("click", ".menu-item-del", function () {
var e = $(".right-hand-menu").data("item-index");
o.deleteItem(e), r(function () {
s.$apply()
}, 100)
}).on("click", ".menu-item-top", function () {
s.savePagePosition();
var e, t = $(".right-hand-menu").data("item-index"), a = [];
for (var n in s.activeModules) s.activeModules[n].index == t ? e = angular.copy(s.activeModules[n]) : a.push(s.activeModules[n]);
a.push(e), o.setBaseData("activeModules", a), r(function () {
s.$apply()
}, 100)
}).on("click", ".menu-item-up", function () {
s.savePagePosition();
var e, t, a = $(".right-hand-menu").data("item-index"), n = s.activeModules.length;
for (var i in s.activeModules) if (s.activeModules[i].index == a) {
if (parseInt(i) + 1 == n) break;
e = angular.copy(s.activeModules[i]), t = angular.copy(s.activeModules[parseInt(i) + 1]), s.activeModules[i] = t, s.activeModules[parseInt(i) + 1] = e, o.setBaseData("activeModules", s.activeModules);
break
}
r(function () {
s.$apply()
}, 100)
}).on("click", ".menu-item-down", function () {
s.savePagePosition();
var e, t, a = $(".right-hand-menu").data("item-index");
for (var n in s.activeModules) if (s.activeModules[n].index == a) {
if (n <= 1) break;
e = angular.copy(s.activeModules[n]), t = angular.copy(s.activeModules[n - 1]), s.activeModules[n] = t, s.activeModules[parseInt(n) - 1] = e, o.setBaseData("activeModules", s.activeModules);
break
}
r(function () {
s.$apply()
}, 100)
}).on("click", ".menu-item-bottom", function () {
s.savePagePosition();
var e, t = $(".right-hand-menu").data("item-index"), a = [];
for (var n in s.activeModules) 0 != n && (s.activeModules[n].index == t ? e = angular.copy(s.activeModules[n]) : a.push(s.activeModules[n]));
a.unshift(e), a.unshift(s.activeModules[0]), o.setBaseData("activeModules", a), r(function () {
s.$apply()
}, 100)
})), a.on("contextmenu", function (e) {
!function (e, t) {
var a = $(".right-hand-menu"), n = a.parent().position();
e -= n.left, t -= n.top, a.css({left: e + "px", top: t + "px"}), a.addClass("show-menu")
}(e.pageX, e.pageY);
var t = a.parents("div[id^='module-']").attr("index");
$(".right-hand-menu").data("item-index", t)
})
}
}
}]),angular.module("wapeditorApp").directive("we7Nobar", function () {
return {
link: function (e, t, a) {
t.on("mousedown", function (e) {
$(".bar").hide()
})
}
}
}).directive("we7Drag", ["serviceBase", "$timeout", function (r, e) {
return {
compile: function (e, t) {
var a = $('<div class="bar bar-n ui-resizable-handle ui-resizable-n we7-hide"></div>'),
n = $('<div class="bar bar-s ui-resizable-handle ui-resizable-s we7-hide"></div>'),
i = $('<div class="bar bar-e ui-resizable-handle ui-resizable-e we7-hide"></div>'),
s = $('<div class="bar bar-w ui-resizable-handle ui-resizable-w we7-hide"></div>');
return e.append(a).append(n).append(i).append(s), function (e, t, a) {
var n = t.parents("div[ng-controller$='Ctrl']").eq(0);
n.on("mousedown", function (e) {
$(".bar").hide(), $(this).find(".bar").show(), $(this).find(".bar-radius").show(), $(this).draggable({containment: ""})
}), n.mousedown();
var i = r.getBaseData("activeItem");
if (i.id) {
var s = i.id.replace(/[a-z]/, function (e) {
return e.toLocaleUpperCase()
}).replace(/^[a-z]/, function (e) {
return e.toLocaleUpperCase()
}) + "Ctrl";
if ("HeaderCtrl" != s) {
var o = $("#module-" + i.index).find("div[ng-controller='" + s + "']");
o.on("mousedown", function (e) {
$(".bar").hide(), $(this).find(".bar").show(), $(this).find(".bar-radius").show(), $(this).draggable({containment: ""})
}), o.mousedown()
} else $(".bar").hide()
}
}
}
}
}]).directive("we7Resize", function () {
return {
compile: function (e, t) {
var a = $('<div class="bar-radius radius-s we7-hide"></div>'),
n = $('<div class="bar bar-nw bar-radius radius-s ui-resizable-handle ui-resizable-nw we7-hide"></div>'),
i = $('<div class="bar bar-se bar-radius radius-s ui-resizable-handle ui-resizable-se we7-hide"></div>'),
s = $('<div class="bar bar-sw bar-radius radius-s ui-resizable-handle ui-resizable-sw we7-hide"></div>'),
o = $('<div class="bar bar-ne bar-radius radius-s ui-resizable-handle ui-resizable-ne we7-hide"></div>');
return e.find(".bar-n,.bar-s,.bar-e,.bar-w").append(a), e.append(i).append(s).append(o).append(n), function (e, t, a) {
t.parents("div[ng-controller$='Ctrl']").eq(0).on("mousedown", function (e) {
var t = {
n: $(this).find(".bar-n"),
s: $(this).find(".bar-s"),
e: $(this).find(".bar-e"),
w: $(this).find(".bar-w"),
nw: $(this).find(".bar-nw"),
se: $(this).find(".bar-se"),
sw: $(this).find(".bar-sw"),
ne: $(this).find(".bar-ne")
};
$(this).resizable({handles: t, aspectRatio: !0, onlyCorner: !0})
})
}
}
}
}).directive("we7Rotate", function () {
return {
link: function (l, e, t) {
e.prepend('<div class="bar bar-rotate bar-radius radius-s ui-resizable-handle we7-hide"></div> <div class="bar bar-line ui-resizable-handle we7-hide"></div>');
var n = e.parents("div[ng-controller$='Ctrl']").eq(0);
n.on("mousedown", function (e) {
var s, t = n.find(".bar-rotate").get(0), o = n.children(), a = new Hammer(t), r = {};
a.get("pan").set({threhold: 0}), a.on("panstart", function (e) {
$("body").css({
"user-select": "none",
cursor: 'url("./resource/images/mouserotate.ico"), default'
}), r = {x: o.offset().left + o.width() / 2, y: o.offset().top + o.height() / 2}
}), a.on("panmove", function (e) {
var t = e.center, a = t.x - r.x, n = t.y - r.y + $(window).scrollTop(), i = Math.abs(a / n);
s = Math.atan(i) / (2 * Math.PI) * 360, 0 < a && n < 0 ? s = 360 + s : 0 < a && 0 < n ? s = 180 - s : a < 0 && 0 < n ? s = 180 + s : a < 0 && n < 0 && (s = 360 - s), 360 < s && (s -= 360), s = parseInt(s), o.css({transform: "rotateZ(" + s + "deg)"}), l.activeItem.params.borderStyle.transform = s, l.$apply()
}), a.on("panend", function () {
$("body").css({"user-select": "initial", cursor: "default"})
})
})
}
}
}),angular.module("wapeditorApp").directive("we7EditKeyMap", ["serviceBase", "$timeout", function (s, o) {
return {
restrict: "A", link: function (i, e, t) {
$(document).unbind("keydown").keydown(function (e) {
var t = s.getBaseData("activeModules"), a = s.getBaseData("activeItem"), n = _.findIndex(t, a);
if (46 == e.keyCode && 0 < n && (e.preventDefault(), confirm("删除后需要重新提交才会生效,确认吗?") && (t.splice(n, 1), s.setBaseData({
activeModules: t,
activeItem: t[0]
}))), 37 == e.keyCode || 38 == e.keyCode || 39 == e.keyCode || 40 == e.keyCode) {
_.isEmpty(a) || e.preventDefault();
37 == e.keyCode && (a.params.positionStyle.left -= 1), 38 == e.keyCode && (a.params.positionStyle.top -= 1), 39 == e.keyCode && (a.params.positionStyle.left += 1), 40 == e.keyCode && (a.params.positionStyle.top += 1)
}
o(function () {
i.$apply()
})
}).unbind("keyup").keyup(function () {
i.$apply()
})
}
}
}]),angular.module("wapeditorApp").directive("we7Pagelength", function () {
return {
replace: !0, templateUrl: "directive-pagelength-pagelength.html", link: function (e, t, a) {
}
}
}),angular.module("wapeditorApp").directive("we7Style", ["serviceSetStyle", function (e) {
return {templateUrl: "directive-style-style.html"}
}]),angular.module("wapeditorApp").directive("we7Svger", function () {
return {
scope: {we7svg: "=we7Svg"}, link: function (n, i, e) {
n.$watch("we7svg", function () {
for (var e = $(n.we7svg), t = 0; e.length > t; t++) if ("svg" == e[t].tagName) {
var a = e[t];
$(a).attr({
width: "100%",
height: "100%"
}), $(a)[0].setAttribute("preserveAspectRatio", "none"), i.html(a);
break
}
})
}
}
}),angular.module("wapeditorApp").factory("serviceBase", ["$rootScope", "widget", "config", "serviceCommon", "serviceSetStyle", "$timeout", function (a, s, e, t, o, n) {
var r = {}, l = {
modules: [],
editors: [],
activeModules: [],
index: 0,
activeItem: {},
activeIndex: 0,
pageLength: 1,
isNew: !0
};
return r.setModules = function (e, t) {
if (_.isNull(e) && (l.modules = s), _.isArray(e)) for (i in e) {
var a;
-1 < (n = _.findIndex(s, {id: e[i]})) && (a = angular.copy(s[n]), l.modules.push(a))
}
if (_.isArray(t)) for (i in t) {
var n;
-1 < (n = _.findIndex(l.modules, {id: t[i]})) && (l.modules[n].defaultshow = !0)
}
return l.modules
}, r.setEditors = function (e) {
l.editors.push(e)
}, r.updateActiveModules = function (e, t) {
t && l.activeModules.push({
id: e.id,
name: e.name,
params: angular.copy(e.params),
originParams: angular.copy(e.params),
issystem: e.issystem ? 1 : 0,
index: l.index,
displayorder: e.displayorder ? e.displayorder : l.activeModules.length
})
}, r.initActiveModules = function (e) {
return l.activeModules = e ? angular.copy(e) : [], l.activeModules
}, r.addItem = function (n, i) {
angular.forEach(l.modules, function (e, t) {
if (e.id == n) {
var a = {};
return a = angular.copy(e), -1 == $.inArray(n, l.editors) && (r.setEditors(e.id), r.broadcast("editors")), "header" != n && "UCheader" != n && (a.params = "uc" === i ? o.UcInitStyleParams(e.params) : o.initStyleParams(e.params)), r.updateActiveModules(a, !0), l.activeIndex = _.findIndex(l.activeModules, {index: parseInt(l.index)}), l.activeItem = "uc" === i ? l.activeModules[l.index] : l.activeModules[l.activeIndex], l.index++, r.triggerActiveItem(l.activeIndex), $(".app-text-edit").find(".nav-tabs").find("a[href='#attribute']").click(), r.broadcast("activeItem"), r.broadcast("activeModules"), void ("header" != n && "UCheader" != n && o.initSetStyle(a.params))
}
})
}, r.editItem = function (e) {
-1 < (e = _.findIndex(l.activeModules, {index: parseInt(e)})) && (l.activeIndex = e, l.activeItem = l.activeModules[e]), -1 == $.inArray(l.activeItem.id, l.editors) && (r.setEditors(l.activeItem.id), r.broadcast("editors")), r.triggerActiveItem(e), $(".app-text-edit").find(".nav-tabs").find("a[href='#attribute']").click(), r.broadcast("activeItem")
}, r.deleteItem = function (e) {
if (confirm("删除后需要重新提交才会生效,确认吗?")) {
var t = $("#module-" + e).prev().attr("index");
e = _.findIndex(l.activeModules, {index: parseInt(e)});
l.activeModules = _.without(l.activeModules, l.activeModules[e]), l.activeIndex = _.findIndex(l.activeModules, {index: parseInt(t)}), l.activeItem = l.activeModules[l.activeIndex], r.broadcast("activeItem"), r.broadcast("activeModules")
}
}, r.triggerActiveItem = function (e) {
$("#module-" + l.activeModules[e].index).size() && $("#editor" + l.activeModules[e].id).size() ? clearTimeout(timer) : timer = n(function () {
r.triggerActiveItem(e)
}, 50)
}, r.getBaseData = function (e) {
return l[e]
}, r.setBaseData = function (e, t) {
angular.isObject(e) ? angular.forEach(e, function (e, t) {
l[t] = e
}) : l[e] = t, r.broadcast(e)
}, r.broadcast = function (e) {
switch (e) {
case"activeItem":
a.$broadcast("serviceBase.activeItem.update", l.activeItem);
break;
case"activeModules":
a.$broadcast("serviceBase.activeModules.update", l.activeModules);
break;
case"editors":
a.$broadcast("serviceBase.editors.update", l.editors);
break;
case"modules":
case"index":
case"activeIndex":
case"pageLength":
case"isNew":
break;
default:
angular.isObject(e) && angular.forEach(e, function (e, t) {
switch (t) {
case"activeItem":
a.$broadcast("serviceBase.activeItem.update", l.activeItem);
break;
case"activeModules":
a.$broadcast("serviceBase.activeModules.update", l.activeModules);
break;
case"editors":
a.$broadcast("serviceBase.editors.update", l.editors)
}
})
}
}, r
}]),angular.module("wapeditorApp").service("serviceCommon", ["$window", function (n) {
var a = {
getCssname: function (e) {
for (var t = "", a = 0, n = parseInt(e.length); a < n; a++) -1 != e[a].search(/[A-Z]/) ? t += "-" + e[a].toLowerCase() : t += e[a];
return t
}, getMaxScopeIndex: function (e) {
var t = e[e.length - 1].property, a = 0;
for (var n in t) a = a < t[n].index ? parseInt(t[n].index) : a;
return a
}, getHeaderIndex: function (e) {
var a = 0;
return angular.forEach(e, function (e, t) {
"header" == e.id && (a = t)
}), a
}, url: function (e) {
e = e.split("/");
var t = "./index.php?i=" + n.sysinfo.uniacid + "&j=" + n.sysinfo.acid + "&c=" + e[0];
return e[1] && (t += "&a=" + e[1]), e[2] && (t += "&do=" + e[2]), t
}, tomedia: function (e) {
return n.sysinfo.attachurl + e
}, buildDataTagBegin: function (e, t) {
var a = {params: t, uniacid: n.sysinfo.uniacid, acid: n.sysinfo.acid};
return "{data func='site_widget_" + e + "' module='widget' widgetdata=" + encodeURIComponent(JSON.stringify(a)) + " }"
}, buildDataTagEnd: function () {
return "{/data}"
}, stripHaskey: function (e) {
for (var t in e) "$$hashKey" == t ? delete e[t] : "object" == typeof e[t] && a.stripHaskey(e[t]);
return e
}, copySuccess: function (e, t) {
e = parseInt(e), t = t;
var a = $("#copy-" + e).next().html();
(!a || a.indexOf('<span class="label label-success" style="position:absolute;z-index:10;width:90px;height:34px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>') < 0) && $("#copy-" + e).after(t), setTimeout(function () {
t.remove()
}, 2e3)
}
};
return a
}]),angular.module("wapeditorApp").value("widget", [{
id: "header",
name: "微页面标题",
issystem: !0,
params: {
title: "微页面标题",
description: "",
pageHeight: 568,
thumb: "",
bgColor: "",
bottom_menu: !1,
baseStyle: {},
borderStyle: {},
shadowStyle: {},
positionStyle: {},
animationStyle: {}
}
}, {id: "UCheader", name: "会员主页", issystem: !0, params: {title: "会员主页", cover: "", bgImage: ""}}, {
id: "cardBasic",
name: "会员卡基本设置",
issystem: !0,
params: {
title: "会员卡",
color: {title: "#333", rank: "#333", name: "#333", number: "#333"},
card_level: {type: 1},
card_label: {type: 1, title: "会员卡标题"},
description: "1、本卡采取记名消费方式\n2、持卡人可享受会员专属优惠\n3、本卡不能与其他优惠活动同时使用\n4、持卡人可用卡内余额进行消费",
background: {type: "system", image: util.tomedia("images/global/card/6.png")},
logo: util.tomedia("http://www.baidu.com/img/bdlogo.gif"),
format_type: 1,
format: "WQ2015*****#####***",
fields: [{title: "姓名", require: 1, bind: "realname"}, {title: "手机", require: 1, bind: "mobile"}],
grant: {credit1: 0, credit2: 0, coupon: []},
grant_rate: 0,
offset_rate: 0,
offset_max: 0
}
}, {
id: "cardActivity",
name: "消费优惠设置",
issystem: !0,
params: {discount_type: 0, discount_style: 1, discounts: [], content: "", bgColor: ""}
}, {
id: "cardNums",
name: "会员卡次数设置",
issystem: !0,
params: {
nums_status: 0,
nums_style: 1,
nums_text: "可用次数",
nums: [{recharge: 100, num: 5}, {recharge: 200, num: 10}]
}
}, {
id: "cardTimes",
name: "会员卡计时设置",
issystem: !0,
params: {
times_status: 0,
times_style: 1,
times_text: "截至日期",
times: [{recharge: 100, time: 5}, {recharge: 200, time: 10}]
}
}, {
id: "cardRecharge",
name: "充值优惠设置",
issystem: !0,
params: {
recharge_type: 0,
recharge_style: 1,
grant_rate_switch: 1,
recharges: [{condition: "", back: "", backtype: "0", backunit: "元"}, {
condition: "",
back: "",
backtype: "0",
backunit: "元"
}, {condition: "", back: "", backtype: "0", backunit: "元"}, {
condition: "",
back: "",
backtype: "0",
backunit: "元"
}],
content: "",
bgColor: ""
}
}, {
id: "onlyText",
name: "文字",
isbase: !0,
params: {
title: "请输入文字",
baseStyle: {},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {top: 100, left: 60, width: 200, height: 30}
}
}, {
id: "image",
name: "图片",
isbase: !0,
params: {
items: {id: "", imgurl: ""},
baseStyle: {},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {top: 169, left: 0, width: 100, height: 100}
}
}, {
id: "shape",
name: "形状",
isbase: !0,
params: {
svgValue: "",
baseStyle: {},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {top: 64, left: 0, width: 100, height: 100}
}
}, {
id: "pureLink",
name: "链接",
isbase: !0,
params: {
items: [{
id: "1",
type: "text",
title: "点我购买",
url: "",
color: "#fff",
editcolor: "danger",
discolor: "#d9534f",
active: 1
}, {
id: "2",
type: "text",
title: "点开链接",
url: "",
color: "#fff",
editcolor: "warning",
discolor: "#ec971f",
active: 0
}, {
id: "3",
type: "text",
title: "马上购买",
url: "",
color: "#fff",
editcolor: "success",
discolor: "#449d44",
active: 0
}, {
id: "4",
type: "text",
title: "关注我们",
url: "",
color: "#000",
editcolor: "default",
discolor: "#fff",
active: 0
}, {id: "5", type: "img", title: "自定义", url: "", imgurl: "", editcolor: "primary", discolor: "", active: 0}],
baseStyle: {backgroundColor: "#d9534f", color: "#fff", textAlign: "center", fontSize: "14", lineHeight: "33px"},
borderStyle: {borderWidth: 1, borderRadius: 4, borderStyle: "solid", borderColor: "#ADADAD"},
shadowStyle: {},
animationStyle: {},
positionStyle: {top: 244, left: 0, width: 85, height: 35}
}
}, {
id: "dial",
name: "拨号",
isbase: !0,
params: {
items: [{
id: "1",
type: "text",
title: "一键拨号",
tel: "",
color: "#fff",
editcolor: "danger",
discolor: "#d9534f",
active: 1
}, {
id: "2",
type: "text",
title: "热线电话",
tel: "",
color: "#fff",
editcolor: "warning",
discolor: "#ec971f",
active: 0
}, {
id: "3",
type: "text",
title: "拨打电话",
tel: "",
color: "#fff",
editcolor: "success",
discolor: "#449d44",
active: 0
}, {
id: "4",
type: "text",
title: "销售专线",
tel: "",
color: "#000",
editcolor: "default",
discolor: "#fff",
active: 0
}, {id: "5", type: "img", title: "自定义", tel: "", imgurl: "", editcolor: "primary", discolor: "", active: 0}],
baseStyle: {backgroundColor: "#d9534f", color: "#fff", textAlign: "center", fontSize: "14", lineHeight: "33px"},
borderStyle: {borderWidth: 1, borderRadius: 4, borderStyle: "solid", borderColor: "#ADADAD"},
shadowStyle: {},
animationStyle: {},
positionStyle: {top: 274, left: 100, width: 85, height: 35}
}
}, {
id: "good",
name: "点赞",
isbase: !0,
params: {
bgcolor: "#d15d82",
color: "#fff",
layoutstyle: 1,
layoutactive: "lr",
baseStyle: {
color: "#fff",
backgroundColor: "#d15d82",
fontSize: "14px",
textAlign: "center",
lineHeight: "48px"
},
borderStyle: {borderWidth: 1, borderRadius: 4, borderStyle: "solid", borderColor: "#ADADAD"},
shadowStyle: {},
animationStyle: {},
positionStyle: {width: 150, height: 50, top: 174, left: 70}
}
}, {
id: "countDown",
name: "倒计时",
isbase: !0,
params: {
leftTimeText: {day: 0, hour: 0, min: 0, sec: 0},
deadtime: "",
textalign: "center",
baseStyle: {fontSize: "13px", textAlign: "center", lineHeight: "48px"},
borderStyle: {borderWidth: 1, borderRadius: 4, borderStyle: "solid", borderColor: "#ccc"},
shadowStyle: {},
animationStyle: {},
positionStyle: {top: 315, left: 50}
}
}, {
id: "richText",
name: "富文本",
params: {
bgColor: "",
content: "",
isfull: !1,
baseStyle: {},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {left: 0, top: 10, width: 320, height: 410}
}
}, {
id: "adImg",
name: "幻灯片",
params: {
listStyle: 1,
sizeType: 1,
items: [],
baseStyle: {},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {left: 0, width: 320, height: 80}
}
}, {
id: "cube",
name: "图片魔方",
params: {
layout: {},
showIndex: 0,
selection: {},
currentPos: {},
currentLayout: {isempty: !0},
baseStyle: {},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {left: 0, width: 320, height: 30}
}
}, {
id: "title",
name: "标题",
params: {
title: "",
template: 1,
tradition: {subtitle: "", align: "left", nav: {title: "", url: "", enable: 0}},
news: {date: "", author: "", title: "", urlType: 1, url: ""},
baseStyle: {},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {left: 0, width: 320, height: 96}
}
}, {
id: "textNav",
name: "文本导航",
params: {
items: [],
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {left: 0, width: 320, height: 30}
}
}, {
id: "navImg",
name: "图片导航",
params: {
items: [{imgurl: "", title: "", url: ""}, {imgurl: "", title: "", url: ""}, {
imgurl: "",
title: "",
url: ""
}, {imgurl: "", title: "", url: ""}],
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {left: 0, width: 320, height: 100}
}
}, {
id: "link",
name: "关联链接",
params: {
items: [],
baseStyle: {lineHeight: "inherit"},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {left: 0, width: 320, height: 100}
}
}, {
id: "line",
name: "辅助线",
params: {baseStyle: {}, borderStyle: {}, shadowStyle: {}, animationStyle: {}, positionStyle: {height: 30}}
}, {
id: "white",
name: "辅助空白",
params: {
baseStyle: {},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {left: 0, width: 320, height: 20}
}
}, {
id: "audio",
name: "语音",
params: {
style: "1",
headimg: "",
align: "left",
title: "",
isloop: !1,
reload: "false",
audio: {id: "", url: ""},
baseStyle: {},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {left: 0, width: 320, height: 60}
}
}, {
id: "notice",
name: "公告",
params: {
notice: "",
baseStyle: {backgroundColor: "#ffc"},
borderStyle: {},
shadowStyle: {},
animationStyle: {},
positionStyle: {left: 0, width: 320, height: 40}
}
}]),angular.module("wapeditorApp").service("serviceDrag", function () {
console.log("serviceDrag")
}),angular.module("wapeditorApp").service("serviceSetStyle", ["$rootScope", "$timeout", "serviceCommon", "config", function (l, s, i, e) {
var o = {}, a = 1;
return o.defBaseStyle = {
backgroundColor: "rgba(0,0,0,0)",
color: "#000",
opacity: 0,
paddingTop: 0,
lineHeight: 2,
fontSize: 14,
textAlign: "left",
lock: !1
}, o.defBorderStyle = {
borderWidth: 0,
borderRadius: 2,
borderStyle: "solid",
borderColor: "rgba(0,0,0,1)",
transform: 0
}, o.defShadowStyle = {
shadowSize: 0,
shadowBlur: 0,
shadowColor: "rgba(0,0,0,0.5)",
shadowDirection: 1
}, o.defAnimationStyle = {
animationName: "noEffect",
animationDuration: 1,
animationTimingFunction: "ease",
animationDelay: .6,
animationFillMode: "both"
}, o.defPositionStyle = {top: 259, left: 40, width: 240, height: 50}, o.initStyleParams = function (e) {
var t = {};
return (t = angular.copy(e)).baseStyle = $.extend(!1, o.defBaseStyle, e.baseStyle), t.borderStyle = $.extend(!1, o.defBorderStyle, e.borderStyle), t.shadowStyle = $.extend(!1, o.defShadowStyle, e.shadowStyle), t.animationStyle = $.extend(!1, o.defAnimationStyle, e.animationStyle), t.positionStyle = $.extend(!1, o.defPositionStyle, e.positionStyle), 0 < $(".app-preview").scrollTop() && (t.positionStyle.top += parseInt($(".app-preview").scrollTop())), 200 < t.positionStyle.left ? t.positionStyle.left = 10 : t.positionStyle.left += 5 * a, t.positionStyle.top += 5 * a, 20 < a ? a = 1 : a++, t
}, o.UcInitStyleParams = function (e) {
var t = {};
return (t = angular.copy(e)).baseStyle = $.extend(!1, o.defBaseStyle, e.baseStyle), t.borderStyle = $.extend(!1, o.defBorderStyle, e.borderStyle), t.shadowStyle = $.extend(!1, o.defShadowStyle, e.shadowStyle), t.animationStyle = $.extend(!1, o.defAnimationStyle, e.animationStyle), t.positionStyle = $.extend(!1, o.defPositionStyle, e.positionStyle), 0 < $(".app-preview").scrollTop() && (t.positionStyle.top += parseInt($(".app-preview").scrollTop())), 200 < t.positionStyle.left ? t.positionStyle.left = 10 : t.positionStyle.left += 5 * a, t.positionStyle.top += 5 * a - $(".app-usercenter").height(), 10 < a ? a = 1 : a++, t
}, o.initSetStyle = function (e) {
o.setModuleBaseStyle(e.baseStyle), o.setModuleBorderStyle(e.borderStyle), o.setModuleShadowStyle(e.shadowStyle), o.setModulePositionStyle(e.positionStyle), o.setModuleAnimationStyle(e.animationStyle)
}, o.setModuleBaseStyle = function (e) {
e = $.extend(!1, o.defBaseStyle, e);
var t = "";
for (var a in e) switch (a) {
case"fontSize":
"number" == typeof e[a] ? t += i.getCssname(a) + ":" + parseInt(e[a]) + "px;" : e[a].search(/rem/) ? t += i.getCssname(a) + ":14px;" : t += i.getCssname(a) + ":" + parseInt(e[a]) + "px;";
case"paddingTop":
case"paddingBottom":
t += i.getCssname(a) + ":" + parseInt(e[a]) + "px;";
break;
case"backgroundColor":
case"color":
case"textAlign":
case"lineHeight":
t += i.getCssname(a) + ":" + e[a] + ";";
break;
case"opacity":
t += i.getCssname(a) + ":" + (100 - parseInt(e[a])) / 100 + ";"
}
l.$broadcast("serviceBase.activeItem.style.update", "baseStyle", e, t)
}, o.setModuleBorderStyle = function (e) {
e = $.extend(!1, o.defBorderStyle, e);
var t = newTransformStyle = "";
for (var a in e) switch (a) {
case"borderWidth":
case"borderRadius":
t += i.getCssname(a) + ":" + parseInt(e[a]) + "px;";
break;
case"borderStyle":
case"borderColor":
t += i.getCssname(a) + ":" + e[a] + ";";
break;
case"transform":
newTransformStyle += "transform: rotateZ(" + parseInt(e[a]) + "deg);"
}
l.$broadcast("serviceBase.activeItem.style.update", "borderStyle", e, t, newTransformStyle)
}, o.setModuleShadowStyle = function (e) {
e = $.extend(!1, o.defShadowStyle, e);
var t, a = shadowY = 0;
a = -Math.sin(e.shadowDirection * Math.PI / 180) * e.shadowSize, shadowY = Math.cos(e.shadowDirection * Math.PI / 180) * e.shadowSize, t = "box-shadow: " + a + "px " + shadowY + "px " + e.shadowBlur + "px " + e.shadowColor + ";", l.$broadcast("serviceBase.activeItem.style.update", "shadowStyle", e, t)
}, o.setModuleAnimationStyle = function (e) {
var t,
a = (e = $.extend(!1, o.defAnimationStyle, e)).animationName + " " + e.animationDuration + "s " + e.animationTimingFunction + " " + e.animationDelay + "s " + e.animationFillMode;
t = o.cssCompatible("animation", a), l.$broadcast("serviceBase.activeItem.style.update", "animationStyle", e, t)
}, o.setModulePositionStyle = function (e) {
e = $.extend(!1, o.defPositionStyle, e);
var t = "position:absolute;";
for (var a in e) switch (a) {
case"top":
case"left":
case"width":
case"height":
t += " " + a + ": " + e[a] + "px;"
}
l.$broadcast("serviceBase.activeItem.style.update", "positionStyle", e, t)
}, o.clearModuleStyle = function (e) {
e.params.baseStyle = e.originParams.baseStyle, e.params.borderStyle = e.originParams.borderStyle, e.params.shadowStyle = e.originParams.shadowStyle, e.params.animationStyle = e.originParams.animationStyle, l.$broadcast("serviceBase.activeItem.update", e)
}, o.eleAnimationIns = function (e) {
var t = i.getCssname(e);
s(function () {
$("." + t).parent().addClass("select").siblings(".select").removeClass("select")
}, 100), l.$broadcast("serviceBase.activeItem.animationName.update", e)
}, o.savePagePosition = function (r) {
$(".modules").find("div.ng-scope[ng-controller$='Ctrl']").each(function () {
var e = $(this).parent().parent(), t = _.findIndex(r, {index: parseInt(e.attr("index"))}),
a = $(this).css("top"), n = $(this).css("left"), i = $(this).css("width"), s = $(this).css("height"),
o = "position:absolute;top:" + a + ";left:" + n + ";width:" + i + ";height:" + s + ";";
r[t].params.positionStyle.top = parseInt(a), r[t].params.positionStyle.left = parseInt(n), r[t].params.positionStyle.width = parseInt(i), r[t].params.positionStyle.height = parseInt(s), r[t].positionStyle = o
}), l.$broadcast("serviceBase.activeModules.update", r)
}, o.saveModulePosition = function (e) {
var t = "#module-" + e.index, a = $(t).find("div.ng-scope[ng-controller$='Ctrl']"), n = a.css("top"),
i = a.css("left"), s = a.css("width"), o = a.css("height"),
r = "position:absolute;top:" + n + ";left:" + i + ";width:" + s + ";height:" + o + ";";
return e.params.positionStyle.top = parseInt(n), e.params.positionStyle.left = parseInt(i), e.params.positionStyle.width = parseInt(s), e.params.positionStyle.height = parseInt(o), e.positionStyle = r, l.$broadcast("serviceBase.activeItem.update", e), e
}, o.changeTextAlign = function (e, t) {
e.params.baseStyle.textAlign = t, l.$broadcast("serviceBase.activeItem.update", e)
}, o.changeBorderWidth = function (t) {
"adImg" != t.id && "cube" != t.id && "title" != t.id && "textNav" != t.id && "link" != t.id && "audio" != t.id || s(function () {
var e = o.saveModulePosition(t);
e.positionStyle.height += 2 * e.borderStyle.borderWidth, "audio" == t.id && (e.positionStyle.height += 20), o.setModulePositionStyle(e.params.positionStyle)
}, 100)
}, o.changeInnerHeight = function (i) {
s(function () {
var e = o.saveModulePosition(i), t = e.index, a = $("#module-" + t).find(".inner"),
n = parseInt(a.css("height"));
n += 2 * e.params.borderStyle.borderWidth, e.params.positionStyle.height = n, o.setModulePositionStyle(e.params.positionStyle)
}, 100)
}, o.changePageLength = function (e, t) {
var a = !(1 < (e = parseInt(e))), n = e;
return s(function () {
$(".app-content").css("height", 568 * e + "px")
}, 100), t[i.getHeaderIndex(t)].params.pageLength = e, l.$broadcast("updateScope", {
isMultiPage: a,
pageLength: n,
activeModules: t
}), t
}, o.cssCompatible = function (e, t) {
if (angular.isString(e) && angular.isString(t)) return e + ": " + t + ";-webkit-" + e + ": " + t + ";-moz-" + e + ": " + t + ";-o-" + e + ": " + t + ";-ms-" + e + ": " + t + ";"
}, o
}]),angular.module("wapeditorApp").service("serviceSubmit", ["serviceBase", "serviceCommon", function (n, g) {
var e = {
submit: function () {
var p = "", e = {params: {}, html: ""}, t = $($(".modules").html()), m = n.getBaseData("activeModules");
t.find("div.ng-scope[ng-controller$='Ctrl']").each(function () {
var e = _.findIndex(m, {index: parseInt($(this).parent().parent().attr("index"))}),
t = $(this).find("div[class^='app-']").get(0), a = $(t).attr("style");
m[e].params.animate = m[e].params.animateTemp, a += "animation:" + m[e].params.animate + ";", $(t).attr("style", a);
var n, i = angular.copy(m[e].params);
$(this).find(".js-default-content").remove();
var s = $(this).parent().parent().attr("name").toLowerCase();
if ("UCheader" != s && "cardBasic" != s && "cardActivity" != s && "cardNums" != s && "cardTimes" != s && "cardRecharge" != s) {
var o = $(this).css("top"), r = $(this).css("left"), l = $(this).css("width"),
c = $(this).css("height"),
u = "position:absolute;top:" + o + ";left:" + r + ";width:" + l + ";height:" + c + ";";
m[e].params.positionStyle.top = parseInt(o), m[e].params.positionStyle.left = parseInt(r), m[e].params.positionStyle.width = parseInt(l), m[e].params.positionStyle.height = parseInt(c), m[e].positionStyle = u
}
switch (s) {
case"link":
var d = this;
angular.forEach(i.items, function (e, t) {
(e.selectCate.pid || e.selectCate.cid) && $(d).find(".list-group").children().eq(t).replaceWith("<div>" + g.buildDataTagBegin("link", e) + '<div class="list-group-item ng-scope"><a href="{$row[url]}" class="clearfix"><span class="app-nav-title"> {$row[title]}<i class="pull-right fa fa-angle-right"></i></span></a></div>' + g.buildDataTagEnd() + "</div>")
});
break;
case"richtext":
m[e] && (m[e].params.content = "")
}
if (n = $(this).html(), "header" != s) {
u = $(this).attr("style");
p += '<div type="' + s + '" style="' + u + '">' + n + "</div>"
}
e++
});
var a = m[0].params.bgColor;
return p = (p = (p = (p = '<div class="js-design-page" style="background-color:' + a + '">' + p + "</div>").replace(/<\!\-\-([^-]*?)\-\->/g, "")).replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g, "")).replace(/ ng\-[a-zA-Z]+/g, ""), e.html = p, e.params = angular.copy(m), g.stripHaskey(e.params), e
}
};
return e
}]),angular.module("wapeditorApp").service("serviceUpwardCompatible", ["$rootScope", "$timeout", "orderByFilter", function (e, t, o) {
var a = {
compatibility: function (e) {
for (var t in void 0 !== e[0].params.pageHeight && (e[0].params.pageLength = Math.ceil(e[0].params.pageHeight / 568)), e = o(e, "displayorder")) {
e[t].params.baseStyle instanceof Array && (e[t].params.baseStyle = {}), e[t].params.borderStyle instanceof Array && (e[t].params.borderStyle = {}), e[t].params.shadowStyle instanceof Array && (e[t].params.shadowStyle = {}), e[t].params.positionStyle instanceof Array && (e[t].params.positionStyle = {});
var a = angular.copy(e[t].params);
if (e[t].animationStyle = "", e[t].params.animationStyle = {}, e[t].params.animate) {
var n = e[t].params.animate.match(/(\w+)\s1/);
n = n ? n[1] : "noEffect", e[t].params.animationStyle.name = n
} else e[t].params.animationStyle.name = "noEffect";
switch (e[t].params.animationStyle = {
name: e[t].params.animationStyle.name,
speed: 1,
delay: .6
}, e[t].animationStyle = "animation: " + e[t].params.animate + ";", e[t].params.positionStyle = _.isEmpty(e[t].params.positionStyle) ? {} : e[t].params.positionStyle, e[t].params.baseStyle = _.isEmpty(e[t].params.baseStyle) ? {} : e[t].params.baseStyle, e[t].params.borderStyle = _.isEmpty(e[t].params.borderStyle) ? {} : e[t].params.borderStyle, e[t].params.shadowStyle = _.isEmpty(e[t].params.shadowStyle) ? {} : e[t].params.shadowStyle, e[t].baseStyle = "", e[t].borderStyle = "", e[t].shadowStyle = "", e[t].positionStyle = "", e[t].id) {
case"onlyText":
e[t].params.baseStyle.textAlign = a.postype, e[t].params.baseStyle.fontSize = a.baseStyle.fontsize, e[t].params.baseStyle.lineHeight = a.baseStyle.lineheight, e[t].params.positionStyle.left = a.positionStyle.marginleft ? a.positionStyle.marginleft : 0, e[t].params.positionStyle.width = a.positionStyle.width ? a.positionStyle.width : 290, e[t].params.positionStyle.height = a.positionStyle.height ? a.positionStyle.height : 0, e[t].baseStyle = "font-size:" + a.baseStyle.fontsize + "px;text-align:" + a.postype + ";line-height:" + a.baseStyle.lineheight + ";";
break;
case"image":
e[t].params.positionStyle.left = a.positionStyle.marginleft ? a.positionStyle.marginleft : 0, e[t].params.positionStyle.width = a.positionStyle.width ? a.positionStyle.width : 0, e[t].params.positionStyle.height = a.positionStyle.height ? a.positionStyle.height : 0;
break;
case"shape":
e[t].params.positionStyle.left = a.positionStyle.marginleft ? a.positionStyle.marginleft : 0, e[t].params.positionStyle.width = a.positionStyle.width ? a.positionStyle.width : 100, e[t].params.positionStyle.height = a.positionStyle.height ? a.positionStyle.height : 0;
break;
case"pureLink":
case"dial":
for (var i in e[t].params.baseStyle.fontSize = a.baseStyle.fontsize ? a.baseStyle.fontsize + "px" : "14px", e[t].params.baseStyle.textAlign = "center", a.items) if (1 == a.items[i].active) {
e[t].params.baseStyle.backgroundColor = a.items[i].discolor, e[t].params.baseStyle.color = a.items[i].color;
break
}
e[t].params.positionStyle.left = a.positionStyle.marginleft ? a.positionStyle.marginleft : 0, e[t].params.positionStyle.width = a.positionStyle.width ? a.positionStyle.width : 320 - a.positionStyle.marginleft, e[t].params.positionStyle.height = a.positionStyle.height ? a.positionStyle.height : 35, e[t].params.baseStyle.lineHeight = e[t].params.positionStyle.height + "px", e[t].params.borderStyle.borderWidth = 1, e[t].params.borderStyle.borderRadius = 8, e[t].params.borderStyle.borderStyle = "solid", e[t].params.borderStyle.borderColor = "#ADADAD", e[t].baseStyle = "font-size:" + e[t].params.baseStyle.fontSize + ";text-align:center;background-color:" + a.items[i].discolor + ";color:" + a.items[i].color + ";line-height:" + e[t].params.baseStyle.lineHeight + ";", e[t].borderStyle = "border-radius:8px; border-width: 1px;border-style: solid;border-color: #ADADAD;";
break;
case"good":
e[t].params.baseStyle.fontSize = a.baseStyle.fontsize + "px", e[t].params.baseStyle.textAlign = "center", e[t].params.baseStyle.color = a.color, e[t].params.baseStyle.backgroundColor = "#d15d82", e[t].params.borderStyle.borderRadius = 5, e[t].params.positionStyle.left = a.positionStyle.marginleft ? a.positionStyle.marginleft : 0, e[t].params.positionStyle.width = a.positionStyle.width ? a.positionStyle.width : 320 - a.positionStyle.marginleft, 1 == a.layoutstyle ? e[t].params.positionStyle.height = a.positionStyle.height ? a.positionStyle.height : 35 : e[t].params.positionStyle.height = a.positionStyle.height ? a.positionStyle.height : 54, e[t].params.baseStyle.lineHeight = e[t].params.positionStyle.height + "px", e[t].baseStyle = "font-size:" + e[t].params.baseStyle.fontSize + ";text-align:center;background-color:#d15d82;color:" + a.color + ";line-height:" + e[t].params.baseStyle.lineHeight + ";", e[t].borderStyle = "border-radius:5px;";
break;
case"countDown":
e[t].params.baseStyle.fontSize = a.baseStyle.fontsize + "px", e[t].params.baseStyle.textAlign = "center", e[t].params.positionStyle.left = a.positionStyle.marginleft ? a.positionStyle.marginleft : 0, e[t].params.positionStyle.width = a.positionStyle.width ? a.positionStyle.width : 320, e[t].params.positionStyle.height = a.positionStyle.height ? a.positionStyle.height : 35, e[t].params.baseStyle.lineHeight = e[t].params.positionStyle.height + "px", e[t].params.borderStyle.borderWidth = 1, e[t].params.borderStyle.borderStyle = "solid", e[t].params.borderStyle.borderColor = "#ccc", e[t].baseStyle = "font-size:" + e[t].params.baseStyle.fontSize + ";text-align:center;line-height:" + e[t].params.baseStyle.lineHeight + ";", e[t].borderStyle = "border-width: 1px;border-style: solid;border-color: #ccc;";
break;
case"title":
e[t].params.baseStyle.backgroundColor = a.tradition.bgcolor, e[t].baseStyle = "background-color:" + a.tradition.bgcolor + ";";
case"white":
e[t].params.positionStyle.height = e[t].params.height;
case"richText":
case"adImg":
case"cube":
case"textNav":
case"navImg":
case"link":
case"line":
case"audio":
case"notice":
void 0 !== a.positionStyle ? e[t].params.positionStyle.left = a.positionStyle.marginleft ? a.positionStyle.marginleft : 0 : e[t].params.positionStyle.left = 0, e[t].params.positionStyle.width = 320
}
var s = "";
heightStyle = "", e[t].params.positionStyle.width && (s = "width:" + e[t].params.positionStyle.width + "px;"), e[t].params.positionStyle.height && (heightStyle = "height:" + e[t].params.positionStyle.height + "px;"), e[t].positionStyle = "position:relative;left:" + e[t].params.positionStyle.left + "px;" + s + heightStyle, void 0 !== a.positionStyle ? e[t].marginTop = a.positionStyle.margintop ? a.positionStyle.margintop : 0 : e[t].marginTop = 0
}
return e
}
};
return a
}]),angular.module("wapeditorApp").controller("AdImgCtrl", ["$scope", function (n) {
n.addItem = function () {
require(["fileUploader"], function (e) {
e.show(function (e) {
n.activeItem.params.items.push({
id: e.id,
imgurl: e.url,
title: "",
url: "",
isactive: !1
}), $.each(n.activeItem.params.items, function (e, t) {
n.activeItem.params.items[0].isactive = 0 == e
}), n.$apply("activeItem"), n.changeInnerHeight()
}, {direct: !0, multiple: !1})
})
}, n.removeItem = function (e) {
for (i in index = $.inArray(e, n.activeItem.params.items), items = _.clone(n.activeItem.params.items), n.activeItem.params.items = [], items) i != index && n.activeItem.params.items.push(items[i]);
n.changeInnerHeight()
}, n.addEmpty = function () {
n.activeItem.params.items.push({imgurl: "", title: "", url: ""}), n.changeInnerHeight()
}, n.changeItem = function (a) {
require(["fileUploader"], function (e) {
e.init(function (e) {
var t = $.inArray(a, n.activeItem.params.items);
-1 < t && (n.activeItem.params.items[t].id = e.id, n.activeItem.params.items[t].imgurl = e.url, n.$apply())
}, {direct: !0, multiple: !1})
}), n.changeInnerHeight()
}
}]),angular.module("wapeditorApp").controller("AudioCtrl", ["$scope", function (a) {
a.addAudioItem = function () {
require(["fileUploader"], function (e) {
e.init(function (e) {
e && (a.activeItem.params.audio.id = e.id, a.activeItem.params.audio.url = e.attachment, a.$apply(), $(".audio-player-play").click(function () {
var e = a.activeItem.params.audio.url;
if (e) {
$("#player").remove();
var t = $('<div id="player"></div>');
$(document.body).append(t), t.data("control", $(this)), t.jPlayer({
playing: function () {
$(this).data("control").find("i").removeClass("fa-play").addClass("fa-stop")
},
pause: function (e) {
$(this).data("control").find("i").removeClass("fa-stop").addClass("fa-play")
},
swfPath: "resource/components/jplayer",
supplied: "mp3,wma,wav,amr",
solution: "html, flash"
}), t.jPlayer("setMedia", {mp3: e}).jPlayer("play"), $(this).find("i").hasClass("fa-stop") ? t.jPlayer("stop") : t.jPlayer("setMedia", {mp3: e}).jPlayer("play")
}
}).show())
}, {direct: !0, multiple: !1, type: "audio"})
})
}, a.addImgItem = function () {
require(["fileUploader"], function (e) {
e.init(function (e) {
a.activeItem.params.headimg = e.url, a.$apply()
}, {direct: !0, multiple: !1})
})
}, a.changeInnerHeight = function () {
a.changeInnerHeight()
}
}]),angular.module("wapeditorApp").controller("CountDownCtrl", ["$scope", "$timeout", function (s, a) {
s.$watch("activeItem.params.deadtime", function (e, t) {
if (s.activeItem.params.leftTimeText = {day: 0, hour: 0, min: 0, sec: 0}, e && void 0 !== e && 0 != e) {
var a = e.replace(/:/g, "-"), n = (a = a.replace(/ /g, "-")).split("-");
dtime = new Date(Date.UTC(n[0], n[1] - 1, n[2], n[3] - 8, n[4], n[5])), dtime = parseInt(dtime.getTime()), d = new Date(dtime)
} else {
var i = Date.parse(new Date);
dtime = parseInt(2592e6 + i), d = new Date(dtime)
}
s.activeItem.params.deadtime = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + " " + d.getHours() + ":" + d.getMinutes() + ":" + d.getSeconds(), s.activeItem.params.deadtimeToMin = d.getFullYear() + "-" + (d.getMonth() + 1) + "-" + d.getDate() + " " + d.getHours() + ":" + d.getMinutes(), o()
});
var o = function () {
var e = Date.parse(new Date), t = 0 < dtime - e ? dtime - e : 0;
s.activeItem.params.leftTimeText.day = parseInt(t / 864e5), s.activeItem.params.leftTimeText.hour = parseInt(t / 36e5 % 24), s.activeItem.params.leftTimeText.min = parseInt(t / 6e4 % 60), s.activeItem.params.leftTimeText.sec = parseInt(t / 1e3 % 60), a(o, 1e3)
}
}]),angular.module("wapeditorApp").controller("CubeCtrl", ["$scope", function (o) {
if (o.activeItem.params && o.activeItem.params.layout && _.isEmpty(o.activeItem.params.layout)) for (row = 0; row < 4; row++) for (o.activeItem.params.layout[row] = {}, col = 0; col < 4; col++) o.activeItem.params.layout[row][col] = {
cols: 1,
rows: 1,
isempty: !0,
imgurl: "",
classname: ""
};
$(".layout-table").bind("mouseover", function (e) {
if ("LI" == e.target.tagName) {
$(".layout-table li").removeClass("selected");
var a = $(e.target).attr("data-rows"), n = $(e.target).attr("data-cols");
$(".layout-table li").filter(function (e, t) {
return $(t).attr("data-rows") <= a && $(t).attr("data-cols") <= n
}).addClass("selected")
}
}), o.activeItem.params.currentLayout = {}, o.showSelection = function (e, t) {
o.activeItem.params.currentPos = {row: e, col: t}, o.activeItem.params.selection = {};
var a = -1, n = 1;
for (i = e; i < 4; i++) {
for (y = 1, o.activeItem.params.selection[n] = {}, j = t; j < 4; j++) 0 <= a && a < j || (!_.isUndefined(o.activeItem.params.layout[i][j]) && o.activeItem.params.layout[i][j].isempty ? (o.activeItem.params.selection[n][y] = {
rows: n,
cols: y
}, y++) : a = j - 1);
n++
}
return $(".layout-table li").removeClass("selected"), o.modalobj = $("#modal-cube-layout").modal({show: !0}), !0
}, o.selectLayout = function (e, t, a, n) {
for (_.isUndefined(a) && (a = 0), _.isUndefined(n) && (n = 0), o.activeItem.params.layout[e][t] = {
cols: n,
rows: a,
isempty: !1,
imgurl: "",
classname: "index-" + o.activeItem.params.showIndex
}, i = e; i < parseInt(e) + parseInt(a); i++) for (j = t; j < parseInt(t) + parseInt(n); j++) e == i && t == j || delete o.activeItem.params.layout[i][j];
return o.activeItem.params.showIndex++, o.modalobj.modal("hide"), o.changeItem(e, t), !0
}, o.addItem = function (e, t) {
require(["fileUploader"], function (e) {
e.show(function (e) {
o.activeItem.params.currentLayout.id = e.id, o.activeItem.params.currentLayout.imgurl = e.url, o.$apply(), o.changeInnerHeight()
}, {direct: !0, multiple: !1})
})
}, o.changeItem = function (a, n) {
$("#cube-editor td").removeClass("current").filter(function (e, t) {
return $(t).attr("x") == a && $(t).attr("y") == n
}).addClass("current"), $("#thumb").attr("src", ""), o.activeItem.params.currentLayout = o.activeItem.params.layout[a][n]
}, o.removeItem = function () {
for (var e = 0; e < 4; e++) for (var t = 0; t < 4; t++) if (!_.isEmpty(o.activeItem.params.layout[e][t]) && o.activeItem.params.currentLayout.classname == o.activeItem.params.layout[e][t].classname) {
if (1 < o.activeItem.params.currentLayout.rows) for (var a = 0; a < o.activeItem.params.currentLayout.rows; a++) {
var n = e + a;
if (o.activeItem.params.layout[n][t] = {
cols: 1,
rows: 1,
isempty: !0,
imgurl: "",
classname: ""
}, 1 < o.activeItem.params.currentLayout.cols) for (var i = 0; i < o.activeItem.params.currentLayout.cols; i++) {
var s = t + i;
o.activeItem.params.layout[n][s] = {cols: 1, rows: 1, isempty: !0, imgurl: "", classname: ""}
}
} else if (o.activeItem.params.layout[e][t] = {
cols: 1,
rows: 1,
isempty: !0,
imgurl: "",
classname: ""
}, 1 < o.activeItem.params.currentLayout.cols) for (i = 0; i < o.activeItem.params.currentLayout.cols; i++) {
s = t + i;
o.activeItem.params.layout[e][s] = {cols: 1, rows: 1, isempty: !0, imgurl: "", classname: ""}
}
o.activeItem.params.currentLayout = {}
}
}
}]),angular.module("wapeditorApp").controller("DialCtrl", ["$scope", function (t) {
t.changeItem = function (e) {
for (i in 5 == e.id ? (t.activeItem.paddingTop = angular.copy(t.activeItem.params.baseStyle.paddingTop), t.activeItem.params.baseStyle.paddingTop = 0) : t.activeItem.params.baseStyle.paddingTop = t.activeItem.params.baseStyle.paddingTop ? t.activeItem.params.baseStyle.paddingTop : t.activeItem.paddingTop, index = $.inArray(e, t.activeItem.params.items), t.activeItem.params.items) i == index ? (t.activeItem.params.items[i].active = 1, t.activeItem.params.baseStyle.color = t.activeItem.params.items[i].color, t.activeItem.params.baseStyle.backgroundColor = t.activeItem.params.items[i].discolor) : t.activeItem.params.items[i].active = 0
}, t.addImage = function (e) {
for (i in index = $.inArray(e, t.activeItem.params.items), t.activeItem.params.items) i == index && require(["fileUploader"], function (e) {
e.show(function (e) {
t.saveModulePosition(), t.resetPosition(e), t.activeItem.params.items[i].imgurl = e.url, t.$apply()
}, {direct: !0, multiple: !1})
})
}, t.resetPosition = function (e) {
e.width && e.height && (t.activeItem.params.positionStyle.width = e.width, t.activeItem.params.positionStyle.height = e.height, t.setModulePositionStyle(t.activeItem.params.positionStyle))
}
}]),angular.module("wapeditorApp").controller("GoodCtrl", ["$scope", function (t) {
t.changeLayout = function (e) {
switch (e) {
case"lr":
t.activeItem.params.layoutstyle = 1;
break;
case"ud":
t.activeItem.params.layoutstyle = 2
}
}
}]),angular.module("wapeditorApp").controller("HeaderCtrl", ["$scope", function (a) {
a.addThumb = function (t) {
require(["fileUploader"], function (e) {
e.show(function (e) {
a.activeItem.params[t] = e.url, a.$apply("activeItem")
}, {direct: !0, multiple: !1})
})
}, a.ifCheck = function () {
a.activeItem.params.bottom_menu = !a.activeItem.params.bottom_menu
}
}]),angular.module("wapeditorApp").controller("ImageCtrl", ["$scope", function (t) {
t.addItem = function () {
require(["fileUploader"], function (e) {
e.show(function (e) {
t.saveModulePosition(), t.resetPosition(e), t.activeItem.params.items = {
id: e.id,
imgurl: e.url
}, t.$apply()
}, {direct: !0, multiple: !1})
})
}, t.changeItem = function (e) {
require(["fileUploader"], function (e) {
e.init(function (e) {
t.saveModulePosition(), t.resetPosition(e), t.activeItem.params.items.id = e.id, t.activeItem.params.items.imgurl = e.url, t.$apply()
}, {direct: !0, multiple: !1})
})
}, t.resetPosition = function (e) {
e.width && e.height && (w = e.width, h = e.height, w >= h ? (t.activeItem.params.positionStyle.width = 100, t.activeItem.params.positionStyle.height = t.activeItem.params.positionStyle.width * h / w) : (t.activeItem.params.positionStyle.height = 100, t.activeItem.params.positionStyle.width = t.activeItem.params.positionStyle.height * w / h), t.setModulePositionStyle(t.activeItem.params.positionStyle))
}
}]),angular.module("wapeditorApp").controller("LineCtrl", ["$scope", function (e) {
}]),angular.module("wapeditorApp").controller("LinkCtrl", ["$scope", "$http", function (o, a) {
o.pageSize = _.range(0, 30), o.addItem = function () {
o.activeItem.params.items.push({title: "", url: "", type: 1, selectCate: {name: "", id: 0}, pageSize: 3})
}, o.removeItem = function (e) {
for (i in index = $.inArray(e, o.activeItem.params.items), items = _.clone(o.activeItem.params.items), o.activeItem.params.items = [], items) i != index && o.activeItem.params.items.push(items[i]);
o.changeInnerHeight()
}, o.showSearchCateList = function (e) {
o.currentItem = e;
var t = $(".js-search-cate-keyword").val();
return t = void 0 === t ? "" : t, a.get("./index.php?c=utility&a=link&do=catelist&keyword=" + t).success(function (e, t, a, n) {
o.searchCateList = [];
var s = e.message.message;
for (i in s) o.searchCateList.push({id: s[i].id, name: s[i].name, children: s[i].children});
o.modalobj = $("#modal-search-cate-link").modal({show: !0})
}), !0
}, o.selectCateItem = function (e, t, a) {
return o.currentItem.selectCate = {pid: e, cid: t, name: a}, o.modalobj.modal("hide"), !0
}
}]),angular.module("wapeditorApp").controller("NavImgCtrl", ["$scope", function (a) {
a.changeItem = function (t) {
require(["fileUploader"], function (e) {
e.show(function (e) {
t.id = e.id, t.imgurl = e.url, a.$apply()
}, {direct: !0, multiple: !1})
})
}
}]),angular.module("wapeditorApp").controller("NoticeCtrl", ["$scope", function (e) {
}]),angular.module("wapeditorApp").controller("OnlyTextCtrl", ["$scope", function (e) {
}]),angular.module("wapeditorApp").controller("PureLinkCtrl", ["$scope", function (t) {
t.changeItem = function (e) {
for (i in 5 == e.id ? (t.activeItem.paddingTop = angular.copy(t.activeItem.params.baseStyle.paddingTop), t.activeItem.params.baseStyle.paddingTop = 0) : t.activeItem.params.baseStyle.paddingTop = t.activeItem.params.baseStyle.paddingTop ? t.activeItem.params.baseStyle.paddingTop : t.activeItem.paddingTop, index = $.inArray(e, t.activeItem.params.items), t.activeItem.params.items) i == index ? (t.activeItem.params.items[i].active = 1, t.activeItem.params.baseStyle.color = t.activeItem.params.items[i].color, t.activeItem.params.baseStyle.backgroundColor = t.activeItem.params.items[i].discolor) : t.activeItem.params.items[i].active = 0
}, t.addImage = function (e) {
for (i in index = $.inArray(e, t.activeItem.params.items), t.activeItem.params.items) i == index && require(["fileUploader"], function (e) {
e.show(function (e) {
t.saveModulePosition(), t.resetPosition(e), t.activeItem.params.items[i].imgurl = e.url, t.$apply()
}, {direct: !0, multiple: !1})
})
}, t.resetPosition = function (e) {
e.width && e.height && (t.activeItem.params.positionStyle.width = e.width, t.activeItem.params.positionStyle.height = e.height, t.setModulePositionStyle(t.activeItem.params.positionStyle))
}
}]),angular.module("wapeditorApp").controller("RewardCtrl", ["$scope", function (t) {
t.changeSize = function (e) {
switch (t.activeItem.params.fontactive = e, t.activeItem.params.fonttype = e) {
case"big":
t.activeItem.params.baseStyle.fontSize = "36px";
break;
case"middle":
t.activeItem.params.baseStyle.fontSize = "26px";
break;
case"small":
t.activeItem.params.baseStyle.fontSize = "16px"
}
}
}]),angular.module("wapeditorApp").controller("RichTextCtrl", ["$scope", "$sce", function (e, a) {
e.trustAsHtml = function (e, t) {
return !e && t && (e = t.replace(/\#quot;/g, "&quot;")), a.trustAsHtml(e)
}
}]),angular.module("wapeditorApp").controller("ShapeCtrl", ["$scope", "$http", function (r, n) {
r.page = {currentPage: 1, numPages: 1, toPage: "", totalItems: 0, pageSize: 18}, r.addItem = function () {
n({
method: "GET",
url: window.sysinfo.siteroot + "web/resource/images/app/shape/shape.json",
cache: !0
}).success(function (e) {
r.sysCategoryList = e.sysCategoryList, r.sysImageTag = e.sysImageTag, r.sysImageList = e.sysImageList, r.activeItem.params.catlistActive = 1, r.activeItem.params.imgListActive = 4, r.page.numPages = s(), r.pages = l(), o(1), r.currentImageList = c(r.activeItem.params.imgListActive, 1), $("#shapeModal").modal("show")
})
}, r.getSysCatAndList = function (e) {
var t = $.inArray(e, r.sysCategoryList);
for (var a in r.sysCategoryList) if (a == t) {
r.sysCategoryList[a].active = !0, r.activeItem.params.catlistActive = r.sysCategoryList[a].id;
var n = 1;
for (var i in r.sysImageTag) r.sysImageTag[i].parentid == r.sysCategoryList[a].id && 1 == n ? (r.activeItem.params.imgListActive = r.sysImageTag[i].id, r.sysImageTag[i].active = !0, r.page.numPages = s(), r.pages = l(), o(1), r.currentImageList = c(r.activeItem.params.imgListActive, 1), n++) : r.sysImageTag[i].active = !1
} else r.sysCategoryList[a].active = !1
}, r.getSysImgByTag = function (e) {
var t = $.inArray(e, r.sysImageTag);
for (var a in r.sysImageTag) a == t ? (r.sysImageTag[a].active = !0, r.activeItem.params.imgListActive = r.sysImageTag[a].id, r.page.numPages = s(), r.pages = l(), o(1), r.currentImageList = c(r.activeItem.params.imgListActive, 1)) : r.sysImageTag[a].active = !1
}, r.selectSvg = function (e, t) {
var a = e.target.dataset.url;
a = a.split("../"), n({method: "GET", url: window.sysinfo.siteroot + a[1]}).success(function (e) {
for (var t, a = $(e), n = a.length, i = 0; i < n; i++) if ("svg" == a[i].tagName) {
t = a[i];
break
}
r.saveModulePosition();
var s = parseFloat($(t).attr("width")), o = parseFloat($(t).attr("height"));
o <= s ? r.activeItem.params.positionStyle.height = r.activeItem.params.positionStyle.width * o / s : r.activeItem.params.positionStyle.width = r.activeItem.params.positionStyle.height * s / o, r.setModulePositionStyle(r.activeItem.params.positionStyle), r.activeItem.params.svgValue = e, $("#shapeModal").modal("hide")
})
}, r.selectPage = function (e) {
0 < (e = parseInt(e)) && e <= r.page.numPages && (r.page.currentPage = e, r.pages = l(), o(e), r.currentImageList = c(r.activeItem.params.imgListActive, e))
}, r.getImgByPage = function () {
var e = parseInt(r.page.toPage);
0 < e && e <= r.page.numPages && (r.page.currentPage = e, r.pages = l(), o(e), r.currentImageList = c(r.activeItem.params.imgListActive, e))
};
var s = function () {
var e = t(r.activeItem.params.imgListActive);
return Math.ceil(e / r.page.pageSize)
}, o = function (e) {
for (var t in r.pages) e == r.pages[t].number ? r.pages[t].active = !0 : r.pages[t].active = !1
}, l = function () {
var e = [];
if (r.page.numPages <= 5) for (var t = 1; t <= r.page.numPages; t++) r.page.currentPage == t ? e.push({
number: t,
active: !0
}) : e.push({number: t, active: !1}); else {
var a = r.page.currentPage - 2, n = r.page.currentPage + 2;
if (0 < a) if (n <= r.page.numPages) e = [{number: a, active: !1}, {
number: r.page.currentPage - 1,
active: !1
}, {number: r.page.currentPage, active: !0}, {number: r.page.currentPage + 1, active: !1}, {
number: n,
active: !1
}]; else for (t = r.page.numPages - 4; t <= r.page.numPages; t++) t == r.page.currentPage ? e.push({
number: t,
active: !0
}) : e.push({
number: t,
active: !1
}); else for (t = 1; t <= 5; t++) r.page.currentPage == t ? e.push({
number: t,
active: !0
}) : e.push({number: t, active: !1})
}
return e
}, t = function (e) {
var t = 0;
for (var a in r.sysImageList) e == r.sysImageList[a].parentid && t++;
return t
}, c = function (e, t) {
var a = [], n = 0, i = ((t = 0 < parseInt(t) ? parseInt(t) : 1) - 1) * r.page.pageSize, s = t * r.page.pageSize;
for (var o in r.sysImageList) e == r.sysImageList[o].parentid && (i <= n && n < s && a.push(r.sysImageList[o]), n++);
return a
}
}]),angular.module("wapeditorApp").controller("TextNavCtrl", ["$scope", function (t) {
t.addItem = function () {
t.activeItem.params.items.push({title: "", url: ""}), t.changeInnerHeight()
}, t.removeItem = function (e) {
for (i in index = $.inArray(e, t.activeItem.params.items), items = _.clone(t.activeItem.params.items), t.activeItem.params.items = [], items) i != index && t.activeItem.params.items.push(items[i]);
t.changeInnerHeight()
}
}]),angular.module("wapeditorApp").controller("TitleCtrl", ["$scope", function (t) {
t.changeNavEnable = function (e) {
t.activeItem.params.tradition.nav.enable = e
}
}]),angular.module("wapeditorApp").controller("WhiteCtrl", ["$scope", function (e) {
}]),angular.module("accountApp", ["we7app", "infinite-scroll"]),angular.module("accountApp").controller("SystemAccountDisplay", ["$scope", "$compile", "$http", "config", function (n, i, s, o) {
n.lists = [], n.links = o.links, n.showActionStatus = !1, n.checkAllStatus = !1, n.checkNum = 0, n.checkItem = function (e) {
e ? n.checkNum++ : n.checkNum--, n.checkNum == n.lists.length ? n.checkAllStatus = !0 : n.checkAllStatus = !1
}, n.checkAll = function () {
for (var e in n.lists) n.lists[e].checked = n.checkAllStatus;
n.checkNum = n.checkAllStatus ? n.lists.length : 0
}, n.postAction = function (e) {
var t = [];
for (var a in n.lists) n.lists[a].checked && t.push(n.lists[a].uniacid);
"disabled" == e && n.receiveAccount(o.links.del, t)
}, n.receiveAccount = function (e, t, a) {
util.confirm(function () {
s.post(e, {uniacids: t}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect, "error")
})
}, function () {
}, "确认要删除吗?")
};
var r = o.searchParams;
n.getAccountList = function (e, t, a) {
r.page = t, s.post(o.links.getAccountList, r).success(function (e) {
if (0 == e.message.errno) {
var t = e.message.message;
n.lists = t.list, $("#pager").html(i(t.pager)(n))
}
})
}, n.getCreateInfo = function () {
s.post(o.links.accountCreateInfo).success(function (e) {
0 == e.message.errno && (n.canCreate = !0, n.createInfo = e.message.message)
})
}, n.getAccountList(), n.getCreateInfo()
}]),angular.module("accountApp").controller("SystemAccountRecycle", ["$scope", "$http", "config", function (n, a, i) {
n.del_accounts = i.del_accounts, n.links = i.links, n.account_types = i.account_types, n.checkAllStatus = !1, n.checkNum = 0, n.checkItem = function (e) {
e ? n.checkNum++ : n.checkNum--, n.checkNum == n.del_accounts.length ? n.checkAllStatus = !0 : n.checkAllStatus = !1
}, n.checkAll = function () {
for (var e in n.del_accounts) n.del_accounts[e].checked = n.checkAllStatus;
n.checkNum = n.checkAllStatus ? n.del_accounts.length : 0
}, n.postAction = function (e) {
var t = {acids: [], uniacids: []};
for (var a in n.del_accounts) n.del_accounts[a].checked && (t.uniacids.push(n.del_accounts[a].uniacid), t.acids.push(n.del_accounts[a].acid));
"delete" == e ? n.delete(t.acids, t.uniacids) : n.recover(t.acids, t.uniacids)
}, n.recover = function (e, t) {
a.post(i.links.postRecover, {acids: e, uniacids: t}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect, "error")
})
}, n.delete = function (e, t) {
console.log(e, t), util.confirm(function () {
a.post(i.links.postDel, {acids: e, uniacids: t}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect, "error")
})
}, function () {
return !1
}, "此为永久删除,系统将自动删除该账号下所有系统相关信息(包括但不限于粉丝信息),<br>确认现在删除吗?")
}
}]),angular.module("accountApp").controller("AccountPostStepOne", ["$scope", "$http", "config", function (e, t, a) {
e.checkAccountLimit = function () {
t.get(a.links.checkAccountLimitUrl).success(function (e) {
0 == e.message.errno ? window.location.href = e.message.message.url : util.message(e.message.message, "", "error")
})
}
}]),angular.module("accountApp").controller("AccountPostStepTwo", ["$scope", "config", function (a, e) {
a.account = {}, a.uploadMultiImage = function (t) {
require(["fileUploader"], function (e) {
e.init(function (e) {
a.account[t] = e.url, a.$apply(a.account)
}, {direct: !0, multiple: !1})
})
}, a.delMultiImage = function (e) {
a.account[e] = ""
}
}]),angular.module("accountApp").controller("AccountPostStepThree", ["$scope", "$http", "config", "AccountAppCommon", function (t, e, a, n) {
t.notify = a.notify, t.owner = a.owner || {}, t.owner.groupid = t.owner.groupid || "0", $(".datetimepicker[name = 'endtime']").val(t.owner.endtime || 0), t.owner.endtime = 0 != t.owner.endtime && t.owner.endtime ? "1" : "0", t.links = a.links, t.unigroups = a.unigroups, t.modulesAll = {
modules: a.modules || [],
templates: a.templates || []
}, t.groupAll = {groups: a.unigroups || []}, t.loadChange = function () {
$(".we7-group-show").each(function () {
$(this).removeClass("low"), $(this).removeClass("closed"), 70 < $(this).find(".group-app-list").outerHeight() ? ($(this).removeClass("low"), $(this).addClass("closed"), $(this).find(".action").on("click", function () {
console.log($(this).parent().toggleClass("closed"))
})) : ($(this).addClass("low"), $(this).removeClass("closed"))
})
}, t.selectOwner = function (e) {
n.selectOwner(function (e) {
$(".datetimepicker[name = 'endtime']").val(e.endtime), e.endtime = 0 == e.endtime ? "0" : "1", t.owner = Object.assign(t.owner, e), setTimeout(function () {
t.$apply(), $("select").niceSelect && $("select").niceSelect("update")
})
})
}, t.groupConfirm = function () {
setTimeout(function () {
t.loadChange()
}, 20)
}, t.changeGroup = function () {
t.owner.package = $("#groupid").find("option:selected").data("package"), n.update_package_list($("#groupid").find("option:selected").data("package")), setTimeout(function () {
t.loadChange()
})
}, t.addPermission = n.addPermission
}]),angular.module("accountApp").controller("AccountPostStepFour", ["$scope", "config", "AccountAppCommon", function (e, t, a) {
e.account = t.account, e.links = t.links, e.url = t.links.siteroot + "api.php?id=" + e.account.acid, e.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>');
a.copySuccess(e, t)
}
}]),angular.module("accountApp").controller("AccountManageBase", ["$scope", "$http", "config", "AccountAppCommon", function (s, o, r, l) {
s.account = r.account, s.uniaccount = r.uniaccount, s.authstate = r.authstate, s.authurl = r.authurl, s.founder = r.founder, s.owner = r.owner, s.other = {
headimgsrc: r.account.logo,
qrcodeimgsrc: r.account.qrcode,
serviceUrl: r.links.siteroot + "api.php?id=" + s.account.acid,
siteurl: r.links.siteroot
}, s.changeImage = function (t, a) {
"headimgsrc" != t && "qrcodeimgsrc" != t || require(["fileUploader"], function (e) {
e.init(function (e) {
s.other[t] = e.url, s.$apply(s.other), s.httpChange(t)
}, {direct: !0, multiple: !1, uniacid: a})
})
}, s.success = function (e) {
e = parseInt(e);
var t = $('<a href="javascript:;" class="btn btn-success btn-sm we7-margin-left-sm"><i class="fa fa-check-circle"></i> 复制成功</a>');
l.copySuccess(e, t)
}, s.editInfo = function (e, t) {
s.middleAccount = {}, s.middleAccount[e] = t, s.middleAccountCopy = {}, s.middleAccountCopy[e] = t
}, s.httpChange = function (t, e) {
switch (t) {
case"headimgsrc":
case"qrcodeimgsrc":
o.post(r.links.basePost, {type: t, request_data: s.other[t]}).success(function (e) {
0 == e.message.errno ? ($(".wechat-img").attr("src", s.other[t]), util.message("修改成功!", e.redirect, "success")) : (-1 == e.message.errno && util.message(e.message.message, e.redirect, "error"), 1 == e.message.errno && util.message(e.message.message, "", "error"), 40035 == e.message.errno && util.message(e.message.message, "", "error"))
});
break;
case"name":
case"account":
case"original":
case"level":
case"appid":
case"key":
case"secret":
case"attachment_limit":
if ($("#" + t).modal("hide"), 0 == s.middleAccount[t].length && "attachment_limit" != t) return util.message("不可为空!", "", "error"), !1;
o.post(r.links.basePost, {type: t, request_data: s.middleAccount[t]}).success(function (e) {
0 == e.message.errno ? (s.account[t] = s.middleAccount[t], util.message("修改成功!", e.redirect, "success")) : (1 == e.message.errno && util.message(e.message.message, "", "error"), 40035 == e.message.errno && util.message(e.message.message, "", "error"))
});
break;
case"jointype":
if ($("#jointype").modal("hide"), 1 != s.middleAccount.type && 4 != s.middleAccount.type || o.post(r.links.basePost, {
type: "jointype",
request_data: 1
}).success(function (e) {
0 == e.message.errno ? (s.account[t] = s.middleAccount[t], s.account.type = s.middleAccount.type, util.message("修改成功!", e.redirect, "success")) : (1 == e.message.errno && util.message(e.message.message, "", "error"), 40035 == e.message.errno && util.message(e.message.message, "", "error"))
}), 3 == s.middleAccount.type || 7 == s.middleAccount.type) if (1 == r.authurl.errno) util.message(r.authurl.url); else {
if (!confirm("必须通过公众号授权登录页面进行授权接入,是否跳转至授权页面...")) return !1;
location.href = r.authurl.url
}
break;
case"token":
if ($("#token").modal("hide"), void 0 === e) {
if (!confirm("确定要生成新的吗?")) return !1;
var a = l.tokenGen()
} else {
if (0 == (a = $("#newtoken").val()).length) return util.message("不可为空!"), !1;
if (!new RegExp(/^[A-Za-z0-9]{3,32}$/).test(a)) return util.message("必须为英文或者数字,长度为3到32个字符!"), !1
}
o.post(r.links.basePost, {type: t, request_data: a}).success(function (e) {
0 == e.message.errno ? (s.account[t] = a, util.message("修改成功!", e.redirect, "success")) : (-1 == e.message.errno && util.message(e.message.message, e.redirect, "error"), 1 == e.message.errno && util.message(e.message.message, "", "error"), 40035 == e.message.errno && util.message(e.message.message, "", "error"))
});
break;
case"encodingaeskey":
if ($("#encodingaeskey").modal("hide"), void 0 === e) {
if (!confirm("确定要生成新的吗?")) return !1;
var n = l.encodingAESKeyGen()
} else {
if (0 == (n = $("#newencodingaeskey").val()).length) return util.message("不可为空!"), !1;
if (!new RegExp(/^[A-Za-z0-9]{43}$/).test(n)) return util.message("必须为英文或者数字,长度为43个字符!"), !1
}
o.post(r.links.basePost, {type: t, request_data: n}).success(function (e) {
0 == e.message.errno ? (s.account[t] = n, util.message("修改成功!", e.redirect, "success")) : (-1 == e.message.errno && util.message(e.message.message, e.redirect, "error"), 1 == e.message.errno && util.message(e.message.message, "", "error"), 40035 == e.message.errno && util.message(e.message.message, "", "error"))
});
break;
case"highest_visit":
"number" == typeof s.middleAccount.highest_visit && o.post(r.links.basePost, {
type: t,
request_data: s.middleAccount.highest_visit
}).success(function (e) {
0 == e.message.errno ? (s.account[t] = s.middleAccount.highest_visit, util.message("修改成功!", e.redirect, "success")) : util.message(e.message.message, "", "error")
});
break;
case"endtime":
var i = $('[name="endtime"]').val();
o.post(r.links.basePost, {
type: "endtime",
endtype: s.middleAccount.endtype,
endtime: i
}).success(function (e) {
1 == e.message.errno ? util.message(e.message.message, "", "info") : (s.account.endtype = s.middleAccount.endtype, s.account.end = 2 == s.account.endtype ? i : "永久", util.message("修改成功!", e.redirect, "success"))
})
}
}
}]),angular.module("accountApp").controller("AccountMangeModulesTpl", ["$scope", "$http", "config", "we7TypeDefault", function (n, i, s, e) {
for (var t in n.owner = s.owner, n.user_extend_modules = s.user_extend_modules, n.modules_tpl = {}, n.uni_groups = s.uni_groups, n.packagelist = s.packagelist, n.extend = s.extend, n.allmodule = !1, n.jurindex = 0, n.account_type_sign = s.account_type_sign, n.we7TypeDefault = e, n.modules = s.modules, n.templates = s.templates, s.modules_tpl) {
var a = s.modules_tpl[t];
n.modules_tpl[a.id] && "default" == n.modules_tpl[a.id].type || (n.modules_tpl[a.id] = a), "default" == a.type && n.uni_groups && n.uni_groups[a.id] && delete n.uni_groups[a.id]
}
if (n.extend && n.extend.groups) for (var o in n.extend.groups) {
var r = n.extend.groups[o].id;
n.uni_groups && n.uni_groups[r] && (n.uni_groups[r].checked = 1)
}
for (var o in n.groupList = {groups: n.uni_groups || {}}, n.modules) n.extend && n.extend.modules && n.extend.modules[o] && (n.modules[o].checked = 1), 2 != n.modules[o][n.account_type_sign + "_support"] && delete n.modules[o];
if (n.moduleList = {modules: n.modules}, "account" == n.account_type_sign) {
if (n.extend && n.extend.modules) for (var o in n.extend.templates) {
r = n.extend.templates[o].id;
for (var l in n.templates) r == n.templates[l].id && (n.templates[l].checked = 1)
}
n.moduleList.templates = n.templates
}
n.changeGroup = function () {
var e = [];
for (var t in n.groupList.groups) 1 == n.groupList.groups[t].checked && e.push(n.groupList.groups[t].id);
i.post(s.links.postModulesTpl, {type: "group", groupdata: e}).success(function (e) {
0 == e.message.errno ? location.reload() : util.message(e.message.message)
})
}, n.addExtend = function () {
var e = [], t = [];
for (var a in n.moduleList.modules) 1 == n.moduleList.modules[a].checked && e.push(n.moduleList.modules[a].name);
for (var a in n.moduleList.templates) 1 == n.moduleList.templates[a].checked && t.push(n.moduleList.templates[a].id);
i.post(s.links.postModulesTpl, {type: "extend", module: e, tpl: t}).success(function (e) {
0 == e.message.errno ? location.reload() : util.message(e.message.message)
})
}, n.editEndTime = function (e, t) {
n.middleTime = e, n.middleGoodsId = parseInt(t), $("#endtime").modal("show"), $('input[name="endtime"]').val(e)
}, n.httpChange = function () {
var e = $('input[name="endtime"]').val();
i.post(s.links.postModulesTpl, {
type: "store_endtime",
new_time: e,
order_id: n.middleGoodsId
}).success(function (e) {
0 == e.message.errno && util.message(e.message.message, e.redirect)
})
}
}]),angular.module("accountApp").controller("AccountManageUsers", ["$scope", "$http", "config", function (i, a, n) {
i.vice_founder = n.vice_founder, i.owner = n.owner, i.manager = n.manager, i.operator = n.operator, i.state = n.state, i.setPermission = function (e) {
e = parseInt(e);
location.href = n.links.setPermission + "&uid=" + e
}, i.delPermission = function (e) {
e = parseInt(e);
a.post(n.links.delete, {uid: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, i.addOwner = function () {
$("#owner-modal").modal("hide");
var e = $.trim($("#add-owner-username").val());
i.requestPost(3, e)
}, i.changeOwner = function (e) {
$("#owner-modal").modal("show"), $("#add-owner-username").val(e)
}, i.changeVice = function (e) {
$("#user-modal").modal("show"), $("#addtype-4").prop("checked", !0), $("#add-username").val(e)
}, i.addUsername = function () {
$("#user-modal").modal("hide");
var a = $.trim($("#add-username").val()), n = $(".addtype");
$.each(n, function (e, t) {
$(n[e]).is(":checked") && i.requestPost($(n[e]).val(), a)
})
}, i.requestPost = function (e, t) {
if (!t) return util.message("请输入用户名."), !1;
e = parseInt(e);
a.post(n.links.addUser, {
username: t,
addtype: e,
account_type: n.accountType,
token: n.token
}).success(function (e) {
0 == e.message.errno ? location.reload() : (-1 == e.message.errno && util.message(e.message.message), 1 == e.message.errno && util.message("添加失败,请稍候重试!"), 2 == e.message.errno && util.message(e.message.message), 3 == e.message.errno && util.message("用户未通过审核,请联系网站管理员审核通过后再行添加!"), 4 == e.message.errno && util.message("管理员不可操作其他管理员!"), 5 != e.message.errno && 6 != e.message.errno || util.message(e.message.message))
})
}
}]),angular.module("accountApp").controller("SystemPlatform", ["$scope", "$http", "config", "AccountAppCommon", function (l, c, u, d) {
l.platform = u.platform, l.url = u.url, l.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="btn btn-success we7-margin-left-sm"><i class="fa fa-check-circle"></i> 复制成功</span>');
d.copySuccess(e, t)
}, l.httpChange = function (e, t) {
switch (e) {
case"authstate":
var a = 1 == l.platform.authstate ? 0 : 1;
c.post(u.links.platformPost, {authstate: a}).success(function (e) {
0 == e.message.errno ? (l.platform.authstate = a, util.message("修改成功!", "", "success")) : 1 == e.message.errno && util.message("修改失败,请稍后重试!")
});
break;
case"bindappid":
$("#bindappid").modal("hide");
var n = $("#newbindappid").val();
c.post(u.links.platformPost, {bindappid: n}).success(function (e) {
0 == e.message.errno ? (l.platform.bindappid = n, util.message("修改成功!", "", "success")) : 1 == e.message.errno && util.message("修改失败,请稍后重试!", "", "error")
});
break;
case"appid":
$("#AppID").modal("hide");
var i = $("#newappid").val();
c.post(u.links.platformPost, {appid: i}).success(function (e) {
0 == e.message.errno ? (l.platform.appid = i, util.message("修改成功!", "", "success")) : 1 == e.message.errno && util.message("修改失败,请稍后重试!", "", "error")
});
break;
case"appsecret":
$("#AppSecret").modal("hide");
var s = $("#newappsecret").val();
c.post(u.links.platformPost, {appsecret: s}).success(function (e) {
0 == e.message.errno ? (l.platform.appsecret = s, util.message("修改成功!", "", "success")) : 1 == e.message.errno && util.message("修改失败,请稍后重试!", "error")
});
break;
case"token":
if (void 0 === t) {
if (!confirm("确定要生成新的吗?")) return !1;
var o = d.tokenGen()
} else {
if (0 == (o = $("#newtoken").val()).length) return util.message("不可为空!"), !1;
if (!new RegExp(/^[A-Za-z0-9]{3,32}$/).test(o)) return util.message("必须为英文或者数字,长度为3到32个字符!"), !1
}
c.post(u.links.platformPost, {token: o}).success(function (e) {
0 == e.message.errno ? (l.platform.token = o, util.message("修改成功!", "", "success")) : 1 == e.message.errno && util.message("修改失败,请稍后重试!")
});
break;
case"encodingaeskey":
if (void 0 === t) {
if (!confirm("确定要生成新的吗?")) return !1;
var r = d.encodingAESKeyGen()
} else {
if (0 == (r = $("#newencodingaeskey").val()).length) return util.message("不可为空!"), !1;
if (!new RegExp(/^[A-Za-z0-9]{43}$/).test(r)) return util.message("必须为英文或者数字,长度为43个字符!"), !1
}
c.post(u.links.platformPost, {encodingaeskey: r}).success(function (e) {
0 == e.message.errno ? (l.platform.encodingaeskey = r, util.message("修改成功!", "", "success")) : 1 == e.message.errno && util.message("修改失败,请稍后重试!")
})
}
}
}]),angular.module("accountApp").controller("AccountManageWxappCtrl", ["$scope", "$http", "config", function (n, e, t) {
n.wxapp_modules = t.wxapp_modules, n.current_module_info = t.current_module_info, n.showWxModules = function () {
$("#module_wxapp").modal("show")
}, n.selectedWxModule = function (e, t) {
var a = $(t.target).parents(".select-module-wxapp");
a.find("span").removeClass("hide"), a.siblings().find("span").addClass("hide"), n.newWxModule = e
}, n.addWxModules = function () {
e.post(t.links.editmodule, {module: n.newWxModule, account_type: 4}).success(function (e) {
$("#module_wxapp").modal("hide"), 0 == e.message.errno ? location.reload() : util.message(e.message.message)
})
}, n.delWxModule = function () {
e.post(t.links.delmodule, {module: n.current_module_info, account_type: 4}).success(function (e) {
0 == e.message.errno ? location.reload() : util.message(e.message.message)
})
}
}]),angular.module("accountApp").controller("SystemAccountExpiredMessageCtrl", ["$scope", "$http", "config", function (e, n, i) {
e.account_types = i.account_types, e.saveSetting = function (e, t, a) {
status = null == a ? 0 : a.status, n.post(i.links.saveSettingUrl, {
account_type: t,
message: e.value,
status: status
}).success(function (e) {
0 == e.message.errno && util.message("修改成功!", e.redirect, "success")
})
}, e.saveSettingSwitch = function (e, t, a) {
if (null == a || null == a.message) return util.message("请先填写到期提示内容!", "", "error"), !1;
0 == a.status || null == a.status ? status = 1 : status = 0, n.post(i.links.saveSettingUrl, {
account_type: t,
message: a.message,
status: status
}).success(function (e) {
0 == e.message.errno && util.message("修改成功!", e.redirect, "success")
})
}
}]),angular.module("accountApp").controller("commonCreateAccountCtrl", ["$scope", "config", "$http", "AccountAppCommon", function (a, e, n, t) {
a.account = {sign: e.sign}, a.step = "base_info", a.submitBaseinfo = function () {
if (!a.account.name) return util.message(e.sign_title + "名称不能为空"), !1;
e.isfounder ? a.checkParamsGoToNext("account_modules") : -1 != ["account", "webapp"].indexOf(e.sign) ? a.submitAndRedirect() : a.checkParamsGoToNext("account_version")
}, a.submitAccountModules = function () {
a.account.owner_uid = a.owner.uid || e.uid, a.account.endtime = $(".datetimepicker[name = 'endtime']").val(), a.account.groups = [], a.account.modules = [], a.account.templates = [], angular.forEach([], function (e) {
e.checked && a.account.groups.push(e.id)
}), angular.forEach(a.modulesAll.modules, function (e) {
e.checked && a.account.modules.push(e.name)
}), angular.forEach(a.modulesAll.templates, function (e) {
e.checked && a.account.templates.push(e.id)
}), -1 != ["account", "webapp"].indexOf(e.sign) ? a.submitAndRedirect() : a.checkParamsGoToNext("account_version")
}, a.submitAccountVersion = function () {
a.submitAndRedirect()
}, a.checkParamsGoToNext = function (t) {
a.account.step = a.step, n.post(e.links.check_params, a.account).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message, "", "error"), !1;
a.step = t
})
}, a.submitAndRedirect = function () {
a.account.step = "", a.account.owner_uid = a.owner.uid, n.post(e.links.save_account, a.account).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message, "", "error"), !1;
location.href = e.redirect
})
}, a.uploadMultiImage = function (t) {
require(["fileUploader"], function (e) {
e.init(function (e) {
a.account[t] = e.url, a.$apply(a.account)
}, {direct: !0, multiple: !1})
})
}, a.delMultiImage = function (e) {
a.account[e] = ""
}, a.owner = {}, a.owner.groupid = 0, a.owner.endtime = "0", $(".datetimepicker[name = 'endtime']").val(0), a.modulesAll = {modules: e.modules || []}, a.loadGroups = function () {
n.post(e.links.load_groups).success(function (e) {
0 == e.message.errno && (a.groupAll = {groups: e.message.message || []})
})
}, a.loadChange = function () {
$(".we7-group-show").each(function () {
$(this).removeClass("low"), $(this).removeClass("closed"), 70 < $(this).find(".group-app-list").outerHeight() ? ($(this).removeClass("low"), $(this).addClass("closed"), $(this).find(".action").on("click", function () {
console.log($(this).parent().toggleClass("closed"))
})) : ($(this).addClass("low"), $(this).removeClass("closed"))
})
}, a.selectOwner = function (e) {
t.selectOwner(function (e) {
$(".datetimepicker[name = 'endtime']").val(e.endtime), e.endtime = 0 == e.endtime ? "0" : "1", a.owner = Object.assign(a.owner, e), setTimeout(function () {
a.$apply(), $("select").niceSelect && $("select").niceSelect("update")
})
})
}, a.groupConfirm = function () {
setTimeout(function () {
a.loadChange()
}, 20)
}, a.changeGroup = function () {
a.owner.package = $("#groupid").find("option:selected").data("package"), t.update_package_list($("#groupid").find("option:selected").data("package")), setTimeout(function () {
a.loadChange()
})
}, a.resourceModule = function () {
require(["fileUploader"], function (e) {
e.show(function (e) {
a.version_module = e, a.account.version_module = e.name, a.$apply(a.version_module)
}, {
direct: !0,
multiple: a.isMuti,
isWechat: !1,
type: "module",
others: {
user_module: 1,
uid: a.account.owner_uid,
module_uniacid: 0,
mtype: a.account.sign,
cover: "account" == a.account.sign
}
})
})
}
}]),angular.module("accountApp").service("AccountAppCommon", ["$rootScope", "$http", "config", function (e, n, s) {
var o = {
addPermission: function () {
var e = "", t = "";
$("#jurisdiction-add #content-modules").find(".btn-primary").each(function () {
e += '<span class="label label-info" style="margin-right:3px;">' + $(this).attr("data-title") + '</span><input type="hidden" name="extra[modules][]" value="' + $(this).attr("data-name") + '" />'
}), $("#jurisdiction-add #content-templates").find(".btn-primary").each(function () {
t += '<span class="label label-info" style="margin-right:3px;">' + $(this).attr("data-title") + '</span><input type="hidden" name="extra[templates][]" value="' + $(this).attr("data-name") + '" />'
}), e || t ? $(".account-package-extra").show() : $(".account-package-extra").hide(), $(".account-package-extra .js-extra-modules").html(e), $(".account-package-extra .js-extra-templates").html(t), $("#jurisdiction-add").modal("hide")
}, update_package_list: function (e) {
for (i in $('input[name="package[]"]').prop("checked", !1), $('input[name="package[]"]').prop("disabled", !1), e) $('input[name="package[]"][value="' + e[i] + '"]').prop("checked", !0), $('input[name="package[]"][value="' + e[i] + '"]').prop("disabled", !0)
}, selectOwner: function (t) {
var a = [];
require(["biz"], function (e) {
e.user.browser(a, function (e) {
n.post(s.links.userinfo, {uid: e}).success(function (e) {
e.message.errno && util.message(e.message.message), setTimeout(function () {
$("#manager").val(e.message.message.uid).trigger("change"), $("#showname").val(e.message.message.username).trigger("change"), $("#groupid").val(e.message.message.group.id || 0).trigger("change"), $("#groupid").niceSelect && $("#groupid").niceSelect("update")
}, 1), $(".account-package-extra").show(), o.update_package_list(e.message.message.package), t && "function" == typeof t && t(e.message.message)
})
}, {mode: "invisible", direct: !0})
})
}, copySuccess: function (e, t) {
e = parseInt(e), t = t;
var a = $("#copy-" + e).next().html();
(!a || a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>') < 0) && $("#copy-" + e).after(t), setTimeout(function () {
t.remove()
}, 2e3)
}, tokenGen: function () {
for (var e = "", t = 0; t < 32; t++) {
e += "abcdefghijklmnopqrstuvwxyz0123456789"[parseInt(32 * Math.random())]
}
return e
}, encodingAESKeyGen: function () {
for (var e = "", t = 0; t < 43; t++) {
e += "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789"[parseInt(61 * Math.random() + 1)]
}
return e
}
};
return o
}]),angular.module("we7codeAppjsonApp", ["we7app"]),angular.module("we7codeAppjsonApp").controller("code_appjson_ctrl", ["$scope", "$q", "config", "$http", function (n, e, i, s) {
var t = i.default_appjson, a = i.save_url, o = i.default_url, r = i.convert_img_url;
angular.isString(t) && (t = JSON.parse(t)), t || (t = {pages: {}, windows: {}});
var l = t.hasOwnProperty("tabBar") ? t.tabBar : {list: []};
l && !l.list && (l.list = []), l && !l.isSystemTabBar && (l.isSystemTabBar = 1), t && t.windows && t.windows.navigationBarTitleText && t.windows.navigationBarTitleText.indexOf("微擎") && (t.windows.navigationBarTitleText = "小程序"), n.pages = t.pages, n.window = t.window, n.tabBar = l, $("body").on("click", ".js-image", function () {
var t = $(this).data("index"), a = "0" == $(this).data("selected") ? "iconPath" : "selectedIconPath";
util.image({}, function (e) {
s.post(r, {version_id: i.version_id, att_id: e.id}).then(function (e) {
0 == e.data.message.errno && (n.tabBar.list[t][a] = e.data.message.message)
})
})
}), n.toJson = function () {
return {pages: n.pages, window: n.window, tabBar: n.tabBar}
}, n.iconPath = function (e) {
return e.iconPath
}, n.save = function (e) {
var t = n.toJson();
s.post(a, {json: t, version_id: i.version_id}).then(function (e) {
0 == e.data.message.errno ? util.message(e.data.message.message, e.data.redirect, "success") : util.message(e.data.message.message, "", "error")
})
}, n.add = function () {
n.tabBar.list.push({iconSelectedPath: "", iconPath: "", pagePath: n.pages[0], text: ""})
}, n.del = function (e) {
n.tabBar.list.splice(e, 1)
}, n.default = function () {
s.post(o, {version_id: i.version_id}).then(function (e) {
0 == e.data.message.errno ? util.message(e.data.message.message, e.data.redirect, "success") : util.message(e.data.message.message, "", "error")
})
}, util.colorpicker(".js-color", function () {
})
}]),angular.module("articleApp", ["we7app"]),angular.module("articleApp").controller("commentsCtr", ["$scope", "$compile", "config", "$http", function (a, n, e, i) {
a.do = e.do, a.changePage = function (e, t) {
i.get(e + "&page=" + t).success(function (e) {
a.comment_list = e.message.message.list, a.pager = e.message.message.pager, (!a.comment_list || a.comment_list.length < 1) && $(".js-list").html("暂无评论"), $(".js-pager").html(n(a.pager)(a))
})
}, a.changePage(e.get_comments_url, 1), a.likeComment = function (t) {
if ("comments" == a.do) return !1;
i.post(e.like_comment_url, t).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
t.like_num = 1 * t.like_num + 1
})
}, a.replyarticle = function (e) {
e.replying = !0
}, a.cancel = function (e) {
e.replying = !1
}, a.send = function (t) {
i.post(e.reply_url, t).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
t.replys.push(e.message.message), t.replying = !1, t.replycontent = ""
})
}
}]),angular.module("articleApp").controller("articleCategoryCtrl", ["$scope", "config", "$http", function (t, a, e) {
t.categorys = a.categorys, t.current_category = {}, t.editCategory = function (e) {
t.current_category = e, $("#editCateform").modal("show")
}, t.saveCategory = function () {
if (t.current_category.token = a.token, t.current_category.submit = 1, !t.current_category.title) return util.message("分类名称不能为空", "", "error"), !1;
e.post(a.edit_url, t.current_category).success(function (e) {
0 == e.message.errno ? ($("#editCateform").modal("hide"), util.message(e.message.message, e.redirect, "success")) : util.message(e.message.message, "", "error")
})
}, t.deleteCategory = function (e) {
util.confirm(function () {
window.location.href = a.delete_url + "&id=" + e
}, function () {
return !1
}, "确认删除吗?")
}
}]),angular.module("replyFormApp", ["we7app"]),angular.module("replyFormApp").controller("KeywordReply", ["$scope", "$http", "config", function (n, a, o) {
n.reply = {
advanceTrigger: !1,
status: !0,
showAdvance: !1,
keyword: {exact: "", indistinct: "", contain: "", regexp: ""},
entry: o.replydata
}, n.reply.entry ? (n.reply.entry.istop = 255 <= n.reply.entry.displayorder ? 1 : 0, n.reply.status = 1 == n.reply.entry.status, n.reply.entry.keywords || (n.reply.entry.keywords = [])) : n.reply.entry = {
istop: 0,
displayorder: "",
id: "",
keywords: [],
module: "",
name: "",
status: 1,
uniacid: o.uniacid
}, n.changeStatus = function () {
n.reply.status = !n.reply.status
}, n.changeKeywordType = function (e) {
e = parseInt(e);
n.newKeyword = {
type: e,
content: ""
}, $("#keyword-indistinct").next().text(""), $("#keyword-exact").next().text(""), $("#keyword-regexp").next().text("")
}, n.showAddkeywordModal = function () {
$("#addkeywordModal").modal("show"), n.newKeyword = {type: 1, content: ""}
}, n.addNewKeyword = function () {
a.post("./index.php?c=platform&a=reply&do=post", {keyword: n.newKeyword.content}).success(function (e) {
if (-2 == e.message.errno) return util.message(e.message.message), !1;
if (0 == e.message.errno) {
$("#addkeywordModal").modal("hide");
var t = parseInt(n.newKeyword.type);
switch (t) {
case 1:
case 2:
var a = n.newKeyword.content.replace(/,/g, ",").split(",");
angular.forEach(a, function (e) {
"" != e && n.reply.entry.keywords.push({type: t, content: e})
});
break;
case 3:
n.reply.entry.keywords.push(n.newKeyword)
}
}
})
}, n.delKeyword = function (e) {
var t = _.findIndex(n.reply.entry.keywords, e);
n.reply.entry.keywords = _.without(n.reply.entry.keywords, n.reply.entry.keywords[t])
}, n.changeTriggerType = function () {
"exact" == n.reply.advanceTrigger && (n.reply.advanceTrigger = !1), "indistinct" == n.reply.advanceTrigger && (n.reply.advanceTrigger = !0)
}, n.changeShowAdvance = function () {
n.reply.showAdvance = !n.reply.showAdvance
}, $.isFunction(window.initReplyController) && window.initReplyController(n, a), n.submitForm = function () {
var e = angular.toJson(n.reply.entry.keywords);
if ($(':hidden[name="keywords"]').val(e), $.isFunction(window.validateReplyForm)) {
if (!window.validateReplyForm($("#reply-form"), $, _, util, n, a)) return !1;
$(".reply-form-submit").click()
} else $(".reply-form-submit").click()
}, n.initEmotion = function (e) {
util.emotion($("#emoji-exact"), $("#keyword-exact"), function (e, t, a) {
n.newKeyword.content += e, n.$apply(n.newKeyword)
}), util.emotion($("#emoji-indistinct"), $("#keyword-indistinct"), function (e, t, a) {
n.newKeyword.content += e, n.$apply(n.newKeyword)
})
}, n.checkKeyWord = function (e) {
var s = $(e.target), t = s.val().trim();
if ("" == t) return s.next().text(""), !1;
a.post("./index.php?c=platform&a=reply&do=post", {keyword: t}).success(function (e) {
if (0 != e.message.errno) {
if (-2 == e.message.errno) return s.next().html(e.message.message), !1;
var t = $('input[name="rid"]').val(), a = e.message.message, n = "";
for (rule in a) if (t != a[rule].id) {
var i = a[rule].name ? a[rule].name : a[rule].id;
n += "<a href='" + o.links.postUrl + "&rid=" + a[rule].id + "' target='_blank'><strong class='text-danger'>" + i + "</strong></a>&nbsp;"
}
"" != n && s.next().html("该关键字已存在于 " + n + " 规则中.")
} else s.next().text("")
})
}
}]),angular.module("replyFormApp").controller("ApplyReply", ["$scope", function (t) {
t.alphabet = ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"], t.activeLetter = "", t.searchModule = function (e) {
t.activeLetter = e
}
}]),angular.module("replyFormApp").controller("KeywordDisplay", ["$scope", "$http", "config", function (e, n, t) {
e.keywordType = "", e.keywordType = t.type, e.changeType = function () {
window.location.href = t.replyUrl + "&type=" + e.keywordType
}, e.changeStatus = function (t) {
var a = $("#key-" + t).attr("class");
n.post("./index.php?c=platform&a=reply&do=change_keyword_status", {id: t}).success(function (e) {
0 == e.message.errno ? (a.match("switchOn") ? $("#key-" + t).removeClass("switchOn") : $("#key-" + t).addClass("switchOn"), util.message("修改成功!", "", "success")) : util.message("网络错误,请稍候重试")
}).error(function (e) {
util.message("网络错误,请稍候重试")
})
}
}]),angular.module("replyFormApp").controller("serviceDisplay", ["$scope", "config", "$http", function (a, e, n) {
a.changeStatusUrl = e.url, a.service = e.service, a.changeStatus = function (t) {
t = file = t;
n.post(a.changeStatusUrl, {rid: t, file: file, module_name: "service"}).success(function (e) {
0 == e.message.errno ? (a.service[t].switch = "" == a.service[t].switch ? "checked" : "", location.reload()) : util.message("网络错误,请稍候重试")
})
}
}]),angular.module("replyFormApp").controller("SpecialDisplay", ["$scope", "config", "$http", function (a, e, n) {
a.config = e, a.url = e.url, a.msgtypes = {
image: a.config.image,
voice: a.config.voice,
video: a.config.video,
shortvideo: a.config.shortvideo,
location: a.config.location,
trace: a.config.trace,
link: a.config.link,
merchant_order: a.config.merchant_order,
ShakearoundUserShake: a.config.ShakearoundUserShake,
ShakearoundLotteryBind: a.config.ShakearoundLotteryBind,
WifiConnected: a.config.WifiConnected,
qr: a.config.qr
}, a.switch_class = new Array, angular.forEach(a.msgtypes, function (e, t) {
a.switch_class[t] = "module" == e || "keyword" == e ? "switch switchOn special_switch" : "switch special_switch"
}), a.changestatus = function (t) {
n.post(a.url, {type: t}).success(function (e) {
0 == e.message.errno ? (a.switch_class[t] = "switch switchOn special_switch" == a.switch_class[t] ? "switch special_switch" : "switch switchOn special_switch", location.reload()) : util.message(e.message.message)
})
}
}]),angular.module("replyFormApp").controller("PostCtrl", ["$scope", "config", "$http", function (a, e, t) {
require(["underscore", "util"], function (e, t) {
window.initReplyController(a)
}), a.switch_class = e.class, a.status = "module" == e.status || "keyword" == e.status ? e.status : "", a.change = function (e, t) {
a.status = 0 == t ? 1 : 0, a.switch_class = 1 == a.status ? "switch switchOn special_switch" : "switch special_switch"
}
}]),angular.module("replyFormApp").controller("WelcomeDisplay", ["$scope", function (e) {
$.isFunction(window.initReplyController) && window.initReplyController(e)
}]),angular.module("replyFormApp").controller("DefaultDisplay", ["$scope", function (e) {
$.isFunction(window.initReplyController) && window.initReplyController(e)
}]),angular.module("replyFormApp").directive("ngInvoker", ["$parse", function (e) {
return function (e, t, a) {
e.$eval(a.ngInvoker)
}
}]),angular.module("replyFormApp").directive("ngMyEditor", function () {
var n = {
scope: {value: "=ngMyValue"},
template: '<textarea id="editor" style="height:600px;width:100%;"></textarea>',
link: function (e, t, a) {
if (!t.data("editor")) {
n = UE.getEditor("editor", {
autoClearinitialContent: !1,
toolbars: [["fullscreen", "source", "preview", "|", "bold", "italic", "underline", "strikethrough", "forecolor", "backcolor", "|", "justifyleft", "justifycenter", "justifyright", "|", "insertorderedlist", "insertunorderedlist", "blockquote", "emotion", "link", "removeformat", "|", "rowspacingtop", "rowspacingbottom", "lineheight", "indent", "paragraph", "fontfamily", "fontsize", "|", "inserttable", "deletetable", "insertparagraphbeforetable", "insertrow", "deleterow", "insertcol", "deletecol", "mergecells", "mergeright", "mergedown", "splittocells", "splittorows", "splittocols", "|", "horizontal", "anchor", "map", "print", "drafts"]],
elementPathEnabled: !1,
initialFrameHeight: 200,
focus: !1,
maximumWords: 9999999999999,
autoFloatEnabled: !1
}), t.data("editor", n), n.addListener("contentChange", function () {
e.value = n.getContent().replace(/\&quot\;/g, '"'), e.$root.$$phase || e.$apply("value")
}), $(t).parents("form").submit(function () {
n.queryCommandState("source") && n.execCommand("source")
}), n.addListener("ready", function () {
n && n.getContent() != e.value && n.setContent(e.value), e.$watch("value", function (e) {
n && n.getContent() != e && n.setContent(e || "")
})
})
}
}
};
return n
}),angular.module("replyFormApp").filter("nl2br", ["$sce", function (t) {
return function (e) {
return e ? t.trustAsHtml(e.replace(/\n/g, "<br/>")) : ""
}
}]),angular.module("cloudApp", ["we7app"]),angular.module("cloudApp").controller("CloudDiagnoseCtrl", ["$scope", "$http", "config", function (e, t, a) {
$(".js-checkip p").each(function () {
var t = $(this);
$.getJSON("./index.php?c=cloud&a=diagnose&do=testapi&ip=" + t.find("#serverdnsip").html(), function (e) {
t.find("#checkresult").html(e.message.message)
})
}), $.ajax({
type: "get", url: a.apiurl + "&jsonpcallback=?", dataType: "jsonp", success: function (e) {
"0" == e.check_time.errno ? $("#check-time").html('<i class="fa fa-check text-success"></i> 正常') : $("#check-time").html('<i class="fa fa-remove text-warning"></i> 异常,当前时间为:' + e.check_time.message.localtime + "; 服务器时间为:" + e.check_time.message.servertime), "0" == e.check_touch.errno ? $("#check-touch").html('<i class="fa fa-check text-success"></i> 正常') : $("#check-touch").html('<i class="fa fa-remove text-warning"></i> 异常,' + e.check_touch.message)
}, error: function () {
alert("fail")
}
})
}]),angular.module("we7codeuploadApp", ["we7app"]),angular.module("we7codeuploadApp").controller("code_upload_ctrl", ["$scope", "config", "codeservice", "$q", "$http", function (a, n, t, i, s) {
a.qrcode_src = "", a.preview_qrcode = "", a.show_wait = !1, a.support_live = !0, a.step = 1, a.show_step1 = !0, a.show_step2 = !1, a.show_step3 = !1, a.wait_sec = 15, a.user_desc = "", a.user_version = n.user_version, a.uploadType = "";
var o = null, r = null, e = 15, l = setInterval(function () {
--e <= 0 && (e = 0, clearInterval(l)), a.$apply(function () {
a.wait_sec = e
})
}, 1e3);
a.beforeUpload = function (e, t) {
a.uploadType = t || "", e ? $("#beforeUpload").modal() : a.beginUpload(0)
}, a.beginUpload = function (e) {
if (!a.user_version || !/^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$/.test(a.user_version)) return util.message("版本号错误,只能是数字、点,数字最多2位,例如 1.1.1 或1.2"), !1;
c(e)
};
var c = function (e) {
t.codeuid(n.version_id, a.user_version, e).then(function (e) {
return a.show_wait = !0, a.show_step1 = !1, t.retrycodegen(e)
}).then(function (e) {
return o = e, a.show_wait = !1, t.get_code_token()
}).then(function (e) {
a.qrcode_src = n.QRCODEURL + "&code_token=" + e, clearInterval(l);
var t = i.defer();
return t.resolve(e), t.promise
}).then(function (e) {
return a.show_wait = !1, a.step = 2, a.show_step2 = !0, t.retrychecksan(e, 408)
}).then(function (e) {
r = e, a.commit()
}, function (e) {
clearInterval(l), util.message(e)
})
};
a.preview = function () {
t.preview(r, o).then(function (e) {
a.preview_qrcode = "data:image/jpg;base64," + e, $("#qrCodeModal").modal("show")
}, function (e) {
util.message(e)
})
}, a.commit = function () {
if (!a.user_version || !/^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$/.test(a.user_version)) return util.message("版本号错误,只能是数字、点,数字最多2位,例如 1.1.1 或1.2"), !1;
t.commit(r, o, a.user_version, a.user_desc).then(function () {
s.post(n.upgrade_url, {
version_id: n.version_id,
version: a.user_version,
description: a.user_desc
}).success(function (e) {
if (!e.message || 0 != e.message.errno) return util.message(e.message.message), !1;
a.uploadType ? s.post(n.VERSIONURL, {
version_id: n.version_id,
commit_type: a.uploadType
}).success(function (e) {
0 == e.message.errno ? (a.step = 3, a.show_step2 = !1, a.show_step3 = !0) : util.message(e.message.message)
}) : (a.step = 3, a.show_step2 = !1, a.show_step3 = !0)
})
}, function (e) {
util.message(e)
})
}
}]),angular.module("we7codeuploadApp").service("codeservice", ["$http", "$q", "config", function (a, o, r) {
return {
ajax: function (e, t) {
return a.get(e).then(function (e) {
var t = e.data, a = o.defer();
return a.resolve(t), a.promise
}, function () {
var e = o.defer();
return e.reject(), e.promise
})
}, codeuid: function (e, t, a) {
var n = o.defer();
return this.ajax(r.UUIDURL + "version_id=" + e + "&user_version=" + t + "&support_live=" + (a ? 1 : 0)).then(function (e) {
if ("0" != e.errno) {
var t = "小程序应用数据异常,无法获取,请联系开发者";
e.message && (t = e.message), n.reject(t)
} else n.resolve(e.data.code_uuid)
}), n.promise
}, codegen: function (t) {
var a = o.defer();
return this.ajax(r.CODE_GEN_CHECK_URL + "code_uuid=" + t).then(function (e) {
if ("0" != e.errno) a.reject("no gen"); else {
e.data.is_gen;
a.resolve(t)
}
}, function (e) {
a.reject("no gen")
}), a.promise
}, retrycodegen: function (t) {
var a = o.defer(), n = this;
return setTimeout(function () {
n.codegen(t).then(function (e) {
if (!e) return n.retrycodegen(t).then(function () {
a.resolve()
});
a.resolve(t)
}, function () {
return n.retrycodegen(t).then(function () {
a.resolve()
})
})
}, 5e3), a.promise
}, get_code_token: function () {
var a = o.defer();
return this.ajax(r.CODE_TOKEN_URL).then(function (e) {
if ("0" != e.errno) a.reject(); else {
var t = e.data.code_token;
a.resolve(t)
}
}), a.promise
}, checkscan: function (a, n) {
var i = o.defer();
n || (n = 408);
var e = r.CHECKSANURL + "&code_token=" + a + "&last=" + n;
return this.ajax(e).then(function (e) {
if (0 < e.errno) setTimeout(function () {
i.reject(a, n)
}, 5e3); else if (0 != e.errno) ; else {
var t = parseInt(e.data.errcode);
i.resolve({errcode: t, last: n, code_token: e.data.code_token})
}
}, function (e) {
setTimeout(function () {
i.reject(a, n)
}, 5e3)
}), i.promise
}, retrychecksan: function (n, e) {
var i = o.defer(), s = this;
return s.checkscan(n, e).then(function (e) {
var t = e.errcode, a = (e.last, e.code_token);
405 != t ? 403 != t ? 666 != t ? s.retrychecksan(n, t).then(function (e) {
i.resolve(e)
}) : i.reject("二维码已过期") : i.reject("已取消扫码") : i.resolve(a)
}, function (e, t) {
s.retrychecksan(e, t).then(function (e) {
i.resolve(e)
})
}), i.promise
}, preview: function (e, t) {
var n = o.defer(), a = r.PREVIEWURL + "code_token=" + e + "&code_uuid=" + t;
return this.ajax(a).then(function (e) {
if ("0" == e.errno) {
var t = e.data.qrcode_img;
n.resolve(t)
}
var a = e.message;
"" == a && (a = "预览失败, 确保当前扫码用户有上传小程序的权限"), n.reject(a)
}), n.promise
}, commit: function (e, t, a, n) {
var i = o.defer(),
s = r.COMMITURL + "code_token=" + e + "&user_version=" + a + "&user_desc=" + n + "&code_uuid=" + t;
return this.ajax(s).then(function (e) {
if ("0" != e.errno) {
var t = e.message;
"" == t && (t = "上传代码失败, 确保当前扫码用户有上传小程序的权限"), i.reject(t)
} else i.resolve()
}), i.promise
}
}
}]),angular.module("fansApp", ["we7app"]).value("config", {
running: !1,
syncState: "",
downloadState: ""
}).controller("DisplayCtrl", ["$scope", "$http", "config", "$q", function (i, s, o, n) {
i.config = o, i.addTagUrl = o.addTagUrl, i.tag = "", i.searchMod = o.searchMod, i.closeValue = 0, i.registerUrl = o.registerUrl, i.register = [], i.sync_member = 0, i.switchSearchMod = function (e) {
i.searchMod = e, i.$apply(i.searchMod)
}, i.addTag = function () {
s.post(i.addTagUrl, {tag: i.tag}).success(function (e) {
})
}, i.registerMember = function (e) {
i.register.openid = e, i.register.password = "", i.register.repassword = ""
}, i.register = function () {
return $(".modal").modal("hide"), "" == i.register.password ? (util.message("新密码不可为空!"), !1) : "" == i.register.repassword ? (util.message("确认新密码不可为空!"), !1) : i.register.password != i.register.repassword ? (util.message("两次密码不一致!"), !1) : void s.post(i.registerUrl, {
password: i.register.password,
repassword: i.register.repassword,
openid: i.register.openid
}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "ajax") : util.message(e.message.message)
})
}, i.syncMember = function () {
s.get(o.syncMember + "&sync_member=" + i.sync_member).success(function (e) {
0 == e.message.errno ? ($("#sync-setting").modal("hide"), i.sync_member = 1 == e.message.message ? 1 : 0) : (i.sync_member = 0, util.message("设置失败, 请重试!"))
})
}, i.downloadFans = function (e, a) {
var t, n = new RegExp("(^| )we7:sync_fans_pindex:" + window.sysinfo.uniacid + "=([^;]*)(;|$)");
if (t = document.cookie.match(n)) return i.sync("all", {pageindex: unescape(t[2])}), !1;
a || (a = 0), null == e && (e = "", util.message("正在下载粉丝数据...")), s.post(o.syncAllUrl, {next_openid: e}).success(function (e) {
if (0 != e.message.errno) {
var t = "";
return "string" == typeof e.message ? t = e.message : "string" == typeof e.message.message && (t = e.message.message), util.message("粉丝下载失败。具体原因:" + t), !1
}
if (a += parseInt(e.message.message.count), e.message.message.total <= a || !e.message.message.count && !e.message.message.next) return i.sync("all"), !1;
i.downloadFans(e.message.message.next, a)
})
}, i.sync = function (e, t) {
if ("all" == e) t || (t = {
pageindex: 0,
total: 0
}, util.message("粉丝数据下载完成。开始更新粉丝数据...", "", "success")), t.type = "all", t.sync_member = i.sync_member; else {
if (t = {type: "check", openids: [], sync_member: i.sync_member}, $(".openid:checked").each(function () {
t.openids.push(this.value)
}), 0 == t.openids.length) return util.message("请选择粉丝", "", "info"), !1;
util.message("正在同步粉丝数据请不要关闭浏览器...")
}
0 < t.pageindex && 0 == i.closeValue && ($("#modal-message").modal("hide"), util.dialog("更新进度", '<div class="progress"> <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="' + t.pageindex / t.total * 100 + '" aria-valuemin="0" aria-valuemax="100" style="width: ' + t.pageindex / t.total * 100 + '%"><span class="sr-only"></span></div></div>', "", {containerName: "link-container"}).modal("show"));
$(".close").click(function () {
i.closeValue = 1
});
var a = n.defer();
a.promise.then(function () {
s.post(i.config.syncUrl, t).success(function (e) {
if (null == e.message) return util.message("更新失败!可能是由于你当前网络不稳定,请稍后再试。", "", "info"), !1;
if (0 == e.message.errno) {
if ("success" == e.message.message || e.message.message.total == e.message.message.pageindex) return util.message("同步粉丝数据成功", o.msgUrl, "success"), !1;
i.sync("all", {pageindex: e.message.message.pageindex, total: e.message.message.total})
} else {
if (++t.pageindex > t) return util.message("同步粉丝数据成功", o.msgUrl, "success"), !1;
i.sync("all", {pageindex: ++t.pageindex, total: t.total})
}
})
}, function (e) {
}), 1 == i.closeValue ? i.closeValue = 0 : a.resolve()
}
}]).controller("chatsCtrl", ["$scope", "$http", "config", function (t, e, a) {
send = function () {
for (type in types = [], types.text = $('[name="reply[reply_basic]"]').val(), types.news = $('[name="reply[reply_news]"]').val(), types.image = $('[name="reply[reply_image]"]').val(), types.music = $('[name="reply[reply_music]"]').val(), types.voice = $('[name="reply[reply_voice]"]').val(), types.video = $('[name="reply[reply_video]"]').val(), types.wxcard = $('[name="reply[reply_wxcard]"]').val(), types) if (msg_type = type, msg_content = types[type], "" != msg_content) break;
if (!msg_content) return !1;
$.post(a.sendurl, {type: msg_type, content: msg_content}, function (e) {
-1 == (e = $.parseJSON(e)).message.errno ? util.message(e.message.message, "", "info") : ($(".keywords-list li").remove(), $('[name="reply[reply_basic]"]').val(""), $('[name="reply[reply_news]"]').val(""), $('[name="reply[reply_image]"]').val(""), $('[name="reply[reply_music]"]').val(""), $('[name="reply[reply_voice]"]').val(""), $('[name="reply[reply_video]"]').val(""), $('[name="reply[reply_wxcard]"]').val(""), t.chatLogs.unshift({
flag: 1,
createtime: e.message.message.createtime,
content: e.message.message.content,
msgtype: e.message.message.msgtype
}), t.$apply())
})
}, t.chatLogs = a.chatLogs, window.onbeforeunload = function () {
$.get(a.endurl, {}, function (e) {
})
}
}]),angular.module("homeApp", ["we7app"]),angular.module("homeApp").controller("WelcomeCtrl", ["$scope", "$http", "config", function (n, e, t) {
n.notices = t.notices, n.loaderror = 0, n.last_modules = null, n.fans_kpi = [], e({
method: "POST",
url: "./index.php?c=home&a=welcome&do=get_fans_kpi"
}).success(function (e) {
0 == e.message.errno && (n.fans_kpi = e.message.message)
}), n.buildAccountModules = function () {
e.post("./index.php?c=home&a=welcome&do=build_account_modules")
}, n.buildAccountModules(), "v" == t.family && (n.recommend = {
recommend: {
name: "推荐应用",
list: [],
ads: [],
icon: "recommend"
},
"new-app": {name: "新应用", list: [], ads: [], icon: "new"},
essential: {name: "下载排行", list: [], ads: [], icon: "down"},
hot: {name: "热门排行", list: [], ads: [], icon: "hot"},
large: {name: "大额应用排行", list: [], ads: [], icon: "big"}
}, require([t.apiLink + "/jsdata/app/recommend/9"], function (e) {
n.recommend.recommend.list = e, n.showLoading = !1
}), require([t.apiLink + "/jsdata/popularize/bottom"], function (e) {
n.recommend.recommend.ads = e, n.$apply()
}), require([t.apiLink + "/jsdata/popularize/ads"], function (e) {
for (var t in e) 3 == e[t].position && n.recommend["new-app"].ads.push(e[t]), 4 == e[t].position && n.recommend.hot.ads.push(e[t]), 5 == e[t].position && n.recommend.essential.ads.push(e[t]), 6 == e[t].position && n.recommend.large.ads.push(e[t]);
n.$apply()
}), n.changeTab = function (a) {
a && n.recommend[a].list.length <= 0 && (n.showLoading = !0, require([t.apiLink + "/jsdata/app/" + a + "/9"], function (e) {
for (var t in e) e[t] && e[t].last_upgrade_time && (e[t].last_upgrade_time = moment(1e3 * e[t].last_upgrade_time).format("YYYY-MM-DD"));
n.recommend[a].list = e, n.showLoading = !1, n.$apply()
}))
})
}]),angular.module("homeApp").controller("systemWelcomeCtrl", ["$scope", "$http", "config", "$compile", function (n, a, i, e) {
n.tuijianshow = !0, n.closeTuijian = function () {
n.tuijianshow = !1
}, n.is_empty_accounts = i.is_empty_accounts, n.is_empty_modules = i.is_empty_modules, n.account_list = [], "v" == i.family && (n.recommend = {
recommend: {
name: "推荐应用",
list: [],
ads: [],
icon: "recommend"
},
"new-app": {name: "新应用", list: [], ads: [], icon: "new"},
essential: {name: "下载排行", list: [], ads: [], icon: "down"},
hot: {name: "热门排行", list: [], ads: [], icon: "hot"},
large: {name: "大额应用排行", list: [], ads: [], icon: "big"}
}, require([i.apiLink + "/jsdata/app/recommend/9"], function (e) {
n.recommend.recommend.list = e, n.showLoading = !1
}), require([i.apiLink + "/jsdata/popularize/bottom"], function (e) {
n.recommend.recommend.ads = e, n.$apply()
}), require([i.apiLink + "/jsdata/popularize/ads"], function (e) {
for (var t in e) 3 == e[t].position && n.recommend["new-app"].ads.push(e[t]), 4 == e[t].position && n.recommend.hot.ads.push(e[t]), 5 == e[t].position && n.recommend.essential.ads.push(e[t]), 6 == e[t].position && n.recommend.large.ads.push(e[t]);
n.$apply()
}), n.changeTab = function (a) {
a && n.recommend[a].list.length <= 0 && (n.showLoading = !0, require([i.apiLink + "/jsdata/app/" + a + "/9"], function (e) {
for (var t in e) e[t] && e[t].last_upgrade_time && (e[t].last_upgrade_time = moment(1e3 * e[t].last_upgrade_time).format("YYYY-MM-DD"));
n.recommend[a].list = e, n.showLoading = !1, n.$apply()
}))
}), n.loaderror = 0, n.ads = null, n.account_num = i.account_num, n.last_accounts = i.last_accounts, n.last_modules = i.last_modules, n.message_list = i.message_list, n.links = i.links, n.user_info = i.user_info, n.account_types = i.account_types, n.system_notice_show = !0, n.module_show = !0, n.modules = i.user_modules, n.moduleList = {modules: i.own_account_modules_all}, n.account_list = [], n.getAccountList = function () {
a.post(i.links.getAccountListUrl).success(function (e) {
angular.forEach(e.message.message, function (e) {
"owner" == e.user_role && n.account_list.push(e)
})
})
}, n.getAccountList(), n.commonModuleSwitch = function (e) {
e.default_uniacid ? window.location.href = e.module.switchurl + "&uniacid=" + e.default_uniacid : window.location.href = e.module.switchurl + "&uniacid=" + e.uniacid
}, n.showAccounts = function (e) {
a.post(i.links.moduleAccounts, {module_name: e}).success(function (e) {
n.module_accounts = e.message.message
})
}, n.system_notice = function () {
n.system_notice_show = !n.system_notice_show, n.we7_notice_show = !1
}, n.we7_notice = function () {
n.we7_notice_show = !n.we7_notice_show, n.system_notice_show = !1
}, n.addCommonModule = function () {
n.selected_modules = [], angular.forEach(n.moduleList.modules, function (e) {
1 == e.checked && n.selected_modules.push({module_name: e.module_name, uniacid: e.uniacid})
}), a.post(i.links.addWelcomeShortcutUrl, {shortcuts: n.selected_modules}).success(function (e) {
location.reload()
})
}, n.selectCommonAccount = function () {
n.selected_accounts = [], angular.forEach(n.account_list, function (e) {
1 == e.checked && n.selected_accounts.push({uniacid: e.uniacid})
}), a.post(i.links.addWelcomeShortcutUrl, {shortcuts: n.selected_accounts}).success(function (e) {
location.reload()
})
}, n.remoteCommonModule = function (e, t) {
a.post(i.links.removeWelcomeShortcutUrl, {module_name: e, uniacid: t}).success(function (e) {
location.reload()
})
}, n.removeCommonAccount = function (e) {
a.post(i.links.removeWelcomeShortcutUrl, {uniacid: e}).success(function (e) {
location.reload()
})
}, n.setDefault = function (e, t) {
a.post(i.links.setDefaultUrl, {module_name: e, uniacid: t}).success(function (e) {
location.reload()
})
}, n.setTop = function (e) {
a.post(n.links.setTop, {id: e}).success(function (e) {
0 == e.message.errno && location.reload()
})
}, n.redirect_urls = i.redirect_urls, n.user_welcome_link = {}, angular.forEach(i.redirect_urls, function (e) {
e.id == i.user_info.welcome_link && (n.user_welcome_link = e)
}), n.saveSetting = function (e, t) {
n.user_info.welcome_link = e.value.id, n.user_welcome_link = e.value, a.post(i.links.userPost, {
type: "welcome_link",
welcome_link: n.user_info.welcome_link,
uid: n.user_info.uid
}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
util.toast("修改成功!", "success")
})
}
}]),angular.module("we7job", ["we7app"]),angular.module("we7job").controller("we7job-base-controller", ["$scope", "$http", "config", function (a, e, t) {
var n, i, s, o = t.list, r = t.jobid, l = new Worker("resource/js/app/job.js?" + Math.random());
if (a.list = o, n = document.location.toString().split("//"), i = n[1].indexOf("/"), -1 != (s = n[1].substring(i)).indexOf("?") && (s = s.split("?")[0]), a.relUrl = s, a.start = function (e) {
e.relUrl = a.relUrl, e.start = !e.start, l.postMessage(e)
}, l.onmessage = function (e) {
var t = e.data.id;
a.list[t].progress = e.data.progress, a.$apply()
}, 0 < r) {
var c = o[r];
c && a.start(c)
}
}]),angular.module("massApp", ["we7app"]),angular.module(["massApp"]).controller("MassSend", ["$scope", "$http", "config", function (e, a, i) {
e.showLog = function (e) {
var t = parseInt(e), n = $("#" + t);
a.post(i.logUrl, {tid: t, type: "mass", module: "task"}).success(function (e) {
e = angular.toJson(e);
var a = "";
e.message && 0 != e.message.items.length ? $.each(e.message.items, function (e, t) {
a += "<tr><td>" + t.createtime + " " + t.note + "</td></tr>"
}) : a = '<tr><td class="text-center"><i class="fa fa-info-circle"></i> 暂无数据</td></tr>', n.popover({
html: !0,
placement: "left",
trigger: "manual",
title: "触发日志",
content: '<table class="table-cron table">' + a + "</table>"
}), n.popover("toggle")
})
}, e.hideLog = function (e) {
var t = parseInt(e);
$("#" + t).popover("toggle")
}
}]),angular.module("massApp").controller("MassPost", ["$scope", "config", function ($scope, config) {
$scope.groups = config.groups, $scope.massdata = config.massdata || {
groupname: "-1",
type: "0"
}, setTimeout(function () {
$("select").niceSelect && $("select").niceSelect("update")
}), $scope.clock = config.massdata ? config.massdata.clock : "08:00", $.isFunction(window.initReplyController) && window.initReplyController($scope), $scope.checkSubmit = function (e) {
var selectedGroup = $(".mass-group").val();
if ("" == selectedGroup) return e.preventDefault(), util.message("请选择群发对象"), !1;
if (-1 == selectedGroup) {
var group_fans_all = {id: -1, name: "全部粉丝", count: 0};
$(':hidden[name="group"]').val(angular.toJson(group_fans_all))
} else angular.forEach($scope.groups, function (e, t) {
e.id == selectedGroup && $(':hidden[name="group"]').val(angular.toJson(e))
});
if ("" == $scope.clock) return e.preventDefault(), util.message("请选择群发具体时间"), !1;
if ("0" == config.day) {
var selectedTime = $scope.clock.split(":"), d = new Date, hours = d.getHours(), minutes = d.getMinutes();
if (selectedTime[0] < hours || selectedTime[0] == hours && selectedTime[1] < minutes) return e.preventDefault(), util.message("发送时间不能小于当前时间"), !1
}
var reply_news = $(':hidden[name="reply[reply_news]"]').val(),
reply_image = $(':hidden[name="reply[reply_image]"]').val(),
reply_music = $(':hidden[name="reply[reply_music]"]').val(),
reply_voice = $(':hidden[name="reply[reply_voice]"]').val(),
reply_video = $(':hidden[name="reply[reply_video]"]').val(),
reply_basic = $(':hidden[name="reply[reply_basic]"]').val();
if ("" == reply_news && "" == reply_image && "" == reply_music && "" == reply_voice && "" == reply_video && "" == reply_basic) return e.preventDefault(), util.message("请选择群发素材"), !1;
if ("" != reply_news) {
if (reply_news = eval("(" + reply_news + ")"), "perm" != reply_news.model) return e.preventDefault(), util.message("群发不支持本地/服务器素材,请选择微信素材"), !1;
$(':hidden[name="reply[reply_news]"]').val(reply_news.mediaid)
}
"" != reply_image && (reply_image = eval("(" + reply_image + ")"), $(':hidden[name="reply[reply_image]"]').val(reply_image)), "" != reply_music && (reply_music = eval("(" + reply_music + ")"), $(':hidden[name="reply[reply_music]"]').val(reply_music)), "" != reply_voice && (reply_voice = eval("(" + reply_voice + ")"), $(':hidden[name="reply[reply_voice]"]').val(reply_voice)), "" != reply_video && (reply_video = eval("(" + reply_video + ")"), $(':hidden[name="reply[reply_video]"]').val(reply_video.mediaid))
}, $(".clockpicker").clockpicker({autoclose: !0})
}]),angular.module("massApp").controller("MassDisplay", ["$scope", "$http", "config", function (n, i, e) {
n.days = e.days, n.delMass = function (e, a) {
e = parseInt(e), a = parseInt(a);
return confirm("确认清空这条群发吗?") && i.post("./index.php?c=platform&a=mass&do=del", {id: e}).success(function (e, t) {
e.message.errno ? util.message("清空群发失败:<br>" + e.message.message, "", "error") : n.days[a].info = ""
}), !1
}, n.toEdit = function (e) {
e = parseInt(e);
window.location.href = "./index.php?c=platform&a=mass&do=post&day=" + e
}, n.preview = function (e) {
e = parseInt(e);
if (!n.days[e].info) return util.message("群发内容错误!"), !1;
var t = n.days[e].info.media_id, a = n.days[e].info.msgtype;
$("#modal-view").modal("show"), $("#modal-view .btn-view").unbind().click(function () {
var e = $.trim($("#modal-view #wxname").val());
return e ? ($("#modal-view").modal("hide"), i.post("./index.php?c=platform&a=mass&do=preview", {
media_id: t,
wxname: e,
type: a
}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message) : util.message("发送成功", "", "success")
})) : util.message("微信号不能为空", "", "error"), !1
})
}
}]),angular.module("materialApp", ["we7app"]),angular.module("materialApp").directive("ngMyEditor", function () {
return {
scope: {value: "=ngMyValue", imguploadurl: "@ngMyUpurl"},
template: '<textarea id="editor" style="height:600px;width:100%;"></textarea>',
link: function (a, n, e) {
n.data("editor") || util.editor("editor", {
allow_upload_video: 0, callback: function (e, t) {
n.data("editor", t), t.addListener("contentChange", function () {
a.value = t.getContent(), a.$root.$$phase || a.$apply("value")
}), t.addListener("ready", function () {
t && t.getContent() != a.value && t.setContent(a.value), a.$watch("value", function (e) {
t && t.getContent() != e && t.setContent(e || "")
})
})
}
}, !0)
}
}
}).controller("materialDisplay", ["$scope", "$http", "config", function (s, o, r) {
s.materialList = r.materialList, s.groups = r.group, s.config = r, s.group = "", s.materialType = "", s.materialId = "", s.syncNews = r.syncNews, s.hidenbutton = 0, s.typeName = r.typeName, s.sync = function (t, e, a, n, i) {
$(window).bind("beforeunload", function () {
return "您输入的内容尚未保存,确定离开此页面吗?"
}), s.utilMessage ? null == e ? s.utilMessage.find(".content").text("正在同步素材,请勿关闭浏览器...") : s.utilMessage.find(".content").text("已同步" + parseInt((e - 1) / a * 100) + "%,请勿关闭浏览器...") : s.utilMessage = null == e ? util.message("正在同步素材,请勿关闭浏览器...") : util.message("已同步" + parseInt((e - 1) / a * 100) + "%,请勿关闭浏览器..."), o.post(r.sync_url, {
type: t,
pageindex: e,
total: a,
wechat_existid: n,
original_newsid: i
}).success(function (e) {
0 == e.message.errno ? ($(window).unbind("beforeunload"), s.utilMessage.find(".content").text("同步素材成功, 即将刷新页面"), window.location.href = "./index.php?c=platform&a=material&type=" + t) : (sync_info = e.message.message, s.sync(sync_info.type, sync_info.pageindex, sync_info.total, sync_info.wechat_existid, sync_info.original_newsid))
})
}, 1 == s.syncNews && s.sync("news"), s.upload = function (t, a, n) {
require(["fileUploader"], function (e) {
e.init(function () {
util.message("上传成功", location.href, "success")
}, {type: t, direct: !0, multiple: a, isWechat: n, typeName: s.typeName})
})
}, s.del_material = function (t, e, a) {
util.confirm(function () {
o.post(r.del_url, {material_id: e, type: t, server: a}).success(function (e) {
0 != e.message.errno ? util.message("删除失败,具体原因:" + e.message.message, "", "info") : util.message("删除成功", "./index.php?c=platform&a=material&type=" + t + ("local" == a ? "&islocal=true" : ""), "success")
})
}, function () {
return !1
}, "确认删除吗?")
}, s.checkGroup = function (e, t) {
$("select").niceSelect && $("select").niceSelect("update"), setTimeout(function () {
$("#check-group").modal("show")
}), s.materialType = e, s.materialId = t, s.group = ""
}, s.transToWechat = function (t, e) {
util.message("素材转换将在后台运行,成功后后自动刷新页面,请勿关闭浏览器..."), o.post(r.trans_url, {material_id: e}).success(function (e) {
0 != e.message.errno ? util.message("转换失败,具体原因:" + e.message.message, "", "info") : s.sync(t)
})
}, s.newsToWechat = function (e) {
util.message("素材转换将在后台运行,成功后后自动刷新页面,请勿关闭浏览器..."), o.post(s.config.postwechat_url, {material_id: e}).success(function (e) {
0 == e.message.errno ? util.message("已保存", "./index.php?c=platform&a=material", "success") : alert("创建图文失败" + e.message.message)
})
}, s.sendMaterial = function () {
o.post(s.config.send_url, {type: s.materialType, id: s.materialId, group: s.group}).success(function (e) {
1 == e.message.errno ? util.message(e.message.message, "", "info") : util.message("群发成功", "./index.php?c=platform&a=material&type=" + s.materialType, "success")
})
}, s.createNew = function (e) {
var t = s.config.create_new_url + "&new_type=" + e;
window.location = t
}, s.choiceSendType = function (e, t, a) {
$(".web-mobile-choice-type a[class = 'we7-margin-bottom']").attr("data-url", e), $(".web-mobile-choice-type a[class = 'we7-mobile-material-preview']").attr("data-type", t), $(".web-mobile-choice-type a[class = 'we7-mobile-material-preview']").attr("data-media-id", a)
}, s.wabPreview = function () {
$("#modalWechatView").modal("hide"), window.open($(".web-mobile-choice-type a[class = 'we7-margin-bottom']").attr("data-url"), "_blank")
}, s.mobilePreview = function () {
var t = $(".web-mobile-choice-type a[class = 'we7-mobile-material-preview']").attr("data-media-id"),
a = $(".web-mobile-choice-type a[class = 'we7-mobile-material-preview']").attr("data-type");
$(".material-wechat-view").addClass("hidden"), $("#weixin-dialog").removeClass("hidden"), $("#modalWechatView .btn-send").unbind().click(function () {
var e = $.trim($("#modalWechatView #wxname").val());
return e ? ($("#weixin-dialog").addClass("hidden"), $(".material-wechat-view").removeClass("hidden"), $("#modalWechatView #wxname").val(""), $("#modalWechatView").modal("hide"), o.post("./index.php?c=platform&a=mass&do=preview", {
media_id: t,
wxname: e,
type: a
}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message) : util.message("发送成功", "", "success")
})) : util.message("微信号不能为空", "", "error"), !1
})
}, s.previewBack = function () {
$("#weixin-dialog").addClass("hidden"), $(".material-wechat-view").removeClass("hidden")
}
}]).controller("materialAdd", ["$scope", "material", "$http", "$timeout", function (s, a, t, e) {
s.config = a, s.operate = a.operate, s.model = a.model, s.new_type = a.new_type, s.hidenbutton = "reply" == a.new_type ? 0 : 1, s.typeName = a.typeName, s.changeClass = function () {
angular.forEach(s.materialList, function (e, t) {
s.materialList[t].class = "0" == t ? s.activeIndex == t ? "cover-appmsg-item active" : "cover-appmsg-item" : s.activeIndex == t ? "appmsg-item active" : "appmsg-item"
})
}, s.tomedia = function (e) {
var t = "";
return $.ajax({
url: a.url, async: !1, data: {url: e}, success: function (e) {
e = $.parseJSON(e);
t = e.message.message
}
}), t
}, s.changeOrder = function (e, t) {
a = {}, "down" == e ? (a = s.materialList[t], s.materialList[t] = s.materialList[t + 1], s.materialList[t + 1] = a) : (a = s.materialList[t], s.materialList[t] = s.materialList[t - 1], s.materialList[t - 1] = a)
}, s.deleteMaterial = function (e) {
confirm("确定要删除吗?") && (s.materialList.splice(e, 1), s.activeIndex = s.activeIndex - 1)
}, s.changeIndex = function (e) {
s.activeIndex = e, s.changeClass()
}, s.addMaterial = function () {
null == s.materialList ? (s.materialList = [], s.activeIndex = 0) : s.activeIndex = s.materialList.length, s.materialList.push({
id: "",
title: "",
author: "",
thumb: "",
media_id: "",
displayorder: "0",
digest: "",
content: "",
content_source_url: "",
show_cover_pic: 0,
class: ""
}), s.changeClass()
}, "add" == s.operate && "reply" != s.config.type ? s.addMaterial() : (s.activeIndex = 0, s.materialList = [], angular.forEach(a.materialList, function (e, t) {
e.thumb_url = s.tomedia(e.thumb_url), s.materialList[t] = {
id: e.id,
title: e.title,
author: e.author,
thumb: e.thumb_url,
media_id: e.thumb_media_id,
displayorder: t,
digest: e.digest,
content: e.content,
content_source_url: e.content_source_url,
url: e.url,
show_cover_pic: isNaN(Number(e.show_cover_pic)) ? 0 : Number(e.show_cover_pic),
class: ""
}
}), s.changeClass()), s.pickPicture = function (e) {
isWechat = "wechat" == e, require(["fileUploader"], function (e) {
e.init(function (e) {
s.materialList[s.activeIndex].thumb = e.url, s.materialList[s.activeIndex].media_id = e.media_id, s.$apply()
}, {
type: "image",
direct: !0,
multiple: !1,
isWechat: isWechat,
typeName: s.typeName,
image_limit: s.config.image_limit,
voice_limit: s.config.voice_limit,
video_limit: s.config.video_limit
})
})
}, s.updateSelection = function () {
s.materialList[s.activeIndex].show_cover_pic = isNaN(Number(!s.materialList[s.activeIndex].show_cover_pic)) ? 0 : Number(!s.materialList[s.activeIndex].show_cover_pic)
}, s.saveNews = function (a) {
news = [];
var n = "", i = "";
if (angular.forEach(s.materialList, function (e, t) {
"" == e.title ? (n = t, i = "请输入标题后,再点击保存按钮") : "" != e.content || "wechat" != a && "reply" != s.new_type ? "" == e.content && "wechat" == a ? (n = t, i = "图文内容中图片上传失败,请重新上传") : (e.displayorder = t + 1, news[t] = e) : (n = t, i = "请输入一段正文,再点击保存按钮")
}), "" !== n) return s.activeIndex = n, s.changeClass(), alert(i), !1;
util.message("正在生成图文消息,请勿关闭浏览器...");
var e = "add" == s.config.operate ? "" : s.config.materialList[0].attach_id;
t.post(s.config.newsUpload_url, {
news: news,
operate: s.operate,
attach_id: e,
type: s.config.type,
target: a,
news_rid: s.config.news_rid
}).success(function (e) {
0 == e.message.errno ? util.message("已保存", s.config.msg_url, "success") : alert("创建图文失败" + e.message.message)
})
}, s.exportFromCms = function () {
s.searchCms()
}, s.searchCms = function (e) {
var i = {
header: '<ul role="tablist" class="nav nav-pills" style="font-size:14px; margin-top:-20px;">\t<li role="presentation" class="active" id="li_goodslist"><a data-toggle="tab" role="tab" aria-controls="articlelist" href="#articlelist">文章列表</a></li></ul>',
content: '<div class="tab-content"><div id="articlelist" class="tab-pane active" role="tabpanel">\t<table class="table table-hover">\t\t<thead class="navbar-inner">\t\t\t<tr>\t\t\t\t<th style="width:40%;">标题</th>\t\t\t\t<th style="width:30%">创建时间</th>\t\t\t\t<th style="width:30%; text-align:right">\t\t\t\t\t<div class="input-group input-group-sm hide">\t\t\t\t\t\t<input type="text" class="form-control">\t\t\t\t\t\t<span class="input-group-btn">\t\t\t\t\t\t\t<button class="btn btn-default" type="button"><i class="fa fa-search"></i></button>\t\t\t\t\t\t</span>\t\t\t\t\t</div>\t\t\t\t</th>\t\t\t</tr>\t\t</thead>\t\t<tbody></tbody>\t</table>\t<div id="pager" style="text-align:center;"></div></div></div>',
footer: "",
articleitem: '<%_.each(list, function(item) {%> \n<tr>\n\t<td><a href="#" data-cover-attachment-url="<%=item.attachment%>" title="<%=item.title%>"><%=item.title%></a></td>\n\t<td><%=item.createtime%></td>\n\t<td class="text-right">\n\t\t<button class="btn btn-default js-btn-select" js-id="<%=item.id%>">选取</button>\n\t</td>\n</tr>\n<%});%>\n'
};
$("#link-search-cms")[0] ? s.modalobj = $("#link-search-cms").data("modal") : (s.modalobj = util.dialog(i.header, i.content, i.footer, {containerName: "link-search-cms"}), s.modalobj.find(".modal-body").css({
height: "680px",
"overflow-y": "auto"
}), s.modalobj.modal("show"), s.modalobj.on("hidden.bs.modal", function () {
s.modalobj.remove()
}), $("#link-search-cms").data("modal", s.modalobj)), e = e || 1, t.get("./index.php?c=utility&a=link&do=articlelist&page=" + e).success(function (e, t, a, n) {
e.message.message.list && (s.modalobj.find("#articlelist").data("articles", e.message.message.list), s.modalobj.find("#articlelist tbody").html(_.template(i.articleitem)(e.message.message)), s.modalobj.find("#pager").html(e.message.message.pager), s.modalobj.find("#pager .pagination li[class!='active'] a").click(function () {
return s.searchCms($(this).attr("page")), !1
}), s.modalobj.find(".js-btn-select").click(function () {
s.addCms($(this).attr("js-id")), s.$apply(), s.modalobj.modal("hide")
}))
})
}, s.addCms = function (e) {
var t = s.modalobj.find("#articlelist").data("articles")[e];
s.materialList[s.activeIndex].title = t.title, s.materialList[s.activeIndex].thumb = t.thumb_url, s.materialList[s.activeIndex].author = t.author, s.materialList[s.activeIndex].incontent = 1 == t.incontent, s.materialList[s.activeIndex].description = t.description, s.materialList[s.activeIndex].content = t.content, s.materialList[s.activeIndex].content_source_url = t.linkurl, s.materialList[s.activeIndex].detail = "" != t.content
}
}]),angular.module("memberAPP", ["we7app"]),angular.module("memberAPP").controller("group", ["$scope", "$http", "config", function (a, n, e) {
a.config = e, a.group_level = a.config.group_level, a.group_person_count = a.config.group_person_count, a.group_list = a.config.group_list, a.default_group = a.config.default_group, a.set_group_detail_info = function (e) {
a.group_detail = {}, n.post(a.config.get_group_url, {group_id: e}).success(function (e) {
1 == e.message.errno ? util.message(e.message.message, "", "error") : a.group_detail = e.message.message
}), $("#group_detail").modal("show")
}, a.change_group_level = function () {
n.post(a.config.change_group_level_url, {group_level: a.group_level}).success(function (e) {
0 == e.message.errno ? util.modal_message("", "设置成功", "", "success") : util.message("设置失败", "", "error")
})
}, a.save_group = function () {
if ("" == a.group_detail.title) return util.message("请填写会员组名称", "", "error"), !1;
n.post(a.config.save_group_url, {group: a.group_detail}).success(function (e) {
1 == e.message.errno && util.message(e.message.message, "", "error"), 2 == e.message.errno && ($("#group_detail").modal("hide"), a.group_list[a.group_detail.groupid] = a.group_detail, util.message(e.message.message, "", "success")), 3 == e.message.errno && (groupid = e.message.message.groupid, a.group_list[groupid] = e.message.message, $("#group_detail").modal("hide"), util.message("添加成功", "", "success"))
})
}, a.set_default = function (t) {
n.post(a.config.set_default_url, {group_id: t}).success(function (e) {
0 == e.message.errno ? (a.group_list[t].isdefault = 1, a.group_list[a.default_group.groupid].isdefault = 0, a.default_group = a.group_list[t], a.apply(a), util.message("设置成功", "", "success")) : util.message("设置失败", "", "error")
})
}, a.del_group = function (t) {
if (!confirm("确定要删除吗?")) return !1;
n.post(a.config.del_group_url, {group_id: t}).success(function (e) {
0 == e.message.errno ? (delete a.group_list[t], util.message("删除成功", "", "success")) : util.message("删除失败", "", "error")
})
}
}]),angular.module("memberAPP").controller("baseInformation", ["$scope", "$http", "config", function (u, d, p) {
u.config = p, u.profile = u.config.profile, u.groups = u.config.groups, u.addresses = u.config.addresses, u.custom_fields = u.config.custom_fields, u.all_fields = u.config.all_fields, u.uniacid_fields = u.config.uniacid_fields, u.sexes = [{
id: 0,
name: "保密"
}, {id: 1, name: "男"}, {
id: 2,
name: "女"
}], u.educations = ["博士", "硕士", "本科", "专科", "中学", "小学", "其它"], u.constellations = ["水瓶座", "双鱼座", "白羊座", "金牛座", "双子座", "巨蟹座", "狮子座", "处女座", "天秤座", "天蝎座", "射手座", "摩羯座"], u.zodiacs = ["鼠", "牛", "虎", "兔", "龙", "蛇", "马", "羊", "猴", "鸡", "狗", "猪"], u.bloodtypes = ["A", "B", "AB", "O", "其它"], u.profile.births = u.profile.birthyear + "-" + u.profile.birthmonth + "-" + u.profile.birthday, u.profile.resides = u.profile.nationality + u.profile.resideprovince + u.profile.residecity + u.profile.residedist, u.other_field_name = "", u.other_field_title = "", u.addAddress = {
name: "",
phone: "",
code: "",
province: "",
city: "",
district: "",
detail: ""
}, u.editAddress = {}, u.uid = u.config.uid, angular.forEach(u.addresses, function (e, t) {
e.pcda = e.province + "-" + e.city + "-" + e.district + "-" + e.address
}), u.addAdd = function () {
u.addAddress.province = $(".tpl-province").eq(1).val(), u.addAddress.city = $(".tpl-city").eq(1).val(), u.addAddress.district = $(".tpl-district").eq(1).val(), $("#address-add").modal("hide"), d.post(p.links.addAddressUrl, u.addAddress).success(function (e) {
if (0 == e.message.errno) {
var t = e.message.message;
t.pcda = t.province + "-" + t.city + "-" + t.district + "-" + t.address, u.addresses.push(t), util.message("收货地址添加成功", "", "success")
} else 1 == e.message.errno && util.message(e.message.message, "", "error")
})
}, u.choseEditAdd = function (a) {
angular.forEach(u.addresses, function (e, t) {
e.id == a && (u.editAddress = {
id: a,
name: e.username,
phone: e.mobile,
code: e.zipcode,
province: e.province,
city: e.city,
district: e.district,
detail: e.address,
uniacid: e.uniacid
}, $(".tpl-province").eq(2).attr("data-value", u.editAddress.province), $(".tpl-city").eq(2).attr("data-value", u.editAddress.city), $(".tpl-district").eq(2).attr("data-value", u.editAddress.district), require(["district"], function (a) {
$(".tpl-district-container").each(function () {
var e = {};
e.province = $(this).find(".tpl-province")[0], e.city = $(this).find(".tpl-city")[0], e.district = $(this).find(".tpl-district")[0];
var t = {};
t.province = $(e.province).attr("data-value"), t.city = $(e.city).attr("data-value"), t.district = $(e.district).attr("data-value"), a.render(e, t, {withTitle: !0})
})
}))
})
}, u.editAdd = function (e) {
u.editAddress.province = $(".tpl-province").eq(2).val(), u.editAddress.city = $(".tpl-city").eq(2).val(), u.editAddress.district = $(".tpl-district").eq(2).val(), $("#address-edit").modal("hide"), d.post(p.links.editAddressUrl, u.editAddress).success(function (e) {
if (0 == e.message.errno) {
var a = e.message.message;
a.pcda = a.province + "-" + a.city + "-" + a.district + "-" + a.address, angular.forEach(u.addresses, function (e, t) {
a.id == e.id && (e.pcda = a.pcda)
}), util.message("收货地址修改成功", "", "success")
} else 1 == data.message.errno && util.message(e.message.message, "", "error")
})
}, u.delAdd = function (a) {
d.post(p.links.delAddressUrl, {id: a}).success(function (e) {
0 == e.message.errno ? (angular.forEach(u.addresses, function (e, t) {
a == e.id && u.addresses.splice(t, 1)
}), util.message("收货地址删除成功", "", "success")) : 1 == data.message.errno && util.message(e.message.message, "", "error")
})
}, u.setDefaultAdd = function (a) {
d.post(p.links.setDefaultAddressUrl, {id: a, uid: u.uid}).success(function (e) {
0 == e.message.errno ? (angular.forEach(u.addresses, function (e, t) {
a == e.id ? e.isdefault = 1 : e.isdefault = 0
}), util.message("设置成功", "", "success")) : util.message("设置失败", "", "success")
})
}, u.changeImage = function (t) {
"avatar" == t && require(["fileUploader"], function (e) {
e.init(function (e) {
u.profile.avatar = e.attachment, u.profile.avatarUrl = e.url, u.$apply(u.profile), u.httpChange(t)
}, {direct: !0, multiple: !1})
})
}, u.editInfo = function (e, t) {
u.userOriginal = {}, "other_field" == e ? (u.userOriginal[t] = u.profile[t], u.other_field_name = u.all_fields[t], u.other_field_title = t) : u.userOriginal[e] = t
}, u.httpChange = function (t, e) {
switch (t) {
case"avatar":
d.post(p.links.basePost, {type: t, imgsrc: u.profile.avatar}).success(function (e) {
0 == e.message.errno ? util.message("修改成功!", "", "success") : (-1 == e.message.errno && util.message(e.message.message, e.redirect, "error"), 1 == e.message.errno && util.message(e.message.message, "", "error"))
});
break;
case"groupid":
case"gender":
case"education":
case"nickname":
case"realname":
case"address":
case"mobile":
case"qq":
case"email":
case"telephone":
case"msn":
case"taobao":
case"alipay":
case"graduateschool":
case"grade":
case"studentid":
case"revenue":
case"position":
case"occupation":
case"company":
case"nationality":
case"height":
case"weight":
case"idcard":
case"zipcode":
case"site":
case"affectivestatus":
case"lookingfor":
case"bio":
case"interest":
case"constellation":
case"zodiac":
case"bloodtype":
if ($("#" + t).modal("hide"), "" == u.userOriginal[t]) return util.message("不可为空!", "", "error"), !1;
if ("mobile" == t) {
if (!/^\d{11}$/.test(u.userOriginal[t])) return util.message("手机号格式错误", "", "error"), !1
}
d.post(p.links.basePost, {type: t, request_data: u.userOriginal[t]}).success(function (e) {
0 == e.message.errno ? (u.profile[t] = u.userOriginal[t], util.message("修改成功!", "", "success")) : (-1 == e.message.errno && util.message(e.message.message, e.redirect, "error"), 1 == e.message.errno && util.message(e.message.message, "", "error"))
});
break;
case"other_field":
if ($("#" + t).modal("hide"), "" == u.userOriginal[u.other_field_title]) return util.message("不可为空!", "", "error"), !1;
d.post(p.links.basePost, {
type: u.other_field_title,
request_data: u.userOriginal[u.other_field_title]
}).success(function (e) {
0 == e.message.errno ? (u.profile[u.other_field_title] = u.userOriginal[u.other_field_title], util.message("修改成功!", "", "success")) : (-1 == e.message.errno && util.message(e.message.message, e.redirect, "error"), 1 == e.message.errno && util.message(e.message.message, "", "error"))
});
break;
case"births":
$(".modal").modal("hide");
var a = $(".tpl-year").val(), n = $(".tpl-month").val(), i = $(".tpl-day").val();
d.post(p.links.basePost, {type: t, birthyear: a, birthmonth: n, birthday: i}).success(function (e) {
0 == e.message.errno ? (u.profile.births = a + "-" + n + "-" + i, util.message("修改成功!", "", "success")) : (-1 == e.message.errno && util.message(e.message.message, e.redirect, "error"), 1 == e.message.errno && util.message(e.message.message, "", "error"))
});
break;
case"resides":
$(".modal").modal("hide");
var s = $(".tpl-province").eq(0).val(), o = $(".tpl-city").eq(0).val(),
r = $(".tpl-district").eq(0).val();
d.post(p.links.basePost, {
type: t,
resideprovince: s,
residecity: o,
residedist: r
}).success(function (e) {
0 == e.message.errno ? (u.profile.resides = u.profile.nationality + s + o + r, util.message("修改成功!", "", "success")) : (-1 == e.message.errno && util.message(e.message.message, e.redirect, "error"), 1 == e.message.errno && util.message(e.message.message, "", "error"))
});
break;
case"password":
$(".modal").modal("hide");
var l = $(".new-password").val(), c = $(".renew-password").val();
if ("" == l) return util.message("新密码不可为空!"), !1;
if ("" == c) return util.message("确认新密码不可为空!"), !1;
if (l != c) return util.message("两次密码不一致!"), !1;
d.post(p.links.basePost, {type: t, password: l}).success(function (e) {
0 == e.message.errno ? util.message("密码修改成功!", "", "success") : (-1 == e.message.errno && util.message(e.message.message, e.redirect, "error"), 1 == e.message.errno && util.message(e.message.message, "", "error"))
})
}
}
}]),angular.module("menuApp", ["we7app"]),angular.module("menuApp").controller("menuDisplay", ["$scope", "config", "$http", function (e, n, i) {
e.changeStatus = function (e, t, a) {
t = 1 == t ? 2 : 1, 3 == a && (1 == t ? $(".js-switch-" + e).addClass("switchOn") : 2 == t && $(".js-switch-" + e).removeClass("switchOn")), i.post(n.push_url, {id: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect) : 3 == a ? util.message(e.message.message, "error") : util.message(e.message.message, e.redirect, "error")
})
}
}]),angular.module("menuApp").controller("conditionMenuDesigner", ["$scope", "config", "$http", function (s, a, n) {
current_menu_url = a.current_menu_url, require(["underscore", "jquery.ui", "jquery.caret", "district-wechat"], function (e, a, a, n) {
a(".tpl-district-container").each(function () {
var e = {};
e.province = a(this).find(".tpl-province")[0], e.city = a(this).find(".tpl-city")[0];
var t = {};
t.province = a(e.province).data("value"), t.city = a(e.city).data("value"), n.render(e, t, {
withTitle: !0,
wechat: !0
})
}), a(".sub-designer-y").sortable({
items: ".sub-js-sortable",
axis: "y",
cancel: ".sub-js-not-sortable"
}), a(".designer-x").sortable({items: ".js-sortable", axis: "x"})
}), s.context = {}, s.context.group = a.group, 0 < a.id && 1 != a.type && 1 == a.status && (s.context.group.disabled = 1), s.initGroup = function () {
s.context.group = {
title: "",
type: a.type,
button: [{
name: "菜单名称",
type: "click",
url: "",
key: "",
media_id: "",
appid: "",
pagepath: "",
sub_button: []
}],
matchrule: {
sex: 0,
client_platform_type: 0,
group_id: -1,
country: "",
province: "",
city: "",
language: ""
}
}
}, s.context.group && s.context.group.button || s.initGroup(), s.$watch("context.group.matchrule.province", function (e, t) {
"" == e ? $(".tpl-city").hide() : $(".tpl-city").show()
}), s.context.activeIndex = 0, s.context.activeBut = s.context.group.button[s.context.activeIndex], s.context.activeItem = s.context.activeBut, s.context.activeType = 1, s.context.remove = function () {
return confirm("删除默认菜单会清空所有菜单记录,确定吗?") && (location.href = a.delete_url), !1
}, s.context.submit = function (e) {
var t = s.context.group;
t.button = _.sortBy(t.button, function (e) {
return $(':hidden[data-role="parent"][data-hash="' + e.$$hashKey + '"]').parent().index()
}), angular.forEach(t.button, function (e) {
e.sub_button = _.sortBy(e.sub_button, function (e) {
return $(':hidden[data-role="sub"][data-hash="' + e.$$hashKey + '"]').parent().index()
})
});
$(':hidden[name="menu_media"]').val();
console.log(t);
if (!$.trim(t.title)) return util.message("没有设置菜单组名称", "", "error"), !1;
if (2 == a.type && !(t.matchrule.sex || t.matchrule.client_platform_type || -1 != t.matchrule.group_id || t.matchrule.province || t.matchrule.city)) return util.message("没有设置个性化菜单的匹配规则", "", "error"), !1;
if (t.button.length < 1) return util.message("没有设置菜单", "", "error"), !1;
var i = {name: "", action: ""};
angular.forEach(t.button, function (a, n) {
"" == $.trim(a.name) && (this.name += "第" + (n + 1) + "个一级菜单未设置菜单名称<br>"), 0 < a.sub_button.length ? angular.forEach(a.sub_button, function (e, t) {
"" == $.trim(e.name) && (this.name += "第" + (n + 1) + "个一级菜单中的第" + (t + 1) + "个二级菜单未设置菜单名称<br>"), "view" == e.type && e.url.indexOf("http") < 0 && (this.action += "第" + (n + 1) + "个一级菜单中的第" + (t + 1) + "个二级菜单跳转链接缺少http标识<br>"), "miniprogram" == e.type && ("" == $.trim(e.appid) && (this.action += "第" + (n + 1) + "个一级菜单中的第" + (t + 1) + "个二级菜单需设置APPID<br>"), "" == $.trim(e.pagepath) && (this.action += "第" + (n + 1) + "个一级菜单中的第" + (t + 1) + "个二级菜单需设置页面跳转地址<br>"), "" == $.trim(e.url) && (this.action += "第" + (n + 1) + "个一级菜单中的第" + (t + 1) + "个二级菜单需设置备用页跳转地址<br>")), ("view" == e.type && "" == $.trim(e.url) || "click" == e.type && "" == e.media_id && "" == e.key || "view" != e.type && "click" != e.type && "miniprogram" != e.type && "" == $.trim(e.key)) && (this.action += "菜单【" + a.name + "】的子菜单【" + e.name + "】未设置操作选项. <br />")
}, i) : ("view" == a.type && a.url.indexOf("http") < 0 && (this.action += "菜单【" + a.name + "】跳转链接缺少http标识. <br />"), "miniprogram" == a.type && ("" == $.trim(a.appid) && (this.action += "菜单【" + a.name + "】需设置APPID. <br />"), "" == $.trim(a.pagepath) && (this.action += "菜单【" + a.name + "】需设置页面跳转地址. <br />"), "" == $.trim(a.url) && (this.action += "菜单【" + a.name + "】需设置备用页跳转地址. <br />")), ("view" == a.type && "" == $.trim(a.url) || "click" == a.type && "" == a.media_id && "" == a.key || "view" != a.type && "click" != a.type && "miniprogram" != a.type && "" == $.trim(a.key)) && (this.action += "菜单【" + a.name + "】不存在子菜单并且未设置操作选项. <br />"))
}, i), i.name ? util.message(i.title, "", "error") : i.action ? util.message(i.action, "", "error") : ($("#btn-submit").attr("disabled", !0), n.post(location.href, {
group: t,
method: "post",
submit_type: e
}).success(function (e) {
0 != e.message.errno ? ($("#btn-submit").attr("disabled", !1), util.message(e.message.message, "", "error")) : util.message("创建菜单成功. ", e.redirect, "success")
}))
}, s.context.triggerActiveBut = function (e) {
var t = $.inArray(e, s.context.group.button);
if (-1 == t) return !1;
s.context.activeIndex = t, s.context.activeBut = s.context.group.button[s.context.activeIndex], s.context.activeItem = s.context.activeBut, s.context.activeType = 1, s.context.activeItem.forceHide = 0
}, s.context.editBut = function (e, t, a) {
s.context.triggerActiveBut(t), e ? (s.context.activeItem = e, s.context.activeType = 2) : (s.context.activeItem = t, s.context.activeType = 1), 1 == s.context.activeType && 0 < s.context.activeItem.sub_button.length ? s.context.activeItem.forceHide = 1 : s.context.activeItem.forceHide = 0, a && (s.context.activeItem.material = [], "view" != s.context.activeItem.type && "click" != s.context.activeItem.type && (s.context.activeItem.key ? current_type = s.context.activeItem.key.substr(0, 6) : current_type = "click", "module" == current_type ? s.context.activeItem.etype = "module" : s.context.activeItem.etype = "click"), n.post(current_menu_url, {current_menu: s.context.activeItem}).success(function (e) {
0 == e.message.errno && s.context.activeItem.material.push(e.message.message)
}))
}, s.context.addBut = function () {
if (!(3 <= s.context.group.button.length)) {
s.context.group.button.push({
name: "菜单名称",
type: "click",
url: "",
key: "",
media_id: "",
appid: "",
pagepath: "",
sub_button: []
});
var e = s.context.group.button[s.context.group.button.length - 1];
s.context.triggerActiveBut(e), $(".designer-x").sortable({items: ".js-sortable", axis: "x"})
}
}, s.context.removeBut = function (e, t) {
1 == t ? util.confirm(function () {
s.context.group.button = _.without(s.context.group.button, e), s.context.triggerActiveBut(s.context.group.button[0])
}, function () {
return !1
}, "确认删除吗?") : (s.context.activeBut.sub_button = _.without(s.context.activeBut.sub_button, e), s.context.triggerActiveBut(s.context.activeBut)), 0 < s.context.activeItem.sub_button.length ? s.context.activeItem.forceHide = 1 : s.context.activeItem.forceHide = 0
}, s.context.addSubBut = function (e) {
if (1 == s.context.group.disabled) return !1;
s.context.triggerActiveBut(e), 5 <= s.context.activeBut.sub_button.length || (s.context.activeBut.sub_button.push({
name: "子菜单名称",
type: "click",
url: "",
key: "",
appid: "",
pagepath: "",
media_id: ""
}), $(".sub-designer-y").sortable({
items: ".sub-js-sortable",
axis: "y",
cancel: ".sub-js-not-sortable"
}), s.context.activeItem = s.context.activeBut.sub_button[s.context.activeBut.sub_button.length - 1], s.context.activeType = 2, s.context.activeItem.forceHide = 0)
}, s.context.selectEmoji = function () {
util.emojiBrowser(function (e) {
var t = "::" + e.find("span").text() + "::";
$("#title").setCaret(), $("#title").insertAtCaret(t), s.context.activeItem.name = $("#title").val(), s.$digest()
})
}, s.context.select_link = function () {
$(this).parent().prev();
util.linkBrowser(function (e) {
var t = a.site_url;
"tel:" != e.substring(0, 4) ? (-1 == e.indexOf("http://") && -1 == e.indexOf("https://") && (e = t + "app" + (e = e.replace("./index.php?", "/index.php?"))), s.context.activeItem.url = e, s.$digest()) : util.message("自定义菜单不能设置为一键拨号")
})
}, s.context.search = function () {
var e = $("#ipt-forward").val();
$.post(a.search_key_url, {key_word: e}, function (e) {
var t = (e = $.parseJSON(e)).length, a = "";
if (0 < t) for (var n = 0; n < t; n++) a += '<li><a href="javascript:;">' + e[n] + "</a></li>"; else a += '<li><a href="javascript:;" id="no-result">没有找到您输入的关键字</a></li>';
$("#key-result ul").html(a), $('#key-result ul li a[id!="no-result"]').click(function () {
$("#ipt-forward").val($(this).html()), s.context.activeItem.key = $(this).html(), $("#key-result").hide()
}), $("#key-result").show()
})
}, s.context.select_mediaid = function (t, a) {
var e = {type: t, isWechat: !0, needType: 1};
util.material(function (e) {
s.context.activeItem.key = "", s.context.activeItem.media_id = e.media_id, s.context.activeItem.material = [], "keyword" == t ? (s.context.activeItem.material.push(e), s.context.activeItem.material[0].type = "keyword", s.context.activeItem.key = "keyword:" + e.content, s.context.activeItem.media_id = "", "1" == a && (s.context.activeItem.material[0].etype = "click", s.context.activeItem.material[0].name = e.name, s.context.activeItem.material[0].content = e.content)) : "image" == t ? s.context.activeItem.material.push(e) : "news" == t ? s.context.activeItem.material.push(e) : "voice" == t ? s.context.activeItem.material.push(e) : "video" == t ? s.context.activeItem.material.push(e) : "module" == t && (s.context.activeItem.key = "module:" + e.name, s.context.activeItem.material.push(e), s.context.activeItem.material[0].module_type = s.context.activeItem.material[0].type, s.context.activeItem.material[0].type = "module", s.context.activeItem.material[0].etype = "module"), s.$digest()
}, e)
},
s.context.select_image = function (){
$('[data-toggle="selectAttachment"]').off("click");
//参数获取
let _selectButtonThis = $(this),
_input = _selectButtonThis.data('input'),
_img = _selectButtonThis.data('img'),
http_url = '',
url = '',
_multi = _selectButtonThis.data('multi'),
link = biz.url('utility/attachment/index');
_multi = _multi ? _multi : '';
//请求获取内容
$.ajax(link, {
type: "get",
data:{multi:_multi},
dataType: "html",
cache: false,
}).done(function (html) {
//判断是否已经存在弹框 存在则删除
if($("#attachmentModal").length){
$("#attachmentModal").html(html);
$("#attachmentModal").modal('show');
}else{
//模板弹出
let modal = $('<div class="modal fade" id="attachmentModal">' + html + '</div>');
modal.modal('show');
}
//选中附件后的操作 —— 单选
$(document).off("click", '.selectAttachmentButton').on('click', '.selectAttachmentButton', function () {
if(_input && _img){
//基本信息获取
url = $(this).data("url");
http_url = $(this).data("http_url");
//赋值
if(_multi == 'multi'){
//多选图片
//$(_input).val($(_input).val() + ',' + url);
let input_name = $(_input).data('name'),
html = '<div class="multi-item">\n' +
' <img src="'+http_url+'" class="img-responsive img-thumbnail">\n' +
' <input type="hidden" name="'+input_name+'[]" value="'+url+'">' +
' <em class="close" title="删除这张图片" onclick="$(this).closest(\'.multi-item\').remove();">×</em>\n' +
'</div>';
$(_img).append(html);
$(_input).trigger('change');
}else{
//单选图片
if (_img) $(_img).attr('src', http_url);
if (_input) $(_input).val(url).trigger('change');
}
}
//完成 关闭弹框
_input = _img = http_url = url = '';
$("#attachmentModal").modal('hide');
});
//选中附件后的操作 —— 多选
$(document).off("click", '.selectedAttachmentMultiButton').on('click', '.selectedAttachmentMultiButton', function () {
if(_input && _img){
//循环所有选中内容 进行循环操作
$("[name='attachment_check']:checked").each(function(){
//基本信息获取
url = $(this).siblings('.selectAttachmentButton').data("url");
http_url = $(this).siblings('.selectAttachmentButton').data("http_url");
//赋值
let input_name = $(_input).data('name'),
html = '<div class="multi-item">\n' +
' <img src="'+http_url+'" class="img-responsive img-thumbnail">\n' +
' <input type="hidden" name="'+input_name+'[]" value="'+url+'">' +
' <em class="close" title="删除这张图片" onclick="$(this).closest(\'.multi-item\').remove();">×</em>\n' +
'</div>';
$(_img).append(html);
});
$(_input).trigger('change');
}
//完成 关闭弹框
_input = _img = http_url = url = '';
$("#attachmentModal").modal('hide');
});
});
},
s.context.editBut("", s.context.group.button[0], s.context.group.id)
}]),angular.module("messageApp", ["we7app"]),angular.module("messageApp").controller("messageNoticeCtrl", ["$scope", "$http", "config", function (t, n, a) {
t.type = a.type, t.lists = a.lists, t.is_read = a.is_read, t.all_read_url = a.all_read_url, t.allRead = function () {
n.post(t.all_read_url, {type: t.type}).success(function (e) {
util.message(e.message.message, e.redirect, "ajax")
})
}, t.changeStatus = function (e, t) {
var a = $("#key-" + t).attr("class");
n.post("./index.php?c=message&a=notice&do=setting", {property: e, type: t}).success(function (e) {
0 == e.message.errno ? (a.match("switchOn") ? $("#key-" + t).removeClass("switchOn") : $("#key-" + t).addClass("switchOn"), util.message("修改成功!", "", "success")) : util.message(e.message.message)
}).error(function (e) {
util.message("网络错误,请稍候重试")
})
}, t.getOfficialMsg = function (e, t) {
n.get(a.mark_read_url + "&id=" + e), window.open(t)
}, t.accounts = a.accounts, t.searchInAccountData = function (e) {
if (t.accounts = {}, 0 < e.length) for (item in a.accounts) -1 != a.accounts[item].name.indexOf(e) && (t.accounts[item] = a.accounts[item]); else t.accounts = angular.copy(a.accounts)
}, t.setUniacid = function (e) {
n.post(a.wechat_setting_url, {uniacid: e, token: a.token, submit: 1}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, a.wechat_setting_url, "success") : util.message(e.message.message, "", "error")
})
}
}]);
var letterindex = ["按字母筛选(全部)", "A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z"];
function we7ResourceMusicFormController(e) {
var t = this;
t.music = {title: "", HQUrl: "", url: "", description: ""}, t.$onInit = function () {
t.music.url = t.musicurl
}, t.$onChanges = function (e) {
t.music.url = e.musicurl.currentValue
}, t.selectVoice = function () {
t.doselect()
}, t.ok = function () {
"" != t.music.title ? "" != t.music.url ? e.$emit("add_music", t.music) : util.message("请选择媒体文件") : util.message("标题不能为空")
}
}
function UploadController(a, e, n, i) {
var s = this;
function o(e) {
i(function () {
a.uploading = e
})
}
function t(e) {
if (!s.uploading) {
var t = e[0];
s.filename = t.name, s.filesize = parseInt(t.size / 1024), s.files = e, o(!0);
var a = s.uploadUrl;
s.onUploadStart({files: e}), n.upload(e, a, {
onProgress: r,
concurrency: 1,
onUploadError: function (e, t, a) {
var n = JSON.parse(t);
s.onUploadError({mes: n.message.message || "上传失败"})
}
}).then(function (e) {
o(!1), l(), s.onUploaded()
}, function (e) {
l(), o(!1), s.onUploadError("")
})
}
}
function r(e) {
var t = parseInt(e.loaded / e.total * 100);
e.filename = e.name, e.filesize = parseInt(e.size / 1024), e.progress = t, s.onProgress({
file: e,
progress: t
}), i(function () {
a.progress = t
})
}
function l() {
var e = document.getElementById("we7resourceFile");
e.value = null, e.addEventListener("change", function (e) {
t(e.target.files)
})
}
s.currentFile = null, a.uploading = !0, s.uploadProgress = 0, s.$onInit = function () {
}, document.addEventListener && (document.addEventListener("dragenter", function (e) {
e.stopPropagation(), e.preventDefault()
}, !1), document.addEventListener("dragover", function (e) {
e.stopPropagation(), e.preventDefault()
}, !1), document.getElementById("material-Modal").addEventListener("drop", function (e) {
e.stopPropagation(), e.preventDefault(), t(e.dataTransfer.files)
})), l()
}
function uiUploader(e, i) {
var u = this;
function s(e) {
for (var t = 0; t < e.length; t++) u.files.push(e[t])
}
function d(e) {
u.options = Object.assign(u.options, e), console.log(u.options, "start");
for (var t = e.headers || {}, a = e.options || {}, n = 0; n < u.files.length && u.activeUploads != u.options.concurrency; n++) u.files[n].active || o(u.files[n], u.options.url, u.options.data, u.options.paramName, t, a)
}
return u.files = [], u.options = {}, u.activeUploads = 0, u.uploadedFiles = 0, {
addFiles: s, getFiles: function () {
return u.files
}, files: u.files, startUpload: d, removeFile: function (e) {
u.files.splice(u.files.indexOf(e), 1)
}, removeAll: function () {
u.files.splice(0, u.files.length)
}, upload: function (e, t, a) {
console.log(u.options, "upload");
var n = i.defer();
return s(e), d(Object.assign({
url: t, concurrency: 5, onProgress: function (e) {
a.onProgress && a.onProgress(e)
}, onCompleted: function (e, t) {
}, onCompletedAll: function (e) {
n.resolve(e)
}
}, a)), n.promise
}
};
function o(t, e, a, n, i, s) {
var o, r, l;
if (a = a || {}, n = n || "file", u.activeUploads += 1, t.active = !0, t.status = "loading", o = new window.XMLHttpRequest, !0 === s.withCredentials && (o.withCredentials = !0), r = new window.FormData, o.open("POST", e), i) for (var c in i) i.hasOwnProperty(c) && o.setRequestHeader(c, i[c]);
if (o.upload.onloadstart = function () {
}, o.upload.onprogress = function (e) {
e.lengthComputable && (t.loaded = e.loaded, t.total = e.total, t.humanSize = function (e) {
var t = 0 === e ? 0 : +Math.floor(Math.log(e) / Math.log(1024));
return (e / Math.pow(1024, t)).toFixed(t ? 1 : 0) + " " + ["n/a", "bytes", "KiB", "MiB", "GiB", "TB", "PB", "EiB", "ZiB", "YiB"][isNaN(e) ? 0 : 1 + t]
}(e.loaded), angular.isFunction(u.options.onProgress) && u.options.onProgress(t))
}, o.upload.onload = function () {
angular.isFunction(u.options.onUploadSuccess) && u.options.onUploadSuccess(t)
}, o.upload.onerror = function (e) {
angular.isFunction(u.options.onError) && u.options.onError(e)
}, o.onload = function () {
u.activeUploads -= 1, u.uploadedFiles += 1, d(u.options);
var e = JSON.parse(o.responseText);
e.message && 0 != e.message.errno ? (t.status = "error", angular.isFunction(u.options.onUploadError) && u.options.onUploadError(t, o.responseText, o.status)) : (t.status = "success", t.res = e, angular.isFunction(u.options.onCompleted) && u.options.onCompleted(t, o.responseText, o.status)), 0 === u.activeUploads && (u.uploadedFiles = 0, angular.isFunction(u.options.onCompletedAll) && u.options.onCompletedAll(u.files))
}, a) for (l in a) a.hasOwnProperty(l) && r.append(l, a[l]);
return r.append(n, t, t.name), o.send(r), o
}
}
function VoiceController(a, t, e, n) {
a.resourceType = "voice", n("we7resource-base-controller", {$scope: a}), a.uploadname = "上传语音", a.accept = "audio/amr,audio/mp3,audio/wma,audio/wmv,audio/amr";
var i = this;
function s() {
e.getResources("voice", a.currentPage, 1 == a.index, {uniacid: a.uniacid, global: a.global}).then(function (e) {
i.voices = e.items, i.pager = t.trustAsHtml(e.pager)
})
}
function o() {
a.uploadurl = 0 === a.index ? "./index.php?c=utility&a=file&do=wechat_upload&upload_type=audio&mode=perm&uniacid=" + a.uniacid : "./index.php?c=utility&a=file&do=upload&upload_type=audio&global=" + a.global + "&dest_dir=" + a.dest_dir + "&uniacid=" + a.uniacid
}
i.$onInit = function () {
i.multiple = !1
}, i.itemClick = function (e) {
if (!i.multiple) return a.needConvert() ? void util.message("当前资源无法选择") : e.selected ? void (e.selected = !1) : (e.selected = !0, void a.$emit("selected_voice", e))
}, a.canConvert = function (e) {
return !1
}, a.loadData = function () {
s()
}, a.onIndexChange = function (e) {
s(), o()
}, o(), a.$on("voice_page_change", function (e, t) {
a.setCurrentPage(t)
}), i.timeToDate = function (e) {
return new Date(1e3 * e)
}, i.getTitle = function (e) {
return i.isWechat ? e.attachment : e.filename
}, s()
}
angular.module("moduleApp", ["we7app", "infinite-scroll"]), angular.module("moduleApp").controller("ModuleMoreCtrl", ["$scope", "config", function (e, t) {
e.activeLetter = "", e.searchModule = function (e) {
location.href = t.searchurl + "&letter=" + e
}
}]).controller("clerkPermission", ["$scope", "$http", "config", function (e, a, n) {
e.deleteClerk = function (e, t) {
util.confirm(function () {
a.post(n.links.deleteClerk, {uid: e, module_name: t}).success(function (e) {
"0" == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, function () {
return !1
}, "确认删除?")
}
}]).controller("moduleGroupCtrl", ["$scope", "$http", "config", function (e, t, a) {
e.changeText = function (e) {
$(e.currentTarget).parents("tr").find(".we7-group-app").toggleClass("hideall"), e.currentTarget.text = "展开" == e.currentTarget.text ? "收起" : "展开"
}, e.delUniGroup = function (e) {
util.confirm(function () {
t.post(a.links.groupDel, {id: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, function () {
}, "确认删除吗?")
}
}]).controller("moduleGroupPostCtrl", ["$scope", "$http", "config", function (i, t, e) {
function a(t, e) {
if (i.selectedModules = [], !e) return i.selectedModules = [], void angular.forEach(t, function (e) {
e.selected = !1
});
angular.forEach(t, function (e) {
e.selected = !0, i.selectedModules.push(e), e.main_module && "" != e.main_module && null != t[e.main_module] && i.selectedModules.push(t[e.main_module])
})
}
i.config = e, i.moduleGroup = null === e.moduleGroup ? {title: ""} : e.moduleGroup, i.groupHaveModuleApp = 0 == e.groupHaveModuleApp.length ? {} : e.groupHaveModuleApp, i.groupHaveModuleWxapp = 0 == e.groupHaveModuleWxapp.length ? {} : e.groupHaveModuleWxapp, i.groupHaveModuleWebapp = 0 == e.groupHaveModuleWebapp.length ? {} : e.groupHaveModuleWebapp, i.groupHaveModulePhoneapp = 0 == e.groupHaveModulePhoneapp.length ? {} : e.groupHaveModulePhoneapp, i.groupHaveModuleAliapp = 0 == e.groupHaveModuleAliapp.length ? {} : e.groupHaveModuleAliapp, i.groupNotHaveModuleApp = e.groupNotHaveModuleApp, i.groupNotHaveModuleWxapp = e.groupNotHaveModuleWxapp, i.groupNotHaveModuleWebapp = e.groupNotHaveModuleWebapp, i.groupNotHaveModulePhoneapp = e.groupNotHaveModulePhoneapp, i.groupNotHaveModuleAliapp = e.groupNotHaveModuleAliapp, i.groupHaveTemplate = 0 == e.groupHaveTemplate.length ? {} : e.groupHaveTemplate, i.groupNotHaveTemplate = e.groupNotHaveTemplate, i.selectedModules = [], i.allmodulesel = !1, i.allwxappsel = !1, i.alltemplatesel = !1, i.allwebsel = !1, i.keyword = "", i.filterKeyword = function (t) {
angular.forEach(i.groupNotHaveModuleApp, function (e) {
e.hide = !1, "" != t && -1 == e.title.indexOf(t) && (e.hide = !0)
})
}, i.addModule = function () {
$("#add_module").modal("show")
}, i.addModuleWxapp = function () {
$("#add_module_wxapp").modal("show")
}, i.adTemplate = function () {
$("#add_template").modal("show")
}, i.addModuleWebapp = function () {
$("#add_module_webapp").modal("show")
}, i.addModulePhoneapp = function () {
$("#add_module_phoneapp").modal("show")
}, i.addModuleAliapp = function () {
$("#add_module_aliapp").modal("show")
}, i.selectOrCancelModule = function (e, t) {
e.selected = !e.selected, e.selected ? i.selectModule(e, t) : i.cancleModule(e, t)
}, i.selecteAllModule = function (e) {
a(i.groupNotHaveModuleApp, e)
}, i.selecteAllWxapp = function (e) {
a(i.groupNotHaveModuleWxapp, e)
}, i.selecteAllTemplate = function (e) {
a(i.groupNotHaveTemplate, e)
}, i.selecteAllWebapp = function (e) {
a(i.groupNotHaveModuleWebapp, e)
}, i.selecteAllAliapp = function (e) {
a(i.groupNotHaveModuleAliapp, e)
}, i.selecteAllPhoneapp = function (e) {
a(i.groupNotHaveModulePhoneapp, e)
}, i.selectModule = function (e, t) {
i.selectedModules.push(e), "module" == t && "" != e.main_module && null != i.groupNotHaveModuleApp[e.main_module] && i.selectedModules.push(i.groupNotHaveModuleApp[e.main_module]), "module" == t ? i.selectedModules.length >= _.values(i.groupNotHaveModuleApp).length && (i.allmodulesel = !0) : "module_wxapp" == t ? i.selectedModules.length == _.values(i.groupNotHaveModuleWxapp).length && (i.allwxappsel = !0) : "module_webapp" == t ? i.selectedModules.length == _.values(i.groupNotHaveModuleWebapp).length && (i.allwebappsel = !0) : "module_phoneapp" == t ? i.selectedModules.length == _.values(i.groupNotHaveModulePhoneapp).length && (i.allphoneappsel = !0) : i.selectedModules.length == _.values(i.groupNotHaveTemplate).length && (i.alltemplatesel = !0)
}, i.cancleModule = function (t, e) {
if (have_plugin = !1, angular.forEach(i.selectedModules, function (e) {
e.main_module == t.name && (have_plugin = !0)
}), 1 == have_plugin) return !1;
var a = _.indexOf(i.selectedModules, t);
-1 < a && (i.selectedModules = _.without(i.selectedModules, i.selectedModules[a])), "module" == e ? i.allmodulesel = !1 : "module_wxapp" == e ? i.allwxappsel = !1 : "module_webapp" == e ? i.allwebappsel = !1 : "module_phoneapp" == e ? i.allphoneappsel = !1 : "module_aliapp" == e ? i.allaliappsel = !1 : i.alltemplatesel = !1
}, i.addHaveModule = function () {
angular.forEach(i.selectedModules, function (e, t) {
delete i.groupNotHaveModuleApp[e.name], i.groupHaveModuleApp[e.name] = e
}), i.selectedModules = [], $("#add_module").modal("hide"), i.allmodulesel = !1
}, i.addHaveModuleWxapp = function () {
angular.forEach(i.selectedModules, function (e, t) {
delete i.groupNotHaveModuleWxapp[e.name], i.groupHaveModuleWxapp[e.name] = e
}), i.selectedModules = [], $("#add_module_wxapp").modal("hide"), i.allwxappsel = !1
}, i.addHaveTemplate = function () {
angular.forEach(i.selectedModules, function (e, t) {
delete i.groupNotHaveTemplate[e.name], i.groupHaveTemplate[e.name] = e
}), i.selectedModules = [], $("#add_template").modal("hide")
}, i.addHaveModuleWebapp = function () {
angular.forEach(i.selectedModules, function (e, t) {
delete i.groupNotHaveModuleWebapp[e.name], i.groupHaveModuleWebapp[e.name] = e
}), i.selectedModules = [], $("#add_module_webapp").modal("hide")
}, i.addHaveModulePhoneapp = function () {
angular.forEach(i.selectedModules, function (e, t) {
delete i.groupNotHaveModulePhoneapp[e.name], i.groupHaveModulePhoneapp[e.name] = e
}), i.selectedModules = [], $("#add_module_phoneapp").modal("hide")
}, i.delHaveModule = function (t) {
t.selected = !1, delete i.groupHaveModuleApp[t.name], "" != (i.groupNotHaveModuleApp[t.name] = t).plugin && angular.forEach(i.groupHaveModuleApp, function (e) {
e.main_module == t.name && (delete i.groupHaveModuleApp[e.name], i.groupNotHaveModuleApp[e.name] = e)
})
}, i.delHaveModuleWxapp = function (e) {
e.selected = !1, delete i.groupHaveModuleWxapp[e.name], i.groupNotHaveModuleWxapp[e.name] = e
}, i.delHaveModuleWebapp = function (e) {
e.selected = !1, delete i.groupHaveModuleWebapp[e.name], i.groupNotHaveModuleWebapp[e.name] = e
}, i.delHaveModulePhoneapp = function (e) {
e.selected = !1, delete i.groupHaveModulePhoneapp[e.name], i.groupNotHaveModulePhoneapp[e.name] = e
}, i.delHaveModuleAliapp = function (e) {
e.selected = !1, delete i.groupHaveModuleAliapp[e.name], i.groupNotHaveModuleAliapp[e.name] = e
}, i.delHaveTemplate = function (e) {
e.selected = !1, delete i.groupHaveTemplate[e.name], i.groupNotHaveTemplate[e.name] = e
}, i.cancel = function (e) {
angular.forEach(i.selectedModules, function (e) {
e.selected = !1
}), i.selectedModules = [], i.allmodulesel = !1, i.allwxappsel = !1, i.alltemplatesel = !1, i.allwebappsel = !1, i.allphoneappsel = !1, i.allaliappsel = !1, $("#" + e).modal("hide")
}, i.saveGroup = function () {
var a = [];
angular.forEach(i.groupHaveModuleApp, function (e, t) {
a.push(e.name)
});
var n = [];
angular.forEach(i.groupHaveModuleWxapp, function (e, t) {
n.push(e.name)
});
var e = {
id: i.moduleGroup.id,
name: i.moduleGroup.name,
modules: a,
wxapp: n,
templates: i.groupHaveTemplate,
webapp: i.groupHaveModuleWebapp,
phoneapp: i.groupHaveModulePhoneapp,
aliapp: i.groupHaveModuleAliapp
};
if ("" === e.name || void 0 === e.name) return util.message("请输入套餐名", "", "info"), !1;
t({
method: "POST", url: i.config.url, data: e, beforeSend: function () {
$(".loader").show()
}, complete: function () {
$(".loader").hide()
}
}).success(function (e) {
if (1 == e.message.errno) return util.message(e.message.message), !1;
util.message("提交成功", e.redirect, "success")
})
}
}]).controller("moduleGroupEditCtrl", ["$scope", "$http", "config", function (s, i, o) {
s.module_name = o.module_name, s.module_list = o.module_list, s.type_list = ["wxapp_support", "webapp_support"], s.modulesCheck = {}, s.saveGroup = function () {
var e = {id: o.group_id, name: s.module_name, modules: {}, templates: []};
for (var t in s.module_list.modules) {
var a = s.module_list.modules[t];
if (a.checked) {
var n = a.support.replace("_support", "");
e.modules[n] || (e.modules[n] = []), -1 == e.modules[n].indexOf(a.name) && e.modules[n].push(a.name)
}
}
for (var t in s.module_list.templates) s.module_list.templates[t].checked && e.templates.push(s.module_list.templates[t].id);
i.post(o.save_module_group_url, e).success(function (e) {
util.message(e.message.message, e.redirect, "success")
})
}, s.deleteModuleSupport = function (e, t) {
for (var a in s.module_list.modules) {
var n = s.module_list.modules[a];
if (n.name == t) for (var i in e) n.support == e[i] && (n.checked = 0)
}
setTimeout(function () {
s.changeModule()
}, 100)
}, s.deleteTemplate = function (e) {
e.checked = 0, s.changeTemplate()
}, s.changeModule = function () {
s.modulesCheck = {};
var e = s.module_list.modules;
for (var t in e) {
var a = e[t];
1 == a.checked && (s.modulesCheck[a.name] || (s.modulesCheck[a.name] = JSON.parse(JSON.stringify(a)), s.modulesCheck[a.name].support = {}, s.modulesCheck[a.name].supportArray = []), s.modulesCheck[a.name].support[a.support] = 2, -1 === s.modulesCheck[a.name].supportArray.indexOf(a.support) && s.modulesCheck[a.name].supportArray.push(a.support))
}
setTimeout(function () {
s.$apply("modulesCheck")
}, 0, !1)
}, s.changeTemplate = function () {
s.templatesCheck = [];
var e = s.module_list.templates;
for (var t in e) 1 == e[t].checked && s.templatesCheck.push(e[t]);
setTimeout(function () {
s.$apply("templatesCheck")
}, 0, !1)
}, s.addModule = function () {
s.changeModule(), s.changeTemplate()
}, s.changeModule(), s.changeTemplate()
}]).controller("installedCtrl", ["$scope", "$http", "$compile", "config", "$sce", function (l, e, c, a, t) {
l.config = a, l.isFounder = a.isFounder, l.letters = letterindex, l.moduleList = {}, l.moduleinfo = {}, l.upgradeInfo = {}, l.checkUpgradeSuccess = !1, l.search = {
moduleName: "",
letter: "全部",
newVersion: "",
newBranch: "",
serviceExpire: ""
};
l.welcome_module = a.welcome_module, l.pagesize = 15, l.pageindex = 1, l.moduleListSource = angular.copy(a.moduleList), l.initModuleLogo = function () {
e.get(a.initModuleLogoUrl).success(function (e) {
window.location.reload()
})
}, l.loadMore = function (e, t, a) {
if (Math.ceil(l.moduleList.length / 15) < t) return !1;
var n = Math.ceil(l.moduleList.length / 15);
t *= 1, l.pageindex = t;
var i = Math.max(1, t - 4), s = Math.min(n, t + 4);
s - i < 9 && (s = Math.min(n, i + 8), i = Math.max(1, s - 8));
for (var o = "<li>" + $(".js-pager li:first").html() + "</li>", r = i; r <= s; r++) o += '<li><a href="javascript:;" page="' + r + '" ng-click="loadMore(\'' + e + "'," + r + ')">' + r + "</a></li>";
t != n && (o += '<li><a href="javascript:;" page="' + n + '" ng-click="loadMore(\'' + e + "'," + n + ')">尾页</a></li>'), setTimeout(function () {
$(".js-pager ul").html(c(o)(l)), $(".js-pager li").attr("class", ""), $(".js-pager a[page='" + t + "']").parent().attr("class", "active"), $(".js-pager .pager-nav").parent().attr("class", "")
})
}, l.addModuleList = function () {
for (var e in l.moduleList = [], l.moduleListSource) {
var t = l.moduleListSource[e];
if (("全部" == l.search.letter || l.moduleListSource[e].title_initial == l.search.letter) && !(l.search.moduleName && l.moduleListSource[e].title.indexOf(l.search.moduleName) <= -1)) {
if (l.search.newVersion || l.search.newBranch || l.search.serviceExpire || l.search.offSell) {
var a = !0;
if (a && l.search.newVersion && t.new_version && (t.can_update || "local" == t.from) && (a = !1), a && l.search.newBranch && t.new_branch && (a = !1), a && l.search.serviceExpire && t.service_expire && 2 != t.system_shutdown && 3 != t.system_shutdown && (a = !1), a && l.search.offSell && t.offsell && (a = !1), a) continue
}
l.moduleList.push(l.moduleListSource[e])
}
}
l.loadMore(location.href, 1)
}, l.addModuleList(), l.searchLetter = function (e) {
l.search.letter = e, l.addModuleList(1)
}, l.searchModuleName = function (e) {
if (void 0 !== e && 13 != (window.event ? e.keyCode : e.which)) return !1;
l.addModuleList(1)
}, l.filter = function (e) {
"new_version" == e && (l.search.newVersion = !0), l.addModuleList()
}, e.post(l.config.checkUpgradeUrl).success(function (e) {
if (0 != e.message.errno && util.message(e.message.message), !e.message.message) return !1;
var t = angular.copy(e.message.message);
for (name_type in l.moduleListSource) {
var a = l.moduleListSource[name_type].name;
t[a] && (t[a].new_version && (l.moduleListSource[name_type].new_version = !0), t[a].new_branch && (l.moduleListSource[name_type].new_branch = !0), t[a].service_expire && (l.moduleListSource[name_type].service_expire = !0), t[a].offsell && (l.moduleListSource[name_type].offsell = !0), t[a].service_expiretime && (l.moduleListSource[name_type].service_expiretime = t[a].service_expiretime), t[a].system_shutdown && (l.moduleListSource[name_type].system_shutdown = t[a].system_shutdown, l.moduleListSource[name_type].system_shutdown_delay_time = t[a].system_shutdown_delay_time), l.moduleListSource[name_type].can_update = t[a].can_update)
}
l.checkUpgradeSuccess = !0
}), l.change_welcome_module = function (t) {
t == l.welcome_module && (t = ""), e.post(a.set_site_welcome_url, {name: t}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message, "", "error"), !1;
l.welcome_module = t, util.message("设置成功", "", "success")
})
}, l.deleteUrl = a.deleteUrl, l.recycle = function (e, t) {
l.deleteData = {module_name: e, support: t}, $("#recycle").modal("show")
}
}]).controller("notInstalledCtrl", ["$scope", "$compile", "config", "we7TypeDefault", function (r, l, s, e) {
r.permission_check = s.permission_check, r.do = s.do, r.support = s.support, r.letters = letterindex, r.module_list = s.module_list, r.support = s.support, r.module_support_types = s.module_support_types, r.module_install_types = "", angular.forEach(r.module_list, function (a) {
a.supportArray = [], angular.forEach(e, function (e, t) {
2 == a[t + "_support"] && a.supportArray.push(t + "_support")
})
});
var c = 0;
for (i in s.module_list) c++;
r.addModuleList = function (e) {
var t = -1, a = 15 * (e - 1);
for (modulename in s.module_list) if (!(++t < a)) {
if (15 + a <= t) break;
r.module_list[modulename] = s.module_list[modulename]
}
return !1
}, r.loadMore = function (e, t) {
if (Math.ceil(c / 15) < t) return !1;
r.module_list = {}, r.addModuleList(t);
var a = Math.ceil(c / 15);
t *= 1;
var n = Math.max(1, t - 4), i = Math.min(a, t + 4);
i - n < 9 && (i = Math.min(a, n + 8), n = Math.max(1, i - 8));
for (var s = "<li>" + $(".js-pager li:first").html() + "</li>", o = n; o <= i; o++) s += '<li><a href="javascript:;" page="' + o + '" ng-click="loadMore(\'' + e + "'," + o + ')">' + o + "</a></li>";
t != a && (s += '<li><a href="javascript:;" page="' + a + '" ng-click="loadMore(\'' + e + "'," + a + ')">尾页</a></li>'), $(".js-pager ul").html(l(s)(r)), $(".js-pager li").attr("class", ""), $(".js-pager a[page='" + t + "']").parent().attr("class", "active"), $(".js-pager .pager-nav").parent().attr("class", "")
}, r.loadMore("", 1), r.searchLetter = function (e) {
$(':hidden[name="letter"]').val(e), $("#search").click()
}, r.modalConfirm = function (e, t, a) {
if ("delete" == a) {
var n = "";
angular.forEach(e, function (e, t) {
n += "&supports[]=" + e
});
var i = s.delete_url + "&module_name=" + t.name + n;
util.confirm(function () {
window.location.href = i
}, function () {
}, "确认删除吗?")
} else {
n = e.join(","), i = s.install_url + "&application_type=" + t.application_type + "&module_name=" + t.name + "&install_module_support=" + n;
util.confirm(function () {
window.location.href = i
}, function () {
}, "确认安装吗?")
}
return !1
}, r.uninstallModule = function (e, t, a) {
e += "&module_name=" + t, e += "&support=" + a, util.confirm(function () {
window.location.href = e
}, function () {
}, "确认卸载吗?")
}
}]).controller("detailCtrl", ["$scope", "$http", "config", "we7TypeDefault", function (n, t, i, e) {
n.config = i, n.isFounder = i.isFounder, n.receive_ban = i.receive_ban, n.moduleinfo = i.moduleInfo, n.subscribe = 2, n.checkupgrade = 0, n.show = i.show, n.editType = "", n.we7TypeDefault = {}, angular.forEach(e, function (e, t) {
n.we7TypeDefault[t + "_support"] = e
}), t.post(n.config.checkReceiveUrl, {module_name: n.moduleinfo.name}).success(function (e) {
0 == e.message.errno && (n.subscribe = 1)
}), n.getUpgradeInfoButton = "检测更新", n.getUpgradeInfo = function (a) {
n.getUpgradeInfoButton = "检测中...", t.post(i.getLocalUpgradeInfoUrl, {name: n.moduleinfo.name}).success(function (e) {
0 == e.message.errno && (n.localUpgradeInfo = e.message.message)
}), t.post(n.config.getUpgradeInfoUrl, {name: n.moduleinfo.name}).success(function (e) {
if (n.getUpgradeInfoButton = "检测更新", n.moduleinfo.system_shutdown = e.message.message.system_shutdown, n.moduleinfo.system_shutdown_delay_time = e.message.message.system_shutdown_delay_time, n.moduleinfo.can_update = e.message.message.can_update, 0 != e.message.errno) return util.message(e.message.message), !1;
if (e.message.message.site_branch || 2 == n.moduleinfo.application_type) {
if (n.checkupgrade = 1, n.upgradeInfo = e.message.message, "cloud" == e.message.message.from) {
var t = (new Date).getTime();
t = t.toString().substr(0, 10), 0 < n.upgradeInfo.service_expiretime && t > n.upgradeInfo.service_expiretime ? n.upgradeInfo.service_expire = !0 : n.upgradeInfo.service_expire = !1
}
} else a && util.message("未检测出新版本/新分支"), n.upgradeInfo = null
})
}, n.getUpgradeInfo(0), n.changeShow = function (e) {
n.show = e, "workorder" == n.show && t.get(i.getWorkorderIframeUrl + "name=" + n.moduleinfo.name).success(function (e) {
0 == e.errno && $("#workorderiframe").attr("src", e.data.url)
})
}, n.changeSwitch = function () {
t.post(n.config.receiveBanUrl, {name: n.moduleinfo.name}).success(function (e) {
0 == e.message.errno && util.message("更新成功!"), n.moduleinfo.is_receive_ban = !n.moduleinfo.is_receive_ban
})
}, n.editModule = function (e, t) {
n.moduleOriginal = {}, n.moduleOriginal[e] = t, "preview" == (n.editType = e) || "logo" == e ? n.changePicture(e) : $("#module-info").modal("show")
}, n.changePicture = function (t) {
require(["fileUploader"], function (e) {
e.init(function (e) {
n.moduleOriginal[t] = e.url, n.moduleinfo[t] = e.url, n.$apply(n.moduleOriginal), n.save()
}, {type: "image", direct: !0, multiple: !1, uniacid: 0})
})
}, n.delPicture = function (e) {
n.moduleOriginal[e] = ""
}, n.upgrade = function (e, t, a) {
window.open("http://s.w7.cc/module-" + a + ".html")
}, n.notice = function (e, t, a) {
var n = e ? '升级服务已到期,请到商城<a class="color-default" target="_blank" href="http://s.w7.cc/module-' + t + '.html">续费。' : "确认升级到本分支的最高版本吗";
return e ? (util.message(n, "", "info", "去续费", "http://s.w7.cc/module-" + t + ".html"), !1) : !!confirm(n) && void (location.href = "./index.php?c=cloud&a=process&module_name=" + a + "&is_upgrade=1")
}, n.downgrade = function (e) {
if (!confirm("确定要将该模块将以一个版本吗?")) return !1;
t.post(n.config.downgradeUrl, {module_name: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}, n.save = function () {
t.post(n.config.saveModuleUrl, {moduleinfo: n.moduleOriginal, name: n.moduleinfo.name}).success(function (e) {
0 == e.message.errno ? (util.message("修改成功", "", "success"), n.moduleinfo[n.editType] = n.moduleOriginal[n.editType], "logo" == n.editType && (n.moduleinfo.logo = n.moduleOriginal.logo + "?v=" + (new Date).getTime()), "preview" == n.editType && (n.moduleinfo.preview = n.moduleOriginal.preview + "?v=" + (new Date).getTime()), n.$apply(n.moduleinfo)) : util.message("修改失败", "", "fail")
})
}, change = function (e) {
branch = e.data("id"), $("#version-detail-" + branch).toggle(), clas = "wi wi-angle-down" == e.find("i").prop("class") ? "wi wi-angle-up" : "wi wi-angle-down", text = "wi wi-angle-down" == clas ? "查看详情" : "收起", e.html(text + '<i class="' + clas + '"></i>')
}
}]).controller("templateCtrl", ["$scope", "$http", "config", function (t, a, e) {
t.config = e, t.templateList = e.templateList, t.upgradeInfo = {}, t.checkUpgrade = function () {
a.post(t.config.url, {template: t.templateList}).success(function (e) {
0 == e.message.errno && (t.templateList = e.message.message)
})
}, t.checkUpgrade(), t.setUpgradeInfo = function (e) {
a.post(t.config.get_upgrade_info_url, {name: e}).success(function (e) {
0 == e.message.errno ? (t.upgradeInfo = e.message.message, $("#upgradeInfo").modal("show")) : 1 == e.message.errno && util.message(e.message.message)
})
}, t.upgrade = function (e) {
return confirm("本次升级需要花费" + e + "个交易币。确认升级?")
}, t.deleteTemplate = function (e) {
util.confirm(function () {
window.location.href = e
}, function () {
return !1
}, "确认删除吗?")
}
}]).controller("subscribeCtrl", ["$scope", "$http", "config", function (a, n, e) {
a.subscribe_module = e.subscribe_module, a.types = e.types, a.change_ban_url = e.change_ban_url, a.check_receive_url = e.check_receive_url, a.change_ban = function (t) {
n.post(a.change_ban_url, {module_name: t}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message, "", "error") : a.subscribe_module[t].receive_ban = 1 == a.subscribe_module[t].receive_ban ? 0 : 1
})
}, angular.forEach(a.subscribe_module, function (e, t) {
n.post(a.check_receive_url, {module_name: t}).success(function (e) {
0 == e.message.errno && (a.subscribe_module[t].subscribe_success = 1)
})
})
}]).controller("createAccountCtrl", ["$scope", "$http", "config", function (e, t, a) {
a.module.module = a.module.name, e.wxappinfo = {
submit: "yes",
token: a.token,
choose: {modules: [{module: a.module.name, newicon: "", defaultentry: ""}]},
quickmenu: {
show: !0,
bottom: {bgcolor: "#bebebe", boundary: "#fff", selectedColor: "#0f0", color: "#428bca"},
menus: [{
name: "首页",
defaultImage: "./resource/images/bottom-default.png",
selectedImage: "./resource/images/bottom-default.png",
module: {}
}, {
name: "首页",
defaultImage: "./resource/images/bottom-default.png",
selectedImage: "./resource/images/bottom-default.png",
module: {}
}]
}
}, e.createWxappAccount = function () {
t.post(a.createWxappUrl, e.wxappinfo).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}, e.phoneappinfo = {module: [a.module]}, e.createPhoneappAccount = function () {
t.post(a.createPhoneappUrl, e.phoneappinfo).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}, e.miniapp = {
submit: "yes",
token: a.token,
choose_module: {name: a.module.name}
}, e.createMiniappAccount = function () {
t.post(a.createMiniappUrl, e.miniapp).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}
}]).controller("linkDisplayCtrl", ["$scope", "$http", "config", function (a, n, i) {
for (var e in a.userModules = i.userModules, a.linkInfo = {
module_name: "",
main_account: {uniacid: 0},
link_accounts: {}
}, a.accountData = [], a.selectAccountLinkType = "main", i.userModules) i.userModules[e].main_module && delete a.userModules[e];
a.user_modules = {modules: a.userModules}, a.checkModule = function () {
setTimeout(function () {
for (var e in a.user_modules.modules) {
var t = a.user_modules.modules[e];
1 == t.checked && (a.module = t, a.linkInfo = {
module_name: t.name,
main_account: {},
link_accounts: {}
}, t.checked = 0, a.$apply())
}
}, 200)
}, a.selectAccount = function (e) {
if ("main" == e && !a.linkInfo.module_name) return util.message("请先选择应用", "", "error"), !1;
if ("link" == e && !a.linkInfo.main_account.uniacid) return util.message("请先选择主账号", "", "error"), !1;
a.selectAccountLinkType = e;
var t = "";
2 != a.module.account_support || "link" == a.selectAccountLinkType && "account" == a.linkInfo.main_account.type_sign ? 2 == a.module.wxapp_support ? t = "wxapp" : 2 != a.module.webapp_support || "link" == a.selectAccountLinkType && "webapp" == a.linkInfo.main_account.type_sign ? 2 != a.module.phoneapp_support || "link" == a.selectAccountLinkType && "phoneapp" == a.linkInfo.main_account.type_sign ? 2 != a.module.aliapp_support || "link" == a.selectAccountLinkType && "aliapp" == a.linkInfo.main_account.type_sign || (t = "aliapp") : t = "phoneapp" : t = "webapp" : t = "account", a.setAccountInfo(t)
}, a.setAccountInfo = function (e) {
if (a.setAccountInfoType = e, "main" == a.selectAccountLinkType) var t = i.getMainAccountUrl + "type_sign=" + e + "&module_name=" + a.linkInfo.module_name; else t = i.getLinkAccountUrl + "type_sign=" + e + "&module_name=" + a.linkInfo.module_name + "&main_uniacid=" + a.linkInfo.main_account.uniacid;
n.get(t).success(function (e) {
0 == e.message.errno ? (a.accountData = e.message.message, a.searchInAccountData(""), $("#add_account").modal("show")) : util.message(e.message.message, "", "error")
}), a.keyword = ""
}, a.searchInAccountData = function (e) {
for (item in a.searchedAccountData = {}, a.accountData) -1 == a.accountData[item].name.indexOf(e) && e || (a.linkInfo.link_accounts[a.accountData[item].uniacid] && (a.accountData[item].checked = 1), a.searchedAccountData[item] = a.accountData[item]);
$("select").niceSelect && $("select").niceSelect(), $("select").niceSelect && $("select").niceSelect("update")
}, a.selectedAccount = function (e) {
"main" == a.selectAccountLinkType ? (a.linkInfo.main_account = e, a.linkInfo.link_accounts = {}, $("#account-data .item").removeClass("active")) : (e.checked = e.checked ? 0 : 1, 1 == e.checked ? a.linkInfo.link_accounts[e.uniacid] = e : a.linkInfo.link_accounts[e.uniacid] && delete a.linkInfo.link_accounts[e.uniacid]), $("#add_account").modal("hide")
}, a.deleteLink = function (e) {
for (var t in a.linkInfo.link_accounts) a.linkInfo.link_accounts[t].name == e && delete a.linkInfo.link_accounts[t]
}, a.submitLinkInfo = function () {
n.post(i.submitLinkInfoUrl, {link_info: a.linkInfo}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}
}]).controller("userModuleShortcutCtrl", ["$scope", "$http", "config", function (e, t, a) {
e.lists = a.lists, e.attachurl = a.attachurl, e.edit = function (e) {
window.location.href = a.links.post_url + "&id=" + e
}, e.delete = function (e) {
util.confirm(function () {
window.location.href = a.links.delete_url + "&id=" + e
}, function () {
return !1
}, "确认删除吗?")
}
}]).controller("userModuleShortcutPostCtrl", ["$scope", "$http", "config", function (t, e, a) {
t.info = a.info, t.shorcutImage = {
attachment: "",
url: ""
}, null == t.info && null == t.info || (t.shorcutImage.attachment = t.info.icon, t.shorcutImage.url = a.attachurl + t.info.icon), t.delImage = function () {
t.shorcutImage = {attachment: "", url: ""}
}, t.changeImage = function () {
require(["fileUploader"], function (e) {
e.init(function (e) {
t.shorcutImage.attachment = e.attachment, t.shorcutImage.url = e.url, t.$apply(t.shorcutImage)
}, {direct: !0, multiple: !1})
})
}
}]).controller("userModuleWelcomeCtrl", ["$scope", "$http", "config", function (n, a, t) {
n.attachurl = t.attachurl, n.appurl = t.appurl, n.recommend_ads = [], n.uniacid = t.uniacid, n.module_name = t.module_name, n.account_info = {}, n.notices = t.notices, n.changeEntryType = function (e) {
n.entryType = e
}, "v" == t.family && (n.recommend = {
recommend: {name: "推荐应用", list: [], ads: [], icon: "recommend"},
"new-app": {name: "新应用", list: [], ads: [], icon: "new"},
essential: {name: "下载排行", list: [], ads: [], icon: "down"},
hot: {name: "热门排行", list: [], ads: [], icon: "hot"},
large: {name: "大额应用排行", list: [], ads: [], icon: "big"}
}, require([t.apiLink + "/jsdata/app/recommend/9"], function (e) {
n.recommend.recommend.list = e, n.showLoading = !1
}), require([t.apiLink + "/jsdata/popularize/bottom"], function (e) {
n.recommend.recommend.ads = e, n.$apply()
}), require([t.apiLink + "/jsdata/popularize/ads"], function (e) {
for (var t in e) 3 == e[t].position && n.recommend["new-app"].ads.push(e[t]), 4 == e[t].position && n.recommend.hot.ads.push(e[t]), 5 == e[t].position && n.recommend.essential.ads.push(e[t]), 6 == e[t].position && n.recommend.large.ads.push(e[t]);
n.$apply()
}), n.changeTab = function (a) {
a && n.recommend[a].list.length <= 0 && (n.showLoading = !0, require([t.apiLink + "/jsdata/app/" + a + "/9"], function (e) {
for (var t in e) e[t] && e[t].last_upgrade_time && (e[t].last_upgrade_time = moment(1e3 * e[t].last_upgrade_time).format("YYYY-MM-DD"));
n.recommend[a].list = e, n.showLoading = !1, n.$apply()
}))
}), n.loadData = function () {
a.post(t.links.get_module_info_url).success(function (e) {
0 == e.message.errno && (n.module_info = e.message.message.module_info)
}), a.post(t.links.shortcut).success(function (e) {
0 == e.message.errno && (n.shortcuts = e.message.message.lists)
}), a.post(t.links.get_module_replies_url).success(function (e) {
0 == e.message.errno && (n.replies = e.message.message, 0 == n.replies.length && (n.replies = null))
}), a.post(t.links.get_module_covers_url).success(function (e) {
0 == e.message.errno && (n.covers = e.message.message.covers, n.cover_eid = e.message.message.cover_eid, n.entryType = n.covers ? "cover" : "reply", require(["jquery.qrcode"], function () {
$(".js-url-qrcode").each(function () {
url = $(this).data("url"), $(this).find(".qrcode-block").html("").qrcode({
render: "canvas",
width: $(this).data("size"),
height: $(this).data("size"),
text: url
})
})
}))
}), a.post(t.links.module_permission_url).success(function (e) {
0 == e.message.errno && (n.user_permissions = e.message.message)
}), a.post(t.links.get_module_accounts_url).success(function (e) {
0 == e.message.errno && (n.account_info = e.message.message.account_info, n.link_accounts = e.message.message.link_accounts, setTimeout(function () {
n.$apply()
}, 0))
})
}, n.loadData(), n.account_switch = function (e) {
location.href = e
}, n.unbind_module = function (e, t) {
a.get(e).success(function (e) {
0 == e.message.errno && (location.href = t)
})
}, n.pageTo = function (e) {
"cover" == e && (url = t.links.cover_url), "reply" == e && (url = t.links.reply_url), window.location.href = url + "&eid=" + n.cover_eid
}, n.changeEnterStatus = function () {
a.post(t.links.change_direct_enter_status).success(function (e) {
0 == e.message.errno && (n.module_info.direct_enter_status = !n.module_info.direct_enter_status, util.message("修改成功!", "", "success"))
})
}
}]).controller("userModuleLinkAccountCtrl", ["$scope", "$http", "config", function (e, t, a) {
e.passive_link_accounts = a.passive_link_accounts, e.account_info = a.account_info
}]).controller("userModuleDisplayCtrl", ["$scope", "$http", "$compile", "$timeout", "config", function (l, n, c, e, i) {
var t = i.own_account_modules.modules;
l.own_account_modules = i.own_account_modules, l.type = "module_title", l.module_keyword = "", l.letters = letterindex, l.changaModule = {
name: "",
default_name: ""
}, l.initUniModules = function (e, t) {
0 < e && 0 != t && util.dialog("数据加载中...", '<div class="progress"> <div class="progress-bar progress-bar-info" role="progressbar" aria-valuenow="' + e / t * 100 + '" aria-valuemin="0" aria-valuemax="100" style="width: ' + e / t * 100 + '%"><span class="sr-only"></span></div></div>', "", {containerName: "link-container"}).modal("show");
n.post(i.links.init_uni_modules, {pageindex: e}).success(function (e) {
1 == e.message.errno ? location.href = i.links.module_display : l.initUniModules(e.message.message.pageindex, e.message.message.total)
})
}, angular.equals(l.own_account_modules.modules, !angular.equals(l.own_account_modules.system_have_modules, [])) && l.initUniModules(1, 100), l.searchModule = function () {
if (l.modules = [], null != l.keyword) {
var a = new RegExp(l.keyword, "gi");
angular.forEach(t, function (e, t) {
a.test(e.title) && l.modules.push(e)
})
}
l.letter && angular.forEach(t, function (e, t) {
e.title_initial == l.letter && l.modules.push(e)
}), l.own_account_modules.modules = l.modules
}, l.showAccounts = function (t, a) {
n.post(i.links.moduleAccounts, {module_name: t}).success(function (e) {
l.module_hava_accounts = e.message.message, l.loadMore(1), l.changaModule = {
name: t,
default_name: a
}, $("#jurisdiction-add").modal("show")
})
}, l.loadMore = function (e) {
if (!l.module_hava_accounts) return $(".js-pager ul").html(""), !1;
for (var t in l.modulesByKeyword = [], l.module_hava_accounts) {
var a = l.module_hava_accounts[t];
a.title = a.title || "", a.name = a.name || "", l.module_keyword && -1 === a.account_name.indexOf(l.module_keyword) || l.modulesByKeyword.push(a)
}
var n = Math.ceil(l.modulesByKeyword.length / 10);
if (n && n < e) return !1;
if (l.changePage(e, 10), n < 2) return $(".js-pager ul").html(""), !1;
e *= 1;
var i = Math.max(1, e - 4), s = Math.min(n, e + 4);
s - i < 9 && (s = Math.min(n, i + 8), i = Math.max(1, s - 8));
var o = "";
1 != e && (o = '<li><a href="javascript:;" page="1" ng-click="loadMore(1)">首页</a></li>');
for (var r = i; r <= s; r++) o += '<li><a href="javascript:;" page="' + r + '" ng-click="loadMore(\'' + r + "')\">" + r + "</a></li>";
e != n && (o += '<li><a href="javascript:;" page="' + n + '" ng-click="loadMore(\'' + n + "')\">尾页</a></li>"), $(".js-pager ul").html(c(o)(l)), $(".js-pager li").attr("class", ""), $(".js-pager a[page='" + e + "']").parent().attr("class", "active"), $(".js-pager .pager-nav").parent().attr("class", "")
}, l.changePage = function (e, t) {
var a = -1, n = (e - 1) * t;
for (var i in l.modules = [], l.modulesByKeyword) {
var s = l.modulesByKeyword[i];
if (!(++a < n)) {
if (n + t <= a) break;
l.modules.push(s)
}
}
return !1
}, l.setDefaultAccount = function (e, t) {
n.post(i.links.setDefaultAccountUrl, {uniacid: e, module_name: t}).success(function (e) {
$("#jurisdiction-add").modal("hide"), 0 == e.message.errno ? util.message("修改成功", location.reload(), "success") : util.message("修改失败", location.reload(), "error")
})
}, l.setTop = function (e, t) {
window.location.href = i.links.set_top_url + "module_name=" + e + "&uniacid=" + t
}, l.switchModule = function (e) {
if (null == e.default_uniacid || "" == e.default_uniacid || null == e.default_uniacid) var t = e.uniacid; else t = e.default_uniacid;
window.location.href = i.links.module_switch_url + "module_name=" + e.module_name + "&uniacid=" + t
}
}]).controller("moduleAccountSetting", ["$scope", "config", "$http", function (o, e, t) {
o.params = [], o.setting = {}, o.postSetting = {}, o.getSetting = function () {
t.get(e.apiUrl).success(function (e) {
if (0 != (e = e.message).errno) return util.message(e.message, "", "error"), !1;
var t = e.message.setting && Object.keys(e.message.setting).length ? e.message.setting : {},
a = e.message.params;
for (var n in a) {
if ("checkbox" == a[n].type) {
var i = t[a[n].name];
if (t[a[n].name] = {}, i && "object" == typeof i && i.length) for (var s in i) t[a[n].name][i[s]] = !0
}
"number" === a[n].type && (t[a[n].name] = t[a[n].name] ? Number(t[a[n].name]) : ""), a[n].error = !1, t[a[n].name] = t[a[n].name] ? t[a[n].name] : null
}
o.setting = t, o.params = a, setTimeout(function () {
$("select").niceSelect && $("select").niceSelect() && $("select").niceSelect("update")
}, 1)
}).error(function (e) {
util.message(e.message.message, "", "error")
})
}, o.validate = function () {
var e = o.params, t = JSON.parse(JSON.stringify(o.setting)), a = !0;
for (var n in e) {
if ("checkbox" == e[n].type && t[e[n].name]) {
var i = JSON.parse(JSON.stringify(t[e[n].name]));
for (var s in t[e[n].name] = [], i) i[s] && t[e[n].name].push(s)
}
e[n].required && (e[n].error = !1, "" === t[e[n].name] || null === t[e[n].name] || void 0 === t[e[n].name] ? a = !(e[n].error = !0) : "object" == typeof t[e[n].name] && 0 === t[e[n].name].length && (a = !(e[n].error = !0)))
}
return o.postSetting = t, a
}, o.postData = function () {
o.validate() && t.post(e.apiUrl, {
submit: 1,
token: e.token,
params: o.params,
setting: o.postSetting
}).success(function (e) {
if (0 != (e = e.message).errno) return util.message(e.message, "", "error"), !1;
util.toast("提交成功", "success"), o.getSetting()
}).error(function (e) {
util.message(e.message.message, "", "error")
})
}, o.fileChange = function (e, t, a) {
if (a.multiple) for (var n in o.setting[o.params[a.key].name] = o.setting[o.params[a.key].name] || [], e) o.setting[o.params[a.key].name].push(e[n].url); else o.setting[o.params[a.key].name] = e.url
}, o.delImage = function (e, t) {
o.setting[o.params[e].name].splice(t, 1)
}, o.getSetting()
}]).controller("SystemAccountExpiredMessageCtrl", ["$scope", "config", "$http", function (n, e, i) {
n.module_expire = e.module_expire, n.system_module_expire = e.system_module_expire, n.links = e.links, n.changeStatus = function (t) {
var a = 1 == n.module_expire[t].status ? 0 : 1;
i.post(n.links.changeStatusUrl, {status: a, id: t}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
util.message(e.message.message, e.redirect, "success"), n.module_expire[t].status = a
})
}, n.deleteItem = function (e) {
util.confirm(function () {
i.post(n.links.deleteSettingUrl, {id: e}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
util.message(e.message.message, e.redirect, "success")
})
}, "", "确认删除?")
}
}]), angular.module("paycenterApp", ["cfp.hotkeys"]).controller("microPay", ["$scope", "$timeout", "config", "$http", "hotkeys", "servicePaycenterBase", function (n, t, a, i, s, e) {
card = $.parseJSON(a.card_set_str), s.add({
combo: "return+up",
description: "Description goes here",
allowIn: ["INPUT"],
callback: function (e, t) {
n.micro.submit()
}
}), s.add({
combo: "esc", description: "Description goes here", allowIn: ["INPUT"], callback: function (e, t) {
n.micro.reset()
}
}), s.add({
combo: "backspace", description: "Description goes here", allowIn: ["INPUT"], callback: function (e, t) {
n.micro.counter_handler("backspace"), e.preventDefault()
}
}), s.add({
combo: "-", description: "Description goes here", allowIn: ["INPUT"], callback: function (e, t) {
"0" != n.micro.config.fee ? n.micro.mcardPayManage() : util.message("请输入金额", "", "error")
}
}), s.add({
combo: "+", description: "Description goes here", allowIn: ["INPUT"], callback: function (e, t) {
"0" != n.micro.config.fee ? n.micro.wechatPayManage() : util.message("请输入金额", "", "error")
}
}), nums = ["7", "8", "9", "4", "5", "6", "1", "2", "3", "0", "."], n.micro = e.paycenterBaseData(card), angular.forEach(nums, function (e, t) {
s.add({
combo: e, description: "Description goes here", allowIn: ["INPUT"], callback: function (e, t) {
n.micro.counter_handler(e.key)
}
})
}), n.micro.mcardPayManage = function () {
$("#mcard-pay").on("shown.bs.modal", function () {
$(".js-input").focus();
var a = 2;
s.add({
combo: "return",
description: "Description goes here",
allowIn: ["INPUT"],
callback: function (e, t) {
input_count = n.micro.input_count(), a > input_count && n.micro.submit(), $('input[tabindex="' + a + '"]').focus(), a++
}
}), s.del("backspace"), angular.forEach(nums, function (e, t) {
s.del(e)
})
}), $("#mcard-pay").on("hidden.bs.modal", function () {
s.del("return"), angular.forEach(nums, function (e, t) {
s.add({
combo: e, description: "Description goes here", allowIn: ["INPUT"], callback: function (e, t) {
n.micro.counter_handler(e.key)
}
})
})
}), $("#mcard-pay").modal("show")
}, n.micro.wechatPayManage = function () {
$("#wechat-pay").on("shown.bs.modal", function () {
$(".js-input").focus(), s.add({
combo: "return",
description: "Description goes here",
allowIn: ["INPUT"],
callback: function (e, t) {
n.micro.submit()
}
}), s.del("backspace"), angular.forEach(nums, function (e, t) {
s.del(e)
})
}), $("#wechat-pay").on("hidden.bs.modal", function () {
s.del("return"), angular.forEach(nums, function (e, t) {
s.add({
combo: e, description: "Description goes here", allowIn: ["INPUT"], callback: function (e, t) {
n.micro.counter_handler(e.key)
}
})
})
}), $("#wechat-pay").modal("show")
}, n.micro.num = function (e) {
n.micro.counter_handler(e)
}, n.$watch("micro.config.code", function (e, t) {
e && 0 < e.length && $(".js-pay-warning").html("")
}), n.micro.counter_handler = function (e) {
if ("backspace" == (e += "")) return current_fee_length = n.micro.config.fee.length, void ("1" == current_fee_length ? n.micro.config.fee = "0" : n.micro.config.fee = n.micro.config.fee.substr(0, current_fee_length - 1));
"clear" != e ? "0" != n.micro.config.fee || "1" != n.micro.config.fee.length || "." == e ? 9 <= n.micro.config.fee.length || 8 == n.micro.config.fee.length && "." == e || -1 < n.micro.config.fee.indexOf(".") && (float = n.micro.config.fee.split("."), float[1] && 2 <= float[1].length || "." == e) || (n.micro.config.fee += e) : n.micro.config.fee = e : n.micro.config.fee = "0"
}, n.micro.reset = function () {
n.micro.config.fee = "0"
}, n.$watch("micro.config.offset_money", function (e, t) {
var a = Math.floor(n.micro.config.member.credit1 / n.micro.config.card.offset_rate);
n.micro.config.offset_money = parseInt(e), a <= e && (n.micro.config.offset_money = a), e || (n.micro.config.offset_money = 0), n.micro.config.credit1 = n.micro.config.card.offset_rate * n.micro.config.offset_money, n.micro.checkLast_money()
}), n.$watch("micro.config.credit2", function (e, t) {
reg = /^\d*\.{0,1}\d{0,1}\d{0,1}$/, reg.test(e) || (n.micro.config.credit2 = t), e > n.micro.config.member.credit2 && (n.micro.config.credit2 = n.micro.config.member.credit2), n.micro.checkLast_money()
}), n.$watch("micro.config.last_money", function (e, t) {
e < 0 && (n.config.last_money = 0), n.micro.checkLast_money()
}), n.micro.checkBasic = function () {
if (!$.trim(n.micro.config.body)) return util.message("商品名称不能为空"), !1;
var e = $.trim(n.micro.config.fee);
return /^(([1-9]{1}\d*)|([0]{1}))(\.(\d){1,2})?$/.test(e) ? void 0 : (util.message("支付金额不能少于0.01元"), !1)
}, n.micro.input_count = function () {
return input_count = $("#mcard-pay input.js-input").length, input_count
}, n.$watch("micro.config.cardsn", function (e, t) {
11 == e.length ? n.micro.checkCard() : (n.micro.config.member.uid = -1, n.micro.config.credit2 = 0, 11 < e.length && (n.micro.config.card_error = "会员卡卡号错误"))
}), n.micro.mcardPay = function (e) {
"0" == n.micro.config.fee ? util.message("请输入金额", "", "error") : (n.micro.config.cardsn = "", n.micro.config.member.uid = -1), "1" == e ? n.micro.mcardPayManage() : "2" == e && n.micro.wechatPayManage()
}, n.micro.is_showCode = function () {
Math.floor(n.micro.config.member.credit1 / n.micro.config.card.offset_rate);
n.micro.config.fact_fee <= n.micro.config.member.credit2 ? n.micro.config.is_showCode = 0 : 0 < n.micro.config.card.offset_rate ? (max = n.micro.config.fact_fee - n.micro.config.member.credit2 - Math.floor(n.micro.config.member.credit1 / n.micro.config.card.offset_rate), reg = /^-?[1-9]\d*$/, 0 < max ? n.micro.config.is_showCode = 1 : 0 == max ? n.micro.config.is_showCode = 0 : reg.test(max) ? n.micro.config.is_showCode = 0 : n.micro.config.is_showCode = 1) : (max = n.micro.config.fact_fee - n.micro.config.member.credit2, 0 < max ? n.micro.config.is_showCode = 1 : n.micro.config.is_showCode = 0)
}, n.micro.checkCard = function () {
n.micro.checkBasic();
var e = $.trim(n.micro.config.cardsn);
if (11 != e.length) return util.message("卡号不足11位", "", "error"), !1;
n.micro.config.loading = "加载中..", n.micro.config.card_error = "", i.post(a.card_check_url, {cardsn: e}).success(function (e) {
if (n.micro.config.loading = "", -1 != e.message.errno) {
n.micro.config.card_error = "", n.micro.config.member = e.message.message, n.micro.config.fact_fee = n.micro.config.fee;
var t = parseInt(n.micro.config.fee), a = parseInt(n.micro.config.member.discount.condition);
return 0 < n.micro.config.member.discount_type && n.micro.config.member.discount && a <= t && (1 == n.micro.config.member.discount_type ? (n.micro.config.fact_fee = n.micro.config.fee - n.micro.config.member.discount.discount, n.micro.config.fact_fee = n.micro.config.fact_fee.toFixed(2)) : n.micro.config.fact_fee = n.micro.config.fee * n.micro.config.member.discount.discount, n.micro.config.fact_fee < 0 && (n.micro.config.fact_fee = 0)), n.micro.last_money = n.micro.config.fact_fee, n.micro.checkCredit2(), n.micro.is_showCode(), !1
}
n.micro.config.card_error = e.message.message
})
}, n.micro.checkCredit2 = function () {
n.micro.checkLast_money(), n.micro.config.credit2 = Math.min.apply(null, [n.micro.config.member.credit2, n.micro.last_money]), n.micro.checkLast_money()
}, n.micro.checkLast_money = function () {
var e = n.micro.config.fact_fee - n.micro.config.credit2 - n.micro.config.offset_money;
e < 0 && (n.config.last_money = 0), n.micro.last_money = e.toFixed(2)
}, n.micro.query = function () {
if (!n.micro.uniontid) return util.message("系统错误", "", "error"), !1;
i.post("{php echo url('paycenter/wxmicro/query');}", {uniontid: n.micro.uniontid}).success(function (e) {
0 == e.message.errno ? (util.message("支付成功", "", "success"), location.reload()) : util.message("支付失败:" + e.message.message, "", "error")
})
}, n.micro.checkpay = function () {
i.post(a.checkpay_url, {uniontid: n.micro.uniontid}).success(function (e) {
console.dir(e), "SUCCESS" == e.message.trade_state ? util.message("支付成功", a.redirect_url, "error") : "NOTPAY" == e.message.trade_state ? util.message("支付失败:用户取消支付", a.redirect_url, "error") : "USERPAYING" == e.message.trade_state ? t(function () {
n.micro.checkpay()
}, 5e3) : util.message(e.message.trade_state_desc, a.redirect_url, "error")
})
}, n.micro.submit = function () {
return !!confirm("确认支付吗?") && ((1 == n.micro.config.is_showCode || n.micro.config.member.uid <= 0) && !$.trim(n.micro.config.code) ? ($(".js-pay-warning").html("支付授权码不能为空"), !1) : (1 == n.micro.config.is_showCode ? n.micro.config.cash = n.micro.last_money : n.micro.config.cash = 0, 0 < n.micro.config.member.uid && (n.micro.checkLast_money(), n.micro.last_money - n.micro.config.cash != 0) ? (util.message("支付方式设置的支付金额不等于实际支付金额", "", "error"), !1) : void i.post(a.pay_url, n.micro.config).success(function (e) {
return 0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : -1 == e.message.errno ? (util.message("支付失败:" + e.message.message, "", "error"), $('#form1 :text[name="code"]').val("")) : -10 == e.message.errno && ($(".js-userpaying").show(), n.micro.uniontid = e.message.uniontid, t(function () {
n.micro.checkpay()
}, 5e3)), !1
})))
}
}]), angular.module("paycenterApp").filter("credit1_num", ["$rootScope", function (e) {
return function (e) {
return e = Math.floor(e)
}
}]), angular.module("paycenterApp").service("servicePaycenterBase", ["$rootScope", function (e) {
var t = {}, a = {
config: {
body: "刷卡支付收款",
fee: "0",
cardsn: "",
card: "",
credit1: 0,
credit2: 0,
last_money: 0,
offset_money: 0,
is_showCode: 0,
loading: "",
card_error: "",
member: {uid: 0, credit2: 0},
nums: [["7", "7"], ["8", "8"], ["9", "9"], ["4", "4"], ["5", "5"], ["6", "6"], ["1", "1"], ["2", "2"], ["3", "3"], ["0", "0"], [".", "."], ["clear", "清除"]]
}
};
return t.paycenterBaseData = function (e) {
return a.config.card = e, a
}, t
}]), angular.module("phoneApp", ["we7app"]), angular.module("phoneApp").controller("phoneCreateCtrl", ["$scope", "$http", "config", function (t, e, a) {
t.uniacid = a.uniacid, t.version_id = a.version_id, t.modules = a.modules, t.selectedModule = a.version_info.modules, t.phoneappinfo = a.version_info, t.selectOrCancelModule = function (e) {
if (e.selected = !e.selected, e.selected) return t.selectedModule = [], t.selectedModule.push(e), void $("#add_module").modal("hide")
}, t.savePhoneApp = function () {
return t.phoneappinfo.name || t.uniacid ? t.phoneappinfo.description ? t.phoneappinfo.version && /^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$/.test(t.phoneappinfo.version) ? void e.post(a.links.create_phone_url, {
uniacid: t.uniacid,
version_id: t.version_id,
module: t.selectedModule,
name: t.phoneappinfo.name,
description: t.phoneappinfo.description,
version: t.phoneappinfo.version
}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message, "", "error"), !1;
util.message(e.message.message, e.redirect, "success")
}) : (util.message("版本号错误,只能是数字、点,数字最多两位,例如 1.1.1"), !1) : (util.message("请填写描述"), !1) : (util.message("APP名称不可为空!"), !1)
}
}]), angular.module("phoneApp").controller("AccountManagePhoneappCtrl", ["$scope", "$http", "config", function (e, t, a) {
e.phoneapp_version_lists = a.phoneapp_version_lists, e.phoneapp_modules = a.phoneapp_modules, e.version_exist = a.version_exist, e.delPhoneappVersion = function (e) {
e = parseInt(e);
t.post(a.links.del_version, {version_id: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}
}]), angular.module("profileApp", ["we7app"]), angular.module("profileApp").controller("remoteCtrl", ["$scope", "$http", "config", function (a, n, i) {
a.remote = angular.copy(i.remote), a.setting_type = i.remote.type, angular.forEach(["qiniu", "alioss", "ftp", "cos"], function (e) {
a.remote[e] || (a.remote[e] = {})
}), a.remote.qiniu.secretkey = util.encrypt(a.remote.qiniu.secretkey), a.remote.alioss.secret = util.encrypt(a.remote.alioss.secret), a.remote.cos.secretkey = util.encrypt(a.remote.cos.secretkey), a.remote.ftp.password = util.encrypt(a.remote.ftp.password), a.ossBuckets = {}, a.getOssBuckets = function (t) {
if (!a.remote.alioss.secret || !a.remote.alioss.key) return !1;
var e = "";
e = 0 < a.remote.alioss.secret.indexOf("*") ? i.remote.alioss.secret : a.remote.alioss.secret, n.post(i.oss_buckets_url, {
key: a.remote.alioss.key,
secret: e
}).success(function (e) {
e.message.errno < 0 ? t || util.message("Access Key ID 或 Access Key Secret 有误,请重新填写。", "", "error") : (a.ossBuckets = e.message.message, setTimeout(function () {
i.remote.alioss && i.remote.alioss.bucket && (a.remote.alioss.bucket = i.remote.alioss.bucket), a.$apply("remote"), $("select").niceSelect && $("select").niceSelect("update")
}))
})
}, a.getOssBuckets(!0), a.saveSetting = function (e) {
0 == a.remote.type && e != a.setting_type && (a.remote.type = a.setting_type), a.remote.operate_type = e, n.post(i.save_url, a.remote).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, "refresh", "success") : util.message(e.message.message, "", "error")
})
}, a.testSetting = function (e) {
a.remote.operate_type = e, n.post(i.test_setting_url, a.remote).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, "", "success") : util.message(e.message.message, "", "error")
})
}, a.oneKeyUpload = function () {
n.get(i.one_key_upload_url).success(function (e) {
3 == e.message.errno ? util.confirm(function () {
window.location.href = "{php echo url('system/attachment/remote')}"
}, function () {
return !1
}, '未开启全局的远程附件开关, 是否去<span class="color-red">站点-附件设置-远程附件</span> 开启?') : 0 == e.message.errno ? util.message(e.message.message, "", "success") : util.message(e.message.message, "", "error")
})
}
}]).controller("oauthCtrl", ["$scope", "$http", "config", function (n, i, a) {
n.config = a, n.oauthHost = a.oauthHost, n.oauthAccount = a.oauthAccount, n.oauthtitle = a.oauthAccounts ? a.oauthAccounts[a.oauthAccount] : "不借用任何权限", n.jsOauthAccount = a.jsOauth, n.jsOauthtitle = a.jsOauthAccounts ? a.jsOauthAccounts[a.jsOauth] : "不借用任何权限", n.originalHost = n.oauthHost, n.accountList = [], n.keyword = "", n.page = {
currentPage: 1,
totalItems: 0,
itemsPerPage: 10,
pagesLength: 5,
showGo: !0,
onChange: function () {
n.getList()
}
}, n.changeType = "", n.changeAccount = "", n.accountNull = !1, $("body").on("show.bs.modal", "#jsauth_acid", function (e) {
var t = n.changeType != $(e.relatedTarget).data("type");
n.changeType = $(e.relatedTarget).data("type"), n.changeAccount = "oauth" == n.changeType ? n.oauthAccount : n.jsOauthAccount, n.accountNull = "" == n.changeAccount || 0 == n.changeAccount, n.$apply(), n.accountList && n.accountList.length && !t || n.getList()
}), n.checkItem = function (e) {
n.changeAccount = e.uniacid, n.accountNull = !1
}, n.getList = function (e) {
e = e || (n.page.currentPage ? n.page.currentPage : 1);
var t = a.get_accounts_url + "&page=" + e + "&keyword=" + n.keyword + "&type=" + n.changeType;
i.get(t).success(function (e) {
e.message.errno ? util.message(e.message.message, "", "error") : (n.accountList = e.message.message.list, n.page.currentPage = e.message.message.page, n.page.itemsPerPage = e.message.message.page_size, n.page.totalItems = e.message.message.total)
})
}, n.recover = function () {
n.oauthHost = n.originalHost
}, n.saveOauth = function (e) {
var t = n.accountNull ? "" : n.changeAccount, a = {type: e || n.changeType, account: e ? n.oauthAccount : t};
if ("oauth" != n.changeType && !e || (a.host = n.oauthHost), n.oauthAccount && !confirm("更换服务号借权会导致当前公众号内会员数据丢失,请谨慎操作!")) return !1;
i.post(n.config.oauth_url, a).success(function (e) {
0 == e.message.errno ? location.reload() : util.message("域名不合法", "", "error")
})
}
}]).controller("tplCtrl", ["$scope", "$http", "config", function (t, e, a) {
t.tplList = a.tplList, t.active = "", t.activetpl = "", t.changeActive = function (e) {
t.active = e, t.activetpl = t.tplList[e].tpl
}, t.saveTpl = function () {
original_tpl = t.tplList[t.active].tpl, t.tplList[t.active].tpl = t.activetpl, e.post(a.url, {tpl: t.tplList}).success(function (e) {
1 == e.message.errno ? (t.tplList[t.active].tpl = original_tpl, util.message("请填写正确的" + e.message.message + "模板id", "", "info")) : $(".modal").modal("hide")
})
}
}]).controller("emailCtrl", ["$scope", "$http", "config", function (t, e, a) {
t.setting = {}, t.type = "", t.setting_type = a.setting.smtp ? a.setting.smtp.type : "", t.modalTitle = "参数设置", t.changeType = function (e) {
t.type = e, t.modalTitle = "163" == e ? "网易邮箱服务器" : "qq" == e ? "QQ邮箱服务器" : "自定义", e == t.setting_type ? t.setting = a.setting : t.setting = {}, $("#setting-from").modal("show")
}
}]).controller("paymentCtrl", ["$scope", "$http", "config", function (n, a, i) {
n.config = i, n.paysetting = i.paysetting, n.aliaccounthelp = !1, n.alipartnerhelp = !1, n.alisecrethelp = !1, n.saveEdit = function (e) {
if ("wechat_facilitator" == e && (!0 === n.paysetting.wechat_facilitator.pay_switch || !0 === n.paysetting.wechat_facilitator.recharge_switch)) {
if ("" == n.paysetting.wechat_facilitator.mchid) return util.message("请填写服务商商户号", "", "info"), !1;
if ("" == n.paysetting.wechat_facilitator.signkey) return util.message("请填写服务商商户支付密钥", "", "info"), !1
}
if ("alipay" == e && (!0 === n.paysetting.alipay.pay_switch || !0 === n.paysetting.alipay.recharge_switch)) {
if ("" == n.paysetting.alipay.partner) return util.message("请填写合作者身份", "", "info"), !1;
if ("" == n.paysetting.alipay.account) return util.message("请填写收款支付宝账号", "", "info"), !1;
if ("" == n.paysetting.alipay.secret) return util.message("请填写校验密钥", "", "info"), !1
}
if ("wechat" == e) {
if (1 == n.paysetting.wechat.switch) if (1 == n.paysetting.wechat.version) {
if ("" == n.paysetting.wechat.partner) return util.message("请填写商户身份", "", "info"), !1;
if ("" == n.paysetting.wechat.key) return util.message("请填写商户秘钥", "", "info"), !1;
if ("" == n.paysetting.wechat.signkey) return util.message("请填写通信秘钥", "", "info"), !1
} else {
if ("" == n.paysetting.wechat.mchid) return util.message("请填写商户号", "", "info"), !1;
if ("" == n.paysetting.wechat.apikey) return util.message("请填写支付秘钥", "", "info"), !1
}
if (3 == n.paysetting.wechat.switch) {
if ("" == n.paysetting.wechat.service) return util.message("请选择服务商公众号", "", "info"), !1;
if ("" == n.paysetting.wechat.sub_mch_id) return util.message("请填写子商户号", "", "info"), !1
}
}
if ("unionpay" == e && (1 == n.paysetting.unionpay.pay_switch || 1 == n.paysetting.unionpay.recharge_switch)) {
if ("" == n.paysetting.unionpay.merid) return util.message("请填写商户号", "", "info"), !1;
if ("" == n.paysetting.unionpay.signcertpwd) return util.message("请填写商户私钥证书密码", "", "info"), !1
}
if ("baifubao" == e && (!0 === n.paysetting.baifubao.pay_switch || !0 === n.paysetting.baifubao.recharge_switch)) {
if ("" == n.paysetting.baifubao.mchid) return util.message("请填写商户号", "", "info"), !1;
if ("" == n.paysetting.baifubao.signkey) return util.message("请填写商户支付密钥", "", "info"), !1
}
if ("line" == e && (!0 === n.paysetting.line.pay_switch || !0 === n.paysetting.line.recharge_switch) && "" == n.paysetting.line.message) return util.message("请填写账户信息", "", "info"), !1;
if ("jueqiymf" == e && (!0 === n.paysetting.jueqiymf.pay_switch || !0 === n.paysetting.jueqiymf.recharge_switch)) {
if ("" == n.paysetting.jueqiymf.url || null == n.paysetting.jueqiymf.url) return util.message("请填写一码付后台地址", "", "info"), !1;
if ("" == n.paysetting.jueqiymf.mchid || null == n.paysetting.jueqiymf.mchid) return util.message("请填写商户号", "", "info"), !1
}
a.post(n.config.saveurl, {type: e, param: n.paysetting[e]}).success(function (e) {
0 == e.message.errno && util.message(e.message.message, e.redirect, "success")
})
}, n.switchStatus = function (e, t) {
e && t || util.message("参数错误", "", "error"), n.paysetting[e][t] = !n.paysetting[e][t], "delivery" != e && "credit" != e && "mix" != e && "line" != e || (n.paysetting[e].recharge_switch = !1), a.post(i.change_status, {
type: e,
param: n.paysetting[e]
}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, n.check_wechat = function () {
a.post(i.links.getAccountWechatProxy).success(function (e) {
if (n.services = e.message.message.service, n.borrows = e.message.message.borrow, console.log(e), i.account_level < 3 || n.services && n.borrows.length < 1 && n.services.length < 1 && 4 != i.account_level || !n.services && n.borrows.length < 1 && 4 != i.account_level) return util.message("您没有有效的微信支付方式", "", "error"), !1;
$("#weixin").modal("show"), setTimeout(function () {
$("#weixin select").niceSelect && $("#weixin select").niceSelect()
})
})
}, $(".modal").on("hide.bs.modal", function () {
a.post(n.config.get_setting_url, {}).success(function (e) {
n.paysetting = e.message.message
})
}), n.test_alipay = function () {
a.post(n.config.text_alipay_url, {param: n.paysetting.alipay}).success(function (e) {
if (null !== e.message.message) return location.href = e.message.message, !1;
util.message("配置失败!")
})
}, n.changeSwitch = function (e, t) {
n.paysetting[e].switch = t
}, n.changeVersion = function (e) {
n.paysetting.wechat.version = e
}, n.tokenGen = function (e) {
if (confirm("确定要修改密钥吗?")) {
for (var t = "", a = 0; a < 32; a++) {
t += "abcdefghijklmnopqrstuvwxyz0123456789"[parseInt(32 * Math.random())]
}
"wechat_facilitator.signkey" == e && (n.paysetting.wechat_facilitator.signkey = t), "wechat.apikey" == e && (n.paysetting.wechat.apikey = t)
}
}
}]).controller("paymentWebappCtrl", ["$scope", "$http", "config", function (n, t, a) {
n.paysetting = a.paysetting, n.paysetting.alipay = n.paysetting.alipay || {}, n.paysetting.wechat = n.paysetting.wechat || {}, n.paysetting.alipay.has_config = a.paysetting.alipay.account ? 1 : 0, n.paysetting.wechat.has_config = a.paysetting.wechat.appid ? 1 : 0, n.paysetting.wechat.version = 2, n.wechat_qrcode = "", n.saveEdit = function (e) {
if ("alipay" == e) {
if (!n.paysetting.alipay.account) return util.message("请填写收款支付宝账号", "", "error"), !1;
if (!n.paysetting.alipay.partner) return util.message("请填写合作者身份", "", "error"), !1;
if (!n.paysetting.alipay.secret) return util.message("请填写校验密钥", "", "error"), !1
} else if ("wechat" == e) {
if (!n.paysetting.wechat.appid) return util.message("请填写appid", "", "error"), !1;
if (!n.paysetting.wechat.mchid) return util.message("请填写微信支付商户号", "", "error"), !1;
if (!n.paysetting.wechat.signkey) return util.message("请填写微信支付密钥", "", "error"), !1
}
t.post(a.saveurl, {type: e, param: n.paysetting[e]}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}, n.test_wechat = function () {
t.post(a.test_wechat_url, {param: n.paysetting.wechat}).success(function (e) {
e.message.errno ? (n.wechat_qrcode = "", $("#wechat_qrcode").hide(), util.message(e.message.message, "", "error")) : (n.wechat_qrcode = e.message.message + "?" + Math.random(), $("#wechat_qrcode").show())
})
}, n.test_alipay = function () {
t.post(a.test_alipay_url, {param: n.paysetting.alipay}).success(function (e) {
if (null !== e.message.message) return location.href = e.message.message, !1;
util.message("配置失败!")
})
}, n.tokenGen = function (e) {
if (confirm("确定要修改密钥吗?")) {
for (var t = "", a = 0; a < 32; a++) {
t += "abcdefghijklmnopqrstuvwxyz0123456789"[parseInt(32 * Math.random())]
}
"wechat_facilitator.signkey" == e && (n.paysetting.wechat_facilitator.signkey = t), "wechat.apikey" == e && (n.paysetting.wechat.apikey = t)
}
}
}]).controller("creditCtrl", ["$scope", "$http", "config", function (t, a, e) {
t.config = e, t.creditSetting = e.creditSetting, t.tactics = {
activity: e.activity,
currency: e.currency
}, t.creditTitle = "", t.activeCredit = "", t.activeTacticsType = "", t.enabledCredit = e.enabledCredit, t.activeTactics = "", t.syncSetting = e.syncSetting, t.changeEnabled = function (e) {
t.creditSetting = null == t.creditSetting ? {} : t.creditSetting, null == t.creditSetting[e] && (t.creditSetting[e] = {
title: "",
enabled: 0
}), t.creditSetting[e].enabled = 1 == t.creditSetting[e].enabled ? 0 : 1, a.post(t.config.saveCreditSetting, {credit_setting: t.creditSetting}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, t.editCreditTactics = function (e) {
$("#tactics").modal("show"), t.activeTacticsType = e, t.activeTactics = t.tactics[e]
}, t.editCreditName = function (e) {
t.activeCredit = e, $("#credit-name").modal("show"), null == t.creditSetting[e] && (t.creditSetting[e] = {
title: "",
enabled: 0
}), t.creditTitle = t.creditSetting[e].title
}, t.setCreditName = function () {
t.creditSetting[t.activeCredit].title = t.creditTitle, a.post(t.config.saveCreditSetting, {credit_setting: t.creditSetting}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, t.setCreditTactics = function () {
a.post(t.config.saveTacticsSetting, {setting: t.tactics}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}
}]).controller("syncCtrl", ["$scope", "$http", "config", function (e, t, a) {
e.config = a, e.syncSetting = a.syncSetting, e.setSync = function () {
e.syncSetting = 1 == e.syncSetting ? 0 : 1, t.post(e.config.saveSyncSetting, {setting: e.syncSetting}).success(function (e) {
})
}
}]).controller("ucCtrl", ["$scope", "$http", "config", function (a, u, d) {
a.uc = d.uc, a.mysql_status = "mysql" == a.uc.connect ? 1 : 0, a.http_status = "http" == a.uc.connect ? 1 : 0, a.changeConnect = function (e) {
"mysql" == e ? $("#mysqlconnect").modal("show") : $("#httpconnect").modal("show")
}, a.saveSetting = function (e, t) {
var a = {token: d.token, submit: 1};
if ("fastinput" == t) {
var n = e.value.split(";"), i = new Array;
for (var s in n) {
var o = n[s].indexOf("UC"), r = n[s].indexOf("', '"), l = n[s].indexOf("')"),
c = (t = n[s].substring(o, r), n[s].substring(r + 4, l));
i[t] = c
}
a.connect = i.UC_CONNECT, a.appid = i.UC_APPID, a.key = i.UC_KEY, a.charset = i.UC_CHARSET, a.dbhost = i.UC_DBHOST, a.dbuser = i.UC_DBUSER, a.dbname = i.UC_DBNAME, a.dbpw = i.UC_DBPW, a.dbcharset = i.UC_DBCHARSET, a.dbtablepre = i.UC_DBTABLEPRE, a.dbconnect = i.UC_DBCONNECT, a.api = i.UC_API, a.ip = i.UC_IP
} else a[t] = "status" == t ? e : e.value;
u.post(d.setting_url, a).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}, a.saveConnect = function (e) {
var t = {token: d.token, submit: 1};
if ("mysql" == e) {
if (t.dbhost = a.uc.dbhost, t.dbuser = a.uc.dbuser, t.dbpw = a.uc.dbpw, t.dbname = a.uc.dbname, t.dbcharset = a.uc.dbcharset, t.dbtablepre = a.uc.dbtablepre, t.dbconnect = a.uc.dbconnect, 1 == a.mysql_status) {
if (!t.dbhost) return util.message("请填写UCenter数据库主机地址!", "", "error"), !1;
if (!t.dbuser) return util.message("请填写UCenter数据库用户名!", "", "error"), !1;
if (!t.dbpw) return util.message("请填写UCenter数据库密码!", "", "error"), !1;
if (!t.dbname) return util.message("请填写UCenter数据库名称!", "", "error"), !1;
if (!t.dbcharset) return util.message("请填写UCenter数据库字符集!", "", "error"), !1;
if (!t.dbtablepre) return util.message("请填写UCenter数据表前缀!", "", "error"), !1;
t.connect = "mysql"
}
} else if (t.api = a.uc.api, t.ip = a.uc.ip, 1 == a.http_status) {
if (!t.api) return util.message("请填写UCenter 服务端的URL地址!", "", "error"), !1;
if (!t.ip) return util.message("请填写UCenter的IP!", "", "error"), !1;
t.connect = "http"
}
u.post(d.setting_url, t).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}
}]).controller("refundCtrl", ["$scope", "$http", "config", function (a, e, t) {
a.setting = t.setting, a.wechat_refund = a.setting.wechat_refund, a.ali_refund = a.setting.ali_refund, a.change_switch = function (e, t) {
"wechat_refund" == e && (a.wechat_refund.switch = t), "ali_refund" == e && (a.ali_refund.switch = t)
}, $("#key").change(function () {
a.wechat_refund.key = $("#key").val(), a.$apply()
}), $("#cert").change(function () {
a.wechat_refund.cert = $("#cert").val(), a.$apply()
}), $("#form_wechat").submit(function () {
if (1 == a.wechat_refund.switch) {
if ("" == a.wechat_refund.cert) return util.message("请上传apiclient_cert.pem证书"), !1;
if ("" == a.wechat_refund.key) return util.message("请上传apiclient_key.pem证书"), !1
}
}), $("#private_key").change(function () {
a.ali_refund.private_key = $("#private_key").val(), a.$apply()
}), $("#form_ali").submit(function () {
if (1 == a.ali_refund.switch) {
if ("" == a.ali_refund.app_id) return util.message("请填写app_id"), !1;
if ("" == a.ali_refund.private_key) return util.message("请上传rsa_private_key.pem证书"), !1
}
})
}]).controller("bindDomainCtrl", ["$scope", "$http", "config", function (e, t, a) {
e.account = a.account, e.middleAccount = {bind_domain: ""}, e.httpChange = function () {
t.post(a.links.post, {
bind_domain: e.middleAccount.bind_domain,
submit: !0,
token: a.token
}).success(function (e) {
0 == e.message.errno ? util.message("修改成功!", e.redirect, "success") : util.message(e.message.message)
})
}
}]).controller("appModuleLinkUniacidCtrl", ["$scope", "$http", "config", "we7TypeDefault", function (n, a, i, e) {
for (var t in n.modules = i.modules, n.module = "", n.selectedAccount = "", n.loadData = !1, n.linkAccounts = "", n.searchKeyword = "", n.typeSign = i.typeSign, delete e.welcome, delete e[i.typeSign], e) {
n.activeTypeSign = t;
break
}
n.initModule = function (e) {
n.module = e, "account" == n.typeSign ? n.changeType("wxapp") : n.changeType(n.typeSign)
}, n.changeType = function (e) {
n.loadData = !0, n.selectedAccount = "", n.searchLinkAccount(n.module, e)
}, n.searchLinkAccount = function (e, t) {
n.activeTypeSign = t, setTimeout(function () {
$("select").niceSelect && $("select").niceSelect("update")
}, 0), $("#show-account").modal("show"), a.post(i.links.search_link_account, {
module_name: e,
type_sign: t
}).success(function (e) {
n.loadData = !1, 0 == e.message.errno ? n.linkAccounts = e.message.message : util.message(e.message.message)
})
}, n.selectLinkAccount = function (a) {
angular.forEach(n.linkAccounts, function (e, t) {
t == a.uniacid ? n.linkAccounts[t].checked = 1 : n.linkAccounts[t].checked = 0
}), n.selectedAccount = a
}, n.module_unlink_uniacid = function (e) {
a.post(i.links.module_unlink_uniacid, {module_name: e}).success(function (e) {
e.message.errno, util.message(e.message.message, e.redirect)
})
}, n.moduleLinkUniacid = function () {
$("#show-account").modal("hide"), a.post(i.links.module_link_uniacid, {
module_name: n.module,
submit: "yes",
token: i.token,
uniacid: n.selectedAccount.uniacid
}).success(function (e) {
0 == e.message.errno ? util.message("关联成功", "refresh", "success") : util.message(e.message.message)
}), n.module = ""
}
}]).controller("mcMessageListCtrl", ["$scope", "$http", "config", function (e, a, n) {
e.lists = n.lists, e.getMessageInfo = function (e, t) {
window.location.href = n.getMessageInfoUrl + "&index=" + e + "&msg_data_id=" + t
}, e.switch = function (t) {
a.post(n.switchMessageUrl, {
index: t.index,
msg_data_id: t.msg_data_id,
attach_id: t.attach_id,
title: t.title,
need_open_comment: t.need_open_comment
}).success(function (e) {
0 == e.message.errno ? (t.need_open_comment = 1 == t.need_open_comment ? 0 : 1, util.message(e.message.message, "", "success")) : util.message(e.message.message, "", "error")
})
}
}]).controller("mcMessageInfoCtrl", ["$scope", "$http", "config", function (e, a, n) {
e.comments = n.comments, e.selectedType = n.type, e.types = [{typeValue: 0, typeName: "全部留言"}, {
typeValue: 1,
typeName: "普通留言"
}, {typeValue: 2, typeName: "精选留言"}], e.searchComment = function () {
$params = "?index=" + n.index + "&msg_data_id=" + n.msg_data_id + "&type=" + e.selectedType, window.location.href = n.getMessageInfoUrl + $params
}, e.replyarticle = function (e) {
e.replying = !e.replying
}, e.send = function (t) {
a.post(n.replyMessageUrl, {
index: t.index,
msg_data_id: t.msg_data_id,
replycontent: t.replycontent,
user_comment_id: t.user_comment_id
}).success(function (e) {
0 == e.message.errno ? (t.replying = !1, util.message(e.message.message, "refresh", "success")) : util.message(e.message.message, "refresh", "error")
})
}, e.mark = function (t) {
a.post(n.markMessageUrl, {
index: t.index,
msg_data_id: t.msg_data_id,
user_comment_id: t.user_comment_id,
comment_type: t.comment_type
}).success(function (e) {
0 == e.message.errno ? (t.comment_type = !t.comment_type, util.message(e.message.message, "", "success")) : util.message(e.message.message, "", "error")
})
}, e.del = function (t) {
a.post(n.delMessageUrl, {
index: t.index,
msg_data_id: t.msg_data_id,
user_comment_id: t.user_comment_id
}).success(function (e) {
0 == e.message.errno ? (t.reply = "", util.message(e.message.message, "refresh", "success")) : util.message(e.message.message, "refresh", "error")
})
}, e.del_reply = function (t) {
a.post(n.delMessageReplyUrl, {
index: t.index,
msg_data_id: t.msg_data_id,
user_comment_id: t.user_comment_id
}).success(function (e) {
0 == e.message.errno ? (t.reply = "", util.message(e.message.message, "refresh", "success")) : util.message(e.message.message, "refresh", "error")
})
}
}]).controller("fieldsListCtrl", ["$scope", "$http", "config", function (e, n, i) {
e.account_member_fields = i.account_member_fields, e.changeAvailable = function (e, t, a) {
n.post(i.changeAvailableUrl, {id: e, available: t}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, "refresh", "success") : util.message(e.message.message, "refresh", "error")
})
}, e.jumpTo = function (e) {
window.location.href = i.fieldPostUrl + "&id=" + e
}
}]).controller("replySettingCtrl", ["$scope", "$http", "config", function (e, t, a) {
e.times = a.times, e.saveSetting = function () {
t.post(a.links.postUrl, {times: e.times}).success(function (e) {
0 == e.message.errno ? util.message("修改成功!", e.redirect, "success") : util.message("修改失败!", e.redirect, "error")
})
}
}]), angular.module("qrApp", ["we7app"]), angular.module("qrApp").controller("QrDisplay", ["$scope", function (e) {
$(".js-clip").each(function () {
util.clip(this, $(this).attr("data-url"))
})
}]), angular.module("qrApp").controller("QrPost", ["$scope", "$http", "config", function (t, a, e) {
0 < e.id ? t.type = 0 : t.type = 1, $(".we7-select").change(function () {
var e = $(".we7-select").val();
t.type = 1 == e ? 1 : 2, t.$apply(t.type)
}), $.isFunction(window.initReplyController) && window.initReplyController(t, a), $(".submit").on("click", function () {
return !!t.checkSubmit()
}), t.checkSubmit = function () {
if ("" == $(":text[name='scene-name']").val()) return util.message("抱歉,二维码名称为必填项,请返回修改!"), !1;
if (1 == t.type) {
if ("" == $(":text[name='expire-seconds']").val()) return util.message("抱歉,临时二维码过期时间为必填项,请返回修改!"), !1;
if (!/^\+?[1-9][0-9]*$/.test($(":text[name='expire-seconds']").val())) return util.message("抱歉,临时二维码过期时间必须为正整数,请返回修改!"), !1;
if (parseInt($(":text[name='expire-seconds']").val()) < 30 || 2592e3 < parseInt($(":text[name='expire-seconds']").val())) return util.message("抱歉,临时二维码过期时间必须在30-2592000秒之间,请返回修改!"), !1
}
if (2 == t.type) {
var e = $.trim($("#scene_str").val());
if (!e) return util.message("场景值不能为空!"), !1;
if (/^\d+$/g.test(e)) return util.message("场景值不能是数字!"), !1;
a.post("{php echo url('platform/qr/check_scene_str')}", {scene_str: e}).success(function (e) {
if (1 == e.message.errno && "repeat" == e.message.message) return util.message("场景值和现有二维码场景值重复,请修改场景值"), !1
})
}
return "" != $(":hidden[name='reply[reply_keyword]']").val() || (util.message("抱歉,请选择二维码要触发的关键字!"), !1)
}
}]), angular.module("qrApp").controller("UrlToQr", ["$scope", "$http", "config", function (n, i, s) {
n.copyLink = "", n.selectUrl = function () {
var a = $("#longurl");
util.linkBrowser(function (e) {
var t = s.site_url;
if ("tel:" == e.substring(0, 4)) return util.message("长链接不能设置为一键拨号"), !1;
-1 == e.indexOf("http://") && -1 == e.indexOf("https://") && (e = t + "app" + (e = e.replace("./index.php?", "/index.php?"))), a.val(e)
})
}, n.transformUrl = function () {
var e = $("#longurl").val().trim();
if ("" == e) return util.message("请输入长链接"), !1;
if (-1 == e.indexOf("http://") && -1 == e.indexOf("https://") && -1 == e.indexOf("weixin://")) return util.message("请输入有效的长链接"), !1;
var t = $("#change"), a = s.img_url;
t.html('<i class="fa fa-spinner"></i> 转换中'), i.post(s.transform_url, {longurl: e}).success(function (e) {
if (-1 == e.message.errno) return util.message(e.message.message), t.html("立即转换"), !1;
$("#shorturl").val(e.message.message.short_url), n.copyLink = e.message.message.short_url, $(".url-short").next().attr({"data-url": e.message.message.short_url}).removeClass("disabled"), $("#qrsrc").attr("src", a + "url=" + e.message.message.short_url), $(".qr-img").next().removeClass("disabled"), t.html("立即转换")
})
}, n.downQr = function () {
var e = $("#shorturl").val(), t = s.down_url;
window.location.href = t + "qrlink=" + e
}, n.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;height:33px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>'),
a = $("#copy-" + e).next().html();
(!a || a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>') < 0) && $("#copy-" + e).after(t), setTimeout(function () {
t.remove()
}, 2e3)
}
}]), angular.module("qrApp").controller("QrStatistics", ["$scope", "$http", "config", function (e, t, a) {
e.link = a.link, e.changeStatus = function () {
t.post(e.link.changeStatus, {}).success(function (e) {
0 == e.message.errno ? location.reload() : util.message(e.message.message, e.redirect, "ajax")
})
}
}]), angular.module("quickMenuApp", ["wapeditorApp"]), angular.module("quickMenuApp").controller("MainCtrl", ["$scope", "config", "serviceCommon", "serviceQuickMenuBase", "serviceQuickMenuSubmit", function (a, e, t, n, i) {
a.submit = {}, a.activeItem = e.activeItem ? e.activeItem : n.initActiveItem(), n.initActiveItem(a.activeItem), a.selectNavStyle = function () {
var e = $('input[name="nav_style"]:checked').val();
a.activeItem.navStyle = n.selectNavStyle(e)
}, a.addMenu = function () {
a.activeItem.menus = n.addMenu()
}, a.addSubMenu = function (e) {
var t = _.findIndex(a.activeItem.menus, e);
a.activeItem.menus[t].submenus = n.addSubMenu(e)
}, a.submit = function (e) {
a.submit = i.submit(), a.$apply("submit"), $(e.target).parents("form").submit()
}, a.removeMenu = function (e) {
a.activeItem.menus = n.removeMenu(e)
}, a.removeSubMenu = function (e, t) {
n.removeSubMenu(e, t), a.activeItem.menus[e].submenus = _.without(a.activeItem.menus[e].submenus, t)
}, a.showSearchModules = function () {
a.moduleDialog = $("#shop-modules-modal").modal(), $("#shop-modules-modal .modal-body .btn-primary").html("取消"), $("#shop-modules-modal").find(".modal-footer .btn-primary").unbind("click").click(function () {
a.activeItem.ignoreModules = {}, $("#shop-modules-modal .modal-body .btn-primary").each(function () {
a.hasIgnoreModules = !0, a.activeItem.ignoreModules[$(this).attr("js-name")] = {
name: $(this).attr("js-name"),
title: $(this).attr("js-title")
}
}), a.$apply("activeItem"), a.$apply("hasIgnoreModules"), n.setQuickMenuData("ignoreModules", a.activeItem.ignoreModules)
})
}, $(".js-editor-submit").click(function (e) {
a.submit(e)
}), a.hasIgnoreModules = _.size(a.activeItem.ignoreModules), $(".nav-menu").show(), $(".app-shopNav-edit").show()
}]), angular.module("quickMenuApp").service("serviceQuickMenuBase", ["$rootScope", function (e) {
var t = {}, n = {};
return t.initActiveItem = function (e) {
return n = angular.isObject(e) ? e : {
navStyle: 1,
bgColor: "#2B2D30",
menus: [],
extend: [],
position: {homepage: !0, usercenter: !0, page: !0, article: !0},
ignoreModules: {}
}
}, t.selectNavStyle = function (e) {
return n.navStyle = e, n.navStyle
}, t.addMenu = function () {
return n.menus.push({
title: "标题",
url: "",
submenus: [],
icon: {name: "fa-home", color: "#00ffff"},
image: "",
hoverimage: "",
hovericon: ""
}), n.menus
}, t.removeMenu = function (e) {
var t = $.inArray(e, n.menus), a = angular.copy(n.menus);
for (i in n.menus = [], a) i != t && n.menus.push(a[i]);
return n.menus
}, t.addSubMenu = function (e) {
var t = _.findIndex(n.menus, e);
return n.menus[t].submenus.push({title: "标题", url: ""}), n.menus[t].submenus
}, t.removeSubMenu = function (e, t) {
return n.menus[e].submenus = _.without(n.menus[e].submenus, t), n.menus[e].submenus
}, t.getQuickMenuData = function (e) {
return angular.isString(e) ? n[e] : n
}, t.setQuickMenuData = function (e, t) {
angular.isObject(e) ? angular.forEach(e, function (e, t) {
n[t] = e
}) : n[e] = t
}, t
}]), angular.module("quickMenuApp").service("serviceQuickMenuSubmit", ["serviceCommon", "serviceQuickMenuBase", function (a, n) {
var e = {
submit: function () {
var e = {params: {}, html: ""};
e.params = n.getQuickMenuData(), a.stripHaskey(e.params);
var t = $(".nav-menu").html();
return t = (t = (t = (t = t.replace(/<\!\-\-([^-]*?)\-\->/g, "")).replace(/ng\-[a-zA-Z-]+=\"[^\"]*\"/g, "")).replace(/ng\-[a-zA-Z]+/g, "")).replace(/[\t\n\n\r]/g, ""), e.html = t, e
}
};
return e
}]), angular.module("we7resource", ["we7app"]), angular.module("we7resource").controller("we7resource-base-controller", ["$scope", "$sce", "serviceResource", "$http", "config", function (a, e, n, t, i) {
function s(e) {
util.message(e)
}
function o(e) {
$(window).trigger("resource_selected", {type: a.resourceType, items: e})
}
a.currentPage = 1, a.isWechat = i.isWechat, a.needType = i.needType, a.multiple = i.multiple, a.showType = i.showType, a.global = i.global ? "global" : "", a.dest_dir = i.dest_dir, a.uniacid = i.uniacid, a.netWorkVideo = i.netWorkVideo, i.others && i.others[a.resourceType] && (a.needType = i.others[a.resourceType].needType), a.selectedItems = {}, a.index = 0, a.converting = !1, a.showWx = function () {
return a.isWechat || 1 == a.showType || 3 == a.showType
}, a.showLocal = function () {
return !a.isWechat || 2 == a.showType || 3 == a.showType
}, a.showNetWork = function () {
return !0
}, a.loadData = function () {
}, a.onIndexChange = function (e) {
a.loadData()
}, a.setIndex = function (e) {
a.index !== e && (a.index = e, a.selectedItems = {}, a.onIndexChange(e))
}, a.isWechat || a.setIndex(1), a.setCurrentPage = function (e) {
a.currentPage != e && (a.currentPage = e, a.loadData())
}, a.itemClick = function (e) {
if (!a.converting) if (e.selected) e.selected = !1; else {
if (!a.multiple || a.needConvert()) return e.selected = !0, void a.convert(e);
e.selected = !e.selected, delete a.selectedItems[e.id], e.selected && (a.selectedItems[e.id] = e)
}
}, a.delItem = function (e, t) {
if (t.stopPropagation(), !confirm("删除不可恢复确认删除吗?")) return !1;
n.delItem(e.id, a.resourceType, 1 == a.index, a.uniacid).then(function () {
a.loadData()
}, function (e) {
util.message(e.message)
})
}, a.canConvert = function (e) {
return !0
}, a.needConvert = function () {
return 3 !== a.needType && a.index + 1 !== a.needType
}, a.convert = function (e) {
var t = 0 == a.index ? "本地" : "微信";
if (a.needConvert()) {
if (!a.canConvert(e)) return e.selected = !1, void s("当前资源无法选择");
confirm("当前资源转换为" + t + "素材方可使用,是否转换") ? (util.loading("正在转换为" + t + "资源"), function (e) {
a.converting = !0;
var t = 2 == a.needType;
n.convert(e.id, a.resourceType, t).then(function (e) {
util.loaded(), a.converting = !1, e && o([e]), e.selected = !1
}, function () {
a.converting = !1, s("资源转换失败"), e.selected = !1, util.loaded()
})
}(e)) : e.selected = !1
} else o([e])
}, a.ok = function () {
var e = [];
for (var t in a.selectedItems) e.push(a.selectedItems[t]);
0 < e.length ? o(e) : $(window).trigger("resource_canceled")
}, a.uploaded = function () {
a.loadData()
}, a.uploaderror = function (e) {
e && "" != e || (e = "上传失败"), s(e)
}, a.selectedItems = function () {
return selectedItems
}
}]), angular.module("we7resource").directive("we7ResourceBasicDialog", ["config", function (e) {
return {scope: {}, restrict: "EA", templateUrl: "directive-basic-basic.html"}
}]), angular.module("we7resource").controller("we7resource-basic-controller", ["$scope", "config", function (a, e) {
$("#basictext").val(e.otherVal), a.ok = function () {
var e = $("#basictext").val();
$(window).trigger("resource_selected", {type: "basic", items: [{content: e}]})
}, a.emotion = function () {
t()
}, a.emoji = function () {
n()
}, a.link = {text: "", url: ""}, a.linkStatus = !1, a.showLink = function () {
a.linkStatus = !a.linkStatus
}, a.changeLink = function () {
if (a.link.url) {
var e = $("#basictext").val(), t = '<a href="' + a.link.url + '">' + (a.link.text || a.link.url) + "</a>";
$("#basictext").val(e + t), a.link = {text: "", url: ""}, a.linkStatus = !1
}
};
var t = function () {
var o = $("#basictext")[0], r = $("#basictext").val();
util.emotion($(".emotion-triggers"), $("#basictext"), function (e, t, a) {
if (o.selectionStart && "0" != o.selectionStart) $("#basictext").val(r + e), $("#basictext").focus(); else {
var n = o.selectionStart, i = o.selectionEnd, s = o.scrollTop;
$("#basictext").val(o.value.substring(0, n) + e + o.value.substring(i, o.value.length)), $("#basictext").focus(), o.selectionStart = n + e.length, o.selectionEnd = n + e.length, o.scrollTop = s
}
})
}, n = function () {
var a = $("#basictext").val();
util.emojiBrowser(function (e) {
var t = "[U+" + e.find("span").text() + "]";
$("#basictext").val(a + t)
})
}
}]), angular.module("we7resource").directive("we7ResourceIconDialog", function () {
return {scope: {}, restrict: "EA", templateUrl: "directive-icon-icon.html"}
}), angular.module("we7resource").controller("we7resource-icon-controller", ["$scope", "config", function (t, e) {
var a = {
c0: ["fa-adjust", "fa-anchor", "fa-archive", "fa-arrows", "fa-arrows-h", "fa-arrows-v", "fa-asterisk", "fa-automobile", "fa-ban", "fa-bank", "fa-bar-chart-o", "fa-barcode", "fa-bars", "fa-beer", "fa-bell", "fa-bell-o", "fa-bolt", "fa-bomb", "fa-book", "fa-bookmark", "fa-bookmark-o", "fa-briefcase", "fa-bug", "fa-building", "fa-building-o", "fa-bullhorn", "fa-bullseye", "fa-cab", "fa-calendar", "fa-calendar-o", "fa-camera", "fa-camera-retro", "fa-car", "fa-caret-square-o-down", "fa-caret-square-o-left", "fa-caret-square-o-right", "fa-caret-square-o-up", "fa-certificate", "fa-check", "fa-check-circle", "fa-check-circle-o", "fa-check-square", "fa-check-square-o", "fa-child", "fa-circle", "fa-circle-o", "fa-circle-o-notch", "fa-circle-thin", "fa-clock-o", "fa-cloud", "fa-cloud-download", "fa-cloud-upload", "fa-code", "fa-code-fork", "fa-coffee", "fa-cog", "fa-cogs", "fa-comment", "fa-comment-o", "fa-comments", "fa-comments-o", "fa-compass", "fa-credit-card", "fa-crop", "fa-crosshairs", "fa-cube", "fa-cubes", "fa-cutlery", "fa-dashboard", "fa-database", "fa-desktop", "fa-dot-circle-o", "fa-download", "fa-edit", "fa-ellipsis-h", "fa-ellipsis-v", "fa-envelope", "fa-envelope-o", "fa-envelope-square", "fa-eraser", "fa-exchange", "fa-exclamation", "fa-exclamation-circle", "fa-exclamation-triangle", "fa-external-link", "fa-external-link-square", "fa-eye", "fa-eye-slash", "fa-fax", "fa-female", "fa-fighter-jet", "fa-file-archive-o", "fa-file-audio-o", "fa-file-code-o", "fa-file-excel-o", "fa-file-image-o", "fa-file-movie-o", "fa-file-pdf-o", "fa-file-photo-o", "fa-file-picture-o", "fa-file-powerpoint-o", "fa-file-sound-o", "fa-file-video-o", "fa-file-word-o", "fa-file-zip-o", "fa-film", "fa-filter", "fa-fire", "fa-fire-extinguisher", "fa-flag", "fa-flag-checkered", "fa-flag-o", "fa-flash", "fa-flask", "fa-folder", "fa-folder-o", "fa-folder-open", "fa-folder-open-o", "fa-frown-o", "fa-gamepad", "fa-gavel", "fa-gear", "fa-gears", "fa-gift", "fa-glass", "fa-globe", "fa-graduation-cap", "fa-group", "fa-hdd-o", "fa-headphones", "fa-heart", "fa-heart-o", "fa-history", "fa-home", "fa-image", "fa-inbox", "fa-info", "fa-info-circle", "fa-institution", "fa-key", "fa-keyboard-o", "fa-language", "fa-laptop", "fa-leaf", "fa-legal", "fa-lemon-o", "fa-level-down", "fa-level-up", "fa-life-bouy", "fa-life-ring", "fa-life-saver", "fa-lightbulb-o", "fa-location-arrow", "fa-lock", "fa-magic", "fa-magnet", "fa-mail-forward", "fa-mail-reply", "fa-mail-reply-all", "fa-male", "fa-map-marker", "fa-meh-o", "fa-microphone", "fa-microphone-slash", "fa-minus", "fa-minus-circle", "fa-minus-square", "fa-minus-square-o", "fa-mobile", "fa-mobile-phone", "fa-money", "fa-moon-o", "fa-mortar-board", "fa-music", "fa-navicon", "fa-paper-plane", "fa-paper-plane-o", "fa-paw", "fa-pencil", "fa-pencil-square", "fa-pencil-square-o", "fa-phone", "fa-phone-square", "fa-photo", "fa-picture-o", "fa-plane", "fa-plus", "fa-plus-circle", "fa-plus-square", "fa-plus-square-o", "fa-power-off", "fa-print", "fa-puzzle-piece", "fa-qrcode", "fa-question", "fa-question-circle", "fa-quote-left", "fa-quote-right", "fa-random", "fa-recycle", "fa-refresh", "fa-reorder", "fa-reply", "fa-reply-all", "fa-retweet", "fa-road", "fa-rocket", "fa-rss", "fa-rss-square", "fa-search", "fa-search-minus", "fa-search-plus", "fa-send", "fa-send-o", "fa-share", "fa-share-alt", "fa-share-alt-square", "fa-share-square", "fa-share-square-o", "fa-shield", "fa-shopping-cart", "fa-sign-in", "fa-sign-out", "fa-signal", "fa-sitemap", "fa-sliders", "fa-smile-o", "fa-sort", "fa-sort-alpha-asc", "fa-sort-alpha-desc", "fa-sort-amount-asc", "fa-sort-amount-desc", "fa-sort-asc", "fa-sort-desc", "fa-sort-down", "fa-sort-numeric-asc", "fa-sort-numeric-desc", "fa-sort-up", "fa-space-shuttle", "fa-spinner", "fa-spoon", "fa-square", "fa-square-o", "fa-star", "fa-star-half", "fa-star-half-empty", "fa-star-half-full", "fa-star-half-o", "fa-star-o", "fa-suitcase", "fa-sun-o", "fa-support", "fa-tablet", "fa-tachometer", "fa-tag", "fa-tags", "fa-tasks", "fa-taxi", "fa-terminal", "fa-thumb-tack", "fa-thumbs-down", "fa-thumbs-o-down", "fa-thumbs-o-up", "fa-thumbs-up", "fa-ticket", "fa-times", "fa-times-circle", "fa-times-circle-o", "fa-tint", "fa-toggle-down", "fa-toggle-left", "fa-toggle-right", "fa-toggle-up", "fa-trash-o", "fa-tree", "fa-trophy", "fa-truck", "fa-umbrella", "fa-university", "fa-unlock", "fa-unlock-alt", "fa-unsorted", "fa-upload", "fa-user", "fa-users", "fa-video-camera", "fa-volume-down", "fa-volume-off", "fa-volume-up", "fa-warning", "fa-wheelchair", "fa-wrench"],
c1: ["fa-file", "fa-file-archive-o", "fa-file-audio-o", "fa-file-code-o", "fa-file-excel-o", "fa-file-image-o", "fa-file-movie-o", "fa-file-o", "fa-file-pdf-o", "fa-file-photo-o", "fa-file-picture-o", "fa-file-powerpoint-o", "fa-file-sound-o", "fa-file-text", "fa-file-text-o", "fa-file-video-o", "fa-file-word-o", "fa-file-zip-o"],
c2: ["fa-circle-o-notch", "fa-cog", "fa-gear", "fa-refresh", "fa-spinner"],
c3: ["fa-check-square", "fa-check-square-o", "fa-circle", "fa-circle-o", "fa-dot-circle-o", "fa-minus-square", "fa-minus-square-o", "fa-plus-square", "fa-plus-square-o", "fa-square", "fa-square-o"],
c4: ["fa-bitcoin", "fa-btc", "fa-cny", "fa-dollar", "fa-eur", "fa-euro", "fa-gbp", "fa-inr", "fa-jpy", "fa-krw", "fa-money", "fa-rmb", "fa-rouble", "fa-rub", "fa-ruble", "fa-rupee", "fa-try", "fa-turkish-lira", "fa-usd", "fa-won", "fa-yen"],
c5: ["fa-align-center", "fa-align-justify", "fa-align-left", "fa-align-right", "fa-bold", "fa-chain", "fa-chain-broken", "fa-clipboard", "fa-columns", "fa-copy", "fa-cut", "fa-dedent", "fa-eraser", "fa-file", "fa-file-o", "fa-file-text", "fa-file-text-o", "fa-files-o", "fa-floppy-o", "fa-font", "fa-header", "fa-indent", "fa-italic", "fa-link", "fa-list", "fa-list-alt", "fa-list-ol", "fa-list-ul", "fa-outdent", "fa-paperclip", "fa-paragraph", "fa-paste", "fa-repeat", "fa-rotate-left", "fa-rotate-right", "fa-save", "fa-scissors", "fa-strikethrough", "fa-subscript", "fa-superscript", "fa-table", "fa-text-height", "fa-text-width", "fa-th", "fa-th-large", "fa-th-list", "fa-underline", "fa-undo", "fa-unlink"],
c6: ["fa-angle-double-down", "fa-angle-double-left", "fa-angle-double-right", "fa-angle-double-up", "fa-angle-down", "fa-angle-left", "fa-angle-right", "fa-angle-up", "fa-arrow-circle-down", "fa-arrow-circle-left", "fa-arrow-circle-o-down", "fa-arrow-circle-o-left", "fa-arrow-circle-o-right", "fa-arrow-circle-o-up", "fa-arrow-circle-right", "fa-arrow-circle-up", "fa-arrow-down", "fa-arrow-left", "fa-arrow-right", "fa-arrow-up", "fa-arrows", "fa-arrows-alt", "fa-arrows-h", "fa-arrows-v", "fa-caret-down", "fa-caret-left", "fa-caret-right", "fa-caret-square-o-down", "fa-caret-square-o-left", "fa-caret-square-o-right", "fa-caret-square-o-up", "fa-caret-up", "fa-chevron-circle-down", "fa-chevron-circle-left", "fa-chevron-circle-right", "fa-chevron-circle-up", "fa-chevron-down", "fa-chevron-left", "fa-chevron-right", "fa-chevron-up", "fa-hand-o-down", "fa-hand-o-left", "fa-hand-o-right", "fa-hand-o-up", "fa-long-arrow-down", "fa-long-arrow-left", "fa-long-arrow-right", "fa-long-arrow-up", "fa-toggle-down", "fa-toggle-left", "fa-toggle-right", "fa-toggle-up"],
c7: ["fa-arrows-alt", "fa-backward", "fa-compress", "fa-eject", "fa-expand", "fa-fast-backward", "fa-fast-forward", "fa-forward", "fa-pause", "fa-play", "fa-play-circle", "fa-play-circle-o", "fa-step-backward", "fa-step-forward", "fa-stop", "fa-youtube-play"],
c8: ["fa-adn", "fa-android", "fa-apple", "fa-behance", "fa-behance-square", "fa-bitbucket", "fa-bitbucket-square", "fa-bitcoin", "fa-btc", "fa-codepen", "fa-css3", "fa-delicious", "fa-deviantart", "fa-digg", "fa-dribbble", "fa-dropbox", "fa-drupal", "fa-empire", "fa-facebook", "fa-facebook-square", "fa-flickr", "fa-foursquare", "fa-ge", "fa-git", "fa-git-square", "fa-github", "fa-github-alt", "fa-github-square", "fa-gittip", "fa-google", "fa-google-plus", "fa-google-plus-square", "fa-hacker-news", "fa-html5", "fa-instagram", "fa-joomla", "fa-jsfiddle", "fa-linkedin", "fa-linkedin-square", "fa-linux", "fa-maxcdn", "fa-openid", "fa-pagelines", "fa-pied-piper", "fa-pied-piper-alt", "fa-pied-piper-square", "fa-pinterest", "fa-pinterest-square", "fa-qq", "fa-ra", "fa-rebel", "fa-reddit", "fa-reddit-square", "fa-renren", "fa-share-alt", "fa-share-alt-square", "fa-skype", "fa-slack", "fa-soundcloud", "fa-spotify", "fa-stack-exchange", "fa-stack-overflow", "fa-steam", "fa-steam-square", "fa-stumbleupon", "fa-stumbleupon-circle", "fa-tencent-weibo", "fa-trello", "fa-tumblr", "fa-tumblr-square", "fa-twitter", "fa-twitter-square", "fa-vimeo-square", "fa-vine", "fa-vk", "fa-wechat", "fa-weibo", "fa-weixin", "fa-windows", "fa-wordpress", "fa-xing", "fa-xing-square", "fa-yahoo", "fa-youtube", "fa-youtube-play", "fa-youtube-square"],
c9: ["fa-ambulance", "fa-h-square", "fa-hospital-o", "fa-medkit", "fa-plus-square", "fa-stethoscope", "fa-user-md", "fa-wheelchair"]
};
t.index = 0, t.color = e.otherVal ? e.otherVal : "#ddd", t.setIndex = function (e) {
t.index = e, t.selectIndex = -1
}, t.icons = function () {
return a["c" + t.index]
}, util.colorpicker("#we7colorpicker", function (e) {
t.color = e.toString(), t.$apply("color")
}), t.selectIndex = -1, t.itemClick = function (e) {
$(window).trigger("resource_selected", {type: "icon", items: [{name: e, color: t.color}]})
}
}]), angular.module("we7resource").directive("we7ResourceImageDialog", function () {
return {
scope: {}, restrict: "EA", templateUrl: "directive-images-images.html", link: function (a, e, t, n, i) {
e.bind("click", "pagination li a", function (e) {
var t = $(e.target).attr("page");
t && a.$broadcast("image_page_change", t)
})
}
}
}), angular.module("we7resource").controller("we7resource-image-controller", ["$compile", "$scope", "$sce", "serviceResource", "$http", "$controller", "config", function (n, s, a, o, e, t, r) {
s.resourceType = "image", t("we7resource-base-controller", {$scope: s}), s.isWechat || (s.showType = 2, s.needType = 2, s.index = 1), s.files = [], s.onprogress = function (e, t) {
console.log(e, t)
}, s.onUploadStart = function (e) {
s.files = e, console.log(s.files)
}, s.accept = "image/gif, image/jpg, image/jpeg, image/bmp, image/png, image/x-ico", s.uploadname = "上传图片", s.multipleupload = !0, s.quality = 0, s.netWorkurl = "", s.groups = [], s.showSubGroups = {};
new Date;
function i(e) {
$(window).trigger("resource_selected", {type: "image", items: e})
}
function l() {
for (var e = [], t = c(), a = 0; a < t.length; a++) e.push(t[a].id);
return e
}
function c() {
for (var e = [], t = 0; t < s.images.length; t++) {
var a = s.images[t];
a.selected && e.push(a)
}
return e
}
function u() {
var e = s.groupid;
s.uploadurl = 0 == s.index ? "./index.php?c=utility&a=file&do=wechat_upload&upload_type=image&mode=perm&uniacid=" + s.uniacid + "&dest_dir=" + s.dest_dir + "&quality=" + s.quality + "&group_id=" + e : "./index.php?c=utility&a=file&do=upload&upload_type=image&global=" + s.global + "&dest_dir=" + s.dest_dir + "&uniacid=" + s.uniacid + "&quality=" + s.quality + "&group_id=" + e
}
function d() {
p(s.groupid), m()
}
function p(e) {
s.selectedAllImage = !1, s.groupid = e, u();
var t = 1 == s.index;
o.getResources("image", s.currentPage, t, {
year: s.year,
month: s.month,
uniacid: s.uniacid,
dest_dir: s.dest_dir,
global: s.global,
group_id: e,
keyword: s.keyword || "",
order: s.order || ""
}).then(function (e) {
s.images = e.items, s.maxPage = Math.round(e.total / e.page_size), console.log(e, s.maxPage), s.page.currentPage = e.page, s.page.totalItems = e.total, s.page.itemsPerPage = e.page_size, s.pager = a.trustAsHtml(e.pager)
})
}
function m() {
var e = 1 == s.index, t = {uniacid: r.uniacid ? r.uniacid : 0};
o.imageGroup(e, t).then(function (e) {
s.groups = e
})
}
s.year = "0", s.month = "0", s.years = function () {
for (var e = (new Date).getFullYear(), t = [], a = 0; a < 10; a++) t.push(e - a);
return t
}(), s.order = "desc", s.months = function () {
for (var e = [], t = 1; t <= 12; t++) e.push(t);
return e
}(), s.selectedAllImage = !1, s.groupid = -1, s.editable = !1, s.config = r, s.role = window.sysinfo.role, s.maxPage = 1, s.images = [], s.page = {
currentPage: 1,
totalItems: 0,
itemsPerPage: 10,
pagesLength: 10,
onChange: function () {
s.setCurrentPage(s.page.currentPage)
}
}, "" != s.config.typeName && null != s.config.typeName && null != s.config.typeName || (s.config.typeName = "平台"), setTimeout(function () {
$(".material-head select").niceSelect && $(".material-head select").niceSelect()
}), s.getSelectedKeys = function () {
return l()
}, s.isLocal = function () {
return 1 == s.index
}, s.loadData = function () {
d()
}, s.onIndexChange = function (e) {
2 != e && (s.keyword = "", s.order = "desc", setTimeout(function () {
$("select").niceSelect && $("select").niceSelect("update")
}), d(), u())
}, s.itemClick = function (e) {
if (!s.converting) {
e.selected = !e.selected;
var t = c().length == s.images.length;
s.selectedAllImage = t
}
}, s.ok = function () {
var e = c();
if (0 < e.length) return !s.multiple || s.needConvert() ? (e[0].selected = !0, void s.convert(e[0])) : void i(e);
$(window).trigger("resource_canceled")
}, u(), s.fetchNetwork = function () {
!function (e, t) {
util.loading("网络图片转化中..."), o.netWorkconvert(e, t, "image").then(function (e) {
util.loaded(), i([e])
}, function (e) {
!function (e) {
util.message(e, "")
}("网络图片转化失败"), util.loaded()
})
}(s.netWorkurl, 2 == s.needType)
}, s.$on("image_page_change", function (e, t) {
s.setCurrentPage(t)
}), s.updateUploadUrl = function () {
u()
}, s.timeToDate = function (e) {
return new Date(1e3 * e)
}, s.getTitle = function (e) {
return s.isLocal ? e.filename : e.attachment
}, s.getImage = function (e) {
return "url(" + e.url + ")"
}, s.search = function () {
s.currentPage = 1, d()
}, $("body").on("click", function (e) {
$("[aria-describedby^=popover]").each(function () {
$(this).is(e.target) || 0 !== $(this).has(e.target).length || 0 !== $(".popover").has(e.target).length || $(this).popover("destroy")
})
}), $("body").on("show.bs.popover", ".js-show-del", function () {
$(this).closest(".js-show-action").addClass("show")
}), $("body").on("shown.bs.popover", ".js-show-del", function () {
$("select[ng-model^=move]").niceSelect && $("select[ng-model^=move]").niceSelect()
}), $("body").on("hide.bs.popover", ".js-show-del", function () {
$(this).closest(".js-show-action").removeClass("show")
}), s.showGroupAction = function (e, t) {
e.stopPropagation();
var a = $(e.target).closest(".js-show-action");
$("[aria-describedby^=popover]").not(a).popover("destroy"), a.data("bs.popover") ? a.popover("destroy") : a.popover({
html: !0,
placement: "auto bottom",
title: "",
template: '<div class="popover popover--material" role="tooltip"><div class="popover-content"></div></div>',
trigger: "manual",
container: "body",
content: function () {
var e = '<div class="action-img-popover"><div class="action-img-popover__title">更多操作</div><div class="action-img-popover__content">';
return t.pid && 0 != t.pid || (e = e + '<div class="action" ng-click="showRenameGroup($event, \'add\')" data-name="' + t.name + '" data-name-id="' + t.id + '"><i class="wi wi-copy color-default"></i>添加分组</div>'), e = e + '<div class="action" ng-click="showRenameGroup($event)" data-name="' + t.name + '" data-name-id="' + t.id + '"><i class="wi wi-text color-default"></i>编辑分组</div><div class="action" ng-click="showDelGroup($event)" data-del-id="' + t.id + '"><i class="wi wi-delete2 color-red"></i>删除分组</div></div></div>', n(e)(s)
}
}).popover("show")
}, s.renameGroup = "", s.showRenameGroup = function (t, a) {
t.stopPropagation(), s.renameGroup = "";
var e = $(t.target);
$(t.target).data("nameId") && (e = $(".group[data-action-id=" + $(t.target).data("nameId") + "]").find(".js-show-del"), a || (s.renameGroup = $(t.target).data("name"))), $("[aria-describedby^=popover]").not(e).popover("destroy"), e.data("bs.popover") ? e.popover("destroy") : e.popover({
html: !0,
placement: function (e, t) {
return $(t).position().top < 280 ? "bottom" : "top"
},
title: "",
template: '<div class="popover popover--material" role="tooltip"><div class="popover-content"></div></div>',
trigger: "manual",
container: "body",
content: function () {
var e = '<div class="name-img-popover"><div class="name-img-popover__title">分组管理</div><div class="name-img-popover__content we7-form"><div class="form-group"><label class="control-label col-sm-3">分组名称</label><div class="col-sm-9"><div class="input-group"><input type="text" class="form-control" ng-model="renameGroup"></div></div></div></div><div class="name-img-popover__footer"><button class="btn btn-primary" ng-disabled="!renameGroup" ng-click="editGroup(\'' + (a || "") + "','" + ($(t.target).data("nameId") ? $(t.target).data("nameId") : "") + '\')">确定</button><button class="btn btn-default js-hide-popover" onclick=\'$("[aria-describedby^=popover]").popover("destroy")\'>取消</button></div></div>';
return n(e)(s)
}
}).popover("show")
}, s.editGroup = function (e, t) {
$("[aria-describedby^=popover]").popover("destroy");
var a = 1 == s.index, n = {uniacid: r.uniacid ? r.uniacid : 0, pid: 0};
e && (n.pid = t || 0);
var i = {name: s.renameGroup};
!e && t ? (i.id = t, o.changeGroup(i, a, n).then(function (e) {
m()
})) : o.addGroup(s.renameGroup, a, n).then(function (e) {
m()
})
}, s.addGroup = function (e) {
$("[aria-describedby^=popover]").popover("destroy");
var t = e, a = 1 == s.index, n = {uniacid: r.uniacid ? r.uniacid : 0};
o.addGroup(t, a, n).then(function (e) {
m()
})
}, s.showDelGroup = function (t) {
t.stopPropagation();
var e = $(t.target);
$(t.target).data("delId") && (e = $(".group[data-action-id=" + $(t.target).data("delId") + "]").find(".js-show-del")), $("[aria-describedby^=popover]").not(e).popover("destroy"), e.data("bs.popover") ? e.popover("destroy") : e.popover({
html: !0,
placement: "auto bottom",
title: "",
template: '<div class="popover popover--material" role="tooltip"><div class="popover-content"></div></div>',
trigger: "manual",
container: "body",
content: function () {
var e = '<div class="delete-img-popover"><div class="delete-img-popover__title"><i class="wi wi-info"></i>删除分组</div><div class="delete-img-popover__content">仅删除分组,不删除图片,组内图片将自动归入未分组</div><div class="delete-img-popover__footer"><button class="btn btn-primary" ng-click="delGroup(' + ($(t.target).data("delId") ? $(t.target).data("delId") : "") + ')">删除</button><button class="btn btn-default js-hide-popover" onclick=\'$("[aria-describedby^=popover]").popover("destroy")\'>取消</button></div></div>';
return n(e)(s)
}
}).popover("show")
}, s.delGroup = function (e) {
if ($("[aria-describedby^=popover]").popover("destroy"), !e) return !1;
$("#categoryEditModal").hide(), e.deleted = !0;
var t = 1 == s.index, a = {uniacid: r.uniacid ? r.uniacid : 0};
o.delGroup(e, t, a).then(function (e) {
s.loadAll(), m()
})
}, s.showAction = function (e, t) {
e.stopPropagation();
var a = $(e.target).closest(".js-show-action");
$("[aria-describedby^=popover]").not(a).popover("destroy"), a.data("bs.popover") ? a.popover("destroy") : a.popover({
html: !0,
placement: "auto bottom",
title: "",
template: '<div class="popover popover--material" role="tooltip"><div class="popover-content"></div></div>',
trigger: "manual",
container: "body",
content: function () {
var e = '<div class="action-img-popover"><div class="action-img-popover__title">更多操作</div><div class="action-img-popover__content"><div class="action" ng-click="showRename($event)" data-name="' + t.filename + '" data-name-id="' + t.id + '"><i class="wi wi-text color-default"></i>编辑名称</div><div class="action" ng-click="showMove($event)" data-move-id="' + t.id + '"><i class="wi wi-insert color-default" ></i>移动分组</div><div class="action" ng-click="showDel($event)" data-del-id="' + t.id + '"><i class="wi wi-delete2 color-red"></i>删除图片</div></div></div>';
return n(e)(s)
}
}).popover("show")
}, s.rename = "", s.showRename = function (t) {
t.stopPropagation(), s.rename = "";
var e = $(t.target);
$(t.target).data("nameId") && (e = $("[data-action-id=" + $(t.target).data("nameId") + "]").find(".js-show-del"), s.rename = $(t.target).data("name")), $("[aria-describedby^=popover]").not(e).popover("destroy"), e.data("bs.popover") ? e.popover("destroy") : e.popover({
html: !0,
placement: "auto bottom",
title: "",
template: '<div class="popover popover--material" role="tooltip"><div class="popover-content"></div></div>',
trigger: "manual",
container: "body",
content: function () {
var e = '<div class="name-img-popover"><div class="name-img-popover__title">图片管理</div><div class="name-img-popover__content we7-form"><div class="form-group"><label class="control-label col-sm-3">图片名称</label><div class="col-sm-9"><div class="input-group"><input type="text" class="form-control" ng-model="rename"></div></div></div></div><div class="name-img-popover__footer"><button class="btn btn-primary" ng-disabled="!rename" ng-click="renameImg(' + ($(t.target).data("nameId") ? $(t.target).data("nameId") : "") + ')">确定</button><button class="btn btn-default js-hide-popover" onclick=\'$("[aria-describedby^=popover]").popover("destroy")\'>取消</button></div></div>';
return n(e)(s)
}
}).popover("show")
}, s.renameImg = function (e) {
$("[aria-describedby^=popover]").popover("destroy"), o.changeName(e, s.rename, s.isLocal(), {uniacid: s.uniacid}).then(function (e) {
util.message("操作成功", "", "success"), d()
}, function (e) {
util.message(e.message)
})
}, s.showMove = function (t) {
t.stopPropagation();
var e = $(t.target);
$(t.target).data("moveId") && (e = $("[data-action-id=" + $(t.target).data("moveId") + "]").find(".js-show-del")), s.moveGroup = "", s.moveGroupSub = "", $("[aria-describedby^=popover]").not(e).popover("destroy"), e.data("bs.popover") ? e.popover("destroy") : e.popover({
html: !0,
placement: function (e, t) {
return $(t).position().top < 280 ? "bottom" : "top"
},
title: "",
template: '<div class="popover popover--material" role="tooltip"><div class="popover-content"></div></div>',
trigger: "manual",
container: "body",
content: function () {
var e = '<div class="move-img-popover"><div class="move-img-popover__title">移动分组</div><div class="move-img-popover__content we7-form"><div class="form-group"><label class="control-label col-sm-3">一级分组</label><div class="col-sm-9"><select name="" class="" ng-model="moveGroup"><option value="">未分组</option><option value="{{value.id}}" ng-repeat="(key, value) in groups">{{value.name}}</option></select></div></div><div class="form-group"><label class="control-label col-sm-3">二级分组</label><div class="col-sm-9"><select name="" class="" ng-model="moveGroupSub"><option value="">放入一级</option><option value="{{sub_value.id}}" ng-repeat="(sub_key, sub_value) in groups[moveGroup].sub_group">{{sub_value.name}}</option></select></div></div></div><div class="move-img-popover__footer"><button class="btn btn-primary" ng-click="moveToGroup(' + ($(t.target).data("moveId") ? $(t.target).data("moveId") : "") + ')">确定</button><button class="btn btn-default js-hide-popover" onclick=\'$("[aria-describedby^=popover]").popover("destroy")\'>取消</button></div></div>';
return n(e)(s)
}
}).popover("show")
}, s.$watch("moveGroup", function (e) {
s.moveGroupSub = "", setTimeout(function () {
$("select").niceSelect && $("select").niceSelect("update")
})
}), s.moveToGroup = function (e, t) {
$("[aria-describedby^=popover]").popover("destroy");
var a = 1 == s.index;
if (e) n = [e]; else var n = l();
if (t = t || (s.moveGroupSub ? s.moveGroupSub : s.moveGroup), 0 != n.length) {
var i = {uniacid: r.uniacid ? r.uniacid : 0};
o.moveToGroup(n, t, a, i).then(function (e) {
util.message("移动成功", "", "success"), p(t)
})
} else util.message("请选择图片后移动")
}, s.showDel = function (t) {
t.stopPropagation();
var e = $(t.target);
$(t.target).data("delId") && (e = $("[data-action-id=" + $(t.target).data("delId") + "]").find(".js-show-del")), $("[aria-describedby^=popover]").not(e).popover("destroy"), e.data("bs.popover") ? e.popover("destroy") : e.popover({
html: !0,
placement: "auto bottom",
title: "",
template: '<div class="popover popover--material" role="tooltip"><div class="popover-content"></div></div>',
trigger: "manual",
container: "body",
content: function () {
var e = '<div class="delete-img-popover"><div class="delete-img-popover__title"><i class="wi wi-info"></i>删除图片</div><div class="delete-img-popover__content">删除不可恢复确认删除吗?</div><div class="delete-img-popover__footer"><button class="btn btn-primary" ng-click="delSel(' + ($(t.target).data("delId") ? $(t.target).data("delId") : "") + ')">删除</button><button class="btn btn-default js-hide-popover" onclick=\'$("[aria-describedby^=popover]").popover("destroy")\'>取消</button></div></div>';
return n(e)(s)
}
}).popover("show")
}, s.delSel = function (e) {
if ($("[aria-describedby^=popover]").popover("destroy"), e) t = [e]; else {
var t = l();
if (0 == t.length) return void util.message("请选择要删除的图片");
if (1 < t.length && !s.isLocal()) return void util.message("微信图片只支持单张删除")
}
s.isLocal() ? o.delMuti(t, "image", s.isLocal(), {uniacid: s.uniacid}).then(function (e) {
util.message("删除成功", "", "success"), d()
}, function (e) {
util.message(e.message)
}) : o.delItem(t[0], "image", s.isLocal(), s.uniacid).then(function (e) {
util.message("删除成功", "", "success"), d()
}, function (e) {
util.message(e.message)
})
}, s.delItem = function (e, t) {
t.stopPropagation(), util.confirm(function () {
s.isLocal() ? o.delMuti(e.id, "image", s.isLocal(), {uniacid: s.uniacid}).then(function (e) {
util.message("删除成功", "", "success"), d()
}, function (e) {
util.message(e.message)
}) : o.delItem(e.id, s.resourceType, 1 == s.index, s.uniacid).then(function () {
s.loadData()
}, function (e) {
util.message(e.message)
})
}, function () {
return !1
}, "删除不可恢复确认删除吗?")
}, s.selectedAll = function (e) {
for (var t = 0; t < s.images.length; t++) s.images[t].selected = e
}, s.loadAll = function () {
s.setCurrentPage(1), p(-1)
}, s.loadNoGroup = function () {
s.setCurrentPage(1), p(0)
}, s.loadImages = function (e) {
s.setCurrentPage(1), p(e.id)
}, s.doEditGroup = function (e) {
e.editable = !e.editable, s.loadImages(e)
}, s.editing = function (e) {
e.editing = !0
}, s.edited = function (e) {
e.editing = !1, e.editable = !1, s.editGroup(e)
}, s.cancelEditing = function (e) {
e.editing = !1, e.editable = !1
}, s.doAddGroup = function () {
s.addGroup("未命名")
}, d()
}]), angular.module("we7resource").directive("we7ResourceKeywordDialog", function () {
return {
scope: {}, restrict: "EA", templateUrl: "directive-keyword-keyword.html", link: function (a, e, t, n, i) {
e.bind("click", "pagination li a", function (e) {
var t = $(e.target).attr("page");
t && a.$broadcast("keyword_page_change", t)
})
}
}
}), angular.module("we7resource").controller("we7resource-keyword-controller", ["$scope", "$sce", "serviceResource", function (a, t, e) {
a.keyword = "", a.currentId = "", a.currentPage = 1, a.itemClick = function (e) {
e.selected = !0, $(window).trigger("resource_selected", {type: "keyword", items: [e]})
}, a.$on("keyword_page_change", function (e, t) {
a.setCurrentPage(t)
}), a.setCurrentPage = function (e) {
a.currentPage !== e && (a.currentPage = e, n())
}, a.search = function () {
a.currentPage = 1, n()
};
var n = function () {
e.getResources("keyword", a.currentPage, !0, {keyword: a.keyword}).then(function (e) {
a.keywords = e.items, a.pager = t.trustAsHtml(e.pager)
})
};
n()
}]), angular.module("we7resource").directive("we7ResourceModuleDialog", ["$http", function (e) {
return {
scope: {}, restrict: "EA", templateUrl: "directive-module-module.html", link: function (a, e, t, n, i) {
e.bind("click", "pagination li a", function (e) {
var t = $(e.target).attr("page");
t && a.$broadcast("module_page_change", t)
})
}
}
}]), angular.module("we7resource").controller("we7resource-module-controller", ["$scope", "$sce", "serviceResource", "config", function (n, t, e, a) {
n.multiple = a.multiple, n.keyword = "";
var i = 0, s = a.others, o = "", r = !1;
function l() {
e.getResources("module", n.currentPage, !0, {
keyword: n.keyword,
user_module: i,
uid: s.uid,
module_uniacid: s.module_uniacid,
mtype: o,
cover: r
}).then(function (e) {
n.modules = e.items, n.pager = t.trustAsHtml(e.pager)
})
}
s && s.user_module && (i = 1), s && s.mtype && (o = s.mtype), s && s.cover && (r = s.cover), n.itemClick = function (e) {
if (n.multiple) {
if (e.selected) return void (e.selected = !1);
e.selected = !0
} else e.selected = !0, $(window).trigger("resource_selected", {type: "module", items: [e]})
}, n.$on("module_page_change", function (e, t) {
n.setCurrentPage(t)
}), n.setCurrentPage = function (e) {
n.currentPage != e && (n.currentPage = e, l())
}, n.search = function () {
l()
}, n.ok = function () {
var a = [];
angular.forEach(n.modules, function (e, t) {
e.selected && a.push(e)
}), 0 < a.length ? function (e) {
$(window).trigger("resource_selected", {type: "module", items: e})
}(a) : $(window).trigger("resource_canceled")
}, l()
}]), angular.module("we7resource").directive("we7ResourceMusicDialog", function () {
return {scope: {}, restrict: "EA", replace: !1, templateUrl: "directive-music-music.html"}
}), angular.module("we7resource").controller("we7resource-music-controller", ["$scope", "$sce", "serviceResource", "config", function (a, e, t, n) {
a.needType = n.needType, a.multiple = n.multiple, a.showMusicForm = !0, a.musicurl = "", a.selectVoice = function () {
a.showMusicForm = !1
};
a.$on("selected_voice", function (e, t) {
t, a.musicurl = t.attachment, a.showMusicForm = !0
}), a.$on("add_music", function (e, t) {
$(window).trigger("resource_selected", {type: "music", items: [t]})
})
}]), angular.module("we7resource").directive("we7ResourceNewsDialog", function () {
return {
scope: {}, restrict: "EA", templateUrl: "directive-news-news.html", link: function (a, e, t, n, i) {
e.bind("click", "pagination li a", function (e) {
var t = $(e.target).attr("page");
t && a.$broadcast("news_page_change", t)
})
}
}
}), angular.module("we7resource").controller("we7resource-news-controller", ["$scope", "$sce", "serviceResource", "$controller", function (a, t, e, n) {
function i() {
e.getResources("news", a.currentPage, 1 == a.index, {keyword: a.keyword}).then(function (e) {
a.news = e.items, a.pager = t.trustAsHtml(e.pager)
})
}
a.resourceType = "news", n("we7resource-base-controller", {$scope: a}), a.keyword = "", a.canConvert = function (e) {
return !e || !e.items || "" != e.items[0].author || "" != e.items[0].content
}, a.timeToDate = function (e) {
return new Date(1e3 * e)
}, a.$on("news_page_change", function (e, t) {
a.setCurrentPage(t)
}), a.loadData = function () {
i()
}, a.search = function () {
a.currentPage = 1, i()
}, i()
}]), angular.module("we7resource").directive("we7ResourceVideoDialog", function () {
return {
scope: {}, restrict: "EA", templateUrl: "directive-video-video.html", link: function (a, e, t, n, i) {
e.bind("click", "pagination li a", function (e) {
var t = $(e.target).attr("page");
t && a.$broadcast("video_page_change", t)
})
}
}
}), angular.module("we7resource").controller("we7resource-video-controller", ["$scope", "$sce", "serviceResource", "config", "$controller", function (a, t, e, n, i) {
function s() {
e.getResources("video", a.currentPage, 1 == a.index, {uniacid: a.uniacid, global: a.global}).then(function (e) {
a.videos = e.items, a.pager = t.trustAsHtml(e.pager)
})
}
a.resourceType = "video", i("we7resource-base-controller", {$scope: a}), a.accept = "video/rm, video/rmvb, video/wmv, video/avi, video/mpg, video/mpeg, video/mp4", a.uploadname = "上传视频", a.multiupload = !1, a.onIndexChange = function (e) {
s(), r()
}, r(), a.showNetWork = function () {
return a.netWorkVideo
}, a.loadData = function () {
s()
}, a.sceurl = function () {
return t.trustAsResourceUrl(a.netWorkurl)
}, a.canConvert = function (e) {
return !1
}, a.$on("video_page_change", function (e, t) {
a.setCurrentPage(t)
}), a.getTitle = function (e) {
return e.tag && e.tag.title ? e.tag.title : e.filename
}, a.fetchNetwork = function () {
var e = {
url: function (e) {
if (/^<iframe/.test(e)) {
var t = "";
/src=\"[^\s"]+/i.test(e) && (t = e.match(/src=\"[^\s"]+/i)[0].substr(5)), e = /http:\/\/|https:\/\//gi.test(t) ? t : "http://" + t
}
return e
}(a.netWorkurl), isRemote: !0
};
o("video", [e])
}, a.timeToDate = function (e) {
return new Date(1e3 * e)
};
var o = function (e, t) {
$(window).trigger("resource_selected", {type: "video", items: t})
};
function r() {
a.uploadurl = 0 === a.index ? "./index.php?c=utility&a=file&do=wechat_upload&upload_type=video&mode=perm&uniacid=" + a.uniacid : "./index.php?c=utility&a=file&do=upload&upload_type=video&global=" + a.global + "&dest_dir=" + a.dest_dir + "&uniacid=" + a.uniacid
}
s()
}]), angular.module("we7resource").directive("we7ResourceVoiceDialog", function () {
return {
scope: {}, restrict: "EA", templateUrl: "directive-voice-voice.html", link: function (a, e, t, n, i) {
e.bind("click", "pagination li a", function (e) {
var t = $(e.target).attr("page");
t && a.$broadcast("voice_page_change", t)
})
}
}
}), angular.module("we7resource").controller("we7resource-voice-controller", ["$scope", function (e) {
e.$on("selected_voice", function (e, t) {
t && !t.url && (t.url = t.attachment), $(window).trigger("resource_selected", {type: "voice", items: [t]})
})
}]), angular.module("we7resource").service("serviceResource", ["$rootScope", "$http", "$q", function (e, l, c) {
var t = {};
function s(e, t, a, n) {
var i = c.defer(), s = i.promise,
o = "./index.php?c=utility&a=file&do=" + e + "&page=" + t + "&local=" + (a ? "local" : "wx") + r(n);
return l.get(o).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if ("0" == t.errno) {
t.message.items;
i.resolve(t.message)
}
}
i.resolve([])
}, function (e) {
i.reject(e)
}), s
}
function r(e) {
var a = "";
return angular.forEach(e, function (e, t) {
a += "&" + t + "=" + e
}), a
}
return t.getResources = function (e, t, a, n) {
var i = null;
switch (e) {
case"keyword":
i = function (e, t) {
return s("keyword", e, !0, t)
}(t, n);
break;
case"module":
i = function (e, t) {
return s("module", e, !0, t)
}(t, n);
break;
case"video":
i = s("video", t, a, n);
break;
case"news":
i = s("news", t, a, n);
break;
case"voice":
i = s("voice", t, a, n);
break;
case"image":
i = s("image", t, a, n)
}
return i
}, t.imageGroup = function (e, t) {
var a = c.defer(), n = a.promise,
i = "./index.php?c=utility&a=file&do=group_list&local=" + (e ? "local" : "wx") + r(t);
return l.get(i).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if ("0" == t.errno) return void a.resolve(t.message);
a.reject({state: !1, message: t.message})
}
}), n
}, t.addGroup = function (e, t, a) {
var n = c.defer(), i = n.promise,
s = "./index.php?c=utility&a=file&do=add_group&local=" + (t ? "local" : "wx") + r(a);
return l.post(s, {name: e}).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if ("0" == t.errno) return void n.resolve(t.message);
n.reject({state: !1, message: t.message})
}
n.reject({state: !1, message: "添加失败"})
}, function (e) {
n.reject({state: !1, message: "添加失败"})
}), i
}, t.changeGroup = function (e, t, a) {
var n = c.defer(), i = n.promise,
s = "./index.php?c=utility&a=file&do=change_group&local=" + (t ? "local" : "wx") + r(a);
return l.post(s, {name: e.name, id: e.id}).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if ("0" == t.errno) return void n.resolve(t.message);
n.reject({state: !1, message: t.message})
}
n.reject({state: !1, message: "更新失败"})
}, function (e) {
n.reject({state: !1, message: "更新失败"})
}), i
}, t.delGroup = function (e, t, a) {
var n = c.defer(), i = n.promise,
s = "./index.php?c=utility&a=file&do=del_group&local=" + (t ? "local" : "wx") + r(a);
return l.post(s, {group_id: e}).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if ("0" == t.errno) return void n.resolve(t.message);
n.reject({state: !1, message: t.message})
}
n.reject({state: !1, message: "删除失败"})
}, function (e) {
n.reject({state: !1, message: "删除失败"})
}), i
}, t.moveToGroup = function (e, t, a, n) {
var i = c.defer(), s = i.promise,
o = "./index.php?c=utility&a=file&do=move_to_group&local=" + (a ? "local" : "wx") + r(n);
return l.post(o, {group_id: t, id: e}).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if ("0" == t.errno) return void i.resolve(t.message);
i.reject({state: !1, message: t.message})
}
i.reject({state: !1, message: "移动成功"})
}, function (e) {
i.reject({state: !1, message: "移动失败"})
}), s
}, t.delMuti = function (e, t, a, n) {
var i = c.defer(), s = i.promise,
o = "./index.php?c=utility&a=file&do=delete&local=" + (a ? "local" : "wx") + r(n);
return l.post(o, {id: e, type: t}).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if ("0" == t.errno) return void i.resolve(!0);
i.reject({state: !1, message: t.message})
}
i.reject({state: !1, message: "删除失败"})
}, function (e) {
i.reject({state: !1, message: "删除失败"})
}), s
}, t.changeName = function (e, t, a, n) {
var i = c.defer(), s = i.promise,
o = "./index.php?c=utility&a=file&do=change_name&local=" + (a ? "local" : "wx") + r(n);
return l.post(o, {id: e, new_filename: t}).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if ("0" == t.errno) return void i.resolve(!0);
i.reject({state: !1, message: t.message})
}
i.reject({state: !1, message: "删除失败"})
}, function (e) {
i.reject({state: !1, message: "删除失败"})
}), s
}, t.delItem = function (e, t, a, n) {
var i = c.defer(), s = i.promise, o = a ? "local" : "wechat",
r = "./index.php?c=utility&a=file&do=video_del&uniacid=" + n;
return l.post(r, {material_id: e, type: t, server: o}).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if ("0" == t.errno) return void i.resolve(!0);
i.reject({state: !1, message: t.message || t})
}
i.reject({state: !1, message: "删除失败"})
}, function (e) {
i.reject({state: !1, message: "删除失败"})
}), s
}, t.convert = function (e, t, a) {
var n = c.defer(), i = n.promise,
s = "./index.php?c=utility&a=file&do=" + (a ? "tolocal" : "towechat") + "&type=" + t + "&resource_id=" + e;
return l.get(s).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if (0 == t.errno) {
var a = t.message;
n.resolve(a)
}
1 == t.errno && n.reject(t.message)
}
n.resolve(null)
}, function (e) {
n.reject(e)
}), i
}, t.netWorkconvert = function (e, t, a) {
var n = c.defer(), i = n.promise,
s = "./index.php?c=utility&a=file&do=" + (t ? "networktolocal" : "networktowechat") + "&url=" + encodeURIComponent(e) + "&type=" + a;
return l.get(s).then(function (e) {
if (200 == e.status) {
var t = e.data.message;
if (0 == t.errno) {
var a = t.message;
n.resolve(a)
}
1 == t.errno && n.reject(t.message)
}
n.resolve(null)
}, function (e) {
n.reject(e)
}), i
}, t
}]), we7ResourceMusicFormController.$inject = ["$scope"], angular.module("we7resource").component("we7ResourceMusicform", {
templateUrl: "widget-musicform-musicform.html",
bindToController: !0,
controller: we7ResourceMusicFormController,
bindings: {doselect: "&", musicurl: "<"}
}), UploadController.$inject = ["$scope", "$sce", "uiUploader", "$timeout"], angular.module("we7resource").component("we7UploaderBtn", {
templateUrl: "widget-upload-upload.html",
controller: UploadController,
transclude: !0,
replace: !0,
bindings: {
name: "<",
uploadUrl: "<",
accept: "<",
onUploadStart: "&",
onUploading: "&",
onUploaded: "&",
onUploadError: "&",
onProgress: "&",
multiple: "<"
}
}), uiUploader.$inject = ["$log", "$q"], angular.module("we7resource").service("uiUploader", ["$log", "$q", uiUploader]), VoiceController.$inject = ["$scope", "$sce", "serviceResource", "$controller"], angular.module("we7resource").component("we7ResourceVoice", {
templateUrl: "widget-voice-voice.html",
controller: VoiceController,
transclude: !0,
bindings: {isWechat: "<", showType: "<"}
}), angular.module("wesiteApp", ["we7app"]), angular.module("wesiteApp").controller("WesiteDisplay", ["$scope", "$http", "serviceCommon", "config", function (n, i, a, e) {
n.default_site = e.default_site, n.multis = e.multis, n.links = e.links, angular.forEach(n.multis, function (e, t) {
e.copyLink = n.links.appHome + "t=" + e.id
}), n.preview = function (e) {
e = parseInt(e);
var t = util.dialog("预览模板", '<iframe width="320px" scrolling="yes" height="480px" frameborder="0" src="about:blank"></iframe>', '<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>'),
a = n.links.appHome + "&t=" + e;
t.find("iframe").attr("src", a), t.find(".modal-dialog").css({width: "322px"}), t.find(".modal-body").css({
padding: "0",
height: "480px"
}), t.modal("show")
}, n.switchOn = function (e, t) {
var a = _.indexOf(n.multis, e);
t = parseInt(t);
-1 < a && i.post(n.links.switch, {id: t}).success(function (e) {
0 == e.message.errno && (n.multis[a].status = 1 == n.multis[a].status ? "0" : "1", util.message("修改成功!", "", "success"))
})
}, n.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>');
a.copySuccess(e, t)
}, n.deleteMulti = function (e, t) {
e = e + "&id=" + t;
util.confirm(function () {
window.location.href = e
}, function () {
return !1
}, "确认删除吗?")
}
}]), angular.module("wesiteApp").controller("WesitePost", ["$scope", "config", "$http", "serviceCommon", "serviceHomeMenuBase", "serviceQuickMenuBase", "serviceQuickMenuSubmit", function (i, e, s, a, n, o, t) {
i.links = e.links, i.attachurl = e.attachurl, i.default_site = e.default_site, i.temtypes = e.temtypes, i.temtype = {
name: "all",
title: "全部"
}, i.searchedStyleName = "", i.multi = e.multi, i.styles = e.styles, i.siteEntrance = i.links.murl + "t=" + i.multi.id, i.slideLists = [], i.showSlideSubmit = !1, i.addHomemenuStatus = !1, i.homeMenu = [], i.sections = n.initSections(), i.menuInfo = n.initHomemenuInfo(), i.activeItem = {}, i.modules = {}, i.quickMenuStatus = !0, i.hasIgnoreModules = 0, i.submit = {}, i.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;z-index:10;width:90px;height:34px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>');
a.copySuccess(e, t)
}, i.selectStyle = function (e) {
i.multi.style = e
}, i.searchStyle = function () {
s.post(i.links.searchStyleLink, {name: i.searchedStyleName}).success(function (e) {
0 == e.message.errno && (i.styles = e.message.message)
})
}, i.changeMultiStatus = function () {
i.multi.status = 1 == i.multi.status ? 0 : 1
}, i.uploadMultiImage = function () {
require(["fileUploader"], function (e) {
e.init(function (e) {
i.multi.site_info.thumb = e.url, i.$apply(i.multi.site_info)
}, {direct: !0, multiple: !1})
})
}, i.delMultiImage = function () {
i.multi.site_info.thumb = ""
}, i.loadSlideInfo = function () {
s.post(i.links.slideDisplay, {multiid: e.multiid}).success(function (e) {
0 == e.message.errno && (i.slideLists = e.message.message, _.isEmpty(i.slideLists) || (i.showSlideSubmit = !0))
})
}, i.addSlide = function () {
i.slideLists.push({title: "", displayorder: 0, thumb: "", url: ""}), i.showSlideSubmit = !0
}, i.delSlide = function (e) {
var t = _.indexOf(i.slideLists, e);
-1 < t && (i.slideLists = _.without(i.slideLists, i.slideLists[t])), _.isEmpty(i.slideLists) && (i.showSlideSubmit = !1)
}, i.uploadSlideImage = function (e) {
var t = _.indexOf(i.slideLists, e);
-1 < t ? require(["fileUploader"], function (e) {
e.init(function (e) {
i.slideLists[t].thumb = e.url, i.$apply(i.slideLists)
}, {direct: !0, multiple: !1})
}) : util.message("参数错误,请刷新页面重试!")
}, i.delSlideImage = function (e) {
var t = _.indexOf(i.slideLists, e);
-1 < t && (i.slideLists[t].thumb = "")
}, i.saveSlide = function () {
s.post(i.links.slidePost, {slide: i.slideLists, multiid: e.multiid}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, "", "success") : util.message(e.message.message)
})
}, i.loadHomemenuInfo = function () {
s.post(i.links.homeMenuDisplay, {multiid: e.multiid}, {cache: !1}).success(function (e) {
0 == e.message.errno && (i.homeMenu = e.message.message, i.addHomemenuStatus = !1)
})
}, i.changeHomemenuStatus = function (e) {
if (i.addHomemenuStatus = !i.addHomemenuStatus, _.isEmpty(e)) i.menuInfo = n.initHomemenuInfo(); else {
i.menuInfo = e;
var t = parseInt(i.menuInfo.section);
t = t <= 10 && 0 <= t ? t : 0, i.menuInfo.section = i.sections[t], _.isEmpty(i.menuInfo.icon) ? i.menuInfo.icontype = 1 : i.menuInfo.icontype = 2
}
}, i.updateMenu = function (t, e) {
var a = parseInt(t.id), n = _.indexOf(i.homeMenu, t);
if (-1 < n) switch (e) {
case"del":
s.post(i.links.homeMenuDel, {id: a}).success(function (e) {
0 == e.message.errno ? (util.message("删除成功!", "", "success"), i.homeMenu = _.without(i.homeMenu, t)) : (-1 == e.message.errno && util.message("本公众号不存在该导航!"), 1 == e.message.errno && util.message("删除失败,请稍候重试。"))
});
break;
case"switch":
s.post(i.links.homeMenuSwith, {id: a}).success(function (e) {
0 == e.message.errno ? i.homeMenu[n].status = !i.homeMenu[n].status : (-1 == e.message.errno && util.message("本公众号不存在该导航!"), 1 == e.message.errno && util.message("更新失败,请稍候重试。"))
})
}
}, i.uploadHomemenuImage = function (e) {
require(["fileUploader"], function (e) {
e.init(function (e) {
i.menuInfo.icon = e.attachment, i.$apply(i.menuInfo)
}, {direct: !0, multiple: !1})
})
}, i.delHomemenuImage = function (e) {
i.menuInfo.icon = ""
}, i.selectHomemenuIcon = function () {
util.iconBrowser(function (e) {
i.menuInfo.css.icon.icon = e, i.$apply(i.menuInfo.css)
})
}, i.saveMenu = function () {
s.post(i.links.homeMenuPost, {menu_info: i.menuInfo, multiid: e.multiid}).success(function (e) {
0 == e.message.errno ? (util.message("导航菜单保存成功!", "", "success"), i.loadHomemenuInfo()) : (1 == e.message.errno && util.message("保存失败!"), -1 == e.message.errno && util.message("抱歉,请输入导航菜单的名称!"))
})
}, i.successMenu = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;z-index:10;width:80px;margin-left:10px"><i class="fa fa-check-circle"></i> 复制成功</span>');
a.copySuccess(e, t)
}, i.quickMenuSwitch = function () {
i.quickMenuStatus = !i.quickMenuStatus
}, i.loadQuickmenuInfo = function () {
s.post(i.links.quickMenuDisplay, {multiid: e.multiid}).success(function (e) {
0 == e.message.errno ? (i.activeItem = e.message.message.params, i.activeItem ? i.activeItem.position ? (i.activeItem.position.homepage = !!i.activeItem.position.homepage, i.activeItem.position.page = !!i.activeItem.position.page, i.activeItem.position.article = !!i.activeItem.position.article) : i.activeItem.position = {
homepage: !1,
page: !1,
article: !1
} : i.activeItem = {
position: {
homepage: !1,
page: !1,
article: !1
}
}, o.initActiveItem(i.activeItem), i.modules = e.message.message.modules, i.quickMenuStatus = e.message.message.status, i.hasIgnoreModules = _.size(i.activeItem.ignoreModules)) : util.message("请求错误:微站不存在,请按“Ctrl+F5”刷新重试!")
})
}, i.saveQucikMenu = function () {
i.submit = t.submit(), s.post(i.links.quickMenuPost, {
multiid: e.multiid,
postdata: i.submit,
status: i.quickMenuStatus ? 1 : 0
}).success(function (e) {
0 == e.message.errno ? util.message("保存成功。您可点击“预览刷新”查看效果!", "", "success") : util.message(e.message.message)
})
}, i.showSearchModules = function () {
i.moduleDialog = $("#shop-modules-modal").modal(), $("#shop-modules-modal .modal-body .btn-primary").html("取消"), $("#shop-modules-modal").find(".modal-footer .btn-primary").unbind("click").click(function () {
i.activeItem.ignoreModules = {}, $("#shop-modules-modal .modal-body .btn-primary").each(function () {
i.hasIgnoreModules = !0, i.activeItem.ignoreModules[$(this).attr("js-name")] = {
name: $(this).attr("js-name"),
title: $(this).attr("js-title")
}
}), i.$apply("activeItem"), i.$apply("hasIgnoreModules"), o.setQuickMenuData("ignoreModules", i.activeItem.ignoreModules)
})
}, i.selectNavStyle = function () {
var e = $('#shop-nav-modal .alert input[type="radio"]:checked').val();
i.activeItem.navStyle = o.selectNavStyle(e)
}, i.addMenu = function () {
i.activeItem.menus = o.addMenu()
}, i.addSubMenu = function (e) {
var t = _.findIndex(i.activeItem.menus, e);
i.activeItem.menus[t].submenus = o.addSubMenu(e)
}, i.removeMenu = function (e) {
i.activeItem.menus = o.removeMenu(e)
}, i.removeSubMenu = function (e, t) {
o.removeSubMenu(e, t), i.activeItem.menus[e].submenus = _.without(i.activeItem.menus[e].submenus, t)
}
}]), angular.module("wesiteApp").controller("WesiteTplDidplay", ["$scope", "config", function (i, e) {
i.stylesResult = e.stylesResult, i.temtypes = e.temtypes, i.type = e.type, i.setting = e.setting, i.links = e.links, i.preview = function (n) {
n = parseInt(n);
var e = '\t\t\t<a href="' + i.links.default + "&styleid=" + n + '" class="btn btn-primary">设为默认模板</a>\t\t\t<a href="' + i.links.designer + "&styleid=" + n + '" class="btn btn-primary">设计风格</a>\t\t\t<button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>',
t = util.dialog("预览模板", '<iframe width="320" scrolling="yes" height="480" frameborder="0" src="about:blank"></iframe>', e);
t.find("iframe").on("load", function () {
$("a", this.contentWindow.document.body).each(function () {
var e = $(this).attr("href");
if (e && "#" != e[0]) {
var t = e.split(/#/g), a = t[0];
"&" != a.slice(-1) && (a += "&"), -1 != a.indexOf("?") && (a += "s=" + n), t[1] && (a += "#" + t[1]), "javascript" != a.substr(0, 10) && -1 != a.indexOf("?") || (a = a.substr(0, a.lastIndexOf("&"))), $(this).attr("href", a)
}
})
});
var a = i.links.home + "&s=" + n;
t.find("iframe").attr("src", a), t.find(".modal-dialog").css({width: "322px"}), t.find(".modal-body").css({
padding: "0",
height: "480px"
}), t.modal("show")
}, i.selectDefault = function (e) {
var t = parseInt(e);
location.href = i.links.default + "&styleid=" + t
}, i.deleteStyle = function (e, t) {
util.confirm(function () {
window.location.href = e + "&styleid=" + t
}, function () {
return !1
}, "确认删除吗?")
}
}]), angular.module("wesiteApp").controller("WesiteTplPost", ["$scope", "config", function (a, e) {
a.style = e.style, a.styles = e.styles ? e.styles : {}, a.template = e.template, a.systemtags = e.systemtags, a.customStyles = [], angular.forEach(a.styles, function (e, t) {
-1 == _.indexOf(a.systemtags, e.variable) && a.customStyles.push(e)
}), a.addCustomAttribute = function () {
$("#customForm").append($("#item-form-html").html())
}, a.delCustomArrtibute = function (e) {
$(e.target).parent().parent().remove()
}, a.uploadImage = function () {
require(["fileUploader"], function (e) {
e.init(function (e) {
a.styles.indexbgimg = {content: e.url}, a.$apply(a.styles.indexbgimg.content)
}, {direct: !0, multiple: !1})
})
}, a.delImage = function () {
a.styles.indexbgimg = ""
}, a.checkSubmit = function (e) {
for (var t = $(':text[name="custom[name][]"]'), a = $(':text[name="custom[desc][]"]'), n = $(':text[name="custom[value][]"]'), i = 0; i < t.length; i++) if (_.isEmpty(t[i].value)) return util.message("自定义属性变量名不可为空!"), !1;
for (var s = 0; s < a.length; s++) if (_.isEmpty(a[s].value)) return util.message("自定义属性变量描述不可为空!"), !1;
for (var o = 0; o < n.length; o++) if (_.isEmpty(n[o].value)) return util.message("自定义属性变量值不可为空!"), !1;
$("#submit-post").click()
}
}]), angular.module("wesiteApp").controller("wesiteArticleDisplay", ["$scope", "config", "serviceCommon", "$http", function (s, o, a, e) {
s.category = o.category, s.articleList = o.articleList, s.commentListLink = o.commentListLink, s.articleComment = o.articleComment, s.setting = o.setting, s.commentLink = o.commentLink, angular.forEach(s.articleList, function (e, t) {
if (0 != e.pcate) {
var a = parseInt(e.pcate);
if (0 != e.ccate) {
var n = parseInt(e.ccate);
angular.isDefined(s.category[a]) && angular.isDefined(s.category[n]) && (e.title = "【" + s.category[a].name + "】-【" + s.category[n].name + "】" + e.title)
} else angular.isDefined(s.category[a]) && (e.title = "【" + s.category[a].name + "】" + e.title)
} else if (0 != e.ccate) {
n = parseInt(e.ccate);
angular.isDefined(s.category[n]) && (e.title = "【" + s.category[n].name + "】" + e.title)
}
e.link = o.copyCommonLink + e.id;
var i = s.articleComment;
e.count = i && i[e.id] ? s.articleComment[e.id].count : 0, s.articleList[t] = e
}), s.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>');
a.copySuccess(e, t)
}, s.editArticle = function (e) {
e = parseInt(e);
location.href = "./index.php?c=site&a=article&do=post&id=" + e
}, s.delArticle = function (e) {
e = parseInt(e);
util.confirm(function () {
window.location.href = "./index.php?c=site&a=article&do=del&id=" + e
}, function () {
}, "确认删除吗?")
}, s.comment = function () {
e.post(s.commentLink, {}).success(function (e) {
0 == e.message.errno ? (s.setting.comment_status = e.message.message, util.message("设置成功", "", "success")) : util.message(e.message.message, e.direct)
})
}
}]), angular.module("wesiteApp").controller("WesiteArticlePost", ["$scope", "config", function (t, e) {
t.item = e.item, t.keywords = e.keywords, t.id = e.id, t.template = e.template, t.uploadImage = function () {
require(["fileUploader"], function (e) {
e.init(function (e) {
t.item.thumb = e.url, t.$apply(t.item)
}, {direct: !0, multiple: !1})
})
}, t.delImage = function () {
t.item.thumb = ""
}
}]), angular.module("wesiteApp").controller("WesiteCategoryPost", ["$scope", "config", function (i, e) {
i.id = e.id, i.category = e.category, i.parent = e.parent, i.parentid = e.parentid, i.multis = e.multis, i.site_template = e.site_template, i.styles = e.styles, angular.isUndefined(i.category.enabled) ? i.enabled = !0 : i.id && 1 == i.category.enabled ? i.enabled = !0 : i.enabled = !1, angular.isUndefined(i.category.icontype) || 0 == i.category.icontype || 1 == i.category.icontype ? i.icontype = !0 : i.icontype = !1, i.selectIcon = function () {
util.iconBrowser(function (e) {
i.category.css.icon.icon = e, i.$apply(i.category.css)
})
}, i.showWesite = function () {
$(".js-site-selector").show()
}, i.hideWesite = function () {
$(".js-site-selector").hide()
}, i.changeStyle = function (e) {
var t = parseInt(e), a = $(".title-" + t).text(), n = $(".preview-" + t).attr("src");
$(".item-style").removeClass("active"), i.category.styleid = t, $("#current-title").text(a), $("#current-preview").attr("src", n), $(".title-" + t).parent().parent().addClass("active"), $("#ListStyle").modal("hide"), i.$apply(i.category.styleid)
}, i.uploadImage = function () {
require(["fileUploader"], function (e) {
e.init(function (e) {
i.category.icon = e.url, i.$apply(i.category.icon)
}, {direct: !0, multiple: !1})
})
}, i.delImage = function () {
i.category.icon = ""
}
}]), angular.module("wesiteApp").controller("articleComment", ["$scope", "config", "$http", function (a, e, n) {
a.articleId = e.articleId, a.order_sort = e.order_sort, a.is_comment = e.is_comment, a.articleList = e.articleList, a.links = e.links, a.content = "", a.replyarticle = function (e) {
e.replying = !0
}, a.cancel = function (e) {
e.replying = !1
}, a.send = function (t) {
var e = t.id;
n.post(a.links.reply, {articleid: a.articleId, parentid: e, content: t.replycontent}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
t.son_comment.push(e.message.message), t.replying = !1, t.replycontent = ""
})
}, a.changeSort = function () {
n.post(a.links.display, {order: a.order_sort, id: a.articleId}).success(function (e) {
a.articleList = e.message.message
})
}, a.changeComment = function () {
n.post(a.links.display, {iscommend: a.is_comment, id: a.articleId}).success(function (e) {
a.articleList = e.message.message
})
}
}]), angular.module("wesiteApp").service("serviceCommon", ["$rootScope", function (e) {
var t = {
copySuccess: function (e, t) {
e = parseInt(e), t = t;
var a = $("#copy-" + e).next().html();
(!a || a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>') < 0) && $("#copy-" + e).after(t), setTimeout(function () {
t.remove()
}, 2e3)
}
};
return t
}]), angular.module("wesiteApp").service("serviceHomeMenuBase", ["$rootScope", function (e) {
var t = {
initHomemenuInfo: function () {
return {
css: {icon: {width: "", color: "", icon: ""}},
name: "",
description: "",
url: "",
status: 1,
displayorder: 0,
icon: "",
icontype: 1,
section: 0
}
}, initSections: function () {
return [{num: 0, val: "不设置位置"}, {num: 1, val: "位置1"}, {num: 2, val: "位置2"}, {num: 3, val: "位置3"}, {
num: 4,
val: "位置4"
}, {num: 5, val: "位置5"}, {num: 6, val: "位置6"}, {num: 7, val: "位置7"}, {num: 8, val: "位置8"}, {
num: 9,
val: "位置9"
}, {num: 10, val: "位置10"}]
}
};
return t
}]), angular.module("wesiteApp").service("serviceQuickMenuBase", ["$rootScope", function (e) {
var t = {}, n = {};
return t.initActiveItem = function (e) {
return n = angular.isObject(e) ? e : {
navStyle: 1,
bgColor: "#2B2D30",
menus: [],
extend: [],
position: {homepage: !0, usercenter: !0, page: !0, article: !0},
ignoreModules: {}
}
}, t.selectNavStyle = function (e) {
return n.navStyle = e, n.navStyle
}, t.addMenu = function () {
return void 0 === n.menus && (n.menus = []), n.menus.push({
title: "标题",
url: "",
submenus: [],
icon: {name: "fa-home", color: "#00ffff"},
image: "",
hoverimage: "",
hovericon: ""
}), n.menus
}, t.removeMenu = function (e) {
var t = $.inArray(e, n.menus), a = angular.copy(n.menus);
for (i in n.menus = [], a) i != t && n.menus.push(a[i]);
return n.menus
}, t.addSubMenu = function (e) {
var t = _.findIndex(n.menus, e);
return void 0 === n.menus[t].submenus ? n.menus[t].submenus = [{
title: "标题",
url: ""
}] : n.menus[t].submenus.push({title: "标题", url: ""}), n.menus[t].submenus
}, t.removeSubMenu = function (e, t) {
return n.menus[e].submenus = _.without(n.menus[e].submenus, t), n.menus[e].submenus
}, t.getQuickMenuData = function (e) {
return angular.isString(e) ? n[e] : n
}, t.setQuickMenuData = function (e, t) {
angular.isObject(e) ? angular.forEach(e, function (e, t) {
n[t] = e
}) : n[e] = t
}, t
}]), angular.module("wesiteApp").service("serviceQuickMenuSubmit", ["serviceQuickMenuBase", function (a) {
var n = {
stripHaskey: function (e) {
for (var t in e) "$$hashKey" == t ? delete e[t] : "object" == typeof e[t] && n.stripHaskey(e[t]);
return e
}, submit: function () {
var e = {params: {}, html: ""};
e.params = a.getQuickMenuData(), n.stripHaskey(e.params);
var t = $(".nav-menu").html();
return t = (t = (t = t.replace(/<\!\-\-([^-]*?)\-\->/g, "")).replace(/ng\-[a-zA-Z-]+=\"[^\"]*\"/g, "")).replace(/[\t\n\n\r]/g, ""), e.html = t, e
}
};
return n
}]), angular.module("smsApp", ["we7app"]).filter("showType", function () {
return function (e, t) {
if (0 == e.uniacid) return "系统";
for (var a in t) if (-1 != t[a].contain_type.indexOf(Number(e.type))) return t[a].title
}
}), angular.module("smsApp").controller("smsIndex", ["$scope", "$http", "config", function (a, n, i) {
a.settingSmsSign = i.settingSmsSign || {}, a.currentType = "", a.currentSign = "", a.getSetting = function () {
n.get(i.apiUrl + "system").success(function (e) {
e.message && 0 == e.message.errno ? (a.smsInfo = e.message.message.sms_info, a.systemSms = e.message.message.system_sms, (!a.smsInfo.sms_sign || a.smsInfo.sms_sign.length < 1) && (a.smsInfo.sms_sign = ["微擎"]), delete e.message.message.sms_info, a.settingSmsSign = e.message.message) : util.message(e.message.message, "", "error")
})
}, a.getSetting(), a.showModal = function () {
a.currentSign = a.systemSms.system_sms_sign || "", setTimeout(function () {
a.$apply("currentSign"), $("select").niceSelect && $("select").niceSelect("update"), $("#editSign").modal("show")
})
}, a.showBalance = function () {
a.currentBalance = a.systemSms.system_sms_balance || 0, $("#editBalance").modal("show")
}, a.showModalSetting = function (e, t) {
a.currentType = e, a.formData = a.settingSmsSign[e][t], a.formName = e, a.formKey = t, $("#editSetting").modal("show")
}, a.saveSetting = function () {
n.post(i.smsSettingUrl + "setting_sign", {setting_sign: a.currentSign}).success(function (e) {
0 == e.message.errno ? (a.getSetting(), $("#editSign").modal("hide"), util.message("操作成功!", "", "success")) : ($("#editSign").modal("hide"), util.message("操作失败!", "", "error"))
})
}, a.changeBalance = function () {
n.post(i.smsSettingUrl + "setting_balance", {balance: a.currentBalance}).success(function (e) {
0 == e.message.errno ? (a.getSetting(), $("#editBalance").modal("hide"), util.message("操作成功!", "", "success")) : ($("#editBalance").modal("hide"), util.message("操作失败!", "", "error"))
})
}, a.changeSetting = function () {
var e = {setting_name: a.formName, type: a.formKey};
e[a.formKey] = a.formData || "", n.post(i.changeUrl, e).success(function (e) {
$("#editSign").modal("hide"), 0 == e.message.errno ? (a.getSetting(), $("#editSetting").modal("hide"), util.message("操作成功!", "", "success")) : util.message("操作失败!", "", "error")
})
}, a.changeStatus = function (e) {
var t = 1 == a.settingSmsSign[e].status ? 0 : 1;
n.post(i.changeUrl, {setting_name: e, type: "status", status: t}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message, "", "error"), !1;
util.message(e.message.message, "", "success"), a.getSetting()
})
}
}]).controller("smsSign", ["$scope", "$http", "config", function (a, n, i) {
a.smsSigns = [], a.date = {
startDate: moment((new Date).getTime() - 5184e5).format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, a.status_audit = "", a.status_order = "", a.statusText = {
2: "审核中",
3: "审核通过",
"-1": "审核拒绝"
}, a.orderText = {1: "待付款", 2: "已付款", 3: "已关闭", 4: "已退款"}, setTimeout(function () {
$("select").niceSelect && $("select").niceSelect("update")
}), a.page2 = {
currentPage: 1, totalItems: 0, itemsPerPage: 10, pagesLength: 10, onChange: function () {
a.getSign()
}
};
var l = function (e) {
var t, a, n, i, s, o, r = "";
for (t in e) if ((a = e[t]) instanceof Array) for (o = 0; o < a.length; ++o) i = a[o], (s = {})[t + "[" + o + "]"] = i, r += l(s) + "&"; else if (a instanceof Object) for (n in a) i = a[n], (s = {})[t + "[" + n + "]"] = i, r += l(s) + "&"; else null != a && (r += encodeURIComponent(t) + "=" + encodeURIComponent(a) + "&");
return r.length ? r.substr(0, r.length - 1) : r
};
a.getSign = function (e) {
var t = {page: e = e || a.page2.currentPage, status_audit: a.status_audit, status_order: a.status_order};
a.date.startDate && (t.start_time = Date.parse(moment(a.date.startDate).format("YYYY/MM/DD")) / 1e3, t.end_time = Date.parse(moment(a.date.endDate).hours(23).minutes(59).seconds(59).format("YYYY/MM/DD HH:mm:ss")) / 1e3), n.get(i.apiUrl + "sms_sign&" + l(t)).success(function (e) {
e.message.errno ? util.message(e.message.message, "", "error") : (a.smsSigns = e.message.message.data, a.page2.currentPage = e.message.message.page, a.page2.totalItems = e.message.message.total, setTimeout(function () {
$('[data-toggle="tooltip"]').tooltip()
}))
})
}, a.getSign(), a.removeSign = function (e) {
util.confirm(function () {
n.post(i.apiUrl + "sms_remove", {sign_id: e.id}).success(function (e) {
0 != e.message.errno ? util.message("删除失败,具体原因:" + e.message.message, "", "info") : (util.message("删除成功", "", "success"), a.getSign())
})
}, function () {
return !1
}, "确认删除吗?")
}, a.$watch("date", function (e, t) {
e && e.startDate && e != t && (a.date.startDate = moment(e.startDate).format("YYYY-MM-DD"), a.date.endDate = moment(e.endDate).format("YYYY-MM-DD"))
}, !0)
}]).controller("smsLogs", ["$scope", "$http", "config", function (a, n, i) {
a.mobile = "", a.status = "", a.date = {
startDate: moment((new Date).getTime() - 5184e5).format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, a.page = {
currentPage: 1, totalItems: 0, itemsPerPage: 10, pagesLength: 5, onChange: function () {
a.getList()
}
}, a.smslogs = [];
var l = function (e) {
var t, a, n, i, s, o, r = "";
for (t in e) if ((a = e[t]) instanceof Array) for (o = 0; o < a.length; ++o) i = a[o], (s = {})[t + "[" + o + "]"] = i, r += l(s) + "&"; else if (a instanceof Object) for (n in a) i = a[n], (s = {})[t + "[" + n + "]"] = i, r += l(s) + "&"; else null != a && (r += encodeURIComponent(t) + "=" + encodeURIComponent(a) + "&");
return r.length ? r.substr(0, r.length - 1) : r
};
a.changePage = function (e) {
a.page.currentPage = e || 1
}, a.getList = function (e) {
var t = {page: e = e || (a.page.currentPage ? a.page.currentPage : 1)};
a.date.startDate && (t.time = [Date.parse(moment(a.date.startDate).format("YYYY/MM/DD")) / 1e3, Date.parse(moment(a.date.endDate).hours(23).minutes(59).seconds(59).format("YYYY/MM/DD HH:mm:ss")) / 1e3]), a.mobile && (t.mobile = a.mobile), "" != a.status && (t.status = a.status), n.get(i.apiUrl + "smsLog&" + l({params: t})).success(function (e) {
e.message.errno ? util.message(e.message.message, "", "error") : (a.smslogs = e.message.message.list, a.page.currentPage = e.message.message.page, a.page.totalItems = e.message.message.total)
})
}, a.$watch("date", function (e, t) {
e && e.startDate && e != t && (a.date.startDate = moment(e.startDate).format("YYYY-MM-DD"), a.date.endDate = moment(e.endDate).format("YYYY-MM-DD"))
}, !0), a.getList()
}]).controller("smsTrade", ["$scope", "$http", "config", function (a, n, i) {
a.smslogs = [], a.orderText = {
1: "待付款",
2: "已付款",
3: "已关闭",
4: "已退款"
}, a.status_order = "", setTimeout(function () {
$("select").niceSelect && $("select").niceSelect("update")
}), a.date = {
startDate: moment((new Date).getTime() - 5184e5).format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, a.smsInfo = {}, a.page1 = {
currentPage: 1,
totalItems: 0,
itemsPerPage: 10,
pagesLength: 5,
onChange: function () {
a.getTrade()
}
};
var l = function (e) {
var t, a, n, i, s, o, r = "";
for (t in e) if ((a = e[t]) instanceof Array) for (o = 0; o < a.length; ++o) i = a[o], (s = {})[t + "[" + o + "]"] = i, r += l(s) + "&"; else if (a instanceof Object) for (n in a) i = a[n], (s = {})[t + "[" + n + "]"] = i, r += l(s) + "&"; else null != a && (r += encodeURIComponent(t) + "=" + encodeURIComponent(a) + "&");
return r.length ? r.substr(0, r.length - 1) : r
};
a.getTrade = function (e) {
var t = {page: e = e || a.page1.currentPage, status_order: a.status_order};
a.date.startDate && (t.start_time = Date.parse(moment(a.date.startDate).format("YYYY/MM/DD")) / 1e3, t.end_time = Date.parse(moment(a.date.endDate).hours(23).minutes(59).seconds(59).format("YYYY/MM/DD HH:mm:ss")) / 1e3), n({
method: "GET",
url: i.apiUrl + "smsTrade&" + l(t)
}).success(function (e) {
a.smslogs = [], e.message.errno ? util.message(e.message.message, "", "error") : (a.smsInfo = e.message.message.sms_info, a.smslogs = e.message.message.list.data, a.page1.totalItems = e.message.message.list.total)
})
}, a.$watch("date", function (e, t) {
e && e.startDate && e != t && (a.date.startDate = moment(e.startDate).format("YYYY-MM-DD"), a.date.endDate = moment(e.endDate).format("YYYY-MM-DD"))
}, !0), a.getTrade()
}]).controller("smsShare", ["$scope", "$http", "config", function (a, n, i) {
a.apiUrl = i.apiUrl, a.page = {
currentPage: 1,
totalItems: 0,
itemsPerPage: 2,
pagesLength: 10,
rememberPerPage: !1,
onChange: function () {
a.getList()
}
}, a.keyword = "", a.type = "", a.getList = function (t) {
var e = {page: t = t || a.page.currentPage, keyword: a.keyword, type: a.type};
n.get(i.apiUrl + "list", {params: e}).success(function (e) {
0 == e.message.errno ? (a.list = e.message.message.list, a.typeList = e.message.message.account_types, a.page.itemsPerPage = e.message.message.page_size, a.page.totalItems = e.message.message.total, t && (a.page.currentPage = t), setTimeout(function () {
$("select").niceSelect && $("select").niceSelect("update")
})) : util.message(e.message.message, "", "error")
})
}, a.getList(), a.deleteItem = function (e) {
util.confirm(function () {
n.post(i.apiUrl + "delete", {uniacid: e}).success(function (e) {
0 == e.message.errno ? (a.getList(1), util.message("操作成功!", "", "success")) : util.message("操作失败!", "", "error")
})
}, function () {
return !1
}, "确认删除吗?")
}
}]).controller("smsAdd", ["$scope", "$http", "config", function (t, e, a) {
t.getSetting = function () {
e.get(a.apiUrl + "&do=add").success(function (e) {
0 == e.message.errno ? (t.setting = e.message.message, setTimeout(function () {
$("select").niceSelect && $("select").niceSelect("update")
})) : util.message(e.message.message, "", "error")
})
}, t.getSetting(), t.postSetting = function () {
e.post(a.apiUrl + "&do=add", t.postData).success(function (e) {
0 == e.message.errno ? util.message("操作成功!", a.apiUrl, "success") : util.message(e.message.message, "", "error")
})
}
}]), angular.module("specialApp", ["wapeditorApp"]), angular.module("specialApp").controller("MainCtrl", ["$scope", "$timeout", "$uibModal", "widget", "config", "serviceCommon", "serviceSetStyle", "serviceBase", "serviceSpecialBase", "serviceSubmit", "serviceMultiSubmit", "serviceMultiPage", "serviceUpwardCompatible", "$sanitize", function (s, e, t, a, n, i, o, r, l, c, u, d, p, m) {
s.modules = [], s.editors = [], s.allPages = n.allPages, s.multipage = n.multipage ? n.multipage : [], s.submit = {
params: {},
html: "",
multipage: []
}, s.isNew = !0, s.allPages && -1 == _.findIndex(s.allPages, {active: !0}) && (s.isNew = !1, s.allPages = [{
property: s.allPages,
active: !0
}]), r.setBaseData("isNew", s.isNew), s.allPages = s.allPages ? s.allPages : [{property: [], active: !0}];
var g = _.findIndex(s.allPages, {active: !0});
for (var f in s.activeModules = -1 < g ? r.initActiveModules(s.allPages[g].property) : [], s.activePageIndex = -1 < g ? g : 0, l.setBaseData("activePageIndex", s.activePageIndex), s.activeItem = {}, s.activeIndex = 0, s.index = s.activeModules.length ? i.getMaxScopeIndex(s.allPages) + 1 : 0, r.setBaseData("index", s.index), s.pageLength = _.isEmpty(s.activeModules) ? 1 : s.activeModules[0].params.pageLength ? s.activeModules[0].params.pageLength : 1, s.isMultiPage = 0 == s.index || !(1 < s.activeModules[i.getHeaderIndex(s.activeModules)].params.pageLength), s.isLongPage = 0 == s.index || (1 < s.activeModules[i.getHeaderIndex(s.activeModules)].params.pageLength || 1 == s.activeModules[i.getHeaderIndex(s.activeModules)].params.pageLength && 1 == s.allPages.length), s.pageLengths = {
1: 1,
2: 2,
3: 3,
4: 4,
5: 5
}, s.lineHeights = {1: 1, 1.25: 1.25, 1.5: 1.5, 2: 2, 2.5: 2.5}, s.fontSizes = {
12: 12,
14: 14,
16: 16,
18: 18,
20: 20,
22: 22,
24: 24,
26: 26,
28: 28,
30: 30,
32: 32,
34: 34,
36: 36,
38: 38,
40: 40
}, l.setBaseData("allPages", s.allPages), l.setBaseData("multipage", s.multipage), r.setBaseData("pageLength", s.pageLength), s.isNew || (s.activeModules = p.compatibility(s.activeModules), void 0 === s.activeModules[0].params.pageLength && (s.activeModules[0].params.pageLength = Math.ceil($(".modules").height() / 568)), 1 < s.activeModules[0].params.pageLength && (s.pageLength = s.activeModules[0].params.pageLength, s.isMultiPage = !1, s.isLongPage = !0, r.setBaseData("pageLength", s.pageLength), e(function () {
$(".app-content").css("height", 568 * s.pageLength + "px")
}, 100)), e(function () {
var a = 0, n = height = "";
$(".modules>div").each(function () {
var e = parseInt($(this).attr("index"));
if (n = $(this).find("div.ng-scope[ng-controller$='Ctrl']").css("width"), height = $(this).find("div.ng-scope[ng-controller$='Ctrl']").css("height"), 0 < e) {
for (var t in s.activeModules) s.activeModules[t].index == e && (a += parseInt(s.activeModules[t].marginTop), s.activeModules[t].params.positionStyle.width = parseInt(n), s.activeModules[t].params.positionStyle.height = parseInt(height), s.activeModules[t].params.positionStyle.top = a, s.activeModules[t].positionStyle = "position:absolute;width:" + n + ";height:" + height + ";left:" + s.activeModules[t].params.positionStyle.left + "px;top:" + a + "px;", $(this).find("div[ng-controller]").attr("style", s.activeModules[t].positionStyle));
a += parseInt(height)
}
t++
}), r.setBaseData("activeModules", s.activeModules)
}, 1e3)), s.activeModules) s.activeModules[f].originParams = angular.copy(s.activeModules[f].params);
s.$on("serviceBase.editors.update", function (e, t) {
s.editors = t
}), s.$on("serviceBase.activeItem.update", function (e, t) {
s.activeItem = t
}), s.$on("serviceBase.activeModules.update", function (e, t) {
s.activeModules = t
}), s.$on("serviceBase.activeItem.params.update", function (e, t) {
s.activeItem.params = t
}), s.$on("serviceBase.activeItem.animationName.update", function (e, t) {
s.activeItem.params.animationStyle.animationName = t
}), s.$on("serviceBase.activeItem.style.update", function (e, t, a, n, i) {
s.activeItem.params[t] = a, s.activeItem[t] = n, void 0 !== i && (s.activeItem.transform = i)
}), s.$on("updateScope", function (e, t) {
angular.forEach(t, function (e, t) {
s[t] = e
})
}), s.addItem = function (e) {
r.addItem(e)
}, s.editItem = function (e) {
r.editItem(e)
}, s.deleteItem = function (e) {
r.deleteItem(e)
}, s.submit = function (e) {
s.submit = c.submit(), s.$apply("submit"), $(e.target).parents("form").submit()
}, s.multiSubmit = function (e) {
s.submit = u.submit(), s.$apply("submit"), $(e.target).parents("form").submit()
}, s.init = function (e, t) {
if (s.modules = r.setModules(e, t), 0 < s.activeModules.length) {
var a = [];
angular.forEach(s.activeModules, function (e, t) {
e && a.push(e.id)
})
}
angular.forEach(s.modules, function (e, t) {
e.defaultshow && -1 == $.inArray(e.id, a) && r.addItem(e.id)
})
}, s.setModulePositionStyle = function (e) {
o.setModulePositionStyle(e)
}, s.eleAnimationIns = function (e) {
o.eleAnimationIns(e)
}, s.savePagePosition = function () {
o.savePagePosition(s.activeModules)
}, s.saveModulePosition = function () {
o.saveModulePosition(s.activeItem)
}, s.changeTextAlign = function (e) {
o.changeTextAlign(s.activeItem, e)
}, s.changeBorderWidth = function () {
o.changeBorderWidth(s.activeItem)
}, s.changeInnerHeight = function () {
o.changeInnerHeight(s.activeItem)
}, s.clearModuleStyle = function () {
o.clearModuleStyle(s.activeItem)
}, s.changePageLength = function (e) {
if (angular.isString(e)) if ("minus" == e && 1 < s.pageLength) e = s.pageLength - 1; else {
if (!("plus" == e && s.pageLength < 5)) return !1;
e = s.pageLength + 1
}
var t = o.changePageLength(e, s.activeModules);
r.setBaseData("pageLength", parseInt(e)), r.setBaseData("activeModules", t)
}, s.insertPage = function () {
d.insertPage(), s.init(null, ["header"])
}, s.navToPage = function (e) {
d.navToPage(e), s.activeHeader()
}, s.removePage = function (e) {
d.removePage(e), s.activeHeader()
}, s.copyPage = function (e, t) {
d.copyPage(e, t), s.activeHeader()
}, s.changeLock = function () {
s.activeItem.params.baseStyle.lock = !s.activeItem.params.baseStyle.lock
}, s.activeHeader = function () {
for (var e in s.activeModules) if ("header" == s.activeModules[e].id) {
s.pageLength = s.activeModules[e].params.pageLength ? s.activeModules[e].params.pageLength : 1, o.changePageLength(s.pageLength, s.activeModules), r.setBaseData("activeItem", s.activeModules[0]), s.editItem(s.activeModules[e].index);
break
}
}, $(".multi-submit").on("click", function (e) {
s.multiSubmit(e)
}), $(".single-submit").on("click", function (e) {
s.submit(e)
}), s.init(null, ["header"]), s.activeHeader(), s.$watch("activeItem.params.baseStyle", function (e) {
e && o.setModuleBaseStyle(e)
}, !0), s.$watch("activeItem.params.borderStyle", function (e) {
e && o.setModuleBorderStyle(e)
}, !0), s.$watch("activeItem.params.shadowStyle", function (e) {
e && o.setModuleShadowStyle(e)
}, !0), s.$watch("activeItem.params.animationStyle", function (e) {
e && o.setModuleAnimationStyle(e)
}, !0), s.$watch("activeItem.params.positionStyle", function (e) {
e && o.setModulePositionStyle(e)
}, !0)
}]), angular.module("specialApp").controller("SpecialDisplay", ["$scope", "serviceCopy", "config", function (a, n, e) {
a.pages = e.pages, a.links = e.links, angular.forEach(a.pages, function (e, t) {
e.copyLink = a.links.appHome + "id=" + e.id
}), a.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>');
n.copySuccess(e, t)
}
}]), angular.module("specialApp").directive("we7Multipage", function () {
return {replace: !0, templateUrl: "directive-multipage-multipage.html"}
}), angular.module("specialApp").service("serviceSpecialBase", ["$rootScope", "serviceBase", function (e, t) {
var a = {}, n = {activePageIndex: 0, isMultiPage: !0, isLongPage: !0, allPages: [], multipage: []};
return a.getBaseData = function (e) {
return n[e]
}, a.setBaseData = function (e, t) {
angular.isObject(e) ? angular.forEach(e, function (e, t) {
n[t] = e
}) : n[e] = t
}, a
}]), angular.module("specialApp").service("serviceCopy", ["$rootScope", function (e) {
var t = {
copySuccess: function (e, t) {
e = parseInt(e), t = t;
var a = $("#copy-" + e).next().html();
(!a || a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>') < 0) && $("#copy-" + e).after(t), setTimeout(function () {
t.remove()
}, 2e3)
}
};
return t
}]), angular.module("specialApp").service("serviceMultiPage", ["$rootScope", "serviceCommon", "serviceBase", "serviceSpecialBase", "$window", function (u, f, h, d, e) {
var p = {
insertPage: function () {
p.saveCurPage();
var e = d.getBaseData("allPages"), t = d.getBaseData("activePageIndex");
e[t].active = !1, e.push({
property: [],
active: !0
}), $(".app-content").css("height", "568px"), t = _.findIndex(e, {active: !0}), h.setBaseData({
activeModules: [],
pageLength: 1
}), d.setBaseData({
allPages: e,
isMultiPage: !0,
isLongPage: !1,
activePageIndex: t
}), u.$broadcast("updateScope", {
allPages: e,
isMultiPage: !0,
isLongPage: !1,
pageLength: 1,
activePageIndex: t,
activeModules: []
})
}, navToPage: function (e) {
var t = d.getBaseData("activePageIndex");
if (t == e) return !1;
p.saveCurPage();
var a = d.getBaseData("allPages"), n = a[e].property;
a[t].active = !1, a[e].active = !0, t = e, h.setBaseData("activeModules", n), h.setBaseData("activeItem", n[0]), d.setBaseData({
allPages: a,
activePageIndex: t
}), u.$broadcast("updateScope", {allPages: a, activePageIndex: t, activeModules: n})
}, removePage: function (e) {
var t = [], a = d.getBaseData("allPages"), n = d.getBaseData("multipage");
if (1 == a.length) return !1;
p.saveCurPage(), n.splice(parseInt(e), 1);
var i = _.clone(a), s = a.length - 1 - e;
for (var o in a = [], i) if (o != e) switch (s) {
case 0:
parseInt(o) + 1 == e ? (a.push({
property: i[o].property,
active: !0
}), t = i[o].property) : a.push({property: i[o].property, active: !1});
break;
default:
o - 1 == e ? (a.push({
property: i[o].property,
active: !0
}), t = i[o].property) : a.push({property: i[o].property, active: !1})
}
activePageIndex = _.findIndex(a, {active: !0}), 1 == a.length && (d.setBaseData({
isMultiPage: !0,
isLongPage: !0
}), u.$broadcast("updateScope", {
isMultiPage: !0,
isLongPage: !0
})), h.setBaseData("activeModules", t), d.setBaseData({
allPages: a,
activePageIndex: activePageIndex
}), u.$broadcast("updateScope", {allPages: a, activePageIndex: activePageIndex, activeModules: t})
}, copyPage: function (e, t) {
p.saveCurPage();
var a = h.getBaseData("index"), n = d.getBaseData("allPages"), i = d.getBaseData("multipage");
i.splice(parseInt(e), 0, i[e]);
var s = angular.copy(n);
for (var o in n = [], s) if (o == e) {
n.push({property: s[o].property, active: !1});
var r = angular.copy(s[o].property);
for (var l in r) r[l].index = a++;
n.push({property: r, active: !0});
var c = r
} else n.push({property: s[o].property, active: !1});
activePageIndex = _.findIndex(n, {active: !0}), h.setBaseData("activeModules", c), h.setBaseData("index", a), d.setBaseData({
allPages: n,
multipage: i,
isMultiPage: !0,
isLongPage: !1,
activePageIndex: activePageIndex
}), t.stopPropagation(), u.$broadcast("updateScope", {
allPages: n,
isMultiPage: !0,
isLongPage: !1,
activePageIndex: activePageIndex,
activeModules: c
})
}, saveCurPage: function () {
var p = h.getBaseData("activeModules"), m = h.getBaseData("pageLength"), e = d.getBaseData("allPages"),
t = d.getBaseData("multipage"), a = _.findIndex(e, {active: !0}), g = "";
$($(".modules").html()).find("div.ng-scope[ng-controller$='Ctrl']").each(function () {
var e, t = $(this).parent().parent(), a = _.findIndex(p, {index: parseInt(t.attr("index"))}),
n = angular.copy(p[a].params);
$(this).find(".js-default-content").remove(), $(this).find(".bar").remove();
var i = t.attr("name").toLowerCase();
if ("header" != i) {
var s = $(this).css("top"), o = $(this).css("left"), r = $(this).css("width"),
l = $(this).css("height"),
c = "position:absolute;top:" + s + ";left:" + o + ";width:" + r + ";height:" + l + ";";
p[a].params.positionStyle.top = parseInt(s), p[a].params.positionStyle.left = parseInt(o), p[a].params.positionStyle.width = parseInt(r), p[a].params.positionStyle.height = parseInt(l), p[a].positionStyle = c
} else p[a].params.pageLength = m;
switch (i) {
case"link":
var u = this;
angular.forEach(n.items, function (e, t) {
(e.selectCate.pid || e.selectCate.cid) && $(u).find(".list-group").children().eq(t).replaceWith("<div>" + f.buildDataTagBegin("link", e) + '<div class="list-group-item ng-scope"><a href="{$row[url]}" class="clearfix"><span class="app-nav-title"> {$row[title]}<i class="pull-right fa fa-angle-right"></i></span></a></div>' + f.buildDataTagEnd() + "</div>")
});
break;
case"richtext":
p[a] && (p[a].params.content = "")
}
if (e = $(this).html(), !h.getBaseData("isNew")) {
var d = parseInt(s) - 64;
$(this).css("top", d + "px")
}
if ("header" != i) {
c = $(this).attr("style");
g += '<div type="' + i + '" style="' + c + '">' + e + "</div>"
}
}), g = (g = (g = g.replace(/<\!\-\-([^-]*?)\-\->/g, "")).replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g, "")).replace(/ ng\-[a-zA-Z]+/g, ""), t[a] = g, e[a].property = p, h.setBaseData("activeModules", p), d.setBaseData({
allPages: e,
multipage: t
}), u.$broadcast("updateScope", {activeModules: p, allPages: e, multipage: t})
}
};
return p
}]), angular.module("specialApp").service("serviceMultiSubmit", ["serviceCommon", "serviceMultiPage", "serviceSpecialBase", function (c, u, d) {
var e = {
submit: function (e) {
u.saveCurPage();
var a = d.getBaseData("multipage"), n = d.getBaseData("allPages"), i = "",
s = '<section class="u-arrow-bottom" style="bottom: 15%;"><div class="pre-wrap"><div class="pre-box1"><div class="pre1"></div></div><div class="pre-box2"><div class="pre2"></div></div></div></section></div>';
for (var t in $.each(a, function (e, t) {
e + 1 == a.length ? i += 1 == n.length ? '<div class="pane">' + t + "</div>" : '<div class="pane overflowhidden">' + t + "</div>" : i += 1 == n.length ? '<div class="pane">' + t + s : '<div class="pane overflowhidden">' + t + s
}), n) for (var o in n[t].property) delete n[t].property[o].originParams, delete n[t].property[o].marginTop;
var r = {}, l = $(".app-content").css("height");
return i = (i = (i = (i = '<div style="height:' + l + '"><div class="panes">' + i + "</div></div>").replace(/<\!\-\-([^-]*?)\-\->/g, "")).replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g, "")).replace(/ ng\-[a-zA-Z]+/g, ""), r.html = i, r.params = angular.copy(n), r.multipage = a, c.stripHaskey(r.params), r
}
};
return e
}]), angular.module("statisticsApp", ["we7app"]), angular.module("statisticsApp").controller("HorizontalBarCtrl", ["$scope", "$http", "serviceCommon", "config", function (r, l, a, c) {
r.needAccountApi = "account" == c.frame || "wxapp" == c.frame, require(["echarts"], function (e) {
if (r.needAccountApi) var s = e.init(document.getElementById("chart-line"));
accountOption = {
tooltip: {trigger: "axis", axisPointer: {type: "line"}},
grid: {left: "3%", right: "3%", bottom: "3%", containLabel: !0},
xAxis: {data: []},
yAxis: {splitArea: {show: !0}},
series: [{name: "数量", type: "line", smooth: !0, data: []}]
}, r.needAccountApi && s.showLoading();
var o = e.init(document.getElementById("chart-horizontal-bar"));
moduleOption = {
tooltip: {trigger: "axis", axisPointer: {type: "shadow"}},
grid: {left: "3%", right: "3%", bottom: "3%", containLabel: !0},
xAxis: {},
yAxis: {type: "category", data: []},
series: [{name: "数量", type: "bar", barWidth: 20, data: []}]
}, o.showLoading(), r.active = !0, r.code = "", r.show = !0, r.accountDateRange = {
startDate: moment().format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, r.moduleDateRange = {
startDate: moment().format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, r.changeDivideType = function (e, t) {
"account" == e && (r.accountDivideType = t), "module" == e && (r.moduleDivideType = t), r.getModuleApi(e, "week")
}, r.getModuleApi = function (a, e) {
var t = "", n = "", i = "";
"account" == a && (r.accountTimeType = e, r.accountLabels = [], r.accountData = [], t = c.links.accountApi, n = r.accountDivideType, i = r.accountDateRange), "module" == a && (r.moduleTimeType = e, r.moduleLabels = [], r.moduleData = [], t = c.links.moduleApi, n = r.moduleDivideType, i = r.moduleDateRange), l.post(t, {
divide_type: n,
time_type: e,
daterange: i
}).success(function (e) {
if (r.needAccountApi && s.hideLoading(), o.hideLoading(), r.needAccountApi && "account" == a && (accountOption.xAxis.data = e.message.message.data_x, accountOption.series[0].data = e.message.message.data_y, s.setOption(accountOption)), "module" == a) {
var t = e.message.message.data_y.length;
r.actualHight = 15 * parseInt(t) + "px", moduleOption.series[0].data = e.message.message.data_x, moduleOption.yAxis.data = e.message.message.data_y, o.setOption(moduleOption)
}
})
}, r.accountDivideType = "bysum", r.moduleDivideType = "bysum", r.accountTimeType = "week", r.moduleTimeType = "week", r.needAccountApi && r.getModuleApi("account", r.accountTimeType), r.getModuleApi("module", r.moduleTimeType), r.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;z-index:10;width:90px;height:34px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>');
a.copySuccess(e, t)
}, r.changeStatus = function () {
r.show = !r.show
}, r.$watch("moduleDateRange", function (e, t) {
e && e != t && (r.moduleDateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), r.moduleDateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), r.getModuleApi("module", "daterange"))
}, !0), r.$watch("accountDateRange", function (e, t) {
e && e != t && (r.accountDateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), r.accountDateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), r.getModuleApi("account", "daterange"))
}, !0)
})
}]), angular.module("statisticsApp").controller("statisticsSettingCtrl", ["$scope", "$http", "config", function (a, t, n) {
a.setting = n.highest_visit, a.interval = n.interval, a.newVisitVal = 0, a.newInterval = 0, a.editInfo = function (e, t) {
switch (e) {
case"visit":
a.newVisitVal = t || 0;
break;
case"interval":
a.newInterval = t || 0
}
}, a.saveSetting = function (e) {
switch (e) {
case"visit":
t.post(n.links.editSetting, {
highest_visit: a.newVisitVal,
type: "highest_visit"
}).success(function (e) {
0 == e.message.errno && (a.setting = a.newVisitVal), util.message(e.message.message, "", "success")
});
break;
case"interval":
t.post(n.links.editSetting, {interval: a.newInterval, type: "interval"}).success(function (e) {
0 == e.message.errno && (a.interval = a.newInterval), util.message(e.message.message, "", "success")
})
}
}
}]), angular.module("statisticsApp").controller("systemAccountAppAnalysisCtrl", ["$scope", "$http", "config", function (a, n, i) {
require(["echarts"], function (e) {
var t = e.init(document.getElementById("chart-line"));
option = {
tooltip: {trigger: "axis", axisPointer: {type: "line"}},
xAxis: {data: []},
yAxis: {splitArea: {show: !0}},
series: [{name: "数量", type: "line", smooth: !0, data: []}]
}, t.showLoading(), a.dateRange = {
startDate: moment().format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, a.changeDivideType = function (e) {
a.divideType = e, a.getAccountApi("week")
}, a.getAccountApi = function (e) {
a.timeType = e, n.post(i.links.accountApi, {
divide_type: a.divideType,
time_type: e,
daterange: a.dateRange
}).success(function (e) {
t.hideLoading(), option.xAxis.data = e.message.message.data_x, option.series[0].data = e.message.message.data_y, t.setOption(option)
})
}, a.divideType = "bysum", a.timeType = "week", a.getAccountApi(a.timeType), a.$watch("dateRange", function (e, t) {
e && e != t && (a.dateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), a.dateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), a.getAccountApi("daterange"))
}, !0)
})
}]), angular.module("statisticsApp").controller("systemAccountAnalysisCtrl", ["$scope", "$http", "config", function (a, n, i) {
require(["echarts"], function (e) {
var t = e.init(document.getElementById("chart-line"));
accountOption = {
tooltip: {trigger: "axis", axisPointer: {type: "line"}},
grid: {left: "3%", right: "3%", bottom: "3%", containLabel: !0},
xAxis: {data: []},
yAxis: {splitArea: {show: !0}},
series: [{name: "数量", type: "line", smooth: !0, data: []}]
}, t.showLoading(), a.dateRange = {
startDate: moment().format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, a.getAccountApi = function (e) {
a.timeType = e, n.post(i.links.accountApi, {time_type: e, daterange: a.dateRange}).success(function (e) {
t.hideLoading(), accountOption.xAxis.data = e.message.message.data_x, accountOption.series[0].data = e.message.message.data_y, t.setOption(accountOption)
})
}, a.timeType = "week", a.getAccountApi(a.timeType), a.$watch("dateRange", function (e, t) {
e && e != t && (a.dateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), a.dateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), a.getAccountApi("daterange"))
}, !0)
})
}]), angular.module("statisticsApp").controller("CurrentAccountCtrl", ["$scope", "$http", "config", function (a, n, i) {
require(["echarts"], function (e) {
var t = e.init(document.getElementById("chart-line"));
accountOption = {
tooltip: {trigger: "axis", axisPointer: {type: "line"}},
grid: {left: "3%", right: "3%", bottom: "3%", containLabel: !0},
xAxis: {data: []},
yAxis: {splitArea: {show: !0}},
series: [{name: "数量", type: "line", smooth: !0, data: []}]
}, t.showLoading(), a.accountDateRange = {
startDate: moment().format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, a.getModuleApi = function (e) {
a.accountTimeType = e, n.post(i.links.accountApi, {
time_type: e,
daterange: a.accountDateRange
}).success(function (e) {
t.hideLoading(), accountOption.xAxis.data = e.message.message.data_x, accountOption.series[0].data = e.message.message.data_y, t.setOption(accountOption)
})
}, a.accountTimeType = "week", a.getModuleApi(a.accountTimeType), a.$watch("accountDateRange", function (e, t) {
e && e != t && (a.accountDateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), a.accountDateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), a.getModuleApi("daterange"))
}, !0)
})
}]), angular.module("statisticsApp").controller("FansStatisticeCtrl", ["$scope", "$http", "serviceCommon", "config", function (a, n, e, i) {
require(["echarts"], function (e) {
var t = e.init(document.getElementById("chart-line"));
option = {
tooltip: {trigger: "axis", axisPointer: {type: "line"}},
grid: {left: "3%", right: "3%", bottom: "3%", containLabel: !0},
xAxis: {data: []},
yAxis: {splitArea: {show: !0}},
series: [{name: "数量", type: "line", smooth: !0, data: []}]
}, t.showLoading(), a.dateRange = {
startDate: moment().format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, a.changeDivideType = function (e) {
a.fansDivideType = e, a.getFansApi("week")
}, a.getFansApi = function (e) {
a.timeType = e, n.post(i.links.fansApi, {
divide_type: a.fansDivideType,
time_type: e,
daterange: a.dateRange
}).success(function (e) {
t.hideLoading(), option.xAxis.data = e.message.message.data_x, option.series[0].data = e.message.message.data_y, t.setOption(option)
})
}, a.fansDivideType = "bynew", a.fansTimeType = "week", a.getFansApi(a.fansTimeType), a.$watch("dateRange", function (e, t) {
e && e != t && (a.dateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), a.dateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), a.getFansApi("daterange"))
}, !0)
})
}]), angular.module("statisticsApp").controller("systemAccountVisit", ["$scope", "$http", "config", function (n, a, i) {
n.visitTimeType = "today", n.visitDate = {
startDate: moment().format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, n.visitDateRange = {
startDate: moment().format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, n.page = 1, n.size = 10, n.visitList = [], n.visitTotal = 0, n.visitTotalPage = 1, n.range = function (e) {
return new Array(e)
}, n.getAccountVisit = function (e) {
var t = new Date;
e && (n.page = 1, n.visitTimeType = e, "today" == n.visitTimeType && (n.visitDate.startDate = moment().format("YYYY-MM-DD"), n.visitDate.endDate = moment().format("YYYY-MM-DD")), "week" == n.visitTimeType && (n.visitDate.startDate = moment(t.setDate(t.getDate() - 6)).format("YYYY-MM-DD"), n.visitDate.endDate = moment().format("YYYY-MM-DD")), "month" == n.visitTimeType && (n.visitDate.startDate = moment(t.setDate(t.getDate() - 29)).format("YYYY-MM-DD"), n.visitDate.endDate = moment().format("YYYY-MM-DD"))), a.get(i.links.accountVisit, {
params: {
page: n.page,
size: n.size,
start_time: n.visitDate.startDate,
end_time: n.visitDate.endDate
}
}).success(function (e) {
e.message.errno || (n.visitList = e.message.message.list, n.visitTotal = e.message.message.total_visit, n.getPage(Math.ceil(e.message.message.total_account / n.size)))
})
}, n.$watch("visitDateRange", function (e, t) {
e && e.startDate != n.visitDate.startDate && (n.visitDate.startDate = moment(e.startDate).format("YYYY-MM-DD"), n.visitDate.endDate = moment(e.endDate).format("YYYY-MM-DD"), n.getAccountVisit("daterange"))
}, !0), n.changePage = function (e) {
if (e < 1 || e > n.visitTotalPage) return !1;
n.page = e, n.getAccountVisit()
}, n.getPage = function (e) {
if (e == n.visitTotalPage) return !1;
n.visitTotalPage = e;
var t = Math.max(1, n.page - 4), a = Math.min(n.visitTotalPage, n.page + 4);
for (a - t < 9 && (a = Math.min(n.visitTotalPage, t + 8), t = Math.max(1, a - 8)), n.pageArray = []; t <= a; t++) n.pageArray.push(t)
}, n.changePage(1)
}]), angular.module("statisticsApp").service("serviceCommon", ["$rootScope", function (e) {
var t = {
copySuccess: function (e, t) {
e = parseInt(e), t = t;
var a = $("#copy-" + e).next().html();
(!a || a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>') < 0) && $("#copy-" + e).after(t), setTimeout(function () {
t.remove()
}, 2e3)
}
};
return t
}]), angular.module("storeApp", ["we7app"]), angular.module("storeApp").controller("goodsSellerCtrl", ["$scope", "$http", "config", function (a, t, n) {
a.status = n.status, a.moduleList = [], a.keyword = "", a.selectedModule = "", a.visitTimes = 0, a.visitPrice = 0, a.moduleGoodsType = 1, a.tabChange = function (e, t) {
for (key in a.moduleGoodsType = t, a.moduleList = [], n.moduleList) 2 == n.moduleList[key][e] && a.moduleList.push(n.moduleList[key])
}, a.tabChange("account_support", 1), a.showModule = function () {
$("#add_module").modal("show")
}, a.selectModule = function (e, t) {
$(t.target).parents(".select-module").find(".item").addClass("active"), $(t.target).parents(".select-module").siblings().find(".item").removeClass("active"), a.selectedModule = e
}, a.editPrice = function (e) {
switch (e) {
case"add_module":
t.post(n.links.add, {
module: a.selectedModule,
toedit: !0,
type: a.moduleGoodsType
}).success(function (e) {
0 == e.message.errno ? location.href = n.links.post + "&id=" + e.message.message : util.message(e.message.message)
});
break;
case"add_api":
t.post(n.links.add, {
title: "应用访问流量(API)",
visit_times: a.visitTimes,
price: a.visitPrice,
online: !0
}).success(function (e) {
0 == e.message.errno ? location.href = n.links.online : util.message(e.message.message)
})
}
}, a.toOffline = function (e) {
switch (e) {
case"add_module":
t.post(n.links.add, {module: a.selectedModule, type: a.moduleGoodsType}).success(function (e) {
0 == e.message.errno ? location.href = n.links.offline : util.message(e.message.message)
});
break;
case"add_api":
t.post(n.links.add, {
title: "应用访问流量(API)",
visit_times: a.visitTimes,
price: a.visitPrice
}).success(function (e) {
0 == e.message.errno ? location.href = n.links.offline : util.message(e.message.message)
})
}
}
}]), angular.module("storeApp").controller("goodsPostCtrl", ["$scope", "$http", "$compile", "config", "we7TypeDefault", function (l, e, s, t, a) {
if (l.slideLists = [], l.goodsInfo = t.goodsInfo, l.userGroups = t.userGroups, l.account_text = a, l.fileLogo = function (e, t, a) {
l.goodsInfo.logo = e.url
}, l.changeGroup = function (e, a) {
var n = !0;
$('[name="user_group_id[]"]').each(function (e, t) {
a.currentTarget.dataset.id == $(t).val() && (n = !1)
}), n && ($(".user-group-price-content .form-group-" + e + " .group-title").text(a.currentTarget.dataset.title), $(".user-group-price-content .form-group-" + e + ' [name="user_group_id[]"]').val(a.currentTarget.dataset.id), $(".user-group-price-content .form-group-" + e + ' [name="user_group_name[]"]').val(a.currentTarget.dataset.title))
}, l.addGroupPrice = function (e, t, a) {
var n = $(".user-group-price-content .form-group").length + 1,
i = '<div class="form-group form-group-' + n + '"><label class="control-label col-sm-2"></label><div class="col-sm-8 form-controls"><div class="input-group"><div class="input-group-btn"><button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" style="min-width:120px;background-color: #f8f9f9;color: #666;"><span class="group-title">' + (a ? t : "选择用户组") + '</span> <span class="caret" style="color: #3071a9"></span><input type="hidden" name="user_group_id[]" value="' + e + '"/><input type="hidden" name="user_group_name[]" value="' + t + '"/></button><ul class="dropdown-menu dropdown-menu-right">';
i += l.getuserGroupsLi(n), i += '</ul></div><input type="number" class="form-control" min="0" name="user_group_price[]" value="' + a + '" step="0.01"><span class="input-group-addon" >元 / <span ng-if="num > 0" ng-bind="num"></span><span ng-bind="unitTitle"></span></span><div class="input-group-btn" style="padding-left: 10px"><button type="button" class="btn btn-default" ng-click="deleteGroupPrice(' + n + ')">删除</button></div></div></div></div>', $(".user-group-price-content").append(s(i)(l))
}, l.getuserGroupsLi = function (e) {
var t = "";
for (key in l.userGroups) t += '<li><a href="" ng-click="changeGroup(' + e + ', $event)" data-title="' + l.userGroups[key].name + '" data-id="' + l.userGroups[key].id + '">' + l.userGroups[key].name + "</a></li>";
return t
}, l.getUnitName = function () {
switch (l.unit) {
case"day":
return "日";
case"month":
return "月";
case"year":
return "年"
}
}, l.deleteGroupPrice = function (e) {
$(".user-group-price-content .form-group-" + e).remove()
}, l.changeUnit = function (e) {
l.unit = e, $('[name="unit"]').val(e), l.unitTitle = l.getUnitName()
}, l.addSlide = function () {
require(["fileUploader"], function (e) {
e.init(function (e) {
l.slideLists.push(e.url), l.$apply(l.slideLists)
}, {direct: !0, multiple: !1, uniacid: 0, global: "global"})
})
}, l.delSlide = function (e) {
l.slideLists.splice(e, 1)
}, l.goodsInfo) {
if (l.unit = l.goodsInfo.unit, 7 != l.goodsInfo.type && 8 != l.goodsInfo.type && 29 != l.goodsInfo.type || (l.num = l.goodsInfo.account_num || l.goodsInfo.account_num), l.slideLists = l.goodsInfo.slide, $("#description").html(l.goodsInfo.description), l.goodsInfo.user_group_price) for (id in l.goodsInfo.user_group_price) l.addGroupPrice(id, l.goodsInfo.user_group_price[id].group_name, l.goodsInfo.user_group_price[id].price)
} else l.unit = "month";
l.unitTitle = l.getUnitName(), l.user_group = l.goodsInfo ? l.goodsInfo.user_group : l.userGroups && l.userGroups.length ? l.userGroups[0].id : "", l.userGroupInfo = {}, l.showGroupInfo = function () {
l.user_group ? l.userGroupInfo.id && l.userGroupInfo.id == l.user_group || (l.userGroupInfo = {}, e.get(t.groupInfoUrl + "&user_group_id=" + l.user_group).success(function (e) {
if (e.message && !e.message.errno) {
var t = e.message.message, a = t.package_detail;
if ("all" !== t.modules || "all" !== t.templates) for (var n in t.group_module_all = {}, t.group_tempate_all = {}, a) {
var i = a[n].modules_all, s = a[n].templates;
for (var o in i) t.group_module_all[n] || (t.group_module_all[i[o].mid] = i[o]);
for (var r in s) t.group_tempate_all[s[r].id] || (t.group_tempate_all[s[r].id] = s[r])
}
l.userGroupInfo = t
}
})) : l.userGroupInfo = {}
}, l.showGroupInfo()
}]), angular.module("storeApp").controller("storePaySettingCtrl", ["$scope", "$http", "config", function (e, t, a) {
e.alipay = a.alipay, e.wechat_refund = a.wechat_refund, e.ali_refund = a.ali_refund, $("#key").change(function () {
e.wechat_refund.key = $("#key").val(), e.$apply()
}), $("#cert").change(function () {
e.wechat_refund.cert = $("#cert").val(), e.$apply()
}), $("#private_key").change(function () {
e.ali_refund.private_key = $("#private_key").val(), e.$apply()
})
}]), angular.module("storeApp").controller("storeOrdersCtrl", ["$scope", "$http", "config", function (t, e, a) {
t.orderList = a.orderList, t.role = a.role, t.links = a.links, t.order_types = a.order_types, t.goods_types = a.goods_types, t.newPrice = [], t.showChangePriceModal = function (e) {
$("#change-price").modal("show");
e = parseInt(e);
t.newPrice.orderid = e
}, t.changePrice = function () {
e.post(a.links.changePrice, {id: t.newPrice.orderid, price: t.newPrice.price}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, t.refund = function (e, t) {
var a = "./index.php?c=site&a=entry&m=store&do=orders&operate=refund&orderid=" + e.id + "&direct=1";
refund_url = 1 === t ? a + "&refund_type=founder" : a + "&refund_id=" + e.refund_id, util.confirm(function () {
window.location.href = refund_url
}, function () {
}, "确认退款吗?")
}
}]), angular.module("storeApp").controller("goodsBuyerCtrl", ["$scope", "$http", "config", function (a, n, i) {
a.duration = 1, a.unit = i.unit, a.expiretime = i.expiretime, a.singlePrice = i.singlePrice, a.price = i.singlePrice, a.account_list = i.account_list, a.wxapp = i.wxapp, a.wxapp_account_list = i.wxapp_account_list, a.uniacid = i.first_uniacid, a.goods = i.goods, a.pay_way_list = i.pay_way, a.packages = i.packages, 0 == a.pay_way_list.length ? a.pay_way = "" : a.pay_way = a.pay_way_list.alipay ? "alipay" : "wechat", a.changePayWay = function (e) {
a.pay_way = e
}, a.changeDuration = function (e) {
a.duration = e
}, a.submit_order = function (t) {
if (a.duration <= 0) return util.message("购买时长不合法,请重新填写!"), !1;
var e = {
uniacid: a.uniacid,
price: i.singlePrice,
goodsid: a.goods.id,
duration: a.duration,
type: a.pay_way,
wxapp: a.wxapp
};
n.post("./index.php?c=site&a=entry&module_name=store&do=goodsbuyer&operate=submit_order&direct=1", e).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
location.href = "./index.php?c=site&a=entry&module_name=store&do=goodsbuyer&operate=pay_order&direct=1&orderid=" + e.message.message, location.href = "order" == t ? "./index.php?c=site&a=entry&module_name=store&do=orders&direct=1" : "./index.php?c=site&a=entry&module_name=store&do=goodsbuyer&operate=pay_order&direct=1&orderid=" + e.message.message
})
}, a.changeExpire = function (t, e) {
t = "" == t || null == t ? a.duration : t, e = "" == e || null == e ? a.uniacid : e, n.post("./index.php?c=site&a=entry&operate=change_order_expire&direct=1&do=changeorderexpire&module_name=store", {
duration: t,
unit: a.unit,
uniacid: e,
goodsid: a.goods.id
}).success(function (e) {
0 == e.message.errno && (a.expiretime = e.message.message, a.price = 100 * a.singlePrice * t / 100)
})
}, a.$watch("duration", function (e, t, a) {
a.changeExpire(e, "")
}), a.$watch("uniacid", function (e, t, a) {
a.changeExpire("", e)
})
}]), angular.module("storeApp").controller("storePermissionCtrl", ["$scope", "$http", "config", function (t, a, n) {
t.blacklist = n.blacklist, t.whitelist = n.whitelist, t.permissionStatus = n.permissionStatus, t.addUsername = "", t.changeType = function (e) {
"close" != e || t.permissionStatus.close ? t.type = e : confirm("确定要关闭权限设置吗?如若这样做,所有系统用户都可访问商城!") && (t.type = e, t.changeStatus())
}, t.changeStatus = function () {
a.post(n.links.changeStatus, {type: t.type}).success(function (e) {
0 == e.message.errno ? "close" == t.type ? (t.permissionStatus.close = !0, util.message(e.message.message)) : util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, t.addUser = function () {
a.post(n.links.addUser, {type: t.type, username: t.addUsername}).success(function (e) {
t.addUsername = "", 0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, t.deleteUser = function (e) {
a.post(n.links.deleteUser, {type: t.type, username: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, t.changeType(n.type)
}]), angular.module("systemApp", ["we7app"]), angular.module("systemApp").controller("MenuCtrl", ["$scope", "$http", function (a, n) {
a.subItemGroup = {}, a.displayStatus = {}, a.mainMenu = {
permission: "",
displayorder: 0
}, a.editItemPanel = function (e) {
e && (a.activeItem = {}, a.activeItem = e, $(".js-edit-panel").modal())
}, a.editMainMenu = function (e, t) {
a.mainMenu.displayorder = e, a.mainMenu.permission = t, $("#editorder").modal("show")
}, a.saveorder = function () {
n.post("./index.php?c=system&a=menu&do=change_displayorder", a.mainMenu).success(function (e) {
0 == e.message.errno ? ($("#editorder").modal("hide"), util.message("操作成功", e.redirect, "ajax")) : util.message("操作失败", "", "info")
})
}, a.editItem = function () {
n.post("./index.php?c=system&a=menu&do=post", a.activeItem).success(function (e) {
e.message.errno ? util.message(e.message.message) : (a.activeItem.isNew && a.subItemGroup[a.activeItem.group].push(a.activeItem), util.message(e.message.message, e.redirect, "ajax"), $(".js-edit-panel").modal("hide"))
})
}, a.addSubItem = function (e, t) {
a.subItemGroup[e] || (a.subItemGroup[e] = []);
t = {
title: t.title,
url: t.url,
permissionName: t.permissionName,
icon: t.icon,
displayorder: t.displayorder,
isDisplay: t.isDisplay,
isSystem: !1,
group: e,
isNew: !0
};
a.editItemPanel(t)
}, a.selectMenuIcon = function () {
util.iconBrowser(function (e) {
a.activeItem.icon = e, a.$apply("activeItem")
})
}, a.removeSubItem = function (e, t) {
e && confirm("确认删除此菜单?") && (void 0 === t ? n.post("./index.php?c=system&a=menu&do=delete", {permission_name: e}).success(function (e) {
e.message.errno ? util.message(e.message.message) : util.message(e.message.message, "refresh")
}) : a.subItemGroup[e].splice(t, 1))
}, a.changeDisplay = function (t) {
1 == a.displayStatus[t] ? status = 0 : status = 1, n.post("./index.php?c=system&a=menu&do=display_status", {
status: status,
permission_name: t
}).success(function (e) {
a.displayStatus[t] = !!parseInt(status)
})
}
}]), angular.module("systemApp").controller("WelcomeCtrl", ["$scope", "$http", "config", "$filter", "we7TypeDefault", function (n, a, i, s, t) {
n.recommend = {
recommend: {name: "推荐应用", list: [], ads: [], icon: "recommend"},
"new-app": {name: "新应用", list: [], ads: [], icon: "new"},
essential: {name: "下载排行", list: [], ads: [], icon: "down"},
hot: {name: "热门排行", list: [], ads: [], icon: "hot"},
large: {name: "大额应用排行", list: [], ads: [], icon: "big"}
}, n.total_count = 0, n.new_app_count = 0, require([i.apiLink + "/jsdata/app/app-count"], function (e) {
e && e.total_count && e.new_app_count && (n.total_count = e.total_count, n.new_app_count = e.new_app_count)
}), require([i.apiLink + "/jsdata/app/recommend/9"], function (e) {
n.recommend.recommend.list = e, n.showLoading = !1
}), require([i.apiLink + "/jsdata/popularize/bottom"], function (e) {
n.recommend.recommend.ads = e, n.$apply()
}), require([i.apiLink + "/jsdata/popularize/ads"], function (e) {
for (var t in e) 3 == e[t].position && n.recommend["new-app"].ads.push(e[t]), 4 == e[t].position && n.recommend.hot.ads.push(e[t]), 5 == e[t].position && n.recommend.essential.ads.push(e[t]), 6 == e[t].position && n.recommend.large.ads.push(e[t]);
n.$apply()
}), n.changeTab = function (a) {
a && n.recommend[a].list.length <= 0 && (n.showLoading = !0, require([i.apiLink + "/jsdata/app/" + a + "/9"], function (e) {
for (var t in e) e[t] && e[t].last_upgrade_time && (e[t].last_upgrade_time = moment(1e3 * e[t].last_upgrade_time).format("YYYY-MM-DD"));
n.recommend[a].list = e, n.showLoading = !1, n.$apply()
}))
}, n.loaderror = 0, n.ads = null, n.account_uninstall_modules_nums = 0, n.wxapp_uninstall_modules_nums = 0, n.account_modules_total = 0, n.wxapp_modules_total = 0, n.not_installed_module = [], n.not_installed_show = 0, n.get_module_statistics = function () {
a({
url: i.moduleStatisticsUrl, method: "POST", data: {}, beforeSend: function () {
}, complete: function () {
}
}).success(function (e) {
0 == e.message.errno && (n.module_statistics = e.message.message)
})
}, n.getWorkerInfo = function () {
a.post(i.getWorkerOrderUrl).success(function (e) {
n.workerInfo = e.message.message
})
}, n.getWorkerInfo(), n.upgrade_module_nums = [], n.upgrade_module_nums.account_upgrade_module_nums = 0, n.upgrade_module_nums.wxapp_upgrade_module_nums = 0, n.upgrade_module_list = [], n.upgrade_modules = [], n.get_upgrade_modules = function () {
a({
url: i.upgradeModulesUrl, method: "POST", data: {unstall: 1}, beforeSend: function () {
}, complete: function () {
}
}).success(function (e) {
0 == e.message.errno && (n.upgrade_module_list_show = !0, n.upgrade_module_list = e.message.message, n.count_ignore_modules = 0, n.count_modules = 0, n.count_modules_has_new_version = 0, n.count_modules_has_new_branch = 0, n.count_modules_uninstall = 0, n.upgrade_module_list_all = [], n.ignore_modules = [], n.has_new_version_modules = [], n.has_new_branch_modules = [], n.uninstall_modules = [], angular.forEach(n.upgrade_module_list, function (e) {
n.count_modules += 1, n.upgrade_module_list_all.length < 6 && 1 != e.is_ignore && n.upgrade_module_list_all.push(e), 1 == e.is_ignore && (n.count_ignore_modules += 1, n.count_ignore_modules <= 6 && n.ignore_modules.push(e)), 1 == e.has_new_version && (n.count_modules_has_new_version += 1, n.has_new_version_modules.length < 6 && 1 != e.is_ignore && n.has_new_version_modules.push(e)), 1 == e.has_new_branch && (n.count_modules_has_new_branch += 1, n.has_new_branch_modules.length < 6 && 1 != e.is_ignore && n.has_new_branch_modules.push(e)), 1 == e.unstall && (n.count_modules_uninstall += 1, n.count_modules_uninstall <= 6 && n.uninstall_modules.push(e))
}), n.upgrade_modules = n.upgrade_module_list_all, n.count_ignore_modules == n.count_modules && (n.upgrade_module_list_show = !1), angular.forEach(n.upgrade_modules, function (a) {
a.supportArray = [], angular.forEach(t, function (e, t) {
2 == a[t + "_support"] && a.supportArray.push(t + "_support")
})
}))
})
}, n.searchType = function (e) {
n.upgrade_modules = [], "all" == e ? (n.upgrade_modules = n.upgrade_module_list_all, n.search_type_name = "all") : "has_new_version" == e ? (n.upgrade_modules = n.has_new_version_modules, n.search_type_name = "has_new_version") : "has_new_branch" == e ? (n.upgrade_modules = n.has_new_branch_modules, n.search_type_name = "has_new_branch") : "unstall" == e && (n.upgrade_modules = n.uninstall_modules, n.search_type_name = "unstall")
}, n.upgrade_show = 0, n.get_system_upgrade = function () {
a({
url: i.systemUpgradeUrl, method: "POST", data: {}, beforeSend: function () {
}, complete: function () {
util.loaded()
}
}).success(function (e) {
0 == e.message.errno && !0 === e.message.message && (n.upgrade_show = 1)
})
}, n.get_ads = function () {
require([i.apiLink + "/jsdata/popularize/top"], function (e) {
e && e.length ? n.ads = e : (n.ads = null, n.loaderror = 1)
})
}, n.close_ads = function () {
n.setCookie("closed_system_ads", angular.toJson(n.ads), 365), n.ads = null
}, n.setCookie = function (e, t, a) {
var n = new Date;
n.setTime(n.getTime() + 24 * a * 60 * 60 * 1e3);
var i = "expires=" + n.toGMTString();
document.cookie = e + "=" + t + "; " + i
}, n.getCookie = function (e) {
for (var t = e + "=", a = document.cookie.split(";"), n = 0; n < a.length; n++) {
var i = a[n].trim();
if (0 == i.indexOf(t)) return i.substring(t.length, i.length)
}
return ""
}, n.closeRecommend = function () {
n.is_recommend_close = 1, n.setCookie("closed_system_recommend", 1, 1)
}, n.getRecommendShow = function () {
n.is_recommend_close = n.getCookie("closed_system_recommend")
}, n.getRecommendShow(), n.get_not_installed_module = function () {
a.post("./index.php?c=home&a=welcome&do=get_not_installed_modules").success(function (e) {
0 == e.message.errno && (n.not_installed_module = e.message.message, n.not_installed_module && (n.not_installed_show = 1))
})
}, n.ignoreUpdate = function (t) {
a.post(i.ignoreUpdateUrl, {name: t}).success(function (e) {
0 == e.message.errno && (n.upgrade_module_list[t].is_ignore = 1)
})
}, n.removeUnstallModule = function (e) {
var a = "";
angular.forEach(e.supportArray, function (e, t) {
a += "&supports[]=" + e
});
var t = i.links.removeUnstallModuleUrl + "&module_name=" + e.name + a;
window.location.href = t
}, n.get_module_statistics(), n.get_upgrade_modules(), n.get_system_upgrade(), n.get_not_installed_module(), n.get_ads(), n.moduleLink = function (e) {
1 == e.has_new_branch || 1 == e.has_new_version ? location.href = e.link : 1 == e.unstall && (2 == e.welcome_support ? location.href = i.moduleNotInstalledUrl + "support=welcome_support" : location.href = i.moduleNotInstalledUrl)
}, n.today = new Date, n.yestory = n.today - 864e5, n.week_ago = n.today - 5184e5, n.$watch("dayType", function (e) {
"today" == e ? n.dateRange = {
startDate: s("date")(n.today, "yyyy-MM-dd"),
endDate: s("date")(n.today, "yyyy-MM-dd")
} : "yestoday" == e ? n.dateRange = {
startDate: s("date")(n.yestory, "yyyy-MM-dd"),
endDate: s("date")(n.yestory, "yyyy-MM-dd")
} : "week" == e && (n.dateRange = {
startDate: s("date")(n.week_ago, "yyyy-MM-dd"),
endDate: s("date")(n.today, "yyyy-MM-dd")
})
}, !0), require(["echarts"], function (e) {
var t = e.init(document.getElementById("chart-line"));
t.showLoading("default", {color: "#3296fa"}), accountOption = {
tooltip: {
trigger: "axis",
axisPointer: {type: "line"}
},
legend: {data: ["访问次数", "访问人数"], right: "10px"},
grid: {left: "20px", right: "40px", bottom: "30px", containLabel: !0},
xAxis: {boundaryGap: !1, axisLine: {lineStyle: {color: "#999"}, onZero: !0}, data: []},
yAxis: {axisLine: {show: !1, lineStyle: {color: "#999"}}},
series: [{name: "访问次数", type: "line", smooth: !0, data: []}, {
name: "访问人数",
type: "line",
smooth: !0,
data: []
}]
}, n.dateRange = {
startDate: s("date")(n.today - 5184e5, "yyyy-MM-dd"),
endDate: s("date")(n.today, "yyyy-MM-dd")
}, n.getAccountApi = function (e) {
n.timeType = e, a.post(i.links.accountApi, {
type: "all",
time_type: e,
daterange: n.dateRange
}).success(function (e) {
t.hideLoading(), accountOption.xAxis.data = e.message.message.data_x, accountOption.series[0].data = e.message.message.data_y, accountOption.series[1].data = e.message.message.data_y_ip, t.setOption(accountOption)
})
}, n.timeType = "week", n.getAccountApi(n.timeType), n.$watch("dateRange", function (e, t) {
e && e != t && (n.dateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), n.dateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), n.getAccountApi("daterange"))
}, !0)
}), require(["echarts"], function (e) {
$("#fangwen").addClass("in active");
var t = e.init(document.getElementById("chart-line-fangwen"));
t.showLoading("default", {color: "#3296fa"}), $("#fangwen").removeClass("in active"), webOption = {
tooltip: {
trigger: "axis",
axisPointer: {type: "line"}
},
legend: {data: ["访问次数", "访问人数"], right: "10px"},
grid: {left: "20px", right: "40px", bottom: "30px", containLabel: !0},
xAxis: {boundaryGap: !1, axisLine: {lineStyle: {color: "#999"}, onZero: !0}, data: []},
yAxis: {axisLine: {show: !1, lineStyle: {color: "#999"}}},
series: [{name: "访问次数", type: "line", smooth: !0, data: []}, {
name: "访问人数",
type: "line",
smooth: !0,
data: []
}]
}, n.dateRange = {
startDate: s("date")(n.today - 5184e5, "yyyy-MM-dd"),
endDate: s("date")(n.today, "yyyy-MM-dd")
}, n.getWebApi = function (e) {
n.timeType = e, a.post(i.links.accountApi, {
time_type: e,
type: "web",
daterange: n.dateRange
}).success(function (e) {
t.hideLoading(), webOption.xAxis.data = e.message.message.data_x, webOption.series[0].data = e.message.message.data_y, webOption.series[1].data = e.message.message.data_y_ip, t.setOption(webOption)
})
}, n.timeType = "week", n.getWebApi(n.timeType), n.$watch("dateRange", function (e, t) {
e && e != t && (n.dateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), n.dateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), n.getWebApi("daterange"))
}, !0)
}), require(["echarts"], function (e) {
$("#app_count").addClass("in active");
var t = e.init(document.getElementById("chart-line-app-count"));
t.showLoading("default", {color: "#3296fa"}), $("#app_count").removeClass("in active"), appOption = {
tooltip: {
trigger: "axis",
axisPointer: {type: "line"}
},
legend: {data: ["访问次数", "访问人数"], right: "10px"},
grid: {left: "20px", right: "40px", bottom: "30px", containLabel: !0},
xAxis: {boundaryGap: !1, axisLine: {lineStyle: {color: "#999"}, onZero: !0}, data: []},
yAxis: {axisLine: {show: !1, lineStyle: {color: "#999"}}},
series: [{name: "访问次数", type: "line", smooth: !0, data: []}, {
name: "访问人数",
type: "line",
smooth: !0,
data: []
}]
}, n.dateRange = {
startDate: s("date")(n.today - 5184e5, "yyyy-MM-dd"),
endDate: s("date")(n.today, "yyyy-MM-dd")
}, n.getAppApi = function (e) {
n.timeType = e, a.post(i.links.accountApi, {
time_type: e,
type: "app",
daterange: n.dateRange
}).success(function (e) {
t.hideLoading(), appOption.xAxis.data = e.message.message.data_x, appOption.series[0].data = e.message.message.data_y, appOption.series[1].data = e.message.message.data_y_ip, t.setOption(appOption)
})
}, n.timeType = "week", n.getAppApi(n.timeType), n.$watch("dateRange", function (e, t) {
e && e != t && (n.dateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), n.dateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), n.getAppApi("daterange"))
}, !0)
})
}]), angular.module("systemApp").controller("ipWhiteListCtrl", ["$scope", "$http", "config", function (t, a, e) {
t.lists = e.lists, t.links = e.links, t.ips = "", t.changeStatus = function (e) {
a.post(t.links.change_status, {ip: e}).success(function (e) {
0 == e.message.errno ? location.reload() : util.message(e.message.message, e.redirect, "ajax")
})
}, t.saveIp = function () {
$("#myModalIp").modal("hide"), a.post(t.links.add_link_ips, {ips: t.ips}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message) : util.message("添加成功", e.redirect, "ajax")
})
}
}]), angular.module("systemApp").controller("sensitiveWord", ["$scope", "$http", "config", function (t, a, e) {
t.lists = e.lists, t.links = e.links, t.word = "", t.saveWords = function () {
$("#myModalSensitive").modal("hide"), a.post(t.links.add_word_link, {word: t.word}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message) : util.message("添加成功", e.redirect, "ajax")
})
}, t.del = function (e) {
a.post(t.links.del_word_link, {word: e}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message) : util.message("删除成功", e.redirect, "ajax")
})
}
}]), angular.module("systemApp").controller("SystemThirdpartyLogin", ["$scope", "$http", "serviceCommon", "config", function (a, n, i, s) {
a.saveSettingUrl = s.saveSettingUrl, a.thirdlogin = s.thirdlogin, a.links = s.links, a.siteroot = s.siteroot, a.url = s.url, a.binds = s.binds, a.bind = s.bind, a.newappid = "", a.newappsecret = "", a.httpChange = function (e, t) {
switch (e) {
case"authstate":
n.post(a.links.save_setting, {authstate: "authstate", type: t}).success(function (e) {
0 == e.message.errno ? util.message("修改成功", e.redirect) : util.message("修改失败,请稍后重试!")
});
break;
case"appid":
$("#AppID").modal("hide"), n.post(a.links.save_setting, {
appid: a.newappid,
type: t
}).success(function (e) {
0 == e.message.errno ? util.message("修改成功", e.redirect) : util.message("修改失败,请稍后重试!")
});
break;
case"appsecret":
$("#AppSecret").modal("hide"), n.post(a.links.save_setting, {
appsecret: a.newappsecret,
type: t
}).success(function (e) {
0 == e.message.errno ? util.message("修改成功", e.redirect) : util.message("修改失败,请稍后重试!")
})
}
}, a.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;z-index:10;margin-top:10px"><i class="fa fa-check-circle"></i> 复制成功</span>');
i.copySuccess(e, t)
}, a.saveSettingSwitch = function (e, t) {
t = 0 == t || null == t ? 1 : 0, window.location.href = s.saveSettingUrl + "&key=" + e + "&value=" + t + "&submit=1"
}, a.saveSetting = function (e, t) {
var a = e.value.id ? e.value.id : e.value;
window.location.href = s.saveSettingUrl + "&key=" + t + "&value=" + a + "&submit=1"
}
}]), angular.module("systemApp").controller("systemOauthCtrl", ["$scope", "$http", "config", function (t, e, a) {
t.oauthHost = a.oauthHost, t.originalHost = a.oauthHost, t.oauthAccount = a.oauthAccount, t.oauthtitle = a.oauthAccounts[a.oauthAccount], t.links = a.links, t.saveOauth = function () {
e.post(t.links.oauth_link, {account: t.oauthAccount, host: t.oauthHost}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message) : (t.originalHost = t.oauthHost, util.message("成功", e.redirect, "ajax"))
})
}
}]), angular.module("systemApp").controller("SmsSignCtrl", ["$scope", "$http", "config", function (t, a, e) {
t.all_signatures = e.all_signatures, t.site_sms_sign = e.site_sms_sign, t.links = e.links, t.saveSms = function (e) {
a.post(t.links.site_sms_sign_link, {
register: t.site_sms_sign.register,
find_password: t.site_sms_sign.find_password,
user_expire: t.site_sms_sign.user_expire
}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message, e.redirect, "error") : util.message("设置成功", e.redirect, "success")
})
}
}]), angular.module("systemApp").controller("systemInfoCtrl", ["$scope", "$http", "config", function (t, e, a) {
t.content = "查看", t.attachSize = function () {
-1 != t.content.indexOf("查看") && (t.content = "请稍候...", e.get(a.get_attach_size_url).success(function (e) {
e.message.message.attach_size ? t.content = e.message.message.attach_size : t.content = 0
}))
}
}]), angular.module("systemApp").controller("systemCheckCtrl", ["$scope", "$http", "config", function (a, e, n) {
a.account_post_url = n.links.account_post_url, a.check_num = n.check_num + 1, a.check_wrong_num = n.check_wrong_num, a.checkFpm = function (t) {
a.checkFpmStatus = 0, e.get(n.links.check_fpm_link).success(function (e) {
e ? (a.checkFpmStatus = 2, t && (a.check_wrong_num += 1)) : a.checkFpmStatus = 1
})
}, a.checkFpm(!0)
}]), angular.module("systemApp").controller("systemSiteSettingCtrl", ["$scope", "$http", "config", function (t, i, s) {
t.settings = s.settings, t.template_ch_name = s.template_ch_name, t.template = s.template, t.login_ch_name = s.login_ch_name, t.policeicp = {
value: {
location: "",
code: ""
}
}, t.icps = s.icps, t.saveSetting = function (e, t, a) {
var n = "string" == a ? 0 : 1;
i.post(s.links.saveSettingUrl, {key: t, value: e.value, is_int: n}).success(function (e) {
0 == e.message.errno ? util.message("操作成功!", location.reload(), "success") : util.message("操作失败!", e.redirect, "error")
})
}, t.saveSettingSwitch = function (e, t, a) {
if ("login_verify_status" === e && !a) return $("#login_verify").modal("show"), !1;
t = 0 == t || null == t || "" == t ? 1 : 0, i.post(s.links.saveSettingUrl, {
key: e,
value: t,
is_int: 1
}).success(function (e) {
0 == e.message.errno ? util.message("操作成功!", location.reload(), "success") : util.message("操作失败!", e.redirect, "error")
})
}, t.changePicture = function (a, t) {
require(["fileUploader"], function (e) {
e.init(function (e) {
if ("slides" == a) {
var t = [];
angular.forEach(e, function (e) {
t.push(e.attachment)
}), value = t
} else value = e.attachment;
i.post(s.links.saveSettingUrl, {key: a, value: value, is_int: 0}).success(function (e) {
0 == e.message.errno ? util.message("添加成功!", location.reload(), "success") : util.message("添加失败!", e.redirect, "error")
})
}, {type: "image", direct: !0, multiple: t, uniacid: 0, global: !0})
})
}, t.changeDefault = function (e) {
i.post(s.links.saveSettingUrl, {key: e, value: "", is_int: 0}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect, "error")
})
}, t.showCoordinate = function () {
require(["util"], function (t) {
t.map({}, function (e) {
key = "baidumap", i.post(s.links.saveSettingUrl, {
key: key,
lng: e.lng,
lat: e.lat
}).success(function (e) {
0 == e.message.errno ? t.message("操作成功!", location.reload(), "success") : t.message("操作失败!", e.redirect, "error")
})
})
})
}, t.addIcps = function () {
t.domains_data = [""], t.icps_data = [""], t.policeicp_location_data = [""], t.policeicp_code_data = [""], t.electronic_license_data = [""], $("#add-icps").modal("show")
}, t.pulsIcps = function () {
t.domains_data.push(""), t.icps_data.push(""), t.policeicp_location_data.push(""), t.policeicp_code_data.push(""), t.electronic_license_data.push("")
}, t.delIcps = function (e) {
t.domains_data.splice(e, 1), t.icps_data.splice(e, 1), t.policeicp_location_data.splice(e, 1), t.policeicp_code_data.splice(e, 1), t.electronic_license_data.splice(e, 1)
}, t.editIcp = function (e) {
t.key = e, t.currentIcp = angular.copy(t.icps[e]), $("#edit-icp").modal("show")
}, t.saveIcps = function () {
t.icps_form.$valid && i.post(s.links.editIcpUrl, t.currentIcp).success(function (e) {
0 == e.message.errno ? ($("#add-icps").modal("hide"), util.message(e.message.message, "refresh", "success")) : util.message(e.message.message, "", "info")
})
}, t.updateIcp = function () {
t.icps_edit.$valid && i.post(s.links.editIcpUrl, t.currentIcp).success(function (e) {
0 == e.message.errno ? ($("#edit-icp").modal("hide"), util.message(e.message.message, "refresh", "success")) : util.message(e.message.message, "", "info")
})
}, t.deleteIcp = function (e) {
i.post(s.links.delIcpUrl + "&id=" + e).success(function (e) {
0 == e.message.errno ? ($("#edit-icp").modal("hide"), util.message(e.message.message, "refresh", "success")) : util.message(e.message.message, "", "info")
})
}
}]), angular.module("systemApp").controller("globalAttachmentCtrl", ["$scope", "$http", "config", function (e, i, s) {
e.upload = s.upload, e.saveSetting = function (e, t) {
if ("image_thumb" == t) var a = e; else a = e.value;
var n = {token: s.token, submit: 1, key: t, value: a};
i.post(s.saveSettingUrl, n).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}
}]), angular.module("systemApp").controller("databaseCtrl", ["$scope", "$http", "config", function (n, e, i) {
n.moduleCloud = i.moduleCloud, n.links = i.links, n.all = !1, n.changeSelect = function () {
for (var e in n.all = !0, n.moduleCloud) 1 != n.moduleCloud[e].module_status || n.moduleCloud[e].selected || (n.all = !1)
}, n.selectAll = function () {
for (var e in n.moduleCloud) 1 == n.moduleCloud[e].module_status && (n.moduleCloud[e].selected = n.all)
}, n.loadAll = function () {
for (var e in n.moduleCloud) 1 == n.moduleCloud[e].module_status && n.moduleCloud[e].selected && n.loadData(e)
}, n.loadData = function (a) {
n.moduleCloud[a].module_status = 33, e.post(i.links.loadData, {module_name: a}).success(function (e) {
if (e.message && 0 == e.message.errno) if (n.moduleCloud[a].scrap_table = e.message.message, e.message.message) {
for (var t in n.moduleCloud[a].num = 0, e.message.message) n.moduleCloud[a].num++;
n.moduleCloud[a].module_status = 44
} else n.moduleCloud[a].module_status = 2, n.changeStatus(a, 2); else util.message(e.message ? e.message.message : n.moduleCloud[a].title + "检测出错"), n.moduleCloud[a].module_status = 1
})
}, n.changeStatus = function (t, a) {
a || (a = 3 != n.moduleCloud[t].module_status ? 3 : 1), e.post(i.links.changeStatus, {
module_name: t,
module_status: a
}).success(function (e) {
0 == e.message.errno ? n.moduleCloud[t].module_status = a : util.message(e.message.message)
})
}, n.showDetail = function (e) {
$("#scrap_table_detail").modal("show"), n.activeModule = n.moduleCloud[e]
}, n.deleteScrapTable = function (t) {
e.post(i.links.deleteScrapTable, {module_name: t, tables: n.moduleCloud[t].scrap_table}).success(function (e) {
0 == e.message.errno ? (n.moduleCloud[t].scrap_table = "", n.moduleCloud[t].module_status = 55, util.message("删除成功!", "", "success")) : util.message(e.message.message)
})
}
}]), angular.module("systemApp").service("serviceCommon", ["$rootScope", function (e) {
var t = {
copySuccess: function (e, t) {
e = parseInt(e), t = t;
var a = $("#copy-" + e).next().html();
(!a || a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>') < 0) && $("#copy-" + e).after(t), setTimeout(function () {
t.remove()
}, 2e3)
}
};
return t
}]),angular.module("userCardApp", ["wapeditorApp"]).controller("MainCtrl", ["$scope", "widget", "config", "serviceBase", "serviceUserCardBase", "serviceSubmit", "serviceCommon", "$sanitize", function (n, e, t, i, a, s, o, r) {
n.modules = [], n.editors = [], n.activeModules = i.initActiveModules(t.activeModules), n.activeItem = {}, n.activeIndex = 0, n.index = t.activeModules ? t.activeModules.length : 0, n.submit = {
params: {},
html: ""
}, n.newcard = t.newcard, n.fansFields = t.fansFields, n.$on("serviceBase.editors.update", function (e, t) {
n.editors = t
}), n.$on("serviceBase.activeItem.update", function (e, t) {
n.activeItem = t
}), n.$on("serviceBase.activeModules.update", function (e, t) {
n.activeModules = t
}), n.addItem = function (e) {
i.addItem(e)
}, n.editItem = function (e) {
a.editItem(e)
}, n.deleteItem = function (e) {
i.deleteItem(e)
}, n.init = function (e, t) {
if (n.modules = i.setModules(e, t), 0 < n.activeModules.length) {
var a = [];
angular.forEach(n.activeModules, function (e, t) {
e && a.push(e.id)
})
}
angular.forEach(n.modules, function (e, t) {
e.defaultshow && -1 == $.inArray(e.id, a) && i.addItem(e.id)
})
}, n.url = function (e) {
return o.url(e)
}, n.tomedia = function (e) {
return o.tomedia(e)
}, n.submit = function (e) {
n.submit = s.submit(), n.$apply("submit"), $(e.target).parents("form").submit()
}, n.addFields = function () {
a.addFields()
}, n.removeFields = function (e) {
a.removeFields(e)
}, n.addNums = function () {
a.addNums()
}, n.removeNums = function (e) {
a.removeNums(e)
}, n.addRecharges = function () {
a.addRecharges()
}, n.removeRecharges = function (e) {
a.removeRecharges(e)
}, n.addTimes = function () {
a.addTimes()
}, n.removeTimes = function (e) {
a.removeTimes(e)
}, n.selectCoupon = function () {
a.selectCoupon()
}, n.clearCoupon = function () {
a.clearCoupon()
}, n.addThumb = function (e) {
a.addThumb(e)
}, n.addBgThumb = function () {
a.addBgThumb()
}, $(".single-submit").on("click", function (e) {
n.submit(e)
}), n.init(null, ["cardBasic", "cardActivity", "cardNums", "cardTimes", "cardRecharge"]), n.activeModules[1].params.discounts = t.discounts, n.editItem(0)
}]),angular.module("userCardApp").service("serviceUserCardBase", ["$rootScope", "serviceBase", function (n, i) {
var e = {
triggerActiveItem: function (e) {
$(".app-side .editor").css("marginTop", "0"), i.triggerActiveItem(e)
}, editItem: function (t) {
var e = i.getBaseData("activeModules");
"string" == typeof t && angular.forEach(e, function (e) {
e.id == t && (t = e.index)
}), i.editItem(t)
}, addFields: function () {
var e = i.getBaseData("activeItem");
e.params.fields.push({
title: "",
require: 1,
bind: "",
issystem: 0
}), i.setBaseData("activeItem", e), n.$broadcast("serviceBase.activeItem.update", e)
}, removeFields: function (e) {
if ("mobile" == e.bind || "realname" == e.bind) return !1;
var t = i.getBaseData("activeItem");
t.params.fields = _.without(t.params.fields, e), i.setBaseData("activeItem", t), n.$broadcast("serviceBase.activeItem.update", t)
}, addNums: function () {
i.getBaseData("activeItem").params.nums.push({recharge: "", num: ""})
}, removeNums: function (e) {
var t = i.getBaseData("activeItem");
t.params.nums = _.without(t.params.nums, e), i.setBaseData("activeItem", t), n.$broadcast("serviceBase.activeItem.update", t)
}, addRecharges: function () {
var e = i.getBaseData("activeItem");
e.params.recharges.push({
condition: "",
back: "",
backtype: "0",
backunit: "元"
}), i.setBaseData("activeItem", e), n.$broadcast("serviceBase.activeItem.update", e)
}, removeRecharges: function (e) {
var t = i.getBaseData("activeItem");
t.params.recharges = _.without(t.params.recharges, e), i.setBaseData("activeItem", t), n.$broadcast("serviceBase.activeItem.update", t)
}, addTimes: function () {
var e = i.getBaseData("activeItem");
e.params.times.push({
recharge: "",
time: ""
}), i.setBaseData("activeItem", e), n.$broadcast("serviceBase.activeItem.update", e)
}, removeTimes: function (e) {
var t = i.getBaseData("activeItem");
t.params.times = _.without(t.params.times, e), i.setBaseData("activeItem", t), n.$broadcast("serviceBase.activeItem.update", t)
}, selectCoupon: function () {
var t = i.getBaseData("activeItem");
util.coupon(function (e) {
t.params.grant.coupon = [], angular.forEach(e, function (e) {
t.params.grant.coupon.push({couponTitle: e.title, coupon: e.id})
}), i.setBaseData("activeItem", t), n.$apply(), n.$broadcast("serviceBase.activeItem.update", t)
}, {multiple: !0})
}, clearCoupon: function () {
var e = i.getBaseData("activeItem");
e.params.grant.coupon = [], i.setBaseData("activeItem", e), n.$broadcast("serviceBase.activeItem.update", e)
}, addThumb: function (t) {
var a = i.getBaseData("activeItem");
require(["fileUploader"], function (e) {
e.show(function (e) {
a.params[t] = e.url, i.setBaseData("activeItem", a), n.$apply(), n.$broadcast("serviceBase.activeItem.update", a)
}, {direct: !0, multiple: !1})
})
}, addBgThumb: function () {
var t = i.getBaseData("activeItem");
require(["fileUploader"], function (e) {
e.show(function (e) {
t.params.background.image = e.url, i.setBaseData("activeItem", t), n.$apply(), n.$broadcast("serviceBase.activeItem.update", t)
}, {direct: !0, multiple: !1})
})
}
};
return e
}]),angular.module("userCardApp").controller("CardActivityCtrl", ["$scope", function (a) {
a.$watch("activeItem.params.grant_rate", function (e, t) {
(e += "").match(/^([1-9]\d*(\.(\d)?)?|0(\.(\d)?)?)?$/) ? a.activeItem.params.grant_rate = e : a.activeItem.params.grant_rate = t
})
}]),angular.module("userCardApp").controller("CardBasicCtrl", ["$scope", "config", function (e, t) {
e.creditnames = t.creditnames, e.siteroot = t.siteroot, e.recharge_src = e.siteroot + "/app/resource/images/sum-recharge.png", e.scanpay_src = e.siteroot + "/app/resource/images/scan-pay.png"
}]),angular.module("userCardApp").controller("CardNumsCtrl", ["$scope", function (e) {
}]),angular.module("userCardApp").controller("CardRechargeCtrl", ["$scope", function (e) {
require(["bootstrap"], function (e) {
e(".dropdown-toggle").dropdown()
})
}]),angular.module("userCardApp").controller("CardTimesCtrl", ["$scope", function (e) {
}]),angular.module("userCenterApp", ["wapeditorApp"]),angular.module("userCenterApp").controller("MainCtrl", ["$scope", "$timeout", "widget", "config", "serviceCommon", "serviceSetStyle", "serviceBase", "serviceUcSubmit", "serviceUpwardCompatible", function (s, e, t, a, n, i, o, r, l) {
for (var c in s.modules = [], s.editors = [], s.activeModules = a.activeModules ? a.activeModules : [], s.activeMenus = a.activeMenus ? a.activeMenus : [], s.submit = {
params: {},
html: ""
}, s.isNew = !0, s.siteroot = a.siteroot, s.logo_url = s.siteroot + "/app/resource/images/heading.jpg", _.isEmpty(s.activeModules) || 1 == s.activeModules[0].params.isnew || (s.isNew = !1), s.siteEntrance = a.links.murl, s.activeItem = {}, s.activeIndex = 0, s.index = s.activeModules.length ? s.activeModules.length : 0, o.setBaseData("index", s.index), o.setBaseData("activeModules", s.activeModules), s.pageLength = !_.isEmpty(s.activeModules) && s.activeModules[0].params.pageLength ? s.activeModules[0].params.pageLength : 1, s.isLongPage = !0, s.pageLengths = {
1: 1,
2: 2,
3: 3,
4: 4,
5: 5
}, s.lineHeights = {1: 1, 1.25: 1.25, 1.5: 1.5, 2: 2, 2.5: 2.5}, s.fontSizes = {
12: 12,
14: 14,
16: 16,
18: 18,
20: 20,
22: 22,
24: 24,
26: 26,
28: 28,
30: 30,
32: 32,
34: 34,
36: 36,
38: 38,
40: 40
}, s.isNew || (s.activeModules = l.compatibility(s.activeModules), s.activeModules[0].params.isnew = 1, void 0 === s.activeModules[0].params.pageLength && (s.activeModules[0].params.pageLength = Math.ceil(($(".modules").height() + 520) / 568)), 1 < s.activeModules[0].params.pageLength && (s.pageLength = s.activeModules[0].params.pageLength, o.setBaseData("pageLength", s.pageLength), e(function () {
$(".app-content").css("height", 568 * s.pageLength + "px")
}, 100)), e(function () {
var a = 0, n = height = "";
$(".modules>div").each(function () {
var e = parseInt($(this).attr("index"));
if (n = $(this).find("div.ng-scope[ng-controller$='Ctrl']").css("width"), height = $(this).find("div.ng-scope[ng-controller$='Ctrl']").css("height"), 0 < e) {
for (var t in s.activeModules) s.activeModules[t].index == e && (a += parseInt(s.activeModules[t].marginTop), s.activeModules[t].params.positionStyle.width = parseInt(n), s.activeModules[t].params.positionStyle.height = parseInt(height), s.activeModules[t].params.positionStyle.top = a, s.activeModules[t].positionStyle = "position:absolute;width:" + n + ";height:" + height + ";left:" + s.activeModules[t].params.positionStyle.left + "px;top:" + a + "px;", $(this).find("div[ng-controller]").attr("style", s.activeModules[t].positionStyle));
a += parseInt(height)
}
t++
}), o.setBaseData("activeModules", s.activeModules)
}, 1e3)), s.activeModules) s.activeModules[c].originParams = angular.copy(s.activeModules[c].params);
s.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;z-index:10;width:90px;height:34px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>');
n.copySuccess(e, t)
}, s.$on("serviceBase.editors.update", function (e, t) {
s.editors = t
}), s.$on("serviceBase.activeItem.update", function (e, t) {
s.activeItem = t
}), s.$on("serviceBase.activeModules.update", function (e, t) {
s.activeModules = t
}), s.$on("serviceBase.activeItem.params.update", function (e, t) {
s.activeItem.params = t
}), s.$on("serviceBase.activeItem.animationName.update", function (e, t) {
s.activeItem.params.animationStyle.animationName = t
}), s.$on("serviceBase.activeItem.style.update", function (e, t, a, n, i) {
s.activeItem.params[t] = a, s.activeItem[t] = n, void 0 !== i && (s.activeItem.transform = i)
}), s.$on("updateScope", function (e, t) {
angular.forEach(t, function (e, t) {
s[t] = e
})
}), s.addItem = function (e) {
o.addItem(e, "uc")
}, s.editItem = function (e) {
o.editItem(e)
}, s.deleteItem = function (e) {
o.deleteItem(e)
}, s.submit = function (e) {
s.submit = r.submit(), s.$apply("submit"), $(e.target).parents("form").submit()
}, s.init = function (e, t) {
if (s.modules = o.setModules(e, t), 0 < s.activeModules.length) {
var a = [];
angular.forEach(s.activeModules, function (e, t) {
e && a.push(e.id)
})
}
angular.forEach(s.modules, function (e, t) {
e.defaultshow && -1 == $.inArray(e.id, a) && o.addItem(e.id)
})
}, s.setModulePositionStyle = function (e) {
i.setModulePositionStyle(e)
}, s.eleAnimationIns = function (e) {
i.eleAnimationIns(e)
}, s.savePagePosition = function () {
i.savePagePosition(s.activeModules)
}, s.saveModulePosition = function () {
i.saveModulePosition(s.activeItem)
}, s.changeTextAlign = function (e) {
i.changeTextAlign(s.activeItem, e)
}, s.changeBorderWidth = function () {
i.changeBorderWidth(s.activeItem)
}, s.changeInnerHeight = function () {
i.changeInnerHeight(s.activeItem)
}, s.changePageLength = function (e) {
if (angular.isString(e)) if ("minus" == e && 1 < s.pageLength) e = s.pageLength - 1; else {
if (!("plus" == e && s.pageLength < 5)) return !1;
e = s.pageLength + 1
}
var t = i.changePageLength(e, s.activeModules);
o.setBaseData({pageLength: parseInt(e), activeModules: t})
}, s.clearModuleStyle = function () {
i.clearModuleStyle(s.activeItem)
}, s.addThumb = function (t) {
require(["fileUploader"], function (e) {
e.show(function (e) {
s.activeItem.params[t] = e.url, s.$apply("activeItem")
}, {direct: !0, multiple: !1})
})
}, s.showIconBrowser = function (t) {
util.iconBrowser(function (e) {
t.css.icon.icon = e, s.$apply("activeMenus")
})
}, s.addMenu = function () {
s.activeMenus.push({icon: "", css: {icon: {icon: "fa fa-external-link"}}, name: "", url: ""})
}, s.removeMenu = function (e) {
s.activeMenus = _.without(s.activeMenus, e)
}, $(".single-submit").on("click", function (e) {
s.submit(e)
}), s.init(null, ["UCheader"]), s.changePageLength(s.pageLength), s.editItem(0), s.$watch("activeItem.params.baseStyle", function (e) {
e && i.setModuleBaseStyle(e)
}, !0), s.$watch("activeItem.params.borderStyle", function (e) {
e && i.setModuleBorderStyle(e)
}, !0), s.$watch("activeItem.params.shadowStyle", function (e) {
e && i.setModuleShadowStyle(e)
}, !0), s.$watch("activeItem.params.animationStyle", function (e) {
e && i.setModuleAnimationStyle(e)
}, !0), s.$watch("activeItem.params.positionStyle", function (e) {
e && i.setModulePositionStyle(e)
}, !0)
}]),angular.module("userCenterApp").service("serviceUcSubmit", ["serviceBase", "serviceCommon", function (s, p) {
var e = {
submit: function () {
var u = "", e = {params: {}, html: ""}, t = $($(".modules").html()), d = s.getBaseData("activeModules"),
a = $(".app-usercenter").height(), n = $(".app-content").height() - a + "px";
t.find("div.ng-scope[ng-controller$='Ctrl']").each(function () {
var e, t = _.findIndex(d, {index: parseInt($(this).parent().parent().attr("index"))}),
a = angular.copy(d[t].params);
$(this).find(".js-default-content").remove();
var n = $(this).parent().parent().attr("name").toLowerCase(), i = $(this).css("top"),
s = $(this).css("left"), o = $(this).css("width"), r = $(this).css("height"),
l = "position:absolute;top:" + i + ";left:" + s + ";width:" + o + ";height:" + r + ";";
switch (d[t].params.positionStyle.top = parseInt(i), d[t].params.positionStyle.left = parseInt(s), d[t].params.positionStyle.width = parseInt(o), d[t].params.positionStyle.height = parseInt(r), d[t].positionStyle = l, n) {
case"link":
var c = this;
angular.forEach(a.items, function (e, t) {
(e.selectCate.pid || e.selectCate.cid) && $(c).find(".list-group").children().eq(t).replaceWith("<div>" + p.buildDataTagBegin("link", e) + '<div class="list-group-item ng-scope"><a href="{$row[url]}" class="clearfix"><span class="app-nav-title"> {$row[title]}<i class="pull-right fa fa-angle-right"></i></span></a></div>' + p.buildDataTagEnd() + "</div>")
});
break;
case"richtext":
d[t] && (d[t].params.content = "")
}
if (e = $(this).html(), "header" != n) {
l = $(this).attr("style");
u += '<div type="' + n + '" style="' + l + '">' + e + "</div>"
}
t++
});
var i = d[0].params.bgColor ? d[0].params.bgColor : "";
return u = (u = (u = (u = '<div class="js-design-page" style="background-color:' + i + ";height:" + n + ';position:absolute;">' + u + "</div>").replace(/<\!\-\-([^-]*?)\-\->/g, "")).replace(/ ng\-[a-zA-Z-]+=\"[^\"]*\"/g, "")).replace(/ ng\-[a-zA-Z]+/g, ""), e.html = u, e.params = angular.copy(d), p.stripHaskey(e.params), e
}
};
return e
}]),angular.module("userCreateGroup", ["we7app"]),angular.module("userCreateGroup").controller("userCreateGroupDisplay", ["$scope", "config", "we7TypeDefault", function (e, t, a) {
e.lists = t.lists, e.we7TypeDefault = a, e.edit = function (e) {
window.location.href = t.links.groupPost + "&id=" + e
}, e.delete = function (e) {
util.confirm(function () {
window.location.href = t.links.groupDel + "&id=" + e
}, function () {
return !1
}, "确认删除吗?")
}
}]),angular.module("userCreateGroup").controller("userCreateGroupPost", ["$scope", "config", "we7TypeDefault", function (a, e, t) {
a.groupInfo = e.groupInfo, a.groupInfo || (a.groupInfo = {}, angular.forEach(t, function (e, t) {
a.groupInfo["max" + t] = 0
}))
}]),angular.module("userGroup", ["we7app"]),angular.module("userGroup").controller("UserGroupDisplay", ["$scope", "$http", "config", "we7TypeDefault", function (t, a, e, n) {
t.lists = e.lists, t.links = e.links, t.we7TypeDefault = n, t.editGroup = function (e) {
e = parseInt(e);
location.href = t.links.groupPost + "id=" + e
}, t.delGroup = function (e) {
e = parseInt(e);
util.confirm(function () {
a.post(t.links.groupDel, {id: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, function () {
return !1
}, "确认删除吗?")
}
}]),angular.module("userGroup").controller("UserGroupPost", ["$scope", "$http", "$compile", "config", "we7TypeDefault", function (r, e, l, i, t) {
r.groupInfo = i.groupInfo, r.packages = i.packages, r.changeText = function (e) {
var t = $(e)[0].target.text;
$(e)[0].target.text = "展开" == t ? "收起" : "展开"
}, r.groupInfo || (r.groupInfo = {}, angular.forEach(t, function (e, t) {
r.groupInfo["max" + t] = 0
})), null == r.groupInfo && (r.groupInfo = {check_all: !1}), r.hideCheckAll = !1, r.searchKeywords = "";
var s = i.pagesize, c = null == i.packages ? 0 : Math.ceil(i.packages.length / s);
if (r.checkedGroup = [], r.groupInfo.check_all) r.checkedGroup = angular.copy(i.packages), r.checkedGroup.unshift({
id: "-1",
name: "所有服务"
}); else if (0 < i.checkedGroup.length) for (var a in i.checkedGroup) r.checkedGroup.push(i.checkedGroup[a]);
r.user_modules = {groups: i.packages}, r.selectUniGroup = function () {
}, r.setChecked = function () {
var a = [];
angular.forEach(r.checkedGroup, function (e) {
a.push(e.id)
}), -1 != $.inArray("-1", a) ? angular.forEach(r.packages, function (e, t) {
r.packages[t].checked = !0
}) : angular.forEach(r.packages, function (e, t) {
-1 == $.inArray(e.id, a) ? r.packages[t].checked = !1 : r.packages[t].checked = !0
})
}, r.removeCheckedGroupItem = function (a) {
angular.forEach(r.checkedGroup, function (e, t) {
e.id == a && r.checkedGroup.splice(t, 1), 1 * a == -1 && (r.groupInfo.check_all = !1, r.checkedGroup = [])
}), r.setChecked()
}, r.loadChange = function () {
$(".we7-group-show").each(function () {
$(this).removeClass("low"), $(this).removeClass("closed"), 70 < $(this).find(".group-app-list").outerHeight() ? ($(this).removeClass("low"), $(this).addClass("closed"), $(this).find(".action").on("click", function () {
$(this).parent().toggleClass("closed")
})) : ($(this).addClass("low"), $(this).removeClass("closed"))
})
}, r.pushCheckedGroupItem = function (a, e) {
if (e.target.checked) {
var n = !1;
angular.forEach(r.checkedGroup, function (e, t) {
e.id == a.id && (n = !0)
}), n || (r.checkedGroup.push(a), r.setChecked())
} else 1 * r.checkedGroup[0].id == -1 ? (r.checkedGroup = [], r.groupInfo.check_all = !1, r.setChecked()) : r.removeCheckedGroupItem(a.id)
}, r.checkAllGroup = function (e) {
e.target.checked ? (r.checkedGroup = angular.copy(i.packages), r.checkedGroup.unshift({
id: "-1",
name: "所有服务"
}), r.groupInfo.check_all = !0) : (r.checkedGroup = [], r.groupInfo.check_all = !1), r.setChecked()
}, r.setPackagesData = function (e) {
var t = -1, a = (e - 1) * s;
r.packages = [];
var n = 0;
for (id in i.packages) r.searchKeywords && i.packages[id].name.indexOf(r.searchKeywords) <= -1 || (n += 1);
for (id in i.packages) if (!(r.searchKeywords && i.packages[id].name.indexOf(r.searchKeywords) <= -1 || ++t < a)) {
if (a + s <= t) break;
r.packages.push(i.packages[id])
}
return r.setChecked(), Math.ceil(n / s)
}, r.loadMore = function (e, t, a) {
if (1 == (t *= 1) && "" == r.searchKeywords ? r.hideCheckAll = !1 : r.hideCheckAll = !0, (c = r.setPackagesData(t)) < t) return !1;
var n = Math.max(1, t - 4), i = Math.min(c, t + 4);
i - n < 9 && (i = Math.min(c, n + 8), n = Math.max(1, i - 8));
for (var s = "<li>" + $(".js-pager li:first").html() + "</li>", o = n; o <= i; o++) s += '<li><a href="javascript:;" page="' + o + '" ng-click="loadMore(\'' + e + "'," + o + ')">' + o + "</a></li>";
t != c && (s += '<li><a href="javascript:;" page="' + c + '" ng-click="loadMore(\'' + e + "'," + c + ')">尾页</a></li>'), $(".js-pager ul").html(l(s)(r)), $(".js-pager li").attr("class", ""), $(".js-pager a[page='" + t + "']").parent().attr("class", "active"), $(".js-pager .pager-nav").parent().attr("class", "")
}, r.loadMore("", 1)
}]),angular.module("userGroup").controller("ViceGroupDisplay", ["$scope", "config", "we7TypeDefault", function (t, e, a) {
t.lists = e.lists, t.links = e.links, t.we7TypeDefault = a, t.editGroup = function (e) {
e = parseInt(e);
location.href = t.links.groupPost + "id=" + e
}, t.delGroup = function (e) {
e = parseInt(e);
util.confirm(function () {
location.href = t.links.groupDel + "id=" + e
}, function () {
return !1
}, "确认要删除吗?")
}
}]),angular.module("userManageApp", ["we7app"]),angular.module("userManageApp").directive("checkUsername", ["$http", function (i) {
return {
require: "ngModel", link: function (t, e, a, n) {
t.$watch(a.ngModel, function (e) {
if (null == e || !e) return n.$setValidity("required", !1), n.$setValidity("format", !0), !1;
i.post(t.config.check_user_info_url, {user: t.user}).success(function (e) {
-1 == e.message.errno || -2 == e.message.errno ? (-1 == e.message.errno && n.$setValidity("format", !1), -2 == e.message.errno && (n.$setValidity("unique", !1), n.$setValidity("format", !0))) : (n.$setValidity("unique", !0), n.$setValidity("format", !0))
})
})
}
}
}]),angular.module("userManageApp").controller("UserEditModules", ["$scope", "$http", "$compile", "config", function (i, t, e, s) {
i.user = s.user, i.uid = s.uid, i.profile = s.profile, i.group_info = s.group_info, i.groups = s.groups, i.links = s.links, i.extend = s.extend, i.changeGroup = i.user.groupid || "", i.jurindex = "account", i.allmodule = !1, i.user_modules = s.user_modules, i.source_templates = s.source_templates, i.templates = s.source_templates, i.uni_groups = s.uni_groups, i.user_extra_groups = s.user_extra_groups, i.groupList = {groups: s.uni_groups}, i.moduleList = {
templates: s.source_templates,
modules: i.user_modules.modules
}, s.uni_groups && (i.user_modules.groups = s.uni_groups), s.source_templates && (i.user_modules.templates = s.source_templates), i.recycleUser = function () {
t.post(s.links.recycleUser, {uid: i.user.uid}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect)
})
}, i.editUserGroup = function () {
t.post(i.links.editUserGroup + "uid=" + i.user.uid, {groupid: i.changeGroup}).success(function (e) {
0 == e.message.errno ? (i.group_info = e.message.message, s.user.groupid = i.changeGroup, util.message("修改成功!", "", "success")) : util.message(e.message.message)
})
}, i.changeText = function (e) {
var t = $(e)[0].target.text;
$(e)[0].target.text = "展开" == t ? "收起" : "展开"
}, i.addExtend = function () {
var a = [];
angular.forEach(i.source_templates, function (e, t) {
1 != e.checked && 1 != e.checked || a.push(e.id)
});
var n = [];
angular.forEach(i.user_modules, function (e, t) {
0 < e.length && ("account" == t && (t = "modules"), angular.forEach(e, function (e, t) {
!e.name || 1 != e.checked && 1 != e.checked || n.push(e.name)
}))
}), $("#jurisdiction-add").modal("hide"), t.post(s.links.editUsersPermission, {
type: "extend",
modules: n,
templates: a,
uid: i.user.uid
}).success(function (e) {
0 == e.message.errno ? location.reload(!0) : util.message("参数错误!")
})
}, i.selectUniGroup = function () {
i.selected_uni_groups = [], angular.forEach(i.groupList.groups, function (e, t, a) {
1 == e.checked && i.selected_uni_groups.push(e.id)
}), t.post(s.links.editUniGroupsUrl, {uni_groups: i.selected_uni_groups, uid: i.uid}).success(function (e) {
0 == e.message.errno ? location.reload(!0) : util.message("参数错误!")
})
}, i.selectExtraModules = function () {
i.selected_extra_modules = [], angular.forEach(i.moduleList.modules, function (e, t, a) {
1 == e.checked && i.selected_extra_modules.push({name: e.name, support: e.support})
}), i.selected_extra_templates = [], angular.forEach(i.moduleList.templates, function (e) {
1 == e.checked && i.selected_extra_templates.push({id: e.id})
}), t.post(s.links.editExtraModulesUrl, {
extra_modules: i.selected_extra_modules,
extra_templates: i.selected_extra_templates,
uid: i.uid
}).success(function (e) {
0 == e.message.errno ? location.reload(!0) : util.message("参数错误!")
})
}, i.delUserGroup = function (e) {
util.confirm(function () {
t.post(s.links.deleteUserGroupUrl, {uid: i.uid, groupid: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : uitl.message(e.message.message)
})
}, "确认删除吗?")
}
}]),angular.module("userManageApp").controller("UserEditModulesTpl", ["$scope", "$http", "config", function (i, s, o) {
i.user = o.user, i.profile = o.profile, i.group_info = o.group_info, i.groups = o.groups, i.links = o.links, i.extend = o.extend, i.changeGroup = i.user.groupid, i.jurindex = 0, i.allmodule = !1, i.httpChange = function (e) {
s.post(i.links.editGroup + "uid=" + i.user.uid, {
type: e,
groupid: i.changeGroup,
founder_groupid: i.user.founder_groupid
}).success(function (e) {
0 == e.message.errno ? (i.group_info = e.message.message, util.message("修改成功!", "", "success")) : util.message(e.message.message)
})
}, i.changeText = function (e) {
var t = $(e)[0].target.text;
$(e)[0].target.text = "展开" == t ? "收起" : "展开"
}, i.tabChange = function (e) {
i.jurindex = e, function () {
var e = "#content-templates";
0 == i.jurindex && (e = "#content-modules");
if ($("#jurisdiction-add " + e + " .item").size() == $("#jurisdiction-add " + e + " .item.active").size()) return i.allmodule = !0;
i.allmodule = !1
}()
}, i.allmodulechange = function (e) {
var t = "#content-templates";
0 == i.jurindex && (t = "#content-modules"), e ? $("#jurisdiction-add " + t + " .item").addClass("active") : $("#jurisdiction-add " + t + " .item").removeClass("active")
}, i.addExtend = function () {
var e = "", t = "", a = [], n = [];
$("#jurisdiction-add #content-modules").find(".active").each(function () {
e += '<div class="col-sm-3 text-left we7-margin-bottom"><a href="javascript:;" class="label label-info">' + $(this).attr("data-title") + "</a></div>", a.push($(this).attr("data-name"))
}), $("#jurisdiction-add #content-templates").find(".active").each(function () {
t += '<div class="col-sm-3 text-left we7-margin-bottom"><a href="javascript:;" class="label label-info">' + $(this).attr("data-title") + "</a></div>", n.push($(this).attr("data-id"))
}), e || t ? $(".account-package-extra").show() : $(".account-package-extra").hide(), $(".account-package-extra .js-extra-modules").append(e), $(".account-package-extra .js-extra-templates").append(t), $("#jurisdiction-add").modal("hide"), s.post(o.links.editUsersPermission, {
type: "extend",
module: a,
tpl: n,
uid: i.user.uid
}).success(function (e) {
0 == e.message.errno ? location.reload() : util.message("参数错误!")
})
}
}]),angular.module("userManageApp").controller("UserEditAccount", ["$scope", "$http", "config", "we7TypeDefault", function (n, i, s, e) {
n.user = s.user, n.uid = s.uid, n.account_list = s.account_list, n.profile = s.profile, n.groups = s.groups, n.group_info = s.group_info, n.extra_limit_info = s.extra_limit_info || {timelimit: 0}, n.total_timelimit = s.total_timelimit, n.we7TypeDefault = e, n.links = s.links, n.user_groups = s.user_groups, n.changeGroup = 0, n.create_account_info = s.create_account_info, n.user.starttime = 0 < n.user.starttime ? n.user.starttime : n.user.joindate, n.group_info && 0 < n.group_info.timelimit ? n.startDate = moment(1e3 * n.user.starttime).add(Number(n.group_info.timelimit) + Number(n.extra_limit_info.timelimit), "days").format("YYYY-MM-DD") : n.startDate = 0 < n.extra_limit_info.timelimit ? moment(1e3 * n.user.starttime).add(Number(n.extra_limit_info.timelimit), "days").format("YYYY-MM-DD") : moment(1e3 * n.user.starttime).format("YYYY-MM-DD"), n.dateRange = {
startDate: n.startDate,
endDate: n.startDate
}, n.datePickerConfig = {
minDate: n.group_info && 0 < n.group_info.timelimit ? moment(1e3 * n.user.starttime).add(Number(n.group_info.timelimit), "days").format("YYYY-MM-DD") : moment(1e3 * n.user.starttime).format("YYYY-MM-DD"),
startDate: n.startDate,
endDate: n.startDate,
timePicker: !1,
singleDatePicker: !0
}, setTimeout(function () {
$("select").niceSelect && $("select").niceSelect("update")
}, 1), n.extraCreateGroup = function (e) {
var a = {}, t = "&operate=";
if ("group" == e ? (a.group_ids = [], a.del_ids = [], t += "extend_group", angular.forEach(n.create_account_info.create_groups, function (e, t) {
1 == e.checked ? a.group_ids.push(e.id) : a.del_ids.push(e.id)
})) : "numbers" == e && (a.numbers = n.create_account_info.create_numbers, t += "extend_numbers"), !a) return !1;
i.post(s.links.extra_create_account_url + t, a).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect)
})
}, n.deleteCreateGroup = function (e) {
i.post(s.links.extra_create_account_url + "&operate=delete", {group_ids: [e]}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect)
})
}, n.httpChange = function (e) {
i.post(n.links.editGroup + "uid=" + n.user.uid, {
type: e,
groupid: n.changeGroup,
founder_groupid: n.user.founder_groupid
}).success(function (e) {
0 == e.message.errno ? (n.group_info = e.message.message, util.message("修改成功!", s.links.editCreateAccountList, "success")) : util.message(e.message.message)
})
}, n.recycleUser = function () {
i.post(s.links.recycleUser, {uid: n.user.uid}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect)
})
}, n.changeGroupId = function (e) {
n.groupid = e
}, n.changeGroup = function () {
i.post(s.links.editUserGroup, {groupid: n.groupid}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, "", "success") : util.message(e.message.message, ""), location.reload(!0)
})
}, n.chageExtraTimelimit = function () {
i.post(s.links.chageExtraTimelimit, {timelimit: n.extra_limit_info.timelimit}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, n.changeTime = function (e) {
var t = moment(n.datePickerConfig.minDate).add(Number(n.extra_limit_info.timelimit), "d").format("YYYY-MM-DD");
n.dateRange.startDate = t, n.dateRange.endDate = t, $("[we7-date-range-picker]").data("daterangepicker").setStartDate(t), $("[we7-date-range-picker]").data("daterangepicker").setEndDate(t)
}, n.$watch("dateRange", function (e, t) {
e && e.startDate && (n.dateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), n.dateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), n.extra_limit_info.timelimit = moment(e.startDate).diff(moment(n.datePickerConfig.minDate), "days"))
}, !0), n.delUserGroup = function (e) {
util.confirm(function () {
i.post(s.links.deleteUserGroupUrl, {uid: n.uid, groupid: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : uitl.message(e.message.message)
})
}, "确认删除吗?")
}
}]),angular.module("userManageApp").controller("UsersDisplay", ["$scope", "$http", "config", function (n, i, e) {
n.type = e.type, n.users = e.users, n.usergroups = e.usergroups, n.links = e.links, n.checkAllStatus = !1, n.checkNum = 0, n.checkItem = function (e) {
e ? n.checkNum++ : n.checkNum--, n.checkNum == n.users.length ? n.checkAllStatus = !0 : n.checkAllStatus = !1
}, n.checkAll = function () {
for (var e in n.users) n.users[e].checked = n.checkAllStatus;
n.checkNum = n.checkAllStatus ? n.users.length : 0
}, n.postAction = function (e) {
var t = [];
for (var a in n.users) n.users[a].checked && t.push(n.users[a].uid);
"recycle_delete" == e || "" == e ? n.deleteUser(t, e) : util.confirm(function () {
n.operate(t, e)
}, function () {
}, "recycle_restore" == e ? "确认要启用用户吗?" : "确认要删除用户吗?")
}, n.operate = function (e, t) {
var a = {type: t};
"object" == typeof e ? a.uids = e : a.uid = e, i.post(n.links.link, a).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect)
})
}, n.deleteUser = function (e, t) {
util.confirm(function () {
n.operate(e, t)
}, function () {
return fasle
}, "确认要删除吗?")
}
}]),angular.module("userManageApp").controller("FieldsDisplay", ["$scope", "$http", "config", function (t, n, i) {
t.fields = i.fields, t.links = i.links, t.changeStatus = function (e, t, a) {
a = 0 == a ? 1 : 0, n.post(i.links.fieldDisplay, {id: e, key: t, val: a}).success(function (e) {
0 == e.message.errno ? util.message("修改成功!", e.redirect, "success") : util.message("修改失败!", e.redirect, "info")
})
}, t.editInfo = function (e) {
t.field = e
}, t.saveInfo = function (e) {
n.post(i.links.fieldPost, {field: e}).success(function (e) {
0 == e.message.errno ? util.message("修改成功!", e.redirect, "success") : util.message("修改失败!", e.redirect, "info")
})
}
}]),angular.module("userManageApp").controller("FieldsPost", ["$scope", "$http", "config", function (e, t, a) {
null == e.item ? (e.available = !0, e.required = !0, e.unchangeable = !0, e.showinregister = !0) : (1 == e.item.available ? e.available = !0 : e.available = !1, 1 == e.item.required ? e.required = !0 : e.required = !1, 1 == e.item.unchangeable ? e.unchangeable = !0 : e.unchangeable = !1, 1 == e.item.showinregister ? e.showinregister = !0 : e.showinregister = !1), e.verifyField = function () {
var e = $('input[name="field"]');
field_value = e.val(), reg = /^[A-Za-z0-9_]*$/, reg.test(field_value) || (util.message("请使用字母或数字或下划线组合字段名!"), e.val(""))
}, e.saveInfo = function (e) {
t.post(a.links.fieldPost, {field: e}).success(function (e) {
0 == e.message.errno ? util.message("修改成功!", e.redirect, "success") : util.message("修改失败!", e.redirect, "info")
})
}
}]),angular.module("userManageApp").controller("RegistersetCtrl", ["$scope", "$http", "config", function (e, n, i) {
e.settings = i.settings, e.copyright = i.copyright, e.groups = i.groups, e.group = i.group, e.welcomeLinks = i.welcomeLinks, e.welcome = i.welcome, e.binds = i.binds, e.bind = i.bind, e.saveSettingSwitch = function (e, t) {
t = 0 == t || null == t ? 1 : 0, n.post(i.saveSettingUrl, {
submit: 1,
token: i.token,
key: e,
value: t
}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}, e.saveSetting = function (e, t) {
var a = e.value.id ? e.value.id : e.value;
n.post(i.saveSettingUrl, {submit: 1, token: i.token, key: t, value: a}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error")
})
}
}]),angular.module("userManageApp").controller("UserAssignPermissionsCtrl", ["$scope", "config", function (e, t) {
e.user = t.user, e.profile = t.profile
}]),angular.module("userManageApp").controller("UsersFindMobilePwd", ["$scope", "$http", "config", "$interval", function (a, t, e, n) {
a.links = e.links, a.code = "", a.password = "", a.repassword = "", a.mobile = "", a.find_password_sign = e.find_password_sign, a.expire = 120, a.text = "免费获取验证码", a.isDisable = !1, a.sendMessage = function () {
if (a.isDisable = !0, "" == a.mobile) return util.message("手机号不能为空"), !1;
t.post(a.links.valid_mobile_link, {receiver: a.mobile}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message) : t.post(a.links.send_code_link, {
receiver: a.mobile,
custom_sign: a.find_password_sign
}).success(function (e) {
if (0 == e.message.errno) {
util.message("发送验证码成功", "", "success");
var t = n(function () {
a.isDisable = !0, a.expire--, a.text = a.expire + "秒后重新获取", a.expire <= 0 && (n.cancel(t), a.isDisable = !1, a.text = "重新点击获取验证码", a.expire = 120)
}, 1e3)
} else util.message(e.message.message, "", "error")
})
})
}, a.nextStep = function () {
return "" == a.mobile ? (util.message("手机号不能为空"), !1) : "" == a.code ? (util.message("短信验证码不能为空"), !1) : ($(".step-2").removeClass("hide"), $(".step-2").show(), $(".step-1").hide(), void $(".step-set-pwd").addClass("steps-status-finish"))
}, a.prevStep = function () {
a.isDisable = !1, $(".step-2").hide(), $(".step-1").removeClass("hide"), $(".step-1").show(), $(".step-set-pwd").removeClass("steps-status-finish")
}, a.changePassword = function () {
return "" == a.password ? ($(".password").html("密码不能为空"), !1) : "" == a.repassword ? ($(".repassword").html("密码不能为空"), !1) : a.password != a.repassword ? ($(".repassword").html("两次输入的密码不一致"), !1) : void t.post(a.links.set_password_link, {
password: a.password,
repassword: a.repassword,
receiver: a.mobile,
code: a.code
}).success(function (e) {
if (0 == e.message.errno) $(".step-3").removeClass("hide"), $(".step-2").hide(), $(".step-pwd-success").addClass("steps-status-finish"); else {
if (-2 == e.message.errno) return $(".password").html(e.message.message), !1;
util.message(e.message.message)
}
})
}
}]),angular.module("userManageApp").controller("UserExpireCtrl", ["$scope", "$http", "config", function (a, n, e) {
a.user_expire = e.user_expire, a.links = e.links, a.saveExpire = function (e) {
if ("day" == e) var t = {day: a.user_expire.day};
if ("notice" == e) t = {notice: a.user_expire.notice};
n.post(a.links.user_expire_link + "&type=" + e, t).success(function (e) {
0 != e.message.errno ? util.message(e.message.message, e.redirect, "error") : util.message("设置成功", e.redirect, "success")
})
}, a.changeStatus = function (e) {
n.post(a.links.user_expire_status_link + "&type=" + e, {}).success(function (e) {
0 == e.message.errno ? util.message("修改成功", e.redirect, "success") : util.message("修改失败,请稍后重试!")
})
}
}]),angular.module("userManageApp").controller("UsersRegisterMobile", ["$scope", "$http", "config", "$interval", function (a, n, e, i) {
a.showImageCode = !1, a.links = e.links, a.smscode = "", a.password = "", a.repassword = "", a.image = e.image, a.verify = "", a.mobile = "", a.owner_uid = e.owner_uid, a.register_type = e.register_type, a.register_sign = e.register_sign, a.expire = 120, a.text = "发送验证码", a.isDisable = !1, a.mobleInvalid = !0, a.smscodeInvalid = !0, a.imageInvalid = !0, a.passwordInvalid = !0, a.repasswordInvalid = !0, a.sendMessage = function () {
n.post(a.links.send_code_link, {
receiver: a.mobile,
custom_sign: a.register_sign,
imagecode: a.imagecode
}).success(function (e) {
if (0 == e.message.errno) {
util.message("发送验证码成功", "", "success");
var t = i(function () {
a.isDisable = !0, a.expire--, a.text = a.expire + "秒后重新获取", a.expire <= 0 && (i.cancel(t), a.isDisable = !1, a.text = "重新点击获取验证码", a.expire = 120)
}, 1e3)
} else {
if (-3 == e.message.errno) return a.imagecodeErr = !0, $("#imageCode").modal(), !1;
a.changeVerify(), util.message(e.message.message, "", "error")
}
})
}, a.changeVerify = function () {
return a.image = a.links.img_verify_link + "r=" + Math.round((new Date).getTime()), !1
}, a.checkMobile = function () {
var e = a.mobile;
n.post(a.links.valid_mobile_link, {mobile: e}).success(function (e) {
0 != e.message.errno ? (a.mobileErr = !0, a.mobileMsg = e.message.message) : (a.mobileErr = !1, a.mobleInvalid = !1)
})
}, a.checkImagecode = function () {
"" == a.imagecode || null == a.imagecode ? (a.imagecodeErr = !0, a.imagecodeMsg = "请输入验证码") : n.post(e.links.check_code_link, {code: a.imagecode}).success(function (e) {
0 != e.message.errno ? (a.imagecodeErr = !0, a.imagecodeMsg = "请输入正确的验证码", a.changeVerify()) : (a.imagecodeErr = !1, a.imageInvalid = !1)
})
}, a.checkPassword = function () {
if ("" == a.password || null == a.password) a.passwordErr = !0, a.passwordMsg = "请输入密码"; else if (a.password.length < 8) a.passwordErr = !0, a.passwordMsg = "密码长度不能少于8"; else if (1 == e.password_safe) {
var t = /(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,30}/;
n.post(e.links.check_password_link, {password: a.password}).success(function (e) {
0 == t.test(a.password) ? (a.passwordErr = !0, a.passwordMsg = "至少8-16个字符,必须包含大写字母,小写字母,数字。") : (a.passwordErr = !1, a.passwordInvalid = !1)
})
} else a.passwordErr = !1, a.passwordInvalid = !1
}, a.checkRepassword = function () {
"" == a.repassword || null == a.repassword ? (a.repasswordErr = !0, a.repasswordMsg = "确认密码不能为空") : a.repassword != a.password ? (a.repasswordErr = !0, a.repasswordMsg = "两次密码输入不一致") : (a.repasswordErr = !1, a.repasswordInvalid = !1)
}, a.register = function () {
n.post(a.links.register_link, {
password: a.password,
mobile: a.mobile,
register_type: a.register_type,
code: a.imagecode,
smscode: a.smscode,
owner_uid: e.owner_uid
}).success(function (e) {
a.imagecode = "", 0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}
}]),angular.module("userManageApp").controller("UserRegisterSystem", ["$scope", "$http", "config", function (s, e, t) {
function a(e, t, a, n, i) {
return "" == e || null == e ? (s.extendfields[t].fieldErr = !0, s.extendfields[t].fieldMsg = a) : i.test(e) ? s.extendfields[t].fieldErr = !1 : (s.extendfields[t].fieldErr = !0, s.extendfields[t].fieldMsg = n), s.extendfields[t].fieldErr
}
s.image = t.image, s.usernameInvalid = !0, s.passwordInvalid = !0, s.repasswordInvalid = !0, s.codeInvalid = !0, s.checkUsername = function () {
"" == s.username || null == s.username ? (s.usernameErr = !0, s.usernameMsg = "请输入用户名") : e.post(t.links.check_username_link, {
username: s.username,
owner_uid: s.owner_uid,
password: s.password
}).success(function (e) {
0 != e.message.errno ? (s.usernameErr = !0, s.usernameMsg = "非常抱歉,此用户名已经被注册,你需要更换注册名称!") : (s.usernameErr = !1, s.usernameInvalid = !1)
})
}, s.checkPassword = function () {
if ("" == s.password || null == s.password) s.passwordErr = !0, s.passwordMsg = "请输入密码"; else if (s.password.length < 8) s.passwordErr = !0, s.passwordMsg = "密码长度不能少于8"; else if (1 == t.password_safe) {
/(?=.*[a-z])(?=.*[A-Z])(?=.*\d).{8,30}/.test(s.password) ? (s.passwordErr = !1, s.passwordInvalid = !1) : (s.passwordErr = !0, s.passwordMsg = "至少8-16个字符,必须包含大写字母,小写字母,数字。")
} else s.passwordErr = !1, s.passwordInvalid = !1
}, s.checkRepassword = function () {
s.repassword != s.password ? (s.repasswordErr = !0, s.repasswordMsg = "两次密码输入不一致") : (s.repasswordErr = !1, s.repasswordInvalid = !1)
}, s.changeVerify = function () {
return s.image = t.links.img_verify_link + "r=" + Math.round((new Date).getTime()), !1
}, s.checkCode = function () {
"" == s.code || null == s.code ? (s.codeErr = !0, s.codeMsg = "请输入验证码") : e.post(t.links.check_code_link, {code: s.code}).success(function (e) {
0 != e.message.errno ? (s.codeErr = !0, s.codeMsg = "请输入正确的验证码", s.changeVerify()) : (s.codeErr = !1, s.codeInvalid = !1)
})
}, s.checkExtendfield = function (e) {
var t = document.getElementsByName(e)[0].value;
switch (e) {
case"realname":
checkRes = a(t, e, "请输入用户名", "请输入您的真实姓名", /^.{2,5}$/);
break;
case"nickname":
checkRes = a(t, e, "请输入昵称", "昵称格式为 3-30 位字符", /^.{3,30}$/);
break;
case"qq":
if ("" == t || null == t) s.extendfields[e].fieldErr = !0, s.extendfields[e].fieldMsg = "请输入QQ"; else checkRes = a(t, e, "请输入QQ号码", "请输入正确的QQ号码", /^[1-9][0-9]{4,9}$/)
}
}
}]),angular.module("userManageApp").controller("UserCreateCtrl", ["$scope", "$http", "$compile", "$filter", "config", "UserManageCommon", "we7TypeDefault", function (l, a, e, t, n, i, s) {
l.user = {
username: "",
password: "",
repassword: "",
remark: ""
}, l.submitDisabled = !1, l.is_used = n.is_used, l.user_type = n.user_type, l.config = n, l.groups = n.groups, l.jurindex = "modules_group", l.allmodule = !1, l.user_modules = n.user_modules, l.modules_group_list = n.modules_group_list, l.modules = [], l.account = n.create_account, l.selectedAccount = [], l.selectedDate = 0, l.expiration = 0, l.selectedGroupInfo = null, l.account_text = s, l.module_keyword = "", l.showModules = !1, l.showAccount = !1, l.group = {}, l.moduleGroupList = {groups: n.modules_group_list}, l.permissionType = "1", l.loadChange = function () {
$(".we7-group-show").each(function () {
$(this).removeClass("low"), $(this).removeClass("closed"), 70 < $(this).find(".group-app-list").outerHeight() ? ($(this).removeClass("low"), $(this).addClass("closed"), $(this).find(".action").on("click", function () {
$(this).parent().toggleClass("closed")
})) : ($(this).addClass("low"), $(this).removeClass("closed"))
})
}, l.create_step = 1, l.step = function (t) {
2 == t && "vice_founder" != l.user_type ? a.post(n.check_user_info_url, {user: l.user}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
l.create_step = t
}) : l.create_step = t
}, l.groupConfirm = function () {
setTimeout(function () {
l.loadChange()
}, 20)
}, l.changeGroup = function () {
l.selectedGroupInfo = {}, l.group && l.group.id && a.get(n.get_user_group_detail_url + "&user_group_id=" + l.group.id).success(function (e) {
if (e.message && !e.message.errno) {
var t = e.message.message, a = t.package_detail;
if ("all" !== t.modules || "all" !== t.templates) for (var n in t.group_module_all = {}, t.group_tempate_all = {}, a) {
var i = a[n].modules_all, s = a[n].templates;
for (var o in i) t.group_module_all[n] || (t.group_module_all[i[o].mid] = i[o]);
for (var r in s) t.group_tempate_all[s[r].id] || (t.group_tempate_all[s[r].id] = s[r])
}
l.selectedGroupInfo = t
}
})
}, l.submit = function () {
l.submitDisabled = !0;
var t = {
username: l.user.username,
password: l.user.password,
repassword: l.user.repassword,
remark: l.user.remark,
addtype: l.permissionType,
is_used: l.is_used
};
a.post(n.user_save_url, t).success(function (e) {
0 == e.message.errno ? util.message("添加成功!", e.redirect, "ajax") : util.message(e.message.message)
})
}, l.addPermission = i.addPermission
}]),angular.module("userManageApp").service("UserManageCommon", ["$rootScope", "$http", "config", function (e, t, a) {
var n = {
addPermission: function () {
var e = "", t = "";
$("#jurisdiction-add #content-modules").find(".btn-primary").each(function () {
e += '<span class="label label-info" style="margin-right:3px;">' + $(this).attr("data-title") + '</span><input type="hidden" name="extra[modules][]" value="' + $(this).attr("data-name") + '" />'
}), $("#jurisdiction-add #content-templates").find(".btn-primary").each(function () {
t += '<span class="label label-info" style="margin-right:3px;">' + $(this).attr("data-title") + '</span><input type="hidden" name="extra[templates][]" value="' + $(this).attr("data-name") + '" />'
}), e || t ? $(".account-package-extra").show() : $(".account-package-extra").hide(), $(".account-package-extra .js-extra-modules").html(e), $(".account-package-extra .js-extra-templates").html(t), $("#jurisdiction-add").modal("hide")
}
};
return n
}]),angular.module("userProfile", ["we7app"]),angular.module("userProfile").controller("UserProfileDisplay", ["$scope", "$window", "$http", "config", function (p, m, g, t) {
p.user_extra_groups = t.user_extra_groups, p.extend = t.extend, p.account_num = t.account_num, p.user = t.user, p.profile = t.profile || {}, p.extra_fields = t.extra_fields, null == p.profile && (p.profile = {
avatar: "",
realname: "",
births: "",
address: "",
resides: ""
}), p.links = t.links, p.group_info = t.group_info, p.groups = t.groups, p.changeGroup = p.user.groupid, p.wechats = t.wechats, p.wxapps = t.wxapps, p.redirect_urls = t.redirect_urls, p.user_welcome_link = {}, angular.forEach(t.redirect_urls, function (e) {
e.id == t.user.welcome_link && (p.user_welcome_link = e)
}), p.saveSetting = function (e, t) {
p.user.welcome_link = e.value.id, p.user_welcome_link = e.value, p.httpChange(t)
}, p.recycleUser = function () {
g.post(t.links.recycleUser, {uid: p.user.uid}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect)
})
}, p.changeAvatar = function () {
require(["fileUploader"], function (e) {
e.init(function (e) {
p.profile.avatar = e.url, p.$apply(p.profile), p.httpChange("avatar")
}, {direct: !0, multiple: !1, uniacid: 0})
})
}, p.editInfo = function (e, t) {
p.userOriginal = {}, p.userOriginal[e] = t
}, p.httpChange = function (t) {
switch (t) {
case"avatar":
g.post(p.links.userPost, {type: t, avatar: p.profile.avatar, uid: p.user.uid}).success(function (e) {
0 == e.message.errno ? util.toast("修改成功!", "success") : util.message(e.message.message)
});
break;
case"username":
$(".modal").modal("hide"), g.post(p.links.userPost, {
type: t,
username: p.userOriginal[t],
uid: p.user.uid
}).success(function (e) {
0 == e.message.errno ? (p.user[t] = p.userOriginal[t], util.toast("修改成功!", "success")) : util.message(e.message.message)
});
break;
case"vice_founder_name":
$(".modal").modal("hide"), g.post(p.links.userPost, {
type: t,
vice_founder_name: p.userOriginal[t],
uid: p.user.uid
}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
p.user[t] = p.userOriginal[t], util.toast("修改成功!", "success")
});
break;
case"qq":
$(".modal").modal("hide"), g.post(p.links.userPost, {
type: t,
qq: p.userOriginal[t],
uid: p.user.uid
}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
p.profile[t] = p.userOriginal[t], util.toast("修改成功!", "success")
});
break;
case"remark":
$(".modal").modal("hide"), g.post(p.links.userPost, {
type: t,
remark: p.userOriginal[t],
uid: p.user.uid
}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
p.user[t] = p.userOriginal[t], util.toast("修改成功!", "success")
});
break;
case"welcome_link":
$(".modal").modal("hide"), g.post(p.links.userPost, {
type: t,
welcome_link: p.user.welcome_link,
uid: p.user.uid
}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
util.toast("修改成功!", "success")
});
break;
case"mobile":
$(".modal").modal("hide"), g.post(p.links.userPost, {
type: t,
mobile: p.userOriginal[t],
uid: p.user.uid
}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message), !1;
p.profile[t] = p.userOriginal[t], util.toast("修改成功!", "success")
});
break;
case"password":
if ($(".modal").modal("hide"), 0 == m.sysinfo.isfounder && 0 == p.user.register_type) {
var e = $(".old-password").val();
if (_.isEmpty(e)) return util.message("原密码不可为空!"), !1
}
var a = $(".new-password").val(), n = $(".renew-password").val();
if (_.isEmpty(a)) return util.message("新密码不可为空!"), !1;
if (_.isEmpty(n)) return util.message("确认新密码不可为空!"), !1;
if (a != n) return util.message("两次密码不一致!"), !1;
g.post(p.links.userPost, {
type: t,
oldpwd: e,
newpwd: a,
renewpwd: n,
uid: p.user.uid
}).success(function (e) {
0 == e.message.errno ? util.message("修改成功,请重新登录!", e.redirect, "success") : util.message(e.message.message)
});
break;
case"endtime":
$(".modal").modal("hide");
var i = p.user.endtype, s = $(':text[name="endtime"]').val();
g.post(p.links.userPost, {type: t, endtype: i, endtime: s, uid: p.user.uid}).success(function (e) {
0 == e.message.errno ? (p.user.endtype = i, p.user.end = 1 == i ? "永久" : s, util.toast("修改成功!", "success")) : util.message(e.message.message)
});
break;
case"realname":
if ($(".modal").modal("hide"), _.isEmpty(p.userOriginal.realname)) return util.message("真实姓名不可为空!"), !1;
g.post(p.links.userPost, {
type: t,
realname: p.userOriginal.realname,
uid: p.user.uid
}).success(function (e) {
0 == e.message.errno ? (p.profile.realname = p.userOriginal.realname, util.toast("修改成功!", "success")) : util.message(e.message.message)
});
break;
case"birth":
$(".modal").modal("hide");
var o = $(".tpl-year").val(), r = $(".tpl-month").val(), l = $(".tpl-day").val();
g.post(p.links.userPost, {type: t, year: o, month: r, day: l, uid: p.user.uid}).success(function (e) {
0 == e.message.errno ? (p.profile.births = o + "年" + r + "月" + l + "日", util.toast("修改成功!", "success")) : util.message(e.message.message)
});
break;
case"address":
if ($(".modal").modal("hide"), _.isEmpty(p.userOriginal.address)) return util.message("邮寄地址不可为空!"), !1;
g.post(p.links.userPost, {
type: t,
address: p.userOriginal.address,
uid: p.user.uid
}).success(function (e) {
0 == e.message.errno ? (p.profile.address = p.userOriginal.address, util.toast("修改成功!", "success")) : util.message(e.message.message)
});
break;
case"reside":
$(".modal").modal("hide");
var c = $(".tpl-province").val(), u = $(".tpl-city").val(), d = $(".tpl-district").val();
g.post(p.links.userPost, {
type: t,
province: c,
city: u,
district: d,
uid: p.user.uid
}).success(function (e) {
0 == e.message.errno ? (p.profile.resides = c + " " + u + " " + d, util.toast("修改成功!", "success")) : util.message(e.message.message)
});
break;
default:
$(".modal").modal("hide"), g.post(p.links.userPost, {
type: p.edit_extra_field_key,
extra_field_key: p.edit_extra_field_key,
extra_field_val: p.edit_extra_field_val,
uid: p.user.uid
}).success(function (e) {
0 == e.message.errno ? util.message("修改成功!", location.reload(), "success") : util.message(e.message.message)
})
}
}, p.changeText = function (e) {
var t = $(e)[0].target.text;
$(e)[0].target.text = "展开" == t ? "收起" : "展开"
}, p.editExtra = function (e, t) {
p.edit_extra_filed = e, p.edit_extra_field_title = e.title, p.edit_extra_field_key = e.field
}
}]),angular.module("userProfile").controller("userBindCtrl", ["$scope", "$http", "config", "$interval", function (a, n, e, i) {
a.bindqq = e.bindqq, a.bindwechat = e.bindwechat, a.bindmobile = e.bindmobile, a.login_urls = e.login_urls, a.thirdlogin = e.thirdlogin, a.bind_sign = e.bind_sign, a.image = e.image, a.mobile = null == e.bindmobile ? "" : e.bindmobile.bind_sign, a.password = "", a.repassword = "", a.links = e.links, a.imagecode = "", a.smscode = "", a.expire = 120, a.text = "发送验证码", a.isDisable = !1, a.showCaptcha = function (e) {
if ("" == a.mobile) return util.message("手机号不能为空"), !1;
n.post(a.links.valid_mobile_link, {mobile: a.mobile, type: e}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message) : $("#checkcaptcha").modal("show")
})
}, a.checkCaptcha = function (e, t) {
if ("" == e) return util.message("验证码不能为空"), !1;
n.post(a.links.checkcaptcha_link, {imagecode: e}).success(function (e) {
0 == e.message.errno ? ($("#checkcaptcha").modal("hide"), a.sendMessage(t)) : util.message(e.message.message)
})
}, a.sendMessage = function (e) {
n.post(a.links.send_code_link, {
receiver: a.mobile,
custom_sign: a.bind_sign,
need_checkcaptcha: ""
}).success(function (e) {
if ("success" == e || 0 == e.message.errno) {
util.message("发送验证码成功", "", "success");
var t = i(function () {
a.isDisable = !0, a.expire--, a.text = a.expire + "秒后重新获取", a.expire <= 0 && (i.cancel(t), a.isDisable = !1, a.text = "重新点击获取验证码", a.expire = 120)
}, 1e3)
} else util.message(e.message.message, "", "error")
})
}, a.changeVerify = function () {
return a.image = a.links.img_verify_link + "r=" + Math.round((new Date).getTime()), !1
}, a.mobileBind = function (e, t) {
return "" == a.mobile ? (util.message("手机号不能为空"), !1) : "" == a.imagecode ? (util.message("图形验证码不能为空"), !1) : "" == a.smscode ? (util.message("手机号验证码不能为空"), !1) : void (null == a.bindmobile ? n.post(a.links.bind_mobile_link, {
mobile: a.mobile,
password: a.password,
repassword: a.repassword,
imagecode: a.imagecode,
smscode: a.smscode,
type: e,
need_checkcaptcha: 0
}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
}) : n.post(a.links.unbind_third_link, {
mobile: a.mobile,
password: a.password,
repassword: a.repassword,
imagecode: a.imagecode,
smscode: a.smscode,
type: e,
bind_type: t,
need_checkcaptcha: 0
}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
}))
}, a.unbind = function (e) {
n.post(a.links.unbind_third_link, {bind_type: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}
}]),angular.module("userProfile").controller("changeMobileCtrl", ["$scope", "$http", "config", "$interval", function (n, i, e, s) {
n.bindmobile = e.bindmobile, n.bind_sign = e.bind_sign, n.image = e.image, n.mobile = null == e.bindmobile ? "" : e.bindmobile.bind_sign, n.newMobile = "", n.links = e.links, n.imagecode = "", n.smscode = "", n.newSmscode = "", n.expire = 120, n.text = "发送验证码", n.isDisable = !1, n.step = e.step, n.checkAuthcode = "", n.showCaptcha = function (e) {
return 1 == e ? (n.changeVerify(), void $("#checkcaptcha").modal("show")) : "" == n.newMobile ? (util.message("手机号不能为空"), !1) : void i.post(n.links.valid_mobile_link, {mobile: n.newMobile}).success(function (e) {
0 != e.message.errno ? util.message(e.message.message) : (n.changeVerify(), $("#checkcaptcha").modal("show"))
})
}, n.checkCaptcha = function (e, t, a) {
if ("" == e) return util.message("验证码不能为空"), !1;
i.post(n.links.checkcaptcha_link, {imagecode: e}).success(function (e) {
0 == e.message.errno ? ($("#checkcaptcha").modal("hide"), n.sendMessage(t, a)) : util.message(e.message.message)
})
}, n.sendMessage = function (e, t) {
var a = n.mobile;
2 == t && (a = n.newMobile), i.post(n.links.send_code_link, {
receiver: a,
custom_sign: n.bind_sign,
need_checkcaptcha: ""
}).success(function (e) {
if ("success" == e || 0 == e.message.errno) {
util.message("发送验证码成功", "", "success"), n.isDisable = !0;
var t = s(function () {
1 == n.isDisable && (n.expire--, n.text = n.expire + "秒后重新获取", n.expire <= 0 && (s.cancel(t), n.isDisable = !1, n.text = "重新点击获取验证码", n.expire = 120))
}, 1e3)
} else util.message(e.message.message, "", "error")
})
}, n.nextStep = function () {
return console.log(n.smscode), "" == n.mobile ? (util.message("手机号不能为空"), !1) : "" == n.smscode ? (util.message("手机号验证码不能为空"), !1) : void i.post(n.links.check_mobile_sms_code_link, {
mobile: n.mobile,
smscode: n.smscode,
need_checkcaptcha: 0
}).success(function (e) {
0 == e.message.errno ? (n.step = 2, n.isDisable = !1, n.text = "发送验证码", n.expire = 120, n.checkAuthcode = e.message.message.check_authcode) : util.message(e.message.message)
})
}, n.changeVerify = function () {
return n.image = n.links.img_verify_link + "r=" + Math.round((new Date).getTime()), !1
}, n.mobileBind = function () {
return "" == n.newMobile ? (util.message("手机号不能为空"), !1) : "" == n.newSmscode ? (util.message("手机号验证码不能为空"), !1) : void i.post(n.links.bind_mobile_link, {
mobile: n.newMobile,
smscode: n.newSmscode,
need_checkcaptcha: 0,
check_authcode: n.checkAuthcode
}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}
}]),angular.module("userProfile").controller("UserEditOperatoers", ["$scope", "$http", "config", function (e, n, i) {
e.user = i.user, e.profile = i.profile || {}, e.list = i.list, e.deleteClerk = function (e, t, a) {
util.confirm(function () {
n.post(i.links.deleteClerk, {uid: e, module_name: t, uniacid: a}).success(function (e) {
"0" == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, function () {
return !1
}, "确认删除?")
}
}]),angular.module("webApp", ["we7app"]),angular.module("webApp").controller("bindDomainCtrl", ["$scope", "$http", "config", function (n, e, t) {
n.account = t.account, n.moduleList = t.modulelist, n.middleAccount = {bind_domain: ""}, n.httpChange = function () {
e.post(t.links.postDomain, {
bind_domain: n.middleAccount.bind_domain,
submit: !0,
token: t.token
}).success(function (e) {
0 == e.message.errno ? util.message("修改成功!", e.redirect, "success") : util.message(e.message.message)
})
}, n.changeModule = function () {
e.post(t.links.postModule, {module_name: n.selectedModule, token: t.token}).success(function (e) {
0 == e.message.errno ? util.message("修改成功!", e.redirect, "success") : util.message(e.message.message)
}), $("#add_module").modal("hide")
}, n.cancelModule = function () {
$("#add_module").modal("hide")
}, n.selectModule = function (a) {
angular.forEach(n.moduleList, function (e, t) {
n.moduleList[t].selected = a == t
}), n.selectedModule = a
}
}]),angular.module("we7wish", ["we7app"]).constant("params", function (e) {
var l = function (e) {
var t, a, n, i, s, o, r = "";
for (t in e) if ((a = e[t]) instanceof Array) for (o = 0; o < a.length; ++o) i = a[o], (s = {})[t + "[" + o + "]"] = i, r += l(s) + "&"; else if (a instanceof Object) for (n in a) i = a[n], (s = {})[t + "[" + n + "]"] = i, r += l(s) + "&"; else null != a && (r += encodeURIComponent(t) + "=" + encodeURIComponent(a) + "&");
return r.length ? r.substr(0, r.length - 1) : r
};
return l(e)
}),angular.module("we7wish").controller("wishList", ["$scope", "$http", "config", "params", function (t, a, n, i) {
t.page = {
currentPage: 1, totalItems: 1, itemsPerPage: 10, pagesLength: 9, onChange: function () {
t.getList()
}
}, t.goods_type = "", t.we7TypeDefault = {
wxapp_support: "微信小程序",
app_support: "微信公众号",
android_support: "APP-android",
ios_support: "APP-ios",
aliapp_support: "支付宝小程序",
webapp_support: "PC",
system_welcome_support: "微擎首页",
theme_support: "微擎微站",
baiduapp_support: "百度小程序"
}, t.unitInfo = {
year: "年",
month: "月",
day: "日"
}, t.op = n.op, t.status = n.status, t.editUrl = "wishgoods" == n.op ? n.editGoodsUrl : n.editCloudGoodsUrl, t.list = [], t.goods_type = "", t.goods_name = "", t.getList = function (e) {
e = e || t.page.currentPage, a.get(n.apiUrl + "&" + i({
op: n.op || "wishgoods",
status: n.status || 1,
page: e || 1,
goods_name: t.goods_name || "",
goods_type: t.goods_type || ""
})).success(function (e) {
e.message.errno || (t.list = e.message.message.data, t.page.totalItems = e.message.message.total)
})
}, t.getList(), t.changeStatus = function (e) {
a.get(n.changeStatusUrl + "&" + i({id: e})).success(function (e) {
"success" == e.type ? util.message("操作成功", "refresh", "success") : util.message("操作失败, 请重试", "", "error")
})
}, t.deleteGoods = function (e) {
util.confirm(function () {
a.get(n.deleteGoodsUrl + "&" + i({id: e})).success(function (e) {
"success" == e.type ? util.message("操作成功", "refresh", "success") : util.message("操作失败, 请重试", "", "error")
})
}, function () {
return !1
}, "删除不可恢复, 是否确认删除?")
}, t.deleteCloudGoods = function (e) {
util.confirm(function () {
a.get(n.deleteCloudGoods + "&" + i({id: e})).success(function (e) {
e.message.errno ? util.message("操作失败, 请重试", "", "error") : util.message("操作成功", "refresh", "success")
})
}, function () {
return !1
}, "确认删除?")
}
}]),angular.module("we7wish").controller("wishEdit", ["$scope", "$http", "config", function (n, i, s) {
if (n.cloudGoods = s.cloudGoods, n.content = "", n.branch = 0, n.support = [], n.we7TypeDefault = {
wxapp_support: "微信小程序",
account_support: "微信公众号",
phoneapp_support: "APP",
aliapp_support: "支付宝小程序",
webapp_support: "PC",
system_welcome_support: "微擎首页",
theme_support: "微擎微站",
baiduapp_support: "百度小程序"
}, n.slideLists = [], n.prices = {}, n.content = "", n.fileLogo = function (e, t, a) {
n.cloudGoods.logo = e.url
}, n.changeBranch = function (e) {
for (var t in n.branch = e, n.prices = {}, n.cloudGoods.branchs[e].supports) {
var a = n.cloudGoods.branchs[e].supports[t];
"android_support" === a || "ios_support" === a ? a = "phoneapp_support" : "app_support" === a && (a = "account_support"), n.prices[a] = {
checked: -1 !== n.cloudGoods.goods_support.indexOf(a),
disabled: -1 !== n.cloudGoods.goods_support.indexOf(a),
price: "",
unit: "month"
}
}
setTimeout(function () {
n.$apply("prices")
})
}, n.changeSupport = function (e) {
e.checked = !e.checked
}, n.delSlide = function (e) {
n.slideLists.splice(e, 1)
}, n.fileChange = function (e, t, a) {
n.slideLists.push(e.url)
}, n.submit = function (e) {
var t = !0;
for (var a in n.prices) n.prices[a].checked && (t = !1, n.prices[a].price || (t = !0));
if (t) return util.message("请选择类型并填写价格", "", "error"), !1;
i.post(s.saveWishGoodsUrl, {
title: n.cloudGoods.title,
logo: n.cloudGoods.logo,
name: n.cloudGoods.name,
status: e,
prices: n.prices,
slide: n.slideLists,
description: n.content,
goods_cloud_id: n.cloudGoods.id,
branch_id: n.cloudGoods.branchs[n.branch].id
}).success(function (e) {
e.message.errno || util.message("添加成功", e.redirect, "success")
})
}, n.cloudGoods && n.cloudGoods.wish_goods) {
for (var e in n.cloudGoods.branchs) if (n.cloudGoods.branchs[e].id == n.cloudGoods.wish_goods) {
n.changeBranch(e);
break
}
} else n.changeBranch(0);
n.changeUnit = function (e, t) {
e.unit = t
}
}]),angular.module("we7wish").controller("wishPost", ["$scope", "$http", "config", "params", function (t, a, n, i) {
t.we7TypeDefault = {
wxapp: "微信小程序",
app: "微信公众号",
phoneapp: "APP",
aliapp: "支付宝小程序",
webapp: "PC",
baiduapp: "百度小程序"
}, t.loading = !1, t.page = {
currentPage: 1,
totalItems: 1,
itemsPerPage: 20,
pagesLength: 9,
onChange: function () {
t.getList()
}
}, t.list = [], t.support_type = "", t.keyword = "", t.getList = function (e) {
e = e || t.page.currentPage, t.loading = !0, a.get(n.apiUrl + "&" + i({
op: "get_cloud_goods",
page: e || 1,
keyword: t.keyword || "",
support_type: t.support_type || ""
})).success(function (e) {
t.loading = !1, e.message.errno || (t.list = e.message.message.data, t.page.totalItems = e.message.message.total)
}).error(function () {
t.loading = !1
})
}, t.addedGoodsId = 0, t.addItem = function (e) {
(e = angular.copy(e)).op = "add_cloud_goods", a.post(n.apiUrl, e).success(function (e) {
e.message.errno ? util.message(e.message.message, "", "error") : (t.addedGoodsId = e.message.message.goods_id, e.message.message.cloud_goods ? $("#modalmessage").text("该应用已在待编辑列表,您可直接编辑") : $("#modalmessage").text("已成功添加至待编辑列表,编辑完成后可添加至星愿应用列表"), $("#modal-message").modal("show"))
})
}, t.gotoEdit = function () {
return location.href = n.editUrl + "&id=" + t.addedGoodsId, !1
}, t.getList()
}]),angular.module("wxApp", ["we7app"]),angular.module("wxApp").controller("MainCtrl", ["$scope", "$http", "config", function (n, a, t) {
n.module_bindings = [], n.create_type = t.create_type, n.wxappinfo = {
name: t.wxappinfo.name,
version: "",
choose: {modules: [], template: 1},
quickmenu: {
show: !0,
bottom: {bgcolor: "#bebebe", boundary: "#fff", selectedColor: "#0f0", color: "#428bca"},
menus: [{
name: "首页",
defaultImage: "./resource/images/bottom-default.png",
selectedImage: "./resource/images/bottom-default.png",
module: {}
}, {
name: "首页",
defaultImage: "./resource/images/bottom-default.png",
selectedImage: "./resource/images/bottom-default.png",
module: {}
}]
},
submit: "yes",
token: t.token,
uniacid: t.uniacid,
modules: []
}, n.apps = [], n.createStep = 1, n.version = t.version, n.isMuti = 2 == t.create_type, t.mtype ? n.mtype = t.mtype : n.mtype = 0 == t.create_type ? "wxapp" : "account", n.designMethod = t.designMethod, n.submitDisabled = !1, t.isedit && (n.wxappinfo.choose.modules = t.wxappinfo.modules, n.wxappinfo.quickmenu = t.wxappinfo.quickmenu, n.wxappinfo.version = t.wxappinfo.version, n.wxappinfo.description = t.wxappinfo.description), n.uploadMultiImage = function (t) {
require(["fileUploader"], function (e) {
e.init(function (e) {
n.wxappinfo[t] = e.url, n.$apply(n.wxappinfo)
}, {direct: !0, multiple: !1})
})
}, n.delMultiImage = function (e) {
n.wxappinfo[e] = ""
};
var e = t.bindingsUrl;
n.moduleEntries = [], n.prevStep = function () {
n.createStep <= 1 ? n.createStep = 1 : n.createStep -= 1, 3 == n.createStep && 3 == n.designMethod && (n.isMuti || (n.createStep = 1))
}, n.nextStep = function () {
4 < n.createStep ? n.createStep = 4 : n.checkComplete() && (n.createStep += 1);
2 == n.createStep && 3 == n.designMethod && (n.isMuti ? (function () {
var t = [];
angular.forEach(n.wxappinfo.choose.modules, function (e) {
t.push(e.name)
}), t = t.join(","), a.post(e, {modules: t}).then(function (e) {
if ("0" == e.data.message.errno) {
var t = e.data.message.message, a = [];
angular.forEach(t, function (e) {
e.module = e.name;
for (var t = 0; t < e.bindings.length; t++) e.bindings[t].modulename = e.title, a.push(e.bindings[t])
}), n.module_bindings = a, n.wxappinfo.choose.modules = t
}
})
}(), n.createStep = 3) : n.createStep = 4)
}, n.backToStep = function (e) {
var t = parseInt(e);
t < n.createStep && (t <= 2 && (n.type = 0), n.createStep = t)
}, n.selectType = function (e) {
n.type = parseInt(e), $(':hidden[name="type"]').val(e)
}, n.changeType = function (e) {
n.type = parseInt(e), $(':hidden[name="type"]').val(e)
}, n.searchTpl = function () {
var e = $(':text[id="searchtpl"]').val();
"默认模版".match(e) ? ($(':hidden[name="template"]').val(1), $(".select-tem-list > ul").show()) : ($(':hidden[name="template"]').val(""), $(".select-tem-list > ul").hide())
}, n.selectTpl = function (e) {
n.wxappinfo.choose.template = e
}, n.getModuleEntries = function () {
if (0 == n.moduleEntries.length && n.wxappinfo.choose.modules) for (i in n.wxappinfo.choose.modules) if (n.wxappinfo.choose.modules[i].bindings) for (j in n.wxappinfo.choose.modules[i].bindings) n.moduleEntries.push({
title: n.wxappinfo.choose.modules[i].bindings[j].title,
url: n.wxappinfo.choose.modules[i].bindings[j].do,
module: n.wxappinfo.choose.modules[i].title
})
}, n.showMenu = function () {
n.wxappinfo.quickmenu.show = !n.wxappinfo.quickmenu.show
}, n.addMenu = function () {
if (5 <= n.wxappinfo.quickmenu.menus.length) return !1;
n.wxappinfo.quickmenu.menus.push({
name: "首页",
defaultImage: "./resource/images/bottom-default.png",
selectedImage: "./resource/images/bottom-default.png",
module: {}
})
}, n.delMenu = function (e) {
n.wxappinfo.quickmenu.menus = _.without(n.wxappinfo.quickmenu.menus, n.wxappinfo.quickmenu.menus[e])
}, n.addDefaultImg = function (t) {
require(["fileUploader"], function (e) {
e.show(function (e) {
n.wxappinfo.quickmenu.menus[t].defaultImage = e.url, n.$apply(n.wxappinfo)
}, {direct: !0, multiple: !1})
})
}, n.addSelectedImg = function (t) {
require(["fileUploader"], function (e) {
e.show(function (e) {
n.wxappinfo.quickmenu.menus[t].selectedImage = e.url, n.$apply(n.wxappinfo)
}, {direct: !0, multiple: !1})
})
}, n.addModuleImage = function (t) {
require(["fileUploader"], function (e) {
e.show(function (e) {
t.newicon = e.url, n.$apply(n.wxappinfo)
}, {direct: !0, multiple: !1})
})
}, n.checkComplete = function () {
n.createStep;
if (!n.wxappinfo.uniacid) {
if (!n.wxappinfo.name) return util.message("小程序名称不可为空!"), !1;
if (!n.wxappinfo.account) return util.message("小程序账号不可为空!"), !1;
if (!n.wxappinfo.original) return util.message("原始ID不可为空!"), !1;
if (!n.wxappinfo.appid) return util.message("AppId不可为空!"), !1;
if (!n.wxappinfo.appsecret) return util.message("AppSecret不可为空!"), !1
}
return n.wxappinfo.description ? !(!n.wxappinfo.version || !/^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$/.test(n.wxappinfo.version)) || (util.message("版本号错误,只能是数字、点,数字最多2位,例如 1.1.1 或1.2"), !1) : (util.message("请填写描述"), !1)
}, n.wxapp_module_select = function (e, t) {
angular.isArray(t) || (t = [t]), n.wxappinfo.choose.modules = t, angular.forEach(n.wxappinfo.choose.modules, function (e, t, a) {
e.module = e.name
}), n.$apply()
}, n.package = function (e) {
return (0 != n.wxappinfo.choose.modules.length || confirm("添加模块应用后才可进行打包操作,是否继续仅保存?")) && (n.submitDisabled = !0, a.post(t.wxappPostUrl, n.wxappinfo).success(function (e) {
e.message.errno ? util.message(e.message.message, "", "error") : util.message(e.message.message, e.redirect, "success"), n.submitDisabled = !1
})), !1
}, $("#resource_module").unbind("click").click(function () {
require(["fileUploader"], function (e) {
e.show(function (e) {
n.wxapp_module_select("module", e)
}, {
direct: !0,
multiple: n.isMuti,
isWechat: !1,
type: "module",
others: {user_module: 2, mtype: n.mtype, cover: "account" == n.mtype}
})
})
})
}]),angular.module("wxApp").controller("WxappEditCtrl", ["$scope", "$http", "config", function (a, n, i) {
a.uniacid = i.uniacid, a.multiid = i.multiid, a.success_url = i.success_url, a.account_list = [], a.current_module = "", a.category = {
id: "",
name: "",
displayorder: "",
linkurl: ""
}, a.wxapp = i.wxapp, a.slideedit = function (e) {
a.wxapp = "slideedit", a.slideid = e
}, a.navedit = function (e) {
a.wxapp = "navedit", a.navid = e
}, a.recommendedit = function (e, t) {
a.wxapp = "recommendedit", a.recommendid = e, a.recommendpid = t
}, a.showAccount = function (t) {
a.account_list = "", n.post(i.links.accountList, {module: t}).success(function (e) {
a.account_list = e.message.message, a.current_module = t, console.dir(e)
}), $("#show_account").modal("show")
}, a.selectAccount = function (t, e) {
var a = window.location.href;
n.post(i.links.saveConnection, {module: t, uniacid: e}).success(function (e) {
0 == e.message.errno ? ($(".js-connection-img-" + t).attr("src", e.message.message.thumb), $(".js-connection-name-" + t).text(e.message.message.name), util.message("修改成功", a, "success")) : util.message(e.message.message, "", "error"), $("#show_account").modal("hide")
})
}, a.categoryedit = function (e, t) {
a.wxapp = "categoryedit", a.categoryeditid = e, a.categoryparentid = t
}, a.get_categorys = function () {
n.post(i.links.getCategorys, {uniacid: a.uniacid, multiid: a.multiid}).success(function (e) {
a.categorys = e.message.message
})
}, a.get_categorys(), a.edit_category = function () {
a.categorys.push({name: "", displayorder: "", linkurl: ""})
}, a.del_category = function (e) {
null != a.categorys[e].id ? (n.post(i.links.delCategory, {id: a.categorys[e].id}).success(function () {
}), a.get_categorys()) : a.categorys.splice(e, 1)
}, a.save_category = function () {
if (a.name_exist = !1, angular.forEach(a.categorys, function (e) {
"" == e.name && (util.message("请填写类名"), a.name_exist = !0)
}), 1 == a.name_exist) return !1;
n.post(i.links.saveCategory, {post: a.categorys, uniacid: uniacid, multiid: i.multiid}).success(function (e) {
}), a.get_categorys(), $("#myModal").modal("hide")
}
}]),angular.module("wxApp").controller("AccountManageWxappCtrl", ["$scope", "$http", "config", function (n, t, a) {
n.wxapp_version_lists = a.wxapp_version_lists, n.wxapp_modules = a.wxapp_modules, n.version_exist = a.version_exist, n.activeVersion = {}, n.modules = a.wxapp_modules, n.search = {}, n.searchModuleName = function () {
if (n.search.moduleName) for (key in n.modules = {}, n.wxapp_modules) -1 != n.wxapp_modules[key].title.indexOf(n.search.moduleName) && (n.modules[key] = n.wxapp_modules[key])
}, n.showEditVersionInfoModal = function (e) {
$("#modal_edit_versioninfo").modal("show"), n.activeVersion = e ? angular.copy(e) : {}, n.middleVersion = angular.copy(n.activeVersion), !_.isEmpty(n.activeVersion) && _.isEmpty(n.activeVersion.modules) && $(".wxapp-module-list .add").css("display", "")
}, n.showEditModuleModal = function () {
$("#modal_edit_module").modal("show"), n.newWxModule = {}
}, n.selectedWxModule = function (e, t) {
var a = $(t.target).parents(".select-module-wxapp");
a.find("span").removeClass("hide"), a.siblings().find("span").addClass("hide"), n.newWxModule = e
}, n.changeWxModules = function () {
(n.newWxModule || util.message("请选择一个应用模块!"), n.activeVersion.modules && 3 != n.activeVersion.design_method) ? -1 < _.indexOf(n.activeVersion.modules, n.newWxModule) ? util.message("该应用模块已存在!") : n.activeVersion.modules.push(n.newWxModule) : (n.activeVersion.modules = [n.newWxModule], $(".wxapp-module-list .add").css("display", "none"));
$("#modal_edit_module").modal("hide")
}, n.editVersionInfo = function () {
if (_.isEmpty(n.activeVersion.modules)) return util.message("应用模块不可为空!"), !1;
t.post(a.links.edit_version, {version_info: n.activeVersion}).success(function (e) {
$("#modal_edit_versioninfo").modal("hide"), 0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, n.cancelVersionInfo = function () {
n.middleVersion.modules ? n.activeVersion.modules = n.middleVersion.modules : n.activeVersion.modules = []
}, n.delWxappVersion = function (e) {
e = parseInt(e);
t.post(a.links.del_version, {version_id: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, n.delModule = function (e) {
n.modules_values = [], angular.forEach(n.activeVersion.modules, function (e) {
n.modules_values.push(e)
}), n.activeVersion.modules = n.modules_values;
var t = _.indexOf(n.activeVersion.modules, e);
-1 < t && (n.activeVersion.modules = _.without(n.activeVersion.modules, n.activeVersion.modules[t])), _.isEmpty(n.activeVersion.modules) && $(".wxapp-module-list .add").css("display", "")
}
}]),angular.module("wxApp").controller("PaymentCtrl", ["$scope", "$http", "config", function (n, t, e) {
n.config = e, n.paysetting = e.paysetting, n.saveEdit = function (e) {
if ("wechat" == e) {
if ("" == n.paysetting.wechat.mchid) return util.message("请填写商户号", "", "info"), !1;
if ("" == n.paysetting.wechat.signkey) return util.message("请填写支付秘钥", "", "info"), !1
}
t.post(n.config.saveurl, {type: e, param: n.paysetting[e]}).success(function (e) {
if (0 != e.message.errno) return util.message(e.message.message, "", "info"), !1;
$(".modal").modal("hide"), util.message(e.message.message, e.redirect, "success")
})
}, $(".modal").on("hide.bs.modal", function () {
t.post(n.config.get_setting_url, {}).success(function (e) {
n.paysetting = e.message.message
})
}), n.tokenGen = function (e) {
if (confirm("确定要修改密钥吗?")) {
for (var t = "", a = 0; a < 32; a++) {
t += "abcdefghijklmnopqrstuvwxyz0123456789"[parseInt(32 * Math.random())]
}
"wechat.signkey" == e && (n.paysetting.wechat.signkey = t)
}
}
}]),angular.module("wxApp").controller("WxappWelcomeCtrl", ["$scope", "$http", "config", function (n, e, t) {
n.notices = t.notices, n.loaderror = 0, n.last_modules = null, n.buildAccountModules = function () {
e.post("./index.php?c=home&a=welcome&do=build_account_modules")
}, n.buildAccountModules(), "v" == t.family && (n.recommend = {
recommend: {
name: "推荐应用",
list: [],
ads: [],
icon: "recommend"
},
"new-app": {name: "新应用", list: [], ads: [], icon: "new"},
essential: {name: "下载排行", list: [], ads: [], icon: "down"},
hot: {name: "热门排行", list: [], ads: [], icon: "hot"},
large: {name: "大额应用排行", list: [], ads: [], icon: "big"}
}, require([t.apiLink + "/jsdata/app/recommend/9"], function (e) {
n.recommend.recommend.list = e, n.showLoading = !1
}), require([t.apiLink + "/jsdata/popularize/bottom"], function (e) {
n.recommend.recommend.ads = e, n.$apply()
}), require([t.apiLink + "/jsdata/popularize/ads"], function (e) {
for (var t in e) 3 == e[t].position && n.recommend["new-app"].ads.push(e[t]), 4 == e[t].position && n.recommend.hot.ads.push(e[t]), 5 == e[t].position && n.recommend.essential.ads.push(e[t]), 6 == e[t].position && n.recommend.large.ads.push(e[t]);
n.$apply()
}), n.changeTab = function (a) {
a && n.recommend[a].list.length <= 0 && (n.showLoading = !0, require([t.apiLink + "/jsdata/app/" + a + "/9"], function (e) {
for (var t in e) e[t] && e[t].last_upgrade_time && (e[t].last_upgrade_time = moment(1e3 * e[t].last_upgrade_time).format("YYYY-MM-DD"));
n.recommend[a].list = e, n.showLoading = !1, n.$apply()
}))
})
}]),angular.module("wxApp").controller("moduleLinkUniacidCtrl", ["$scope", "$http", "config", "we7TypeDefault", function (n, a, i, e) {
for (var t in n.versionInfo = i.version_info, n.module = "", n.selectedAccount = "", n.loadData = !1, n.linkAccounts = "", n.searchKeyword = "", n.typeSign = i.typeSign, delete e.welcome, "wxapp" != n.typeSign && delete e[i.typeSign], e) {
n.activeTypeSign = t;
break
}
n.initModule = function (e) {
n.module = e, n.changeType("wxapp")
}, n.changeType = function (e) {
n.loadData = !0, n.selectedAccount = "", n.searchLinkAccount(n.module, e)
}, n.searchLinkAccount = function (e, t) {
n.activeTypeSign = t, setTimeout(function () {
$("select").niceSelect && $("select").niceSelect("update")
}, 0), $("#show-account").modal("show"), a.post(i.links.search_link_account, {
module_name: e,
type_sign: t
}).success(function (e) {
n.loadData = !1, 0 == e.message.errno ? n.linkAccounts = e.message.message : util.message(e.message.message)
})
}, n.selectLinkAccount = function (a) {
angular.forEach(n.linkAccounts, function (e, t) {
t == a.uniacid ? n.linkAccounts[t].checked = 1 : n.linkAccounts[t].checked = 0
}), n.selectedAccount = a
}, n.module_unlink_uniacid = function (e) {
a.post(i.links.module_unlink_uniacid, {version_id: n.versionInfo.id, module_name: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, e.redirect)
})
}, n.moduleLinkUniacid = function () {
$("#show-account").modal("hide"), a.post(i.links.module_link_uniacid, {
module_name: n.module,
submit: "yes",
token: i.token,
uniacid: n.selectedAccount.uniacid,
version_id: n.versionInfo.id
}).success(function (e) {
0 == e.message.errno ? util.message("关联成功", "refresh", "success") : util.message(e.message.message)
}), n.module = ""
}
}]),angular.module("wxApp").controller("WxappEntranceCtrl", ["$scope", "$http", "serviceCommon", "config", function (e, t, a, n) {
e.moduleList = n.moduleList, e.success = function (e) {
e = parseInt(e);
var t = $('<span class="label label-success" style="position:absolute;z-index:10;width:90px;height:34px;line-height:28px;"><i class="fa fa-check-circle"></i> 复制成功</span>');
a.copySuccess(e, t)
}
}]),angular.module("wxApp").controller("StatisticeCtrl", ["$scope", "$http", "serviceCommon", "config", function (a, n, e, i) {
require(["echarts"], function (e) {
var t = e.init(document.getElementById("chart-line"));
option = {
tooltip: {trigger: "axis", axisPointer: {type: "line"}},
grid: {left: "3%", right: "3%", bottom: "3%", containLabel: !0},
xAxis: {data: []},
yAxis: {splitArea: {show: !0}},
series: [{name: "数量", type: "line", smooth: !0, data: []}]
}, t.showLoading(), a.dateRange = {
startDate: moment().format("YYYY-MM-DD"),
endDate: moment().format("YYYY-MM-DD")
}, a.changeDivideType = function (e) {
a.visitDivideType = e, a.getVisitApi("week")
}, a.getVisitApi = function (e) {
a.timeType = e, n.post(i.links.visitApi, {
divide_type: a.visitDivideType,
time_type: e,
daterange: a.dateRange
}).success(function (e) {
t.hideLoading(), option.xAxis.data = e.message.message.data_x, option.series[0].data = e.message.message.data_y, t.setOption(option)
})
}, a.visitDivideType = "session_cnt", a.visitTimeType = "week", a.getVisitApi(a.visitTimeType), a.$watch("dateRange", function (e, t) {
e && e != t && (a.dateRange.startDate = moment(e.startDate).format("YYYY-MM-DD"), a.dateRange.endDate = moment(e.endDate).format("YYYY-MM-DD"), a.getVisitApi("daterange"))
}, !0)
})
}]),angular.module("wxApp").controller("MiniappManageCtrl", ["$scope", "$http", "config", function (n, t, a) {
n.version_lists = a.version_lists, n.miniapp_modules = a.miniapp_modules, n.version_exist = a.version_exist, n.activeVersion = {}, n.modules = a.miniapp_modules, n.search = {}, n.searchModuleName = function () {
if (n.search.moduleName) for (key in n.modules = {}, n.miniapp_modules) -1 != n.miniapp_modules[key].title.indexOf(n.search.moduleName) && (n.modules[key] = n.miniapp_modules[key])
}, n.showEditVersionInfoModal = function (e) {
$("#modal_edit_versioninfo").modal("show"), n.showadd = !1, n.activeVersion = e || {}, n.middleVersion = angular.copy(n.activeVersion), !_.isEmpty(n.activeVersion) && _.isEmpty(n.activeVersion.modules) && (n.showadd = !0)
}, n.showEditModuleModal = function () {
$("#modal_edit_module").modal("show"), n.newWxModule = {}
}, n.selectedWxModule = function (e, t) {
var a = $(t.target).parents(".select-module-wxapp");
a.find("span").removeClass("hide"), a.siblings().find("span").addClass("hide"), n.newWxModule = e
}, n.changeWxModules = function () {
n.newWxModule || util.message("请选择一个应用模块!"), n.activeVersion.module = {
name: n.newWxModule.name,
version: n.newWxModule.version,
module_info: n.newWxModule
}, n.showadd = !1, $("#modal_edit_module").modal("hide")
}, n.editVersionInfo = function () {
if (_.isEmpty(n.activeVersion.module)) return util.message("应用模块不可为空!"), !1;
t.post(a.links.edit_version, {
version_id: n.activeVersion.id,
name: n.activeVersion.module.name
}).success(function (e) {
$("#modal_edit_versioninfo").modal("hide"), 0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, n.cancelVersionInfo = function () {
n.middleVersion.modules ? n.activeVersion.modules = n.middleVersion.modules : n.activeVersion.modules = []
}, n.delWxappVersion = function (e) {
e = parseInt(e);
t.post(a.links.del_version, {version_id: e}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message)
})
}, n.delModule = function (e) {
n.activeVersion.modules = [], n.showadd = !0
}
}]),angular.module("wxApp").controller("CreateMiniappCtrl", ["$scope", "$http", "config", function (a, t, n) {
a.presetTypeInfo = n.preset_type_info, a.miniapp = {
name: n.miniapp.name,
version: "",
choose_module: [],
submit: "yes",
token: n.token,
uniacid: n.uniacid,
modules: [],
type: n.type
}, a.apps = [], a.createStep = 1, a.version = n.version, a.newversion = 0 < n.uniacid, a.designMethod = n.designMethod, a.submitDisabled = !1;
n.bindingsUrl;
a.moduleEntries = [], a.uploadMultiImage = function (t) {
require(["fileUploader"], function (e) {
e.init(function (e) {
a.miniapp[t] = e.url, a.$apply(a.miniapp)
}, {direct: !0, multiple: !1})
})
}, a.delMultiImage = function (e) {
a.miniapp[e] = ""
}, a.prevStep = function () {
a.createStep = 1
}, a.nextStep = function () {
a.checkComplete() && (a.createStep = 2)
}, a.checkComplete = function () {
if (0 == a.miniapp.uniacid) {
if (!a.miniapp.name) return util.message("名称不可为空!"), !1;
if (!a.miniapp.appid) return util.message("AppId不可为空!"), !1
}
return a.miniapp.description ? !(!a.miniapp.version || !/^[0-9]{1,2}\.[0-9]{1,2}(\.[0-9]{1,2})?$/.test(a.miniapp.version)) || (util.message("版本号错误,只能是数字、点,数字最多2位,例如 1.1.1 或1.2"), !1) : (util.message("请填写描述"), !1)
}, a.package = function (e) {
return (a.miniapp.choose_module || confirm("添加模块应用后才可进行打包操作,是否继续仅保存?")) && (a.submitDisabled = !0, t.post(n.postUrl, {
version: a.miniapp.version,
description: a.miniapp.description,
token: a.miniapp.token,
module_name: a.miniapp.choose_module.name,
uniacid: a.miniapp.uniacid,
submit: "yes",
type: a.miniapp.type
}).success(function (e) {
0 == e.message.errno ? util.message(e.message.message, e.redirect, "success") : util.message(e.message.message, "", "error"), a.submitDisabled = !1
})), !1
}, a.resourceModule = function () {
require(["fileUploader"], function (e) {
e.show(function (e) {
a.miniapp.choose_module = e, a.$apply(a.miniapp.choose_module)
}, {
direct: !0,
multiple: a.isMuti,
isWechat: !1,
type: "module",
others: {
user_module: n.uniacid ? 0 : 1,
uid: n.uid || 0,
module_uniacid: n.uniacid || 0,
mtype: n.mtype || a.presetTypeInfo.type_sign,
cover: "account" == n.mtype || "account" == a.presetTypeInfo.type_sign
}
})
})
}
}]),angular.module("wxApp").controller("tominiprogram", ["$scope", "config", "$http", function (n, i) {
for (var e in n.tomini_lists = [], n.edit_list = [], n.max_count = i.max_count, n.is_add = 1, i.tomini_lists) n.tomini_lists.push(i.tomini_lists[e]);
n.showForm = function (e) {
if (n.is_add = e, n.edit_list = [], n.is_add) for (var t = i.tomini_lists.length; t < i.max_count; t++) n.edit_list[t] || n.edit_list.push({
appid: "",
app_name: ""
}); else for (var a in i.tomini_lists) n.edit_list.push(i.tomini_lists[a]);
$("#addminiprogram").modal("show")
}
}]),angular.module("wxApp").controller("wxappVersion", ["$scope", "config", "$http", function (t, a, n) {
t.platform_version_info = a.platform_version_info, t.preview_qrcode = "", t.reason = [], t.postSuccess = function (e) {
console.log(e), e.message && 0 == e.message.errno ? (util.message(e.message.message, "", "success"), location.reload()) : util.message(e.message ? e.message.message : "出错了", "", "error")
}, t.showQr = function (e) {
t.preview_qrcode = a.qrcodeUrl + "&version_id=" + e.version_id, $("#qrCodeModal").modal("show")
}, t.showReason = function (e) {
t.reason = e.reason || [], $("#reasonModal").modal("show")
}, t.submitAudit = function (e) {
n.post(a.submitAuditUrl, {version_id: e.version_id}).success(function (e) {
t.postSuccess(e)
})
}, t.release = function (e) {
n.post(a.releaseUrl, {version_id: e.version_id}).success(function (e) {
t.postSuccess(e)
})
}, t.undo = function (e) {
0 == e.day_num || 0 == e.month_num ? util.message("撤回审核次数已用完!", "", "error") : n.post(a.undoUrl, {version_id: e.version_id}).success(function (e) {
t.postSuccess(e)
})
}, t.delete = function (e) {
n.post(a.deleteUrl, {version_id: e.version_id}).success(function (e) {
t.postSuccess(e)
})
}, t.revert = function (e) {
n.post(a.revertUrl, {version_id: e.version_id}).success(function (e) {
t.postSuccess(e)
})
}
}]),angular.module("wxApp").directive("we7ChooseMore", ["$http", function (e) {
return {
restrict: "EA",
templateUrl: "directive-selectmore-module-item.html",
scope: {selectModules: "=we7Modules", selectSingle: "=we7ChooseSingle"},
link: function (a) {
a.selectMore = function () {
a.wxappModuleList && 0 != a.wxappModuleList.length ? $("#modules-Modal").modal("show") : e({
method: "POST",
url: "./index.php?c=wxapp&a=post&do=get_wxapp_modules",
cache: !0
}).success(function (e, t) {
a.wxappModuleList = e.message.message, $("#modules-Modal").modal("show")
})
}, a.selectModule = function (e) {
if (a.selectSingle) return a.selectModules = [], a.selectModules.push({
title: e.title,
module: e.name,
icon: e.logo,
version: e.version,
bindings: e.bindings
}), $("#modules-Modal").modal("hide"), $(".app-list .select-more").css("display", "none"), !1;
a.selectModules.push({
title: e.title,
module: e.name,
icon: e.logo,
version: e.version,
bindings: e.bindings
}), $("#modules-Modal").modal("hide")
}, a.delModule = function (e) {
-1 < _.indexOf(a.selectModules, e) && (a.selectModules = _.without(a.selectModules, e)), _.isEmpty(a.selectModules) && $(".app-list .select-more").css("display", "")
}
}
}
}]),angular.module("wxApp").service("serviceCommon", ["$rootScope", function (e) {
var t = {
copySuccess: function (e, t) {
e = parseInt(e), t = t;
var a = $("#copy-" + e).next().html();
(!a || a.indexOf('<span class="label label-success" style="position:absolute;z-index:10"><i class="fa fa-check-circle"></i> 复制成功</span>') < 0) && $("#copy-" + e).after(t), setTimeout(function () {
t.remove()
}, 2e3)
}
};
return t
}]);