Edit D:\xinhaisoft\crisis_new\Scripts\autocjs\autoc.min.js
!function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.AutocJs=t()}(this,function(){"use strict";function n(e,t){for(var i=0;i<t.length;i++){var n=t[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var s=(function(e,t,i){return t&&n(e.prototype,t),i&&n(e,i),e}(p,[{key:"initialize",value:function(e){var t,i=this.getElements(),n=this.getData(),r=void 0;return this.set(p.defaults).set(e),r=document.querySelector(this.get("article")),t=this.generateHeadings(r.querySelectorAll(this.get("selector"))),i.article=r,n.headings=t,n.chapters=this.generateChapters(t),this}},{key:"reload",value:function(e){return this.destroy().initialize(e).render().addListeners(),this}},{key:"set",value:function(e,t){var i=p.Utils,n=this.attributes;return 2===arguments.length?n[e]=t:i.isObject(e)&&i.extend(n,e),this}},{key:"get",value:function(e){return this.attributes[e]}},{key:"getElements",value:function(){return this.elements}},{key:"getData",value:function(){return this.data}},{key:"generateHeadings",value:function(e){var t=[],i=p.Utils;return Array.prototype.forEach.call(e,function(e){t.push({id:i.guid("outline-heading"),node:e,tagName:e.tagName,level:parseInt(e.tagName.replace(/[h]/i,""),10)})}),t}},{key:"generateChapters",value:function(e){var r=p.Utils,a=[],l=1,s=0;return e.forEach(function(e,t){var i=e.level,n=-1;l<i?n=1===(s+=1)?-1:t-1:i===l||i<l&&s<i?n=1===i?-(s=1):a[t-1].pid:i<=s&&(1===i?s=1:(s-=l-i)<=1&&(s=1),n=1===s?-1:p._generatePid(a,l-i,t)),l=i,a.push({id:t,pid:n,level:s,rel:e.id,text:r.stripTags(r.trim(e.node.innerHTML))})}),this.generateChapterCode(a),a}},{key:"generateChapterCode",value:function(i){var e=p.Utils.groupBy(i,"pid");return e.forEach(function(e){e.forEach(function(e,t){e.index=t+1})}),e.forEach(function(e){e.forEach(function(t){i.forEach(function(e){-1===e.pid?e.code=String(e.index):e.pid===t.id&&(e.code=t.code+"."+e.index)})})}),this}},{key:"render",value:function(){return this.renderAnchors().renderOutline(),this}},{key:"renderAnchors",value:function(){var o=this,u=p.Utils.DOM,e=this.getData(),t=e.headings,c=e.chapters,d=this.getElements(),h=this.get("anchorURL");return t.forEach(function(e,t){var i=e.node,n=u.createElement("i",{className:"icon icon-section outline-heading-icon"}),r=h||"#"+e.id,a="front"===o.get("anchorAt")?"outline-heading-anchor-at-front":"outline-heading-anchor-at-end",l=u.createElement("a",{"aria-hidden":!0,className:"outline-heading-anchor "+a+" outline-link outline-hidden",rel:e.id,href:r},[n]),s=void 0;u.addClass(i,"outline-heading"),i.id=e.id,o.get("isGenerateHeadingChapterCode")&&(s=u.createElement("span",{className:"outline-heading-code"},[c[t].code]),i.insertBefore(s,i.firstChild)),o.get("isGenerateHeadingAnchor")&&(i.appendChild(l),d.anchors.push(l))}),this}},{key:"renderOutline",value:function(){var e=this.get("position").toLowerCase();if(!this.get("isGenerateOutline"))return this;switch(e){case"outside":this.renderOutsideOutline();break;case"inside":this.renderInsideOutline()}return this.renderChapters(),this}},{key:"renderOutsideOutline",value:function(){var e=p.Utils.DOM,t=this.getElements(),i=this.get("title");return t.title=e.createElement("h2",{className:"outline-outside-title"},[i]),t.header=e.createElement("div",{className:"outline-outside-header"},[t.title]),t.list=e.createElement("ul",{className:"outline-outside-list"}),t.body=e.createElement("div",{className:"outline-outside-body"},[t.list]),t.switcher=e.createElement("div",{className:"outline-outside-button outline-outside-switcher"},[e.createElement("i",{className:"icon icon-menu"})]),t.top=e.createElement("div",{className:"outline-outside-button outline-outside-top"},[e.createElement("a",{href:"#top",className:"outline-outside-top"},[e.createElement("i",{className:"icon icon-arrow-up"})])]),t.footer=e.createElement("div",{className:"outline-outside-footer"},[t.switcher,t.top]),t.modal=e.createElement("div",{className:"outline-outside-modal"},[t.header,t.body,t.footer]),t.overlay=e.createElement("div",{className:"outline-outside-overlay outline-hidden"}),t.wrap=e.createElement("div",{className:"outline-outside"},[t.modal,t.overlay]),document.body.appendChild(t.wrap),this}},{key:"renderInsideOutline",value:function(){var e=p.Utils.DOM,t=this.getElements(),i=this.get("title");return t.title=e.createElement("h2",{className:"outline-inside-title"},[i]),t.header=e.createElement("div",{className:"outline-inside-header"},[t.title]),t.list=e.createElement("ul",{className:"outline-inside-list"}),t.body=e.createElement("div",{className:"outline-inside-body"},[t.list]),t.wrap=e.createElement("div",{className:"outline-inside"},[t.header,t.body]),t.article.insertBefore(t.wrap,t.article.firstChild),this}},{key:"renderChapters",value:function(){var u=this,e=this.getData().chapters,c=p.Utils.DOM,d=this.getElements().list;return e.forEach(function(e){var t,i=e.pid,n=void 0,r=void 0,a=void 0,l=c.createElement("span",{className:"outline-chapter-text"},[e.text]),s=c.createElement("a",{className:"outline-link",href:"#"+e.rel,rel:e.rel},[l]),o=[];u.get("isGenerateOutlineChapterCode")&&(a=c.createElement("span",{className:"outline-chapter-code"},[e.code]),o.push(a)),o.push(s),t=c.createElement("li",{id:"outline-chapter-"+e.id,className:"outline-chapter"},o),-1===i?d.appendChild(t):(n=document.getElementById("outline-chapter-"+i),(r=document.getElementById("outline-subject-"+i))?r.appendChild(t):(r=c.createElement("ul",{id:"outline-subject-"+i,className:"outline-subject"},[t]),n.appendChild(r)))}),this}},{key:"scrollTo",value:function(t){var i=this,n=p.Utils,e=document.querySelectorAll("html,body"),r=0<=e[0].scrollTop-e[1].scrollTop?e[0]:e[1],a=r.scrollTop,l=t-r.scrollTop<0,s=r.scrollHeight-window.innerHeight,o=t-s<=0?t:s,u=0;return function e(){if(i.timer&&i.stop(),u+=1,l){if(a-=n.easeInQuad(u),r.scrollTop=a,r.scrollTop<=t)return r.scrollTop=t,i.stop(),!1}else if(a+=n.easeInQuad(u),r.scrollTop=a,r.scrollTop>=o)return r.scrollTop=o,i.stop(),!1;i.timer=setTimeout(e,30)}(),this}},{key:"stop",value:function(){return clearTimeout(this.timer),this.timer=null,this}},{key:"show",value:function(){var e=this.getElements(),t=p.Utils.DOM;return t.addClass(e.modal,"outline-outside-modal-opened"),t.removeClass(e.overlay,"outline-hidden"),this}},{key:"hide",value:function(){var e=this.getElements(),t=p.Utils.DOM;return t.removeClass(e.modal,"outline-outside-modal-opened"),t.addClass(e.overlay,"outline-hidden"),this}},{key:"toggle",value:function(){return p.Utils.DOM.hasClass(this.getElements().modal,"outline-outside-modal-opened")?this.hide():this.show(),this}},{key:"remove",value:function(){var e=this.getElements(),t=e.wrap;return this.removeListeners(),this.get("isGenerateHeadingAnchor")&&e.anchors.forEach(function(e){e.parentNode.removeChild(e)}),t.parentNode.removeChild(t),this}},{key:"destroy",value:function(){return this.remove(),this.attributes={},this.elements={article:null,wrap:null,modal:null,header:null,title:null,body:null,list:null,footer:null,switcher:null,top:null,overlay:null,anchors:[]},this.data={headings:[],chapters:[]},this.timer=null,this}},{key:"removeListeners",value:function(){var e=this.getElements(),t=e.article,i=e.wrap,n=p.Utils.Events.off,r=this.get("position").toLowerCase();return n(t,"mouseenter",this._handleArticleHeadingMouseEnter),n(t,"mouseleave",this._handleArticleHeadingMouseLeave),"outside"===r&&(n(i,"click",this._handleSwitcherClick),n(i,"click",this._handleTopClick),n(i,"click",this._handleOverlayClick)),n(i,"click",this._handleChapterClick),this.get("isGenerateHeadingAnchor")&&n(t,"click",this._handleHeadingAnchorClick),this}},{key:"addListeners",value:function(){var e=this.getElements(),t=e.article,i=e.wrap,n=p.Utils.Events.delegate,r=this.get("position").toLowerCase();return n(t,".outline-heading","mouseenter",this._handleArticleHeadingMouseEnter,this),n(t,".outline-heading","mouseleave",this._handleArticleHeadingMouseLeave,this),"outside"===r&&(n(i,".outline-outside-switcher","click",this._handleSwitcherClick,this),n(i,".outline-outside-top","click",this._handleTopClick,this),n(i,".outline-outside-overlay","click",this._handleOverlayClick,this)),n(i,".outline-link","click",this._handleChapterClick,this),this.get("isGenerateHeadingAnchor")&&n(t,".outline-heading-anchor","click",this._handleHeadingAnchorClick,this),this}},{key:"_handleArticleHeadingMouseEnter",value:function(e){var t=e.delegateTarget.querySelector(".outline-heading-anchor");return t&&p.Utils.DOM.removeClass(t,"outline-hidden"),this}},{key:"_handleArticleHeadingMouseLeave",value:function(e){var t=e.delegateTarget.querySelector(".outline-heading-anchor");return t&&p.Utils.DOM.addClass(t,"outline-hidden"),this}},{key:"_handleHeadingAnchorClick",value:function(e){var t=e.delegateTarget.getAttribute("rel"),i=document.querySelector("#"+t),n=p.Utils,r=n.DOM,a=n.Events,l=r.offset(i).top;return n.isEmpty(this.get("anchorURL"))&&(this.stop().scrollTo(l),a.stop(e)),this}},{key:"_handleChapterClick",value:function(e){var t=e.delegateTarget.getAttribute("rel"),i=document.querySelector("#"+t),n=p.Utils,r=n.DOM,a=n.Events,l=r.offset(i).top;return"outside"===this.get("position")&&this.hide(),this.stop().scrollTo(l),a.stop(e),this}},{key:"_handleSwitcherClick",value:function(){return this.toggle(),this}},{key:"_handleTopClick",value:function(e){var t=p.Utils.Events;return this.stop().scrollTo(0),t.stop(e),this}},{key:"_handleOverlayClick",value:function(){return this.hide(),this}}]),p);function p(e){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,p),this.attributes={},this.elements={article:null,wrap:null,modal:null,header:null,title:null,body:null,list:null,footer:null,switcher:null,top:null,overlay:null,anchors:[]},this.data={headings:[],chapters:[]},this.timer=null,this.initialize(e).render().addListeners(),this}return s.defaults={article:"#article",selector:"h1,h2,h3,h4,h5,h6",title:"??????",position:"outside",anchorURL:"",anchorAt:"front",isGenerateOutline:!0,isGenerateOutlineChapterCode:!0,isGenerateHeadingChapterCode:!1,isGenerateHeadingAnchor:!0},s.Utils={uuid:0,isObject:function(e){return"[object Object]"===Object.prototype.toString.apply(e)&&null!==e},isArray:function(e){return Array.isArray?Array.isArray(e):"[object Array]"===Object.prototype.toString.apply(e)},isElement:function(e){return e&&e.nodeName&&e.tagName&&1===e.nodeType},isEmpty:function(e){return"string"==typeof e&&""===e},guid:function(e){var t=s.Utils;return t.uuid+=1,e?e+"-"+t.uuid:"guid-"+t.uuid},trim:function(e){return e.replace(/^\s+/g,"").replace(/\s+$/g,"")},stripTags:function(e){return e.replace(/<\/?[^>]+(>|$)/g,"")},groupBy:function(e,i){var n={};return e.forEach(function(e){var t=JSON.stringify(function(e){return[e[i]]}(e));n[t]=n[t]||[],n[t].push(e)}),Object.keys(n).map(function(e){return n[e]})},easeInQuad:function(e){return e*e},extend:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(e[i]=t[i])}},s.Utils.DOM={createElement:function(e,t,i){var n=s.Utils,r=n.DOM,a=document.createElement(e);for(var l in t)t.hasOwnProperty(l)&&r.setAttribute(a,l,t[l]);return n.isArray(i)&&i.forEach(function(e){var t=n.isElement(e)?e:document.createTextNode(e);a.appendChild(t)}),a},setAttribute:function(e,t,i){var n=e.tagName.toLowerCase();switch(t){case"style":e.style.cssText=i;break;case"value":"input"===n||"textarea"===n?e.value=i:e.setAttribute(t,i);break;case"className":e.className=i;break;default:e.setAttribute(t,i)}},hasClass:function(e,t){var i=e.className;return!!i&&i.match(new RegExp("(\\s|^)"+t+"(\\s|$)"))},addClass:function(e,t){var i=e.className;if(s.Utils.DOM.hasClass(e,t))return!1;i+=0<i.length?" "+t:t,e.className=i},removeClass:function(e,t){var i=s.Utils,n=e.className;if(!n||!i.DOM.hasClass(e,t))return!1;n=i.trim(n.replace(t,"")),e.className=n},offset:function(e){var t=s.Utils.DOM;return{left:t.offsetLeft(e),top:t.offsetTop(e)}},offsetTop:function(e){var t=s.Utils.DOM,i=e.offsetTop;return null!==e.offsetParent&&(i+=t.offsetTop(e.offsetParent)),i},offsetLeft:function(e){var t=s.Utils.DOM,i=e.offsetLeft;return null!==e.offsetParent&&(i+=t.offsetLeft(e.offsetParent)),i}},s.Utils.Events={delegate:function(t,i,e,n,r,a){"mouseenter"!==e&&"mouseleave"!==e||(a=!0),n._delegateWrapper=n,t.addEventListener(e,function(e){(e.delegateTarget=s.getDelegateTarget(t,e.target,i))&&n.call(r||t,e)},a||!1)},off:function(e,t,i,n){i._delegateWrapper&&delete(i=i._delegateWrapper)._delegateWrapper,"mouseenter"!==t&&"mouseleave"!==t||(n=!0),e.removeEventListener(t,i,n||!1)},stop:function(e){var t=s.Utils.Events;t.stopPropagation(e),t.preventDefault(e)},stopPropagation:function(e){var t=window.event;e.stopPropagation?e.stopPropagation():t.cancelBubble=!0},preventDefault:function(e){var t=window.event;e.preventDefault?e.preventDefault():t.returnValue=!1}},s.getDelegateTarget=function(e,t,i){for(;t&&t!==e;){if(s.Utils.DOM.hasClass(t,i.replace(".","")))return t;t=t.parentElement}return null},s._generatePid=function(e,t,i){var n=void 0;switch(t){case 2:n=e[e[e[i-1].pid].pid].pid;break;case 3:n=e[e[e[e[i-1].pid].pid].pid].pid;break;case 4:n=e[e[e[e[e[i-1].pid].pid].pid].pid].pid;break;case 5:n=e[e[e[e[e[e[i-1].pid].pid].pid].pid].pid].pid;break;default:n=e[e[i-1].pid].pid}return n},window.jQuery&&$.extend($.fn,{articleOutline:function(e){var t=$(this);return new s($.extend({},e,{article:t}))}}),s}); //# sourceMappingURL=autoc.min.js.map
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de