bem
Version:
1,058 lines (1,057 loc) • 90.2 kB
JavaScript
var BEMHTML = (function(exports) {
var __r8, __r10, __r12, __r14, __r16, __r18, __r20, __r22, __r24, __r26, __r33, __r34, __r44, __r45, __r46;
exports.apply = apply;
function apply() {
return $79.call(this);
}
function $3() {
var BEM_ = {}, toString = Object["prototype"]["toString"], SHORT_TAGS = {
area: 1,
base: 1,
br: 1,
col: 1,
command: 1,
embed: 1,
hr: 1,
img: 1,
input: 1,
keygen: 1,
link: 1,
meta: 1,
param: 1,
source: 1,
wbr: 1
};
(function(BEM, undefined) {
var MOD_DELIM = "_", ELEM_DELIM = "__", NAME_PATTERN = "[a-zA-Z0-9-]+";
var buildModPostfix = function(modName, modVal, buffer) {
buffer.push(MOD_DELIM, modName, MOD_DELIM, modVal);
};
var buildBlockClass = function(name, modName, modVal, buffer) {
buffer.push(name);
modVal && buildModPostfix(modName, modVal, buffer);
};
var buildElemClass = function(block, name, modName, modVal, buffer) {
buildBlockClass(block, undefined, undefined, buffer);
buffer.push(ELEM_DELIM, name);
modVal && buildModPostfix(modName, modVal, buffer);
};
BEM["INTERNAL"] = {
NAME_PATTERN: NAME_PATTERN,
MOD_DELIM: MOD_DELIM,
ELEM_DELIM: ELEM_DELIM,
buildModPostfix: function(modName, modVal, buffer) {
var res = buffer || [];
buildModPostfix(modName, modVal, res);
return buffer ? res : res.join("");
},
buildClass: function(block, elem, modName, modVal, buffer) {
var typeOf = typeof modName;
if (typeOf == "string") {
if (typeof modVal != "string") {
buffer = modVal;
modVal = modName;
modName = elem;
elem = undefined;
} else {
undefined;
}
} else {
if (typeOf != "undefined") {
buffer = modName;
modName = undefined;
} else {
if (elem && typeof elem != "string") {
buffer = elem;
elem = undefined;
} else {
undefined;
}
}
}
undefined;
if (!(elem || modName || buffer)) {
return block;
} else {
undefined;
}
undefined;
var res = buffer || [];
elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res);
return buffer ? res : res.join("");
},
buildModsClasses: function(block, elem, mods, buffer) {
var res = buffer || [];
if (mods) {
var modName;
for (modName in mods) {
if (mods.hasOwnProperty(modName) && mods[modName] && mods[modName]["length"]) {
var modVal = mods[modName];
res.push(" ");
elem ? buildElemClass(block, elem, modName, modVal, res) : buildBlockClass(block, modName, modVal, res);
} else {
undefined;
}
}
} else {
undefined;
}
undefined;
return buffer ? res : res.join("");
},
buildClasses: function(block, elem, mods, buffer) {
var res = buffer || [];
elem ? buildElemClass(block, elem, undefined, undefined, res) : buildBlockClass(block, undefined, undefined, res);
this.buildModsClasses(block, elem, mods, buffer);
return buffer ? res : res.join("");
}
};
})(BEM_);
var buildEscape = function() {
var ts = {
'"': """,
"&": "&",
"<": "<",
">": ">"
}, f = function(t) {
return ts[t] || t;
};
return function(r) {
r = new RegExp(r, "g");
return function(s) {
return ("" + s).replace(r, f);
};
};
}(), ctx = {
ctx: this,
_start: true,
apply: apply,
_buf: [],
_: {
isArray: function(obj) {
return toString.call(obj) === "[object Array]";
},
isSimple: function(obj) {
var t = typeof obj;
return t === "string" || t === "number" || t === "boolean";
},
isShortTag: function(t) {
return SHORT_TAGS.hasOwnProperty(t);
},
extend: function(o1, o2) {
if (!o1 || !o2) {
return o1 || o2;
} else {
undefined;
}
undefined;
var res = {}, n;
for (n in o1) {
o1.hasOwnProperty(n) && (res[n] = o1[n]);
}
undefined;
for (n in o2) {
o2.hasOwnProperty(n) && (res[n] = o2[n]);
}
undefined;
return res;
},
identify: function() {
var cnt = 0, expando = "__" + +(new Date), get = function() {
return "uniq" + ++cnt;
};
return function(obj, onlyGet) {
if (!obj) {
return get();
} else {
undefined;
}
undefined;
if (onlyGet || obj[expando]) {
return obj[expando];
} else {
return obj[expando] = get();
}
};
}(),
xmlEscape: buildEscape("[&<>]"),
attrEscape: buildEscape('["&<>]')
},
BEM: BEM_,
isFirst: function() {
return this["position"] === 1;
},
isLast: function() {
return this["position"] === this["_listLength"];
},
generateId: function() {
return this["_"].identify(this["ctx"]);
}
};
ctx.apply();
return ctx["_buf"].join("");
return;
}
function $4() {
return this["ctx"]["content"];
return;
}
function $5() {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return $4.call(this);
}
}
function $7() {
if (!!this["ctx"]["_wrap"] === false) {
if (!!this["mods"]["inner"] === false) {
"";
var __r48 = this["_mode"];
this["_mode"] = "";
var __r49 = this["ctx"];
this["ctx"] = {
elem: "inner",
content: this["ctx"]["content"],
_wrap: true
};
$79.call(this);
this["_mode"] = __r48;
this["ctx"] = __r49;
"";
undefined;
undefined;
undefined;
return;
} else {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return this["ctx"]["content"];
return;
}
}
} else {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return this["ctx"]["content"];
return;
}
}
}
function $11() {
var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = {
href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join(""))
};
while (p = props.pop()) {
ctx[p] && (a[p] = ctx[p]);
}
return a;
return;
}
function $12() {
if (!!this["ctx"]["url"] === false) {
return {};
return;
} else {
var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = {
href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join(""))
};
while (p = props.pop()) {
ctx[p] && (a[p] = ctx[p]);
}
return a;
return;
}
}
function $13() {
return undefined;
return;
}
function $14() {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return $13.call(this);
}
}
function $18() {
return true;
return;
}
function $21() {
var _this = this, BEM_ = _this["BEM"], v = this["ctx"], buf = this["_buf"], tag;
tag = ("", __r8 = this["_mode"], this["_mode"] = "tag", __r9 = $79.call(this), this["_mode"] = __r8, "", __r9);
typeof tag != "undefined" || (tag = v["tag"]);
typeof tag != "undefined" || (tag = "div");
if (tag) {
var jsParams, js;
if (this["block"] && v["js"] !== false) {
js = ("", __r12 = this["_mode"], this["_mode"] = "js", __r13 = $79.call(this), this["_mode"] = __r12, "", __r13);
js = js ? this["_"].extend(v["js"], js === true ? {} : js) : v["js"] === true ? {} : v["js"];
js && ((jsParams = {})[BEM_["INTERNAL"].buildClass(this["block"], v["elem"])] = js);
} else {
undefined;
}
undefined;
buf.push("<", tag);
var isBEM = ("", __r14 = this["_mode"], this["_mode"] = "bem", __r15 = $79.call(this), this["_mode"] = __r14, "", __r15);
typeof isBEM != "undefined" || (isBEM = typeof v["bem"] != "undefined" ? v["bem"] : v["block"] || v["elem"]);
var cls = ("", __r16 = this["_mode"], this["_mode"] = "cls", __r17 = $79.call(this), this["_mode"] = __r16, "", __r17);
cls || (cls = v["cls"]);
var addJSInitClass = v["block"] && jsParams;
if (isBEM || cls) {
buf.push(' class="');
if (isBEM) {
BEM_["INTERNAL"].buildClasses(this["block"], v["elem"], v["elemMods"] || v["mods"], buf);
var mix = ("", __r18 = this["_mode"], this["_mode"] = "mix", __r19 = $79.call(this), this["_mode"] = __r18, "", __r19);
v["mix"] && (mix = mix ? mix.concat(v["mix"]) : v["mix"]);
if (mix) {
var i = 0, l = mix["length"], mixItem, hasItem, block;
while (i < l) {
mixItem = mix[i++];
hasItem = mixItem["block"] || mixItem["elem"], block = mixItem["block"] || _this["block"];
hasItem && buf.push(" ");
BEM_["INTERNAL"][hasItem ? "buildClasses" : "buildModsClasses"](block, mixItem["elem"] || (mixItem["block"] ? undefined : _this["elem"]), mixItem["elemMods"] || mixItem["mods"], buf);
if (mixItem["js"]) {
(jsParams || (jsParams = {}))[BEM_["INTERNAL"].buildClass(block, mixItem["elem"])] = mixItem["js"] === true ? {} : mixItem["js"];
addJSInitClass || (addJSInitClass = block && !mixItem["elem"]);
} else {
undefined;
}
}
} else {
undefined;
}
} else {
undefined;
}
undefined;
cls && buf.push(isBEM ? " " : "", cls);
addJSInitClass && buf.push(" i-bem");
buf.push('"');
} else {
undefined;
}
undefined;
if (jsParams) {
var jsAttr = ("", __r22 = this["_mode"], this["_mode"] = "jsAttr", __r23 = $79.call(this), this["_mode"] = __r22, "", __r23);
buf.push(" ", jsAttr || "onclick", '="return ', this["_"].attrEscape(JSON.stringify(jsParams)), '"');
} else {
undefined;
}
undefined;
var attrs = ("", __r24 = this["_mode"], this["_mode"] = "attrs", __r25 = $79.call(this), this["_mode"] = __r24, "", __r25);
attrs = this["_"].extend(attrs, v["attrs"]);
if (attrs) {
var name;
for (name in attrs) {
buf.push(" ", name, '="', this["_"].attrEscape(attrs[name]), '"');
}
} else {
undefined;
}
} else {
undefined;
}
if (this["_"].isShortTag(tag)) {
buf.push("/>");
} else {
tag && buf.push(">");
var content = ("", __r26 = this["_mode"], this["_mode"] = "content", __r27 = $79.call(this), this["_mode"] = __r26, "", __r27);
if (content || content === 0) {
var isBEM = this["block"] || this["elem"];
{
"";
var __r28 = this["_notNewList"];
this["_notNewList"] = false;
var __r29 = this["position"];
this["position"] = isBEM ? 1 : this["position"];
var __r30 = this["_listLength"];
this["_listLength"] = isBEM ? 1 : this["_listLength"];
var __r31 = this["ctx"];
this["ctx"] = content;
var __r32 = this["_mode"];
this["_mode"] = "";
$79.call(this);
this["_notNewList"] = __r28;
this["position"] = __r29;
this["_listLength"] = __r30;
this["ctx"] = __r31;
this["_mode"] = __r32;
"";
}
undefined;
undefined;
undefined;
} else {
undefined;
}
undefined;
tag && buf.push("</", tag, ">");
}
return;
}
function $22() {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return $21.call(this);
}
}
function $32() {
var __this = this;
if (!!this["_mode"] === false) {
if (!this["_"].isSimple(this["ctx"]) === false) {
this["_listLength"]--;
var ctx = this["ctx"];
(ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx);
return;
} else {
if (!!this["ctx"] === false) {
this["_listLength"]--;
return;
} else {
if (!this["_"].isArray(this["ctx"]) === false) {
var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"];
if (prevNotNewList) {
this["_listLength"] += l - 1;
} else {
this["position"] = 0;
this["_listLength"] = l;
}
this["_notNewList"] = true;
while (i < l) {
{
"";
var __r7 = this["ctx"];
this["ctx"] = v[i++];
apply.call(__this);
this["ctx"] = __r7;
"";
}
undefined;
}
undefined;
prevNotNewList || (this["position"] = prevPos);
return;
} else {
if (!true === false) {
var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"];
this["ctx"] || (this["ctx"] = {});
"";
var __r0 = this["_mode"];
this["_mode"] = "default";
var __r1 = this["block"];
this["block"] = vBlock || (vElem ? block : undefined);
var __r2 = this["_currBlock"];
this["_currBlock"] = vBlock || vElem ? undefined : block;
var __r3 = this["elem"];
this["elem"] = this["ctx"]["elem"];
var __r4 = this["mods"];
this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {};
var __r5 = this["elemMods"];
this["elemMods"] = this["ctx"]["elemMods"] || {};
this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--;
$79.call(this);
undefined;
undefined;
this["_mode"] = __r0;
this["block"] = __r1;
this["_currBlock"] = __r2;
this["elem"] = __r3;
this["mods"] = __r4;
this["elemMods"] = __r5;
"";
undefined;
return;
} else {
return $e.call(this);
}
}
}
}
} else {
return $e.call(this, []);
}
}
function $33() {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return $32.call(this);
}
}
function $38() {
var __this = this;
if (!!this["_start"] === false) {
return $3.call(this);
} else {
var __t = this["_mode"];
if (__t === "tag") {
return undefined;
return;
} else if (__t === "content") {
return this["ctx"]["content"];
return;
} else if (__t === "attrs") {
return undefined;
return;
} else if (__t === "js") {
return undefined;
return;
} else if (__t === "bem") {
return undefined;
return;
} else if (__t === "default") {
return $21.call(this);
} else if (__t === "mix") {
return undefined;
return;
} else if (__t === "jsAttr") {
return undefined;
return;
} else if (__t === "cls") {
return undefined;
return;
} else {
if (!!this["_mode"] === false) {
if (!this["_"].isSimple(this["ctx"]) === false) {
this["_listLength"]--;
var ctx = this["ctx"];
(ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx);
return;
} else {
if (!!this["ctx"] === false) {
this["_listLength"]--;
return;
} else {
if (!this["_"].isArray(this["ctx"]) === false) {
var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"];
if (prevNotNewList) {
this["_listLength"] += l - 1;
} else {
this["position"] = 0;
this["_listLength"] = l;
}
this["_notNewList"] = true;
while (i < l) {
{
"";
var __r7 = this["ctx"];
this["ctx"] = v[i++];
apply.call(__this);
this["ctx"] = __r7;
"";
}
undefined;
}
undefined;
prevNotNewList || (this["position"] = prevPos);
return;
} else {
if (!true === false) {
var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"];
this["ctx"] || (this["ctx"] = {});
"";
var __r0 = this["_mode"];
this["_mode"] = "default";
var __r1 = this["block"];
this["block"] = vBlock || (vElem ? block : undefined);
var __r2 = this["_currBlock"];
this["_currBlock"] = vBlock || vElem ? undefined : block;
var __r3 = this["elem"];
this["elem"] = this["ctx"]["elem"];
var __r4 = this["mods"];
this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {};
var __r5 = this["elemMods"];
this["elemMods"] = this["ctx"]["elemMods"] || {};
this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--;
$79.call(this);
undefined;
undefined;
this["_mode"] = __r0;
this["block"] = __r1;
this["_currBlock"] = __r2;
this["elem"] = __r3;
this["mods"] = __r4;
this["elemMods"] = __r5;
"";
undefined;
return;
} else {
return $e.call(this, []);
}
}
}
}
} else {
return $e.call(this, []);
}
}
}
}
function $43() {
var __this = this;
if (!(this["mods"] && this["mods"]["pseudo"]) === false) {
if (!!this["elem"] === false) {
var __t = this["_mode"];
if (__t === "tag") {
return this["ctx"]["url"] ? "a" : "span";
return;
} else if (__t === "content") {
if (!!this["ctx"]["_wrap"] === false) {
if (!!this["mods"]["inner"] === false) {
"";
var __r48 = this["_mode"];
this["_mode"] = "";
var __r49 = this["ctx"];
this["ctx"] = {
elem: "inner",
content: this["ctx"]["content"],
_wrap: true
};
$79.call(this);
this["_mode"] = __r48;
this["ctx"] = __r49;
"";
undefined;
undefined;
undefined;
return;
} else {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return this["ctx"]["content"];
return;
}
}
} else {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return this["ctx"]["content"];
return;
}
}
} else if (__t === "attrs") {
if (!!this["ctx"]["url"] === false) {
return {};
return;
} else {
var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = {
href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join(""))
};
while (p = props.pop()) {
ctx[p] && (a[p] = ctx[p]);
}
return a;
return;
}
} else if (__t === "js") {
return true;
return;
} else if (__t === "bem") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return undefined;
return;
}
} else if (__t === "default") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return $21.call(this);
}
} else if (__t === "mix") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return undefined;
return;
}
} else if (__t === "jsAttr") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return undefined;
return;
}
} else if (__t === "cls") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return undefined;
return;
}
} else {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
if (!!this["_mode"] === false) {
if (!this["_"].isSimple(this["ctx"]) === false) {
this["_listLength"]--;
var ctx = this["ctx"];
(ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx);
return;
} else {
if (!!this["ctx"] === false) {
this["_listLength"]--;
return;
} else {
if (!this["_"].isArray(this["ctx"]) === false) {
var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"];
if (prevNotNewList) {
this["_listLength"] += l - 1;
} else {
this["position"] = 0;
this["_listLength"] = l;
}
this["_notNewList"] = true;
while (i < l) {
{
"";
var __r7 = this["ctx"];
this["ctx"] = v[i++];
apply.call(__this);
this["ctx"] = __r7;
"";
}
undefined;
}
undefined;
prevNotNewList || (this["position"] = prevPos);
return;
} else {
if (!true === false) {
var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"];
this["ctx"] || (this["ctx"] = {});
"";
var __r0 = this["_mode"];
this["_mode"] = "default";
var __r1 = this["block"];
this["block"] = vBlock || (vElem ? block : undefined);
var __r2 = this["_currBlock"];
this["_currBlock"] = vBlock || vElem ? undefined : block;
var __r3 = this["elem"];
this["elem"] = this["ctx"]["elem"];
var __r4 = this["mods"];
this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {};
var __r5 = this["elemMods"];
this["elemMods"] = this["ctx"]["elemMods"] || {};
this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--;
$79.call(this);
undefined;
undefined;
this["_mode"] = __r0;
this["block"] = __r1;
this["_currBlock"] = __r2;
this["elem"] = __r3;
this["mods"] = __r4;
this["elemMods"] = __r5;
"";
undefined;
return;
} else {
return $e.call(this, []);
}
}
}
}
} else {
return $e.call(this, []);
}
}
}
} else {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
var __t = this["_mode"];
if (__t === "tag") {
return undefined;
return;
} else if (__t === "content") {
return this["ctx"]["content"];
return;
} else if (__t === "attrs") {
return undefined;
return;
} else if (__t === "js") {
return undefined;
return;
} else if (__t === "bem") {
return undefined;
return;
} else if (__t === "default") {
return $21.call(this);
} else if (__t === "mix") {
return undefined;
return;
} else if (__t === "jsAttr") {
return undefined;
return;
} else if (__t === "cls") {
return undefined;
return;
} else {
if (!!this["_mode"] === false) {
if (!this["_"].isSimple(this["ctx"]) === false) {
this["_listLength"]--;
var ctx = this["ctx"];
(ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx);
return;
} else {
if (!!this["ctx"] === false) {
this["_listLength"]--;
return;
} else {
if (!this["_"].isArray(this["ctx"]) === false) {
var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"];
if (prevNotNewList) {
this["_listLength"] += l - 1;
} else {
this["position"] = 0;
this["_listLength"] = l;
}
this["_notNewList"] = true;
while (i < l) {
{
"";
var __r7 = this["ctx"];
this["ctx"] = v[i++];
apply.call(__this);
this["ctx"] = __r7;
"";
}
undefined;
}
undefined;
prevNotNewList || (this["position"] = prevPos);
return;
} else {
if (!true === false) {
var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"];
this["ctx"] || (this["ctx"] = {});
"";
var __r0 = this["_mode"];
this["_mode"] = "default";
var __r1 = this["block"];
this["block"] = vBlock || (vElem ? block : undefined);
var __r2 = this["_currBlock"];
this["_currBlock"] = vBlock || vElem ? undefined : block;
var __r3 = this["elem"];
this["elem"] = this["ctx"]["elem"];
var __r4 = this["mods"];
this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {};
var __r5 = this["elemMods"];
this["elemMods"] = this["ctx"]["elemMods"] || {};
this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--;
$79.call(this);
undefined;
undefined;
this["_mode"] = __r0;
this["block"] = __r1;
this["_currBlock"] = __r2;
this["elem"] = __r3;
this["mods"] = __r4;
this["elemMods"] = __r5;
"";
undefined;
return;
} else {
return $e.call(this, []);
}
}
}
}
} else {
return $e.call(this, []);
}
}
}
}
} else {
if (!!this["elem"] === false) {
var __t = this["_mode"];
if (__t === "tag") {
return "a";
return;
} else if (__t === "content") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return this["ctx"]["content"];
return;
}
} else if (__t === "attrs") {
var ctx = this["ctx"], props = [ "title", "target" ], p = typeof ctx["url"], a = {
href: p === "undefined" || p === "string" ? ctx["url"] : (p = [], "", __r44 = this["_buf"], this["_buf"] = p, __r45 = this["_mode"], this["_mode"] = "", __r46 = this["ctx"], this["ctx"] = ctx["url"], __r47 = $79.call(this), this["_buf"] = __r44, this["_mode"] = __r45, this["ctx"] = __r46, "", __r47, p.join(""))
};
while (p = props.pop()) {
ctx[p] && (a[p] = ctx[p]);
}
return a;
return;
} else if (__t === "js") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return undefined;
return;
}
} else if (__t === "bem") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return undefined;
return;
}
} else if (__t === "default") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return $21.call(this);
}
} else if (__t === "mix") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return undefined;
return;
}
} else if (__t === "jsAttr") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return undefined;
return;
}
} else if (__t === "cls") {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
return undefined;
return;
}
} else {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
if (!!this["_mode"] === false) {
if (!this["_"].isSimple(this["ctx"]) === false) {
this["_listLength"]--;
var ctx = this["ctx"];
(ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx);
return;
} else {
if (!!this["ctx"] === false) {
this["_listLength"]--;
return;
} else {
if (!this["_"].isArray(this["ctx"]) === false) {
var v = this["ctx"], l = v["length"], i = 0, prevPos = this["position"], prevNotNewList = this["_notNewList"];
if (prevNotNewList) {
this["_listLength"] += l - 1;
} else {
this["position"] = 0;
this["_listLength"] = l;
}
this["_notNewList"] = true;
while (i < l) {
{
"";
var __r7 = this["ctx"];
this["ctx"] = v[i++];
apply.call(__this);
this["ctx"] = __r7;
"";
}
undefined;
}
undefined;
prevNotNewList || (this["position"] = prevPos);
return;
} else {
if (!true === false) {
var vBlock = this["ctx"]["block"], vElem = this["ctx"]["elem"], block = this["_currBlock"] || this["block"];
this["ctx"] || (this["ctx"] = {});
"";
var __r0 = this["_mode"];
this["_mode"] = "default";
var __r1 = this["block"];
this["block"] = vBlock || (vElem ? block : undefined);
var __r2 = this["_currBlock"];
this["_currBlock"] = vBlock || vElem ? undefined : block;
var __r3 = this["elem"];
this["elem"] = this["ctx"]["elem"];
var __r4 = this["mods"];
this["mods"] = (vBlock ? this["ctx"]["mods"] : this["mods"]) || {};
var __r5 = this["elemMods"];
this["elemMods"] = this["ctx"]["elemMods"] || {};
this["block"] || this["elem"] ? this["position"] = (this["position"] || 0) + 1 : this["_listLength"]--;
$79.call(this);
undefined;
undefined;
this["_mode"] = __r0;
this["block"] = __r1;
this["_currBlock"] = __r2;
this["elem"] = __r3;
this["mods"] = __r4;
this["elemMods"] = __r5;
"";
undefined;
return;
} else {
return $e.call(this, []);
}
}
}
}
} else {
return $e.call(this, []);
}
}
}
} else {
if (!!this["_start"] === false) {
return $3.call(this);
} else {
var __t = this["_mode"];
if (__t === "tag") {
return undefined;
return;
} else if (__t === "content") {
return this["ctx"]["content"];
return;
} else if (__t === "attrs") {
return undefined;
return;
} else if (__t === "js") {
return undefined;
return;
} else if (__t === "bem") {
return undefined;
return;
} else if (__t === "default") {
return $21.call(this);
} else if (__t === "mix") {
return undefined;
return;
} else if (__t === "jsAttr") {
return undefined;
return;
} else if (__t === "cls") {
return undefined;
return;
} else {
if (!!this["_mode"] === false) {
if (!this["_"].isSimple(this["ctx"]) === false) {
this["_listLength"]--;
var ctx = this["ctx"];
(ctx && ctx !== true || ctx === 0) && this["_buf"].push(ctx);
return;
} else {