/* automatically generated by JSCoverage - do not edit */
try {
  if (typeof top === 'object' && top !== null && typeof top.opener === 'object' && top.opener !== null) {
    // this is a browser window that was opened from another window

    if (! top.opener._$jscoverage) {
      top.opener._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null) {
    // this is a browser window

    try {
      if (typeof top.opener === 'object' && top.opener !== null && top.opener._$jscoverage) {
        top._$jscoverage = top.opener._$jscoverage;
      }
    }
    catch (e) {}

    if (! top._$jscoverage) {
      top._$jscoverage = {};
    }
  }
}
catch (e) {}

try {
  if (typeof top === 'object' && top !== null && top._$jscoverage) {
    _$jscoverage = top._$jscoverage;
  }
}
catch (e) {}
if (typeof _$jscoverage !== 'object') {
  _$jscoverage = {};
}
if (! _$jscoverage['plugins/elementpath.js']) {
  _$jscoverage['plugins/elementpath.js'] = [];
  _$jscoverage['plugins/elementpath.js'][6] = 0;
  _$jscoverage['plugins/elementpath.js'][7] = 0;
  _$jscoverage['plugins/elementpath.js'][10] = 0;
  _$jscoverage['plugins/elementpath.js'][11] = 0;
  _$jscoverage['plugins/elementpath.js'][12] = 0;
  _$jscoverage['plugins/elementpath.js'][14] = 0;
  _$jscoverage['plugins/elementpath.js'][16] = 0;
  _$jscoverage['plugins/elementpath.js'][17] = 0;
  _$jscoverage['plugins/elementpath.js'][19] = 0;
  _$jscoverage['plugins/elementpath.js'][20] = 0;
  _$jscoverage['plugins/elementpath.js'][24] = 0;
  _$jscoverage['plugins/elementpath.js'][26] = 0;
  _$jscoverage['plugins/elementpath.js'][27] = 0;
  _$jscoverage['plugins/elementpath.js'][28] = 0;
  _$jscoverage['plugins/elementpath.js'][29] = 0;
  _$jscoverage['plugins/elementpath.js'][31] = 0;
  _$jscoverage['plugins/elementpath.js'][32] = 0;
  _$jscoverage['plugins/elementpath.js'][33] = 0;
  _$jscoverage['plugins/elementpath.js'][35] = 0;
  _$jscoverage['plugins/elementpath.js'][36] = 0;
  _$jscoverage['plugins/elementpath.js'][37] = 0;
  _$jscoverage['plugins/elementpath.js'][38] = 0;
  _$jscoverage['plugins/elementpath.js'][41] = 0;
}
_$jscoverage['plugins/elementpath.js'].source = ["<span class=\"c\">/**</span>","<span class=\"c\"> * &#36873;&#21462;&#36335;&#24452;&#21629;&#20196;</span>","<span class=\"c\"> * @file</span>","<span class=\"c\"> */</span>","","UE<span class=\"k\">.</span>plugins<span class=\"k\">[</span><span class=\"s\">'elementpath'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">function</span><span class=\"k\">()</span><span class=\"k\">{</span>","    <span class=\"k\">var</span> currentLevel<span class=\"k\">,</span>","        tagNames<span class=\"k\">,</span>","        me <span class=\"k\">=</span> <span class=\"k\">this</span><span class=\"k\">;</span>","    me<span class=\"k\">.</span>setOpt<span class=\"k\">(</span><span class=\"s\">'elementPathEnabled'</span><span class=\"k\">,</span><span class=\"k\">true</span><span class=\"k\">);</span>","    <span class=\"k\">if</span><span class=\"k\">(!</span>me<span class=\"k\">.</span>options<span class=\"k\">.</span>elementPathEnabled<span class=\"k\">)</span><span class=\"k\">{</span>","        <span class=\"k\">return</span><span class=\"k\">;</span>","    <span class=\"k\">}</span>","    me<span class=\"k\">.</span>commands<span class=\"k\">[</span><span class=\"s\">'elementpath'</span><span class=\"k\">]</span> <span class=\"k\">=</span> <span class=\"k\">{</span>","        execCommand <span class=\"k\">:</span> <span class=\"k\">function</span><span class=\"k\">(</span> cmdName<span class=\"k\">,</span> level <span class=\"k\">)</span> <span class=\"k\">{</span>","            <span class=\"k\">debugger</span><span class=\"k\">;</span>","            <span class=\"k\">var</span> start <span class=\"k\">=</span> tagNames<span class=\"k\">[</span>level<span class=\"k\">],</span>","                range <span class=\"k\">=</span> me<span class=\"k\">.</span>selection<span class=\"k\">.</span>getRange<span class=\"k\">();</span>","            currentLevel <span class=\"k\">=</span> level<span class=\"k\">*</span><span class=\"s\">1</span><span class=\"k\">;</span>","            range<span class=\"k\">.</span>selectNode<span class=\"k\">(</span>start<span class=\"k\">).</span>select<span class=\"k\">();</span>","        <span class=\"k\">}</span><span class=\"k\">,</span>","        queryCommandValue <span class=\"k\">:</span> <span class=\"k\">function</span><span class=\"k\">()</span> <span class=\"k\">{</span>","            <span class=\"c\">//&#20135;&#29983;&#19968;&#20010;&#21103;&#26412;&#65292;&#19981;&#33021;&#20462;&#25913;&#21407;&#26469;&#30340;startElementPath;</span>","            <span class=\"k\">var</span> parents <span class=\"k\">=</span> <span class=\"k\">[].</span>concat<span class=\"k\">(</span><span class=\"k\">this</span><span class=\"k\">.</span>selection<span class=\"k\">.</span>getStartElementPath<span class=\"k\">()).</span>reverse<span class=\"k\">(),</span>","                names <span class=\"k\">=</span> <span class=\"k\">[];</span>","            tagNames <span class=\"k\">=</span> parents<span class=\"k\">;</span>","            <span class=\"k\">for</span><span class=\"k\">(</span><span class=\"k\">var</span> i<span class=\"k\">=</span><span class=\"s\">0</span><span class=\"k\">,</span>ci<span class=\"k\">;</span>ci<span class=\"k\">=</span>parents<span class=\"k\">[</span>i<span class=\"k\">];</span>i<span class=\"k\">++)</span><span class=\"k\">{</span>","                <span class=\"k\">if</span><span class=\"k\">(</span>ci<span class=\"k\">.</span>nodeType <span class=\"k\">==</span> <span class=\"s\">3</span><span class=\"k\">)</span> <span class=\"k\">{</span>","                    <span class=\"k\">continue</span><span class=\"k\">;</span>","                <span class=\"k\">}</span>","                <span class=\"k\">var</span> name <span class=\"k\">=</span> ci<span class=\"k\">.</span>tagName<span class=\"k\">.</span>toLowerCase<span class=\"k\">();</span>","                <span class=\"k\">if</span><span class=\"k\">(</span>name <span class=\"k\">==</span> <span class=\"s\">'img'</span> <span class=\"k\">&amp;&amp;</span> ci<span class=\"k\">.</span>getAttribute<span class=\"k\">(</span><span class=\"s\">'anchorname'</span><span class=\"k\">))</span><span class=\"k\">{</span>","                    name <span class=\"k\">=</span> <span class=\"s\">'anchor'</span><span class=\"k\">;</span>","                <span class=\"k\">}</span>","                names<span class=\"k\">[</span>i<span class=\"k\">]</span> <span class=\"k\">=</span> name<span class=\"k\">;</span>","                <span class=\"k\">if</span><span class=\"k\">(</span>currentLevel <span class=\"k\">==</span> i<span class=\"k\">)</span><span class=\"k\">{</span>","                   currentLevel <span class=\"k\">=</span> <span class=\"k\">-</span><span class=\"s\">1</span><span class=\"k\">;</span>","                    <span class=\"k\">break</span><span class=\"k\">;</span>","                <span class=\"k\">}</span>","            <span class=\"k\">}</span>","            <span class=\"k\">return</span> names<span class=\"k\">;</span>","        <span class=\"k\">}</span>","    <span class=\"k\">}</span><span class=\"k\">;</span>","<span class=\"k\">}</span><span class=\"k\">;</span>",""];
_$jscoverage['plugins/elementpath.js'][6]++;
UE.plugins.elementpath = (function () {
  _$jscoverage['plugins/elementpath.js'][7]++;
  var currentLevel, tagNames, me = this;
  _$jscoverage['plugins/elementpath.js'][10]++;
  me.setOpt("elementPathEnabled", true);
  _$jscoverage['plugins/elementpath.js'][11]++;
  if ((! me.options.elementPathEnabled)) {
    _$jscoverage['plugins/elementpath.js'][12]++;
    return;
  }
  _$jscoverage['plugins/elementpath.js'][14]++;
  me.commands.elementpath = {execCommand: (function (cmdName, level) {
  _$jscoverage['plugins/elementpath.js'][16]++;
  debugger;
  _$jscoverage['plugins/elementpath.js'][17]++;
  var start = tagNames[level], range = me.selection.getRange();
  _$jscoverage['plugins/elementpath.js'][19]++;
  currentLevel = (level * 1);
  _$jscoverage['plugins/elementpath.js'][20]++;
  range.selectNode(start).select();
}), queryCommandValue: (function () {
  _$jscoverage['plugins/elementpath.js'][24]++;
  var parents = [].concat(this.selection.getStartElementPath()).reverse(), names = [];
  _$jscoverage['plugins/elementpath.js'][26]++;
  tagNames = parents;
  _$jscoverage['plugins/elementpath.js'][27]++;
  for (var i = 0, ci; (ci = parents[i]); (i++)) {
    _$jscoverage['plugins/elementpath.js'][28]++;
    if ((ci.nodeType == 3)) {
      _$jscoverage['plugins/elementpath.js'][29]++;
      continue;
    }
    _$jscoverage['plugins/elementpath.js'][31]++;
    var name = ci.tagName.toLowerCase();
    _$jscoverage['plugins/elementpath.js'][32]++;
    if (((name == "img") && ci.getAttribute("anchorname"))) {
      _$jscoverage['plugins/elementpath.js'][33]++;
      name = "anchor";
    }
    _$jscoverage['plugins/elementpath.js'][35]++;
    names[i] = name;
    _$jscoverage['plugins/elementpath.js'][36]++;
    if ((currentLevel == i)) {
      _$jscoverage['plugins/elementpath.js'][37]++;
      currentLevel = -1;
      _$jscoverage['plugins/elementpath.js'][38]++;
      break;
    }
}
  _$jscoverage['plugins/elementpath.js'][41]++;
  return names;
})};
});
